forked from deepStateMirrors/tabi
2616 lines
2.5 MiB
2616 lines
2.5 MiB
var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var w,k,M,T,C,S,_,A,N,I,R,B,$,F=Object.create,z=Object.defineProperty,G=Object.getOwnPropertyDescriptor,U=Object.getOwnPropertyNames,q=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,mt=(e,t)=>z(e,"name",{value:t,configurable:!0}),e=(e,t)=>()=>t=e?e(e=0):t,W=(t,r,n,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let e of U(r))j.call(t,e)||e===n||z(t,e,{get:()=>r[e],enumerable:!(i=G(r,e))||i.enumerable});return t},Y=(e,t,r)=>(W(e,t,"default"),r&&W(r,t,"default")),ee=(e,t,r)=>(r=null!=e?F(q(e)):{},W(!t&&e&&e.__esModule?r:z(r,"default",{value:e,enumerable:!0}),e)),te=(MBe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))((e,t)=>{function r(){var i="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",t="Invalid Date",s=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,e={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:mt(function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"},"ordinal")},n=mt(function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},"m"),r={s:n,z:mt(function(e){var e=-e.utcOffset(),t=Math.abs(e),r=Math.floor(t/60),t=t%60;return(e<=0?"+":"-")+n(r,2,"0")+":"+n(t,2,"0")},"z"),m:mt(function e(t,r){var n,i,a;return t.date()<r.date()?-e(r,t):(n=12*(r.year()-t.year())+(r.month()-t.month()),a=r-(i=t.clone().add(n,m))<0,t=t.clone().add(n+(a?-1:1),m),+(-(n+(r-i)/(a?i-t:t-i))||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:i,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,n){var i;if(!t)return o;if("string"==typeof t){var a=t.toLowerCase(),r=(l[a]&&(i=a),r&&(l[a]=r,i=a),t.split("-"));if(!i&&1<r.length)return e(r[0])}else a=t.name,l[a]=t,i=a;return!n&&i&&(o=i),i||!n&&o},"t"),b=mt(function(e,t){return c(e)?e.clone():((t="object"==typeof t?t:{}).date=e,t.args=arguments,new k(t))},"O"),w=r,k=(w.l=h,w.i=c,w.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})},mt(E,"M"),(e=E.prototype).parse=function(a){this.$d=(()=>{var e=a.date,t=a.utc;if(null===e)return new Date(NaN);if(w.u(e))return new Date;if(!(e instanceof Date||"string"!=typeof e||/Z$/i.test(e))){var r,n,i=e.match(s);if(i)return r=i[2]-1||0,n=(i[7]||"0").substring(0,3),t?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}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 w},e.isValid=function(){return this.$d.toString()!==t},e.isSame=function(e,t){return e=b(e),this.startOf(t)<=e&&e<=this.endOf(t)},e.isAfter=function(e,t){return b(e)<this.startOf(t)},e.isBefore=function(e,t){return this.endOf(t)<b(e)},e.$g=function(e,t,r){return w.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,n=!!w.u(t)||t,t=w.p(e),i=mt(function(e,t){return t=w.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r),n?t:t.endOf(g)},"l"),a=mt(function(e,t){return w.w(r.toDate()[e].apply(r.toDate("s"),(n?[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 n?i(1,0):i(31,11);case m:return n?i(1,o):i(0,o+1);case f:var h=(s<(h=this.$locale().weekStart||0)?s+7:s)-h;return i(n?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=w.p(e),r="set"+(this.$u?"UTC":""),r=((n={}).day=r+"Date",n.date=r+"Date",n[m]=r+"Month",n.year=r+"FullYear",n.hour=r+"Hours",n[d]=r+"Minutes",n[u]=r+"Seconds",n[i]=r+"Milliseconds",n[e]),n=e===g?this.$D+(t-this.$W):t;return e===m||e===y?((t=this.clone().set(v,1)).$d[r](n),t.init(),this.$d=t.set(v,Math.min(this.$D,t.daysInMonth())).$d):r&&this.$d[r](n),this.init(),this},e.set=function(e,t){return this.clone().$set(e,t)},e.get=function(e){return this[w.p(e)]()},e.add=function(r,e){var n=this,e=(r=Number(r),w.p(e)),t=mt(function(e){var t=b(n);return w.w(t.date(t.date()+Math.round(e*r)),n)},"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,w.w(e,this))},e.subtract=function(e,t){return this.add(-1*e,t)},e.format=function(e){var i,r,n,a,s,o,l,c,h,u,d=this,p=this.$locale();return this.isValid()?(i=e||"YYYY-MM-DDTHH:mm:ssZ",r=w.z(this),n=this.$H,a=this.$m,s=this.$M,o=p.weekdays,l=p.months,e=p.meridiem,c=mt(function(e,t,r,n){return e&&(e[t]||e(d,i))||r[t].slice(0,n)},"h"),h=mt(function(e){return w.s(n%12||12,e,"0")},"d"),u=e||function(e,t,r){return e=e<12?"AM":"PM",r?e.toLowerCase():e},i.replace(x,function(e,t){return t||(()=>{switch(e){case"YY":return String(d.$y).slice(-2);case"YYYY":return w.s(d.$y,4,"0");case"M":return s+1;case"MM":return w.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 w.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(n);case"HH":return w.s(n,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return u(n,a,!0);case"A":return u(n,a,!1);case"m":return String(a);case"mm":return w.s(a,2,"0");case"s":return String(d.$s);case"ss":return w.s(d.$s,2,"0");case"SSS":return w.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 n,i=this,t=w.p(t),a=b(e),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=mt(function(){return w.m(i,a)},"D");switch(t){case y:n=l()/12;break;case m:n=l();break;case"quarter":n=l()/3;break;case f:n=(o-s)/6048e5;break;case g:n=(o-s)/864e5;break;case p:n=o/36e5;break;case d:n=o/6e4;break;case u:n=o/1e3;break;default:n=o}return r?n:w.a(n)},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 w.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()},E),T=k.prototype;function E(e){this.$L=h(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[a]=!0}return b.prototype=T,[["$ms",i],["$s",u],["$m",d],["$H",p],["$W",g],["$M",m],["$y",y],["$D",v]].forEach(function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),b.extend=function(e,t){return e.$i||(e(t,k,b),e.$i=!0),b},b.locale=h,b.isDayjs=c,b.unix=function(e){return b(1e3*e)},b.en=l[o],b.Ls=l,b.p={},b}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=r()}),t=e(()=>{w=ee(te(),1),k={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},M={trace:mt(()=>{},"trace"),debug:mt(()=>{},"debug"),info:mt(()=>{},"info"),warn:mt(()=>{},"warn"),error:mt(()=>{},"error"),fatal:mt(()=>{},"fatal")},T=mt(function(e="fatal"){let t=k.fatal;"string"==typeof e?e.toLowerCase()in k&&(t=k[e]):"number"==typeof e&&(t=e),M.trace=()=>{},M.debug=()=>{},M.info=()=>{},M.warn=()=>{},M.error=()=>{},M.fatal=()=>{},t<=k.fatal&&(M.fatal=console.error?console.error.bind(console,C("FATAL"),"color: orange"):console.log.bind(console,"[35m",C("FATAL"))),t<=k.error&&(M.error=console.error?console.error.bind(console,C("ERROR"),"color: orange"):console.log.bind(console,"[31m",C("ERROR"))),t<=k.warn&&(M.warn=console.warn?console.warn.bind(console,C("WARN"),"color: orange"):console.log.bind(console,"[33m",C("WARN"))),t<=k.info&&(M.info=console.info?console.info.bind(console,C("INFO"),"color: lightblue"):console.log.bind(console,"[34m",C("INFO"))),t<=k.debug&&(M.debug=console.debug?console.debug.bind(console,C("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",C("DEBUG"))),t<=k.trace&&(M.trace=console.debug?console.debug.bind(console,C("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",C("TRACE")))},"setLogLevel"),C=mt(e=>`%c${(0,w.default)().format("ss.SSS")} : ${e} : `,"format")}),re=e(()=>{S=Object.freeze({left:0,top:0,width:16,height:16}),_=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),A=Object.freeze({...S,..._}),N=Object.freeze({...A,body:"",hidden:!1})}),ne=e(()=>{re(),I=Object.freeze({width:null,height:null}),R=Object.freeze({...I,..._})}),ie=e(()=>{B=mt((e,t,r,n="")=>{var i,a=e.split(":");if("@"===e.slice(0,1)){if(a.length<2||3<a.length)return null;n=a.shift().slice(1)}return 3<a.length||!a.length?null:1<a.length?(e=a.pop(),i=a.pop(),i={provider:0<a.length?a[0]:n,prefix:i,name:e},t&&!$(i)?null:i):1<(i=(e=a[0]).split("-")).length?(a={provider:n,prefix:i.shift(),name:i.join("-")},t&&!$(a)?null:a):r&&""===n&&(i={provider:n,prefix:"",name:e},!t||$(i,r))?i:null},"stringToIcon"),$=mt((e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),"validateIconName")});function se(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 oe=e(()=>{mt(se,"mergeIconTransformations")});function le(e,t){var r,n=se(e,t);for(r in N)r in _?r in e&&!(r in n)&&(n[r]=_[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}var ce=e(()=>{re(),oe(),mt(le,"mergeIconData")});function he(e,t){let n=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(e){var t,r;return n[e]?a[e]=[]:(e in a||(a[e]=null,(r=(t=i[e]&&i[e].parent)&&s(t))&&(a[e]=[t].concat(r))),a[e])}return mt(s,"resolve"),(t||Object.keys(n).concat(Object.keys(i))).forEach(s),a}var ue=e(()=>{mt(he,"getIconsTree")});function de(e,t,r){let n=e.icons,i=e.aliases||Object.create(null),a={};function s(e){a=le(n[e]||i[e],a)}return mt(s,"parse"),s(t),r.forEach(s),le(e,a)}function pe(e,t){var r;return e.icons[t]?de(e,t,[]):(r=he(e,[t])[t])?de(e,t,r):null}var ge=e(()=>{ce(),ue(),mt(de,"internalGetIconData"),mt(pe,"getIconData")});function fe(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 n,i=e.split(me);if(null===i||!i.length)return e;let a=[],s=i.shift(),o=ye.test(s);for(;;){if(!o||(n=parseFloat(s),isNaN(n))?a.push(s):a.push(Math.ceil(n*t*r)/r),void 0===(s=i.shift()))return a.join("");o=!o}}var me,ye,ve=e(()=>{me=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ye=/^-?[0-9.]*[0-9]+[0-9.]*$/g,mt(fe,"calculateSize")});function xe(e,t="defs"){let r="",n=e.indexOf("<"+t);for(;0<=n;){var i=e.indexOf(">",n),a=e.indexOf("</"+t);if(-1===i||-1===a)break;var s=e.indexOf(">",a);if(-1===s)break;r+=e.slice(i+1,a).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function be(e,t){return e?"<defs>"+e+"</defs>"+t:t}function we(e,t,r){return be((e=xe(e)).defs,t+e.content+r)}var ke=e(()=>{mt(xe,"splitSVGDefs"),mt(be,"mergeDefsAndContent"),mt(we,"wrapSVGContent")});function Te(e,t){let r={...A,...e},n={...R,...t},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,i=([r,n].forEach(e=>{let t=[],r=e.hFlip,n=e.vFlip,i=e.rotate;r?n?i+=2:(t.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),t.push("scale(-1 1)"),s.top=s.left=0):n&&(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(i<0&&(i-=4*Math.floor(i/4)),i%=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()+")")}i%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=we(o,'<g transform="'+t.join(" ")+'">',"</g>"))}),n.width),a=n.height,l=s.width,c=s.height,h,u,d=(null===i?(u=null===a?"1em":"auto"===a?c:a,h=fe(u,l/c)):(h="auto"===i?l:i,u=null===a?fe(h,c/l):"auto"===a?c:a),{}),p=mt((e,t)=>{Ee(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 Ee,Ce=e(()=>{re(),ne(),ve(),ke(),Ee=mt(e=>"unset"===e||"undefined"===e||"none"===e,"isUnsetKeyword"),mt(Te,"iconToSVG")});function Se(n,i=Ae){for(var e,t=[];e=_e.exec(n);)t.push(e[1]);if(t.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);t.forEach(e=>{var t="function"==typeof i?i(e):i+(Le++).toString(),e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+e+')([")]|\\.[a-z])',"g"),"$1"+t+r+"$3")}),n=n.replace(new RegExp(r,"g"),"")}return n}var _e,Ae,Le,Ne=e(()=>{_e=/\sid="(\S+)"/g,Ae="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Le=0,mt(Se,"replaceIDs")});function Ie(e,t){let r=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var Re,Me,De,Oe,Pe,Be,$e,Fe=e(()=>{mt(Ie,"iconToHTML")}),ze=MBe((e,t)=>{function n(e){if(!(100<(e=String(e)).length)&&(e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e))){var t=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*t;case"weeks":case"week":case"w":return 6048e5*t;case"days":case"day":case"d":return 864e5*t;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*t;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*t;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}function i(e){var t=Math.abs(e);return 864e5<=t?Math.round(e/864e5)+"d":36e5<=t?Math.round(e/36e5)+"h":6e4<=t?Math.round(e/6e4)+"m":1e3<=t?Math.round(e/1e3)+"s":e+"ms"}function a(e){var t=Math.abs(e);return 864e5<=t?r(e,t,864e5,"day"):36e5<=t?r(e,t,36e5,"hour"):6e4<=t?r(e,t,6e4,"minute"):1e3<=t?r(e,t,1e3,"second"):e+" ms"}function r(e,t,r,n){return t=1.5*r<=t,Math.round(e/r)+" "+n+(t?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"==r&&0<e.length)return n(e);if("number"==r&&isFinite(e))return(t.long?a:i)(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},mt(n,"parse"),mt(i,"fmtShort"),mt(a,"fmtLong"),mt(r,"plural")}),Ge=MBe((e,t)=>{function r(t){function e(t){let r=0;for(let e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e),r|=0;return o.colors[Math.abs(r)%o.colors.length]}function o(e){let r,t=null,n,i;function s(...a){if(s.enabled){let n=s,e=Number(new Date),t=e-(r||e),i=(n.diff=t,n.prev=r,n.curr=e,r=e,a[0]=o.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O"),0);a[0]=a[0].replace(/%([a-zA-Z%])/g,(e,t)=>{var r;return"%%"===e?"%":(i++,"function"==typeof(t=o.formatters[t])&&(r=a[i],e=t.call(n,r),a.splice(i,1),i--),e)}),o.formatArgs.call(n,a),(n.log||o.log).apply(n,a)}}return mt(s,"debug"),s.namespace=e,s.useColors=o.useColors(),s.color=o.selectColor(e),s.extend=a,s.destroy=o.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:mt(()=>null!==t?t:(n!==o.namespaces&&(n=o.namespaces,i=o.enabled(e)),i),"get"),set:mt(e=>{t=e},"set")}),"function"==typeof o.init&&o.init(s),s}function a(e,t){return(t=o(this.namespace+("u"<typeof t?":":t)+e)).log=this.log,t}function r(e){var t;o.save(e),o.namespaces=e,o.names=[],o.skips=[];for(t of("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean))"-"===t[0]?o.skips.push(t.slice(1)):o.names.push(t)}function n(e,t){let r=0,n=0,i=-1,a=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(i=n,a=r):r++,n++;else{if(-1===i)return!1;n=i+1,a++,r=a}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}function i(){var e=[...o.names,...o.skips.map(e=>"-"+e)].join(",");return o.enable(""),e}function s(e){for(var t of o.skips)if(n(e,t))return!1;for(var r of o.names)if(n(e,r))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return((o.debug=o).default=o).coerce=l,o.disable=i,o.enable=r,o.enabled=s,o.humanize=ze(),o.destroy=c,Object.keys(t).forEach(e=>{o[e]=t[e]}),o.names=[],o.skips=[],o.formatters={},mt(e,"selectColor"),o.selectColor=e,mt(o,"createDebug"),mt(a,"extend"),mt(r,"enable"),mt(n,"matchesTemplate"),mt(i,"disable"),mt(s,"enabled"),mt(l,"coerce"),mt(c,"destroy"),o.enable(o.load()),o}mt(r,"setup"),t.exports=r}),Ue=MBe((t,r)=>{function e(){if(typeof window<"u"&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&31<=parseInt(e[1],10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");let t=0,r=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(t++,"%c"===e)&&(r=t)}),e.splice(r,0,n)}}function i(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch{}}function a(){let e;try{e=t.storage.getItem("debug")}catch{}return e=!e&&typeof process<"u"&&"env"in process?process.env.DEBUG:e}function s(){try{return localStorage}catch{}}t.formatArgs=n,t.save=i,t.load=a,t.useColors=e,t.storage=s(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],mt(e,"useColors"),mt(n,"formatArgs"),t.log=console.debug||console.log||(()=>{}),mt(i,"save"),mt(a,"load"),mt(s,"localstorage"),r.exports=Ge()(t),r.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}),qe=e(()=>{ie(),ge(),Ce(),Ne(),Fe(),ee(Ue(),1)}),je=e(()=>{t(),qe(),Re={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},Me=new Map,De=new Map,Oe=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(M.debug("Registering icon pack:",t.name),"loader"in t)De.set(t.name,t.loader);else{if(!("icons"in t))throw M.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Me.set(t.name,t.icons)}}},"registerIconPacks"),Pe=mt(async(e,t)=>{var r=B(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 n=Me.get(t);if(!n){var i=De.get(t);if(!i)throw new Error("Icon set not found: "+r.prefix);try{n={...await i(),prefix:t},Me.set(t,n)}catch(e){throw M.error(e),new Error("Failed to load icon set: "+r.prefix)}}if(i=pe(n,r.name))return i;throw new Error("Icon not found: "+e)},"getRegisteredIconData"),Be=mt(async e=>{try{return await Pe(e),!0}catch{return!1}},"isIconAvailable"),$e=mt(async(e,t,r)=>{let n;try{n=await Pe(e,t?.fallbackPrefix)}catch(e){M.error(e),n=Re}return Ie(Se((e=Te(n,t)).body),{...e.attributes,...r})},"getIconSVG")});function We(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n,i=Array.from("string"==typeof e?[e]:e),e=(i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,""),i.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&&(n=new RegExp(`
|
||
[ ]{`+Math.min.apply(Math,e)+"}","g"),i=i.map(function(e){return e.replace(n,`
|
||
`)})),i[0]=i[0].replace(/^\r?\n/,""),i[0]);return t.forEach(function(e,t){var r=(n=a.match(/(?:^|\n)( *)$/))?n[1]:"",n=e;"string"==typeof e&&e.includes(`
|
||
`)&&(n=String(e).split(`
|
||
`).map(function(e,t){return 0===t?e:""+r+e}).join(`
|
||
`)),a+=n+i[t+1]}),a}var Ye,He,Ve,Xe,Ke,Ze,Qe,Je,et,tt,rt,nt,it,at,st,ot,lt,ct,ht,ut,dt,pt,gt,ft,vt,xt,bt,wt,kt,Tt,Et,Ct,St,_t,At,Lt,Nt,It,Rt,Mt,Dt,Ot,Pt,Bt,$t,Ft,zt,Gt,Ut,qt,jt,Wt,Yt,a,Ht,Vt,Xt,r,Kt,Zt,Qt,n,Jt,er,tr,rr,nr,ir,ar,sr,or,lr,cr,hr,ur,dr,pr,gr,fr,mr,yr,vr,xr,br,wr,kr,Tr,Er,Cr,Sr,_r,Ar,Lr,Nr,Ir,Rr,Mr,Dr,Or,Pr,Br,$r,Fr=e(()=>{mt(We,"dedent")}),zr=e(()=>{Ye=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,He=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ve=/\s*%%.*\n/gm}),Gr=e(()=>{Xe=class extends Error{static{mt(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}}}),Ur=e(()=>{t(),zr(),Gr(),Ke={},Ze=mt(function(e,t){e=e.replace(Ye,"").replace(He,"").replace(Ve,`
|
||
`);for(var[r,{detector:n}]of Object.entries(Ke))if(n(e,t))return r;throw new Xe("No diagram type detected matching given configuration for text: "+e)},"detectType"),Qe=mt((...e)=>{for(var{id:t,detector:r,loader:n}of e)Je(t,r,n)},"registerLazyLoadedDiagrams"),Je=mt((e,t,r)=>{Ke[e]&&M.warn(`Detector with key ${e} already exists. Overwriting.`),Ke[e]={detector:t,loader:r},M.debug(`Detector with key ${e} added`+(r?" with loader":""))},"addDetector"),et=mt(e=>Ke[e].loader,"getDiagramLoader")}),qr=e(()=>{function B(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),t=[1,24],r=[1,25],$=[1,26],F=[1,27],z=[1,28],n=[1,63],i=[1,64],a=[1,65],s=[1,66],o=[1,67],l=[1,68],h=[1,69],u=[1,29],d=[1,30],p=[1,31],g=[1,32],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],E=[1,42],C=[1,43],S=[1,44],_=[1,45],A=[1,46],L=[1,47],N=[1,48],I=[1,50],G=[1,51],U=[1,52],q=[1,53],j=[1,54],W=[1,55],Y=[1,56],H=[1,57],V=[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],R=[1,82],M=[1,83],D=[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],ne=[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,n,i,a,s){var o=a.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(a[o-3]);break;case 19:n.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:n.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),n.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:n.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:n.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:n.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:n.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:n.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:n.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:n.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:n.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:n.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:n.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:n.addContainer("container",...a[o]),this.$=a[o];break;case 48:n.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:n.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:n.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:n.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:n.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:n.addComponent("component",...a[o]),this.$=a[o];break;case 54:n.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:n.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:n.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:n.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:n.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:n.addRel("rel",...a[o]),this.$=a[o];break;case 61:n.addRel("birel",...a[o]),this.$=a[o];break;case 62:n.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:n.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:n.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:n.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:n.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),n.addRel("rel",...a[o]),this.$=a[o];break;case 68:n.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:n.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:n.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:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{14:[1,74]},e(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:i,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:R,77:M,79:D,80:O},{35:86,75:81,76:R,77:M,79:D,80:O},{35:87,75:81,76:R,77:M,79:D,80:O},{35:88,75:81,76:R,77:M,79:D,80:O},{35:89,75:81,76:R,77:M,79:D,80:O},{35:90,75:81,76:R,77:M,79:D,80:O},{35:91,75:81,76:R,77:M,79:D,80:O},{35:92,75:81,76:R,77:M,79:D,80:O},{35:93,75:81,76:R,77:M,79:D,80:O},{35:94,75:81,76:R,77:M,79:D,80:O},{35:95,75:81,76:R,77:M,79:D,80:O},{35:96,75:81,76:R,77:M,79:D,80:O},{35:97,75:81,76:R,77:M,79:D,80:O},{35:98,75:81,76:R,77:M,79:D,80:O},{35:99,75:81,76:R,77:M,79:D,80:O},{35:100,75:81,76:R,77:M,79:D,80:O},{35:101,75:81,76:R,77:M,79:D,80:O},{35:102,75:81,76:R,77:M,79:D,80:O},{35:103,75:81,76:R,77:M,79:D,80:O},{35:104,75:81,76:R,77:M,79:D,80:O},e(P,[2,59]),{35:105,75:81,76:R,77:M,79:D,80:O},{35:106,75:81,76:R,77:M,79:D,80:O},{35:107,75:81,76:R,77:M,79:D,80:O},{35:108,75:81,76:R,77:M,79:D,80:O},{35:109,75:81,76:R,77:M,79:D,80:O},{35:110,75:81,76:R,77:M,79:D,80:O},{35:111,75:81,76:R,77:M,79:D,80:O},{35:112,75:81,76:R,77:M,79:D,80:O},{35:113,75:81,76:R,77:M,79:D,80:O},{35:114,75:81,76:R,77:M,79:D,80:O},{35:115,75:81,76:R,77:M,79:D,80:O},{20:116,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:R,77:M,79:D,80:O},{35:120,75:81,76:R,77:M,79:D,80:O},{35:121,75:81,76:R,77:M,79:D,80:O},{35:122,75:81,76:R,77:M,79:D,80:O},{35:123,75:81,76:R,77:M,79:D,80:O},{35:124,75:81,76:R,77:M,79:D,80:O},{35:125,75:81,76:R,77:M,79:D,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:n,36:i,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:R,77:M,79:D,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(ne,[2,25]),e(ne,[2,26],{12:[1,138]}),e(ne,[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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){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:[],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"),(tt=new((B.prototype=t).Parser=B)).parser=tt,rt=tt}),jr=e(()=>{nt=mt((t,r,{depth:n=2,clobber:i=!1}={})=>{let a={depth:n,clobber:i};return Array.isArray(r)&&!Array.isArray(t)?(r.forEach(e=>nt(t,e,a)),t):Array.isArray(r)&&Array.isArray(t)?(r.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||n<=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]||void 0!==t[e]&&"object"!=typeof t[e]?(i||"object"!=typeof t[e]&&"object"!=typeof r[e])&&(t[e]=r[e]):(void 0===t[e]&&(t[e]=Array.isArray(r[e])?[]:{}),t[e]=nt(t[e],r[e],{depth:n-1,clobber:i}))}),t)},"assignWithDepth"),it=nt}),Wr=e(()=>{at={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},n)=>{if(!t)return 2.55*r;e/=360,t/=100;var i=(r/=100)<.5?r*(1+t):r+t-r*t,a=2*r-i;switch(n){case"r":return 255*at.hue2rgb(a,i,e+.3333333333333333);case"g":return 255*at.hue2rgb(a,i,e);case"b":return 255*at.hue2rgb(a,i,e-.3333333333333333)}},"hsl2rgb"),rgb2hsl:mt(({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;var i=Math.max(e,t,r),a=Math.min(e,t,r),s=(i+a)/2;if("l"===n)return 100*s;if(i===a)return 0;var o=i-a;if("s"===n)return 100*(.5<s?o/(2-i-a):o/(i+a));switch(i){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")},st=at}),Yr=e(()=>{ot={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")},lt=ot}),Hr=e(()=>{ct={dec2hex:mt(e=>1<(e=Math.round(e).toString(16)).length?e:"0"+e,"dec2hex")},ht=ct}),Vr=e(()=>{Wr(),Yr(),Hr(),ut={channel:st,lang:lt,unit:ht}}),Xr=e(()=>{Vr(),dt={};for(let e=0;e<=255;e++)dt[e]=ut.unit.dec2hex(e);pt={ALL:0,RGB:1,HSL:2}}),Kr=e(()=>{Xr(),gt=class{static{mt(this,"Type")}constructor(){this.type=pt.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=pt.ALL}is(e){return this.type===e}},ft=gt}),Zr=e(()=>{Vr(),Kr(),Xr(),vt=class{static{mt(this,"Channels")}constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new ft}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=pt.ALL,this}_ensureHSL(){var e=this.data,{h:t,s:r,l:n}=e;void 0===t&&(e.h=ut.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=ut.channel.rgb2hsl(e,"s")),void 0===n&&(e.l=ut.channel.rgb2hsl(e,"l"))}_ensureRGB(){var e=this.data,{r:t,g:r,b:n}=e;void 0===t&&(e.r=ut.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=ut.channel.hsl2rgb(e,"g")),void 0===n&&(e.b=ut.channel.hsl2rgb(e,"b"))}get r(){var e=this.data,t=e.r;return this.type.is(pt.HSL)||void 0===t?(this._ensureHSL(),ut.channel.hsl2rgb(e,"r")):t}get g(){var e=this.data,t=e.g;return this.type.is(pt.HSL)||void 0===t?(this._ensureHSL(),ut.channel.hsl2rgb(e,"g")):t}get b(){var e=this.data,t=e.b;return this.type.is(pt.HSL)||void 0===t?(this._ensureHSL(),ut.channel.hsl2rgb(e,"b")):t}get h(){var e=this.data,t=e.h;return this.type.is(pt.RGB)||void 0===t?(this._ensureRGB(),ut.channel.rgb2hsl(e,"h")):t}get s(){var e=this.data,t=e.s;return this.type.is(pt.RGB)||void 0===t?(this._ensureRGB(),ut.channel.rgb2hsl(e,"s")):t}get l(){var e=this.data,t=e.l;return this.type.is(pt.RGB)||void 0===t?(this._ensureRGB(),ut.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(pt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(pt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(pt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(pt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(pt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(pt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},xt=vt}),Qr=e(()=>{Zr(),bt=new xt({r:0,g:0,b:0,a:0},"transparent"),wt=bt}),Jr=e(()=>{Qr(),Xr(),kt={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:mt(e=>{if(35===e.charCodeAt(0)){var t,r,n,i,a,s=e.match(kt.re);if(s)return s=s[1],t=parseInt(s,16),s=s.length,wt.set({r:(t>>(n=(r=4<s)?8:4)*(3+(i=(s=s%4==0)?0:-1))&(a=r?255:15))*(r=r?1:17),g:(t>>n*(2+i)&a)*r,b:(t>>n*(1+i)&a)*r,a:s?(t&a)*r/255:1},e)}},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:n}=e;return n<1?"#"+dt[Math.round(e)]+dt[Math.round(t)]+dt[Math.round(r)]+dt[Math.round(255*n)]:"#"+dt[Math.round(e)]+dt[Math.round(t)]+dt[Math.round(r)]},"stringify")},Tt=kt}),en=e(()=>{Vr(),Qr(),Et={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(Et.hueRe)){var[,t,r]=r;switch(r){case"grad":return ut.channel.clamp.h(.9*parseFloat(t));case"rad":return ut.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return ut.channel.clamp.h(360*parseFloat(t))}}return ut.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:mt(e=>{var t,r,n,i,a=e.charCodeAt(0);if((104===a||72===a)&&(a=e.match(Et.re)))return[,a,t,r,n,i]=a,wt.set({h:Et._hue2deg(a),s:ut.channel.clamp.s(parseFloat(t)),l:ut.channel.clamp.l(parseFloat(r)),a:n?ut.channel.clamp.a(i?parseFloat(n)/100:parseFloat(n)):1},e)},"parse"),stringify:mt(e=>{var{h:e,s:t,l:r,a:n}=e;return n<1?`hsla(${ut.lang.round(e)}, ${ut.lang.round(t)}%, ${ut.lang.round(r)}%, ${n})`:`hsl(${ut.lang.round(e)}, ${ut.lang.round(t)}%, ${ut.lang.round(r)}%)`},"stringify")},Ct=Et}),tn=e(()=>{Jr(),St={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=St.colors[e])return Tt.parse(e)},"parse"),stringify:mt(e=>{var t,r=Tt.stringify(e);for(t in St.colors)if(St.colors[t]===r)return t},"stringify")},_t=St}),rn=e(()=>{Vr(),Qr(),At={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,n,i,a,s,o,l=e.charCodeAt(0);if((114===l||82===l)&&(l=e.match(At.re)))return[,l,t,r,n,i,a,s,o]=l,wt.set({r:ut.channel.clamp.r(t?2.55*parseFloat(l):parseFloat(l)),g:ut.channel.clamp.g(n?2.55*parseFloat(r):parseFloat(r)),b:ut.channel.clamp.b(a?2.55*parseFloat(i):parseFloat(i)),a:s?ut.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:n}=e;return n<1?`rgba(${ut.lang.round(e)}, ${ut.lang.round(t)}, ${ut.lang.round(r)}, ${ut.lang.round(n)})`:`rgb(${ut.lang.round(e)}, ${ut.lang.round(t)}, ${ut.lang.round(r)})`},"stringify")},Lt=At}),nn=e(()=>{Jr(),en(),tn(),rn(),Xr(),Nt={format:{keyword:_t,hex:Tt,rgb:Lt,rgba:Lt,hsl:Ct,hsla:Ct},parse:mt(e=>{if("string"!=typeof e)return e;var t=Tt.parse(e)||Lt.parse(e)||Ct.parse(e)||_t.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(pt.HSL)||void 0===e.data.r?Ct:e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Lt:Tt).stringify(e),"stringify")},It=Nt}),an=e(()=>{Vr(),nn(),Rt=mt((e,t)=>{var r,n=It.parse(e);for(r in t)n[r]=ut.channel.clamp[r](t[r]);return It.stringify(n)},"change"),Mt=Rt}),sn=e(()=>{Vr(),Qr(),nn(),an(),Dt=mt((e,t,r=0,n=1)=>"number"!=typeof e?Mt(e,{a:t}):(e=wt.set({r:ut.channel.clamp.r(e),g:ut.channel.clamp.g(t),b:ut.channel.clamp.b(r),a:ut.channel.clamp.a(n)}),It.stringify(e)),"rgba"),Ot=Dt}),on=e(()=>{Vr(),nn(),Pt=mt((e,t)=>ut.lang.round(It.parse(e)[t]),"channel"),Bt=Pt}),ln=e(()=>{Vr(),nn(),$t=mt(e=>{var{r:e,g:t,b:r}=It.parse(e),e=.2126*ut.channel.toLinear(e)+.7152*ut.channel.toLinear(t)+.0722*ut.channel.toLinear(r);return ut.lang.round(e)},"luminance"),Ft=$t}),cn=e(()=>{ln(),zt=mt(e=>.5<=Ft(e),"isLight"),Gt=zt}),hn=e(()=>{cn(),Ut=mt(e=>!Gt(e),"isDark"),qt=Ut}),un=e(()=>{Vr(),nn(),jt=mt((e,t,r)=>{var n=(e=It.parse(e))[t];return n!==(r=ut.channel.clamp[t](n+r))&&(e[t]=r),It.stringify(e)},"adjustChannel"),Wt=jt}),dn=e(()=>{un(),Yt=mt((e,t)=>Wt(e,"l",t),"lighten"),a=Yt}),pn=e(()=>{un(),Ht=mt((e,t)=>Wt(e,"l",-t),"darken"),Vt=Ht}),gn=e(()=>{nn(),an(),Xt=mt((e,t)=>{var r,n=It.parse(e),i={};for(r in t)t[r]&&(i[r]=n[r]+t[r]);return Mt(e,i)},"adjust"),r=Xt}),fn=e(()=>{nn(),sn(),Kt=mt((e,t,r=50)=>{var{r:e,g:n,b:i,a}=It.parse(e),{r:t,g:s,b:o,a:l}=It.parse(t),c=2*(r/=100)-1,h=a-l;return Ot(e*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+t*(h=1-c),n*c+s*h,i*c+o*h,a*r+l*(1-r))},"mix"),Zt=Kt}),mn=e(()=>{nn(),fn(),Qt=mt((e,t=100)=>{var r=It.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Zt(r,e,t)},"invert"),n=Qt}),yn=e(()=>{sn(),on(),hn(),dn(),pn(),gn(),mn()}),vn=e(()=>{yn()}),xn=e(()=>{Jt="#ffffff",er="#f2f2f2"}),bn=e(()=>{vn(),tr=mt((e,t)=>r(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),wn=e(()=>{vn(),xn(),bn(),rr=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||n(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||n(this.tertiaryColor),this.lineColor=this.lineColor||n(this.background),this.arrowheadColor=this.arrowheadColor||n(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?Vt(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||Vt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||n(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||a(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Vt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Vt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||a(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Vt(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Vt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||n(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||a(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||Vt(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]||r(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(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||r(this.primaryColor,{h:64}),this.fillType3=this.fillType3||r(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||r(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||r(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||r(this.primaryColor,{h:128}),this.fillType7=this.fillType7||r(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||r(this.primaryColor,{l:-10}),this.pie5=this.pie5||r(this.secondaryColor,{l:-10}),this.pie6=this.pie6||r(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||r(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||r(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.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||qt(this.quadrant1Fill)?a:Vt)(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?Vt(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||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(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||Jt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||er}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]}))}},nr=mt(e=>{var t=new rr;return t.calculate(e),t},"getThemeVariables")}),kn=e(()=>{vn(),bn(),ir=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=a(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=n(this.background),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=a(n("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ot(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Vt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Vt(this.sectionBkgColor,10),this.taskBorderColor=Ot(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ot(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||a(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Vt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=a(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=a(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=a(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||n(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||a(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{h:30,s:-30,l:-(4*e-10)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(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.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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||qt(this.quadrant1Fill)?a:Vt)(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||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=a(this.secondaryColor,20),this.git1=a(this.pie2||this.secondaryColor,20),this.git2=a(this.pie3||this.tertiaryColor,20),this.git3=a(this.pie4||r(this.primaryColor,{h:-30}),20),this.git4=a(this.pie5||r(this.primaryColor,{h:-60}),20),this.git5=a(this.pie6||r(this.primaryColor,{h:-90}),10),this.git6=a(this.pie7||r(this.primaryColor,{h:60}),10),this.git7=a(this.pie8||r(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||a(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||a(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]}))}},ar=mt(e=>{var t=new ir;return t.calculate(e),t},"getThemeVariables")}),Tn=e(()=>{vn(),bn(),xn(),sr=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=r(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ot(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Vt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Vt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Vt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||Vt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||r(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{h:30,l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(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||n(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||n(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=a(this.border1,23),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||a(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||a(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=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||r(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||r(this.primaryColor,{l:-10}),this.pie5=this.pie5||r(this.secondaryColor,{l:-30}),this.pie6=this.pie6||r(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||r(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||r(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||qt(this.quadrant1Fill)?a:Vt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,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||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||Vt(n(this.git0),25),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Jt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||er}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]}))}},or=mt(e=>{var t=new sr;return t.calculate(e),t},"getThemeVariables")}),En=e(()=>{vn(),xn(),bn(),lr=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=a("#cde498",10),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.primaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=Vt(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Vt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Vt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Vt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||Vt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||r(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]||r(this.mainBkg,{h:30,s:-30,l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(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||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||a(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=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(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||r(this.primaryColor,{l:-30}),this.pie5=this.pie5||r(this.secondaryColor,{l:-30}),this.pie6=this.pie6||r(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||r(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||r(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||qt(this.quadrant1Fill)?a:Vt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,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||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Jt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||er}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]}))}},cr=mt(e=>{var t=new lr;return t.calculate(e),t},"getThemeVariables")}),Cn=e(()=>{vn(),bn(),xn(),hr=class{static{mt(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=a(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=a(this.contrast,55),this.border2=this.contrast,this.actorBorder=a(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]||n(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||a(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||Vt(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]||r(this.mainBkg,{l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(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=a(this.contrast,30),this.sectionBkgColor2=a(this.contrast,30),this.taskBorderColor=Vt(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=a(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Vt(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=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(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",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||qt(this.quadrant1Fill)?a:Vt)(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||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Vt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||r(this.primaryColor,{h:-30}),this.git4=this.pie5||r(this.primaryColor,{h:-60}),this.git5=this.pie6||r(this.primaryColor,{h:-90}),this.git6=this.pie7||r(this.primaryColor,{h:60}),this.git7=this.pie8||r(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Jt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||er}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]}))}},ur=mt(e=>{var t=new hr;return t.calculate(e),t},"getThemeVariables")}),Sn=e(()=>{wn(),kn(),Tn(),En(),Cn(),dr={base:{getThemeVariables:nr},dark:{getThemeVariables:ar},default:{getThemeVariables:or},forest:{getThemeVariables:cr},neutral:{getThemeVariables:ur}}}),_n=e(()=>{pr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}}),An=e(()=>{Sn(),_n(),gr={...pr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:dr.default.getThemeVariables(),sequence:{...pr.sequence,messageFont:mt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:mt(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:mt(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...pr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...pr.c4,useWidth:void 0,personFont:mt(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...pr.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:{...pr.pie,useWidth:984},xyChart:{...pr.xyChart,useWidth:void 0},requirement:{...pr.requirement,useWidth:void 0},packet:{...pr.packet},radar:{...pr.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},fr=mt((r,n="")=>Object.keys(r).reduce((e,t)=>Array.isArray(r[t])?e:"object"==typeof r[t]&&null!==r[t]?[...e,n+t,...fr(r[t],"")]:[...e,n+t],[]),"keyify"),mr=new Set(fr(gr,"")),yr=gr}),Ln=e(()=>{An(),t(),vr=mt(e=>{if(M.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>vr(e));else{for(var t of Object.keys(e)){var r;if(M.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!mr.has(t)||null==e[t])M.debug("sanitize deleting key: ",t),delete e[t];else if("object"==typeof e[t])M.debug("sanitizing object",t),vr(e[t]);else for(r of["themeCSS","fontFamily","altFontFamily"])t.includes(r)&&(M.debug("sanitizing css option",t),e[t]=xr(e[t]))}if(e.themeVariables)for(var n of Object.keys(e.themeVariables)){var i=e.themeVariables[n];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[n]="")}M.debug("After sanitization",e)}},"sanitizeDirective"),xr=mt(e=>{let t=0,r=0;for(var n of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===n?t++:"}"===n&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss")}),Nn=e(()=>{jr(),t(),Sn(),An(),Ln(),br=Object.freeze(yr),wr=it({},br),Tr=[],Er=it({},br),Cr=mt((e,t)=>{let r=it({},e),n={};for(var i of t)Rr(i),n=it(n,i);return r=it(r,n),n.theme&&n.theme in dr&&(e=it({},kr),t=it(e.themeVariables||{},n.themeVariables),r.theme)&&r.theme in dr&&(r.themeVariables=dr[r.theme].getThemeVariables(t)),$r(Er=r),Er},"updateCurrentConfig"),Sr=mt(e=>(wr=it({},br),wr=it(wr,e),e.theme&&dr[e.theme]&&(wr.themeVariables=dr[e.theme].getThemeVariables(e.themeVariables)),Cr(wr,Tr),wr),"setSiteConfig"),_r=mt(e=>{kr=it({},e)},"saveConfigFromInitialize"),Ar=mt(e=>(wr=it(wr,e),Cr(wr,Tr),wr),"updateSiteConfig"),Lr=mt(()=>it({},wr),"getSiteConfig"),Nr=mt(e=>($r(e),it(Er,e),Ir()),"setConfig"),Ir=mt(()=>it({},Er),"getConfig"),Rr=mt(t=>{t&&(["secure",...wr.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(M.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]&&Rr(t[e])}))},"sanitize"),Mr=mt(e=>{vr(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Tr.push(e),Cr(wr,Tr)},"addDirective"),Dr=mt((e=wr)=>{Cr(e,Tr=[])},"reset"),Or={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Pr={},Br=mt(e=>{Pr[e]||(M.warn(Or[e]),Pr[e]=!0)},"issueWarning"),$r=mt(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Br("LAZY_LOAD_DEPRECATED")},"checkConfig")});function In(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Wn(i,e,r)}}function Rn(n){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Yn(n,t)}}function Mn(t,r){var n,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Qn;Fn&&Fn(t,null);let a=r.length;for(;a--;){let e=r[a];"string"==typeof e&&(n=i(e))!==e&&(zn(r)||(r[a]=n),e=n),t[e]=!0}return t}function Dn(t){for(let e=0;e<t.length;e++)ii(t,e)||(t[e]=null);return t}function On(e){var t,r,n=jn(null);for([t,r]of $n(e))ii(e,t)&&(Array.isArray(r)?n[t]=Dn(r):r&&"object"==typeof r&&r.constructor===Object?n[t]=On(r):n[t]=r);return n}function Pn(e,t){for(;null!==e;){var r=Un(e,t);if(r){if(r.get)return In(r.get);if("function"==typeof r.value)return In(r.value)}e=Gn(e)}function n(){return null}return mt(n,"fallbackValue"),n}function Bn(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ni(),u=mt(e=>Bn(e),"DOMPurify");if(u.version="3.2.5",u.removed=[],!e||!e.document||e.document.nodeType!==Li.document||!e.Element)return u.isSupported=!1,u;let i=e.document,c=i,O=c.currentScript,{DocumentFragment:P,HTMLTemplateElement:B,Node:$,Element:F,NodeFilter:t,NamedNodeMap:z=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:G,DOMParser:U,trustedTypes:d}=e,r=F.prototype,q=Pn(r,"cloneNode"),j=Pn(r,"remove"),W=Pn(r,"nextSibling"),Y=Pn(r,"childNodes"),s=Pn(r,"parentNode");var H;"function"==typeof B&&(H=i.createElement("template")).content&&H.content.ownerDocument&&(i=H.content.ownerDocument);let p,h="",{implementation:V,createNodeIterator:X,createDocumentFragment:K,getElementsByTagName:Z}=i,Q=c.importNode,g=Ri(),{MUSTACHE_EXPR:J,ERB_EXPR:ee,TMPLIT_EXPR:te,DATA_ATTR:re,ARIA_ATTR:ne,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:ae,CUSTOM_ELEMENT:se}=(u.isSupported="function"==typeof $n&&"function"==typeof s&&V&&void 0!==V.createHTMLDocument,Ai),oe=Ai.IS_ALLOWED_URI,f=null,le=Mn({},[...oi,...li,...ci,...ui,...pi]),m=null,ce=Mn({},[...gi,...fi,...mi,...yi]),o=Object.seal(jn(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}})),y=null,he=null,ue=!0,de=!0,pe=!1,ge=!0,v=!1,fe=!0,x=!1,me=!1,ye=!1,b=!1,w=!1,k=!1,ve=!0,xe=!1,be=!0,T=!1,n,l=null,we=Mn({},["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"]),ke=null,Te=Mn({},["audio","video","img","source","image","track"]),Ee=null,Ce=Mn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),a="http://www.w3.org/1998/Math/MathML",E="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml",S=C,Se=!1,_e=null,Ae=Mn({},[a,E,C],Jn),_=Mn({},["mi","mo","mn","ms","mtext"]),A=Mn({},["annotation-xml"]),Le=Mn({},["title","style","font","a","script"]),L=null,Ne=["application/xhtml+xml","text/html"],N=null,I=null,Ie=i.createElement("form"),Re=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(!I||I!==e){if(e=On(e&&"object"==typeof e?e:{}),L=-1===Ne.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,N="application/xhtml+xml"===L?Jn:Qn,f=ii(e,"ALLOWED_TAGS")?Mn({},e.ALLOWED_TAGS,N):le,m=ii(e,"ALLOWED_ATTR")?Mn({},e.ALLOWED_ATTR,N):ce,_e=ii(e,"ALLOWED_NAMESPACES")?Mn({},e.ALLOWED_NAMESPACES,Jn):Ae,Ee=ii(e,"ADD_URI_SAFE_ATTR")?Mn(On(Ce),e.ADD_URI_SAFE_ATTR,N):Ce,ke=ii(e,"ADD_DATA_URI_TAGS")?Mn(On(Te),e.ADD_DATA_URI_TAGS,N):Te,l=ii(e,"FORBID_CONTENTS")?Mn({},e.FORBID_CONTENTS,N):we,y=ii(e,"FORBID_TAGS")?Mn({},e.FORBID_TAGS,N):{},he=ii(e,"FORBID_ATTR")?Mn({},e.FORBID_ATTR,N):{},n=!!ii(e,"USE_PROFILES")&&e.USE_PROFILES,ue=!1!==e.ALLOW_ARIA_ATTR,de=!1!==e.ALLOW_DATA_ATTR,pe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,v=e.SAFE_FOR_TEMPLATES||!1,fe=!1!==e.SAFE_FOR_XML,x=e.WHOLE_DOCUMENT||!1,b=e.RETURN_DOM||!1,w=e.RETURN_DOM_FRAGMENT||!1,k=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,ve=!1!==e.SANITIZE_DOM,xe=e.SANITIZE_NAMED_PROPS||!1,be=!1!==e.KEEP_CONTENT,T=e.IN_PLACE||!1,oe=e.ALLOWED_URI_REGEXP||Ti,S=e.NAMESPACE||C,_=e.MATHML_TEXT_INTEGRATION_POINTS||_,A=e.HTML_INTEGRATION_POINTS||A,o=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Re(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(o.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Re(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),v&&(de=!1),w&&(b=!0),n&&(f=Mn({},pi),m=[],!0===n.html&&(Mn(f,oi),Mn(m,gi)),!0===n.svg&&(Mn(f,li),Mn(m,fi),Mn(m,yi)),!0===n.svgFilters&&(Mn(f,ci),Mn(m,fi),Mn(m,yi)),!0===n.mathMl)&&(Mn(f,ui),Mn(m,mi),Mn(m,yi)),e.ADD_TAGS&&Mn(f=f===le?On(f):f,e.ADD_TAGS,N),e.ADD_ATTR&&Mn(m=m===ce?On(m):m,e.ADD_ATTR,N),e.ADD_URI_SAFE_ATTR&&Mn(Ee,e.ADD_URI_SAFE_ATTR,N),e.FORBID_CONTENTS&&Mn(l=l===we?On(l):l,e.FORBID_CONTENTS,N),be&&(f["#text"]=!0),x&&Mn(f,["html","head","body"]),f.table&&(Mn(f,["tbody"]),delete y.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw si('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw si('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');p=e.TRUSTED_TYPES_POLICY,h=p.createHTML("")}else null!==(p=void 0===p?Ii(d,O):p)&&"string"==typeof h&&(h=p.createHTML(""));qn&&qn(e),I=e}},"_parseConfig"),De=Mn({},[...li,...ci,...hi]),Oe=Mn({},[...ui,...di]),Pe=mt(function(e){let t=s(e);t&&t.tagName||(t={namespaceURI:S,tagName:"template"});var r=Qn(e.tagName),n=Qn(t.tagName);return!!_e[e.namespaceURI]&&(e.namespaceURI===E?t.namespaceURI===C?"svg"===r:t.namespaceURI===a?"svg"===r&&("annotation-xml"===n||_[n]):!!De[r]:e.namespaceURI===a?t.namespaceURI===C?"math"===r:t.namespaceURI===E?"math"===r&&A[n]:!!Oe[r]:e.namespaceURI===C?!(t.namespaceURI===E&&!A[n]||t.namespaceURI===a&&!_[n]||Oe[r])&&(Le[r]||!De[r]):!("application/xhtml+xml"!==L||!_e[e.namespaceURI]))},"_checkValidNamespace"),R=mt(function(e){Kn(u.removed,{element:e});try{s(e).removeChild(e)}catch{j(e)}},"_forceRemove"),M=mt(function(e,t){try{Kn(u.removed,{attribute:t.getAttributeNode(e),from:t})}catch{Kn(u.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(b||w)try{R(t)}catch{}else try{t.setAttribute(e,"")}catch{}},"_removeAttribute"),Be=mt(function(e){let t=null,r=null;ye?e="<remove></remove>"+e:(n=ei(e,/^[\r\n\t ]+/),r=n&&n[0]),"application/xhtml+xml"===L&&S===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var n=p?p.createHTML(e):e;if(S===C)try{t=(new U).parseFromString(n,L)}catch{}if(!t||!t.documentElement){t=V.createDocument(S,"template",null);try{t.documentElement.innerHTML=Se?h:n}catch{}}return n=t.body||t.documentElement,e&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),S===C?Z.call(t,x?"html":"body")[0]:x?t.documentElement:n},"_initDocument"),$e=mt(function(e){return X.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT|t.SHOW_PROCESSING_INSTRUCTION|t.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),Fe=mt(function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},"_isClobbered"),ze=mt(function(e){return"function"==typeof $&&e instanceof $},"_isNode");function D(e,t,r){Hn(e,e=>{e.call(u,t,r,I)})}mt(D,"_executeHooks");let Ge=mt(function(t){let r=null;if(D(g.beforeSanitizeElements,t,null),!Fe(t)){var e=N(t.nodeName);if(D(g.uponSanitizeElement,t,{tagName:e,allowedTags:f}),!(t.hasChildNodes()&&!ze(t.firstElementChild)&&ai(/<[/\w!]/g,t.innerHTML)&&ai(/<[/\w!]/g,t.textContent)||t.nodeType===Li.progressingInstruction||fe&&t.nodeType===Li.comment&&ai(/<[/\w]/g,t.data))){if(f[e]&&!y[e])return t instanceof F&&!Pe(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&ai(/<\/no(script|embed|frames)/i,t.innerHTML)?(R(t),!0):(v&&t.nodeType===Li.text&&(r=t.textContent,Hn([J,ee,te],e=>{r=ti(r,e," ")}),t.textContent!==r)&&(Kn(u.removed,{element:t.cloneNode()}),t.textContent=r),D(g.afterSanitizeElements,t,null),!1);if(!y[e]&&qe(e)&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e)))return!1;if(be&&!l[e]){var n=s(t)||t.parentNode,i=Y(t)||t.childNodes;if(i&&n)for(let e=i.length-1;0<=e;--e){var a=q(i[e],!0);a.__removalCount=(t.__removalCount||0)+1,n.insertBefore(a,W(t))}}}}return R(t),!0},"_sanitizeElements"),Ue=mt(function(e,t,r){if(ve&&("id"===t||"name"===t)&&(r in i||r in Ie))return!1;if((!de||he[t]||!ai(re,t))&&(!ue||!ai(ne,t)))if(!m[t]||he[t]){if(!(qe(e)&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e))&&(o.attributeNameCheck instanceof RegExp&&ai(o.attributeNameCheck,t)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(t))||"is"===t&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Ee[t]&&!ai(oe,ti(r,ae,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ri(r,"data:")||!ke[e])&&(!pe||ai(ie,ti(r,ae,"")))&&r)return!1;return!0},"_isValidAttribute"),qe=mt(function(e){return"annotation-xml"!==e&&ei(e,se)},"_isBasicCustomElement"),je=mt(function(l){D(g.beforeSanitizeAttributes,l,null);var c=l.attributes;if(c&&!Fe(l)){let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},o=c.length;for(;o--;){let e=c[o],{name:t,namespaceURI:r,value:n}=e,i=N(t),a="value"===t?n:ni(n);if(s.attrName=i,s.attrValue=a,s.keepAttr=!0,s.forceKeepAttr=void 0,D(g.uponSanitizeAttribute,l,s),a=s.attrValue,!xe||"id"!==i&&"name"!==i||(M(t,l),a="user-content-"+a),fe&&ai(/((--!?|])>)|<\/(style|title)/i,a))M(t,l);else if(!s.forceKeepAttr&&(M(t,l),s.keepAttr))if(!ge&&ai(/\/>/i,a))M(t,l);else{v&&Hn([J,ee,te],e=>{a=ti(a,e," ")});var h=N(l.nodeName);if(Ue(h,i,a)){if(p&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(h,i)){case"TrustedHTML":a=p.createHTML(a);break;case"TrustedScriptURL":a=p.createScriptURL(a)}try{r?l.setAttributeNS(r,t,a):l.setAttribute(t,a),Fe(l)?R(l):Xn(u.removed)}catch{}}}}D(g.afterSanitizeAttributes,l,null)}},"_sanitizeAttributes"),We=mt(function e(t){var r,n=$e(t);for(D(g.beforeSanitizeShadowDOM,t,null);r=n.nextNode();)D(g.uponSanitizeShadowNode,r,null),Ge(r),je(r),r.content instanceof P&&e(r.content);D(g.afterSanitizeShadowDOM,t,null)},"_sanitizeShadowDOM");return u.sanitize=function(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null,n,i,a=null;if("string"!=typeof(e=(Se=!e)?"\x3c!--\x3e":e)&&!ze(e)){if("function"!=typeof e.toString)throw si("toString is not a function");if("string"!=typeof(e=e.toString()))throw si("dirty is not a string, aborting")}if(!u.isSupported)return e;if(me||Me(t),u.removed=[],T="string"!=typeof e&&T){if(e.nodeName){var s=N(e.nodeName);if(!f[s]||y[s])throw si("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof $)(n=(r=Be("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType===Li.element&&"BODY"===n.nodeName||"HTML"===n.nodeName?r=n:r.appendChild(n);else{if(!b&&!v&&!x&&-1===e.indexOf("<"))return p&&k?p.createHTML(e):e;if(!(r=Be(e)))return b?null:k?h:""}r&&ye&&R(r.firstChild);for(var o=$e(T?e:r);i=o.nextNode();)Ge(i),je(i),i.content instanceof P&&We(i.content);if(T)return e;if(b){if(w)for(a=K.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return a=m.shadowroot||m.shadowrootmode?Q.call(c,a,!0):a}let l=x?r.outerHTML:r.innerHTML;return x&&f["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&ai(Si,r.ownerDocument.doctype.name)&&(l="<!DOCTYPE "+r.ownerDocument.doctype.name+`>
|
||
`+l),v&&Hn([J,ee,te],e=>{l=ti(l,e," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Me(e),me=!0},u.clearConfig=function(){I=null,me=!1},u.isValidAttribute=function(e,t,r){return I||Me({}),e=N(e),t=N(t),Ue(e,t,r)},u.addHook=function(e,t){"function"==typeof t&&Kn(g[e],t)},u.removeHook=function(e,t){return void 0!==t?-1===(t=Vn(g[e],t))?void 0:Zn(g[e],t,1)[0]:Xn(g[e])},u.removeHooks=function(e){g[e]=[]},u.removeAllHooks=function(){g=Ri()},u}var $n,Fn,zn,Gn,Un,qn,jn,Wn,Yn,Hn,Vn,Xn,Kn,Zn,Qn,Jn,ei,ti,ri,ni,ii,ai,si,oi,li,ci,hi,ui,di,pi,gi,fi,mi,yi,vi,xi,bi,wi,ki,Ti,Ei,Ci,Si,_i,Ai,Li,Ni,Ii,Ri,Mi,Di=e(()=>{({entries:$n,setPrototypeOf:Fn,isFrozen:zn,getPrototypeOf:Gn,getOwnPropertyDescriptor:Un}=Object),{freeze:qn,seal:_i,create:jn}=Object,{apply:Wn,construct:Yn}=typeof Reflect<"u"&&Reflect,qn=qn||mt(function(e){return e},"freeze"),_i=_i||mt(function(e){return e},"seal"),Wn=Wn||mt(function(e,t,r){return e.apply(t,r)},"apply"),Yn=Yn||mt(function(e,t){return new e(...t)},"construct"),Hn=In(Array.prototype.forEach),Vn=In(Array.prototype.lastIndexOf),Xn=In(Array.prototype.pop),Kn=In(Array.prototype.push),Zn=In(Array.prototype.splice),Qn=In(String.prototype.toLowerCase),Jn=In(String.prototype.toString),ei=In(String.prototype.match),ti=In(String.prototype.replace),ri=In(String.prototype.indexOf),ni=In(String.prototype.trim),ii=In(Object.prototype.hasOwnProperty),ai=In(RegExp.prototype.test),si=Rn(TypeError),mt(In,"unapply"),mt(Rn,"unconstruct"),mt(Mn,"addToSet"),mt(Dn,"cleanArray"),mt(On,"clone"),mt(Pn,"lookupGetter"),oi=qn(["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","section","select","shadow","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"]),li=qn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ci=qn(["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"]),hi=qn(["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"]),ui=qn(["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"]),di=qn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pi=qn(["#text"]),gi=qn(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),fi=qn(["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","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"]),mi=qn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),yi=qn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vi=_i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),xi=_i(/<%[\w\W]*|[\w\W]*%>/gm),bi=_i(/\$\{[\w\W]*/gm),wi=_i(/^data-[\-\w.\u00B7-\uFFFF]+$/),ki=_i(/^aria-[\-\w]+$/),Ti=_i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ei=_i(/^(?:\w+script|data):/i),Ci=_i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Si=_i(/^html$/i),_i=_i(/^[a-z][.\w]*(-[.\w]+)+$/i),Ai=Object.freeze({__proto__:null,ARIA_ATTR:ki,ATTR_WHITESPACE:Ci,CUSTOM_ELEMENT:_i,DATA_ATTR:wi,DOCTYPE_NAME:Si,ERB_EXPR:xi,IS_ALLOWED_URI:Ti,IS_SCRIPT_OR_DATA:Ei,MUSTACHE_EXPR:vi,TMPLIT_EXPR:bi}),Li={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ni=mt(function(){return"u"<typeof window?null:window},"getGlobal"),Ii=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"),Ri=mt(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap"),mt(Bn,"createDOMPurify"),Mi=Bn()}),Oi={};function Pi(e){return String(e).replace(ma,e=>fa[e])}function Bi(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 $i(e){for(var t=0;t<Na.length;t++)for(var r=Na[t],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(e>=i[0]&&e<=i[1])return r.name}return null}function Fi(e){for(var t=0;t<Ia.length;t+=2)if(Ia[t]<=e&&e<=Ia[t+1])return!0;return!1}function zi(e,t){ja[e]=t}function Gi(e,t,r){if(!ja[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),i=ja[t][n];if(!i&&e[0]in Ya&&(n=Ya[e[0]].charCodeAt(0),i=ja[t][n]),i=!i&&"text"===r&&Fi(n)?ja[t][77]:i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function Ui(e){var t=5<=e?0:3<=e?1:2;if(!Ha[t]){var r,n=Ha[t]={cssEmPerMu:Wa.quad[t]/18};for(r in Wa)Wa.hasOwnProperty(r)&&(n[r]=Wa[r][t])}return Ha[t]}function qi(e){if(e instanceof us)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function ji(e){if(e instanceof os)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}function o(e,t,r,n,i,a){ys[e][i]={font:t,group:r,replace:n},a&&n&&(ys[e][n]=ys[e][i])}function l(e){for(var{type:e,names:t,props:r,handler:n,htmlBuilder:i,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:n},o=0;o<t.length;++o)eo[t[o]]=s;e&&(i&&(to[e]=i),a)&&(ro[e]=a)}function Wi(e){var{type:e,htmlBuilder:t,mathmlBuilder:r}=e;l({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:r})}function Yi(e,t){return e=ao(["base"],e,t),(t=ao(["strut"])).style.height=K(e.height+e.depth),e.depth&&(t.style.verticalAlign=K(-e.depth)),e.children.unshift(t),e}function Hi(e,t){var r,n=null,i=(1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body),ho(e,t,"root"));2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var a,s=[],o=[],l=0;l<i.length;l++)if(o.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){for(var c=!1;l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline");)l++,o.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(s.push(Yi(o,t)),o=[])}else i[l].hasClass("newline")&&(o.pop(),0<o.length&&(s.push(Yi(o,t)),o=[]),s.push(i[l]));return 0<o.length&&s.push(Yi(o,t)),n?((a=Yi(ho(n,t,!0))).classes=["tag"],s.push(a)):r&&s.push(r),(e=ao(["katex-html"],s)).setAttribute("aria-hidden","true"),a&&((n=a.children[0]).style.height=K(e.height+e.depth),e.depth)&&(n.style.verticalAlign=K(-e.depth)),e}function Vi(e){return new qa(e)}function Xi(e){var t;return!!e&&("mi"===e.type&&1===e.children.length?(t=e.children[0])instanceof xo&&"."===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 xo&&","===t.text)}function Ki(e,t,r,n,i){return r=1===(e=To(e,r)).length&&e[0]instanceof vo&&xa.contains(["mrow","mtable"],e[0].type)?e[0]:new E.MathNode("mrow",e),(e=new E.MathNode("annotation",[new E.TextNode(t)])).setAttribute("encoding","application/x-tex"),t=new E.MathNode("semantics",[r,e]),(r=new E.MathNode("math",[t])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&r.setAttribute("display","block"),Z.makeSpan([i?"katex":"katex-mathml"],[r])}function Zi(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 Qi(e){var t=Ji(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 Ji(e){return e&&("atom"===e.type||ms.hasOwnProperty(e.type))?e:null}function ea(e,t){var r=ho(e.body,t,!0);return Bo([e.mclass],r,t)}function ta(e,t){var r,t=To(e.body,t);return"minner"===e.mclass?r=new E.MathNode("mpadded",t):"mord"===e.mclass?e.isCharacterBox?(r=t[0]).type="mi":r=new E.MathNode("mi",t):(e.isCharacterBox?(r=t[0]).type="mo":r=new E.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 ra(e,t,r){var n=Fo[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var i=r.callFunction("\\\\cdleft",[t[0]],[]),a=r.callFunction("\\Big",[{type:"atom",text:n,mode:"math",family:"rel"}],[]),s=r.callFunction("\\\\cdright",[t[1]],[]);return r.callFunction("\\\\cdparent",[{type:"ordgroup",mode:"math",body:[i,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 na(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 n=[],i=[n],a=0;a<t.length;a++){for(var s=t[a],o=zo(),l=0;l<s.length;l++)if(Go(s[l])){n.push(o);var c=Qi(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(Uo(s[p],c)){d=!1,l=p;break}if(Go(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=ra(c,h,e);n.push({type:"styling",body:[g],mode:"math",style:"display"}),o=zo()}else o.body.push(s[l]);a%2==0?n.push(o):n.shift(),i.push(n=[])}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function ia(e,t){var r=Ji(e);if(r&&xa.contains(vl,r.text))return r;throw new X(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function aa(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function sa(e){for(var{type:e,names:t,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=e,s={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},o=0;o<t.length;++o)xl[t[o]]=s;i&&(to[e]=i),a&&(ro[e]=a)}function h(e,t){bl[e]=t}function oa(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 la(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function ca(e,t,r){var{hskipBeforeAndAfter:t,addJot:n,cols:i,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 x(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new pa("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!o&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(mt(v,"beginRow"),mt(x,"endRow"),v(),m.push(oa(e));;){var b=e.parseExpression(!1,l?"\\end":"\\\\"),w=(e.gullet.endGroup(),e.gullet.beginGroup(),b={type:"ordgroup",mode:e.mode,body:b},r&&(b={type:"styling",mode:e.mode,style:r,body:[b]}),p.push(b),e.fetch().text);if("&"===w){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"===w){x(),1===p.length&&"styling"===b.type&&0===b.body[0].body.length&&(1<g.length||!c)&&g.pop(),m.length<g.length+1&&m.push([]);break}if("\\\\"!==w)throw new X("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume(),b=void 0," "!==e.gullet.future().text&&(b=e.parseSizeGroup(!0)),f.push(b?b.value:null),x(),m.push(oa(e)),g.push(p=[]),v()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:n,arraystretch:a,body:g,cols:i,rowGaps:f,hskipBeforeAndAfter:t,hLinesBeforeRow:m,colSeparationType:s,tags:y,leqno:u}}function ha(e){return"d"===e.slice(0,1)?"display":"text"}function ua(e,t,r){for(var n=ho(e,t,!1),i=t.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var s=n[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[a].classes,t.sizingClasses(r)):n[a].classes[s+1]==="reset-size"+t.size&&(n[a].classes[s+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return Z.makeFragment(n)}($Be=(e,t)=>{for(var r in t)z(e,r,{get:t[r],enumerable:!0})})(Oi,{ParseError:()=>X,SETTINGS_SCHEMA:()=>ba,__defineFunction:()=>l,__defineMacro:()=>h,__defineSymbol:()=>o,__domTree:()=>Sc,__parse:()=>wc,__renderToDomTree:()=>Tc,__renderToHTMLTree:()=>Ec,__setFontMetrics:()=>zi,default:()=>_c,render:()=>xc,renderToString:()=>bc,version:()=>Cc});var da,pa,X,ga,fa,ma,ya,va,xa,ba,wa,ka,Ta,Ea,Ca,Sa,_a,Aa,La,Na,Ia,Ra,Ma,Da,Oa,Pa,Ba,$a,Fa,za,Ga,Ua,qa,ja,Wa,Ya,Ha,Va,Xa,Ka,Za,Qa,Ja,es,ts,K,rs,ns,is,as,ss,os,ls,cs,hs,us,ds,ps,gs,fs,ms,ys,u,d,p,vs,g,xs,bs,ws,ks,Ts,Es,Cs,Ss,_s,As,Ls,Ns,Is,Rs,Ms,Ds,Os,Ps,Bs,$s,Fs,zs,Gs,Us,qs,js,Ws,Ys,Hs,Vs,Xs,Ks,Zs,Z,Qs,Js,eo,to,ro,no,io,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,yo,vo,xo,E,bo,wo,ko,To,Eo,Co,So,_o,Ao,Lo,No,Io,Ro,Mo,Do,Oo,Po,Bo,$o,Fo,zo,Go,Uo,qo,jo,Wo,Yo,Ho,Vo,Xo,Ko,Zo,Qo,Jo,el,tl,rl,nl,il,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,vl,xl,bl,wl,kl,Tl,f,El,Cl,Sl,_l,Al,Ll,Nl,m,Il,Rl,Ml,Dl,Ol,Pl,Bl,$l,Fl,zl,Gl,Ul,ql,jl,Wl,Yl,Hl,Vl,Xl,Kl,Zl,Ql,Jl,ec,y,tc,rc,nc,ic,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,fc,mc,yc,vc,xc,bc,wc,kc,Tc,Ec,Cc,Sc,_c,Ac=e(()=>{for(da=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}},pa=class n{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 n(t,da.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,n,i,a="KaTeX parse error: "+e;return(t=t&&t.loc)&&t.start<=t.end&&(r=t.lexer.input,n=t.start,i=t.end,n===r.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ",t=r.slice(n,i).replace(/[^]/g,"$&̲"),a+=(15<n?"…"+r.slice(n-15,n):r.slice(0,n))+t+(i+15<r.length?r.slice(i,i+15)+"…":r.slice(i))),(t=new Error(a)).name="ParseError",t.__proto__=s.prototype,null!=(t.position=n)&&null!=i&&(t.length=i-n),t.rawMessage=e,t}}).prototype.__proto__=Error.prototype,Ul=mt(function(e,t){return-1!==e.indexOf(t)},"contains"),m=mt(function(e,t){return void 0===e?t:e},"deflt"),ga=/([A-Z])/g,hc=mt(function(e){return e.replace(ga,"-$1").toLowerCase()},"hyphenate"),fa={"&":"&",">":">","<":"<",'"':""","'":"'"},ma=/[&><"']/g,mt(Pi,"escape"),ya=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"),f=mt(function(e){return"mathord"===(e=ya(e)).type||"textord"===e.type||"atom"===e.type},"isCharacterBox"),va=mt(function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))},"assert"),Pl=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"),xa={contains:Ul,deflt:m,escape:Pi,hyphenate:hc,getBaseElem:ya,isCharacterBox:f,protocolFromUrl:Pl},ba={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(Bi,"getDefaultValue"),wa=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||{},ba){var r;ba.hasOwnProperty(t)&&(r=ba[t],this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:Bi(r))}}reportNonstrict(e,t,r){var n=this.strict;if((n="function"==typeof n?n(e,t,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch{n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){var t=xa.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}return!!("function"==typeof this.trust?this.trust(e):this.trust)}},Ul=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 ka[Ta[this.id]]}sub(){return ka[Ea[this.id]]}fracNum(){return ka[Ca[this.id]]}fracDen(){return ka[Sa[this.id]]}cramp(){return ka[_a[this.id]]}text(){return ka[Aa[this.id]]}isTight(){return 2<=this.size}},ka=[new Ul(0,0,!1),new Ul(1,0,!0),new Ul(2,1,!1),new Ul(3,1,!0),new Ul(4,2,!1),new Ul(5,2,!0),new Ul(6,3,!1),new Ul(7,3,!0)],Ta=[4,5,4,5,6,7,6,7],Ea=[5,5,5,5,7,7,7,7],Ca=[2,3,4,5,6,7,6,7],Sa=[3,3,5,5,7,7,7,7],_a=[1,1,3,3,5,5,7,7],Aa=[0,1,2,3,2,3,2,3],La={DISPLAY:ka[0],TEXT:ka[2],SCRIPT:ka[4],SCRIPTSCRIPT:ka[6]},Na=[{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($i,"scriptFromCodepoint"),Ia=[],Na.forEach(e=>e.blocks.forEach(e=>Ia.push(...e))),mt(Fi,"supportedCodepoint"),Ra=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"),Ma=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"),Da=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"),Oa=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"),Pa=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"),Ba=mt(function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),$a=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"),Fa=mt(function(e,t,r){t*=1e3;var n="";switch(e){case"sqrtMain":n=Ra(t,80);break;case"sqrtSize1":n=Ma(t,80);break;case"sqrtSize2":n=Da(t,80);break;case"sqrtSize3":n=Oa(t,80);break;case"sqrtSize4":n=Pa(t,80);break;case"sqrtTall":n=$a(t,80,r)}return n},"sqrtPath"),za=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"),Ga={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`},Ua=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"),qa=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 xa.contains(this.classes,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("")}},ja={"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]}},Wa={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]},Ya={"Å":"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(zi,"setFontMetrics"),mt(Gi,"getCharacterMetrics"),Ha={},mt(Ui,"getGlobalMetrics"),Va=[[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]],Xa=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ka=mt(function(e,t){return t.size<2?e:Va[e-1][t.size-1]},"sizeAtStyle"),(Za=class i{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||i.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=Xa[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 i(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ka(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:Xa[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ka(i.BASESIZE,e);return this.size===t&&this.textSize===i.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!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ui(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Qa={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},Ja={ex:!0,em:!0,mu:!0},es=mt(function(e){return(e="string"!=typeof e?e.unit:e)in Qa||e in Ja||"ex"===e},"validUnit"),ts=mt(function(e,t){var r;if(e.unit in Qa)r=Qa[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new X("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},"calculateSize"),K=mt(function(e){return+e.toFixed(4)+"em"},"makeEm"),rs=mt(function(e){return e.filter(e=>e).join(" ")},"createClass"),ns=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"),is=mt(function(e){var t,r,n=document.createElement(e);for(t in n.className=rs(this.classes),this.style)this.style.hasOwnProperty(t)&&(n.style[t]=this.style[t]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)n.appendChild(this.children[i].toNode());return n},"toNode"),as=/[\s"'>/=\x00-\x1f]/,ss=mt(function(e){var t,r,n="<"+e,i=(this.classes.length&&(n+=' class="'+xa.escape(rs(this.classes))+'"'),"");for(t in this.style)this.style.hasOwnProperty(t)&&(i+=xa.hyphenate(t)+":"+this.style[t]+";");for(r in i&&(n+=' style="'+xa.escape(i)+'"'),this.attributes)if(this.attributes.hasOwnProperty(r)){if(as.test(r))throw new X("Invalid attribute name '"+r+"'");n+=" "+r+'="'+xa.escape(this.attributes[r])+'"'}n+=">";for(var a=0;a<this.children.length;a++)n+=this.children[a].toMarkup();return n+"</"+e+">"},"toMarkup"),os=class{static{mt(this,"Span")}constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,ns.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return xa.contains(this.classes,e)}toNode(){return is.call(this,"span")}toMarkup(){return ss.call(this,"span")}},ls=class{static{mt(this,"Anchor")}constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ns.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return xa.contains(this.classes,e)}toNode(){return is.call(this,"a")}toMarkup(){return ss.call(this,"a")}},cs=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 xa.contains(this.classes,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="'+xa.escape(this.src)+'" alt="'+xa.escape(this.alt)+'"',r="";for(e in this.style)this.style.hasOwnProperty(e)&&(r+=xa.hyphenate(e)+":"+this.style[e]+";");return r&&(t+=' style="'+xa.escape(r)+'"'),t+"'/>"}},hs={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},us=class{static{mt(this,"SymbolNode")}constructor(e,t,r,n,i,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=n||0,this.skew=i||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(e=$i(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=hs[this.text])}hasClass(e){return xa.contains(this.classes,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=rs(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",n=(this.classes.length&&(t=!0,r=(r+=' class="')+xa.escape(rs(this.classes))+'"'),"");for(e in 0<this.italic&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(e)&&(n+=xa.hyphenate(e)+":"+this.style[e]+";");n&&(t=!0,r+=' style="'+xa.escape(n)+'"');var i=xa.escape(this.text);return t?(r+=">")+i+"</span>":i}},ds=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+'="'+xa.escape(this.attributes[e])+'"');t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+"</svg>"}},ps=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",Ga[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+xa.escape(this.alternate)+'"/>':'<path d="'+xa.escape(Ga[this.pathName])+'"/>'}},gs=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+'="'+xa.escape(this.attributes[e])+'"');return t+"/>"}},mt(qi,"assertSymbolDomNode"),mt(ji,"assertSpan"),fs={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ms={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ys={math:{},text:{}},mt(o,"defineSymbol"),d="text",m="ams",hc="accent-token",f="bin",Pl="close",Ul="inner",vs="mathord",cc="op-token",_l="open",zl="punct",Sl="spacing",g="textord",o(u="math",p="main",y="rel","≡","\\equiv",!0),o(u,p,y,"≺","\\prec",!0),o(u,p,y,"≻","\\succ",!0),o(u,p,y,"∼","\\sim",!0),o(u,p,y,"⊥","\\perp"),o(u,p,y,"⪯","\\preceq",!0),o(u,p,y,"⪰","\\succeq",!0),o(u,p,y,"≃","\\simeq",!0),o(u,p,y,"∣","\\mid",!0),o(u,p,y,"≪","\\ll",!0),o(u,p,y,"≫","\\gg",!0),o(u,p,y,"≍","\\asymp",!0),o(u,p,y,"∥","\\parallel"),o(u,p,y,"⋈","\\bowtie",!0),o(u,p,y,"⌣","\\smile",!0),o(u,p,y,"⊑","\\sqsubseteq",!0),o(u,p,y,"⊒","\\sqsupseteq",!0),o(u,p,y,"≐","\\doteq",!0),o(u,p,y,"⌢","\\frown",!0),o(u,p,y,"∋","\\ni",!0),o(u,p,y,"∝","\\propto",!0),o(u,p,y,"⊢","\\vdash",!0),o(u,p,y,"⊣","\\dashv",!0),o(u,p,y,"∋","\\owns"),o(u,p,zl,".","\\ldotp"),o(u,p,zl,"⋅","\\cdotp"),o(u,p,g,"#","\\#"),o(d,p,g,"#","\\#"),o(u,p,g,"&","\\&"),o(d,p,g,"&","\\&"),o(u,p,g,"ℵ","\\aleph",!0),o(u,p,g,"∀","\\forall",!0),o(u,p,g,"ℏ","\\hbar",!0),o(u,p,g,"∃","\\exists",!0),o(u,p,g,"∇","\\nabla",!0),o(u,p,g,"♭","\\flat",!0),o(u,p,g,"ℓ","\\ell",!0),o(u,p,g,"♮","\\natural",!0),o(u,p,g,"♣","\\clubsuit",!0),o(u,p,g,"℘","\\wp",!0),o(u,p,g,"♯","\\sharp",!0),o(u,p,g,"♢","\\diamondsuit",!0),o(u,p,g,"ℜ","\\Re",!0),o(u,p,g,"♡","\\heartsuit",!0),o(u,p,g,"ℑ","\\Im",!0),o(u,p,g,"♠","\\spadesuit",!0),o(u,p,g,"§","\\S",!0),o(d,p,g,"§","\\S"),o(u,p,g,"¶","\\P",!0),o(d,p,g,"¶","\\P"),o(u,p,g,"†","\\dag"),o(d,p,g,"†","\\dag"),o(d,p,g,"†","\\textdagger"),o(u,p,g,"‡","\\ddag"),o(d,p,g,"‡","\\ddag"),o(d,p,g,"‡","\\textdaggerdbl"),o(u,p,Pl,"⎱","\\rmoustache",!0),o(u,p,_l,"⎰","\\lmoustache",!0),o(u,p,Pl,"⟯","\\rgroup",!0),o(u,p,_l,"⟮","\\lgroup",!0),o(u,p,f,"∓","\\mp",!0),o(u,p,f,"⊖","\\ominus",!0),o(u,p,f,"⊎","\\uplus",!0),o(u,p,f,"⊓","\\sqcap",!0),o(u,p,f,"∗","\\ast"),o(u,p,f,"⊔","\\sqcup",!0),o(u,p,f,"◯","\\bigcirc",!0),o(u,p,f,"∙","\\bullet",!0),o(u,p,f,"‡","\\ddagger"),o(u,p,f,"≀","\\wr",!0),o(u,p,f,"⨿","\\amalg"),o(u,p,f,"&","\\And"),o(u,p,y,"⟵","\\longleftarrow",!0),o(u,p,y,"⇐","\\Leftarrow",!0),o(u,p,y,"⟸","\\Longleftarrow",!0),o(u,p,y,"⟶","\\longrightarrow",!0),o(u,p,y,"⇒","\\Rightarrow",!0),o(u,p,y,"⟹","\\Longrightarrow",!0),o(u,p,y,"↔","\\leftrightarrow",!0),o(u,p,y,"⟷","\\longleftrightarrow",!0),o(u,p,y,"⇔","\\Leftrightarrow",!0),o(u,p,y,"⟺","\\Longleftrightarrow",!0),o(u,p,y,"↦","\\mapsto",!0),o(u,p,y,"⟼","\\longmapsto",!0),o(u,p,y,"↗","\\nearrow",!0),o(u,p,y,"↩","\\hookleftarrow",!0),o(u,p,y,"↪","\\hookrightarrow",!0),o(u,p,y,"↘","\\searrow",!0),o(u,p,y,"↼","\\leftharpoonup",!0),o(u,p,y,"⇀","\\rightharpoonup",!0),o(u,p,y,"↙","\\swarrow",!0),o(u,p,y,"↽","\\leftharpoondown",!0),o(u,p,y,"⇁","\\rightharpoondown",!0),o(u,p,y,"↖","\\nwarrow",!0),o(u,p,y,"⇌","\\rightleftharpoons",!0),o(u,m,y,"≮","\\nless",!0),o(u,m,y,"","\\@nleqslant"),o(u,m,y,"","\\@nleqq"),o(u,m,y,"⪇","\\lneq",!0),o(u,m,y,"≨","\\lneqq",!0),o(u,m,y,"","\\@lvertneqq"),o(u,m,y,"⋦","\\lnsim",!0),o(u,m,y,"⪉","\\lnapprox",!0),o(u,m,y,"⊀","\\nprec",!0),o(u,m,y,"⋠","\\npreceq",!0),o(u,m,y,"⋨","\\precnsim",!0),o(u,m,y,"⪹","\\precnapprox",!0),o(u,m,y,"≁","\\nsim",!0),o(u,m,y,"","\\@nshortmid"),o(u,m,y,"∤","\\nmid",!0),o(u,m,y,"⊬","\\nvdash",!0),o(u,m,y,"⊭","\\nvDash",!0),o(u,m,y,"⋪","\\ntriangleleft"),o(u,m,y,"⋬","\\ntrianglelefteq",!0),o(u,m,y,"⊊","\\subsetneq",!0),o(u,m,y,"","\\@varsubsetneq"),o(u,m,y,"⫋","\\subsetneqq",!0),o(u,m,y,"","\\@varsubsetneqq"),o(u,m,y,"≯","\\ngtr",!0),o(u,m,y,"","\\@ngeqslant"),o(u,m,y,"","\\@ngeqq"),o(u,m,y,"⪈","\\gneq",!0),o(u,m,y,"≩","\\gneqq",!0),o(u,m,y,"","\\@gvertneqq"),o(u,m,y,"⋧","\\gnsim",!0),o(u,m,y,"⪊","\\gnapprox",!0),o(u,m,y,"⊁","\\nsucc",!0),o(u,m,y,"⋡","\\nsucceq",!0),o(u,m,y,"⋩","\\succnsim",!0),o(u,m,y,"⪺","\\succnapprox",!0),o(u,m,y,"≆","\\ncong",!0),o(u,m,y,"","\\@nshortparallel"),o(u,m,y,"∦","\\nparallel",!0),o(u,m,y,"⊯","\\nVDash",!0),o(u,m,y,"⋫","\\ntriangleright"),o(u,m,y,"⋭","\\ntrianglerighteq",!0),o(u,m,y,"","\\@nsupseteqq"),o(u,m,y,"⊋","\\supsetneq",!0),o(u,m,y,"","\\@varsupsetneq"),o(u,m,y,"⫌","\\supsetneqq",!0),o(u,m,y,"","\\@varsupsetneqq"),o(u,m,y,"⊮","\\nVdash",!0),o(u,m,y,"⪵","\\precneqq",!0),o(u,m,y,"⪶","\\succneqq",!0),o(u,m,y,"","\\@nsubseteqq"),o(u,m,f,"⊴","\\unlhd"),o(u,m,f,"⊵","\\unrhd"),o(u,m,y,"↚","\\nleftarrow",!0),o(u,m,y,"↛","\\nrightarrow",!0),o(u,m,y,"⇍","\\nLeftarrow",!0),o(u,m,y,"⇏","\\nRightarrow",!0),o(u,m,y,"↮","\\nleftrightarrow",!0),o(u,m,y,"⇎","\\nLeftrightarrow",!0),o(u,m,y,"△","\\vartriangle"),o(u,m,g,"ℏ","\\hslash"),o(u,m,g,"▽","\\triangledown"),o(u,m,g,"◊","\\lozenge"),o(u,m,g,"Ⓢ","\\circledS"),o(u,m,g,"®","\\circledR"),o(d,m,g,"®","\\circledR"),o(u,m,g,"∡","\\measuredangle",!0),o(u,m,g,"∄","\\nexists"),o(u,m,g,"℧","\\mho"),o(u,m,g,"Ⅎ","\\Finv",!0),o(u,m,g,"⅁","\\Game",!0),o(u,m,g,"‵","\\backprime"),o(u,m,g,"▲","\\blacktriangle"),o(u,m,g,"▼","\\blacktriangledown"),o(u,m,g,"■","\\blacksquare"),o(u,m,g,"⧫","\\blacklozenge"),o(u,m,g,"★","\\bigstar"),o(u,m,g,"∢","\\sphericalangle",!0),o(u,m,g,"∁","\\complement",!0),o(u,m,g,"ð","\\eth",!0),o(d,p,g,"ð","ð"),o(u,m,g,"╱","\\diagup"),o(u,m,g,"╲","\\diagdown"),o(u,m,g,"□","\\square"),o(u,m,g,"□","\\Box"),o(u,m,g,"◊","\\Diamond"),o(u,m,g,"¥","\\yen",!0),o(d,m,g,"¥","\\yen",!0),o(u,m,g,"✓","\\checkmark",!0),o(d,m,g,"✓","\\checkmark"),o(u,m,g,"ℶ","\\beth",!0),o(u,m,g,"ℸ","\\daleth",!0),o(u,m,g,"ℷ","\\gimel",!0),o(u,m,g,"ϝ","\\digamma",!0),o(u,m,g,"ϰ","\\varkappa"),o(u,m,_l,"┌","\\@ulcorner",!0),o(u,m,Pl,"┐","\\@urcorner",!0),o(u,m,_l,"└","\\@llcorner",!0),o(u,m,Pl,"┘","\\@lrcorner",!0),o(u,m,y,"≦","\\leqq",!0),o(u,m,y,"⩽","\\leqslant",!0),o(u,m,y,"⪕","\\eqslantless",!0),o(u,m,y,"≲","\\lesssim",!0),o(u,m,y,"⪅","\\lessapprox",!0),o(u,m,y,"≊","\\approxeq",!0),o(u,m,f,"⋖","\\lessdot"),o(u,m,y,"⋘","\\lll",!0),o(u,m,y,"≶","\\lessgtr",!0),o(u,m,y,"⋚","\\lesseqgtr",!0),o(u,m,y,"⪋","\\lesseqqgtr",!0),o(u,m,y,"≑","\\doteqdot"),o(u,m,y,"≓","\\risingdotseq",!0),o(u,m,y,"≒","\\fallingdotseq",!0),o(u,m,y,"∽","\\backsim",!0),o(u,m,y,"⋍","\\backsimeq",!0),o(u,m,y,"⫅","\\subseteqq",!0),o(u,m,y,"⋐","\\Subset",!0),o(u,m,y,"⊏","\\sqsubset",!0),o(u,m,y,"≼","\\preccurlyeq",!0),o(u,m,y,"⋞","\\curlyeqprec",!0),o(u,m,y,"≾","\\precsim",!0),o(u,m,y,"⪷","\\precapprox",!0),o(u,m,y,"⊲","\\vartriangleleft"),o(u,m,y,"⊴","\\trianglelefteq"),o(u,m,y,"⊨","\\vDash",!0),o(u,m,y,"⊪","\\Vvdash",!0),o(u,m,y,"⌣","\\smallsmile"),o(u,m,y,"⌢","\\smallfrown"),o(u,m,y,"≏","\\bumpeq",!0),o(u,m,y,"≎","\\Bumpeq",!0),o(u,m,y,"≧","\\geqq",!0),o(u,m,y,"⩾","\\geqslant",!0),o(u,m,y,"⪖","\\eqslantgtr",!0),o(u,m,y,"≳","\\gtrsim",!0),o(u,m,y,"⪆","\\gtrapprox",!0),o(u,m,f,"⋗","\\gtrdot"),o(u,m,y,"⋙","\\ggg",!0),o(u,m,y,"≷","\\gtrless",!0),o(u,m,y,"⋛","\\gtreqless",!0),o(u,m,y,"⪌","\\gtreqqless",!0),o(u,m,y,"≖","\\eqcirc",!0),o(u,m,y,"≗","\\circeq",!0),o(u,m,y,"≜","\\triangleq",!0),o(u,m,y,"∼","\\thicksim"),o(u,m,y,"≈","\\thickapprox"),o(u,m,y,"⫆","\\supseteqq",!0),o(u,m,y,"⋑","\\Supset",!0),o(u,m,y,"⊐","\\sqsupset",!0),o(u,m,y,"≽","\\succcurlyeq",!0),o(u,m,y,"⋟","\\curlyeqsucc",!0),o(u,m,y,"≿","\\succsim",!0),o(u,m,y,"⪸","\\succapprox",!0),o(u,m,y,"⊳","\\vartriangleright"),o(u,m,y,"⊵","\\trianglerighteq"),o(u,m,y,"⊩","\\Vdash",!0),o(u,m,y,"∣","\\shortmid"),o(u,m,y,"∥","\\shortparallel"),o(u,m,y,"≬","\\between",!0),o(u,m,y,"⋔","\\pitchfork",!0),o(u,m,y,"∝","\\varpropto"),o(u,m,y,"◀","\\blacktriangleleft"),o(u,m,y,"∴","\\therefore",!0),o(u,m,y,"∍","\\backepsilon"),o(u,m,y,"▶","\\blacktriangleright"),o(u,m,y,"∵","\\because",!0),o(u,m,y,"⋘","\\llless"),o(u,m,y,"⋙","\\gggtr"),o(u,m,f,"⊲","\\lhd"),o(u,m,f,"⊳","\\rhd"),o(u,m,y,"≂","\\eqsim",!0),o(u,p,y,"⋈","\\Join"),o(u,m,y,"≑","\\Doteq",!0),o(u,m,f,"∔","\\dotplus",!0),o(u,m,f,"∖","\\smallsetminus"),o(u,m,f,"⋒","\\Cap",!0),o(u,m,f,"⋓","\\Cup",!0),o(u,m,f,"⩞","\\doublebarwedge",!0),o(u,m,f,"⊟","\\boxminus",!0),o(u,m,f,"⊞","\\boxplus",!0),o(u,m,f,"⋇","\\divideontimes",!0),o(u,m,f,"⋉","\\ltimes",!0),o(u,m,f,"⋊","\\rtimes",!0),o(u,m,f,"⋋","\\leftthreetimes",!0),o(u,m,f,"⋌","\\rightthreetimes",!0),o(u,m,f,"⋏","\\curlywedge",!0),o(u,m,f,"⋎","\\curlyvee",!0),o(u,m,f,"⊝","\\circleddash",!0),o(u,m,f,"⊛","\\circledast",!0),o(u,m,f,"⋅","\\centerdot"),o(u,m,f,"⊺","\\intercal",!0),o(u,m,f,"⋒","\\doublecap"),o(u,m,f,"⋓","\\doublecup"),o(u,m,f,"⊠","\\boxtimes",!0),o(u,m,y,"⇢","\\dashrightarrow",!0),o(u,m,y,"⇠","\\dashleftarrow",!0),o(u,m,y,"⇇","\\leftleftarrows",!0),o(u,m,y,"⇆","\\leftrightarrows",!0),o(u,m,y,"⇚","\\Lleftarrow",!0),o(u,m,y,"↞","\\twoheadleftarrow",!0),o(u,m,y,"↢","\\leftarrowtail",!0),o(u,m,y,"↫","\\looparrowleft",!0),o(u,m,y,"⇋","\\leftrightharpoons",!0),o(u,m,y,"↶","\\curvearrowleft",!0),o(u,m,y,"↺","\\circlearrowleft",!0),o(u,m,y,"↰","\\Lsh",!0),o(u,m,y,"⇈","\\upuparrows",!0),o(u,m,y,"↿","\\upharpoonleft",!0),o(u,m,y,"⇃","\\downharpoonleft",!0),o(u,p,y,"⊶","\\origof",!0),o(u,p,y,"⊷","\\imageof",!0),o(u,m,y,"⊸","\\multimap",!0),o(u,m,y,"↭","\\leftrightsquigarrow",!0),o(u,m,y,"⇉","\\rightrightarrows",!0),o(u,m,y,"⇄","\\rightleftarrows",!0),o(u,m,y,"↠","\\twoheadrightarrow",!0),o(u,m,y,"↣","\\rightarrowtail",!0),o(u,m,y,"↬","\\looparrowright",!0),o(u,m,y,"↷","\\curvearrowright",!0),o(u,m,y,"↻","\\circlearrowright",!0),o(u,m,y,"↱","\\Rsh",!0),o(u,m,y,"⇊","\\downdownarrows",!0),o(u,m,y,"↾","\\upharpoonright",!0),o(u,m,y,"⇂","\\downharpoonright",!0),o(u,m,y,"⇝","\\rightsquigarrow",!0),o(u,m,y,"⇝","\\leadsto"),o(u,m,y,"⇛","\\Rrightarrow",!0),o(u,m,y,"↾","\\restriction"),o(u,p,g,"‘","`"),o(u,p,g,"$","\\$"),o(d,p,g,"$","\\$"),o(d,p,g,"$","\\textdollar"),o(u,p,g,"%","\\%"),o(d,p,g,"%","\\%"),o(u,p,g,"_","\\_"),o(d,p,g,"_","\\_"),o(d,p,g,"_","\\textunderscore"),o(u,p,g,"∠","\\angle",!0),o(u,p,g,"∞","\\infty",!0),o(u,p,g,"′","\\prime"),o(u,p,g,"△","\\triangle"),o(u,p,g,"Γ","\\Gamma",!0),o(u,p,g,"Δ","\\Delta",!0),o(u,p,g,"Θ","\\Theta",!0),o(u,p,g,"Λ","\\Lambda",!0),o(u,p,g,"Ξ","\\Xi",!0),o(u,p,g,"Π","\\Pi",!0),o(u,p,g,"Σ","\\Sigma",!0),o(u,p,g,"Υ","\\Upsilon",!0),o(u,p,g,"Φ","\\Phi",!0),o(u,p,g,"Ψ","\\Psi",!0),o(u,p,g,"Ω","\\Omega",!0),o(u,p,g,"A","Α"),o(u,p,g,"B","Β"),o(u,p,g,"E","Ε"),o(u,p,g,"Z","Ζ"),o(u,p,g,"H","Η"),o(u,p,g,"I","Ι"),o(u,p,g,"K","Κ"),o(u,p,g,"M","Μ"),o(u,p,g,"N","Ν"),o(u,p,g,"O","Ο"),o(u,p,g,"P","Ρ"),o(u,p,g,"T","Τ"),o(u,p,g,"X","Χ"),o(u,p,g,"¬","\\neg",!0),o(u,p,g,"¬","\\lnot"),o(u,p,g,"⊤","\\top"),o(u,p,g,"⊥","\\bot"),o(u,p,g,"∅","\\emptyset"),o(u,m,g,"∅","\\varnothing"),o(u,p,vs,"α","\\alpha",!0),o(u,p,vs,"β","\\beta",!0),o(u,p,vs,"γ","\\gamma",!0),o(u,p,vs,"δ","\\delta",!0),o(u,p,vs,"ϵ","\\epsilon",!0),o(u,p,vs,"ζ","\\zeta",!0),o(u,p,vs,"η","\\eta",!0),o(u,p,vs,"θ","\\theta",!0),o(u,p,vs,"ι","\\iota",!0),o(u,p,vs,"κ","\\kappa",!0),o(u,p,vs,"λ","\\lambda",!0),o(u,p,vs,"μ","\\mu",!0),o(u,p,vs,"ν","\\nu",!0),o(u,p,vs,"ξ","\\xi",!0),o(u,p,vs,"ο","\\omicron",!0),o(u,p,vs,"π","\\pi",!0),o(u,p,vs,"ρ","\\rho",!0),o(u,p,vs,"σ","\\sigma",!0),o(u,p,vs,"τ","\\tau",!0),o(u,p,vs,"υ","\\upsilon",!0),o(u,p,vs,"ϕ","\\phi",!0),o(u,p,vs,"χ","\\chi",!0),o(u,p,vs,"ψ","\\psi",!0),o(u,p,vs,"ω","\\omega",!0),o(u,p,vs,"ε","\\varepsilon",!0),o(u,p,vs,"ϑ","\\vartheta",!0),o(u,p,vs,"ϖ","\\varpi",!0),o(u,p,vs,"ϱ","\\varrho",!0),o(u,p,vs,"ς","\\varsigma",!0),o(u,p,vs,"φ","\\varphi",!0),o(u,p,f,"∗","*",!0),o(u,p,f,"+","+"),o(u,p,f,"−","-",!0),o(u,p,f,"⋅","\\cdot",!0),o(u,p,f,"∘","\\circ",!0),o(u,p,f,"÷","\\div",!0),o(u,p,f,"±","\\pm",!0),o(u,p,f,"×","\\times",!0),o(u,p,f,"∩","\\cap",!0),o(u,p,f,"∪","\\cup",!0),o(u,p,f,"∖","\\setminus",!0),o(u,p,f,"∧","\\land"),o(u,p,f,"∨","\\lor"),o(u,p,f,"∧","\\wedge",!0),o(u,p,f,"∨","\\vee",!0),o(u,p,g,"√","\\surd"),o(u,p,_l,"⟨","\\langle",!0),o(u,p,_l,"∣","\\lvert"),o(u,p,_l,"∥","\\lVert"),o(u,p,Pl,"?","?"),o(u,p,Pl,"!","!"),o(u,p,Pl,"⟩","\\rangle",!0),o(u,p,Pl,"∣","\\rvert"),o(u,p,Pl,"∥","\\rVert"),o(u,p,y,"=","="),o(u,p,y,":",":"),o(u,p,y,"≈","\\approx",!0),o(u,p,y,"≅","\\cong",!0),o(u,p,y,"≥","\\ge"),o(u,p,y,"≥","\\geq",!0),o(u,p,y,"←","\\gets"),o(u,p,y,">","\\gt",!0),o(u,p,y,"∈","\\in",!0),o(u,p,y,"","\\@not"),o(u,p,y,"⊂","\\subset",!0),o(u,p,y,"⊃","\\supset",!0),o(u,p,y,"⊆","\\subseteq",!0),o(u,p,y,"⊇","\\supseteq",!0),o(u,m,y,"⊈","\\nsubseteq",!0),o(u,m,y,"⊉","\\nsupseteq",!0),o(u,p,y,"⊨","\\models"),o(u,p,y,"←","\\leftarrow",!0),o(u,p,y,"≤","\\le"),o(u,p,y,"≤","\\leq",!0),o(u,p,y,"<","\\lt",!0),o(u,p,y,"→","\\rightarrow",!0),o(u,p,y,"→","\\to"),o(u,m,y,"≱","\\ngeq",!0),o(u,m,y,"≰","\\nleq",!0),o(u,p,Sl," ","\\ "),o(u,p,Sl," ","\\space"),o(u,p,Sl," ","\\nobreakspace"),o(d,p,Sl," ","\\ "),o(d,p,Sl," "," "),o(d,p,Sl," ","\\space"),o(d,p,Sl," ","\\nobreakspace"),o(u,p,Sl,null,"\\nobreak"),o(u,p,Sl,null,"\\allowbreak"),o(u,p,zl,",",","),o(u,p,zl,";",";"),o(u,m,f,"⊼","\\barwedge",!0),o(u,m,f,"⊻","\\veebar",!0),o(u,p,f,"⊙","\\odot",!0),o(u,p,f,"⊕","\\oplus",!0),o(u,p,f,"⊗","\\otimes",!0),o(u,p,g,"∂","\\partial",!0),o(u,p,f,"⊘","\\oslash",!0),o(u,m,f,"⊚","\\circledcirc",!0),o(u,m,f,"⊡","\\boxdot",!0),o(u,p,f,"△","\\bigtriangleup"),o(u,p,f,"▽","\\bigtriangledown"),o(u,p,f,"†","\\dagger"),o(u,p,f,"⋄","\\diamond"),o(u,p,f,"⋆","\\star"),o(u,p,f,"◃","\\triangleleft"),o(u,p,f,"▹","\\triangleright"),o(u,p,_l,"{","\\{"),o(d,p,g,"{","\\{"),o(d,p,g,"{","\\textbraceleft"),o(u,p,Pl,"}","\\}"),o(d,p,g,"}","\\}"),o(d,p,g,"}","\\textbraceright"),o(u,p,_l,"{","\\lbrace"),o(u,p,Pl,"}","\\rbrace"),o(u,p,_l,"[","\\lbrack",!0),o(d,p,g,"[","\\lbrack",!0),o(u,p,Pl,"]","\\rbrack",!0),o(d,p,g,"]","\\rbrack",!0),o(u,p,_l,"(","\\lparen",!0),o(u,p,Pl,")","\\rparen",!0),o(d,p,g,"<","\\textless",!0),o(d,p,g,">","\\textgreater",!0),o(u,p,_l,"⌊","\\lfloor",!0),o(u,p,Pl,"⌋","\\rfloor",!0),o(u,p,_l,"⌈","\\lceil",!0),o(u,p,Pl,"⌉","\\rceil",!0),o(u,p,g,"\\","\\backslash"),o(u,p,g,"∣","|"),o(u,p,g,"∣","\\vert"),o(d,p,g,"|","\\textbar",!0),o(u,p,g,"∥","\\|"),o(u,p,g,"∥","\\Vert"),o(d,p,g,"∥","\\textbardbl"),o(d,p,g,"~","\\textasciitilde"),o(d,p,g,"\\","\\textbackslash"),o(d,p,g,"^","\\textasciicircum"),o(u,p,y,"↑","\\uparrow",!0),o(u,p,y,"⇑","\\Uparrow",!0),o(u,p,y,"↓","\\downarrow",!0),o(u,p,y,"⇓","\\Downarrow",!0),o(u,p,y,"↕","\\updownarrow",!0),o(u,p,y,"⇕","\\Updownarrow",!0),o(u,p,cc,"∐","\\coprod"),o(u,p,cc,"⋁","\\bigvee"),o(u,p,cc,"⋀","\\bigwedge"),o(u,p,cc,"⨄","\\biguplus"),o(u,p,cc,"⋂","\\bigcap"),o(u,p,cc,"⋃","\\bigcup"),o(u,p,cc,"∫","\\int"),o(u,p,cc,"∫","\\intop"),o(u,p,cc,"∬","\\iint"),o(u,p,cc,"∭","\\iiint"),o(u,p,cc,"∏","\\prod"),o(u,p,cc,"∑","\\sum"),o(u,p,cc,"⨂","\\bigotimes"),o(u,p,cc,"⨁","\\bigoplus"),o(u,p,cc,"⨀","\\bigodot"),o(u,p,cc,"∮","\\oint"),o(u,p,cc,"∯","\\oiint"),o(u,p,cc,"∰","\\oiiint"),o(u,p,cc,"⨆","\\bigsqcup"),o(u,p,cc,"∫","\\smallint"),o(d,p,Ul,"…","\\textellipsis"),o(u,p,Ul,"…","\\mathellipsis"),o(d,p,Ul,"…","\\ldots",!0),o(u,p,Ul,"…","\\ldots",!0),o(u,p,Ul,"⋯","\\@cdots",!0),o(u,p,Ul,"⋱","\\ddots",!0),o(u,p,g,"⋮","\\varvdots"),o(d,p,g,"⋮","\\varvdots"),o(u,p,hc,"ˊ","\\acute"),o(u,p,hc,"ˋ","\\grave"),o(u,p,hc,"¨","\\ddot"),o(u,p,hc,"~","\\tilde"),o(u,p,hc,"ˉ","\\bar"),o(u,p,hc,"˘","\\breve"),o(u,p,hc,"ˇ","\\check"),o(u,p,hc,"^","\\hat"),o(u,p,hc,"⃗","\\vec"),o(u,p,hc,"˙","\\dot"),o(u,p,hc,"˚","\\mathring"),o(u,p,vs,"","\\@imath"),o(u,p,vs,"","\\@jmath"),o(u,p,g,"ı","ı"),o(u,p,g,"ȷ","ȷ"),o(d,p,g,"ı","\\i",!0),o(d,p,g,"ȷ","\\j",!0),o(d,p,g,"ß","\\ss",!0),o(d,p,g,"æ","\\ae",!0),o(d,p,g,"œ","\\oe",!0),o(d,p,g,"ø","\\o",!0),o(d,p,g,"Æ","\\AE",!0),o(d,p,g,"Œ","\\OE",!0),o(d,p,g,"Ø","\\O",!0),o(d,p,hc,"ˊ","\\'"),o(d,p,hc,"ˋ","\\`"),o(d,p,hc,"ˆ","\\^"),o(d,p,hc,"˜","\\~"),o(d,p,hc,"ˉ","\\="),o(d,p,hc,"˘","\\u"),o(d,p,hc,"˙","\\."),o(d,p,hc,"¸","\\c"),o(d,p,hc,"˚","\\r"),o(d,p,hc,"ˇ","\\v"),o(d,p,hc,"¨",'\\"'),o(d,p,hc,"˝","\\H"),o(d,p,hc,"◯","\\textcircled"),xs={"--":!0,"---":!0,"``":!0,"''":!0},o(d,p,g,"–","--",!0),o(d,p,g,"–","\\textendash"),o(d,p,g,"—","---",!0),o(d,p,g,"—","\\textemdash"),o(d,p,g,"‘","`",!0),o(d,p,g,"‘","\\textquoteleft"),o(d,p,g,"’","'",!0),o(d,p,g,"’","\\textquoteright"),o(d,p,g,"“","``",!0),o(d,p,g,"“","\\textquotedblleft"),o(d,p,g,"”","''",!0),o(d,p,g,"”","\\textquotedblright"),o(u,p,g,"°","\\degree",!0),o(d,p,g,"°","\\degree"),o(d,p,g,"°","\\textdegree",!0),o(u,p,g,"£","\\pounds"),o(u,p,g,"£","\\mathsterling",!0),o(d,p,g,"£","\\pounds"),o(d,p,g,"£","\\textsterling",!0),o(u,m,g,"✠","\\maltese"),o(d,m,g,"✠","\\maltese"),bs='0123456789/@."',ks=0;ks<bs.length;ks++)ws=bs.charAt(ks),o(u,p,g,ws,ws);for(Ts='0123456789!@*()-=+";:?/.,',Cs=0;Cs<Ts.length;Cs++)Es=Ts.charAt(Cs),o(d,p,g,Es,Es);for(Ss="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",As=0;As<Ss.length;As++)_s=Ss.charAt(As),o(u,p,vs,_s,_s),o(d,p,g,_s,_s);for(o(u,m,g,"C","ℂ"),o(d,m,g,"C","ℂ"),o(u,m,g,"H","ℍ"),o(d,m,g,"H","ℍ"),o(u,m,g,"N","ℕ"),o(d,m,g,"N","ℕ"),o(u,m,g,"P","ℙ"),o(d,m,g,"P","ℙ"),o(u,m,g,"Q","ℚ"),o(d,m,g,"Q","ℚ"),o(u,m,g,"R","ℝ"),o(d,m,g,"R","ℝ"),o(u,m,g,"Z","ℤ"),o(d,m,g,"Z","ℤ"),o(u,p,vs,"h","ℎ"),o(d,p,vs,"h","ℎ"),Ls="",Is=0;Is<Ss.length;Is++)Ns=Ss.charAt(Is),Ls=String.fromCharCode(55349,56320+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls),Ls=String.fromCharCode(55349,56372+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls),Ls=String.fromCharCode(55349,56424+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls),Ls=String.fromCharCode(55349,56580+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls),Ls=String.fromCharCode(55349,56684+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls),Ls=String.fromCharCode(55349,56736+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls),Ls=String.fromCharCode(55349,56788+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls),Ls=String.fromCharCode(55349,56840+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls),Ls=String.fromCharCode(55349,56944+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls),Is<26&&(Ls=String.fromCharCode(55349,56632+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls),Ls=String.fromCharCode(55349,56476+Is),o(u,p,vs,Ns,Ls),o(d,p,g,Ns,Ls));for(o(u,p,vs,"k",Ls="𝕜"),o(d,p,g,"k",Ls),Ms=0;Ms<10;Ms++)Rs=Ms.toString(),Ls=String.fromCharCode(55349,57294+Ms),o(u,p,vs,Rs,Ls),o(d,p,g,Rs,Ls),Ls=String.fromCharCode(55349,57314+Ms),o(u,p,vs,Rs,Ls),o(d,p,g,Rs,Ls),Ls=String.fromCharCode(55349,57324+Ms),o(u,p,vs,Rs,Ls),o(d,p,g,Rs,Ls),Ls=String.fromCharCode(55349,57334+Ms),o(u,p,vs,Rs,Ls),o(d,p,g,Rs,Ls);for(Ds="ÐÞþ",Ps=0;Ps<Ds.length;Ps++)Os=Ds.charAt(Ps),o(u,p,vs,Os,Os),o(d,p,g,Os,Os);Bs=[["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"]],$s=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Fs=mt(function(e,t){var r,n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,t="math"===t?0:1;if(119808<=n&&n<120484)return r=Math.floor((n-119808)/26),[Bs[r][2],Bs[r][t]];if(120782<=n&&n<=120831)return r=Math.floor((n-120782)/10),[$s[r][2],$s[r][t]];if(120485==n||120486==n)return[Bs[0][2],Bs[0][t]];if(120486<n&&n<120782)return["",""];throw new X("Unsupported character: "+e)},"wideCharacterFont"),zs=mt(function(e,t,r){return{value:e=ys[r][e]&&ys[r][e].replace?ys[r][e].replace:e,metrics:Gi(e,t,r)}},"lookupSymbol"),Gs=mt(function(e,t,r,n,i){var a=zs(e,t,r),s=a.metrics;return e=a.value,a=s?(a=s.italic,("text"===r||n&&"mathit"===n.font)&&(a=0),new us(e,s.height,s.depth,a,s.skew,s.width,i)):(typeof console<"u"&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),new us(e,0,0,0,0,0,i)),n&&(a.maxFontSize=n.sizeMultiplier,n.style.isTight()&&a.classes.push("mtight"),s=n.getColor())&&(a.style.color=s),a},"makeSymbol"),Sl=mt(function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&zs(e,"Main-Bold",t).metrics?Gs(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===ys[t][e].font?Gs(e,"Main-Regular",t,r,n):Gs(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},"mathsym"),Us=mt(function(e,t,r,n,i){return"textord"!==i&&zs(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},"boldsymbol"),zl=mt(function(e,t,r){var n,i,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]=Fs(s,a)),0<c.length)return Gs(s,c,a,t,o.concat(h));if(l){if(i="boldsymbol"===l?(n=(c=Us(s,a,t,o,r)).fontName,[c.fontClass]):e?(n=Ks[l].fontName,[l]):(n=Xs(l,t.fontWeight,t.fontShape),[l,t.fontWeight,t.fontShape]),zs(s,n,a).metrics)return Gs(s,n,a,t,o.concat(i));if(xs.hasOwnProperty(s)&&"Typewriter"===n.slice(0,10)){for(var u=[],d=0;d<s.length;d++)u.push(Gs(s[d],n,a,t,o.concat(i)));return Hs(u)}}if("mathord"===r)return Gs(s,"Math-Italic",a,t,o.concat(["mathnormal"]));if("textord"===r)return"ams"===(h=ys[a][s]&&ys[a][s].font)?(c=Xs("amsrm",t.fontWeight,t.fontShape),Gs(s,c,a,t,o.concat("amsrm",t.fontWeight,t.fontShape))):"main"!==h&&h?(e=Xs(h,t.fontWeight,t.fontShape),Gs(s,e,a,t,o.concat(e,t.fontWeight,t.fontShape))):(l=Xs("textrm",t.fontWeight,t.fontShape),Gs(s,l,a,t,o.concat(t.fontWeight,t.fontShape)));throw new Error("unexpected type: "+r+" in makeOrd")},"makeOrd"),qs=mt((e,t)=>{if(rs(e.classes)!==rs(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 n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},"canCombine"),f=mt(e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof us&&n instanceof us&&qs(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e},"tryCombineChars"),js=mt(function(e){for(var t=0,r=0,n=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),r<a.depth&&(r=a.depth),n<a.maxFontSize&&(n=a.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},"sizeElementFromChildren"),Ws=mt(function(e,t,r,n){return e=new os(e,t,r,n),js(e),e},"makeSpan"),Ys=mt((e,t,r,n)=>new os(e,t,r,n),"makeSvgSpan"),_l=mt(function(e,t,r){return(e=Ws([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=K(e.height),e.maxFontSize=1,e},"makeLineSpan"),Pl=mt(function(e,t,r,n){return e=new ls(e,t,r,n),js(e),e},"makeAnchor"),Hs=mt(function(e){return e=new qa(e),js(e),e},"makeFragment"),y=mt(function(e,t){return e instanceof qa?Ws([],[e],t):e},"wrapFragment"),Vs=mt(function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,i=n,a=1;a<t.length;a++){var s=-t[a].shift-i-t[a].elem.depth,o=s-(t[a-1].elem.height+t[a-1].elem.depth);i+=s,r.push({type:"kern",size:o}),r.push(t[a])}return{children:r,depth:n}}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"!==(n=e.children[0]).type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-n.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-n.elem.depth}}return{children:e.children,depth:l}},"getVListChildrenAndDepth"),cc=mt(function(e,t){for(var{children:r,depth:e}=Vs(e),n=0,i=0;i<r.length;i++){var a=r[i];"elem"===a.type&&(a=a.elem,n=Math.max(n,a.maxFontSize,a.height))}n+=2;var s=Ws(["pstrut"],[]);s.style.height=K(n);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=Ws(g,[s,d],void 0,p)).style.top=K(-n-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=Ws(["vlist"],o)).style.height=K(c);var m=l<0?(y=Ws([],[]),(y=Ws(["vlist"],[y])).style.height=K(-l),m=Ws(["vlist-s"],[new us("")]),[Ws(["vlist-r"],[e,m]),Ws(["vlist-r"],[y])]):[Ws(["vlist-r"],[e])],y=Ws(["vlist-t"],m);return 2===m.length&&y.classes.push("vlist-t2"),y.height=c,y.depth=-l,y},"makeVList"),Ul=mt((e,t)=>{var r=Ws(["mspace"],[],t),e=ts(e,t);return r.style.marginRight=K(e),r},"makeGlue"),Xs=mt(function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},"retrieveTextFontName"),Ks={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"}},Zs={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},hc=mt(function(e,t){var[e,r,n]=Zs[e],e=new ps(e),e=new ds([e],{width:K(r),height:K(n),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(e=Ys(["overlay"],[e],t)).height=n,e.style.height=K(n),e.style.width=K(r),e},"staticSvg"),Z={fontMap:Ks,makeSymbol:Gs,mathsym:Sl,makeSpan:Ws,makeSvgSpan:Ys,makeLineSpan:_l,makeAnchor:Pl,makeFragment:Hs,wrapFragment:y,makeVList:cc,makeOrd:zl,makeGlue:Ul,staticSvg:hc,svgData:Zs,tryCombineChars:f},Qs={mord:{mop:m={number:3,unit:"mu"},mbin:Sl={number:4,unit:"mu"},mrel:_l={number:5,unit:"mu"},minner:m},mop:{mord:m,mop:m,mrel:_l,minner:m},mbin:{mord:Sl,mop:Sl,mopen:Sl,minner:Sl},mrel:{mord:_l,mop:_l,mopen:_l,minner:_l},mopen:{},mclose:{mop:m,mbin:Sl,mrel:_l,minner:m},mpunct:{mord:m,mop:m,mrel:_l,mopen:m,mclose:m,mpunct:m,minner:m},minner:{mord:m,mop:m,mbin:Sl,mrel:_l,mopen:m,mpunct:m,minner:m}},Js={mord:{mop:m},mop:{mord:m,mop:m},mbin:{},mrel:{},mopen:{},mclose:{mop:m},mpunct:{},minner:{mop:m}},eo={},to={},ro={},mt(l,"defineFunction"),mt(Wi,"defineFunctionBuilders"),no=mt(function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},"normalizeArgument"),io=mt(function(e){return"ordgroup"===e.type?e.body:[e]},"ordargument"),ao=Z.makeSpan,so=["leftmost","mbin","mopen","mrel","mop","mpunct"],oo=["rightmost","mrel","mclose","mpunct"],lo={display:La.DISPLAY,text:La.TEXT,script:La.SCRIPT,scriptscript:La.SCRIPTSCRIPT},co={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ho=mt(function(e,t,r,n){void 0===n&&(n=[null,null]);for(var i,a,s=[],o=0;o<e.length;o++){var l,c=yo(e[o],t);c instanceof qa?(l=c.children,s.push(...l)):s.push(c)}return Z.tryCombineChars(s),r&&(i=t,1===e.length&&("sizing"===(a=e[0]).type?i=t.havingSize(a.size):"styling"===a.type&&(i=t.havingStyle(lo[a.style]))),a=ao([n[0]||"leftmost"],[],t),n=ao([n[1]||"rightmost"],[],t),uo(s,(e,t)=>{var r=t.classes[0],n=e.classes[0];"mbin"===r&&xa.contains(oo,n)?t.classes[0]="mord":"mbin"===n&&xa.contains(so,r)&&(e.classes[0]="mord")},{node:a},n,r="root"===r),uo(s,(e,t)=>{var t=fo(t),r=fo(e);if(e=t&&r?(e.hasClass("mtight")?Js:Qs)[t][r]:null)return Z.makeGlue(e,i)},{node:a},n,r)),s},"buildExpression"),uo=mt(function e(r,t,n,i,a){i&&r.push(i);for(var s=0;s<r.length;s++){var o,l=r[s],c=po(l);c?e(c.children,t,n,null,a):((c=!l.hasClass("mspace"))&&(o=t(l,n.node))&&(n.insertAfter?n.insertAfter(o):(r.unshift(o),s++)),c?n.node=l:a&&l.hasClass("newline")&&(n.node=ao(["leftmost"])),n.insertAfter=(t=>e=>{r.splice(t+1,0,e),s++})(s))}i&&r.pop()},"traverseNonSpaceNodes"),po=mt(function(e){return e instanceof qa||e instanceof ls||e instanceof os&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),go=mt(function e(t,r){var n=po(t);if(n&&(n=n.children).length){if("right"===r)return e(n[n.length-1],"right");if("left"===r)return e(n[0],"left")}return t},"getOutermostNode"),fo=mt(function(e,t){return e&&(t&&(e=go(e,t)),co[e.classes[0]])||null},"getTypeOfDomTree"),mo=mt(function(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),ao(t.concat(e))},"makeNullDelimiter"),yo=mt(function(e,t,r){if(!e)return ao();var n;if(to[e.type])return n=to[e.type](e,t),r&&t.size!==r.size&&(n=ao(t.sizingClasses(r),[n],t),t=t.sizeMultiplier/r.sizeMultiplier,n.height*=t,n.depth*=t),n;throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(Yi,"buildHTMLUnbreakable"),mt(Hi,"buildHTML"),mt(Vi,"newDocumentFragment"),vo=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=rs(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof xo&&this.children[r+1]instanceof xo){for(var n=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof xo;)n+=this.children[++r].toText();t.appendChild(new xo(n).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+=xa.escape(this.attributes[e]),t+='"');0<this.classes.length&&(t+=' class ="'+xa.escape(rs(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("")}},xo=class{static{mt(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return xa.escape(this.toText())}toText(){return this.text}},Pl=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||" "}},E={MathNode:vo,TextNode:xo,SpaceNode:Pl,newDocumentFragment:Vi},bo=mt(function(e,t,r){return!ys[t][e]||!ys[t][e].replace||55349===e.charCodeAt(0)||xs.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=ys[t][e].replace),new E.TextNode(e)},"makeText"),wo=mt(function(e){return 1===e.length?e[0]:new E.MathNode("mrow",e)},"makeRow"),ko=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":!xa.contains(["\\imath","\\jmath"],e=e.text)&&Gi(e=ys[r][e]&&ys[r][e].replace?ys[r][e].replace:e,Z.fontMap[t].fontName,r)?Z.fontMap[t].variant:null):null},"getVariant"),mt(Xi,"isNumberPunctuation"),To=mt(function(e,t,r){var n;if(1===e.length)return n=Co(e[0],t),r&&n instanceof vo&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];for(var i,a=[],s=0;s<e.length;s++){var o,l,c=Co(e[s],t);if(c instanceof vo&&i instanceof vo){if("mtext"===c.type&&"mtext"===i.type&&c.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...c.children);continue}if("mn"===c.type&&"mn"===i.type){i.children.push(...c.children);continue}if(Xi(c)&&"mn"===i.type){i.children.push(...c.children);continue}"mn"===c.type&&Xi(i)?(c.children=[...i.children,...c.children],a.pop()):("msup"===c.type||"msub"===c.type)&&1<=c.children.length&&("mn"===i.type||Xi(i))?(o=c.children[0])instanceof vo&&"mn"===o.type&&(o.children=[...i.children,...o.children],a.pop()):"mi"===i.type&&1===i.children.length&&(o=i.children[0])instanceof xo&&"̸"===o.text&&("mo"===c.type||"mi"===c.type||"mn"===c.type)&&(l=c.children[0])instanceof xo&&0<l.text.length&&(l.text=l.text.slice(0,1)+"̸"+l.text.slice(1),a.pop())}a.push(c),i=c}return a},"buildExpression"),Eo=mt(function(e,t,r){return wo(To(e,t,r))},"buildExpressionRow"),Co=mt(function(e,t){if(!e)return new E.MathNode("mrow");if(ro[e.type])return ro[e.type](e,t);throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(Ki,"buildMathML"),So=mt(function(e){return new Za({style:e.displayMode?La.DISPLAY:La.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},"optionsFromSettings"),_o=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"),Ao=mt(function(e,t,r){var n,i=So(r);return"mathml"===r.output?Ki(e,t,i,r.displayMode,!0):(e="html"===r.output?(n=Hi(e,i),Z.makeSpan(["katex"],[n])):(n=Ki(e,t,i,r.displayMode,!1),t=Hi(e,i),Z.makeSpan(["katex"],[n,t])),_o(e,r))},"buildTree"),Lo=mt(function(e,t,r){return e=Hi(e,So(r)),e=Z.makeSpan(["katex"],[e]),_o(e,r)},"buildHTMLTree"),No={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":"="},y=mt(function(e){return(e=new E.MathNode("mo",[new E.TextNode(No[e.replace(/^\\/,"")])])).setAttribute("stretchy","true"),e},"mathMLnode"),Io={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]},Ro=mt(function(e){return"ordgroup"===e.type?e.body.length:1},"groupLength"),cc=mt(function(f,m){function e(){var e,t,r=4e5,n=f.label.slice(1);if(xa.contains(["widehat","widecheck","widetilde","utilde"],n))return t=5<(t=Ro(f.base))?"widehat"===n||"widecheck"===n?(a=420,r=2364,e=.42,n+"4"):(a=312,r=2340,e=.34,"tilde4"):(t=[1,1,2,2,3,3][t],"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][t],a=[0,239,300,360,420][t],e=[0,.24,.3,.3,.36,.42][t],n+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 ps(t),t=new ds([t],{width:"100%",height:K(e),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"}),{span:Z.makeSvgSpan([],[t],m),minWidth:0,height:e};var i=[],a=Io[n],[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 ps(s[p]),g=new ds([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),i.push(g)}return{span:Z.makeSpan(["stretchy"],i,m),minWidth:o,height:c}}mt(e,"buildSvgSpan_");var{span:t,minWidth:r,height:n}=e();return t.height=n,t.style.height=K(n),0<r&&(t.style.minWidth=K(r)),t},"svgSpan"),zl=mt(function(e,t,r,n,i){var a,e=e.height+e.depth+r+n;return/fbox|color|angl/.test(t)?(a=Z.makeSpan(["stretchy",t],[],i),"fbox"===t&&(r=i.color&&i.getColor())&&(a.style.borderColor=r)):(n=[],/^[bx]cancel$/.test(t)&&n.push(new gs({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&n.push(new gs({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),r=new ds(n,{width:"100%",height:K(e)}),a=Z.makeSvgSpan([],[r],i)),a.height=e,a.style.height=K(e),a},"encloseSpan"),Mo={encloseSpan:zl,mathMLnode:y,svgSpan:cc},mt(Zi,"assertNodeType"),mt(Qi,"assertSymbolNodeType"),mt(Ji,"checkSymbolNodeType"),Do=mt((e,t)=>{e&&"supsub"===e.type?(o=(r=Zi(e.base,"accent")).base,e.base=o,n=ji(yo(e,t)),e.base=r):o=(r=Zi(e,"accent")).base;var r,n,i,a,e=yo(o,t.havingCrampedStyle()),s=0,o=(r.isShifty&&xa.isCharacterBox(o)&&(o=xa.getBaseElem(o),s=qi(yo(o,t.havingCrampedStyle())).skew),"\\c"===r.label),l=o?e.height+e.depth:Math.min(e.height,t.fontMetrics().xHeight),c=r.isStretchy?(c=Mo.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),i=Z.svgData.vec[1]):((a=qi(a=Z.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,i=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-=i/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 n?(n.children[0]=s,n.height=Math.max(s.height,n.height),n.classes[0]="mord",n):s},"htmlBuilder$a"),Ul=mt((e,t)=>{var r=e.isStretchy?Mo.mathMLnode(e.label):new E.MathNode("mo",[bo(e.label,e.mode)]);return(e=new E.MathNode("mover",[Co(e.base,t),r])).setAttribute("accent","true"),e},"mathmlBuilder$9"),Oo=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),l({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=no(t[0]),r=!Oo.test(e.funcName),n=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:n,base:t}},"handler"),htmlBuilder:Do,mathmlBuilder:Ul}),l({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:Do,mathmlBuilder:Ul}),l({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=yo(e.base,t),n=Mo.svgSpan(e,t),e="\\utilde"===e.label?.12:0,n=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:r}]},t);return Z.makeSpan(["mord","accentunder"],[n],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{var r=Mo.mathMLnode(e.label);return(e=new E.MathNode("munder",[Co(e.base,t),r])).setAttribute("accentunder","true"),e},"mathmlBuilder")}),Po=mt(e=>((e=new E.MathNode("mpadded",e?[e]:[])).setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e),"paddedNode"),l({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:n}=e;return{type:"xArrow",mode:e.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,n=t.style,i=t.havingStyle(n.sup()),a=Z.wrapFragment(yo(e.body,i,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd",n=(a.classes.push(s+"-arrow-pad"),e.below&&(i=t.havingStyle(n.sub()),(r=Z.wrapFragment(yo(e.below,i,t),t)).classes.push(s+"-arrow-pad")),Mo.svgSpan(e,t)),i=-t.fontMetrics().axisHeight+.5*n.height,s=-t.fontMetrics().axisHeight-.5*n.height-.111;return(.25<a.depth||"\\xleftequilibrium"===e.label)&&(s-=a.depth),(r=r?(e=-t.fontMetrics().axisHeight+r.height+.5*n.height+.111,Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:n,shift:i},{type:"elem",elem:r,shift:e}]},t)):Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:n,shift:i}]},t)).children[0].children[0].children[1].classes.push("svg-align"),Z.makeSpan(["mrel","x-arrow"],[r],t)},mathmlBuilder(e,t){var r,n,i=Mo.mathMLnode(e.label);return i.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body?(r=Po(Co(e.body,t)),e.below?(n=Po(Co(e.below,t)),new E.MathNode("munderover",[i,n,r])):new E.MathNode("mover",[i,r])):e.below?(n=Po(Co(e.below,t)),new E.MathNode("munder",[i,n])):(r=Po(),new E.MathNode("mover",[i,r]))}}),Bo=Z.makeSpan,mt(ea,"htmlBuilder$9"),mt(ta,"mathmlBuilder$8"),l({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:io(t),isCharacterBox:xa.isCharacterBox(t)}},htmlBuilder:ea,mathmlBuilder:ta}),$o=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"),l({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){return{type:"mclass",mode:(e=e.parser).mode,mclass:$o(t[0]),body:io(t[1]),isCharacterBox:xa.isCharacterBox(t[1])}}}),l({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:r}=e,n=t[1],t=t[0],i="\\stackrel"!==r?$o(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:io(n)},n={type:"supsub",mode:t.mode,base:n,sup:"\\underset"===r?null:t,sub:"\\underset"===r?t:null};return{type:"mclass",mode:e.mode,mclass:i,body:[n],isCharacterBox:xa.isCharacterBox(n)}},htmlBuilder:ea,mathmlBuilder:ta}),l({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:$o(t[0]),body:io(t[0])}},htmlBuilder(e,t){var r=ho(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=To(e.body,t),(t=new E.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),Fo={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},zo=mt(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Go=mt(e=>"textord"===e.type&&"@"===e.text,"isStartOfArrow"),Uo=mt((e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t,"isLabelEnd"),mt(ra,"cdArrow"),mt(na,"parseCD"),l({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(yo(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 E.MathNode("mrow",[Co(e.label,t)]),(t=new E.MathNode("mpadded",[t])).setAttribute("width","0"),"left"===e.side&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),(t=new E.MathNode("mstyle",[t])).setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}}),l({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(yo(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new E.MathNode("mrow",[Co(e.fragment,t)])}}),l({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var e=e.parser,r=Zi(t[0],"ordgroup").body,n="",i=0;i<r.length;i++)n+=Zi(r[i],"textord").text;if(t=parseInt(n),isNaN(t))throw new X("\\@char has non-numeric argument "+n);if(t<0||1114111<=t)throw new X("\\@char with invalid code point "+n);return t=t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))),{type:"textord",mode:e.mode,text:t}}}),hc=mt((e,t)=>(t=ho(e.body,t.withColor(e.color),!1),Z.makeFragment(t)),"htmlBuilder$8"),f=mt((e,t)=>(t=To(e.body,t.withColor(e.color)),(t=new E.MathNode("mstyle",t)).setAttribute("mathcolor",e.color),t),"mathmlBuilder$7"),l({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e.parser,r=Zi(t[0],"color-token").color;return{type:"color",mode:e.mode,color:r,body:io(t[1])}},htmlBuilder:hc,mathmlBuilder:f}),l({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=Zi(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:hc,mathmlBuilder:f}),l({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var n="["===(e=e.parser).gullet.future().text?e.parseSizeGroup(!0):null,i=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:i,size:n&&Zi(n,"size").value}},htmlBuilder(e,t){var r=Z.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size)&&(r.style.marginTop=K(ts(e.size,t))),r},mathmlBuilder(e,t){var r=new E.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size)&&r.setAttribute("height",K(ts(e.size,t))),r}}),qo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},jo=mt(e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new X("Expected a control sequence",e);return t},"checkControlSequence"),Wo=mt(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t},"getRHS"),Yo=mt((e,t,r,n)=>{var i=e.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)},"letCommand"),l({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(qo[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=qo[r.text]),Zi(e.parseFunction(),"internal");throw new X("Invalid token after macro prefix",r)}}),l({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(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new X("Expected a control sequence",r);for(var i,a=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){i=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 i&&o.unshift(i),"\\edef"!==e&&"\\xdef"!==e||(o=t.gullet.expandTokens(o)).reverse(),t.gullet.macros.set(n,{tokens:o,numArgs:a,delimiters:s},e===qo[e]),{type:"internal",mode:t.mode}}}),l({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=jo(e.gullet.popToken()),n=(e.gullet.consumeSpaces(),Wo(e));return Yo(e,r,n,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),l({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=jo(e.gullet.popToken()),n=e.gullet.popToken(),i=e.gullet.popToken();return Yo(e,r,i,"\\\\globalfuture"===t),e.gullet.pushToken(i),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}}),Ho=mt(function(e,t,r){if(r=Gi(ys.math[e]&&ys.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")},"getMetrics"),Vo=mt(function(e,t,r,n){return t=r.havingBaseStyle(t),n=Z.makeSpan(n.concat(t.sizingClasses(r)),[e],r),e=t.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e,n.maxFontSize=t.sizeMultiplier,n},"styleWrap"),Xo=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"),Ko=mt(function(e,t,r,n,i,a){return e=Z.makeSymbol(e,"Main-Regular",i,n),i=Vo(e,t,n,a),r&&Xo(i,n,t),i},"makeSmallDelim"),Zo=mt(function(e,t,r,n){return Z.makeSymbol(e,"Size"+t+"-Regular",r,n)},"mathrmSize"),Qo=mt(function(e,t,r,n,i,a){return e=Zo(e,t,i,n),i=Vo(Z.makeSpan(["delimsizing","size"+t],[e],n),La.TEXT,n,a),r&&Xo(i,n,La.TEXT),i},"makeLargeDelim"),Jo=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"),el=mt(function(e,t,r){var n=(ja["Size4-Regular"][e.charCodeAt(0)]?ja["Size4-Regular"]:ja["Size1-Regular"])[e.charCodeAt(0)][4],e=new ps("inner",za(e,Math.round(1e3*t))),e=new ds([e],{width:K(n),height:K(t),style:"width:"+K(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=Z.makeSvgSpan([],[e],r)).height=t,e.style.height=K(t),e.style.width=K(n),{type:"elem",elem:e}},"makeInner"),tl={type:"kern",size:-.008},rl=["|","\\lvert","\\rvert","\\vert"],nl=["\\|","\\lVert","\\rVert","\\Vert"],il=mt(function(e,t,r,n,i,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"):xa.contains(rl,e)?(s="∣",c="vert",h=333):xa.contains(nl,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=Ho(u,p,i)).height+e.depth),g=(g=Ho(s,p,i)).height+g.depth,f=(f=Ho(o,p,i)).height+f.depth,m=0,y=1,t=(null!==d&&(m=(v=Ho(d,p,i)).height+v.depth,y=2),(v=e+f+m)+Math.max(0,Math.ceil((t-v)/(y*g)))*y*g),v=n.fontMetrics().axisHeight,y=(r&&(v*=n.sizeMultiplier),t/2-v),g=[],v=(0<c.length?(r=t-e-f,v=Math.round(1e3*t),r=Ua(c,Math.round(1e3*r)),c=new ps(c,r),r=(h/1e3).toFixed(3)+"em",l=(v/1e3).toFixed(3)+"em",c=new ds([c],{width:r,height:l,viewBox:"0 0 "+h+" "+v}),(h=Z.makeSvgSpan([],[c],n)).height=v/1e3,h.style.width=r,h.style.height=l,g.push({type:"elem",elem:h})):(g.push(Jo(o,p,i)),g.push(tl),null===d?g.push(el(s,t-e-f+.016,n)):(g.push(el(s,c=(t-e-f-m)/2+.016,n)),g.push(tl),g.push(Jo(d,p,i)),g.push(tl),g.push(el(s,c,n))),g.push(tl),g.push(Jo(u,p,i))),n.havingBaseStyle(La.TEXT)),r=Z.makeVList({positionType:"bottom",positionData:y,children:g},v);return Vo(Z.makeSpan(["delimsizing","mult"],[r],v),La.TEXT,n,a)},"makeStackedDelim"),al=mt(function(e,t,r,n,i){return n=Fa(e,n,r),e=new ps(e,n),n=new ds([e],{width:"400em",height:K(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"}),Z.makeSvgSpan(["hide-tail"],[n],i)},"sqrtSvg"),Sl=mt(function(e,t){var r,n=t.havingBaseSizing(),i=gl("\\surd",e*n.sizeMultiplier,dl,n),n=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),s=0,o=0,l=0,i="small"===i.type?(e<1?n=1:e<1.4&&(n=.7),o=(1+a)/n,(r=al("sqrtMain",s=(1+a+.08)/n,l=1e3+1e3*a+80,a,t)).style.minWidth="0.853em",.833/n):"large"===i.type?(l=1080*cl[i.size],o=(cl[i.size]+a)/n,s=(cl[i.size]+a+.08)/n,(r=al("sqrtSize"+i.size,s,l,a,t)).style.minWidth="1.02em",1/n):(s=e+a+.08,o=e+a,l=Math.floor(1e3*e+a)+80,(r=al("sqrtTall",s,l,a,t)).style.minWidth="0.742em",1.056);return r.height=o,r.style.height=K(s),{span:r,advanceWidth:i,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*n}},"makeSqrtImage"),sl=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],ol=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],ll=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],cl=[0,1.2,1.8,2.4,3],_l=mt(function(e,t,r,n,i){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),xa.contains(sl,e)||xa.contains(ll,e))return Qo(e,t,!1,r,n,i);if(xa.contains(ol,e))return il(e,cl[t],!1,r,n,i);throw new X("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),hl=[{type:"small",style:La.SCRIPTSCRIPT},{type:"small",style:La.SCRIPT},{type:"small",style:La.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ul=[{type:"small",style:La.SCRIPTSCRIPT},{type:"small",style:La.SCRIPT},{type:"small",style:La.TEXT},{type:"stack"}],dl=[{type:"small",style:La.SCRIPTSCRIPT},{type:"small",style:La.SCRIPT},{type:"small",style:La.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],pl=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"),gl=mt(function(e,t,r,n){for(var i=Math.min(2,3-n.style.size);i<r.length&&"stack"!==r[i].type;i++){var a=(a=Ho(e,pl(r[i]),"math")).height+a.depth;if("small"===r[i].type&&(a*=n.havingBaseStyle(r[i].style).sizeMultiplier),t<a)return r[i]}return r[r.length-1]},"traverseSequence"),fl=mt(function(e,t,r,n,i,a){"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle");var s=xa.contains(ll,e)?hl:xa.contains(sl,e)?dl:ul;return"small"===(s=gl(e,t,s,n)).type?Ko(e,s.style,r,n,i,a):"large"===s.type?Qo(e,s.size,r,n,i,a):il(e,t,r,n,i,a)},"makeCustomSizedDelim"),m=mt(function(e,t,r,n,i,a){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,o=5/n.fontMetrics().ptPerEm,t=Math.max(t-s,r+s),r=Math.max(t/500*901,2*t-o);return fl(e,r,!0,n,i,a)},"makeLeftRightDelim"),ml={sqrtImage:Sl,sizedDelim:_l,sizeToMaxHeight:cl,customSizedDelim:fl,leftRightDelim:m},yl={"\\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}},vl=["(","\\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(ia,"checkDelimiter"),l({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=ia(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:yl[e.funcName].size,mclass:yl[e.funcName].mclass,delim:t.text}),"handler"),htmlBuilder:mt((e,t)=>"."===e.delim?Z.makeSpan([e.mclass]):ml.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),"htmlBuilder"),mathmlBuilder:mt(e=>{var t=[],t=("."!==e.delim&&t.push(bo(e.delim,e.mode)),new E.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),K(ml.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t},"mathmlBuilder")}),mt(aa,"assertParsed"),l({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:ia(t[0],e).text,color:r}},"handler")}),l({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var t=ia(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),n=(--e.leftrightDepth,e.expect("\\right",!1),Zi(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:r,left:t.text,right:n.delim,rightColor:n.color}},"handler"),htmlBuilder:mt((e,t)=>{aa(e);for(var r,n=ho(e.body,t,!0,["mopen","mclose"]),i=0,a=0,s=!1,o=0;o<n.length;o++)n[o].isMiddle?s=!0:(i=Math.max(n[o].height,i),a=Math.max(n[o].depth,a));if(i*=t.sizeMultiplier,a*=t.sizeMultiplier,r="."===e.left?mo(t,["mopen"]):ml.leftRightDelim(e.left,i,a,t,e.mode,["mopen"]),n.unshift(r),s)for(var l=1;l<n.length;l++){var c=n[l].isMiddle;c&&(n[l]=ml.leftRightDelim(c.delim,i,a,c.options,e.mode,[]))}return r="."===e.right?mo(t,["mclose"]):(r=e.rightColor?t.withColor(e.rightColor):t,ml.leftRightDelim(e.right,i,a,r,e.mode,["mclose"])),n.push(r),Z.makeSpan(["minner"],n,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{aa(e);var r,t=To(e.body,t);return"."!==e.left&&((r=new E.MathNode("mo",[bo(e.left,e.mode)])).setAttribute("fence","true"),t.unshift(r)),"."!==e.right&&((r=new E.MathNode("mo",[bo(e.right,e.mode)])).setAttribute("fence","true"),e.rightColor&&r.setAttribute("mathcolor",e.rightColor),t.push(r)),wo(t)},"mathmlBuilder")}),l({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{if(t=ia(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=mo(t,[]):(r=ml.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?bo("|","text"):bo(e.delim,e.mode),(e=new E.MathNode("mo",[e])).setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e),"mathmlBuilder")}),Pl=mt((e,t)=>{var r,n,i,a,s,o=Z.wrapFragment(yo(e.body,t),t),l=e.label.slice(1),c=t.sizeMultiplier,h=0,u=xa.isCharacterBox(e.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/c,h=-.5*t.fontMetrics().xHeight):"phase"===l?(a=ts({number:.6,unit:"pt"},t),s=ts({number:.35,unit:"ex"},t),c/=t.havingBaseSizing().sizeMultiplier,n=o.height+o.depth+a+s,o.style.paddingLeft=K(n/2+a),c=Math.floor(1e3*n*c),i=Ba(c),i=new ds([new ps("phase",i)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[i],t)).style.height=K(n),h=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.classes.push("boxpad"),n=i=c=0,i=/box/.test(l)?(n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),c=t.fontMetrics().fboxsep+("colorbox"===l?0:n)):"angl"===l?(c=4*(n=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=Mo.encloseSpan(o,l,c,i,t),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(n)):"angl"===l&&.049!==n&&(r.style.borderTopWidth=K(n),r.style.borderRightWidth=K(n)),h=o.depth+i,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"),zl=mt((e,t)=>{var r=new E.MathNode(-1<e.label.indexOf("colorbox")?"mpadded":"menclose",[Co(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 n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm;r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label&&(n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),r.setAttribute("style","border: "+n+"em solid "+String(e.borderColor)));break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r},"mathmlBuilder$6"),l({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:e,funcName:n}=e,i=Zi(t[0],"color-token").color;return{type:"enclose",mode:e.mode,label:n,backgroundColor:i,body:t[1]}},htmlBuilder:Pl,mathmlBuilder:zl}),l({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:e,funcName:n}=e,i=Zi(t[0],"color-token").color,a=Zi(t[1],"color-token").color;return{type:"enclose",mode:e.mode,label:n,backgroundColor:a,borderColor:i,body:t[2]}},htmlBuilder:Pl,mathmlBuilder:zl}),l({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]}}}),l({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:Pl,mathmlBuilder:zl}),l({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]}}}),xl={},mt(sa,"defineEnvironment"),bl={},mt(h,"defineMacro"),mt(oa,"getHLines"),wl=mt(e=>{if(!e.parser.settings.displayMode)throw new X("{"+e.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),mt(la,"getAutoTag"),mt(ca,"parseArray"),mt(ha,"dCellStyle"),y=mt(function(e,t){var r=e.body.length,P=e.hLinesBeforeRow,n=0,i=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(La.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778),"CD"===e.colSeparationType?ts({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]),M=0;M<e.body.length;++M){for(var d=e.body[M],p=$,g=F,f=(n<d.length&&(n=d.length),new Array(d.length)),m=0;m<d.length;++m){var y=yo(d[m],t);g<y.depth&&(g=y.depth),p<y.height&&(p=y.height),f[m]=y}var z=e.rowGaps[M],v=0;z&&0<(v=ts(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,i[M]=f,u(P[M+1])}var x,b,w=h/2+t.fontMetrics().axisHeight,k=e.cols||[],T=[],E=[];if(e.tags&&e.tags.some(e=>e))for(M=0;M<r;++M){var C=i[M],G=C.pos-w,S=e.tags[M],_=void 0;(_=!0===S?Z.makeSpan(["eqn-num"],[],t):!1===S?Z.makeSpan([],[],t):Z.makeSpan([],ho(S,t,!0),t)).depth=C.depth,_.height=C.height,E.push({type:"elem",elem:_,shift:G})}for(b=m=0;m<n||b<k.length;++m,++b){for(var A=k[b]||{},U=!0;"separator"===A.type;){if(U||((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(t.fontMetrics().doubleRuleSep),T.push(x)),"|"!==A.separator&&":"!==A.separator)throw new X("Invalid separator type: "+A.separator);var L="|"===A.separator?"solid":"dashed",N=Z.makeSpan(["vertical-separator"],[],t);N.style.height=K(h),N.style.borderRightWidth=K(s),N.style.borderRightStyle=L,N.style.margin="0 "+K(-s/2),(L=h-w)&&(N.style.verticalAlign=K(-L)),T.push(N),A=k[++b]||{},U=!1}if(!(n<=m)){for(var I=void 0,R=((0<m||e.hskipBeforeAndAfter)&&0!==(I=xa.deflt(A.pregap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),T.push(x)),[]),M=0;M<r;++M){var q,D=i[M],O=D[m];O&&(q=D.pos-w,O.depth=D.depth,O.height=D.height,R.push({type:"elem",elem:O,shift:q}))}R=Z.makeVList({positionType:"individualShift",children:R},t),R=Z.makeSpan(["col-align-"+(A.align||"c")],[R]),T.push(R),(m<n-1||e.hskipBeforeAndAfter)&&0!==(I=xa.deflt(A.postgap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),T.push(x))}}if(i=Z.makeSpan(["mtable"],T),0<a.length){for(var j=Z.makeLineSpan("hline",t,s),W=Z.makeLineSpan("hdashline",t,s),Y=[{type:"elem",elem:i,shift:0}];0<a.length;){var H=a.pop(),V=H.pos-w;Y.push(H.isDashed?{type:"elem",elem:W,shift:V}:{type:"elem",elem:j,shift:V})}i=Z.makeVList({positionType:"individualShift",children:Y},t)}return 0===E.length?Z.makeSpan(["mord"],[i],t):(c=Z.makeVList({positionType:"individualShift",children:E},t),c=Z.makeSpan(["tag"],[c],t),Z.makeFragment([i,c]))},"htmlBuilder"),kl={c:"center ",l:"left ",r:"right "},cc=mt(function(e,t){for(var r=[],n=new E.MathNode("mtd",[],["mtr-glue"]),i=new E.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 E.MathNode("mtd",[Co(s[l],t)]));e.tags&&e.tags[a]&&(o.unshift(n),o.push(n),e.leqno?o.unshift(i):o.push(i)),r.push(new E.MathNode("mtr",o))}var c=new E.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+=kl[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||[],x="",b=1;b<v.length;b++)x+=b%2?"0em ":"1em ";c.setAttribute("columnspacing",x.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 w="",k=e.hLinesBeforeRow,h=(h+=0<k[0].length?"left ":"")+(0<k[k.length-1].length?"right ":""),T=1;T<k.length-1;T++)w+=0===k[T].length?"none ":k[T][0]?"dashed ":"solid ";return/[sd]/.test(w)&&c.setAttribute("rowlines",w.trim()),""!==h&&(c=new E.MathNode("menclose",[c])).setAttribute("notation",h.trim()),e.arraystretch&&e.arraystretch<1&&(c=new E.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},"mathmlBuilder"),Ul=mt(function(e,t){-1===e.envName.indexOf("ed")&&wl(e);var i,r=[],n=-1<e.envName.indexOf("at")?"alignat":"align",a="split"===e.envName,n=ca(e.parser,{cols:r,addJot:!0,autoTag:a?void 0:la(e.envName),emptySingleRow:!0,colSeparationType:n,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+=Zi(t[0].body[c],"textord").text;i=Number(l),s=2*i}var h=!s;n.body.forEach(function(e){for(var t=1;t<e.length;t+=2){var r=Zi(e[t],"styling");Zi(r.body[0],"ordgroup").body.unshift(o)}if(h)s<e.length&&(s=e.length);else{var n=e.length/2;if(i<n)throw new X("Too many math in a row: expected "+i+", but got "+n,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 n.colSeparationType=h?"align":"alignat",n},"alignedHandler"),sa({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){return t={cols:t=(Ji(t[0])?[t[0]]:Zi(t[0],"ordgroup").body).map(function(e){var t=Qi(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},ca(e.parser,t,ha(e.envName))},htmlBuilder:y,mathmlBuilder:cc}),sa({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(r))throw new X("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}return i=ca(e.parser,n,ha(e.envName)),n=Math.max(0,...i.body.map(e=>e.length)),i.cols=new Array(n).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:y,mathmlBuilder:cc}),sa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=ca(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:y,mathmlBuilder:cc}),sa({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(Ji(t[0])?[t[0]]:Zi(t[0],"ordgroup").body).map(function(e){var t=Qi(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=ca(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:y,mathmlBuilder:cc}),sa({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=ca(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},ha(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:y,mathmlBuilder:cc}),sa({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Ul,htmlBuilder:y,mathmlBuilder:cc}),sa({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){xa.contains(["gather","gather*"],e.envName)&&wl(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:la(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ca(e.parser,t,"display")},htmlBuilder:y,mathmlBuilder:cc}),sa({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Ul,htmlBuilder:y,mathmlBuilder:cc}),sa({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){wl(e);var t={autoTag:la(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ca(e.parser,t,"display")},htmlBuilder:y,mathmlBuilder:cc}),sa({type:"array",names:["CD"],props:{numArgs:0},handler(e){return wl(e),na(e.parser)},htmlBuilder:y,mathmlBuilder:cc}),h("\\nonumber","\\gdef\\@eqnsw{0}"),h("\\notag","\\nonumber"),l({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")}}),Tl=xl,l({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:e,funcName:r}=e,n=t[0];if("ordgroup"!==n.type)throw new X("Invalid environment name",n);for(var i="",a=0;a<n.body.length;++a)i+=Zi(n.body[a],"textord").text;if("\\begin"!==r)return{type:"environment",mode:e.mode,name:i,nameGroup:n};if(!Tl.hasOwnProperty(i))throw new X("No such environment: "+i,n);var t=Tl[i],{args:r,optArgs:s}=e.parseArguments("\\begin{"+i+"}",t),o={mode:e.mode,envName:i,parser:e},t=t.handler(o,r,s),o=(e.expect("\\end",!1),e.nextToken);if((r=Zi(e.parseFunction(),"environment")).name!==i)throw new X("Mismatch: \\begin{"+i+"} matched by \\end{"+r.name+"}",o);return t}}),hc=mt((e,t)=>{var r=e.font,t=t.withFont(r);return yo(e.body,t)},"htmlBuilder$5"),f=mt((e,t)=>{var r=e.font,t=t.withFont(r);return Co(e.body,t)},"mathmlBuilder$4"),El={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},l({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=no(t[0]);return{type:"font",mode:e.mode,font:(r=r in El?El[r]:r).slice(1),body:t}},"handler"),htmlBuilder:hc,mathmlBuilder:f}),l({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:mt((e,t)=>{var e=e.parser,t=t[0],r=xa.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:$o(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:r}},"handler")}),l({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r,breakOnTokenText:n}=e,i=e.mode,n=e.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:e.mode,body:n}}},"handler"),htmlBuilder:hc,mathmlBuilder:f}),Cl=mt((e,t)=>("display"===e?t=t.id>=La.SCRIPT.id?t.text():La.DISPLAY:"text"===e&&t.size===La.DISPLAY.size?t=La.TEXT:"script"===e?t=La.SCRIPT:"scriptscript"===e&&(t=La.SCRIPTSCRIPT),t),"adjustStyle"),Sl=mt((e,t)=>{var r,n,i,a,s=Cl(e.size,t.style),o=s.fracNum(),l=s.fracDen(),o=t.havingStyle(o),c=yo(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),yo(e.denom,o,t)),u=e.hasBarLine?(n=(a=e.barSize?(n=ts(e.barSize,t),Z.makeLineSpan("frac-line",t,n)):Z.makeLineSpan("frac-line",t)).height,a.height):(a=null,n=0,t.fontMetrics().defaultRuleThickness),l=s.size===La.DISPLAY.size||"display"===e.size?(r=t.fontMetrics().num1,i=0<n?3*u:7*u,t.fontMetrics().denom1):(i=0<n?(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*n)<i&&(r+=i-(r-c.depth-(u+.5*n))),u-.5*n-(h.height-l)<i&&(l+=i-(u-.5*n-(h.height-l))),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:a,shift:-(u-.5*n)},{type:"elem",elem:c,shift:-r}]},t)):((a=r-c.depth-(h.height-l))<i&&(r+=.5*(i-a),l+=.5*(i-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,n=s.size===La.DISPLAY.size?t.fontMetrics().delim1:(s.size===La.SCRIPTSCRIPT.size?t.havingStyle(La.SCRIPT):t).fontMetrics().delim2,i=null==e.leftDelim?mo(t,["mopen"]):ml.customSizedDelim(e.leftDelim,n,!0,t.havingStyle(s),e.mode,["mopen"]),a=e.continued?Z.makeSpan([]):null==e.rightDelim?mo(t,["mclose"]):ml.customSizedDelim(e.rightDelim,n,!0,t.havingStyle(s),e.mode,["mclose"]),Z.makeSpan(["mord"].concat(o.sizingClasses(t)),[i,Z.makeSpan(["mfrac"],[u]),a],t)},"htmlBuilder$4"),_l=mt((e,t)=>{var r=new E.MathNode("mfrac",[Co(e.numer,t),Co(e.denom,t)]),n=(e.hasBarLine?e.barSize&&(n=ts(e.barSize,t),r.setAttribute("linethickness",K(n))):r.setAttribute("linethickness","0px"),Cl(e.size,t.style));return n.size!==t.style.size&&(r=new E.MathNode("mstyle",[r]),t=n.size===La.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",t),r.setAttribute("scriptlevel","0")),null!=e.leftDelim||null!=e.rightDelim?(n=[],null!=e.leftDelim&&((t=new E.MathNode("mo",[new E.TextNode(e.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(t)),n.push(r),null!=e.rightDelim&&((t=new E.MathNode("mo",[new E.TextNode(e.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(t)),wo(n)):r},"mathmlBuilder$3"),l({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:n}=e,i=t[0],t=t[1],a=null,s=null,o="auto";switch(n){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(n){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:i,denom:t,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:Sl,mathmlBuilder:_l}),l({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")}),l({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:e,funcName:r,token:n}=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:n}}}),Al=["display","text","script","scriptscript"],Ll=mt(function(e){var t=null;return 0<e.length?"."===(t=e)?null:e:t},"delimFromValue"),l({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,e=e.parser,n=t[4],i=t[5],a="atom"===(a=no(t[0])).type&&"open"===a.family?Ll(a.text):null,s="atom"===(s=no(t[1])).type&&"close"===s.family?Ll(s.text):null,o=null,l=!!(l=Zi(t[2],"size")).isBlank||0<(o=l.value).number,c="auto";return"ordgroup"===(t=t[3]).type?0<t.body.length&&(r=Zi(t.body[0],"textord"),c=Al[Number(r.text)]):(t=Zi(t,"textord"),c=Al[Number(t.text)]),{type:"genfrac",mode:e.mode,numer:n,denom:i,continued:!1,hasBarLine:l,barSize:o,leftDelim:a,rightDelim:s,size:c}},htmlBuilder:Sl,mathmlBuilder:_l}),l({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:Zi(t[0],"size").value,token:r}}}),l({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:mt((e,t)=>{var e=e.parser,r=t[0],n=va(Zi(t[1],"infix").size),t=t[2],i=0<n.number;return{type:"genfrac",mode:e.mode,numer:r,denom:t,continued:!1,hasBarLine:i,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:Sl,mathmlBuilder:_l}),Nl=mt((e,t)=>{var r,n,i=t.style,i="supsub"===e.type?(r=e.sup?yo(e.sup,t.havingStyle(i.sup()),t):yo(e.sub,t.havingStyle(i.sub()),t),Zi(e.base,"horizBrace")):Zi(e,"horizBrace"),e=yo(i.base,t.havingBaseStyle(La.DISPLAY)),a=Mo.svgSpan(i,t);return(i.isOver?(n=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1]:(n=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",i.isOver?"mover":"munder"],[n],t),n=i.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",i.isOver?"mover":"munder"],[n],t)},"htmlBuilder$3"),m=mt((e,t)=>{var r=Mo.mathMLnode(e.label);return new E.MathNode(e.isOver?"mover":"munder",[Co(e.base,t),r])},"mathmlBuilder$2"),l({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:Nl,mathmlBuilder:m}),l({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=t[1],t=Zi(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:io(r)}:e.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:mt((e,t)=>{var r=ho(e.body,t,!1);return Z.makeAnchor(e.href,[],r,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>((t=(t=Eo(e.body,t))instanceof vo?t:new vo("mrow",[t])).setAttribute("href",e.href),t),"mathmlBuilder")}),l({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=Zi(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:r}))return e.formatUnsupportedCmd("\\url");for(var n=[],i=0;i<r.length;i++){var a=r[i];n.push({type:"textord",mode:"text",text:"~"===a?"\\textasciitilde":a})}return t={type:"text",mode:e.mode,font:"\\texttt",body:n},{type:"href",mode:e.mode,href:r,body:io(t)}},"handler")}),l({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:io(t[0])}},htmlBuilder(e,t){return e=ho(e.body,t,!1),Z.makeFragment(e)},mathmlBuilder(e,t){return new E.MathNode("mrow",To(e.body,t))}}),l({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,n=Zi(t[0],"raw").string,t=t[1];e.settings.strict&&e.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,a={};switch(r){case"\\htmlClass":i={command:"\\htmlClass",class:a.class=n};break;case"\\htmlId":i={command:"\\htmlId",id:a.id=n};break;case"\\htmlStyle":i={command:"\\htmlStyle",style:a.style=n};break;case"\\htmlData":for(var s=n.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()}i={command:"\\htmlData",attributes:a};break;default:throw new Error("Unrecognized html command")}return e.settings.isTrusted(i)?{type:"html",mode:e.mode,attributes:a,body:io(t)}:e.formatUnsupportedCmd(r)},"handler"),htmlBuilder:mt((e,t)=>{var r,n=ho(e.body,t,!1),i=["enclosing"],a=(e.attributes.class&&i.push(...e.attributes.class.trim().split(/\s+/)),Z.makeSpan(i,n,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)=>Eo(e.body,t),"mathmlBuilder")}),l({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:mt((e,t)=>({type:"htmlmathml",mode:(e=e.parser).mode,html:io(t[0]),mathml:io(t[1])}),"handler"),htmlBuilder:mt((e,t)=>(e=ho(e.html,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>Eo(e.mathml,t),"mathmlBuilder")}),Il=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]},es(e))return e;throw new X("Invalid unit: '"+e.unit+"' in \\includegraphics.")},"sizeData"),l({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:mt((e,t,r)=>{var e=e.parser,n={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Zi(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":n=Il(h);break;case"height":i=Il(h);break;case"totalheight":a=Il(h);break;default:throw new X("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}return r=Zi(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:n,height:i,totalheight:a,src:r}:e.formatUnsupportedCmd("\\includegraphics")},"handler"),htmlBuilder:mt((e,t)=>{var r=ts(e.height,t),n=0,i=(0<e.totalheight.number&&(n=ts(e.totalheight,t)-r),0),t=(0<e.width.number&&(i=ts(e.width,t)),{height:K(r+n)});return 0<i&&(t.width=K(i)),0<n&&(t.verticalAlign=K(-n)),(i=new cs(e.src,e.alt,t)).height=r,i.depth=n,i},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{var r=new E.MathNode("mglyph",[]),n=(r.setAttribute("alt",e.alt),ts(e.height,t)),i=0;return 0<e.totalheight.number&&(i=ts(e.totalheight,t)-n,r.setAttribute("valign",K(-i))),r.setAttribute("height",K(n+i)),0<e.width.number&&(n=ts(e.width,t),r.setAttribute("width",K(n))),r.setAttribute("src",e.src),r},"mathmlBuilder")}),l({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var r,n,{parser:e,funcName:i}=e,t=Zi(t[0],"size");return e.settings.strict&&(r="m"===i[1],n="mu"===t.value.unit,r?(n||e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" supports only mu units, not "+t.value.unit+" units"),"math"!==e.mode&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" works only in math mode")):n&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" 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=ts(e.dimension,t),new E.SpaceNode(e)}}),l({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([],[yo(e.body,t)]),Z.makeSpan(["inner"],[r],t)):Z.makeSpan(["inner"],[yo(e.body,t)]),n=Z.makeSpan(["fix"],[]),e=Z.makeSpan([e.alignment],[r,n],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 E.MathNode("mpadded",[Co(e.body,t)]),"rlap"!==e.alignment&&(e="llap"===e.alignment?"-1":"-0.5",t.setAttribute("lspace",e+"width")),t.setAttribute("width","0px"),t),"mathmlBuilder")}),l({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:r}=e,n=r.mode,e=(r.switchMode("math"),"\\("===e?"\\)":"$"),i=r.parseExpression(!1,e);return r.expect(e),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:i}}}),l({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new X("Mismatched "+e.funcName)}}),Rl=mt((e,t)=>{switch(t.style.size){case La.DISPLAY.size:return e.display;case La.TEXT.size:return e.text;case La.SCRIPT.size:return e.script;case La.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},"chooseMathStyle"),l({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:mt((e,t)=>({type:"mathchoice",mode:(e=e.parser).mode,display:io(t[0]),text:io(t[1]),script:io(t[2]),scriptscript:io(t[3])}),"handler"),htmlBuilder:mt((e,t)=>(e=Rl(e,t),e=ho(e,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=Rl(e,t),Eo(e,t)),"mathmlBuilder")}),Ml=mt((e,t,r,n,i,a,s)=>{e=Z.makeSpan([],[e]);var o,l,c=r&&xa.isCharacterBox(r);if(t&&(o={elem:t=yo(t,n.havingStyle(i.sup()),n),kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-t.depth)}),r&&(l={elem:t=yo(r,n.havingStyle(i.sub()),n),kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-t.height)}),o&&l)var r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s,h=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:n.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:n.fontMetrics().bigOpSpacing5}]},n);else if(l)i=e.height-s,h=Z.makeVList({positionType:"top",positionData:i,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n);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:n.fontMetrics().bigOpSpacing5}]},n)}return r=[h],l&&0!==a&&!c&&((i=Z.makeSpan(["mspace"],[],n)).style.marginRight=K(a),r.unshift(i)),Z.makeSpan(["mop","op-limits"],r,n)},"assembleSupSub"),Dl=["\\smallint"],Ol=mt((e,t)=>{var r,n,i,a=!1,s=("supsub"===e.type?(r=e.sup,n=e.sub,i=Zi(e.base,"op"),a=!0):i=Zi(e,"op"),!1);if((e=t.style).size===La.DISPLAY.size&&i.symbol&&!xa.contains(Dl,i.name)&&(s=!0),i.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==i.name&&"\\oiiint"!==i.name||(c=i.name.slice(1),i.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(i.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),i.name="\\"+c,l.classes.unshift("mop"),l.italic=o)}else if(i.body){var h=ho(i.body,t,!0);1===h.length&&h[0]instanceof us?(l=h[0]).classes[0]="mop":l=Z.makeSpan(["mop"],h,t)}else{for(var u=[],d=1;d<i.name.length;d++)u.push(Z.mathsym(i.name[d],i.mode,t));l=Z.makeSpan(["mop"],u,t)}return c=s=0,(l instanceof us||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(s=(l.height-l.depth)/2-t.fontMetrics().axisHeight,c=l.italic),a?Ml(l,r,n,t,e,c,s):(s&&(l.style.position="relative",l.style.top=K(s)),l)},"htmlBuilder$2"),Pl=mt((e,t)=>{var r;return e.symbol?(r=new vo("mo",[bo(e.name,e.mode)]),xa.contains(Dl,e.name)&&r.setAttribute("largeop","false")):r=e.body?new vo("mo",To(e.body,t)):(r=new vo("mi",[new xo(e.name.slice(1))]),t=new vo("mo",[bo("","text")]),e.parentIsSupSub?new vo("mrow",[r,t]):Vi([r,t])),r},"mathmlBuilder$1"),Bl={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},l({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=Bl[r]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Ol,mathmlBuilder:Pl}),l({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:io(t)}),"handler"),htmlBuilder:Ol,mathmlBuilder:Pl}),$l={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"},l({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:Ol,mathmlBuilder:Pl}),l({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:Ol,mathmlBuilder:Pl}),l({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=$l[t]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:t}},htmlBuilder:Ol,mathmlBuilder:Pl}),Fl=mt((e,t)=>{var r,n,i,a,s=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,i=Zi(e.base,"operatorname"),s=!0):i=Zi(e,"operatorname"),0<i.body.length){for(var e=i.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),o=ho(e,t.withFont("mathrm"),!0),l=0;l<o.length;l++){var c=o[l];c instanceof us&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=Z.makeSpan(["mop"],o,t)}else a=Z.makeSpan(["mop"],[],t);return s?Ml(a,r,n,t,t.style,0,0):a},"htmlBuilder$1"),zl=mt((e,t)=>{for(var r=To(e.body,t.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof E.SpaceNode))if(a instanceof E.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 E.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}n&&(t=r.map(e=>e.toText()).join(""),r=[new E.TextNode(t)]),(t=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new E.MathNode("mo",[bo("","text")]);return e.parentIsSupSub?new E.MathNode("mrow",[t,o]):E.newDocumentFragment([t,o])},"mathmlBuilder"),l({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:io(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Fl,mathmlBuilder:zl}),h("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Wi({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Z.makeFragment(ho(e.body,t,!1)):Z.makeSpan(["mord"],ho(e.body,t,!0),t)},mathmlBuilder(e,t){return Eo(e.body,t,!0)}}),l({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=yo(e.body,t.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,e=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},t);return Z.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new E.MathNode("mover",[Co(e.body,t),r])).setAttribute("accent","true"),e}}),l({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:io(t)}),"handler"),htmlBuilder:mt((e,t)=>(e=ho(e.body,t.withPhantom(),!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=To(e.body,t),new E.MathNode("mphantom",e)),"mathmlBuilder")}),l({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([],[yo(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].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=To(io(e.body),t),t=new E.MathNode("mphantom",e),(e=new E.MathNode("mpadded",[t])).setAttribute("height","0px"),e.setAttribute("depth","0px"),e),"mathmlBuilder")}),l({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"],[yo(e.body,t.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[e,r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=To(io(e.body),t),t=new E.MathNode("mphantom",e),(e=new E.MathNode("mpadded",[t])).setAttribute("width","0px"),e),"mathmlBuilder")}),l({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e.parser,r=Zi(t[0],"size").value;return{type:"raisebox",mode:e.mode,dy:r,body:t[1]}},htmlBuilder(e,t){var r=yo(e.body,t),e=ts(e.dy,t);return Z.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return t=new E.MathNode("mpadded",[Co(e.body,t)]),e=e.dy.number+e.dy.unit,t.setAttribute("voffset",e),t}}),l({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){return{type:"internal",mode:(e=e.parser).mode}}}),l({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],n=Zi(t[0],"size"),t=Zi(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&Zi(r,"size").value,width:n.value,height:t.value}},htmlBuilder(e,t){var r=Z.makeSpan(["mord","rule"],[],t),n=ts(e.width,t),i=ts(e.height,t),e=e.shift?ts(e.shift,t):0;return r.style.borderRightWidth=K(n),r.style.borderTopWidth=K(i),r.style.bottom=K(e),r.width=n,r.height=i+e,r.depth=-e,r.maxFontSize=1.125*i*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=ts(e.width,t),n=ts(e.height,t),e=e.shift?ts(e.shift,t):0,t=t.color&&t.getColor()||"black",i=new E.MathNode("mspace"),t=(i.setAttribute("mathbackground",t),i.setAttribute("width",K(r)),i.setAttribute("height",K(n)),new E.MathNode("mpadded",[i]));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(ua,"sizingGroup"),Gl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Ul=mt((e,t)=>{var r=t.havingSize(e.size);return ua(e.body,r,t)},"htmlBuilder"),l({type:"sizing",names:Gl,props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!1,e);return{type:"sizing",mode:n.mode,size:Gl.indexOf(r)+1,body:e}},"handler"),htmlBuilder:Ul,mathmlBuilder:mt((e,t)=>(t=t.havingSize(e.size),e=To(e.body,t),(e=new E.MathNode("mstyle",e)).setAttribute("mathsize",K(t.sizeMultiplier)),e),"mathmlBuilder")}),l({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:mt((e,t,r)=>{var e=e.parser,n=!1,i=!1,a=r[0]&&Zi(r[0],"ordgroup");if(a)for(var s,o=0;o<a.body.length;++o)if("t"===(s=a.body[o].text))n=!0;else{if("b"!==s){i=n=!1;break}i=!0}else i=n=!0;return r=t[0],{type:"smash",mode:e.mode,body:r,smashHeight:n,smashDepth:i}},"handler"),htmlBuilder:mt((e,t)=>{var r=Z.makeSpan([],[yo(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].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 E.MathNode("mpadded",[Co(e.body,t)]),e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t),"mathmlBuilder")}),l({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=yo(e.body,t.havingCrampedStyle())).height&&(r.height=t.fontMetrics().xHeight);var r=Z.wrapFragment(r,t),n=i=t.fontMetrics().defaultRuleThickness,n=i+(t.style.id<La.TEXT.id?t.fontMetrics().xHeight:n)/4,i=r.height+r.depth+n+i,{span:i,ruleWidth:a,advanceWidth:s}=ml.sqrtImage(i,t),o=((o=i.height-a)>r.height+r.depth+n&&(n=(n+o-r.height-r.depth)/2),i.height-r.height-n-a),n=(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:i},{type:"kern",size:a}]},t));return e.index?(s=t.havingStyle(La.SCRIPTSCRIPT),r=yo(e.index,s,t),o=.6*(n.height-n.depth),i=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},t),a=Z.makeSpan(["root"],[i]),Z.makeSpan(["mord","sqrt"],[a,n],t)):Z.makeSpan(["mord","sqrt"],[n],t)},mathmlBuilder(e,t){var{body:e,index:r}=e;return r?new E.MathNode("mroot",[Co(e,t),Co(r,t)]):new E.MathNode("msqrt",[Co(e,t)])}}),ql={display:La.DISPLAY,text:La.TEXT,script:La.SCRIPT,scriptscript:La.SCRIPTSCRIPT},l({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!0,e),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:e}},htmlBuilder(e,t){var r=ql[e.style],r=t.havingStyle(r).withFont("");return ua(e.body,r,t)},mathmlBuilder(e,t){var r=ql[e.style],t=t.havingStyle(r),r=To(e.body,t),t=new E.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}}),jl=mt(function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===La.DISPLAY.size||r.alwaysHandleSupSub)?Ol:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===La.DISPLAY.size||r.limits)?Fl:null:"accent"===r.type?xa.isCharacterBox(r.base)?Do:null:"horizBrace"===r.type&&!e.sub===r.isOver?Nl:null:null},"htmlBuilderDelegate"),Wi({type:"supsub",htmlBuilder(e,t){if(a=jl(e,t))return a(e,t);var r,n,i,{base:a,sup:s,sub:o}=e,l=yo(a,t),c=t.fontMetrics(),h=0,u=0,a=a&&xa.isCharacterBox(a),o=(s&&(i=t.havingStyle(t.style.sup()),r=yo(s,i,t),a||(h=l.height-i.fontMetrics().supDrop*i.sizeMultiplier/t.sizeMultiplier)),o&&(s=t.havingStyle(t.style.sub()),n=yo(o,s,t),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/t.sizeMultiplier)),i=t.style===La.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2,t.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(n&&(o=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name),l instanceof us||o)&&(s=K(-l.italic)),r&&n){h=Math.max(h,i,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),e=4*c.defaultRuleThickness,h-r.depth-(n.height-u)<e&&(u=e-(h-r.depth)+n.height,0<(o=.8*c.xHeight-(h-r.depth)))&&(h+=o,u-=o);var d=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:u,marginRight:a,marginLeft:s},{type:"elem",elem:r,shift:-h,marginRight:a}]},t)}else if(n)u=Math.max(u,c.sub1,n.height-.8*c.xHeight),d=Z.makeVList({positionType:"shift",positionData:u,children:[{type:"elem",elem:n,marginLeft:s,marginRight:a}]},t);else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,i,r.depth+.25*c.xHeight),d=Z.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:a}]},t)}return e=fo(l,"right")||"mord",Z.makeSpan([e],[l,Z.makeSpan(["msupsub"],[d])],t)},mathmlBuilder(e,t){var r,n=!1,i=(e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0),[Co(e.base,t)]);return e.sub&&i.push(Co(e.sub,t)),e.sup&&i.push(Co(e.sup,t)),r=n?r?"mover":"munder":e.sub?e.sup?(n=e.base)&&"op"===n.type&&n.limits&&t.style===La.DISPLAY||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(t.style===La.DISPLAY||n.limits)?"munderover":"msubsup":(r=e.base)&&"op"===r.type&&r.limits&&(t.style===La.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===La.DISPLAY)?"munder":"msub":(n=e.base)&&"op"===n.type&&n.limits&&(t.style===La.DISPLAY||n.alwaysHandleSupSub)||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(n.limits||t.style===La.DISPLAY)?"mover":"msup",new E.MathNode(r,i)}}),Wi({type:"atom",htmlBuilder(e,t){return Z.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new E.MathNode("mo",[bo(e.text,e.mode)]);return"bin"===e.family?"bold-italic"===(t=ko(e,t))&&r.setAttribute("mathvariant",t):"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false"),r}}),Wl={mi:"italic",mn:"normal",mtext:"normal"},Wi({type:"mathord",htmlBuilder(e,t){return Z.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new E.MathNode("mi",[bo(e.text,e.mode,t)]);return(e=ko(e,t)||"italic")!==Wl[r.type]&&r.setAttribute("mathvariant",e),r}}),Wi({type:"textord",htmlBuilder(e,t){return Z.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=bo(e.text,e.mode,t),t=ko(e,t)||"normal",e="text"===e.mode?new E.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new E.MathNode("mn",[r]):"\\prime"===e.text?new E.MathNode("mo",[r]):new E.MathNode("mi",[r]);return t!==Wl[e.type]&&e.setAttribute("mathvariant",t),e}}),Yl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Hl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},Wi({type:"spacing",htmlBuilder(e,t){var r,n;if(Hl.hasOwnProperty(e.text))return r=Hl[e.text].className||"","text"===e.mode?((n=Z.makeOrd(e,t,"textord")).classes.push(r),n):Z.makeSpan(["mspace",r],[Z.mathsym(e.text,e.mode,t)],t);if(Yl.hasOwnProperty(e.text))return Z.makeSpan(["mspace",Yl[e.text]],[],t);throw new X('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(Hl.hasOwnProperty(e.text))return new E.MathNode("mtext",[new E.TextNode(" ")]);if(Yl.hasOwnProperty(e.text))return new E.MathNode("mspace");throw new X('Unknown type of space "'+e.text+'"')}}),Vl=mt(()=>{var e=new E.MathNode("mtd",[]);return e.setAttribute("width","50%"),e},"pad"),Wi({type:"tag",mathmlBuilder(e,t){return(e=new E.MathNode("mtable",[new E.MathNode("mtr",[Vl(),new E.MathNode("mtd",[Eo(e.body,t)]),Vl(),new E.MathNode("mtd",[Eo(e.tag,t)])])])).setAttribute("width","100%"),e}}),Xl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Kl={"\\textbf":"textbf","\\textmd":"textmd"},Zl={"\\textit":"textit","\\textup":"textup"},Ql=mt((e,t)=>(e=e.font)?Xl[e]?t.withTextFontFamily(Xl[e]):Kl[e]?t.withTextFontWeight(Kl[e]):"\\emph"===e?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Zl[e]):t,"optionsWithFont"),l({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:io(t),font:r}},htmlBuilder(e,t){return t=Ql(e,t),e=ho(e.body,t,!0),Z.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=Ql(e,t),Eo(e.body,t)}}),l({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=yo(e.body,t),r=Z.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:e}]},t);return Z.makeSpan(["mord","underline"],[r],t)},mathmlBuilder(e,t){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new E.MathNode("munder",[Co(e.body,t),r])).setAttribute("accentunder","true"),e}}),l({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=yo(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 E.MathNode("mpadded",[Co(e.body,t)],["vcenter"])}}),l({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=Jl(e),n=[],i=t.havingStyle(t.style.text()),a=0;a<r.length;a++){var s=r[a];"~"===s&&(s="\\textasciitilde"),n.push(Z.makeSymbol(s,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return Z.makeSpan(["mord","text"].concat(i.sizingClasses(t)),Z.tryCombineChars(n),i)},mathmlBuilder(e,t){return e=new E.TextNode(Jl(e)),(e=new E.MathNode("mtext",[e])).setAttribute("mathvariant","monospace"),e}}),Jl=mt(e=>e.body.replace(/ /g,e.star?"␣":" "),"makeVerb"),ec=eo,tc=new RegExp("[̀-ͯ]+$"),rc=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 pa("EOF",new da(this,t,t));if(null===(n=this.tokenRegex.exec(e))||n.index!==t)throw new X("Unexpected character: '"+e[t]+"'",new pa(e[t],new da(this,t,t+1)));var r,n=n[6]||n[3]||(n[2]?"\\ ":" ");return 14===this.catcodes[n]?(-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 pa(n,new da(this,t,this.tokenRegex.lastIndex))}},nc=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 n=0;n<this.undefStack.length;n++)delete this.undefStack[n][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}},ic=bl,h("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),h("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),h("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),h("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),h("\\@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}}),h("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),h("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}),ac={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},h("\\char",function(e){var t,r,n=e.popToken(),i="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])i=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new X("\\char` missing argument");i=n.text.charCodeAt(0)}else t=10;if(t){if(null==(i=ac[n.text])||t<=i)throw new X("Invalid base-"+t+" digit "+n.text);for(;null!=(r=ac[e.future().text])&&r<t;)i=i*t+r,e.popToken()}return"\\@char{"+i+"}"}),sc=mt((e,t,r,n)=>{var i=e.consumeArg().tokens;if(1!==i.length)throw new X("\\newcommand's first argument must be a macro name");var a=i[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===(i=e.consumeArg().tokens).length&&"["===i[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),i=e.consumeArg().tokens}return s&&n||e.macros.set(a,{tokens:i,numArgs:t}),""},"newcommand"),h("\\newcommand",e=>sc(e,!1,!0,!1)),h("\\renewcommand",e=>sc(e,!0,!1,!1)),h("\\providecommand",e=>sc(e,!0,!0,!0)),h("\\message",e=>(e=e.consumeArgs(1)[0],console.log(e.reverse().map(e=>e.text).join("")),"")),h("\\errmessage",e=>(e=e.consumeArgs(1)[0],console.error(e.reverse().map(e=>e.text).join("")),"")),h("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),ec[r],ys.math[r],ys.text[r]),""}),h("\\bgroup","{"),h("\\egroup","}"),h("~","\\nobreakspace"),h("\\lq","`"),h("\\rq","'"),h("\\aa","\\r a"),h("\\AA","\\r A"),h("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),h("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),h("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),h("ℬ","\\mathscr{B}"),h("ℰ","\\mathscr{E}"),h("ℱ","\\mathscr{F}"),h("ℋ","\\mathscr{H}"),h("ℐ","\\mathscr{I}"),h("ℒ","\\mathscr{L}"),h("ℳ","\\mathscr{M}"),h("ℛ","\\mathscr{R}"),h("ℭ","\\mathfrak{C}"),h("ℌ","\\mathfrak{H}"),h("ℨ","\\mathfrak{Z}"),h("\\Bbbk","\\Bbb{k}"),h("·","\\cdotp"),h("\\llap","\\mathllap{\\textrm{#1}}"),h("\\rlap","\\mathrlap{\\textrm{#1}}"),h("\\clap","\\mathclap{\\textrm{#1}}"),h("\\mathstrut","\\vphantom{(}"),h("\\underbar","\\underline{\\text{#1}}"),h("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),h("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),h("\\ne","\\neq"),h("≠","\\neq"),h("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),h("∉","\\notin"),h("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),h("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),h("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),h("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),h("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),h("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),h("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),h("⟂","\\perp"),h("‼","\\mathclose{!\\mkern-0.8mu!}"),h("∌","\\notni"),h("⌜","\\ulcorner"),h("⌝","\\urcorner"),h("⌞","\\llcorner"),h("⌟","\\lrcorner"),h("©","\\copyright"),h("®","\\textregistered"),h("️","\\textregistered"),h("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),h("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),h("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),h("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),h("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),h("⋮","\\vdots"),h("\\varGamma","\\mathit{\\Gamma}"),h("\\varDelta","\\mathit{\\Delta}"),h("\\varTheta","\\mathit{\\Theta}"),h("\\varLambda","\\mathit{\\Lambda}"),h("\\varXi","\\mathit{\\Xi}"),h("\\varPi","\\mathit{\\Pi}"),h("\\varSigma","\\mathit{\\Sigma}"),h("\\varUpsilon","\\mathit{\\Upsilon}"),h("\\varPhi","\\mathit{\\Phi}"),h("\\varPsi","\\mathit{\\Psi}"),h("\\varOmega","\\mathit{\\Omega}"),h("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),h("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),h("\\boxed","\\fbox{$\\displaystyle{#1}$}"),h("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),h("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),h("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),h("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),h("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}"),oc={",":"\\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"},h("\\dots",function(e){var t="\\dotso";return(e=e.expandAfterFuture().text)in oc?t=oc[e]:("\\not"===e.slice(0,4)||e in ys.math&&xa.contains(["bin","rel"],ys.math[e].group))&&(t="\\dotsb"),t}),lc={")":!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},h("\\dotso",function(e){return e.future().text in lc?"\\ldots\\,":"\\ldots"}),h("\\dotsc",function(e){return(e=e.future().text)in lc&&","!==e?"\\ldots\\,":"\\ldots"}),h("\\cdots",function(e){return e.future().text in lc?"\\@cdots\\,":"\\@cdots"}),h("\\dotsb","\\cdots"),h("\\dotsm","\\cdots"),h("\\dotsi","\\!\\cdots"),h("\\dotsx","\\ldots\\,"),h("\\DOTSI","\\relax"),h("\\DOTSB","\\relax"),h("\\DOTSX","\\relax"),h("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),h("\\,","\\tmspace+{3mu}{.1667em}"),h("\\thinspace","\\,"),h("\\>","\\mskip{4mu}"),h("\\:","\\tmspace+{4mu}{.2222em}"),h("\\medspace","\\:"),h("\\;","\\tmspace+{5mu}{.2777em}"),h("\\thickspace","\\;"),h("\\!","\\tmspace-{3mu}{.1667em}"),h("\\negthinspace","\\!"),h("\\negmedspace","\\tmspace-{4mu}{.2222em}"),h("\\negthickspace","\\tmspace-{5mu}{.277em}"),h("\\enspace","\\kern.5em "),h("\\enskip","\\hskip.5em\\relax"),h("\\quad","\\hskip1em\\relax"),h("\\qquad","\\hskip2em\\relax"),h("\\tag","\\@ifstar\\tag@literal\\tag@paren"),h("\\tag@paren","\\tag@literal{({#1})}"),h("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new X("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),h("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),h("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),h("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),h("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),h("\\newline","\\\\\\relax"),h("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),h("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(cc=K(ja["Main-Regular"][84][1]-.7*ja["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),h("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+cc+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),h("\\hspace","\\@ifstar\\@hspacer\\@hspace"),h("\\@hspace","\\hskip #1\\relax"),h("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),h("\\ordinarycolon",":"),h("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),h("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),h("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),h("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),h("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),h("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),h("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),h("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),h("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),h("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),h("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),h("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),h("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),h("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),h("∷","\\dblcolon"),h("∹","\\eqcolon"),h("≔","\\coloneqq"),h("≕","\\eqqcolon"),h("⩴","\\Coloneqq"),h("\\ratio","\\vcentcolon"),h("\\coloncolon","\\dblcolon"),h("\\colonequals","\\coloneqq"),h("\\coloncolonequals","\\Coloneqq"),h("\\equalscolon","\\eqqcolon"),h("\\equalscoloncolon","\\Eqqcolon"),h("\\colonminus","\\coloneq"),h("\\coloncolonminus","\\Coloneq"),h("\\minuscolon","\\eqcolon"),h("\\minuscoloncolon","\\Eqcolon"),h("\\coloncolonapprox","\\Colonapprox"),h("\\coloncolonsim","\\Colonsim"),h("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),h("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),h("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),h("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),h("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),h("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),h("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),h("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),h("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),h("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),h("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),h("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),h("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),h("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),h("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),h("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),h("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),h("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),h("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),h("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),h("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),h("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),h("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),h("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),h("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),h("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),h("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),h("\\imath","\\html@mathml{\\@imath}{ı}"),h("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),h("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),h("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),h("⟦","\\llbracket"),h("⟧","\\rrbracket"),h("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),h("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),h("⦃","\\lBrace"),h("⦄","\\rBrace"),h("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),h("⦵","\\minuso"),h("\\darr","\\downarrow"),h("\\dArr","\\Downarrow"),h("\\Darr","\\Downarrow"),h("\\lang","\\langle"),h("\\rang","\\rangle"),h("\\uarr","\\uparrow"),h("\\uArr","\\Uparrow"),h("\\Uarr","\\Uparrow"),h("\\N","\\mathbb{N}"),h("\\R","\\mathbb{R}"),h("\\Z","\\mathbb{Z}"),h("\\alef","\\aleph"),h("\\alefsym","\\aleph"),h("\\Alpha","\\mathrm{A}"),h("\\Beta","\\mathrm{B}"),h("\\bull","\\bullet"),h("\\Chi","\\mathrm{X}"),h("\\clubs","\\clubsuit"),h("\\cnums","\\mathbb{C}"),h("\\Complex","\\mathbb{C}"),h("\\Dagger","\\ddagger"),h("\\diamonds","\\diamondsuit"),h("\\empty","\\emptyset"),h("\\Epsilon","\\mathrm{E}"),h("\\Eta","\\mathrm{H}"),h("\\exist","\\exists"),h("\\harr","\\leftrightarrow"),h("\\hArr","\\Leftrightarrow"),h("\\Harr","\\Leftrightarrow"),h("\\hearts","\\heartsuit"),h("\\image","\\Im"),h("\\infin","\\infty"),h("\\Iota","\\mathrm{I}"),h("\\isin","\\in"),h("\\Kappa","\\mathrm{K}"),h("\\larr","\\leftarrow"),h("\\lArr","\\Leftarrow"),h("\\Larr","\\Leftarrow"),h("\\lrarr","\\leftrightarrow"),h("\\lrArr","\\Leftrightarrow"),h("\\Lrarr","\\Leftrightarrow"),h("\\Mu","\\mathrm{M}"),h("\\natnums","\\mathbb{N}"),h("\\Nu","\\mathrm{N}"),h("\\Omicron","\\mathrm{O}"),h("\\plusmn","\\pm"),h("\\rarr","\\rightarrow"),h("\\rArr","\\Rightarrow"),h("\\Rarr","\\Rightarrow"),h("\\real","\\Re"),h("\\reals","\\mathbb{R}"),h("\\Reals","\\mathbb{R}"),h("\\Rho","\\mathrm{P}"),h("\\sdot","\\cdot"),h("\\sect","\\S"),h("\\spades","\\spadesuit"),h("\\sub","\\subset"),h("\\sube","\\subseteq"),h("\\supe","\\supseteq"),h("\\Tau","\\mathrm{T}"),h("\\thetasym","\\vartheta"),h("\\weierp","\\wp"),h("\\Zeta","\\mathrm{Z}"),h("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),h("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),h("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),h("\\bra","\\mathinner{\\langle{#1}|}"),h("\\ket","\\mathinner{|{#1}\\rangle}"),h("\\braket","\\mathinner{\\langle{#1}\\rangle}"),h("\\Bra","\\left\\langle#1\\right|"),h("\\Ket","\\left|#1\\right\\rangle"),h("\\bra@ket",(hc=mt(l=>e=>{var t=e.consumeArg().tokens,n=e.consumeArg().tokens,i=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),i.length)&&e.macros.set("\\|",s);var t=r;return!r&&i.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?i:n,numArgs:0}},"midMacro")),o=(e.macros.set("|",o(!1)),i.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)),h("\\bra@set",hc(!0)),h("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),h("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),h("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),h("\\angln","{\\angl n}"),h("\\blue","\\textcolor{##6495ed}{#1}"),h("\\orange","\\textcolor{##ffa500}{#1}"),h("\\pink","\\textcolor{##ff00af}{#1}"),h("\\red","\\textcolor{##df0030}{#1}"),h("\\green","\\textcolor{##28ae7b}{#1}"),h("\\gray","\\textcolor{gray}{#1}"),h("\\purple","\\textcolor{##9d38bd}{#1}"),h("\\blueA","\\textcolor{##ccfaff}{#1}"),h("\\blueB","\\textcolor{##80f6ff}{#1}"),h("\\blueC","\\textcolor{##63d9ea}{#1}"),h("\\blueD","\\textcolor{##11accd}{#1}"),h("\\blueE","\\textcolor{##0c7f99}{#1}"),h("\\tealA","\\textcolor{##94fff5}{#1}"),h("\\tealB","\\textcolor{##26edd5}{#1}"),h("\\tealC","\\textcolor{##01d1c1}{#1}"),h("\\tealD","\\textcolor{##01a995}{#1}"),h("\\tealE","\\textcolor{##208170}{#1}"),h("\\greenA","\\textcolor{##b6ffb0}{#1}"),h("\\greenB","\\textcolor{##8af281}{#1}"),h("\\greenC","\\textcolor{##74cf70}{#1}"),h("\\greenD","\\textcolor{##1fab54}{#1}"),h("\\greenE","\\textcolor{##0d923f}{#1}"),h("\\goldA","\\textcolor{##ffd0a9}{#1}"),h("\\goldB","\\textcolor{##ffbb71}{#1}"),h("\\goldC","\\textcolor{##ff9c39}{#1}"),h("\\goldD","\\textcolor{##e07d10}{#1}"),h("\\goldE","\\textcolor{##a75a05}{#1}"),h("\\redA","\\textcolor{##fca9a9}{#1}"),h("\\redB","\\textcolor{##ff8482}{#1}"),h("\\redC","\\textcolor{##f9685d}{#1}"),h("\\redD","\\textcolor{##e84d39}{#1}"),h("\\redE","\\textcolor{##bc2612}{#1}"),h("\\maroonA","\\textcolor{##ffbde0}{#1}"),h("\\maroonB","\\textcolor{##ff92c6}{#1}"),h("\\maroonC","\\textcolor{##ed5fa6}{#1}"),h("\\maroonD","\\textcolor{##ca337c}{#1}"),h("\\maroonE","\\textcolor{##9e034e}{#1}"),h("\\purpleA","\\textcolor{##ddd7ff}{#1}"),h("\\purpleB","\\textcolor{##c6b9fc}{#1}"),h("\\purpleC","\\textcolor{##aa87ff}{#1}"),h("\\purpleD","\\textcolor{##7854ab}{#1}"),h("\\purpleE","\\textcolor{##543b78}{#1}"),h("\\mintA","\\textcolor{##f5f9e8}{#1}"),h("\\mintB","\\textcolor{##edf2df}{#1}"),h("\\mintC","\\textcolor{##e0e5cc}{#1}"),h("\\grayA","\\textcolor{##f6f7f7}{#1}"),h("\\grayB","\\textcolor{##f0f1f2}{#1}"),h("\\grayC","\\textcolor{##e3e5e6}{#1}"),h("\\grayD","\\textcolor{##d6d8da}{#1}"),h("\\grayE","\\textcolor{##babec2}{#1}"),h("\\grayF","\\textcolor{##888d93}{#1}"),h("\\grayG","\\textcolor{##626569}{#1}"),h("\\grayH","\\textcolor{##3b3e40}{#1}"),h("\\grayI","\\textcolor{##21242c}{#1}"),h("\\kaBlue","\\textcolor{##314453}{#1}"),h("\\kaGreen","\\textcolor{##71B307}{#1}"),uc={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},dc=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 nc(ic,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new rc(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,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new pa("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t,r=[],n=e&&0<e.length,i=(n||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&&n?e[s]:"}")+"'",t);if(e&&n)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||n);return"{"===i.text&&"}"===r[r.length-1].text&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,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],n=0;n<r.length;n++){var i=this.popToken();if(r[n]!==i.text)throw new X("Use of the macro doesn't match its definition",i)}}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,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=n.tokens,a=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;0<=s;--s){var o=i[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);i.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(i),i.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 pa(e)]):void 0}expandTokens(e){var t,r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)!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 n=e.replace(/##/g,"");-1!==n.indexOf("#"+(r+1));)++r;for(var i=new rc(e,this.settings),a=[],s=i.lex();"EOF"!==s.text;)a.push(s),s=i.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(e){return this.macros.has(e)||ec.hasOwnProperty(e)||ys.math.hasOwnProperty(e)||ys.text.hasOwnProperty(e)||uc.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:ec.hasOwnProperty(e)&&!ec[e].primitive}},pc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,gc=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),fc={"́":{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"}},mc={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(yc=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 dc(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 pa("}")),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 n=this.fetch();if(-1!==a.endOfExpression.indexOf(n.text)||t&&n.text===t||e&&ec[n.text]&&ec[n.text].infix)break;if(!(n=this.parseAtom(t)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r,n,i=-1,a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==i)throw new X("only one infix operator per group",e[a].token);t=e[i=a].replaceWith}return-1!==i&&t?(r=e.slice(0,i),n=e.slice(i+1),r=1===r.length&&"ordgroup"===r[0].type?r[0]:{type:"ordgroup",mode:this.mode,body:r},n=1===n.length&&"ordgroup"===n[0].type?n[0]:{type:"ordgroup",mode:this.mode,body:n},["\\\\abovefrac"===t?this.callFunction(t,[r,e[i],n],[]):this.callFunction(t,[r,n],[])]):e}handleSupSubscript(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();do{var n=this.parseGroup(e)}while("internal"===(null==n?void 0:n.type));if(n)return n;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 n={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(e){var t,r,n=this.parseGroup("atom",e);if("internal"===n?.type||"text"===this.mode)return n;for(;;){this.consumeSpaces();var i=this.fetch();if("\\limits"===i.text||"\\nolimits"===i.text){if(n&&"op"===n.type){var a="\\limits"===i.text;n.limits=a,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new X("Limit controls must follow a math operator",i);n.alwaysHandleSupSub&&(n.limits="\\limits"===i.text)}this.consume()}else if("^"===i.text){if(t)throw new X("Double superscript",i);t=this.handleSupSubscript("superscript")}else if("_"===i.text){if(r)throw new X("Double subscript",i);r=this.handleSupSubscript("subscript")}else if("'"===i.text){if(t)throw new X("Double superscript",i);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(!gc[i.text])break;var l=pc.test(i.text),c=[];for(c.push(new pa(gc[i.text])),this.consume();;){var h=this.fetch().text;if(!gc[h]||pc.test(h)!==l)break;c.unshift(new pa(gc[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:n,sup:t,sub:r}:n}parseFunction(e,t){var r=this.fetch(),n=r.text;if(!(i=ec[n]))return null;if(this.consume(),t&&"atom"!==t&&!i.allowedInArgument)throw new X("Got function '"+n+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!i.allowedInText)throw new X("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===i.allowedInMath)throw new X("Can't use function '"+n+"' in math mode",r);var{args:t,optArgs:i}=this.parseArguments(n,i);return this.callFunction(n,t,i,r,e)}callFunction(e,t,r,n,i){var a=ec[e];if(a&&a.handler)return a.handler({funcName:e,parser:this,token:n,breakOnTokenText:i},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 n=[],i=[],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==i[0])&&(s="primitive"),this.parseGroupOfType("argument to '"+e+"'",s,o));if(o)i.push(s);else{if(null==s)throw new X("Null argument, please report this as a bug");n.push(s)}}return{args:n,optArgs:i}}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 n=this.parseArgumentGroup(r,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text"}:null;case"raw":return null!=(n=this.parseStringGroup("raw",r))?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(r)throw new X("A primitive argument cannot be optional");if(null==(n=this.parseGroup(e)))throw new X("Expected group as "+e,this.fetch());return n;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,n="";"EOF"!==(r=this.fetch()).text;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){for(var r,n=this.fetch(),i=n,a="";"EOF"!==(r=this.fetch()).text&&e.test(a+r.text);)a+=(i=r).text,this.consume();if(""===a)throw new X("Invalid "+t+": '"+n.text+"'",n);return n.range(i,a)}parseColorGroup(e){if(null==(e=this.parseStringGroup("color",e)))return null;var t=/^(#[a-f0-9]{3}|#?[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]},es(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,n;return null==(e=this.gullet.scanArgument(e))?null:(r=this.mode,t&&this.switchMode(t),this.gullet.beginGroup(),n=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),e={type:"ordgroup",mode:this.mode,loc:e.loc,body:n},t&&this.switchMode(r),e)}parseGroup(e,t){var r=this.fetch(),n=r.text;if("{"===n||"\\begingroup"===n){this.consume();var i="{"===n?"}":"\\endgroup",a=(this.gullet.beginGroup(),this.parseExpression(!1,i)),s=this.fetch();this.expect(i),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:da.range(r,s),body:a,semisimple:"\\begingroup"===n||void 0}}else if(null==(i=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===n[0]&&!uc.hasOwnProperty(n)){if(this.settings.throwOnError)throw new X("Undefined control sequence: "+n,r);i=this.formatUnsupportedCmd(n),this.consume()}return i}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],i=n.text;"-"===i&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:da.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:da.range(n,e[r+1]),text:"--"}),--t)),"'"!==i&&"`"!==i||e[r+1].text!==i||(e.splice(r,2,{type:"textord",mode:"text",loc:da.range(n,e[r+1]),text:i+i}),--t)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){if(this.consume(),(n=(i="*"===(n=t.slice(5)).charAt(0))?n.slice(1):n).length<2||n.charAt(0)!==n.slice(-1))throw new X(`\\verb assertion failed --
|
||
please report what input caused this bug`);return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:i}}mc.hasOwnProperty(t[0])&&!ys[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=mc[t[0]]+t.slice(1));var r=tc.exec(t);if(r&&("i"===(t=t.substring(0,r.index))?t="ı":"j"===t&&(t="ȷ")),ys[this.mode][t]){this.settings.strict&&"math"===this.mode&&0<=Ds.indexOf(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var n=ys[this.mode][t].group,i=da.range(e),a=fs.hasOwnProperty(n)?{type:"atom",mode:this.mode,family:n,loc:i,text:t}:{type:n,mode:this.mode,loc:i,text:t}}else{if(!(128<=t.charCodeAt(0)))return null;this.settings.strict&&(Fi(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:da.range(e),text:t}}if(this.consume(),r)for(var s=0;s<r[0].length;s++){var o=r[0][s];if(!fc[o])throw new X("Unknown accent ' "+o+"'",e);var l=fc[o][this.mode]||fc[o].text;if(!l)throw new X("Accent "+o+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:da.range(e),label:l,isStretchy:!1,isShifty:!0,base:a}}return a}}).endOfExpression=["}","\\endgroup","\\end","\\right","&"],vc=mt(function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(e=new yc(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 pa("\\df@tag")])}]}return r},"parseTree"),xc=mt(function(e,t,r){t.textContent="",e=Tc(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."),xc=mt(function(){throw new X("KaTeX doesn't work in quirks mode.")},"render")),bc=mt(function(e,t){return Tc(e,t).toMarkup()},"renderToString"),wc=mt(function(e,t){return t=new wa(t),vc(e,t)},"generateParseTree"),kc=mt(function(e,t,r){if(!r.throwOnError&&e instanceof X)return(t=Z.makeSpan(["katex-error"],[new us(t)])).setAttribute("title",e.toString()),t.setAttribute("style","color:"+r.errorColor),t;throw e},"renderError"),Tc=mt(function(e,t){t=new wa(t);try{var r=vc(e,t);return Ao(r,e,t)}catch(r){return kc(r,e,t)}},"renderToDomTree"),Ec=mt(function(e,t){t=new wa(t);try{var r=vc(e,t);return Lo(r,e,t)}catch(r){return kc(r,e,t)}},"renderToHTMLTree"),_c={version:Cc="0.16.22",render:xc,renderToString:bc,ParseError:X,SETTINGS_SCHEMA:ba,__parse:wc,__renderToDomTree:Tc,__renderToHTMLTree:Ec,__setFontMetrics:zi,__defineSymbol:o,__defineFunction:l,__defineMacro:h,__domTree:Sc={Span:os,Anchor:ls,SymbolNode:us,SvgNode:ds,PathNode:ps,LineNode:gs}}});function Lc(){let t="data-temp-href-target";Mi.addHook("beforeSanitizeAttributes",e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),Mi.addHook("afterSanitizeAttributes",e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target"))&&e.setAttribute("rel","noopener")})}var Nc,Ic,Rc,Mc,Dc,Oc,Pc,Bc,$c,Fc,zc,Gc,Uc,qc,jc,Wc,Yc,Hc,Vc,Xc,Kc,Zc,Qc,Jc,L,eh,th,rh,nh,ih,ah,sh,oh,lh=e(()=>{Di(),Nc=/<br\s*\/?>/gi,Ic=mt(e=>e?zc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Rc=(()=>{let e=!1;return()=>{e||(Lc(),e=!0)}})(),mt(Lc,"setupDompurifyHooks"),Mc=mt(e=>(Rc(),Mi.sanitize(e)),"removeScript"),Dc=mt((e,t)=>(!1!==t.flowchart?.htmlLabels&&("antiscript"===(t=t.securityLevel)||"strict"===t?e=Mc(e):"loose"!==t&&(e=(e=(e=zc(e)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),e=Fc(e))),e),"sanitizeMore"),Oc=mt((e,t)=>e&&(t.dompurifyConfig?Mi.sanitize(Dc(e,t),t.dompurifyConfig):Mi.sanitize(Dc(e,t),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Pc=mt((e,t)=>"string"==typeof e?Oc(e,t):e.flat().map(e=>Oc(e,t)),"sanitizeTextOrArray"),Bc=mt(e=>Nc.test(e),"hasBreaks"),$c=mt(e=>e.split(Nc),"splitBreaks"),Fc=mt(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),zc=mt(e=>e.replace(Nc,"#br#"),"breakToPlaceholder"),Gc=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"),Uc=mt(e=>!(!1===e||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),qc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.max(...e)},"getMax"),jc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.min(...e)},"getMin"),Wc=mt(function(e){var r,n,i=e.split(/(,)/),a=[];for(let t=0;t<i.length;t++){let e=i[t];","===e&&0<t&&t+1<i.length&&(r=i[t-1],n=i[t+1],Hc(r,n))&&(e=r+","+n,t++,a.pop()),a.push(Vc(e))}return a.join("")},"parseGenericTypes"),Yc=mt((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Hc=mt((e,t)=>(e=Yc(e,"~"),t=Yc(t,"~"),1===e&&1===t),"shouldCombineSets"),Vc=mt(e=>{let t=Yc(e,"~"),r=!1;if(t<=1)return e;t%2!=0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let n=[...e],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Xc=mt(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Kc=/\$\$(.*)\$\$/g,Zc=mt(e=>0<(e.match(Kc)?.length??0),"hasKatex"),Qc=mt(async(e,t)=>(e=await Jc(e,t),(t=document.createElement("div")).innerHTML=e,t.id="katex-temp",t.style.visibility="hidden",t.style.position="absolute",t.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",t),e={width:t.clientWidth,height:t.clientHeight},t.remove(),e),"calculateMathMLDimensions"),Jc=mt(async(e,t)=>{if(!Zc(e))return e;if(!(Xc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Kc,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(Ac(),Oi))).default,n=t.forceLegacyMathML||!Xc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Nc).map(e=>Zc(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join("").replace(Kc,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatex"),L={getRows:Ic,sanitizeText:Oc,sanitizeTextOrArray:Pc,hasBreaks:Bc,splitBreaks:$c,lineBreakRegex:Nc,removeScript:Mc,getUrl:Gc,evaluate:Uc,getMax:qc,getMin:jc}}),ch=e(()=>{t(),eh=mt(function(e,t){for(var r of t)e.attr(r[0],r[1])},"d3Attrs"),th=mt(function(e,t,r){var n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),rh=mt(function(e,t,r,n){t=th(t,r,n),eh(e,t)},"configureSvgSize"),nh=mt(function(e,t,r,n){var i=t.node().getBBox(),a=i.width,s=(M.info(`SVG bounds: ${a}x`+(s=i.height),i),M.info("Graph bounds: 0x0",e),M.info(`Calculated bounds: ${e=a+2*r}x`+(a=s+2*r)),rh(t,a,e,n),`${i.x-r} ${i.y-r} ${i.width+2*r} `+(i.height+2*r));t.attr("viewBox",s)},"setupGraphViewbox")}),hh=e(()=>{t(),ih={},ah=mt((e,t,r)=>{let n="";return e in ih&&ih[e]?n=ih[e](r):M.warn("No theme found for "+e),` & {
|
||
font-family: ${r.fontFamily};
|
||
font-size: ${r.fontSize};
|
||
fill: ${r.textColor}
|
||
}
|
||
@keyframes edge-animation-frame {
|
||
from {
|
||
stroke-dashoffset: 0;
|
||
}
|
||
}
|
||
@keyframes dash {
|
||
to {
|
||
stroke-dashoffset: 0;
|
||
}
|
||
}
|
||
& .edge-animation-slow {
|
||
stroke-dasharray: 9,5 !important;
|
||
stroke-dashoffset: 900;
|
||
animation: dash 50s linear infinite;
|
||
stroke-linecap: round;
|
||
}
|
||
& .edge-animation-fast {
|
||
stroke-dasharray: 9,5 !important;
|
||
stroke-dashoffset: 900;
|
||
animation: dash 20s linear infinite;
|
||
stroke-linecap: round;
|
||
}
|
||
/* Classes common for multiple diagrams */
|
||
|
||
& .error-icon {
|
||
fill: ${r.errorBkgColor};
|
||
}
|
||
& .error-text {
|
||
fill: ${r.errorTextColor};
|
||
stroke: ${r.errorTextColor};
|
||
}
|
||
|
||
& .edge-thickness-normal {
|
||
stroke-width: 1px;
|
||
}
|
||
& .edge-thickness-thick {
|
||
stroke-width: 3.5px
|
||
}
|
||
& .edge-pattern-solid {
|
||
stroke-dasharray: 0;
|
||
}
|
||
& .edge-thickness-invisible {
|
||
stroke-width: 0;
|
||
fill: none;
|
||
}
|
||
& .edge-pattern-dashed{
|
||
stroke-dasharray: 3;
|
||
}
|
||
.edge-pattern-dotted {
|
||
stroke-dasharray: 2;
|
||
}
|
||
|
||
& .marker {
|
||
fill: ${r.lineColor};
|
||
stroke: ${r.lineColor};
|
||
}
|
||
& .marker.cross {
|
||
stroke: ${r.lineColor};
|
||
}
|
||
|
||
& svg {
|
||
font-family: ${r.fontFamily};
|
||
font-size: ${r.fontSize};
|
||
}
|
||
& p {
|
||
margin: 0
|
||
}
|
||
|
||
${n}
|
||
|
||
${t}
|
||
`},"getStyles"),sh=mt((e,t)=>{void 0!==t&&(ih[e]=t)},"addStylesForDiagram"),oh=ah}),uh={};$Be(uh,{clear:()=>mh,getAccDescription:()=>bh,getAccTitle:()=>vh,getDiagramTitle:()=>kh,setAccDescription:()=>xh,setAccTitle:()=>yh,setDiagramTitle:()=>wh});var dh,ph,gh,fh,mh,yh,vh,xh,bh,wh,kh,Th,Eh,D,Ch,Sh,_h,Ah,Lh,Nh,Ih,Rh,Mh,Dh,Oh,Ph,Bh,$h,Fh,zh,Gh,Uh,qh,jh,Wh,Yh,Hh,Vh,Xh,Kh,Zh,Qh,Jh,eu,tu,ru,nu,iu,au,su,ou,lu,cu,hu,uu,du,pu,gu,fu,mu,yu,vu,xu,bu,wu,ku,Tu=e(()=>{lh(),Nn(),gh=ph=dh="",fh=mt(e=>Oc(e,Ir()),"sanitizeText"),mh=mt(()=>{ph=gh=dh=""},"clear"),yh=mt(e=>{dh=fh(e).replace(/^\s+/g,"")},"setAccTitle"),vh=mt(()=>dh,"getAccTitle"),xh=mt(e=>{gh=fh(e).replace(/\n\s+/g,`
|
||
`)},"setAccDescription"),bh=mt(()=>gh,"getAccDescription"),wh=mt(e=>{ph=fh(e)},"setDiagramTitle"),kh=mt(()=>ph,"getDiagramTitle")}),Eu=e(()=>{Ur(),t(),Nn(),lh(),ch(),hh(),Tu(),Th=M,Eh=T,D=Ir,Ch=Nr,Sh=br,_h=mt(e=>Oc(e,D()),"sanitizeText"),Ah=nh,Lh=mt(()=>uh,"getCommonDb"),Nh={},Ih=mt((e,t,r)=>{Nh[e]&&Th.warn(`Diagram with id ${e} already registered. Overwriting.`),Nh[e]=t,r&&Je(e,r),sh(e,t.styles),t.injectUtils?.(Th,Eh,D,_h,Ah,Lh(),()=>{})},"registerDiagram"),Rh=mt(e=>{if(e in Nh)return Nh[e];throw new Mh(e)},"getDiagram"),Mh=class extends Error{static{mt(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}}),Cu=e(()=>{Eu(),lh(),Tu(),Dh=[],Oh=[""],$h=[{alias:Ph="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Bh=""}],zh="",Gh=!(Fh=[]),Uh=4,qh=2,Wh=mt(function(){return jh},"getC4Type"),Yh=mt(function(e){jh=Oc(e,D())},"setC4Type"),Hh=mt(function(r,n,i,a,s,o,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let e={},t=Fh.find(e=>e.from===n&&e.to===i);t?e=t:Fh.push(e),e.type=r,e.from=n,e.to=i,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=mu()}},"addRel"),Vh=mt(function(r,n,i,a,s,o,l){if(null!==n&&null!==i){let e={},t=Dh.find(e=>e.alias===n);var c;t&&n===t.alias?e=t:(e.alias=n,Dh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.descr={text:""}:"object"==typeof a?([i,c]=Object.entries(a)[0],e[i]={text:c}):e.descr={text:a},"object"==typeof s?([i,c]=Object.entries(s)[0],e[i]=c):e.sprite=s,"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.typeC4Shape={text:r},e.parentBoundary=Ph,e.wrap=mu()}},"addPersonOrSystem"),Xh=mt(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let e={},t=Dh.find(e=>e.alias===n);var h;t&&n===t.alias?e=t:(e.alias=n,Dh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],e[i]={text:h}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],e[i]={text:h}):e.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],e[a]=i):e.link=c,e.wrap=mu(),e.typeC4Shape={text:r},e.parentBoundary=Ph}},"addContainer"),Kh=mt(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let e={},t=Dh.find(e=>e.alias===n);var h;t&&n===t.alias?e=t:(e.alias=n,Dh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],e[i]={text:h}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],e[i]={text:h}):e.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],e[a]=i):e.link=c,e.wrap=mu(),e.typeC4Shape={text:r},e.parentBoundary=Ph}},"addComponent"),Zh=mt(function(r,n,i,a,s){if(null!==r&&null!==n){let e={},t=$h.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,$h.push(e)),e.label=null==n?{text:""}:{text:n},null==i?e.type={text:"system"}:"object"==typeof i?([n,o]=Object.entries(i)[0],e[n]={text:o}):e.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],e[n]=o):e.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],e[i]=n):e.link=s,e.parentBoundary=Ph,e.wrap=mu(),Bh=Ph,Ph=r,Oh.push(Bh)}},"addPersonOrSystemBoundary"),Qh=mt(function(r,n,i,a,s){if(null!==r&&null!==n){let e={},t=$h.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,$h.push(e)),e.label=null==n?{text:""}:{text:n},null==i?e.type={text:"container"}:"object"==typeof i?([n,o]=Object.entries(i)[0],e[n]={text:o}):e.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],e[n]=o):e.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],e[i]=n):e.link=s,e.parentBoundary=Ph,e.wrap=mu(),Bh=Ph,Ph=r,Oh.push(Bh)}},"addContainerBoundary"),Jh=mt(function(r,n,i,a,s,e,o,l){if(null!==n&&null!==i){let e={},t=$h.find(e=>e.alias===n);var c;t&&n===t.alias?e=t:(e.alias=n,$h.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.type={text:"node"}:"object"==typeof a?([i,c]=Object.entries(a)[0],e[i]={text:c}):e.type={text:a},null==s?e.descr={text:""}:"object"==typeof s?([i,c]=Object.entries(s)[0],e[i]={text:c}):e.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.nodeType=r,e.parentBoundary=Ph,e.wrap=mu(),Bh=Ph,Ph=n,Oh.push(Bh)}},"addDeploymentNode"),eu=mt(function(){Ph=Bh,Oh.pop(),Bh=Oh.pop(),Oh.push(Bh)},"popBoundaryParseStack"),tu=mt(function(e,t,r,n,i,a,s,o,l,c,h){let u=Dh.find(e=>e.alias===t);var d,p;void 0===u&&void 0===(u=$h.find(e=>e.alias===t))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=n&&("object"==typeof n?([p,d]=Object.entries(n)[0],u[p]=d):u.fontColor=n),null!=i&&("object"==typeof i?([r,p]=Object.entries(i)[0],u[r]=p):u.borderColor=i),null!=a&&("object"==typeof a?([d,n]=Object.entries(a)[0],u[d]=n):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?([i,d]=Object.entries(o)[0],u[i]=d):u.sprite=o),null!=l&&("object"==typeof l?([n,a]=Object.entries(l)[0],u[n]=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,i]=Object.entries(h)[0],u[s]=i):u.legendSprite=h))},"updateElStyle"),ru=mt(function(e,t,r,n,i,a,s){var o,l,c=Fh.find(e=>e.from===t&&e.to===r);void 0!==c&&(null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.textColor=n),null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.lineColor=i),null!=a&&("object"==typeof a?([n,o]=Object.entries(a)[0],c[n]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,i]=Object.entries(s)[0],c[l]=parseInt(i)):c.offsetY=parseInt(s))},"updateRelStyle"),nu=mt(function(e,t,r){var t="object"==typeof t?(n=Object.values(t)[0],parseInt(n)):parseInt(t),n="object"==typeof r?(n=Object.values(r)[0],parseInt(n)):parseInt(r);1<=t&&(Uh=t),1<=n&&(qh=n)},"updateLayoutConfig"),iu=mt(function(){return Uh},"getC4ShapeInRow"),au=mt(function(){return qh},"getC4BoundaryInRow"),su=mt(function(){return Ph},"getCurrentBoundaryParse"),ou=mt(function(){return Bh},"getParentBoundaryParse"),lu=mt(function(t){return null==t?Dh:Dh.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),cu=mt(function(t){return Dh.find(e=>e.alias===t)},"getC4Shape"),hu=mt(function(e){return Object.keys(lu(e))},"getC4ShapeKeys"),uu=mt(function(t){return null==t?$h:$h.filter(e=>e.parentBoundary===t)},"getBoundaries"),du=uu,pu=mt(function(){return Fh},"getRels"),gu=mt(function(){return zh},"getTitle"),fu=mt(function(e){Gh=e},"setWrap"),mu=mt(function(){return Gh},"autoWrap"),yu=mt(function(){Dh=[],$h=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Ph="global",Oh=[Bh=""],Oh=[zh=""],Gh=!(Fh=[]),Uh=4,qh=2},"clear"),vu={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},xu={FILLED:0,OPEN:1},bu={LEFTOF:0,RIGHTOF:1,OVER:2},wu=mt(function(e){zh=Oc(e,D())},"setTitle"),ku={addPersonOrSystem:Vh,addPersonOrSystemBoundary:Zh,addContainer:Xh,addContainerBoundary:Qh,addComponent:Kh,addDeploymentNode:Jh,popBoundaryParseStack:eu,addRel:Hh,updateElStyle:tu,updateRelStyle:ru,updateLayoutConfig:nu,autoWrap:mu,setWrap:fu,getC4ShapeArray:lu,getC4Shape:cu,getC4ShapeKeys:hu,getBoundaries:uu,getBoundarys:du,getCurrentBoundaryParse:su,getParentBoundaryParse:ou,getRels:pu,getTitle:gu,getC4Type:Wh,getC4ShapeInRow:iu,getC4BoundaryInRow:au,setAccTitle:yh,getAccTitle:vh,getAccDescription:bh,setAccDescription:xh,getConfig:mt(()=>D().c4,"getConfig"),clear:yu,LINETYPE:vu,ARROWTYPE:xu,PLACEMENT:bu,setTitle:wu,setC4Type:Yh}});function Su(e,t){return null==e||null==t?NaN:e<t?-1:t<e?1:t<=e?0:NaN}var _u=e(()=>{mt(Su,"ascending")});function Au(e,t){return null==e||null==t?NaN:t<e?-1:e<t?1:e<=t?0:NaN}var Lu=e(()=>{mt(Au,"descending")});function Nu(r){let a,s,i;function o(e,t,r=0,n=e.length){if(r<n){if(0!==a(t,t))return n;do{var i=r+n>>>1}while(s(e[i],t)<0?r=1+i:n=i,r<n)}return r}function e(e,t,r=0,n=e.length){if(r<n){if(0!==a(t,t))return n;do{var i=r+n>>>1}while(s(e[i],t)<=0?r=1+i:n=i,r<n)}return r}function t(e,t,r=0,n=e.length){return r<(n=o(e,t,r,n-1))&&i(e[n-1],t)>-i(e[n],t)?n-1:n}return i=2!==r.length?(a=Su,s=mt((e,t)=>Su(r(e),t),"compare2"),mt((e,t)=>r(e)-t,"delta")):(a=r===Su||r===Au?r:Iu,s=r),mt(o,"left"),mt(e,"right"),mt(t,"center"),{left:o,center:t,right:e}}function Iu(){return 0}var Ru=e(()=>{_u(),Lu(),mt(Nu,"bisector"),mt(Iu,"zero")});function Mu(e){return null===e?NaN:+e}var Du,Ou,Pu=e(()=>{mt(Mu,"number")}),Bu=e(()=>{_u(),Ru(),Pu(),Du=Nu(Su).right,Nu(Mu).center,Ou=Du});function $u({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):r}function Fu({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):(e.set(t,r),r)}function zu({_intern:e,_key:t},r){return t=t(r),e.has(t)&&(r=e.get(t),e.delete(t)),r}function Gu(e){return null!==e&&"object"==typeof e?e.valueOf():e}var Uu,qu=e(()=>{Uu=class extends Map{static{mt(this,"InternMap")}constructor(e,t=Gu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(var[r,n]of e)this.set(r,n)}get(e){return super.get($u(this,e))}has(e){return super.has($u(this,e))}set(e,t){return super.set(Fu(this,e),t)}delete(e){return super.delete(zu(this,e))}},mt($u,"intern_get"),mt(Fu,"intern_set"),mt(zu,"intern_delete"),mt(Gu,"keyof")});function ju(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=Vu<=a?10:Xu<=a?5:Ku<=a?2:1,o,l,c;return i<0?(c=Math.pow(10,-i)/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,i)*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?ju(e,t,2*r):[o,l,c]}function Wu(e,t,r){if(!(0<(r=+r)))return[];if((e=+e)==(t=+t))return[e];var n=t<e,[i,a,s]=n?ju(t,e,r):ju(e,t,r);if(!(i<=a))return[];var o=a-i+1,l=new Array(o);if(n)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]=(i+e)/-s;else for(let e=0;e<o;++e)l[e]=(i+e)*s;return l}function Yu(e,t,r){return ju(e=+e,t=+t,r=+r)[2]}function Hu(e,t,r){r=+r;var n=(t=+t)<(e=+e);return(n?-1:1)*((e=n?Yu(t,e,r):Yu(e,t,r))<0?1/-e:e)}var Vu,Xu,Ku,Zu=e(()=>{Vu=Math.sqrt(50),Xu=Math.sqrt(10),Ku=Math.sqrt(2),mt(ju,"tickSpec"),mt(Wu,"ticks"),mt(Yu,"tickIncrement"),mt(Hu,"tickStep")});function Qu(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n<e||void 0===n&&e<=e)&&(n=e);else{let e=-1;for(var i of t)null!=(i=r(i,++e,t))&&(n<i||void 0===n&&i<=i)&&(n=i)}return n}var Ju=e(()=>{mt(Qu,"max")});function ed(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n>e||void 0===n&&e<=e)&&(n=e);else{let e=-1;for(var i of t)null!=(i=r(i,++e,t))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var td=e(()=>{mt(ed,"min")});function rd(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((t-e)/r)),a=new Array(i);++n<i;)a[n]=e+n*r;return a}var nd=e(()=>{mt(rd,"range")}),id=e(()=>{Bu(),Ru(),Ju(),td(),nd(),Zu(),qu()});function ad(e){return e}var sd=e(()=>{mt(ad,"default")});function od(e){return"translate("+e+",0)"}function ld(e){return"translate(0,"+e+")"}function cd(t){return e=>+t(e)}function hd(t,r){return r=Math.max(0,t.bandwidth()-2*r)/2,t.round()&&(r=Math.round(r)),e=>+t(e)+r}function ud(){return!this.__axis}function dd(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1<window.devicePixelRatio?0:.5,k=p===fd||4===p?-1:1,T=4===p||2===p?"x":"y",E=p===fd||p===md?od:ld;function t(e){var t=m??(g.ticks?g.ticks.apply(g,f):g.domain()),r=y??(g.tickFormat?g.tickFormat.apply(g,f):ad),n=Math.max(v,0)+b,i=+(a=g.range())[0]+w,a=+a[a.length-1]+w,s=(g.bandwidth?hd:cd)(g.copy(),w),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(T+"2",k*v)),d=d.merge(h.append("text").attr("fill","currentColor").attr(T,k*n).attr("dy",p===fd?"0em":p===md?"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))?E(e+w):this.getAttribute("transform")}),h.attr("opacity",1e-6).attr("transform",function(e){var t=this.parentNode.__axis;return E((t&&isFinite(t=t(e))?t:s(e))+w)})),c.remove(),l.attr("d",4===p||2===p?x?"M"+k*x+","+i+"H"+w+"V"+a+"H"+k*x:"M"+w+","+i+"V"+a:x?"M"+i+","+k*x+"V"+w+"H"+a+"V"+k*x:"M"+i+","+w+"H"+a),t.attr("opacity",1).attr("transform",function(e){return E(s(e)+w)}),u.attr(T+"2",k*v),d.attr(T,k*n).text(r),o.filter(ud).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===p?"start":4===p?"end":"middle"),o.each(function(){this.__axis=s})}return mt(t,"axis"),t.scale=function(e){return arguments.length?(g=e,t):g},t.ticks=function(){return f=Array.from(arguments),t},t.tickArguments=function(e){return arguments.length?(f=null==e?[]:Array.from(e),t):f.slice()},t.tickValues=function(e){return arguments.length?(m=null==e?null:Array.from(e),t):m&&m.slice()},t.tickFormat=function(e){return arguments.length?(y=e,t):y},t.tickSize=function(e){return arguments.length?(v=x=+e,t):v},t.tickSizeInner=function(e){return arguments.length?(v=+e,t):v},t.tickSizeOuter=function(e){return arguments.length?(x=+e,t):x},t.tickPadding=function(e){return arguments.length?(b=+e,t):b},t.offset=function(e){return arguments.length?(w=+e,t):w},t}function pd(e){return dd(fd,e)}function gd(e){return dd(md,e)}var fd,md,yd=e(()=>{sd(),fd=1,md=3,mt(od,"translateX"),mt(ld,"translateY"),mt(cd,"number"),mt(hd,"center"),mt(ud,"entering"),mt(dd,"axis"),mt(pd,"axisTop"),mt(gd,"axisBottom")}),vd=e(()=>{yd()});function xd(){for(var e,t=0,r=arguments.length,n={};t<r;++t){if(!(e=arguments[t]+"")||e in n||/[\s.]/.test(e))throw new Error("illegal type: "+e);n[e]=[]}return new bd(n)}function bd(e){this._=e}function wd(e,n){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&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})}function kd(e,t){for(var r,n=0,i=e.length;n<i;++n)if((r=e[n]).name===t)return r.value}function Td(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=Ed,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=r&&e.push({name:t,value:r}),e}var Ed,Cd,Sd,_d,Ad=e(()=>{Ed={value:mt(()=>{},"value")},mt(xd,"dispatch"),mt(bd,"Dispatch"),mt(wd,"parseTypenames"),bd.prototype=xd.prototype={constructor:bd,on:mt(function(e,t){var r,n=this._,i=wd(e+"",n),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<s;)if(r=(e=i[a]).type)n[r]=Td(n[r],e.name,t);else if(null==t)for(r in n)n[r]=Td(n[r],e.name,null);return this}for(;++a<s;)if(r=(r=(e=i[a]).type)&&kd(n[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 bd(t)},"copy"),call:mt(function(e,t){if(0<(r=arguments.length-2))for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,r=(n=this._[e]).length;a<r;++a)n[a].value.apply(t,i)},"call"),apply:mt(function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,a=n.length;i<a;++i)n[i].value.apply(t,r)},"apply")},mt(kd,"get"),mt(Td,"set"),Cd=xd}),Ld=e(()=>{Ad()}),Nd=e(()=>{_d={svg:"http://www.w3.org/2000/svg",xhtml:Sd="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 Id(e){var t=e+="",r=t.indexOf(":");return 0<=r&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),_d.hasOwnProperty(t)?{space:_d[t],local:e}:e}var Rd=e(()=>{Nd(),mt(Id,"default")});function Md(r){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Sd&&e.documentElement.namespaceURI===Sd?e.createElement(r):e.createElementNS(t,r)}}function Dd(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Od(e){return((e=Id(e)).local?Dd:Md)(e)}var Pd=e(()=>{Rd(),Nd(),mt(Md,"creatorInherit"),mt(Dd,"creatorFixed"),mt(Od,"default")});function Bd(){}function $d(e){return null==e?Bd:function(){return this.querySelector(e)}}var Fd=e(()=>{mt(Bd,"none"),mt($d,"default")});function zd(e){"function"!=typeof e&&(e=$d(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a,s,o=t[i],l=o.length,c=n[i]=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 pg(n,this._parents)}var Gd=e(()=>{vg(),Fd(),mt(zd,"default")});function Ud(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}var qd=e(()=>{mt(Ud,"array")});function jd(){return[]}function Wd(e){return null==e?jd:function(){return this.querySelectorAll(e)}}var Yd=e(()=>{mt(jd,"empty"),mt(Wd,"default")});function Hd(e){return function(){return Ud(e.apply(this,arguments))}}function Vd(e){e=("function"==typeof e?Hd:Wd)(e);for(var t=this._groups,r=t.length,n=[],i=[],a=0;a<r;++a)for(var s,o=t[a],l=o.length,c=0;c<l;++c)(s=o[c])&&(n.push(e.call(s,s.__data__,c,o)),i.push(s));return new pg(n,i)}var Xd=e(()=>{vg(),qd(),Yd(),mt(Hd,"arrayAll"),mt(Vd,"default")});function Kd(e){return function(){return this.matches(e)}}function Zd(t){return function(e){return e.matches(t)}}var Qd=e(()=>{mt(Kd,"default"),mt(Zd,"childMatcher")});function Jd(e){return function(){return rp.call(this.children,e)}}function ep(){return this.firstElementChild}function tp(e){return this.select(null==e?ep:Jd("function"==typeof e?e:Zd(e)))}var rp,np=e(()=>{Qd(),rp=Array.prototype.find,mt(Jd,"childFind"),mt(ep,"childFirst"),mt(tp,"default")});function ip(){return Array.from(this.children)}function ap(e){return function(){return op.call(this.children,e)}}function sp(e){return this.selectAll(null==e?ip:ap("function"==typeof e?e:Zd(e)))}var op,lp=e(()=>{Qd(),op=Array.prototype.filter,mt(ip,"children"),mt(ap,"childrenFilter"),mt(sp,"default")});function cp(e){"function"!=typeof e&&(e=Kd(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a,s=t[i],o=s.length,l=n[i]=[],c=0;c<o;++c)(a=s[c])&&e.call(a,a.__data__,c,s)&&l.push(a);return new pg(n,this._parents)}var hp=e(()=>{vg(),Qd(),mt(cp,"default")});function up(e){return new Array(e.length)}var dp=e(()=>{mt(up,"default")});function pp(){return new pg(this._enter||this._groups.map(up),this._parents)}function gp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var fp=e(()=>{dp(),vg(),mt(pp,"default"),mt(gp,"EnterNode"),gp.prototype={constructor:gp,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 mp(e){return function(){return e}}var yp=e(()=>{mt(mp,"default")});function vp(e,t,r,n,i,a){for(var s,o=0,l=t.length,c=a.length;o<c;++o)(s=t[o])?(s.__data__=a[o],n[o]=s):r[o]=new gp(e,a[o]);for(;o<l;++o)(s=t[o])&&(i[o]=s)}function xp(e,t,r,n,i,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)?i[p]=o:c.set(l,o));for(p=0;p<u;++p)l=s.call(e,a[p],p,a)+"",(o=c.get(l))?((n[p]=o).__data__=a[p],c.delete(l)):r[p]=new gp(e,a[p]);for(p=0;p<h;++p)(o=t[p])&&c.get(d[p])===o&&(i[p]=o)}function bp(e){return e.__data__}function wp(e,t){if(!arguments.length)return Array.from(this,bp);var r=t?xp:vp,n=this._parents,i=this._groups;"function"!=typeof e&&(e=mp(e));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=n[c],u=i[c],d=u.length,p=kp(e.call(h,h&&h.__data__,c,n)),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,x=0,b=0;x<g;++x)if(y=f[x]){for(b<=x&&(b=x+1);!(v=m[b])&&++b<g;);y._next=v||null}}return(s=new pg(s,n))._enter=o,s._exit=l,s}function kp(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var Tp=e(()=>{vg(),fp(),yp(),mt(vp,"bindIndex"),mt(xp,"bindKey"),mt(bp,"datum"),mt(wp,"default"),mt(kp,"arraylike")});function Ep(){return new pg(this._exit||this._groups.map(up),this._parents)}var Cp=e(()=>{dp(),vg(),mt(Ep,"default")});function Sp(e,t,r){var n=this.enter(),i=this,a=this.exit(),n="function"==typeof e?(n=e(n))&&n.selection():n.append(e+"");return null!=t&&(i=(i=t(i))&&i.selection()),null==r?a.remove():r(a),n&&i?n.merge(i).order():i}var _p=e(()=>{mt(Sp,"default")});function Ap(e){for(var e=e.selection?e.selection():e,t=this._groups,r=e._groups,n=t.length,e=r.length,i=Math.min(n,e),a=new Array(n),s=0;s<i;++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<n;++s)a[s]=t[s];return new pg(a,this._parents)}var Lp=e(()=>{vg(),mt(Ap,"default")});function Np(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n,i=e[t],a=i.length-1,s=i[a];0<=--a;)(n=i[a])&&(s&&4^n.compareDocumentPosition(s)&&s.parentNode.insertBefore(n,s),s=n);return this}var Ip=e(()=>{mt(Np,"default")});function Rp(r){function e(e,t){return e&&t?r(e.__data__,t.__data__):!e-!t}r=r||Mp,mt(e,"compareNode");for(var t=this._groups,n=t.length,i=new Array(n),a=0;a<n;++a){for(var s,o=t[a],l=o.length,c=i[a]=new Array(l),h=0;h<l;++h)(s=o[h])&&(c[h]=s);c.sort(e)}return new pg(i,this._parents).order()}function Mp(e,t){return e<t?-1:t<e?1:t<=e?0:NaN}var Dp=e(()=>{vg(),mt(Rp,"default"),mt(Mp,"ascending")});function Op(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var Pp=e(()=>{mt(Op,"default")});function Bp(){return Array.from(this)}var $p=e(()=>{mt(Bp,"default")});function Fp(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,a=n.length;i<a;++i){var s=n[i];if(s)return s}return null}var zp=e(()=>{mt(Fp,"default")});function Gp(){let e=0;for(var t of this)++e;return e}var Up=e(()=>{mt(Gp,"default")});function qp(){return!this.node()}var jp=e(()=>{mt(qp,"default")});function Wp(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i,a=t[r],s=0,o=a.length;s<o;++s)(i=a[s])&&e.call(i,i.__data__,s,a);return this}var Yp=e(()=>{mt(Wp,"default")});function Hp(e){return function(){this.removeAttribute(e)}}function Vp(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Xp(e,t){return function(){this.setAttribute(e,t)}}function Kp(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Zp(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Qp(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 Jp(e,t){var r,e=Id(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?Vp:Hp:"function"==typeof t?e.local?Qp:Zp:e.local?Kp:Xp)(e,t))}var e0=e(()=>{Rd(),mt(Hp,"attrRemove"),mt(Vp,"attrRemoveNS"),mt(Xp,"attrConstant"),mt(Kp,"attrConstantNS"),mt(Zp,"attrFunction"),mt(Qp,"attrFunctionNS"),mt(Jp,"default")});function t0(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var r0=e(()=>{mt(t0,"default")});function n0(e){return function(){this.style.removeProperty(e)}}function i0(e,t,r){return function(){this.style.setProperty(e,t,r)}}function a0(t,r,n){return function(){var e=r.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,n)}}function s0(e,t,r){return 1<arguments.length?this.each((null==t?n0:"function"==typeof t?a0:i0)(e,t,r??"")):o0(this.node(),e)}function o0(e,t){return e.style.getPropertyValue(t)||t0(e).getComputedStyle(e,null).getPropertyValue(t)}var l0=e(()=>{r0(),mt(n0,"styleRemove"),mt(i0,"styleConstant"),mt(a0,"styleFunction"),mt(s0,"default"),mt(o0,"styleValue")});function c0(e){return function(){delete this[e]}}function h0(e,t){return function(){this[e]=t}}function u0(t,r){return function(){var e=r.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function d0(e,t){return 1<arguments.length?this.each((null==t?c0:"function"==typeof t?u0:h0)(e,t)):this.node()[e]}var p0=e(()=>{mt(c0,"propertyRemove"),mt(h0,"propertyConstant"),mt(u0,"propertyFunction"),mt(d0,"default")});function g0(e){return e.trim().split(/^|\s+/)}function f0(e){return e.classList||new m0(e)}function m0(e){this._node=e,this._names=g0(e.getAttribute("class")||"")}function y0(e,t){for(var r=f0(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function v0(e,t){for(var r=f0(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function x0(e){return function(){y0(this,e)}}function b0(e){return function(){v0(this,e)}}function w0(e,t){return function(){(t.apply(this,arguments)?y0:v0)(this,e)}}function k0(e,t){var r=g0(e+"");if(arguments.length<2){for(var n=f0(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each(("function"==typeof t?w0:t?x0:b0)(r,t))}var T0=e(()=>{mt(g0,"classArray"),mt(f0,"classList"),mt(m0,"ClassList"),m0.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(y0,"classedAdd"),mt(v0,"classedRemove"),mt(x0,"classedTrue"),mt(b0,"classedFalse"),mt(w0,"classedFunction"),mt(k0,"default")});function E0(){this.textContent=""}function C0(e){return function(){this.textContent=e}}function S0(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function _0(e){return arguments.length?this.each(null==e?E0:("function"==typeof e?S0:C0)(e)):this.node().textContent}var A0=e(()=>{mt(E0,"textRemove"),mt(C0,"textConstant"),mt(S0,"textFunction"),mt(_0,"default")});function L0(){this.innerHTML=""}function N0(e){return function(){this.innerHTML=e}}function I0(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function R0(e){return arguments.length?this.each(null==e?L0:("function"==typeof e?I0:N0)(e)):this.node().innerHTML}var M0=e(()=>{mt(L0,"htmlRemove"),mt(N0,"htmlConstant"),mt(I0,"htmlFunction"),mt(R0,"default")});function D0(){this.nextSibling&&this.parentNode.appendChild(this)}function O0(){return this.each(D0)}var P0=e(()=>{mt(D0,"raise"),mt(O0,"default")});function B0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $0(){return this.each(B0)}var F0=e(()=>{mt(B0,"lower"),mt($0,"default")});function z0(e){var t="function"==typeof e?e:Od(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var G0=e(()=>{Pd(),mt(z0,"default")});function U0(){return null}function q0(e,t){var r="function"==typeof e?e:Od(e),n=null==t?U0:"function"==typeof t?t:$d(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var j0=e(()=>{Pd(),Fd(),mt(U0,"constantNull"),mt(q0,"default")});function W0(){var e=this.parentNode;e&&e.removeChild(this)}function Y0(){return this.each(W0)}var H0=e(()=>{mt(W0,"remove"),mt(Y0,"default")});function V0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function X0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function K0(e){return this.select(e?X0:V0)}var Z0=e(()=>{mt(V0,"selection_cloneShallow"),mt(X0,"selection_cloneDeep"),mt(K0,"default")});function Q0(e){return arguments.length?this.property("__data__",e):this.node().__data__}var J0=e(()=>{mt(Q0,"default")});function eg(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 rg(a){return function(){var e=this.__on;if(e){for(var t,r=0,n=-1,i=e.length;r<i;++r)t=e[r],a.type&&t.type!==a.type||t.name!==a.name?e[++n]=t:this.removeEventListener(t.type,t.listener,t.options);++n?e.length=n:delete this.__on}}}function ng(a,s,o){return function(){var e,t=this.__on,r=eg(s);if(t)for(var n=0,i=t.length;n<i;++n)if((e=t[n]).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 ig(e,t,r){var n,i,a=tg(e+""),s=a.length;if(!(arguments.length<2)){for(o=t?ng:rg,n=0;n<s;++n)this.each(o(a[n],t,r));return this}var o=this.node().__on;if(o)for(var l,c=0,h=o.length;c<h;++c)for(n=0,l=o[c];n<s;++n)if((i=a[n]).type===l.type&&i.name===l.name)return l.value}var ag=e(()=>{mt(eg,"contextListener"),mt(tg,"parseTypenames"),mt(rg,"onRemove"),mt(ng,"onAdd"),mt(ig,"default")});function sg(e,t,r){var n=t0(e),i=n.CustomEvent;"function"==typeof i?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function og(e,t){return function(){return sg(this,e,t)}}function lg(e,t){return function(){return sg(this,e,t.apply(this,arguments))}}function cg(e,t){return this.each(("function"==typeof t?lg:og)(e,t))}var hg=e(()=>{r0(),mt(sg,"dispatchEvent"),mt(og,"dispatchConstant"),mt(lg,"dispatchFunction"),mt(cg,"default")});function*ug(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n,i=e[t],a=0,s=i.length;a<s;++a)(n=i[a])&&(yield n)}var dg=e(()=>{mt(ug,"default")});function pg(e,t){this._groups=e,this._parents=t}function gg(){return new pg([[document.documentElement]],mg)}function fg(){return this}var mg,yg,vg=e(()=>{Gd(),Xd(),np(),lp(),hp(),Tp(),fp(),Cp(),_p(),Lp(),Ip(),Dp(),Pp(),$p(),zp(),Up(),jp(),Yp(),e0(),l0(),p0(),T0(),A0(),M0(),P0(),F0(),G0(),j0(),H0(),Z0(),J0(),ag(),hg(),dg(),mg=[null],mt(pg,"Selection"),mt(gg,"selection"),mt(fg,"selection_selection"),pg.prototype=gg.prototype={constructor:pg,select:zd,selectAll:Vd,selectChild:tp,selectChildren:sp,filter:cp,data:wp,enter:pp,exit:Ep,join:Sp,merge:Ap,selection:fg,order:Np,sort:Rp,call:Op,nodes:Bp,node:Fp,size:Gp,empty:qp,each:Wp,attr:Jp,style:s0,property:d0,classed:k0,text:_0,html:R0,raise:O0,lower:$0,append:z0,insert:q0,remove:Y0,clone:K0,datum:Q0,on:ig,dispatch:cg,[Symbol.iterator]:ug},yg=gg});function H(e){return"string"==typeof e?new pg([[document.querySelector(e)]],[document.documentElement]):new pg([[e]],mg)}var xg=e(()=>{vg(),mt(H,"default")}),bg=e(()=>{Qd(),Rd(),xg(),vg(),Fd(),Yd(),l0()}),wg=e(()=>{});function kg(e,t,r){(e.prototype=t.prototype=r).constructor=e}function Tg(e,t){var r,n=Object.create(e.prototype);for(r in t)n[r]=t[r];return n}var Eg=e(()=>{mt(kg,"default"),mt(Tg,"extend")});function Cg(){}function Sg(){return this.rgb().formatHex()}function _g(){return this.rgb().formatHex8()}function Ag(){return qg(this).formatHsl()}function Lg(){return this.rgb().formatRgb()}function Ng(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Qg.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ig(t):3===r?new Og(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Rg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Rg(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=Jg.exec(e))?new Og(t[1],t[2],t[3],1):(t=e1.exec(e))?new Og(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=t1.exec(e))?Rg(t[1],t[2],t[3],t[4]):(t=r1.exec(e))?Rg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=n1.exec(e))?Ug(t[1],t[2]/100,t[3]/100,1):(t=i1.exec(e))?Ug(t[1],t[2]/100,t[3]/100,t[4]):a1.hasOwnProperty(e)?Ig(a1[e]):"transparent"===e?new Og(NaN,NaN,NaN,0):null}function Ig(e){return new Og(e>>16&255,e>>8&255,255&e,1)}function Rg(e,t,r,n){return new Og(e=n<=0?t=r=NaN:e,t,r,n)}function Mg(e){return(e=e instanceof Cg?e:Ng(e))?new Og((e=e.rgb()).r,e.g,e.b,e.opacity):new Og}function Dg(e,t,r,n){return 1===arguments.length?Mg(e):new Og(e,t,r,n??1)}function Og(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Pg(){return"#"+Gg(this.r)+Gg(this.g)+Gg(this.b)}function Bg(){return"#"+Gg(this.r)+Gg(this.g)+Gg(this.b)+Gg(255*(isNaN(this.opacity)?1:this.opacity))}function $g(){var e=Fg(this.opacity);return(1===e?"rgb(":"rgba(")+zg(this.r)+`, ${zg(this.g)}, `+zg(this.b)+(1===e?")":`, ${e})`)}function Fg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zg(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gg(e){return((e=zg(e))<16?"0":"")+e.toString(16)}function Ug(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||1<=r?e=t=NaN:t<=0&&(e=NaN),new Wg(e,t,r,n)}function qg(e){var t,r,n,i,a,s,o,l;return e instanceof Wg?new Wg(e.h,e.s,e.l,e.opacity):(e=e instanceof Cg?e:Ng(e))?e instanceof Wg?e:(t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),s=NaN,l=((a=Math.max(t,r,n))+i)/2,(o=a-i)?(s=t===a?(r-n)/o+6*(r<n):r===a?(n-t)/o+2:(t-r)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=0<l&&l<1?0:s,new Wg(s,o,l,e.opacity)):new Wg}function jg(e,t,r,n){return 1===arguments.length?qg(e):new Wg(e,t,r,n??1)}function Wg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Yg(e){return(e=(e||0)%360)<0?e+360:e}function Hg(e){return Math.max(0,Math.min(1,e||0))}function Vg(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 Xg,Kg,Zg,Qg,Jg,e1,t1,r1,n1,i1,a1,s1,o1,l1=e(()=>{Eg(),mt(Cg,"Color"),Xg="\\s*([+-]?\\d+)\\s*",Kg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qg=/^#([0-9a-f]{3,8})$/,Jg=new RegExp(`^rgb\\(${Xg},${Xg},${Xg}\\)$`),e1=new RegExp(`^rgb\\(${Zg},${Zg},${Zg}\\)$`),t1=new RegExp(`^rgba\\(${Xg},${Xg},${Xg},${Kg}\\)$`),r1=new RegExp(`^rgba\\(${Zg},${Zg},${Zg},${Kg}\\)$`),n1=new RegExp(`^hsl\\(${Kg},${Zg},${Zg}\\)$`),i1=new RegExp(`^hsla\\(${Kg},${Zg},${Zg},${Kg}\\)$`),a1={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},kg(Cg,Ng,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Sg,formatHex:Sg,formatHex8:_g,formatHsl:Ag,formatRgb:Lg,toString:Lg}),mt(Sg,"color_formatHex"),mt(_g,"color_formatHex8"),mt(Ag,"color_formatHsl"),mt(Lg,"color_formatRgb"),mt(Ng,"color"),mt(Ig,"rgbn"),mt(Rg,"rgba"),mt(Mg,"rgbConvert"),mt(Dg,"rgb"),mt(Og,"Rgb"),kg(Og,Dg,Tg(Cg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Og(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Og(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Og(zg(this.r),zg(this.g),zg(this.b),Fg(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:Pg,formatHex:Pg,formatHex8:Bg,formatRgb:$g,toString:$g})),mt(Pg,"rgb_formatHex"),mt(Bg,"rgb_formatHex8"),mt($g,"rgb_formatRgb"),mt(Fg,"clampa"),mt(zg,"clampi"),mt(Gg,"hex"),mt(Ug,"hsla"),mt(qg,"hslConvert"),mt(jg,"hsl"),mt(Wg,"Hsl"),kg(Wg,jg,Tg(Cg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Wg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Wg(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 Og(Vg(240<=e?e-240:120+e,r=2*r-(t=r+(r<.5?r:1-r)*t),t),Vg(e,r,t),Vg(e<120?240+e:e-120,r,t),this.opacity)},clamp(){return new Wg(Yg(this.h),Hg(this.s),Hg(this.l),Fg(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=Fg(this.opacity);return(1===e?"hsl(":"hsla(")+Yg(this.h)+`, ${100*Hg(this.s)}%, ${100*Hg(this.l)}%`+(1===e?")":`, ${e})`)}})),mt(Yg,"clamph"),mt(Hg,"clampt"),mt(Vg,"hsl2rgb")}),c1=e(()=>{s1=Math.PI/180,o1=180/Math.PI});function h1(e){var t,r,n,i,a,s;return e instanceof d1?new d1(e.l,e.a,e.b,e.opacity):e instanceof x1?b1(e):(i=p1(.2225045*(t=m1((e=e instanceof Og?e:Mg(e)).r))+.7168786*(r=m1(e.g))+.0606169*(n=m1(e.b))),t===r&&r===n?a=s=i:(a=p1((.4360747*t+.3850649*r+.1430804*n)/.96422),s=p1((.0139322*t+.0971045*r+.7141733*n)/.82521)),new d1(116*i-16,500*(a-i),200*(i-s),e.opacity))}function u1(e,t,r,n){return 1===arguments.length?h1(e):new d1(e,t,r,n??1)}function d1(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function p1(e){return E1<e?Math.pow(e,1/3):e/T1+w1}function g1(e){return k1<e?e*e*e:T1*(e-w1)}function f1(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function m1(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function y1(e){var t;return e instanceof x1?new x1(e.h,e.c,e.l,e.opacity):0===(e=e instanceof d1?e:h1(e)).a&&0===e.b?new x1(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity):new x1((t=Math.atan2(e.b,e.a)*o1)<0?360+t:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function v1(e,t,r,n){return 1===arguments.length?y1(e):new x1(e,t,r,n??1)}function x1(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function b1(e){var t;return isNaN(e.h)?new d1(e.l,0,0,e.opacity):(t=e.h*s1,new d1(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity))}var w1,k1,T1,E1,C1=e(()=>{Eg(),l1(),c1(),w1=4/29,T1=3*(k1=6/29)*k1,E1=k1*k1*k1,mt(h1,"labConvert"),mt(u1,"lab"),mt(d1,"Lab"),kg(d1,u1,Tg(Cg,{brighter(e){return new d1(this.l+18*(e??1),this.a,this.b,this.opacity)},darker(e){return new d1(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 Og(f1(3.1338561*(t=.96422*g1(t))-1.6168667*(e=+g1(e))-.4906146*(r=.82521*g1(r))),f1(-.9787684*t+1.9161415*e+.033454*r),f1(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),mt(p1,"xyz2lab"),mt(g1,"lab2xyz"),mt(f1,"lrgb2rgb"),mt(m1,"rgb2lrgb"),mt(y1,"hclConvert"),mt(v1,"hcl"),mt(x1,"Hcl"),mt(b1,"hcl2lab"),kg(x1,v1,Tg(Cg,{brighter(e){return new x1(this.h,this.c,this.l+18*(e??1),this.opacity)},darker(e){return new x1(this.h,this.c,this.l-18*(e??1),this.opacity)},rgb(){return b1(this).rgb()}}))}),S1=e(()=>{l1(),C1()});function _1(e,t,r,n,i){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)*n+s*i)/6}function A1(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],n=s[t+1],i=0<t?s[t-1]:2*r-n,a=t<o-1?s[t+2]:2*n-r;return _1((e-t/o)*o,i,r,n,a)}}var L1=e(()=>{mt(_1,"basis"),mt(A1,"default")});function N1(n){var i=n.length;return function(e){var t=Math.floor(((e%=1)<0?++e:e)*i),r=n[(t+i-1)%i];return _1((e-t/i)*i,r,n[t%i],n[(t+1)%i],n[(t+2)%i])}}var I1,R1=e(()=>{L1(),mt(N1,"default")}),M1=e(()=>{I1=mt(e=>()=>e,"default")});function D1(t,r){return function(e){return t+e*r}}function O1(t,r,n){return t=Math.pow(t,n),r=Math.pow(r,n)-t,n=1/n,function(e){return Math.pow(t+e*r,n)}}function P1(e,t){var r=t-e;return r?D1(e,180<r||r<-180?r-360*Math.round(r/360):r):I1(isNaN(e)?t:e)}function B1(r){return 1==(r=+r)?$1:function(e,t){return t-e?O1(e,t,r):I1(isNaN(e)?t:e)}}function $1(e,t){var r=t-e;return r?D1(e,r):I1(isNaN(e)?t:e)}var F1=e(()=>{M1(),mt(D1,"linear"),mt(O1,"exponential"),mt(P1,"hue"),mt(B1,"gamma"),mt($1,"nogamma")});function z1(o){return function(e){for(var t,r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),s=0;s<r;++s)t=Dg(e[s]),n[s]=t.r||0,i[s]=t.g||0,a[s]=t.b||0;return n=o(n),i=o(i),a=o(a),t.opacity=1,function(e){return t.r=n(e),t.g=i(e),t.b=a(e),t+""}}}var G1,U1=e(()=>{S1(),L1(),R1(),F1(),G1=mt(function e(t){var s=B1(t);function r(t,e){var r=s((t=Dg(t)).r,(e=Dg(e)).r),n=s(t.g,e.g),i=s(t.b,e.b),a=$1(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=n(e),t.b=i(e),t.opacity=a(e),t+""}}return mt(r,"rgb"),r.gamma=e,r},"rgbGamma")(1),mt(z1,"rgbSpline"),z1(A1),z1(N1)});function q1(t,r){r=r||[];var n,i=t?Math.min(r.length,t.length):0,a=r.slice();return function(e){for(n=0;n<i;++n)a[n]=t[n]*(1-e)+r[n]*e;return a}}function j1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var W1=e(()=>{mt(q1,"default"),mt(j1,"isNumberArray")});function Y1(e,t){for(var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),s=0;s<n;++s)i[s]=of(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(e){for(s=0;s<n;++s)a[s]=i[s](e);return a}}var H1=e(()=>{lf(),mt(Y1,"genericArray")});function V1(t,r){var n=new Date;return t=+t,r=+r,function(e){return n.setTime(t*(1-e)+r*e),n}}var X1=e(()=>{mt(V1,"default")});function K1(t,r){return t=+t,r=+r,function(e){return t*(1-e)+r*e}}var Z1=e(()=>{mt(K1,"default")});function Q1(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),t=null!==t&&"object"==typeof t?t:{})r in e?n[r]=of(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var J1=e(()=>{lf(),mt(Q1,"default")});function ef(e){return function(){return e}}function tf(t){return function(e){return t(e)+""}}function rf(e,n){var t,r,i,a=nf.lastIndex=af.lastIndex=0,s=-1,o=[],l=[];for(e+="",n+="";(t=nf.exec(e))&&(r=af.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(t=t[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:K1(t,r)})),a=af.lastIndex;return a<n.length&&(i=n.slice(a),o[s]?o[s]+=i:o[++s]=i),o.length<2?l[0]?tf(l[0].x):ef(n):(n=l.length,function(e){for(var t,r=0;r<n;++r)o[(t=l[r]).i]=t.x(e);return o.join("")})}var nf,af,sf=e(()=>{Z1(),nf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,af=new RegExp(nf.source,"g"),mt(ef,"zero"),mt(tf,"one"),mt(rf,"default")});function of(e,t){var r=typeof t;return null==t||"boolean"==r?I1(t):("number"==r?K1:"string"==r?(r=Ng(t))?(t=r,G1):rf:t instanceof Ng?G1:t instanceof Date?V1:j1(t)?q1:Array.isArray(t)?Y1:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Q1:K1)(e,t)}var lf=e(()=>{S1(),U1(),H1(),X1(),Z1(),J1(),sf(),M1(),W1(),mt(of,"default")});function cf(t,r){return t=+t,r=+r,function(e){return Math.round(t*(1-e)+r*e)}}var hf=e(()=>{mt(cf,"default")});function uf(e,t,r,n,i,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),e*n<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*df,skewX:Math.atan(l)*df,scaleX:s,scaleY:o}}var df,pf,gf=e(()=>{df=180/Math.PI,pf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},mt(uf,"default")});function ff(e){return(e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")).isIdentity?pf:uf(e.a,e.b,e.c,e.d,e.e,e.f)}function mf(e){return null!=e&&((yf=yf||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",e),e=yf.transform.baseVal.consolidate())?uf((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):pf}var yf,vf=e(()=>{gf(),mt(ff,"parseCss"),mt(mf,"parseSvg")});function xf(r,o,l,i){function c(e){return e.length?e.pop()+" ":""}function n(e,t,r,n,i,a){var s;e!==r||t!==n?(s=i.push("translate(",null,o,null,l),a.push({i:s-4,x:K1(e,r)},{i:s-2,x:K1(t,n)})):(r||n)&&i.push("translate("+r+o+n+l)}function s(e,t,r,n){e!==t?(180<e-t?t+=360:180<t-e&&(e+=360),n.push({i:r.push(c(r)+"rotate(",null,i)-2,x:K1(e,t)})):t&&r.push(c(r)+"rotate("+t+i)}function h(e,t,r,n){e!==t?n.push({i:r.push(c(r)+"skewX(",null,i)-2,x:K1(e,t)}):t&&r.push(c(r)+"skewX("+t+i)}function u(e,t,r,n,i,a){var s;e!==r||t!==n?(s=i.push(c(i)+"scale(",null,",",null,")"),a.push({i:s-4,x:K1(e,r)},{i:s-2,x:K1(t,n)})):1===r&&1===n||i.push(c(i)+"scale("+r+","+n+")")}return mt(c,"pop"),mt(n,"translate"),mt(s,"rotate"),mt(h,"skewX"),mt(u,"scale"),function(e,t){var i=[],a=[];return e=r(e),t=r(t),n(e.translateX,e.translateY,t.translateX,t.translateY,i,a),s(e.rotate,t.rotate,i,a),h(e.skewX,t.skewX,i,a),u(e.scaleX,e.scaleY,t.scaleX,t.scaleY,i,a),function(e){for(var t,r=-1,n=a.length;++r<n;)i[(t=a[r]).i]=t.x(e);return i.join("")}}}var bf,wf,kf=e(()=>{Z1(),vf(),mt(xf,"interpolateTransform"),bf=xf(ff,"px, ","px)","deg)"),wf=xf(mf,", ",")",")")});function Tf(s){return function(t,e){var r=s((t=v1(t)).h,(e=v1(e)).h),n=$1(t.c,e.c),i=$1(t.l,e.l),a=$1(t.opacity,e.opacity);return function(e){return t.h=r(e),t.c=n(e),t.l=i(e),t.opacity=a(e),t+""}}}var Ef,Cf=e(()=>{S1(),F1(),mt(Tf,"hcl"),Ef=Tf(P1),Tf($1)}),Sf=e(()=>{lf(),Z1(),hf(),sf(),kf(),U1(),Cf()});function _f(){return qf||(Yf(Af),qf=Wf.now()+jf)}function Af(){qf=0}function Lf(){this._call=this._time=this._next=null}function Nf(e,t,r){var n=new Lf;return n.restart(e,t,r),n}function If(){_f(),++Pf;for(var e,t=zf;t;)0<=(e=qf-t._time)&&t._call.call(void 0,e),t=t._next;--Pf}function Rf(){qf=(Uf=Wf.now())+jf,Pf=Bf=0;try{If()}finally{Pf=0,Df(),qf=0}}function Mf(){var e=Wf.now(),t=e-Uf;Ff<t&&(jf-=t,Uf=e)}function Df(){for(var e,t,r=zf,n=1/0;r;)r=r._call?(n>r._time&&(n=r._time),(e=r)._next):(t=r._next,r._next=null,e?e._next=t:zf=t);Gf=e,Of(n)}function Of(e){Pf||(Bf=Bf&&clearTimeout(Bf),24<e-qf?(e<1/0&&(Bf=setTimeout(Rf,e-Wf.now()-jf)),$f=$f&&clearInterval($f)):($f||(Uf=Wf.now(),$f=setInterval(Mf,Ff)),Pf=1,Yf(Rf)))}var Pf,Bf,$f,Ff,zf,Gf,Uf,qf,jf,Wf,Yf,Hf=e(()=>{Ff=1e3,jf=qf=Uf=$f=Bf=Pf=0,Wf="object"==typeof performance&&performance.now?performance:Date,Yf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},mt(_f,"now"),mt(Af,"clearNow"),mt(Lf,"Timer"),Lf.prototype=Nf.prototype={constructor:Lf,restart:mt(function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?_f():+r)+(null==t?0:+t),this._next||Gf===this||(Gf?Gf._next=this:zf=this,Gf=this),this._call=e,this._time=r,Of()},"restart"),stop:mt(function(){this._call&&(this._call=null,this._time=1/0,Of())},"stop")},mt(Nf,"timer"),mt(If,"timerFlush"),mt(Rf,"wake"),mt(Mf,"poke"),mt(Df,"nap"),mt(Of,"sleep")});function Vf(t,r,e){var n=new Lf;return r=null==r?0:+r,n.restart(e=>{n.stop(),t(e+r)},r,e),n}var Xf=e(()=>{Hf(),mt(Vf,"default")}),Kf=e(()=>{Hf(),Xf()});function Zf(e,t,r,n,i,a){var s=e.__transition;if(s){if(r in s)return}else e.__transition={};tm(e,r,{name:t,index:n,group:i,on:rm,tween:nm,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:im})}function Qf(e,t){if((e=em(e,t)).state>im)throw new Error("too late; already scheduled");return e}function Jf(e,t){if((e=em(e,t)).state>om)throw new Error("too late; already running");return e}function em(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=am,o.timer.restart(h,o.delay,o.time),o.delay<=e&&h(e-o.delay)}function h(e){var t,r,n,i;if(o.state!==am)return d();for(t in c)if(i=c[t],i.name===o.name){if(i.state===om)return Vf(h);i.state===lm?(i.state=hm,i.timer.stop(),i.on.call("interrupt",a,a.__data__,i.index,i.group),delete c[t]):+t<s&&(i.state=hm,i.timer.stop(),i.on.call("cancel",a,a.__data__,i.index,i.group),delete c[t])}if(Vf(function(){o.state===om&&(o.state=lm,o.timer.restart(u,o.delay,o.time),u(e))}),o.state=sm,o.on.call("start",a,a.__data__,o.index,o.group),o.state===sm){for(o.state=om,l=new Array(n=o.tween.length),t=0,r=-1;t<n;++t)(i=o.tween[t].value.call(a,a.__data__,o.index,o.group))&&(l[++r]=i);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=cm,1),r=-1,n=l.length;++r<n;)l[r].call(a,t);o.state===cm&&(o.on.call("end",a,a.__data__,o.index,o.group),d())}function d(){for(var e in o.state=hm,o.timer.stop(),delete c[s],c)return;delete a.__transition}(c[s]=o).timer=Nf(e,0,o.time),mt(e,"schedule"),mt(h,"start"),mt(u,"tick"),mt(d,"stop")}var rm,nm,im,am,sm,om,lm,cm,hm,um=e(()=>{Ld(),Kf(),rm=Cd("start","end","cancel","interrupt"),nm=[],im=0,am=1,sm=2,om=3,lm=4,cm=5,hm=6,mt(Zf,"default"),mt(Qf,"init"),mt(Jf,"set"),mt(em,"get"),mt(tm,"create")});function dm(e,t){var r,n,i,a=e.__transition,s=!0;if(a){for(i in t=null==t?null:t+"",a)(r=a[i]).name!==t?s=!1:(n=sm<r.state&&r.state<cm,r.state=hm,r.timer.stop(),r.on.call(n?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete a[i]);s&&delete e.__transition}}var pm=e(()=>{um(),mt(dm,"default")});function gm(e){return this.each(function(){dm(this,e)})}var fm=e(()=>{pm(),mt(gm,"default")});function mm(i,a){var s,o;return function(){var e=Jf(this,i),t=e.tween;if(t!==s)for(var r=0,n=(o=s=t).length;r<n;++r)if(o[r].name===a){(o=o.slice()).splice(r,1);break}e.tween=o}}function ym(a,s,o){var l,c;if("function"!=typeof o)throw new Error;return function(){var e=Jf(this,a),t=e.tween;if(t!==l){c=(l=t).slice();for(var r={name:s,value:o},n=0,i=c.length;n<i;++n)if(c[n].name===s){c[n]=r;break}n===i&&c.push(r)}e.tween=c}}function vm(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n,i=em(this.node(),r).tween,a=0,s=i.length;a<s;++a)if((n=i[a]).name===e)return n.value;return null}return this.each((null==t?mm:ym)(r,e,t))}function xm(e,t,r){var n=e._id;return e.each(function(){var e=Jf(this,n);(e.value||(e.value={}))[t]=r.apply(this,arguments)}),function(e){return em(e,n).value[t]}}var bm=e(()=>{um(),mt(mm,"tweenRemove"),mt(ym,"tweenFunction"),mt(vm,"default"),mt(xm,"tweenValue")});function wm(e,t){var r;return("number"==typeof t?K1:t instanceof Ng?G1:(r=Ng(t))?(t=r,G1):rf)(e,t)}var km=e(()=>{S1(),Sf(),mt(wm,"default")});function Tm(e){return function(){this.removeAttribute(e)}}function Em(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Cm(t,r,n){var i,a,s=n+"";return function(){var e=this.getAttribute(t);return e===s?null:e===i?a:a=r(i=e,n)}}function Sm(t,r,n){var i,a,s=n+"";return function(){var e=this.getAttributeNS(t.space,t.local);return e===s?null:e===i?a:a=r(i=e,n)}}function _m(n,i,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttribute(n):(e=this.getAttribute(n))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=i(s=e,r))}}function Am(n,i,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttributeNS(n.space,n.local):(e=this.getAttributeNS(n.space,n.local))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=i(s=e,r))}}function Lm(e,t){var r=Id(e),n="transform"===r?wf:wm;return this.attrTween(e,"function"==typeof t?(r.local?Am:_m)(r,n,xm(this,"attr."+e,t)):null==t?(r.local?Em:Tm)(r):(r.local?Sm:Cm)(r,n,t))}var Nm=e(()=>{Sf(),bg(),bm(),km(),mt(Tm,"attrRemove"),mt(Em,"attrRemoveNS"),mt(Cm,"attrConstant"),mt(Sm,"attrConstantNS"),mt(_m,"attrFunction"),mt(Am,"attrFunctionNS"),mt(Lm,"default")});function Im(t,r){return function(e){this.setAttribute(t,r.call(this,e))}}function Rm(t,r){return function(e){this.setAttributeNS(t.space,t.local,r.call(this,e))}}function Mm(t,r){var n,i;function e(){var e=r.apply(this,arguments);return n=e!==i?(i=e)&&Rm(t,e):n}return mt(e,"tween"),e._value=r,e}function Dm(t,r){var n,i;function e(){var e=r.apply(this,arguments);return n=e!==i?(i=e)&&Im(t,e):n}return mt(e,"tween"),e._value=r,e}function Om(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=Id(e),this.tween(r,(e.local?Mm:Dm)(e,t))}var Pm=e(()=>{bg(),mt(Im,"attrInterpolate"),mt(Rm,"attrInterpolateNS"),mt(Mm,"attrTweenNS"),mt(Dm,"attrTween"),mt(Om,"default")});function Bm(e,t){return function(){Qf(this,e).delay=+t.apply(this,arguments)}}function $m(e,t){return t=+t,function(){Qf(this,e).delay=t}}function Fm(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Bm:$m)(t,e)):em(this.node(),t).delay}var zm=e(()=>{um(),mt(Bm,"delayFunction"),mt($m,"delayConstant"),mt(Fm,"default")});function Gm(e,t){return function(){Jf(this,e).duration=+t.apply(this,arguments)}}function Um(e,t){return t=+t,function(){Jf(this,e).duration=t}}function qm(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Gm:Um)(t,e)):em(this.node(),t).duration}var jm=e(()=>{um(),mt(Gm,"durationFunction"),mt(Um,"durationConstant"),mt(qm,"default")});function Wm(e,t){if("function"!=typeof t)throw new Error;return function(){Jf(this,e).ease=t}}function Ym(e){var t=this._id;return arguments.length?this.each(Wm(t,e)):em(this.node(),t).ease}var Hm=e(()=>{um(),mt(Wm,"easeConstant"),mt(Ym,"default")});function Vm(t,r){return function(){var e=r.apply(this,arguments);if("function"!=typeof e)throw new Error;Jf(this,t).ease=e}}function Xm(e){if("function"!=typeof e)throw new Error;return this.each(Vm(this._id,e))}var Km=e(()=>{um(),mt(Vm,"easeVarying"),mt(Xm,"default")});function Zm(e){"function"!=typeof e&&(e=Kd(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a,s=t[i],o=s.length,l=n[i]=[],c=0;c<o;++c)(a=s[c])&&e.call(a,a.__data__,c,s)&&l.push(a);return new $y(n,this._parents,this._name,this._id)}var Qm=e(()=>{bg(),qy(),mt(Zm,"default")});function Jm(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,e=r.length,i=Math.min(n,e),a=new Array(n),s=0;s<i;++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<n;++s)a[s]=t[s];return new $y(a,this._parents,this._name,this._id)}var ey=e(()=>{qy(),mt(Jm,"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 ry(r,n,i){var a,s,o=ty(n)?Qf:Jf;return function(){var e=o(this,r),t=e.on;t!==a&&(s=(a=t).copy()).on(n,i),e.on=s}}function ny(e,t){var r=this._id;return arguments.length<2?em(this.node(),r).on.on(e):this.each(ry(r,e,t))}var iy=e(()=>{um(),mt(ty,"start"),mt(ry,"onFunction"),mt(ny,"default")});function ay(r){return function(){var e,t=this.parentNode;for(e in this.__transition)if(+e!==r)return;t&&t.removeChild(this)}}function sy(){return this.on("end.remove",ay(this._id))}var oy=e(()=>{mt(ay,"removeFunction"),mt(sy,"default")});function ly(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=$d(e));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var o,l,c=n[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,Zf(u[d],t,r,d,u,em(o,r)));return new $y(a,this._parents,t,r)}var cy=e(()=>{bg(),qy(),um(),mt(ly,"default")});function hy(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=Wd(e));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o<i;++o)for(var l,c=n[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=em(l,r),f=0,m=p.length;f<m;++f)(d=p[f])&&Zf(d,t,r,f,p,g);a.push(p),s.push(l)}return new $y(a,s,t,r)}var uy=e(()=>{bg(),qy(),um(),mt(hy,"default")});function dy(){return new py(this._groups,this._parents)}var py,gy=e(()=>{bg(),py=yg.prototype.constructor,mt(dy,"default")});function fy(r,n){var i,a,s;return function(){var e=o0(this,r),t=(this.style.removeProperty(r),o0(this,r));return e===t?null:e===i&&t===a?s:s=n(i=e,a=t)}}function my(e){return function(){this.style.removeProperty(e)}}function yy(t,r,n){var i,a,s=n+"";return function(){var e=o0(this,t);return e===s?null:e===i?a:a=r(i=e,n)}}function vy(n,i,a){var s,o,l;return function(){var e=o0(this,n),t=a(this),r=t+"";return null==t&&(this.style.removeProperty(n),r=t=o0(this,n)),e===r?null:e===s&&r===o?l:(o=r,l=i(s=e,t))}}function xy(n,i){var a,s,o,l,c="style."+i,h="end."+c;return function(){var e=Jf(this,n),t=e.on,r=null==e.value[c]?l=l||my(i):void 0;t===a&&o===r||(s=(a=t).copy()).on(h,o=r),e.on=s}}function by(e,t,r){var n="transform"==(e+="")?bf:wm;return null==t?this.styleTween(e,fy(e,n)).on("end.style."+e,my(e)):"function"==typeof t?this.styleTween(e,vy(e,n,xm(this,"style."+e,t))).each(xy(this._id,e)):this.styleTween(e,yy(e,n,t),r).on("end.style."+e,null)}var wy=e(()=>{Sf(),bg(),um(),bm(),km(),mt(fy,"styleNull"),mt(my,"styleRemove"),mt(yy,"styleConstant"),mt(vy,"styleFunction"),mt(xy,"styleMaybeRemove"),mt(by,"default")});function ky(t,r,n){return function(e){this.style.setProperty(t,r.call(this,e),n)}}function Ty(t,r,n){var i,a;function e(){var e=r.apply(this,arguments);return i=e!==a?(a=e)&&ky(t,e,n):i}return mt(e,"tween"),e._value=r,e}function Ey(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,Ty(e,t,r??""))}var Cy=e(()=>{mt(ky,"styleInterpolate"),mt(Ty,"styleTween"),mt(Ey,"default")});function Sy(e){return function(){this.textContent=e}}function _y(t){return function(){var e=t(this);this.textContent=e??""}}function Ay(e){return this.tween("text","function"==typeof e?_y(xm(this,"text",e)):Sy(null==e?"":e+""))}var Ly=e(()=>{bm(),mt(Sy,"textConstant"),mt(_y,"textFunction"),mt(Ay,"default")});function Ny(t){return function(e){this.textContent=t.call(this,e)}}function Iy(t){var r,n;function e(){var e=t.apply(this,arguments);return r=e!==n?(n=e)&&Ny(e):r}return mt(e,"tween"),e._value=t,e}function Ry(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,Iy(e))}var My=e(()=>{mt(Ny,"textInterpolate"),mt(Iy,"textTween"),mt(Ry,"default")});function Dy(){for(var e=this._name,t=this._id,r=++Gy,n=this._groups,i=n.length,a=0;a<i;++a)for(var s,o=n[a],l=o.length,c=0;c<l;++c)(s=o[c])&&Zf(s,e,r,c,o,{time:(s=em(s,t)).time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease});return new $y(n,this._parents,e,r)}var Oy=e(()=>{qy(),um(),mt(Dy,"default")});function Py(){var i,a,s=this,o=s._id,l=s.size();return new Promise(function(e,t){var r={value:t},n={value:mt(function(){0==--l&&e()},"value")};s.each(function(){var e=Jf(this,o),t=e.on;t!==i&&((a=(i=t).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(n)),e.on=a}),0===l&&e()})}var By=e(()=>{um(),mt(Py,"default")});function $y(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Fy(e){return yg().transition(e)}function zy(){return++Gy}var Gy,Uy,qy=e(()=>{bg(),Nm(),Pm(),zm(),jm(),Hm(),Km(),Qm(),ey(),iy(),oy(),cy(),uy(),gy(),wy(),Cy(),Ly(),My(),Oy(),bm(),By(),Gy=0,mt($y,"Transition"),mt(Fy,"transition"),mt(zy,"newId"),Uy=yg.prototype,$y.prototype=Fy.prototype={constructor:$y,select:ly,selectAll:hy,selectChild:Uy.selectChild,selectChildren:Uy.selectChildren,filter:Zm,merge:Jm,selection:dy,transition:Dy,call:Uy.call,nodes:Uy.nodes,node:Uy.node,size:Uy.size,empty:Uy.empty,each:Uy.each,on:ny,attr:Lm,attrTween:Om,style:by,styleTween:Ey,text:Ay,textTween:Ry,remove:sy,tween:vm,delay:Fm,duration:qm,ease:Ym,easeVarying:Xm,end:Py,[Symbol.iterator]:Uy[Symbol.iterator]}});function jy(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Wy=e(()=>{mt(jy,"cubicInOut")}),Yy=e(()=>{Wy()});function Hy(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 Vy(e){var t,r;e=e instanceof $y?(t=e._id,e._name):(t=++Gy,(r=Xy).time=_f(),null==e?null:e+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s,o=n[a],l=o.length,c=0;c<l;++c)(s=o[c])&&Zf(s,e,t,c,o,r||Hy(s,t));return new $y(n,this._parents,e,t)}var Xy,Ky=e(()=>{qy(),um(),Yy(),Kf(),Xy={time:null,delay:0,duration:250,ease:jy},mt(Hy,"inherit"),mt(Vy,"default")}),Zy=e(()=>{bg(),fm(),Ky(),yg.prototype.interrupt=gm,yg.prototype.transition=Vy}),Qy=e(()=>{Zy()}),Jy=e(()=>{}),e2=e(()=>{}),t2=e(()=>{});function r2(e){return[+e[0],+e[1]]}function n2(e){return[r2(e[0]),r2(e[1])]}function i2(e){return{type:e}}var a2,s2,o2,l2=e(()=>{Qy(),Jy(),e2(),t2(),{abs:a2,max:s2,min:o2}=Math,mt(r2,"number1"),mt(n2,"number2"),["w","e"].map(i2),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(i2),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(i2),mt(function(e){return null==e?null:n2(e)},"input"),mt(function(e){return e},"output"),mt(i2,"type")}),c2=e(()=>{l2()});function h2(r){this._+=r[0];for(let e=1,t=r.length;e<t;++e)this._+=arguments[e]+r[e]}function u2(e){var t=Math.floor(e);if(!(0<=t))throw new Error("invalid digits: "+e);if(15<t)return h2;let n=10**t;return function(r){this._+=r[0];for(let e=1,t=r.length;e<t;++e)this._+=Math.round(arguments[e]*n)/n+r[e]}}function d2(){return new y2}var p2,g2,f2,m2,y2,v2=e(()=>{p2=Math.PI,m2=(g2=2*p2)-(f2=1e-6),mt(h2,"append"),mt(u2,"appendRound"),y2=class{static{mt(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?h2:u2(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,n){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(e,t,r,n,i,a){this._append`C${+e},${+t},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,r,n,i){if(e=+e,t=+t,r=+r,n=+n,(i=+i)<0)throw new Error("negative radius: "+i);var a,s,o=this._x1,l=this._y1,c=r-e,h=n-t,u=o-e,d=l-t,p=u*u+d*d;null===this._x1?this._append`M${this._x1=e},${this._y1=t}`:f2<p&&(Math.abs(d*c-h*u)>f2&&i?(s=c*c+h*h,n=(r-=o)*r+(o=n-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=i*Math.tan((p2-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,Math.abs(p-1)>f2&&this._append`L${e+p*u},${t+p*d}`,this._append`A${i},${i},0,0,${+(u*o<d*r)},${this._x1=e+n*c},${this._y1=t+n*h}`):this._append`L${this._x1=e},${this._y1=t}`)}arc(e,t,r,n,i,a){if(e=+e,t=+t,a=!!a,(r=+r)<0)throw new Error("negative radius: "+r);var s=r*Math.cos(n),o=r*Math.sin(n),l=e+s,c=t+o,h=1^a,a=a?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>f2||Math.abs(this._y1-c)>f2)&&this._append`L${l},${c}`,r&&((a=a<0?a%g2+g2:a)>m2?this._append`A${r},${r},0,1,${h},${e-s},${t-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:f2<a&&this._append`A${r},${r},0,${+(p2<=a)},${h},${this._x1=e+r*Math.cos(i)},${this._y1=t+r*Math.sin(i)}`)}rect(e,t,r,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}},mt(d2,"path"),d2.prototype=y2.prototype}),x2=e(()=>{v2()}),b2=e(()=>{}),w2=e(()=>{}),k2=e(()=>{}),T2=e(()=>{}),E2=e(()=>{}),C2=e(()=>{}),S2=e(()=>{});function _2(e){return 1e21<=Math.abs(e=Math.round(e))?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function A2(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 L2=e(()=>{mt(_2,"default"),mt(A2,"formatDecimalParts")});function N2(e){return(e=A2(Math.abs(e)))?e[1]:NaN}var I2=e(()=>{L2(),mt(N2,"default")});function R2(o,l){return function(e,t){for(var r=e.length,n=[],i=0,a=o[0],s=0;0<r&&0<a&&(t<s+a+1&&(a=Math.max(1,t-s)),n.push(e.substring(r-=a,r+a)),!((s+=a+1)>t));)a=o[i=(i+1)%o.length];return n.reverse().join(l)}}var M2=e(()=>{mt(R2,"default")});function D2(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}var O2=e(()=>{mt(D2,"default")});function P2(e){var t;if(t=$2.exec(e))return new B2({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 B2(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 $2,F2=e(()=>{$2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,mt(P2,"formatSpecifier"),P2.prototype=B2.prototype,mt(B2,"FormatSpecifier"),B2.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 z2(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;0<i&&(i=0)}return 0<i?e.slice(0,i)+e.slice(t+1):e}var G2=e(()=>{mt(z2,"default")});function U2(e,t){var r,n,i=A2(e,t);return i?(r=i[0],(i=(i=i[1])-(q2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(n=r.length)?r:n<i?r+new Array(i-n+1).join("0"):0<i?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+A2(e,Math.max(0,t+i-1))[0]):e+""}var q2,j2=e(()=>{L2(),mt(U2,"default")});function W2(e,t){var r;return(t=A2(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 Y2,H2=e(()=>{L2(),mt(W2,"default")}),V2=e(()=>{L2(),j2(),H2(),Y2={"%":mt((e,t)=>(100*e).toFixed(t),"%"),b:mt(e=>Math.round(e).toString(2),"b"),c:mt(e=>e+"","c"),d:_2,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)=>W2(100*e,t),"p"),r:W2,s:U2,X:mt(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:mt(e=>Math.round(e).toString(16),"x")}});function X2(e){return e}var K2=e(()=>{mt(X2,"default")});function Z2(e){var k=void 0===e.grouping||void 0===e.thousands?X2:R2(Q2.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",T=void 0===e.decimal?".":e.decimal+"",E=void 0===e.numerals?X2:D2(Q2.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",C=void 0===e.minus?"−":e.minus+"",S=void 0===e.nan?"NaN":e.nan+"";function s(e){var c=(e=P2(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"):Y2[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===t?n:"#"===t&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===t?i:/[%p]/.test(y)?a:"",b=Y2[y],w=/[defgprs%]/.test(y);function r(e){var t,r,n,i=v,a=x;if("c"===y)a=b(e)+a,e="";else{var s=(e=+e)<0||1/e<0;if(e=isNaN(e)?S:b(Math.abs(e),f),m&&(e=z2(e)),i=((s=(!s||0!=+e||"+"===u)&&s)?"("===u?u:C:"-"===u||"("===u?"":u)+i,a=("s"===y?J2[8+q2/3]:"")+a+(s&&"("===u?")":""),w)for(t=-1,r=e.length;++t<r;)if((n=e.charCodeAt(t))<48||57<n){a=(46===n?T+e.slice(t+1):e.slice(t))+a,e=e.slice(0,t);break}}g&&!d&&(e=k(e,1/0));var o=i.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=i+e+a+l;break;case"=":e=i+l+e+a;break;case"^":e=l.slice(0,o=l.length>>1)+i+e+a+l.slice(o);break;default:e=l+i+e+a}return E(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=P2(e)).type="f",e)),e=3*Math.max(-8,Math.min(8,Math.floor(N2(t)/3))),n=Math.pow(10,-e),i=J2[8+e/3];return function(e){return r(n*e)+i}}return mt(s,"newFormat"),mt(t,"formatPrefix"),{format:s,formatPrefix:t}}var Q2,J2,ev=e(()=>{I2(),M2(),O2(),F2(),G2(),V2(),j2(),K2(),Q2=Array.prototype.map,J2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],mt(Z2,"default")});function tv(e){return rv=Z2(e),nv=rv.format,iv=rv.formatPrefix,rv}var rv,nv,iv,av=e(()=>{ev(),tv({thousands:",",grouping:[3],currency:["$",""]}),mt(tv,"defaultLocale")});function sv(e){return Math.max(0,-N2(Math.abs(e)))}var ov=e(()=>{I2(),mt(sv,"default")});function lv(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(N2(t)/3)))-N2(Math.abs(e)))}var cv=e(()=>{I2(),mt(lv,"default")});function hv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,N2(t)-N2(e))+1}var uv=e(()=>{I2(),mt(hv,"default")}),dv=e(()=>{av(),F2(),ov(),cv(),uv()}),pv=e(()=>{});function gv(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;0<=--n;)t+=r[n].value;else t=1;e.value=t}function fv(){return this.eachAfter(gv)}var mv=e(()=>{mt(gv,"count"),mt(fv,"default")});function yv(e,t){let r=-1;for(var n of this)e.call(t,n,++r,this);return this}var vv=e(()=>{mt(yv,"default")});function xv(e,t){for(var r,n,i,a=[this],s=-1;r=a.pop();)if(e.call(t,r,++s,this),n=r.children)for(i=n.length-1;0<=i;--i)a.push(n[i]);return this}var bv=e(()=>{mt(xv,"default")});function wv(e,t){for(var r,n,i,a=this,s=[a],o=[],l=-1;a=s.pop();)if(o.push(a),r=a.children)for(n=0,i=r.length;n<i;++n)s.push(r[n]);for(;a=o.pop();)e.call(t,a,++l,this);return this}var kv=e(()=>{mt(wv,"default")});function Tv(e,t){let r=-1;for(var n of this)if(e.call(t,n,++r,this))return n}var Ev=e(()=>{mt(Tv,"default")});function Cv(i){return this.eachAfter(function(e){for(var t=+i(e.data)||0,r=e.children,n=r&&r.length;0<=--n;)t+=r[n].value;e.value=t})}var Sv=e(()=>{mt(Cv,"default")});function _v(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}var Av=e(()=>{mt(_v,"default")});function Lv(e){for(var t=this,r=Nv(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function Nv(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}var Iv=e(()=>{mt(Lv,"default"),mt(Nv,"leastCommonAncestor")});function Rv(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var Mv=e(()=>{mt(Rv,"default")});function Dv(){return Array.from(this)}var Ov=e(()=>{mt(Dv,"default")});function Pv(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}var Bv=e(()=>{mt(Pv,"default")});function $v(){var t=this,r=[];return t.each(function(e){e!==t&&r.push({source:e.parent,target:e})}),r}var Fv=e(()=>{mt($v,"default")});function*zv(){var e,t,r,n,i,a=[this];do{for(t=a.reverse(),a=[];e=t.pop();)if(yield e,r=e.children)for(n=0,i=r.length;n<i;++n)a.push(r[n])}while(a.length)}var Gv=e(()=>{mt(zv,"default")});function Uv(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Wv)):void 0===t&&(t=jv);for(var r,n,i,a,s,o=[e=new Vv(e)];r=o.pop();)if((i=t(r.data))&&(s=(i=Array.from(i)).length))for(r.children=i,a=s-1;0<=a;--a)o.push(n=i[a]=new Vv(i[a])),n.parent=r,n.depth=r.depth+1;return e.eachBefore(Hv)}function qv(){return Uv(this).eachBefore(Yv)}function jv(e){return e.children}function Wv(e){return Array.isArray(e)?e[1]:null}function Yv(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Hv(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function Vv(e){this.data=e,this.depth=this.height=0,this.parent=null}var Xv=e(()=>{mv(),vv(),bv(),kv(),Ev(),Sv(),Av(),Iv(),Mv(),Ov(),Bv(),Fv(),Gv(),mt(Uv,"hierarchy"),mt(qv,"node_copy"),mt(jv,"objectChildren"),mt(Wv,"mapChildren"),mt(Yv,"copyData"),mt(Hv,"computeHeight"),mt(Vv,"Node"),Vv.prototype=Uv.prototype={constructor:Vv,count:fv,each:yv,eachAfter:wv,eachBefore:xv,find:Tv,sum:Cv,sort:_v,path:Lv,ancestors:Rv,descendants:Dv,leaves:Pv,links:$v,copy:qv,[Symbol.iterator]:zv}});function Kv(e){if("function"!=typeof e)throw new Error;return e}var Zv=e(()=>{mt(Kv,"required")});function Qv(){return 0}function Jv(e){return function(){return e}}var ex=e(()=>{mt(Qv,"constantZero"),mt(Jv,"default")});function tx(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 rx=e(()=>{mt(tx,"default")});function nx(e,t,r,n,i){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(n-t)/e.value;++o<l;)(a=s[o]).y0=r,a.y1=i,a.x0=t,a.x1=t+=a.value*c}var ix=e(()=>{mt(nx,"default")});function ax(e,t,r,n,i){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(i-r)/e.value;++o<l;)(a=s[o]).x0=t,a.x1=n,a.y0=r,a.y1=r+=a.value*c}var sx=e(()=>{mt(ax,"default")});function ox(e,t,r,n,i,a){for(var s,o,l,c,h,u,d,p,g,f,m,y=[],v=t.children,x=0,b=0,w=v.length,k=t.value;x<w;){for(l=i-r,c=a-n;!(h=v[b++].value)&&b<w;);for(m=(u=d=h)*h*(f=Math.max(c/l,l/c)/(k*e)),g=Math.max(d/m,m/u);b<w;++b){if(h+=o=v[b].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(x,b)}),s.dice?nx(s,r,n,i,k?n+=c*h/k:a):ax(s,r,n,k?r+=l*h/k:i,a),k-=h,x=b}return y}var lx,cx,hx=e(()=>{ix(),sx(),lx=(1+Math.sqrt(5))/2,mt(ox,"squarifyRatio"),cx=mt(function t(a){function e(e,t,r,n,i){ox(a,e,t,r,n,i)}return mt(e,"squarify"),e.ratio=function(e){return t(1<(e=+e)?e:1)},e},"custom")(lx)});function ux(){var s=cx,t=!1,r=1,n=1,o=[0],l=Qv,c=Qv,h=Qv,u=Qv,d=Qv;function i(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(a),o=[0],t&&e.eachBefore(tx),e}function a(e){var t=o[e.depth],r=e.x0+t,n=e.y0+t,i=e.x1-t,a=e.y1-t;i<r&&(r=i=(r+i)/2),a<n&&(n=a=(n+a)/2),e.x0=r,e.y0=n,e.x1=i,e.y1=a,e.children&&(t=o[e.depth+1]=l(e)/2,r+=d(e)-t,n+=c(e)-t,(i-=h(e)-t)<r&&(r=i=(r+i)/2),(a-=u(e)-t)<n&&(n=a=(n+a)/2),s(e,r,n,i,a))}return mt(i,"treemap"),mt(a,"positionNode"),i.round=function(e){return arguments.length?(t=!!e,i):t},i.size=function(e){return arguments.length?(r=+e[0],n=+e[1],i):[r,n]},i.tile=function(e){return arguments.length?(s=Kv(e),i):s},i.padding=function(e){return arguments.length?i.paddingInner(e).paddingOuter(e):i.paddingInner()},i.paddingInner=function(e){return arguments.length?(l="function"==typeof e?e:Jv(+e),i):l},i.paddingOuter=function(e){return arguments.length?i.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):i.paddingTop()},i.paddingTop=function(e){return arguments.length?(c="function"==typeof e?e:Jv(+e),i):c},i.paddingRight=function(e){return arguments.length?(h="function"==typeof e?e:Jv(+e),i):h},i.paddingBottom=function(e){return arguments.length?(u="function"==typeof e?e:Jv(+e),i):u},i.paddingLeft=function(e){return arguments.length?(d="function"==typeof e?e:Jv(+e),i):d},i}var dx=e(()=>{rx(),hx(),Zv(),ex(),mt(ux,"default")}),px=e(()=>{Xv(),dx()}),gx=e(()=>{}),fx=e(()=>{});function mx(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var yx=e(()=>{mt(mx,"initRange")});function vx(){var r=new Uu,n=[],i=[],a=xx;function s(e){let t=r.get(e);if(void 0===t){if(a!==xx)return a;r.set(e,t=n.push(e)-1)}return i[t%i.length]}return mt(s,"scale"),s.domain=function(e){if(!arguments.length)return n.slice();n=[],r=new Uu;for(var t of e)r.has(t)||r.set(t,n.push(t)-1);return s},s.range=function(e){return arguments.length?(i=Array.from(e),s):i.slice()},s.unknown=function(e){return arguments.length?(a=e,s):a},s.copy=function(){return vx(n,i).unknown(a)},mx.apply(s,arguments),s}var xx,bx=e(()=>{id(),yx(),xx=Symbol("implicit"),mt(vx,"ordinal")});function wx(){var i,a,e=vx().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,n=(i=((n=t?l:c)-r)/Math.max(1,e-u+2*d),h&&(i=Math.floor(i)),r+=(n-r-i*(e-u))*p,a=i*(1-u),h&&(r=Math.round(r),a=Math.round(a)),rd(e).map(function(e){return r+i*e}));return o(t?n.reverse():n)}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 i},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 wx(s(),[l,c]).round(h).paddingInner(u).paddingOuter(d).align(p)},mx.apply(t(),arguments)}var kx=e(()=>{id(),yx(),bx(),mt(wx,"band")});function Tx(e){return function(){return e}}var Ex=e(()=>{mt(Tx,"constants")});function Cx(e){return+e}var Sx=e(()=>{mt(Cx,"number")});function _x(e){return e}function Ax(t,r){return(r-=t=+t)?function(e){return(e-t)/r}:Tx(isNaN(r)?NaN:.5)}function Lx(t,r){var e;return r<t&&(e=t,t=r,r=e),function(e){return Math.max(t,Math.min(r,e))}}function Nx(e,t,r){var n=e[0],e=e[1],i=t[0],t=t[1],i=e<n?(n=Ax(e,n),r(t,i)):(n=Ax(n,e),r(i,t));return function(e){return i(n(e))}}function Ix(r,e,t){var n=Math.min(r.length,e.length)-1,i=new Array(n),a=new Array(n),s=-1;for(r[n]<r[0]&&(r=r.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=Ax(r[s],r[s+1]),a[s]=t(e[s],e[s+1]);return function(e){var t=Ou(r,e,1,n)-1;return a[t](i[t](e))}}function Rx(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Mx(){var r,n,t,i,a,s,o=Ox,l=Ox,c=of,h=_x;function u(){var e=Math.min(o.length,l.length);return h!==_x&&(h=Lx(o[0],o[e-1])),i=2<e?Ix:Nx,a=s=null,d}function d(e){return null==e||isNaN(e=+e)?t:(a=a||i(o.map(r),l,c))(r(h(e)))}return mt(u,"rescale"),mt(d,"scale"),d.invert=function(e){return h(n((s=s||i(l,o.map(r),K1))(e)))},d.domain=function(e){return arguments.length?(o=Array.from(e,Cx),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=cf,u()},d.clamp=function(e){return arguments.length?(h=!!e||_x,u()):h!==_x},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,n=t,u()}}function Dx(){return Mx()(_x,_x)}var Ox,Px=e(()=>{id(),Sf(),Ex(),Sx(),Ox=[0,1],mt(_x,"identity"),mt(Ax,"normalize"),mt(Lx,"clamper"),mt(Nx,"bimap"),mt(Ix,"polymap"),mt(Rx,"copy"),mt(Mx,"transformer"),mt(Dx,"continuous")});function Bx(e,t,r,n){var i,a=Hu(e,t,r);switch((n=P2(n??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=lv(a,s))||(n.precision=i),iv(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=hv(a,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=sv(a))||(n.precision=i-2*("%"===n.type))}return nv(n)}var $x=e(()=>{id(),dv(),mt(Bx,"tickFormat")});function Fx(c){var h=c.domain;return c.ticks=function(e){var t=h();return Wu(t[0],t[t.length-1],e??10)},c.tickFormat=function(e,t){var r=h();return Bx(r[0],r[r.length-1],e??10,t)},c.nice=function(e){null==e&&(e=10);var t,r,n=h(),i=0,a=n.length-1,s=n[i],o=n[a],l=10;for(o<s&&(r=s,s=o,o=r,r=i,i=a,a=r);0<l--;){if((r=Yu(s,o,e))===t)return n[i]=s,n[a]=o,h(n);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 zx(){var e=Dx();return e.copy=function(){return Rx(e,zx())},mx.apply(e,arguments),Fx(e)}var Gx=e(()=>{id(),Px(),yx(),$x(),mt(Fx,"linearish"),mt(zx,"linear")});function Ux(e,t){var r,n=0,i=(e=e.slice()).length-1,a=e[n],s=e[i];return s<a&&(r=n,n=i,i=r,r=a,a=s,s=r),e[n]=t.floor(a),e[i]=t.ceil(s),e}var qx=e(()=>{mt(Ux,"nice")});function jx(a,s,r,n){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 n,i=[];if(e=o.ceil(e),r=null==r?1:Math.floor(r),e<t&&0<r)for(;i.push(n=new Date(+e)),s(e,r),a(e),n<e&&e<t;);return i},o.filter=r=>jx(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)=>(Wx.setTime(+e),Yx.setTime(+t),a(Wx),a(Yx),Math.floor(r(Wx,Yx))),o.every=t=>(t=Math.floor(t),isFinite(t)&&0<t?1<t?o.filter(n?e=>n(e)%t==0:e=>o.count(0,e)%t==0):o:null)),o}var Wx,Yx,Hx,Vx,Xx,Kx,Zx,Qx,Jx,eb,tb,rb=e(()=>{Wx=new Date,Yx=new Date,mt(jx,"timeInterval")}),nb=e(()=>{rb(),(Hx=jx(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e)).every=r=>(r=Math.floor(r),isFinite(r)&&0<r?1<r?jx(e=>{e.setTime(Math.floor(e/r)*r)},(e,t)=>{e.setTime(+e+t*r)},(e,t)=>(t-e)/r):Hx:null)}),ib=e(()=>{rb(),(Vx=jx(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds())).range}),ab=e(()=>{rb(),(Xx=jx(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,(Kx=jx(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes())).range}),sb=e(()=>{rb(),(Zx=jx(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,(Qx=jx(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours())).range}),ob=e(()=>{rb(),(Jx=jx(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,(eb=jx(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1)).range,(tb=jx(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5))).range});function lb(t){return jx(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 cb(t){return jx(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 hb,ub,db,pb,gb,fb,mb,yb,vb,xb,bb,wb,kb,Tb,Eb,Cb,Sb,_b,Ab=e(()=>{rb(),mt(lb,"timeWeekday"),hb=lb(0),ub=lb(1),db=lb(2),pb=lb(3),gb=lb(4),fb=lb(5),mb=lb(6),hb.range,ub.range,db.range,pb.range,gb.range,fb.range,mb.range,mt(cb,"utcWeekday"),yb=cb(0),vb=cb(1),xb=cb(2),bb=cb(3),wb=cb(4),kb=cb(5),Tb=cb(6),yb.range,vb.range,xb.range,bb.range,wb.range,kb.range,Tb.range}),Lb=e(()=>{rb(),(Eb=jx(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,(Cb=jx(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}),Nb=e(()=>{rb(),(Sb=jx(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?jx(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,(_b=jx(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?jx(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 Ib(a,e,t,r,n,i){let s=[[Vx,1,1e3],[Vx,5,5e3],[Vx,15,15e3],[Vx,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[n,1,36e5],[n,3,108e5],[n,6,216e5],[n,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 n=t<e;return n&&([e,t]=[t,e]),r=(r=r&&"function"==typeof r.range?r:l(e,t,r))?r.range(e,+t+1):[],n?r.reverse():r}function l(e,t,r){var n=Math.abs(t-e)/r,i=Nu(([,,e])=>e).right(s,n);return i===s.length?a.every(Hu(e/31536e6,t/31536e6,r)):0===i?Hx.every(Math.max(Hu(e,t,r),1)):([e,t]=s[n/s[i-1][2]<s[i][2]/n?i-1:i],e.every(t))}return mt(o,"ticks"),mt(l,"tickInterval"),[o,l]}var Rb,Mb,Db,Ob,Pb=e(()=>{id(),nb(),ib(),ab(),sb(),ob(),Ab(),Lb(),Nb(),mt(Ib,"ticker"),[Rb,Mb]=Ib(_b,Cb,yb,tb,Qx,Kx),[Db,Ob]=Ib(Sb,Eb,hb,Jx,Zx,Xx)}),Bb=e(()=>{nb(),ib(),ab(),sb(),ob(),Ab(),Lb(),Nb(),Pb()});function $b(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 Fb(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 zb(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Gb(e){var n=e.dateTime,i=e.date,a=e.time,t=e.periods,r=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=jb(t),h=Wb(t),P=jb(r),B=Wb(r),$=jb(s),F=Wb(s),z=jb(o),G=Wb(o),U=jb(l),q=Wb(l),u={a:E,A:C,b:S,B:_,c:null,d:d4,e:d4,f:y4,g:A4,G:N4,H:p4,I:g4,j:f4,L:m4,m:v4,M:x4,p:A,q:L,Q:J4,s:e5,S:b4,u:w4,U:k4,V:E4,w:C4,W:S4,x:null,X:null,y:_4,Y:L4,Z:I4,"%":Q4},d={a:N,A:I,b:R,B:M,c:null,d:R4,e:R4,f:B4,g:V4,G:K4,H:M4,I:D4,j:O4,L:P4,m:$4,M:F4,p:D,q:O,Q:J4,s:e5,S:z4,u:G4,U:U4,V:j4,w:W4,W:Y4,x:null,X:null,y:H4,Y:X4,Z:Z4,"%":Q4},j={a:y,A:v,b:x,B:b,c:w,d:r4,e:r4,f:l4,g:Qb,G:Zb,H:i4,I:i4,j:n4,L:o4,m:t4,M:a4,p:m,q:e4,Q:h4,s:u4,S:s4,u:Hb,U:Vb,V:Xb,w:Yb,W:Kb,x:k,X:T,y:Qb,Y:Zb,Z:Jb,"%":c4};function p(l,c){return function(e){var t,r,n,i=[],a=-1,s=0,o=l.length;for(e instanceof Date||(e=new Date(+e));++a<o;)37===l.charCodeAt(a)&&(i.push(l.slice(s,a)),null!=(r=t5[t=l.charAt(++a)])?t=l.charAt(++a):r="e"===t?" ":"0",(n=c[t])&&(t=n(e,r)),i.push(t),s=a+1);return i.push(l.slice(s,a)),i.join("")}}function g(i,a){return function(e){var t,r,n=zb(1900,void 0,1);if(f(n,i,e+="",0)!=e.length)return null;if("Q"in n)return new Date(n.Q);if("s"in n)return new Date(1e3*n.s+("L"in n?n.L:0));if(!a||"Z"in n||(n.Z=0),"p"in n&&(n.H=n.H%12+12*n.p),void 0===n.m&&(n.m="q"in n?n.q:0),"V"in n){if(n.V<1||53<n.V)return null;"w"in n||(n.w=1),"Z"in n?(t=4<(r=(t=Fb(zb(n.y,0,1))).getUTCDay())||0===r?vb.ceil(t):vb(t),t=eb.offset(t,7*(n.V-1)),n.y=t.getUTCFullYear(),n.m=t.getUTCMonth(),n.d=t.getUTCDate()+(n.w+6)%7):(t=4<(r=(t=$b(zb(n.y,0,1))).getDay())||0===r?ub.ceil(t):ub(t),t=Jx.offset(t,7*(n.V-1)),n.y=t.getFullYear(),n.m=t.getMonth(),n.d=t.getDate()+(n.w+6)%7)}else("W"in n||"U"in n)&&("w"in n||(n.w="u"in n?n.u%7:"W"in n?1:0),r="Z"in n?Fb(zb(n.y,0,1)).getUTCDay():$b(zb(n.y,0,1)).getDay(),n.m=0,n.d="W"in n?(n.w+6)%7+7*n.W-(r+5)%7:n.w+7*n.U-(r+6)%7);return("Z"in n?(n.H+=n.Z/100|0,n.M+=n.Z%100,Fb):$b)(n)}}function f(e,t,r,n){for(var i,a,s=0,o=t.length,l=r.length;s<o;){if(l<=n)return-1;if(37===(i=t.charCodeAt(s++))){if(i=t.charAt(s++),!(a=j[i in t5?t.charAt(s++):i])||(n=a(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}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 x(e,t,r){return(t=U.exec(t.slice(r)))?(e.m=q.get(t[0].toLowerCase()),r+t[0].length):-1}function b(e,t,r){return(t=z.exec(t.slice(r)))?(e.m=G.get(t[0].toLowerCase()),r+t[0].length):-1}function w(e,t,r){return f(e,n,t,r)}function k(e,t,r){return f(e,i,t,r)}function T(e,t,r){return f(e,a,t,r)}function E(e){return s[e.getDay()]}function C(e){return r[e.getDay()]}function S(e){return l[e.getMonth()]}function _(e){return o[e.getMonth()]}function A(e){return t[+(12<=e.getHours())]}function L(e){return 1+~~(e.getMonth()/3)}function N(e){return s[e.getUTCDay()]}function I(e){return r[e.getUTCDay()]}function R(e){return l[e.getUTCMonth()]}function M(e){return o[e.getUTCMonth()]}function D(e){return t[+(12<=e.getUTCHours())]}function O(e){return 1+~~(e.getUTCMonth()/3)}return u.x=p(i,u),u.X=p(a,u),u.c=p(n,u),d.x=p(i,d),d.X=p(a,d),d.c=p(n,d),mt(p,"newFormat"),mt(g,"newParse"),mt(f,"parseSpecifier"),mt(m,"parsePeriod"),mt(y,"parseShortWeekday"),mt(v,"parseWeekday"),mt(x,"parseShortMonth"),mt(b,"parseMonth"),mt(w,"parseLocaleDateTime"),mt(k,"parseLocaleDate"),mt(T,"parseLocaleTime"),mt(E,"formatShortWeekday"),mt(C,"formatWeekday"),mt(S,"formatShortMonth"),mt(_,"formatMonth"),mt(A,"formatPeriod"),mt(L,"formatQuarter"),mt(N,"formatUTCShortWeekday"),mt(I,"formatUTCWeekday"),mt(R,"formatUTCShortMonth"),mt(M,"formatUTCMonth"),mt(D,"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 Ub(e,t,r){var n=e<0?"-":"",i=(e=(n?-e:e)+"").length;return n+(i<r?new Array(r-i+1).join(t)+e:e)}function qb(e){return e.replace(i5,"\\$&")}function jb(e){return new RegExp("^(?:"+e.map(qb).join("|")+")","i")}function Wb(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Yb(e,t,r){return(t=r5.exec(t.slice(r,r+1)))?(e.w=+t[0],r+t[0].length):-1}function Hb(e,t,r){return(t=r5.exec(t.slice(r,r+1)))?(e.u=+t[0],r+t[0].length):-1}function Vb(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.U=+t[0],r+t[0].length):-1}function Xb(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.V=+t[0],r+t[0].length):-1}function Kb(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.W=+t[0],r+t[0].length):-1}function Zb(e,t,r){return(t=r5.exec(t.slice(r,r+4)))?(e.y=+t[0],r+t[0].length):-1}function Qb(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.y=+t[0]+(68<+t[0]?1900:2e3),r+t[0].length):-1}function Jb(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 e4(e,t,r){return(t=r5.exec(t.slice(r,r+1)))?(e.q=3*t[0]-3,r+t[0].length):-1}function t4(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.m=t[0]-1,r+t[0].length):-1}function r4(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.d=+t[0],r+t[0].length):-1}function n4(e,t,r){return(t=r5.exec(t.slice(r,r+3)))?(e.m=0,e.d=+t[0],r+t[0].length):-1}function i4(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.H=+t[0],r+t[0].length):-1}function a4(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.M=+t[0],r+t[0].length):-1}function s4(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.S=+t[0],r+t[0].length):-1}function o4(e,t,r){return(t=r5.exec(t.slice(r,r+3)))?(e.L=+t[0],r+t[0].length):-1}function l4(e,t,r){return(t=r5.exec(t.slice(r,r+6)))?(e.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function c4(e,t,r){return(t=n5.exec(t.slice(r,r+1)))?r+t[0].length:-1}function h4(e,t,r){return(t=r5.exec(t.slice(r)))?(e.Q=+t[0],r+t[0].length):-1}function u4(e,t,r){return(t=r5.exec(t.slice(r)))?(e.s=+t[0],r+t[0].length):-1}function d4(e,t){return Ub(e.getDate(),t,2)}function p4(e,t){return Ub(e.getHours(),t,2)}function g4(e,t){return Ub(e.getHours()%12||12,t,2)}function f4(e,t){return Ub(1+Jx.count(Sb(e),e),t,3)}function m4(e,t){return Ub(e.getMilliseconds(),t,3)}function y4(e,t){return m4(e,t)+"000"}function v4(e,t){return Ub(e.getMonth()+1,t,2)}function x4(e,t){return Ub(e.getMinutes(),t,2)}function b4(e,t){return Ub(e.getSeconds(),t,2)}function w4(e){return 0===(e=e.getDay())?7:e}function k4(e,t){return Ub(hb.count(Sb(e)-1,e),t,2)}function T4(e){var t=e.getDay();return 4<=t||0===t?gb(e):gb.ceil(e)}function E4(e,t){return e=T4(e),Ub(gb.count(Sb(e),e)+(4===Sb(e).getDay()),t,2)}function C4(e){return e.getDay()}function S4(e,t){return Ub(ub.count(Sb(e)-1,e),t,2)}function _4(e,t){return Ub(e.getFullYear()%100,t,2)}function A4(e,t){return Ub((e=T4(e)).getFullYear()%100,t,2)}function L4(e,t){return Ub(e.getFullYear()%1e4,t,4)}function N4(e,t){var r=e.getDay();return Ub((e=4<=r||0===r?gb(e):gb.ceil(e)).getFullYear()%1e4,t,4)}function I4(e){return(0<(e=e.getTimezoneOffset())?"-":(e*=-1,"+"))+Ub(e/60|0,"0",2)+Ub(e%60,"0",2)}function R4(e,t){return Ub(e.getUTCDate(),t,2)}function M4(e,t){return Ub(e.getUTCHours(),t,2)}function D4(e,t){return Ub(e.getUTCHours()%12||12,t,2)}function O4(e,t){return Ub(1+eb.count(_b(e),e),t,3)}function P4(e,t){return Ub(e.getUTCMilliseconds(),t,3)}function B4(e,t){return P4(e,t)+"000"}function $4(e,t){return Ub(e.getUTCMonth()+1,t,2)}function F4(e,t){return Ub(e.getUTCMinutes(),t,2)}function z4(e,t){return Ub(e.getUTCSeconds(),t,2)}function G4(e){return 0===(e=e.getUTCDay())?7:e}function U4(e,t){return Ub(yb.count(_b(e)-1,e),t,2)}function q4(e){var t=e.getUTCDay();return 4<=t||0===t?wb(e):wb.ceil(e)}function j4(e,t){return e=q4(e),Ub(wb.count(_b(e),e)+(4===_b(e).getUTCDay()),t,2)}function W4(e){return e.getUTCDay()}function Y4(e,t){return Ub(vb.count(_b(e)-1,e),t,2)}function H4(e,t){return Ub(e.getUTCFullYear()%100,t,2)}function V4(e,t){return Ub((e=q4(e)).getUTCFullYear()%100,t,2)}function X4(e,t){return Ub(e.getUTCFullYear()%1e4,t,4)}function K4(e,t){var r=e.getUTCDay();return Ub((e=4<=r||0===r?wb(e):wb.ceil(e)).getUTCFullYear()%1e4,t,4)}function Z4(){return"+0000"}function Q4(){return"%"}function J4(e){return+e}function e5(e){return Math.floor(+e/1e3)}var t5,r5,n5,i5,a5=e(()=>{Bb(),mt($b,"localDate"),mt(Fb,"utcDate"),mt(zb,"newDate"),mt(Gb,"formatLocale"),t5={"-":"",_:" ",0:"0"},r5=/^\s*\d+/,n5=/^%/,i5=/[\\^$*+?|[\]().{}]/g,mt(Ub,"pad"),mt(qb,"requote"),mt(jb,"formatRe"),mt(Wb,"formatLookup"),mt(Yb,"parseWeekdayNumberSunday"),mt(Hb,"parseWeekdayNumberMonday"),mt(Vb,"parseWeekNumberSunday"),mt(Xb,"parseWeekNumberISO"),mt(Kb,"parseWeekNumberMonday"),mt(Zb,"parseFullYear"),mt(Qb,"parseYear"),mt(Jb,"parseZone"),mt(e4,"parseQuarter"),mt(t4,"parseMonthNumber"),mt(r4,"parseDayOfMonth"),mt(n4,"parseDayOfYear"),mt(i4,"parseHour24"),mt(a4,"parseMinutes"),mt(s4,"parseSeconds"),mt(o4,"parseMilliseconds"),mt(l4,"parseMicroseconds"),mt(c4,"parseLiteralPercent"),mt(h4,"parseUnixTimestamp"),mt(u4,"parseUnixTimestampSeconds"),mt(d4,"formatDayOfMonth"),mt(p4,"formatHour24"),mt(g4,"formatHour12"),mt(f4,"formatDayOfYear"),mt(m4,"formatMilliseconds"),mt(y4,"formatMicroseconds"),mt(v4,"formatMonthNumber"),mt(x4,"formatMinutes"),mt(b4,"formatSeconds"),mt(w4,"formatWeekdayNumberMonday"),mt(k4,"formatWeekNumberSunday"),mt(T4,"dISO"),mt(E4,"formatWeekNumberISO"),mt(C4,"formatWeekdayNumberSunday"),mt(S4,"formatWeekNumberMonday"),mt(_4,"formatYear"),mt(A4,"formatYearISO"),mt(L4,"formatFullYear"),mt(N4,"formatFullYearISO"),mt(I4,"formatZone"),mt(R4,"formatUTCDayOfMonth"),mt(M4,"formatUTCHour24"),mt(D4,"formatUTCHour12"),mt(O4,"formatUTCDayOfYear"),mt(P4,"formatUTCMilliseconds"),mt(B4,"formatUTCMicroseconds"),mt($4,"formatUTCMonthNumber"),mt(F4,"formatUTCMinutes"),mt(z4,"formatUTCSeconds"),mt(G4,"formatUTCWeekdayNumberMonday"),mt(U4,"formatUTCWeekNumberSunday"),mt(q4,"UTCdISO"),mt(j4,"formatUTCWeekNumberISO"),mt(W4,"formatUTCWeekdayNumberSunday"),mt(Y4,"formatUTCWeekNumberMonday"),mt(H4,"formatUTCYear"),mt(V4,"formatUTCYearISO"),mt(X4,"formatUTCFullYear"),mt(K4,"formatUTCFullYearISO"),mt(Z4,"formatUTCZone"),mt(Q4,"formatLiteralPercent"),mt(J4,"formatUnixTimestamp"),mt(e5,"formatUnixTimestampSeconds")});function s5(e){return o5=Gb(e),l5=o5.format,o5}var o5,l5,c5=e(()=>{a5(),s5({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(s5,"defaultLocale")}),h5=e(()=>{c5()});function u5(e){return new Date(e)}function d5(e){return e instanceof Date?+e:+new Date(+e)}function p5(r,n,t,i,a,s,o,l,c,h){var u=Dx(),d=u.invert,p=u.domain,g=h(".%L"),f=h(":%S"),m=h("%I:%M"),y=h("%I %p"),v=h("%a %d"),x=h("%b %d"),b=h("%B"),w=h("%Y");function k(e){return(c(e)<e?g:l(e)<e?f:o(e)<e?m:s(e)<e?y:i(e)<e?a(e)<e?v:x:t(e)<e?b:w)(e)}return mt(k,"tickFormat"),u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?p(Array.from(e,d5)):p().map(u5)},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:n(t[0],t[t.length-1],e??10))?p(Ux(t,e)):u},u.copy=function(){return Rx(u,p5(r,n,t,i,a,s,o,l,c,h))},u}function g5(){return mx.apply(p5(Db,Ob,Sb,Eb,hb,Jx,Zx,Xx,Vx,l5).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var f5=e(()=>{Bb(),h5(),Px(),yx(),qx(),mt(u5,"date"),mt(d5,"number"),mt(p5,"calendar"),mt(g5,"time")}),m5=e(()=>{kx(),Gx(),bx(),f5()});function y5(e){for(var t=e.length/6|0,r=new Array(t),n=0;n<t;)r[n]="#"+e.slice(6*n,6*++n);return r}var v5,x5=e(()=>{mt(y5,"default")}),b5=e(()=>{x5(),v5=y5("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),w5=e(()=>{b5()});function k5(e){return mt(function(){return e},"constant")}var T5=e(()=>{mt(k5,"default")});function E5(e){return 1<e?0:e<-1?D5:Math.acos(e)}function C5(e){return 1<=e?O5:e<=-1?-O5:Math.asin(e)}var S5,_5,A5,L5,N5,I5,R5,M5,D5,O5,P5,B5=e(()=>{S5=Math.abs,_5=Math.atan2,A5=Math.cos,L5=Math.max,N5=Math.min,I5=Math.sin,R5=Math.sqrt,M5=1e-12,O5=(D5=Math.PI)/2,P5=2*D5,mt(E5,"acos"),mt(C5,"asin")});function $5(r){let n=3;return r.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{var t=Math.floor(e);if(!(0<=t))throw new RangeError("invalid digits: "+e);n=t}return r},()=>new y2(n)}var F5=e(()=>{x2(),mt($5,"withPath")});function z5(e){return e.innerRadius}function G5(e){return e.outerRadius}function U5(e){return e.startAngle}function q5(e){return e.endAngle}function j5(e){return e&&e.padAngle}function W5(e,t,r,n,i,a,s,o){var l=(o-=a)*(r-=e)-(s-=i)*(n-=t);if(!(l*l<M5))return[e+(l=(s*(t-a)-o*(e-i))/l)*r,t+l*n]}function Y5(e,t,r,n,i,a,s){var o=(s=(s?a:-a)/R5((l=e-r)*l+(o=t-n)*o))*o,s=-s*l,l=e+o,e=t+s,t=r+o,r=n+s,n=(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)*R5(L5(0,(a=i-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-n)*r+(d=l-c)*d<(h=t-n)*h+(u=e-c)*u&&(t=p,e=l),{cx:t,cy:e,x01:-o,y01:-s,x11:t*(i/a-1),y11:e*(i/a-1)}}function H5(){var A=z5,L=G5,N=k5(0),I=null,R=U5,M=q5,D=j5,O=null,P=$5(t);function t(){var e,t,r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k=+A.apply(this,arguments),T=+L.apply(this,arguments),E=R.apply(this,arguments)-O5,C=M.apply(this,arguments)-O5,S=S5(C-E),_=E<C;if(O=O||(e=P()),T<k&&(t=T,T=k,k=t),M5<T?P5-M5<S?(O.moveTo(T*A5(E),T*I5(E)),O.arc(0,0,T,E,C,!_),M5<k&&(O.moveTo(k*A5(C),k*I5(C)),O.arc(0,0,k,C,E,_))):(n=t=E,i=r=C,s=a=S,h=D.apply(this,arguments)/2,d=M5<h&&(I?+I.apply(this,arguments):R5(k*k+T*T)),w=b=o=N5(S5(T-k)/2,+N.apply(this,arguments)),M5<d&&(u=C5(d/k*I5(h)),d=C5(d/T*I5(h)),(a-=2*u)>M5?(n+=u*=_?1:-1,i-=u):(a=0,n=i=(E+C)/2),(s-=2*d)>M5?(t+=d*=_?1:-1,r-=d):(s=0,t=r=(E+C)/2)),h=T*A5(t),u=T*I5(t),d=k*A5(i),E=k*I5(i),M5<o&&(p=T*A5(r),g=T*I5(r),f=k*A5(n),m=k*I5(n),S<D5)&&((C=W5(h,u,f,m,p,g,d,E))?(S=h-C[0],x=u-C[1],y=p-C[0],v=g-C[1],S=1/I5(E5((S*y+x*v)/(R5(S*S+x*x)*R5(y*y+v*v)))/2),x=R5(C[0]*C[0]+C[1]*C[1]),b=N5(o,(k-x)/(S-1)),w=N5(o,(T-x)/(1+S))):b=w=0),M5<s?M5<w?(l=Y5(f,m,h,u,T,w,_),c=Y5(p,g,d,E,T,w,_),O.moveTo(l.cx+l.x01,l.cy+l.y01),w<o?O.arc(l.cx,l.cy,w,_5(l.y01,l.x01),_5(c.y01,c.x01),!_):(O.arc(l.cx,l.cy,w,_5(l.y01,l.x01),_5(l.y11,l.x11),!_),O.arc(0,0,T,_5(l.cy+l.y11,l.cx+l.x11),_5(c.cy+c.y11,c.cx+c.x11),!_),O.arc(c.cx,c.cy,w,_5(c.y11,c.x11),_5(c.y01,c.x01),!_))):(O.moveTo(h,u),O.arc(0,0,T,t,r,!_)):O.moveTo(h,u),M5<k&&M5<a?M5<b?(l=Y5(d,E,p,g,k,-b,_),c=Y5(h,u,f,m,k,-b,_),O.lineTo(l.cx+l.x01,l.cy+l.y01),b<o?O.arc(l.cx,l.cy,b,_5(l.y01,l.x01),_5(c.y01,c.x01),!_):(O.arc(l.cx,l.cy,b,_5(l.y01,l.x01),_5(l.y11,l.x11),!_),O.arc(0,0,k,_5(l.cy+l.y11,l.cx+l.x11),_5(c.cy+c.y11,c.cx+c.x11),_),O.arc(c.cx,c.cy,b,_5(c.y11,c.x11),_5(c.y01,c.x01),!_))):O.arc(0,0,k,i,n,_):O.lineTo(d,E)):O.moveTo(0,0),O.closePath(),e)return O=null,e+""||null}return mt(t,"arc"),t.centroid=function(){var e=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,t=(+R.apply(this,arguments)+ +M.apply(this,arguments))/2-D5/2;return[A5(t)*e,I5(t)*e]},t.innerRadius=function(e){return arguments.length?(A="function"==typeof e?e:k5(+e),t):A},t.outerRadius=function(e){return arguments.length?(L="function"==typeof e?e:k5(+e),t):L},t.cornerRadius=function(e){return arguments.length?(N="function"==typeof e?e:k5(+e),t):N},t.padRadius=function(e){return arguments.length?(I=null==e?null:"function"==typeof e?e:k5(+e),t):I},t.startAngle=function(e){return arguments.length?(R="function"==typeof e?e:k5(+e),t):R},t.endAngle=function(e){return arguments.length?(M="function"==typeof e?e:k5(+e),t):M},t.padAngle=function(e){return arguments.length?(D="function"==typeof e?e:k5(+e),t):D},t.context=function(e){return arguments.length?(O=e??null,t):O},t}var V5=e(()=>{T5(),B5(),F5(),mt(z5,"arcInnerRadius"),mt(G5,"arcOuterRadius"),mt(U5,"arcStartAngle"),mt(q5,"arcEndAngle"),mt(j5,"arcPadAngle"),mt(W5,"intersect"),mt(Y5,"cornerTangents"),mt(H5,"default")});function X5(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var K5=e(()=>{Array.prototype.slice,mt(X5,"default")});function Z5(e){this._context=e}function Q5(e){return new Z5(e)}var J5=e(()=>{mt(Z5,"Linear"),Z5.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(Q5,"default")});function e3(e){return e[0]}function t3(e){return e[1]}var r3=e(()=>{mt(e3,"x"),mt(t3,"y")});function n3(s,o){var l=k5(!0),c=null,h=Q5,u=null,d=$5(t);function t(e){var t,r,n,i=(e=X5(e)).length,a=!1;for(null==c&&(u=h(n=d())),t=0;t<=i;++t)!(t<i&&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(n)return u=null,n+""||null}return s="function"==typeof s?s:void 0===s?e3:k5(s),o="function"==typeof o?o:void 0===o?t3:k5(o),mt(t,"line"),t.x=function(e){return arguments.length?(s="function"==typeof e?e:k5(+e),t):s},t.y=function(e){return arguments.length?(o="function"==typeof e?e:k5(+e),t):o},t.defined=function(e){return arguments.length?(l="function"==typeof e?e:k5(!!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 i3=e(()=>{K5(),T5(),J5(),F5(),r3(),mt(n3,"default")});function a3(e,t){return t<e?-1:e<t?1:e<=t?0:NaN}var s3=e(()=>{mt(a3,"default")});function o3(e){return e}var l3=e(()=>{mt(o3,"default")});function c3(){var p=o3,g=a3,f=null,m=k5(0),y=k5(P5),v=k5(0);function t(r){for(var e,t,n,i=(r=X5(r)).length,a=0,s=new Array(i),o=new Array(i),l=+m.apply(this,arguments),c=Math.min(P5,Math.max(-P5,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/i,v.apply(this,arguments)),u=h*(c<0?-1:1),d=0;d<i;++d)0<(n=o[s[d]=d]=+p(r[d],d,r))&&(a+=n);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-i*u)/a:0;d<i;++d,l=t)t=s[d],n=o[t],o[t]={data:r[t],index:d,value:n,startAngle:l,endAngle:t=l+(0<n?n*e:0)+u,padAngle:h};return o}return mt(t,"pie"),t.value=function(e){return arguments.length?(p="function"==typeof e?e:k5(+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:k5(+e),t):m},t.endAngle=function(e){return arguments.length?(y="function"==typeof e?e:k5(+e),t):y},t.padAngle=function(e){return arguments.length?(v="function"==typeof e?e:k5(+e),t):v},t}var h3=e(()=>{K5(),T5(),s3(),l3(),B5(),mt(c3,"default")});function u3(e){return new p3(e,!0)}function d3(e){return new p3(e,!1)}var p3,g3=e(()=>{p3=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(u3,"bumpX"),mt(d3,"bumpY")});function f3(){}var m3=e(()=>{mt(f3,"default")});function y3(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 v3(e){this._context=e}function x3(e){return new v3(e)}var b3=e(()=>{mt(y3,"point"),mt(v3,"Basis"),v3.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:y3(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:y3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(x3,"default")});function w3(e){this._context=e}function k3(e){return new w3(e)}var T3=e(()=>{m3(),b3(),mt(w3,"BasisClosed"),w3.prototype={areaStart:f3,areaEnd:f3,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:y3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(k3,"default")});function E3(e){this._context=e}function C3(e){return new E3(e)}var S3=e(()=>{b3(),mt(E3,"BasisOpen"),E3.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,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:y3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(C3,"default")});function _3(e,t){this._basis=new v3(e),this._beta=t}var A3,L3=e(()=>{b3(),mt(_3,"Bundle"),_3.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 n,i=e[0],a=t[0],s=e[r]-i,o=t[r]-a,l=-1;++l<=r;)this._basis.point(this._beta*e[l]+(1-this._beta)*(i+(n=l/r)*s),this._beta*t[l]+(1-this._beta)*(a+n*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:mt(function(e,t){this._x.push(+e),this._y.push(+t)},"point")},A3=mt(function t(r){function e(e){return 1===r?new v3(e):new _3(e,r)}return mt(e,"bundle"),e.beta=function(e){return t(+e)},e},"custom")(.85)});function N3(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 I3(e,t){this._context=e,this._k=(1-t)/6}var R3,M3=e(()=>{mt(N3,"point"),mt(I3,"Cardinal"),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(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:N3(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:N3(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")},R3=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 D3(e,t){this._context=e,this._k=(1-t)/6}var O3,P3=e(()=>{m3(),M3(),mt(D3,"CardinalClosed"),D3.prototype={areaStart:f3,areaEnd:f3,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:N3(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")},O3=mt(function t(r){function e(e){return new D3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function B3(e,t){this._context=e,this._k=(1-t)/6}var $3,F3=e(()=>{M3(),mt(B3,"CardinalOpen"),B3.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:N3(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")},$3=mt(function t(r){function e(e){return new B3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function z3(e,t,r){var n,i,a=e._x1,s=e._y1,o=e._x2,l=e._y2;M5<e._l01_a&&(a=(a*(n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a)-e._x0*e._l12_2a+e._x2*e._l01_2a)/(i=3*e._l01_a*(e._l01_a+e._l12_a)),s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/i),M5<e._l23_a&&(o=(o*(n=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a)+e._x1*e._l23_2a-t*e._l12_2a)/(i=3*e._l23_a*(e._l23_a+e._l12_a)),l=(l*n+e._y1*e._l23_2a-r*e._l12_2a)/i),e._context.bezierCurveTo(a,s,o,l,e._x2,e._y2)}function G3(e,t){this._context=e,this._alpha=t}var U3,q3=e(()=>{B5(),M3(),mt(z3,"point"),mt(G3,"CatmullRom"),G3.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,n;switch(e=+e,t=+t,this._point&&(r=this._x2-e,n=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:z3(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 G3(e,r):new I3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function j3(e,t){this._context=e,this._alpha=t}var W3,Y3=e(()=>{P3(),m3(),q3(),mt(j3,"CatmullRomClosed"),j3.prototype={areaStart:f3,areaEnd:f3,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,n;switch(e=+e,t=+t,this._point&&(r=this._x2-e,n=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:z3(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")},W3=mt(function t(r){function e(e){return r?new j3(e,r):new D3(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 V3,X3=e(()=>{F3(),q3(),mt(H3,"CatmullRomOpen"),H3.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,n;switch(e=+e,t=+t,this._point&&(r=this._x2-e,n=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:z3(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")},V3=mt(function t(r){function e(e){return r?new H3(e,r):new B3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function K3(e){this._context=e}function Z3(e){return new K3(e)}var Q3=e(()=>{m3(),mt(K3,"LinearClosed"),K3.prototype={areaStart:f3,areaEnd:f3,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(Z3,"default")});function J3(e){return e<0?-1:1}function ew(e,t,r){var n=e._x1-e._x0,t=t-e._x1,i=(e._y1-e._y0)/(n||t<0&&-0),e=(i*t+(r=(r-e._y1)/(t||n<0&&-0))*n)/(n+t);return(J3(i)+J3(r))*Math.min(Math.abs(i),Math.abs(r),.5*Math.abs(e))||0}function tw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function rw(e,t,r){var n=e._x0,i=e._x1,a=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,e._y0+s*t,i-s,a-s*r,i,a)}function nw(e){this._context=e}function iw(e){this._context=new aw(e)}function aw(e){this._context=e}function sw(e){return new nw(e)}function ow(e){return new iw(e)}var lw=e(()=>{mt(J3,"sign"),mt(ew,"slope3"),mt(tw,"slope2"),mt(rw,"point"),mt(nw,"MonotoneX"),nw.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:rw(this,this._t0,tw(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,rw(this,tw(this,r=ew(this,e,t)),r);break;default:rw(this,this._t0,r=ew(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")},mt(iw,"MonotoneY"),(iw.prototype=Object.create(nw.prototype)).point=function(e,t){nw.prototype.point.call(this,t,e)},mt(aw,"ReflectContext"),aw.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,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)},"bezierCurveTo")},mt(sw,"monotoneX"),mt(ow,"monotoneY")});function cw(e){this._context=e}function hw(e){var t,r,n=e.length-1,i=new Array(n),a=new Array(n),s=new Array(n);for(a[i[0]=0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/a[n-1],t=n-2;0<=t;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function uw(e){return new cw(e)}var dw=e(()=>{mt(cw,"Natural"),cw.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 n=hw(e),i=hw(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[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(hw,"controlPoints"),mt(uw,"default")});function pw(e,t){this._context=e,this._t=t}function gw(e){return new pw(e,.5)}function fw(e){return new pw(e,0)}function mw(e){return new pw(e,1)}var yw=e(()=>{mt(pw,"Step"),pw.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(gw,"default"),mt(fw,"stepBefore"),mt(mw,"stepAfter")}),vw=e(()=>{V5(),i3(),h3(),T3(),S3(),b3(),g3(),L3(),P3(),F3(),M3(),Y3(),X3(),q3(),Q3(),J5(),lw(),dw(),yw()}),xw=e(()=>{}),bw=e(()=>{});function ww(e,t,r){this.k=e,this.x=t,this.y=r}function kw(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Tw;return e.__zoom}var Tw,Ew,Cw,Sw,_w,Aw,Lw,Nw,Iw,Rw,Mw,Dw,Ow,Pw,Bw,$w,Fw,zw,Gw,Uw,qw,jw,Ww,Yw,Hw,Vw,Xw,Kw,Zw,Qw,Jw,e6,t6=e(()=>{mt(ww,"Transform"),ww.prototype={constructor:ww,scale:mt(function(e){return 1===e?this:new ww(this.k*e,this.x,this.y)},"scale"),translate:mt(function(e,t){return 0===e&0===t?this:new ww(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")},Tw=new ww(1,0,0),kw.prototype=ww.prototype,mt(kw,"transform")}),r6=e(()=>{}),n6=e(()=>{Qy(),xw(),bw(),t6(),r6()}),i6=e(()=>{n6(),t6()}),a6=e(()=>{id(),vd(),c2(),b2(),S1(),w2(),k2(),Ld(),wg(),T2(),Yy(),E2(),S2(),dv(),pv(),px(),Sf(),x2(),gx(),C2(),fx(),m5(),w5(),bg(),vw(),Bb(),h5(),Kf(),Qy(),i6()}),s6=MBe(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"}),o6=MBe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var a=s6();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,n,i=c(e.trim());(t=(i=c(i=o(i).replace(a.htmlCtrlEntityRegex,"").replace(a.ctrlCharactersRegex,"").replace(a.whitespaceEscapeCharsRegex,"").trim())).match(a.ctrlCharactersRegex)||i.match(a.htmlEntitiesRegex)||i.match(a.htmlCtrlEntityRegex)||i.match(a.whitespaceEscapeCharsRegex))&&0<t.length;);return(e=i)?!s(e)&&(n=(r=e.trimStart()).match(a.urlSchemeRegex))?(n=n[0].toLowerCase().trim(),a.invalidProtocolRegex.test(n)?a.BLANK_URL:(r=r.replace(/\\/g,"/"),"mailto:"===n||n.includes("://")||"http:"!==n&&"https:"!==n?r:l(r)?((n=new URL(r)).protocol=n.protocol.toLowerCase(),n.hostname=n.hostname.toLowerCase(),n.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}),l6=e(()=>{Ew=ee(o6(),1),lh(),Cw=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 n in t.attrs)r.attr(n,t.attrs[n]);return t.class&&r.attr("class",t.class),r},"drawRect"),Sw=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"},Cw(e,t).lower()},"drawBackgroundRect"),_w=mt((e,t)=>{var r=t.text.replace(Nc," "),n=((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 n.attr("x",t.x+2*t.textMargin),n.text(r),e},"drawText"),Aw=mt((e,t,r,n)=>{(e=e.append("image")).attr("x",t),e.attr("y",r),t=(0,Ew.sanitizeUrl)(n),e.attr("xlink:href",t)},"drawImage"),Lw=mt((e,t,r,n)=>{(e=e.append("use")).attr("x",t),e.attr("y",r),t=(0,Ew.sanitizeUrl)(n),e.attr("xlink:href","#"+t)},"drawEmbeddedImage"),Nw=mt(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Iw=mt(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),c6=e(()=>{function t(e,t,r,n,i,a,s){g(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(e),s)}function l(e,t,r,n,i,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=e.split(L.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+i/2).attr("y",n).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,n,i,a,s,o){(a=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).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,n,i,0,s,o),g(a,s)}function g(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}lh(),l6(),Rw=ee(o6(),1),Mw=mt(function(e,t){return Cw(e,t)},"drawRect"),Dw=mt(function(e,t,r,n,i,a){(e=e.append("image")).attr("width",t),e.attr("height",r),e.attr("x",n),e.attr("y",i),t=a.startsWith("data:image/png;base64")?a:(0,Rw.sanitizeUrl)(a),e.attr("xlink:href",t)},"drawImage"),Ow=mt((e,t,r)=>{let n=e.append("g"),i=0;for(var a of t){var s,o=a.textColor||"#444444",l=a.lineColor||"#444444",c=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,l=(0===i?((s=n.append("line")).attr("x1",a.startPoint.x),s.attr("y1",a.startPoint.y),s.attr("x2",a.endPoint.x),s.attr("y2",a.endPoint.y),s.attr("stroke-width","1"),s.attr("stroke",l),s.style("fill","none"),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)"),i=-1):((s=n.append("path")).attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)")),r.messageFont());Hw(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:o},l),a.techn&&""!==a.techn.text&&(l=r.messageFont(),Hw(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:o,"font-style":"italic"},l))}},"drawRels"),Pw=mt(function(e,t,r){let n=e.append("g"),i=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=(Mw(n,e={x:t.x,y:t.y,fill:i,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,Hw(r)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},l),t.type&&""!==t.type.text&&((l=r.boundaryFont()).fontColor=s,Hw(r)(t.type.text,n,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,Hw(r)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},l))},"drawBoundary"),Bw=mt(function(e,t,r){let n=t.bgColor||r[t.typeC4Shape.text+"_bg_color"],i=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"),Nw());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=n,l.width=t.width,l.height=t.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},Mw(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",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2))}switch(e=Yw(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":Dw(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,Hw(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?Hw(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&&Hw(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,Hw(r)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},c)),t.height},"drawC4Shape"),$w=mt(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Fw=mt(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),zw=mt(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Gw=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),Uw=mt(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),qw=mt(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),jw=mt(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),Ww=mt(function(e){(e=e.append("defs").append("marker").attr("id","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"),Yw=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"),Hw=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},Vw={drawRect:Mw,drawBoundary:Pw,drawC4Shape:Bw,drawRels:Ow,drawImage:Dw,insertArrowHead:Gw,insertArrowEnd:Uw,insertArrowFilledHead:qw,insertDynamicNumber:jw,insertArrowCrossHead:Ww,insertDatabaseIcon:$w,insertComputerIcon:Fw,insertClockIcon:zw}}),h6=e(()=>{Xw="object"==typeof global&&global&&global.Object===Object&&global,Kw=Xw}),u6=e(()=>{h6(),Zw="object"==typeof self&&self&&self.Object===Object&&self,Zw=Kw||Zw||Function("return this")(),Qw=Zw}),d6=e(()=>{u6(),Jw=Qw.Symbol,e6=Jw});function p6(e){var t=f6.call(e,y6),r=e[y6];try{var n=!(e[y6]=void 0)}catch{}var i=m6.call(e);return n&&(t?e[y6]=r:delete e[y6]),i}var g6,f6,m6,y6,v6,x6=e(()=>{d6(),g6=Object.prototype,f6=g6.hasOwnProperty,m6=g6.toString,y6=e6?e6.toStringTag:void 0,mt(p6,"getRawTag"),v6=p6});function b6(e){return k6.call(e)}var w6,k6,T6,E6=e(()=>{w6=Object.prototype,k6=w6.toString,mt(b6,"objectToString"),T6=b6});function C6(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(S6&&S6 in Object(e)?v6:T6)(e)}var S6,_6,A6=e(()=>{d6(),x6(),E6(),S6=e6?e6.toStringTag:void 0,mt(C6,"baseGetTag"),_6=C6});function L6(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var N6,I6=e(()=>{mt(L6,"isObject"),N6=L6});function R6(e){return!!N6(e)&&("[object Function]"==(e=_6(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}var M6,D6,O6,P6=e(()=>{A6(),I6(),mt(R6,"isFunction"),M6=R6}),B6=e(()=>{u6(),D6=Qw["__core-js_shared__"],O6=D6});function $6(e){return!!F6&&F6 in e}var F6,z6,G6=e(()=>{var e;B6(),e=/[^.]+$/.exec(O6&&O6.keys&&O6.keys.IE_PROTO||""),F6=e?"Symbol(src)_1."+e:"",mt($6,"isMasked"),z6=$6});function U6(e){if(null!=e){try{return j6.call(e)}catch{}try{return e+""}catch{}}return""}var q6,j6,W6,Y6=e(()=>{q6=Function.prototype,j6=q6.toString,mt(U6,"toSource"),W6=U6});function H6(e){return!(!N6(e)||z6(e))&&(M6(e)?Q6:X6).test(W6(e))}var V6,X6,K6,Z6,Q6,J6,ek=e(()=>{P6(),G6(),I6(),Y6(),V6=/[\\^$.*+?()[\]{}|]/g,X6=/^\[object .+?Constructor\]$/,K6=Function.prototype,Z6=Object.prototype,K6=K6.toString,Z6=Z6.hasOwnProperty,Q6=RegExp("^"+K6.call(Z6).replace(V6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(H6,"baseIsNative"),J6=H6});function tk(e,t){return e?.[t]}var rk,nk=e(()=>{mt(tk,"getValue"),rk=tk});function ik(e,t){return e=rk(e,t),J6(e)?e:void 0}var ak,sk,ok,lk=e(()=>{ek(),nk(),mt(ik,"getNative"),ak=ik}),ck=e(()=>{lk(),sk=ak(Object,"create"),ok=sk});function hk(){this.__data__=ok?ok(null):{},this.size=0}var uk,dk=e(()=>{ck(),mt(hk,"hashClear"),uk=hk});function pk(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}var gk,fk=e(()=>{mt(pk,"hashDelete"),gk=pk});function mk(e){var t,r=this.__data__;return ok?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:vk.call(r,e)?r[e]:void 0}var yk,vk,xk,bk=e(()=>{ck(),yk=Object.prototype,vk=yk.hasOwnProperty,mt(mk,"hashGet"),xk=mk});function wk(e){var t=this.__data__;return ok?void 0!==t[e]:Tk.call(t,e)}var kk,Tk,Ek,Ck=e(()=>{ck(),kk=Object.prototype,Tk=kk.hasOwnProperty,mt(wk,"hashHas"),Ek=wk});function Sk(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ok&&void 0===t?"__lodash_hash_undefined__":t,this}var _k,Ak=e(()=>{ck(),mt(Sk,"hashSet"),_k=Sk});function Lk(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var Nk,Ik=e(()=>{dk(),fk(),bk(),Ck(),Ak(),mt(Lk,"Hash"),Lk.prototype.clear=uk,Lk.prototype.delete=gk,Lk.prototype.get=xk,Lk.prototype.has=Ek,Lk.prototype.set=_k,Nk=Lk});function Rk(){this.__data__=[],this.size=0}var Mk,Dk=e(()=>{mt(Rk,"listCacheClear"),Mk=Rk});function Ok(e,t){return e===t||e!=e&&t!=t}var Pk,Bk=e(()=>{mt(Ok,"eq"),Pk=Ok});function $k(e,t){for(var r=e.length;r--;)if(Pk(e[r][0],t))return r;return-1}var Fk,zk=e(()=>{Bk(),mt($k,"assocIndexOf"),Fk=$k});function Gk(e){var t=this.__data__;return!((e=Fk(t,e))<0||(e==t.length-1?t.pop():qk.call(t,e,1),--this.size,0))}var Uk,qk,jk,Wk=e(()=>{zk(),Uk=Array.prototype,qk=Uk.splice,mt(Gk,"listCacheDelete"),jk=Gk});function Yk(e){var t=this.__data__;return(e=Fk(t,e))<0?void 0:t[e][1]}var Hk,Vk=e(()=>{zk(),mt(Yk,"listCacheGet"),Hk=Yk});function Xk(e){return-1<Fk(this.__data__,e)}var Kk,Zk=e(()=>{zk(),mt(Xk,"listCacheHas"),Kk=Xk});function Qk(e,t){var r=this.__data__,n=Fk(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Jk,eT=e(()=>{zk(),mt(Qk,"listCacheSet"),Jk=Qk});function tT(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var rT,nT,iT,aT=e(()=>{Dk(),Wk(),Vk(),Zk(),eT(),mt(tT,"ListCache"),tT.prototype.clear=Mk,tT.prototype.delete=jk,tT.prototype.get=Hk,tT.prototype.has=Kk,tT.prototype.set=Jk,rT=tT}),sT=e(()=>{lk(),u6(),nT=ak(Qw,"Map"),iT=nT});function oT(){this.size=0,this.__data__={hash:new Nk,map:new(iT||rT),string:new Nk}}var lT,cT=e(()=>{Ik(),aT(),sT(),mt(oT,"mapCacheClear"),lT=oT});function hT(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var uT,dT=e(()=>{mt(hT,"isKeyable"),uT=hT});function pT(e,t){return e=e.__data__,uT(t)?e["string"==typeof t?"string":"hash"]:e.map}var gT,fT=e(()=>{dT(),mt(pT,"getMapData"),gT=pT});function mT(e){return e=gT(this,e).delete(e),this.size-=e?1:0,e}var yT,vT=e(()=>{fT(),mt(mT,"mapCacheDelete"),yT=mT});function xT(e){return gT(this,e).get(e)}var bT,wT=e(()=>{fT(),mt(xT,"mapCacheGet"),bT=xT});function kT(e){return gT(this,e).has(e)}var TT,ET=e(()=>{fT(),mt(kT,"mapCacheHas"),TT=kT});function CT(e,t){var r=gT(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var ST,_T=e(()=>{fT(),mt(CT,"mapCacheSet"),ST=CT});function AT(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var LT,NT=e(()=>{cT(),vT(),wT(),ET(),_T(),mt(AT,"MapCache"),AT.prototype.clear=lT,AT.prototype.delete=yT,AT.prototype.get=bT,AT.prototype.has=TT,AT.prototype.set=ST,LT=AT});function IT(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(RT);var a=mt(function(){var e=arguments,t=i?i.apply(this,e):e[0],r=a.cache;return r.has(t)?r.get(t):(e=n.apply(this,e),a.cache=r.set(t,e)||r,e)},"memoized");return a.cache=new(IT.Cache||LT),a}var RT,MT,DT=e(()=>{NT(),RT="Expected a function",mt(IT,"memoize"),IT.Cache=LT,MT=IT});function OT(){this.__data__=new rT,this.size=0}var PT,BT=e(()=>{aT(),mt(OT,"stackClear"),PT=OT});function $T(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e}var FT,zT=e(()=>{mt($T,"stackDelete"),FT=$T});function GT(e){return this.__data__.get(e)}var UT,qT=e(()=>{mt(GT,"stackGet"),UT=GT});function jT(e){return this.__data__.has(e)}var WT,YT=e(()=>{mt(jT,"stackHas"),WT=jT});function HT(e,t){var r=this.__data__;if(r instanceof rT){var n=r.__data__;if(!iT||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new LT(n)}return r.set(e,t),this.size=r.size,this}var VT,XT=e(()=>{aT(),sT(),NT(),mt(HT,"stackSet"),VT=HT});function KT(e){e=this.__data__=new rT(e),this.size=e.size}var ZT,QT,JT,e7=e(()=>{aT(),BT(),zT(),qT(),YT(),XT(),mt(KT,"Stack"),KT.prototype.clear=PT,KT.prototype.delete=FT,KT.prototype.get=UT,KT.prototype.has=WT,KT.prototype.set=VT,ZT=KT}),t7=e(()=>{lk(),QT=(()=>{try{var e=ak(Object,"defineProperty");return e({},"",{}),e}catch{}})(),JT=QT});function r7(e,t,r){"__proto__"==t&&JT?JT(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var n7,i7=e(()=>{t7(),mt(r7,"baseAssignValue"),n7=r7});function a7(e,t,r){(void 0===r||Pk(e[t],r))&&(void 0!==r||t in e)||n7(e,t,r)}var s7,o7=e(()=>{i7(),Bk(),mt(a7,"assignMergeValue"),s7=a7});function l7(l){return function(e,t,r){for(var n=-1,i=Object(e),a=r(e),s=a.length;s--;){var o=a[l?s:++n];if(!1===t(i[o],o,i))break}return e}}var c7,h7,u7,d7=e(()=>{mt(l7,"createBaseFor"),c7=l7}),p7=e(()=>{d7(),h7=c7(),u7=h7});function g7(e,t){return t?e.slice():(t=e.length,t=y7?y7(t):new e.constructor(t),e.copy(t),t)}var f7,m7,y7,v7,x7,b7,w7=e(()=>{u6(),f7="object"==typeof exports&&exports&&!exports.nodeType&&exports,m7=(m7=f7&&"object"==typeof module&&module&&!module.nodeType&&module)&&m7.exports===f7?Qw.Buffer:void 0,y7=m7?m7.allocUnsafe:void 0,mt(g7,"cloneBuffer"),v7=g7}),k7=e(()=>{u6(),x7=Qw.Uint8Array,b7=x7});function T7(e){var t=new e.constructor(e.byteLength);return new b7(t).set(new b7(e)),t}var E7,C7=e(()=>{k7(),mt(T7,"cloneArrayBuffer"),E7=T7});function S7(e,t){return t=t?E7(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}var _7,A7=e(()=>{C7(),mt(S7,"cloneTypedArray"),_7=S7});function L7(e,t){var r=-1,n=e.length;for(t=t||Array(n);++r<n;)t[r]=e[r];return t}var N7,I7,R7,M7=e(()=>{mt(L7,"copyArray"),N7=L7}),D7=e(()=>{function t(){}I6(),I7=Object.create,mt(t,"object"),R7=function(e){return N6(e)?I7?I7(e):(t.prototype=e,e=new t,t.prototype=void 0,e):{}}});function O7(t,r){return function(e){return t(r(e))}}var P7,B7,$7,F7=e(()=>{mt(O7,"overArg"),P7=O7}),z7=e(()=>{F7(),B7=P7(Object.getPrototypeOf,Object),$7=B7});function G7(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||U7)}var U7,q7,j7=e(()=>{U7=Object.prototype,mt(G7,"isPrototype"),q7=G7});function W7(e){return"function"!=typeof e.constructor||q7(e)?{}:R7($7(e))}var Y7,H7=e(()=>{D7(),z7(),j7(),mt(W7,"initCloneObject"),Y7=W7});function V7(e){return null!=e&&"object"==typeof e}var X7,K7=e(()=>{mt(V7,"isObjectLike"),X7=V7});function Z7(e){return X7(e)&&"[object Arguments]"==_6(e)}var Q7,J7,e8,t8,r8,n8,i8,a8=e(()=>{A6(),K7(),mt(Z7,"baseIsArguments"),Q7=Z7}),s8=e(()=>{a8(),K7(),t8=Object.prototype,J7=t8.hasOwnProperty,e8=t8.propertyIsEnumerable,t8=Q7(function(){return arguments}())?Q7:function(e){return X7(e)&&J7.call(e,"callee")&&!e8.call(e,"callee")},r8=t8}),o8=e(()=>{n8=Array.isArray,i8=n8});function l8(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991}var c8,h8=e(()=>{mt(l8,"isLength"),c8=l8});function u8(e){return null!=e&&c8(e.length)&&!M6(e)}var d8,p8=e(()=>{P6(),h8(),mt(u8,"isArrayLike"),d8=u8});function g8(e){return X7(e)&&d8(e)}var f8,m8=e(()=>{p8(),K7(),mt(g8,"isArrayLikeObject"),f8=g8});function y8(){return!1}var v8,x8,b8,w8,k8=e(()=>{mt(y8,"stubFalse"),v8=y8}),T8=e(()=>{u6(),k8(),b8="object"==typeof exports&&exports&&!exports.nodeType&&exports,x8=(x8=b8&&"object"==typeof module&&module&&!module.nodeType&&module)&&x8.exports===b8?Qw.Buffer:void 0,b8=x8?x8.isBuffer:void 0,w8=b8||v8});function E8(e){return!(!X7(e)||"[object Object]"!=_6(e))&&(null===(e=$7(e))||"function"==typeof(e=A8.call(e,"constructor")&&e.constructor)&&e instanceof e&&_8.call(e)==L8)}var C8,S8,_8,A8,L8,N8,I8=e(()=>{A6(),z7(),K7(),C8=Function.prototype,S8=Object.prototype,_8=C8.toString,A8=S8.hasOwnProperty,L8=_8.call(Object),mt(E8,"isPlainObject"),N8=E8});function R8(e){return X7(e)&&c8(e.length)&&!!M8[_6(e)]}var M8,D8,O8=e(()=>{A6(),h8(),K7(),(M8={})["[object Float32Array]"]=M8["[object Float64Array]"]=M8["[object Int8Array]"]=M8["[object Int16Array]"]=M8["[object Int32Array]"]=M8["[object Uint8Array]"]=M8["[object Uint8ClampedArray]"]=M8["[object Uint16Array]"]=M8["[object Uint32Array]"]=!0,M8["[object Arguments]"]=M8["[object Array]"]=M8["[object ArrayBuffer]"]=M8["[object Boolean]"]=M8["[object DataView]"]=M8["[object Date]"]=M8["[object Error]"]=M8["[object Function]"]=M8["[object Map]"]=M8["[object Number]"]=M8["[object Object]"]=M8["[object RegExp]"]=M8["[object Set]"]=M8["[object String]"]=M8["[object WeakMap]"]=!1,mt(R8,"baseIsTypedArray"),D8=R8});function P8(t){return function(e){return t(e)}}var B8,$8,F8,z8,G8,U8,q8,j8=e(()=>{mt(P8,"baseUnary"),B8=P8}),W8=e(()=>{h6(),z8="object"==typeof exports&&exports&&!exports.nodeType&&exports,$8=z8&&"object"==typeof module&&module&&!module.nodeType&&module,z8=$8&&$8.exports===z8,F8=z8&&Kw.process,z8=(()=>{try{return $8&&$8.require&&$8.require("util").types||F8&&F8.binding&&F8.binding("util")}catch{}})(),G8=z8}),Y8=e(()=>{O8(),j8(),W8(),U8=(U8=G8&&G8.isTypedArray)?B8(U8):D8,q8=U8});function H8(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var V8,X8=e(()=>{mt(H8,"safeGet"),V8=H8});function K8(e,t,r){var n=e[t];Q8.call(e,t)&&Pk(n,r)&&(void 0!==r||t in e)||n7(e,t,r)}var Z8,Q8,J8,eE=e(()=>{i7(),Bk(),Z8=Object.prototype,Q8=Z8.hasOwnProperty,mt(K8,"assignValue"),J8=K8});function tE(e,t,r,n){var i=!r;r=r||{};for(var a=-1,s=t.length;++a<s;){var o=t[a],l=n?n(r[o],e[o],o,r,e):void 0;void 0===l&&(l=e[o]),(i?n7:J8)(r,o,l)}return r}var rE,nE=e(()=>{eE(),i7(),mt(tE,"copyObject"),rE=tE});function iE(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var aE,sE=e(()=>{mt(iE,"baseTimes"),aE=iE});function oE(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&lE.test(e))&&-1<e&&e%1==0&&e<t}var lE,cE,hE=e(()=>{lE=/^(?:0|[1-9]\d*)$/,mt(oE,"isIndex"),cE=oE});function uE(e,t){var r,n=i8(e),i=!n&&r8(e),a=!n&&!i&&w8(e),s=!n&&!i&&!a&&q8(e),o=n||i||a||s,l=o?aE(e.length,String):[],c=l.length;for(r in e)!t&&!pE.call(e,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||cE(r,c))||l.push(r);return l}var dE,pE,gE,fE=e(()=>{sE(),s8(),o8(),T8(),hE(),Y8(),dE=Object.prototype,pE=dE.hasOwnProperty,mt(uE,"arrayLikeKeys"),gE=uE});function mE(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}var yE,vE=e(()=>{mt(mE,"nativeKeysIn"),yE=mE});function xE(e){if(!N6(e))return yE(e);var t,r=q7(e),n=[];for(t in e)("constructor"!=t||!r&&wE.call(e,t))&&n.push(t);return n}var bE,wE,kE,TE=e(()=>{I6(),j7(),vE(),bE=Object.prototype,wE=bE.hasOwnProperty,mt(xE,"baseKeysIn"),kE=xE});function EE(e){return d8(e)?gE(e,!0):kE(e)}var CE,SE=e(()=>{fE(),TE(),p8(),mt(EE,"keysIn"),CE=EE});function _E(e){return rE(e,CE(e))}var AE,LE=e(()=>{nE(),SE(),mt(_E,"toPlainObject"),AE=_E});function NE(e,t,r,n,i,a,s){var o,l,c,h=V8(e,r),u=V8(t,r),d=s.get(u);d||((t=void 0===(d=a?a(h,u,r+"",e,t,s):void 0))&&(l=!(o=i8(u))&&w8(u),c=!o&&!l&&q8(u),d=u,o||l||c?d=i8(h)?h:f8(h)?N7(h):l?v7(u,!(t=!1)):c?_7(u,!(t=!1)):[]:N8(u)||r8(u)?r8(d=h)?d=AE(h):N6(h)&&!M6(h)||(d=Y7(u)):t=!1),t&&(s.set(u,d),i(d,u,n,a,s),s.delete(u))),s7(e,r,d)}var IE,RE=e(()=>{o7(),w7(),A7(),M7(),H7(),s8(),o8(),m8(),T8(),P6(),I6(),I8(),Y8(),X8(),LE(),mt(NE,"baseMergeDeep"),IE=NE});function ME(n,i,a,s,o){n!==i&&u7(i,function(e,t){var r;o=o||new ZT,N6(e)?IE(n,i,t,a,ME,s,o):(r=s?s(V8(n,t),e,t+"",n,i,o):void 0,s7(n,t,void 0===r?e:r))},CE)}var DE,OE=e(()=>{e7(),o7(),p7(),RE(),I6(),SE(),X8(),mt(ME,"baseMerge"),DE=ME});function PE(e){return e}var BE,$E=e(()=>{mt(PE,"identity"),BE=PE});function FE(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 zE,GE=e(()=>{mt(FE,"apply"),zE=FE});function UE(a,s,o){return s=qE(void 0===s?a.length-1:s,0),function(){for(var e=arguments,t=-1,r=qE(e.length-s,0),n=Array(r);++t<r;)n[t]=e[s+t];for(var t=-1,i=Array(s+1);++t<s;)i[t]=e[t];return i[s]=o(n),zE(a,this,i)}}var qE,jE,WE=e(()=>{GE(),qE=Math.max,mt(UE,"overRest"),jE=UE});function YE(e){return function(){return e}}var HE,VE,XE=e(()=>{mt(YE,"constant"),HE=YE}),KE=e(()=>{XE(),t7(),$E(),VE=JT?function(e,t){return JT(e,"toString",{configurable:!0,enumerable:!1,value:HE(t),writable:!0})}:BE});function ZE(r){var n=0,i=0;return function(){var e=QE(),t=16-(e-i);if(i=e,0<t){if(800<=++n)return arguments[0]}else n=0;return r.apply(void 0,arguments)}}var QE,JE,eC,tC,rC=e(()=>{QE=Date.now,mt(ZE,"shortOut"),JE=ZE}),nC=e(()=>{KE(),rC(),eC=JE(VE),tC=eC});function iC(e,t){return tC(jE(e,t,BE),e+"")}var aC,sC=e(()=>{$E(),WE(),nC(),mt(iC,"baseRest"),aC=iC});function oC(e,t,r){var n;return!!N6(r)&&!!("number"==(n=typeof t)?d8(r)&&cE(t,r.length):"string"==n&&t in r)&&Pk(r[t],e)}var lC,cC=e(()=>{Bk(),p8(),hE(),I6(),mt(oC,"isIterateeCall"),lC=oC});function hC(o){return aC(function(e,t){var r=-1,n=t.length,i=1<n?t[n-1]:void 0,a=2<n?t[2]:void 0,i=3<o.length&&"function"==typeof i?(n--,i):void 0;for(a&&lC(t[0],t[1],a)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var s=t[r];s&&o(e,s,r,i)}return e})}var uC,dC,pC,gC=e(()=>{sC(),cC(),mt(hC,"createAssigner"),uC=hC}),fC=e(()=>{OE(),gC(),dC=uC(function(e,t,r){DE(e,t,r)}),pC=dC});function mC(e,t){return e?(e="curve"+(e.charAt(0).toUpperCase()+e.slice(1)),IC[e]??t):t}function yC(e,t){if(e=e.trim())return"loose"!==t.securityLevel?(0,LC.sanitizeUrl)(e):e}function vC(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function xC(e){let t,r=0;e.forEach(e=>{r+=vC(e,t),t=e});var n=r/2;return FC(e,n)}function bC(e){return 1===e.length?e[0]:xC(e)}function wC(e,t,r){var r=structuredClone(r),n=(M.info("our points",r),"start_left"!==t&&"start_right"!==t&&r.reverse(),25+e),n=FC(r,n),e=10+.5*e,i=Math.atan2(r[0].y-n.y,r[0].x-n.x),a={x:0,y:0};return"start_left"===t?(a.x=Math.sin(i+Math.PI)*e+(r[0].x+n.x)/2,a.y=-Math.cos(i+Math.PI)*e+(r[0].y+n.y)/2):"end_right"===t?(a.x=Math.sin(i-Math.PI)*e+(r[0].x+n.x)/2-5,a.y=-Math.cos(i-Math.PI)*e+(r[0].y+n.y)/2-5):"end_left"===t?(a.x=Math.sin(i)*e+(r[0].x+n.x)/2-5,a.y=-Math.cos(i)*e+(r[0].y+n.y)/2-5):(a.x=Math.sin(i)*e+(r[0].x+n.x)/2,a.y=-Math.cos(i)*e+(r[0].y+n.y)/2),a}function kC(e){let t="",r="";for(var n of e)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}function TC(t){let r="",n="0123456789abcdef",i=n.length;for(let e=0;e<t;e++)r+=n.charAt(Math.floor(Math.random()*i));return r}function EC(e,t){return VC(e,t).height}function CC(e,t){return VC(e,t).width}function SC(e){return"str"in e}function _C(e,t){return pC({},e,t)}function AC(e){return e??null}var LC,NC,IC,RC,MC,DC,OC,PC,BC,$C,FC,zC,GC,UC,qC,jC,WC,YC,HC,VC,XC,KC,ZC,QC,JC,eS,tS,rS,nS,iS=e(()=>{LC=ee(o6(),1),a6(),lh(),Ln(),t(),Ur(),jr(),DT(),fC(),zr(),NC="",IC={curveBasis:x3,curveBasisClosed:k3,curveBasisOpen:C3,curveBumpX:u3,curveBumpY:d3,curveBundle:A3,curveCardinalClosed:O3,curveCardinalOpen:$3,curveCardinal:R3,curveCatmullRomClosed:W3,curveCatmullRomOpen:V3,curveCatmullRom:U3,curveLinear:Q5,curveLinearClosed:Z3,curveMonotoneX:sw,curveMonotoneY:ow,curveNatural:uw,curveStep:gw,curveStepAfter:mw,curveStepBefore:fw},RC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,MC=mt(function(e,t){var r,n=DC(e,/(?:init\b)|(?:initialize\b)/),i={};if(i=Array.isArray(n)?(r=n.map(e=>e.args),vr(r),it(i,[...r])):n.args)return r=Ze(e,t),void 0!==i[n="config"]&&(i[r="flowchart-v2"===r?"flowchart":r]=i[n],delete i[n]),i},"detectInit"),DC=mt(function(e,t=null){try{var r=new RegExp(`[%]{2}(?![{]${RC.source})(?=[}][%]{2}).*
|
||
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),M.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:`+e);for(var n,i,a,s=[];null!==(n=He.exec(e));)n.index===He.lastIndex&&He.lastIndex++,(n&&!t||t&&n[1]?.match(t)||t&&n[2]?.match(t))&&(i=n[1]||n[2],a=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null,s.push({type:i,args:a}));return 0===s.length?{type:e,args:null}:1===s.length?s[0]:s}catch(r){return M.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),OC=mt(function(e){return e.replace(He,"")},"removeDirectives"),PC=mt(function(e,t){for(var[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray"),mt(mC,"interpolateToCurve"),mt(yC,"formatUrl"),BC=mt((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let e=0;e<n;e++)if(!(a=a[r[e]]))return void M.error(`Function name: ${t} not found in window`);a[i](...e)},"runFunc"),mt(vC,"distance"),mt(xC,"traverseEdge"),mt(bC,"calcLabelPosition"),$C=mt((e,t=2)=>(t=Math.pow(10,t),Math.round(e*t)/t),"roundNumber"),FC=mt((e,t)=>{let r,n=t;for(var i of e){if(r){var a=vC(i,r);if(0===a)return r;if(a<n)n-=a;else{if((a=n/a)<=0)return r;if(1<=a)return{x:i.x,y:i.y};if(0<a&&a<1)return{x:$C((1-a)*r.x+a*i.x,5),y:$C((1-a)*r.y+a*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),zC=mt((e,t,r)=>{M.info("our points "+JSON.stringify(t)),t[0]!==r&&(t=t.reverse());var r=FC(t,25),e=e?10:5,n=Math.atan2(t[0].y-r.y,t[0].x-r.x),i={x:0,y:0};return i.x=Math.sin(n)*e+(t[0].x+r.x)/2,i.y=-Math.cos(n)*e+(t[0].y+r.y)/2,i},"calcCardinalityPosition"),mt(wC,"calcTerminalLabelPosition"),mt(kC,"getStylesFromArray"),GC=0,UC=mt(()=>(GC++,"id-"+Math.random().toString(36).substr(2,12)+"-"+GC),"generateId"),mt(TC,"makeRandomHex"),qC=mt(e=>TC(e.length),"random"),jC=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"),WC=mt(function(e,t){var r=t.text.replace(L.lineBreakRegex," "),[,n]=JC(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",n),e.style("font-weight",t.fontWeight),e.attr("fill",t.fill),void 0!==t.class&&e.attr("class",t.class),(n=e.append("tspan")).attr("x",t.x+2*t.textMargin),n.attr("fill",t.fill),n.text(r),e},"drawSimpleText"),YC=MT((e,s,o)=>{if(!e||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},o),L.lineBreakRegex.test(e)))return e;let l=e.split(" ").filter(Boolean),c=[],h="";return l.forEach((e,t)=>{var r,n,i=CC(e+" ",o),a=CC(h,o);h=s<i?({hyphenatedStrings:r,remainingWord:n}=HC(e,s,"-",o),c.push(h,...r),n):s<=a+i?(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),HC=MT((e,n,i="-",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=CC(e,a)>=n?(t+=1,t=s.length===t,r=e+i,o.push(t?e:r),""):e}),{hyphenatedStrings:o,remainingWord:l}},(e,t,r="-",n)=>""+e+t+r+n.fontSize+n.fontWeight+n.fontFamily),mt(EC,"calculateTextHeight"),mt(CC,"calculateTextWidth"),VC=MT((e,t)=>{var{fontSize:t=12,fontFamily:r="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};var[,i]=JC(t),t=["sans-serif",r],a=e.split(L.lineBreakRegex),s=[];if(!(r=H("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=jC();if(u.text=c||NC,0===(u=((u=WC(l,u).style("font-size",i).style("font-weight",n).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),XC=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")}},ZC=mt(function(e){return KC=KC||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),KC.innerHTML=e,unescape(KC.textContent)},"entityDecode"),mt(SC,"isDetailedError"),QC=mt((e,t,r,n)=>{var i;n&&(i=e.node()?.getBBox())&&e.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",t)},"insertTitle"),JC=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(_C,"cleanAndMerge"),eS={assignWithDepth:it,wrapLabel:YC,calculateTextHeight:EC,calculateTextWidth:CC,calculateTextDimensions:VC,cleanAndMerge:_C,detectInit:MC,detectDirective:DC,isSubstringInArray:PC,interpolateToCurve:mC,calcLabelPosition:bC,calcCardinalityPosition:zC,calcTerminalLabelPosition:wC,formatUrl:yC,getStylesFromArray:kC,generateId:UC,random:qC,runFunc:BC,entityDecode:ZC,insertTitle:QC,parseFontSize:JC,InitIDGenerator:XC},tS=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"),rS=mt(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),nS=mt((e,t,{counter:r=0,prefix:n,suffix:i},a)=>a||(n?n+"_":"")+e+`_${t}_`+r+(i?"_"+i:""),"getEdgeId"),mt(AC,"handleUndefinedAttr")});function aS(e,t,r,n,i){if(!t[e].width)if(r)t[e].text=YC(t[e].text,i,n),t[e].textLines=t[e].text.split(L.lineBreakRegex).length,t[e].width=i,t[e].height=EC(t[e].text,n);else{var a,s,r=t[e].text.split(L.lineBreakRegex);t[e].textLines=r.length,t[e].height=0,t[e].width=0;for(s of r)t[e].width=Math.max(CC(s,n),t[e].width),a=EC(s,n),t[e].height=t[e].height+a}}function sS(t,r,n,e,i){var a,s,o=new dS(i);o.data.widthLimit=n.data.widthLimit/Math.min(hS,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&&uS.wrap,c=fS(uS),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",aS("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+"]",aS("type",s,l,c=fS(uS),o.data.widthLimit),s.type.Y=e+5,e=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=fS(uS)).fontSize=c.fontSize-2,aS("descr",s,l,c,o.data.widthLimit),s.descr.Y=e+20,e=s.descr.Y+s.descr.height),c=0==a||a%hS==0?(l=n.data.startx+uS.diagramMarginX,n.data.stopy+uS.diagramMarginY+e):(l=o.data.stopx!==o.data.startx?o.data.stopx+uS.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,i.db.getC4ShapeArray(s.alias));0<(c=i.db.getC4ShapeKeys(s.alias)).length&&vS(o,t,l,c),r=s.alias,0<(l=i.db.getBoundaries(r)).length&&sS(t,0,o,l,i),"global"!==s.alias&&yS(t,s,o),n.data.stopy=Math.max(o.data.stopy+uS.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+uS.c4ShapeMargin,n.data.stopx),oS=Math.max(oS,n.data.stopx),lS=Math.max(lS,n.data.stopy)}}var oS,lS,cS,hS,uS,dS,pS,gS,fS,mS,yS,vS,xS,bS,wS,kS,TS,ES,CS,SS,_S=e(()=>{a6(),c6(),t(),qr(),lh(),Cu(),Eu(),jr(),iS(),ch(),lS=oS=0,cS=4,hS=2,tt.yy=ku,uS={},dS=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,pS(e.db.getConfig())}setData(e,t,r,n){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=n}updateVal(e,t,r,n){void 0===e[t]?e[t]=r:e[t]=n(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,n=this.nextData.starty+2*e.margin,i=n+e.height;(t>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>cS)&&(t=this.nextData.startx+e.margin+uS.nextLinePaddingX,n=this.nextData.stopy+2*e.margin,this.nextData.stopx=r=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+e.height,this.nextData.cnt=1),e.x=t,e.y=n,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,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},pS(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},pS=mt(function(e){it(uS,e),e.fontFamily&&(uS.personFontFamily=uS.systemFontFamily=uS.messageFontFamily=e.fontFamily),e.fontSize&&(uS.personFontSize=uS.systemFontSize=uS.messageFontSize=e.fontSize),e.fontWeight&&(uS.personFontWeight=uS.systemFontWeight=uS.messageFontWeight=e.fontWeight)},"setConf"),gS=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),fS=mt(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),mS=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),mt(aS,"calcC4ShapeTextWH"),yS=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=uS.c4ShapeMargin-35;var r=t.wrap&&uS.wrap,n=fS(uS),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",CC(t.label.text,n));aS("label",t,r,n,i),Vw.drawBoundary(e,t,uS)},"drawBoundary"),vS=mt(function(r,n,i,e){let a=0;for(var s of e){a=0;var o=i[s];switch((s=gS(uS,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=CC("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=uS.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&&uS.wrap,l=uS.width-2*uS.c4ShapePadding,c=gS(uS,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",aS("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+"]",aS("type",o,s,gS(uS,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+"]",aS("techn",o,s,gS(uS,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&&(aS("descr",o,s,gS(uS,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+=uS.c4ShapePadding,o.width=Math.max(o.width||uS.width,t,uS.width),o.height=Math.max(o.height||uS.height,e,uS.height),o.margin=o.margin||uS.c4ShapeMargin,r.insert(o),Vw.drawC4Shape(n,o,uS)}r.bumpLastMargin(uS.c4ShapeMargin)},"drawC4ShapeArray"),xS=class{static{mt(this,"Point")}constructor(e,t){this.x=e,this.y=t}},bS=mt(function(e,t){let r=e.x,n=e.y,i=t.x,a=t.y,s=r+e.width/2,o=n+e.height/2,l=Math.abs(r-i),c=Math.abs(n-a),h=c/l,u=e.height/e.width,d=null;return n==a&&r<i?d=new xS(r+e.width,o):n==a&&i<r?d=new xS(r,o):r==i&&n<a?d=new xS(s,n+e.height):r==i&&a<n&&(d=new xS(s,n)),i<r&&n<a?d=h<=u?new xS(r,o+h*e.width/2):new xS(s-l/c*e.height/2,n+e.height):r<i&&n<a?d=h<=u?new xS(r+e.width,o+h*e.width/2):new xS(s+l/c*e.height/2,n+e.height):r<i&&a<n?d=h<=u?new xS(r+e.width,o-h*e.width/2):new xS(s+e.height/2*l/c,n):i<r&&a<n&&(d=h<=u?new xS(r,o-e.width/2*h):new xS(s-e.height/2*l/c,n)),d},"getIntersectPoint"),wS=mt(function(e,t){var r={x:0,y:0},n=(r.x=t.x+t.width/2,r.y=t.y+t.height/2,bS(e,r));return r.x=e.x+e.width/2,r.y=e.y+e.height/2,{startPoint:n,endPoint:e=bS(t,r)}},"getIntersectPoints"),kS=mt(function(e,t,r,n){let i=0;for(var a of t){i+=1;var s=a.wrap&&uS.wrap,o=mS(uS);"C4Dynamic"===n.db.getC4Type()&&(a.label.text=i+": "+a.label.text);let e=CC(a.label.text,o);aS("label",a,s,o,e),a.techn&&""!==a.techn.text&&aS("techn",a,s,o,e=CC(a.techn.text,o)),a.descr&&""!==a.descr.text&&aS("descr",a,s,o,e=CC(a.descr.text,o)),s=r(a.from),o=r(a.to),s=wS(s,o),a.startPoint=s.startPoint,a.endPoint=s.endPoint}Vw.drawRels(e,t,uS)},"drawRels"),mt(sS,"drawInsideBoundary"),TS=mt(function(e,t,r,n){uS=D().c4;let i=D().securityLevel,a;"sandbox"===i&&(a=H("#i"+t));var s=H("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o=n.db,o=(n.db.setWrap(uS.wrap),cS=o.getC4ShapeInRow(),hS=o.getC4BoundaryInRow(),M.debug("C:"+JSON.stringify(uS,null,2)),"sandbox"===i?s.select(`[id="${t}"]`):H(`[id="${t}"]`)),s=(Vw.insertComputerIcon(o),Vw.insertDatabaseIcon(o),Vw.insertClockIcon(o),(s=new dS(n)).setData(uS.diagramMarginX,uS.diagramMarginX,uS.diagramMarginY,uS.diagramMarginY),s.data.widthLimit=screen.availWidth,oS=uS.diagramMarginX,lS=uS.diagramMarginY,t=n.db.getTitle(),sS(o,0,s,n.db.getBoundaries(""),n),Vw.insertArrowHead(o),Vw.insertArrowEnd(o),Vw.insertArrowCrossHead(o),Vw.insertArrowFilledHead(o),kS(o,n.db.getRels(),n.db.getC4Shape,n),s.data.stopx=oS,s.data.stopy=lS,(n=s.data).stopy-n.starty+2*uS.diagramMarginY),l=n.stopx-n.startx+2*uS.diagramMarginX,t=(t&&o.append("text").text(t).attr("x",(n.stopx-n.startx)/2-4*uS.diagramMarginX).attr("y",n.starty+uS.diagramMarginY),rh(o,s,l,uS.useMaxWidth),t?60:0);o.attr("viewBox",n.startx-uS.diagramMarginX+" -"+(uS.diagramMarginY+t)+" "+l+" "+(s+t)),M.debug("models:",n)},"draw"),ES={drawPersonOrSystemArray:vS,drawBoundary:yS,setConf:pS,draw:TS}}),AS=e(()=>{CS=mt(e=>`.person {
|
||
stroke: ${e.personBorder};
|
||
fill: ${e.personBkg};
|
||
}
|
||
`,"getStyles"),SS=CS}),LS={};$Be(LS,{diagram:()=>NS});var NS,IS=e(()=>{qr(),Cu(),_S(),AS(),NS={parser:rt,db:ku,renderer:ES,styles:SS,init:mt(({c4:e,wrap:t})=>{ES.setConf(e),ku.setWrap(t)},"init")}});function RS(e){return"u"<typeof e||null===e}function MS(e){return"object"==typeof e&&null!==e}function DS(e){return Array.isArray(e)?e:RS(e)?[]:[e]}function OS(e,t){var r,n,i,a;if(t)for(r=0,n=(a=Object.keys(t)).length;r<n;r+=1)e[i=a[r]]=t[i];return e}function PS(e,t){for(var r="",n=0;n<t;n+=1)r+=e;return r}function BS(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}function $S(e,t){var r="",n=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),n+" "+r):n}function FS(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=$S(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}function zS(e,t,r,n,i){var a="",s="";return(i=Math.floor(i/2)-1)<n-t&&(t=n-i+(a=" ... ").length),i<r-n&&(r=n+i-(s=" ...").length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:n-t+a.length}}function GS(e,t){return BA.repeat(" ",t-e.length)+e}function US(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,n=/\r?\n|\r|\0/g,i=[0],a=[],s=-1;r=n.exec(e.buffer);)a.push(r.index),i.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=i.length-2);s<0&&(s=i.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=zS(e.buffer,i[s-u],a[s-u],e.position-(i[s]-i[s-u]),h),l=BA.repeat(" ",t.indent)+GS((e.line-u+1).toString(),c)+" | "+o.str+`
|
||
`+l;for(o=zS(e.buffer,i[s],a[s],e.position,h),l=(l+=BA.repeat(" ",t.indent)+GS((e.line+1).toString(),c)+" | "+o.str+`
|
||
`)+BA.repeat("-",t.indent+c+3+o.pos)+`^
|
||
`,u=1;u<=t.linesAfter&&!(a.length<=s+u);u++)o=zS(e.buffer,i[s+u],a[s+u],e.position-(i[s]-i[s+u]),h),l+=BA.repeat(" ",t.indent)+GS((e.line+u+1).toString(),c)+" | "+o.str+`
|
||
`;return l.replace(/\n$/,"")}function qS(e){var r={};return null!==e&&Object.keys(e).forEach(function(t){e[t].forEach(function(e){r[String(e)]=t})}),r}function jS(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===zA.indexOf(e))throw new $A('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=qS(e.styleAliases||null),-1===GA.indexOf(this.kind))throw new $A('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function WS(e,t){var i=[];return e[t].forEach(function(r){var n=i.length;i.forEach(function(e,t){e.tag===r.tag&&e.kind===r.kind&&e.multi===r.multi&&(n=t)}),i[n]=r}),i}function YS(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(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(n,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}function HS(e){return this.extend(e)}function VS(e){var t;return null===e||1===(t=e.length)&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function XS(){return null}function KS(e){return null===e}function ZS(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 QS(e){return"true"===e||"True"===e||"TRUE"===e}function JS(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function e_(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function t_(e){return 48<=e&&e<=55}function r_(e){return 48<=e&&e<=57}function n_(e){if(null===e)return!1;var t,r=e.length,n=0,i=!1;if(!r)return!1;if("0"===(t="-"!==(t=e[n])&&"+"!==t?t:e[++n])){if(n+1===r)return!0;if("b"===(t=e[++n])){for(n++;n<r;n++)if("_"!==(t=e[n])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!e_(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!t_(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;n<r;n++)if("_"!==(t=e[n])){if(!r_(e.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===t)}function i_(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 a_(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!BA.isNegativeZero(e)}function s_(e){return!(null===e||!qA.test(e)||"_"===e[e.length-1])}function o_(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 l_(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(BA.isNegativeZero(e))return"-0.0";return t=e.toString(10),jA.test(t)?t.replace("e",".e"):t}function c_(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||BA.isNegativeZero(e))}function h_(e){return null!==e&&(null!==YA.exec(e)||null!==HA.exec(e))}function u_(e){var t,r,n,i,a,s=0,o=null,l=YA.exec(e);if(null===(l=null===l?HA.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(n=+l[4],i=+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,n,i,a,s)),o&&l.setTime(l.getTime()-o),l}function d_(e){return e.toISOString()}function p_(e){return"<<"===e||null===e}function g_(e){if(null===e)return!1;for(var t,r=0,n=e.length,i=KA,a=0;a<n;a++)if(!(64<(t=i.indexOf(e.charAt(a))))){if(t<0)return!1;r+=6}return r%8==0}function f_(e){for(var t=e.replace(/[\r\n=]/g,""),r=t.length,n=KA,i=0,a=[],s=0;s<r;s++)s%4==0&&s&&(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)),i=i<<6|n.indexOf(t.charAt(s));return 0==(e=r%4*6)?(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)):18==e?(a.push(i>>10&255),a.push(i>>2&255)):12==e&&a.push(i>>4&255),new Uint8Array(a)}function m_(e){for(var t,r="",n=0,i=e.length,a=KA,s=0;s<i;s++)s%3==0&&s&&(r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]),n=(n<<8)+e[s];return 0==(t=i%3)?r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]:2==t?r=(r=(r=(r+=a[n>>10&63])+a[n>>4&63])+a[n<<2&63])+a[64]:1==t&&(r=(r=(r=(r+=a[n>>2&63])+a[n<<4&63])+a[64])+a[64]),r}function y_(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function v_(e){if(null!==e)for(var t,r,n,i=[],a=e,s=0,o=a.length;s<o;s+=1){if(t=a[s],n=!1,"[object Object]"!==JA.call(t))return!1;for(r in t)if(QA.call(t,r)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==i.indexOf(r))return!1;i.push(r)}return!0}function x_(e){return null!==e?e:[]}function b_(e){if(null!==e)for(var t,r,n=e,i=new Array(n.length),a=0,s=n.length;a<s;a+=1){if(t=n[a],"[object Object]"!==t9.call(t)||1!==(r=Object.keys(t)).length)return!1;i[a]=[r[0],t[r[0]]]}return!0}function w_(e){if(null===e)return[];for(var t,r,n=e,i=new Array(n.length),a=0,s=n.length;a<s;a+=1)t=n[a],r=Object.keys(t),i[a]=[r[0],t[r[0]]];return i}function k_(e){if(null!==e){var t,r=e;for(t in r)if(n9.call(r,t)&&null!==r[t])return!1}return!0}function T_(e){return null!==e?e:{}}function E_(e){return Object.prototype.toString.call(e)}function C_(e){return 10===e||13===e}function S_(e){return 9===e||32===e}function __(e){return 9===e||32===e||10===e||13===e}function A_(e){return 44===e||91===e||93===e||123===e||125===e}function L_(e){return 48<=e&&e<=57?e-48:97<=(e|=32)&&e<=102?e-97+10:-1}function N_(e){return 120===e?2:117===e?4:85===e?8:0}function I_(e){return 48<=e&&e<=57?e-48:-1}function R_(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 M_(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function D_(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a9,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function O_(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=FA(e),new $A(t,e)}function P_(e,t){throw O_(e,t)}function B_(e,t){e.onWarning&&e.onWarning.call(null,O_(e,t))}function $_(e,t,r,n){var i,a,s,o;if(t<r){if(o=e.input.slice(t,r),n)for(i=0,a=o.length;i<a;i+=1)9===(s=o.charCodeAt(i))||32<=s&&s<=1114111||P_(e,"expected valid JSON character");else g9.test(o)&&P_(e,"the stream contains non-printable characters");e.result+=o}}function F_(e,t,r,n){var i,a,s,o;for(BA.isObject(r)||P_(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,o=(i=Object.keys(r)).length;s<o;s+=1)a=i[s],s9.call(t,a)||(t[a]=r[a],n[a]=!0)}function z_(e,t,r,n,i,a,s,o,l){var c,h;if(Array.isArray(i))for(c=0,h=(i=Array.prototype.slice.call(i)).length;c<h;c+=1)Array.isArray(i[c])&&P_(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===E_(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===E_(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)F_(e,t,a[c],r);else F_(e,t,a,r);else e.json||s9.call(r,i)||!s9.call(t,i)||(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,P_(e,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[i]=a,delete r[i];return t}function G_(e){var t=e.input.charCodeAt(e.position);10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):P_(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function U_(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;S_(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)for(;10!==(i=e.input.charCodeAt(++e.position))&&13!==i&&0!==i;);if(!C_(i))break;for(G_(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&B_(e,"deficient indentation"),n}function q_(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))&&!__(r))}function j_(e,t){1===t?e.result+=" ":1<t&&(e.result+=BA.repeat(`
|
||
`,t-1))}function W_(e,t,r){var n,i,a,s,o,l,c,h=e.kind,u=e.result,d=e.input.charCodeAt(e.position);if(__(d)||A_(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)&&(__(n=e.input.charCodeAt(e.position+1))||r&&A_(n)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,s=!1;0!==d;){if(58===d){if(__(n=e.input.charCodeAt(e.position+1))||r&&A_(n))break}else if(35===d){if(__(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&q_(e)||r&&A_(d))break;if(C_(d)){if(o=e.line,l=e.lineStart,c=e.lineIndent,U_(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&&($_(e,i,a,!1),j_(e,e.line-o),i=a=e.position,s=!1),S_(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return $_(e,i,a,!1),!!e.result||(e.kind=h,e.result=u,!1)}function Y_(e,t){var r,n,i=e.input.charCodeAt(e.position);if(39!==i)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(i=e.input.charCodeAt(e.position));)if(39===i){if($_(e,r,e.position,!0),39!==(i=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,n=e.position}else C_(i)?($_(e,r,n,!0),j_(e,U_(e,!1,t)),r=n=e.position):e.position===e.lineStart&&q_(e)?P_(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);P_(e,"unexpected end of the stream within a single quoted scalar")}function H_(e,t){var r,n,i,a,s,o=e.input.charCodeAt(e.position);if(34!==o)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(o=e.input.charCodeAt(e.position));){if(34===o)return $_(e,r,e.position,!0),e.position++,!0;if(92===o){if($_(e,r,e.position,!0),C_(o=e.input.charCodeAt(++e.position)))U_(e,!1,t);else if(o<256&&x9[o])e.result+=b9[o],e.position++;else if(0<(s=N_(o))){for(i=s,a=0;0<i;i--)0<=(s=L_(o=e.input.charCodeAt(++e.position)))?a=(a<<4)+s:P_(e,"expected hexadecimal character");e.result+=M_(a),e.position++}else P_(e,"unknown escape sequence");r=n=e.position}else C_(o)?($_(e,r,n,!0),j_(e,U_(e,!1,t)),r=n=e.position):e.position===e.lineStart&&q_(e)?P_(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}P_(e,"unexpected end of the stream within a double quoted scalar")}function V_(e,t){var r,n,i,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(U_(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&&P_(e,"expected the node content, but found ','"):P_(e,"missed comma between flow collection entries"),d=null,o=l=!1,63===y&&__(e.input.charCodeAt(e.position+1))&&(o=l=!0,e.position++,U_(e,!0,t)),r=e.line,n=e.lineStart,i=e.position,tA(e,t,o9,!1,!0),u=e.tag,h=e.result,U_(e,!0,t),y=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==y||(o=!0,y=e.input.charCodeAt(++e.position),U_(e,!0,t),tA(e,t,o9,!1,!0),d=e.result),c?z_(e,a,m,u,h,d,r,n,i):o?a.push(z_(e,null,m,u,h,d,r,n,i)):a.push(h),U_(e,!0,t),44===(y=e.input.charCodeAt(e.position))?(p=!0,y=e.input.charCodeAt(++e.position)):p=!1}P_(e,"unexpected end of the stream within a flow collection")}function X_(e,t){var r,n,i,a=u9,s=!1,o=!1,l=t,c=0,h=!1,u=e.input.charCodeAt(e.position);if(124===u)n=!1;else{if(62!==u)return!1;n=!0}for(e.kind="scalar",e.result="";0!==u;)if(43===(u=e.input.charCodeAt(++e.position))||45===u)u9===a?a=43===u?p9:d9:P_(e,"repeat of a chomping mode identifier");else{if(!(0<=(i=I_(u))))break;0===i?P_(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?P_(e,"repeat of an indentation width identifier"):(l=t+i-1,o=!0)}if(S_(u)){for(;S_(u=e.input.charCodeAt(++e.position)););if(35===u)for(;!C_(u=e.input.charCodeAt(++e.position))&&0!==u;);}for(;0!==u;){for(G_(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),C_(u))c++;else{if(e.lineIndent<l){a===p9?e.result+=BA.repeat(`
|
||
`,s?1+c:c):a===u9&&s&&(e.result+=`
|
||
`);break}for(n?S_(u)?(h=!0,e.result+=BA.repeat(`
|
||
`,s?1+c:c)):h?(h=!1,e.result+=BA.repeat(`
|
||
`,c+1)):0===c?s&&(e.result+=" "):e.result+=BA.repeat(`
|
||
`,c):e.result+=BA.repeat(`
|
||
`,s?1+c:c),o=s=!0,c=0,r=e.position;!C_(u)&&0!==u;)u=e.input.charCodeAt(++e.position);$_(e,r,e.position,!1)}}return!0}function K_(e,t){var r,n,i=e.tag,a=e.anchor,s=[],o=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,P_(e,"tab characters must not be used in indentation")),45===n)&&__(e.input.charCodeAt(e.position+1));)if(o=!0,e.position++,U_(e,!0,-1)&&e.lineIndent<=t)s.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,tA(e,t,c9,!1,!0),s.push(e.result),U_(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)P_(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!o&&(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0)}function Z_(e,t,r){var n,i,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,P_(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,63!==c&&58!==c||!__(n)){if(s=e.line,o=e.lineStart,l=e.position,!tA(e,r,l9,!1,!0))break;if(e.line===a){for(c=e.input.charCodeAt(e.position);S_(c);)c=e.input.charCodeAt(++e.position);if(58===c)__(c=e.input.charCodeAt(++e.position))||P_(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(z_(e,d,p,g,f,null,s,o,l),g=f=m=null),i=y=!(v=!0),g=e.tag,f=e.result;else{if(!v)return e.tag=h,e.anchor=u,!0;P_(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=h,e.anchor=u,!0;P_(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(z_(e,d,p,g,f,null,s,o,l),g=f=m=null),i=y=v=!0):y?i=!(y=!1):P_(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=n;if((e.line===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),tA(e,t,h9,!0,i)&&(y?f=e.result:m=e.result),y||(z_(e,d,p,g,f,m,s,o,l),g=f=m=null),U_(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)P_(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&z_(e,d,p,g,f,null,s,o,l),v&&(e.tag=h,e.anchor=u,e.kind="mapping",e.result=d),v}function Q_(e){var t,r,n,i=!1,a=!1,s=e.input.charCodeAt(e.position);if(33!==s)return!1;if(null!==e.tag&&P_(e,"duplication of a tag property"),60===(s=e.input.charCodeAt(++e.position))?(i=!0,s=e.input.charCodeAt(++e.position)):33===s?(a=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){for(;0!==(s=e.input.charCodeAt(++e.position))&&62!==s;);e.position<e.length?(n=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):P_(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!__(s);)33===s&&(a?P_(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),y9.test(r)||P_(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),m9.test(n)&&P_(e,"tag suffix cannot contain flow indicator characters")}n&&!v9.test(n)&&P_(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{P_(e,"tag name is malformed: "+n)}return i?e.tag=n:s9.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:P_(e,'undeclared tag handle "'+r+'"'),!0}function J_(e){var t,r=e.input.charCodeAt(e.position);if(38!==r)return!1;for(null!==e.anchor&&P_(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!__(r)&&!A_(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&P_(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function eA(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&&!__(r)&&!A_(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&P_(e,"name of an alias node must contain at least one character"),t=e.input.slice(t,e.position),s9.call(e.anchorMap,t)||P_(e,'unidentified alias "'+t+'"'),e.result=e.anchorMap[t],U_(e,!0,-1),!0}function tA(e,t,r,n,i){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=h9===r||c9===r,n&&U_(e,!0,-1)&&(p=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;Q_(e)||J_(e);)U_(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||i),1!==d&&h9!==r||(n=o9===r||l9===r?t:t+1,i=e.position-e.lineStart,1===d?o&&(K_(e,i)||Z_(e,i,n))||V_(e,n)?g=!0:(s&&X_(e,n)||Y_(e,n)||H_(e,n)?g=!0:eA(e)?(g=!0,null===e.tag&&null===e.anchor||P_(e,"alias node should not have any properties")):W_(e,n,o9===r)&&(g=!0,null===e.tag)&&(e.tag="?"),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=o&&K_(e,i))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&P_(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(s9.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||P_(e,"unknown tag !<"+e.tag+">"),null!==e.result&&u.kind!==e.kind&&P_(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)):P_(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 rA(e){var t,r,n,i,a=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(U_(e,!0,-1),i=e.input.charCodeAt(e.position),!(0<e.lineIndent||37!==i));){for(s=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!__(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&P_(e,"directive name must not be less than one character in length");0!==i;){for(;S_(i);)i=e.input.charCodeAt(++e.position);if(35===i){for(;0!==(i=e.input.charCodeAt(++e.position))&&!C_(i););break}if(C_(i))break;for(t=e.position;0!==i&&!__(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&G_(e),s9.call(k9,r)?k9[r](e,r,n):B_(e,'unknown document directive "'+r+'"')}U_(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,U_(e,!0,-1)):s&&P_(e,"directives end mark is expected"),tA(e,e.lineIndent-1,h9,!1,!0),U_(e,!0,-1),e.checkLineBreaks&&f9.test(e.input.slice(a,e.position))&&B_(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&q_(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,U_(e,!0,-1)):e.position<e.length-1&&P_(e,"end of the stream or a document separator is expected")}function nA(e,t){t=t||{};var r=new D_(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,P_(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;)rA(r);return r.documents}function iA(e,t,r){null!==t&&"object"==typeof t&&"u"<typeof r&&(r=t,t=null);var n=nA(e,r);if("function"!=typeof t)return n;for(var i=0,a=n.length;i<a;i+=1)t(n[i])}function aA(e,t){if(0!==(e=nA(e,t)).length){if(1===e.length)return e[0];throw new $A("expected a single document in the stream, but found more")}}function sA(e,t){var r,n,i,a,s,o,l;if(null===t)return{};for(r={},i=0,a=(n=Object.keys(t)).length;i<a;i+=1)s=n[i],o=String(t[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=e.compiledTypeMap.fallback[s])&&C9.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}function oA(e){var t,r,n=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 $A("code point within a string may not be greater than 0xFFFFFFFF");t="U",r=8}return"\\"+t+BA.repeat("0",r-n.length)+n}function lA(e){this.schema=e.schema||a9,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=BA.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=sA(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?I9: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 cA(e,t){for(var r,n,i=BA.repeat(" ",t),a=0,s="",o=e.length;a<o;)a=-1===(r=e.indexOf(`
|
||
`,a))?(n=e.slice(a),o):(n=e.slice(a,r+1),r+1),n.length&&n!==`
|
||
`&&(s+=i),s+=n;return s}function hA(e,t){return`
|
||
`+BA.repeat(" ",e.indent*t)}function uA(e,t){for(var r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function dA(e){return 32===e||9===e}function pA(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==S9||65536<=e&&e<=1114111}function gA(e){return pA(e)&&e!==S9&&13!==e&&e!==_9}function fA(e,t,r){var n=gA(e),i=n&&!dA(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||gA(t)&&!dA(t)&&35===e||58===t&&i}function mA(e){return pA(e)&&e!==S9&&!dA(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 yA(e){return!dA(e)&&58!==e}function vA(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 xA(e){return/^\n* /.test(e)}function bA(e,t,r,n,i,a,s,o){var l,c=0,h=null,u=!1,d=!1,p=-1!==n,g=-1,f=mA(vA(e,0))&&yA(vA(e,e.length-1));if(t||s)for(l=0;l<e.length;65536<=c?l+=2:l++){if(!pA(c=vA(e,l)))return P9;f=f&&fA(c,h,o),h=c}else{for(l=0;l<e.length;65536<=c?l+=2:l++){if((c=vA(e,l))===_9)u=!0,p&&(d=d||n<l-g-1&&" "!==e[g+1],g=l);else if(!pA(c))return P9;f=f&&fA(c,h,o),h=c}d=d||p&&n<l-g-1&&" "!==e[g+1]}return u||d?9<r&&xA(e)?P9:s?a===I9?P9:M9:d?O9:D9:!f||s||i(e)?a===I9?P9:M9:R9}function wA(i,a,s,o,l){i.dump=(()=>{if(0===a.length)return i.quotingType===I9?'""':"''";if(!i.noCompatMode&&(-1!==L9.indexOf(a)||N9.test(a)))return i.quotingType===I9?'"'+a+'"':"'"+a+"'";var e=i.indent*Math.max(1,s),t=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-e),r=o||-1<i.flowLevel&&s>=i.flowLevel;function n(e){return uA(i,e)}switch(mt(n,"testAmbiguity"),bA(a,r,i.indent,t,n,i.quotingType,i.forceQuotes&&!o,l)){case R9:return a;case M9:return"'"+a.replace(/'/g,"''")+"'";case D9:return"|"+kA(a,i.indent)+TA(cA(a,e));case O9:return">"+kA(a,i.indent)+TA(cA(EA(a,t),e));case P9:return'"'+SA(a)+'"';default:throw new $A("impossible error: invalid scalar style")}})()}function kA(e,t){var t=xA(e)?String(t):"",r=e[e.length-1]===`
|
||
`;return t+(!r||e[e.length-2]!==`
|
||
`&&e!==`
|
||
`?r?"":"-":"+")+`
|
||
`}function TA(e){return e[e.length-1]===`
|
||
`?e.slice(0,-1):e}function EA(e,t){for(var r,n=/(\n+)([^\n]*)/g,i=(r=-1!==(r=e.indexOf(`
|
||
`))?r:e.length,n.lastIndex=r,CA(e.slice(0,r),t)),a=e[0]===`
|
||
`||" "===e[0];o=n.exec(e);){var s=o[1],o=o[2],l=" "===o[0];i+=s+(a||l||""===o?"":`
|
||
`)+CA(o,t),a=l}return i}function CA(e,t){if(""===e||" "===e[0])return e;for(var r,n,i=/ [^ ]/g,a=0,s=0,o="";n=i.exec(e);)t<(n=n.index)-a&&(o+=`
|
||
`+e.slice(a,r=a<s?s:n),a=r+1),s=n;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 SA(e){for(var t,r,n="",i=0;i<e.length;65536<=t?i+=2:i++)t=vA(e,i),!(r=A9[t])&&pA(t)?(n+=e[i],65536<=t&&(n+=e[i+1])):n+=r||oA(t);return n}function _A(e,t,r){for(var n,i="",a=e.tag,s=0,o=r.length;s<o;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(RA(e,t,n,!1,!1)||"u"<typeof n&&RA(e,t,null,!1,!1))&&(""!==i&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}function AA(e,t,r,n){for(var i,a="",s=e.tag,o=0,l=r.length;o<l;o+=1)i=r[o],e.replacer&&(i=e.replacer.call(r,String(o),i)),(RA(e,t+1,i,!0,!0,!1,!0)||"u"<typeof i&&RA(e,t+1,null,!0,!0,!1,!0))&&(n&&""===a||(a+=hA(e,t)),e.dump&&_9===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}function LA(e,t,r){for(var n,i,a,s="",o=e.tag,l=Object.keys(r),c=0,h=l.length;c<h;c+=1)(a="")!==s&&(a+=", "),e.condenseFlow&&(a+='"'),i=r[n=l[c]],e.replacer&&(i=e.replacer.call(r,n,i)),RA(e,t,n,!1,!1)&&(1024<e.dump.length&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),RA(e,t,i,!1,!1))&&(s+=a+=e.dump);e.tag=o,e.dump="{"+s+"}"}function NA(e,t,r,n){var i,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 $A("sortKeys must be a boolean or a function");for(i=0,a=u.length;i<a;i+=1)l="",n&&""===c||(l+=hA(e,t)),s=r[o=u[i]],e.replacer&&(s=e.replacer.call(r,o,s)),RA(e,t+1,o,!0,!0,!0)&&((o=null!==e.tag&&"?"!==e.tag||e.dump&&1024<e.dump.length)&&(e.dump&&_9===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,o&&(l+=hA(e,t)),RA(e,t+1,s,!0,o))&&(e.dump&&_9===e.dump.charCodeAt(0)?l+=":":l+=": ",c+=l+=e.dump);e.tag=h,e.dump=c||"{}"}function IA(e,t,r){for(var n,i,a,s=r?e.explicitTypes:e.implicitTypes,o=0,l=s.length;o<l;o+=1)if(((i=s[o]).instanceOf||i.predicate)&&(!i.instanceOf||"object"==typeof t&&t instanceof i.instanceOf)&&(!i.predicate||i.predicate(t))){if(r?i.multi&&i.representName?e.tag=i.representName(t):e.tag=i.tag:e.tag="?",i.represent){if(a=e.styleMap[i.tag]||i.defaultStyle,"[object Function]"===E9.call(i.represent))n=i.represent(t,a);else{if(!C9.call(i.represent,a))throw new $A("!<"+i.tag+'> tag resolver accepts not "'+a+'" style');n=i.represent[a](t,a)}e.dump=n}return!0}return!1}function RA(e,t,r,n,i,a,s){e.tag=null,e.dump=r,IA(e,r,!1)||IA(e,r,!0);var o,l,c=E9.call(e.dump),h=n,u=(n=n&&(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)&&(i=!1),l&&e.usedDuplicates[o])e.dump="*ref_"+o;else{if(u&&l&&!e.usedDuplicates[o]&&(e.usedDuplicates[o]=!0),"[object Object]"===c)n&&0!==Object.keys(e.dump).length?(NA(e,t,e.dump,i),l&&(e.dump="&ref_"+o+e.dump)):(LA(e,t,e.dump),l&&(e.dump="&ref_"+o+" "+e.dump));else if("[object Array]"===c)n&&0!==e.dump.length?(e.noArrayIndent&&!s&&0<t?AA(e,t-1,e.dump,i):AA(e,t,e.dump,i),l&&(e.dump="&ref_"+o+e.dump)):(_A(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 $A("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&wA(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 MA(e,t){var r,n,i=[],a=[];for(DA(e,i,a),r=0,n=a.length;r<n;r+=1)t.duplicates.push(i[a[r]]);t.usedDuplicates=new Array(n)}function DA(e,t,r){var n,i,a;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===r.indexOf(i)&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)DA(e[i],t,r);else for(i=0,a=(n=Object.keys(e)).length;i<a;i+=1)DA(e[n[i]],t,r)}function OA(e,t){return(t=new lA(t=t||{})).noRefs||MA(e,t),t.replacer&&(e=t.replacer.call({"":e},"",e)),RA(t,0,e,!0,!0)?t.dump+`
|
||
`:""}function PA(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 BA,$A,FA,zA,GA,UA,qA,jA,WA,YA,HA,VA,XA,KA,ZA,QA,JA,e9,t9,r9,n9,i9,a9,s9,o9,l9,c9,h9,u9,d9,p9,g9,f9,m9,y9,v9,x9,b9,w9,k9,T9,E9,C9,S9,_9,A9,L9,N9,I9,R9,M9,D9,O9,P9,B9,$9,F9=e(()=>{for(mt(RS,"isNothing"),mt(MS,"isObject"),mt(DS,"toArray"),mt(OS,"extend"),mt(PS,"repeat"),mt(BS,"isNegativeZero"),BA={isNothing:RS,isObject:MS,toArray:DS,repeat:PS,isNegativeZero:BS,extend:OS},mt($S,"formatError"),mt(FS,"YAMLException$1"),((FS.prototype=Object.create(Error.prototype)).constructor=FS).prototype.toString=mt(function(e){return this.name+": "+$S(this,e)},"toString"),$A=FS,mt(zS,"getLine"),mt(GS,"padStart"),mt(US,"makeSnippet"),FA=US,zA=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],GA=["scalar","sequence","mapping"],mt(qS,"compileStyleAliases"),mt(jS,"Type$1"),UA=jS,mt(WS,"compileList"),mt(YS,"compileMap"),mt(HS,"Schema$1"),HS.prototype.extend=mt(function(e){var t=[],r=[];if(e instanceof UA)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 $A("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 UA))throw new $A("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new $A("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 $A("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 UA))throw new $A("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(e=Object.create(HS.prototype)).implicit=(this.implicit||[]).concat(t),e.explicit=(this.explicit||[]).concat(r),e.compiledImplicit=WS(e,"implicit"),e.compiledExplicit=WS(e,"explicit"),e.compiledTypeMap=YS(e.compiledImplicit,e.compiledExplicit),e},"extend"),WA=HS,T9=new UA("tag:yaml.org,2002:str",{kind:"scalar",construct:mt(function(e){return null!==e?e:""},"construct")}),VA=new UA("tag:yaml.org,2002:seq",{kind:"sequence",construct:mt(function(e){return null!==e?e:[]},"construct")}),XA=new UA("tag:yaml.org,2002:map",{kind:"mapping",construct:mt(function(e){return null!==e?e:{}},"construct")}),WA=new WA({explicit:[T9,VA,XA]}),mt(VS,"resolveYamlNull"),mt(XS,"constructYamlNull"),mt(KS,"isNull"),T9=new UA("tag:yaml.org,2002:null",{kind:"scalar",resolve:VS,construct:XS,predicate:KS,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(ZS,"resolveYamlBoolean"),mt(QS,"constructYamlBoolean"),mt(JS,"isBoolean"),VA=new UA("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ZS,construct:QS,predicate:JS,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(e_,"isHexCode"),mt(t_,"isOctCode"),mt(r_,"isDecCode"),mt(n_,"resolveYamlInteger"),mt(i_,"constructYamlInteger"),mt(a_,"isInteger"),XA=new UA("tag:yaml.org,2002:int",{kind:"scalar",resolve:n_,construct:i_,predicate:a_,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"]}}),qA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),mt(s_,"resolveYamlFloat"),mt(o_,"constructYamlFloat"),jA=/^[-+]?[0-9]+e/,mt(l_,"representYamlFloat"),mt(c_,"isFloat"),ZA=new UA("tag:yaml.org,2002:float",{kind:"scalar",resolve:s_,construct:o_,predicate:c_,represent:l_,defaultStyle:"lowercase"}),WA=WA.extend({implicit:[T9,VA,XA,ZA]}),T9=WA,YA=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),HA=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(h_,"resolveYamlTimestamp"),mt(u_,"constructYamlTimestamp"),mt(d_,"representYamlTimestamp"),VA=new UA("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:h_,construct:u_,instanceOf:Date,represent:d_}),mt(p_,"resolveYamlMerge"),XA=new UA("tag:yaml.org,2002:merge",{kind:"scalar",resolve:p_}),KA=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`,mt(g_,"resolveYamlBinary"),mt(f_,"constructYamlBinary"),mt(m_,"representYamlBinary"),mt(y_,"isBinary"),ZA=new UA("tag:yaml.org,2002:binary",{kind:"scalar",resolve:g_,construct:f_,predicate:y_,represent:m_}),QA=Object.prototype.hasOwnProperty,JA=Object.prototype.toString,mt(v_,"resolveYamlOmap"),mt(x_,"constructYamlOmap"),e9=new UA("tag:yaml.org,2002:omap",{kind:"sequence",resolve:v_,construct:x_}),t9=Object.prototype.toString,mt(b_,"resolveYamlPairs"),mt(w_,"constructYamlPairs"),r9=new UA("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:b_,construct:w_}),n9=Object.prototype.hasOwnProperty,mt(k_,"resolveYamlSet"),mt(T_,"constructYamlSet"),i9=new UA("tag:yaml.org,2002:set",{kind:"mapping",resolve:k_,construct:T_}),a9=T9.extend({implicit:[VA,XA],explicit:[ZA,e9,r9,i9]}),s9=Object.prototype.hasOwnProperty,h9=4,u9=o9=1,d9=l9=2,p9=c9=3,g9=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f9=/[\x85\u2028\u2029]/,m9=/[,\[\]\{\}]/,y9=/^(?:!|!!|![a-z\-]+!)$/i,v9=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,mt(E_,"_class"),mt(C_,"is_EOL"),mt(S_,"is_WHITE_SPACE"),mt(__,"is_WS_OR_EOL"),mt(A_,"is_FLOW_INDICATOR"),mt(L_,"fromHexCode"),mt(N_,"escapedHexLen"),mt(I_,"fromDecimalCode"),mt(R_,"simpleEscapeSequence"),mt(M_,"charFromCodepoint"),x9=new Array(256),b9=new Array(256),w9=0;w9<256;w9++)x9[w9]=R_(w9)?1:0,b9[w9]=R_(w9);mt(D_,"State$1"),mt(O_,"generateError"),mt(P_,"throwError"),mt(B_,"throwWarning"),k9={YAML:mt(function(e,t,r){var n,i;null!==e.version&&P_(e,"duplication of %YAML directive"),1!==r.length&&P_(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&P_(e,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&P_(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&B_(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:mt(function(e,t,r){var n;2!==r.length&&P_(e,"TAG directive accepts exactly two arguments"),n=r[1],y9.test(r=r[0])||P_(e,"ill-formed tag handle (first argument) of the TAG directive"),s9.call(e.tagMap,r)&&P_(e,'there is a previously declared suffix for "'+r+'" tag handle'),v9.test(n)||P_(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{P_(e,"tag prefix is malformed: "+n)}e.tagMap[r]=n},"handleTagDirective")},mt($_,"captureSegment"),mt(F_,"mergeMappings"),mt(z_,"storeMappingPair"),mt(G_,"readLineBreak"),mt(U_,"skipSeparationSpace"),mt(q_,"testDocumentSeparator"),mt(j_,"writeFoldedLines"),mt(W_,"readPlainScalar"),mt(Y_,"readSingleQuotedScalar"),mt(H_,"readDoubleQuotedScalar"),mt(V_,"readFlowCollection"),mt(X_,"readBlockScalar"),mt(K_,"readBlockSequence"),mt(Z_,"readBlockMapping"),mt(Q_,"readTagProperty"),mt(J_,"readAnchorProperty"),mt(eA,"readAlias"),mt(tA,"composeNode"),mt(rA,"readDocument"),mt(nA,"loadDocuments"),mt(iA,"loadAll$1"),mt(aA,"load$1"),T9={loadAll:iA,load:aA},E9=Object.prototype.toString,C9=Object.prototype.hasOwnProperty,S9=65279,_9=10,A9={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"},L9=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],N9=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,mt(sA,"compileStyleMap"),mt(oA,"encodeHex"),I9=2,mt(lA,"State"),mt(cA,"indentString"),mt(hA,"generateNextLine"),mt(uA,"testImplicitResolving"),mt(dA,"isWhitespace"),mt(pA,"isPrintable"),mt(gA,"isNsCharOrWhitespace"),mt(fA,"isPlainSafe"),mt(mA,"isPlainSafeFirst"),mt(yA,"isPlainSafeLast"),mt(vA,"codePointAt"),mt(xA,"needIndentIndicator"),R9=1,M9=2,D9=3,O9=4,P9=5,mt(bA,"chooseScalarStyle"),mt(wA,"writeScalar"),mt(kA,"blockHeader"),mt(TA,"dropEndingNewline"),mt(EA,"foldString"),mt(CA,"foldLine"),mt(SA,"escapeString"),mt(_A,"writeFlowSequence"),mt(AA,"writeBlockSequence"),mt(LA,"writeFlowMapping"),mt(NA,"writeBlockMapping"),mt(IA,"detectType"),mt(RA,"writeNode"),mt(MA,"getDuplicateReferences"),mt(DA,"inspectNode"),mt(OA,"dump$1"),mt(PA,"renamed"),B9=WA,$9=T9.load,PA("safeLoad","load"),PA("safeLoadAll","loadAll"),PA("safeDump","dump")});function z9(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function G9(e){Z9=e}function U9(e,t=""){let n="string"==typeof e?e:e.source,i={replace:mt((e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(J9.caret,"$1"),n=n.replace(e,r),i},"replace"),getRegex:mt(()=>new RegExp(n,t),"getRegex")};return i}function q9(e,t){if(t){if(J9.escapeTest.test(e))return e.replace(J9.escapeReplace,EL)}else if(J9.escapeTestNoEncode.test(e))return e.replace(J9.escapeReplaceNoEncode,EL);return e}function j9(e){try{e=encodeURI(e).replace(J9.percentDecode,"%")}catch{return null}return e}function W9(e,t){let r=e.replace(J9.findPipe,(e,t,r)=>{let n=!1,i=t;for(;0<=--i&&"\\"===r[i];)n=!n;return n?"|":" |"}),n=r.split(J9.splitPipe),i=0;if(n[0].trim()||n.shift(),0<n.length&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(J9.slashPipe,"|");return n}function Y9(e,t,r){var n=e.length;if(0===n)return"";let i=0;for(;i<n;){var a=e.charAt(n-i-1);if((a!==t||r)&&(a===t||!r))break;i++}return e.slice(0,n-i)}function H9(t,r){if(-1===t.indexOf(r[1]))return-1;let n=0;for(let e=0;e<t.length;e++)if("\\"===t[e])e++;else if(t[e]===r[0])n++;else if(t[e]===r[1]&&--n<0)return e;return 0<n?-2:-1}function V9(e,t,r,n,i){var a=t.href,t=t.title||null,i=e[1].replace(i.other.outputLinkReplace,"$1"),e=(n.state.inLink=!0,{type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:a,title:t,text:i,tokens:n.inlineTokens(i)});return n.state.inLink=!1,e}function X9(e,t,r){if(null===(e=e.match(r.other.indentCodeCompensation)))return t;let n=e[1];return t.split(`
|
||
`).map(e=>{var t=e.match(r.other.beginningSpace);return null!==t&&([t]=t,t.length>=n.length)?e.slice(n.length):e}).join(`
|
||
`)}function K9(e,t){return RL.parse(e,t)}var Z9,Q9,J9,eL,tL,rL,nL,iL,aL,sL,oL,lL,cL,hL,uL,dL,pL,gL,fL,mL,yL,vL,xL,bL,wL,kL,TL,EL,CL,SL,_L,AL,LL,NL,IL,RL,ML=e(()=>{mt(z9,"M"),Z9=z9(),mt(G9,"H"),Q9={exec:mt(()=>null,"exec")},mt(U9,"h"),J9={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:mt(e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),"headingBeginRegex"),htmlBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},aL=/^(?:[ \t]*(?:\n|$))+/,sL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,rL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hL=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,nL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,iL=/(?:[*+-]|\d{1,9}[.)])/,xL=U9(gL=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,iL).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(),gL=U9(gL).replace(/bull/g,iL).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(),yL=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uL=/^[^\n]+/,fL=/(?!\s*\])(?:\\.|[^\[\]\\])+/,tL=U9(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fL).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),iL=U9(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,iL).getRegex(),vL="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",pL=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,bL=U9("^ {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",pL).replace("tag",vL).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),dL=U9(yL).replace("hr",hL).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",vL).getRegex(),eL={blockquote:U9(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",dL).getRegex(),code:sL,def:tL,fences:rL,heading:nL,hr:hL,html:bL,lheading:xL,list:iL,newline:aL,paragraph:dL,table:Q9,text:uL},sL=U9("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hL).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",vL).getRegex(),tL={...eL,lheading:gL,table:sL,paragraph:U9(yL).replace("hr",hL).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sL).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",vL).getRegex()},rL={...eL,html:U9(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pL).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:Q9,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:U9(yL).replace("hr",hL).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",xL).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},nL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,iL=/^( {2,}|\\)\n(?!\s*$)/,aL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,dL=/[\p{P}\p{S}]/u,uL=/[\s\p{P}\p{S}]/u,gL=/[^\s\p{P}\p{S}]/u,sL=U9(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,uL).getRegex(),vL=/(?!~)[\p{P}\p{S}]/u,yL=/(?!~)[\s\p{P}\p{S}]/u,hL=/(?:[^\s\p{P}\p{S}]|~)/u,xL=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,IL=U9(oL=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,dL).getRegex(),oL=U9(oL,"u").replace(/punct/g,vL).getRegex(),lL=U9(cL="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,gL).replace(/punctSpace/g,uL).replace(/punct/g,dL).getRegex(),cL=U9(cL,"gu").replace(/notPunctSpace/g,hL).replace(/punctSpace/g,yL).replace(/punct/g,vL).getRegex(),hL=U9("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gL).replace(/punctSpace/g,uL).replace(/punct/g,dL).getRegex(),yL=U9(/\\(punct)/,"gu").replace(/punct/g,dL).getRegex(),vL=U9(/^<(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(),gL=U9(pL).replace("(?:--\x3e|$)","--\x3e").getRegex(),uL=U9("^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",gL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dL=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pL=U9(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",dL).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gL=U9(/^!?\[(label)\]\[(ref)\]/).replace("label",dL).replace("ref",fL).getRegex(),fL=U9(/^!?\[(ref)\](?:\[\])?/).replace("ref",fL).getRegex(),mL=U9("reflink|nolink(?!\\()","g").replace("reflink",gL).replace("nolink",fL).getRegex(),vL={...yL={_backpedal:Q9,anyPunctuation:yL,autolink:vL,blockSkip:xL,br:iL,code:bL,del:Q9,emStrongLDelim:IL,emStrongRDelimAst:lL,emStrongRDelimUnd:hL,escape:nL,link:pL,nolink:fL,punctuation:sL,reflink:gL,reflinkSearch:mL,tag:uL,text:aL,url:Q9},link:U9(/^!?\[(label)\]\((.*?)\)/).replace("label",dL).getRegex(),reflink:U9(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",dL).getRegex()},xL={...yL,emStrongRDelimAst:cL,emStrongLDelim:oL,url:U9(/^((?: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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},bL={...xL,br:U9(iL).replace("{2,}","*").getRegex(),text:U9(xL.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wL={normal:eL,gfm:tL,pedantic:rL},kL={normal:yL,gfm:xL,breaks:bL,pedantic:vL},TL={"&":"&","<":"<",">":">",'"':""","'":"'"},EL=mt(e=>TL[e],"ge"),mt(q9,"R"),mt(j9,"J"),mt(W9,"V"),mt(Y9,"A"),mt(H9,"fe"),mt(V9,"de"),mt(X9,"Je"),CL=class{static{mt(this,"S")}options;rules;lexer;constructor(e){this.options=e||Z9}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:Y9(t,`
|
||
`)}}fences(e){var t,r;if(e=this.rules.block.fences.exec(e))return r=X9(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=Y9(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:Y9(e[0],`
|
||
`)}}blockquote(e){if(e=this.rules.block.blockquote.exec(e)){let n=Y9(e[0],`
|
||
`).split(`
|
||
`),i="",a="",s=[];for(;0<n.length;){let e=!1,t=[],r;for(r=0;r<n.length;r++)if(this.rules.other.blockquoteStart.test(n[r]))t.push(n[r]),e=!0;else{if(e)break;t.push(n[r])}n=n.slice(r);var o,l=(c=t.join(`
|
||
`)).replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,""),c=(i=i?i+`
|
||
`+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===n.length)break;if("code"===(l=s.at(-1))?.type)break;if("blockquote"===l?.type){var h=(c=l).raw+`
|
||
`+n.join(`
|
||
`),h=this.blockquote(h);s[s.length-1]=h,i=i.substring(0,i.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+`
|
||
`+n.join(`
|
||
`),o=this.list(h),s[s.length-1]=o,i=i.substring(0,i.length-l.raw.length)+o.raw,a=a.substring(0,a.length-c.raw.length)+o.raw,n=h.substring(s.at(-1).raw.length).split(`
|
||
`))}return{type:"blockquote",raw:i,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 n=p[2].split(`
|
||
`,1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),i=d.split(`
|
||
`,1)[0],a=!n.trim(),s=0;if(this.options.pedantic?(s=2,r=n.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(this.rules.other.nonSpaceChar))?1:s,r=n.slice(s),s+=p[1].length),a&&this.rules.other.blankLine.test(i)&&(t+=i+`
|
||
`,d=d.substring(i.length+1),e=!0),!e)for(var g=this.rules.other.nextBulletRegex(s),f=this.rules.other.hrRegex(s),m=this.rules.other.fencesBeginRegex(s),y=this.rules.other.headingBeginRegex(s),v=this.rules.other.htmlBeginRegex(s);d;){var x,b=d.split(`
|
||
`,1)[0];if(i=b,x=this.options.pedantic?i=i.replace(this.rules.other.listReplaceNesting," "):i.replace(this.rules.other.tabCharGlobal," "),m.test(i)||y.test(i)||v.test(i)||g.test(i)||f.test(i))break;if(x.search(this.rules.other.nonSpaceChar)>=s||!i.trim())r+=`
|
||
`+x.slice(s);else{if(a||4<=n.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)||m.test(n)||y.test(n)||f.test(n))break;r+=`
|
||
`+i}a||i.trim()||(a=!0),t+=b+`
|
||
`,d=d.substring(b.length+1),n=x.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,n=c.items.at(-1);if(n){n.raw=n.raw.trimEnd(),n.text=n.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,n;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"):"",n=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:n}}table(i){if((i=this.rules.block.table.exec(i))&&this.rules.other.tableDelimiter.test(i[2])){let t=W9(i[1]),e=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],n={type:"table",raw:i[0],header:[],align:[],rows:[]};if(t.length===e.length){for(var a of e)this.rules.other.tableAlignRight.test(a)?n.align.push("right"):this.rules.other.tableAlignCenter.test(a)?n.align.push("center"):this.rules.other.tableAlignLeft.test(a)?n.align.push("left"):n.align.push(null);for(let e=0;e<t.length;e++)n.header.push({text:t[e],tokens:this.lexer.inline(t[e]),header:!0,align:n.align[e]});for(var s of r)n.rows.push(W9(s,n.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:n.align[t]})));return n}}}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 n,i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;var a=Y9(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else{if(-2===(a=H9(r[2],"()")))return;-1<a&&(n=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).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(),V9(r,{href:(e=this.rules.other.startAngleBracket.test(e)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?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()])?V9(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,n=e,i=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])n+=r;else if((l[5]||l[6])&&e%3&&!((e+r)%3))i+=r;else if(!(0<(n-=r)))return r=Math.min(r,r+n+i),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(n){if(n=this.rules.inline.code.exec(n)){let e=n[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:n[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,n;if(r=this.rules.inline.url.exec(e)){let e,t;if("@"===r[2])e=r[0],t="mailto:"+e;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==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}}},SL=class r{static{mt(this,"a")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Z9,this.options.tokenizer=this.options.tokenizer||new CL,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:J9,block:wL.normal,inline:kL.normal},this.options.pedantic?(e.block=wL.pedantic,e.inline=kL.pedantic):this.options.gfm&&(e.block=wL.gfm,this.options.breaks?e.inline=kL.breaks:e.inline=kL.gfm),this.tokenizer.rules=e}static get rules(){return{block:wL,inline:kL}}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(J9.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(i,r=[],n=!1){for(this.options.pedantic&&(i=i.replace(J9.tabCharGlobal," ").replace(J9.spaceLine,""));i;){let t;if(!this.options.extensions?.block?.some(e=>!!(t=e.call({lexer:this},i,r))&&(i=i.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.space(i)){i=i.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(i))i=i.substring(t.raw.length),"paragraph"===(e=r.at(-1))?.type||"text"===e?.type?(e.raw+=`
|
||
`+t.raw,e.text+=`
|
||
`+t.text,this.inlineQueue.at(-1).src=e.text):r.push(t);else if(t=this.tokenizer.fences(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.heading(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(i)){i=i.substring(t.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=`
|
||
`+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})}else if(t=this.tokenizer.table(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.lheading(i))i=i.substring(t.raw.length),r.push(t);else{let e=i;if(this.options.extensions?.startBlock){let t=1/0,r=i.slice(1),n;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(e=i.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(e)))a=r.at(-1),n&&"paragraph"===a?.type?(a.raw+=`
|
||
`+t.raw,a.text+=`
|
||
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(t),n=e.length!==i.length,i=i.substring(t.raw.length);else if(t=this.tokenizer.text(i)){i=i.substring(t.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=`
|
||
`+t.raw,s.text+=`
|
||
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(t)}else if(i){if(s="Infinite loop on byte: "+i.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(i,r=[]){let e=i,t=null;if(this.tokens.links){var n=Object.keys(this.tokens.links);if(0<n.length)for(;null!=(t=this.tokenizer.rules.inline.reflinkSearch.exec(e));)n.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);let a=!1,s="";for(;i;){a||(s=""),a=!1;let t;if(!this.options.extensions?.inline?.some(e=>!!(t=e.call({lexer:this},i,r))&&(i=i.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.escape(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.tag(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.link(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.reflink(i,this.tokens.links)){i=i.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(i,e,s))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.codespan(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.br(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.del(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.autolink(i))i=i.substring(t.raw.length),r.push(t);else if(!this.state.inLink&&(t=this.tokenizer.url(i)))i=i.substring(t.raw.length),r.push(t);else{let e=i;if(this.options.extensions?.startInline){let t=1/0,r=i.slice(1),n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(e=i.substring(0,t+1))}if(t=this.tokenizer.inlineText(e))i=i.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(i){var l="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}}return r}},_L=class{static{mt(this,"$")}options;parser;constructor(e){this.options=e||Z9}space(e){return""}code({text:e,lang:t,escaped:r}){return t=(t||"").match(J9.notSpaceStart)?.[0],e=e.replace(J9.endingNewline,"")+`
|
||
`,t?'<pre><code class="language-'+q9(t)+'">'+(r?e:q9(e,!0))+`</code></pre>
|
||
`:"<pre><code>"+(r?e:q9(e,!0))+`</code></pre>
|
||
`}blockquote({tokens:e}){return`<blockquote>
|
||
${this.parser.parse(e)}</blockquote>
|
||
`}html({text:e}){return e}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,n="";for(let e=0;e<t.items.length;e++){var i=t.items[e];n+=this.listitem(i)}var a=e?"ol":"ul";return"<"+a+(e&&1!==r?' start="'+r+'"':"")+`>
|
||
`+n+"</"+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+" "+q9(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 n="";for(let e=0;e<t.rows.length;e++){var i=t.rows[e];r="";for(let e=0;e<i.length;e++)r+=this.tablecell(i[e]);n+=this.tablerow({text:r})}return`<table>
|
||
<thead>
|
||
`+e+`</thead>
|
||
`+(n=n&&`<tbody>${n}</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>${q9(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),n=j9(e);if(null===n)return r;let i='<a href="'+(e=n)+'"';return t&&(i+=' title="'+q9(t)+'"'),i+=">"+r+"</a>"}image({href:e,title:t,text:r,tokens:n}){if(n&&(r=this.parser.parseInline(n,this.parser.textRenderer)),null===(n=j9(e)))return q9(r);let i=`<img src="${e=n}" alt="${r}"`;return t&&(i+=` title="${q9(t)}"`),i+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:q9(e.text)}},AL=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""}},LL=class n{static{mt(this,"a")}options;renderer;textRenderer;constructor(e){this.options=e||Z9,this.options.renderer=this.options.renderer||new _L,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new AL}static parse(e,t){return new n(t).parse(e)}static parseInline(e,t){return new n(t).parseInline(e)}parse(n,i=!0){let a="";for(let r=0;r<n.length;r++){var e=n[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","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"paragraph":a+=this.renderer.paragraph(o);continue;case"text":{let e=o,t=this.renderer.text(e);for(;r+1<n.length&&"text"===n[r+1].type;)e=n[++r],t+=`
|
||
`+this.renderer.text(e);a+=i?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 n="";for(let e=0;e<t.length;e++){var i=t[e];if(this.options.extensions?.renderers?.[i.type]){var a=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==a||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}var s=i;switch(s.type){case"escape":n+=r.text(s);break;case"html":n+=r.html(s);break;case"link":n+=r.link(s);break;case"image":n+=r.image(s);break;case"strong":n+=r.strong(s);break;case"em":n+=r.em(s);break;case"codespan":n+=r.codespan(s);break;case"br":n+=r.br(s);break;case"del":n+=r.del(s);break;case"text":n+=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 n}},NL=class{static{mt(this,"L")}options;block;constructor(e){this.options=e||Z9}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?SL.lex:SL.lexInline}provideParser(){return this.block?LL.parse:LL.parseInline}},IL=class{static{mt(this,"B")}defaults=z9();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=LL;Renderer=_L;TextRenderer=AL;Lexer=SL;Tokenizer=CL;Hooks=NL;constructor(...e){this.use(...e)}walkTokens(e,r){let n=[];for(var i of e)switch(n=n.concat(r.call(this,i)),i.type){case"table":var t,a,s=i;for(t of s.header)n=n.concat(this.walkTokens(t.tokens,r));for(a of s.rows)for(var o of a)n=n.concat(this.walkTokens(o.tokens,r));break;case"list":s=i,n=n.concat(this.walkTokens(s.items,r));break;default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(e=>{e=t[e].flat(1/0),n=n.concat(this.walkTokens(e,r))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,r)))}}return n}use(...e){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(t=>{var e={...t};if(e.async=this.defaults.async||e.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=i.renderers[n.name];r?i.renderers[n.name]=function(...e){var t=n.renderer.apply(this,e);return!1===t?r.apply(this,e):t}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");var e=i[n.level];e?e.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&("block"===n.level?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:"inline"===n.level&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),e.extensions=i),t.renderer){let i=this.defaults.renderer||new _L(this.defaults);for(var a in t.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(!["options","parser"].includes(a)){let e=a,r=t.renderer[e],n=i[e];i[e]=(...e)=>{var t=r.apply(i,e);return(!1===t?n.apply(i,e):t)||""}}}e.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new CL(this.defaults);for(var s in t.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let e=s,r=t.tokenizer[e],n=i[e];i[e]=(...e)=>{var t=r.apply(i,e);return!1===t?n.apply(i,e):t}}}e.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new NL;for(var o in t.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(!["options","block"].includes(o)){let e=o,r=t.hooks[e],n=i[e];NL.passThroughHooks.has(o)?i[e]=e=>this.defaults.async?Promise.resolve(r.call(i,e)).then(e=>n.call(i,e)):(e=r.call(i,e),n.call(i,e)):i[e]=(...e)=>{var t=r.apply(i,e);return!1===t?n.apply(i,e):t}}}e.hooks=i}if(t.walkTokens){let r=this.defaults.walkTokens,n=t.walkTokens;e.walkTokens=function(e){let t=[];return t.push(n.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 SL.lex(e,t??this.defaults)}parser(e,t){return LL.parse(e,t??this.defaults)}parseMarkdown(o){return(r,e)=>{let t={...e},n={...this.defaults,...t},i=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===t.async)return i(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 i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));n.hooks&&((n.hooks.options=n).hooks.block=o);let a=n.hooks?n.hooks.provideLexer():o?SL.lex:SL.lexInline,s=n.hooks?n.hooks.provideParser():o?LL.parse:LL.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(e=>a(e,n)).then(e=>n.hooks?n.hooks.processAllTokens(e):e).then(e=>n.walkTokens?Promise.all(this.walkTokens(e,n.walkTokens)).then(()=>e):e).then(e=>s(e,n)).then(e=>n.hooks?n.hooks.postprocess(e):e).catch(i);try{n.hooks&&(r=n.hooks.preprocess(r));let e=a(r,n),t=(n.hooks&&(e=n.hooks.processAllTokens(e)),n.walkTokens&&this.walkTokens(e,n.walkTokens),s(e,n));return n.hooks?n.hooks.postprocess(t):t}catch(e){return i(e)}}}onError(r,n){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>"+q9(e.message+"",!0)+"</pre>",n?Promise.resolve(t):t;if(n)return Promise.reject(e);throw e}}},RL=new IL,mt(K9,"k"),K9.options=K9.setOptions=function(e){return RL.setOptions(e),G9(K9.defaults=RL.defaults),K9},K9.getDefaults=z9,K9.defaults=Z9,K9.use=function(...e){return RL.use(...e),G9(K9.defaults=RL.defaults),K9},K9.walkTokens=function(e,t){return RL.walkTokens(e,t)},K9.parseInline=RL.parseInline,K9.Parser=LL,K9.parser=LL.parse,K9.Renderer=_L,K9.TextRenderer=AL,K9.Lexer=SL,K9.lexer=SL.lex,K9.Tokenizer=CL,K9.Hooks=NL,K9.parse=K9,SL.lex});function DL(e,{markdownAutoWrap:t}){return e=We(e.replace(/<br\/>/g,`
|
||
`).replace(/\n{2,}/g,`
|
||
`)),!1===t?e.replace(/ /g," "):e}function OL(e,t={}){let r=DL(e,t),n=K9.lexer(r),i=[[]],a=0;function s(t,r="normal"){"text"===t.type?t.text.split(`
|
||
`).forEach((e,t)=>{0!==t&&(a++,i.push([])),e.split(" ").forEach(e=>{(e=e.replace(/'/g,"'"))&&i[a].push({content:e,type:r})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}return mt(s,"processNode"),n.forEach(e=>{"paragraph"===e.type?e.tokens?.forEach(e=>{s(e)}):"html"===e.type&&i[a].push({content:e.text,type:"normal"})}),i}function PL(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:"Unsupported markdown: "+e.type}return e=K9.lexer(e),mt(r,"output"),e.map(r).join("")}var BL=e(()=>{ML(),Fr(),mt(DL,"preprocessMarkdown"),mt(OL,"markdownToLines"),mt(PL,"markdownToHTML")});function $L(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function FL(e,t){return zL(e,[],$L(t.content),t.type)}function zL(e,t,r,n){var i,a,s;return 0===r.length?[{content:t.join(""),type:n},{content:"",type:n}]:([i,...a]=r,e([{content:(s=[...t,i]).join(""),type:n}])?zL(e,s,a,n):(0===t.length&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}]))}function GL(e,t){if(e.some(({content:e})=>e.includes(`
|
||
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return UL(e,t)}function UL(e,t,r=[],n=[]){if(0===e.length)return 0<n.length&&r.push(n),0<r.length?r:[];let i="";" "===e[0].content&&(i=" ",e.shift());var a=e.shift()??{content:" ",type:"normal"},s=[...n];return""!==i&&s.push({content:i,type:"normal"}),s.push(a),t(s)?UL(e,t,r,s):(0<n.length?(r.push(n),e.unshift(a)):a.content&&([s,n]=FL(t,a),r.push([s]),n.content)&&e.unshift(n),UL(e,t,r))}var qL=e(()=>{mt($L,"splitTextToChars"),mt(FL,"splitWordToFitWidth"),mt(zL,"splitWordToFitWidthRecursion"),mt(GL,"splitLineToFitWidth"),mt(UL,"splitLineToFitWidthRecursion")});function jL(e,t){t&&e.attr("style",t)}async function WL(e,t,r,n,i=!1){(e=e.append("foreignObject")).attr("width",10*r+"px"),e.attr("height",10*r+"px");let a=e.append("xhtml:div"),s=t.label;t.label&&Zc(t.label)&&(s=await Jc(t.label.replace(L.lineBreakRegex,`
|
||
`),D()));var o=t.isNode?"nodeLabel":"edgeLabel",l=a.append("span");return l.html(s),jL(l,t.labelStyle),l.attr("class",o+" "+n),jL(a,t.labelStyle),a.style("display","table-cell"),a.style("white-space","nowrap"),a.style("line-height","1.5"),a.style("max-width",r+"px"),a.style("text-align","center"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&a.attr("class","labelBkg"),(l=a.node().getBoundingClientRect()).width===r&&(a.style("display","table"),a.style("white-space","break-spaces"),a.style("width",r+"px"),l=a.node().getBoundingClientRect()),e.node()}function YL(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function HL(e,t,r){return KL(t=YL(e=e.append("text"),1,t),r),r=t.node().getComputedTextLength(),e.remove(),r}function VL(e,t,r){return KL(t=YL(e=e.append("text"),1,t),[{content:r,type:"normal"}]),(r=t.node()?.getBoundingClientRect())&&e.remove(),r}function XL(t,e,r,n=!1){let i=e.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1"),o=0;for(var l of r){var c,h=mt(e=>HL(i,1.1,e)<=t,"checkWidth");for(c of h(l)?[l]:GL(l,h))KL(YL(s,o,1.1),c),o++}return(n?(e=s.node().getBBox(),a.attr("x",e.x-2).attr("y",e.y-2).attr("width",e.width+4).attr("height",e.height+4),i):s).node()}function KL(n,e){n.text(""),e.forEach((e,t)=>{var r=n.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(e.content):r.text(" "+e.content)})}async function ZL(e){let i=[],t=(e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,n)=>(i.push((async()=>{var e=r+":"+n;return await Be(e)?await $e(e,void 0,{class:"label-icon"}):`<i class='${_h(t).replace(":"," ")}'></i>`})()),t)),await Promise.all(i));return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>t.shift()??"")}var QL,JL=e(()=>{a6(),Eu(),lh(),t(),BL(),iS(),je(),qL(),mt(jL,"applyStyle"),mt(WL,"addHtmlSpan"),mt(YL,"createTspan"),mt(HL,"computeWidthOfText"),mt(VL,"computeDimensionOfText"),mt(XL,"createFormattedText"),mt(KL,"updateTextContentAndStyles"),mt(ZL,"replaceIconSubstring"),QL=mt(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(M.debug("XYZ createText",t,r,n,i,a,s,"addSvgBackground: ",l),a?(n=PL(t,c),a=await ZL(rS(n)),n=t.replace(/\\\\/g,"\\"),WL(e,{isNode:s,label:Zc(t)?n:a,labelStyle:r.replace("fill:","color:")},o,i,l)):(n=XL(o,e,OL(t.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),c),!!t&&l),s?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),H(n).attr("style",a)):(i=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),H(n).select("rect").attr("style",i.replace(/background:/g,"fill:")),o=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),H(n).select("text").attr("style",o)),n)),"createText")});function eN(e){return(e=e.map((e,t)=>(0===t?"M":"L")+e.x+","+e.y)).push("Z"),e.join(" ")}function tN(t,e,r,n,i,a){var s=[],o=r-t,l=2*Math.PI/(o/a),c=e+(n-e)/2;for(let e=0;e<=50;e++){var h=t+e/50*o,u=c+i*Math.sin(l*(h-t));s.push({x:h,y:u})}return s}function rN(t,r,n,i,e,a){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;e<i;e++){var c=o+e*l,h=t+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:-h,y:-c})}return s}var nN,iN,aN,sN,i=e(()=>{JL(),Eu(),a6(),An(),lh(),iS(),nN=mt(async(e,t,r)=>{let n,i=t.useHtmlLabels||Uc(D()?.htmlLabels),a=(n=r||"node default",e.insert("g").attr("class",n).attr("id",t.domId||t.id)),s=a.insert("g").attr("class","label").attr("style",AC(t.labelStyle)),o,l=(o=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0],await QL(s,Oc(rS(o),D()),{useHtmlLabels:i,width:t.width||D().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img})),c=l.getBBox(),h=(t?.padding??0)/2;if(i){var r=l.children[0],e=H(l),u=r.getElementsByTagName("img");if(u){let n=""===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",n?(e=(D().fontSize?D():window.getComputedStyle(document.body)).fontSize,[e=yr.fontSize]=JC(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)})))}c=r.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),iN=mt(async(e,t,r)=>{let n=r.useHtmlLabels||Uc(D()?.flowchart?.htmlLabels),i=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await QL(i,Oc(rS(t),D()),{useHtmlLabels:n,width:r.width||D()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return Uc(D()?.flowchart?.htmlLabels)&&(t=a.children[0],l=H(a),s=t.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)),n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:i}},"insertLabel"),aN=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),sN=mt((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses"),mt(eN,"createPathFromPoints"),mt(tN,"generateFullSineWavePoints"),mt(rN,"generateCirclePoints")});function oN(e,t){return e.intersect(t)}var lN,cN=e(()=>{mt(oN,"intersectNode"),lN=oN});function hN(e,t,r,n){var i=e.x,e=e.y,a=i-n.x,s=e-n.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(n.x<i&&(a=-a),Math.abs(t*r*s/o));return{x:i+a,y:e+(t=n.y<e?-t:t)}}var uN,dN=e(()=>{mt(hN,"intersectEllipse"),uN=hN});function pN(e,t,r){return uN(e,t,t,r)}var gN,fN=e(()=>{dN(),mt(pN,"intersectCircle"),gN=pN});function mN(e,t,r,n){var i,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*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0<u*d||(u=(i=n.y-r.y)*e.x+(a=r.x-n.x)*e.y+(s=n.x*r.y-r.x*n.y),d=i*t.x+a*t.y+s,0!=u&&0!==d&&0<u*d)||0==(o=l*a-i*c)))return e=Math.abs(o/2),{x:(r=c*s-a*h)<0?(r-e)/o:(r+e)/o,y:(r=i*h-l*s)<0?(r-e)/o:(r+e)/o}}function yN(e,t){return 0<e*t}var vN,xN=e(()=>{mt(mN,"intersectLine"),mt(yN,"sameSign"),vN=mN});function bN(t,r,n){let e=t.x,i=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=i-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=vN(t,n,{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-n.x,e=e.y-n.y,r=Math.sqrt(r*r+e*e),e=t.x-n.x,t=t.y-n.y;return r<(e=Math.sqrt(e*e+t*t))?-1:r===e?0:1}),a[0]):t}var wN,kN,TN,EN,CN,SN,_N,AN,V,LN,NN=e(()=>{xN(),mt(bN,"intersectPolygon"),wN=bN}),IN=e(()=>{kN=mt((e,t)=>{var r,n=e.x,i=e.y,a=t.x-n,t=t.y-i,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:n+r,y:i+e}},"intersectRect"),TN=kN}),RN=e(()=>{cN(),fN(),dN(),NN(),IN(),EN={node:lN,circle:gN,ellipse:uN,polygon:wN,rect:TN}}),MN=e(()=>{Eu(),CN=mt(e=>({fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:D().handDrawnSeed}),"solidStateFill"),SN=mt(e=>({stylesMap:e=_N([...e.cssCompiledStyles||[],...e.cssStyles||[]]),stylesArray:[...e]}),"compileStyles"),_N=mt(e=>{let r=new Map;return e.forEach(e=>{var[e,t]=e.split(":");r.set(e.trim(),t?.trim())}),r},"styles2Map"),AN=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"),V=mt(e=>{let t=SN(e).stylesArray,r=[],n=[],i=[],a=[];return t.forEach(e=>{var t=e[0];AN(t)?r.push(e.join(":")+" !important"):(n.push(e.join(":")+" !important"),t.includes("stroke")&&i.push(e.join(":")+" !important"),"fill"===t&&a.push(e.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:a}},"styles2String"),LN=mt((e,t)=>{var{themeVariables:r,handDrawnSeed:n}=D(),{nodeBorder:r,mainBkg:i}=r,e=SN(e).stylesMap;return Object.assign({roughness:.7,fill:e.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:e.get("stroke")||r,seed:n,strokeWidth:e.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides")});function DN(e,t,r){if(e&&e.length){var n,[i,a]=t,t=Math.PI/180*r,s=Math.cos(t),o=Math.sin(t);for(n of e){var[l,c]=n;n[0]=(l-i)*s-(c-a)*o+i,n[1]=(l-i)*o+(c-a)*s+a}}}function ON(e,t){return e[0]===t[0]&&e[1]===t[1]}function PN(e,r,n,t=1){var i=n,n=Math.max(r,.1),p=e[0]&&e[0][0]&&"number"==typeof e[0][0]?[e]:e,a=[0,0];if(i)for(var s of p)DN(s,a,i);if(r=((t,i)=>{var e,r=[];for(e of p){var n=[...e];ON(n[0],n[n.length-1])||n.push([n[0][0],n[0][1]]),2<n.length&&r.push(n)}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=[],n=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>n);e++)t=e;o.splice(0,t+1).forEach(e=>{r.push({s:n,edge:e})})}if((r=r.filter(e=>!(e.edge.ymax<=n))).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!==i||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),n],[Math.round(d.x),n]])}n+=i,r.forEach(e=>{e.edge.x=e.edge.x+i*e.edge.islope}),e++}}return s})(n,t),i){for(var o of p)DN(o,a,-i);{e=a,n=-i;let t=[];r.forEach(e=>t.push(...e)),DN(t,e,n)}}return r}function BN(e,t){let r,n=t.hachureAngle+90,i=t.hachureGap,a=(i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1)),1);return 1<=t.roughness&&.7<((null==(r=t.randomizer)?void 0:r.next())||Math.random())&&(a=i),PN(e,i,n,a||1)}function $N(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 FN(e,t){return e.type===t}function zN(e){let n=[],i=(e=>{for(var t=new Array;""!==e;){if(!e.match(/^([ \t\r\n,]+)/))if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:LI,text:RegExp.$1};else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:NI,text:""+parseFloat(RegExp.$1)}}e=e.substr(RegExp.$1.length)}return t[t.length]={type:II,text:""},t})(e),a="BOD",s=0,o=i[s];for(;!FN(o,II);){let t=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return zN("M0,0"+e);s++,t=RI[o.text],a=o.text}else FN(o,NI)?t=RI[a]:(s++,t=RI[o.text],a=o.text);if(!(s+t<i.length))throw new Error("Path data ended short");for(let e=s;e<s+t;e++){var l=i[e];if(!FN(l,NI))throw new Error("Param not a number: "+a+","+l.text);r[r.length]=+l.text}if("number"!=typeof RI[a])throw new Error("Bad segment: "+a);var c={key:a,data:r};n.push(c),s+=t,o=i[s],"m"===(a="M"===a?"L":a)&&(a="l")}return n}function GN(e){let r=0,n=0,t=0,i=0,a=[];for(var{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[r,n]=o,[t,i]=o;break;case"m":r+=o[0],n+=o[1],a.push({key:"M",data:[r,n]}),t=r,i=n;break;case"L":a.push({key:"L",data:[...o]}),[r,n]=o;break;case"l":r+=o[0],n+=o[1],a.push({key:"L",data:[r,n]});break;case"C":a.push({key:"C",data:[...o]}),r=o[4],n=o[5];break;case"c":var l=o.map((e,t)=>t%2?e+n:e+r);a.push({key:"C",data:l}),r=l[4],n=l[5];break;case"Q":a.push({key:"Q",data:[...o]}),r=o[2],n=o[3];break;case"q":l=o.map((e,t)=>t%2?e+n:e+r),a.push({key:"Q",data:l}),r=l[2],n=l[3];break;case"A":a.push({key:"A",data:[...o]}),r=o[5],n=o[6];break;case"a":r+=o[5],n+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,n]});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]}),n=o[0];break;case"v":n+=o[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],n=o[3];break;case"s":var c=o.map((e,t)=>t%2?e+n:e+r);a.push({key:"S",data:c}),r=c[2],n=c[3];break;case"T":a.push({key:"T",data:[...o]}),r=o[0],n=o[1];break;case"t":r+=o[0],n+=o[1],a.push({key:"T",data:[r,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=t,n=i}return a}function UN(e){let i=[],a="",s=0,o=0,t=0,r=0,l=0,c=0;for(var{key:n,data:h}of e){switch(n){case"M":i.push({key:"M",data:[...h]}),[s,o]=h,[t,r]=h;break;case"C":i.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":i.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],i.push({key:"L",data:[s,o]});break;case"V":o=h[0],i.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),i.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,n;n="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(n-o)/3,p=e+2*(r-e)/3,g=t+2*(n-t)/3;i.push({key:"C",data:[u,d,p,g,e,t]}),l=r,c=n,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;i.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],x=h[4],b=h[5],w=h[6];0===f||0===m?(i.push({key:"C",data:[s,o,b,w,b,w]}),s=b,o=w):s===b&&o===w||(jN(s,o,b,w,f,m,y,v,x).forEach(function(e){i.push({key:"C",data:e})}),s=b,o=w);break;case"Z":i.push({key:"Z",data:[]}),s=t,o=r}a=n}return i}function qN(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function jN(e,t,r,n,i,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]=qN(e,t,-h),[r,n]=qN(r,n,-h),1<(m=(y=(e-r)/2)*y/(i*i)+(v=(t-n)/2)*v/(a*a))&&(i*=m=Math.sqrt(m),a*=m),m=i*i,x=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=o*i*v/a+(e+r)/2,f=o*-a*y/i+(t+n)/2,d=Math.asin(parseFloat(((t-f)/a).toFixed(9))),p=Math.asin(parseFloat(((n-f)/a).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI));var m=p-d,y=(Math.abs(m)>120*Math.PI/180&&(x=p,v=r,o=n,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=jN(r=g+i*Math.cos(p),n=f+a*Math.sin(p),v,o,i,a,s,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),x=4/3*i*(l=Math.tan(m/4)),i=[e,t],a=[e+x*v,t-(m=4/3*a*l)*y],l=[r+x*s,n-m*o],e=[r,n];if(a[0]=2*i[0]-a[0],a[1]=2*i[1]-a[1],c)return[a,l,e].concat(u);u=[a,l,e].concat(u);var b=[];for(let e=0;e<u.length;e+=3){var w=qN(u[e][0],u[e][1],h),k=qN(u[e+1][0],u[e+1][1],h),T=qN(u[e+2][0],u[e+2][1],h);b.push([w[0],w[1],k[0],k[1],T[0],T[1]])}return b}function WN(e,t,r,n,i){return{type:"path",ops:aI(e,t,r,n,i)}}function YN(t,e,r){var n=(t||[]).length;if(2<n){var i=[];for(let e=0;e<n-1;e++)i.push(...aI(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&i.push(...aI(t[n-1][0],t[n-1][1],t[0][0],t[0][1],r)),{type:"path",ops:i}}return 2===n?WN(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function HN(e,t,r,n,i){return YN([[e,t],[e+r,t],[e+r,t+n],[e,t+n]],!0,i)}function VN(e,t){if(e.length){var r="number"==typeof e[0][0]?[e]:e,n=oI(r[0],1+.2*t.roughness,t),i=t.disableMultiStroke?[]:oI(r[0],1.5*(1+.22*t.roughness),tI(t));for(let e=1;e<r.length;e++)if((l=r[e]).length){var a,s,o=oI(l,1+.2*t.roughness,t),l=t.disableMultiStroke?[]:oI(l,1.5*(1+.22*t.roughness),tI(t));for(a of o)"move"!==a.op&&n.push(a);for(s of l)"move"!==s.op&&i.push(s)}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function XN(e,t,r){var n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),n=2*Math.PI/n,e=Math.abs(e/2),t=Math.abs(t/2),i=1-r.curveFitting;return{increment:n,rx:e+=iI(e*i,r),ry:t+=iI(t*i,r)}}function KN(e,t,r,n){let[i,a]=cI(n.increment,e,t,n.rx,n.ry,1,n.increment*nI(.1,nI(.4,1,r),r),r),s=lI(i,null,r);return r.disableMultiStroke||0===r.roughness||([e]=cI(n.increment,e,t,n.rx,n.ry,1.5,0,r),t=lI(e,null,r),s=s.concat(t)),{estimatedPoints:a,opset:{type:"path",ops:s}}}function ZN(e,t,r,n,i,a,s,o,l){r=Math.abs(r/2),n=Math.abs(n/2),r+=iI(.01*r,l),n+=iI(.01*n,l);let c=i,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),i=2*Math.PI/l.curveStepCount,i=hI(a=Math.min(i/2,(h-c)/2),e,t,r,n,c,h,1,l),l.disableMultiStroke||(a=hI(a,e,t,r,n,c,h,1.5,l),i.push(...a)),s&&(o?i.push(...aI(e,t,e+r*Math.cos(c),t+n*Math.sin(c),l),...aI(e,t,e+r*Math.cos(h),t+n*Math.sin(h),l)):i.push({op:"lineTo",data:[e,t]},{op:"lineTo",data:[e+r*Math.cos(c),t+n*Math.sin(c)]})),{type:"path",ops:i}}function QN(e,t){let r=UN(GN(zN(e))),n=[],i=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...aI(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;n.push(...uI(l,c,h,u,d,p,a,t)),a=[d,p];break;case"Z":n.push(...aI(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:"path",ops:n}}function JN(e,t){var r,n=[];for(r of e)if(r.length){var i=t.maxRandomnessOffset||0,a=r.length;if(2<a){n.push({op:"move",data:[r[0][0]+iI(i,t),r[0][1]+iI(i,t)]});for(let e=1;e<a;e++)n.push({op:"lineTo",data:[r[e][0]+iI(i,t),r[e][1]+iI(i,t)]})}}return{type:"fillPath",ops:n}}function eI(e,r){return(e=>{let t=r.fillStyle||"hachure";if(!_I[t])switch(t){case"zigzag":_I[t]||(_I[t]=new kI(e));break;case"cross-hatch":_I[t]||(_I[t]=new TI(e));break;case"dots":_I[t]||(_I[t]=new EI(e));break;case"dashed":_I[t]||(_I[t]=new CI(e));break;case"zigzag-line":_I[t]||(_I[t]=new SI(e));break;default:t="hachure",_I[t]||(_I[t]=new wI(e))}return _I[t]})(MI).fillPolygons(e,r)}function tI(e){var t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function rI(e){return e.randomizer||(e.randomizer=new AI(e.seed||0)),e.randomizer.next()}function nI(e,t,r,n=1){return r.roughness*n*(rI(r)*(t-e)+e)}function iI(e,t,r=1){return nI(-e,e,t,r)}function aI(e,t,r,n,i,a=!1){var a=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=sI(e,t,r,n,i,!0,!1);return a?s:(a=sI(e,t,r,n,i,!0,!0),s.concat(a))}function sI(e,t,r,n,i,a,s){let o=Math.pow(e-r,2)+Math.pow(t-n,2),l=Math.sqrt(o),c,h=(c=l<200?1:500<l?.4:-.0016668*l+1.233334,i.maxRandomnessOffset||0),u=(h=h*h*100>o?l/10:h)/2,d=.2+.2*rI(i),p=i.bowing*i.maxRandomnessOffset*(n-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-r)/200;p=iI(p,i,c),g=iI(g,i,c);var f=[],m=mt(()=>iI(u,i,c),"M"),y=mt(()=>iI(h,i,c),"k"),v=i.preserveVertices;return a&&f.push(s?{op:"move",data:[e+(v?0:m()),t+(v?0:m())]}:{op:"move",data:[e+(v?0:iI(h,i,c)),t+(v?0:iI(h,i,c))]}),f.push(s?{op:"bcurveTo",data:[p+e+(r-e)*d+m(),g+t+(n-t)*d+m(),p+e+2*(r-e)*d+m(),g+t+2*(n-t)*d+m(),r+(v?0:m()),n+(v?0:m())]}:{op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(n-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(n-t)*d+y(),r+(v?0:y()),n+(v?0:y())]}),f}function oI(t,r,n){if(!t.length)return[];var i=[];i.push([t[0][0]+iI(r,n),t[0][1]+iI(r,n)]),i.push([t[0][0]+iI(r,n),t[0][1]+iI(r,n)]);for(let e=1;e<t.length;e++)i.push([t[e][0]+iI(r,n),t[e][1]+iI(r,n)]),e===t.length-1&&i.push([t[e][0]+iI(r,n),t[e][1]+iI(r,n)]);return lI(i,null,n)}function lI(t,e,r){var n=t.length,i=[];if(3<n){var a,s=[],o=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<n;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]],i.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,i.push({op:"lineTo",data:[e[0]+iI(a,r),e[1]+iI(a,r)]}))}else 3===n?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===n&&i.push(...sI(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return i}function cI(t,r,n,i,a,s,e,o){var l=[],c=[];if(0===o.roughness){t/=4,c.push([r+i*Math.cos(-t),n+a*Math.sin(-t)]);for(let e=0;e<=2*Math.PI;e+=t){var h=[r+i*Math.cos(e),n+a*Math.sin(e)];l.push(h),c.push(h)}c.push([r+i*Math.cos(0),n+a*Math.sin(0)]),c.push([r+i*Math.cos(t),n+a*Math.sin(t)])}else{var u=iI(.5,o)-Math.PI/2,d=(c.push([iI(s,o)+r+.9*i*Math.cos(u-t),iI(s,o)+n+.9*a*Math.sin(u-t)]),2*Math.PI+u-.01);for(let e=u;e<d;e+=t){var p=[iI(s,o)+r+i*Math.cos(e),iI(s,o)+n+a*Math.sin(e)];l.push(p),c.push(p)}c.push([iI(s,o)+r+i*Math.cos(u+2*Math.PI+.5*e),iI(s,o)+n+a*Math.sin(u+2*Math.PI+.5*e)]),c.push([iI(s,o)+r+.98*i*Math.cos(u+e),iI(s,o)+n+.98*a*Math.sin(u+e)]),c.push([iI(s,o)+r+.9*i*Math.cos(u+.5*e),iI(s,o)+n+.9*a*Math.sin(u+.5*e)])}return[c,l]}function hI(t,r,n,i,a,s,o,l,c){var s=s+iI(.1,c),h=[];h.push([iI(l,c)+r+.9*i*Math.cos(s-t),iI(l,c)+n+.9*a*Math.sin(s-t)]);for(let e=s;e<=o;e+=t)h.push([iI(l,c)+r+i*Math.cos(e),iI(l,c)+n+a*Math.sin(e)]);return h.push([r+i*Math.cos(o),n+a*Math.sin(o)]),h.push([r+i*Math.cos(o),n+a*Math.sin(o)]),lI(h,null,c)}function uI(t,r,n,i,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:iI(u[0],l)),o[1]+(p?0:iI(u[0],l))]}),c=p?[a,s]:[a+iI(u[e],l),s+iI(u[e],l)],h.push({op:"bcurveTo",data:[t+iI(u[e],l),r+iI(u[e],l),n+iI(u[e],l),i+iI(u[e],l),c[0],c[1]]});return h}function dI(e){return[...e]}function pI(t,e=0){var r=t.length;if(r<3)throw new Error("A curve must have at least three points.");var n=[];if(3===r)n.push(dI(t[0]),dI(t[1]),dI(t[2]),dI(t[2]));else{var i=[];i.push(t[0],t[0]);for(let e=1;e<t.length;e++)i.push(t[e]),e===t.length-1&&i.push(t[e]);var a=[],s=1-e;n.push(dI(i[0]));for(let e=1;e+2<i.length;e++){var o=i[e];a[0]=[o[0],o[1]],a[1]=[o[0]+(s*i[e+1][0]-s*i[e-1][0])/6,o[1]+(s*i[e+1][1]-s*i[e-1][1])/6],a[2]=[i[e+1][0]+(s*i[e][0]-s*i[e+2][0])/6,i[e+1][1]+(s*i[e][1]-s*i[e+2][1])/6],a[3]=[i[e+1][0],i[e+1][1]],n.push(a[1],a[2],a[3])}}return n}function gI(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function fI(e,t,r){var n=gI(t,r);return 0===n?gI(e,t):(n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/n,gI(e,mI(t,r,Math.max(0,Math.min(1,n)))))}function mI(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function yI(l,c,e,t){var r,n,i,a,s,o,t=t||[];return(()=>{let e=l[c+0],t=l[c+1],r=l[c+2],n=l[c+3],i=3*t[0]-2*e[0]-n[0],a=(i*=i,3*t[1]-2*e[1]-n[1]);a*=a;var s=3*r[0]-2*n[0]-e[0],o=(s*=s,3*r[1]-2*n[1]-e[1]);return o*=o,i<s&&(i=s),a<o&&(a=o),i+a})()<e?(r=l[c+0],(!t.length||(o=t[t.length-1],1<Math.sqrt(gI(o,r))))&&t.push(r),t.push(l[c+3])):(n=mI(o=l[c+0],r=l[c+1],.5),s=mI(r,r=l[c+2],.5),i=mI(r,r=l[c+3],.5),a=mI(n,s,.5),s=mI(s,i,.5),yI([o,n,a,o=mI(a,s,.5)],0,e,t),yI([o,s,i,r],0,e,t)),t}function vI(e,t){return xI(e,0,e.length,t)}function xI(t,r,n,e,i){let a=i||[],s=t[r],o=t[n-1],l=0,c=1;for(let e=r+1;e<n-1;++e){var h=fI(t[e],s,o);h>l&&(l=h,c=e)}return Math.sqrt(l)>e?(xI(t,r,c+1,e,a),xI(t,c,n,e,a)):(a.length||a.push(s),a.push(o)),a}function bI(t,r=.15,e){var n=[],i=(t.length-1)/3;for(let e=0;e<i;e++)yI(t,3*e,r,n);return e&&0<e?xI(n,0,n.length,e):n}var wI,kI,TI,EI,CI,SI,_I,AI,LI,NI,II,RI,MI,DI,OI,PI,BI,$I,FI,zI=e(()=>{mt(DN,"t"),mt(ON,"e"),mt(PN,"s"),mt(BN,"n"),wI=class{static{mt(this,"o")}constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){return e=BN(e,t),{type:"fillSketch",ops:this.renderLines(e,t)}}renderLines(e,t){var r,n=[];for(r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}},mt($N,"a"),kI=class extends wI{static{mt(this,"h")}fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);var n,i,e=BN(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([n,i]of e)$N([n,i])&&s.push([[n[0]-o,n[1]+l],[...i]],[[n[0]+o,n[1]-l],[...i]]);return{type:"fillSketch",ops:this.renderLines(s,t)}}},TI=class extends wI{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}},EI=class{static{mt(this,"i")}constructor(e){this.helper=e}fillPolygons(e,t){return e=BN(e,t=Object.assign({},t,{hachureAngle:0})),this.dotsOnLines(e,t)}dotsOnLines(e,t){let r=[],n=t.hachureGap,i=(n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1),t.fillWeight);i<0&&(i=t.strokeWidth/2);var a,s=n/4;for(a of e){var o=$N(a),l=o/n,c=Math.ceil(l)-1,h=o-c*n,u=(a[0][0]+a[1][0])/2-n/4,d=Math.min(a[0][1],a[1][1]);for(let e=0;e<c;e++){var p=d+h+e*n,g=u-s+2*Math.random()*s,p=p-s+2*Math.random()*s,g=this.helper.ellipse(g,p,i,i,t);r.push(...g.ops)}}return{type:"fillSketch",ops:r}}},CI=class{static{mt(this,"c")}constructor(e){this.helper=e}fillPolygons(e,t){return e=BN(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=$N(e),r=Math.floor(t/(h+u)),n=(t+u-r*(h+u))/2,i=e[0],a=e[1];i[0]>a[0]&&(i=e[1],a=e[0]);var s=Math.atan((a[1]-i[1])/(a[0]-i[0]));for(let e=0;e<r;e++){var o=(l=e*(h+u))+h,l=[i[0]+l*Math.cos(s)+n*Math.cos(s),i[1]+l*Math.sin(s)+n*Math.sin(s)],o=[i[0]+o*Math.cos(s)+n*Math.cos(s),i[1]+o*Math.sin(s)+n*Math.sin(s)];d.push(...this.helper.doubleLineOps(l[0],l[1],o[0],o[1],c))}}),d}},SI=class{static{mt(this,"l")}constructor(e){this.helper=e}fillPolygons(e,t){var r=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,n=t.zigzagOffset<0?r:t.zigzagOffset,e=BN(e,t=Object.assign({},t,{hachureGap:r+n}));return{type:"fillSketch",ops:this.zigzagLines(e,n,t)}}zigzagLines(e,c,h){let u=[];return e.forEach(e=>{let t=$N(e),r=Math.round(t/(2*c)),n=e[0],i=e[1];n[0]>i[0]&&(n=e[1],i=e[0]);var a=Math.atan((i[1]-n[1])/(i[0]-n[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=[n[0]+s*Math.cos(a),n[1]+s*Math.sin(a)],o=[n[0]+o*Math.cos(a),n[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}},_I={},AI=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()}},RI={A:7,a:7,C:6,c:6,H:NI=1,h:1,L:II=2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:LI=0,z:0},mt(FN,"k"),mt(zN,"b"),mt(GN,"y"),mt(UN,"m"),mt(qN,"w"),mt(jN,"x"),MI={randOffset:mt(function(e,t){return iI(e,t)},"randOffset"),randOffsetWithRange:mt(function(e,t,r){return nI(e,t,r)},"randOffsetWithRange"),ellipse:mt(function(e,t,r,n,i){return KN(e,t,i,XN(r,n,i)).opset},"ellipse"),doubleLineOps:mt(function(e,t,r,n,i){return aI(e,t,r,n,i,!0)},"doubleLineOps")},mt(WN,"v"),mt(YN,"S"),mt(HN,"O"),mt(VN,"L"),mt(XN,"T"),mt(KN,"D"),mt(ZN,"A"),mt(QN,"_"),mt(JN,"I"),mt(eI,"C"),mt(tI,"z"),mt(rI,"W"),mt(nI,"E"),mt(iI,"G"),mt(aI,"$"),mt(sI,"R"),mt(oI,"j"),mt(lI,"q"),mt(cI,"F"),mt(hI,"V"),mt(uI,"Z"),mt(dI,"Q"),mt(pI,"H"),mt(gI,"N"),mt(fI,"B"),mt(mI,"J"),mt(yI,"K"),mt(vI,"U"),mt(xI,"X"),mt(bI,"Y"),DI="none",OI=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,n,i){return i=this._o(i),this._d("line",[WN(e,t,r,n,i)],i)}rectangle(e,t,r,n,i){var a=[],s=HN(e,t,r,n,i=this._o(i));return i.fill&&(r=[[e,t],[e+r,t],[e+r,t+n],[e,t+n]],"solid"===i.fillStyle?a.push(JN([r],i)):a.push(eI([r],i))),i.stroke!==DI&&a.push(s),this._d("rectangle",a,i)}ellipse(e,t,r,n,i){var a=[],n=KN(e,t,i=this._o(i),r=XN(r,n,i));return i.fill&&("solid"===i.fillStyle?((e=KN(e,t,i,r).opset).type="fillPath",a.push(e)):a.push(eI([n.estimatedPoints],i))),i.stroke!==DI&&a.push(n.opset),this._d("ellipse",a,i)}circle(e,t,r,n){return(e=this.ellipse(e,t,r,r,n)).shape="circle",e}linearPath(e,t){return t=this._o(t),this._d("linearPath",[YN(e,!1,t)],t)}arc(d,p,g,e,t,r,n=!1,i){var i=this._o(i),a=[],s=ZN(d,p,g,e,t,r,n,!0,i);return n&&i.fill&&("solid"===i.fillStyle?(n=Object.assign({},i),(n=ZN(d,p,g,e,t,r,n.disableMultiStroke=!0,!1,n)).type="fillPath",a.push(n)):a.push(((e,t,r,n)=>{var i=d,a=p,s=Math.abs(g/2),o=Math.abs(e/2);s+=iI(.01*s,n),o+=iI(.01*o,n);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)/n.curveStepCount,u=[];for(let e=l;e<=c;e+=h)u.push([i+s*Math.cos(e),a+o*Math.sin(e)]);return u.push([i+s*Math.cos(c),a+o*Math.sin(c)]),u.push([i,a]),eI([u],n)})(e,t,r,i))),i.stroke!==DI&&a.push(s),this._d("arc",a,i)}curve(e,t){var r=this._o(t),t=[],n=VN(e,r);if(r.fill&&r.fill!==DI)if("solid"===r.fillStyle){var i=VN(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));t.push({type:"fillPath",ops:this._mergedShape(i.ops)})}else{var a,s=[];if((i=e).length)for(a of"number"==typeof i[0][0]?[i]:i)a.length<3?s.push(...a):3===a.length?s.push(...bI(pI([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...bI(pI(a),10,(1+r.roughness)/2));s.length&&t.push(eI([s],r))}return r.stroke!==DI&&t.push(n),this._d("curve",t,r)}polygon(e,t){var r=[],n=YN(e,!0,t=this._o(t));return t.fill&&("solid"===t.fillStyle?r.push(JN([e],t)):r.push(eI([e],t))),t.stroke!==DI&&r.push(n),this._d("polygon",r,t)}path(e,t){let r=this._o(t),n=[];var i,a,s,o;return e&&(e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),t=r.fill&&"transparent"!==r.fill&&r.fill!==DI,i=r.stroke!==DI,s=((e,t)=>{let r=UN(GN(zN(e))),n=[],i=[],a=[0,0],s=[],o=mt(()=>{4<=s.length&&i.push(...bI(s,1)),s=[]},"i"),l=mt(()=>{o(),i.length&&(n.push(i),i=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],i.push(a);break;case"L":o(),i.push([h[0],h[1]]);break;case"C":var u;s.length||(u=i.length?i[i.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(),i.push([a[0],a[1]])}if(l(),!t)return n;var d,p=[];for(d of n){var g=vI(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=QN(e,r),t&&("solid"===r.fillStyle?1===s.length?(t=QN(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),n.push({type:"fillPath",ops:this._mergedShape(t.ops)})):n.push(JN(s,r)):n.push(eI(s,r))),i)&&(a?s.forEach(e=>{n.push(YN(e,!1,r))}):n.push(o)),this._d("path",n,r)}opsToPath(e,t){let r="";for(var n of e.ops){var i="number"==typeof t&&0<=t?n.data.map(e=>+e.toFixed(t)):n.data;switch(n.op){case"move":r+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":r+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":r+=`L${i[0]} ${i[1]} `}}return r.trim()}toPaths(e){var t,r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(t of r){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:DI};break;case"fillPath":e={d:this.opsToPath(t),stroke:DI,strokeWidth:0,fill:n.fill||DI};break;case"fillSketch":e=this.fillSketch(t,n)}e&&i.push(e)}return i}fillSketch(e,t){let r=t.fillWeight;return r<0&&(r=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||DI,strokeWidth:r,fill:DI}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}},PI=class{static{mt(this,"st")}constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new OI(t)}draw(e){var t,r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(t of r)switch(t.type){case"path":i.save(),i.strokeStyle="none"===n.stroke?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,t,a),i.restore();break;case"fillPath":i.save(),i.fillStyle=n.fill||"";var s="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(i,t,a,s),i.restore();break;case"fillSketch":this.fillSketch(i,t,n)}}fillSketch(e,t,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=n,this._drawToContext(e,t,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,r,n="nonzero"){e.beginPath();for(var i of t.ops){var a="number"==typeof r&&0<=r?i.data.map(e=>+e.toFixed(r)):i.data;switch(i.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(n):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,r,n,i){return e=this.gen.line(e,t,r,n,i),this.draw(e),e}rectangle(e,t,r,n,i){return e=this.gen.rectangle(e,t,r,n,i),this.draw(e),e}ellipse(e,t,r,n,i){return e=this.gen.ellipse(e,t,r,n,i),this.draw(e),e}circle(e,t,r,n){return e=this.gen.circle(e,t,r,n),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,n,i,a,s=!1,o){return e=this.gen.arc(e,t,r,n,i,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}},BI="http://www.w3.org/2000/svg",$I=class{static{mt(this,"ot")}constructor(e,t){this.svg=e,this.gen=new OI(t)}draw(t){var r,e=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(BI,"g"),s=t.options.fixedDecimalPlaceDigits;for(r of e){let e=null;switch(r.type){case"path":(e=i.createElementNS(BI,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke",n.stroke),e.setAttribute("stroke-width",n.strokeWidth+""),e.setAttribute("fill","none"),n.strokeLineDash&&e.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",""+n.strokeLineDashOffset);break;case"fillPath":(e=i.createElementNS(BI,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",n.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,r,n)}e&&a.appendChild(e)}return a}fillSketch(e,t,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),(e=e.createElementNS(BI,"path")).setAttribute("d",this.opsToPath(t,r.fixedDecimalPlaceDigits)),e.setAttribute("stroke",r.fill||""),e.setAttribute("stroke-width",n+""),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,n,i){return e=this.gen.line(e,t,r,n,i),this.draw(e)}rectangle(e,t,r,n,i){return e=this.gen.rectangle(e,t,r,n,i),this.draw(e)}ellipse(e,t,r,n,i){return e=this.gen.ellipse(e,t,r,n,i),this.draw(e)}circle(e,t,r,n){return e=this.gen.circle(e,t,r,n),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,n,i,a,s=!1,o){return e=this.gen.arc(e,t,r,n,i,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)}},FI={canvas:mt((e,t)=>new PI(e,t),"canvas"),svg:mt((e,t)=>new $I(e,t),"svg"),generator:mt(e=>new OI(e),"generator"),newSeed:mt(()=>OI.newSeed(),"newSeed")}});function GI(e,t){var r=V(t).labelStyles;t.labelStyle=r;let n=sN(t),i=n,a=(n||(i="anchor"),e.insert("g").attr("class",i).attr("id",t.domId||t.id)),s=t.cssStyles,o=FI.svg(a),l=LN(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",AC(s)),aN(t,h),t.intersect=function(e){return M.info("Circle intersect",t,1,e),EN.circle(t,1,e)},a}var UI=e(()=>{t(),i(),RN(),MN(),zI(),iS(),mt(GI,"anchor")});function qI(e,t,r,n,i,a,s){var o=(e+r)/2,l=(t+n)/2,c=Math.atan2(n-t,r-e),h=Math.sqrt(((r-e)/2/i)**2+((n-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*i*Math.cos(c)*(s?-1:1),g=Math.atan2((t-p)/a,(e-d)/i),f=Math.atan2((n-p)/a,(r-d)/i)-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+i*Math.cos(y),y=p+a*Math.sin(y);m.push({x:v,y:y})}return m}async function jI(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(e,t,sN(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),h=t.cssStyles,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...qI(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...qI(s/2,o/2,s/2,-o/2,c,l,!0)],d=FI.svg(i),p=LN(t,{}),g=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),eN(u)),f=d.path(g,p),m=i.insert(()=>f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),aN(t,m),t.intersect=function(e){return EN.polygon(t,u,e)},i}var WI=e(()=>{i(),RN(),MN(),zI(),mt(qI,"generateArcPoints"),mt(jI,"bowTieRect")});function YI(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var HI=e(()=>{mt(YI,"insertPolygonShape")});async function VI(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=n.height+i.padding,o=n.width+i.padding+12,l=o,c=-s,h=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:12+c},{x:12,y:c}],u,d=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=LN(i,{}),r=eN(h),n=e.path(r,t);u=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=YI(a,o,s,h);return r&&u.attr("style",r),aN(i,u),i.intersect=function(e){return EN.polygon(i,h,e)},a}var XI=e(()=>{i(),RN(),MN(),zI(),HI(),i(),mt(VI,"card")});function KI(e,t){var r=V(t).nodeStyles;t.label="";let n=e.insert("g").attr("class",sN(t)).attr("id",t.domId??t.id),i=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=FI.svg(n),l=LN(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),eN(s)),h=o.path(c,l),u=n.insert(()=>h,":first-child");return i&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",i),r&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(e){return EN.polygon(t,s,e)},n}var ZI=e(()=>{RN(),zI(),MN(),i(),mt(KI,"choice")});async function QI(e,n){var{labelStyles:t,nodeStyles:r}=V(n);n.labelStyle=t;let{shapeSvg:i,bbox:a,halfPadding:s}=await nN(e,n,sN(n)),o=a.width/2+s,l,c=n.cssStyles;if("handDrawn"===n.look){let e=FI.svg(i),t=LN(n,{}),r=e.circle(0,0,2*o,t);(l=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",AC(c))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",o).attr("cx",0).attr("cy",0);return aN(n,l),n.intersect=function(e){return M.info("Circle intersect",n,o,e),EN.circle(n,o,e)},i}var JI=e(()=>{t(),i(),RN(),MN(),zI(),iS(),mt(QI,"circle")});function eR(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 tR(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r,t.label="";let i=e.insert("g").attr("class",sN(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),s=t.cssStyles,o=FI.svg(i),l=LN(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=eR(a),u=o.path(h,l),d=i.insert(()=>c,":first-child");return d.insert(()=>u),s&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",s),n&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",n),aN(t,d),t.intersect=function(e){return M.info("crossedCircle intersect",t,{radius:a,point:e}),EN.circle(t,a,e)},i}var rR=e(()=>{t(),i(),MN(),zI(),RN(),mt(eR,"createLine"),mt(tR,"crossedCircle")});function nR(t,r,n,i=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;e<i;e++){var c=o+e*l,h=t+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:-h,y:-c})}return s}async function iR(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,.1*l),h=t.cssStyles,u=[...nR(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...nR(o/2+2*c,-c,c,20,-180,-270),...nR(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...nR(o/2,l/2,c,20,0,90)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...nR(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...nR(o/2+.1*o,-c,c,20,-180,-270),...nR(o/2+.1*o,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...nR(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],p=FI.svg(i),g=LN(t,{fill:"none"}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),eN(u).replace("Z","")),m=p.path(f,g),y=eN(d),v=p.path(y,{...g}),x=i.insert("g",":first-child");return x.insert(()=>v,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),aN(t,x),t.intersect=function(e){return EN.polygon(t,d,e)},i}var aR=e(()=>{i(),RN(),MN(),zI(),mt(nR,"generateCirclePoints"),mt(iR,"curlyBraceLeft")});function sR(t,r,n,i=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;e<i;e++){var c=o+e*l,h=t+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:h,y:c})}return s}async function oR(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,.1*l),h=t.cssStyles,u=[...sR(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...sR(o/2+2*c,-c,c,20,-180,-270),...sR(o/2+2*c,c,c,20,-90,-180),{x:o/2+c,y:l/2},...sR(o/2,l/2,c,20,0,90)],d=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...sR(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...sR(o/2+2*c,-c,c,20,-180,-270),...sR(o/2+2*c,c,c,20,-90,-180),{x:o/2+c,y:l/2},...sR(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],p=FI.svg(i),g=LN(t,{fill:"none"}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),eN(u).replace("Z","")),m=p.path(f,g),y=eN(d),v=p.path(y,{...g}),x=i.insert("g",":first-child");return x.insert(()=>v,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),aN(t,x),t.intersect=function(e){return EN.polygon(t,d,e)},i}var lR=e(()=>{i(),RN(),MN(),zI(),mt(sR,"generateCirclePoints"),mt(oR,"curlyBraceRight")});function cR(t,r,n,i=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;e<i;e++){var c=o+e*l,h=t+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:-h,y:-c})}return s}async function hR(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,.1*l),h=t.cssStyles,u=[...cR(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...cR(o/2+2*c,-c,c,20,-180,-270),...cR(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...cR(o/2,l/2,c,20,0,90)],d=[...cR(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...cR(-o/2-c/2,-c,c,20,0,90),...cR(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...cR(-o/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...cR(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...cR(o/2+2*c,-c,c,20,-180,-270),...cR(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...cR(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...cR(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...cR(-o/2-c/2,-c,c,20,0,90),...cR(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...cR(-o/2+c+c/2,l/2,c,30,-180,-270)],g=FI.svg(i),f=LN(t,{fill:"none"}),m=("handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid"),eN(u).replace("Z","")),y=g.path(m,f),v=eN(d).replace("Z",""),x=g.path(v,f),b=eN(p),w=g.path(b,{...f}),k=i.insert("g",":first-child");return k.insert(()=>w,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),aN(t,k),t.intersect=function(e){return EN.polygon(t,p,e)},i}var uR=e(()=>{i(),RN(),MN(),zI(),mt(cR,"generateCirclePoints"),mt(hR,"curlyBraces")});async function dR(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nN(e,t,sN(t))),i=Math.max(80,1.25*(e.width+2*(t.padding??0)),t?.width??0),a=(e=Math.max(20,e.height+2*(t.padding??0),t?.height??0))/2,s=t.cssStyles,o=FI.svg(r),l=LN(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=i,h=e,u=c-a,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},...rN(-u,-h/2,a,50,270,90)],g=eN(p),f=o.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),s&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",s),n&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-i/2}, ${-e/2})`),aN(t,m),t.intersect=function(e){return EN.polygon(t,p,e)},r}var pR=e(()=>{i(),RN(),MN(),zI(),mt(dR,"curvedTrapezoid")});async function gR(e,a){var{labelStyles:t,nodeStyles:r}=V(a);a.labelStyle=t;let{shapeSvg:s,bbox:n,label:i}=await nN(e,a,sN(a)),o=Math.max(n.width+a.padding,a.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(n.height+c+a.padding,a.height??0),u,d=a.cssStyles;if("handDrawn"===a.look){let e=FI.svg(s),t=mR(0,0,o,h,l,c),r=yR(0,c,o,h,l,c),n=e.path(t,LN(a,{})),i=e.path(r,LN(a,{fill:"none"}));u=s.insert(()=>i,":first-child"),(u=s.insert(()=>n,":first-child")).attr("class","basic label-container"),d&&u.attr("style",d)}else t=fR(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",AC(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),aN(a,u),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(a.padding??0)/1.5-(n.y-(n.top??0))})`),a.intersect=function(t){var r=EN.rect(a,t),n=r.x-(a.x??0);if(0!=l&&(Math.abs(n)<(a.width??0)/2||Math.abs(n)==(a.width??0)/2&&Math.abs(r.y-(a.y??0))>(a.height??0)/2-c)){let e=c*c*(1-n*n/(l*l));0<e&&(e=Math.sqrt(e)),e=c-e,0<t.y-(a.y??0)&&(e=-e),r.y+=e}return r},s}var fR,mR,yR,vR=e(()=>{i(),RN(),MN(),zI(),iS(),fR=mt((e,t,r,n,i,a)=>[`M${e},`+(t+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),mR=mt((e,t,r,n,i,a)=>[`M${e},`+(t+a),`M${e+r},`+(t+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),yR=mt((e,t,r,n,i,a)=>[`M${e-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mt(gR,"cylinder")});async function xR(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(t))),a=e.width+t.padding,s=.2*(o=e.height+t.padding),a=-a/2,o=-o/2-s/2,l=t.cssStyles,c=FI.svg(r),h=LN(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");let u=[{x:a,y:o+s},{x:-a,y:o+s},{x:-a,y:-o},{x:a,y:-o},{x:a,y:o},{x:-a,y:o},{x:-a,y:o+s}],d=c.polygon(u.map(e=>[e.x,e.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",l),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),i.attr("transform",`translate(${a+(t.padding??0)/2-(e.x-(e.left??0))}, ${o+s+(t.padding??0)/2-(e.y-(e.top??0))})`),aN(t,p),t.intersect=function(e){return EN.rect(t,e)},r}var bR=e(()=>{i(),RN(),MN(),zI(),mt(xR,"dividedRectangle")});async function wR(e,t){var r,{labelStyles:n,nodeStyles:i}=V(t);t.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:o}=await nN(e,t,sN(t)),l=s.width/2+o+5,c=s.width/2+o,h,u=t.cssStyles;return"handDrawn"===t.look?(n=FI.svg(a),e=LN(t,{roughness:.2,strokeWidth:2.5}),r=LN(t,{roughness:.2,strokeWidth:1.5}),e=n.circle(0,0,2*l,e),n=n.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",AC(t.cssClasses)).attr("style",AC(u)),h.node()?.appendChild(e),h.node()?.appendChild(n)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),e=h.insert("circle"),h.attr("class","basic label-container").attr("style",i),r.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)),aN(t,h),t.intersect=function(e){return M.info("DoubleCircle intersect",t,l,e),EN.circle(t,l,e)},a}var kR=e(()=>{t(),i(),RN(),MN(),zI(),iS(),mt(wR,"doublecircle")});function TR(e,t,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=V(t);t.label="",t.labelStyle=n;let a=e.insert("g").attr("class",sN(t)).attr("id",t.domId??t.id),s=t.cssStyles,o=FI.svg(a),l=r.nodeBorder,c=LN(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),i&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",i),aN(t,u),t.intersect=function(e){return M.info("filledCircle intersect",t,{radius:7,point:e}),EN.circle(t,7,e)},a}var ER=e(()=>{zI(),t(),RN(),MN(),i(),mt(TR,"filledCircle")});async function CR(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],u=t.cssStyles,d=FI.svg(i),p=LN(t,{}),g=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),eN(h)),f=d.path(g,p),m=i.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",u),n&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",n),t.width=o,t.height=l,aN(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 M.info("Triangle intersect",t,h,e),EN.polygon(t,h,e)},i}var SR=e(()=>{t(),i(),RN(),MN(),zI(),i(),mt(CR,"flippedTriangle")});function _R(e,t,{dir:r,config:{state:n,themeVariables:i}}){var a=V(t).nodeStyles;t.label="";let s=e.insert("g").attr("class",sN(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=FI.svg(s),i=LN(t,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==t.look&&(i.roughness=0,i.fillStyle="solid");let u=h.rectangle(e,r,l,c,i),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),aN(t,d),h=n?.padding??0,t.width&&t.height&&(t.width+=h/2||0,t.height+=h/2||0),t.intersect=function(e){return EN.rect(t,e)},s}var AR=e(()=>{zI(),RN(),MN(),i(),mt(_R,"forkJoin")});async function LR(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(e,t,sN(t)),s=Math.max(80,a.width+2*(t.padding??0),t?.width??0),o=Math.max(50,a.height+2*(t.padding??0),t?.height??0),l=o/2,c=t.cssStyles,h=FI.svg(i),u=LN(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...rN(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=eN(d),g=h.path(p,u),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),aN(t,f),t.intersect=function(e){return M.info("Pill intersect",t,{radius:l,point:e}),EN.polygon(t,d,e)},i}var NR=e(()=>{t(),i(),RN(),MN(),zI(),mt(LR,"halfRoundedRectangle")});async function IR(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=n.height+i.padding,o=s/4,l=n.width+2*o+i.padding,c=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=LN(i,{}),r=RR(0,0,l,s,o),n=e.path(r,t);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=YI(a,l,s,c);return r&&h.attr("style",r),i.width=l,i.height=s,aN(i,h),i.intersect=function(e){return EN.polygon(i,c,e)},a}var RR,MR=e(()=>{i(),RN(),MN(),zI(),HI(),RR=mt((e,t,r,n,i)=>[`M${e+i},`+t,`L${e+r-i},`+t,`L${e+r},`+(t-n/2),`L${e+r-i},`+(t-n),`L${e+i},`+(t-n),`L${e},`+(t-n/2),"Z"].join(" "),"createHexagonPathD"),mt(IR,"hexagon")});async function DR(e,t){var{labelStyles:r,nodeStyles:n}=V(t),r=(t.label="",t.labelStyle=r,(await nN(e,t,sN(t))).shapeSvg),e=Math.max(30,t?.width??0),i=Math.max(30,t?.height??0),a=t.cssStyles,s=FI.svg(r),o=LN(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:e,y:0},{x:0,y:i},{x:e,y:i}],c=eN(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",n),u.attr("transform",`translate(${-e/2}, ${-i/2})`),aN(t,u),t.intersect=function(e){return M.info("Pill intersect",t,{points:l}),EN.polygon(t,l,e)},r}var OR=e(()=>{t(),i(),RN(),MN(),zI(),mt(DR,"hourglass")});async function PR(e,i,{config:{themeVariables:t,flowchart:r}}){var n,a=V(i).labelStyles,a=(i.labelStyle=a,i.assetHeight??48),a=Math.max(a,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(a,r??0);let{shapeSvg:s,bbox:o,label:l}=await nN(e,i,"icon-shape default"),c="t"===i.pos,h=a,u=a,d=t.nodeBorder,p=SN(i).stylesMap,g=-u/2,f=-h/2,m=i.label?8:0,y=FI.svg(s),v=LN(i,{stroke:"none",fill:"none"}),x=("handDrawn"!==i.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),b=Math.max(u,o.width),w=h+o.height+m,k=y.rectangle(-b/2,-w/2,b,w,{...v,fill:"transparent",stroke:"none"}),T=s.insert(()=>x,":first-child"),E=s.insert(()=>k);return i.icon&&((r=s.append("g")).html(`<g>${await $e(i.icon,{height:a,width:a,fallbackPrefix:""})}</g>`),t=(e=r.node().getBBox()).width,a=e.height,n=e.y,r.attr("transform",`translate(${-t/2-e.x},${c?o.height/2+m/2-a/2-n:-o.height/2-m/2-a/2-n})`),r.attr("style",`color: ${p.get("stroke")??d};`)),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${c?-w/2:w/2-o.height})`),T.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),aN(i,E),i.intersect=function(e){var t,r,n;return M.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=c?[{x:n-o.width/2,y:t-r/2},{x:n+o.width/2,y:t-r/2},{x:n+o.width/2,y:t-r/2+o.height+m},{x:n+u/2,y:t-r/2+o.height+m},{x:n+u/2,y:t+r/2},{x:n-u/2,y:t+r/2},{x:n-u/2,y:t-r/2+o.height+m},{x:n-o.width/2,y:t-r/2+o.height+m}]:[{x:n-u/2,y:t-r/2},{x:n+u/2,y:t-r/2},{x:n+u/2,y:t-r/2+h},{x:n+o.width/2,y:t-r/2+h},{x:n+o.width/2/2,y:t+r/2},{x:n-o.width/2,y:t+r/2},{x:n-o.width/2,y:t-r/2+h},{x:n-u/2,y:t-r/2+h}],EN.polygon(i,n,e)):EN.rect(i,e)},s}var BR=e(()=>{zI(),t(),je(),RN(),MN(),i(),mt(PR,"icon")});async function $R(e,t,{config:{themeVariables:r,flowchart:n}}){var i=V(t).labelStyles,i=(t.labelStyle=i,t.assetHeight??48),i=Math.max(i,t.assetWidth??48),n=n?.wrappingWidth,{shapeSvg:n,bbox:e,label:a}=(t.width=Math.max(i,n??0),await nN(e,t,"icon-shape default")),s=t.label?8:0,o="t"===t.pos,{nodeBorder:r,mainBkg:l}=r,c=SN(t).stylesMap,h=FI.svg(n),u=LN(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,n.append("g"));t.icon&&d.html(`<g>${await $e(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let p=d.node().getBBox(),g=p.width,f=p.height,m=p.x,y=p.y,v=Math.max(g,f)*Math.SQRT2+40,x=h.circle(0,0,v,u),b=Math.max(v,e.width),w=v+e.height+s,k=h.rectangle(-b/2,-w/2,b,w,{...u,fill:"transparent",stroke:"none"}),T=n.insert(()=>x,":first-child"),E=n.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?-w/2:w/2-e.height})`),T.attr("transform",`translate(0,${o?e.height/2+s/2:-e.height/2-s/2})`),aN(t,E),t.intersect=function(e){return M.info("iconSquare intersect",t,e),EN.rect(t,e)},n}var FR,zR=e(()=>{zI(),t(),je(),RN(),MN(),i(),mt($R,"iconCircle")}),GR=e(()=>{FR=mt((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD")});async function UR(e,i,{config:{themeVariables:t,flowchart:r}}){var n=V(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await nN(e,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=t,g=SN(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=FI.svg(a),x=LN(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(FR(f,m,u,h,5),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child").attr("class","icon-shape2"),S=a.insert(()=>E);return i.icon&&((e=a.append("g")).html(`<g>${await $e(i.icon,{height:n,width:n,fallbackPrefix:""})}</g>`),r=(t=e.node().getBBox()).width,n=t.height,b=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),aN(i,S),i.intersect=function(e){var t,r,n;return M.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2+s.height+y},{x:n+u/2,y:t-r/2+s.height+y},{x:n+u/2,y:t+r/2},{x:n-u/2,y:t+r/2},{x:n-u/2,y:t-r/2+s.height+y},{x:n-s.width/2,y:t-r/2+s.height+y}]:[{x:n-u/2,y:t-r/2},{x:n+u/2,y:t-r/2},{x:n+u/2,y:t-r/2+h},{x:n+s.width/2,y:t-r/2+h},{x:n+s.width/2/2,y:t+r/2},{x:n-s.width/2,y:t+r/2},{x:n-s.width/2,y:t-r/2+h},{x:n-u/2,y:t-r/2+h}],EN.polygon(i,n,e)):EN.rect(i,e)},a}var qR=e(()=>{zI(),t(),je(),RN(),MN(),GR(),i(),mt(UR,"iconRounded")});async function jR(e,i,{config:{themeVariables:t,flowchart:r}}){var n=V(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await nN(e,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=t,g=SN(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=FI.svg(a),x=LN(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(FR(f,m,u,h,.1),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child"),S=a.insert(()=>E);return i.icon&&((e=a.append("g")).html(`<g>${await $e(i.icon,{height:n,width:n,fallbackPrefix:""})}</g>`),r=(t=e.node().getBBox()).width,n=t.height,b=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),aN(i,S),i.intersect=function(e){var t,r,n;return M.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2+s.height+y},{x:n+u/2,y:t-r/2+s.height+y},{x:n+u/2,y:t+r/2},{x:n-u/2,y:t+r/2},{x:n-u/2,y:t-r/2+s.height+y},{x:n-s.width/2,y:t-r/2+s.height+y}]:[{x:n-u/2,y:t-r/2},{x:n+u/2,y:t-r/2},{x:n+u/2,y:t-r/2+h},{x:n+s.width/2,y:t-r/2+h},{x:n+s.width/2/2,y:t+r/2},{x:n-s.width/2,y:t+r/2},{x:n-s.width/2,y:t-r/2+h},{x:n-u/2,y:t-r/2+h}],EN.polygon(i,n,e)):EN.rect(i,e)},a}var WR=e(()=>{zI(),t(),je(),RN(),GR(),MN(),i(),mt(jR,"iconSquare")});async function YR(e,i,{config:{flowchart:t}}){(n=new Image).src=i?.img??"",await n.decode();var r=Number(n.naturalWidth.toString().replace("px","")),n=Number(n.naturalHeight.toString().replace("px","")),a=(i.imageAspectRatio=r/n,V(i).labelStyles),a=(i.labelStyle=a,t?.wrappingWidth);i.defaultWidth=t?.wrappingWidth;let s=Math.max(i.label?a??0:0,i?.assetWidth??r),o="on"===i.constraint&&i?.assetHeight?i.assetHeight*i.imageAspectRatio:s,l="on"===i.constraint?o/i.imageAspectRatio:i?.assetHeight??n,{shapeSvg:c,bbox:h,label:u}=(i.width=Math.max(o,a??0),await nN(e,i,"image-shape default")),d="t"===i.pos,p=-o/2,g=-l/2,f=i.label?8:0,m=FI.svg(c),y=LN(i,{}),v=("handDrawn"!==i.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),x=Math.max(o,h.width),b=l+h.height+f,w=m.rectangle(-x/2,-b/2,x,b,{...y,fill:"none",stroke:"none"}),k=c.insert(()=>v,":first-child"),T=c.insert(()=>w);return i.img&&((t=c.append("image")).attr("href",i.img),t.attr("width",o),t.attr("height",l),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-o/2},${d?b/2-l:-b/2})`)),u.attr("transform",`translate(${-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})`),aN(i,T),i.intersect=function(e){var t,r,n;return M.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=d?[{x:n-h.width/2,y:t-r/2},{x:n+h.width/2,y:t-r/2},{x:n+h.width/2,y:t-r/2+h.height+f},{x:n+o/2,y:t-r/2+h.height+f},{x:n+o/2,y:t+r/2},{x:n-o/2,y:t+r/2},{x:n-o/2,y:t-r/2+h.height+f},{x:n-h.width/2,y:t-r/2+h.height+f}]:[{x:n-o/2,y:t-r/2},{x:n+o/2,y:t-r/2},{x:n+o/2,y:t-r/2+l},{x:n+h.width/2,y:t-r/2+l},{x:n+h.width/2/2,y:t+r/2},{x:n-h.width/2,y:t+r/2},{x:n-h.width/2,y:t-r/2+l},{x:n-o/2,y:t-r/2+l}],EN.polygon(i,n,e)):EN.rect(i,e)},c}var HR=e(()=>{zI(),t(),RN(),MN(),i(),mt(YR,"imageSquare")});async function VR(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=Math.max(n.width+2*(i.padding??0),i?.width??0),o=Math.max(n.height+2*(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=LN(i,{}),r=eN(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=YI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(e){return EN.polygon(i,l,e)},a}var XR=e(()=>{i(),RN(),MN(),zI(),HI(),mt(VR,"inv_trapezoid")});async function KR(e,n,t){var{labelStyles:r,nodeStyles:i}=V(n);n.labelStyle=r;let{shapeSvg:a,bbox:s}=await nN(e,n,sN(n)),o=Math.max(s.width+2*t.labelPaddingX,n?.width||0),l=Math.max(s.height+2*t.labelPaddingY,n?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=n,g=n.cssStyles;if(t?.rx&&t.ry&&(d=t.rx,p=t.ry),"handDrawn"===n.look){let e=FI.svg(a),t=LN(n,{}),r=d||p?e.path(FR(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",AC(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",AC(d)).attr("ry",AC(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return aN(n,u),n.intersect=function(e){return EN.rect(n,e)},a}var ZR=e(()=>{i(),RN(),GR(),MN(),zI(),iS(),mt(KR,"drawRect")});async function QR(e,t){var{shapeSvg:e,bbox:r,label:n}=await nN(e,t,"label"),i=e.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),e.attr("class","label edgeLabel"),n.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),aN(t,i),t.intersect=function(e){return EN.rect(t,e)},e}var JR=e(()=>{ZR(),i(),RN(),mt(QR,"labelRect")});async function eM(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=LN(i,{}),r=eN(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=YI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(e){return EN.polygon(i,l,e)},a}var tM=e(()=>{i(),RN(),MN(),zI(),HI(),mt(eM,"lean_left")});async function rM(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=LN(i,{}),r=eN(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=YI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(e){return EN.polygon(i,l,e)},a}var nM=e(()=>{i(),RN(),MN(),zI(),HI(),mt(rM,"lean_right")});function iM(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.label="",t.labelStyle=r;let i=e.insert("g").attr("class",sN(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=FI.svg(i),h=LN(t,{}),u=("handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid"),eN(l)),d=c.path(u,h),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",a),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${s/2},${-o})`),aN(t,p),t.intersect=function(e){return M.info("lightningBolt intersect",t,e),EN.polygon(t,l,e)},i}var aM=e(()=>{t(),i(),MN(),zI(),RN(),i(),mt(iM,"lightningBolt")});async function sM(e,s){var{labelStyles:t,nodeStyles:r}=V(s);s.labelStyle=t;let{shapeSvg:o,bbox:n,label:i}=await nN(e,s,sN(s)),l=Math.max(n.width+(s.padding??0),s.width??0),c=l/2,h=c/(2.5+l/50),u=Math.max(n.height+h+(s.padding??0),s.height??0),d=.1*u,p,g=s.cssStyles;if("handDrawn"===s.look){let e=FI.svg(o),t=lM(0,0,l,u,c,h,d),r=cM(0,h,l,u,c,h),n=LN(s,{}),i=e.path(t,n),a=e.path(r,n);o.insert(()=>a,":first-child").attr("class","line"),(p=o.insert(()=>i,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else t=oM(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",AC(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),aN(s,p),i.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=EN.rect(s,t),n=r.x-(s.x??0);if(0!=c&&(Math.abs(n)<(s.width??0)/2||Math.abs(n)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-h)){let e=h*h*(1-n*n/(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 oM,lM,cM,hM=e(()=>{i(),RN(),MN(),zI(),iS(),oM=mt((e,t,r,n,i,a,s)=>[`M${e},`+(t+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${e},`+(t+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),lM=mt((e,t,r,n,i,a,s)=>[`M${e},`+(t+a),`M${e+r},`+(t+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${e},`+(t+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),cM=mt((e,t,r,n,i,a)=>[`M${e-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mt(sM,"linedCylinder")});async function uM(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(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/4,l=s+o,c=t.cssStyles,h=FI.svg(r),u=LN(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:-a/2-a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:l/2},...tN(-a/2-a/2*.1,l/2,a/2+a/2*.1,l/2,o,.8),{x:a/2+a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:-l/2},{x:-a/2,y:-l/2},{x:-a/2,y:l/2*1.1},{x:-a/2,y:-l/2}],p=h.polygon(d.map(e=>[e.x,e.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",c),n&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o/2-(e.y-(e.top??0))})`),aN(t,g),t.intersect=function(e){return EN.polygon(t,d,e)},r}var dM=e(()=>{i(),RN(),zI(),MN(),mt(uM,"linedWaveEdgedRect")});async function pM(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=t.cssStyles,d=FI.svg(i),p=LN(t,{}),g=[{x:c-5,y:5+h},{x:c-5,y:h+l+5},{x:c+o-5,y:h+l+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h+l-5},{x:c+o+5,y:h+l-5},{x:c+o+5,y:h-5},{x:5+c,y:h-5},{x:5+c,y:h},{x:c,y:h},{x:c,y:5+h}],f=[{x:c,y:5+h},{x:c+o-5,y:5+h},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h},{x:c,y:h}],m=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),eN(g)),y=d.path(m,p),v=eN(f),x=d.path(v,{...p,fill:"none"}),b=i.insert(()=>x,":first-child");return b.insert(()=>y,":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),aN(t,b),t.intersect=function(e){return EN.polygon(t,g,e)},i}var gM=e(()=>{i(),MN(),zI(),RN(),mt(pM,"multiRect")});async function fM(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,p=t.cssStyles,g=tN(u-5,d+h+5,u+o-5,d+h+5,c,.8),f=g?.[g.length-1],m=[{x:u-5,y:5+d},{x:u-5,y:d+h+5},...g,{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:f.y-10},{x:u+o+5,y:f.y-10},{x:u+o+5,y:d-5},{x:5+u,y:d-5},{x:5+u,y:d},{x:u,y:d},{x:u,y:5+d}],y=[{x:u,y:5+d},{x:u+o-5,y:5+d},{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:d},{x:u,y:d}],v=FI.svg(i),x=LN(t,{}),b=("handDrawn"!==t.look&&(x.roughness=0,x.fillStyle="solid"),eN(m)),w=v.path(b,x),k=eN(y),T=v.path(k,x),E=i.insert(()=>w,":first-child");return E.insert(()=>T),E.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&E.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),aN(t,E),t.intersect=function(e){return EN.polygon(t,m,e)},i}var mM=e(()=>{i(),RN(),zI(),MN(),mt(fM,"multiWaveEdgedRectangle")});async function yM(e,t,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=V(t),{shapeSvg:n,bbox:e,label:a}=(t.labelStyle=n,t.useHtmlLabels||!1!==Ir().flowchart?.htmlLabels||(t.centerLabel=!0),await nN(e,t,sN(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=FI.svg(n),r=LN(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=n.insert(()=>d,":first-child");return p.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",h),i&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",i),a.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))}, ${-e.height/2-(e.y-(e.top??0))})`),aN(t,p),t.intersect=function(e){return EN.rect(t,e)},n}var vM=e(()=>{zI(),RN(),MN(),i(),Nn(),mt(yM,"note")});async function xM(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=n.width+i.padding,o=n.height+i.padding,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=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=LN(i,{}),r=bM(0,0,l),n=e.path(r,t);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=YI(a,l,l,c);return r&&h.attr("style",r),aN(i,h),i.intersect=function(e){return M.debug(`APA12 Intersect called SPLIT
|
||
point:`,e,`
|
||
node:
|
||
`,i,`
|
||
res:`,EN.polygon(i,c,e)),EN.polygon(i,c,e)},a}var bM,wM=e(()=>{t(),i(),RN(),MN(),zI(),HI(),bM=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(xM,"question")});async function kM(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],p=t.cssStyles,g=FI.svg(i),f=LN(t,{}),m=("handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid"),eN(d)),y=g.path(m,f),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),aN(t,v),t.intersect=function(e){return EN.polygon(t,d,e)},i}var TM=e(()=>{i(),RN(),MN(),zI(),mt(kM,"rect_left_inv_arrow")});function EM(e,t){t&&e.attr("style",t)}async function CM(e){let t=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label;return e.label&&Zc(e.label)&&(n=await Jc(e.label.replace(L.lineBreakRegex,`
|
||
`),D())),r.html('<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>"),EM(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}var SM,_M,AM=e(()=>{a6(),t(),Eu(),lh(),iS(),mt(EM,"applyStyle"),mt(CM,"addHtmlLabel"),SM=mt(async(e,t,r,n)=>{let i=e||"";if("object"==typeof i&&(i=i[0]),Uc(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"<br />"),M.info("vertexText"+i),CM({isNode:n,label:rS(i).replace(/fa[blrs]?:fa-[\w-]+/g,e=>`<i class='${e.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),_M=SM});async function LM(i,a){var{labelStyles:e,nodeStyles:t}=V(a);a.labelStyle=e;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",i.insert("g").attr("class",r).attr("id",a.domId||a.id)),n=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",t),l=a.description,c=a.label,h=o.node().appendChild(await _M(c,a.labelStyle,!0,!0)),u={width:0,height:0};Uc(D()?.flowchart?.htmlLabels)&&(e=h.children[0],i=H(h),u=e.getBoundingClientRect(),i.attr("width",u.width),i.attr("height",u.height)),M.info("Text 2",l);var e=l||[],i=h.getBBox(),d=(e=o.node().appendChild(await _M(e.join?e.join("<br/>"):e,a.labelStyle,!0,!0))).children[0],p=H(e),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);H(e).attr("transform","translate( "+(u.width>i.width?0:(i.width-u.width)/2)+", "+(i.height+d+5)+")"),H(h).attr("transform","translate( "+(u.width<i.width?0:-(i.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-d+3)+")");let g=u.width+(a.padding||0),f=u.height+(a.padding||0),m=-u.width/2-d,y=-u.height/2-d,v,x;if("handDrawn"===a.look){let e=FI.svg(s),t=LN(a,{}),r=e.path(FR(m,y,g,f,a.rx||0),t),n=e.line(-u.width/2-d,-u.height/2-d+i.height+d,u.width/2+d,-u.height/2-d+i.height+d,t);x=s.insert(()=>(M.debug("Rough node insert CXC",r),n),":first-child"),v=s.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")}else v=n.insert("rect",":first-child"),x=n.insert("line"),v.attr("class","outer title-state").attr("style",t).attr("x",-u.width/2-d).attr("y",-u.height/2-d).attr("width",u.width+(a.padding||0)).attr("height",u.height+(a.padding||0)),x.attr("class","divider").attr("x1",-u.width/2-d).attr("x2",u.width/2+d).attr("y1",-u.height/2-d+i.height+d).attr("y2",-u.height/2-d+i.height+d);return aN(a,v),a.intersect=function(e){return EN.rect(a,e)},s}var NM=e(()=>{a6(),lh(),i(),AM(),RN(),MN(),zI(),Eu(),GR(),t(),mt(LM,"rectWithTitle")});async function IM(e,t){return KR(e,t,{rx:5,ry:5,classes:"",labelPaddingX:+(t?.padding||0),labelPaddingY:+(t?.padding||0)})}var RM=e(()=>{ZR(),mt(IM,"roundedRect")});async function MM(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(t))),a=t?.padding??0,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=-e.width/2-a,a=-e.height/2-a,c=t.cssStyles,h=FI.svg(r),u=LN(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:l,y:a},{x:l+s+8,y:a},{x:l+s+8,y:a+o},{x:l-8,y:a+o},{x:l-8,y:a},{x:l,y:a},{x:l,y:a+o}],p=h.polygon(d.map(e=>[e.x,e.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",AC(c)),n&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",n),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",n),i.attr("transform",`translate(${-s/2+4+(t.padding??0)-(e.x-(e.left??0))},${-o/2+(t.padding??0)-(e.y-(e.top??0))})`),aN(t,g),t.intersect=function(e){return EN.rect(t,e)},r}var DM=e(()=>{i(),RN(),MN(),zI(),iS(),mt(MM,"shadedProcess")});async function OM(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(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=-a/2,l=-s/2,c=t.cssStyles,h=FI.svg(r),u=LN(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:o,y:l},{x:o,y:l+s},{x:o+a,y:l+s},{x:o+a,y:l-s/2}],p=eN(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),f.attr("transform",`translate(0, ${s/4})`),i.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))}, ${-s/4+(t.padding??0)-(e.y-(e.top??0))})`),aN(t,f),t.intersect=function(e){return EN.polygon(t,d,e)},r}var PM=e(()=>{i(),RN(),MN(),zI(),mt(OM,"slopedRect")});async function BM(e,t){return KR(e,t,{rx:0,ry:0,classes:"",labelPaddingX:2*(t?.padding||0),labelPaddingY:+(t?.padding||0)})}var $M=e(()=>{ZR(),mt(BM,"squareRect")});async function FM(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=n.height+i.padding,o=n.width+s/4+i.padding,l,c=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=LN(i,{}),r=FR(-o/2,-s/2,o,s,s/2),n=e.path(r,t);(l=a.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",AC(c))}else(l=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",r).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return aN(i,l),i.intersect=function(e){return EN.rect(i,e)},a}var zM=e(()=>{i(),RN(),MN(),zI(),GR(),iS(),mt(FM,"stadium")});async function GM(e,t){return KR(e,t,{rx:5,ry:5,classes:"flowchart-node"})}var UM=e(()=>{ZR(),mt(GM,"state")});function qM(e,t,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=V(t),n=(t.labelStyle=n,t.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s}=r,e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),o=FI.svg(e),l=LN(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=o.circle(0,0,14,{...l,stroke:r,strokeWidth:2}),h=a??s,u=o.circle(0,0,5,{...l,fill:h,stroke:h,strokeWidth:2,fillStyle:"solid"}),d=e.insert(()=>c,":first-child");return d.insert(()=>u),n&&d.selectAll("path").attr("style",n),i&&d.selectAll("path").attr("style",i),aN(t,d),t.intersect=function(e){return EN.circle(t,7,e)},e}var jM=e(()=>{zI(),RN(),MN(),i(),mt(qM,"stateEnd")});function WM(e,t,{config:{themeVariables:r}}){let n=r.lineColor,i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),a;if("handDrawn"===t.look){let e=FI.svg(i).circle(0,0,14,CN(n));(a=i.insert(()=>e)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(a=i.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return aN(t,a),t.intersect=function(e){return EN.circle(t,7,e)},i}var YM=e(()=>{zI(),RN(),MN(),i(),mt(WM,"stateStart")});async function HM(a,s){var{labelStyles:o,nodeStyles:e}=V(s);s.labelStyle=o;let{shapeSvg:l,bbox:t}=await nN(a,s,sN(s)),r=(s?.padding||0)/2,c=t.width+s.padding,h=t.height+s.padding,u=-t.width/2-r,d=-t.height/2-r,n=[{x:0,y:0},{x:c,y:0},{x:c,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-h},{x:-8,y:-h},{x:-8,y:0}];if("handDrawn"===s.look){let e=FI.svg(l),t=LN(s,{}),r=e.rectangle(u-8,d,c+16,h,t),n=e.line(u,d,u,d+h,t),i=e.line(u+c,d,u+c,d+h,t);l.insert(()=>n,":first-child"),l.insert(()=>i,":first-child"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",AC(a)),aN(s,o)}else a=YI(l,c,h,n),e&&a.attr("style",e),aN(s,a);return s.intersect=function(e){return EN.polygon(s,n,e)},l}var VM=e(()=>{i(),RN(),MN(),zI(),HI(),iS(),mt(HM,"subroutine")});async function XM(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(e,t,sN(t)),s=Math.max(a.width+2*(t.padding??0),t?.width??0),o=Math.max(a.height+2*(t.padding??0),t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,d=t.cssStyles,p=FI.svg(i),g=LN(t,{}),f=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],m=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}],y=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),eN(f)),v=p.path(y,g),x=eN(m),b=p.path(x,{...g,fillStyle:"solid"}),w=i.insert(()=>b,":first-child");return w.insert(()=>v,":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",d),n&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",n),aN(t,w),t.intersect=function(e){return EN.polygon(t,f,e)},i}var KM=e(()=>{i(),MN(),zI(),RN(),mt(XM,"taggedRect")});async function ZM(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(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/4,l=.2*a,c=.2*s,h=s+o,u=t.cssStyles,d=FI.svg(r),p=LN(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...tN(-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.4*(m+s)},{x:f+a,y:m+s-c},{x:f+a,y:.9*(m+s)},...tN(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=eN(g),x=d.path(v,p),b=eN(y),w=d.path(b,{...p,fillStyle:"solid"}),k=r.insert(()=>w,":first-child");return k.insert(()=>x,":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(0,${-o/2})`),i.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))})`),aN(t,k),t.intersect=function(e){return EN.polygon(t,g,e)},r}var QM=e(()=>{i(),RN(),zI(),MN(),mt(ZM,"taggedWaveEdgedRectangle")});async function JM(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nN(e,t,sN(t))),i=Math.max(e.width+t.padding,t?.width||0),a=-i/2,s=-(e=Math.max(e.height+t.padding,t?.height||0))/2,o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",i).attr("height",e),aN(t,o),t.intersect=function(e){return EN.rect(t,e)},r}var eD=e(()=>{i(),RN(),MN(),mt(JM,"text")});async function tD(e,a){var{labelStyles:t,nodeStyles:r}=V(a);a.labelStyle=t;let{shapeSvg:s,bbox:n,label:i,halfPadding:o}=await nN(e,a,sN(a)),l="neo"===a.look?2*o:o,c=n.height+l,h=c/2,u=h/(2.5+c/50),d=n.width+u+l,p=a.cssStyles,g;if("handDrawn"===a.look){let e=FI.svg(s),t=nD(0,0,d,c,u,h),r=iD(0,0,d,c,u,h),n=e.path(t,LN(a,{})),i=e.path(r,LN(a,{fill:"none"}));g=s.insert(()=>i,":first-child"),(g=s.insert(()=>n,":first-child")).attr("class","basic label-container"),p&&g.attr("style",p)}else t=rD(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",AC(p)).attr("style",r)).attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),r&&g.selectAll("path").attr("style",r);return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),i.attr("transform",`translate(${-n.width/2-u-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),aN(a,g),a.intersect=function(t){var r=EN.rect(a,t),n=r.y-(a.y??0);if(0!=h&&(Math.abs(n)<(a.height??0)/2||Math.abs(n)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-u)){let e=u*u*(1-n*n/(h*h));0!=e&&(e=Math.sqrt(Math.abs(e))),e=u-e,0<t.x-(a.x??0)&&(e=-e),r.x+=e}return r},s}var rD,nD,iD,aD=e(()=>{i(),MN(),zI(),RN(),iS(),rD=mt((e,t,r,n,i,a)=>`M${e},${t}
|
||
a${i},${a} 0,0,1 0,${-n}
|
||
l${r},0
|
||
a${i},${a} 0,0,1 0,${n}
|
||
M${r},${-n}
|
||
a${i},${a} 0,0,0 0,${n}
|
||
l${-r},0`,"createCylinderPathD"),nD=mt((e,t,r,n,i,a)=>[`M${e},`+t,`M${e+r},`+t,`a${i},${a} 0,0,0 0,`+-n,`l${-r},0`,`a${i},${a} 0,0,0 0,`+n,`l${r},0`].join(" "),"createOuterCylinderPathD"),iD=mt((e,t,r,n,i,a)=>[`M${e+r/2},`+-n/2,`a${i},${a} 0,0,0 0,`+n].join(" "),"createInnerCylinderPathD"),mt(tD,"tiltedCylinder")});async function sD(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=LN(i,{}),r=eN(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=YI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(e){return EN.polygon(i,l,e)},a}var oD=e(()=>{i(),RN(),MN(),zI(),HI(),mt(sD,"trapezoid")});async function lD(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nN(e,t,sN(t))),i=Math.max(60,e.width+2*(t.padding??0),t?.width??0),e=Math.max(20,e.height+2*(t.padding??0),t?.height??0),a=t.cssStyles,s=FI.svg(r),o=LN(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-i/2*.8,y:-e/2},{x:i/2*.8,y:-e/2},{x:i/2,y:-e/2*.6},{x:i/2,y:e/2},{x:-i/2,y:e/2},{x:-i/2,y:-e/2*.6}],c=eN(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",n),aN(t,u),t.intersect=function(e){return EN.polygon(t,l,e)},r}var cD=e(()=>{i(),RN(),MN(),zI(),mt(lD,"trapezoidalPentagon")});async function hD(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=Uc(D().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],d=t.cssStyles,p=FI.svg(i),g=LN(t,{}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),eN(u)),m=p.path(f,g),y=i.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",d),n&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",n),t.width=l,t.height=c,aN(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 M.info("Triangle intersect",t,u,e),EN.polygon(t,u,e)},i}var uD=e(()=>{t(),i(),RN(),MN(),zI(),i(),lh(),Eu(),mt(hD,"triangle")});async function dD(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(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=s+o,c=t.cssStyles,h=0<(h=70-a)?h/2:0,u=FI.svg(r),d=LN(t,{});"handDrawn"!==t.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...tN(-a/2-h,l/2,a/2+h,l/2,o,.8),{x:a/2+h,y:-l/2},{x:-a/2-h,y:-l/2}],g=eN(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",c),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o-(e.y-(e.top??0))})`),aN(t,m),t.intersect=function(e){return EN.polygon(t,p,e)},r}var pD=e(()=>{i(),RN(),zI(),MN(),mt(dD,"waveEdgedRectangle")});async function gD(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(e,t,sN(t)),s=Math.max(a.width+2*(t.padding??0),t?.width??0),o=Math.max(a.height+2*(t.padding??0),t?.height??0),l=s/o,c=s,h=o;c>h*l?h=c/l:c=h*l,c=Math.max(c,100),h=Math.max(h,50);var r=Math.min(.2*h,h/4),e=h+2*r,u=t.cssStyles,d=FI.svg(i),p=LN(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:e/2},...tN(-c/2,e/2,c/2,e/2,r,1),{x:c/2,y:-e/2},...tN(c/2,-e/2,-c/2,-e/2,r,-1)],f=eN(g),m=d.path(f,p),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),aN(t,y),t.intersect=function(e){return EN.polygon(t,g,e)},i}var fD=e(()=>{i(),RN(),MN(),zI(),mt(gD,"waveRectangle")});async function mD(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=t.cssStyles,d=FI.svg(i),p=LN(t,{}),g=[{x:c-5,y:h-5},{x:c-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-5}],f=`M${c-5},${h-5} L${c+o},${h-5} L${c+o},${h+l} L${c-5},${h+l} L${c-5},${h-5}
|
||
M${c-5},${h} L${c+o},${h}
|
||
M${c},${h-5} L${c},`+(h+l),m=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),d.path(f,p)),y=i.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),aN(t,y),t.intersect=function(e){return EN.polygon(t,g,e)},i}var yD=e(()=>{i(),MN(),zI(),RN(),mt(mD,"windowPane")});async function vD(e,t){var r,n=t,i=(n.alias&&(t.label=n.alias),"handDrawn"===t.look&&(A=(A=Ir().themeVariables).background,await vD(e,{...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none","fill: "+A]})),Ir());t.useHtmlLabels=i.htmlLabels;let o=i.er?.diagramPadding??10,l=i.er?.entityPadding??6,a=t.cssStyles,{labelStyles:s,nodeStyles:c}=V(t);if(0===n.attributes.length&&t.label)return A={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},CC(t.label,i)+2*A.labelPaddingX<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth),A=await KR(e,t,A),Uc(i.htmlLabels)||(E=(_=A.select("text")).node()?.getBBox(),_.attr("transform",`translate(${-E.width/2}, 0)`)),A;i.htmlLabels||(o*=1.25,l*=1.25);let h=sN(t),u=(h=h||"node default",e.insert("g").attr("class",h).attr("id",t.domId||t.id)),d=await xD(u,t.label??"",i,0,0,["name"],s),p=(d.height+=l,0),g=[],f=[],m=0,y=0,v=0,x=0,b=!0,w=!0;for(r of n.attributes){var k=await xD(u,r.type,i,0,p,["attribute-type"],s),P=(m=Math.max(m,k.width+o),await xD(u,r.name,i,0,p,["attribute-name"],s)),B=(y=Math.max(y,P.width+o),await xD(u,r.keys.join(),i,0,p,["attribute-keys"],s)),$=(v=Math.max(v,B.width+o),await xD(u,r.comment,i,0,p,["attribute-comment"],s)),k=(x=Math.max(x,$.width+o),Math.max(k.height,P.height,B.height,$.height)+l);f.push({yOffset:p,rowHeight:k}),p+=k}let T=4;v<=o&&(b=!1,v=0,T--),x<=o&&(w=!1,x=0,T--);var E,F,C,S,_=u.node().getBBox(),A=(0<d.width+2*o-(m+y+v+x)&&(E=d.width+2*o-(m+y+v+x),m+=E/T,y+=E/T,0<v&&(v+=E/T),0<x)&&(x+=E/T),m+y+v+x),L=FI.svg(u),N=LN(t,{});"handDrawn"!==t.look&&(N.roughness=0,N.fillStyle="solid");let z=0,I=(0<f.length&&(z=f.reduce((e,t)=>e+(t?.rowHeight??0),0)),Math.max(_.width+2*o,t?.width||0,A)),R=Math.max((z??0)+d.height,t?.height||0),M=-I/2,D=-R/2,G=(u.selectAll("g:not(:first-child)").each((e,t,r)=>{let n=H(r[t]),i=n.attr("transform"),a=0,s=0;i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(r[1]),s=parseFloat(r[2]),n.attr("class").includes("attribute-name")?a+=m:n.attr("class").includes("attribute-keys")?a+=m+y:n.attr("class").includes("attribute-comment")&&(a+=m+y+v)),n.attr("transform",`translate(${M+o/2+a}, ${s+D+d.height+l/2})`)}),u.select(".name").attr("transform","translate("+-d.width/2+", "+(D+l/2)+")"),L.rectangle(M,D,I,R,N)),U=u.insert(()=>G,":first-child").attr("style",a.join("")),q=Ir().themeVariables,{rowEven:j,rowOdd:W,nodeBorder:Y}=q;g.push(0);for([F,C]of f.entries()){let e=(F+1)%2==0&&0!==C.yOffset,t=L.rectangle(M,d.height+D+C?.yOffset,I,C?.rowHeight,{...N,fill:e?j:W,stroke:Y});u.insert(()=>t,"g.label").attr("style",a.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let O=L.line(M,d.height+D,I+M,d.height+D,N);u.insert(()=>O).attr("class","divider"),O=L.line(m+M,d.height+D,m+M,R+D,N),u.insert(()=>O).attr("class","divider"),b&&(O=L.line(m+y+M,d.height+D,m+y+M,R+D,N),u.insert(()=>O).attr("class","divider")),w&&(O=L.line(m+y+v+M,d.height+D,m+y+v+M,R+D,N),u.insert(()=>O).attr("class","divider"));for(S of g)O=L.line(M,d.height+D+S,I+M,d.height+D+S,N),u.insert(()=>O).attr("class","divider");return aN(t,U),c&&"handDrawn"!==t.look&&(e=c.split(";")?.filter(e=>e.includes("stroke"))?.map(e=>""+e).join("; "),u.selectAll("path").attr("style",e??""),u.selectAll(".row-rect-even path").attr("style",c)),t.intersect=function(e){return EN.rect(t,e)},u}async function xD(e,t,r,n=0,i=0,a=[],s=""){if(e=e.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${n}, ${i})`).attr("style",s),t!==Wc(t)&&(t=(t=Wc(t)).replaceAll("<","<").replaceAll(">",">")),a=e.node().appendChild(await QL(e,t,{width:CC(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 Uc(r.htmlLabels)&&((n=a.children[0]).style.textAlign="start",i=H(a),o=n.getBoundingClientRect(),i.attr("width",o.width),i.attr("height",o.height)),o}var bD=e(()=>{i(),RN(),MN(),zI(),ZR(),Nn(),JL(),lh(),a6(),iS(),mt(vD,"erBox"),mt(xD,"addText")});async function wD(e,t,r,n,i=r.class.padding??12){let a=n?0:3,s=e.insert("g").attr("class",sN(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&&(n=t.annotations[0],await kD(o,{text:`«${n}»`},0),u=o.node().getBBox().height),await kD(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 kD(c,g,m,[g.parseClassifier()]);m+=y+a}(p=c.node().getBBox().height)<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let v=0;for(f of t.methods){var x=await kD(h,f,v,[f.parseClassifier()]);v+=x+a}return s.node().getBBox(),null!==o&&(n=o.node().getBBox(),o.attr("transform",`translate(${-n.width/2})`)),l.attr("transform",`translate(${-e.width/2}, ${u})`),s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*i})`),s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*i:2*i)})`),t=s.node().getBBox(),{shapeSvg:s,bbox:t}}async function kD(e,t,r,n=[]){let i=e.insert("g").attr("class","label").attr("style",n.join("; ")),a=Ir(),s="useHtmlLabels"in t?t.useHtmlLabels:Uc(a.htmlLabels)??!0,o="",l=(o="text"in t?t.text:t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Zc(o)&&(s=!0),await QL(i,_h(rS(o)),{width:CC(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a)),c,h=1;if(s){var e=l.children[0],t=H(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 n=""===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",n?(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 n.includes("font-weight: bolder")&&H(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 i.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}var TD=e(()=>{a6(),Nn(),i(),iS(),Eu(),JL(),lh(),mt(wD,"textHelper"),mt(kD,"addText")});async function ED(t,r){let e=D(),s=e.class.padding??12,n=s,o=r.useHtmlLabels??Uc(e.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:i}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await wD(t,r,e,o,n)),{labelStyles:a,nodeStyles:h}=V(r),u=(r.labelStyle=a,r.cssStyles=l.styles||"",t=l.styles?.join(";")||h||"",r.cssStyles||(r.cssStyles=t.replaceAll("!important","").split(";")),0===l.members.length&&0===l.methods.length&&!e.class?.hideEmptyMembersBox),d=FI.svg(c),p=LN(r,{}),g=("handDrawn"!==r.look&&(p.roughness=0,p.fillStyle="solid"),i.width),f=i.height,m=(0===l.members.length&&0===l.methods.length?f+=n:0<l.members.length&&0===l.methods.length&&(f+=2*n),-g/2),y=-f/2,v=d.rectangle(m-s,y-s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),g+2*s,f+2*s+(u?2*s:0===l.members.length&&0===l.methods.length?-s:0),p),x=c.insert(()=>v,":first-child");x.attr("class","basic label-container");var b=x.node().getBBox(),w=(c.selectAll(".text").each((e,t,r)=>{let n=(t=H(r[t])).attr("transform"),i=(n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))?parseFloat(r[2]):0)+y+s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),a=(o||(i-=4),m);(t.attr("class").includes("label-group")||t.attr("class").includes("annotation-group"))&&(a=-t.node()?.getBBox().width/2||0,c.selectAll("text").each(function(e,t,r){"middle"===window.getComputedStyle(r[t]).textAnchor&&(a=0)})),t.attr("transform",`translate(${a}, ${i})`)}),c.select(".annotation-group").node().getBBox().height-(u?s/2:0)||0),k=c.select(".label-group").node().getBBox().height-(u?s/2:0)||0,T=c.select(".members-group").node().getBBox().height-(u?s/2:0)||0;if(0<l.members.length||0<l.methods.length||u){let e=d.line(b.x,w+k+y+s,b.x+b.width,w+k+y+s,p);c.insert(()=>e).attr("class","divider").attr("style",t)}if(u||0<l.members.length||0<l.methods.length){let e=d.line(b.x,w+k+T+y+2*n+s,b.x+b.width,w+k+T+y+s+2*n,p);c.insert(()=>e).attr("class","divider").attr("style",t)}return"handDrawn"!==l.look&&c.selectAll("path").attr("style",t),x.select(":nth-child(2)").attr("style",t),c.selectAll(".divider").select("path").attr("style",t),r.labelStyle?c.selectAll("span").attr("style",r.labelStyle):c.selectAll("span").attr("style",t),o||((w=(b=RegExp(/color\s*:\s*([^;]*)/)).exec(t))?(k=w[0].replace("color","fill"),c.selectAll("tspan").attr("style",k)):a&&(T=b.exec(a))&&(t=T[0].replace("color","fill"),c.selectAll("tspan").attr("style",t))),aN(r,x),r.intersect=function(e){return EN.rect(r,e)},c}var CD=e(()=>{i(),Eu(),a6(),zI(),MN(),RN(),TD(),lh(),mt(ED,"classBox")});async function SD(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let i=t,a=t,s="verifyMethod"in t,o=sN(t),l=e.insert("g").attr("class",o).attr("id",t.domId??t.id),c,h=c=s?await _D(l,`<<${i.type}>>`,0,t.labelStyle):await _D(l,"<<Element>>",0,t.labelStyle),u=await _D(l,i.name,h,t.labelStyle+"; font-weight: bold;"),d=(h+=u+20,s?(r=await _D(l,i.requirementId?"id: "+i.requirementId:"",h,t.labelStyle),h+=r,e=await _D(l,i.text?"Text: "+i.text:"",h,t.labelStyle),h+=e,r=await _D(l,i.risk?"Risk: "+i.risk:"",h,t.labelStyle),h+=r,await _D(l,i.verifyMethod?"Verification: "+i.verifyMethod:"",h,t.labelStyle)):(e=await _D(l,a.type?"Type: "+a.type:"",h,t.labelStyle),h+=e,await _D(l,a.docRef?"Doc Ref: "+a.docRef:"",h,t.labelStyle)),(l.node()?.getBBox().width??200)+20),p=(l.node()?.getBBox().height??200)+20,g=-d/2,f=-p/2,m=FI.svg(l),y=LN(t,{}),v=("handDrawn"!==t.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(g,f,d,p,y)),x=l.insert(()=>v,":first-child");if(x.attr("class","basic label-container").attr("style",n),l.selectAll(".label").each((e,t,r)=>{let n=H(r[t]),i=n.attr("transform"),a=0,s=0,o=(i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(r[1]),s=parseFloat(r[2])),s-p/2),l=10+g;0!==t&&1!==t||(l=a),n.attr("transform",`translate(${l}, ${20+o})`)}),h>c+u+20){let e=m.line(g,f+c+u+20,g+d,f+c+u+20,y);l.insert(()=>e).attr("style",n)}return aN(t,x),t.intersect=function(e){return EN.rect(t,e)},l}async function _D(e,t,r,n=""){if(""===t)return 0;let i=e.insert("g").attr("class","label").attr("style",n),a=D(),s=a.htmlLabels??!0,o=await QL(i,_h(rS(t)),{width:CC(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),l;if(s)e=o.children[0],t=H(o),l=e.getBoundingClientRect(),t.attr("width",l.width),t.attr("height",l.height);else{var c;for(c of o.children[0].children)c.textContent=c.textContent.replaceAll(">",">").replaceAll("<","<"),n&&c.setAttribute("style",n);(l=o.getBBox()).height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}var AD=e(()=>{i(),RN(),MN(),zI(),iS(),Eu(),JL(),a6(),mt(SD,"requirementBox"),mt(_D,"addText")});async function LD(e,n,{config:t}){var{labelStyles:i,nodeStyles:r}=V(n),i=(n.labelStyle=i||"",n.width);n.width=(n.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await nN(e,n,sN(n)),l=n.padding||10,c,h,u=("ticket"in n&&n.ticket&&t?.kanban?.ticketBaseUrl&&(c=t?.kanban?.ticketBaseUrl.replace("#TICKET#",n.ticket),h=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",c).attr("target","_blank")),{useHtmlLabels:n.useHtmlLabels,labelStyle:n.labelStyle||"",width:n.width,img:n.img,padding:n.padding||8,centerLabel:!1}),d,p;h?{label:d,bbox:p}=await iN(h,"ticket"in n&&n.ticket||"",u):{label:d,bbox:p}=await iN(a,"ticket"in n&&n.ticket||"",u);var{label:e,bbox:t}=await iN(a,"assigned"in n&&n.assigned||"",u),i=(n.width=i,n?.width||0),g=Math.max(p.height,t.height)/2,f=Math.max(s.height+20,n?.height||0)+g,m=-i/2,y=-f/2;o.attr("transform","translate("+(l-i/2)+", "+(-g-s.height/2)+")"),d.attr("transform","translate("+(l-i/2)+", "+(-g+s.height/2)+")"),e.attr("transform","translate("+(l+i/2-t.width-20)+", "+(-g+s.height/2)+")");let v,{rx:x,ry:b}=n,w=n.cssStyles;if("handDrawn"===n.look){let e=FI.svg(a),t=LN(n,{}),r=x||b?e.path(FR(m,y,i,f,x||0),t):e.rectangle(m,y,i,f,t);(v=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",w||null)}else(v=a.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",r).attr("rx",x??5).attr("ry",b??5).attr("x",m).attr("y",y).attr("width",i).attr("height",f),(e="priority"in n&&n.priority)&&(t=a.append("line"),g=2+m,r=y+Math.floor((x??0)/2),i=y+f-Math.floor((x??0)/2),t.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",i).attr("stroke-width","4").attr("stroke",ND(e)));return aN(n,v),n.height=f,n.intersect=function(e){return EN.rect(n,e)},a}var ND,ID=e(()=>{i(),RN(),GR(),MN(),zI(),ND=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(LD,"kanbanItem")});function RD(e){return e in OD}var MD,DD,OD,PD,BD,$D,FD,zD,GD,UD,qD,jD,WD,YD,HD,VD=e(()=>{UI(),WI(),XI(),ZI(),JI(),rR(),aR(),lR(),uR(),pR(),vR(),bR(),kR(),ER(),SR(),AR(),NR(),MR(),OR(),BR(),zR(),qR(),WR(),HR(),XR(),JR(),tM(),nM(),aM(),hM(),dM(),gM(),mM(),vM(),wM(),TM(),NM(),RM(),DM(),PM(),$M(),zM(),UM(),jM(),YM(),VM(),KM(),QM(),eD(),aD(),oD(),cD(),uD(),pD(),fD(),yD(),bD(),CD(),AD(),ID(),MD=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:BM},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:IM},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:FM},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:HM},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:gR},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:QI},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:xM},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:IR},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:rM},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:eM},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:sD},{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:VR},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:wR},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:JM},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:VI},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:MM},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:WM},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:qM},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:_R},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:DR},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:iR},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:oR},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:hR},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:iM},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:dD},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:LR},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tD},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:sM},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:dR},{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:hD},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:mD},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:TR},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:lD},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:CR},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:OM},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:fM},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:pM},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:jI},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tR},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ZM},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:XM},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:gD},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:kM},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:uM}],DD=mt(()=>{var e=[...Object.entries({state:GM,choice:KI,note:yM,rectWithTitle:LM,labelRect:QR,iconSquare:jR,iconCircle:$R,icon:PR,iconRounded:UR,imageSquare:YR,anchor:GI,kanbanItem:LD,classBox:ED,erBox:vD,requirementBox:SD}),...MD.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap"),OD=DD(),mt(RD,"isValidShape")}),XD=e(()=>{a6(),F9(),Eu(),t(),VD(),iS(),lh(),Tu(),PD=class{constructor(){this.vertexCounter=0,this.config=D(),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=yh,this.setAccDescription=xh,this.setDiagramTitle=wh,this.getAccTitle=vh,this.getAccDescription=bh,this.getDiagramTitle=kh,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 L.sanitizeText(e,this.config)}lookUpDomId(e){for(var t of this.vertices.values())if(t.id===e)return t.domId;return e}addVertex(n,i,a,s,o,l,c={},e){if(n&&0!==n.trim().length){let r;var t;if(void 0!==e&&(t=e.includes(`
|
||
`)?e+`
|
||
`:`{
|
||
`+e+`
|
||
}`,r=$9(t,{schema:B9})),e=this.edges.find(e=>e.id===n))void 0!==(t=r)?.animate&&(e.animate=t.animate),void 0!==t?.animation&&(e.animation=t.animation);else{let e,t=this.vertices.get(n);if(void 0===t&&(t={id:n,labelType:"text",domId:"flowchart-"+n+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(n,t)),this.vertexCounter++,void 0!==i?(this.config=D(),e=this.sanitizeText(i.text.trim()),t.labelType=i.type,e.startsWith('"')&&e.endsWith('"')&&(e=e.substring(1,e.length-1)),t.text=e):void 0===t.text&&(t.text=n),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(!RD(r.shape))throw new Error(`No such shape: ${r.shape}.`);t.type=r?.shape}r?.label&&(t.text=r?.label),r?.icon&&(t.icon=r?.icon,!r.label?.trim())&&t.text===n&&(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===n&&(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,n){let i={start:e,end:t,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(M.info("abc78 Got edge...",i),void 0!==(e=r.text)&&(i.text=this.sanitizeText(e.text.trim()),i.text.startsWith('"')&&i.text.endsWith('"')&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=e.type),void 0!==r&&(i.type=r.type,i.stroke=r.stroke,i.length=10<r.length?10:r.length),n&&!this.edges.some(e=>e.id===n)?(i.id=n,i.isUserDefinedId=!0):0===(t=this.edges.filter(e=>e.start===i.start&&e.end===i.end)).length?i.id=nS(i.start,i.end,{counter:0,prefix:"L"}):i.id=nS(i.start,i.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.`);M.info("Pushing edge..."),this.edges.push(i)}isLinkData(e){return null!==e&&"object"==typeof e&&"id"in e&&"string"==typeof e.id}addLink(e,t,r){var n,i=this.isLinkData(r)?r.id.replace("@",""):void 0;M.info("addLink",e,t,i);for(n of e)for(var a of t){var s=n===e[e.length-1],o=a===t[0];s&&o?this.addSingleLink(n,a,r,i):this.addSingleLink(n,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 n=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)),n?.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,/.*</.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 n=this.vertices.get(t);n&&n.classes.push(r),(n=this.edges.find(e=>e.id===t))&&n.classes.push(r),(n=this.subGraphLookup.get(t))&&n.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(e,t,n){let i=this.lookUpDomId(e);if("loose"===D().securityLevel&&void 0!==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(e),(n=this.vertices.get(e))&&(n.haveCallback=!0,this.funs.push(()=>{var e=document.querySelector(`[id="${i}"]`);null!==e&&e.addEventListener("click",()=>{eS.runFunc(t,...r)},!1)}))}}setLink(e,t,r){e.split(",").forEach(e=>{void 0!==(e=this.vertices.get(e))&&(e.link=eS.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 r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t=H(e.currentTarget);null!==t.attr("title")&&(e=e.currentTarget?.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(t.attr("title")).style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"<br/>")),t.classed("hover",!0))}).on("mouseout",e=>{r.transition().duration(500).style("opacity",0),H(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.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=D(),mh()}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 n=e.text.trim(),i=r.text;e===r&&/\s/.exec(r.text)&&(n=void 0);var a=(e=mt(e=>{let r={boolean:{},number:{},string:{}},n=[],i;return{nodeList:e.filter(function(e){var t=typeof e;return e.stmt&&"dir"===e.stmt?(i=e.value,!1):""!==e.trim()&&(t in r?!r[t].hasOwnProperty(e)&&(r[t][e]=!0):!n.includes(e)&&n.push(e))}),dir:i}},"uniq")(t.flat())).nodeList,t=e.dir,e=D().flowchart??{},t=t??(e.inheritDir?this.getDirection()??D().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 n=n??"subGraph"+this.subCount,i=this.sanitizeText(i=i||""),this.subCount=this.subCount+1,e={id:n,nodes:a,title:i.trim(),classes:[],dir:t,labelType:r.type},M.info("Adding",e.id,e.nodes,e.dir),e.nodes=this.makeUniq(e,this.subGraphs).nodes,this.subGraphs.push(e),this.subGraphLookup.set(n,e),n}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 n=0,i=1;for(;n<r.length;){var a=this.getPosForId(r[n]);if(0<=a){if((a=this.indexNodes2(e,a)).result)return{result:!0,count:i+a.count};i+=a.count}n+=1}return{result:!1,count:i}}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 n="normal";return t.includes("=")&&(n="thick"),t.includes(".")&&(n="dotted"),{type:r,stroke:n}}countChar(t,r){let n=r.length,i=0;for(let e=0;e<n;++e)r[e]===t&&++i;return i}destructEndLink(e){let t=e.trim(),r=t.slice(0,-1),n="arrow_open";switch(t.slice(-1)){case"x":n="arrow_cross",t.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",t.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",t.startsWith("o")&&(n="double_"+n,r=r.slice(1))}let i="normal",a=r.length-1;return r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible"),(e=this.countChar(".",r))&&(i="dotted",a=e),{type:n,stroke:i,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,n){let i=[];return r.nodes.forEach((e,t)=>{this.exists(n,e)||i.push(r.nodes[t])}),{nodes:i}}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,n,i,a){var r=r.get(e.id),n=n.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,labelStyle:"",parentId:r,padding:i.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},n?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=D(),t=[],s=[],r=this.getSubGraphs(),n=new Map,i=new Map;for(let e=r.length-1;0<=e;e--){var o,l=r[e];0<l.nodes.length&&i.set(l.id,!0);for(o of l.nodes)n.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:"",parentId:n.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,n,i,a,a.look||"classic")});let h=this.getEdges();return h.forEach((e,t)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=this.destructEdgeType(e.type),i=[...h.defaultStyle??[]],t=(e.style&&i.push(...e.style),{id:nS(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,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":n,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:i,style:i,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 Sh.flowchart}}}),KD=e(()=>{a6(),BD=mt((e,t)=>{let r;return"sandbox"===t&&(r=H("#i"+e)),H("sandbox"===t?r.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)},"getDiagramElement")}),ZD=e(()=>{$D=mt(({flowchart:e})=>{var t=e?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:e=e?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:t+e}},"getSubGraphTitleMargins")}),QD=e(()=>{Eu(),lh(),t(),ZD(),a6(),zI(),JL(),IN(),AM(),GR(),MN(),FD=mt(async(n,i)=>{M.info("Creating subgraph rect for ",i.id,i);let e=D(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Uc(e.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await QL(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();Uc(e.flowchart.htmlLabels)&&(n=g.children[0],m=H(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;M.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let e=FI.svg(u),t=LN(i,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=e.path(FR(y,v,n,m,0),t);(x=u.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=$D(e).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(e){return TN(i,e)},{cluster:u,labelBBox:f}},"rect"),zD=mt((e,t)=>{var r=(e=e.insert("g").attr("class","note-cluster").attr("id",t.id)).insert("rect",":first-child"),n=0*t.padding,i=n/2,i=(r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-i).attr("y",t.y-t.height/2-i).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none"),r.node().getBBox());return t.width=i.width,t.height=i.height,t.intersect=function(e){return TN(t,e)},{cluster:e,labelBBox:{width:0,height:0}}},"noteGroup"),GD=mt(async(i,a)=>{let e=D(),{themeVariables:t,handDrawnSeed:s}=e,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=t,u=i.insert("g").attr("class",a.cssClasses).attr("id",a.id).attr("data-id",a.id).attr("data-look",a.look),r=u.insert("g",":first-child"),n=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=n.node().appendChild(await _M(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();Uc(e.flowchart.htmlLabels)&&(i=p.children[0],f=H(p),g=i.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(i=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+i,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+i),i=a.height+i-g.height-6,v=a.x-m/2,x=a.y-y/2;a.width=m;let b=a.y-a.height/2-f+g.height+2,w;if("handDrawn"===a.look){let e=a.cssClasses.includes("statediagram-cluster-alt"),t=FI.svg(u),r=a.rx||a.ry?t.path(FR(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):t.rectangle(v,x,m,y,{seed:s}),n=(w=u.insert(()=>r,":first-child"),t.rectangle(v,b,m,i,{fill:e?o:l,fillStyle:e?"hachure":"solid",stroke:h,seed:s}));w=u.insert(()=>r,":first-child"),d=u.insert(()=>n)}else(w=r.insert("rect",":first-child")).attr("class","outer").attr("x",v).attr("y",x).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",b).attr("width",m).attr("height",i);return n.attr("transform",`translate(${a.x-g.width/2}, ${1+x-(Uc(e.flowchart.htmlLabels)?0:3)})`),f=w.node().getBBox(),a.height=f.height,a.offsetX=0,a.offsetY=g.height-a.padding/2,a.labelBBox=g,a.intersect=function(e){return TN(a,e)},{cluster:u,labelBBox:g}},"roundedWithTitle"),UD=mt(async(n,i)=>{M.info("Creating subgraph rect for ",i.id,i);let e=D(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Uc(e.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await QL(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0,width:i.width}),f=g.getBBox();Uc(e.flowchart.htmlLabels)&&(n=g.children[0],m=H(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;M.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let e=FI.svg(u),t=LN(i,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=e.path(FR(y,v,n,m,i.rx),t);(x=u.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=$D(e).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(e){return TN(i,e)},{cluster:u,labelBBox:f}},"kanbanSection"),qD=mt((t,r)=>{var{themeVariables:n,handDrawnSeed:i}=D(),n=n.nodeBorder,e=(t=t.insert("g").attr("class",r.cssClasses).attr("id",r.id).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=FI.svg(t).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:i});c=t.insert(()=>e,":first-child")}else(c=e.insert("rect",":first-child")).attr("class","divider").attr("x",o).attr("y",l).attr("width",s).attr("height",a).attr("data-look",r.look);return n=c.node().getBBox(),r.height=n.height,r.offsetX=0,r.offsetY=0,r.intersect=function(e){return TN(r,e)},{cluster:t,labelBBox:{}}},"divider"),jD={rect:FD,squareRect:FD,roundedWithTitle:GD,noteGroup:zD,divider:qD,kanbanSection:UD},WD=new Map,YD=mt(async(e,t)=>{var r=t.shape||"rect",r=await jD[r](e,t);return WD.set(t.id,r),r},"insertCluster"),HD=mt(()=>{WD=new Map},"clear")});function JD(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=tO(e),t=tO(t);var[e,r]=[e.x,e.y],[t,n]=[t.x,t.y],t=t-e,e=n-r;return{angle:Math.atan(e/t),deltaX:t,deltaY:e}}var eO,tO,rO,nO,iO,aO,sO=e(()=>{eO={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},mt(JD,"calculateDeltaAndAngle"),tO=mt(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),rO=mt(c=>({x:mt(function(e,t,r){let n=0,i=tO(r[0]).x<tO(r[r.length-1]).x?"left":"right";0===t&&Object.hasOwn(eO,c.arrowTypeStart)?({angle:a,deltaX:s}=JD(r[0],r[1]),n=eO[c.arrowTypeStart]*Math.cos(a)*(0<=s?1:-1)):t===r.length-1&&Object.hasOwn(eO,c.arrowTypeEnd)&&({angle:a,deltaX:s}=JD(r[r.length-1],r[r.length-2]),n=eO[c.arrowTypeEnd]*Math.cos(a)*(0<=s?1:-1));var t=Math.abs(tO(e).x-tO(r[r.length-1]).x),a=Math.abs(tO(e).y-tO(r[r.length-1]).y),s=Math.abs(tO(e).x-tO(r[0]).x),r=Math.abs(tO(e).y-tO(r[0]).y),o=eO[c.arrowTypeStart],l=eO[c.arrowTypeEnd];return t<l&&0<t&&a<l&&(a=l+1-t,a*="right"==i?-1:1,n-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="right"==i?-1:1,n+=l),tO(e).x+n},"x"),y:mt(function(e,t,r){let n=0,i=tO(r[0]).y<tO(r[r.length-1]).y?"down":"up";0===t&&Object.hasOwn(eO,c.arrowTypeStart)?({angle:a,deltaY:s}=JD(r[0],r[1]),n=eO[c.arrowTypeStart]*Math.abs(Math.sin(a))*(0<=s?1:-1)):t===r.length-1&&Object.hasOwn(eO,c.arrowTypeEnd)&&({angle:a,deltaY:s}=JD(r[r.length-1],r[r.length-2]),n=eO[c.arrowTypeEnd]*Math.abs(Math.sin(a))*(0<=s?1:-1));var t=Math.abs(tO(e).y-tO(r[r.length-1]).y),a=Math.abs(tO(e).x-tO(r[r.length-1]).x),s=Math.abs(tO(e).y-tO(r[0]).y),r=Math.abs(tO(e).x-tO(r[0]).x),o=eO[c.arrowTypeStart],l=eO[c.arrowTypeEnd];return t<l&&0<t&&a<l&&(a=l+1-t,a*="up"==i?-1:1,n-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="up"==i?-1:1,n+=l),tO(e).y+n},"y")}),"getLineFunctionsWithOffset")}),oO=e(()=>{t(),nO=mt((e,t,r,n,i,a)=>{t.arrowTypeStart&&aO(e,"start",t.arrowTypeStart,r,n,i,a),t.arrowTypeEnd&&aO(e,"end",t.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),iO={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},aO=mt((e,t,r,n,i,a,s)=>{let o=iO[r],l,c;o?(i=i+`_${a}-`+o.type+("start"===t?"Start":"End"),s&&""!==s.trim()?(a=i+"_"+s.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(l=document.getElementById(i))&&((c=l.cloneNode(!0)).id=a,c.querySelectorAll("path, circle, line").forEach(e=>{e.setAttribute("stroke",s),o.fill&&e.setAttribute("fill",s)}),l.parentNode?.appendChild(c)),e.attr("marker-"+t,`url(${n}#${a})`)):e.attr("marker-"+t,`url(${n}#${i})`)):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function lO(e,t){D().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}function cO(t){var r=[],n=[];for(let e=1;e<t.length-1;e++){var i=t[e-1],a=t[e],s=t[e+1];(i.x===a.x&&a.y===s.y&&5<Math.abs(a.x-s.x)&&5<Math.abs(a.y-i.y)||i.y===a.y&&a.x===s.x&&5<Math.abs(a.x-i.x)&&5<Math.abs(a.y-s.y))&&(r.push(a),n.push(e))}return{cornerPoints:r,cornerPointPositions:n}}var hO,uO,dO,pO,gO,fO,mO,yO,vO,xO,bO,wO,kO,TO,EO,CO,SO,_O,AO,LO,NO,IO,RO,MO,DO,OO,PO,BO,$O,FO,zO=e(()=>{Eu(),lh(),t(),JL(),iS(),sO(),ZD(),a6(),zI(),AM(),oO(),MN(),hO=new Map,uO=new Map,dO=mt(()=>{hO.clear(),uO.clear()},"clear"),pO=mt(e=>e?e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),gO=mt(async(e,t)=>{var r,n=Uc(D().flowchart.htmlLabels),i=await QL(e,t.label,{style:pO(t.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1}),a=(M.info("abc82",t,t.labelType),e.insert("g").attr("class","edgeLabel")),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();n&&(n=i.children[0],r=H(i),o=n.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),hO.set(t.id,a),t.width=o.width,t.height=o.height;let l;return t.startLabelLeft&&(n=await _M(t.startLabelLeft,pO(t.labelStyle)),s=(r=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a=n.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),uO.get(t.id)||uO.set(t.id,{}),uO.get(t.id).startLeft=r,lO(l,t.startLabelLeft)),t.startLabelRight&&(n=await _M(t.startLabelRight,pO(t.labelStyle)),a=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a.node().appendChild(n),r=n.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),uO.get(t.id)||uO.set(t.id,{}),uO.get(t.id).startRight=s,lO(l,t.startLabelRight)),t.endLabelLeft&&(n=await _M(t.endLabelLeft,pO(t.labelStyle)),r=(a=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(n),s=n.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(n),uO.get(t.id)||uO.set(t.id,{}),uO.get(t.id).endLeft=a,lO(l,t.endLabelLeft)),t.endLabelRight&&(r=await _M(t.endLabelRight,pO(t.labelStyle)),n=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=n.node().appendChild(r),a=r.getBBox(),n.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),uO.get(t.id)||uO.set(t.id,{}),uO.get(t.id).endRight=s,lO(l,t.endLabelRight)),i},"insertEdgeLabel"),mt(lO,"setTerminalWidth"),fO=mt((n,i)=>{M.debug("Moving label abc88 ",n.id,n.label,hO.get(n.id),i);var a,s=i.updatedPath||i.originalPath,o=D(),o=$D(o).subGraphTitleTotalMargin;if(n.label){let e=hO.get(n.id),t=n.x,r=n.y;s&&(a=eS.calcLabelPosition(s),M.debug("Moving label "+n.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(n.startLabelLeft){let e=uO.get(n.id).startLeft,t=n.x,r=n.y;s&&(i=eS.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.startLabelRight){let e=uO.get(n.id).startRight,t=n.x,r=n.y;s&&(a=eS.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelLeft){let e=uO.get(n.id).endLeft,t=n.x,r=n.y;s&&(o=eS.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelRight){let e=uO.get(n.id).endRight,t=n.x,r=n.y;s&&(i=eS.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),mO=mt((e,t)=>{var r=e.x,n=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-n);return e.width/2<=r||e.height/2<=t},"outsideNode"),yO=mt((e,n,i)=>{M.debug(`intersection calc abc89:
|
||
outsidePoint: ${JSON.stringify(n)}
|
||
insidePoint : ${JSON.stringify(i)}
|
||
node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-i.x),s=e.width/2,o=i.x<n.x?s-r:s+r,l=e.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x),u;if(Math.abs(t-n.y)*s>Math.abs(a-n.x)*l)return e=i.y<n.y?n.y-l-t:t-l-n.y,o=h*e/c,u={x:i.x<n.x?i.x+o:i.x-h+o,y:i.y<n.y?i.y+c-e:i.y-c+e},0===o&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),M.debug(`abc89 top/bottom calc, Q ${c}, q ${e}, R ${h}, r `+o,u),u;{let e=c*(o=i.x<n.x?n.x-s-a:a-s-n.x)/h,t=i.x<n.x?i.x+h-o:i.x-h+o,r=i.y<n.y?i.y+e:i.y-e;return M.debug(`sides calc abc89, Q ${c}, q ${e}, R ${h}, r `+o,{_x:t,_y:r}),0===o&&(t=n.x,r=n.y),0===h&&(t=n.x),0===c&&(r=n.y),{x:t,y:r}}},"intersection"),vO=mt((e,n)=>{M.warn("abc88 cutPathAtIntersect",e,n);let i=[],a=e[0],s=!1;return e.forEach(e=>{if(M.info("abc88 checking point",e,n),mO(n,e)||s)M.warn("abc88 outside",e,a),a=e,s||i.push(e);else{let t=yO(n,a,e),r=(M.debug("abc88 inside",e,a,t),M.debug("abc88 intersection",t,n),!1);i.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),i.some(e=>e.x===t.x&&e.y===t.y)?M.warn("abc88 no intersect",t,i):i.push(t),s=!0}}),M.debug("returning points",i),i},"cutPathAtIntersect"),mt(cO,"extractCornerPoints"),xO=mt(function(e,t,r){var n=t.x-e.x,e=t.y-e.y,r=r/Math.sqrt(n*n+e*e);return{x:t.x-r*n,y:t.y-r*e}},"findAdjacentPoint"),bO=mt(function(n){var e=cO(n).cornerPointPositions,i=[];for(let r=0;r<n.length;r++)if(e.includes(r)){var a=n[r-1],s=n[r+1],o=n[r],l=xO(a,o,5),c=xO(s,o,5),h=c.x-l.x,u=c.y-l.y;i.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)?(M.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}):M.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),i.push(t,c)}else i.push(n[r]);return i},"fixCorners"),wO=mt(function(n,i,e,t,r,a,s){let o=D().handDrawnSeed,l=i.points,c=!1,h=r,u=a;var d,p=[];for(d in i.cssCompiledStyles)AN(d)||p.push(i.cssCompiledStyles[d]);u.intersect&&h.intersect&&((l=l.slice(1,i.points.length-1)).unshift(h.intersect(l[0])),M.debug("Last point APA12",i.start,"--\x3e",i.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),i.toCluster&&(M.info("to cluster abc88",e.get(i.toCluster)),l=vO(i.points,e.get(i.toCluster).node),c=!0),i.fromCluster&&(M.debug("from cluster abc88",e.get(i.fromCluster),JSON.stringify(l,null,2)),l=vO(l.reverse(),e.get(i.fromCluster).node).reverse(),c=!0),r=l.filter(e=>!Number.isNaN(e.y)),r=bO(r);let g=x3;switch(g=Q5,i.curve){case"linear":g=Q5;break;case"basis":g=x3;break;case"cardinal":g=R3;break;case"bumpX":g=u3;break;case"bumpY":g=d3;break;case"catmullRom":g=U3;break;case"monotoneX":g=sw;break;case"monotoneY":g=ow;break;case"natural":g=uw;break;case"step":g=gw;break;case"stepAfter":g=mw;break;case"stepBefore":g=fw;break;default:g=x3}let{x:f,y:m}=rO(i),y=n3().x(f).y(m).curve(g),v;switch(i.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(i.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let x,b=y(r),w=Array.isArray(i.style)?i.style:i.style?[i.style]:[],k=w.find(e=>e?.startsWith("stroke:"));if("handDrawn"===i.look)a=FI.svg(n),Object.assign([],r),e=a.path(b,{roughness:.3,seed:o}),v+=" transition",r=(x=H(e).select("path").attr("id",i.id).attr("class"," "+v+(i.classes?" "+i.classes:"")).attr("style",w?w.reduce((e,t)=>e+";"+t,""):"")).attr("d"),x.attr("d",r),n.node().appendChild(x.node());else{let e=p.join(";"),t=w?w.reduce((e,t)=>e+t+";",""):"",r="";i.animate&&(r=" edge-animation-fast"),i.animation&&(r=" edge-animation-"+i.animation),a=e?e+";"+t+";":t,x=n.append("path").attr("d",b).attr("id",i.id).attr("class"," "+v+(i.classes?" "+i.classes:"")+(r??"")).attr("style",a),k=a.match(/stroke:([^;]+)/)?.[1]}let T="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(T=Gc(!0)),M.info("arrowTypeStart",i.arrowTypeStart),M.info("arrowTypeEnd",i.arrowTypeEnd),nO(x,i,T,s,t,k),e={},c&&(e.updatedPath=l),e.originalPath=i.points,e},"insertEdge")}),GO=e(()=>{t(),kO=mt((t,e,r,n)=>{e.forEach(e=>{$O[e](t,r,n)})},"insertMarkers"),TO=mt((e,t,r)=>{M.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"),EO=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"),CO=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"),SO=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"),_O=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"),AO=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")},"point"),LO=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"),NO=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"),IO=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"),RO=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"),MO=mt((e,t,r)=>{var n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18"),(n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),DO=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"),OO=mt((e,t,r)=>{var n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),PO=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"),BO=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"),$O={extension:TO,composition:EO,aggregation:CO,dependency:SO,lollipop:_O,point:AO,circle:LO,cross:NO,barb:IO,only_one:RO,zero_or_one:MO,one_or_more:DO,zero_or_more:OO,requirement_arrow:PO,requirement_contains:BO},FO=kO});async function UO(t,r,n){let i,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?OD[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let e;"sandbox"===n.config.securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e??null),a=await s(i,r,n)}else a=await s(t,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),qO.set(r.id,i),r.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var qO,jO,WO,YO,HO,VO=e(()=>{t(),VD(),qO=new Map,mt(UO,"insertNode"),jO=mt((e,t)=>{qO.set(t.id,e)},"setNodeElem"),WO=mt(()=>{qO.clear()},"clear"),YO=mt(e=>{var t=qO.get(e.id),r=(M.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")}),XO=e(()=>{Nn(),lh(),t(),QD(),zO(),GO(),VO(),i(),iS(),HO={common:L,getConfig:Ir,insertCluster:YD,insertEdge:wO,insertEdgeLabel:gO,insertMarkers:FO,insertNode:UO,interpolateToCurve:mC,labelHelper:nN,log:M,positionEdgeLabel:fO}});function KO(e){return"symbol"==typeof e||X7(e)&&"[object Symbol]"==_6(e)}var ZO,QO=e(()=>{A6(),K7(),mt(KO,"isSymbol"),ZO=KO});function JO(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var eP,tP=e(()=>{mt(JO,"arrayMap"),eP=JO});function rP(e){var t;return"string"==typeof e?e:i8(e)?eP(e,rP)+"":ZO(e)?aP?aP.call(e):"":"0"==(t=e+"")&&1/e==-nP?"-0":t}var nP,iP,aP,sP,oP=e(()=>{d6(),tP(),o8(),QO(),nP=1/0,iP=e6?e6.prototype:void 0,aP=iP?iP.toString:void 0,mt(rP,"baseToString"),sP=rP});function lP(e){for(var t=e.length;t--&&cP.test(e.charAt(t)););return t}var cP,hP,uP=e(()=>{cP=/\s/,mt(lP,"trimmedEndIndex"),hP=lP});function dP(e){return e&&e.slice(0,hP(e)+1).replace(pP,"")}var pP,gP,fP=e(()=>{uP(),pP=/^\s+/,mt(dP,"baseTrim"),gP=dP});function mP(e){if("number"==typeof e)return e;if(ZO(e))return yP;if(N6(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=N6(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=gP(e);var t=xP.test(e);return t||bP.test(e)?wP(e.slice(2),t?2:8):vP.test(e)?yP:+e}var yP,vP,xP,bP,wP,kP,TP=e(()=>{fP(),I6(),QO(),yP=NaN,vP=/^[-+]0x[0-9a-f]+$/i,xP=/^0b[01]+$/i,bP=/^0o[0-7]+$/i,wP=parseInt,mt(mP,"toNumber"),kP=mP});function EP(e){return e?(e=kP(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var CP,SP=e(()=>{TP(),mt(EP,"toFinite"),CP=EP});function _P(e){var t=(e=CP(e))%1;return e==e?t?e-t:e:0}var AP,LP,NP,IP=e(()=>{SP(),mt(_P,"toInteger"),AP=_P}),RP=e(()=>{lk(),u6(),LP=ak(Qw,"WeakMap"),NP=LP});function MP(){}var DP,OP=e(()=>{mt(MP,"noop"),DP=MP});function PP(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var BP,$P=e(()=>{mt(PP,"arrayEach"),BP=PP});function FP(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var zP,GP=e(()=>{mt(FP,"baseFindIndex"),zP=FP});function UP(e){return e!=e}var qP,jP=e(()=>{mt(UP,"baseIsNaN"),qP=UP});function WP(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var YP,HP=e(()=>{mt(WP,"strictIndexOf"),YP=WP});function VP(e,t,r){return t==t?YP(e,t,r):zP(e,qP,r)}var XP,KP=e(()=>{GP(),jP(),HP(),mt(VP,"baseIndexOf"),XP=VP});function ZP(e,t){return!(null==e||!e.length)&&-1<XP(e,t,0)}var QP,JP,eB,tB=e(()=>{KP(),mt(ZP,"arrayIncludes"),QP=ZP}),rB=e(()=>{F7(),JP=P7(Object.keys,Object),eB=JP});function nB(e){if(!q7(e))return eB(e);var t,r=[];for(t in Object(e))aB.call(e,t)&&"constructor"!=t&&r.push(t);return r}var iB,aB,sB,oB=e(()=>{j7(),rB(),iB=Object.prototype,aB=iB.hasOwnProperty,mt(nB,"baseKeys"),sB=nB});function lB(e){return(d8(e)?gE:sB)(e)}var cB,hB,uB,dB,pB=e(()=>{fE(),oB(),p8(),mt(lB,"keys"),cB=lB}),gB=e(()=>{eE(),nE(),gC(),p8(),j7(),pB(),uB=Object.prototype,hB=uB.hasOwnProperty,uB=uC(function(e,t){if(q7(t)||d8(t))rE(t,cB(t),e);else for(var r in t)hB.call(t,r)&&J8(e,r,t[r])}),dB=uB});function fB(e,t){var r;return!i8(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ZO(e))||yB.test(e)||!mB.test(e)||null!=t&&e in Object(t))}var mB,yB,vB,xB=e(()=>{o8(),QO(),mB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yB=/^\w*$/,mt(fB,"isKey"),vB=fB});function bB(e){var t=(e=MT(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}var wB,kB,TB,EB,CB,SB=e(()=>{DT(),mt(bB,"memoizeCapped"),wB=bB}),_B=e(()=>{SB(),kB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,TB=/\\(\\)?/g,EB=wB(function(e){var i=[];return 46===e.charCodeAt(0)&&i.push(""),e.replace(kB,function(e,t,r,n){i.push(r?n.replace(TB,"$1"):t||e)}),i}),CB=EB});function AB(e){return null==e?"":sP(e)}var LB,NB=e(()=>{oP(),mt(AB,"toString"),LB=AB});function IB(e,t){return i8(e)?e:vB(e,t)?[e]:CB(LB(e))}var RB,MB=e(()=>{o8(),xB(),_B(),NB(),mt(IB,"castPath"),RB=IB});function DB(e){var t;return"string"==typeof e||ZO(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}var OB,PB=e(()=>{QO(),mt(DB,"toKey"),OB=DB});function BB(e,t){for(var r=0,n=(t=RB(t,e)).length;null!=e&&r<n;)e=e[OB(t[r++])];return r&&r==n?e:void 0}var $B,FB=e(()=>{MB(),PB(),mt(BB,"baseGet"),$B=BB});function zB(e,t,r){return void 0===(e=null==e?void 0:$B(e,t))?r:e}var GB,UB=e(()=>{FB(),mt(zB,"get"),GB=zB});function qB(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var jB,WB=e(()=>{mt(qB,"arrayPush"),jB=qB});function YB(e){return i8(e)||r8(e)||!!(HB&&e&&e[HB])}var HB,VB,XB=e(()=>{d6(),s8(),o8(),HB=e6?e6.isConcatSpreadable:void 0,mt(YB,"isFlattenable"),VB=YB});function KB(e,t,r,n,i){var a=-1,s=e.length;for(r=r||VB,i=i||[];++a<s;){var o=e[a];0<t&&r(o)?1<t?KB(o,t-1,r,n,i):jB(i,o):n||(i[i.length]=o)}return i}var ZB,QB=e(()=>{WB(),XB(),mt(KB,"baseFlatten"),ZB=KB});function JB(e){return null!=e&&e.length?ZB(e,1):[]}var e$,t$=e(()=>{QB(),mt(JB,"flatten"),e$=JB});function r$(e){return tC(jE(e,void 0,e$),e+"")}var n$,i$=e(()=>{t$(),WE(),nC(),mt(r$,"flatRest"),n$=r$});function a$(e,t,r){var n=-1,i=e.length;(r=i<r?i:r)<0&&(r+=i),i=r<(t=t<0?i<-t?0:i+t:t)?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var s$,o$=e(()=>{mt(a$,"baseSlice"),s$=a$});function l$(e){return c$.test(e)}var c$,h$,u$=e(()=>{c$=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),mt(l$,"hasUnicode"),h$=l$});function d$(e,t,r,n){var i=-1,a=null==e?0:e.length;for(n&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r}var p$,g$=e(()=>{mt(d$,"arrayReduce"),p$=d$});function f$(e,t){return e&&rE(t,cB(t),e)}var m$,y$=e(()=>{nE(),pB(),mt(f$,"baseAssign"),m$=f$});function v$(e,t){return e&&rE(t,CE(t),e)}var x$,b$=e(()=>{nE(),SE(),mt(v$,"baseAssignIn"),x$=v$});function w$(e,t){for(var r=-1,n=null==e?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}var k$,T$=e(()=>{mt(w$,"arrayFilter"),k$=w$});function E$(){return[]}var C$,S$,_$,A$,L$,N$=e(()=>{mt(E$,"stubArray"),C$=E$}),I$=e(()=>{T$(),N$(),S$=Object.prototype,_$=S$.propertyIsEnumerable,L$=(A$=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),k$(A$(t),function(e){return _$.call(t,e)}))}:C$});function R$(e,t){return rE(e,L$(e),t)}var M$,D$,O$,P$=e(()=>{nE(),I$(),mt(R$,"copySymbols"),M$=R$}),B$=e(()=>{WB(),z7(),I$(),N$(),D$=Object.getOwnPropertySymbols,O$=D$?function(e){for(var t=[];e;)jB(t,L$(e)),e=$7(e);return t}:C$});function $$(e,t){return rE(e,O$(e),t)}var F$,z$=e(()=>{nE(),B$(),mt($$,"copySymbolsIn"),F$=$$});function G$(e,t,r){return t=t(e),i8(e)?t:jB(t,r(e))}var U$,q$=e(()=>{WB(),o8(),mt(G$,"baseGetAllKeys"),U$=G$});function j$(e){return U$(e,cB,L$)}var W$,Y$=e(()=>{q$(),I$(),pB(),mt(j$,"getAllKeys"),W$=j$});function H$(e){return U$(e,CE,O$)}var V$,X$,K$,Z$,Q$,J$,eF,tF,rF,nF,iF,aF,sF,oF,lF,cF,hF,uF,dF,pF=e(()=>{q$(),B$(),SE(),mt(H$,"getAllKeysIn"),V$=H$}),gF=e(()=>{lk(),u6(),X$=ak(Qw,"DataView"),K$=X$}),fF=e(()=>{lk(),u6(),Z$=ak(Qw,"Promise"),Q$=Z$}),mF=e(()=>{lk(),u6(),J$=ak(Qw,"Set"),eF=J$}),yF=e(()=>{gF(),sT(),fF(),mF(),RP(),A6(),Y6(),tF="[object Map]",rF="[object Promise]",nF="[object Set]",iF="[object WeakMap]",aF="[object DataView]",sF=W6(K$),oF=W6(iT),lF=W6(Q$),cF=W6(eF),hF=W6(NP),uF=_6,(K$&&uF(new K$(new ArrayBuffer(1)))!=aF||iT&&uF(new iT)!=tF||Q$&&uF(Q$.resolve())!=rF||eF&&uF(new eF)!=nF||NP&&uF(new NP)!=iF)&&(uF=mt(function(e){var t=_6(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?W6(e):"")switch(e){case sF:return aF;case oF:return tF;case lF:return rF;case cF:return nF;case hF:return iF}return t},"getTag")),dF=uF});function vF(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&bF.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var xF,bF,wF,kF=e(()=>{xF=Object.prototype,bF=xF.hasOwnProperty,mt(vF,"initCloneArray"),wF=vF});function TF(e,t){return t=t?E7(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength)}var EF,CF=e(()=>{C7(),mt(TF,"cloneDataView"),EF=TF});function SF(e){var t=new e.constructor(e.source,_F.exec(e));return t.lastIndex=e.lastIndex,t}var _F,AF,LF=e(()=>{_F=/\w*$/,mt(SF,"cloneRegExp"),AF=SF});function NF(e){return RF?Object(RF.call(e)):{}}var IF,RF,MF,DF=e(()=>{d6(),IF=e6?e6.prototype:void 0,RF=IF?IF.valueOf:void 0,mt(NF,"cloneSymbol"),MF=NF});function OF(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return E7(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return EF(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 _7(e,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return AF(e);case"[object Set]":return new n;case"[object Symbol]":return MF(e)}}var PF,BF=e(()=>{C7(),CF(),LF(),DF(),A7(),mt(OF,"initCloneByTag"),PF=OF});function $F(e){return X7(e)&&"[object Map]"==dF(e)}var FF,zF,GF,UF=e(()=>{yF(),K7(),mt($F,"baseIsMap"),FF=$F}),qF=e(()=>{UF(),j8(),W8(),zF=(zF=G8&&G8.isMap)?B8(zF):FF,GF=zF});function jF(e){return X7(e)&&"[object Set]"==dF(e)}var WF,YF,HF,VF=e(()=>{yF(),K7(),mt(jF,"baseIsSet"),WF=jF}),XF=e(()=>{VF(),j8(),W8(),YF=(YF=G8&&G8.isSet)?B8(YF):WF,HF=YF});function KF(r,n,i,e,t,a){var s,o=n&ZF,l=n&QF,c=n&JF;if(void 0===(s=i?t?i(r,e,t,a):i(r):s)){if(!N6(r))return r;if(e=i8(r)){if(s=wF(r),!o)return N7(r,s)}else{var h=dF(r),u=h==tz||h==rz;if(w8(r))return v7(r,o);if(h==nz||h==ez||u&&!t){if(s=l||u?{}:Y7(r),!o)return l?F$(r,x$(s,r)):M$(r,m$(s,r))}else{if(!iz[h])return t?r:{};s=PF(r,h,o)}}if(u=(a=a||new ZT).get(r))return u;a.set(r,s),HF(r)?r.forEach(function(e){s.add(KF(e,n,i,e,r,a))}):GF(r)&&r.forEach(function(e,t){s.set(t,KF(e,n,i,t,r,a))});var d=e?void 0:(c?l?V$:W$:l?CE:cB)(r);BP(d||r,function(e,t){d&&(e=r[t=e]),J8(s,t,KF(e,n,i,t,r,a))})}return s}var ZF,QF,JF,ez,tz,rz,nz,iz,az,sz=e(()=>{e7(),$P(),eE(),y$(),b$(),w7(),M7(),P$(),z$(),Y$(),pF(),yF(),kF(),BF(),H7(),o8(),T8(),qF(),I6(),XF(),pB(),SE(),ZF=1,QF=2,JF=4,tz="[object Function]",rz="[object GeneratorFunction]",nz="[object Object]",(iz={})[ez="[object Arguments]"]=iz["[object Array]"]=iz["[object ArrayBuffer]"]=iz["[object DataView]"]=iz["[object Boolean]"]=iz["[object Date]"]=iz["[object Float32Array]"]=iz["[object Float64Array]"]=iz["[object Int8Array]"]=iz["[object Int16Array]"]=iz["[object Int32Array]"]=iz["[object Map]"]=iz["[object Number]"]=iz[nz]=iz["[object RegExp]"]=iz["[object Set]"]=iz["[object String]"]=iz["[object Symbol]"]=iz["[object Uint8Array]"]=iz["[object Uint8ClampedArray]"]=iz["[object Uint16Array]"]=iz["[object Uint32Array]"]=!0,iz["[object Error]"]=iz[tz]=iz["[object WeakMap]"]=!1,mt(KF,"baseClone"),az=KF});function oz(e){return az(e,4)}var lz,cz=e(()=>{sz(),mt(oz,"clone"),lz=oz});function hz(e){return az(e,5)}var uz,dz=e(()=>{sz(),mt(hz,"cloneDeep"),uz=hz});function pz(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var a=e[t];a&&(i[n++]=a)}return i}var gz,fz=e(()=>{mt(pz,"compact"),gz=pz});function mz(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}var yz,vz=e(()=>{mt(mz,"setCacheAdd"),yz=mz});function xz(e){return this.__data__.has(e)}var bz,wz=e(()=>{mt(xz,"setCacheHas"),bz=xz});function kz(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new LT;++t<r;)this.add(e[t])}var Tz,Ez=e(()=>{NT(),vz(),wz(),mt(kz,"SetCache"),kz.prototype.add=kz.prototype.push=yz,kz.prototype.has=bz,Tz=kz});function Cz(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Sz,_z=e(()=>{mt(Cz,"arraySome"),Sz=Cz});function Az(e,t){return e.has(t)}var Lz,Nz=e(()=>{mt(Az,"cacheHas"),Lz=Az});function Iz(e,t,r,n,i,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 Tz: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=n?s?n(f,g,h,t,e,a):n(g,f,h,e,t,a):p)){if(p)continue;u=!1;break}if(d){if(!Sz(t,function(e,t){if(!Lz(d,t)&&(g===e||i(g,e,r,n,a)))return d.push(t)})){u=!1;break}}else if(g!==f&&!i(g,f,r,n,a)){u=!1;break}}return a.delete(e),a.delete(t),u}var Rz,Mz=e(()=>{Ez(),_z(),Nz(),mt(Iz,"equalArrays"),Rz=Iz});function Dz(e){var r=-1,n=Array(e.size);return e.forEach(function(e,t){n[++r]=[t,e]}),n}var Oz,Pz=e(()=>{mt(Dz,"mapToArray"),Oz=Dz});function Bz(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var $z,Fz=e(()=>{mt(Bz,"setToArray"),$z=Bz});function zz(e,t,r,n,i,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 b7(e),new b7(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Pk(+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=Oz;case"[object Set]":var l,o=o||$z;return!!(e.size==t.size||1&n)&&((l=s.get(e))?l==t:(n|=2,s.set(e,t),l=Rz(o(e),o(t),n,i,a,s),s.delete(e),l));case"[object Symbol]":if(Uz)return Uz.call(e)==Uz.call(t)}return!1}var Gz,Uz,qz,jz=e(()=>{d6(),k7(),Bk(),Mz(),Pz(),Fz(),Gz=e6?e6.prototype:void 0,Uz=Gz?Gz.valueOf:void 0,mt(zz,"equalByTag"),qz=zz});function Wz(e,t,r,n,i,a){var s=1&r,o=W$(e),l=o.length;if(l!=W$(t).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in t:Hz.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=n?s?n(y,m,h,t,e,a):n(m,y,h,e,t,a):f)?m===y||i(m,y,r,n,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 Yz,Hz,Vz,Xz=e(()=>{Y$(),Yz=Object.prototype,Hz=Yz.hasOwnProperty,mt(Wz,"equalObjects"),Vz=Wz});function Kz(e,t,r,n,i,a){var s=i8(e),o=i8(t),l=s?Qz:dF(e),o=o?Qz:dF(t),c=(l=l==Zz?Jz:l)==Jz,h=(o=o==Zz?Jz:o)==Jz;if((o=l==o)&&w8(e)){if(!w8(t))return!1;c=!(s=!0)}return o&&!c?(a=a||new ZT,s||q8(e)?Rz(e,t,r,n,i,a):qz(e,t,l,r,n,i,a)):1&r||(s=c&&tG.call(e,"__wrapped__"),l=h&&tG.call(t,"__wrapped__"),!s&&!l)?o&&(a=a||new ZT,Vz(e,t,r,n,i,a)):i(s?e.value():e,l?t.value():t,r,n,a=a||new ZT)}var Zz,Qz,Jz,eG,tG,rG,nG=e(()=>{e7(),Mz(),jz(),Xz(),yF(),o8(),T8(),Y8(),Zz="[object Arguments]",Qz="[object Array]",Jz="[object Object]",eG=Object.prototype,tG=eG.hasOwnProperty,mt(Kz,"baseIsEqualDeep"),rG=Kz});function iG(e,t,r,n,i){return e===t||(null==e||null==t||!X7(e)&&!X7(t)?e!=e&&t!=t:rG(e,t,r,n,iG,i))}var aG,sG=e(()=>{nG(),K7(),mt(iG,"baseIsEqual"),aG=iG});function oG(e,t,r,n){var i=r.length,a=i,s=!n;if(null==e)return!a;for(e=Object(e);i--;){var o=r[i];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){var l=(o=r[i])[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 ZT;if(!(void 0===(u=n?n(c,h,l,e,t,d):u)?aG(h,c,3,n,d):u))return!1}}return!0}var lG,cG=e(()=>{e7(),sG(),mt(oG,"baseIsMatch"),lG=oG});function hG(e){return e==e&&!N6(e)}var uG,dG=e(()=>{I6(),mt(hG,"isStrictComparable"),uG=hG});function pG(e){for(var t=cB(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,uG(i)]}return t}var gG,fG=e(()=>{dG(),pB(),mt(pG,"getMatchData"),gG=pG});function mG(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}var yG,vG=e(()=>{mt(mG,"matchesStrictComparable"),yG=mG});function xG(t){var r=gG(t);return 1==r.length&&r[0][2]?yG(r[0][0],r[0][1]):function(e){return e===t||lG(e,t,r)}}var bG,wG=e(()=>{cG(),fG(),vG(),mt(xG,"baseMatches"),bG=xG});function kG(e,t){return null!=e&&t in Object(e)}var TG,EG=e(()=>{mt(kG,"baseHasIn"),TG=kG});function CG(e,t,r){for(var n=-1,i=(t=RB(t,e)).length,a=!1;++n<i;){var s=OB(t[n]);if(!(a=null!=e&&r(e,s)))break;e=e[s]}return a||++n!=i?a:!!(i=null==e?0:e.length)&&c8(i)&&cE(s,i)&&(i8(e)||r8(e))}var SG,_G=e(()=>{MB(),s8(),o8(),hE(),h8(),PB(),mt(CG,"hasPath"),SG=CG});function AG(e,t){return null!=e&&SG(e,t,TG)}var LG,NG=e(()=>{EG(),_G(),mt(AG,"hasIn"),LG=AG});function IG(r,n){return vB(r)&&uG(n)?yG(OB(r),n):function(e){var t=GB(e,r);return void 0===t&&t===n?LG(e,r):aG(n,t,3)}}var RG,MG=e(()=>{sG(),UB(),NG(),xB(),dG(),vG(),PB(),mt(IG,"baseMatchesProperty"),RG=IG});function DG(t){return function(e){return e?.[t]}}var OG,PG=e(()=>{mt(DG,"baseProperty"),OG=DG});function BG(t){return function(e){return $B(e,t)}}var $G,FG=e(()=>{FB(),mt(BG,"basePropertyDeep"),$G=BG});function zG(e){return vB(e)?OG(OB(e)):$G(e)}var GG,UG=e(()=>{PG(),FG(),xB(),PB(),mt(zG,"property"),GG=zG});function qG(e){return"function"==typeof e?e:null==e?BE:"object"==typeof e?i8(e)?RG(e[0],e[1]):bG(e):GG(e)}var jG,WG=e(()=>{wG(),MG(),$E(),o8(),UG(),mt(qG,"baseIteratee"),jG=qG});function YG(e,t,r,n){for(var i=-1,a=null==e?0:e.length;++i<a;){var s=e[i];t(n,s,r(s),e)}return n}var HG,VG=e(()=>{mt(YG,"arrayAggregator"),HG=YG});function XG(e,t){return e&&u7(e,t,cB)}var KG,ZG=e(()=>{p7(),pB(),mt(XG,"baseForOwn"),KG=XG});function QG(a,s){return function(e,t){if(null!=e){if(!d8(e))return a(e,t);for(var r=e.length,n=s?r:-1,i=Object(e);(s?n--:++n<r)&&!1!==t(i[n],n,i););}return e}}var JG,eU,tU,rU=e(()=>{p8(),mt(QG,"createBaseEach"),JG=QG}),nU=e(()=>{ZG(),rU(),eU=JG(KG),tU=eU});function iU(e,n,i,a){return tU(e,function(e,t,r){n(a,e,i(e),r)}),a}var aU,sU=e(()=>{nU(),mt(iU,"baseAggregator"),aU=iU});function oU(i,a){return function(e,t){var r=i8(e)?HG:aU,n=a?a():{};return r(e,i,jG(t,2),n)}}var lU,cU,hU,uU,dU,pU,gU,fU=e(()=>{VG(),sU(),WG(),o8(),mt(oU,"createAggregator"),lU=oU}),mU=e(()=>{u6(),cU=mt(function(){return Qw.Date.now()},"now"),hU=cU}),yU=e(()=>{sC(),Bk(),cC(),SE(),uU=Object.prototype,dU=uU.hasOwnProperty,pU=aC(function(e,t){e=Object(e);var r=-1,n=t.length,i=2<n?t[2]:void 0;for(i&&lC(t[0],t[1],i)&&(n=1);++r<n;)for(var a=t[r],s=CE(a),o=-1,l=s.length;++o<l;){var c=s[o],h=e[c];(void 0===h||Pk(h,uU[c])&&!dU.call(e,c))&&(e[c]=a[c])}return e}),gU=pU});function vU(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var xU,bU=e(()=>{mt(vU,"arrayIncludesWith"),xU=vU});function wU(e,t,r,n){var i=-1,a=QP,s=!0,o=e.length,l=[],c=t.length;if(o){r&&(t=eP(t,B8(r))),n?(a=xU,s=!1):200<=t.length&&(a=Lz,s=!1,t=new Tz(t));e:for(;++i<o;){var h=e[i],u=null==r?h:r(h),h=n||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,n)||l.push(h)}}return l}var kU,TU,EU,CU=e(()=>{Ez(),tB(),bU(),tP(),j8(),Nz(),mt(wU,"baseDifference"),kU=wU}),SU=e(()=>{CU(),QB(),sC(),m8(),TU=aC(function(e,t){return f8(e)?kU(e,ZB(t,1,f8,!0)):[]}),EU=TU});function _U(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var AU,LU=e(()=>{mt(_U,"last"),AU=_U});function NU(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:AP(t),s$(e,t<0?0:t,n)):[]}var IU,RU=e(()=>{o$(),IP(),mt(NU,"drop"),IU=NU});function MU(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:AP(t),s$(e,0,(t=n-t)<0?0:t)):[]}var DU,OU=e(()=>{o$(),IP(),mt(MU,"dropRight"),DU=MU});function PU(e){return"function"==typeof e?e:BE}var BU,$U=e(()=>{$E(),mt(PU,"castFunction"),BU=PU});function FU(e,t){return(i8(e)?BP:tU)(e,BU(t))}var v,zU=e(()=>{$P(),nU(),$U(),o8(),mt(FU,"forEach"),v=FU}),GU=e(()=>{zU()});function UU(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var qU,jU=e(()=>{mt(UU,"arrayEvery"),qU=UU});function WU(e,n){var i=!0;return tU(e,function(e,t,r){return i=!!n(e,t,r)}),i}var YU,HU=e(()=>{nU(),mt(WU,"baseEvery"),YU=WU});function VU(e,t,r){var n=i8(e)?qU:YU;return r&&lC(e,t,r)&&(t=void 0),n(e,jG(t,3))}var XU,KU=e(()=>{jU(),HU(),WG(),o8(),cC(),mt(VU,"every"),XU=VU});function ZU(e,n){var i=[];return tU(e,function(e,t,r){n(e,t,r)&&i.push(e)}),i}var QU,JU=e(()=>{nU(),mt(ZU,"baseFilter"),QU=ZU});function eq(e,t){return(i8(e)?k$:QU)(e,jG(t,3))}var tq,rq=e(()=>{T$(),JU(),WG(),o8(),mt(eq,"filter"),tq=eq});function nq(a){return function(e,t,r){var n,i=Object(e);return d8(e)||(n=jG(t,3),e=cB(e),t=mt(function(e){return n(i[e],e,i)},"predicate")),-1<(t=a(e,t,r))?i[n?e[t]:t]:void 0}}var iq,aq=e(()=>{WG(),p8(),pB(),mt(nq,"createFind"),iq=nq});function sq(e,t,r){var n=null==e?0:e.length;return n?((r=null==r?0:AP(r))<0&&(r=oq(n+r,0)),zP(e,jG(t,3),r)):-1}var oq,lq,cq,hq,uq=e(()=>{GP(),WG(),IP(),oq=Math.max,mt(sq,"findIndex"),lq=sq}),dq=e(()=>{aq(),uq(),cq=iq(lq),hq=cq});function pq(e){return e&&e.length?e[0]:void 0}var gq,fq=e(()=>{mt(pq,"head"),gq=pq}),mq=e(()=>{fq()});function yq(e,n){var i=-1,a=d8(e)?Array(e.length):[];return tU(e,function(e,t,r){a[++i]=n(e,t,r)}),a}var vq,xq=e(()=>{nU(),p8(),mt(yq,"baseMap"),vq=yq});function bq(e,t){return(i8(e)?eP:vq)(e,jG(t,3))}var x,wq=e(()=>{tP(),WG(),xq(),o8(),mt(bq,"map"),x=bq});function kq(e,t){return ZB(x(e,t),1)}var Tq,Eq=e(()=>{QB(),wq(),mt(kq,"flatMap"),Tq=kq});function Cq(e,t){return null==e?e:u7(e,BU(t),CE)}var Sq,_q=e(()=>{p7(),$U(),SE(),mt(Cq,"forIn"),Sq=Cq});function Aq(e,t){return e&&KG(e,BU(t))}var Lq,Nq,Iq,Rq,Mq=e(()=>{ZG(),$U(),mt(Aq,"forOwn"),Lq=Aq}),Dq=e(()=>{i7(),fU(),Iq=Object.prototype,Nq=Iq.hasOwnProperty,Iq=lU(function(e,t,r){Nq.call(e,r)?e[r].push(t):n7(e,r,[t])}),Rq=Iq});function Oq(e,t){return t<e}var Pq,Bq=e(()=>{mt(Oq,"baseGt"),Pq=Oq});function $q(e,t){return null!=e&&zq.call(e,t)}var Fq,zq,Gq,Uq=e(()=>{Fq=Object.prototype,zq=Fq.hasOwnProperty,mt($q,"baseHas"),Gq=$q});function qq(e,t){return null!=e&&SG(e,t,Gq)}var jq,Wq=e(()=>{Uq(),_G(),mt(qq,"has"),jq=qq});function Yq(e){return"string"==typeof e||!i8(e)&&X7(e)&&"[object String]"==_6(e)}var Hq,Vq=e(()=>{A6(),o8(),K7(),mt(Yq,"isString"),Hq=Yq});function Xq(t,e){return eP(e,function(e){return t[e]})}var Kq,Zq=e(()=>{tP(),mt(Xq,"baseValues"),Kq=Xq});function Qq(e){return null==e?[]:Kq(e,cB(e))}var Jq,ej=e(()=>{Zq(),pB(),mt(Qq,"values"),Jq=Qq});function tj(e,t,r,n){return e=d8(e)?e:Jq(e),r=r&&!n?AP(r):0,n=e.length,r<0&&(r=rj(n+r,0)),Hq(e)?r<=n&&-1<e.indexOf(t,r):!!n&&-1<XP(e,t,r)}var rj,nj,ij=e(()=>{KP(),p8(),Vq(),IP(),ej(),rj=Math.max,mt(tj,"includes"),nj=tj});function aj(e,t,r){var n=null==e?0:e.length;return n?((r=null==r?0:AP(r))<0&&(r=sj(n+r,0)),XP(e,t,r)):-1}var sj,oj,lj=e(()=>{KP(),IP(),sj=Math.max,mt(aj,"indexOf"),oj=aj});function cj(e){if(null!=e){if(d8(e)&&(i8(e)||"string"==typeof e||"function"==typeof e.splice||w8(e)||q8(e)||r8(e)))return!e.length;var t,r=dF(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(q7(e))return!sB(e).length;for(t in e)if(uj.call(e,t))return!1}return!0}var hj,uj,dj,pj=e(()=>{oB(),yF(),s8(),o8(),p8(),T8(),j7(),Y8(),hj=Object.prototype,uj=hj.hasOwnProperty,mt(cj,"isEmpty"),dj=cj});function gj(e){return X7(e)&&"[object RegExp]"==_6(e)}var fj,mj,yj,vj=e(()=>{A6(),K7(),mt(gj,"baseIsRegExp"),fj=gj}),xj=e(()=>{vj(),j8(),W8(),mj=(mj=G8&&G8.isRegExp)?B8(mj):fj,yj=mj});function bj(e){return void 0===e}var wj,kj=e(()=>{mt(bj,"isUndefined"),wj=bj});function Tj(e,t){return e<t}var Ej,Cj=e(()=>{mt(Tj,"baseLt"),Ej=Tj});function Sj(e,n){var i={};return n=jG(n,3),KG(e,function(e,t,r){n7(i,t,n(e,t,r))}),i}var _j,Aj=e(()=>{i7(),ZG(),WG(),mt(Sj,"mapValues"),_j=Sj});function Lj(e,t,r){for(var n=-1,i=e.length;++n<i;){var a,s,o=e[n],l=t(o);null!=l&&(void 0===a?l==l&&!ZO(l):r(l,a))&&(a=l,s=o)}return s}var Nj,Ij=e(()=>{QO(),mt(Lj,"baseExtremum"),Nj=Lj});function Rj(e){return e&&e.length?Nj(e,BE,Pq):void 0}var Mj,Dj=e(()=>{Ij(),Bq(),$E(),mt(Rj,"max"),Mj=Rj});function Oj(e){return e&&e.length?Nj(e,BE,Ej):void 0}var Pj,Bj=e(()=>{Ij(),Cj(),$E(),mt(Oj,"min"),Pj=Oj});function $j(e,t){return e&&e.length?Nj(e,jG(t,2),Ej):void 0}var Fj,zj=e(()=>{Ij(),WG(),Cj(),mt($j,"minBy"),Fj=$j});function Gj(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var Uj,qj=e(()=>{mt(Gj,"negate"),Uj=Gj});function jj(e,t,r,n){if(N6(e))for(var i=-1,a=(t=RB(t,e)).length,s=a-1,o=e;null!=o&&++i<a;){var l,c=OB(t[i]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;i!=s&&(l=o[c],void 0===(h=n?n(l,c,o):void 0))&&(h=N6(l)?l:cE(t[i+1])?[]:{}),J8(o,c,h),o=o[c]}return e}var Wj,Yj=e(()=>{eE(),MB(),hE(),I6(),PB(),mt(jj,"baseSet"),Wj=jj});function Hj(e,t,r){for(var n=-1,i=t.length,a={};++n<i;){var s=t[n],o=$B(e,s);r(o,s)&&Wj(a,RB(s,e),o)}return a}var Vj,Xj=e(()=>{FB(),Yj(),MB(),mt(Hj,"basePickBy"),Vj=Hj});function Kj(e,r){var t;return null==e?{}:(t=eP(V$(e),function(e){return[e]}),r=jG(r),Vj(e,t,function(e,t){return r(e,t[0])}))}var Zj,Qj=e(()=>{tP(),WG(),Xj(),pF(),mt(Kj,"pickBy"),Zj=Kj});function Jj(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var eW,tW=e(()=>{mt(Jj,"baseSortBy"),eW=Jj});function rW(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=e==e,a=ZO(e),s=void 0!==t,o=null===t,l=t==t,c=ZO(t);if(!o&&!c&&!a&&t<e||a&&s&&l&&!o&&!c||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!c&&e<t||c&&r&&i&&!n&&!a||o&&r&&i||!s&&i||!l)return-1}return 0}var nW,iW=e(()=>{QO(),mt(rW,"compareAscending"),nW=rW});function aW(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,s=i.length,o=r.length;++n<s;){var l=nW(i[n],a[n]);if(l)return o<=n?l:l*("desc"==r[n]?-1:1)}return e.index-t.index}var sW,oW=e(()=>{iW(),mt(aW,"compareMultiple"),sW=aW});function lW(e,n,r){n=n.length?eP(n,function(t){return i8(t)?function(e){return $B(e,1===t.length?t[0]:t)}:t}):[BE];var i=-1,e=(n=eP(n,B8(jG)),vq(e,function(t,e,r){return{criteria:eP(n,function(e){return e(t)}),index:++i,value:t}}));return eW(e,function(e,t){return sW(e,t,r)})}var cW,hW,uW,dW=e(()=>{tP(),FB(),WG(),xq(),tW(),j8(),oW(),$E(),o8(),mt(lW,"baseOrderBy"),cW=lW}),pW=e(()=>{PG(),hW=OG("length"),uW=hW});function gW(e){for(var t=kW.lastIndex=0;kW.test(e);)++t;return t}var fW,mW,yW,vW,xW,bW,wW,kW,TW,EW=e(()=>{fW="["+(vW="\\ud800-\\udfff")+"]",mW="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",yW="\\ud83c[\\udffb-\\udfff]",wW="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",bW="[\\ufe0e\\ufe0f]?",xW="(?:\\u200d(?:"+[vW="[^"+vW+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+bW+wW+")*",bW=bW+wW+xW,wW="(?:"+[vW+mW+"?",mW,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",fW].join("|")+")",kW=RegExp(yW+"(?="+yW+")|"+wW+bW,"g"),mt(gW,"unicodeSize"),TW=gW});function CW(e){return(h$(e)?TW:uW)(e)}var SW,_W=e(()=>{pW(),u$(),EW(),mt(CW,"stringSize"),SW=CW});function AW(r,e){return Vj(r,e,function(e,t){return LG(r,t)})}var LW,NW,IW,RW=e(()=>{Xj(),NG(),mt(AW,"basePick"),LW=AW}),MW=e(()=>{RW(),i$(),NW=n$(function(e,t){return null==e?{}:LW(e,t)}),IW=NW});function DW(e,t,r,n){for(var i=-1,a=PW(OW((t-e)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=e,e+=r;return s}var OW,PW,BW,$W=e(()=>{OW=Math.ceil,PW=Math.max,mt(DW,"baseRange"),BW=DW});function FW(n){return function(e,t,r){return r&&"number"!=typeof r&&lC(e,t,r)&&(t=r=void 0),e=CP(e),void 0===t?(t=e,e=0):t=CP(t),r=void 0===r?e<t?1:-1:CP(r),BW(e,t,r,n)}}var zW,GW,UW,qW=e(()=>{$W(),cC(),SP(),mt(FW,"createRange"),zW=FW}),jW=e(()=>{qW(),GW=zW(),UW=GW});function WW(e,n,i,a,t){return t(e,function(e,t,r){i=a?(a=!1,e):n(i,e,t,r)}),i}var YW,HW=e(()=>{mt(WW,"baseReduce"),YW=WW});function VW(e,t,r){var n=i8(e)?p$:YW,i=arguments.length<3;return n(e,jG(t,4),r,i,tU)}var XW,KW=e(()=>{g$(),nU(),WG(),HW(),o8(),mt(VW,"reduce"),XW=VW});function ZW(e,t){return(i8(e)?k$:QU)(e,Uj(jG(t,3)))}var QW,JW=e(()=>{T$(),JU(),WG(),o8(),qj(),mt(ZW,"reject"),QW=ZW});function eY(e){var t;return null==e?0:d8(e)?Hq(e)?SW(e):e.length:"[object Map]"==(t=dF(e))||"[object Set]"==t?e.size:sB(e).length}var tY,rY=e(()=>{oB(),yF(),p8(),Vq(),_W(),mt(eY,"size"),tY=eY});function nY(e,n){var i;return tU(e,function(e,t,r){return!(i=n(e,t,r))}),!!i}var iY,aY=e(()=>{nU(),mt(nY,"baseSome"),iY=nY});function sY(e,t,r){var n=i8(e)?Sz:iY;return r&&lC(e,t,r)&&(t=void 0),n(e,jG(t,3))}var oY,lY,cY,hY,uY,dY=e(()=>{_z(),WG(),aY(),o8(),cC(),mt(sY,"some"),oY=sY}),pY=e(()=>{QB(),dW(),sC(),cC(),lY=aC(function(e,t){var r;return null==e?[]:(1<(r=t.length)&&lC(e,t[0],t[1])?t=[]:2<r&&lC(t[0],t[1],t[2])&&(t=[t[0]]),cW(e,ZB(t,1),[]))}),cY=lY}),gY=e(()=>{mF(),OP(),Fz(),hY=eF&&1/$z(new eF([,-0]))[1]==1/0?function(e){return new eF(e)}:DP,uY=hY});function fY(e,t,r){var n=-1,i=QP,a=e.length,s=!0,o=[],l=o;if(r)s=!1,i=xU;else if(200<=a){var c=t?null:uY(e);if(c)return $z(c);s=!1,i=Lz,l=new Tz}else l=t?[]:o;e:for(;++n<a;){var h=e[n],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 i(l,u,r)||(l!==o&&l.push(u),o.push(h))}return o}var mY,yY,vY,xY=e(()=>{Ez(),tB(),bU(),Nz(),gY(),Fz(),mt(fY,"baseUniq"),mY=fY}),bY=e(()=>{QB(),sC(),xY(),m8(),yY=aC(function(e){return mY(ZB(e,1,f8,!0))}),vY=yY});function wY(e){return e&&e.length?mY(e):[]}var kY,TY=e(()=>{xY(),mt(wY,"uniq"),kY=wY});function EY(e,t){return e&&e.length?mY(e,jG(t,2)):[]}var CY,SY=e(()=>{WG(),xY(),mt(EY,"uniqBy"),CY=EY});function _Y(e){var t=++AY;return LB(e)+t}var AY,LY,NY=e(()=>{NB(),AY=0,mt(_Y,"uniqueId"),LY=_Y});function IY(e,t,r){for(var n=-1,i=e.length,a=t.length,s={};++n<i;){var o=n<a?t[n]:void 0;r(s,e[n],o)}return s}var RY,MY=e(()=>{mt(IY,"baseZipObject"),RY=IY});function DY(e,t){return RY(e||[],t||[],J8)}var OY,PY=e(()=>{eE(),MY(),mt(DY,"zipObject"),OY=DY}),BY=e(()=>{gB(),cz(),dz(),fz(),XE(),yU(),SU(),RU(),OU(),GU(),KU(),rq(),dq(),mq(),Eq(),t$(),zU(),_q(),Mq(),Dq(),Wq(),$E(),ij(),lj(),o8(),pj(),P6(),I6(),xj(),Vq(),kj(),pB(),LU(),wq(),Aj(),Dj(),fC(),Bj(),zj(),OP(),mU(),MW(),Qj(),jW(),KW(),JW(),rY(),dY(),pY(),bY(),TY(),NY(),ej(),PY()});function $Y(e,t){e[t]?e[t]++:e[t]=1}function FY(e,t){--e[t]||delete e[t]}function zY(e,t,r,n){return t=""+t,r=""+r,!e&&r<t&&(e=t,t=r,r=e),t+""+r+""+(wj(n)?"\0":n)}function GY(e,t,r,n){return t=""+t,r=""+r,!e&&r<t&&(e=t,t=r,r=e),e={v:t,w:r},n&&(e.name=n),e}function UY(e,t){return zY(e,t.v,t.w,t.name)}var qY,jY,WY=e(()=>{BY(),qY="\0",(jY=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=HE(void 0),this._defaultEdgeLabelFn=HE(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[qY]={}),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 M6(e)||(e=HE(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return cB(this._nodes)}sources(){var t=this;return tq(this.nodes(),function(e){return dj(t._in[e])})}sinks(){var t=this;return tq(this.nodes(),function(e){return dj(t._out[e])})}setNodes(e,t){var r=arguments,n=this;return v(e,function(e){1<r.length?n.setNode(e,t):n.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]=qY,this._children[e]={},this._children[qY][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){var t;return Object.prototype.hasOwnProperty.call(this._nodes,e)&&(t=mt(e=>this.removeEdge(this._edgeObjs[e]),"removeEdge"),delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],v(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),v(cB(this._in[e]),t),delete this._in[e],delete this._preds[e],v(cB(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(wj(t))t=qY;else{for(var r=t+="";!wj(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&&(e=this._parent[e])!==qY)return e}children(e){var t;return wj(e)&&(e=qY),this._isCompound?(t=this._children[e])?cB(t):void 0:e===qY?this.nodes():this.hasNode(e)?[]:void 0}predecessors(e){if(e=this._preds[e])return cB(e)}successors(e){if(e=this._sucs[e])return cB(e)}neighbors(e){var t=this.predecessors(e);if(t)return vY(t,this.successors(e))}isLeaf(e){return 0===(e=this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(r){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),i=(n.setGraph(this.graph()),this),a=(v(this._nodes,function(e,t){r(t)&&n.setNode(t,e)}),v(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,i.edge(e))}),{});function s(e){var t=i.parent(e);return void 0===t||n.hasNode(t)?a[e]=t:t in a?a[t]:s(t)}return mt(s,"findParent"),this._isCompound&&v(n.nodes(),function(e){n.setParent(e,s(e))}),n}setDefaultEdgeLabel(e){return M6(e)||(e=HE(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Jq(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return XW(e,function(e,t){return 1<i.length?n.setEdge(e,t,r):n.setEdge(e,t),t}),this}setEdge(){var e,t,r=!1,n=("object"==typeof(n=arguments[0])&&null!==n&&"v"in n?(i=n.v,a=n.w,e=n.name,2===arguments.length&&(t=arguments[1],r=!0)):(i=n,a=arguments[1],e=arguments[3],2<arguments.length&&(t=arguments[2],r=!0)),i=""+i,a=""+a,wj(e)||(e=""+e),zY(this._isDirected,i,a,e));if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))r&&(this._edgeLabels[n]=t);else{if(!wj(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(a),this._edgeLabels[n]=r?t:this._defaultEdgeLabelFn(i,a,e);var i=(r=GY(this._isDirected,i,a,e)).v,a=r.w;Object.freeze(r),this._edgeObjs[n]=r,$Y(this._preds[a],i),$Y(this._sucs[i],a),this._in[a][n]=r,this._out[i][n]=r,this._edgeCount++}return this}edge(e,t,r){return e=1===arguments.length?UY(this._isDirected,e):zY(this._isDirected,e,t,r),this._edgeLabels[e]}hasEdge(e,t,r){return e=1===arguments.length?UY(this._isDirected,e):zY(this._isDirected,e,t,r),Object.prototype.hasOwnProperty.call(this._edgeLabels,e)}removeEdge(e,t,r){var r=1===arguments.length?UY(this._isDirected,arguments[0]):zY(this._isDirected,e,t,r),n=this._edgeObjs[r];return n&&(e=n.v,t=n.w,delete this._edgeLabels[r],delete this._edgeObjs[r],FY(this._preds[t],e),FY(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=Jq(e),t?tq(e,function(e){return e.v===t}):e}outEdges(e,t){if(e=this._out[e])return e=Jq(e),t?tq(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,jY.prototype._edgeCount=0,mt($Y,"incrementOrInitEntry"),mt(FY,"decrementOrRemoveEntry"),mt(zY,"edgeArgsToId"),mt(GY,"edgeArgsToObj"),mt(UY,"edgeObjToId")}),YY=e(()=>{WY()});function HY(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function VY(e,t){if("_next"!==e&&"_prev"!==e)return t}var XY,KY=e(()=>{XY=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 HY(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&HY(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,VY)),r=r._prev;return"["+e.join(", ")+"]"}},mt(HY,"unlink"),mt(VY,"filterOutLinks")});function ZY(t,e){return t.nodeCount()<=1?[]:(e=QY((e=eH(t,e||rH)).graph,e.buckets,e.zeroIdx),e$(x(e,function(e){return t.outEdges(e.v,e.w)})))}function QY(e,t,r){for(var n,i=[],a=t[t.length-1],s=t[0];e.nodeCount();){for(;n=s.dequeue();)JY(e,t,r,n);for(;n=a.dequeue();)JY(e,t,r,n);if(e.nodeCount())for(var o=t.length-2;0<o;--o)if(n=t[o].dequeue()){i=i.concat(JY(e,t,r,n,!0));break}}return i}function JY(n,i,a,e,s){var o=s?[]:void 0;return v(n.inEdges(e.v),function(e){var t=n.edge(e),r=n.node(e.v);s&&o.push({v:e.v,w:e.w}),r.out-=t,tH(i,a,r)}),v(n.outEdges(e.v),function(e){var t=n.edge(e),e=e.w;(e=n.node(e)).in-=t,tH(i,a,e)}),n.removeNode(e.v),o}function eH(e,n){var i=new jY,a=0,s=0,t=(v(e.nodes(),function(e){i.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var t=i.edge(e.v,e.w)||0,r=n(e);i.setEdge(e.v,e.w,t+r),s=Math.max(s,i.node(e.v).out+=r),a=Math.max(a,i.node(e.w).in+=r)}),UW(s+a+3).map(function(){return new XY})),r=a+1;return v(i.nodes(),function(e){tH(t,r,i.node(e))}),{graph:i,buckets:t,zeroIdx:r}}function tH(e,t,r){(r.out?r.in?e[r.out-r.in+t]:e[e.length-1]:e[0]).enqueue(r)}var rH,nH=e(()=>{BY(),YY(),KY(),rH=HE(1),mt(ZY,"greedyFAS"),mt(QY,"doGreedyFAS"),mt(JY,"removeNode"),mt(eH,"buildState"),mt(tH,"assignBucket")});function iH(r){var e="greedy"===r.graph().acyclicer?ZY(r,t(r)):aH(r);function t(t){return function(e){return t.edge(e).weight}}v(e,function(e){var t=r.edge(e);r.removeEdge(e),t.forwardName=e.name,t.reversed=!0,r.setEdge(e.w,e.v,t,LY("rev"))}),mt(t,"weightFn")}function aH(t){var r=[],n={},i={};function a(e){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,n[e]=!0,v(t.outEdges(e),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?r.push(e):a(e.w)}),delete n[e])}return mt(a,"dfs"),v(t.nodes(),a),r}function sH(n){v(n.edges(),function(e){var t,r=n.edge(e);r.reversed&&(n.removeEdge(e),t=r.forwardName,delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t))})}var oH=e(()=>{BY(),nH(),mt(iH,"run"),mt(aH,"dfsFAS"),mt(sH,"undo")});function lH(e,t,r,n){for(var i;i=LY(n),e.hasNode(i););return r.dummy=t,e.setNode(i,r),i}function cH(n){var i=(new jY).setGraph(n.graph());return v(n.nodes(),function(e){i.setNode(e,n.node(e))}),v(n.edges(),function(e){var t=i.edge(e.v,e.w)||{weight:0,minlen:1},r=n.edge(e);i.setEdge(e.v,e.w,{weight:t.weight+r.weight,minlen:Math.max(t.minlen,r.minlen)})}),i}function hH(t){var r=new jY({multigraph:t.isMultigraph()}).setGraph(t.graph());return v(t.nodes(),function(e){t.children(e).length||r.setNode(e,t.node(e))}),v(t.edges(),function(e){r.setEdge(e,t.edge(e))}),r}function uH(e,t){var r,n=e.x,i=e.y,a=t.x-n,t=t.y-i,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:n+r,y:i+e};throw new Error("Not possible to find intersection inside of the rectangle")}function dH(n){var i=x(UW(mH(n)+1),function(){return[]});return v(n.nodes(),function(e){var t=n.node(e),r=t.rank;wj(r)||(i[r][t.order]=e)}),i}function pH(t){var r=Pj(x(t.nodes(),function(e){return t.node(e).rank}));v(t.nodes(),function(e){e=t.node(e),jq(e,"rank")&&(e.rank-=r)})}function gH(r){var n=Pj(x(r.nodes(),function(e){return r.node(e).rank})),i=[],a=(v(r.nodes(),function(e){var t=r.node(e).rank-n;i[t]||(i[t]=[]),i[t].push(e)}),0),s=r.graph().nodeRankFactor;v(i,function(e,t){wj(e)&&t%s!=0?--a:a&&v(e,function(e){r.node(e).rank+=a})})}function fH(e,t,r,n){var i={width:0,height:0};return 4<=arguments.length&&(i.rank=r,i.order=n),lH(e,"border",i,t)}function mH(t){return Mj(x(t.nodes(),function(e){if(e=t.node(e).rank,!wj(e))return e}))}function yH(e,t){var r={lhs:[],rhs:[]};return v(e,function(e){(t(e)?r.lhs:r.rhs).push(e)}),r}function vH(e,t){var r=hU();try{return t()}finally{console.log(e+" time: "+(hU()-r)+"ms")}}function xH(e,t){return t()}var bH=e(()=>{BY(),YY(),mt(lH,"addDummyNode"),mt(cH,"simplify"),mt(hH,"asNonCompoundGraph"),mt(uH,"intersectRect"),mt(dH,"buildLayerMatrix"),mt(pH,"normalizeRanks"),mt(gH,"removeEmptyRanks"),mt(fH,"addBorderNode"),mt(mH,"maxRank"),mt(yH,"partition"),mt(vH,"time"),mt(xH,"notime")});function wH(a){function s(e){var t=a.children(e),r=a.node(e);if(t.length&&v(t,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var n=r.minRank,i=r.maxRank+1;n<i;++n)kH(a,"borderLeft","_bl",e,r,n),kH(a,"borderRight","_br",e,r,n)}}mt(s,"dfs"),v(a.children(),s)}function kH(e,t,r,n,i,a){var s=i[t][a-1],r=lH(e,"border",{width:0,height:0,rank:a,borderType:t},r);i[t][a]=r,e.setParent(r,n),s&&e.setEdge(s,r,{weight:1})}var TH=e(()=>{BY(),bH(),mt(wH,"addBorderSegments"),mt(kH,"addBorderNode")});function EH(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||SH(e)}function CH(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||AH(e),"lr"!==t&&"rl"!==t||(NH(e),SH(e))}function SH(t){v(t.nodes(),function(e){_H(t.node(e))}),v(t.edges(),function(e){_H(t.edge(e))})}function _H(e){var t=e.width;e.width=e.height,e.height=t}function AH(t){v(t.nodes(),function(e){LH(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,LH),Object.prototype.hasOwnProperty.call(e,"y")&&LH(e)})}function LH(e){e.y=-e.y}function NH(t){v(t.nodes(),function(e){IH(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,IH),Object.prototype.hasOwnProperty.call(e,"x")&&IH(e)})}function IH(e){var t=e.x;e.x=e.y,e.y=t}var RH=e(()=>{BY(),mt(EH,"adjust"),mt(CH,"undo"),mt(SH,"swapWidthHeight"),mt(_H,"swapWidthHeightOne"),mt(AH,"reverseY"),mt(LH,"reverseYOne"),mt(NH,"swapXY"),mt(IH,"swapXYOne")});function MH(t){t.graph().dummyChains=[],v(t.edges(),function(e){DH(t,e)})}function DH(e,t){var r=t.v,n=e.node(r).rank,i=t.w,a=e.node(i).rank,s=t.name,o=e.edge(t),l=o.labelRank;if(a!==n+1){e.removeEdge(t);var c,h=void 0,u=0;for(++n;n<a;++u,++n)o.points=[],c=lH(e,"edge",h={width:0,height:0,edgeLabel:o,edgeObj:t,rank:n},"_d"),n===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,i,{weight:o.weight},s)}}function OH(i){v(i.graph().dummyChains,function(e){var t,r=i.node(e),n=r.edgeLabel;for(i.setEdge(r.edgeObj,n);r.dummy;)t=i.successors(e)[0],i.removeNode(e),n.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),r=i.node(e=t)})}var PH=e(()=>{BY(),bH(),mt(MH,"run"),mt(DH,"normalizeEdge"),mt(OH,"undo")});function BH(r){var n={};function i(e){var t=r.node(e);return Object.prototype.hasOwnProperty.call(n,e)?t.rank:(n[e]=!0,(e=Pj(x(r.outEdges(e),function(e){return i(e.w)-r.edge(e).minlen})))!==Number.POSITIVE_INFINITY&&null!=e||(e=0),t.rank=e)}mt(i,"dfs"),v(r.sources(),i)}function $H(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var FH=e(()=>{BY(),mt(BH,"longestPath"),mt($H,"slack")});function zH(e){var t,r=new jY({directed:!1}),n=e.nodes()[0],i=e.nodeCount();for(r.setNode(n,{});GH(r,e)<i;)t=UH(r,e),t=r.hasNode(t.v)?$H(e,t):-$H(e,t),qH(r,e,t);return r}function GH(n,i){function a(r){v(i.nodeEdges(r),function(e){var t=e.v,t=r===t?e.w:t;n.hasNode(t)||$H(i,e)||(n.setNode(t,{}),n.setEdge(r,t,{}),a(t))})}return mt(a,"dfs"),v(n.nodes(),a),n.nodeCount()}function UH(t,r){return Fj(r.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return $H(r,e)})}function qH(e,t,r){v(e.nodes(),function(e){t.node(e).rank+=r})}var jH=e(()=>{BY(),YY(),FH(),mt(zH,"feasibleTree"),mt(GH,"tightTree"),mt(UH,"findMinSlackEdge"),mt(qH,"shiftRanks")}),WH=e(()=>{}),YH=e(()=>{}),HH=e(()=>{BY(),YH(),HE(1)}),VH=e(()=>{HH()}),XH=e(()=>{}),KH=e(()=>{XH()}),ZH=e(()=>{BY(),HE(1)});function QH(t){var r={},n={},i=[];function a(e){if(Object.prototype.hasOwnProperty.call(n,e))throw new JH;Object.prototype.hasOwnProperty.call(r,e)||(n[e]=!0,r[e]=!0,v(t.predecessors(e),a),delete n[e],i.push(e))}if(mt(a,"visit"),v(t.sinks(),a),tY(r)!==t.nodeCount())throw new JH;return i}function JH(){}var eV=e(()=>{BY(),QH.CycleException=JH,mt(QH,"topsort"),mt(JH,"CycleException"),JH.prototype=new Error}),tV=e(()=>{eV()});function rV(t,e,r){i8(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return v(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);nV(t,e,"post"===r,a,n,i)}),i}function nV(t,e,r,n,i,a){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||a.push(e),v(i(e),function(e){nV(t,e,r,n,i,a)}),r&&a.push(e))}var iV=e(()=>{BY(),mt(rV,"dfs"),mt(nV,"doDfs")});function aV(e,t){return rV(e,t,"post")}var sV=e(()=>{iV(),mt(aV,"postorder")});function oV(e,t){return rV(e,t,"pre")}var lV=e(()=>{iV(),mt(oV,"preorder")}),cV=e(()=>{YH(),WY()}),hV=e(()=>{WH(),HH(),VH(),KH(),ZH(),tV(),sV(),lV(),cV(),XH(),eV()});function uV(e){BH(e=cH(e));var t,r=zH(e);for(fV(r),dV(r,e);t=yV(r);)xV(r,e,t,vV(r,e,t))}function dV(t,r){var e=(e=aV(t,t.nodes())).slice(0,e.length-1);v(e,function(e){pV(t,r,e)})}function pV(e,t,r){var n=e.node(r).parent;e.edge(r,n).cutvalue=gV(e,t,r)}function gV(n,i,a){var s=n.node(a).parent,o=!0,e=i.edge(a,s),l=0;return e||(o=!1,e=i.edge(s,a)),l=e.weight,v(i.nodeEdges(a),function(e){var t=e.v===a,r=t?e.w:e.v;r!==s&&(t=t===o,e=i.edge(e).weight,l+=t?e:-e,wV(n,a,r))&&(e=n.edge(a,r).cutvalue,l+=t?-e:e)}),l}function fV(e,t){arguments.length<2&&(t=e.nodes()[0]),mV(e,{},1,t)}function mV(t,r,n,i,e){var a=n,s=t.node(i);return r[i]=!0,v(t.neighbors(i),function(e){Object.prototype.hasOwnProperty.call(r,e)||(n=mV(t,r,n,e,i))}),s.low=a,s.lim=n++,e?s.parent=e:delete s.parent,n}function yV(t){return hq(t.edges(),function(e){return t.edge(e).cutvalue<0})}function vV(t,r,e){var n=e.v,i=e.w,e=(r.hasEdge(n,i)||(n=e.w,i=e.v),t.node(n)),n=t.node(i),a=e,s=!1,i=(e.lim>n.lim&&(a=n,s=!0),tq(r.edges(),function(e){return s===kV(0,t.node(e.v),a)&&s!==kV(0,t.node(e.w),a)}));return Fj(i,function(e){return $H(r,e)})}function xV(e,t,r,n){var i=r.v;e.removeEdge(i,r.w),e.setEdge(n.v,n.w,{}),fV(e),dV(e,t),bV(e,t)}function bV(i,a){var e=hq(i.nodes(),function(e){return!a.node(e).parent}),e=(e=oV(i,e)).slice(1);v(e,function(e){var t=i.node(e).parent,r=a.edge(e,t),n=!1;r||(r=a.edge(t,e),n=!0),a.node(e).rank=a.node(t).rank+(n?r.minlen:-r.minlen)})}function wV(e,t,r){return e.hasEdge(t,r)}function kV(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var TV=e(()=>{BY(),hV(),bH(),jH(),FH(),uV.initLowLimValues=fV,uV.initCutValues=dV,uV.calcCutValue=gV,uV.leaveEdge=yV,uV.enterEdge=vV,uV.exchangeEdges=xV,mt(uV,"networkSimplex"),mt(dV,"initCutValues"),mt(pV,"assignCutValue"),mt(gV,"calcCutValue"),mt(fV,"initLowLimValues"),mt(mV,"dfsAssignLowLim"),mt(yV,"leaveEdge"),mt(vV,"enterEdge"),mt(xV,"exchangeEdges"),mt(bV,"updateRanks"),mt(wV,"isTreeEdge"),mt(kV,"isDescendant")});function EV(e){switch(e.graph().ranker){case"network-simplex":SV(e);break;case"tight-tree":CV(e);break;case"longest-path":_V(e);break;default:SV(e)}}function CV(e){BH(e),zH(e)}function SV(e){uV(e)}var _V,AV=e(()=>{jH(),TV(),FH(),mt(EV,"rank"),_V=BH,mt(CV,"tightTreeRanker"),mt(SV,"networkSimplexRanker")});function LV(t){var r=lH(t,"root",{},"_root"),n=IV(t),i=Mj(Jq(n))-1,a=2*i+1,s=(t.graph().nestingRoot=r,v(t.edges(),function(e){t.edge(e).minlen*=a}),RV(t)+1);v(t.children(),function(e){NV(t,r,a,s,i,n,e)}),t.graph().nodeRankFactor=a}function NV(i,a,s,o,l,c,h){var u,d,e,t=i.children(h);t.length?(u=fH(i,"_bt"),d=fH(i,"_bb"),e=i.node(h),i.setParent(u,h),e.borderTop=u,i.setParent(d,h),e.borderBottom=d,v(t,function(e){NV(i,a,s,o,l,c,e);var t=i.node(e),r=t.borderTop||e,n=r!==(e=t.borderBottom||e)?1:l-c[h]+1;i.setEdge(u,r,{weight:t=t.borderTop?o:2*o,minlen:n,nestingEdge:!0}),i.setEdge(e,d,{weight:t,minlen:n,nestingEdge:!0})}),i.parent(h)||i.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&i.setEdge(a,h,{weight:0,minlen:s})}function IV(n){var i={};function a(e,t){var r=n.children(e);r&&r.length&&v(r,function(e){a(e,t+1)}),i[e]=t}return mt(a,"dfs"),v(n.children(),function(e){a(e,1)}),i}function RV(r){return XW(r.edges(),function(e,t){return e+r.edge(t).weight},0)}function MV(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,v(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}var DV=e(()=>{BY(),bH(),mt(LV,"run"),mt(NV,"dfs"),mt(IV,"treeDepths"),mt(RV,"sumWeights"),mt(MV,"cleanup")});function OV(i,a,e){var s,o={};v(e,function(e){for(var t,r,n=i.parent(e);n;){if((t=i.parent(n))?(r=o[t],o[t]=n):(r=s,s=n),r&&r!==n)return void a.setEdge(r,n);n=t}})}var PV=e(()=>{BY(),mt(OV,"addSubgraphConstraints")});function BV(i,r,a){var s=$V(i),o=new jY({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(e){return i.node(e)});return v(i.nodes(),function(n){var e=i.node(n),t=i.parent(n);(e.rank===r||e.minRank<=r&&r<=e.maxRank)&&(o.setNode(n),o.setParent(n,t||s),v(i[a](n),function(e){var t=e.v===n?e.w:e.v,r=o.edge(t,n),r=wj(r)?0:r.weight;o.setEdge(t,n,{weight:i.edge(e).weight+r})}),Object.prototype.hasOwnProperty.call(e,"minRank"))&&o.setNode(n,{borderLeft:e.borderLeft[r],borderRight:e.borderRight[r]})}),o}function $V(e){for(var t;e.hasNode(t=LY("_root")););return t}var FV=e(()=>{BY(),YY(),mt(BV,"buildLayerGraph"),mt($V,"createRootNode")});function zV(e,t){for(var r=0,n=1;n<t.length;++n)r+=GV(e,t[n-1],t[n]);return r}function GV(t,e,r){for(var n=OY(r,x(r,function(e,t){return t})),e=e$(x(e,function(e){return cY(x(t.outEdges(e),function(e){return{pos:n[e.w],weight:t.edge(e).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var a=2*i-1,s=(--i,x(new Array(a),function(){return 0})),o=0;return v(e.forEach(function(e){var t=e.pos+i;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 UV=e(()=>{BY(),mt(zV,"crossCount"),mt(GV,"twoLayerCrossCount")});function qV(r){var n={},e=tq(r.nodes(),function(e){return!r.children(e).length}),t=Mj(x(e,function(e){return r.node(e).rank})),i=x(UW(t+1),function(){return[]});function a(e){var t;jq(n,e)||(n[e]=!0,t=r.node(e),i[t.rank].push(e),v(r.successors(e),a))}return mt(a,"dfs"),t=cY(e,function(e){return r.node(e).rank}),v(t,a),i}var jV=e(()=>{BY(),mt(qV,"initOrder")});function WV(n,e){return x(e,function(e){var t=n.inEdges(e);return t.length?{v:e,barycenter:(t=XW(t,function(e,t){var r=n.edge(t),t=n.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 YV=e(()=>{BY(),mt(WV,"barycenter")});function HV(e,t){var n={};return v(e,function(e,t){t=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t},wj(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),v(t.edges(),function(e){var t=n[e.v],r=n[e.w];wj(t)||wj(r)||(r.indegree++,t.out.push(n[e.w]))}),VV(tq(n,function(e){return!e.indegree}))}function VV(r){var e=[];function t(t){return function(e){e.merged||(wj(e.barycenter)||wj(t.barycenter)||e.barycenter>=t.barycenter)&&XV(t,e)}}function n(t){return function(e){e.in.push(t),0==--e.indegree&&r.push(e)}}for(mt(t,"handleIn"),mt(n,"handleOut");r.length;){var i=r.pop();e.push(i),v(i.in.reverse(),t(i)),v(i.out,n(i))}return x(tq(e,function(e){return!e.merged}),function(e){return IW(e,["vs","i","barycenter","weight"])})}function XV(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var KV=e(()=>{BY(),mt(HV,"resolveConflicts"),mt(VV,"doResolveConflicts"),mt(XV,"mergeEntries")});function ZV(e,t){var r=(e=yH(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})).lhs,n=cY(e.rhs,function(e){return-e.i}),i=[],a=0,s=0,o=0,e=(r.sort(JV(!!t)),o=QV(i,n,o),v(r,function(e){o+=e.vs.length,i.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,o=QV(i,n,o)}),{vs:e$(i)});return s&&(e.barycenter=a/s,e.weight=s),e}function QV(e,t,r){for(var n;t.length&&(n=AU(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function JV(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 eX=e(()=>{BY(),bH(),mt(ZV,"sort"),mt(QV,"consumeUnsortable"),mt(JV,"compareWithBias")});function tX(r,e,n,i){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=tq(a,function(e){return e!==s&&e!==o})),WV(r,a));return v(e,function(e){var t;r.children(e.v).length&&(t=tX(r,e.v,n,i),l[e.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter"))&&nX(e,t)}),rX(a=HV(e,n),l),e=ZV(a,i),s&&(e.vs=e$([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 rX(e,t){v(e,function(e){e.vs=e$(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function nX(e,t){wj(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 iX=e(()=>{BY(),YV(),KV(),eX(),mt(tX,"sortSubgraph"),mt(rX,"expandSubgraphs"),mt(nX,"mergeBarycenters")});function aX(e){var t=mH(e),r=sX(e,UW(1,t+1),"inEdges"),n=sX(e,UW(t-1,-1,-1),"outEdges");lX(e,qV(e));for(var i,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){oX(s%2?r:n,2<=s%4);var l,c=zV(e,l=dH(e));c<a&&(o=0,i=uz(l),a=c)}lX(e,i)}function sX(t,e,r){return x(e,function(e){return BV(t,e,r)})}function oX(e,t){var n=new jY;v(e,function(r){var e=r.graph().root,e=tX(r,e,n,t);v(e.vs,function(e,t){r.node(e).order=t}),OV(r,n,e.vs)})}function lX(r,e){v(e,function(e){v(e,function(e,t){r.node(e).order=t})})}var cX=e(()=>{BY(),YY(),bH(),PV(),FV(),UV(),jV(),iX(),mt(aX,"order"),mt(sX,"buildLayerGraphs"),mt(oX,"sweepLayerGraphs"),mt(lX,"assignOrder")});function hX(c){var h=dX(c);v(c.graph().dummyChains,function(e){for(var t,r=c.node(e).edgeObj,n=uX(c,h,r.v,r.w),i=n.path,a=n.lca,s=0,o=i[s],l=!0;e!==r.w;){if(t=c.node(e),l){for(;(o=i[s])!==a&&c.node(o).maxRank<t.rank;)s++;o===a&&(l=!1)}if(!l){for(;s<i.length-1&&c.node(o=i[s+1]).minRank<=t.rank;)s++;o=i[s]}c.setParent(e,o),e=c.successors(e)[0]}})}function uX(e,t,r,n){for(var i,a=[],s=[],o=Math.min(t[r].low,t[n].low),l=Math.max(t[r].lim,t[n].lim),c=r;c=e.parent(c),a.push(c),c&&(t[c].low>o||l>t[c].lim););for(i=c,c=n;(c=e.parent(c))!==i;)s.push(c);return{path:a.concat(s.reverse()),lca:i}}function dX(r){var n={},i=0;function a(e){var t=i;v(r.children(e),a),n[e]={low:t,lim:i++}}return mt(a,"dfs"),v(r.children(),a),n}var pX=e(()=>{BY(),mt(hX,"parentDummyChains"),mt(uX,"findPath"),mt(dX,"postorder")});function gX(c,e){var h={};function t(e,n){var a=0,s=0,o=e.length,l=AU(n);return v(n,function(e,t){var r=mX(c,e),i=r?c.node(r).order:o;!r&&e!==l||(v(n.slice(s,t+1),function(n){v(c.predecessors(n),function(e){var t=c.node(e),r=t.order;!(r<a||i<r)||t.dummy&&c.node(n).dummy||yX(h,e,n)})}),s=t+1,a=i)}),n}return mt(t,"visitLayer"),XW(e,t),h}function fX(o,e){var s={};function l(t,e,r,n,i){var a;v(UW(e,r),function(e){a=t[e],o.node(a).dummy&&v(o.predecessors(a),function(e){var t=o.node(e);t.dummy&&(t.order<n||t.order>i)&&yX(s,e,a)})})}function t(r,n){var i,a=-1,s=0;return v(n,function(e,t){"border"===o.node(e).dummy&&(e=o.predecessors(e)).length&&(i=o.node(e[0]).order,l(n,s,t,a,i),s=t,a=i),l(n,s,n.length,i,r.length)}),n}return mt(l,"scan"),mt(t,"visitLayer"),XW(e,t),s}function mX(t,e){if(t.node(e).dummy)return hq(t.predecessors(e),function(e){return t.node(e).dummy})}function yX(e,t,r){r<t&&(n=t,t=r,r=n);var n=e[t];n||(e[t]=n={}),n[r]=!0}function vX(e,t,r){var n;return r<t&&(n=t,t=r,r=n),!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function xX(e,t,o,l){var c={},h={},u={};return v(t,function(e){v(e,function(e,t){u[h[c[e]=e]=e]=t})}),v(t,function(e){var s=-1;v(e,function(e){var t=l(e);if(t.length)for(var r=((t=cY(t,function(e){return u[e]})).length-1)/2,n=Math.floor(r),i=Math.ceil(r);n<=i;++n){var a=t[n];h[e]===e&&s<u[a]&&!vX(o,e,a)&&(h[a]=e,h[e]=c[e]=c[a],s=u[a])}})}),{root:c,align:h}}function bX(n,e,t,r,i){var a={},s=wX(n,e,t,i),o=i?"borderLeft":"borderRight";function l(e,t){for(var r=s.nodes(),n=r.pop(),i={};n;)i[n]?e(n):(i[n]=!0,r.push(n),r=r.concat(t(n))),n=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=n.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)),v(r,function(e){a[e]=a[t[e]]}),a}function wX(a,e,s,t){var o=new jY,r=a.graph(),l=SX(r.nodesep,r.edgesep,t);return v(e,function(e){var i;v(e,function(e){var t,r,n=s[e];o.setNode(n),i&&(t=s[i],r=o.edge(t,n),o.setEdge(t,n,Math.max(l(a,e,i),r||0))),i=e})}),o}function kX(i,e){return Fj(Jq(e),function(e){var r=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return Sq(e,function(e,t){t=_X(i,t)/2,r=Math.max(e+t,r),n=Math.min(e-t,n)}),r-n})}function TX(s,o){var e=Jq(o),l=Pj(e),c=Mj(e);v(["u","d"],function(a){v(["l","r"],function(e){var t,r,n=a+e,i=s[n];i!==o&&(t=Jq(i),r="l"===e?l-Pj(t):c-Mj(t))&&(s[n]=_j(i,function(e){return e+r}))})})}function EX(r,n){return _j(r.ul,function(e,t){return n?r[n.toLowerCase()][t]:((t=cY(x(r,t)))[1]+t[2])/2})}function CX(n){var i,e=dH(n),a=pC(gX(n,e),fX(n,e)),s={},t=(v(["u","d"],function(r){i="u"===r?e:Jq(e).reverse(),v(["l","r"],function(e){"r"===e&&(i=x(i,function(e){return Jq(e).reverse()}));var t=("u"===r?n.predecessors:n.successors).bind(n),t=xX(0,i,a,t),t=bX(n,i,t.root,t.align,"r"===e);"r"===e&&(t=_j(t,function(e){return-e})),s[r+e]=t})}),kX(n,s));return TX(s,t),EX(s,n.graph().align)}function SX(s,o,l){return function(e,t,r){var n,i=e.node(t),a=e.node(r),t=0;if(t+=i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":n=-i.width/2;break;case"r":n=i.width/2}if(n&&(t+=l?n:-n),n=0,t=(t=(t+=(i.dummy?o:s)/2)+(a.dummy?o:s)/2)+a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":n=a.width/2;break;case"r":n=-a.width/2}return n&&(t+=l?n:-n),n=0,t}}function _X(e,t){return e.node(t).width}var AX=e(()=>{BY(),YY(),bH(),mt(gX,"findType1Conflicts"),mt(fX,"findType2Conflicts"),mt(mX,"findOtherInnerSegmentNode"),mt(yX,"addConflict"),mt(vX,"hasConflict"),mt(xX,"verticalAlignment"),mt(bX,"horizontalCompaction"),mt(wX,"buildBlockGraph"),mt(kX,"findSmallestWidthAlignment"),mt(TX,"alignCoordinates"),mt(EX,"balance"),mt(CX,"positionX"),mt(SX,"sep"),mt(_X,"width")});function LX(r){NX(r=hH(r)),Lq(CX(r),function(e,t){r.node(t).x=e})}function NX(r){var e=dH(r),n=r.graph().ranksep,i=0;v(e,function(e){var t=Mj(x(e,function(e){return r.node(e).height}));v(e,function(e){r.node(e).y=i+t/2}),i+=t+n})}var IX=e(()=>{BY(),bH(),AX(),mt(LX,"position"),mt(NX,"positionY")});function RX(t,e){var r=e&&e.debugTiming?vH:xH;r("layout",()=>{var e=r(" buildLayoutGraph",()=>OX(t));r(" runLayout",()=>MX(e,r)),r(" updateInputGraph",()=>DX(t,e))})}function MX(e,t){t(" makeSpaceForEdgeLabels",()=>PX(e)),t(" removeSelfEdges",()=>WX(e)),t(" acyclic",()=>iH(e)),t(" nestingGraph.run",()=>LV(e)),t(" rank",()=>EV(hH(e))),t(" injectEdgeLabelProxies",()=>BX(e)),t(" removeEmptyRanks",()=>gH(e)),t(" nestingGraph.cleanup",()=>MV(e)),t(" normalizeRanks",()=>pH(e)),t(" assignRankMinMax",()=>$X(e)),t(" removeEdgeLabelProxies",()=>FX(e)),t(" normalize.run",()=>MH(e)),t(" parentDummyChains",()=>hX(e)),t(" addBorderSegments",()=>wH(e)),t(" order",()=>aX(e)),t(" insertSelfEdges",()=>YX(e)),t(" adjustCoordinateSystem",()=>EH(e)),t(" position",()=>LX(e)),t(" positionSelfEdges",()=>HX(e)),t(" removeBorderNodes",()=>jX(e)),t(" normalize.undo",()=>OH(e)),t(" fixupEdgeLabelCoords",()=>UX(e)),t(" undoCoordinateSystem",()=>CH(e)),t(" translateGraph",()=>zX(e)),t(" assignNodeIntersects",()=>GX(e)),t(" reversePoints",()=>qX(e)),t(" acyclic.undo",()=>sH(e))}function DX(n,i){v(n.nodes(),function(e){var t=n.node(e),r=i.node(e);t&&(t.x=r.x,t.y=r.y,i.children(e).length)&&(t.width=r.width,t.height=r.height)}),v(n.edges(),function(e){var t=n.edge(e),e=i.edge(e);t.points=e.points,Object.prototype.hasOwnProperty.call(e,"x")&&(t.x=e.x,t.y=e.y)}),n.graph().width=i.graph().width,n.graph().height=i.graph().height}function OX(r){var n=new jY({multigraph:!0,compound:!0}),e=XX(r.graph());return n.setGraph(pC({},ZX,VX(e,KX),IW(e,QX))),v(r.nodes(),function(e){var t=XX(r.node(e));n.setNode(e,gU(VX(t,JX),eK)),n.setParent(e,r.parent(e))}),v(r.edges(),function(e){var t=XX(r.edge(e));n.setEdge(e,pC({},rK,VX(t,tK),IW(t,nK)))}),n}function PX(t){var r=t.graph();r.ranksep/=2,v(t.edges(),function(e){(e=t.edge(e)).minlen*=2,"c"!==e.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?e.width+=e.labeloffset:e.height+=e.labeloffset)})}function BX(r){v(r.edges(),function(e){var t=r.edge(e);t.width&&t.height&&(t=r.node(e.v),t={rank:(r.node(e.w).rank-t.rank)/2+t.rank,e:e},lH(r,"edge-proxy",t,"_ep"))})}function $X(t){var r=0;v(t.nodes(),function(e){(e=t.node(e)).borderTop&&(e.minRank=t.node(e.borderTop).rank,e.maxRank=t.node(e.borderBottom).rank,r=Mj(r,e.maxRank))}),t.graph().maxRank=r}function FX(r){v(r.nodes(),function(e){var t=r.node(e);"edge-proxy"===t.dummy&&(r.edge(t.e).labelRank=t.rank,r.removeNode(e))})}function zX(t){var i=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,e=t.graph(),r=e.marginx||0,n=e.marginy||0;function l(e){var t=e.x,r=e.y,n=e.width,e=e.height;i=Math.min(i,t-n/2),a=Math.max(a,t+n/2),s=Math.min(s,r-e/2),o=Math.max(o,r+e/2)}mt(l,"getExtremes"),v(t.nodes(),function(e){l(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),Object.prototype.hasOwnProperty.call(e,"x")&&l(e)}),i-=r,s-=n,v(t.nodes(),function(e){(e=t.node(e)).x-=i,e.y-=s}),v(t.edges(),function(e){e=t.edge(e),v(e.points,function(e){e.x-=i,e.y-=s}),Object.prototype.hasOwnProperty.call(e,"x")&&(e.x-=i),Object.prototype.hasOwnProperty.call(e,"y")&&(e.y-=s)}),e.width=a-i+r,e.height=o-s+n}function GX(a){v(a.edges(),function(e){var t,r=a.edge(e),n=a.node(e.v),e=a.node(e.w),i=r.points?(t=r.points[0],r.points[r.points.length-1]):(r.points=[],t=e,n);r.points.unshift(uH(n,t)),r.points.push(uH(e,i))})}function UX(r){v(r.edges(),function(e){var t=r.edge(e);if(Object.prototype.hasOwnProperty.call(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}})}function qX(t){v(t.edges(),function(e){(e=t.edge(e)).reversed&&e.points.reverse()})}function jX(a){v(a.nodes(),function(e){var t,r,n,i;a.children(e).length&&(e=a.node(e),t=a.node(e.borderTop),r=a.node(e.borderBottom),n=a.node(AU(e.borderLeft)),i=a.node(AU(e.borderRight)),e.width=Math.abs(i.x-n.x),e.height=Math.abs(r.y-t.y),e.x=n.x+e.width/2,e.y=t.y+e.height/2)}),v(a.nodes(),function(e){"border"===a.node(e).dummy&&a.removeNode(e)})}function WX(r){v(r.edges(),function(e){var t;e.v===e.w&&((t=r.node(e.v)).selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:e,label:r.edge(e)}),r.removeEdge(e))})}function YX(i){var e=dH(i);v(e,function(e){var n=0;v(e,function(e,t){var r=i.node(e);r.order=t+n,v(r.selfEdges,function(e){lH(i,"selfedge",{width:e.label.width,height:e.label.height,rank:r.rank,order:t+ ++n,e:e.e,label:e.label},"_se")}),delete r.selfEdges})})}function HX(s){v(s.nodes(),function(e){var t,r,n,i,a=s.node(e);"selfedge"===a.dummy&&(t=(i=s.node(a.e.v)).x+i.width/2,r=i.y,n=a.x-t,i=i.height/2,s.setEdge(a.e,a.label),s.removeNode(e),a.label.points=[{x:t+2*n/3,y:r-i},{x:t+5*n/6,y:r-i},{x:t+n,y:r},{x:t+5*n/6,y:r+i},{x:t+2*n/3,y:r+i}],a.label.x=a.x,a.label.y=a.y)})}function VX(e,t){return _j(IW(e,t),Number)}function XX(e){var r={};return v(e,function(e,t){r[t.toLowerCase()]=e}),r}var KX,ZX,QX,JX,eK,tK,rK,nK,iK=e(()=>{BY(),YY(),TH(),RH(),oH(),PH(),AV(),DV(),cX(),pX(),IX(),bH(),mt(RX,"layout"),mt(MX,"runLayout"),mt(DX,"updateInputGraph"),KX=["nodesep","edgesep","ranksep","marginx","marginy"],ZX={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},QX=["acyclicer","ranker","rankdir","align"],JX=["width","height"],eK={width:0,height:0},tK=["minlen","weight","width","height","labeloffset"],rK={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},nK=["labelpos"],mt(OX,"buildLayoutGraph"),mt(PX,"makeSpaceForEdgeLabels"),mt(BX,"injectEdgeLabelProxies"),mt($X,"assignRankMinMax"),mt(FX,"removeEdgeLabelProxies"),mt(zX,"translateGraph"),mt(GX,"assignNodeIntersects"),mt(UX,"fixupEdgeLabelCoords"),mt(qX,"reversePointsForReversedEdges"),mt(jX,"removeBorderNodes"),mt(WX,"removeSelfEdges"),mt(YX,"insertSelfEdges"),mt(HX,"positionSelfEdges"),mt(VX,"selectNumberAttrs"),mt(XX,"canonicalize")}),aK=e(()=>{oH(),iK(),PH(),AV()});function sK(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:oK(e),edges:lK(e)};return wj(e.graph())||(t.value=lz(e.graph())),t}function oK(n){return x(n.nodes(),function(e){var t=n.node(e),r=n.parent(e),e={v:e};return wj(t)||(e.value=t),wj(r)||(e.parent=r),e})}function lK(n){return x(n.edges(),function(e){var t=n.edge(e),r={v:e.v,w:e.w};return wj(e.name)||(r.name=e.name),wj(t)||(r.value=t),r})}var cK,hK,uK,dK,pK,gK,fK,mK,yK,vK,xK,bK,wK,kK,TK,EK=e(()=>{BY(),WY(),mt(sK,"write"),mt(oK,"writeNodes"),mt(lK,"writeEdges")}),CK=e(()=>{t(),YY(),EK(),cK=new Map,hK=new Map,uK=new Map,dK=mt(()=>{hK.clear(),uK.clear(),cK.clear()},"clear"),pK=mt((e,t)=>{var r=hK.get(t)||[];return M.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),gK=mt((e,t)=>{var r=hK.get(t)||[];return M.info("Descendants of ",t," is ",r),M.info("Edge is ",e),e.v!==t&&e.w!==t&&(r?r.includes(e.v)||pK(e.v,t)||pK(e.w,t)||r.includes(e.w):(M.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),fK=mt((r,n,i,a)=>{M.warn("Copying children of ",r,"root",a,"data",n.node(r),a);var e=n.children(r)||[];r!==a&&e.push(r),M.warn("Copying (nodes) clusterId",r,"nodes",e),e.forEach(e=>{var t;0<n.children(e).length?fK(e,n,i,a):(t=n.node(e),M.info("cp ",e," to ",a," with parent ",r),i.setNode(e,t),a!==n.parent(e)&&(M.warn("Setting parent",e,n.parent(e)),i.setParent(e,n.parent(e))),r!==a&&e!==r?(M.debug("Setting parent",e,r),i.setParent(e,r)):(M.info("In copy ",r,"root",a,"data",n.node(r),a),M.debug("Not Setting parent for node=",e,"cluster!==rootId",r!==a,"node!==clusterId",e!==r)),t=n.edges(e),M.debug("Copying Edges",t),t.forEach(e=>{M.info("Edge",e);var t=n.edge(e.v,e.w,e.name);M.info("Edge data",t,a);try{gK(e,a)?(M.info("Copying as ",e.v,e.w,t,e.name),i.setEdge(e.v,e.w,t,e.name),M.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):M.info("Skipping copy of edge ",e.v,"--\x3e",e.w," rootId: ",a," clusterId:",r)}catch(e){M.error(e)}})),M.debug("Removing node",e),n.removeNode(e)})},"copy"),mK=mt((e,t)=>{let r=t.children(e),n=[...r];for(var i of r)uK.set(i,e),n=[...n,...mK(i,t)];return n},"extractDescendants"),yK=mt((e,t,r)=>{let n=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===r||e.w===r),a=n.map(e=>({v:e.v===t?r:e.v,w:e.w===t?t:e.w})),s=i.map(e=>({v:e.v,w:e.w}));return a.filter(t=>s.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),vK=mt((e,t,r)=>{var n,i=t.children(e);if(M.trace("Searching children of id ",e,i),i.length<1)return e;let a;for(n of i){var s=vK(n,t,r),o=yK(t,r,s);if(s){if(!(0<o.length))return s;a=s}}return a},"findNonClusterChild"),xK=mt(e=>cK.has(e)&&cK.get(e).externalConnections&&cK.has(e)?cK.get(e).id:e,"getAnchorId"),bK=mt((a,e)=>{if(!a||10<e)M.debug("Opting out, no graph ");else{M.debug("Opting in, graph "),a.nodes().forEach(function(e){0<a.children(e).length&&(M.warn("Cluster identified",e," Replacement id in edges: ",vK(e,a,e)),hK.set(e,mK(e,a)),cK.set(e,{id:vK(e,a,e),clusterData:a.node(e)}))}),a.nodes().forEach(function(t){var e=a.children(t),r=a.edges();0<e.length?(M.debug("Cluster identified",t,hK),r.forEach(e=>{pK(e.v,t)^pK(e.w,t)&&(M.warn("Edge: ",e," leaves cluster ",t),M.warn("Descendants of XXX ",t,": ",hK.get(t)),cK.get(t).externalConnections=!0)})):M.debug("Not a cluster ",t,hK)});for(var t of cK.keys()){var r=cK.get(t).id;(r=a.parent(r))!==t&&cK.has(r)&&!cK.get(r).externalConnections&&(cK.get(t).id=r)}a.edges().forEach(function(e){var t,r,n,i=a.edge(e);M.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),M.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a.edge(e))),e.v,M.warn("Fix XXX",cK,"ids:",e.v,e.w,"Translating: ",cK.get(e.v)," --- ",cK.get(e.w)),(cK.get(e.v)||cK.get(e.w))&&(M.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),t=xK(e.v),r=xK(e.w),a.removeEdge(e.v,e.w,e.name),t!==e.v&&(n=a.parent(t),cK.get(n).externalConnections=!0,i.fromCluster=e.v),r!==e.w&&(n=a.parent(r),cK.get(n).externalConnections=!0,i.toCluster=e.w),M.warn("Fix Replacing with XXX",t,r,e.name),a.setEdge(t,r,i,e.name))}),M.warn("Adjusted Graph",sK(a)),wK(a,0),M.trace(cK)}},"adjustClustersAndEdges"),wK=mt((r,n)=>{if(M.warn("extractor - ",n,sK(r),r.children("D")),10<n)M.error("Bailing out");else{let e=r.nodes(),t=!1;for(var i of e)i=r.children(i),t=t||0<i.length;if(t){M.debug("Nodes = ",e,n);for(var a of e)if(M.debug("Extracting node",a,cK,cK.has(a)&&!cK.get(a).externalConnections,!r.parent(a),r.node(a),r.children("D")," Depth ",n),cK.has(a))if(!cK.get(a).externalConnections&&r.children(a)&&0<r.children(a).length){M.warn("Cluster without external connections, without a parent and with children",a,n);let e="TB"===r.graph().rankdir?"LR":"TB";cK.get(a)?.clusterData?.dir&&(e=cK.get(a).clusterData.dir,M.warn("Fixing dir",cK.get(a).clusterData.dir,e));var s=new jY({multigraph:!0,compound:!0}).setGraph({rankdir:e,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});M.warn("Old graph before copy",sK(r)),fK(a,r,s,a),r.setNode(a,{clusterNode:!0,id:a,clusterData:cK.get(a).clusterData,label:cK.get(a).label,graph:s}),M.warn("New graph after copy node: (",a,")",sK(s)),M.debug("Old graph after copy",sK(r))}else M.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!cK.get(a).externalConnections," no parent: ",!r.parent(a)," children ",r.children(a)&&0<r.children(a).length,r.children("D"),n),M.debug(cK);else M.debug("Not a cluster",a,n);e=r.nodes(),M.warn("New list of nodes",e);for(var o of e){var l=r.node(o);M.warn(" Now next level",o,l),l?.clusterNode&&wK(l.graph,n+1)}}else M.debug("Done, no node has children",r.nodes())}},"extractor"),kK=mt((t,e)=>{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{e=t.children(e),e=kK(t,e),r=[...r,...e]}),r},"sorter"),TK=mt(e=>kK(e,e.children()),"sortNodesByHierarchy")}),SK={};$Be(SK,{render:()=>AK});var _K,AK,LK,NK,IK,RK,MK,DK,OK,PK,BK,$K,FK,zK,GK,UK,qK,jK,WK,YK,HK=e(()=>{aK(),EK(),YY(),GO(),i(),CK(),VO(),QD(),zO(),t(),ZD(),Eu(),_K=mt(async(e,i,a,s,o,l)=>{M.warn("Graph in recursive render:XAX",sK(i),o);let c=i.graph().rankdir,n=(M.trace("Dir in recursive render - dir:",c),e=e.insert("g").attr("class","root"),i.nodes()?M.info("Recursive render XXX",i.nodes()):M.info("No nodes found for",i),0<i.edges().length&&M.info("Recursive edges",i.edge(i.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(i.nodes().map(async function(e){var t,r,n=i.node(e);void 0!==o&&(t=JSON.parse(JSON.stringify(o.clusterData)),M.trace(`Setting data for parent cluster XXX
|
||
Node.id = `,e,`
|
||
data=`,t.height,`
|
||
Parent cluster`,o.height),i.setNode(o.id,t),i.parent(e)||(M.trace("Setting parent",e,o.id),i.setParent(e,o.id,t))),M.info("(Insert) Node XXX"+e+": "+JSON.stringify(i.node(e))),n?.clusterNode?(M.info("Cluster identified XBX",e,n.width,i.node(e)),{ranksep:t,nodesep:r}=i.graph(),n.graph.setGraph({...n.graph.graph(),ranksep:t+25,nodesep:r}),r=(t=await _K(u,n.graph,a,s,i.node(e),l)).elem,aN(n,r),n.diff=t.diff||0,M.info("New compound node after recursive render XAX",e,"width",n.width,"height",n.height),jO(r,n)):0<i.children(e).length?(M.trace("Cluster - the non recursive path XBX",e,n.id,n,n.width,"Graph:",i),M.trace(vK(n.id,i)),cK.set(n.id,{id:vK(n.id,i),node:n})):(M.trace("Node - the non recursive path XAX",e,u,i.node(e),c),await UO(u,i.node(e),{config:l,dir:c}))})),await mt(async()=>{var e=i.edges().map(async function(e){var t=i.edge(e.v,e.w,e.name);M.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),M.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(i.edge(e))),M.info("Fix",cK,"ids:",e.v,e.w,"Translating: ",cK.get(e.v),cK.get(e.w)),await gO(r,t)});await Promise.all(e)},"processEdges")(),M.info("Graph before layout:",JSON.stringify(sK(i))),M.info("############################################# XXX"),M.info("### Layout ### XXX"),M.info("############################################# XXX"),RX(i),M.info("Graph after layout:",JSON.stringify(sK(i))),0),p=$D(l).subGraphTitleTotalMargin;return await Promise.all(TK(i).map(async function(e){var t,r=i.node(e);M.info("Position XBX => "+e+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,M.info("A tainted cluster node XBX1",e,r.id,r.width,r.height,r.x,r.y,i.parent(e)),cK.get(r.id).node=r,YO(r)):0<i.children(e).length?(M.info("A pure cluster node XBX1",e,r.id,r.x,r.y,r.width,r.height,i.parent(e)),r.height+=p,i.node(r.parentId),e=r?.padding/2||0,t=r?.labelBBox?.height||0,M.debug("OffsetY",t-e||0,"labelHeight",t,"halfPadding",e),await YD(n,r),cK.get(r.id).node=r):(t=i.node(r.parentId),r.y+=p/2,M.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),YO(r))})),i.edges().forEach(function(e){var t=i.edge(e),r=(M.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t),t),t.points.forEach(e=>e.y+=p/2),i.node(e.v)),e=i.node(e.w),r=wO(h,t,cK,a,r,e,s);fO(t,r)}),i.nodes().forEach(function(e){var t=i.node(e);M.info(e,t.type,t.diff),t.isGroup&&(d=t.diff)}),M.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"recursiveRender"),AK=mt(async(e,t)=>{let l=new jY({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");FO(r,e.markers,e.type,e.diagramId),WO(),dO(),HD(),dK(),e.nodes.forEach(e=>{l.setNode(e.id,{...e}),e.parentId&&l.setParent(e.id,e.parentId)}),M.debug("Edges:",e.edges),e.edges.forEach(e=>{var t,r,n,i,a,s,o;e.start===e.end?(r=(t=e.start)+"---"+t+"---1",n=t+"---"+t+"---2",i=l.node(t),l.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,i.parentId),l.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(n,i.parentId),a=structuredClone(e),s=structuredClone(e),o=structuredClone(e),a.label="",a.arrowTypeEnd="none",a.id=t+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=t+"-cyclic-special-mid",o.label="",i.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,n,s,t+"-cyclic-special-1"),l.setEdge(n,t,o,t+"-cyc<lic-special-2")):l.setEdge(e.start,e.end,{...e},e.id)}),M.warn("Graph at first:",JSON.stringify(sK(l))),bK(l),M.warn("Graph after XAX:",JSON.stringify(sK(l))),t=D(),await _K(r,l,e.type,e.diagramId,void 0,t)},"render")}),VK=e(()=>{XO(),t(),LK={},NK=mt(e=>{for(var t of e)LK[t.name]=t},"registerLayoutLoaders"),mt(()=>{NK([{name:"dagre",loader:mt(async()=>Promise.resolve().then(()=>(HK(),SK)),"loader")}])},"registerDefaultLayoutLoaders")(),IK=mt(async(e,t)=>{var r;if(e.layoutAlgorithm in LK)return(await(r=LK[e.layoutAlgorithm]).loader()).render(e,t,HO,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+e.layoutAlgorithm)},"render"),RK=mt((e="",{fallback:t="dagre"}={})=>{if(e in LK)return e;if(t in LK)return M.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")}),XK=e(()=>{ch(),t(),MK=mt((e,t,r,n)=>{e.attr("class",r);var{width:r,height:i,x:a,y:s}=DK(e,t),n=(rh(e,i,r,n),OK(a,s,r,i,t));e.attr("viewBox",n),M.debug(`viewBox configured: ${n} with padding: `+t)},"setupViewPortForSVG"),DK=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"),OK=mt((e,t,r,n,i)=>e-i+` ${t-i} ${r} `+n,"createViewBox")}),KK=e(()=>{a6(),Eu(),t(),KD(),VK(),XK(),iS(),PK=mt(function(e,t){return t.db.getClasses()},"getClasses"),BK=mt(async function(e,t,r,n){M.info("REF0:"),M.info("Drawing state diagram (v2)",t);let{securityLevel:i,flowchart:a,layout:s}=D(),o;"sandbox"===i&&(o=H("#i"+t));var l,c="sandbox"===i?o.nodes()[0].contentDocument:document,h=(M.debug("Before getData: "),n.db.getData()),u=(M.debug("Data: ",h),BD(t,i)),d=n.db.getDirection(),d=(h.type=n.type,h.layoutAlgorithm=RK(s),"dagre"===h.layoutAlgorithm&&"elk"===s&&M.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=a?.nodeSpacing||50,h.rankSpacing=a?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=t,M.debug("REF1:",h),await IK(h,u),h.config.flowchart?.diagramPadding??8);eS.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),MK(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=H(`#${t} [id="${l.id}"]`);if(p&&l.link){let e=c.createElementNS("http://www.w3.org/2000/svg","a"),t=(e.setAttributeNS("http://www.w3.org/2000/svg","class",l.cssClasses),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):l.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",l.linkTarget),p.insert(function(){return e},":first-child")),r=p.select(".label-container"),n=(r&&t.append(function(){return r.node()}),p.select(".label"));n&&t.append(function(){return n.node()})}}},"draw"),$K={getClasses:PK,draw:BK}}),ZK=e(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=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],G=[2,2],U=[1,13],q=[1,14],j=[1,15],W=[1,16],Y=[1,23],H=[1,25],V=[1,26],X=[1,27],t=[1,49],r=[1,48],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],ee=[1,33],n=[1,44],i=[1,46],a=[1,42],s=[1,47],o=[1,43],l=[1,50],c=[1,45],h=[1,51],u=[1,52],te=[1,34],re=[1,35],ne=[1,36],ie=[1,37],ae=[1,57],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],p=[1,61],g=[1,60],f=[1,62],se=[8,9,11,75,77,78],oe=[1,78],le=[1,91],ce=[1,96],he=[1,95],ue=[1,92],de=[1,88],pe=[1,94],ge=[1,90],fe=[1,97],me=[1,93],ye=[1,98],ve=[1,89],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],be=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],we=[44,60,89,102,105,106,109,111,114,115,116],ke=[1,121],Te=[1,122],Ee=[1,124],Ce=[1,123],Se=[44,60,62,74,89,102,105,106,109,111,114,115,116],_e=[1,133],Ae=[1,147],Le=[1,148],Ne=[1,149],Ie=[1,150],Re=[1,135],Me=[1,137],De=[1,141],Oe=[1,142],Pe=[1,143],Be=[1,144],$e=[1,145],Fe=[1,146],ze=[1,151],Ge=[1,152],Ue=[1,131],qe=[1,132],je=[1,139],We=[1,134],Ye=[1,138],He=[1,136],Ve=[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],Xe=[1,154],Ke=[1,156],v=[8,9,11],x=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],b=[1,176],w=[1,172],k=[1,173],T=[1,177],E=[1,174],C=[1,175],Ze=[77,116,119],S=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Qe=[10,106],Je=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],_=[1,247],A=[1,245],L=[1,249],N=[1,243],I=[1,244],R=[1,246],M=[1,248],D=[1,250],et=[1,268],tt=[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,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){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:n.setDirection("TB"),this.$="TB";break;case 12:n.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.$=n.addSubGraph(a[o-6],a[o-1],a[o-4]);break;case 34:this.$=n.addSubGraph(a[o-3],a[o-1],a[o-3]);break;case 35:this.$=n.addSubGraph(void 0,a[o-1],void 0);break;case 37:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 43:this.$=a[o-1]+a[o];break;case 44:this.$=a[o];break;case 45:n.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),n.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:n.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:n.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:n.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:n.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],n.setClass(a[o-2],a[o]);break;case 56:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"square");break;case 57:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"doublecircle");break;case 58:this.$=a[o-5],n.addVertex(a[o-5],a[o-2],"circle");break;case 59:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"ellipse");break;case 60:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"stadium");break;case 61:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"subroutine");break;case 62:this.$=a[o-7],n.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],n.addVertex(a[o-3],a[o-1],"cylinder");break;case 64:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"round");break;case 65:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"diamond");break;case 66:this.$=a[o-5],n.addVertex(a[o-5],a[o-2],"hexagon");break;case 67:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"odd");break;case 68:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"trapezoid");break;case 69:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"inv_trapezoid");break;case 70:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"lean_right");break;case 71:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"lean_left");break;case 72:this.$=a[o],n.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=n.destructLink(a[o],a[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1]};break;case 78:l=n.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=n.destructLink(a[o]),this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:l=n.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],n.addClass(a[o-2],a[o]);break;case 106:this.$=a[o-4],n.setClass(a[o-2],a[o]);break;case 107:case 115:this.$=a[o-1],n.setClickEvent(a[o-1],a[o]);break;case 108:case 116:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2]),n.setTooltip(a[o-3],a[o]);break;case 109:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 110:this.$=a[o-4],n.setClickEvent(a[o-4],a[o-3],a[o-2]),n.setTooltip(a[o-4],a[o]);break;case 111:this.$=a[o-2],n.setLink(a[o-2],a[o]);break;case 112:this.$=a[o-4],n.setLink(a[o-4],a[o-2]),n.setTooltip(a[o-4],a[o]);break;case 113:this.$=a[o-4],n.setLink(a[o-4],a[o-2],a[o]);break;case 114:this.$=a[o-6],n.setLink(a[o-6],a[o-4],a[o]),n.setTooltip(a[o-6],a[o-2]);break;case 117:this.$=a[o-1],n.setLink(a[o-1],a[o]);break;case 118:this.$=a[o-3],n.setLink(a[o-3],a[o-2]),n.setTooltip(a[o-3],a[o]);break;case 119:this.$=a[o-3],n.setLink(a[o-3],a[o-2],a[o]);break;case 120:this.$=a[o-5],n.setLink(a[o-5],a[o-4],a[o]),n.setTooltip(a[o-5],a[o-2]);break;case 121:this.$=a[o-4],n.addVertex(a[o-2],void 0,void 0,a[o]);break;case 122:this.$=a[o-4],n.updateLink([a[o-2]],a[o]);break;case 123:this.$=a[o-4],n.updateLink(a[o-2],a[o]);break;case 124:this.$=a[o-8],n.updateLinkInterpolate([a[o-6]],a[o-2]),n.updateLink([a[o-6]],a[o]);break;case 125:this.$=a[o-8],n.updateLinkInterpolate(a[o-6],a[o-2]),n.updateLink(a[o-6],a[o]);break;case 126:this.$=a[o-6],n.updateLinkInterpolate([a[o-4]],a[o]);break;case 127:this.$=a[o-6],n.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"}}},"anonymous"),table:[{3:1,4:2,9:B,10:$,12:F},{1:[3]},e(z,G,{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:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,33:24,34:H,36:V,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ne,124:ie},e(z,[2,9]),e(z,[2,10]),e(z,[2,11]),{8:[1,54],9:[1,55],10:ae,15:53,18:56},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:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:p,9:g,11:f,21:67},{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,10:[1,72],11:f,21:73},e(d,[2,36]),{35:[1,74]},{37:[1,75]},e(d,[2,39]),e(se,[2,50],{18:76,39:77,10:ae,40:oe}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:le,44:ce,60:he,80:[1,86],89:ue,95:[1,83],97:[1,84],101:85,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve,120:87},e(d,[2,185]),e(d,[2,186]),e(d,[2,187]),e(d,[2,188]),e(xe,[2,51]),e(xe,[2,54],{46:[1,99]}),e(m,[2,72],{113:112,29:[1,100],44:t,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:r,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:n,102:i,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,113]},e(be,[2,26],{18:114,10:ae}),e(d,[2,27]),{42:115,43:38,44:t,45:39,47:40,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(d,[2,40]),e(d,[2,41]),e(d,[2,42]),e(we,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:ke,81:Te,116:Ee,119:Ce},{75:[1,125],77:[1,126]},e(Se,[2,83]),e(d,[2,28]),e(d,[2,29]),e(d,[2,30]),e(d,[2,31]),e(d,[2,32]),{10:_e,12:Ae,14:Le,27:Ne,28:127,32:Ie,44:Re,60:Me,75:De,80:[1,129],81:[1,130],83:140,84:Oe,85:Pe,86:Be,87:$e,88:Fe,89:ze,90:Ge,91:128,105:Ue,109:qe,111:je,114:We,115:Ye,116:He},e(Ve,G,{5:153}),e(d,[2,37]),e(d,[2,38]),e(se,[2,48],{44:Xe}),e(se,[2,49],{18:155,10:ae,40:Ke}),e(xe,[2,44]),{44:t,47:157,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{102:[1,158],103:159,105:[1,160]},{44:t,47:161,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{44:t,47:162,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(v,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},e(v,[2,115],{120:167,10:[1,166],14:le,44:ce,60:he,89:ue,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve}),e(v,[2,117],{10:[1,168]}),e(x,[2,183]),e(x,[2,170]),e(x,[2,171]),e(x,[2,172]),e(x,[2,173]),e(x,[2,174]),e(x,[2,175]),e(x,[2,176]),e(x,[2,177]),e(x,[2,178]),e(x,[2,179]),e(x,[2,180]),{44:t,47:169,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{30:170,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:178,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:180,50:[1,179],67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:181,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:182,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:183,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{109:[1,184]},{30:185,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:186,65:[1,187],67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:188,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:189,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:190,67:b,80:w,81:k,82:171,116:T,117:E,118:C},e(y,[2,182]),e(z,[2,20]),e(be,[2,25]),e(se,[2,46],{39:191,18:192,10:ae,40:oe}),e(we,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{77:[1,196],79:197,116:Ee,119:Ce},e(Ze,[2,79]),e(Ze,[2,81]),e(Ze,[2,82]),e(Ze,[2,168]),e(Ze,[2,169]),{76:198,79:120,80:ke,81:Te,116:Ee,119:Ce},e(Se,[2,84]),{8:p,9:g,10:_e,11:f,12:Ae,14:Le,21:200,27:Ne,29:[1,199],32:Ie,44:Re,60:Me,75:De,83:140,84:Oe,85:Pe,86:Be,87:$e,88:Fe,89:ze,90:Ge,91:201,105:Ue,109:qe,111:je,114:We,115:Ye,116:He},e(S,[2,101]),e(S,[2,103]),e(S,[2,104]),e(S,[2,157]),e(S,[2,158]),e(S,[2,159]),e(S,[2,160]),e(S,[2,161]),e(S,[2,162]),e(S,[2,163]),e(S,[2,164]),e(S,[2,165]),e(S,[2,166]),e(S,[2,167]),e(S,[2,90]),e(S,[2,91]),e(S,[2,92]),e(S,[2,93]),e(S,[2,94]),e(S,[2,95]),e(S,[2,96]),e(S,[2,97]),e(S,[2,98]),e(S,[2,99]),e(S,[2,100]),{6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,202],33:24,34:H,36:V,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ne,124:ie},{10:ae,18:203},{44:[1,204]},e(xe,[2,43]),{10:[1,205],44:t,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{10:[1,206]},{10:[1,207],106:[1,208]},e(Qe,[2,128]),{10:[1,209],44:t,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{10:[1,210],44:t,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{80:[1,211]},e(v,[2,109],{10:[1,212]}),e(v,[2,111],{10:[1,213]}),{80:[1,214]},e(x,[2,184]),{80:[1,215],98:[1,216]},e(xe,[2,55],{113:112,44:t,60:r,89:n,102:i,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),{31:[1,217],67:b,82:218,116:T,117:E,118:C},e(Je,[2,86]),e(Je,[2,88]),e(Je,[2,89]),e(Je,[2,153]),e(Je,[2,154]),e(Je,[2,155]),e(Je,[2,156]),{49:[1,219],67:b,82:218,116:T,117:E,118:C},{30:220,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{51:[1,221],67:b,82:218,116:T,117:E,118:C},{53:[1,222],67:b,82:218,116:T,117:E,118:C},{55:[1,223],67:b,82:218,116:T,117:E,118:C},{57:[1,224],67:b,82:218,116:T,117:E,118:C},{60:[1,225]},{64:[1,226],67:b,82:218,116:T,117:E,118:C},{66:[1,227],67:b,82:218,116:T,117:E,118:C},{30:228,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{31:[1,229],67:b,82:218,116:T,117:E,118:C},{67:b,69:[1,230],71:[1,231],82:218,116:T,117:E,118:C},{67:b,69:[1,233],71:[1,232],82:218,116:T,117:E,118:C},e(se,[2,45],{18:155,10:ae,40:Ke}),e(se,[2,47],{44:Xe}),e(we,[2,75]),e(we,[2,74]),{62:[1,234],67:b,82:218,116:T,117:E,118:C},e(we,[2,77]),e(Ze,[2,80]),{77:[1,235],79:197,116:Ee,119:Ce},{30:236,67:b,80:w,81:k,82:171,116:T,117:E,118:C},e(Ve,G,{5:237}),e(S,[2,102]),e(d,[2,35]),{43:238,44:t,45:39,47:40,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{10:ae,18:239},{10:_,60:A,84:L,92:240,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:_,60:A,84:L,92:251,104:[1,252],105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:_,60:A,84:L,92:253,104:[1,254],105:N,107:241,108:242,109:I,110:R,111:M,112:D},{105:[1,255]},{10:_,60:A,84:L,92:256,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{44:t,47:257,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(v,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},e(v,[2,116]),e(v,[2,118],{10:[1,261]}),e(v,[2,119]),e(m,[2,56]),e(Je,[2,87]),e(m,[2,57]),{51:[1,262],67:b,82:218,116:T,117:E,118:C},e(m,[2,64]),e(m,[2,59]),e(m,[2,60]),e(m,[2,61]),{109:[1,263]},e(m,[2,63]),e(m,[2,65]),{66:[1,264],67:b,82:218,116:T,117:E,118:C},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(we,[2,78]),{31:[1,265],67:b,82:218,116:T,117:E,118:C},{6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,266],33:24,34:H,36:V,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ne,124:ie},e(xe,[2,53]),{43:267,44:t,45:39,47:40,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(v,[2,121],{106:et}),e(tt,[2,130],{108:269,10:_,60:A,84:L,105:N,109:I,110:R,111:M,112:D}),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:et}),{10:[1,270]},e(v,[2,123],{106:et}),{10:[1,271]},e(Qe,[2,129]),e(v,[2,105],{106:et}),e(v,[2,106],{113:112,44:t,60:r,89:n,102:i,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),e(v,[2,110]),e(v,[2,112],{10:[1,272]}),e(v,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:p,9:g,11:f,21:277},e(d,[2,34]),e(xe,[2,52]),{10:_,60:A,84:L,105:N,107:278,108:242,109:I,110:R,111:M,112:D},e(O,[2,133]),{14:le,44:ce,60:he,89:ue,101:279,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve,120:87},{14:le,44:ce,60:he,89:ue,101:280,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve,120:87},{98:[1,281]},e(v,[2,120]),e(m,[2,58]),{30:282,67:b,80:w,81:k,82:171,116:T,117:E,118:C},e(m,[2,66]),e(Ve,G,{5:283}),e(tt,[2,131],{108:269,10:_,60:A,84:L,105:N,109:I,110:R,111:M,112:D}),e(v,[2,126],{120:167,10:[1,284],14:le,44:ce,60:he,89:ue,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve}),e(v,[2,127],{120:167,10:[1,285],14:le,44:ce,60:he,89:ue,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve}),e(v,[2,114]),{31:[1,286],67:b,82:218,116:T,117:E,118:C},{6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,287],33:24,34:H,36:V,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ne,124:ie},{10:_,60:A,84:L,92:288,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:_,60:A,84:L,92:289,105:N,107:241,108:242,109:I,110:R,111:M,112:D},e(m,[2,62]),e(d,[2,33]),e(v,[2,124],{106:et}),e(v,[2,125],{106:et})],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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){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 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:return 119;case 71:return this.popState(),77;case 72:return this.pushState("thickEdgeText"),75;case 73:return 119;case 74:return this.popState(),77;case 75:return this.pushState("dottedEdgeText"),75;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};B.lexer=$,mt(P,"Parser"),(FK=new((P.prototype=B).Parser=P)).parser=FK,zK=FK}),QK=e(()=>{ZK(),(GK=Object.assign({},zK)).parse=e=>(e=e.replace(/}\s*\n/g,`}
|
||
`),zK.parse(e)),UK=GK}),JK=e(()=>{qK=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")}),eZ=e(()=>{vn(),JK(),jK=mt((e,t)=>{var r=(i=Bt)(e,"r"),n=i(e,"g"),i=i(e,"b");return Ot(r,n,i,t)},"fade"),WK=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: 1px;
|
||
}
|
||
.rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
|
||
text-anchor: middle;
|
||
}
|
||
// .flowchart-label .text-outer-tspan {
|
||
// text-anchor: middle;
|
||
// }
|
||
// .flowchart-label .text-inner-tspan {
|
||
// text-anchor: start;
|
||
// }
|
||
|
||
.node .katex path {
|
||
fill: #000;
|
||
stroke: #000;
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
.rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
|
||
text-align: center;
|
||
}
|
||
.node.clickable {
|
||
cursor: pointer;
|
||
}
|
||
|
||
|
||
.root .anchor path {
|
||
fill: ${e.lineColor} !important;
|
||
stroke-width: 0;
|
||
stroke: ${e.lineColor};
|
||
}
|
||
|
||
.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};
|
||
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: ${jK(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;
|
||
}
|
||
rect {
|
||
opacity: 0.5;
|
||
background-color: ${e.edgeLabelBackground};
|
||
fill: ${e.edgeLabelBackground};
|
||
}
|
||
text-align: center;
|
||
}
|
||
${qK()}
|
||
`,"getStyles"),YK=WK}),tZ={};$Be(tZ,{diagram:()=>rZ});var rZ,nZ,iZ,aZ,sZ=e(()=>{Eu(),XD(),KK(),QK(),eZ(),rZ={parser:UK,get db(){return new PD},renderer:$K,styles:YK,init:mt(e=>{e.flowchart||(e.flowchart={}),e.layout&&Ch({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Ch({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}}),oZ=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,20],l=[1,21],c=[1,22],h=[1,23],u=[1,24],d=[1,19],p=[1,25],P=[1,26],g=[1,18],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],b=[1,42],w=[1,43],k=[1,52],T=[40,50,68,69],E=[1,63],C=[1,61],S=[1,58],_=[1,62],A=[1,64],L=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],$=[63,64,65,66,67],F=[1,81],z=[1,80],G=[1,78],U=[1,79],q=[6,10,42,47],N=[6,10,13,41,42,47,48,49],I=[1,89],R=[1,88],M=[1,87],D=[19,56],j=[1,98],W=[1,97],O=[19,56,58,60],n={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,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){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:n.addEntity(a[o-4]),n.addEntity(a[o-2]),n.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:n.addEntity(a[o-8]),n.addEntity(a[o-4]),n.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),n.setClass([a[o-8]],a[o-6]),n.setClass([a[o-4]],a[o-2]);break;case 10:n.addEntity(a[o-6]),n.addEntity(a[o-2]),n.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),n.setClass([a[o-6]],a[o-4]);break;case 11:n.addEntity(a[o-6]),n.addEntity(a[o-4]),n.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),n.setClass([a[o-4]],a[o-2]);break;case 12:n.addEntity(a[o-3]),n.addAttributes(a[o-3],a[o-1]);break;case 13:n.addEntity(a[o-5]),n.addAttributes(a[o-5],a[o-1]),n.setClass([a[o-5]],a[o-3]);break;case 14:n.addEntity(a[o-2]);break;case 15:n.addEntity(a[o-4]),n.setClass([a[o-4]],a[o-2]);break;case 16:n.addEntity(a[o]);break;case 17:n.addEntity(a[o-2]),n.setClass([a[o-2]],a[o]);break;case 18:n.addEntity(a[o-6],a[o-4]),n.addAttributes(a[o-6],a[o-1]);break;case 19:n.addEntity(a[o-8],a[o-6]),n.addAttributes(a[o-8],a[o-1]),n.setClass([a[o-8]],a[o-3]);break;case 20:n.addEntity(a[o-5],a[o-3]);break;case 21:n.addEntity(a[o-7],a[o-5]),n.setClass([a[o-7]],a[o-2]);break;case 22:n.addEntity(a[o-3],a[o-1]);break;case 23:n.addEntity(a[o-5],a[o-3]),n.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:n.setDirection("TB");break;case 33:n.setDirection("BT");break;case 34:n.setDirection("RL");break;case 35:n.setDirection("LR");break;case 36:this.$=a[o-3],n.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 56:case 64:this.$=[a[o]];break;case 39:case 40:this.$=a[o-2].concat([a[o]]);break;case 41:this.$=a[o-2],n.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],n.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 76:case 77:this.$=a[o].replace(/"/g,"");break;case 55:case 78:this.$=a[o];break;case 57:a[o].push(a[o-1]),this.$=a[o];break;case 58:this.$={type:a[o-1],name:a[o]};break;case 59:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 60:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 61:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 62:case 63:case 66:this.$=a[o];break;case 65:a[o-2].push(a[o]),this.$=a[o-2];break;case 67:this.$=a[o].replace(/"/g,"");break;case 68:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 69:this.$=n.Cardinality.ZERO_OR_ONE;break;case 70:this.$=n.Cardinality.ZERO_OR_MORE;break;case 71:this.$=n.Cardinality.ONE_OR_MORE;break;case 72:this.$=n.Cardinality.ONLY_ONE;break;case 73:this.$=n.Cardinality.MD_PARENT;break;case 74:this.$=n.Identification.NON_IDENTIFYING;break;case 75:this.$=n.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:n,24:i,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:27,11:9,22:n,24:i,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},t(r,[2,5]),t(r,[2,6]),t(r,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:f,64:m,65:y,66:v,67:x}),{23:[1,38]},{25:[1,39]},{27:[1,40]},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(r,[2,32]),t(r,[2,33]),t(r,[2,34]),t(r,[2,35]),{16:41,40:b,41:w},{16:44,40:b,41:w},{16:45,40:b,41:w},t(r,[2,4]),{11:46,40:d,50:g},{16:47,40:b,41:w},{18:48,19:[1,49],51:50,52:51,56:k},{11:53,40:d,50:g},{62:54,68:[1,55],69:[1,56]},t(T,[2,69]),t(T,[2,70]),t(T,[2,71]),t(T,[2,72]),t(T,[2,73]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),{13:E,38:57,41:C,42:S,45:59,46:60,48:_,49:A},t(L,[2,37]),t(L,[2,38]),{16:65,40:b,41:w,42:S},{13:E,38:66,41:C,42:S,45:59,46:60,48:_,49:A},{13:[1,67],15:[1,68]},t(r,[2,17],{61:32,12:69,17:[1,70],42:S,63:f,64:m,65:y,66:v,67:x}),{19:[1,71]},t(r,[2,14]),{18:72,19:[2,56],51:50,52:51,56:k},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:f,64:m,65:y,66:v,67:x},t($,[2,74]),t($,[2,75]),{6:F,10:z,39:77,42:G,47:U},{40:[1,82],41:[1,83]},t(q,[2,43],{46:84,13:E,41:C,48:_,49:A}),t(N,[2,45]),t(N,[2,50]),t(N,[2,51]),t(N,[2,52]),t(N,[2,53]),t(r,[2,41],{42:S}),{6:F,10:z,39:85,42:G,47:U},{14:86,40:I,50:R,70:M},{16:90,40:b,41:w},{11:91,40:d,50:g},{18:92,19:[1,93],51:50,52:51,56:k},t(r,[2,12]),{19:[2,57]},t(D,[2,58],{54:94,55:95,57:96,59:j,60:W}),t([19,56,59,60],[2,63]),t(r,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(r,[2,36]),{13:E,41:C,45:101,46:60,48:_,49:A},t(r,[2,47]),t(r,[2,48]),t(r,[2,49]),t(L,[2,39]),t(L,[2,40]),t(N,[2,46]),t(r,[2,42]),t(r,[2,8]),t(r,[2,76]),t(r,[2,77]),t(r,[2,78]),{13:[1,102],42:S},{13:[1,104],15:[1,103]},{19:[1,105]},t(r,[2,15]),t(D,[2,59],{55:106,58:[1,107],60:W}),t(D,[2,60]),t(O,[2,64]),t(D,[2,67]),t(O,[2,66]),{18:108,19:[1,109],51:50,52:51,56:k},{16:110,40:b,41:w},t(q,[2,44],{46:84,13:E,41:C,48:_,49:A}),{14:111,40:I,50:R,70:M},{16:112,40:b,41:w},{14:113,40:I,50:R,70:M},t(r,[2,13]),t(D,[2,61]),{57:114,59:j},{19:[1,115]},t(r,[2,20]),t(r,[2,23],{17:[1,116],42:S}),t(r,[2,11]),{13:[1,117],42:S},t(r,[2,10]),t(O,[2,65]),t(r,[2,18]),{18:118,19:[1,119],51:50,52:51,56:k},{14:120,40:I,50:R,70:M},{19:[1,121]},t(r,[2,21]),t(r,[2,9]),t(r,[2,19])],defaultActions:{52:[2,62],72:[2,57]},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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:case 26:return 56;case 27:return 60;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 63;case 42:case 43:case 44:return 65;case 45:case 46:return 63;case 47:case 48:case 49:case 50:case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:case 56:case 57:case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:case 65:return 69;case 66:case 67:case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return t.yytext[0];case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};n.lexer=i,mt(e,"Parser"),(nZ=new((e.prototype=n).Parser=e)).parser=nZ,iZ=nZ}),lZ=e(()=>{t(),Eu(),Tu(),iS(),aZ=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=yh,this.getAccTitle=vh,this.setAccDescription=xh,this.getAccDescription=bh,this.setDiagramTitle=wh,this.getDiagramTitle=kh,this.getConfig=mt(()=>D().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,M.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:D().look??"default",cssClasses:"default",cssStyles:[]}),M.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),n;for(n=t.length-1;0<=n;n--)t[n].keys||(t[n].keys=[]),t[n].comment||(t[n].comment=""),r.attributes.push(t[n]),M.debug("Added attribute ",t[n].name)}addRelationship(e,t,r,n){e=this.entities.get(e),r=this.entities.get(r),e&&r&&(e={entityA:e.id,roleA:t,entityB:r.id,relSpec:n},this.relationships.push(e),M.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 n,i=this.entities.get(r);if(!t||!i)return;for(n of t)i.cssStyles.push(n)}}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 n=this.entities.get(r);if(n)for(var i of t)n.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],mh()}getData(){var e,t,r=[],n=[],i=D();for(e of this.entities.keys()){var a=this.entities.get(e);a&&(a.cssCompiledStyles=this.getCompiledStyles(a.cssClasses.split(" ")),r.push(a))}let s=0;for(t of this.relationships){var o={id:nS(t.entityA,t.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:i.look};n.push(o)}return{nodes:r,edges:n,other:{},config:i,direction:"TB"}}}}),cZ={};$Be(cZ,{draw:()=>hZ});var hZ,uZ,dZ,pZ,gZ=e(()=>{Eu(),t(),KD(),VK(),XK(),iS(),a6(),hZ=mt(async function(e,t,r,n){M.info("REF0:"),M.info("Drawing er diagram (unified)",t);let{securityLevel:i,er:a,layout:s}=D(),o=n.db.getData(),l=BD(t,i);o.type=n.type,o.layoutAlgorithm=RK(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=n.db.getDirection(),o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=t,await IK(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),t=l.selectAll('[id*="-background"]'),0<Array.from(t).length&&t.each(function(){var e=H(this),t=e.attr("id").replace("-background","");(t=l.select("#"+CSS.escape(t))).empty()||(t=t.attr("transform"),e.attr("transform",t))}),eS.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),MK(l,8,"erDiagram",a?.useMaxWidth??!0)},"draw")}),fZ=e(()=>{vn(),uZ=mt((e,t)=>{var r=(i=Bt)(e,"r"),n=i(e,"g"),i=i(e,"b");return Ot(r,n,i,t)},"fade"),dZ=mt(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: ${uZ(e.tertiaryColor,.5)};
|
||
}
|
||
|
||
.edgeLabel .label {
|
||
fill: ${e.nodeBorder};
|
||
font-size: 14px;
|
||
}
|
||
|
||
.label {
|
||
font-family: ${e.fontFamily};
|
||
color: ${e.nodeTextColor||e.textColor};
|
||
}
|
||
|
||
.edge-pattern-dashed {
|
||
stroke-dasharray: 8,8;
|
||
}
|
||
|
||
.node rect,
|
||
.node circle,
|
||
.node ellipse,
|
||
.node polygon
|
||
{
|
||
fill: ${e.mainBkg};
|
||
stroke: ${e.nodeBorder};
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
.relationshipLine {
|
||
stroke: ${e.lineColor};
|
||
stroke-width: 1;
|
||
fill: none;
|
||
}
|
||
|
||
.marker {
|
||
fill: none !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
`,"getStyles"),pZ=dZ}),mZ={};$Be(mZ,{diagram:()=>yZ});var yZ,vZ=e(()=>{oZ(),lZ(),gZ(),fZ(),yZ={parser:iZ,get db(){return new aZ},renderer:cZ,styles:pZ}});function xZ(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function bZ(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText}function wZ(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function kZ(e){return"object"==typeof e&&null!==e&&xZ(e.container)&&bZ(e.reference)&&"string"==typeof e.message}function TZ(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function EZ(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function CZ(e){return TZ(e)&&"string"==typeof e.fullText}var SZ,_Z=e(()=>{mt(xZ,"isAstNode"),mt(bZ,"isReference"),mt(wZ,"isAstNodeDescription"),mt(kZ,"isLinkingError"),SZ=class{static{mt(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return xZ(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){var r,n;return e===t||(void 0!==(n=(r=(r=this.subtypes[e])||(this.subtypes[e]={}))[t])?n:(n=this.computeIsSubtype(e,t),r[t]=n))}getAllSubTypes(e){var t=this.allSubtypes[e];if(t)return t;var r,n=[];for(r of this.getAllTypes())this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n}},mt(TZ,"isCompositeCstNode"),mt(EZ,"isLeafCstNode"),mt(CZ,"isRootCstNode")});function AZ(e){return"string"==typeof e?e:"u"<typeof e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function LZ(e){return!!e&&"function"==typeof e[Symbol.iterator]}function NZ(...r){if(1===r.length){let t=r[0];if(t instanceof IZ)return t;if(LZ(t))return new IZ(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new IZ(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:MZ)}return 1<r.length?new IZ(()=>({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&&(LZ(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 MZ}):RZ}var IZ,RZ,MZ,DZ,OZ,PZ=e(()=>{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 n(e){return e.reduce((e,t)=>Math.max(e,t))}var i;IZ=class a{static{mt(this,"StreamImpl")}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:mt(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){for(var e,t=[],r=this.iterator();void 0!==(e=r.next()).value&&t.push(e.value),!e.done;);return t}toSet(){return new Set(this)}toMap(t,r){var e=this.map(e=>[t?t(e):e,r?r(e):e]);return new Map(e)}toString(){return this.join()}concat(e){return new a(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(!(t=this.nextFn(e.first)).done)return t}while(!t.done);e.firstDone=!0}do{if(!(t=e.iterator.next()).done)return t}while(!t.done);return MZ})}join(e=","){let t=this.iterator(),r="",n,i=!1;for(;(n=t.next()).done||(i&&(r+=e),r+=AZ(n.value)),i=!0,!n.done;);return r}indexOf(e,t=0){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(n>=t&&i.value===e)return n;i=r.next(),n++}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,n=t.next();for(;!n.done;)e(n.value,r),n=t.next(),r++}map(r){return new a(this.startFn,e=>{var{done:e,value:t}=this.nextFn(e);return e?MZ:{done:!1,value:r(t)}})}filter(r){return new a(this.startFn,e=>{var t;do{if(!(t=this.nextFn(e)).done&&r(t.value))return t}while(!t.done);return MZ})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){let r=this.iterator(),n=t,i=r.next();for(;!i.done;)n=void 0===n?i.value:e(n,i.value),i=r.next();return n}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){var n=e.next();return n.done?r:void 0===(e=this.recursiveReduce(e,t,r))?n.value:t(e,n.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,n=t.next();for(;!n.done;){if(e(n.value))return r;n=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(n){return new a(()=>({this:this.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=this.nextFn(e.this);if(!t){if(!LZ(r=n(r)))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return MZ})}flat(e){if((e=void 0===e?1:e)<=0)return this;let n=1<e?this.flat(e-1):this;return new a(()=>({this:n.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=n.nextFn(e.this);if(!t){if(!LZ(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return MZ})}head(){var e=this.iterator().next();if(!e.done)return e.value}tail(r=1){return new a(()=>{var t=this.startFn();for(let e=0;e<r;e++)if(this.nextFn(t).done)return t;return t},this.nextFn)}limit(t){return new a(()=>({size:0,state:this.startFn()}),e=>(e.size++,t<e.size?MZ:this.nextFn(e.state)))}distinct(n){return new a(()=>({set:new Set,internalState:this.startFn()}),e=>{var t;do{if(!(t=this.nextFn(e.internalState)).done){var r=n?n(t.value):t.value;if(!e.set.has(r))return e.set.add(r),t}}while(!t.done);return MZ})}exclude(e,t){let r=new Set;for(var n of e)n=t?t(n):n,r.add(n);return this.filter(e=>(e=t?t(e):e,!r.has(e)))}},mt(AZ,"toString"),mt(LZ,"isIterable"),RZ=new IZ(()=>{},()=>MZ),MZ=Object.freeze({done:!0,value:void 0}),mt(NZ,"stream"),DZ=class extends IZ{static{mt(this,"TreeStreamImpl")}constructor(e,r,t){super(()=>({iterators:t?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);0<e.iterators.length;){var t=e.iterators[e.iterators.length-1].next();if(!t.done)return e.iterators.push(r(t.value)[Symbol.iterator]()),t;e.iterators.pop()}return MZ})}iterator(){let e={state:this.startFn(),next:mt(()=>this.nextFn(e.state),"next"),prune:mt(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},i=OZ=OZ||{},mt(e,"sum"),i.sum=e,mt(t,"product"),i.product=t,mt(r,"min"),i.min=r,mt(n,"max"),i.max=n}),BZ={};function $Z(e){return new DZ(e,e=>TZ(e)?e.content:[],{includeRoot:!0})}function FZ(e){return $Z(e).filter(EZ)}function zZ(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function GZ(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function UZ(e){var t,r;if(e)return{offset:e,end:t,range:r}=e,{range:r,offset:e,end:t,length:t-e}}function qZ(e,t){var r;return e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character?nQ.Before:e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character?nQ.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?nQ.Inside:r?nQ.OverlapBack:e?nQ.OverlapFront:nQ.Outside)}function jZ(e,t){return qZ(e,t)>nQ.After}function WZ(e,t,r=iQ){var n;if(e)return 0<t&&(n=t-e.offset,n=e.text.charAt(n),r.test(n)||t--),VZ(e,t)}function YZ(t,r){if(t){var e=ZZ(t,!0);if(e&&HZ(e,r))return e;if(CZ(t))for(let e=t.content.findIndex(e=>!e.hidden)-1;0<=e;e--){var n=t.content[e];if(HZ(n,r))return n}}}function HZ(e,t){return EZ(e)&&t.includes(e.tokenType.name)}function VZ(e,t){return EZ(e)?e:TZ(e)&&(e=KZ(e,t,!1))?VZ(e,t):void 0}function XZ(e,t){return EZ(e)?e:TZ(e)&&(e=KZ(e,t,!0))?XZ(e,t):void 0}function KZ(e,t,r){let n=0,i=e.content.length-1,a;for(;n<=i;){var s=Math.floor((n+i)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(a=r?o:void 0,n=s+1):i=s-1}return a}function ZZ(r,n=!0){for(;r.container;){let e=r.container,t=e.content.indexOf(r);for(;0<t;){t--;var i=e.content[t];if(n||!i.hidden)return i}r=e}}function QZ(n,i=!0){for(;n.container;){let e=n.container,t=e.content.indexOf(n),r=e.content.length-1;for(;t<r;){t++;var a=e.content[t];if(i||!a.hidden)return a}n=e}}function JZ(e){if(0===e.range.start.character)return e;let t=e.range.start.line,r=e,n;for(;e.container;){var i=e.container,a=n??i.content.indexOf(e);if(0===a?(e=i,n=void 0):(n=a-1,e=i.content[n]),e.range.start.line!==t)break;r=e}return r}function eQ(e,t){return(e=tQ(e,t))?e.parent.content.slice(e.a+1,e.b):[]}function tQ(e,t){let r=rQ(e),n=rQ(t),i;for(let e=0;e<r.length&&e<n.length;e++){var a=r[e],s=n[e];if(a.parent!==s.parent)break;i={parent:a.parent,a:a.index,b:s.index}}return i}function rQ(e){for(var t=[];e.container;){var r=e.container,n=r.content.indexOf(e);t.push({parent:r,index:n}),e=r}return t.reverse()}$Be(BZ,{DefaultNameRegexp:()=>iQ,RangeComparison:()=>nQ,compareRange:()=>qZ,findCommentNode:()=>YZ,findDeclarationNodeAtOffset:()=>WZ,findLeafNodeAtOffset:()=>VZ,findLeafNodeBeforeOffset:()=>XZ,flattenCst:()=>FZ,getInteriorNodes:()=>eQ,getNextNode:()=>QZ,getPreviousNode:()=>ZZ,getStartlineNode:()=>JZ,inRange:()=>jZ,isChildNode:()=>zZ,isCommentNode:()=>HZ,streamCst:()=>$Z,toDocumentSegment:()=>UZ,tokenToRange:()=>GZ});var nQ,iQ,aQ=e(()=>{var e;_Z(),PZ(),mt($Z,"streamCst"),mt(FZ,"flattenCst"),mt(zZ,"isChildNode"),mt(GZ,"tokenToRange"),mt(UZ,"toDocumentSegment"),(e=nQ=nQ||{})[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(qZ,"compareRange"),mt(jZ,"inRange"),iQ=/^[\w\p{L}]$/u,mt(WZ,"findDeclarationNodeAtOffset"),mt(YZ,"findCommentNode"),mt(HZ,"isCommentNode"),mt(VZ,"findLeafNodeAtOffset"),mt(XZ,"findLeafNodeBeforeOffset"),mt(KZ,"binarySearch"),mt(ZZ,"getPreviousNode"),mt(QZ,"getNextNode"),mt(JZ,"getStartlineNode"),mt(eQ,"getInteriorNodes"),mt(tQ,"getCommonParent"),mt(rQ,"getParentChain")});function sQ(e){throw new Error("Error! The input value was not handled.")}var oQ,lQ=e(()=>{oQ=class extends Error{static{mt(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:`+e.range.start.character:t)}},mt(sQ,"assertUnreachable")}),cQ={};function hQ(e){return QJ.isInstance(e,aJ)}function uQ(e){return QJ.isInstance(e,sJ)}function dQ(e){return QJ.isInstance(e,oJ)}function pQ(e){return gQ(e)||"current"===e||"entry"===e||"extends"===e||"false"===e||"fragment"===e||"grammar"===e||"hidden"===e||"import"===e||"interface"===e||"returns"===e||"terminal"===e||"true"===e||"type"===e||"infer"===e||"infers"===e||"with"===e||"string"==typeof e&&/\^?[_a-zA-Z][\w_]*/.test(e)}function gQ(e){return"string"===e||"number"===e||"boolean"===e||"Date"===e||"bigint"===e}function fQ(e){return QJ.isInstance(e,lJ)}function mQ(e){return QJ.isInstance(e,cJ)}function yQ(e){return QJ.isInstance(e,hJ)}function vQ(e){return QJ.isInstance(e,uJ)}function xQ(e){return QJ.isInstance(e,dJ)}function bQ(e){return QJ.isInstance(e,pJ)}function wQ(e){return QJ.isInstance(e,gJ)}function kQ(e){return QJ.isInstance(e,fJ)}function TQ(e){return QJ.isInstance(e,mJ)}function EQ(e){return QJ.isInstance(e,yJ)}function CQ(e){return QJ.isInstance(e,vJ)}function SQ(e){return QJ.isInstance(e,xJ)}function _Q(e){return QJ.isInstance(e,bJ)}function AQ(e){return QJ.isInstance(e,wJ)}function LQ(e){return QJ.isInstance(e,kJ)}function NQ(e){return QJ.isInstance(e,TJ)}function IQ(e){return QJ.isInstance(e,EJ)}function RQ(e){return QJ.isInstance(e,CJ)}function MQ(e){return QJ.isInstance(e,SJ)}function DQ(e){return QJ.isInstance(e,_J)}function OQ(e){return QJ.isInstance(e,AJ)}function PQ(e){return QJ.isInstance(e,LJ)}function BQ(e){return QJ.isInstance(e,NJ)}function $Q(e){return QJ.isInstance(e,IJ)}function FQ(e){return QJ.isInstance(e,RJ)}function zQ(e){return QJ.isInstance(e,MJ)}function GQ(e){return QJ.isInstance(e,DJ)}function UQ(e){return QJ.isInstance(e,OJ)}function qQ(e){return QJ.isInstance(e,PJ)}function jQ(e){return QJ.isInstance(e,BJ)}function WQ(e){return QJ.isInstance(e,$J)}function YQ(e){return QJ.isInstance(e,FJ)}function HQ(e){return QJ.isInstance(e,zJ)}function VQ(e){return QJ.isInstance(e,GJ)}function XQ(e){return QJ.isInstance(e,UJ)}function KQ(e){return QJ.isInstance(e,qJ)}function ZQ(e){return QJ.isInstance(e,jJ)}function QQ(e){return QJ.isInstance(e,WJ)}function JQ(e){return QJ.isInstance(e,YJ)}function eJ(e){return QJ.isInstance(e,HJ)}function tJ(e){return QJ.isInstance(e,VJ)}function rJ(e){return QJ.isInstance(e,XJ)}function nJ(e){return QJ.isInstance(e,KJ)}$Be(cQ,{AbstractElement:()=>hJ,AbstractRule:()=>aJ,AbstractType:()=>sJ,Action:()=>DJ,Alternatives:()=>OJ,ArrayLiteral:()=>uJ,ArrayType:()=>dJ,Assignment:()=>PJ,BooleanLiteral:()=>pJ,CharacterRange:()=>BJ,Condition:()=>oJ,Conjunction:()=>gJ,CrossReference:()=>$J,Disjunction:()=>fJ,EndOfFile:()=>FJ,Grammar:()=>mJ,GrammarImport:()=>yJ,Group:()=>zJ,InferredType:()=>vJ,Interface:()=>xJ,Keyword:()=>GJ,LangiumGrammarAstReflection:()=>ZJ,LangiumGrammarTerminals:()=>iJ,NamedArgument:()=>bJ,NegatedToken:()=>UJ,Negation:()=>wJ,NumberLiteral:()=>kJ,Parameter:()=>TJ,ParameterReference:()=>EJ,ParserRule:()=>CJ,ReferenceType:()=>SJ,RegexToken:()=>qJ,ReturnType:()=>_J,RuleCall:()=>jJ,SimpleType:()=>AJ,StringLiteral:()=>LJ,TerminalAlternatives:()=>WJ,TerminalGroup:()=>YJ,TerminalRule:()=>NJ,TerminalRuleCall:()=>HJ,Type:()=>IJ,TypeAttribute:()=>RJ,TypeDefinition:()=>lJ,UnionType:()=>MJ,UnorderedGroup:()=>VJ,UntilToken:()=>XJ,ValueLiteral:()=>cJ,Wildcard:()=>KJ,isAbstractElement:()=>yQ,isAbstractRule:()=>hQ,isAbstractType:()=>uQ,isAction:()=>GQ,isAlternatives:()=>UQ,isArrayLiteral:()=>vQ,isArrayType:()=>xQ,isAssignment:()=>qQ,isBooleanLiteral:()=>bQ,isCharacterRange:()=>jQ,isCondition:()=>dQ,isConjunction:()=>wQ,isCrossReference:()=>WQ,isDisjunction:()=>kQ,isEndOfFile:()=>YQ,isFeatureName:()=>pQ,isGrammar:()=>TQ,isGrammarImport:()=>EQ,isGroup:()=>HQ,isInferredType:()=>CQ,isInterface:()=>SQ,isKeyword:()=>VQ,isNamedArgument:()=>_Q,isNegatedToken:()=>XQ,isNegation:()=>AQ,isNumberLiteral:()=>LQ,isParameter:()=>NQ,isParameterReference:()=>IQ,isParserRule:()=>RQ,isPrimitiveType:()=>gQ,isReferenceType:()=>MQ,isRegexToken:()=>KQ,isReturnType:()=>DQ,isRuleCall:()=>ZQ,isSimpleType:()=>OQ,isStringLiteral:()=>PQ,isTerminalAlternatives:()=>QQ,isTerminalGroup:()=>JQ,isTerminalRule:()=>BQ,isTerminalRuleCall:()=>eJ,isType:()=>$Q,isTypeAttribute:()=>FQ,isTypeDefinition:()=>fQ,isUnionType:()=>zQ,isUnorderedGroup:()=>tJ,isUntilToken:()=>rJ,isValueLiteral:()=>mQ,isWildcard:()=>nJ,reflection:()=>QJ});var iJ,aJ,sJ,oJ,lJ,cJ,hJ,uJ,dJ,pJ,gJ,fJ,mJ,yJ,vJ,xJ,bJ,wJ,kJ,TJ,EJ,CJ,SJ,_J,AJ,LJ,NJ,IJ,RJ,MJ,DJ,OJ,PJ,BJ,$J,FJ,zJ,GJ,UJ,qJ,jJ,WJ,YJ,HJ,VJ,XJ,KJ,ZJ,QJ,JJ=e(()=>{_Z(),iJ={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]*/},aJ="AbstractRule",mt(hQ,"isAbstractRule"),sJ="AbstractType",mt(uQ,"isAbstractType"),oJ="Condition",mt(dQ,"isCondition"),mt(pQ,"isFeatureName"),mt(gQ,"isPrimitiveType"),lJ="TypeDefinition",mt(fQ,"isTypeDefinition"),cJ="ValueLiteral",mt(mQ,"isValueLiteral"),hJ="AbstractElement",mt(yQ,"isAbstractElement"),uJ="ArrayLiteral",mt(vQ,"isArrayLiteral"),dJ="ArrayType",mt(xQ,"isArrayType"),pJ="BooleanLiteral",mt(bQ,"isBooleanLiteral"),gJ="Conjunction",mt(wQ,"isConjunction"),fJ="Disjunction",mt(kQ,"isDisjunction"),mJ="Grammar",mt(TQ,"isGrammar"),yJ="GrammarImport",mt(EQ,"isGrammarImport"),vJ="InferredType",mt(CQ,"isInferredType"),xJ="Interface",mt(SQ,"isInterface"),bJ="NamedArgument",mt(_Q,"isNamedArgument"),wJ="Negation",mt(AQ,"isNegation"),kJ="NumberLiteral",mt(LQ,"isNumberLiteral"),TJ="Parameter",mt(NQ,"isParameter"),EJ="ParameterReference",mt(IQ,"isParameterReference"),CJ="ParserRule",mt(RQ,"isParserRule"),SJ="ReferenceType",mt(MQ,"isReferenceType"),_J="ReturnType",mt(DQ,"isReturnType"),AJ="SimpleType",mt(OQ,"isSimpleType"),LJ="StringLiteral",mt(PQ,"isStringLiteral"),NJ="TerminalRule",mt(BQ,"isTerminalRule"),IJ="Type",mt($Q,"isType"),RJ="TypeAttribute",mt(FQ,"isTypeAttribute"),MJ="UnionType",mt(zQ,"isUnionType"),DJ="Action",mt(GQ,"isAction"),OJ="Alternatives",mt(UQ,"isAlternatives"),PJ="Assignment",mt(qQ,"isAssignment"),BJ="CharacterRange",mt(jQ,"isCharacterRange"),$J="CrossReference",mt(WQ,"isCrossReference"),FJ="EndOfFile",mt(YQ,"isEndOfFile"),zJ="Group",mt(HQ,"isGroup"),GJ="Keyword",mt(VQ,"isKeyword"),UJ="NegatedToken",mt(XQ,"isNegatedToken"),qJ="RegexToken",mt(KQ,"isRegexToken"),jJ="RuleCall",mt(ZQ,"isRuleCall"),WJ="TerminalAlternatives",mt(QQ,"isTerminalAlternatives"),YJ="TerminalGroup",mt(JQ,"isTerminalGroup"),HJ="TerminalRuleCall",mt(eJ,"isTerminalRuleCall"),VJ="UnorderedGroup",mt(tJ,"isUnorderedGroup"),XJ="UntilToken",mt(rJ,"isUntilToken"),KJ="Wildcard",mt(nJ,"isWildcard"),ZJ=class extends SZ{static{mt(this,"LangiumGrammarAstReflection")}getAllTypes(){return[hJ,aJ,sJ,DJ,OJ,uJ,dJ,PJ,pJ,BJ,oJ,gJ,$J,fJ,FJ,mJ,yJ,zJ,vJ,xJ,GJ,bJ,UJ,wJ,kJ,TJ,EJ,CJ,SJ,qJ,_J,jJ,AJ,LJ,WJ,YJ,NJ,HJ,IJ,RJ,lJ,MJ,VJ,XJ,cJ,KJ]}computeIsSubtype(e,t){switch(e){case DJ:case OJ:case PJ:case BJ:case $J:case FJ:case zJ:case GJ:case UJ:case qJ:case jJ:case WJ:case YJ:case HJ:case VJ:case XJ:case KJ:return this.isSubtype(hJ,t);case uJ:case kJ:case LJ:return this.isSubtype(cJ,t);case dJ:case SJ:case AJ:case MJ:return this.isSubtype(lJ,t);case pJ:return this.isSubtype(oJ,t)||this.isSubtype(cJ,t);case gJ:case fJ:case wJ:case EJ:return this.isSubtype(oJ,t);case vJ:case xJ:case IJ:return this.isSubtype(sJ,t);case CJ:return this.isSubtype(aJ,t)||this.isSubtype(sJ,t);case NJ:return this.isSubtype(aJ,t);default:return!1}}getReferenceType(e){var t=e.container.$type+":"+e.property;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return sJ;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return aJ;case"Grammar:usedGrammars":return mJ;case"NamedArgument:parameter":case"ParameterReference:parameter":return TJ;case"TerminalRuleCall:rule":return NJ;default:throw new Error(t+" is not a valid reference id.")}}getTypeMetaData(e){switch(e){case hJ:return{name:hJ,properties:[{name:"cardinality"},{name:"lookahead"}]};case uJ:return{name:uJ,properties:[{name:"elements",defaultValue:[]}]};case dJ:return{name:dJ,properties:[{name:"elementType"}]};case pJ:return{name:pJ,properties:[{name:"true",defaultValue:!1}]};case gJ:return{name:gJ,properties:[{name:"left"},{name:"right"}]};case fJ:return{name:fJ,properties:[{name:"left"},{name:"right"}]};case mJ:return{name:mJ,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case yJ:return{name:yJ,properties:[{name:"path"}]};case vJ:return{name:vJ,properties:[{name:"name"}]};case xJ:return{name:xJ,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case bJ:return{name:bJ,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case wJ:return{name:wJ,properties:[{name:"value"}]};case kJ:return{name:kJ,properties:[{name:"value"}]};case TJ:return{name:TJ,properties:[{name:"name"}]};case EJ:return{name:EJ,properties:[{name:"parameter"}]};case CJ:return{name:CJ,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case SJ:return{name:SJ,properties:[{name:"referenceType"}]};case _J:return{name:_J,properties:[{name:"name"}]};case AJ:return{name:AJ,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case LJ:return{name:LJ,properties:[{name:"value"}]};case NJ:return{name:NJ,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case IJ:return{name:IJ,properties:[{name:"name"},{name:"type"}]};case RJ:return{name:RJ,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case MJ:return{name:MJ,properties:[{name:"types",defaultValue:[]}]};case DJ:return{name:DJ,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case OJ:return{name:OJ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case PJ:return{name:PJ,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case BJ:return{name:BJ,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case $J:return{name:$J,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case FJ:return{name:FJ,properties:[{name:"cardinality"},{name:"lookahead"}]};case zJ:return{name:zJ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case GJ:return{name:GJ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case UJ:return{name:UJ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case qJ:return{name:qJ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case jJ:return{name:jJ,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case WJ:return{name:WJ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case YJ:return{name:YJ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case HJ:return{name:HJ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case VJ:return{name:VJ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case XJ:return{name:XJ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case KJ:return{name:KJ,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},QJ=new ZJ}),eee={};function tee(n){for(let[r,e]of Object.entries(n))r.startsWith("$")||(Array.isArray(e)?e.forEach((e,t)=>{xZ(e)&&(e.$container=n,e.$containerProperty=r,e.$containerIndex=t)}):xZ(e)&&(e.$container=n,e.$containerProperty=r))}function ree(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function nee(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function iee(e){if(e=aee(e).$document)return e;throw new Error("AST node has no document.")}function aee(e){for(;e.$container;)e=e.$container;return e}function see(i,e){if(!i)throw new Error("Node must be an AstNode.");let a=e?.range;return new IZ(()=>({keys:Object.keys(i),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){var t=e.keys[e.keyIndex];if(!t.startsWith("$")){var r=i[t];if(xZ(r)){if(e.keyIndex++,cee(r,a))return{done:!1,value:r}}else if(Array.isArray(r)){for(;e.arrayIndex<r.length;){var n=r[e.arrayIndex++];if(xZ(n)&&cee(n,a))return{done:!1,value:n}}e.arrayIndex=0}}e.keyIndex++}return MZ})}function oee(e,t){if(e)return new DZ(e,e=>see(e,t));throw new Error("Root node must be an AstNode.")}function lee(e,t){if(e)return t?.range&&!cee(e,t.range)?new DZ(e,()=>[]):new DZ(e,e=>see(e,t),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function cee(e,t){return!t||!!(e=null==(e=e.$cstNode)?void 0:e.range)&&jZ(e,t)}function hee(a){return new IZ(()=>({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(bZ(r))return e.keyIndex++,{done:!1,value:{reference:r,container:a,property:t}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){var n=e.arrayIndex++,i=r[n];if(bZ(i))return{done:!1,value:{reference:i,container:a,property:t,index:n}}}e.arrayIndex=0}}e.keyIndex++}return MZ})}function uee(t,e=iee(t).parseResult.value){let r=[];return lee(e).forEach(e=>{hee(e).forEach(e=>{e.reference.ref===t&&r.push(e.reference)})}),NZ(r)}function dee(e,t){var r,n=t;for(r of e.getTypeMetaData(t.$type).properties)void 0!==r.defaultValue&&void 0===n[r.name]&&(n[r.name]=pee(r.defaultValue))}function pee(e){return Array.isArray(e)?[...e.map(pee)]:e}function gee(e,t){var r,n,i={$type:e.$type};for([r,n]of Object.entries(e))if(!r.startsWith("$"))if(xZ(n))i[r]=gee(n,t);else if(bZ(n))i[r]=t(i,r,n.$refNode,n.$refText);else if(Array.isArray(n)){var a,s=[];for(a of n)xZ(a)?s.push(gee(a,t)):bZ(a)?s.push(t(i,r,a.$refNode,a.$refText)):s.push(a);i[r]=s}else i[r]=n;return tee(i),i}$Be(eee,{assignMandatoryProperties:()=>dee,copyAstNode:()=>gee,findLocalReferences:()=>uee,findRootNode:()=>aee,getContainerOfType:()=>ree,getDocument:()=>iee,hasContainerOfType:()=>nee,linkContentToContainer:()=>tee,streamAllContents:()=>oee,streamAst:()=>lee,streamContents:()=>see,streamReferences:()=>hee});var fee=e(()=>{_Z(),PZ(),aQ(),mt(tee,"linkContentToContainer"),mt(ree,"getContainerOfType"),mt(nee,"hasContainerOfType"),mt(iee,"getDocument"),mt(aee,"findRootNode"),mt(see,"streamContents"),mt(oee,"streamAllContents"),mt(lee,"streamAst"),mt(cee,"isAstNodeInRange"),mt(hee,"streamReferences"),mt(uee,"findLocalReferences"),mt(dee,"assignMandatoryProperties"),mt(pee,"copyDefaultValue"),mt(gee,"copyAstNode")});function mee(e){return e.charCodeAt(0)}function yee(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function vee(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function xee(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function bee(){throw Error("Internal Error - Should never get here!")}function wee(e){return"Character"===e.type}var kee,Tee,Eee,Cee,See,_ee,Aee,Lee,Nee=e(()=>{mt(mee,"cc"),mt(yee,"insertToSet"),mt(vee,"addFlag"),mt(xee,"ASSERT_EXISTS"),mt(bee,"ASSERT_NEVER_REACH_HERE"),mt(wee,"isCharacter")}),Iee=e(()=>{Nee(),kee=[];for(let e=mee("0");e<=mee("9");e++)kee.push(e);Tee=[mee("_")].concat(kee);for(let e=mee("a");e<=mee("z");e++)Tee.push(e);for(let e=mee("A");e<=mee("Z");e++)Tee.push(e);Eee=[mee(" "),mee("\f"),mee(`
|
||
`),mee("\r"),mee("\t"),mee("\v"),mee("\t"),mee(" "),mee(" "),mee(" "),mee(" "),mee(" "),mee(" "),mee(" "),mee(" "),mee(" "),mee(" "),mee(" "),mee(" "),mee(" "),mee("\u2028"),mee("\u2029"),mee(" "),mee(" "),mee(" "),mee("\ufeff")]}),Ree=e(()=>{Nee(),Iee(),Cee=/[0-9a-fA-F]/,See=/[0-9]/,_ee=/[1-9]/,Aee=class{static{mt(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");for(var t=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":vee(r,"global");break;case"i":vee(r,"ignoreCase");break;case"m":vee(r,"multiLine");break;case"u":vee(r,"unicode");break;case"y":vee(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"}xee(e);var r=this.disjunction();return this.consumeChar(")"),{type:e,value:r,loc:this.loc(t)}}return bee()}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 n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":t=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;xee(t)}if((!0!==e||void 0!==t)&&xee(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 xee(e=void 0===e&&this.isPatternCharacter()?this.patternCharacter():e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):bee()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[mee(`
|
||
`),mee("\r"),mee("\u2028"),mee("\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=kee;break;case"D":e=kee,t=!0;break;case"s":e=Eee;break;case"S":e=Eee,t=!0;break;case"w":e=Tee;break;case"W":e=Tee,t=!0}return xee(e)?{type:"Set",value:e,complement:t}:bee()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=mee("\f");break;case"n":e=mee(`
|
||
`);break;case"r":e=mee("\r");break;case"t":e=mee("\t");break;case"v":e=mee("\v")}return xee(e)?{type:"Character",value:e}:bee()}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:mee("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:mee(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
||
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:mee(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,wee(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,wee(n)){if(n.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:n.value})}else yee(r.value,e),e.push(mee("-")),yee(n.value,e)}else yee(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:mee("\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===_ee.test(e))throw Error("Expecting a positive integer");for(;See.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===See.test(e))throw Error("Expecting an integer");for(;See.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:mee(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 See.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));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 n=this.popChar();if(!1===Cee.test(n))throw Error("Expecting a HexDecimal digits");r+=n}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}}}}),Mee=e(()=>{Lee=class{static{mt(this,"BaseRegExpVisitor")}visitChildren(e){for(var t in e){var r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(e=>{this.visit(e)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"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){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}}),Dee=e(()=>{Ree(),Mee()}),Oee={};function Pee(e){try{e=`/${e="string"!=typeof e?e.source:e}/`;var t,r=jee.pattern(e),n=[];for(t of r.value.value)Yee.reset(e),Yee.visit(t),n.push({start:Yee.startRegexp,end:Yee.endRegex});return n}catch{return[]}}function Bee(e){try{return e=(e="string"==typeof e?new RegExp(e):e).toString(),Yee.reset(e),Yee.visit(jee.pattern(e)),Yee.multiline}catch{return!1}}function $ee(e){let t="string"==typeof e?new RegExp(e):e;return Hee.some(e=>t.test(e))}function Fee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function zee(e){return Array.prototype.map.call(e,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:Fee(e)).join("")}function Gee(e,t){return e=Uee(e),!!(t=t.match(e))&&0<t[0].length}function Uee(e){let i=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 n(e){t+="(?:"+a.substr(s,e)+"|$)",s+=e}for(mt(r,"appendRaw"),mt(n,"appendOptional");s<a.length;)switch(a[s]){case"\\":switch(a[s+1]){case"c":n(3);break;case"x":n(4);break;case"u":i.unicode?"{"===a[s+2]?n(a.indexOf("}",s)-s+1):n(6):n(2);break;case"p":case"P":i.unicode?n(a.indexOf("}",s)-s+1):n(2);break;case"k":n(a.indexOf(">",s)-s+1);break;default:n(2)}break;case"[":(e=/\[(?:\\.|.)*?\]/g).lastIndex=s,n((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):n(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:n(1)}return t}return mt(o,"process"),new RegExp(o(),e.flags)}$Be(Oee,{NEWLINE_REGEXP:()=>qee,escapeRegExp:()=>Fee,getCaseInsensitivePattern:()=>zee,getTerminalParts:()=>Pee,isMultilineComment:()=>Bee,isWhitespace:()=>$ee,partialMatches:()=>Gee,partialRegExp:()=>Uee,whitespaceCharacters:()=>Hee});var qee,jee,Wee,Yee,Hee,Vee=e(()=>{Dee(),qee=/\r?\n/gm,jee=new Aee,Wee=class extends Lee{static{mt(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){var t=String.fromCharCode(e.value);this.multiline||t!==`
|
||
`||(this.multiline=!0),e.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=Fee(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)}},Yee=new Wee,mt(Pee,"getTerminalParts"),mt(Bee,"isMultilineComment"),Hee=`
|
||
\r
`.split(""),mt($ee,"isWhitespace"),mt(Fee,"escapeRegExp"),mt(zee,"getCaseInsensitivePattern"),mt(Gee,"partialMatches"),mt(Uee,"partialRegExp")}),Xee={};function Kee(e){return e.rules.find(e=>RQ(e)&&e.entry)}function Zee(e){return e.rules.filter(e=>BQ(e)&&e.hidden)}function Qee(e,t){var r,n=new Set,i=Kee(e);if(!i)return new Set(e.rules);for(r of[i].concat(Zee(e)))Jee(r,n,t);var a,s=new Set;for(a of e.rules)(n.has(a.name)||BQ(a)&&a.hidden)&&s.add(a);return s}function Jee(e,t,r){t.add(e.name),oee(e).forEach(e=>{(ZQ(e)||r&&eJ(e))&&(e=e.rule.ref)&&!t.has(e.name)&&Jee(e,t,r)})}function ete(e){return e.terminal||(e.type.ref?cte(e.type.ref)?.terminal:void 0)}function tte(e){return e.hidden&&!$ee(Ete(e))}function rte(e,t){return e&&t?ite(e,t,e.astNode,!0):[]}function nte(e,t,r){return e&&t&&0!==(t=ite(e,t,e.astNode,!0)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function ite(e,t,r,n){return!n&&(n=ree(e.grammarSource,qQ))&&n.feature===t?[e]:TZ(e)&&e.astNode===r?e.content.flatMap(e=>ite(e,t,r,!1)):[]}function ate(e,t){return e?ote(e,t,e?.astNode):[]}function ste(e,t,r){return e&&0!==(t=ote(e,t,e?.astNode)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function ote(e,t,r){if(e.astNode!==r)return[];if(VQ(e.grammarSource)&&e.grammarSource.value===t)return[e];for(var n,i,a=$Z(e).iterator(),s=[];(i=a.next()).done||((n=i.value).astNode===r?VQ(n.grammarSource)&&n.grammarSource.value===t&&s.push(n):a.prune()),!i.done;);return s}function lte(e){for(var t=e.astNode;t===(null==(r=e.container)?void 0:r.astNode);){var r=ree(e.grammarSource,qQ);if(r)return r;e=e.container}}function cte(e){let t=e;return CQ(t)&&(GQ(t.$container)?t=t.$container.$container:RQ(t.$container)?t=t.$container:sQ(t.$container)),hte(e,t,new Map)}function hte(n,e,i){var t,r;function a(e,t){let r;return ree(e,qQ)||(r=hte(t,t,i)),i.set(n,r),r}if(mt(a,"go"),i.has(n))return i.get(n);i.set(n,void 0);for(r of oee(e)){if(qQ(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(ZQ(r)&&RQ(r.rule.ref))return a(r,r.rule.ref);if(OQ(r)&&null!=(t=r.typeRef)&&t.ref)return a(r,r.typeRef.ref)}}function ute(t){var e=t.$container;if(HQ(e)){var r=e.elements;for(let e=r.indexOf(t)-1;0<=e;e--){var n=r[e];if(GQ(n))return n;if(n=oee(r[e]).find(GQ))return n}}if(yQ(e))return ute(e)}function dte(e,t){return"?"===e||"*"===e||HQ(t)&&!!t.guardCondition}function pte(e){return"*"===e||"+"===e}function gte(e){return"+="===e}function fte(e){return mte(e,new Set)}function mte(e,t){if(t.has(e))return!0;t.add(e);for(var r of oee(e))if(ZQ(r)){if(!r.rule.ref||RQ(r.rule.ref)&&!mte(r.rule.ref,t))return!1}else{if(qQ(r))return!1;if(GQ(r))return!1}return!!e.definition}function yte(e){return vte(e.type,new Set)}function vte(e,t){return!!t.has(e)||(t.add(e),!xQ(e)&&!MQ(e)&&(zQ(e)?e.types.every(e=>vte(e,t)):!!OQ(e)&&(void 0!==e.primitiveType||void 0!==e.stringType||void 0!==e.typeRef&&!!$Q(e=e.typeRef.ref)&&vte(e.type,t))))}function xte(e){return e.inferredType?e.inferredType.name:e.dataType||(e.returnType&&(e=e.returnType.ref)&&(RQ(e)||SQ(e)||$Q(e))?e.name:void 0)}function bte(e){if(RQ(e))return fte(e)||null==(t=xte(e))?e.name:t;if(SQ(e)||$Q(e)||DQ(e))return e.name;if(GQ(e)){var t=wte(e);if(t)return t}else if(CQ(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function wte(e){var t;return e.inferredType?e.inferredType.name:null!=(t=e.type)&&t.ref?bte(e.type.ref):void 0}function kte(e){var t;return BQ(e)?null!=(t=null==(t=e.type)?void 0:t.name)?t:"string":fte(e)||null==(t=xte(e))?e.name:t}function Tte(e){var t;return BQ(e)?null!=(t=null==(t=e.type)?void 0:t.name)?t:"string":null!=(t=xte(e))?t:e.name}function Ete(e){var e=Cte(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 Cte(e,t){if(QQ(e))return Ste(e);if(JQ(e))return _te(e);if(jQ(e))return Nte(e);if(eJ(e)){var r=e.rule.ref;if(r)return Rte(Cte(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error("Missing rule reference.")}if(XQ(e))return Lte(e);if(rJ(e))return Ate(e);var n;if(KQ(e))return r=e.regex.lastIndexOf("/"),n=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")),Rte(n,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1});if(nJ(e))return Rte(Mte,{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error("Invalid terminal element: "+e?.$type)}function Ste(e){return Rte(e.elements.map(e=>Cte(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead})}function _te(e){return Rte(e.elements.map(e=>Cte(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead})}function Ate(e){return Rte(Mte+"*?"+Cte(e.terminal),{cardinality:e.cardinality,lookahead:e.lookahead})}function Lte(e){return Rte(`(?!${Cte(e.terminal)})${Mte}*?`,{cardinality:e.cardinality,lookahead:e.lookahead})}function Nte(e){return e.right?Rte(`[${Ite(e.left)}-${Ite(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1}):Rte(Ite(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1})}function Ite(e){return Fee(e.value)}function Rte(e,t){var r;return!1===t.wrap&&!t.lookahead||(e=`(${null!=(r=t.lookahead)?r:""}${e})`),t.cardinality?""+e+t.cardinality:e}$Be(Xee,{findAssignment:()=>lte,findNameAssignment:()=>cte,findNodeForKeyword:()=>ste,findNodeForProperty:()=>nte,findNodesForKeyword:()=>ate,findNodesForKeywordInternal:()=>ote,findNodesForProperty:()=>rte,getActionAtElement:()=>ute,getActionType:()=>wte,getAllReachableRules:()=>Qee,getCrossReferenceTerminal:()=>ete,getEntryRule:()=>Kee,getExplicitRuleType:()=>xte,getHiddenRules:()=>Zee,getRuleType:()=>Tte,getRuleTypeName:()=>kte,getTypeName:()=>bte,isArrayCardinality:()=>pte,isArrayOperator:()=>gte,isCommentTerminal:()=>tte,isDataType:()=>yte,isDataTypeRule:()=>fte,isOptionalCardinality:()=>dte,terminalRegex:()=>Ete});var Mte,Dte=e(()=>{lQ(),JJ(),_Z(),fee(),aQ(),Vee(),mt(Kee,"getEntryRule"),mt(Zee,"getHiddenRules"),mt(Qee,"getAllReachableRules"),mt(Jee,"ruleDfs"),mt(ete,"getCrossReferenceTerminal"),mt(tte,"isCommentTerminal"),mt(rte,"findNodesForProperty"),mt(nte,"findNodeForProperty"),mt(ite,"findNodesForPropertyInternal"),mt(ate,"findNodesForKeyword"),mt(ste,"findNodeForKeyword"),mt(ote,"findNodesForKeywordInternal"),mt(lte,"findAssignment"),mt(cte,"findNameAssignment"),mt(hte,"findNameAssignmentInternal"),mt(ute,"getActionAtElement"),mt(dte,"isOptionalCardinality"),mt(pte,"isArrayCardinality"),mt(gte,"isArrayOperator"),mt(fte,"isDataTypeRule"),mt(mte,"isDataTypeRuleInternal"),mt(yte,"isDataType"),mt(vte,"isDataTypeInternal"),mt(xte,"getExplicitRuleType"),mt(bte,"getTypeName"),mt(wte,"getActionType"),mt(kte,"getRuleTypeName"),mt(Tte,"getRuleType"),mt(Ete,"terminalRegex"),Mte=/[\s\S]/.source,mt(Cte,"abstractElementToRegex"),mt(Ste,"terminalAlternativesToRegex"),mt(_te,"terminalGroupToRegex"),mt(Ate,"untilTokenToRegex"),mt(Lte,"negateTokenToRegex"),mt(Nte,"characterRangeToRegex"),mt(Ite,"keywordToRegex"),mt(Rte,"withCardinality")});function Ote(e){var t,r=[];for(t of e.Grammar.rules)BQ(t)&&tte(t)&&Bee(Ete(t))&&r.push(t.name);return{multilineCommentRules:r,nameRegexp:iQ}}var Pte=e(()=>{aQ(),Dte(),Vee(),JJ(),mt(Ote,"createGrammarConfig")}),Bte=e(()=>{});function $te(e){console&&console.error&&console.error("Error: "+e)}function Fte(e){console&&console.warn&&console.warn("Warning: "+e)}var zte=e(()=>{mt($te,"PRINT_ERROR"),mt(Fte,"PRINT_WARNING")});function Gte(e){var t=(new Date).getTime(),e=e();return{time:(new Date).getTime()-t,value:e}}var Ute=e(()=>{mt(Gte,"timer")});function qte(e){function t(){}mt(t,"FakeConstructor"),t.prototype=e;let r=new t;function n(){return typeof r.bar}return mt(n,"fakeAccess"),n(),n(),e}var jte=e(()=>{mt(qte,"toFastProperties")}),Wte=e(()=>{zte(),Ute(),jte()});function Yte(e){return Hte(e)?e.LABEL:e.name}function Hte(e){return Hq(e.LABEL)&&""!==e.LABEL}function Vte(e){return x(e,Xte)}function Xte(e){function t(e){return x(e,Xte)}var r,n;if(mt(t,"convertDefinition"),e instanceof Zte)return r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx},Hq(e.label)&&(r.label=e.label),r;if(e instanceof Jte)return{type:"Alternative",definition:t(e.definition)};if(e instanceof ere)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof tre)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof rre)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Xte(new sre({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof ire)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Xte(new sre({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof nre)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof are)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof sre)return r={type:"Terminal",name:e.terminalType.name,label:Yte(e.terminalType),idx:e.idx},Hq(e.label)&&(r.terminalLabel=e.label),n=e.terminalType.PATTERN,e.terminalType.PATTERN&&(r.pattern=yj(n)?n.source:n),r;if(e instanceof Qte)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var Kte,Zte,Qte,Jte,ere,tre,rre,nre,ire,are,sre,ore,lre=e(()=>{BY(),mt(Yte,"tokenLabel"),mt(Hte,"hasTokenLabel"),Kte=class{static{mt(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(t){t.visit(this),v(this.definition,e=>{e.accept(t)})}},Zte=class extends Kte{static{mt(this,"NonTerminal")}constructor(e){super([]),this.idx=1,dB(this,Zj(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Qte=class extends Kte{static{mt(this,"Rule")}constructor(e){super(e.definition),this.orgText="",dB(this,Zj(e,e=>void 0!==e))}},Jte=class extends Kte{static{mt(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,dB(this,Zj(e,e=>void 0!==e))}},ere=class extends Kte{static{mt(this,"Option")}constructor(e){super(e.definition),this.idx=1,dB(this,Zj(e,e=>void 0!==e))}},tre=class extends Kte{static{mt(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,dB(this,Zj(e,e=>void 0!==e))}},rre=class extends Kte{static{mt(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,dB(this,Zj(e,e=>void 0!==e))}},nre=class extends Kte{static{mt(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,dB(this,Zj(e,e=>void 0!==e))}},ire=class extends Kte{static{mt(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,dB(this,Zj(e,e=>void 0!==e))}},are=class extends Kte{static{mt(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,dB(this,Zj(e,e=>void 0!==e))}},sre=class{static{mt(this,"Terminal")}constructor(e){this.idx=1,dB(this,Zj(e,e=>void 0!==e))}accept(e){e.visit(this)}},mt(Vte,"serializeGrammar"),mt(Xte,"serializeProduction")}),cre=e(()=>{lre(),ore=class{static{mt(this,"GAstVisitor")}visit(e){var t=e;switch(t.constructor){case Zte:return this.visitNonTerminal(t);case Jte:return this.visitAlternative(t);case ere:return this.visitOption(t);case tre:return this.visitRepetitionMandatory(t);case rre:return this.visitRepetitionMandatoryWithSeparator(t);case ire:return this.visitRepetitionWithSeparator(t);case nre:return this.visitRepetition(t);case are:return this.visitAlternation(t);case sre:return this.visitTerminal(t);case Qte:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}});function hre(e){return e instanceof Jte||e instanceof ere||e instanceof nre||e instanceof tre||e instanceof rre||e instanceof ire||e instanceof sre||e instanceof Qte}function ure(e,t=[]){return e instanceof ere||e instanceof nre||e instanceof ire||(e instanceof are?oY(e.definition,e=>ure(e,t)):!(e instanceof Zte&&nj(t,e))&&e instanceof Kte&&(e instanceof Zte&&t.push(e),XU(e.definition,e=>ure(e,t))))}function dre(e){return e instanceof are}function pre(e){if(e instanceof Zte)return"SUBRULE";if(e instanceof ere)return"OPTION";if(e instanceof are)return"OR";if(e instanceof tre)return"AT_LEAST_ONE";if(e instanceof rre)return"AT_LEAST_ONE_SEP";if(e instanceof ire)return"MANY_SEP";if(e instanceof nre)return"MANY";if(e instanceof sre)return"CONSUME";throw Error("non exhaustive match")}var gre=e(()=>{BY(),lre(),mt(hre,"isSequenceProd"),mt(ure,"isOptionalProd"),mt(dre,"isBranchingProd"),mt(pre,"getProductionDslName")}),fre=e(()=>{lre(),cre(),gre()});function mre(e,t,r){return[new ere({definition:[new sre({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var yre,vre=e(()=>{BY(),fre(),yre=class{static{mt(this,"RestWalker")}walk(r,n=[]){v(r.definition,(e,t)=>{if(t=IU(r.definition,t+1),e instanceof Zte)this.walkProdRef(e,t,n);else if(e instanceof sre)this.walkTerminal(e,t,n);else if(e instanceof Jte)this.walkFlat(e,t,n);else if(e instanceof ere)this.walkOption(e,t,n);else if(e instanceof tre)this.walkAtLeastOne(e,t,n);else if(e instanceof rre)this.walkAtLeastOneSep(e,t,n);else if(e instanceof ire)this.walkManySep(e,t,n);else if(e instanceof nre)this.walkMany(e,t,n);else{if(!(e instanceof are))throw Error("non exhaustive match");this.walkOr(e,t,n)}})}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 ere({definition:e.definition})].concat(t,r),this.walk(e,t)}walkAtLeastOneSep(e,t,r){t=mre(e,t,r),this.walk(e,t)}walkMany(e,t,r){t=[new ere({definition:e.definition})].concat(t,r),this.walk(e,t)}walkManySep(e,t,r){t=mre(e,t,r),this.walk(e,t)}walkOr(e,t,r){let n=t.concat(r);v(e.definition,e=>{e=new Jte({definition:[e]}),this.walk(e,n)})}},mt(mre,"restForRepetitionWithSeparator")});function xre(e){if(e instanceof Zte)return xre(e.referencedRule);if(e instanceof sre)return kre(e);if(hre(e))return bre(e);if(dre(e))return wre(e);throw Error("non exhaustive match")}function bre(e){let t=[],r=e.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=ure(a),t=t.concat(xre(a)),n+=1,i=r.length>n;return kY(t)}function wre(e){return e=x(e.definition,e=>xre(e)),kY(e$(e))}function kre(e){return[e.terminalType]}var Tre,Ere=e(()=>{BY(),fre(),mt(xre,"first"),mt(bre,"firstForSequence"),mt(wre,"firstForBranching"),mt(kre,"firstForTerminal")}),Cre=e(()=>{Tre="_~IN~_"});function Sre(e){let t={};return v(e,e=>{e=new Are(e).startWalking(),dB(t,e)}),t}function _re(e,t){return e.name+t+Tre}var Are,Lre=e(()=>{vre(),Ere(),BY(),Cre(),fre(),Are=class extends yre{static{mt(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){e=_re(e.referencedRule,e.idx)+this.topProd.name,t=t.concat(r),r=xre(new Jte({definition:t})),this.follows[e]=r}},mt(Sre,"computeAllProdsFollows"),mt(_re,"buildBetweenProdsFollowPrefix")});function Nre(e){var t,e=e.toString();return Rre.hasOwnProperty(e)?Rre[e]:(t=Mre.pattern(e),Rre[e]=t)}function Ire(){Rre={}}var Rre,Mre,Dre=e(()=>{Dee(),Rre={},Mre=new Aee,mt(Nre,"getRegExpAst"),mt(Ire,"clearRegExpParserCache")});function Ore(e,t=!1){try{var r=Nre(e);return Pre(r.value,{},r.flags.ignoreCase)}catch(r){r.message===Ure?t&&Fte(`${qre} 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.`:"",$te(`${qre}
|
||
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 Pre(t,i,a){switch(t.type){case"Disjunction":for(let e=0;e<t.value.length;e++)Pre(t.value[e],i,a);break;case"Alternative":var r=t.value;for(let e=0;e<r.length;e++){var n=r[e];switch(n.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var s=n;switch(s.type){case"Character":Bre(s.value,i,a);break;case"Set":if(!0===s.complement)throw Error(Ure);v(s.value,t=>{if("number"==typeof t)Bre(t,i,a);else{var r=t;if(!0===a)for(let e=r.from;e<=r.to;e++)Bre(e,i,a);else{for(let e=r.from;e<=r.to&&e<_ne;e++)Bre(e,i,a);if(r.to>=_ne){var t=r.from>=_ne?r.from:_ne,e=r.to,t=vne(t),n=vne(e);for(let e=t;e<=n;e++)i[e]=e}}}});break;case"Group":Pre(s.value,i,a);break;default:throw Error("Non Exhaustive Match")}if(n=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===zre(s)||"Group"!==s.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return Jq(i)}function Bre(e,t,r){var n=vne(e);t[n]=n,!0===r&&$re(e,t)}function $re(e,t){var r=(e=String.fromCharCode(e)).toUpperCase();r!==e?t[r=vne(r.charCodeAt(0))]=r:(r=e.toLowerCase())!==e&&(t[e=vne(r.charCodeAt(0))]=e)}function Fre(e,r){return hq(e.value,e=>{if("number"==typeof e)return nj(r,e);{let t=e;return void 0!==hq(r,e=>t.from<=e&&e<=t.to)}})}function zre(e){var t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(i8(e.value)?XU(e.value,zre):zre(e.value))}function Gre(t,e){var r,n;return e instanceof RegExp?(r=Nre(e),(n=new jre(t)).visit(r),n.found):void 0!==hq(e,e=>nj(t,e.charCodeAt(0)))}var Ure,qre,jre,Wre=e(()=>{Dee(),BY(),Wte(),Dre(),Lne(),Ure="Complement Sets are not supported for first char optimization",qre=`Unable to use "first char" lexer optimizations:
|
||
`,mt(Ore,"getOptimizedStartCodesIndices"),mt(Pre,"firstCharOptimizedIndices"),mt(Bre,"addOptimizedIdxToResult"),mt($re,"handleIgnoreCase"),mt(Fre,"findCode"),mt(zre,"isWholeOptional"),jre=class extends Lee{static{mt(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}super.visitChildren(e)}}visitCharacter(e){nj(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===Fre(e,this.targetCharCodes)&&(this.found=!0):void 0!==Fre(e,this.targetCharCodes)&&(this.found=!0)}},mt(Gre,"canMatchCharCode")});function Yre(e,i){var t=(i=gU(i,{useSticky:Tne,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
||
`],tracer:mt((e,t)=>t(),"tracer")})).tracer;t("initCharCodeToOptimizedIndexMap",()=>{xne()});let r,n=(t("Reject Lexer.NA",()=>{r=QW(e,e=>e[bne]===Vne.NA)}),!1),a;t("Transform Patterns",()=>{n=!1,a=x(r,e=>{var t,e=e[bne];if(yj(e))return 1!==(t=e.source).length||"^"===t||"$"===t||"."===t||e.ignoreCase?2!==t.length||"\\"!==t[0]||nj(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?(i.useSticky?lne:one)(e):t[1]:t;if(M6(e))return n=!0,{exec:e};if("object"==typeof e)return n=!0,e;if("string"==typeof e)return 1===e.length?e:(t=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),e=new RegExp(t),(i.useSticky?lne:one)(e));throw Error("non exhaustive match")})});let s,o,l,c,h;t("misc mapping",()=>{s=x(r,e=>e.tokenTypeIdx),o=x(r,e=>{if((e=e.GROUP)!==Vne.SKIPPED){if(Hq(e))return e;if(wj(e))return!1;throw Error("non exhaustive match")}}),l=x(r,e=>{if(e=e.LONGER_ALT)return i8(e)?x(e,e=>oj(r,e)):[oj(r,e)]}),c=x(r,e=>e.PUSH_MODE),h=x(r,e=>jq(e,"POP_MODE"))});let u;t("Line Terminator Handling",()=>{let t=mne(i.lineTerminatorCharacters);u=x(r,e=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,e=>jq(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===gne(e,t)&&Gre(t,e.PATTERN)))});let d,p,g,f,m=(t("Misc Mapping #2",()=>{d=x(r,dne),p=x(a,pne),g=XW(r,(e,t)=>(t=t.GROUP,Hq(t)&&t!==Vne.SKIPPED&&(e[t]=[]),e),{}),f=x(a,(e,t)=>({pattern:a[t],longerAlt:l[t],canLineTerminator:u[t],isCustom:d[t],short:p[t],group:o[t],push:c[t],pop:h[t],tokenTypeIdx:s[t],tokenType:r[t]}))}),!0),y=[];return i.safeMode||t("First Char Optimization",()=>{y=XW(r,(r,e,n)=>{if("string"==typeof e.PATTERN){var t=vne(e.PATTERN.charCodeAt(0));yne(r,t,f[n])}else if(i8(e.START_CHARS_HINT)){let t;v(e.START_CHARS_HINT,e=>{e=vne("string"==typeof e?e.charCodeAt(0):e),t!==e&&(t=e,yne(r,e,f[n]))})}else yj(e.PATTERN)?e.PATTERN.unicode?(m=!1,i.ensureOptimizations&&$te(`${qre} 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=Ore(e.PATTERN,i.ensureOptimizations),dj(t)&&(m=!1),v(t,e=>{yne(r,e,f[n])})):(i.ensureOptimizations&&$te(`${qre} 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:n,canBeOptimized:m}}function Hre(e,t){let r=[],n=Xre(e);r=r.concat(n.errors);var i=(e=Kre(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(e.errors)).concat(Vre(i))).concat(rne(i))).concat(nne(i,t))).concat(ine(i))}function Vre(e){let t=[],r=tq(e,e=>yj(e[bne]));return t=(t=(t=(t=(t=t.concat(Zre(r))).concat(Jre(r))).concat(ene(r))).concat(tne(r))).concat(Qre(r))}function Xre(e){var t=tq(e,e=>!jq(e,bne));return{errors:x(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:Yne.MISSING_PATTERN,tokenTypes:[e]})),valid:EU(e,t)}}function Kre(e){var t=tq(e,e=>(e=e[bne],!(yj(e)||M6(e)||jq(e,"exec")||Hq(e))));return{errors:x(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Yne.INVALID_PATTERN,tokenTypes:[e]})),valid:EU(e,t)}}function Zre(e){class n extends Lee{static{mt(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e=tq(e,e=>{e=e.PATTERN;try{var t=Nre(e),r=new n;return r.visit(t),r.found}catch{return Ene.test(e.source)}}),x(e,e=>({message:`Unexpected RegExp Anchor Error:
|
||
Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
||
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Yne.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Qre(e){return e=tq(e,e=>e.PATTERN.test("")),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:Yne.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}function Jre(e){class n extends Lee{static{mt(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e=tq(e,e=>{e=e.PATTERN;try{var t=Nre(e),r=new n;return r.visit(t),r.found}catch{return Cne.test(e.source)}}),x(e,e=>({message:`Unexpected RegExp Anchor Error:
|
||
Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
||
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Yne.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function ene(e){return e=tq(e,e=>(e=e[bne])instanceof RegExp&&(e.multiline||e.global)),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Yne.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function tne(e){let n=[],t=x(e,r=>XW(e,(e,t)=>(r.PATTERN.source!==t.PATTERN.source||nj(n,t)||t.PATTERN===Vne.NA||(n.push(t),e.push(t)),e),[]));t=gz(t);var r=tq(t,e=>1<e.length);return x(r,e=>{var t=x(e,e=>e.name);return{message:`The same RegExp pattern ->${gq(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:Yne.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function rne(e){return e=tq(e,e=>!!jq(e,"GROUP")&&(e=e.GROUP)!==Vne.SKIPPED&&e!==Vne.NA&&!Hq(e)),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Yne.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function nne(e,t){return e=tq(e,e=>void 0!==e.PUSH_MODE&&!nj(t,e.PUSH_MODE)),x(e,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:Yne.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function ine(e){let a=[],t=XW(e,(e,t,r)=>{var n=t.PATTERN;return n!==Vne.NA&&(Hq(n)?e.push({str:n,idx:r,tokenType:t}):yj(n)&&sne(n)&&e.push({str:n.source,idx:r,tokenType:t})),e},[]);return v(e,(n,i)=>{v(t,({str:e,idx:t,tokenType:r})=>{i<t&&ane(e,n.PATTERN)&&(t=`Token: ->${r.name}<- can never be matched.
|
||
Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
|
||
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:t,type:Yne.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function ane(e,t){var r;if(yj(t))return null!==(r=t.exec(e))&&0===r.index;if(M6(t))return t(e,0,[],{});if(jq(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function sne(t){return void 0===hq([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==t.source.indexOf(e))}function one(e){var t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function lne(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function cne(e,t,r){let i=[];return jq(e,wne)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+wne+`> property in its definition
|
||
`,type:Yne.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),jq(e,kne)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+kne+`> property in its definition
|
||
`,type:Yne.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),jq(e,kne)&&jq(e,wne)&&!jq(e.modes,e.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${wne}: <${e.defaultMode}>which does not exist
|
||
`,type:Yne.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),jq(e,kne)&&v(e.modes,(r,n)=>{v(r,(t,e)=>{wj(t)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${e}>
|
||
`,type:Yne.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):jq(t,"LONGER_ALT")&&(e=i8(t.LONGER_ALT)?t.LONGER_ALT:[t.LONGER_ALT],v(e,e=>{wj(e)||nj(r,e)||i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${e.name}> on token <${t.name}> outside of mode <${n}>
|
||
`,type:Yne.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function hne(e,t,r){let n=[],i=!1,a=gz(e$(Jq(e.modes))),s=QW(a,e=>e[bne]===Vne.NA),o=mne(r);return t&&v(s,e=>{var t=gne(e,o);!1!==t?(t={message:fne(e,t),type:t.issue,tokenType:e},n.push(t)):jq(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):Gre(o,e.PATTERN)&&(i=!0)}),t&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
|
||
This Lexer has been defined to track line and column information,
|
||
But none of the Token Types can be identified as matching a line terminator.
|
||
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
||
for details.`,type:Yne.NO_LINE_BREAKS_FLAGS}),n}function une(r){let n={},e=cB(r);return v(e,e=>{var t=r[e];if(!i8(t))throw Error("non exhaustive match");n[e]=[]}),n}function dne(e){if(e=e.PATTERN,yj(e))return!1;if(M6(e))return!0;if(jq(e,"exec"))return!0;if(Hq(e))return!1;throw Error("non exhaustive match")}function pne(e){return!(!Hq(e)||1!==e.length)&&e.charCodeAt(0)}function gne(e,t){if(jq(e,"LINE_BREAKS"))return!1;if(yj(e.PATTERN)){try{Gre(t,e.PATTERN)}catch(e){return{issue:Yne.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(Hq(e.PATTERN))return!1;if(dne(e))return{issue:Yne.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function fne(e,t){if(t.issue===Yne.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===Yne.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 mne(e){return x(e,e=>Hq(e)?e.charCodeAt(0):e)}function yne(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function vne(e){return e<_ne?e:Ane[e]}function xne(){if(dj(Ane)){Ane=new Array(65536);for(let e=0;e<65536;e++)Ane[e]=255<e?255+~~(e/255):e}}var bne,wne,kne,Tne,Ene,Cne,Sne,_ne,Ane,Lne=e(()=>{Dee(),Zne(),BY(),Wte(),Wre(),Dre(),bne="PATTERN",wne="defaultMode",kne="modes",Tne="boolean"==typeof new RegExp("(?:)").sticky,mt(Yre,"analyzeTokenTypes"),mt(Hre,"validatePatterns"),mt(Vre,"validateRegExpPattern"),mt(Xre,"findMissingPatterns"),mt(Kre,"findInvalidPatterns"),Ene=/[^\\][$]/,mt(Zre,"findEndOfInputAnchor"),mt(Qre,"findEmptyMatchRegExps"),Cne=/[^\\[][\^]|^\^/,mt(Jre,"findStartOfInputAnchor"),mt(ene,"findUnsupportedFlags"),mt(tne,"findDuplicatePatterns"),mt(rne,"findInvalidGroupType"),mt(nne,"findModesThatDoNotExist"),mt(ine,"findUnreachablePatterns"),mt(ane,"testTokenType"),mt(sne,"noMetaChar"),mt(one,"addStartOfInput"),mt(lne,"addStickyFlag"),mt(cne,"performRuntimeChecks"),mt(hne,"performWarningRuntimeChecks"),mt(une,"cloneEmptyGroups"),mt(dne,"isCustomPattern"),mt(pne,"isShortPattern"),Sne={test:mt(function(t){var r=t.length;for(let e=this.lastIndex;e<r;e++){var n=t.charCodeAt(e);if(10===n)return this.lastIndex=e+1,!0;if(13===n)return 10===t.charCodeAt(e+1)?this.lastIndex=e+2:this.lastIndex=e+1,!0}return!1},"test"),lastIndex:0},mt(gne,"checkLineBreaksIssues"),mt(fne,"buildLineBreakIssueMessage"),mt(mne,"getCharCodes"),mt(yne,"addToMapOfArrays"),_ne=256,Ane=[],mt(vne,"charCodeToOptimizedIndex"),mt(xne,"initCharCodeToOptimizedIndexMap")});function Nne(e,t){return(e=e.tokenTypeIdx)===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[e]}function Ine(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function Rne(e){Dne(e=Mne(e)),Pne(e),One(e),v(e,e=>{e.isParent=0<e.categoryMatches.length})}function Mne(e){let t=lz(e),r=e,n=!0;for(;n;){r=gz(e$(x(r,e=>e.CATEGORIES)));var i=EU(r,t);t=t.concat(i),dj(i)?n=!1:r=i}return t}function Dne(e){v(e,e=>{$ne(e)||((jne[qne]=e).tokenTypeIdx=qne++),Fne(e)&&!i8(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Fne(e)||(e.CATEGORIES=[]),zne(e)||(e.categoryMatches=[]),Gne(e)||(e.categoryMatchesMap={})})}function One(e){v(e,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(e,t)=>{r.categoryMatches.push(jne[t].tokenTypeIdx)})})}function Pne(e){v(e,e=>{Bne([],e)})}function Bne(r,n){v(r,e=>{n.categoryMatchesMap[e.tokenTypeIdx]=!0}),v(n.CATEGORIES,e=>{var t=r.concat(n);nj(t,e)||Bne(t,e)})}function $ne(e){return jq(e,"tokenTypeIdx")}function Fne(e){return jq(e,"CATEGORIES")}function zne(e){return jq(e,"categoryMatches")}function Gne(e){return jq(e,"categoryMatchesMap")}function Une(e){return jq(e,"tokenTypeIdx")}var qne,jne,Wne,Yne,Hne,Vne,Xne=e(()=>{BY(),mt(Nne,"tokenStructuredMatcher"),mt(Ine,"tokenStructuredMatcherNoCategories"),qne=1,jne={},mt(Rne,"augmentTokenTypes"),mt(Mne,"expandCategories"),mt(Dne,"assignTokenDefaultProps"),mt(One,"assignCategoriesTokensProp"),mt(Pne,"assignCategoriesMapProp"),mt(Bne,"singleAssignCategoriesToksMap"),mt($ne,"hasShortKeyProperty"),mt(Fne,"hasCategoriesProperty"),mt(zne,"hasExtendingTokensTypesProperty"),mt(Gne,"hasExtendingTokensTypesMapProperty"),mt(Une,"isTokenType")}),Kne=e(()=>{Wne={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}}}),Zne=e(()=>{var e;Lne(),BY(),Wte(),Xne(),Kne(),Dre(),(e=Yne=Yne||{})[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",Hne={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
||
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Wne,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(Hne),(Vne=class{static{mt(this,"Lexer")}constructor(i,a=Hne){if(this.lexerDefinition=i,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,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${e}>`),Gte(t)),a=10<n?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${e}> time: ${n}ms`),this.traceInitIndent--,i):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=dB({},Hne,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,n=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Hne.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Sne;else if(this.config.lineTerminatorCharacters===Hne.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=i8(i)?{modes:{defaultMode:lz(i)},defaultMode:wne}:(e=!1,lz(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(cne(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(hne(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(e,t)=>{r.modes[t]=QW(e,e=>wj(e))}),cB(r.modes)),t;if(v(r.modes,(t,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Hre(t,n))}),dj(this.lexerDefinitionErrors)){Rne(t);let e;this.TRACE_INIT("analyzeTokenTypes",()=>{e=Yre(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=dB({},this.emptyGroups,e.emptyGroups),this.hasCustom=e.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=e.canBeOptimized}})}),this.defaultMode=r.defaultMode,!dj(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw t=x(this.lexerDefinitionErrors,e=>e.message).join(`-----------------------
|
||
`),new Error(`Errors detected in definition of Lexer:
|
||
`+t);v(this.lexerDefinitionWarning,e=>{Fte(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Tne?(this.chopInput=BE,this.match=this.matchWithTest):(this.updateLastIndex=DP,this.match=this.matchWithExec),e&&(this.handleModes=DP),!1===this.trackStartLines&&(this.computeNewColumn=BE),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=DP),/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=XW(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(a.ensureOptimizations&&!dj(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",()=>{Ire()}),this.TRACE_INIT("toFastProperties",()=>{qte(this)})})}tokenize(e,t=this.defaultMode){if(dj(this.lexerDefinitionErrors))return this.tokenizeInternal(e,t);throw e=x(this.lexerDefinitionErrors,e=>e.message).join(`-----------------------
|
||
`),new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
||
`+e)}tokenizeInternal(i,P){let e,a,t,r,n,s,o,l,c,h,B,u,d,$,p,g=i,F=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(i.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,w=une(this.emptyGroups),G=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,E=[],C=[],S=[],U=[];Object.freeze(U);let _;function A(){return E}function L(e){return e=vne(e),void 0===(e=C[e])?U:e}mt(A,"getPossiblePatternsSlow"),mt(L,"getPossiblePatternsOptimized");var q=mt(e=>{var t;1===S.length&&void 0===e.tokenType.PUSH_MODE?(t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e),v.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})):(S.pop(),e=AU(S),E=this.patternIdxToConfig[e],C=this.charCodeToPatternIdxToConfig[e],T=E.length,t=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=C&&t?L:A)},"pop_mode");function N(e){S.push(e),C=this.charCodeToPatternIdxToConfig[e],E=this.patternIdxToConfig[e],T=E.length,T=E.length,e=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=C&&e?L:A}mt(N,"push_mode"),N.call(this,P);let I,j=this.config.recoveryEnabled;for(;f<F;){s=null;var W=g.charCodeAt(f),Y=_(W),H=Y.length;for(e=0;e<H;e++){var R=(I=Y[e]).pattern,V=(o=null,I.short);if(!1!==V?W===V&&(s=R):!0===I.isCustom?null!==(p=R.exec(g,f,y,w))?(s=p[0],void 0!==p.payload&&(o=p.payload)):s=null:(this.updateLastIndex(R,f),s=this.match(R,i,f)),null!==s){if(void 0!==(n=I.longerAlt)){var X=n.length;for(t=0;t<X;t++){var M=E[n[t]],D=M.pattern;if(!(l=null)===M.isCustom?null!==(p=D.exec(g,f,y,w))?(r=p[0],void 0!==p.payload&&(l=p.payload)):r=null:(this.updateLastIndex(D,f),r=this.match(D,i,f)),r&&r.length>s.length){s=r,o=l,I=M;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,x,b,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):w[h].push(u)),i=this.chopInput(i,c),f+=c,b=this.computeNewColumn(b,c),!0===G&&!0===I.canLineTerminator){let e=0,t,r;for(k.lastIndex=0;!0===(t=k.test(s))&&(r=k.lastIndex-1,e++),!0===t;);0!==e&&(x+=e,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,e,x,b,c))}this.handleModes(I,q,N,u)}else{let e=f,t=x,r=b,n=!1===j;for(;!1===n&&f<F;)for(i=this.chopInput(i,1),f++,a=0;a<T;a++){var O=E[a],K=O.pattern,Z=O.short;if(!1!==Z?g.charCodeAt(f)===Z&&(n=!0):n=!0===O.isCustom?null!==K.exec(g,f,y,w):(this.updateLastIndex(K,f),null!==K.exec(i)),!0===n)break}if(d=f-e,b=this.computeNewColumn(b,d),$=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,e,d,t,r),v.push({offset:e,line:t,column:r,length:d,message:$}),!1===j)break}}return this.hasCustom||(y.length=m),{tokens:y,groups:w,errors:v}}handleModes(e,t,r,n){var i;!0===e.pop?(i=e.push,t(n),void 0!==i&&r.call(this,i)):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,n,i,a,s){void 0!==t&&(r=(t=r===s-1)?-1:0,1===n&&1==t||(e.endLine=i+r,e.endColumn=a-1-r))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(e,t,r,n,i,a){return{image:e,startOffset:t,startLine:i,startColumn:a,tokenTypeIdx:r,tokenType:n}}createFullToken(e,t,r,n,i,a,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:i,endLine:i,startColumn:a,endColumn:a+s-1,tokenTypeIdx:r,tokenType:n}}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 willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",Vne.NA=/NOT_APPLICABLE/});function Qne(e){return Jne(e)?e.LABEL:e.name}function Jne(e){return Hq(e.LABEL)&&""!==e.LABEL}function eie(e){return tie(e)}function tie(e){var t=e.pattern,r={};if(r.name=e.name,wj(t)||(r.PATTERN=t),jq(e,iie))throw`The parent property is no longer supported.
|
||
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return jq(e,aie)&&(r.CATEGORIES=e[aie]),Rne([r]),jq(e,sie)&&(r.LABEL=e[sie]),jq(e,oie)&&(r.GROUP=e[oie]),jq(e,cie)&&(r.POP_MODE=e[cie]),jq(e,lie)&&(r.PUSH_MODE=e[lie]),jq(e,hie)&&(r.LONGER_ALT=e[hie]),jq(e,uie)&&(r.LINE_BREAKS=e[uie]),jq(e,die)&&(r.START_CHARS_HINT=e[die]),r}function rie(e,t,r,n,i,a,s,o){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function nie(e,t){return Nne(e,t)}var iie,aie,sie,oie,lie,cie,hie,uie,die,pie,gie,fie,mie,yie=e(()=>{BY(),Zne(),Xne(),mt(Qne,"tokenLabel"),mt(Jne,"hasTokenLabel"),iie="parent",aie="categories",sie="label",oie="group",lie="push_mode",cie="pop_mode",hie="longer_alt",uie="line_breaks",die="start_chars_hint",mt(eie,"createToken"),mt(tie,"createTokenInternal"),Rne([pie=eie({name:"EOF",pattern:Vne.NA})]),mt(rie,"createTokenInstance"),mt(nie,"tokenMatcher")}),vie=e(()=>{yie(),BY(),fre(),gie={buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${Jne(e)?`--> ${Qne(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 n="Expecting: ",t=`
|
||
but found: '`+gq(t).image+"'";return r?n+r+t:(r=XW(e,(e,t)=>e.concat(t),[]),e=x(r,e=>`[${x(e,e=>Qne(e)).join(", ")}]`),n+`one of these possible Token sequences:
|
||
`+x(e,(e,t)=>` ${t+1}. `+e).join(`
|
||
`)+t)},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r}){var n="Expecting: ",t=`
|
||
but found: '`+gq(t).image+"'";return r?n+r+t:n+`expecting at least one iteration which starts with one of these possible Token sequences::
|
||
<${x(e,e=>`[${x(e,e=>Qne(e)).join(",")}]`).join(" ,")}>`+t}},Object.freeze(gie),fie={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
|
||
inside top level rule: ->`+e.name+"<-"}},mie={buildDuplicateFoundError(e,t){function r(e){return e instanceof sre?e.terminalType.name:e instanceof Zte?e.nonTerminalName:""}mt(r,"getExtraProductionArgument");let n=e.name,i=gq(t),a=i.idx,s=pre(i),o=r(i),l=0<a,c=`->${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""}
|
||
appears more than once (${t.length} times) in the top level rule: ->${n}<-.
|
||
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
|
||
`;return 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=x(e.prefixPath,e=>Qne(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix
|
||
in <OR${r}> inside <${e.topLevelRule.name}> Rule,
|
||
<${t}> may appears as a prefix path in all these alternatives.
|
||
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
|
||
For Further details.`},buildAlternationAmbiguityError(e){var t=x(e.prefixPath,e=>Qne(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=pre(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.
|
||
This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
|
||
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:
|
||
<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
|
||
has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){var t=e.topLevelRule.name;return`Left Recursion found in grammar.
|
||
rule: <${t}> can be invoked from itself (directly or indirectly)
|
||
without consuming any Tokens. The grammar path that causes this is:
|
||
${t+" --\x3e "+x(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")}
|
||
To fix this refactor your grammar to remove the left recursion.
|
||
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){return`Duplicate definition, rule: ->${e.topLevelRule instanceof Qte?e.topLevelRule.name:e.topLevelRule}<- is already defined in the grammar: ->${e.grammarName}<-`}}});function xie(e,t){return(e=new bie(e,t)).resolveRefs(),e.errors}var bie,wie=e(()=>{$se(),BY(),fre(),mt(xie,"resolveGrammar"),bie=class extends ore{static{mt(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){v(Jq(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:Ose.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName}))}}});function kie(t,r,n=[]){n=lz(n);let i=[],a=0;function s(e){return e.concat(IU(t,a+1))}function o(e){return e=kie(s(e),r,n),i.concat(e)}for(mt(s,"remainingPathWith"),mt(o,"getAlternativesForProd");n.length<r&&a<t.length;){var e=t[a];if(e instanceof Jte)return o(e.definition);if(e instanceof Zte)return o(e.definition);if(e instanceof ere)i=o(e.definition);else{if(e instanceof tre)return o(e.definition.concat([new nre({definition:e.definition})]));if(e instanceof rre)return o([new Jte({definition:e.definition}),new nre({definition:[new sre({terminalType:e.separator})].concat(e.definition)})]);if(e instanceof ire){var l=e.definition.concat([new nre({definition:[new sre({terminalType:e.separator})].concat(e.definition)})]);i=o(l)}else if(e instanceof nre)l=e.definition.concat([new nre({definition:e.definition})]),i=o(l);else{if(e instanceof are)return v(e.definition,e=>{!1===dj(e.definition)&&(i=o(e.definition))}),i;if(!(e instanceof sre))throw Error("non exhaustive match");n.push(e.terminalType)}}a++}return i.push({partialPath:n,suffixDef:IU(t,a)}),i}function Tie(e,t,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=t.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!dj(u);)if((v=u.pop())===s)o&&AU(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!dj(d)){var m=d[0];if(m===i)v={idx:p,def:IU(d),ruleStack:DU(g),occurrenceStack:DU(f)},u.push(v);else if(m instanceof sre)if(p<l-1)r(t[v=p+1],m.terminalType)&&(v={idx:v,def:IU(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 Zte){(v=lz(g)).push(m.nonTerminalName);var y=lz(f),v=(y.push(m.idx),{idx:p,def:m.definition.concat(a,IU(d)),ruleStack:v,occurrenceStack:y});u.push(v)}else if(m instanceof ere)y={idx:p,def:IU(d),ruleStack:g,occurrenceStack:f},u.push(y),u.push(s),v={idx:p,def:m.definition.concat(IU(d)),ruleStack:g,occurrenceStack:f},u.push(v);else if(m instanceof tre)v=new nre({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],IU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof rre)v=new sre({terminalType:m.separator}),v=new nre({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],IU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof ire)v={idx:p,def:IU(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new sre({terminalType:m.separator}),v=new nre({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],IU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof nre)v={idx:p,def:IU(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new nre({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],IU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof are)for(let e=m.definition.length-1;0<=e;e--){var x={idx:p,def:m.definition[e].definition.concat(IU(d)),ruleStack:g,occurrenceStack:f};u.push(x),u.push(s)}else if(m instanceof Jte)u.push({idx:p,def:m.definition.concat(IU(d)),ruleStack:g,occurrenceStack:f});else{if(!(m instanceof Qte))throw Error("non exhaustive match");u.push(Eie(m,p,g,f))}}}return h}function Eie(e,t,r,n){return(r=lz(r)).push(e.name),(n=lz(n)).push(1),{idx:t,def:e.definition,ruleStack:r,occurrenceStack:n}}var Cie,Sie,_ie,Aie,Lie,Nie,Iie=e(()=>{BY(),Ere(),vre(),fre(),Sie=class extends yre{static{mt(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=lz(this.path.ruleStack).reverse(),this.occurrenceStack=lz(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(){dj(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Cie=class extends Sie{static{mt(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found&&(e=t.concat(r),t=new Jte({definition:e}),this.possibleTokTypes=xre(t),this.found=!0)}},Sie=class extends yre{static{mt(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},_ie=class extends Sie{static{mt(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){var n;e.idx===this.occurrence?(n=gq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof sre&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkMany(e,t,r)}},Aie=class extends Sie{static{mt(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){var n;e.idx===this.occurrence?(n=gq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof sre&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkManySep(e,t,r)}},Lie=class extends Sie{static{mt(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){var n;e.idx===this.occurrence?(n=gq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof sre&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOne(e,t,r)}},Nie=class extends Sie{static{mt(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){var n;e.idx===this.occurrence?(n=gq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof sre&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOneSep(e,t,r)}},mt(kie,"possiblePathsFrom"),mt(Tie,"nextPossibleTokensAfter"),mt(Eie,"expandTopLevelRule")});function Rie(e){if(e instanceof ere||"Option"===e)return Hie.OPTION;if(e instanceof nre||"Repetition"===e)return Hie.REPETITION;if(e instanceof tre||"RepetitionMandatory"===e)return Hie.REPETITION_MANDATORY;if(e instanceof rre||"RepetitionMandatoryWithSeparator"===e)return Hie.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof ire||"RepetitionWithSeparator"===e)return Hie.REPETITION_WITH_SEPARATOR;if(e instanceof are||"Alternation"===e)return Hie.ALTERNATION;throw Error("non exhaustive match")}function Mie(e){var{occurrence:e,rule:t,prodType:r,maxLookahead:n}=e;return(r=Rie(r))===Hie.ALTERNATION?Uie(e,t,n):qie(e,t,r,n)}function Die(e,t,r,n,i,a){return a(e=Uie(e,t,r),n,Yie(e)?Ine:Nne,i)}function Oie(e,t,r,n,i,a){return t=Yie(e=qie(e,t,i,r))?Ine:Nne,a(e[0],t,n)}function Pie(c,e,h,t){let u=c.length,r=XU(c,e=>XU(e,e=>1===e.length));if(e)return function(e){var r=x(e,e=>e.GATE);for(let t=0;t<u;t++){var n=c[t],i=n.length,a=r[t];if(void 0===a||!1!==a.call(this))e:for(let e=0;e<i;e++){var s=n[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],n=r.length;e:for(let e=0;e<n;e++){var i=r[e],a=i.length;for(let e=0;e<a;e++){var s=this.LA(e+1);if(!1===h(s,i[e]))continue e}return t}}};{let e=x(c,e=>e$(e)),t=XW(e,(t,e,r)=>(v(e,e=>{jq(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=r),v(e.categoryMatches,e=>{jq(t,e)||(t[e]=r)})}),t),{});return function(){var e=this.LA(1);return t[e.tokenTypeIdx]}}}function Bie(i,a,r){let e=XU(i,e=>1===e.length),s=i.length;if(!e||r)return function(){e:for(let e=0;e<s;e++){var t=i[e],r=t.length;for(let e=0;e<r;e++){var n=this.LA(e+1);if(!1===a(n,t[e]))continue e}return!0}return!1};if(1===(r=e$(i)).length&&dj(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=XW(r,(t,e,r)=>(t[e.tokenTypeIdx]=!0,v(e.categoryMatches,e=>{t[e]=!0}),t),[]);return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}function $ie(t){var r=new Array(t);for(let e=0;e<t;e++)r[e]=[];return r}function Fie(t){let r=[""];for(let e=0;e<t.length;e++){var n=t[e],i=[];for(let e=0;e<r.length;e++){var a=r[e];i.push(a+"_"+n.tokenTypeIdx);for(let e=0;e<n.categoryMatches.length;e++){var s="_"+n.categoryMatches[e];i.push(a+s)}}r=i}return r}function zie(t,r,n){for(let e=0;e<t.length;e++)if(e!==n){var i=t[e];for(let e=0;e<r.length;e++)if(!0===i[r[e]])return!1}return!0}function Gie(e,n){let t=x(e,e=>kie([e],1)),i=$ie(t.length),a=x(t,e=>{let t={};return v(e,e=>{e=Fie(e.partialPath),v(e,e=>{t[e]=!0})}),t}),s=t;for(let r=1;r<=n;r++){var o=s;s=$ie(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=Fie(c);if(zie(a,u,t)||dj(h)||c.length===n){var d=i[t];if(!1===jie(d,c)){d.push(c);for(let e=0;e<u.length;e++){var p=u[e];a[t][p]=!0}}}else d=kie(h,r+1,c),s[t]=s[t].concat(d),v(d,e=>{e=Fie(e.partialPath),v(e,e=>{a[t][e]=!0})})}}}return i}function Uie(e,t,r,n){return e=new Xie(e,Hie.ALTERNATION,n),t.accept(e),Gie(e.result,r)}function qie(e,t,r,n){var i=new Xie(e,r),i=(t.accept(i),i.result),t=new Vie(t,e,r).startWalking();return Gie([new Jte({definition:i}),new Jte({definition:t})],n)}function jie(t,r){e:for(let e=0;e<t.length;e++){var n=t[e];if(n.length===r.length){for(let e=0;e<n.length;e++){var i=r[e],a=n[e];if(0==(i===a||void 0!==a.categoryMatchesMap[i.tokenTypeIdx]))continue e}return!0}}return!1}function Wie(e,r){return e.length<r.length&&XU(e,(e,t)=>e===(t=r[t])||t.categoryMatchesMap[e.tokenTypeIdx])}function Yie(e){return XU(e,e=>XU(e,e=>XU(e,e=>dj(e.categoryMatches))))}var Hie,Vie,Xie,Kie=e(()=>{var e;BY(),Iie(),vre(),Xne(),fre(),(e=Hie=Hie||{})[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(Rie,"getProdType"),mt(Mie,"getLookaheadPaths"),mt(Die,"buildLookaheadFuncForOr"),mt(Oie,"buildLookaheadFuncForOptionalProd"),mt(Pie,"buildAlternativesLookAheadFunc"),mt(Bie,"buildSingleAlternativeLookaheadFunction"),Vie=class extends yre{static{mt(this,"RestDefinitionFinderWalker")}constructor(e,t,r){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(n),!0)}walkOption(e,t,r){this.checkIsTarget(e,Hie.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,Hie.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,Hie.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,Hie.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,Hie.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},Xie=class extends ore{static{mt(this,"InsideDefinitionFinderVisitor")}constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Hie.OPTION)}visitRepetition(e){this.checkIsTarget(e,Hie.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Hie.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Hie.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Hie.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Hie.ALTERNATION)}},mt($ie,"initializeArrayOfArrays"),mt(Fie,"pathToHashKeys"),mt(zie,"isUniquePrefixHash"),mt(Gie,"lookAheadSequenceFromAlternatives"),mt(Uie,"getLookaheadPathsForOr"),mt(qie,"getLookaheadPathsForOptionalProd"),mt(jie,"containsPath"),mt(Wie,"isStrictPrefixOfPath"),mt(Yie,"areTokenCategoriesNotUsed")});function Zie(e){return e=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),x(e,e=>Object.assign({type:Ose.CUSTOM_LOOKAHEAD_VALIDATION},e))}function Qie(t,e,r,n){var i=Tq(t,e=>Jie(e,r)),e=dae(t,e,r),a=Tq(t,e=>lae(e,r)),s=Tq(t,e=>rae(e,t,n,r));return i.concat(e,a,s)}function Jie(n,i){var e=new pae,e=(n.accept(e),e.allProductions),e=Rq(e,eae),e=Zj(e,e=>1<e.length);return x(Jq(e),e=>{var t=gq(e),e=i.buildDuplicateFoundError(n,e),r=pre(t),e={message:e,type:Ose.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:r,occurrence:t.idx};return(r=tae(t))&&(e.parameter=r),e})}function eae(e){return`${pre(e)}_#_${e.idx}_#_`+tae(e)}function tae(e){return e instanceof sre?e.terminalType.name:e instanceof Zte?e.nonTerminalName:""}function rae(r,e,t,n){var i=[];return 1<XW(e,(e,t)=>t.name===r.name?e+1:e,0)&&(e=n.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t}),i.push({message:e,type:Ose.DUPLICATE_RULE_NAME,ruleName:r.name})),i}function nae(e,t,r){var n=[];return nj(t,e)||n.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:Ose.INVALID_RULE_OVERRIDE,ruleName:e}),n}function iae(r,e,n,i=[]){var t,a=[],e=aae(e.definition);return dj(e)?[]:(t=r.name,nj(e,r)&&a.push({message:n.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:Ose.LEFT_RECURSION,ruleName:t}),t=EU(e,i.concat([r])),e=Tq(t,e=>{var t=lz(i);return t.push(e),iae(r,e,n,t)}),a.concat(e))}function aae(e){let t=[];if(dj(e))return t;if((r=gq(e))instanceof Zte)t.push(r.referencedRule);else if(r instanceof Jte||r instanceof ere||r instanceof tre||r instanceof rre||r instanceof ire||r instanceof nre)t=t.concat(aae(r.definition));else if(r instanceof are)t=e$(x(r.definition,e=>aae(e.definition)));else if(!(r instanceof sre))throw Error("non exhaustive match");var r=ure(r),n=1<e.length;return r&&n?(r=IU(e),t.concat(aae(r))):t}function sae(n,i){var e=new gae,e=(n.accept(e),e.alternations);return Tq(e,r=>{var e=DU(r.definition);return Tq(e,(e,t)=>(e=Tie([e],[],Nne,1),dj(e)?[{message:i.buildEmptyAlternationError({topLevelRule:n,alternation:r,emptyChoiceIdx:t}),type:Ose.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:r.idx,alternative:t+1}]:[]))})}function oae(n,i,a){var e=new gae,e=(n.accept(e),e.alternations),e=QW(e,e=>!0===e.ignoreAmbiguities);return Tq(e,e=>{var t=hae(r=Uie(e.idx,n,e.maxLookahead||i,e),e,n,a),r=uae(r,e,n,a);return t.concat(r)})}function lae(t,r){var e=new gae,e=(t.accept(e),e.alternations);return Tq(e,e=>255<e.definition.length?[{message:r.buildTooManyAlternativesError({topLevelRule:t,alternation:e}),type:Ose.TOO_MANY_ALTS,ruleName:t.name,occurrence:e.idx}]:[])}function cae(e,i,a){let s=[];return v(e,n=>{var e=new fae,e=(n.accept(e),e.allProductions);v(e,e=>{var t=Rie(e),r=e.maxLookahead||i,t=qie(e.idx,n,t,r)[0];dj(e$(t))&&(r=a.buildEmptyRepetitionError({topLevelRule:n,repetition:e}),s.push({message:r,type:Ose.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name}))})}),s}function hae(a,s,r,n){let o=[],e=XW(a,(e,t,i)=>(!0!==s.definition[i].ignoreAmbiguities&&v(t,r=>{let n=[i];v(a,(e,t)=>{i!==t&&jie(e,r)&&!0!==s.definition[t].ignoreAmbiguities&&n.push(t)}),1<n.length&&!jie(o,r)&&(o.push(r),e.push({alts:n,path:r}))}),e),[]);return x(e,e=>{var t=x(e.alts,e=>e+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:t,prefixPath:e.path}),type:Ose.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:e.alts}})}function uae(e,i,a,s){let o=XW(e,(e,t,r)=>(t=x(t,e=>({idx:r,path:e})),e.concat(t)),[]);return gz(Tq(o,e=>{if(!0===i.definition[e.idx].ignoreAmbiguities)return[];let n=e.idx,t=e.path,r=tq(o,e=>!0!==i.definition[e.idx].ignoreAmbiguities&&e.idx<n&&Wie(e.path,t));return x(r,e=>{var t=[e.idx+1,n+1],r=0===i.idx?"":i.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:i,ambiguityIndices:t,prefixPath:e.path}),type:Ose.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:t}})}))}function dae(e,t,r){let n=[],i=x(t,e=>e.name);return v(e,e=>{var t=e.name;nj(i,t)&&(e=r.buildNamespaceConflictError(e),n.push({message:e,type:Ose.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t}))}),n}var pae,gae,fae,mae=e(()=>{BY(),$se(),fre(),Kie(),Iie(),Xne(),mt(Zie,"validateLookahead"),mt(Qie,"validateGrammar"),mt(Jie,"validateDuplicateProductions"),mt(eae,"identifyProductionForDuplicates"),mt(tae,"getExtraProductionArgument"),pae=class extends ore{static{mt(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}},mt(rae,"validateRuleDoesNotAlreadyExist"),mt(nae,"validateRuleIsOverridden"),mt(iae,"validateNoLeftRecursion"),mt(aae,"getFirstNoneTerminal"),gae=class extends ore{static{mt(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},mt(sae,"validateEmptyOrAlternative"),mt(oae,"validateAmbiguousAlternationAlternatives"),fae=class extends ore{static{mt(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}},mt(lae,"validateTooManyAlts"),mt(cae,"validateSomeNonEmptyLookaheadPath"),mt(hae,"checkAlternativesAmbiguities"),mt(uae,"checkPrefixAlternativesAmbiguities"),mt(dae,"checkTerminalAndNoneTerminalsNameSpace")});function yae(e){let t=gU(e,{errMsgProvider:fie}),r={};return v(e.rules,e=>{r[e.name]=e}),xie(r,t.errMsgProvider)}function vae(e){return Qie((e=gU(e,{errMsgProvider:mie})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var xae=e(()=>{BY(),wie(),mae(),vie(),mt(yae,"resolveGrammar"),mt(vae,"validateGrammar")});function bae(e){return nj(wae,e.name)}var wae,kae,Tae,Eae,Cae,Sae,_ae=e(()=>{BY(),wae=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(wae),mt(bae,"isRecognitionException"),kae=class extends Error{static{mt(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Tae=class extends kae{static{mt(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="MismatchedTokenException"}},Eae=class extends kae{static{mt(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="NoViableAltException"}},Cae=class extends kae{static{mt(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name="NotAllInputParsedException"}},Sae=class extends kae{static{mt(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="EarlyExitException"}}});function Aae(e,t,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o],c=(void 0===l&&(n=this.getCurrRuleFullName(),n=this.getGAstProductions()[n],l=new a(n,i).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=pie,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(e,t,r,c)}var Lae,Nae,Iae,Rae,Mae=e(()=>{yie(),BY(),_ae(),Cre(),$se(),Lae={},Nae="InRuleRecoveryException",Iae=class extends Error{static{mt(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=Nae}},Rae=class{static{mt(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(jq(e,"recoveryEnabled")?e:Mse).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Aae)}getTokenToInsert(e){return(e=rie(e,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=mt(()=>{var e=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:e,ruleName:this.getCurrRuleFullName()});(e=new Tae(e,l,this.LA(0))).resyncedTokens=DU(s),this.SAVE_ERROR(e)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void e.apply(this,t);this.tokenMatcher(c,i)?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 Iae("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||dj(t))return!1;let r=this.LA(1);return void 0!==hq(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 nj(t,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){var n=hq(e,e=>nie(t,e));if(void 0!==n)return n;t=this.LA(r),r++}}getCurrFollowKey(){var e,t,r;return 1===this.RULE_STACK.length?Lae:(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,n=this.RULE_OCCURRENCE_STACK;return x(r,(e,t)=>0===t?Lae:{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:n[t],inRule:this.shortRuleNameToFullName(r[t-1])})}flattenFollowSet(){var e=x(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return e$(e)}getFollowSetFromFollowKey(e){return e===Lae?[pie]:(e=e.ruleName+e.idxInCallingRule+Tre+e.inRule,this.resyncFollows[e])}addToResyncTokens(e,t){return this.tokenMatcher(e,pie)||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 DU(t)}attemptInRepetitionRecovery(e,t,r,n,i,a,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:lz(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return x(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},mt(Aae,"attemptInRepetitionRecovery")});function Dae(e,t,r){return r|t|e}var Oae,Pae=e(()=>{mt(Dae,"getKeyForAutomaticLookahead")}),Bae=e(()=>{BY(),vie(),$se(),mae(),Kie(),Oae=class{static{mt(this,"LLkLookaheadStrategy")}constructor(e){this.maxLookahead=null!=(e=e?.maxLookahead)?e:Mse.maxLookahead}validate(e){var t,r,n=this.validateNoLeftRecursion(e.rules);return dj(n)?(t=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),e=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead),[...n,...t,...r,...e]):n}validateNoLeftRecursion(e){return Tq(e,e=>iae(e,e,mie))}validateEmptyOrAlternatives(e){return Tq(e,e=>sae(e,mie))}validateAmbiguousAlternationAlternatives(e,t){return Tq(e,e=>oae(e,t,mie))}validateSomeNonEmptyLookaheadPath(e,t){return cae(e,t,mie)}buildLookaheadForAlternation(e){return Die(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Pie)}buildLookaheadForOptional(e){return Oie(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Rie(e.prodType),Bie)}}});function $ae(e){return Gae.reset(),e.accept(Gae),e=Gae.dslMethods,Gae.reset(),e}var Fae,zae,Gae,Uae=e(()=>{BY(),$se(),Pae(),fre(),Bae(),Fae=class{static{mt(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=(jq(e,"dynamicTokensEnabled")?e:Mse).dynamicTokensEnabled,this.maxLookahead=(jq(e,"maxLookahead")?e:Mse).maxLookahead,this.lookaheadStrategy=jq(e,"lookaheadStrategy")?e.lookaheadStrategy:new Oae({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){v(e,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:e,repetition:t,option:r,repetitionMandatory:n,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:a}=$ae(s);v(e,r=>{var e=0===r.idx?"":r.idx;this.TRACE_INIT(""+pre(r)+e,()=>{var e=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),t=Dae(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(t,e)})}),v(t,e=>{this.computeLookaheadFunc(s,e.idx,768,"Repetition",e.maxLookahead,pre(e))}),v(r,e=>{this.computeLookaheadFunc(s,e.idx,512,"Option",e.maxLookahead,pre(e))}),v(n,e=>{this.computeLookaheadFunc(s,e.idx,1024,"RepetitionMandatory",e.maxLookahead,pre(e))}),v(i,e=>{this.computeLookaheadFunc(s,e.idx,1536,"RepetitionMandatoryWithSeparator",e.maxLookahead,pre(e))}),v(a,e=>{this.computeLookaheadFunc(s,e.idx,1280,"RepetitionWithSeparator",e.maxLookahead,pre(e))})})})}computeLookaheadFunc(r,n,i,a,s,e){this.TRACE_INIT(""+e+(0===n?"":n),()=>{var e=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),t=Dae(this.fullRuleNameToShort[r.name],i,n);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)}},zae=class extends ore{static{mt(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},Gae=new zae,mt($ae,"collectMethods")});function qae(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function jae(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 Wae(e,t,r){void 0===e.children[r]?e.children[r]=[t]:e.children[r].push(t)}function Yae(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var Hae=e(()=>{mt(qae,"setNodeLocationOnlyOffset"),mt(jae,"setNodeLocationFull"),mt(Wae,"addTerminalToCst"),mt(Yae,"addNoneTerminalToCst")});function Vae(e,t){Object.defineProperty(e,Xae,{enumerable:!1,configurable:!0,writable:!1,value:t})}var Xae,Kae=e(()=>{Xae="name",mt(Vae,"defineNameProp")});function Zae(t,r){var n=cB(t),i=n.length;for(let e=0;e<i;e++){var a=t[n[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 Qae(e,t){var r=mt(function(){},"derivedConstructor"),e=(Vae(r,e+"BaseSemantics"),{visit:mt(function(e,t){if(i8(e)&&(e=e[0]),!wj(e))return this[e.name](e.children,t)},"visit"),validateVisitor:mt(function(){var e=ese(this,t);if(!dj(e))throw e=x(e,e=>e.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
||
`+e.join(`
|
||
|
||
`).replace(/\n/g,`
|
||
`))},"validateVisitor")});return r.prototype=e,(r.prototype.constructor=r)._RULE_NAMES=t,r}function Jae(e,t,r){var n=mt(function(){},"derivedConstructor");Vae(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(t,e=>{i[e]=Zae}),n.prototype=i,n.prototype.constructor=n}function ese(e,t){return tse(e,t)}function tse(t,e){return e=tq(e,e=>!1===M6(t[e])),e=x(e,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:rse.MISSING_METHOD,methodName:e})),gz(e)}var rse,nse,ise,ase,sse,ose,lse,cse=e(()=>{var e;BY(),Kae(),mt(Zae,"defaultVisit"),mt(Qae,"createBaseSemanticVisitorConstructor"),mt(Jae,"createBaseVisitorConstructorWithDefaults"),(e=rse=rse||{})[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD",mt(ese,"validateVisitor"),mt(tse,"validateMissingCstMethods")}),hse=e(()=>{Hae(),BY(),cse(),$se(),nse=class{static{mt(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(jq(e,"nodeLocationTracking")?e:Mse).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=jae,this.setNodeLocationFromNode=jae,this.cstPostRule=DP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=DP,this.setNodeLocationFromNode=DP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=qae,this.setNodeLocationFromNode=qae,this.cstPostRule=DP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=DP,this.setNodeLocationFromNode=DP,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=DP,this.setNodeLocationFromNode=DP,this.cstPostRule=DP,this.setInitialNodeLocation=DP}else this.cstInvocationStateUpdate=DP,this.cstFinallyStateUpdate=DP,this.cstPostTerminal=DP,this.cstPostNonTerminal=DP,this.cstPostRule=DP}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];Wae(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];Yae(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){var e;return wj(this.baseCstVisitorConstructor)?(e=Qae(this.className,cB(this.gastProductionsCache)),this.baseCstVisitorConstructor=e):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var e;return wj(this.baseCstVisitorWithDefaultsConstructor)?(e=Jae(this.className,cB(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]}}}),use=e(()=>{$se(),ise=class{static{mt(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Rse}LA(e){return(e=this.currIdx+e)<0||this.tokVectorLength<=e?Rse: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()}}}),dse=e(()=>{BY(),_ae(),$se(),vie(),mae(),fre(),ase=class{static{mt(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=Dse){nj(this.definedRulesNames,e)&&(n={message:mie.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Ose.DUPLICATE_RULE_NAME,ruleName:e},this.definitionErrors.push(n)),this.definedRulesNames.push(e);var n=this.defineRule(e,t,r);return this[e]=n}OVERRIDE_RULE(e,t,r=Dse){var n=nae(e,this.definedRulesNames,this.className),n=(this.definitionErrors=this.definitionErrors.concat(n),this.defineRule(e,t,r));return this[e]=n}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);var e=this.saveRecogState();try{return t.apply(this,r),!0}catch(e){if(bae(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Vte(Jq(this.gastProductionsCache))}}}),pse=e(()=>{BY(),Pae(),_ae(),Kie(),Iie(),$se(),Mae(),yie(),Xne(),sse=class{static{mt(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ine,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},jq(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(i8(e)){if(dj(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(i8(e))this.tokensMap=XW(e,(e,t)=>(e[t.name]=t,e),{});else if(jq(e,"modes")&&XU(e$(Jq(e.modes)),Une))t=e$(Jq(e.modes)),t=kY(t),this.tokensMap=XW(t,(e,t)=>(e[t.name]=t,e),{});else{if(!N6(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=lz(e)}this.tokensMap.EOF=pie,t=jq(e,"modes")?e$(Jq(e.modes)):Jq(e),e=XU(t,e=>dj(e.categoryMatches)),this.tokenMatcher=e?Ine:Nne,Rne(Jq(this.tokensMap))}defineRule(r,n,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 i=(jq(e,"resyncEnabled")?e:Dse).resyncEnabled,a=(jq(e,"recoveryValueFunc")?e:Dse).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,e=!0===this.outputCst?mt(function(...e){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,e);var t=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(t),t}catch(e){return this.invokeRuleCatch(e,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):mt(function(...e){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,e)}catch(e){return this.invokeRuleCatch(e,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(e,{ruleName:r,originalGrammarAction:n})}invokeRuleCatch(e,t,r){var n=1===this.RULE_STACK.length,t=t&&!this.isBackTracking()&&this.recoveryEnabled;if(bae(e)){var i=e;if(t){if(t=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(t))return i.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,i.partialCstResult=t)}else if(n)return this.moveToTerminatedState(),r(e);throw i}throw e}optionInternal(e,t){var r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if("function"!=typeof e){i=e.DEF;let t=e.GATE;if(void 0!==t){let e=n;n=mt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else i=e;if(!0===n.call(this))return i.call(this)}atLeastOneInternal(e,t){var r=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,r,t){let n=this.getLaFuncFromCache(t),i;if("function"!=typeof r){i=r.DEF;let t=r.GATE;if(void 0!==t){let e=n;n=mt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else i=r;if(!0!==n.call(this))throw this.raiseEarlyExitException(e,Hie.REPETITION_MANDATORY,r.ERR_MSG);{let e=this.doSingleRepetition(i);for(;!0===n.call(this)&&!0===e;)e=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],n,1024,e,Lie)}atLeastOneSepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,Hie.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);for(n.call(this),r=mt(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,r,n,Nie],r,1536,e,Nie)}manyInternal(e,t){var r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,r,t){let n=this.getLaFuncFromCache(t),i;if("function"!=typeof r){i=r.DEF;let t=r.GATE;if(void 0!==t){let e=n;n=mt(()=>t.call(this)&&e.call(this),"lookaheadFunction")}}else i=r;let a=!0;for(;!0===n.call(this)&&!0===a;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],n,768,e,_ie,a)}manySepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(n.call(this),t=mt(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,n,Aie],t,1280,e,Aie)}}repetitionSepSecondInternal(e,t,r,n,i){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,i],r,1536,e,i)}doSingleRepetition(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){var r=this.getKeyForAutomaticLookahead(256,t),n=i8(e)?e:e.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,n)))return n[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 Cae(t,e)))}subruleInternal(e,t,r){var n;try{var i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(t){throw this.subruleInternalError(t,r,e.ruleName)}}subruleInternalError(e,t,r){throw bae(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 n;try{var i=this.LA(1);!0===this.tokenMatcher(i,e)?(this.consumeToken(),n=i):this.consumeInternalError(e,i,r)}catch(r){n=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){var n=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Tae(r,t,n))}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===Nae?r:e}}saveRecogState(){var e=this.errors,t=lz(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),pie)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),gse=e(()=>{_ae(),BY(),Kie(),$se(),ose=class{static{mt(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=(jq(e,"errorMessageProvider")?e:Mse).errorMessageProvider}SAVE_ERROR(e){if(bae(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:lz(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return lz(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){var n=this.getCurrRuleFullName(),e=qie(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));throw t=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:e,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n}),this.SAVE_ERROR(new Sae(t,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){var r=this.getCurrRuleFullName(),e=Uie(e,this.getGAstProductions()[r],this.maxLookahead),n=[];for(let e=1;e<=this.maxLookahead;e++)n.push(this.LA(e));throw r=this.LA(0),e=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:e,actual:n,previous:r,customUserDescription:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Eae(e,this.LA(1),r))}}}),fse=e(()=>{Iie(),BY(),lse=class{static{mt(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){var r=this.gastProductionsCache[e];if(wj(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Tie([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){var t=gq(e.ruleStack),t=this.getGAstProductions()[t];return new Cie(t,e).startWalking()}}});function mse(e,t,r,n=!1){xse(r);var i=AU(this.recordingProdStack),a=M6(t)?t:t.DEF,e=new e({definition:[],idx:r});return n&&(e.separator=t.SEP),jq(t,"MAX_LOOKAHEAD")&&(e.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(e),a.call(this),i.definition.push(e),this.recordingProdStack.pop(),bse}function yse(e,t){xse(t);let r=AU(this.recordingProdStack),n=!1===i8(e),i=0==n?e:e.DEF,a=new are({definition:[],idx:t,ignoreAmbiguities:n&&!0===e.IGNORE_AMBIGUITIES});return jq(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),t=oY(i,e=>M6(e.GATE)),a.hasPredicates=t,r.definition.push(a),v(i,e=>{var t=new Jte({definition:[]});a.definition.push(t),jq(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:jq(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),bse}function vse(e){return 0===e?"":""+e}function xse(e){if(e<0||wse<e)throw(e=new Error(`Invalid DSL Method idx value: <${e}>
|
||
Idx value must be a none negative value smaller than `+(wse+1))).KNOWN_RECORDER_ERROR=!0,e}var bse,wse,kse,Tse,Ese,Cse,Sse,_se=e(()=>{BY(),fre(),Zne(),Xne(),yie(),$se(),Pae(),bse={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(bse),wse=Math.pow(2,8)-1,Rne([kse=eie({name:"RECORDING_PHASE_TOKEN",pattern:Vne.NA})]),Tse=rie(kse,`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(Tse),Ese={name:`This CSTNode indicates the Parser is in Recording Phase
|
||
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Cse=class{static{mt(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var e=0<r?r:"";this["CONSUME"+e]=function(e,t){return this.consumeInternalRecord(e,r,t)},this["SUBRULE"+e]=function(e,t){return this.subruleInternalRecord(e,r,t)},this["OPTION"+e]=function(e){return this.optionInternalRecord(e,r)},this["OR"+e]=function(e){return this.orInternalRecord(e,r)},this["MANY"+e]=function(e){this.manyInternalRecord(r,e)},this["MANY_SEP"+e]=function(e){this.manySepFirstInternalRecord(r,e)},this["AT_LEAST_ONE"+e]=function(e){this.atLeastOneInternalRecord(r,e)},this["AT_LEAST_ONE_SEP"+e]=function(e){this.atLeastOneSepFirstInternalRecord(r,e)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{var t=this;for(let e=0;e<10;e++){var r=0<e?e:"";delete t["CONSUME"+r],delete t["SUBRULE"+r],delete t["OPTION"+r],delete t["OR"+r],delete t["MANY"+r],delete t["MANY_SEP"+r],delete t["AT_LEAST_ONE"+r],delete t["AT_LEAST_ONE_SEP"+r]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Rse}topLevelRuleRecord(e,t){try{var r=new Qte({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 mse.call(this,ere,e,t)}atLeastOneInternalRecord(e,t){mse.call(this,tre,t,e)}atLeastOneSepFirstInternalRecord(e,t){mse.call(this,rre,t,e,!0)}manyInternalRecord(e,t){mse.call(this,nre,t,e)}manySepFirstInternalRecord(e,t){mse.call(this,ire,t,e,!0)}orInternalRecord(e,t){return yse.call(this,e,t)}subruleInternalRecord(e,t,r){var n,i;if(xse(t),e&&!1!==jq(e,"ruleName"))return n=AU(this.recordingProdStack),i=e.ruleName,i=new Zte({idx:t,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?Ese:bse;throw(r=new Error(`<SUBRULE${vse(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 n;if(xse(t),$ne(e))return n=AU(this.recordingProdStack),r=new sre({idx:t,terminalType:e,label:r?.LABEL}),n.definition.push(r),Tse;throw(n=new Error(`<CONSUME${vse(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,n}},mt(mse,"recordProd"),mt(yse,"recordOrProd"),mt(vse,"getIdxSuffix"),mt(xse,"assertMethodIdxIsValid")}),Ase=e(()=>{BY(),Wte(),$se(),Sse=class{static{mt(this,"PerformanceTracer")}initPerformanceTracer(e){var t;jq(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=Mse.traceInitPerf),this.traceInitIndent=-1}TRACE_INIT(e,t){var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${e}>`),Gte(t)),a=10<n?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${e}> time: ${n}ms`),this.traceInitIndent--,i):t()}}});function Lse(i,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(e=>{var t;"constructor"!==e&&((t=Object.getOwnPropertyDescriptor(n,e))&&(t.get||t.set)?Object.defineProperty(i.prototype,e,t):i.prototype[e]=r.prototype[e])})})}var Nse=e(()=>{mt(Lse,"applyMixins")});function Ise(e=void 0){return function(){return e}}var Rse,Mse,Dse,Ose,Pse,Bse,$se=e(()=>{var e;BY(),Wte(),Lre(),yie(),vie(),xae(),Mae(),Uae(),hse(),use(),dse(),pse(),gse(),fse(),_se(),Ase(),Nse(),mae(),Rse=rie(pie,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(Rse),Mse=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:gie,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Dse=Object.freeze({recoveryValueFunc:mt(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(e=Ose=Ose||{})[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(Ise,"EMPTY_ALT"),(Pse=class t{static{mt(this,"Parser")}static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{var e;this.selfAnalysisDone=!0;let r=this.className,n=(this.TRACE_INIT("toFastProps",()=>{qte(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,e=>{let t=this[e].originalGrammarAction,r;this.TRACE_INIT(e+" Rule",()=>{r=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{n=yae({rules:Jq(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var e,t;dj(n)&&!1===this.skipValidations&&(e=vae({rules:Jq(this.gastProductionsCache),tokenTypes:Jq(this.tokensMap),errMsgProvider:mie,grammarName:r}),t=Zie({lookaheadStrategy:this.lookaheadStrategy,rules:Jq(this.gastProductionsCache),tokenTypes:Jq(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(e,t))}),dj(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var e=Sre(Jq(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null!=(t=(e=this.lookaheadStrategy).initialize)&&t.call(e,{rules:Jq(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Jq(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!dj(this.definitionErrors))throw e=x(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected:
|
||
`+e.join(`
|
||
-------------------------------
|
||
`))})}constructor(e,t){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(t),this.initLexerAdapter(),this.initLooksAhead(t),this.initRecognizerEngine(e,t),this.initRecoverable(t),this.initTreeBuilder(t),this.initContentAssist(),this.initGastRecorder(t),this.initPerformanceTracer(t),jq(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=(jq(t,"skipValidations")?t:Mse).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,Lse(Pse,[Rae,Fae,nse,ise,sse,ase,ose,lse,Cse,Sse]),Bse=class extends Pse{static{mt(this,"EmbeddedActionsParser")}constructor(e,t=Mse){(t=lz(t)).outputCst=!1,super(e,t)}}}),Fse=e(()=>{fre()}),zse=e(()=>{}),Gse=e(()=>{Fse(),zse()}),Use=e(()=>{Bte()}),qse=e(()=>{Bte(),$se(),Zne(),yie(),Kie(),Bae(),vie(),_ae(),Kne(),fre(),fre(),Gse(),Use()});function jse(e,t,r){return e.name+`_${t}_`+r}function Wse(t){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=(Yse(r,t),t.length);for(let e=0;e<n;e++){var i=t[e],a=eoe(r,i,i);void 0!==a&&hoe(r,i,a)}return r}function Yse(t,r){var n=r.length;for(let e=0;e<n;e++){var i=r[e],a=doe(t,i,void 0,{type:moe}),s=doe(t,i,void 0,{type:xoe});a.stop=s,t.ruleToStartState.set(i,a),t.ruleToStopState.set(i,s)}}function Hse(e,t,r){return r instanceof sre?loe(e,t,r.terminalType,r):(r instanceof Zte?coe:r instanceof are?Qse:r instanceof ere?Jse:r instanceof nre?Vse:r instanceof ire?Xse:r instanceof tre?Kse:r instanceof rre?Zse:eoe)(e,t,r)}function Vse(e,t,r){var n=doe(e,t,r,{type:voe});return ioe(e,n),roe(e,t,r,aoe(e,t,n,r,eoe(e,t,r)))}function Xse(e,t,r){var n=doe(e,t,r,{type:voe});return ioe(e,n),roe(e,t,r,aoe(e,t,n,r,eoe(e,t,r)),loe(e,t,r.separator,r))}function Kse(e,t,r){var n=doe(e,t,r,{type:yoe});return ioe(e,n),toe(e,t,r,aoe(e,t,n,r,eoe(e,t,r)))}function Zse(e,t,r){var n=doe(e,t,r,{type:yoe});return ioe(e,n),toe(e,t,r,aoe(e,t,n,r,eoe(e,t,r)),loe(e,t,r.separator,r))}function Qse(t,r,e){var n=doe(t,r,e,{type:foe}),i=(ioe(t,n),x(e.definition,e=>Hse(t,r,e)));return aoe(t,r,n,e,...i)}function Jse(e,t,r){var n=doe(e,t,r,{type:foe});return ioe(e,n),noe(e,t,r,aoe(e,t,n,r,eoe(e,t,r)))}function eoe(t,r,e){return 1===(e=tq(x(e.definition,e=>Hse(t,r,e)),e=>void 0!==e)).length?e[0]:0===e.length?void 0:ooe(t,e)}function toe(e,t,r,n,i){var a=n.left,n=n.right,s=doe(e,t,r,{type:Toe}),o=(ioe(e,s),doe(e,t,r,{type:Eoe}));return a.loopback=s,o.loopback=s,uoe(n,e.decisionMap[jse(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===i?(uoe(s,a),uoe(s,o)):(uoe(s,o),uoe(s,i.left),uoe(i.right,a)),{left:a,right:o}}function roe(e,t,r,n,i){var a=n.left,n=n.right,s=doe(e,t,r,{type:koe}),o=(ioe(e,s),doe(e,t,r,{type:Eoe})),l=doe(e,t,r,{type:woe});return s.loopback=l,o.loopback=l,uoe(s,a),uoe(s,o),uoe(n,l),void 0!==i?(uoe(l,o),uoe(l,i.left),uoe(i.right,a)):uoe(l,s),{left:e.decisionMap[jse(t,i?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function noe(e,t,r,n){var i=n.left;return uoe(i,n.right),e.decisionMap[jse(t,"Option",r.idx)]=i,n}function ioe(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function aoe(e,t,r,n,...i){var a,s=doe(e,t,n,{type:boe,start:r});r.end=s;for(a of i)void 0!==a?(uoe(r,a.left),uoe(a.right,s)):uoe(r,s);return i={left:r,right:s},e.decisionMap[jse(t,soe(n),n.idx)]=r,i}function soe(e){if(e instanceof are)return"Alternation";if(e instanceof ere)return"Option";if(e instanceof nre)return"Repetition";if(e instanceof ire)return"RepetitionWithSeparator";if(e instanceof tre)return"RepetitionMandatory";if(e instanceof rre)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function ooe(t,r){var n=r.length;for(let e=0;e<n-1;e++){var i,a=r[e],s=(i=1===a.left.transitions.length?a.left.transitions[0]:void 0)instanceof Aoe,o=i,l=r[e+1].left;a.left.type===foe&&a.right.type===foe&&void 0!==i&&(s&&o.followState===a.right||i.target===a.right)?(s?o.followState=l:i.target=l,goe(t,a.right)):uoe(a.right,l)}return{left:r[0].left,right:r[n-1].right}}function loe(e,t,r,n){var i=doe(e,t,n,{type:foe}),e=doe(e,t,n,{type:foe});return poe(i,new Soe(e,r)),{left:i,right:e}}function coe(e,t,r){var n=r.referencedRule,i=e.ruleToStartState.get(n),a=doe(e,t,r,{type:foe}),e=doe(e,t,r,{type:foe});return poe(a,new Aoe(i,n,e)),{left:a,right:e}}function hoe(e,t,r){var n=e.ruleToStartState.get(t),e=(uoe(n,r.left),e.ruleToStopState.get(t));return uoe(r.right,e),{left:n,right:e}}function uoe(e,t){poe(e,new _oe(t))}function doe(e,t,r,n){return r=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},n),e.states.push(r),r}function poe(e,t){0===e.transitions.length&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function goe(e,t){e.states.splice(e.states.indexOf(t),1)}var foe,moe,yoe,voe,xoe,boe,woe,koe,Toe,Eoe,Coe,Soe,_oe,Aoe,Loe=e(()=>{wq(),rq(),qse(),mt(jse,"buildATNKey"),foe=1,moe=2,yoe=4,voe=5,xoe=7,boe=8,woe=9,koe=10,Toe=11,Eoe=12,Coe=class{static{mt(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},Soe=class extends Coe{static{mt(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},_oe=class extends Coe{static{mt(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},Aoe=class extends Coe{static{mt(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}},mt(Wse,"createATN"),mt(Yse,"createRuleStartAndStopATNStates"),mt(Hse,"atom"),mt(Vse,"repetition"),mt(Xse,"repetitionSep"),mt(Kse,"repetitionMandatory"),mt(Zse,"repetitionMandatorySep"),mt(Qse,"alternation"),mt(Jse,"option"),mt(eoe,"block"),mt(toe,"plus"),mt(roe,"star"),mt(noe,"optional"),mt(ioe,"defineDecisionState"),mt(aoe,"makeAlts"),mt(soe,"getProdType"),mt(ooe,"makeBlock"),mt(loe,"tokenRef"),mt(coe,"ruleRef"),mt(hoe,"buildRuleHandle"),mt(uoe,"epsilon"),mt(doe,"newState"),mt(poe,"addTransition"),mt(goe,"removeState")});function Noe(e,t=!0){return`${t?"a"+e.alt:""}s${e.state.stateNumber}:`+e.stack.map(e=>e.stateNumber.toString()).join("_")}var Ioe,Roe,Moe=e(()=>{wq(),Ioe={},Roe=class{static{mt(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){var t=Noe(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return x(this.configs,e=>e.alt)}get key(){let e="";for(var t in this.map)e+=t+":";return e}},mt(Noe,"getATNConfigKey")});function Doe(n,i){let a={};return e=>{let t=e.toString(),r=a[t];return void 0===r&&(r={atnStartState:n,decision:i,states:{}},a[t]=r),r}}function Ooe(e,t=!0){var r,n=new Set;for(r of e){var i,a,s=new Set;for(i of r){if(void 0===i){if(t)break;return!1}for(a of[i.tokenTypeIdx].concat(i.categoryMatches))if(n.has(a)){if(!s.has(a))return!1}else n.add(a),s.add(a)}}return!0}function Poe(t){var r=t.decisionStates.length,n=Array(r);for(let e=0;e<r;e++)n[e]=Doe(t.decisionStates[e],e);return n}function Boe(e,t,r,n){let i=e[t](r),a=i.start;return void 0===a&&(e=Zoe(i.atnStartState),a=Koe(i,Voe(e)),i.start=a),$oe.apply(this,[i,a,r,n])}function $oe(e,t,r,n){let i=t,a=1,s=[],o=this.LA(a++);for(;;){var l=joe(i,o);if((l=void 0===l?Foe.apply(this,[e,i,o,a,r,n]):l)===Ioe)return qoe(s,i,o);if(!0===l.isAcceptState)return l.prediction;i=l,s.push(o),o=this.LA(a++)}}function Foe(e,t,r,n,i,a){var s=Woe(t.configs,r,i);if(0===s.size)return Xoe(e,t,r,Ioe),Ioe;let o=Voe(s),l=Hoe(s,i);return void 0!==l?(o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l):rle(s)&&(i=Pj(s.alts),o.isAcceptState=!0,o.prediction=i,o.configs.uniqueAlt=i,zoe.apply(this,[e,n,s.alts,a])),o=Xoe(e,t,r,o)}function zoe(e,t,r,n){var i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);n(Goe({topLevelRule:(e=e.atnStartState).rule,ambiguityIndices:r,production:e.production,prefixPath:i}))}function Goe(e){var t=x(e.prefixPath,e=>Qne(e)).join(", "),r=0===e.production.idx?"":e.production.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${Uoe(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 Uoe(e){if(e instanceof Zte)return"SUBRULE";if(e instanceof ere)return"OPTION";if(e instanceof are)return"OR";if(e instanceof tre)return"AT_LEAST_ONE";if(e instanceof rre)return"AT_LEAST_ONE_SEP";if(e instanceof ire)return"MANY_SEP";if(e instanceof nre)return"MANY";if(e instanceof sre)return"CONSUME";throw Error("non exhaustive match")}function qoe(e,t,r){return t=Tq(t.configs.elements,e=>e.state.transitions),{actualToken:r,possibleTokenTypes:CY(t.filter(e=>e instanceof Soe).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function joe(e,t){return e.edges[t.tokenTypeIdx]}function Woe(e,t,r){var n,i=new Roe,a=[];for(n of e.elements)if(!1!==r.is(n.alt))if(n.state.type===xoe)a.push(n);else{var s=n.state.transitions.length;for(let e=0;e<s;e++){var o=Yoe(n.state.transitions[e],t);void 0!==o&&i.add({state:o,alt:n.alt,stack:n.stack})}}let l;if(void 0===(l=0===a.length&&1===i.size?i:l)){l=new Roe;for(var c of i.elements)Qoe(c,l)}if(0<a.length&&!ele(l))for(var h of a)l.add(h);return l}function Yoe(e,t){if(e instanceof Soe&&nie(t,e.tokenType))return e.target}function Hoe(e,t){let r;for(var n of e.elements)if(!0===t.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}function Voe(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function Xoe(e,t,r,n){return n=Koe(e,n),t.edges[r.tokenTypeIdx]=n}function Koe(e,t){var r,n;return t===Ioe?t:(r=t.configs.key,void 0!==(n=e.states[r])?n:(t.configs.finalize(),e.states[r]=t))}function Zoe(t){var r=new Roe,n=t.transitions.length;for(let e=0;e<n;e++)Qoe({state:t.transitions[e].target,alt:e,stack:[]},r);return r}function Qoe(t,r){var e,n=t.state;if(n.type===xoe)0<t.stack.length?Qoe({state:(e=[...t.stack]).pop(),alt:t.alt,stack:e},r):r.add(t);else{n.epsilonOnlyTransitions||r.add(t);var i=n.transitions.length;for(let e=0;e<i;e++){var a=Joe(t,n.transitions[e]);void 0!==a&&Qoe(a,r)}}}function Joe(e,t){var r;return t instanceof _oe?{state:t.target,alt:e.alt,stack:e.stack}:t instanceof Aoe?(r=[...e.stack,t.followState],{state:t.target,alt:e.alt,stack:r}):void 0}function ele(e){for(var t of e.elements)if(t.state.type===xoe)return!0;return!1}function tle(e){for(var t of e.elements)if(t.state.type!==xoe)return!1;return!0}function rle(e){return!!tle(e)||ile(e=nle(e.elements))&&!ale(e)}function nle(e){var r,n=new Map;for(r of e){let e=Noe(r,!1),t=n.get(e);void 0===t&&(t={},n.set(e,t)),t[r.alt]=!0}return n}function ile(e){for(var t of Array.from(e.values()))if(1<Object.keys(t).length)return!0;return!1}function ale(e){for(var t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}var sle,ole,lle,cle,hle,ule,dle,ple,gle,fle,mle,yle,vle,xle,ble,wle,kle,Tle,Ele,Cle,Sle,_le,Ale,Lle,Nle,Ile,Rle,Mle,Dle,Ole,Ple,Ble,$le,Fle,zle,Gle,Ule,qle,jle,Wle,Yle,Hle,Vle,Xle,Kle,Zle,Qle,Jle,ece,tce,rce,nce,ice,ace,sce,oce,lce,cce,hce,uce,dce,pce,gce,fce,mce,yce,vce,xce,bce,wce,kce,Tce,Ece,Cce,Sce,_ce,Ace,Lce,Nce,Ice,Rce,yt,Mce,Dce,Oce,Pce,Bce,$ce,Fce=e(()=>{qse(),Loe(),Moe(),Bj(),Eq(),SY(),wq(),t$(),zU(),pj(),KW(),mt(Doe,"createDFACache"),sle=class{static{mt(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let t="",r=this.predicates.length;for(let e=0;e<r;e++)t+=!0===this.predicates[e]?"1":"0";return t}},ole=new sle,lle=class extends Oae{static{mt(this,"LLStarLookaheadStrategy")}constructor(e){super(),this.logging=null!=(e=e?.logging)?e:e=>console.log(e)}initialize(e){this.atn=Wse(e.rules),this.dfas=Poe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=e,a=this.dfas,s=this.logging,o=jse(r,"Alternation",t),l=this.atn.decisionMap[o].decision,c=x(Mie({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>x(e,e=>e[0]));if(!Ooe(c,!1)||i)return n?function(t){var r=new sle,n=void 0===t?0:t.length;for(let e=0;e<n;e++){var i=t?.[e].GATE;r.set(e,void 0===i||i.call(this))}var e=Boe.call(this,a,l,r,s);return"number"==typeof e?e:void 0}:function(){var e=Boe.call(this,a,l,ole,s);return"number"==typeof e?e:void 0};{let r=XW(c,(t,e,r)=>(v(e,e=>{e&&(t[e.tokenTypeIdx]=r,v(e.categoryMatches,e=>{t[e]=r}))}),t),{});return n?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:n,dynamicTokensEnabled:i}=r,a=this.dfas,s=this.logging,o=jse(t,n,e),l=this.atn.decisionMap[o].decision,c=x(Mie({maxLookahead:1,occurrence:e,prodType:n,rule:t}),e=>x(e,e=>e[0]));if(Ooe(c)&&c[0][0]&&!i){if(r=c[0],1===(r=e$(r)).length&&dj(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=XW(r,(t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,v(e.categoryMatches,e=>{t[e]=!0})),t),{});return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){var e=Boe.call(this,a,l,ole,s);return"object"!=typeof e&&0===e}}},mt(Ooe,"isLL1Sequence"),mt(Poe,"initATNSimulator"),mt(Boe,"adaptivePredict"),mt($oe,"performLookahead"),mt(Foe,"computeLookaheadTarget"),mt(zoe,"reportLookaheadAmbiguity"),mt(Goe,"buildAmbiguityError"),mt(Uoe,"getProductionDslName"),mt(qoe,"buildAdaptivePredictError"),mt(joe,"getExistingTargetState"),mt(Woe,"computeReachSet"),mt(Yoe,"getReachableTarget"),mt(Hoe,"getUniqueAlt"),mt(Voe,"newDFAState"),mt(Xoe,"addDFAEdge"),mt(Koe,"addDFAState"),mt(Zoe,"computeStartState"),mt(Qoe,"closure"),mt(Joe,"getEpsilonTarget"),mt(ele,"hasConfigInRuleStopState"),mt(tle,"allConfigsInRuleStopStates"),mt(rle,"hasConflictTerminatingPrediction"),mt(nle,"getConflictingAltSets"),mt(ile,"hasConflictingAltSet"),mt(ale,"hasStateAssociatedWithOneAlt")}),zce=e(()=>{Fce()}),Gce=e(()=>{function e(e){return"string"==typeof e}var t,r,n,i;function a(e){return"string"==typeof e}function s(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}function o(e){return"number"==typeof e&&r.MIN_VALUE<=e&&e<=r.MAX_VALUE}function l(e,t){return{line:e=e===Number.MAX_VALUE?dle.MAX_VALUE:e,character:t=t===Number.MAX_VALUE?dle.MAX_VALUE:t}}function c(e){return yt.objectLiteral(e)&&yt.uinteger(e.line)&&yt.uinteger(e.character)}function h(e,t,r,n){if(yt.uinteger(e)&&yt.uinteger(t)&&yt.uinteger(r)&&yt.uinteger(n))return{start:ple.create(e,t),end:ple.create(r,n)};if(ple.is(e)&&ple.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${n}]`)}function u(e){return yt.objectLiteral(e)&&ple.is(e.start)&&ple.is(e.end)}function d(e,t){return{uri:e,range:t}}function p(e){return yt.objectLiteral(e)&&gle.is(e.range)&&(yt.string(e.uri)||yt.undefined(e.uri))}function g(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}}function f(e){return yt.objectLiteral(e)&&gle.is(e.targetRange)&&yt.string(e.targetUri)&&gle.is(e.targetSelectionRange)&&(gle.is(e.originSelectionRange)||yt.undefined(e.originSelectionRange))}function m(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}}function y(e){return yt.objectLiteral(e)&&yt.numberRange(e.red,0,1)&&yt.numberRange(e.green,0,1)&&yt.numberRange(e.blue,0,1)&&yt.numberRange(e.alpha,0,1)}function v(e,t){return{range:e,color:t}}function x(e){return yt.objectLiteral(e)&&gle.is(e.range)&&yle.is(e.color)}function b(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function w(e){return yt.objectLiteral(e)&&yt.string(e.label)&&(yt.undefined(e.textEdit)||Ale.is(e))&&(yt.undefined(e.additionalTextEdits)||yt.typedArray(e.additionalTextEdits,Ale.is))}function k(e,t,r,n,i,a){return e={startLine:e,endLine:t},yt.defined(r)&&(e.startCharacter=r),yt.defined(n)&&(e.endCharacter=n),yt.defined(i)&&(e.kind=i),yt.defined(a)&&(e.collapsedText=a),e}function T(e){return yt.objectLiteral(e)&&yt.uinteger(e.startLine)&&yt.uinteger(e.startLine)&&(yt.undefined(e.startCharacter)||yt.uinteger(e.startCharacter))&&(yt.undefined(e.endCharacter)||yt.uinteger(e.endCharacter))&&(yt.undefined(e.kind)||yt.string(e.kind))}function E(e,t){return{location:e,message:t}}function C(e){return yt.defined(e)&&fle.is(e.location)&&yt.string(e.message)}function S(e){return yt.objectLiteral(e)&&yt.string(e.href)}function _(e,t,r,n,i,a){return e={range:e,message:t},yt.defined(r)&&(e.severity=r),yt.defined(n)&&(e.code=n),yt.defined(i)&&(e.source=i),yt.defined(a)&&(e.relatedInformation=a),e}function A(e){var t;return yt.defined(e)&&gle.is(e.range)&&yt.string(e.message)&&(yt.number(e.severity)||yt.undefined(e.severity))&&(yt.integer(e.code)||yt.string(e.code)||yt.undefined(e.code))&&(yt.undefined(e.codeDescription)||yt.string(null==(t=e.codeDescription)?void 0:t.href))&&(yt.string(e.source)||yt.undefined(e.source))&&(yt.undefined(e.relatedInformation)||yt.typedArray(e.relatedInformation,kle.is))}function L(e,t,...r){return e={title:e,command:t},yt.defined(r)&&0<r.length&&(e.arguments=r),e}function N(e){return yt.defined(e)&&yt.string(e.title)&&yt.string(e.command)}function I(e,t){return{range:e,newText:t}}function R(e,t){return{range:{start:e,end:e},newText:t}}function M(e){return{range:e,newText:""}}function P(e){return yt.objectLiteral(e)&&yt.string(e.newText)&&gle.is(e.range)}function B(e,t,r){return e={label:e},void 0!==t&&(e.needsConfirmation=t),void 0!==r&&(e.description=r),e}function $(e){return yt.objectLiteral(e)&&yt.string(e.label)&&(yt.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(yt.string(e.description)||void 0===e.description)}function F(e){return yt.string(e)}function z(e,t,r){return{range:e,newText:t,annotationId:r}}function G(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}}function U(e,t){return{range:e,newText:"",annotationId:t}}function q(e){return Ale.is(e)&&(Lle.is(e.annotationId)||Nle.is(e.annotationId))}function j(e,t){return{textDocument:e,edits:t}}function W(e){return yt.defined(e)&&Fle.is(e.textDocument)&&Array.isArray(e.edits)}function Y(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 H(e){return e&&"create"===e.kind&&yt.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||yt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||yt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||Nle.is(e.annotationId))}function V(e,t,r,n){return e={kind:"rename",oldUri:e,newUri:t},void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(e.options=r),void 0!==n&&(e.annotationId=n),e}function X(e){return e&&"rename"===e.kind&&yt.string(e.oldUri)&&yt.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||yt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||yt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||Nle.is(e.annotationId))}function K(e,t,r){return e={kind:"delete",uri:e},void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(e.options=t),void 0!==r&&(e.annotationId=r),e}function Z(e){return e&&"delete"===e.kind&&yt.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||yt.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||yt.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||Nle.is(e.annotationId))}function Q(e){return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every(e=>yt.string(e.kind)?Mle.is(e)||Dle.is(e)||Ole.is(e):Rle.is(e)))}function J(e){return{uri:e}}function ee(e){return yt.defined(e)&&yt.string(e.uri)}function te(e,t){return{uri:e,version:t}}function re(e){return yt.defined(e)&&yt.string(e.uri)&&yt.integer(e.version)}function ne(e,t){return{uri:e,version:t}}function ie(e){return yt.defined(e)&&yt.string(e.uri)&&(null===e.version||yt.integer(e.version))}function ae(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}}function se(e){return yt.defined(e)&&yt.string(e.uri)&&yt.string(e.languageId)&&yt.integer(e.version)&&yt.string(e.text)}function oe(e){return e===n.PlainText||e===n.Markdown}function le(e){var t=e;return yt.objectLiteral(e)&&Gle.is(t.kind)&&yt.string(t.value)}function ce(e,t,r){return{newText:e,insert:t,replace:r}}function he(e){return e&&yt.string(e.newText)&&gle.is(e.insert)&&gle.is(e.replace)}function ue(e){return e&&(yt.string(e.detail)||void 0===e.detail)&&(yt.string(e.description)||void 0===e.description)}function de(e){return{label:e}}function pe(e,t){return{items:e||[],isIncomplete:!!t}}function ge(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function fe(e){return yt.string(e)||yt.objectLiteral(e)&&yt.string(e.language)&&yt.string(e.value)}function me(e){var t=e;return!!t&&yt.objectLiteral(t)&&(Ule.is(t.contents)||Kle.is(t.contents)||yt.typedArray(t.contents,Kle.is))&&(void 0===e.range||gle.is(e.range))}function ye(e,t){return t?{label:e,documentation:t}:{label:e}}function ve(e,t,...r){return e={label:e},yt.defined(t)&&(e.documentation=t),yt.defined(r)?e.parameters=r:e.parameters=[],e}function xe(e,t){return e={range:e},yt.number(t)&&(e.kind=t),e}function be(e,t,r,n,i){return e={name:e,kind:t,location:{uri:n,range:r}},i&&(e.containerName=i),e}function we(e,t,r,n){return void 0!==n?{name:e,kind:t,location:{uri:r,range:n}}:{name:e,kind:t,location:{uri:r}}}function ke(e,t,r,n,i,a){return e={name:e,detail:t,kind:r,range:n,selectionRange:i},void 0!==a&&(e.children=a),e}function Te(e){return e&&yt.string(e.name)&&yt.number(e.kind)&&gle.is(e.range)&&gle.is(e.selectionRange)&&(void 0===e.detail||yt.string(e.detail))&&(void 0===e.deprecated||yt.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}function Ee(e,t,r){return e={diagnostics:e},null!=t&&(e.only=t),null!=r&&(e.triggerKind=r),e}function Ce(e){return yt.defined(e)&&yt.typedArray(e.diagnostics,Sle.is)&&(void 0===e.only||yt.typedArray(e.only,yt.string))&&(void 0===e.triggerKind||e.triggerKind===oce.Invoked||e.triggerKind===oce.Automatic)}function Se(e,t,r){let n={title:e},i=!0;return"string"==typeof t?(i=!1,n.kind=t):_le.is(t)?n.command=t:n.edit=t,i&&void 0!==r&&(n.kind=r),n}function _e(e){return e&&yt.string(e.title)&&(void 0===e.diagnostics||yt.typedArray(e.diagnostics,Sle.is))&&(void 0===e.kind||yt.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||_le.is(e.command))&&(void 0===e.isPreferred||yt.boolean(e.isPreferred))&&(void 0===e.edit||Ple.is(e.edit))}function Ae(e,t){return e={range:e},yt.defined(t)&&(e.data=t),e}function Le(e){return yt.defined(e)&&gle.is(e.range)&&(yt.undefined(e.command)||_le.is(e.command))}function Ne(e,t){return{tabSize:e,insertSpaces:t}}function Ie(e){return yt.defined(e)&&yt.uinteger(e.tabSize)&&yt.boolean(e.insertSpaces)}function Re(e,t,r){return{range:e,target:t,data:r}}function Me(e){return yt.defined(e)&&gle.is(e.range)&&(yt.undefined(e.target)||yt.string(e.target))}function De(e,t){return{range:e,parent:t}}function Oe(e){return yt.objectLiteral(e)&&gle.is(e.range)&&(void 0===e.parent||i.is(e.parent))}function Pe(e){return yt.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])}function Be(e,t){return{range:e,text:t}}function $e(e){return null!=e&&gle.is(e.range)&&yt.string(e.text)}function Fe(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}}function ze(e){return null!=e&&gle.is(e.range)&&yt.boolean(e.caseSensitiveLookup)&&(yt.string(e.variableName)||void 0===e.variableName)}function Ge(e,t){return{range:e,expression:t}}function Ue(e){return null!=e&&gle.is(e.range)&&(yt.string(e.expression)||void 0===e.expression)}function qe(e,t){return{frameId:e,stoppedLocation:t}}function je(e){return yt.defined(e)&&gle.is(e.stoppedLocation)}function We(e){return 1===e||2===e}function Ye(e){return{value:e}}function He(e){return yt.objectLiteral(e)&&(void 0===e.tooltip||yt.string(e.tooltip)||Ule.is(e.tooltip))&&(void 0===e.location||fle.is(e.location))&&(void 0===e.command||_le.is(e.command))}function Ve(e,t,r){return e={position:e,label:t},void 0!==r&&(e.kind=r),e}function Xe(e){return yt.objectLiteral(e)&&ple.is(e.position)&&(yt.string(e.label)||yt.typedArray(e.label,kce.is))&&(void 0===e.kind||wce.is(e.kind))&&void 0===e.textEdits||yt.typedArray(e.textEdits,Ale.is)&&(void 0===e.tooltip||yt.string(e.tooltip)||Ule.is(e.tooltip))&&(void 0===e.paddingLeft||yt.boolean(e.paddingLeft))&&(void 0===e.paddingRight||yt.boolean(e.paddingRight))}function Ke(e){return{kind:"snippet",value:e}}function Ze(e,t,r,n){return{insertText:e,filterText:t,range:r,command:n}}function Qe(e){return{items:e}}function Je(e,t){return{range:e,text:t}}function et(e,t){return{triggerKind:e,selectedCompletionInfo:t}}function tt(e){return yt.objectLiteral(e)&&hle.is(e.uri)&&yt.string(e.name)}function rt(e,t,r,n){return new Rce(e,t,r,n)}function nt(e){return!!(yt.defined(e)&&yt.string(e.uri)&&(yt.undefined(e.languageId)||yt.string(e.languageId))&&yt.uinteger(e.lineCount)&&yt.func(e.getText)&&yt.func(e.positionAt)&&yt.func(e.offsetAt))}function it(t,e){let r=t.getText(),n=D(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}),i=r.length;for(let e=n.length-1;0<=e;e--){var a=n[e],s=t.offsetAt(a.range.start),o=t.offsetAt(a.range.end);if(!(o<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),i=s}return r}function D(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);D(s,i),D(o,i);let e=0,t=0,r=0;for(;e<s.length&&t<o.length;)i(s[e],o[t])<=0?n[r++]=s[e++]:n[r++]=o[t++];for(;e<s.length;)n[r++]=s[e++];for(;t<o.length;)n[r++]=o[t++]}return n}O=cle=cle||{},mt(e,"is"),O.is=e,O=hle=hle||{},mt(a,"is"),O.is=a,(t=ule=ule||{}).MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647,mt(s,"is"),t.is=s,(r=dle=dle||{}).MIN_VALUE=0,r.MAX_VALUE=2147483647,mt(o,"is"),r.is=o,O=ple=ple||{},mt(l,"create"),O.create=l,mt(c,"is"),O.is=c,O=gle=gle||{},mt(h,"create"),O.create=h,mt(u,"is"),O.is=u,O=fle=fle||{},mt(d,"create"),O.create=d,mt(p,"is"),O.is=p,O=mle=mle||{},mt(g,"create"),O.create=g,mt(f,"is"),O.is=f,O=yle=yle||{},mt(m,"create"),O.create=m,mt(y,"is"),O.is=y,O=vle=vle||{},mt(v,"create"),O.create=v,mt(x,"is"),O.is=x,O=xle=xle||{},mt(b,"create"),O.create=b,mt(w,"is"),O.is=w,(O=ble=ble||{}).Comment="comment",O.Imports="imports",O.Region="region",O=wle=wle||{},mt(k,"create"),O.create=k,mt(T,"is"),O.is=T,O=kle=kle||{},mt(E,"create"),O.create=E,mt(C,"is"),O.is=C,(O=Tle=Tle||{}).Error=1,O.Warning=2,O.Information=3,O.Hint=4,(O=Ele=Ele||{}).Unnecessary=1,O.Deprecated=2,O=Cle=Cle||{},mt(S,"is"),O.is=S,O=Sle=Sle||{},mt(_,"create"),O.create=_,mt(A,"is"),O.is=A,O=_le=_le||{},mt(L,"create"),O.create=L,mt(N,"is"),O.is=N,O=Ale=Ale||{},mt(I,"replace"),O.replace=I,mt(R,"insert"),O.insert=R,mt(M,"del"),O.del=M,mt(P,"is"),O.is=P,O=Lle=Lle||{},mt(B,"create"),O.create=B,mt($,"is"),O.is=$,O=Nle=Nle||{},mt(F,"is"),O.is=F,O=Ile=Ile||{},mt(z,"replace"),O.replace=z,mt(G,"insert"),O.insert=G,mt(U,"del"),O.del=U,mt(q,"is"),O.is=q,O=Rle=Rle||{},mt(j,"create"),O.create=j,mt(W,"is"),O.is=W,O=Mle=Mle||{},mt(Y,"create"),O.create=Y,mt(H,"is"),O.is=H,O=Dle=Dle||{},mt(V,"create"),O.create=V,mt(X,"is"),O.is=X,O=Ole=Ole||{},mt(K,"create"),O.create=K,mt(Z,"is"),O.is=Z,O=Ple=Ple||{},mt(Q,"is"),O.is=Q,O=Ble=Ble||{},mt(J,"create"),O.create=J,mt(ee,"is"),O.is=ee,O=$le=$le||{},mt(te,"create"),O.create=te,mt(re,"is"),O.is=re,O=Fle=Fle||{},mt(ne,"create"),O.create=ne,mt(ie,"is"),O.is=ie,O=zle=zle||{},mt(ae,"create"),O.create=ae,mt(se,"is"),O.is=se,(n=Gle=Gle||{}).PlainText="plaintext",n.Markdown="markdown",mt(oe,"is"),n.is=oe,O=Ule=Ule||{},mt(le,"is"),O.is=le,(O=qle=qle||{}).Text=1,O.Method=2,O.Function=3,O.Constructor=4,O.Field=5,O.Variable=6,O.Class=7,O.Interface=8,O.Module=9,O.Property=10,O.Unit=11,O.Value=12,O.Enum=13,O.Keyword=14,O.Snippet=15,O.Color=16,O.File=17,O.Reference=18,O.Folder=19,O.EnumMember=20,O.Constant=21,O.Struct=22,O.Event=23,O.Operator=24,O.TypeParameter=25,(O=jle=jle||{}).PlainText=1,O.Snippet=2,O=Wle=Wle||{},mt(ce,"create"),O.create=ce,mt(he,"is"),O.is=he,(O=Yle=Yle||{}).asIs=1,O.adjustIndentation=2,O=Hle=Hle||{},mt(ue,"is"),O.is=ue,O=Vle=Vle||{},mt(de,"create"),O.create=de,O=Xle=Xle||{},mt(pe,"create"),O.create=pe,O=Kle=Kle||{},mt(ge,"fromPlainText"),O.fromPlainText=ge,mt(fe,"is"),O.is=fe,O=Zle=Zle||{},mt(me,"is"),O.is=me,O=Qle=Qle||{},mt(ye,"create"),O.create=ye,O=Jle=Jle||{},mt(ve,"create"),O.create=ve,(O=ece=ece||{}).Text=1,O.Read=2,O.Write=3,O=tce=tce||{},mt(xe,"create"),O.create=xe,(O=rce=rce||{}).File=1,O.Module=2,O.Namespace=3,O.Package=4,O.Class=5,O.Method=6,O.Property=7,O.Field=8,O.Constructor=9,O.Enum=10,O.Interface=11,O.Function=12,O.Variable=13,O.Constant=14,O.String=15,O.Number=16,O.Boolean=17,O.Array=18,O.Object=19,O.Key=20,O.Null=21,O.EnumMember=22,O.Struct=23,O.Event=24,O.Operator=25,O.TypeParameter=26,O=nce=nce||{},mt(be,"create"),O.create=be,O=ice=ice||{},mt(we,"create"),O.create=we,O=ace=ace||{},mt(ke,"create"),O.create=ke,mt(Te,"is"),O.is=Te,(O=sce=sce||{}).Empty="",O.QuickFix="quickfix",O.Refactor="refactor",O.RefactorExtract="refactor.extract",O.RefactorInline="refactor.inline",O.RefactorRewrite="refactor.rewrite",O.Source="source",O.SourceOrganizeImports="source.organizeImports",O.SourceFixAll="source.fixAll",(O=oce=oce||{}).Invoked=1,O.Automatic=2,O=lce=lce||{},mt(Ee,"create"),O.create=Ee,mt(Ce,"is"),O.is=Ce,O=cce=cce||{},mt(Se,"create"),O.create=Se,mt(_e,"is"),O.is=_e,O=hce=hce||{},mt(Ae,"create"),O.create=Ae,mt(Le,"is"),O.is=Le,O=uce=uce||{},mt(Ne,"create"),O.create=Ne,mt(Ie,"is"),O.is=Ie,O=dce=dce||{},mt(Re,"create"),O.create=Re,mt(Me,"is"),O.is=Me,i=pce=pce||{},mt(De,"create"),i.create=De,mt(Oe,"is"),i.is=Oe,(O=gce=gce||{}).namespace="namespace",O.type="type",O.class="class",O.enum="enum",O.interface="interface",O.struct="struct",O.typeParameter="typeParameter",O.parameter="parameter",O.variable="variable",O.property="property",O.enumMember="enumMember",O.event="event",O.function="function",O.method="method",O.macro="macro",O.keyword="keyword",O.modifier="modifier",O.comment="comment",O.string="string",O.number="number",O.regexp="regexp",O.operator="operator",O.decorator="decorator",(O=fce=fce||{}).declaration="declaration",O.definition="definition",O.readonly="readonly",O.static="static",O.deprecated="deprecated",O.abstract="abstract",O.async="async",O.modification="modification",O.documentation="documentation",O.defaultLibrary="defaultLibrary",O=mce=mce||{},mt(Pe,"is"),O.is=Pe,O=yce=yce||{},mt(Be,"create"),O.create=Be,mt($e,"is"),O.is=$e,O=vce=vce||{},mt(Fe,"create"),O.create=Fe,mt(ze,"is"),O.is=ze,O=xce=xce||{},mt(Ge,"create"),O.create=Ge,mt(Ue,"is"),O.is=Ue,O=bce=bce||{},mt(qe,"create"),O.create=qe,mt(je,"is"),O.is=je,(O=wce=wce||{}).Type=1,O.Parameter=2,mt(We,"is"),O.is=We,O=kce=kce||{},mt(Ye,"create"),O.create=Ye,mt(He,"is"),O.is=He,O=Tce=Tce||{},mt(Ve,"create"),O.create=Ve,mt(Xe,"is"),O.is=Xe,O=Ece=Ece||{},mt(Ke,"createSnippet"),O.createSnippet=Ke,O=Cce=Cce||{},mt(Ze,"create"),O.create=Ze,O=Sce=Sce||{},mt(Qe,"create"),O.create=Qe,(O=_ce=_ce||{}).Invoked=0,O.Automatic=1,O=Ace=Ace||{},mt(Je,"create"),O.create=Je,O=Lce=Lce||{},mt(et,"create"),O.create=et,O=Nce=Nce||{},mt(tt,"is"),O.is=tt,O=Ice=Ice||{},mt(rt,"create"),O.create=rt,mt(nt,"is"),O.is=nt,mt(it,"applyEdits"),O.applyEdits=it,mt(D,"mergeSort"),Rce=class{static{mt(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,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,n=!0;for(let e=0;e<r.length;e++){n&&(t.push(e),n=!1);var i=r.charAt(e);n="\r"===i||i===`
|
||
`,"\r"===i&&e+1<r.length&&r.charAt(e+1)===`
|
||
`&&e++}n&&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,n=t.length;if(0===n)return ple.create(0,e);for(;r<n;){var i=Math.floor((r+n)/2);t[i]>e?n=i:r=i+1}var a=r-1;return ple.create(a,e-t[a])}offsetAt(e){var t,r=this.getLineOffsets();return e.line>=r.length?this._content.length:e.line<0?0:(t=r[e.line],r=e.line+1<r.length?r[e.line+1]:this._content.length,Math.max(Math.min(t+e.character,r),t))}get lineCount(){return this.getLineOffsets().length}};{var O=yt=yt||{};let n=Object.prototype.toString;function at(e){return typeof e<"u"}function st(e){return"u"<typeof e}function ot(e){return!0===e||!1===e}function lt(e){return"[object String]"===n.call(e)}function ct(e){return"[object Number]"===n.call(e)}function ht(e,t,r){return"[object Number]"===n.call(e)&&t<=e&&e<=r}function ut(e){return"[object Number]"===n.call(e)&&-2147483648<=e&&e<=2147483647}function dt(e){return"[object Number]"===n.call(e)&&0<=e&&e<=2147483647}function pt(e){return"[object Function]"===n.call(e)}function gt(e){return null!==e&&"object"==typeof e}function ft(e,t){return Array.isArray(e)&&e.every(t)}mt(at,"defined"),O.defined=at,mt(st,"undefined"),O.undefined=st,mt(ot,"boolean"),O.boolean=ot,mt(lt,"string"),O.string=lt,mt(ct,"number"),O.number=ct,mt(ht,"numberRange"),O.numberRange=ht,mt(ut,"integer"),O.integer=ut,mt(dt,"uinteger"),O.uinteger=dt,mt(pt,"func"),O.func=pt,mt(gt,"objectLiteral"),O.objectLiteral=gt,mt(ft,"typedArray"),O.typedArray=ft}}),Uce=e(()=>{Gce(),aQ(),Mce=class{static{mt(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){var e;return null!=(e=this.nodeStack[this.nodeStack.length-1])?e:this.rootNode}buildRootNode(e){return this.rootNode=new $ce(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){var t=new Pce;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){return(e=new Oce(e.startOffset,e.image.length,GZ(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 n=new Oce(t.startOffset,t.image.length,GZ(t),t.tokenType,!0);n.root=this.rootNode,r.push(n)}let i=this.current,a=!1;if(0<i.content.length)i.content.push(...r);else{for(;i.container;){var s=i.container.content.indexOf(i);if(0<s){i.container.content.splice(s,0,...r),a=!0;break}i=i.container}a||this.rootNode.content.unshift(...r)}}construct(e){var t=this.current;"string"==typeof e.$type&&(this.current.astNode=e),e.$cstNode=t,0===(e=this.nodeStack.pop())?.content.length&&this.removeNode(e)}},Dce=class{static{mt(this,"AbstractCstNode")}get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var e="string"==typeof(null==(e=this._astNode)?void 0:e.$type)?this._astNode:null==(e=this.container)?void 0:e.astNode;if(e)return e;throw new Error("This node has no associated AST element")}set astNode(e){this._astNode=e}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},Oce=class extends Dce{static{mt(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,r,n,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=n,this._length=t,this._range=r}},Pce=class extends Dce{static{mt(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new Bce(this)}get children(){return this.content}get offset(){var e;return null!=(e=null==(e=this.firstNonHiddenNode)?void 0:e.offset)?e:0}get length(){return this.end-this.offset}get end(){var e;return null!=(e=null==(e=this.lastNonHiddenNode)?void 0:e.end)?e: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:ple.create(0,0),end:ple.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]}},Bce=class t extends Array{static{mt(this,"CstNodeContainer")}constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(var t of e)t.container=this.parent}},$ce=class extends Pce{static{mt(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}});function qce(e){return e.$type===jce}var jce,Wce,Yce,Hce,Vce,Xce,Kce,Zce,Qce,Jce=e(()=>{qse(),zce(),JJ(),Dte(),fee(),Uce(),jce=Symbol("Datatype"),mt(qce,"isDataTypeNode"),Wce=mt(e=>e.endsWith("")?e:e+"","withRuleSuffix"),Yce=class{static{mt(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;var t=this.lexer.definition,r="production"===e.LanguageMetaData.mode;this.wrapper=new Qce(t,Object.assign(Object.assign({},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()}},Hce=class extends Yce{static{mt(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Mce,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){var r=this.computeRuleType(e),r=this.wrapper.DEFINE_RULE(Wce(e.name),this.startImplementation(r,t).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}computeRuleType(e){if(!e.fragment)return fte(e)?jce:xte(e)??e.name}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=r.call(this.wrapper,{}),this.nodeBuilder.addHiddenNodes(e.hidden),this.unorderedGroups.clear(),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.")}startImplementation(i,a){return e=>{var t,r=!this.isRecording()&&void 0!==i;r&&(this.stack.push(t={$type:i}),i===jce)&&(t.value="");let n;try{n=a(e)}catch{n=void 0}return n=void 0===n&&r?this.construct():n}}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,n){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,n)),{assignment:e,isCrossRef:i}=this.getAssignment(n),a=this.current;if(e){var s=VQ(n)?t.image:this.converter.convert(t.image,r);this.assign(e.operator,e.feature,s,r,i)}else if(qce(a)){let e=t.image;VQ(n)||(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,n,i){let a;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(n)),r=this.wrapper.wrapSubrule(e,t,i),!this.isRecording()&&a&&0<a.length&&this.performSubruleAssignment(r,n,a)}performSubruleAssignment(e,t,r){var{assignment:t,isCrossRef:n}=this.getAssignment(t);t?this.assign(t.operator,t.feature,e,r,n):qce(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,!1)):e.$type=t}}construct(){var e;if(!this.isRecording())return tee(e=this.current),this.nodeBuilder.construct(e),this.stack.pop(),qce(e)?this.converter.convert(e.value,e.$cstNode):(dee(this.astReflection,e),e)}getAssignment(e){var t;return this.assignmentMap.has(e)||(t=ree(e,qQ),this.assignmentMap.set(e,{assignment:t,isCrossRef:!!t&&WQ(t.terminal)})),this.assignmentMap.get(e)}assign(e,t,r,n,i){var a=this.current,s=i&&"string"==typeof r?this.linker.buildReference(a,t,n,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,n]of Object.entries(t)){var i=e[r];void 0===i?e[r]=n:Array.isArray(i)&&Array.isArray(n)&&(n.push(...i),e[r]=n)}return(t=e.$cstNode)&&(t.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},Vce=class{static{mt(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return gie.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return gie.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return gie.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return gie.buildEarlyExitMessage(e)}},Xce=class extends Vce{static{mt(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},Kce=class extends Yce{static{mt(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){return this.resetState(),e=this.lexer.tokenize(e,{mode:"partial"}),this.tokens=e.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){return t=this.wrapper.DEFINE_RULE(Wce(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,n,i){this.before(n),this.wrapper.wrapSubrule(e,t,i),this.after(n)}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}},Zce={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Xce},Qce=class extends Bse{static{mt(this,"ChevrotainWrapper")}constructor(e,t){var r=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},Zce),{lookaheadStrategy:r?new Oae({maxLookahead:t.maxLookahead}):new lle({logging:t.skipValidations?()=>{}:void 0})}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}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)}}});function ehe(e,t,r){return the({parser:t,tokens:r,ruleNames:new Map},e),t}function the(e,t){let r=Qee(t,!1),n=NZ(t.rules).filter(RQ).filter(e=>r.has(e));for(var i of n){var a=Object.assign(Object.assign({},e),{consume:1,optional:1,subrule:1,many:1,or:1});e.parser.rule(i,rhe(a,i.definition))}}function rhe(t,r,e=!1){let n;if(VQ(r))n=dhe(t,r);else if(GQ(r))n=nhe(t,r);else if(qQ(r))n=rhe(t,r.terminal);else if(WQ(r))n=uhe(t,r);else if(ZQ(r))n=ihe(t,r);else if(UQ(r))n=ohe(t,r);else if(tJ(r))n=lhe(t,r);else if(HQ(r))n=che(t,r);else{if(!YQ(r))throw new oQ(r.$cstNode,"Unexpected element type: "+r.$type);{let e=t.consume++;n=mt(()=>t.parser.consume(e,pie,r),"method")}}return phe(t,e?void 0:hhe(r),n,r.cardinality)}function nhe(e,t){let r=bte(t);return()=>e.parser.action(r,t)}function ihe(i,a){let s=a.rule.ref;if(RQ(s)){let t=i.subrule++,r=s.fragment,n=0<a.arguments.length?ahe(s,a.arguments):()=>({});return e=>i.parser.subrule(t,ghe(i,s),r,a,n(e))}if(BQ(s)){let e=i.consume++,t=mhe(i,s.name);return()=>i.parser.consume(e,t,a)}if(!s)throw new oQ(a.$cstNode,"Undefined rule: "+a.rule.$refText);sQ(s)}function ahe(a,e){let s=e.map(e=>she(e.value));return t=>{var r={};for(let e=0;e<s.length;e++){var n=a.parameters[e],i=s[e];r[n.name]=i(t)}return r}}function she(n){if(kQ(n)){let t=she(n.left),r=she(n.right);return e=>t(e)||r(e)}if(wQ(n)){let t=she(n.left),r=she(n.right);return e=>t(e)&&r(e)}if(AQ(n)){let t=she(n.value);return e=>!t(e)}if(IQ(n)){let t=n.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(bQ(n)){let e=!!n.true;return()=>e}sQ()}function ohe(r,n){if(1===n.elements.length)return rhe(r,n.elements[0]);{let e=[];for(var i of n.elements){var a={ALT:rhe(r,i,!0)};(i=hhe(i))&&(a.GATE=she(i)),e.push(a)}let t=r.or++;return n=>r.parser.alternatives(t,e.map(e=>{let t={ALT:mt(()=>e.ALT(n),"ALT")},r=e.GATE;return r&&(t.GATE=()=>r(n)),t}))}}function lhe(s,e){if(1===e.elements.length)return rhe(s,e.elements[0]);let t=[];for(var r of e.elements){var n={ALT:rhe(s,r,!0)};(r=hhe(r))&&(n.GATE=she(r)),t.push(n)}let o=s.or++,l=mt((e,t)=>`uGroup_${e}_`+t.getRuleStack().join("-"),"idFunc"),i=mt(a=>s.parser.alternatives(o,t.map((t,r)=>{let e={ALT:mt(()=>!0,"ALT")},n=s.parser,i=(e.ALT=()=>{var e;t.ALT(a),n.isRecording()||(e=l(o,n),n.unorderedGroups.get(e)||n.unorderedGroups.set(e,[]),"u"<typeof(e=n.unorderedGroups.get(e))?.[r]&&(e[r]=!0))},t.GATE);return i?e.GATE=()=>i(a):e.GATE=()=>!n.unorderedGroups.get(l(o,n))?.[r],e})),"alternatives"),a=phe(s,hhe(e),i,"*");return e=>{a(e),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function che(t,e){let r=e.elements.map(e=>rhe(t,e));return t=>r.forEach(e=>e(t))}function hhe(e){if(HQ(e))return e.guardCondition}function uhe(n,i,a=i.terminal){if(a){if(ZQ(a)&&RQ(a.rule.ref)){let t=a.rule.ref,r=n.subrule++;return e=>n.parser.subrule(r,ghe(n,t),!1,i,e)}if(ZQ(a)&&BQ(a.rule.ref)){let e=n.consume++,t=mhe(n,a.rule.ref.name);return()=>n.parser.consume(e,t,i)}if(VQ(a)){let e=n.consume++,t=mhe(n,a.value);return()=>n.parser.consume(e,t,i)}throw new Error("Could not build cross reference parser")}if(!i.type.ref)throw new Error("Could not resolve reference to type: "+i.type.$refText);if(a=cte(i.type.ref)?.terminal)return uhe(n,i,a);throw new Error("Could not find name assignment for type: "+bte(i.type.ref))}function dhe(e,t){let r=e.consume++,n=e.tokens[t.value];if(n)return()=>e.parser.consume(r,n,t);throw new Error("Could not find token for keyword: "+t.value)}function phe(n,e,i,t){let a=e&&she(e);if(!t){if(a){let t=n.or++;return e=>n.parser.alternatives(t,[{ALT:mt(()=>i(e),"ALT"),GATE:mt(()=>a(e),"GATE")},{ALT:Ise(),GATE:mt(()=>!a(e),"GATE")}])}return i}if("*"===t){let t=n.many++;return e=>n.parser.many(t,{DEF:mt(()=>i(e),"DEF"),GATE:a?()=>a(e):void 0})}if("+"===t){let r=n.many++;if(a){let t=n.or++;return e=>n.parser.alternatives(t,[{ALT:mt(()=>n.parser.atLeastOne(r,{DEF:mt(()=>i(e),"DEF")}),"ALT"),GATE:mt(()=>a(e),"GATE")},{ALT:Ise(),GATE:mt(()=>!a(e),"GATE")}])}return e=>n.parser.atLeastOne(r,{DEF:mt(()=>i(e),"DEF")})}if("?"===t){let t=n.optional++;return e=>n.parser.optional(t,{DEF:mt(()=>i(e),"DEF"),GATE:a?()=>a(e):void 0})}sQ()}function ghe(e,t){if(t=fhe(e,t),e=e.parser.getRule(t))return e;throw new Error(`Rule "${t}" not found."`)}function fhe(n,i){if(RQ(i))return i.name;if(n.ruleNames.has(i))return n.ruleNames.get(i);{let e=i,t=e.$container,r=i.$type;for(;!RQ(t);)(HQ(t)||UQ(t)||tJ(t))&&(r=t.elements.indexOf(e).toString()+":"+r),t=(e=t).$container;return r=t.name+":"+r,n.ruleNames.set(i,r),r}}function mhe(e,t){if(e=e.tokens[t])return e;throw new Error(`Token "${t}" not found."`)}var yhe=e(()=>{qse(),JJ(),lQ(),PZ(),Dte(),mt(ehe,"createParser"),mt(the,"buildRules"),mt(rhe,"buildElement"),mt(nhe,"buildAction"),mt(ihe,"buildRuleCall"),mt(ahe,"buildRuleCallPredicate"),mt(she,"buildPredicate"),mt(ohe,"buildAlternatives"),mt(lhe,"buildUnorderedGroup"),mt(che,"buildGroup"),mt(hhe,"getGuardCondition"),mt(uhe,"buildCrossReference"),mt(dhe,"buildKeyword"),mt(phe,"wrap"),mt(ghe,"getRule"),mt(fhe,"getRuleName"),mt(mhe,"getToken")});function vhe(e){var t=e.Grammar,r=e.parser.Lexer;return ehe(t,e=new Kce(e),r.definition),e.finalize(),e}var xhe=e(()=>{Jce(),yhe(),mt(vhe,"createCompletionParser")});function bhe(e){return(e=whe(e)).finalize(),e}function whe(e){var t=e.Grammar,r=e.parser.Lexer;return ehe(t,new Hce(e),r.definition)}var khe,The,Ehe,Che=e(()=>{Jce(),yhe(),mt(bhe,"createLangiumParser"),mt(whe,"prepareLangiumParser")}),She=e(()=>{qse(),JJ(),fee(),Dte(),Vee(),PZ(),khe=class{static{mt(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=NZ(Qee(e,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,t);return n.forEach(e=>{var t=e.PATTERN;"object"==typeof t&&t&&"test"in t&&$ee(t)?i.unshift(e):i.push(e)}),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(BQ).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){var t=Ete(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=$ee(t)?Vne.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s")||e.source.includes("?<=")||e.source.includes("?<!"))}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(RQ).flatMap(e=>oee(e).filter(VQ)).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(zee(e.value)):e.value}findLongerAlt(n,e){return e.reduce((e,t)=>{var r=t?.PATTERN;return r?.source&&Gee("^"+r.source+"$",n.value)&&e.push(t),e},[])}}}),_he=e(()=>{function e(t){let r="";for(let e=1;e<t.length-1;e++){var n,i=t.charAt(e);"\\"===i?(n=t.charAt(++e),r+=a(n)):r+=i}return r}function a(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return`
|
||
`;case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}function t(e){return"^"===e.charAt(0)?e.substring(1):e}function r(e){return parseInt(e)}function n(e){return BigInt(e)}function i(e){return new Date(e)}function s(e){return Number(e)}function o(e){return"true"===e.toLowerCase()}var l;JJ(),Dte(),The=class{static{mt(this,"DefaultValueConverter")}convert(e,t){var r=t.grammarSource;if(ZQ(r=WQ(r)?ete(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 Ehe.convertInt(t);case"STRING":return Ehe.convertString(t);case"ID":return Ehe.convertID(t)}switch(null==(e=Tte(e))?void 0:e.toLowerCase()){case"number":return Ehe.convertNumber(t);case"boolean":return Ehe.convertBoolean(t);case"bigint":return Ehe.convertBigint(t);case"date":return Ehe.convertDate(t);default:return t}}},l=Ehe=Ehe||{},mt(e,"convertString"),l.convertString=e,mt(a,"convertEscapeCharacter"),mt(t,"convertID"),l.convertID=t,mt(r,"convertInt"),l.convertInt=r,mt(n,"convertBigint"),l.convertBigint=n,mt(i,"convertDate"),l.convertDate=i,mt(s,"convertNumber"),l.convertNumber=s,mt(o,"convertBoolean"),l.convertBoolean=o}),Ahe=MBe(e=>{var t,r;function n(){if(void 0===t)throw new Error("No runtime abstraction layer installed");return t}function i(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");t=e}Object.defineProperty(e,"__esModule",{value:!0}),mt(n,"RAL"),r=n,mt(i,"install"),r.install=i,e.default=n}),Lhe=MBe(e=>{function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function n(e){return"number"==typeof e||e instanceof Number}function i(e){return e instanceof Error}function a(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,mt(t,"boolean"),e.boolean=t,mt(r,"string"),e.string=r,mt(n,"number"),e.number=n,mt(i,"error"),e.error=i,mt(a,"func"),e.func=a,mt(s,"array"),e.array=s,mt(o,"stringArray"),e.stringArray=o}),Nhe=MBe(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var s=Ahe();{var r=t.Event={};let e={dispose(){}};r.None=function(){return e}}var i=class{static{mt(this,"CallbackList")}add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:mt(()=>this.remove(e,t),"dispose")})}remove(n,i=null){if(this._callbacks){let r=!1;for(let e=0,t=this._callbacks.length;e<t;e++)if(this._callbacks[e]===n){if(this._contexts[e]===i)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 n=[],i=this._callbacks.slice(0),a=this._contexts.slice(0);for(let e=0,t=i.length;e<t;e++)try{n.push(i[e].apply(a[e],r))}catch(e){(0,s.default)().console.error(e)}return n}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},r=class a{static{mt(this,"Emitter")}constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let n={dispose:mt(()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(n),n}),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(){}}),Ihe=MBe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t,r,n=Ahe(),i=Lhe(),a=Nhe();function s(e){return e&&(e===r.None||e===r.Cancelled||i.boolean(e.isCancellationRequested)&&!!e.onCancellationRequested)}(r=t||(e.CancellationToken=t={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),mt(s,"is"),r.is=s;var o=Object.freeze(function(e,t){let r=(0,n.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),l=class{static{mt(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},c=class{static{mt(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=t.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=t.None}};e.CancellationTokenSource=c}),Rhe={},Mhe=e(()=>{Y(Rhe,ee(Ihe(),1))});function Dhe(){return new Promise(e=>{"u"<typeof setImmediate?setTimeout(e,0):setImmediate(e)})}function Ohe(){return Fhe=performance.now(),new Rhe.CancellationTokenSource}function Phe(e){zhe=e}function Bhe(e){return e===Ghe}async function $he(e){if(e!==Rhe.CancellationToken.None){var t=performance.now();if(zhe<=t-Fhe&&(Fhe=t,await Dhe(),Fhe=performance.now()),e.isCancellationRequested)throw Ghe}}var Fhe,zhe,Ghe,Uhe,qhe=e(()=>{Mhe(),mt(Dhe,"delayNextTick"),Fhe=0,zhe=10,mt(Ohe,"startCancelableOperation"),mt(Phe,"setInterruptionPeriod"),Ghe=Symbol("OperationCancelled"),mt(Bhe,"isOperationCancelled"),mt($he,"interruptAndCheck"),Uhe=class{static{mt(this,"Deferred")}constructor(){this.promise=new Promise((t,r)=>{this.resolve=e=>(t(e),this),this.reject=e=>(r(e),this)})}}});function jhe(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);jhe(s,i),jhe(o,i);let e=0,t=0,r=0;for(;e<s.length&&t<o.length;)i(s[e],o[t])<=0?n[r++]=s[e++]:n[r++]=o[t++];for(;e<s.length;)n[r++]=s[e++];for(;t<o.length;)n[r++]=o[t++]}return n}function Whe(t,e,r=0){var n=e?[r]:[];for(let e=0;e<t.length;e++){var i=t.charCodeAt(e);Yhe(i)&&(13===i&&e+1<t.length&&10===t.charCodeAt(e+1)&&e++,n.push(r+e+1))}return n}function Yhe(e){return 13===e||10===e}function Hhe(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 Vhe(e){var t=Hhe(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Xhe,Khe,Zhe,Qhe,Jhe,eue,tue,rue,nue,iue,aue=e(()=>{function e(e,t,r,n){return new Xhe(e,t,r,n)}function t(e,t,r){if(e instanceof Xhe)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(e,t){let r=e.getText(),n=jhe(t.map(Vhe),(e,t)=>{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),i=0,a=[];for(var s of n){var o=e.offsetAt(s.range.start);if(o<i)throw new Error("Overlapping edit");o>i&&a.push(r.substring(i,o)),s.newText.length&&a.push(s.newText),i=e.offsetAt(s.range.end)}return a.push(r.substr(i)),a.join("")}var n;Xhe=class i{static{mt(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,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(i.isIncremental(a)){var s=Hhe(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),n=this._lineOffsets,i=Whe(a.text,!1,o);if(e-r===i.length)for(let e=0,t=i.length;e<t;e++)n[e+r+1]=i[e];else i.length<1e4?n.splice(r+1,e-r,...i):this._lineOffsets=n=n.slice(0,r+1).concat(i,n.slice(e+1));var c=a.text.length-(l-o);if(0!=c)for(let e=r+1+i.length,t=n.length;e<t;e++)n[e]=n[e]+c}else{if(!i.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=Whe(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,n=t.length;if(0===n)return{line:0,character:e};for(;r<n;){var i=Math.floor((r+n)/2);t[i]>e?n=i:r=i+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&&Yhe(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}},n=Khe=Khe||{},mt(e,"create"),n.create=e,mt(t,"update"),n.update=t,mt(r,"applyEdits"),n.applyEdits=r,mt(jhe,"mergeSort"),mt(Whe,"computeLineOffsets"),mt(Yhe,"isEOL"),mt(Hhe,"getWellformedRange"),mt(Vhe,"getWellformedEdit")}),sue=e(()=>{var r={470: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,n="",i=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(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2<n.length){var l=n.lastIndexOf("/");if(l!==n.length-1){i=-1===l?(n="",0):(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),a=o,s=0;continue}}else if(2===n.length||1===n.length){n="",a=o,s=i=0;continue}t&&(0<n.length?n+="/..":n="..",i=2)}else 0<n.length?n+="/"+e.slice(a+1,o):n=e.slice(a+1,o),i=o-a-1;a=o,s=0}else 46===r&&-1!==s?++s:s=-1}return n}mt(d,"e"),mt(a,"r");var p={resolve:mt(function(){for(var e,t="",r=!1,n=arguments.length-1;-1<=n&&!r;n--){var i=0<=n?arguments[n]:e=void 0===e?process.cwd():e;d(i),0!==i.length&&(t=i+"/"+t,r=47===i.charCodeAt(0))}return t=a(t,!r),r?0<t.length?"/"+t:"/":0<t.length?t:"."},"resolve"),normalize:mt(function(e){var t,r;return d(e),0===e.length?".":(t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1),0<(e=0!==(e=a(e,!t)).length||t?e:".").length&&r&&(e+="/"),t?"/"+e:e)},"normalize"),isAbsolute:mt(function(e){return d(e),0<e.length&&47===e.charCodeAt(0)},"isAbsolute"),join:mt(function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];d(r),0<r.length&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":p.normalize(e)},"join"),relative:mt(function(e,t){if(d(e),d(t),e===t||(e=p.resolve(e))===(t=p.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,i=n-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var s=t.length-a,o=i<s?i: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<i&&(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<=n;++c)c!==n&&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:mt(function(e){return e},"_makeLong"),dirname:mt(function(e){if(d(e),0===e.length)return".";for(var t=47===e.charCodeAt(0),r=-1,n=!0,i=e.length-1;1<=i;--i)if(47===e.charCodeAt(i)){if(!n){r=i;break}}else n=!1;return-1===r?t?"/":".":t&&1===r?"//":e.slice(0,r)},"dirname"),basename:mt(function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');d(e);var r=0,n=-1,i=!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(!i){r=o+1;break}}else-1===s&&(i=!1,s=o+1),0<=a&&(l===t.charCodeAt(a)?-1==--a&&(n=o):(a=-1,n=s))}return r===n?n=s:-1===n&&(n=e.length),e.slice(r,n)}for(o=e.length-1;0<=o;--o)if(47===e.charCodeAt(o)){if(!i){r=o+1;break}}else-1===n&&(i=!1,n=o+1);return-1===n?"":e.slice(r,n)},"basename"),extname:mt(function(e){d(e);for(var t=-1,r=0,n=-1,i=!0,a=0,s=e.length-1;0<=s;--s){var o=e.charCodeAt(s);if(47!==o)-1===n&&(i=!1,n=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){r=s+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)},"extname"),format:mt(function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+r:t+"/"+r:r;var t,r},"format"),parse:mt(function(e){d(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0!==e.length){for(var r,n=47===e.charCodeAt(0),i=n?(t.root="/",1):0,a=-1,s=0,o=-1,l=!0,c=e.length-1,h=0;i<=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&&n?e.slice(1,o):e.slice(s,o)):(0===s&&n?(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):n&&(t.dir="/")}return t},"parse"),sep:"/",delimiter:":",win32:null,posix:null};p.posix=p,e.exports=p}},n={};function h(e){var t=n[e];return void 0===t&&(t=n[e]={exports:{}},r[e](t,t.exports,h)),t.exports}mt(h,"r"),h.d=(e,t)=>{for(var r in t)h.o(t,r)&&!h.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},h.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var u,d,p={};{let n,r=((h.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(p),h.d(p,{URI:mt(()=>w,"URI"),Utils:mt(()=>u,"Utils")}),"object"==typeof process?n="win32"===process.platform:"object"==typeof navigator&&(n=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),i=/^\//,a=/^\/\//;function g(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(!i.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(g,"s");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{mt(this,"f")}static isUri(e){return e instanceof w||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,r,n,i,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=n||"",this.fragment=i||"",g(this,a))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:r,path:n,query:i,fragment:a}=e;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===n?n=this.path:null===n&&(n=""),void 0===i?i=this.query:null===i&&(i=""),void 0===a?a=this.fragment:null===a&&(a=""),t===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new k(t,r,n,i,a)}static parse(e,t=!1){return(e=s.exec(e))?new k(e[2]||"",b(e[4]||""),b(e[5]||""),b(e[7]||""),b(e[9]||""),t):new k("","","","","")}static file(e){let t="",r;return"/"===(e=n?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 k("file",t,e,"","")}static from(e){return g(e=new k(e.scheme,e.authority,e.path,e.query,e.fragment),!0),e}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){var t;return e&&(e instanceof w?e:((t=new k(e))._formatted=e.external,t._fsPath=e._sep===o?e.fsPath:null,t))}}let o=n?1:void 0;class k extends w{static{mt(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(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 f(t,r,n){let i,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||n&&91===s||n&&93===s||n&&58===s?(-1!==a&&(i+=encodeURIComponent(t.substring(a,e)),a=-1),void 0!==i&&(i+=t.charAt(e))):(void 0===i&&(i=t.substr(0,e)),void 0!==(s=l[s])?(-1!==a&&(i+=encodeURIComponent(t.substring(a,e)),a=-1),i+=s):-1===a&&(a=e))}return-1!==a&&(i+=encodeURIComponent(t.substring(a))),void 0!==i?i:t}function m(t){let r;for(let e=0;e<t.length;e++){var n=t.charCodeAt(e);35===n||63===n?(void 0===r&&(r=t.substr(0,e)),r+=l[n]):void 0!==r&&(r+=t[e])}return void 0!==r?r:t}function y(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=n?r.replace(/\//g,"\\"):r}function v(t,e){let r=e?m:f,n="",{scheme:i,authority:a,path:s,query:o,fragment:l}=t;if(i&&(n=n+i+":"),!a&&"file"!==i||(n+="//"),a){let e=a.indexOf("@");-1!==e&&(t=a.substr(0,e),a=a.substr(e+1),-1===(e=t.lastIndexOf(":"))?n+=r(t,!1,!1):n=(n=n+r(t.substr(0,e),!1,!1)+":")+r(t.substr(e+1),!1,!0),n+="@"),a=a.toLowerCase(),-1===(e=a.lastIndexOf(":"))?n+=r(a,!1,!0):n=(n+=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)),n+=r(s,!0,!1)),o&&(n=(n+="?")+r(o,!1,!1)),n=l?(n+="#")+(e?l:f(l,!1,!1)):n}function x(e){try{return decodeURIComponent(e)}catch{return 3<e.length?e.substr(0,3)+x(e.substr(3)):e}}mt(f,"d"),mt(m,"p"),mt(y,"m"),mt(v,"y"),mt(x,"v");let t=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match(t)?e.replace(t,e=>x(e)):e}mt(b,"C");let e=h(470),c=e.posix||e;(d=u=u||{}).joinPath=function(e,...t){return e.with({path:c.join(e.path,...t)})},d.resolvePath=function(e,...t){let r=e.path,n=!1,i=("/"!==r[0]&&(r="/"+r,n=!0),c.resolve(r,...t));return n&&"/"===i[0]&&!e.authority&&(i=i.substring(1)),e.with({path:i})},d.dirname=function(e){if(0===e.path.length||"/"===e.path)return e;let t=c.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},d.basename=function(e){return c.basename(e.path)},d.extname=function(e){return c.extname(e.path)}}({URI:Zhe,Utils:Qhe}=p)}),oue=e(()=>{function e(e,t){return e?.toString()===t?.toString()}function t(e,t){let r="string"==typeof e?e:e.path,n="string"==typeof t?t:t.path,i=r.split("/").filter(e=>0<e.length),a=n.split("/").filter(e=>0<e.length),s=0;for(;s<i.length&&i[s]===a[s];s++);return"../".repeat(i.length-s)+a.slice(s).join("/")}function r(e){return Zhe.parse(e.toString()).toString()}var n;sue(),(n=Jhe=Jhe||{}).basename=Qhe.basename,n.dirname=Qhe.dirname,n.extname=Qhe.extname,n.joinPath=Qhe.joinPath,n.resolvePath=Qhe.resolvePath,mt(e,"equals"),n.equals=e,mt(t,"relative"),n.relative=t,mt(r,"normalize"),n.normalize=r}),lue=e(()=>{var e;aue(),lue(),Mhe(),PZ(),oue(),(e=eue=eue||{})[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",tue=class{static{mt(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Rhe.CancellationToken.None){var r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??Zhe.parse(e.uri),Rhe.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return Rhe.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 n;return"string"==typeof t?(n=this.parse(e,t,r),this.createLangiumDocument(n,e,void 0,t)):"$model"in t?(n={value:t.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(n,e)):(n=this.parse(e,t.getText(),r),this.createLangiumDocument(n,e,t))}async createAsync(e,t,r){var n;return"string"==typeof t?(n=await this.parseAsync(e,t,r),this.createLangiumDocument(n,e,void 0,t)):(n=await this.parseAsync(e,t.getText(),r),this.createLangiumDocument(n,e,t))}createLangiumDocument(t,r,e,n){let i;if(e)i={parseResult:t,uri:r,state:eue.Parsed,references:[],textDocument:e};else{let e=this.createTextDocumentGetter(r,n);i={parseResult:t,uri:r,state:eue.Parsed,references:[],get textDocument(){return e()}}}return t.value.$document=i}async update(e,t){var r=null==(r=e.parseResult.value.$cstNode)?void 0:r.root.fullText,n=null==(n=this.textDocuments)?void 0:n.get(e.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(e.uri);return n?Object.defineProperty(e,"textDocument",{value:n}):(n=this.createTextDocumentGetter(e.uri,i),Object.defineProperty(e,"textDocument",{get:n})),r!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=eue.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){let r=this.serviceRegistry,n;return()=>n=n??Khe.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??"")}},rue=class{static{mt(this,"DefaultLangiumDocuments")}constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.serviceRegistry=e.ServiceRegistry}get all(){return NZ(this.documentMap.values())}addDocument(e){var t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){return e=e.toString(),this.documentMap.get(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.documentMap.has(e.toString())}invalidateDocument(e){var t=e.toString();return(t=this.documentMap.get(t))&&(this.serviceRegistry.getServices(e).references.Linker.unlink(t),t.state=eue.Changed,t.precomputedScopes=void 0,t.diagnostics=void 0),t}deleteDocument(e){var e=e.toString(),t=this.documentMap.get(e);return t&&(t.state=eue.Changed,this.documentMap.delete(e)),t}}}),cue=e(()=>{Mhe(),_Z(),fee(),qhe(),lue(),nue=Symbol("ref_resolving"),iue=class{static{mt(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(t,e=Rhe.CancellationToken.None){for(var r of lee(t.parseResult.value))await $he(e),hee(r).forEach(e=>this.doLink(e,t))}doLink(e,t){var r=e.reference;if(void 0===r._ref){r._ref=nue;try{var n,i=this.getCandidate(e);kZ(i)?r._ref=i:(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)?(n=this.loadAstNode(i),r._ref=n??this.createLinkingError(e,i)):r._ref=void 0)}catch(t){console.error(`An error occurred while resolving reference to '${r.$refText}':`,t),i=null!=(n=t.message)?n:String(t),r._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${r.$refText}': `+i})}t.references.push(r)}}unlink(e){for(var t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}buildReference(n,i,e,a){let s=this,o={$refNode:e,$refText:a,get ref(){var e;if(xZ(this._ref))return this._ref;if(wZ(this._nodeDescription)){var t=s.loadAstNode(this._nodeDescription);this._ref=t??s.createLinkingError({reference:o,container:n,property:i},this._nodeDescription)}else if(void 0===this._ref){this._ref=nue;var t=aee(n).$document,r=s.getLinkedNode({reference:o,container:n,property:i});if(r.error&&t&&t.state<eue.ComputedScopes)return this._ref=void 0;this._ref=null!=(e=r.node)?e:r.error,this._nodeDescription=r.descr,t?.references.push(this)}else if(this._ref===nue)throw new Error(`Cyclic reference resolution detected: ${s.astNodeLocator.getAstNodePath(n)}/${i} (symbol '${a}')`);return xZ(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return kZ(this._ref)?this._ref:void 0}};return o}getLinkedNode(t){try{var r,n=this.getCandidate(t);return kZ(n)?{error:n}:(r=this.loadAstNode(n))?{node:r,descr:n}:{descr:n,error:this.createLinkingError(t,n)}}catch(e){return console.error(`An error occurred while resolving reference to '${t.reference.$refText}':`,e),n=null!=(r=e.message)?r:String(e),{error:Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${t.reference.$refText}': `+n})}}}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){(r=aee(e.container).$document)&&r.state<eue.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`);var r=this.reflection.getReferenceType(e);return Object.assign(Object.assign({},e),{message:`Could not resolve reference to ${r} named '${e.reference.$refText}'.`,targetDescription:t})}}});function hue(e){return"string"==typeof e.name}var uue,due,pue,gue,fue,mue,yue,vue,xue,bue,wue,kue,Tue,Eue,Cue=e(()=>{Dte(),mt(hue,"isNamed"),uue=class{static{mt(this,"DefaultNameProvider")}getName(e){if(hue(e))return e.name}getNameNode(e){return nte(e.$cstNode,"name")}}}),Sue=e(()=>{Dte(),_Z(),fee(),aQ(),PZ(),oue(),due=class{static{mt(this,"DefaultReferences")}constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){var t=lte(e),r=e.astNode;if(t&&r){if(bZ(t=r[t.feature]))return t.ref;if(Array.isArray(t))for(var n of t)if(bZ(n)&&n.$refNode&&n.$refNode.offset<=e.offset&&n.$refNode.end>=e.end)return n.ref}if(r&&(t=this.nameProvider.getNameNode(r))&&(t===e||zZ(e,t)))return r}}findDeclarationNode(e){if((e=this.findDeclaration(e))?.$cstNode)return this.nameProvider.getNameNode(e)??e.$cstNode}findReferences(e,t){var r,n=[];t.includeDeclaration&&(r=this.getReferenceToSelf(e))&&n.push(r);let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(e=>Jhe.equals(e.sourceUri,t.documentUri))),n.push(...i),NZ(n)}getReferenceToSelf(e){var t,r=this.nameProvider.getNameNode(e);if(r)return t=iee(e),e=this.nodeLocator.getAstNodePath(e),{sourceUri:t.uri,sourcePath:e,targetUri:t.uri,targetPath:e,segment:UZ(r),local:!0}}}}),_ue=e(()=>{PZ(),pue=class{static{mt(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(var[t,r]of e)this.add(t,r)}get size(){return OZ.sum(NZ(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 null!=(e=this.map.get(e))?e:[]}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 NZ(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return NZ(this.map.keys())}values(){return NZ(this.map.values()).flat()}entriesGroupedByKey(){return NZ(this.map.entries())}},gue=class{static{mt(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(var[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){var t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}}),Aue=e(()=>{Mhe(),fee(),_ue(),qhe(),fue=class{static{mt(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=Rhe.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,r=see,n=Rhe.CancellationToken.None){var i,a=[];this.exportNode(e,a,t);for(i of r(e))await $he(n),this.exportNode(i,a,t);return a}exportNode(e,t,r){var n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async computeLocalScopes(e,t=Rhe.CancellationToken.None){var r,n=e.parseResult.value,i=new pue;for(r of oee(n))await $he(t),this.processNode(r,e,i);return i}processNode(e,t,r){var n,i=e.$container;i&&(n=this.nameProvider.getName(e))&&r.add(i,this.descriptions.createDescription(e,n,t))}}}),Lue=e(()=>{PZ(),mue=class{static{mt(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=null!=(e=r?.caseInsensitive)&&e}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){return(this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t.toLowerCase()):this.elements.find(e=>e.name===t))||(this.outerScope?this.outerScope.getElement(t):void 0)}},yue=class{static{mt(this,"MapScope")}constructor(e,t,r){var n;this.elements=new Map,this.caseInsensitive=null!=(r=r?.caseInsensitive)&&r;for(n of e){var i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(i,n)}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)}getAllElements(){let e=NZ(this.elements.values());return e=this.outerScope?e.concat(this.outerScope.getAllElements()):e}},vue={getElement(){},getAllElements(){return RZ}}}),Nue=e(()=>{xue=class{static{mt(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},bue=class extends xue{static{mt(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){return this.throwIfDisposed(),this.cache.has(e)?this.cache.get(e):t?(t=t(),this.cache.set(e,t),t):void 0}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},wue=class extends xue{static{mt(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){return this.throwIfDisposed(),(e=this.cacheForContext(e)).has(t)?e.get(t):r?(r=r(),e.set(t,r),r):void 0}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){this.throwIfDisposed(),e?(e=this.converter(e),this.cache.delete(e)):this.cache.clear()}cacheForContext(e){let t=this.converter(e),r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},kue=class extends wue{static{mt(this,"DocumentCache")}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(var r of t)this.clear(r)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{var r;for(r of e.concat(t))this.clear(r)}))}},Tue=class extends bue{static{mt(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{0<t.length&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}}),Iue=e(()=>{Lue(),fee(),PZ(),Nue(),Eue=class{static{mt(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new Tue(e.shared)}getScope(t){let r=[],n=this.reflection.getReferenceType(t),i=iee(t.container).precomputedScopes;if(i){let e=t.container;do{var a=i.get(e);0<a.length&&r.push(NZ(a).filter(e=>this.reflection.isSubtype(e.type,n))),e=e.$container}while(e)}let s=this.getGlobalScope(n,t);for(let e=r.length-1;0<=e;e--)s=this.createScope(r[e],s);return s}createScope(e,t,r){return new mue(NZ(e),t,r)}createScopeForNodes(e,t,r){return e=NZ(e).map(e=>{var t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),new mue(e,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new yue(this.indexManager.allElements(e)))}}});function Rue(e){return"string"==typeof e.$comment}function Mue(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}var Due,Oue,Pue=e(()=>{sue(),_Z(),fee(),Dte(),mt(Rue,"isAstNodeWithComment"),mt(Mue,"isIntermediateReference"),Due=class{static{mt(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let r=t??{},n=t?.replacer,i=mt((e,t)=>this.replacer(e,t,r),"defaultReplacer"),a=n?(e,t)=>n(e,t,i):i;try{return this.currentDocument=iee(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:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(t)){if(bZ(r)){var l=r.ref,n=n?r.$refText:void 0;if(l){let e=iee(l),t="";return this.currentDocument&&this.currentDocument!==e&&(t=o?o(e.uri,r):e.uri.toString()),o=this.astNodeLocator.getAstNodePath(l),{$ref:t+"#"+o,$refText:n}}return{$error:null!=(o=null==(l=r.error)?void 0:l.message)?o:"Could not resolve reference",$refText:n}}if(xZ(r)){let e;return a&&(e=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),!t||r.$document)&&e?.$textRegion&&(e.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString()),i&&!t&&((e=e??Object.assign({},r)).$sourceText=null==(o=r.$cstNode)?void 0:o.text),s&&(e=e??Object.assign({},r),n=this.commentProvider.getComment(r))&&(e.$comment=n.replace(/\r/g,"")),e??r}return r}}addAstNodeRegionWithAssignmentsTo(n){let i=mt(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),"createDocumentSegment");if(n.$cstNode){let e=n.$textRegion=i(n.$cstNode),r=e.assignments={};return Object.keys(n).filter(e=>!e.startsWith("$")).forEach(e=>{var t=rte(n.$cstNode,e).map(i);0!==t.length&&(r[e]=t)}),n}}linkNode(t,r,n,e,i,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];Mue(l)?o[e]=this.reviveReference(t,s,r,l,n):xZ(l)&&this.linkNode(l,r,n,t,s,e)}else Mue(o)?t[s]=this.reviveReference(t,s,r,o,n):xZ(o)&&this.linkNode(o,r,n,t,s);var c=t;c.$container=e,c.$containerProperty=i,c.$containerIndex=a}reviveReference(e,t,r,n,i){let a=n.$refText,s=n.$error;if(n.$ref){if(xZ(r=this.getRefNode(r,n.$ref,i.uriConverter)))return{$refText:(a=a||this.nameProvider.getName(r))??"",ref:r};s=r}return s?((n={$refText:a??""}).error={container:e,property:t,message:s,reference:n},n):void 0}getRefNode(e,t,r){try{var n,i,a,s,o=t.indexOf("#");return 0===o?this.astNodeLocator.getAstNode(e,t.substring(1))||"Could not resolve path: "+t:o<0?(n=r?r(t):Zhe.parse(t),(i=this.langiumDocuments.getDocument(n))?i.parseResult.value:"Could not find document for URI: "+t):(a=r?r(t.substring(0,o)):Zhe.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)}}}}),Bue=e(()=>{oue(),Oue=class{static{mt(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=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);this.languageIdMap.set(r.languageId,e),1===this.languageIdMap.size?this.singleton=e:this.singleton=void 0}getServices(e){if(void 0!==this.singleton)return this.singleton;if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");var t=null==(t=null==(t=this.textDocuments)?void 0:t.get(e))?void 0:t.languageId;if(void 0!==t){var r=this.languageIdMap.get(t);if(r)return r}if(r=Jhe.extname(e),e=this.fileExtensionMap.get(r))return e;throw t?new Error(`The service registry contains no services for the extension '${r}' for language '${t}'.`):new Error(`The service registry contains no services for the extension '${r}'.`)}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function $ue(e){return{code:e}}var Fue,zue,Gue=e(()=>{Upe(),_ue(),qhe(),PZ(),mt($ue,"diagnosticData"),(Fue=Fue||{}).all=["fast","slow","built-in"],zue=class{static{mt(this,"ValidationRegistry")}constructor(e){this.entries=new pue,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.");for(var[n,i]of Object.entries(e))if(Array.isArray(i))for(var a of i)a={check:this.wrapValidationException(a,t),category:r},this.addEntry(n,a);else"function"==typeof i?(i={check:this.wrapValidationException(i,t),category:r},this.addEntry(n,i)):sQ()}wrapValidationException(n,i){return async(e,t,r)=>{await this.handleException(()=>n.call(i,e,t,r),"An error occurred during validation",t,e)}}async handleException(e,t,r,n){try{await e()}catch(e){if(Bhe(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:n})}}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=NZ(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(i,a,s){return async(e,t,r,n)=>{await this.handleException(()=>i.call(s,e,t,r,n),a,t,e)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function Uue(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=nte(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=ste(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 que(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 jue(e){switch(e){case"error":return $ue(Yue.LexingError);case"warning":return $ue(Yue.LexingWarning);case"info":return $ue(Yue.LexingInfo);case"hint":return $ue(Yue.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var Wue,Yue,Hue,Vue,Xue,Kue,Zue,Que,Jue,ede,tde=e(()=>{var e;Mhe(),Dte(),fee(),aQ(),qhe(),Gue(),Wue=class{static{mt(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},r=Rhe.CancellationToken.None){var n=e.parseResult,i=[];if(await $he(r),t.categories&&!t.categories.includes("built-in")||(this.processLexingErrors(n,i,t),!(t.stopAfterLexingErrors&&i.some(e=>(null==(e=e.data)?void 0:e.code)===Yue.LexingError)||(this.processParsingErrors(n,i,t),t.stopAfterParsingErrors&&i.some(e=>(null==(e=e.data)?void 0:e.code)===Yue.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>(null==(e=e.data)?void 0:e.code)===Yue.LinkingError))))){try{i.push(...await this.validateAst(n.value,t,r))}catch(e){if(Bhe(e))throw e;console.error("An error occurred during validation:",e)}await $he(r)}return i}processLexingErrors(e,t,r){var n;for(n of[...e.lexerErrors,...null!=(e=null==(e=e.lexerReport)?void 0:e.diagnostics)?e:[]]){var i={severity:que(i=null!=(i=n.severity)?i:"error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:jue(i),source:this.getSource()};t.push(i)}}processParsingErrors(e,t,r){for(var n of e.parserErrors){let e;var i,a;isNaN(n.token.startOffset)?"previousToken"in n&&(a=n.previousToken,e=isNaN(a.startOffset)?{start:i={line:0,character:0},end:i}:{start:i={line:a.endLine-1,character:a.endColumn},end:i}):e=GZ(n.token),e&&(a={severity:que("error"),range:e,message:n.message,data:$ue(Yue.ParsingError),source:this.getSource()},t.push(a))}}processLinkingErrors(e,t,r){for(var n of e.references){var i;(n=n.error)&&(i={node:n.container,property:n.property,index:n.index,data:{code:Yue.LinkingError,containerType:n.container.$type,property:n.property,refText:n.reference.$refText}},t.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(e,t,r=Rhe.CancellationToken.None){let n=[],i=mt((e,t,r)=>{n.push(this.toDiagnostic(e,t,r))},"acceptor");return await this.validateAstBefore(e,t,i,r),await this.validateAstNodes(e,t,i,r),await this.validateAstAfter(e,t,i,r),n}async validateAstBefore(e,t,r,n=Rhe.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksBefore)await $he(n),await a(e,r,null!=(i=t.categories)?i:[],n)}async validateAstNodes(e,r,n,i=Rhe.CancellationToken.None){await Promise.all(lee(e).map(async e=>{var t;await $he(i);for(t of this.validationRegistry.getChecks(e.$type,r.categories))await t(e,n,i)}))}async validateAstAfter(e,t,r,n=Rhe.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksAfter)await $he(n),await a(e,r,null!=(i=t.categories)?i:[],n)}toDiagnostic(e,t,r){return{message:t,range:Uue(r),severity:que(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(Uue,"getDiagnosticRange"),mt(que,"toDiagnosticSeverity"),mt(jue,"toDiagnosticData"),(e=Yue=Yue||{}).LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"}),rde=e(()=>{Mhe(),_Z(),fee(),aQ(),qhe(),oue(),Hue=class{static{mt(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(t,e,r){var r=r??iee(t),n=(e=e??this.nameProvider.getName(t),this.astNodeLocator.getAstNodePath(t));if(!e)throw new Error(`Node at path ${n} has no name.`);let i,a=mt(()=>{var e;return i=i??UZ(null!=(e=this.nameProvider.getNameNode(t))?e:t.$cstNode)},"nameSegmentGetter");return{node:t,name:e,get nameSegment(){return a()},selectionSegment:UZ(t.$cstNode),type:t.$type,documentUri:r.uri,path:n}}},Vue=class{static{mt(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Rhe.CancellationToken.None){let r=[],n=e.parseResult.value;for(var i of lee(n))await $he(t),hee(i).filter(e=>!kZ(e)).forEach(e=>{(e=this.createDescription(e))&&r.push(e)});return r}createDescription(e){var t,r=e.reference.$nodeDescription,n=e.reference.$refNode;if(r&&n)return{sourceUri:t=iee(e.container).uri,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:UZ(n),local:Jhe.equals(r.documentUri,t)}}}}),nde=e(()=>{Xue=class{static{mt(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){var t;return e.$container?(t=this.getAstNodePath(e.$container),e=this.getPathSegment(e),t+this.segmentSeparator+e):""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(e)return void 0!==t?e+this.indexSeparator+t:e;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{var r,n;return e&&0!==t.length?0<(n=t.indexOf(this.indexSeparator))?(r=t.substring(0,n),n=parseInt(t.substring(n+1)),e[r]?.[n]):e[t]:e},e)}}}),ide={},ade=e(()=>{Y(ide,ee(Nhe(),1))}),sde=e(()=>{ade(),qhe(),Kue=class{static{mt(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new Uhe,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new ide.Emitter,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=null!=(e=null==(e=e.capabilities.workspace)?void 0:e.configuration)&&e}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(r){r.settings&&Object.keys(r.settings).forEach(e=>{var t=r.settings[e];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}}}),ode=e(()=>{function e(e){return{dispose:mt(async()=>e(),"dispose")}}var t=Zue=Zue||{};mt(e,"create"),t.create=e}),lde=e(()=>{Mhe(),ode(),_ue(),qhe(),PZ(),Gue(),lue(),Que=class{static{mt(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new pue,this.documentPhaseListeners=new pue,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=eue.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},t=Rhe.CancellationToken.None){var n;for(n of e){var i,a=n.uri.toString();if(n.state===eue.Validated){if("boolean"==typeof r.validation&&r.validation)n.state=eue.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(a);else if("object"==typeof r.validation){let e=this.buildState.get(a),t=null==(i=e?.result)?void 0:i.validationChecks;t&&0<(i=(null!=(i=r.validation.categories)?i:Fue.all).filter(e=>!t.includes(e))).length&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:i})},result:e.result}),n.state=eue.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=eue.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,r,t)}async update(e,t,r=Rhe.CancellationToken.None){this.currentState=eue.Changed;for(var n of t)this.langiumDocuments.deleteDocument(n),this.buildState.delete(n.toString()),this.indexManager.remove(n);for(var i of e){var a;this.langiumDocuments.invalidateDocument(i)||((a=this.langiumDocumentFactory.fromModel({$type:"INVALID"},i)).state=eue.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(i.toString())}let s=NZ(e).concat(t).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!s.has(e.uri.toString())&&this.shouldRelink(e,s)).forEach(e=>{this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e),e.state=Math.min(e.state,eue.ComputedScopes),e.diagnostics=void 0}),await this.emitUpdate(e,t),await $he(r),e=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<eue.Linked||!(null!=(e=this.buildState.get(e.uri.toString()))&&e.completed)).toArray()),await this.buildDocuments(e,this.updateBuildOptions,r)}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){var t;return!(null==(t=this.textDocuments)||!t.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),Zue.create(()=>{var e=this.updateListeners.indexOf(t);0<=e&&this.updateListeners.splice(e,1)})}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,eue.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,eue.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,eue.ComputedScopes,r,async e=>{var t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.precomputedScopes=await t.computeLocalScopes(e,r)}),await this.runCancelable(e,eue.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(e,eue.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r));var n,t=e.filter(e=>this.shouldValidate(e));await this.runCancelable(t,eue.Validated,r,e=>this.validate(e,r));for(n of e){var i=this.buildState.get(n.uri.toString());i&&(i.completed=!0)}}prepareBuild(e,t){for(var r of e){var r=r.uri.toString(),n=this.buildState.get(r);n&&!n.completed||this.buildState.set(r,{completed:!1,options:t,result:n?.result})}}async runCancelable(e,t,r,n){var i;for(i of e.filter(e=>e.state<t))await $he(r),await n(i),i.state=t,await this.notifyDocumentPhase(i,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),Zue.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),Zue.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(i,e,a){let s;return e&&"path"in e?s=e:a=e,a=a??Rhe.CancellationToken.None,s&&(e=this.langiumDocuments.getDocument(s))&&e.state>i?Promise.resolve(s):this.currentState>=i?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(Ghe):new Promise((t,e)=>{let r=this.onBuildPhase(i,()=>{var e;r.dispose(),n.dispose(),s?(e=this.langiumDocuments.getDocument(s),t(e?.uri)):t(void 0)}),n=a.onCancellationRequested(()=>{r.dispose(),n.dispose(),e(Ghe)})})}async notifyDocumentPhase(e,t,r){var n;for(n of this.documentPhaseListeners.get(t).slice())try{await n(e,r)}catch(e){if(!Bhe(e))throw e}}async notifyBuildPhase(e,t,r){var n;if(0!==e.length)for(n of this.buildPhaseListeners.get(t).slice())await $he(r),await n(e,r)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){var r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e).validation,r=await r.validateDocument(e,n="object"==typeof n?n:void 0,t);e.diagnostics?e.diagnostics.push(...r):e.diagnostics=r,(t=this.buildState.get(e.uri.toString()))&&(null==t.result&&(t.result={}),e=null!=(r=n?.categories)?r:Fue.all,t.result.validationChecks?t.result.validationChecks.push(...e):t.result.validationChecks=[...e])}getBuildOptions(e){return null!=(e=null==(e=this.buildState.get(e.uri.toString()))?void 0:e.options)?e:{}}}}),cde=e(()=>{fee(),Nue(),Mhe(),PZ(),oue(),Jue=class{static{mt(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new wue,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=iee(e).uri,n=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{Jhe.equals(e.targetUri,r)&&e.targetPath===t&&n.push(e)})}),NZ(n)}allElements(t,r){let e=NZ(this.symbolIndex.keys());return(e=r?e.filter(e=>!r||r.has(e)):e).map(e=>this.getFileDescriptions(e,t)).flat()}getFileDescriptions(t,r){var e;return r?this.symbolByTypeIndex.get(t,r,()=>{var e;return(null!=(e=this.symbolIndex.get(t))?e:[]).filter(e=>this.astReflection.isSubtype(e.type,r))}):null!=(e=this.symbolIndex.get(t))?e:[]}remove(e){e=e.toString(),this.symbolIndex.delete(e),this.symbolByTypeIndex.clear(e),this.referenceIndex.delete(e)}async updateContent(e,t=Rhe.CancellationToken.None){t=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,t),e=e.uri.toString(),this.symbolIndex.set(e,t),this.symbolByTypeIndex.clear(e)}async updateReferences(e,t=Rhe.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()))}}}),hde=e(()=>{Mhe(),qhe(),oue(),ede=class{static{mt(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new Uhe,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=null!=(e=e.workspaceFolders)?e:void 0}initialized(e){return this.mutex.write(e=>{var t;return this.initializeWorkspace(null!=(t=this.folders)?t:[],e)})}async initializeWorkspace(e,t=Rhe.CancellationToken.None){e=await this.performStartup(e),await $he(t),await this.documentBuilder.build(e,this.initialBuildOptions,t)}async performStartup(e){let t=this.serviceRegistry.all.flatMap(e=>e.LanguageMetaData.fileExtensions),r=[],n=mt(e=>{r.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},"collector");return await this.loadAdditionalDocuments(e,n),await Promise.all(e.map(e=>[e,this.getRootFolder(e)]).map(async e=>this.traverseFolder(...e,t,n))),this._ready.resolve(),r}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Zhe.parse(e.uri)}async traverseFolder(t,e,r,n){e=await this.fileSystemProvider.readDirectory(e),await Promise.all(e.map(async e=>{this.includeEntry(t,e,r)&&(e.isDirectory?await this.traverseFolder(t,e.uri,r,n):e.isFile&&(e=await this.langiumDocuments.getOrCreateDocument(e.uri),n(e)))}))}includeEntry(e,t,r){var n=Jhe.basename(t.uri);return!n.startsWith(".")&&(t.isDirectory?"node_modules"!==n&&"out"!==n:!!t.isFile&&(n=Jhe.extname(t.uri),r.includes(n)))}}});function ude(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function dde(e){return e&&"modes"in e&&"defaultMode"in e}function pde(e){return!ude(e)&&!dde(e)}var gde,fde,mde,yde=e(()=>{qse(),gde=class{static{mt(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,i){return Wne.buildUnexpectedCharactersMessage(e,t,r,n,i)}buildUnableToPopLexerModeMessage(e){return Wne.buildUnableToPopLexerModeMessage(e)}},fde={mode:"full"},mde=class{static{mt(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;var t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive}),t=(this.tokenTypes=this.toTokenTypeDictionary(t),pde(t)?Object.values(t):t),e="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new Vne(t,{positionTracking:"full",skipValidations:e,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=0){var r,n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:null!=(n=n.groups.hidden)?n:[],report:null==(r=(n=this.tokenBuilder).flushLexingReport)?void 0:r.call(n,e)}}toTokenTypeDictionary(e){if(pde(e))return e;let t=dde(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}},mt(ude,"isTokenTypeArray"),mt(dde,"isIMultiModeLexerDefinition"),mt(pde,"isTokenTypeDictionary")});function vde(e,t,r){let n,i;return n="string"==typeof e?(i=t,r):(i=e.range.start,t),i=i||ple.create(0,0),r=bde(e),t=Rde(n),Cde({index:0,tokens:wde({lines:r,position:i,options:t}),position:i})}function xde(e,t){var r,n,t=Rde(t);return 0!==(e=bde(e)).length&&(r=e[e.length-1],n=t.start,t=t.end,!!n?.exec(e[0]))&&!!t?.exec(r)}function bde(e){return("string"==typeof e?e:e.text).split(qee)}function wde(a){let s,o,l,c=[],h=a.position.line,u=a.position.character;for(let i=0;i<a.lines.length;i++){let e=0===i,t=i===a.lines.length-1,r=a.lines[i],n=0;var d,p,g,f,m,y;e&&a.options.start?(d=null==(s=a.options.start)?void 0:s.exec(r))&&(n=d.index+d[0].length):(d=null==(o=a.options.line)?void 0:o.exec(r))&&(n=d.index+d[0].length),Tde(r=(r=t&&(p=null==(l=a.options.end)?void 0:l.exec(r))?r.substring(0,p.index):r).substring(0,Ede(r)),n)>=r.length?0<c.length&&(p=ple.create(h,u),c.push({type:"break",content:"",range:gle.create(p,p)})):(Bde.lastIndex=n,(m=Bde.exec(r))&&(g=m[0],m=m[1],y=ple.create(h,u+n),f=ple.create(h,u+n+g.length),c.push({type:"tag",content:m,range:gle.create(y,f)}),n+=g.length,n=Tde(r,n)),n<r.length&&(m=r.substring(n),y=Array.from(m.matchAll($de)),c.push(...kde(y,m,h,u+n)))),h++,u=0}return 0<c.length&&"break"===c[c.length-1].type?c.slice(0,-1):c}function kde(e,n,i,a){var s=[];if(0===e.length){var t=ple.create(i,a),r=ple.create(i,a+n.length);s.push({type:"text",content:n,range:gle.create(t,r)})}else{let r=0;for(var o of e){var l=o.index,c=n.substring(r,l);0<c.length&&s.push({type:"text",content:n.substring(r,l),range:gle.create(ple.create(i,r+a),ple.create(i,l+a))});let e=c.length+1,t=o[1];s.push({type:"inline-tag",content:t,range:gle.create(ple.create(i,r+e+a),ple.create(i,r+e+t.length+a))}),e+=t.length,4===o.length?(e+=o[2].length,s.push({type:"text",content:c=o[3],range:gle.create(ple.create(i,r+e+a),ple.create(i,r+e+c.length+a))})):s.push({type:"text",content:"",range:gle.create(ple.create(i,r+e+a),ple.create(i,r+e+a))}),r=l+o[0].length}0<(t=n.substring(r)).length&&s.push({type:"text",content:t,range:gle.create(ple.create(i,r+a),ple.create(i,r+a+t.length))})}return s}function Tde(e,t){var r=e.substring(t).match(Fde);return r?t+r.index:e.length}function Ede(e){if((e=e.match(zde))&&"number"==typeof e.index)return e.index}function Cde(e){var t=ple.create(e.position.line,e.position.character);if(0===e.tokens.length)return new Gde([],gle.create(t,t));for(var r=[];e.index<e.tokens.length;){var n=Sde(e,r[r.length-1]);n&&r.push(n)}var i=null!=(i=null==(i=r[0])?void 0:i.range.start)?i:t,a=null!=(a=null==(a=r[r.length-1])?void 0:a.range.end)?a:t;return new Gde(r,gle.create(i,a))}function Sde(e,t){var r=e.tokens[e.index];return"tag"===r.type?Nde(e,!1):"text"===r.type||"inline-tag"===r.type?Ade(e):(_de(r,t),void e.index++)}function _de(e,t){t&&(e=new jde("",e.range),("inlines"in t?t:t.content).inlines.push(e))}function Ade(e){let t=e.tokens[e.index],r=t,n=t,i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(Lde(e)),n=t,t=e.tokens[e.index];return new qde(i,gle.create(r.range.start,n.range.end))}function Lde(e){return"inline-tag"===e.tokens[e.index].type?Nde(e,!0):Ide(e)}function Nde(e,t){var r,n=e.tokens[e.index++],i=n.content.substring(1);return"text"===e.tokens[e.index]?.type?t?(r=Ide(e),new Ude(i,new qde([r],r.range),t,gle.create(n.range.start,r.range.end))):(r=Ade(e),new Ude(i,r,t,gle.create(n.range.start,r.range.end))):(e=n.range,new Ude(i,new qde([],e),t,e))}function Ide(e){return e=e.tokens[e.index++],new jde(e.content,e.range)}function Rde(e){var t,r;return e?({start:e,end:t,line:r}=e,{start:Mde(e,!0),end:Mde(t,!1),line:Mde(r,!0)}):Rde({start:"/**",end:"*/",line:"*"})}function Mde(e,t){var r;return"string"==typeof e||"object"==typeof e?(r="string"==typeof e?Fee(e):e.source,t?new RegExp("^\\s*"+r):new RegExp(`\\s*${r}\\s*$`)):e}function Dde(r,n,i){var a;if("linkplain"===r||"linkcode"===r||"link"===r){let e=n.indexOf(" "),t=n;return 0<e&&(a=Tde(n,e),t=n.substring(a),n=n.substring(0,e)),("linkcode"===r||"link"===r&&"code"===i.link)&&(t=`\`${t}\``),null!=(r=null==(a=i.renderLink)?void 0:a.call(i,n,t))?r:Ode(n,t)}}function Ode(e,t){try{return Zhe.parse(e,!0),`[${t}](${e})`}catch{return e}}function Pde(e){return e.endsWith(`
|
||
`)?`
|
||
`:`
|
||
|
||
`}var Bde,$de,Fde,zde,Gde,Ude,qde,jde,Wde,Yde,Hde,Vde,Xde,Kde,Zde,Qde=e(()=>{Gce(),Vee(),oue(),mt(vde,"parseJSDoc"),mt(xde,"isJSDoc"),mt(bde,"getLines"),Bde=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,$de=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,mt(wde,"tokenize"),mt(kde,"buildInlineTokens"),Fde=/\S/,zde=/\s*$/,mt(Tde,"skipWhitespace"),mt(Ede,"lastCharacter"),mt(Cde,"parseJSDocComment"),mt(Sde,"parseJSDocElement"),mt(_de,"appendEmptyLine"),mt(Ade,"parseJSDocText"),mt(Lde,"parseJSDocInline"),mt(Nde,"parseJSDocTag"),mt(Ide,"parseJSDocLine"),mt(Rde,"normalizeOptions"),mt(Mde,"normalizeOption"),Gde=class{static{mt(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(t){return this.getAllTags().find(e=>e.name===t)}getTags(t){return this.getAllTags().filter(e=>e.name===t)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(var t of this.elements)0===e.length?e=t.toString():(t=t.toString(),e+=Pde(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+=Pde(t)+r);return t.trim()}},Ude=class{static{mt(this,"JSDocTagImpl")}constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}toString(){let e="@"+this.name,t=this.content.toString();return 1===this.content.inlines.length?e=e+" "+t:1<this.content.inlines.length&&(e=e+`
|
||
`+t),this.inline?`{${e}}`:e}toMarkdown(e){var t;return null!=(t=null==(t=e?.renderTag)?void 0:t.call(e,this))?t:this.toMarkdownDefault(e)}toMarkdownDefault(e){var t=this.content.toMarkdown(e);if(this.inline){var r=Dde(this.name,t,e??{});if("string"==typeof r)return r}let n="",i=("italic"===e?.tag||void 0===e?.tag?n="*":"bold"===e?.tag?n="**":"bold-italic"===e?.tag&&(n="***"),n+"@"+this.name+n);return 1===this.content.inlines.length?i=i+" — "+t:1<this.content.inlines.length&&(i=i+`
|
||
`+t),this.inline?`{${i}}`:i}},mt(Dde,"renderInlineTag"),mt(Ode,"renderLinkDefault"),qde=class{static{mt(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let t="";for(let e=0;e<this.inlines.length;e++){var r=this.inlines[e],n=this.inlines[e+1];t+=r.toString(),n&&n.range.start.line>r.range.start.line&&(t+=`
|
||
`)}return t}toMarkdown(t){let r="";for(let e=0;e<this.inlines.length;e++){var n=this.inlines[e],i=this.inlines[e+1];r+=n.toMarkdown(t),i&&i.range.start.line>n.range.start.line&&(r+=`
|
||
`)}return r}},jde=class{static{mt(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},mt(Pde,"fillNewlines")}),Jde=e(()=>{fee(),Qde(),Wde=class{static{mt(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(r){var e=this.commentProvider.getComment(r);if(e&&xde(e))return vde(e).toMarkdown({renderLink:mt((e,t)=>this.documentationLinkRenderer(r,e,t),"renderLink"),renderTag:mt(e=>this.documentationTagRenderer(r,e),"renderTag")})}documentationLinkRenderer(e,t,r){var n=null!=(n=this.findNameInPrecomputedScopes(e,t))?n:this.findNameInGlobalScope(e,t);return n&&n.nameSegment?(e=n.nameSegment.range.start.line+1,t=n.nameSegment.range.start.character+1,`[${r}](${n.documentUri.with({fragment:`L${e},`+t}).toString()})`):void 0}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(t,r){var n=iee(t).precomputedScopes;if(n){let e=t;do{var i=n.get(e).find(e=>e.name===r);if(i)return i}while(e=e.$container)}}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}}}),epe=e(()=>{Pue(),aQ(),Yde=class{static{mt(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return Rue(e)?e.$comment:null==(e=YZ(e.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:e.text}}}),tpe=e(()=>{qhe(),ade(),Hde=class{static{mt(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},Vde=class{static{mt(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let t=this.createWorker();t.onReady(()=>{var e;0<this.queue.length&&(e=this.queue.shift())&&(t.lock(),e.resolve(t))}),this.workerPool.push(t)}}async parse(e,t){let r=await this.acquireParserWorker(t),n=new Uhe,i,a=t.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(e=>{e=this.hydrator.hydrate(e),n.resolve(e)}).catch(e=>{n.reject(e)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.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 Uhe;return e.onCancellationRequested(()=>{var e=this.queue.indexOf(r);0<=e&&this.queue.splice(e,1),r.reject(Ghe)}),this.queue.push(r),r.promise}},Xde=class{static{mt(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new ide.Emitter,this.deferred=new Uhe,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(e=>{this.deferred.resolve(e),this.unlock()}),r(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(Ghe),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 Uhe,this.sendMessage(e),this.deferred.promise}}}),rpe=e(()=>{Mhe(),qhe(),Kde=class{static{mt(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Rhe.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();var t=Ohe();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=Rhe.CancellationToken.None){var n=new Uhe;return e.push({action:t,deferred:n,cancellationToken:r}),this.performNextOperation(),n.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 n=await Promise.resolve().then(()=>e(r));t.resolve(n)}catch(e){Bhe(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),npe=e(()=>{Uce(),JJ(),_Z(),fee(),_ue(),aQ(),Zde=class{static{mt(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new gue,this.tokenTypeIdMap=new gue,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=>Object.assign(Object.assign({},e),{message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){var t,r=new Map,n=new Map;for(t of lee(e))r.set(t,{});if(e.$cstNode)for(var i of $Z(e.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,t){var r,n,i=t.astNodes.get(e);i.$type=e.$type,i.$containerIndex=e.$containerIndex,i.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(i.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for([r,n]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)xZ(a)?s.push(this.dehydrateAstNode(a,t)):bZ(a)?s.push(this.dehydrateReference(a,t)):s.push(a)}else xZ(n)?i[r]=this.dehydrateAstNode(n,t):bZ(n)?i[r]=this.dehydrateReference(n,t):void 0!==n&&(i[r]=n);return i}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 CZ(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),TZ(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):EZ(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,n=new Map;for(t of lee(e))r.set(t,{});let i;if(e.$cstNode)for(var a of $Z(e.$cstNode)){let e;"fullText"in a?(e=new $ce(a.fullText),i=e):"content"in a?e=new Pce:"tokenType"in a&&(e=this.hydrateCstLeafNode(a)),e&&(n.set(a,e),e.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,t){var r,n,i=t.astNodes.get(e);i.$type=e.$type,i.$containerIndex=e.$containerIndex,i.$containerProperty=e.$containerProperty,e.$cstNode&&(i.$cstNode=t.cstNodes.get(e.$cstNode));for([r,n]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)xZ(a)?s.push(this.setParent(this.hydrateAstNode(a,t),i)):bZ(a)?s.push(this.hydrateReference(a,i,r,t)):s.push(a)}else xZ(n)?i[r]=this.setParent(this.hydrateAstNode(n,t),i):bZ(n)?i[r]=this.hydrateReference(n,i,r,t):void 0!==n&&(i[r]=n);return i}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,n){return this.linker.buildReference(t,r,n.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){var n=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),TZ(n))for(var i of e.content)i=this.hydrateCstNode(i,t,r++),n.content.push(i);return n}hydrateCstLeafNode(e){var t=this.getTokenType(e.tokenType),r=e.offset;return new Oce(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 lee(this.grammar))yQ(t)&&this.grammarElementIdMap.set(t,e++)}}});function ipe(e){return{documentation:{CommentProvider:mt(e=>new Yde(e),"CommentProvider"),DocumentationProvider:mt(e=>new Wde(e),"DocumentationProvider")},parser:{AsyncParser:mt(e=>new Hde(e),"AsyncParser"),GrammarConfig:mt(e=>Ote(e),"GrammarConfig"),LangiumParser:mt(e=>bhe(e),"LangiumParser"),CompletionParser:mt(e=>vhe(e),"CompletionParser"),ValueConverter:mt(()=>new The,"ValueConverter"),TokenBuilder:mt(()=>new khe,"TokenBuilder"),Lexer:mt(e=>new mde(e),"Lexer"),ParserErrorMessageProvider:mt(()=>new Xce,"ParserErrorMessageProvider"),LexerErrorMessageProvider:mt(()=>new gde,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:mt(()=>new Xue,"AstNodeLocator"),AstNodeDescriptionProvider:mt(e=>new Hue(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:mt(e=>new Vue(e),"ReferenceDescriptionProvider")},references:{Linker:mt(e=>new iue(e),"Linker"),NameProvider:mt(()=>new uue,"NameProvider"),ScopeProvider:mt(e=>new Eue(e),"ScopeProvider"),ScopeComputation:mt(e=>new fue(e),"ScopeComputation"),References:mt(e=>new due(e),"References")},serializer:{Hydrator:mt(e=>new Zde(e),"Hydrator"),JsonSerializer:mt(e=>new Due(e),"JsonSerializer")},validation:{DocumentValidator:mt(e=>new Wue(e),"DocumentValidator"),ValidationRegistry:mt(e=>new zue(e),"ValidationRegistry")},shared:mt(()=>e.shared,"shared")}}function ape(t){return{ServiceRegistry:mt(e=>new Oue(e),"ServiceRegistry"),workspace:{LangiumDocuments:mt(e=>new rue(e),"LangiumDocuments"),LangiumDocumentFactory:mt(e=>new tue(e),"LangiumDocumentFactory"),DocumentBuilder:mt(e=>new Que(e),"DocumentBuilder"),IndexManager:mt(e=>new Jue(e),"IndexManager"),WorkspaceManager:mt(e=>new ede(e),"WorkspaceManager"),FileSystemProvider:mt(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:mt(()=>new Kde,"WorkspaceLock"),ConfigurationProvider:mt(e=>new Kue(e),"ConfigurationProvider")}}}var spe=e(()=>{Pte(),xhe(),Che(),She(),_he(),cue(),Cue(),Sue(),Aue(),Iue(),Pue(),Bue(),tde(),Gue(),rde(),nde(),sde(),lde(),lue(),cde(),hde(),yde(),Jde(),epe(),Jce(),tpe(),rpe(),npe(),mt(ipe,"createDefaultCoreModule"),mt(ape,"createDefaultSharedCoreModule")});function ope(e,t,r,n,i,a,s,o,l){return cpe([e,t,r,n,i,a,s,o,l].reduce(upe,{}))}function lpe(e){if(e&&e[ppe])for(var t of Object.values(e))lpe(t);return e}function cpe(r,n){let i=new Proxy({},{deleteProperty:mt(()=>!1,"deleteProperty"),set:mt(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:mt((e,t)=>t===ppe||hpe(e,t,r,n||i),"get"),getOwnPropertyDescriptor:mt((e,t)=>(hpe(e,t,r,n||i),Object.getOwnPropertyDescriptor(e,t)),"getOwnPropertyDescriptor"),has:mt((e,t)=>t in r,"has"),ownKeys:mt(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return i}function hpe(e,t,r,n){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:e[t]});if(e[t]===gpe)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]=gpe;try{e[t]="function"==typeof r?r(n):cpe(r,n)}catch(r){throw e[t]=r instanceof Error?r:void 0,r}return e[t]}}function upe(e,t){if(t)for(var[r,n]of Object.entries(t)){var i;void 0!==n&&(null!==(i=e[r])&&null!==n&&"object"==typeof i&&"object"==typeof n?e[r]=upe(i,n):e[r]=n)}return e}var dpe,ppe,gpe,fpe,mpe,ype,vpe,xpe,bpe,wpe=e(()=>{(dpe=dpe||{}).merge=(e,t)=>upe(upe({},e),t),mt(ope,"inject"),ppe=Symbol("isProxy"),mt(lpe,"eagerLoad"),mt(cpe,"_inject"),gpe=Symbol(),mt(hpe,"_resolve"),mt(upe,"_merge")}),kpe=e(()=>{}),Tpe=e(()=>{epe(),Jde(),Qde()}),Epe=e(()=>{}),Cpe=e(()=>{Pte(),Epe()}),Spe=e(()=>{qse(),She(),yde(),fpe={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(mpe=mpe||{}).REGULAR="indentation-sensitive",mpe.IGNORE_INDENTATION="ignore-indentation",ype=class extends khe{static{mt(this,"IndentationAwareTokenBuilder")}constructor(e=fpe){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},fpe),e),this.indentTokenType=eie({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=eie({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){var r;if(!ude(e=super.buildTokens(e,t)))throw new Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:i,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=mpe.IGNORE_INDENTATION:r.name===d&&(r.POP_MODE=!0);r.name===i?o=r:r.name===n?l=r:r.name===a?c=r:h.push(r)}if(o&&l&&c)return 0<s.length?{modes:{[mpe.REGULAR]:[o,l,...h,c],[mpe.IGNORE_INDENTATION]:[...h,c]},defaultMode:mpe.REGULAR}:[o,l,c,...h];throw new Error("Some indentation/whitespace tokens not found!")}flushLexingReport(e){var t=super.flushLexingReport(e);return Object.assign(Object.assign({},t),{remainingDedents:this.flushRemainingDedents(e)})}isStartOfLine(e,t){return 0===t||`\r
|
||
`.includes(e[t-1])}matchWhitespace(e,t,r,n){return this.whitespaceRegExp.lastIndex=t,{currIndentLevel:null!=(e=(t=this.whitespaceRegExp.exec(e))?.[0].length)?e:0,prevIndentLevel:this.indentationStack.at(-1),match:t}}createIndentationTokenInstance(e,t,r,n){return t=this.getLineNumber(t,n),rie(e,r,n,n+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,n){return!this.isStartOfLine(e,t)||({currIndentLevel:e,prevIndentLevel:t,match:r}=this.matchWhitespace(e,t,r,n),e<=t)?null:(this.indentationStack.push(e),r)}dedentMatcher(t,r,n,e){if(this.isStartOfLine(t,r)){var{currIndentLevel:e,prevIndentLevel:i,match:a}=this.matchWhitespace(t,r,n,e);if(!(i<=e))if(-1===(i=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:null!=(a=null==(e=a?.[0])?void 0:e.length)?a:0,line:this.getLineNumber(t,r),column:1});else{var s=this.indentationStack.length-i-1,o=null!=(a=null==(e=t.substring(0,r).match(/[\r\n]+$/))?void 0:e[0].length)?a:1;for(let e=0;e<s;e++){var l=this.createIndentationTokenInstance(this.dedentTokenType,t,"",r-(o-1));n.push(l),this.indentationStack.pop()}}}return null}buildTerminalToken(e){var e=super.buildTerminalToken(e),{indentTokenName:t,dedentTokenName:r,whitespaceTokenName:n}=this.options;return e.name===t?this.indentTokenType:e.name===r?this.dedentTokenType:e.name===n?eie({name:n,pattern:this.whitespaceRegExp,group:Vne.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}},vpe=class extends mde{static{mt(this,"IndentationAwareLexer")}constructor(e){if(super(e),!(e.parser.TokenBuilder instanceof ype))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=e.parser.TokenBuilder}tokenize(e,t=fde){var r=super.tokenize(e),e=r.report,{indentTokenType:t,dedentTokenType:e}=("full"===t?.mode&&r.tokens.push(...e.remainingDedents),e.remainingDedents=[],this.indentationTokenBuilder),n=t.tokenTypeIdx,i=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===n&&l.tokenTypeIdx===i?e++:a.push(o)}return 0<=s&&a.push(r.tokens[s]),r.tokens=a,r}}}),_pe=e(()=>{}),Ape=e(()=>{tpe(),xhe(),Uce(),Spe(),Che(),Jce(),yde(),yhe(),_pe(),She(),_he()}),Lpe=e(()=>{cue(),Cue(),Sue(),Lue(),Aue(),Iue()}),Npe=e(()=>{npe(),Pue()}),Ipe=e(()=>{xpe=class{static{mt(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},bpe={fileSystemProvider:mt(()=>new xpe,"fileSystemProvider")}});function Rpe(){var e=ope(ape(bpe),Ope),t=ope(ipe({shared:e}),Dpe);return e.ServiceRegistry.register(t),t}function Mpe(e){var t=Rpe(),e=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(e,Zhe.parse(`memory://${null!=(t=e.name)?t:"grammar"}.langium`)),e}var Dpe,Ope,Ppe=e(()=>{spe(),wpe(),JJ(),Ipe(),oue(),Dpe={Grammar:mt(()=>{},"Grammar"),LanguageMetaData:mt(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Ope={AstReflection:mt(()=>new ZJ,"AstReflection")},mt(Rpe,"createMinimalGrammarServices"),mt(Mpe,"loadGrammarFromJson")}),Bpe={},$pe=($Be(Bpe,{AstUtils:()=>eee,BiMap:()=>gue,Cancellation:()=>Rhe,ContextCache:()=>wue,CstUtils:()=>BZ,DONE_RESULT:()=>MZ,Deferred:()=>Uhe,Disposable:()=>Zue,DisposableCache:()=>xue,DocumentCache:()=>kue,EMPTY_STREAM:()=>RZ,ErrorWithLocation:()=>oQ,GrammarUtils:()=>Xee,MultiMap:()=>pue,OperationCancelled:()=>Ghe,Reduction:()=>OZ,RegExpUtils:()=>Oee,SimpleCache:()=>bue,StreamImpl:()=>IZ,TreeStreamImpl:()=>DZ,URI:()=>Zhe,UriUtils:()=>Jhe,WorkspaceCache:()=>Tue,assertUnreachable:()=>sQ,delayNextTick:()=>Dhe,interruptAndCheck:()=>$he,isOperationCancelled:()=>Bhe,loadGrammarFromJson:()=>Mpe,setInterruptionPeriod:()=>Phe,startCancelableOperation:()=>Ohe,stream:()=>NZ}),e(()=>{Nue(),ade(),Y(Bpe,ide),_ue(),ode(),lQ(),Ppe(),qhe(),PZ(),oue(),fee(),Mhe(),aQ(),Dte(),Vee()})),Fpe=e(()=>{tde(),Gue()}),zpe=e(()=>{rde(),nde(),sde(),lde(),lue(),Ipe(),cde(),rpe(),hde()}),Gpe={},Upe=($Be(Gpe,{AbstractAstReflection:()=>SZ,AbstractCstNode:()=>Dce,AbstractLangiumParser:()=>Yce,AbstractParserErrorMessageProvider:()=>Vce,AbstractThreadedAsyncParser:()=>Vde,AstUtils:()=>eee,BiMap:()=>gue,Cancellation:()=>Rhe,CompositeCstNodeImpl:()=>Pce,ContextCache:()=>wue,CstNodeBuilder:()=>Mce,CstUtils:()=>BZ,DEFAULT_TOKENIZE_OPTIONS:()=>fde,DONE_RESULT:()=>MZ,DatatypeSymbol:()=>jce,DefaultAstNodeDescriptionProvider:()=>Hue,DefaultAstNodeLocator:()=>Xue,DefaultAsyncParser:()=>Hde,DefaultCommentProvider:()=>Yde,DefaultConfigurationProvider:()=>Kue,DefaultDocumentBuilder:()=>Que,DefaultDocumentValidator:()=>Wue,DefaultHydrator:()=>Zde,DefaultIndexManager:()=>Jue,DefaultJsonSerializer:()=>Due,DefaultLangiumDocumentFactory:()=>tue,DefaultLangiumDocuments:()=>rue,DefaultLexer:()=>mde,DefaultLexerErrorMessageProvider:()=>gde,DefaultLinker:()=>iue,DefaultNameProvider:()=>uue,DefaultReferenceDescriptionProvider:()=>Vue,DefaultReferences:()=>due,DefaultScopeComputation:()=>fue,DefaultScopeProvider:()=>Eue,DefaultServiceRegistry:()=>Oue,DefaultTokenBuilder:()=>khe,DefaultValueConverter:()=>The,DefaultWorkspaceLock:()=>Kde,DefaultWorkspaceManager:()=>ede,Deferred:()=>Uhe,Disposable:()=>Zue,DisposableCache:()=>xue,DocumentCache:()=>kue,DocumentState:()=>eue,DocumentValidator:()=>Yue,EMPTY_SCOPE:()=>vue,EMPTY_STREAM:()=>RZ,EmptyFileSystem:()=>bpe,EmptyFileSystemProvider:()=>xpe,ErrorWithLocation:()=>oQ,GrammarAST:()=>cQ,GrammarUtils:()=>Xee,IndentationAwareLexer:()=>vpe,IndentationAwareTokenBuilder:()=>ype,JSDocDocumentationProvider:()=>Wde,LangiumCompletionParser:()=>Kce,LangiumParser:()=>Hce,LangiumParserErrorMessageProvider:()=>Xce,LeafCstNodeImpl:()=>Oce,LexingMode:()=>mpe,MapScope:()=>yue,Module:()=>dpe,MultiMap:()=>pue,OperationCancelled:()=>Ghe,ParserWorker:()=>Xde,Reduction:()=>OZ,RegExpUtils:()=>Oee,RootCstNodeImpl:()=>$ce,SimpleCache:()=>bue,StreamImpl:()=>IZ,StreamScope:()=>mue,TextDocument:()=>Khe,TreeStreamImpl:()=>DZ,URI:()=>Zhe,UriUtils:()=>Jhe,ValidationCategory:()=>Fue,ValidationRegistry:()=>zue,ValueConverter:()=>Ehe,WorkspaceCache:()=>Tue,assertUnreachable:()=>sQ,createCompletionParser:()=>vhe,createDefaultCoreModule:()=>ipe,createDefaultSharedCoreModule:()=>ape,createGrammarConfig:()=>Ote,createLangiumParser:()=>bhe,createParser:()=>ehe,delayNextTick:()=>Dhe,diagnosticData:()=>$ue,eagerLoad:()=>lpe,getDiagnosticRange:()=>Uue,indentationBuilderDefaultOptions:()=>fpe,inject:()=>ope,interruptAndCheck:()=>$he,isAstNode:()=>xZ,isAstNodeDescription:()=>wZ,isAstNodeWithComment:()=>Rue,isCompositeCstNode:()=>TZ,isIMultiModeLexerDefinition:()=>dde,isJSDoc:()=>xde,isLeafCstNode:()=>EZ,isLinkingError:()=>kZ,isNamed:()=>hue,isOperationCancelled:()=>Bhe,isReference:()=>bZ,isRootCstNode:()=>CZ,isTokenTypeArray:()=>ude,isTokenTypeDictionary:()=>pde,loadGrammarFromJson:()=>Mpe,parseJSDoc:()=>vde,prepareLangiumParser:()=>whe,setInterruptionPeriod:()=>Phe,startCancelableOperation:()=>Ohe,stream:()=>NZ,toDiagnosticData:()=>jue,toDiagnosticSeverity:()=>que}),e(()=>{spe(),wpe(),Bue(),kpe(),_Z(),Tpe(),Cpe(),Ape(),Lpe(),Npe(),$pe(),Y(Gpe,Bpe),Fpe(),zpe(),JJ()}));function qpe(e){return E0e.isInstance(e,t0e)}function jpe(e){return E0e.isInstance(e,n0e)}function Wpe(e){return E0e.isInstance(e,o0e)}function Ype(e){return E0e.isInstance(e,l0e)}function Hpe(e){return E0e.isInstance(e,c0e)}function Vpe(e){return E0e.isInstance(e,d0e)}function Xpe(e){return E0e.isInstance(e,g0e)}function Kpe(e){return E0e.isInstance(e,f0e)}function Zpe(e){return E0e.isInstance(e,"Pie")}function Qpe(e){return E0e.isInstance(e,m0e)}function Jpe(e){return E0e.isInstance(e,v0e)}var e0e,s,t0e,r0e,n0e,i0e,a0e,s0e,o0e,l0e,c0e,h0e,u0e,d0e,p0e,g0e,f0e,m0e,y0e,v0e,x0e,b0e,w0e,k0e,T0e,E0e,C0e,S0e,_0e,A0e,L0e,N0e,I0e,R0e,M0e,D0e,O0e,P0e,B0e,$0e,F0e,z0e,G0e,U0e,q0e,j0e,W0e,Y0e,H0e,V0e,X0e,K0e,Z0e,Q0e,J0e,ege,tge,rge,nge,ige=e(()=>{Upe(),Upe(),Upe(),Upe(),e0e=Object.defineProperty,s=mt((e,t)=>e0e(e,"name",{value:t,configurable:!0}),"__name"),t0e="Architecture",mt(qpe,"isArchitecture"),s(qpe,"isArchitecture"),r0e="Axis",n0e="Branch",mt(jpe,"isBranch"),s(jpe,"isBranch"),i0e="Checkout",a0e="CherryPicking",s0e="ClassDefStatement",o0e="Commit",mt(Wpe,"isCommit"),s(Wpe,"isCommit"),l0e="GitGraph",mt(Ype,"isGitGraph"),s(Ype,"isGitGraph"),c0e="Info",mt(Hpe,"isInfo"),s(Hpe,"isInfo"),h0e="Item",u0e="Junction",d0e="Merge",mt(Vpe,"isMerge"),s(Vpe,"isMerge"),p0e="Option",g0e="Packet",mt(Xpe,"isPacket"),s(Xpe,"isPacket"),f0e="PacketBlock",mt(Kpe,"isPacketBlock"),s(Kpe,"isPacketBlock"),mt(Zpe,"isPie"),s(Zpe,"isPie"),m0e="PieSection",mt(Qpe,"isPieSection"),s(Qpe,"isPieSection"),y0e="Service",v0e="Treemap",mt(Jpe,"isTreemap"),s(Jpe,"isTreemap"),x0e="TreemapRow",b0e="Direction",w0e="Leaf",k0e="Section",T0e=class extends SZ{static{mt(this,"MermaidAstReflection")}static{s(this,"MermaidAstReflection")}getAllTypes(){return[t0e,r0e,n0e,i0e,a0e,s0e,o0e,"Curve",b0e,"Edge","Entry",l0e,"Group",c0e,h0e,u0e,w0e,d0e,p0e,g0e,f0e,"Pie",m0e,"Radar",k0e,y0e,"Statement",v0e,x0e]}computeIsSubtype(e,t){switch(e){case n0e:case i0e:case a0e:case o0e:case d0e:return this.isSubtype("Statement",t);case b0e:return this.isSubtype(l0e,t);case w0e:case k0e:return this.isSubtype(h0e,t);default:return!1}}getReferenceType(e){if("Entry:axis"!=(e=e.container.$type+":"+e.property))throw new Error(e+" is not a valid reference id.");return r0e}getTypeMetaData(e){switch(e){case t0e:return{name:t0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case r0e:return{name:r0e,properties:[{name:"label"},{name:"name"}]};case n0e:return{name:n0e,properties:[{name:"name"},{name:"order"}]};case i0e:return{name:i0e,properties:[{name:"branch"}]};case a0e:return{name:a0e,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case s0e:return{name:s0e,properties:[{name:"className"},{name:"styleText"}]};case o0e:return{name:o0e,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Curve":return{name:"Curve",properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"Entry":return{name:"Entry",properties:[{name:"axis"},{name:"value"}]};case l0e:return{name:l0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case c0e:return{name:c0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case h0e:return{name:h0e,properties:[{name:"classSelector"},{name:"name"}]};case u0e:return{name:u0e,properties:[{name:"id"},{name:"in"}]};case d0e:return{name:d0e,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case p0e:return{name:p0e,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case g0e:return{name:g0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case f0e:return{name:f0e,properties:[{name:"bits"},{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case m0e:return{name:m0e,properties:[{name:"label"},{name:"value"}]};case"Radar":return{name:"Radar",properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case y0e:return{name:y0e,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case v0e:return{name:v0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"},{name:"TreemapRows",defaultValue:[]}]};case x0e:return{name:x0e,properties:[{name:"indent"},{name:"item"}]};case b0e:return{name:b0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};case w0e:return{name:w0e,properties:[{name:"classSelector"},{name:"name"},{name:"value"}]};case k0e:return{name:k0e,properties:[{name:"classSelector"},{name:"name"}]};default:return{name:e,properties:[]}}}},E0e=new T0e,S0e=s(()=>C0e=C0e??Mpe(`{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"InfoGrammar"),A0e=s(()=>_0e=_0e??Mpe(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PacketGrammar"),N0e=s(()=>L0e=L0e??Mpe(`{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@3"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PieGrammar"),R0e=s(()=>I0e=I0e??Mpe(`{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"ArchitectureGrammar"),D0e=s(()=>M0e=M0e??Mpe(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"GitGraphGrammar"),P0e=s(()=>O0e=O0e??Mpe(`{"$type":"Grammar","isDeclared":true,"name":"Radar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"types":[],"usedGrammars":[]}`),"RadarGrammar"),$0e=s(()=>B0e=B0e??Mpe(`{"$type":"Grammar","isDeclared":true,"name":"Treemap","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","}},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),"TreemapGrammar"),W0e={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(j0e={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(q0e={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(U0e={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(G0e={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(z0e={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(F0e={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},Y0e={AstReflection:s(()=>new T0e,"AstReflection")},H0e={Grammar:s(()=>S0e(),"Grammar"),LanguageMetaData:s(()=>F0e,"LanguageMetaData"),parser:{}},V0e={Grammar:s(()=>A0e(),"Grammar"),LanguageMetaData:s(()=>z0e,"LanguageMetaData"),parser:{}},X0e={Grammar:s(()=>N0e(),"Grammar"),LanguageMetaData:s(()=>G0e,"LanguageMetaData"),parser:{}},K0e={Grammar:s(()=>R0e(),"Grammar"),LanguageMetaData:s(()=>U0e,"LanguageMetaData"),parser:{}},Z0e={Grammar:s(()=>D0e(),"Grammar"),LanguageMetaData:s(()=>q0e,"LanguageMetaData"),parser:{}},Q0e={Grammar:s(()=>P0e(),"Grammar"),LanguageMetaData:s(()=>j0e,"LanguageMetaData"),parser:{}},J0e={Grammar:s(()=>$0e(),"Grammar"),LanguageMetaData:s(()=>W0e,"LanguageMetaData"),parser:{}},ege={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},tge=class extends The{static{mt(this,"AbstractMermaidValueConverter")}static{s(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){var n=this.runCommonConverter(e,t,r);return void 0===(n=void 0===n?this.runCustomConverter(e,t,r):n)?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){return void 0!==(e=ege[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}},rge=class extends tge{static{mt(this,"CommonValueConverter")}static{s(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},nge=class extends khe{static{mt(this,"AbstractMermaidTokenBuilder")}static{s(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 nge{static{mt(this,"CommonTokenBuilder")}static{s(this,"CommonTokenBuilder")}}});function age(e=bpe){var e=ope(ape(e),Y0e),t=ope(ipe({shared:e}),Z0e,oge);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}var sge,oge,lge=e(()=>{ige(),Upe(),sge=class extends nge{static{mt(this,"GitGraphTokenBuilder")}static{s(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},oge={parser:{TokenBuilder:s(()=>new sge,"TokenBuilder"),ValueConverter:s(()=>new rge,"ValueConverter")}},mt(age,"createGitGraphServices"),s(age,"createGitGraphServices")});function cge(e=bpe){var e=ope(ape(e),Y0e),t=ope(ipe({shared:e}),H0e,uge);return e.ServiceRegistry.register(t),{shared:e,Info:t}}var hge,uge,dge=e(()=>{ige(),Upe(),hge=class extends nge{static{mt(this,"InfoTokenBuilder")}static{s(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},uge={parser:{TokenBuilder:s(()=>new hge,"TokenBuilder"),ValueConverter:s(()=>new rge,"ValueConverter")}},mt(cge,"createInfoServices"),s(cge,"createInfoServices")});function pge(e=bpe){var e=ope(ape(e),Y0e),t=ope(ipe({shared:e}),V0e,fge);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}var gge,fge,mge=e(()=>{ige(),Upe(),gge=class extends nge{static{mt(this,"PacketTokenBuilder")}static{s(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},fge={parser:{TokenBuilder:s(()=>new gge,"TokenBuilder"),ValueConverter:s(()=>new rge,"ValueConverter")}},mt(pge,"createPacketServices"),s(pge,"createPacketServices")});function yge(e=bpe){var e=ope(ape(e),Y0e),t=ope(ipe({shared:e}),X0e,bge);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}var vge,xge,bge,wge=e(()=>{ige(),Upe(),vge=class extends nge{static{mt(this,"PieTokenBuilder")}static{s(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},xge=class extends tge{static{mt(this,"PieValueConverter")}static{s(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},bge={parser:{TokenBuilder:s(()=>new vge,"TokenBuilder"),ValueConverter:s(()=>new xge,"ValueConverter")}},mt(yge,"createPieServices"),s(yge,"createPieServices")});function kge(e=bpe){var e=ope(ape(e),Y0e),t=ope(ipe({shared:e}),K0e,Cge);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}var Tge,Ege,Cge,Sge=e(()=>{ige(),Upe(),Tge=class extends nge{static{mt(this,"ArchitectureTokenBuilder")}static{s(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},Ege=class extends tge{static{mt(this,"ArchitectureValueConverter")}static{s(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){return"ARCH_ICON"===e.name?t.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?t.replace(/["()]/g,""):"ARCH_TITLE"===e.name?t.replace(/[[\]]/g,"").trim():void 0}},Cge={parser:{TokenBuilder:s(()=>new Tge,"TokenBuilder"),ValueConverter:s(()=>new Ege,"ValueConverter")}},mt(kge,"createArchitectureServices"),s(kge,"createArchitectureServices")});function _ge(e=bpe){var e=ope(ape(e),Y0e),t=ope(ipe({shared:e}),Q0e,Lge);return e.ServiceRegistry.register(t),{shared:e,Radar:t}}var Age,Lge,Nge=e(()=>{ige(),Upe(),Age=class extends nge{static{mt(this,"RadarTokenBuilder")}static{s(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},Lge={parser:{TokenBuilder:s(()=>new Age,"TokenBuilder"),ValueConverter:s(()=>new rge,"ValueConverter")}},mt(_ge,"createRadarServices"),s(_ge,"createRadarServices")});function Ige(e){var t,r=e.validation.TreemapValidator;(e=e.validation.ValidationRegistry)&&(t={Treemap:r.checkSingleRoot.bind(r)},e.register(t,r))}function Rge(e=bpe){var e=ope(ape(e),Y0e),t=ope(ipe({shared:e}),J0e,Bge);return e.ServiceRegistry.register(t),Ige(t),{shared:e,Treemap:t}}var Mge,Dge,Oge,Pge,Bge,$ge=e(()=>{ige(),Upe(),Mge=class extends nge{static{mt(this,"TreemapTokenBuilder")}static{s(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},Dge=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,Oge=class extends tge{static{mt(this,"TreemapValueConverter")}static{s(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=Dge.exec(t))?{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}:void 0:void 0}},mt(Ige,"registerValidationChecks"),s(Ige,"registerValidationChecks"),Pge=class{static{mt(this,"TreemapValidator")}static{s(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(var n of e.TreemapRows)n.item&&(void 0===r&&void 0===n.indent?r=0:(void 0===n.indent||void 0!==r&&r>=parseInt(n.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},Bge={parser:{TokenBuilder:s(()=>new Mge,"TokenBuilder"),ValueConverter:s(()=>new Oge,"ValueConverter")},validation:{TreemapValidator:s(()=>new Pge,"TreemapValidator")}},mt(Rge,"createTreemapServices"),s(Rge,"createTreemapServices")}),Fge={},zge=($Be(Fge,{InfoModule:()=>uge,createInfoServices:()=>cge}),e(()=>{dge(),ige()})),Gge={},Uge=($Be(Gge,{PacketModule:()=>fge,createPacketServices:()=>pge}),e(()=>{mge(),ige()})),qge={},jge=($Be(qge,{PieModule:()=>bge,createPieServices:()=>yge}),e(()=>{wge(),ige()})),Wge={},Yge=($Be(Wge,{ArchitectureModule:()=>Cge,createArchitectureServices:()=>kge}),e(()=>{Sge(),ige()})),Hge={},Vge=($Be(Hge,{GitGraphModule:()=>oge,createGitGraphServices:()=>age}),e(()=>{lge(),ige()})),Xge={},Kge=($Be(Xge,{RadarModule:()=>Lge,createRadarServices:()=>_ge}),e(()=>{Nge(),ige()})),Zge={},Qge=($Be(Zge,{TreemapModule:()=>Bge,createTreemapServices:()=>Rge}),e(()=>{$ge(),ige()}));async function Jge(e,t){var r=t1e[e];if(!r)throw new Error("Unknown diagram type: "+e);if(e1e[e]||await r(),0<(r=e1e[e].parse(t)).lexerErrors.length||0<r.parserErrors.length)throw new r1e(r);return r.value}var e1e,t1e,r1e,n1e=e(()=>{lge(),dge(),mge(),wge(),Sge(),Nge(),$ge(),ige(),e1e={},t1e={info:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(zge(),Fge))).createInfoServices)().Info.parser.LangiumParser;e1e.info=e},"info"),packet:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Uge(),Gge))).createPacketServices)().Packet.parser.LangiumParser;e1e.packet=e},"packet"),pie:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(jge(),qge))).createPieServices)().Pie.parser.LangiumParser;e1e.pie=e},"pie"),architecture:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Yge(),Wge))).createArchitectureServices)().Architecture.parser.LangiumParser;e1e.architecture=e},"architecture"),gitGraph:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Vge(),Hge))).createGitGraphServices)().GitGraph.parser.LangiumParser;e1e.gitGraph=e},"gitGraph"),radar:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Kge(),Xge))).createRadarServices)().Radar.parser.LangiumParser;e1e.radar=e},"radar"),treemap:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Qge(),Zge))).createTreemapServices)().Treemap.parser.LangiumParser;e1e.treemap=e},"treemap")},mt(Jge,"parse"),s(Jge,"parse"),r1e=class extends Error{static{mt(this,"MermaidParseError")}constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>e.message).join(`
|
||
`)} `+e.parserErrors.map(e=>e.message).join(`
|
||
`)),this.result=e}static{s(this,"MermaidParseError")}}});function i1e(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var a1e,s1e,o1e=e(()=>{mt(i1e,"populateCommonDb")}),l1e=e(()=>{a1e={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),c1e=e(()=>{s1e=class{constructor(e){this.init=e,this.records=this.init()}static{mt(this,"ImperativeState")}reset(){this.records=this.init()}}});function h1e(){return qC({length:7})}function u1e(e,n){let i=Object.create(null);return e.reduce((e,t)=>{var r=n(t);return i[r]||(i[r]=!0,e.push(t)),e},[])}function d1e(e,t,r){-1===(t=e.indexOf(t))?e.push(r):e.splice(t,1,r)}function p1e(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 n,i=[r,t.id,t.seq];for(n in b.records.branches)b.records.branches.get(n)===t.id&&i.push(n);if(M.debug(i.join(" ")),t.parents&&2==t.parents.length&&t.parents[0]&&t.parents[1]){var a=b.records.commits.get(t.parents[0]);d1e(e,t,a),t.parents[1]&&e.push(b.records.commits.get(t.parents[1]))}else{if(0==t.parents.length)return;t.parents[0]&&(a=b.records.commits.get(t.parents[0]),d1e(e,t,a))}p1e(e=u1e(e,e=>e.id))}var g1e,f1e,b,m1e,y1e,v1e,x1e,b1e,w1e,k1e,T1e,E1e,C1e,S1e,_1e,A1e,L1e,N1e,I1e,R1e,M1e,D1e,O1e,P1e,B1e,$1e,F1e,z1e,G1e,U1e,q1e,j1e,W1e,Y1e,H1e,V1e,X1e,K1e,Z1e,Q1e,J1e,efe,tfe,rfe,nfe,ife,afe,sfe,ofe,lfe,cfe,hfe,ufe,dfe,pfe,gfe,ffe,mfe,yfe,vfe,xfe,bfe,wfe=e(()=>{t(),iS(),Nn(),lh(),Tu(),l1e(),c1e(),An(),g1e=yr.gitGraph,f1e=mt(()=>_C({...g1e,...Ir().gitGraph}),"getConfig"),b=new s1e(()=>{var e=(t=f1e()).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(h1e,"getID"),mt(u1e,"uniqBy"),m1e=mt(function(e){b.records.direction=e},"setDirection"),y1e=mt(function(e){M.debug("options str",e),e=e?.trim()||"{}";try{b.records.options=JSON.parse(e)}catch(e){M.error("error while parsing gitGraph options",e.message)}},"setOptions"),v1e=mt(function(){return b.records.options},"getOptions"),x1e=mt(function(e){let t=e.msg,r=e.id,n=e.type,i=e.tags,a=(M.info("commit",t,r,n,i),M.debug("Entering commit:",t,r,n,i),f1e());r=L.sanitizeText(r,a),t=L.sanitizeText(t,a),i=i?.map(e=>L.sanitizeText(e,a)),e={id:r||b.records.seq+"-"+h1e(),message:t,seq:b.records.seq++,type:n??a1e.NORMAL,tags:i??[],parents:null==b.records.head?[]:[b.records.head.id],branch:b.records.currBranch},b.records.head=e,M.info("main branch",a.mainBranchName),b.records.commits.has(e.id)&&M.warn(`Commit ID ${e.id} already exists`),b.records.commits.set(e.id,e),b.records.branches.set(b.records.currBranch,e.id),M.debug("in pushCommit "+e.id)},"commit"),b1e=mt(function(e){var t=e.name,e=e.order,t=L.sanitizeText(t,f1e());if(b.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}")`);b.records.branches.set(t,null!=b.records.head?b.records.head.id:null),b.records.branchConfig.set(t,{name:t,order:e}),T1e(t),M.debug("in createBranch")},"branch"),w1e=mt(e=>{var t=e.branch,r=e.id,n=e.type,i=e.tags,a=f1e(),t=L.sanitizeText(t,a),r=r&&L.sanitizeText(r,a),e=b.records.branches.get(b.records.currBranch),a=b.records.branches.get(t),e=e?b.records.commits.get(e):void 0,s=a?b.records.commits.get(a):void 0;if(e&&s&&e.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(b.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 (${b.records.currBranch})has no commits`)).hash={text:"merge "+t,token:"merge "+t,expected:["commit"]},o;if(!b.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&&b.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} ${n} `+i?.join(" "),token:`merge ${t} ${r} ${n} `+i?.join(" "),expected:[`merge ${t} ${r}_UNIQUE ${n} `+i?.join(" ")]},e;var s=a||"",o={id:r||b.records.seq+"-"+h1e(),message:`merged branch ${t} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,s],branch:b.records.currBranch,type:a1e.MERGE,customType:n,customId:!!r,tags:i??[]};b.records.head=o,b.records.commits.set(o.id,o),b.records.branches.set(b.records.currBranch,o.id),M.debug(b.records.branches),M.debug("in mergeBranch")},"merge"),k1e=mt(function(e){let t=e.id,r=e.targetId,n=e.tags,i=e.parent,a=(M.debug("Entering cherryPick:",t,r,n),f1e());if(t=L.sanitizeText(t,a),r=L.sanitizeText(r,a),n=n?.map(e=>L.sanitizeText(e,a)),i=L.sanitizeText(i,a),!t||!b.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=b.records.commits.get(t))||!e)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(e.parents)||!e.parents.includes(i)))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===a1e.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!b.records.commits.has(r)){if(s===b.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=b.records.branches.get(b.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},o;var o=b.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;o={id:b.records.seq+"-"+h1e(),message:`cherry-picked ${e?.message} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,e.id],branch:b.records.currBranch,type:a1e.CHERRY_PICK,tags:n?n.filter(Boolean):["cherry-pick:"+e.id+(e.type===a1e.MERGE?"|parent:"+i:"")]},b.records.head=o,b.records.commits.set(o.id,o),b.records.branches.set(b.records.currBranch,o.id),M.debug(b.records.branches),M.debug("in cherryPick")}},"cherryPick"),T1e=mt(function(e){var t;if(e=L.sanitizeText(e,f1e()),!b.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;b.records.currBranch=e,t=b.records.branches.get(b.records.currBranch),b.records.head=void 0!==t&&t?b.records.commits.get(t)??null:null},"checkout"),mt(d1e,"upsert"),mt(p1e,"prettyPrintCommitHistory"),E1e=mt(function(){M.debug(b.records.commits),p1e([L1e()[0]])},"prettyPrint"),C1e=mt(function(){b.reset(),mh()},"clear"),S1e=mt(function(){return[...b.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"),_1e=mt(function(){return b.records.branches},"getBranches"),A1e=mt(function(){return b.records.commits},"getCommits"),L1e=mt(function(){var e=[...b.records.commits.values()];return e.forEach(function(e){M.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},"getCommitsArray"),N1e=mt(function(){return b.records.currBranch},"getCurrentBranch"),I1e=mt(function(){return b.records.direction},"getDirection"),R1e=mt(function(){return b.records.head},"getHead"),M1e={commitType:a1e,getConfig:f1e,setDirection:m1e,setOptions:y1e,getOptions:v1e,commit:x1e,branch:b1e,merge:w1e,cherryPick:k1e,checkout:T1e,prettyPrint:E1e,clear:C1e,getBranchesAsObjArray:S1e,getBranches:_1e,getCommits:A1e,getCommitsArray:L1e,getCurrentBranch:N1e,getDirection:I1e,getHead:R1e,setAccTitle:yh,getAccTitle:vh,getAccDescription:bh,setAccDescription:xh,setDiagramTitle:wh,getDiagramTitle:kh}}),kfe=e(()=>{n1e(),t(),o1e(),wfe(),l1e(),D1e=mt((e,t)=>{i1e(e,t),e.dir&&t.setDirection(e.dir);for(var r of e.statements)O1e(r,t)},"populate"),O1e=mt((e,t)=>{var r={Commit:mt(e=>t.commit(P1e(e)),"Commit"),Branch:mt(e=>t.branch(B1e(e)),"Branch"),Merge:mt(e=>t.merge($1e(e)),"Merge"),Checkout:mt(e=>t.checkout(F1e(e)),"Checkout"),CherryPicking:mt(e=>t.cherryPick(z1e(e)),"CherryPicking")}[e.$type];r?r(e):M.error("Unknown statement type: "+e.$type)},"parseStatement"),P1e=mt(e=>({id:e.id,msg:e.message??"",type:void 0!==e.type?a1e[e.type]:a1e.NORMAL,tags:e.tags??void 0}),"parseCommit"),B1e=mt(e=>({name:e.name,order:e.order??0}),"parseBranch"),$1e=mt(e=>({branch:e.branch,id:e.id??"",type:void 0!==e.type?a1e[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),F1e=mt(e=>e.branch,"parseCheckout"),z1e=mt(e=>({id:e.id,targetId:"",tags:0===e.tags?.length?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),G1e={parse:mt(async e=>{e=await Jge("gitGraph",e),M.debug(e),D1e(e,M1e)},"parse")}}),Tfe=e(()=>{a6(),Eu(),t(),iS(),l1e(),yfe=D(),U1e=yfe?.gitGraph,q1e=new Map,j1e=new Map,W1e=new Map,Y1e=[],H1e=0,V1e="LR",X1e=mt(()=>{q1e.clear(),j1e.clear(),W1e.clear(),H1e=0,Y1e=[],V1e="LR"},"clear"),K1e=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"),Z1e=mt(e=>{let r,n,i;return i="BT"===V1e?(n=mt((e,t)=>e<=t,"comparisonFunc"),1/0):(n=mt((e,t)=>t<=e,"comparisonFunc"),0),e.forEach(e=>{var t="TB"===V1e||"BT"==V1e?j1e.get(e)?.y:j1e.get(e)?.x;void 0!==t&&n(t,i)&&(r=e,i=t)}),r},"findClosestParent"),Q1e=mt(e=>{let r="",n=1/0;return e.forEach(e=>{var t=j1e.get(e).y;t<=n&&(r=e,n=t)}),r||void 0},"findClosestParentBT"),J1e=mt((e,n,t)=>{let i=t,a=t,r=[];e.forEach(e=>{var t=n.get(e);if(!t)throw new Error("Commit not found for key "+e);t.parents.length?(i=tfe(t),a=Math.max(i,a)):r.push(t),rfe(t,i)}),i=a,r.forEach(e=>{nfe(e,i,t)}),e.forEach(e=>{var t,r;(e=n.get(e))?.parents.length&&(t=Q1e(e.parents),(i=j1e.get(t).y-40)<=a&&(a=i),t=q1e.get(e.branch).pos,r=i-10,j1e.set(e.id,{x:t,y:r}))})},"setParallelBTPos"),efe=mt(e=>{var t=Z1e(e.parents.filter(e=>null!==e));if(!t)throw new Error("Closest parent not found for commit "+e.id);if(void 0===(t=j1e.get(t)?.y))throw new Error("Closest parent position not found for commit "+e.id);return t},"findClosestParentPos"),tfe=mt(e=>efe(e)+40,"calculateCommitPosition"),rfe=mt((e,t)=>{var r=q1e.get(e.branch);if(r)return r=r.pos,j1e.set(e.id,{x:r,y:t+=10}),{x:r,y:t};throw new Error("Branch not found for commit "+e.id)},"setCommitPosition"),nfe=mt((e,t,r)=>{var n=q1e.get(e.branch);if(!n)throw new Error("Branch not found for commit "+e.id);n=n.pos,j1e.set(e.id,{x:n,y:t+r})},"setRootPosition"),ife=mt((e,t,r,n,i,a)=>{var s;a===a1e.HIGHLIGHT?(e.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${i%8} ${n}-outer`),e.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${i%8} ${n}-inner`)):a===a1e.CHERRY_PICK?(e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${t.id} `+n),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} `+n),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} `+n),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} `+n),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} `+n)):((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",t.type===a1e.MERGE?9:10),s.attr("class",`commit ${t.id} commit`+i%8),a===a1e.MERGE&&((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${n} ${t.id} commit`+i%8)),a===a1e.REVERSE&&e.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},`+(r.y-5)).attr("class",`commit ${n} ${t.id} commit`+i%8))},"drawCommitBullet"),afe=mt((e,t,r,n)=>{var i,a;t.type!==a1e.CHERRY_PICK&&(t.customId&&t.type===a1e.MERGE||t.type!==a1e.MERGE)&&U1e?.showCommitLabel&&(a=(e=e.append("g")).insert("rect").attr("class","commit-label-bkg"),i=(t=e.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(t.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-i.width/2-2).attr("y",r.y+13.5).attr("width",i.width+4).attr("height",i.height+4),"TB"===V1e||"BT"===V1e?(a.attr("x",r.x-(i.width+16+5)).attr("y",r.y-12),t.attr("x",r.x-(i.width+16)).attr("y",r.y+i.height-12)):t.attr("x",r.posWithOffset-i.width/2),U1e.rotateCommitLabel)&&("TB"===V1e||"BT"===V1e?(t.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(t=-7.5-(i.width+10)/25*9.5,a=10+i.width/25*8.5,e.attr("transform","translate("+t+", "+a+") rotate(-45, "+n+", "+r.y+")")))},"drawCommitLabel"),sfe=mt((i,a,s,o)=>{if(0<a.tags.length){let e=0,t=0,r=0,n=[];for(var l of a.tags.reverse()){var c=i.insert("polygon"),h=i.append("circle"),u=(l=i.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),n.push({tag:l,hole:h,rect:c,yOffset:e}),e+=20}for(var{tag:d,hole:p,rect:g,yOffset:f}of n){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"!==V1e&&"BT"!==V1e||(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"),ofe=mt(e=>{switch(e.customType??e.type){case a1e.NORMAL:return"commit-normal";case a1e.REVERSE:return"commit-reverse";case a1e.HIGHLIGHT:return"commit-highlight";case a1e.MERGE:return"commit-merge";case a1e.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),lfe=mt((e,t,r,n)=>{var i,a={x:0,y:0};return 0<e.parents.length?(i=Z1e(e.parents))?(i=n.get(i)??a,"TB"===t?i.y+40:"BT"===t?(n.get(e.id)??a).y-40:i.x+40):0:"TB"===t?30:"BT"===t?(n.get(e.id)??a).y-40:0},"calculatePosition"),cfe=mt((e,t,r)=>{var r="BT"===V1e&&r?t:t+10,t="TB"===V1e||"BT"===V1e?r:q1e.get(e.branch)?.pos,n="TB"===V1e||"BT"===V1e?q1e.get(e.branch)?.pos:r;if(void 0===n||void 0===t)throw new Error("Position were undefined for commit "+e.id);return{x:n,y:t,posWithOffset:r}},"getCommitPosition"),hfe=mt((e,a,s)=>{if(!U1e)throw new Error("GitGraph config not found");let o=e.append("g").attr("class","commit-bullets"),l=e.append("g").attr("class","commit-labels"),c="TB"===V1e||"BT"===V1e?30:0,t=[...a.keys()],h=U1e?.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"),n=t.sort(r);"BT"===V1e&&(h&&J1e(n,a,c),n=n.reverse()),n.forEach(e=>{var t=a.get(e);if(!t)throw new Error("Commit not found for key "+e);h&&(c=lfe(t,V1e,c,j1e));var r,n,i,e=cfe(t,c,h);s&&(r=ofe(t),n=t.customType??t.type,i=q1e.get(t.branch)?.index??0,ife(o,t,e,r,i,n),afe(l,t,e,c),sfe(l,t,e,c)),"TB"===V1e||"BT"===V1e?j1e.set(t.id,{x:e.x,y:e.posWithOffset}):j1e.set(t.id,{x:e.posWithOffset,y:e.y}),(c="BT"===V1e&&h?c+40:c+40+10)>H1e&&(H1e=c)})},"drawCommits"),ufe=mt((t,r,e,n,i)=>{let a=(("TB"===V1e||"BT"===V1e?e.x<n.x:e.y<n.y)?r:t).branch,s=mt(e=>e.branch===a,"isOnBranchToGetCurve"),o=mt(e=>e.seq>t.seq&&e.seq<r.seq,"isBetweenCommits");return[...i.values()].some(e=>o(e)&&s(e))},"shouldRerouteArrow"),dfe=mt((e,t,r=0)=>{let n=e+Math.abs(e-t)/2,i;return 5<r?n:Y1e.every(e=>10<=Math.abs(e-n))?(Y1e.push(n),n):(i=Math.abs(e-t),dfe(e,t-i/5,r+1))},"findLane"),pfe=mt((e,t,r,n)=>{var i,a=j1e.get(t.id),s=j1e.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${t.id} and `+r.id);let o=ufe(t,r,a,s,n),l="",c="",h=0,u=0,d=q1e.get(r.branch)?.index;r.type===a1e.MERGE&&t.id!==r.parents[0]&&(d=q1e.get(t.branch)?.index);let p;if(o?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,n=a.y<s.y?dfe(a.y,s.y):dfe(s.y,a.y),i=a.x<s.x?dfe(a.x,s.x):dfe(s.x,a.x),p="TB"===V1e?a.x<s.x?`M ${a.x} ${a.y} L ${i-h} ${a.y} ${c} ${i} ${a.y+u} L ${i} ${s.y-h} ${l} ${i+u} ${s.y} L ${s.x} `+s.y:(d=q1e.get(t.branch)?.index,`M ${a.x} ${a.y} L ${i+h} ${a.y} ${l} ${i} ${a.y+u} L ${i} ${s.y-h} ${c} ${i-u} ${s.y} L ${s.x} `+s.y):"BT"===V1e?a.x<s.x?`M ${a.x} ${a.y} L ${i-h} ${a.y} ${l} ${i} ${a.y-u} L ${i} ${s.y+h} ${c} ${i+u} ${s.y} L ${s.x} `+s.y:(d=q1e.get(t.branch)?.index,`M ${a.x} ${a.y} L ${i+h} ${a.y} ${c} ${i} ${a.y-u} L ${i} ${s.y+h} ${l} ${i-u} ${s.y} L ${s.x} `+s.y):a.y<s.y?`M ${a.x} ${a.y} L ${a.x} ${n-h} ${l} ${a.x+u} ${n} L ${s.x-h} ${n} ${c} ${s.x} ${n+u} L ${s.x} `+s.y:(d=q1e.get(t.branch)?.index,`M ${a.x} ${a.y} L ${a.x} ${n+h} ${c} ${a.x+u} ${n} L ${s.x-h} ${n} ${l} ${s.x} ${n-u} L ${s.x} `+s.y)):(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,"TB"===V1e?(a.x<s.x&&(p=r.type===a1e.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${l} ${a.x+u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${c} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x>s.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===a1e.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${c} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x+h} ${a.y} ${l} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):"BT"===V1e?(a.x<s.x&&(p=r.type===a1e.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x>s.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===a1e.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${l} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):(a.y<s.y&&(p=r.type===a1e.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${c} ${s.x} ${a.y+u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${l} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y>s.y&&(p=r.type===a1e.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y===s.y&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y))),void 0===p)throw new Error("Line definition not found");e.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),gfe=mt((e,r)=>{let n=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=>{pfe(n,r.get(e),t,r)})})},"drawArrows"),ffe=mt((e,t)=>{let a=e.append("g");t.forEach((e,t)=>{var t=t%8,r=q1e.get(e.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+e.name);(n=a.append("line")).attr("x1",0),n.attr("y1",r),n.attr("x2",H1e),n.attr("y2",r),n.attr("class","branch branch"+t),"TB"===V1e?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",H1e),n.attr("x2",r)):"BT"===V1e&&(n.attr("y1",H1e),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),Y1e.push(r);var n=e.name,e=K1e(n),n=a.insert("rect"),i=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+t),e=(i.node().appendChild(e),e.getBBox());n.attr("class","branchLabelBkg label"+t).attr("rx",4).attr("ry",4).attr("x",-e.width-4-(!0===U1e?.rotateCommitLabel?30:0)).attr("y",-e.height/2+8).attr("width",e.width+18).attr("height",e.height+4),i.attr("transform","translate("+(-e.width-14-(!0===U1e?.rotateCommitLabel?30:0))+", "+(r-e.height/2-1)+")"),"TB"===V1e?(n.attr("x",r-e.width/2-10).attr("y",0),i.attr("transform","translate("+(r-e.width/2-5)+", 0)")):"BT"===V1e?(n.attr("x",r-e.width/2-10).attr("y",H1e),i.attr("transform","translate("+(r-e.width/2-5)+", "+H1e+")")):n.attr("transform","translate(-19, "+(r-e.height/2)+")")})},"drawBranches"),mfe=mt(function(e,t,r,n,i){return q1e.set(e,{pos:t,index:r}),t+(50+(i?40:0)+("TB"===V1e||"BT"===V1e?n.width/2:0))},"setBranchPosition"),yfe=mt(function(e,t,r,n){if(X1e(),M.debug("in gitgraph renderer",e+`
|
||
`,"id:",t,r),!U1e)throw new Error("GitGraph config not found");let s=U1e.rotateCommitLabel??!1,i=n.db,o=(W1e=i.getCommits(),e=i.getBranchesAsObjArray(),V1e=i.getDirection(),H(`[id="${t}"]`)),l=0;e.forEach((e,t)=>{var r=K1e(e.name),n=o.append("g"),i=n.insert("g").attr("class","branchLabel"),a=i.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());l=mfe(e.name,l,t,r,s),a.remove(),i.remove(),n.remove()}),hfe(o,W1e,!1),U1e.showBranches&&ffe(o,e),gfe(o,W1e),hfe(o,W1e,!0),eS.insertTitle(o,"gitTitleText",U1e.titleTopMargin??0,i.getDiagramTitle()),Ah(void 0,o,U1e.diagramPadding,U1e.useMaxWidth)},"draw"),vfe={draw:yfe}}),Efe=e(()=>{xfe=mt(t=>`
|
||
.commit-id,
|
||
.commit-msg,
|
||
.branch-label {
|
||
fill: lightgrey;
|
||
color: lightgrey;
|
||
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
||
font-family: var(--mermaid-font-family);
|
||
}
|
||
${[0,1,2,3,4,5,6,7].map(e=>`
|
||
.branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }
|
||
.commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }
|
||
.commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }
|
||
.label${e} { fill: ${t["git"+e]}; }
|
||
.arrow${e} { stroke: ${t["git"+e]}; }
|
||
`).join(`
|
||
`)}
|
||
|
||
.branch {
|
||
stroke-width: 1;
|
||
stroke: ${t.lineColor};
|
||
stroke-dasharray: 2;
|
||
}
|
||
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
|
||
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
|
||
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
|
||
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
|
||
.tag-hole { fill: ${t.textColor}; }
|
||
|
||
.commit-merge {
|
||
stroke: ${t.primaryColor};
|
||
fill: ${t.primaryColor};
|
||
}
|
||
.commit-reverse {
|
||
stroke: ${t.primaryColor};
|
||
fill: ${t.primaryColor};
|
||
stroke-width: 3;
|
||
}
|
||
.commit-highlight-outer {
|
||
}
|
||
.commit-highlight-inner {
|
||
stroke: ${t.primaryColor};
|
||
fill: ${t.primaryColor};
|
||
}
|
||
|
||
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
||
.gitTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
`,"getStyles"),bfe=xfe}),Cfe={};$Be(Cfe,{diagram:()=>Sfe});var Sfe,_fe,Afe,Lfe=e(()=>{kfe(),wfe(),Tfe(),Efe(),Sfe={parser:G1e,db:M1e,renderer:vfe,styles:bfe}}),Nfe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=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],n=[1,26],i=[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],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],E=[1,23],C=[1,25],S=[1,35],n={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,n,i,a,s){var o=a.length-1;switch(i){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:n.setWeekday("monday");break;case 9:n.setWeekday("tuesday");break;case 10:n.setWeekday("wednesday");break;case 11:n.setWeekday("thursday");break;case 12:n.setWeekday("friday");break;case 13:n.setWeekday("saturday");break;case 14:n.setWeekday("sunday");break;case 15:n.setWeekend("friday");break;case 16:n.setWeekend("saturday");break;case 17:n.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:n.TopAxis(),this.$=a[o].substr(8);break;case 20:n.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:n.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:n.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:n.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:n.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:n.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],n.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],null),n.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],n.setClickEvent(a[o-2],a[o],null),n.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-1],a[o]),n.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],n.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:n,13:i,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:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:S},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:n,13:i,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:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:S},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){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}}};n.lexer=i,mt(e,"Parser"),(_fe=new((e.prototype=n).Parser=e)).parser=_fe,Afe=_fe}),Ife=MBe((e,t)=>{function r(){return function(e,t,i){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,n;return this.$utils().u(e)?(r=a(this),n=this.isoWeekYear(),t=4-(n=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),4<n.isoWeekday()&&(t+=7),n=n.add(t,"day"),r.diff(n,"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(),n=!!r.u(t)||t;return"isoweek"===r.p(e)?n?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()}),Rfe=MBe((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?/,n=/\d*[^-_:/,()\s\d]+/,g={},i=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,n=g.meridiem;if(n){for(var i=1;i<=24;i+=1)if(-1<e.indexOf(n(i,0,t))){r=12<i;break}}else r=e===(t?"pm":"PM");return r},"d"),d={A:[n,function(e){this.afternoon=h(e,!1)}],a:[n,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:[n,function(e){var t=g.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],w:[r,a("week")],ww:[t,a("week")],M:[r,a("month")],MM:[t,a("month")],MMM:[n,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:[n,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=i(e)}],YYYY:[/\d{4}/,a("year")],Z:s,ZZ:s};function T(e){for(var t=e,i=g&&g.formats,h=(e=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,r){var n=r&&r.toUpperCase();return t||i[r]||o[r]||i[n].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 n=h[r],a=(s=d[n])&&s[0],s=s&&s[1];h[r]=s?{regex:a,parser:s}:n.replace(/^\[|\]$/g,"")}return function(e){for(var t,r,n,i={},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(i,l),e=e.replace(l,""))}return void 0!==(n=(t=i).afternoon)&&(r=t.hours,n?r<12&&(t.hours+=12):12===r&&(t.hours=0),delete t.afternoon),i}}return mt(T,"l"),function(e,t,d){d.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(i=e.parseTwoDigitYear);var p=(e=t.prototype).parse;e.parse=function(e){var t=e.date,r=e.utc,n=e.args,i=(this.$u=r,n[1]);if("string"==typeof i){var a=!0===n[2],s=!0===n[3],o=a||s,l=n[2];s&&(l=n[2]),g=this.$locale(),!a&&l&&(g=d.Ls[l]),this.$d=((e,t,r,n)=>{try{if(-1<["x","X"].indexOf(t))return new Date(("X"===t?1e3:1)*e);var i=T(t)(e),a=i.year,s=i.month,o=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,p=i.week,g=new Date,f=o||(a||s?1:g.getDate()),m=a||g.getFullYear(),y=0;a&&!s||(y=0<s?s-1:g.getMonth());var v,x=l||0,b=c||0,w=h||0,k=u||0;return d?new Date(Date.UTC(m,y,f,x,b,w,k+60*d.offset*1e3)):r?new Date(Date.UTC(m,y,f,x,b,w,k)):(v=new Date(m,y,f,x,b,w,k),p?n(v).week(p).toDate():v)}catch{return new Date("")}})(t,i,r,d),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),o&&t!=this.format(i)&&(this.$d=new Date("")),g={}}else if(i instanceof Array)for(var c=i.length,h=1;h<=c;h+=1){n[1]=i[h-1];var u=d.apply(this,n);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()}),Mfe=MBe((e,t)=>{function r(){return function(e,t){var a=(t=t.prototype).format;t.format=function(e){var t,r,n=this,i=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((n.$M+1)/3);case"Do":return i.ordinal(n.$D);case"gggg":return n.weekYear();case"GGGG":return n.isoWeekYear();case"wo":return i.ordinal(n.week(),"W");case"w":case"ww":return t.s(n.week(),"w"===e?1:2,"0");case"W":case"WW":return t.s(n.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return t.s(String(0===n.$H?24:n.$H),"k"===e?1:2,"0");case"X":return Math.floor(n.$d.getTime()/1e3);case"x":return n.$d.getTime();case"z":return"["+n.offsetName()+"]";case"zzz":return"["+n.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 Dfe(r,n,e){let i=!0;for(;i;)i=!1,e.forEach(function(e){var t=new RegExp("^\\s*"+e+"\\s*$");r[0].match(t)&&(n[e]=!0,r.shift(1),i=!0)})}var Ofe,Pfe,Bfe,$fe,Ffe,zfe,Gfe,Ufe,qfe,jfe,Wfe,Yfe,Hfe,Vfe,Xfe,Kfe,Zfe,Qfe,Jfe,eme,tme,rme,nme,ime,ame,sme,ome,lme,cme,hme,ume,dme,pme,gme,fme,mme,yme,vme,xme,bme,wme,kme,Tme,Eme,Cme,Sme,_me,Ame,Lme,Nme,Ime,Rme,Mme,Dme,Ome,Pme,Bme,$me,Fme,zme,Gme,Ume,qme,jme,Wme,Yme,Hme,Vme,Xme,Kme,Zme,Qme,Jme,eye,tye,rye,nye,iye,aye,sye,oye,lye=e(()=>{Ofe=ee(o6(),1),Pfe=ee(te(),1),rme=ee(Ife(),1),nme=ee(Rfe(),1),ime=ee(Mfe(),1),t(),Eu(),iS(),Tu(),Pfe.default.extend(rme.default),Pfe.default.extend(nme.default),Pfe.default.extend(ime.default),Bfe={friday:5,saturday:6},Gfe=Ffe=$fe="",Ufe=[],qfe=[],jfe=new Map,Wfe=[],Yfe=[],Vfe=Hfe="",Xfe=["active","done","crit","milestone","vert"],Qfe=Zfe=!(Kfe=[]),Jfe="sunday",eme="saturday",tme=0,rme=mt(function(){Wfe=[],Yfe=[],Kfe=[],zme=[],zfe=Fme=$me=void(Dme=0),Gfe=Vfe=Ffe=$fe=Hfe="",Ufe=[],Qfe=Zfe=!(qfe=[]),tme=0,jfe=new Map,mh(),Jfe="sunday",eme="saturday"},"clear"),nme=mt(function(e){Ffe=e},"setAxisFormat"),ime=mt(function(){return Ffe},"getAxisFormat"),ame=mt(function(e){zfe=e},"setTickInterval"),sme=mt(function(){return zfe},"getTickInterval"),ome=mt(function(e){Gfe=e},"setTodayMarker"),lme=mt(function(){return Gfe},"getTodayMarker"),cme=mt(function(e){$fe=e},"setDateFormat"),hme=mt(function(){Zfe=!0},"enableInclusiveEndDates"),ume=mt(function(){return Zfe},"endDatesAreInclusive"),dme=mt(function(){Qfe=!0},"enableTopAxis"),pme=mt(function(){return Qfe},"topAxisEnabled"),gme=mt(function(e){Vfe=e},"setDisplayMode"),fme=mt(function(){return Vfe},"getDisplayMode"),mme=mt(function(){return $fe},"getDateFormat"),yme=mt(function(e){Ufe=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),vme=mt(function(){return Ufe},"getIncludes"),xme=mt(function(e){qfe=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),bme=mt(function(){return qfe},"getExcludes"),wme=mt(function(){return jfe},"getLinks"),kme=mt(function(e){Hfe=e,Wfe.push(e)},"addSection"),Tme=mt(function(){return Wfe},"getSections"),Eme=mt(function(){let e=Wme(),t=0;for(;!e&&t<10;)e=Wme(),t++;return Yfe=zme},"getTasks"),Cme=mt(function(e,t,r,n){return!n.includes(e.format(t.trim()))&&(!((!r.includes("weekends")||e.isoWeekday()!==Bfe[eme]&&e.isoWeekday()!==Bfe[eme]+1)&&!r.includes(e.format("dddd").toLowerCase()))||r.includes(e.format(t.trim())))},"isInvalidDate"),Sme=mt(function(e){Jfe=e},"setWeekday"),_me=mt(function(){return Jfe},"getWeekday"),Ame=mt(function(e){eme=e},"setWeekend"),Lme=mt(function(t,r,n,i){if(n.length&&!t.manualEndTime){let e;e=(e=t.startTime instanceof Date?(0,Pfe.default)(t.startTime):(0,Pfe.default)(t.startTime,r,!0)).add(1,"d");var a=t.endTime instanceof Date?(0,Pfe.default)(t.endTime):(0,Pfe.default)(t.endTime,r,!0),[r,n]=Nme(e,a,r,n,i);t.endTime=r.toDate(),t.renderEndTime=n}},"checkTaskDates"),Nme=mt(function(e,t,r,n,i){let a=!1,s=null;for(;e<=t;)a||(s=t.toDate()),(a=Cme(e,r,n,i))&&(t=t.add(1,"d")),e=e.add(1,"d");return[t,s]},"fixTaskDates"),Ime=mt(function(e,t,r){r=r.trim();var n=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==n){let e=null;for(var i of n.groups.ids.split(" "))void 0!==(i=qme(i))&&(!e||i.endTime>e.endTime)&&(e=i);return e?e.endTime:((n=new Date).setHours(0,0,0,0),n)}if((n=(0,Pfe.default)(r,t.trim(),!0)).isValid())return n.toDate();if(M.debug("Invalid date:"+r),M.debug("With date format:"+t.trim()),void 0===(n=new Date(r))||isNaN(n.getTime())||n.getFullYear()<-1e4||1e4<n.getFullYear())throw new Error("Invalid date:"+r);return n},"getStartDate"),Rme=mt(function(e){return null!==(e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim()))?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),Mme=mt(function(e,t,r,n=!1){r=r.trim();var i=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==i){let e=null;for(var a of i.groups.ids.split(" "))void 0!==(a=qme(a))&&(!e||a.startTime<e.startTime)&&(e=a);return e?e.startTime:((i=new Date).setHours(0,0,0,0),i)}let s=(0,Pfe.default)(r,t.trim(),!0);if(s.isValid())return(s=n?s.add(1,"d"):s).toDate();let o=(0,Pfe.default)(e),[l,c]=Rme(r);return Number.isNaN(l)||(i=o.add(l,c)).isValid()&&(o=i),o.toDate()},"getEndDate"),Dme=0,Ome=mt(function(e){return void 0===e?"task"+(Dme+=1):e},"parseId"),Pme=mt(function(e,t){var r=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),n={};Dfe(r,n,Xfe);for(let e=0;e<r.length;e++)r[e]=r[e].trim();let i="";switch(r.length){case 1:n.id=Ome(),n.startTime=e.endTime,i=r[0];break;case 2:n.id=Ome(),n.startTime=Ime(void 0,$fe,r[0]),i=r[1];break;case 3:n.id=Ome(r[0]),n.startTime=Ime(void 0,$fe,r[1]),i=r[2]}return i&&(n.endTime=Mme(n.startTime,$fe,i,Zfe),n.manualEndTime=(0,Pfe.default)(i,"YYYY-MM-DD",!0).isValid(),Lme(n,$fe,qfe,Ufe)),n},"compileData"),Bme=mt(function(e,t){var r=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),n={};Dfe(r,n,Xfe);for(let e=0;e<r.length;e++)r[e]=r[e].trim();switch(r.length){case 1:n.id=Ome(),n.startTime={type:"prevTaskEnd",id:e},n.endTime={data:r[0]};break;case 2:n.id=Ome(),n.startTime={type:"getStartDate",startData:r[0]},n.endTime={data:r[1]};break;case 3:n.id=Ome(r[0]),n.startTime={type:"getStartDate",startData:r[1]},n.endTime={data:r[2]}}return n},"parseData"),zme=[],Gme={},Ume=mt(function(e,t){e={section:Hfe,type:Hfe,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},t=Bme(Fme,t),e.raw.startTime=t.startTime,e.raw.endTime=t.endTime,e.id=t.id,e.prevTaskId=Fme,e.active=t.active,e.done=t.done,e.crit=t.crit,e.milestone=t.milestone,e.vert=t.vert,e.order=tme,tme++,t=zme.push(e),Gme[Fme=e.id]=t-1},"addTask"),qme=mt(function(e){return zme[Gme[e]]},"findTaskById"),jme=mt(function(e,t){e={section:Hfe,type:Hfe,description:e,task:e,classes:[]},t=Pme($me,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,$me=e,Yfe.push(e)},"addTaskOrg"),Wme=mt(function(){let e=mt(function(e){var t=zme[e];switch(zme[e].raw.startTime.type){case"prevTaskEnd":var r=qme(t.prevTaskId);t.startTime=r.endTime;break;case"getStartDate":(r=Ime(void 0,$fe,zme[e].raw.startTime.startData))&&(zme[e].startTime=r)}return zme[e].startTime&&(zme[e].endTime=Mme(zme[e].startTime,$fe,zme[e].raw.endTime.data,Zfe),zme[e].endTime)&&(zme[e].processed=!0,zme[e].manualEndTime=(0,Pfe.default)(zme[e].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Lme(zme[e],$fe,qfe,Ufe)),zme[e].processed},"compileTask"),t=!0;for(var[r,n]of zme.entries())e(r),t=t&&n.processed;return t},"compileTasks"),Yme=mt(function(e,t){let r=t;"loose"!==D().securityLevel&&(r=(0,Ofe.sanitizeUrl)(t)),e.split(",").forEach(function(e){void 0!==qme(e)&&(Xme(e,()=>{window.open(r,"_self")}),jfe.set(e,r))}),Hme(e,"clickable")},"setLink"),Hme=mt(function(e,t){e.split(",").forEach(function(e){void 0!==(e=qme(e))&&e.classes.push(t)})},"setClass"),Vme=mt(function(e,t,n){if("loose"===D().securityLevel&&void 0!==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(e),void 0!==qme(e)&&Xme(e,()=>{eS.runFunc(t,...r)})}},"setClickFun"),Xme=mt(function(t,r){Kfe.push(function(){var e=document.querySelector(`[id="${t}"]`);null!==e&&e.addEventListener("click",function(){r()})},function(){var e=document.querySelector(`[id="${t}-text"]`);null!==e&&e.addEventListener("click",function(){r()})})},"pushFun"),Kme=mt(function(e,t,r){e.split(",").forEach(function(e){Vme(e,t,r)}),Hme(e,"clickable")},"setClickEvent"),Zme=mt(function(t){Kfe.forEach(function(e){e(t)})},"bindFunctions"),Qme={getConfig:mt(()=>D().gantt,"getConfig"),clear:rme,setDateFormat:cme,getDateFormat:mme,enableInclusiveEndDates:hme,endDatesAreInclusive:ume,enableTopAxis:dme,topAxisEnabled:pme,setAxisFormat:nme,getAxisFormat:ime,setTickInterval:ame,getTickInterval:sme,setTodayMarker:ome,getTodayMarker:lme,setAccTitle:yh,getAccTitle:vh,setDiagramTitle:wh,getDiagramTitle:kh,setDisplayMode:gme,getDisplayMode:fme,setAccDescription:xh,getAccDescription:bh,addSection:kme,getSections:Tme,getTasks:Eme,addTask:Ume,findTaskById:qme,addTaskOrg:jme,setIncludes:yme,getIncludes:vme,setExcludes:xme,getExcludes:bme,setClickEvent:Kme,setLink:Yme,getLinks:wme,bindFunctions:Zme,parseDuration:Rme,isInvalidDate:Cme,setWeekday:Sme,getWeekday:_me,setWeekend:Ame},mt(Dfe,"getTaskTags")}),cye=e(()=>{Jme=ee(te(),1),t(),a6(),lh(),Eu(),ch(),eye=mt(function(){M.debug("Something is calling, setConf, remove the call")},"setConf"),tye={monday:ub,tuesday:db,wednesday:pb,thursday:gb,friday:fb,saturday:mb,sunday:hb},rye=mt((e,t)=>{let r=[...e].map(()=>-1/0),n=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),i=0;for(var a of n)for(let e=0;e<r.length;e++)if(a.startTime>=r[e]){r[e]=a.endTime,a.order=e+t,e>i&&(i=e);break}return i},"getMaxIntersections"),iye=mt(function(e,l,t,d){let p=D().gantt,r=D().securityLevel,n,i=("sandbox"===r&&(n=H("#i"+l)),H("sandbox"===r?n.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?n.nodes()[0].contentDocument:document,a=s.getElementById(l),u=(void 0===(nye=a.parentElement.offsetWidth)&&(nye=1200),void 0!==p.useWidth&&(nye=p.useWidth),d.db.getTasks()),g=[];for(var o of u)g.push(o.type);g=A(g);let c={},h=2*p.topPadding;if("compact"===d.db.getDisplayMode()||"compact"===p.displayMode){var f,m,y={};for(f of u)void 0===y[f.section]?y[f.section]=[f]:y[f.section].push(f);let e=0;for(m of Object.keys(y)){var v=rye(y[m],e)+1;e+=v,h+=v*(p.barHeight+p.barGap),c[m]=v}}else{h+=u.length*(p.barHeight+p.barGap);for(let t of g)c[t]=u.filter(e=>e.type===t).length}a.setAttribute("viewBox","0 0 "+nye+" "+h);let x=i.select(`[id="${l}"]`),b=g5().domain([ed(u,function(e){return e.startTime}),Qu(u,function(e){return e.endTime})]).rangeRound([0,nye-p.leftPadding-p.rightPadding]);function w(e,t){let r=e.startTime,n=t.startTime,i=0;return n<r?i=1:r<n&&(i=-1),i}function k(e,t,r){var n=p.barHeight,i=n+p.barGap,a=p.topPadding,s=p.leftPadding;zx().domain([0,g.length]).range(["#00B9FA","#F95002"]).interpolate(Ef),E(i,a,s,0,r,e,d.db.getExcludes(),d.db.getIncludes()),C(s,a,0,r),T(e,i,a,s,n,0,t),S(i,a),_(s,0,0,r)}function T(e,r,n,i,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));x.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(e,t){return e.order*r+n-2}).attr("width",function(){return h-p.rightPadding/2}).attr("height",r).attr("class",function(e){for(var[t,r]of g.entries())if(e.type===r)return"section section"+t%p.numberSectionStyles;return"section section0"}).enter();let s=x.append("g").selectAll("rect").data(e).enter(),o=d.db.getLinks();if(s.append("rect").attr("id",function(e){return e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?b(e.startTime)+i+.5*(b(e.endTime)-b(e.startTime))-.5*c:b(e.startTime)+i}).attr("y",function(e,t){return t=e.order,e.vert?p.gridLineStartPadding:t*r+n}).attr("width",function(e){return e.milestone?c:e.vert?.08*c:b(e.renderEndTime||e.endTime)-b(e.startTime)}).attr("height",function(e){return e.vert?u.length*(p.barHeight+p.barGap)+2*p.barHeight:c}).attr("transform-origin",function(e,t){return t=e.order,(b(e.startTime)+i+.5*(b(e.endTime)-b(e.startTime))).toString()+"px "+(t*r+n+.5*c).toString()+"px"}).attr("class",function(e){let t="",r=(0<e.classes.length&&(t=e.classes.join(" ")),0);for(var[n,i]of g.entries())e.type===i&&(r=n%p.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 e.id+"-text"}).text(function(e){return e.task}).attr("font-size",p.fontSize).attr("x",function(e){let t=b(e.startTime),r=b(e.renderEndTime||e.endTime);return e.milestone&&(t+=.5*(b(e.endTime)-b(e.startTime))-.5*c,r=t+c),e.vert?b(e.startTime)+i:(e=this.getBBox().width)>r-t?r+e+1.5*p.leftPadding>h?t+i-5:r+i+5:(r-t)/2+t+i}).attr("y",function(e,t){return e.vert?p.gridLineStartPadding+u.length*(p.barHeight+p.barGap)+60:e.order*r+p.barHeight/2+(p.fontSize/2-2)+n}).attr("text-height",c).attr("class",function(e){let t=b(e.startTime),r=b(e.endTime),n=(e.milestone&&(r=t+c),this.getBBox().width),i="",a=(0<e.classes.length&&(i=e.classes.join(" ")),0);for(var[s,o]of g.entries())e.type===o&&(a=s%p.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"),n>r-t?r+n+1.5*p.leftPadding>h?i+" taskTextOutsideLeft taskTextOutside"+a+" "+l:i+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+n:i+" taskText taskText"+a+" "+l+" width-"+n}),"sandbox"===D().securityLevel){let a=H("#i"+l).nodes()[0].contentDocument;s.filter(function(e){return o.has(e.id)}).each(function(e){var t=a.querySelector("#"+e.id),r=a.querySelector("#"+e.id+"-text"),n=t.parentNode,i=a.createElement("a");i.setAttribute("xlink:href",o.get(e.id)),i.setAttribute("target","_top"),n.appendChild(i),i.appendChild(t),i.appendChild(r)})}}function E(s,o,l,e,c,t,h,u){if(0!==h.length||0!==u.length){let i,a;for(var{startTime:r,endTime:n}of t)(void 0===i||r<i)&&(i=r),(void 0===a||n>a)&&(a=n);if(i&&a)if(5<(0,Jme.default)(a).diff((0,Jme.default)(i),"year"))M.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=d.db.getDateFormat(),t=[],r=null,n=(0,Jme.default)(i);for(;n.valueOf()<=a;)d.db.isInvalidDate(n,e,h,u)?r?r.end=n:r={start:n,end:n}:r&&(t.push(r),r=null),n=n.add(1,"d");x.append("g").selectAll("rect").data(t).enter().append("rect").attr("id",function(e){return"exclude-"+e.start.format("YYYY-MM-DD")}).attr("x",function(e){return b(e.start)+l}).attr("y",p.gridLineStartPadding).attr("width",function(e){var t=e.end.add(1,"day");return b(t)-b(e.start)}).attr("height",c-o-p.gridLineStartPadding).attr("transform-origin",function(e,t){return(b(e.start)+l+.5*(b(e.end)-b(e.start))).toString()+"px "+(t*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function C(e,t,r,n){var i=gd(b).tickSize(-n+t+p.gridLineStartPadding).tickFormat(l5(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d")),a=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(d.db.getTickInterval()||p.tickInterval);if(null!==a){var s=a[1],o=a[2],l=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":i.ticks(Hx.every(s));break;case"second":i.ticks(Vx.every(s));break;case"minute":i.ticks(Xx.every(s));break;case"hour":i.ticks(Zx.every(s));break;case"day":i.ticks(Jx.every(s));break;case"week":i.ticks(tye[l].every(s));break;case"month":i.ticks(Eb.every(s))}}if(x.append("g").attr("class","grid").attr("transform","translate("+e+", "+(n-50)+")").call(i).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),d.db.topAxisEnabled()||p.topAxis){var c=pd(b).tickSize(-n+t+p.gridLineStartPadding).tickFormat(l5(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d"));if(null!==a){var h=a[1],o=a[2],u=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":c.ticks(Hx.every(h));break;case"second":c.ticks(Vx.every(h));break;case"minute":c.ticks(Xx.every(h));break;case"hour":c.ticks(Zx.every(h));break;case"day":c.ticks(Jx.every(h));break;case"week":c.ticks(tye[u].every(h));break;case"month":c.ticks(Eb.every(h))}}x.append("g").attr("class","grid").attr("transform","translate("+e+", "+t+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function S(r,n){let i=0,a=Object.keys(c).map(e=>[e,c[e]]);x.append("g").selectAll("text").data(a).enter().append(function(e){var t,r,n=-((e=e[0].split(L.lineBreakRegex)).length-1)/2,i=s.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"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,i.appendChild(a)}return i}).attr("x",10).attr("y",function(e,t){return 0<t?(i+=a[t-1][1],e[1]*r/2+i*r+n):e[1]*r/2+n}).attr("font-size",p.sectionFontSize).attr("class",function(e){for(var[t,r]of g.entries())if(e[0]===r)return"sectionTitle sectionTitle"+t%p.numberSectionStyles;return"sectionTitle"})}function _(e,t,r,n){var i,a,s=d.db.getTodayMarker();"off"!==s&&(a=x.append("g").attr("class","today"),i=new Date,(a=a.append("line")).attr("x1",b(i)+e).attr("x2",b(i)+e).attr("y1",p.titleTopMargin).attr("y2",n-p.titleTopMargin).attr("class","today"),""!==s)&&a.attr("style",s.replace(/,/g,";"))}function A(r){var n={},i=[];for(let e=0,t=r.length;e<t;++e)Object.prototype.hasOwnProperty.call(n,r[e])||(n[r[e]]=!0,i.push(r[e]));return i}mt(w,"taskCompare"),u.sort(w),k(u,nye,h),rh(x,h,nye,p.useMaxWidth),x.append("text").text(d.db.getDiagramTitle()).attr("x",nye/2).attr("y",p.titleTopMargin).attr("class","titleText"),mt(k,"makeGantt"),mt(T,"drawRects"),mt(E,"drawExcludeDays"),mt(C,"makeGrid"),mt(S,"vertLabels"),mt(_,"drawToday"),mt(A,"checkUnique")},"draw"),aye={setConf:eye,draw:iye}}),hye=e(()=>{sye=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;
|
||
}
|
||
|
||
|
||
/* 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;
|
||
}
|
||
|
||
.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"),oye=sye}),uye={};$Be(uye,{diagram:()=>dye});var dye,pye,gye,fye,mye,yye,vye,xye,bye,wye=e(()=>{Nfe(),lye(),cye(),hye(),dye={parser:Afe,db:Qme,renderer:aye,styles:oye}}),kye=e(()=>{n1e(),t(),pye={parse:mt(async e=>{e=await Jge("info",e),M.debug(e)},"parse")}}),Tye=e(()=>{gye={name:"mermaid",version:"11.9.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.0.0",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}}),Eye=e(()=>{Tye(),fye={version:gye.version+""},mye=mt(()=>fye.version,"getVersion"),yye={getVersion:mye}}),Cye=e(()=>{a6(),Eu(),vye=mt(e=>{let t=D().securityLevel,r=H("body"),n;return"sandbox"===t&&(n=H("#i"+e).node()?.contentDocument??document,r=H(n.body)),r.select("#"+e)},"selectSvgElement")}),Sye=e(()=>{t(),Cye(),ch(),xye=mt((e,t,r)=>{M.debug(`rendering info diagram
|
||
`+e),e=vye(t),rh(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"),bye={draw:xye}}),_ye={};$Be(_ye,{diagram:()=>Aye});var Aye,Lye,Nye,Iye,Rye,Mye,Dye,Oye,Pye,Bye,$ye,Fye,zye,Gye,Uye,qye,jye,Wye,Yye,Hye=e(()=>{kye(),Eye(),Sye(),Aye={parser:pye,db:yye,renderer:bye}}),Vye=e(()=>{t(),Tu(),An(),Mye=yr.pie,Lye={sections:new Map,showData:!1,config:Mye},Nye=Lye.sections,Iye=Lye.showData,Rye=structuredClone(Mye),Mye=mt(()=>structuredClone(Rye),"getConfig"),Dye=mt(()=>{Nye=new Map,Iye=Lye.showData,mh()},"clear"),Oye=mt(({label:e,value:t})=>{Nye.has(e)||(Nye.set(e,t),M.debug(`added new section: ${e}, with value: `+t))},"addSection"),Pye=mt(()=>Nye,"getSections"),Bye=mt(e=>{Iye=e},"setShowData"),$ye=mt(()=>Iye,"getShowData"),Fye={getConfig:Mye,clear:Dye,setDiagramTitle:wh,getDiagramTitle:kh,setAccTitle:yh,getAccTitle:vh,setAccDescription:xh,getAccDescription:bh,addSection:Oye,getSections:Pye,setShowData:Bye,getShowData:$ye}}),Xye=e(()=>{n1e(),t(),o1e(),Vye(),zye=mt((e,t)=>{i1e(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),Gye={parse:mt(async e=>{e=await Jge("pie",e),M.debug(e),zye(e,Fye)},"parse")}}),Kye=e(()=>{Uye=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"),qye=Uye}),Zye=e(()=>{a6(),Eu(),t(),Cye(),ch(),iS(),jye=mt(e=>(e=[...e.entries()].map(e=>({label:e[0],value:e[1]})).sort((e,t)=>t.value-e.value),c3().value(e=>e.value)(e)),"createPieArcs"),Wye=mt((e,t,r,n)=>{M.debug(`rendering pie chart
|
||
`+e);let i=n.db,a=D(),s=_C(i.getConfig(),a.pie),o=vye(t),l=o.append("g");l.attr("transform","translate(225,225)");var e=a.themeVariables,[n]=JC(e.pieOuterStrokeWidth);n??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=H5().innerRadius(0).outerRadius(h),d=H5().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+n/2).attr("class","pieOuterCircle"),i.getSections()),g=jye(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=vx(f),y=(l.selectAll("mySlices").data(g).enter().append("path").attr("d",u).attr("fill",e=>m(e.data.label)).attr("class","pieCircle"),0);p.forEach(e=>{y+=e}),l.selectAll("mySlices").data(g).enter().append("text").text(e=>(e.data.value/y*100).toFixed(0)+"%").attr("transform",e=>"translate("+d.centroid(e)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),(t=l.selectAll(".legend").data(m.domain()).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*m.domain().length/2)+")")).append("rect").attr("width",18).attr("height",18).style("fill",m).style("stroke",m),t.data(g).append("text").attr("x",22).attr("y",14).text(e=>{var{label:e,value:t}=e.data;return i.getShowData()?e+` [${t}]`:e}),e=512+(n=Math.max(...t.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0))),o.attr("viewBox",`0 0 ${e} 450`),rh(o,450,e,s.useMaxWidth)},"draw"),Yye={draw:Wye}}),Qye={};$Be(Qye,{diagram:()=>Jye});var Jye,e2e,t2e,r2e,n2e,i2e=e(()=>{Xye(),Vye(),Kye(),Zye(),Jye={parser:Gye,db:Fye,renderer:Yye,styles:qye}}),a2e=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],s=[1,7],P=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],B=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[55,56,57],$=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],F=[1,14],z=[1,23],G=[1,18],U=[1,19],q=[1,20],j=[1,21],W=[1,22],Y=[1,24],H=[1,25],V=[1,26],X=[1,27],K=[1,28],Z=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],x=[1,42],b=[1,44],w=[1,62],k=[1,61],T=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],J=[1,66],ee=[1,67],te=[1,68],re=[1,69],ne=[1,70],ie=[1,71],ae=[1,72],se=[1,73],oe=[1,74],le=[1,75],ce=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],C=[1,90],S=[1,91],_=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],R=[1,95],M=[1,97],D=[1,98],he=[1,102],ue=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){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],n.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),n.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 46:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:n.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:n.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:n.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:n.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:n.setXAxisLeftText(a[o-2]),n.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",n.setXAxisLeftText(a[o-1]);break;case 53:n.setXAxisLeftText(a[o]);break;case 54:n.setYAxisBottomText(a[o-2]),n.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",n.setYAxisBottomText(a[o-1]);break;case 56:n.setYAxisBottomText(a[o]);break;case 57:n.setQuadrant1Text(a[o]);break;case 58:n.setQuadrant2Text(a[o]);break;case 59:n.setQuadrant3Text(a[o]);break;case 60:n.setQuadrant4Text(a[o]);break;case 64:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 66:this.$={text:a[o],type:"text"};break;case 67:this.$={text:a[o],type:"markdown"};break;case 68:this.$=a[o];break;case 69:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[{18:r,26:1,27:2,28:n,55:i,56:a,57:s},{1:[3]},{18:r,26:8,27:2,28:n,55:i,56:a,57:s},{18:r,26:9,27:2,28:n,55:i,56:a,57:s},t(P,[2,33],{29:10}),t(B,[2,61]),t(B,[2,62]),t(B,[2,63]),{1:[2,30]},{1:[2,31]},t(o,$,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:l,5:c,10:h,12:u,13:d,14:p,18:F,25:z,35:G,37:U,39:q,41:j,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(P,[2,34]),{27:45,55:i,56:a,57:s},t(o,[2,37]),t(o,$,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:l,5:c,10:h,12:u,13:d,14:p,18:F,25:z,35:G,37:U,39:q,41:j,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(o,[2,39]),t(o,[2,40]),t(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(o,[2,45]),t(o,[2,46]),{18:[1,50]},{4:l,5:c,10:h,12:u,13:d,14:p,43:51,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,44:[1,57],47:[1,58],58:60,59:59,63:m,64:y,65:v,66:x,67:b},t(T,[2,64]),t(T,[2,66]),t(T,[2,67]),t(T,[2,70]),t(T,[2,71]),t(T,[2,72]),t(T,[2,73]),t(T,[2,74]),t(T,[2,75]),t(T,[2,76]),t(T,[2,77]),t(T,[2,78]),t(T,[2,79]),t(T,[2,80]),t(P,[2,35]),t(o,[2,38]),t(o,[2,42]),t(o,[2,43]),t(o,[2,44]),{3:64,4:Q,5:J,6:ee,7:te,8:re,9:ne,10:ie,11:ae,12:se,13:oe,14:le,15:ce,21:63},t(o,[2,53],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,77],63:m,64:y,65:v,66:x,67:b}),t(o,[2,56],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,78],63:m,64:y,65:v,66:x,67:b}),t(o,[2,57],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,58],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,59],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,60],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),{45:[1,79]},{44:[1,80]},t(T,[2,65]),t(T,[2,81]),t(T,[2,82]),t(T,[2,83]),{3:82,4:Q,5:J,6:ee,7:te,8:re,9:ne,10:ie,11:ae,12:se,13:oe,14:le,15:ce,18:[1,81]},t(E,[2,23]),t(E,[2,1]),t(E,[2,2]),t(E,[2,3]),t(E,[2,4]),t(E,[2,5]),t(E,[2,6]),t(E,[2,7]),t(E,[2,8]),t(E,[2,9]),t(E,[2,10]),t(E,[2,11]),t(E,[2,12]),t(o,[2,52],{58:31,43:83,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(o,[2,55],{58:31,43:84,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),{46:[1,85]},{45:[1,86]},{4:C,5:S,6:_,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:88,23:87},t(E,[2,24]),t(o,[2,51],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,54],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,47],{22:88,16:89,23:100,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{46:[1,101]},t(o,[2,29],{10:he}),t(ue,[2,27],{16:103,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),t(O,[2,25]),t(O,[2,13]),t(O,[2,14]),t(O,[2,15]),t(O,[2,16]),t(O,[2,17]),t(O,[2,18]),t(O,[2,19]),t(O,[2,20]),t(O,[2,21]),t(O,[2,22]),t(o,[2,49],{10:he}),t(o,[2,48],{22:88,16:89,23:104,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{4:C,5:S,6:_,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:105},t(O,[2,26]),t(o,[2,50],{10:he}),t(ue,[2,28],{16:103,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D})],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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){switch(r){case 0:case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=n,mt(e,"Parser"),(e2e=new((e.prototype=r).Parser=e)).parser=e2e,t2e=e2e}),s2e=e(()=>{a6(),An(),t(),Tn(),r2e=or(),n2e=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:yr.quadrantChart?.chartWidth||500,chartWidth:yr.quadrantChart?.chartHeight||500,titlePadding:yr.quadrantChart?.titlePadding||10,titleFontSize:yr.quadrantChart?.titleFontSize||20,quadrantPadding:yr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:yr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:yr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:yr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:yr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:yr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:yr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:yr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:yr.quadrantChart?.pointLabelFontSize||12,pointRadius:yr.quadrantChart?.pointRadius||5,xAxisPosition:yr.quadrantChart?.xAxisPosition||"top",yAxisPosition:yr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:yr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:yr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:r2e.quadrant1Fill,quadrant2Fill:r2e.quadrant2Fill,quadrant3Fill:r2e.quadrant3Fill,quadrant4Fill:r2e.quadrant4Fill,quadrant1TextFill:r2e.quadrant1TextFill,quadrant2TextFill:r2e.quadrant2TextFill,quadrant3TextFill:r2e.quadrant3TextFill,quadrant4TextFill:r2e.quadrant4TextFill,quadrantPointFill:r2e.quadrantPointFill,quadrantPointTextFill:r2e.quadrantPointTextFill,quadrantXAxisTextFill:r2e.quadrantXAxisTextFill,quadrantYAxisTextFill:r2e.quadrantYAxisTextFill,quadrantTitleFill:r2e.quadrantTitleFill,quadrantInternalBorderStrokeFill:r2e.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:r2e.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,M.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){M.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){M.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,r,n){var i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,e={top:"top"===e&&t?i:0,bottom:"bottom"===e&&t?i:0},t=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,i={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:n?r:0},n=this.config.quadrantPadding+i.left,r=this.config.quadrantPadding+e.top+t.top,a=this.config.chartWidth-2*this.config.quadrantPadding-i.left-i.right,s=this.config.chartHeight-2*this.config.quadrantPadding-e.top-e.bottom-t.top;return{xAxisSpace:e,yAxisSpace:i,titleSpace:t,quadrantSpace:{quadrantLeft:n,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(e,t,r,n){var{quadrantSpace:n,titleSpace:i}=n,{quadrantHalfHeight:n,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:c}=n,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+i.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+i.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?n/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+n-(u?n/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(e){var t,{quadrantHalfHeight:e,quadrantLeft:r,quadrantHalfWidth:n,quadrantTop:i}=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+n,y:i,width:n,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:i,width:n,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:i+e,width:n,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+n,y:i+e,width:n,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:n,quadrantTop:i,quadrantWidth:a}=t,s=zx().domain([0,1]).range([n,a+n]),o=zx().domain([0,1]).range([r+i,i]);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:n,quadrantHalfWidth:i,quadrantTop:a,quadrantWidth:s}=e=e.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-t,y1:a,x2:n+s+t,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+s,y1:a+t,x2:n+s,y2:a+r-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-t,y1:a+r,x2:n+s+t,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n,y1:a+t,x2:n,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+i,y1:a+t,x2:n+i,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+t,y1:a+e,x2:n+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,n=0<this.data.points.length?"bottom":this.config.xAxisPosition,i=this.calculateSpace(n,e,t,r);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(n,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(r)}}}});function o2e(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function l2e(e){return!/^\d+$/.test(e)}function c2e(e){return!/^\d+px$/.test(e)}var h2e,u2e=e(()=>{h2e=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(o2e,"validateHexCode"),mt(l2e,"validateNumber"),mt(c2e,"validateSizeInPixels")});function d2e(e){return Oc(e.trim(),_2e)}function p2e(e){A2e.setData({quadrant1Text:d2e(e.text)})}function g2e(e){A2e.setData({quadrant2Text:d2e(e.text)})}function f2e(e){A2e.setData({quadrant3Text:d2e(e.text)})}function m2e(e){A2e.setData({quadrant4Text:d2e(e.text)})}function y2e(e){A2e.setData({xAxisLeftText:d2e(e.text)})}function v2e(e){A2e.setData({xAxisRightText:d2e(e.text)})}function x2e(e){A2e.setData({yAxisTopText:d2e(e.text)})}function b2e(e){A2e.setData({yAxisBottomText:d2e(e.text)})}function w2e(e){var t,r={};for(t of e){var[n,i]=t.trim().split(/\s*:\s*/);if("radius"===n){if(l2e(i))throw new h2e(n,i,"number");r.radius=parseInt(i)}else if("color"===n){if(o2e(i))throw new h2e(n,i,"hex code");r.color=i}else if("stroke-color"===n){if(o2e(i))throw new h2e(n,i,"hex code");r.strokeColor=i}else{if("stroke-width"!==n)throw new Error(`style named ${n} is not supported.`);if(c2e(i))throw new h2e(n,i,"number of pixels (eg. 10px)");r.strokeWidth=i}}return r}function k2e(e,t,r,n,i){i=w2e(i),A2e.addPoints([{x:r,y:n,text:d2e(e.text),className:t,...i}])}function T2e(e,t){A2e.addClass(e,w2e(t))}function E2e(e){A2e.setConfig({chartWidth:e})}function C2e(e){A2e.setConfig({chartHeight:e})}function S2e(){var{themeVariables:e,quadrantChart:t}=D();return t&&A2e.setConfig(t),A2e.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}),A2e.setData({titleText:kh()}),A2e.build()}var _2e,A2e,L2e,N2e,I2e,R2e,M2e=e(()=>{Eu(),lh(),Tu(),s2e(),u2e(),_2e=D(),mt(d2e,"textSanitizer"),A2e=new n2e,mt(p2e,"setQuadrant1Text"),mt(g2e,"setQuadrant2Text"),mt(f2e,"setQuadrant3Text"),mt(m2e,"setQuadrant4Text"),mt(y2e,"setXAxisLeftText"),mt(v2e,"setXAxisRightText"),mt(x2e,"setYAxisTopText"),mt(b2e,"setYAxisBottomText"),mt(w2e,"parseStyles"),mt(k2e,"addPoint"),mt(T2e,"addClass"),mt(E2e,"setWidth"),mt(C2e,"setHeight"),mt(S2e,"getQuadrantData"),L2e=mt(function(){A2e.clear(),mh()},"clear"),N2e={setWidth:E2e,setHeight:C2e,setQuadrant1Text:p2e,setQuadrant2Text:g2e,setQuadrant3Text:f2e,setQuadrant4Text:m2e,setXAxisLeftText:y2e,setXAxisRightText:v2e,setYAxisTopText:x2e,setYAxisBottomText:b2e,parseStyles:w2e,addPoint:k2e,addClass:T2e,getQuadrantData:S2e,clear:L2e,setAccTitle:yh,getAccTitle:vh,setDiagramTitle:wh,getDiagramTitle:kh,getAccDescription:bh,setAccDescription:xh}}),D2e=e(()=>{a6(),Eu(),t(),ch(),I2e=mt((e,t,r,n)=>{function i(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(i,"getDominantBaseLine"),mt(a,"getTextAnchor"),mt(s,"getTransformation");var o=D();M.debug(`Rendering quadrant chart
|
||
`+e);let l=o.securityLevel,c;"sandbox"===l&&(c=H("#i"+t));var t=(e=H("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=(rh(e,u,h,o.quadrantChart?.useMaxWidth??!0),e.attr("viewBox","0 0 "+h+" "+u),n.db.setHeight(u),n.db.setWidth(h),n.db.getQuadrantData()),e=t.append("g").attr("class","quadrants"),u=t.append("g").attr("class","border"),h=t.append("g").attr("class","data-points"),n=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",i(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=>i(e.text.horizontalPos)).attr("text-anchor",e=>a(e.text.verticalPos)).attr("transform",e=>s(e.text)).text(e=>e.text.text),n.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=>i(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=>i(e.text.horizontalPos)).attr("text-anchor",e=>a(e.text.verticalPos)).attr("transform",e=>s(e.text))},"draw"),R2e={draw:I2e}}),O2e={};$Be(O2e,{diagram:()=>P2e});var P2e,B2e,$2e,F2e=e(()=>{a2e(),M2e(),D2e(),P2e={parser:t2e,db:N2e,renderer:R2e,styles:mt(()=>"","styles")}}),z2e=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,10,12,14,16,18,19,21,23],n=[2,6],i=[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],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],E=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],n={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,n,i,a,s){var o=a.length-1;switch(i){case 5:n.setOrientation(a[o]);break;case 9:n.setDiagramTitle(a[o].text.trim());break;case 12:n.setLineData({text:"",type:"text"},a[o]);break;case 13:n.setLineData(a[o-1],a[o]);break;case 14:n.setBarData({text:"",type:"text"},a[o]);break;case 15:n.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),n.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:n.setXAxisTitle(a[o]);break;case 23:n.setXAxisTitle(a[o-1]);break;case 24:n.setXAxisTitle({type:"text",text:""});break;case 25:n.setXAxisBand(a[o]);break;case 26:n.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:n.setYAxisTitle(a[o]);break;case 31:n.setYAxisTitle(a[o-1]);break;case 32:n.setYAxisTitle({type:"text",text:""});break;case 33:n.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,n,{3:1,4:2,7:4,5:i,34:a,35:s,36:o}),{1:[3]},t(r,n,{4:2,7:4,3:8,5:i,34:a,35:s,36:o}),t(r,n,{4:2,7:4,6:9,3:10,5:i,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,n,{4:2,7:4,3:21,5:i,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:x,50:b},{11:39,13:38,24:w,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:x,50:b},{11:45,15:44,27:T,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:x,50:b},{11:49,17:48,24:E,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:x,50:b},{11:52,17:51,24:E,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:x,50:b},{20:[1,53]},{22:[1,54]},t(C,[2,18]),{1:[2,2]},t(C,[2,8]),t(C,[2,9]),t(S,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),t(S,[2,38]),t(S,[2,39]),t(_,[2,40]),t(_,[2,42]),t(_,[2,43]),t(_,[2,44]),t(_,[2,45]),t(_,[2,46]),t(_,[2,47]),t(_,[2,48]),t(_,[2,49]),t(_,[2,50]),t(_,[2,51]),t(C,[2,10]),t(C,[2,22],{30:41,29:56,24:w,27:k}),t(C,[2,24]),t(C,[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:x,50:b},t(C,[2,11]),t(C,[2,30],{33:60,27:T}),t(C,[2,32]),{31:[1,61]},t(C,[2,12]),{17:62,24:E},{25:63,27:A},t(C,[2,14]),{17:65,24:E},t(C,[2,16]),t(C,[2,17]),t(_,[2,41]),t(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(C,[2,31]),{27:[1,69]},t(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(C,[2,15]),t(C,[2,26]),t(C,[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:x,50:b},t(C,[2,33]),t(C,[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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){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:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45: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,/^(?:(?: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,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],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:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};n.lexer=i,mt(e,"Parser"),(B2e=new((e.prototype=n).Parser=e)).parser=B2e,$2e=B2e});function G2e(e){return"bar"===e.type}function U2e(e){return"band"===e.type}function q2e(e){return"linear"===e.type}var j2e,W2e,Y2e,H2e,V2e=e(()=>{mt(G2e,"isBarPlot"),mt(U2e,"isBandAxisData"),mt(q2e,"isLinearAxisData")}),X2e=e(()=>{JL(),j2e=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,n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",t);for(r of e){var a=(s=VL(i,1,r))?s.width:r.length*t,s=s?s.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,s)}return i.remove(),n}}}),K2e=e(()=>{W2e=class{constructor(e,t,r,n){this.axisConfig=e,this.title=t,this.textDimensionCalculator=r,this.axisThemeConfig=n,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,n;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*e.width,this.outerPadding=Math.min(r.width/2,n),n=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,n<=t)&&(t-=n,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=t)&&(t-=n,this.showTitle=!0),this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;var r,n;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*e.height,this.outerPadding=Math.min(r.height/2,n),(n=r.width+2*this.axisConfig.labelPadding)<=t)&&(t-=n,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=t)&&(t-=n,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():[]}}}),Z2e=e(()=>{a6(),t(),K2e(),Y2e=class extends W2e{static{mt(this,"BandAxis")}constructor(e,t,r,n,i){super(e,n,i,t),this.categories=r,this.scale=wx().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=wx().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),M.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}}}),Q2e=e(()=>{a6(),K2e(),H2e=class extends W2e{static{mt(this,"LinearAxis")}constructor(e,t,r,n,i){super(e,n,i,t),this.domain=r,this.scale=zx().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var e=[...this.domain];"left"===this.axisPosition&&e.reverse(),this.scale=zx().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function J2e(e,t,r,n){return n=new j2e(n),U2e(e)?new Y2e(t,r,e.categories,e.title,n):new H2e(t,r,[e.min,e.max],e.title,n)}var eve=e(()=>{V2e(),X2e(),Z2e(),Q2e(),mt(J2e,"getAxis")});function tve(e,t,r,n){return n=new j2e(n),new rve(n,e,t,r)}var rve,nve,ive,ave=e(()=>{X2e(),rve=class{constructor(e,t,r,n){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=r,this.chartThemeConfig=n,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(tve,"getChartTitleComponent")}),sve=e(()=>{a6(),nve=class{constructor(e,t,r,n,i){this.plotData=e,this.xAxis=t,this.yAxis=r,this.orientation=n,this.plotIndex=i}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?n3().y(e=>e[0]).x(e=>e[1]):n3().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}]}]:[]}}}),ove=e(()=>{ive=class{constructor(e,t,r,n,i,a){this.barData=e,this.boundingRect=t,this.xAxis=r,this.yAxis=n,this.orientation=i,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 lve(e,t,r){return new cve(e,t,r)}var cve,hve,uve,dve=e(()=>{sve(),ove(),cve=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 n=new nve(t,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);r.push(...n.getDrawableElement());break;case"bar":n=new ive(t,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e),r.push(...n.getDrawableElement())}return r}},mt(lve,"getPlotComponent")}),pve=e(()=>{eve(),ave(),dve(),V2e(),hve=class{constructor(e,t,r,n){this.chartConfig=e,this.chartData=t,this.componentStore={title:tve(e,t,r,n),plot:lve(e,t,r),xAxis:J2e(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:J2e(t.yAxis,e.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{mt(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,n,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});e-=s.width,n=(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)&&(i+=e),0<t&&(a+=t),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([r,r+i]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:n+a}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(e=>G2e(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,n,i,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,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),t-=(o=this.componentStore.yAxis.calculateSpace({width:e,height:t})).height,i=r+o.height,0<e&&(a+=e),0<t&&(s+=t),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>G2e(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}}}),gve=e(()=>{pve(),uve=class{static{mt(this,"XYChartBuilder")}static build(e,t,r,n){return new hve(e,t,r,n).getDrawableElement()}}});function fve(){var e=or(),t=Ir();return _C(e.xyChart,t.themeVariables.xyChart)}function mve(){var e=Ir();return _C(yr.xyChart,e.xyChart)}function yve(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function vve(e){var t=Ir();return Oc(e.trim(),t)}function xve(e){Pve=e}function bve(e){Bve.chartOrientation="horizontal"===e?"horizontal":"vertical"}function wve(e){Fve.xAxis.title=vve(e.text)}function kve(e,t){Fve.xAxis={type:"linear",title:Fve.xAxis.title,min:e,max:t},Gve=!0}function Tve(e){Fve.xAxis={type:"band",title:Fve.xAxis.title,categories:e.map(e=>vve(e.text))},Gve=!0}function Eve(e){Fve.yAxis.title=vve(e.text)}function Cve(e,t){Fve.yAxis={type:"linear",title:Fve.yAxis.title,min:e,max:t},Uve=!0}function Sve(e){var t=Math.min(...e),e=Math.max(...e),r=q2e(Fve.yAxis)?Fve.yAxis.min:1/0,n=q2e(Fve.yAxis)?Fve.yAxis.max:-1/0;Fve.yAxis={type:"linear",title:Fve.yAxis.title,min:Math.min(r,t),max:Math.max(n,e)}}function _ve(r){let e=[],t;if(0!==r.length&&(Gve||(n=q2e(Fve.xAxis)?Fve.xAxis.min:1/0,t=q2e(Fve.xAxis)?Fve.xAxis.max:-1/0,kve(Math.min(n,1),Math.max(t,r.length))),Uve||Sve(r),U2e(Fve.xAxis)&&(e=Fve.xAxis.categories.map((e,t)=>[e,r[t]])),q2e(Fve.xAxis))){var n=Fve.xAxis.min,i=Fve.xAxis.max,a=(i-n)/(r.length-1),s=[];for(let e=n;e<=i;e+=a)s.push(""+e);e=s.map((e,t)=>[e,r[t]])}return e}function Ave(e){return zve[0===e?0:e%zve.length]}function Lve(e,t){t=_ve(t),Fve.plots.push({type:"line",strokeFill:Ave(Ove),strokeWidth:2,data:t}),Ove++}function Nve(e,t){t=_ve(t),Fve.plots.push({type:"bar",fill:Ave(Ove),data:t}),Ove++}function Ive(){if(0===Fve.plots.length)throw Error("No Plot to render, please provide a plot with some data");return Fve.title=kh(),uve.build(Bve,Fve,$ve,Pve)}function Rve(){return $ve}function Mve(){return Bve}function Dve(){return Fve}var Ove,Pve,Bve,$ve,Fve,zve,Gve,Uve,qve,jve,Wve,Yve,Hve=e(()=>{Nn(),An(),Tn(),iS(),lh(),Tu(),gve(),V2e(),Ove=0,Bve=mve(),$ve=fve(),Fve=yve(),zve=$ve.plotColorPalette.split(",").map(e=>e.trim()),Uve=Gve=!1,mt(fve,"getChartDefaultThemeConfig"),mt(mve,"getChartDefaultConfig"),mt(yve,"getChartDefaultData"),mt(vve,"textSanitizer"),mt(xve,"setTmpSVGG"),mt(bve,"setOrientation"),mt(wve,"setXAxisTitle"),mt(kve,"setXAxisRangeData"),mt(Tve,"setXAxisBand"),mt(Eve,"setYAxisTitle"),mt(Cve,"setYAxisRangeData"),mt(Sve,"setYAxisRangeFromPlotData"),mt(_ve,"transformDataWithoutCategory"),mt(Ave,"getPlotColorFromPalette"),mt(Lve,"setLineData"),mt(Nve,"setBarData"),mt(Ive,"getDrawableElem"),mt(Rve,"getChartThemeConfig"),mt(Mve,"getChartConfig"),mt(Dve,"getXYChartData"),qve=mt(function(){mh(),Ove=0,Bve=mve(),Fve=yve(),$ve=fve(),zve=$ve.plotColorPalette.split(",").map(e=>e.trim()),Uve=Gve=!1},"clear"),jve={getDrawableElem:Ive,clear:qve,setAccTitle:yh,getAccTitle:vh,setDiagramTitle:wh,getDiagramTitle:kh,getAccDescription:bh,setAccDescription:xh,setOrientation:bve,setXAxisTitle:wve,setXAxisRangeData:kve,setXAxisBand:Tve,setYAxisTitle:Eve,setYAxisRangeData:Cve,setLineData:Lve,setBarData:Nve,setTmpSVGG:xve,getChartThemeConfig:Rve,getChartConfig:Mve,getXYChartData:Dve}}),Vve=e(()=>{t(),Cye(),ch(),Wve=mt((e,t,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig(),o=i.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"),M.debug(`Rendering xychart chart
|
||
`+e);let u=vye(t),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(rh(u,s.height,s.width,!0),u.attr("viewBox",`0 0 ${s.width} `+s.height),p.attr("fill",a.backgroundColor),i.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group")),i.getDrawableElem()),f={};function m(t){let r=d,n="";for(var[i]of t.entries()){let e=d;0<i&&f[n]&&(e=f[n]),n+=t[i],r=(r=f[n])||(f[n]=e.append("g").attr("class",t[i]))}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)if("horizontal"===s.chartOrientation){let n=function(e,t){var{data:e,label:r}=e;return t*r.length*.7<=e.width-10};n,mt(n,"fitsHorizontally");var x=(b=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(;!n(e,r)&&0<r;)--r;return r}),x=Math.floor(Math.min(...x));v.selectAll("text").data(b).enter().append("text").attr("x",e=>e.data.x+e.data.width-10).attr("y",e=>e.data.y+e.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",x+"px").text(e=>e.label)}else{let i=function(e,t,r){var{data:e,label:n}=e,n=t*n.length*.7,i=e.x+e.width/2;return e.x<=i-n/2&&i+n/2<=e.x+e.width&&e.y+r+t<=e.y+e.height};i,mt(i,"fitsInBar");var b,x=(b=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,n=t.width/(.7*r.length);for(;!i(e,n,10)&&0<n;)--n;return n}),w=Math.floor(Math.min(...x));v.selectAll("text").data(b).enter().append("text").attr("x",e=>e.data.x+e.data.width/2).attr("y",e=>e.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",w+"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"),Yve={draw:Wve}}),Xve={};$Be(Xve,{diagram:()=>Kve});var Kve,Zve,Qve,Jve,exe,txe,rxe=e(()=>{z2e(),Hve(),Vve(),Kve={parser:$2e,db:jve,renderer:Yve}}),nxe=e(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),t=[1,3],r=[1,4],n=[1,5],i=[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],x=[1,32],b=[1,30],w=[1,39],k=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],C=[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],G=[1,71],U=[1,72],q=[1,73],j=[1,74],W=[1,75],Y=[1,76],S=[1,83],_=[1,80],H=[1,84],V=[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],ne=[1,101],ie=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],L=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],N=[1,110],I=[1,106],R=[1,107],M=[1,108],D=[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,n,i,a,s){var o=a.length-1;switch(i){case 4:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(a[o-3],a[o-4]);break;case 22:n.addRequirement(a[o-5],a[o-6]),n.setClass([a[o-5]],a[o-3]);break;case 23:n.setNewReqId(a[o-2]);break;case 24:n.setNewReqText(a[o-2]);break;case 25:n.setNewReqRisk(a[o-2]);break;case 26:n.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(a[o-3]);break;case 43:n.addElement(a[o-5]),n.setClass([a[o-5]],a[o-3]);break;case 44:n.setNewElementType(a[o-2]);break;case 45:n.setNewElementDocRef(a[o-2]);break;case 48:n.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:n.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 58:n.setClass(a[o-1],a[o]);break;case 59:n.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],n.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:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(B,[2,6]),{3:12,4:2,6:t,9:r,11:n,13:i},{1:[2,2]},{4:17,5:a,7:13,8:s,9:r,11:n,13:i,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:x,77:b,89:w,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:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:43,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:44,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:45,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:46,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:47,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:48,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:49,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:50,8:s,9:r,11:n,13:i,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:x,77:b,89:w,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(T,[2,17]),e(T,[2,18]),e(T,[2,19]),e(T,[2,20]),{30:60,33:62,75:E,89:w,90:k},{30:63,33:62,75:E,89:w,90:k},{30:64,33:62,75:E,89:w,90:k},e(C,[2,29]),e(C,[2,30]),e(C,[2,31]),e(C,[2,32]),e(C,[2,33]),e(C,[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:G,67:U,68:q,69:j,70:W,71:Y},{62:77,65:z,66:G,67:U,68:q,69:j,70:W,71:Y},{30:78,33:62,75:E,89:w,90:k},{73:79,75:S,76:_,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,60]),e(re,[2,62]),{73:93,75:S,76:_,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},{30:94,33:62,75:E,76:_,89:w,90:k},{5:[1,95]},{30:96,33:62,75:E,89:w,90:k},{5:[1,97]},{30:98,33:62,75:E,89:w,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(T,[2,59],{76:_}),e(T,[2,64],{76:ne}),{33:103,75:[1,102],89:w,90:k},e(ie,[2,65],{79:104,75:S,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),e(L,[2,67]),e(L,[2,69]),e(L,[2,70]),e(L,[2,71]),e(L,[2,72]),e(L,[2,73]),e(L,[2,74]),e(L,[2,75]),e(L,[2,76]),e(L,[2,77]),e(L,[2,78]),e(T,[2,57],{76:ne}),e(T,[2,58],{76:_}),{5:N,28:105,31:I,34:R,36:M,38:D,40:O},{27:[1,112],76:_},{5:ae,40:se,56:113,57:oe,59:le},{27:[1,118],76:_},{33:119,89:w,90:k},{33:120,89:w,90:k},{75:S,78:121,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,61]),e(re,[2,63]),e(L,[2,68]),e(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:N,28:126,31:I,34:R,36:M,38:D,40:O},e(T,[2,28]),{5:[1,127]},e(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:ae,40:se,56:130,57:oe,59:le},e(T,[2,47]),{5:[1,131]},e(T,[2,48]),e(T,[2,49]),e(ie,[2,66],{79:104,75:S,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),{33:132,89:w,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(T,[2,27]),{5:N,28:145,31:I,34:R,36:M,38:D,40:O},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(T,[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(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(T,[2,43]),{5:N,28:159,31:I,34:R,36:M,38:D,40:O},{5:N,28:160,31:I,34:R,36:M,38:D,40:O},{5:N,28:161,31:I,34:R,36:M,38:D,40:O},{5:N,28:162,31:I,34:R,36:M,38:D,40:O},{5:ae,40:se,56:163,57:oe,59:le},{5:ae,40:se,56:164,57:oe,59:le},e(T,[2,23]),e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,44]),e(T,[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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){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"),(Zve=new((P.prototype=t).Parser=P)).parser=Zve,Qve=Zve}),ixe=e(()=>{Eu(),t(),Tu(),Jve=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=yh,this.getAccTitle=vh,this.setAccDescription=xh,this.getAccDescription=bh,this.setDiagramTitle=wh,this.getDiagramTitle=kh,this.getConfig=mt(()=>D().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"]}),M.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,mh()}setCssStyle(e,t){for(var r of e){var n,i=this.requirements.get(r)??this.elements.get(r);if(!t||!i)return;for(n of t)n.includes(",")?i.cssStyles.push(...n.split(",")):i.cssStyles.push(n)}}setClass(e,t){for(var r of e){var n=this.requirements.get(r)??this.elements.get(r);if(n)for(var i of t)n.classes.push(i),(i=this.classes.get(i)?.styles)&&n.cssStyles.push(...i)}}defineClass(e,n){for(let t of e){let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),n&&n.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(...n.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(t)&&e.cssStyles.push(...n.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){var e,t,r,n=D(),i=[],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=n.look,i.push(s)}for(t of this.elements.values()){var o=t;o.shape="requirementBox",o.look=n.look,o.id=t.name,o.cssStyles=t.cssStyles,o.cssClasses=t.classes.join(" "),i.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:n.look};a.push(l)}return{nodes:i,edges:a,other:{},config:n,direction:this.getDirection()}}}}),axe=e(()=>{exe=mt(e=>`
|
||
|
||
marker {
|
||
fill: ${e.relationColor};
|
||
stroke: ${e.relationColor};
|
||
}
|
||
|
||
marker.cross {
|
||
stroke: ${e.lineColor};
|
||
}
|
||
|
||
svg {
|
||
font-family: ${e.fontFamily};
|
||
font-size: ${e.fontSize};
|
||
}
|
||
|
||
.reqBox {
|
||
fill: ${e.requirementBackground};
|
||
fill-opacity: 1.0;
|
||
stroke: ${e.requirementBorderColor};
|
||
stroke-width: ${e.requirementBorderSize};
|
||
}
|
||
|
||
.reqTitle, .reqLabel{
|
||
fill: ${e.requirementTextColor};
|
||
}
|
||
.reqLabelBox {
|
||
fill: ${e.relationLabelBackground};
|
||
fill-opacity: 1.0;
|
||
}
|
||
|
||
.req-title-line {
|
||
stroke: ${e.requirementBorderColor};
|
||
stroke-width: ${e.requirementBorderSize};
|
||
}
|
||
.relationshipLine {
|
||
stroke: ${e.relationColor};
|
||
stroke-width: 1;
|
||
}
|
||
.relationshipLabel {
|
||
fill: ${e.relationLabelColor};
|
||
}
|
||
.divider {
|
||
stroke: ${e.nodeBorder};
|
||
stroke-width: 1;
|
||
}
|
||
.label {
|
||
font-family: ${e.fontFamily};
|
||
color: ${e.nodeTextColor||e.textColor};
|
||
}
|
||
.label text,span {
|
||
fill: ${e.nodeTextColor||e.textColor};
|
||
color: ${e.nodeTextColor||e.textColor};
|
||
}
|
||
.labelBkg {
|
||
background-color: ${e.edgeLabelBackground};
|
||
}
|
||
|
||
`,"getStyles"),txe=exe}),sxe={};$Be(sxe,{draw:()=>oxe});var oxe,lxe=e(()=>{Eu(),t(),KD(),VK(),XK(),iS(),oxe=mt(async function(e,t,r,n){M.info("REF0:"),M.info("Drawing requirement diagram (unified)",t);var{securityLevel:i,state:a,layout:s}=D(),o=n.db.getData(),i=BD(t,i);o.type=n.type,o.layoutAlgorithm=RK(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=t,await IK(o,i),eS.insertTitle(i,"requirementDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),MK(i,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),cxe={};$Be(cxe,{diagram:()=>hxe});var hxe,uxe,dxe,pxe,gxe,fxe,mxe,yxe,vxe,xxe,bxe,wxe,kxe,Txe,Exe,Cxe,Sxe,_xe,Axe,Lxe,Nxe,Ixe,Rxe,Mxe,Dxe,Oxe,Pxe,Bxe,$xe,Fxe,zxe,Gxe,Uxe,qxe,jxe,Wxe,Yxe,Hxe,Vxe,Xxe,Kxe=e(()=>{nxe(),ixe(),axe(),lxe(),hxe={parser:Qve,get db(){return new Jve},renderer:sxe,styles:txe}}),Zxe=e(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),t=[1,2],B=[1,3],$=[1,4],r=[2,4],n=[1,9],i=[1,11],a=[1,13],s=[1,14],o=[1,16],l=[1,17],c=[1,18],h=[1,24],u=[1,25],d=[1,26],p=[1,27],g=[1,28],f=[1,29],m=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],w=[1,35],k=[1,36],T=[1,37],E=[1,38],C=[1,39],S=[1,41],_=[1,42],A=[1,43],L=[1,44],N=[1,45],I=[1,46],R=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],M=[4,5,16,50,52,53],F=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],G=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],D=[68,69,70],O=[1,122],t={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.apply(a[o]),a[o];case 4:case 9:this.$=[];break;case 5:case 10:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 11:case 12:this.$=a[o];break;case 8:case 13:this.$=[];break;case 15:a[o].type="createParticipant",this.$=a[o];break;case 16:a[o-1].unshift({type:"boxStart",boxData:n.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:n.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:n.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:n.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:a[o-1].unshift({type:"loopStart",loopText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"rectStart",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"optStart",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"altStart",altText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"criticalStart",criticalText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:n.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"breakStart",breakText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 43:this.$=a[o-3].concat([{type:"option",optionText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.ALT_ELSE},a[o]]);break;case 48:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 49:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 50:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 51:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 53:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 54: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:n.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 55:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-2],a[o]];break;case 62:this.$=a[o];break;case 63:this.$=n.PLACEMENT.LEFTOF;break;case 64:this.$=n.PLACEMENT.RIGHTOF;break;case 65: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:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 66: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:n.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 67: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 68:this.$={type:"addParticipant",actor:a[o]};break;case 69:this.$=n.LINETYPE.SOLID_OPEN;break;case 70:this.$=n.LINETYPE.DOTTED_OPEN;break;case 71:this.$=n.LINETYPE.SOLID;break;case 72:this.$=n.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=n.LINETYPE.DOTTED;break;case 74:this.$=n.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=n.LINETYPE.SOLID_CROSS;break;case 76:this.$=n.LINETYPE.DOTTED_CROSS;break;case 77:this.$=n.LINETYPE.SOLID_POINT;break;case 78:this.$=n.LINETYPE.DOTTED_POINT;break;case 79:this.$=n.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,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:i,8:8,9:10,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},e(R,[2,5]),{9:47,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},e(R,[2,7]),e(R,[2,8]),e(R,[2,14]),{12:48,50:T,52:E,53:C},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:I},{22:55,70:I},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(R,[2,29]),e(R,[2,30]),{32:[1,61]},{34:[1,62]},e(R,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:I},{22:72,70:I},{22:73,70:I},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:I},{22:90,70:I},{22:91,70:I},{22:92,70:I},e([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),e(R,[2,6]),e(R,[2,15]),e(M,[2,9],{10:93}),e(R,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},e(R,[2,21]),{5:[1,97]},{5:[1,98]},e(R,[2,24]),e(R,[2,25]),e(R,[2,26]),e(R,[2,27]),e(R,[2,28]),e(R,[2,31]),e(R,[2,32]),e(F,r,{7:99}),e(F,r,{7:100}),e(F,r,{7:101}),e(z,r,{40:102,7:103}),e(G,r,{42:104,7:105}),e(G,r,{7:105,42:106}),e(U,r,{45:107,7:108}),e(F,r,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:I},e(D,[2,69]),e(D,[2,70]),e(D,[2,71]),e(D,[2,72]),e(D,[2,73]),e(D,[2,74]),e(D,[2,75]),e(D,[2,76]),e(D,[2,77]),e(D,[2,78]),{22:118,70:I},{22:120,58:119,70:I},{70:[2,63]},{70:[2,64]},{56:121,81:O},{56:123,81:O},{56:124,81:O},{56:125,81:O},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:T,52:E,53:C},{5:[1,131]},e(R,[2,19]),e(R,[2,20]),e(R,[2,22]),e(R,[2,23]),{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,132],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,133],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,134],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{16:[1,135]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,46],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,49:[1,136],50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{16:[1,137]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,44],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,48:[1,138],50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{16:[1,139]},{16:[1,140]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,42],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,47:[1,141],50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,142],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{15:[1,143]},e(R,[2,49]),{15:[1,144]},e(R,[2,51]),e(R,[2,52]),{22:145,70:I},{22:146,70:I},{56:147,81:O},{56:148,81:O},{56:149,81:O},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},e(R,[2,16]),e(M,[2,10]),{12:151,50:T,52:E,53:C},e(M,[2,12]),e(M,[2,13]),e(R,[2,18]),e(R,[2,34]),e(R,[2,35]),e(R,[2,36]),e(R,[2,37]),{15:[1,152]},e(R,[2,38]),{15:[1,153]},e(R,[2,39]),e(R,[2,40]),{15:[1,154]},e(R,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:O},{56:158,81:O},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:I},e(M,[2,11]),e(z,r,{7:103,40:160}),e(G,r,{7:105,42:161}),e(U,r,{7:108,45:162}),e(R,[2,48]),e(R,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){switch(r){case 0:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return t.yytext=t.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return t.yytext=t.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:case 64:return 81;case 65:return 68;case 66:return 69;case 67:return 5;case 68:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68],inclusive:!0}}};t.lexer=B,mt(P,"Parser"),(uxe=new((P.prototype=t).Parser=P)).parser=uxe,dxe=uxe}),Qxe=e(()=>{Eu(),t(),c1e(),lh(),Tu(),pxe={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},gxe={FILLED:0,OPEN:1},fxe={LEFTOF:0,RIGHTOF:1,OVER:2},mxe=class{constructor(){this.state=new s1e(()=>({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=yh,this.setAccDescription=xh,this.setDiagramTitle=wh,this.getAccTitle=vh,this.getAccDescription=bh,this.getDiagramTitle=kh,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(D().wrap),this.LINETYPE=pxe,this.ARROWTYPE=gxe,this.PLACEMENT=fxe}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,n){let i=this.state.records.currentBox,a=this.state.records.actors.get(e);if(a){if(this.state.records.currentBox&&a.box&&this.state.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(i=a.box||this.state.records.currentBox,a.box=i,a&&t===a.name&&null==r)return}null==r?.text&&(r={text:t,type:n}),null!=n&&null!=r.text||(r={text:t,type:n}),this.state.records.actors.set(e,{box:i,name:t,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),this.state.records.prevActor&&(t=this.state.records.actors.get(this.state.records.prevActor))&&(t.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,n){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:n})}addSignal(e,t,r,n,i=!1){var a;if(n===this.LINETYPE.ACTIVE_END&&this.activationCount(e??"")<1)throw(a=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'"]},a;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:n,activate:i}),!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:D().sequence?.wrap??!1}clear(){this.state.reset(),mh()}parseMessage(e){var e=e.trim(),{wrap:e,cleanedText:t}=this.extractWrap(e),t={text:t,wrap:e};return M.debug("parseMessage: "+JSON.stringify(t)),t}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),r=t?.[1]?t[1].trim():"transparent",n=t?.[2]?t[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",n=e.trim()):((i=(new Option).style).color=r,i.color!==r&&(r="transparent",n=e.trim()));var{wrap:i,cleanedText:e}=this.extractWrap(n);return{text:e?Oc(e,D()):void 0,color:r,wrap:i}}addNote(e,t,r){var n={actor:e,placement:t,message:r.text,wrap:r.wrap??this.autoWrap()},e=[].concat(e,e);this.state.records.notes.push(n),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=Oc(r.text,D());e=(e=e.replace(/=/g,"=")).replace(/&/g,"&");var n=JSON.parse(e);this.insertLinks(t,n)}catch(e){M.error("error while parsing actor link text",e)}}addALink(a,s){a=this.getActor(a);try{let e={},t=Oc(s.text,D()),r=t.indexOf("@"),n=(t=(t=t.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),i=t.slice(r+1).trim();e[n]=i,this.insertLinks(a,e)}catch(e){M.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=Oc(t.text,D()),n=JSON.parse(r);this.insertProperties(e,n)}catch(e){M.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,n=JSON.parse(r);n.properties&&this.insertProperties(e,n.properties),n.links&&this.insertLinks(e,n.links)}catch(e){M.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);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),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"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":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":yh(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 D().sequence}}}),Jxe=e(()=>{yxe=mt(e=>`.actor {
|
||
stroke: ${e.actorBorder};
|
||
fill: ${e.actorBkg};
|
||
}
|
||
|
||
text.actor > tspan {
|
||
fill: ${e.actorTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.actor-line {
|
||
stroke: ${e.actorLineColor};
|
||
}
|
||
|
||
.messageLine0 {
|
||
stroke-width: 1.5;
|
||
stroke-dasharray: none;
|
||
stroke: ${e.signalColor};
|
||
}
|
||
|
||
.messageLine1 {
|
||
stroke-width: 1.5;
|
||
stroke-dasharray: 2, 2;
|
||
stroke: ${e.signalColor};
|
||
}
|
||
|
||
#arrowhead path {
|
||
fill: ${e.signalColor};
|
||
stroke: ${e.signalColor};
|
||
}
|
||
|
||
.sequenceNumber {
|
||
fill: ${e.sequenceNumberColor};
|
||
}
|
||
|
||
#sequencenumber {
|
||
fill: ${e.signalColor};
|
||
}
|
||
|
||
#crosshead path {
|
||
fill: ${e.signalColor};
|
||
stroke: ${e.signalColor};
|
||
}
|
||
|
||
.messageText {
|
||
fill: ${e.signalTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.labelBox {
|
||
stroke: ${e.labelBoxBorderColor};
|
||
fill: ${e.labelBoxBkgColor};
|
||
}
|
||
|
||
.labelText, .labelText > tspan {
|
||
fill: ${e.labelTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.loopText, .loopText > tspan {
|
||
fill: ${e.loopTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.loopLine {
|
||
stroke-width: 2px;
|
||
stroke-dasharray: 2, 2;
|
||
stroke: ${e.labelBoxBorderColor};
|
||
fill: ${e.labelBoxBorderColor};
|
||
}
|
||
|
||
.note {
|
||
//stroke: #decc93;
|
||
stroke: ${e.noteBorderColor};
|
||
fill: ${e.noteBkgColor};
|
||
}
|
||
|
||
.noteText, .noteText > tspan {
|
||
fill: ${e.noteTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.activation0 {
|
||
fill: ${e.activationBkgColor};
|
||
stroke: ${e.activationBorderColor};
|
||
}
|
||
|
||
.activation1 {
|
||
fill: ${e.activationBkgColor};
|
||
stroke: ${e.activationBorderColor};
|
||
}
|
||
|
||
.activation2 {
|
||
fill: ${e.activationBkgColor};
|
||
stroke: ${e.activationBorderColor};
|
||
}
|
||
|
||
.actorPopupMenu {
|
||
position: absolute;
|
||
}
|
||
|
||
.actorPopupMenuPanel {
|
||
position: absolute;
|
||
fill: ${e.actorBkg};
|
||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
||
}
|
||
.actor-man line {
|
||
stroke: ${e.actorBorder};
|
||
fill: ${e.actorBkg};
|
||
}
|
||
.actor-man circle, line {
|
||
stroke: ${e.actorBorder};
|
||
fill: ${e.actorBkg};
|
||
stroke-width: 2px;
|
||
}
|
||
`,"getStyles"),vxe=yxe}),ebe=e(()=>{function t(e,t,r,n,i,a,s){g(t.append("text").attr("x",r).attr("y",n).style("text-anchor","start").text(e),s)}function l(e,t,r,n,i,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=e.split(L.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",n).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",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,n,i,a,s,o){(i=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).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,n,0,a,s,o),g(i,s)}function g(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}function n(e,t,r,n,i,a,s){f(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(e),s)}function c(e,t,r,n,i,a,s,o){var{actorFontSize:o,actorFontFamily:l,actorFontWeight:c}=o,[h,u]=JC(o),d=e.split(L.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+i/2).attr("y",n).style("text-anchor","middle").style("font-size",u).style("font-weight",c).style("font-family",l);g.append("tspan").attr("x",r+i/2).attr("dy",p).text(d[e]),g.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(g,s)}}function i(e,t,r,n,i,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).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,n,i,a,s,o),f(l,s)}async function a(e,t,r,n,i,a,s,o){var l=await Qc(e,Ir());(l=(t=t.append("switch")).append("foreignObject").attr("x",r+i/2-l.width/2).attr("y",n+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 Jc(e,Ir())),c(e,t,r,n,i,a,s,o),f(l,s)}function f(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}lh(),l6(),iS(),xxe=ee(o6(),1),Nn(),bxe=36,wxe="actor-bottom",kxe=mt(function(e,t){return Cw(e,t)},"drawRect"),Txe=mt(function(e,t,r,n,i){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=(i&&(t="block !important"),e.append("g")),i=(l.attr("id","actor"+s+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",t),""),c=(void 0!==o.class&&(i=" "+o.class),o.width>r?o.width:r);if((e=l.append("rect")).attr("class","actorPopupMenuPanel"+i),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,xxe.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),Vxe(n)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},n),u+=30}}return e.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),Exe=mt(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Cxe=mt(async function(n,i,a=null){var s=n.append("foreignObject"),o=await Jc(i.text,Ir()),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"===i.class)(n=n.node().firstChild).setAttribute("height",o.height+2*i.textMargin),n=n.getBBox(),s.attr("x",Math.round(n.x+n.width/2-o.width/2)).attr("y",Math.round(n.y+n.height/2-o.height/2));else if(a){let{startx:e,stopx:t,starty:r}=a;e>t&&(n=e,e=t,t=n),s.attr("x",Math.round(e+Math.abs(e-t)/2-o.width/2)),"loopText"===i.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),Sxe=mt(function(e,t){let r=0,n=0,i=t.text.split(L.lineBreakRegex),[a,s]=JC(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+n+t.textMargin)/2),"yfunc");break;case"bottom":case"end":c=mt(()=>Math.round(t.y+(r+n+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 i.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||NC;(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&&(n+=(h._groups||h)[0][0].getBBox().height,r=n),o.push(h)}return o},"drawText"),_xe=mt(function(e,t){function r(e,t,r,n,i){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+n-i)+" "+(e+r-1.2*i)+","+(t+n)+" "+e+","+(t+n)}mt(r,"genPoints");var n=e.append("polygon");return n.attr("points",r(t.x,t.y,t.width,t.height,7)),n.attr("class","labelBox"),t.y=t.y+t.height/2,Sxe(e,t),n},"drawLabel"),Axe=-1,Lxe=mt((r,n,e,i)=>{r.select&&e.forEach(e=>{var e=n.get(e),t=r.select("#actor"+e.actorCnt);!i.mirrorActors&&e.stopy?t.attr("y2",e.stopy+e.height/2):i.mirrorActors&&t.attr("y2",e.stopy)})},"fixLifeLineHeights"),Nxe=mt(function(e,t,r,n){var i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+t.height,o=e=e.append("g").lower(),s=(n||(Axe++,Object.keys(t.links||{}).length&&!r.forceMenus&&o.attr("onclick",Exe(`actor${Axe}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+Axe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=e.append("g"),t.actorCnt=Axe,null!=t.links&&o.attr("id","root-"+Axe)),Nw()),a="actor",e=(t.properties?.class?a=t.properties.class:s.fill="#eaeaea",a+=n?" "+wxe:" actor-top",s.x=t.x,s.y=i,s.width=t.width,s.height=t.height,s.class=a,s.rx=3,s.ry=3,s.name=t.name,kxe(o,s));t.rectData=s,t.properties?.icon&&("@"===(n=t.properties.icon.trim()).charAt(0)?Lw(o,s.x+s.width-20,s.y+10,n.substr(1)):Aw(o,s.x+s.width-20,s.y+10,n)),Hxe(r,Zc(t.description))(t.description,o,s.x,s.y,s.width,s.height,{class:"actor actor-box"},r);let l=t.height;return e.node&&(i=e.node().getBBox(),t.height=i.height,l=i.height),l},"drawActorTypeParticipant"),Ixe=mt(function(e,t,r,n){var i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+80,o=e.append("g").lower(),l=(n||(Axe++,o.append("line").attr("id","actor"+Axe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=Axe),e.append("g")),c="actor-man";return l.attr("class",c+=n?" "+wxe:" actor-top"),l.attr("name",t.name),(o=Nw()).x=t.x,o.y=i,o.fill="#eaeaea",o.width=t.width,o.height=t.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+Axe).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+Axe).attr("x1",a-bxe/2).attr("y1",i+33).attr("x2",a+bxe/2).attr("y2",i+33),l.append("line").attr("x1",a-bxe/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+bxe/2-2).attr("y2",i+60),(s=l.append("circle")).attr("cx",t.x+t.width/2),s.attr("cy",i+10),s.attr("r",15),s.attr("width",t.width),s.attr("height",t.height),e=l.node().getBBox(),t.height=e.height,Hxe(r,Zc(t.description))(t.description,l,o.x,o.y+35,o.width,o.height,{class:"actor actor-man"},r),t.height},"drawActorTypeActor"),Rxe=mt(async function(e,t,r,n){switch(t.type){case"actor":return Ixe(e,t,r,n);case"participant":return Nxe(e,t,r,n)}},"drawActor"),Mxe=mt(function(e,t,r){e=e.append("g"),Bxe(e,t),t.name&&Hxe(r)(t.name,e,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),e.lower()},"drawBox"),Dxe=mt(function(e){return e.append("g")},"anchorElement"),Oxe=mt(function(e,t,r,n,i){var a=Nw(),s=t.anchored;a.x=t.startx,a.y=t.starty,a.class="activation"+i%3,a.width=t.stopx-t.startx,a.height=r-t.starty,kxe(s,a)},"drawActivation"),Pxe=mt(async function(e,t,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=n,u=e.append("g"),d=mt(function(e,t,r,n){return u.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",n).attr("class","loopLine")},"drawLoopLine"),p=(d(t.startx,t.starty,t.stopx,t.starty),d(t.stopx,t.starty,t.stopx,t.stopy),d(t.startx,t.stopy,t.stopx,t.stopy),d(t.startx,t.starty,t.startx,t.stopy),void 0!==t.sections&&t.sections.forEach(function(e){d(t.startx,e.y,t.stopx,e.y).style("stroke-dasharray","3, 3")}),Iw());p.text=r,p.x=t.startx,p.y=t.starty,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",_xe(u,p),(p=Wxe()).text=t.title,p.x=t.startx+o/2+(t.stopx-t.startx)/2,p.y=t.starty+i+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=!0;var g=Zc(p.text)?await Cxe(u,p,t):Sxe(u,p);if(void 0!==t.sectionTitles)for(var[f,m]of Object.entries(t.sectionTitles))m.message&&(p.text=m.message,p.x=t.startx+(t.stopx-t.startx)/2,p.y=t.sections[f].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=t.wrap,Zc(p.text)?(t.starty=t.sections[f].y,await Cxe(u,p,t)):Sxe(u,p),m=Math.round(g.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t)),t.sections[f].height+=m-(i+a));return t.height=Math.round(t.stopy-t.starty),u},"drawLoop"),Bxe=mt(function(e,t){Sw(e,t)},"drawBackgroundRect"),$xe=mt(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Fxe=mt(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),zxe=mt(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Gxe=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Uxe=mt(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),qxe=mt(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),jxe=mt(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Wxe=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"),Yxe=mt(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(n,"byText"),mt(c,"byTspan"),mt(i,"byFo"),mt(a,"byKatex"),mt(f,"_setTextAttrs"),Hxe=function(e,t=!1){return t?a:"fo"===e.textPlacement?i:"old"===e.textPlacement?n:c},mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),Vxe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},Xxe={drawRect:kxe,drawText:Sxe,drawLabel:_xe,drawActor:Rxe,drawBox:Mxe,drawPopup:Txe,anchorElement:Dxe,drawActivation:Oxe,drawLoop:Pxe,drawBackgroundRect:Bxe,insertArrowHead:Gxe,insertArrowFilledHead:Uxe,insertSequenceNumber:qxe,insertArrowCrossHead:jxe,insertDatabaseIcon:$xe,insertComputerIcon:Fxe,insertClockIcon:zxe,getTextObj:Wxe,getNoteRect:Yxe,fixLifeLineHeights:Lxe,sanitizeUrl:xxe.sanitizeUrl}});async function tbe(e,t){P.bumpVerticalPos(10);var{startx:r,stopx:n,message:i}=t,a=L.splitBreaks(i).length,s=Zc(i),i=s?await Qc(i,D()):eS.calculateTextDimensions(i,obe(O));s||(s=i.height/a,t.height+=s,P.bumpVerticalPos(s));let o,l=i.height-10,c=i.width;return r===n?(o=P.getVerticalPos()+l,O.rightAngles||(l+=O.boxMargin,o=P.getVerticalPos()+l),l+=30,a=L.getMax(c/2,O.width/2),P.insert(r-a,P.getVerticalPos()-10+l,n+a,P.getVerticalPos()+30+l)):(l+=O.boxMargin,o=P.getVerticalPos()+l,P.insert(r,o-10,n,o)),P.bumpVerticalPos(l),t.height+=l,t.stopy=t.starty+t.height,P.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),o}function rbe(e,t,r,n,i){P.bumpVerticalPos(r);let a=n;t.id&&t.message&&e[t.id]&&(r=e[t.id].width,e=obe(O),t.message=eS.wrapLabel(`[${t.message}]`,r-2*O.wrapPadding,e),t.width=r,t.wrap=!0,r=eS.calculateTextDimensions(t.message,e),e=L.getMax(r.height,O.labelBoxHeight),a=n+e,M.debug(e+" - "+t.message)),i(t),P.bumpVerticalPos(a)}function nbe(r,n,e,t,i,a,s){function o(e,t){e.x<i.get(r.from).x?(P.insert(n.stopx-t,n.starty,n.startx,n.stopy+e.height/2+O.noteMargin),n.stopx=n.stopx+t):(P.insert(n.startx,n.starty,n.stopx+t,n.stopy+e.height/2+O.noteMargin),n.stopx=n.stopx-t)}function l(e,t){e.x<i.get(r.to).x?(P.insert(n.startx-t,n.starty,n.stopx,n.stopy+e.height/2+O.noteMargin),n.startx=n.startx+t):(P.insert(n.stopx,n.starty,n.startx+t,n.stopy+e.height/2+O.noteMargin),n.startx=n.startx-t)}mt(o,"receiverAdjustment"),mt(l,"senderAdjustment"),a.get(r.to)==t?(o(a=i.get(r.to),"actor"==a.type?bxe/2+3:a.width/2+3),a.starty=e-a.height/2,P.bumpVerticalPos(a.height/2)):s.get(r.from)==t?(a=i.get(r.from),O.mirrorActors&&l(a,"actor"==a.type?bxe/2:a.width/2),a.stopy=e-a.height/2,P.bumpVerticalPos(a.height/2)):s.get(r.to)==t&&(a=i.get(r.to),O.mirrorActors&&o(a,"actor"==a.type?bxe/2+3:a.width/2+3),a.stopy=e-a.height/2,P.bumpVerticalPos(a.height/2))}async function ibe(e,t,r){var n,i={};for(n of t)if(e.get(n.to)&&e.get(n.from)){var a=e.get(n.to);if(n.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||n.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)continue;var s=!(o=void 0!==n.placement),o=(o?lbe:obe)(O),l=n.wrap?eS.wrapLabel(n.message,O.width-2*O.wrapPadding,o):n.message,l=(Zc(l)?await Qc(n.message,D()):eS.calculateTextDimensions(l,o)).width+2*O.wrapPadding;s&&n.from===a.nextActor?i[n.to]=L.getMax(i[n.to]||0,l):s&&n.from===a.prevActor?i[n.from]=L.getMax(i[n.from]||0,l):s&&n.from===n.to?(i[n.from]=L.getMax(i[n.from]||0,l/2),i[n.to]=L.getMax(i[n.to]||0,l/2)):n.placement===r.db.PLACEMENT.RIGHTOF?i[n.from]=L.getMax(i[n.from]||0,l):n.placement===r.db.PLACEMENT.LEFTOF?i[a.prevActor]=L.getMax(i[a.prevActor]||0,l):n.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(i[a.prevActor]=L.getMax(i[a.prevActor]||0,l/2)),a.nextActor)&&(i[n.from]=L.getMax(i[n.from]||0,l/2))}return M.debug("maxMessageWidthPerActor:",i),i}async function abe(n,e,t){let r=0;for(var i of n.keys()){(i=n.get(i)).wrap&&(i.description=eS.wrapLabel(i.description,O.width-2*O.wrapPadding,cbe(O)));var a=Zc(i.description)?await Qc(i.description,D()):eS.calculateTextDimensions(i.description,cbe(O));i.width=i.wrap?O.width:L.getMax(O.width,a.width+2*O.wrapPadding),i.height=i.wrap?L.getMax(a.height,O.height):O.height,r=L.getMax(r,i.height)}for(var s in e){var o,l=n.get(s);l&&(o=(o=n.get(l.nextActor))?e[s]+O.actorMargin-l.width/2-o.width/2:e[s]+O.actorMargin-l.width/2,l.margin=L.getMax(o,O.actorMargin))}let c=0;return t.forEach(e=>{var t=obe(O),r=e.actorKeys.reduce((e,t)=>e+(n.get(t).width+(n.get(t).margin||0)),0),t=(r-=2*O.boxTextMargin,e.wrap&&(e.name=eS.wrapLabel(e.name,r-2*O.wrapPadding,t)),eS.calculateTextDimensions(e.name,t)),t=(c=L.getMax(t.height,c),L.getMax(r,t.width+2*O.wrapPadding));e.margin=O.boxTextMargin,r<t&&(e.margin+=(t-r)/2)}),t.forEach(e=>e.textMaxHeight=c),L.getMax(r,O.height)}var O,P,sbe,obe,lbe,cbe,hbe,ube,dbe,pbe,gbe,fbe,mbe,ybe,vbe,xbe,bbe,wbe,kbe,Tbe=e(()=>{a6(),ebe(),t(),lh(),lh(),l6(),Eu(),jr(),iS(),ch(),O={},P={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,gbe(D())},"init"),updateVal:mt(function(e,t,r,n){void 0===e[t]?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:mt(function(n,i,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",i-t*O.boxMargin,Math.min),o.updateVal(e,"stopy",s+t*O.boxMargin,Math.max),o.updateVal(P.data,"startx",n-t*O.boxMargin,Math.min),o.updateVal(P.data,"stopx",a+t*O.boxMargin,Math.max),"activation"!==r&&(o.updateVal(e,"startx",n-t*O.boxMargin,Math.min),o.updateVal(e,"stopx",a+t*O.boxMargin,Math.max),o.updateVal(P.data,"starty",i-t*O.boxMargin,Math.min),o.updateVal(P.data,"stopy",s+t*O.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e()),this.activations.forEach(e("activation"))},"updateBounds"),insert:mt(function(e,t,r,n){var i=L.getMin(e,r),e=L.getMax(e,r),r=L.getMin(t,n),t=L.getMax(t,n);this.updateVal(P.data,"startx",i,Math.min),this.updateVal(P.data,"starty",r,Math.min),this.updateVal(P.data,"stopx",e,Math.max),this.updateVal(P.data,"stopy",t,Math.max),this.updateBounds(i,r,e,t)},"insert"),newActivation:mt(function(e,t,r){var r=r.get(e.from),n=fbe(e.from).length||0,r=r.x+r.width/2+(n-1)*O.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+O.activationWidth,stopy:void 0,actor:e.from,anchored:Xxe.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:P.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=L.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")},sbe=mt(async function(e,t){P.bumpVerticalPos(O.boxMargin),t.height=O.boxMargin,t.starty=P.getVerticalPos();var r=Nw(),e=(r.x=t.startx,r.y=t.starty,r.width=t.width||O.width,r.class="note",e.append("g")),n=Xxe.drawRect(e,r),e=((i=Iw()).x=t.startx,i.y=t.starty,i.width=r.width,i.dy="1em",i.text=t.message,i.class="noteText",i.fontFamily=O.noteFontFamily,i.fontSize=O.noteFontSize,i.fontWeight=O.noteFontWeight,i.anchor=O.noteAlign,i.textMargin=O.noteMargin,i.valign="center",Zc(i.text)?await Cxe(e,i):Sxe(e,i)),i=Math.round(e.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.attr("height",i+2*O.noteMargin),t.height+=i+2*O.noteMargin,P.bumpVerticalPos(i+2*O.noteMargin),t.stopy=t.starty+i+2*O.noteMargin,t.stopx=t.startx+r.width,P.insert(t.startx,t.starty,t.stopx,t.stopy),P.models.addNote(t)},"drawNote"),obe=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),lbe=mt(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),cbe=mt(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont"),mt(tbe,"boundMessage"),hbe=mt(async function(e,t,r,n){var{startx:t,stopx:i,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=t,h=eS.calculateTextDimensions(s,obe(O)),u=Iw();u.x=t,u.y=a+10,u.width=i-t,u.class="messageText",u.dy="1em",u.text=s,u.fontFamily=O.messageFontFamily,u.fontSize=O.messageFontSize,u.fontWeight=O.messageFontWeight,u.anchor=O.messageAlign,u.valign="center",u.textMargin=O.wrapPadding,u.tspan=!1,Zc(u.text)?await Cxe(e,u,{startx:t,stopx:i,starty:r}):Sxe(e,u);let d=h.width,p,g=(t===i?p=O.rightAngles?e.append("path").attr("d",`M ${t},${r} H ${t+L.getMax(O.width/2,d/2)} V ${r+25} H `+t):e.append("path").attr("d","M "+t+","+r+" C "+(t+60)+","+(r-10)+" "+(t+60)+","+(r+30)+" "+t+","+(r+20)):((p=e.append("line")).attr("x1",t),p.attr("y1",r),p.attr("x2",i),p.attr("y2",r)),o===n.db.LINETYPE.DOTTED||o===n.db.LINETYPE.DOTTED_CROSS||o===n.db.LINETYPE.DOTTED_POINT||o===n.db.LINETYPE.DOTTED_OPEN||o===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(p.style("stroke-dasharray","3, 3"),p.attr("class","messageLine1")):p.attr("class","messageLine0"),"");O.arrowMarkerAbsolute&&(g=Gc(!0)),p.attr("stroke-width",2),p.attr("stroke","none"),p.style("fill","none"),o!==n.db.LINETYPE.SOLID&&o!==n.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),o!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p.attr("marker-start","url("+g+"#arrowhead)"),p.attr("marker-end","url("+g+"#arrowhead)")),o!==n.db.LINETYPE.SOLID_POINT&&o!==n.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),o!==n.db.LINETYPE.SOLID_CROSS&&o!==n.db.LINETYPE.DOTTED_CROSS||p.attr("marker-end","url("+g+"#crosshead)"),(c||O.showSequenceNumbers)&&(p.attr("marker-start","url("+g+"#sequencenumber)"),e.append("text").attr("x",t).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))},"drawMessage"),ube=mt(function(e,t,r,n,i,a,s){let o=0,l=0,c,h=0;for(var u of n){var d=(u=t.get(u)).box;c&&c!=d&&(s||P.models.addBox(c),l+=O.boxMargin+c.margin),d&&d!=c&&(s||(d.x=o+l,d.y=i),l+=d.margin),u.width=u.width||O.width,u.height=L.getMax(u.height||O.height,O.height),u.margin=u.margin||O.actorMargin,h=L.getMax(h,u.height),r.get(u.name)&&(l+=u.width/2),u.x=o+l,u.starty=P.getVerticalPos(),P.insert(u.x,i,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,P.models.addActor(u)}c&&!s&&P.models.addBox(c),P.bumpVerticalPos(h)},"addActorRenderingData"),dbe=mt(async function(t,r,n,e){if(e){let e=0;P.bumpVerticalPos(2*O.boxMargin);for(var i of n)(i=r.get(i)).stopy||(i.stopy=P.getVerticalPos()),i=await Xxe.drawActor(t,i,O,!0),e=L.getMax(e,i);P.bumpVerticalPos(e+O.boxMargin)}else for(var a of n)a=r.get(a),await Xxe.drawActor(t,a,O,!1)},"drawActors"),pbe=mt(function(e,t,r,n){let i=0,a=0;for(var s of r){var s=t.get(s),o=vbe(s);(o=Xxe.drawPopup(e,s,o,O,O.forceMenus,n)).height>i&&(i=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),gbe=mt(function(e){it(O,e),e.fontFamily&&(O.actorFontFamily=O.noteFontFamily=O.messageFontFamily=e.fontFamily),e.fontSize&&(O.actorFontSize=O.noteFontSize=O.messageFontSize=e.fontSize),e.fontWeight&&(O.actorFontWeight=O.noteFontWeight=O.messageFontWeight=e.fontWeight)},"setConf"),fbe=mt(function(t){return P.activations.filter(function(e){return e.actor===t})},"actorActivations"),mbe=mt(function(e,t){return t=t.get(e),[(e=fbe(e)).reduce(function(e,t){return L.getMin(e,t.startx)},t.x+t.width/2-1),e.reduce(function(e,t){return L.getMax(e,t.stopx)},t.x+t.width/2+1)]},"activationBounds"),mt(rbe,"adjustLoopHeightForWrap"),mt(nbe,"adjustCreatedDestroyedData"),ybe=mt(async function(n,e,t,i){var{securityLevel:r,sequence:a}=D();O=a;let s;"sandbox"===r&&(s=H("#i"+e));var a=H("sandbox"===r?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===r?s.nodes()[0].contentDocument:document;P.init(),M.debug(i.db);let l="sandbox"===r?a.select(`[id="${e}"]`):H(`[id="${e}"]`),c=i.db.getActors(),h=i.db.getCreatedActors(),u=i.db.getDestroyedActors(),d=i.db.getBoxes(),p=i.db.getActorKeys(),g=i.db.getMessages(),f=i.db.getDiagramTitle(),m=i.db.hasAtLeastOneBox(),y=i.db.hasAtLeastOneBoxWithTitle(),v=await ibe(c,g,i);if(O.height=await abe(c,v,d),Xxe.insertComputerIcon(l),Xxe.insertDatabaseIcon(l),Xxe.insertClockIcon(l),m&&(P.bumpVerticalPos(O.boxMargin),y)&&P.bumpVerticalPos(d[0].textMaxHeight),!0===O.hideUnusedParticipants){let t=new Set;g.forEach(e=>{t.add(e.from),t.add(e.to)}),p=p.filter(e=>t.has(e))}ube(l,c,h,p,0,g,!1);var x,b,w,k=await wbe(g,c,v,i);function T(e,t){var r=P.endActivation(e);r.starty+18>t&&(r.starty=t-6,t+=12),Xxe.drawActivation(l,r,t,O,fbe(e.from).length),P.insert(r.startx,t-10,r.stopx,t)}Xxe.insertArrowHead(l),Xxe.insertArrowCrossHead(l),Xxe.insertArrowFilledHead(l),Xxe.insertSequenceNumber(l),mt(T,"activeEnd");let E=1,C=1,S=[],_=[],A=0;for(x of g){let e,t,r;switch(x.type){case i.db.LINETYPE.NOTE:P.resetVerticalPos(),t=x.noteModel,await sbe(l,t);break;case i.db.LINETYPE.ACTIVE_START:P.newActivation(x,l,c);break;case i.db.LINETYPE.ACTIVE_END:T(x,P.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:rbe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e));break;case i.db.LINETYPE.LOOP_END:e=P.endLoop(),await Xxe.drawLoop(l,e,"loop",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;case i.db.LINETYPE.RECT_START:rbe(k,x,O.boxMargin,O.boxMargin,e=>P.newLoop(void 0,e.message));break;case i.db.LINETYPE.RECT_END:e=P.endLoop(),_.push(e),P.models.addLoop(e),P.bumpVerticalPos(e.stopy-P.getVerticalPos());break;case i.db.LINETYPE.OPT_START:rbe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e));break;case i.db.LINETYPE.OPT_END:e=P.endLoop(),await Xxe.drawLoop(l,e,"opt",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;case i.db.LINETYPE.ALT_START:rbe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e));break;case i.db.LINETYPE.ALT_ELSE:rbe(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,e=>P.addSectionToLoop(e));break;case i.db.LINETYPE.ALT_END:e=P.endLoop(),await Xxe.drawLoop(l,e,"alt",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:rbe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e)),P.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:rbe(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,e=>P.addSectionToLoop(e));break;case i.db.LINETYPE.PAR_END:e=P.endLoop(),await Xxe.drawLoop(l,e,"par",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;case i.db.LINETYPE.AUTONUMBER:E=x.message.start||E,C=x.message.step||C,x.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:rbe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e));break;case i.db.LINETYPE.CRITICAL_OPTION:rbe(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,e=>P.addSectionToLoop(e));break;case i.db.LINETYPE.CRITICAL_END:e=P.endLoop(),await Xxe.drawLoop(l,e,"critical",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;case i.db.LINETYPE.BREAK_START:rbe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e));break;case i.db.LINETYPE.BREAK_END:e=P.endLoop(),await Xxe.drawLoop(l,e,"break",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;default:try{(r=x.msgModel).starty=P.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=i.db.showSequenceNumbers();var L=await tbe(l,r);nbe(x,r,L,A,c,h,u),S.push({messageModel:r,lineStartY:L}),P.models.addMessage(r)}catch(n){M.error("error while drawing message",n)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT,i.db.LINETYPE.BIDIRECTIONAL_SOLID,i.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(x.type)&&(E+=C),A++}M.debug("createdActors",h),M.debug("destroyedActors",u),await dbe(l,c,p,!1);for(b of S)await hbe(l,b.messageModel,b.lineStartY,i);O.mirrorActors&&await dbe(l,c,p,!0),_.forEach(e=>Xxe.drawBackgroundRect(l,e)),Lxe(l,c,p,O);for(w of P.models.boxes)w.height=P.getVerticalPos()-w.y,P.insert(w.x,w.y,w.x+w.width,w.height),w.startx=w.x,w.starty=w.y,w.stopx=w.startx+w.width,w.stopy=w.starty+w.height,w.stroke="rgb(0,0,0, 0.5)",Xxe.drawBox(l,w,O);m&&P.bumpVerticalPos(O.boxMargin),r=pbe(l,c,p,o),void 0===(a=P.getBounds().bounds).startx&&(a.startx=0),void 0===a.starty&&(a.starty=0),void 0===a.stopx&&(a.stopx=0),void 0===a.stopy&&(a.stopy=0);let N=a.stopy-a.starty,I=(N<r.maxHeight?r.maxHeight:N)+2*O.diagramMarginY,R=(O.mirrorActors&&(I=I-O.boxMargin+O.bottomMarginAdj),a.stopx-a.startx);e=(R<r.maxWidth?r.maxWidth:R)+2*O.diagramMarginX,f&&l.append("text").text(f).attr("x",(a.stopx-a.startx)/2-2*O.diagramMarginX).attr("y",-25),rh(l,I,e,O.useMaxWidth),o=f?40:0,l.attr("viewBox",a.startx-O.diagramMarginX+" -"+(O.diagramMarginY+o)+" "+e+" "+(I+o)),M.debug("models:",P.models)},"draw"),mt(ibe,"getMaxMessageWidthPerActor"),vbe=mt(function(e){let t=0,r=cbe(O);for(var n in e.links)n=eS.calculateTextDimensions(n,r).width+2*O.wrapPadding+2*O.boxMargin,t<n&&(t=n);return t},"getRequiredPopupWidth"),mt(abe,"calculateActorMargins"),xbe=mt(async function(e,t,r){var n=t.get(e.from),t=t.get(e.to),i=n.x,a=t.x,s=e.wrap&&e.message,o=Zc(e.message)?await Qc(e.message,D()):eS.calculateTextDimensions(s?eS.wrapLabel(e.message,O.width,lbe(O)):e.message,lbe(O)),l={width:s?O.width:L.getMax(O.width,o.width+2*O.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===r.db.PLACEMENT.RIGHTOF?(l.width=s?L.getMax(O.width,o.width):L.getMax(n.width/2+t.width/2,o.width+2*O.noteMargin),l.startx=i+(n.width+O.actorMargin)/2):e.placement===r.db.PLACEMENT.LEFTOF?(l.width=s?L.getMax(O.width,o.width+2*O.noteMargin):L.getMax(n.width/2+t.width/2,o.width+2*O.noteMargin),l.startx=i-l.width+(n.width-O.actorMargin)/2):e.to===e.from?(o=eS.calculateTextDimensions(s?eS.wrapLabel(e.message,L.getMax(O.width,n.width),lbe(O)):e.message,lbe(O)),l.width=s?L.getMax(O.width,n.width):L.getMax(n.width,O.width,o.width+2*O.noteMargin),l.startx=i+(n.width-l.width)/2):(l.width=Math.abs(i+n.width/2-(a+t.width/2))+O.actorMargin,l.startx=i<a?i+n.width/2-O.actorMargin/2:a+t.width/2-O.actorMargin/2),s&&(l.message=eS.wrapLabel(e.message,l.width-2*O.wrapPadding,lbe(O))),M.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${e.message}]`),l},"buildNoteModel"),bbe=mt(function(e,t,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,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,i]=mbe(e.from,t),[a,s]=mbe(e.to,t),o=n<=a,l=o?i:n,c=o?a:s,h=2<Math.abs(a-s),u=mt(e=>o?-e:e,"adjustValue");e.from===e.to?c=l:(e.activate&&!h&&(c+=u(O.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(c+=u(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(l-=u(3)));var t=[n,i,a,s],r=Math.abs(l-c),d=(e.wrap&&e.message&&(e.message=eS.wrapLabel(e.message,L.getMax(r+2*O.wrapPadding,O.width),obe(O))),eS.calculateTextDimensions(e.message,obe(O)));return{width:L.getMax(e.wrap?0:d.width+2*O.wrapPadding,r+2*O.wrapPadding,O.width),height:0,startx:l,stopx:c,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,t),toBounds:Math.max.apply(null,t)}},"buildMessageModel"),wbe=mt(async function(e,n,t,i){let a={},s=[],o,l,c;for(let r of e){switch(r.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:s.push({id:r.id,msg:r.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:r.message&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:o=s.pop(),a[o.id]=o;break;case i.db.LINETYPE.ACTIVE_START:var h=n.get(r.from||r.to.actor),u=fbe(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*O.activationWidth/2,stopx:h+O.activationWidth,actor:r.from,enabled:!0};P.activations.push(u);break;case i.db.LINETYPE.ACTIVE_END:h=P.activations.map(e=>e.actor).lastIndexOf(r.from),P.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await xbe(r,n,i),r.noteModel=l,s.forEach(e=>{(o=e).from=L.getMin(o.from,l.startx),o.to=L.getMax(o.to,l.startx+l.width),o.width=L.getMax(o.width,Math.abs(o.from-o.to))-O.labelBoxWidth})):(c=bbe(r,n,i),(r.msgModel=c).startx&&c.stopx&&0<s.length&&s.forEach(e=>{var t;o=e,c.startx===c.stopx?(e=n.get(r.from),t=n.get(r.to),o.from=L.getMin(e.x-c.width/2,e.x-e.width/2,o.from),o.to=L.getMax(t.x+c.width/2,t.x+e.width/2,o.to),o.width=L.getMax(o.width,Math.abs(o.to-o.from))-O.labelBoxWidth):(o.from=L.getMin(c.startx,o.from),o.to=L.getMax(c.stopx,o.to),o.width=L.getMax(o.width,c.width)-O.labelBoxWidth)}))}return P.activations=[],M.debug("Loop type widths:",a),a},"calculateLoopBounds"),kbe={bounds:P,drawActors:dbe,drawActorsPopup:pbe,setConf:gbe,draw:ybe}}),Ebe={};$Be(Ebe,{diagram:()=>Cbe});var Cbe,Sbe,_be,Abe,Lbe,Nbe,Ibe,Rbe,Mbe,Dbe,Obe,Pbe,Bbe,$be,Fbe,zbe=e(()=>{Zxe(),Qxe(),Jxe(),Eu(),Tbe(),Cbe={parser:dxe,get db(){return new mxe},renderer:kbe,styles:vxe,init:mt(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Ch({sequence:{wrap:e.wrap}}))},"init")}}),Gbe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,18],n=[1,19],i=[1,20],a=[1,41],s=[1,42],o=[1,26],l=[1,24],P=[1,25],B=[1,32],$=[1,33],F=[1,34],c=[1,45],z=[1,35],G=[1,36],U=[1,37],q=[1,38],j=[1,27],W=[1,28],Y=[1,29],H=[1,30],V=[1,31],h=[1,44],u=[1,46],d=[1,43],p=[1,47],X=[1,9],g=[1,8,9],f=[1,58],m=[1,59],y=[1,60],v=[1,61],x=[1,62],K=[1,63],Z=[1,64],b=[1,8,9,41],Q=[1,76],w=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],k=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],T=[13,58,84,99,101,102],E=[13,58,71,72,84,99,101,102],J=[13,58,66,67,68,69,70,84,99,101,102],ee=[1,98],C=[1,115],S=[1,107],_=[1,113],A=[1,108],L=[1,109],N=[1,110],I=[1,111],R=[1,112],M=[1,114],te=[22,58,59,80,84,85,86,87,88,89],re=[1,8,9,39,41,44],D=[1,8,9,22],ne=[1,143],ie=[1,8,9,59],O=[1,8,9,22,58,59,80,84,85,86,87,88,89],k={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,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[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],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,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],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 8:this.$=a[o-1];break;case 9:case 12:case 14:this.$=a[o];break;case 10:case 13:this.$=a[o-2]+"."+a[o];break;case 11:case 15:this.$=a[o-1]+a[o];break;case 16:case 17:this.$=a[o-1]+"~"+a[o]+"~";break;case 18:n.addRelation(a[o]);break;case 19:a[o-1].title=n.cleanupLabel(a[o]),n.addRelation(a[o-1]);break;case 30:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(a[o-3],a[o-1]);break;case 34:n.addClassesToNamespace(a[o-4],a[o-1]);break;case 35:this.$=a[o],n.addNamespace(a[o]);break;case 36:this.$=[a[o]];break;case 37:this.$=[a[o-1]];break;case 38:a[o].unshift(a[o-2]),this.$=a[o];break;case 40:n.setCssClass(a[o-2],a[o]);break;case 41:n.addMembers(a[o-3],a[o-1]);break;case 42:n.setCssClass(a[o-5],a[o-3]),n.addMembers(a[o-5],a[o-1]);break;case 43:this.$=a[o],n.addClass(a[o]);break;case 44:this.$=a[o-1],n.addClass(a[o-1]),n.setClassLabel(a[o-1],a[o]);break;case 45:n.addAnnotation(a[o],a[o-2]);break;case 46:case 59:this.$=[a[o]];break;case 47:a[o].push(a[o-1]),this.$=a[o];break;case 48:break;case 49:n.addMember(a[o-1],n.cleanupLabel(a[o]));break;case 50:case 51:break;case 52:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 54:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 55:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 56:n.addNote(a[o],a[o-1]);break;case 57:n.addNote(a[o]);break;case 58:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 60:this.$=a[o-2].concat([a[o]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 66:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 67:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 68:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=a[o-2],n.setClickEvent(a[o-1],a[o]);break;case 77:case 83:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 78:this.$=a[o-2],n.setLink(a[o-1],a[o]);break;case 79:this.$=a[o-3],n.setLink(a[o-2],a[o-1],a[o]);break;case 80:this.$=a[o-3],n.setLink(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 81:this.$=a[o-4],n.setLink(a[o-3],a[o-2],a[o]),n.setTooltip(a[o-3],a[o-1]);break;case 84:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-4],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 86:this.$=a[o-3],n.setLink(a[o-2],a[o]);break;case 87:this.$=a[o-4],n.setLink(a[o-3],a[o-1],a[o]);break;case 88:this.$=a[o-4],n.setLink(a[o-3],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 89:this.$=a[o-5],n.setLink(a[o-4],a[o-2],a[o]),n.setTooltip(a[o-4],a[o-1]);break;case 90:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 91:n.setCssClass(a[o-1],a[o]);break;case 92:this.$=[a[o]];break;case 93:a[o-2].push(a[o]),this.$=a[o-2];break;case 95:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,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:n,37:i,38:22,42:a,43:23,46:s,47:o,49:l,50:P,52:B,54:$,55:F,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(X,[2,5],{8:[1,48]}),{8:[1,49]},t(g,[2,18],{22:[1,50]}),t(g,[2,20]),t(g,[2,21]),t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(g,[2,29]),{34:[1,51]},{36:[1,52]},t(g,[2,32]),t(g,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:f,67:m,68:y,69:v,70:x,71:K,72:Z}),{39:[1,65]},t(b,[2,39],{39:[1,67],44:[1,66]}),t(g,[2,50]),t(g,[2,51]),{16:68,58:c,84:h,99:u,101:d},{16:39,18:69,19:40,58:c,84:h,99:u,101:d,102:p},{16:39,18:70,19:40,58:c,84:h,99:u,101:d,102:p},{16:39,18:71,19:40,58:c,84:h,99:u,101:d,102:p},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:c,84:h,99:u,101:d,102:p},{13:Q,53:75},{56:77,58:[1,78]},t(g,[2,61]),t(g,[2,62]),t(g,[2,63]),t(g,[2,64]),t(w,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:c,84:h,99:u,101:d,102:p}),t(w,[2,14],{20:[1,82]}),{15:83,16:84,58:c,84:h,99:u,101:d},{16:39,18:85,19:40,58:c,84:h,99:u,101:d,102:p},t(k,[2,118]),t(k,[2,119]),t(k,[2,120]),t(k,[2,121]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),t(X,[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,18:21,38:22,43:23,16:39,19:40,5:86,33:r,35:n,37:i,42:a,46:s,47:o,49:l,50:P,52:B,54:$,55:F,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p}),{5:87,10:5,16:39,18:21,19:40,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:n,37:i,38:22,42:a,43:23,46:s,47:o,49:l,50:P,52:B,54:$,55:F,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p},t(g,[2,19]),t(g,[2,30]),t(g,[2,31]),{13:[1,89],16:39,18:88,19:40,58:c,84:h,99:u,101:d,102:p},{51:90,64:56,65:57,66:f,67:m,68:y,69:v,70:x,71:K,72:Z},t(g,[2,49]),{65:91,71:K,72:Z},t(T,[2,68],{64:92,66:f,67:m,68:y,69:v,70:x}),t(E,[2,69]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(J,[2,74]),t(J,[2,75]),{8:[1,94],24:95,40:93,43:23,46:s},{16:96,58:c,84:h,99:u,101:d},{45:97,49:ee},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:C,57:104,58:S,80:_,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},{58:[1,116]},{13:Q,53:117},t(g,[2,57]),t(g,[2,123]),{22:C,57:118,58:S,59:[1,119],80:_,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},t(te,[2,59]),{16:39,18:120,19:40,58:c,84:h,99:u,101:d,102:p},t(w,[2,15]),t(w,[2,16]),t(w,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:c,84:h,99:u,101:d},t(re,[2,43],{11:123,12:[1,124]}),t(X,[2,7]),{9:[1,125]},t(D,[2,52]),{16:39,18:126,19:40,58:c,84:h,99:u,101:d,102:p},{13:[1,128],16:39,18:127,19:40,58:c,84:h,99:u,101:d,102:p},t(T,[2,67],{64:129,66:f,67:m,68:y,69:v,70:x}),t(T,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:s},{8:[1,132],41:[2,36]},t(b,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:ee},{16:39,18:136,19:40,58:c,84:h,99:u,101:d,102:p},t(g,[2,76],{13:[1,137]}),t(g,[2,78],{13:[1,139],75:[1,138]}),t(g,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},t(g,[2,90],{59:ne}),t(ie,[2,92],{83:144,22:C,58:S,80:_,84:A,85:L,86:N,87:I,88:R,89:M}),t(O,[2,94]),t(O,[2,96]),t(O,[2,97]),t(O,[2,98]),t(O,[2,99]),t(O,[2,100]),t(O,[2,101]),t(O,[2,102]),t(O,[2,103]),t(O,[2,104]),t(g,[2,91]),t(g,[2,56]),t(g,[2,58],{59:ne}),{58:[1,145]},t(w,[2,13]),{15:146,16:84,58:c,84:h,99:u,101:d},{39:[2,11]},t(re,[2,44]),{13:[1,147]},{1:[2,4]},t(D,[2,54]),t(D,[2,53]),{16:39,18:148,19:40,58:c,84:h,99:u,101:d,102:p},t(T,[2,65]),t(g,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:s},{45:151,49:ee},t(b,[2,41]),{41:[2,47]},t(g,[2,45]),t(g,[2,77]),t(g,[2,79]),t(g,[2,80],{75:[1,152]}),t(g,[2,83]),t(g,[2,84],{13:[1,153]}),t(g,[2,86],{13:[1,155],75:[1,154]}),{22:C,58:S,80:_,82:156,83:106,84:A,85:L,86:N,87:I,88:R,89:M},t(O,[2,95]),t(te,[2,60]),{39:[2,10]},{14:[1,157]},t(D,[2,55]),t(g,[2,34]),{41:[2,38]},{41:[1,158]},t(g,[2,81]),t(g,[2,85]),t(g,[2,87]),t(g,[2,88],{75:[1,159]}),t(ie,[2,93],{83:144,22:C,58:S,80:_,84:A,85:L,86:N,87:I,88:R,89:M}),t(re,[2,8]),t(b,[2,42]),t(g,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){switch(r){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;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 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 75;case 68:case 69:return 67;case 70:case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:case 85:return 88;case 86:return 89;case 87:case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};k.lexer=r,mt(e,"Parser"),(Sbe=new((e.prototype=k).Parser=e)).parser=Sbe,_be=Sbe}),Ube=e(()=>{Eu(),lh(),Abe=["#","+","~","-",""],Lbe=class{static{mt(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="",t=Oc(e,D()),this.parseMember(t)}getDisplayDetails(){let e=this.visibility+Wc(this.id);"method"===this.memberType&&(e+=`(${Wc(this.parameters.trim())})`,this.returnType)&&(e+=" : "+Wc(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))&&(i=r[1]?r[1].trim():"",Abe.includes(i)&&(this.visibility=i),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)&&(i=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(i))&&(t=i,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=e.length,i=e.substring(0,1),n=e.substring(r-1),Abe.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(t=n),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,n,i=(this.visibility?"\\"+this.visibility:"")+Wc(this.id)+("method"===this.memberType?`(${Wc(this.parameters)})`+(this.returnType?" : "+Wc(this.returnType):""):"");this.text=i.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""}}}}),qbe=e(()=>{a6(),t(),Eu(),lh(),iS(),Tu(),Ube(),Nbe="classId-",Ibe=0,Rbe=mt(e=>L.sanitizeText(e,D()),"sanitizeText"),Mbe=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=mt(e=>{let r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t;null!==(e=H(e.currentTarget)).attr("title")&&(t=this.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(e.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"<br/>")),e.classed("hover",!0))}).on("mouseout",e=>{r.transition().duration(500).style("opacity",0),H(e.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=yh,this.getAccTitle=vh,this.setAccDescription=xh,this.getAccDescription=bh,this.setDiagramTitle=wh,this.getDiagramTitle=kh,this.getConfig=mt(()=>D().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{mt(this,"ClassDB")}splitClassNameAndType(e){let t=L.sanitizeText(e,D()),r="",n=t;return 0<t.indexOf("~")&&(e=t.split("~"),n=Rbe(e[0]),r=Rbe(e[1])),{className:n,type:r}}setClassLabel(e,t){e=L.sanitizeText(e,D()),t=t&&Rbe(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=L.sanitizeText(e,D()),{className:e,type:t}=this.splitClassNameAndType(e);this.classes.has(e)||(e=L.sanitizeText(e,D()),this.classes.set(e,{id:e,type:t,label:e,text:e+(t?`<${t}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:Nbe+e+"-"+Ibe}),Ibe++)}addInterface(e,t){e={id:"interface"+this.interfaces.length,label:e,classId:t},this.interfaces.push(e)}lookUpDomId(e){if(e=L.sanitizeText(e,D()),this.classes.has(e))return this.classes.get(e).domId;throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",mh()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(e){M.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=L.sanitizeText(e.relationTitle1.trim(),D()),e.relationTitle2=L.sanitizeText(e.relationTitle2.trim(),D()),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(Rbe(t.substring(2,t.length-2))):0<t.indexOf(")")?e.methods.push(new Lbe(t,"method")):t&&e.members.push(new Lbe(t,"attribute")))}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(e,t){t={id:"note"+this.notes.length,class:t,text:e},this.notes.push(t)}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),Rbe(e.trim())}setCssClass(e,r){e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=Nbe+t),(e=this.classes.get(t))&&(e.cssClasses+=" "+r)})}defineClass(e,n){for(let t of e){let r=this.styleClasses.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.styleClasses.set(t,r)),n&&n.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(...n.flatMap(e=>e.split(",")))})}}setTooltip(e,t){e.split(",").forEach(e=>{void 0!==t&&(this.classes.get(e).tooltip=Rbe(t))})}getTooltip(e,t){return(t&&this.namespaces.has(t)?this.namespaces.get(t):this).classes.get(e).tooltip}setLink(e,r,n){let i=D();e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=Nbe+t),(e=this.classes.get(t))&&(e.link=eS.formatUrl(r,i),"sandbox"===i.securityLevel?e.linkTarget="_top":e.linkTarget="string"==typeof n?Rbe(n):"_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,n,i){if(e=L.sanitizeText(e,D()),"loose"===D().securityLevel&&void 0!==n&&this.classes.has(e)){let t=this.lookUpDomId(e),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(t),this.functions.push(()=>{var e=document.querySelector(`[id="${t}"]`);null!==e&&e.addEventListener("click",()=>{eS.runFunc(n,...r)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}getDirection(){return this.direction}setDirection(e){this.direction=e}addNamespace(e){this.namespaces.has(e)||(this.namespaces.set(e,{id:e,classes:new Map,children:{},domId:Nbe+e+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t){if(this.namespaces.has(e))for(var r of t)r=this.splitClassNameAndType(r).className,this.classes.get(r).parent=e,this.namespaces.get(e).classes.set(r,this.classes.get(r))}setCssStyle(e,t){var r=this.classes.get(e);if(t&&r)for(var n of t)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}getData(){var e,t,r,n,i,a=[],s=[],o=D();for(e of this.namespaces.keys()){var l=this.namespaces.get(e);l&&(l={id:l.id,label:l.id,isGroup:!0,padding:o.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:o.look},a.push(l))}for(t of this.classes.keys()){var c,h=this.classes.get(t);h&&((c=h).parentId=h.parent,c.look=o.look,a.push(c))}let u=0;for(r of this.notes){u++;var d={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:o.class.padding??6,cssStyles:["text-align: left","white-space: nowrap","fill: "+o.themeVariables.noteBkgColor,"stroke: "+o.themeVariables.noteBorderColor],look:o.look};a.push(d),(d=this.classes.get(r.class)?.id??"")&&(d={id:"edgeNote"+u,start:r.id,end:d,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:o.look},s.push(d))}for(n of this.interfaces){var p={id:n.id,label:n.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};a.push(p)}u=0;for(i of this.relations){u++;var g={id:nS(i.id1,i.id2,{prefix:"id",counter:u}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(i.relation.type1),arrowTypeEnd:this.getArrowMarker(i.relation.type2),startLabelRight:"none"===i.relationTitle1?"":i.relationTitle1,endLabelLeft:"none"===i.relationTitle2?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:1==i.relation.lineType?"dashed":"solid",look:o.look};s.push(g)}return{nodes:a,edges:s,other:{},config:o,direction:this.getDirection()}}}}),jbe=e(()=>{JK(),Dbe=mt(e=>`g.classGroup text {
|
||
fill: ${e.nodeBorder||e.classText};
|
||
stroke: none;
|
||
font-family: ${e.fontFamily};
|
||
font-size: 10px;
|
||
|
||
.title {
|
||
font-weight: bolder;
|
||
}
|
||
|
||
}
|
||
|
||
.nodeLabel, .edgeLabel {
|
||
color: ${e.classText};
|
||
}
|
||
.edgeLabel .label rect {
|
||
fill: ${e.mainBkg};
|
||
}
|
||
.label text {
|
||
fill: ${e.classText};
|
||
}
|
||
|
||
.labelBkg {
|
||
background: ${e.mainBkg};
|
||
}
|
||
.edgeLabel .label span {
|
||
background: ${e.mainBkg};
|
||
}
|
||
|
||
.classTitle {
|
||
font-weight: bolder;
|
||
}
|
||
.node rect,
|
||
.node circle,
|
||
.node ellipse,
|
||
.node polygon,
|
||
.node path {
|
||
fill: ${e.mainBkg};
|
||
stroke: ${e.nodeBorder};
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
|
||
.divider {
|
||
stroke: ${e.nodeBorder};
|
||
stroke-width: 1;
|
||
}
|
||
|
||
g.clickable {
|
||
cursor: pointer;
|
||
}
|
||
|
||
g.classGroup rect {
|
||
fill: ${e.mainBkg};
|
||
stroke: ${e.nodeBorder};
|
||
}
|
||
|
||
g.classGroup line {
|
||
stroke: ${e.nodeBorder};
|
||
stroke-width: 1;
|
||
}
|
||
|
||
.classLabel .box {
|
||
stroke: none;
|
||
stroke-width: 0;
|
||
fill: ${e.mainBkg};
|
||
opacity: 0.5;
|
||
}
|
||
|
||
.classLabel .label {
|
||
fill: ${e.nodeBorder};
|
||
font-size: 10px;
|
||
}
|
||
|
||
.relation {
|
||
stroke: ${e.lineColor};
|
||
stroke-width: 1;
|
||
fill: none;
|
||
}
|
||
|
||
.dashed-line{
|
||
stroke-dasharray: 3;
|
||
}
|
||
|
||
.dotted-line{
|
||
stroke-dasharray: 1 2;
|
||
}
|
||
|
||
#compositionStart, .composition {
|
||
fill: ${e.lineColor} !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
#compositionEnd, .composition {
|
||
fill: ${e.lineColor} !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
#dependencyStart, .dependency {
|
||
fill: ${e.lineColor} !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
#dependencyStart, .dependency {
|
||
fill: ${e.lineColor} !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
#extensionStart, .extension {
|
||
fill: transparent !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
#extensionEnd, .extension {
|
||
fill: transparent !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
#aggregationStart, .aggregation {
|
||
fill: transparent !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
#aggregationEnd, .aggregation {
|
||
fill: transparent !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
#lollipopStart, .lollipop {
|
||
fill: ${e.mainBkg} !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
#lollipopEnd, .lollipop {
|
||
fill: ${e.mainBkg} !important;
|
||
stroke: ${e.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
.edgeTerminals {
|
||
font-size: 11px;
|
||
line-height: initial;
|
||
}
|
||
|
||
.classTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${e.textColor};
|
||
}
|
||
${qK()}
|
||
`,"getStyles"),Obe=Dbe}),Wbe=e(()=>{Eu(),t(),KD(),VK(),XK(),iS(),Pbe=mt((e,t="TB")=>{if(!e.doc)return t;let r=t;for(var n of e.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),Bbe=mt(function(e,t){return t.db.getClasses()},"getClasses"),$be=mt(async function(e,t,r,n){M.info("REF0:"),M.info("Drawing class diagram (v3)",t);var{securityLevel:i,state:a,layout:s}=D(),o=n.db.getData(),i=BD(t,i);o.type=n.type,o.layoutAlgorithm=RK(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=t,await IK(o,i),eS.insertTitle(i,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),MK(i,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),Fbe={getClasses:Bbe,draw:$be,getDir:Pbe}}),Ybe={};$Be(Ybe,{diagram:()=>Hbe});var Hbe,Vbe=e(()=>{Gbe(),qbe(),jbe(),Wbe(),Hbe={parser:_be,get db(){return new Mbe},renderer:Fbe,styles:Obe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),Xbe={};$Be(Xbe,{diagram:()=>Kbe});var Kbe,Zbe,Qbe,Jbe,e4e,t4e,r4e,n4e,i4e,a4e,s4e,o4e,l4e,c4e,h4e,u4e,d4e,p4e,g4e,f4e,m4e,y4e,v4e,x4e,b4e,w4e,k4e,T4e,E4e,C4e,S4e,_4e,A4e,L4e,N4e,I4e,R4e,M4e,D4e,O4e,P4e=e(()=>{Gbe(),qbe(),jbe(),Wbe(),Kbe={parser:_be,get db(){return new Mbe},renderer:Fbe,styles:Obe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),B4e=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,2],n=[1,3],i=[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],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],E=[1,32],C=[1,35],S=[1,36],_=[1,37],A=[1,38],L=[1,34],N=[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],R=[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,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.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=n.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=n.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:n.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(),n.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),n.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:n.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:n.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:n.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:n.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:n,6:i},{1:[3]},{3:5,4:r,5:n,6:i},{3:6,4:r,5:n,6:i},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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},t(N,[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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},t(N,[2,7]),t(N,[2,8]),t(N,[2,9]),t(N,[2,10]),t(N,[2,11]),t(N,[2,12],{14:[1,40],15:[1,41]}),t(N,[2,16]),{18:[1,42]},t(N,[2,18],{20:[1,43]}),{23:[1,44]},t(N,[2,22]),t(N,[2,23]),t(N,[2,24]),t(N,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(N,[2,28]),{34:[1,49]},{36:[1,50]},t(N,[2,31]),{13:51,24:d,57:L},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(I,[2,44],{58:[1,56]}),t(I,[2,45],{58:[1,57]}),t(N,[2,38]),t(N,[2,39]),t(N,[2,40]),t(N,[2,41]),t(N,[2,6]),t(N,[2,13]),{13:58,24:d,57:L},t(N,[2,17]),t(R,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(N,[2,29]),t(N,[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(N,[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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},t(N,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(N,[2,34]),t(N,[2,35]),t(N,[2,36]),t(N,[2,37]),t(I,[2,46]),t(I,[2,47]),t(N,[2,15]),t(N,[2,19]),t(R,a,{7:78}),t(N,[2,26]),t(N,[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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},t(N,[2,32]),t(N,[2,33]),t(N,[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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){switch(r){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:case 9:break;case 10:return 5;case 11:case 12:case 13:case 14:break;case 15:return this.pushState("SCALE"),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 35:return this.pushState("SCALE"),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:return this.popState(),"ID";case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 70:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return t.yytext=t.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};r.lexer=n,mt(e,"Parser"),(Zbe=new((e.prototype=r).Parser=e)).parser=Zbe,Qbe=Zbe}),$4e=e(()=>{e4e=Jbe="TB",t4e="dir",n4e="root",i4e="relation",a4e="classDef",s4e="style",o4e="applyClass",l4e="default",h4e="fill:none",u4e="fill: #333",d4e="c",p4e="text",g4e="normal",f4e="rect",m4e="rectWithTitle",y4e="stateStart",v4e="stateEnd",x4e=c4e="divider",b4e="roundedWithTitle",k4e="noteGroup",E4e=(T4e="statediagram")+"-state",S4e=(C4e="transition")+" note-edge",_4e=T4e+"-note",A4e=T4e+"-cluster",L4e=T4e+"-cluster-alt",R4e=r4e="state",D4e=(M4e="----")+(I4e=w4e="note"),O4e=""+M4e+(N4e="parent")});function F4e(e="",t=0,r="",n=M4e){return n=null!==r&&0<r.length?""+n+r:"",R4e+`-${e}${n}-`+t}function z4e(e,t,r){var n;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])})),(n=e.find(e=>e.id===t.id))?Object.assign(n,t):e.push(t))}function G4e(e){return e?.classes?.join(" ")??""}function U4e(e){return e?.styles??[]}var q4e,j4e,W4e,Y4e,H4e,V4e,X4e,K4e,Z4e,Q4e,J4e,e5e,t5e,r5e,n5e,i5e,a5e,s5e,o5e,l5e,c5e,h5e,u5e,d5e,p5e,g5e,f5e,m5e,y5e,v5e,x5e,b5e,w5e,k5e,T5e,E5e,C5e,S5e=e(()=>{Eu(),t(),lh(),$4e(),q4e=new Map,j4e=0,mt(F4e,"stateDomId"),W4e=mt((r,e,n,i,a,s,o,l)=>{M.trace("items",e),e.forEach(e=>{switch(e.stmt){case r4e:case l4e:H4e(r,e,n,i,a,s,o,l);break;case i4e:H4e(r,e.state1,n,i,a,s,o,l),H4e(r,e.state2,n,i,a,s,o,l);var t={id:"edge"+j4e,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:h4e,labelStyle:"",label:L.sanitizeText(e.description??"",D()),arrowheadStyle:u4e,labelpos:d4e,labelType:p4e,thickness:g4e,classes:C4e,look:o};a.push(t),j4e++}})},"setupDoc"),Y4e=mt((e,t=e4e)=>{let r=t;if(e.doc)for(var n of e.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),mt(z4e,"insertOrUpdateNode"),mt(G4e,"getClassesFromDbInfo"),mt(U4e,"getStylesFromDbInfo"),H4e=mt((r,n,e,i,a,t,s,o)=>{var l=n.id,c=e.get(l),h=G4e(c),u=U4e(c),d=D();if(M.info("dataFetcher parsedItem",n,c,u),"root"!==l){let e=f4e;if(!0===n.start?e=y4e:!1===n.start&&(e=v4e),n.type!==l4e&&(e=n.type),q4e.get(l)||q4e.set(l,{id:l,shape:e,description:L.sanitizeText(l,d),cssClasses:h+" "+E4e,cssStyles:u}),c=q4e.get(l),n.description&&(Array.isArray(c.description)?(c.shape=m4e,c.description.push(n.description)):c.description?.length&&0<c.description.length?(c.shape=m4e,c.description===l?c.description=[n.description]:c.description=[c.description,n.description]):(c.shape=f4e,c.description=n.description),c.description=L.sanitizeTextOrArray(c.description,d)),1===c.description?.length&&c.shape===m4e&&("group"===c.type?c.shape=b4e:c.shape=f4e),!c.type&&n.doc&&(M.info("Setting cluster for XCX",l,Y4e(n)),c.type="group",c.isGroup=!0,c.dir=Y4e(n),c.shape=n.type===c4e?x4e:b4e,c.cssClasses=c.cssClasses+` ${A4e} `+(t?L4e:"")),(h={labelStyle:"",shape:c.shape,label:c.description,cssClasses:c.cssClasses,cssCompiledStyles:[],cssStyles:c.cssStyles,id:l,dir:c.dir,domId:F4e(l,j4e),type:c.type,isGroup:"group"===c.type,padding:8,rx:10,ry:10,look:s}).shape===x4e&&(h.label=""),r&&"root"!==r.id&&(M.trace("Setting node ",l," to be child of its parent ",r.id),h.parentId=r.id),h.centerLabel=!0,n.note){u={labelStyle:"",shape:w4e,label:n.note.text,cssClasses:_4e,cssStyles:[],cssCompiledStyles:[],id:l+D4e+"-"+j4e,domId:F4e(l,j4e,I4e),type:c.type,isGroup:"group"===c.type,padding:d.flowchart?.padding,look:s,position:n.note.position},r=l+O4e,d={labelStyle:"",shape:k4e,label:n.note.text,cssClasses:c.cssClasses,cssStyles:[],id:l+O4e,domId:F4e(l,j4e,N4e),type:"group",isGroup:!0,padding:16,look:s,position:n.note.position},j4e++,u.parentId=d.id=r,z4e(i,d,o),z4e(i,u,o),z4e(i,h,o);let e=l,t=u.id;"left of"===n.note.position&&(e=u.id,t=l),a.push({id:e+"-"+t,start:e,end:t,arrowhead:"none",arrowTypeEnd:"",style:h4e,labelStyle:"",classes:S4e,arrowheadStyle:u4e,labelpos:d4e,labelType:p4e,thickness:g4e,look:s})}else z4e(i,h,o)}n.doc&&(M.trace("Adding nodes children "),W4e(n,n.doc,e,i,a,!t,s,o))},"dataFetcher"),V4e=mt(()=>{q4e.clear(),j4e=0},"reset")}),_5e=e(()=>{Eu(),t(),KD(),VK(),XK(),iS(),$4e(),X4e=mt((e,t=e4e)=>{if(!e.doc)return t;let r=t;for(var n of e.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),K4e=mt(function(e,t){return t.db.getClasses()},"getClasses"),Z4e=mt(async function(e,t,r,n){M.info("REF0:"),M.info("Drawing state diagram (v2)",t);var{securityLevel:i,state:a,layout:s}=D();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=BD(t,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=t,await IK(o,l);try{("function"==typeof n.db.getLinks?n.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,n,i;e?.forEach(e=>{e.textContent?.trim()===s&&(t=e)}),t?(r=t.parentNode)?(n=document.createElementNS("http://www.w3.org/2000/svg","a"),i=a.url.replace(/^"+|"+$/g,""),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i),n.setAttribute("target","_blank"),a.tooltip&&(i=a.tooltip.replace(/^"+|"+$/g,""),n.setAttribute("title",i)),r.replaceChild(n,t),n.appendChild(t),M.info("🔗 Wrapped node in <a> tag for:",s,a.url)):M.warn("⚠️ Node has no parent, cannot wrap:",s):M.warn("⚠️ Could not find node matching text:",s)}else M.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e))})}catch(e){M.error("❌ Error injecting clickable links:",e)}eS.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),MK(l,8,T4e,a?.useMaxWidth??!0)},"draw"),Q4e={getClasses:K4e,draw:Z4e,getDir:X4e}}),A5e=e(()=>{Eu(),t(),iS(),lh(),Tu(),S5e(),_5e(),$4e(),J4e={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},e5e=mt(()=>new Map,"newClassesList"),t5e=mt(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),r5e=mt(e=>JSON.parse(JSON.stringify(e)),"clone"),n5e=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=e5e(),this.documents={root:t5e()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=vh,this.setAccTitle=yh,this.getAccDescription=bh,this.setAccDescription=xh,this.setDiagramTitle=wh,this.getDiagramTitle=kh,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 r4e:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case i4e:this.addRelation(t.state1,t.state2,t.description);break;case a4e:this.addStyleClass(t.id.trim(),t.classes);break;case s4e:this.handleStyleDef(t);break;case o4e:this.setCssClass(t.id.trim(),t.styleClass);break;case"click":this.addLink(t.id,t.url,t.tooltip)}var r,e=this.getStates(),n=D();V4e(),H4e(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,n.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,n=e.id.trim().split(","),i=e.styleClass.split(",");for(t of n){let e=this.getState(t);e||(r=t.trim(),this.addState(r),e=this.getState(r)),e&&(e.styles=i.map(e=>e.replace(/;/g,"")?.trim()))}}setRootDoc(e){M.info("Setting root doc",e),this.rootDoc=e,1===this.version?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(r,n,e){if(n.stmt===i4e)this.docTranslator(r,n.state1,!0),this.docTranslator(r,n.state2,!1);else if(n.stmt===r4e&&(n.id===J4e.START_NODE?(n.id=r.id+(e?"_start":"_end"),n.start=e):n.id=n.id.trim()),(n.stmt===n4e||n.stmt===r4e)&&n.doc){let e=[],t=[];for(var i of n.doc){var a;i.type===c4e?((a=r5e(i)).doc=r5e(t),e.push(a),t=[]):t.push(i)}0<e.length&&0<t.length&&(r={stmt:r4e,id:UC(),type:"divider",doc:r5e(t)},e.push(r5e(r)),n.doc=e),n.doc.forEach(e=>this.docTranslator(n,e,!0))}}getRootDocV2(){return this.docTranslator({id:n4e,stmt:n4e},{id:n4e,stmt:n4e,doc:this.rootDoc},!0),{id:n4e,doc:this.rootDoc}}addState(e,t=l4e,r=void 0,n=void 0,i=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 M.info("Adding state ",l,n),this.currentDocument.states.set(l,{stmt:r4e,id:l,descriptions:[],type:t,doc:r,note:i,classes:[],styles:[],textStyles:[]});if(n&&(M.info("Setting state description",l,n),(Array.isArray(n)?n:[n]).forEach(e=>this.addDescription(l,e.trim()))),i){if(!(e=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);e.note=i,e.note.text=L.sanitizeText(e.note.text,D())}a&&(M.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(e=>this.setCssClass(l,e.trim()))),s&&(M.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(l,e.trim()))),o&&(M.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:t5e()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=e5e(),e||(this.links=new Map,mh())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){M.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),M.warn("Adding link",e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===J4e.START_NODE?(this.startEndCount++,""+J4e.START_TYPE+this.startEndCount):e}startTypeIfNeeded(e="",t=l4e){return e===J4e.START_NODE?J4e.START_TYPE:t}endIdIfNeeded(e=""){return e===J4e.END_NODE?(this.startEndCount++,""+J4e.END_TYPE+this.startEndCount):e}endTypeIfNeeded(e="",t=l4e){return e===J4e.END_NODE?J4e.END_TYPE:t}addRelationObjs(e,t,r=""){var n=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(n,i,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:n,id2:a,relationTitle:L.sanitizeText(r,D())})}addRelation(e,t,r){var n,i;"object"==typeof e&&"object"==typeof t?this.addRelationObjs(e,t,r):"string"==typeof e&&"string"==typeof t&&(n=this.startIdIfNeeded(e.trim()),e=this.startTypeIfNeeded(e),i=this.endIdIfNeeded(t.trim()),t=this.endTypeIfNeeded(t),this.addState(n,e),this.addState(i,t),this.currentDocument.relations.push({id1:n,id2:i,relationTitle:r?L.sanitizeText(r,D()):void 0}))}addDescription(e,t){e=this.currentDocument.states.get(e),t=t.startsWith(":")?t.replace(":","").trim():t,e?.descriptions?.push(L.sanitizeText(t,D()))}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(J4e.STYLECLASS_SEP).forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp(J4e.COLOR_KEYWORD).exec(e)&&(e=t.replace(J4e.FILL_KEYWORD,J4e.BG_FILL).replace(J4e.COLOR_KEYWORD,J4e.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=>e.stmt===t4e)}getDirection(){return this.getDirectionStatement()?.value??Jbe}setDirection(e){var t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:t4e,value:e})}trimColon(e){return(e.startsWith(":")?e.slice(1):e).trim()}getData(){var e=D();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:X4e(this.getRootDocV2())}}getConfig(){return D().state}}}),L5e=e(()=>{i5e=mt(e=>`
|
||
defs #statediagram-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: 1;
|
||
}
|
||
|
||
.transition {
|
||
stroke: ${e.transitionColor};
|
||
stroke-width: 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: 1px;
|
||
}
|
||
.node polygon {
|
||
fill: ${e.mainBkg};
|
||
stroke: ${e.stateBorder||e.nodeBorder};;
|
||
stroke-width: 1px;
|
||
}
|
||
#statediagram-barbEnd {
|
||
fill: ${e.lineColor};
|
||
}
|
||
|
||
.statediagram-cluster rect {
|
||
fill: ${e.compositeTitleBackground};
|
||
stroke: ${e.stateBorder||e.nodeBorder};
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
.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};
|
||
}
|
||
|
||
#dependencyStart, #dependencyEnd {
|
||
fill: ${e.lineColor};
|
||
stroke: ${e.lineColor};
|
||
stroke-width: 1;
|
||
}
|
||
|
||
.statediagramTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${e.textColor};
|
||
}
|
||
`,"getStyles"),a5e=i5e}),N5e=e(()=>{a6(),A5e(),iS(),lh(),Eu(),t(),s5e=mt(e=>e.append("circle").attr("class","start-state").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit).attr("cy",D().state.padding+D().state.sizeUnit),"drawStartState"),o5e=mt(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",D().state.textHeight).attr("class","divider").attr("x2",2*D().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),l5e=mt((e,t)=>{var r=(t=e.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+2*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(t.id)).node().getBBox();return e.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",r.width+2*D().state.padding).attr("height",r.height+2*D().state.padding).attr("rx",D().state.radius),t},"drawSimpleState"),c5e=mt((e,t)=>{let r=mt(function(e,t,r){e=e.append("tspan").attr("x",2*D().state.padding).text(t),r||e.attr("dy",D().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+1.3*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),i=n.height,a=e.append("text").attr("x",D().state.padding).attr("y",i+.4*D().state.padding+D().state.dividerMargin+D().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",D().state.padding).attr("y1",D().state.padding+i+D().state.dividerMargin/2).attr("y2",D().state.padding+i+D().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,n.width);return t.attr("x2",c+3*D().state.padding),e.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",c+2*D().state.padding).attr("height",l.height+i+2*D().state.padding).attr("rx",D().state.radius),e},"drawDescrState"),h5e=mt((e,t,r)=>{let n=D().state.padding,i=2*D().state.padding,a=e.node().getBBox(),s=a.width,o=a.x,l=e.append("text").attr("x",0).attr("y",D().state.titleShift).attr("font-size",D().state.fontSize).attr("class","state-title").text(t.id),c=l.node().getBBox().width+i,h=Math.max(c,s);h===s&&(h+=i);let u,d=e.node().getBBox();return t.doc,u=o-n,s<c&&(u=(s-h)/2+n),Math.abs(o-d.x)<n&&s<c&&(u=o-(c-s)/2),t=1-D().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+D().state.textHeight+D().state.titleShift+1).attr("rx","0"),l.attr("x",u+n),c<=s&&l.attr("x",o+(h-i)/2-c/2+n),e.insert("rect",":first-child").attr("x",u).attr("y",D().state.titleShift-D().state.textHeight-D().state.padding).attr("width",h).attr("height",3*D().state.textHeight).attr("rx",D().state.radius),e.insert("rect",":first-child").attr("x",u).attr("y",D().state.titleShift-D().state.textHeight-D().state.padding).attr("width",h).attr("height",d.height+3+2*D().state.textHeight).attr("rx",D().state.radius),e},"addTitleAndBox"),u5e=mt(e=>(e.append("circle").attr("class","end-state-outer").attr("r",D().state.sizeUnit+D().state.miniPadding).attr("cx",D().state.padding+D().state.sizeUnit+D().state.miniPadding).attr("cy",D().state.padding+D().state.sizeUnit+D().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit+2).attr("cy",D().state.padding+D().state.sizeUnit+2)),"drawEndState"),d5e=mt((e,t)=>{let r=D().state.forkWidth,n=D().state.forkHeight;return t.parentId&&(t=r,r=n,n=t),e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",D().state.padding).attr("y",D().state.padding)},"drawForkJoinState"),p5e=mt((e,t,r,n)=>{let i=0,a=n.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(L.lineBreakRegex),l=1.25*D().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),i+=l,h.attr("x",t+D().state.noteMargin),h.attr("y",r+i+1.25*D().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),g5e=mt((e,t)=>{t.attr("class","state-note");var r=t.append("rect").attr("x",0).attr("y",D().state.padding),t=t.append("g"),{textWidth:e,textHeight:t}=p5e(e,0,0,t);return r.attr("height",t+2*D().state.noteMargin),r.attr("width",e+2*D().state.noteMargin),r},"drawNote"),f5e=mt(function(e,t){var r={id:n=t.id,label:t.id,width:0,height:0},e=e.append("g").attr("id",n).attr("class","stateGroup"),n=("start"===t.type&&s5e(e),"end"===t.type&&u5e(e),"fork"!==t.type&&"join"!==t.type||d5e(e,t),"note"===t.type&&g5e(t.note.text,e),"divider"===t.type&&o5e(e),"default"===t.type&&0===t.descriptions.length&&l5e(e,t),"default"===t.type&&0<t.descriptions.length&&c5e(e,t),e.node().getBBox());return r.width=n.width+2*D().state.padding,r.height=n.height+2*D().state.padding,r},"drawState"),m5e=0,y5e=mt(function(c,h,u){var d=mt(function(e){switch(e){case n5e.relationType.AGGREGATION:return"aggregation";case n5e.relationType.EXTENSION:return"extension";case n5e.relationType.COMPOSITION:return"composition";case n5e.relationType.DEPENDENCY:return"dependency"}},"getRelationType");h.points=h.points.filter(e=>!Number.isNaN(e.y));let e=h.points,t=n3().x(function(e){return e.x}).y(function(e){return e.y}).curve(x3),r=c.append("path").attr("d",t(e)).attr("id","edge"+m5e).attr("class","transition"),n="";if(D().state.arrowMarkerAbsolute&&(n=Gc(!0)),r.attr("marker-end","url("+n+"#"+d(n5e.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let t=c.append("g").attr("class","stateLabel"),{x:r,y:n}=eS.calcLabelPosition(h.points),i=L.getRows(u.title),a=0,s=[],o=0,l=0;for(let e=0;e<=i.length;e++){var p=t.append("text").attr("text-anchor","middle").text(i[e]).attr("x",r).attr("y",n+a),g=p.node().getBBox();o=Math.max(o,g.width),l=Math.min(l,g.x),M.info(g.x,r,n+a),0===a&&(a=p.node().getBBox().height,M.info("Title height",a,n)),s.push(p)}let e=a*i.length;if(1<i.length){let r=(i.length-1)*a*.5;s.forEach((e,t)=>e.attr("y",n+t*a-r)),e=a*i.length}d=t.node().getBBox(),t.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-D().state.padding/2).attr("y",n-e/2-D().state.padding/2-3.5).attr("width",o+D().state.padding).attr("height",e+D().state.padding),M.info(d)}m5e++},"drawEdge")}),I5e=e(()=>{a6(),aK(),YY(),t(),lh(),N5e(),Eu(),ch(),x5e={},b5e=mt(function(){},"setConf"),w5e=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"),k5e=mt(function(e,t,r,n){v5e=D().state;let i=D().securityLevel,a;"sandbox"===i&&(a=H("#i"+t));var s=H("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===i?a.nodes()[0].contentDocument:document,e=(M.debug("Rendering diagram "+e),s.select(`[id='${t}']`)),t=(w5e(e),n.db.getRootDoc()),t=(E5e(t,e,void 0,!1,s,o,n),v5e.padding),o=(s=e.node().getBBox()).width+2*t;rh(e,n=s.height+2*t,1.75*o,v5e.useMaxWidth),e.attr("viewBox",`${s.x-v5e.padding} ${s.y-v5e.padding} `+o+" "+n)},"draw"),T5e=mt(e=>e?e.length*v5e.fontSizeFactor:1,"getLabelWidth"),E5e=mt((e,t,r,n,i,a,s)=>{let o=new jY({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:v5e.edgeLengthFactor,nodeSep:c?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:c?1:v5e.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=E5e(f.doc,g,f.id,!n,i,a,s),g=(g=h5e(g,f,n)).node().getBBox(),e.width=g.width,e.height=g.height+v5e.padding/2,x5e[f.id]={y:v5e.compositTitleSize}):e=f5e(t,f,o),f.note?(g={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},p=f5e(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)}M.debug("Count=",o.nodeCount(),o);let m=0,y=(d.forEach(function(e){m++,M.debug("Setting edge",e),o.setEdge(e.id1,e.id2,{relation:e,width:T5e(e.title),height:v5e.labelHeight*L.getRows(e.title).length,labelpos:"c"},"id"+m)}),RX(o),M.debug("Graph after layout",o.nodes()),t.node());o.nodes().forEach(function(e){void 0!==e&&void 0!==o.node(e)?(M.warn("Node "+e+": "+JSON.stringify(o.node(e))),i.select("#"+y.id+" #"+e).attr("transform","translate("+(o.node(e).x-o.node(e).width/2)+","+(o.node(e).y+(x5e[e]?x5e[e].y:0)-o.node(e).height/2)+" )"),i.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,n=0;t&&(t.parentElement&&(r=t.parentElement.getBBox().width),n=parseInt(t.getAttribute("data-x-shift"),10),Number.isNaN(n))&&(n=0),e.setAttribute("x1",0-n+8),e.setAttribute("x2",r-n-8)})):M.debug("No Node "+e+": "+JSON.stringify(o.node(e)))}),y.getBBox(),o.edges().forEach(function(e){void 0!==e&&void 0!==o.edge(e)&&(M.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(o.edge(e))),y5e(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*v5e.padding,v.height=d.height+2*v5e.padding,M.debug("Doc rendered",v,o),v},"renderDoc"),C5e={setConf:b5e,draw:k5e}}),R5e={};$Be(R5e,{diagram:()=>M5e});var M5e,D5e=e(()=>{B4e(),A5e(),L5e(),I5e(),M5e={parser:Qbe,get db(){return new n5e(1)},renderer:C5e,styles:a5e,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),O5e={};$Be(O5e,{diagram:()=>P5e});var P5e,B5e,$5e,F5e,z5e,G5e,U5e,q5e,j5e,W5e,Y5e,H5e,V5e,X5e,K5e,Z5e,Q5e,J5e,e3e,t3e,r3e,n3e,i3e,a3e,s3e,o3e,l3e,c3e,h3e,u3e,d3e,p3e=e(()=>{B4e(),A5e(),L5e(),_5e(),P5e={parser:Qbe,get db(){return new n5e(2)},renderer:Q4e,styles:a5e,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),g3e=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,14],n={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,n,i,a,s){var o=a.length-1;switch(i){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:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:n.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:n,12:i,14:a,16:s,17:o,18:l},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:15,11:n,12:i,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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){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}}};n.lexer=i,mt(e,"Parser"),(B5e=new((e.prototype=n).Parser=e)).parser=B5e,$5e=B5e}),f3e=e(()=>{Eu(),Tu(),F5e="",z5e=[],G5e=[],U5e=[],q5e=mt(function(){z5e.length=0,G5e.length=0,F5e="",U5e.length=0,mh()},"clear"),j5e=mt(function(e){F5e=e,z5e.push(e)},"addSection"),W5e=mt(function(){return z5e},"getSections"),Y5e=mt(function(){let e=K5e(),t=0;for(;!e&&t<100;)e=K5e(),t++;return G5e.push(...U5e),G5e},"getTasks"),H5e=mt(function(){let t=[];return G5e.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),V5e=mt(function(e,t){let r=t.substr(1).split(":"),n=0;t=(1===r.length?(n=Number(r[0]),[]):(n=Number(r[0]),r[1].split(","))).map(e=>e.trim()),t={section:F5e,type:F5e,people:t,task:e,score:n},U5e.push(t)},"addTask"),X5e=mt(function(e){e={section:F5e,type:F5e,description:e,task:e,classes:[]},G5e.push(e)},"addTaskOrg"),K5e=mt(function(){let e=mt(function(e){return U5e[e].processed},"compileTask"),t=!0;for(var[r,n]of U5e.entries())e(r),t=t&&n.processed;return t},"compileTasks"),Z5e=mt(function(){return H5e()},"getActors"),Q5e={getConfig:mt(()=>D().journey,"getConfig"),clear:q5e,setDiagramTitle:wh,getDiagramTitle:kh,setAccTitle:yh,getAccTitle:vh,setAccDescription:xh,getAccDescription:bh,addSection:j5e,getSections:W5e,getTasks:Y5e,addTask:V5e,addTaskOrg:X5e,getActors:Z5e}}),m3e=e(()=>{JK(),J5e=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:""};
|
||
}
|
||
${qK()}
|
||
`,"getStyles"),e3e=J5e}),y3e=e(()=>{function t(e,t,r,n,i,a,s,o){g(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function c(e,t,r,n,i,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+i/2).attr("y",n).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+i/2).attr("dy",d).text(u[e]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,n,i,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).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,n,i,a,s,o),g(l,s)}function g(e,t){for(var r in t)r in t&&e.attr(r,t[r])}a6(),l6(),t3e=mt(function(e,t){return Cw(e,t)},"drawRect"),r3e=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 n(e){var t=H5().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 i(e){var t=H5().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(n,"smile"),mt(i,"sad"),mt(a,"ambivalent"),(3<r.score?n:r.score<3?i:a)(e),t},"drawFace"),n3e=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"),i3e=mt(function(e,t){return _w(e,t)},"drawText"),a3e=mt(function(e,t){function r(e,t,r,n,i){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+n-i)+" "+(e+r-1.2*i)+","+(t+n)+" "+e+","+(t+n)}mt(r,"genPoints");var n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,i3e(e,t)},"drawLabel"),s3e=mt(function(e,t,r){var e=e.append("g"),n=Nw();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,t3e(e,n),h3e(r)(t.text,e,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),o3e=-1,l3e=mt(function(e,r,t){let n=r.x+t.width/2,i=e.append("g"),a=(o3e++,i.append("line").attr("id","task"+o3e).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"),r3e(i,{cx:n,cy:300+30*(5-r.score),score:r.score}),(e=Nw()).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,t3e(i,e),r.x+14);r.people.forEach(e=>{var t=r.actors[e].color,t={cx:a,cy:r.y,r:7,fill:t,stroke:"#000",title:e,pos:r.actors[e].position};n3e(i,t),a+=10}),h3e(t)(r.task,i,e.x,e.y,e.width,e.height,{class:"task"},t,r.colour)},"drawTask"),c3e=mt(function(e,t){Sw(e,t)},"drawBackgroundRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),h3e=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},u3e=mt(function(e){e.append("defs").append("marker").attr("id","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"),d3e={drawRect:t3e,drawCircle:n3e,drawSection:s3e,drawText:i3e,drawLabel:a3e,drawTask:l3e,drawBackgroundRect:c3e,initGraphics:u3e}});function v3e(s){let n=D().journey,o=n.maxLabelWidth,l=(w3e=0,60);Object.keys(b3e).forEach(t=>{var e=b3e[t].color,e={cx:20,cy:l,r:7,fill:e,stroke:"#000",pos:b3e[t].position};d3e.drawCircle(s,e);let i=s.append("text").attr("visibility","hidden").text(t),r=i.node().getBoundingClientRect().width,a=(i.remove(),[]);if(r<=o)a=[t];else{let e=t.split(" "),n="";i=s.append("text").attr("visibility","hidden"),e.forEach(t=>{var e=n?n+" "+t:t;if(i.text(e),i.node().getBoundingClientRect().width>o){if(n&&a.push(n),n=t,i.text(t),i.node().getBoundingClientRect().width>o){let e="";for(var r of t)e+=r,i.text(e+"-"),i.node().getBoundingClientRect().width>o&&(a.push(e.slice(0,-1)+"-"),e=r);n=e}}else n=e}),n&&a.push(n),i.remove()}a.forEach((e,t)=>{t={x:40,y:l+7+20*t,fill:"#666",text:e,textMargin:n.boxTextMargin??5},e=d3e.drawText(s,t).node().getBoundingClientRect().width,w3e<e&&e>n.leftMargin-e&&(w3e=e)}),l+=Math.max(20,20*a.length)})}var x3e,b3e,w3e,k3e,T3e,E3e,C3e,S3e,_3e,A3e,L3e,N3e=e(()=>{a6(),y3e(),Eu(),ch(),x3e=mt(function(t){Object.keys(t).forEach(function(e){k3e[e]=t[e]})},"setConf"),b3e={},w3e=0,mt(v3e,"drawActorLegend"),k3e=D().journey,T3e=0,E3e=mt(function(e,t,r,n){let i=D(),a=i.journey.titleColor,s=i.journey.titleFontSize,o=i.journey.titleFontFamily,l=i.securityLevel,c;"sandbox"===l&&(c=H("#i"+t));var h,u=H("sandbox"===l?c.nodes()[0].contentDocument.body:"body"),u=(C3e.init(),u.select("#"+t)),t=(d3e.initGraphics(u),n.db.getTasks()),d=n.db.getDiagramTitle(),n=n.db.getActors();for(h in b3e)delete b3e[h];let p=0;n.forEach(e=>{b3e[e]={color:k3e.actorColours[p%k3e.actorColours.length],position:p},p++}),v3e(u),T3e=k3e.leftMargin+w3e,C3e.insert(0,0,T3e,50*Object.keys(b3e).length),A3e(u,t,0);var n=C3e.getBounds(),t=(d&&u.append("text").text(d).attr("x",T3e).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),n.stopy-n.starty+2*k3e.diagramMarginY),g=T3e+n.stopx+2*k3e.diagramMarginX,d=(rh(u,t,g,k3e.useMaxWidth),u.append("line").attr("x1",T3e).attr("y1",4*k3e.height).attr("x2",g-T3e-4).attr("y2",4*k3e.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),d?70:0);u.attr("viewBox",n.startx+` -25 ${g} `+(t+d)),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",t+d+25)},"draw"),C3e={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,n){void 0===e[t]?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:mt(function(n,i,a,s){let o=D().journey,l=this,c=0;function e(r){return mt(function(e){c++;var t=l.sequenceItems.length-c+1;l.updateVal(e,"starty",i-t*o.boxMargin,Math.min),l.updateVal(e,"stopy",s+t*o.boxMargin,Math.max),l.updateVal(C3e.data,"startx",n-t*o.boxMargin,Math.min),l.updateVal(C3e.data,"stopx",a+t*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(e,"startx",n-t*o.boxMargin,Math.min),l.updateVal(e,"stopx",a+t*o.boxMargin,Math.max),l.updateVal(C3e.data,"starty",i-t*o.boxMargin,Math.min),l.updateVal(C3e.data,"stopy",s+t*o.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e())},"updateBounds"),insert:mt(function(e,t,r,n){var i=Math.min(e,r),e=Math.max(e,r),r=Math.min(t,n),t=Math.max(t,n);this.updateVal(C3e.data,"startx",i,Math.min),this.updateVal(C3e.data,"starty",r,Math.min),this.updateVal(C3e.data,"stopx",e,Math.max),this.updateVal(C3e.data,"stopy",t,Math.max),this.updateBounds(i,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")},S3e=k3e.sectionFills,_3e=k3e.sectionColours,A3e=mt(function(e,n,t){let i=D().journey,a="",r=2*i.height+i.diagramMarginY,s=t+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of n.entries()){if(a!==d.section){l=S3e[o%S3e.length],h=o%S3e.length,c=_3e[o%_3e.length];let t=0,r=d.section;for(let e=u;e<n.length&&n[e].section==r;e++)t+=1;var p={x:u*i.taskMargin+u*i.width+T3e,y:50,text:d.section,fill:l,num:h,colour:c,taskCount:t};d3e.drawSection(e,p,i),a=d.section,o++}p=d.people.reduce((e,t)=>(b3e[t]&&(e[t]=b3e[t]),e),{}),d.x=u*i.taskMargin+u*i.width+T3e,d.y=s,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,d3e.drawTask(e,d,i),C3e.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),L3e={setConf:x3e,draw:E3e}}),I3e={};$Be(I3e,{diagram:()=>R3e});var R3e,M3e,D3e,O3e=e(()=>{g3e(),f3e(),m3e(),N3e(),R3e={parser:$5e,db:Q5e,renderer:L3e,styles:e3e,init:mt(e=>{L3e.setConf(e.journey),Q5e.clear()},"init")}}),P3e=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17],n={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){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:n.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:n.addTask(a[o],0,""),this.$=a[o];break;case 16:n.addEvent(a[o].substr(2)),this.$=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:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:18,11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(r,[2,5]),t(r,[2,6]),t(r,[2,8]),{13:[1,19]},{15:[1,20]},t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,4]),t(r,[2,9]),t(r,[2,10])],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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){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 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};n.lexer=i,mt(e,"Parser"),(M3e=new((e.prototype=n).Parser=e)).parser=M3e,D3e=M3e}),B3e={};$Be(B3e,{addEvent:()=>X3e,addSection:()=>W3e,addTask:()=>V3e,addTaskOrg:()=>K3e,clear:()=>j3e,default:()=>Q3e,getCommonDb:()=>q3e,getSections:()=>Y3e,getTasks:()=>H3e});var $3e,F3e,z3e,G3e,U3e,q3e,j3e,W3e,Y3e,H3e,V3e,X3e,K3e,Z3e,Q3e,J3e=e(()=>{Tu(),$3e="",F3e=0,z3e=[],G3e=[],U3e=[],q3e=mt(()=>uh,"getCommonDb"),j3e=mt(function(){z3e.length=0,G3e.length=0,$3e="",U3e.length=0,mh()},"clear"),W3e=mt(function(e){$3e=e,z3e.push(e)},"addSection"),Y3e=mt(function(){return z3e},"getSections"),H3e=mt(function(){let e=Z3e(),t=0;for(;!e&&t<100;)e=Z3e(),t++;return G3e.push(...U3e),G3e},"getTasks"),V3e=mt(function(e,t,r){e={id:F3e++,section:$3e,type:$3e,task:e,score:t||0,events:r?[r]:[]},U3e.push(e)},"addTask"),X3e=mt(function(e){U3e.find(e=>e.id===F3e-1).events.push(e)},"addEvent"),K3e=mt(function(e){e={section:$3e,type:$3e,description:e,task:e,classes:[]},G3e.push(e)},"addTaskOrg"),Z3e=mt(function(){let e=mt(function(e){return U3e[e].processed},"compileTask"),t=!0;for(var[r,n]of U3e.entries())e(r),t=t&&n.processed;return t},"compileTasks"),Q3e={clear:j3e,getCommonDb:q3e,addSection:W3e,getSections:Y3e,getTasks:H3e,addTask:V3e,addTaskOrg:K3e,addEvent:X3e}});function ewe(e,o){e.each(function(){var t,r=H(this),n=r.text().split(/(\s+|<br>)/).reverse(),i=[],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<n.length;e++)t=n[n.length-1-e],i.push(t),s.text(i.join(" ").trim()),(s.node().getComputedTextLength()>o||"<br>"===t)&&(i.pop(),s.text(i.join(" ").trim()),i="<br>"===t?[""]:[t],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}var twe,rwe,nwe,iwe,awe,swe,owe,lwe,cwe,hwe,uwe,dwe,pwe,gwe,fwe,mwe,ywe,vwe,xwe,bwe,wwe,kwe,Twe,Ewe,Cwe=e(()=>{function t(e,t,r,n,i,a,s,o){g(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function c(e,t,r,n,i,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+i/2).attr("y",n).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+i/2).attr("dy",d).text(u[e]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,n,i,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).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,n,i,a,s,o),g(l,s)}function g(e,t){for(var r in t)r in t&&e.attr(r,t[r])}a6(),twe=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"),rwe=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 n(e){var t=H5().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 i(e){var t=H5().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(n,"smile"),mt(i,"sad"),mt(a,"ambivalent"),(3<r.score?n:r.score<3?i:a)(e),t},"drawFace"),nwe=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"),iwe=mt(function(e,t){var r=t.text.replace(/<br\s*\/?>/gi," "),n=((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 n.attr("x",t.x+2*t.textMargin),n.text(r),e},"drawText"),awe=mt(function(e,t){function r(e,t,r,n,i){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+n-i)+" "+(e+r-1.2*i)+","+(t+n)+" "+e+","+(t+n)}mt(r,"genPoints");var n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,iwe(e,t)},"drawLabel"),swe=mt(function(e,t,r){var e=e.append("g"),n=uwe();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,twe(e,n),dwe(r)(t.text,e,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),owe=-1,lwe=mt(function(e,t,r){var n=t.x+r.width/2,e=e.append("g");owe++,e.append("line").attr("id","task"+owe).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"),rwe(e,{cx:n,cy:300+30*(5-t.score),score:t.score}),(n=uwe()).x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width,n.height=r.height,n.class="task task-type-"+t.num,n.rx=3,n.ry=3,twe(e,n),dwe(r)(t.task,e,n.x,n.y,n.width,n.height,{class:"task"},r,t.colour)},"drawTask"),cwe=mt(function(e,t){twe(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),hwe=mt(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),uwe=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"),dwe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},pwe=mt(function(e){e.append("defs").append("marker").attr("id","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(ewe,"wrap"),gwe=mt(function(e,t,r,n){var r=r%12-1,e=e.append("g"),i=(t.section=r,e.attr("class",(t.class?t.class+" ":"")+"timeline-node section-"+r),e.append("g")),a=(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(ewe,t.width).node().getBBox(),s=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return t.height=a.height+1.1*s*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,e.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),mwe(i,t,r,n),t},"drawNode"),fwe=mt(function(e,t,r){var n=(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(ewe,t.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return e.remove(),n.height+1.1*r*.5+t.padding},"getVirtualNodeHeight"),mwe=mt(function(e,t,r){e.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${10-t.height} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),ywe={drawRect:twe,drawCircle:nwe,drawSection:swe,drawText:iwe,drawLabel:awe,drawTask:lwe,drawBackgroundRect:cwe,getTextObj:hwe,getNoteRect:uwe,initGraphics:pwe,drawNode:gwe,getVirtualNodeHeight:fwe}}),Swe=e(()=>{a6(),Cwe(),t(),Eu(),ch(),vwe=mt(function(e,t,r,n){let i=D(),a=i.timeline?.leftMargin??50,s=(M.debug("timeline",n.db),i.securityLevel),o,l=("sandbox"===s&&(o=H("#i"+t)),H("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+t)),c=(l.append("g"),n.db.getTasks()),h=n.db.getCommonDb().getDiagramTitle();M.debug("task",c),ywe.initGraphics(l);var u,d,t=n.db.getSections();M.debug("sections",t);let p=0,g=0,f,m=50+a,y=50,v=0,x=!0,b=(t.forEach(function(e){e={number:v,descr:e,section:v,width:150,padding:20,maxHeight:p},e=ywe.getVirtualNodeHeight(l,e,i),M.debug("sectionHeight before draw",e),p=Math.max(p,e+20)}),0),w=0;M.debug("tasks.length",c.length);for([u,d]of c.entries()){var k,T={number:u,descr:d,section:d.section,width:150,padding:20,maxHeight:g},T=ywe.getVirtualNodeHeight(l,T,i);M.debug("taskHeight before draw",T),g=Math.max(g,T+20),b=Math.max(b,d.events.length);let e=0;for(k of d.events){var E={descr:k,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};e+=ywe.getVirtualNodeHeight(l,E,i)}0<d.events.length&&(e+=10*(d.events.length-1)),w=Math.max(w,e)}M.debug("maxSectionHeight before draw",p),M.debug("maxTaskHeight before draw",g),t&&0<t.length?t.forEach(t=>{var e=c.filter(e=>e.section===t),r={number:v,descr:t,section:v,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:p},n=(M.debug("sectionNode",r),l.append("g")),r=ywe.drawNode(n,r,v,i);M.debug("sectionNode output",r),n.attr("transform",`translate(${m}, 50)`),y+=p+50,0<e.length&&xwe(l,e,v,m,y,g,i,b,w,p,!1),m+=200*Math.max(e.length,1),y=50,v++}):(x=!1,xwe(l,c,v,m,y,g,i,b,w,p,!0)),n=l.node().getBBox(),M.debug("bounds",n),h&&l.append("text").text(h).attr("x",n.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),f=x?p+g+150:g+100,l.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",f).attr("x2",n.width+3*a).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),nh(void 0,l,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),xwe=mt(function(e,t,r,n,i,a,s,o,l,c,h){for(var u of t){var d={descr:u.task,section:r,number:r,width:150,padding:20,maxHeight:a},p=(M.debug("taskNode",d),e.append("g").attr("class","taskWrapper")),d=ywe.drawNode(p,d,r,s).height;M.debug("taskHeight after draw",d),p.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,d),u.events&&(p=e.append("g").attr("class","lineWrapper"),i+=100,bwe(e,u.events,r,n,i,s),i-=100,p.append("line").attr("x1",n+95).attr("y1",i+a).attr("x2",n+95).attr("y2",i+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")),n+=200,h&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),bwe=mt(function(e,t,r,n,i,a){let s=0,o=i;i+=100;for(var l of t){var l={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50},c=(M.debug("eventNode",l),e.append("g").attr("class","eventWrapper")),l=ywe.drawNode(c,l,r,a).height;s+=l,c.attr("transform",`translate(${n}, ${i})`),i=i+10+l}return i=o,s},"drawEvents"),wwe={setConf:mt(()=>{},"setConf"),draw:vwe}}),_we=e(()=>{vn(),kwe=mt(t=>{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],qt(t["lineColor"+e])?t["lineColor"+e]=a(t["lineColor"+e],20):t["lineColor"+e]=Vt(t["lineColor"+e],20);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var n=""+(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: ${n};
|
||
}
|
||
.section-${e-1} line {
|
||
stroke: ${t["cScaleInv"+e]} ;
|
||
stroke-width: 3;
|
||
}
|
||
|
||
.lineWrapper line{
|
||
stroke: ${t["cScaleLabel"+e]} ;
|
||
}
|
||
|
||
.disabled, .disabled circle, .disabled text {
|
||
fill: lightgray;
|
||
}
|
||
.disabled text {
|
||
fill: #efefef;
|
||
}
|
||
`}return r},"genSections"),Twe=mt(e=>`
|
||
.edge {
|
||
stroke-width: 3;
|
||
}
|
||
${kwe(e)}
|
||
.section-root rect, .section-root path, .section-root circle {
|
||
fill: ${e.git0};
|
||
}
|
||
.section-root text {
|
||
fill: ${e.gitBranchLabel0};
|
||
}
|
||
.icon-container {
|
||
height:100%;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
.edge {
|
||
fill: none;
|
||
}
|
||
.eventWrapper {
|
||
filter: brightness(120%);
|
||
}
|
||
`,"getStyles"),Ewe=Twe}),Awe={};$Be(Awe,{diagram:()=>Lwe});var Lwe,Nwe,Iwe,Rwe,Mwe,Dwe=e(()=>{P3e(),J3e(),Swe(),_we(),Lwe={db:B3e,renderer:wwe,parser:D3e,styles:Ewe}}),Owe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,4],n=[1,13],i=[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,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 17:case 21:n.decorateNode({class:a[o]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:n.decorateNode({icon:a[o]});break;case 25:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.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:n,7:[1,10],9:9,12:11,13:i,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:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:n,9:22,12:11,13:i,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:n,12:21,13:i,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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){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"),(Nwe=new((e.prototype=r).Parser=e)).parser=Nwe,Iwe=Nwe}),Pwe=e(()=>{Eu(),lh(),t(),An(),Rwe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Mwe=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=Rwe,this.clear(),this.getType=this.getType.bind(this),this.getMindmap=this.getMindmap.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={}}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,n){M.info("addNode",e,t,r,n);let i=D(),a=i.mindmap?.padding??yr.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:a*=2}if(t={id:this.count++,nodeId:Oc(t,i),level:e,descr:Oc(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??yr.mindmap.maxNodeWidth,padding:a},r=this.getParent(e))r.children.push(t);else if(0!==this.nodes.length)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(M.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=D(),r=this.nodes[this.nodes.length-1],e.icon&&(r.icon=Oc(e.icon,t)),e.class)&&(r.class=Oc(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"}}getLogger(){return M}}});function Bwe(e){return(Bwe="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 $we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fwe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zwe(e,t,r){return t&&Fwe(e.prototype,t),r&&Fwe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gwe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uwe(e,t){return Wwe(e)||Hwe(e,t)||Vwe(e,t)||Zwe()}function qwe(e){return jwe(e)||Ywe(e)||Vwe(e)||Kwe()}function jwe(e){if(Array.isArray(e))return Xwe(e)}function Wwe(e){if(Array.isArray(e))return e}function Ywe(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Hwe(e,t){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a=[],s=!0,o=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){o=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(o)throw i}}return a}}function Vwe(e,t){var r;if(e)return"string"==typeof e?Xwe(e,t):"Map"===(r="Object"===(r=Object.prototype.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)?Xwe(e,t):void 0}function Xwe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kwe(){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 Zwe(){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 Qwe(e,t){var r,n,i,a,s=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(s)return n=!(r=!0),{s:mt(function(){s=s.call(e)},"s"),n:mt(function(){var e=s.next();return r=e.done,e},"n"),e:mt(function(e){n=!0,i=e},"e"),f:mt(function(){try{r||null==s.return||s.return()}finally{if(n)throw i}},"f")};if(Array.isArray(e)||(s=Vwe(e))||t&&e&&"number"==typeof e.length)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 Jwe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function e6e(e,t){return e(t={exports:{}},t.exports),t.exports}function t6e(e){for(var t=e.length;t--&&N7e.test(e.charAt(t)););return t}function r6e(e){return e&&e.slice(0,I7e(e)+1).replace(R7e,"")}function n6e(e){var t=D7e.call(e,P7e),r=e[P7e];try{var n=!(e[P7e]=void 0)}catch{}var i=O7e.call(e);return n&&(t?e[P7e]=r:delete e[P7e]),i}function i6e(e){return $7e.call(e)}function a6e(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(z7e&&z7e in Object(e)?B7e:F7e)(e)}function s6e(e){return null!=e&&"object"==typeof e}function o6e(e){return"symbol"==typeof e||U7e(e)&&"[object Symbol]"==G7e(e)}function l6e(e){if("number"==typeof e)return e;if(q7e(e))return j7e;if(S7e(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=S7e(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=M7e(e);var t=Y7e.test(e);return t||H7e.test(e)?V7e(e.slice(2),t?2:8):W7e.test(e)?j7e:+e}function c6e(n,r,e){var i,a,s,o,l,c,h=0,t=!1,u=!1,d=!0;if("function"!=typeof n)throw new TypeError("Expected a function");function p(e){var t=i,r=a;return i=a=void 0,h=e,o=n.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?Z7e(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=L7e();if(m(e))return v(e);l=setTimeout(y,f(e))}function v(e){return l=void 0,d&&i?p(e):(i=a=void 0,o)}function x(){void 0!==l&&clearTimeout(l),i=c=a=l=void(h=0)}function b(){return void 0===l?o:v(L7e())}function w(){var e=L7e(),t=m(e);if(i=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=X7e(r)||0,S7e(e)&&(t=!!e.leading,u="maxWait"in e,s=u?K7e(X7e(e.maxWait)||0,r):s,d="trailing"in e?!!e.trailing:d),mt(p,"invokeFunc"),mt(g,"leadingEdge"),mt(f,"remainingWait"),mt(m,"shouldInvoke"),mt(y,"timerExpired"),mt(v,"trailingEdge"),mt(x,"cancel"),mt(b,"flush"),mt(w,"debounced"),w.cancel=x,w.flush=b,w}function h6e(e,t,r,n,i,a){var s=YTe(e)?e:TCe[e]||TCe.euclidean;return 0===t&&YTe(e)?s(i,a):s(t,r,n,i,a)}function u6e(e,t){var r;return!cSe(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!q7e(e))||uSe.test(e)||!hSe.test(e)||null!=t&&e in Object(t))}function d6e(e){return!!S7e(e)&&("[object Function]"==(e=G7e(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function p6e(e){return!!gSe&&gSe in e}function g6e(e){if(null!=e){try{return mSe.call(e)}catch{}try{return e+""}catch{}}return""}function f6e(e){return!(!S7e(e)||fSe(e))&&(pSe(e)?xSe:vSe).test(ySe(e))}function m6e(e,t){return e?.[t]}function y6e(e,t){return e=wSe(e,t),bSe(e)?e:void 0}function v6e(){this.__data__=TSe?TSe(null):{},this.size=0}function x6e(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}function b6e(e){var t,r=this.__data__;return TSe?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:ESe.call(r,e)?r[e]:void 0}function w6e(e){var t=this.__data__;return TSe?void 0!==t[e]:CSe.call(t,e)}function k6e(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=TSe&&void 0===t?"__lodash_hash_undefined__":t,this}function T6e(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function E6e(){this.__data__=[],this.size=0}function C6e(e,t){return e===t||e!=e&&t!=t}function S6e(e,t){for(var r=e.length;r--;)if(_Se(e[r][0],t))return r;return-1}function _6e(e){var t=this.__data__;return!((e=ASe(t,e))<0||(e==t.length-1?t.pop():LSe.call(t,e,1),--this.size,0))}function A6e(e){var t=this.__data__;return(e=ASe(t,e))<0?void 0:t[e][1]}function L6e(e){return-1<ASe(this.__data__,e)}function N6e(e,t){var r=this.__data__,n=ASe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function I6e(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function R6e(){this.size=0,this.__data__={hash:new SSe,map:new(ISe||NSe),string:new SSe}}function M6e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function D6e(e,t){return e=e.__data__,RSe(t)?e["string"==typeof t?"string":"hash"]:e.map}function O6e(e){return e=MSe(this,e).delete(e),this.size-=e?1:0,e}function P6e(e){return MSe(this,e).get(e)}function B6e(e){return MSe(this,e).has(e)}function $6e(e,t){var r=MSe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function F6e(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function z6e(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(OSe);var a=mt(function(){var e=arguments,t=i?i.apply(this,e):e[0],r=a.cache;return r.has(t)?r.get(t):(e=n.apply(this,e),a.cache=r.set(t,e)||r,e)},"memoized");return a.cache=new(z6e.Cache||DSe),a}function G6e(e){var t=(e=PSe(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}function U6e(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function q6e(e){var t;return"string"==typeof e?e:cSe(e)?zSe(e,q6e)+"":q7e(e)?USe?USe.call(e):"":"0"==(t=e+"")&&1/e==-GSe?"-0":t}function j6e(e){return null==e?"":qSe(e)}function W6e(e,t){return cSe(e)?e:dSe(e,t)?[e]:FSe(jSe(e))}function Y6e(e){var t;return"string"==typeof e||q7e(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}function H6e(e,t){for(var r=0,n=(t=WSe(t,e)).length;null!=e&&r<n;)e=e[YSe(t[r++])];return r&&r==n?e:void 0}function V6e(e,t,r){return void 0===(e=null==e?void 0:HSe(e,t))?r:e}function X6e(e,t,r){"__proto__"==t&&XSe?XSe(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function K6e(e,t,r){var n=e[t];ZSe.call(e,t)&&_Se(n,r)&&(void 0!==r||t in e)||KSe(e,t,r)}function Z6e(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&JSe.test(e))&&-1<e&&e%1==0&&e<t}function Q6e(e,t,r,n){if(S7e(e))for(var i=-1,a=(t=WSe(t,e)).length,s=a-1,o=e;null!=o&&++i<a;){var l,c=YSe(t[i]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;i!=s&&(l=o[c],void 0===(h=n?n(l,c,o):void 0))&&(h=S7e(l)?l:e_e(t[i+1])?[]:{}),QSe(o,c,h),o=o[c]}return e}function J6e(e,t,r){return null==e?e:t_e(e,t,r)}function eke(e,t){var r=-1,n=e.length;for(t=t||Array(n);++r<n;)t[r]=e[r];return t}function tke(e){return cSe(e)?zSe(e,YSe):q7e(e)?[e]:n_e(FSe(jSe(e)))}function rke(e,t,r,n){for(var i=[],a=new $8e,s=e.cy().hasCompoundNodes(),o=0;o<e.length;o++){var l=e[o];r?i.push(l):s&&n(i,a,l)}for(;0<i.length;){var c=i.shift();t(c),a.add(c.id()),s&&n(i,a,c)}return e}function nke(e,t,r){if(r.isParent())for(var n=r._private.children,i=0;i<n.length;i++){var a=n[i];t.has(a.id())||e.push(a)}}function ike(e,t,r){r.isChild()&&(r=r._private.parent,t.has(r.id())||e.push(r))}function ake(e,t,r){ike(e,t,r),nke(e,t,r)}function ske(s){return function(e){if(void 0===e&&(e=!0),0!==this.length&&this.isNode()&&!this.removed()){for(var t=0,r=this[0],n=r._private.edges,i=0;i<n.length;i++){var a=n[i];!e&&a.isLoop()||(t+=s(r,a))}return t}}}function oke(a,s){return function(e){for(var t,r=this.nodes(),n=0;n<r.length;n++){var i=r[n][a](e);void 0===i||void 0!==t&&!s(i,t)||(t=i)}return t}}function lke(){return!1}function cke(){return!0}function hke(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:K_e,t=1<arguments.length?arguments[1]:void 0,r=0;r<X_e.length;r++){var n=X_e[r];this[n]=e[n]||V_e[n]}this.context=t||this.context,this.listeners=[],this.emitting=0}function uke(e,t,r){var n,i=r._private;return null==(n=(i=i.styleCache=i.styleCache||[])[e])?i[e]=t(r):n}function dke(t,r){return t=u8e(t),mt(function(e){return uke(t,r,e)},"cachedStyleFunction")}function pke(t,r){t=u8e(t);var n=mt(function(e){return r.call(e)},"selfFn");return mt(function(){var e=this[0];if(e)return uke(t,n,e)},"cachedPrototypeStyleFunction")}function gke(e,t){var r=e._private.data.parent?e.parents():null;if(r)for(var n=0;n<r.length;n++)if(!t(r[n]))return!1;return!0}function fke(e){var n=e.ok,i=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,!!n(e)&&(e.isNode()?!r||gke(e,a):(e=t.source,t=t.target,i(e)&&(!r||gke(e,i))&&(e===t||i(t)&&(!r||gke(t,i)))))):void 0)}}function mke(l){return function(){var e=[];if(2===(t=arguments).length)this.on(l.event,t[0],t[1]);else if(1===t.length&&YTe(t[0]))this.on(l.event,t[0]);else if(0===t.length||1===t.length&&HTe(t[0])){for(var t=1===t.length?t[0]:null,r=0;r<this.length;r++){var n=this[r],i=!l.ableField||n._private[l.ableField],a=n._private[l.field]!=l.value;if(l.overrideAble){var s=l.overrideAble(n);if(void 0!==s&&!(i=s))return this}i&&(n._private[l.field]=l.value,a)&&e.push(n)}var o=this.spawn(e);o.updateStyle(),o.emit(l.event),t&&o.emit(t)}return this}}function yke(r){sAe[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]}},sAe[r.on]=mke({event:r.on,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!0}),sAe[r.off]=mke({event:r.off,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!1})}function vke(i){return mt(function(e){for(var t=[],r=0;r<this.length;r++){var n=this[r]._private[i.attr];n&&t.push(n)}return this.spawn(t,!0).filter(e)},"sourceImpl")}function xke(h){return mt(function(e){var t=[],r=this._private.cy,n=h||{};WTe(e)&&(e=r.$(e));for(var i=0;i<e.length;i++)for(var a=e[i]._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||(n.thisIsSrc||n.thisIsTgt)&&(n.thisIsSrc&&!c||n.thisIsTgt&&!l)||t.push(o)}return this.spawn(t,!0)},"edgesWithImpl")}function bke(f){return f=y7e({},{codirected:!1},f),mt(function(e){for(var t=[],r=this.edges(),n=f,i=0;i<r.length;i++)for(var a=r[i]._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;(n.codirected&&g||!n.codirected&&(g||o===d&&l===p))&&t.push(u)}return this.spawn(t,!0).filter(e)},"parallelEdgesImpl")}function wke(s,t,o,r){var e=typeof Float32Array<"u";if(4!==arguments.length)return!1;for(var n=0;n<4;++n)if("number"!=typeof arguments[n]||isNaN(arguments[n])||!isFinite(arguments[n]))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 i(e,t){return 1-3*t+3*e}function l(e,t,r){return((i(t,r)*e+(3*r-6*t))*e+3*t)*e}function c(e,t,r){return 3*i(t,r)*e*e+2*(3*r-6*t)*e+3*t}function h(e,t){for(var r=0;r<4;++r){var n=c(t,s,o);if(0===n)return t;t-=(l(t,s,o)-e)/n}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 n,i,a=0;0<(n=l(i=t+(r-t)/2,s,o)-e)?r=i:t=i,1e-7<Math.abs(n)&&++a<10;);return i}function p(e){for(var t=0,r=1;10!==r&&a[r]<=e;++r)t+=.1;var n=t+(e-a[--r])/(a[r+1]-a[r])*.1,i=c(n,s,o);return.001<=i?h(e,n):0===i?n:d(e,t,t+.1)}mt(i,"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 kke(e,t,r,n,i){return 1===n||t===r?r:(i=i(t,r,n),null!=e&&((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max)?Math.min(i,e.max):i)}function Tke(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Eke(e,t,r,n,i){var a=null!=i?i.type:null,s=(r<0?r=0:1<r&&(r=1),Tke(e,i)),o=Tke(t,i);if(ae(s)&&ae(o))return kke(a,s,o,r,n);if(HTe(s)&&HTe(o)){for(var l=[],c=0;c<o.length;c++){var h=s[c],u=o[c];null!=h&&null!=u?(h=kke(a,h,u,r,n),l.push(h)):l.push(u)}return l}}function Cke(e,t,r,n){var i=!n,a=e._private,s=t._private,t=s.easing,o=s.startTime,l=(n?e:e.cy()).style(),c=(s.easingImpl||(null==t?s.easingImpl=hAe.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=hAe[u].apply(null,t)):s.easingImpl=hAe[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)&&i&&!e.locked()&&(r={},Ske(t.x,u.x)&&(r.x=Eke(t.x,u.x,h,c)),Ske(t.y,u.y)&&(r.y=Eke(t.y,u.y,h,c)),e.position(r)),s.startPan),t=s.pan,u=a.pan,u=((r=null!=t&&n)&&(Ske(o.x,t.x)&&(u.x=Eke(o.x,t.x,h,c)),Ske(o.y,t.y)&&(u.y=Eke(o.y,t.y,h,c)),e.emit("pan")),s.startZoom),d=((t=null!=(o=s.zoom)&&n)&&(Ske(u,o)&&(a.zoom=dEe(a.minZoom,Eke(u,o,h,c),a.maxZoom)),e.emit("zoom")),(r||t)&&e.emit("viewport"),s.style);if(d&&0<d.length&&i){for(var p=0;p<d.length;p++){var g=(m=d[p]).name,f=s.startStyle[g],m=Eke(f,m,h,c,l.properties[f.name]);l.overrideBypass(e,g,m)}e.emit("style")}}return s.progress=h}function Ske(e,t){return!(null==e||null==t||!(ae(e)&&ae(t)||e&&t))}function _ke(e,t,r,n){(t=t._private).started=!0,t.startTime=r-t.progress*t.duration}function Ake(h,e){var t=e._private.aniEles,u=[];function r(e,t){var r,n=(i=e._private).animation.current,i=i.animation.queue,a=!1;0===n.length&&(r=i.shift())&&n.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=n.length-1;0<=o;o--){var l=n[o],c=l._private;c.stopped?(n.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||_ke(0,l,h),Cke(e,l,h,t),c.applying&&(c.applying=!1),s(c.frames),null!=c.step&&c.step(h),l.completed()&&(n.splice(o,1),c.hooked=!1,c.playing=!1,c.started=!1,s(c.completes)),a=!0)}return t||0!==n.length||0!==i.length||u.push(e),a}mt(r,"stepOne");for(var n=!1,i=0;i<t.length;i++)var a=r(t[i]),n=n||a;var s=r(e,!0);(n||s)&&(0<t.length?e.notify("draw",t):e.notify("draw")),t.unmerge(u),e.emit("step")}function Lke(e){this.options=y7e({},xAe,bAe,e)}function Nke(e){this.options=y7e({},TAe,e)}function Ike(e){this.options=y7e({},EAe,e)}function Rke(e){this.options=y7e({},SAe,e);var i=(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=i.some(function(e){return e.data("id")===t}),n=i.some(function(e){return e.data("id")===r});return!e||!n});this.options.eles=this.options.eles.not(e)}function Mke(e){this.options=y7e({},YAe,e)}function Dke(e){this.options=y7e({},HAe,e)}function Oke(e){this.options=y7e({},VAe,e)}function Pke(e){this.options=y7e({},XAe,e)}function Bke(e){this.options=e,this.notifications=0}function $ke(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 Fke(e,t,r,n){return 0===n||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}:(f9e(e,t,r,n,!(4<arguments.length&&void 0!==arguments[4])||arguments[4]),{cx:ZAe,cy:QAe,radius:i9e,startX:l9e,startY:c9e,stopX:h9e,stopY:u9e,startAngle:JAe.ang+Math.PI/2*t9e,endAngle:e9e.ang-Math.PI/2*t9e,counterClockwise:r9e})}function zke(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 Gke(e,t,r){for(var n=mt(function(e,t,r,n){return cEe(e,t,r,n)},"qbezierAt$1"),i=t._private.rstyle.bezierPts,a=0;a<e.bezierProjPcts.length;a++){var s=e.bezierProjPcts[a];i.push({x:n(r[0],r[2],r[4],s),y:n(r[1],r[3],r[5],s)})}}function Uke(e,t){for(var r=0;r<t.length;r++){var n=t[r];e.lineTo(n.x,n.y)}}function qke(e,t,r){for(var n,i=0;i<t.length;i++){var a=t[i];0===i&&(n=a),e.lineTo(a.x,a.y)}e.quadraticCurveTo(r.x,r.y,n.x,n.y)}function jke(e,t,r){e.beginPath&&e.beginPath();for(var n=t,i=0;i<n.length;i++){var a=n[i];e.lineTo(a.x,a.y)}var s=r,t=r[0];for(e.moveTo(t.x,t.y),i=1;i<s.length;i++)a=s[i],e.lineTo(a.x,a.y);e.closePath&&e.closePath()}function Wke(e,t,r,n,i){e.beginPath&&e.beginPath(),e.arc(r,n,i,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 Yke(e,t,r,n){e.arc(t,r,n,0,2*Math.PI,!1)}function Hke(e,t,r,n,i){var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:5,s=6<arguments.length?arguments[6]:void 0;e.beginPath(),e.moveTo(t+a,r),e.lineTo(t+n-a,r),e.quadraticCurveTo(t+n,r,t+n,r+a),e.lineTo(t+n,r+i-a),e.quadraticCurveTo(t+n,r+i,t+n-a,r+i),e.lineTo(t+a,r+i),e.quadraticCurveTo(t,r+i,t,r+i-a),e.lineTo(t,r+a),e.quadraticCurveTo(t,r,t+a,r),e.closePath(),s?e.stroke():e.fill()}function Vke(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 Xke(e,t,r){var t=Vke(e,e.VERTEX_SHADER,t),r=Vke(e,e.FRAGMENT_SHADER,r),n=e.createProgram();if(e.attachShader(n,t),e.attachShader(n,r),e.linkProgram(n),e.getProgramParameter(n,e.LINK_STATUS))return n;throw new Error("Could not initialize shaders")}function Kke(e,t,r){var n=e.makeOffscreenCanvas(t,r=void 0===r?t:r),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function Zke(e){var t=e.pixelRatio;return{zoom:e.cy.zoom()*t,pan:{x:(e=e.cy.pan()).x*t,y:e.y*t}}}function Qke(e,t,r,n,i){return n=n*r+t.x,i=i*r+t.y,[n,Math.round(e.canvasHeight-i)]}function Jke(e,t,r){var n=e[0]/255,i=e[1]/255,e=e[2]/255;return(r=r||new Array(4))[0]=n*t,r[1]=i*t,r[2]=e*t,r[3]=t,r}function eTe(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 tTe(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function rTe(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 nTe(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 iTe(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function aTe(e,t,r,n,i,a){switch(t){case e.FLOAT:return new Float32Array(r.buffer,a*n,i);case e.INT:return new Int32Array(r.buffer,a*n,i)}}function sTe(e,t,r,n){var i=(t=Uwe(nTe(e,t),2))[0],n=iTe(e,t=t[1],n),a=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,n,e.STATIC_DRAW),t===e.FLOAT?e.vertexAttribPointer(r,i,t,!1,0,0):t===e.INT&&e.vertexAttribIPointer(r,i,t,0,0),e.enableVertexAttribArray(r),e.bindBuffer(e.ARRAY_BUFFER,null),a}function oTe(t,e,r,n){var i=(r=Uwe(nTe(t,r),3))[0],a=r[1],r=r[2],s=iTe(t,a,e*i),o=i*r,l=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferData(t.ARRAY_BUFFER,e*o,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),a===t.FLOAT?t.vertexAttribPointer(n,i,a,!1,o,0):a===t.INT&&t.vertexAttribIPointer(n,i,a,o,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;h<e;h++)c[h]=aTe(t,a,s,o,i,h);return l.dataArray=s,l.stride=o,l.size=i,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*i):t.bufferSubData(t.ARRAY_BUFFER,0,s)},l}function lTe(r){var e=r.createFramebuffer(),n=(r.bindFramebuffer(r.FRAMEBUFFER,e),r.createTexture());return r.bindTexture(r.TEXTURE_2D,n),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,n,0),r.bindFramebuffer(r.FRAMEBUFFER,null),e.setFramebufferAttachmentSizes=function(e,t){r.bindTexture(r.TEXTURE_2D,n),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e,t,0,r.RGBA,r.UNSIGNED_BYTE,null)},e}function cTe(){var e=new V9e(9);return V9e!=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 hTe(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 uTe(e,t,r){var n=t[0],i=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*n+d*s+p*c,e[1]=u*i+d*o+p*h,e[2]=u*a+d*l+p*t,e[3]=g*n+f*s+m*c,e[4]=g*i+f*o+m*h,e[5]=g*a+f*l+m*t,e[6]=y*n+v*s+r*c,e[7]=y*i+v*o+r*h,e[8]=y*a+v*l+r*t,e}function dTe(e,t,r){var n=t[0],i=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]=n,e[1]=i,e[2]=a,e[3]=s,e[4]=o,e[5]=l,e[6]=u*n+r*s+c,e[7]=u*i+r*o+h,e[8]=u*a+r*l+t,e}function pTe(e,t,r){var n=t[0],i=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*n+u*s,e[1]=r*i+u*o,e[2]=r*a+u*l,e[3]=r*s-u*n,e[4]=r*o-u*i,e[5]=r*l-u*a,e[6]=c,e[7]=h,e[8]=t,e}function gTe(e,t,r){var n=r[0],r=r[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*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 fTe(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 mTe(e,t){return e.intersection?e.intersection(t):new Set(qwe(e).filter(function(e){return t.has(e)}))}function yTe(e,t){return"rgba(".concat(e[0],", ").concat(e[1],", ").concat(e[2],", ").concat(t,")")}function vTe(e){return e=e&&e.style&&e.style.backgroundColor||"white",k7e(e)}function xTe(i){var r=i.render,t=(i.render=function(e){e=e||{};var t=i.cy;i.webgl&&(7.99<t.zoom()?(bTe(i),r.call(i,e)):(wTe(i),LTe(i,e,X9e.SCREEN)))},i.matchCanvasSize),e=(i.matchCanvasSize=function(e){t.call(i,e),i.pickingFrameBuffer.setFramebufferAttachmentSizes(i.canvasWidth,i.canvasHeight),i.pickingFrameBuffer.needsDraw=!0},i.findNearestElements=function(e,t,r,n){return ATe(i,e,t)},i.invalidateCachedZSortedEles),n=(i.invalidateCachedZSortedEles=function(){e.call(i),i.pickingFrameBuffer.needsDraw=!0},i.notify);i.notify=function(e,t){n.call(i,e,t),"viewport"===e||"bounds"===e?i.pickingFrameBuffer.needsDraw=!0:"background"===e&&i.eleDrawing.invalidate(t,{type:"node-body"})}}function bTe(e){(e=e.data.contexts[e.WEBGL]).clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function wTe(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 kTe(e){var t=e.canvasWidth,r=e.canvasHeight,n=(e=Zke(e)).pan,e=e.zoom,i=cTe();return dTe(i,i,[n.x,n.y]),gTe(i,i,[e,e]),fTe(n=cTe(),t,r),uTe(e=cTe(),n,i),e}function TTe(e,t){var r=e.canvasWidth,n=e.canvasHeight,i=(e=Zke(e)).pan,e=e.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,r,n),t.translate(i.x,i.y),t.scale(e,e)}function ETe(t,e){t.drawSelectionRectangle(e,function(e){return TTe(t,e)})}function CTe(e){var t=e.data.contexts[e.NODE];t.save(),TTe(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 STe(u){var e=mt(function(e,t,r){for(var e=e.atlasManager.getRenderTypeOpts(t),n=u.data.contexts[u.NODE],i=e.atlasCollection.atlases,a=0;a<i.length;a++){var s=i[a].canvas,o=s.width,l=s.height,c=o*a,h=s.height*r;n.save(),n.scale(.125,.125),n.drawImage(s,c,h),n.strokeStyle="black",n.rect(c,h,o,l),n.stroke(),n.restore()}},"draw");e(u.eleDrawing,"node-body",0),e(u.eleDrawing,"node-label",1)}function _Te(e,t,r,n,i){var a,s,o,l=(c=Zke(e)).pan,c=c.zoom;if(i=void 0===n||void 0===i?(a=(s=Uwe(Qke(e,l,c,t,r),2))[0]-3,s=s[1]-3,o=6):(r=(t=Uwe(Qke(e,l,c,t,r),2))[0],t=t[1],c=(l=Uwe(Qke(e,l,c,n,i),2))[0],a=r,s=n=l[1],o=Math.abs(c-r),Math.abs(n-t)),0===o||0===i)return[];(l=e.data.contexts[e.WEBGL]).bindFramebuffer(l.FRAMEBUFFER,e.pickingFrameBuffer),e.pickingFrameBuffer.needsDraw&&(l.viewport(0,0,l.canvas.width,l.canvas.height),LTe(e,null,X9e.PICKING),e.pickingFrameBuffer.needsDraw=!1);var h=o*i,u=new Uint8Array(4*h);l.readPixels(a,s,o,i,l.RGBA,l.UNSIGNED_BYTE,u),l.bindFramebuffer(l.FRAMEBUFFER,null);for(var d=new Set,p=0;p<h;p++){var g=tTe(u.slice(4*p,4*p+4))-1;0<=g&&d.add(g)}return d}function ATe(e,t,r){var n,i,a,t=_Te(e,t,r),s=e.getCachedZSortedEles(),o=Qwe(t);try{for(o.s();!(a=o.n()).done;){var l=s[a.value];if(!n&&l.isNode()&&(n=l),!i&&l.isEdge()&&(i=l),n&&i)break}}catch(e){o.e(e)}finally{o.f()}return[n,i].filter(Boolean)}function LTe(e,t,r){e.webglDebug&&(i=[],n=performance.now());var n,i,a=e.eleDrawing,s=0;if(r.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&ETe(e,t),e.data.canvasNeedsRedraw[e.NODE]||r.picking){var o=mt(function(e,t){t+=1,e.isNode()?(a.drawTexture(e,t,"node-underlay"),a.drawTexture(e,t,"node-body"),a.drawTexture(e,t,"node-label"),a.drawTexture(e,t,"node-overlay")):(a.drawEdgeLine(e,t),a.drawEdgeArrow(e,t,"source"),a.drawEdgeArrow(e,t,"target"),a.drawTexture(e,t,"edge-label"))},"draw"),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),kTe(e)),l=e.getCachedZSortedEles(),s=l.length;if(a.startFrame(t,i,r),r.screen){for(var c=0;c<l.nondrag.length;c++)o(l.nondrag[c],c);for(var h=0;h<l.drag.length;h++)o(l.drag[h],-1)}else if(r.picking)for(var u=0;u<l.length;u++)o(l[u],u);a.endFrame(),e.data.gc&&(console.log("Garbage Collect!"),e.data.gc=!1,a.gc()),r.screen&&e.webglDebugShowAtlases&&(CTe(e),STe(e)),e.data.canvasNeedsRedraw[e.NODE]=!1,e.data.canvasNeedsRedraw[e.DRAG]=!1}if(e.webglDebug){var d,t=performance.now(),p=0,g=0,f=Qwe(i);try{for(f.s();!(d=f.n()).done;)p++,g+=d.value.count}catch(e){f.e(e)}finally{f.f()}Math.ceil(t-n),e="".concat(s," elements, ").concat(g," rectangles, ").concat(p," batches"),console.log("WebGL (".concat(r.name,") - ").concat(e))}}function NTe(e,t){for(var r=atob(e),e=new ArrayBuffer(r.length),n=new Uint8Array(e),i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return new Blob([e],{type:t})}function ITe(e){var t=e.indexOf(",");return e.substr(t+1)}function RTe(e,n,i){var t=mt(function(){return n.toDataURL(i,e.quality)},"getB64Uri");switch(e.output){case"blob-promise":return new oSe(function(t,r){try{n.toBlob(function(e){null!=e?t(e):r(new Error("`canvas.toBlob()` sent a null value in its callback"))},i,e.quality)}catch(e){r(e)}});case"blob":return NTe(ITe(t()),i);case"base64":return ITe(t());default:return t()}}function MTe(e){var a=this,t=a.cy.window().document,r=(e.webgl&&(pLe.CANVAS_LAYERS=a.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),a.data={canvases:new Array(pLe.CANVAS_LAYERS),contexts:new Array(pLe.CANVAS_LAYERS),canvasNeedsRedraw:new Array(pLe.CANVAS_LAYERS),bufferCanvases:new Array(pLe.BUFFER_COUNT),bufferContexts:new Array(pLe.CANVAS_LAYERS)},"-webkit-tap-highlight-color"),n="rgba(0,0,0,0)",i=(a.data.canvasContainer=t.createElement("div"),a.data.canvasContainer.style),s=(a.data.canvasContainer.style[r]=n,i.position="relative",i.zIndex="0",i.overflow="hidden",(i=e.cy.container()).appendChild(a.data.canvasContainer),i.style[r]=n,{"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"});l7e()&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var o=0;o<pLe.CANVAS_LAYERS;o++){var l=a.data.canvases[o]=t.createElement("canvas"),c=pLe.CANVAS_TYPES[o];a.data.contexts[o]=l.getContext(c),a.data.contexts[o]||k8e("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(pLe.CANVAS_LAYERS-o),a.data.canvasContainer.appendChild(l),a.data.canvasNeedsRedraw[o]=!1}for(a.data.topCanvas=a.data.canvases[0],a.data.canvases[pLe.NODE].setAttribute("data-id","layer"+pLe.NODE+"-node"),a.data.canvases[pLe.SELECT_BOX].setAttribute("data-id","layer"+pLe.SELECT_BOX+"-selectbox"),a.data.canvases[pLe.DRAG].setAttribute("data-id","layer"+pLe.DRAG+"-drag"),a.data.canvases[pLe.WEBGL]&&a.data.canvases[pLe.WEBGL].setAttribute("data-id","layer"+pLe.WEBGL+"-webgl"),o=0;o<pLe.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=pEe(),u=mt(function(e){return{x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2}},"getBoxCenter"),d=mt(function(e){return{x:-e.w/2,y:-e.h/2}},"getCenterOffset"),i=mt(function(e){return!((e=e[0]._private).oldBackgroundTimestamp===e.backgroundTimestamp)},"backgroundTimestampHasChanged"),r=mt(function(e){return e[0]._private.nodeKey},"getStyleKey"),n=mt(function(e){return e[0]._private.labelStyleKey},"getLabelKey"),p=mt(function(e){return e[0]._private.sourceLabelStyleKey},"getSourceLabelKey"),g=mt(function(e){return e[0]._private.targetLabelStyleKey},"getTargetLabelKey"),f=mt(function(e,t,r,n,i){return a.drawElement(e,t,r,!1,!1,i)},"drawElement"),m=mt(function(e,t,r,n,i){return a.drawElementText(e,t,r,n,"main",i)},"drawLabel"),y=mt(function(e,t,r,n,i){return a.drawElementText(e,t,r,n,"source",i)},"drawSourceLabel"),v=mt(function(e,t,r,n,i){return a.drawElementText(e,t,r,n,"target",i)},"drawTargetLabel"),x=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"),w=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.source||h},"getSourceLabelBox"),k=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.target||h},"getTargetLabelBox"),T=mt(function(e,t){return t},"isLabelVisibleAtScale"),E=mt(function(e){return u(x(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"),_=mt(function(e){return C("",S(e,"labelX","labelY"),e)},"getLabelRotationPoint"),A=mt(function(e){return C("source",S(e,"sourceLabelX","sourceLabelY"),e)},"getSourceLabelRotationPoint"),P=mt(function(e){return C("target",S(e,"targetLabelX","targetLabelY"),e)},"getTargetLabelRotationPoint"),L=mt(function(e){return d(x(e))},"getElementRotationOffset"),B=mt(function(e){return d(w(e))},"getSourceLabelRotationOffset"),$=mt(function(e){return d(k(e))},"getTargetLabelRotationOffset"),N=mt(function(e){var t=b(e),r=d(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"),I=a.data.eleTxrCache=new _9e(a,{getKey:r,doesEleInvalidateKey:i,drawElement:f,getBoundingBox:x,getRotationPoint:E,getRotationOffset:L,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),R=a.data.lblTxrCache=new _9e(a,{getKey:n,drawElement:m,getBoundingBox:b,getRotationPoint:_,getRotationOffset:N,isVisible:T}),M=a.data.slbTxrCache=new _9e(a,{getKey:p,drawElement:y,getBoundingBox:w,getRotationPoint:A,getRotationOffset:B,isVisible:T}),D=a.data.tlbTxrCache=new _9e(a,{getKey:g,drawElement:v,getBoundingBox:k,getRotationPoint:P,getRotationOffset:$,isVisible:T}),O=a.data.lyrTxrCache=new A9e(a),i=(a.onUpdateEleCalcs(mt(function(e,t){I.invalidateElements(t),R.invalidateElements(t),M.invalidateElements(t),D.invalidateElements(t),O.invalidateElements(t);for(var r=0;r<t.length;r++){var n=t[r]._private;n.oldBackgroundTimestamp=n.backgroundTimestamp}},"invalidateTextureCaches")),mt(function(e){for(var t=0;t<e.length;t++)O.enqueueElementRefinement(e[t].ele)},"refineInLayers"));I.onDequeue(i),R.onDequeue(i),M.onDequeue(i),D.onDequeue(i),e.webgl&&a.initWebgl(e,{getStyleKey:r,getLabelKey:n,drawElement:f,drawLabel:m,getElementBox:x,getLabelBox:b,getElementRotationPoint:E,getElementRotationOffset:L,getLabelRotationPoint:_,getLabelRotationOffset:N})}function DTe(t,r,n){var e=n,i=mt(function(e){E8e("Can not register `"+r+"` for `"+t+"` since `"+e+"` already exists in the prototype and can not be overridden")},"overrideErr");if("core"===t){if(yAe.prototype[r])return i(r);yAe.prototype[r]=n}else if("collection"===t){if(oAe.prototype[r])return i(r);oAe.prototype[r]=n}else if("layout"===t){for(var a=(g=mt(function(e){this.options=e,n.call(this,e),VTe(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},"Layout")).prototype=Object.create(n.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=n.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")};y7e(a,{createEmitter:mt(function(){return this._private.emitter=new hke(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")}),a_e.eventAliasesOn(a),e=g}else if("renderer"===t&&"null"!==r&&"base"!==r){var d,p,g,f=OTe("renderer","base"),m=f.prototype,y=n,v=n.prototype,x=(g=mt(function(){f.apply(this,arguments),y.apply(this,arguments)},"Renderer")).prototype;for(d in m){var b=m[d];if(null!=v[d])return i(d);x[d]=b}for(p in v)x[p]=v[p];m.clientFunctions.forEach(function(e){x[e]=x[e]||function(){k8e("Renderer does not implement `renderer."+e+"()` on its prototype")}}),e=g}else if("__proto__"===t||"constructor"===t||"prototype"===t)return k8e(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return E7e({map:mLe,keys:[t,r],value:e})}function OTe(e,t){return C7e({map:mLe,keys:[e,t]})}function PTe(e,t,r,n,i){return E7e({map:yLe,keys:[e,t,r,n],value:i})}function BTe(e,t,r,n){return C7e({map:yLe,keys:[e,t,r,n]})}var $Te,FTe,zTe,GTe,UTe,qTe,jTe,WTe,YTe,HTe,VTe,XTe,ae,KTe,ZTe,QTe,JTe,e7e,t7e,r7e,n7e,i7e,a7e,s7e,o7e,l7e,c7e,h7e,u7e,d7e,p7e,g7e,f7e,m7e,y7e,v7e,x7e,b7e,w7e,k7e,T7e,E7e,C7e,S7e,_7e,A7e,L7e,N7e,I7e,R7e,M7e,D7e,O7e,P7e,B7e,$7e,F7e,z7e,G7e,U7e,q7e,j7e,W7e,Y7e,H7e,V7e,X7e,K7e,Z7e,Q7e,J7e,e8e,t8e,r8e,n8e,i8e,a8e,s8e,o8e,l8e,c8e,h8e,u8e,d8e,p8e,g8e,f8e,m8e,y8e,v8e,x8e,b8e,w8e,k8e,T8e,E8e,C8e,S8e,_8e,A8e,L8e,N8e,I8e,R8e,M8e,D8e,O8e,P8e,B8e,$8e,F8e,z8e,G8e,U8e,q8e,j8e,W8e,Y8e,H8e,V8e,X8e,K8e,Z8e,Q8e,J8e,eEe,tEe,rEe,nEe,iEe,aEe,sEe,oEe,lEe,cEe,hEe,uEe,dEe,pEe,gEe,fEe,mEe,yEe,vEe,xEe,bEe,wEe,kEe,TEe,EEe,CEe,SEe,_Ee,AEe,LEe,NEe,IEe,REe,MEe,DEe,OEe,PEe,BEe,$Ee,FEe,zEe,GEe,UEe,qEe,jEe,WEe,YEe,HEe,VEe,XEe,KEe,ZEe,QEe,JEe,eCe,tCe,rCe,nCe,iCe,aCe,sCe,oCe,lCe,cCe,hCe,uCe,dCe,pCe,gCe,fCe,mCe,yCe,vCe,xCe,bCe,wCe,kCe,TCe,ECe,CCe,SCe,_Ce,ACe,LCe,NCe,ICe,RCe,MCe,DCe,OCe,PCe,BCe,$Ce,FCe,zCe,GCe,UCe,qCe,jCe,WCe,YCe,HCe,VCe,XCe,KCe,ZCe,QCe,JCe,eSe,tSe,rSe,nSe,iSe,aSe,sSe,oSe,lSe,cSe,hSe,uSe,dSe,pSe,gSe,fSe,mSe,ySe,vSe,xSe,bSe,wSe,kSe,TSe,ESe,CSe,SSe,_Se,ASe,LSe,NSe,ISe,RSe,MSe,DSe,OSe,PSe,BSe,$Se,FSe,zSe,GSe,USe,qSe,jSe,WSe,YSe,HSe,VSe,XSe,KSe,ZSe,QSe,JSe,e_e,t_e,r_e,n_e,i_e,a_e,s_e,o_e,Q,l_e,c_e,h_e,u_e,d_e,p_e,g_e,f_e,m_e,y_e,v_e,x_e,b_e,w_e,k_e,T_e,E_e,C_e,S_e,__e,A_e,L_e,N_e,I_e,R_e,M_e,D_e,O_e,P_e,B_e,$_e,F_e,z_e,G_e,U_e,q_e,j_e,W_e,Y_e,H_e,V_e,X_e,K_e,Z_e,Q_e,J_e,eAe,tAe,rAe,nAe,iAe,aAe,sAe,oAe,lAe,cAe,hAe,uAe,dAe,pAe,gAe,fAe,mAe,yAe,vAe,xAe,bAe,wAe,kAe,TAe,EAe,CAe,SAe,_Ae,AAe,LAe,NAe,IAe,RAe,MAe,DAe,OAe,PAe,BAe,$Ae,FAe,zAe,GAe,UAe,qAe,jAe,WAe,YAe,HAe,VAe,XAe,KAe,ZAe,QAe,JAe,e9e,t9e,r9e,n9e,i9e,a9e,s9e,o9e,l9e,c9e,h9e,u9e,d9e,p9e,g9e,f9e,m9e,y9e,v9e,x9e,b9e,w9e,k9e,T9e,E9e,C9e,S9e,_9e,A9e,L9e,N9e,I9e,R9e,M9e,D9e,O9e,P9e,B9e,$9e,F9e,z9e,G9e,U9e,q9e,j9e,W9e,Y9e,H9e,V9e,X9e,K9e,Z9e,Q9e,J9e,eLe,tLe,rLe,nLe,iLe,aLe,sLe,oLe,lLe,cLe,hLe,uLe,dLe,pLe,gLe,fLe,mLe,yLe,vLe,J,xLe,bLe,wLe=e(()=>{function n(e){if($we(this,n),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(){$we(this,e),this._obj={}}mt(Bwe,"_typeof"),mt($we,"_classCallCheck"),mt(Fwe,"_defineProperties"),mt(zwe,"_createClass"),mt(Gwe,"_defineProperty$1"),mt(Uwe,"_slicedToArray"),mt(qwe,"_toConsumableArray"),mt(jwe,"_arrayWithoutHoles"),mt(Wwe,"_arrayWithHoles"),mt(Ywe,"_iterableToArray"),mt(Hwe,"_iterableToArrayLimit"),mt(Vwe,"_unsupportedIterableToArray"),mt(Xwe,"_arrayLikeToArray"),mt(Kwe,"_nonIterableSpread"),mt(Zwe,"_nonIterableRest"),mt(Qwe,"_createForOfIteratorHelper"),$Te="u"<typeof window?null:window,FTe=$Te?$Te.navigator:null,$Te&&$Te.document,zTe=Bwe(""),GTe=Bwe({}),UTe=Bwe(function(){}),qTe="u"<typeof HTMLElement?"undefined":Bwe(HTMLElement),jTe=mt(function(e){return e&&e.instanceString&&YTe(e.instanceString)?e.instanceString():null},"instanceStr"),WTe=mt(function(e){return null!=e&&Bwe(e)==zTe},"string"),YTe=mt(function(e){return null!=e&&Bwe(e)===UTe},"fn"),HTe=mt(function(e){return!QTe(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},"array"),VTe=mt(function(e){return null!=e&&Bwe(e)===GTe&&!HTe(e)&&e.constructor===Object},"plainObject"),XTe=mt(function(e){return null!=e&&Bwe(e)===GTe},"object"),ae=mt(function(e){return null!=e&&Bwe(e)===Bwe(1)&&!isNaN(e)},"number"),KTe=mt(function(e){return ae(e)&&Math.floor(e)===e},"integer"),ZTe=mt(function(e){if("undefined"!==qTe)return null!=e&&e instanceof HTMLElement},"htmlElement"),QTe=mt(function(e){return JTe(e)||e7e(e)},"elementOrCollection"),JTe=mt(function(e){return"collection"===jTe(e)&&e._private.single},"element"),e7e=mt(function(e){return"collection"===jTe(e)&&!e._private.single},"collection"),t7e=mt(function(e){return"core"===jTe(e)},"core"),r7e=mt(function(e){return"stylesheet"===jTe(e)},"stylesheet"),n7e=mt(function(e){return"event"===jTe(e)},"event"),i7e=mt(function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},"emptyString"),a7e=mt(function(e){return!("u"<typeof HTMLElement)&&e instanceof HTMLElement},"domElement"),s7e=mt(function(e){return VTe(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},"boundingBox"),o7e=mt(function(e){return XTe(e)&&YTe(e.then)},"promise"),l7e=mt(function(){return FTe&&FTe.userAgent.match(/msie|trident|edge/i)},"ms"),c7e=mt(function(i,a){a=a||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 e=mt(function e(){var t=arguments,r=a.apply(this,t),n=e.cache;return n[r]||(n[r]=i.apply(this,t))},"memoizedFn");return e.cache={},e},"memoize"),h7e=c7e(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),u7e=c7e(function(e){return e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),d7e=c7e(function(e,t){return e+t[0].toUpperCase()+t.substring(1)},function(e,t){return e+"$"+t}),p7e=mt(function(e){return i7e(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},"capitalize"),g7e="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",f7e=mt(function(e,t){return e<t?-1:t<e?1:0},"ascending"),m7e=mt(function(e,t){return-1*f7e(e,t)},"descending"),y7e=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,r=1;r<t.length;r++){var n=t[r];if(null!=n)for(var i=Object.keys(n),a=0;a<i.length;a++){var s=i[a];e[s]=n[s]}}return e},v7e=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"),x7e=mt(function(e){var t,r,n,i,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,(i=parseFloat(e[3]))<0)||100<i||(i/=100,void 0!==(n=e[4])&&((n=parseFloat(n))<0||1<n)))return;0===r?a=s=o=Math.round(255*i):(i=2*i-(e=i<.5?i*(1+r):i+r-i*r),a=Math.round(255*l(i,e,t+1/3)),s=Math.round(255*l(i,e,t)),o=Math.round(255*l(i,e,t-1/3))),r=[a,s,o,n]}return r},"hsl2tuple"),b7e=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=[],n=[],i=1;i<=3;i++){var a=t[i];if("%"===a[a.length-1]&&(n[i]=!0),a=parseFloat(a),(a=n[i]?a/100*255:a)<0||255<a)return;r.push(Math.floor(a))}if((n[1]||n[2]||n[3])&&!(n[1]&&n[2]&&n[3]))return;if(void 0!==(e=t[4])){if((e=parseFloat(e))<0||1<e)return;r.push(e)}}return r},"rgb2tuple"),w7e=mt(function(e){return T7e[e.toLowerCase()]},"colorname2tuple"),k7e=mt(function(e){return(HTe(e)?e:null)||w7e(e)||v7e(e)||b7e(e)||x7e(e)},"color2tuple"),T7e={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]},E7e=mt(function(e){for(var t=e.map,r=e.keys,n=r.length,i=0;i<n;i++){var a=r[i];if(VTe(a))throw Error("Tried to set map with object key");i<r.length-1?(null==t[a]&&(t[a]={}),t=t[a]):t[a]=e.value}},"setMap"),C7e=mt(function(e){for(var t=e.map,r=e.keys,n=r.length,i=0;i<n;i++){var a=r[i];if(VTe(a))throw Error("Tried to get map with object key");if(null==(t=t[a]))return t}return t},"getMap"),mt(Jwe,"isObject"),S7e=Jwe,_7e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mt(e6e,"createCommonjsModule"),v8e="object"==typeof _7e&&_7e&&_7e.Object===Object&&_7e,W9e="object"==typeof self&&self&&self.Object===Object&&self,v8e=v8e||W9e||Function("return this")(),A7e=v8e,W9e=mt(function(){return A7e.Date.now()},"now"),L7e=W9e,N7e=/\s/,mt(t6e,"trimmedEndIndex"),I7e=t6e,R7e=/^\s+/,mt(r6e,"baseTrim"),M7e=r6e,v8e=A7e.Symbol,W9e=v8e,D7e=(v8e=Object.prototype).hasOwnProperty,O7e=v8e.toString,P7e=W9e?W9e.toStringTag:void 0,mt(n6e,"getRawTag"),B7e=n6e,$7e=Object.prototype.toString,mt(i6e,"objectToString"),F7e=i6e,z7e=W9e?W9e.toStringTag:void 0,mt(a6e,"baseGetTag"),G7e=a6e,mt(s6e,"isObjectLike"),U7e=s6e,mt(o6e,"isSymbol"),q7e=o6e,j7e=NaN,W7e=/^[-+]0x[0-9a-f]+$/i,Y7e=/^0b[01]+$/i,H7e=/^0o[0-7]+$/i,V7e=parseInt,mt(l6e,"toNumber"),X7e=l6e,K7e=Math.max,Z7e=Math.min,mt(c6e,"debounce"),Q7e=c6e,J7e=$Te?$Te.performance:null,e8e=J7e&&J7e.now?function(){return J7e.now()}:function(){return Date.now()},t8e=(()=>{if($Te){if($Te.requestAnimationFrame)return function(e){$Te.requestAnimationFrame(e)};if($Te.mozRequestAnimationFrame)return function(e){$Te.mozRequestAnimationFrame(e)};if($Te.webkitRequestAnimationFrame)return function(e){$Te.webkitRequestAnimationFrame(e)};if($Te.msRequestAnimationFrame)return function(e){$Te.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(e8e())},1e3/60)}})(),r8e=mt(function(e){return t8e(e)},"requestAnimationFrame"),n8e=e8e,i8e=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"),a8e=mt(function(e){return 65599*(1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261)+e|0},"hashInt"),s8e=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:5381;return(t<<5)+t+e|0},"hashIntAlt"),o8e=mt(function(e,t){return 2097152*e+t},"combineHashes"),l8e=mt(function(e){return 2097152*e[0]+e[1]},"combineHashesArray"),c8e=mt(function(e,t){return[a8e(e[0],t[0]),s8e(e[1],t[1])]},"hashArrays"),h8e=mt(function(e,t){var r={value:0,done:!1},n=0,i=e.length,a={next:mt(function(){return n<i?r.value=e[n++]:r.done=!0,r},"next")};return i8e(a,t)},"hashIntsArray"),u8e=mt(function(e,t){var r={value:0,done:!1},n=0,i=e.length,a={next:mt(function(){return n<i?r.value=e.charCodeAt(n++):r.done=!0,r},"next")};return i8e(a,t)},"hashString"),d8e=mt(function(){return p8e(arguments)},"hashStrings"),p8e=mt(function(e){for(var t=0;t<e.length;t++)var r=e[t],n=0===t?u8e(r):u8e(r,n);return n},"hashStringsArray"),g8e=!0,f8e=null!=console.warn,m8e=null!=console.trace,y8e=Number.MAX_SAFE_INTEGER||9007199254740991,v8e=mt(function(){return!0},"trueify"),x8e=mt(function(){return!1},"falsify"),b8e=mt(function(){return 0},"zeroify"),w8e=mt(function(){},"noop"),k8e=mt(function(e){throw new Error(e)},"error"),T8e=mt(function(e){if(void 0===e)return g8e;g8e=!!e},"warnings"),E8e=mt(function(e){T8e()&&(f8e?console.warn(e):(console.log(e),m8e&&console.trace()))},"warn"),C8e=mt(function(e){return y7e({},e)},"clone"),S8e=mt(function(e){return null==e?e:HTe(e)?e.slice():VTe(e)?C8e(e):e},"copy"),_8e=mt(function(e){return e.slice()},"copyArray"),A8e=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"),L8e={},N8e=mt(function(){return L8e},"staticEmptyObject"),I8e=mt(function(a){var s=Object.keys(a);return function(e){for(var t={},r=0;r<s.length;r++){var n=s[r],i=e?.[n];t[n]=void 0===i?a[n]:i}return t}},"defaults"),R8e=mt(function(e,t,r){for(var n=e.length-1;0<=n&&(e[n]!==t||(e.splice(n,1),!r));n--);},"removeFromArray"),M8e=mt(function(e){e.splice(0,e.length)},"clearArray"),D8e=mt(function(e,t){for(var r=0;r<t.length;r++)e.push(t[r])},"push"),O8e=mt(function(e,t,r){return e[t=r?d7e(r,t):t]},"getPrefixedProperty"),P8e=mt(function(e,t,r,n){e[t=r?d7e(r,t):t]=n},"setPrefixedProperty"),mt(e,"ObjectMap"),zwe(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")}]),dLe=e,B8e=typeof Map<"u"?Map:dLe,mt(n,"ObjectSet"),zwe(n,[{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")}]),dLe=n,$8e="undefined"!==("u"<typeof Set?"undefined":Bwe(Set))?Set:dLe,F8e=mt(function(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&t7e(e)){var n=t.group;if("nodes"!==(n=null==n?t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes":n)&&"edges"!==n)k8e("An element must be of type `nodes` or `edges`; you specified `"+n+"`");else{this.length=1;var i,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:n,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"===n:!!t.pannable,active:!1,classes:new $8e,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&&(n=t.renderedPosition,i=e.pan(),e=e.zoom(),a.position={x:(n.x-i.x)/e,y:(n.y-i.y)/e}),[]);HTe(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(),(n=t.style||t.css)&&(E8e("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(n)),void 0!==r&&!r||this.restore()}}else k8e("An element must have a core reference and parameters set")},"Element"),(dLe={breadthFirstSearch:(dLe=mt(function(T){return T={bfs:T.bfs||!T.dfs,dfs:T.dfs||!T.bfs},mt(function(e,u,d){VTe(e)&&!QTe(e)&&(e=(t=e).roots||t.root,u=t.visit,d=t.directed),d=2!==arguments.length||YTe(u)?d:u,u=YTe(u)?u:function(){};for(var p,t=this._private.cy,r=e=WTe(e)?this.filter(e):e,g=[],f=[],m={},y={},v={},x=0,e=this.byGroup(),b=e.nodes,w=e.edges,n=0;n<r.length;n++){var i=r[n],a=i.id();i.isNode()&&(g.unshift(i),T.bfs&&(v[a]=!0,f.push(i)),y[a]=0)}for(var s=mt(function(){var t=T.bfs?g.shift():g.pop(),e=t.id();if(T.dfs){if(v[e])return"continue";v[e]=!0,f.push(t)}var r=y[e],n=m[e],i=null!=n?n.source():null,a=null!=n?n.target():null,a=null==n?void 0:(t.same(i)?a:i)[0];if(!0===(i=u(t,n,a,x++,r)))return p=t,"break";if(!1===i)return"break";for(var s=t.connectedEdges().filter(function(e){return(!d||e.source().same(t))&&w.has(e)}),o=0;o<s.length;o++){var l=s[o],c=l.connectedNodes().filter(function(e){return!e.same(t)&&b.has(e)}),h=c.id();0===c.length||v[h]||(c=c[0],g.push(c),T.bfs&&(v[h]=!0,f.push(c)),m[h]=l,y[h]=y[e]+1)}},"_loop");0!==g.length;){var o=s();if("continue"!==o&&"break"===o)break}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:dLe({dfs:!0})}).bfs=dLe.breadthFirstSearch,dLe.dfs=dLe.depthFirstSearch,q9e=e6e(function(s,e){!function(){var d,l,p,g,t,c,r,f,m,e,n,i,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,n,i){var a;if(null==i&&(i=d),(r=null==r?0:r)<0)throw new Error("lo must be non-negative");for(null==n&&(n=e.length);r<n;)i(t,e[a=l((r+n)/2)])<0?n=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,n;return null==t&&(t=d),r=e.pop(),e.length?(n=e[0],e[0]=r,u(e,0,t)):n=r,n},"heappop"),r=mt(function(e,t,r){var n;return null==r&&(r=d),n=e[0],e[0]=t,u(e,0,r),n},"heapreplace"),c=mt(function(e,t,r){var n;return null==r&&(r=d),e.length&&r(e[0],t)<0&&(t=(n=[e[0],t])[0],e[0]=n[1],u(e,0,r)),t},"heappushpop"),p=mt(function(r,e){var t,n,i,a,s,o;for(null==e&&(e=d),s=[],n=0,i=(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;n<i;n++)t=a[n],s.push(u(r,t,e));return s},"heapify"),i=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 n,i,a,s,o;if(null==r&&(r=d),!(i=e.slice(0,t)).length)return i;for(p(i,r),a=0,s=(o=e.slice(t)).length;a<s;a++)n=o[a],c(i,n,r);return i.sort(r).reverse()},"nlargest"),n=mt(function(e,t,r){var n,i,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(i=a[a.length-1],s=0,l=(c=e.slice(t)).length;s<l;s++)r(n=c[s],i)<0&&(f(a,n,0,null,r),a.pop(),i=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,n){var i,a,s;for(null==n&&(n=d),i=e[r];t<r&&n(i,a=e[s=r-1>>1])<0;)e[r]=a,r=s;return e[r]=i},"_siftdown"),u=mt(function(e,t,r){var n,i,a,s,o;for(null==r&&(r=d),i=e.length,a=e[o=t],n=2*t+1;n<i;)(s=n+1)<i&&!(r(e[n],e[s])<0)&&(n=s),e[t]=e[n],n=2*(t=n)+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=i,a.nlargest=e,a.nsmallest=n,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 i(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(_7e)}),z8e=q9e,G8e=I8e({root:null,weight:mt(function(e){return 1},"weight"),directed:!1}),q9e={dijkstra:mt(function(e){VTe(e)||(e={root:(t=arguments)[0],weight:t[1],directed:t[2]});var t=G8e(e),e=t.root,l=t.directed,a=this,c=t.weight,r=(WTe(e)?this.filter(e):e)[0],n={},s={},i={},o=(t=this.byGroup()).nodes,h=t.edges;h.unmergeBy(function(e){return e.isLoop()});for(var u=mt(function(e){return n[e.id()]},"getDist"),d=mt(function(e,t){n[e.id()]=t,p.updateItem(e)},"setDist"),p=new z8e(function(e,t){return u(e)-u(t)}),g=0;g<o.length;g++){var f=o[g];n[f.id()]=f.same(r)?0:1/0,p.push(f)}for(var m=mt(function(e,t){for(var r,n=(l?e.edgesTo(t):e.edgesWith(t)).intersect(h),i=1/0,a=0;a<n.length;a++){var s=n[a],o=c(s);(o<i||!r)&&(i=o,r=s)}return{edge:r,dist:i}},"distBetween");0<p.size();){var y=p.pop(),v=u(y),x=y.id();if((i[x]=v)!==1/0)for(var b=y.neighborhood().intersect(o),w=0;w<b.length;w++){var k=b[w],T=k.id(),E=m(y,k),C=v+E.dist;C<u(k)&&(d(k,C),s[T]={node:y,edge:E.edge})}}return{distanceTo:mt(function(e){return e=(WTe(e)?o.filter(e):e)[0],i[e.id()]},"distanceTo"),pathTo:mt(function(e){var t=[],r=e=(WTe(e)?o.filter(e):e)[0],n=r.id();if(0<e.length)for(t.unshift(e);s[n];){var i=s[n];t.unshift(i.edge),t.unshift(i.node),n=(r=i.node).id()}return a.spawn(t)},"pathTo")}},"dijkstra")},xLe={kruskal:mt(function(r){r=r||function(e){return 1};for(var e=(t=this.byGroup()).nodes,t=t.edges,n=e.length,i=new Array(n),a=e,s=mt(function(e){for(var t=0;t<i.length;t++)if(i[t].has(e))return t},"findSetIndex"),o=0;o<n;o++)i[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=i[u],g=i[d];u!==d&&(a.merge(h),p.merge(g),i.splice(d,1))}return a},"kruskal")},U8e=I8e({root:null,goal:null,weight:mt(function(e){return 1},"weight"),heuristic:mt(function(e){return 0},"heuristic"),directed:!1}),Y9e={aStar:mt(function(e){var t,r,n=this.cy(),i=(e=U8e(e)).root,a=e.goal,s=e.heuristic,o=e.directed,l=e.weight,i=n.collection(i)[0],a=n.collection(a)[0],e=i.id(),c=a.id(),h={},u={},d={},p=new z8e(function(e,t){return u[e.id()]-u[t.id()]}),g=new $8e,f={},m={},y=mt(function(e,t){p.push(e),g.add(t)},"addToOpenSet"),v=mt(function(){t=p.pop(),r=t.id(),g.delete(r)},"popFromOpenSet"),x=mt(function(e){return g.has(e)},"isInOpenSet");y(i,e),h[e]=0,u[e]=s(i);for(var b=0;0<p.size();){if(v(),b++,r===c){for(var w=[],k=a,T=c,E=m[T];w.unshift(k),null!=E&&w.unshift(E),null!=(k=f[T]);)E=m[T=k.id()];return{found:!0,distance:h[r],path:this.spawn(w),steps:b}}d[r]=!0;for(var C=t._private.edges,S=0;S<C.length;S++){var _,A,L,N=C[S];!this.hasElementWithId(N.id())||o&&N.data("source")!==r||(_=N.source(),A=N.target(),A=(_=_.id()!==r?_:A).id(),this.hasElementWithId(A)&&!d[A]&&(L=h[r]+l(N),x(A)?L<h[A]&&(u[A]=(h[A]=L)+s(_),f[A]=t,m[A]=N):(u[A]=(h[A]=L)+s(_),y(_,A),f[A]=t,m[A]=N)))}}return{found:!1,distance:void 0,path:void 0,steps:b}},"aStar")},q8e=I8e({weight:mt(function(e){return 1},"weight"),directed:!1}),nLe={floydWarshall:mt(function(e){for(var s=this.cy(),t=(e=q8e(e)).weight,r=e.directed,n=t,i=(e=this.byGroup()).nodes,a=e.edges,o=i.length,l=o*o,c=mt(function(e){return i.indexOf(e)},"indexOf"),h=mt(function(e){return i[e]},"atIndex"),u=new Array(l),d=0;d<l;d++){var p=d%o;u[d]=(d-p)/o==p?0:1/0}for(var g=new Array(l),f=new Array(l),m=0;m<a.length;m++){var y,v,x=a[m],b=x.source()[0],w=x.target()[0];b!==w&&(b=c(b),w=c(w),v=b*o+w,y=n(x),u[v]>y&&(u[v]=y,g[v]=w,f[v]=x),r||(v=w*o+b,!r&&u[v]>y&&(u[v]=y,g[v]=b,f[v]=x)))}for(var k=0;k<o;k++)for(var T=0;T<o;T++)for(var E=T*o+k,C=0;C<o;C++){var S=T*o+C,_=k*o+C;u[E]+u[_]<u[S]&&(u[S]=u[E]+u[_],g[S]=g[E])}var A=mt(function(e){return(WTe(e)?s.filter(e):e)[0]},"getArgEle"),L=mt(function(e){return c(A(e))},"indexOfArgEle");return{distance:mt(function(e,t){return e=L(e),t=L(t),u[e*o+t]},"distance"),path:mt(function(e,t){var r=L(e),n=L(t),e=h(r);if(r===n)return e.collection();if(null==g[r*o+n])return s.collection();var i,a=s.collection();for(a.merge(e);r!==n;)r=g[(i=r)*o+n],i=f[i*o+r],a.merge(i),a.merge(h(r));return a},"path")}},"floydWarshall")},j8e=I8e({weight:mt(function(e){return 1},"weight"),directed:!1,root:null}),z9e={bellmanFord:mt(function(e){var P=this,t=(m=j8e(e)).weight,r=m.directed,s=m.root,n=t,o=this,i=this.cy(),a=(m=this.byGroup()).edges,l=m.nodes,c=l.length,h=new B8e,u=!1,d=[],s=i.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)?i.$(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=[],n=f(e);;){if(null==n)return P.spawn();var i=(a=g(n)).edge,a=a.pred;if(r.unshift(n[0]),n.same(t)&&0<r.length)break;null!=i&&r.unshift(i),n=a}return o.spawn(r)},"pathTo"),y=0;y<c;y++){var v=l[y],x=g(v);v.same(s)?x.dist=0:x.dist=1/0,x.pred=null,x.edge=null}for(var b=!1,B=mt(function(e,t,r,n,i,a){(a=n.dist+a)<i.dist&&!r.same(n.edge)&&(i.dist=a,i.pred=e,i.edge=r,b=!0)},"checkForEdgeReplacement"),$=1;$<c;$++){for(var b=!1,w=0;w<p;w++){var k=a[w],T=k.source(),E=k.target(),F=n(k),z=g(T),G=g(E);B(T,E,k,z,G,F),r||B(E,T,k,G,z,F)}if(!b)break}if(b)for(var U=[],C=0;C<p;C++){var q=(S=a[C]).source(),j=S.target(),S=n(S),_=g(q).dist,A=g(j).dist;if(_+S<A||!r&&A+S<_){if(u||(E8e("Graph contains a negative weight cycle for Bellman-Ford"),u=!0),!1===e.findNegativeWeightCycles)break;var L=[];_+S<A&&L.push(q),!r&&A+S<_&&L.push(j);for(var W=L.length,N=0;N<W;N++){var I=L[N],R=[I];R.push(g(I).edge);for(var M=g(I).pred;-1===R.indexOf(M);)R.push(M),R.push(g(M).edge),M=g(M).pred;for(var Y=(R=R.slice(R.indexOf(M)))[0].id(),D=0,O=2;O<R.length;O+=2)R[O].id()<Y&&(Y=R[O].id(),D=O);(R=R.slice(D).concat(R.slice(0,D))).push(R[0]),I=R.map(function(e){return e.id()}).join(","),-1===U.indexOf(I)&&(d.push(o.spawn(R)),U.push(I))}}}return{distanceTo:t,pathTo:m,hasNegativeWeightCycle:u,negativeWeightCycles:d}},"bellmanFord")},W8e=Math.sqrt(2),Y8e=mt(function(e,t,r){0===r.length&&k8e("Karger-Stein must be run on a connected (sub)graph");for(var n=t[(e=r[e])[1]],i=t[e[2]],a=r,s=a.length-1;0<=s;s--){var o=(l=a[s])[1],l=l[2];(t[o]===n&&t[l]===i||t[o]===i&&t[l]===n)&&a.splice(s,1)}for(var c=0;c<a.length;c++){var h=a[c];h[1]===i?(a[c]=h.slice(),a[c][1]=n):h[2]===i&&(a[c]=h.slice(),a[c][2]=n)}for(var u=0;u<t.length;u++)t[u]===i&&(t[u]=n);return a},"collapse"),H8e=mt(function(e,t,r,n){for(;n<r;){var i=Math.floor(Math.random()*t.length);t=Y8e(i,e,t),r--}return t},"contractUntil"),j9e={kargerStein:mt(function(){var r=this,e=this.byGroup(),t=e.nodes,n=e.edges,i=(n.unmergeBy(function(e){return e.isLoop()}),t.length),a=n.length,s=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),o=Math.floor(i/W8e);if(!(i<2)){for(var l=[],c=0;c<a;c++){var h=n[c];l.push([c,t.indexOf(h.source()),t.indexOf(h.target())])}for(var u=1/0,d=[],p=new Array(i),g=new Array(i),f=new Array(i),m=mt(function(e,t){for(var r=0;r<i;r++)t[r]=e[r]},"copyNodesMap"),y=0;y<=s;y++){for(var v=0;v<i;v++)g[v]=v;var x=(b=H8e(g,l.slice(),i,o)).slice(),b=(m(g,f),H8e(g,b,o,2)),x=H8e(f,x,o,2);b.length<=x.length&&b.length<u?(u=b.length,d=b,m(g,p)):x.length<=b.length&&x.length<u&&(u=x.length,d=x,m(f,p))}for(var w=this.spawn(d.map(function(e){return n[e[0]]})),k=this.spawn(),T=this.spawn(),E=p[0],C=0;C<p.length;C++){var S=p[C],_=t[C];(S===E?k:T).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)&&!w.contains(e)&&t.merge(e)})}),t},"constructComponent"))(k),e(T)],{cut:w,components:e,partition1:k,partition2:T}}k8e("At least 2 nodes are required for Karger-Stein algorithm")},"kargerStein")},V8e=mt(function(e){return{x:e.x,y:e.y}},"copyPosition"),X8e=mt(function(e,t,r){return{x:e.x*t+r.x,y:e.y*t+r.y}},"modelToRenderedPosition"),K8e=mt(function(e,t,r){return{x:(e.x-r.x)/t,y:(e.y-r.y)/t}},"renderedToModelPosition"),Z8e=mt(function(e){return{x:e[0],y:e[1]}},"array2point"),Q8e=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,n=1/0,i=t;i<r;i++){var a=e[i];isFinite(a)&&(n=Math.min(a,n))}return n},"min"),J8e=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,n=-1/0,i=t;i<r;i++){var a=e[i];isFinite(a)&&(n=Math.max(a,n))}return n},"max"),eEe=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,n=0,i=0,a=t;a<r;a++){var s=e[a];isFinite(s)&&(n+=s,i++)}return n/i},"mean"),tEe=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,n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],i=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];n?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 i&&e.sort(function(e,t){return e-t}),n=e.length,r=Math.floor(n/2),n%2!=0?e[r+1+s]:(e[r-1+s]+e[r+s])/2},"median"),rEe=mt(function(e){return Math.PI*e/180},"deg2rad"),nEe=mt(function(e,t){return Math.atan2(t,e)-Math.PI/2},"getAngleFromDisp"),iEe=Math.log2||function(e){return Math.log(e)/Math.log(2)},aEe=mt(function(e){return 0<e?1:e<0?-1:0},"signum"),sEe=mt(function(e,t){return Math.sqrt(oEe(e,t))},"dist"),oEe=mt(function(e,t){var r=t.x-e.x;return r*r+(t=t.y-e.y)*t},"sqdist"),lEe=mt(function(e){for(var t=e.length,r=0,n=0;n<t;n++)r+=e[n];for(var i=0;i<t;i++)e[i]=e[i]/r;return e},"inPlaceSumNormalize"),cEe=mt(function(e,t,r,n){return(1-n)*(1-n)*e+2*(1-n)*n*t+n*n*r},"qbezierAt"),hEe=mt(function(e,t,r,n){return{x:cEe(e.x,t.x,r.x,n),y:cEe(e.y,t.y,r.y,n)}},"qbezierPtAt"),uEe=mt(function(e,t,r,n){var i=t.x-e.x,a=t.y-e.y,t=sEe(e,t);return r=r??0,{x:e.x+i/t*(n=n??r*t),y:e.y+a/t*n}},"lineAt"),dEe=mt(function(e,t,r){return Math.max(e,Math.min(r,t))},"bound"),pEe=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"),gEe=mt(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),fEe=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"),mEe=mt(function(e,t,r){return{x1:e.x1+t,x2:e.x2+t,y1:e.y1+r,y2:e.y2+r,w:e.w,h:e.h}},"shiftBoundingBox"),yEe=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"),vEe=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"),xEe=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"),bEe=mt(function(e){var t,r,n,i,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[0];return 1===a.length?t=r=n=i=a[0]:2===a.length?(t=n=a[0],i=r=a[1]):4===a.length&&(t=(a=Uwe(a,4))[0],r=a[1],n=a[2],i=a[3]),e.x1-=i,e.x2+=r,e.y1-=t,e.y2+=n,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBoxSides"),wEe=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"),kEe=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"),TEe=mt(function(e,t,r){return e.x1<=t&&t<=e.x2&&e.y1<=r&&r<=e.y2},"inBoundingBox"),EEe=mt(function(e,t){return TEe(e,t.x,t.y)},"pointInBoundingBox"),CEe=mt(function(e,t){return TEe(e,t.x1,t.y1)&&TEe(e,t.x2,t.y2)},"boundingBoxInBoundingBox"),SEe=mt(function(e,t,r,n,i,a,s){var o,l="auto"===(l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:"auto")?XEe(i,a):l,i=i/2,a=a/2,c=(l=Math.min(l,i,a))!==i,h=l!==a;if(c){var u=n-a-s;if(0<(u=UEe(e,t,r,n,r-i+l-s,u,r+i-l+s,u,!1)).length)return u}return h&&0<(u=UEe(e,t,r,n,o=r+i+s,n-a+l-s,o,n+a-l+s,!1)).length||c&&0<(u=UEe(e,t,r,n,r-i+l-s,o=n+a+s,r+i-l+s,o,!1)).length||h&&0<(u=UEe(e,t,r,n,c=r-i-s,n-a+l-s,c,n+a-l+s,!1)).length?u:0<(c=zEe(e,t,r,n,o=r-i+l,h=n-a+l,l+s)).length&&c[0]<=o&&c[1]<=h||0<(c=zEe(e,t,r,n,u=r+i-l,o=n-a+l,l+s)).length&&c[0]>=u&&c[1]<=o||0<(c=zEe(e,t,r,n,h=r+i-l,u=n+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=zEe(e,t,r,n,o=r-i+l,h=n+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),_Ee=mt(function(e,t,r,n,i,a,s){var o=Math.min(r,i),r=Math.max(r,i),i=Math.min(n,a),n=Math.max(n,a);return o-s<=e&&e<=r+s&&i-s<=t&&t<=n+s},"inLineVicinity"),AEe=mt(function(e,t,r,n,i,a,s,o,l){var c=Math.min(r,s,i)-l,r=Math.max(r,s,i)+l,s=Math.min(n,o,a)-l,i=Math.max(n,o,a)+l;return!(e<c||r<e||t<s||i<t)},"inBezierVicinity"),LEe=mt(function(e,t,r,n){return(n=t*t-4*e*(r-=n))<0?[]:[(-t+(r=Math.sqrt(n)))/(n=2*e),(-t-r)/n]},"solveQuadratic"),NEe=mt(function(e,t,r,n,i){var a,s,o;n=-27*(n/=e=0===e?1e-5:e)+(t/=e)*(9*(r/=e)-t*t*2),r=(e=(3*r-t*t)/9)*e*e+(n/=54)*n,t/=3,(i[1]=0)<r?(a=(a=n+Math.sqrt(r))<0?-Math.pow(-a,1/3):Math.pow(a,1/3),s=(s=n-Math.sqrt(r))<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=-t+a+s,i[4]=i[2]=-(t+=(a+s)/2),t=Math.sqrt(3)*(-s+a)/2,i[3]=t,i[5]=-t):(i[5]=i[3]=0)==r?(o=n<0?-Math.pow(-n,1/3):Math.pow(n,1/3),i[0]=2*o-t,i[4]=i[2]=-(o+t)):(e=-e,s=Math.acos(n/Math.sqrt(e*e*e)),o=2*Math.sqrt(e),i[0]=-t+o*Math.cos(s/3),i[2]=-t+o*Math.cos((s+2*Math.PI)/3),i[4]=-t+o*Math.cos((s+4*Math.PI)/3))},"solveCubic"),IEe=mt(function(e,t,r,n,i,a,s,o){var l=[];NEe(+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s+n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o,9*r*i-3*r*r-3*r*s-6*i*i+3*i*s+9*n*a-3*n*n-3*n*o-6*a*a+3*a*o,3*r*r-6*r*i+r*s-r*e+2*i*i+2*i*e-s*e+3*n*n-6*n*a+n*o-n*t+2*a*a+2*a*t-o*t,+r*i-r*r+r*e-i*e+n*a-n*n+n*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]*i+c[g]*c[g]*s,u=Math.pow(1-c[g],2)*n+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"),REe=mt(function(e,t,r,n,i,a){var s=[e-r,t-n],n=(r=[i-r,a-n])[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/n;return s<0?o:n<r?(e-i)*(e-i)+(t-a)*(t-a):o-r},"sqdistToFiniteLine"),MEe=mt(function(e,t,r){for(var n,i,a,s,o=0,l=0;l<r.length/2;l++)if(i=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]),(n=r[2*l])!=e||a!=e){if(!(e<=n&&a<=e||n<=e&&e<=a))continue;t<(e-n)/(a-n)*(s-i)+i&&o++}return o%2!=0},"pointInsidePolygonPoints"),DEe=mt(function(e,t,r,n,i,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]+=n,c[2*p+1]+=i;return h=0<l?(o=BEe(c,-l),PEe(o)):c,MEe(e,t,h)},"pointInsidePolygon"),OEe=mt(function(e,t,r,n,i,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 MEe(e,t,l)},"pointInsideRoundPolygon"),PEe=mt(function(e){for(var t,r,n,i=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],n=e[4*(a+1)+2],e[4*(a+1)+3]):(t=e[0],r=e[1],n=e[2],e[3]),s=UEe(e[4*a],e[4*a+1],e[4*a+2],e[4*a+3],t,r,n,s,!0);i[2*a]=s[0],i[2*a+1]=s[1]}return i},"joinLines"),BEe=mt(function(e,t){for(var r,n=new Array(2*e.length),i=0;i<e.length/2;i++){var a,s,o,l=(o=i<e.length/2-1?(r=e[2*(i+1)],e[2*(i+1)+1]):(r=e[0],e[1]))-(s=e[2*i+1]),c=-(r-(a=e[2*i])),h=Math.sqrt(l*l+c*c),c=c/h;n[4*i]=a+(l/=h)*t,n[4*i+1]=s+c*t,n[4*i+2]=r+l*t,n[4*i+3]=o+c*t}return n},"expandPolygon"),$Ee=mt(function(e,t,r,n,i,a){var s=r-e,o=n-t;return s/=i,o/=a,(a=(i=Math.sqrt(s*s+o*o))-1)<0?[]:[(r-e)*(s=a/i)+e,(n-t)*s+t]},"intersectLineEllipse"),FEe=mt(function(e,t,r,n,i,a,s){return(e=(e-i)/(r/2+s))*e+(t=(t-a)/(n/2+s))*t<=1},"checkInEllipse"),zEe=mt(function(e,t,r,n,i,a,s){return r=[r-e,n-t],n=[e-i,t-a],i=r[0]*r[0]+r[1]*r[1],(n=(a=2*(n[0]*r[0]+n[1]*r[1]))*a-4*i*(n[0]*n[0]+n[1]*n[1]-s*s))<0||(s=(-a+Math.sqrt(n))/(2*i),a=(-a-Math.sqrt(n))/(2*i),n=Math.min(s,a),i=Math.max(s,a),s=[],0<=n&&n<=1&&s.push(n),0<=i&&i<=1&&s.push(i),0===s.length)?[]:(a=s[0]*r[0]+e,n=s[0]*r[1]+t,1<s.length&&s[0]!=s[1]?[a,n,s[1]*r[0]+e,s[1]*r[1]+t]:[a,n])},"intersectLineCircle"),GEe=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"),UEe=mt(function(e,t,r,n,i,a,s,o,l){var c=e-i,h=r-e,u=s-i,d=n-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?GEe(e,r,s)===s?[s,o]:GEe(e,r,i)===i?[i,a]:GEe(i,s,r)===r?[r,n]:[]:[]},"finiteLinesIntersect"),qEe=mt(function(e,t,r,n,i,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+n,c[2*u+1]=r[2*u+1]*s+i;h=0<o?(o=BEe(c,-o),PEe(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=UEe(e,t,n,i,d,p,g,f)).length&&l.push(d[0],d[1]);return l},"polygonIntersectLine"),jEe=mt(function(r,n,e,i,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=zEe(r,n,i,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=UEe(r,n,i,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]-n,2),f=1;f<h.length/2;f++){var m=Math.pow(h[2*f]-r,2)+Math.pow(h[2*f+1]-n,2);m<=g&&(p[0]=h[2*f],p[1]=h[2*f+1],g=m)}return p}return h},"roundPolygonIntersectLine"),WEe=mt(function(e,t,r){var e=[e[0]-t[0],e[1]-t[1]],n=Math.sqrt(e[0]*e[0]+e[1]*e[1]),r=(n-r)/n;return[t[0]+(r=r<0?1e-5:r)*e[0],t[1]+r*e[1]]},"shortenIntersection"),YEe=mt(function(e,t){return e=VEe(e,t),HEe(e)},"generateUnitNgonPointsFitToSquare"),HEe=mt(function(e){for(var t,r,n=e.length/2,i=1/0,a=1/0,s=-1/0,o=-1/0,l=0;l<n;l++)t=e[2*l],r=e[2*l+1],i=Math.min(i,t),s=Math.max(s,t),a=Math.min(a,r),o=Math.max(o,r);for(var c=2/(s-i),h=2/(o-a),u=0;u<n;u++)t=e[2*u]=e[2*u]*c,r=e[2*u+1]=e[2*u+1]*h,i=Math.min(i,t),s=Math.max(s,t),a=Math.min(a,r),o=Math.max(o,r);if(a<-1)for(var d=0;d<n;d++)r=e[2*d+1]=e[2*d+1]+(-1-a);return e},"fitPolygonToSquare"),VEe=mt(function(e,t){var r=1/e*2*Math.PI,n=e%2==0?Math.PI/2+r/2:Math.PI/2;n+=t;for(var i,a=new Array(2*e),s=0;s<e;s++)i=s*r+n,a[2*s]=Math.cos(i),a[2*s+1]=Math.sin(-i);return a},"generateUnitNgonPoints"),XEe=mt(function(e,t){return Math.min(e/4,t/4,8)},"getRoundRectangleRadius"),KEe=mt(function(e,t){return Math.min(e/10,t/10,8)},"getRoundPolygonRadius"),ZEe=mt(function(){return 8},"getCutRectangleCornerLength"),QEe=mt(function(e,t,r){return[e-2*t+r,2*(t-e),e]},"bezierPtsToQuadCoeff"),JEe=mt(function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),eCe=I8e({dampingFactor:.8,precision:1e-6,iterations:200,weight:mt(function(e){return 1},"weight")}),KAe={pageRank:mt(function(e){for(var t=(e=eCe(e)).dampingFactor,r=e.precision,n=e.iterations,i=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=i(m),h[v*l+y]+=m,u[y]+=m)}for(var x=1/l+d,b=0;b<l;b++)if(0===u[b])for(var w=0;w<l;w++)h[w*l+b]=x;else for(var k=0;k<l;k++){var T=k*l+b;h[T]=h[T]/u[b]+d}for(var E=new Array(l),C=new Array(l),S=0;S<l;S++)E[S]=1;for(var _=0;_<n;_++){for(var A=0;A<l;A++)C[A]=0;for(var L=0;L<l;L++)for(var N=0;N<l;N++)C[L]+=h[L*l+N]*E[N];lEe(C);for(var I=E,E=C,C=I,R=0,M=0;M<l;M++){var D=I[M]-E[M];R+=D*D}if(R<r)break}return{rank:mt(function(e){return e=a.collection(e)[0],E[s.indexOf(e)]},"rank")}},"pageRank")},tCe=I8e({root:null,weight:mt(function(e){return 1},"weight"),directed:!1,alpha:0}),(J={degreeCentralityNormalized:mt(function(e){e=tCe(e);var t=this.cy(),r=this.nodes(),n=r.length;if(e.directed){for(var i={},a={},s=0,o=0,l=0;l<n;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),i[c]=h.indegree,a[c]=h.outdegree}return{indegree:mt(function(e){return 0==s?0:(WTe(e)&&(e=t.filter(e)),i[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<n;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=tCe(e);var t=this.cy(),r=this,n=e.root,i=e.weight,a=e.directed,e=e.alpha,n=t.collection(n)[0];if(a){for(var s=(t=n.connectedEdges()).filter(function(e){return e.target().same(n)&&r.has(e)}),o=t.filter(function(e){return e.source().same(n)&&r.has(e)}),a=s.length,t=o.length,l=0,c=0,h=0;h<s.length;h++)l+=i(s[h]);for(var u=0;u<o.length;u++)c+=i(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=n.connectedEdges().intersection(r),a=d.length,p=0,g=0;g<d.length;g++)p+=i(d[g]);return{degree:Math.pow(a,1-e)*Math.pow(p,e)}},"degreeCentrality")}).dc=J.degreeCentrality,J.dcn=J.degreeCentralityNormalised=J.degreeCentralityNormalized,rCe=I8e({harmonic:!0,weight:mt(function(){return 1},"weight"),directed:!1,root:null}),(G9e={closenessCentralityNormalized:mt(function(e){for(var t=(e=rCe(e)).harmonic,r=e.weight,e=e.directed,n=this.cy(),i={},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),i[u.id()]=h}return{closeness:mt(function(e){return 0==a?0:(e=(WTe(e)?n.filter(e)[0]:e).id(),i[e]/a)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:mt(function(e){for(var t=(e=rCe(e)).root,r=e.weight,n=e.directed,i=e.harmonic,t=this.filter(t)[0],a=this.dijkstra({root:t,weight:r,directed:n}),s=0,o=this.nodes(),l=0;l<o.length;l++){var c=o[l];c.same(t)||(c=a.distanceTo(c),s+=i?1/c:c)}return i?s:1/s},"closenessCentrality")}).cc=G9e.closenessCentrality,G9e.ccn=G9e.closenessCentralityNormalised=G9e.closenessCentralityNormalized,nCe=I8e({weight:null,directed:!1}),(hLe={betweennessCentrality:mt(function(e){for(var t=(e=nCe(e)).directed,w=e.weight,k=null!=w,T=this.cy(),E=this.nodes(),C={},r={},n=0,S={set:mt(function(e,t){n<(r[e]=t)&&(n=t)},"set"),get:mt(function(e){return r[e]},"get")},i=0;i<E.length;i++){var a=E[i],s=a.id();C[s]=(t?a.outgoers():a.openNeighborhood()).nodes(),S.set(s,0)}for(var o=mt(function(e){for(var t=E[e].id(),r=[],n={},i={},a={},s=new z8e(function(e,t){return a[e]-a[t]}),o=0;o<E.length;o++){var l=E[o].id();n[l]=[],a[l]=1/(i[l]=0)}for(i[t]=1,a[t]=0,s.push(t);!s.empty();){var c=s.pop();if(r.push(c),k)for(var h=0;h<C[c].length;h++){var u=C[c][h],d=(0<(p=T.getElementById(c)).edgesTo(u).length?p.edgesTo(u):u.edgesTo(p))[0],p=w(d),u=u.id();a[c]+p<a[u]&&(a[u]=a[c]+p,s.nodes.indexOf(u)<0?s.push(u):s.updateItem(u),i[u]=0,n[u]=[]),a[u]==a[c]+p&&(i[u]=i[u]+i[c],n[u].push(c))}else for(var g=0;g<C[c].length;g++){var f=C[c][g].id();a[f]==1/0&&(s.push(f),a[f]=a[c]+1),a[f]==a[c]+1&&(i[f]=i[f]+i[c],n[f].push(c))}}for(var m={},y=0;y<E.length;y++)m[E[y].id()]=0;for(;0<r.length;){for(var v=r.pop(),x=0;x<n[v].length;x++){var b=n[v][x];m[b]=m[b]+i[b]/i[v]*(1+m[v])}v!=E[e].id()&&S.set(v,S.get(v)+m[v])}},"_loop"),l=0;l<E.length;l++)o(l);return(e={betweenness:mt(function(e){return e=T.collection(e).id(),S.get(e)},"betweenness"),betweennessNormalized:mt(function(e){return 0==n?0:(e=T.collection(e).id(),S.get(e)/n)},"betweennessNormalized")}).betweennessNormalised=e.betweennessNormalized,e},"betweennessCentrality")}).bc=hLe.betweennessCentrality,iCe=I8e({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(e){return 1}]}),aCe=mt(function(e){return iCe(e)},"setOptions"),sCe=mt(function(e,t){for(var r=0,n=0;n<t.length;n++)r+=t[n](e);return r},"getSimilarity"),oCe=mt(function(e,t,r){for(var n=0;n<t;n++)e[n*t+n]=r},"addLoops"),lCe=mt(function(e,t){for(var r=0;r<t;r++){for(var n=0,i=0;i<t;i++)n+=e[i*t+r];for(var a=0;a<t;a++)e[a*t+r]=e[a*t+r]/n}},"normalize"),cCe=mt(function(e,t,r){for(var n=new Array(r*r),i=0;i<r;i++){for(var a=0;a<r;a++)n[i*r+a]=0;for(var s=0;s<r;s++)for(var o=0;o<r;o++)n[i*r+o]+=e[i*r+s]*t[s*r+o]}return n},"mmult"),hCe=mt(function(e,t,r){for(var n=e.slice(0),i=1;i<r;i++)e=cCe(e,n,t);return e},"expand"),uCe=mt(function(e,t,r){for(var n=new Array(t*t),i=0;i<t*t;i++)n[i]=Math.pow(e[i],r);return lCe(n,t),n},"inflate"),dCe=mt(function(e,t,r,n){for(var i=0;i<r;i++)if(Math.round(e[i]*Math.pow(10,n))/Math.pow(10,n)!=Math.round(t[i]*Math.pow(10,n))/Math.pow(10,n))return!1;return!0},"hasConverged"),pCe=mt(function(e,t,r,n){for(var i=[],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&&i.push(n.collection(s))}return i},"assign"),gCe=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"),fCe=mt(function(e){for(var t=0;t<e.length;t++)for(var r=0;r<e.length;r++)t!=r&&gCe(e[t],e[r])&&e.splice(r,1);return e},"removeDuplicates"),k9e={markovClustering:k9e=mt(function(e){for(var t=this.nodes(),r=this.edges(),n=this.cy(),i=aCe(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=sCe(f,i.attributes);h[p*l+g]+=f,h[g*l+p]+=f}oCe(h,l,i.multFactor),lCe(h,l);for(var m=!0,y=0;m&&y<i.maxIterations;)m=!1,o=hCe(h,l,i.expandFactor),h=uCe(o,l,i.inflateFactor),dCe(h,o,c,4)||(m=!0),y++;return e=pCe(h,l,t,n),fCe(e)},"markovClustering"),mcl:k9e},mCe=mt(function(e){return e},"identity"),yCe=mt(function(e,t){return Math.abs(t-e)},"absDiff"),vCe=mt(function(e,t,r){return e+yCe(t,r)},"addAbsDiff"),xCe=mt(function(e,t,r){return e+Math.pow(r-t,2)},"addSquaredDiff"),bCe=mt(function(e){return Math.sqrt(e)},"sqrt"),wCe=mt(function(e,t,r){return Math.max(e,yCe(t,r))},"maxAbsDiff"),kCe=mt(function(e,t,r,n,i){for(var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:mCe,s=n,o=0;o<e;o++)s=i(s,t(o),r(o));return a(s)},"getDistance"),(TCe={euclidean:mt(function(e,t,r){return 2<=e?kCe(e,t,r,0,xCe,bCe):kCe(e,t,r,0,vCe)},"euclidean"),squaredEuclidean:mt(function(e,t,r){return kCe(e,t,r,0,xCe)},"squaredEuclidean"),manhattan:mt(function(e,t,r){return kCe(e,t,r,0,vCe)},"manhattan"),max:mt(function(e,t,r){return kCe(e,t,r,-1/0,wCe)},"max")})["squared-euclidean"]=TCe.squaredEuclidean,TCe.squaredeuclidean=TCe.squaredEuclidean,mt(h6e,"clusteringDistance"),ECe=I8e({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),CCe=mt(function(e){return ECe(e)},"setOptions"),SCe=mt(function(e,t,r,n,i){var i="kMedoids"!==i?function(e){return r[e]}:function(e){return n[e](r)},a=mt(function(e){return n[e](t)},"getQ");return h6e(e,n.length,i,a,r,t)},"getDist"),_Ce=mt(function(e,t,r){for(var n=r.length,i=new Array(n),a=new Array(n),s=new Array(t),o=null,l=0;l<n;l++)i[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<n;h++)o[h]=Math.random()*(a[h]-i[h])+i[h];s[c]=o}return s},"randomCentroids"),ACe=mt(function(e,t,r,n,i){for(var a=1/0,s=0,o=0;o<t.length;o++){var l=SCe(r,e,t[o],n,i);l<a&&(a=l,s=o)}return s},"classify"),LCe=mt(function(e,t,r){for(var n=[],i=null,a=0;a<t.length;a++)r[(i=t[a]).id()]===e&&n.push(i);return n},"buildCluster"),NCe=mt(function(e,t,r){return Math.abs(t-e)<=r},"haveValuesConverged"),ICe=mt(function(e,t,r){for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)if(r<Math.abs(e[n][i]-t[n][i]))return!1;return!0},"haveMatricesConverged"),RCe=mt(function(e,t,r){for(var n=0;n<r;n++)if(e===t[n])return!0;return!1},"seenBefore"),MCe=mt(function(e,t){var r=new Array(t);if(e.length<50)for(var n=0;n<t;n++){for(var i=e[Math.floor(Math.random()*e.length)];RCe(i,r,n);)i=e[Math.floor(Math.random()*e.length)];r[n]=i}else for(var a=0;a<t;a++)r[a]=e[Math.floor(Math.random()*e.length)];return r},"randomMedoids"),DCe=mt(function(e,t,r){for(var n=0,i=0;i<t.length;i++)n+=SCe("manhattan",t[i],e,r,"kMedoids");return n},"findCost"),I9e=mt(function(e){for(var t=this.cy(),r=this.nodes(),n=null,i=CCe(e),a=new Array(i.k),s={},o=i.testMode?"number"==typeof i.testCentroids?(i.testCentroids,_Ce(r,i.k,i.attributes)):"object"===Bwe(i.testCentroids)?i.testCentroids:_Ce(r,i.k,i.attributes):_Ce(r,i.k,i.attributes),l=!0,c=0;l&&c<i.maxIterations;){for(var h=0;h<r.length;h++)s[(n=r[h]).id()]=ACe(n,o,i.distance,i.attributes,"kMeans");for(var l=!1,u=0;u<i.k;u++){var d=LCe(u,r,s);if(0!==d.length){for(var p=i.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++)n=d[v],m[y]+=i.attributes[y](n);f[y]=m[y]/d.length,NCe(f[y],g[y],i.sensitivityThreshold)||(l=!0)}o[u]=f,a[u]=t.collection(d)}}c++}return a},"kMeans"),uLe=mt(function(e){var t,r,n=this.cy(),i=this.nodes(),a=null,s=CCe(e),o=new Array(s.k),l={},c=new Array(s.k);s.testMode?"number"!=typeof s.testCentroids&&(t="object"===Bwe(s.testCentroids)?s.testCentroids:MCe(i,s.k)):t=MCe(i,s.k);for(var h=!0,u=0;h&&u<s.maxIterations;){for(var d=0;d<i.length;d++)l[(a=i[d]).id()]=ACe(a,t,s.distance,s.attributes,"kMedoids");for(var h=!1,p=0;p<t.length;p++){var g=LCe(p,i,l);if(0!==g.length){c[p]=DCe(t[p],g,s.attributes);for(var f=0;f<g.length;f++)(r=DCe(g[f],g,s.attributes))<c[p]&&(c[p]=r,t[p]=g[f],h=!0);o[p]=n.collection(g)}}u++}return o},"kMedoids"),OCe=mt(function(e,t,r,n,i){for(var a=0;a<t.length;a++)for(var s=0;s<e.length;s++)n[a][s]=Math.pow(r[a][s],i.m);for(var o=0;o<e.length;o++)for(var l=0;l<i.attributes.length;l++){for(var c=0,h=0,u=0;u<t.length;u++)c+=n[u][o]*i.attributes[l](t[u]),h+=n[u][o];e[o][l]=c/h}},"updateCentroids"),PCe=mt(function(e,t,r,n,i){for(var a=0;a<e.length;a++)t[a]=e[a].slice();for(var s,o,l=2/(i.m-1),c=0;c<r.length;c++)for(var h=0;h<n.length;h++){for(var u=0,d=0;d<r.length;d++)s=SCe(i.distance,n[h],r[c],i.attributes,"cmeans"),o=SCe(i.distance,n[h],r[d],i.attributes,"cmeans"),u+=Math.pow(s/o,l);e[h][c]=1/u}},"updateMembership"),BCe=mt(function(e,t,r,n){for(var i=new Array(r.k),a=0;a<i.length;a++)i[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);i[l].push(e[s])}for(var h=0;h<i.length;h++)i[h]=n.collection(i[h]);return i},"assign"),U9e=mt(function(e){for(var t=this.cy(),r=this.nodes(),n=CCe(e),i=new Array(r.length),a=0;a<r.length;a++)i[a]=new Array(n.k);for(var s=new Array(r.length),o=0;o<r.length;o++)s[o]=new Array(n.k);for(var l=0;l<r.length;l++){for(var c=0,h=0;h<n.k;h++)s[l][h]=Math.random(),c+=s[l][h];for(var u=0;u<n.k;u++)s[l][u]=s[l][u]/c}for(var d=new Array(n.k),p=0;p<n.k;p++)d[p]=new Array(n.attributes.length);for(var g=new Array(r.length),f=0;f<r.length;f++)g[f]=new Array(n.k);for(var m=!0,y=0;m&&y<n.maxIterations;)m=!1,OCe(d,r,s,g,n),PCe(s,i,d,r,n),ICe(s,i,n.sensitivityThreshold)||(m=!0),y++;return{clusters:BCe(r,s,n,t),degreeOfMembership:s}},"fuzzyCMeans"),$Ce=I8e({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!(I9e={kMeans:I9e,kMedoids:uLe,fuzzyCMeans:U9e,fcm:U9e}),dendrogramDepth:0,attributes:[]}),FCe={single:"min",complete:"max"},zCe=mt(function(e){var e=$Ce(e),t=FCe[e.linkage];return null!=t&&(e.linkage=t),e},"setOptions"),GCe=mt(function(e,t,r,n,i){for(var a,s=0,o=1/0,l=i.attributes,c=mt(function(t,r){return h6e(i.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][n[u]];d<o&&(s=u,o=d)}if("threshold"===i.mode&&o>=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var p=t[s],g=t[n[s]],f="dendrogram"===i.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"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]>r[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.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"===i.linkage?(r[p.key][y.key]*p.size+r[g.key][y.key]*g.size)/(p.size+g.size):"dendrogram"===i.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 x=e[v].key;if(n[x]===p.key||n[x]===g.key){for(var b=x,w=0;w<e.length;w++){var k=e[w].key;r[x][k]<r[x][b]&&(b=k)}n[x]=b}e[v].index=v}return!(p.key=g.key=p.index=g.index=null)},"mergeClosest"),UCe=mt(function e(t,r,n){t&&(t.value?r.push(t.value):(t.left&&e(t.left,r),t.right&&e(t.right,r)))},"getAllChildren"),qCe=mt(function e(t,r){var n,i,a;return t?t.left&&t.right?(n=e(t.left,r),i=e(t.right,r),a=r.add({group:"nodes",data:{id:n+","+i}}),r.add({group:"edges",data:{source:n,target:a.id()}}),r.add({group:"edges",data:{source:i,target:a.id()}}),a.id()):t.value?t.value.id():void 0:""},"buildDendrogram"),jCe=mt(function e(t,r,n){var i,a,s;return t?(i=[],a=[],0===r?(t.left&&UCe(t.left,i),t.right&&UCe(t.right,a),s=i.concat(a),[n.collection(s)]):1===r?t.value?[n.collection(t.value)]:(t.left&&UCe(t.left,i),t.right&&UCe(t.right,a),[n.collection(i),n.collection(a)]):t.value?[n.collection(t.value)]:(t.left&&(i=e(t.left,r-1,n)),t.right&&(a=e(t.right,r-1,n)),i.concat(a))):[]},"buildClustersFromTree"),uLe=mt(function(e){for(var r=this.cy(),t=this.nodes(),n=zCe(e),i=n.attributes,a=mt(function(t,r){return h6e(n.distance,i.length,function(e){return i[e](t)},function(e){return i[e](r)},t,r)},"getDist"),s=[],o=[],l=[],c=[],h=0;h<t.length;h++){var u={value:"dendrogram"===n.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"===n.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=GCe(s,c,o,l,n);m;)m=GCe(s,c,o,l,n);return"dendrogram"===n.mode?(f=jCe(s[0],n.dendrogramDepth,r),n.addDendrogram&&qCe(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"),U9e={hierarchicalClustering:uLe,hca:uLe},WCe=I8e({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),YCe=mt(function(e){var t=e.damping,r=e.preference;return.5<=t&&t<1||k8e("Damping must range on [0.5, 1). Got: ".concat(t)),(t=["median","mean","min","max"]).some(function(e){return e===r})||ae(r)||k8e("Preference must be one of [".concat(t.map(function(e){return"'".concat(e,"'")}).join(", "),"] or a number. Got: ").concat(r)),WCe(e)},"setOptions"),HCe=mt(function(e,t,r,n){var i=mt(function(e,t){return n[t](e)},"attr");return-h6e(e,n.length,function(e){return i(t,e)},function(e){return i(r,e)},t,r)},"getSimilarity"),VCe=mt(function(e,t){return"median"===t?tEe(e):"mean"===t?eEe(e):"min"===t?Q8e(e):"max"===t?J8e(e):t},"getPreference"),XCe=mt(function(e,t,r){for(var n=[],i=0;i<e;i++)0<t[i*e+i]+r[i*e+i]&&n.push(i);return n},"findExemplars"),KCe=mt(function(e,t,r){for(var n=[],i=0;i<e;i++){for(var a=-1,s=-1/0,o=0;o<r.length;o++){var l=r[o];t[i*e+l]>s&&(s=t[i*e+(a=l)])}0<a&&n.push(a)}for(var c=0;c<r.length;c++)n[r[c]]=r[c];return n},"assignClusters"),ZCe=mt(function(e,t,r){for(var n=KCe(e,t,r),i=0;i<r.length;i++){for(var a=[],s=0;s<n.length;s++)n[s]===r[i]&&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[i]=a[o]}return KCe(e,t,r)},"assign"),uLe=mt(function(P){for(var B=this.cy(),e=this.nodes(),t=YCe(P),$={},r=0;r<e.length;r++)$[e[r].id()]=r;for(var n,i=(n=e.length)*n,a=new Array(i),s=0;s<i;s++)a[s]=-1/0;for(var o=0;o<n;o++)for(var l=0;l<n;l++)o!==l&&(a[o*n+l]=HCe(t.distance,e[o],e[l],t.attributes));for(var F=VCe(a,t.preference),c=0;c<n;c++)a[c*n+c]=F;for(var h=new Array(i),u=0;u<i;u++)h[u]=0;for(var d=new Array(i),p=0;p<i;p++)d[p]=0;for(var g=new Array(n),f=new Array(n),m=new Array(n),y=0;y<n;y++)g[y]=0,f[y]=0,m[y]=0;for(var v,x=new Array(n*t.minIterations),z=0;z<x.length;z++)x[z]=0;for(v=0;v<t.maxIterations;v++){for(var b=0;b<n;b++){for(var w,k=-1/0,T=-1/0,E=-1,C=0;C<n;C++)g[C]=h[b*n+C],k<=(w=d[b*n+C]+a[b*n+C])?(T=k,k=w,E=C):T<w&&(T=w);for(var S=0;S<n;S++)h[b*n+S]=(1-t.damping)*(a[b*n+S]-k)+t.damping*g[S];h[b*n+E]=(1-t.damping)*(a[b*n+E]-T)+t.damping*g[E]}for(var _=0;_<n;_++){for(var A=0,L=0;L<n;L++)g[L]=d[L*n+_],f[L]=Math.max(0,h[L*n+_]),A+=f[L];A-=f[_],f[_]=h[_*n+_],A+=f[_];for(var N=0;N<n;N++)d[N*n+_]=(1-t.damping)*Math.min(0,A-f[N])+t.damping*g[N];d[_*n+_]=(1-t.damping)*(A-f[_])+t.damping*g[_]}for(var G=0,I=0;I<n;I++){var U=0<d[I*n+I]+h[I*n+I]?1:0;G+=x[v%t.minIterations*n+I]=U}if(0<G&&(v>=t.minIterations-1||v==t.maxIterations-1)){for(var q=0,R=0;R<n;R++){for(var j=m[R]=0;j<t.minIterations;j++)m[R]+=x[j*n+R];0!==m[R]&&m[R]!==t.minIterations||q++}if(q===n)break}}for(var M=XCe(n,h,d),W=ZCe(n,a,M),Y={},H=0;H<M.length;H++)Y[M[H]]=[];for(var D=0;D<e.length;D++){var V=W[$[e[D].id()]];null!=V&&Y[V].push(e[D])}for(var X=new Array(M.length),O=0;O<M.length;O++)X[O]=B.collection(Y[M[O]]);return X},"affinityPropagation"),QCe=I8e({root:void 0,directed:!(uLe={affinityPropagation:uLe,ap:uLe})}),M9e={hierholzer:mt(function(e){VTe(e)||(e={root:(r=arguments)[0],directed:r[1]});var a,s,t,r=QCe(e),e=r.root,o=r.directed,l=!1,c=(e&&(t=(WTe(e)?this.filter(e):e)[0].id()),{}),h={},n=(o?this.forEach(function(e){var t,r,n,i=e.id();e.isNode()?(r=e.indegree(!0),n=(t=e.outdegree(!0))-r,1==(r-=t)?a?l=!0:a=i:1==n?s?l=!0:s=i:(1<n||1<r)&&(l=!0),c[i]=[],e.outgoers().forEach(function(e){e.isEdge()&&c[i].push(e.id())})):h[i]=[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 n;t=s}else{if(t&&s!=t&&a!=t)return n;t=t||s}else t=t||this[0].id();for(var i,u=mt(function(e){for(var t,r,n,i=e,a=[e];c[i].length;)t=c[i].shift(),r=h[t][0],i!=(n=h[t][1])?(c[n]=c[n].filter(function(e){return e!=t}),i=n):o||i==r||(c[r]=c[r].filter(function(e){return e!=t}),i=r),a.unshift(t),a.unshift(i);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(i in d.unshift(this.getElementById(p.shift())),c)if(c[i].length)return n;n.found=!0,n.trail=this.spawn(d,!0)}return n},"hierholzer")},rLe={hopcroftTarjanBiconnected:rLe=mt(function(){var o=this,l={},c=0,h=0,u=[],d=[],p={},g=mt(function(e,t){for(var r=d.length-1,n=[],i=o.spawn();d[r].x!=e||d[r].y!=t;)n.push(d.pop().edge),r--;n.push(d.pop().edge),n.forEach(function(e){var t=e.connectedNodes().intersection(o);i.merge(e),t.forEach(function(e){var t=e.id(),r=e.connectedEdges().intersection(o);i.merge(e),l[t].cutVertex?i.merge(r.filter(function(e){return e.isLoop()})):i.merge(r)})}),u.push(i)},"buildComponent"),t=mt(function t(r,n,i){r===i&&(h+=1),l[n]={id:c,low:c++,cutVertex:!1};var a,s,e=o.getElementById(n).connectedEdges().intersection(o);0===e.size()?u.push(o.spawn(o.getElementById(n))):e.forEach(function(e){s=e.source().id(),a=e.target().id(),(a=s===n?a:s)!==i&&(s=e.id(),p[s]||(p[s]=!0,d.push({x:n,y:a,edge:e})),a in l?l[n].low=Math.min(l[n].low,l[a].id):(t(r,a,n),l[n].low=Math.min(l[n].low,l[a].low),l[n].id<=l[a].low&&(l[n].cutVertex=!0,g(n,a))))})},"biconnectedSearch"),e=(o.forEach(function(e){!e.isNode()||(e=e.id())in l||(h=0,t(e,e),l[e].cutVertex=1<h)}),Object.keys(l).filter(function(e){return l[e].cutVertex}).map(function(e){return o.getElementById(e)}));return{cut:o.spawn(e),components:u}},"hopcroftTarjanBiconnected"),htbc:rLe,htb:rLe,hopcroftTarjanBiconnectedComponents:rLe},fLe=mt(function(){var a=this,s={},o=0,l=[],c=[],h=a.spawn(a),t=mt(function t(r){if(c.push(r),s[r]={index:o,low:o++,explored:!1},a.getElementById(r).connectedEdges().intersection(a).forEach(function(e){(e=e.target().id())!==r&&(e in s||t(e),s[e].explored||(s[r].low=Math.min(s[r].low,s[e].low)))}),s[r].index===s[r].low){for(var e=a.spawn();;){var n=c.pop();if(e.merge(a.getElementById(n)),s[n].low=s[r].index,s[n].explored=!0,n===r)break}var i=e.edgesWith(e),i=e.merge(i);l.push(i),h=h.difference(i)}},"stronglyConnectedSearch");return a.forEach(function(e){!e.isNode()||(e=e.id())in s||t(e)}),{cut:h,components:l}},"tarjanStronglyConnected"),JCe={},[dLe,q9e,xLe,Y9e,nLe,z9e,j9e,KAe,J,G9e,hLe,k9e,I9e,U9e,uLe,M9e,rLe,{tarjanStronglyConnected:fLe,tsc:fLe,tscc:fLe,tarjanStronglyConnectedComponents:fLe}].forEach(function(e){y7e(JCe,e)}),eSe=0,(tSe=mt(function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=eSe,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))},"api")).prototype={fulfill:mt(function(e){return rSe(this,1,"fulfillValue",e)},"fulfill"),reject:mt(function(e){return rSe(this,2,"rejectReason",e)},"reject"),then:mt(function(e,t){var r=new tSe;return this.onFulfilled.push(aSe(e,r,"fulfill")),this.onRejected.push(aSe(t,r,"reject")),nSe(this),r.proxy},"then")},rSe=mt(function(e,t,r,n){return e.state===eSe&&(e.state=t,e[r]=n,nSe(e)),e},"deliver"),nSe=mt(function(e){1===e.state?iSe(e,"onFulfilled",e.fulfillValue):2===e.state&&iSe(e,"onRejected",e.rejectReason)},"execute"),iSe=mt(function(e,t,r){var n;0!==e[t].length&&(n=e[t],e[t]=[],e=mt(function(){for(var e=0;e<n.length;e++)n[e](r)},"func"),"function"==typeof setImmediate?setImmediate(e):setTimeout(e,0))},"execute_handlers"),aSe=mt(function(r,n,i){return function(e){if("function"!=typeof r)n[i].call(n,e);else{var t;try{t=r(e)}catch(e){return void n.reject(e)}sSe(n,t)}}},"resolver"),sSe=mt(function t(r,n){if(r===n||r.proxy===n)r.reject(new TypeError("cannot resolve promise with itself"));else{var e;if("object"===Bwe(n)&&null!==n||"function"==typeof n)try{e=n.then}catch(e){return void r.reject(e)}if("function"==typeof e){var i=!1;try{e.call(n,function(e){i||(i=!0,e===n?r.reject(new TypeError("circular thenable chain")):t(r,e))},function(e){i||(i=!0,r.reject(e))})}catch(e){i||r.reject(e)}}else r.fulfill(n)}},"resolve"),tSe.all=function(o){return new tSe(function(r,n){for(var i=new Array(o.length),a=0,s=mt(function(e,t){i[e]=t,++a===o.length&&r(i)},"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){n(e)}):s(t,e)})(e)})},tSe.resolve=function(r){return new tSe(function(e,t){e(r)})},tSe.reject=function(r){return new tSe(function(e,t){t(r)})},oSe=typeof Promise<"u"?Promise:tSe,lSe=mt(function(e,t,r){var n=t7e(e),i=!n;(t=this._private=y7e({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&&YTe(t.complete)&&t.completes.push(t.complete),i&&(r=e.position(),t.startPosition=t.startPosition||{x:r.x,y:r.y},t.startStyle=t.startStyle||e.cy().style().getAnimationStartStyle(e,t.style)),n&&(i=e.pan(),t.startPan={x:i.x,y:i.y},t.startZoom=e.zoom()),this.length=1,this[0]=this},"Animation"),dLe=lSe.prototype,y7e(dLe,{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),QTe(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 n=this._private,e=n.playing,t=(e&&this.pause(),n.progress=1-n.progress,n.started=!1,mt(function(e,t){var r=n[e];null!=r&&(n[e]=n[t],n[t]=r)},"swap"));if(t("zoom","startZoom"),t("pan","startPan"),t("position","startPosition"),n.style)for(var r=0;r<n.style.length;r++){var i=n.style[r],a=i.name,s=n.startStyle[a];n.startStyle[a]=i,n.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 oSe(function(e,t){r.push(function(){e()})})},"promise")}),dLe.complete=dLe.completed,dLe.run=dLe.play,dLe.running=dLe.playing,q9e={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,n=r?this:[this],i=this._private.cy||this,a=!(r=!r);if(!i.styleEnabled())return this;var s=i.style();if(e=y7e({},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=i.pan(),a=i.zoom(),e.position=K8e(t,a,s)),r&&null!=e.panBy&&(t=e.panBy,a=i.pan(),e.pan={x:a.x+t.x,y:a.y+t.y}),s=e.center||e.centre,r&&null!=s&&null!=(a=i.getCenterPan(s.eles,e.zoom))&&(e.pan=a),r&&null!=e.fit&&(t=e.fit,null!=(s=i.getFitViewport(t.eles||t.boundingBox,t.padding)))&&(e.pan=s.pan,e.zoom=s.zoom),r&&VTe(e.zoom)&&(null!=(a=i.getZoomedViewport(e.zoom))?(a.zoomed&&(e.zoom=a.zoom),a.panned&&(e.pan=a.pan)):e.zoom=null)}return new lSe(n[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=y7e({},e,t));for(var n=0;n<r.length;n++){var i=r[n],a=i.animated()&&(void 0===e.queue||e.queue);i.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],n=this._private.cy||this;if(n.styleEnabled()){for(var i=0;i<r.length;i++){for(var a=r[i]._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=[])}n.notify("draw")}return this},"stopImpl")},"stop")},xLe=Array.isArray,cSe=xLe,hSe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uSe=/^\w*$/,mt(u6e,"isKey"),dSe=u6e,mt(d6e,"isFunction"),pSe=d6e,Y9e=A7e["__core-js_shared__"],s=/[^.]+$/.exec((nLe=Y9e)&&nLe.keys&&nLe.keys.IE_PROTO||""),gSe=s?"Symbol(src)_1."+s:"",mt(p6e,"isMasked"),fSe=p6e,z9e=Function.prototype,mSe=z9e.toString,mt(g6e,"toSource"),ySe=g6e,j9e=/[\\^$.*+?()[\]{}|]/g,vSe=/^\[object .+?Constructor\]$/,KAe=Function.prototype,J=Object.prototype,G9e=KAe.toString,hLe=J.hasOwnProperty,xSe=RegExp("^"+G9e.call(hLe).replace(j9e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(f6e,"baseIsNative"),bSe=f6e,mt(m6e,"getValue$1"),wSe=m6e,mt(y6e,"getNative"),k9e=(kSe=y6e)(Object,"create"),TSe=k9e,mt(v6e,"hashClear"),I9e=v6e,mt(x6e,"hashDelete"),U9e=x6e,uLe=Object.prototype,ESe=uLe.hasOwnProperty,mt(b6e,"hashGet"),M9e=b6e,CSe=Object.prototype.hasOwnProperty,mt(w6e,"hashHas"),rLe=w6e,mt(k6e,"hashSet"),fLe=k6e,mt(T6e,"Hash"),T6e.prototype.clear=I9e,T6e.prototype.delete=U9e,T6e.prototype.get=M9e,T6e.prototype.has=rLe,T6e.prototype.set=fLe,SSe=T6e,mt(E6e,"listCacheClear"),dLe=E6e,mt(C6e,"eq"),_Se=C6e,mt(S6e,"assocIndexOf"),ASe=S6e,xLe=Array.prototype,LSe=xLe.splice,mt(_6e,"listCacheDelete"),Y9e=_6e,mt(A6e,"listCacheGet"),nLe=A6e,mt(L6e,"listCacheHas"),z9e=L6e,mt(N6e,"listCacheSet"),KAe=N6e,mt(I6e,"ListCache"),I6e.prototype.clear=dLe,I6e.prototype.delete=Y9e,I6e.prototype.get=nLe,I6e.prototype.has=z9e,I6e.prototype.set=KAe,NSe=I6e,J=kSe(A7e,"Map"),ISe=J,mt(R6e,"mapCacheClear"),G9e=R6e,mt(M6e,"isKeyable"),RSe=M6e,mt(D6e,"getMapData"),MSe=D6e,mt(O6e,"mapCacheDelete"),hLe=O6e,mt(P6e,"mapCacheGet"),j9e=P6e,mt(B6e,"mapCacheHas"),k9e=B6e,mt($6e,"mapCacheSet"),uLe=$6e,mt(F6e,"MapCache"),F6e.prototype.clear=G9e,F6e.prototype.delete=hLe,F6e.prototype.get=j9e,F6e.prototype.has=k9e,F6e.prototype.set=uLe,DSe=F6e,OSe="Expected a function",mt(z6e,"memoize"),z6e.Cache=DSe,PSe=z6e,mt(G6e,"memoizeCapped"),BSe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$Se=/\\(\\)?/g,I9e=G6e(function(e){var i=[];return 46===e.charCodeAt(0)&&i.push(""),e.replace(BSe,function(e,t,r,n){i.push(r?n.replace($Se,"$1"):t||e)}),i}),FSe=I9e,mt(U6e,"arrayMap"),zSe=U6e,GSe=1/0,U9e=W9e?W9e.prototype:void 0,USe=U9e?U9e.toString:void 0,mt(q6e,"baseToString"),qSe=q6e,mt(j6e,"toString$1"),jSe=j6e,mt(W6e,"castPath"),WSe=W6e,mt(Y6e,"toKey"),YSe=Y6e,mt(H6e,"baseGet"),HSe=H6e,mt(V6e,"get"),VSe=V6e,M9e=(()=>{try{var e=kSe(Object,"defineProperty");return e({},"",{}),e}catch{}})(),XSe=M9e,mt(X6e,"baseAssignValue"),KSe=X6e,rLe=Object.prototype,ZSe=rLe.hasOwnProperty,mt(K6e,"assignValue"),QSe=K6e,JSe=/^(?:0|[1-9]\d*)$/,mt(Z6e,"isIndex"),e_e=Z6e,mt(Q6e,"baseSet"),t_e=Q6e,mt(J6e,"set"),r_e=J6e,mt(eke,"copyArray"),n_e=eke,mt(tke,"toPath"),i_e=tke,fLe={data:mt(function(b){var e={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:mt(function(e){},"beforeGet"),beforeSet:mt(function(e,t){},"beforeSet"),onSet:mt(function(e){},"onSet"),canSet:mt(function(e){return!0},"canSet")};return b=y7e({},e,b),mt(function(e,t){var r,n=b,i=this,a=void 0!==i.length,s=a?i:[i],o=a?i[0]:i;if(WTe(e)){var l,c=-1!==e.indexOf(".")&&i_e(e);if(n.allowGetting&&void 0===t)return o&&(n.beforeGet(o),l=c&&void 0===o._private[n.field][e]?VSe(o._private[n.field],c):o._private[n.field][e]),l;if(n.allowSetting&&void 0!==t&&!n.immutableKeys[e]){a=Gwe({},e,t),n.beforeSet(i,a);for(var h=0,u=s.length;h<u;h++){var d=s[h];n.canSet(d)&&(c&&void 0===o._private[n.field][e]?r_e(d._private[n.field],c,t):d._private[n.field][e]=t)}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}}else if(n.allowSetting&&VTe(e)){var p=e,g=Object.keys(p);n.beforeSet(i,p);for(var f=0;f<g.length;f++){var m,y=p[m=g[f]];if(!n.immutableKeys[m])for(var v=0;v<s.length;v++){var x=s[v];n.canSet(x)&&(x._private[n.field][m]=y)}}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}else if(n.allowBinding&&YTe(e))i.on(n.bindingEvent,e);else if(n.allowGetting&&void 0===e)return o&&(n.beforeGet(o),r=o._private[n.field]),r;return i},"dataImpl")},"data"),removeData:mt(function(f){return f=y7e({},{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 n=e.split(/\s+/),i=n.length,a=0;a<i;a++){var s=n[a];if(!i7e(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")},xLe={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 i=this,a=Array.prototype.slice.call(arguments,0);return new oSe(function(t,e){var r=mt(function(e){i.off.apply(i,n),t(e)},"callback"),n=(r=a.concat([r])).concat([]);i.on.apply(i,r)})}},"eventAliasesOn")},a_e={},[q9e,fLe,xLe].forEach(function(e){y7e(a_e,e)}),dLe={animate:a_e.animate(),animation:a_e.animation(),animated:a_e.animated(),clearQueue:a_e.clearQueue(),delay:a_e.delay(),delayAnimation:a_e.delayAnimation(),stop:a_e.stop()},(Y9e={classes:mt(function(e){var t;if(void 0===e)return t=[],this[0]._private.classes.forEach(function(e){return t.push(e)}),t;HTe(e)||(e=(e||"").match(/\S+/g)||[]);for(var r=[],n=new $8e(e),i=0;i<this.length;i++){for(var a=this[i],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=n,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){HTe(e)||(e=e.match(/\S+/g)||[]);for(var r=void 0===t,n=[],i=0,a=this.length;i<a;i++)for(var s=this[i],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&&(n.push(s),l=!0)}return 0<n.length&&this.spawn(n).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=Y9e.classNames=Y9e.classes,(s_e={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:g7e,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+s_e.metaChar+"))+",s_e.className="(?:[\\w-]|(?:\\\\"+s_e.metaChar+"))+",s_e.value=s_e.string+"|"+s_e.number,s_e.id=s_e.variable;for(var t,r=s_e.comparatorOp.split("|"),i=0;i<r.length;i++)t=r[i],s_e.comparatorOp+="|@"+t;for(r=s_e.comparatorOp.split("|"),i=0;i<r.length;i++)0<=(t=r[i]).indexOf("!")||"="===t||(s_e.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)}),n=l(e,.5*t,r),i=l(e,t,n),a=1/6*(s.dx+2*(r.dx+n.dx)+i.dx),s=1/6*(s.dv+2*(r.dv+n.dv)+i.dv);return e.x=e.x+a*t,e.v=e.v+s*t,e}o_e=mt(function(){return{checks:[]}},"newQuery"),Q={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},l_e=[{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 m7e(e.selector,t.selector)}),c_e=(()=>{for(var e,t={},r=0;r<l_e.length;r++)t[(e=l_e[r]).selector]=e.matches;return t})(),h_e=mt(function(e,t){return c_e[e](t)},"stateSelectorMatches"),nLe="("+l_e.map(function(e){return e.selector}).join("|")+")",u_e=mt(function(e){return e.replace(new RegExp("\\\\("+s_e.metaChar+")","g"),function(e,t){return t})},"cleanMetaChars"),d_e=mt(function(e,t,r){e[e.length-1]=r},"replaceLastQuery"),(p_e=[{name:"group",query:!0,regex:"("+s_e.group+")",populate:mt(function(e,t,r){r=Uwe(r,1)[0],t.checks.push({type:Q.GROUP,value:"*"===r?r:r+"s"})},"populate")},{name:"state",query:!0,regex:nLe,populate:mt(function(e,t,r){r=Uwe(r,1)[0],t.checks.push({type:Q.STATE,value:r})},"populate")},{name:"id",query:!0,regex:"\\#("+s_e.id+")",populate:mt(function(e,t,r){r=Uwe(r,1)[0],t.checks.push({type:Q.ID,value:u_e(r)})},"populate")},{name:"className",query:!0,regex:"\\.("+s_e.className+")",populate:mt(function(e,t,r){r=Uwe(r,1)[0],t.checks.push({type:Q.CLASS,value:u_e(r)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+s_e.variable+")\\s*\\]",populate:mt(function(e,t,r){r=Uwe(r,1)[0],t.checks.push({type:Q.DATA_EXIST,field:u_e(r)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+s_e.variable+")\\s*("+s_e.comparatorOp+")\\s*("+s_e.value+")\\s*\\]",populate:mt(function(e,t,r){var n=(r=Uwe(r,3))[0],i=r[1],r=r[2],r=null!=new RegExp("^"+s_e.string+"$").exec(r)?r.substring(1,r.length-1):parseFloat(r);t.checks.push({type:Q.DATA_COMPARE,field:u_e(n),operator:i,value:r})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+s_e.boolOp+")\\s*("+s_e.variable+")\\s*\\]",populate:mt(function(e,t,r){var n=(r=Uwe(r,2))[0];t.checks.push({type:Q.DATA_BOOL,field:u_e(r[1]),operator:n})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+s_e.meta+")\\s*("+s_e.comparatorOp+")\\s*("+s_e.number+")\\s*\\]\\]",populate:mt(function(e,t,r){var n=(r=Uwe(r,3))[0],i=r[1],r=r[2];t.checks.push({type:Q.META_COMPARE,field:u_e(n),operator:i,value:parseFloat(r)})},"populate")},{name:"nextQuery",separator:!0,regex:s_e.separator,populate:mt(function(e,t){var r=e.currentSubject,n=e.edgeCount,i=e.compoundCount,a=e[e.length-1];return null!=r&&(a.subject=r,e.currentSubject=null),a.edgeCount=n,a.compoundCount=i,e.edgeCount=0,e.compoundCount=0,e[e.length++]=o_e()},"populate")},{name:"directedEdge",separator:!0,regex:s_e.directedEdge,populate:mt(function(e,t){var r,n,i;return null==e.currentSubject?(n=o_e(),r=t,i=o_e(),n.checks.push({type:Q.DIRECTED_EDGE,source:r,target:i}),d_e(e,t,n)):(r=o_e(),n=t,i=o_e(),r.checks.push({type:Q.NODE_SOURCE,source:n,target:i}),d_e(e,t,r)),e.edgeCount++,i},"populate")},{name:"undirectedEdge",separator:!0,regex:s_e.undirectedEdge,populate:mt(function(e,t){var r,n,i;return null==e.currentSubject?(n=o_e(),r=t,i=o_e(),n.checks.push({type:Q.UNDIRECTED_EDGE,nodes:[r,i]}),d_e(e,t,n),e.edgeCount++):(r=o_e(),n=t,i=o_e(),r.checks.push({type:Q.NODE_NEIGHBOR,node:n,neighbor:i}),d_e(e,t,r)),i},"populate")},{name:"child",separator:!0,regex:s_e.child,populate:mt(function(e,t){var r,n,i,a,s,o;return null==e.currentSubject?(o=o_e(),a=o_e(),r=e[e.length-1],o.checks.push({type:Q.CHILD,parent:r,child:a}),d_e(e,t,o),e.compoundCount++,a):e.currentSubject===t?(r=o_e(),o=e[e.length-1],a=o_e(),n=o_e(),i=o_e(),s=o_e(),r.checks.push({type:Q.COMPOUND_SPLIT,left:o,right:a,subject:n}),n.checks=t.checks,t.checks=[{type:Q.TRUE}],s.checks.push({type:Q.TRUE}),a.checks.push({type:Q.PARENT,parent:s,child:i}),d_e(e,o,r),e.currentSubject=n,e.compoundCount++,i):(a=o_e(),s=o_e(),o=[{type:Q.PARENT,parent:a,child:s}],a.checks=t.checks,t.checks=o,e.compoundCount++,s)},"populate")},{name:"descendant",separator:!0,regex:s_e.descendant,populate:mt(function(e,t){var r,n,i,a,s,o;return null==e.currentSubject?(o=o_e(),a=o_e(),r=e[e.length-1],o.checks.push({type:Q.DESCENDANT,ancestor:r,descendant:a}),d_e(e,t,o),e.compoundCount++,a):e.currentSubject===t?(r=o_e(),o=e[e.length-1],a=o_e(),n=o_e(),i=o_e(),s=o_e(),r.checks.push({type:Q.COMPOUND_SPLIT,left:o,right:a,subject:n}),n.checks=t.checks,t.checks=[{type:Q.TRUE}],s.checks.push({type:Q.TRUE}),a.checks.push({type:Q.ANCESTOR,ancestor:s,descendant:i}),d_e(e,o,r),e.currentSubject=n,e.compoundCount++,i):(a=o_e(),s=o_e(),o=[{type:Q.ANCESTOR,ancestor:a,descendant:s}],a.checks=t.checks,t.checks=o,e.compoundCount++,s)},"populate")},{name:"subject",modifier:!0,regex:s_e.subject,populate:mt(function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return E8e("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t,(e=null==(t=e[e.length-1].checks[0])?null:t.type)===Q.DIRECTED_EDGE?t.type=Q.NODE_TARGET:e===Q.UNDIRECTED_EDGE&&(t.type=Q.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)}),g_e=mt(function(e){for(var t=0;t<p_e.length;t++){var r=(o=p_e[t]).name,n=e.match(o.regexObj);if(null!=n){var i=n,a=o,s=r,o=n[0];e=e.substring(o.length);break}}return{expr:a,match:i,name:s,remaining:e}},"consumeExpr"),f_e=mt(function(e){var t=e.match(/^\s+/);return t&&(t=t[0],e=e.substring(t.length)),e},"consumeWhitespace"),z9e=mt(function(e){var t=this,r=t.inputText=e,n=t[0]=o_e();for(t.length=1,r=f_e(r);;){var i=g_e(r);if(null==i.expr)return E8e("The selector `"+e+"`is invalid"),!1;var a=i.match.slice(1);if(!1===(a=i.expr.populate(t,n,a)))return!1;if(null!=a&&(n=a),(r=i.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 E8e("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(1<l.edgeCount)return E8e("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&E8e("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"),KAe=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,n=e.value;switch(r){case Q.GROUP:return(i=o(n)).substring(0,i.length-1);case Q.DATA_COMPARE:return"["+e.field+c(o(e.operator))+l(n)+"]";case Q.DATA_BOOL:var i=e.operator,a=e.field;return"["+o(i)+a+"]";case Q.DATA_EXIST:return"["+e.field+"]";case Q.META_COMPARE:return i=e.operator,"[["+e.field+c(o(i))+l(n)+"]]";case Q.STATE:return n;case Q.ID:return"#"+n;case Q.CLASS:return"."+n;case Q.PARENT:case Q.CHILD:return h(e.parent,t)+c(">")+h(e.child,t);case Q.ANCESTOR:case Q.DESCENDANT:return h(e.ancestor,t)+" "+h(e.descendant,t);case Q.COMPOUND_SPLIT:var a=h(e.left,t),i=h(e.subject,t),s=h(e.right,t);return a+(0<a.length?" ":"")+i+s;case Q.TRUE:return""}},"checkToString"),h=mt(function(n,i){return n.checks.reduce(function(e,t,r){return e+(i===n&&0===r?"$":"")+a(t,i)},"")},"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"),J={parse:z9e,toString:KAe},m_e=mt(function(e,t,r){var n,i,a,s=WTe(e),o=ae(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)&&(i=s||o?""+e:"",a=""+r),c&&(e=i=i.toLowerCase(),r=a=a.toLowerCase()),t){case"*=":n=0<=i.indexOf(a);break;case"$=":n=0<=i.indexOf(a,i.length-a.length);break;case"^=":n=0===i.indexOf(a);break;case"=":n=e===r;break;case">":u=!0,n=r<e;break;case">=":u=!0,n=r<=e;break;case"<":u=!0,n=e<r;break;case"<=":u=!0,n=e<=r;break;default:n=!1}return!h||null==e&&u?n:!n},"valCmp"),y_e=mt(function(e,t){switch(t){case"?":return!!e;case"!":return!e;case"^":return void 0===e}},"boolCmp"),v_e=mt(function(e){return void 0!==e},"existCmp"),x_e=mt(function(e,t){return e.data(t)},"data"),b_e=mt(function(e,t){return e[t]()},"meta"),w_e=[],k_e=mt(function(e,t){return e.checks.every(function(e){return w_e[e.type](e,t)})},"matches"),w_e[Q.GROUP]=function(e,t){return"*"===(e=e.value)||e===t.group()},w_e[Q.STATE]=function(e,t){return e=e.value,h_e(e,t)},w_e[Q.ID]=function(e,t){return e=e.value,t.id()===e},w_e[Q.CLASS]=function(e,t){return e=e.value,t.hasClass(e)},w_e[Q.META_COMPARE]=function(e,t){var r=e.field,n=e.operator,e=e.value;return m_e(b_e(t,r),n,e)},w_e[Q.DATA_COMPARE]=function(e,t){var r=e.field,n=e.operator,e=e.value;return m_e(x_e(t,r),n,e)},w_e[Q.DATA_BOOL]=function(e,t){var r=e.field,e=e.operator;return y_e(x_e(t,r),e)},w_e[Q.DATA_EXIST]=function(e,t){return e=e.field,v_e(x_e(t,e))},w_e[Q.UNDIRECTED_EDGE]=function(e,t){var r=e.nodes[0],e=e.nodes[1],n=t.source(),t=t.target();return k_e(r,n)&&k_e(e,t)||k_e(e,n)&&k_e(r,t)},w_e[Q.NODE_NEIGHBOR]=function(t,e){return k_e(t.node,e)&&e.neighborhood().some(function(e){return e.isNode()&&k_e(t.neighbor,e)})},w_e[Q.DIRECTED_EDGE]=function(e,t){return k_e(e.source,t.source())&&k_e(e.target,t.target())},w_e[Q.NODE_SOURCE]=function(t,e){return k_e(t.source,e)&&e.outgoers().some(function(e){return e.isNode()&&k_e(t.target,e)})},w_e[Q.NODE_TARGET]=function(t,e){return k_e(t.target,e)&&e.incomers().some(function(e){return e.isNode()&&k_e(t.source,e)})},w_e[Q.CHILD]=function(e,t){return k_e(e.child,t)&&k_e(e.parent,t.parent())},w_e[Q.PARENT]=function(t,e){return k_e(t.parent,e)&&e.children().some(function(e){return k_e(t.child,e)})},w_e[Q.DESCENDANT]=function(t,e){return k_e(t.descendant,e)&&e.ancestors().some(function(e){return k_e(t.ancestor,e)})},w_e[Q.ANCESTOR]=function(t,e){return k_e(t.ancestor,e)&&e.descendants().some(function(e){return k_e(t.descendant,e)})},w_e[Q.COMPOUND_SPLIT]=function(e,t){return k_e(e.subject,t)&&k_e(e.left,t)&&k_e(e.right,t)},w_e[Q.TRUE]=function(){return!0},w_e[Q.COLLECTION]=function(e,t){return e.value.has(t)},w_e[Q.FILTER]=function(e,t){return(0,e.value)(t)},G9e=mt(function(e){var t,n=this;return 1===n.length&&1===n[0].checks.length&&n[0].checks[0].type===Q.ID?e.getElementById(n[0].checks[0].value).collection():(t=mt(function(e){for(var t=0;t<n.length;t++){var r=n[t];if(k_e(r,e))return!0}return!1},"selectorFunction"),null==n.text()&&(t=mt(function(){return!0},"selectorFunction")),e.filter(t))},"filter"),hLe=mt(function(e){for(var t=0;t<this.length;t++){var r=this[t];if(k_e(r,e))return!0}return!1},"matches"),j9e={matches:hLe,filter:G9e},T_e=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*$/)||(QTe(e)?this.addQuery({checks:[{type:Q.COLLECTION,value:e.collection()}]}):YTe(e)?this.addQuery({checks:[{type:Q.FILTER,value:e}]}):WTe(e)?this.parse(e)||(this.invalid=!0):k8e("A selector must be created from a string; found "))},"Selector"),E_e=T_e.prototype,[J,j9e].forEach(function(e){return y7e(E_e,e)}),E_e.text=function(){return this.inputText},E_e.size=function(){return this.length},E_e.eq=function(e){return this[e]},E_e.sameText=function(e){return!this.invalid&&!e.invalid&&this.text()===e.text()},E_e.addQuery=function(e){this[this.length++]=e},E_e.selector=E_e.toString,(k9e={allAre:mt(function(e){var t=new T_e(e);return this.every(function(e){return t.matches(e)})},"allAre"),is:mt(function(e){var t=new T_e(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=k9e.allAreNeighbors,k9e.has=k9e.contains,k9e.equal=k9e.equals=k9e.same,uLe=mt(function(s,o){return mt(function(e,t,r,n){var i,a=e;return null==a?i="":QTe(a)&&1===a.length&&(i=a.id()),1===this.length&&i?(a=(a=(a=this[0]._private).traversalCache=a.traversalCache||{})[o]=a[o]||[])[i=u8e(i)]||(a[i]=s.call(this,e,t,r,n)):s.call(this,e,t,r,n)},"traversalCache")},"cache"),I9e={parent:mt(function(e){var t=[];if(1===this.length){var r=this[0]._private.parent;if(r)return r}for(var n=0;n<this.length;n++){var i=this[n]._private.parent;i&&t.push(i)}return this.spawn(t,!0).filter(e)},"parent"),parents:mt(function(e){for(var t=[],r=this.parent();r.nonempty();){for(var n=0;n<r.length;n++){var i=r[n];t.push(i)}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(),n=(n=n||r).intersect(r);return n.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:uLe(function(e){for(var t=[],r=0;r<this.length;r++)for(var n=this[r]._private.children,i=0;i<n.length;i++)t.push(n[i]);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 n=[];function i(e){for(var t=0;t<e.length;t++){var r=e[t];n.push(r),r.children().nonempty()&&i(r.children())}}return mt(i,"add"),i(this.children()),this.spawn(n,!0).filter(e)},"descendants")},mt(rke,"forEachCompound"),mt(nke,"addChildren"),I9e.forEachDown=function(e){return rke(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],nke)},mt(ike,"addParent"),I9e.forEachUp=function(e){return rke(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],ike)},mt(ake,"addParentAndChildren"),I9e.forEachUpAndDown=function(e){return rke(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],ake)},I9e.ancestors=I9e.parents,(U9e=W9e={data:a_e.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:a_e.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:a_e.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:a_e.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:a_e.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:a_e.removeData({field:"rscratch",triggerEvent:!1}),id:mt(function(){var e=this[0];if(e)return e._private.data.id},"id")}).attr=U9e.data,U9e.removeAttr=U9e.removeData,M9e=W9e,rLe={},mt(ske,"defineDegreeFunction"),y7e(rLe,{degree:ske(function(e,t){return t.source().same(t.target())?2:1}),indegree:ske(function(e,t){return t.target().same(e)?1:0}),outdegree:ske(function(e,t){return t.source().same(e)?1:0})}),mt(oke,"defineDegreeBoundsFunction"),y7e(rLe,{minDegree:oke("degree",function(e,t){return e<t}),maxDegree:oke("degree",function(e,t){return t<e}),minIndegree:oke("indegree",function(e,t){return e<t}),maxIndegree:oke("indegree",function(e,t){return t<e}),minOutdegree:oke("outdegree",function(e,t){return e<t}),maxOutdegree:oke("outdegree",function(e,t){return t<e})}),y7e(rLe,{totalDegree:mt(function(e){for(var t=0,r=this.nodes(),n=0;n<r.length;n++)t+=r[n].degree(e);return t},"totalDegree")}),C_e=mt(function(e,t,r){for(var n=0;n<e.length;n++){var i,a=e[n];a.locked()||(i=a._private.position,i={x:null!=t.x?t.x-i.x:0,y:null!=t.y?t.y-i.y:0},!a.isParent()||0===i.x&&0===i.y||a.children().shift(i,r),a.dirtyBoundingBoxCache())}},"beforePositionSet"),q9e={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){C_e(e,t,!1)},"beforeSet"),onSet:mt(function(e){e.dirtyCompoundBoundsCache()},"onSet"),canSet:mt(function(e){return!e.locked()},"canSet")},(xLe=fLe={position:a_e.data(q9e),silentPosition:a_e.data(y7e({},q9e,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:mt(function(e,t){C_e(e,t,!0)},"beforeSet"),onSet:mt(function(e){e.dirtyCompoundBoundsCache()},"onSet")})),positions:mt(function(e,t){if(VTe(e))t?this.silentPosition(e):this.position(e);else if(YTe(e)){var r=e;(e=this.cy()).startBatch();for(var n=0;n<this.length;n++){var i,a=this[n];(i=r(a,n))&&(t?a.silentPosition(i):a.position(i))}e.endBatch()}return this},"positions"),silentPositions:mt(function(e){return this.positions(e,!0)},"silentPositions"),shift:mt(function(e,t,r){var n;if(VTe(e)?(n={x:ae(e.x)?e.x:0,y:ae(e.y)?e.y:0},r=t):WTe(e)&&ae(t)&&((n={x:0,y:0})[e]=t),null!=n){var i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var s,o=this[a];i.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this)||(s={x:(s=o.position()).x+n.x,y:s.y+n.y},r?o.silentPosition(s):o.position(s))}i.endBatch()}return this},"shift"),silentShift:mt(function(e,t){return VTe(e)?this.shift(e,!0):WTe(e)&&ae(t)&&this.shift(e,t,!0),this},"silentShift"),renderedPosition:mt(function(e,t){var r=this[0],n=(s=this.cy()).zoom(),i=s.pan(),a=VTe(e)?e:void 0,s=void 0!==a||void 0!==t&&WTe(e);if(r&&r.isNode()){if(!s)return r=r.position(),a=X8e(r,n,i),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-i[e])/n):void 0!==a&&l.position(K8e(a,n,i))}}else if(!s)return;return this},"renderedPosition"),relativePosition:mt(function(e,t){var r,n=this[0],i=this.cy(),a=VTe(e)?e:void 0,s=void 0!==a||void 0!==t&&WTe(e),o=i.hasCompoundNodes();if(n&&n.isNode()){if(!s)return i=n.position(),(r=(n=o?n.parent():null)&&0<n.length)&&(n=n[0]),r=r?n.position():{x:0,y:0},a={x:i.x-r.x,y:i.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=xLe.point=xLe.position,xLe.modelPositions=xLe.points=xLe.positions,xLe.renderedPoint=xLe.renderedPosition,xLe.relativePoint=xLe.relativePosition,nLe=fLe,KAe=z9e={renderedBoundingBox:function(e){var e=this.boundingBox(e),t=(r=this.cy()).zoom(),r=r.pan(),n=e.x1*t+r.x,i=e.x2*t+r.x,a=e.y1*t+r.y;return{x1:n,x2:i,y1:a,y2:e=e.y2*t+r.y,w:i-n,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 n=this[r],i=n._private;i.compoundBoundsClean&&!e||(a(n),t.batching())||(i.compoundBoundsClean=!0)}}return this;function a(e){var t,r,n,i,a,s,o,l;function c(e,t,r){var n=0,i=0,a=t+r;return 0<e&&0<a&&(n=t/a*e,i=r/a*e),{biasDiff:n,biasComplementDiff:i}}function h(e,t,r,n){if("%"!==r.units)return"px"===r.units?r.pfValue:0;switch(n){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,n=e.children(),i="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")}},n=n.boundingBox({includeLabels:i,includeOverlays:!1,useCache:!1}),i=t.position,0!==n.w&&0!==n.h||((n={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=i.x-n.w/2,n.x2=i.x+n.w/2,n.y1=i.y-n.h/2,n.y2=i.y+n.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-n.w,s,a)).biasDiff,s=s.biasComplementDiff,o=(l=c(r.height.val-n.h,l,o)).biasDiff,l=l.biasComplementDiff,t.autoPadding=h(n.w,n.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(n.w,r.width.val),i.x=(-a+n.x1+n.x2+s)/2,t.autoHeight=Math.max(n.h,r.height.val),i.y=(-o+n.y1+n.y2+l)/2)}}},S_e=mt(function(e){return e===1/0||e===-1/0?0:e},"noninf"),__e=mt(function(e,t,r,n,i){n-t!=0&&i-r!=0&&null!=t&&null!=r&&null!=n&&null!=i&&(e.x1=t<e.x1?t:e.x1,e.x2=e.x2<n?n:e.x2,e.y1=r<e.y1?r:e.y1,e.y2=e.y2<i?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},"updateBounds"),A_e=mt(function(e,t){return null==t?e:__e(e,t.x1,t.y1,t.x2,t.y2)},"updateBoundsFromBox"),L_e=mt(function(e,t,r){return O8e(e,t,r)},"prefixedProperty"),N_e=mt(function(e,t,r){var n,i,a,s;t.cy().headless()||(n=(a=(s=t._private).rstyle).arrowWidth/2,"none"!==t.pstyle(r+"-arrow-shape").value&&(t="source"===r?(i=a.srcX,a.srcY):"target"===r?(i=a.tgtX,a.tgtY):(i=a.midX,a.midY),(s=(a=s.arrowBounds=s.arrowBounds||{})[r]=a[r]||{}).x1=i-n,s.y1=t-n,s.x2=i+n,s.y2=t+n,s.w=s.x2-s.x1,s.h=s.y2-s.y1,xEe(s,1),__e(e,s.x1,s.y1,s.x2,s.y2)))},"updateBoundsFromArrow"),I_e=mt(function(e,t,r){if(!t.cy().headless()){var n=t._private,i=n.rstyle;if(t.pstyle((p=r?r+"-":"")+"label").strValue){var a=t.pstyle("text-halign"),s=t.pstyle("text-valign"),o=L_e(i,"labelWidth",r),l=L_e(i,"labelHeight",r),c=L_e(i,"labelX",r),h=L_e(i,"labelY",r),i=t.pstyle(p+"text-margin-x").pfValue,u=t.pstyle(p+"text-margin-y").pfValue,d=t.isEdge(),p=t.pstyle(p+"text-rotation"),g=t.pstyle("text-outline-width").pfValue,f=t.pstyle("text-border-width").pfValue/2,t=t.pstyle("text-background-padding").pfValue,m=l,y=o,v=y/2,x=m/2;if(d)E=c-v,C=c+v,S=h-x,_=h+x;else{switch(a.value){case"left":E=c-y,C=c;break;case"center":E=c-v,C=c+v;break;case"right":C=(E=c)+y}switch(s.value){case"top":S=h-m,_=h;break;case"center":S=h-x,_=h+x;break;case"bottom":_=(S=h)+m}}if(E+=l=i-Math.max(g,f)-t-2,C+=o=i+Math.max(g,f)+t+2,S+=i=u-Math.max(g,f)-t-2,_+=u=u+Math.max(g,f)+t+2,(t=(f=n.labelBounds)[g=r||"main"]=f[g]||{}).x1=E,t.y1=S,t.x2=C,t.y2=_,t.w=C-E,t.h=_-S,t.leftPad=l,t.rightPad=o,t.topPad=i,t.botPad=u,l=d&&"autorotate"===p.strValue,o=null!=p.pfValue&&0!==p.pfValue,l||o){var i=l?L_e(n.rstyle,"labelAngle",r):p.pfValue,b=Math.cos(i),w=Math.sin(i),k=(E+C)/2,T=(S+_)/2;if(!d){switch(a.value){case"left":k=C;break;case"right":k=E}switch(s.value){case"top":T=_;break;case"bottom":T=S}}var u=(t=mt(function(e,t){return{x:(e-=k)*b-(t-=T)*w+k,y:e*w+t*b+T}},"rotate"))(E,S),o=t(E,_),l=t(C,S),r=t(C,_),E=Math.min(u.x,o.x,l.x,r.x),C=Math.max(u.x,o.x,l.x,r.x),S=Math.min(u.y,o.y,l.y,r.y),_=Math.max(u.y,o.y,l.y,r.y)}(i=f[p=g+"Rot"]=f[p]||{}).x1=E,i.y1=S,i.x2=C,i.y2=_,i.w=C-E,i.h=_-S,__e(e,E,S,C,_),__e(n.labelBounds.all,E,S,C,_)}return e}},"updateBoundsFromLabel"),R_e=mt(function(e,t){var r,n,i,a;t.cy().headless()||(r=t.pstyle("outline-opacity").value,i=t.pstyle("outline-width").value,0<r&&0<i&&(r=t.pstyle("outline-offset").value,t=t.pstyle("shape").value,r=(e.w+2*(i+=r))/e.w,a=(e.h+2*i)/e.h,n=0,["diamond","pentagon","round-triangle"].includes(t)?(r=(e.w+2.4*i)/e.w,n=-i/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(t)?r=(e.w+2.4*i)/e.w:"star"===t?(r=(e.w+2.8*i)/e.w,a=(e.h+2.6*i)/e.h,n=-i/3.8):"triangle"===t?(r=(e.w+2.8*i)/e.w,a=(e.h+2.4*i)/e.h,n=-i/1.4):"vee"===t&&(r=(e.w+4.4*i)/e.w,a=(e.h+3.8*i)/e.h,n=.5*-i),t=e.h*a-e.h,i=e.w*r-e.w,bEe(e,[Math.ceil(t/2),Math.ceil(i/2)]),0!==n)&&(a=mEe(e,0,n),yEe(e,a)))},"updateBoundsFromOutline"),M_e=mt(function(e,t){var r=(n=e._private.cy).styleEnabled(),n=n.headless(),i=pEe(),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;__e(i,y=s-g,x=d-f,v=s+g,b=d+f),r&&t.includeOutlines&&R_e(i,e)}else if(o&&t.includeEdges)if(r&&!n){var m,s=e.pstyle("curve-style").strValue,y=Math.min(l.srcX,l.midX,l.tgtX),v=Math.max(l.srcX,l.midX,l.tgtX),x=Math.min(l.srcY,l.midY,l.tgtY),b=Math.max(l.srcY,l.midY,l.tgtY);if(__e(i,y-=p,x-=p,v+=p,b+=p),"haystack"===s)(g=l.haystackPts)&&2===g.length&&(y=g[0].x,x=g[0].y,(v=g[1].x)<y&&(d=y,y=v,v=d),(b=g[1].y)<x&&(f=x,x=b,b=f),__e(i,y-p,x-p,v+p,b+p));else if("bezier"===s||"unbundled-bezier"===s||s.endsWith("segments")||s.endsWith("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 w=0;w<m.length;w++){var k=m[w],y=k.x-p;__e(i,y,x=k.y-p,v=k.x+p,b=k.y+p)}}}else n=e.source().position(),d=e.target().position(),y=n.x,v=d.x,x=n.y,v<y&&(g=y,y=v,v=g),(b=d.y)<x&&(f=x,x=b,b=f),__e(i,y-=p,x-=p,v+=p,b+=p);r&&t.includeEdges&&o&&(N_e(i,e,"mid-source"),N_e(i,e,"mid-target"),N_e(i,e,"source"),N_e(i,e,"target")),r&&"yes"===e.pstyle("ghost").value&&(s=e.pstyle("ghost-offset-x").pfValue,n=e.pstyle("ghost-offset-y").pfValue,__e(i,i.x1+s,i.y1+n,i.x2+s,i.y2+n)),g=a.bodyBounds=a.bodyBounds||{},wEe(g,i),bEe(g,c),xEe(g,1),r&&(y=i.x1,v=i.x2,x=i.y1,b=i.y2,__e(i,y-u,x-u,v+u,b+u)),d=a.overlayBounds=a.overlayBounds||{},wEe(d,i),bEe(d,c),xEe(d,1),null!=(f=a.labelBounds=a.labelBounds||{}).all?fEe(f.all):f.all=pEe(),r&&t.includeLabels&&(t.includeMainLabels&&I_e(i,e,null),o)&&(t.includeSourceLabels&&I_e(i,e,"source"),t.includeTargetLabels)&&I_e(i,e,"target")}return i.x1=S_e(i.x1),i.y1=S_e(i.y1),i.x2=S_e(i.x2),i.y2=S_e(i.y2),i.w=S_e(i.x2-i.x1),i.h=S_e(i.y2-i.y1),0<i.w&&0<i.h&&h&&(bEe(i,c),xEe(i,1)),i},"boundingBoxImpl"),D_e=mt(function(e){var t=0,r=mt(function(e){return(e?1:0)<<t++},"tf"),n=0;return(n+=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"),O_e=mt(function(e){var t,r;return e.isEdge()?(t=e.source().position(),e=e.target().position(),r=mt(function(e){return Math.round(e)},"r"),h8e([r(t.x),r(t.y),r(e.x),r(e.y)])):0},"getBoundingBoxPosKey"),P_e=mt(function(e,t){var r,n=e._private,i=e.isEdge(),a=(null==t?$_e:D_e(t))===$_e,s=O_e(e),o=n.bbCachePosKey===s,l=t.useCache&&o,c=mt(function(e){return null==e._private.bbCache||e._private.styleDirty},"isDirty");return!l||c(e)||i&&(c(e.source())||c(e.target()))?(o||e.recalculateRenderedStyle(l),r=M_e(e,B_e),n.bbCache=r,n.bbCachePosKey=s):r=n.bbCache,a||(c=e.isNode(),r=pEe(),(t.includeNodes&&c||t.includeEdges&&!c)&&(t.includeOverlays?A_e(r,n.overlayBounds):A_e(r,n.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!i||t.includeSourceLabels&&t.includeTargetLabels)?A_e(r,n.labelBounds.all):(t.includeMainLabels&&A_e(r,n.labelBounds.mainRot),t.includeSourceLabels&&A_e(r,n.labelBounds.sourceRot),t.includeTargetLabels&&A_e(r,n.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1),r},"cachedBoundingBoxImpl"),$_e=D_e(B_e={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0}),F_e=I8e(B_e),z9e.boundingBox=function(e){if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){var t=pEe(),r=F_e(e=e||B_e);if(this.cy().styleEnabled())for(var n=0;n<this.length;n++){var i=this[n],a=i._private,s=O_e(i),s=a.bbCachePosKey===s,s=r.useCache&&s&&!a.styleDirty;i.recalculateRenderedStyle(s)}this.updateCompoundBounds(!e.useCache);for(var o=0;o<this.length;o++){var l=this[o];A_e(t,P_e(l,r))}}else e=void 0===e?B_e:F_e(e),t=P_e(this[0],e);return t.x1=S_e(t.x1),t.y1=S_e(t.y1),t.x2=S_e(t.x2),t.y2=S_e(t.y2),t.w=S_e(t.x2-t.x1),t.h=S_e(t.y2-t.y1),t},z9e.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},z9e.boundingBoxAt=function(r){var e,t=this.nodes(),n=this.cy(),i=n.hasCompoundNodes(),a=n.collection(),s=(i&&(a=t.filter(function(e){return e.isParent()}),t=t.not(a)),VTe(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=(n.startBatch(),t.forEach(s).silentPositions(r),i&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),gEe(this.boundingBox({useCache:!1})));return t.silentPositions(o),i&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),n.endBatch(),s},KAe.boundingbox=KAe.bb=KAe.boundingBox,KAe.renderedBoundingbox=KAe.renderedBoundingBox,hLe=z9e,z_e=G9e={},(J=mt(function(n){n.uppercaseName=p7e(n.name),n.autoName="auto"+n.uppercaseName,n.labelName="label"+n.uppercaseName,n.outerName="outer"+n.uppercaseName,n.uppercaseOuterName=p7e(n.outerName),z_e[n.name]=mt(function(){var e=this[0],t=e._private,r=t.cy._private.styleEnabled;if(e)return r?e.isParent()?(e.updateCompoundBounds(),t[n.autoName]||0):"label"!==(r=e.pstyle(n.name)).strValue?r.pfValue:(e.recalculateRenderedStyle(),t.rstyle[n.labelName]||0):1},"dimImpl"),z_e["outer"+n.uppercaseName]=mt(function(){var e=this[0],t=e._private.cy._private.styleEnabled;if(e)return t?e[n.name]()+e.pstyle("border-width").pfValue+2*e.padding():1},"outerDimImpl"),z_e["rendered"+n.uppercaseName]=mt(function(){var e=this[0];if(e)return e[n.name]()*this.cy().zoom()},"renderedDimImpl"),z_e["rendered"+n.uppercaseOuterName]=mt(function(){var e=this[0];if(e)return e[n.outerName]()*this.cy().zoom()},"renderedOuterDimImpl")},"defineDimFns"))({name:"width"}),J({name:"height"}),G9e.padding=function(){var e=this[0],t=e._private;return e.isParent()&&(e.updateCompoundBounds(),void 0!==t.autoPadding)?t.autoPadding:e.pstyle("padding").pfValue},G9e.paddedHeight=function(){var e=this[0];return e.height()+2*e.padding()},G9e.paddedWidth=function(){var e=this[0];return e.width()+2*e.padding()},j9e=G9e,G_e=mt(function(e,t){if(e.isEdge())return t(e)},"ifEdge"),U_e=mt(function(e,t){var r;if(e.isEdge())return r=e.cy(),X8e(t(e),r.zoom(),r.pan())},"ifEdgeRenderedPosition"),q_e=mt(function(e,t){var r,n,i;if(e.isEdge())return r=e.cy(),n=r.pan(),i=r.zoom(),t(e).map(function(e){return X8e(e,i,n)})},"ifEdgeRenderedPositions"),U9e=mt(function(e){return e.renderer().getControlPoints(e)},"controlPoints"),W9e=mt(function(e){return e.renderer().getSegmentPoints(e)},"segmentPoints"),q9e=mt(function(e){return e.renderer().getSourceEndpoint(e)},"sourceEndpoint"),xLe=mt(function(e){return e.renderer().getTargetEndpoint(e)},"targetEndpoint"),fLe=mt(function(e){return e.renderer().getEdgeMidpoint(e)},"midpoint"),j_e={controlPoints:{get:U9e,mult:!0},segmentPoints:{get:W9e,mult:!0},sourceEndpoint:{get:q9e},targetEndpoint:{get:xLe},midpoint:{get:fLe}},W_e=mt(function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},"renderedName"),KAe=Object.keys(j_e).reduce(function(e,t){var r=j_e[t],n=W_e(t);return e[t]=function(){return G_e(this,r.get)},r.mult?e[n]=function(){return q_e(this,r.get)}:e[n]=function(){return U_e(this,r.get)},e},{}),z9e=y7e({},nLe,hLe,j9e,KAe),Y_e=mt(function(e,t){this.recycle(e,t)},"Event"),mt(lke,"returnFalse"),mt(cke,"returnTrue"),Y_e.prototype={instanceString:mt(function(){return"event"},"instanceString"),recycle:mt(function(e,t){var r,n;this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=lke,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?cke:lke):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(),n=this.cy.pan(),this.renderedPosition={x:t.x*r+n.x,y:t.y*r+n.y}),this.timeStamp=e&&e.timeStamp||Date.now()},"recycle"),preventDefault:mt(function(){this.isDefaultPrevented=cke;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},"preventDefault"),stopPropagation:mt(function(){this.isPropagationStopped=cke;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},"stopPropagation"),stopImmediatePropagation:mt(function(){this.isImmediatePropagationStopped=cke,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:lke,isPropagationStopped:lke,isImmediatePropagationStopped:lke},H_e=/^([^.]+)(\.(?:[^.]+))?$/,V_e={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},X_e=Object.keys(V_e),K_e={},mt(hke,"Emitter"),J=hke.prototype,Z_e=mt(function(e,t,r,n,i,a,s){YTe(n)&&(i=n,n=null),s&&(a=null==a?s:y7e({},a,s));for(var o=HTe(r)?r:r.split(/\s+/),l=0;l<o.length;l++){var c=o[l];if(!i7e(c)){var h=c.match(H_e);if(h&&!1===t(e,c,h[1],h[2]||null,n,i,a))break}}},"forEachEvent"),Q_e=mt(function(e,t){return e.addEventFields(e.context,t),new Y_e(t.type,t)},"makeEventObj"),J_e=mt(function(e,t,r){if(n7e(r))t(e,r);else if(VTe(r))t(e,Q_e(e,r));else for(var n=HTe(r)?r:r.split(/\s+/),i=0;i<n.length;i++){var a,s=n[i];i7e(s)||(s=s.match(H_e))&&(a=s[1],s=s[2]||null,t(e,Q_e(e,{type:a,namespace:s,target:e.context})))}},"forEachEventObj"),J.on=J.addListener=function(e,t,r,n,i){return Z_e(this,function(e,t,r,n,i,a,s){YTe(a)&&e.listeners.push({event:t,callback:a,type:r,namespace:n,qualifier:i,conf:s})},e,t,r,n,i),this},J.one=function(e,t,r,n){return this.on(e,t,r,n,{one:!0})},J.removeListener=J.off=function(l,e,t,r){var n=this;0!==this.emitting&&(this.listeners=_8e(this.listeners));for(var c=this.listeners,i=mt(function(s){var o=c[s];Z_e(n,function(e,t,r,n,i,a){if((o.type===r||"*"===l)&&(!n&&".*"!==o.namespace||o.namespace===n)&&(!i||e.qualifierCompare(o.qualifier,i))&&(!a||o.callback===a))return c.splice(s,1),!1},l,e,t,r)},"_loop"),a=c.length-1;0<=a;a--)i(a);return this},J.removeAllListeners=function(){return this.removeListener("*")},J.emit=J.trigger=function(e,a,r){var s=this.listeners,o=s.length;return this.emitting++,HTe(a)||(a=[a]),J_e(this,function(n,i){null!=r&&(s=[{event:i.event,type:i.type,namespace:i.namespace,callback:r}],o=s.length);for(var e=mt(function(e){var t,r=s[e];r.type!==i.type||r.namespace&&r.namespace!==i.namespace&&".*"!==r.namespace||!n.eventMatches(n.context,r,i)||(e=[i],null!=a&&D8e(e,a),n.beforeEmit(n.context,r,i),r.conf&&r.conf.one&&(n.listeners=n.listeners.filter(function(e){return e!==r})),t=n.callbackContext(n.context,r,i),t=r.callback.apply(t,e),n.afterEmit(n.context,r,i),!1===t&&(i.stopPropagation(),i.preventDefault()))},"_loop2"),t=0;t<o;t++)e(t);n.bubble(n.context)&&!i.isPropagationStopped()&&n.parent(n.context).emit(i,a)},e),this.emitting--,this},eAe={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&&JTe(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")},tAe=mt(function(e){return WTe(e)?new T_e(e):e},"argSelector"),G9e={createEmitter:mt(function(){for(var e=0;e<this.length;e++){var t=this[e],r=t._private;r.emitter||(r.emitter=new hke(eAe,t))}return this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t,r){for(var n=tAe(t),i=0;i<this.length;i++)this[i].emitter().on(e,n,r);return this},"on"),removeListener:mt(function(e,t,r){for(var n=tAe(t),i=0;i<this.length;i++)this[i].emitter().removeListener(e,n,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 n=tAe(t),i=0;i<this.length;i++)this[i].emitter().one(e,n,r);return this},"one"),once:mt(function(e,t,r){for(var n=tAe(t),i=0;i<this.length;i++)this[i].emitter().on(e,n,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")},a_e.eventAliasesOn(G9e),U9e={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 n=this[r];(n.isNode()?e:t).push(n)}return{nodes:e,edges:t}},"byGroup"),filter:mt(function(e,t){if(void 0===e)return this;if(WTe(e)||QTe(e))return new T_e(e).filter(this);if(YTe(e)){for(var r=this.spawn(),n=0;n<this.length;n++){var i=this[n];(t?e.apply(t,[i,n,this]):e(i,n,this))&&r.push(i)}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 n=this[r];e.has(n)||t.push(n)}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,n=r?this:e,i=r?e:this,a=0;a<n.length;a++){var s=n[a];i.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 n=e[r],i=n._private.data.id;t.hasElementWithId(i)||a.push(n)}},"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(),n=mt(function(e,t,r){for(var n=0;n<e.length;n++){var i=e[n],a=i._private.data.id;t.hasElementWithId(a)?s.merge(i):r.push(i)}},"add");return n(this,e,t),n(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 n=this.spawnSelf(),i=0;i<e.length;i++){var a=e[i];this.has(a)||n.push(a)}return n},"add"),merge:mt(function(e){var t,r=this._private,n=r.cy;if(e){WTe(e)&&(t=e,e=n.mutableElements().filter(t));for(var i=r.map,a=0;a<e.length;a++){var s,o=e[a],l=o._private.data.id;i.has(l)||(s=this.length++,this[s]=o,i.set(l,{ele:o,index:s}))}}return this},"merge"),unmergeAt:mt(function(e){var t,r,n=this[e].id(),i=this._private.map,n=(this[e]=void 0,i.delete(n),e===this.length-1);return 1<this.length&&!n&&(r=(t=this[n=this.length-1])._private.data.id,this[n]=void 0,this[e]=t,i.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 n=0;n<e.length;n++)this.unmergeOne(e[n])}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=[],n=0;n<this.length;n++){var i=this[n],i=t?e.apply(t,[i,n,this]):e(i,n,this);r.push(i)}return r},"map"),reduce:mt(function(e,t){for(var r=t,n=0;n<this.length;n++)r=e(r,this[n],n,this);return r},"reduce"),max:mt(function(e,t){for(var r,n=-1/0,i=0;i<this.length;i++){var a=this[i],s=t?e.apply(t,[a,i,this]):e(a,i,this);n<s&&(n=s,r=a)}return{value:n,ele:r}},"max"),min:mt(function(e,t){for(var r,n=1/0,i=0;i<this.length;i++){var a=this[i],s=t?e.apply(t,[a,i,this]):e(a,i,this);s<n&&(n=s,r=a)}return{value:n,ele:r}},"min")},(W9e=U9e).u=W9e["|"]=W9e["+"]=W9e.union=W9e.or=W9e.add,W9e["\\"]=W9e["!"]=W9e["-"]=W9e.difference=W9e.relativeComplement=W9e.subtract=W9e.not,W9e.n=W9e["&"]=W9e["."]=W9e.and=W9e.intersection=W9e.intersect,W9e["^"]=W9e["(+)"]=W9e["(-)"]=W9e.symmetricDifference=W9e.symdiff=W9e.xor,W9e.fnFilter=W9e.filterFn=W9e.stdFilter=W9e.filter,W9e.complement=W9e.abscomp=W9e.absoluteComplement,q9e={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")},rAe=mt(function(e,t){var r=e.cy().hasCompoundNodes();function n(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?r?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?y8e:0}mt(n,"getDepth");var i=n(e)-n(t);return 0!=i||(mt(a,"getEleDepth"),0!=(i=a(e)-a(t)))||0!=(i=e.pstyle("z-index").value-t.pstyle("z-index").value)?i:e.poolIndex()-t.poolIndex();function a(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}},"zIndexSort"),(nAe={forEach:mt(function(e,t){if(YTe(e))for(var r=this.length,n=0;n<r;n++){var i=this[n];if(!1===(t?e.apply(t,[i,n,this]):e(i,n,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=[],n=this.length;(t=null==t?n:t)<0&&(t=n+t);for(var i=e=(e=null==e?0:e)<0?n+e:e;0<=i&&i<t&&i<n;i++)r.push(this[i]);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 YTe(e)?(e=this.toArray().sort(e),this.spawn(e)):this},"sort"),sortByZIndex:mt(function(){return this.sort(rAe)},"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:y8e-1):(r=t.source,e=t.target,t=r.zDepth(),r=e.zDepth(),Math.max(t,r,0))},"zDepth")}).each=nAe.forEach,mt(function(){"undefined"!=("u"<typeof Symbol?"undefined":Bwe(Symbol))&&"undefined"!=Bwe(Symbol.iterator)&&(nAe[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},r=0,n=this.length;return Gwe({next:mt(function(){return r<n?t.value=e[r++]:(t.value=void 0,t.done=!0),t},"next")},Symbol.iterator,function(){return this})})},"defineSymbolIterator")(),iAe=I8e({nodeDimensionsIncludeLabels:!1}),(xLe={layoutDimensions:mt(function(e){return e=iAe(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,n,t){var i=this.nodes().filter(function(e){return!e.isParent()}),r=this.cy(),a=n.eles,s=mt(function(e){return e.id()},"getMemoizeKey"),o=c7e(t,s),l=(e.emit({type:"layoutstart",layout:e}),e.animations=[],mt(function(e,t,r){var n=t.x1+t.w/2,t=t.y1+t.h/2;return{x:n+(r.x-n)*e,y:t+(r.y-t)*e}},"calculateSpacing")),c=n.spacingFactor&&1!==n.spacingFactor,h=mt(function(){if(!c)return null;for(var e=pEe(),t=0;t<i.length;t++){var r=i[t],r=o(r,t);vEe(e,r.x,r.y)}return e},"spacingBb")(),u=c7e(function(e,t){var r,t=o(e,t);return c&&(r=Math.abs(n.spacingFactor),t=l(r,h,t)),null!=n.transform?n.transform(e,t):t},s);if(n.animate){for(var d=0;d<i.length;d++){var p,g=i[d],f=u(g,d);null==n.animateFilter||n.animateFilter(g,d)?(p=g.animation({position:f,duration:n.animationDuration,easing:n.animationEasing}),e.animations.push(p)):g.position(f)}n.fit?(t=r.animation({fit:{boundingBox:a.boundingBoxAt(u),padding:n.padding},duration:n.animationDuration,easing:n.animationEasing}),e.animations.push(t)):void 0!==n.zoom&&void 0!==n.pan&&(s=r.animation({zoom:n.zoom,pan:n.pan,duration:n.animationDuration,easing:n.animationEasing}),e.animations.push(s)),e.animations.forEach(function(e){return e.play()}),e.one("layoutready",n.ready),e.emit({type:"layoutready",layout:e}),oSe.all(e.animations.map(function(e){return e.promise()})).then(function(){e.one("layoutstop",n.stop),e.emit({type:"layoutstop",layout:e})})}else i.positions(u),n.fit&&r.fit(n.eles,n.padding),null!=n.zoom&&r.zoom(n.zoom),n.pan&&r.pan(n.pan),e.one("layoutready",n.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",n.stop),e.emit({type:"layoutstop",layout:e});return this},"layoutPositions"),layout:mt(function(e){return this.cy().makeLayout(y7e({},e,{eles:this}))},"layout")}).createLayout=xLe.makeLayout=xLe.layout,mt(uke,"styleCache"),mt(dke,"cacheStyleFunction"),mt(pke,"cachePrototypeStyleFunction"),fLe={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],n=r.cy();if(n.styleEnabled()&&r)return r._private.styleDirty&&(r._private.styleDirty=!1,n.style().apply(r)),r._private.style[e]??(t?n.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((n=this.cy()).styleEnabled()){var r,n=n.style();if(VTe(e))n.applyBypass(this,e,!1),this.emitAndNotify("style");else if(WTe(e)){if(void 0===t)return(r=this[0])?n.getStylePropertyValue(r,e):void 0;n.applyBypass(this,e,t,!1),this.emitAndNotify("style")}else if(void 0===e)return(r=this[0])?n.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 n=0;n<this.length;n++){var i=this[n];r.removeAllBypasses(i,!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,n=t.pstyle("opacity").value;if(e){var i=r.data.parent?t.parents():null;if(i)for(var a=0;a<i.length;a++)n*=i[a].pstyle("opacity").value}return n}},"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(gke,"checkCompound"),mt(fke,"defineDerivedStateFunction"),aAe=dke("eleTakesUpSpace",function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())}),fLe.takesUpSpace=pke("takesUpSpace",fke({ok:aAe})),nLe=dke("eleInteractive",function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&aAe(e)}),hLe=dke("parentInteractive",function(e){return"visible"===e.pstyle("visibility").value&&aAe(e)}),fLe.interactive=pke("interactive",fke({ok:nLe,parentOk:hLe,edgeOkViaNode:aAe})),fLe.noninteractive=function(){var e=this[0];if(e)return!e.interactive()},j9e=dke("eleVisible",function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&aAe(e)}),KAe=aAe,fLe.visible=pke("visible",fke({ok:j9e,edgeOkViaNode:KAe})),fLe.hidden=function(){var e=this[0];if(e)return!e.visible()},fLe.isBundledBezier=pke("isBundledBezier",function(){return!!this.cy().styleEnabled()&&!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace()}),fLe.bypass=fLe.css=fLe.style,fLe.renderedCss=fLe.renderedStyle,fLe.removeBypass=fLe.removeCss=fLe.removeStyle,fLe.pstyle=fLe.parsedStyle,sAe={},mt(mke,"defineSwitchFunction"),mt(yke,"defineSwitchSet"),yke({field:"locked",overrideField:mt(function(e){return!!e.cy().autolock()||void 0},"overrideField"),on:"lock",off:"unlock"}),yke({field:"grabbable",overrideField:mt(function(e){return!e.cy().autoungrabify()&&!e.pannable()&&void 0},"overrideField"),on:"grabify",off:"ungrabify"}),yke({field:"selected",ableField:"selectable",overrideAble:mt(function(e){return!e.cy().autounselectify()&&void 0},"overrideAble"),on:"select",off:"unselect"}),yke({field:"selectable",overrideField:mt(function(e){return!e.cy().autounselectify()&&void 0},"overrideField"),on:"selectify",off:"unselectify"}),sAe.deselect=sAe.unselect,sAe.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},yke({field:"active",on:"activate",off:"unactivate"}),yke({field:"pannable",on:"panify",off:"unpanify"}),sAe.inactive=function(){var e=this[0];if(e)return!e._private.active},J={},W9e=mt(function(c){return mt(function(e){for(var t=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode()){for(var i=!1,a=n.connectedEdges(),s=0;s<a.length;s++){var o=(l=a[s]).source(),l=l.target();if(c.noIncomingEdges&&l===n&&o!==n||c.noOutgoingEdges&&o===n&&l!==n){i=!0;break}}i||t.push(n)}}return this.spawn(t,!0).filter(e)},"dagExtremityImpl")},"defineDagExtremity"),nLe=mt(function(c){return function(e){for(var t=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode())for(var i=n.connectedEdges(),a=0;a<i.length;a++){var s=i[a],o=s.source(),l=s.target();c.outgoing&&o===n?(t.push(s),t.push(l)):c.incoming&&l===n&&(t.push(s),t.push(o))}}return this.spawn(t,!0).filter(e)}},"defineDagOneHop"),hLe=mt(function(c){return function(e){for(var t=this,r=[],n={};;){var i=c.outgoing?t.outgoers():t.incomers();if(0===i.length)break;for(var a=!1,s=0;s<i.length;s++){var o=i[s],l=o.id();n[l]||(n[l]=!0,r.push(o),a=!0)}if(!a)break;t=i}return this.spawn(r,!0).filter(e)}},"defineDagAllHops"),J.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},y7e(J,{roots:W9e({noIncomingEdges:!0}),leaves:W9e({noOutgoingEdges:!0}),outgoers:uLe(nLe({outgoing:!0}),"outgoers"),successors:hLe({outgoing:!0}),incomers:uLe(nLe({incoming:!0}),"incomers"),predecessors:hLe({incoming:!0})}),y7e(J,{neighborhood:uLe(function(e){for(var t=[],r=this.nodes(),n=0;n<r.length;n++)for(var i=r[n],a=i.connectedEdges(),s=0;s<a.length;s++){var o=a[s],l=o.source(),c=o.target();0<(c=i===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")}),J.neighbourhood=J.neighborhood,J.closedNeighbourhood=J.closedNeighborhood,J.openNeighbourhood=J.openNeighborhood,y7e(J,{source:uLe(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:uLe(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:vke({attr:"source"}),targets:vke({attr:"target"})}),mt(vke,"defineSourceFunction"),y7e(J,{edgesWith:uLe(xke(),"edgesWith"),edgesTo:uLe(xke({thisIsSrc:!0}),"edgesTo")}),mt(xke,"defineEdgesWithFunction"),y7e(J,{connectedEdges:uLe(function(e){for(var t=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode())for(var i=n._private.edges,a=0;a<i.length;a++){var s=i[a];t.push(s)}}return this.spawn(t,!0).filter(e)},"connectedEdges"),connectedNodes:uLe(function(e){for(var t=[],r=0;r<this.length;r++){var n=this[r];n.isEdge()&&(t.push(n.source()[0]),t.push(n.target()[0]))}return this.spawn(t,!0).filter(e)},"connectedNodes"),parallelEdges:uLe(bke(),"parallelEdges"),codirectedEdges:uLe(bke({codirected:!0}),"codirectedEdges")}),mt(bke,"defineParallelEdgesFunction"),y7e(J,{components:mt(function(e){var r=this,n=r.cy(),i=n.collection(),a=(null==e?r:e).nodes(),s=[],o=(null!=e&&a.empty()&&(a=e.sources()),mt(function(e,t){i.merge(e),a.unmerge(e),t.merge(e)},"visitInComponent"));if(a.empty())return r.spawn();for(var t=mt(function(){var t=n.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")}),J.componentsOf=J.components,oAe=mt(function(e,t){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(void 0===e)k8e("A collection must have a reference to the core");else{var i=new B8e,a=!1;if(t){if(0<t.length&&VTe(t[0])&&!JTe(t[0])){for(var a=!0,s=[],o=new $8e,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=A8e();else if(e.hasElementWithId(u.id)||o.has(u.id))continue;h=new F8e(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&&i.has(g)||(r&&i.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 B8e,t=this.eles,r=0;r<t.length;r++){var n=t[r];e.set(n.id(),{index:r,ele:n})}},"rebuildMap")},r&&(this._private.map=i),a&&!n&&this.restore()}},"Collection"),(lAe=F8e.prototype=oAe.prototype=Object.create(Array.prototype)).instanceString=function(){return"collection"},lAe.spawn=function(e,t){return new oAe(this.cy(),e,t)},lAe.spawnSelf=function(){return this.spawn(this)},lAe.cy=function(){return this._private.cy},lAe.renderer=function(){return this._private.cy.renderer()},lAe.element=function(){return this[0]},lAe.collection=function(){return e7e(this)?this:new oAe(this._private.cy,[this])},lAe.unique=function(){return new oAe(this._private.cy,this,!0)},lAe.hasElementWithId=function(e){return this._private.map.has(e=""+e)},lAe.getElementById=function(e){var t=this._private.cy;return(e=this._private.map.get(e=""+e))?e.ele:new oAe(t)},lAe.$id=lAe.getElementById,lAe.poolIndex=function(){var e=this._private.cy._private.elements,t=this[0]._private.data.id;return e._private.map.get(t).index},lAe.indexOf=function(e){return e=e[0]._private.data.id,this._private.map.get(e).index},lAe.indexOfId=function(e){return this._private.map.get(e=""+e).index},lAe.json=function(i){var a,e,t,r,n,s,o,l,c=this.element(),h=this.cy();return null==c&&i?this:null!=c?(a=c._private,VTe(i)?(h.startBatch(),i.data&&(c.data(i.data),e=a.data,c.isEdge()?(s=!1,t={},r=i.data.source,n=i.data.target,null!=r&&r!=e.source&&(t.source=""+r,s=!0),null!=n&&n!=e.target&&(t.target=""+n,s=!0),s&&(c=c.move(t))):(r="parent"in i.data,n=i.data.parent,!r||null==n&&null==e.parent||n==e.parent||(c=c.move({parent:n=null!=(n=void 0===n?null:n)?""+n:n})))),i.position&&c.position(i.position),(s=mt(function(e,t,r){var n=i[e];null!=n&&n!==a[e]&&(n?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!=i.classes&&c.classes(i.classes),h.endBatch(),this):void 0===i?((o={data:S8e(a.data),position:S8e(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},lAe.jsons=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t].json();e.push(r)}return e},lAe.clone=function(){for(var e=this.cy(),t=[],r=0;r<this.length;r++){var n=this[r].json(),n=new F8e(e,n,!1);t.push(n)}return new oAe(e,t)},lAe.copy=lAe.clone,lAe.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(),n=r._private,i=[],a=[],s=0,o=this.length;s<o;s++){var l=this[s];t&&!l.removed()||(l.isNode()?i:a).push(l)}for(var c=i.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=A8e();else if(ae(g.id))g.id=""+g.id;else{if(i7e(g.id)||!WTe(g.id)){k8e("Can not create element with invalid string ID `"+g.id+"`"),h();continue}if(r.hasElementWithId(g.id)){k8e("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,x=!1,b=0;b<v;b++){var w=y[b],k=g[w];null==(k=ae(k)?g[w]=""+g[w]:k)||""===k?(k8e("Can not create edge `"+f+"` with unspecified "+w),x=!0):r.hasElementWithId(k)||(k8e("Can not create edge `"+f+"` with nonexistant "+w+" `"+k+"`"),x=!0)}if(x){h();continue}var T=r.getElementById(g.source),E=r.getElementById(g.target);(T.same(E)?T:(T._private.edges.push(m),E))._private.edges.push(m),m._private.source=T,m._private.target=E}p.map=new B8e,p.map.set(f,{ele:d,index:0}),p.removed=!1,t&&r.addToPool(d)}for(var C=0;C<i.length;C++){var S=i[C],_=S._private.data,A=(ae(_.parent)&&(_.parent=""+_.parent),_.parent);if(null!=A||S._private.parent)if((A=S._private.parent?r.collection().merge(S._private.parent):r.getElementById(A)).empty())_.parent=void 0;else if(A[0].removed())E8e("Node added with missing parent, reference to parent removed"),_.parent=void 0,S._private.parent=null;else{for(var L=!1,N=A;!N.empty();){if(S.same(N)){L=!0,_.parent=void 0;break}N=N.parent()}L||(A[0]._private.children.push(S),S._private.parent=A[0],n.hasCompoundNodes=!0)}}if(0<c.length){for(var I=c.length===this.length?this:new oAe(r,c),R=0;R<I.length;R++){var M=I[R];M.isNode()||(M.parallelEdges().clearTraversalCache(),M.source().clearTraversalCache(),M.target().clearTraversalCache())}(n.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},lAe.removed=function(){var e=this[0];return e&&e._private.removed},lAe.inside=function(){var e=this[0];return e&&!e._private.removed},lAe.remove=function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=[],i={},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=i[e.id()];r&&e.removed()||t||(i[e.id()]=!0,e.isNode()?(n.push(e),a(e),s(e)):n.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;R8e(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,n=e.id();R8e(r,t),t._private.parent=null,d.ids[n]||(d.ids[n]=!0,d.push(e))}d.ids={},mt(p,"removeChildRef"),this.dirtyCompoundBoundsCache(),r&&t.removeFromPool(n);for(var g=0;g<n.length;g++){var f=n[g];if(f.isEdge()){var m=f.source()[0],y=f.target()[0];h(m,f),h(y,f);for(var v=f.parallelEdges(),x=0;x<v.length;x++){var b=v[x];u(b),b.isBundledBezier()&&b.dirtyBoundingBoxCache()}}else 0!==(m=f.parent()).length&&p(m,f);r&&(f._private.removed=!0)}var w=t._private.elements;t._private.hasCompoundNodes=!1;for(var k=0;k<w.length;k++)if(w[k].isParent()){t._private.hasCompoundNodes=!0;break}var T=new oAe(this.cy(),n);0<T.size()&&(e?T.emitAndNotify("remove"):r&&T.emit("remove"));for(var E=0;E<d.length;E++){var C=d[E];r&&C.removed()||C.updateStyle()}return T},lAe.move=function(e){var n,i,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?(n=r(e.source),i=r(e.target),a=null!=n&&t.hasElementWithId(n),s=null!=i&&t.hasElementWithId(i),(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=n),s)&&(r.target=i)}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],n=r._private.data;r.isNode()&&(n.parent=o)}e.restore(!1,!1)}),l.emitAndNotify("move")),this},[JCe,dLe,Y9e,k9e,I9e,M9e,rLe,z9e,G9e,U9e,q9e,nAe,xLe,fLe,sAe,J].forEach(function(e){y7e(lAe,e)}),j9e={add:mt(function(e){if(QTe(e)){var t=e;if(t._private.cy===this)a=t.restore();else{for(var r=[],n=0;n<t.length;n++){var i=t[n];r.push(i.json())}a=new oAe(this,r)}}else if(HTe(e))var a=new oAe(this,e);else if(VTe(e)&&(HTe(e.nodes)||HTe(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(HTe(d))for(var p=0,g=d.length;p<g;p++){var f=y7e({group:u},d[p]);o.push(f)}}a=new oAe(this,o)}else a=new F8e(this,e).collection();return a},"add"),remove:mt(function(e){var t;return QTe(e)||WTe(e)&&(t=e,e=this.$(t)),e.remove()},"remove")},mt(wke,"generateCubicBezier"),mt(o,"springAccelerationForState"),mt(l,"springEvaluateStateWithDerivative"),mt(h,"springIntegrateState"),cAe=mt(function e(t,r,n){var i,a,s,o={x:-1,v:0,tension:null,friction:null},l=[0],c=0;for(t=parseFloat(t)||500,r=parseFloat(r)||20,n=n||null,o.tension=t,o.friction=r,a=(i=null!==n)?(c=e(t,r))/n*.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 i?function(e){return l[e*(l.length-1)|0]}:c},"springRK4Factory"),KAe=mt(function(e,t,r,n){var i=wke(e,t,r,n);return function(e,t,r){return e+(t-e)*i(r)}},"cubicBezier"),hAe={linear:mt(function(e,t,r){return e+(t-e)*r},"linear"),ease:KAe(.25,.1,.25,1),"ease-in":KAe(.42,0,1,1),"ease-out":KAe(0,0,.58,1),"ease-in-out":KAe(.42,0,.58,1),"ease-in-sine":KAe(.47,0,.745,.715),"ease-out-sine":KAe(.39,.575,.565,1),"ease-in-out-sine":KAe(.445,.05,.55,.95),"ease-in-quad":KAe(.55,.085,.68,.53),"ease-out-quad":KAe(.25,.46,.45,.94),"ease-in-out-quad":KAe(.455,.03,.515,.955),"ease-in-cubic":KAe(.55,.055,.675,.19),"ease-out-cubic":KAe(.215,.61,.355,1),"ease-in-out-cubic":KAe(.645,.045,.355,1),"ease-in-quart":KAe(.895,.03,.685,.22),"ease-out-quart":KAe(.165,.84,.44,1),"ease-in-out-quart":KAe(.77,0,.175,1),"ease-in-quint":KAe(.755,.05,.855,.06),"ease-out-quint":KAe(.23,1,.32,1),"ease-in-out-quint":KAe(.86,0,.07,1),"ease-in-expo":KAe(.95,.05,.795,.035),"ease-out-expo":KAe(.19,1,.22,1),"ease-in-out-expo":KAe(1,0,0,1),"ease-in-circ":KAe(.6,.04,.98,.335),"ease-out-circ":KAe(.075,.82,.165,1),"ease-in-out-circ":KAe(.785,.135,.15,.86),spring:mt(function(e,t,r){var n;return 0===r?hAe.linear:(n=cAe(e,t,r),function(e,t,r){return e+(t-e)*n(r)})},"spring"),"cubic-bezier":KAe},mt(kke,"getEasedValue"),mt(Tke,"getValue"),mt(Eke,"ease"),mt(Cke,"step$1"),mt(Ske,"valid"),mt(_ke,"startAnimation"),mt(Ake,"stepAll"),W9e={animate:a_e.animate(),animation:a_e.animation(),animated:a_e.animated(),clearQueue:a_e.clearQueue(),delay:a_e.delay(),delayAnimation:a_e.delayAnimation(),stop:a_e.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&&r8e(mt(function(e){Ake(e,r),t()},"animationStep"))}r._private.animationsRunning=!0,r.styleEnabled()&&(mt(t,"headlessStep"),(e=r.renderer())&&e.beforeRender?e.beforeRender(mt(function(e,t){Ake(t,r)},"rendererAnimationStep"),e.beforeRenderPriorities.animations):t())},"startAnimationLoop")},uAe={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&&JTe(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")},dAe=mt(function(e){return WTe(e)?new T_e(e):e},"argSelector"),nLe={createEmitter:mt(function(){var e=this._private;return e.emitter||(e.emitter=new hke(uAe,this)),this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t,r){return this.emitter().on(e,dAe(t),r),this},"on"),removeListener:mt(function(e,t,r){return this.emitter().removeListener(e,dAe(t),r),this},"removeListener"),removeAllListeners:mt(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:mt(function(e,t,r){return this.emitter().one(e,dAe(t),r),this},"one"),once:mt(function(e,t,r){return this.emitter().one(e,dAe(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")},a_e.eventAliasesOn(nLe),(hLe={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=hLe.jpg,(uLe={layout:mt(function(e){if(null==e)k8e("Layout options must be specified to make a layout");else if(null==e.name)k8e("A `name` must be specified to make a layout");else{var t,r=e.name,n=this.extension("layout",r);if(null!=n)return t=WTe(e.eles)?this.$(e.eles):null!=e.eles?e.eles:this.$(),new n(y7e({},e,{cy:this,eles:t}));k8e("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}},"layout")}).createLayout=uLe.makeLayout=uLe.layout,dLe={notify:mt(function(e,t){var r,n=this._private;this.batching()?(n.batchNotifications=n.batchNotifications||{},r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection(),null!=t&&r.merge(t)):n.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,n=this._private;return 0!==n.batchCount&&(n.batchCount--,0===n.batchCount)&&(n.batchStyleEles.updateStyle(),r=this.renderer(),Object.keys(n.batchNotifications).forEach(function(e){var t=n.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(i){var a=this;return this.batch(function(){for(var e=Object.keys(i),t=0;t<e.length;t++){var r=e[t],n=i[r];a.getElementById(r).data(n)}})},"batchData")},pAe=I8e({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:12,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),(Y9e={renderTo:mt(function(e,t,r,n){return this._private.renderer.renderTo(e,t,r,n),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?k8e("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?")):(void 0!==e.wheelSensitivity&&E8e("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=pAe(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=Y9e.resize,(k9e={collection:mt(function(e,t){return WTe(e)?this.$(e):QTe(e)?e.collection():HTe(e)?new oAe(this,e,(t=t||{}).unique,t.removed):new oAe(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=k9e.filter=k9e.$,I9e={apply:function(e){for(var t=this._private.cy.collection(),r=0;r<e.length;r++){var n,i=e[r],a=this.getContextMeta(i);a.empty||(n=this.getContextStyle(a),a=this.applyContextStyle(a,n,i),i._private.appliedInitStyle?this.updateTransitions(i,a.diffProps):i._private.appliedInitStyle=!0,this.updateStyleHints(i)&&t.push(i))}return t},getPropertiesDiff:function(e,t){var r=this._private.propDiffs=this._private.propDiffs||{},n=e+"-"+t,i=r[n];if(i)return i;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[n]=a},getContextMeta:function(e){for(var t="",r=e._private.styleCxtKey||"",n=0;n<this.length;n++){var i=this[n];t+=i.selector&&i.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}},n=0;n<this.length;n++){var i=this[n];if("t"===t[n])for(var a=0;a<i.properties.length;a++){var s=i.properties[a];r[s.name]=s}}return e[t]=r},applyContextStyle:function(e,t,r){for(var n=e.diffPropNames,i={},a=this.types,s=0;s<n.length;s++){var o=n[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=i[o]={prev:c},this.applyParsedProperty(r,l),h.next=r.pstyle(o),h.next&&h.next.bypass&&(h.next=h.next.bypassed)}}return{diffProps:i}},updateStyleHints:function(e){var r=e._private,n=this,t=(n.propertyGroupNames,n.propertyGroupKeys),i=mt(function(e,t,r){return n.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]=a8e(e,r.styleKeys[t][0])},"updateGrKey1"),d=mt(function(e,t){return r.styleKeys[t][1]=s8e(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 n=e.charCodeAt(r);u(n,t),d(n,t)}},"updateGrKeyWStr"),f=mt(function(e){return-128<e&&e<128&&Math.floor(e)!==e?2e9-(1024*e|0):e},"cleanNum"),m=0;m<l.length;m++){var y,v,x,b,w,k=l[m],T=o[k];null!=T&&(y=(k=this.properties[k]).type,v=k.groupKey,x=void 0,null!=k.hashOverride?x=k.hashOverride(e,T):null!=T.pfValue&&(x=T.pfValue),k=null==k.enums?T.value:null,b=null!=x,w=T.units,!y.number||!b&&null==k||y.multiple?g(T.strValue,v):(p(f(b?x:k),v),b||null==w||g(w,v)))}for(var E=[9261,5381],C=0;C<t.length;C++){var S=t[C],S=r.styleKeys[S];E[0]=a8e(S[0],E[0]),E[1]=s8e(S[1],E[1])}r.styleKey=o8e(E[0],E[1]);var _=r.styleKeys,A=(r.labelDimsKey=l8e(_.labelDimensions),i(e,["label"],_.labelDimensions));return r.labelKey=l8e(A),r.labelStyleKey=l8e(c8e(_.commonLabel,A)),s||(A=i(e,["source-label"],_.labelDimensions),r.sourceLabelKey=l8e(A),r.sourceLabelStyleKey=l8e(c8e(_.commonLabel,A)),A=i(e,["target-label"],_.labelDimensions),r.targetLabelKey=l8e(A),r.targetLabelStyleKey=l8e(c8e(_.commonLabel,A))),s&&(A=[(i=r.styleKeys).nodeBody,i.nodeBorder,i.nodeOutline,i.backgroundImage,i.compound,_=i.pie].filter(function(e){return null!=e}).reduce(c8e,[9261,5381]),r.nodeKey=l8e(A),r.hasPie=null!=_&&9261!==_[0]&&5381!==_[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},applyParsedProperty:function(r,e){var n=this,i=e,t=r._private.style,a=n.types,s=n.properties[i.name].type,o=i.bypass,l=t[i.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(i);n.checkTriggers(r,i.name,e,t)},"checkTriggers");if((i="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):i).delete)t[i.name]=void 0;else{if(i.deleteBypassed)return l?!!l.bypass&&(l.bypassed=void 0,p(),!0):(p(),!0);if(i.deleteBypass)return l?!!l.bypass&&(t[i.name]=l.bypassed,p(),!0):(p(),!0);var g=mt(function(){E8e("Do not assign mappings to elements without corresponding data (i.e. ele `"+r.id()+"` has no mapping for property `"+i.name+"` with data field `"+i.field+"`); try a `["+i.field+"]` selector to limit scope to elements with `"+i.field+"` defined")},"printMappingErr");switch(i.mapped){case a.mapData:for(var f=i.field.split("."),m=h.data,y=0;y<f.length&&m;y++)m=m[f[y]];if(null==m)return g(),!1;if(!ae(m))return E8e("Do not use continuous mappers without specifying numeric data (i.e. `"+i.field+": "+m+"` for `"+r.id()+"` is non-numeric)"),!1;var v=i.fieldMax-i.fieldMin;if((v=0==v?0:(m-i.fieldMin)/v)<0?v=0:1<v&&(v=1),s.color)var x=i.valueMin[0],b=i.valueMax[0],w=i.valueMin[1],k=i.valueMax[1],T=i.valueMin[2],E=i.valueMax[2],C=null==i.valueMin[3]?1:i.valueMin[3],S=null==i.valueMax[3]?1:i.valueMax[3],b=[Math.round(x+(b-x)*v),Math.round(w+(k-w)*v),Math.round(T+(E-T)*v),Math.round(C+(S-C)*v)],x={bypass:i.bypass,name:i.name,value:b,strValue:"rgb("+b[0]+", "+b[1]+", "+b[2]+")"};else{if(!s.number)return!1;k=i.valueMin+(i.valueMax-i.valueMin)*v,x=this.parse(i.name,k,i.bypass,u)}if(!x)return g(),!1;x.mapping=i,i=x;break;case a.data:for(var _=i.field.split("."),A=h.data,L=0;L<_.length&&A;L++)A=A[_[L]];if(!(x=null!=A?this.parse(i.name,A,i.bypass,u):x))return g(),!1;x.mapping=i,i=x;break;case a.fn:if(w=i.value,E=null!=i.fnValue?i.fnValue:w(r),null==(i.prevFnValue=E))return E8e("Custom function mappers may not return null (i.e. `"+i.name+"` for ele `"+r.id()+"` is null)"),!1;if(!(x=this.parse(i.name,E,i.bypass,u)))return E8e("Custom function mappers may not return invalid values for the property type (i.e. `"+i.name+"` for ele `"+r.id()+"` is invalid)"),!1;x.mapping=S8e(i),i=x;break;case void 0:break;default:return!1}o?(i.bypassed=c?l.bypassed:l,t[i.name]=i):c?l.bypassed=i:t[i.name]=i}return p(),!0},cleanElements:function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),t)for(var i=n._private.style,a=Object.keys(i),s=0;s<a.length;s++){var o=a[s],l=i[o];null!=l&&(l.bypass?l.bypassed=null:i[o]=null)}else n._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateTransitions:function(t,e){var r=this,n=t._private,i=t.pstyle("transition-property").value,a=t.pstyle("transition-duration").pfValue,s=t.pstyle("transition-delay").pfValue;if(0<i.length&&0<a){for(var o={},l=!1,c=0;c<i.length;c++){var h,u,d=i[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)&&(ae(h.pfValue)&&ae(g.pfValue)?(p=g.pfValue-h.pfValue,u=h.pfValue+1e-6*p):ae(h.value)&&ae(g.value)?(p=g.value-h.value,u=h.value+1e-6*p):HTe(h.value)&&HTe(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&&(n.transitioning=!0,new oSe(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,i),t.emitAndNotify("style"),n.transitioning=!1}))}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1)},checkTrigger:function(e,t,r,n,i,a){null!=(i=i(t=this.properties[t]))&&i(r,n)&&a(t)},checkZOrderTrigger:function(e,t,r,n){var i=this;this.checkTrigger(e,t,r,n,function(e){return e.triggersZOrder},function(){i._private.cy.notify("zorder",e)})},checkBoundsTrigger:function(t,r,n,i){this.checkTrigger(t,r,n,i,function(e){return e.triggersBounds},function(e){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),!e.triggersBoundsOfParallelBeziers||"curve-style"!==r||"bezier"!==n&&"bezier"!==i||t.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()}),!e.triggersBoundsOfConnectedEdges||"display"!==r||"none"!==n&&"none"!==i||t.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},checkTriggers:function(e,t,r,n){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,r,n),this.checkBoundsTrigger(e,t,r,n)}},M9e={applyBypass:function(e,t,r,n){var i=[];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))&&i.push(s)}}else if(WTe(t)){var o=this.parse(t,r,!0);o&&i.push(o)}else{if(!VTe(t))return!1;var l=t;n=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[u7e(u)]:d)&&(u=this.parse(u,d,!0))&&i.push(u)}}if(0===i.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<i.length;v++){var x,b=i[v];n&&(x=f.pstyle(b.name),y=m[b.name]={prev:x}),p=this.applyParsedProperty(f,S8e(b))||p,n&&(y.next=f.pstyle(b.name))}p&&this.updateStyleHints(f),n&&this.updateTransitions(f,m,!0)}return p},overrideBypass:function(e,t,r){t=h7e(t);for(var n=0;n<e.length;n++){var i=e[n],a=i._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(i)):this.applyBypass(i,t,r),this.checkTriggers(i,t,l,r)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,r){for(var n=0;n<e.length;n++){for(var i=e[n],a={},s=0;s<t.length;s++){var o=t[s],l=this.properties[o],c=i.pstyle(l.name);c&&c.bypass&&(o=this.parse(o,"",!0),c=a[l.name]={prev:c},this.applyParsedProperty(i,o),c.next=i.pstyle(l.name))}this.updateStyleHints(i),r&&this.updateTransitions(i,a,!0)}}},rLe={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)}},(z9e={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={},n=0;n<this.properties.length;n++){var i=this.properties[n],a=this.getStylePropertyValue(e,i.name,t);null!=a&&(r[i.name]=a,r[u7e(i.name)]=a)}return r}},getIndexedStyle:function(e,t,r,n){return e.pstyle(t)[r][n]??e.cy().style().getDefaultProperty(t)[r][0]},getStylePropertyValue:function(e,t,r){if(e=e[0]){var n=(t=(t=this.properties[t]).alias?t.pointsTo:t).type;if(t=e.pstyle(t.name)){var i,a,s,o=t.value,l=t.units,t=t.strValue;if(r&&n.number&&null!=o&&ae(o))return i=e.cy().zoom(),a=mt(function(e){return e*i},"getRenderedValue"),s=mt(function(e,t){return a(e)+t},"getValueStringWithUnits"),((r=HTe(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={},n=0;n<t.length;n++){var i=t[n].name,a=e.pstyle(i);(a=void 0!==a?VTe(a)?this.parse(i,a.strValue):this.parse(i,a):a)&&(r[i]=a)}return r},getPropsList:function(e){var t=[],r=e,n=this.properties;if(r)for(var i=Object.keys(r),a=0;a<i.length;a++){var s=r[o=i[a]],o=n[o]||n[h7e(o)];(o=this.parse(o.name,s))&&t.push(o)}return t},getNonDefaultPropertiesHash:function(e,t,r){for(var n,i,a,s,o=r.slice(),l=0;l<t.length;l++)if(null!=(n=e.pstyle(t[l],!1)))if(null!=n.pfValue)o[0]=a8e(a,o[0]),o[1]=s8e(a,o[1]);else for(i=n.strValue,s=0;s<i.length;s++)a=i.charCodeAt(s),o[0]=a8e(a,o[0]),o[1]=s8e(a,o[1]);return o}}).getPropertiesHash=z9e.getNonDefaultPropertiesHash,G9e={appendFromJson:function(e){for(var t=0;t<e.length;t++){var r=e[t],n=r.selector,i=r.style||r.css,a=Object.keys(i);this.selector(n);for(var s=0;s<a.length;s++){var o=a[s],l=i[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],n=r.selector,i=r.properties,a={},s=0;s<i.length;s++){var o=i[s];a[o.name]=o.strValue}e.push({selector:n?n.toString():"core",style:a})}return e}},U9e={appendFromString:function(e){var t=""+e;function r(){t=t.length>a.length?t.substr(a.length):""}function n(){c=c.length>u.length?c.substr(u.length):""}for(t=t.replace(/[/][*](\s|.)+?[*][/]/g,""),mt(r,"removeSelAndBlockFromRemaining"),mt(n,"removePropAndValFromRem");!t.match(/^\s*$/);){var i=t.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!i){E8e("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+t);break}var a=i[0],s=i[1];if("core"!==s&&new T_e(s).invalid)E8e("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=i[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){E8e("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}):E8e("Skipping property: Invalid property definition in: "+u):E8e("Skipping property: Invalid property name in: "+u),n()}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}},gAe={};var a=g7e,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=(gAe.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"]},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},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"]},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=i7e(e),t=i7e(t),e&&!t||!e&&t},"emptyNonEmpty")}),d=gAe.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}],m=[{name:"events",type:d.bool,triggersZOrder:s.any},{name:"text-events",type:d.bool,triggersZOrder:s.any}],y=[{name:"display",type:d.display,triggersZOrder:s.any,triggersBounds:s.any,triggersBoundsOfConnectedEdges:!0},{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}],v=[{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}],x=[{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}],P=[{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}],b=mt(function(e,t){return"label"===t.value?-e.poolIndex():t.pfValue},"nodeSizeHashOverride"),b=[{name:"height",type:d.nodeSize,triggersBounds:s.any,hashOverride:b},{name:"width",type:d.nodeSize,triggersBounds:s.any,hashOverride:b},{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}],B=[{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}],$=[{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}],F=[{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}],z=[{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}],G=[{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,triggersBoundsOfParallelBeziers:!0},{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}],q=[{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}],w=[];gAe.pieBackgroundN=16,w.push({name:"pie-size",type:d.sizeMaybePercent});for(var k=1;k<=gAe.pieBackgroundN;k++)w.push({name:"pie-"+k+"-background-color",type:d.color}),w.push({name:"pie-"+k+"-background-size",type:d.percent}),w.push({name:"pie-"+k+"-background-opacity",type:d.zeroOneNumber});var T=[],j=gAe.arrowPrefixes=["source","mid-source","target","mid-target"],E=([{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){j.forEach(function(e){e=e+"-"+t.name,T.push({name:e,type:t.type,triggersBounds:t.triggersBounds})})},{}),gAe.properties=[].concat(m,P,y,v,x,U,f,g,c,u,p,b,B,$,F,w,z,G,T,q)),C=gAe.propertyGroups={behavior:m,transition:P,visibility:y,overlay:v,underlay:x,ghost:U,commonLabel:f,labelDimensions:g,mainLabel:c,sourceLabel:u,targetLabel:p,nodeBody:b,nodeBorder:B,nodeOutline:$,backgroundImage:F,pie:w,compound:z,edgeLine:G,edgeArrow:T,core:q},W=gAe.propertyGroupNames={},Y=((gAe.propertyGroupKeys=Object.keys(C)).forEach(function(t){W[t]=C[t].map(function(e){return e.name}),C[t].forEach(function(e){return e.groupKey=t})}),gAe.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"}]);gAe.propertyNames=E.map(function(e){return e.name});for(var S=0;S<E.length;S++){var H=E[S];E[H.name]=H}for(var _=0;_<Y.length;_++){var A=Y[_],L=E[A.pointsTo];E.push(L={name:A.name,alias:!0,pointsTo:L}),E[A.name]=L}function N(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:x8e;$we(this,N),this.idsByKey=new B8e,this.keyForId=new B8e,this.cachesByLvl=new B8e,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}function I(e,t){$we(this,I),this.r=e,this.opts=t,this.keyToIds=new Map,this.idToKey=new Map,this.atlases=[],this.styleKeyToAtlas=new Map,this.styleKeyNeedsRedraw=new Set,this.forceGC=!1}function R(e,t){$we(this,R),this.debugID=Math.floor(1e4*Math.random()),this.r=e,this.atlasSize=t.webglTexSize,this.rows=t.webglTexRows,this.enableWrapping=t.enableWrapping,this.texHeight=Math.floor(this.atlasSize/this.rows),this.maxTexWidth=this.atlasSize,this.texture=null,this.canvas=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=t.createTextureCanvas(e,this.atlasSize,this.atlasSize),this.scratch=t.createTextureCanvas(e,this.atlasSize,this.texHeight,"scratch")}function M(e,t,r){$we(this,M),this.r=e,this.gl=t,this.maxInstances=r.webglBatchSize,this.maxAtlases=r.webglTexPerBatch,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,r.enableWrapping=!0,r.createTextureCanvas=Kke,this.atlasManager=new J9e(e,r),this.program=this.createShaderProgram(X9e.SCREEN),this.pickingProgram=this.createShaderProgram(X9e.PICKING),this.vao=this.createVAO(),this.debugInfo=[]}function D(e,t){$we(this,D),this.r=e,this.globalOptions=e=t,this.maxAtlases=e.webglTexPerBatch,this.atlasSize=e.webglTexSize,this.renderTypes=new Map,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[],this._cacheScratchCanvas(e)}function O(e){$we(this,O),this.r=e}for(gAe.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},gAe.getDefaultProperties=function(){var e=this._private;if(null==e.defaultProperties){for(var t=y7e({"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","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","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%"},[{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<=gAe.pieBackgroundN;r++){var n=t.name.replace("{{i}}",r),i=t.value;e[n]=i}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 gAe.arrowPrefixes.forEach(function(e){e=e+"-"+r.name,t[e]=r.value}),t},{})),r={},n=0;n<this.properties.length;n++){var i,a=this.properties[n];a.pointsTo||(i=t[a=a.name],i=this.parse(a,i),r[a]=i)}e.defaultProperties=r}return e.defaultProperties},gAe.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},q9e={parse:function(e,t,r,n){var i,a,s;return YTe(t)?this.parseImplWarn(e,t,r,n):(i=d8e(e,""+t,r?"t":"f","mapping"===n||!0===n||!1===n||null==n?"dontcare":n),s=(s=(a=this.propCache=this.propCache||[])[i])||(a[i]=this.parseImplWarn(e,t,r,n)),(r||"mapping"===n)&&(s=S8e(s))&&(s.value=S8e(s.value)),s)},parseImplWarn:function(e,t,r,n){return(r=this.parseImpl(e,t,r,n))||null==t||E8e("The style property `".concat(e,": ").concat(t,"` is invalid")),!r||"width"!==r.name&&"height"!==r.name||"label"!==t||E8e("The style value of `label` is deprecated for `"+r.name+"`"),r},parseImpl:function(t,r,n,e){t=h7e(t);var i=this.properties[t],a=r,s=this.types;if(!i||void 0===r)return null;i.alias&&(i=i.pointsTo,t=i.name);var o=WTe(r),l=(o&&(r=r.trim()),i.type);if(!l)return null;if(n&&(""===r||null===r))return{name:t,value:r,bypass:!0,deleteBypass:!0};if(YTe(r))return{name:t,value:r,strValue:"fn",mapped:s.fn,bypass:n};if(!(!o||e||r.length<7||"a"!==r[1])){if(7<=r.length&&"d"===r[0]&&(i=new RegExp(s.data.regex).exec(r)))return!n&&(b=s.data,{name:t,value:i,strValue:""+r,mapped:b,field:i[1],bypass:n});if(10<=r.length&&"m"===r[0]&&(b=new RegExp(s.mapData.regex).exec(r))){if(n||l.multiple)return!1;if(i=s.mapData,!l.color&&!l.number)return!1;if(!(s=this.parse(t,b[4]))||s.mapped)return!1;if(!(w=this.parse(t,b[5]))||w.mapped)return!1;if(s.pfValue===w.pfValue||s.strValue===w.strValue)return E8e("`"+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=w.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:b,strValue:""+r,mapped:i,field:b[1],fieldMin:parseFloat(b[2]),fieldMax:parseFloat(b[3]),valueMin:s.value,valueMax:w.value,bypass:n}}}if(l.multiple&&"multiple"!==e){var u=o?r.split(/\s+/):HTe(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],n,"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:n}:null:{name:t,value:d,pfValue:g,strValue:f,bypass:n,units:p}}var x,b,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:n};return null},"checkEnums");if(l.number)return h="px",l.units&&(x=l.units),l.implicitUnits&&(h=l.implicitUnits),l.unitless||(o?(i="px|em"+(l.allowPercent?"|\\%":""),x&&(i=x),(b=r.match("^("+g7e+")("+i+")?$"))&&(r=b[1],x=b[2]||h)):x&&!l.implicitUnits||(x=h)),r=parseFloat(r),isNaN(r)&&void 0===l.enums?null:isNaN(r)&&void 0!==l.enums?(r=a,c()):l.integer&&!KTe(r)||void 0!==l.min&&(r<l.min||l.strictMin&&r===l.min)||void 0!==l.max&&(r>l.max||l.strictMax&&r===l.max)?null:(s={name:t,value:r,strValue:""+r+(x||""),units:x,bypass:n},l.unitless||"px"!==x&&"em"!==x?s.pfValue=r:s.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(s.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(s.pfValue="rad"===x?r:rEe(r)),"%"===x&&(s.pfValue=r/100),s);if(l.propList){var w,k=[];if("none"!=(w=""+r)){for(var T=w.split(/\s*,\s*|\s+/),E=0;E<T.length;E++){var C=T[E].trim();this.properties[C]?k.push(C):E8e("`"+C+"` 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:n}}if(l.color)return(e=k7e(r))?{name:t,value:e,pfValue:e,strValue:"rgb("+e[0]+","+e[1]+","+e[2]+")",bypass:n}:null;if(l.regex||l.regexes){if(l.enums&&(o=c()))return o;for(var S=l.regexes||[l.regex],_=0;_<S.length;_++){var A=new RegExp(S[_]).exec(r);if(A)return{name:t,value:l.singleRegexMatchValue?A[1]:A,strValue:""+r,bypass:n}}return null}return l.string?{name:t,value:""+r,strValue:""+r,bypass:n}:l.enums?c():null}},fAe=mt(function e(t){if(!(this instanceof e))return new e(t);t7e(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):k8e("A style must have a core reference")},"Style"),(mAe=fAe.prototype).instanceString=function(){return"style"},mAe.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},mAe.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},mAe.core=function(e){return this._private.coreStyle[e]||this.getDefaultProperty(e)},mAe.selector=function(e){var e="core"===e?null:new T_e(e),t=this.length++;return this[t]={selector:e,properties:[],mappedProperties:[],index:t},this},mAe.css=function(){var e=arguments;if(1===e.length)for(var t=e[0],r=0;r<this.properties.length;r++){var n=this.properties[r],i=t[n.name];void 0!==(i=void 0===i?t[u7e(n.name)]:i)&&this.cssRule(n.name,i)}else 2===e.length&&this.cssRule(e[0],e[1]);return this},mAe.style=mAe.css,mAe.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.mapped&&this[t].mappedProperties.push(e),!this[t].selector)&&(this._private.coreStyle[e.name]=e),this},mAe.append=function(e){return r7e(e)?e.appendToStyle(this):HTe(e)?this.appendFromJson(e):WTe(e)&&this.appendFromString(e),this},fAe.fromJson=function(e,t){return(e=new fAe(e)).fromJson(t),e},fAe.fromString=function(e,t){return new fAe(e).fromString(t)},[I9e,M9e,rLe,z9e,G9e,U9e,gAe,q9e].forEach(function(e){y7e(mAe,e)}),fAe.types=mAe.types,fAe.properties=mAe.properties,fAe.propertyGroups=mAe.propertyGroups,fAe.propertyGroupNames=mAe.propertyGroupNames,fAe.propertyGroupKeys=mAe.propertyGroupKeys,xLe={style:mt(function(e){return e&&this.setStyle(e).update(),this._private.style},"style"),setStyle:mt(function(e){var t=this._private;return r7e(e)?t.style=e.generateStyle(this):HTe(e)?t.style=fAe.fromJson(this,e):WTe(e)?t.style=fAe.fromString(this,e):t.style=fAe(this),t.style},"setStyle"),updateStyle:mt(function(){this.mutableElements().updateStyle()},"updateStyle")},(fLe={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,n=arguments,i=this._private.pan;switch(n.length){case 0:return i;case 1:if(WTe(n[0]))return i[e=n[0]];if(VTe(n[0])){if(!this._private.panningEnabled)return this;t=(r=n[0]).x,r=r.y,ae(t)&&(i.x=t),ae(r)&&(i.y=r),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;t=n[1],"x"!==(e=n[0])&&"y"!==e||!ae(t)||(i[e]=t),this.emit("pan viewport")}return this.notify("viewport"),this},"pan"),panBy:mt(function(e,t){var r,n,i=arguments,a=this._private.pan;if(this._private.panningEnabled){switch(i.length){case 1:VTe(e)&&(r=(n=i[0]).x,n=n.y,ae(r)&&(a.x+=r),ae(n)&&(a.y+=n),this.emit("pan viewport"));break;case 2:r=t,"x"!==(n=e)&&"y"!==n||!ae(r)||(a[n]+=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(ae(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled&&(WTe(e)?(n=e,e=this.$(n)):s7e(e)?((r={x1:(n=e).x1,y1:n.y1,x2:n.x2,y2:n.y2}).w=r.x2-r.x1,r.h=r.y2-r.y1):QTe(e)||(e=this.mutableElements()),!QTe(e)||!e.empty())){var r=r||e.boundingBox(),n=this.width(),e=this.height();if(t=ae(t)?t:0,!isNaN(n)&&!isNaN(e)&&0<n&&0<e&&!isNaN(r.w)&&!isNaN(r.h)&&0<r.w&&0<r.h)return{zoom:t=(t=(t=Math.min((n-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:(n-t*(r.x1+r.x2))/2,y:(e-t*(r.y1+r.y2))/2}}}},"getFitViewport"),zoomRange:mt(function(e,t){var r,n=this._private;return null==t&&(e=(r=e).min,t=r.max),ae(e)&&ae(t)&&e<=t?(n.minZoom=e,n.maxZoom=t):ae(e)&&void 0===t&&e<=n.maxZoom?n.minZoom=e:ae(t)&&void 0===e&&t>=n.minZoom&&(n.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,n=this._private,i=n.pan,a=n.zoom,s=!n.zoomingEnabled;return ae(e)?r=e:VTe(e)&&(r=e.level,null!=e.position?t=X8e(e.position,a,i):null!=e.renderedPosition&&(t=e.renderedPosition),null!=t)&&!n.panningEnabled&&(s=!0),r=(r=r>n.maxZoom?n.maxZoom:r)<n.minZoom?n.minZoom:r,!s&&ae(r)&&r!==a&&(null==t||ae(t.x)&&ae(t.y))?null!=t?{zoomed:!0,panned:!0,zoom:e=r,pan:{x:-e/a*(t.x-i.x)+t.x,y:-e/a*(t.y-i.y)+t.y}}:{zoomed:!0,panned:!1,zoom:r,pan:i}: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,n=!0,i=[],a=!1,s=!1;return e&&(ae(e.zoom)||(r=!1),VTe(e.pan)||(n=!1),r||n)&&(r&&((r=e.zoom)<t.minZoom||r>t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=r,i.push("zoom"))),!n||a&&e.cancelOnFailedZoom||!t.panningEnabled||(r=e.pan,ae(r.x)&&(t.pan.x=r.x,s=!1),ae(r.y)&&(t.pan.y=r.y,s=!1),s)||i.push("pan"),0<i.length)&&(i.push("viewport"),this.emit(i.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,n;if(this._private.panningEnabled&&(WTe(e)?(r=e,e=this.mutableElements().filter(r)):QTe(e)||(e=this.mutableElements()),0!==e.length))return r=e.boundingBox(),e=this.width(),n=this.height(),{x:(e-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(n-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=fLe.center,fLe.autolockNodes=fLe.autolock,fLe.autoungrabifyNodes=fLe.autoungrabify,(J={data:a_e.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:a_e.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:a_e.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:a_e.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})}).attr=J.data,J.removeAttr=J.removeData,yAe=mt(function(e){var i=this,r=(o=(o=(e=y7e({},e)).container)&&!ZTe(o)&&ZTe(o[0])?o[0]:o)?o._cyreg:null,n=((r=r||{})&&r.cy&&(r.cy.destroy(),r={}),r.readies=r.readies||[]),t=(o&&(o._cyreg=r),r.cy=i,void 0!==$Te&&void 0!==o&&!e.headless),a=e,e=(a.layout=y7e({name:t?"grid":"null"},a.layout),a.renderer=y7e({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 oAe(this),listeners:[],aniEles:new oAe(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:ae(a.zoom)?a.zoom:1,pan:{x:VTe(a.pan)&&ae(a.pan.x)?a.pan.x:0,y:VTe(a.pan)&&ae(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(o7e))return oSe.all(e).then(t);t(e)},"loadExtData")),t=(s.styleEnabled&&i.setStyle([]),y7e({},a,a.renderer)),l=(i.initRenderer(t),mt(function(e,t,r){i.notifications(!1);var n=i.mutableElements();0<n.length&&n.remove(),null!=e&&(VTe(e)||HTe(e))&&i.add(e),i.one("layoutready",function(e){i.notifications(!0),i.emit(e),i.one("load",t),i.emitAndNotify("load")}).one("layoutstop",function(){i.one("done",r),i.emit("done")}),(n=y7e({},i._private.options.layout)).eles=i.elements(),i.layout(n).run()},"setElesAndLayout"));o([a.style,a.elements],function(e){var t=e[0],e=e[1];s.styleEnabled&&i.style().append(t),l(e,function(){i.startAnimationLoop(),s.ready=!0,YTe(a.ready)&&i.on("ready",a.ready);for(var e=0;e<n.length;e++){var t=n[e];i.on("ready",t)}r&&(r.readies=[]),i.emit("ready")},a.done)})},"Core"),vAe=yAe.prototype,y7e(vAe,{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||$Te},"window"),mount:mt(function(e){var t,r;if(null!=e)return r=(t=this._private).options,!ZTe(e)&&ZTe(e[0])&&(e=e[0]),this.stopAnimationLoop(),this.destroyRenderer(),t.container=e,t.styleEnabled=!0,this.invalidateSize(),this.initRenderer(y7e({},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 S8e(this._private.options)},"options"),json:mt(function(e){var r,h=this,t=h._private,n=h.mutableElements(),i=mt(function(e){return h.getElementById(e.id())},"getFreshRef");if(VTe(e)){if(h.startBatch(),e.elements){var u={},a=mt(function(e,t){for(var r=[],n=[],i=0;i<e.length;i++){var a,s,o=e[i];o.data.id?(a=""+o.data.id,s=h.getElementById(a),u[a]=!0,0!==s.length?n.push({ele:s,json:o}):(t&&(o.group=t),r.push(o))):E8e("cy.json() cannot handle elements without an ID attribute")}h.add(r);for(var l=0;l<n.length;l++){var c=n[l];c.ele.json(c.json)}},"updateEles");if(HTe(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];HTe(c)&&a(c,l)}var d=h.collection();n.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 i(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={},n.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=S8e(h.data()),n=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=S8e(t.pan),r.boxSelectionEnabled=t.boxSelectionEnabled,r.renderer=S8e(n.renderer),r.hideEdgesOnViewport=n.hideEdgesOnViewport,r.textureOnViewport=n.textureOnViewport,r.wheelSensitivity=n.wheelSensitivity,r.motionBlur=n.motionBlur,r.multiClickDebounceTime=n.multiClickDebounceTime,r},"json")}),vAe.$id=vAe.getElementById,[j9e,W9e,nLe,hLe,uLe,dLe,Y9e,k9e,xLe,fLe,J].forEach(function(e){y7e(vAe,e)}),xAe={fit:!0,directed:!1,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")},bAe={maximal:!1,acyclic:!1},wAe=mt(function(e){return e.scratch("breadthfirst")},"getInfo"),kAe=mt(function(e,t){return e.scratch("breadthfirst",t)},"setInfo"),mt(Lke,"BreadthFirstLayout"),TAe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!(Lke.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,i=!!l.boundingBox,n=e.extent(),a=pEe(i?l.boundingBox:{x1:n.x1,y1:n.y1,w:n.w,h:n.h});if(QTe(l.roots))p=l.roots;else if(HTe(l.roots)){for(var s=[],o=0;o<l.roots.length;o++){var u=l.roots[o],u=e.getElementById(u);s.push(u)}p=e.collection(s)}else if(WTe(l.roots))p=e.$(l.roots);else if(r)p=h.roots();else for(var d=c.components(),p=e.collection(),B=mt(function(e){var t=(e=d[e]).maxDegree(!1),e=e.filter(function(e){return e.degree(!1)===t});p=p.add(e)},"_loop"),g=0;g<d.length;g++)B(g);var f=[],m={},y=mt(function(e,t){null==f[t]&&(f[t]=[]);var r=f[t].length;f[t].push(e),kAe(e,{index:r,depth:t})},"addToDepth"),$=mt(function(e,t){var r=wAe(e),n=r.depth;f[n][r.index]=null,e.isChildless()&&y(e,t)},"changeDepth");t.bfs({roots:p,directed:l.directed,visit:mt(function(e,t,r,n,i){var a=(e=e[0]).id();e.isChildless()&&y(e,i),m[a]=!0},"visit")});for(var v=[],x=0;x<h.length;x++){var b=h[x];m[b.id()]||v.push(b)}var w=mt(function(e){for(var t=f[e],r=0;r<t.length;r++){var n=t[r];null==n?(t.splice(r,1),r--):kAe(n,{depth:e,index:r})}},"assignDepthsAt"),F=mt(function(e,t){for(var r=wAe(e),n=e.incomers().filter(function(e){return e.isNode()&&c.has(e)}),i=-1,a=e.id(),s=0;s<n.length;s++)var o=n[s],o=wAe(o),i=Math.max(i,o.depth);return r.depth<=i&&(!l.acyclic&&t[a]?null:($(e,r=i+1),t[a]=r,!0))},"adjustMaximally");if(r&&P){var k=[],z={},G=mt(function(e){return k.push(e)},"enqueue"),U=mt(function(){return k.shift()},"dequeue");for(h.forEach(function(e){return k.push(e)});0<k.length;){var T=U(),E=F(T,z);if(E)T.outgoers().filter(function(e){return e.isNode()&&c.has(e)}).forEach(G);else if(null===E){E8e("Detected double maximal shift for node `"+T.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 _=h[S].layoutDimensions(l),q=_.w,C=Math.max(C,q,_.h);var A={},L=mt(function(e){if(A[e.id()])return A[e.id()];for(var t=wAe(e).depth,r=e.neighborhood(),n=0,i=0,a=0;a<r.length;a++){var s,o,l=r[a];l.isEdge()||l.isParent()||!h.has(l)||null!=(l=wAe(l))&&(s=l.index,l=l.depth,null!=s)&&null!=l&&(o=f[l].length,l<t)&&(n+=s/o,i++)}return n/=i=Math.max(1,i),0===i&&(n=0),A[e.id()]=n},"getWeightedPercent"),j=mt(function(e,t){var r=L(e)-L(t);return 0==r?f7e(e.id(),t.id()):r},"sortFn");void 0!==l.depthSort&&(j=l.depthSort);for(var N=f.length,I=0;I<N;I++)f[I].sort(j),w(I);for(var R=[],M=0;M<v.length;M++)R.push(v[M]);n=mt(function(){for(var e=0;e<N;e++)w(e)},"assignDepths"),R.length&&(f.unshift(R),N=f.length,n());for(var W=0,D=0;D<N;D++)W=Math.max(f[D].length,W);var Y=a.x1+a.w/2,H=a.y1+a.h/2,O=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}),V=Math.max(1===N?0:i?(a.h-2*l.padding-O.h)/(N-1):(a.h-2*l.padding-O.h)/(N+1),C),X=f.reduce(function(e,t){return Math.max(e,t.length)},0),t=mt(function(e){var t,r,n=(e=wAe(e)).depth,e=e.index;return l.circle?(t=Math.min(a.w/2/N,a.h/2/N),t=(t=Math.max(t,C))*n+t-(0<N&&f[0].length<=3?t/2:0),r=2*Math.PI/f[n].length*e,0===n&&1===f[0].length&&(t=1),{x:Y+t*Math.cos(r),y:H+t*Math.sin(r)}):(t=f[n].length,r=Math.max(1===t?0:i?(a.w-2*l.padding-O.w)/((l.grid?X:t)-1):(a.w-2*l.padding-O.w)/((l.grid?X:t)+1),C),{x:Y+(e+1-(t+1)/2)*r,y:H+(n+1-(N+1)/2)*V})},"getPosition");return c.nodes().layoutPositions(this,l,t),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(Nke,"CircleLayout"),EAe={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!(Nke.prototype.run=function(){var n=e=this.options,e=e.cy,t=n.eles,i=void 0!==n.counterclockwise?!n.counterclockwise:n.clockwise,r=t.nodes().not(":parent");n.sort&&(r=r.sort(n.sort));for(var a,s=(e=pEe(n.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()})).x1+e.w/2,o=e.y1+e.h/2,l=(void 0===n.sweep?2*Math.PI-2*Math.PI/r.length:n.sweep)/Math.max(1,r.length-1),c=0,h=0;h<r.length;h++)var u=r[h].layoutDimensions(n),d=u.w,c=Math.max(c,d,u.h);a=ae(n.radius)?n.radius:r.length<=1?0:Math.min(e.h,e.w)/2-c,1<r.length&&n.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=n.startAngle+t*l*(i?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,n,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(Ike,"ConcentricLayout"),Ike.prototype.run=function(){for(var e=r=this.options,t=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,r=r.cy,n=e.eles,i=n.nodes().not(":parent"),a=(r=pEe(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<i.length;c++){var h=i[c],u=e.concentric(h);o.push({value:u,node:h}),h._private.scratch.concentric=u}i.updateStyle();for(var d=0;d<i.length;d++)var p=i[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(i),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,x=l+e.minNodeSpacing;e.avoidOverlap||(v=0<g.length&&1<g[0].length,r=Math.min(r.w,r.h)/2-x,x=Math.min(x,r/(g.length+v?1:0)));for(var b=0,w=0;w<g.length;w++){var k,T=g[w],E=void 0===e.sweep?2*Math.PI-2*Math.PI/T.length:e.sweep,E=T.dTheta=E/Math.max(1,T.length-1);1<T.length&&e.avoidOverlap&&(k=Math.cos(E)-Math.cos(0),E=Math.sin(E)-Math.sin(0),k=Math.sqrt(x*x/(k*k+E*E)),b=Math.max(k,b)),T.r=b,b+=x}if(e.equidistant){for(var C=0,S=0,_=0;_<g.length;_++)var B=g[_].r-S,C=Math.max(C,B);for(var S=0,A=0;A<g.length;A++){var L=g[A];0===A&&(S=L.r),L.r=S,S+=C}}for(var N={},I=0;I<g.length;I++)for(var R=g[I],$=R.dTheta,M=R.r,D=0;D<R.length;D++){var F=R[D],O=e.startAngle+(t?1:-1)*$*D,O={x:a+M*Math.cos(O),y:s+M*Math.sin(O)};N[F.node.id()]=O}return n.nodes().layoutPositions(this,e,function(e){return e=e.id(),N[e]}),this},SAe={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(Rke,"CoseLayout"),Rke.prototype.run=function(){var r=this.options,e=r.cy,n=this,i=(!(n.stopped=!1)!==r.animate&&!1!==r.animate||n.emit({type:"layoutstart",layout:n}),CAe=!0===r.debug,_Ae(e,n,r)),a=(CAe&&(void 0)(i),r.randomize&&NAe(i),n8e()),s=mt(function(){RAe(i,e,r),!0===r.fit&&e.fit(r.padding)},"refresh"),o=mt(function(e){return!(n.stopped||e>=r.numIter||(MAe(i,r),i.temperature=i.temperature*r.coolingFactor,i.temperature<r.minTemp))},"mainLoop"),l=mt(function(){var e,t;!0===r.animate||!1===r.animate?(s(),n.one("layoutstop",r.stop),n.emit({type:"layoutstop",layout:n})):(e=r.eles.nodes(),t=IAe(i,r,e),e.layoutPositions(n,r,t))},"done"),c=0,h=!0;if(!0===r.animate)mt(function e(){for(var t=0;h&&t<r.refresh;)h=o(c),c++,t++;h?(n8e()-a>=r.animationThreshold&&s(),r8e(e)):(WAe(i,r),l())},"frame")();else{for(;h;)h=o(c),c++;WAe(i,r),l()}return this},Rke.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Rke.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},_Ae=mt(function(e,t,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=pEe(r.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.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=i[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=YTe(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 x=p[g++],x=s.idToIndex[x],b=s.layoutNodes[x].children;if(0<b.length)for(s.graphSet.push(b),c=0;c<b.length;c++)p[++f]=b[c]}for(c=0;c<s.graphSet.length;c++)for(var w=s.graphSet[c],u=0;u<w.length;u++){var k=s.idToIndex[w[u]];s.indexToGraph[k]=c}for(c=0;c<s.edgeSize;c++){var T=n[c],E={},C=(E.id=T.data("id"),E.sourceId=T.data("source"),E.targetId=T.data("target"),YTe(r.idealEdgeLength)?r.idealEdgeLength(T):r.idealEdgeLength),T=YTe(r.edgeElasticity)?r.edgeElasticity(T):r.edgeElasticity,S=s.idToIndex[E.sourceId],_=s.idToIndex[E.targetId];if(s.indexToGraph[S]!=s.indexToGraph[_]){for(var A=AAe(E.sourceId,E.targetId,s),L=s.graphSet[A],N=0,I=s.layoutNodes[S];-1===L.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],N++;for(I=s.layoutNodes[_];-1===L.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],N++;C*=N*r.nestingFactor}E.idealLength=C,E.elasticity=T,s.layoutEdges.push(E)}return s},"createLayoutInfo"),AAe=mt(function(e,t,r){return(e=LAe(e,t,0,r)).count<2?0:e.graph},"findLCA"),LAe=mt(function e(t,r,n,i){var a=i.graphSet[n];if(-1<a.indexOf(t)&&-1<a.indexOf(r))return{count:2,graph:n};for(var s=0,o=0;o<a.length;o++){var l=a[o],l=i.idToIndex[l];if(0!==(l=i.layoutNodes[l].children).length&&0!==(l=e(t,r,i.indexToGraph[i.idToIndex[l[0]]],i)).count){if(1!==l.count)return l;if(2==++s)break}}return{count:s,graph:n}},"findLCA_aux"),NAe=mt(function(e,t){for(var r=e.clientWidth,n=e.clientHeight,i=0;i<e.nodeSize;i++){var a=e.layoutNodes[i];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*r,a.positionY=Math.random()*n)}},"randomizePositions"),IAe=mt(function(i,a,e){var s=i.boundingBox,o={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return a.boundingBox&&(e.forEach(function(e){e=i.layoutNodes[i.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,n,e=i.layoutNodes[i.idToIndex[e.data("id")]];return a.boundingBox?(r=(e.positionX-o.x1)/o.w,n=(e.positionY-o.y1)/o.h,{x:s.x1+r*s.w,y:s.y1+n*s.h}):{x:e.positionX,y:e.positionY}}},"getScaleInBoundsFn"),RAe=mt(function(e,t,r){var n=r.layout,i=r.eles.nodes(),a=IAe(e,r,i);i.positions(a),!0!==e.ready&&(e.ready=!0,n.one("layoutready",r.ready),n.emit({type:"layoutready",layout:this}))},"refreshPositions"),MAe=mt(function(e,t,r){DAe(e,t),FAe(e),zAe(e,t),GAe(e),UAe(e)},"step"),DAe=mt(function(e,t){for(var r=0;r<e.graphSet.length;r++)for(var n=e.graphSet[r],i=n.length,a=0;a<i;a++)for(var s=e.layoutNodes[e.idToIndex[n[a]]],o=a+1;o<i;o++){var l=e.layoutNodes[e.idToIndex[n[o]]];PAe(s,l,e,t)}},"calculateNodeForces"),OAe=mt(function(e){return-e+2*e*Math.random()},"randomDistance"),PAe=mt(function(e,t,r,n){var i,a,s,o;e.cmptId!==t.cmptId&&!r.isCompound||(r=t.positionX-e.positionX,i=t.positionY-e.positionY,0===r&&0===i&&(r=OAe(1),i=OAe(1)),o=0<(o=BAe(e,t,r,i))?(s=n.nodeOverlap*o)*r/(a=Math.sqrt(r*r+i*i)):(n=$Ae(e,r,i),o=(r=(o=$Ae(t,-1*r,-1*i)).x-n.x)*r+(i=o.y-n.y)*i,a=Math.sqrt(o),(s=(e.nodeRepulsion+t.nodeRepulsion)/o)*r/a),n=s*i/a,e.isLocked||(e.offsetX-=o,e.offsetY-=n),t.isLocked)||(t.offsetX+=o,t.offsetY+=n)},"nodeRepulsion"),BAe=mt(function(e,t,r,n){return r=0<r?e.maxX-t.minX:t.maxX-e.minX,n=0<n?e.maxY-t.minY:t.maxY-e.minY,0<=r&&0<=n?Math.sqrt(r*r+n*n):0},"nodesOverlap"),$Ae=mt(function(e,t,r){var n=e.positionX,i=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=n,l.y=i+a/2):0<t&&-1*o<=s&&s<=o?(l.x=n+e/2,l.y=i+e*r/2/t):t<0&&-1*o<=s&&s<=o?(l.x=n-e/2,l.y=i-e*r/2/t):0<r&&(s<=-1*o||o<=s)?(l.x=n+a*t/2/r,l.y=i+a/2):r<0&&(s<=-1*o||o<=s)&&(l.x=n-a*t/2/r,l.y=i-a/2),l},"findClippingPoint"),FAe=mt(function(e,t){for(var r=0;r<e.edgeSize;r++){var n,i,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||(n=$Ae(s,l,c),c=(l=$Ae(o,-1*l,-1*c)).x-n.x,l=l.y-n.y,n=Math.sqrt(c*c+l*l),a=Math.pow(a.idealLength-n,2)/a.elasticity,c=0!==n?(i=a*c/n,a*l/n):i=0,s.isLocked||(s.offsetX+=i,s.offsetY+=c),o.isLocked)||(o.offsetX-=i,o.offsetY-=c)}},"calculateEdgeForces"),zAe=mt(function(e,t){if(0!==t.gravity)for(var r=0;r<e.graphSet.length;r++)for(var n,i,a=e.graphSet[r],s=a.length,o=0===r?(i=e.clientHeight/2,e.clientWidth/2):(n=e.layoutNodes[e.idToIndex[a[0]]],i=(n=e.layoutNodes[e.idToIndex[n.parentId]]).positionX,n.positionY),l=0;l<s;l++){var c,h,u,d=e.layoutNodes[e.idToIndex[a[l]]];d.isLocked||(h=i-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"),GAe=mt(function(e,t){var r=[],n=0,i=-1;for(r.push.apply(r,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var a=r[n++],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[++i]=s[c]}a.offsetX=0,a.offsetY=0}}},"propagateForces"),UAe=mt(function(e,t){for(var r=0;r<e.nodeSize;r++)0<(i=e.layoutNodes[r]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0);for(var n,r=0;r<e.nodeSize;r++)0<(i=e.layoutNodes[r]).children.length||i.isLocked||(n=qAe(i.offsetX,i.offsetY,e.temperature),i.positionX+=n.x,i.positionY+=n.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,jAe(i,e));for(var i,r=0;r<e.nodeSize;r++)0<(i=e.layoutNodes[r]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)},"updatePositions"),qAe=mt(function(e,t,r){var n=Math.sqrt(e*e+t*t);return r<n?{x:r*e/n,y:r*t/n}:{x:e,y:t}},"limitForce"),jAe=mt(function e(t,r){if(null!=(n=t.parentId)){var n,i=!1;if((null==(n=r.layoutNodes[r.idToIndex[n]]).maxX||t.maxX+n.padRight>n.maxX)&&(n.maxX=t.maxX+n.padRight,i=!0),(null==n.minX||t.minX-n.padLeft<n.minX)&&(n.minX=t.minX-n.padLeft,i=!0),(null==n.maxY||t.maxY+n.padBottom>n.maxY)&&(n.maxY=t.maxY+n.padBottom,i=!0),(null==n.minY||t.minY-n.padTop<n.minY)&&(n.minY=t.minY-n.padTop,i=!0),i)return e(n,r)}},"updateAncestryBoundaries"),WAe=mt(function(e,t){for(var r=e.layoutNodes,n=[],i=0;i<r.length;i++){var a=r[i],s=a.cmptId;(n[s]=n[s]||[]).push(a)}for(var o=0,i=0;i<n.length;i++)if(h=n[i]){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}n.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,i=0;i<n.length;i++)if(h=n[i]){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"),YAe={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(Mke,"GridLayout"),Mke.prototype.run=function(){var e=t=this.options,t=t.cy,r=(c=e.eles).nodes().not(":parent"),i=(e.sort&&(r=r.sort(e.sort)),pEe(e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}));if(0===i.h||0===i.w)c.nodes().layoutPositions(this,e,function(e){return{x:i.x1,y:i.y1}});else{var n=r.size(),t=Math.sqrt(n*i.h/i.w),a=Math.round(t),s=Math.round(i.w/i.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(n/a);else if(null==c&&null!=t)s=t,a=Math.ceil(n/s);else if(n<s*a)n<=((c=o())-1)*(t=l())?o(c-1):n<=(t-1)*c&&l(t-1);else for(;s*a<n;){var h=o(),u=l();n<=(u+1)*h?l(u+1):o(h+1)}var d=i.w/s,p=i.h/a;if(e.condense&&(p=d=0),e.avoidOverlap)for(var g=0;g<r.length;g++){null!=(f=(m=r[g])._private.position).x&&null!=f.y||(f.x=0,f.y=0);var f=m.layoutDimensions(e),m=e.avoidOverlapPadding,y=f.w+m,f=f.h+m,d=Math.max(d,y),p=Math.max(p,f)}for(var v={},x=mt(function(e,t){return!!v["c-"+e+"-"+t]},"used"),b=mt(function(e,t){v["c-"+e+"-"+t]=!0},"use"),w=0,k=0,T=mt(function(){s<=++k&&(k=0,w++)},"moveToNextCell"),E={},C=0;C<r.length;C++){var S=r[C],_=e.position(S);if(_&&(void 0!==_.row||void 0!==_.col)){var A={row:_.row,col:_.col};if(void 0===A.col)for(A.col=0;x(A.row,A.col);)A.col++;else if(void 0===A.row)for(A.row=0;x(A.row,A.col);)A.row++;E[S.id()]=A,b(A.row,A.col)}}c=mt(function(e,t){var r,n;if(e.locked()||e.isParent())return!1;if(e=E[e.id()])r=e.col*d+d/2+i.x1,n=e.row*p+p/2+i.y1;else{for(;x(w,k);)T();r=k*d+d/2+i.x1,n=w*p+p/2+i.y1,b(w,k),T()}return{x:r,y:n}},"getPos"),r.layoutPositions(this,e,c)}return this},HAe={ready:mt(function(){},"ready"),stop:mt(function(){},"stop")},mt(Dke,"NullLayout"),Dke.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},VAe={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!(Dke.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(Oke,"PresetLayout"),XAe={fit:!0,padding:30,boundingBox:void 0,animate:!(Oke.prototype.run=function(){var t=this.options,e=t.eles.nodes(),r=YTe(t.positions);function n(e){return null==t.positions?V8e(e.position()):r?t.positions(e):t.positions[e._private.data.id]??null}return mt(n,"getPosition"),e.layoutPositions(this,t,function(e,t){var r=n(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(Pke,"RandomLayout"),Pke.prototype.run=function(){var e=this.options,t=e.cy,r=e.eles,n=pEe(e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),t=mt(function(e,t){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}},"getPos");return r.nodes().layoutPositions(this,e,t),this},KAe=[{name:"breadthfirst",impl:Lke},{name:"circle",impl:Nke},{name:"concentric",impl:Ike},{name:"cose",impl:Rke},{name:"grid",impl:Mke},{name:"null",impl:Dke},{name:"preset",impl:Oke},{name:"random",impl:Pke}],mt(Bke,"NullRenderer"),I9e=mt(function(){},"noop"),M9e=mt(function(){throw new Error("A headless instance can not render images")},"throwImgErr"),Bke.prototype={recalculateRenderedStyle:I9e,notify:mt(function(){this.notifications++},"notify"),init:I9e,isHeadless:mt(function(){return!0},"isHeadless"),png:M9e,jpg:M9e},rLe={arrowShapeWidth:.3,registerArrowShapes:function(){var r=this.arrowShapes={},o=this,n=mt(function(e,t,r,n,i,a,s){return i.x-r/2-s<=e&&e<=i.x+r/2+s&&i.y-r/2-s<=t&&t<=i.y+r/2+s},"bbCollide"),l=mt(function(e,t,r,n,i){var a=e*Math.cos(n)-t*Math.sin(n),e=e*Math.sin(n)+t*Math.cos(n);return{x:a*r+i.x,y:e*r+i.y}},"transform"),c=mt(function(e,t,r,n){for(var i=[],a=0;a<e.length;a+=2)i.push(l(e[a],e[a+1],t,r,n));return i},"transformPoints"),h=mt(function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(n.x,n.y)}return t},"pointsToArr"),i=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]=y7e({name:e,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:mt(function(e,t,r,n,i,a){return r=h(c(this.points,r+2*a,n,i)),MEe(e,t,r)},"collide"),roughCollide:n,draw:mt(function(e,t,r,n){t=c(this.points,t,r,n),o.arrowShapeImpl("polygon")(e,t)},"draw"),spacing:mt(function(e){return 0},"spacing"),gap:i},t)},"defineArrowShape");e("none",{collide:x8e,roughCollide:x8e,draw:w8e,spacing:b8e,gap:b8e}),e("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),e("arrow","triangle"),e("triangle-backcurve",{points:r.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:mt(function(e,t,r,n,i){var a=c(this.points,t,r,n),s=this.controlPoint,s=l(s[0],s[1],t,r,n);o.arrowShapeImpl(this.name)(e,a,s)},"draw"),gap:mt(function(e){return.8*i(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,n,i,a,s){var o=h(c(this.points,r+2*s,n,i)),r=h(c(this.pointsTee,r+2*s,n,i));return MEe(e,t,o)||MEe(e,t,r)},"collide"),draw:mt(function(e,t,r,n,i){var a=c(this.points,t,r,n),t=c(this.pointsTee,t,r,n);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,n,i,a,s){var o=i,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,n,i));return MEe(e,t,r)||o},"collide"),draw:mt(function(e,t,r,n,i){r=c(this.pointsTr,t,r,n),o.arrowShapeImpl(this.name)(e,r,n.x,n.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,n,i,a,s){var o=h(c(this.points,r+2*s,n,i)),a=h(c(this.crossLinePts(r,a),r+2*s,n,i));return MEe(e,t,o)||MEe(e,t,a)},"collide"),draw:mt(function(e,t,r,n,i){var a=c(this.points,t,r,n),i=c(this.crossLinePts(t,i),t,r,n);o.arrowShapeImpl(this.name)(e,a,i)},"draw")}),e("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:mt(function(e){return.525*i(e)},"gap")}),e("circle",{radius:.15,collide:mt(function(e,t,r,n,i,a,s){return Math.pow(i.x-e,2)+Math.pow(i.y-t,2)<=Math.pow((r+2*s)*this.radius,2)},"collide"),draw:mt(function(e,t,r,n,i){o.arrowShapeImpl(this.name)(e,n.x,n.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")})}},z9e={projectIntoViewport:function(e,t){var r=this.cy,n=(a=this.findContainerClientCoords())[0],i=a[1],a=a[4],s=r.pan(),r=r.zoom();return[((e-n)/a-s.x)/r,((t-i)/a-s.y)/r]},findContainerClientCoords:function(){var t,e,r,n,i,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"),n=s("padding-top"),i=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+n+a,this.containerBB=[c,h,s-(e+r),o-(n+i),l])},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,r,n){return this.findNearestElements(e,t,r,n)[0]},findNearestElements:function(y,v,e,t){var n,i,x=this,b=this,r=b.getCachedZSortedEles(),w=[],a=b.cy.zoom(),k=b.cy.hasCompoundNodes(),T=(t?24:8)/a,l=(t?8:2)/a,g=(t?8:2)/a,s=1/0;function E(e,t){if(e.isNode()){if(i)return;i=e,w.push(e)}if(e.isEdge()&&(null==t||t<s))if(n){if(n.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value&&n.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value)for(var r=0;r<w.length;r++)if(w[r].isEdge()){w[r]=e,n=e,s=t??s;break}}else w.push(e),n=e,s=t??s}function C(e){var t=e.outerWidth()+2*l,r=e.outerHeight()+2*l,n=t/2,i=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-n<=y&&y<=a.x+n&&a.y-i<=v&&v<=a.y+i&&b.nodeShapes[x.getNodeShape(e)].checkPoint(y,v,0,t,r,a.x,a.y,s,o))return E(e,0),!0}function o(e){var t,r=e._private,n=r.rscratch,i=e.pstyle("width").pfValue,a=e.pstyle("arrow-scale").value,s=(l=i/2+T)*l,o=2*l,l=r.source,c=r.target;if("segments"===n.edgeType||"straight"===n.edgeType||"haystack"===n.edgeType){for(var h=n.allpts,u=0;u+3<h.length;u+=2)if(_Ee(y,v,h[u],h[u+1],h[u+2],h[u+3],o)&&s>(t=REe(y,v,h[u],h[u+1],h[u+2],h[u+3])))return E(e,t),!0}else if("bezier"===n.edgeType||"multibezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType)for(h=n.allpts,u=0;u+5<n.allpts.length;u+=4)if(AEe(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5],o)&&s>(t=IEe(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return E(e,t),!0;for(var l=l||r.source,c=c||r.target,d=x.getArrowWidth(i,a),p=[{name:"source",x:n.arrowStartX,y:n.arrowStartY,angle:n.srcArrowAngle},{name:"target",x:n.arrowEndX,y:n.arrowEndY,angle:n.tgtArrowAngle},{name:"mid-source",x:n.midX,y:n.midY,angle:n.midsrcArrowAngle},{name:"mid-target",x:n.midX,y:n.midY,angle:n.midtgtArrowAngle}],u=0;u<p.length;u++){var g=p[u],f=b.arrowShapes[e.pstyle(g.name+"-arrow-shape").value],m=e.pstyle("width").pfValue;if(f.roughCollide(y,v,d,g.angle,{x:g.x,y:g.y},m,T)&&f.collide(y,v,d,g.angle,{x:g.x,y:g.y},m,T))return E(e),!0}k&&0<w.length&&(C(l),C(c))}function f(e,t,r){return O8e(e,t,r)}function c(e,t){var r=e._private,n=g,i=t?t+"-":"",a=(e.boundingBox(),r.labelBounds[t||"main"]),s=e.pstyle(i+"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(i+"text-margin-x").pfValue,t=e.pstyle(i+"text-margin-y").pfValue,i=a.x1-n-r,c=a.x2+n-r,h=a.y1-n-t,n=a.y2+n-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"))(i,h),i=s(i,n),h=s(c,h),s=s(c,n),c=[p.x+r,p.y+t,h.x+r,h.y+t,s.x+r,s.y+t,i.x+r,i.y+t];if(MEe(y,v,c))return E(e),!0}else if(TEe(a,y,v))return E(e),!0}}e&&(r=r.interactive),mt(E,"addEle"),mt(C,"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()?C(u)||c(u):o(u)||c(u)||c(u,"source")||c(u,"target")}return w},getAllInBox:function(e,t,r,n){for(var i=this.getCachedZSortedEles().interactive,a=[],s=Math.min(e,r),o=Math.max(e,r),l=Math.min(t,n),c=Math.max(t,n),h=pEe({x1:e=s,y1:t=l,x2:r=o,y2:n=c}),u=0;u<i.length;u++){var d=i[u];if(d.isNode()){var p=d,g=p.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});kEe(h,g)&&!CEe(g,h)&&a.push(p)}else if((null==(d=(p=(g=d)._private).rscratch).startX||null==d.startY||TEe(h,d.startX,d.startY))&&(null==d.endX||null==d.endY||TEe(h,d.endX,d.endY)))if("bezier"===d.edgeType||"multibezier"===d.edgeType||"self"===d.edgeType||"compound"===d.edgeType||"segments"===d.edgeType||"haystack"===d.edgeType){for(var f=p.rstyle.bezierPts||p.rstyle.linePts||p.rstyle.haystackPts,m=!0,y=0;y<f.length;y++)if(!EEe(h,f[y])){m=!1;break}m&&a.push(g)}else"haystack"!==d.edgeType&&"straight"!==d.edgeType||a.push(g)}return a}},(G9e={calculateArrowAngles:function(e){var t,r,n,i,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,x="compound"===e.edgeType,b="self"===e.edgeType,w=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,T=e.midY,n=v?(r=d-e.segpts[0],g-e.segpts[1]):y||x||b||m?(p=e.allpts,r=d-cEe(p[0],p[2],p[4],.1),g-cEe(p[1],p[3],p[5],.1)):(r=d-k,g-T),e.srcArrowAngle=nEe(r,n),e.midX),T=e.midY;f&&(k=(d+t)/2,T=(g+w)/2),r=t-d,n=w-g,v?n=(p=e.allpts).length/2%2==0?(i=(u=p.length/2)-2,r=p[u]-p[i],p[u+1]-p[i+1]):e.isRound?(r=e.midVector[1],-e.midVector[0]):(i=(u=p.length/2-1)-2,r=p[u]-p[i],p[u+1]-p[i+1]):(y||x||b)&&(p=e.allpts,f=e.ctrlpts.length/2%2==0?(h=2+(l=2+(c=p.length/2-1)),a=cEe(p[c],p[l],p[h],0),s=cEe(p[c+1],p[l+1],p[h+1],0),o=cEe(p[c],p[l],p[h],1e-4),cEe(p[c+1],p[l+1],p[h+1],1e-4)):(h=2+(l=p.length/2-1),a=cEe(p[c=l-2],p[l],p[h],.4999),s=cEe(p[c+1],p[l+1],p[h+1],.4999),o=cEe(p[c],p[l],p[h],.5),cEe(p[c+1],p[l+1],p[h+1],.5)),r=o-a,n=f-s),e.midtgtArrowAngle=nEe(r,n),e.midDispX=r,e.midDispY=n,r*=-1,n*=-1,v&&(p=e.allpts).length/2%2!=0&&!e.isRound&&(r=-(p[d=2+(u=p.length/2-1)]-p[u]),n=-(p[d+1]-p[u+1])),e.midsrcArrowAngle=nEe(r,n),n=v?(r=t-e.segpts[e.segpts.length-2],w-e.segpts[e.segpts.length-1]):y||x||b||m?(g=(p=e.allpts).length,r=t-cEe(p[g-6],p[g-4],p[g-2],.9),w-cEe(p[g-5],p[g-3],p[g-1],.9)):(r=t-k,w-T),e.tgtArrowAngle=nEe(r,n)}}).getArrowWidth=G9e.getArrowHeight=function(e,t){var r,n=this.arrowWidthCache=this.arrowWidthCache||{};return n[e+", "+t]||(r=Math.max(Math.pow(13.37*e,.9),29)*t,n[e+", "+t]=r)},JAe={},e9e={},p9e=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"),g9e=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"),f9e=mt(function(e,t,r,n,i){e!==d9e?p9e(t,e,JAe):g9e(e9e,JAe),p9e(t,r,e9e),o9e=JAe.nx*e9e.ny-JAe.ny*e9e.nx,n9e=JAe.nx*e9e.nx-JAe.ny*-e9e.ny,o9e=Math.asin(Math.max(-1,Math.min(1,o9e))),Math.abs(o9e)<1e-6?(ZAe=t.x,QAe=t.y,i9e=s9e=0):(r9e=!(t9e=1),n9e<0?o9e<0?o9e=Math.PI+o9e:(o9e=Math.PI-o9e,t9e=-1,r9e=!0):0<o9e&&(t9e=-1,r9e=!0),s9e=void 0!==t.radius?t.radius:n,n9e=o9e/2,o9e=Math.min(JAe.len/2,e9e.len/2),i9e=i?(a9e=Math.abs(Math.cos(n9e)*s9e/Math.sin(n9e)),o9e<a9e?(a9e=o9e,Math.abs(a9e*Math.sin(n9e)/Math.cos(n9e))):s9e):(a9e=Math.min(o9e,s9e),Math.abs(a9e*Math.sin(n9e)/Math.cos(n9e))),h9e=t.x+e9e.nx*a9e,u9e=t.y+e9e.ny*a9e,ZAe=h9e-e9e.ny*i9e*t9e,QAe=u9e+e9e.nx*i9e*t9e,l9e=t.x+JAe.nx*a9e,c9e=t.y+JAe.ny*a9e,d9e=t)},"calcCornerArc"),mt($ke,"drawPreparedRoundCorner"),mt(Fke,"getRoundCorner"),U9e={findMidptPtsEtc:function(e,t){var r,n,i,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,n){return n-=t,t=r-e,{x:-n/(r=Math.sqrt(t*t+n*n)),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=(n=Uwe(this.manualEndptToPx(e.source()[0],u),2))[0],y1:n=n[1],x2:i=(a=Uwe(this.manualEndptToPx(e.target()[0],d),2))[0],y2:a=a[1]},h=g(r,n,i,a),s):(E8e("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],n=(a=r._private).rscratch,i=(n.haystack||(i=2*Math.random()*Math.PI,n.source={x:Math.cos(i),y:Math.sin(i)},i=2*Math.random()*Math.PI,n.target={x:Math.cos(i),y:Math.sin(i)}),a.source),a=a.target,s=i.position(),o=a.position(),l=i.width(),c=a.width(),h=i.height(),a=a.height(),u=r.pstyle("haystack-radius").value/2;n.haystackPts=n.allpts=[n.source.x*l*u+s.x,n.source.y*h*u+s.y,n.target.x*c*u+o.x,n.target.y*a*u+o.y],n.midX=(n.allpts[0]+n.allpts[2])/2,n.midY=(n.allpts[1]+n.allpts[3])/2,n.edgeType="haystack",n.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},findSegmentsPoints:function(e,t){var r=e._private.rscratch,n=e.pstyle("segment-weights"),i=e.pstyle("segment-distances"),a=e.pstyle("segment-radii"),s=e.pstyle("radius-type"),o=Math.min(n.pfValue.length,i.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=n.pfValue[h],d=i.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,n){var i=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;i.edgeType="self",n&&(r=0,e=s),s=(n=o-Math.PI/2)-l/2,n+=l/2,r=void 0===a[o=o+"_"+l]?a[o]=0:++a[o],i.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(n)*e*(r/3+1),t.y+1.4*Math.sin(n)*e*(r/3+1)]},findCompoundLoopPoints:function(e,t,r,n){var i=e._private.rscratch,a=(i.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,n=(n&&(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(n.x,e.x),y:Math.min(n.y,e.y)},l=Math.max(.5,Math.log(.01*o)),s=Math.max(.5,Math.log(.01*c));i.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,n,i){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=n;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<c;p++){var g=(.5-t.eles.length/2+r)*s*(i?-1:1),f=aEe(g),f=(d&&(h=o?o.pfValue[p]:s,u=l.value[p]),void 0!==(m=n?h:void 0!==h?f*h:void 0)?m:g),m=1-u,g=u,y=this.findMidptPtsEtc(e,t),v=y.midptPts,x=v.x1*m+v.x2*g;a.ctrlpts.push(x+(y=y.vectorNormInverse).x*f,v.y1*m+v.y2*g+y.y*f)}},findTaxiPoints:function(e,t){var r=e._private.rscratch,n=(r.edgeType="segments","vertical"),i="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,x=a.y2-a.y1,m=(b=mt(function(e,t){return 0<e?Math.max(e-t,0):Math.min(e+t,0)},"subDWH"))(v,m),b=b(x,y),y=!1,w=("auto"===u?h=Math.abs(m)>Math.abs(b)?i:n:"upward"===u||"downward"===u?(h=n,y=!0):"leftward"!==u&&"rightward"!==u||(h=i,y=!0),(i=h===n)?b:m),n=aEe(h=i?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0<h||"leftward"===u&&0<h||"rightward"===u&&h<0)||(w=(n*=-1)*Math.abs(w),b=!0),m=p?(d<0?1+d:d)*w:(d<0?w:0)+d*n,g=(y=mt(function(e){return Math.abs(e)<f||Math.abs(e)>=Math.abs(w)},"getIsTooClose"))(m),u=y(Math.abs(w)-Math.abs(m)),!g&&!u||b?i?(h=a.y1+m+(c?o/2*n:0),x=a.x1,t=a.x2,r.segpts=[x,h,t,h]):(p=a.x1+m+(c?s/2*n:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):i?(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?(b=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,b,l,b]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(x)<=t/2,p?(y=(a.y1+a.y2)/2,u=a.x1,d=a.x2,r.segpts=[u,y,d,y]):g?(v=(a.x1+a.x2)/2,l=a.y1,b=a.y2,r.segpts=[v,l,v,b]):r.segpts=[a.x2,a.y1]),r.isRound&&(y=e.pstyle("taxi-radius").value,g="arc-radius"===e.pstyle("radius-type").value[0],r.radii=new Array(r.segpts.length/2).fill(y),r.isArcRadius=new Array(r.segpts.length/2).fill(g))},tryToCorrectInvalidPoints:function(e,t){var r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k,T,E=e._private.rscratch;"bezier"===E.edgeType&&(m=t.srcPos,r=t.tgtPos,n=t.srcW,i=t.srcH,a=t.tgtW,s=t.tgtH,T=t.srcShape,o=t.tgtShape,v=t.srcCornerRadius,l=t.tgtCornerRadius,x=t.srcRs,t=t.tgtRs,y=!ae(E.startX)||!ae(E.startY),f=!ae(E.arrowStartX)||!ae(E.arrowStartY),c=!ae(E.endX)||!ae(E.endY),h=!ae(E.arrowEndX)||!ae(E.arrowEndY),u=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=sEe({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))<u,p=(d=sEe({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.endX,y:E.endY}))<u,g=!1,(y||f||b)&&(g=!0,y=E.ctrlpts[0]-m.x,f=E.ctrlpts[1]-m.y,k=y/(y=Math.sqrt(y*y+f*f)),f/=y,y=Math.max(n,i),y={x:E.ctrlpts[0]+2*k*y,y:E.ctrlpts[1]+2*f*y},T=T.intersectLine(m.x,m.y,n,i,y.x,y.y,0,v,x),b?(E.ctrlpts[0]=E.ctrlpts[0]+k*(u-w),E.ctrlpts[1]=E.ctrlpts[1]+f*(u-w)):(E.ctrlpts[0]=T[0]+k*u,E.ctrlpts[1]=T[1]+f*u)),(c||h||p)&&(g=!0,m=E.ctrlpts[0]-r.x,y=E.ctrlpts[1]-r.y,x=m/(v=Math.sqrt(m*m+y*y)),b=y/v,w=Math.max(n,i),k={x:E.ctrlpts[0]+2*x*w,y:E.ctrlpts[1]+2*b*w},T=o.intersectLine(r.x,r.y,a,s,k.x,k.y,0,l,t),p?(E.ctrlpts[0]=E.ctrlpts[0]+x*(u-d),E.ctrlpts[1]=E.ctrlpts[1]+b*(u-d)):(E.ctrlpts[0]=T[0]+x*u,E.ctrlpts[1]=T[1]+b*u)),g)&&this.findEndpoints(e)},storeAllpts:function(e){var t,r,n=e._private.rscratch;if("multibezier"===n.edgeType||"bezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType){n.allpts=[],n.allpts.push(n.startX,n.startY);for(var i,a=0;a+1<n.ctrlpts.length;a+=2)n.allpts.push(n.ctrlpts[a],n.ctrlpts[a+1]),a+3<n.ctrlpts.length&&n.allpts.push((n.ctrlpts[a]+n.ctrlpts[a+2])/2,(n.ctrlpts[a+1]+n.ctrlpts[a+3])/2);n.allpts.push(n.endX,n.endY),n.ctrlpts.length/2%2==0?(i=n.allpts.length/2-1,n.midX=n.allpts[i],n.midY=n.allpts[i+1]):(i=n.allpts.length/2-3,n.midX=cEe(n.allpts[i],n.allpts[i+2],n.allpts[i+4],.5),n.midY=cEe(n.allpts[i+1],n.allpts[i+3],n.allpts[i+5],.5))}else if("straight"===n.edgeType)n.allpts=[n.startX,n.startY,n.endX,n.endY],n.midX=(n.startX+n.endX+n.arrowStartX+n.arrowEndX)/4,n.midY=(n.startY+n.endY+n.arrowStartY+n.arrowEndY)/4;else if("segments"===n.edgeType){if(n.allpts=[],n.allpts.push(n.startX,n.startY),n.allpts.push.apply(n.allpts,n.segpts),n.allpts.push(n.endX,n.endY),n.isRound){n.roundCorners=[];for(var s=2;s+3<n.allpts.length;s+=2){var o=n.radii[s/2-1],l=n.isArcRadius[s/2-1];n.roundCorners.push(Fke({x:n.allpts[s-2],y:n.allpts[s-1]},{x:n.allpts[s],y:n.allpts[s+1],radius:o},{x:n.allpts[s+2],y:n.allpts[s+3]},o,l))}}n.segpts.length%4==0?(e=n.segpts.length/2,n.midX=(n.segpts[i=e-2]+n.segpts[e])/2,n.midY=(n.segpts[1+i]+n.segpts[1+e])/2):(i=n.segpts.length/2-1,n.isRound?(e=n.segpts[i],r=n.segpts[1+i],r=[e-(e=n.roundCorners[i/2]).cx,r-e.cy],t=e.radius/Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2)),r=r.map(function(e){return e*t}),n.midX=e.cx+r[0],n.midY=e.cy+r[1],n.midVector=r):(n.midX=n.segpts[i],n.midY=n.segpts[1+i]))}},checkForInvalidEdgeWarning:function(e){var t=e[0]._private.rscratch;t.nodesOverlap||ae(t.startX)&&ae(t.startY)&&ae(t.endX)&&ae(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,E8e("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 M=this;if(e&&0!==e.length){for(var D=this,O=D.cy.hasCompoundNodes(),P={map:new B8e,get:mt(function(e){var t=this.map.get(e[0]);return null!=t?t.get(e[1]):null},"get"),set:mt(function(e,t){var r=this.map.get(e[0]);null==r&&(r=new B8e,this.map.set(e[0],r)),r.set(e[1],t)},"set")},B=[],t=[],r=0;r<e.length;r++){var n,i,a=e[r],s=a._private,o=a.pstyle("curve-style").value;!a.removed()&&a.takesUpSpace()&&("haystack"===o?t.push(a):(n="unbundled-bezier"===o||o.endsWith("segments")||"straight"===o||"straight-triangle"===o||o.endsWith("taxi"),o="unbundled-bezier"===o||"bezier"===o,i=s.source,s=s.target,i=[i.poolIndex(),s.poolIndex()].sort(),null==(s=P.get(i))&&(P.set(i,s={eles:[]}),B.push(i)),s.eles.push(a),n&&(s.hasUnbundled=!0),o&&(s.hasBezier=!0)))}for(var l=mt(function(e){var t=P.get(B[e]),r=void 0,n=(t.hasUnbundled||(e=t.eles[0].parallelEdges().filter(function(e){return e.isBundledBezier()}),M8e(t.eles),e.forEach(function(e){return t.eles.push(e)}),t.eles.sort(function(e,t){return e.poolIndex()-t.poolIndex()})),(e=t.eles[0]).source()),i=e.target(),a=(n.poolIndex()>i.poolIndex()&&(e=n,n=i,i=e),t.srcPos=n.position()),s=t.tgtPos=i.position(),o=t.srcW=n.outerWidth(),l=t.srcH=n.outerHeight(),c=t.tgtW=i.outerWidth(),h=t.tgtH=i.outerHeight(),u=t.srcShape=D.nodeShapes[M.getNodeShape(n)],d=t.tgtShape=D.nodeShapes[M.getNodeShape(i)],p=t.srcCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,g=t.tgtCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,f=t.tgtRs=i._private.rscratch,m=t.srcRs=n._private.rscratch;t.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y<t.eles.length;y++){var v,x,b,w,k,T,E,C,S,_=t.eles[y],A=_[0]._private.rscratch,L=_.pstyle("curve-style").value,N="unbundled-bezier"===L||L.endsWith("segments")||L.endsWith("taxi"),I=!n.same(_.source()),R=(t.calculatedIntersection||n===i||!t.hasBezier&&!t.hasUnbundled||(t.calculatedIntersection=!0,v=u.intersectLine(a.x,a.y,o,l,s.x,s.y,0,p,m),x=t.srcIntn=v,b=d.intersectLine(s.x,s.y,c,h,a.x,a.y,0,g,f),w=t.tgtIntn=b,k=t.intersectionPts={x1:v[0],x2:b[0],y1:v[1],y2:b[1]},T=t.posPts={x1:a.x,x2:s.x,y1:a.y,y2:s.y},C=b[1]-v[1],E=b[0]-v[0],R=Math.sqrt(E*E+C*C),E=t.vector={x:E,y:C},S={x:-(C=t.vectorNorm={x:E.x/R,y:E.y/R}).y,y:C.x},t.nodesOverlap=!ae(R)||d.checkPoint(v[0],v[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),t.vectorNormInverse=S,r={nodesOverlap:t.nodesOverlap,dirCounts:t.dirCounts,calculatedIntersection:!0,hasBezier:t.hasBezier,hasUnbundled:t.hasUnbundled,eles:t.eles,srcPos:s,srcRs:f,tgtPos:a,tgtRs:m,srcW:c,srcH:h,tgtW:o,tgtH:l,srcIntn:w,tgtIntn:x,srcShape:d,tgtShape:u,posPts:{x1:T.x2,y1:T.y2,x2:T.x1,y2:T.y1},intersectionPts:{x1:k.x2,y1:k.y2,x2:k.x1,y2:k.y1},vector:{x:-E.x,y:-E.y},vectorNorm:{x:-C.x,y:-C.y},vectorNormInverse:{x:-S.x,y:-S.y}}),I?r:t);A.nodesOverlap=R.nodesOverlap,A.srcIntn=R.srcIntn,A.tgtIntn=R.tgtIntn,A.isRound=L.startsWith("round"),O&&(n.isParent()||n.isChild()||i.isParent()||i.isChild())&&(n.parents().anySame(i)||i.parents().anySame(n)||n.same(i)&&n.isParent())?M.findCompoundLoopPoints(_,R,y,N):n===i?M.findLoopPoints(_,R,y,N):L.endsWith("segments")?M.findSegmentsPoints(_,R):L.endsWith("taxi")?M.findTaxiPoints(_,R):"straight"===L||!N&&t.eles.length%2==1&&y===Math.floor(t.eles.length/2)?M.findStraightEdgePoints(_):M.findBezierPoints(_,R,y,N,I),M.findEndpoints(_),M.tryToCorrectInvalidPoints(_,R),M.checkForInvalidEdgeWarning(_),M.storeAllpts(_),M.storeEdgeProjections(_),M.calculateArrowAngles(_),M.recalculateEdgeLabelProjections(_),M.calculateLabelAngles(_)}},"_loop"),c=0;c<B.length;c++)l(c);this.findHaystackPoints(t)}}},mt(zke,"getPts"),U9e.getSegmentPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),"segments"===t.edgeType)return zke(t.segpts)},U9e.getControlPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),"bezier"===(e=t.edgeType)||"multibezier"===e||"self"===e||"compound"===e)return zke(t.ctrlpts)},U9e.getEdgeMidpoint=function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),{x:t.midX,y:t.midY}},q9e={manualEndptToPx:function(e,t){var r,n=e.position(),i=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]*i),"%"===t.units[1]&&(r[1]=r[1]*a),r[0]+=n.x,r[1]+=n.y,r):(r=t.pfValue[0],r=-Math.PI/2+r,t=2*Math.max(i,a),r=[n.x+Math.cos(r)*t,n.y+Math.sin(r)*t],this.nodeShapes[this.getNodeShape(e)].intersectLine(n.x,n.y,i,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,n,i,a=e.source()[0],s=e.target()[0],o=a.position(),l=s.position(),c=e.pstyle("target-arrow-shape").value,h=e.pstyle("source-arrow-shape").value,u=e.pstyle("target-distance-from-node").pfValue,d=e.pstyle("source-distance-from-node").pfValue,p=a._private.rscratch,g=s._private.rscratch,f=e.pstyle("curve-style").value,m=e._private.rscratch,y="self"===(w=m.edgeType)||"compound"===w,v="bezier"===w||"multibezier"===w||y,x="bezier"!==w,b="straight"===w||"segments"===w,w="segments"===w,k=v||x||b,y=y||"taxi"===f,f=e.pstyle("source-endpoint"),T=y?"outside-to-node":f.value,E="auto"===a.pstyle("corner-radius").value?"auto":a.pstyle("corner-radius").pfValue,C=e.pstyle("target-endpoint"),y=y?"outside-to-node":C.value,S="auto"===s.pstyle("corner-radius").value?"auto":s.pstyle("corner-radius").pfValue,_=(m.srcManEndpt=f,m.tgtManEndpt=C,v?(v=[m.ctrlpts[0],m.ctrlpts[1]],i=x?[m.ctrlpts[m.ctrlpts.length-2],m.ctrlpts[m.ctrlpts.length-1]]:v,n=v):b&&(x=w?m.segpts.slice(0,2):[l.x,l.y],i=w?m.segpts.slice(m.segpts.length-2):[o.x,o.y],n=x),"inside-to-node"===y?t=[l.x,l.y]:C.units?t=this.manualEndptToPx(s,C):"outside-to-line"===y?t=m.tgtIntn:("outside-to-node"===y||"outside-to-node-or-label"===y?_=i:"outside-to-line"!==y&&"outside-to-line-or-label"!==y||(_=[o.x,o.y]),t=this.nodeShapes[this.getNodeShape(s)].intersectLine(l.x,l.y,s.outerWidth(),s.outerHeight(),_[0],_[1],0,S,g),"outside-to-node-or-label"!==y&&"outside-to-line-or-label"!==y||(b=(v=s._private.rscratch).labelWidth,w=v.labelX,x=v.labelY,C=b/2,S=v.labelHeight/2,"top"===(g=s.pstyle("text-valign").value)?x-=S:"bottom"===g&&(x+=S),"left"===(y=s.pstyle("text-halign").value)?w-=C:"right"===y&&(w+=C),0<(b=qEe(_[0],_[1],[w-C,x-S,w+C,x-S,w+C,x+S,w-C,x+S],l.x,l.y)).length&&(g=oEe(v=o,Z8e(t)),(s=oEe(v,Z8e(b)))<(y=g)&&(t=b,y=s),2<b.length)&&oEe(v,{x:b[2],y:b[3]})<y&&(t=[b[2],b[3]]))),WEe(t,i,this.arrowShapes[c].spacing(e)+u)),w=WEe(t,i,this.arrowShapes[c].gap(e)+u),f=(m.endX=w[0],m.endY=w[1],m.arrowEndX=_[0],m.arrowEndY=_[1],"inside-to-node"===T?t=[o.x,o.y]:f.units?t=this.manualEndptToPx(a,f):"outside-to-line"===T?t=m.srcIntn:("outside-to-node"===T||"outside-to-node-or-label"===T?r=n:"outside-to-line"!==T&&"outside-to-line-or-label"!==T||(r=[l.x,l.y]),t=this.nodeShapes[this.getNodeShape(a)].intersectLine(o.x,o.y,a.outerWidth(),a.outerHeight(),r[0],r[1],0,E,p),"outside-to-node-or-label"!==T&&"outside-to-line-or-label"!==T||(x=(C=a._private.rscratch).labelWidth,S=C.labelX,g=C.labelY,s=x/2,v=C.labelHeight/2,"top"===(y=a.pstyle("text-valign").value)?g-=v:"bottom"===y&&(g+=v),"left"===(b=a.pstyle("text-halign").value)?S-=s:"right"===b&&(S+=s),0<(i=qEe(r[0],r[1],[S-s,g-v,S+s,g-v,S+s,g+v,S-s,g+v],o.x,o.y)).length&&(u=oEe(c=l,Z8e(t)),(w=oEe(c,Z8e(i)))<(_=u)&&(t=[i[0],i[1]],_=w),2<i.length)&&oEe(c,{x:i[2],y:i[3]})<_&&(t=[i[2],i[3]]))),WEe(t,n,this.arrowShapes[h].spacing(e)+d)),E=WEe(t,n,this.arrowShapes[h].gap(e)+d);m.startX=E[0],m.startY=E[1],m.arrowStartX=f[0],m.arrowStartY=f[1],k&&(ae(m.startX)&&ae(m.startY)&&ae(m.endX)&&ae(m.endY)?m.badLine=!1:m.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]}}},j9e={},mt(Gke,"pushBezierPts"),j9e.storeEdgeProjections=function(e){var t=e._private,r=t.rscratch,n=r.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===n||"bezier"===n||"self"===n||"compound"===n){t.rstyle.bezierPts=[];for(var i=0;i+5<r.allpts.length;i+=4)Gke(this,e,r.allpts.slice(i,i+6))}else if("segments"===n)for(var a=t.rstyle.linePts=[],i=0;i+1<r.allpts.length;i+=2)a.push({x:r.allpts[i],y:r.allpts[i+1]});else"haystack"===n&&(n=r.haystackPts,t.rstyle.haystackPts=[{x:n[0],y:n[1]},{x:n[2],y:n[3]}]);t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},j9e.recalculateEdgeProjections=function(e){this.findEdgeControlPoints(e)},W9e={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!i7e(t)){var r,n,t=e._private,i=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-i/2-s;break;case"right":r=o.x+i/2+s;break;default:r=o.x}switch(c){case"top":n=o.y-a/2-s;break;case"bottom":n=o.y+a/2+s;break;default:n=o.y}h.labelX=r,h.labelY=n,t.labelX=r,t.labelY=n,this.calculateLabelAngles(e),this.applyLabelDimensions(e)}}},m9e=mt(function(e,t){return t=Math.atan(t/e),0===e&&t<0&&(t*=-1),t},"lineAngleFromDelta"),y9e=mt(function(e,t){var r=t.x-e.x;return m9e(r,t.y-e.y)},"lineAngle"),v9e=mt(function(e,t,r,n){var i=dEe(0,n-.001,1),n=dEe(0,n+.001,1),i=hEe(e,t,r,i),e=hEe(e,t,r,n);return y9e(i,e)},"bezierAngle"),W9e.recalculateEdgeLabelProjections=function(E){var C,S,_,e,p=E._private,A=p.rscratch,g=this,L={mid:E.pstyle("label").strValue,source:E.pstyle("source-label").strValue,target:E.pstyle("target-label").strValue};(L.mid||L.source||L.target)&&(C={x:A.midX,y:A.midY},(S=mt(function(e,t,r){P8e(p.rscratch,e,t,r),P8e(p.rstyle,e,t,r)},"setRs"))("labelX",null,C.x),S("labelY",null,C.y),e=m9e(A.midDispX,A.midDispY),S("labelAutoAngle",null,e),_=mt(function e(){if(e.cache)return e.cache;for(var t=[],r=0;r+5<A.allpts.length;r+=4){var n={x:A.allpts[r],y:A.allpts[r+1]},i={x:A.allpts[r+2],y:A.allpts[r+3]},a={x:A.allpts[r+4],y:A.allpts[r+5]};t.push({p0:n,p1:i,p2:a,startDist:0,length:0,segments:[]})}var s=p.rstyle.bezierPts,o=g.bezierProjPcts.length;function l(e,t,r,n,i){var a=sEe(t,r),s=e.segments[e.segments.length-1],t={p0:t,p1:r,t0:n,t1:i,startDist:s?s.startDist+s.length:0,length:a};e.segments.push(t),e.length+=a}mt(l,"addSegment");for(var c=0;c<t.length;c++){var h=t[c],u=t[c-1];u&&(h.startDist=u.startDist+u.length),l(h,h.p0,s[c*o],0,g.bezierProjPcts[0]);for(var d=0;d<o-1;d++)l(h,s[c*o+d],s[c*o+d+1],g.bezierProjPcts[d],g.bezierProjPcts[d+1]);l(h,s[c*o+o-1],h.p2,g.bezierProjPcts[o-1],1)}return e.cache=t},"createControlPointInfo"),(e=mt(function(e){var t,r="source"===e;if(L[e]){var n=E.pstyle(e+"-text-offset").pfValue;switch(A.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var i,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(n<=(o+=u.length)||d){i={cp:c,segment:u};break}}if(i)break}var p=i.cp,g=(n-s)/(m=i.segment).length,f=m.t1-m.t0,m=r?m.t0+f*g:m.t1-f*g,m=dEe(0,m,1);C=hEe(p.p0,p.p1,p.p2,m),t=v9e(p.p0,p.p1,p.p2,m);break;case"straight":case"segments":case"haystack":for(var y,v,x,b,w=0,k=A.allpts.length,T=0;T+3<k&&(b=r?(x={x:A.allpts[T],y:A.allpts[T+1]},{x:A.allpts[T+2],y:A.allpts[T+3]}):(x={x:A.allpts[k-2-T],y:A.allpts[k-1-T]},{x:A.allpts[k-4-T],y:A.allpts[k-3-T]}),v=w,!(n<=(w+=y=sEe(x,b))));T+=2);f=dEe(0,(n-v)/y,1),C=uEe(x,b,f),t=y9e(x,b)}S("labelX",e,C.x),S("labelY",e,C.y),S("labelAutoAngle",e,t)}},"calculateEndProjection"))("source"),e("target"),this.applyLabelDimensions(E))},W9e.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},W9e.applyPrefixedLabelDimensions=function(e,t){var r=e._private,n=this.getLabelText(e,t),n=this.calculateLabelDimensions(e,n),i=e.pstyle("line-height").pfValue,e=e.pstyle("text-wrap").strValue,a=O8e(r.rscratch,"labelWrapCachedLines",t)||[],e="wrap"!==e?1:Math.max(a.length,1),s=(a=n.height/e)*i,o=n.width,n=n.height+(e-1)*(i-1)*a;P8e(r.rstyle,"labelWidth",t,o),P8e(r.rscratch,"labelWidth",t,o),P8e(r.rstyle,"labelHeight",t,n),P8e(r.rscratch,"labelHeight",t,n),P8e(r.rscratch,"labelLineHeight",t,s)},W9e.getLabelText=function(e,r){var n=e._private,t=e.pstyle((r?r+"-":"")+"label").strValue,i=e.pstyle("text-transform").value,a=mt(function(e,t){return t?(P8e(n.rscratch,e,r,t),t):O8e(n.rscratch,e,r)},"rscratch");if(!t)return"";if("none"!=i&&("uppercase"==i?t=t.toUpperCase():"lowercase"==i&&(t=t.toLowerCase())),"wrap"===(i=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=Qwe(p.matchAll(u));try{for(v.s();!(f=v.n()).done;){var x=f.value,b=x[0],w=p.substring(y,x.index),y=x.index+b.length,k=0===m.length?w:m+w+b;this.calculateLabelDimensions(e,k).width<=l?m+=w+b:(m&&h.push(m),m=w+b)}}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"===i){var T=e.pstyle("text-max-width").pfValue,E="",C=!1;if(this.calculateLabelDimensions(e,t).width<T)return t;for(var S=0;S<t.length&&!(T<this.calculateLabelDimensions(e,E+t[S]+"…").width);S++)E+=t[S],S===t.length-1&&(C=!0);return C||(E+="…"),E}return t},W9e.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"}},W9e.calculateLabelDimensions=function(e,t){var r=this.cy.window().document,n=u8e(t,e._private.labelDimsKey),i=this.labelDimCache||(this.labelDimCache=[]);if(null!=(a=i[n]))return a;var a=e.pstyle("font-style").strValue,s=e.pstyle("font-size").pfValue,o=e.pstyle("font-family").strValue,e=e.pstyle("font-weight").strValue,l=this.labelCalcCanvas,c=this.labelCalcCanvasContext;l||(l=this.labelCalcCanvas=r.createElement("canvas"),c=this.labelCalcCanvasContext=l.getContext("2d"),(r=l.style).position="absolute",r.left="-9999px",r.top="-9999px",r.zIndex="-1",r.visibility="hidden",r.pointerEvents="none"),c.font="".concat(a," ").concat(e," ").concat(s,"px ").concat(o);for(var h=0,u=0,d=t.split(`
|
||
`),p=0;p<d.length;p++){var g=d[p],g=c.measureText(g),g=Math.ceil(g.width),f=s,h=Math.max(g,h);u+=f}return i[n]={width:h+=0,height:u+=0}},W9e.calculateLabelAngle=function(e,t){var r=e._private.rscratch,n=e.isEdge();return"none"===(t=(e=e.pstyle((t?t+"-":"")+"text-rotation")).strValue)?0:n&&"autorotate"===t?r.labelAutoAngle:"autorotate"===t?0:e.pfValue},x9e=!(W9e.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"))}),b9e={},[z9e,G9e,U9e,q9e,j9e,W9e,{getNodeShape:function(e){var t=e.pstyle("shape").value;return"cutrectangle"===t&&(e.width()<28||e.height()<28)?(x9e||(E8e("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),x9e=!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 n=e[r]._private.rstyle;n.clean=!1,n.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 n=o[r],i=n._private.rstyle;n.isNode()&&!i.cleanConnected&&(c(n.connectedEdges()),i.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"),n=[],i=[];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),t&&l.clean||s.removed()||"none"===s.pstyle("display").value||(("nodes"===o.group?i:n).push(s),l.clean=!0)}for(var c=0;c<i.length;c++){var h=i[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(n);for(var p=0;p<n.length;p++){var g=n[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 n=(i=e[r])._private.rscratch;(i.grabbed()&&!i.isParent()?t:n.inDragLayer?e.drag:e.nondrag).push(i)}for(r=0;r<t.length;r++){var i=t[r];e.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){var t;return e||!this.cachedZSortedEles?((t=this.cy.mutableElements().toArray()).sort(rAe),t.interactive=t.filter(function(e){return e.interactive()}),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()):t=this.cachedZSortedEles,t}}].forEach(function(e){y7e(b9e,e)}),nLe={getCachedImage:function(e,t,r){var n,i=this.imageCache=this.imageCache||{},a=i[e];return a?(a.image.complete||a.image.addEventListener("load",r),a.image):((n=(a=i[e]=i[e]||{}).image=new Image).addEventListener("load",r),n.addEventListener("error",function(){n.error=!0}),"data:"!==e.substring(0,"data:".length).toLowerCase()&&(n.crossOrigin=t="null"===t?null:t),n.src=e,n)}},hLe={registerBinding:function(e,t,r,n){var i=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,i)))}return a}return(o=this.binder(e)).on.apply(o,i)},binder:function(i){var a=this,e=a.cy.window(),s=i===e||i===e.document||i===e.document.body||a7e(i);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 n=Array.prototype.slice.call(arguments);return s&&a.supportsPassiveEvents&&(n[2]={capture:r??!1,passive:!1,once:!1}),a.bindings.push({target:i,args:n}),(i.addEventListener||i.on).apply(i,n),this},"on"),addEventListener:e,addListener:e,bind:e}},nodeIsDraggable:function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},nodeIsGrabbable:function(e){return this.nodeIsDraggable(e)&&e.interactive()},load:function(){var c,h,u,N=this,e=N.cy.window(),d=mt(function(e){return e.selected()},"isSelected"),w=mt(function(e){if((e=e.getRootNode())&&11===e.nodeType&&void 0!==e.host)return e},"getShadowRoot"),I=mt(function(e,t,r,n){null==e&&(e=N.cy);for(var i=0;i<t.length;i++)e.emit({originalEvent:r,type:t[i],position:n})},"triggerEvents"),v=mt(function(e){return e.shiftKey||e.metaKey||e.ctrlKey},"isMultSelKeyDown"),R=mt(function(e,t){var r=!0;if(N.cy.hasCompoundNodes()&&e&&e.pannable()){for(var n=0;t&&n<t.length;n++)if((e=t[n]).isNode()&&e.isParent()&&!e.pannable()){r=!1;break}}else r=!0;return r},"allowPanningPassthrough"),k=mt(function(e){e[0]._private.grabbed=!0},"setGrabbed"),T=mt(function(e){e[0]._private.grabbed=!1},"setFreed"),n=mt(function(e){e[0]._private.rscratch.inDragLayer=!0},"setInDragLayer"),E=mt(function(e){e[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),C=mt(function(e){e[0]._private.rscratch.isGrabTarget=!0},"setGrabTarget"),S=mt(function(e){e[0]._private.rscratch.isGrabTarget=!1},"removeGrabTarget"),i=mt(function(e,t){(t=t.addToList).has(e)||!e.grabbable()||e.locked()||(t.merge(e),k(e))},"addToDragList"),_=mt(function(e,t){!e.cy().hasCompoundNodes()||null==t.inDragLayer&&null==t.addToList||(e=e.descendants(),t.inDragLayer&&(e.forEach(n),e.connectedEdges().forEach(n)),t.addToList&&i(e,t))},"addDescendantsToDrag"),M=mt(function(e,t){t=t||{};var r=e.cy().hasCompoundNodes();t.inDragLayer&&(e.forEach(n),e.neighborhood().stdFilter(function(e){return!r||e.isEdge()}).forEach(n)),t.addToList&&e.forEach(function(e){i(e,t)}),_(e,t),L(e,{inDragLayer:t.inDragLayer}),N.updateCachedGrabbedEles()},"addNodesToDrag"),A=M,D=mt(function(e){e&&(N.getCachedZSortedEles().forEach(function(e){T(e),E(e),S(e)}),N.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(n),r.forEach(n)),t.addToList&&r.forEach(function(e){i(e,t)}))},"updateAncestorsInDragLayer"),W=mt(function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},"blurActiveDomElement"),t=typeof MutationObserver<"u",Y=typeof ResizeObserver<"u",r=(t?(N.removeObserver=new MutationObserver(function(e){for(var t=0;t<e.length;t++){var r=e[t].removedNodes;if(r)for(var n=0;n<r.length;n++)if(r[n]===N.container){N.destroy();break}}}),N.container.parentNode&&N.removeObserver.observe(N.container.parentNode,{childList:!0})):N.registerBinding(N.container,"DOMNodeRemoved",function(e){N.destroy()}),Q7e(function(){N.cy.resize()},100)),t=(t&&(N.styleObserver=new MutationObserver(r),N.styleObserver.observe(N.container,{attributes:!0})),N.registerBinding(e,"resize",r),Y&&(N.resizeObserver=new ResizeObserver(r),N.resizeObserver.observe(N.container)),mt(function(e,t){for(;null!=e;)t(e),e=e.parentNode},"forEachUp")),a=mt(function(){N.invalidateContainerClientCoordsCache()},"invalidateCoords"),H=(t(N.container,function(e){N.registerBinding(e,"transitionend",a),N.registerBinding(e,"animationend",a),N.registerBinding(e,"scroll",a)}),N.registerBinding(N.container,"contextmenu",function(e){e.preventDefault()}),mt(function(){return 0!==N.selection[4]},"inBoxSelection")),O=mt(function(e){for(var t=N.findContainerClientCoords(),r=t[0],n=t[1],i=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+i&&n<=c.clientY&&c.clientY<=n+a){o=!0;break}}if(!o)return!1;for(var h=N.container,u=e.target.parentNode,d=!1;u;){if(u===h){d=!0;break}u=u.parentNode}return!!d},"eventInContainer"),Y=(N.registerBinding(N.container,"mousedown",mt(function(t){var e,r,n,i,a,s,o,l,c,h;!O(t)||1===N.hoverData.which&&1!==t.which||(t.preventDefault(),W(),N.hoverData.capture=!0,N.hoverData.which=t.which,e=N.cy,r=N.projectIntoViewport((s=[t.clientX,t.clientY])[0],s[1]),n=N.selection,a=(i=N.findNearestElements(r[0],r[1],!0,!1))[0],c=N.dragData.possibleDragElements,N.hoverData.mdownPos=r,N.hoverData.mdownGPos=s,s=mt(function(){N.hoverData.tapholdCancelled=!1,clearTimeout(N.hoverData.tapholdTimeout),N.hoverData.tapholdTimeout=setTimeout(function(){N.hoverData.tapholdCancelled||(N.hoverData.down||e).emit({originalEvent:t,type:"taphold",position:{x:r[0],y:r[1]}})},N.tapholdDuration)},"checkForTaphold"),3==t.which?(N.hoverData.cxtStarted=!0,l={originalEvent:t,type:"cxttapstart",position:{x:r[0],y:r[1]}},a?(a.activate(),a.emit(l),N.hoverData.down=a):e.emit(l),N.hoverData.downTime=(new Date).getTime(),N.hoverData.cxtDragged=!1):1==t.which&&(a&&a.activate(),null!=a&&N.nodeIsGrabbable(a)&&(o=mt(function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}},"makeEvent"),l=mt(function(e){e.emit(o("grab"))},"triggerGrab"),C(a),a.selected()?(c=N.dragData.possibleDragElements=e.collection(),h=e.$(function(e){return e.isNode()&&e.selected()&&N.nodeIsGrabbable(e)}),M(h,{addToList:c}),a.emit(o("grabon")),h.forEach(l)):(c=N.dragData.possibleDragElements=e.collection(),A(a,{addToList:c}),a.emit(o("grabon")).emit(o("grab"))),N.redrawHint("eles",!0),N.redrawHint("drag",!0)),N.hoverData.down=a,N.hoverData.downs=i,N.hoverData.downTime=(new Date).getTime(),I(a,["mousedown","tapstart","vmousedown"],t,{x:r[0],y:r[1]}),null==a?(n[4]=1,N.data.bgActivePosistion={x:r[0],y:r[1]},N.redrawHint("select",!0),N.redraw()):a.pannable()&&(n[4]=1),s()),n[0]=n[2]=r[0],n[1]=n[3]=r[1])},"mousedownHandler"),!1),w(N.container)),V=(N.registerBinding([e,Y],"mousemove",mt(function(e){if(N.hoverData.capture||O(e)){var t,r,n,i=!1,a=N.cy,s=a.zoom(),o=[e.clientX,e.clientY],l=N.projectIntoViewport(o[0],o[1]),c=N.hoverData.mdownPos,h=N.hoverData.mdownGPos,u=N.selection,d=null,p=(N.hoverData.draggingEles||N.hoverData.dragging||N.hoverData.selecting||(d=N.findNearestElement(l[0],l[1],!0,!1)),N.hoverData.last),g=N.hoverData.down,f=[l[0]-u[2],l[1]-u[3]],m=N.dragData.possibleDragElements,h=(h&&(t=o[0]-h[0],o=o[1]-h[1],N.hoverData.isOverThresholdDrag=t=t*t+o*o>=N.desktopTapThreshold2),v(e)),o=(t&&(N.hoverData.tapholdCancelled=!0),mt(function(){var e=N.hoverData.dragDelta=N.hoverData.dragDelta||[];0===e.length?(e.push(f[0]),e.push(f[1])):(e[0]+=f[0],e[1]+=f[1])},"updateDragDelta")),y=(i=!0,I(d,["mousemove","vmousemove","tapdrag"],e,{x:l[0],y:l[1]}),mt(function(){N.data.bgActivePosistion=void 0,N.hoverData.selecting||a.emit({originalEvent:e,type:"boxstart",position:{x:l[0],y:l[1]}}),u[4]=1,N.hoverData.selecting=!0,N.redrawHint("select",!0),N.redraw()},"goIntoBoxMode"));if(3===N.hoverData.which?t&&(r={originalEvent:e,type:"cxtdrag",position:{x:l[0],y:l[1]}},(g||a).emit(r),N.hoverData.cxtDragged=!0,!N.hoverData.cxtOver||d!==N.hoverData.cxtOver)&&(N.hoverData.cxtOver&&N.hoverData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:l[0],y:l[1]}}),N.hoverData.cxtOver=d)&&d.emit({originalEvent:e,type:"cxtdragover",position:{x:l[0],y:l[1]}}):N.hoverData.dragging?(i=!0,a.panningEnabled()&&a.userPanningEnabled()&&(N.hoverData.justStartedPan?(r=N.hoverData.mdownPos,n={x:(l[0]-r[0])*s,y:(l[1]-r[1])*s},N.hoverData.justStartedPan=!1):n={x:f[0]*s,y:f[1]*s},a.panBy(n),a.emit("dragpan"),N.hoverData.dragged=!0),l=N.projectIntoViewport(e.clientX,e.clientY)):1!=u[4]||null!=g&&!g.pannable()?(g&&g.pannable()&&g.active()&&g.unactivate(),g&&g.grabbed()||d==p||(p&&I(p,["mouseout","tapdragout"],e,{x:l[0],y:l[1]}),d&&I(d,["mouseover","tapdragover"],e,{x:l[0],y:l[1]}),N.hoverData.last=d),g&&(t?a.boxSelectionEnabled()&&h?(g&&g.grabbed()&&(D(m),g.emit("freeon"),m.emit("free"),N.dragData.didDrag)&&(g.emit("dragfreeon"),m.emit("dragfree")),y()):g&&g.grabbed()&&N.nodeIsDraggable(g)&&((r=!N.dragData.didDrag)&&N.redrawHint("eles",!0),N.dragData.didDrag=!0,N.hoverData.draggingEles||M(m,{inDragLayer:!0}),s={x:0,y:0},ae(f[0])&&ae(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((n=N.hoverData.dragDelta)&&ae(n[0])&&ae(n[1])&&(s.x+=n[0],s.y+=n[1])),N.hoverData.draggingEles=!0,m.silentShift(s).emit("position drag"),N.redrawHint("drag",!0),N.redraw()):o()),i=!0):t&&(N.hoverData.dragging||!a.boxSelectionEnabled()||!h&&a.panningEnabled()&&a.userPanningEnabled()?!N.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&R(g,N.hoverData.downs)&&(N.hoverData.dragging=!0,N.hoverData.justStartedPan=!0,u[4]=0,N.data.bgActivePosistion=Z8e(c),N.redrawHint("select",!0),N.redraw()):y(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],i)return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1}},"mousemoveHandler"),!1),N.registerBinding(e,"mouseup",mt(function(e){var t,r,n,i,a,s,o,l;1===N.hoverData.which&&1!==e.which&&N.hoverData.capture||N.hoverData.capture&&(N.hoverData.capture=!1,t=N.cy,r=N.projectIntoViewport(e.clientX,e.clientY),n=N.selection,o=N.findNearestElement(r[0],r[1],!0,!1),i=N.dragData.possibleDragElements,a=N.hoverData.down,l=v(e),N.data.bgActivePosistion&&(N.redrawHint("select",!0),N.redraw()),N.hoverData.tapholdCancelled=!0,N.data.bgActivePosistion=void 0,a&&a.unactivate(),3===N.hoverData.which?(s={originalEvent:e,type:"cxttapend",position:{x:r[0],y:r[1]}},(a||t).emit(s),N.hoverData.cxtDragged||(s={originalEvent:e,type:"cxttap",position:{x:r[0],y:r[1]}},(a||t).emit(s)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(o,["mouseup","tapend","vmouseup"],e,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(I(a,["click","tap","vclick"],e,{x:r[0],y:r[1]}),h=!1,e.timeStamp-u<=t.multiClickDebounceTime()?(c&&clearTimeout(c),h=!0,u=null,I(a,["dblclick","dbltap","vdblclick"],e,{x:r[0],y:r[1]})):(c=setTimeout(function(){h||I(a,["oneclick","onetap","voneclick"],e,{x:r[0],y:r[1]})},t.multiClickDebounceTime()),u=e.timeStamp)),null!=a||N.dragData.didDrag||N.hoverData.selecting||N.hoverData.dragged||v(e)||(t.$(d).unselect(["tapunselect"]),0<i.length&&N.redrawHint("eles",!0),N.dragData.possibleDragElements=i=t.collection()),o!=a||N.dragData.didDrag||N.hoverData.selecting||null==o||!o._private.selectable||(N.hoverData.dragging||("additive"===t.selectionType()||l?o.selected()?o.unselect(["tapunselect"]):o.select(["tapselect"]):l||(t.$(d).unmerge(o).unselect(["tapunselect"]),o.select(["tapselect"]))),N.redrawHint("eles",!0)),N.hoverData.selecting&&(s=t.collection(N.getAllInBox(n[0],n[1],n[2],n[3])),N.redrawHint("select",!0),0<s.length&&N.redrawHint("eles",!0),t.emit({type:"boxend",originalEvent:e,position:{x:r[0],y:r[1]}}),o=mt(function(e){return e.selectable()&&!e.selected()},"eleWouldBeSelected"),"additive"===t.selectionType()||l||t.$(d).unmerge(s).unselect(),s.emit("box").stdFilter(o).select().emit("boxselect"),N.redraw()),N.hoverData.dragging&&(N.hoverData.dragging=!1,N.redrawHint("select",!0),N.redrawHint("eles",!0),N.redraw()),n[4]||(N.redrawHint("drag",!0),N.redrawHint("eles",!0),l=a&&a.grabbed(),D(i),l&&(a.emit("freeon"),i.emit("free"),N.dragData.didDrag)&&(a.emit("dragfreeon"),i.emit("dragfree")))),n[4]=0,N.hoverData.down=null,N.hoverData.cxtStarted=!1,N.hoverData.draggingEles=!1,N.hoverData.selecting=!1,N.hoverData.isOverThresholdDrag=!1,N.dragData.didDrag=!1,N.hoverData.dragged=!1,N.hoverData.dragDelta=[],N.hoverData.mdownPos=null,N.hoverData.mdownGPos=null,N.hoverData.which=null)},"mouseupHandler"),!1),mt(function(e){var t,r,n,i;N.scrollingPage||(n=(t=N.cy).zoom(),i=t.pan(),r=[(r=N.projectIntoViewport(e.clientX,e.clientY))[0]*n+i.x,r[1]*n+i.y],N.hoverData.draggingEles||N.hoverData.dragging||N.hoverData.cxtStarted||H()?e.preventDefault():t.panningEnabled()&&t.userPanningEnabled()&&t.zoomingEnabled()&&t.userZoomingEnabled()&&(e.preventDefault(),N.data.wheelZooming=!0,clearTimeout(N.data.wheelTimeout),N.data.wheelTimeout=setTimeout(function(){N.data.wheelZooming=!1,N.redrawHint("eles",!0),N.redraw()},150),n=null!=e.deltaY?e.deltaY/-250:null!=e.wheelDeltaY?e.wheelDeltaY/1e3:e.wheelDelta/1e3,n*=N.wheelSensitivity,1===e.deltaMode&&(n*=33),i=t.zoom()*Math.pow(10,n),"gesturechange"===e.type&&(i=N.gestureStartZoom*e.scale),t.zoom({level:i,renderedPosition:{x:r[0],y:r[1]}}),t.emit("gesturechange"===e.type?"pinchzoom":"scrollzoom")))},"wheelHandler"));N.registerBinding(N.container,"wheel",V,!0),N.registerBinding(e,"scroll",mt(function(e){N.scrollingPage=!0,clearTimeout(N.scrollingPageTimeout),N.scrollingPageTimeout=setTimeout(function(){N.scrollingPage=!1},250)},"scrollHandler"),!0),N.registerBinding(N.container,"gesturestart",mt(function(e){N.gestureStartZoom=N.cy.zoom(),N.hasTouchStarted||e.preventDefault()},"gestureStartHandler"),!0),N.registerBinding(N.container,"gesturechange",function(e){N.hasTouchStarted||V(e)},!0),N.registerBinding(N.container,"mouseout",mt(function(e){var t=N.projectIntoViewport(e.clientX,e.clientY);N.cy.emit({originalEvent:e,type:"mouseout",position:{x:t[0],y:t[1]}})},"mouseOutHandler"),!1),N.registerBinding(N.container,"mouseover",mt(function(e){var t=N.projectIntoViewport(e.clientX,e.clientY);N.cy.emit({originalEvent:e,type:"mouseover",position:{x:t[0],y:t[1]}})},"mouseOverHandler"),!1);var P,B,$,F,z,G,U,q,j,p,g,X,K,Z,Q,J,f,m,y,s,o,ee,te,l,re,x,b,ne=mt(function(e,t,r,n){return Math.sqrt((r-e)*(r-e)+(n-t)*(n-t))},"distance"),ie=mt(function(e,t,r,n){return(r-e)*(r-e)+(n-t)*(n-t)},"distanceSq");N.registerBinding(N.container,"touchstart",K=mt(function(t){if(N.hasTouchStarted=!0,O(t)){W(),N.touchData.capture=!0,N.data.bgActivePosistion=void 0;var e,r,n,i=N.cy,a=N.touchData.now,s=N.touchData.earlier;if(t.touches[0]&&(e=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),a[0]=e[0],a[1]=e[1]),t.touches[1]&&(e=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),a[2]=e[0],a[3]=e[1]),t.touches[2]&&(e=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),a[4]=e[0],a[5]=e[1]),t.touches[1]){N.touchData.singleTouchMoved=!0,D(N.dragData.touchDragEles);var o=N.findContainerClientCoords(),o=(q=o[0],j=o[1],p=o[2],g=o[3],P=t.touches[0].clientX-q,B=t.touches[0].clientY-j,$=t.touches[1].clientX-q,F=t.touches[1].clientY-j,X=0<=P&&P<=p&&0<=$&&$<=p&&0<=B&&B<=g&&0<=F&&F<=g,i.pan()),l=i.zoom();if(z=ne(P,B,$,F),G=ie(P,B,$,F),U=[((p=[(P+$)/2,(B+F)/2])[0]-o.x)/l,(p[1]-o.y)/l],G<4e4&&!t.touches[2])return o=N.findNearestElement(a[0],a[1],!0,!0),l=N.findNearestElement(a[2],a[3],!0,!0),o&&o.isNode()?(o.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),N.touchData.start=o):l&&l.isNode()?(l.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),N.touchData.start=l):i.emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxt=!0,N.touchData.cxtDragged=!1,N.data.bgActivePosistion=void 0,void N.redraw()}if(t.touches[2]?i.boxSelectionEnabled()&&t.preventDefault():t.touches[1]||t.touches[0]&&(null!=(l=(o=N.findNearestElements(a[0],a[1],!0,!0))[0])&&(l.activate(),N.touchData.start=l,N.touchData.starts=o,N.nodeIsGrabbable(l))&&(o=N.dragData.touchDragEles=i.collection(),N.redrawHint("eles",!(r=null)),N.redrawHint("drag",!0),l.selected()?(r=i.$(function(e){return e.selected()&&N.nodeIsGrabbable(e)}),M(r,{addToList:o})):A(l,{addToList:o}),C(l),n=mt(function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}},"makeEvent"),l.emit(n("grabon")),r?r.forEach(function(e){e.emit(n("grab"))}):l.emit(n("grab"))),I(l,["touchstart","tapstart","vmousedown"],t,{x:a[0],y:a[1]}),null==l&&(N.data.bgActivePosistion={x:e[0],y:e[1]},N.redrawHint("select",!0),N.redraw()),N.touchData.singleTouchMoved=!1,N.touchData.singleTouchStartTime=+new Date,clearTimeout(N.touchData.tapholdTimeout),N.touchData.tapholdTimeout=setTimeout(function(){!1!==N.touchData.singleTouchMoved||N.pinching||N.touchData.selecting||I(N.touchData.start,["taphold"],t,{x:a[0],y:a[1]})},N.tapholdDuration)),1<=t.touches.length){for(var c=N.touchData.startPosition=[null,null,null,null,null,null],h=0;h<a.length;h++)c[h]=s[h]=a[h];i=t.touches[0],N.touchData.startGPosition=[i.clientX,i.clientY]}}},"touchstartHandler"),!1),N.registerBinding(e,"touchmove",Z=mt(function(e){var t=N.touchData.capture;if(t||O(e)){var r=N.selection,n=N.cy,i=N.touchData.now,a=N.touchData.earlier,s=n.zoom(),o=(e.touches[0]&&(_=N.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY),i[0]=_[0],i[1]=_[1]),e.touches[1]&&(_=N.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),i[2]=_[0],i[3]=_[1]),e.touches[2]&&(_=N.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),i[4]=_[0],i[5]=_[1]),N.touchData.startGPosition);if(t&&e.touches[0]&&o){for(var l=[],c=0;c<i.length;c++)l[c]=i[c]-a[c];var h=e.touches[0].clientX-o[0],u=e.touches[0].clientY-o[1],d=h*h+u*u>=N.touchTapThreshold2}if(t&&N.touchData.cxt&&(e.preventDefault(),x=e.touches[0].clientX-q,b=e.touches[0].clientY-j,w=e.touches[1].clientX-q,k=e.touches[1].clientY-j,2.25<=(o=ie(x,b,w,k))/G||22500<=o)&&(N.touchData.cxt=!1,N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),p={originalEvent:e,type:"cxttapend",position:{x:i[0],y:i[1]}},N.touchData.start?(N.touchData.start.unactivate().emit(p),N.touchData.start=null):n.emit(p)),t&&N.touchData.cxt){var p={originalEvent:e,type:"cxtdrag",position:{x:i[0],y:i[1]}},g=(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),(N.touchData.start||n).emit(p),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxtDragged=!0,N.findNearestElement(i[0],i[1],!0,!0));(!N.touchData.cxtOver||g!==N.touchData.cxtOver)&&(N.touchData.cxtOver&&N.touchData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:i[0],y:i[1]}}),N.touchData.cxtOver=g)&&g.emit({originalEvent:e,type:"cxtdragover",position:{x:i[0],y:i[1]}})}else if(t&&e.touches[2]&&n.boxSelectionEnabled())e.preventDefault(),N.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,N.touchData.selecting||n.emit({originalEvent:e,type:"boxstart",position:{x:i[0],y:i[1]}}),N.touchData.selecting=!0,N.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(i[0]+i[2]+i[4])/3,r[3]=(i[1]+i[3]+i[5])/3):(r[0]=(i[0]+i[2]+i[4])/3,r[1]=(i[1]+i[3]+i[5])/3,r[2]=(i[0]+i[2]+i[4])/3+1,r[3]=(i[1]+i[3]+i[5])/3+1),N.redrawHint("select",!0),N.redraw();else if(t&&e.touches[1]&&!N.touchData.didSelect&&n.zoomingEnabled()&&n.panningEnabled()&&n.userZoomingEnabled()&&n.userPanningEnabled()){if(e.preventDefault(),N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),T=N.dragData.touchDragEles){N.redrawHint("drag",!0);for(var f=0;f<T.length;f++){var m=T[f]._private;m.grabbed=!1,m.rscratch.inDragLayer=!1}}var y,v,o=N.touchData.start,x=e.touches[0].clientX-q,b=e.touches[0].clientY-j,w=e.touches[1].clientX-q,k=e.touches[1].clientY-j,r=(p=ne(x,b,w,k))/z;X&&(v=(x-P+(w-$))/2,C=(b-B+(k-F))/2,r=(L=n.zoom())*r,E=n.pan(),A=U[0]*L+E.x,y=U[1]*L+E.y,v={x:-r/L*(A-E.x-v)+A,y:-r/L*(y-E.y-C)+y},o&&o.active()&&(T=N.dragData.touchDragEles,D(T),N.redrawHint("drag",!0),N.redrawHint("eles",!0),o.unactivate().emit("freeon"),T.emit("free"),N.dragData.didDrag)&&(o.emit("dragfreeon"),T.emit("dragfree")),n.viewport({zoom:r,pan:v,cancelOnFailedZoom:!0}),n.emit("pinchzoom"),z=p,P=x,B=b,$=w,F=k,N.pinching=!0),e.touches[0]&&(_=N.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY),i[0]=_[0],i[1]=_[1]),e.touches[1]&&(_=N.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),i[2]=_[0],i[3]=_[1]),e.touches[2]&&(_=N.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),i[4]=_[0],i[5]=_[1])}else if(e.touches[0]&&!N.touchData.didSelect){var T,E,C,S,_,A=N.touchData.start,L=N.touchData.last;if(N.hoverData.draggingEles||N.swipePanning||(g=N.findNearestElement(i[0],i[1],!0,!0)),t&&null!=A&&e.preventDefault(),t&&null!=A&&N.nodeIsDraggable(A)&&(d?(T=N.dragData.touchDragEles,(E=!N.dragData.didDrag)&&M(T,{inDragLayer:!0}),N.dragData.didDrag=!0,C={x:0,y:0},ae(l[0])&&ae(l[1])&&(C.x+=l[0],C.y+=l[1],E)&&(N.redrawHint("eles",!0),(S=N.touchData.dragDelta)&&ae(S[0])&&ae(S[1])&&(C.x+=S[0],C.y+=S[1])),N.hoverData.draggingEles=!0,T.silentShift(C).emit("position drag"),N.redrawHint("drag",!0),N.touchData.startPosition[0]==a[0]&&N.touchData.startPosition[1]==a[1]&&N.redrawHint("eles",!0),N.redraw()):0===(S=N.touchData.dragDelta=N.touchData.dragDelta||[]).length?(S.push(l[0]),S.push(l[1])):(S[0]+=l[0],S[1]+=l[1])),I(A||g,["touchmove","tapdrag","vmousemove"],e,{x:i[0],y:i[1]}),A&&A.grabbed()||g==L||(L&&L.emit({originalEvent:e,type:"tapdragout",position:{x:i[0],y:i[1]}}),!g)||g.emit({originalEvent:e,type:"tapdragover",position:{x:i[0],y:i[1]}}),N.touchData.last=g,t)for(f=0;f<i.length;f++)i[f]&&N.touchData.startPosition[f]&&d&&(N.touchData.singleTouchMoved=!0);t&&(null==A||A.pannable())&&n.panningEnabled()&&n.userPanningEnabled()&&(R(A,N.touchData.starts)&&(e.preventDefault(),N.data.bgActivePosistion||(N.data.bgActivePosistion=Z8e(N.touchData.startPosition)),N.swipePanning?(n.panBy({x:l[0]*s,y:l[1]*s}),n.emit("dragpan")):d&&(N.swipePanning=!0,n.panBy({x:h*s,y:u*s}),n.emit("dragpan"),A)&&(A.unactivate(),N.redrawHint("select",!0),N.touchData.start=null)),_=N.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY),i[0]=_[0],i[1]=_[1])}for(c=0;c<i.length;c++)a[c]=i[c];t&&0<e.touches.length&&!N.hoverData.draggingEles&&!N.swipePanning&&null!=N.data.bgActivePosistion&&(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),N.redraw())}},"touchmoveHandler"),!1),N.registerBinding(e,"touchcancel",Q=mt(function(e){var t=N.touchData.start;N.touchData.capture=!1,t&&t.unactivate()},"touchcancelHandler")),N.registerBinding(e,"touchend",J=mt(function(e){var t=N.touchData.start;if(N.touchData.capture){0===e.touches.length&&(N.touchData.capture=!1),e.preventDefault();var r,n=N.selection,i=(N.swipePanning=!1,N.hoverData.draggingEles=!1,N.cy),a=i.zoom(),s=N.touchData.now,o=N.touchData.earlier;if(e.touches[0]&&(r=N.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY),s[0]=r[0],s[1]=r[1]),e.touches[1]&&(r=N.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),s[2]=r[0],s[3]=r[1]),e.touches[2]&&(r=N.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),s[4]=r[0],s[5]=r[1]),t&&t.unactivate(),N.touchData.cxt)r={originalEvent:e,type:"cxttapend",position:{x:s[0],y:s[1]}},(t||i).emit(r),N.touchData.cxtDragged||(r={originalEvent:e,type:"cxttap",position:{x:s[0],y:s[1]}},(t||i).emit(r)),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxt=!1,N.touchData.start=null,N.redraw();else{!e.touches[2]&&i.boxSelectionEnabled()&&N.touchData.selecting&&(N.touchData.selecting=!1,r=i.collection(N.getAllInBox(n[0],n[1],n[2],n[3])),n[0]=void 0,n[1]=void 0,n[2]=void 0,n[3]=void 0,n[4]=0,N.redrawHint("select",!0),i.emit({type:"boxend",originalEvent:e,position:{x:s[0],y:s[1]}}),n=mt(function(e){return e.selectable()&&!e.selected()},"eleWouldBeSelected"),r.emit("box").stdFilter(n).select().emit("boxselect"),r.nonempty()&&N.redrawHint("eles",!0),N.redraw()),t?.unactivate(),e.touches[2]?(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0)):e.touches[1]||e.touches[0]||(e.touches[0],N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),n=N.dragData.touchDragEles,null!=t?(r=t._private.grabbed,D(n),N.redrawHint("drag",!0),N.redrawHint("eles",!0),r&&(t.emit("freeon"),n.emit("free"),N.dragData.didDrag)&&(t.emit("dragfreeon"),n.emit("dragfree")),I(t,["touchend","tapend","vmouseup","tapdragout"],e,{x:s[0],y:s[1]}),t.unactivate(),N.touchData.start=null):(r=N.findNearestElement(s[0],s[1],!0,!0),I(r,["touchend","tapend","vmouseup","tapdragout"],e,{x:s[0],y:s[1]})),n=((n=N.touchData.startPosition[0]-s[0])*n+(r=N.touchData.startPosition[1]-s[1])*r)*a*a,N.touchData.singleTouchMoved||(t||i.$(":selected").unselect(["tapunselect"]),I(t,["tap","vclick"],e,{x:s[0],y:s[1]}),f=!1,e.timeStamp-y<=i.multiClickDebounceTime()?(m&&clearTimeout(m),f=!0,y=null,I(t,["dbltap","vdblclick"],e,{x:s[0],y:s[1]})):(m=setTimeout(function(){f||I(t,["onetap","voneclick"],e,{x:s[0],y:s[1]})},i.multiClickDebounceTime()),y=e.timeStamp)),null!=t&&!N.dragData.didDrag&&t._private.selectable&&n<N.touchTapThreshold2&&!N.pinching&&("single"===i.selectionType()?(i.$(d).unmerge(t).unselect(["tapunselect"]),t.select(["tapselect"])):t.selected()?t.unselect(["tapunselect"]):t.select(["tapselect"]),N.redrawHint("eles",!0)),N.touchData.singleTouchMoved=!0);for(var l=0;l<s.length;l++)o[l]=s[l];N.dragData.didDrag=!1,0===e.touches.length&&(N.touchData.dragDelta=[],N.touchData.startPosition=[null,null,null,null,null,null],N.touchData.startGPosition=null,N.touchData.didSelect=!1),e.touches.length<2&&(1===e.touches.length&&(N.touchData.startGPosition=[e.touches[0].clientX,e.touches[0].clientY]),N.pinching=!1,N.redrawHint("eles",!0),N.redraw())}}},"touchendHandler"),!1),"u"<typeof TouchEvent&&(s=[],o=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"),ee=mt(function(e){return{event:e,touch:o(e)}},"makePointer"),te=mt(function(e){s.push(ee(e))},"addPointer"),l=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"),re=mt(function(t){var e=s.filter(function(e){return e.event.pointerId===t.pointerId})[0];e.event=t,e.touch=o(t)},"updatePointer"),x=mt(function(e){e.touches=s.map(function(e){return e.touch})},"addTouchesToEvent"),b=mt(function(e){return"mouse"===e.pointerType||4===e.pointerType},"pointerIsMouse"),N.registerBinding(N.container,"pointerdown",function(e){b(e)||(e.preventDefault(),te(e),x(e),K(e))}),N.registerBinding(N.container,"pointerup",function(e){b(e)||(l(e),x(e),J(e))}),N.registerBinding(N.container,"pointercancel",function(e){b(e)||(l(e),x(e),Q(e))}),N.registerBinding(N.container,"pointermove",function(e){b(e)||(e.preventDefault(),re(e),x(e),Z(e))}))}},uLe={generatePolygon:function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl("polygon",e,t,r,n,i,this.points)},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o){return qEe(i,a,this.points,e,t,r/2,n/2,s)},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o){return DEe(e,t,this.points,a,s,n,i,[0,-1],r)},"checkPoint")}},generateEllipse:function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl(this.name,e,t,r,n,i)},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o){return $Ee(i,a,e,t,r/2+s,n/2+s)},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o){return FEe(e,t,n,i,a,s,r)},"checkPoint")}},generateRoundPolygon:function(e,m){return this.nodeShapes[e]={renderer:this,name:e,points:m,getOrCreateCorners:mt(function(e,t,r,n,i,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=n/2;i="auto"===i?KEe(r,n):i;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]=Fke(g,u,d,i),g=u}return a[s]},"getOrCreateCorners"),draw:mt(function(e,t,r,n,i,a,s){this.renderer.nodeShapeImpl("round-polygon",e,t,r,n,i,this.points,this.getOrCreateCorners(t,r,n,i,a,s,"drawCorners"))},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o,l){return jEe(i,a,this.points,e,t,r,n,s,this.getOrCreateCorners(e,t,r,n,o,l,"corners"))},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o,l){return OEe(e,t,this.points,a,s,n,i,this.getOrCreateCorners(a,s,n,i,o,l,"corners"))},"checkPoint")}},generateRoundRectangle:function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:YEe(4,0),draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl(this.name,e,t,r,n,i,this.points,a)},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o){return SEe(i,a,e,t,r,n,s,o)},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o){var l=n/2,c=i/2,h=(o="auto"===o?XEe(n,i):o,2*(o=Math.min(l,c,o)));return!!(DEe(e,t,this.points,a,s,n,i-h,[0,-1],r)||DEe(e,t,this.points,a,s,n-h,i,[0,-1],r)||FEe(e,t,h,h,a-l+o,s-c+o,r)||FEe(e,t,h,h,a+l-o,s-c+o,r)||FEe(e,t,h,h,a+l-o,s+c-o,r)||FEe(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:ZEe(),points:YEe(4,0),draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl(this.name,e,t,r,n,i,null,a)},"draw"),generateCutTrianglePts:mt(function(e,t,r,n,i){var a=r-(e/=2),r=r+e;return{topLeft:[a,(e=n-(t/=2))+(i="auto"===i?this.cornerLength:i),a+i,e,a+i,e+i],topRight:[r-i,e,r,e+i,r-i,e+i],bottomRight:[r,(n+=t)-i,r-i,n,r-i,n-i],bottomLeft:[a+i,n,a,n-i,a+i,n-i]}},"generateCutTrianglePts"),intersectLine:mt(function(e,t,r,n,i,a,s,o){return r=this.generateCutTrianglePts(r+2*s,n+2*s,e,t,o),n=[].concat.apply([],[r.topLeft.splice(0,4),r.topRight.splice(0,4),r.bottomRight.splice(0,4),r.bottomLeft.splice(0,4)]),qEe(i,a,n,e,t)},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o){return o="auto"===o?this.cornerLength:o,!(!DEe(e,t,this.points,a,s,n,i-2*o,[0,-1],r)&&!DEe(e,t,this.points,a,s,n-2*o,i,[0,-1],r))||(o=this.generateCutTrianglePts(n,i,a,s),MEe(e,t,o.topLeft))||MEe(e,t,o.topRight)||MEe(e,t,o.bottomRight)||MEe(e,t,o.bottomLeft)},"checkPoint")}},generateBarrel:function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:YEe(4,0),draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl(this.name,e,t,r,n,i)},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o){return r=this.generateBarrelBezierPts(r+2*s,n+2*s,e,t),n=mt(function(e){var t=hEe({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.15),r=hEe({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.5),n=hEe({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,n.x,n.y,e[4],e[5]]},"approximateBarrelCurvePts"),s=[].concat(n(r.topLeft),n(r.topRight),n(r.bottomRight),n(r.bottomLeft)),qEe(i,a,s,e,t)},"intersectLine"),generateBarrelBezierPts:mt(function(e,t,r,n){var i=t/2,a=r-(s=e/2),r=r+s,s=n-i,n=n+i,t=(i=JEe(e,t)).heightOffset,o=i.widthOffset;return(e={topLeft:[a,s+t,a+(i=i.ctrlPtOffsetPct*e),s,a+o,s],topRight:[r-o,s,r-i,s,r,s+t],bottomRight:[r,n-t,r-i,n,r-o,n],bottomLeft:[a+o,n,a+i,n,a,n-t]}).topLeft.isTop=!0,e.topRight.isTop=!0,e.bottomLeft.isBottom=!0,e.bottomRight.isBottom=!0,e},"generateBarrelBezierPts"),checkPoint:mt(function(e,t,r,n,i,a,s,o){var l=(c=JEe(n,i)).heightOffset,c=c.widthOffset;if(DEe(e,t,this.points,a,s,n,i-2*l,[0,-1],r)||DEe(e,t,this.points,a,s,n-2*c,i,[0,-1],r))return!0;for(var h=this.generateBarrelBezierPts(n,i,a,s),u=mt(function(e,t,r){var n=r[4],i=r[2],a=r[0],s=r[5],r=r[1],o=Math.min(n,a),l=Math.max(n,a),c=Math.min(s,r),s=Math.max(s,r);return o<=e&&e<=l&&c<=t&&t<=s&&(r=QEe(n,i,a),0<(o=LEe(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=cEe(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:YEe(4,0),draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl(this.name,e,t,r,n,i,this.points,a)},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o){var l=t-(n/2+s);return 0<(l=UEe(i,a,e,t,e-(r/2+s),l,e+(r/2+s),l,!1)).length?l:SEe(i,a,e,t,r,n,s,o)},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o){var l,c,h=2*(o="auto"===o?XEe(n,i):o);return!(!DEe(e,t,this.points,a,s,n,i-h,[0,-1],r)&&!DEe(e,t,this.points,a,s,n-h,i,[0,-1],r)&&!(MEe(e,t,[a-(l=n/2+2*r),s-(c=i/2+2*r),a-l,s,a+l,s,a+l,s-c])||FEe(e,t,h,h,a+n/2-o,s+i/2-o,r)||FEe(e,t,h,h,a-n/2+o,s+i/2-o,r)))},"checkPoint")}},registerNodeShapes:function(){var e=this.nodeShapes={},r=this,t=(this.generateEllipse(),this.generatePolygon("triangle",YEe(3,0)),this.generateRoundPolygon("round-triangle",YEe(3,0)),this.generatePolygon("rectangle",YEe(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle(),[0,1,1,0,0,-1,-1,0]),n=(this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t),this.generatePolygon("pentagon",YEe(5,0)),this.generateRoundPolygon("round-pentagon",YEe(5,0)),this.generatePolygon("hexagon",YEe(6,0)),this.generateRoundPolygon("round-hexagon",YEe(6,0)),this.generatePolygon("heptagon",YEe(7,0)),this.generateRoundPolygon("round-heptagon",YEe(7,0)),this.generatePolygon("octagon",YEe(8,0)),this.generateRoundPolygon("round-octagon",YEe(8,0)),new Array(20)),i=VEe(5,0),a=VEe(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++)n[4*o]=i[2*o],n[4*o+1]=i[2*o+1],n[4*o+2]=a[2*o],n[4*o+3]=a[2*o+1];n=HEe(n),this.generatePolygon("star",n),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)}}},dLe={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||N8e(),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&&k8e("Priority is not optional for beforeRender"),(r=this.beforeRenderCallbacks).push({fn:e,priority:t}),r.sort(function(e,t){return t.priority-e.priority}))}},w9e=mt(function(e,t,r){for(var n=e.beforeRenderCallbacks,i=0;i<n.length;i++)n[i].fn(t,r)},"beforeRenderCallbacks"),dLe.startRenderLoop=function(){var e,i=this,a=i.cy;i.renderLoopStarted||(i.renderLoopStarted=!0,e=mt(function e(t){var r,n;i.destroyed||(a.batching()||(i.requestedFrame&&!i.skipFrame?(w9e(i,!0,t),r=n8e(),i.render(i.renderOptions),n=i.lastDrawTime=n8e(),void 0===i.averageRedrawTime&&(i.averageRedrawTime=n-r),void 0===i.redrawCount&&(i.redrawCount=0),i.redrawCount++,void 0===i.redrawTotalTime&&(i.redrawTotalTime=0),i.redrawTotalTime+=n-=r,i.lastRedrawTime=n,i.averageRedrawTime=i.averageRedrawTime/2+n/2,i.requestedFrame=!1):w9e(i,!1,t)),i.skipFrame=!1,r8e(e))},"renderFn"),r8e(e))},Y9e=mt(function(e){this.init(e)},"BaseRenderer"),(T9e=(k9e=Y9e).prototype).clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],T9e.init=function(e){var t,r,n,i,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,n="__________cytoscape_container",i=null!=t.getElementById("__________cytoscape_stylesheet"),s.className.indexOf(n)<0&&(s.className=(s.className||"")+" "+n),i||((i=t.createElement("style")).id="__________cytoscape_stylesheet",i.textContent="."+n+" { position: relative; }",r.insertBefore(i,r.children[0])),"static"===o.getComputedStyle(s).getPropertyValue("position"))&&E8e("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=ae(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()},T9e.notify=function(e,t){var r=this,n=r.cy;this.destroyed||("init"===e?r.load():"destroy"===e?r.destroy():(("add"===e||"remove"===e||"move"===e&&n.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()))},T9e.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],n=r.target;(n.off||n.removeEventListener).apply(n,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{}},T9e.isHeadless=function(){return!1},[rLe,b9e,nLe,hLe,uLe,dLe].forEach(function(e){y7e(T9e,e)}),xLe={setupDequeueing:mt(function(f){return mt(function(){var d,e,t,p=this,g=this.renderer;p.dequeueingSetup||(p.dequeueingSetup=!0,d=Q7e(function(){g.redrawHint("eles",!0),g.redrawHint("drag",!0),g.redraw()},f.deqRedrawThreshold),e=mt(function(e,t){var r=n8e(),n=g.averageRedrawTime,i=g.lastRedrawTime,a=[],s=g.cy.extent(),o=g.getPixelRatio();for(e||g.flushRenderedStyleQueue();;){var l=(c=n8e())-r,c=c-t;if(i<1e3/60){if(c>=f.deqFastCost*(1e3/60-(e?n:0)))break}else if(e){if(l>=f.deqCost*i||l>=f.deqAvgCost*n)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||w8e,g.beforeRender(e,t(p)))},"setupDequeueingImpl")},"setupDequeueing")},mt(N,"ElementTextureCacheLookup"),zwe(N,[{key:"getIdsFor",value:mt(function(e){null==e&&k8e("Can not get id list for null key");var t=this.idsByKey,r=this.idsByKey.get(e);return r||(r=new $8e,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,n=t.get(e);return n||(n=new B8e,t.set(e,n),r.push(e)),n},"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 n=this.getKey(e);this.setCache(n,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")}]),E9e=N,C9e={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},S9e=I8e({getKey:null,doesEleInvalidateKey:x8e,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:v8e,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),_9e=mt(function(e,t){this.renderer=e,this.onDequeues=[],e=S9e(t),y7e(this,e),this.lookup=new E9e(e.getKey,e.doesEleInvalidateKey),this.setupDequeueing()},"ElementTextureCache"),(fLe=_9e.prototype).reasons=C9e,fLe.getTextureQueue=function(e){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[e]=this.eleImgCaches[e]||[]},fLe.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},fLe.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new z8e(function(e,t){return t.reqs-e.reqs})},fLe.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},fLe.getElement=function(e,t,r,n,i){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((n=null==n?Math.ceil(iEe(o*r)):n)<-4)n=-4;else if(7.99<=o||3<n)return null;var o=Math.pow(2,n),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,n))&&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=i&&i===C9e.dequeue,y=i&&i===C9e.highQuality,i=i&&i===C9e.downscale,v=n+1;v<=3;v++){var x=l.get(e,v);if(x){f=x;break}}var b,w=f&&f.level===n+1?f:null,k=mt(function(){p.context.drawImage(w.texture.canvas,w.x,0,w.width,w.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(w))k();else if(m(f)){if(!y)return a.queueElement(e,f.level-1),f;for(var T=f.level;n<T;T--)w=a.getElement(e,t,r,T,C9e.downscale);k()}else{if(!g&&!y&&!i)for(var E=n-1;-4<=E;E--){var C=l.get(e,E);if(C){b=C;break}}if(m(b))return a.queueElement(e,n),b;p.context.translate(p.usedWidth,0),p.context.scale(o,o),this.drawElement(p.context,e,t,u,!1),p.context.scale(1/o,1/o),p.context.translate(-p.usedWidth,0)}s={x:p.usedWidth,texture:p,level:n,scale:o,width:h,height:c,scaledLabelShown:u},p.usedWidth+=Math.ceil(8+h),p.eleCaches.push(s),l.set(e,n,s),a.checkTextureFullness(p)}return s},fLe.invalidateElements=function(e){for(var t=0;t<e.length;t++)this.invalidateElement(e[t])},fLe.invalidateElement=function(e){var t=this.lookup,r=[];if(t.isInvalid(e)){for(var n=-4;n<=3;n++){var i=t.getForCachedKey(e,n);i&&r.push(i)}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)}},fLe.checkTextureUtility=function(e){e.invalidatedWidth>=.2*e.width&&this.retireTexture(e)},fLe.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);.8<e.usedWidth/e.width&&10<=e.fullnessChecks?R8e(t,e):e.fullnessChecks++},fLe.retireTexture=function(e){var t=e.height,r=this.getTextureQueue(t),n=this.lookup;R8e(r,e),e.retired=!0;for(var i=e.eleCaches,a=0;a<i.length;a++){var s=i[a];n.deleteCache(s.key,s.level)}M8e(i),this.getRetiredTextureQueue(t).push(e)},fLe.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},fLe.recycleTexture=function(e,t){for(var r=this.getTextureQueue(e),n=this.getRetiredTextureQueue(e),i=0;i<n.length;i++){var a=n[i];if(a.width>=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,M8e(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),R8e(n,a),r.push(a),a}},fLe.queueElement=function(e,t){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(e),a=n[i];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:i},r.push(a),n[i]=a)},fLe.dequeue=function(e){for(var t=this.getElementQueue(),r=this.getElementKeyToQueue(),n=[],i=this.lookup,a=0;a<1&&0<t.size();a++){var s=t.pop(),o=s.key,l=s.eles[0],c=i.hasCache(l,s.level);r[o]=null,c||(n.push(s),o=this.getBoundingBox(l),this.getElement(l,o,e,s.level,C9e.dequeue))}return n},fLe.removeFromQueue=function(e){var t=this.getElementQueue(),r=this.getElementKeyToQueue(),n=this.getKey(e),i=r[n];null!=i&&(1===i.eles.length?(i.reqs=y8e,t.updateItem(i),t.pop(),r[n]=null):i.eles.unmerge(e))},fLe.onDequeue=function(e){this.onDequeues.push(e)},fLe.offDequeue=function(e){R8e(this.onDequeues,e)},fLe.setupDequeueing=xLe.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,n){for(var i=0;i<t.length;i++)for(var a=t[i].eles,s=0;s<a.length;s++){var o=a[s].boundingBox();if(kEe(o,n))return!0}return!1},"shouldRedraw"),priority:mt(function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq},"priority")}),A9e=mt(function(e){var r=this,t=(e=r.renderer=e).cy,t=(r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=n8e()-500,r.skipping=!1,r.eleTxrDeqs=t.collection(),r.scheduleElementRefinement=Q7e(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 z8e(t),r.setupDequeueing()},"LayeredTextureCache"),J=A9e.prototype,L9e=0,N9e=Math.pow(2,53)-1,J.makeLayer=function(e,t){var r=Math.pow(2,t),n=Math.ceil(e.w*r),i=Math.ceil(e.h*r),a=this.renderer.makeOffscreenCanvas(n,i),t=(e={id:L9e=++L9e%N9e,bb:e,level:t,width:n,height:i,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0}).context,n=-e.bb.x1,i=-e.bb.y1;return t.scale(r,r),t.translate(n,i),e},J.getLayers=function(i,e,a){var s=this,t=s.renderer.cy.zoom(),r=s.firstGet;if(s.firstGet=!1,null==a)if((a=Math.ceil(iEe(t*e)))<-4)a=-4;else if(3.99<=t||2<a)return null;s.validateLayersElesOrdering(a,i);var o,l,c=s.layersByLevel,h=Math.pow(2,a),u=c[a]=c[a]||[],t=s.levelIsComplete(a,i),n=mt(function(){var r=mt(function(e){if(s.validateLayersElesOrdering(e,i),s.levelIsComplete(e,i))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 n=u[t];n.invalid&&R8e(u,n)}},"checkTempLevels");if(t)return u;n();var d=mt(function(){if(!o){o=pEe();for(var e=0;e<i.length;e++)yEe(o,i[e].boundingBox())}return o},"getBb"),p=mt(function(e){var t=(e=e||{}).after,r=(d(),Math.ceil(o.w*h)),n=Math.ceil(o.h*h);return 32767<r||32767<n||16e6<r*n?null:(r=s.makeLayer(o,a),null!=t?(n=u.indexOf(t)+1,u.splice(n,0,r)):void 0!==e.insert&&!e.insert||u.unshift(r),r)},"makeLayer");if(s.skipping&&!r)return null;for(var g=null,f=+i.length,m=!r,y=0;y<i.length;y++){var v=i[y],x=v._private.rscratch,b=(x=x.imgLayerCaches=x.imgLayerCaches||{})[a];if(b)g=b;else{if((!g||g.eles.length>=f||!CEe(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;l||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,e),g.eles.push(v),x[a]=g}}return l||(m?null:u)},J.getEleLevelForLayerLevel=function(e,t){return e},J.drawEleInLayer=function(e,t,r,n){var i=this.renderer,e=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(e,!1),i.drawCachedElement(e,t,null,null,r,!0),i.setImgSmoothing(e,!0))},J.levelIsComplete=function(e,t){var r=this.layersByLevel[e];if(!r||0===r.length)return!1;for(var n=0,i=0;i<r.length;i++){var a=r[i];if(0<a.reqs||a.invalid)return!1;n+=a.eles.length}return n===t.length},J.validateLayersElesOrdering=function(e,t){var r=this.layersByLevel[e];if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=-1,s=0;s<t.length;s++)if(i.eles[0]===t[s]){a=s;break}if(a<0)this.invalidateLayer(i);else for(var o=a,s=0;s<i.eles.length;s++)if(i.eles[s]!==t[o+s]){this.invalidateLayer(i);break}}},J.updateElementsInLayers=function(e,t){for(var r=JTe(e[0]),n=0;n<e.length;n++)for(var i=r?null:e[n],a=r?e[n]:e[n].ele,s=a._private.rscratch,o=s.imgLayerCaches=s.imgLayerCaches||{},l=-4;l<=2;l++){var c=o[l];!c||i&&this.getEleLevelForLayerLevel(c.level)!==i.level||t(c,a,i)}},J.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},J.invalidateElements=function(e){var n=this;0!==e.length&&(n.lastInvalidationTime=n8e(),0!==e.length)&&n.haveLayers()&&n.updateElementsInLayers(e,mt(function(e,t,r){n.invalidateLayer(e)},"invalAssocLayers"))},J.invalidateLayer=function(e){if(this.lastInvalidationTime=n8e(),!e.invalid){var t=e.level,r=e.eles,n=this.layersByLevel[t];R8e(n,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i<r.length;i++){var a=r[i]._private.rscratch.imgLayerCaches;a&&(a[t]=null)}}},J.refineElementTextures=function(e){var a=this;a.updateElementsInLayers(e,mt(function(e,t,r){var n=e.replacement;if(n||((n=e.replacement=a.makeLayer(e.bb,e.level)).replaces=e,n.eles=e.eles),!n.reqs)for(var i=0;i<n.eles.length;i++)a.queueLayer(n,n.eles[i])},"refineEachEle"))},J.enqueueElementRefinement=function(e){this.eleTxrDeqs.merge(e),this.scheduleElementRefinement()},J.queueLayer=function(e,t){var r=this.layersQueue,n=e.elesQueue,i=n.hasId=n.hasId||{};if(!e.replacement){if(t){if(i[t.id()])return;n.push(t),i[t.id()]=!0}e.reqs?(e.reqs++,r.updateItem(e)):(e.reqs=1,r.push(e))}},J.dequeue=function(e){for(var t=this.layersQueue,r=[],n=0;n<1&&0!==t.size();){var i,a=t.peek();a.replacement||a.replaces&&a!==a.replaces.replacement||a.invalid?t.pop():((i=a.elesQueue.shift())&&(this.drawEleInLayer(a,i,a.level,e),n++),0===r.length&&r.push(!0),0===a.elesQueue.length&&(t.pop(),a.reqs=0,a.replaces&&this.applyLayerReplacement(a),this.requestRedraw()))}return r},J.applyLayerReplacement=function(e){var t=this.layersByLevel[e.level],r=e.replaces,n=t.indexOf(r);if(!(n<0||r.invalid)){t[n]=e;for(var i=0;i<e.eles.length;i++){var a=e.eles[i]._private;(a=a.imgLayerCaches=a.imgLayerCaches||{})&&(a[e.level]=e)}this.requestRedraw()}},J.requestRedraw=Q7e(function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()},100),J.setupDequeueing=xLe.setupDequeueing({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:mt(function(e,t){return e.dequeue(t)},"deq"),onDeqd:w8e,shouldRedraw:v8e,priority:mt(function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")}),I9e={},mt(Uke,"polygon"),mt(qke,"triangleBackcurve"),mt(jke,"triangleTee"),mt(Wke,"circleTriangle"),mt(Yke,"circle"),I9e.arrowShapeImpl=function(e){return(R9e=R9e||{polygon:Uke,"triangle-backcurve":qke,"triangle-tee":jke,"circle-triangle":Wke,"triangle-cross":jke,circle:Yke})[e]},M9e={drawElement:function(e,t,r,n,i,a){t.isNode()?this.drawNode(e,t,r,n,i,a):this.drawEdge(e,t,r,n,i,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,n,i,a,s,o){var l,c,h,u,d,p,g,f=r.getBoundingBox(t);0!==f.w&&0!==f.h&&(null!=(n=r.getElement(t,f,n,i,a))?0!==(i=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!==i&&(g=e.globalAlpha,e.globalAlpha=g*i),e.drawImage(n.texture.canvas,n.x,0,n.width,n.height,d,p,l,f),1!==i&&(e.globalAlpha=g),0!==a)&&(e.rotate(-a),e.translate(-h,-u),c||this.setImgSmoothing(e,!1)):r.drawElement(e,t))}},D9e=mt(function(){return 0},"getZeroRotation"),O9e=mt(function(e,t){return e.getTextAngle(t,null)},"getLabelRotation"),P9e=mt(function(e,t){return e.getTextAngle(t,"source")},"getSourceLabelRotation"),B9e=mt(function(e,t){return e.getTextAngle(t,"target")},"getTargetLabelRotation"),$9e=mt(function(e,t){return t.effectiveOpacity()},"getOpacity"),F9e=mt(function(e,t){return t.pstyle("text-opacity").pfValue*t.effectiveOpacity()},"getTextOpacity"),M9e.drawCachedElement=function(e,t,r,n,i,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()||n&&!kEe(h,n)||(h=t.isEdge(),n=t.element()._private.rscratch.badLine,this.drawElementUnderlay(e,t),this.drawCachedElementPortion(e,t,s,r,i,a,D9e,$9e),h&&n||this.drawCachedElementPortion(e,t,o,r,i,a,O9e,F9e),h&&!n&&(this.drawCachedElementPortion(e,t,l,r,i,a,P9e,F9e),this.drawCachedElementPortion(e,t,c,r,i,a,B9e,F9e)),this.drawElementOverlay(e,t))},M9e.drawElements=function(e,t){for(var r=0;r<t.length;r++)this.drawElement(e,t[r])},M9e.drawCachedElements=function(e,t,r,n){for(var i=0;i<t.length;i++)this.drawCachedElement(e,t[i],r,n)},M9e.drawCachedNodes=function(e,t,r,n){for(var i=0;i<t.length;i++){var a=t[i];a.isNode()&&this.drawCachedElement(e,a,r,n)}},M9e.drawLayeredElements=function(e,t,r,n){var i=this.data.lyrTxrCache.getLayers(t,r);if(i)for(var a=0;a<i.length;a++){var s=i[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,n)},z9e={drawEdge:function(t,r,e){var n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],w=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],k=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],T=this,E=r._private.rscratch;k&&!r.visible()||E.badLine||null==E.allpts||isNaN(E.allpts[0])||(e&&t.translate(-(n=e).x1,-n.y1),d=k?r.pstyle("opacity").value:1,k=k?r.pstyle("line-opacity").value:1,i=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"===i?(T.eleStrokeStyle(t,r,e),T.drawEdgeTrianglePath(r,t,E.allpts)):(t.lineWidth=s,t.lineCap=o,T.eleStrokeStyle(t,r,e),T.drawEdgePath(r,t,E.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?(T.colorStrokeStyle(t,c[0],c[1],c[2],e),"straight-triangle"===i?T.drawEdgeTrianglePath(r,t,E.allpts):(T.drawEdgePath(r,t,E.allpts,a),t.lineCap="butt")):t.lineCap="butt"},"drawLineOutline"),p=mt(function(){w&&T.drawEdgeOverlay(t,r)},"drawOverlay"),g=mt(function(){w&&T.drawEdgeUnderlay(t,r)},"drawUnderlay"),f=mt(function(){T.drawArrowheads(t,r,0<arguments.length&&void 0!==arguments[0]?arguments[0]:u)},"drawArrows"),m=mt(function(){T.drawElementText(t,r,null,b)},"drawText"),t.lineJoin="round","yes"===r.pstyle("ghost").value?(y=r.pstyle("ghost-offset-x").pfValue,v=r.pstyle("ghost-offset-y").pfValue,x=r.pstyle("ghost-opacity").value,x*=h,t.translate(y,v),d(x),f(x),t.translate(-y,-v)):k(),g(),d(),f(),p(),m(),e&&t.translate(n.x1,n.y1))}},G9e=mt(function(o){if(["overlay","underlay"].includes(o))return function(e,t){var r,n,i,a,s;t.visible()&&0!==(r=t.pstyle("".concat(o,"-opacity")).value)&&(n=this.usePaths(),i=t._private.rscratch,a=2*t.pstyle("".concat(o,"-padding")).pfValue,s=t.pstyle("".concat(o,"-color")).value,e.lineWidth=a,"self"!==i.edgeType||n?e.lineCap="round":e.lineCap="butt",this.colorStrokeStyle(e,s[0],s[1],s[2],r),this.drawEdgePath(t,e,i.allpts,"solid"))};throw new Error("Invalid state")},"drawEdgeOverlayUnderlay"),z9e.drawEdgeOverlay=G9e("overlay"),z9e.drawEdgeUnderlay=G9e("underlay"),z9e.drawEdgePath=function(e,t,r,n){var i,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?(i=t=a.pathCache,o=!0):(i=t=new Path2D,a.pathCacheKey=e,a.pathCache=i)),s.setLineDash)switch(n){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=Qwe(a.roundCorners);try{for(g.s();!(p=g.n()).done;)$ke(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(i):t.stroke(),t.setLineDash&&t.setLineDash([])},z9e.drawEdgeTrianglePath=function(e,t,r){t.fillStyle=t.strokeStyle;for(var n=e.pstyle("width").pfValue,i=0;i+1<r.length;i+=2){var a=[r[i+2]-r[i],r[i+3]-r[i+1]],s=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=[(a=[a[1]/s,-a[0]/s])[0]*n/2,a[1]*n/2];t.beginPath(),t.moveTo(r[i]-s[0],r[i+1]-s[1]),t.lineTo(r[i]+s[0],r[i+1]+s[1]),t.lineTo(r[i+2],r[i+3]),t.closePath(),t.fill()}},z9e.drawArrowheads=function(e,t,r){var n=t._private.rscratch,i="haystack"===n.edgeType;i||this.drawArrowhead(e,t,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(e,t,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(e,t,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),i||this.drawArrowhead(e,t,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)},z9e.drawArrowhead=function(e,t,r,n,i,a,s){var o,l,c,h,u,d,p;isNaN(n)||null==n||isNaN(i)||null==i||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,n,i,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,n,i,a))},z9e.drawArrowShape=function(e,t,r,n,i,a,s,o,l){var c,h,u,d=this.usePaths()&&"triangle-cross"!==i,p=!1,g=t,f={x:s,y:o},e=e.pstyle("arrow-scale").value,e=this.getArrowWidth(n,e),m=this.arrowShapes[i];d&&(null!=(u=(h=this.arrowPathCache=this.arrowPathCache||[])[i=u8e(i)])?(c=t=u,p=!0):(c=t=new Path2D,h[i]=c)),p||(t.beginPath&&t.beginPath(),d?m.draw(t,1,0,{x:0,y:0},1):m.draw(t,e,l,f,n),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))},U9e={safeDrawImage:function(e,t,r,n,i,a,s,o,l,c){if(!(i<=0||a<=0||l<=0||c<=0))try{e.drawImage(t,r,n,i,a,s,o,l,c)}catch(e){E8e(e)}},drawInscribedImage:function(e,t,r,n,i){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",n),d=h(r,"background-repeat","value",n),p=r.width(),g=r.height(),f=2*r.padding(),p=p+("inner"===h(r,"background-width-relative-to","value",n)?0:f),g=g+("inner"===h(r,"background-height-relative-to","value",n)?0:f),f=r._private.rscratch,m="node"===h(r,"background-clip","value",n),i=h(r,"background-image-opacity","value",n)*i,y=h(r,"background-image-smoothing","value",n),v=r.pstyle("corner-radius").value,x=("auto"!==v&&(v=r.pstyle("corner-radius").pfValue),t.width||t.cachedW),b=t.height||t.cachedH,w=(null!=x&&null!=b||(document.body.appendChild(t),x=t.cachedW=t.width||t.offsetWidth,b=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t)),x),k=b;"auto"!==h(r,"background-width","value",n)&&(w="%"===h(r,"background-width","units",n)?h(r,"background-width","pfValue",n)*p:h(r,"background-width","pfValue",n)),"auto"!==h(r,"background-height","value",n)&&(k="%"===h(r,"background-height","units",n)?h(r,"background-height","pfValue",n)*g:h(r,"background-height","pfValue",n)),0!==w&&0!==k&&("contain"===u?(w*=a=Math.min(p/w,g/k),k*=a):"cover"===u&&(w*=a=Math.max(p/w,g/k),k*=a),u=l-p/2,a=h(r,"background-position-x","units",n),s=h(r,"background-position-x","pfValue",n),u+="%"===a?(p-w)*s:s,a=h(r,"background-offset-x","units",n),s=h(r,"background-offset-x","pfValue",n),u+="%"===a?(p-w)*s:s,a=c-g/2,s=h(r,"background-position-y","units",n),o=h(r,"background-position-y","pfValue",n),a+="%"===s?(g-k)*o:o,s=h(r,"background-offset-y","units",n),o=h(r,"background-offset-y","pfValue",n),a+="%"===s?(g-k)*o:o,f.pathCache&&(u-=l,a-=c,c=l=0),h=e.globalAlpha,e.globalAlpha=i,n=this.getImgSmoothing(e),s=!1,"no"===y&&n?(this.setImgSmoothing(e,!1),s=!0):"yes"!==y||n||(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,x,b,u,a,w,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,n)}},q9e={eleTextBiggerThanMin:function(e,t){var r,n;return t||(n=e.cy().zoom(),r=this.getPixelRatio(),n=Math.ceil(iEe(n*r)),t=Math.pow(2,n)),!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(e,t,r,n,i){var a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];if(null==n){if(a&&!this.eleTextBiggerThanMin(t))return}else if(!1===n)return;if(t.isNode()){if(!(n=t.pstyle("label"))||!n.value)return;n=this.getLabelJustification(t),e.textAlign=n}else{var n=t.element()._private.rscratch.badLine,s=t.pstyle("label"),o=t.pstyle("source-label"),l=t.pstyle("target-label");if(n||(!s||!s.value)&&(!o||!o.value)&&(!l||!l.value))return;e.textAlign="center"}e.textBaseline="bottom";var c,n=!r;r&&e.translate(-(c=r).x1,-c.y1),null==i?(this.drawText(e,t,null,n,a),t.isEdge()&&(this.drawText(e,t,"source",n,a),this.drawText(e,t,"target",n,a))):this.drawText(e,t,i,n,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],n=t.pstyle("font-style").strValue,i=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=n+" "+s+" "+i+" "+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(Hke,"roundRect"),q9e.getTextAngle=function(e,t){var r=e._private.rscratch,n=e.pstyle((t?t+"-":"")+"text-rotation");return"autorotate"===n.strValue?(r=O8e(r,"labelAngle",t),e.isEdge()?r:0):"none"===n.strValue?0:n.pfValue},q9e.drawText=function(e,t,r){var n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],i=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=O8e(i,"labelX",r="main"===r?null:r),c=O8e(i,"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=O8e(i,"labelWidth",r),p=O8e(i,"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=n?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,n=t.pstyle("text-background-padding").pfValue,x=0===t.pstyle("text-background-shape").strValue.indexOf("round");if(0<g||0<v&&0<u){var b=l-n;switch(m){case"left":b-=d;break;case"center":b-=d/2}var w=c-p-n,k=d+2*n,n=p+2*n;if(0<g&&(E=e.fillStyle,T=t.pstyle("text-background-color").value,e.fillStyle="rgba("+T[0]+","+T[1]+","+T[2]+","+g*a+")",x?Hke(e,b,w,k,n,2):e.fillRect(b,w,k,n),e.fillStyle=E),0<v&&0<u){var T=e.strokeStyle,g=e.lineWidth,E=t.pstyle("text-border-color").value,C=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+E[0]+","+E[1]+","+E[2]+","+u*a+")",e.lineWidth=v,e.setLineDash)switch(C){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=v/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}x?Hke(e,b,w,k,n,2,"stroke"):e.strokeRect(b,w,k,n),"double"===C&&(E=v/2,x?Hke(e,b+E,w+E,k-2*E,n-2*E,2,"stroke"):e.strokeRect(b+E,w+E,k-2*E,n-2*E)),e.setLineDash&&e.setLineDash([]),e.lineWidth=g,e.strokeStyle=T}}var S=2*t.pstyle("text-outline-width").pfValue;if(0<S&&(e.lineWidth=S),"wrap"===t.pstyle("text-wrap").value){var _=O8e(i,"labelWrapCachedLines",r),A=O8e(i,"labelLineHeight",r),u=d/2;switch("auto"!==(a=this.getLabelJustification(t))&&("left"===m?"left"===a?l+=-d:"center"===a&&(l+=-u):"center"===m?"left"===a?l+=-u:"right"===a&&(l+=u):"right"===m&&("center"===a?l+=u:"right"===a&&(l+=d))),y){case"top":c-=(_.length-1)*A;break;case"center":case"bottom":c-=(_.length-1)*A}for(var L=0;L<_.length;L++)0<S&&e.strokeText(_[L],l,c),e.fillText(_[L],l,c),c+=A}else 0<S&&e.strokeText(h,l,c),e.fillText(h,l,c);0!==f&&(e.rotate(-f),e.translate(-s,-o))}}},j9e={drawNode:function(T,E,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],C=this,s=E._private,o=s.rscratch,S=E.position();if(ae(S.x)&&ae(S.y)&&(!r||E.visible())){var n,l=r?E.effectiveOpacity():1,_=C.usePaths(),i=!1,r=E.padding(),A=E.width()+2*r,L=E.height()+2*r;e&&T.translate(-(n=e).x1,-n.y1);for(var a=E.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=E.cy().style().getIndexedStyle(E,"background-image-crossorigin","value",u),P++,h[u]=C.getCachedImage(d,B,function(){s.backgroundTimestamp=Date.now(),E.emitAndNotify("background")}))}var p,g,f,m,y,v=E.pstyle("background-blacken").value,N=E.pstyle("border-width").pfValue,$=E.pstyle("background-opacity").value*l,x=E.pstyle("border-color").value,F=E.pstyle("border-style").value,z=E.pstyle("border-join").value,G=E.pstyle("border-cap").value,I=E.pstyle("border-position").value,U=E.pstyle("border-dash-pattern").pfValue,q=E.pstyle("border-dash-offset").pfValue,j=E.pstyle("border-opacity").value*l,R=E.pstyle("outline-width").pfValue,b=E.pstyle("outline-color").value,W=E.pstyle("outline-style").value,Y=E.pstyle("outline-opacity").value*l,M=E.pstyle("outline-offset").value,D=E.pstyle("corner-radius").value,r=("auto"!==D&&(D=E.pstyle("corner-radius").pfValue),mt(function(){C.eleFillStyle(T,E,0<arguments.length&&void 0!==arguments[0]?arguments[0]:$)},"setupShapeColor")),H=mt(function(){C.colorStrokeStyle(T,x[0],x[1],x[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:j)},"setupBorderColor"),V=mt(function(){C.colorStrokeStyle(T,b[0],b[1],b[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:Y)},"setupOutlineColor"),X=mt(function(e,t,r,n){var i,a=C.nodePathCache=C.nodePathCache||[],n=d8e("polygon"===r?r+","+n.join(","):r,""+t,""+e,""+D),t=!1;return null!=(r=a[n])?(t=!0,o.pathCache=i=r):(i=new Path2D,a[n]=o.pathCache=i),{path:i,cacheHit:t}},"getPath"),w=E.pstyle("shape").strValue,k=E.pstyle("shape-polygon-points").pfValue,k=(_&&(T.translate(S.x,S.y),w=X(A,L,w,k),p=w.path,i=w.cacheHit),mt(function(){var e;i||(e=_?{x:0,y:0}:S,C.nodeShapes[C.getNodeShape(E)].draw(p||T,e.x,e.y,A,L,D,o)),_?T.fill(p):T.fill()},"drawShape")),w=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,n=0,i=0;i<h.length;i++){var a=E.cy().style().getIndexedStyle(E,"background-image-containment","value",i);t&&"over"===a||!t&&"inside"===a?n++:c[i]&&h[i].complete&&!h[i].error&&(n++,C.drawInscribedImage(T,h[i],E,i,e))}s.backgrounding=n!==P,r!==s.backgrounding&&E.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;C.hasPie(E)&&(C.drawPie(T,E,t),e)&&(_||C.nodeShapes[C.getNodeShape(E)].draw(T,S.x,S.y,A,L,D,o))},"drawPie"),Z=mt(function(){var e=0<v?0:255;0!==v&&(C.colorFillStyle(T,e,e,e,(0<v?v:-v)*(0<arguments.length&&void 0!==arguments[0]?arguments[0]:l)),_?T.fill(p):T.fill())},"darken"),Q=mt(function(){if(0<N){if(T.lineWidth=N,T.lineCap=G,T.lineJoin=z,T.setLineDash)switch(F){case"dotted":T.setLineDash([1,1]);break;case"dashed":T.setLineDash(U),T.lineDashOffset=q;break;case"solid":case"double":T.setLineDash([])}var e;"center"!==I?(T.save(),T.lineWidth*=2,"inside"===I?_?T.clip(p):T.clip():((e=new Path2D).rect(-A/2-N,-L/2-N,A+2*N,L+2*N),e.addPath(p),T.clip(e,"evenodd")),_?T.stroke(p):T.stroke(),T.restore()):_?T.stroke(p):T.stroke(),"double"===F&&(T.lineWidth=N/3,e=T.globalCompositeOperation,T.globalCompositeOperation="destination-out",_?T.stroke(p):T.stroke(),T.globalCompositeOperation=e),T.setLineDash&&T.setLineDash([])}},"drawBorder"),J=mt(function(){if(0<R){if(T.lineWidth=R,T.lineCap="butt",T.setLineDash)switch(W){case"dotted":T.setLineDash([1,1]);break;case"dashed":T.setLineDash([4,2]);break;case"solid":case"double":T.setLineDash([])}var e,t=S,r=(_&&(t={x:0,y:0}),C.getNodeShape(E)),n="inside"===I?0:N,i=("outside"===I&&(n*=2),(A+n+(R+M))/A),a=(L+n+(R+M))/L,s=A*i,o=L*a,l=C.nodeShapes[r].points;if(_&&(e=X(s,o,r,l).path),"ellipse"===r)C.drawEllipsePath(e||T,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*(n+M+R):"round-heptagon"===r?(c=1.075*(n+M+R),u=-(n/2+M+R)/35):"round-hexagon"===r?c=1.12*(n+M+R):"round-pentagon"===r?(c=1.13*(n+M+R),u=-(n/2+M+R)/15):"round-tag"===r?(c=1.12*(n+M+R),h=.07*(n/2+R+M)):"round-triangle"===r&&(c=(n+M+R)*(Math.PI/2),u=-(n+M/2+R)/Math.PI),0!==c&&(s=A*(i=(A+c)/A),["round-hexagon","round-tag"].includes(r)||(o=L*(a=(L+c)/L)));for(var d=s/2,p=o/2,g=(D="auto"===D?KEe(s,o):D)+(n+R+M)/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,x,b=f.length,w=f[b-1],k=0;k<b;k++)v=f[k%b],x=f[(k+1)%b],m[k]=Fke(w,v,x,g),w=v;C.drawRoundPolygonPath(e||T,t.x+h,t.y+u,A*i,L*a,l,m)}else["roundrectangle","round-rectangle"].includes(r)?(D="auto"===D?XEe(s,o):D,C.drawRoundRectanglePath(e||T,t.x,t.y,s,o,D+(n+R+M)/2)):["cutrectangle","cut-rectangle"].includes(r)?(D="auto"===D?ZEe():D,C.drawCutRectanglePath(e||T,t.x,t.y,s,o,null,D+(n+R+M)/4)):["bottomroundrectangle","bottom-round-rectangle"].includes(r)?(D="auto"===D?XEe(s,o):D,C.drawBottomRoundRectanglePath(e||T,t.x,t.y,s,o,D+(n+R+M)/2)):"barrel"===r?C.drawBarrelPath(e||T,t.x,t.y,s,o):(l=r.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(r)?PEe(BEe(l,(n+R+M)/A)):PEe(BEe(l,-(n+R+M)/A)),C.drawPolygonPath(e||T,t.x,t.y,A,L,l));_?T.stroke(e):T.stroke(),"double"===W&&(T.lineWidth=n/3,c=T.globalCompositeOperation,T.globalCompositeOperation="destination-out",_?T.stroke(e):T.stroke(),T.globalCompositeOperation=c),T.setLineDash&&T.setLineDash([])}},"drawOutline"),ee=mt(function(){t&&C.drawNodeOverlay(T,E,S,A,L)},"drawOverlay"),te=mt(function(){t&&C.drawNodeUnderlay(T,E,S,A,L)},"drawUnderlay"),re=mt(function(){C.drawElementText(T,E,null,O)},"drawText");"yes"===E.pstyle("ghost").value&&(g=E.pstyle("ghost-offset-x").pfValue,f=E.pstyle("ghost-offset-y").pfValue,y=(m=E.pstyle("ghost-opacity").value)*l,T.translate(g,f),V(),J(),r(m*$),k(),w(y,!0),H(m*j),Q(),K(0!==v||0!==N),w(y,!1),Z(y),T.translate(-g,-f)),_&&T.translate(-S.x,-S.y),te(),_&&T.translate(S.x,S.y),V(),J(),r(),k(),w(l,!0),H(),Q(),K(0!==v||0!==N),w(l,!1),Z(),_&&T.translate(-S.x,-S.y),re(),ee(),e&&T.translate(n.x1,n.y1)}}},W9e=mt(function(u){if(["overlay","underlay"].includes(u))return function(e,t,r,n,i){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!=n&&null!=i||(h=t.padding(),n=t.width()+2*h,i=t.height()+2*h),this.colorFillStyle(e,o[0],o[1],o[2],s),this.nodeShapes[l].draw(e,r.x,r.y,n+2*a,i+2*a,c),e.fill())};throw new Error("Invalid state")},"drawNodeOverlayUnderlay"),j9e.drawNodeOverlay=W9e("overlay"),j9e.drawNodeUnderlay=W9e("underlay"),j9e.hasPie=function(e){return(e=e[0])._private.hasPie},j9e.drawPie=function(e,t,r,n){t=t[0],n=n||t.position();var i=t.cy().style(),a=t.pstyle("pie-size"),s=n.x,o=n.y,n=t.width(),l=t.height(),c=Math.min(n,l)/2,h=0;this.usePaths()&&(o=s=0),"%"===a.units?c*=a.pfValue:void 0!==a.pfValue&&(c=a.pfValue/2);for(var u=1;u<=i.pieBackgroundN;u++){var d=t.pstyle("pie-"+u+"-background-size").value,p=t.pstyle("pie-"+u+"-background-color").value,g=t.pstyle("pie-"+u+"-background-opacity").value*r,f=d/100,m=(1<f+h&&(f=1-h),1.5*Math.PI+2*Math.PI*h),y=m+2*Math.PI*f;0===d||1<=h||1<h+f||(e.beginPath(),e.moveTo(s,o),e.arc(s,o,c,m,y),e.closePath(),this.colorFillStyle(e,p[0],p[1],p[2],g),e.fill(),h+=f)}},Y9e={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||[],n=!0,i=0;i<r.length;i++)if((t=r[i]).context===e){n=!1;break}return n&&r.push(t={context:e}),t},createGradientStyleFor:function(e,t,r,n,i){var a=this.usePaths(),s=r.pstyle(t+"-gradient-stop-colors").value,o=r.pstyle(t+"-gradient-stop-positions").pfValue;if("radial-gradient"===n)n=r.isEdge()?(t=r.sourceEndpoint(),n=r.targetEndpoint(),l=r.midpoint(),t=sEe(t,l),sEe(n,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,n));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]+","+i+")");return c},gradientFillStyle:function(e,t,r,n){if(!(t=this.createGradientStyleFor(e,"background",t,r,n)))return null;e.fillStyle=t},colorFillStyle:function(e,t,r,n,i){e.fillStyle="rgba("+t+","+r+","+n+","+i+")"},eleFillStyle:function(e,t,r){var n=t.pstyle("background-fill").value;"linear-gradient"===n||"radial-gradient"===n?this.gradientFillStyle(e,t,n,r):(n=t.pstyle("background-color").value,this.colorFillStyle(e,n[0],n[1],n[2],r))},gradientStrokeStyle:function(e,t,r,n){if(!(t=this.createGradientStyleFor(e,"line",t,r,n)))return null;e.strokeStyle=t},colorStrokeStyle:function(e,t,r,n,i){e.strokeStyle="rgba("+t+","+r+","+n+","+i+")"},eleStrokeStyle:function(e,t,r){var n=t.pstyle("line-fill").value;"linear-gradient"===n||"radial-gradient"===n?this.gradientStrokeStyle(e,t,n,r):(n=t.pstyle("line-color").value,this.colorStrokeStyle(e,n[0],n[1],n[2],r))},matchCanvasSize:function(e){var t,r=this,n=r.data,i=(s=r.findContainerClientCoords())[2],a=s[3],s=r.getPixelRatio(),o=r.motionBlurPxRatio,l=i*(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=n.canvasContainer).style.width=i+"px",e.style.height=a+"px";for(var h=0;h<r.CANVAS_LAYERS;h++)(t=n.canvases[h]).width=l,t.height=c,t.style.width=i+"px",t.style.height=a+"px";for(h=0;h<r.BUFFER_COUNT;h++)(t=n.bufferCanvases[h]).width=l,t.height=c,t.style.width=i+"px",t.style.height=a+"px";s<=(r.textureMult=1)&&(t=n.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,n){this.render({forcedContext:e,forcedZoom:t,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})},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||N8e(),s.cy),o=e.forcedContext,l=e.drawAllLayers,r=e.drawOnlyNodeLayer,c=e.forcedZoom,h=e.forcedPan,n=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,u=s.data,i=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!==n&&(s.invalidateContainerClientCoordsCache(),s.matchCanvasSize(s.container),s.redrawHint("eles",!0),s.redrawHint("drag",!0)),s.prevPxRatio=n),!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&&(i[s.NODE]=!0,i[s.SELECT_BOX]=!0),t.style()),v=t.zoom(),x=void 0!==c?c:v,b=t.pan(),w={x:b.x,y:b.y},k={zoom:v,pan:{x:b.x,y:b.y}},T=(void 0===(T=s.prevViewport)||k.zoom!==T.zoom||k.pan.x!==T.pan.x||k.pan.y!==T.pan.y||f&&!g||(s.motionBlurPxRatio=1),x*=n,(w=h||w).x*=n,w.y*=n,s.getCachedZSortedEles());function E(e,t,r,n,i){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",s.colorFillStyle(e,255,255,255,s.motionBlurTransparency),e.fillRect(t,r,n,i),e.globalCompositeOperation=a}function C(e,t){var r,n,i,a=s.clearingMotionBlur||e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=w,n=x,i=s.canvasWidth,s.canvasHeight):(r={x:b.x*p,y:b.y*p},n=v*p,i=s.canvasWidth*p,s.canvasHeight*p);e.setTransform(1,0,0,1,0,0),"motionBlur"===t?E(e,0,0,i,a):o||void 0!==t&&!t||e.clearRect(0,0,i,a),l||(e.translate(r.x,r.y),e.scale(n,n)),h&&e.translate(h.x,h.y),c&&e.scale(c,c)}mt(E,"mbclear"),mt(C,"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:n*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}),i[s.DRAG]=!1,i[s.NODE]=!1,S=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,S.setTransform(1,0,0,1,0,0),d?E(S,0,0,k.width,k.height):S.clearRect(0,0,k.width,k.height),f=m.core("outside-texture-bg-color").value,m=m.core("outside-texture-bg-opacity").value,s.colorFillStyle(S,f[0],f[1],f[2],m),S.fillRect(0,0,k.width,k.height),v=t.zoom(),C(S,!1),S.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n),S.drawImage(g,k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n)):s.textureOnViewport&&!o&&(s.textureCache=null);var S,_,f=t.extent(),m=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),g=s.hideEdgesOnViewport&&m;(m=[])[s.NODE]=!i[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,m[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),m[s.DRAG]=!i[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,m[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),(i[s.NODE]||l||r||m[s.NODE])&&(_=d&&!m[s.NODE]&&1!==p,C(S=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(S,T.nondrag,n,f):s.drawLayeredElements(S,T.nondrag,n,f),s.debug&&s.drawDebugPoints(S,T.nondrag),l||d||(i[s.NODE]=!1)),!r&&(i[s.DRAG]||l||m[s.DRAG])&&(_=d&&!m[s.DRAG]&&1!==p,C(S=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(S,T.drag,n,f):s.drawCachedElements(S,T.drag,n,f),s.debug&&s.drawDebugPoints(S,T.drag),l||d||(i[s.DRAG]=!1)),this.drawSelectionRectangle(e,C),d&&1!==p&&(r=u.contexts[s.NODE],_=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],n=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):E(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"),(i[s.NODE]||m[s.NODE])&&(f(r,_,m[s.NODE]),i[s.NODE]=!1),i[s.DRAG]||m[s.DRAG])&&(f(g,n,m[s.DRAG]),i[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,i[s.NODE]=!0,i[s.DRAG]=!0,s.redraw()},100)),o||t.emit("render")},drawSelectionRectangle:function(e,t){var r,n=this,i=n.cy,a=n.data,i=i.style(),s=e.drawOnlyNodeLayer,o=e.drawAllLayers,l=a.canvasNeedsRedraw;(n.showFps||!s&&l[n.SELECT_BOX]&&!o)&&(t(s=e.forcedContext||a.contexts[n.SELECT_BOX]),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)&&(r=n.cy.zoom(),t=i.core("selection-box-border-width").value/r,s.lineWidth=t,s.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",s.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),0<t)&&(s.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",s.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1])),a.bgActivePosistion&&!n.hoverData.selecting&&(r=n.cy.zoom(),e=a.bgActivePosistion,s.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",s.beginPath(),s.arc(e.x,e.y,i.core("active-bg-size").pfValue/r,0,2*Math.PI),s.fill()),t=n.lastRedrawTime,n.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",H9e||(i=s.measureText(e),H9e=i.actualBoundingBoxAscent),s.fillText(e,0,H9e),s.strokeRect(0,H9e+10,250,20),s.fillRect(0,H9e+10,250*Math.min(a/60,1),20)),o||(l[n.SELECT_BOX]=!1))}},mt(Vke,"compileShader"),mt(Xke,"createProgram"),mt(Kke,"createTextureCanvas"),mt(Zke,"getEffectivePanZoom"),mt(Qke,"modelToRenderedPosition"),mt(Jke,"toWebGLColor"),mt(eTe,"indexToVec4"),mt(tTe,"vec4ToIndex"),mt(rTe,"createTexture"),mt(nTe,"getTypeInfo"),mt(iTe,"createTypedArray"),mt(aTe,"createTypedArrayView"),mt(sTe,"createBufferStaticDraw"),mt(oTe,"createBufferDynamicDraw"),mt(lTe,"createPickingFrameBuffer"),V9e=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(cTe,"create"),mt(hTe,"identity"),mt(uTe,"multiply"),mt(dTe,"translate"),mt(pTe,"rotate"),mt(gTe,"scale"),mt(fTe,"projection"),X9e={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},K9e=I8e({getKey:null,drawElement:null,getBoundingBox:null,getRotation:null,getRotationPoint:null,getRotationOffset:null,isVisible:null,getPadding:null}),mt(R,"Atlas"),zwe(R,[{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,n=this.maxTexWidth,i=t*(r/=e),a=e*r;return n<i&&(i=t*(r=n/t),a=e*r),{scale:r,texW:i,texH:a}},"getScale")},{key:"draw",value:mt(function(e,n,i){var l=this,c=this.atlasSize,t=this.rows,h=this.texHeight,a=(r=this.getScale(n)).scale,u=r.texW,d=r.texH,p=[null,null],g=mt(function(e,t){var r;i&&t&&(t=t.context,r=e.x,e=h*e.row,t.save(),t.translate(r,e),t.scale(a,a),i(t,n),t.restore())},"drawAt"),r=mt(function(){g(l.freePointer,l.canvas),p[0]={x:l.freePointer.x,y:l.freePointer.row*h,w:u,h:d},p[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(),g({x:0,row:0},e),c-l.freePointer.x),n=u-r,i=h,a=l.freePointer.x,s=l.freePointer.row*h,o=r;t.context.drawImage(e,0,0,o,i,a,s,o,i),p[0]={x:a,y:s,w:o,h:d},a=(l.freePointer.row+1)*h,s=n,t&&t.context.drawImage(e,r,0,s,i,0,a,s,i),p[1]={x:0,y:a,w:s,h:d},l.freePointer.x=n,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,p),this.needsBuffer=!0,p},"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=this.atlasSize,r=this.rows,e=this.getScale(e).texW;return!(this.freePointer.x+e>t)||this.freePointer.row<r-1},"canFit")},{key:"bufferIfNeeded",value:mt(function(e){this.texture||(this.texture=rTe(e,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1)},"bufferIfNeeded")},{key:"dispose",value:mt(function(){this.texture&&(this.texture.deleteTexture(),this.texture=null,this.needsBuffer=!0)},"dispose")}]),Z9e=R,mt(I,"AtlasCollection"),zwe(I,[{key:"getKeys",value:mt(function(){return new Set(this.styleKeyToAtlas.keys())},"getKeys")},{key:"getIdsFor",value:mt(function(e){var t=this.keyToIds.get(e);return t||(t=new Set,this.keyToIds.set(e,t)),t},"getIdsFor")},{key:"_createAtlas",value:mt(function(){var e=this.r,t=this.opts;return new Z9e(e,t)},"_createAtlas")},{key:"_getScratchCanvas",value:mt(function(){var e,t,r,n;return this.scratch||(e=this.r,r=(t=this.opts).webglTexSize,n=Math.floor(r/t.webglTexRows),this.scratch=t.createTextureCanvas(e,r,n,"scratch")),this.scratch},"_getScratchCanvas")},{key:"draw",value:mt(function(e,t,r,n){this.styleKeyNeedsRedraw.has(t)&&(this.styleKeyNeedsRedraw.delete(t),this.deleteKey(e,t),(i=this.styleKeyToAtlas.get(t))&&(i.forceGC=!0),this.styleKeyToAtlas.delete(t));var i=this.styleKeyToAtlas.get(t);return i||((i=this.atlases[this.atlases.length-1])&&i.canFit(r)||(i=this._createAtlas(),this.atlases.push(i)),i.draw(t,r,n),this.styleKeyToAtlas.set(t,i),this.getIdsFor(t).add(e),this.idToKey.set(e,t)),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:"deleteKey",value:mt(function(e,t){this.idToKey.delete(e),this.getIdsFor(t).delete(e)},"deleteKey")},{key:"checkKeyIsInvalid",value:mt(function(e,t){var r;return!!this.idToKey.has(e)&&(r=this.idToKey.get(e))!=t&&(this.deleteKey(e,r),!0)},"checkKeyIsInvalid")},{key:"_getKeysToCollect",value:mt(function(){var e,t=new Set,r=Qwe(this.styleKeyToAtlas.keys());try{for(r.s();!(e=r.n()).done;){var n=e.value;0==this.getIdsFor(n).size&&t.add(n)}}catch(e){r.e(e)}finally{r.f()}return t},"_getKeysToCollect")},{key:"gc",value:mt(function(){var c=this,e=this.atlases.some(function(e){return e.forceGC}),h=this._getKeysToCollect();if(0!==h.size||e){var u,d=[],p=new Map,g=null,t=Qwe(this.atlases);try{var r=mt(function(){var t=u.value,e=t.getKeys(),r=mTe(h,e);if(0===r.size&&!t.forceGC)return d.push(t),e.forEach(function(e){return p.set(e,t)}),"continue";g||(g=c._createAtlas(),d.push(g));var n,i=Qwe(e);try{for(i.s();!(n=i.n()).done;){var a,s,o,l=n.value;r.has(l)||(s=(a=Uwe(t.getOffsets(l),2))[0],o=a[1],g.canFit({w:s.w+o.w,h:s.h})||(g=c._createAtlas(),d.push(g)),c._copyTextureToNewAtlas(l,t,g),p.set(l,g))}}catch(e){i.e(e)}finally{i.f()}},"_loop");for(t.s();!(u=t.n()).done;)r()}catch(e){t.e(e)}finally{t.f()}this.atlases=d,this.styleKeyToAtlas=p}else console.log("nothing to garbage collect")},"gc")},{key:"_copyTextureToNewAtlas",value:mt(function(e,t,r){var n,i,a,s=Uwe(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)}):((n=this._getScratchCanvas()).clear(),n.context.drawImage(t.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h),n.context.drawImage(t.canvas,s.x,s.y,s.w,s.h,o.w,0,s.w,s.h),i=o.w+s.w,a=o.h,r.draw(e,{w:i,h:a},function(e){e.drawImage(n,0,0,i,a,0,0,i,a)}))},"_copyTextureToNewAtlas")},{key:"getCounts",value:mt(function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}},"getCounts")}]),Q9e=I,mt(mTe,"intersection"),mt(D,"AtlasManager"),zwe(D,[{key:"_cacheScratchCanvas",value:mt(function(e){var i=-1,a=-1,s=null,o=e.createTextureCanvas;e.createTextureCanvas=function(e,t,r,n){return n?s=s&&t==i&&r==a?s:o(e,i=t,a=r):o(e,t,r)}},"_cacheScratchCanvas")},{key:"addRenderType",value:mt(function(e,t){var r=new Q9e(this.r,this.globalOptions);this.renderTypes.set(e,y7e({type:e,atlasCollection:r},t))},"addRenderType")},{key:"getRenderTypes",value:mt(function(){return qwe(this.renderTypes.values())},"getRenderTypes")},{key:"getRenderTypeOpts",value:mt(function(e){return this.renderTypes.get(e)},"getRenderTypeOpts")},{key:"invalidate",value:mt(function(e){var t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=r.forceRedraw,i=void 0!==n&&n,a=void 0===(n=r.filterEle)?function(){return!0}:n,s=void 0===(n=r.filterType)?function(){return!0}:n,o=!1,l=Qwe(e);try{for(l.s();!(t=l.n()).done;){var c=t.value;if(a(c)){var h,u=c.id(),d=Qwe(this.getRenderTypes());try{for(d.s();!(h=d.n()).done;){var p,g=h.value;s(g.type)&&(p=g.getKey(c),i?(g.atlasCollection.deleteKey(u,p),g.atlasCollection.styleKeyNeedsRedraw.add(p),o=!0):o|=g.atlasCollection.checkKeyIsInvalid(u,p))}}catch(e){d.e(e)}finally{d.f()}}}}catch(e){l.e(e)}finally{l.f()}return o},"invalidate")},{key:"gc",value:mt(function(){var e,t=Qwe(this.getRenderTypes());try{for(t.s();!(e=t.n()).done;)e.value.atlasCollection.gc()}catch(e){t.e(e)}finally{t.f()}},"gc")},{key:"isRenderable",value:mt(function(e,t){return(t=this.getRenderTypeOpts(t))&&t.isVisible(e)},"isRenderable")},{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:"getOrCreateAtlas",value:mt(function(t,r,e){var n=this.renderTypes.get(e),e=n.getKey(t),i=t.id();return n.atlasCollection.draw(i,e,r,function(e){n.drawElement(e,t,r,!0,!0)})},"getOrCreateAtlas")},{key:"getAtlasIndexForBatch",value:mt(function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)return;this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t},"getAtlasIndexForBatch")},{key:"getIndexArray",value:mt(function(){return Array.from({length:this.maxAtlases},function(e,t){return t})},"getIndexArray")},{key:"getAtlasInfo",value:mt(function(e,t){var r=this.renderTypes.get(t),n=r.getBoundingBox(e),i=this.getOrCreateAtlas(e,n,t),a=this.getAtlasIndexForBatch(i);if(void 0!==a)return r=r.getKey(e),{atlasID:a,tex:a=(e=Uwe(i.getOffsets(r),2))[0],tex1:a,tex2:e[1],bb:n,type:t,styleKey:r}},"getAtlasInfo")},{key:"canAddToCurrentBatch",value:mt(function(e,t){return this.batchAtlases.length!==this.maxAtlasesPerBatch||(e=(t=this.renderTypes.get(t)).getKey(e),(t=t.atlasCollection.getAtlas(e))&&this.batchAtlases.includes(t))},"canAddToCurrentBatch")},{key:"setTransformMatrix",value:mt(function(e,t,r){var n,i=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],a=t.bb,s=t.tex1,o=t.tex2,t=this.getRenderTypeOpts(t.type),l=t.getPadding?t.getPadding(r):0,s=s.w/(s.w+o.w),o=this.getAdjustedBB(a,l,i,i?s:1-s);hTe(e),s=0!==(a=t.getRotation?t.getRotation(r):0)?(dTe(e,e,[(l=t.getRotationPoint(r)).x,l.y]),pTe(e,e,a),n=(i=t.getRotationOffset(r)).x+o.xOffset,i.y):(n=o.x1,o.y1),dTe(e,e,[n,s]),gTe(e,e,[o.w,o.h])},"setTransformMatrix")},{key:"getTransformMatrix",value:mt(function(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],n=cTe();return this.setTransformMatrix(n,e,t,r),n},"getTransformMatrix")},{key:"getAdjustedBB",value:mt(function(e,t,r,n){var i=e.x1,a=e.y1,s=e.w,e=e.h,t=(t&&(i-=t,a-=t,s+=2*t,e+=2*t),0),o=s*n;return r&&n<1?s=o:!r&&n<1&&(i+=t=s-o,s=o),{x1:i,y1:a,w:s,h:e,xOffset:t}},"getAdjustedBB")},{key:"getDebugInfo",value:mt(function(){var e,t=[],r=Qwe(this.renderTypes);try{for(r.s();!(e=r.n()).done;){var n=Uwe(e.value,2),i=n[0],a=n[1].atlasCollection.getCounts(),s=a.keyCount;t.push({type:i,keyCount:s,atlasCount:a.atlasCount})}}catch(e){r.e(e)}finally{r.f()}return t},"getDebugInfo")}]),J9e=D,mt(M,"ElementDrawingWebGL"),zwe(M,[{key:"addTextureRenderType",value:mt(function(e,t){this.atlasManager.addRenderType(e,t)},"addTextureRenderType")},{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;
|
||
|
||
// what are we rendering?
|
||
in int aVertType;
|
||
|
||
// for picking
|
||
in vec4 aIndex;
|
||
|
||
// For textures
|
||
in int aAtlasId; // which shader unit/atlas to use
|
||
in vec4 aTex1; // x/y/w/h of texture in atlas
|
||
in vec4 aTex2;
|
||
|
||
// for any transforms that are needed
|
||
in vec4 aScaleRotate1; // vectors use fewer attributes than matrices
|
||
in vec2 aTranslate1;
|
||
in vec4 aScaleRotate2;
|
||
in vec2 aTranslate2;
|
||
|
||
// for edges
|
||
in vec4 aPointAPointB;
|
||
in vec4 aPointCPointD;
|
||
in float aLineWidth;
|
||
in vec4 aEdgeColor;
|
||
|
||
out vec2 vTexCoord;
|
||
out vec4 vEdgeColor;
|
||
flat out int vAtlasId;
|
||
flat out vec4 vIndex;
|
||
flat out int vVertType;
|
||
|
||
void main(void) {
|
||
int vid = gl_VertexID;
|
||
vec2 position = aPosition;
|
||
|
||
if(aVertType == `.concat(0,`) {
|
||
float texX;
|
||
float texY;
|
||
float texW;
|
||
float texH;
|
||
mat3 texMatrix;
|
||
|
||
int vid = gl_VertexID;
|
||
if(vid <= 5) {
|
||
texX = aTex1.x;
|
||
texY = aTex1.y;
|
||
texW = aTex1.z;
|
||
texH = aTex1.w;
|
||
texMatrix = mat3(
|
||
vec3(aScaleRotate1.xy, 0.0),
|
||
vec3(aScaleRotate2.zw, 0.0),
|
||
vec3(aTranslate1, 1.0)
|
||
);
|
||
} else {
|
||
texX = aTex2.x;
|
||
texY = aTex2.y;
|
||
texW = aTex2.z;
|
||
texH = aTex2.w;
|
||
texMatrix = mat3(
|
||
vec3(aScaleRotate2.xy, 0.0),
|
||
vec3(aScaleRotate2.zw, 0.0),
|
||
vec3(aTranslate2, 1.0)
|
||
);
|
||
}
|
||
|
||
if(vid == 1 || vid == 2 || vid == 4 || vid == 7 || vid == 8 || vid == 10) {
|
||
texX += texW;
|
||
}
|
||
if(vid == 2 || vid == 4 || vid == 5 || vid == 8 || vid == 10 || vid == 11) {
|
||
texY += texH;
|
||
}
|
||
|
||
float d = float(uAtlasSize);
|
||
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
|
||
|
||
gl_Position = vec4(uPanZoomMatrix * texMatrix * vec3(position, 1.0), 1.0);
|
||
}
|
||
else if(aVertType == `).concat(1,` && vid < 6) {
|
||
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;
|
||
|
||
vec2 xBasis = target - source;
|
||
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
|
||
vec2 point = source + xBasis * position.x + yBasis * aLineWidth * position.y;
|
||
|
||
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
|
||
vEdgeColor = aEdgeColor;
|
||
}
|
||
else if(aVertType == `).concat(2,` && vid < 6) {
|
||
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 = pointA;
|
||
vec2 p1 = pointB;
|
||
vec2 p2 = pointC;
|
||
vec2 pos = position;
|
||
if(position.x == 1.0) {
|
||
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;
|
||
|
||
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);
|
||
}
|
||
|
||
vEdgeColor = aEdgeColor;
|
||
}
|
||
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);
|
||
|
||
mat3 transform = mat3(
|
||
vec3(aScaleRotate1.xy, 0.0),
|
||
vec3(aScaleRotate1.zw, 0.0),
|
||
vec3(aTranslate1, 1.0)
|
||
);
|
||
gl_Position = vec4(uPanZoomMatrix * transform * vec3(position, 1.0), 1.0);
|
||
vEdgeColor = aEdgeColor;
|
||
} else {
|
||
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
|
||
}
|
||
|
||
vAtlasId = aAtlasId;
|
||
vIndex = aIndex;
|
||
vVertType = aVertType;
|
||
}
|
||
`),n=this.atlasManager.getIndexArray(),i=Xke(t,r,`#version 300 es
|
||
precision highp float;
|
||
|
||
// define texture unit for each node in the batch
|
||
`.concat(n.map(function(e){return"uniform sampler2D uTexture".concat(e,";")}).join(`
|
||
`),`
|
||
|
||
uniform vec4 uBGColor;
|
||
|
||
in vec2 vTexCoord;
|
||
in vec4 vEdgeColor;
|
||
flat in int vAtlasId;
|
||
flat in vec4 vIndex;
|
||
flat in int vVertType;
|
||
|
||
out vec4 outColor;
|
||
|
||
void main(void) {
|
||
if(vVertType == `).concat(0,`) {
|
||
`).concat(n.map(function(e){return"if(vAtlasId == ".concat(e,") outColor = texture(uTexture").concat(e,", vTexCoord);")}).join(`
|
||
else `),`
|
||
} else if(vVertType == `).concat(3,`) {
|
||
// blend arrow color with background (using premultiplied alpha)
|
||
outColor.rgb = vEdgeColor.rgb + (uBGColor.rgb * (1.0 - vEdgeColor.a));
|
||
outColor.a = 1.0; // make opaque, masks out line under arrow
|
||
} else {
|
||
outColor = vEdgeColor;
|
||
}
|
||
|
||
`).concat(e.picking?`if(outColor.a == 0.0) discard;
|
||
else outColor = vIndex;`:"",`
|
||
}
|
||
`));i.aPosition=t.getAttribLocation(i,"aPosition"),i.aIndex=t.getAttribLocation(i,"aIndex"),i.aVertType=t.getAttribLocation(i,"aVertType"),i.aAtlasId=t.getAttribLocation(i,"aAtlasId"),i.aTex1=t.getAttribLocation(i,"aTex1"),i.aTex2=t.getAttribLocation(i,"aTex2"),i.aScaleRotate1=t.getAttribLocation(i,"aScaleRotate1"),i.aTranslate1=t.getAttribLocation(i,"aTranslate1"),i.aScaleRotate2=t.getAttribLocation(i,"aScaleRotate2"),i.aTranslate2=t.getAttribLocation(i,"aTranslate2"),i.aPointAPointB=t.getAttribLocation(i,"aPointAPointB"),i.aPointCPointD=t.getAttribLocation(i,"aPointCPointD"),i.aLineWidth=t.getAttribLocation(i,"aLineWidth"),i.aEdgeColor=t.getAttribLocation(i,"aEdgeColor"),i.uPanZoomMatrix=t.getUniformLocation(i,"uPanZoomMatrix"),i.uAtlasSize=t.getUniformLocation(i,"uAtlasSize"),i.uBGColor=t.getUniformLocation(i,"uBGColor"),i.uTextures=[];for(var a=0;a<this.atlasManager.maxAtlases;a++)i.uTextures.push(t.getUniformLocation(i,"uTexture".concat(a)));return i},"createShaderProgram")},{key:"createVAO",value:mt(function(){var e=[].concat(e=[0,0,1,0,1,1,0,0,1,1,0,1],e),t=(this.vertexCount=e.length/2,this.maxInstances),r=this.gl,n=this.program,i=r.createVertexArray();return r.bindVertexArray(i),sTe(r,"vec2",n.aPosition,e),this.indexBuffer=oTe(r,t,"vec4",n.aIndex),this.vertTypeBuffer=oTe(r,t,"int",n.aVertType),this.atlasIdBuffer=oTe(r,t,"int",n.aAtlasId),this.tex1Buffer=oTe(r,t,"vec4",n.aTex1),this.tex2Buffer=oTe(r,t,"vec4",n.aTex2),this.scaleRotate1Buffer=oTe(r,t,"vec4",n.aScaleRotate1),this.translate1Buffer=oTe(r,t,"vec2",n.aTranslate1),this.scaleRotate2Buffer=oTe(r,t,"vec4",n.aScaleRotate2),this.translate2Buffer=oTe(r,t,"vec2",n.aTranslate2),this.pointAPointBBuffer=oTe(r,t,"vec4",n.aPointAPointB),this.pointCPointDBuffer=oTe(r,t,"vec4",n.aPointCPointD),this.lineWidthBuffer=oTe(r,t,"float",n.aLineWidth),this.edgeColorBuffer=oTe(r,t,"vec4",n.aEdgeColor),r.bindVertexArray(null),i},"createVAO")},{key:"buffers",get:mt(function(){var t=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(e){return e.endsWith("Buffer")}).map(function(e){return t[e]})),this._buffers},"get")},{key:"startFrame",value:mt(function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:X9e.SCREEN;this.panZoomMatrix=e,this.debugInfo=t,this.renderTarget=r,this.startBatch()},"startFrame")},{key:"startBatch",value:mt(function(){this.instanceCount=0,this.atlasManager.startBatch()},"startBatch")},{key:"endFrame",value:mt(function(){this.endBatch()},"endFrame")},{key:"getTempMatrix",value:mt(function(){return this.tempMatrix=this.tempMatrix||cTe()},"getTempMatrix")},{key:"drawTexture",value:mt(function(e,t,r){var n=this.atlasManager;if(n.isRenderable(e,r)){n.canAddToCurrentBatch(e,r)||this.endBatch();var i=this.instanceCount,a=(this.vertTypeBuffer.getView(i)[0]=0,eTe(t,this.indexBuffer.getView(i)),n.getAtlasInfo(e,r,a)),t=a.atlasID,r=a.tex1,s=a.tex2;this.atlasIdBuffer.getView(i)[0]=t,(t=this.tex1Buffer.getView(i))[0]=r.x,t[1]=r.y,t[2]=r.w,t[3]=r.h,(t=this.tex2Buffer.getView(i))[0]=s.x,t[1]=s.y,t[2]=s.w,t[3]=s.h;for(var o=this.getTempMatrix(),l=0,c=[1,2];l<c.length;l++){var h=c[l],u=(n.setTransformMatrix(o,a,e,1===h),this["scaleRotate".concat(h,"Buffer")].getView(i));u[0]=o[0],u[1]=o[1],u[2]=o[3],u[3]=o[4],(u=this["translate".concat(h,"Buffer")].getView(i))[0]=o[6],u[1]=o[7]}this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},"drawTexture")},{key:"drawEdgeArrow",value:mt(function(e,t,r){var n,i,a,s,o=e._private.rscratch,o="source"===r?(i=o.arrowStartX,a=o.arrowStartY,o.srcArrowAngle):(i=o.arrowEndX,a=o.arrowEndY,o.tgtArrowAngle);isNaN(i)||null==i||isNaN(a)||null==a||isNaN(o)||null==o||"none"!==e.pstyle(r+"-arrow-shape").value&&(r=e.pstyle(r+"-arrow-color").value,n=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),hTe(e=this.getTempMatrix()),dTe(e,e,[i,a]),gTe(e,e,[s,s]),pTe(e,e,o),i=this.instanceCount,this.vertTypeBuffer.getView(i)[0]=3,eTe(t,this.indexBuffer.getView(i)),Jke(r,n,this.edgeColorBuffer.getView(i)),(a=this.scaleRotate1Buffer.getView(i))[0]=e[0],a[1]=e[1],a[2]=e[3],a[3]=e[4],(s=this.translate1Buffer.getView(i))[0]=e[6],s[1]=e[7],this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch()},"drawEdgeArrow")},{key:"drawEdgeLine",value:mt(function(e,t){var r=e.pstyle("opacity").value,n=e.pstyle("line-opacity").value,i=e.pstyle("width").pfValue,a=e.pstyle("line-color").value,s=r*n,o=this.getEdgePoints(e);if(o.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==o.length)r=this.instanceCount,this.vertTypeBuffer.getView(r)[0]=1,eTe(t,this.indexBuffer.getView(r)),Jke(a,s,this.edgeColorBuffer.getView(r)),this.lineWidthBuffer.getView(r)[0]=i,(n=this.pointAPointBBuffer.getView(r))[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();else for(var l=0;l<o.length-2;l+=2){var c=this.instanceCount,h=(this.vertTypeBuffer.getView(c)[0]=2,eTe(t,this.indexBuffer.getView(c)),Jke(a,s,this.edgeColorBuffer.getView(c)),this.lineWidthBuffer.getView(c)[0]=i,o[l-2]),u=o[l-1],d=o[l],p=o[l+1],g=o[l+2],f=o[l+3],m=o[l+4],y=o[l+5],v=(0==l&&(h=2*d-g+.001,u=2*p-f+.001),l==o.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:"getEdgePoints",value:mt(function(e){var t=e._private.rscratch.allpts;return 4==t.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)),n=0;n<=t;n++)0==n?(r[0]=e[0],r[1]=e[1]):n==t?(r[2*n]=e[e.length-2],r[2*n+1]=e[e.length-1]):this.setCurvePoint(e,n/t,r,2*n);return r},"getCurveSegmentPoints")},{key:"setCurvePoint",value:mt(function(e,t,r,n){if(!(e.length<=2)){for(var i=Array(e.length-2),a=0;a<i.length;a+=2){var s=(1-t)*e[a]+t*e[a+2],o=(1-t)*e[a+1]+t*e[a+3];i[a]=s,i[a+1]=o}return this.setCurvePoint(i,t,r,n)}r[n]=e[0],r[n+1]=e[1]},"setCurvePoint")},{key:"endBatch",value:mt(function(){var e=this.gl,t=this.vao,r=this.vertexCount,n=this.instanceCount;if(0!==n){var i,a=this.renderTarget.picking?this.pickingProgram:this.program,s=(e.useProgram(a),e.bindVertexArray(t),Qwe(this.buffers));try{for(s.s();!(i=s.n()).done;)i.value.bufferSubData(n)}catch(e){s.e(e)}finally{s.f()}for(var o=this.atlasManager.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.uniformMatrix3fv(a.uPanZoomMatrix,!1,this.panZoomMatrix),e.uniform1i(a.uAtlasSize,this.atlasManager.atlasSize),t=Jke(this.bgColor,1),e.uniform4fv(a.uBGColor,t),e.drawArraysInstanced(e.TRIANGLES,0,r,n),e.bindVertexArray(null),e.bindTexture(e.TEXTURE_2D,null),this.debugInfo&&this.debugInfo.push({count:n,atlasCount:o.length}),this.startBatch()}},"endBatch")},{key:"getDebugInfo",value:mt(function(){return this.debugInfo},"getDebugInfo")},{key:"getAtlasDebugInfo",value:mt(function(){return this.atlasManager.getDebugInfo()},"getAtlasDebugInfo")}]),eLe=M,mt(yTe,"fillStyle"),mt(O,"OverlayUnderlayRenderer"),zwe(O,[{key:"getStyleKey",value:mt(function(e,t){var r,n=(e=this.getStyle(e,t)).shape,i=e.opacity,e=e.color;return n?(r=t.width(),t=t.height(),e=yTe(e,i),u8e("".concat(n,"-").concat(r,"-").concat(t,"-").concat(e))):null},"getStyleKey")},{key:"isVisible",value:mt(function(e,t){return 0<t.pstyle("".concat(e,"-opacity")).value},"isVisible")},{key:"getStyle",value:mt(function(e,t){return{opacity:t.pstyle("".concat(e,"-opacity")).value,color:t.pstyle("".concat(e,"-color")).value,shape:t.pstyle("".concat(e,"-shape")).value}},"getStyle")},{key:"getPadding",value:mt(function(e,t){return t.pstyle("".concat(e,"-padding")).pfValue},"getPadding")},{key:"draw",value:mt(function(e,t,r,n){var i,a,s,o,l;this.isVisible(e,r)&&(i=this.r,s=(a=n.w)/2,o=(n=n.h)/2,r=(e=this.getStyle(e,r)).shape,l=e.color,e=e.opacity,t.save(),t.fillStyle=yTe(l,e),"round-rectangle"===r||"roundrectangle"===r?i.drawRoundRectanglePath(t,s,o,a,n,"auto"):"ellipse"===r&&i.drawEllipsePath(t,s,o,a,n),t.fill(),t.restore())},"draw")}]),tLe=O,mt(vTe,"getBGColor"),rLe={initWebgl:function(e,t){var n=this,r=n.data.contexts[n.WEBGL],i=e.cy.container(),i=(e.bgColor=vTe(i),e.webglTexSize=Math.min(e.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),e.webglTexRows=Math.min(e.webglTexRows,54),e.webglBatchSize=Math.min(e.webglBatchSize,16384),e.webglTexPerBatch=Math.min(e.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),n.webglDebug=e.webglDebug,n.webglDebugShowAtlases=e.webglDebugShowAtlases,console.log("max texture units",r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),console.log("max texture size",r.getParameter(r.MAX_TEXTURE_SIZE)),console.log("webgl options",e),n.pickingFrameBuffer=lTe(r),n.pickingFrameBuffer.needsDraw=!0,mt(function(e){return n.getTextAngle(e,null)},"getLabelRotation")),a=mt(function(e){return(e=e.pstyle("label"))&&e.value},"isLabelVisible"),s=(n.eleDrawing=new eLe(n,r,e),new tLe(n)),o=(n.eleDrawing.addTextureRenderType("node-body",K9e({getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement,isVisible:mt(function(e){return e.visible()},"isVisible")})),n.eleDrawing.addTextureRenderType("node-label",K9e({getKey:t.getLabelKey,getBoundingBox:t.getLabelBox,drawElement:t.drawLabel,getRotation:i,getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a})),n.eleDrawing.addTextureRenderType("node-overlay",K9e({getBoundingBox:t.getElementBox,getKey:mt(function(e){return s.getStyleKey("overlay",e)},"getKey"),drawElement:mt(function(e,t,r){return s.draw("overlay",e,t,r)},"drawElement"),isVisible:mt(function(e){return s.isVisible("overlay",e)},"isVisible"),getPadding:mt(function(e){return s.getPadding("overlay",e)},"getPadding")})),n.eleDrawing.addTextureRenderType("node-underlay",K9e({getBoundingBox:t.getElementBox,getKey:mt(function(e){return s.getStyleKey("underlay",e)},"getKey"),drawElement:mt(function(e,t,r){return s.draw("underlay",e,t,r)},"drawElement"),isVisible:mt(function(e){return s.isVisible("underlay",e)},"isVisible"),getPadding:mt(function(e){return s.getPadding("underlay",e)},"getPadding")})),n.eleDrawing.addTextureRenderType("edge-label",K9e({getKey:t.getLabelKey,getBoundingBox:t.getLabelBox,drawElement:t.drawLabel,getRotation:i,getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a})),Q7e(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4));n.onUpdateEleCalcs(function(e,t){var r=!1;t&&0<t.length&&(r|=n.eleDrawing.invalidate(t)),r&&o()}),xTe(n)}},mt(xTe,"overrideCanvasRendererFunctions"),mt(bTe,"clearWebgl"),mt(wTe,"clearCanvas"),mt(kTe,"createPanZoomMatrix"),mt(TTe,"setContextTransform"),mt(ETe,"drawSelectionRectangle"),mt(CTe,"drawAxes"),mt(STe,"drawAtlases"),mt(_Te,"getPickingIndexes"),mt(ATe,"findNearestElementsWebgl"),mt(LTe,"renderWebgl"),nLe={drawPolygonPath:function(e,t,r,n,i,a){var s=n/2,o=i/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,n,i,a,s){s.forEach(function(e){return $ke(t,e)}),t.closePath()},drawRoundRectanglePath:function(e,t,r,n,i,a){var s=n/2,o=i/2,n="auto"===a?XEe(n,i):Math.min(a,o,s);e.beginPath&&e.beginPath(),e.moveTo(t,r-o),e.arcTo(t+s,r-o,t+s,r,n),e.arcTo(t+s,r+o,t,r+o,n),e.arcTo(t-s,r+o,t-s,r,n),e.arcTo(t-s,r-o,t,r-o,n),e.lineTo(t,r-o),e.closePath()},drawBottomRoundRectanglePath:function(e,t,r,n,i,a){var s=n/2,o=i/2,n="auto"===a?XEe(n,i):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,n),e.arcTo(t-s,r+o,t-s,r,n),e.lineTo(t-s,r-o),e.lineTo(t,r-o),e.closePath()},drawCutRectanglePath:function(e,t,r,n,i,a,s){n/=2,i/=2,s="auto"===s?ZEe():s,e.beginPath&&e.beginPath(),e.moveTo(t-n+s,r-i),e.lineTo(t+n-s,r-i),e.lineTo(t+n,r-i+s),e.lineTo(t+n,r+i-s),e.lineTo(t+n-s,r+i),e.lineTo(t-n+s,r+i),e.lineTo(t-n,r+i-s),e.lineTo(t-n,r-i+s),e.closePath()},drawBarrelPath:function(e,t,r,n,i){var a=t-(s=n/2),t=t+s,s=r-(o=i/2),r=r+o,n=(o=JEe(n,i)).widthOffset,i=o.heightOffset,o=o.ctrlPtOffsetPct*n;e.beginPath&&e.beginPath(),e.moveTo(a,s+i),e.lineTo(a,r-i),e.quadraticCurveTo(a+o,r,a+n,r),e.lineTo(t-n,r),e.quadraticCurveTo(t-o,r,t,r-i),e.lineTo(t,s+i),e.quadraticCurveTo(t-o,s,t-n,s),e.lineTo(a+n,s),e.quadraticCurveTo(a+o,s,a,s+i),e.closePath()}},iLe=Math.sin(0),aLe=Math.cos(0),sLe={},oLe={},lLe=Math.PI/40,cLe=0*Math.PI;cLe<2*Math.PI;cLe+=lLe)sLe[cLe]=Math.sin(cLe),oLe[cLe]=Math.cos(cLe);nLe.drawEllipsePath=function(e,t,r,n,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,r,n/2,i/2,0,0,2*Math.PI);else for(var a,s,o=n/2,l=i/2,c=0*Math.PI;c<2*Math.PI;c+=lLe)a=t-o*sLe[c]*iLe+o*oLe[c]*aLe,s=r+l*oLe[c]*iLe+l*sLe[c]*aLe,0===c?e.moveTo(a,s):e.lineTo(a,s);e.closePath()},hLe={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(),n=this.findContainerClientCoords(),i=e.full?Math.ceil(r.w):n[2],n=e.full?Math.ceil(r.h):n[3],a=ae(e.maxWidth)||ae(e.maxHeight),s=this.getPixelRatio(),o=1,l=(void 0!==e.scale?(i*=e.scale,n*=e.scale,o=e.scale):a&&(c=l=1/0,ae(e.maxWidth)&&(l=o*e.maxWidth/i),ae(e.maxHeight)&&(c=o*e.maxHeight/n),i*=o=Math.min(l,c),n*=o),a||(i*=s,n*=s,o*=s),document.createElement("canvas")),c=(l.width=i,l.height=n,l.style.width=i+"px",l.style.height=n+"px",l.getContext("2d"));return 0<i&&0<n&&(c.clearRect(0,0,i,n),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,i,n),c.fill()),l}},mt(NTe,"b64ToBlob"),mt(ITe,"b64UriToB64"),mt(RTe,"output"),hLe.png=function(e){return RTe(e,this.bufferCanvasImage(e),"image/png")},hLe.jpg=function(e){return RTe(e,this.bufferCanvasImage(e),"image/jpeg")},uLe={nodeShapeImpl:function(e,t,r,n,i,a,s,o){switch(e){case"ellipse":return this.drawEllipsePath(t,r,n,i,a);case"polygon":return this.drawPolygonPath(t,r,n,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(t,r,n,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,r,n,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,r,n,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,r,n,i,a,o);case"barrel":return this.drawBarrelPath(t,r,n,i,a)}}},(pLe=(dLe=MTe).prototype).CANVAS_LAYERS=3,pLe.SELECT_BOX=0,pLe.DRAG=1,pLe.NODE=2,pLe.WEBGL=3,pLe.CANVAS_TYPES=["2d","2d","2d","webgl2"],pLe.BUFFER_COUNT=3,pLe.TEXTURE_BUFFER=0,pLe.MOTIONBLUR_BUFFER_NODE=1,pLe.MOTIONBLUR_BUFFER_DRAG=2,mt(MTe,"CanvasRenderer"),pLe.redrawHint=function(e,t){switch(e){case"eles":this.data.canvasNeedsRedraw[pLe.NODE]=t;break;case"drag":this.data.canvasNeedsRedraw[pLe.DRAG]=t;break;case"select":this.data.canvasNeedsRedraw[pLe.SELECT_BOX]=t;break;case"gc":this.data.gc=!0}},gLe=typeof Path2D<"u",pLe.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},pLe.usePaths=function(){return gLe&&this.pathsEnabled},pLe.setImgSmoothing=function(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)},pLe.getImgSmoothing=function(e){return null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled},pLe.makeOffscreenCanvas=function(e,t){var r;return"undefined"!==("u"<typeof OffscreenCanvas?"undefined":Bwe(OffscreenCanvas))?r=new OffscreenCanvas(e,t):((r=this.cy.window().document.createElement("canvas")).width=e,r.height=t),r},[I9e,M9e,z9e,U9e,q9e,j9e,Y9e,rLe,nLe,hLe,uLe].forEach(function(e){y7e(pLe,e)}),fLe=[{type:"layout",extensions:KAe},{type:"renderer",extensions:[{name:"null",impl:Bke},{name:"base",impl:k9e},{name:"canvas",impl:dLe}]}],mLe={},yLe={},mt(DTe,"setExtension"),mt(OTe,"getExtension"),mt(PTe,"setModule"),mt(BTe,"getModule"),vLe=mt(function(){return 2===arguments.length?OTe.apply(null,arguments):3===arguments.length?DTe.apply(null,arguments):4===arguments.length?BTe.apply(null,arguments):5===arguments.length?PTe.apply(null,arguments):void k8e("Invalid extension access syntax")},"extension"),yAe.prototype.extension=vLe,fLe.forEach(function(t){t.extensions.forEach(function(e){DTe(t.type,e.name,e.impl)})}),J=mt(function e(){if(!(this instanceof e))return new e;this.length=0},"Stylesheet"),(xLe=J.prototype).instanceString=function(){return"stylesheet"},xLe.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this},xLe.css=function(e,t){var r=this.length-1;if(WTe(e))this[r].properties.push({name:e,value:t});else if(VTe(e))for(var n=e,i=Object.keys(n),a=0;a<i.length;a++){var s=i[a],o=n[s];null!=o&&null!=(s=fAe.properties[s]||fAe.properties[u7e(s)])&&(s=s.name,this[r].properties.push({name:s,value:o}))}return this},xLe.style=xLe.css,xLe.generateStyle=function(e){return e=new fAe(e),this.appendToStyle(e)},xLe.appendToStyle=function(e){for(var t=0;t<this.length;t++){var r=this[t],n=r.selector,i=r.properties;e.selector(n);for(var a=0;a<i.length;a++){var s=i[a];e.css(s.name,s.value)}}return e},(bLe=mt(function(e){return VTe(e=void 0===e?{}:e)?new yAe(e):WTe(e)?vLe.apply(vLe,arguments):void 0},"cytoscape")).use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(bLe),e.apply(null,t),this},bLe.warnings=function(e){return T8e(e)},bLe.version="3.31.0",bLe.stylesheet=bLe.Stylesheet=J}),kLe=MBe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.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 n(){}mt(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,e.exports=n},function(e,t,r){var n,i=r(2),a=r(8),s=r(9);function o(e,t,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(n in mt(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];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),n=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==n)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 n(e){this.vGraphObject=e}mt(n,"LGraphObject"),e.exports=n},function(e,t,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(e,t,r,n){i.call(this,n=null==r&&null==n?t:n),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(n in mt(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];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=[],n=this;return n.edges.forEach(function(e){if(e.target==t){if(e.source!=n)throw"Incorrect edge source!";r.push(e)}}),r},h.prototype.getEdgesBetween=function(t){var r=[],n=this;return n.edges.forEach(function(e){if(e.source!=n&&e.target!=n)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 n(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(e){this.x=e},n.prototype.setY=function(e){this.y=e},n.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=n},function(e,t,r){var n,i=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){i.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(n in mt(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];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 n=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(n))throw"Node already in graph!";return(n.owner=this).getNodes().push(n),n}if(n=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:(n.source=t,n.target=r,n.isInterGraph=!1,this.getEdges().push(n),t.edges.push(n),r!=t&&r.edges.push(n),n)},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,n=t.edges.slice(),i=n.length,a=0;a<i;a++)((r=n[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,n=this.getNodes(),i=n.length,a=0;a<i;a++){var s,o=n[a];(s=o.getTop())<t&&(t=s),(s=o.getLeft())<r&&(r=s)}return t==d.MAX_VALUE?null:(e=null!=n[0].getParent().paddingLeft?n[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,n=d.MAX_VALUE,i=-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())<n&&(n=t),i<(t=h.getRight())&&(i=t),(t=h.getTop())<a&&(a=t),s<(t=h.getBottom())&&(s=t)}var u=new p(n,a,i-n,s-a);n==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,n=d.MAX_VALUE,i=-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())<n&&(n=o),i<(o=l.getBottom())&&(i=o)}return new p(t,n,r-t,i-n)},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,n=0;n<r;n++)e+=t[n].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,n=new h,i=new Set,e=this.nodes[0];for(e.withChildren().forEach(function(e){n.push(e),i.add(e)});0!==n.length;)for(var a,s,o=(a=(e=n.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(e,this))||i.has(s)||s.withChildren().forEach(function(e){n.push(e),i.add(e)});this.isConnected=!1,i.size>=this.nodes.length&&(r=0,i.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 n(e){c=r(5),this.layout=e,this.graphs=[],this.edges=[]}mt(n,"LGraphManager"),n.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},n.prototype.add=function(e,t,r,n,i){if(null==r&&null==n&&null==i){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(i=r,r=e,e=(n=t).getOwner(),t=i.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,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,-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},n.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,n=[],i=(n=n.concat(t.getEdges())).length,a=0;a<i;a++)r=n[a],t.remove(r);for(var s,o=[],i=(o=o.concat(t.getNodes())).length,a=0;a<i;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)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(null==this.allNodes){for(var e=[],t=this.getGraphs(),r=t.length,n=0;n<r;n++)e=e.concat(t[n].getNodes());this.allNodes=e}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.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},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(e){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=e},n.prototype.getRoot=function(){return this.rootGraph},n.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"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(e,t){if(null==e||null==t)throw"assert failed";if(e==t)return!0;for(var r,n=e.getOwner();null!=(r=n.getParent());){if(r==t)return!0;if(null==(n=r.getOwner()))break}for(n=t.getOwner();null!=(r=n.getParent());){if(r==e)return!0;if(null==(n=r.getOwner()))break}return!1},n.prototype.calcLowestCommonAncestors=function(){for(var e,t,r,n,i,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(n=t.getOwner();null==e.lca;){for(i=(e.targetInLca=r).getOwner();null==e.lca;){if(i==n){e.lca=i;break}if(i==this.rootGraph)break;if(null!=e.lca)throw"assert failed";e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(n==this.rootGraph)break;null==e.lca&&(e.sourceInLca=n.getParent(),n=e.sourceInLca.getOwner())}if(null==e.lca)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();for(var r=e.getOwner();null!=r;){for(var n=t.getOwner();null!=n;){if(n==r)return n;n=n.getParent().getOwner()}r=r.getParent().getOwner()}return r},n.prototype.calcInclusionTreeDepths=function(e,t){null==e&&null==t&&(e=this.rootGraph,t=1);for(var r,n=e.getNodes(),i=n.length,a=0;a<i;a++)(r=n[a]).inclusionTreeDepth=t,null!=r.child&&this.calcInclusionTreeDepths(r.child,t+1)},n.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=n},function(e,t,r){var n,i=r(0);function a(){}for(n in mt(a,"FDLayoutConstants"),i)a[n]=i[n];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 n(){}mt(n,"IGeometry"),n.calcSeparationAmount=function(e,t,r,n){if(!e.intersects(t))throw"assert failed";var i=new Array(2),a=(this.decideDirectionsForOverlappingNodes(e,t,i),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*i[0]*(e/2+n),r[1]=-1*i[1]*(t/2+n)},n.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},n.getIntersection2=function(e,t,r){var n=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),s=t.getCenterY();if(e.intersects(t))return r[0]=n,r[1]=i,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(),x=t.getBottom(),b=t.getRight(),w=t.getWidthHalf(),k=t.getHeightHalf(),T=!1,E=!1;if(n===a){if(s<i)return r[0]=n,r[1]=l,r[2]=a,r[3]=x,!1;i<s&&(r[0]=n,r[1]=u,r[2]=a,r[3]=m)}else if(i===s){if(a<n)return r[0]=o,r[1]=i,r[2]=y,r[3]=s,!1;n<a&&(r[0]=c,r[1]=i,r[2]=f,r[3]=s)}else{var e=e.height/e.width,t=t.height/t.width,C=(s-i)/(a-n),S=void 0,_=void 0,A=void 0;if(-e==C?(a<n?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),T=!0):e==C&&(a<n?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),T=!0),-t==C?(n<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),E=!0):t==C&&(n<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),E=!0),T&&E)return!1;if(c=a<n?s<i?(S=this.getCardinalDirection(e,C,4),this.getCardinalDirection(t,C,2)):(S=this.getCardinalDirection(-e,C,3),this.getCardinalDirection(-t,C,1)):s<i?(S=this.getCardinalDirection(-e,C,1),this.getCardinalDirection(-t,C,3)):(S=this.getCardinalDirection(e,C,2),this.getCardinalDirection(t,C,4)),!T)switch(S){case 1:_=l,r[0]=n+-g/C,r[1]=_;break;case 2:_=i+p*C,r[0]=d,r[1]=_;break;case 3:_=u,r[0]=n+g/C,r[1]=_;break;case 4:_=i+-p*C,r[0]=h,r[1]=_}if(!E)switch(c){case 1:A=m,r[2]=a+-k/C,r[3]=A;break;case 2:A=s+w*C,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/C,r[3]=A;break;case 4:A=s+-w*C,r[2]=v,r[3]=A}}return!1},n.getCardinalDirection=function(e,t,r){return t<e?r:1+r%4},n.getIntersection=function(e,t,r,n){var i,a,s,o,l,c;return null==n?this.getIntersection2(e,t,r):(i=e.x,a=t.x,l=r.x,o=a*(e=e.y)-i*(t=t.y),c=(s=n.x)*(r=r.y)-l*(n=n.y),0==(n=(t-=e)*(e=l-s)-(l=n-r)*(s=i-a))?null:new h((s*c-e*o)/n,(l*o-t*c)/n))},n.angleOfVector=function(e,t,r,n){var i=void 0;return e!==r?(i=Math.atan((n-t)/(r-e)),r<e?i+=Math.PI:n<t&&(i+=this.TWO_PI)):i=n<t?this.ONE_AND_HALF_PI:this.HALF_PI,i},n.doIntersect=function(e,t,r,n){var i=e.x,e=e.y,a=t.x,t=t.y,s=r.x,r=r.y,o=n.x,l=(a-i)*((n=n.y)-r)-(o-s)*(t-e);return 0!=l&&(t=((e-t)*(o-i)+(a-i)*(n-e))/l,0<(a=((n-r)*(o-i)+(s-o)*(n-e))/l))&&a<1&&0<t&&t<1},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,e.exports=n},function(e,t,r){function n(){}mt(n,"IMath"),n.sign=function(e){return 0<e?1:e<0?-1:0},n.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},n.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=n},function(e,t,r){function n(){}mt(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,e.exports=n},function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(n,"defineProperties"),mt(i,"_classCallCheck");var a,s,o=mt(function(e){return{value:e,next:null,prev:null}},"nodeFrom"),l=mt(function(e,t,r,n){return null!==e?e.next=t:n.head=t,null!==r?r.prev=t:n.tail=t,t.prev=e,t.next=r,n.length++,t},"add"),c=mt(function(e,t){var r=e.prev,n=e.next;return null!==r?r.next=n:t.head=n,null!==n?n.prev=r:t.tail=r,e.prev=e.next=null,t.length--,e},"_remove");function h(e){var t=this;i(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,n=this.head;r<e;)n=n.next,r++;n.value=t}},"set_object_at")}],n(a.prototype,s),e.exports=h},function(e,t,r){function n(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(n,"Point"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.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)))},n.prototype.move=function(e,t){this.x=e,this.y=t},n.prototype.translate=function(e,t){this.x+=e,this.y+=t},n.prototype.equals=function(e){return"Point"==e.constructor.name?this.x==e.x&&this.y==e.y:this==e},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},e.exports=n},function(e,t,r){function n(e,t,r,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=e&&null!=t&&null!=r&&null!=n&&(this.x=e,this.y=t,this.width=r,this.height=n)}mt(n,"RectangleD"),n.prototype.getX=function(){return this.x},n.prototype.setX=function(e){this.x=e},n.prototype.getY=function(){return this.y},n.prototype.setY=function(e){this.y=e},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},e.exports=n},function(e,t,r){var n="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 i(){}mt(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:(null==e.uniqueID&&(e.uniqueID=i.getString(),i.lastID++),e.uniqueID)},i.getString=function(e){return"Object#"+(null==e?i.lastID:e)},i.isPrimitive=function(e){var t="u"<typeof e?"undefined":n(e);return null==e||"object"!=t&&"function"!=t},e.exports=i},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 n=r(0),i=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=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(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 i(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"!==n.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(),n=0;n<r.length;n++)update(r[n]);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=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.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 n=this.getAllNodes(),i=0;i<n.length;i++)n[i].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,n=e.getNodes(),i=0;i<n.length;i++)null==(r=(t=n[i]).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(),n=!0,i=0;i<r.length;i++)null!=r[i].getChild()&&(n=!1);if(n)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(),i=0;i<h.length;i++){var u=h[i].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),i=0;i<d.length;i++){var p=d[i];-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,n=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null),s=(a.setRect(new Point(0,0),new Dimension(1,1)),n.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:n).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 n=this.edgeToDummyNodes.get(r),i=0;i<n.length;i++){var a=n[i],s=new l(a.getCenterX(),a.getCenterY()),o=r.bendpoints.get(i);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,n){var i,a;return null!=r&&null!=n?(i=t,e<=50?i-=(t-t/r)/50*(50-e):i+=(t*n-t)/50*(e-50),i):(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=[],n=new Map,i=!1,a=null;1!=t.length&&2!=t.length||(i=!0,a=t[0]);for(var s=0;s<t.length;s++){var o=(c=t[s]).getNeighborsList().size;n.set(c,c.getNeighborsList().size),1==o&&r.push(c)}for(l=(l=[]).concat(r);!i;){[].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=n.get(e)-1)&&l.push(e),n.set(e,t))})}r=r.concat(l),1!=t.length&&2!=t.length||(i=!0,a=t[0])}return a},u.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=u},function(e,t,r){function n(){}mt(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return(n.x=1e4*Math.sin(n.seed++))-Math.floor(n.x)},e.exports=n},function(e,t,r){var n=r(4);function i(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(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=this.lworldExtX;return 0!=t?this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/t:0},i.prototype.transformY=function(e){var t=this.lworldExtY;return 0!=t?this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/t:0},i.prototype.inverseTransformX=function(e){var t=this.ldeviceExtX;return 0!=t?this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/t:0},i.prototype.inverseTransformY=function(e){var t=this.ldeviceExtY;return 0!=t?this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/t:0},i.prototype.inverseTransformPoint=function(e){return new n(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},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 n,i=r(15),p=r(7),o=r(0),c=r(8),h=r(9);function a(){i.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(n in mt(a,"FDLayout"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.initParameters=function(){i.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,n,i,a=this.getGraphManager().getAllEdges(),s=0;s<a.length;s++)(e=a[s]).idealLength=this.idealEdgeLength,e.isInterGraph&&(t=e.getSource(),r=e.getTarget(),n=e.getSourceInLca().getEstimatedSize(),i=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=n+i-2*o.SIMPLE_NODE_SIZE),n=e.getLca().getInclusionTreeDepth(),e.idealLength+=p.DEFAULT_EDGE_LENGTH*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(t.getInclusionTreeDepth()+r.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.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,n,i,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(),i=new Set,e=0;e<o.length;e++)r=o[e],this.calculateRepulsionForceOfANode(r,i,a,s),i.add(r);else for(e=0;e<o.length;e++)for(r=o[e],t=e+1;t<o.length;t++)n=o[t],r.getOwner()==n.getOwner()&&this.calcRepulsionForce(r,n)},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,n,i=e.getSource(),a=e.getTarget();if(this.uniformLeafNodeSizes&&null==i.getChild()&&null==a.getChild())e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;0!=(r=e.getLength())&&(n=(t=this.springConstant*(r-t))*(e.lengthX/r),e=e.lengthY/r*t,i.springForceX+=n,i.springForceY+=e,a.springForceX-=n,a.springForceY-=e)},a.prototype.calcRepulsionForce=function(e,t){var r,n,i,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),n=2*o[0],i=2*o[1],o=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren),e.repulsionForceX-=o*n,e.repulsionForceY-=o*i,t.repulsionForceX+=o*n,t.repulsionForceY+=o*i):(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),i=(l=this.repulsionConstant*e.noOfChildren*t.noOfChildren/a)*o/s,e.repulsionForceX-=n=l*r/s,e.repulsionForceY-=i,t.repulsionForceX+=n,t.repulsionForceY+=i)},a.prototype.calcGravitationalForce=function(e){var t,r=e.getOwner(),n=(r.getRight()+r.getLeft())/2,i=(r.getTop()+r.getBottom())/2,n=e.getCenterX()-n,i=e.getCenterY()-i,a=Math.abs(n)+e.getWidth()/2,s=Math.abs(i)+e.getHeight()/2;e.getOwner()==this.graphManager.getRoot()?((t=r.getEstimatedSize()*this.gravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*n,e.gravitationForceY=-this.gravityConstant*i):((t=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*i*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)),n=new Array(t),i=0;i<t;i++)n[i]=new Array(r);for(i=0;i<t;i++)for(var a=0;a<r;a++)n[i][a]=new Array;return n},a.prototype.addNodeToGrid=function(e,t,r){for(var n=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=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=n;o<=i;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(e),e.setGridCoordinates(n,i,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,n){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||n){var i=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)||i.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&&i.add(u))}e.surrounding=[].concat(d(i))}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 n,i=r(1),a=r(7);function s(e,t,r){i.call(this,e,t,r),this.idealLength=a.DEFAULT_EDGE_LENGTH}for(n in mt(s,"FDLayoutEdge"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];e.exports=s},function(e,t,r){var n,i=r(3);function a(e,t,r,n){i.call(this,e,t,r,n),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(n in mt(a,"FDLayoutNode"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.setGridCoordinates=function(e,t,r,n){this.startX=e,this.finishX=t,this.startY=r,this.finishY=n},e.exports=a},function(e,t,r){function n(e,t){this.width=0,this.height=0,null!==e&&null!==t&&(this.height=t,this.width=e)}mt(n,"DimensionD"),n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},e.exports=n},function(e,t,r){var n=r(14);function i(){this.map={},this.keys=[]}mt(i,"HashMap"),i.prototype.put=function(e,t){var r=n.createID(e);this.contains(r)||(this.map[r]=t,this.keys.push(e))},i.prototype.contains=function(e){return n.createID(e),null!=this.map[e]},i.prototype.get=function(e){return e=n.createID(e),this.map[e]},i.prototype.keySet=function(){return this.keys},e.exports=i},function(e,t,r){var n=r(14);function i(){this.set={}}mt(i,"HashSet"),i.prototype.add=function(e){var t=n.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[n.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[n.createID(e)]==e},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),r=t.length,n=0;n<r;n++)e.push(this.set[t[n]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,r=0;r<t;r++){var n=e[r];this.add(n)}},e.exports=i},function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(n,"defineProperties"),mt(i,"_classCallCheck");var a,s,o=r(11),r=(mt(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:mt(function(e,t,r){var n;t<r&&(n=this._partition(e,t,r),this._quicksort(e,t,n),this._quicksort(e,n+1,r))},"_quicksort")},{key:"_partition",value:mt(function(e,t,r){for(var n=this._get(e,t),i=t,a=r;;){for(;this.compareFunction(n,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),n);)i++;if(!(i<a))return a;this._swap(e,i,a),i++,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 n=this._get(e,t);this._set(e,t,this._get(e,r)),this._set(e,r,n)},"_swap")},{key:"_defaultCompareFunction",value:mt(function(e,t){return e<t},"_defaultCompareFunction")}],n(a.prototype,s),l);function l(e,t){i(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 n,i;function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,i=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=n,this.gap_penalty=i,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"),n=h,i=[{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 n=1;n<this.jMax;n++){var i=[this.sequence1[r-1]===this.sequence2[n-1]?this.grid[r-1][n-1]+this.match_score:this.grid[r-1][n-1]+this.mismatch_penalty,this.grid[r-1][n]+this.gap_penalty,this.grid[r][n-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[r][n]=i[a[0]],this.tracebackGrid[r][n]=[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=[],n=-1;-1!==(n=e.indexOf(t,n+1));)r.push(n);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:mt(function(e){return this.getAllIndexes(e,Math.max.apply(null,e))},"arrayAllMaxIndexes")}],a(n.prototype,i),e.exports=h},function(e,t,r){var n=mt(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(7),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(4),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(24),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(5),n.LEdge=r(1),n.LGraphManager=r(6),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(25),e.exports=n},function(e,t,r){function n(){this.listeners=[]}mt(n,"Emitter");var i=n.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var r=this.listeners.length;0<=r;r--){var n=this.listeners[r];n.event===e&&n.callback===t&&this.listeners.splice(r,1)}},i.emit=function(e,t){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];e===n.event&&n.callback(t)}},e.exports=n}],i={},mt(n,"__webpack_require__"),n.m=r,n.c=i,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26);function n(e){var t;return(i[e]||(t=i[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}var r,i})}),TLe=MBe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(kLe()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(kLe()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(e,t){e.exports=r},function(e,t,r){var n,i=r(0).FDLayoutConstants;function a(){}for(n in mt(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a},function(e,t,r){var n,i=r(0).FDLayoutEdge;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},function(e,t,r){var n,i=r(0).LGraph;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},function(e,t,r){var n,i=r(0).LGraphManager;function a(e){i.call(this,e)}for(n in mt(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},function(e,t,r){var n,i=r(0).FDLayoutNode,a=r(0).IMath;function s(e,t,r,n){i.call(this,e,t,r,n)}for(n in mt(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];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,n=this.getChild().getNodes(),i=0;i<n.length;i++)null==(r=n[i]).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 n,i=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 x(){i.call(this),this.toBeTiled={}}for(n in mt(x,"CoSELayout"),x.prototype=Object.create(i.prototype),i)x[n]=i[n];x.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e},x.prototype.newGraph=function(e){return new s(null,this.graphManager,e)},x.prototype.newNode=function(e){return new h(this.graphManager,e)},x.prototype.newEdge=function(e){return new o(null,null,e)},x.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(u.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=u.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=u.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=g.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=g.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=g.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=g.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/g.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=g.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){var e,t,r;return this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental?u.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(e=this.getFlatForest()).length?this.positionNodesRadially(e):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),this.initSpringEmbedder(),this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}if(this.totalIterations%g.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}var t;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL):(this.isTreeGrowing=!1,this.isGrowthFinished=!0)),this.growTreeIterations++),this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var e=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(e,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},r=0;r<e.length;r++){var n=e[r].rect,i=e[r].id;t[i]={id:i,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.height}}return t},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if("during"===g.ANIMATE)this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},x.prototype.calculateNodesToApplyGravitationTo=function(){for(var e,t=[],r=this.graphManager.getGraphs(),n=r.length,i=0;i<n;i++)(e=r[i]).updateConnected(),e.isConnected||(t=t.concat(e.getNodes()));return t},x.prototype.createBendpoints=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),t=new Set,r=0;r<e.length;r++){var n=e[r];if(!t.has(n)){var i=n.getSource(),a=n.getTarget();if(i==a)n.getBendpoints().push(new f),n.getBendpoints().push(new f),this.createDummyNodesForBendpoints(n),t.add(n);else{var s=(s=(s=[]).concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i));if(!t.has(s[0])){if(1<s.length)for(var o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new f),this.createDummyNodesForBendpoints(l)}s.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},x.prototype.positionNodesRadially=function(e){for(var t=new p(0,0),r=Math.ceil(Math.sqrt(e.length)),n=0,i=0,a=0,s=new f(0,0),o=0;o<e.length;o++){o%r==0&&(i=n,(a=0)!=o&&(i+=u.DEFAULT_COMPONENT_SEPERATION),n=0);var l=e[o],c=m.findCenterOfTree(l);t.x=a,t.y=i,(s=x.radialLayout(l,c,t)).y>n&&(n=Math.floor(s.y)),a=Math.floor(s.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},x.radialLayout=function(e,t,r){var n=Math.max(this.maxDiagonalInTree(e),u.DEFAULT_RADIAL_SEPARATION),t=(x.branchRadialLayout(t,null,0,359,0,n),l.calculateBounds(e)),i=new c;i.setDeviceOrgX(t.getMinX()),i.setDeviceOrgY(t.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;a<e.length;a++)e[a].transform(i);return n=new f(t.getMaxX(),t.getMaxY()),i.inverseTransformPoint(n)},x.branchRadialLayout=function(e,t,r,n,i,a){(s=(n-r+1)/2)<0&&(s+=180);var s=(s+r)%360*v.TWO_PI/360,o=(Math.cos(s),i*Math.cos(s)),s=i*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(n-r)/c,f=o;h!=c;f=++f%u){var m=l[f].getOtherEnd(e);m!=t&&(x.branchRadialLayout(m,e,m=(r+h*g)%360,(m+g)%360,i+a,a),h++)}},x.maxDiagonalInTree=function(e){for(var t=y.MIN_VALUE,r=0;r<e.length;r++){var n=e[r].getDiagonal();t<n&&(t=n)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.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 n=(i=t[r]).getParent();0!==this.getNodeDegreeWithChildren(i)||null!=n.id&&this.getToBeTiled(n)||e.push(i)}for(r=0;r<e.length;r++){var i,a=(i=e[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(i)}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()),n=new h(l.graphManager),i=(n.id=t,n.paddingLeft=r.paddingLeft||0,n.paddingRight=r.paddingRight||0,n.paddingBottom=r.paddingBottom||0,n.paddingTop=r.paddingTop||0,l.idToDummyNode[t]=n,l.getGraphManager().add(l.newGraph(),n)),a=r.getChild();a.add(n);for(var s=0;s<c[e].length;s++){var o=c[e][s];a.remove(o),i.add(o)}}})},x.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)t[this.compoundOrder[r].id]=this.compoundOrder[r],e[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},x.prototype.clearZeroDegreeMembers=function(){var r=this,n=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(e){var t=r.idToDummyNode[e];n[e]=r.tileNodes(r.memberGroups[e],t.paddingLeft+t.paddingRight),t.rect.width=n[e].width,t.rect.height=n[e].height})},x.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;0<=e;e--){var t=this.compoundOrder[e],r=t.id;this.adjustLocations(this.tiledMemberPack[r],t.rect.x,t.rect.y,t.paddingLeft,t.paddingTop)}},x.prototype.repopulateZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(e){var t=n.idToDummyNode[e],r=t.paddingLeft;n.adjustLocations(i[e],t.rect.x,t.rect.y,r,t.paddingTop)})},x.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];if(null==(e=e.getChild()))return this.toBeTiled[t]=!1;for(var r=e.getNodes(),n=0;n<r.length;n++){var i=r[n];if(0<this.getNodeDegree(i))return this.toBeTiled[t]=!1;if(null==i.getChild())this.toBeTiled[i.id]=!1;else if(!this.getToBeTiled(i))return this.toBeTiled[t]=!1}return this.toBeTiled[t]=!0},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),r=0,n=0;n<t.length;n++){var i=t[n];i.getSource().id!==i.getTarget().id&&(r+=1)}return r},x.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(null!=e.getChild())for(var r=e.getChild().getNodes(),n=0;n<r.length;n++){var i=r[n];t+=this.getNodeDegreeWithChildren(i)}return t},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var r=e[t];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},x.prototype.adjustLocations=function(e,t,r,n,i){r+=i;for(var a=t+=n,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}},x.prototype.tileCompoundMembers=function(r,n){var i=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(e){var t=n[e];i.tiledMemberPack[e]=i.tileNodes(r[e],t.paddingLeft+t.paddingRight),t.rect.width=i.tiledMemberPack[e].width,t.rect.height=i.tiledMemberPack[e].height})},x.prototype.tileNodes=function(e,t){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height<t.rect.width*t.rect.height?1:0});for(var n=0;n<e.length;n++){var i=e[n];0==r.rows.length?this.insertNodeToRow(r,i,0,t):this.canAddHorizontal(r,i.rect.width,i.rect.height)?this.insertNodeToRow(r,i,this.getShortestRowIndex(r),t):this.insertNodeToRow(r,i,r.rows.length,t),this.shiftToLastRow(r)}return r},x.prototype.insertNodeToRow=function(e,t,r,n){r==e.rows.length&&(e.rows.push([]),e.rowWidth.push(n),e.rowHeight.push(0));var n=e.rowWidth[r]+t.rect.width,n=(0<e.rows[r].length&&(n+=e.horizontalPadding),e.rowWidth[r]=n,e.width<n&&(e.width=n),t.rect.height),i=(0<r&&(n+=e.verticalPadding),0);n>e.rowHeight[r]&&(i=e.rowHeight[r],e.rowHeight[r]=n,i=e.rowHeight[r]-i),e.height+=i,e.rows[r].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,n=0;n<e.rows.length;n++)e.rowWidth[n]<r&&(t=n,r=e.rowWidth[n]);return t},x.prototype.getLongestRowIndex=function(e){for(var t=-1,r=Number.MIN_VALUE,n=0;n<e.rows.length;n++)e.rowWidth[n]>r&&(t=n,r=e.rowWidth[n]);return t},x.prototype.canAddHorizontal=function(e,t,r){var n,i,a=this.getShortestRowIndex(e);return a<0||(i=e.rowWidth[a])+e.horizontalPadding+t<=e.width||(n=0,e.rowHeight[a]<r&&0<a&&(n=r+e.verticalPadding-e.rowHeight[a]),a=t+e.horizontalPadding<=e.width-i?(e.height+n)/(i+t+e.horizontalPadding):(e.height+n)/e.width,n=r+e.verticalPadding,(a<1?1/a:a)<((i=e.width<t?(e.height+n)/t:(e.height+n)/e.width)<1?1/i:i))},x.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),r=e.rowWidth.length-1,n=e.rows[t],i=n[n.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[r]>a&&t!=r){n.splice(-1,1),e.rows[r].push(i),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<n.length;o++)n[o].height>s&&(s=n[o].height);0<t&&(s+=e.verticalPadding),a=e.rowHeight[t]+e.rowHeight[r],e.rowHeight[t]=s,e.rowHeight[r]<i.height+e.verticalPadding&&(e.rowHeight[r]=i.height+e.verticalPadding),i=e.rowHeight[t]+e.rowHeight[r],e.height+=i-a,this.shiftToLastRow(e)}},x.prototype.tilingPreLayout=function(){u.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){u.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var e,t=[],r=!0;r;){for(var n=this.graphManager.getAllNodes(),i=[],r=!1,a=0;a<n.length;a++)1!=(e=n[a]).getEdges().length||e.getEdges()[0].isInterGraph||null!=e.getChild()||(i.push([e,e.getEdges()[0],e.getOwner()]),r=!0);if(1==r){for(var s=[],o=0;o<i.length;o++)1==i[o][0].getEdges().length&&(s.push(i[o]),i[o][0].getOwner().remove(i[o][0]));t.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},x.prototype.growTree=function(e){for(var t,r=e[e.length-1],n=0;n<r.length;n++)t=r[n],this.findPlaceforPrunedNode(t),t[2].add(t[0]),t[2].add(t[1],t[1].source,t[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(e){var t=e[0],r=(e=t==e[1].source?e[1].target:e[1].source).startX,n=e.finishX,i=e.startY,a=e.finishY,s=[0,0,0,0];if(0<i)for(var o=r;o<=n;o++)s[0]+=this.grid[o][i-1].length+this.grid[o][i].length-1;if(n<this.grid.length-1)for(o=i;o<=a;o++)s[1]+=this.grid[n+1][o].length+this.grid[n][o].length-1;if(a<this.grid[0].length-1)for(o=r;o<=n;o++)s[2]+=this.grid[o][a+1].length+this.grid[o][a].length-1;if(0<r)for(o=i;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=x},function(e,t,r){var n={};n.layoutBase=r(0),n.CoSEConstants=r(1),n.CoSEEdge=r(2),n.CoSEGraph=r(3),n.CoSEGraphManager=r(4),n.CoSELayout=r(6),n.CoSENode=r(5),e.exports=n}],a={},mt(n,"__webpack_require__"),n.m=i,n.c=a,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7);function n(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},i[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}var i,a})}),ELe=MBe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(TLe()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeCoseBilkent=t(TLe()):e.cytoscapeCoseBilkent=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(e,t){e.exports=r},function(e,t,r){var n=r(0).layoutBase.LayoutConstants,i=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,n={};for(r in e)n[r]=e[r];for(r in t)n[r]=t[r];return n}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=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),null!=e.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),null!=e.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),null!=e.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),"draft"==e.quality?n.QUALITY=0:"proof"==e.quality?n.QUALITY=2:n.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=n.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 n=0;n<r.length;n++){var i=r[n],a=this.idToLNode[i.data("source")],u=this.idToLNode[i.data("target")];a!==u&&0==a.getEdgesBetween(u).length&&(e.add(c.newEdge(),a,u).id=i.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"),n=h.options.refresh,i=0;i<n&&!t;i++)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(),n=a[r],i=e;null==n&&(n=a[i.data("parent")]||a["DummyCompound_"+i.data("parent")],a[r]=n,null!=(i=i.parent()[0])););return null!=n?{x:n.x,y:n.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 n={},t=0;t<e.length;t++)n[e[t].id()]=!0;return e.filter(function(e,t){for(var r=(e="number"==typeof e?t:e).parent()[0];null!=r;){if(n[r.id()])return!1;r=r.parent()[0]}return!0})},l.prototype.processChildrenList=function(e,t,r){for(var n=t.length,i=0;i<n;i++){var a,s,o,l=t[i],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(n,"__webpack_require__"),n.m=i,n.c=a,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1);function n(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},i[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}var i,a})});function CLe(e,t,r,n,i){return e.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("transform","translate("+(i.width-t)/2+", "+r+")")}var SLe,_Le,ALe,LLe,NLe,ILe,RLe,MLe,DLe,OLe=e(()=>{JL(),iS(),SLe=mt(function(e,t,r,n){t.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+e.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${10-r.height} q0,-5 5,-5 h${r.width-10} q5,0 5,5 v${r.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),_Le=mt(function(e,t,r){t.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+e.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),ALe=mt(function(e,t,r){var n=r.width,i=r.height,a=.15*n,s=.25*n,o=.35*n,l=.2*n;t.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+e.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*n},${-1*n*.1}
|
||
a${o},${o} 1 0,1 ${.4*n},${-1*n*.1}
|
||
a${s},${s} 1 0,1 ${.35*n},${.2*+n}
|
||
|
||
a${a},${a} 1 0,1 ${.15*n},${.35*+i}
|
||
a${l},${l} 1 0,1 ${-1*n*.15},${.65*+i}
|
||
|
||
a${s},${a} 1 0,1 ${-1*n*.25},${.15*n}
|
||
a${o},${o} 1 0,1 ${-1*n*.5},0
|
||
a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15}
|
||
|
||
a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35}
|
||
a${l},${l} 1 0,1 ${.1*n},${-1*i*.65}
|
||
|
||
H0 V0 Z`)},"cloudBkg"),LLe=mt(function(e,t,r){var n=r.width,i=r.height,a=.15*n;t.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+e.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*n},${-1*i*.1}
|
||
a${a},${a} 1 0,0 ${.25*n},0
|
||
a${a},${a} 1 0,0 ${.25*n},0
|
||
a${a},${a} 1 0,0 ${.25*n},${.1*+i}
|
||
|
||
a${a},${a} 1 0,0 ${.15*n},${.33*+i}
|
||
a${.8*a},${.8*a} 1 0,0 0,${.34*+i}
|
||
a${a},${a} 1 0,0 ${-1*n*.15},${.33*+i}
|
||
|
||
a${a},${a} 1 0,0 ${-1*n*.25},${.15*i}
|
||
a${a},${a} 1 0,0 ${-1*n*.25},0
|
||
a${a},${a} 1 0,0 ${-1*n*.25},0
|
||
a${a},${a} 1 0,0 ${-1*n*.25},${-1*i*.15}
|
||
|
||
a${a},${a} 1 0,0 ${-1*n*.1},${-1*i*.33}
|
||
a${.8*a},${.8*a} 1 0,0 0,${-1*i*.34}
|
||
a${a},${a} 1 0,0 ${.1*n},${-1*i*.33}
|
||
|
||
H0 V0 Z`)},"bangBkg"),NLe=mt(function(e,t,r){t.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+e.type2Str(r.type)).attr("r",r.width/2)},"circleBkg"),mt(CLe,"insertPolygonShape"),ILe=mt(function(e,t,r){var n=r.height,i=n/4,a=r.width-r.padding+2*i;CLe(t,a,n,[{x:i,y:0},{x:a-i,y:0},{x:a,y:-n/2},{x:a-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],r)},"hexagonBkg"),RLe=mt(function(e,t,r){t.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+e.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),MLe=mt(async function(e,t,r,n,i){var a=i.htmlLabels,s=n%11,n=t.append("g");let o="section-"+(r.section=s);s<0&&(o+=" section-root"),n.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+o);var l=n.append("g"),t=n.append("g"),c=r.descr.replace(/(<br\/*>)/g,`
|
||
`),c=(await QL(t,c,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.node().getBBox()),[i]=JC(i.fontSize);switch(r.height=c.height+1.1*i*.5+r.padding,r.width=c.width+2*r.padding,r.icon?r.type===e.nodeType.CIRCLE?(r.height+=50,r.width+=50,n.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),t.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")")):(r.width+=50,i=r.height,r.height=Math.max(i,60),i=Math.abs(r.height-i),n.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+i/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),t.attr("transform","translate("+(25+r.width/2)+", "+(i/2+r.padding/2)+")")):a?(i=(r.width-c.width)/2,a=(r.height-c.height)/2,t.attr("transform","translate("+i+", "+a+")")):(c=r.width/2,t.attr("transform","translate("+c+", "+r.padding/2+")")),r.type){case e.nodeType.DEFAULT:SLe(e,l,r,s);break;case e.nodeType.ROUNDED_RECT:RLe(e,l,r,s);break;case e.nodeType.RECT:_Le(e,l,r,s);break;case e.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),NLe(e,l,r,s);break;case e.nodeType.CLOUD:ALe(e,l,r,s);break;case e.nodeType.BANG:LLe(e,l,r,s);break;case e.nodeType.HEXAGON:ILe(e,l,r,s)}return e.setElementForId(r.id,n),r.height},"drawNode"),DLe=mt(function(e,t){var e=e.getElementById(t.id),r=t.x||0;e.attr("transform","translate("+r+","+(t.y||0)+")")},"positionNode")});async function PLe(r,n,e,i,a){await MLe(r,n,e,i,a),e.children&&await Promise.all(e.children.map((e,t)=>PLe(r,n,e,i<0?t:i,a)))}function BLe(n,e){e.edges().map((e,t)=>{var r=e.data();e[0]._private.bodyBounds&&(e=e[0]._private.rscratch,M.trace("Edge: ",t,r),n.insert("path").attr("d",`M ${e.startX},${e.startY} L ${e.midX},${e.midY} L${e.endX},${e.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth))})}function $Le(t,r,n,i){r.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:i,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(e=>{$Le(e,r,n,i+1),r.add({group:"edges",data:{id:t.id+"_"+e.id,source:t.id,target:e.id,depth:i,section:e.section}})})}function FLe(n,i){return new Promise(t=>{let e=H("body").append("div").attr("id","cy").attr("style","display:none"),r=bLe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});e.remove(),$Le(n,r,i,0),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=>{M.info("Ready",e),t(r)})})}function zLe(i,e){e.nodes().map((e,t)=>{var r=e.data(),n=(r.x=e.position().x,r.y=e.position().y,DLe(i,r),i.getElementById(r.nodeId));M.info("id:",t,"Position: (",e.position().x,", ",e.position().y,")",r),n.attr("transform",`translate(${e.position().x-r.width/2}, ${e.position().y-r.height/2})`),n.attr("attr",`apa-${t})`)})}var GLe,ULe,qLe,jLe,WLe,YLe=e(()=>{wLe(),GLe=ee(ELe(),1),a6(),Eu(),t(),Cye(),ch(),OLe(),An(),bLe.use(GLe.default),mt(PLe,"drawNodes"),mt(BLe,"drawEdges"),mt($Le,"addNodes"),mt(FLe,"layoutMindmap"),mt(zLe,"positionNodes"),GLe=mt(async(e,t,r,n)=>{var i,a,s;M.debug(`Rendering mindmap diagram
|
||
`+e),(n=(e=n.db).getMindmap())&&((i=D()).htmlLabels=!1,(a=(t=vye(t)).append("g")).attr("class","mindmap-edges"),(s=t.append("g")).attr("class","mindmap-nodes"),await PLe(e,s,n,-1,i),BLe(a,s=await FLe(n,i)),zLe(e,s),nh(void 0,t,i.mindmap?.padding??yr.mindmap.padding,i.mindmap?.useMaxWidth??yr.mindmap.useMaxWidth))},"draw"),ULe={draw:GLe}}),HLe=e(()=>{vn(),qLe=mt(t=>{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],qt(t["lineColor"+e])?t["lineColor"+e]=a(t["lineColor"+e],20):t["lineColor"+e]=Vt(t["lineColor"+e],20);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var n=""+(17-3*e);r+=`
|
||
.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]};
|
||
}
|
||
.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: ${n};
|
||
}
|
||
.section-${e-1} line {
|
||
stroke: ${t["cScaleInv"+e]} ;
|
||
stroke-width: 3;
|
||
}
|
||
|
||
.disabled, .disabled circle, .disabled text {
|
||
fill: lightgray;
|
||
}
|
||
.disabled text {
|
||
fill: #efefef;
|
||
}
|
||
`}return r},"genSections"),jLe=mt(e=>`
|
||
.edge {
|
||
stroke-width: 3;
|
||
}
|
||
${qLe(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;
|
||
}
|
||
.mindmap-node-label {
|
||
dy: 1em;
|
||
alignment-baseline: middle;
|
||
text-anchor: middle;
|
||
dominant-baseline: middle;
|
||
text-align: center;
|
||
}
|
||
`,"getStyles"),WLe=jLe}),VLe={};$Be(VLe,{diagram:()=>XLe});var XLe,KLe,ZLe,QLe,JLe,eNe,tNe,rNe,nNe,iNe,aNe,sNe,oNe,lNe,cNe,hNe,uNe,dNe,pNe,gNe,fNe,mNe,yNe,vNe,xNe,bNe=e(()=>{Owe(),Pwe(),YLe(),HLe(),XLe={get db(){return new Mwe},renderer:ULe,parser:Iwe,styles:WLe}}),wNe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,4],n=[1,13],i=[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],x=[1,6,7,11,13,16,17,20,23],b=[1,38],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o-1].id),n.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 18:case 23:n.decorateNode({class:a[o]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",a[o-1].id),n.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:n.decorateNode({icon:a[o]});break;case 27:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.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:n,7:[1,10],9:9,12:11,13:i,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:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:n,9:22,12:11,13:i,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:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},t(m,[2,14],{7:y,11:v}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(p,[2,16],{15:37,24:g}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(f,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(x,[2,11]),t(x,[2,12]),t(p,[2,15],{24:b}),t(f,[2,30]),{22:[1,41]},t(f,[2,27]),t(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){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"),(KLe=new((e.prototype=r).Parser=e)).parser=KLe,ZLe=KLe}),kNe=e(()=>{Eu(),lh(),t(),An(),F9(),QLe=[],JLe=[],eNe=0,tNe={},rNe=mt(()=>{QLe=[],JLe=[],eNe=0,tNe={}},"clear"),nNe=mt(e=>{if(0===QLe.length)return null;let t=QLe[0].level,r=null;for(let e=QLe.length-1;0<=e;e--)if(QLe[e].level===t&&(r=r||QLe[e]),QLe[e].level<t)throw new Error('Items without section detected, found section ("'+QLe[e].label+'")');return e===r?.level?null:r},"getSection"),iNe=mt(function(){return JLe},"getSections"),aNe=mt(function(){var e=[],r=iNe(),n=D();for(let t of r){var i,a={id:t.id,label:Oc(t.label??"",n),isGroup:!0,ticket:t.ticket,shape:"kanbanSection",level:t.level,look:n.look};e.push(a);for(i of QLe.filter(e=>e.parentId===t.id)){var s={id:i.id,parentId:t.id,label:Oc(i.label??"",n),isGroup:!1,ticket:i?.ticket,priority:i?.priority,assigned:i?.assigned,icon:i?.icon,shape:"kanbanItem",level:i.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(s)}}return{nodes:e,edges:[],other:{},config:D()}},"getData"),sNe=mt((e,t,r,n,i)=>{let a=D(),s=a.mindmap?.padding??yr.mindmap.padding;switch(n){case oNe.ROUNDED_RECT:case oNe.RECT:case oNe.HEXAGON:s*=2}if(n={id:Oc(t,a)||"kbn"+eNe++,level:e,label:Oc(r,a),width:a.mindmap?.maxNodeWidth??yr.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==i){if(i=i.includes(`
|
||
`)?i+`
|
||
`:`{
|
||
`+i+`
|
||
}`,(t=$9(i,{schema:B9})).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&&(n.shape=t?.shape),t?.label&&(n.label=t?.label),t?.icon&&(n.icon=t?.icon.toString()),t?.assigned&&(n.assigned=t?.assigned.toString()),t?.ticket&&(n.ticket=t?.ticket.toString()),t?.priority&&(n.priority=t?.priority)}(r=nNe(e))?n.parentId=r.id||"kbn"+eNe++:JLe.push(n),QLe.push(n)},"addNode"),oNe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},lNe=mt((e,t)=>{switch(M.debug("In get type",e,t),e){case"[":return oNe.RECT;case"(":return")"===t?oNe.ROUNDED_RECT:oNe.CLOUD;case"((":return oNe.CIRCLE;case")":return oNe.CLOUD;case"))":return oNe.BANG;case"{{":return oNe.HEXAGON;default:return oNe.DEFAULT}},"getType"),cNe=mt((e,t)=>{tNe[e]=t},"setElementForId"),hNe=mt(e=>{var t,r;e&&(t=D(),r=QLe[QLe.length-1],e.icon&&(r.icon=Oc(e.icon,t)),e.class)&&(r.cssClasses=Oc(e.class,t))},"decorateNode"),uNe=mt(e=>{switch(e){case oNe.DEFAULT:return"no-border";case oNe.RECT:return"rect";case oNe.ROUNDED_RECT:return"rounded-rect";case oNe.CIRCLE:return"circle";case oNe.CLOUD:return"cloud";case oNe.BANG:return"bang";case oNe.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),dNe=mt(()=>M,"getLogger"),pNe=mt(e=>tNe[e],"getElementById"),gNe={clear:rNe,addNode:sNe,getSections:iNe,getData:aNe,nodeType:oNe,getType:lNe,setElementForId:cNe,decorateNode:hNe,type2Str:uNe,getLogger:dNe,getElementById:pNe}}),TNe=e(()=>{Eu(),t(),Cye(),ch(),An(),QD(),VO(),fNe=mt(async(e,t,r,n)=>{M.debug(`Rendering kanban diagram
|
||
`+e);var i,a=n.db.getData(),s=D(),o=(s.htmlLabels=!1,(e=vye(t)).append("g")),l=(o.attr("class","sections"),e.append("g"));l.attr("class","items");let c=a.nodes.filter(e=>e.isGroup),h=0,u=[],d=25;for(i of c){var p=s?.kanban?.sectionWidth||200,p=(h+=1,i.x=p*h+10*(h-1)/2,i.width=p,i.y=0,i.height=3*p,i.rx=5,i.ry=5,i.cssClasses=i.cssClasses+" section-"+h,await YD(o,i));d=Math.max(d,p?.labelBBox?.height),u.push(p)}let g=0;for(let i of c){var f,m=u[g];g+=1;let e=s?.kanban?.sectionWidth||200,t=3*-e/2+d,r=t,n=a.nodes.filter(e=>e.parentId===i.id);for(f of n){if(f.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");f.x=i.x,f.width=e-15;var y=(await UO(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await YO(f),r=f.y+y.height/2+5}var m=m.cluster.select("rect"),v=Math.max(r-t+30,50)+(d-25);m.attr("height",v)}nh(void 0,e,s.mindmap?.padding??yr.kanban.padding,s.mindmap?.useMaxWidth??yr.kanban.useMaxWidth)},"draw"),mNe={draw:fNe}}),ENe=e(()=>{vn(),JK(),yNe=mt(r=>{let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)r["lineColor"+e]=r["lineColor"+e]||r["cScaleInv"+e],qt(r["lineColor"+e])?r["lineColor"+e]=a(r["lineColor"+e],20):r["lineColor"+e]=Vt(r["lineColor"+e],20);var n=mt((e,t)=>(r.darkMode?Vt:a)(e,t),"adjuster");for(let e=0;e<r.THEME_COLOR_LIMIT;e++){var i=""+(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: ${n(r["cScale"+e],10)};
|
||
stroke: ${n(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: ${i};
|
||
}
|
||
.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"),vNe=mt(e=>`
|
||
.edge {
|
||
stroke-width: 3;
|
||
}
|
||
${yNe(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;
|
||
}
|
||
${qK()}
|
||
`,"getStyles"),xNe=vNe}),CNe={};$Be(CNe,{diagram:()=>SNe});var SNe,_Ne,ANe,LNe,NNe,INe,RNe,MNe,DNe,ONe,PNe,BNe,$Ne,FNe,zNe,GNe=e(()=>{wNe(),kNe(),TNe(),ENe(),SNe={db:gNe,renderer:mNe,parser:ZLe,styles:xNe}}),UNe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,9],n=[1,10],i=[1,5,10,12],i={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,n,i,a,s){var o=a.length-1;switch(i){case 7:var l=n.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),c=n.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());n.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:n},{1:[2,6],7:11,10:[1,12]},t(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:n},{15:18,16:7,17:8,18:r,20:n},{18:[1,19]},t(n,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:r,20:n},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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){switch(r){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\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:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};i.lexer=r,mt(e,"Parser"),(_Ne=new((e.prototype=i).Parser=e)).parser=_Ne,ANe=_Ne}),qNe=e(()=>{Eu(),lh(),Tu(),LNe=[],NNe=[],INe=new Map,RNe=mt(()=>{LNe=[],NNe=[],INe=new Map,mh()},"clear"),MNe=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{mt(this,"SankeyLink")}},DNe=mt((e,t,r)=>{LNe.push(new MNe(e,t,r))},"addLink"),ONe=class{constructor(e){this.ID=e}static{mt(this,"SankeyNode")}},PNe=mt(e=>{e=L.sanitizeText(e,D());let t=INe.get(e);return void 0===t&&(t=new ONe(e),INe.set(e,t),NNe.push(t)),t},"findOrCreateNode"),BNe=mt(()=>NNe,"getNodes"),$Ne=mt(()=>LNe,"getLinks"),FNe=mt(()=>({nodes:NNe.map(e=>({id:e.ID})),links:LNe.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),zNe={nodesMap:INe,getConfig:mt(()=>D().sankey,"getConfig"),getNodes:BNe,getLinks:$Ne,getGraph:FNe,addLink:DNe,findOrCreateNode:PNe,getAccTitle:vh,setAccTitle:yh,getAccDescription:bh,setAccDescription:xh,getDiagramTitle:kh,setDiagramTitle:wh,clear:RNe}});function jNe(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n<e||void 0===n&&e<=e)&&(n=e);else{let e=-1;for(var i of t)null!=(i=r(i,++e,t))&&(n<i||void 0===n&&i<=i)&&(n=i)}return n}var WNe=e(()=>{mt(jNe,"max")});function YNe(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n>e||void 0===n&&e<=e)&&(n=e);else{let e=-1;for(var i of t)null!=(i=r(i,++e,t))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var HNe=e(()=>{mt(YNe,"min")});function VNe(t,r){let n=0;if(void 0===r)for(var e of t)(e=+e)&&(n+=e);else{let e=-1;for(var i of t)(i=+r(i,++e,t))&&(n+=i)}return n}var XNe=e(()=>{mt(VNe,"sum")}),KNe=e(()=>{WNe(),HNe(),XNe()});function ZNe(e){return e.target.depth}function QNe(e){return e.depth}function JNe(e,t){return t-1-e.height}function eIe(e,t){return e.sourceLinks.length?e.depth:t-1}function tIe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?YNe(e.sourceLinks,ZNe)-1:0}var rIe=e(()=>{KNe(),mt(ZNe,"targetDepth"),mt(QNe,"left"),mt(JNe,"right"),mt(eIe,"justify"),mt(tIe,"center")});function nIe(e){return function(){return e}}var iIe=e(()=>{mt(nIe,"constant")});function aIe(e,t){return oIe(e.source,t.source)||e.index-t.index}function sIe(e,t){return oIe(e.target,t.target)||e.index-t.index}function oIe(e,t){return e.y0-t.y0}function lIe(e){return e.value}function cIe(e){return e.index}function hIe(e){return e.nodes}function uIe(e){return e.links}function dIe(e,t){if(e=e.get(t))return e;throw new Error("missing: "+t)}function pIe({nodes:e}){for(var r of e){let e=r.y0,t=e;for(var n of r.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(var i of r.targetLinks)i.y1=t+i.width/2,t+=i.width}}function gIe(){let o=0,l=0,c=1,h=1,u=24,i=8,d,p=cIe,g=eIe,f,m,t=hIe,r=uIe,a=6;function n(){var e={nodes:t.apply(null,arguments),links:r.apply(null,arguments)};return s(e),y(e),v(e),x(e),k(e),pIe(e),e}function s({nodes:r,links:e}){for(var[t,n]of r.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];var i,a,s=new Map(r.map((e,t)=>[p(e,t,r),e]));for([i,a]of e.entries()){a.index=i;let{source:e,target:t}=a;"object"!=typeof e&&(e=a.source=dIe(s,e)),"object"!=typeof t&&(t=a.target=dIe(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(VNe(t.sourceLinks,lIe),VNe(t.targetLinks,lIe)):t.fixedValue}function v({nodes:e}){let t=e.length,r=new Set(e),n=new Set,i=0;for(;r.size;){for(var a of r){a.depth=i;for(var{target:s}of a.sourceLinks)n.add(s)}if(++i>t)throw new Error("circular link");r=n,n=new Set}}function x({nodes:e}){let t=e.length,r=new Set(e),n=new Set,i=0;for(;r.size;){for(var a of r){a.height=i;for(var{source:s}of a.targetLinks)n.add(s)}if(++i>t)throw new Error("circular link");r=n,n=new Set}}function b({nodes:e}){var t,r=jNe(e,e=>e.depth)+1,n=(c-o-u)/(r-1),i=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*n,t.x1=t.x0+u,i[a]?i[a].push(t):i[a]=[t]}if(f)for(var s of i)s.sort(f);return i}function w(e){var r,n=YNe(e,e=>(h-l-(e.length-1)*d)/VNe(e,lIe));for(r of e){let t=l;for(var i of r){i.y0=t,i.y1=t+i.value*n,t=i.y1+d;for(var a of i.sourceLinks)a.width=a.value*n}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)}L(r)}}function k(e){var t=b(e);d=Math.min(i,(h-l)/(jNe(t,e=>e.length)-1)),w(t);for(let e=0;e<a;++e){var r=Math.pow(.99,e),n=Math.max(1-r,(e+1)/a);E(t,r,n),T(t,r,n)}}function T(r,n,i){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+=N(l,a)*c,t+=c;0<t&&(s=(e/t-a.y0)*n,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(oIe),C(o,i)}}function E(r,n,i){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)*n,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(oIe),C(o,i)}}function C(e,t){var r=e.length>>1,n=e[r];_(e,n.y0-d,r-1,t),S(e,n.y1+d,1+r,t),_(e,h,e.length-1,t),S(e,l,0,t)}function S(e,t,r,n){for(;r<e.length;++r){var i=e[r],a=(t-i.y0)*n;1e-6<a&&(i.y0+=a,i.y1+=a),t=i.y1+d}}function _(e,t,r,n){for(;0<=r;--r){var i=e[r],a=(i.y1-t)*n;1e-6<a&&(i.y0-=a,i.y1-=a),t=i.y0-d}}function A({sourceLinks:e,targetLinks:t}){if(void 0===m){for(var{source:{sourceLinks:r}}of t)r.sort(sIe);for(var{target:{targetLinks:n}}of e)n.sort(aIe)}}function L(e){if(void 0===m)for(var{sourceLinks:t,targetLinks:r}of e)t.sort(sIe),r.sort(aIe)}function N(e,t){let r=e.y0-(e.sourceLinks.length-1)*d/2;for(var{target:n,width:i}of e.sourceLinks){if(n===t)break;r+=i+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:n,width:i}of t.targetLinks){if(n===e)break;r+=i+d}for(var{target:a,width:s}of e.sourceLinks){if(a===t)break;r-=s}return r}return mt(n,"sankey"),n.update=function(e){return pIe(e),e},n.nodeId=function(e){return arguments.length?(p="function"==typeof e?e:nIe(e),n):p},n.nodeAlign=function(e){return arguments.length?(g="function"==typeof e?e:nIe(e),n):g},n.nodeSort=function(e){return arguments.length?(f=e,n):f},n.nodeWidth=function(e){return arguments.length?(u=+e,n):u},n.nodePadding=function(e){return arguments.length?(i=d=+e,n):i},n.nodes=function(e){return arguments.length?(t="function"==typeof e?e:nIe(e),n):t},n.links=function(e){return arguments.length?(r="function"==typeof e?e:nIe(e),n):r},n.linkSort=function(e){return arguments.length?(m=e,n):m},n.size=function(e){return arguments.length?(o=l=0,c=+e[0],h=+e[1],n):[c-o,h-l]},n.extent=function(e){return arguments.length?(o=+e[0][0],c=+e[1][0],l=+e[0][1],h=+e[1][1],n):[[o,l],[c,h]]},n.iterations=function(e){return arguments.length?(a=+e,n):a},mt(s,"computeNodeLinks"),mt(y,"computeNodeValues"),mt(v,"computeNodeDepths"),mt(x,"computeNodeHeights"),mt(b,"computeNodeLayers"),mt(w,"initializeNodeBreadths"),mt(k,"computeNodeBreadths"),mt(T,"relaxLeftToRight"),mt(E,"relaxRightToLeft"),mt(C,"resolveCollisions"),mt(S,"resolveCollisionsTopToBottom"),mt(_,"resolveCollisionsBottomToTop"),mt(A,"reorderNodeLinks"),mt(L,"reorderLinks"),mt(N,"targetTop"),mt(I,"sourceTop"),n}var fIe=e(()=>{KNe(),rIe(),iIe(),mt(aIe,"ascendingSourceBreadth"),mt(sIe,"ascendingTargetBreadth"),mt(oIe,"ascendingBreadth"),mt(lIe,"value"),mt(cIe,"defaultId"),mt(hIe,"defaultNodes"),mt(uIe,"defaultLinks"),mt(dIe,"find"),mt(pIe,"computeLinkBreadths"),mt(gIe,"Sankey")});function mIe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function yIe(){return new mIe}var vIe,xIe,bIe,wIe,kIe=e(()=>{vIe=Math.PI,bIe=(xIe=2*vIe)-1e-6,mt(mIe,"Path"),mt(yIe,"path"),mIe.prototype=yIe.prototype={constructor:mIe,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,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:mt(function(e,t,r,n,i,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:mt(function(e,t,r,n,i){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(e=+e),h=(n=+n)-(t=+t),u=o-e,d=l-t,p=u*u+d*d;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=e)+","+(this._y1=t):1e-6<p&&(1e-6<Math.abs(d*c-h*u)&&i?(s=c*c+h*h,n=(r-=o)*r+(o=n-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=i*Math.tan((vIe-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,1e-6<Math.abs(p-1)&&(this._+="L"+(e+p*u)+","+(t+p*d)),this._+="A"+i+","+i+",0,0,"+ +(u*o<d*r)+","+(this._x1=e+n*c)+","+(this._y1=t+n*h)):this._+="L"+(this._x1=e)+","+(this._y1=t))},"arcTo"),arc:mt(function(e,t,r,n,i,a){e=+e,t=+t,a=!!a;var s=(r=+r)*Math.cos(n),o=r*Math.sin(n),l=e+s,c=t+o,h=1^a,a=a?n-i:i-n;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&&(bIe<(a=a<0?a%xIe+xIe: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,"+ +(vIe<=a)+","+h+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},"arc"),rect:mt(function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},"rect"),toString:mt(function(){return this._},"toString")},wIe=yIe}),TIe=e(()=>{kIe()});function EIe(e){return mt(function(){return e},"constant")}var CIe=e(()=>{mt(EIe,"default")});function SIe(e){return e[0]}function _Ie(e){return e[1]}var AIe,LIe=e(()=>{mt(SIe,"x"),mt(_Ie,"y")}),NIe=e(()=>{AIe=Array.prototype.slice});function IIe(e){return e.source}function RIe(e){return e.target}function MIe(i){var a=IIe,s=RIe,o=SIe,l=_Ie,c=null;function t(){var e,t=AIe.call(arguments),r=a.apply(this,t),n=s.apply(this,t);if(c=c||(e=wIe()),i(c,+o.apply(this,(t[0]=r,t)),+l.apply(this,t),+o.apply(this,(t[0]=n,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:EIe(+e),t):o},t.y=function(e){return arguments.length?(l="function"==typeof e?e:EIe(+e),t):l},t.context=function(e){return arguments.length?(c=e??null,t):c},t}function DIe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function OIe(){return MIe(DIe)}var PIe=e(()=>{TIe(),NIe(),CIe(),LIe(),mt(IIe,"linkSource"),mt(RIe,"linkTarget"),mt(MIe,"link"),mt(DIe,"curveHorizontal"),mt(OIe,"linkHorizontal")}),BIe=e(()=>{PIe()});function $Ie(e){return[e.source.x1,e.y0]}function FIe(e){return[e.target.x0,e.y1]}function zIe(){return OIe().source($Ie).target(FIe)}var GIe,UIe,qIe,jIe,WIe,YIe,HIe,VIe=e(()=>{BIe(),mt($Ie,"horizontalSource"),mt(FIe,"horizontalTarget"),mt(zIe,"default")}),XIe=e(()=>{fIe(),rIe(),VIe()}),KIe=e(()=>{GIe=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+")"}}}),ZIe=e(()=>{Eu(),a6(),XIe(),ch(),KIe(),UIe={left:QNe,right:JNe,center:tIe,justify:eIe},qIe=mt(function(e,t,r,n){let{securityLevel:i,sankey:a}=D(),s=Sh.sankey,o,l=("sandbox"===i&&(o=H("#i"+t)),H("sandbox"===i?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===i?l.select(`[id="${t}"]`):H(`[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=n.db.getGraph(),v=UIe[p],x=(gIe().nodeId(e=>e.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),vx(v5));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=GIe.next("node-")).id).attr("transform",function(e){return"translate("+e.x0+","+e.y0+")"}).attr("x",e=>e.x0).attr("y",e=>e.y0).append("rect").attr("height",e=>e.y1-e.y0).attr("width",e=>e.x1-e.x0).attr("fill",e=>x(e.id));var t=mt(({id:e,value:t})=>m?e+`
|
||
`+g+Math.round(100*t)/100+f:e,"getText"),n=(c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",e=>e.x0<h/2?e.x1+6:e.x0-6).attr("y",e=>(e.y1+e.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",e=>e.x0<h/2?"start":"end").text(t),c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(y.links).join("g").attr("class","link").style("mix-blend-mode","multiply")),b=a?.linkColor??"gradient";"gradient"===b&&((t=n.append("linearGradient").attr("id",e=>(e.uid=GIe.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",e=>e.source.x1).attr("x2",e=>e.target.x0)).append("stop").attr("offset","0%").attr("stop-color",e=>x(e.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",e=>x(e.target.id)));let w;switch(b){case"gradient":w=mt(e=>e.uid,"coloring");break;case"source":w=mt(e=>x(e.source.id),"coloring");break;case"target":w=mt(e=>x(e.target.id),"coloring");break;default:w=b}n.append("path").attr("d",zIe()).attr("stroke",w).attr("stroke-width",e=>Math.max(1,e.width)),nh(void 0,c,0,d)},"draw"),jIe={draw:qIe}}),QIe=e(()=>{WIe=mt(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
||
`).trim(),"prepareTextForParsing")}),JIe=e(()=>{YIe=mt(e=>`.label {
|
||
font-family: ${e.fontFamily};
|
||
}`,"getStyles"),HIe=YIe}),eRe={};$Be(eRe,{diagram:()=>rRe});var tRe,rRe,nRe,iRe,aRe,sRe,oRe,lRe,cRe,hRe,uRe,dRe,pRe,gRe,fRe,mRe,yRe,vRe,xRe=e(()=>{UNe(),qNe(),ZIe(),QIe(),JIe(),tRe=ANe.parse.bind(ANe),ANe.parse=e=>tRe(WIe(e)),rRe={styles:HIe,parser:ANe,db:zNe,renderer:jIe}}),bRe=e(()=>{Nn(),An(),iS(),Tu(),nRe={packet:[]},iRe=structuredClone(nRe),aRe=yr.packet,sRe=mt(()=>{var e=_C({...aRe,...Ir().packet});return e.showBits&&(e.paddingY+=10),e},"getConfig"),oRe=mt(()=>iRe.packet,"getPacket"),lRe=mt(e=>{0<e.length&&iRe.packet.push(e)},"pushWord"),cRe=mt(()=>{mh(),iRe=structuredClone(nRe)},"clear"),hRe={pushWord:lRe,getPacket:oRe,getConfig:sRe,clear:cRe,setAccTitle:yh,getAccTitle:vh,setDiagramTitle:wh,getDiagramTitle:kh,getAccDescription:bh,setAccDescription:xh}}),wRe=e(()=>{n1e(),t(),o1e(),bRe(),uRe=mt(e=>{i1e(e,hRe);let t=-1,r=[],n=1,i=hRe.getConfig().bitsPerRow;for(var{start:a,end:s,bits:o,label:l}of e.blocks){if(void 0!==a&&void 0!==s&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if((a??=t+1)!==t+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${t+1}.`);if(0===o)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(s??=a+(o??1)-1,o??=s-a+1,t=s,M.debug(`Packet block ${a} - ${t} with label `+l);r.length<=i+1&&hRe.getPacket().length<1e4;){var[c,h]=dRe({start:a,end:s,bits:o,label:l},n,i);if(r.push(c),c.end+1===n*i&&(hRe.pushWord(r),r=[],n++),!h)break;({start:a,end:s,bits:o,label:l}=h)}}hRe.pushWord(r)},"populate"),dRe=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 n;return e.end+1<=t*r?[e,void 0]:[{start:e.start,end:n=t*r-1,label:e.label,bits:n-e.start},{start:n=t*r,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),pRe={parse:mt(async e=>{e=await Jge("packet",e),M.debug(e),uRe(e)},"parse")}}),kRe=e(()=>{Cye(),ch(),gRe=mt((e,t,r,n)=>{var i,a,s=(n=n.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=n.getPacket(),n=n.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(n?0:o),c=c*h+2,d=vye(t);d.attr("viewbox",`0 0 ${c} `+o),rh(d,o,c,s.useMaxWidth);for([i,a]of u.entries())fRe(d,a,i,s);d.append("text").text(n).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),fRe=mt((e,t,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=e.append("g"),u=r*(n+a)+a;for(c of t){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-i;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+n/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"),mRe={draw:gRe}}),TRe=e(()=>{iS(),yRe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},vRe=mt(({packet:e}={})=>`
|
||
.packetByte {
|
||
font-size: ${(e=_C(yRe,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")}),ERe={};$Be(ERe,{diagram:()=>CRe});var CRe,SRe,_Re,ARe,LRe,NRe,IRe,RRe,MRe,DRe,ORe,PRe,BRe,$Re,FRe,zRe,GRe,URe=e(()=>{bRe(),wRe(),kRe(),TRe(),CRe={parser:pRe,db:hRe,renderer:mRe,styles:vRe}}),qRe=e(()=>{Nn(),An(),iS(),Tu(),_Re={axes:[],curves:[],options:SRe={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},ARe=structuredClone(_Re),LRe=yr.radar,NRe=mt(()=>_C({...LRe,...Ir().radar}),"getConfig"),IRe=mt(()=>ARe.axes,"getAxes"),RRe=mt(()=>ARe.curves,"getCurves"),MRe=mt(()=>ARe.options,"getOptions"),DRe=mt(e=>{ARe.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),ORe=mt(e=>{ARe.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:PRe(e.entries)}))},"setCurves"),PRe=mt(r=>{if(null==r[0].axis)return r.map(e=>e.value);var e=IRe();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"),BRe=mt(e=>{e=e.reduce((e,t)=>(e[t.name]=t,e),{}),ARe.options={showLegend:e.showLegend?.value??SRe.showLegend,ticks:e.ticks?.value??SRe.ticks,max:e.max?.value??SRe.max,min:e.min?.value??SRe.min,graticule:e.graticule?.value??SRe.graticule}},"setOptions"),$Re=mt(()=>{mh(),ARe=structuredClone(_Re)},"clear"),FRe={getAxes:IRe,getCurves:RRe,getOptions:MRe,setAxes:DRe,setCurves:ORe,setOptions:BRe,getConfig:NRe,clear:$Re,setAccTitle:yh,getAccTitle:vh,setDiagramTitle:wh,getDiagramTitle:kh,getAccDescription:bh,setAccDescription:xh}}),jRe=e(()=>{n1e(),t(),o1e(),qRe(),zRe=mt(e=>{i1e(e,FRe);var{axes:e,curves:t,options:r}=e;FRe.setAxes(e),FRe.setCurves(t),FRe.setOptions(r)},"populate"),GRe={parse:mt(async e=>{e=await Jge("radar",e),M.debug(e),zRe(e)},"parse")}});function WRe(r,e,t,n,i,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=YRe(e,n,i,l))*Math.cos(t),y:e*Math.sin(t)})),"circle"===a?r.append("path").attr("d",HRe(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 YRe(e,t,r,n){return n*(Math.min(Math.max(e,t),r)-t)/(r-t)}function HRe(t,r){let n=t.length,i=`M${t[0].x},`+t[0].y;for(let e=0;e<n;e++){var a=t[(e-1+n)%n],s=t[e],o=t[(e+1)%n],l=t[(e+2)%n],c=s.x+(o.x-a.x)*r,a=s.y+(o.y-a.y)*r,h=o.x-(l.x-s.x)*r;i+=` C${c},${a} ${h},${o.y-(l.y-s.y)*r} ${o.x},`+o.y}return i+" Z"}function VRe(a,e,t,r){if(t){let n=3*(r.width/2+r.marginRight)/4,i=3*-(r.height/2+r.marginTop)/4;e.forEach((e,t)=>{var r=a.append("g").attr("transform",`translate(${n}, ${i+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 XRe,KRe,ZRe,QRe,JRe,eMe,tMe,rMe,nMe=e(()=>{Cye(),XRe=mt((e,t,r,n)=>{var i=(n=n.db).getAxes(),a=n.getCurves(),s=n.getOptions(),o=n.getConfig(),n=n.getDiagramTitle(),t=vye(t),t=KRe(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;ZRe(t,i,h,s.ticks,s.graticule),QRe(t,i,h,o),WRe(t,i,a,c,l,s.graticule,o),VRe(t,a,s.showLegend,o),t.append("text").attr("class","radarTitle").text(n).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),KRe=mt((e,t)=>{var r=t.width+t.marginLeft+t.marginRight,n=t.height+t.marginTop+t.marginBottom,i=t.marginLeft+t.width/2,t=t.marginTop+t.height/2;return e.attr("viewbox",`0 0 ${r} `+n).attr("width",r).attr("height",n),e.append("g").attr("transform",`translate(${i}, ${t})`)},"drawFrame"),ZRe=mt((i,a,s,o,e)=>{if("circle"===e)for(let e=0;e<o;e++){var t=s*(e+1)/o;i.append("circle").attr("r",t).attr("class","radarGraticule")}else if("polygon"===e){let n=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/n-Math.PI/2,r*Math.cos(t)+","+r*Math.sin(t))).join(" ");i.append("polygon").attr("points",e).attr("class","radarGraticule")}}},"drawGraticule"),QRe=mt((t,r,n,i)=>{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",n*i.axisScaleFactor*Math.cos(o)).attr("y2",n*i.axisScaleFactor*Math.sin(o)).attr("class","radarAxisLine"),t.append("text").text(s).attr("x",n*i.axisLabelFactor*Math.cos(o)).attr("y",n*i.axisLabelFactor*Math.sin(o)).attr("class","radarAxisLabel")}},"drawAxes"),mt(WRe,"drawCurves"),mt(YRe,"relativeRadius"),mt(HRe,"closedRoundCurve"),mt(VRe,"drawLegend"),JRe={draw:XRe}}),iMe=e(()=>{iS(),Tn(),Nn(),eMe=mt((t,r)=>{let n="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var i=t["cScale"+e];n+=`
|
||
.radarCurve-${e} {
|
||
color: ${i};
|
||
fill: ${i};
|
||
fill-opacity: ${r.curveOpacity};
|
||
stroke: ${i};
|
||
stroke-width: ${r.curveStrokeWidth};
|
||
}
|
||
.radarLegendBox-${e} {
|
||
fill: ${i};
|
||
fill-opacity: ${r.curveOpacity};
|
||
stroke: ${i};
|
||
}
|
||
`}return n},"genIndexStyles"),tMe=mt(e=>{var t=_C(or(),Ir().themeVariables);return{themeVariables:t,radarOptions:_C(t.radar,e)}},"buildRadarStyleOptions"),rMe=mt(({radar:e}={})=>{var{themeVariables:e,radarOptions:t}=tMe(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;
|
||
}
|
||
${eMe(e,t)}
|
||
`},"styles")}),aMe={};$Be(aMe,{diagram:()=>sMe});var sMe,oMe,lMe,cMe=e(()=>{qRe(),jRe(),nMe(),iMe(),sMe={parser:GRe,db:FRe,renderer:JRe,styles:rMe}}),hMe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,7],n=[1,13],i=[1,14],a=[1,15],s=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],f=[8,15,16,21,27,28,29,30,31,32,40,44,47],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,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList: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:49,$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:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"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],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",a[o-1]),n.setHierarchy(a[o-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:n.getLogger().debug("Rule: link: ",a[o],e),this.$={edgeTypeStr:a[o],label:""};break;case 15:n.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=n.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr),c=n.edgeStrToEdgeData(a[o-1].edgeTypeStr),this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:n.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this||"na"),n.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),n.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),l=n.generateId(),this.$={id:l,type:"composite",label:"",children:a[o-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:n.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:n.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:n.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:n.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:n.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]},{11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47: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,21:r,28:n,29:i,31:a,32:s,40:o,44:l,47: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,32:s},{11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(f,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},t(g,[2,24]),{11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[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]),{37:[1,47]},{34:48,35:m},{15:[1,50]},t(u,[2,27]),t(f,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},t(f,[2,34]),{39:[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,n=[0],i=[],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=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=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){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,S={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var _,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],S.$=a[a.length-E],S._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(S,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},d={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)),n=(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=[n[0],n[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,n;if(this.options.backtrack_lexer&&(n={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)&&(n.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 i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,n){switch(r){case 0:return 10;case 1:return e.getLogger().debug("Found space-block"),31;case 2:return e.getLogger().debug("Found nl-block"),31;case 3:return e.getLogger().debug("Found space-block"),29;case 4:e.getLogger().debug(".",t.yytext);break;case 5:e.getLogger().debug("_",t.yytext);break;case 6:return 5;case 7:return t.yytext=-1,28;case 8:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 14:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 15:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 16:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 41: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:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 49: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 this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:case 61:case 62:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),38;case 75:return e.getLogger().debug("Lex: NODE_ID",t.yytext),32;case 76:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 77:case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 84:e.getLogger().debug("LEX POPPING"),this.popState();break;case 85:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 91:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 92:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 94:case 95:case 96:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 97:case 98:case 99:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 103:case 104:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 105:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\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:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};h.lexer=d,mt(e,"Parser"),(oMe=new((e.prototype=h).Parser=e)).parser=oMe,lMe=oMe});function uMe(e){switch(M.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return M.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 dMe(e){return"=="!==(M.debug("typeStr2Type",e),e)?"normal":"thick"}function pMe(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var gMe,fMe,mMe,yMe,vMe,xMe,bMe,wMe,kMe,TMe,EMe,CMe,SMe,_Me,AMe,LMe,NMe,IMe,RMe,MMe,DMe,OMe,PMe,BMe,$Me,FMe,zMe,GMe,UMe,qMe,jMe,WMe,YMe,HMe,VMe,XMe,KMe,ZMe,QMe,JMe,eDe=e(()=>{cz(),Nn(),Eu(),t(),lh(),Tu(),gMe=new Map,fMe=[],mMe=new Map,yMe=D(),vMe=new Map,xMe=mt(e=>L.sanitizeText(e,yMe),"sanitizeText"),bMe=mt(function(e,t=""){let r=vMe.get(e);r||(r={id:e,styles:[],textStyles:[]},vMe.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"),wMe=mt(function(e,t=""){e=gMe.get(e),null!=t&&(e.styles=t.split(","))},"addStyle2Node"),kMe=mt(function(e,r){e.split(",").forEach(function(e){let t=gMe.get(e);void 0===t&&(e=e.trim(),t={id:e,type:"na",children:[]},gMe.set(e,t)),t.classes||(t.classes=[]),t.classes.push(r)})},"setCssClass"),TMe=mt((e,t)=>{var r,n=[];for(r of e.flat())if(r.label&&(r.label=xMe(r.label)),"classDef"===r.type)bMe(r.id,r.css);else if("applyClass"===r.type)kMe(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&wMe(r.id,r?.stylesStr);else if("column-setting"===r.type)t.columns=r.columns??-1;else if("edge"===r.type){var i=(mMe.get(r.id)??0)+1;mMe.set(r.id,i),r.id=i+"-"+r.id,fMe.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(i=gMe.get(r.id))?gMe.set(r.id,r):("na"!==r.type&&(i.type=r.type),r.label!==r.id&&(i.label=r.label)),r.children&&TMe(r.children,r),"space"===r.type){var a=r.width??1;for(let e=0;e<a;e++){var s=lz(r);s.id=s.id+"-"+e,gMe.set(s.id,s),n.push(s)}}else void 0===i&&n.push(r);t.children=n},"populateBlockDatabase"),EMe=[],CMe={id:"root",type:"composite",children:[],columns:-1},SMe=mt(()=>{M.debug("Clear called"),mh(),CMe={id:"root",type:"composite",children:[],columns:-1},gMe=new Map([["root",CMe]]),EMe=[],vMe=new Map,fMe=[],mMe=new Map},"clear"),mt(uMe,"typeStr2Type"),mt(dMe,"edgeTypeStr2Type"),mt(pMe,"edgeStrToEdgeData"),_Me=0,AMe=mt(()=>(_Me++,"id-"+Math.random().toString(36).substr(2,12)+"-"+_Me),"generateId"),LMe=mt(e=>{CMe.children=e,TMe(e,CMe),EMe=CMe.children},"setHierarchy"),NMe=mt(e=>(e=gMe.get(e))?e.columns||(e.children?e.children.length:-1):-1,"getColumns"),IMe=mt(()=>[...gMe.values()],"getBlocksFlat"),RMe=mt(()=>EMe||[],"getBlocks"),MMe=mt(()=>fMe,"getEdges"),DMe=mt(e=>gMe.get(e),"getBlock"),OMe=mt(e=>{gMe.set(e.id,e)},"setBlock"),BMe=mt(()=>M,"getLogger"),PMe=mt(function(){return vMe},"getClasses"),BMe={getConfig:mt(()=>Ir().block,"getConfig"),typeStr2Type:uMe,edgeTypeStr2Type:dMe,edgeStrToEdgeData:pMe,getLogger:BMe,getBlocksFlat:IMe,getBlocks:RMe,getEdges:MMe,setHierarchy:LMe,getBlock:DMe,setBlock:OMe,getColumns:NMe,getClasses:PMe,clear:SMe,generateId:AMe},$Me=BMe}),tDe=e(()=>{vn(),JK(),FMe=mt((e,t)=>{var r=(i=Bt)(e,"r"),n=i(e,"g"),i=i(e,"b");return Ot(r,n,i,t)},"fade"),zMe=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};
|
||
rect {
|
||
opacity: 0.5;
|
||
background-color: ${e.edgeLabelBackground};
|
||
fill: ${e.edgeLabelBackground};
|
||
}
|
||
text-align: center;
|
||
}
|
||
|
||
/* For html labels only */
|
||
.labelBkg {
|
||
background-color: ${FMe(e.edgeLabelBackground,.5)};
|
||
// background-color:
|
||
}
|
||
|
||
.node .cluster {
|
||
// fill: ${FMe(e.mainBkg,.5)};
|
||
fill: ${FMe(e.clusterBkg,.5)};
|
||
stroke: ${FMe(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};
|
||
}
|
||
${qK()}
|
||
`,"getStyles"),GMe=zMe}),rDe=e(()=>{t(),UMe=mt((t,e,r,n)=>{e.forEach(e=>{QMe[e](t,r,n)})},"insertMarkers"),qMe=mt((e,t,r)=>{M.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"),jMe=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"),WMe=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"),YMe=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"),HMe=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"),VMe=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"),XMe=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"),KMe=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"),ZMe=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"),QMe={extension:qMe,composition:jMe,aggregation:WMe,dependency:YMe,lollipop:HMe,point:VMe,circle:XMe,cross:KMe,barb:ZMe},JMe=UMe});function nDe(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 iDe(s,o,l=0,c=0){if(M.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)iDe(h,o);var u,d,p,g,f=cDe(s),m=f.width;M.debug("setBlockSizes abc95 maxWidth of",s.id,":s children is ",m,u=f.height);for(d of s.children)d.size&&(M.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)+lDe*((d.widthInColumns??1)-1),d.size.height=u,d.size.x=0,d.size.y=0,M.debug(`abc95 updating size of ${s.id} children child:${d.id} maxWidth:${m} maxHeight:`+u));for(p of s.children)iDe(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,n=(0<e&&e<t&&(r=e),Math.ceil(t/r)),i=r*(m+lDe)+lDe,a=n*(u+lDe)+lDe;if(i<l){M.debug(`Detected to small sibling: abc95 ${s.id} siblingWidth ${l} siblingHeight ${c} width `+i),i=l,a=c;var y,v=(l-r*lDe-lDe)/r,x=(c-n*lDe-lDe)/n;M.debug("Size indata abc88",s.id,"childWidth",v,"maxWidth",m),M.debug("Size indata abc88",s.id,"childHeight",x,"maxHeight",u),M.debug("Size indata abc88 xSize",r,"padding",lDe);for(y of s.children)y.size&&(y.size.width=v,y.size.height=x,y.size.x=0,y.size.y=0)}if(M.debug(`abc95 (finale calc) ${s.id} xSize ${r} ySize ${n} columns ${e}${s.children.length} width=`+Math.max(i,s.size?.width||0)),i<(s?.size?.width||0)&&(i=s?.size?.width||0,0<(f=0<e?Math.min(s.children.length,e):s.children.length))){var b,w=(i-f*lDe-lDe)/f;M.debug("abc95 (growing to fit) width",s.id,i,s.size?.width,w);for(b of s.children)b.size&&(b.size.width=w)}s.size={width:i,height:a,x:0,y:0}}M.debug("setBlockSizes abc94 (done)",s.id,s?.size?.x,s?.size?.width,s?.size?.y,s?.size?.height)}function aDe(n,i){M.debug(`abc85 layout blocks (=>layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width);var a=n.columns??-1;if(M.debug("layoutBlocks columns abc95",n.id,"=>",a,n),n.children&&0<n.children.length){var s,o=n?.children[0]?.size?.width??0,o=n.children.length*o+(n.children.length-1)*lDe;M.debug("widthOfChildren 88",o,"posX");let e=0,t=(M.debug("abc91 block?.size?.x",n.id,n?.size?.x),n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-lDe),r=0;for(s of n.children){var l,c,h,u,d=n;s.size&&({width:l,height:c}=s.size,{px:u,py:h}=nDe(a,e),h!=r&&(r=h,t=n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-lDe,M.debug("New row in layout for block",n.id," and child ",s.id,r)),M.debug(`abc89 layout blocks (child) id: ${s.id} Pos: ${e} (px, py) ${u},${h} (${d?.size?.x},${d?.size?.y}) parent: ${d.id} width: `+l+lDe),d.size&&(u=l/2,s.size.x=t+lDe+u,M.debug(`abc91 layout blocks (calc) px, pyid:${s.id} startingPos=X${t} new startingPosX${s.size.x} ${u} padding=${lDe} width=${l} halfWidth=${u} => x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 `+l*(s?.widthInColumns??1)/2),t=s.size.x+u,s.size.y=d.size.y-d.size.height/2+h*(c+lDe)+c/2+lDe,M.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${t}${lDe}${u}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2`+l*(s?.widthInColumns??1)/2)),s.children&&aDe(s,i),e+=s?.widthInColumns??1,M.debug("abc88 columnsPos",s,e))}}M.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function sDe(e,{minX:t,minY:r,maxX:n,maxY:i}={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),n<a+o/2&&(n=a+o/2),i<s+l/2)&&(i=s+l/2),e.children)for(var c of e.children)({minX:t,minY:r,maxX:n,maxY:i}=sDe(c,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}function oDe(e){var t,r,n=e.getBlock("root");if(n)return iDe(n,e,0,0),aDe(n,e),M.debug("getBlocks",JSON.stringify(n,null,2)),{minX:e,minY:n,maxX:t,maxY:r}=sDe(n),{x:e,y:n,width:t-e,height:r-n}}var lDe,cDe,hDe=e(()=>{t(),Eu(),lDe=D()?.block?.padding??8,mt(nDe,"calculateBlockPosition"),cDe=mt(e=>{let t=0,r=0;for(var n of e.children){var{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};M.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),"space"!==n.type&&(i>t&&(t=i/(e.widthInColumns??1)),a>r)&&(r=a)}return{width:t,height:r}},"getMaxChildSize"),mt(iDe,"setBlockSizes"),mt(aDe,"layoutBlocks"),mt(sDe,"findBounds"),mt(oDe,"layout")});function uDe(e,t){t&&e.attr("style",t)}function dDe(e){var t=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),uDe(a,e.labelStyle),a.attr("class",i),uDe(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}var pDe,gDe,fDe,mDe,yDe,vDe=e(()=>{a6(),t(),Eu(),lh(),iS(),JL(),mt(uDe,"applyStyle"),mt(dDe,"addHtmlLabel"),pDe=mt(async(e,t,r,n)=>{let i=e||"";if("object"==typeof i&&(i=i[0]),Uc(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"<br />"),M.debug("vertexText"+i),dDe({isNode:n,label:await ZL(rS(i)),labelStyle:t.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),gDe=pDe}),xDe=e(()=>{t(),fDe=mt((e,t,r,n,i)=>{t.arrowTypeStart&&yDe(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&yDe(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),mDe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},yDe=mt((e,t,r,n,i,a)=>{var s=mDe[r];s?e.attr("marker-"+t,`url(${n}#${i}_${a}-${s}${"start"===t?"Start":"End"})`):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function bDe(e,t){D().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}var wDe,kDe,TDe,EDe,CDe,SDe,_De,ADe,LDe,NDe,IDe=e(()=>{t(),vDe(),JL(),a6(),Eu(),iS(),lh(),sO(),ZD(),xDe(),wDe={},kDe={},TDe=mt(async(e,t)=>{var r,n=D(),i=Uc(n.flowchart.htmlLabels),n="markdown"===t.labelType?QL(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:!0},n):await gDe(t.label,t.labelStyle),a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(n);let o=n.getBBox();i&&(i=n.children[0],r=H(n),o=i.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),wDe[t.id]=a,t.width=o.width,t.height=o.height;let l;return t.startLabelLeft&&(i=await gDe(t.startLabelLeft,t.labelStyle),s=(r=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a=i.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),kDe[t.id]||(kDe[t.id]={}),kDe[t.id].startLeft=r,bDe(l,t.startLabelLeft)),t.startLabelRight&&(i=await gDe(t.startLabelRight,t.labelStyle),a=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a.node().appendChild(i),r=i.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),kDe[t.id]||(kDe[t.id]={}),kDe[t.id].startRight=s,bDe(l,t.startLabelRight)),t.endLabelLeft&&(i=await gDe(t.endLabelLeft,t.labelStyle),r=(a=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(i),s=i.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(i),kDe[t.id]||(kDe[t.id]={}),kDe[t.id].endLeft=a,bDe(l,t.endLabelLeft)),t.endLabelRight&&(r=await gDe(t.endLabelRight,t.labelStyle),i=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=i.node().appendChild(r),a=r.getBBox(),i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),kDe[t.id]||(kDe[t.id]={}),kDe[t.id].endRight=s,bDe(l,t.endLabelRight)),n},"insertEdgeLabel"),mt(bDe,"setTerminalWidth"),EDe=mt((n,i)=>{M.debug("Moving label abc88 ",n.id,n.label,wDe[n.id],i);var a,s=i.updatedPath||i.originalPath,o=D(),o=$D(o).subGraphTitleTotalMargin;if(n.label){let e=wDe[n.id],t=n.x,r=n.y;s&&(a=eS.calcLabelPosition(s),M.debug("Moving label "+n.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(n.startLabelLeft){let e=kDe[n.id].startLeft,t=n.x,r=n.y;s&&(i=eS.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.startLabelRight){let e=kDe[n.id].startRight,t=n.x,r=n.y;s&&(a=eS.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelLeft){let e=kDe[n.id].endLeft,t=n.x,r=n.y;s&&(o=eS.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelRight){let e=kDe[n.id].endRight,t=n.x,r=n.y;s&&(i=eS.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),CDe=mt((e,t)=>{var r=e.x,n=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-n);return e.width/2<=r||e.height/2<=t},"outsideNode"),SDe=mt((e,n,i)=>{M.debug(`intersection calc abc89:
|
||
outsidePoint: ${JSON.stringify(n)}
|
||
insidePoint : ${JSON.stringify(i)}
|
||
node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-i.x),s=e.width/2,o=i.x<n.x?s-r:s+r,l=e.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x),u;if(Math.abs(t-n.y)*s>Math.abs(a-n.x)*l)return e=i.y<n.y?n.y-l-t:t-l-n.y,o=h*e/c,u={x:i.x<n.x?i.x+o:i.x-h+o,y:i.y<n.y?i.y+c-e:i.y-c+e},0===o&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),M.debug(`abc89 topp/bott calc, Q ${c}, q ${e}, R ${h}, r `+o,u),u;{let e=c*(o=i.x<n.x?n.x-s-a:a-s-n.x)/h,t=i.x<n.x?i.x+h-o:i.x-h+o,r=i.y<n.y?i.y+e:i.y-e;return M.debug(`sides calc abc89, Q ${c}, q ${e}, R ${h}, r `+o,{_x:t,_y:r}),0===o&&(t=n.x,r=n.y),0===h&&(t=n.x),0===c&&(r=n.y),{x:t,y:r}}},"intersection"),_De=mt((e,n)=>{M.debug("abc88 cutPathAtIntersect",e,n);let i=[],a=e[0],s=!1;return e.forEach(e=>{if(CDe(n,e)||s)a=e,s||i.push(e);else{let t=SDe(n,a,e),r=!1;i.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),i.some(e=>e.x===t.x&&e.y===t.y)||i.push(t),s=!0}}),i},"cutPathAtIntersect"),ADe=mt(function(e,t,r,n,i,a,s){let o=r.points,l=(M.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&&(M.debug("to cluster abc88",n[r.toCluster]),o=_De(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(M.debug("from cluster abc88",n[r.fromCluster]),o=_De(o.reverse(),n[r.fromCluster].node).reverse(),l=!0),o.filter(e=>!Number.isNaN(e.y))),d=x3,{x:p,y:g}=(!r.curve||"graph"!==i&&"flowchart"!==i||(d=r.curve),rO(r)),f=n3().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(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(v=Gc(!0)),fDe(y,r,v,s,i),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),RDe=e(()=>{LDe=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"),NDe=mt((e,t,r)=>{var e=LDe(e),n=t.height+2*r.padding,i=n/2,t=t.width+2*i+r.padding,r=r.padding/2;return e.has("right")&&e.has("left")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:i,y:0},{x:t/2,y:2*r},{x:t-i,y:0},{x:t,y:0},{x:t,y:-n/3},{x:t+2*r,y:-n/2},{x:t,y:-2*n/3},{x:t,y:-n},{x:t-i,y:-n},{x:t/2,y:-n-2*r},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*r,y:-n/2},{x:0,y:-n/3}]:e.has("right")&&e.has("left")&&e.has("up")?[{x:i,y:0},{x:t-i,y:0},{x:t,y:-n/2},{x:t-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:e.has("right")&&e.has("left")&&e.has("down")?[{x:0,y:0},{x:i,y:-n},{x:t-i,y:-n},{x:t,y:0}]:e.has("right")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:t,y:-i},{x:t,y:i-n},{x:0,y:-n}]:e.has("left")&&e.has("up")&&e.has("down")?[{x:t,y:0},{x:0,y:-i},{x:0,y:i-n},{x:t,y:-n}]:e.has("right")&&e.has("left")?[{x:i,y:0},{x:i,y:-r},{x:t-i,y:-r},{x:t-i,y:0},{x:t,y:-n/2},{x:t-i,y:-n},{x:t-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:e.has("up")&&e.has("down")?[{x:t/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:t/2,y:-n},{x:t,y:r-n},{x:t-i,y:r-n},{x:t-i,y:-r},{x:t,y:-r}]:e.has("right")&&e.has("up")?[{x:0,y:0},{x:t,y:-i},{x:0,y:-n}]:e.has("right")&&e.has("down")?[{x:0,y:0},{x:t,y:0},{x:0,y:-n}]:e.has("left")&&e.has("up")?[{x:t,y:0},{x:0,y:-i},{x:t,y:-n}]:e.has("left")&&e.has("down")?[{x:t,y:0},{x:0,y:0},{x:t,y:-n}]:e.has("right")?[{x:i,y:-r},{x:i,y:-r},{x:t-i,y:-r},{x:t-i,y:0},{x:t,y:-n/2},{x:t-i,y:-n},{x:t-i,y:r-n},{x:i,y:r-n},{x:i,y:r-n}]:e.has("left")?[{x:i,y:0},{x:i,y:-r},{x:t-i,y:-r},{x:t-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:e.has("up")?[{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:t/2,y:-n},{x:t,y:r-n},{x:t-i,y:r-n},{x:t-i,y:-r}]:e.has("down")?[{x:t/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:t-i,y:r-n},{x:t-i,y:-r},{x:t,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function MDe(e,t){return e.intersect(t)}var DDe,ODe=e(()=>{mt(MDe,"intersectNode"),DDe=MDe});function PDe(e,t,r,n){var i=e.x,e=e.y,a=i-n.x,s=e-n.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(n.x<i&&(a=-a),Math.abs(t*r*s/o));return{x:i+a,y:e+(t=n.y<e?-t:t)}}var BDe,$De=e(()=>{mt(PDe,"intersectEllipse"),BDe=PDe});function FDe(e,t,r){return BDe(e,t,t,r)}var zDe,GDe=e(()=>{$De(),mt(FDe,"intersectCircle"),zDe=FDe});function UDe(e,t,r,n){var i,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*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0<u*d||(u=(i=n.y-r.y)*e.x+(a=r.x-n.x)*e.y+(s=n.x*r.y-r.x*n.y),d=i*t.x+a*t.y+s,0!=u&&0!==d&&0<u*d)||0==(o=l*a-i*c)))return e=Math.abs(o/2),{x:(r=c*s-a*h)<0?(r-e)/o:(r+e)/o,y:(r=i*h-l*s)<0?(r-e)/o:(r+e)/o}}function qDe(e,t){return 0<e*t}var jDe,WDe=e(()=>{mt(UDe,"intersectLine"),mt(qDe,"sameSign"),jDe=UDe});function YDe(e,t,n){var r=e.x,i=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=i-e.height/2-o,h=0;h<t.length;h++){var u=t[h],d=t[h<t.length-1?h+1:0];(u=jDe(e,n,{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-n.x,e=e.y-n.y,r=Math.sqrt(r*r+e*e),e=t.x-n.x,t=t.y-n.y;return r<(e=Math.sqrt(e*e+t*t))?-1:r===e?0:1}),a[0]):e}var HDe,VDe,XDe,KDe,ZDe=e(()=>{WDe(),mt(HDe=YDe,"intersectPolygon")}),QDe=e(()=>{VDe=mt((e,t)=>{var r,n=e.x,i=e.y,a=t.x-n,t=t.y-i,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:n+r,y:i+e}},"intersectRect"),XDe=VDe}),JDe=e(()=>{ODe(),GDe(),$De(),ZDe(),QDe(),KDe={node:DDe,circle:zDe,ellipse:BDe,polygon:HDe,rect:XDe}});function eOe(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var tOe,rOe,nOe,iOe,aOe=e(()=>{vDe(),JL(),Eu(),a6(),lh(),iS(),tOe=mt(async(e,t,r,i)=>{let a=D(),n,s=t.useHtmlLabels||Uc(a.flowchart.htmlLabels),o=(n=r||"node default",e.insert("g").attr("class",n).attr("id",t.domId||t.id)),l=o.insert("g").attr("class","label").attr("style",t.labelStyle),c,h=(c=void 0===t.labelText?"":"string"==typeof t.labelText?t.labelText:t.labelText[0],l.node()),u,d=(u="markdown"===t.labelType?QL(l,Oc(rS(c),a),{useHtmlLabels:s,width:t.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(await gDe(Oc(rS(c),a),t.labelStyle,!1,i))).getBBox(),p=t.padding/2;if(Uc(a.flowchart.htmlLabels)){if(r=u.children[0],e=H(u),i=r.getElementsByTagName("img")){let n=""===c.replace(/<img[^>]*>/g,"").trim();await Promise.all([...i].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",n?(e=a.fontSize||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)})))}d=r.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),rOe=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),mt(eOe,"insertPolygonShape")}),sOe=e(()=>{aOe(),t(),Eu(),JDe(),nOe=mt(async(e,t)=>{t.useHtmlLabels||D().flowchart.htmlLabels||(t.centerLabel=!0);var{shapeSvg:e,bbox:r,halfPadding:n}=await tOe(e,t,"node "+t.classes,!0),i=(M.info("Classes = ",t.classes),e.insert("rect",":first-child"));return i.attr("rx",t.rx).attr("ry",t.ry).attr("x",-r.width/2-n).attr("y",-r.height/2-n).attr("width",r.width+t.padding).attr("height",r.height+t.padding),rOe(t,i),t.intersect=function(e){return KDe.rect(t,e)},e},"note"),iOe=nOe});function oOe(e,t,r,n){let i=[],a=mt(e=>{i.push(e,0)},"addBorder"),s=mt(e=>{i.push(0,e)},"skipBorder");(t.includes("t")?(M.debug("add top border"),a):s)(r),(t.includes("r")?(M.debug("add right border"),a):s)(n),(t.includes("b")?(M.debug("add bottom border"),a):s)(r),(t.includes("l")?(M.debug("add left border"),a):s)(n),e.attr("stroke-dasharray",i.join(" "))}var lOe,cOe,hOe,uOe,dOe,pOe,gOe,fOe,mOe,yOe,vOe,xOe,bOe,wOe,kOe,TOe,EOe,COe,SOe,_Oe,AOe,LOe,NOe,IOe,ROe,MOe,DOe,OOe,POe,BOe=e(()=>{a6(),Eu(),lh(),t(),RDe(),vDe(),JDe(),sOe(),aOe(),lOe=mt(e=>e?" "+e:"","formatClass"),cOe=mt((e,t)=>`${t||"node default"}${lOe(e.classes)} `+lOe(e.class),"getClassesFromNode"),hOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await tOe(e,t,cOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return M.info("Question main (Circle)"),(e=eOe(r,s,s,o)).attr("style",t.style),rOe(t,e),t.intersect=function(e){return M.warn("Intersect called"),KDe.polygon(t,o,e)},r},"question"),uOe=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 KDe.circle(t,14,e)},e),"choice"),dOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await tOe(e,t,cOe(t,void 0),!0),i=n.height+t.padding,a=i/4,s=n.width+2*a+t.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=eOe(r,s,i,o);return l.attr("style",t.style),rOe(t,l),t.intersect=function(e){return KDe.polygon(t,o,e)},r},"hexagon"),pOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await tOe(e,t,void 0,!0),i=n.height+2*t.padding,a=i/2,s=n.width+2*a+t.padding,o=NDe(t.directions,n,t),l=eOe(r,s,i,o);return l.attr("style",t.style),rOe(t,l),t.intersect=function(e){return KDe.polygon(t,o,e)},r},"block_arrow"),gOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await tOe(e,t,cOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return eOe(r,i,a,s).attr("style",t.style),t.width=i+a,t.height=a,t.intersect=function(e){return KDe.polygon(t,s,e)},r},"rect_left_inv_arrow"),fOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await tOe(e,t,cOe(t),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=eOe(r,i,a,s);return o.attr("style",t.style),rOe(t,o),t.intersect=function(e){return KDe.polygon(t,s,e)},r},"lean_right"),mOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await tOe(e,t,cOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=eOe(r,i,a,s);return o.attr("style",t.style),rOe(t,o),t.intersect=function(e){return KDe.polygon(t,s,e)},r},"lean_left"),yOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await tOe(e,t,cOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=eOe(r,i,a,s);return o.attr("style",t.style),rOe(t,o),t.intersect=function(e){return KDe.polygon(t,s,e)},r},"trapezoid"),vOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await tOe(e,t,cOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=eOe(r,i,a,s);return o.attr("style",t.style),rOe(t,o),t.intersect=function(e){return KDe.polygon(t,s,e)},r},"inv_trapezoid"),xOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await tOe(e,t,cOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=eOe(r,i,a,s);return o.attr("style",t.style),rOe(t,o),t.intersect=function(e){return KDe.polygon(t,s,e)},r},"rect_right_inv_arrow"),bOe=mt(async(e,i)=>{let{shapeSvg:t,bbox:r}=await tOe(e,i,cOe(i,void 0),!0),n=r.width+i.padding,a=n/2,s=a/(2.5+n/50),o=r.height+s+i.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,c=t.attr("label-offset-y",s).insert("path",":first-child").attr("style",i.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return rOe(i,c),i.intersect=function(t){var r=KDe.rect(i,t),n=r.x-i.x;if(0!=a&&(Math.abs(n)<i.width/2||Math.abs(n)==i.width/2&&Math.abs(r.y-i.y)>i.height/2-s)){let e=s*s*(1-n*n/(a*a));0!=e&&(e=Math.sqrt(e)),e=s-e,0<t.y-i.y&&(e=-e),r.y+=e}return r},t},"cylinder"),wOe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:n}=await tOe(e,t,"node "+t.classes+" "+t.class,!0),i=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-n,r=t.positioned?-s/2:-r.height/2-n;return i.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&&(n=new Set(Object.keys(t.props)),t.props.borders&&(oOe(i,t.props.borders,a,s),n.delete("borders")),n.forEach(e=>{M.warn("Unknown node property "+e)})),rOe(t,i),t.intersect=function(e){return KDe.rect(t,e)},e},"rect"),kOe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:n}=await tOe(e,t,"node "+t.classes,!0),i=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-n,r=t.positioned?-s/2:-r.height/2-n;return i.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&&(n=new Set(Object.keys(t.props)),t.props.borders&&(oOe(i,t.props.borders,a,s),n.delete("borders")),n.forEach(e=>{M.warn("Unknown node property "+e)})),rOe(t,i),t.intersect=function(e){return KDe.rect(t,e)},e},"composite"),TOe=mt(async(e,t)=>{var r,e=(await tOe(e,t,"label",!0)).shapeSvg,n=(M.trace("Classes = ",t.class),e.insert("rect",":first-child"));return n.attr("width",0).attr("height",0),e.attr("class","label edgeLabel"),t.props&&(r=new Set(Object.keys(t.props)),t.props.borders&&(oOe(n,t.props.borders,0,0),r.delete("borders")),r.forEach(e=>{M.warn("Unknown node property "+e)})),rOe(t,n),t.intersect=function(e){return KDe.rect(t,e)},e},"labelRect"),mt(oOe,"applyNodePropertyBorders"),EOe=mt(async(e,t)=>{let r,n=(r=t.classes?"node "+t.classes:"node default",e.insert("g").attr("class",r).attr("id",t.domId||t.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=t.labelText.flat?t.labelText.flat():t.labelText,l,c=(l="object"==typeof o?o[0]:o,M.info("Label text abc79",l,o,"object"==typeof o),s.node().appendChild(await gDe(l,t.labelStyle,!0,!0))),h={width:0,height:0};Uc(D().flowchart.htmlLabels)&&(e=c.children[0],d=H(c),h=e.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),M.info("Text 2",o);var u,e=o.slice(1,o.length),d=c.getBBox(),e=s.node().appendChild(await gDe(e.join?e.join("<br/>"):e,t.labelStyle,!0,!0)),p=(Uc(D().flowchart.htmlLabels)&&(p=e.children[0],u=H(e),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),t.padding/2);return H(e).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),H(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)+")"),i.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),rOe(t,i),t.intersect=function(e){return KDe.rect(t,e)},n},"rectWithTitle"),COe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r}=await tOe(e,t,cOe(t,void 0),!0),n=r.height+t.padding,r=r.width+n/4+t.padding,r=e.insert("rect",":first-child").attr("style",t.style).attr("rx",n/2).attr("ry",n/2).attr("x",-r/2).attr("y",-n/2).attr("width",r).attr("height",n);return rOe(t,r),t.intersect=function(e){return KDe.rect(t,e)},e},"stadium"),SOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await tOe(e,t,cOe(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",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),M.info("Circle main"),rOe(t,a),t.intersect=function(e){return M.info("Circle intersect",t,n.width/2+i,e),KDe.circle(t,n.width/2+i,e)},r},"circle"),_Oe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await tOe(e,t,cOe(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",n.width/2+i+5).attr("width",n.width+t.padding+10).attr("height",n.height+t.padding+10),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),M.info("DoubleCircle main"),rOe(t,s),t.intersect=function(e){return M.info("DoubleCircle intersect",t,n.width/2+i+5,e),KDe.circle(t,n.width/2+i+5,e)},r},"doublecircle"),AOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await tOe(e,t,cOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=eOe(r,i,a,s);return o.attr("style",t.style),rOe(t,o),t.intersect=function(e){return KDe.polygon(t,s,e)},r},"subroutine"),LOe=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),rOe(t,r),t.intersect=function(e){return KDe.circle(t,7,e)},e},"start"),NOe=mt((e,t,r)=>{let n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=70,a=10;return"LR"===r&&(i=10,a=70),e=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join"),rOe(t,e),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(e){return KDe.rect(t,e)},n},"forkJoin"),IOe=mt((e,t)=>{var r=(e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("circle",":first-child"),n=e.insert("circle",":first-child");return n.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),rOe(t,n),t.intersect=function(e){return KDe.circle(t,7,e)},e},"end"),ROe=mt(async(e,s)=>{let t=s.padding/2,r,n=(r=s.classes?"node "+s.classes:"node default",e.insert("g").attr("class",r).attr("id",s.domId||s.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),o=n.insert("line"),l=0,c=4,h=n.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=h.node().appendChild(await gDe(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=(Uc(D().flowchart.htmlLabels)&&(e=g.children[0],y=H(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&&(D().flowchart.htmlLabels?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),H(e=h.node().appendChild(await gDe(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=e.getBBox(),x=(Uc(D().flowchart.htmlLabels)&&(y=e.children[0],w=H(e),v=y.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)),c+=v.height+4,v.width>l&&(l=v.width),[]),b=(s.classData.members.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">")),h.node().appendChild(await gDe(r,t.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;Uc(D().flowchart.htmlLabels)&&(e=n.children[0],a=H(n),i=e.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,x.push(n)}),c+=8,[]);s.classData.methods.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">")),h.node().appendChild(await gDe(r,t.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;Uc(D().flowchart.htmlLabels)&&(e=n.children[0],a=H(n),i=e.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,b.push(n)}),c+=8,d&&(y=(l-f.width)/2,H(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var w=(l-v.width)/2;return H(e).attr("transform","translate( "+(-1*l/2+w)+", "+(-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,x.forEach(e=>{H(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,b.forEach(e=>{H(e).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),e=e?.getBBox(),u+=(e?.height??0)+4}),i.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),rOe(s,i),s.intersect=function(e){return KDe.rect(s,e)},n},"class_box"),MOe={rhombus:hOe,composite:kOe,question:hOe,rect:wOe,labelRect:TOe,rectWithTitle:EOe,choice:uOe,circle:SOe,doublecircle:_Oe,stadium:COe,hexagon:dOe,block_arrow:pOe,rect_left_inv_arrow:gOe,lean_right:fOe,lean_left:mOe,trapezoid:yOe,inv_trapezoid:vOe,rect_right_inv_arrow:xOe,cylinder:bOe,start:LOe,end:IOe,note:iOe,subroutine:AOe,fork:NOe,join:NOe,class_box:ROe},DOe={},OOe=mt(async(t,r,n)=>{let i,a;if(r.link){let e;"sandbox"===D().securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e),a=await MOe[r.shape](i,r,n)}else a=await MOe[r.shape](t,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),DOe[r.id]=i,r.haveCallback&&DOe[r.id].attr("class",DOe[r.id].attr("class")+" clickable"),i},"insertNode"),POe=mt(e=>{var t=DOe[e.id],r=(M.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 $Oe(e,t,r=!1){let n=e,i="default",a=(0<(n?.classes?.length||0)&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label",0),s="",o;switch(n.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=kC(n?.styles??[]),l=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:e.labelStyle,shape:s,labelText:n.label,rx:a,ry:a,class:i,style:e.style,id:n.id,directions:n.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:r,intersect:void 0,type:n.type,padding:o??Ir()?.block?.padding??0}}async function FOe(e,t,r){var n;"group"!==(t=$Oe(t,0,!1)).type&&(n=Ir(),n=(e=await OOe(e,t,{config:n})).node().getBBox(),(t=r.getBlock(t.id)).size={width:n.width,height:n.height,x:0,y:0,node:e},r.setBlock(t),e.remove())}async function zOe(e,t,r){var n=$Oe(t,0,!0);"space"!==r.getBlock(n.id).type&&(r=Ir(),await OOe(e,n,{config:r}),t.intersect=n?.intersect,POe(n))}async function GOe(e,t,r,n){for(var i of t)await n(e,i,r),i.children&&await GOe(e,i.children,r,n)}async function UOe(e,t,r){await GOe(e,t,r,FOe)}async function qOe(e,t,r){await GOe(e,t,r,zOe)}async function jOe(e,t,r,n,i){var a,s,o,l,c=new jY({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(a of r)a.size&&c.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(s of t)s.start&&s.end&&(l=n.getBlock(s.start),o=n.getBlock(s.end),l?.size)&&o?.size&&(l=l.size,o=o.size,l=[{x:l.x,y:l.y},{x:l.x+(o.x-l.x)/2,y:l.y+(o.y-l.y)/2},{x:o.x,y:o.y}],ADe(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",c,i),s.label)&&(await TDe(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),EDe({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var WOe,YOe,HOe,VOe=e(()=>{YY(),Nn(),IDe(),BOe(),iS(),mt($Oe,"getNodeFromBlock"),mt(FOe,"calculateBlockSize"),mt(zOe,"insertBlockPositioned"),mt(GOe,"performOperations"),mt(UOe,"calculateBlockSizes"),mt(qOe,"insertBlocks"),mt(jOe,"insertEdges")}),XOe=e(()=>{a6(),Nn(),rDe(),t(),ch(),hDe(),VOe(),WOe=mt(function(e,t){return t.db.getClasses()},"getClasses"),YOe=mt(async function(e,t,r,n){let{securityLevel:i,block:a}=Ir(),s=n.db,o;"sandbox"===i&&(o=H("#i"+t));var l=H("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===i?l.select(`[id="${t}"]`):H(`[id="${t}"]`),n=(JMe(l,["point","circle","cross"],n.type,t),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await UOe(u,n,s),oDe(s));await qOe(u,n,s),await jOe(u,h,c,s,t),d&&(n=d,u=Math.max(1,Math.round(n.width/n.height*.125)),h=n.height+u+10,c=n.width+10,t=a.useMaxWidth,rh(l,h,c,!!t),M.debug("Here Bounds",d,n),l.attr("viewBox",`${n.x-5} ${n.y-5} ${n.width+10} `+(n.height+10)))},"draw"),HOe={draw:YOe,getClasses:WOe}}),KOe={};$Be(KOe,{diagram:()=>ZOe});var ZOe,QOe,JOe,ePe,tPe,rPe,nPe,iPe,aPe,sPe,oPe,lPe,cPe,hPe,uPe,dPe,pPe,gPe,fPe,mPe=e(()=>{hMe(),eDe(),tDe(),XOe(),ZOe={parser:lMe,db:$Me,renderer:HOe,styles:GMe}}),yPe=e(()=>{QOe={L:"left",R:"right",T:"top",B:"bottom"},JOe={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")},ePe={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")},tPe=mt(function(e){return nPe(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),rPe=mt(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),nPe=mt(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),iPe=mt(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),aPe=mt(function(e,t){var r=nPe(e)&&iPe(t),e=iPe(e)&&nPe(t);return r||e},"isArchitectureDirectionXY"),sPe=mt(function(e){var t=e[0],e=e[1],r=nPe(t)&&iPe(e),t=iPe(t)&&nPe(e);return r||t},"isArchitecturePairXY"),oPe=mt(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),lPe=mt(function(e,t){return oPe(e=""+e+t)?e:void 0},"getArchitectureDirectionPair"),cPe=mt(function([e,t],r){var n=r[0],r=r[1];return nPe(n)?iPe(r)?[e+("L"===n?-1:1),t+("T"===r?1:-1)]:[e+("L"===n?-1:1),t]:nPe(r)?[e+("L"===r?1:-1),t+("T"===n?1:-1)]:[e,t+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),hPe=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"),uPe=mt(function(e,t){return aPe(e,t)?"bend":nPe(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),dPe=mt(function(e){return"service"===e.type},"isArchitectureService"),pPe=mt(function(e){return"junction"===e.type},"isArchitectureJunction"),gPe=mt(e=>e.data(),"edgeData"),fPe=mt(e=>e.data(),"nodeData")});function vPe(e){return OPe()[e]}var xPe,bPe,wPe,kPe,TPe,EPe,CPe,SPe,_Pe,APe,LPe,NPe,IPe,RPe,MPe,DPe,OPe,PPe,BPe,$Pe,FPe,zPe,GPe,UPe,qPe,jPe,WPe,YPe,HPe=e(()=>{An(),Nn(),c1e(),Tu(),yPe(),iS(),xPe=yr.architecture,bPe=new s1e(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:xPe,dataStructures:void 0,elements:{}})),wPe=mt(()=>{bPe.reset(),mh()},"clear"),kPe=mt(function({id:e,icon:t,in:r,title:n,iconText:i}){if(void 0!==bPe.records.registeredIds[e])throw new Error(`The service id [${e}] is already in use by another `+bPe.records.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(void 0===bPe.records.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"===bPe.records.registeredIds[r])throw new Error(`The service [${e}]'s parent is not a group`)}bPe.records.registeredIds[e]="node",bPe.records.nodes[e]={id:e,type:"service",icon:t,iconText:i,title:n,edges:[],in:r}},"addService"),TPe=mt(()=>Object.values(bPe.records.nodes).filter(dPe),"getServices"),EPe=mt(function({id:e,in:t}){bPe.records.registeredIds[e]="node",bPe.records.nodes[e]={id:e,type:"junction",edges:[],in:t}},"addJunction"),CPe=mt(()=>Object.values(bPe.records.nodes).filter(pPe),"getJunctions"),SPe=mt(()=>Object.values(bPe.records.nodes),"getNodes"),_Pe=mt(e=>bPe.records.nodes[e],"getNode"),APe=mt(function({id:e,icon:t,in:r,title:n}){if(void 0!==bPe.records.registeredIds[e])throw new Error(`The group id [${e}] is already in use by another `+bPe.records.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(void 0===bPe.records.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"===bPe.records.registeredIds[r])throw new Error(`The group [${e}]'s parent is not a group`)}bPe.records.registeredIds[e]="group",bPe.records.groups[e]={id:e,icon:t,title:n,in:r}},"addGroup"),LPe=mt(()=>Object.values(bPe.records.groups),"getGroups"),NPe=mt(function({lhsId:e,rhsId:t,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!rPe(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+r);if(!rPe(n))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+n);if(void 0===bPe.records.nodes[e]&&void 0===bPe.records.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===bPe.records.nodes[t]&&void 0===bPe.records.groups[e])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=bPe.records.nodes[e].in,h=bPe.records.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.`);bPe.records.edges.push({lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:t,rhsDir:n,rhsInto:a,rhsGroup:o,title:l}),bPe.records.nodes[e]&&bPe.records.nodes[t]&&(bPe.records.nodes[e].edges.push(bPe.records.edges[bPe.records.edges.length-1]),bPe.records.nodes[t].edges.push(bPe.records.edges[bPe.records.edges.length-1]))},"addEdge"),IPe=mt(()=>bPe.records.edges,"getEdges"),RPe=mt(()=>{if(void 0===bPe.records.dataStructures){let s={},o=Object.entries(bPe.records.nodes).reduce((e,[a,t])=>(e[a]=t.edges.reduce((e,t)=>{var r,n=_Pe(t.lhsId)?.in,i=_Pe(t.rhsId)?.in;return n&&i&&n!==i&&"bend"!==(r=uPe(t.lhsDir,t.rhsDir))&&(s[n]??={},s[n][i]=r,s[i]??={},s[i][n]=r),t.lhsId===a?(i=lPe(t.lhsDir,t.rhsDir))&&(e[i]=t.rhsId):(n=lPe(t.rhsDir,t.lhsDir))&&(e[n]=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 i={[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,n]=i[t];Object.entries(e).forEach(([e,t])=>{l[t]||(i[t]=cPe([r,n],e),a.push(t))})}}return i},"BFS"),t=[e(r)];for(;0<Object.keys(c).length;)t.push(e(Object.keys(c)[0]));bPe.records.dataStructures={adjList:o,spatialMaps:t,groupAlignments:s}}return bPe.records.dataStructures},"getDataStructures"),MPe=mt((e,t)=>{bPe.records.elements[e]=t},"setElementForId"),DPe=mt(e=>bPe.records.elements[e],"getElementById"),OPe=mt(()=>_C({...xPe,...Ir().architecture}),"getConfig"),PPe={clear:wPe,setDiagramTitle:wh,getDiagramTitle:kh,setAccTitle:yh,getAccTitle:vh,setAccDescription:xh,getAccDescription:bh,getConfig:OPe,addService:kPe,getServices:TPe,addJunction:EPe,getJunctions:CPe,getNodes:SPe,getNode:_Pe,addGroup:APe,getGroups:LPe,addEdge:NPe,getEdges:IPe,setElementForId:MPe,getElementById:DPe,getDataStructures:RPe},mt(vPe,"getConfigField")}),VPe=e(()=>{n1e(),t(),o1e(),HPe(),BPe=mt((e,t)=>{i1e(e,t),e.groups.map(t.addGroup),e.services.map(e=>t.addService({...e,type:"service"})),e.junctions.map(e=>t.addJunction({...e,type:"junction"})),e.edges.map(t.addEdge)},"populateDb"),$Pe={parse:mt(async e=>{e=await Jge("architecture",e),M.debug(e),BPe(e,PPe)},"parse")}}),XPe=e(()=>{FPe=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"),zPe=FPe}),KPe=MBe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.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 n(){}mt(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,e.exports=n},function(e,t,r){var n,i=r(2),a=r(8),s=r(9);function o(e,t,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(n in mt(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];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),n=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==n)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 n(e){this.vGraphObject=e}mt(n,"LGraphObject"),e.exports=n},function(e,t,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(5);function h(e,t,r,n){i.call(this,n=null==r&&null==n?t:n),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(n in mt(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];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=[],n=this;return n.edges.forEach(function(e){if(e.target==t){if(e.source!=n)throw"Incorrect edge source!";r.push(e)}}),r},h.prototype.getEdgesBetween=function(t){var r=[],n=this;return n.edges.forEach(function(e){if(e.source!=n&&e.target!=n)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 n,i=r(0);function a(){}for(n in mt(a,"FDLayoutConstants"),i)a[n]=i[n];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 n(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(e){this.x=e},n.prototype.setY=function(e){this.y=e},n.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=n},function(e,t,r){var n,i=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){i.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(n in mt(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];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 n=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(n))throw"Node already in graph!";return(n.owner=this).getNodes().push(n),n}if(n=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:(n.source=t,n.target=r,n.isInterGraph=!1,this.getEdges().push(n),t.edges.push(n),r!=t&&r.edges.push(n),n)},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,n=t.edges.slice(),i=n.length,a=0;a<i;a++)((r=n[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,n=this.getNodes(),i=n.length,a=0;a<i;a++){var s,o=n[a];(s=o.getTop())<t&&(t=s),(s=o.getLeft())<r&&(r=s)}return t==d.MAX_VALUE?null:(e=null!=n[0].getParent().paddingLeft?n[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,n=d.MAX_VALUE,i=-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())<n&&(n=t),i<(t=h.getRight())&&(i=t),(t=h.getTop())<a&&(a=t),s<(t=h.getBottom())&&(s=t)}var u=new p(n,a,i-n,s-a);n==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,n=d.MAX_VALUE,i=-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())<n&&(n=o),i<(o=l.getBottom())&&(i=o)}return new p(t,n,r-t,i-n)},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,n=0;n<r;n++)e+=t[n].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,n=new h,i=new Set,e=this.nodes[0];for(e.withChildren().forEach(function(e){n.push(e),i.add(e)});0!==n.length;)for(var a,s,o=(a=(e=n.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(e,this))||i.has(s)||s.withChildren().forEach(function(e){n.push(e),i.add(e)});this.isConnected=!1,i.size>=this.nodes.length&&(r=0,i.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 n(e){c=r(6),this.layout=e,this.graphs=[],this.edges=[]}mt(n,"LGraphManager"),n.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},n.prototype.add=function(e,t,r,n,i){if(null==r&&null==n&&null==i){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(i=r,r=e,e=(n=t).getOwner(),t=i.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,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,-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},n.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,n=[],i=(n=n.concat(t.getEdges())).length,a=0;a<i;a++)r=n[a],t.remove(r);for(var s,o=[],i=(o=o.concat(t.getNodes())).length,a=0;a<i;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)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(null==this.allNodes){for(var e=[],t=this.getGraphs(),r=t.length,n=0;n<r;n++)e=e.concat(t[n].getNodes());this.allNodes=e}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.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},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(e){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=e},n.prototype.getRoot=function(){return this.rootGraph},n.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"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(e,t){if(null==e||null==t)throw"assert failed";if(e==t)return!0;for(var r,n=e.getOwner();null!=(r=n.getParent());){if(r==t)return!0;if(null==(n=r.getOwner()))break}for(n=t.getOwner();null!=(r=n.getParent());){if(r==e)return!0;if(null==(n=r.getOwner()))break}return!1},n.prototype.calcLowestCommonAncestors=function(){for(var e,t,r,n,i,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(n=t.getOwner();null==e.lca;){for(i=(e.targetInLca=r).getOwner();null==e.lca;){if(i==n){e.lca=i;break}if(i==this.rootGraph)break;if(null!=e.lca)throw"assert failed";e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(n==this.rootGraph)break;null==e.lca&&(e.sourceInLca=n.getParent(),n=e.sourceInLca.getOwner())}if(null==e.lca)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();for(var r=e.getOwner();null!=r;){for(var n=t.getOwner();null!=n;){if(n==r)return n;n=n.getParent().getOwner()}r=r.getParent().getOwner()}return r},n.prototype.calcInclusionTreeDepths=function(e,t){null==e&&null==t&&(e=this.rootGraph,t=1);for(var r,n=e.getNodes(),i=n.length,a=0;a<i;a++)(r=n[a]).inclusionTreeDepth=t,null!=r.child&&this.calcInclusionTreeDepths(r.child,t+1)},n.prototype.includesInvalidEdge=function(){for(var e,t=[],r=this.edges.length,n=0;n<r;n++)e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target)&&t.push(e);for(n=0;n<t.length;n++)this.remove(t[n]);return!1},e.exports=n},function(e,t,r){var h=r(12);function n(){}mt(n,"IGeometry"),n.calcSeparationAmount=function(e,t,r,n){if(!e.intersects(t))throw"assert failed";var i=new Array(2),a=(this.decideDirectionsForOverlappingNodes(e,t,i),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*i[0]*(e/2+n),r[1]=-1*i[1]*(t/2+n)},n.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},n.getIntersection2=function(e,t,r){var n=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),s=t.getCenterY();if(e.intersects(t))return r[0]=n,r[1]=i,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(),x=t.getBottom(),b=t.getRight(),w=t.getWidthHalf(),k=t.getHeightHalf(),T=!1,E=!1;if(n===a){if(s<i)return r[0]=n,r[1]=l,r[2]=a,r[3]=x,!1;i<s&&(r[0]=n,r[1]=u,r[2]=a,r[3]=m)}else if(i===s){if(a<n)return r[0]=o,r[1]=i,r[2]=y,r[3]=s,!1;n<a&&(r[0]=c,r[1]=i,r[2]=f,r[3]=s)}else{var e=e.height/e.width,t=t.height/t.width,C=(s-i)/(a-n),S=void 0,_=void 0,A=void 0;if(-e==C?(a<n?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),T=!0):e==C&&(a<n?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),T=!0),-t==C?(n<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),E=!0):t==C&&(n<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),E=!0),T&&E)return!1;if(c=a<n?s<i?(S=this.getCardinalDirection(e,C,4),this.getCardinalDirection(t,C,2)):(S=this.getCardinalDirection(-e,C,3),this.getCardinalDirection(-t,C,1)):s<i?(S=this.getCardinalDirection(-e,C,1),this.getCardinalDirection(-t,C,3)):(S=this.getCardinalDirection(e,C,2),this.getCardinalDirection(t,C,4)),!T)switch(S){case 1:_=l,r[0]=n+-g/C,r[1]=_;break;case 2:_=i+p*C,r[0]=d,r[1]=_;break;case 3:_=u,r[0]=n+g/C,r[1]=_;break;case 4:_=i+-p*C,r[0]=h,r[1]=_}if(!E)switch(c){case 1:A=m,r[2]=a+-k/C,r[3]=A;break;case 2:A=s+w*C,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/C,r[3]=A;break;case 4:A=s+-w*C,r[2]=v,r[3]=A}}return!1},n.getCardinalDirection=function(e,t,r){return t<e?r:1+r%4},n.getIntersection=function(e,t,r,n){var i,a,s,o,l,c;return null==n?this.getIntersection2(e,t,r):(i=e.x,a=t.x,l=r.x,o=a*(e=e.y)-i*(t=t.y),c=(s=n.x)*(r=r.y)-l*(n=n.y),0==(n=(t-=e)*(e=l-s)-(l=n-r)*(s=i-a))?null:new h((s*c-e*o)/n,(l*o-t*c)/n))},n.angleOfVector=function(e,t,r,n){var i=void 0;return e!==r?(i=Math.atan((n-t)/(r-e)),r<e?i+=Math.PI:n<t&&(i+=this.TWO_PI)):i=n<t?this.ONE_AND_HALF_PI:this.HALF_PI,i},n.doIntersect=function(e,t,r,n){var i=e.x,e=e.y,a=t.x,t=t.y,s=r.x,r=r.y,o=n.x,l=(a-i)*((n=n.y)-r)-(o-s)*(t-e);return 0!=l&&(t=((e-t)*(o-i)+(a-i)*(n-e))/l,0<(a=((n-r)*(o-i)+(s-o)*(n-e))/l))&&a<1&&0<t&&t<1},n.findCircleLineIntersections=function(e,t,r,n,i,a,s){var o=(r-e)*(r-e)+(n-t)*(n-t);return 0<=(r=2*((e-i)*(r-e)+(t-a)*(n-t)))*r-4*o*(n=(e-i)*(e-i)+(t-a)*(t-a)-s*s)?(e=(-r+Math.sqrt(r*r-4*o*n))/(2*o),i=(-r-Math.sqrt(r*r-4*o*n))/(2*o),0<=e&&e<=1?[e]:0<=i&&i<=1?[i]:null):null},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,e.exports=n},function(e,t,r){function n(){}mt(n,"IMath"),n.sign=function(e){return 0<e?1:e<0?-1:0},n.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},n.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=n},function(e,t,r){function n(){}mt(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,e.exports=n},function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(n,"defineProperties"),mt(i,"_classCallCheck");var a,s,o=mt(function(e){return{value:e,next:null,prev:null}},"nodeFrom"),l=mt(function(e,t,r,n){return null!==e?e.next=t:n.head=t,null!==r?r.prev=t:n.tail=t,t.prev=e,t.next=r,n.length++,t},"add"),c=mt(function(e,t){var r=e.prev,n=e.next;return null!==r?r.next=n:t.head=n,null!==n?n.prev=r:t.tail=r,e.prev=e.next=null,t.length--,e},"_remove");function h(e){var t=this;i(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,n=this.head;r<e;)n=n.next,r++;n.value=t}},"set_object_at")}],n(a.prototype,s),e.exports=h},function(e,t,r){function n(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(n,"Point"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.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)))},n.prototype.move=function(e,t){this.x=e,this.y=t},n.prototype.translate=function(e,t){this.x+=e,this.y+=t},n.prototype.equals=function(e){return"Point"==e.constructor.name?this.x==e.x&&this.y==e.y:this==e},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},e.exports=n},function(e,t,r){function n(e,t,r,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=e&&null!=t&&null!=r&&null!=n&&(this.x=e,this.y=t,this.width=r,this.height=n)}mt(n,"RectangleD"),n.prototype.getX=function(){return this.x},n.prototype.setX=function(e){this.x=e},n.prototype.getY=function(){return this.y},n.prototype.setY=function(e){this.y=e},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},e.exports=n},function(e,t,r){var n="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 i(){}mt(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:(null==e.uniqueID&&(e.uniqueID=i.getString(),i.lastID++),e.uniqueID)},i.getString=function(e){return"Object#"+(null==e?i.lastID:e)},i.isPrimitive=function(e){var t="u"<typeof e?"undefined":n(e);return null==e||"object"!=t&&"function"!=t},e.exports=i},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 n=r(0),i=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=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(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 i(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"!==n.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(),n=0;n<r.length;n++)update(r[n]);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=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.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 n=this.getAllNodes(),i=0;i<n.length;i++)n[i].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,n=e.getNodes(),i=0;i<n.length;i++)null==(r=(t=n[i]).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(),n=!0,i=0;i<r.length;i++)null!=r[i].getChild()&&(n=!1);if(n)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(),i=0;i<h.length;i++){var u=h[i].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),i=0;i<d.length;i++){var p=d[i];-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,n=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null),s=(a.setRect(new Point(0,0),new Dimension(1,1)),n.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:n).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 n=this.edgeToDummyNodes.get(r),i=0;i<n.length;i++){var a=n[i],s=new l(a.getCenterX(),a.getCenterY()),o=r.bendpoints.get(i);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,n){var i,a;return null!=r&&null!=n?(i=t,e<=50?i-=(t-t/r)/50*(50-e):i+=(t*n-t)/50*(e-50),i):(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=[],n=new Map,i=!1,a=null;1!=t.length&&2!=t.length||(i=!0,a=t[0]);for(var s=0;s<t.length;s++){var o=(c=t[s]).getNeighborsList().size;n.set(c,c.getNeighborsList().size),1==o&&r.push(c)}for(l=(l=[]).concat(r);!i;){[].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=n.get(e)-1)&&l.push(e),n.set(e,t))})}r=r.concat(l),1!=t.length&&2!=t.length||(i=!0,a=t[0])}return a},u.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=u},function(e,t,r){function n(){}mt(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return(n.x=1e4*Math.sin(n.seed++))-Math.floor(n.x)},e.exports=n},function(e,t,r){var n=r(5);function i(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(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=this.lworldExtX;return 0!=t?this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/t:0},i.prototype.transformY=function(e){var t=this.lworldExtY;return 0!=t?this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/t:0},i.prototype.inverseTransformX=function(e){var t=this.ldeviceExtX;return 0!=t?this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/t:0},i.prototype.inverseTransformY=function(e){var t=this.ldeviceExtY;return 0!=t?this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/t:0},i.prototype.inverseTransformPoint=function(e){return new n(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},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 n,i=r(15),p=r(4),l=r(0),c=r(8),h=r(9);function a(){i.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(n in mt(a,"FDLayout"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.initParameters=function(){i.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,n,i,a,s=this.getGraphManager().getAllEdges(),o=0;o<s.length;o++)t=(e=s[o]).idealLength,e.isInterGraph&&(r=e.getSource(),n=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),a=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+a-2*l.SIMPLE_NODE_SIZE),i=e.getLca().getInclusionTreeDepth(),e.idealLength+=t*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+n.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.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,n,i,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(),i=new Set,e=0;e<o.length;e++)r=o[e],this.calculateRepulsionForceOfANode(r,i,a,s),i.add(r);else for(e=0;e<o.length;e++)for(r=o[e],t=e+1;t<o.length;t++)n=o[t],r.getOwner()==n.getOwner()&&this.calcRepulsionForce(r,n)},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,n,i=e.getSource(),a=e.getTarget();if(this.uniformLeafNodeSizes&&null==i.getChild()&&null==a.getChild())e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;0!=(r=e.getLength())&&(t=e.edgeElasticity*(r-t),n=e.lengthY/r*t,i.springForceX+=e=e.lengthX/r*t,i.springForceY+=n,a.springForceX-=e,a.springForceY-=n)},a.prototype.calcRepulsionForce=function(e,t){var r,n,i,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),n=2*o[0],i=2*o[1],o=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren),e.repulsionForceX-=o*n,e.repulsionForceY-=o*i,t.repulsionForceX+=o*n,t.repulsionForceY+=o*i):(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),i=(l=(e.nodeRepulsion/2+t.nodeRepulsion/2)*e.noOfChildren*t.noOfChildren/a)*o/s,e.repulsionForceX-=n=l*r/s,e.repulsionForceY-=i,t.repulsionForceX+=n,t.repulsionForceY+=i)},a.prototype.calcGravitationalForce=function(e){var t,r=e.getOwner(),n=(r.getRight()+r.getLeft())/2,i=(r.getTop()+r.getBottom())/2,n=e.getCenterX()-n,i=e.getCenterY()-i,a=Math.abs(n)+e.getWidth()/2,s=Math.abs(i)+e.getHeight()/2;e.getOwner()==this.graphManager.getRoot()?((t=r.getEstimatedSize()*this.gravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*n,e.gravitationForceY=-this.gravityConstant*i):((t=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*i*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)),n=new Array(t),i=0;i<t;i++)n[i]=new Array(r);for(i=0;i<t;i++)for(var a=0;a<r;a++)n[i][a]=new Array;return n},a.prototype.addNodeToGrid=function(e,t,r){for(var n=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=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=n;o<=i;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(e),e.setGridCoordinates(n,i,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,n){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||n){var i=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)||i.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&&i.add(u))}e.surrounding=[].concat(d(i))}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 n,i=r(1),a=r(4);function s(e,t,r){i.call(this,e,t,r),this.idealLength=a.DEFAULT_EDGE_LENGTH,this.edgeElasticity=a.DEFAULT_SPRING_STRENGTH}for(n in mt(s,"FDLayoutEdge"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];e.exports=s},function(e,t,r){var n,i=r(3),a=r(4);function s(e,t,r,n){i.call(this,e,t,r,n),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(n in mt(s,"FDLayoutNode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.setGridCoordinates=function(e,t,r,n){this.startX=e,this.finishX=t,this.startY=r,this.finishY=n},e.exports=s},function(e,t,r){function n(e,t){this.width=0,this.height=0,null!==e&&null!==t&&(this.height=t,this.width=e)}mt(n,"DimensionD"),n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},e.exports=n},function(e,t,r){var n=r(14);function i(){this.map={},this.keys=[]}mt(i,"HashMap"),i.prototype.put=function(e,t){var r=n.createID(e);this.contains(r)||(this.map[r]=t,this.keys.push(e))},i.prototype.contains=function(e){return n.createID(e),null!=this.map[e]},i.prototype.get=function(e){return e=n.createID(e),this.map[e]},i.prototype.keySet=function(){return this.keys},e.exports=i},function(e,t,r){var n=r(14);function i(){this.set={}}mt(i,"HashSet"),i.prototype.add=function(e){var t=n.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[n.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[n.createID(e)]==e},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),r=t.length,n=0;n<r;n++)e.push(this.set[t[n]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,r=0;r<t;r++){var n=e[r];this.add(n)}},e.exports=i},function(e,t,r){function n(){}mt(n,"Matrix"),n.multMat=function(e,t){for(var r=[],n=0;n<e.length;n++){r[n]=[];for(var i=0;i<t[0].length;i++)for(var a=r[n][i]=0;a<e[0].length;a++)r[n][i]+=e[n][a]*t[a][i]}return r},n.transpose=function(e){for(var t=[],r=0;r<e[0].length;r++){t[r]=[];for(var n=0;n<e.length;n++)t[r][n]=e[n][r]}return t},n.multCons=function(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=e[n]*t;return r},n.minusOp=function(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=e[n]-t[n];return r},n.dotProduct=function(e,t){for(var r=0,n=0;n<e.length;n++)r+=e[n]*t[n];return r},n.mag=function(e){return Math.sqrt(this.dotProduct(e,e))},n.normalize=function(e){for(var t=[],r=this.mag(e),n=0;n<e.length;n++)t[n]=e[n]/r;return t},n.multGamma=function(e){for(var t=[],r=0,n=0;n<e.length;n++)r+=e[n];r*=-1/e.length;for(var i=0;i<e.length;i++)t[i]=r+e[i];return t},n.multL=function(e,t,r){for(var n=[],i=[],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];i[s]=o}for(var c=0;c<r.length;c++){for(var h=0,u=0;u<r.length;u++)h+=r[c][u]*i[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];n[d]=p}return n},e.exports=n},function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(n,"defineProperties"),mt(i,"_classCallCheck");var a,s,o=r(11),r=(mt(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:mt(function(e,t,r){var n;t<r&&(n=this._partition(e,t,r),this._quicksort(e,t,n),this._quicksort(e,n+1,r))},"_quicksort")},{key:"_partition",value:mt(function(e,t,r){for(var n=this._get(e,t),i=t,a=r;;){for(;this.compareFunction(n,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),n);)i++;if(!(i<a))return a;this._swap(e,i,a),i++,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 n=this._get(e,t);this._set(e,t,this._get(e,r)),this._set(e,r,n)},"_swap")},{key:"_defaultCompareFunction",value:mt(function(e,t){return e<t},"_defaultCompareFunction")}],n(a.prototype,s),l);function l(e,t){i(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=[],n=0;n<t[0];n++)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=[],n=0;n<t[0];n++)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),n=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m)),a=0;a<Math.max(n,i);a++){if(a<n){this.s[a]=0;for(var G=a;G<this.m;G++)this.s[a]=Ae.hypot(this.s[a],e[G][a]);if(0!==this.s[a]){e[a][a]<0&&(this.s[a]=-this.s[a]);for(var U=a;U<this.m;U++)e[U][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<n&&F){for(var q=0,j=a;j<this.m;j++)q+=e[j][a]*e[j][s];for(var q=-q/e[a][a],W=a;W<this.m;W++)e[W][s]+=q*e[W][a]}r[s]=e[a][s]}if(a<n)for(var Y=a;Y<this.m;Y++)this.U[Y][a]=e[Y][a];if(a<i){r[a]=0;for(var H=a+1;H<this.n;H++)r[a]=Ae.hypot(r[a],r[H]);if(0!==r[a]){r[a+1]<0&&(r[a]=-r[a]);for(var V=a+1;V<this.n;V++)r[V]/=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);n<this.n&&(this.s[n]=e[n][n]),this.m<o&&(this.s[o-1]=0),i+1<o&&(r[i]=e[i][o-1]),r[o-1]=0;for(var l=n;l<P;l++){for(var re=0;re<this.m;re++)this.U[re][l]=0;this.U[l][l]=1}for(var c=n-1;0<=c;c--)if(0!==this.s[c]){for(var ne=c+1;ne<P;ne++){for(var ie=0,ae=c;ae<this.m;ae++)ie+=this.U[ae][c]*this.U[ae][ne];for(var ie=-ie/this.U[c][c],se=c;se<this.m;se++)this.U[se][ne]+=ie*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<i&&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 xe=(p!==o?Math.abs(r[p]):0)+(p!==u+1?Math.abs(r[p-1]):0);if(Math.abs(this.s[p])<=ve+ye*xe){this.s[p]=0;break}}p===u?d=3:p===o-1?d=1:(d=2,u=p)}switch(u++,d){case 1:var be=r[o-2];r[o-2]=0;for(var g=o-2;u<=g;g--){var f=Ae.hypot(this.s[g],be),we=this.s[g]/f,ke=be/f;this.s[g]=f,g!==u&&(be=-ke*r[g-1],r[g-1]=we*r[g-1]);for(var m=0;m<this.n;m++)f=we*this.V[m][g]+ke*this.V[m][o-1],this.V[m][o-1]=-ke*this.V[m][g]+we*this.V[m][o-1],this.V[m][g]=f}break;case 2:var Te=r[u-1];r[u-1]=0;for(var y=u;y<o;y++){var v=Ae.hypot(this.s[y],Te),Ee=this.s[y]/v,Ce=Te/v;this.s[y]=v,Te=-Ce*r[y],r[y]=Ee*r[y];for(var x=0;x<this.m;x++)v=Ee*this.U[x][y]+Ce*this.U[x][u-1],this.U[x][u-1]=-Ce*this.U[x][y]+Ee*this.U[x][u-1],this.U[x][y]=v}break;case 3:var b=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[o-1]),Math.abs(this.s[o-2])),Math.abs(r[o-2])),Math.abs(this.s[u])),Math.abs(r[u])),w=this.s[o-1]/b,k=this.s[o-2]/b,T=r[o-2]/b,Se=this.s[u]/b,b=r[u]/b,k=((k+w)*(k-w)+T*T)/2,T=w*T*(w*T),E=0;0==k&&0==T||(E=Math.sqrt(k*k+T),E=T/(k+(k<0?-E:E)));for(var C=(Se+w)*(Se-w)+E,S=Se*b,_=u;_<o-1;_++){var A=Ae.hypot(C,S),L=C/A,N=S/A;_!==u&&(r[_-1]=A),C=L*this.s[_]+N*r[_],r[_]=L*r[_]-N*this.s[_],S=N*this.s[_+1],this.s[_+1]=L*this.s[_+1];for(var I=0;I<this.n;I++)A=L*this.V[I][_]+N*this.V[I][_+1],this.V[I][_+1]=-N*this.V[I][_]+L*this.V[I][_+1],this.V[I][_]=A;if(L=C/(A=Ae.hypot(C,S)),N=S/A,this.s[_]=A,C=L*r[_]+N*this.s[_+1],this.s[_+1]=-N*r[_]+L*this.s[_+1],S=N*r[_+1],r[_+1]=L*r[_+1],_<this.m-1)for(var R=0;R<this.m;R++)A=L*this.U[R][_]+N*this.U[R][_+1],this.U[R][_+1]=-N*this.U[R][_]+L*this.U[R][_+1],this.U[R][_]=A}r[o-2]=C;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 M=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=M,u<this.n-1)for(var D=0;D<this.n;D++)M=this.V[D][u+1],this.V[D][u+1]=this.V[D][u],this.V[D][u]=M;if(u<this.m-1)for(var O=0;O<this.m;O++)M=this.U[O][u+1],this.U[O][u+1]=this.U[O][u],this.U[O][u]=M;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 n,i;function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,i=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=n,this.gap_penalty=i,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"),n=h,i=[{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 n=1;n<this.jMax;n++){var i=[this.sequence1[r-1]===this.sequence2[n-1]?this.grid[r-1][n-1]+this.match_score:this.grid[r-1][n-1]+this.mismatch_penalty,this.grid[r-1][n]+this.gap_penalty,this.grid[r][n-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[r][n]=i[a[0]],this.tracebackGrid[r][n]=[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=[],n=-1;-1!==(n=e.indexOf(t,n+1));)r.push(n);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:mt(function(e){return this.getAllIndexes(e,Math.max.apply(null,e))},"arrayAllMaxIndexes")}],a(n.prototype,i),e.exports=h},function(e,t,r){var n=mt(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(4),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(5),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(25),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(6),n.LEdge=r(1),n.LGraphManager=r(7),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(27),n.Matrix=r(24),n.SVD=r(26),e.exports=n},function(e,t,r){function n(){this.listeners=[]}mt(n,"Emitter");var i=n.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var r=this.listeners.length;0<=r;r--){var n=this.listeners[r];n.event===e&&n.callback===t&&this.listeners.splice(r,1)}},i.emit=function(e,t){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];e===n.event&&n.callback(t)}},e.exports=n}],i={},mt(n,"__webpack_require__"),n.m=r,n.c=i,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=28);function n(e){var t;return(i[e]||(t=i[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}var r,i})}),ZPe=MBe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(KPe()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(KPe()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(t){return n={45:(e,t,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),e.exports=n},806:(e,t,r)=>{var n,i=r(551).FDLayoutConstants;function a(){}for(n in mt(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.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 n,i=r(551).FDLayoutEdge;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},880:(e,t,r)=>{var n,i=r(551).LGraph;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},578:(e,t,r)=>{var n,i=r(551).LGraphManager;function a(e){i.call(this,e)}for(n in mt(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},765:(e,t,r)=>{var n,i=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,x=r(551).LGraph,b=r(551).Transform,w=r(551).LinkedList;function k(){i.call(this),this.toBeTiled={},this.constraints={}}for(n in mt(k,"CoSELayout"),k.prototype=Object.create(i.prototype),i)k[n]=i[n];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(){i.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(){i.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 n=e[r].rect,i=e[r].id;t[i]={id:i,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.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 n=mt(function e(t){for(var r,n=t.getChild().getNodes(),i=0,a=0;a<n.length;a++)null==(r=n[a]).getChild()?s.fixedNodeSet.has(r.id)&&(i+=100):i+=e(r);return i},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(e){s.fixedNodeSet.add(e.nodeId)});for(var i,e=this.graphManager.getAllNodes(),t=0;t<e.length;t++)null!=(r=e[t]).getChild()&&0<(i=n(r))&&(r.fixedNodeWeight=i)}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,n=e.length-1;n>=2*e.length/3;n--)t=Math.floor(Math.random()*(n+1)),r=e[n],e[n]=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(n,i){var a=[],s=[],o=new w,l=new Set,c=0;return n.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();i.has(r)&&(s[c]=!0),n.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 i=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){(e=i.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,n=0;n<e[t].length;n++){if(this.fixedNodeSet.has(e[t][n])){r=0;break}r+=this.idToNodeMap.get(e[t][n]).displacementX}for(var a=r/e[t].length,n=0;n<e[t].length;n++)this.idToNodeMap.get(e[t][n]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal)for(var s=this.constraints.alignmentConstraint.horizontal,t=0;t<s.length;t++){for(var o=0,n=0;n<s[t].length;n++){if(this.fixedNodeSet.has(s[t][n])){o=0;break}o+=this.idToNodeMap.get(s[t][n]).displacementY}for(var l=o/s[t].length,n=0;n<s[t].length;n++)this.idToNodeMap.get(s[t][n]).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 n;i.fixedNodesOnHorizontal.has(r)||(n=0,n=(i.dummyToNodeForVerticalAlignment.has(r)?i.idToNodeMap.get(i.dummyToNodeForVerticalAlignment.get(r)[0]):i.idToNodeMap.get(r)).displacementX,i.nodeToRelativeConstraintMapHorizontal.get(r).forEach(function(e){var t;e.right?(t=i.nodeToTempPositionMapHorizontal.get(e.right)-i.nodeToTempPositionMapHorizontal.get(r)-n)<e.gap&&(n-=e.gap-t):(t=i.nodeToTempPositionMapHorizontal.get(r)-i.nodeToTempPositionMapHorizontal.get(e.left)+n)<e.gap&&(n+=e.gap-t)}),i.nodeToTempPositionMapHorizontal.set(r,i.nodeToTempPositionMapHorizontal.get(r)+n),i.dummyToNodeForVerticalAlignment.has(r)?i.dummyToNodeForVerticalAlignment.get(r).forEach(function(e){i.idToNodeMap.get(e).displacementX=n}):i.idToNodeMap.get(r).displacementX=n)}),this.nodesInRelativeVertical.forEach(function(r){var n;i.fixedNodesOnHorizontal.has(r)||(n=0,n=(i.dummyToNodeForHorizontalAlignment.has(r)?i.idToNodeMap.get(i.dummyToNodeForHorizontalAlignment.get(r)[0]):i.idToNodeMap.get(r)).displacementY,i.nodeToRelativeConstraintMapVertical.get(r).forEach(function(e){var t;e.bottom?(t=i.nodeToTempPositionMapVertical.get(e.bottom)-i.nodeToTempPositionMapVertical.get(r)-n)<e.gap&&(n-=e.gap-t):(t=i.nodeToTempPositionMapVertical.get(r)-i.nodeToTempPositionMapVertical.get(e.top)+n)<e.gap&&(n+=e.gap-t)}),i.nodeToTempPositionMapVertical.set(r,i.nodeToTempPositionMapVertical.get(r)+n),i.dummyToNodeForHorizontalAlignment.has(r)?i.dummyToNodeForHorizontalAlignment.get(r).forEach(function(e){i.idToNodeMap.get(e).displacementY=n}):i.idToNodeMap.get(r).displacementY=n)});else{for(t=0;t<this.componentsOnHorizontal.length;t++){var c=this.componentsOnHorizontal[t];if(this.fixedComponentsOnHorizontal[t])for(n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?this.dummyToNodeForVerticalAlignment.get(c[n]).forEach(function(e){i.idToNodeMap.get(e).displacementX=0}):this.idToNodeMap.get(c[n]).displacementX=0;else{for(var h=0,u=0,n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?(h+=(p=this.dummyToNodeForVerticalAlignment.get(c[n])).length*this.idToNodeMap.get(p[0]).displacementX,u+=p.length):(h+=this.idToNodeMap.get(c[n]).displacementX,u++);for(var d=h/u,n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?this.dummyToNodeForVerticalAlignment.get(c[n]).forEach(function(e){i.idToNodeMap.get(e).displacementX=d}):this.idToNodeMap.get(c[n]).displacementX=d}}for(t=0;t<this.componentsOnVertical.length;t++)if(c=this.componentsOnVertical[t],this.fixedComponentsOnVertical[t])for(n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?this.dummyToNodeForHorizontalAlignment.get(c[n]).forEach(function(e){i.idToNodeMap.get(e).displacementY=0}):this.idToNodeMap.get(c[n]).displacementY=0;else{for(var p,h=0,u=0,n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?(h+=(p=this.dummyToNodeForHorizontalAlignment.get(c[n])).length*this.idToNodeMap.get(p[0]).displacementY,u+=p.length):(h+=this.idToNodeMap.get(c[n]).displacementY,u++);for(d=h/u,n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?this.dummyToNodeForHorizontalAlignment.get(c[n]).forEach(function(e){i.idToNodeMap.get(e).displacementY=d}):this.idToNodeMap.get(c[n]).displacementY=d}}},k.prototype.calculateNodesToApplyGravitationTo=function(){for(var e,t=[],r=this.graphManager.getGraphs(),n=r.length,i=0;i<n;i++)(e=r[i]).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 n=e[r];if(!t.has(n)){var i=n.getSource(),a=n.getTarget();if(i==a)n.getBendpoints().push(new p),n.getBendpoints().push(new p),this.createDummyNodesForBendpoints(n),t.add(n);else{var s=(s=(s=[]).concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i));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)),n=0,i=0,a=0,s=new p(0,0),o=0;o<e.length;o++){o%r==0&&(i=n,(a=0)!=o&&(i+=f.DEFAULT_COMPONENT_SEPERATION),n=0);var l=e[o],c=g.findCenterOfTree(l);t.x=a,t.y=i,(s=k.radialLayout(l,c,t)).y>n&&(n=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 n=Math.max(this.maxDiagonalInTree(e),f.DEFAULT_RADIAL_SEPARATION),t=(k.branchRadialLayout(t,null,0,359,0,n),x.calculateBounds(e)),i=new b;i.setDeviceOrgX(t.getMinX()),i.setDeviceOrgY(t.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;a<e.length;a++)e[a].transform(i);return n=new p(t.getMaxX(),t.getMaxY()),i.inverseTransformPoint(n)},k.branchRadialLayout=function(e,t,r,n,i,a){(s=(n-r+1)/2)<0&&(s+=180);var s=(s+r)%360*v.TWO_PI/360,o=(Math.cos(s),i*Math.cos(s)),s=i*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(n-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,i+a,a),h++)}},k.maxDiagonalInTree=function(e){for(var t=y.MIN_VALUE,r=0;r<e.length;r++){var n=e[r].getDiagonal();t<n&&(t=n)}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 n=(i=t[r]).getParent();0!==this.getNodeDegreeWithChildren(i)||null!=n.id&&this.getToBeTiled(n)||e.push(i)}for(r=0;r<e.length;r++){var i,a=(i=e[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(i)}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()),n=new h(l.graphManager),i=(n.id=t,n.paddingLeft=r.paddingLeft||0,n.paddingRight=r.paddingRight||0,n.paddingBottom=r.paddingBottom||0,n.paddingTop=r.paddingTop||0,l.idToDummyNode[t]=n,l.getGraphManager().add(l.newGraph(),n)),a=r.getChild();a.add(n);for(var s=0;s<c[e].length;s++){var o=c[e][s];a.remove(o),i.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 n=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(e){var t,r=n.idToDummyNode[e];i[e]=n.tileNodes(n.memberGroups[e],r.paddingLeft+r.paddingRight),r.rect.width=i[e].width,r.rect.height=i[e].height,r.setCenter(i[e].centerX,i[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 n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(e){var t=n.idToDummyNode[e],r=t.paddingLeft;n.adjustLocations(i[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(),n=0;n<r.length;n++){var i=r[n];if(0<this.getNodeDegree(i))return this.toBeTiled[t]=!1;if(null==i.getChild())this.toBeTiled[i.id]=!1;else if(!this.getToBeTiled(i))return this.toBeTiled[t]=!1}return this.toBeTiled[t]=!0},k.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),r=0,n=0;n<t.length;n++){var i=t[n];i.getSource().id!==i.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(),n=0;n<r.length;n++){var i=r[n];t+=this.getNodeDegreeWithChildren(i)}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,n,i,a,s){r+=i+s;for(var o=t+=n+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(n,i){var a=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(e){var t,r=i[e];a.tiledMemberPack[e]=a.tileNodes(n[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,n=f.TILING_PADDING_VERTICAL,i=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(n-i,2)+4*(e+i)*(c+n)*a,a=(i-n+Math.sqrt(c))/(2*(e+i));return t?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((n=r*(e+i)-i)<l?l:n)+2*i},k.prototype.tileNodesByFavoringDim=function(e,t,r){var n=f.TILING_PADDING_VERTICAL,i=f.TILING_PADDING_HORIZONTAL,a=f.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:n,horizontalPadding:i,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,n){r==e.rows.length&&(e.rows.push([]),e.rowWidth.push(n),e.rowHeight.push(0));var n=e.rowWidth[r]+t.rect.width,n=(0<e.rows[r].length&&(n+=e.horizontalPadding),e.rowWidth[r]=n,e.width<n&&(e.width=n),t.rect.height),i=(0<r&&(n+=e.verticalPadding),0);n>e.rowHeight[r]&&(i=e.rowHeight[r],e.rowHeight[r]=n,i=e.rowHeight[r]-i),e.height+=i,e.rows[r].push(t)},k.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,n=0;n<e.rows.length;n++)e.rowWidth[n]<r&&(t=n,r=e.rowWidth[n]);return t},k.prototype.getLongestRowIndex=function(e){for(var t=-1,r=Number.MIN_VALUE,n=0;n<e.rows.length;n++)e.rowWidth[n]>r&&(t=n,r=e.rowWidth[n]);return t},k.prototype.canAddHorizontal=function(e,t,r){var n,i,a;return e.idealRowWidth?(i=e.rows.length-1,e.rowWidth[i]+t+e.horizontalPadding<=e.idealRowWidth):(i=this.getShortestRowIndex(e))<0||(a=e.rowWidth[i])+e.horizontalPadding+t<=e.width||(n=0,e.rowHeight[i]<r&&0<i&&(n=r+e.verticalPadding-e.rowHeight[i]),i=t+e.horizontalPadding<=e.width-a?(e.height+n)/(a+t+e.horizontalPadding):(e.height+n)/e.width,n=r+e.verticalPadding,(i=i<1?1/i:i)<((a=e.width<t?(e.height+n)/t:(e.height+n)/e.width)<1?1/a:a))},k.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),r=e.rowWidth.length-1,n=e.rows[t],i=n[n.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[r]>a&&t!=r){n.splice(-1,1),e.rows[r].push(i),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<n.length;o++)n[o].height>s&&(s=n[o].height);0<t&&(s+=e.verticalPadding),a=e.rowHeight[t]+e.rowHeight[r],e.rowHeight[t]=s,e.rowHeight[r]<i.height+e.verticalPadding&&(e.rowHeight[r]=i.height+e.verticalPadding),i=e.rowHeight[t]+e.rowHeight[r],e.height+=i-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,n,i=this.graphManager.getAllNodes(),a=[],t=!1,s=0;s<i.length;s++)1!=(n=i[s]).getEdges().length||n.getEdges()[0].isInterGraph||null!=n.getChild()||(f.PURE_INCREMENTAL?(r=n.getEdges()[0].getOtherEnd(n),r=new c(n.getCenterX()-r.getCenterX(),n.getCenterY()-r.getCenterY()),a.push([n,n.getEdges()[0],n.getOwner(),r])):a.push([n,n.getEdges()[0],n.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],n=0;n<r.length;n++)t=r[n],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 n=r.startX,i=r.finishX,a=r.startY,s=r.finishY,o=[0,0,0,0];if(0<a)for(var l=n;l<=i;l++)o[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(i<this.grid.length-1)for(l=a;l<=s;l++)o[1]+=this.grid[i+1][l].length+this.grid[i][l].length-1;if(s<this.grid[0].length-1)for(l=n;l<=i;l++)o[2]+=this.grid[l][s+1].length+this.grid[l][s].length-1;if(0<n)for(l=a;l<=s;l++)o[3]+=this.grid[n-1][l].length+this.grid[n][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 n,i=r(551).FDLayoutNode,a=r(551).IMath;function s(e,t,r,n){i.call(this,e,t,r,n)}for(n in mt(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];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,n=this.getChild().getNodes(),i=0;i<n.length;i++)null==(r=n[i]).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 n(){}mt(n,"ConstraintHandler"),n.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,T=[],E=[],n=e.getAllNodes(),P=0,i=0;i<n.length;i++){var a=n[i];null==a.getChild()&&(k.set(a.id,P++),T.push(a.getCenterX()),E.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+=T[k.get(e)],r+=E[k.get(e)]}),{x:t/e.size,y:r/e.size}},"calculateAvgPosition"),e=mt(function(e,x,h,b,t){function i(e,t){var r=new Set(e),n=!0,e=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var o=a.value;r.add(o)}}catch(t){e=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(e)throw i}}return r}mt(i,"setUnion");var a=new Map,w=(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"==x?w.set(t,k.has(t)?T[k.get(t)]:b.get(t)):w.set(t,k.has(t)?E[k.get(t)]:b.get(t)))):w.set(t,Number.NEGATIVE_INFINITY),h&&s.set(t,new Set([t]))}),h&&t.forEach(function(e){var t,r,n=[];e.forEach(function(e){h.has(e)&&n.push(e)}),0<n.length?(t=0,n.forEach(function(e){"horizontal"==x?w.set(e,k.has(e)?T[k.get(e)]:b.get(e)):w.set(e,k.has(e)?E[k.get(e)]:b.get(e)),t+=w.get(e)}),t/=n.length,e.forEach(function(e){h.has(e)||w.set(e,t)})):(r=0,e.forEach(function(e){r+="horizontal"==x?k.has(e)?T[k.get(e)]:b.get(e):k.has(e)?E[k.get(e)]:b.get(e)}),r/=e.length,e.forEach(function(e){w.set(e,r)}))});for(var u,d,r=mt(function(){var n=o.shift();e.get(n).forEach(function(e){var t,r;w.get(e.id)<w.get(n)+e.gap&&(h&&h.has(e.id)?(r="horizontal"==x?k.has(e.id)?T[k.get(e.id)]:b.get(e.id):k.has(e.id)?E[k.get(e.id)]:b.get(e.id),w.set(e.id,r),r<w.get(n)+e.gap&&(t=w.get(n)+e.gap-r,s.get(n).forEach(function(e){w.set(e,w.get(e)-t)}))):w.set(e.id,w.get(n)+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,i(s.get(n),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 n,i,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||(n=!1,i=void 0,d.forEach(function(e,t){e.has([].concat(Pe(r))[0])&&(n=!0,i=t)}),n?r.forEach(function(e){d[i].add(e)}):d.push(new Set(r)))}}),d.forEach(function(e,t){var r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=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"==x?k.has(u)?T[k.get(u)]:b.get(u):k.has(u)?E[k.get(u)]:b.get(u),p=w.get(u);d<r&&(r=d),i<d&&(i=d),p<n&&(n=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+i)/2-(n+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;w.set(v,w.get(v)+g)}}catch(e){o=!0,l=e}finally{try{!f&&y.return&&y.return()}finally{if(o)throw l}}})),w},"findAppropriatePositionForRelativePlacement"),l=mt(function(e){var t=0,r=0,n=0,i=0;if(e.forEach(function(e){e.left?0<=T[k.get(e.left)]-T[k.get(e.right)]?t++:r++:0<=E[k.get(e.top)]-E[k.get(e.bottom)]?n++:i++}),r<t&&i<n)for(var a=0;a<k.size;a++)T[a]=-1*T[a],E[a]=-1*E[a];else if(r<t)for(var s=0;s<k.size;s++)T[s]=-1*T[s];else if(i<n)for(var o=0;o<k.size;o++)E[o]=-1*E[o]},"applyReflectionForRelativePlacement"),$=mt(function(n){var i=[],a=new $e,s=new Set,o=0;return n.forEach(function(e,t){if(!s.has(t)){for(i[o]=[],a.push(r=t),s.add(r),i[o].push(r);0!=a.length;){var r=a.shift();n.get(r).forEach(function(e){s.has(e.id)||(a.push(e.id),s.add(e.id),i[o].push(e.id))})}o++}}),i},"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]=[T[k.get(e.nodeId)],E[k.get(e.nodeId)]]}),u=!0;else if(t.alignmentConstraint){var y=0;if(t.alignmentConstraint.vertical){for(var G=t.alignmentConstraint.vertical,U=mt(function(e){var t=new Set,r=(G[e].forEach(function(e){t.add(e)}),new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))),n=0<r.size?T[k.get(r.values().next().value)]:o(t).x;G[e].forEach(function(e){c[y]=[n,E[k.get(e)]],h[y]=[T[k.get(e)],E[k.get(e)]],y++})},"_loop2"),q=0;q<G.length;q++)U(q);u=!0}if(t.alignmentConstraint.horizontal){for(var j=t.alignmentConstraint.horizontal,W=mt(function(e){var t=new Set,r=(j[e].forEach(function(e){t.add(e)}),new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))),n=0<r.size?T[k.get(r.values().next().value)]:o(t).y;j[e].forEach(function(e){c[y]=[T[k.get(e)],n],h[y]=[T[k.get(e)],E[k.get(e)]],y++})},"_loop3"),Y=0;Y<j.length;Y++)W(Y);u=!0}t.relativePlacementConstraint&&(d=!0)}else if(t.relativePlacementConstraint){for(var v,x,b,H,V,X=0,K=0,w=0;w<m.length;w++)m[w].length>X&&(X=m[w].length,K=w);X<f.size/2?(l(t.relativePlacementConstraint),d=u=!1):(v=new Map,x=new Map,b=[],m[K].forEach(function(t){g.get(t).forEach(function(e){"horizontal"==e.direction?(v.has(t)?v.get(t).push(e):v.set(t,[e]),v.has(e.id)||v.set(e.id,[]),b.push({left:t,right:e.id})):(x.has(t)?x.get(t).push(e):x.set(t,[e]),x.has(e.id)||x.set(e.id,[]),b.push({top:t,bottom:e.id}))})}),l(b),d=!1,H=e(v,"horizontal"),V=e(x,"vertical"),m[K].forEach(function(e,t){h[t]=[T[k.get(e)],E[k.get(e)]],c[t]=[],H.has(e)?c[t][0]=H.get(e):c[t][0]=T[k.get(e)],V.has(e)?c[t][1]=V.get(e):c[t][1]=E[k.get(e)]}),u=!0)}if(u){for(var C=Fe.transpose(c),Z=Fe.transpose(h),S=0;S<C.length;S++)C[S]=Fe.multGamma(C[S]),Z[S]=Fe.multGamma(Z[S]);for(var f=Fe.multMat(C,Fe.transpose(Z)),u=ze.svd(f),_=Fe.multMat(u.V,Fe.transpose(u.U)),A=0;A<k.size;A++){var Q=[T[A],E[A]],J=[_[0][0],_[1][0]],ee=[_[0][1],_[1][1]];T[A]=Fe.dotProduct(Q,J),E[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:T[k.get(e.nodeId)],y:E[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,T.forEach(function(e,t){T[t]+=s.x}),E.forEach(function(e,t){E[t]+=s.y}),t.fixedNodeConstraint.forEach(function(e){T[k.get(e.nodeId)]=e.position.x,E[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?T[k.get(e.values().next().value)]:o(t).x);t.forEach(function(e){p.has(e)||(T[k.get(e)]=r)})},"_loop4"),ne=0;ne<te.length;ne++)re(ne);if(t.alignmentConstraint.horizontal)for(var ie=t.alignmentConstraint.horizontal,ae=mt(function(e){var t=new Set,r=(ie[e].forEach(function(e){t.add(e)}),0<(e=new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))).size?E[k.get(e.values().next().value)]:o(t).y);t.forEach(function(e){p.has(e)||(E[k.get(e)]=r)})},"_loop5"),se=0;se<ie.length;se++)ae(se)}if(t.relativePlacementConstraint){var L=new Map,N=new Map,I=new Map,R=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){L.set(e,"dummy"+t),I.get("dummy"+t).push(e),p.has(e)&&ce.add("dummy"+t)}),oe.set("dummy"+t,T[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){R.set("dummy"+t,[]),ge[t].forEach(function(e){N.set(e,"dummy"+t),R.get("dummy"+t).push(e),p.has(e)&&he.add("dummy"+t)}),le.set("dummy"+t,E[k.get(ge[t][0])])},"_loop7"),me=0;me<ge.length;me++)fe(me)}var M=new Map,D=new Map,ye=mt(function(n){g.get(n).forEach(function(e){var t=void 0,r=void 0;"horizontal"==e.direction?(t=L.get(n)?L.get(n):n,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,[])):(t=N.get(n)?N.get(n):n,r=N.get(e.id)?{id:N.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,[]))})},"_loop8"),ve=!0,f=!1,u=void 0;try{for(var xe,be=g.keys()[Symbol.iterator]();!(ve=(xe=be.next()).done);ve=!0)ye(xe.value)}catch(e){f=!0,u=e}finally{try{!ve&&be.return&&be.return()}finally{if(f)throw u}}var f=F(M),u=F(D),f=$(f),u=$(u),we=z(M),ke=z(D),Te=[],Ee=[],Ce=(f.forEach(function(e,t){Te[t]=[],e.forEach(function(e){0==we.get(e).length&&Te[t].push(e)})}),u.forEach(function(e,t){Ee[t]=[],e.forEach(function(e){0==ke.get(e).length&&Ee[t].push(e)})}),e(M,"horizontal",ce,oe,Te)),Se=e(D,"vertical",he,le,Ee),_e=mt(function(t){I.get(t)?I.get(t).forEach(function(e){T[k.get(e)]=Ce.get(t)}):T[k.get(t)]=Ce.get(t)},"_loop9"),Ae=!0,f=!1,u=void 0;try{for(var Le,Ne=Ce.keys()[Symbol.iterator]();!(Ae=(Le=Ne.next()).done);Ae=!0)_e(Le.value)}catch(e){f=!0,u=e}finally{try{!Ae&&Ne.return&&Ne.return()}finally{if(f)throw u}}var Ie=mt(function(t){R.get(t)?R.get(t).forEach(function(e){E[k.get(e)]=Se.get(t)}):E[k.get(t)]=Se.get(t)},"_loop10"),Re=!0,f=!1,u=void 0;try{for(var Me,De=Se.keys()[Symbol.iterator]();!(Re=(Me=De.next()).done);Re=!0)Ie(Me.value)}catch(e){f=!0,u=e}finally{try{!Re&&De.return&&De.return()}finally{if(f)throw u}}}}for(var Oe=0;Oe<n.length;Oe++){var O=n[Oe];null==O.getChild()&&O.setCenter(T[k.get(O.id)],E[k.get(O.id)])}},e.exports=n},551:e=>{e.exports=t}},i={},mt(r,"__webpack_require__"),r(45);function r(e){var t=i[e];return void 0===t&&(t=i[e]={exports:{}},n[e](t,t.exports,r)),t.exports}var n,i})}),QPe=MBe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(ZPe()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeFcose=t(ZPe()):e.cytoscapeFcose=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(t){return n={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),n=1;n<e;n++)t[n-1]=arguments[n];return t.forEach(function(t){Object.keys(t).forEach(function(e){return r[e]=t[e]})}),r}},548:(e,t,r)=>{mt(C,"sliceIterator");var n=r(140).layoutBase.LinkedList;function C(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}e.exports=r={getTopMostNodes:function(e){for(var n={},t=0;t<e.length;t++)n[e[t].id()]=!0;return e.filter(function(e,t){for(var r=(e="number"==typeof e?t:e).parent()[0];null!=r;){if(n[r.id()])return!1;r=r.parent()[0]}return!0})},connectComponents:function(a,s,o,e){for(var l=new n,c=new Set,h=[],u=void 0,d=void 0,p=void 0,g=!1,f=1,m=[],y=[],t=mt(function(){var n=a.collection(),i=(y.push(n),o[0]),e=a.collection();e.merge(i).merge(i.descendants().intersection(s)),h.push(i),e.forEach(function(e){l.push(e),c.add(e),n.merge(e)});for(var t,r=mt(function(){i=l.shift();var t=a.collection();i.neighborhood().nodes().forEach(function(e){0<s.intersection(i.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),n.merge(e),o.has(e)&&h.push(e)})}},"_loop2");0!=l.length;)r();n.forEach(function(e){s.intersection(e.connectedEdges()).forEach(function(e){n.has(e.source())&&n.has(e.target())&&n.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,i,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,n=!1,c=void 0;try{for(var h,u=i.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 C(e,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],x=y[1],b=t.cy.getElementById(v);b&&(d=b.boundingBox(),p=i.xCoords[x]-d.w/2,g=i.xCoords[x]+d.w/2,f=i.yCoords[x]-d.h/2,m=i.yCoords[x]+d.h/2,p<a&&(a=p),s<g&&(s=g),f<o&&(o=f),l<m)&&(l=m)}}catch(e){n=!0,c=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw c}}var w=e.x-(s+a)/2,k=e.y-(l+o)/2;i.xCoords=i.xCoords.map(function(e){return e+w}),i.yCoords=i.yCoords.map(function(e){return e+k})}else{Object.keys(i).forEach(function(e){var t=(e=i[e]).getRect().x,r=e.getRect().x+e.getRect().width,n=e.getRect().y,e=e.getRect().y+e.getRect().height;t<a&&(a=t),s<r&&(s=r),n<o&&(o=n),l<e&&(l=e)});var T=e.x-(s+a)/2,E=e.y-(l+o)/2;Object.keys(i).forEach(function(e){(e=i[e]).setCenter(e.getCenterX()+T,e.getCenterY()+E)})}}},calcBoundingBox:function(e,t,r,n){for(var i=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[n.get(d.id())]-d.width()/2)<i&&(i=u),a<(u=t[n.get(d.id())]+d.width()/2)&&(a=u),(u=r[n.get(d.id())]-d.height()/2)<s&&(s=u),o<(u=r[n.get(d.id())]+d.height()/2)&&(o=u)}return(e={}).topLeftX=i,e.topLeftY=s,e.width=a-i,e.height=o-s,e},calcParentsWithoutChildren:function(e,t){var r=e.collection();return t.nodes(":parent").forEach(function(e){var t=!1;e.children().forEach(function(e){"none"!=e.css("display")&&(t=!0)}),t||r.merge(e)}),r}}},816:(e,t,r)=>{var v=r(548),o=r(140).CoSELayout,x=r(140).CoSENode,b=r(140).layoutBase.PointD,w=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=(i=c.eles).nodes(),n=i.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,i),e=mt(function e(t,r,n,i){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:i.nodeDimensionsIncludeLabels});(h=null!=l.outerWidth()&&null!=l.outerHeight()?i.randomize?l.isParent()?(o=v.calcBoundingBox(l,p,g,d),0==l.intersection(y).length?t.add(new x(n.graphManager,new b(o.topLeftX,o.topLeftY),new w(o.width,o.height))):t.add(new x(n.graphManager,new b(o.topLeftX,o.topLeftY),new w(parseFloat(u.w),parseFloat(u.h))))):t.add(new x(n.graphManager,new b(p[d.get(l.id())]-u.w/2,g[d.get(l.id())]-u.h/2),new w(parseFloat(u.w),parseFloat(u.h)))):t.add(new x(n.graphManager,new b(l.position("x")-u.w/2,l.position("y")-u.h/2),new w(parseFloat(u.w),parseFloat(u.h)))):t.add(new x(this.graphManager))).id=l.data("id"),h.nodeRepulsion=m(i.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")),i.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(n.getGraphManager().add(n.newGraph(),h),c,n,i)}},"processChildrenList"),t=mt(function(e,t,r){for(var n=0,i=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),n+=o.idealLength,i++)}null!=c.idealEdgeLength&&(0<i?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=n/i: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"),i=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,n),i(a,c),a.runLayout(),f},"coseLayout");e.exports={coseLayout:r}},212:(e,t,r)=>{function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(n,"defineProperties"),mt(i,"_classCallCheck");var a,s,o=r(658),b=r(548),w=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,n=[],i=(!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&&(i=(i=e.layoutUtilities("get"))||e.layoutUtilities(),a=!0),0<t.nodes().length)if(a){if(a=b.getTopMostNodes(h.eles.nodes()),(r=b.connectComponents(e,h.eles,a)).forEach(function(e){e=e.boundingBox(),n.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),h.randomize&&r.forEach(function(e){h.eles=e,u.push(w(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(),n.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),n.splice(c[p],1)}}r.forEach(function(e,t){h.eles=e,d.push(k(h,u[t])),b.relocateComponent(n[t],d[t],h)})}else r.forEach(function(e,t){b.relocateComponent(n[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=b.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,n,i,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()),n=[],i=[],s.isParent()?(a=b.calcBoundingBox(s,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[t]),n.push(u[o].yCoords[t])),e.isParent()?(a=b.calcBoundingBox(e,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[r]),i.push(u[o].yCoords[r])),l.edges.push({startX:n[0],startY:n[1],endX:i[0],endY:i[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=i.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}),n=e.yCoords.map(function(e){return e+m[t].dy});e.xCoords=r,e.yCoords=n}):(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(),n.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),h.randomize&&(i=w(h),u.push(i)),"default"==h.quality||"proof"==h.quality?(d.push(k(h,u[0])),b.relocateComponent(n[0],d[0],h)):b.relocateComponent(n[0],u[0],h);var x=mt(function(r,e){var t,n,i,a;return"default"==h.quality||"proof"==h.quality?(n=t=void 0,i=(r="number"==typeof r?e:r).data("id"),d.forEach(function(e){i in e&&(t={x:e[i].getRect().getCenterX(),y:e[i].getRect().getCenterY()},n=e[i])}),h.nodeDimensionsIncludeLabels&&(n.labelWidth&&("left"==n.labelPosHorizontal?t.x+=n.labelWidth/2:"right"==n.labelPosHorizontal&&(t.x-=n.labelWidth/2)),n.labelHeight)&&("top"==n.labelPosVertical?t.y+=n.labelHeight/2:"bottom"==n.labelPosVertical&&(t.y-=n.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=b.calcParentsWithoutChildren(e,t),i=t.filter(function(e){return"none"==e.css("display")}),h.eles=t.not(i),t.nodes().not(":parent").not(i).layoutPositions(this,h,x),0<a.length&&a.forEach(function(e){e.position(x(e))})):console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}],n(a.prototype,s),c);function c(e){i(this,c),this.options=o({},l,e)}e.exports=r},657:(e,t,r)=>{var G=r(548),U=r(140).layoutBase.Matrix,q=r(140).layoutBase.SVD,r=mt(function(e){var i=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=[],x=[],u=[],b=[],w=void 0,k=e.piTol,n=e.samplingType,T=e.nodeSeparation,d=void 0,P=mt(function(){for(var e=0,t=!1;e<d;){for(var r=Math.floor(Math.random()*w),t=!1,n=0;n<e;n++)if(h[n]==r){t=!0;break}t||(h[e]=r,e++)}},"randomSampleCR"),p=mt(function(e,t,r){for(var n,i=[],a=0,s=0,o=[],l=0,c=1,h=0;h<w;h++)o[h]=1e8;for(o[i[s]=e]=0;a<=s;){for(var u=i[a++],d=y[u],p=0;p<d.length;p++)1e8==o[n=m.get(d[p])]&&(o[n]=o[u]+1,i[++s]=n);x[u][t]=o[u]*T}if(r){for(var g=0;g<w;g++)x[g][t]<v[g]&&(v[g]=x[g][t]);for(var f=0;f<w;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()*w),r=0;r<w;r++)v[r]=1e8;for(var n=0;n<d;n++)t=p(h[n]=t,n,e)}else{P();for(var i=0;i<d;i++)p(h[i],i,e,!1)}for(var a=0;a<w;a++)for(var s=0;s<d;s++)x[a][s]*=x[a][s];for(var o=0;o<d;o++)u[o]=[];for(var l=0;l<d;l++)for(var c=0;c<d;c++)u[l][c]=x[h[c]][l]},"allBFS"),B=mt(function(){for(var e=(r=q.svd(u)).S,t=r.U,r=r.V,n=e[0]*e[0]*e[0],i=[],a=0;a<d;a++){i[a]=[];for(var s=0;s<d;s++)i[a][s]=0,a==s&&(i[a][s]=e[a]/(e[a]*e[a]+n/(e[a]*e[a])))}b=U.multMat(U.multMat(r,i),U.transpose(t))},"sample"),$=mt(function(){for(var e=void 0,t=void 0,r=[],n=[],i=[],a=[],s=0;s<w;s++)r[s]=Math.random(),n[s]=Math.random();for(var r=U.normalize(r),n=U.normalize(n),o=1e-9,l=1e-9,c=void 0;;){for(var h=0;h<w;h++)i[h]=r[h];if(r=U.multGamma(U.multL(U.multGamma(i),x,b)),e=U.dotProduct(i,r),r=U.normalize(r),o=U.dotProduct(i,r),(c=Math.abs(o/l))<=1+k&&1<=c)break;l=o}for(var u=0;u<w;u++)i[u]=r[u];for(l=1e-9;;){for(var d=0;d<w;d++)a[d]=n[d];if(a=U.minusOp(a,U.multCons(i,U.dotProduct(i,a))),n=U.multGamma(U.multL(U.multGamma(a),x,b)),t=U.dotProduct(a,n),n=U.normalize(n),o=U.dotProduct(a,n),(c=Math.abs(o/l))<=1+k&&1<=c)break;l=o}for(var p=0;p<w;p++)a[p]=n[p];g=U.multCons(i,Math.sqrt(Math.abs(e))),f=U.multCons(a,Math.sqrt(Math.abs(t)))},"powerIteration");G.connectComponents(i,a,G.getTopMostNodes(t),s),r.forEach(function(e){G.connectComponents(i,a,G.getTopMostNodes(e.descendants().intersection(a)),s)});for(var c=0,E=0;E<t.length;E++)t[E].isParent()||m.set(t[E].id(),c++);var C=!0,S=!1,_=void 0;try{for(var A,L=s.keys()[Symbol.iterator]();!(C=(A=L.next()).done);C=!0){var F=A.value;m.set(F,c++)}}catch(e){S=!0,_=e}finally{try{!C&&L.return&&L.return()}finally{if(S)throw _}}for(var N=0;N<m.size;N++)y[N]=[];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,n=t.nodes(":childless")[0].connectedEdges().length;t.nodes(":childless").forEach(function(e,t){e.connectedEdges().length<n&&(n=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,n=m.get(t);s.get(t).forEach(function(e){r=i.getElementById(e).isParent()?o.get(e):e,y[n].push(r),y[m.get(r)].push(t)})},"_loop"),I=!0,S=!1,_=void 0;try{for(var R,M=s.keys()[Symbol.iterator]();!(I=(R=M.next()).done);I=!0)z(R.value)}catch(e){S=!0,_=e}finally{try{!I&&M.return&&M.return()}finally{if(S)throw _}}if(2<(w=m.size)){for(var d=w<e.sampleSize?w:e.sampleSize,D=0;D<w;D++)x[D]=[];for(var O=0;O<d;O++)b[O]=[];"draft"==e.quality||"all"==e.step?(l(n),B(),$()):m.forEach(function(e,t){g.push(i.getElementById(t).position("x")),f.push(i.getElementById(t).position("y"))})}else r=m.keys(),_=(S=i.getElementById(r.next().value)).position(),l=S.outerWidth(),g.push(_.x),f.push(_.y),2==w&&(n=i.getElementById(r.next().value).outerWidth(),g.push(_.x+l/2+n/2+e.idealEdgeLength),f.push(_.y));return{nodeIndexes:m,xCoords:g,yCoords:f}},"spectralLayout");e.exports={spectralLayout:r}},579:(e,t,r)=>{var n=r(212),r=mt(function(e){e&&e("layout","fcose",n)},"register");typeof cytoscape<"u"&&r(cytoscape),e.exports=r},140:e=>{e.exports=t}},i={},mt(r,"__webpack_require__"),r(579);function r(e){var t=i[e];return void 0===t&&(t=i[e]={exports:{}},n[e](t,t.exports,r)),t.exports}var n,i})}),JPe=e(()=>{je(),GPe=mt(e=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),UPe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:GPe('<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:GPe('<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:GPe('<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:GPe('<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:GPe('<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:Re,blank:{body:GPe("")}}}}),eBe=e(()=>{je(),Eu(),JL(),HPe(),JPe(),yPe(),qPe=mt(async function(w,e){let k=OPe().padding,t=OPe().iconSize,T=t/2,E=t/6,C=E/2;await Promise.all(e.edges().map(async e=>{let{source:t,sourceDir:r,sourceArrow:n,sourceGroup:i,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=gPe(e),{x:h,y:u}=e[0].sourceEndpoint(),{x:d,y:p}=e[0].midpoint(),{x:g,y:f}=e[0].targetEndpoint(),m=k+4;var y,v,x,b;i&&(nPe(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(nPe(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),i||"junction"!==PPe.getNode(t)?.type||(nPe(r)?h+="L"===r?T:-T:u+="T"===r?T:-T),l||"junction"!==PPe.getNode(a)?.type||(nPe(s)?g+="L"===s?T:-T:f+="T"===s?T:-T),e[0]._private.rscratch&&((e=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge"),n&&(b=nPe(r)?ePe[r](h,E):h-C,y=iPe(r)?ePe[r](u,E):u-C,e.insert("polygon").attr("points",JOe[r](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),o&&(b=nPe(s)?ePe[s](g,E):g-C,y=iPe(s)?ePe[s](f,E):f-C,e.insert("polygon").attr("points",JOe[s](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=aPe(r,s)?"XY":nPe(r)?"X":"Y")?Math.abs(h-g):"Y"==x?Math.abs(u-f)/1.5:Math.abs(h-g)/2,b=e.append("g"),await QL(b,c,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},D()),b.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==x?b.attr("transform","translate("+d+", "+p+")"):"Y"==x?b.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==x&&(y=lPe(r,s))&&sPe(y)&&(e=b.node().getBoundingClientRect(),[y,v]=hPe(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",`
|
||
translate(${d}, ${p-e.height/2})
|
||
translate(${y*x.width/2}, ${v*x.height/2})
|
||
rotate(${-1*y*v*45}, 0, ${e.height/2})
|
||
`)))}))},"drawEdges"),jPe=mt(async function(l,e){let c=.75*OPe().padding,h=OPe().fontSize,u=OPe().iconSize/2;await Promise.all(e.nodes().map(async n=>{var i=fPe(n);if("group"===i.type){var{h:n,w:a,x1:s,y1:o}=n.boundingBox();l.append("rect").attr("x",s+u).attr("y",o+u).attr("width",a).attr("height",n).attr("class","node-bkg");let e=l.append("g"),t=s,r=o;i.icon&&((n=e.append("g")).html(`<g>${await $e(i.icon,{height:c,width:c,fallbackPrefix:UPe.prefix})}</g>`),n.attr("transform","translate("+(t+u+1)+", "+(r+u+1)+")"),t+=c,r+=h/2-1-2),i.label&&(s=e.append("g"),await QL(s,i.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},D()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),s.attr("transform","translate("+(t+u+4)+", "+(r+u+2)+")"))}}))},"drawGroups"),WPe=mt(async function(e,t,r){for(var n of r){var i=t.append("g"),a=OPe().iconSize,s=(n.title&&(s=i.append("g"),await QL(s,n.title,{useHtmlLabels:!1,width:1.5*a,classes:"architecture-service-label"},D()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),s.attr("transform","translate("+a/2+", "+a+")")),i.append("g")),{width:o,height:l}=(n.icon?s.html(`<g>${await $e(n.icon,{height:a,width:a,fallbackPrefix:UPe.prefix})}</g>`):n.iconText?(s.html(`<g>${await $e("blank",{height:a,width:a,fallbackPrefix:UPe.prefix})}</g>`),o=s.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(n.iconText),l=parseInt(window.getComputedStyle(o.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,o.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/l)};`)):s.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`),i.attr("class","architecture-service"),i._groups[0][0].getBBox());n.width=o,n.height=l,e.setElementForId(n.id,i)}return 0},"drawServices"),YPe=mt(function(i,a,e){e.forEach(e=>{var t=a.append("g"),r=OPe().iconSize,{width:r,height:n}=(t.append("g").append("rect").attr("id","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=n,i.setElementForId(e.id,t)})},"drawJunctions")});function tBe(e,t){e.forEach(e=>{t.add({group:"nodes",data:{type:"service",id:e.id,icon:e.icon,label:e.title,parent:e.in,width:OPe().iconSize,height:OPe().iconSize},classes:"node-service"})})}function rBe(e,t){e.forEach(e=>{t.add({group:"nodes",data:{type:"junction",id:e.id,parent:e.in,width:OPe().iconSize,height:OPe().iconSize},classes:"node-junction"})})}function nBe(r,e){e.nodes().map(e=>{var t=fPe(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 iBe(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 aBe(e,h){e.forEach(e=>{var{lhsId:t,rhsId:r,lhsInto:n,lhsGroup:i,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:c}=e,e=aPe(e.lhsDir,e.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:t+"-"+r,label:c,source:t,sourceDir:s,sourceArrow:n,sourceGroup:i,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 sBe(s,e,u){let t=mt((e,h)=>Object.entries(e).reduce((r,[n,e])=>{let i=0,a=Object.entries(e);if(1===a.length)r[n]=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[n]??=[],r[n]=[...r[n],...o,...c]):(r[n+"-"+i++]=o,r[n+"-"+i++]=c)}return r},{}),"flattenAlignments"),r=e.map(e=>{let i={},a={};return Object.entries(e).forEach(([e,[t,r]])=>{var n=s.getNode(e)?.in??"default";i[r]??={},i[r][n]??=[],i[r][n].push(e),a[t]??={},a[t][n]??=[],a[t][n].push(e)}),{horiz:Object.values(t(i,"horizontal")).filter(e=>1<e.length),vert:Object.values(t(a,"vertical")).filter(e=>1<e.length)}}),[n,i]=r.reduce(([e,t],{horiz:r,vert:n})=>[[...e,...r],[...t,...n]],[[],[]]);return{horizontal:n,vertical:i}}function oBe(e){let l=[],c=mt(e=>e[0]+","+e[1],"posToStr"),h=mt(e=>e.split(",").map(e=>parseInt(e)),"strToPos");return e.forEach(e=>{let a=Object.fromEntries(Object.entries(e).map(([e,t])=>[c(t),e])),s=[c([0,0])],o={},t={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0<s.length;){var r=s.shift();if(r){o[r]=1;let i=a[r];if(i){let n=h(r);Object.entries(t).forEach(([e,t])=>{var t=c([n[0]+t[0],n[1]+t[1]]),r=a[t];r&&!o[t]&&(s.push(t),l.push({[QOe[e]]:r,[QOe[tPe(e)]]:i,gap:1.5*OPe().iconSize}))})}}}}),l}function lBe(i,a,l,c,h,{spatialMaps:u,groupAlignments:d}){return new Promise(t=>{let e=H("body").append("div").attr("id","cy").attr("style","display:none"),s=bLe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":OPe().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:OPe().padding+"px"}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}}),r=(e.remove(),iBe(l,s),tBe(i,s),rBe(a,s),aBe(c,s),sBe(h,u,d)),n=oBe(u),o=s.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){var[e,t]=e.connectedNodes();return(e=fPe(e).parent)===fPe(t).parent?1.5*OPe().iconSize:.5*OPe().iconSize},edgeElasticity(e){var[e,t]=e.connectedNodes();return(e=fPe(e).parent)===fPe(t).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:n});o.one("layoutstop",()=>{function e(e,t,r,n){var{x:e,y:i}=e,{x:t,y:a}=t,s=(n-i+(e-r)*(i-a)/(e-t))/Math.sqrt(1+Math.pow((i-a)/(e-t),2)),o=Math.sqrt(Math.pow(n-i,2)+Math.pow(r-e,2)-Math.pow(s,2));o/=Math.sqrt(Math.pow(t-e,2)+Math.pow(a-i,2));let l=(t-e)*(n-i)-(a-i)*(r-e);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let c=(t-e)*(r-e)+(a-i)*(n-i);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,n,i,a;t.data?.()&&({x:i,y:n}=t.source().position(),{x:a,y:r}=t.target().position(),i!==a)&&n!==r&&(i=t.sourceEndpoint(),a=t.targetEndpoint(),n=gPe(t).sourceDir,[r,n]=iPe(n)?[i.x,a.y]:[a.x,i.y],{weights:i,distances:a}=e(i,a,r,n),t.style("segment-distances",a),t.style("segment-weights",i))}s.endBatch(),o.run()}),o.run(),s.ready(e=>{M.info("Ready",e),t(s)})})}var cBe,hBe,uBe=e(()=>{je(),wLe(),cBe=ee(QPe(),1),a6(),t(),Cye(),ch(),HPe(),JPe(),yPe(),eBe(),Oe([{name:UPe.prefix,icons:UPe}]),bLe.use(cBe.default),mt(tBe,"addServices"),mt(rBe,"addJunctions"),mt(nBe,"positionNodes"),mt(iBe,"addGroups"),mt(aBe,"addEdges"),mt(sBe,"getAlignments"),mt(oBe,"getRelativeConstraints"),mt(lBe,"layoutArchitecture"),cBe=mt(async(e,t,r,n)=>{var i=(n=n.db).getServices(),a=n.getJunctions(),s=n.getGroups(),o=n.getEdges(),l=n.getDataStructures(),c=(t=vye(t)).append("g"),h=(c.attr("class","architecture-edges"),(u=t.append("g")).attr("class","architecture-services"),t.append("g")),u=(h.attr("class","architecture-groups"),await WPe(n,u,i),YPe(n,u,a),await lBe(i,a,s,o,n,l));await qPe(c,u),await jPe(h,u),nBe(n,u),nh(void 0,t,OPe().padding,OPe().useMaxWidth)},"draw"),hBe={draw:cBe}}),dBe={};$Be(dBe,{diagram:()=>pBe});var pBe,gBe,fBe=e(()=>{VPe(),HPe(),XPe(),uBe(),pBe={parser:$Pe,db:PPe,renderer:hBe,styles:zPe}}),mBe=e(()=>{An(),Nn(),iS(),MN(),Tu(),gBe=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=yh,this.getAccTitle=vh,this.setDiagramTitle=wh,this.getDiagramTitle=kh,this.getAccDescription=bh,this.setAccDescription=xh}static{mt(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){var e=yr,t=Ir();return _C({...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:[]},n=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(e=>{AN(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(){mh(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function yBe(e){if(!e.length)return[];let n=[],i=[];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<i.length&&i[i.length-1].level>=e.level;)i.pop();0===i.length?n.push(r):(t=i[i.length-1].node).children?t.children.push(r):t.children=[r],"Leaf"!==e.type&&i.push({node:r,level:e.level})}),n}var vBe,xBe,bBe,wBe,kBe,TBe,EBe,CBe,SBe,_Be=e(()=>{mt(yBe,"buildHierarchy")}),ABe=e(()=>{n1e(),t(),o1e(),_Be(),mBe(),vBe=mt((e,n)=>{i1e(e,n);var t,r,i=[];for(t of e.TreemapRows??[])"ClassDefStatement"===t.$type&&n.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=xBe(l),s=0<(s=l.classSelector?n.getStylesForClass(l.classSelector):[]).length?s.join(";"):void 0,o={level:o,name:a,type:l.$type,value:l.value,classSelector:l.classSelector,cssCompiledStyles:s},i.push(o))}let c=yBe(i),h=mt((e,t)=>{for(var r of e)n.addNode(r,t),r.children&&0<r.children.length&&h(r.children,t+1)},"addNodesRecursively");h(c,0)},"populate"),xBe=mt(e=>e.name?String(e.name):"","getItemName"),bBe={parser:{yy:void 0},parse:mt(async e=>{try{var t=await Jge("treemap",e),r=(M.debug("Treemap AST:",t),bBe.parser?.yy);if(!(r instanceof gBe))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.");vBe(t,r)}catch(e){throw M.error("Error parsing treemap:",e),e}},"parse")}}),LBe=e(()=>{Cye(),XK(),ch(),a6(),MN(),Nn(),t(),wBe=mt((e,a,t,s)=>{let r=s.db,o=r.getConfig(),l=o.padding??10,c=r.getDiagramTitle(),h=r.getRoot(),u=Ir().themeVariables;if(h){var s=c?30:0,d=vye(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),rh(d,m,f,o.useMaxWidth);let r;try{var y=o.valueFormat||",";if("$0,0"===y)r=mt(e=>"$"+nv(",")(e),"valueFormat");else if(y.startsWith("$")&&y.includes(",")){let e=/\.\d+/.exec(y),t=e?e[0]:"";r=mt(e=>"$"+nv(","+t)(e),"valueFormat")}else if(y.startsWith("$")){let t=y.substring(1);r=mt(e=>"$"+nv(t||"")(e),"valueFormat")}else r=nv(y)}catch(e){M.error("Error creating format function:",e),r=nv(",")}let t=vx().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]),n=vx().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]),i=vx().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=Uv(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),s=(f=ux().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=>n(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>0===e.depth?"display: none;":(e=V({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:"+i(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+V({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(e){if(0!==e.depth){var t=H(this),r=e.data.name,n=(t.text(r),e.x1-e.x0),e=!1!==o.showValues&&e.value?n-10-30-10-6:n-6-6,i=Math.max(15,e),a=t.node();if(a.getComputedTextLength()>i){let e=r;for(;0<e.length;){if(0===(e=r.substring(0,e.length-1)).length){t.text("..."),a.getComputedTextLength()>i&&t.text("");break}if(t.text(e+"..."),a.getComputedTextLength()<=i)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:"+i(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+V({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=>V({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:"+i(e.data.name)+";"+V({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 n=H(this),t=e.x1-e.x0,e=e.y1-e.y0,i=n.node(),a=t-8,s=e-8;if(a<10||s<10)n.style("display","none");else{let e=parseInt(n.style("font-size"),10);for(;i.getComputedTextLength()>a&&8<e;)e--,n.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));)n.style("font-size",e+"px"),r=e+2+t,t<=6&&r;n.style("font-size",e+"px"),(i.getComputedTextLength()>a||e<8||s<e)&&n.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:"+i(e.data.name)+";"+V({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,n=H(this),i=this.parentNode;!i||(i=H(i).select(".treemapLabel")).empty()||"none"===i.style("display")||(i=parseFloat(i.style("font-size")),t=Math.max(6,Math.min(28,Math.round(.6*i))),n.style("font-size",t+"px"),i=(e.y1-e.y0)/2+i/2+2,n.attr("y",i),r=e.x1-e.x0,e=e.y1-e.y0-4,r-=8,n.node().getComputedTextLength()>r)||e<i+t||t<6?n.style("display","none"):n.style("display",null)}),s=o.diagramPadding??8,MK(d,s,"flowchart",o?.useMaxWidth||!1)}},"draw"),kBe=mt(function(e,t){return t.db.getClasses()},"getClasses"),TBe={draw:wBe,getClasses:kBe}}),NBe=e(()=>{iS(),EBe={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},CBe=mt(({treemap:e}={})=>`
|
||
.treemapNode.section {
|
||
stroke: ${(e=_C(EBe,e)).sectionStrokeColor};
|
||
stroke-width: ${e.sectionStrokeWidth};
|
||
fill: ${e.sectionFillColor};
|
||
}
|
||
.treemapNode.leaf {
|
||
stroke: ${e.leafStrokeColor};
|
||
stroke-width: ${e.leafStrokeWidth};
|
||
fill: ${e.leafFillColor};
|
||
}
|
||
.treemapLabel {
|
||
fill: ${e.labelColor};
|
||
font-size: ${e.labelFontSize};
|
||
}
|
||
.treemapValue {
|
||
fill: ${e.valueColor};
|
||
font-size: ${e.valueFontSize};
|
||
}
|
||
.treemapTitle {
|
||
fill: ${e.titleColor};
|
||
font-size: ${e.titleFontSize};
|
||
}
|
||
`,"getStyles"),SBe=CBe}),IBe={};$Be(IBe,{diagram:()=>RBe});var RBe,MBe,DBe=e(()=>{mBe(),ABe(),LBe(),NBe(),RBe={parser:bBe,get db(){return new gBe},renderer:TBe,styles:SBe}}),OBe=($Be(MBe={},{default:()=>VFe}),je(),Fr(),Ur(),{id:"c4",detector:mt(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:mt(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(IS(),LS))).diagram}),"loader")}),PBe={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(()=>(sZ(),tZ))).diagram}),"loader")},BBe="flowchart-v2",e=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"),$Be=mt(async()=>{var e=(await Promise.resolve().then(()=>(sZ(),tZ))).diagram;return{id:BBe,diagram:e}},"loader"),FBe={id:BBe,detector:e,loader:$Be},zBe={id:"er",detector:mt(e=>/^\s*erDiagram/.test(e),"detector"),loader:mt(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(vZ(),mZ))).diagram}),"loader")},GBe={id:"gitGraph",detector:mt(e=>/^\s*gitGraph/.test(e),"detector"),loader:mt(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(Lfe(),Cfe))).diagram}),"loader")},UBe={id:"gantt",detector:mt(e=>/^\s*gantt/.test(e),"detector"),loader:mt(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(wye(),uye))).diagram}),"loader")},qBe={id:"info",detector:mt(e=>/^\s*info/.test(e),"detector"),loader:mt(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(Hye(),_ye))).diagram}),"loader")},jBe={id:"pie",detector:mt(e=>/^\s*pie/.test(e),"detector"),loader:mt(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(i2e(),Qye))).diagram}),"loader")},WBe="quadrantChart",e=mt(e=>/^\s*quadrantChart/.test(e),"detector"),$Be=mt(async()=>{var e=(await Promise.resolve().then(()=>(F2e(),O2e))).diagram;return{id:WBe,diagram:e}},"loader"),YBe={id:WBe,detector:e,loader:$Be},HBe={id:"xychart",detector:mt(e=>/^\s*xychart-beta/.test(e),"detector"),loader:mt(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(rxe(),Xve))).diagram}),"loader")},VBe="requirement",e=mt(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),$Be=mt(async()=>{var e=(await Promise.resolve().then(()=>(Kxe(),cxe))).diagram;return{id:VBe,diagram:e}},"loader"),XBe={id:VBe,detector:e,loader:$Be},KBe={id:"sequence",detector:mt(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:mt(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(zbe(),Ebe))).diagram}),"loader")},ZBe={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(()=>(Vbe(),Ybe))).diagram}),"loader")},QBe="classDiagram",e=mt((e,t)=>!(!/^\s*classDiagram/.test(e)||"dagre-wrapper"!==t?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(e),"detector"),$Be=mt(async()=>{var e=(await Promise.resolve().then(()=>(P4e(),Xbe))).diagram;return{id:QBe,diagram:e}},"loader"),JBe={id:QBe,detector:e,loader:$Be},e$e={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(()=>(D5e(),R5e))).diagram}),"loader")},t$e="stateDiagram",e=mt((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&"dagre-wrapper"===t?.state?.defaultRenderer),"detector"),$Be=mt(async()=>{var e=(await Promise.resolve().then(()=>(p3e(),O5e))).diagram;return{id:t$e,diagram:e}},"loader"),r$e={id:t$e,detector:e,loader:$Be},n$e={id:"journey",detector:mt(e=>/^\s*journey/.test(e),"detector"),loader:mt(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(O3e(),I3e))).diagram}),"loader")},i$e=(t(),Cye(),ch(),e={draw:mt((e,t,r)=>{M.debug(`rendering svg for syntax error
|
||
`);var n=(t=vye(t)).append("g");t.attr("viewBox","0 0 2412 512"),rh(t,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r)},"draw")}),a$e={db:{},renderer:e,parser:{parse:mt(()=>{},"parse")}},s$e="flowchart-elk",$Be=mt((e,t={})=>!!(/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&"elk"===t?.flowchart?.defaultRenderer)&&(t.layout="elk",!0),"detector"),e=mt(async()=>{var e=(await Promise.resolve().then(()=>(sZ(),tZ))).diagram;return{id:s$e,diagram:e}},"loader"),o$e={id:s$e,detector:$Be,loader:e},l$e={id:"timeline",detector:mt(e=>/^\s*timeline/.test(e),"detector"),loader:mt(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(Dwe(),Awe))).diagram}),"loader")},c$e={id:"mindmap",detector:mt(e=>/^\s*mindmap/.test(e),"detector"),loader:mt(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(bNe(),VLe))).diagram}),"loader")},h$e={id:"kanban",detector:mt(e=>/^\s*kanban/.test(e),"detector"),loader:mt(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(GNe(),CNe))).diagram}),"loader")},u$e={id:"sankey",detector:mt(e=>/^\s*sankey-beta/.test(e),"detector"),loader:mt(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(xRe(),eRe))).diagram}),"loader")},d$e={id:"packet",detector:mt(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(URe(),ERe))).diagram}),"loader")},p$e={id:"radar",detector:mt(e=>/^\s*radar-beta/.test(e),"detector"),loader:mt(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>(cMe(),aMe))).diagram}),"loader")},g$e={id:"block",detector:mt(e=>/^\s*block-beta/.test(e),"detector"),loader:mt(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(mPe(),KOe))).diagram}),"loader")},f$e="architecture",$Be=mt(e=>/^\s*architecture/.test(e),"detector"),e=mt(async()=>{var e=(await Promise.resolve().then(()=>(fBe(),dBe))).diagram;return{id:f$e,diagram:e}},"loader"),m$e={id:f$e,detector:$Be,loader:e},y$e=(Ur(),Eu(),{id:"treemap",detector:mt(e=>/^\s*treemap/.test(e),"detector"),loader:mt(async()=>({id:"treemap",diagram:(await Promise.resolve().then(()=>(DBe(),IBe))).diagram}),"loader")}),v$e=!1,x$e=mt(()=>{v$e||(v$e=!0,Ih("error",a$e,e=>"error"===e.toLowerCase().trim()),Ih("---",{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("---")),Qe(o$e,c$e,m$e),Qe(OBe,h$e,JBe,ZBe,zBe,UBe,qBe,jBe,XBe,KBe,FBe,PBe,l$e,GBe,r$e,e$e,n$e,YBe,u$e,d$e,HBe,g$e,p$e,y$e))},"addDiagrams"),b$e=(t(),Ur(),Eu(),mt(async()=>{M.debug("Loading registered diagrams");var e=(await Promise.allSettled(Object.entries(Ke).map(async([e,{detector:t,loader:r}])=>{if(r)try{Rh(e)}catch{try{var{diagram:n,id:i}=await r();Ih(i,n,t)}catch(t){throw M.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Ke[e],t}}}))).filter(e=>"rejected"===e.status);if(0<e.length){M.error(`Failed to load ${e.length} external diagrams`);for(var t of e)M.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams")),w$e=(t(),a6(),"comm"),k$e="rule",T$e="decl",E$e=Math.abs,C$e=String.fromCharCode;function S$e(e){return e.trim()}function _$e(e,t,r){return e.replace(t,r)}function A$e(e,t,r){return e.indexOf(t,r)}function L$e(e,t){return 0|e.charCodeAt(t)}function N$e(e,t,r){return e.slice(t,r)}function I$e(e){return e.length}function R$e(e){return e.length}function M$e(e,t){return t.push(e),e}mt(S$e,"trim"),mt(_$e,"replace"),mt(A$e,"indexof"),mt(L$e,"charat"),mt(N$e,"substr"),mt(I$e,"strlen"),mt(R$e,"sizeof"),mt(M$e,"append");var D$e=1,O$e=1,P$e=0,B$e=0,$$e=0,F$e="";function z$e(e,t,r,n,i,a,s,o){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:D$e,column:O$e,length:s,return:"",siblings:o}}function G$e(){return $$e=0<B$e?L$e(F$e,--B$e):0,O$e--,10===$$e&&(O$e=1,D$e--),$$e}function U$e(){return $$e=B$e<P$e?L$e(F$e,B$e++):0,O$e++,10===$$e&&(O$e=1,D$e++),$$e}function q$e(){return L$e(F$e,B$e)}function j$e(e,t){return N$e(F$e,e,t)}function W$e(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 Y$e(e){return D$e=O$e=1,P$e=I$e(F$e=e),B$e=0,[]}function H$e(e){return F$e="",e}function V$e(e){return S$e(j$e(B$e-1,Z$e(91===e?e+2:40===e?e+1:e)))}function X$e(e){for(;($$e=q$e())&&$$e<33;)U$e();return 2<W$e(e)||3<W$e($$e)?"":" "}function K$e(e,t){for(;--t&&U$e()&&!($$e<48||102<$$e||57<$$e&&$$e<65||70<$$e&&$$e<97););return j$e(e,B$e+(t<6&&32==q$e()&&32==U$e()))}function Z$e(e){for(;U$e();)switch($$e){case e:return B$e;case 34:case 39:34!==e&&39!==e&&Z$e($$e);break;case 40:41===e&&Z$e(e);break;case 92:U$e()}return B$e}function Q$e(e,t){for(;U$e()&&e+$$e!==57&&(e+$$e!==84||47!==q$e()););return"/*"+j$e(t,B$e-1)+"*"+C$e(47===e?e:U$e())}function J$e(e){for(;!W$e(q$e());)U$e();return j$e(e,B$e)}function eFe(e){return H$e(tFe("",null,null,null,[""],e=Y$e(e),0,[0],e))}function tFe(e,t,r,n,i,a,s,o,l){for(var c,h,u,d=0,p=0,g=s,f=0,m=0,y=1,v=1,x=1,b=0,w="",k=i,T=w;v;)switch(c=b,b=U$e()){case 40:if(108!=c&&58==L$e(T,g-1)){-1!=A$e(T+=_$e(V$e(b),"&","&\f"),"&\f",E$e(d?o[d-1]:0))&&(x=-1);break}case 34:case 39:case 91:T+=V$e(b);break;case 9:case 10:case 13:case 32:T+=X$e(c);break;case 92:T+=K$e(B$e-1,7);continue;case 47:switch(q$e()){case 42:case 47:M$e(nFe(Q$e(U$e(),B$e),t,r,l),l),5!=W$e(c||1)&&5!=W$e(q$e()||1)||!I$e(T)||" "===N$e(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*y:o[d++]=I$e(T)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+p:-1==x&&(T=_$e(T,/\f/g,"")),0<m&&(I$e(T)-g||0===y&&47===c)&&M$e(32<m?iFe(T+";",n,r,g-1,l):iFe(_$e(T," ","")+";",n,r,g-2,l),l);break;case 59:T+=";";default:if(M$e(u=rFe(T,t,r,d,p,i,o,w,k=[],h=[],g,a),a),123===b)if(0===p)tFe(T,t,u,u,k,a,g,o,h);else{switch(f){case 99:if(110===L$e(T,3))break;case 108:if(97===L$e(T,2))break;default:p=0;case 100:case 109:case 115:}p?tFe(e,u,u,n&&M$e(rFe(e,u,u,0,0,i,o,w,i,k=[],g,h),h),i,h,g,o,n?k:h):tFe(T,u,u,u,[""],h,0,o,h)}}d=p=m=0,y=x=1,w=T="",g=s;break;case 58:g=1+I$e(T),m=c;default:if(y<1)if(123==b)--y;else if(125==b&&0==y++&&125==G$e())continue;switch(T+=C$e(b),b*y){case 38:x=0<p?1:(T+="\f",-1);break;case 44:o[d++]=(I$e(T)-1)*x,x=1;break;case 64:45===q$e()&&(T+=V$e(U$e())),f=q$e(),p=g=I$e(w=T+=J$e(B$e)),b++;break;case 45:45===c&&2==I$e(T)&&(y=0)}}return a}function rFe(e,t,r,n,i,a,s,o,l,c,h,u){for(var d,p=i-1,g=0===i?a:[""],f=R$e(g),m=0,y=0;m<n;++m)for(var v,x=0,b=N$e(e,p+1,p=E$e(d=s[m]));x<f;++x)(v=S$e(0<d?g[x]+" "+b:_$e(b,/&\f/g,g[x])))&&(l[y++]=v);return z$e(e,t,r,0===i?k$e:o,l,c,h,u)}function nFe(e,t,r,n){return z$e(e,t,r,w$e,C$e($$e),N$e(e,2,-2),0,n)}function iFe(e,t,r,n,i){return z$e(e,t,r,T$e,N$e(e,0,n),N$e(e,n+1,-1),n,i)}function aFe(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function sFe(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case T$e:return e.return=e.return||e.value;case w$e:return"";case"@keyframes":return e.return=e.value+"{"+aFe(e.children,n)+"}";case k$e:if(!I$e(e.value=e.props.join(",")))return""}return I$e(r=aFe(e.children,n))?e.return=e.value+"{"+r+"}":""}function oFe(e,t){e.attr("role","graphics-document document"),""!==t&&e.attr("aria-roledescription",t)}function lFe(e,t,r,n){var i;void 0!==e.insert&&(r&&(e.attr("aria-describedby",i="chart-desc-"+n),e.insert("desc",":first-child").attr("id",i).text(r)),t)&&(e.attr("aria-labelledby",i="chart-title-"+n),e.insert("title",":first-child").attr("id",i).text(t))}mt(z$e,"node"),mt(function(){return $$e},"char"),mt(G$e,"prev"),mt(U$e,"next"),mt(q$e,"peek"),mt(function(){return B$e},"caret"),mt(j$e,"slice"),mt(W$e,"token"),mt(Y$e,"alloc"),mt(H$e,"dealloc"),mt(V$e,"delimit"),mt(X$e,"whitespace"),mt(K$e,"escaping"),mt(Z$e,"delimiter"),mt(Q$e,"commenter"),mt(J$e,"identifier"),mt(eFe,"compile"),mt(tFe,"parse"),mt(rFe,"ruleset"),mt(nFe,"comment"),mt(iFe,"declaration"),mt(aFe,"serialize"),mt(sFe,"stringify"),Di(),pj(),Tye(),mt(oFe,"setA11yDiagramInfo"),mt(lFe,"addSVGa11yTitleDescription"),jr(),Nn(),Nn(),Eu(),Ur(),Gr(),iS();var cFe=class XFe{constructor(e,t,r,n,i){this.type=e,this.text=t,this.db=r,this.parser=n,this.renderer=i}static{mt(this,"Diagram")}static async fromText(e,t={}){var r=Ir(),n=Ze(e,r);e=tS(e)+`
|
||
`;try{Rh(n)}catch{if(!(i=et(n)))throw new Xe(`Diagram ${n} not found.`);var{id:i,diagram:a}=await i();Ih(i,a)}var{db:i,parser:a,renderer:s,init:o}=Rh(n);return a.parser&&(a.parser.yy=i),i.clear?.(),o?.(r),t.title&&i.setDiagramTitle?.(t.title),await a.parse(e),new XFe(n,e,i,a,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},hFe=(lh(),[]),uFe=mt(()=>{hFe.forEach(e=>{e()}),hFe=[]},"attachFunctions"),dFe=(t(),mt(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function pFe(e){var t,r,n=e.match(Ye);return n?(r={},(t="object"!=typeof(t=$9(n[1],{schema:B9})??{})||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(n[0].length),metadata:r}):{text:e,metadata:{}}}zr(),F9(),mt(pFe,"extractFrontMatter"),iS();var gFe=mt(e=>e.replace(/\r\n?/g,`
|
||
`).replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),fFe=mt(e=>{var{text:e,metadata:t}=pFe(e),{displayMode:t,title:r,config:n={}}=t;return t&&(n.gantt||(n.gantt={}),n.gantt.displayMode=t),{title:r,config:n,text:e}},"processFrontmatter"),mFe=mt(e=>{var t=eS.detectInit(e)??{},r=eS.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:e})=>"wrap"===e):"wrap"===r?.type&&(t.wrap=!0),{text:OC(e),directive:t}},"processDirectives");function yFe(e){var t=gFe(e),t=fFe(t),r=mFe(t.text),n=_C(t.config,r.directive);return{code:e=dFe(r.text),title:t.title,config:n}}function vFe(e){return e=(new TextEncoder).encode(e),e=Array.from(e,e=>String.fromCodePoint(e)).join(""),btoa(e)}mt(yFe,"preprocessDiagram"),hh(),Sn(),iS(),mt(vFe,"toBase64");var xFe=["foreignobject"],bFe=["dominant-baseline"];function wFe(e){return e=yFe(e),Dr(),Mr(e.config??{}),e}async function kFe(e,t){x$e();try{var{code:r,config:n}=wFe(e);return{diagramType:(await RFe(r)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}mt(wFe,"processAndSetConfigs"),mt(kFe,"parse");var TFe=mt((e,t,r=[])=>`
|
||
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),EFe=mt((t,r=new Map)=>{let n="";if(void 0!==t.themeCSS&&(n+=`
|
||
`+t.themeCSS),void 0!==t.fontFamily&&(n+=`
|
||
:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(n+=`
|
||
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),r instanceof Map){let e=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(t=>{dj(t.styles)||e.forEach(e=>{n+=TFe(t.id,e,t.styles)}),dj(t.textStyles)||(n+=TFe(t.id,"tspan",(t?.textStyles||[]).map(e=>e.replace("color","fill"))))})}return n},"createCssStyles"),CFe=mt((e,t,r,n)=>(r=EFe(e,r),aFe(eFe(n+`{${oh(t,r,e.themeVariables)}}`),sFe)),"createUserStyles"),SFe=mt((e="",t,r)=>{let n=e;return r||t||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(n=rS(n)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),_Fe=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,${vFe(`<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"),AFe=mt((e,t,r,n,i)=>{var a=e.append("div"),r=(a.attr("id",r),n&&a.attr("style",n),a.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return i&&r.attr("xmlns:xlink",i),r.append("g"),e},"appendDivSvgG");function LFe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}mt(LFe,"sandboxedIframe");var NFe=mt((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),$Be=mt(async function(e,t,r){x$e();var n=wFe(t),i=(t=n.code,Ir());M.debug(i),t.length>(i?.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=H(d?o:c).node();e&&"remove"in e&&e.remove()},"removeTempElements"),u=H("body"),d="sandbox"===i.securityLevel,p="loose"===i.securityLevel,g=i.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=LFe(H(r),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H(r),AFe(u,e,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(NFe(document,e,l,s),d?(y=LFe(H("body"),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H("body"),AFe(u,e,l));let f,m;try{f=await cFe.fromText(t,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await cFe.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(n=r.firstChild).firstChild,v=f.renderer.getClasses?.(t,f),v=CFe(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(t,e,gye.version,f)}catch(r){throw i.suppressErrorRendering?h():i$e.draw(t,e,gye.version),r}MFe(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 b=u.select(c).node().innerHTML;if(M.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),b=SFe(b,d,Uc(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=_Fe(b,v)):p||(b=Mi.sanitize(b,{ADD_TAGS:xFe,ADD_ATTR:bFe,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),uFe(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function IFe(e={}){(e=it({},e))?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),_r(e),e?.theme&&e.theme in dr?e.themeVariables=dr[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=dr.default.getThemeVariables(e.themeVariables)),e="object"==typeof e?Sr(e):Lr(),T(e.logLevel),x$e()}mt(IFe,"initialize");var RFe=mt((e,t={})=>(e=yFe(e).code,cFe.fromText(e,t)),"getDiagramFromText");function MFe(e,t,r,n){oFe(t,e),lFe(t,r,n,t.attr("id"))}mt(MFe,"addA11yInfo");var DFe=Object.freeze({render:$Be,parse:kFe,getDiagramFromText:RFe,initialize:IFe,getConfig:Ir,setConfig:Nr,getSiteConfig:Lr,updateSiteConfig:Ar,reset:mt(()=>{Dr()},"reset"),globalReset:mt(()=>{Dr(br)},"globalReset"),defaultConfig:br}),OFe=(T(Ir().logLevel),Dr(Ir()),VK(),iS(),mt((e,t,r)=>{M.warn(e),SC(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")),PFe=mt(async function(t={querySelector:".mermaid"}){try{await BFe(t)}catch(e){if(SC(e)&&M.error(e.str),HFe.parseError&&HFe.parseError(e),!t.suppressErrors)throw M.error("Use the suppressErrors option to suppress these errors"),e}},"run"),BFe=mt(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){var n=DFe.getConfig();M.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(t)}M.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(M.debug("Start On Load: "+n?.startOnLoad),DFe.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,s=new eS.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o=[];for(a of Array.from(i))if(M.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+s.next(),c=a.innerHTML,h=(c=We(eS.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>"),eS.detectInit(c));h&&M.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await WFe(l,c,a);a.innerHTML=u,e&&await e(l),d&&d(a)}catch(e){OFe(e,o,HFe.parseError)}}if(0<o.length)throw o[0]},"runThrowsErrors"),$Fe=mt(function(e){DFe.initialize(e)},"initialize"),e=mt(async function(e,t,r){M.warn("mermaid.init is deprecated. Please use run instead."),e&&$Fe(e),e={postRenderCallback:r,querySelector:".mermaid"},"string"==typeof t?e.querySelector=t:t&&(t instanceof HTMLElement?e.nodes=[t]:e.nodes=t),await PFe(e)},"init"),$Be=mt(async(e,{lazyLoad:t=!0}={})=>{x$e(),Qe(...e),!1===t&&await b$e()},"registerExternalDiagrams"),FFe=mt(function(){HFe.startOnLoad&&DFe.getConfig().startOnLoad&&HFe.run().catch(e=>M.error("Mermaid failed to initialize",e))},"contentLoaded"),zFe=(typeof document<"u"&&window.addEventListener("load",FFe,!1),mt(function(e){HFe.parseError=e},"setParseErrorHandler")),GFe=[],UFe=!1,qFe=mt(async()=>{if(!UFe){for(UFe=!0;0<GFe.length;){var e=GFe.shift();if(e)try{await e()}catch(e){M.error("Error executing queue",e)}}UFe=!1}},"executeQueue"),jFe=mt(async(a,s)=>new Promise((n,i)=>{var e=mt(()=>new Promise((t,r)=>{DFe.parse(a,s).then(e=>{t(e),n(e)},e=>{M.error("Error parsing",e),HFe.parseError?.(e),r(e),i(e)})}),"performCall");GFe.push(e),qFe().catch(i)}),"parse"),WFe=mt((a,s,o)=>new Promise((n,i)=>{var e=mt(()=>new Promise((t,r)=>{DFe.render(a,s,o).then(e=>{t(e),n(e)},e=>{M.error("Error parsing",e),HFe.parseError?.(e),r(e),i(e)})}),"performCall");GFe.push(e),qFe().catch(i)}),"render"),YFe=mt(()=>Object.keys(Ke).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),HFe={startOnLoad:!0,mermaidAPI:DFe,parse:jFe,render:WFe,init:e,run:PFe,registerExternalDiagrams:$Be,registerLayoutLoaders:NK,initialize:$Fe,parseError:void 0,contentLoaded:FFe,setParseErrorHandler:zFe,detectType:Ze,registerIconPacks:Oe,getRegisteredDiagramsMetadata:YFe},VFe=HFe,jFe=MBe;return W(z({},"__esModule",{value:!0}),jFe)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default;
|