diff --git a/static/js/mermaid.min.js b/static/js/mermaid.min.js index b13ae3c..19d9bd3 100644 --- a/static/js/mermaid.min.js +++ b/static/js/mermaid.min.js @@ -1,16 +1,16 @@ -var __esbuild_esm_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,W=Object.prototype.hasOwnProperty,me=(t,e)=>z(t,"name",{value:e,configurable:!0}),t=(t,e)=>()=>e=t?t(t=0):e,Y=(e,r,i,n)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let t of U(r))W.call(e,t)||t===i||z(e,t,{get:()=>r[t],enumerable:!(n=G(r,t))||n.enumerable});return e},H=(t,e,r)=>(Y(t,e,"default"),r&&Y(r,e,"default")),tt=(t,e,r)=>(r=null!=t?$(q(t)):{},Y(!e&&t&&t.__esModule?r:z(r,"default",{value:t,enumerable:!0}),t)),et=(iPt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports))((t,e)=>{function r(){var n="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",e="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,t={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:me(function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"},"ordinal")},i=me(function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},"m"),r={s:i,z:me(function(t){var t=-t.utcOffset(),e=Math.abs(t),r=Math.floor(e/60),e=e%60;return(t<=0?"+":"-")+i(r,2,"0")+":"+i(e,2,"0")},"z"),m:me(function t(e,r){var i,n,a;return e.date(){var t=a.date,e=a.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(!(t instanceof Date||"string"!=typeof t||/Z$/i.test(t))){var r,i,n=t.match(s);if(n)return r=n[2]-1||0,i=(n[7]||"0").substring(0,3),e?new Date(Date.UTC(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}return new Date(t)})(),this.init()},t.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},t.$utils=function(){return w},t.isValid=function(){return this.$d.toString()!==e},t.isSame=function(t,e){return t=b(t),this.startOf(e)<=t&&t<=this.endOf(e)},t.isAfter=function(t,e){return b(t){switch(t){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(i);case"HH":return w.s(i,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return u(i,a,!0);case"A":return u(i,a,!1);case"m":return String(a);case"mm":return 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||e},t.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},t.diff=function(t,e,r){var i,n=this,e=w.p(e),a=b(t),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=me(function(){return w.m(n,a)},"D");switch(e){case y:i=l()/12;break;case m:i=l();break;case"quarter":i=l()/3;break;case f:i=(o-s)/6048e5;break;case g:i=(o-s)/864e5;break;case p:i=o/36e5;break;case d:i=o/6e4;break;case u:i=o/1e3;break;default:i=o}return r?i:w.a(i)},t.daysInMonth=function(){return this.endOf(m).$D},t.$locale=function(){return l[this.$L]},t.locale=function(t,e){var r;return t?(r=this.clone(),(t=h(t,e,!0))&&(r.$L=t),r):this.$L},t.clone=function(){return w.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},E),T=k.prototype;function E(t){this.$L=h(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[a]=!0}return b.prototype=T,[["$ms",n],["$s",u],["$m",d],["$H",p],["$W",g],["$M",m],["$y",y],["$D",v]].forEach(function(e){T[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(t,e){return t.$i||(t(e,k,b),t.$i=!0),b},b.locale=h,b.isDayjs=c,b.unix=function(t){return b(1e3*t)},b.en=l[o],b.Ls=l,b.p={},b}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=r()}),e=t(()=>{w=tt(et(),1),k={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},M={trace:me(()=>{},"trace"),debug:me(()=>{},"debug"),info:me(()=>{},"info"),warn:me(()=>{},"warn"),error:me(()=>{},"error"),fatal:me(()=>{},"fatal")},T=me(function(t="fatal"){let e=k.fatal;"string"==typeof t?t.toLowerCase()in k&&(e=k[t]):"number"==typeof t&&(e=t),M.trace=()=>{},M.debug=()=>{},M.info=()=>{},M.warn=()=>{},M.error=()=>{},M.fatal=()=>{},e<=k.fatal&&(M.fatal=console.error?console.error.bind(console,C("FATAL"),"color: orange"):console.log.bind(console,"",C("FATAL"))),e<=k.error&&(M.error=console.error?console.error.bind(console,C("ERROR"),"color: orange"):console.log.bind(console,"",C("ERROR"))),e<=k.warn&&(M.warn=console.warn?console.warn.bind(console,C("WARN"),"color: orange"):console.log.bind(console,"",C("WARN"))),e<=k.info&&(M.info=console.info?console.info.bind(console,C("INFO"),"color: lightblue"):console.log.bind(console,"",C("INFO"))),e<=k.debug&&(M.debug=console.debug?console.debug.bind(console,C("DEBUG"),"color: lightgreen"):console.log.bind(console,"",C("DEBUG"))),e<=k.trace&&(M.trace=console.debug?console.debug.bind(console,C("TRACE"),"color: lightgreen"):console.log.bind(console,"",C("TRACE")))},"setLogLevel"),C=me(t=>`%c${(0,w.default)().format("ss.SSS")} : ${t} : `,"format")}),rt=t(()=>{_=Object.freeze({left:0,top:0,width:16,height:16}),S=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),A=Object.freeze({..._,...S}),N=Object.freeze({...A,body:"",hidden:!1})}),it=t(()=>{rt(),I=Object.freeze({width:null,height:null}),R=Object.freeze({...I,...S})}),nt=t(()=>{B=me((t,e,r,i="")=>{var n,a=t.split(":");if("@"===t.slice(0,1)){if(a.length<2||3!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),"validateIconName")});function st(t,e){var r={};return!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0),(t=((t.rotate||0)+(e.rotate||0))%4)&&(r.rotate=t),r}var ot=t(()=>{me(st,"mergeIconTransformations")});function lt(t,e){var r,i=st(t,e);for(r in N)r in S?r in t&&!(r in i)&&(i[r]=S[r]):r in e?i[r]=e[r]:r in t&&(i[r]=t[r]);return i}var ct=t(()=>{rt(),ot(),me(lt,"mergeIconData")});function ht(t,e){let i=t.icons,n=t.aliases||Object.create(null),a=Object.create(null);function s(t){var e,r;return i[t]?a[t]=[]:(t in a||(a[t]=null,(r=(e=n[t]&&n[t].parent)&&s(e))&&(a[t]=[e].concat(r))),a[t])}return me(s,"resolve"),(e||Object.keys(i).concat(Object.keys(n))).forEach(s),a}var ut=t(()=>{me(ht,"getIconsTree")});function dt(t,e,r){let i=t.icons,n=t.aliases||Object.create(null),a={};function s(t){a=lt(i[t]||n[t],a)}return me(s,"parse"),s(e),r.forEach(s),lt(t,a)}function pt(t,e){var r;return t.icons[e]?dt(t,e,[]):(r=ht(t,[e])[e])?dt(t,e,r):null}var gt=t(()=>{ct(),ut(),me(dt,"internalGetIconData"),me(pt,"getIconData")});function ft(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;var i,n=t.split(mt);if(null===n||!n.length)return t;let a=[],s=n.shift(),o=yt.test(s);for(;;){if(!o||(i=parseFloat(s),isNaN(i))?a.push(s):a.push(Math.ceil(i*e*r)/r),void 0===(s=n.shift()))return a.join("");o=!o}}var mt,yt,vt=t(()=>{mt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yt=/^-?[0-9.]*[0-9]+[0-9.]*$/g,me(ft,"calculateSize")});function xt(t,e="defs"){let r="",i=t.indexOf("<"+e);for(;0<=i;){var n=t.indexOf(">",i),a=t.indexOf("",a);if(-1===s)break;r+=t.slice(n+1,a).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}function bt(t,e){return t?""+t+""+e:e}function wt(t,e,r){return bt((t=xt(t)).defs,e+t.content+r)}var kt=t(()=>{me(xt,"splitSVGDefs"),me(bt,"mergeDefsAndContent"),me(wt,"wrapSVGContent")});function Tt(t,e){let r={...A,...t},i={...R,...e},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,n=([r,i].forEach(t=>{let e=[],r=t.hFlip,i=t.vFlip,n=t.rotate;r?i?n+=2:(e.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),e.push("scale(-1 1)"),s.top=s.left=0):i&&(e.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),e.push("scale(1 -1)"),s.top=s.left=0);let a;switch(n<0&&(n-=4*Math.floor(n/4)),n%=4){case 1:a=s.height/2+s.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:a=s.width/2+s.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}n%2==1&&(s.left!==s.top&&(a=s.left,s.left=s.top,s.top=a),s.width!==s.height)&&(a=s.width,s.width=s.height,s.height=a),e.length&&(o=wt(o,'',""))}),i.width),a=i.height,l=s.width,c=s.height,h,u,d=(null===n?(u=null===a?"1em":"auto"===a?c:a,h=ft(u,l/c)):(h="auto"===n?l:n,u=null===a?ft(h,c/l):"auto"===a?c:a),{}),p=me((t,e)=>{Et(e)||(d[t]=e.toString())},"setAttr");return p("width",h),p("height",u),t=[s.left,s.top,l,c],d.viewBox=t.join(" "),{attributes:d,viewBox:t,body:o}}var Et,Ct=t(()=>{rt(),it(),vt(),kt(),Et=me(t=>"unset"===t||"undefined"===t||"none"===t,"isUnsetKeyword"),me(Tt,"iconToSVG")});function _t(i,n=At){for(var t,e=[];t=St.exec(i);)e.push(t[1]);if(e.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);e.forEach(t=>{var e="function"==typeof n?n(t):n+(Lt++).toString(),t=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp('([#;"])('+t+')([")]|\\.[a-z])',"g"),"$1"+e+r+"$3")}),i=i.replace(new RegExp(r,"g"),"")}return i}var St,At,Lt,Nt=t(()=>{St=/\sid="(\S+)"/g,At="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Lt=0,me(_t,"replaceIDs")});function It(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var i in e)r+=" "+i+'="'+e[i]+'"';return'"+t+""}var Rt,Mt,Dt,Ot,Pt,Bt,Ft=t(()=>{me(It,"iconToHTML")}),$t=iPt((t,e)=>{function i(t){if(!(100<(t=String(t)).length)&&(t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t))){var e=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*e;case"weeks":case"week":case"w":return 6048e5*e;case"days":case"day":case"d":return 864e5*e;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*e;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*e;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}function n(t){var e=Math.abs(t);return 864e5<=e?Math.round(t/864e5)+"d":36e5<=e?Math.round(t/36e5)+"h":6e4<=e?Math.round(t/6e4)+"m":1e3<=e?Math.round(t/1e3)+"s":t+"ms"}function a(t){var e=Math.abs(t);return 864e5<=e?r(t,e,864e5,"day"):36e5<=e?r(t,e,36e5,"hour"):6e4<=e?r(t,e,6e4,"minute"):1e3<=e?r(t,e,1e3,"second"):t+" ms"}function r(t,e,r,i){return e=1.5*r<=e,Math.round(t/r)+" "+i+(e?"s":"")}e.exports=function(t,e){e=e||{};var r=typeof t;if("string"==r&&0{function r(e){function t(e){let r=0;for(let t=0;t{var r;return"%%"===t?"%":(n++,"function"==typeof(e=o.formatters[e])&&(r=a[n],t=e.call(i,r),a.splice(n,1),n--),t)}),o.formatArgs.call(i,a),(i.log||o.log).apply(i,a)}}return me(s,"debug"),s.namespace=t,s.useColors=o.useColors(),s.color=o.selectColor(t),s.extend=a,s.destroy=o.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:me(()=>null!==e?e:(i!==o.namespaces&&(i=o.namespaces,n=o.enabled(t)),n),"get"),set:me(t=>{e=t},"set")}),"function"==typeof o.init&&o.init(s),s}function a(t,e){return(e=o(this.namespace+("u""-"+t)].join(",");return o.enable(""),t}function s(t){for(var e of o.skips)if(i(t,e))return!1;for(var r of o.names)if(i(t,r))return!0;return!1}function l(t){return t instanceof Error?t.stack||t.message:t}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=n,o.enable=r,o.enabled=s,o.humanize=$t(),o.destroy=c,Object.keys(e).forEach(t=>{o[t]=e[t]}),o.names=[],o.skips=[],o.formatters={},me(t,"selectColor"),o.selectColor=t,me(o,"createDebug"),me(a,"extend"),me(r,"enable"),me(i,"matchesTemplate"),me(n,"disable"),me(s,"enabled"),me(l,"coerce"),me(c,"destroy"),o.enable(o.load()),o}me(r,"setup"),e.exports=r}),Gt=iPt((e,r)=>{function t(){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 t;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&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&31<=parseInt(t[1],10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),this.useColors){var i="color: "+this.color;t.splice(1,0,i,"color: inherit");let e=0,r=0;t[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(e++,"%c"===t)&&(r=e)}),t.splice(r,0,i)}}function n(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}}function a(){let t;try{t=e.storage.getItem("debug")}catch{}return t=!t&&typeof process<"u"&&"env"in process?process.env.DEBUG:t}function s(){try{return localStorage}catch{}}e.formatArgs=i,e.save=n,e.load=a,e.useColors=t,e.storage=s(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})(),e.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"],me(t,"useColors"),me(i,"formatArgs"),e.log=console.debug||console.log||(()=>{}),me(n,"save"),me(a,"load"),me(s,"localstorage"),r.exports=zt()(e),r.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}),Ut=t(()=>{nt(),gt(),Ct(),Nt(),Ft(),tt(Gt(),1)}),qt=t(()=>{e(),Ut(),Rt={body:'?',height:80,width:80},Mt=new Map,Dt=new Map,Ot=me(t=>{for(var e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(M.debug("Registering icon pack:",e.name),"loader"in e)Dt.set(e.name,e.loader);else{if(!("icons"in e))throw M.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Mt.set(e.name,e.icons)}}},"registerIconPacks"),Pt=me(async(t,e)=>{var r=B(t,!0,void 0!==e);if(!r)throw new Error("Invalid icon name: "+t);if(!(e=r.prefix||e))throw new Error("Icon name must contain a prefix: "+t);let i=Mt.get(e);if(!i){var n=Dt.get(e);if(!n)throw new Error("Icon set not found: "+r.prefix);try{i={...await n(),prefix:e},Mt.set(e,i)}catch(t){throw M.error(t),new Error("Failed to load icon set: "+r.prefix)}}if(n=pt(i,r.name))return n;throw new Error("Icon not found: "+t)},"getRegisteredIconData"),Bt=me(async(t,e)=>{let r;try{r=await Pt(t,e?.fallbackPrefix)}catch(t){M.error(t),r=Rt}return It(_t((t=Tt(r,e)).body),t.attributes)},"getIconSVG")});function jt(t){for(var e=[],r=1;r{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,me=(t,e)=>z(t,"name",{value:e,configurable:!0}),t=(t,e)=>()=>e=t?t(t=0):e,W=(e,r,n,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let t of U(r))j.call(e,t)||t===n||z(e,t,{get:()=>r[t],enumerable:!(i=G(r,t))||i.enumerable});return e},Y=(t,e,r)=>(W(t,e,"default"),r&&W(r,e,"default")),tt=(t,e,r)=>(r=null!=t?$(q(t)):{},W(!e&&t&&t.__esModule?r:z(r,"default",{value:t,enumerable:!0}),t)),et=(rPt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports))((t,e)=>{function r(){var i="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",e="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,t={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:me(function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"},"ordinal")},n=me(function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},"m"),r={s:n,z:me(function(t){var t=-t.utcOffset(),e=Math.abs(t),r=Math.floor(e/60),e=e%60;return(t<=0?"+":"-")+n(r,2,"0")+":"+n(e,2,"0")},"z"),m:me(function t(e,r){var n,i,a;return e.date(){var t=a.date,e=a.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(!(t instanceof Date||"string"!=typeof t||/Z$/i.test(t))){var r,n,i=t.match(s);if(i)return r=i[2]-1||0,n=(i[7]||"0").substring(0,3),e?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(t)})(),this.init()},t.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},t.$utils=function(){return w},t.isValid=function(){return this.$d.toString()!==e},t.isSame=function(t,e){return t=b(t),this.startOf(e)<=t&&t<=this.endOf(e)},t.isAfter=function(t,e){return b(t){switch(t){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||e},t.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},t.diff=function(t,e,r){var n,i=this,e=w.p(e),a=b(t),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=me(function(){return w.m(i,a)},"D");switch(e){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)},t.daysInMonth=function(){return this.endOf(m).$D},t.$locale=function(){return l[this.$L]},t.locale=function(t,e){var r;return t?(r=this.clone(),(t=h(t,e,!0))&&(r.$L=t),r):this.$L},t.clone=function(){return w.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},E),T=k.prototype;function E(t){this.$L=h(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.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(e){T[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(t,e){return t.$i||(t(e,k,b),t.$i=!0),b},b.locale=h,b.isDayjs=c,b.unix=function(t){return b(1e3*t)},b.en=l[o],b.Ls=l,b.p={},b}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=r()}),e=t(()=>{w=tt(et(),1),k={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},M={trace:me(()=>{},"trace"),debug:me(()=>{},"debug"),info:me(()=>{},"info"),warn:me(()=>{},"warn"),error:me(()=>{},"error"),fatal:me(()=>{},"fatal")},T=me(function(t="fatal"){let e=k.fatal;"string"==typeof t?t.toLowerCase()in k&&(e=k[t]):"number"==typeof t&&(e=t),M.trace=()=>{},M.debug=()=>{},M.info=()=>{},M.warn=()=>{},M.error=()=>{},M.fatal=()=>{},e<=k.fatal&&(M.fatal=console.error?console.error.bind(console,C("FATAL"),"color: orange"):console.log.bind(console,"",C("FATAL"))),e<=k.error&&(M.error=console.error?console.error.bind(console,C("ERROR"),"color: orange"):console.log.bind(console,"",C("ERROR"))),e<=k.warn&&(M.warn=console.warn?console.warn.bind(console,C("WARN"),"color: orange"):console.log.bind(console,"",C("WARN"))),e<=k.info&&(M.info=console.info?console.info.bind(console,C("INFO"),"color: lightblue"):console.log.bind(console,"",C("INFO"))),e<=k.debug&&(M.debug=console.debug?console.debug.bind(console,C("DEBUG"),"color: lightgreen"):console.log.bind(console,"",C("DEBUG"))),e<=k.trace&&(M.trace=console.debug?console.debug.bind(console,C("TRACE"),"color: lightgreen"):console.log.bind(console,"",C("TRACE")))},"setLogLevel"),C=me(t=>`%c${(0,w.default)().format("ss.SSS")} : ${t} : `,"format")}),rt=t(()=>{_=Object.freeze({left:0,top:0,width:16,height:16}),S=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),A=Object.freeze({..._,...S}),N=Object.freeze({...A,body:"",hidden:!1})}),nt=t(()=>{rt(),I=Object.freeze({width:null,height:null}),R=Object.freeze({...I,...S})}),it=t(()=>{B=me((t,e,r,n="")=>{var i,a=t.split(":");if("@"===t.slice(0,1)){if(a.length<2||3!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),"validateIconName")});function st(t,e){var r={};return!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0),(t=((t.rotate||0)+(e.rotate||0))%4)&&(r.rotate=t),r}var ot=t(()=>{me(st,"mergeIconTransformations")});function lt(t,e){var r,n=st(t,e);for(r in N)r in S?r in t&&!(r in n)&&(n[r]=S[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}var ct=t(()=>{rt(),ot(),me(lt,"mergeIconData")});function ht(t,e){let n=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);function s(t){var e,r;return n[t]?a[t]=[]:(t in a||(a[t]=null,(r=(e=i[t]&&i[t].parent)&&s(e))&&(a[t]=[e].concat(r))),a[t])}return me(s,"resolve"),(e||Object.keys(n).concat(Object.keys(i))).forEach(s),a}var ut=t(()=>{me(ht,"getIconsTree")});function dt(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function s(t){a=lt(n[t]||i[t],a)}return me(s,"parse"),s(e),r.forEach(s),lt(t,a)}function pt(t,e){var r;return t.icons[e]?dt(t,e,[]):(r=ht(t,[e])[e])?dt(t,e,r):null}var gt=t(()=>{ct(),ut(),me(dt,"internalGetIconData"),me(pt,"getIconData")});function ft(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;var n,i=t.split(mt);if(null===i||!i.length)return t;let a=[],s=i.shift(),o=yt.test(s);for(;;){if(!o||(n=parseFloat(s),isNaN(n))?a.push(s):a.push(Math.ceil(n*e*r)/r),void 0===(s=i.shift()))return a.join("");o=!o}}var mt,yt,vt=t(()=>{mt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yt=/^-?[0-9.]*[0-9]+[0-9.]*$/g,me(ft,"calculateSize")});function xt(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;0<=n;){var i=t.indexOf(">",n),a=t.indexOf("",a);if(-1===s)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function bt(t,e){return t?""+t+""+e:e}function wt(t,e,r){return bt((t=xt(t)).defs,e+t.content+r)}var kt=t(()=>{me(xt,"splitSVGDefs"),me(bt,"mergeDefsAndContent"),me(wt,"wrapSVGContent")});function Tt(t,e){let r={...A,...t},n={...R,...e},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,i=([r,n].forEach(t=>{let e=[],r=t.hFlip,n=t.vFlip,i=t.rotate;r?n?i+=2:(e.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),e.push("scale(-1 1)"),s.top=s.left=0):n&&(e.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),e.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,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:a=s.width/2+s.left,e.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),e.length&&(o=wt(o,'',""))}),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=ft(u,l/c)):(h="auto"===i?l:i,u=null===a?ft(h,c/l):"auto"===a?c:a),{}),p=me((t,e)=>{Et(e)||(d[t]=e.toString())},"setAttr");return p("width",h),p("height",u),t=[s.left,s.top,l,c],d.viewBox=t.join(" "),{attributes:d,viewBox:t,body:o}}var Et,Ct=t(()=>{rt(),nt(),vt(),kt(),Et=me(t=>"unset"===t||"undefined"===t||"none"===t,"isUnsetKeyword"),me(Tt,"iconToSVG")});function _t(n,i=At){for(var t,e=[];t=St.exec(n);)e.push(t[1]);if(e.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);e.forEach(t=>{var e="function"==typeof i?i(t):i+(Lt++).toString(),t=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+t+')([")]|\\.[a-z])',"g"),"$1"+e+r+"$3")}),n=n.replace(new RegExp(r,"g"),"")}return n}var St,At,Lt,Nt=t(()=>{St=/\sid="(\S+)"/g,At="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Lt=0,me(_t,"replaceIDs")});function It(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var n in e)r+=" "+n+'="'+e[n]+'"';return'"+t+""}var Rt,Mt,Dt,Ot,Pt,Bt,Ft,$t=t(()=>{me(It,"iconToHTML")}),zt=rPt((t,e)=>{function n(t){if(!(100<(t=String(t)).length)&&(t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t))){var e=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*e;case"weeks":case"week":case"w":return 6048e5*e;case"days":case"day":case"d":return 864e5*e;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*e;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*e;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}function i(t){var e=Math.abs(t);return 864e5<=e?Math.round(t/864e5)+"d":36e5<=e?Math.round(t/36e5)+"h":6e4<=e?Math.round(t/6e4)+"m":1e3<=e?Math.round(t/1e3)+"s":t+"ms"}function a(t){var e=Math.abs(t);return 864e5<=e?r(t,e,864e5,"day"):36e5<=e?r(t,e,36e5,"hour"):6e4<=e?r(t,e,6e4,"minute"):1e3<=e?r(t,e,1e3,"second"):t+" ms"}function r(t,e,r,n){return e=1.5*r<=e,Math.round(t/r)+" "+n+(e?"s":"")}e.exports=function(t,e){e=e||{};var r=typeof t;if("string"==r&&0{function r(e){function t(e){let r=0;for(let t=0;t{var r;return"%%"===t?"%":(i++,"function"==typeof(e=o.formatters[e])&&(r=a[i],t=e.call(n,r),a.splice(i,1),i--),t)}),o.formatArgs.call(n,a),(n.log||o.log).apply(n,a)}}return me(s,"debug"),s.namespace=t,s.useColors=o.useColors(),s.color=o.selectColor(t),s.extend=a,s.destroy=o.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:me(()=>null!==e?e:(n!==o.namespaces&&(n=o.namespaces,i=o.enabled(t)),i),"get"),set:me(t=>{e=t},"set")}),"function"==typeof o.init&&o.init(s),s}function a(t,e){return(e=o(this.namespace+("u""-"+t)].join(",");return o.enable(""),t}function s(t){for(var e of o.skips)if(n(t,e))return!1;for(var r of o.names)if(n(t,r))return!0;return!1}function l(t){return t instanceof Error?t.stack||t.message:t}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=zt(),o.destroy=c,Object.keys(e).forEach(t=>{o[t]=e[t]}),o.names=[],o.skips=[],o.formatters={},me(t,"selectColor"),o.selectColor=t,me(o,"createDebug"),me(a,"extend"),me(r,"enable"),me(n,"matchesTemplate"),me(i,"disable"),me(s,"enabled"),me(l,"coerce"),me(c,"destroy"),o.enable(o.load()),o}me(r,"setup"),e.exports=r}),Ut=rPt((e,r)=>{function t(){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 t;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&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&31<=parseInt(t[1],10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");let e=0,r=0;t[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(e++,"%c"===t)&&(r=e)}),t.splice(r,0,n)}}function i(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}}function a(){let t;try{t=e.storage.getItem("debug")}catch{}return t=!t&&typeof process<"u"&&"env"in process?process.env.DEBUG:t}function s(){try{return localStorage}catch{}}e.formatArgs=n,e.save=i,e.load=a,e.useColors=t,e.storage=s(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})(),e.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"],me(t,"useColors"),me(n,"formatArgs"),e.log=console.debug||console.log||(()=>{}),me(i,"save"),me(a,"load"),me(s,"localstorage"),r.exports=Gt()(e),r.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}),qt=t(()=>{it(),gt(),Ct(),Nt(),$t(),tt(Ut(),1)}),jt=t(()=>{e(),qt(),Rt={body:'?',height:80,width:80},Mt=new Map,Dt=new Map,Ot=me(t=>{for(var e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(M.debug("Registering icon pack:",e.name),"loader"in e)Dt.set(e.name,e.loader);else{if(!("icons"in e))throw M.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Mt.set(e.name,e.icons)}}},"registerIconPacks"),Pt=me(async(t,e)=>{var r=B(t,!0,void 0!==e);if(!r)throw new Error("Invalid icon name: "+t);if(!(e=r.prefix||e))throw new Error("Icon name must contain a prefix: "+t);let n=Mt.get(e);if(!n){var i=Dt.get(e);if(!i)throw new Error("Icon set not found: "+r.prefix);try{n={...await i(),prefix:e},Mt.set(e,n)}catch(t){throw M.error(t),new Error("Failed to load icon set: "+r.prefix)}}if(i=pt(n,r.name))return i;throw new Error("Icon not found: "+t)},"getRegisteredIconData"),Bt=me(async t=>{try{return await Pt(t),!0}catch{return!1}},"isIconAvailable"),Ft=me(async(t,e,r)=>{let n;try{n=await Pt(t,e?.fallbackPrefix)}catch(t){M.error(t),n=Rt}return It(_t((t=Tt(n,e)).body),{...t.attributes,...r})},"getIconSVG")});function Wt(t){for(var e=[],r=1;r{me(jt,"dedent")}),$r=t(()=>{Wt=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Yt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ht=/\s*%%.*\n/gm}),zr=t(()=>{Vt=class extends Error{static{me(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}}),Gr=t(()=>{e(),$r(),zr(),Xt={},Kt=me(function(t,e){t=t.replace(Wt,"").replace(Yt,"").replace(Ht,` -`);for(var[r,{detector:i}]of Object.entries(Xt))if(i(t,e))return r;throw new Vt("No diagram type detected matching given configuration for text: "+t)},"detectType"),Zt=me((...t)=>{for(var{id:e,detector:r,loader:i}of t)Qt(e,r,i)},"registerLazyLoadedDiagrams"),Qt=me((t,e,r)=>{Xt[t]&&M.warn(`Detector with key ${t} already exists. Overwriting.`),Xt[t]={detector:e,loader:r},M.debug(`Detector with key ${t} added`+(r?" with loader":""))},"addDetector"),Jt=me(t=>Xt[t].loader,"getDiagramLoader")}),Ur=t(()=>{function B(){this.yy={}}var t=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),e=[1,24],r=[1,25],F=[1,26],$=[1,27],z=[1,28],i=[1,63],n=[1,64],a=[1,65],s=[1,66],o=[1,67],l=[1,68],h=[1,69],u=[1,29],d=[1,30],p=[1,31],g=[1,32],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],E=[1,42],C=[1,43],_=[1,44],S=[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],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],rt=[12,33],it=[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],e={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 3:i.setDirection("TB");break;case 4:i.setDirection("BT");break;case 5:i.setDirection("RL");break;case 6:i.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:i.setC4Type(a[o-3]);break;case 19:i.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:i.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),i.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),i.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:i.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:i.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:i.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:i.popBoundaryParseStack();break;case 39:i.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:i.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:i.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:i.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:i.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:i.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:i.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:i.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:i.addContainer("container",...a[o]),this.$=a[o];break;case 48:i.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:i.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:i.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:i.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:i.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:i.addComponent("component",...a[o]),this.$=a[o];break;case 54:i.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:i.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:i.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:i.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:i.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:i.addRel("rel",...a[o]),this.$=a[o];break;case 61:i.addRel("birel",...a[o]),this.$=a[o];break;case 62:i.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:i.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:i.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:i.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:i.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),i.addRel("rel",...a[o]),this.$=a[o];break;case 68:i.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:i.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:i.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:var l={};l[a[o-1].trim()]=a[o].trim(),this.$=l;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,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:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,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:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,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:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,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:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,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]},t(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:i,36:n,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,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}),t(Z,[2,14]),t(Q,[2,16],{12:[1,76]}),t(Z,[2,36],{12:[1,77]}),t(J,[2,19]),t(J,[2,20]),{25:[1,78]},{27:[1,79]},t(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},t(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:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,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]},t(Z,[2,15]),t(Q,[2,17],{21:22,19:130,22:e,23:r,24:F,26:$,28:z}),t(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:F,26:$,28:z,34:i,36:n,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,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}),t(J,[2,21]),t(J,[2,22]),t(P,[2,39]),t(tt,[2,71],{75:81,35:132,76:R,77:M,79:D,80:O}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(P,[2,40]),t(P,[2,41]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(P,[2,52]),t(P,[2,53]),t(P,[2,54]),t(P,[2,55]),t(P,[2,56]),t(P,[2,57]),t(P,[2,58]),t(P,[2,60]),t(P,[2,61]),t(P,[2,62]),t(P,[2,63]),t(P,[2,64]),t(P,[2,65]),t(P,[2,66]),t(P,[2,67]),t(P,[2,68]),t(P,[2,69]),t(P,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(rt,[2,28]),t(rt,[2,29]),t(rt,[2,30]),t(rt,[2,31]),t(rt,[2,32]),t(rt,[2,33]),t(rt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Q,[2,18]),t(Z,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(P,[2,24]),t(P,[2,35]),t(it,[2,25]),t(it,[2,26],{12:[1,138]}),t(it,[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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{me(Wt,"dedent")}),zr=t(()=>{Yt=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ht=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Vt=/\s*%%.*\n/gm}),Gr=t(()=>{Xt=class extends Error{static{me(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}}),Ur=t(()=>{e(),zr(),Gr(),Kt={},Zt=me(function(t,e){t=t.replace(Yt,"").replace(Ht,"").replace(Vt,` +`);for(var[r,{detector:n}]of Object.entries(Kt))if(n(t,e))return r;throw new Xt("No diagram type detected matching given configuration for text: "+t)},"detectType"),Qt=me((...t)=>{for(var{id:e,detector:r,loader:n}of t)Jt(e,r,n)},"registerLazyLoadedDiagrams"),Jt=me((t,e,r)=>{Kt[t]&&M.warn(`Detector with key ${t} already exists. Overwriting.`),Kt[t]={detector:e,loader:r},M.debug(`Detector with key ${t} added`+(r?" with loader":""))},"addDetector"),te=me(t=>Kt[t].loader,"getDiagramLoader")}),qr=t(()=>{function B(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,24],r=[1,25],F=[1,26],$=[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],_=[1,44],S=[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],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],rt=[12,33],nt=[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],e={trace:me(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:me(function(t,e,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:e,23:r,24:F,26:$,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:_,60:S,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:e,23:r,24:F,26:$,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:_,60:S,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:e,23:r,24:F,26:$,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:_,60:S,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:e,23:r,24:F,26:$,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:_,60:S,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:e,23:r,24:F,26:$,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:_,60:S,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]},t(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:_,60:S,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}),t(Z,[2,14]),t(Q,[2,16],{12:[1,76]}),t(Z,[2,36],{12:[1,77]}),t(J,[2,19]),t(J,[2,20]),{25:[1,78]},{27:[1,79]},t(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},t(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:_,60:S,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]},t(Z,[2,15]),t(Q,[2,17],{21:22,19:130,22:e,23:r,24:F,26:$,28:z}),t(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:F,26:$,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:_,60:S,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}),t(J,[2,21]),t(J,[2,22]),t(P,[2,39]),t(tt,[2,71],{75:81,35:132,76:R,77:M,79:D,80:O}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(P,[2,40]),t(P,[2,41]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(P,[2,52]),t(P,[2,53]),t(P,[2,54]),t(P,[2,55]),t(P,[2,56]),t(P,[2,57]),t(P,[2,58]),t(P,[2,60]),t(P,[2,61]),t(P,[2,62]),t(P,[2,63]),t(P,[2,64]),t(P,[2,65]),t(P,[2,66]),t(P,[2,67]),t(P,[2,68]),t(P,[2,69]),t(P,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(rt,[2,28]),t(rt,[2,29]),t(rt,[2,30]),t(rt,[2,31]),t(rt,[2,32]),t(rt,[2,33]),t(rt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Q,[2,18]),t(Z,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(P,[2,24]),t(P,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{re=me((e,r,{depth:i=2,clobber:n=!1}={})=>{let a={depth:i,clobber:n};return Array.isArray(r)&&!Array.isArray(e)?(r.forEach(t=>re(e,t,a)),e):Array.isArray(r)&&Array.isArray(e)?(r.forEach(t=>{e.includes(t)||e.push(t)}),e):void 0===e||i<=0?null!=e&&"object"==typeof e&&"object"==typeof r?Object.assign(e,r):r:(void 0!==r&&"object"==typeof e&&"object"==typeof r&&Object.keys(r).forEach(t=>{"object"!=typeof r[t]||void 0!==e[t]&&"object"!=typeof e[t]?(n||"object"!=typeof e[t]&&"object"!=typeof r[t])&&(e[t]=r[t]):(void 0===e[t]&&(e[t]=Array.isArray(r[t])?[]:{}),e[t]=re(e[t],r[t],{depth:i-1,clobber:n}))}),e)},"assignWithDepth"),ie=re}),jr=t(()=>{ne={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:me(t=>255<=t?255:t<0?0:t,"r"),g:me(t=>255<=t?255:t<0?0:t,"g"),b:me(t=>255<=t?255:t<0?0:t,"b"),h:me(t=>t%360,"h"),s:me(t=>100<=t?100:t<0?0:t,"s"),l:me(t=>100<=t?100:t<0?0:t,"l"),a:me(t=>1<=t?1:t<0?0:t,"a")},toLinear:me(t=>{var e=t/255;return.03928(r<0&&(r+=1),1{if(!e)return 2.55*r;t/=360,e/=100;var n=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-n;switch(i){case"r":return 255*ne.hue2rgb(a,n,t+.3333333333333333);case"g":return 255*ne.hue2rgb(a,n,t);case"b":return 255*ne.hue2rgb(a,n,t-.3333333333333333)}},"hsl2rgb"),rgb2hsl:me(({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;var n=Math.max(t,e,r),a=Math.min(t,e,r),s=(n+a)/2;if("l"===i)return 100*s;if(n===a)return 0;var o=n-a;if("s"===i)return 100*(.5{se={clamp:me((t,e,r)=>rMath.round(1e10*t)/1e10,"round")},oe=se}),Yr=t(()=>{le={dec2hex:me(t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t,"dec2hex")},ce=le}),Hr=t(()=>{jr(),Wr(),Yr(),he={channel:ae,lang:oe,unit:ce}}),Vr=t(()=>{Hr(),ue={};for(let t=0;t<=255;t++)ue[t]=he.unit.dec2hex(t);de={ALL:0,RGB:1,HSL:2}}),Xr=t(()=>{Vr(),pe=class{static{me(this,"Type")}constructor(){this.type=de.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=de.ALL}is(t){return this.type===t}},ge=pe}),Kr=t(()=>{Hr(),Xr(),Vr(),fe=class{static{me(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new ge}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=de.ALL,this}_ensureHSL(){var t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=he.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=he.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=he.channel.rgb2hsl(t,"l"))}_ensureRGB(){var t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=he.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=he.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=he.channel.hsl2rgb(t,"b"))}get r(){var t=this.data,e=t.r;return this.type.is(de.HSL)||void 0===e?(this._ensureHSL(),he.channel.hsl2rgb(t,"r")):e}get g(){var t=this.data,e=t.g;return this.type.is(de.HSL)||void 0===e?(this._ensureHSL(),he.channel.hsl2rgb(t,"g")):e}get b(){var t=this.data,e=t.b;return this.type.is(de.HSL)||void 0===e?(this._ensureHSL(),he.channel.hsl2rgb(t,"b")):e}get h(){var t=this.data,e=t.h;return this.type.is(de.RGB)||void 0===e?(this._ensureRGB(),he.channel.rgb2hsl(t,"h")):e}get s(){var t=this.data,e=t.s;return this.type.is(de.RGB)||void 0===e?(this._ensureRGB(),he.channel.rgb2hsl(t,"s")):e}get l(){var t=this.data,e=t.l;return this.type.is(de.RGB)||void 0===e?(this._ensureRGB(),he.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(de.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(de.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(de.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(de.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(de.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(de.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},ve=fe}),Zr=t(()=>{Kr(),xe=new ve({r:0,g:0,b:0,a:0},"transparent"),be=xe}),Qr=t(()=>{Zr(),Vr(),we={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:me(t=>{if(35===t.charCodeAt(0)){var e,r,i,n,a,s=t.match(we.re);if(s)return s=s[1],e=parseInt(s,16),s=s.length,be.set({r:(e>>(i=(r=4>i*(2+n)&a)*r,b:(e>>i*(1+n)&a)*r,a:s?(e&a)*r/255:1},t)}},"parse"),stringify:me(t=>{var{r:t,g:e,b:r,a:i}=t;return i<1?"#"+ue[Math.round(t)]+ue[Math.round(e)]+ue[Math.round(r)]+ue[Math.round(255*i)]:"#"+ue[Math.round(t)]+ue[Math.round(e)]+ue[Math.round(r)]},"stringify")},ke=we}),Jr=t(()=>{Hr(),Zr(),Te={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:me(t=>{if(r=t.match(Te.hueRe)){var[,e,r]=r;switch(r){case"grad":return he.channel.clamp.h(.9*parseFloat(e));case"rad":return he.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return he.channel.clamp.h(360*parseFloat(e))}}return he.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:me(t=>{var e,r,i,n,a=t.charCodeAt(0);if((104===a||72===a)&&(a=t.match(Te.re)))return[,a,e,r,i,n]=a,be.set({h:Te._hue2deg(a),s:he.channel.clamp.s(parseFloat(e)),l:he.channel.clamp.l(parseFloat(r)),a:i?he.channel.clamp.a(n?parseFloat(i)/100:parseFloat(i)):1},t)},"parse"),stringify:me(t=>{var{h:t,s:e,l:r,a:i}=t;return i<1?`hsla(${he.lang.round(t)}, ${he.lang.round(e)}%, ${he.lang.round(r)}%, ${i})`:`hsl(${he.lang.round(t)}, ${he.lang.round(e)}%, ${he.lang.round(r)}%)`},"stringify")},Ee=Te}),ti=t(()=>{Qr(),Ce={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:me(t=>{if(t=t.toLowerCase(),t=Ce.colors[t])return ke.parse(t)},"parse"),stringify:me(t=>{var e,r=ke.stringify(t);for(e in Ce.colors)if(Ce.colors[e]===r)return e},"stringify")},_e=Ce}),ei=t(()=>{Hr(),Zr(),Se={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:me(t=>{var e,r,i,n,a,s,o,l=t.charCodeAt(0);if((114===l||82===l)&&(l=t.match(Se.re)))return[,l,e,r,i,n,a,s,o]=l,be.set({r:he.channel.clamp.r(e?2.55*parseFloat(l):parseFloat(l)),g:he.channel.clamp.g(i?2.55*parseFloat(r):parseFloat(r)),b:he.channel.clamp.b(a?2.55*parseFloat(n):parseFloat(n)),a:s?he.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:me(t=>{var{r:t,g:e,b:r,a:i}=t;return i<1?`rgba(${he.lang.round(t)}, ${he.lang.round(e)}, ${he.lang.round(r)}, ${he.lang.round(i)})`:`rgb(${he.lang.round(t)}, ${he.lang.round(e)}, ${he.lang.round(r)})`},"stringify")},Ae=Se}),ri=t(()=>{Qr(),Jr(),ti(),ei(),Vr(),Le={format:{keyword:_e,hex:ke,rgb:Ae,rgba:Ae,hsl:Ee,hsla:Ee},parse:me(t=>{if("string"!=typeof t)return t;var e=ke.parse(t)||Ae.parse(t)||Ee.parse(t)||_e.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:me(t=>!t.changed&&t.color?t.color:(t.type.is(de.HSL)||void 0===t.data.r?Ee:t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Ae:ke).stringify(t),"stringify")},Ne=Le}),ii=t(()=>{Hr(),ri(),Ie=me((t,e)=>{var r,i=Ne.parse(t);for(r in e)i[r]=he.channel.clamp[r](e[r]);return Ne.stringify(i)},"change"),Re=Ie}),ni=t(()=>{Hr(),Zr(),ri(),ii(),Me=me((t,e,r=0,i=1)=>"number"!=typeof t?Re(t,{a:e}):(t=be.set({r:he.channel.clamp.r(t),g:he.channel.clamp.g(e),b:he.channel.clamp.b(r),a:he.channel.clamp.a(i)}),Ne.stringify(t)),"rgba"),De=Me}),ai=t(()=>{Hr(),ri(),Oe=me((t,e)=>he.lang.round(Ne.parse(t)[e]),"channel"),Pe=Oe}),si=t(()=>{Hr(),ri(),Be=me(t=>{var{r:t,g:e,b:r}=Ne.parse(t),t=.2126*he.channel.toLinear(t)+.7152*he.channel.toLinear(e)+.0722*he.channel.toLinear(r);return he.lang.round(t)},"luminance"),Fe=Be}),oi=t(()=>{si(),$e=me(t=>.5<=Fe(t),"isLight"),ze=$e}),li=t(()=>{oi(),Ge=me(t=>!ze(t),"isDark"),Ue=Ge}),ci=t(()=>{Hr(),ri(),qe=me((t,e,r)=>{var i=(t=Ne.parse(t))[e];return i!==(r=he.channel.clamp[e](i+r))&&(t[e]=r),Ne.stringify(t)},"adjustChannel"),je=qe}),hi=t(()=>{ci(),We=me((t,e)=>je(t,"l",e),"lighten"),a=We}),ui=t(()=>{ci(),Ye=me((t,e)=>je(t,"l",-e),"darken"),He=Ye}),di=t(()=>{ri(),ii(),Ve=me((t,e)=>{var r,i=Ne.parse(t),n={};for(r in e)e[r]&&(n[r]=i[r]+e[r]);return Re(t,n)},"adjust"),r=Ve}),pi=t(()=>{ri(),ni(),Xe=me((t,e,r=50)=>{var{r:t,g:i,b:n,a}=Ne.parse(t),{r:e,g:s,b:o,a:l}=Ne.parse(e),c=2*(r/=100)-1,h=a-l;return De(t*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+e*(h=1-c),i*c+s*h,n*c+o*h,a*r+l*(1-r))},"mix"),Ke=Xe}),gi=t(()=>{ri(),pi(),Ze=me((t,e=100)=>{var r=Ne.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ke(r,t,e)},"invert"),i=Ze}),fi=t(()=>{ni(),ai(),li(),hi(),ui(),di(),gi()}),mi=t(()=>{fi()}),yi=t(()=>{Qe="#ffffff",Je="#f2f2f2"}),vi=t(()=>{mi(),tr=me((t,e)=>r(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),xi=t(()=>{mi(),yi(),vi(),er=class{static{me(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||i(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||i(this.tertiaryColor),this.lineColor=this.lineColor||i(this.background),this.arrowheadColor=this.arrowheadColor||i(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?He(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||He(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||i(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.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||He(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||He(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 t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},rr=me(t=>{var e=new er;return e.calculate(t),e},"getThemeVariables")}),bi=t(()=>{mi(),vi(),ir=class{static{me(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=a(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=i(this.background),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=i(this.primaryColor),this.secondaryTextColor=i(this.secondaryColor),this.tertiaryTextColor=i(this.tertiaryColor),this.lineColor=i(this.background),this.textColor=i(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=a(i("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=De(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=He("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=He(this.sectionBkgColor,10),this.taskBorderColor=De(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=De(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.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||He(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 t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},nr=me(t=>{var e=new ir;return e.calculate(t),e},"getThemeVariables")}),wi=t(()=>{mi(),vi(),yi(),ar=class{static{me(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=i(this.primaryColor),this.secondaryTextColor=i(this.secondaryColor),this.tertiaryTextColor=i(this.tertiaryColor),this.lineColor=i(this.background),this.textColor=i(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.sectionBkgColor=De(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.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||He(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||He(this.tertiaryColor,40);for(let t=0;t{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},sr=me(t=>{var e=new ar;return e.calculate(t),e},"getThemeVariables")}),ki=t(()=>{mi(),yi(),vi(),or=class{static{me(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=i(this.primaryColor),this.secondaryTextColor=i(this.secondaryColor),this.tertiaryTextColor=i(this.primaryColor),this.lineColor=i(this.background),this.textColor=i(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.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=He(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||He(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||He(this.tertiaryColor,40);for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},lr=me(t=>{var e=new or;return e.calculate(t),e},"getThemeVariables")}),Ti=t(()=>{mi(),vi(),yi(),cr=class{static{me(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=i(this.primaryColor),this.secondaryTextColor=i(this.secondaryColor),this.tertiaryTextColor=i(this.tertiaryColor),this.lineColor=i(this.background),this.textColor=i(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.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 t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},hr=me(t=>{var e=new cr;return e.calculate(t),e},"getThemeVariables")}),Ei=t(()=>{xi(),bi(),wi(),ki(),Ti(),ur={base:{getThemeVariables:rr},dark:{getThemeVariables:nr},default:{getThemeVariables:sr},forest:{getThemeVariables:lr},neutral:{getThemeVariables:hr}}}),Ci=t(()=>{dr={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},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,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"]},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,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}}),_i=t(()=>{Ei(),Ci(),pr={...dr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:ur.default.getThemeVariables(),sequence:{...dr.sequence,messageFont:me(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:me(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:me(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...dr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...dr.c4,useWidth:void 0,personFont:me(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:me(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:me(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:me(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:me(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:me(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:me(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:me(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:me(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:me(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:me(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:me(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:me(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:me(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:me(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:me(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:me(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:me(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:me(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:me(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:me(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:me(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...dr.pie,useWidth:984},xyChart:{...dr.xyChart,useWidth:void 0},requirement:{...dr.requirement,useWidth:void 0},packet:{...dr.packet},radar:{...dr.radar}},gr=me((r,i="")=>Object.keys(r).reduce((t,e)=>Array.isArray(r[e])?t:"object"==typeof r[e]&&null!==r[e]?[...t,i+e,...gr(r[e],"")]:[...t,i+e],[]),"keyify"),fr=new Set(gr(pr,"")),mr=pr}),Si=t(()=>{_i(),e(),yr=me(t=>{if(M.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>yr(t));else{for(var e of Object.keys(t)){var r;if(M.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!fr.has(e)||null==t[e])M.debug("sanitize deleting key: ",e),delete t[e];else if("object"==typeof t[e])M.debug("sanitizing object",e),yr(t[e]);else for(r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(M.debug("sanitizing css option",e),t[e]=vr(t[e]))}if(t.themeVariables)for(var i of Object.keys(t.themeVariables)){var n=t.themeVariables[i];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[i]="")}M.debug("After sanitization",t)}},"sanitizeDirective"),vr=me(t=>{let e=0,r=0;for(var i of t){if(e{qr(),e(),Ei(),_i(),Si(),xr=Object.freeze(mr),br=ie({},xr),kr=[],Tr=ie({},xr),Er=me((t,e)=>{let r=ie({},t),i={};for(var n of e)Ir(n),i=ie(i,n);return r=ie(r,i),i.theme&&i.theme in ur&&(t=ie({},wr),e=ie(t.themeVariables||{},i.themeVariables),r.theme)&&r.theme in ur&&(r.themeVariables=ur[r.theme].getThemeVariables(e)),Br(Tr=r),Tr},"updateCurrentConfig"),Cr=me(t=>(br=ie({},xr),br=ie(br,t),t.theme&&ur[t.theme]&&(br.themeVariables=ur[t.theme].getThemeVariables(t.themeVariables)),Er(br,kr),br),"setSiteConfig"),_r=me(t=>{wr=ie({},t)},"saveConfigFromInitialize"),Sr=me(t=>(br=ie(br,t),Er(br,kr),br),"updateSiteConfig"),Ar=me(()=>ie({},br),"getSiteConfig"),Lr=me(t=>(Br(t),ie(Tr,t),Nr()),"setConfig"),Nr=me(()=>ie({},Tr),"getConfig"),Ir=me(e=>{e&&(["secure",...br.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(M.debug("Denied attempt to modify a secure key "+t,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{"string"==typeof e[t]&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],"object"==typeof e[t]&&Ir(e[t])}))},"sanitize"),Rr=me(t=>{yr(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),kr.push(t),Er(br,kr)},"addDirective"),Mr=me((t=br)=>{Er(t,kr=[])},"reset"),Dr={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Or={},Pr=me(t=>{Or[t]||(M.warn(Dr[t]),Or[t]=!0)},"issueWarning"),Br=me(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Pr("LAZY_LOAD_DEPRECATED")},"checkConfig")});function Li(n){return function(t){for(var e=arguments.length,r=new Array(1Oi(t),"DOMPurify");if(u.version="3.2.4",u.removed=[],!t||!t.document||t.document.nodeType!==An.document||!t.Element)return u.isSupported=!1,u;let n=t.document,c=n,O=c.currentScript,{DocumentFragment:P,HTMLTemplateElement:B,Node:F,Element:$,NodeFilter:e,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:G,DOMParser:U,trustedTypes:d}=t,r=$.prototype,q=Di(r,"cloneNode"),j=Di(r,"remove"),W=Di(r,"nextSibling"),Y=Di(r,"childNodes"),s=Di(r,"parentNode");var H;"function"==typeof B&&(H=n.createElement("template")).content&&H.content.ownerDocument&&(n=H.content.ownerDocument);let p,h="",{implementation:V,createNodeIterator:X,createDocumentFragment:K,getElementsByTagName:Z}=n,Q=c.importNode,g=In(),{MUSTACHE_EXPR:J,ERB_EXPR:tt,TMPLIT_EXPR:et,DATA_ATTR:rt,ARIA_ATTR:it,IS_SCRIPT_OR_DATA:nt,ATTR_WHITESPACE:at,CUSTOM_ELEMENT:st}=(u.isSupported="function"==typeof Pi&&"function"==typeof s&&V&&void 0!==V.createHTMLDocument,Sn),ot=Sn.IS_ALLOWED_URI,f=null,lt=Ii({},[...sn,...on,...ln,...hn,...dn]),m=null,ct=Ii({},[...pn,...gn,...fn,...mn]),o=Object.seal(Ui(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,ht=null,ut=!0,dt=!0,pt=!1,gt=!0,v=!1,ft=!0,x=!1,mt=!1,yt=!1,b=!1,w=!1,k=!1,vt=!0,xt=!1,bt=!0,T=!1,i,l=null,wt=Ii({},["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"]),kt=null,Tt=Ii({},["audio","video","img","source","image","track"]),Et=null,Ct=Ii({},["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",_=C,_t=!1,St=null,At=Ii({},[a,E,C],Zi),S=Ii({},["mi","mo","mn","ms","mtext"]),A=Ii({},["annotation-xml"]),Lt=Ii({},["title","style","font","a","script"]),L=null,Nt=["application/xhtml+xml","text/html"],N=null,I=null,It=n.createElement("form"),Rt=me(function(t){return t instanceof RegExp||t instanceof Function},"isRegexOrFunction"),Mt=me(function(){var t=0"+t:(i=Qi(t,/^[\r\n\t ]+/),r=i&&i[0]),"application/xhtml+xml"===L&&_===C&&(t=''+t+"");var i=p?p.createHTML(t):t;if(_===C)try{e=(new U).parseFromString(i,L)}catch{}if(!e||!e.documentElement){e=V.createDocument(_,"template",null);try{e.documentElement.innerHTML=_t?h:i}catch{}}return i=e.body||e.documentElement,t&&r&&i.insertBefore(n.createTextNode(r),i.childNodes[0]||null),_===C?Z.call(e,x?"html":"body")[0]:x?e.documentElement:i},"_initDocument"),Ft=me(function(t){return X.call(t.ownerDocument||t,t,e.SHOW_ELEMENT|e.SHOW_COMMENT|e.SHOW_TEXT|e.SHOW_PROCESSING_INSTRUCTION|e.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),$t=me(function(t){return t instanceof G&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof z)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},"_isClobbered"),zt=me(function(t){return"function"==typeof F&&t instanceof F},"_isNode");function D(t,e,r){Wi(t,t=>{t.call(u,e,r,I)})}me(D,"_executeHooks");let Gt=me(function(e){let r=null;if(D(g.beforeSanitizeElements,e,null),!$t(e)){var t=N(e.nodeName);if(D(g.uponSanitizeElement,e,{tagName:t,allowedTags:f}),!(e.hasChildNodes()&&!zt(e.firstElementChild)&&nn(/<[/\w]/g,e.innerHTML)&&nn(/<[/\w]/g,e.textContent)||e.nodeType===An.progressingInstruction||ft&&e.nodeType===An.comment&&nn(/<[/\w]/g,e.data))){if(f[t]&&!y[t])return e instanceof $&&!Pt(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&nn(/<\/no(script|embed|frames)/i,e.innerHTML)?(R(e),!0):(v&&e.nodeType===An.text&&(r=e.textContent,Wi([J,tt,et],t=>{r=Ji(r,t," ")}),e.textContent!==r)&&(Vi(u.removed,{element:e.cloneNode()}),e.textContent=r),D(g.afterSanitizeElements,e,null),!1);if(!y[t]&&qt(t)&&(o.tagNameCheck instanceof RegExp&&nn(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t)))return!1;if(bt&&!l[t]){var i=s(e)||e.parentNode,n=Y(e)||e.childNodes;if(n&&i)for(let t=n.length-1;0<=t;--t){var a=q(n[t],!0);a.__removalCount=(e.__removalCount||0)+1,i.insertBefore(a,W(e))}}}}return R(e),!0},"_sanitizeElements"),Ut=me(function(t,e,r){if(vt&&("id"===e||"name"===e)&&(r in n||r in It))return!1;if((!dt||ht[e]||!nn(rt,e))&&(!ut||!nn(it,e)))if(!m[e]||ht[e]){if(!(qt(t)&&(o.tagNameCheck instanceof RegExp&&nn(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t))&&(o.attributeNameCheck instanceof RegExp&&nn(o.attributeNameCheck,e)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(e))||"is"===e&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&nn(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Et[e]&&!nn(ot,Ji(r,at,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==tn(r,"data:")||!kt[t])&&(!pt||nn(nt,Ji(r,at,"")))&&r)return!1;return!0},"_isValidAttribute"),qt=me(function(t){return"annotation-xml"!==t&&Qi(t,st)},"_isBasicCustomElement"),jt=me(function(l){D(g.beforeSanitizeAttributes,l,null);var c=l.attributes;if(c&&!$t(l)){let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},o=c.length;for(;o--;){let t=c[o],{name:e,namespaceURI:r,value:i}=t,n=N(e),a="value"===e?i:en(i);if(s.attrName=n,s.attrValue=a,s.keepAttr=!0,s.forceKeepAttr=void 0,D(g.uponSanitizeAttribute,l,s),a=s.attrValue,!xt||"id"!==n&&"name"!==n||(M(e,l),a="user-content-"+a),ft&&nn(/((--!?|])>)|<\/(style|title)/i,a))M(e,l);else if(!s.forceKeepAttr&&(M(e,l),s.keepAttr))if(!gt&&nn(/\/>/i,a))M(e,l);else{v&&Wi([J,tt,et],t=>{a=Ji(a,t," ")});var h=N(l.nodeName);if(Ut(h,n,a)){if(p&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(h,n)){case"TrustedHTML":a=p.createHTML(a);break;case"TrustedScriptURL":a=p.createScriptURL(a)}try{r?l.setAttributeNS(r,e,a):l.setAttribute(e,a),$t(l)?R(l):Hi(u.removed)}catch{}}}}D(g.afterSanitizeAttributes,l,null)}},"_sanitizeAttributes"),Wt=me(function t(e){var r,i=Ft(e);for(D(g.beforeSanitizeShadowDOM,e,null);r=i.nextNode();)D(g.uponSanitizeShadowNode,r,null),Gt(r),jt(r),r.content instanceof P&&t(r.content);D(g.afterSanitizeShadowDOM,e,null)},"_sanitizeShadowDOM");return u.sanitize=function(t){let e=1 -`+l),v&&Wi([J,tt,et],t=>{l=Ji(l,t," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var t=0{({entries:Pi,setPrototypeOf:Bi,isFrozen:Fi,getPrototypeOf:$i,getOwnPropertyDescriptor:zi}=Object),{freeze:Gi,seal:_n,create:Ui}=Object,{apply:qi,construct:ji}=typeof Reflect<"u"&&Reflect,Gi=Gi||me(function(t){return t},"freeze"),_n=_n||me(function(t){return t},"seal"),qi=qi||me(function(t,e,r){return t.apply(e,r)},"apply"),ji=ji||me(function(t,e){return new t(...e)},"construct"),Wi=Li(Array.prototype.forEach),Yi=Li(Array.prototype.lastIndexOf),Hi=Li(Array.prototype.pop),Vi=Li(Array.prototype.push),Xi=Li(Array.prototype.splice),Ki=Li(String.prototype.toLowerCase),Zi=Li(String.prototype.toString),Qi=Li(String.prototype.match),Ji=Li(String.prototype.replace),tn=Li(String.prototype.indexOf),en=Li(String.prototype.trim),rn=Li(Object.prototype.hasOwnProperty),nn=Li(RegExp.prototype.test),an=Ni(TypeError),me(Li,"unapply"),me(Ni,"unconstruct"),me(Ii,"addToSet"),me(Ri,"cleanArray"),me(Mi,"clone"),me(Di,"lookupGetter"),sn=Gi(["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"]),on=Gi(["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"]),ln=Gi(["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"]),cn=Gi(["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"]),hn=Gi(["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"]),un=Gi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dn=Gi(["#text"]),pn=Gi(["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"]),gn=Gi(["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"]),fn=Gi(["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"]),mn=Gi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yn=_n(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vn=_n(/<%[\w\W]*|[\w\W]*%>/gm),xn=_n(/\$\{[\w\W]*/gm),bn=_n(/^data-[\-\w.\u00B7-\uFFFF]+$/),wn=_n(/^aria-[\-\w]+$/),kn=_n(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tn=_n(/^(?:\w+script|data):/i),En=_n(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Cn=_n(/^html$/i),_n=_n(/^[a-z][.\w]*(-[.\w]+)+$/i),Sn=Object.freeze({__proto__:null,ARIA_ATTR:wn,ATTR_WHITESPACE:En,CUSTOM_ELEMENT:_n,DATA_ATTR:bn,DOCTYPE_NAME:Cn,ERB_EXPR:vn,IS_ALLOWED_URI:kn,IS_SCRIPT_OR_DATA:Tn,MUSTACHE_EXPR:yn,TMPLIT_EXPR:xn}),An={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ln=me(function(){return"u"pa[t])}function Pn(t){if(t.default)return t.default;if(t=t.type,"string"!=typeof(t=Array.isArray(t)?t[0]:t))return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function Bn(t){for(var e=0;e=n[0]&&t<=n[1])return r.name}return null}function Fn(t){for(var e=0;e but got "+String(t)+".")}function o(t,e,r,i,n,a){gs[t][n]={font:e,group:r,replace:i},a&&i&&(gs[t][i]=gs[t][n])}function l(t){for(var{type:t,names:e,props:r,handler:i,htmlBuilder:n,mathmlBuilder:a}=t,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},o=0;oAV".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{for(var r in e)z(t,r,{get:e[r],enumerable:!0})})(Dn,{default:()=>vc});var ha,ua,X,da,pa,ga,fa,ma,ya,va,xa,ba,wa,ka,Ta,Ea,Ca,_a,Sa,Aa,La,Na,Ia,Ra,Ma,Da,Oa,Pa,Ba,Fa,$a,za,Ga,Ua,qa,ja,Wa,Ya,Ha,Va,Xa,Ka,Za,Qa,Ja,K,ts,es,rs,is,ns,as,ss,os,ls,cs,hs,us,ds,ps,gs,u,d,p,fs,g,ms,ys,vs,xs,bs,ws,ks,Ts,Es,Cs,_s,Ss,As,Ls,Ns,Is,Rs,Ms,Ds,Os,Ps,Bs,Fs,$s,zs,Gs,Us,qs,js,Ws,Ys,Hs,Vs,Z,Xs,Ks,Zs,Qs,Js,to,eo,ro,io,no,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,E,yo,vo,xo,bo,wo,ko,To,Eo,Co,_o,So,Ao,Lo,No,Io,Ro,Mo,Do,Oo,Po,Bo,Fo,$o,zo,Go,Uo,qo,jo,Wo,Yo,Ho,Vo,Xo,Ko,Zo,Qo,Jo,tl,el,rl,il,nl,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,vl,xl,bl,wl,kl,Tl,El,Cl,_l,Sl,Al,Ll,Nl,Il,Rl,Ml,Dl,Ol,Pl,Bl,Fl,$l,zl,Gl,Ul,ql,jl,Wl,Yl,Hl,Vl,Xl,f,Kl,Zl,Ql,Jl,tc,ec,rc,ic,nc,ac,sc,oc,lc,cc,hc,uc,dc,pc,m,gc,fc,mc,yc,y,vc,xc=t(()=>{for(ha=class r{static{me(this,"SourceLocation")}constructor(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}static range(t,e){return e?t&&t.loc&&e.loc&&t.loc.lexer===e.loc.lexer?new r(t.loc.lexer,t.loc.start,e.loc.end):null:t&&t.loc}},ua=class i{static{me(this,"Token")}constructor(t,e){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=e}range(t,e){return new i(e,ha.range(this,t))}},(X=class s{static{me(this,"ParseError")}constructor(t,e){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,i,n,a="KaTeX parse error: "+t;return(e=e&&e.loc)&&e.start<=e.end&&(r=e.lexer.input,i=e.start,n=e.end,i===r.length?a+=" at end of input: ":a+=" at position "+(i+1)+": ",e=r.slice(i,n).replace(/[^]/g,"$&̲"),a+=(15":">","<":"<",'"':""","'":"'"},ga=/[&><"']/g,me(On,"escape"),fa=me(function t(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?t(e.body[0]):e:"font"===e.type?t(e.body):e},"getBaseElem"),m=me(function(t){return"mathord"===(t=fa(t)).type||"textord"===t.type||"atom"===t.type},"isCharacterBox"),ma=me(function(t){if(t)return t;throw new Error("Expected non-null, but got "+String(t))},"assert"),Il=me(function(t){return(t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t))?":"===t[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"},"protocolFromUrl"),ya={contains:Bl,deflt:y,escape:On,hyphenate:ac,getBaseElem:fa,isCharacterBox:m,protocolFromUrl:Il},va={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:me(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:me((t,e)=>(e.push(t),e),"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:me(t=>Math.max(0,t),"processor"),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:me(t=>Math.max(0,t),"processor"),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:me(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand ",cliProcessor:me(t=>"Infinity"===t?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},me(Pn,"getDefaultValue"),xa=class{static{me(this,"Settings")}constructor(t){for(var e 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,t=t||{},va){var r;va.hasOwnProperty(e)&&(r=va[e],this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:Pn(r))}}reportNonstrict(t,e,r){var i=this.strict;if((i="function"==typeof i?i(t,e,r):i)&&"ignore"!==i){if(!0===i||"error"===i)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===i?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,r){var i=this.strict;if("function"==typeof i)try{i=i(t,e,r)}catch{i="error"}return!(!i||"ignore"===i||!0!==i&&"error"!==i&&("warn"===i?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+e+" ["+t+"]"),1))}isTrusted(t){if(t.url&&!t.protocol){var e=ya.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}return!!("function"==typeof this.trust?this.trust(t):this.trust)}},Bl=class{static{me(this,"Style")}constructor(t,e,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=r}sup(){return ba[wa[this.id]]}sub(){return ba[ka[this.id]]}fracNum(){return ba[Ta[this.id]]}fracDen(){return ba[Ea[this.id]]}cramp(){return ba[Ca[this.id]]}text(){return ba[_a[this.id]]}isTight(){return 2<=this.size}},ba=[new Bl(0,0,!1),new Bl(1,0,!0),new Bl(2,1,!1),new Bl(3,1,!0),new Bl(4,2,!1),new Bl(5,2,!0),new Bl(6,3,!1),new Bl(7,3,!0)],wa=[4,5,4,5,6,7,6,7],ka=[5,5,5,5,7,7,7,7],Ta=[2,3,4,5,6,7,6,7],Ea=[3,3,5,5,7,7,7,7],Ca=[1,1,3,3,5,5,7,7],_a=[0,1,2,3,2,3,2,3],Sa={DISPLAY:ba[0],TEXT:ba[2],SCRIPT:ba[4],SCRIPTSCRIPT:ba[6]},Aa=[{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]]}],me(Bn,"scriptFromCodepoint"),La=[],Aa.forEach(t=>t.blocks.forEach(t=>La.push(...t))),me(Fn,"supportedCodepoint"),Na=me(function(t,e){return"M95,"+(622+t+e)+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{ne=me((e,r,{depth:n=2,clobber:i=!1}={})=>{let a={depth:n,clobber:i};return Array.isArray(r)&&!Array.isArray(e)?(r.forEach(t=>ne(e,t,a)),e):Array.isArray(r)&&Array.isArray(e)?(r.forEach(t=>{e.includes(t)||e.push(t)}),e):void 0===e||n<=0?null!=e&&"object"==typeof e&&"object"==typeof r?Object.assign(e,r):r:(void 0!==r&&"object"==typeof e&&"object"==typeof r&&Object.keys(r).forEach(t=>{"object"!=typeof r[t]||void 0!==e[t]&&"object"!=typeof e[t]?(i||"object"!=typeof e[t]&&"object"!=typeof r[t])&&(e[t]=r[t]):(void 0===e[t]&&(e[t]=Array.isArray(r[t])?[]:{}),e[t]=ne(e[t],r[t],{depth:n-1,clobber:i}))}),e)},"assignWithDepth"),ie=ne}),Wr=t(()=>{ae={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:me(t=>255<=t?255:t<0?0:t,"r"),g:me(t=>255<=t?255:t<0?0:t,"g"),b:me(t=>255<=t?255:t<0?0:t,"b"),h:me(t=>t%360,"h"),s:me(t=>100<=t?100:t<0?0:t,"s"),l:me(t=>100<=t?100:t<0?0:t,"l"),a:me(t=>1<=t?1:t<0?0:t,"a")},toLinear:me(t=>{var e=t/255;return.03928(r<0&&(r+=1),1{if(!e)return 2.55*r;t/=360,e/=100;var i=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return 255*ae.hue2rgb(a,i,t+.3333333333333333);case"g":return 255*ae.hue2rgb(a,i,t);case"b":return 255*ae.hue2rgb(a,i,t-.3333333333333333)}},"hsl2rgb"),rgb2hsl:me(({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;var i=Math.max(t,e,r),a=Math.min(t,e,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{oe={clamp:me((t,e,r)=>rMath.round(1e10*t)/1e10,"round")},le=oe}),Hr=t(()=>{ce={dec2hex:me(t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t,"dec2hex")},he=ce}),Vr=t(()=>{Wr(),Yr(),Hr(),ue={channel:se,lang:le,unit:he}}),Xr=t(()=>{Vr(),de={};for(let t=0;t<=255;t++)de[t]=ue.unit.dec2hex(t);pe={ALL:0,RGB:1,HSL:2}}),Kr=t(()=>{Xr(),ge=class{static{me(this,"Type")}constructor(){this.type=pe.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=pe.ALL}is(t){return this.type===t}},fe=ge}),Zr=t(()=>{Vr(),Kr(),Xr(),ve=class{static{me(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new fe}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=pe.ALL,this}_ensureHSL(){var t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=ue.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=ue.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=ue.channel.rgb2hsl(t,"l"))}_ensureRGB(){var t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=ue.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=ue.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=ue.channel.hsl2rgb(t,"b"))}get r(){var t=this.data,e=t.r;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"r")):e}get g(){var t=this.data,e=t.g;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"g")):e}get b(){var t=this.data,e=t.b;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"b")):e}get h(){var t=this.data,e=t.h;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"h")):e}get s(){var t=this.data,e=t.s;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"s")):e}get l(){var t=this.data,e=t.l;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(pe.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(pe.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(pe.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(pe.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(pe.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(pe.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},xe=ve}),Qr=t(()=>{Zr(),be=new xe({r:0,g:0,b:0,a:0},"transparent"),we=be}),Jr=t(()=>{Qr(),Xr(),ke={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:me(t=>{if(35===t.charCodeAt(0)){var e,r,n,i,a,s=t.match(ke.re);if(s)return s=s[1],e=parseInt(s,16),s=s.length,we.set({r:(e>>(n=(r=4>n*(2+i)&a)*r,b:(e>>n*(1+i)&a)*r,a:s?(e&a)*r/255:1},t)}},"parse"),stringify:me(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?"#"+de[Math.round(t)]+de[Math.round(e)]+de[Math.round(r)]+de[Math.round(255*n)]:"#"+de[Math.round(t)]+de[Math.round(e)]+de[Math.round(r)]},"stringify")},Te=ke}),tn=t(()=>{Vr(),Qr(),Ee={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:me(t=>{if(r=t.match(Ee.hueRe)){var[,e,r]=r;switch(r){case"grad":return ue.channel.clamp.h(.9*parseFloat(e));case"rad":return ue.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return ue.channel.clamp.h(360*parseFloat(e))}}return ue.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:me(t=>{var e,r,n,i,a=t.charCodeAt(0);if((104===a||72===a)&&(a=t.match(Ee.re)))return[,a,e,r,n,i]=a,we.set({h:Ee._hue2deg(a),s:ue.channel.clamp.s(parseFloat(e)),l:ue.channel.clamp.l(parseFloat(r)),a:n?ue.channel.clamp.a(i?parseFloat(n)/100:parseFloat(n)):1},t)},"parse"),stringify:me(t=>{var{h:t,s:e,l:r,a:n}=t;return n<1?`hsla(${ue.lang.round(t)}, ${ue.lang.round(e)}%, ${ue.lang.round(r)}%, ${n})`:`hsl(${ue.lang.round(t)}, ${ue.lang.round(e)}%, ${ue.lang.round(r)}%)`},"stringify")},Ce=Ee}),en=t(()=>{Jr(),_e={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:me(t=>{if(t=t.toLowerCase(),t=_e.colors[t])return Te.parse(t)},"parse"),stringify:me(t=>{var e,r=Te.stringify(t);for(e in _e.colors)if(_e.colors[e]===r)return e},"stringify")},Se=_e}),rn=t(()=>{Vr(),Qr(),Ae={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:me(t=>{var e,r,n,i,a,s,o,l=t.charCodeAt(0);if((114===l||82===l)&&(l=t.match(Ae.re)))return[,l,e,r,n,i,a,s,o]=l,we.set({r:ue.channel.clamp.r(e?2.55*parseFloat(l):parseFloat(l)),g:ue.channel.clamp.g(n?2.55*parseFloat(r):parseFloat(r)),b:ue.channel.clamp.b(a?2.55*parseFloat(i):parseFloat(i)),a:s?ue.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:me(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?`rgba(${ue.lang.round(t)}, ${ue.lang.round(e)}, ${ue.lang.round(r)}, ${ue.lang.round(n)})`:`rgb(${ue.lang.round(t)}, ${ue.lang.round(e)}, ${ue.lang.round(r)})`},"stringify")},Le=Ae}),nn=t(()=>{Jr(),tn(),en(),rn(),Xr(),Ne={format:{keyword:Se,hex:Te,rgb:Le,rgba:Le,hsl:Ce,hsla:Ce},parse:me(t=>{if("string"!=typeof t)return t;var e=Te.parse(t)||Le.parse(t)||Ce.parse(t)||Se.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:me(t=>!t.changed&&t.color?t.color:(t.type.is(pe.HSL)||void 0===t.data.r?Ce:t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Le:Te).stringify(t),"stringify")},Ie=Ne}),an=t(()=>{Vr(),nn(),Re=me((t,e)=>{var r,n=Ie.parse(t);for(r in e)n[r]=ue.channel.clamp[r](e[r]);return Ie.stringify(n)},"change"),Me=Re}),sn=t(()=>{Vr(),Qr(),nn(),an(),De=me((t,e,r=0,n=1)=>"number"!=typeof t?Me(t,{a:e}):(t=we.set({r:ue.channel.clamp.r(t),g:ue.channel.clamp.g(e),b:ue.channel.clamp.b(r),a:ue.channel.clamp.a(n)}),Ie.stringify(t)),"rgba"),Oe=De}),on=t(()=>{Vr(),nn(),Pe=me((t,e)=>ue.lang.round(Ie.parse(t)[e]),"channel"),Be=Pe}),ln=t(()=>{Vr(),nn(),Fe=me(t=>{var{r:t,g:e,b:r}=Ie.parse(t),t=.2126*ue.channel.toLinear(t)+.7152*ue.channel.toLinear(e)+.0722*ue.channel.toLinear(r);return ue.lang.round(t)},"luminance"),$e=Fe}),cn=t(()=>{ln(),ze=me(t=>.5<=$e(t),"isLight"),Ge=ze}),hn=t(()=>{cn(),Ue=me(t=>!Ge(t),"isDark"),qe=Ue}),un=t(()=>{Vr(),nn(),je=me((t,e,r)=>{var n=(t=Ie.parse(t))[e];return n!==(r=ue.channel.clamp[e](n+r))&&(t[e]=r),Ie.stringify(t)},"adjustChannel"),We=je}),dn=t(()=>{un(),Ye=me((t,e)=>We(t,"l",e),"lighten"),a=Ye}),pn=t(()=>{un(),He=me((t,e)=>We(t,"l",-e),"darken"),Ve=He}),gn=t(()=>{nn(),an(),Xe=me((t,e)=>{var r,n=Ie.parse(t),i={};for(r in e)e[r]&&(i[r]=n[r]+e[r]);return Me(t,i)},"adjust"),r=Xe}),fn=t(()=>{nn(),sn(),Ke=me((t,e,r=50)=>{var{r:t,g:n,b:i,a}=Ie.parse(t),{r:e,g:s,b:o,a:l}=Ie.parse(e),c=2*(r/=100)-1,h=a-l;return Oe(t*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+e*(h=1-c),n*c+s*h,i*c+o*h,a*r+l*(1-r))},"mix"),Ze=Ke}),mn=t(()=>{nn(),fn(),Qe=me((t,e=100)=>{var r=Ie.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ze(r,t,e)},"invert"),n=Qe}),yn=t(()=>{sn(),on(),hn(),dn(),pn(),gn(),mn()}),vn=t(()=>{yn()}),xn=t(()=>{Je="#ffffff",tr="#f2f2f2"}),bn=t(()=>{vn(),er=me((t,e)=>r(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),wn=t(()=>{vn(),xn(),bn(),rr=class{static{me(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||er(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||er(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||er(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?Ve(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||Ve(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||Ve(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ve(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 t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},nr=me(t=>{var e=new rr;return e.calculate(t),e},"getThemeVariables")}),kn=t(()=>{vn(),bn(),ir=class{static{me(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=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(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=Oe(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=Ve("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Ve(this.sectionBkgColor,10),this.taskBorderColor=Oe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Oe(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||Ve(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 t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},ar=me(t=>{var e=new ir;return e.calculate(t),e},"getThemeVariables")}),Tn=t(()=>{vn(),bn(),xn(),sr=class{static{me(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=er(this.primaryColor,this.darkMode),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(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=Oe(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||Ve(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ve(this.tertiaryColor,40);for(let t=0;t{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},or=me(t=>{var e=new sr;return e.calculate(t),e},"getThemeVariables")}),En=t(()=>{vn(),xn(),bn(),lr=class{static{me(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=er(this.primaryColor,this.darkMode),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(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=Ve(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||Ve(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ve(this.tertiaryColor,40);for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},cr=me(t=>{var e=new lr;return e.calculate(t),e},"getThemeVariables")}),Cn=t(()=>{vn(),bn(),xn(),hr=class{static{me(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=er(this.primaryColor,this.darkMode),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(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 t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},ur=me(t=>{var e=new hr;return e.calculate(t),e},"getThemeVariables")}),_n=t(()=>{wn(),kn(),Tn(),En(),Cn(),dr={base:{getThemeVariables:nr},dark:{getThemeVariables:ar},default:{getThemeVariables:or},forest:{getThemeVariables:cr},neutral:{getThemeVariables:ur}}}),Sn=t(()=>{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=t(()=>{_n(),Sn(),gr={...pr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:dr.default.getThemeVariables(),sequence:{...pr.sequence,messageFont:me(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:me(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:me(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:me(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...pr.flowchart,inheritDir:!1},external_personFont:me(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:me(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:me(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:me(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:me(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:me(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:me(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:me(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:me(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:me(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:me(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:me(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:me(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:me(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:me(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:me(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:me(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:me(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:me(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:me(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:me(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}},fr=me((r,n="")=>Object.keys(r).reduce((t,e)=>Array.isArray(r[e])?t:"object"==typeof r[e]&&null!==r[e]?[...t,n+e,...fr(r[e],"")]:[...t,n+e],[]),"keyify"),mr=new Set(fr(gr,"")),yr=gr}),Ln=t(()=>{An(),e(),vr=me(t=>{if(M.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>vr(t));else{for(var e of Object.keys(t)){var r;if(M.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!mr.has(e)||null==t[e])M.debug("sanitize deleting key: ",e),delete t[e];else if("object"==typeof t[e])M.debug("sanitizing object",e),vr(t[e]);else for(r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(M.debug("sanitizing css option",e),t[e]=xr(t[e]))}if(t.themeVariables)for(var n of Object.keys(t.themeVariables)){var i=t.themeVariables[n];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[n]="")}M.debug("After sanitization",t)}},"sanitizeDirective"),xr=me(t=>{let e=0,r=0;for(var n of t){if(e{jr(),e(),_n(),An(),Ln(),br=Object.freeze(yr),wr=ie({},br),Tr=[],Er=ie({},br),Cr=me((t,e)=>{let r=ie({},t),n={};for(var i of e)Rr(i),n=ie(n,i);return r=ie(r,n),n.theme&&n.theme in dr&&(t=ie({},kr),e=ie(t.themeVariables||{},n.themeVariables),r.theme)&&r.theme in dr&&(r.themeVariables=dr[r.theme].getThemeVariables(e)),Fr(Er=r),Er},"updateCurrentConfig"),_r=me(t=>(wr=ie({},br),wr=ie(wr,t),t.theme&&dr[t.theme]&&(wr.themeVariables=dr[t.theme].getThemeVariables(t.themeVariables)),Cr(wr,Tr),wr),"setSiteConfig"),Sr=me(t=>{kr=ie({},t)},"saveConfigFromInitialize"),Ar=me(t=>(wr=ie(wr,t),Cr(wr,Tr),wr),"updateSiteConfig"),Lr=me(()=>ie({},wr),"getSiteConfig"),Nr=me(t=>(Fr(t),ie(Er,t),Ir()),"setConfig"),Ir=me(()=>ie({},Er),"getConfig"),Rr=me(e=>{e&&(["secure",...wr.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(M.debug("Denied attempt to modify a secure key "+t,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{"string"==typeof e[t]&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],"object"==typeof e[t]&&Rr(e[t])}))},"sanitize"),Mr=me(t=>{vr(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Tr.push(t),Cr(wr,Tr)},"addDirective"),Dr=me((t=wr)=>{Cr(t,Tr=[])},"reset"),Or={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Pr={},Br=me(t=>{Pr[t]||(M.warn(Or[t]),Pr[t]=!0)},"issueWarning"),Fr=me(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Br("LAZY_LOAD_DEPRECATED")},"checkConfig")});function In(i){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(1Bn(t),"DOMPurify");if(u.version="3.2.5",u.removed=[],!t||!t.document||t.document.nodeType!==Li.document||!t.Element)return u.isSupported=!1,u;let i=t.document,c=i,O=c.currentScript,{DocumentFragment:P,HTMLTemplateElement:B,Node:F,Element:$,NodeFilter:e,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:G,DOMParser:U,trustedTypes:d}=t,r=$.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:tt,TMPLIT_EXPR:et,DATA_ATTR:rt,ARIA_ATTR:nt,IS_SCRIPT_OR_DATA:it,ATTR_WHITESPACE:at,CUSTOM_ELEMENT:st}=(u.isSupported="function"==typeof Fn&&"function"==typeof s&&V&&void 0!==V.createHTMLDocument,Ai),ot=Ai.IS_ALLOWED_URI,f=null,lt=Mn({},[...oi,...li,...ci,...ui,...pi]),m=null,ct=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,ht=null,ut=!0,dt=!0,pt=!1,gt=!0,v=!1,ft=!0,x=!1,mt=!1,yt=!1,b=!1,w=!1,k=!1,vt=!0,xt=!1,bt=!0,T=!1,n,l=null,wt=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"]),kt=null,Tt=Mn({},["audio","video","img","source","image","track"]),Et=null,Ct=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",_=C,_t=!1,St=null,At=Mn({},[a,E,C],Jn),S=Mn({},["mi","mo","mn","ms","mtext"]),A=Mn({},["annotation-xml"]),Lt=Mn({},["title","style","font","a","script"]),L=null,Nt=["application/xhtml+xml","text/html"],N=null,I=null,It=i.createElement("form"),Rt=me(function(t){return t instanceof RegExp||t instanceof Function},"isRegexOrFunction"),Mt=me(function(){var t=0"+t:(n=ti(t,/^[\r\n\t ]+/),r=n&&n[0]),"application/xhtml+xml"===L&&_===C&&(t=''+t+"");var n=p?p.createHTML(t):t;if(_===C)try{e=(new U).parseFromString(n,L)}catch{}if(!e||!e.documentElement){e=V.createDocument(_,"template",null);try{e.documentElement.innerHTML=_t?h:n}catch{}}return n=e.body||e.documentElement,t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),_===C?Z.call(e,x?"html":"body")[0]:x?e.documentElement:n},"_initDocument"),Ft=me(function(t){return X.call(t.ownerDocument||t,t,e.SHOW_ELEMENT|e.SHOW_COMMENT|e.SHOW_TEXT|e.SHOW_PROCESSING_INSTRUCTION|e.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),$t=me(function(t){return t instanceof G&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof z)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},"_isClobbered"),zt=me(function(t){return"function"==typeof F&&t instanceof F},"_isNode");function D(t,e,r){Hn(t,t=>{t.call(u,e,r,I)})}me(D,"_executeHooks");let Gt=me(function(e){let r=null;if(D(g.beforeSanitizeElements,e,null),!$t(e)){var t=N(e.nodeName);if(D(g.uponSanitizeElement,e,{tagName:t,allowedTags:f}),!(e.hasChildNodes()&&!zt(e.firstElementChild)&&ai(/<[/\w!]/g,e.innerHTML)&&ai(/<[/\w!]/g,e.textContent)||e.nodeType===Li.progressingInstruction||ft&&e.nodeType===Li.comment&&ai(/<[/\w]/g,e.data))){if(f[t]&&!y[t])return e instanceof $&&!Pt(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&ai(/<\/no(script|embed|frames)/i,e.innerHTML)?(R(e),!0):(v&&e.nodeType===Li.text&&(r=e.textContent,Hn([J,tt,et],t=>{r=ei(r,t," ")}),e.textContent!==r)&&(Kn(u.removed,{element:e.cloneNode()}),e.textContent=r),D(g.afterSanitizeElements,e,null),!1);if(!y[t]&&qt(t)&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t)))return!1;if(bt&&!l[t]){var n=s(e)||e.parentNode,i=Y(e)||e.childNodes;if(i&&n)for(let t=i.length-1;0<=t;--t){var a=q(i[t],!0);a.__removalCount=(e.__removalCount||0)+1,n.insertBefore(a,W(e))}}}}return R(e),!0},"_sanitizeElements"),Ut=me(function(t,e,r){if(vt&&("id"===e||"name"===e)&&(r in i||r in It))return!1;if((!dt||ht[e]||!ai(rt,e))&&(!ut||!ai(nt,e)))if(!m[e]||ht[e]){if(!(qt(t)&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t))&&(o.attributeNameCheck instanceof RegExp&&ai(o.attributeNameCheck,e)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(e))||"is"===e&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Et[e]&&!ai(ot,ei(r,at,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==ri(r,"data:")||!kt[t])&&(!pt||ai(it,ei(r,at,"")))&&r)return!1;return!0},"_isValidAttribute"),qt=me(function(t){return"annotation-xml"!==t&&ti(t,st)},"_isBasicCustomElement"),jt=me(function(l){D(g.beforeSanitizeAttributes,l,null);var c=l.attributes;if(c&&!$t(l)){let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},o=c.length;for(;o--;){let t=c[o],{name:e,namespaceURI:r,value:n}=t,i=N(e),a="value"===e?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,!xt||"id"!==i&&"name"!==i||(M(e,l),a="user-content-"+a),ft&&ai(/((--!?|])>)|<\/(style|title)/i,a))M(e,l);else if(!s.forceKeepAttr&&(M(e,l),s.keepAttr))if(!gt&&ai(/\/>/i,a))M(e,l);else{v&&Hn([J,tt,et],t=>{a=ei(a,t," ")});var h=N(l.nodeName);if(Ut(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,e,a):l.setAttribute(e,a),$t(l)?R(l):Xn(u.removed)}catch{}}}}D(g.afterSanitizeAttributes,l,null)}},"_sanitizeAttributes"),Wt=me(function t(e){var r,n=Ft(e);for(D(g.beforeSanitizeShadowDOM,e,null);r=n.nextNode();)D(g.uponSanitizeShadowNode,r,null),Gt(r),jt(r),r.content instanceof P&&t(r.content);D(g.afterSanitizeShadowDOM,e,null)},"_sanitizeShadowDOM");return u.sanitize=function(t){let e=1 +`+l),v&&Hn([J,tt,et],t=>{l=ei(l,t," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var t=0{({entries:Fn,setPrototypeOf:$n,isFrozen:zn,getPrototypeOf:Gn,getOwnPropertyDescriptor:Un}=Object),{freeze:qn,seal:Si,create:jn}=Object,{apply:Wn,construct:Yn}=typeof Reflect<"u"&&Reflect,qn=qn||me(function(t){return t},"freeze"),Si=Si||me(function(t){return t},"seal"),Wn=Wn||me(function(t,e,r){return t.apply(e,r)},"apply"),Yn=Yn||me(function(t,e){return new t(...e)},"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),ti=In(String.prototype.match),ei=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),me(In,"unapply"),me(Rn,"unconstruct"),me(Mn,"addToSet"),me(Dn,"cleanArray"),me(On,"clone"),me(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=Si(/\{\{[\w\W]*|[\w\W]*\}\}/gm),xi=Si(/<%[\w\W]*|[\w\W]*%>/gm),bi=Si(/\$\{[\w\W]*/gm),wi=Si(/^data-[\-\w.\u00B7-\uFFFF]+$/),ki=Si(/^aria-[\-\w]+$/),Ti=Si(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ei=Si(/^(?:\w+script|data):/i),Ci=Si(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_i=Si(/^html$/i),Si=Si(/^[a-z][.\w]*(-[.\w]+)+$/i),Ai=Object.freeze({__proto__:null,ARIA_ATTR:ki,ATTR_WHITESPACE:Ci,CUSTOM_ELEMENT:Si,DATA_ATTR:wi,DOCTYPE_NAME:_i,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=me(function(){return"u"ga[t])}function Bi(t){if(t.default)return t.default;if(t=t.type,"string"!=typeof(t=Array.isArray(t)?t[0]:t))return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function Fi(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}function $i(t){for(var e=0;e but got "+String(t)+".")}function o(t,e,r,n,i,a){fs[t][i]={font:e,group:r,replace:n},a&&n&&(fs[t][n]=fs[t][i])}function l(t){for(var{type:t,names:e,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=t,s={type:t,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;oAV".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{for(var r in e)z(t,r,{get:e[r],enumerable:!0})})(Oi,{default:()=>xc});var ua,da,X,pa,ga,fa,ma,ya,va,xa,ba,wa,ka,Ta,Ea,Ca,_a,Sa,Aa,La,Na,Ia,Ra,Ma,Da,Oa,Pa,Ba,Fa,$a,za,Ga,Ua,qa,ja,Wa,Ya,Ha,Va,Xa,Ka,Za,Qa,Ja,ts,K,es,rs,ns,is,as,ss,os,ls,cs,hs,us,ds,ps,gs,fs,u,d,p,ms,g,ys,vs,xs,bs,ws,ks,Ts,Es,Cs,_s,Ss,As,Ls,Ns,Is,Rs,Ms,Ds,Os,Ps,Bs,Fs,$s,zs,Gs,Us,qs,js,Ws,Ys,Hs,Vs,Xs,Z,Ks,Zs,Qs,Js,to,eo,ro,no,io,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,yo,E,vo,xo,bo,wo,ko,To,Eo,Co,_o,So,Ao,Lo,No,Io,Ro,Mo,Do,Oo,Po,Bo,Fo,$o,zo,Go,Uo,qo,jo,Wo,Yo,Ho,Vo,Xo,Ko,Zo,Qo,Jo,tl,el,rl,nl,il,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,vl,xl,bl,wl,kl,Tl,El,Cl,_l,Sl,Al,Ll,Nl,Il,Rl,Ml,Dl,Ol,Pl,Bl,Fl,$l,zl,Gl,Ul,ql,jl,Wl,Yl,Hl,Vl,Xl,Kl,f,Zl,Ql,Jl,tc,ec,rc,nc,ic,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,m,fc,mc,yc,vc,y,xc,bc=t(()=>{for(ua=class r{static{me(this,"SourceLocation")}constructor(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}static range(t,e){return e?t&&t.loc&&e.loc&&t.loc.lexer===e.loc.lexer?new r(t.loc.lexer,t.loc.start,e.loc.end):null:t&&t.loc}},da=class n{static{me(this,"Token")}constructor(t,e){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=e}range(t,e){return new n(e,ua.range(this,t))}},(X=class s{static{me(this,"ParseError")}constructor(t,e){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,i,a="KaTeX parse error: "+t;return(e=e&&e.loc)&&e.start<=e.end&&(r=e.lexer.input,n=e.start,i=e.end,n===r.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ",e=r.slice(n,i).replace(/[^]/g,"$&̲"),a+=(15":">","<":"<",'"':""","'":"'"},fa=/[&><"']/g,me(Pi,"escape"),ma=me(function t(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?t(e.body[0]):e:"font"===e.type?t(e.body):e},"getBaseElem"),m=me(function(t){return"mathord"===(t=ma(t)).type||"textord"===t.type||"atom"===t.type},"isCharacterBox"),ya=me(function(t){if(t)return t;throw new Error("Expected non-null, but got "+String(t))},"assert"),Rl=me(function(t){return(t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t))?":"===t[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"},"protocolFromUrl"),va={contains:Fl,deflt:y,escape:Pi,hyphenate:sc,getBaseElem:ma,isCharacterBox:m,protocolFromUrl:Rl},xa={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:me(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:me((t,e)=>(e.push(t),e),"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:me(t=>Math.max(0,t),"processor"),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:me(t=>Math.max(0,t),"processor"),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:me(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand ",cliProcessor:me(t=>"Infinity"===t?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},me(Bi,"getDefaultValue"),ba=class{static{me(this,"Settings")}constructor(t){for(var e 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,t=t||{},xa){var r;xa.hasOwnProperty(e)&&(r=xa[e],this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:Bi(r))}}reportNonstrict(t,e,r){var n=this.strict;if((n="function"==typeof n?n(t,e,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,r){var n=this.strict;if("function"==typeof n)try{n=n(t,e,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': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]"),1))}isTrusted(t){if(t.url&&!t.protocol){var e=va.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}return!!("function"==typeof this.trust?this.trust(t):this.trust)}},Fl=class{static{me(this,"Style")}constructor(t,e,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=r}sup(){return wa[ka[this.id]]}sub(){return wa[Ta[this.id]]}fracNum(){return wa[Ea[this.id]]}fracDen(){return wa[Ca[this.id]]}cramp(){return wa[_a[this.id]]}text(){return wa[Sa[this.id]]}isTight(){return 2<=this.size}},wa=[new Fl(0,0,!1),new Fl(1,0,!0),new Fl(2,1,!1),new Fl(3,1,!0),new Fl(4,2,!1),new Fl(5,2,!0),new Fl(6,3,!1),new Fl(7,3,!0)],ka=[4,5,4,5,6,7,6,7],Ta=[5,5,5,5,7,7,7,7],Ea=[2,3,4,5,6,7,6,7],Ca=[3,3,5,5,7,7,7,7],_a=[1,1,3,3,5,5,7,7],Sa=[0,1,2,3,2,3,2,3],Aa={DISPLAY:wa[0],TEXT:wa[2],SCRIPT:wa[4],SCRIPTSCRIPT:wa[6]},La=[{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]]}],me(Fi,"scriptFromCodepoint"),Na=[],La.forEach(t=>t.blocks.forEach(t=>Na.push(...t))),me($i,"supportedCodepoint"),Ia=me(function(t,e){return"M95,"+(622+t+e)+` 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 @@ -21,7 +21,7 @@ c5.3,-9.3,12,-14,20,-14 H400000v`+(40+t)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtMain"),Ia=me(function(t,e){return"M263,"+(601+t+e)+`c0.7,0,18,39.7,52,119 +M`+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtMain"),Ra=me(function(t,e){return"M263,"+(601+t+e)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+t/2.084+" -"+t+` @@ -31,7 +31,7 @@ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5, c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize1"),Ra=me(function(t,e){return"M983 "+(10+t+e)+` +M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize1"),Ma=me(function(t,e){return"M983 "+(10+t+e)+` l`+t/3.13+" -"+t+` c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 @@ -40,7 +40,7 @@ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize2"),Ma=me(function(t,e){return"M424,"+(2398+t+e)+` +M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize2"),Da=me(function(t,e){return"M424,"+(2398+t+e)+` 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 @@ -50,18 +50,18 @@ v`+(40+t)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+e+` -h400000v`+(40+t)+"h-400000z"},"sqrtSize3"),Da=me(function(t,e){return"M473,"+(2713+t+e)+` +h400000v`+(40+t)+"h-400000z"},"sqrtSize3"),Oa=me(function(t,e){return"M473,"+(2713+t+e)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},"sqrtSize4"),Oa=me(function(t){return"M400000 "+t+" H0 L"+t/2+" 0 l65 45 L145 "+(t-80)+" H400000z"},"phasePath"),Pa=me(function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+` +606zM`+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},"sqrtSize4"),Pa=me(function(t){return"M400000 "+t+" H0 L"+t/2+" 0 l65 45 L145 "+(t-80)+" H400000z"},"phasePath"),Ba=me(function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+` H742v`+(r-54-e-t)+`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 `+e+"H400000v"+(40+t)+"H742z"},"sqrtTall"),Ba=me(function(t,e,r){e*=1e3;var i="";switch(t){case"sqrtMain":i=Na(e,80);break;case"sqrtSize1":i=Ia(e,80);break;case"sqrtSize2":i=Ra(e,80);break;case"sqrtSize3":i=Ma(e,80);break;case"sqrtSize4":i=Da(e,80);break;case"sqrtTall":i=Pa(e,80,r)}return i},"sqrtPath"),Fa=me(function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}},"innerPath"),$a={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+e+"H400000v"+(40+t)+"H742z"},"sqrtTall"),Fa=me(function(t,e,r){e*=1e3;var n="";switch(t){case"sqrtMain":n=Ia(e,80);break;case"sqrtSize1":n=Ra(e,80);break;case"sqrtSize2":n=Ma(e,80);break;case"sqrtSize3":n=Da(e,80);break;case"sqrtSize4":n=Oa(e,80);break;case"sqrtTall":n=Ba(e,80,r)}return n},"sqrtPath"),$a=me(function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}},"innerPath"),za={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 @@ -236,7 +236,7 @@ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z` 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`},za=me(function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84 +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Ga=me(function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 @@ -264,10 +264,10 @@ 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 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,-`+(e+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"),Ga=class{static{me(this,"DocumentFragment")}constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return ya.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;et.toText(),"toText");return this.children.map(t).join("")}},Ua={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},qa={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},ja={"Å":"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"},me($n,"setFontMetrics"),me(zn,"getCharacterMetrics"),Wa={},me(Gn,"getGlobalMetrics"),Ya=[[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]],Ha=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Va=me(function(t,e){return e.size<2?t:Ya[t-1][e.size-1]},"sizeAtStyle"),(Xa=class n{static{me(this,"Options")}constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||n.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Ha[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var e,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(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);return new n(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Va(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Ha[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Va(n.BASESIZE,t);return this.size===e&&this.textSize===n.BASESIZE&&this.style===t?this:this.extend({style:t,size:e})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==n.BASESIZE?["sizing","reset-size"+this.size,"size"+n.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Gn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Ka={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},Za={ex:!0,em:!0,mu:!0},Qa=me(function(t){return(t="string"!=typeof t?t.unit:t)in Ka||t in Za||"ex"===t},"validUnit"),Ja=me(function(t,e){var r;if(t.unit in Ka)r=Ka[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var i=e.style.isTight()?e.havingStyle(e.style.text()):e;if("ex"===t.unit)r=i.fontMetrics().xHeight;else{if("em"!==t.unit)throw new X("Invalid unit: '"+t.unit+"'");r=i.fontMetrics().quad}i!==e&&(r*=i.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},"calculateSize"),K=me(function(t){return+t.toFixed(4)+"em"},"makeEm"),ts=me(function(t){return t.filter(t=>t).join(" ")},"createClass"),es=me(function(t,e,r){this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},e&&(e.style.isTight()&&this.classes.push("mtight"),t=e.getColor())&&(this.style.color=t)},"initNode"),rs=me(function(t){var e,r,i=document.createElement(t);for(e in i.className=ts(this.classes),this.style)this.style.hasOwnProperty(e)&&(i.style[e]=this.style[e]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&i.setAttribute(r,this.attributes[r]);for(var n=0;n"},"toMarkup"),ns=class{static{me(this,"Span")}constructor(t,e,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,es.call(this,t,r,i),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return ya.contains(this.classes,t)}toNode(){return rs.call(this,"span")}toMarkup(){return is.call(this,"span")}},as=class{static{me(this,"Anchor")}constructor(t,e,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,es.call(this,e,i),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return ya.contains(this.classes,t)}toNode(){return rs.call(this,"a")}toMarkup(){return is.call(this,"a")}},ss=class{static{me(this,"Img")}constructor(t,e,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=e,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return ya.contains(this.classes,t)}toNode(){var t,e=document.createElement("img");for(t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var t,e=''+ya.escape(this.alt)+'"}},os={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},ls=class{static{me(this,"SymbolNode")}constructor(t,e,r,i,n,a,s,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=e||0,this.depth=r||0,this.italic=i||0,this.skew=n||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(t=Bn(this.text.charCodeAt(0)))&&this.classes.push(t+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=os[this.text])}hasClass(t){return ya.contains(this.classes,t)}toNode(){var t,e=document.createTextNode(this.text),r=null;for(t in 0":n}},cs=class{static{me(this,"SvgNode")}constructor(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r"}},hs=class{static{me(this,"PathNode")}constructor(t,e){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=e}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",$a[this.pathName]),t}toMarkup(){return this.alternate?'':''}},us=class{static{me(this,"LineNode")}constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","line");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var t,e=""}},me(Un,"assertSymbolDomNode"),me(qn,"assertSpan"),ds={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ps={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},gs={math:{},text:{}},me(o,"defineSymbol"),d="text",y="ams",ac="accent-token",m="bin",Il="close",Bl="inner",fs="mathord",nc="op-token",fc="open",Ol="punct",gc="spacing",g="textord",o(u="math",p="main",f="rel","≡","\\equiv",!0),o(u,p,f,"≺","\\prec",!0),o(u,p,f,"≻","\\succ",!0),o(u,p,f,"∼","\\sim",!0),o(u,p,f,"⊥","\\perp"),o(u,p,f,"⪯","\\preceq",!0),o(u,p,f,"⪰","\\succeq",!0),o(u,p,f,"≃","\\simeq",!0),o(u,p,f,"∣","\\mid",!0),o(u,p,f,"≪","\\ll",!0),o(u,p,f,"≫","\\gg",!0),o(u,p,f,"≍","\\asymp",!0),o(u,p,f,"∥","\\parallel"),o(u,p,f,"⋈","\\bowtie",!0),o(u,p,f,"⌣","\\smile",!0),o(u,p,f,"⊑","\\sqsubseteq",!0),o(u,p,f,"⊒","\\sqsupseteq",!0),o(u,p,f,"≐","\\doteq",!0),o(u,p,f,"⌢","\\frown",!0),o(u,p,f,"∋","\\ni",!0),o(u,p,f,"∝","\\propto",!0),o(u,p,f,"⊢","\\vdash",!0),o(u,p,f,"⊣","\\dashv",!0),o(u,p,f,"∋","\\owns"),o(u,p,Ol,".","\\ldotp"),o(u,p,Ol,"⋅","\\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,Il,"⎱","\\rmoustache",!0),o(u,p,fc,"⎰","\\lmoustache",!0),o(u,p,Il,"⟯","\\rgroup",!0),o(u,p,fc,"⟮","\\lgroup",!0),o(u,p,m,"∓","\\mp",!0),o(u,p,m,"⊖","\\ominus",!0),o(u,p,m,"⊎","\\uplus",!0),o(u,p,m,"⊓","\\sqcap",!0),o(u,p,m,"∗","\\ast"),o(u,p,m,"⊔","\\sqcup",!0),o(u,p,m,"◯","\\bigcirc",!0),o(u,p,m,"∙","\\bullet",!0),o(u,p,m,"‡","\\ddagger"),o(u,p,m,"≀","\\wr",!0),o(u,p,m,"⨿","\\amalg"),o(u,p,m,"&","\\And"),o(u,p,f,"⟵","\\longleftarrow",!0),o(u,p,f,"⇐","\\Leftarrow",!0),o(u,p,f,"⟸","\\Longleftarrow",!0),o(u,p,f,"⟶","\\longrightarrow",!0),o(u,p,f,"⇒","\\Rightarrow",!0),o(u,p,f,"⟹","\\Longrightarrow",!0),o(u,p,f,"↔","\\leftrightarrow",!0),o(u,p,f,"⟷","\\longleftrightarrow",!0),o(u,p,f,"⇔","\\Leftrightarrow",!0),o(u,p,f,"⟺","\\Longleftrightarrow",!0),o(u,p,f,"↦","\\mapsto",!0),o(u,p,f,"⟼","\\longmapsto",!0),o(u,p,f,"↗","\\nearrow",!0),o(u,p,f,"↩","\\hookleftarrow",!0),o(u,p,f,"↪","\\hookrightarrow",!0),o(u,p,f,"↘","\\searrow",!0),o(u,p,f,"↼","\\leftharpoonup",!0),o(u,p,f,"⇀","\\rightharpoonup",!0),o(u,p,f,"↙","\\swarrow",!0),o(u,p,f,"↽","\\leftharpoondown",!0),o(u,p,f,"⇁","\\rightharpoondown",!0),o(u,p,f,"↖","\\nwarrow",!0),o(u,p,f,"⇌","\\rightleftharpoons",!0),o(u,y,f,"≮","\\nless",!0),o(u,y,f,"","\\@nleqslant"),o(u,y,f,"","\\@nleqq"),o(u,y,f,"⪇","\\lneq",!0),o(u,y,f,"≨","\\lneqq",!0),o(u,y,f,"","\\@lvertneqq"),o(u,y,f,"⋦","\\lnsim",!0),o(u,y,f,"⪉","\\lnapprox",!0),o(u,y,f,"⊀","\\nprec",!0),o(u,y,f,"⋠","\\npreceq",!0),o(u,y,f,"⋨","\\precnsim",!0),o(u,y,f,"⪹","\\precnapprox",!0),o(u,y,f,"≁","\\nsim",!0),o(u,y,f,"","\\@nshortmid"),o(u,y,f,"∤","\\nmid",!0),o(u,y,f,"⊬","\\nvdash",!0),o(u,y,f,"⊭","\\nvDash",!0),o(u,y,f,"⋪","\\ntriangleleft"),o(u,y,f,"⋬","\\ntrianglelefteq",!0),o(u,y,f,"⊊","\\subsetneq",!0),o(u,y,f,"","\\@varsubsetneq"),o(u,y,f,"⫋","\\subsetneqq",!0),o(u,y,f,"","\\@varsubsetneqq"),o(u,y,f,"≯","\\ngtr",!0),o(u,y,f,"","\\@ngeqslant"),o(u,y,f,"","\\@ngeqq"),o(u,y,f,"⪈","\\gneq",!0),o(u,y,f,"≩","\\gneqq",!0),o(u,y,f,"","\\@gvertneqq"),o(u,y,f,"⋧","\\gnsim",!0),o(u,y,f,"⪊","\\gnapprox",!0),o(u,y,f,"⊁","\\nsucc",!0),o(u,y,f,"⋡","\\nsucceq",!0),o(u,y,f,"⋩","\\succnsim",!0),o(u,y,f,"⪺","\\succnapprox",!0),o(u,y,f,"≆","\\ncong",!0),o(u,y,f,"","\\@nshortparallel"),o(u,y,f,"∦","\\nparallel",!0),o(u,y,f,"⊯","\\nVDash",!0),o(u,y,f,"⋫","\\ntriangleright"),o(u,y,f,"⋭","\\ntrianglerighteq",!0),o(u,y,f,"","\\@nsupseteqq"),o(u,y,f,"⊋","\\supsetneq",!0),o(u,y,f,"","\\@varsupsetneq"),o(u,y,f,"⫌","\\supsetneqq",!0),o(u,y,f,"","\\@varsupsetneqq"),o(u,y,f,"⊮","\\nVdash",!0),o(u,y,f,"⪵","\\precneqq",!0),o(u,y,f,"⪶","\\succneqq",!0),o(u,y,f,"","\\@nsubseteqq"),o(u,y,m,"⊴","\\unlhd"),o(u,y,m,"⊵","\\unrhd"),o(u,y,f,"↚","\\nleftarrow",!0),o(u,y,f,"↛","\\nrightarrow",!0),o(u,y,f,"⇍","\\nLeftarrow",!0),o(u,y,f,"⇏","\\nRightarrow",!0),o(u,y,f,"↮","\\nleftrightarrow",!0),o(u,y,f,"⇎","\\nLeftrightarrow",!0),o(u,y,f,"△","\\vartriangle"),o(u,y,g,"ℏ","\\hslash"),o(u,y,g,"▽","\\triangledown"),o(u,y,g,"◊","\\lozenge"),o(u,y,g,"Ⓢ","\\circledS"),o(u,y,g,"®","\\circledR"),o(d,y,g,"®","\\circledR"),o(u,y,g,"∡","\\measuredangle",!0),o(u,y,g,"∄","\\nexists"),o(u,y,g,"℧","\\mho"),o(u,y,g,"Ⅎ","\\Finv",!0),o(u,y,g,"⅁","\\Game",!0),o(u,y,g,"‵","\\backprime"),o(u,y,g,"▲","\\blacktriangle"),o(u,y,g,"▼","\\blacktriangledown"),o(u,y,g,"■","\\blacksquare"),o(u,y,g,"⧫","\\blacklozenge"),o(u,y,g,"★","\\bigstar"),o(u,y,g,"∢","\\sphericalangle",!0),o(u,y,g,"∁","\\complement",!0),o(u,y,g,"ð","\\eth",!0),o(d,p,g,"ð","ð"),o(u,y,g,"╱","\\diagup"),o(u,y,g,"╲","\\diagdown"),o(u,y,g,"□","\\square"),o(u,y,g,"□","\\Box"),o(u,y,g,"◊","\\Diamond"),o(u,y,g,"¥","\\yen",!0),o(d,y,g,"¥","\\yen",!0),o(u,y,g,"✓","\\checkmark",!0),o(d,y,g,"✓","\\checkmark"),o(u,y,g,"ℶ","\\beth",!0),o(u,y,g,"ℸ","\\daleth",!0),o(u,y,g,"ℷ","\\gimel",!0),o(u,y,g,"ϝ","\\digamma",!0),o(u,y,g,"ϰ","\\varkappa"),o(u,y,fc,"┌","\\@ulcorner",!0),o(u,y,Il,"┐","\\@urcorner",!0),o(u,y,fc,"└","\\@llcorner",!0),o(u,y,Il,"┘","\\@lrcorner",!0),o(u,y,f,"≦","\\leqq",!0),o(u,y,f,"⩽","\\leqslant",!0),o(u,y,f,"⪕","\\eqslantless",!0),o(u,y,f,"≲","\\lesssim",!0),o(u,y,f,"⪅","\\lessapprox",!0),o(u,y,f,"≊","\\approxeq",!0),o(u,y,m,"⋖","\\lessdot"),o(u,y,f,"⋘","\\lll",!0),o(u,y,f,"≶","\\lessgtr",!0),o(u,y,f,"⋚","\\lesseqgtr",!0),o(u,y,f,"⪋","\\lesseqqgtr",!0),o(u,y,f,"≑","\\doteqdot"),o(u,y,f,"≓","\\risingdotseq",!0),o(u,y,f,"≒","\\fallingdotseq",!0),o(u,y,f,"∽","\\backsim",!0),o(u,y,f,"⋍","\\backsimeq",!0),o(u,y,f,"⫅","\\subseteqq",!0),o(u,y,f,"⋐","\\Subset",!0),o(u,y,f,"⊏","\\sqsubset",!0),o(u,y,f,"≼","\\preccurlyeq",!0),o(u,y,f,"⋞","\\curlyeqprec",!0),o(u,y,f,"≾","\\precsim",!0),o(u,y,f,"⪷","\\precapprox",!0),o(u,y,f,"⊲","\\vartriangleleft"),o(u,y,f,"⊴","\\trianglelefteq"),o(u,y,f,"⊨","\\vDash",!0),o(u,y,f,"⊪","\\Vvdash",!0),o(u,y,f,"⌣","\\smallsmile"),o(u,y,f,"⌢","\\smallfrown"),o(u,y,f,"≏","\\bumpeq",!0),o(u,y,f,"≎","\\Bumpeq",!0),o(u,y,f,"≧","\\geqq",!0),o(u,y,f,"⩾","\\geqslant",!0),o(u,y,f,"⪖","\\eqslantgtr",!0),o(u,y,f,"≳","\\gtrsim",!0),o(u,y,f,"⪆","\\gtrapprox",!0),o(u,y,m,"⋗","\\gtrdot"),o(u,y,f,"⋙","\\ggg",!0),o(u,y,f,"≷","\\gtrless",!0),o(u,y,f,"⋛","\\gtreqless",!0),o(u,y,f,"⪌","\\gtreqqless",!0),o(u,y,f,"≖","\\eqcirc",!0),o(u,y,f,"≗","\\circeq",!0),o(u,y,f,"≜","\\triangleq",!0),o(u,y,f,"∼","\\thicksim"),o(u,y,f,"≈","\\thickapprox"),o(u,y,f,"⫆","\\supseteqq",!0),o(u,y,f,"⋑","\\Supset",!0),o(u,y,f,"⊐","\\sqsupset",!0),o(u,y,f,"≽","\\succcurlyeq",!0),o(u,y,f,"⋟","\\curlyeqsucc",!0),o(u,y,f,"≿","\\succsim",!0),o(u,y,f,"⪸","\\succapprox",!0),o(u,y,f,"⊳","\\vartriangleright"),o(u,y,f,"⊵","\\trianglerighteq"),o(u,y,f,"⊩","\\Vdash",!0),o(u,y,f,"∣","\\shortmid"),o(u,y,f,"∥","\\shortparallel"),o(u,y,f,"≬","\\between",!0),o(u,y,f,"⋔","\\pitchfork",!0),o(u,y,f,"∝","\\varpropto"),o(u,y,f,"◀","\\blacktriangleleft"),o(u,y,f,"∴","\\therefore",!0),o(u,y,f,"∍","\\backepsilon"),o(u,y,f,"▶","\\blacktriangleright"),o(u,y,f,"∵","\\because",!0),o(u,y,f,"⋘","\\llless"),o(u,y,f,"⋙","\\gggtr"),o(u,y,m,"⊲","\\lhd"),o(u,y,m,"⊳","\\rhd"),o(u,y,f,"≂","\\eqsim",!0),o(u,p,f,"⋈","\\Join"),o(u,y,f,"≑","\\Doteq",!0),o(u,y,m,"∔","\\dotplus",!0),o(u,y,m,"∖","\\smallsetminus"),o(u,y,m,"⋒","\\Cap",!0),o(u,y,m,"⋓","\\Cup",!0),o(u,y,m,"⩞","\\doublebarwedge",!0),o(u,y,m,"⊟","\\boxminus",!0),o(u,y,m,"⊞","\\boxplus",!0),o(u,y,m,"⋇","\\divideontimes",!0),o(u,y,m,"⋉","\\ltimes",!0),o(u,y,m,"⋊","\\rtimes",!0),o(u,y,m,"⋋","\\leftthreetimes",!0),o(u,y,m,"⋌","\\rightthreetimes",!0),o(u,y,m,"⋏","\\curlywedge",!0),o(u,y,m,"⋎","\\curlyvee",!0),o(u,y,m,"⊝","\\circleddash",!0),o(u,y,m,"⊛","\\circledast",!0),o(u,y,m,"⋅","\\centerdot"),o(u,y,m,"⊺","\\intercal",!0),o(u,y,m,"⋒","\\doublecap"),o(u,y,m,"⋓","\\doublecup"),o(u,y,m,"⊠","\\boxtimes",!0),o(u,y,f,"⇢","\\dashrightarrow",!0),o(u,y,f,"⇠","\\dashleftarrow",!0),o(u,y,f,"⇇","\\leftleftarrows",!0),o(u,y,f,"⇆","\\leftrightarrows",!0),o(u,y,f,"⇚","\\Lleftarrow",!0),o(u,y,f,"↞","\\twoheadleftarrow",!0),o(u,y,f,"↢","\\leftarrowtail",!0),o(u,y,f,"↫","\\looparrowleft",!0),o(u,y,f,"⇋","\\leftrightharpoons",!0),o(u,y,f,"↶","\\curvearrowleft",!0),o(u,y,f,"↺","\\circlearrowleft",!0),o(u,y,f,"↰","\\Lsh",!0),o(u,y,f,"⇈","\\upuparrows",!0),o(u,y,f,"↿","\\upharpoonleft",!0),o(u,y,f,"⇃","\\downharpoonleft",!0),o(u,p,f,"⊶","\\origof",!0),o(u,p,f,"⊷","\\imageof",!0),o(u,y,f,"⊸","\\multimap",!0),o(u,y,f,"↭","\\leftrightsquigarrow",!0),o(u,y,f,"⇉","\\rightrightarrows",!0),o(u,y,f,"⇄","\\rightleftarrows",!0),o(u,y,f,"↠","\\twoheadrightarrow",!0),o(u,y,f,"↣","\\rightarrowtail",!0),o(u,y,f,"↬","\\looparrowright",!0),o(u,y,f,"↷","\\curvearrowright",!0),o(u,y,f,"↻","\\circlearrowright",!0),o(u,y,f,"↱","\\Rsh",!0),o(u,y,f,"⇊","\\downdownarrows",!0),o(u,y,f,"↾","\\upharpoonright",!0),o(u,y,f,"⇂","\\downharpoonright",!0),o(u,y,f,"⇝","\\rightsquigarrow",!0),o(u,y,f,"⇝","\\leadsto"),o(u,y,f,"⇛","\\Rrightarrow",!0),o(u,y,f,"↾","\\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,y,g,"∅","\\varnothing"),o(u,p,fs,"α","\\alpha",!0),o(u,p,fs,"β","\\beta",!0),o(u,p,fs,"γ","\\gamma",!0),o(u,p,fs,"δ","\\delta",!0),o(u,p,fs,"ϵ","\\epsilon",!0),o(u,p,fs,"ζ","\\zeta",!0),o(u,p,fs,"η","\\eta",!0),o(u,p,fs,"θ","\\theta",!0),o(u,p,fs,"ι","\\iota",!0),o(u,p,fs,"κ","\\kappa",!0),o(u,p,fs,"λ","\\lambda",!0),o(u,p,fs,"μ","\\mu",!0),o(u,p,fs,"ν","\\nu",!0),o(u,p,fs,"ξ","\\xi",!0),o(u,p,fs,"ο","\\omicron",!0),o(u,p,fs,"π","\\pi",!0),o(u,p,fs,"ρ","\\rho",!0),o(u,p,fs,"σ","\\sigma",!0),o(u,p,fs,"τ","\\tau",!0),o(u,p,fs,"υ","\\upsilon",!0),o(u,p,fs,"ϕ","\\phi",!0),o(u,p,fs,"χ","\\chi",!0),o(u,p,fs,"ψ","\\psi",!0),o(u,p,fs,"ω","\\omega",!0),o(u,p,fs,"ε","\\varepsilon",!0),o(u,p,fs,"ϑ","\\vartheta",!0),o(u,p,fs,"ϖ","\\varpi",!0),o(u,p,fs,"ϱ","\\varrho",!0),o(u,p,fs,"ς","\\varsigma",!0),o(u,p,fs,"φ","\\varphi",!0),o(u,p,m,"∗","*",!0),o(u,p,m,"+","+"),o(u,p,m,"−","-",!0),o(u,p,m,"⋅","\\cdot",!0),o(u,p,m,"∘","\\circ",!0),o(u,p,m,"÷","\\div",!0),o(u,p,m,"±","\\pm",!0),o(u,p,m,"×","\\times",!0),o(u,p,m,"∩","\\cap",!0),o(u,p,m,"∪","\\cup",!0),o(u,p,m,"∖","\\setminus",!0),o(u,p,m,"∧","\\land"),o(u,p,m,"∨","\\lor"),o(u,p,m,"∧","\\wedge",!0),o(u,p,m,"∨","\\vee",!0),o(u,p,g,"√","\\surd"),o(u,p,fc,"⟨","\\langle",!0),o(u,p,fc,"∣","\\lvert"),o(u,p,fc,"∥","\\lVert"),o(u,p,Il,"?","?"),o(u,p,Il,"!","!"),o(u,p,Il,"⟩","\\rangle",!0),o(u,p,Il,"∣","\\rvert"),o(u,p,Il,"∥","\\rVert"),o(u,p,f,"=","="),o(u,p,f,":",":"),o(u,p,f,"≈","\\approx",!0),o(u,p,f,"≅","\\cong",!0),o(u,p,f,"≥","\\ge"),o(u,p,f,"≥","\\geq",!0),o(u,p,f,"←","\\gets"),o(u,p,f,">","\\gt",!0),o(u,p,f,"∈","\\in",!0),o(u,p,f,"","\\@not"),o(u,p,f,"⊂","\\subset",!0),o(u,p,f,"⊃","\\supset",!0),o(u,p,f,"⊆","\\subseteq",!0),o(u,p,f,"⊇","\\supseteq",!0),o(u,y,f,"⊈","\\nsubseteq",!0),o(u,y,f,"⊉","\\nsupseteq",!0),o(u,p,f,"⊨","\\models"),o(u,p,f,"←","\\leftarrow",!0),o(u,p,f,"≤","\\le"),o(u,p,f,"≤","\\leq",!0),o(u,p,f,"<","\\lt",!0),o(u,p,f,"→","\\rightarrow",!0),o(u,p,f,"→","\\to"),o(u,y,f,"≱","\\ngeq",!0),o(u,y,f,"≰","\\nleq",!0),o(u,p,gc," ","\\ "),o(u,p,gc," ","\\space"),o(u,p,gc," ","\\nobreakspace"),o(d,p,gc," ","\\ "),o(d,p,gc," "," "),o(d,p,gc," ","\\space"),o(d,p,gc," ","\\nobreakspace"),o(u,p,gc,null,"\\nobreak"),o(u,p,gc,null,"\\allowbreak"),o(u,p,Ol,",",","),o(u,p,Ol,";",";"),o(u,y,m,"⊼","\\barwedge",!0),o(u,y,m,"⊻","\\veebar",!0),o(u,p,m,"⊙","\\odot",!0),o(u,p,m,"⊕","\\oplus",!0),o(u,p,m,"⊗","\\otimes",!0),o(u,p,g,"∂","\\partial",!0),o(u,p,m,"⊘","\\oslash",!0),o(u,y,m,"⊚","\\circledcirc",!0),o(u,y,m,"⊡","\\boxdot",!0),o(u,p,m,"△","\\bigtriangleup"),o(u,p,m,"▽","\\bigtriangledown"),o(u,p,m,"†","\\dagger"),o(u,p,m,"⋄","\\diamond"),o(u,p,m,"⋆","\\star"),o(u,p,m,"◃","\\triangleleft"),o(u,p,m,"▹","\\triangleright"),o(u,p,fc,"{","\\{"),o(d,p,g,"{","\\{"),o(d,p,g,"{","\\textbraceleft"),o(u,p,Il,"}","\\}"),o(d,p,g,"}","\\}"),o(d,p,g,"}","\\textbraceright"),o(u,p,fc,"{","\\lbrace"),o(u,p,Il,"}","\\rbrace"),o(u,p,fc,"[","\\lbrack",!0),o(d,p,g,"[","\\lbrack",!0),o(u,p,Il,"]","\\rbrack",!0),o(d,p,g,"]","\\rbrack",!0),o(u,p,fc,"(","\\lparen",!0),o(u,p,Il,")","\\rparen",!0),o(d,p,g,"<","\\textless",!0),o(d,p,g,">","\\textgreater",!0),o(u,p,fc,"⌊","\\lfloor",!0),o(u,p,Il,"⌋","\\rfloor",!0),o(u,p,fc,"⌈","\\lceil",!0),o(u,p,Il,"⌉","\\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,f,"↑","\\uparrow",!0),o(u,p,f,"⇑","\\Uparrow",!0),o(u,p,f,"↓","\\downarrow",!0),o(u,p,f,"⇓","\\Downarrow",!0),o(u,p,f,"↕","\\updownarrow",!0),o(u,p,f,"⇕","\\Updownarrow",!0),o(u,p,nc,"∐","\\coprod"),o(u,p,nc,"⋁","\\bigvee"),o(u,p,nc,"⋀","\\bigwedge"),o(u,p,nc,"⨄","\\biguplus"),o(u,p,nc,"⋂","\\bigcap"),o(u,p,nc,"⋃","\\bigcup"),o(u,p,nc,"∫","\\int"),o(u,p,nc,"∫","\\intop"),o(u,p,nc,"∬","\\iint"),o(u,p,nc,"∭","\\iiint"),o(u,p,nc,"∏","\\prod"),o(u,p,nc,"∑","\\sum"),o(u,p,nc,"⨂","\\bigotimes"),o(u,p,nc,"⨁","\\bigoplus"),o(u,p,nc,"⨀","\\bigodot"),o(u,p,nc,"∮","\\oint"),o(u,p,nc,"∯","\\oiint"),o(u,p,nc,"∰","\\oiiint"),o(u,p,nc,"⨆","\\bigsqcup"),o(u,p,nc,"∫","\\smallint"),o(d,p,Bl,"…","\\textellipsis"),o(u,p,Bl,"…","\\mathellipsis"),o(d,p,Bl,"…","\\ldots",!0),o(u,p,Bl,"…","\\ldots",!0),o(u,p,Bl,"⋯","\\@cdots",!0),o(u,p,Bl,"⋱","\\ddots",!0),o(u,p,g,"⋮","\\varvdots"),o(u,p,ac,"ˊ","\\acute"),o(u,p,ac,"ˋ","\\grave"),o(u,p,ac,"¨","\\ddot"),o(u,p,ac,"~","\\tilde"),o(u,p,ac,"ˉ","\\bar"),o(u,p,ac,"˘","\\breve"),o(u,p,ac,"ˇ","\\check"),o(u,p,ac,"^","\\hat"),o(u,p,ac,"⃗","\\vec"),o(u,p,ac,"˙","\\dot"),o(u,p,ac,"˚","\\mathring"),o(u,p,fs,"","\\@imath"),o(u,p,fs,"","\\@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,ac,"ˊ","\\'"),o(d,p,ac,"ˋ","\\`"),o(d,p,ac,"ˆ","\\^"),o(d,p,ac,"˜","\\~"),o(d,p,ac,"ˉ","\\="),o(d,p,ac,"˘","\\u"),o(d,p,ac,"˙","\\."),o(d,p,ac,"¸","\\c"),o(d,p,ac,"˚","\\r"),o(d,p,ac,"ˇ","\\v"),o(d,p,ac,"¨",'\\"'),o(d,p,ac,"˝","\\H"),o(d,p,ac,"◯","\\textcircled"),ms={"--":!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,y,g,"✠","\\maltese"),o(d,y,g,"✠","\\maltese"),ys='0123456789/@."',xs=0;xs{if(ts(t.classes)!==ts(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(1===t.classes.length){var r=t.classes[0];if("mbin"===r||"mord"===r)return!1}for(var i in t.style)if(t.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;return!0},"canCombine"),m=me(t=>{for(var e=0;ee&&(e=a.height),rnew ns(t,e,r,i),"makeSvgSpan"),fc=me(function(t,e,r){return(t=Us([t],[],e)).height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),t.style.borderBottomWidth=K(t.height),t.maxFontSize=1,t},"makeLineSpan"),Il=me(function(t,e,r,i){return t=new as(t,e,r,i),Gs(t),t},"makeAnchor"),js=me(function(t){return t=new Ga(t),Gs(t),t},"makeFragment"),f=me(function(t,e){return t instanceof Ga?Us([],[t],e):t},"wrapFragment"),Ws=me(function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],i=-e[0].shift-e[0].elem.depth,n=i,a=1;a{var r=Us(["mspace"],[],e),t=Ja(t,e);return r.style.marginRight=K(t),r},"makeGlue"),Ys=me(function(t,e,r){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}return i+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},"retrieveTextFontName"),Hs={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"},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"}},Vs={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ac=me(function(t,e){var[t,r,i]=Vs[t],t=new hs(t),t=new cs([t],{width:K(r),height:K(i),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"});return(t=qs(["overlay"],[t],e)).height=i,t.style.height=K(i),t.style.width=K(r),t},"staticSvg"),Z={fontMap:Hs,makeSymbol:Fs,mathsym:gc,makeSpan:Us,makeSvgSpan:qs,makeLineSpan:fc,makeAnchor:Il,makeFragment:js,wrapFragment:f,makeVList:nc,makeOrd:Ol,makeGlue:Bl,staticSvg:ac,svgData:Vs,tryCombineChars:m},Xs={mord:{mop:y={number:3,unit:"mu"},mbin:gc={number:4,unit:"mu"},mrel:fc={number:5,unit:"mu"},minner:y},mop:{mord:y,mop:y,mrel:fc,minner:y},mbin:{mord:gc,mop:gc,mopen:gc,minner:gc},mrel:{mord:fc,mop:fc,mopen:fc,minner:fc},mopen:{},mclose:{mop:y,mbin:gc,mrel:fc,minner:y},mpunct:{mord:y,mop:y,mrel:fc,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:gc,mrel:fc,mopen:y,mpunct:y,minner:y}},Ks={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Zs={},Qs={},Js={},me(l,"defineFunction"),me(jn,"defineFunctionBuilders"),to=me(function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},"normalizeArgument"),eo=me(function(t){return"ordgroup"===t.type?t.body:[t]},"ordargument"),ro=Z.makeSpan,io=["leftmost","mbin","mopen","mrel","mop","mpunct"],no=["rightmost","mrel","mclose","mpunct"],ao={display:Sa.DISPLAY,text:Sa.TEXT,script:Sa.SCRIPT,scriptscript:Sa.SCRIPTSCRIPT},so={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},oo=me(function(t,e,r,i){void 0===i&&(i=[null,null]);for(var n,a,s=[],o=0;o{var r=e.classes[0],i=t.classes[0];"mbin"===r&&ya.contains(no,i)?e.classes[0]="mord":"mbin"===i&&ya.contains(io,r)&&(t.classes[0]="mord")},{node:a},i,r="root"===r),lo(s,(t,e)=>{var e=uo(e),r=uo(t);if(t=e&&r?(t.hasClass("mtight")?Ks:Xs)[e][r]:null)return Z.makeGlue(t,n)},{node:a},i,r)),s},"buildExpression"),lo=me(function t(r,e,i,n,a){n&&r.push(n);for(var s=0;st=>{r.splice(e+1,0,t),s++})(s))}n&&r.pop()},"traverseNonSpaceNodes"),co=me(function(t){return t instanceof Ga||t instanceof as||t instanceof ns&&t.hasClass("enclosing")?t:null},"checkPartialGroup"),ho=me(function t(e,r){var i=co(e);if(i&&(i=i.children).length){if("right"===r)return t(i[i.length-1],"right");if("left"===r)return t(i[0],"left")}return e},"getOutermostNode"),uo=me(function(t,e){return t&&(e&&(t=ho(t,e)),so[t.classes[0]])||null},"getTypeOfDomTree"),po=me(function(t,e){return t=["nulldelimiter"].concat(t.baseSizingClasses()),ro(e.concat(t))},"makeNullDelimiter"),go=me(function(t,e,r){if(!t)return ro();var i;if(Qs[t.type])return i=Qs[t.type](t,e),r&&e.size!==r.size&&(i=ro(e.sizingClasses(r),[i],e),e=e.sizeMultiplier/r.sizeMultiplier,i.height*=e,i.depth*=e),i;throw new X("Got group of unknown type: '"+t.type+"'")},"buildGroup"),me(Wn,"buildHTMLUnbreakable"),me(Yn,"buildHTML"),me(Hn,"newDocumentFragment"),fo=class{static{me(this,"MathNode")}constructor(t,e,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=r||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t,e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);0"}toText(){return this.children.map(t=>t.toText()).join("")}},mo=class{static{me(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return ya.escape(this.toText())}toText(){return this.text}},Il=class{static{me(this,"SpaceNode")}constructor(t){this.width=void 0,this.character=void 0,this.width=t,this.character=.05555<=t&&t<=.05556?" ":.1666<=t&&t<=.1667?" ":.2222<=t&&t<=.2223?" ":.2777<=t&&t<=.2778?"  ":-.05556<=t&&t<=-.05555?" ⁣":-.1667<=t&&t<=-.1666?" ⁣":-.2223<=t&&t<=-.2222?" ⁣":-.2778<=t&&t<=-.2777?" ⁣":null}toNode(){var t;return this.character?document.createTextNode(this.character):((t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",K(this.width)),t)}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character||" "}},E={MathNode:fo,TextNode:mo,SpaceNode:Il,newDocumentFragment:Hn},yo=me(function(t,e,r){return!gs[e][t]||!gs[e][t].replace||55349===t.charCodeAt(0)||ms.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=gs[e][t].replace),new E.TextNode(t)},"makeText"),vo=me(function(t){return 1===t.length?t[0]:new E.MathNode("mrow",t)},"makeRow"),xo=me(function(t,e){var r;return"texttt"===e.fontFamily?"monospace":"textsf"===e.fontFamily?"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif":"textit"===e.fontShape&&"textbf"===e.fontWeight?"bold-italic":"textit"===e.fontShape?"italic":"textbf"===e.fontWeight?"bold":(e=e.font)&&"mathnormal"!==e?(r=t.mode,"mathit"===e?"italic":"boldsymbol"===e?"textord"===t.type?"bold":"bold-italic":"mathbf"===e?"bold":"mathbb"===e?"double-struck":"mathfrak"===e?"fraktur":"mathscr"===e||"mathcal"===e?"script":"mathsf"===e?"sans-serif":"mathtt"===e?"monospace":!ya.contains(["\\imath","\\jmath"],t=t.text)&&zn(t=gs[r][t]&&gs[r][t].replace?gs[r][t].replace:t,Z.fontMap[e].fontName,r)?Z.fontMap[e].variant:null):null},"getVariant"),bo=me(function(t,e,r){var i;if(1===t.length)return i=ko(t[0],e),r&&i instanceof fo&&"mo"===i.type&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i];for(var n,a=[],s=0;s{t&&"supsub"===t.type?(o=(r=Xn(t.base,"accent")).base,t.base=o,i=qn(go(t,e)),t.base=r):o=(r=Xn(t,"accent")).base;var r,i,n,a,t=go(o,e.havingCrampedStyle()),s=0,o=(r.isShifty&&ya.isCharacterBox(o)&&(o=ya.getBaseElem(o),s=Un(go(o,e.havingCrampedStyle())).skew),"\\c"===r.label),l=o?t.height+t.depth:Math.min(t.height,e.fontMetrics().xHeight),c=r.isStretchy?(c=No.svgSpan(r,e),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0{var r=t.isStretchy?No.mathMLnode(t.label):new E.MathNode("mo",[yo(t.label,t.mode)]);return(t=new E.MathNode("mover",[ko(t.base,e),r])).setAttribute("accent","true"),t},"mathmlBuilder$9"),Ro=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).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:me((t,e)=>{var e=to(e[0]),r=!Ro.test(t.funcName),i=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:i,base:e}},"handler"),htmlBuilder:Io,mathmlBuilder:Bl}),l({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:me((t,e)=>{var e=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:e}},"handler"),htmlBuilder:Io,mathmlBuilder:Bl}),l({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"accentUnder",mode:t.mode,label:r,base:e}},"handler"),htmlBuilder:me((t,e)=>{var r=go(t.base,e),i=No.svgSpan(t,e),t="\\utilde"===t.label?.12:0,i=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:t},{type:"elem",elem:r}]},e);return Z.makeSpan(["mord","accentunder"],[i],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>{var r=No.mathMLnode(t.label);return(t=new E.MathNode("munder",[ko(t.base,e),r])).setAttribute("accentunder","true"),t},"mathmlBuilder")}),Mo=me(t=>((t=new E.MathNode("mpadded",t?[t]:[])).setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t),"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(t,e,r){var{parser:t,funcName:i}=t;return{type:"xArrow",mode:t.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r,i=e.style,n=e.havingStyle(i.sup()),a=Z.wrapFragment(go(t.body,n,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd",i=(a.classes.push(s+"-arrow-pad"),t.below&&(n=e.havingStyle(i.sub()),(r=Z.wrapFragment(go(t.below,n,e),e)).classes.push(s+"-arrow-pad")),No.svgSpan(t,e)),n=-e.fontMetrics().axisHeight+.5*i.height,s=-e.fontMetrics().axisHeight-.5*i.height-.111;return(.25"atom"!==(t="ordgroup"===t.type&&t.body.length?t.body[0]:t).type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family,"binrelClass"),l({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){return{type:"mclass",mode:(t=t.parser).mode,mclass:Oo(e[0]),body:eo(e[1]),isCharacterBox:ya.isCharacterBox(e[1])}}}),l({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:t,funcName:r}=t,i=e[1],e=e[0],n="\\stackrel"!==r?Oo(i):"mrel",i={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:eo(i)},i={type:"supsub",mode:e.mode,base:i,sup:"\\underset"===r?null:e,sub:"\\underset"===r?e:null};return{type:"mclass",mode:t.mode,mclass:n,body:[i],isCharacterBox:ya.isCharacterBox(i)}},htmlBuilder:Qn,mathmlBuilder:Jn}),l({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"pmb",mode:(t=t.parser).mode,mclass:Oo(e[0]),body:eo(e[0])}},htmlBuilder(t,e){var r=oo(t.body,e,!0);return(t=Z.makeSpan([t.mclass],r,e)).style.textShadow="0.02em 0.01em 0.04px",t},mathmlBuilder(t,e){return t=bo(t.body,e),(e=new E.MathNode("mstyle",t)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),e}}),Po={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Bo=me(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Fo=me(t=>"textord"===t.type&&"@"===t.text,"isStartOfArrow"),$o=me((t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e,"isLabelEnd"),me(ta,"cdArrow"),me(ea,"parseCD"),l({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup());return(r=Z.wrapFragment(go(t.label,r,e),e)).classes.push("cd-label-"+t.side),r.style.bottom=K(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){return e=new E.MathNode("mrow",[ko(t.label,e)]),(e=new E.MathNode("mpadded",[e])).setAttribute("width","0"),"left"===t.side&&e.setAttribute("lspace","-1width"),e.setAttribute("voffset","0.7em"),(e=new E.MathNode("mstyle",[e])).setAttribute("displaystyle","false"),e.setAttribute("scriptlevel","1"),e}}),l({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){return{type:"cdlabelparent",mode:(t=t.parser).mode,fragment:e[0]}},htmlBuilder(t,e){return(t=Z.wrapFragment(go(t.fragment,e),e)).classes.push("cd-vert-arrow"),t},mathmlBuilder(t,e){return new E.MathNode("mrow",[ko(t.fragment,e)])}}),l({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var t=t.parser,r=Xn(e[0],"ordgroup").body,i="",n=0;n>10),56320+(1023&e))),{type:"textord",mode:t.mode,text:e}}}),ac=me((t,e)=>(e=oo(t.body,e.withColor(t.color),!1),Z.makeFragment(e)),"htmlBuilder$8"),m=me((t,e)=>(e=bo(t.body,e.withColor(t.color)),(e=new E.MathNode("mstyle",e)).setAttribute("mathcolor",t.color),e),"mathmlBuilder$7"),l({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var t=t.parser,r=Xn(e[0],"color-token").color;return{type:"color",mode:t.mode,color:r,body:eo(e[1])}},htmlBuilder:ac,mathmlBuilder:m}),l({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:t,breakOnTokenText:r}=t,e=Xn(e[0],"color-token").color,r=(t.gullet.macros.set("\\current@color",e),t.parseExpression(!0,r));return{type:"color",mode:t.mode,color:e,body:r}},htmlBuilder:ac,mathmlBuilder:m}),l({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var i="["===(t=t.parser).gullet.future().text?t.parseSizeGroup(!0):null,n=!t.settings.displayMode||!t.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:t.mode,newLine:n,size:i&&Xn(i,"size").value}},htmlBuilder(t,e){var r=Z.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size)&&(r.style.marginTop=K(Ja(t.size,e))),r},mathmlBuilder(t,e){var r=new E.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size)&&r.setAttribute("height",K(Ja(t.size,e))),r}}),zo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Go=me(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new X("Expected a control sequence",t);return e},"checkControlSequence"),Uo=me(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text?t.gullet.popToken():e},"getRHS"),qo=me((t,e,r,i)=>{var n=t.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,n,i)},"letCommand"),l({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:t,funcName:e}=t,r=(t.consumeSpaces(),t.fetch());if(zo[r.text])return"\\global"!==e&&"\\\\globallong"!==e||(r.text=zo[r.text]),Xn(t.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(t){var{parser:e,funcName:t}=t,r=e.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new X("Expected a control sequence",r);for(var n,a=0,s=[[]];"{"!==e.gullet.future().text;)if("#"===(r=e.gullet.popToken()).text){if("{"===e.gullet.future().text){n=e.gullet.future(),s[a].push("{");break}if(r=e.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=e.gullet.consumeArg().tokens;return n&&o.unshift(n),"\\edef"!==t&&"\\xdef"!==t||(o=e.gullet.expandTokens(o)).reverse(),e.gullet.macros.set(i,{tokens:o,numArgs:a,delimiters:s},t===zo[t]),{type:"internal",mode:e.mode}}}),l({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=Go(t.gullet.popToken()),i=(t.gullet.consumeSpaces(),Uo(t));return qo(t,r,i,"\\\\globallet"===e),{type:"internal",mode:t.mode}}}),l({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=Go(t.gullet.popToken()),i=t.gullet.popToken(),n=t.gullet.popToken();return qo(t,r,n,"\\\\globalfuture"===e),t.gullet.pushToken(n),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}}),jo=me(function(t,e,r){if(r=zn(gs.math[t]&&gs.math[t].replace||t,e,r))return r;throw new Error("Unsupported symbol "+t+" and font size "+e+".")},"getMetrics"),Wo=me(function(t,e,r,i){return e=r.havingBaseStyle(e),i=Z.makeSpan(i.concat(e.sizingClasses(r)),[t],r),t=e.sizeMultiplier/r.sizeMultiplier,i.height*=t,i.depth*=t,i.maxFontSize=e.sizeMultiplier,i},"styleWrap"),Yo=me(function(t,e,r){r=e.havingBaseStyle(r),r=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight,t.classes.push("delimcenter"),t.style.top=K(r),t.height-=r,t.depth+=r},"centerSpan"),Ho=me(function(t,e,r,i,n,a){return t=Z.makeSymbol(t,"Main-Regular",n,i),n=Wo(t,e,i,a),r&&Yo(n,i,e),n},"makeSmallDelim"),Vo=me(function(t,e,r,i){return Z.makeSymbol(t,"Size"+e+"-Regular",r,i)},"mathrmSize"),Xo=me(function(t,e,r,i,n,a){return t=Vo(t,e,n,i),n=Wo(Z.makeSpan(["delimsizing","size"+e],[t],i),Sa.TEXT,i,a),r&&Yo(n,i,Sa.TEXT),n},"makeLargeDelim"),Ko=me(function(t,e,r){return{type:"elem",elem:Z.makeSpan(["delimsizinginner","Size1-Regular"===e?"delim-size1":"delim-size4"],[Z.makeSpan([],[Z.makeSymbol(t,e,r)])])}},"makeGlyphSpan"),Zo=me(function(t,e,r){var i=(Ua["Size4-Regular"][t.charCodeAt(0)]?Ua["Size4-Regular"]:Ua["Size1-Regular"])[t.charCodeAt(0)][4],t=new hs("inner",Fa(t,Math.round(1e3*e))),t=new cs([t],{width:K(i),height:K(e),style:"width:"+K(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"});return(t=Z.makeSvgSpan([],[t],r)).height=e,t.style.height=K(e),t.style.width=K(i),{type:"elem",elem:t}},"makeInner"),Qo={type:"kern",size:-.008},Jo=["|","\\lvert","\\rvert","\\vert"],tl=["\\|","\\lVert","\\rVert","\\Vert"],el=me(function(t,e,r,i,n,a){var s,o,l,c="",h=0,u=s=o=t,d=null,p="Size1-Regular",t=("\\uparrow"===t?s=o="⏐":"\\Uparrow"===t?s=o="‖":"\\downarrow"===t?u=s="⏐":"\\Downarrow"===t?u=s="‖":"\\updownarrow"===t?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===t?(u="\\Uparrow",s="‖",o="\\Downarrow"):ya.contains(Jo,t)?(s="∣",c="vert",h=333):ya.contains(tl,t)?(s="∥",c="doublevert",h=556):"["===t||"\\lbrack"===t?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===t||"\\rbrack"===t?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===t||"⌊"===t?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===t||"⌈"===t?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===t||"⌋"===t?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===t||"⌉"===t?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===t||"\\lparen"===t?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===t||"\\rparen"===t?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===t||"\\lbrace"===t?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(t=jo(u,p,n)).height+t.depth),g=(g=jo(s,p,n)).height+g.depth,f=(f=jo(o,p,n)).height+f.depth,m=0,y=1,e=(null!==d&&(m=(v=jo(d,p,n)).height+v.depth,y=2),(v=t+f+m)+Math.max(0,Math.ceil((e-v)/(y*g)))*y*g),v=i.fontMetrics().axisHeight,y=(r&&(v*=i.sizeMultiplier),e/2-v),g=[],v=(0","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],sl=[0,1.2,1.8,2.4,3],fc=me(function(t,e,r,i,n){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),ya.contains(il,t)||ya.contains(al,t))return Xo(t,e,!1,r,i,n);if(ya.contains(nl,t))return el(t,sl[e],!1,r,i,n);throw new X("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),ol=[{type:"small",style:Sa.SCRIPTSCRIPT},{type:"small",style:Sa.SCRIPT},{type:"small",style:Sa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ll=[{type:"small",style:Sa.SCRIPTSCRIPT},{type:"small",style:Sa.SCRIPT},{type:"small",style:Sa.TEXT},{type:"stack"}],cl=[{type:"small",style:Sa.SCRIPTSCRIPT},{type:"small",style:Sa.SCRIPT},{type:"small",style:Sa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],hl=me(function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},"delimTypeToFont"),ul=me(function(t,e,r,i){for(var n=Math.min(2,3-i.style.size);n"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle");var s=ya.contains(al,t)?ol:ya.contains(il,t)?cl:ll;return"small"===(s=ul(t,e,s,i)).type?Ho(t,s.style,r,i,n,a):"large"===s.type?Xo(t,s.size,r,i,n,a):el(t,e,r,i,n,a)},"makeCustomSizedDelim"),y=me(function(t,e,r,i,n,a){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,o=5/i.fontMetrics().ptPerEm,e=Math.max(e-s,r+s),r=Math.max(e/500*901,2*e-o);return dl(t,r,!0,i,n,a)},"makeLeftRightDelim"),pl={sqrtImage:gc,sizedDelim:fc,sizeToMaxHeight:sl,customSizedDelim:dl,leftRightDelim:y},gl={"\\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}},fl=["(","\\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","."],me(ra,"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:me((t,e)=>(e=ra(e[0],t),{type:"delimsizing",mode:t.parser.mode,size:gl[t.funcName].size,mclass:gl[t.funcName].mclass,delim:e.text}),"handler"),htmlBuilder:me((t,e)=>"."===t.delim?Z.makeSpan([t.mclass]):pl.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:me(t=>{var e=[],e=("."!==t.delim&&e.push(yo(t.delim,t.mode)),new E.MathNode("mo",e)),t=("mopen"===t.mclass||"mclose"===t.mclass?e.setAttribute("fence","true"):e.setAttribute("fence","false"),e.setAttribute("stretchy","true"),K(pl.sizeToMaxHeight[t.size]));return e.setAttribute("minsize",t),e.setAttribute("maxsize",t),e},"mathmlBuilder")}),me(ia,"assertParsed"),l({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{var r=t.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:t.parser.mode,delim:ra(e[0],t).text,color:r}},"handler")}),l({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{var e=ra(e[0],t),r=(++(t=t.parser).leftrightDepth,t.parseExpression(!1)),i=(--t.leftrightDepth,t.expect("\\right",!1),Xn(t.parseFunction(),"leftright-right"));return{type:"leftright",mode:t.mode,body:r,left:e.text,right:i.delim,rightColor:i.color}},"handler"),htmlBuilder:me((t,e)=>{ia(t);for(var r,i=oo(t.body,e,!0,["mopen","mclose"]),n=0,a=0,s=!1,o=0;o{ia(t);var r,e=bo(t.body,e);return"."!==t.left&&((r=new E.MathNode("mo",[yo(t.left,t.mode)])).setAttribute("fence","true"),e.unshift(r)),"."!==t.right&&((r=new E.MathNode("mo",[yo(t.right,t.mode)])).setAttribute("fence","true"),t.rightColor&&r.setAttribute("mathcolor",t.rightColor),e.push(r)),vo(e)},"mathmlBuilder")}),l({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{if(e=ra(e[0],t),t.parser.leftrightDepth)return{type:"middle",mode:t.parser.mode,delim:e.text};throw new X("\\middle without preceding \\left",e)},"handler"),htmlBuilder:me((t,e)=>{var r;return"."===t.delim?r=po(e,[]):(r=pl.sizedDelim(t.delim,1,e,t.mode,[]),t={delim:t.delim,options:e},r.isMiddle=t),r},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t="\\vert"===t.delim||"|"===t.delim?yo("|","text"):yo(t.delim,t.mode),(t=new E.MathNode("mo",[t])).setAttribute("fence","true"),t.setAttribute("lspace","0.05em"),t.setAttribute("rspace","0.05em"),t),"mathmlBuilder")}),Il=me((t,e)=>{var r,i,n,a,s,o=Z.wrapFragment(go(t.body,e),e),l=t.label.slice(1),c=e.sizeMultiplier,h=0,u=ya.isCharacterBox(t.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/c,h=-.5*e.fontMetrics().xHeight):"phase"===l?(a=Ja({number:.6,unit:"pt"},e),s=Ja({number:.35,unit:"ex"},e),c/=e.havingBaseSizing().sizeMultiplier,i=o.height+o.depth+a+s,o.style.paddingLeft=K(i/2+a),c=Math.floor(1e3*i*c),n=Oa(c),n=new cs([new hs("phase",n)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[n],e)).style.height=K(i),h=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.classes.push("boxpad"),i=n=c=0,n=/box/.test(l)?(i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),c=e.fontMetrics().fboxsep+("colorbox"===l?0:i)):"angl"===l?(c=4*(i=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=No.encloseSpan(o,l,c,n,e),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(i)):"angl"===l&&.049!==i&&(r.style.borderTopWidth=K(i),r.style.borderRightWidth=K(i)),h=o.depth+n,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor)&&(r.style.borderColor=t.borderColor)),s=t.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:0}]},e):(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}]},e)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],e):Z.makeSpan(["mord"],[s],e)},"htmlBuilder$7"),Ol=me((t,e)=>{var r=new E.MathNode(-1{if(!t.parser.settings.displayMode)throw new X("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),me(sa,"getAutoTag"),me(oa,"parseArray"),me(la,"dCellStyle"),f=me(function(t,e){var r=t.body.length,P=t.hLinesBeforeRow,i=0,n=new Array(r),a=[],s=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),o=1/e.fontMetrics().ptPerEm,l=5*o,c=(t.colSeparationType&&"small"===t.colSeparationType&&(l=e.havingStyle(Sa.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778),"CD"===t.colSeparationType?Ja({number:3,unit:"ex"},e):12*o),B=3*o,F=.7*(o=t.arraystretch*c),$=.3*o,h=0;function u(t){for(var e=0;et))for(M=0;Mt.length)),n.cols=new Array(i).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[n],left:e[0],right:e[1],rightColor:void 0}:n},htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){return(t=oa(t.parser,{arraystretch:.5},"script")).colSeparationType="small",t},htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){if(1<(e=(Zn(e[0])?[e[0]]:Xn(e[0],"ordgroup").body).map(function(t){var e=Kn(t).text;if(-1!=="lc".indexOf(e))return{type:"align",align:e};throw new X("Unknown column alignment: "+e,t)})).length)throw new X("{subarray} can contain only one column");if(0<(t=oa(t.parser,{cols:e,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1{var r=t.font,e=e.withFont(r);return go(t.body,e)},"htmlBuilder$5"),m=me((t,e)=>{var r=t.font,e=e.withFont(r);return ko(t.body,e)},"mathmlBuilder$4"),wl={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},l({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=to(e[0]);return{type:"font",mode:t.mode,font:(r=r in wl?wl[r]:r).slice(1),body:e}},"handler"),htmlBuilder:ac,mathmlBuilder:m}),l({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:me((t,e)=>{var t=t.parser,e=e[0],r=ya.isCharacterBox(e);return{type:"mclass",mode:t.mode,mclass:Oo(e),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:e}],isCharacterBox:r}},"handler")}),l({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:me((t,e)=>{var{parser:t,funcName:r,breakOnTokenText:i}=t,n=t.mode,i=t.parseExpression(!0,i);return{type:"font",mode:n,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:i}}},"handler"),htmlBuilder:ac,mathmlBuilder:m}),kl=me((t,e)=>("display"===t?e=e.id>=Sa.SCRIPT.id?e.text():Sa.DISPLAY:"text"===t&&e.size===Sa.DISPLAY.size?e=Sa.TEXT:"script"===t?e=Sa.SCRIPT:"scriptscript"===t&&(e=Sa.SCRIPTSCRIPT),e),"adjustStyle"),gc=me((t,e)=>{var r,i,n,a,s=kl(t.size,e.style),o=s.fracNum(),l=s.fracDen(),o=e.havingStyle(o),c=go(t.numer,o,e),h=(t.continued&&(h=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm,c.height=c.height{var r=new E.MathNode("mfrac",[ko(t.numer,e),ko(t.denom,e)]),i=(t.hasBarLine?t.barSize&&(i=Ja(t.barSize,e),r.setAttribute("linethickness",K(i))):r.setAttribute("linethickness","0px"),kl(t.size,e.style));return i.size!==e.style.size&&(r=new E.MathNode("mstyle",[r]),e=i.size===Sa.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")),null!=t.leftDelim||null!=t.rightDelim?(i=[],null!=t.leftDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.leftDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(e)),i.push(r),null!=t.rightDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.rightDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(e)),vo(i)):r},"mathmlBuilder$3"),l({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:me((t,e)=>{var r,{parser:t,funcName:i}=t,n=e[0],e=e[1],a=null,s=null,o="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,a="(",s=")";break;case"\\\\bracefrac":r=!1,a="\\{",s="\\}";break;case"\\\\brackfrac":r=!1,a="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:e,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:gc,mathmlBuilder:fc}),l({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:me((t,e)=>{var t=t.parser,r=e[0];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:e[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(t){var e,{parser:t,funcName:r,token:i}=t;switch(r){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:e,token:i}}}),Tl=["display","text","script","scriptscript"],El=me(function(t){var e=null;return 0{var t=t.parser,r=e[0],i=ma(Xn(e[1],"infix").size),e=e[2],n=0{var r,i,n=e.style,n="supsub"===t.type?(r=t.sup?go(t.sup,e.havingStyle(n.sup()),e):go(t.sub,e.havingStyle(n.sub()),e),Xn(t.base,"horizBrace")):Xn(t,"horizBrace"),t=go(n.base,e.havingBaseStyle(Sa.DISPLAY)),a=No.svgSpan(n,e);return(n.isOver?(i=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:.1},{type:"elem",elem:a}]},e)).children[0].children[0].children[1]:(i=Z.makeVList({positionType:"bottom",positionData:t.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:t}]},e)).children[0].children[0].children[0]).classes.push("svg-align"),r&&(a=Z.makeSpan(["mord",n.isOver?"mover":"munder"],[i],e),i=n.isOver?Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},e):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}]},e)),Z.makeSpan(["mord",n.isOver?"mover":"munder"],[i],e)},"htmlBuilder$3"),y=me((t,e)=>{var r=No.mathMLnode(t.label);return new E.MathNode(t.isOver?"mover":"munder",[ko(t.base,e),r])},"mathmlBuilder$2"),l({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"horizBrace",mode:t.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:Cl,mathmlBuilder:y}),l({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:me((t,e)=>{var t=t.parser,r=e[1],e=Xn(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:e})?{type:"href",mode:t.mode,href:e,body:eo(r)}:t.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:me((t,e)=>{var r=oo(t.body,e,!1);return Z.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>((e=(e=wo(t.body,e))instanceof fo?e:new fo("mrow",[e])).setAttribute("href",t.href),e),"mathmlBuilder")}),l({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:me((t,e)=>{var t=t.parser,r=Xn(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var i=[],n=0;n{var{parser:t,funcName:r}=t,i=Xn(e[0],"raw").string,e=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var n,a={};switch(r){case"\\htmlClass":n={command:"\\htmlClass",class:a.class=i};break;case"\\htmlId":n={command:"\\htmlId",id:a.id=i};break;case"\\htmlStyle":n={command:"\\htmlStyle",style:a.style=i};break;case"\\htmlData":for(var s=i.split(","),o=0;o{var r,i=oo(t.body,e,!1),n=["enclosing"],a=(t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/)),Z.makeSpan(n,i,e));for(r in t.attributes)"class"!==r&&t.attributes.hasOwnProperty(r)&&a.setAttribute(r,t.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:me((t,e)=>wo(t.body,e),"mathmlBuilder")}),l({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:me((t,e)=>({type:"htmlmathml",mode:(t=t.parser).mode,html:eo(e[0]),mathml:eo(e[1])}),"handler"),htmlBuilder:me((t,e)=>(t=oo(t.html,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>wo(t.mathml,e),"mathmlBuilder")}),_l=me(function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new X("Invalid size: '"+t+"' in \\includegraphics");if(t={number:+(e[1]+e[2]),unit:e[3]},Qa(t))return t;throw new X("Invalid unit: '"+t.unit+"' in \\includegraphics.")},"sizeData"),l({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:me((t,e,r)=>{var t=t.parser,i={number:0,unit:"em"},n={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Xn(r[0],"raw").string.split(","),l=0;l{var r=Ja(t.height,e),i=0,n=(0{var r=new E.MathNode("mglyph",[]),i=(r.setAttribute("alt",t.alt),Ja(t.height,e)),n=0;return 0{var{parser:t,funcName:r}=t,e=e[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:e}},"handler"),htmlBuilder:me((t,e)=>{var r="clap"===t.alignment?(r=Z.makeSpan([],[go(t.body,e)]),Z.makeSpan(["inner"],[r],e)):Z.makeSpan(["inner"],[go(t.body,e)]),i=Z.makeSpan(["fix"],[]),t=Z.makeSpan([t.alignment],[r,i],e);return(r=Z.makeSpan(["strut"])).style.height=K(t.height+t.depth),t.depth&&(r.style.verticalAlign=K(-t.depth)),t.children.unshift(r),t=Z.makeSpan(["thinbox"],[t],e),Z.makeSpan(["mord","vbox"],[t],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(e=new E.MathNode("mpadded",[ko(t.body,e)]),"rlap"!==t.alignment&&(t="llap"===t.alignment?"-1":"-0.5",e.setAttribute("lspace",t+"width")),e.setAttribute("width","0px"),e),"mathmlBuilder")}),l({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:t,parser:r}=t,i=r.mode,t=(r.switchMode("math"),"\\("===t?"\\)":"$"),n=r.parseExpression(!1,t);return r.expect(t),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:n}}}),l({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new X("Mismatched "+t.funcName)}}),Sl=me((t,e)=>{switch(e.style.size){case Sa.DISPLAY.size:return t.display;case Sa.TEXT.size:return t.text;case Sa.SCRIPT.size:return t.script;case Sa.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle"),l({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:me((t,e)=>({type:"mathchoice",mode:(t=t.parser).mode,display:eo(e[0]),text:eo(e[1]),script:eo(e[2]),scriptscript:eo(e[3])}),"handler"),htmlBuilder:me((t,e)=>(t=Sl(t,e),t=oo(t,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=Sl(t,e),wo(t,e)),"mathmlBuilder")}),Al=me((t,e,r,i,n,a,s)=>{t=Z.makeSpan([],[t]);var o,l,c=r&&ya.isCharacterBox(r);if(e&&(o={elem:e=go(e,i.havingStyle(n.sup()),i),kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-e.depth)}),r&&(l={elem:e=go(r,i.havingStyle(n.sub()),i),kern:Math.max(i.fontMetrics().bigOpSpacing2,i.fontMetrics().bigOpSpacing4-e.height)}),o&&l)var r=i.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i);else if(l)n=t.height-s,h=Z.makeVList({positionType:"top",positionData:n,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},i);else{if(!o)return t;e=t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:e,children:[{type:"elem",elem:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i)}return r=[h],l&&0!==a&&!c&&((n=Z.makeSpan(["mspace"],[],i)).style.marginRight=K(a),r.unshift(n)),Z.makeSpan(["mop","op-limits"],r,i)},"assembleSupSub"),Ll=["\\smallint"],Nl=me((t,e)=>{var r,i,n,a=!1,s=("supsub"===t.type?(r=t.sup,i=t.sub,n=Xn(t.base,"op"),a=!0):n=Xn(t,"op"),!1);if((t=e.style).size===Sa.DISPLAY.size&&n.symbol&&!ya.contains(Ll,n.name)&&(s=!0),n.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.slice(1),n.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(n.name,l,"math",e,["mop","op-symbol",s?"large-op":"small-op"]),0{var r;return t.symbol?(r=new fo("mo",[yo(t.name,t.mode)]),ya.contains(Ll,t.name)&&r.setAttribute("largeop","false")):r=t.body?new fo("mo",bo(t.body,e)):(r=new fo("mi",[new mo(t.name.slice(1))]),e=new fo("mo",[yo("⁡","text")]),t.parentIsSupSub?new fo("mrow",[r,e]):Hn([r,e])),r},"mathmlBuilder$1"),Rl={"∏":"\\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:me((t,e)=>{var{parser:t,funcName:r}=t;return 1===r.length&&(r=Rl[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Nl,mathmlBuilder:Il}),l({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:eo(e)}),"handler"),htmlBuilder:Nl,mathmlBuilder:Il}),Ml={"∫":"\\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(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Nl,mathmlBuilder:Il}),l({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Nl,mathmlBuilder:Il}),l({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return 1===e.length&&(e=Ml[e]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:e}},htmlBuilder:Nl,mathmlBuilder:Il}),Dl=me((t,e)=>{var r,i,n,a,s=!1;if("supsub"===t.type?(r=t.sup,i=t.sub,n=Xn(t.base,"operatorname"),s=!0):n=Xn(t,"operatorname"),0{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),o=oo(t,e.withFont("mathrm"),!0),l=0;l{for(var r=bo(t.body,e.withFont("mathrm")),i=!0,n=0;nt.toText()).join(""),r=[new E.TextNode(e)]),(e=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new E.MathNode("mo",[yo("⁡","text")]);return t.parentIsSupSub?new E.MathNode("mrow",[e,o]):E.newDocumentFragment([e,o])},"mathmlBuilder"),l({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"operatorname",mode:t.mode,body:eo(e),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Dl,mathmlBuilder:Ol}),h("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),jn({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Z.makeFragment(oo(t.body,e,!1)):Z.makeSpan(["mord"],oo(t.body,e,!0),e)},mathmlBuilder(t,e){return wo(t.body,e,!0)}}),l({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){return t=t.parser,e=e[0],{type:"overline",mode:t.mode,body:e}},htmlBuilder(t,e){var t=go(t.body,e.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,t=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},e);return Z.makeSpan(["mord","overline"],[t],e)},mathmlBuilder(t,e){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new E.MathNode("mover",[ko(t.body,e),r])).setAttribute("accent","true"),t}}),l({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"phantom",mode:t.mode,body:eo(e)}),"handler"),htmlBuilder:me((t,e)=>(t=oo(t.body,e.withPhantom(),!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=bo(t.body,e),new E.MathNode("mphantom",t)),"mathmlBuilder")}),l({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"hphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:me((t,e)=>{var r=Z.makeSpan([],[go(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var i=0;i(t=bo(eo(t.body),e),e=new E.MathNode("mphantom",t),(t=new E.MathNode("mpadded",[e])).setAttribute("height","0px"),t.setAttribute("depth","0px"),t),"mathmlBuilder")}),l({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"vphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:me((t,e)=>{var t=Z.makeSpan(["inner"],[go(t.body,e.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[t,r],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=bo(eo(t.body),e),e=new E.MathNode("mphantom",t),(t=new E.MathNode("mpadded",[e])).setAttribute("width","0px"),t),"mathmlBuilder")}),l({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var t=t.parser,r=Xn(e[0],"size").value;return{type:"raisebox",mode:t.mode,dy:r,body:e[1]}},htmlBuilder(t,e){var r=go(t.body,e),t=Ja(t.dy,e);return Z.makeVList({positionType:"shift",positionData:-t,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return e=new E.MathNode("mpadded",[ko(t.body,e)]),t=t.dy.number+t.dy.unit,e.setAttribute("voffset",t),e}}),l({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){return{type:"internal",mode:(t=t.parser).mode}}}),l({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var t=t.parser,r=r[0],i=Xn(e[0],"size"),e=Xn(e[1],"size");return{type:"rule",mode:t.mode,shift:r&&Xn(r,"size").value,width:i.value,height:e.value}},htmlBuilder(t,e){var r=Z.makeSpan(["mord","rule"],[],e),i=Ja(t.width,e),n=Ja(t.height,e),t=t.shift?Ja(t.shift,e):0;return r.style.borderRightWidth=K(i),r.style.borderTopWidth=K(n),r.style.bottom=K(t),r.width=i,r.height=n+t,r.depth=-t,r.maxFontSize=1.125*n*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Ja(t.width,e),i=Ja(t.height,e),t=t.shift?Ja(t.shift,e):0,e=e.color&&e.getColor()||"black",n=new E.MathNode("mspace"),e=(n.setAttribute("mathbackground",e),n.setAttribute("width",K(r)),n.setAttribute("height",K(i)),new E.MathNode("mpadded",[n]));return 0<=t?e.setAttribute("height",K(t)):(e.setAttribute("height",K(t)),e.setAttribute("depth",K(-t))),e.setAttribute("voffset",K(t)),e}}),me(ca,"sizingGroup"),Pl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Bl=me((t,e)=>{var r=e.havingSize(t.size);return ca(t.body,r,e)},"htmlBuilder"),l({type:"sizing",names:Pl,props:{numArgs:0,allowedInText:!0},handler:me((t,e)=>{var{breakOnTokenText:t,funcName:r,parser:i}=t,t=i.parseExpression(!1,t);return{type:"sizing",mode:i.mode,size:Pl.indexOf(r)+1,body:t}},"handler"),htmlBuilder:Bl,mathmlBuilder:me((t,e)=>(e=e.havingSize(t.size),t=bo(t.body,e),(t=new E.MathNode("mstyle",t)).setAttribute("mathsize",K(e.sizeMultiplier)),t),"mathmlBuilder")}),l({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:me((t,e,r)=>{var t=t.parser,i=!1,n=!1,a=r[0]&&Xn(r[0],"ordgroup");if(a)for(var s,o=0;o{var r=Z.makeSpan([],[go(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var i=0;i(e=new E.MathNode("mpadded",[ko(t.body,e)]),t.smashHeight&&e.setAttribute("height","0px"),t.smashDepth&&e.setAttribute("depth","0px"),e),"mathmlBuilder")}),l({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){return t=t.parser,r=r[0],e=e[0],{type:"sqrt",mode:t.mode,body:e,index:r}},htmlBuilder(t,e){0===(r=go(t.body,e.havingCrampedStyle())).height&&(r.height=e.fontMetrics().xHeight);var r=Z.wrapFragment(r,e),i=n=e.fontMetrics().defaultRuleThickness,i=n+(e.style.idr.height+r.depth+i&&(i=(i+o-r.height-r.depth)/2),n.height-r.height-i-a),i=(r.style.paddingLeft=K(s),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+o)},{type:"elem",elem:n},{type:"kern",size:a}]},e));return t.index?(s=e.havingStyle(Sa.SCRIPTSCRIPT),r=go(t.index,s,e),o=.6*(i.height-i.depth),n=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},e),a=Z.makeSpan(["root"],[n]),Z.makeSpan(["mord","sqrt"],[a,i],e)):Z.makeSpan(["mord","sqrt"],[i],e)},mathmlBuilder(t,e){var{body:t,index:r}=t;return r?new E.MathNode("mroot",[ko(t,e),ko(r,e)]):new E.MathNode("msqrt",[ko(t,e)])}}),Fl={display:Sa.DISPLAY,text:Sa.TEXT,script:Sa.SCRIPT,scriptscript:Sa.SCRIPTSCRIPT},l({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:t,funcName:r,parser:i}=t,t=i.parseExpression(!0,t),r=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:r,body:t}},htmlBuilder(t,e){var r=Fl[t.style],r=e.havingStyle(r).withFont("");return ca(t.body,r,e)},mathmlBuilder(t,e){var r=Fl[t.style],e=e.havingStyle(r),r=bo(t.body,e),e=new E.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return e.setAttribute("scriptlevel",r[0]),e.setAttribute("displaystyle",r[1]),e}}),$l=me(function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===Sa.DISPLAY.size||r.alwaysHandleSupSub)?Nl:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===Sa.DISPLAY.size||r.limits)?Dl:null:"accent"===r.type?ya.isCharacterBox(r.base)?Io:null:"horizBrace"===r.type&&!t.sub===r.isOver?Cl:null:null},"htmlBuilderDelegate"),jn({type:"supsub",htmlBuilder(t,e){if(a=$l(t,e))return a(t,e);var r,i,n,{base:a,sup:s,sub:o}=t,l=go(a,e),c=e.fontMetrics(),h=0,u=0,a=a&&ya.isCharacterBox(a),o=(s&&(n=e.havingStyle(e.style.sup()),r=go(s,n,e),a||(h=l.height-n.fontMetrics().supDrop*n.sizeMultiplier/e.sizeMultiplier)),o&&(s=e.havingStyle(e.style.sub()),i=go(o,s,e),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/e.sizeMultiplier)),n=e.style===Sa.DISPLAY?c.sup1:e.style.cramped?c.sup3:c.sup2,e.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(i&&(o=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name),l instanceof ls||o)&&(s=K(-l.italic)),r&&i){h=Math.max(h,n,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),t=4*c.defaultRuleThickness,h-r.depth-(i.height-u){var t=new E.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad"),jn({type:"tag",mathmlBuilder(t,e){return(t=new E.MathNode("mtable",[new E.MathNode("mtr",[ql(),new E.MathNode("mtd",[wo(t.body,e)]),ql(),new E.MathNode("mtd",[wo(t.tag,e)])])])).setAttribute("width","100%"),t}}),jl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Wl={"\\textbf":"textbf","\\textmd":"textmd"},Yl={"\\textit":"textit","\\textup":"textup"},Hl=me((t,e)=>(t=t.font)?jl[t]?e.withTextFontFamily(jl[t]):Wl[t]?e.withTextFontWeight(Wl[t]):"\\emph"===t?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(Yl[t]):e,"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(t,e){var{parser:t,funcName:r}=t,e=e[0];return{type:"text",mode:t.mode,body:eo(e),font:r}},htmlBuilder(t,e){return e=Hl(t,e),t=oo(t.body,e,!0),Z.makeSpan(["mord","text"],t,e)},mathmlBuilder(t,e){return e=Hl(t,e),wo(t.body,e)}}),l({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"underline",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=go(t.body,e),r=Z.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:t}]},e);return Z.makeSpan(["mord","underline"],[r],e)},mathmlBuilder(t,e){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new E.MathNode("munder",[ko(t.body,e),r])).setAttribute("accentunder","true"),t}}),l({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){return{type:"vcenter",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=go(t.body,e),r=e.fontMetrics().axisHeight,r=.5*(t.height-r-(t.depth+r));return Z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(t,e){return new E.MathNode("mpadded",[ko(t.body,e)],["vcenter"])}}),l({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new X("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=Vl(t),i=[],n=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" "),"makeVerb"),Xl=Zs,Kl=new RegExp("[̀-ͯ]+$"),Zl=class{static{me(this,"Lexer")}constructor(t,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=e,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(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new ua("EOF",new ha(this,e,e));if(null===(i=this.tokenRegex.exec(t))||i.index!==e)throw new X("Unexpected character: '"+t[e]+"'",new ua(t[e],new ha(this,e,e+1)));var r,i=i[6]||i[3]||(i[2]?"\\ ":" ");return 14===this.catcodes[i]?(-1===(r=t.indexOf(` -`,this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=r+1,this.lex()):new ua(i,new ha(this,e,this.tokenRegex.lastIndex))}},Ql=class{static{me(this,"Namespace")}constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,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 t,e=this.undefStack.pop();for(t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0{var i=t.consumeArg().tokens;if(1!==i.length)throw new X("\\newcommand's first argument must be a macro name");var n=i[0].text,a=t.isDefined(n);if(a&&!e)throw new X("\\newcommand{"+n+"} attempting to redefine "+n+"; use \\renewcommand");if(!a&&!r)throw new X("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");if(e=0,1===(i=t.consumeArg().tokens).length&&"["===i[0].text){for(var s="",o=t.expandNextToken();"]"!==o.text&&"EOF"!==o.text;)s+=o.text,o=t.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+s);e=parseInt(s),i=t.consumeArg().tokens}return t.macros.set(n,{tokens:i,numArgs:e}),""},"newcommand"),h("\\newcommand",t=>ec(t,!1,!0)),h("\\renewcommand",t=>ec(t,!0,!1)),h("\\providecommand",t=>ec(t,!0,!0)),h("\\message",t=>(t=t.consumeArgs(1)[0],console.log(t.reverse().map(t=>t.text).join("")),"")),h("\\errmessage",t=>(t=t.consumeArgs(1)[0],console.error(t.reverse().map(t=>t.text).join("")),"")),h("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Xl[r],gs.math[r],gs.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","\\mathord{\\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\\;"),rc={",":"\\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(t){var e="\\dotso";return(t=t.expandAfterFuture().text)in rc?e=rc[t]:("\\not"===t.slice(0,4)||t in gs.math&&ya.contains(["bin","rel"],gs.math[t].group))&&(e="\\dotsb"),e}),ic={")":!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(t){return t.future().text in ic?"\\ldots\\,":"\\ldots"}),h("\\dotsc",function(t){return(t=t.future().text)in ic&&","!==t?"\\ldots\\,":"\\ldots"}),h("\\cdots",function(t){return t.future().text in ic?"\\@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",t=>{if(t.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{"+(nc=K(Ua["Main-Regular"][84][1]-.7*Ua["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),h("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+nc+"}{\\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",(ac=me(l=>t=>{var e=t.consumeArg().tokens,i=t.consumeArg().tokens,n=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|"),o=(t.macros.beginGroup(),me(r=>t=>{l&&(t.macros.set("|",a),n.length)&&t.macros.set("\\|",s);var e=r;return!r&&n.length&&"|"===t.future().text&&(t.popToken(),e=!0),{tokens:e?n:i,numArgs:0}},"midMacro")),o=(t.macros.set("|",o(!1)),n.length&&t.macros.set("\\|",o(!0)),t.consumeArg().tokens),r=t.expandTokens([...r,...o,...e]);return t.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),h("\\bra@set",ac(!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}"),sc={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},oc=class{static{me(this,"MacroExpander")}constructor(t,e,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=e,this.expansionCount=0,this.feed(t),this.macros=new Ql(Jl,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Zl(t,this.settings)}switchMode(t){this.mode=t}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(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,r,i;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:e,end:r}=this.consumeArg());return this.pushToken(new ua("EOF",r.loc)),this.pushTokens(i),e.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(t){var e,r=[],i=t&&0this.settings.maxExpand)throw new X("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),r=e.text,i=e.noexpand?null:this._getExpansion(r);if(null==i||t&&i.unexpandable){if(t&&null==i&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(e),!1}this.countExpansion(1);var n=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs)for(var s=(n=n.slice()).length-1;0<=s;--s){var o=n[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=n[--s]).text)n.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);n.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var t;if(!1===this.expandOnce())return(t=this.stack.pop()).treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new ua(t)]):void 0}expandTokens(t){var e,r=[],i=this.stack.length;for(this.pushTokens(t);this.stack.length>i;)!1===this.expandOnce(!0)&&((e=this.stack.pop()).treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),r.push(e));return this.countExpansion(r.length),r}expandMacroAsText(t){return(t=this.expandMacro(t))&&t.map(t=>t.text).join("")}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1!==t.length||null==(t=this.lexer.catcodes[t])||13===t){if("string"!=typeof(t="function"==typeof e?e(this):e))return t;var r=0;if(-1!==t.indexOf("#"))for(var i=t.replace(/##/g,"");-1!==i.indexOf("#"+(r+1));)++r;for(var n=new Zl(t,this.settings),a=[],s=n.lex();"EOF"!==s.text;)a.push(s),s=n.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(t){return this.macros.has(t)||Xl.hasOwnProperty(t)||gs.math.hasOwnProperty(t)||gs.text.hasOwnProperty(t)||sc.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:Xl.hasOwnProperty(t)&&!Xl[t].primitive}},lc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,cc=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),hc={"́":{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"}},uc={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(dc=class a{static{me(this,"Parser")}constructor(t,e){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 oc(t,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new X("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken,t=(this.consume(),this.gullet.pushToken(new ua("}")),this.gullet.pushTokens(t),this.parseExpression(!1));return this.expect("}"),this.nextToken=e,t}parseExpression(t,e){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==a.endOfExpression.indexOf(i.text)||e&&i.text===e||t&&Xl[i.text]&&Xl[i.text].infix)break;if(!(i=this.parseAtom(e)))break;"internal"!==i.type&&r.push(i)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,r,i,n=-1,a=0;a{t instanceof Element&&"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Rn.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target"))&&t.setAttribute("rel","noopener")})}var wc,kc,Tc,Ec,Cc,_c,Sc,Ac,Lc,Nc,Ic,Rc,Mc,Dc,Oc,Pc,Bc,Fc,$c,zc,Gc,Uc,qc,jc,L,Wc,Yc,Hc,Vc,Xc,Kc,Zc,Qc,Jc=t(()=>{Mn(),wc=//gi,kc=me(t=>t?Ic(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Tc=(()=>{let t=!1;return()=>{t||(bc(),t=!0)}})(),me(bc,"setupDompurifyHooks"),Ec=me(t=>(Tc(),Rn.sanitize(t)),"removeScript"),Cc=me((t,e)=>(!1!==e.flowchart?.htmlLabels&&("antiscript"===(e=e.securityLevel)||"strict"===e?t=Ec(t):"loose"!==e&&(t=(t=(t=Ic(t)).replace(//g,">")).replace(/=/g,"="),t=Nc(t))),t),"sanitizeMore"),_c=me((t,e)=>t&&(e.dompurifyConfig?Rn.sanitize(Cc(t,e),e.dompurifyConfig):Rn.sanitize(Cc(t,e),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Sc=me((t,e)=>"string"==typeof t?_c(t,e):t.flat().map(t=>_c(t,e)),"sanitizeTextOrArray"),Ac=me(t=>wc.test(t),"hasBreaks"),Lc=me(t=>t.split(wc),"splitBreaks"),Nc=me(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Ic=me(t=>t.replace(wc,"#br#"),"breakToPlaceholder"),Rc=me(t=>{let e="";return e=t?(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replaceAll(/\(/g,"\\(")).replaceAll(/\)/g,"\\)"):e},"getUrl"),Mc=me(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Dc=me(function(...t){return t=t.filter(t=>!isNaN(t)),Math.max(...t)},"getMax"),Oc=me(function(...t){return t=t.filter(t=>!isNaN(t)),Math.min(...t)},"getMin"),Pc=me(function(t){var r,i,n=t.split(/(,)/),a=[];for(let e=0;eMath.max(0,t.split(e).length-1),"countOccurrence"),Fc=me((t,e)=>(t=Bc(t,"~"),e=Bc(e,"~"),1===t&&1===e),"shouldCombineSets"),$c=me(t=>{let e=Bc(t,"~"),r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let i=[...t],n=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==n&&-1!==a&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),zc=me(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Gc=/\$\$(.*)\$\$/g,Uc=me(t=>0<(t.match(Gc)?.length??0),"hasKatex"),qc=me(async(t,e)=>(t=await jc(t,e),(e=document.createElement("div")).innerHTML=t,e.id="katex-temp",e.style.visibility="hidden",e.style.position="absolute",e.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",e),t={width:e.clientWidth,height:e.clientHeight},e.remove(),t),"calculateMathMLDimensions"),jc=me(async(t,e)=>{if(!Uc(t))return t;if(!(zc()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Gc,"MathML is unsupported in this environment.");let r=(await Promise.resolve().then(()=>(xc(),Dn))).default,i=e.forceLegacyMathML||!zc()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(wc).map(t=>Uc(t)?`
${t}
`:`
${t}
`).join("").replace(Gc,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),L={getRows:kc,sanitizeText:_c,sanitizeTextOrArray:Sc,hasBreaks:Ac,splitBreaks:Lc,lineBreakRegex:wc,removeScript:Ec,getUrl:Rc,evaluate:Mc,getMax:Dc,getMin:Oc}}),th=t(()=>{e(),Wc=me(function(t,e){for(var r of e)t.attr(r[0],r[1])},"d3Attrs"),Yc=me(function(t,e,r){var i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Hc=me(function(t,e,r,i){e=Yc(e,r,i),Wc(t,e)},"configureSvgSize"),Vc=me(function(t,e,r,i){var n=e.node().getBBox(),a=n.width,s=(M.info(`SVG bounds: ${a}x`+(s=n.height),n),M.info("Graph bounds: 0x0",t),M.info(`Calculated bounds: ${t=a+2*r}x`+(a=s+2*r)),Hc(e,a,t,i),`${n.x-r} ${n.y-r} ${n.width+2*r} `+(n.height+2*r));e.attr("viewBox",s)},"setupGraphViewbox")}),eh=t(()=>{e(),Xc={},Kc=me((t,e,r)=>{let i="";return t in Xc&&Xc[t]?i=Xc[t](r):M.warn("No theme found for "+t),` & { +-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"),Ua=class{static{me(this,"DocumentFragment")}constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return va.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;et.toText(),"toText");return this.children.map(t).join("")}},qa={"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]}},ja={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Wa={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"},me(zi,"setFontMetrics"),me(Gi,"getCharacterMetrics"),Ya={},me(Ui,"getGlobalMetrics"),Ha=[[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]],Va=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Xa=me(function(t,e){return e.size<2?t:Ha[t-1][e.size-1]},"sizeAtStyle"),(Ka=class i{static{me(this,"Options")}constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||i.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Va[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var e,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(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);return new i(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Xa(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Va[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Xa(i.BASESIZE,t);return this.size===e&&this.textSize===i.BASESIZE&&this.style===t?this:this.extend({style:t,size:e})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==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,Za={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},Qa={ex:!0,em:!0,mu:!0},Ja=me(function(t){return(t="string"!=typeof t?t.unit:t)in Za||t in Qa||"ex"===t},"validUnit"),ts=me(function(t,e){var r;if(t.unit in Za)r=Za[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var n=e.style.isTight()?e.havingStyle(e.style.text()):e;if("ex"===t.unit)r=n.fontMetrics().xHeight;else{if("em"!==t.unit)throw new X("Invalid unit: '"+t.unit+"'");r=n.fontMetrics().quad}n!==e&&(r*=n.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},"calculateSize"),K=me(function(t){return+t.toFixed(4)+"em"},"makeEm"),es=me(function(t){return t.filter(t=>t).join(" ")},"createClass"),rs=me(function(t,e,r){this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},e&&(e.style.isTight()&&this.classes.push("mtight"),t=e.getColor())&&(this.style.color=t)},"initNode"),ns=me(function(t){var e,r,n=document.createElement(t);for(e in n.className=es(this.classes),this.style)this.style.hasOwnProperty(e)&&(n.style[e]=this.style[e]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i"},"toMarkup"),as=class{static{me(this,"Span")}constructor(t,e,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,rs.call(this,t,r,n),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return va.contains(this.classes,t)}toNode(){return ns.call(this,"span")}toMarkup(){return is.call(this,"span")}},ss=class{static{me(this,"Anchor")}constructor(t,e,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,rs.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return va.contains(this.classes,t)}toNode(){return ns.call(this,"a")}toMarkup(){return is.call(this,"a")}},os=class{static{me(this,"Img")}constructor(t,e,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=e,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return va.contains(this.classes,t)}toNode(){var t,e=document.createElement("img");for(t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var t,e=''+va.escape(this.alt)+'"}},ls={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},cs=class{static{me(this,"SymbolNode")}constructor(t,e,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=t,this.height=e||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,(t=Fi(this.text.charCodeAt(0)))&&this.classes.push(t+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ls[this.text])}hasClass(t){return va.contains(this.classes,t)}toNode(){var t,e=document.createTextNode(this.text),r=null;for(t in 0":i}},hs=class{static{me(this,"SvgNode")}constructor(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r"}},us=class{static{me(this,"PathNode")}constructor(t,e){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=e}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",za[this.pathName]),t}toMarkup(){return this.alternate?'':''}},ds=class{static{me(this,"LineNode")}constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","line");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var t,e=""}},me(qi,"assertSymbolDomNode"),me(ji,"assertSpan"),ps={bin:1,close:1,inner:1,open:1,punct:1,rel:1},gs={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},fs={math:{},text:{}},me(o,"defineSymbol"),d="text",y="ams",sc="accent-token",m="bin",Rl="close",Fl="inner",ms="mathord",ac="op-token",mc="open",Pl="punct",fc="spacing",g="textord",o(u="math",p="main",f="rel","≡","\\equiv",!0),o(u,p,f,"≺","\\prec",!0),o(u,p,f,"≻","\\succ",!0),o(u,p,f,"∼","\\sim",!0),o(u,p,f,"⊥","\\perp"),o(u,p,f,"⪯","\\preceq",!0),o(u,p,f,"⪰","\\succeq",!0),o(u,p,f,"≃","\\simeq",!0),o(u,p,f,"∣","\\mid",!0),o(u,p,f,"≪","\\ll",!0),o(u,p,f,"≫","\\gg",!0),o(u,p,f,"≍","\\asymp",!0),o(u,p,f,"∥","\\parallel"),o(u,p,f,"⋈","\\bowtie",!0),o(u,p,f,"⌣","\\smile",!0),o(u,p,f,"⊑","\\sqsubseteq",!0),o(u,p,f,"⊒","\\sqsupseteq",!0),o(u,p,f,"≐","\\doteq",!0),o(u,p,f,"⌢","\\frown",!0),o(u,p,f,"∋","\\ni",!0),o(u,p,f,"∝","\\propto",!0),o(u,p,f,"⊢","\\vdash",!0),o(u,p,f,"⊣","\\dashv",!0),o(u,p,f,"∋","\\owns"),o(u,p,Pl,".","\\ldotp"),o(u,p,Pl,"⋅","\\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,Rl,"⎱","\\rmoustache",!0),o(u,p,mc,"⎰","\\lmoustache",!0),o(u,p,Rl,"⟯","\\rgroup",!0),o(u,p,mc,"⟮","\\lgroup",!0),o(u,p,m,"∓","\\mp",!0),o(u,p,m,"⊖","\\ominus",!0),o(u,p,m,"⊎","\\uplus",!0),o(u,p,m,"⊓","\\sqcap",!0),o(u,p,m,"∗","\\ast"),o(u,p,m,"⊔","\\sqcup",!0),o(u,p,m,"◯","\\bigcirc",!0),o(u,p,m,"∙","\\bullet",!0),o(u,p,m,"‡","\\ddagger"),o(u,p,m,"≀","\\wr",!0),o(u,p,m,"⨿","\\amalg"),o(u,p,m,"&","\\And"),o(u,p,f,"⟵","\\longleftarrow",!0),o(u,p,f,"⇐","\\Leftarrow",!0),o(u,p,f,"⟸","\\Longleftarrow",!0),o(u,p,f,"⟶","\\longrightarrow",!0),o(u,p,f,"⇒","\\Rightarrow",!0),o(u,p,f,"⟹","\\Longrightarrow",!0),o(u,p,f,"↔","\\leftrightarrow",!0),o(u,p,f,"⟷","\\longleftrightarrow",!0),o(u,p,f,"⇔","\\Leftrightarrow",!0),o(u,p,f,"⟺","\\Longleftrightarrow",!0),o(u,p,f,"↦","\\mapsto",!0),o(u,p,f,"⟼","\\longmapsto",!0),o(u,p,f,"↗","\\nearrow",!0),o(u,p,f,"↩","\\hookleftarrow",!0),o(u,p,f,"↪","\\hookrightarrow",!0),o(u,p,f,"↘","\\searrow",!0),o(u,p,f,"↼","\\leftharpoonup",!0),o(u,p,f,"⇀","\\rightharpoonup",!0),o(u,p,f,"↙","\\swarrow",!0),o(u,p,f,"↽","\\leftharpoondown",!0),o(u,p,f,"⇁","\\rightharpoondown",!0),o(u,p,f,"↖","\\nwarrow",!0),o(u,p,f,"⇌","\\rightleftharpoons",!0),o(u,y,f,"≮","\\nless",!0),o(u,y,f,"","\\@nleqslant"),o(u,y,f,"","\\@nleqq"),o(u,y,f,"⪇","\\lneq",!0),o(u,y,f,"≨","\\lneqq",!0),o(u,y,f,"","\\@lvertneqq"),o(u,y,f,"⋦","\\lnsim",!0),o(u,y,f,"⪉","\\lnapprox",!0),o(u,y,f,"⊀","\\nprec",!0),o(u,y,f,"⋠","\\npreceq",!0),o(u,y,f,"⋨","\\precnsim",!0),o(u,y,f,"⪹","\\precnapprox",!0),o(u,y,f,"≁","\\nsim",!0),o(u,y,f,"","\\@nshortmid"),o(u,y,f,"∤","\\nmid",!0),o(u,y,f,"⊬","\\nvdash",!0),o(u,y,f,"⊭","\\nvDash",!0),o(u,y,f,"⋪","\\ntriangleleft"),o(u,y,f,"⋬","\\ntrianglelefteq",!0),o(u,y,f,"⊊","\\subsetneq",!0),o(u,y,f,"","\\@varsubsetneq"),o(u,y,f,"⫋","\\subsetneqq",!0),o(u,y,f,"","\\@varsubsetneqq"),o(u,y,f,"≯","\\ngtr",!0),o(u,y,f,"","\\@ngeqslant"),o(u,y,f,"","\\@ngeqq"),o(u,y,f,"⪈","\\gneq",!0),o(u,y,f,"≩","\\gneqq",!0),o(u,y,f,"","\\@gvertneqq"),o(u,y,f,"⋧","\\gnsim",!0),o(u,y,f,"⪊","\\gnapprox",!0),o(u,y,f,"⊁","\\nsucc",!0),o(u,y,f,"⋡","\\nsucceq",!0),o(u,y,f,"⋩","\\succnsim",!0),o(u,y,f,"⪺","\\succnapprox",!0),o(u,y,f,"≆","\\ncong",!0),o(u,y,f,"","\\@nshortparallel"),o(u,y,f,"∦","\\nparallel",!0),o(u,y,f,"⊯","\\nVDash",!0),o(u,y,f,"⋫","\\ntriangleright"),o(u,y,f,"⋭","\\ntrianglerighteq",!0),o(u,y,f,"","\\@nsupseteqq"),o(u,y,f,"⊋","\\supsetneq",!0),o(u,y,f,"","\\@varsupsetneq"),o(u,y,f,"⫌","\\supsetneqq",!0),o(u,y,f,"","\\@varsupsetneqq"),o(u,y,f,"⊮","\\nVdash",!0),o(u,y,f,"⪵","\\precneqq",!0),o(u,y,f,"⪶","\\succneqq",!0),o(u,y,f,"","\\@nsubseteqq"),o(u,y,m,"⊴","\\unlhd"),o(u,y,m,"⊵","\\unrhd"),o(u,y,f,"↚","\\nleftarrow",!0),o(u,y,f,"↛","\\nrightarrow",!0),o(u,y,f,"⇍","\\nLeftarrow",!0),o(u,y,f,"⇏","\\nRightarrow",!0),o(u,y,f,"↮","\\nleftrightarrow",!0),o(u,y,f,"⇎","\\nLeftrightarrow",!0),o(u,y,f,"△","\\vartriangle"),o(u,y,g,"ℏ","\\hslash"),o(u,y,g,"▽","\\triangledown"),o(u,y,g,"◊","\\lozenge"),o(u,y,g,"Ⓢ","\\circledS"),o(u,y,g,"®","\\circledR"),o(d,y,g,"®","\\circledR"),o(u,y,g,"∡","\\measuredangle",!0),o(u,y,g,"∄","\\nexists"),o(u,y,g,"℧","\\mho"),o(u,y,g,"Ⅎ","\\Finv",!0),o(u,y,g,"⅁","\\Game",!0),o(u,y,g,"‵","\\backprime"),o(u,y,g,"▲","\\blacktriangle"),o(u,y,g,"▼","\\blacktriangledown"),o(u,y,g,"■","\\blacksquare"),o(u,y,g,"⧫","\\blacklozenge"),o(u,y,g,"★","\\bigstar"),o(u,y,g,"∢","\\sphericalangle",!0),o(u,y,g,"∁","\\complement",!0),o(u,y,g,"ð","\\eth",!0),o(d,p,g,"ð","ð"),o(u,y,g,"╱","\\diagup"),o(u,y,g,"╲","\\diagdown"),o(u,y,g,"□","\\square"),o(u,y,g,"□","\\Box"),o(u,y,g,"◊","\\Diamond"),o(u,y,g,"¥","\\yen",!0),o(d,y,g,"¥","\\yen",!0),o(u,y,g,"✓","\\checkmark",!0),o(d,y,g,"✓","\\checkmark"),o(u,y,g,"ℶ","\\beth",!0),o(u,y,g,"ℸ","\\daleth",!0),o(u,y,g,"ℷ","\\gimel",!0),o(u,y,g,"ϝ","\\digamma",!0),o(u,y,g,"ϰ","\\varkappa"),o(u,y,mc,"┌","\\@ulcorner",!0),o(u,y,Rl,"┐","\\@urcorner",!0),o(u,y,mc,"└","\\@llcorner",!0),o(u,y,Rl,"┘","\\@lrcorner",!0),o(u,y,f,"≦","\\leqq",!0),o(u,y,f,"⩽","\\leqslant",!0),o(u,y,f,"⪕","\\eqslantless",!0),o(u,y,f,"≲","\\lesssim",!0),o(u,y,f,"⪅","\\lessapprox",!0),o(u,y,f,"≊","\\approxeq",!0),o(u,y,m,"⋖","\\lessdot"),o(u,y,f,"⋘","\\lll",!0),o(u,y,f,"≶","\\lessgtr",!0),o(u,y,f,"⋚","\\lesseqgtr",!0),o(u,y,f,"⪋","\\lesseqqgtr",!0),o(u,y,f,"≑","\\doteqdot"),o(u,y,f,"≓","\\risingdotseq",!0),o(u,y,f,"≒","\\fallingdotseq",!0),o(u,y,f,"∽","\\backsim",!0),o(u,y,f,"⋍","\\backsimeq",!0),o(u,y,f,"⫅","\\subseteqq",!0),o(u,y,f,"⋐","\\Subset",!0),o(u,y,f,"⊏","\\sqsubset",!0),o(u,y,f,"≼","\\preccurlyeq",!0),o(u,y,f,"⋞","\\curlyeqprec",!0),o(u,y,f,"≾","\\precsim",!0),o(u,y,f,"⪷","\\precapprox",!0),o(u,y,f,"⊲","\\vartriangleleft"),o(u,y,f,"⊴","\\trianglelefteq"),o(u,y,f,"⊨","\\vDash",!0),o(u,y,f,"⊪","\\Vvdash",!0),o(u,y,f,"⌣","\\smallsmile"),o(u,y,f,"⌢","\\smallfrown"),o(u,y,f,"≏","\\bumpeq",!0),o(u,y,f,"≎","\\Bumpeq",!0),o(u,y,f,"≧","\\geqq",!0),o(u,y,f,"⩾","\\geqslant",!0),o(u,y,f,"⪖","\\eqslantgtr",!0),o(u,y,f,"≳","\\gtrsim",!0),o(u,y,f,"⪆","\\gtrapprox",!0),o(u,y,m,"⋗","\\gtrdot"),o(u,y,f,"⋙","\\ggg",!0),o(u,y,f,"≷","\\gtrless",!0),o(u,y,f,"⋛","\\gtreqless",!0),o(u,y,f,"⪌","\\gtreqqless",!0),o(u,y,f,"≖","\\eqcirc",!0),o(u,y,f,"≗","\\circeq",!0),o(u,y,f,"≜","\\triangleq",!0),o(u,y,f,"∼","\\thicksim"),o(u,y,f,"≈","\\thickapprox"),o(u,y,f,"⫆","\\supseteqq",!0),o(u,y,f,"⋑","\\Supset",!0),o(u,y,f,"⊐","\\sqsupset",!0),o(u,y,f,"≽","\\succcurlyeq",!0),o(u,y,f,"⋟","\\curlyeqsucc",!0),o(u,y,f,"≿","\\succsim",!0),o(u,y,f,"⪸","\\succapprox",!0),o(u,y,f,"⊳","\\vartriangleright"),o(u,y,f,"⊵","\\trianglerighteq"),o(u,y,f,"⊩","\\Vdash",!0),o(u,y,f,"∣","\\shortmid"),o(u,y,f,"∥","\\shortparallel"),o(u,y,f,"≬","\\between",!0),o(u,y,f,"⋔","\\pitchfork",!0),o(u,y,f,"∝","\\varpropto"),o(u,y,f,"◀","\\blacktriangleleft"),o(u,y,f,"∴","\\therefore",!0),o(u,y,f,"∍","\\backepsilon"),o(u,y,f,"▶","\\blacktriangleright"),o(u,y,f,"∵","\\because",!0),o(u,y,f,"⋘","\\llless"),o(u,y,f,"⋙","\\gggtr"),o(u,y,m,"⊲","\\lhd"),o(u,y,m,"⊳","\\rhd"),o(u,y,f,"≂","\\eqsim",!0),o(u,p,f,"⋈","\\Join"),o(u,y,f,"≑","\\Doteq",!0),o(u,y,m,"∔","\\dotplus",!0),o(u,y,m,"∖","\\smallsetminus"),o(u,y,m,"⋒","\\Cap",!0),o(u,y,m,"⋓","\\Cup",!0),o(u,y,m,"⩞","\\doublebarwedge",!0),o(u,y,m,"⊟","\\boxminus",!0),o(u,y,m,"⊞","\\boxplus",!0),o(u,y,m,"⋇","\\divideontimes",!0),o(u,y,m,"⋉","\\ltimes",!0),o(u,y,m,"⋊","\\rtimes",!0),o(u,y,m,"⋋","\\leftthreetimes",!0),o(u,y,m,"⋌","\\rightthreetimes",!0),o(u,y,m,"⋏","\\curlywedge",!0),o(u,y,m,"⋎","\\curlyvee",!0),o(u,y,m,"⊝","\\circleddash",!0),o(u,y,m,"⊛","\\circledast",!0),o(u,y,m,"⋅","\\centerdot"),o(u,y,m,"⊺","\\intercal",!0),o(u,y,m,"⋒","\\doublecap"),o(u,y,m,"⋓","\\doublecup"),o(u,y,m,"⊠","\\boxtimes",!0),o(u,y,f,"⇢","\\dashrightarrow",!0),o(u,y,f,"⇠","\\dashleftarrow",!0),o(u,y,f,"⇇","\\leftleftarrows",!0),o(u,y,f,"⇆","\\leftrightarrows",!0),o(u,y,f,"⇚","\\Lleftarrow",!0),o(u,y,f,"↞","\\twoheadleftarrow",!0),o(u,y,f,"↢","\\leftarrowtail",!0),o(u,y,f,"↫","\\looparrowleft",!0),o(u,y,f,"⇋","\\leftrightharpoons",!0),o(u,y,f,"↶","\\curvearrowleft",!0),o(u,y,f,"↺","\\circlearrowleft",!0),o(u,y,f,"↰","\\Lsh",!0),o(u,y,f,"⇈","\\upuparrows",!0),o(u,y,f,"↿","\\upharpoonleft",!0),o(u,y,f,"⇃","\\downharpoonleft",!0),o(u,p,f,"⊶","\\origof",!0),o(u,p,f,"⊷","\\imageof",!0),o(u,y,f,"⊸","\\multimap",!0),o(u,y,f,"↭","\\leftrightsquigarrow",!0),o(u,y,f,"⇉","\\rightrightarrows",!0),o(u,y,f,"⇄","\\rightleftarrows",!0),o(u,y,f,"↠","\\twoheadrightarrow",!0),o(u,y,f,"↣","\\rightarrowtail",!0),o(u,y,f,"↬","\\looparrowright",!0),o(u,y,f,"↷","\\curvearrowright",!0),o(u,y,f,"↻","\\circlearrowright",!0),o(u,y,f,"↱","\\Rsh",!0),o(u,y,f,"⇊","\\downdownarrows",!0),o(u,y,f,"↾","\\upharpoonright",!0),o(u,y,f,"⇂","\\downharpoonright",!0),o(u,y,f,"⇝","\\rightsquigarrow",!0),o(u,y,f,"⇝","\\leadsto"),o(u,y,f,"⇛","\\Rrightarrow",!0),o(u,y,f,"↾","\\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,y,g,"∅","\\varnothing"),o(u,p,ms,"α","\\alpha",!0),o(u,p,ms,"β","\\beta",!0),o(u,p,ms,"γ","\\gamma",!0),o(u,p,ms,"δ","\\delta",!0),o(u,p,ms,"ϵ","\\epsilon",!0),o(u,p,ms,"ζ","\\zeta",!0),o(u,p,ms,"η","\\eta",!0),o(u,p,ms,"θ","\\theta",!0),o(u,p,ms,"ι","\\iota",!0),o(u,p,ms,"κ","\\kappa",!0),o(u,p,ms,"λ","\\lambda",!0),o(u,p,ms,"μ","\\mu",!0),o(u,p,ms,"ν","\\nu",!0),o(u,p,ms,"ξ","\\xi",!0),o(u,p,ms,"ο","\\omicron",!0),o(u,p,ms,"π","\\pi",!0),o(u,p,ms,"ρ","\\rho",!0),o(u,p,ms,"σ","\\sigma",!0),o(u,p,ms,"τ","\\tau",!0),o(u,p,ms,"υ","\\upsilon",!0),o(u,p,ms,"ϕ","\\phi",!0),o(u,p,ms,"χ","\\chi",!0),o(u,p,ms,"ψ","\\psi",!0),o(u,p,ms,"ω","\\omega",!0),o(u,p,ms,"ε","\\varepsilon",!0),o(u,p,ms,"ϑ","\\vartheta",!0),o(u,p,ms,"ϖ","\\varpi",!0),o(u,p,ms,"ϱ","\\varrho",!0),o(u,p,ms,"ς","\\varsigma",!0),o(u,p,ms,"φ","\\varphi",!0),o(u,p,m,"∗","*",!0),o(u,p,m,"+","+"),o(u,p,m,"−","-",!0),o(u,p,m,"⋅","\\cdot",!0),o(u,p,m,"∘","\\circ",!0),o(u,p,m,"÷","\\div",!0),o(u,p,m,"±","\\pm",!0),o(u,p,m,"×","\\times",!0),o(u,p,m,"∩","\\cap",!0),o(u,p,m,"∪","\\cup",!0),o(u,p,m,"∖","\\setminus",!0),o(u,p,m,"∧","\\land"),o(u,p,m,"∨","\\lor"),o(u,p,m,"∧","\\wedge",!0),o(u,p,m,"∨","\\vee",!0),o(u,p,g,"√","\\surd"),o(u,p,mc,"⟨","\\langle",!0),o(u,p,mc,"∣","\\lvert"),o(u,p,mc,"∥","\\lVert"),o(u,p,Rl,"?","?"),o(u,p,Rl,"!","!"),o(u,p,Rl,"⟩","\\rangle",!0),o(u,p,Rl,"∣","\\rvert"),o(u,p,Rl,"∥","\\rVert"),o(u,p,f,"=","="),o(u,p,f,":",":"),o(u,p,f,"≈","\\approx",!0),o(u,p,f,"≅","\\cong",!0),o(u,p,f,"≥","\\ge"),o(u,p,f,"≥","\\geq",!0),o(u,p,f,"←","\\gets"),o(u,p,f,">","\\gt",!0),o(u,p,f,"∈","\\in",!0),o(u,p,f,"","\\@not"),o(u,p,f,"⊂","\\subset",!0),o(u,p,f,"⊃","\\supset",!0),o(u,p,f,"⊆","\\subseteq",!0),o(u,p,f,"⊇","\\supseteq",!0),o(u,y,f,"⊈","\\nsubseteq",!0),o(u,y,f,"⊉","\\nsupseteq",!0),o(u,p,f,"⊨","\\models"),o(u,p,f,"←","\\leftarrow",!0),o(u,p,f,"≤","\\le"),o(u,p,f,"≤","\\leq",!0),o(u,p,f,"<","\\lt",!0),o(u,p,f,"→","\\rightarrow",!0),o(u,p,f,"→","\\to"),o(u,y,f,"≱","\\ngeq",!0),o(u,y,f,"≰","\\nleq",!0),o(u,p,fc," ","\\ "),o(u,p,fc," ","\\space"),o(u,p,fc," ","\\nobreakspace"),o(d,p,fc," ","\\ "),o(d,p,fc," "," "),o(d,p,fc," ","\\space"),o(d,p,fc," ","\\nobreakspace"),o(u,p,fc,null,"\\nobreak"),o(u,p,fc,null,"\\allowbreak"),o(u,p,Pl,",",","),o(u,p,Pl,";",";"),o(u,y,m,"⊼","\\barwedge",!0),o(u,y,m,"⊻","\\veebar",!0),o(u,p,m,"⊙","\\odot",!0),o(u,p,m,"⊕","\\oplus",!0),o(u,p,m,"⊗","\\otimes",!0),o(u,p,g,"∂","\\partial",!0),o(u,p,m,"⊘","\\oslash",!0),o(u,y,m,"⊚","\\circledcirc",!0),o(u,y,m,"⊡","\\boxdot",!0),o(u,p,m,"△","\\bigtriangleup"),o(u,p,m,"▽","\\bigtriangledown"),o(u,p,m,"†","\\dagger"),o(u,p,m,"⋄","\\diamond"),o(u,p,m,"⋆","\\star"),o(u,p,m,"◃","\\triangleleft"),o(u,p,m,"▹","\\triangleright"),o(u,p,mc,"{","\\{"),o(d,p,g,"{","\\{"),o(d,p,g,"{","\\textbraceleft"),o(u,p,Rl,"}","\\}"),o(d,p,g,"}","\\}"),o(d,p,g,"}","\\textbraceright"),o(u,p,mc,"{","\\lbrace"),o(u,p,Rl,"}","\\rbrace"),o(u,p,mc,"[","\\lbrack",!0),o(d,p,g,"[","\\lbrack",!0),o(u,p,Rl,"]","\\rbrack",!0),o(d,p,g,"]","\\rbrack",!0),o(u,p,mc,"(","\\lparen",!0),o(u,p,Rl,")","\\rparen",!0),o(d,p,g,"<","\\textless",!0),o(d,p,g,">","\\textgreater",!0),o(u,p,mc,"⌊","\\lfloor",!0),o(u,p,Rl,"⌋","\\rfloor",!0),o(u,p,mc,"⌈","\\lceil",!0),o(u,p,Rl,"⌉","\\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,f,"↑","\\uparrow",!0),o(u,p,f,"⇑","\\Uparrow",!0),o(u,p,f,"↓","\\downarrow",!0),o(u,p,f,"⇓","\\Downarrow",!0),o(u,p,f,"↕","\\updownarrow",!0),o(u,p,f,"⇕","\\Updownarrow",!0),o(u,p,ac,"∐","\\coprod"),o(u,p,ac,"⋁","\\bigvee"),o(u,p,ac,"⋀","\\bigwedge"),o(u,p,ac,"⨄","\\biguplus"),o(u,p,ac,"⋂","\\bigcap"),o(u,p,ac,"⋃","\\bigcup"),o(u,p,ac,"∫","\\int"),o(u,p,ac,"∫","\\intop"),o(u,p,ac,"∬","\\iint"),o(u,p,ac,"∭","\\iiint"),o(u,p,ac,"∏","\\prod"),o(u,p,ac,"∑","\\sum"),o(u,p,ac,"⨂","\\bigotimes"),o(u,p,ac,"⨁","\\bigoplus"),o(u,p,ac,"⨀","\\bigodot"),o(u,p,ac,"∮","\\oint"),o(u,p,ac,"∯","\\oiint"),o(u,p,ac,"∰","\\oiiint"),o(u,p,ac,"⨆","\\bigsqcup"),o(u,p,ac,"∫","\\smallint"),o(d,p,Fl,"…","\\textellipsis"),o(u,p,Fl,"…","\\mathellipsis"),o(d,p,Fl,"…","\\ldots",!0),o(u,p,Fl,"…","\\ldots",!0),o(u,p,Fl,"⋯","\\@cdots",!0),o(u,p,Fl,"⋱","\\ddots",!0),o(u,p,g,"⋮","\\varvdots"),o(u,p,sc,"ˊ","\\acute"),o(u,p,sc,"ˋ","\\grave"),o(u,p,sc,"¨","\\ddot"),o(u,p,sc,"~","\\tilde"),o(u,p,sc,"ˉ","\\bar"),o(u,p,sc,"˘","\\breve"),o(u,p,sc,"ˇ","\\check"),o(u,p,sc,"^","\\hat"),o(u,p,sc,"⃗","\\vec"),o(u,p,sc,"˙","\\dot"),o(u,p,sc,"˚","\\mathring"),o(u,p,ms,"","\\@imath"),o(u,p,ms,"","\\@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,sc,"ˊ","\\'"),o(d,p,sc,"ˋ","\\`"),o(d,p,sc,"ˆ","\\^"),o(d,p,sc,"˜","\\~"),o(d,p,sc,"ˉ","\\="),o(d,p,sc,"˘","\\u"),o(d,p,sc,"˙","\\."),o(d,p,sc,"¸","\\c"),o(d,p,sc,"˚","\\r"),o(d,p,sc,"ˇ","\\v"),o(d,p,sc,"¨",'\\"'),o(d,p,sc,"˝","\\H"),o(d,p,sc,"◯","\\textcircled"),ys={"--":!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,y,g,"✠","\\maltese"),o(d,y,g,"✠","\\maltese"),vs='0123456789/@."',bs=0;bs{if(es(t.classes)!==es(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(1===t.classes.length){var r=t.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},"canCombine"),m=me(t=>{for(var e=0;ee&&(e=a.height),rnew as(t,e,r,n),"makeSvgSpan"),mc=me(function(t,e,r){return(t=qs([t],[],e)).height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),t.style.borderBottomWidth=K(t.height),t.maxFontSize=1,t},"makeLineSpan"),Rl=me(function(t,e,r,n){return t=new ss(t,e,r,n),Us(t),t},"makeAnchor"),Ws=me(function(t){return t=new Ua(t),Us(t),t},"makeFragment"),f=me(function(t,e){return t instanceof Ua?qs([],[t],e):t},"wrapFragment"),Ys=me(function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],n=-e[0].shift-e[0].elem.depth,i=n,a=1;a{var r=qs(["mspace"],[],e),t=ts(t,e);return r.style.marginRight=K(t),r},"makeGlue"),Hs=me(function(t,e,r){var n="";switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return n+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},"retrieveTextFontName"),Vs={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},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"}},Xs={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},sc=me(function(t,e){var[t,r,n]=Xs[t],t=new us(t),t=new hs([t],{width:K(r),height:K(n),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(t=js(["overlay"],[t],e)).height=n,t.style.height=K(n),t.style.width=K(r),t},"staticSvg"),Z={fontMap:Vs,makeSymbol:$s,mathsym:fc,makeSpan:qs,makeSvgSpan:js,makeLineSpan:mc,makeAnchor:Rl,makeFragment:Ws,wrapFragment:f,makeVList:ac,makeOrd:Pl,makeGlue:Fl,staticSvg:sc,svgData:Xs,tryCombineChars:m},Ks={mord:{mop:y={number:3,unit:"mu"},mbin:fc={number:4,unit:"mu"},mrel:mc={number:5,unit:"mu"},minner:y},mop:{mord:y,mop:y,mrel:mc,minner:y},mbin:{mord:fc,mop:fc,mopen:fc,minner:fc},mrel:{mord:mc,mop:mc,mopen:mc,minner:mc},mopen:{},mclose:{mop:y,mbin:fc,mrel:mc,minner:y},mpunct:{mord:y,mop:y,mrel:mc,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:fc,mrel:mc,mopen:y,mpunct:y,minner:y}},Zs={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Qs={},Js={},to={},me(l,"defineFunction"),me(Wi,"defineFunctionBuilders"),eo=me(function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},"normalizeArgument"),ro=me(function(t){return"ordgroup"===t.type?t.body:[t]},"ordargument"),no=Z.makeSpan,io=["leftmost","mbin","mopen","mrel","mop","mpunct"],ao=["rightmost","mrel","mclose","mpunct"],so={display:Aa.DISPLAY,text:Aa.TEXT,script:Aa.SCRIPT,scriptscript:Aa.SCRIPTSCRIPT},oo={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},lo=me(function(t,e,r,n){void 0===n&&(n=[null,null]);for(var i,a,s=[],o=0;o{var r=e.classes[0],n=t.classes[0];"mbin"===r&&va.contains(ao,n)?e.classes[0]="mord":"mbin"===n&&va.contains(io,r)&&(t.classes[0]="mord")},{node:a},n,r="root"===r),co(s,(t,e)=>{var e=po(e),r=po(t);if(t=e&&r?(t.hasClass("mtight")?Zs:Ks)[e][r]:null)return Z.makeGlue(t,i)},{node:a},n,r)),s},"buildExpression"),co=me(function t(r,e,n,i,a){i&&r.push(i);for(var s=0;st=>{r.splice(e+1,0,t),s++})(s))}i&&r.pop()},"traverseNonSpaceNodes"),ho=me(function(t){return t instanceof Ua||t instanceof ss||t instanceof as&&t.hasClass("enclosing")?t:null},"checkPartialGroup"),uo=me(function t(e,r){var n=ho(e);if(n&&(n=n.children).length){if("right"===r)return t(n[n.length-1],"right");if("left"===r)return t(n[0],"left")}return e},"getOutermostNode"),po=me(function(t,e){return t&&(e&&(t=uo(t,e)),oo[t.classes[0]])||null},"getTypeOfDomTree"),go=me(function(t,e){return t=["nulldelimiter"].concat(t.baseSizingClasses()),no(e.concat(t))},"makeNullDelimiter"),fo=me(function(t,e,r){if(!t)return no();var n;if(Js[t.type])return n=Js[t.type](t,e),r&&e.size!==r.size&&(n=no(e.sizingClasses(r),[n],e),e=e.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e),n;throw new X("Got group of unknown type: '"+t.type+"'")},"buildGroup"),me(Yi,"buildHTMLUnbreakable"),me(Hi,"buildHTML"),me(Vi,"newDocumentFragment"),mo=class{static{me(this,"MathNode")}constructor(t,e,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=r||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t,e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);0"}toText(){return this.children.map(t=>t.toText()).join("")}},yo=class{static{me(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return va.escape(this.toText())}toText(){return this.text}},Rl=class{static{me(this,"SpaceNode")}constructor(t){this.width=void 0,this.character=void 0,this.width=t,this.character=.05555<=t&&t<=.05556?" ":.1666<=t&&t<=.1667?" ":.2222<=t&&t<=.2223?" ":.2777<=t&&t<=.2778?"  ":-.05556<=t&&t<=-.05555?" ⁣":-.1667<=t&&t<=-.1666?" ⁣":-.2223<=t&&t<=-.2222?" ⁣":-.2778<=t&&t<=-.2777?" ⁣":null}toNode(){var t;return this.character?document.createTextNode(this.character):((t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",K(this.width)),t)}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character||" "}},E={MathNode:mo,TextNode:yo,SpaceNode:Rl,newDocumentFragment:Vi},vo=me(function(t,e,r){return!fs[e][t]||!fs[e][t].replace||55349===t.charCodeAt(0)||ys.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=fs[e][t].replace),new E.TextNode(t)},"makeText"),xo=me(function(t){return 1===t.length?t[0]:new E.MathNode("mrow",t)},"makeRow"),bo=me(function(t,e){var r;return"texttt"===e.fontFamily?"monospace":"textsf"===e.fontFamily?"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif":"textit"===e.fontShape&&"textbf"===e.fontWeight?"bold-italic":"textit"===e.fontShape?"italic":"textbf"===e.fontWeight?"bold":(e=e.font)&&"mathnormal"!==e?(r=t.mode,"mathit"===e?"italic":"boldsymbol"===e?"textord"===t.type?"bold":"bold-italic":"mathbf"===e?"bold":"mathbb"===e?"double-struck":"mathfrak"===e?"fraktur":"mathscr"===e||"mathcal"===e?"script":"mathsf"===e?"sans-serif":"mathtt"===e?"monospace":!va.contains(["\\imath","\\jmath"],t=t.text)&&Gi(t=fs[r][t]&&fs[r][t].replace?fs[r][t].replace:t,Z.fontMap[e].fontName,r)?Z.fontMap[e].variant:null):null},"getVariant"),wo=me(function(t,e,r){var n;if(1===t.length)return n=To(t[0],e),r&&n instanceof mo&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];for(var i,a=[],s=0;s{t&&"supsub"===t.type?(o=(r=Ki(t.base,"accent")).base,t.base=o,n=ji(fo(t,e)),t.base=r):o=(r=Ki(t,"accent")).base;var r,n,i,a,t=fo(o,e.havingCrampedStyle()),s=0,o=(r.isShifty&&va.isCharacterBox(o)&&(o=va.getBaseElem(o),s=qi(fo(o,e.havingCrampedStyle())).skew),"\\c"===r.label),l=o?t.height+t.depth:Math.min(t.height,e.fontMetrics().xHeight),c=r.isStretchy?(c=Io.svgSpan(r,e),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0{var r=t.isStretchy?Io.mathMLnode(t.label):new E.MathNode("mo",[vo(t.label,t.mode)]);return(t=new E.MathNode("mover",[To(t.base,e),r])).setAttribute("accent","true"),t},"mathmlBuilder$9"),Mo=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).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:me((t,e)=>{var e=eo(e[0]),r=!Mo.test(t.funcName),n=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:n,base:e}},"handler"),htmlBuilder:Ro,mathmlBuilder:Fl}),l({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:me((t,e)=>{var e=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:e}},"handler"),htmlBuilder:Ro,mathmlBuilder:Fl}),l({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"accentUnder",mode:t.mode,label:r,base:e}},"handler"),htmlBuilder:me((t,e)=>{var r=fo(t.base,e),n=Io.svgSpan(t,e),t="\\utilde"===t.label?.12:0,n=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:t},{type:"elem",elem:r}]},e);return Z.makeSpan(["mord","accentunder"],[n],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>{var r=Io.mathMLnode(t.label);return(t=new E.MathNode("munder",[To(t.base,e),r])).setAttribute("accentunder","true"),t},"mathmlBuilder")}),Do=me(t=>((t=new E.MathNode("mpadded",t?[t]:[])).setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t),"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(t,e,r){var{parser:t,funcName:n}=t;return{type:"xArrow",mode:t.mode,label:n,body:e[0],below:r[0]}},htmlBuilder(t,e){var r,n=e.style,i=e.havingStyle(n.sup()),a=Z.wrapFragment(fo(t.body,i,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd",n=(a.classes.push(s+"-arrow-pad"),t.below&&(i=e.havingStyle(n.sub()),(r=Z.wrapFragment(fo(t.below,i,e),e)).classes.push(s+"-arrow-pad")),Io.svgSpan(t,e)),i=-e.fontMetrics().axisHeight+.5*n.height,s=-e.fontMetrics().axisHeight-.5*n.height-.111;return(.25"atom"!==(t="ordgroup"===t.type&&t.body.length?t.body[0]:t).type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family,"binrelClass"),l({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){return{type:"mclass",mode:(t=t.parser).mode,mclass:Po(e[0]),body:ro(e[1]),isCharacterBox:va.isCharacterBox(e[1])}}}),l({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:t,funcName:r}=t,n=e[1],e=e[0],i="\\stackrel"!==r?Po(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:ro(n)},n={type:"supsub",mode:e.mode,base:n,sup:"\\underset"===r?null:e,sub:"\\underset"===r?e:null};return{type:"mclass",mode:t.mode,mclass:i,body:[n],isCharacterBox:va.isCharacterBox(n)}},htmlBuilder:Ji,mathmlBuilder:ta}),l({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"pmb",mode:(t=t.parser).mode,mclass:Po(e[0]),body:ro(e[0])}},htmlBuilder(t,e){var r=lo(t.body,e,!0);return(t=Z.makeSpan([t.mclass],r,e)).style.textShadow="0.02em 0.01em 0.04px",t},mathmlBuilder(t,e){return t=wo(t.body,e),(e=new E.MathNode("mstyle",t)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),e}}),Bo={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Fo=me(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),$o=me(t=>"textord"===t.type&&"@"===t.text,"isStartOfArrow"),zo=me((t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e,"isLabelEnd"),me(ea,"cdArrow"),me(ra,"parseCD"),l({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup());return(r=Z.wrapFragment(fo(t.label,r,e),e)).classes.push("cd-label-"+t.side),r.style.bottom=K(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){return e=new E.MathNode("mrow",[To(t.label,e)]),(e=new E.MathNode("mpadded",[e])).setAttribute("width","0"),"left"===t.side&&e.setAttribute("lspace","-1width"),e.setAttribute("voffset","0.7em"),(e=new E.MathNode("mstyle",[e])).setAttribute("displaystyle","false"),e.setAttribute("scriptlevel","1"),e}}),l({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){return{type:"cdlabelparent",mode:(t=t.parser).mode,fragment:e[0]}},htmlBuilder(t,e){return(t=Z.wrapFragment(fo(t.fragment,e),e)).classes.push("cd-vert-arrow"),t},mathmlBuilder(t,e){return new E.MathNode("mrow",[To(t.fragment,e)])}}),l({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var t=t.parser,r=Ki(e[0],"ordgroup").body,n="",i=0;i>10),56320+(1023&e))),{type:"textord",mode:t.mode,text:e}}}),sc=me((t,e)=>(e=lo(t.body,e.withColor(t.color),!1),Z.makeFragment(e)),"htmlBuilder$8"),m=me((t,e)=>(e=wo(t.body,e.withColor(t.color)),(e=new E.MathNode("mstyle",e)).setAttribute("mathcolor",t.color),e),"mathmlBuilder$7"),l({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var t=t.parser,r=Ki(e[0],"color-token").color;return{type:"color",mode:t.mode,color:r,body:ro(e[1])}},htmlBuilder:sc,mathmlBuilder:m}),l({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:t,breakOnTokenText:r}=t,e=Ki(e[0],"color-token").color,r=(t.gullet.macros.set("\\current@color",e),t.parseExpression(!0,r));return{type:"color",mode:t.mode,color:e,body:r}},htmlBuilder:sc,mathmlBuilder:m}),l({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var n="["===(t=t.parser).gullet.future().text?t.parseSizeGroup(!0):null,i=!t.settings.displayMode||!t.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:t.mode,newLine:i,size:n&&Ki(n,"size").value}},htmlBuilder(t,e){var r=Z.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size)&&(r.style.marginTop=K(ts(t.size,e))),r},mathmlBuilder(t,e){var r=new E.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size)&&r.setAttribute("height",K(ts(t.size,e))),r}}),Go={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Uo=me(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new X("Expected a control sequence",t);return e},"checkControlSequence"),qo=me(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text?t.gullet.popToken():e},"getRHS"),jo=me((t,e,r,n)=>{var i=t.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)},"letCommand"),l({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:t,funcName:e}=t,r=(t.consumeSpaces(),t.fetch());if(Go[r.text])return"\\global"!==e&&"\\\\globallong"!==e||(r.text=Go[r.text]),Ki(t.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(t){var{parser:e,funcName:t}=t,r=e.gullet.popToken(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new X("Expected a control sequence",r);for(var i,a=0,s=[[]];"{"!==e.gullet.future().text;)if("#"===(r=e.gullet.popToken()).text){if("{"===e.gullet.future().text){i=e.gullet.future(),s[a].push("{");break}if(r=e.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=e.gullet.consumeArg().tokens;return i&&o.unshift(i),"\\edef"!==t&&"\\xdef"!==t||(o=e.gullet.expandTokens(o)).reverse(),e.gullet.macros.set(n,{tokens:o,numArgs:a,delimiters:s},t===Go[t]),{type:"internal",mode:e.mode}}}),l({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=Uo(t.gullet.popToken()),n=(t.gullet.consumeSpaces(),qo(t));return jo(t,r,n,"\\\\globallet"===e),{type:"internal",mode:t.mode}}}),l({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=Uo(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return jo(t,r,i,"\\\\globalfuture"===e),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}}),Wo=me(function(t,e,r){if(r=Gi(fs.math[t]&&fs.math[t].replace||t,e,r))return r;throw new Error("Unsupported symbol "+t+" and font size "+e+".")},"getMetrics"),Yo=me(function(t,e,r,n){return e=r.havingBaseStyle(e),n=Z.makeSpan(n.concat(e.sizingClasses(r)),[t],r),t=e.sizeMultiplier/r.sizeMultiplier,n.height*=t,n.depth*=t,n.maxFontSize=e.sizeMultiplier,n},"styleWrap"),Ho=me(function(t,e,r){r=e.havingBaseStyle(r),r=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight,t.classes.push("delimcenter"),t.style.top=K(r),t.height-=r,t.depth+=r},"centerSpan"),Vo=me(function(t,e,r,n,i,a){return t=Z.makeSymbol(t,"Main-Regular",i,n),i=Yo(t,e,n,a),r&&Ho(i,n,e),i},"makeSmallDelim"),Xo=me(function(t,e,r,n){return Z.makeSymbol(t,"Size"+e+"-Regular",r,n)},"mathrmSize"),Ko=me(function(t,e,r,n,i,a){return t=Xo(t,e,i,n),i=Yo(Z.makeSpan(["delimsizing","size"+e],[t],n),Aa.TEXT,n,a),r&&Ho(i,n,Aa.TEXT),i},"makeLargeDelim"),Zo=me(function(t,e,r){return{type:"elem",elem:Z.makeSpan(["delimsizinginner","Size1-Regular"===e?"delim-size1":"delim-size4"],[Z.makeSpan([],[Z.makeSymbol(t,e,r)])])}},"makeGlyphSpan"),Qo=me(function(t,e,r){var n=(qa["Size4-Regular"][t.charCodeAt(0)]?qa["Size4-Regular"]:qa["Size1-Regular"])[t.charCodeAt(0)][4],t=new us("inner",$a(t,Math.round(1e3*e))),t=new hs([t],{width:K(n),height:K(e),style:"width:"+K(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"});return(t=Z.makeSvgSpan([],[t],r)).height=e,t.style.height=K(e),t.style.width=K(n),{type:"elem",elem:t}},"makeInner"),Jo={type:"kern",size:-.008},tl=["|","\\lvert","\\rvert","\\vert"],el=["\\|","\\lVert","\\rVert","\\Vert"],rl=me(function(t,e,r,n,i,a){var s,o,l,c="",h=0,u=s=o=t,d=null,p="Size1-Regular",t=("\\uparrow"===t?s=o="⏐":"\\Uparrow"===t?s=o="‖":"\\downarrow"===t?u=s="⏐":"\\Downarrow"===t?u=s="‖":"\\updownarrow"===t?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===t?(u="\\Uparrow",s="‖",o="\\Downarrow"):va.contains(tl,t)?(s="∣",c="vert",h=333):va.contains(el,t)?(s="∥",c="doublevert",h=556):"["===t||"\\lbrack"===t?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===t||"\\rbrack"===t?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===t||"⌊"===t?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===t||"⌈"===t?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===t||"⌋"===t?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===t||"⌉"===t?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===t||"\\lparen"===t?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===t||"\\rparen"===t?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===t||"\\lbrace"===t?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(t=Wo(u,p,i)).height+t.depth),g=(g=Wo(s,p,i)).height+g.depth,f=(f=Wo(o,p,i)).height+f.depth,m=0,y=1,e=(null!==d&&(m=(v=Wo(d,p,i)).height+v.depth,y=2),(v=t+f+m)+Math.max(0,Math.ceil((e-v)/(y*g)))*y*g),v=n.fontMetrics().axisHeight,y=(r&&(v*=n.sizeMultiplier),e/2-v),g=[],v=(0","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ol=[0,1.2,1.8,2.4,3],mc=me(function(t,e,r,n,i){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),va.contains(il,t)||va.contains(sl,t))return Ko(t,e,!1,r,n,i);if(va.contains(al,t))return rl(t,ol[e],!1,r,n,i);throw new X("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),ll=[{type:"small",style:Aa.SCRIPTSCRIPT},{type:"small",style:Aa.SCRIPT},{type:"small",style:Aa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],cl=[{type:"small",style:Aa.SCRIPTSCRIPT},{type:"small",style:Aa.SCRIPT},{type:"small",style:Aa.TEXT},{type:"stack"}],hl=[{type:"small",style:Aa.SCRIPTSCRIPT},{type:"small",style:Aa.SCRIPT},{type:"small",style:Aa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ul=me(function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},"delimTypeToFont"),dl=me(function(t,e,r,n){for(var i=Math.min(2,3-n.style.size);i"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle");var s=va.contains(sl,t)?ll:va.contains(il,t)?hl:cl;return"small"===(s=dl(t,e,s,n)).type?Vo(t,s.style,r,n,i,a):"large"===s.type?Ko(t,s.size,r,n,i,a):rl(t,e,r,n,i,a)},"makeCustomSizedDelim"),y=me(function(t,e,r,n,i,a){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,o=5/n.fontMetrics().ptPerEm,e=Math.max(e-s,r+s),r=Math.max(e/500*901,2*e-o);return pl(t,r,!0,n,i,a)},"makeLeftRightDelim"),gl={sqrtImage:fc,sizedDelim:mc,sizeToMaxHeight:ol,customSizedDelim:pl,leftRightDelim:y},fl={"\\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}},ml=["(","\\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","."],me(na,"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:me((t,e)=>(e=na(e[0],t),{type:"delimsizing",mode:t.parser.mode,size:fl[t.funcName].size,mclass:fl[t.funcName].mclass,delim:e.text}),"handler"),htmlBuilder:me((t,e)=>"."===t.delim?Z.makeSpan([t.mclass]):gl.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:me(t=>{var e=[],e=("."!==t.delim&&e.push(vo(t.delim,t.mode)),new E.MathNode("mo",e)),t=("mopen"===t.mclass||"mclose"===t.mclass?e.setAttribute("fence","true"):e.setAttribute("fence","false"),e.setAttribute("stretchy","true"),K(gl.sizeToMaxHeight[t.size]));return e.setAttribute("minsize",t),e.setAttribute("maxsize",t),e},"mathmlBuilder")}),me(ia,"assertParsed"),l({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{var r=t.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:t.parser.mode,delim:na(e[0],t).text,color:r}},"handler")}),l({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{var e=na(e[0],t),r=(++(t=t.parser).leftrightDepth,t.parseExpression(!1)),n=(--t.leftrightDepth,t.expect("\\right",!1),Ki(t.parseFunction(),"leftright-right"));return{type:"leftright",mode:t.mode,body:r,left:e.text,right:n.delim,rightColor:n.color}},"handler"),htmlBuilder:me((t,e)=>{ia(t);for(var r,n=lo(t.body,e,!0,["mopen","mclose"]),i=0,a=0,s=!1,o=0;o{ia(t);var r,e=wo(t.body,e);return"."!==t.left&&((r=new E.MathNode("mo",[vo(t.left,t.mode)])).setAttribute("fence","true"),e.unshift(r)),"."!==t.right&&((r=new E.MathNode("mo",[vo(t.right,t.mode)])).setAttribute("fence","true"),t.rightColor&&r.setAttribute("mathcolor",t.rightColor),e.push(r)),xo(e)},"mathmlBuilder")}),l({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{if(e=na(e[0],t),t.parser.leftrightDepth)return{type:"middle",mode:t.parser.mode,delim:e.text};throw new X("\\middle without preceding \\left",e)},"handler"),htmlBuilder:me((t,e)=>{var r;return"."===t.delim?r=go(e,[]):(r=gl.sizedDelim(t.delim,1,e,t.mode,[]),t={delim:t.delim,options:e},r.isMiddle=t),r},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t="\\vert"===t.delim||"|"===t.delim?vo("|","text"):vo(t.delim,t.mode),(t=new E.MathNode("mo",[t])).setAttribute("fence","true"),t.setAttribute("lspace","0.05em"),t.setAttribute("rspace","0.05em"),t),"mathmlBuilder")}),Rl=me((t,e)=>{var r,n,i,a,s,o=Z.wrapFragment(fo(t.body,e),e),l=t.label.slice(1),c=e.sizeMultiplier,h=0,u=va.isCharacterBox(t.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/c,h=-.5*e.fontMetrics().xHeight):"phase"===l?(a=ts({number:.6,unit:"pt"},e),s=ts({number:.35,unit:"ex"},e),c/=e.havingBaseSizing().sizeMultiplier,n=o.height+o.depth+a+s,o.style.paddingLeft=K(n/2+a),c=Math.floor(1e3*n*c),i=Pa(c),i=new hs([new us("phase",i)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[i],e)).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(e.fontMetrics().fboxrule,e.minRuleThickness),c=e.fontMetrics().fboxsep+("colorbox"===l?0:n)):"angl"===l?(c=4*(n=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=Io.encloseSpan(o,l,c,i,e),/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,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor)&&(r.style.borderColor=t.borderColor)),s=t.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:0}]},e):(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}]},e)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],e):Z.makeSpan(["mord"],[s],e)},"htmlBuilder$7"),Pl=me((t,e)=>{var r=new E.MathNode(-1{if(!t.parser.settings.displayMode)throw new X("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),me(oa,"getAutoTag"),me(la,"parseArray"),me(ca,"dCellStyle"),f=me(function(t,e){var r=t.body.length,P=t.hLinesBeforeRow,n=0,i=new Array(r),a=[],s=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),o=1/e.fontMetrics().ptPerEm,l=5*o,c=(t.colSeparationType&&"small"===t.colSeparationType&&(l=e.havingStyle(Aa.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778),"CD"===t.colSeparationType?ts({number:3,unit:"ex"},e):12*o),B=3*o,F=.7*(o=t.arraystretch*c),$=.3*o,h=0;function u(t){for(var e=0;et))for(M=0;Mt.length)),i.cols=new Array(n).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:f,mathmlBuilder:ac}),aa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){return(t=la(t.parser,{arraystretch:.5},"script")).colSeparationType="small",t},htmlBuilder:f,mathmlBuilder:ac}),aa({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){if(1<(e=(Qi(e[0])?[e[0]]:Ki(e[0],"ordgroup").body).map(function(t){var e=Zi(t).text;if(-1!=="lc".indexOf(e))return{type:"align",align:e};throw new X("Unknown column alignment: "+e,t)})).length)throw new X("{subarray} can contain only one column");if(0<(t=la(t.parser,{cols:e,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1{var r=t.font,e=e.withFont(r);return fo(t.body,e)},"htmlBuilder$5"),m=me((t,e)=>{var r=t.font,e=e.withFont(r);return To(t.body,e)},"mathmlBuilder$4"),kl={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},l({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=eo(e[0]);return{type:"font",mode:t.mode,font:(r=r in kl?kl[r]:r).slice(1),body:e}},"handler"),htmlBuilder:sc,mathmlBuilder:m}),l({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:me((t,e)=>{var t=t.parser,e=e[0],r=va.isCharacterBox(e);return{type:"mclass",mode:t.mode,mclass:Po(e),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:e}],isCharacterBox:r}},"handler")}),l({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:me((t,e)=>{var{parser:t,funcName:r,breakOnTokenText:n}=t,i=t.mode,n=t.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:n}}},"handler"),htmlBuilder:sc,mathmlBuilder:m}),Tl=me((t,e)=>("display"===t?e=e.id>=Aa.SCRIPT.id?e.text():Aa.DISPLAY:"text"===t&&e.size===Aa.DISPLAY.size?e=Aa.TEXT:"script"===t?e=Aa.SCRIPT:"scriptscript"===t&&(e=Aa.SCRIPTSCRIPT),e),"adjustStyle"),fc=me((t,e)=>{var r,n,i,a,s=Tl(t.size,e.style),o=s.fracNum(),l=s.fracDen(),o=e.havingStyle(o),c=fo(t.numer,o,e),h=(t.continued&&(h=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm,c.height=c.height{var r=new E.MathNode("mfrac",[To(t.numer,e),To(t.denom,e)]),n=(t.hasBarLine?t.barSize&&(n=ts(t.barSize,e),r.setAttribute("linethickness",K(n))):r.setAttribute("linethickness","0px"),Tl(t.size,e.style));return n.size!==e.style.size&&(r=new E.MathNode("mstyle",[r]),e=n.size===Aa.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")),null!=t.leftDelim||null!=t.rightDelim?(n=[],null!=t.leftDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),n.push(r),null!=t.rightDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),xo(n)):r},"mathmlBuilder$3"),l({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:me((t,e)=>{var r,{parser:t,funcName:n}=t,i=e[0],e=e[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:t.mode,continued:!1,numer:i,denom:e,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:fc,mathmlBuilder:mc}),l({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:me((t,e)=>{var t=t.parser,r=e[0];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:e[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(t){var e,{parser:t,funcName:r,token:n}=t;switch(r){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:e,token:n}}}),El=["display","text","script","scriptscript"],Cl=me(function(t){var e=null;return 0{var t=t.parser,r=e[0],n=ya(Ki(e[1],"infix").size),e=e[2],i=0{var r,n,i=e.style,i="supsub"===t.type?(r=t.sup?fo(t.sup,e.havingStyle(i.sup()),e):fo(t.sub,e.havingStyle(i.sub()),e),Ki(t.base,"horizBrace")):Ki(t,"horizBrace"),t=fo(i.base,e.havingBaseStyle(Aa.DISPLAY)),a=Io.svgSpan(i,e);return(i.isOver?(n=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:.1},{type:"elem",elem:a}]},e)).children[0].children[0].children[1]:(n=Z.makeVList({positionType:"bottom",positionData:t.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:t}]},e)).children[0].children[0].children[0]).classes.push("svg-align"),r&&(a=Z.makeSpan(["mord",i.isOver?"mover":"munder"],[n],e),n=i.isOver?Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},e):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}]},e)),Z.makeSpan(["mord",i.isOver?"mover":"munder"],[n],e)},"htmlBuilder$3"),y=me((t,e)=>{var r=Io.mathMLnode(t.label);return new E.MathNode(t.isOver?"mover":"munder",[To(t.base,e),r])},"mathmlBuilder$2"),l({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"horizBrace",mode:t.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:_l,mathmlBuilder:y}),l({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:me((t,e)=>{var t=t.parser,r=e[1],e=Ki(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:e})?{type:"href",mode:t.mode,href:e,body:ro(r)}:t.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:me((t,e)=>{var r=lo(t.body,e,!1);return Z.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>((e=(e=ko(t.body,e))instanceof mo?e:new mo("mrow",[e])).setAttribute("href",t.href),e),"mathmlBuilder")}),l({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:me((t,e)=>{var t=t.parser,r=Ki(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var n=[],i=0;i{var{parser:t,funcName:r}=t,n=Ki(e[0],"raw").string,e=e[1];t.settings.strict&&t.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{var r,n=lo(t.body,e,!1),i=["enclosing"],a=(t.attributes.class&&i.push(...t.attributes.class.trim().split(/\s+/)),Z.makeSpan(i,n,e));for(r in t.attributes)"class"!==r&&t.attributes.hasOwnProperty(r)&&a.setAttribute(r,t.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:me((t,e)=>ko(t.body,e),"mathmlBuilder")}),l({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:me((t,e)=>({type:"htmlmathml",mode:(t=t.parser).mode,html:ro(e[0]),mathml:ro(e[1])}),"handler"),htmlBuilder:me((t,e)=>(t=lo(t.html,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>ko(t.mathml,e),"mathmlBuilder")}),Sl=me(function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new X("Invalid size: '"+t+"' in \\includegraphics");if(t={number:+(e[1]+e[2]),unit:e[3]},Ja(t))return t;throw new X("Invalid unit: '"+t.unit+"' in \\includegraphics.")},"sizeData"),l({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:me((t,e,r)=>{var t=t.parser,n={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Ki(r[0],"raw").string.split(","),l=0;l{var r=ts(t.height,e),n=0,i=(0{var r=new E.MathNode("mglyph",[]),n=(r.setAttribute("alt",t.alt),ts(t.height,e)),i=0;return 0{var{parser:t,funcName:r}=t,e=e[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:e}},"handler"),htmlBuilder:me((t,e)=>{var r="clap"===t.alignment?(r=Z.makeSpan([],[fo(t.body,e)]),Z.makeSpan(["inner"],[r],e)):Z.makeSpan(["inner"],[fo(t.body,e)]),n=Z.makeSpan(["fix"],[]),t=Z.makeSpan([t.alignment],[r,n],e);return(r=Z.makeSpan(["strut"])).style.height=K(t.height+t.depth),t.depth&&(r.style.verticalAlign=K(-t.depth)),t.children.unshift(r),t=Z.makeSpan(["thinbox"],[t],e),Z.makeSpan(["mord","vbox"],[t],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(e=new E.MathNode("mpadded",[To(t.body,e)]),"rlap"!==t.alignment&&(t="llap"===t.alignment?"-1":"-0.5",e.setAttribute("lspace",t+"width")),e.setAttribute("width","0px"),e),"mathmlBuilder")}),l({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:t,parser:r}=t,n=r.mode,t=(r.switchMode("math"),"\\("===t?"\\)":"$"),i=r.parseExpression(!1,t);return r.expect(t),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:i}}}),l({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new X("Mismatched "+t.funcName)}}),Al=me((t,e)=>{switch(e.style.size){case Aa.DISPLAY.size:return t.display;case Aa.TEXT.size:return t.text;case Aa.SCRIPT.size:return t.script;case Aa.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle"),l({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:me((t,e)=>({type:"mathchoice",mode:(t=t.parser).mode,display:ro(e[0]),text:ro(e[1]),script:ro(e[2]),scriptscript:ro(e[3])}),"handler"),htmlBuilder:me((t,e)=>(t=Al(t,e),t=lo(t,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=Al(t,e),ko(t,e)),"mathmlBuilder")}),Ll=me((t,e,r,n,i,a,s)=>{t=Z.makeSpan([],[t]);var o,l,c=r&&va.isCharacterBox(r);if(e&&(o={elem:e=fo(e,n.havingStyle(i.sup()),n),kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}),r&&(l={elem:e=fo(r,n.havingStyle(i.sub()),n),kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}),o&&l)var r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.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:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);else if(l)i=t.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:t}]},n);else{if(!o)return t;e=t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:e,children:[{type:"elem",elem:t},{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"),Nl=["\\smallint"],Il=me((t,e)=>{var r,n,i,a=!1,s=("supsub"===t.type?(r=t.sup,n=t.sub,i=Ki(t.base,"op"),a=!0):i=Ki(t,"op"),!1);if((t=e.style).size===Aa.DISPLAY.size&&i.symbol&&!va.contains(Nl,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",e,["mop","op-symbol",s?"large-op":"small-op"]),0{var r;return t.symbol?(r=new mo("mo",[vo(t.name,t.mode)]),va.contains(Nl,t.name)&&r.setAttribute("largeop","false")):r=t.body?new mo("mo",wo(t.body,e)):(r=new mo("mi",[new yo(t.name.slice(1))]),e=new mo("mo",[vo("⁡","text")]),t.parentIsSupSub?new mo("mrow",[r,e]):Vi([r,e])),r},"mathmlBuilder$1"),Ml={"∏":"\\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:me((t,e)=>{var{parser:t,funcName:r}=t;return 1===r.length&&(r=Ml[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Il,mathmlBuilder:Rl}),l({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ro(e)}),"handler"),htmlBuilder:Il,mathmlBuilder:Rl}),Dl={"∫":"\\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(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Il,mathmlBuilder:Rl}),l({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Il,mathmlBuilder:Rl}),l({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return 1===e.length&&(e=Dl[e]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:e}},htmlBuilder:Il,mathmlBuilder:Rl}),Ol=me((t,e)=>{var r,n,i,a,s=!1;if("supsub"===t.type?(r=t.sup,n=t.sub,i=Ki(t.base,"operatorname"),s=!0):i=Ki(t,"operatorname"),0{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),o=lo(t,e.withFont("mathrm"),!0),l=0;l{for(var r=wo(t.body,e.withFont("mathrm")),n=!0,i=0;it.toText()).join(""),r=[new E.TextNode(e)]),(e=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new E.MathNode("mo",[vo("⁡","text")]);return t.parentIsSupSub?new E.MathNode("mrow",[e,o]):E.newDocumentFragment([e,o])},"mathmlBuilder"),l({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"operatorname",mode:t.mode,body:ro(e),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Ol,mathmlBuilder:Pl}),h("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Wi({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Z.makeFragment(lo(t.body,e,!1)):Z.makeSpan(["mord"],lo(t.body,e,!0),e)},mathmlBuilder(t,e){return ko(t.body,e,!0)}}),l({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){return t=t.parser,e=e[0],{type:"overline",mode:t.mode,body:e}},htmlBuilder(t,e){var t=fo(t.body,e.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,t=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},e);return Z.makeSpan(["mord","overline"],[t],e)},mathmlBuilder(t,e){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new E.MathNode("mover",[To(t.body,e),r])).setAttribute("accent","true"),t}}),l({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"phantom",mode:t.mode,body:ro(e)}),"handler"),htmlBuilder:me((t,e)=>(t=lo(t.body,e.withPhantom(),!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=wo(t.body,e),new E.MathNode("mphantom",t)),"mathmlBuilder")}),l({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"hphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:me((t,e)=>{var r=Z.makeSpan([],[fo(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n(t=wo(ro(t.body),e),e=new E.MathNode("mphantom",t),(t=new E.MathNode("mpadded",[e])).setAttribute("height","0px"),t.setAttribute("depth","0px"),t),"mathmlBuilder")}),l({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"vphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:me((t,e)=>{var t=Z.makeSpan(["inner"],[fo(t.body,e.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[t,r],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=wo(ro(t.body),e),e=new E.MathNode("mphantom",t),(t=new E.MathNode("mpadded",[e])).setAttribute("width","0px"),t),"mathmlBuilder")}),l({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var t=t.parser,r=Ki(e[0],"size").value;return{type:"raisebox",mode:t.mode,dy:r,body:e[1]}},htmlBuilder(t,e){var r=fo(t.body,e),t=ts(t.dy,e);return Z.makeVList({positionType:"shift",positionData:-t,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return e=new E.MathNode("mpadded",[To(t.body,e)]),t=t.dy.number+t.dy.unit,e.setAttribute("voffset",t),e}}),l({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){return{type:"internal",mode:(t=t.parser).mode}}}),l({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var t=t.parser,r=r[0],n=Ki(e[0],"size"),e=Ki(e[1],"size");return{type:"rule",mode:t.mode,shift:r&&Ki(r,"size").value,width:n.value,height:e.value}},htmlBuilder(t,e){var r=Z.makeSpan(["mord","rule"],[],e),n=ts(t.width,e),i=ts(t.height,e),t=t.shift?ts(t.shift,e):0;return r.style.borderRightWidth=K(n),r.style.borderTopWidth=K(i),r.style.bottom=K(t),r.width=n,r.height=i+t,r.depth=-t,r.maxFontSize=1.125*i*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=ts(t.width,e),n=ts(t.height,e),t=t.shift?ts(t.shift,e):0,e=e.color&&e.getColor()||"black",i=new E.MathNode("mspace"),e=(i.setAttribute("mathbackground",e),i.setAttribute("width",K(r)),i.setAttribute("height",K(n)),new E.MathNode("mpadded",[i]));return 0<=t?e.setAttribute("height",K(t)):(e.setAttribute("height",K(t)),e.setAttribute("depth",K(-t))),e.setAttribute("voffset",K(t)),e}}),me(ha,"sizingGroup"),Bl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Fl=me((t,e)=>{var r=e.havingSize(t.size);return ha(t.body,r,e)},"htmlBuilder"),l({type:"sizing",names:Bl,props:{numArgs:0,allowedInText:!0},handler:me((t,e)=>{var{breakOnTokenText:t,funcName:r,parser:n}=t,t=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:Bl.indexOf(r)+1,body:t}},"handler"),htmlBuilder:Fl,mathmlBuilder:me((t,e)=>(e=e.havingSize(t.size),t=wo(t.body,e),(t=new E.MathNode("mstyle",t)).setAttribute("mathsize",K(e.sizeMultiplier)),t),"mathmlBuilder")}),l({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:me((t,e,r)=>{var t=t.parser,n=!1,i=!1,a=r[0]&&Ki(r[0],"ordgroup");if(a)for(var s,o=0;o{var r=Z.makeSpan([],[fo(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n(e=new E.MathNode("mpadded",[To(t.body,e)]),t.smashHeight&&e.setAttribute("height","0px"),t.smashDepth&&e.setAttribute("depth","0px"),e),"mathmlBuilder")}),l({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){return t=t.parser,r=r[0],e=e[0],{type:"sqrt",mode:t.mode,body:e,index:r}},htmlBuilder(t,e){0===(r=fo(t.body,e.havingCrampedStyle())).height&&(r.height=e.fontMetrics().xHeight);var r=Z.wrapFragment(r,e),n=i=e.fontMetrics().defaultRuleThickness,n=i+(e.style.idr.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}]},e));return t.index?(s=e.havingStyle(Aa.SCRIPTSCRIPT),r=fo(t.index,s,e),o=.6*(n.height-n.depth),i=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},e),a=Z.makeSpan(["root"],[i]),Z.makeSpan(["mord","sqrt"],[a,n],e)):Z.makeSpan(["mord","sqrt"],[n],e)},mathmlBuilder(t,e){var{body:t,index:r}=t;return r?new E.MathNode("mroot",[To(t,e),To(r,e)]):new E.MathNode("msqrt",[To(t,e)])}}),$l={display:Aa.DISPLAY,text:Aa.TEXT,script:Aa.SCRIPT,scriptscript:Aa.SCRIPTSCRIPT},l({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:t,funcName:r,parser:n}=t,t=n.parseExpression(!0,t),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:t}},htmlBuilder(t,e){var r=$l[t.style],r=e.havingStyle(r).withFont("");return ha(t.body,r,e)},mathmlBuilder(t,e){var r=$l[t.style],e=e.havingStyle(r),r=wo(t.body,e),e=new E.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return e.setAttribute("scriptlevel",r[0]),e.setAttribute("displaystyle",r[1]),e}}),zl=me(function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===Aa.DISPLAY.size||r.alwaysHandleSupSub)?Il:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===Aa.DISPLAY.size||r.limits)?Ol:null:"accent"===r.type?va.isCharacterBox(r.base)?Ro:null:"horizBrace"===r.type&&!t.sub===r.isOver?_l:null:null},"htmlBuilderDelegate"),Wi({type:"supsub",htmlBuilder(t,e){if(a=zl(t,e))return a(t,e);var r,n,i,{base:a,sup:s,sub:o}=t,l=fo(a,e),c=e.fontMetrics(),h=0,u=0,a=a&&va.isCharacterBox(a),o=(s&&(i=e.havingStyle(e.style.sup()),r=fo(s,i,e),a||(h=l.height-i.fontMetrics().supDrop*i.sizeMultiplier/e.sizeMultiplier)),o&&(s=e.havingStyle(e.style.sub()),n=fo(o,s,e),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/e.sizeMultiplier)),i=e.style===Aa.DISPLAY?c.sup1:e.style.cramped?c.sup3:c.sup2,e.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(n&&(o=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name),l instanceof cs||o)&&(s=K(-l.italic)),r&&n){h=Math.max(h,i,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),t=4*c.defaultRuleThickness,h-r.depth-(n.height-u){var t=new E.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad"),Wi({type:"tag",mathmlBuilder(t,e){return(t=new E.MathNode("mtable",[new E.MathNode("mtr",[jl(),new E.MathNode("mtd",[ko(t.body,e)]),jl(),new E.MathNode("mtd",[ko(t.tag,e)])])])).setAttribute("width","100%"),t}}),Wl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Yl={"\\textbf":"textbf","\\textmd":"textmd"},Hl={"\\textit":"textit","\\textup":"textup"},Vl=me((t,e)=>(t=t.font)?Wl[t]?e.withTextFontFamily(Wl[t]):Yl[t]?e.withTextFontWeight(Yl[t]):"\\emph"===t?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(Hl[t]):e,"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(t,e){var{parser:t,funcName:r}=t,e=e[0];return{type:"text",mode:t.mode,body:ro(e),font:r}},htmlBuilder(t,e){return e=Vl(t,e),t=lo(t.body,e,!0),Z.makeSpan(["mord","text"],t,e)},mathmlBuilder(t,e){return e=Vl(t,e),ko(t.body,e)}}),l({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"underline",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=fo(t.body,e),r=Z.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return Z.makeSpan(["mord","underline"],[r],e)},mathmlBuilder(t,e){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new E.MathNode("munder",[To(t.body,e),r])).setAttribute("accentunder","true"),t}}),l({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){return{type:"vcenter",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=fo(t.body,e),r=e.fontMetrics().axisHeight,r=.5*(t.height-r-(t.depth+r));return Z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(t,e){return new E.MathNode("mpadded",[To(t.body,e)],["vcenter"])}}),l({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new X("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=Xl(t),n=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" "),"makeVerb"),Kl=Qs,Zl=new RegExp("[̀-ͯ]+$"),Ql=class{static{me(this,"Lexer")}constructor(t,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=e,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(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new da("EOF",new ua(this,e,e));if(null===(n=this.tokenRegex.exec(t))||n.index!==e)throw new X("Unexpected character: '"+t[e]+"'",new da(t[e],new ua(this,e,e+1)));var r,n=n[6]||n[3]||(n[2]?"\\ ":" ");return 14===this.catcodes[n]?(-1===(r=t.indexOf(` +`,this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=r+1,this.lex()):new da(n,new ua(this,e,this.tokenRegex.lastIndex))}},Jl=class{static{me(this,"Namespace")}constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,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 t,e=this.undefStack.pop();for(t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0{var n=t.consumeArg().tokens;if(1!==n.length)throw new X("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!e)throw new X("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!a&&!r)throw new X("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");if(e=0,1===(n=t.consumeArg().tokens).length&&"["===n[0].text){for(var s="",o=t.expandNextToken();"]"!==o.text&&"EOF"!==o.text;)s+=o.text,o=t.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+s);e=parseInt(s),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:e}),""},"newcommand"),h("\\newcommand",t=>rc(t,!1,!0)),h("\\renewcommand",t=>rc(t,!0,!1)),h("\\providecommand",t=>rc(t,!0,!0)),h("\\message",t=>(t=t.consumeArgs(1)[0],console.log(t.reverse().map(t=>t.text).join("")),"")),h("\\errmessage",t=>(t=t.consumeArgs(1)[0],console.error(t.reverse().map(t=>t.text).join("")),"")),h("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Kl[r],fs.math[r],fs.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","\\mathord{\\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\\;"),nc={",":"\\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(t){var e="\\dotso";return(t=t.expandAfterFuture().text)in nc?e=nc[t]:("\\not"===t.slice(0,4)||t in fs.math&&va.contains(["bin","rel"],fs.math[t].group))&&(e="\\dotsb"),e}),ic={")":!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(t){return t.future().text in ic?"\\ldots\\,":"\\ldots"}),h("\\dotsc",function(t){return(t=t.future().text)in ic&&","!==t?"\\ldots\\,":"\\ldots"}),h("\\cdots",function(t){return t.future().text in ic?"\\@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",t=>{if(t.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{"+(ac=K(qa["Main-Regular"][84][1]-.7*qa["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),h("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ac+"}{\\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",(sc=me(l=>t=>{var e=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|"),o=(t.macros.beginGroup(),me(r=>t=>{l&&(t.macros.set("|",a),i.length)&&t.macros.set("\\|",s);var e=r;return!r&&i.length&&"|"===t.future().text&&(t.popToken(),e=!0),{tokens:e?i:n,numArgs:0}},"midMacro")),o=(t.macros.set("|",o(!1)),i.length&&t.macros.set("\\|",o(!0)),t.consumeArg().tokens),r=t.expandTokens([...r,...o,...e]);return t.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),h("\\bra@set",sc(!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}"),oc={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},lc=class{static{me(this,"MacroExpander")}constructor(t,e,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=e,this.expansionCount=0,this.feed(t),this.macros=new Jl(tc,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Ql(t,this.settings)}switchMode(t){this.mode=t}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(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,r,n;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:e,end:r}=this.consumeArg());return this.pushToken(new da("EOF",r.loc)),this.pushTokens(n),e.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(t){var e,r=[],n=t&&0this.settings.maxExpand)throw new X("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),r=e.text,n=e.noexpand?null:this._getExpansion(r);if(null==n||t&&n.unexpandable){if(t&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(e),!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 t;if(!1===this.expandOnce())return(t=this.stack.pop()).treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new da(t)]):void 0}expandTokens(t){var e,r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)!1===this.expandOnce(!0)&&((e=this.stack.pop()).treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),r.push(e));return this.countExpansion(r.length),r}expandMacroAsText(t){return(t=this.expandMacro(t))&&t.map(t=>t.text).join("")}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1!==t.length||null==(t=this.lexer.catcodes[t])||13===t){if("string"!=typeof(t="function"==typeof e?e(this):e))return t;var r=0;if(-1!==t.indexOf("#"))for(var n=t.replace(/##/g,"");-1!==n.indexOf("#"+(r+1));)++r;for(var i=new Ql(t,this.settings),a=[],s=i.lex();"EOF"!==s.text;)a.push(s),s=i.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(t){return this.macros.has(t)||Kl.hasOwnProperty(t)||fs.math.hasOwnProperty(t)||fs.text.hasOwnProperty(t)||oc.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:Kl.hasOwnProperty(t)&&!Kl[t].primitive}},cc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,hc=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),uc={"́":{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"}},dc={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(pc=class a{static{me(this,"Parser")}constructor(t,e){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 lc(t,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new X("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken,t=(this.consume(),this.gullet.pushToken(new da("}")),this.gullet.pushTokens(t),this.parseExpression(!1));return this.expect("}"),this.nextToken=e,t}parseExpression(t,e){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==a.endOfExpression.indexOf(n.text)||e&&n.text===e||t&&Kl[n.text]&&Kl[n.text].infix)break;if(!(n=this.parseAtom(e)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,r,n,i=-1,a=0;a{t instanceof Element&&"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Mi.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target"))&&t.setAttribute("rel","noopener")})}var kc,Tc,Ec,Cc,_c,Sc,Ac,Lc,Nc,Ic,Rc,Mc,Dc,Oc,Pc,Bc,Fc,$c,zc,Gc,Uc,qc,jc,Wc,L,Yc,Hc,Vc,Xc,Kc,Zc,Qc,Jc,th=t(()=>{Di(),kc=//gi,Tc=me(t=>t?Rc(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ec=(()=>{let t=!1;return()=>{t||(wc(),t=!0)}})(),me(wc,"setupDompurifyHooks"),Cc=me(t=>(Ec(),Mi.sanitize(t)),"removeScript"),_c=me((t,e)=>(!1!==e.flowchart?.htmlLabels&&("antiscript"===(e=e.securityLevel)||"strict"===e?t=Cc(t):"loose"!==e&&(t=(t=(t=Rc(t)).replace(//g,">")).replace(/=/g,"="),t=Ic(t))),t),"sanitizeMore"),Sc=me((t,e)=>t&&(e.dompurifyConfig?Mi.sanitize(_c(t,e),e.dompurifyConfig):Mi.sanitize(_c(t,e),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Ac=me((t,e)=>"string"==typeof t?Sc(t,e):t.flat().map(t=>Sc(t,e)),"sanitizeTextOrArray"),Lc=me(t=>kc.test(t),"hasBreaks"),Nc=me(t=>t.split(kc),"splitBreaks"),Ic=me(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Rc=me(t=>t.replace(kc,"#br#"),"breakToPlaceholder"),Mc=me(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Dc=me(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Oc=me(function(...t){return t=t.filter(t=>!isNaN(t)),Math.max(...t)},"getMax"),Pc=me(function(...t){return t=t.filter(t=>!isNaN(t)),Math.min(...t)},"getMin"),Bc=me(function(t){var r,n,i=t.split(/(,)/),a=[];for(let e=0;eMath.max(0,t.split(e).length-1),"countOccurrence"),$c=me((t,e)=>(t=Fc(t,"~"),e=Fc(e,"~"),1===t&&1===e),"shouldCombineSets"),zc=me(t=>{let e=Fc(t,"~"),r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],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"),Gc=me(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Uc=/\$\$(.*)\$\$/g,qc=me(t=>0<(t.match(Uc)?.length??0),"hasKatex"),jc=me(async(t,e)=>(t=await Wc(t,e),(e=document.createElement("div")).innerHTML=t,e.id="katex-temp",e.style.visibility="hidden",e.style.position="absolute",e.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",e),t={width:e.clientWidth,height:e.clientHeight},e.remove(),t),"calculateMathMLDimensions"),Wc=me(async(t,e)=>{if(!qc(t))return t;if(!(Gc()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Uc,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(bc(),Oi))).default,n=e.forceLegacyMathML||!Gc()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(kc).map(t=>qc(t)?`
${t}
`:`
${t}
`).join("").replace(Uc,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))}},"renderKatex"),L={getRows:Tc,sanitizeText:Sc,sanitizeTextOrArray:Ac,hasBreaks:Lc,splitBreaks:Nc,lineBreakRegex:kc,removeScript:Cc,getUrl:Mc,evaluate:Dc,getMax:Oc,getMin:Pc}}),eh=t(()=>{e(),Yc=me(function(t,e){for(var r of e)t.attr(r[0],r[1])},"d3Attrs"),Hc=me(function(t,e,r){var n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),Vc=me(function(t,e,r,n){e=Hc(e,r,n),Yc(t,e)},"configureSvgSize"),Xc=me(function(t,e,r,n){var i=e.node().getBBox(),a=i.width,s=(M.info(`SVG bounds: ${a}x`+(s=i.height),i),M.info("Graph bounds: 0x0",t),M.info(`Calculated bounds: ${t=a+2*r}x`+(a=s+2*r)),Vc(e,a,t,n),`${i.x-r} ${i.y-r} ${i.width+2*r} `+(i.height+2*r));e.attr("viewBox",s)},"setupGraphViewbox")}),rh=t(()=>{e(),Kc={},Zc=me((t,e,r)=>{let n="";return t in Kc&&Kc[t]?n=Kc[t](r):M.warn("No theme found for "+t),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} @@ -340,144 +340,158 @@ l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, margin: 0 } - ${i} + ${n} ${e} -`},"getStyles"),Zc=me((t,e)=>{void 0!==e&&(Xc[t]=e)},"addStylesForDiagram"),Qc=Kc}),rh={};lPt(rh,{clear:()=>oh,getAccDescription:()=>uh,getAccTitle:()=>ch,getDiagramTitle:()=>ph,setAccDescription:()=>hh,setAccTitle:()=>lh,setDiagramTitle:()=>dh});var ih,nh,ah,sh,oh,lh,ch,hh,uh,dh,ph,gh,fh,D,mh,yh,vh,xh,bh,wh,kh,Th,Eh,Ch,_h,Sh,Ah,Lh,Nh,Ih,Rh,Mh,Dh,Oh,Ph,Bh,Fh,$h,zh,Gh,Uh,qh,jh,Wh,Yh,Hh,Vh,Xh,Kh,Zh,Qh,Jh,tu,eu,ru,iu,nu,au,su,ou,lu,cu,hu,uu,du,pu,gu=t(()=>{Jc(),Ai(),ah=nh=ih="",sh=me(t=>_c(t,Nr()),"sanitizeText"),oh=me(()=>{nh=ah=ih=""},"clear"),lh=me(t=>{ih=sh(t).replace(/^\s+/g,"")},"setAccTitle"),ch=me(()=>ih,"getAccTitle"),hh=me(t=>{ah=sh(t).replace(/\n\s+/g,` -`)},"setAccDescription"),uh=me(()=>ah,"getAccDescription"),dh=me(t=>{nh=sh(t)},"setDiagramTitle"),ph=me(()=>nh,"getDiagramTitle")}),fu=t(()=>{Gr(),e(),Ai(),Jc(),th(),eh(),gu(),gh=M,fh=T,D=Nr,mh=Lr,yh=xr,vh=me(t=>_c(t,D()),"sanitizeText"),xh=Vc,bh=me(()=>rh,"getCommonDb"),wh={},kh=me((t,e,r)=>{wh[t]&&gh.warn(`Diagram with id ${t} already registered. Overwriting.`),wh[t]=e,r&&Qt(t,r),Zc(t,e.styles),e.injectUtils?.(gh,fh,D,vh,xh,bh(),()=>{})},"registerDiagram"),Th=me(t=>{if(t in wh)return wh[t];throw new Eh(t)},"getDiagram"),Eh=class extends Error{static{me(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}}),mu=t(()=>{fu(),Jc(),gu(),Ch=[],_h=[""],Lh=[{alias:Sh="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Ah=""}],Ih="",Rh=!(Nh=[]),Mh=4,Dh=2,Ph=me(function(){return Oh},"getC4Type"),Bh=me(function(t){Oh=_c(t,D())},"setC4Type"),Fh=me(function(r,i,n,a,s,o,l,c,h){if(null!=r&&null!=i&&null!=n&&null!=a){let t={},e=Nh.find(t=>t.from===i&&t.to===n);e?t=e:Nh.push(t),t.type=r,t.from=i,t.to=n,t.label={text:a},null==s?t.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],t[r]={text:a}):t.techn={text:s},null==o?t.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],t[r]={text:a}):t.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],t[s]=r):t.sprite=l,"object"==typeof c?([a,o]=Object.entries(c)[0],t[a]=o):t.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],t[s]=r):t.link=h,t.wrap=ou()}},"addRel"),$h=me(function(r,i,n,a,s,o,l){if(null!==i&&null!==n){let t={},e=Ch.find(t=>t.alias===i);var c;e&&i===e.alias?t=e:(t.alias=i,Ch.push(t)),t.label=null==n?{text:""}:{text:n},null==a?t.descr={text:""}:"object"==typeof a?([n,c]=Object.entries(a)[0],t[n]={text:c}):t.descr={text:a},"object"==typeof s?([n,c]=Object.entries(s)[0],t[n]=c):t.sprite=s,"object"==typeof o?([a,n]=Object.entries(o)[0],t[a]=n):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.typeC4Shape={text:r},t.parentBoundary=Sh,t.wrap=ou()}},"addPersonOrSystem"),zh=me(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let t={},e=Ch.find(t=>t.alias===i);var h;e&&i===e.alias?t=e:(t.alias=i,Ch.push(t)),t.label=null==n?{text:""}:{text:n},null==a?t.techn={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],t[n]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([n,h]=Object.entries(s)[0],t[n]={text:h}):t.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],t[a]=n):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,n]=Object.entries(c)[0],t[a]=n):t.link=c,t.wrap=ou(),t.typeC4Shape={text:r},t.parentBoundary=Sh}},"addContainer"),Gh=me(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let t={},e=Ch.find(t=>t.alias===i);var h;e&&i===e.alias?t=e:(t.alias=i,Ch.push(t)),t.label=null==n?{text:""}:{text:n},null==a?t.techn={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],t[n]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([n,h]=Object.entries(s)[0],t[n]={text:h}):t.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],t[a]=n):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,n]=Object.entries(c)[0],t[a]=n):t.link=c,t.wrap=ou(),t.typeC4Shape={text:r},t.parentBoundary=Sh}},"addComponent"),Uh=me(function(r,i,n,a,s){if(null!==r&&null!==i){let t={},e=Lh.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Lh.push(t)),t.label=null==i?{text:""}:{text:i},null==n?t.type={text:"system"}:"object"==typeof n?([i,o]=Object.entries(n)[0],t[i]={text:o}):t.type={text:n},"object"==typeof a?([i,o]=Object.entries(a)[0],t[i]=o):t.tags=a,"object"==typeof s?([n,i]=Object.entries(s)[0],t[n]=i):t.link=s,t.parentBoundary=Sh,t.wrap=ou(),Ah=Sh,Sh=r,_h.push(Ah)}},"addPersonOrSystemBoundary"),qh=me(function(r,i,n,a,s){if(null!==r&&null!==i){let t={},e=Lh.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Lh.push(t)),t.label=null==i?{text:""}:{text:i},null==n?t.type={text:"container"}:"object"==typeof n?([i,o]=Object.entries(n)[0],t[i]={text:o}):t.type={text:n},"object"==typeof a?([i,o]=Object.entries(a)[0],t[i]=o):t.tags=a,"object"==typeof s?([n,i]=Object.entries(s)[0],t[n]=i):t.link=s,t.parentBoundary=Sh,t.wrap=ou(),Ah=Sh,Sh=r,_h.push(Ah)}},"addContainerBoundary"),jh=me(function(r,i,n,a,s,t,o,l){if(null!==i&&null!==n){let t={},e=Lh.find(t=>t.alias===i);var c;e&&i===e.alias?t=e:(t.alias=i,Lh.push(t)),t.label=null==n?{text:""}:{text:n},null==a?t.type={text:"node"}:"object"==typeof a?([n,c]=Object.entries(a)[0],t[n]={text:c}):t.type={text:a},null==s?t.descr={text:""}:"object"==typeof s?([n,c]=Object.entries(s)[0],t[n]={text:c}):t.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],t[a]=n):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.nodeType=r,t.parentBoundary=Sh,t.wrap=ou(),Ah=Sh,Sh=i,_h.push(Ah)}},"addDeploymentNode"),Wh=me(function(){Sh=Ah,_h.pop(),Ah=_h.pop(),_h.push(Ah)},"popBoundaryParseStack"),Yh=me(function(t,e,r,i,n,a,s,o,l,c,h){let u=Ch.find(t=>t.alias===e);var d,p;void 0===u&&void 0===(u=Lh.find(t=>t.alias===e))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=i&&("object"==typeof i?([p,d]=Object.entries(i)[0],u[p]=d):u.fontColor=i),null!=n&&("object"==typeof n?([r,p]=Object.entries(n)[0],u[r]=p):u.borderColor=n),null!=a&&("object"==typeof a?([d,i]=Object.entries(a)[0],u[d]=i):u.shadowing=a),null!=s&&("object"==typeof s?([r,p]=Object.entries(s)[0],u[r]=p):u.shape=s),null!=o&&("object"==typeof o?([n,d]=Object.entries(o)[0],u[n]=d):u.sprite=o),null!=l&&("object"==typeof l?([i,a]=Object.entries(l)[0],u[i]=a):u.techn=l),null!=c&&("object"==typeof c?([r,p]=Object.entries(c)[0],u[r]=p):u.legendText=c),null!=h&&("object"==typeof h?([s,n]=Object.entries(h)[0],u[s]=n):u.legendSprite=h))},"updateElStyle"),Hh=me(function(t,e,r,i,n,a,s){var o,l,c=Nh.find(t=>t.from===e&&t.to===r);void 0!==c&&(null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.textColor=i),null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.lineColor=n),null!=a&&("object"==typeof a?([i,o]=Object.entries(a)[0],c[i]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,n]=Object.entries(s)[0],c[l]=parseInt(n)):c.offsetY=parseInt(s))},"updateRelStyle"),Vh=me(function(t,e,r){var e="object"==typeof e?(i=Object.values(e)[0],parseInt(i)):parseInt(e),i="object"==typeof r?(i=Object.values(r)[0],parseInt(i)):parseInt(r);1<=e&&(Mh=e),1<=i&&(Dh=i)},"updateLayoutConfig"),Xh=me(function(){return Mh},"getC4ShapeInRow"),Kh=me(function(){return Dh},"getC4BoundaryInRow"),Zh=me(function(){return Sh},"getCurrentBoundaryParse"),Qh=me(function(){return Ah},"getParentBoundaryParse"),Jh=me(function(e){return null==e?Ch:Ch.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),tu=me(function(e){return Ch.find(t=>t.alias===e)},"getC4Shape"),eu=me(function(t){return Object.keys(Jh(t))},"getC4ShapeKeys"),ru=me(function(e){return null==e?Lh:Lh.filter(t=>t.parentBoundary===e)},"getBoundaries"),iu=ru,nu=me(function(){return Nh},"getRels"),au=me(function(){return Ih},"getTitle"),su=me(function(t){Rh=t},"setWrap"),ou=me(function(){return Rh},"autoWrap"),lu=me(function(){Ch=[],Lh=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Sh="global",_h=[Ah=""],_h=[Ih=""],Rh=!(Nh=[]),Mh=4,Dh=2},"clear"),cu={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},hu={FILLED:0,OPEN:1},uu={LEFTOF:0,RIGHTOF:1,OVER:2},du=me(function(t){Ih=_c(t,D())},"setTitle"),pu={addPersonOrSystem:$h,addPersonOrSystemBoundary:Uh,addContainer:zh,addContainerBoundary:qh,addComponent:Gh,addDeploymentNode:jh,popBoundaryParseStack:Wh,addRel:Fh,updateElStyle:Yh,updateRelStyle:Hh,updateLayoutConfig:Vh,autoWrap:ou,setWrap:su,getC4ShapeArray:Jh,getC4Shape:tu,getC4ShapeKeys:eu,getBoundaries:ru,getBoundarys:iu,getCurrentBoundaryParse:Zh,getParentBoundaryParse:Qh,getRels:nu,getTitle:au,getC4Type:Ph,getC4ShapeInRow:Xh,getC4BoundaryInRow:Kh,setAccTitle:lh,getAccTitle:ch,getAccDescription:uh,setAccDescription:hh,getConfig:me(()=>D().c4,"getConfig"),clear:lu,LINETYPE:cu,ARROWTYPE:hu,PLACEMENT:uu,setTitle:du,setC4Type:Bh}});function yu(t,e){return null==t||null==e?NaN:t{me(yu,"ascending")});function xu(t,e){return null==t||null==e?NaN:e{me(xu,"descending")});function wu(r){let a,s,n;function o(t,e,r=0,i=t.length){if(r>>1}while(s(t[n],e)<0?r=1+n:i=n,r>>1}while(s(t[n],e)<=0?r=1+n:i=n,r-n(t[i],e)?i-1:i}return n=2!==r.length?(a=yu,s=me((t,e)=>yu(r(t),e),"compare2"),me((t,e)=>r(t)-e,"delta")):(a=r===yu||r===xu?r:ku,s=r),me(o,"left"),me(t,"right"),me(e,"center"),{left:o,center:e,right:t}}function ku(){return 0}var Tu=t(()=>{vu(),bu(),me(wu,"bisector"),me(ku,"zero")});function Eu(t){return null===t?NaN:+t}var Cu,_u,Su=t(()=>{me(Eu,"number")}),Au=t(()=>{vu(),Tu(),Su(),Cu=wu(yu).right,wu(Eu).center,_u=Cu});function Lu({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):r}function Nu({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):(t.set(e,r),r)}function Iu({_intern:t,_key:e},r){return e=e(r),t.has(e)&&(r=t.get(e),t.delete(e)),r}function Ru(t){return null!==t&&"object"==typeof t?t.valueOf():t}var Mu,Du=t(()=>{Mu=class extends Map{static{me(this,"InternMap")}constructor(t,e=Ru){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(var[r,i]of t)this.set(r,i)}get(t){return super.get(Lu(this,t))}has(t){return super.has(Lu(this,t))}set(t,e){return super.set(Nu(this,t),e)}delete(t){return super.delete(Iu(this,t))}},me(Lu,"intern_get"),me(Nu,"intern_set"),me(Iu,"intern_delete"),me(Ru,"keyof")});function Ou(t,e,r){let i=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=$u<=a?10:zu<=a?5:Gu<=a?2:1,o,l,c;return n<0?(c=Math.pow(10,-n)/s,o=Math.round(t*c),l=Math.round(e*c),o/ce&&--l,c=-c):(c=Math.pow(10,n)*s,o=Math.round(t/c),l=Math.round(e/c),o*ce&&--l),l{$u=Math.sqrt(50),zu=Math.sqrt(10),Gu=Math.sqrt(2),me(Ou,"tickSpec"),me(Pu,"ticks"),me(Bu,"tickIncrement"),me(Fu,"tickStep")});function qu(e,r){let i;if(void 0===r)for(var t of e)null!=t&&(i{me(qu,"max")});function Wu(e,r){let i;if(void 0===r)for(var t of e)null!=t&&(i>t||void 0===i&&t<=t)&&(i=t);else{let t=-1;for(var n of e)null!=(n=r(n,++t,e))&&(i>n||void 0===i&&n<=n)&&(i=n)}return i}var Yu=t(()=>{me(Wu,"min")});function Hu(t,e,r){t=+t,e=+e,r=(n=arguments.length)<2?(e=t,t=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(n);++i{me(Hu,"range")}),Xu=t(()=>{Au(),Tu(),ju(),Yu(),Vu(),Uu(),Du()});function Ku(t){return t}var Zu=t(()=>{me(Ku,"default")});function Qu(t){return"translate("+t+",0)"}function Ju(t){return"translate(0,"+t+")"}function td(e){return t=>+e(t)}function ed(e,r){return r=Math.max(0,e.bandwidth()-2*r)/2,e.round()&&(r=Math.round(r)),t=>+e(t)+r}function rd(){return!this.__axis}function id(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1{Zu(),sd=1,od=3,me(Qu,"translateX"),me(Ju,"translateY"),me(td,"number"),me(ed,"center"),me(rd,"entering"),me(id,"axis"),me(nd,"axisTop"),me(ad,"axisBottom")}),cd=t(()=>{ld()});function hd(){for(var t,e=0,r=arguments.length,i={};e{fd={value:me(()=>{},"value")},me(hd,"dispatch"),me(ud,"Dispatch"),me(dd,"parseTypenames"),ud.prototype=hd.prototype={constructor:ud,on:me(function(t,e){var r,i=this._,n=dd(t+"",i),a=-1,s=n.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a{xd()}),wd=t(()=>{vd={svg:"http://www.w3.org/2000/svg",xhtml:yd="http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function kd(t){var e=t+="",r=e.indexOf(":");return 0<=r&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),vd.hasOwnProperty(e)?{space:vd[e],local:t}:t}var Td=t(()=>{wd(),me(kd,"default")});function Ed(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===yd&&t.documentElement.namespaceURI===yd?t.createElement(r):t.createElementNS(e,r)}}function Cd(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function _d(t){return((t=kd(t)).local?Cd:Ed)(t)}var Sd=t(()=>{Td(),wd(),me(Ed,"creatorInherit"),me(Cd,"creatorFixed"),me(_d,"default")});function Ad(){}function Ld(t){return null==t?Ad:function(){return this.querySelector(t)}}var Nd=t(()=>{me(Ad,"none"),me(Ld,"default")});function Id(t){"function"!=typeof t&&(t=Ld(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n{cg(),Nd(),me(Id,"default")});function Md(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}var Dd=t(()=>{me(Md,"array")});function Od(){return[]}function Pd(t){return null==t?Od:function(){return this.querySelectorAll(t)}}var Bd=t(()=>{me(Od,"empty"),me(Pd,"default")});function Fd(t){return function(){return Md(t.apply(this,arguments))}}function $d(t){t=("function"==typeof t?Fd:Pd)(t);for(var e=this._groups,r=e.length,i=[],n=[],a=0;a{cg(),Dd(),Bd(),me(Fd,"arrayAll"),me($d,"default")});function Gd(t){return function(){return this.matches(t)}}function Ud(e){return function(t){return t.matches(e)}}var qd=t(()=>{me(Gd,"default"),me(Ud,"childMatcher")});function jd(t){return function(){return Hd.call(this.children,t)}}function Wd(){return this.firstElementChild}function Yd(t){return this.select(null==t?Wd:jd("function"==typeof t?t:Ud(t)))}var Hd,Vd=t(()=>{qd(),Hd=Array.prototype.find,me(jd,"childFind"),me(Wd,"childFirst"),me(Yd,"default")});function Xd(){return Array.from(this.children)}function Kd(t){return function(){return Qd.call(this.children,t)}}function Zd(t){return this.selectAll(null==t?Xd:Kd("function"==typeof t?t:Ud(t)))}var Qd,Jd=t(()=>{qd(),Qd=Array.prototype.filter,me(Xd,"children"),me(Kd,"childrenFilter"),me(Zd,"default")});function t0(t){"function"!=typeof t&&(t=Gd(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n{cg(),qd(),me(t0,"default")});function r0(t){return new Array(t.length)}var i0=t(()=>{me(r0,"default")});function n0(){return new ng(this._enter||this._groups.map(r0),this._parents)}function a0(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var s0=t(()=>{i0(),cg(),me(n0,"default"),me(a0,"EnterNode"),a0.prototype={constructor:a0,appendChild:me(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:me(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:me(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:me(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")}});function o0(t){return function(){return t}}var l0=t(()=>{me(o0,"default")});function c0(t,e,r,i,n,a){for(var s,o=0,l=e.length,c=a.length;o{cg(),s0(),l0(),me(c0,"bindIndex"),me(h0,"bindKey"),me(u0,"datum"),me(d0,"default"),me(p0,"arraylike")});function f0(){return new ng(this._exit||this._groups.map(r0),this._parents)}var m0=t(()=>{i0(),cg(),me(f0,"default")});function y0(t,e,r){var i=this.enter(),n=this,a=this.exit(),i="function"==typeof t?(i=t(i))&&i.selection():i.append(t+"");return null!=e&&(n=(n=e(n))&&n.selection()),null==r?a.remove():r(a),i&&n?i.merge(n).order():n}var v0=t(()=>{me(y0,"default")});function x0(t){for(var t=t.selection?t.selection():t,e=this._groups,r=t._groups,i=e.length,t=r.length,n=Math.min(i,t),a=new Array(i),s=0;s{cg(),me(x0,"default")});function w0(){for(var t=this._groups,e=-1,r=t.length;++e{me(w0,"default")});function T0(r){function t(t,e){return t&&e?r(t.__data__,e.__data__):!t-!e}r=r||E0,me(t,"compareNode");for(var e=this._groups,i=e.length,n=new Array(i),a=0;a{cg(),me(T0,"default"),me(E0,"ascending")});function _0(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var S0=t(()=>{me(_0,"default")});function A0(){return Array.from(this)}var L0=t(()=>{me(A0,"default")});function N0(){for(var t=this._groups,e=0,r=t.length;e{me(N0,"default")});function R0(){let t=0;for(var e of this)++t;return t}var M0=t(()=>{me(R0,"default")});function D0(){return!this.node()}var O0=t(()=>{me(D0,"default")});function P0(t){for(var e=this._groups,r=0,i=e.length;r{me(P0,"default")});function F0(t){return function(){this.removeAttribute(t)}}function $0(t){return function(){this.removeAttributeNS(t.space,t.local)}}function z0(t,e){return function(){this.setAttribute(t,e)}}function G0(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function U0(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}}function q0(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function j0(t,e){var r,t=kd(t);return arguments.length<2?(r=this.node(),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)):this.each((null==e?t.local?$0:F0:"function"==typeof e?t.local?q0:U0:t.local?G0:z0)(t,e))}var W0=t(()=>{Td(),me(F0,"attrRemove"),me($0,"attrRemoveNS"),me(z0,"attrConstant"),me(G0,"attrConstantNS"),me(U0,"attrFunction"),me(q0,"attrFunctionNS"),me(j0,"default")});function Y0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var H0=t(()=>{me(Y0,"default")});function V0(t){return function(){this.style.removeProperty(t)}}function X0(t,e,r){return function(){this.style.setProperty(t,e,r)}}function K0(e,r,i){return function(){var t=r.apply(this,arguments);null==t?this.style.removeProperty(e):this.style.setProperty(e,t,i)}}function Z0(t,e,r){return 1{H0(),me(V0,"styleRemove"),me(X0,"styleConstant"),me(K0,"styleFunction"),me(Z0,"default"),me(Q0,"styleValue")});function tp(t){return function(){delete this[t]}}function ep(t,e){return function(){this[t]=e}}function rp(e,r){return function(){var t=r.apply(this,arguments);null==t?delete this[e]:this[e]=t}}function ip(t,e){return 1{me(tp,"propertyRemove"),me(ep,"propertyConstant"),me(rp,"propertyFunction"),me(ip,"default")});function ap(t){return t.trim().split(/^|\s+/)}function sp(t){return t.classList||new op(t)}function op(t){this._node=t,this._names=ap(t.getAttribute("class")||"")}function lp(t,e){for(var r=sp(t),i=-1,n=e.length;++i{me(ap,"classArray"),me(sp,"classList"),me(op,"ClassList"),op.prototype={add:me(function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:me(function(t){0<=(t=this._names.indexOf(t))&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:me(function(t){return 0<=this._names.indexOf(t)},"contains")},me(lp,"classedAdd"),me(cp,"classedRemove"),me(hp,"classedTrue"),me(up,"classedFalse"),me(dp,"classedFunction"),me(pp,"default")});function fp(){this.textContent=""}function mp(t){return function(){this.textContent=t}}function yp(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function vp(t){return arguments.length?this.each(null==t?fp:("function"==typeof t?yp:mp)(t)):this.node().textContent}var xp=t(()=>{me(fp,"textRemove"),me(mp,"textConstant"),me(yp,"textFunction"),me(vp,"default")});function bp(){this.innerHTML=""}function wp(t){return function(){this.innerHTML=t}}function kp(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Tp(t){return arguments.length?this.each(null==t?bp:("function"==typeof t?kp:wp)(t)):this.node().innerHTML}var Ep=t(()=>{me(bp,"htmlRemove"),me(wp,"htmlConstant"),me(kp,"htmlFunction"),me(Tp,"default")});function Cp(){this.nextSibling&&this.parentNode.appendChild(this)}function _p(){return this.each(Cp)}var Sp=t(()=>{me(Cp,"raise"),me(_p,"default")});function Ap(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Lp(){return this.each(Ap)}var Np=t(()=>{me(Ap,"lower"),me(Lp,"default")});function Ip(t){var e="function"==typeof t?t:_d(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var Rp=t(()=>{Sd(),me(Ip,"default")});function Mp(){return null}function Dp(t,e){var r="function"==typeof t?t:_d(t),i=null==e?Mp:"function"==typeof e?e:Ld(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}var Op=t(()=>{Sd(),Nd(),me(Mp,"constantNull"),me(Dp,"default")});function Pp(){var t=this.parentNode;t&&t.removeChild(this)}function Bp(){return this.each(Pp)}var Fp=t(()=>{me(Pp,"remove"),me(Bp,"default")});function $p(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function zp(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gp(t){return this.select(t?zp:$p)}var Up=t(()=>{me($p,"selection_cloneShallow"),me(zp,"selection_cloneDeep"),me(Gp,"default")});function qp(t){return arguments.length?this.property("__data__",t):this.node().__data__}var jp=t(()=>{me(qp,"default")});function Wp(e){return function(t){e.call(this,t,this.__data__)}}function Yp(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return 0<=r&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}function Hp(a){return function(){var t=this.__on;if(t){for(var e,r=0,i=-1,n=t.length;r{me(Wp,"contextListener"),me(Yp,"parseTypenames"),me(Hp,"onRemove"),me(Vp,"onAdd"),me(Xp,"default")});function Zp(t,e,r){var i=Y0(t),n=i.CustomEvent;"function"==typeof n?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function Qp(t,e){return function(){return Zp(this,t,e)}}function Jp(t,e){return function(){return Zp(this,t,e.apply(this,arguments))}}function tg(t,e){return this.each(("function"==typeof e?Jp:Qp)(t,e))}var eg=t(()=>{H0(),me(Zp,"dispatchEvent"),me(Qp,"dispatchConstant"),me(Jp,"dispatchFunction"),me(tg,"default")});function*rg(){for(var t=this._groups,e=0,r=t.length;e{me(rg,"default")});function ng(t,e){this._groups=t,this._parents=e}function ag(){return new ng([[document.documentElement]],og)}function sg(){return this}var og,lg,cg=t(()=>{Rd(),zd(),Vd(),Jd(),e0(),g0(),s0(),m0(),v0(),b0(),k0(),C0(),S0(),L0(),I0(),M0(),O0(),B0(),W0(),J0(),np(),gp(),xp(),Ep(),Sp(),Np(),Rp(),Op(),Fp(),Up(),jp(),Kp(),eg(),ig(),og=[null],me(ng,"Selection"),me(ag,"selection"),me(sg,"selection_selection"),ng.prototype=ag.prototype={constructor:ng,select:Id,selectAll:$d,selectChild:Yd,selectChildren:Zd,filter:t0,data:d0,enter:n0,exit:f0,join:y0,merge:x0,selection:sg,order:w0,sort:T0,call:_0,nodes:A0,node:N0,size:R0,empty:D0,each:P0,attr:j0,style:Z0,property:ip,classed:pp,text:vp,html:Tp,raise:_p,lower:Lp,append:Ip,insert:Dp,remove:Bp,clone:Gp,datum:qp,on:Xp,dispatch:tg,[Symbol.iterator]:rg},lg=ag});function j(t){return"string"==typeof t?new ng([[document.querySelector(t)]],[document.documentElement]):new ng([[t]],og)}var hg=t(()=>{cg(),me(j,"default")}),ug=t(()=>{qd(),Td(),hg(),cg(),Nd(),Bd(),J0()}),dg=t(()=>{});function pg(t,e,r){(t.prototype=e.prototype=r).constructor=t}function gg(t,e){var r,i=Object.create(t.prototype);for(r in e)i[r]=e[r];return i}var fg=t(()=>{me(pg,"default"),me(gg,"extend")});function mg(){}function yg(){return this.rgb().formatHex()}function vg(){return this.rgb().formatHex8()}function xg(){return Dg(this).formatHsl()}function bg(){return this.rgb().formatRgb()}function wg(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=qg.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?kg(e):3===r?new _g(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Tg(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Tg(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=jg.exec(t))?new _g(e[1],e[2],e[3],1):(e=Wg.exec(t))?new _g(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Yg.exec(t))?Tg(e[1],e[2],e[3],e[4]):(e=Hg.exec(t))?Tg(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Vg.exec(t))?Mg(e[1],e[2]/100,e[3]/100,1):(e=Xg.exec(t))?Mg(e[1],e[2]/100,e[3]/100,e[4]):Kg.hasOwnProperty(t)?kg(Kg[t]):"transparent"===t?new _g(NaN,NaN,NaN,0):null}function kg(t){return new _g(t>>16&255,t>>8&255,255&t,1)}function Tg(t,e,r,i){return new _g(t=i<=0?e=r=NaN:t,e,r,i)}function Eg(t){return(t=t instanceof mg?t:wg(t))?new _g((t=t.rgb()).r,t.g,t.b,t.opacity):new _g}function Cg(t,e,r,i){return 1===arguments.length?Eg(t):new _g(t,e,r,i??1)}function _g(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Sg(){return"#"+Rg(this.r)+Rg(this.g)+Rg(this.b)}function Ag(){return"#"+Rg(this.r)+Rg(this.g)+Rg(this.b)+Rg(255*(isNaN(this.opacity)?1:this.opacity))}function Lg(){var t=Ng(this.opacity);return(1===t?"rgb(":"rgba(")+Ig(this.r)+`, ${Ig(this.g)}, `+Ig(this.b)+(1===t?")":`, ${t})`)}function Ng(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ig(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Rg(t){return((t=Ig(t))<16?"0":"")+t.toString(16)}function Mg(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new Pg(t,e,r,i)}function Dg(t){var e,r,i,n,a,s,o,l;return t instanceof Pg?new Pg(t.h,t.s,t.l,t.opacity):(t=t instanceof mg?t:wg(t))?t instanceof Pg?t:(e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),s=NaN,l=((a=Math.max(e,r,i))+n)/2,(o=a-n)?(s=e===a?(r-i)/o+6*(r{fg(),me(mg,"Color"),zg="\\s*([+-]?\\d+)\\s*",Gg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ug="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qg=/^#([0-9a-f]{3,8})$/,jg=new RegExp(`^rgb\\(${zg},${zg},${zg}\\)$`),Wg=new RegExp(`^rgb\\(${Ug},${Ug},${Ug}\\)$`),Yg=new RegExp(`^rgba\\(${zg},${zg},${zg},${Gg}\\)$`),Hg=new RegExp(`^rgba\\(${Ug},${Ug},${Ug},${Gg}\\)$`),Vg=new RegExp(`^hsl\\(${Gg},${Ug},${Ug}\\)$`),Xg=new RegExp(`^hsla\\(${Gg},${Ug},${Ug},${Gg}\\)$`),Kg={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},pg(mg,wg,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:yg,formatHex:yg,formatHex8:vg,formatHsl:xg,formatRgb:bg,toString:bg}),me(yg,"color_formatHex"),me(vg,"color_formatHex8"),me(xg,"color_formatHsl"),me(bg,"color_formatRgb"),me(wg,"color"),me(kg,"rgbn"),me(Tg,"rgba"),me(Eg,"rgbConvert"),me(Cg,"rgb"),me(_g,"Rgb"),pg(_g,Cg,gg(mg,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _g(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new _g(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _g(Ig(this.r),Ig(this.g),Ig(this.b),Ng(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:Sg,formatHex:Sg,formatHex8:Ag,formatRgb:Lg,toString:Lg})),me(Sg,"rgb_formatHex"),me(Ag,"rgb_formatHex8"),me(Lg,"rgb_formatRgb"),me(Ng,"clampa"),me(Ig,"clampi"),me(Rg,"hex"),me(Mg,"hsla"),me(Dg,"hslConvert"),me(Og,"hsl"),me(Pg,"Hsl"),pg(Pg,Og,gg(mg,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Pg(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Pg(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l;return new _g($g(240<=t?t-240:120+t,r=2*r-(e=r+(r<.5?r:1-r)*e),e),$g(t,r,e),$g(t<120?240+t:t-120,r,e),this.opacity)},clamp(){return new Pg(Bg(this.h),Fg(this.s),Fg(this.l),Ng(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 t=Ng(this.opacity);return(1===t?"hsl(":"hsla(")+Bg(this.h)+`, ${100*Fg(this.s)}%, ${100*Fg(this.l)}%`+(1===t?")":`, ${t})`)}})),me(Bg,"clamph"),me(Fg,"clampt"),me($g,"hsl2rgb")}),t1=t(()=>{Zg=Math.PI/180,Qg=180/Math.PI});function e1(t){var e,r,i,n,a,s;return t instanceof i1?new i1(t.l,t.a,t.b,t.opacity):t instanceof h1?u1(t):(n=n1(.2225045*(e=o1((t=t instanceof _g?t:Eg(t)).r))+.7168786*(r=o1(t.g))+.0606169*(i=o1(t.b))),e===r&&r===i?a=s=n:(a=n1((.4360747*e+.3850649*r+.1430804*i)/.96422),s=n1((.0139322*e+.0971045*r+.7141733*i)/.82521)),new i1(116*n-16,500*(a-n),200*(n-s),t.opacity))}function r1(t,e,r,i){return 1===arguments.length?e1(t):new i1(t,e,r,i??1)}function i1(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function n1(t){return f1{fg(),Jg(),t1(),d1=4/29,g1=3*(p1=6/29)*p1,f1=p1*p1*p1,me(e1,"labConvert"),me(r1,"lab"),me(i1,"Lab"),pg(i1,r1,gg(mg,{brighter(t){return new i1(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new i1(this.l-18*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new _g(s1(3.1338561*(e=.96422*a1(e))-1.6168667*(t=+a1(t))-.4906146*(r=.82521*a1(r))),s1(-.9787684*e+1.9161415*t+.033454*r),s1(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),me(n1,"xyz2lab"),me(a1,"lab2xyz"),me(s1,"lrgb2rgb"),me(o1,"rgb2lrgb"),me(l1,"hclConvert"),me(c1,"hcl"),me(h1,"Hcl"),me(u1,"hcl2lab"),pg(h1,c1,gg(mg,{brighter(t){return new h1(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new h1(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return u1(this).rgb()}}))}),y1=t(()=>{Jg(),m1()});function v1(t,e,r,i,n){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*i+s*n)/6}function x1(s){var o=s.length-1;return function(t){var e=t<=0?t=0:1<=t?o-(t=1):Math.floor(t*o),r=s[e],i=s[e+1],n=0{me(v1,"basis"),me(x1,"default")});function w1(i){var n=i.length;return function(t){var e=Math.floor(((t%=1)<0?++t:t)*n),r=i[(e+n-1)%n];return v1((t-e/n)*n,r,i[e%n],i[(e+1)%n],i[(e+2)%n])}}var k1,T1=t(()=>{b1(),me(w1,"default")}),E1=t(()=>{k1=me(t=>()=>t,"default")});function C1(e,r){return function(t){return e+t*r}}function _1(e,r,i){return e=Math.pow(e,i),r=Math.pow(r,i)-e,i=1/i,function(t){return Math.pow(e+t*r,i)}}function S1(t,e){var r=e-t;return r?C1(t,180{E1(),me(C1,"linear"),me(_1,"exponential"),me(S1,"hue"),me(A1,"gamma"),me(L1,"nogamma")});function I1(o){return function(t){for(var e,r=t.length,i=new Array(r),n=new Array(r),a=new Array(r),s=0;s{y1(),b1(),T1(),N1(),R1=me(function t(e){var s=A1(e);function r(e,t){var r=s((e=Cg(e)).r,(t=Cg(t)).r),i=s(e.g,t.g),n=s(e.b,t.b),a=L1(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=n(t),e.opacity=a(t),e+""}}return me(r,"rgb"),r.gamma=t,r},"rgbGamma")(1),me(I1,"rgbSpline"),I1(x1),I1(w1)});function D1(e,r){r=r||[];var i,n=e?Math.min(r.length,e.length):0,a=r.slice();return function(t){for(i=0;i{me(D1,"default"),me(O1,"isNumberArray")});function B1(t,e){for(var r=e?e.length:0,i=t?Math.min(r,t.length):0,n=new Array(i),a=new Array(r),s=0;s{Q1(),me(B1,"genericArray")});function $1(e,r){var i=new Date;return e=+e,r=+r,function(t){return i.setTime(e*(1-t)+r*t),i}}var z1=t(()=>{me($1,"default")});function G1(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var U1=t(()=>{me(G1,"default")});function q1(t,e){var r,i={},n={};for(r in null!==t&&"object"==typeof t||(t={}),e=null!==e&&"object"==typeof e?e:{})r in t?i[r]=Z1(t[r],e[r]):n[r]=e[r];return function(t){for(r in i)n[r]=i[r](t);return n}}var j1=t(()=>{Q1(),me(q1,"default")});function W1(t){return function(){return t}}function Y1(e){return function(t){return e(t)+""}}function H1(t,i){var e,r,n,a=V1.lastIndex=X1.lastIndex=0,s=-1,o=[],l=[];for(t+="",i+="";(e=V1.exec(t))&&(r=X1.exec(i));)(n=r.index)>a&&(n=i.slice(a,n),o[s]?o[s]+=n:o[++s]=n),(e=e[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:G1(e,r)})),a=X1.lastIndex;return a{U1(),V1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,X1=new RegExp(V1.source,"g"),me(W1,"zero"),me(Y1,"one"),me(H1,"default")});function Z1(t,e){var r=typeof e;return null==e||"boolean"==r?k1(e):("number"==r?G1:"string"==r?(r=wg(e))?(e=r,R1):H1:e instanceof wg?R1:e instanceof Date?$1:O1(e)?D1:Array.isArray(e)?B1:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?q1:G1)(t,e)}var Q1=t(()=>{y1(),M1(),F1(),z1(),U1(),j1(),K1(),E1(),P1(),me(Z1,"default")});function J1(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var tf=t(()=>{me(J1,"default")});function ef(t,e,r,i,n,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),t*i{rf=180/Math.PI,nf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},me(ef,"default")});function sf(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?nf:ef(t.a,t.b,t.c,t.d,t.e,t.f)}function of(t){return null!=t&&((lf=lf||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=lf.transform.baseVal.consolidate())?ef((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):nf}var lf,cf=t(()=>{af(),me(sf,"parseCss"),me(of,"parseSvg")});function hf(r,o,l,n){function c(t){return t.length?t.pop()+" ":""}function i(t,e,r,i,n,a){var s;t!==r||e!==i?(s=n.push("translate(",null,o,null,l),a.push({i:s-4,x:G1(t,r)},{i:s-2,x:G1(e,i)})):(r||i)&&n.push("translate("+r+o+i+l)}function s(t,e,r,i){t!==e?(180{U1(),cf(),me(hf,"interpolateTransform"),uf=hf(sf,"px, ","px)","deg)"),df=hf(of,", ",")",")")});function gf(s){return function(e,t){var r=s((e=c1(e)).h,(t=c1(t)).h),i=L1(e.c,t.c),n=L1(e.l,t.l),a=L1(e.opacity,t.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=n(t),e.opacity=a(t),e+""}}}var ff,mf=t(()=>{y1(),N1(),me(gf,"hcl"),ff=gf(S1),gf(L1)}),yf=t(()=>{Q1(),U1(),tf(),K1(),pf(),M1(),mf()});function vf(){return Df||(Bf(xf),Df=Pf.now()+Of)}function xf(){Df=0}function bf(){this._call=this._time=this._next=null}function wf(t,e,r){var i=new bf;return i.restart(t,e,r),i}function kf(){vf(),++Sf;for(var t,e=If;e;)0<=(t=Df-e._time)&&e._call.call(void 0,t),e=e._next;--Sf}function Tf(){Df=(Mf=Pf.now())+Of,Sf=Af=0;try{kf()}finally{Sf=0,Cf(),Df=0}}function Ef(){var t=Pf.now(),e=t-Mf;Nfr._time&&(i=r._time),(t=r)._next):(e=r._next,r._next=null,t?t._next=e:If=e);Rf=t,_f(i)}function _f(t){Sf||(Af=Af&&clearTimeout(Af),24{Nf=1e3,Of=Df=Mf=Lf=Af=Sf=0,Pf="object"==typeof performance&&performance.now?performance:Date,Bf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)},me(vf,"now"),me(xf,"clearNow"),me(bf,"Timer"),bf.prototype=wf.prototype={constructor:bf,restart:me(function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?vf():+r)+(null==e?0:+e),this._next||Rf===this||(Rf?Rf._next=this:If=this,Rf=this),this._call=t,this._time=r,_f()},"restart"),stop:me(function(){this._call&&(this._call=null,this._time=1/0,_f())},"stop")},me(wf,"timer"),me(kf,"timerFlush"),me(Tf,"wake"),me(Ef,"poke"),me(Cf,"nap"),me(_f,"sleep")});function $f(e,r,t){var i=new bf;return r=null==r?0:+r,i.restart(t=>{i.stop(),e(t+r)},r,t),i}var zf=t(()=>{Ff(),me($f,"default")}),Gf=t(()=>{Ff(),zf()});function Uf(t,e,r,i,n,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};Yf(t,r,{name:e,index:i,group:n,on:Hf,tween:Vf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Xf})}function qf(t,e){if((t=Wf(t,e)).state>Xf)throw new Error("too late; already scheduled");return t}function jf(t,e){if((t=Wf(t,e)).state>Qf)throw new Error("too late; already running");return t}function Wf(t,e){if(t=(t=t.__transition)&&t[e])return t;throw new Error("transition not found")}function Yf(a,s,o){var l,c=a.__transition;function t(t){o.state=Kf,o.timer.restart(h,o.delay,o.time),o.delay<=t&&h(t-o.delay)}function h(t){var e,r,i,n;if(o.state!==Kf)return d();for(e in c)if(n=c[e],n.name===o.name){if(n.state===Qf)return $f(h);n.state===Jf?(n.state=em,n.timer.stop(),n.on.call("interrupt",a,a.__data__,n.index,n.group),delete c[e]):+e{bd(),Gf(),Hf=md("start","end","cancel","interrupt"),Vf=[],Xf=0,Kf=1,Zf=2,Qf=3,Jf=4,tm=5,em=6,me(Uf,"default"),me(qf,"init"),me(jf,"set"),me(Wf,"get"),me(Yf,"create")});function im(t,e){var r,i,n,a=t.__transition,s=!0;if(a){for(n in e=null==e?null:e+"",a)(r=a[n]).name!==e?s=!1:(i=Zf{rm(),me(im,"default")});function am(t){return this.each(function(){im(this,t)})}var sm=t(()=>{nm(),me(am,"default")});function om(n,a){var s,o;return function(){var t=jf(this,n),e=t.tween;if(e!==s)for(var r=0,i=(o=s=e).length;r{rm(),me(om,"tweenRemove"),me(lm,"tweenFunction"),me(cm,"default"),me(hm,"tweenValue")});function dm(t,e){var r;return("number"==typeof e?G1:e instanceof wg?R1:(r=wg(e))?(e=r,R1):H1)(t,e)}var pm=t(()=>{y1(),yf(),me(dm,"default")});function gm(t){return function(){this.removeAttribute(t)}}function fm(t){return function(){this.removeAttributeNS(t.space,t.local)}}function mm(e,r,i){var n,a,s=i+"";return function(){var t=this.getAttribute(e);return t===s?null:t===n?a:a=r(n=t,i)}}function ym(e,r,i){var n,a,s=i+"";return function(){var t=this.getAttributeNS(e.space,e.local);return t===s?null:t===n?a:a=r(n=t,i)}}function vm(i,n,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttribute(i):(t=this.getAttribute(i))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=n(s=t,r))}}function xm(i,n,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttributeNS(i.space,i.local):(t=this.getAttributeNS(i.space,i.local))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=n(s=t,r))}}function bm(t,e){var r=kd(t),i="transform"===r?df:dm;return this.attrTween(t,"function"==typeof e?(r.local?xm:vm)(r,i,hm(this,"attr."+t,e)):null==e?(r.local?fm:gm)(r):(r.local?ym:mm)(r,i,e))}var wm=t(()=>{yf(),ug(),um(),pm(),me(gm,"attrRemove"),me(fm,"attrRemoveNS"),me(mm,"attrConstant"),me(ym,"attrConstantNS"),me(vm,"attrFunction"),me(xm,"attrFunctionNS"),me(bm,"default")});function km(e,r){return function(t){this.setAttribute(e,r.call(this,t))}}function Tm(e,r){return function(t){this.setAttributeNS(e.space,e.local,r.call(this,t))}}function Em(e,r){var i,n;function t(){var t=r.apply(this,arguments);return i=t!==n?(n=t)&&Tm(e,t):i}return me(t,"tween"),t._value=r,t}function Cm(e,r){var i,n;function t(){var t=r.apply(this,arguments);return i=t!==n?(n=t)&&km(e,t):i}return me(t,"tween"),t._value=r,t}function _m(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return t=kd(t),this.tween(r,(t.local?Em:Cm)(t,e))}var Sm=t(()=>{ug(),me(km,"attrInterpolate"),me(Tm,"attrInterpolateNS"),me(Em,"attrTweenNS"),me(Cm,"attrTween"),me(_m,"default")});function Am(t,e){return function(){qf(this,t).delay=+e.apply(this,arguments)}}function Lm(t,e){return e=+e,function(){qf(this,t).delay=e}}function Nm(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Am:Lm)(e,t)):Wf(this.node(),e).delay}var Im=t(()=>{rm(),me(Am,"delayFunction"),me(Lm,"delayConstant"),me(Nm,"default")});function Rm(t,e){return function(){jf(this,t).duration=+e.apply(this,arguments)}}function Mm(t,e){return e=+e,function(){jf(this,t).duration=e}}function Dm(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Rm:Mm)(e,t)):Wf(this.node(),e).duration}var Om=t(()=>{rm(),me(Rm,"durationFunction"),me(Mm,"durationConstant"),me(Dm,"default")});function Pm(t,e){if("function"!=typeof e)throw new Error;return function(){jf(this,t).ease=e}}function Bm(t){var e=this._id;return arguments.length?this.each(Pm(e,t)):Wf(this.node(),e).ease}var Fm=t(()=>{rm(),me(Pm,"easeConstant"),me(Bm,"default")});function $m(e,r){return function(){var t=r.apply(this,arguments);if("function"!=typeof t)throw new Error;jf(this,e).ease=t}}function zm(t){if("function"!=typeof t)throw new Error;return this.each($m(this._id,t))}var Gm=t(()=>{rm(),me($m,"easeVarying"),me(zm,"default")});function Um(t){"function"!=typeof t&&(t=Gd(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n{ug(),Dy(),me(Um,"default")});function jm(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,t=r.length,n=Math.min(i,t),a=new Array(i),s=0;s{Dy(),me(jm,"default")});function Ym(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return!(t=0<=e?t.slice(0,e):t)||"start"===t})}function Hm(r,i,n){var a,s,o=Ym(i)?qf:jf;return function(){var t=o(this,r),e=t.on;e!==a&&(s=(a=e).copy()).on(i,n),t.on=s}}function Vm(t,e){var r=this._id;return arguments.length<2?Wf(this.node(),r).on.on(t):this.each(Hm(r,t,e))}var Xm=t(()=>{rm(),me(Ym,"start"),me(Hm,"onFunction"),me(Vm,"default")});function Km(r){return function(){var t,e=this.parentNode;for(t in this.__transition)if(+t!==r)return;e&&e.removeChild(this)}}function Zm(){return this.on("end.remove",Km(this._id))}var Qm=t(()=>{me(Km,"removeFunction"),me(Zm,"default")});function Jm(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Ld(t));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s{ug(),Dy(),rm(),me(Jm,"default")});function ey(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Pd(t));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o{ug(),Dy(),rm(),me(ey,"default")});function iy(){return new ny(this._groups,this._parents)}var ny,ay=t(()=>{ug(),ny=lg.prototype.constructor,me(iy,"default")});function sy(r,i){var n,a,s;return function(){var t=Q0(this,r),e=(this.style.removeProperty(r),Q0(this,r));return t===e?null:t===n&&e===a?s:s=i(n=t,a=e)}}function oy(t){return function(){this.style.removeProperty(t)}}function ly(e,r,i){var n,a,s=i+"";return function(){var t=Q0(this,e);return t===s?null:t===n?a:a=r(n=t,i)}}function cy(i,n,a){var s,o,l;return function(){var t=Q0(this,i),e=a(this),r=e+"";return null==e&&(this.style.removeProperty(i),r=e=Q0(this,i)),t===r?null:t===s&&r===o?l:(o=r,l=n(s=t,e))}}function hy(i,n){var a,s,o,l,c="style."+n,h="end."+c;return function(){var t=jf(this,i),e=t.on,r=null==t.value[c]?l=l||oy(n):void 0;e===a&&o===r||(s=(a=e).copy()).on(h,o=r),t.on=s}}function uy(t,e,r){var i="transform"==(t+="")?uf:dm;return null==e?this.styleTween(t,sy(t,i)).on("end.style."+t,oy(t)):"function"==typeof e?this.styleTween(t,cy(t,i,hm(this,"style."+t,e))).each(hy(this._id,t)):this.styleTween(t,ly(t,i,e),r).on("end.style."+t,null)}var dy=t(()=>{yf(),ug(),rm(),um(),pm(),me(sy,"styleNull"),me(oy,"styleRemove"),me(ly,"styleConstant"),me(cy,"styleFunction"),me(hy,"styleMaybeRemove"),me(uy,"default")});function py(e,r,i){return function(t){this.style.setProperty(e,r.call(this,t),i)}}function gy(e,r,i){var n,a;function t(){var t=r.apply(this,arguments);return n=t!==a?(a=t)&&py(e,t,i):n}return me(t,"tween"),t._value=r,t}function fy(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,gy(t,e,r??""))}var my=t(()=>{me(py,"styleInterpolate"),me(gy,"styleTween"),me(fy,"default")});function yy(t){return function(){this.textContent=t}}function vy(e){return function(){var t=e(this);this.textContent=t??""}}function xy(t){return this.tween("text","function"==typeof t?vy(hm(this,"text",t)):yy(null==t?"":t+""))}var by=t(()=>{um(),me(yy,"textConstant"),me(vy,"textFunction"),me(xy,"default")});function wy(e){return function(t){this.textContent=e.call(this,t)}}function ky(e){var r,i;function t(){var t=e.apply(this,arguments);return r=t!==i?(i=t)&&wy(t):r}return me(t,"tween"),t._value=e,t}function Ty(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,ky(t))}var Ey=t(()=>{me(wy,"textInterpolate"),me(ky,"textTween"),me(Ty,"default")});function Cy(){for(var t=this._name,e=this._id,r=++Ry,i=this._groups,n=i.length,a=0;a{Dy(),rm(),me(Cy,"default")});function Sy(){var n,a,s=this,o=s._id,l=s.size();return new Promise(function(t,e){var r={value:e},i={value:me(function(){0==--l&&t()},"value")};s.each(function(){var t=jf(this,o),e=t.on;e!==n&&((a=(n=e).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(i)),t.on=a}),0===l&&t()})}var Ay=t(()=>{rm(),me(Sy,"default")});function Ly(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Ny(t){return lg().transition(t)}function Iy(){return++Ry}var Ry,My,Dy=t(()=>{ug(),wm(),Sm(),Im(),Om(),Fm(),Gm(),qm(),Wm(),Xm(),Qm(),ty(),ry(),ay(),dy(),my(),by(),Ey(),_y(),um(),Ay(),Ry=0,me(Ly,"Transition"),me(Ny,"transition"),me(Iy,"newId"),My=lg.prototype,Ly.prototype=Ny.prototype={constructor:Ly,select:Jm,selectAll:ey,selectChild:My.selectChild,selectChildren:My.selectChildren,filter:Um,merge:jm,selection:iy,transition:Cy,call:My.call,nodes:My.nodes,node:My.node,size:My.size,empty:My.empty,each:My.each,on:Vm,attr:bm,attrTween:_m,style:uy,styleTween:fy,text:xy,textTween:Ty,remove:Zm,tween:cm,delay:Nm,duration:Dm,ease:Bm,easeVarying:zm,end:Sy,[Symbol.iterator]:My[Symbol.iterator]}});function Oy(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Py=t(()=>{me(Oy,"cubicInOut")}),By=t(()=>{Py()});function Fy(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function $y(t){var e,r;t=t instanceof Ly?(e=t._id,t._name):(e=++Ry,(r=zy).time=vf(),null==t?null:t+"");for(var i=this._groups,n=i.length,a=0;a{Dy(),rm(),By(),Gf(),zy={time:null,delay:0,duration:250,ease:Oy},me(Fy,"inherit"),me($y,"default")}),Uy=t(()=>{ug(),sm(),Gy(),lg.prototype.interrupt=am,lg.prototype.transition=$y}),qy=t(()=>{Uy()}),jy=t(()=>{}),Wy=t(()=>{}),Yy=t(()=>{});function Hy(t){return[+t[0],+t[1]]}function Vy(t){return[Hy(t[0]),Hy(t[1])]}function Xy(t){return{type:t}}var Ky,Zy,Qy,Jy=t(()=>{qy(),jy(),Wy(),Yy(),{abs:Ky,max:Zy,min:Qy}=Math,me(Hy,"number1"),me(Vy,"number2"),["w","e"].map(Xy),me(function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),me(function(t){return t&&[t[0][0],t[1][0]]},"output"),["n","s"].map(Xy),me(function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),me(function(t){return t&&[t[0][1],t[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(Xy),me(function(t){return null==t?null:Vy(t)},"input"),me(function(t){return t},"output"),me(Xy,"type")}),t2=t(()=>{Jy()});function e2(r){this._+=r[0];for(let t=1,e=r.length;t{n2=Math.PI,o2=(a2=2*n2)-(s2=1e-6),me(e2,"append"),me(r2,"appendRound"),l2=class{static{me(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?e2:r2(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,n,a){this._append`C${+t},${+e},${+r},${+i},${this._x1=+n},${this._y1=+a}`}arcTo(t,e,r,i,n){if(t=+t,e=+e,r=+r,i=+i,(n=+n)<0)throw new Error("negative radius: "+n);var a,s,o=this._x1,l=this._y1,c=r-t,h=i-e,u=o-t,d=l-e,p=u*u+d*d;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:s2s2&&n?(s=c*c+h*h,i=(r-=o)*r+(o=i-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=n*Math.tan((n2-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,Math.abs(p-1)>s2&&this._append`L${t+p*u},${e+p*d}`,this._append`A${n},${n},0,0,${+(u*os2||Math.abs(this._y1-c)>s2)&&this._append`L${l},${c}`,r&&((a=a<0?a%a2+a2:a)>o2?this._append`A${r},${r},0,1,${h},${t-s},${e-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:s2{c2()}),u2=t(()=>{}),d2=t(()=>{}),p2=t(()=>{}),g2=t(()=>{}),f2=t(()=>{}),m2=t(()=>{}),y2=t(()=>{});function v2(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function x2(t,e){var r;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(r=t.slice(0,e)).length?r[0]+r.slice(2):r,+t.slice(e+1)]}var b2=t(()=>{me(v2,"default"),me(x2,"formatDecimalParts")});function w2(t){return(t=x2(Math.abs(t)))?t[1]:NaN}var k2=t(()=>{b2(),me(w2,"default")});function T2(o,l){return function(t,e){for(var r=t.length,i=[],n=0,a=o[0],s=0;0e));)a=o[n=(n+1)%o.length];return i.reverse().join(l)}}var E2=t(()=>{me(T2,"default")});function C2(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var _2=t(()=>{me(C2,"default")});function S2(t){var e;if(e=L2.exec(t))return new A2({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function A2(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}var L2,N2=t(()=>{L2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,me(S2,"formatSpecifier"),S2.prototype=A2.prototype,me(A2,"FormatSpecifier"),A2.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 I2(t){t:for(var e,r=t.length,i=1,n=-1;i{me(I2,"default")});function M2(t,e){var r,i,n=x2(t,e);return n?(r=n[0],(n=(n=n[1])-(D2=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1)===(i=r.length)?r:i{b2(),me(M2,"default")});function P2(t,e){var r;return(e=x2(t,e))?(r=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+r:r.length>e+1?r.slice(0,e+1)+"."+r.slice(e+1):r+new Array(e-r.length+2).join("0")):t+""}var B2,F2=t(()=>{b2(),me(P2,"default")}),$2=t(()=>{b2(),O2(),F2(),B2={"%":me((t,e)=>(100*t).toFixed(e),"%"),b:me(t=>Math.round(t).toString(2),"b"),c:me(t=>t+"","c"),d:v2,e:me((t,e)=>t.toExponential(e),"e"),f:me((t,e)=>t.toFixed(e),"f"),g:me((t,e)=>t.toPrecision(e),"g"),o:me(t=>Math.round(t).toString(8),"o"),p:me((t,e)=>P2(100*t,e),"p"),r:P2,s:M2,X:me(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:me(t=>Math.round(t).toString(16),"x")}});function z2(t){return t}var G2=t(()=>{me(z2,"default")});function U2(t){var k=void 0===t.grouping||void 0===t.thousands?z2:T2(q2.call(t.grouping,Number),t.thousands+""),i=void 0===t.currency?"":t.currency[0]+"",n=void 0===t.currency?"":t.currency[1]+"",T=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?z2:C2(q2.call(t.numerals,String)),a=void 0===t.percent?"%":t.percent+"",C=void 0===t.minus?"−":t.minus+"",_=void 0===t.nan?"NaN":t.nan+"";function s(t){var c=(t=S2(t)).fill,h=t.align,u=t.sign,e=t.symbol,d=t.zero,p=t.width,g=t.comma,f=t.precision,m=t.trim,y=t.type,v=("n"===y?(g=!0,y="g"):B2[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===e?i:"#"===e&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===e?n:/[%p]/.test(y)?a:"",b=B2[y],w=/[defgprs%]/.test(y);function r(t){var e,r,i,n=v,a=x;if("c"===y)a=b(t)+a,t="";else{var s=(t=+t)<0||1/t<0;if(t=isNaN(t)?_:b(Math.abs(t),f),m&&(t=I2(t)),n=((s=(!s||0!=+t||"+"===u)&&s)?"("===u?u:C:"-"===u||"("===u?"":u)+n,a=("s"===y?j2[8+D2/3]:"")+a+(s&&"("===u?")":""),w)for(e=-1,r=t.length;++e>1)+n+t+a+l.slice(o);break;default:t=l+n+t+a}return E(t)}return f=void 0===f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),me(r,"format"),r.toString=function(){return t+""},r}function e(t,e){var r=s(((t=S2(t)).type="f",t)),t=3*Math.max(-8,Math.min(8,Math.floor(w2(e)/3))),i=Math.pow(10,-t),n=j2[8+t/3];return function(t){return r(i*t)+n}}return me(s,"newFormat"),me(e,"formatPrefix"),{format:s,formatPrefix:e}}var q2,j2,W2=t(()=>{k2(),E2(),_2(),N2(),R2(),$2(),O2(),G2(),q2=Array.prototype.map,j2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],me(U2,"default")});function Y2(t){return H2=U2(t),V2=H2.format,X2=H2.formatPrefix,H2}var H2,V2,X2,K2=t(()=>{W2(),Y2({thousands:",",grouping:[3],currency:["$",""]}),me(Y2,"defaultLocale")});function Z2(t){return Math.max(0,-w2(Math.abs(t)))}var Q2=t(()=>{k2(),me(Z2,"default")});function J2(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(w2(e)/3)))-w2(Math.abs(t)))}var tv=t(()=>{k2(),me(J2,"default")});function ev(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,w2(e)-w2(t))+1}var rv=t(()=>{k2(),me(ev,"default")}),iv=t(()=>{K2(),N2(),Q2(),tv(),rv()}),nv=t(()=>{}),av=t(()=>{}),sv=t(()=>{}),ov=t(()=>{});function lv(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var cv=t(()=>{me(lv,"initRange")});function hv(){var r=new Mu,i=[],n=[],a=uv;function s(t){let e=r.get(t);if(void 0===e){if(a!==uv)return a;r.set(t,e=i.push(t)-1)}return n[e%n.length]}return me(s,"scale"),s.domain=function(t){if(!arguments.length)return i.slice();i=[],r=new Mu;for(var e of t)r.has(e)||r.set(e,i.push(e)-1);return s},s.range=function(t){return arguments.length?(n=Array.from(t),s):n.slice()},s.unknown=function(t){return arguments.length?(a=t,s):a},s.copy=function(){return hv(i,n).unknown(a)},lv.apply(s,arguments),s}var uv,dv=t(()=>{Xu(),cv(),uv=Symbol("implicit"),me(hv,"ordinal")});function pv(){var n,a,t=hv().unknown(void 0),s=t.domain,o=t.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function e(){var t=s().length,e=c{Xu(),cv(),dv(),me(pv,"band")});function fv(t){return function(){return t}}var mv=t(()=>{me(fv,"constants")});function yv(t){return+t}var vv=t(()=>{me(yv,"number")});function xv(t){return t}function bv(e,r){return(r-=e=+e)?function(t){return(t-e)/r}:fv(isNaN(r)?NaN:.5)}function wv(e,r){var t;return r{Xu(),yf(),mv(),vv(),Sv=[0,1],me(xv,"identity"),me(bv,"normalize"),me(wv,"clamper"),me(kv,"bimap"),me(Tv,"polymap"),me(Ev,"copy"),me(Cv,"transformer"),me(_v,"continuous")});function Lv(t,e,r,i){var n,a=Fu(t,e,r);switch((i=S2(i??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(n=J2(a,s))||(i.precision=n),X2(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=ev(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=Z2(a))||(i.precision=n-2*("%"===i.type))}return V2(i)}var Nv=t(()=>{Xu(),iv(),me(Lv,"tickFormat")});function Iv(c){var h=c.domain;return c.ticks=function(t){var e=h();return Pu(e[0],e[e.length-1],t??10)},c.tickFormat=function(t,e){var r=h();return Lv(r[0],r[r.length-1],t??10,e)},c.nice=function(t){null==t&&(t=10);var e,r,i=h(),n=0,a=i.length-1,s=i[n],o=i[a],l=10;for(o{Xu(),Av(),cv(),Nv(),me(Iv,"linearish"),me(Rv,"linear")});function Dv(t,e){var r,i=0,n=(t=t.slice()).length-1,a=t[i],s=t[n];return s{me(Dv,"nice")});function Pv(a,s,r,i){function o(t){return a(t=0===arguments.length?new Date:new Date(+t)),t}return me(o,"interval"),o.floor=t=>(a(t=new Date(+t)),t),o.ceil=t=>(a(t=new Date(t-1)),s(t,1),a(t),t),o.round=t=>{var e=o(t),r=o.ceil(t);return t-e(s(t=new Date(+t),null==e?1:Math.floor(e)),t),o.range=(t,e,r)=>{var i,n=[];if(t=o.ceil(t),r=null==r?1:Math.floor(r),tPv(t=>{if(t<=t)for(;a(t),!r(t);)t.setTime(t-1)},(t,e)=>{if(t<=t)if(e<0)for(;++e<=0;)for(;s(t,-1),!r(t););else for(;0<=--e;)for(;s(t,1),!r(t););}),r&&(o.count=(t,e)=>(Bv.setTime(+t),Fv.setTime(+e),a(Bv),a(Fv),Math.floor(r(Bv,Fv))),o.every=e=>(e=Math.floor(e),isFinite(e)&&0i(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}var Bv,Fv,$v,zv,Gv,Uv,qv,jv,Wv,Yv,Hv,Vv=t(()=>{Bv=new Date,Fv=new Date,me(Pv,"timeInterval")}),Xv=t(()=>{Vv(),($v=Pv(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t)).every=r=>(r=Math.floor(r),isFinite(r)&&0{t.setTime(Math.floor(t/r)*r)},(t,e)=>{t.setTime(+t+e*r)},(t,e)=>(e-t)/r):$v:null)}),Kv=t(()=>{Vv(),(zv=Pv(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds())).range}),Zv=t(()=>{Vv(),(Gv=Pv(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes())).range,(Uv=Pv(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())).range}),Qv=t(()=>{Vv(),(qv=Pv(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours())).range,(jv=Pv(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours())).range}),Jv=t(()=>{Vv(),(Wv=Pv(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1)).range,(Yv=Pv(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1)).range,(Hv=Pv(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5))).range});function tx(e){return Pv(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5)}function ex(e){return Pv(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}var rx,ix,nx,ax,sx,ox,lx,cx,hx,ux,dx,px,gx,fx,mx,yx,vx,xx,bx=t(()=>{Vv(),me(tx,"timeWeekday"),rx=tx(0),ix=tx(1),nx=tx(2),ax=tx(3),sx=tx(4),ox=tx(5),lx=tx(6),rx.range,ix.range,nx.range,ax.range,sx.range,ox.range,lx.range,me(ex,"utcWeekday"),cx=ex(0),hx=ex(1),ux=ex(2),dx=ex(3),px=ex(4),gx=ex(5),fx=ex(6),cx.range,hx.range,ux.range,dx.range,px.range,gx.range,fx.range}),wx=t(()=>{Vv(),(mx=Pv(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())).range,(yx=Pv(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())).range}),kx=t(()=>{Vv(),(vx=Pv(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{t.setFullYear(Math.floor(t.getFullYear()/r)*r),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e*r)}):null,(xx=Pv(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/r)*r),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e*r)}):null});function Tx(a,t,e,r,i,n){let s=[[zv,1,1e3],[zv,5,5e3],[zv,15,15e3],[zv,30,3e4],[n,1,6e4],[n,5,3e5],[n,15,9e5],[n,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[e,1,6048e5],[t,1,2592e6],[t,3,7776e6],[a,1,31536e6]];function o(t,e,r){var i=et).right(s,i);return n===s.length?a.every(Fu(t/31536e6,e/31536e6,r)):0===n?$v.every(Math.max(Fu(t,e,r),1)):([t,e]=s[i/s[n-1][2]{Xu(),Xv(),Kv(),Zv(),Qv(),Jv(),bx(),wx(),kx(),me(Tx,"ticker"),[Ex,Cx]=Tx(xx,yx,cx,Hv,jv,Uv),[_x,Sx]=Tx(vx,mx,rx,Wv,qv,Gv)}),Lx=t(()=>{Xv(),Kv(),Zv(),Qv(),Jv(),bx(),wx(),kx(),Ax()});function Nx(t){var e;return 0<=t.y&&t.y<100?((e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L)).setFullYear(t.y),e):new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Ix(t){var e;return 0<=t.y&&t.y<100?((e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L))).setUTCFullYear(t.y),e):new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Rx(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Mx(t){var i=t.dateTime,n=t.date,a=t.time,e=t.periods,r=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,c=Px(e),h=Bx(e),P=Px(r),B=Bx(r),F=Px(s),$=Bx(s),z=Px(o),G=Bx(o),U=Px(l),q=Bx(l),u={a:E,A:C,b:_,B:S,c:null,d:nb,e:nb,f:cb,g:bb,G:kb,H:ab,I:sb,j:ob,L:lb,m:hb,M:ub,p:A,q:L,Q:Wb,s:Yb,S:db,u:pb,U:gb,V:mb,w:yb,W:vb,x:null,X:null,y:xb,Y:wb,Z:Tb,"%":jb},d={a:N,A:I,b:R,B:M,c:null,d:Eb,e:Eb,f:Lb,g:zb,G:Ub,H:Cb,I:_b,j:Sb,L:Ab,m:Nb,M:Ib,p:D,q:O,Q:Wb,s:Yb,S:Rb,u:Mb,U:Db,V:Pb,w:Bb,W:Fb,x:null,X:null,y:$b,Y:Gb,Z:qb,"%":jb},j={a:y,A:v,b:x,B:b,c:w,d:Vx,e:Vx,f:tb,g:jx,G:qx,H:Kx,I:Kx,j:Xx,L:Jx,m:Hx,M:Zx,p:m,q:Yx,Q:rb,s:ib,S:Qx,u:$x,U:zx,V:Gx,w:Fx,W:Ux,x:k,X:T,y:jx,Y:qx,Z:Wx,"%":eb};function p(l,c){return function(t){var e,r,i,n=[],a=-1,s=0,o=l.length;for(t instanceof Date||(t=new Date(+t));++a[t.toLowerCase(),e]))}function Fx(t,e,r){return(e=Vb.exec(e.slice(r,r+1)))?(t.w=+e[0],r+e[0].length):-1}function $x(t,e,r){return(e=Vb.exec(e.slice(r,r+1)))?(t.u=+e[0],r+e[0].length):-1}function zx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.U=+e[0],r+e[0].length):-1}function Gx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.V=+e[0],r+e[0].length):-1}function Ux(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.W=+e[0],r+e[0].length):-1}function qx(t,e,r){return(e=Vb.exec(e.slice(r,r+4)))?(t.y=+e[0],r+e[0].length):-1}function jx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.y=+e[0]+(68<+e[0]?1900:2e3),r+e[0].length):-1}function Wx(t,e,r){return(e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6)))?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),r+e[0].length):-1}function Yx(t,e,r){return(e=Vb.exec(e.slice(r,r+1)))?(t.q=3*e[0]-3,r+e[0].length):-1}function Hx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.m=e[0]-1,r+e[0].length):-1}function Vx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.d=+e[0],r+e[0].length):-1}function Xx(t,e,r){return(e=Vb.exec(e.slice(r,r+3)))?(t.m=0,t.d=+e[0],r+e[0].length):-1}function Kx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.H=+e[0],r+e[0].length):-1}function Zx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.M=+e[0],r+e[0].length):-1}function Qx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.S=+e[0],r+e[0].length):-1}function Jx(t,e,r){return(e=Vb.exec(e.slice(r,r+3)))?(t.L=+e[0],r+e[0].length):-1}function tb(t,e,r){return(e=Vb.exec(e.slice(r,r+6)))?(t.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function eb(t,e,r){return(e=Xb.exec(e.slice(r,r+1)))?r+e[0].length:-1}function rb(t,e,r){return(e=Vb.exec(e.slice(r)))?(t.Q=+e[0],r+e[0].length):-1}function ib(t,e,r){return(e=Vb.exec(e.slice(r)))?(t.s=+e[0],r+e[0].length):-1}function nb(t,e){return Dx(t.getDate(),e,2)}function ab(t,e){return Dx(t.getHours(),e,2)}function sb(t,e){return Dx(t.getHours()%12||12,e,2)}function ob(t,e){return Dx(1+Wv.count(vx(t),t),e,3)}function lb(t,e){return Dx(t.getMilliseconds(),e,3)}function cb(t,e){return lb(t,e)+"000"}function hb(t,e){return Dx(t.getMonth()+1,e,2)}function ub(t,e){return Dx(t.getMinutes(),e,2)}function db(t,e){return Dx(t.getSeconds(),e,2)}function pb(t){return 0===(t=t.getDay())?7:t}function gb(t,e){return Dx(rx.count(vx(t)-1,t),e,2)}function fb(t){var e=t.getDay();return 4<=e||0===e?sx(t):sx.ceil(t)}function mb(t,e){return t=fb(t),Dx(sx.count(vx(t),t)+(4===vx(t).getDay()),e,2)}function yb(t){return t.getDay()}function vb(t,e){return Dx(ix.count(vx(t)-1,t),e,2)}function xb(t,e){return Dx(t.getFullYear()%100,e,2)}function bb(t,e){return Dx((t=fb(t)).getFullYear()%100,e,2)}function wb(t,e){return Dx(t.getFullYear()%1e4,e,4)}function kb(t,e){var r=t.getDay();return Dx((t=4<=r||0===r?sx(t):sx.ceil(t)).getFullYear()%1e4,e,4)}function Tb(t){return(0<(t=t.getTimezoneOffset())?"-":(t*=-1,"+"))+Dx(t/60|0,"0",2)+Dx(t%60,"0",2)}function Eb(t,e){return Dx(t.getUTCDate(),e,2)}function Cb(t,e){return Dx(t.getUTCHours(),e,2)}function _b(t,e){return Dx(t.getUTCHours()%12||12,e,2)}function Sb(t,e){return Dx(1+Yv.count(xx(t),t),e,3)}function Ab(t,e){return Dx(t.getUTCMilliseconds(),e,3)}function Lb(t,e){return Ab(t,e)+"000"}function Nb(t,e){return Dx(t.getUTCMonth()+1,e,2)}function Ib(t,e){return Dx(t.getUTCMinutes(),e,2)}function Rb(t,e){return Dx(t.getUTCSeconds(),e,2)}function Mb(t){return 0===(t=t.getUTCDay())?7:t}function Db(t,e){return Dx(cx.count(xx(t)-1,t),e,2)}function Ob(t){var e=t.getUTCDay();return 4<=e||0===e?px(t):px.ceil(t)}function Pb(t,e){return t=Ob(t),Dx(px.count(xx(t),t)+(4===xx(t).getUTCDay()),e,2)}function Bb(t){return t.getUTCDay()}function Fb(t,e){return Dx(hx.count(xx(t)-1,t),e,2)}function $b(t,e){return Dx(t.getUTCFullYear()%100,e,2)}function zb(t,e){return Dx((t=Ob(t)).getUTCFullYear()%100,e,2)}function Gb(t,e){return Dx(t.getUTCFullYear()%1e4,e,4)}function Ub(t,e){var r=t.getUTCDay();return Dx((t=4<=r||0===r?px(t):px.ceil(t)).getUTCFullYear()%1e4,e,4)}function qb(){return"+0000"}function jb(){return"%"}function Wb(t){return+t}function Yb(t){return Math.floor(+t/1e3)}var Hb,Vb,Xb,Kb,Zb=t(()=>{Lx(),me(Nx,"localDate"),me(Ix,"utcDate"),me(Rx,"newDate"),me(Mx,"formatLocale"),Hb={"-":"",_:" ",0:"0"},Vb=/^\s*\d+/,Xb=/^%/,Kb=/[\\^$*+?|[\]().{}]/g,me(Dx,"pad"),me(Ox,"requote"),me(Px,"formatRe"),me(Bx,"formatLookup"),me(Fx,"parseWeekdayNumberSunday"),me($x,"parseWeekdayNumberMonday"),me(zx,"parseWeekNumberSunday"),me(Gx,"parseWeekNumberISO"),me(Ux,"parseWeekNumberMonday"),me(qx,"parseFullYear"),me(jx,"parseYear"),me(Wx,"parseZone"),me(Yx,"parseQuarter"),me(Hx,"parseMonthNumber"),me(Vx,"parseDayOfMonth"),me(Xx,"parseDayOfYear"),me(Kx,"parseHour24"),me(Zx,"parseMinutes"),me(Qx,"parseSeconds"),me(Jx,"parseMilliseconds"),me(tb,"parseMicroseconds"),me(eb,"parseLiteralPercent"),me(rb,"parseUnixTimestamp"),me(ib,"parseUnixTimestampSeconds"),me(nb,"formatDayOfMonth"),me(ab,"formatHour24"),me(sb,"formatHour12"),me(ob,"formatDayOfYear"),me(lb,"formatMilliseconds"),me(cb,"formatMicroseconds"),me(hb,"formatMonthNumber"),me(ub,"formatMinutes"),me(db,"formatSeconds"),me(pb,"formatWeekdayNumberMonday"),me(gb,"formatWeekNumberSunday"),me(fb,"dISO"),me(mb,"formatWeekNumberISO"),me(yb,"formatWeekdayNumberSunday"),me(vb,"formatWeekNumberMonday"),me(xb,"formatYear"),me(bb,"formatYearISO"),me(wb,"formatFullYear"),me(kb,"formatFullYearISO"),me(Tb,"formatZone"),me(Eb,"formatUTCDayOfMonth"),me(Cb,"formatUTCHour24"),me(_b,"formatUTCHour12"),me(Sb,"formatUTCDayOfYear"),me(Ab,"formatUTCMilliseconds"),me(Lb,"formatUTCMicroseconds"),me(Nb,"formatUTCMonthNumber"),me(Ib,"formatUTCMinutes"),me(Rb,"formatUTCSeconds"),me(Mb,"formatUTCWeekdayNumberMonday"),me(Db,"formatUTCWeekNumberSunday"),me(Ob,"UTCdISO"),me(Pb,"formatUTCWeekNumberISO"),me(Bb,"formatUTCWeekdayNumberSunday"),me(Fb,"formatUTCWeekNumberMonday"),me($b,"formatUTCYear"),me(zb,"formatUTCYearISO"),me(Gb,"formatUTCFullYear"),me(Ub,"formatUTCFullYearISO"),me(qb,"formatUTCZone"),me(jb,"formatLiteralPercent"),me(Wb,"formatUnixTimestamp"),me(Yb,"formatUnixTimestampSeconds")});function Qb(t){return Jb=Mx(t),t4=Jb.format,Jb}var Jb,t4,e4=t(()=>{Zb(),Qb({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"]}),me(Qb,"defaultLocale")}),r4=t(()=>{e4()});function i4(t){return new Date(t)}function n4(t){return t instanceof Date?+t:+new Date(+t)}function a4(r,i,e,n,a,s,o,l,c,h){var u=_v(),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(t){return(c(t){Lx(),r4(),Av(),cv(),Ov(),me(i4,"date"),me(n4,"number"),me(a4,"calendar"),me(s4,"time")}),l4=t(()=>{gv(),Mv(),dv(),o4()});function c4(t){for(var e=t.length/6|0,r=new Array(e),i=0;i{me(c4,"default")}),d4=t(()=>{u4(),h4=c4("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),p4=t(()=>{d4()});function g4(t){return me(function(){return t},"constant")}var f4=t(()=>{me(g4,"default")});function m4(t){return 1{v4=Math.abs,x4=Math.atan2,b4=Math.cos,w4=Math.max,k4=Math.min,T4=Math.sin,E4=Math.sqrt,C4=1e-12,S4=(_4=Math.PI)/2,A4=2*_4,me(m4,"acos"),me(y4,"asin")});function N4(r){let i=3;return r.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);i=e}return r},()=>new l2(i)}var I4=t(()=>{h2(),me(N4,"withPath")});function R4(t){return t.innerRadius}function M4(t){return t.outerRadius}function D4(t){return t.startAngle}function O4(t){return t.endAngle}function P4(t){return t&&t.padAngle}function B4(t,e,r,i,n,a,s,o){var l=(o-=a)*(r-=t)-(s-=n)*(i-=e);if(!(l*lC4?(i+=u*=S?1:-1,n-=u):(a=0,i=n=(E+C)/2),(s-=2*d)>C4?(e+=d*=S?1:-1,r-=d):(s=0,e=r=(E+C)/2)),h=T*b4(e),u=T*T4(e),d=k*b4(n),E=k*T4(n),C4{f4(),L4(),I4(),me(R4,"arcInnerRadius"),me(M4,"arcOuterRadius"),me(D4,"arcStartAngle"),me(O4,"arcEndAngle"),me(P4,"arcPadAngle"),me(B4,"intersect"),me(F4,"cornerTangents"),me($4,"default")});function G4(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var U4=t(()=>{Array.prototype.slice,me(G4,"default")});function q4(t){this._context=t}function j4(t){return new q4(t)}var W4=t(()=>{me(q4,"Linear"),q4.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}},"point")},me(j4,"default")});function Y4(t){return t[0]}function H4(t){return t[1]}var V4=t(()=>{me(Y4,"x"),me(H4,"y")});function X4(s,o){var l=g4(!0),c=null,h=j4,u=null,d=N4(e);function e(t){var e,r,i,n=(t=G4(t)).length,a=!1;for(null==c&&(u=h(i=d())),e=0;e<=n;++e)!(e{U4(),f4(),W4(),I4(),V4(),me(X4,"default")});function Z4(t,e){return e{me(Z4,"default")});function J4(t){return t}var t5=t(()=>{me(J4,"default")});function e5(){var p=J4,g=Z4,f=null,m=g4(0),y=g4(A4),v=g4(0);function e(r){for(var t,e,i,n=(r=G4(r)).length,a=0,s=new Array(n),o=new Array(n),l=+m.apply(this,arguments),c=Math.min(A4,Math.max(-A4,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/n,v.apply(this,arguments)),u=h*(c<0?-1:1),d=0;d{U4(),f4(),Q4(),t5(),L4(),me(e5,"default")});function i5(t){return new a5(t,!0)}function n5(t){return new a5(t,!1)}var a5,s5=t(()=>{a5=class{static{me(this,"Bump")}constructor(t,e){this._context=t,this._x=e}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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}},me(i5,"bumpX"),me(n5,"bumpY")});function o5(){}var l5=t(()=>{me(o5,"default")});function c5(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function h5(t){this._context=t}function u5(t){return new h5(t)}var d5=t(()=>{me(c5,"point"),me(h5,"Basis"),h5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 3:c5(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:c5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(u5,"default")});function p5(t){this._context=t}function g5(t){return new p5(t)}var f5=t(()=>{l5(),d5(),me(p5,"BasisClosed"),p5.prototype={areaStart:o5,areaEnd:o5,lineStart:me(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:me(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:c5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(g5,"default")});function m5(t){this._context=t}function y5(t){return new m5(t)}var v5=t(()=>{d5(),me(m5,"BasisOpen"),m5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,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+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:c5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(y5,"default")});function x5(t,e){this._basis=new h5(t),this._beta=e}var b5,w5=t(()=>{d5(),me(x5,"Bundle"),x5.prototype={lineStart:me(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:me(function(){var t=this._x,e=this._y,r=t.length-1;if(0{me(k5,"point"),me(T5,"Cardinal"),T5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:k5(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:k5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},E5=me(function e(r){function t(t){return new T5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function _5(t,e){this._context=t,this._k=(1-e)/6}var S5,A5=t(()=>{l5(),C5(),me(_5,"CardinalClosed"),_5.prototype={areaStart:o5,areaEnd:o5,lineStart:me(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:me(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:k5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},S5=me(function e(r){function t(t){return new _5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function L5(t,e){this._context=t,this._k=(1-e)/6}var N5,I5=t(()=>{C5(),me(L5,"CardinalOpen"),L5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:k5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},N5=me(function e(r){function t(t){return new L5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function R5(t,e,r){var i,n,a=t._x1,s=t._y1,o=t._x2,l=t._y2;C4{L4(),C5(),me(R5,"point"),me(M5,"CatmullRom"),M5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(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:me(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:me(function(t,e){var r,i;switch(t=+t,e=+e,this._point&&(r=this._x2-t,i=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:R5(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},D5=me(function e(r){function t(t){return r?new M5(t,r):new T5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function P5(t,e){this._context=t,this._alpha=e}var B5,F5=t(()=>{A5(),l5(),O5(),me(P5,"CatmullRomClosed"),P5.prototype={areaStart:o5,areaEnd:o5,lineStart:me(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:me(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:me(function(t,e){var r,i;switch(t=+t,e=+e,this._point&&(r=this._x2-t,i=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:R5(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},B5=me(function e(r){function t(t){return r?new P5(t,r):new _5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function $5(t,e){this._context=t,this._alpha=e}var z5,G5=t(()=>{I5(),O5(),me($5,"CatmullRomOpen"),$5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(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:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r,i;switch(t=+t,e=+e,this._point&&(r=this._x2-t,i=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:R5(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},z5=me(function e(r){function t(t){return r?new $5(t,r):new L5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function U5(t){this._context=t}function q5(t){return new U5(t)}var j5=t(()=>{l5(),me(U5,"LinearClosed"),U5.prototype={areaStart:o5,areaEnd:o5,lineStart:me(function(){this._point=0},"lineStart"),lineEnd:me(function(){this._point&&this._context.closePath()},"lineEnd"),point:me(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")},me(q5,"default")});function W5(t){return t<0?-1:1}function Y5(t,e,r){var i=t._x1-t._x0,e=e-t._x1,n=(t._y1-t._y0)/(i||e<0&&-0),t=(n*e+(r=(r-t._y1)/(e||i<0&&-0))*i)/(i+e);return(W5(n)+W5(r))*Math.min(Math.abs(n),Math.abs(r),.5*Math.abs(t))||0}function H5(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function V5(t,e,r){var i=t._x0,n=t._x1,a=t._y1,s=(n-i)/3;t._context.bezierCurveTo(i+s,t._y0+s*e,n-s,a-s*r,n,a)}function X5(t){this._context=t}function K5(t){this._context=new Z5(t)}function Z5(t){this._context=t}function Q5(t){return new X5(t)}function J5(t){return new K5(t)}var t3=t(()=>{me(W5,"sign"),me(Y5,"slope3"),me(H5,"slope2"),me(V5,"point"),me(X5,"MonotoneX"),X5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:V5(this,this._t0,H5(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,V5(this,H5(this,r=Y5(this,t,e)),r);break;default:V5(this,this._t0,r=Y5(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")},me(K5,"MonotoneY"),(K5.prototype=Object.create(X5.prototype)).point=function(t,e){X5.prototype.point.call(this,e,t)},me(Z5,"ReflectContext"),Z5.prototype={moveTo:me(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:me(function(){this._context.closePath()},"closePath"),lineTo:me(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:me(function(t,e,r,i,n,a){this._context.bezierCurveTo(e,t,i,r,a,n)},"bezierCurveTo")},me(Q5,"monotoneX"),me(J5,"monotoneY")});function e3(t){this._context=t}function r3(t){var e,r,i=t.length-1,n=new Array(i),a=new Array(i),s=new Array(i);for(a[n[0]=0]=2,s[0]=t[0]+2*t[1],e=1;e{me(e3,"Natural"),e3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:me(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=r3(t),n=r3(e),a=0,s=1;s{me(a3,"Step"),a3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:me(function(){0{z4(),K4(),r5(),f5(),v5(),d5(),s5(),w5(),A5(),I5(),C5(),F5(),G5(),O5(),j5(),W4(),t3(),n3(),c3()}),u3=t(()=>{}),d3=t(()=>{});function p3(t,e,r){this.k=t,this.x=e,this.y=r}function g3(t){for(;!t.__zoom;)if(!(t=t.parentNode))return f3;return t.__zoom}var f3,m3,y3,v3,x3,b3,w3,k3,T3,E3,C3,_3,S3,A3,L3,N3,I3,R3,M3,D3,O3,P3,B3,F3,$3,z3,G3,U3,q3,j3,W3,Y3,H3=t(()=>{me(p3,"Transform"),p3.prototype={constructor:p3,scale:me(function(t){return 1===t?this:new p3(this.k*t,this.x,this.y)},"scale"),translate:me(function(t,e){return 0===t&0===e?this:new p3(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:me(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:me(function(t){return t*this.k+this.x},"applyX"),applyY:me(function(t){return t*this.k+this.y},"applyY"),invert:me(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:me(function(t){return(t-this.x)/this.k},"invertX"),invertY:me(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:me(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:me(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:me(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},f3=new p3(1,0,0),g3.prototype=p3.prototype,me(g3,"transform")}),V3=t(()=>{}),X3=t(()=>{qy(),u3(),d3(),H3(),V3()}),K3=t(()=>{X3(),H3()}),Z3=t(()=>{Xu(),cd(),t2(),u2(),y1(),d2(),p2(),bd(),dg(),g2(),By(),f2(),y2(),iv(),nv(),av(),yf(),h2(),sv(),m2(),ov(),l4(),p4(),ug(),h3(),Lx(),r4(),Gf(),qy(),K3()}),Q3=iPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|:)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}),J3=iPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var a=Q3();function s(t){return-1{m3=tt(J3(),1),Jc(),y3=me((t,e)=>{var r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(var i in e.attrs)r.attr(i,e.attrs[i]);return e.class&&r.attr("class",e.class),r},"drawRect"),v3=me((t,e)=>{e={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"},y3(t,e).lower()},"drawBackgroundRect"),x3=me((t,e)=>{var r=e.text.replace(wc," "),i=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),e.class&&t.attr("class",e.class),t.append("tspan"));return i.attr("x",e.x+2*e.textMargin),i.text(r),t},"drawText"),b3=me((t,e,r,i)=>{(t=t.append("image")).attr("x",e),t.attr("y",r),e=(0,m3.sanitizeUrl)(i),t.attr("xlink:href",e)},"drawImage"),w3=me((t,e,r,i)=>{(t=t.append("use")).attr("x",e),t.attr("y",r),e=(0,m3.sanitizeUrl)(i),t.attr("xlink:href","#"+e)},"drawEmbeddedImage"),k3=me(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),T3=me(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),e6=t(()=>{function e(t,e,r,i,n,a,s){g(e.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("text-anchor","middle").text(t),s)}function l(t,e,r,i,n,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;t{let i=t.append("g"),n=0;for(var a of e){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===n?((s=i.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)"),n=-1):((s=i.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());$3(r)(a.label.text,i,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(),$3(r)("["+a.techn.text+"]",i,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"),A3=me(function(t,e,r){let i=t.append("g"),n=e.bgColor||"none",a=e.borderColor||"#444444",s=e.fontColor||"black",o=e.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(C3(i,t={x:e.x,y:e.y,fill:n,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,$3(r)(e.label.text,i,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},l),e.type&&""!==e.type.text&&((l=r.boundaryFont()).fontColor=s,$3(r)(e.type.text,i,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},l)),e.descr&&""!==e.descr.text&&((l=r.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=s,$3(r)(e.descr.text,i,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))},"drawBoundary"),L3=me(function(t,e,r){let i=e.bgColor||r[e.typeC4Shape.text+"_bg_color"],n=e.borderColor||r[e.typeC4Shape.text+"_border_color"],a=e.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(e.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=t.append("g"),l=(o.attr("class","person-man"),k3());switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=i,l.width=e.width,l.height=e.height,l.stroke=n,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},C3(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}switch(t=F3(r,e.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",t.fontFamily).attr("font-size",t.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":_3(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s)}let c=r[e.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,$3(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},c),(c=r[e.typeC4Shape.text+"Font"]()).fontColor=a,e.techn&&""!==e.techn?.text?$3(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},c):e.type&&""!==e.type.text&&$3(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},c),e.descr&&""!==e.descr.text&&((c=r.personFont()).fontColor=a,$3(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},c)),e.height},"drawC4Shape"),N3=me(function(t){t.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"),I3=me(function(t){t.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"),R3=me(function(t){t.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"),M3=me(function(t){t.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"),D3=me(function(t){t.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"),O3=me(function(t){t.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"),P3=me(function(t){t.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"),B3=me(function(t){(t=t.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"),t.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"),F3=me((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),me(e,"byText"),me(l,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),$3=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},z3={drawRect:C3,drawBoundary:A3,drawC4Shape:L3,drawRels:S3,drawImage:_3,insertArrowHead:M3,insertArrowEnd:D3,insertArrowFilledHead:O3,insertDynamicNumber:P3,insertArrowCrossHead:B3,insertDatabaseIcon:N3,insertComputerIcon:I3,insertClockIcon:R3}}),r6=t(()=>{G3="object"==typeof global&&global&&global.Object===Object&&global,U3=G3}),i6=t(()=>{r6(),q3="object"==typeof self&&self&&self.Object===Object&&self,q3=U3||q3||Function("return this")(),j3=q3}),n6=t(()=>{i6(),W3=j3.Symbol,Y3=W3});function a6(t){var e=o6.call(t,c6),r=t[c6];try{var i=!(t[c6]=void 0)}catch{}var n=l6.call(t);return i&&(e?t[c6]=r:delete t[c6]),n}var s6,o6,l6,c6,h6,u6=t(()=>{n6(),s6=Object.prototype,o6=s6.hasOwnProperty,l6=s6.toString,c6=Y3?Y3.toStringTag:void 0,me(a6,"getRawTag"),h6=a6});function d6(t){return g6.call(t)}var p6,g6,f6,m6=t(()=>{p6=Object.prototype,g6=p6.toString,me(d6,"objectToString"),f6=d6});function y6(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(v6&&v6 in Object(t)?h6:f6)(t)}var v6,x6,b6=t(()=>{n6(),u6(),m6(),v6=Y3?Y3.toStringTag:void 0,me(y6,"baseGetTag"),x6=y6});function w6(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var k6,T6=t(()=>{me(w6,"isObject"),k6=w6});function E6(t){return!!k6(t)&&("[object Function]"==(t=x6(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var C6,_6,S6,A6=t(()=>{b6(),T6(),me(E6,"isFunction"),C6=E6}),L6=t(()=>{i6(),_6=j3["__core-js_shared__"],S6=_6});function N6(t){return!!I6&&I6 in t}var I6,R6,M6=t(()=>{var t;L6(),t=/[^.]+$/.exec(S6&&S6.keys&&S6.keys.IE_PROTO||""),I6=t?"Symbol(src)_1."+t:"",me(N6,"isMasked"),R6=N6});function D6(t){if(null!=t){try{return P6.call(t)}catch{}try{return t+""}catch{}}return""}var O6,P6,B6,F6=t(()=>{O6=Function.prototype,P6=O6.toString,me(D6,"toSource"),B6=D6});function $6(t){return!(!k6(t)||R6(t))&&(C6(t)?j6:G6).test(B6(t))}var z6,G6,U6,q6,j6,W6,Y6=t(()=>{A6(),M6(),T6(),F6(),z6=/[\\^$.*+?()[\]{}|]/g,G6=/^\[object .+?Constructor\]$/,U6=Function.prototype,q6=Object.prototype,U6=U6.toString,q6=q6.hasOwnProperty,j6=RegExp("^"+U6.call(q6).replace(z6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me($6,"baseIsNative"),W6=$6});function H6(t,e){return t?.[e]}var V6,X6=t(()=>{me(H6,"getValue"),V6=H6});function K6(t,e){return t=V6(t,e),W6(t)?t:void 0}var Z6,Q6,J6,tw=t(()=>{Y6(),X6(),me(K6,"getNative"),Z6=K6}),ew=t(()=>{tw(),Q6=Z6(Object,"create"),J6=Q6});function rw(){this.__data__=J6?J6(null):{},this.size=0}var iw,nw=t(()=>{ew(),me(rw,"hashClear"),iw=rw});function aw(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}var sw,ow=t(()=>{me(aw,"hashDelete"),sw=aw});function lw(t){var e,r=this.__data__;return J6?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:hw.call(r,t)?r[t]:void 0}var cw,hw,uw,dw=t(()=>{ew(),cw=Object.prototype,hw=cw.hasOwnProperty,me(lw,"hashGet"),uw=lw});function pw(t){var e=this.__data__;return J6?void 0!==e[t]:fw.call(e,t)}var gw,fw,mw,yw=t(()=>{ew(),gw=Object.prototype,fw=gw.hasOwnProperty,me(pw,"hashHas"),mw=pw});function vw(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=J6&&void 0===e?"__lodash_hash_undefined__":e,this}var xw,bw=t(()=>{ew(),me(vw,"hashSet"),xw=vw});function ww(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{nw(),ow(),dw(),yw(),bw(),me(ww,"Hash"),ww.prototype.clear=iw,ww.prototype.delete=sw,ww.prototype.get=uw,ww.prototype.has=mw,ww.prototype.set=xw,kw=ww});function Ew(){this.__data__=[],this.size=0}var Cw,_w=t(()=>{me(Ew,"listCacheClear"),Cw=Ew});function Sw(t,e){return t===e||t!=t&&e!=e}var Aw,Lw=t(()=>{me(Sw,"eq"),Aw=Sw});function Nw(t,e){for(var r=t.length;r--;)if(Aw(t[r][0],e))return r;return-1}var Iw,Rw=t(()=>{Lw(),me(Nw,"assocIndexOf"),Iw=Nw});function Mw(t){var e=this.__data__;return!((t=Iw(e,t))<0||(t==e.length-1?e.pop():Ow.call(e,t,1),--this.size,0))}var Dw,Ow,Pw,Bw=t(()=>{Rw(),Dw=Array.prototype,Ow=Dw.splice,me(Mw,"listCacheDelete"),Pw=Mw});function Fw(t){var e=this.__data__;return(t=Iw(e,t))<0?void 0:e[t][1]}var $w,zw=t(()=>{Rw(),me(Fw,"listCacheGet"),$w=Fw});function Gw(t){return-1{Rw(),me(Gw,"listCacheHas"),Uw=Gw});function jw(t,e){var r=this.__data__,i=Iw(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}var Ww,Yw=t(()=>{Rw(),me(jw,"listCacheSet"),Ww=jw});function Hw(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{_w(),Bw(),zw(),qw(),Yw(),me(Hw,"ListCache"),Hw.prototype.clear=Cw,Hw.prototype.delete=Pw,Hw.prototype.get=$w,Hw.prototype.has=Uw,Hw.prototype.set=Ww,Vw=Hw}),Qw=t(()=>{tw(),i6(),Xw=Z6(j3,"Map"),Kw=Xw});function Jw(){this.size=0,this.__data__={hash:new kw,map:new(Kw||Vw),string:new kw}}var tk,ek=t(()=>{Tw(),Zw(),Qw(),me(Jw,"mapCacheClear"),tk=Jw});function rk(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var ik,nk=t(()=>{me(rk,"isKeyable"),ik=rk});function ak(t,e){return t=t.__data__,ik(e)?t["string"==typeof e?"string":"hash"]:t.map}var sk,ok=t(()=>{nk(),me(ak,"getMapData"),sk=ak});function lk(t){return t=sk(this,t).delete(t),this.size-=t?1:0,t}var ck,hk=t(()=>{ok(),me(lk,"mapCacheDelete"),ck=lk});function uk(t){return sk(this,t).get(t)}var dk,pk=t(()=>{ok(),me(uk,"mapCacheGet"),dk=uk});function gk(t){return sk(this,t).has(t)}var fk,mk=t(()=>{ok(),me(gk,"mapCacheHas"),fk=gk});function yk(t,e){var r=sk(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}var vk,xk=t(()=>{ok(),me(yk,"mapCacheSet"),vk=yk});function bk(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{ek(),hk(),pk(),mk(),xk(),me(bk,"MapCache"),bk.prototype.clear=tk,bk.prototype.delete=ck,bk.prototype.get=dk,bk.prototype.has=fk,bk.prototype.set=vk,wk=bk});function Tk(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError(Ek);var a=me(function(){var t=arguments,e=n?n.apply(this,t):t[0],r=a.cache;return r.has(e)?r.get(e):(t=i.apply(this,t),a.cache=r.set(e,t)||r,t)},"memoized");return a.cache=new(Tk.Cache||wk),a}var Ek,Ck,_k=t(()=>{kk(),Ek="Expected a function",me(Tk,"memoize"),Tk.Cache=wk,Ck=Tk});function Sk(){this.__data__=new Vw,this.size=0}var Ak,Lk=t(()=>{Zw(),me(Sk,"stackClear"),Ak=Sk});function Nk(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}var Ik,Rk=t(()=>{me(Nk,"stackDelete"),Ik=Nk});function Mk(t){return this.__data__.get(t)}var Dk,Ok=t(()=>{me(Mk,"stackGet"),Dk=Mk});function Pk(t){return this.__data__.has(t)}var Bk,Fk=t(()=>{me(Pk,"stackHas"),Bk=Pk});function $k(t,e){var r=this.__data__;if(r instanceof Vw){var i=r.__data__;if(!Kw||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new wk(i)}return r.set(t,e),this.size=r.size,this}var zk,Gk=t(()=>{Zw(),Qw(),kk(),me($k,"stackSet"),zk=$k});function Uk(t){t=this.__data__=new Vw(t),this.size=t.size}var qk,jk,Wk,Yk=t(()=>{Zw(),Lk(),Rk(),Ok(),Fk(),Gk(),me(Uk,"Stack"),Uk.prototype.clear=Ak,Uk.prototype.delete=Ik,Uk.prototype.get=Dk,Uk.prototype.has=Bk,Uk.prototype.set=zk,qk=Uk}),Hk=t(()=>{tw(),jk=(()=>{try{var t=Z6(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Wk=jk});function Vk(t,e,r){"__proto__"==e&&Wk?Wk(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Xk,Kk=t(()=>{Hk(),me(Vk,"baseAssignValue"),Xk=Vk});function Zk(t,e,r){(void 0===r||Aw(t[e],r))&&(void 0!==r||e in t)||Xk(t,e,r)}var Qk,Jk=t(()=>{Kk(),Lw(),me(Zk,"assignMergeValue"),Qk=Zk});function tT(l){return function(t,e,r){for(var i=-1,n=Object(t),a=r(t),s=a.length;s--;){var o=a[l?s:++i];if(!1===e(n[o],o,n))break}return t}}var eT,rT,iT,nT=t(()=>{me(tT,"createBaseFor"),eT=tT}),aT=t(()=>{nT(),rT=eT(),iT=rT});function sT(t,e){return e?t.slice():(e=t.length,e=cT?cT(e):new t.constructor(e),t.copy(e),e)}var oT,lT,cT,hT,uT,dT,pT=t(()=>{i6(),oT="object"==typeof exports&&exports&&!exports.nodeType&&exports,lT=(lT=oT&&"object"==typeof module&&module&&!module.nodeType&&module)&&lT.exports===oT?j3.Buffer:void 0,cT=lT?lT.allocUnsafe:void 0,me(sT,"cloneBuffer"),hT=sT}),gT=t(()=>{i6(),uT=j3.Uint8Array,dT=uT});function fT(t){var e=new t.constructor(t.byteLength);return new dT(e).set(new dT(t)),e}var mT,yT=t(()=>{gT(),me(fT,"cloneArrayBuffer"),mT=fT});function vT(t,e){return e=e?mT(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var xT,bT=t(()=>{yT(),me(vT,"cloneTypedArray"),xT=vT});function wT(t,e){var r=-1,i=t.length;for(e=e||Array(i);++r{me(wT,"copyArray"),kT=wT}),_T=t(()=>{function e(){}T6(),TT=Object.create,me(e,"object"),ET=function(t){return k6(t)?TT?TT(t):(e.prototype=t,t=new e,e.prototype=void 0,t):{}}});function ST(e,r){return function(t){return e(r(t))}}var AT,LT,NT,IT=t(()=>{me(ST,"overArg"),AT=ST}),RT=t(()=>{IT(),LT=AT(Object.getPrototypeOf,Object),NT=LT});function MT(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||DT)}var DT,OT,PT=t(()=>{DT=Object.prototype,me(MT,"isPrototype"),OT=MT});function BT(t){return"function"!=typeof t.constructor||OT(t)?{}:ET(NT(t))}var FT,$T=t(()=>{_T(),RT(),PT(),me(BT,"initCloneObject"),FT=BT});function zT(t){return null!=t&&"object"==typeof t}var GT,UT=t(()=>{me(zT,"isObjectLike"),GT=zT});function qT(t){return GT(t)&&"[object Arguments]"==x6(t)}var jT,WT,YT,HT,VT,XT,KT,ZT=t(()=>{b6(),UT(),me(qT,"baseIsArguments"),jT=qT}),QT=t(()=>{ZT(),UT(),HT=Object.prototype,WT=HT.hasOwnProperty,YT=HT.propertyIsEnumerable,HT=jT(function(){return arguments}())?jT:function(t){return GT(t)&&WT.call(t,"callee")&&!YT.call(t,"callee")},VT=HT}),JT=t(()=>{XT=Array.isArray,KT=XT});function t7(t){return"number"==typeof t&&-1{me(t7,"isLength"),e7=t7});function i7(t){return null!=t&&e7(t.length)&&!C6(t)}var n7,a7=t(()=>{A6(),r7(),me(i7,"isArrayLike"),n7=i7});function s7(t){return GT(t)&&n7(t)}var o7,l7=t(()=>{a7(),UT(),me(s7,"isArrayLikeObject"),o7=s7});function c7(){return!1}var h7,u7,d7,p7,g7=t(()=>{me(c7,"stubFalse"),h7=c7}),f7=t(()=>{i6(),g7(),d7="object"==typeof exports&&exports&&!exports.nodeType&&exports,u7=(u7=d7&&"object"==typeof module&&module&&!module.nodeType&&module)&&u7.exports===d7?j3.Buffer:void 0,d7=u7?u7.isBuffer:void 0,p7=d7||h7});function m7(t){return!(!GT(t)||"[object Object]"!=x6(t))&&(null===(t=NT(t))||"function"==typeof(t=b7.call(t,"constructor")&&t.constructor)&&t instanceof t&&x7.call(t)==w7)}var y7,v7,x7,b7,w7,k7,T7=t(()=>{b6(),RT(),UT(),y7=Function.prototype,v7=Object.prototype,x7=y7.toString,b7=v7.hasOwnProperty,w7=x7.call(Object),me(m7,"isPlainObject"),k7=m7});function E7(t){return GT(t)&&e7(t.length)&&!!C7[x6(t)]}var C7,_7,S7=t(()=>{b6(),r7(),UT(),(C7={})["[object Float32Array]"]=C7["[object Float64Array]"]=C7["[object Int8Array]"]=C7["[object Int16Array]"]=C7["[object Int32Array]"]=C7["[object Uint8Array]"]=C7["[object Uint8ClampedArray]"]=C7["[object Uint16Array]"]=C7["[object Uint32Array]"]=!0,C7["[object Arguments]"]=C7["[object Array]"]=C7["[object ArrayBuffer]"]=C7["[object Boolean]"]=C7["[object DataView]"]=C7["[object Date]"]=C7["[object Error]"]=C7["[object Function]"]=C7["[object Map]"]=C7["[object Number]"]=C7["[object Object]"]=C7["[object RegExp]"]=C7["[object Set]"]=C7["[object String]"]=C7["[object WeakMap]"]=!1,me(E7,"baseIsTypedArray"),_7=E7});function A7(e){return function(t){return e(t)}}var L7,N7,I7,R7,M7,D7,O7,P7=t(()=>{me(A7,"baseUnary"),L7=A7}),B7=t(()=>{r6(),R7="object"==typeof exports&&exports&&!exports.nodeType&&exports,N7=R7&&"object"==typeof module&&module&&!module.nodeType&&module,R7=N7&&N7.exports===R7,I7=R7&&U3.process,R7=(()=>{try{return N7&&N7.require&&N7.require("util").types||I7&&I7.binding&&I7.binding("util")}catch{}})(),M7=R7}),F7=t(()=>{S7(),P7(),B7(),D7=(D7=M7&&M7.isTypedArray)?L7(D7):_7,O7=D7});function $7(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var z7,G7=t(()=>{me($7,"safeGet"),z7=$7});function U7(t,e,r){var i=t[e];j7.call(t,e)&&Aw(i,r)&&(void 0!==r||e in t)||Xk(t,e,r)}var q7,j7,W7,Y7=t(()=>{Kk(),Lw(),q7=Object.prototype,j7=q7.hasOwnProperty,me(U7,"assignValue"),W7=U7});function H7(t,e,r,i){var n=!r;r=r||{};for(var a=-1,s=e.length;++a{Y7(),Kk(),me(H7,"copyObject"),V7=H7});function K7(t,e){for(var r=-1,i=Array(t);++r{me(K7,"baseTimes"),Z7=K7});function J7(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&t8.test(t))&&-1{t8=/^(?:0|[1-9]\d*)$/,me(J7,"isIndex"),e8=J7});function i8(t,e){var r,i=KT(t),n=!i&&VT(t),a=!i&&!n&&p7(t),s=!i&&!n&&!a&&O7(t),o=i||n||a||s,l=o?Z7(t.length,String):[],c=l.length;for(r in t)!e&&!a8.call(t,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||e8(r,c))||l.push(r);return l}var n8,a8,s8,o8=t(()=>{Q7(),QT(),JT(),f7(),r8(),F7(),n8=Object.prototype,a8=n8.hasOwnProperty,me(i8,"arrayLikeKeys"),s8=i8});function l8(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}var c8,h8=t(()=>{me(l8,"nativeKeysIn"),c8=l8});function u8(t){if(!k6(t))return c8(t);var e,r=OT(t),i=[];for(e in t)("constructor"!=e||!r&&p8.call(t,e))&&i.push(e);return i}var d8,p8,g8,f8=t(()=>{T6(),PT(),h8(),d8=Object.prototype,p8=d8.hasOwnProperty,me(u8,"baseKeysIn"),g8=u8});function m8(t){return n7(t)?s8(t,!0):g8(t)}var y8,v8=t(()=>{o8(),f8(),a7(),me(m8,"keysIn"),y8=m8});function x8(t){return V7(t,y8(t))}var b8,w8=t(()=>{X7(),v8(),me(x8,"toPlainObject"),b8=x8});function k8(t,e,r,i,n,a,s){var o,l,c,h=z7(t,r),u=z7(e,r),d=s.get(u);d||((e=void 0===(d=a?a(h,u,r+"",t,e,s):void 0))&&(l=!(o=KT(u))&&p7(u),c=!o&&!l&&O7(u),d=u,o||l||c?d=KT(h)?h:o7(h)?kT(h):l?hT(u,!(e=!1)):c?xT(u,!(e=!1)):[]:k7(u)||VT(u)?VT(d=h)?d=b8(h):k6(h)&&!C6(h)||(d=FT(u)):e=!1),e&&(s.set(u,d),n(d,u,i,a,s),s.delete(u))),Qk(t,r,d)}var T8,E8=t(()=>{Jk(),pT(),bT(),CT(),$T(),QT(),JT(),l7(),f7(),A6(),T6(),T7(),F7(),G7(),w8(),me(k8,"baseMergeDeep"),T8=k8});function C8(i,n,a,s,o){i!==n&&iT(n,function(t,e){var r;o=o||new qk,k6(t)?T8(i,n,e,a,C8,s,o):(r=s?s(z7(i,e),t,e+"",i,n,o):void 0,Qk(i,e,void 0===r?t:r))},y8)}var _8,S8=t(()=>{Yk(),Jk(),aT(),E8(),T6(),v8(),G7(),me(C8,"baseMerge"),_8=C8});function A8(t){return t}var L8,N8=t(()=>{me(A8,"identity"),L8=A8});function I8(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var R8,M8=t(()=>{me(I8,"apply"),R8=I8});function D8(a,s,o){return s=O8(void 0===s?a.length-1:s,0),function(){for(var t=arguments,e=-1,r=O8(t.length-s,0),i=Array(r);++e{M8(),O8=Math.max,me(D8,"overRest"),P8=D8});function F8(t){return function(){return t}}var $8,z8,G8=t(()=>{me(F8,"constant"),$8=F8}),U8=t(()=>{G8(),Hk(),N8(),z8=Wk?function(t,e){return Wk(t,"toString",{configurable:!0,enumerable:!1,value:$8(e),writable:!0})}:L8});function q8(r){var i=0,n=0;return function(){var t=j8(),e=16-(t-n);if(n=t,0{j8=Date.now,me(q8,"shortOut"),W8=q8}),X8=t(()=>{U8(),V8(),Y8=W8(z8),H8=Y8});function K8(t,e){return H8(P8(t,e,L8),t+"")}var Z8,Q8=t(()=>{N8(),B8(),X8(),me(K8,"baseRest"),Z8=K8});function J8(t,e,r){var i;return!!k6(r)&&!!("number"==(i=typeof e)?n7(r)&&e8(e,r.length):"string"==i&&e in r)&&Aw(r[e],t)}var tE,eE=t(()=>{Lw(),a7(),r8(),T6(),me(J8,"isIterateeCall"),tE=J8});function rE(o){return Z8(function(t,e){var r=-1,i=e.length,n=1{Q8(),eE(),me(rE,"createAssigner"),iE=rE}),oE=t(()=>{S8(),sE(),nE=iE(function(t,e,r){_8(t,e,r)}),aE=nE});function lE(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),TE[t]??e):e}function cE(t,e){if(t=t.trim())return"loose"!==e.securityLevel?(0,wE.sanitizeUrl)(t):t}function hE(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function uE(t){let e,r=0;t.forEach(t=>{r+=hE(t,e),e=t});var i=r/2;return IE(t,i)}function dE(t){return 1===t.length?t[0]:uE(t)}function pE(t,e,r){var r=structuredClone(r),i=(M.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse(),25+t),i=IE(r,i),t=10+.5*t,n=Math.atan2(r[0].y-i.y,r[0].x-i.x),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(n+Math.PI)*t+(r[0].x+i.x)/2,a.y=-Math.cos(n+Math.PI)*t+(r[0].y+i.y)/2):"end_right"===e?(a.x=Math.sin(n-Math.PI)*t+(r[0].x+i.x)/2-5,a.y=-Math.cos(n-Math.PI)*t+(r[0].y+i.y)/2-5):"end_left"===e?(a.x=Math.sin(n)*t+(r[0].x+i.x)/2-5,a.y=-Math.cos(n)*t+(r[0].y+i.y)/2-5):(a.x=Math.sin(n)*t+(r[0].x+i.x)/2,a.y=-Math.cos(n)*t+(r[0].y+i.y)/2),a}function gE(t){let e="",r="";for(var i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}function fE(e){let r="",i="0123456789abcdef",n=i.length;for(let t=0;t{wE=tt(J3(),1),Z3(),Jc(),Si(),e(),Gr(),qr(),_k(),oE(),$r(),kE="​",TE={curveBasis:u5,curveBasisClosed:g5,curveBasisOpen:y5,curveBumpX:i5,curveBumpY:n5,curveBundle:b5,curveCardinalClosed:S5,curveCardinalOpen:N5,curveCardinal:E5,curveCatmullRomClosed:B5,curveCatmullRomOpen:z5,curveCatmullRom:D5,curveLinear:j4,curveLinearClosed:q5,curveMonotoneX:Q5,curveMonotoneY:J5,curveNatural:i3,curveStep:s3,curveStepAfter:l3,curveStepBefore:o3},EE=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,CE=me(function(t,e){var r,i=_E(t,/(?:init\b)|(?:initialize\b)/),n={};if(n=Array.isArray(i)?(r=i.map(t=>t.args),yr(r),ie(n,[...r])):i.args)return r=Kt(t,e),void 0!==n[i="config"]&&(n[r="flowchart-v2"===r?"flowchart":r]=n[i],delete n[i]),n},"detectInit"),_E=me(function(t,e=null){try{var r=new RegExp(`[%]{2}(?![{]${EE.source})(?=[}][%]{2}).* -`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),M.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:`+t);for(var i,n,a,s=[];null!==(i=Yt.exec(t));)i.index===Yt.lastIndex&&Yt.lastIndex++,(i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e))&&(n=i[1]||i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null,s.push({type:n,args:a}));return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}catch(r){return M.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),SE=me(function(t){return t.replace(Yt,"")},"removeDirectives"),AE=me(function(t,e){for(var[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray"),me(lE,"interpolateToCurve"),me(cE,"formatUrl"),LE=me((e,...t)=>{let r=e.split("."),i=r.length-1,n=r[i],a=window;for(let t=0;t(e=Math.pow(10,e),Math.round(t*e)/e),"roundNumber"),IE=me((t,e)=>{let r,i=e;for(var n of t){if(r){var a=hE(n,r);if(0===a)return r;if(a{M.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());var r=IE(e,25),t=t?10:5,i=Math.atan2(e[0].y-r.y,e[0].x-r.x),n={x:0,y:0};return n.x=Math.sin(i)*t+(e[0].x+r.x)/2,n.y=-Math.cos(i)*t+(e[0].y+r.y)/2,n},"calcCardinalityPosition"),me(pE,"calcTerminalLabelPosition"),me(gE,"getStylesFromArray"),ME=0,DE=me(()=>(ME++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ME),"generateId"),me(fE,"makeRandomHex"),OE=me(t=>fE(t.length),"random"),PE=me(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"),BE=me(function(t,e){var r=e.text.replace(L.lineBreakRegex," "),[,i]=WE(e.fontSize);return(t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.style("text-anchor",e.anchor),t.style("font-family",e.fontFamily),t.style("font-size",i),t.style("font-weight",e.fontWeight),t.attr("fill",e.fill),void 0!==e.class&&t.attr("class",e.class),(i=t.append("tspan")).attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(r),t},"drawSimpleText"),FE=Ck((t,s,o)=>{if(!t||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},o),L.lineBreakRegex.test(t)))return t;let l=t.split(" ").filter(Boolean),c=[],h="";return l.forEach((t,e)=>{var r,i,n=yE(t+" ",o),a=yE(h,o);h=s""!==t).join(o.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),$E=Ck((t,i,n="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...t],o=[],l="";return s.forEach((t,e)=>{var r,t=""+l+t;l=yE(t,a)>=i?(e+=1,e=s.length===e,r=t+n,o.push(e?t:r),""):t}),{hyphenatedStrings:o,remainingWord:l}},(t,e,r="-",i)=>""+t+e+r+i.fontSize+i.fontWeight+i.fontFamily),me(mE,"calculateTextHeight"),me(yE,"calculateTextWidth"),zE=Ck((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};var[,n]=WE(e),e=["sans-serif",r],a=t.split(L.lineBreakRegex),s=[];if(!(r=j("body")).remove)return{width:0,height:0,lineHeight:0};var o,l=r.append("svg");for(o of e){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=PE();if(u.text=c||kE,0===(u=((u=BE(l,u).style("font-size",n).style("font-weight",i).style("font-family",o))._groups||u)[0][0].getBBox()).width&&0===u.height)throw new Error("svg element not in render tree");h.width=Math.round(Math.max(h.width,u.width)),u=Math.round(u.height),h.height+=u,h.lineHeight=Math.round(Math.max(h.lineHeight,u))}s.push(h)}return l.remove(),s[isNaN(s[1].height)||isNaN(s[1].width)||isNaN(s[1].lineHeight)||s[0].height>s[1].height&&s[0].width>s[1].width&&s[0].lineHeight>s[1].lineHeight?0:1]},(t,e)=>""+t+e.fontSize+e.fontWeight+e.fontFamily),GE=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{me(this,"InitIDGenerator")}},qE=me(function(t){return UE=UE||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),UE.innerHTML=t,unescape(UE.textContent)},"entityDecode"),me(vE,"isDetailedError"),jE=me((t,e,r,i)=>{var n;i&&(n=t.node()?.getBBox())&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),WE=me(t=>{var e;return"number"==typeof t?[t,t+"px"]:(e=parseInt(t??"",10),Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t])},"parseFontSize"),me(xE,"cleanAndMerge"),YE={assignWithDepth:ie,wrapLabel:FE,calculateTextHeight:mE,calculateTextWidth:yE,calculateTextDimensions:zE,cleanAndMerge:xE,detectInit:CE,detectDirective:_E,isSubstringInArray:AE,interpolateToCurve:lE,calcLabelPosition:dE,calcCardinalityPosition:RE,calcTerminalLabelPosition:pE,formatUrl:cE,getStylesFromArray:gE,generateId:DE,random:OE,runFunc:LE,entityDecode:qE,insertTitle:jE,parseFontSize:WE,InitIDGenerator:GE},HE=me(function(t){let e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){return t=t.substring(1,t.length-1),/^\+?\d+$/.test(t)?"fl°°"+t+"¶ß":"fl°"+t+"¶ß"})},"encodeEntities"),VE=me(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),XE=me((t,e,{counter:r=0,prefix:i,suffix:n},a)=>a||(i?i+"_":"")+t+`_${e}_`+r+(n?"_"+n:""),"getEdgeId"),me(bE,"handleUndefinedAttr")});function ZE(t,e,r,i,n){if(!e[t].width)if(r)e[t].text=FE(e[t].text,n,i),e[t].textLines=e[t].text.split(L.lineBreakRegex).length,e[t].width=n,e[t].height=mE(e[t].text,i);else{var a,s,r=e[t].text.split(L.lineBreakRegex);e[t].textLines=r.length,e[t].height=0,e[t].width=0;for(s of r)e[t].width=Math.max(yE(s,i),e[t].width),a=mE(s,i),e[t].height=e[t].height+a}}function QE(e,r,i,t,n){var a,s,o=new nC(n);o.data.widthLimit=i.data.widthLimit/Math.min(rC,t.length);for([a,s]of t.entries()){let t=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=t,t=s.image.Y+s.image.height);var l=s.wrap&&iC.wrap,c=oC(iC),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",ZE("label",s,l,c,o.data.widthLimit),s.label.Y=t+8,t=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",ZE("type",s,l,c=oC(iC),o.data.widthLimit),s.type.Y=t+5,t=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=oC(iC)).fontSize=c.fontSize-2,ZE("descr",s,l,c,o.data.widthLimit),s.descr.Y=t+20,t=s.descr.Y+s.descr.height),c=0==a||a%rC==0?(l=i.data.startx+iC.diagramMarginX,i.data.stopy+iC.diagramMarginY+t):(l=o.data.stopx!==o.data.startx?o.data.stopx+iC.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,n.db.getC4ShapeArray(s.alias));0<(c=n.db.getC4ShapeKeys(s.alias)).length&&hC(o,e,l,c),r=s.alias,0<(l=n.db.getBoundarys(r)).length&&QE(e,0,o,l,n),"global"!==s.alias&&cC(e,s,o),i.data.stopy=Math.max(o.data.stopy+iC.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(o.data.stopx+iC.c4ShapeMargin,i.data.stopx),JE=Math.max(JE,i.data.stopx),tC=Math.max(tC,i.data.stopy)}}var JE,tC,eC,rC,iC,nC,aC,sC,oC,lC,cC,hC,uC,dC,pC,gC,fC,mC,yC,vC,xC=t(()=>{Z3(),e6(),e(),Ur(),Jc(),mu(),fu(),qr(),KE(),th(),tC=JE=0,eC=4,rC=2,te.yy=pu,iC={},nC=class{static{me(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,aC(t.db.getConfig())}setData(t,e,r,i){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=i}updateVal(t,e,r,i){void 0===t[e]?t[e]=r:t[e]=i(r,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,r=e+t.width,i=this.nextData.starty+2*t.margin,n=i+t.height;(e>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>eC)&&(e=this.nextData.startx+t.margin+iC.nextLinePaddingX,i=this.nextData.stopy+2*t.margin,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=i+t.height,this.nextData.cnt=1),t.x=e,t.y=i,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},aC(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},aC=me(function(t){ie(iC,t),t.fontFamily&&(iC.personFontFamily=iC.systemFontFamily=iC.messageFontFamily=t.fontFamily),t.fontSize&&(iC.personFontSize=iC.systemFontSize=iC.messageFontSize=t.fontSize),t.fontWeight&&(iC.personFontWeight=iC.systemFontWeight=iC.messageFontWeight=t.fontWeight)},"setConf"),sC=me((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),oC=me(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),lC=me(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),me(ZE,"calcC4ShapeTextWH"),cC=me(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=iC.c4ShapeMargin-35;var r=e.wrap&&iC.wrap,i=oC(iC),n=(i.fontSize=i.fontSize+2,i.fontWeight="bold",yE(e.label.text,i));ZE("label",e,r,i,n),z3.drawBoundary(t,e,iC)},"drawBoundary"),hC=me(function(r,i,n,t){let a=0;for(var s of t){a=0;var o=n[s];switch((s=sC(iC,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=yE("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=iC.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&&iC.wrap,l=iC.width-2*iC.c4ShapePadding,c=sC(iC,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",ZE("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+"]",ZE("type",o,s,sC(iC,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+"]",ZE("techn",o,s,sC(iC,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let t=a,e=o.label.width;o.descr&&""!==o.descr.text&&(ZE("descr",o,s,sC(iC,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,e=Math.max(o.label.width,o.descr.width),t=a-5*o.descr.textLines),e+=iC.c4ShapePadding,o.width=Math.max(o.width||iC.width,e,iC.width),o.height=Math.max(o.height||iC.height,t,iC.height),o.margin=o.margin||iC.c4ShapeMargin,r.insert(o),z3.drawC4Shape(i,o,iC)}r.bumpLastMargin(iC.c4ShapeMargin)},"drawC4ShapeArray"),uC=class{static{me(this,"Point")}constructor(t,e){this.x=t,this.y=e}},dC=me(function(t,e){let r=t.x,i=t.y,n=e.x,a=e.y,s=r+t.width/2,o=i+t.height/2,l=Math.abs(r-n),c=Math.abs(i-a),h=c/l,u=t.height/t.width,d=null;return i==a&&r{yC=me(t=>`.person { +`},"getStyles"),Qc=me((t,e)=>{void 0!==e&&(Kc[t]=e)},"addStylesForDiagram"),Jc=Zc}),nh={};oPt(nh,{clear:()=>lh,getAccDescription:()=>dh,getAccTitle:()=>hh,getDiagramTitle:()=>gh,setAccDescription:()=>uh,setAccTitle:()=>ch,setDiagramTitle:()=>ph});var ih,ah,sh,oh,lh,ch,hh,uh,dh,ph,gh,fh,mh,D,yh,vh,xh,bh,wh,kh,Th,Eh,Ch,_h,Sh,Ah,Lh,Nh,Ih,Rh,Mh,Dh,Oh,Ph,Bh,Fh,$h,zh,Gh,Uh,qh,jh,Wh,Yh,Hh,Vh,Xh,Kh,Zh,Qh,Jh,tu,eu,ru,nu,iu,au,su,ou,lu,cu,hu,uu,du,pu,gu,fu=t(()=>{th(),Nn(),sh=ah=ih="",oh=me(t=>Sc(t,Ir()),"sanitizeText"),lh=me(()=>{ah=sh=ih=""},"clear"),ch=me(t=>{ih=oh(t).replace(/^\s+/g,"")},"setAccTitle"),hh=me(()=>ih,"getAccTitle"),uh=me(t=>{sh=oh(t).replace(/\n\s+/g,` +`)},"setAccDescription"),dh=me(()=>sh,"getAccDescription"),ph=me(t=>{ah=oh(t)},"setDiagramTitle"),gh=me(()=>ah,"getDiagramTitle")}),mu=t(()=>{Ur(),e(),Nn(),th(),eh(),rh(),fu(),fh=M,mh=T,D=Ir,yh=Nr,vh=br,xh=me(t=>Sc(t,D()),"sanitizeText"),bh=Xc,wh=me(()=>nh,"getCommonDb"),kh={},Th=me((t,e,r)=>{kh[t]&&fh.warn(`Diagram with id ${t} already registered. Overwriting.`),kh[t]=e,r&&Jt(t,r),Qc(t,e.styles),e.injectUtils?.(fh,mh,D,xh,bh,wh(),()=>{})},"registerDiagram"),Eh=me(t=>{if(t in kh)return kh[t];throw new Ch(t)},"getDiagram"),Ch=class extends Error{static{me(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}}),yu=t(()=>{mu(),th(),fu(),_h=[],Sh=[""],Nh=[{alias:Ah="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Lh=""}],Rh="",Mh=!(Ih=[]),Dh=4,Oh=2,Bh=me(function(){return Ph},"getC4Type"),Fh=me(function(t){Ph=Sc(t,D())},"setC4Type"),$h=me(function(r,n,i,a,s,o,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let t={},e=Ih.find(t=>t.from===n&&t.to===i);e?t=e:Ih.push(t),t.type=r,t.from=n,t.to=i,t.label={text:a},null==s?t.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],t[r]={text:a}):t.techn={text:s},null==o?t.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],t[r]={text:a}):t.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],t[s]=r):t.sprite=l,"object"==typeof c?([a,o]=Object.entries(c)[0],t[a]=o):t.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],t[s]=r):t.link=h,t.wrap=lu()}},"addRel"),zh=me(function(r,n,i,a,s,o,l){if(null!==n&&null!==i){let t={},e=_h.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,_h.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.descr={text:""}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.descr={text:a},"object"==typeof s?([i,c]=Object.entries(s)[0],t[i]=c):t.sprite=s,"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.typeC4Shape={text:r},t.parentBoundary=Ah,t.wrap=lu()}},"addPersonOrSystem"),Gh=me(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let t={},e=_h.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,_h.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],t[i]={text:h}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=lu(),t.typeC4Shape={text:r},t.parentBoundary=Ah}},"addContainer"),Uh=me(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let t={},e=_h.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,_h.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],t[i]={text:h}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=lu(),t.typeC4Shape={text:r},t.parentBoundary=Ah}},"addComponent"),qh=me(function(r,n,i,a,s){if(null!==r&&null!==n){let t={},e=Nh.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Nh.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"system"}:"object"==typeof i?([n,o]=Object.entries(i)[0],t[n]={text:o}):t.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],t[n]=o):t.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],t[i]=n):t.link=s,t.parentBoundary=Ah,t.wrap=lu(),Lh=Ah,Ah=r,Sh.push(Lh)}},"addPersonOrSystemBoundary"),jh=me(function(r,n,i,a,s){if(null!==r&&null!==n){let t={},e=Nh.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Nh.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"container"}:"object"==typeof i?([n,o]=Object.entries(i)[0],t[n]={text:o}):t.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],t[n]=o):t.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],t[i]=n):t.link=s,t.parentBoundary=Ah,t.wrap=lu(),Lh=Ah,Ah=r,Sh.push(Lh)}},"addContainerBoundary"),Wh=me(function(r,n,i,a,s,t,o,l){if(null!==n&&null!==i){let t={},e=Nh.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Nh.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.type={text:"node"}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.type={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,c]=Object.entries(s)[0],t[i]={text:c}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.nodeType=r,t.parentBoundary=Ah,t.wrap=lu(),Lh=Ah,Ah=n,Sh.push(Lh)}},"addDeploymentNode"),Yh=me(function(){Ah=Lh,Sh.pop(),Lh=Sh.pop(),Sh.push(Lh)},"popBoundaryParseStack"),Hh=me(function(t,e,r,n,i,a,s,o,l,c,h){let u=_h.find(t=>t.alias===e);var d,p;void 0===u&&void 0===(u=Nh.find(t=>t.alias===e))||(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"),Vh=me(function(t,e,r,n,i,a,s){var o,l,c=Ih.find(t=>t.from===e&&t.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"),Xh=me(function(t,e,r){var e="object"==typeof e?(n=Object.values(e)[0],parseInt(n)):parseInt(e),n="object"==typeof r?(n=Object.values(r)[0],parseInt(n)):parseInt(r);1<=e&&(Dh=e),1<=n&&(Oh=n)},"updateLayoutConfig"),Kh=me(function(){return Dh},"getC4ShapeInRow"),Zh=me(function(){return Oh},"getC4BoundaryInRow"),Qh=me(function(){return Ah},"getCurrentBoundaryParse"),Jh=me(function(){return Lh},"getParentBoundaryParse"),tu=me(function(e){return null==e?_h:_h.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),eu=me(function(e){return _h.find(t=>t.alias===e)},"getC4Shape"),ru=me(function(t){return Object.keys(tu(t))},"getC4ShapeKeys"),nu=me(function(e){return null==e?Nh:Nh.filter(t=>t.parentBoundary===e)},"getBoundaries"),iu=nu,au=me(function(){return Ih},"getRels"),su=me(function(){return Rh},"getTitle"),ou=me(function(t){Mh=t},"setWrap"),lu=me(function(){return Mh},"autoWrap"),cu=me(function(){_h=[],Nh=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Ah="global",Sh=[Lh=""],Sh=[Rh=""],Mh=!(Ih=[]),Dh=4,Oh=2},"clear"),hu={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},uu={FILLED:0,OPEN:1},du={LEFTOF:0,RIGHTOF:1,OVER:2},pu=me(function(t){Rh=Sc(t,D())},"setTitle"),gu={addPersonOrSystem:zh,addPersonOrSystemBoundary:qh,addContainer:Gh,addContainerBoundary:jh,addComponent:Uh,addDeploymentNode:Wh,popBoundaryParseStack:Yh,addRel:$h,updateElStyle:Hh,updateRelStyle:Vh,updateLayoutConfig:Xh,autoWrap:lu,setWrap:ou,getC4ShapeArray:tu,getC4Shape:eu,getC4ShapeKeys:ru,getBoundaries:nu,getBoundarys:iu,getCurrentBoundaryParse:Qh,getParentBoundaryParse:Jh,getRels:au,getTitle:su,getC4Type:Bh,getC4ShapeInRow:Kh,getC4BoundaryInRow:Zh,setAccTitle:ch,getAccTitle:hh,getAccDescription:dh,setAccDescription:uh,getConfig:me(()=>D().c4,"getConfig"),clear:cu,LINETYPE:hu,ARROWTYPE:uu,PLACEMENT:du,setTitle:pu,setC4Type:Fh}});function vu(t,e){return null==t||null==e?NaN:t{me(vu,"ascending")});function bu(t,e){return null==t||null==e?NaN:e{me(bu,"descending")});function ku(r){let a,s,i;function o(t,e,r=0,n=t.length){if(r>>1}while(s(t[i],e)<0?r=1+i:n=i,r>>1}while(s(t[i],e)<=0?r=1+i:n=i,r-i(t[n],e)?n-1:n}return i=2!==r.length?(a=vu,s=me((t,e)=>vu(r(t),e),"compare2"),me((t,e)=>r(t)-e,"delta")):(a=r===vu||r===bu?r:Tu,s=r),me(o,"left"),me(t,"right"),me(e,"center"),{left:o,center:e,right:t}}function Tu(){return 0}var Eu=t(()=>{xu(),wu(),me(ku,"bisector"),me(Tu,"zero")});function Cu(t){return null===t?NaN:+t}var _u,Su,Au=t(()=>{me(Cu,"number")}),Lu=t(()=>{xu(),Eu(),Au(),_u=ku(vu).right,ku(Cu).center,Su=_u});function Nu({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):r}function Iu({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):(t.set(e,r),r)}function Ru({_intern:t,_key:e},r){return e=e(r),t.has(e)&&(r=t.get(e),t.delete(e)),r}function Mu(t){return null!==t&&"object"==typeof t?t.valueOf():t}var Du,Ou=t(()=>{Du=class extends Map{static{me(this,"InternMap")}constructor(t,e=Mu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(var[r,n]of t)this.set(r,n)}get(t){return super.get(Nu(this,t))}has(t){return super.has(Nu(this,t))}set(t,e){return super.set(Iu(this,t),e)}delete(t){return super.delete(Ru(this,t))}},me(Nu,"intern_get"),me(Iu,"intern_set"),me(Ru,"intern_delete"),me(Mu,"keyof")});function Pu(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=zu<=a?10:Gu<=a?5:Uu<=a?2:1,o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(t*c),l=Math.round(e*c),o/ce&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(t/c),l=Math.round(e/c),o*ce&&--l),l{zu=Math.sqrt(50),Gu=Math.sqrt(10),Uu=Math.sqrt(2),me(Pu,"tickSpec"),me(Bu,"ticks"),me(Fu,"tickIncrement"),me($u,"tickStep")});function ju(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n{me(ju,"max")});function Yu(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var Hu=t(()=>{me(Yu,"min")});function Vu(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n{me(Vu,"range")}),Ku=t(()=>{Lu(),Eu(),Wu(),Hu(),Xu(),qu(),Ou()});function Zu(t){return t}var Qu=t(()=>{me(Zu,"default")});function Ju(t){return"translate("+t+",0)"}function td(t){return"translate(0,"+t+")"}function ed(e){return t=>+e(t)}function rd(e,r){return r=Math.max(0,e.bandwidth()-2*r)/2,e.round()&&(r=Math.round(r)),t=>+e(t)+r}function nd(){return!this.__axis}function id(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1{Qu(),od=1,ld=3,me(Ju,"translateX"),me(td,"translateY"),me(ed,"number"),me(rd,"center"),me(nd,"entering"),me(id,"axis"),me(ad,"axisTop"),me(sd,"axisBottom")}),hd=t(()=>{cd()});function ud(){for(var t,e=0,r=arguments.length,n={};e{md={value:me(()=>{},"value")},me(ud,"dispatch"),me(dd,"Dispatch"),me(pd,"parseTypenames"),dd.prototype=ud.prototype={constructor:dd,on:me(function(t,e){var r,n=this._,i=pd(t+"",n),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a{bd()}),kd=t(()=>{xd={svg:"http://www.w3.org/2000/svg",xhtml:vd="http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Td(t){var e=t+="",r=e.indexOf(":");return 0<=r&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),xd.hasOwnProperty(e)?{space:xd[e],local:t}:t}var Ed=t(()=>{kd(),me(Td,"default")});function Cd(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===vd&&t.documentElement.namespaceURI===vd?t.createElement(r):t.createElementNS(e,r)}}function _d(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Sd(t){return((t=Td(t)).local?_d:Cd)(t)}var Ad=t(()=>{Ed(),kd(),me(Cd,"creatorInherit"),me(_d,"creatorFixed"),me(Sd,"default")});function Ld(){}function Nd(t){return null==t?Ld:function(){return this.querySelector(t)}}var Id=t(()=>{me(Ld,"none"),me(Nd,"default")});function Rd(t){"function"!=typeof t&&(t=Nd(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{hg(),Id(),me(Rd,"default")});function Dd(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}var Od=t(()=>{me(Dd,"array")});function Pd(){return[]}function Bd(t){return null==t?Pd:function(){return this.querySelectorAll(t)}}var Fd=t(()=>{me(Pd,"empty"),me(Bd,"default")});function $d(t){return function(){return Dd(t.apply(this,arguments))}}function zd(t){t=("function"==typeof t?$d:Bd)(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a{hg(),Od(),Fd(),me($d,"arrayAll"),me(zd,"default")});function Ud(t){return function(){return this.matches(t)}}function qd(e){return function(t){return t.matches(e)}}var jd=t(()=>{me(Ud,"default"),me(qd,"childMatcher")});function Wd(t){return function(){return Vd.call(this.children,t)}}function Yd(){return this.firstElementChild}function Hd(t){return this.select(null==t?Yd:Wd("function"==typeof t?t:qd(t)))}var Vd,Xd=t(()=>{jd(),Vd=Array.prototype.find,me(Wd,"childFind"),me(Yd,"childFirst"),me(Hd,"default")});function Kd(){return Array.from(this.children)}function Zd(t){return function(){return Jd.call(this.children,t)}}function Qd(t){return this.selectAll(null==t?Kd:Zd("function"==typeof t?t:qd(t)))}var Jd,t0=t(()=>{jd(),Jd=Array.prototype.filter,me(Kd,"children"),me(Zd,"childrenFilter"),me(Qd,"default")});function e0(t){"function"!=typeof t&&(t=Ud(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{hg(),jd(),me(e0,"default")});function n0(t){return new Array(t.length)}var i0=t(()=>{me(n0,"default")});function a0(){return new ag(this._enter||this._groups.map(n0),this._parents)}function s0(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var o0=t(()=>{i0(),hg(),me(a0,"default"),me(s0,"EnterNode"),s0.prototype={constructor:s0,appendChild:me(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:me(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:me(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:me(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")}});function l0(t){return function(){return t}}var c0=t(()=>{me(l0,"default")});function h0(t,e,r,n,i,a){for(var s,o=0,l=e.length,c=a.length;o{hg(),o0(),c0(),me(h0,"bindIndex"),me(u0,"bindKey"),me(d0,"datum"),me(p0,"default"),me(g0,"arraylike")});function m0(){return new ag(this._exit||this._groups.map(n0),this._parents)}var y0=t(()=>{i0(),hg(),me(m0,"default")});function v0(t,e,r){var n=this.enter(),i=this,a=this.exit(),n="function"==typeof t?(n=t(n))&&n.selection():n.append(t+"");return null!=e&&(i=(i=e(i))&&i.selection()),null==r?a.remove():r(a),n&&i?n.merge(i).order():i}var x0=t(()=>{me(v0,"default")});function b0(t){for(var t=t.selection?t.selection():t,e=this._groups,r=t._groups,n=e.length,t=r.length,i=Math.min(n,t),a=new Array(n),s=0;s{hg(),me(b0,"default")});function k0(){for(var t=this._groups,e=-1,r=t.length;++e{me(k0,"default")});function E0(r){function t(t,e){return t&&e?r(t.__data__,e.__data__):!t-!e}r=r||C0,me(t,"compareNode");for(var e=this._groups,n=e.length,i=new Array(n),a=0;a{hg(),me(E0,"default"),me(C0,"ascending")});function S0(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var A0=t(()=>{me(S0,"default")});function L0(){return Array.from(this)}var N0=t(()=>{me(L0,"default")});function I0(){for(var t=this._groups,e=0,r=t.length;e{me(I0,"default")});function M0(){let t=0;for(var e of this)++t;return t}var D0=t(()=>{me(M0,"default")});function O0(){return!this.node()}var P0=t(()=>{me(O0,"default")});function B0(t){for(var e=this._groups,r=0,n=e.length;r{me(B0,"default")});function $0(t){return function(){this.removeAttribute(t)}}function z0(t){return function(){this.removeAttributeNS(t.space,t.local)}}function G0(t,e){return function(){this.setAttribute(t,e)}}function U0(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function q0(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}}function j0(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function W0(t,e){var r,t=Td(t);return arguments.length<2?(r=this.node(),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)):this.each((null==e?t.local?z0:$0:"function"==typeof e?t.local?j0:q0:t.local?U0:G0)(t,e))}var Y0=t(()=>{Ed(),me($0,"attrRemove"),me(z0,"attrRemoveNS"),me(G0,"attrConstant"),me(U0,"attrConstantNS"),me(q0,"attrFunction"),me(j0,"attrFunctionNS"),me(W0,"default")});function H0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var V0=t(()=>{me(H0,"default")});function X0(t){return function(){this.style.removeProperty(t)}}function K0(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Z0(e,r,n){return function(){var t=r.apply(this,arguments);null==t?this.style.removeProperty(e):this.style.setProperty(e,t,n)}}function Q0(t,e,r){return 1{V0(),me(X0,"styleRemove"),me(K0,"styleConstant"),me(Z0,"styleFunction"),me(Q0,"default"),me(J0,"styleValue")});function ep(t){return function(){delete this[t]}}function rp(t,e){return function(){this[t]=e}}function np(e,r){return function(){var t=r.apply(this,arguments);null==t?delete this[e]:this[e]=t}}function ip(t,e){return 1{me(ep,"propertyRemove"),me(rp,"propertyConstant"),me(np,"propertyFunction"),me(ip,"default")});function sp(t){return t.trim().split(/^|\s+/)}function op(t){return t.classList||new lp(t)}function lp(t){this._node=t,this._names=sp(t.getAttribute("class")||"")}function cp(t,e){for(var r=op(t),n=-1,i=e.length;++n{me(sp,"classArray"),me(op,"classList"),me(lp,"ClassList"),lp.prototype={add:me(function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:me(function(t){0<=(t=this._names.indexOf(t))&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:me(function(t){return 0<=this._names.indexOf(t)},"contains")},me(cp,"classedAdd"),me(hp,"classedRemove"),me(up,"classedTrue"),me(dp,"classedFalse"),me(pp,"classedFunction"),me(gp,"default")});function mp(){this.textContent=""}function yp(t){return function(){this.textContent=t}}function vp(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function xp(t){return arguments.length?this.each(null==t?mp:("function"==typeof t?vp:yp)(t)):this.node().textContent}var bp=t(()=>{me(mp,"textRemove"),me(yp,"textConstant"),me(vp,"textFunction"),me(xp,"default")});function wp(){this.innerHTML=""}function kp(t){return function(){this.innerHTML=t}}function Tp(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ep(t){return arguments.length?this.each(null==t?wp:("function"==typeof t?Tp:kp)(t)):this.node().innerHTML}var Cp=t(()=>{me(wp,"htmlRemove"),me(kp,"htmlConstant"),me(Tp,"htmlFunction"),me(Ep,"default")});function _p(){this.nextSibling&&this.parentNode.appendChild(this)}function Sp(){return this.each(_p)}var Ap=t(()=>{me(_p,"raise"),me(Sp,"default")});function Lp(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Np(){return this.each(Lp)}var Ip=t(()=>{me(Lp,"lower"),me(Np,"default")});function Rp(t){var e="function"==typeof t?t:Sd(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var Mp=t(()=>{Ad(),me(Rp,"default")});function Dp(){return null}function Op(t,e){var r="function"==typeof t?t:Sd(t),n=null==e?Dp:"function"==typeof e?e:Nd(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var Pp=t(()=>{Ad(),Id(),me(Dp,"constantNull"),me(Op,"default")});function Bp(){var t=this.parentNode;t&&t.removeChild(this)}function Fp(){return this.each(Bp)}var $p=t(()=>{me(Bp,"remove"),me(Fp,"default")});function zp(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gp(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Up(t){return this.select(t?Gp:zp)}var qp=t(()=>{me(zp,"selection_cloneShallow"),me(Gp,"selection_cloneDeep"),me(Up,"default")});function jp(t){return arguments.length?this.property("__data__",t):this.node().__data__}var Wp=t(()=>{me(jp,"default")});function Yp(e){return function(t){e.call(this,t,this.__data__)}}function Hp(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return 0<=r&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}function Vp(a){return function(){var t=this.__on;if(t){for(var e,r=0,n=-1,i=t.length;r{me(Yp,"contextListener"),me(Hp,"parseTypenames"),me(Vp,"onRemove"),me(Xp,"onAdd"),me(Kp,"default")});function Qp(t,e,r){var n=H0(t),i=n.CustomEvent;"function"==typeof i?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Jp(t,e){return function(){return Qp(this,t,e)}}function tg(t,e){return function(){return Qp(this,t,e.apply(this,arguments))}}function eg(t,e){return this.each(("function"==typeof e?tg:Jp)(t,e))}var rg=t(()=>{V0(),me(Qp,"dispatchEvent"),me(Jp,"dispatchConstant"),me(tg,"dispatchFunction"),me(eg,"default")});function*ng(){for(var t=this._groups,e=0,r=t.length;e{me(ng,"default")});function ag(t,e){this._groups=t,this._parents=e}function sg(){return new ag([[document.documentElement]],lg)}function og(){return this}var lg,cg,hg=t(()=>{Md(),Gd(),Xd(),t0(),r0(),f0(),o0(),y0(),x0(),w0(),T0(),_0(),A0(),N0(),R0(),D0(),P0(),F0(),Y0(),tp(),ap(),fp(),bp(),Cp(),Ap(),Ip(),Mp(),Pp(),$p(),qp(),Wp(),Zp(),rg(),ig(),lg=[null],me(ag,"Selection"),me(sg,"selection"),me(og,"selection_selection"),ag.prototype=sg.prototype={constructor:ag,select:Rd,selectAll:zd,selectChild:Hd,selectChildren:Qd,filter:e0,data:p0,enter:a0,exit:m0,join:v0,merge:b0,selection:og,order:k0,sort:E0,call:S0,nodes:L0,node:I0,size:M0,empty:O0,each:B0,attr:W0,style:Q0,property:ip,classed:gp,text:xp,html:Ep,raise:Sp,lower:Np,append:Rp,insert:Op,remove:Fp,clone:Up,datum:jp,on:Kp,dispatch:eg,[Symbol.iterator]:ng},cg=sg});function H(t){return"string"==typeof t?new ag([[document.querySelector(t)]],[document.documentElement]):new ag([[t]],lg)}var ug=t(()=>{hg(),me(H,"default")}),dg=t(()=>{jd(),Ed(),ug(),hg(),Id(),Fd(),tp()}),pg=t(()=>{});function gg(t,e,r){(t.prototype=e.prototype=r).constructor=t}function fg(t,e){var r,n=Object.create(t.prototype);for(r in e)n[r]=e[r];return n}var mg=t(()=>{me(gg,"default"),me(fg,"extend")});function yg(){}function vg(){return this.rgb().formatHex()}function xg(){return this.rgb().formatHex8()}function bg(){return Og(this).formatHsl()}function wg(){return this.rgb().formatRgb()}function kg(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=jg.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Tg(e):3===r?new Sg(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Eg(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Eg(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Wg.exec(t))?new Sg(e[1],e[2],e[3],1):(e=Yg.exec(t))?new Sg(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Hg.exec(t))?Eg(e[1],e[2],e[3],e[4]):(e=Vg.exec(t))?Eg(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xg.exec(t))?Dg(e[1],e[2]/100,e[3]/100,1):(e=Kg.exec(t))?Dg(e[1],e[2]/100,e[3]/100,e[4]):Zg.hasOwnProperty(t)?Tg(Zg[t]):"transparent"===t?new Sg(NaN,NaN,NaN,0):null}function Tg(t){return new Sg(t>>16&255,t>>8&255,255&t,1)}function Eg(t,e,r,n){return new Sg(t=n<=0?e=r=NaN:t,e,r,n)}function Cg(t){return(t=t instanceof yg?t:kg(t))?new Sg((t=t.rgb()).r,t.g,t.b,t.opacity):new Sg}function _g(t,e,r,n){return 1===arguments.length?Cg(t):new Sg(t,e,r,n??1)}function Sg(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Ag(){return"#"+Mg(this.r)+Mg(this.g)+Mg(this.b)}function Lg(){return"#"+Mg(this.r)+Mg(this.g)+Mg(this.b)+Mg(255*(isNaN(this.opacity)?1:this.opacity))}function Ng(){var t=Ig(this.opacity);return(1===t?"rgb(":"rgba(")+Rg(this.r)+`, ${Rg(this.g)}, `+Rg(this.b)+(1===t?")":`, ${t})`)}function Ig(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Rg(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mg(t){return((t=Rg(t))<16?"0":"")+t.toString(16)}function Dg(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new Bg(t,e,r,n)}function Og(t){var e,r,n,i,a,s,o,l;return t instanceof Bg?new Bg(t.h,t.s,t.l,t.opacity):(t=t instanceof yg?t:kg(t))?t instanceof Bg?t:(e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),s=NaN,l=((a=Math.max(e,r,n))+i)/2,(o=a-i)?(s=e===a?(r-n)/o+6*(r{mg(),me(yg,"Color"),Gg="\\s*([+-]?\\d+)\\s*",Ug="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jg=/^#([0-9a-f]{3,8})$/,Wg=new RegExp(`^rgb\\(${Gg},${Gg},${Gg}\\)$`),Yg=new RegExp(`^rgb\\(${qg},${qg},${qg}\\)$`),Hg=new RegExp(`^rgba\\(${Gg},${Gg},${Gg},${Ug}\\)$`),Vg=new RegExp(`^rgba\\(${qg},${qg},${qg},${Ug}\\)$`),Xg=new RegExp(`^hsl\\(${Ug},${qg},${qg}\\)$`),Kg=new RegExp(`^hsla\\(${Ug},${qg},${qg},${Ug}\\)$`),Zg={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},gg(yg,kg,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:vg,formatHex:vg,formatHex8:xg,formatHsl:bg,formatRgb:wg,toString:wg}),me(vg,"color_formatHex"),me(xg,"color_formatHex8"),me(bg,"color_formatHsl"),me(wg,"color_formatRgb"),me(kg,"color"),me(Tg,"rgbn"),me(Eg,"rgba"),me(Cg,"rgbConvert"),me(_g,"rgb"),me(Sg,"Rgb"),gg(Sg,_g,fg(yg,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Sg(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Sg(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Sg(Rg(this.r),Rg(this.g),Rg(this.b),Ig(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:Ag,formatHex:Ag,formatHex8:Lg,formatRgb:Ng,toString:Ng})),me(Ag,"rgb_formatHex"),me(Lg,"rgb_formatHex8"),me(Ng,"rgb_formatRgb"),me(Ig,"clampa"),me(Rg,"clampi"),me(Mg,"hex"),me(Dg,"hsla"),me(Og,"hslConvert"),me(Pg,"hsl"),me(Bg,"Hsl"),gg(Bg,Pg,fg(yg,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Bg(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Bg(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l;return new Sg(zg(240<=t?t-240:120+t,r=2*r-(e=r+(r<.5?r:1-r)*e),e),zg(t,r,e),zg(t<120?240+t:t-120,r,e),this.opacity)},clamp(){return new Bg(Fg(this.h),$g(this.s),$g(this.l),Ig(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 t=Ig(this.opacity);return(1===t?"hsl(":"hsla(")+Fg(this.h)+`, ${100*$g(this.s)}%, ${100*$g(this.l)}%`+(1===t?")":`, ${t})`)}})),me(Fg,"clamph"),me($g,"clampt"),me(zg,"hsl2rgb")}),e1=t(()=>{Qg=Math.PI/180,Jg=180/Math.PI});function r1(t){var e,r,n,i,a,s;return t instanceof i1?new i1(t.l,t.a,t.b,t.opacity):t instanceof u1?d1(t):(i=a1(.2225045*(e=l1((t=t instanceof Sg?t:Cg(t)).r))+.7168786*(r=l1(t.g))+.0606169*(n=l1(t.b))),e===r&&r===n?a=s=i:(a=a1((.4360747*e+.3850649*r+.1430804*n)/.96422),s=a1((.0139322*e+.0971045*r+.7141733*n)/.82521)),new i1(116*i-16,500*(a-i),200*(i-s),t.opacity))}function n1(t,e,r,n){return 1===arguments.length?r1(t):new i1(t,e,r,n??1)}function i1(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function a1(t){return m1{mg(),t1(),e1(),p1=4/29,f1=3*(g1=6/29)*g1,m1=g1*g1*g1,me(r1,"labConvert"),me(n1,"lab"),me(i1,"Lab"),gg(i1,n1,fg(yg,{brighter(t){return new i1(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new i1(this.l-18*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new Sg(o1(3.1338561*(e=.96422*s1(e))-1.6168667*(t=+s1(t))-.4906146*(r=.82521*s1(r))),o1(-.9787684*e+1.9161415*t+.033454*r),o1(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),me(a1,"xyz2lab"),me(s1,"lab2xyz"),me(o1,"lrgb2rgb"),me(l1,"rgb2lrgb"),me(c1,"hclConvert"),me(h1,"hcl"),me(u1,"Hcl"),me(d1,"hcl2lab"),gg(u1,h1,fg(yg,{brighter(t){return new u1(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new u1(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return d1(this).rgb()}}))}),v1=t(()=>{t1(),y1()});function x1(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}function b1(s){var o=s.length-1;return function(t){var e=t<=0?t=0:1<=t?o-(t=1):Math.floor(t*o),r=s[e],n=s[e+1],i=0{me(x1,"basis"),me(b1,"default")});function k1(n){var i=n.length;return function(t){var e=Math.floor(((t%=1)<0?++t:t)*i),r=n[(e+i-1)%i];return x1((t-e/i)*i,r,n[e%i],n[(e+1)%i],n[(e+2)%i])}}var T1,E1=t(()=>{w1(),me(k1,"default")}),C1=t(()=>{T1=me(t=>()=>t,"default")});function _1(e,r){return function(t){return e+t*r}}function S1(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(t){return Math.pow(e+t*r,n)}}function A1(t,e){var r=e-t;return r?_1(t,180{C1(),me(_1,"linear"),me(S1,"exponential"),me(A1,"hue"),me(L1,"gamma"),me(N1,"nogamma")});function R1(o){return function(t){for(var e,r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),s=0;s{v1(),w1(),E1(),I1(),M1=me(function t(e){var s=L1(e);function r(e,t){var r=s((e=_g(e)).r,(t=_g(t)).r),n=s(e.g,t.g),i=s(e.b,t.b),a=N1(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=n(t),e.b=i(t),e.opacity=a(t),e+""}}return me(r,"rgb"),r.gamma=t,r},"rgbGamma")(1),me(R1,"rgbSpline"),R1(b1),R1(k1)});function O1(e,r){r=r||[];var n,i=e?Math.min(r.length,e.length):0,a=r.slice();return function(t){for(n=0;n{me(O1,"default"),me(P1,"isNumberArray")});function F1(t,e){for(var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s=0;s{J1(),me(F1,"genericArray")});function z1(e,r){var n=new Date;return e=+e,r=+r,function(t){return n.setTime(e*(1-t)+r*t),n}}var G1=t(()=>{me(z1,"default")});function U1(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var q1=t(()=>{me(U1,"default")});function j1(t,e){var r,n={},i={};for(r in null!==t&&"object"==typeof t||(t={}),e=null!==e&&"object"==typeof e?e:{})r in t?n[r]=Q1(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}}var W1=t(()=>{J1(),me(j1,"default")});function Y1(t){return function(){return t}}function H1(e){return function(t){return e(t)+""}}function V1(t,n){var e,r,i,a=X1.lastIndex=K1.lastIndex=0,s=-1,o=[],l=[];for(t+="",n+="";(e=X1.exec(t))&&(r=K1.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(e=e[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:U1(e,r)})),a=K1.lastIndex;return a{q1(),X1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,K1=new RegExp(X1.source,"g"),me(Y1,"zero"),me(H1,"one"),me(V1,"default")});function Q1(t,e){var r=typeof e;return null==e||"boolean"==r?T1(e):("number"==r?U1:"string"==r?(r=kg(e))?(e=r,M1):V1:e instanceof kg?M1:e instanceof Date?z1:P1(e)?O1:Array.isArray(e)?F1:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?j1:U1)(t,e)}var J1=t(()=>{v1(),D1(),$1(),G1(),q1(),W1(),Z1(),C1(),B1(),me(Q1,"default")});function tf(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var ef=t(()=>{me(tf,"default")});function rf(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n{nf=180/Math.PI,af={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},me(rf,"default")});function of(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?af:rf(t.a,t.b,t.c,t.d,t.e,t.f)}function lf(t){return null!=t&&((cf=cf||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=cf.transform.baseVal.consolidate())?rf((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):af}var cf,hf=t(()=>{sf(),me(of,"parseCss"),me(lf,"parseSvg")});function uf(r,o,l,i){function c(t){return t.length?t.pop()+" ":""}function n(t,e,r,n,i,a){var s;t!==r||e!==n?(s=i.push("translate(",null,o,null,l),a.push({i:s-4,x:U1(t,r)},{i:s-2,x:U1(e,n)})):(r||n)&&i.push("translate("+r+o+n+l)}function s(t,e,r,n){t!==e?(180{q1(),hf(),me(uf,"interpolateTransform"),df=uf(of,"px, ","px)","deg)"),pf=uf(lf,", ",")",")")});function ff(s){return function(e,t){var r=s((e=h1(e)).h,(t=h1(t)).h),n=N1(e.c,t.c),i=N1(e.l,t.l),a=N1(e.opacity,t.opacity);return function(t){return e.h=r(t),e.c=n(t),e.l=i(t),e.opacity=a(t),e+""}}}var mf,yf=t(()=>{v1(),I1(),me(ff,"hcl"),mf=ff(A1),ff(N1)}),vf=t(()=>{J1(),q1(),ef(),Z1(),gf(),D1(),yf()});function xf(){return Of||(Ff(bf),Of=Bf.now()+Pf)}function bf(){Of=0}function wf(){this._call=this._time=this._next=null}function kf(t,e,r){var n=new wf;return n.restart(t,e,r),n}function Tf(){xf(),++Af;for(var t,e=Rf;e;)0<=(t=Of-e._time)&&e._call.call(void 0,t),e=e._next;--Af}function Ef(){Of=(Df=Bf.now())+Pf,Af=Lf=0;try{Tf()}finally{Af=0,_f(),Of=0}}function Cf(){var t=Bf.now(),e=t-Df;Ifr._time&&(n=r._time),(t=r)._next):(e=r._next,r._next=null,t?t._next=e:Rf=e);Mf=t,Sf(n)}function Sf(t){Af||(Lf=Lf&&clearTimeout(Lf),24{If=1e3,Pf=Of=Df=Nf=Lf=Af=0,Bf="object"==typeof performance&&performance.now?performance:Date,Ff="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)},me(xf,"now"),me(bf,"clearNow"),me(wf,"Timer"),wf.prototype=kf.prototype={constructor:wf,restart:me(function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?xf():+r)+(null==e?0:+e),this._next||Mf===this||(Mf?Mf._next=this:Rf=this,Mf=this),this._call=t,this._time=r,Sf()},"restart"),stop:me(function(){this._call&&(this._call=null,this._time=1/0,Sf())},"stop")},me(kf,"timer"),me(Tf,"timerFlush"),me(Ef,"wake"),me(Cf,"poke"),me(_f,"nap"),me(Sf,"sleep")});function zf(e,r,t){var n=new wf;return r=null==r?0:+r,n.restart(t=>{n.stop(),e(t+r)},r,t),n}var Gf=t(()=>{$f(),me(zf,"default")}),Uf=t(()=>{$f(),Gf()});function qf(t,e,r,n,i,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};Hf(t,r,{name:e,index:n,group:i,on:Vf,tween:Xf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Kf})}function jf(t,e){if((t=Yf(t,e)).state>Kf)throw new Error("too late; already scheduled");return t}function Wf(t,e){if((t=Yf(t,e)).state>Jf)throw new Error("too late; already running");return t}function Yf(t,e){if(t=(t=t.__transition)&&t[e])return t;throw new Error("transition not found")}function Hf(a,s,o){var l,c=a.__transition;function t(t){o.state=Zf,o.timer.restart(h,o.delay,o.time),o.delay<=t&&h(t-o.delay)}function h(t){var e,r,n,i;if(o.state!==Zf)return d();for(e in c)if(i=c[e],i.name===o.name){if(i.state===Jf)return zf(h);i.state===tm?(i.state=rm,i.timer.stop(),i.on.call("interrupt",a,a.__data__,i.index,i.group),delete c[e]):+e{wd(),Uf(),Vf=yd("start","end","cancel","interrupt"),Xf=[],Kf=0,Zf=1,Qf=2,Jf=3,tm=4,em=5,rm=6,me(qf,"default"),me(jf,"init"),me(Wf,"set"),me(Yf,"get"),me(Hf,"create")});function im(t,e){var r,n,i,a=t.__transition,s=!0;if(a){for(i in e=null==e?null:e+"",a)(r=a[i]).name!==e?s=!1:(n=Qf{nm(),me(im,"default")});function sm(t){return this.each(function(){im(this,t)})}var om=t(()=>{am(),me(sm,"default")});function lm(i,a){var s,o;return function(){var t=Wf(this,i),e=t.tween;if(e!==s)for(var r=0,n=(o=s=e).length;r{nm(),me(lm,"tweenRemove"),me(cm,"tweenFunction"),me(hm,"default"),me(um,"tweenValue")});function pm(t,e){var r;return("number"==typeof e?U1:e instanceof kg?M1:(r=kg(e))?(e=r,M1):V1)(t,e)}var gm=t(()=>{v1(),vf(),me(pm,"default")});function fm(t){return function(){this.removeAttribute(t)}}function mm(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ym(e,r,n){var i,a,s=n+"";return function(){var t=this.getAttribute(e);return t===s?null:t===i?a:a=r(i=t,n)}}function vm(e,r,n){var i,a,s=n+"";return function(){var t=this.getAttributeNS(e.space,e.local);return t===s?null:t===i?a:a=r(i=t,n)}}function xm(n,i,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttribute(n):(t=this.getAttribute(n))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=i(s=t,r))}}function bm(n,i,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttributeNS(n.space,n.local):(t=this.getAttributeNS(n.space,n.local))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=i(s=t,r))}}function wm(t,e){var r=Td(t),n="transform"===r?pf:pm;return this.attrTween(t,"function"==typeof e?(r.local?bm:xm)(r,n,um(this,"attr."+t,e)):null==e?(r.local?mm:fm)(r):(r.local?vm:ym)(r,n,e))}var km=t(()=>{vf(),dg(),dm(),gm(),me(fm,"attrRemove"),me(mm,"attrRemoveNS"),me(ym,"attrConstant"),me(vm,"attrConstantNS"),me(xm,"attrFunction"),me(bm,"attrFunctionNS"),me(wm,"default")});function Tm(e,r){return function(t){this.setAttribute(e,r.call(this,t))}}function Em(e,r){return function(t){this.setAttributeNS(e.space,e.local,r.call(this,t))}}function Cm(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&Em(e,t):n}return me(t,"tween"),t._value=r,t}function _m(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&Tm(e,t):n}return me(t,"tween"),t._value=r,t}function Sm(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return t=Td(t),this.tween(r,(t.local?Cm:_m)(t,e))}var Am=t(()=>{dg(),me(Tm,"attrInterpolate"),me(Em,"attrInterpolateNS"),me(Cm,"attrTweenNS"),me(_m,"attrTween"),me(Sm,"default")});function Lm(t,e){return function(){jf(this,t).delay=+e.apply(this,arguments)}}function Nm(t,e){return e=+e,function(){jf(this,t).delay=e}}function Im(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Lm:Nm)(e,t)):Yf(this.node(),e).delay}var Rm=t(()=>{nm(),me(Lm,"delayFunction"),me(Nm,"delayConstant"),me(Im,"default")});function Mm(t,e){return function(){Wf(this,t).duration=+e.apply(this,arguments)}}function Dm(t,e){return e=+e,function(){Wf(this,t).duration=e}}function Om(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Mm:Dm)(e,t)):Yf(this.node(),e).duration}var Pm=t(()=>{nm(),me(Mm,"durationFunction"),me(Dm,"durationConstant"),me(Om,"default")});function Bm(t,e){if("function"!=typeof e)throw new Error;return function(){Wf(this,t).ease=e}}function Fm(t){var e=this._id;return arguments.length?this.each(Bm(e,t)):Yf(this.node(),e).ease}var $m=t(()=>{nm(),me(Bm,"easeConstant"),me(Fm,"default")});function zm(e,r){return function(){var t=r.apply(this,arguments);if("function"!=typeof t)throw new Error;Wf(this,e).ease=t}}function Gm(t){if("function"!=typeof t)throw new Error;return this.each(zm(this._id,t))}var Um=t(()=>{nm(),me(zm,"easeVarying"),me(Gm,"default")});function qm(t){"function"!=typeof t&&(t=Ud(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{dg(),Oy(),me(qm,"default")});function Wm(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,t=r.length,i=Math.min(n,t),a=new Array(n),s=0;s{Oy(),me(Wm,"default")});function Hm(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return!(t=0<=e?t.slice(0,e):t)||"start"===t})}function Vm(r,n,i){var a,s,o=Hm(n)?jf:Wf;return function(){var t=o(this,r),e=t.on;e!==a&&(s=(a=e).copy()).on(n,i),t.on=s}}function Xm(t,e){var r=this._id;return arguments.length<2?Yf(this.node(),r).on.on(t):this.each(Vm(r,t,e))}var Km=t(()=>{nm(),me(Hm,"start"),me(Vm,"onFunction"),me(Xm,"default")});function Zm(r){return function(){var t,e=this.parentNode;for(t in this.__transition)if(+t!==r)return;e&&e.removeChild(this)}}function Qm(){return this.on("end.remove",Zm(this._id))}var Jm=t(()=>{me(Zm,"removeFunction"),me(Qm,"default")});function ty(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Nd(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s{dg(),Oy(),nm(),me(ty,"default")});function ry(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Bd(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o{dg(),Oy(),nm(),me(ry,"default")});function iy(){return new ay(this._groups,this._parents)}var ay,sy=t(()=>{dg(),ay=cg.prototype.constructor,me(iy,"default")});function oy(r,n){var i,a,s;return function(){var t=J0(this,r),e=(this.style.removeProperty(r),J0(this,r));return t===e?null:t===i&&e===a?s:s=n(i=t,a=e)}}function ly(t){return function(){this.style.removeProperty(t)}}function cy(e,r,n){var i,a,s=n+"";return function(){var t=J0(this,e);return t===s?null:t===i?a:a=r(i=t,n)}}function hy(n,i,a){var s,o,l;return function(){var t=J0(this,n),e=a(this),r=e+"";return null==e&&(this.style.removeProperty(n),r=e=J0(this,n)),t===r?null:t===s&&r===o?l:(o=r,l=i(s=t,e))}}function uy(n,i){var a,s,o,l,c="style."+i,h="end."+c;return function(){var t=Wf(this,n),e=t.on,r=null==t.value[c]?l=l||ly(i):void 0;e===a&&o===r||(s=(a=e).copy()).on(h,o=r),t.on=s}}function dy(t,e,r){var n="transform"==(t+="")?df:pm;return null==e?this.styleTween(t,oy(t,n)).on("end.style."+t,ly(t)):"function"==typeof e?this.styleTween(t,hy(t,n,um(this,"style."+t,e))).each(uy(this._id,t)):this.styleTween(t,cy(t,n,e),r).on("end.style."+t,null)}var py=t(()=>{vf(),dg(),nm(),dm(),gm(),me(oy,"styleNull"),me(ly,"styleRemove"),me(cy,"styleConstant"),me(hy,"styleFunction"),me(uy,"styleMaybeRemove"),me(dy,"default")});function gy(e,r,n){return function(t){this.style.setProperty(e,r.call(this,t),n)}}function fy(e,r,n){var i,a;function t(){var t=r.apply(this,arguments);return i=t!==a?(a=t)&&gy(e,t,n):i}return me(t,"tween"),t._value=r,t}function my(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;return this.tween(n,fy(t,e,r??""))}var yy=t(()=>{me(gy,"styleInterpolate"),me(fy,"styleTween"),me(my,"default")});function vy(t){return function(){this.textContent=t}}function xy(e){return function(){var t=e(this);this.textContent=t??""}}function by(t){return this.tween("text","function"==typeof t?xy(um(this,"text",t)):vy(null==t?"":t+""))}var wy=t(()=>{dm(),me(vy,"textConstant"),me(xy,"textFunction"),me(by,"default")});function ky(e){return function(t){this.textContent=e.call(this,t)}}function Ty(e){var r,n;function t(){var t=e.apply(this,arguments);return r=t!==n?(n=t)&&ky(t):r}return me(t,"tween"),t._value=e,t}function Ey(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ty(t))}var Cy=t(()=>{me(ky,"textInterpolate"),me(Ty,"textTween"),me(Ey,"default")});function _y(){for(var t=this._name,e=this._id,r=++My,n=this._groups,i=n.length,a=0;a{Oy(),nm(),me(_y,"default")});function Ay(){var i,a,s=this,o=s._id,l=s.size();return new Promise(function(t,e){var r={value:e},n={value:me(function(){0==--l&&t()},"value")};s.each(function(){var t=Wf(this,o),e=t.on;e!==i&&((a=(i=e).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(n)),t.on=a}),0===l&&t()})}var Ly=t(()=>{nm(),me(Ay,"default")});function Ny(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function Iy(t){return cg().transition(t)}function Ry(){return++My}var My,Dy,Oy=t(()=>{dg(),km(),Am(),Rm(),Pm(),$m(),Um(),jm(),Ym(),Km(),Jm(),ey(),ny(),sy(),py(),yy(),wy(),Cy(),Sy(),dm(),Ly(),My=0,me(Ny,"Transition"),me(Iy,"transition"),me(Ry,"newId"),Dy=cg.prototype,Ny.prototype=Iy.prototype={constructor:Ny,select:ty,selectAll:ry,selectChild:Dy.selectChild,selectChildren:Dy.selectChildren,filter:qm,merge:Wm,selection:iy,transition:_y,call:Dy.call,nodes:Dy.nodes,node:Dy.node,size:Dy.size,empty:Dy.empty,each:Dy.each,on:Xm,attr:wm,attrTween:Sm,style:dy,styleTween:my,text:by,textTween:Ey,remove:Qm,tween:hm,delay:Im,duration:Om,ease:Fm,easeVarying:Gm,end:Ay,[Symbol.iterator]:Dy[Symbol.iterator]}});function Py(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var By=t(()=>{me(Py,"cubicInOut")}),Fy=t(()=>{By()});function $y(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function zy(t){var e,r;t=t instanceof Ny?(e=t._id,t._name):(e=++My,(r=Gy).time=xf(),null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;a{Oy(),nm(),Fy(),Uf(),Gy={time:null,delay:0,duration:250,ease:Py},me($y,"inherit"),me(zy,"default")}),qy=t(()=>{dg(),om(),Uy(),cg.prototype.interrupt=sm,cg.prototype.transition=zy}),jy=t(()=>{qy()}),Wy=t(()=>{}),Yy=t(()=>{}),Hy=t(()=>{});function Vy(t){return[+t[0],+t[1]]}function Xy(t){return[Vy(t[0]),Vy(t[1])]}function Ky(t){return{type:t}}var Zy,Qy,Jy,t2=t(()=>{jy(),Wy(),Yy(),Hy(),{abs:Zy,max:Qy,min:Jy}=Math,me(Vy,"number1"),me(Xy,"number2"),["w","e"].map(Ky),me(function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),me(function(t){return t&&[t[0][0],t[1][0]]},"output"),["n","s"].map(Ky),me(function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),me(function(t){return t&&[t[0][1],t[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(Ky),me(function(t){return null==t?null:Xy(t)},"input"),me(function(t){return t},"output"),me(Ky,"type")}),e2=t(()=>{t2()});function r2(r){this._+=r[0];for(let t=1,e=r.length;t{a2=Math.PI,l2=(s2=2*a2)-(o2=1e-6),me(r2,"append"),me(n2,"appendRound"),c2=class{static{me(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?r2:n2(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,n){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(t,e,r,n,i,a){this._append`C${+t},${+e},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,r,n,i){if(t=+t,e=+e,r=+r,n=+n,(i=+i)<0)throw new Error("negative radius: "+i);var a,s,o=this._x1,l=this._y1,c=r-t,h=n-e,u=o-t,d=l-e,p=u*u+d*d;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:o2o2&&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((a2-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,Math.abs(p-1)>o2&&this._append`L${t+p*u},${e+p*d}`,this._append`A${i},${i},0,0,${+(u*oo2||Math.abs(this._y1-c)>o2)&&this._append`L${l},${c}`,r&&((a=a<0?a%s2+s2:a)>l2?this._append`A${r},${r},0,1,${h},${t-s},${e-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:o2{h2()}),d2=t(()=>{}),p2=t(()=>{}),g2=t(()=>{}),f2=t(()=>{}),m2=t(()=>{}),y2=t(()=>{}),v2=t(()=>{});function x2(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function b2(t,e){var r;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(r=t.slice(0,e)).length?r[0]+r.slice(2):r,+t.slice(e+1)]}var w2=t(()=>{me(x2,"default"),me(b2,"formatDecimalParts")});function k2(t){return(t=b2(Math.abs(t)))?t[1]:NaN}var T2=t(()=>{w2(),me(k2,"default")});function E2(o,l){return function(t,e){for(var r=t.length,n=[],i=0,a=o[0],s=0;0e));)a=o[i=(i+1)%o.length];return n.reverse().join(l)}}var C2=t(()=>{me(E2,"default")});function _2(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var S2=t(()=>{me(_2,"default")});function A2(t){var e;if(e=N2.exec(t))return new L2({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function L2(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}var N2,I2=t(()=>{N2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,me(A2,"formatSpecifier"),A2.prototype=L2.prototype,me(L2,"FormatSpecifier"),L2.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 R2(t){t:for(var e,r=t.length,n=1,i=-1;n{me(R2,"default")});function D2(t,e){var r,n,i=b2(t,e);return i?(r=i[0],(i=(i=i[1])-(O2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(n=r.length)?r:n{w2(),me(D2,"default")});function B2(t,e){var r;return(e=b2(t,e))?(r=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+r:r.length>e+1?r.slice(0,e+1)+"."+r.slice(e+1):r+new Array(e-r.length+2).join("0")):t+""}var F2,$2=t(()=>{w2(),me(B2,"default")}),z2=t(()=>{w2(),P2(),$2(),F2={"%":me((t,e)=>(100*t).toFixed(e),"%"),b:me(t=>Math.round(t).toString(2),"b"),c:me(t=>t+"","c"),d:x2,e:me((t,e)=>t.toExponential(e),"e"),f:me((t,e)=>t.toFixed(e),"f"),g:me((t,e)=>t.toPrecision(e),"g"),o:me(t=>Math.round(t).toString(8),"o"),p:me((t,e)=>B2(100*t,e),"p"),r:B2,s:D2,X:me(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:me(t=>Math.round(t).toString(16),"x")}});function G2(t){return t}var U2=t(()=>{me(G2,"default")});function q2(t){var k=void 0===t.grouping||void 0===t.thousands?G2:E2(j2.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",T=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?G2:_2(j2.call(t.numerals,String)),a=void 0===t.percent?"%":t.percent+"",C=void 0===t.minus?"−":t.minus+"",_=void 0===t.nan?"NaN":t.nan+"";function s(t){var c=(t=A2(t)).fill,h=t.align,u=t.sign,e=t.symbol,d=t.zero,p=t.width,g=t.comma,f=t.precision,m=t.trim,y=t.type,v=("n"===y?(g=!0,y="g"):F2[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===e?n:"#"===e&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===e?i:/[%p]/.test(y)?a:"",b=F2[y],w=/[defgprs%]/.test(y);function r(t){var e,r,n,i=v,a=x;if("c"===y)a=b(t)+a,t="";else{var s=(t=+t)<0||1/t<0;if(t=isNaN(t)?_:b(Math.abs(t),f),m&&(t=R2(t)),i=((s=(!s||0!=+t||"+"===u)&&s)?"("===u?u:C:"-"===u||"("===u?"":u)+i,a=("s"===y?W2[8+O2/3]:"")+a+(s&&"("===u?")":""),w)for(e=-1,r=t.length;++e>1)+i+t+a+l.slice(o);break;default:t=l+i+t+a}return E(t)}return f=void 0===f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),me(r,"format"),r.toString=function(){return t+""},r}function e(t,e){var r=s(((t=A2(t)).type="f",t)),t=3*Math.max(-8,Math.min(8,Math.floor(k2(e)/3))),n=Math.pow(10,-t),i=W2[8+t/3];return function(t){return r(n*t)+i}}return me(s,"newFormat"),me(e,"formatPrefix"),{format:s,formatPrefix:e}}var j2,W2,Y2=t(()=>{T2(),C2(),S2(),I2(),M2(),z2(),P2(),U2(),j2=Array.prototype.map,W2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],me(q2,"default")});function H2(t){return V2=q2(t),X2=V2.format,K2=V2.formatPrefix,V2}var V2,X2,K2,Z2=t(()=>{Y2(),H2({thousands:",",grouping:[3],currency:["$",""]}),me(H2,"defaultLocale")});function Q2(t){return Math.max(0,-k2(Math.abs(t)))}var J2=t(()=>{T2(),me(Q2,"default")});function tv(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(k2(e)/3)))-k2(Math.abs(t)))}var ev=t(()=>{T2(),me(tv,"default")});function rv(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,k2(e)-k2(t))+1}var nv=t(()=>{T2(),me(rv,"default")}),iv=t(()=>{Z2(),I2(),J2(),ev(),nv()}),av=t(()=>{}),sv=t(()=>{}),ov=t(()=>{}),lv=t(()=>{});function cv(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var hv=t(()=>{me(cv,"initRange")});function uv(){var r=new Du,n=[],i=[],a=dv;function s(t){let e=r.get(t);if(void 0===e){if(a!==dv)return a;r.set(t,e=n.push(t)-1)}return i[e%i.length]}return me(s,"scale"),s.domain=function(t){if(!arguments.length)return n.slice();n=[],r=new Du;for(var e of t)r.has(e)||r.set(e,n.push(e)-1);return s},s.range=function(t){return arguments.length?(i=Array.from(t),s):i.slice()},s.unknown=function(t){return arguments.length?(a=t,s):a},s.copy=function(){return uv(n,i).unknown(a)},cv.apply(s,arguments),s}var dv,pv=t(()=>{Ku(),hv(),dv=Symbol("implicit"),me(uv,"ordinal")});function gv(){var i,a,t=uv().unknown(void 0),s=t.domain,o=t.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function e(){var t=s().length,e=c{Ku(),hv(),pv(),me(gv,"band")});function mv(t){return function(){return t}}var yv=t(()=>{me(mv,"constants")});function vv(t){return+t}var xv=t(()=>{me(vv,"number")});function bv(t){return t}function wv(e,r){return(r-=e=+e)?function(t){return(t-e)/r}:mv(isNaN(r)?NaN:.5)}function kv(e,r){var t;return r{Ku(),vf(),yv(),xv(),Av=[0,1],me(bv,"identity"),me(wv,"normalize"),me(kv,"clamper"),me(Tv,"bimap"),me(Ev,"polymap"),me(Cv,"copy"),me(_v,"transformer"),me(Sv,"continuous")});function Nv(t,e,r,n){var i,a=$u(t,e,r);switch((n=A2(n??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=tv(a,s))||(n.precision=i),K2(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=rv(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=Q2(a))||(n.precision=i-2*("%"===n.type))}return X2(n)}var Iv=t(()=>{Ku(),iv(),me(Nv,"tickFormat")});function Rv(c){var h=c.domain;return c.ticks=function(t){var e=h();return Bu(e[0],e[e.length-1],t??10)},c.tickFormat=function(t,e){var r=h();return Nv(r[0],r[r.length-1],t??10,e)},c.nice=function(t){null==t&&(t=10);var e,r,n=h(),i=0,a=n.length-1,s=n[i],o=n[a],l=10;for(o{Ku(),Lv(),hv(),Iv(),me(Rv,"linearish"),me(Mv,"linear")});function Ov(t,e){var r,n=0,i=(t=t.slice()).length-1,a=t[n],s=t[i];return s{me(Ov,"nice")});function Bv(a,s,r,n){function o(t){return a(t=0===arguments.length?new Date:new Date(+t)),t}return me(o,"interval"),o.floor=t=>(a(t=new Date(+t)),t),o.ceil=t=>(a(t=new Date(t-1)),s(t,1),a(t),t),o.round=t=>{var e=o(t),r=o.ceil(t);return t-e(s(t=new Date(+t),null==e?1:Math.floor(e)),t),o.range=(t,e,r)=>{var n,i=[];if(t=o.ceil(t),r=null==r?1:Math.floor(r),tBv(t=>{if(t<=t)for(;a(t),!r(t);)t.setTime(t-1)},(t,e)=>{if(t<=t)if(e<0)for(;++e<=0;)for(;s(t,-1),!r(t););else for(;0<=--e;)for(;s(t,1),!r(t););}),r&&(o.count=(t,e)=>(Fv.setTime(+t),$v.setTime(+e),a(Fv),a($v),Math.floor(r(Fv,$v))),o.every=e=>(e=Math.floor(e),isFinite(e)&&0n(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}var Fv,$v,zv,Gv,Uv,qv,jv,Wv,Yv,Hv,Vv,Xv=t(()=>{Fv=new Date,$v=new Date,me(Bv,"timeInterval")}),Kv=t(()=>{Xv(),(zv=Bv(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t)).every=r=>(r=Math.floor(r),isFinite(r)&&0{t.setTime(Math.floor(t/r)*r)},(t,e)=>{t.setTime(+t+e*r)},(t,e)=>(e-t)/r):zv:null)}),Zv=t(()=>{Xv(),(Gv=Bv(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds())).range}),Qv=t(()=>{Xv(),(Uv=Bv(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes())).range,(qv=Bv(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())).range}),Jv=t(()=>{Xv(),(jv=Bv(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours())).range,(Wv=Bv(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours())).range}),tx=t(()=>{Xv(),(Yv=Bv(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1)).range,(Hv=Bv(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1)).range,(Vv=Bv(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5))).range});function ex(e){return Bv(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5)}function rx(e){return Bv(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}var nx,ix,ax,sx,ox,lx,cx,hx,ux,dx,px,gx,fx,mx,yx,vx,xx,bx,wx=t(()=>{Xv(),me(ex,"timeWeekday"),nx=ex(0),ix=ex(1),ax=ex(2),sx=ex(3),ox=ex(4),lx=ex(5),cx=ex(6),nx.range,ix.range,ax.range,sx.range,ox.range,lx.range,cx.range,me(rx,"utcWeekday"),hx=rx(0),ux=rx(1),dx=rx(2),px=rx(3),gx=rx(4),fx=rx(5),mx=rx(6),hx.range,ux.range,dx.range,px.range,gx.range,fx.range,mx.range}),kx=t(()=>{Xv(),(yx=Bv(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())).range,(vx=Bv(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())).range}),Tx=t(()=>{Xv(),(xx=Bv(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{t.setFullYear(Math.floor(t.getFullYear()/r)*r),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e*r)}):null,(bx=Bv(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/r)*r),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e*r)}):null});function Ex(a,t,e,r,n,i){let s=[[Gv,1,1e3],[Gv,5,5e3],[Gv,15,15e3],[Gv,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],[e,1,6048e5],[t,1,2592e6],[t,3,7776e6],[a,1,31536e6]];function o(t,e,r){var n=et).right(s,n);return i===s.length?a.every($u(t/31536e6,e/31536e6,r)):0===i?zv.every(Math.max($u(t,e,r),1)):([t,e]=s[n/s[i-1][2]{Ku(),Kv(),Zv(),Qv(),Jv(),tx(),wx(),kx(),Tx(),me(Ex,"ticker"),[Cx,_x]=Ex(bx,vx,hx,Vv,Wv,qv),[Sx,Ax]=Ex(xx,yx,nx,Yv,jv,Uv)}),Nx=t(()=>{Kv(),Zv(),Qv(),Jv(),tx(),wx(),kx(),Tx(),Lx()});function Ix(t){var e;return 0<=t.y&&t.y<100?((e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L)).setFullYear(t.y),e):new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Rx(t){var e;return 0<=t.y&&t.y<100?((e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L))).setUTCFullYear(t.y),e):new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Mx(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Dx(t){var n=t.dateTime,i=t.date,a=t.time,e=t.periods,r=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,c=Bx(e),h=Fx(e),P=Bx(r),B=Fx(r),F=Bx(s),$=Fx(s),z=Bx(o),G=Fx(o),U=Bx(l),q=Fx(l),u={a:E,A:C,b:_,B:S,c:null,d:ab,e:ab,f:hb,g:wb,G:Tb,H:sb,I:ob,j:lb,L:cb,m:ub,M:db,p:A,q:L,Q:Yb,s:Hb,S:pb,u:gb,U:fb,V:yb,w:vb,W:xb,x:null,X:null,y:bb,Y:kb,Z:Eb,"%":Wb},d={a:N,A:I,b:R,B:M,c:null,d:Cb,e:Cb,f:Nb,g:Gb,G:qb,H:_b,I:Sb,j:Ab,L:Lb,m:Ib,M:Rb,p:D,q:O,Q:Yb,s:Hb,S:Mb,u:Db,U:Ob,V:Bb,w:Fb,W:$b,x:null,X:null,y:zb,Y:Ub,Z:jb,"%":Wb},j={a:y,A:v,b:x,B:b,c:w,d:Xx,e:Xx,f:eb,g:Wx,G:jx,H:Zx,I:Zx,j:Kx,L:tb,m:Vx,M:Qx,p:m,q:Hx,Q:nb,s:ib,S:Jx,u:zx,U:Gx,V:Ux,w:$x,W:qx,x:k,X:T,y:Wx,Y:jx,Z:Yx,"%":rb};function p(l,c){return function(t){var e,r,n,i=[],a=-1,s=0,o=l.length;for(t instanceof Date||(t=new Date(+t));++a[t.toLowerCase(),e]))}function $x(t,e,r){return(e=Xb.exec(e.slice(r,r+1)))?(t.w=+e[0],r+e[0].length):-1}function zx(t,e,r){return(e=Xb.exec(e.slice(r,r+1)))?(t.u=+e[0],r+e[0].length):-1}function Gx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.U=+e[0],r+e[0].length):-1}function Ux(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.V=+e[0],r+e[0].length):-1}function qx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.W=+e[0],r+e[0].length):-1}function jx(t,e,r){return(e=Xb.exec(e.slice(r,r+4)))?(t.y=+e[0],r+e[0].length):-1}function Wx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.y=+e[0]+(68<+e[0]?1900:2e3),r+e[0].length):-1}function Yx(t,e,r){return(e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6)))?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),r+e[0].length):-1}function Hx(t,e,r){return(e=Xb.exec(e.slice(r,r+1)))?(t.q=3*e[0]-3,r+e[0].length):-1}function Vx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.m=e[0]-1,r+e[0].length):-1}function Xx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.d=+e[0],r+e[0].length):-1}function Kx(t,e,r){return(e=Xb.exec(e.slice(r,r+3)))?(t.m=0,t.d=+e[0],r+e[0].length):-1}function Zx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.H=+e[0],r+e[0].length):-1}function Qx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.M=+e[0],r+e[0].length):-1}function Jx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.S=+e[0],r+e[0].length):-1}function tb(t,e,r){return(e=Xb.exec(e.slice(r,r+3)))?(t.L=+e[0],r+e[0].length):-1}function eb(t,e,r){return(e=Xb.exec(e.slice(r,r+6)))?(t.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function rb(t,e,r){return(e=Kb.exec(e.slice(r,r+1)))?r+e[0].length:-1}function nb(t,e,r){return(e=Xb.exec(e.slice(r)))?(t.Q=+e[0],r+e[0].length):-1}function ib(t,e,r){return(e=Xb.exec(e.slice(r)))?(t.s=+e[0],r+e[0].length):-1}function ab(t,e){return Ox(t.getDate(),e,2)}function sb(t,e){return Ox(t.getHours(),e,2)}function ob(t,e){return Ox(t.getHours()%12||12,e,2)}function lb(t,e){return Ox(1+Yv.count(xx(t),t),e,3)}function cb(t,e){return Ox(t.getMilliseconds(),e,3)}function hb(t,e){return cb(t,e)+"000"}function ub(t,e){return Ox(t.getMonth()+1,e,2)}function db(t,e){return Ox(t.getMinutes(),e,2)}function pb(t,e){return Ox(t.getSeconds(),e,2)}function gb(t){return 0===(t=t.getDay())?7:t}function fb(t,e){return Ox(nx.count(xx(t)-1,t),e,2)}function mb(t){var e=t.getDay();return 4<=e||0===e?ox(t):ox.ceil(t)}function yb(t,e){return t=mb(t),Ox(ox.count(xx(t),t)+(4===xx(t).getDay()),e,2)}function vb(t){return t.getDay()}function xb(t,e){return Ox(ix.count(xx(t)-1,t),e,2)}function bb(t,e){return Ox(t.getFullYear()%100,e,2)}function wb(t,e){return Ox((t=mb(t)).getFullYear()%100,e,2)}function kb(t,e){return Ox(t.getFullYear()%1e4,e,4)}function Tb(t,e){var r=t.getDay();return Ox((t=4<=r||0===r?ox(t):ox.ceil(t)).getFullYear()%1e4,e,4)}function Eb(t){return(0<(t=t.getTimezoneOffset())?"-":(t*=-1,"+"))+Ox(t/60|0,"0",2)+Ox(t%60,"0",2)}function Cb(t,e){return Ox(t.getUTCDate(),e,2)}function _b(t,e){return Ox(t.getUTCHours(),e,2)}function Sb(t,e){return Ox(t.getUTCHours()%12||12,e,2)}function Ab(t,e){return Ox(1+Hv.count(bx(t),t),e,3)}function Lb(t,e){return Ox(t.getUTCMilliseconds(),e,3)}function Nb(t,e){return Lb(t,e)+"000"}function Ib(t,e){return Ox(t.getUTCMonth()+1,e,2)}function Rb(t,e){return Ox(t.getUTCMinutes(),e,2)}function Mb(t,e){return Ox(t.getUTCSeconds(),e,2)}function Db(t){return 0===(t=t.getUTCDay())?7:t}function Ob(t,e){return Ox(hx.count(bx(t)-1,t),e,2)}function Pb(t){var e=t.getUTCDay();return 4<=e||0===e?gx(t):gx.ceil(t)}function Bb(t,e){return t=Pb(t),Ox(gx.count(bx(t),t)+(4===bx(t).getUTCDay()),e,2)}function Fb(t){return t.getUTCDay()}function $b(t,e){return Ox(ux.count(bx(t)-1,t),e,2)}function zb(t,e){return Ox(t.getUTCFullYear()%100,e,2)}function Gb(t,e){return Ox((t=Pb(t)).getUTCFullYear()%100,e,2)}function Ub(t,e){return Ox(t.getUTCFullYear()%1e4,e,4)}function qb(t,e){var r=t.getUTCDay();return Ox((t=4<=r||0===r?gx(t):gx.ceil(t)).getUTCFullYear()%1e4,e,4)}function jb(){return"+0000"}function Wb(){return"%"}function Yb(t){return+t}function Hb(t){return Math.floor(+t/1e3)}var Vb,Xb,Kb,Zb,Qb=t(()=>{Nx(),me(Ix,"localDate"),me(Rx,"utcDate"),me(Mx,"newDate"),me(Dx,"formatLocale"),Vb={"-":"",_:" ",0:"0"},Xb=/^\s*\d+/,Kb=/^%/,Zb=/[\\^$*+?|[\]().{}]/g,me(Ox,"pad"),me(Px,"requote"),me(Bx,"formatRe"),me(Fx,"formatLookup"),me($x,"parseWeekdayNumberSunday"),me(zx,"parseWeekdayNumberMonday"),me(Gx,"parseWeekNumberSunday"),me(Ux,"parseWeekNumberISO"),me(qx,"parseWeekNumberMonday"),me(jx,"parseFullYear"),me(Wx,"parseYear"),me(Yx,"parseZone"),me(Hx,"parseQuarter"),me(Vx,"parseMonthNumber"),me(Xx,"parseDayOfMonth"),me(Kx,"parseDayOfYear"),me(Zx,"parseHour24"),me(Qx,"parseMinutes"),me(Jx,"parseSeconds"),me(tb,"parseMilliseconds"),me(eb,"parseMicroseconds"),me(rb,"parseLiteralPercent"),me(nb,"parseUnixTimestamp"),me(ib,"parseUnixTimestampSeconds"),me(ab,"formatDayOfMonth"),me(sb,"formatHour24"),me(ob,"formatHour12"),me(lb,"formatDayOfYear"),me(cb,"formatMilliseconds"),me(hb,"formatMicroseconds"),me(ub,"formatMonthNumber"),me(db,"formatMinutes"),me(pb,"formatSeconds"),me(gb,"formatWeekdayNumberMonday"),me(fb,"formatWeekNumberSunday"),me(mb,"dISO"),me(yb,"formatWeekNumberISO"),me(vb,"formatWeekdayNumberSunday"),me(xb,"formatWeekNumberMonday"),me(bb,"formatYear"),me(wb,"formatYearISO"),me(kb,"formatFullYear"),me(Tb,"formatFullYearISO"),me(Eb,"formatZone"),me(Cb,"formatUTCDayOfMonth"),me(_b,"formatUTCHour24"),me(Sb,"formatUTCHour12"),me(Ab,"formatUTCDayOfYear"),me(Lb,"formatUTCMilliseconds"),me(Nb,"formatUTCMicroseconds"),me(Ib,"formatUTCMonthNumber"),me(Rb,"formatUTCMinutes"),me(Mb,"formatUTCSeconds"),me(Db,"formatUTCWeekdayNumberMonday"),me(Ob,"formatUTCWeekNumberSunday"),me(Pb,"UTCdISO"),me(Bb,"formatUTCWeekNumberISO"),me(Fb,"formatUTCWeekdayNumberSunday"),me($b,"formatUTCWeekNumberMonday"),me(zb,"formatUTCYear"),me(Gb,"formatUTCYearISO"),me(Ub,"formatUTCFullYear"),me(qb,"formatUTCFullYearISO"),me(jb,"formatUTCZone"),me(Wb,"formatLiteralPercent"),me(Yb,"formatUnixTimestamp"),me(Hb,"formatUnixTimestampSeconds")});function Jb(t){return t4=Dx(t),e4=t4.format,t4}var t4,e4,r4=t(()=>{Qb(),Jb({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"]}),me(Jb,"defaultLocale")}),n4=t(()=>{r4()});function i4(t){return new Date(t)}function a4(t){return t instanceof Date?+t:+new Date(+t)}function s4(r,n,e,i,a,s,o,l,c,h){var u=Sv(),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(t){return(c(t){Nx(),n4(),Lv(),hv(),Pv(),me(i4,"date"),me(a4,"number"),me(s4,"calendar"),me(o4,"time")}),c4=t(()=>{fv(),Dv(),pv(),l4()});function h4(t){for(var e=t.length/6|0,r=new Array(e),n=0;n{me(h4,"default")}),p4=t(()=>{d4(),u4=h4("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),g4=t(()=>{p4()});function f4(t){return me(function(){return t},"constant")}var m4=t(()=>{me(f4,"default")});function y4(t){return 1{x4=Math.abs,b4=Math.atan2,w4=Math.cos,k4=Math.max,T4=Math.min,E4=Math.sin,C4=Math.sqrt,_4=1e-12,A4=(S4=Math.PI)/2,L4=2*S4,me(y4,"acos"),me(v4,"asin")});function I4(r){let n=3;return r.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);n=e}return r},()=>new c2(n)}var R4=t(()=>{u2(),me(I4,"withPath")});function M4(t){return t.innerRadius}function D4(t){return t.outerRadius}function O4(t){return t.startAngle}function P4(t){return t.endAngle}function B4(t){return t&&t.padAngle}function F4(t,e,r,n,i,a,s,o){var l=(o-=a)*(r-=t)-(s-=i)*(n-=e);if(!(l*l<_4))return[t+(l=(s*(e-a)-o*(t-i))/l)*r,e+l*n]}function $4(t,e,r,n,i,a,s){var o=(s=(s?a:-a)/C4((l=t-r)*l+(o=e-n)*o))*o,s=-s*l,l=t+o,t=e+s,e=r+o,r=n+s,n=(l+e)/2,c=(t+r)/2,h=e-l,u=r-t,d=h*h+u*u,e=((l=l*r-e*t)*u-h*(r=(u<0?-1:1)*C4(k4(0,(a=i-a)*a*d-l*l))))/d,t=(-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=e-n)*h+(u=t-c)*u&&(e=p,t=l),{cx:e,cy:t,x01:-o,y01:-s,x11:e*(i/a-1),y11:t*(i/a-1)}}function z4(){var A=M4,L=D4,N=f4(0),I=null,R=O4,M=P4,D=B4,O=null,P=I4(e);function e(){var t,e,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)-A4,C=M.apply(this,arguments)-A4,_=x4(C-E),S=E_4?(n+=u*=S?1:-1,i-=u):(a=0,n=i=(E+C)/2),(s-=2*d)>_4?(e+=d*=S?1:-1,r-=d):(s=0,e=r=(E+C)/2)),h=T*w4(e),u=T*E4(e),d=k*w4(i),E=k*E4(i),_4{m4(),N4(),R4(),me(M4,"arcInnerRadius"),me(D4,"arcOuterRadius"),me(O4,"arcStartAngle"),me(P4,"arcEndAngle"),me(B4,"arcPadAngle"),me(F4,"intersect"),me($4,"cornerTangents"),me(z4,"default")});function U4(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var q4=t(()=>{Array.prototype.slice,me(U4,"default")});function j4(t){this._context=t}function W4(t){return new j4(t)}var Y4=t(()=>{me(j4,"Linear"),j4.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}},"point")},me(W4,"default")});function H4(t){return t[0]}function V4(t){return t[1]}var X4=t(()=>{me(H4,"x"),me(V4,"y")});function K4(s,o){var l=f4(!0),c=null,h=W4,u=null,d=I4(e);function e(t){var e,r,n,i=(t=U4(t)).length,a=!1;for(null==c&&(u=h(n=d())),e=0;e<=i;++e)!(e{q4(),m4(),Y4(),R4(),X4(),me(K4,"default")});function Q4(t,e){return e{me(Q4,"default")});function t5(t){return t}var e5=t(()=>{me(t5,"default")});function r5(){var p=t5,g=Q4,f=null,m=f4(0),y=f4(L4),v=f4(0);function e(r){for(var t,e,n,i=(r=U4(r)).length,a=0,s=new Array(i),o=new Array(i),l=+m.apply(this,arguments),c=Math.min(L4,Math.max(-L4,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{q4(),m4(),J4(),e5(),N4(),me(r5,"default")});function i5(t){return new s5(t,!0)}function a5(t){return new s5(t,!1)}var s5,o5=t(()=>{s5=class{static{me(this,"Bump")}constructor(t,e){this._context=t,this._x=e}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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}},me(i5,"bumpX"),me(a5,"bumpY")});function l5(){}var c5=t(()=>{me(l5,"default")});function h5(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function u5(t){this._context=t}function d5(t){return new u5(t)}var p5=t(()=>{me(h5,"point"),me(u5,"Basis"),u5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 3:h5(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:h5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(d5,"default")});function g5(t){this._context=t}function f5(t){return new g5(t)}var m5=t(()=>{c5(),p5(),me(g5,"BasisClosed"),g5.prototype={areaStart:l5,areaEnd:l5,lineStart:me(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:me(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:h5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(f5,"default")});function y5(t){this._context=t}function v5(t){return new y5(t)}var x5=t(()=>{p5(),me(y5,"BasisOpen"),y5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,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+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:h5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(v5,"default")});function b5(t,e){this._basis=new u5(t),this._beta=e}var w5,k5=t(()=>{p5(),me(b5,"Bundle"),b5.prototype={lineStart:me(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:me(function(){var t=this._x,e=this._y,r=t.length-1;if(0{me(T5,"point"),me(E5,"Cardinal"),E5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:T5(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:T5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},C5=me(function e(r){function t(t){return new E5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function S5(t,e){this._context=t,this._k=(1-e)/6}var A5,L5=t(()=>{c5(),_5(),me(S5,"CardinalClosed"),S5.prototype={areaStart:l5,areaEnd:l5,lineStart:me(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:me(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:T5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},A5=me(function e(r){function t(t){return new S5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function N5(t,e){this._context=t,this._k=(1-e)/6}var I5,R5=t(()=>{_5(),me(N5,"CardinalOpen"),N5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,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:T5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},I5=me(function e(r){function t(t){return new N5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function M5(t,e,r){var n,i,a=t._x1,s=t._y1,o=t._x2,l=t._y2;_4{N4(),_5(),me(M5,"point"),me(D5,"CatmullRom"),D5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(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:me(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:me(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,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(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:M5(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},O5=me(function e(r){function t(t){return r?new D5(t,r):new E5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function B5(t,e){this._context=t,this._alpha=e}var F5,$5=t(()=>{L5(),c5(),P5(),me(B5,"CatmullRomClosed"),B5.prototype={areaStart:l5,areaEnd:l5,lineStart:me(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:me(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:me(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,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=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:M5(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},F5=me(function e(r){function t(t){return r?new B5(t,r):new S5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function z5(t,e){this._context=t,this._alpha=e}var G5,U5=t(()=>{R5(),P5(),me(z5,"CatmullRomOpen"),z5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(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:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,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:M5(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},G5=me(function e(r){function t(t){return r?new z5(t,r):new N5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function q5(t){this._context=t}function j5(t){return new q5(t)}var W5=t(()=>{c5(),me(q5,"LinearClosed"),q5.prototype={areaStart:l5,areaEnd:l5,lineStart:me(function(){this._point=0},"lineStart"),lineEnd:me(function(){this._point&&this._context.closePath()},"lineEnd"),point:me(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")},me(j5,"default")});function Y5(t){return t<0?-1:1}function H5(t,e,r){var n=t._x1-t._x0,e=e-t._x1,i=(t._y1-t._y0)/(n||e<0&&-0),t=(i*e+(r=(r-t._y1)/(e||n<0&&-0))*n)/(n+e);return(Y5(i)+Y5(r))*Math.min(Math.abs(i),Math.abs(r),.5*Math.abs(t))||0}function V5(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function X5(t,e,r){var n=t._x0,i=t._x1,a=t._y1,s=(i-n)/3;t._context.bezierCurveTo(n+s,t._y0+s*e,i-s,a-s*r,i,a)}function K5(t){this._context=t}function Z5(t){this._context=new Q5(t)}function Q5(t){this._context=t}function J5(t){return new K5(t)}function t3(t){return new Z5(t)}var e3=t(()=>{me(Y5,"sign"),me(H5,"slope3"),me(V5,"slope2"),me(X5,"point"),me(K5,"MonotoneX"),K5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:X5(this,this._t0,V5(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,X5(this,V5(this,r=H5(this,t,e)),r);break;default:X5(this,this._t0,r=H5(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")},me(Z5,"MonotoneY"),(Z5.prototype=Object.create(K5.prototype)).point=function(t,e){K5.prototype.point.call(this,e,t)},me(Q5,"ReflectContext"),Q5.prototype={moveTo:me(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:me(function(){this._context.closePath()},"closePath"),lineTo:me(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:me(function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)},"bezierCurveTo")},me(J5,"monotoneX"),me(t3,"monotoneY")});function r3(t){this._context=t}function n3(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),s=new Array(n);for(a[i[0]=0]=2,s[0]=t[0]+2*t[1],e=1;e{me(r3,"Natural"),r3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:me(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var n=n3(t),i=n3(e),a=0,s=1;s{me(s3,"Step"),s3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:me(function(){0{G4(),Z4(),n5(),m5(),x5(),p5(),o5(),k5(),L5(),R5(),_5(),$5(),U5(),P5(),W5(),Y4(),e3(),a3(),h3()}),d3=t(()=>{}),p3=t(()=>{});function g3(t,e,r){this.k=t,this.x=e,this.y=r}function f3(t){for(;!t.__zoom;)if(!(t=t.parentNode))return m3;return t.__zoom}var m3,y3,v3,x3,b3,w3,k3,T3,E3,C3,_3,S3,A3,L3,N3,I3,R3,M3,D3,O3,P3,B3,F3,$3,z3,G3,U3,q3,j3,W3,Y3,H3,V3=t(()=>{me(g3,"Transform"),g3.prototype={constructor:g3,scale:me(function(t){return 1===t?this:new g3(this.k*t,this.x,this.y)},"scale"),translate:me(function(t,e){return 0===t&0===e?this:new g3(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:me(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:me(function(t){return t*this.k+this.x},"applyX"),applyY:me(function(t){return t*this.k+this.y},"applyY"),invert:me(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:me(function(t){return(t-this.x)/this.k},"invertX"),invertY:me(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:me(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:me(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:me(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},m3=new g3(1,0,0),f3.prototype=g3.prototype,me(f3,"transform")}),X3=t(()=>{}),K3=t(()=>{jy(),d3(),p3(),V3(),X3()}),Z3=t(()=>{K3(),V3()}),Q3=t(()=>{Ku(),hd(),e2(),d2(),v1(),p2(),g2(),wd(),pg(),f2(),Fy(),m2(),v2(),iv(),av(),sv(),vf(),u2(),ov(),y2(),lv(),c4(),g4(),dg(),u3(),Nx(),n4(),Uf(),jy(),Z3()}),J3=rPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|:)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}),tw=rPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var a=J3();function s(t){return-1{y3=tt(tw(),1),th(),v3=me((t,e)=>{var r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(var n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),x3=me((t,e)=>{e={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"},v3(t,e).lower()},"drawBackgroundRect"),b3=me((t,e)=>{var r=e.text.replace(kc," "),n=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),e.class&&t.attr("class",e.class),t.append("tspan"));return n.attr("x",e.x+2*e.textMargin),n.text(r),t},"drawText"),w3=me((t,e,r,n)=>{(t=t.append("image")).attr("x",e),t.attr("y",r),e=(0,y3.sanitizeUrl)(n),t.attr("xlink:href",e)},"drawImage"),k3=me((t,e,r,n)=>{(t=t.append("use")).attr("x",e),t.attr("y",r),e=(0,y3.sanitizeUrl)(n),t.attr("xlink:href","#"+e)},"drawEmbeddedImage"),T3=me(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),E3=me(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),rw=t(()=>{function e(t,e,r,n,i,a,s){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),s)}function l(t,e,r,n,i,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;t{let n=t.append("g"),i=0;for(var a of e){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());z3(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(),z3(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"),L3=me(function(t,e,r){let n=t.append("g"),i=e.bgColor||"none",a=e.borderColor||"#444444",s=e.fontColor||"black",o=e.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(_3(n,t={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,z3(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},l),e.type&&""!==e.type.text&&((l=r.boundaryFont()).fontColor=s,z3(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},l)),e.descr&&""!==e.descr.text&&((l=r.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=s,z3(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))},"drawBoundary"),N3=me(function(t,e,r){let n=e.bgColor||r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor||r[e.typeC4Shape.text+"_border_color"],a=e.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(e.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=t.append("g"),l=(o.attr("class","person-man"),T3());switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=n,l.width=e.width,l.height=e.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},_3(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",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.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",e.x).replaceAll("starty",e.y).replaceAll("half",e.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",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.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",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}switch(t=$3(r,e.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",t.fontFamily).attr("font-size",t.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":S3(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s)}let c=r[e.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,z3(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},c),(c=r[e.typeC4Shape.text+"Font"]()).fontColor=a,e.techn&&""!==e.techn?.text?z3(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},c):e.type&&""!==e.type.text&&z3(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},c),e.descr&&""!==e.descr.text&&((c=r.personFont()).fontColor=a,z3(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},c)),e.height},"drawC4Shape"),I3=me(function(t){t.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"),R3=me(function(t){t.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"),M3=me(function(t){t.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"),D3=me(function(t){t.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"),O3=me(function(t){t.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"),P3=me(function(t){t.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"),B3=me(function(t){t.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"),F3=me(function(t){(t=t.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"),t.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"),$3=me((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),me(e,"byText"),me(l,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),z3=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},G3={drawRect:_3,drawBoundary:L3,drawC4Shape:N3,drawRels:A3,drawImage:S3,insertArrowHead:D3,insertArrowEnd:O3,insertArrowFilledHead:P3,insertDynamicNumber:B3,insertArrowCrossHead:F3,insertDatabaseIcon:I3,insertComputerIcon:R3,insertClockIcon:M3}}),nw=t(()=>{U3="object"==typeof global&&global&&global.Object===Object&&global,q3=U3}),iw=t(()=>{nw(),j3="object"==typeof self&&self&&self.Object===Object&&self,j3=q3||j3||Function("return this")(),W3=j3}),aw=t(()=>{iw(),Y3=W3.Symbol,H3=Y3});function sw(t){var e=lw.call(t,hw),r=t[hw];try{var n=!(t[hw]=void 0)}catch{}var i=cw.call(t);return n&&(e?t[hw]=r:delete t[hw]),i}var ow,lw,cw,hw,uw,dw=t(()=>{aw(),ow=Object.prototype,lw=ow.hasOwnProperty,cw=ow.toString,hw=H3?H3.toStringTag:void 0,me(sw,"getRawTag"),uw=sw});function pw(t){return fw.call(t)}var gw,fw,mw,yw=t(()=>{gw=Object.prototype,fw=gw.toString,me(pw,"objectToString"),mw=pw});function vw(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(xw&&xw in Object(t)?uw:mw)(t)}var xw,bw,ww=t(()=>{aw(),dw(),yw(),xw=H3?H3.toStringTag:void 0,me(vw,"baseGetTag"),bw=vw});function kw(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var Tw,Ew=t(()=>{me(kw,"isObject"),Tw=kw});function Cw(t){return!!Tw(t)&&("[object Function]"==(t=bw(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var _w,Sw,Aw,Lw=t(()=>{ww(),Ew(),me(Cw,"isFunction"),_w=Cw}),Nw=t(()=>{iw(),Sw=W3["__core-js_shared__"],Aw=Sw});function Iw(t){return!!Rw&&Rw in t}var Rw,Mw,Dw=t(()=>{var t;Nw(),t=/[^.]+$/.exec(Aw&&Aw.keys&&Aw.keys.IE_PROTO||""),Rw=t?"Symbol(src)_1."+t:"",me(Iw,"isMasked"),Mw=Iw});function Ow(t){if(null!=t){try{return Bw.call(t)}catch{}try{return t+""}catch{}}return""}var Pw,Bw,Fw,$w=t(()=>{Pw=Function.prototype,Bw=Pw.toString,me(Ow,"toSource"),Fw=Ow});function zw(t){return!(!Tw(t)||Mw(t))&&(_w(t)?Ww:Uw).test(Fw(t))}var Gw,Uw,qw,jw,Ww,Yw,Hw=t(()=>{Lw(),Dw(),Ew(),$w(),Gw=/[\\^$.*+?()[\]{}|]/g,Uw=/^\[object .+?Constructor\]$/,qw=Function.prototype,jw=Object.prototype,qw=qw.toString,jw=jw.hasOwnProperty,Ww=RegExp("^"+qw.call(jw).replace(Gw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me(zw,"baseIsNative"),Yw=zw});function Vw(t,e){return t?.[e]}var Xw,Kw=t(()=>{me(Vw,"getValue"),Xw=Vw});function Zw(t,e){return t=Xw(t,e),Yw(t)?t:void 0}var Qw,Jw,t6,e6=t(()=>{Hw(),Kw(),me(Zw,"getNative"),Qw=Zw}),r6=t(()=>{e6(),Jw=Qw(Object,"create"),t6=Jw});function n6(){this.__data__=t6?t6(null):{},this.size=0}var i6,a6=t(()=>{r6(),me(n6,"hashClear"),i6=n6});function s6(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}var o6,l6=t(()=>{me(s6,"hashDelete"),o6=s6});function c6(t){var e,r=this.__data__;return t6?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:u6.call(r,t)?r[t]:void 0}var h6,u6,d6,p6=t(()=>{r6(),h6=Object.prototype,u6=h6.hasOwnProperty,me(c6,"hashGet"),d6=c6});function g6(t){var e=this.__data__;return t6?void 0!==e[t]:m6.call(e,t)}var f6,m6,y6,v6=t(()=>{r6(),f6=Object.prototype,m6=f6.hasOwnProperty,me(g6,"hashHas"),y6=g6});function x6(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=t6&&void 0===e?"__lodash_hash_undefined__":e,this}var b6,w6=t(()=>{r6(),me(x6,"hashSet"),b6=x6});function k6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{a6(),l6(),p6(),v6(),w6(),me(k6,"Hash"),k6.prototype.clear=i6,k6.prototype.delete=o6,k6.prototype.get=d6,k6.prototype.has=y6,k6.prototype.set=b6,T6=k6});function C6(){this.__data__=[],this.size=0}var _6,S6=t(()=>{me(C6,"listCacheClear"),_6=C6});function A6(t,e){return t===e||t!=t&&e!=e}var L6,N6=t(()=>{me(A6,"eq"),L6=A6});function I6(t,e){for(var r=t.length;r--;)if(L6(t[r][0],e))return r;return-1}var R6,M6=t(()=>{N6(),me(I6,"assocIndexOf"),R6=I6});function D6(t){var e=this.__data__;return!((t=R6(e,t))<0||(t==e.length-1?e.pop():P6.call(e,t,1),--this.size,0))}var O6,P6,B6,F6=t(()=>{M6(),O6=Array.prototype,P6=O6.splice,me(D6,"listCacheDelete"),B6=D6});function $6(t){var e=this.__data__;return(t=R6(e,t))<0?void 0:e[t][1]}var z6,G6=t(()=>{M6(),me($6,"listCacheGet"),z6=$6});function U6(t){return-1{M6(),me(U6,"listCacheHas"),q6=U6});function W6(t,e){var r=this.__data__,n=R6(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Y6,H6=t(()=>{M6(),me(W6,"listCacheSet"),Y6=W6});function V6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{S6(),F6(),G6(),j6(),H6(),me(V6,"ListCache"),V6.prototype.clear=_6,V6.prototype.delete=B6,V6.prototype.get=z6,V6.prototype.has=q6,V6.prototype.set=Y6,X6=V6}),J6=t(()=>{e6(),iw(),K6=Qw(W3,"Map"),Z6=K6});function tk(){this.size=0,this.__data__={hash:new T6,map:new(Z6||X6),string:new T6}}var ek,rk=t(()=>{E6(),Q6(),J6(),me(tk,"mapCacheClear"),ek=tk});function nk(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var ik,ak=t(()=>{me(nk,"isKeyable"),ik=nk});function sk(t,e){return t=t.__data__,ik(e)?t["string"==typeof e?"string":"hash"]:t.map}var ok,lk=t(()=>{ak(),me(sk,"getMapData"),ok=sk});function ck(t){return t=ok(this,t).delete(t),this.size-=t?1:0,t}var hk,uk=t(()=>{lk(),me(ck,"mapCacheDelete"),hk=ck});function dk(t){return ok(this,t).get(t)}var pk,gk=t(()=>{lk(),me(dk,"mapCacheGet"),pk=dk});function fk(t){return ok(this,t).has(t)}var mk,yk=t(()=>{lk(),me(fk,"mapCacheHas"),mk=fk});function vk(t,e){var r=ok(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var xk,bk=t(()=>{lk(),me(vk,"mapCacheSet"),xk=vk});function wk(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{rk(),uk(),gk(),yk(),bk(),me(wk,"MapCache"),wk.prototype.clear=ek,wk.prototype.delete=hk,wk.prototype.get=pk,wk.prototype.has=mk,wk.prototype.set=xk,kk=wk});function Ek(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(Ck);var a=me(function(){var t=arguments,e=i?i.apply(this,t):t[0],r=a.cache;return r.has(e)?r.get(e):(t=n.apply(this,t),a.cache=r.set(e,t)||r,t)},"memoized");return a.cache=new(Ek.Cache||kk),a}var Ck,_k,Sk=t(()=>{Tk(),Ck="Expected a function",me(Ek,"memoize"),Ek.Cache=kk,_k=Ek});function Ak(){this.__data__=new X6,this.size=0}var Lk,Nk=t(()=>{Q6(),me(Ak,"stackClear"),Lk=Ak});function Ik(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}var Rk,Mk=t(()=>{me(Ik,"stackDelete"),Rk=Ik});function Dk(t){return this.__data__.get(t)}var Ok,Pk=t(()=>{me(Dk,"stackGet"),Ok=Dk});function Bk(t){return this.__data__.has(t)}var Fk,$k=t(()=>{me(Bk,"stackHas"),Fk=Bk});function zk(t,e){var r=this.__data__;if(r instanceof X6){var n=r.__data__;if(!Z6||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new kk(n)}return r.set(t,e),this.size=r.size,this}var Gk,Uk=t(()=>{Q6(),J6(),Tk(),me(zk,"stackSet"),Gk=zk});function qk(t){t=this.__data__=new X6(t),this.size=t.size}var jk,Wk,Yk,Hk=t(()=>{Q6(),Nk(),Mk(),Pk(),$k(),Uk(),me(qk,"Stack"),qk.prototype.clear=Lk,qk.prototype.delete=Rk,qk.prototype.get=Ok,qk.prototype.has=Fk,qk.prototype.set=Gk,jk=qk}),Vk=t(()=>{e6(),Wk=(()=>{try{var t=Qw(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Yk=Wk});function Xk(t,e,r){"__proto__"==e&&Yk?Yk(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Kk,Zk=t(()=>{Vk(),me(Xk,"baseAssignValue"),Kk=Xk});function Qk(t,e,r){(void 0===r||L6(t[e],r))&&(void 0!==r||e in t)||Kk(t,e,r)}var Jk,tT=t(()=>{Zk(),N6(),me(Qk,"assignMergeValue"),Jk=Qk});function eT(l){return function(t,e,r){for(var n=-1,i=Object(t),a=r(t),s=a.length;s--;){var o=a[l?s:++n];if(!1===e(i[o],o,i))break}return t}}var rT,nT,iT,aT=t(()=>{me(eT,"createBaseFor"),rT=eT}),sT=t(()=>{aT(),nT=rT(),iT=nT});function oT(t,e){return e?t.slice():(e=t.length,e=hT?hT(e):new t.constructor(e),t.copy(e),e)}var lT,cT,hT,uT,dT,pT,gT=t(()=>{iw(),lT="object"==typeof exports&&exports&&!exports.nodeType&&exports,cT=(cT=lT&&"object"==typeof module&&module&&!module.nodeType&&module)&&cT.exports===lT?W3.Buffer:void 0,hT=cT?cT.allocUnsafe:void 0,me(oT,"cloneBuffer"),uT=oT}),fT=t(()=>{iw(),dT=W3.Uint8Array,pT=dT});function mT(t){var e=new t.constructor(t.byteLength);return new pT(e).set(new pT(t)),e}var yT,vT=t(()=>{fT(),me(mT,"cloneArrayBuffer"),yT=mT});function xT(t,e){return e=e?yT(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var bT,wT=t(()=>{vT(),me(xT,"cloneTypedArray"),bT=xT});function kT(t,e){var r=-1,n=t.length;for(e=e||Array(n);++r{me(kT,"copyArray"),TT=kT}),ST=t(()=>{function e(){}Ew(),ET=Object.create,me(e,"object"),CT=function(t){return Tw(t)?ET?ET(t):(e.prototype=t,t=new e,e.prototype=void 0,t):{}}});function AT(e,r){return function(t){return e(r(t))}}var LT,NT,IT,RT=t(()=>{me(AT,"overArg"),LT=AT}),MT=t(()=>{RT(),NT=LT(Object.getPrototypeOf,Object),IT=NT});function DT(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||OT)}var OT,PT,BT=t(()=>{OT=Object.prototype,me(DT,"isPrototype"),PT=DT});function FT(t){return"function"!=typeof t.constructor||PT(t)?{}:CT(IT(t))}var $T,zT=t(()=>{ST(),MT(),BT(),me(FT,"initCloneObject"),$T=FT});function GT(t){return null!=t&&"object"==typeof t}var UT,qT=t(()=>{me(GT,"isObjectLike"),UT=GT});function jT(t){return UT(t)&&"[object Arguments]"==bw(t)}var WT,YT,HT,VT,XT,KT,ZT,QT=t(()=>{ww(),qT(),me(jT,"baseIsArguments"),WT=jT}),JT=t(()=>{QT(),qT(),VT=Object.prototype,YT=VT.hasOwnProperty,HT=VT.propertyIsEnumerable,VT=WT(function(){return arguments}())?WT:function(t){return UT(t)&&YT.call(t,"callee")&&!HT.call(t,"callee")},XT=VT}),t7=t(()=>{KT=Array.isArray,ZT=KT});function e7(t){return"number"==typeof t&&-1{me(e7,"isLength"),r7=e7});function i7(t){return null!=t&&r7(t.length)&&!_w(t)}var a7,s7=t(()=>{Lw(),n7(),me(i7,"isArrayLike"),a7=i7});function o7(t){return UT(t)&&a7(t)}var l7,c7=t(()=>{s7(),qT(),me(o7,"isArrayLikeObject"),l7=o7});function h7(){return!1}var u7,d7,p7,g7,f7=t(()=>{me(h7,"stubFalse"),u7=h7}),m7=t(()=>{iw(),f7(),p7="object"==typeof exports&&exports&&!exports.nodeType&&exports,d7=(d7=p7&&"object"==typeof module&&module&&!module.nodeType&&module)&&d7.exports===p7?W3.Buffer:void 0,p7=d7?d7.isBuffer:void 0,g7=p7||u7});function y7(t){return!(!UT(t)||"[object Object]"!=bw(t))&&(null===(t=IT(t))||"function"==typeof(t=w7.call(t,"constructor")&&t.constructor)&&t instanceof t&&b7.call(t)==k7)}var v7,x7,b7,w7,k7,T7,E7=t(()=>{ww(),MT(),qT(),v7=Function.prototype,x7=Object.prototype,b7=v7.toString,w7=x7.hasOwnProperty,k7=b7.call(Object),me(y7,"isPlainObject"),T7=y7});function C7(t){return UT(t)&&r7(t.length)&&!!_7[bw(t)]}var _7,S7,A7=t(()=>{ww(),n7(),qT(),(_7={})["[object Float32Array]"]=_7["[object Float64Array]"]=_7["[object Int8Array]"]=_7["[object Int16Array]"]=_7["[object Int32Array]"]=_7["[object Uint8Array]"]=_7["[object Uint8ClampedArray]"]=_7["[object Uint16Array]"]=_7["[object Uint32Array]"]=!0,_7["[object Arguments]"]=_7["[object Array]"]=_7["[object ArrayBuffer]"]=_7["[object Boolean]"]=_7["[object DataView]"]=_7["[object Date]"]=_7["[object Error]"]=_7["[object Function]"]=_7["[object Map]"]=_7["[object Number]"]=_7["[object Object]"]=_7["[object RegExp]"]=_7["[object Set]"]=_7["[object String]"]=_7["[object WeakMap]"]=!1,me(C7,"baseIsTypedArray"),S7=C7});function L7(e){return function(t){return e(t)}}var N7,I7,R7,M7,D7,O7,P7,B7=t(()=>{me(L7,"baseUnary"),N7=L7}),F7=t(()=>{nw(),M7="object"==typeof exports&&exports&&!exports.nodeType&&exports,I7=M7&&"object"==typeof module&&module&&!module.nodeType&&module,M7=I7&&I7.exports===M7,R7=M7&&q3.process,M7=(()=>{try{return I7&&I7.require&&I7.require("util").types||R7&&R7.binding&&R7.binding("util")}catch{}})(),D7=M7}),$7=t(()=>{A7(),B7(),F7(),O7=(O7=D7&&D7.isTypedArray)?N7(O7):S7,P7=O7});function z7(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var G7,U7=t(()=>{me(z7,"safeGet"),G7=z7});function q7(t,e,r){var n=t[e];W7.call(t,e)&&L6(n,r)&&(void 0!==r||e in t)||Kk(t,e,r)}var j7,W7,Y7,H7=t(()=>{Zk(),N6(),j7=Object.prototype,W7=j7.hasOwnProperty,me(q7,"assignValue"),Y7=q7});function V7(t,e,r,n){var i=!r;r=r||{};for(var a=-1,s=e.length;++a{H7(),Zk(),me(V7,"copyObject"),X7=V7});function Z7(t,e){for(var r=-1,n=Array(t);++r{me(Z7,"baseTimes"),Q7=Z7});function t8(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&e8.test(t))&&-1{e8=/^(?:0|[1-9]\d*)$/,me(t8,"isIndex"),r8=t8});function i8(t,e){var r,n=ZT(t),i=!n&&XT(t),a=!n&&!i&&g7(t),s=!n&&!i&&!a&&P7(t),o=n||i||a||s,l=o?Q7(t.length,String):[],c=l.length;for(r in t)!e&&!s8.call(t,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||r8(r,c))||l.push(r);return l}var a8,s8,o8,l8=t(()=>{J7(),JT(),t7(),m7(),n8(),$7(),a8=Object.prototype,s8=a8.hasOwnProperty,me(i8,"arrayLikeKeys"),o8=i8});function c8(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}var h8,u8=t(()=>{me(c8,"nativeKeysIn"),h8=c8});function d8(t){if(!Tw(t))return h8(t);var e,r=PT(t),n=[];for(e in t)("constructor"!=e||!r&&g8.call(t,e))&&n.push(e);return n}var p8,g8,f8,m8=t(()=>{Ew(),BT(),u8(),p8=Object.prototype,g8=p8.hasOwnProperty,me(d8,"baseKeysIn"),f8=d8});function y8(t){return a7(t)?o8(t,!0):f8(t)}var v8,x8=t(()=>{l8(),m8(),s7(),me(y8,"keysIn"),v8=y8});function b8(t){return X7(t,v8(t))}var w8,k8=t(()=>{K7(),x8(),me(b8,"toPlainObject"),w8=b8});function T8(t,e,r,n,i,a,s){var o,l,c,h=G7(t,r),u=G7(e,r),d=s.get(u);d||((e=void 0===(d=a?a(h,u,r+"",t,e,s):void 0))&&(l=!(o=ZT(u))&&g7(u),c=!o&&!l&&P7(u),d=u,o||l||c?d=ZT(h)?h:l7(h)?TT(h):l?uT(u,!(e=!1)):c?bT(u,!(e=!1)):[]:T7(u)||XT(u)?XT(d=h)?d=w8(h):Tw(h)&&!_w(h)||(d=$T(u)):e=!1),e&&(s.set(u,d),i(d,u,n,a,s),s.delete(u))),Jk(t,r,d)}var E8,C8=t(()=>{tT(),gT(),wT(),_T(),zT(),JT(),t7(),c7(),m7(),Lw(),Ew(),E7(),$7(),U7(),k8(),me(T8,"baseMergeDeep"),E8=T8});function _8(n,i,a,s,o){n!==i&&iT(i,function(t,e){var r;o=o||new jk,Tw(t)?E8(n,i,e,a,_8,s,o):(r=s?s(G7(n,e),t,e+"",n,i,o):void 0,Jk(n,e,void 0===r?t:r))},v8)}var S8,A8=t(()=>{Hk(),tT(),sT(),C8(),Ew(),x8(),U7(),me(_8,"baseMerge"),S8=_8});function L8(t){return t}var N8,I8=t(()=>{me(L8,"identity"),N8=L8});function R8(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var M8,D8=t(()=>{me(R8,"apply"),M8=R8});function O8(a,s,o){return s=P8(void 0===s?a.length-1:s,0),function(){for(var t=arguments,e=-1,r=P8(t.length-s,0),n=Array(r);++e{D8(),P8=Math.max,me(O8,"overRest"),B8=O8});function $8(t){return function(){return t}}var z8,G8,U8=t(()=>{me($8,"constant"),z8=$8}),q8=t(()=>{U8(),Vk(),I8(),G8=Yk?function(t,e){return Yk(t,"toString",{configurable:!0,enumerable:!1,value:z8(e),writable:!0})}:N8});function j8(r){var n=0,i=0;return function(){var t=W8(),e=16-(t-i);if(i=t,0{W8=Date.now,me(j8,"shortOut"),Y8=j8}),K8=t(()=>{q8(),X8(),H8=Y8(G8),V8=H8});function Z8(t,e){return V8(B8(t,e,N8),t+"")}var Q8,J8=t(()=>{I8(),F8(),K8(),me(Z8,"baseRest"),Q8=Z8});function tE(t,e,r){var n;return!!Tw(r)&&!!("number"==(n=typeof e)?a7(r)&&r8(e,r.length):"string"==n&&e in r)&&L6(r[e],t)}var eE,rE=t(()=>{N6(),s7(),n8(),Ew(),me(tE,"isIterateeCall"),eE=tE});function nE(o){return Q8(function(t,e){var r=-1,n=e.length,i=1{J8(),rE(),me(nE,"createAssigner"),iE=nE}),lE=t(()=>{A8(),oE(),aE=iE(function(t,e,r){S8(t,e,r)}),sE=aE});function cE(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),EE[t]??e):e}function hE(t,e){if(t=t.trim())return"loose"!==e.securityLevel?(0,kE.sanitizeUrl)(t):t}function uE(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function dE(t){let e,r=0;t.forEach(t=>{r+=uE(t,e),e=t});var n=r/2;return RE(t,n)}function pE(t){return 1===t.length?t[0]:dE(t)}function gE(t,e,r){var r=structuredClone(r),n=(M.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse(),25+t),n=RE(r,n),t=10+.5*t,i=Math.atan2(r[0].y-n.y,r[0].x-n.x),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(i+Math.PI)*t+(r[0].x+n.x)/2,a.y=-Math.cos(i+Math.PI)*t+(r[0].y+n.y)/2):"end_right"===e?(a.x=Math.sin(i-Math.PI)*t+(r[0].x+n.x)/2-5,a.y=-Math.cos(i-Math.PI)*t+(r[0].y+n.y)/2-5):"end_left"===e?(a.x=Math.sin(i)*t+(r[0].x+n.x)/2-5,a.y=-Math.cos(i)*t+(r[0].y+n.y)/2-5):(a.x=Math.sin(i)*t+(r[0].x+n.x)/2,a.y=-Math.cos(i)*t+(r[0].y+n.y)/2),a}function fE(t){let e="",r="";for(var n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function mE(e){let r="",n="0123456789abcdef",i=n.length;for(let t=0;t{kE=tt(tw(),1),Q3(),th(),Ln(),e(),Ur(),jr(),Sk(),lE(),zr(),TE="​",EE={curveBasis:d5,curveBasisClosed:f5,curveBasisOpen:v5,curveBumpX:i5,curveBumpY:a5,curveBundle:w5,curveCardinalClosed:A5,curveCardinalOpen:I5,curveCardinal:C5,curveCatmullRomClosed:F5,curveCatmullRomOpen:G5,curveCatmullRom:O5,curveLinear:W4,curveLinearClosed:j5,curveMonotoneX:J5,curveMonotoneY:t3,curveNatural:i3,curveStep:o3,curveStepAfter:c3,curveStepBefore:l3},CE=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_E=me(function(t,e){var r,n=SE(t,/(?:init\b)|(?:initialize\b)/),i={};if(i=Array.isArray(n)?(r=n.map(t=>t.args),vr(r),ie(i,[...r])):n.args)return r=Zt(t,e),void 0!==i[n="config"]&&(i[r="flowchart-v2"===r?"flowchart":r]=i[n],delete i[n]),i},"detectInit"),SE=me(function(t,e=null){try{var r=new RegExp(`[%]{2}(?![{]${CE.source})(?=[}][%]{2}).* +`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),M.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:`+t);for(var n,i,a,s=[];null!==(n=Ht.exec(t));)n.index===Ht.lastIndex&&Ht.lastIndex++,(n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e))&&(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:t,args:null}:1===s.length?s[0]:s}catch(r){return M.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),AE=me(function(t){return t.replace(Ht,"")},"removeDirectives"),LE=me(function(t,e){for(var[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray"),me(cE,"interpolateToCurve"),me(hE,"formatUrl"),NE=me((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],a=window;for(let t=0;t(e=Math.pow(10,e),Math.round(t*e)/e),"roundNumber"),RE=me((t,e)=>{let r,n=e;for(var i of t){if(r){var a=uE(i,r);if(0===a)return r;if(a{M.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());var r=RE(e,25),t=t?10:5,n=Math.atan2(e[0].y-r.y,e[0].x-r.x),i={x:0,y:0};return i.x=Math.sin(n)*t+(e[0].x+r.x)/2,i.y=-Math.cos(n)*t+(e[0].y+r.y)/2,i},"calcCardinalityPosition"),me(gE,"calcTerminalLabelPosition"),me(fE,"getStylesFromArray"),DE=0,OE=me(()=>(DE++,"id-"+Math.random().toString(36).substr(2,12)+"-"+DE),"generateId"),me(mE,"makeRandomHex"),PE=me(t=>mE(t.length),"random"),BE=me(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"),FE=me(function(t,e){var r=e.text.replace(L.lineBreakRegex," "),[,n]=YE(e.fontSize);return(t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.style("text-anchor",e.anchor),t.style("font-family",e.fontFamily),t.style("font-size",n),t.style("font-weight",e.fontWeight),t.attr("fill",e.fill),void 0!==e.class&&t.attr("class",e.class),(n=t.append("tspan")).attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(r),t},"drawSimpleText"),$E=_k((t,s,o)=>{if(!t||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},o),L.lineBreakRegex.test(t)))return t;let l=t.split(" ").filter(Boolean),c=[],h="";return l.forEach((t,e)=>{var r,n,i=vE(t+" ",o),a=vE(h,o);h=s""!==t).join(o.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),zE=_k((t,n,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...t],o=[],l="";return s.forEach((t,e)=>{var r,t=""+l+t;l=vE(t,a)>=n?(e+=1,e=s.length===e,r=t+i,o.push(e?t:r),""):t}),{hyphenatedStrings:o,remainingWord:l}},(t,e,r="-",n)=>""+t+e+r+n.fontSize+n.fontWeight+n.fontFamily),me(yE,"calculateTextHeight"),me(vE,"calculateTextWidth"),GE=_k((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};var[,i]=YE(e),e=["sans-serif",r],a=t.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 e){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=BE();if(u.text=c||TE,0===(u=((u=FE(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]},(t,e)=>""+t+e.fontSize+e.fontWeight+e.fontFamily),UE=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{me(this,"InitIDGenerator")}},jE=me(function(t){return qE=qE||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),qE.innerHTML=t,unescape(qE.textContent)},"entityDecode"),me(xE,"isDetailedError"),WE=me((t,e,r,n)=>{var i;n&&(i=t.node()?.getBBox())&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),YE=me(t=>{var e;return"number"==typeof t?[t,t+"px"]:(e=parseInt(t??"",10),Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t])},"parseFontSize"),me(bE,"cleanAndMerge"),HE={assignWithDepth:ie,wrapLabel:$E,calculateTextHeight:yE,calculateTextWidth:vE,calculateTextDimensions:GE,cleanAndMerge:bE,detectInit:_E,detectDirective:SE,isSubstringInArray:LE,interpolateToCurve:cE,calcLabelPosition:pE,calcCardinalityPosition:ME,calcTerminalLabelPosition:gE,formatUrl:hE,getStylesFromArray:fE,generateId:OE,random:PE,runFunc:NE,entityDecode:jE,insertTitle:WE,parseFontSize:YE,InitIDGenerator:UE},VE=me(function(t){let e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){return t=t.substring(1,t.length-1),/^\+?\d+$/.test(t)?"fl°°"+t+"¶ß":"fl°"+t+"¶ß"})},"encodeEntities"),XE=me(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),KE=me((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||(n?n+"_":"")+t+`_${e}_`+r+(i?"_"+i:""),"getEdgeId"),me(wE,"handleUndefinedAttr")});function QE(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=$E(e[t].text,i,n),e[t].textLines=e[t].text.split(L.lineBreakRegex).length,e[t].width=i,e[t].height=yE(e[t].text,n);else{var a,s,r=e[t].text.split(L.lineBreakRegex);e[t].textLines=r.length,e[t].height=0,e[t].width=0;for(s of r)e[t].width=Math.max(vE(s,n),e[t].width),a=yE(s,n),e[t].height=e[t].height+a}}function JE(e,r,n,t,i){var a,s,o=new aC(i);o.data.widthLimit=n.data.widthLimit/Math.min(nC,t.length);for([a,s]of t.entries()){let t=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=t,t=s.image.Y+s.image.height);var l=s.wrap&&iC.wrap,c=lC(iC),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",QE("label",s,l,c,o.data.widthLimit),s.label.Y=t+8,t=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",QE("type",s,l,c=lC(iC),o.data.widthLimit),s.type.Y=t+5,t=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=lC(iC)).fontSize=c.fontSize-2,QE("descr",s,l,c,o.data.widthLimit),s.descr.Y=t+20,t=s.descr.Y+s.descr.height),c=0==a||a%nC==0?(l=n.data.startx+iC.diagramMarginX,n.data.stopy+iC.diagramMarginY+t):(l=o.data.stopx!==o.data.startx?o.data.stopx+iC.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&&uC(o,e,l,c),r=s.alias,0<(l=i.db.getBoundaries(r)).length&&JE(e,0,o,l,i),"global"!==s.alias&&hC(e,s,o),n.data.stopy=Math.max(o.data.stopy+iC.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+iC.c4ShapeMargin,n.data.stopx),tC=Math.max(tC,n.data.stopx),eC=Math.max(eC,n.data.stopy)}}var tC,eC,rC,nC,iC,aC,sC,oC,lC,cC,hC,uC,dC,pC,gC,fC,mC,yC,vC,xC,bC=t(()=>{Q3(),rw(),e(),qr(),th(),yu(),mu(),jr(),ZE(),eh(),eC=tC=0,rC=4,nC=2,ee.yy=gu,iC={},aC=class{static{me(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,sC(t.db.getConfig())}setData(t,e,r,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=n}updateVal(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,r=e+t.width,n=this.nextData.starty+2*t.margin,i=n+t.height;(e>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>rC)&&(e=this.nextData.startx+t.margin+iC.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,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",e,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(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},sC(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},sC=me(function(t){ie(iC,t),t.fontFamily&&(iC.personFontFamily=iC.systemFontFamily=iC.messageFontFamily=t.fontFamily),t.fontSize&&(iC.personFontSize=iC.systemFontSize=iC.messageFontSize=t.fontSize),t.fontWeight&&(iC.personFontWeight=iC.systemFontWeight=iC.messageFontWeight=t.fontWeight)},"setConf"),oC=me((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),lC=me(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),cC=me(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),me(QE,"calcC4ShapeTextWH"),hC=me(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=iC.c4ShapeMargin-35;var r=e.wrap&&iC.wrap,n=lC(iC),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",vE(e.label.text,n));QE("label",e,r,n,i),G3.drawBoundary(t,e,iC)},"drawBoundary"),uC=me(function(r,n,i,t){let a=0;for(var s of t){a=0;var o=i[s];switch((s=oC(iC,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=vE("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=iC.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&&iC.wrap,l=iC.width-2*iC.c4ShapePadding,c=oC(iC,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",QE("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+"]",QE("type",o,s,oC(iC,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+"]",QE("techn",o,s,oC(iC,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let t=a,e=o.label.width;o.descr&&""!==o.descr.text&&(QE("descr",o,s,oC(iC,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,e=Math.max(o.label.width,o.descr.width),t=a-5*o.descr.textLines),e+=iC.c4ShapePadding,o.width=Math.max(o.width||iC.width,e,iC.width),o.height=Math.max(o.height||iC.height,t,iC.height),o.margin=o.margin||iC.c4ShapeMargin,r.insert(o),G3.drawC4Shape(n,o,iC)}r.bumpLastMargin(iC.c4ShapeMargin)},"drawC4ShapeArray"),dC=class{static{me(this,"Point")}constructor(t,e){this.x=t,this.y=e}},pC=me(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,o=n+t.height/2,l=Math.abs(r-i),c=Math.abs(n-a),h=c/l,u=t.height/t.width,d=null;return n==a&&r{vC=me(t=>`.person { stroke: ${t.personBorder}; fill: ${t.personBkg}; } -`,"getStyles"),vC=yC}),wC={};lPt(wC,{diagram:()=>kC});var kC,TC=t(()=>{Ur(),mu(),xC(),bC(),kC={parser:ee,db:pu,renderer:mC,styles:vC,init:me(({c4:t,wrap:e})=>{mC.setConf(t),pu.setWrap(e)},"init")}});function EC(t){return"u"TC});var TC,EC=t(()=>{qr(),yu(),bC(),wC(),TC={parser:re,db:gu,renderer:yC,styles:xC,init:me(({c4:t,wrap:e})=>{yC.setConf(t),gu.setWrap(e)},"init")}});function CC(t){return"u">16&255),a.push(n>>8&255),a.push(255&n)),n=n<<6|i.indexOf(e.charAt(s));return 0==(t=r%4*6)?(a.push(n>>16&255),a.push(n>>8&255),a.push(255&n)):18==t?(a.push(n>>10&255),a.push(n>>2&255)):12==t&&a.push(n>>4&255),new Uint8Array(a)}function l_(t){for(var e,r="",i=0,n=t.length,a=US,s=0;s>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]),i=(i<<8)+t[s];return 0==(e=n%3)?r=(r=(r=(r+=a[i>>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]:2==e?r=(r=(r=(r+=a[i>>10&63])+a[i>>4&63])+a[i<<2&63])+a[64]:1==e&&(r=(r=(r=(r+=a[i>>2&63])+a[i<<4&63])+a[64])+a[64]),r}function c_(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function h_(t){if(null!==t)for(var e,r,i,n=[],a=t,s=0,o=a.length;s>10),56320+(t-65536&1023))}function __(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||ZS,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function S_(t,e){return(t={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart}).snippet=IS(t),new NS(e,t)}function A_(t,e){throw S_(t,e)}function L_(t,e){t.onWarning&&t.onWarning.call(null,S_(t,e))}function N_(t,e,r,i){var n,a,s,o;if(el&&(l=t.lineIndent),y_(u))c++;else{if(t.lineIndent>16&255),a.push(i>>8&255),a.push(255&i)),i=i<<6|n.indexOf(e.charAt(s));return 0==(t=r%4*6)?(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)):18==t?(a.push(i>>10&255),a.push(i>>2&255)):12==t&&a.push(i>>4&255),new Uint8Array(a)}function c_(t){for(var e,r="",n=0,i=t.length,a=qS,s=0;s>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]),n=(n<<8)+t[s];return 0==(e=i%3)?r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]:2==e?r=(r=(r=(r+=a[n>>10&63])+a[n>>4&63])+a[n<<2&63])+a[64]:1==e&&(r=(r=(r=(r+=a[n>>2&63])+a[n<<4&63])+a[64])+a[64]),r}function h_(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function u_(t){if(null!==t)for(var e,r,n,i=[],a=t,s=0,o=a.length;s>10),56320+(t-65536&1023))}function S_(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||QS,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function A_(t,e){return(t={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart}).snippet=RS(t),new IS(e,t)}function L_(t,e){throw A_(t,e)}function N_(t,e){t.onWarning&&t.onWarning.call(null,A_(t,e))}function I_(t,e,r,n){var i,a,s,o;if(el&&(l=t.lineIndent),v_(u))c++;else{if(t.lineIndente)&&0!==i)A_(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(s=t.line,o=t.lineStart,l=t.position),H_(t,e,rA,!0,n)&&(y?f=t.result:m=t.result),y||(R_(t,d,p,g,f,m,s,o,l),g=f=m=null),D_(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)A_(t,"bad indentation of a mapping entry");else if(t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&A_(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):A_(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function V_(t){var e,r,i,n,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(D_(t,!0,-1),n=t.input.charCodeAt(t.position),!(0{if(0===a.length)return n.quotingType===TA?'""':"''";if(!n.noCompatMode&&(-1!==wA.indexOf(a)||kA.test(a)))return n.quotingType===TA?'"'+a+'"':"'"+a+"'";var t=n.indent*Math.max(1,s),e=-1===n.lineWidth?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-t),r=o||-1=n.flowLevel;function i(t){return iS(n,t)}switch(me(i,"testAmbiguity"),dS(a,r,n.indent,e,i,n.quotingType,n.forceQuotes&&!o,l)){case EA:return a;case CA:return"'"+a.replace(/'/g,"''")+"'";case _A:return"|"+gS(a,n.indent)+fS(eS(a,t));case SA:return">"+gS(a,n.indent)+fS(eS(mS(a,e),t));case AA:return'"'+vS(a)+'"';default:throw new NS("impossible error: invalid scalar style")}})()}function gS(t,e){var e=uS(t)?String(e):"",r=t[t.length-1]===` +`);break}for(n?x_(u)?(h=!0,t.result+=NS.repeat(` +`,s?1+c:c)):h?(h=!1,t.result+=NS.repeat(` +`,c+1)):0===c?s&&(t.result+=" "):t.result+=NS.repeat(` +`,c):t.result+=NS.repeat(` +`,s?1+c:c),o=s=!0,c=0,r=t.position;!v_(u)&&0!==u;)u=t.input.charCodeAt(++t.position);I_(t,r,t.position,!1)}}return!0}function q_(t,e){var r,n,i=t.tag,a=t.anchor,s=[],o=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),n=t.input.charCodeAt(t.position);0!==n&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,L_(t,"tab characters must not be used in indentation")),45===n)&&b_(t.input.charCodeAt(t.position+1));)if(o=!0,t.position++,O_(t,!0,-1)&&t.lineIndent<=e)s.push(null),n=t.input.charCodeAt(t.position);else if(r=t.line,V_(t,e,rA,!1,!0),s.push(t.result),O_(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==n)L_(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(s=t.line,o=t.lineStart,l=t.position),V_(t,e,nA,!0,i)&&(y?f=t.result:m=t.result),y||(M_(t,d,p,g,f,m,s,o,l),g=f=m=null),O_(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)L_(t,"bad indentation of a mapping entry");else if(t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&L_(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):L_(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function X_(t){var e,r,n,i,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(O_(t,!0,-1),i=t.input.charCodeAt(t.position),!(0{if(0===a.length)return i.quotingType===EA?'""':"''";if(!i.noCompatMode&&(-1!==kA.indexOf(a)||TA.test(a)))return i.quotingType===EA?'"'+a+'"':"'"+a+"'";var t=i.indent*Math.max(1,s),e=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-t),r=o||-1=i.flowLevel;function n(t){return iS(i,t)}switch(me(n,"testAmbiguity"),pS(a,r,i.indent,e,n,i.quotingType,i.forceQuotes&&!o,l)){case CA:return a;case _A:return"'"+a.replace(/'/g,"''")+"'";case SA:return"|"+fS(a,i.indent)+mS(rS(a,t));case AA:return">"+fS(a,i.indent)+mS(rS(yS(a,e),t));case LA:return'"'+xS(a)+'"';default:throw new IS("impossible error: invalid scalar style")}})()}function fS(t,e){var e=dS(t)?String(e):"",r=t[t.length-1]===` `;return e+(!r||t[t.length-2]!==` `&&t!==` `?r?"":"-":"+")+` -`}function fS(t){return t[t.length-1]===` -`?t.slice(0,-1):t}function mS(t,e){for(var r,i=/(\n+)([^\n]*)/g,n=(r=-1!==(r=t.indexOf(` -`))?r:t.length,i.lastIndex=r,yS(t.slice(0,r),e)),a=t[0]===` -`||" "===t[0];o=i.exec(t);){var s=o[1],o=o[2],l=" "===o[0];n+=s+(a||l||""===o?"":` -`)+yS(o,e),a=l}return n}function yS(t,e){if(""===t||" "===t[0])return t;for(var r,i,n=/ [^ ]/g,a=0,s=0,o="";i=n.exec(t);)e<(i=i.index)-a&&(o+=` -`+t.slice(a,r=ae&&a tag resolver accepts not "'+a+'" style');i=n.represent[a](e,a)}t.dump=i}return!0}return!1}function ES(t,e,r,i,n,a,s){t.tag=null,t.dump=r,TS(t,r,!1)||TS(t,r,!0);var o,l,c=mA.call(t.dump),h=i,u=(i=i&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(o=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0",t.dump=r+" "+t.dump)}return!0}function CS(t,e){var r,i,n=[],a=[];for(_S(t,n,a),r=0,i=a.length;r{for(me(EC,"isNothing"),me(CC,"isObject"),me(_C,"toArray"),me(SC,"extend"),me(AC,"repeat"),me(LC,"isNegativeZero"),LS={isNothing:EC,isObject:CC,toArray:_C,repeat:AC,isNegativeZero:LC,extend:SC},me(NC,"formatError"),me(IC,"YAMLException$1"),((IC.prototype=Object.create(Error.prototype)).constructor=IC).prototype.toString=me(function(t){return this.name+": "+NC(this,t)},"toString"),NS=IC,me(RC,"getLine"),me(MC,"padStart"),me(DC,"makeSnippet"),IS=DC,RS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],MS=["scalar","sequence","mapping"],me(OC,"compileStyleAliases"),me(PC,"Type$1"),DS=PC,me(BC,"compileList"),me(FC,"compileMap"),me($C,"Schema$1"),$C.prototype.extend=me(function(t){var e=[],r=[];if(t instanceof DS)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new NS("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}return e.forEach(function(t){if(!(t instanceof DS))throw new NS("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new NS("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new NS("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof DS))throw new NS("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(t=Object.create($C.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=BC(t,"implicit"),t.compiledExplicit=BC(t,"explicit"),t.compiledTypeMap=FC(t.compiledImplicit,t.compiledExplicit),t},"extend"),BS=$C,fA=new DS("tag:yaml.org,2002:str",{kind:"scalar",construct:me(function(t){return null!==t?t:""},"construct")}),zS=new DS("tag:yaml.org,2002:seq",{kind:"sequence",construct:me(function(t){return null!==t?t:[]},"construct")}),GS=new DS("tag:yaml.org,2002:map",{kind:"mapping",construct:me(function(t){return null!==t?t:{}},"construct")}),BS=new BS({explicit:[fA,zS,GS]}),me(zC,"resolveYamlNull"),me(GC,"constructYamlNull"),me(UC,"isNull"),fA=new DS("tag:yaml.org,2002:null",{kind:"scalar",resolve:zC,construct:GC,predicate:UC,represent:{canonical:me(function(){return"~"},"canonical"),lowercase:me(function(){return"null"},"lowercase"),uppercase:me(function(){return"NULL"},"uppercase"),camelcase:me(function(){return"Null"},"camelcase"),empty:me(function(){return""},"empty")},defaultStyle:"lowercase"}),me(qC,"resolveYamlBoolean"),me(jC,"constructYamlBoolean"),me(WC,"isBoolean"),zS=new DS("tag:yaml.org,2002:bool",{kind:"scalar",resolve:qC,construct:jC,predicate:WC,represent:{lowercase:me(function(t){return t?"true":"false"},"lowercase"),uppercase:me(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:me(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),me(YC,"isHexCode"),me(HC,"isOctCode"),me(VC,"isDecCode"),me(XC,"resolveYamlInteger"),me(KC,"constructYamlInteger"),me(ZC,"isInteger"),GS=new DS("tag:yaml.org,2002:int",{kind:"scalar",resolve:XC,construct:KC,predicate:ZC,represent:{binary:me(function(t){return 0<=t?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:me(function(t){return 0<=t?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:me(function(t){return t.toString(10)},"decimal"),hexadecimal:me(function(t){return 0<=t?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),OS=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),me(QC,"resolveYamlFloat"),me(JC,"constructYamlFloat"),PS=/^[-+]?[0-9]+e/,me(t_,"representYamlFloat"),me(e_,"isFloat"),qS=new DS("tag:yaml.org,2002:float",{kind:"scalar",resolve:QC,construct:JC,predicate:e_,represent:t_,defaultStyle:"lowercase"}),BS=BS.extend({implicit:[fA,zS,GS,qS]}),fA=BS,FS=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),$S=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]))?))?$"),me(r_,"resolveYamlTimestamp"),me(i_,"constructYamlTimestamp"),me(n_,"representYamlTimestamp"),zS=new DS("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r_,construct:i_,instanceOf:Date,represent:n_}),me(a_,"resolveYamlMerge"),GS=new DS("tag:yaml.org,2002:merge",{kind:"scalar",resolve:a_}),US=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`,me(s_,"resolveYamlBinary"),me(o_,"constructYamlBinary"),me(l_,"representYamlBinary"),me(c_,"isBinary"),qS=new DS("tag:yaml.org,2002:binary",{kind:"scalar",resolve:s_,construct:o_,predicate:c_,represent:l_}),jS=Object.prototype.hasOwnProperty,WS=Object.prototype.toString,me(h_,"resolveYamlOmap"),me(u_,"constructYamlOmap"),YS=new DS("tag:yaml.org,2002:omap",{kind:"sequence",resolve:h_,construct:u_}),HS=Object.prototype.toString,me(d_,"resolveYamlPairs"),me(p_,"constructYamlPairs"),VS=new DS("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:d_,construct:p_}),XS=Object.prototype.hasOwnProperty,me(g_,"resolveYamlSet"),me(f_,"constructYamlSet"),KS=new DS("tag:yaml.org,2002:set",{kind:"mapping",resolve:g_,construct:f_}),ZS=fA.extend({implicit:[zS,GS],explicit:[qS,YS,VS,KS]}),QS=Object.prototype.hasOwnProperty,rA=4,iA=JS=1,nA=tA=2,aA=eA=3,sA=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oA=/[\x85\u2028\u2029]/,lA=/[,\[\]\{\}]/,cA=/^(?:!|!!|![a-z\-]+!)$/i,hA=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,me(m_,"_class"),me(y_,"is_EOL"),me(v_,"is_WHITE_SPACE"),me(x_,"is_WS_OR_EOL"),me(b_,"is_FLOW_INDICATOR"),me(w_,"fromHexCode"),me(k_,"escapedHexLen"),me(T_,"fromDecimalCode"),me(E_,"simpleEscapeSequence"),me(C_,"charFromCodepoint"),uA=new Array(256),dA=new Array(256),pA=0;pA<256;pA++)uA[pA]=E_(pA)?1:0,dA[pA]=E_(pA);me(__,"State$1"),me(S_,"generateError"),me(A_,"throwError"),me(L_,"throwWarning"),gA={YAML:me(function(t,e,r){var i,n;null!==t.version&&A_(t,"duplication of %YAML directive"),1!==r.length&&A_(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&A_(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),n=parseInt(n[2],10),1!==i&&A_(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,1!==n&&2!==n&&L_(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:me(function(t,e,r){var i;2!==r.length&&A_(t,"TAG directive accepts exactly two arguments"),i=r[1],cA.test(r=r[0])||A_(t,"ill-formed tag handle (first argument) of the TAG directive"),QS.call(t.tagMap,r)&&A_(t,'there is a previously declared suffix for "'+r+'" tag handle'),hA.test(i)||A_(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{A_(t,"tag prefix is malformed: "+i)}t.tagMap[r]=i},"handleTagDirective")},me(N_,"captureSegment"),me(I_,"mergeMappings"),me(R_,"storeMappingPair"),me(M_,"readLineBreak"),me(D_,"skipSeparationSpace"),me(O_,"testDocumentSeparator"),me(P_,"writeFoldedLines"),me(B_,"readPlainScalar"),me(F_,"readSingleQuotedScalar"),me($_,"readDoubleQuotedScalar"),me(z_,"readFlowCollection"),me(G_,"readBlockScalar"),me(U_,"readBlockSequence"),me(q_,"readBlockMapping"),me(j_,"readTagProperty"),me(W_,"readAnchorProperty"),me(Y_,"readAlias"),me(H_,"composeNode"),me(V_,"readDocument"),me(X_,"loadDocuments"),me(K_,"loadAll$1"),me(Z_,"load$1"),fA={loadAll:K_,load:Z_},mA=Object.prototype.toString,yA=Object.prototype.hasOwnProperty,vA=65279,xA=10,bA={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"},wA=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],kA=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,me(Q_,"compileStyleMap"),me(J_,"encodeHex"),TA=2,me(tS,"State"),me(eS,"indentString"),me(rS,"generateNextLine"),me(iS,"testImplicitResolving"),me(nS,"isWhitespace"),me(aS,"isPrintable"),me(sS,"isNsCharOrWhitespace"),me(oS,"isPlainSafe"),me(lS,"isPlainSafeFirst"),me(cS,"isPlainSafeLast"),me(hS,"codePointAt"),me(uS,"needIndentIndicator"),EA=1,CA=2,_A=3,SA=4,AA=5,me(dS,"chooseScalarStyle"),me(pS,"writeScalar"),me(gS,"blockHeader"),me(fS,"dropEndingNewline"),me(mS,"foldString"),me(yS,"foldLine"),me(vS,"escapeString"),me(xS,"writeFlowSequence"),me(bS,"writeBlockSequence"),me(wS,"writeFlowMapping"),me(kS,"writeBlockMapping"),me(TS,"detectType"),me(ES,"writeNode"),me(CS,"getDuplicateReferences"),me(_S,"inspectNode"),me(SS,"dump$1"),me(AS,"renamed"),LA=BS,NA=fA.load,AS("safeLoad","load"),AS("safeLoadAll","loadAll"),AS("safeDump","dump")});function RA(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function MA(t){qA=t}function DA(t,e=""){let i="string"==typeof t?t:t.source,n={replace:me((t,e)=>{let r="string"==typeof e?e:e.source;return r=r.replace(WA.caret,"$1"),i=i.replace(t,r),n},"replace"),getRegex:me(()=>new RegExp(i,e),"getRegex")};return n}function OA(t,e){if(e){if(WA.escapeTest.test(t))return t.replace(WA.escapeReplace,m9)}else if(WA.escapeTestNoEncode.test(t))return t.replace(WA.escapeReplaceNoEncode,m9);return t}function PA(t){try{t=encodeURI(t).replace(WA.percentDecode,"%")}catch{return null}return t}function BA(t,e){let r=t.replace(WA.findPipe,(t,e,r)=>{let i=!1,n=e;for(;0<=--n&&"\\"===r[n];)i=!i;return i?"|":" |"}),i=r.split(WA.splitPipe),n=0;if(i[0].trim()||i.shift(),0e)i.splice(e);else for(;i.length{var e=t.match(r.other.beginningSpace);return null!==e&&([e]=e,e.length>=i.length)?t.slice(i.length):t}).join(` -`)}function UA(t,e){return E9.parse(t,e)}var qA,jA,WA,YA,HA,VA,XA,KA,ZA,QA,JA,t9,e9,r9,i9,n9,a9,s9,o9,l9,c9,h9,u9,d9,p9,g9,f9,m9,y9,v9,x9,b9,w9,k9,T9,E9,C9=t(()=>{me(RA,"_getDefaults"),qA=RA(),me(MA,"changeDefaults"),jA={exec:me(()=>null,"exec")},me(DA,"edit"),WA={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:me(t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},ZA=/^(?:[ \t]*(?:\n|$))+/,QA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,VA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,r9=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,XA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,KA=/(?:[*+-]|\d{1,9}[.)])/,u9=DA(s9=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,KA).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(),s9=DA(s9).replace(/bull/g,KA).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(),c9=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,i9=/^[^\n]+/,o9=/(?!\s*\])(?:\\.|[^\[\]\\])+/,HA=DA(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",o9).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),KA=DA(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,KA).getRegex(),h9="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",a9=/|$))/,d9=DA("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",a9).replace("tag",h9).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),n9=DA(c9).replace("hr",r9).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",h9).getRegex(),YA={blockquote:DA(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",n9).getRegex(),code:QA,def:HA,fences:VA,heading:XA,hr:r9,html:d9,lheading:u9,list:KA,newline:ZA,paragraph:n9,table:jA,text:i9},QA=DA("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",r9).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",h9).getRegex(),HA={...YA,lheading:s9,table:QA,paragraph:DA(c9).replace("hr",r9).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",QA).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",h9).getRegex()},VA={...YA,html:DA(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",a9).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:jA,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:DA(c9).replace("hr",r9).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",u9).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},XA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,d9=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,KA=/^( {2,}|\\)\n(?!\s*$)/,ZA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,T9=DA(JA=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,n9).getRegex(),JA=DA(JA,"u").replace(/punct/g,h9).getRegex(),t9=DA(e9="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,s9).replace(/punctSpace/g,i9).replace(/punct/g,n9).getRegex(),e9=DA(e9,"gu").replace(/notPunctSpace/g,r9).replace(/punctSpace/g,c9).replace(/punct/g,h9).getRegex(),r9=DA("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,s9).replace(/punctSpace/g,i9).replace(/punct/g,n9).getRegex(),c9=DA(/\\(punct)/,"gu").replace(/punct/g,n9).getRegex(),h9=DA(/^<(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(),s9=DA(a9).replace("(?:--\x3e|$)","--\x3e").getRegex(),i9=DA("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",s9).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),n9=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,a9=DA(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",n9).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),s9=DA(/^!?\[(label)\]\[(ref)\]/).replace("label",n9).replace("ref",o9).getRegex(),o9=DA(/^!?\[(ref)\](?:\[\])?/).replace("ref",o9).getRegex(),l9=DA("reflink|nolink(?!\\()","g").replace("reflink",s9).replace("nolink",o9).getRegex(),h9={...c9={_backpedal:jA,anyPunctuation:c9,autolink:h9,blockSkip:u9,br:KA,code:d9,del:jA,emStrongLDelim:T9,emStrongRDelimAst:t9,emStrongRDelimUnd:r9,escape:XA,link:a9,nolink:o9,punctuation:QA,reflink:s9,reflinkSearch:l9,tag:i9,text:ZA,url:jA},link:DA(/^!?\[(label)\]\((.*?)\)/).replace("label",n9).getRegex(),reflink:DA(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n9).getRegex()},u9={...c9,emStrongRDelimAst:e9,emStrongLDelim:JA,url:DA(/^((?: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]*?(?:(?=[\\":">",'"':""","'":"'"},m9=me(t=>f9[t],"getEscapeReplacement"),me(OA,"escape"),me(PA,"cleanUrl"),me(BA,"splitCells"),me(FA,"rtrim"),me($A,"findClosingBracket"),me(zA,"outputLink"),me(GA,"indentCodeCompensation"),y9=class{static{me(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||qA}space(t){if((t=this.rules.block.newline.exec(t))&&0 tag resolver accepts not "'+a+'" style');n=i.represent[a](e,a)}t.dump=n}return!0}return!1}function CS(t,e,r,n,i,a,s){t.tag=null,t.dump=r,ES(t,r,!1)||ES(t,r,!0);var o,l,c=yA.call(t.dump),h=n,u=(n=n&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(o=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0",t.dump=r+" "+t.dump)}return!0}function _S(t,e){var r,n,i=[],a=[];for(SS(t,i,a),r=0,n=a.length;r{for(me(CC,"isNothing"),me(_C,"isObject"),me(SC,"toArray"),me(AC,"extend"),me(LC,"repeat"),me(NC,"isNegativeZero"),NS={isNothing:CC,isObject:_C,toArray:SC,repeat:LC,isNegativeZero:NC,extend:AC},me(IC,"formatError"),me(RC,"YAMLException$1"),((RC.prototype=Object.create(Error.prototype)).constructor=RC).prototype.toString=me(function(t){return this.name+": "+IC(this,t)},"toString"),IS=RC,me(MC,"getLine"),me(DC,"padStart"),me(OC,"makeSnippet"),RS=OC,MS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],DS=["scalar","sequence","mapping"],me(PC,"compileStyleAliases"),me(BC,"Type$1"),OS=BC,me(FC,"compileList"),me($C,"compileMap"),me(zC,"Schema$1"),zC.prototype.extend=me(function(t){var e=[],r=[];if(t instanceof OS)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new IS("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}return e.forEach(function(t){if(!(t instanceof OS))throw new IS("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new IS("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new IS("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof OS))throw new IS("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(t=Object.create(zC.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=FC(t,"implicit"),t.compiledExplicit=FC(t,"explicit"),t.compiledTypeMap=$C(t.compiledImplicit,t.compiledExplicit),t},"extend"),FS=zC,mA=new OS("tag:yaml.org,2002:str",{kind:"scalar",construct:me(function(t){return null!==t?t:""},"construct")}),GS=new OS("tag:yaml.org,2002:seq",{kind:"sequence",construct:me(function(t){return null!==t?t:[]},"construct")}),US=new OS("tag:yaml.org,2002:map",{kind:"mapping",construct:me(function(t){return null!==t?t:{}},"construct")}),FS=new FS({explicit:[mA,GS,US]}),me(GC,"resolveYamlNull"),me(UC,"constructYamlNull"),me(qC,"isNull"),mA=new OS("tag:yaml.org,2002:null",{kind:"scalar",resolve:GC,construct:UC,predicate:qC,represent:{canonical:me(function(){return"~"},"canonical"),lowercase:me(function(){return"null"},"lowercase"),uppercase:me(function(){return"NULL"},"uppercase"),camelcase:me(function(){return"Null"},"camelcase"),empty:me(function(){return""},"empty")},defaultStyle:"lowercase"}),me(jC,"resolveYamlBoolean"),me(WC,"constructYamlBoolean"),me(YC,"isBoolean"),GS=new OS("tag:yaml.org,2002:bool",{kind:"scalar",resolve:jC,construct:WC,predicate:YC,represent:{lowercase:me(function(t){return t?"true":"false"},"lowercase"),uppercase:me(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:me(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),me(HC,"isHexCode"),me(VC,"isOctCode"),me(XC,"isDecCode"),me(KC,"resolveYamlInteger"),me(ZC,"constructYamlInteger"),me(QC,"isInteger"),US=new OS("tag:yaml.org,2002:int",{kind:"scalar",resolve:KC,construct:ZC,predicate:QC,represent:{binary:me(function(t){return 0<=t?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:me(function(t){return 0<=t?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:me(function(t){return t.toString(10)},"decimal"),hexadecimal:me(function(t){return 0<=t?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),PS=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),me(JC,"resolveYamlFloat"),me(t_,"constructYamlFloat"),BS=/^[-+]?[0-9]+e/,me(e_,"representYamlFloat"),me(r_,"isFloat"),jS=new OS("tag:yaml.org,2002:float",{kind:"scalar",resolve:JC,construct:t_,predicate:r_,represent:e_,defaultStyle:"lowercase"}),FS=FS.extend({implicit:[mA,GS,US,jS]}),mA=FS,$S=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),zS=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]))?))?$"),me(n_,"resolveYamlTimestamp"),me(i_,"constructYamlTimestamp"),me(a_,"representYamlTimestamp"),GS=new OS("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n_,construct:i_,instanceOf:Date,represent:a_}),me(s_,"resolveYamlMerge"),US=new OS("tag:yaml.org,2002:merge",{kind:"scalar",resolve:s_}),qS=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`,me(o_,"resolveYamlBinary"),me(l_,"constructYamlBinary"),me(c_,"representYamlBinary"),me(h_,"isBinary"),jS=new OS("tag:yaml.org,2002:binary",{kind:"scalar",resolve:o_,construct:l_,predicate:h_,represent:c_}),WS=Object.prototype.hasOwnProperty,YS=Object.prototype.toString,me(u_,"resolveYamlOmap"),me(d_,"constructYamlOmap"),HS=new OS("tag:yaml.org,2002:omap",{kind:"sequence",resolve:u_,construct:d_}),VS=Object.prototype.toString,me(p_,"resolveYamlPairs"),me(g_,"constructYamlPairs"),XS=new OS("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:p_,construct:g_}),KS=Object.prototype.hasOwnProperty,me(f_,"resolveYamlSet"),me(m_,"constructYamlSet"),ZS=new OS("tag:yaml.org,2002:set",{kind:"mapping",resolve:f_,construct:m_}),QS=mA.extend({implicit:[GS,US],explicit:[jS,HS,XS,ZS]}),JS=Object.prototype.hasOwnProperty,nA=4,iA=tA=1,aA=eA=2,sA=rA=3,oA=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,lA=/[\x85\u2028\u2029]/,cA=/[,\[\]\{\}]/,hA=/^(?:!|!!|![a-z\-]+!)$/i,uA=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,me(y_,"_class"),me(v_,"is_EOL"),me(x_,"is_WHITE_SPACE"),me(b_,"is_WS_OR_EOL"),me(w_,"is_FLOW_INDICATOR"),me(k_,"fromHexCode"),me(T_,"escapedHexLen"),me(E_,"fromDecimalCode"),me(C_,"simpleEscapeSequence"),me(__,"charFromCodepoint"),dA=new Array(256),pA=new Array(256),gA=0;gA<256;gA++)dA[gA]=C_(gA)?1:0,pA[gA]=C_(gA);me(S_,"State$1"),me(A_,"generateError"),me(L_,"throwError"),me(N_,"throwWarning"),fA={YAML:me(function(t,e,r){var n,i;null!==t.version&&L_(t,"duplication of %YAML directive"),1!==r.length&&L_(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&L_(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&L_(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=i<2,1!==i&&2!==i&&N_(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:me(function(t,e,r){var n;2!==r.length&&L_(t,"TAG directive accepts exactly two arguments"),n=r[1],hA.test(r=r[0])||L_(t,"ill-formed tag handle (first argument) of the TAG directive"),JS.call(t.tagMap,r)&&L_(t,'there is a previously declared suffix for "'+r+'" tag handle'),uA.test(n)||L_(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{L_(t,"tag prefix is malformed: "+n)}t.tagMap[r]=n},"handleTagDirective")},me(I_,"captureSegment"),me(R_,"mergeMappings"),me(M_,"storeMappingPair"),me(D_,"readLineBreak"),me(O_,"skipSeparationSpace"),me(P_,"testDocumentSeparator"),me(B_,"writeFoldedLines"),me(F_,"readPlainScalar"),me($_,"readSingleQuotedScalar"),me(z_,"readDoubleQuotedScalar"),me(G_,"readFlowCollection"),me(U_,"readBlockScalar"),me(q_,"readBlockSequence"),me(j_,"readBlockMapping"),me(W_,"readTagProperty"),me(Y_,"readAnchorProperty"),me(H_,"readAlias"),me(V_,"composeNode"),me(X_,"readDocument"),me(K_,"loadDocuments"),me(Z_,"loadAll$1"),me(Q_,"load$1"),mA={loadAll:Z_,load:Q_},yA=Object.prototype.toString,vA=Object.prototype.hasOwnProperty,xA=65279,bA=10,wA={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"},kA=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],TA=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,me(J_,"compileStyleMap"),me(tS,"encodeHex"),EA=2,me(eS,"State"),me(rS,"indentString"),me(nS,"generateNextLine"),me(iS,"testImplicitResolving"),me(aS,"isWhitespace"),me(sS,"isPrintable"),me(oS,"isNsCharOrWhitespace"),me(lS,"isPlainSafe"),me(cS,"isPlainSafeFirst"),me(hS,"isPlainSafeLast"),me(uS,"codePointAt"),me(dS,"needIndentIndicator"),CA=1,_A=2,SA=3,AA=4,LA=5,me(pS,"chooseScalarStyle"),me(gS,"writeScalar"),me(fS,"blockHeader"),me(mS,"dropEndingNewline"),me(yS,"foldString"),me(vS,"foldLine"),me(xS,"escapeString"),me(bS,"writeFlowSequence"),me(wS,"writeBlockSequence"),me(kS,"writeFlowMapping"),me(TS,"writeBlockMapping"),me(ES,"detectType"),me(CS,"writeNode"),me(_S,"getDuplicateReferences"),me(SS,"inspectNode"),me(AS,"dump$1"),me(LS,"renamed"),NA=FS,IA=mA.load,LS("safeLoad","load"),LS("safeLoadAll","loadAll"),LS("safeDump","dump")});function MA(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function DA(t){jA=t}function OA(t,e=""){let n="string"==typeof t?t:t.source,i={replace:me((t,e)=>{let r="string"==typeof e?e:e.source;return r=r.replace(YA.caret,"$1"),n=n.replace(t,r),i},"replace"),getRegex:me(()=>new RegExp(n,e),"getRegex")};return i}function PA(t,e){if(e){if(YA.escapeTest.test(t))return t.replace(YA.escapeReplace,y9)}else if(YA.escapeTestNoEncode.test(t))return t.replace(YA.escapeReplaceNoEncode,y9);return t}function BA(t){try{t=encodeURI(t).replace(YA.percentDecode,"%")}catch{return null}return t}function FA(t,e){let r=t.replace(YA.findPipe,(t,e,r)=>{let n=!1,i=e;for(;0<=--i&&"\\"===r[i];)n=!n;return n?"|":" |"}),n=r.split(YA.splitPipe),i=0;if(n[0].trim()||n.shift(),0e)n.splice(e);else for(;n.length{var e=t.match(r.other.beginningSpace);return null!==e&&([e]=e,e.length>=n.length)?t.slice(n.length):t}).join(` +`)}function qA(t,e){return C9.parse(t,e)}var jA,WA,YA,HA,VA,XA,KA,ZA,QA,JA,t9,e9,r9,n9,i9,a9,s9,o9,l9,c9,h9,u9,d9,p9,g9,f9,m9,y9,v9,x9,b9,w9,k9,T9,E9,C9,_9=t(()=>{me(MA,"_getDefaults"),jA=MA(),me(DA,"changeDefaults"),WA={exec:me(()=>null,"exec")},me(OA,"edit"),YA={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:me(t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},QA=/^(?:[ \t]*(?:\n|$))+/,JA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,XA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,n9=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,KA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ZA=/(?:[*+-]|\d{1,9}[.)])/,d9=OA(o9=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ZA).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(),o9=OA(o9).replace(/bull/g,ZA).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(),h9=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,i9=/^[^\n]+/,l9=/(?!\s*\])(?:\\.|[^\[\]\\])+/,VA=OA(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",l9).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ZA=OA(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ZA).getRegex(),u9="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",s9=/|$))/,p9=OA("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",s9).replace("tag",u9).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a9=OA(h9).replace("hr",n9).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",u9).getRegex(),HA={blockquote:OA(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",a9).getRegex(),code:JA,def:VA,fences:XA,heading:KA,hr:n9,html:p9,lheading:d9,list:ZA,newline:QA,paragraph:a9,table:WA,text:i9},JA=OA("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",n9).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",u9).getRegex(),VA={...HA,lheading:o9,table:JA,paragraph:OA(h9).replace("hr",n9).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",JA).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",u9).getRegex()},XA={...HA,html:OA(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",s9).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:WA,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:OA(h9).replace("hr",n9).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",d9).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},KA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,p9=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ZA=/^( {2,}|\\)\n(?!\s*$)/,QA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,E9=OA(t9=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,a9).getRegex(),t9=OA(t9,"u").replace(/punct/g,u9).getRegex(),e9=OA(r9="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,o9).replace(/punctSpace/g,i9).replace(/punct/g,a9).getRegex(),r9=OA(r9,"gu").replace(/notPunctSpace/g,n9).replace(/punctSpace/g,h9).replace(/punct/g,u9).getRegex(),n9=OA("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,o9).replace(/punctSpace/g,i9).replace(/punct/g,a9).getRegex(),h9=OA(/\\(punct)/,"gu").replace(/punct/g,a9).getRegex(),u9=OA(/^<(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(),o9=OA(s9).replace("(?:--\x3e|$)","--\x3e").getRegex(),i9=OA("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",o9).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),a9=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,s9=OA(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",a9).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),o9=OA(/^!?\[(label)\]\[(ref)\]/).replace("label",a9).replace("ref",l9).getRegex(),l9=OA(/^!?\[(ref)\](?:\[\])?/).replace("ref",l9).getRegex(),c9=OA("reflink|nolink(?!\\()","g").replace("reflink",o9).replace("nolink",l9).getRegex(),u9={...h9={_backpedal:WA,anyPunctuation:h9,autolink:u9,blockSkip:d9,br:ZA,code:p9,del:WA,emStrongLDelim:E9,emStrongRDelimAst:e9,emStrongRDelimUnd:n9,escape:KA,link:s9,nolink:l9,punctuation:JA,reflink:o9,reflinkSearch:c9,tag:i9,text:QA,url:WA},link:OA(/^!?\[(label)\]\((.*?)\)/).replace("label",a9).getRegex(),reflink:OA(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",a9).getRegex()},d9={...h9,emStrongRDelimAst:r9,emStrongLDelim:t9,url:OA(/^((?: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]*?(?:(?=[\\":">",'"':""","'":"'"},y9=me(t=>m9[t],"getEscapeReplacement"),me(PA,"escape"),me(BA,"cleanUrl"),me(FA,"splitCells"),me($A,"rtrim"),me(zA,"findClosingBracket"),me(GA,"outputLink"),me(UA,"indentCodeCompensation"),v9=class{static{me(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||jA}space(t){if((t=this.rules.block.newline.exec(t))&&0" ".repeat(3*t.length)),n=d.split(` -`,1)[0],a=!i.trim(),s=0;if(this.options.pedantic?(s=2,r=i.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(this.rules.other.nonSpaceChar))?1:s,r=i.slice(s),s+=p[1].length),a&&this.rules.other.blankLine.test(n)&&(e+=n+` -`,d=d.substring(n.length+1),t=!0),!t)for(var g=this.rules.other.nextBulletRegex(s),f=this.rules.other.hrRegex(s),m=this.rules.other.fencesBeginRegex(s),y=this.rules.other.headingBeginRegex(s),v=this.rules.other.htmlBeginRegex(s);d;){var x,b=d.split(` -`,1)[0];if(n=b,x=this.options.pedantic?n=n.replace(this.rules.other.listReplaceNesting," "):n.replace(this.rules.other.tabCharGlobal," "),m.test(n)||y.test(n)||v.test(n)||g.test(n)||f.test(n))break;if(x.search(this.rules.other.nonSpaceChar)>=s||!n.trim())r+=` -`+x.slice(s);else{if(a||4<=i.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)||m.test(i)||y.test(i)||f.test(i))break;r+=` -`+n}a||n.trim()||(a=!0),e+=b+` -`,d=d.substring(b.length+1),i=x.slice(s)}c.loose||(u?c.loose=!0:this.rules.other.doubleBlankLine.test(e)&&(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:e,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=e}var r,i=c.items.at(-1);if(i){i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd(),c.raw=c.raw.trimEnd();for(let t=0;t"space"===t.type)).length&&r.some(t=>this.rules.other.anyLine.test(t.raw)),c.loose=r);if(c.loose)for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:i.align[e]})));return i}}}lheading(t){if(t=this.rules.block.lheading.exec(t))return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(t){var e;if(t=this.rules.block.paragraph.exec(t))return e=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(t){if(t=this.rules.block.text.exec(t))return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(t){if(t=this.rules.inline.escape.exec(t))return{type:"escape",raw:t[0],text:t[1]}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var i,n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;var a=FA(n.slice(0,-1),"\\");if((n.length-a.length)%2==0)return}else-1<(a=$A(r[2],"()"))&&(i=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,i).trim(),r[3]="");let t=r[2],e="";return this.options.pedantic?(a=this.rules.other.pedanticHrefTitle.exec(t))&&(t=a[1],e=a[3]):e=r[3]?r[3].slice(1,-1):"",t=t.trim(),zA(r,{href:(t=this.rules.other.startAngleBracket.test(t)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?t.slice(1):t.slice(1,-1):t)&&t.replace(this.rules.inline.anyPunctuation,"$1"),title:e&&e.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,e){var r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t))return(t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()])?zA(r,t,r[0],this.lexer,this.rules):{type:"text",raw:e=r[0].charAt(0),text:e}}emStrong(s,o,t=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!l[1]&&!l[2]||!t||this.rules.inline.punctuation.exec(t))){let t=[...l[0]].length-1,e,r,i=t,n=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,o=o.slice(-1*s.length+t);null!=(l=a.exec(o));){var c,h;if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...e].length,l[3]||l[4])i+=r;else if((l[5]||l[6])&&t%3&&!((t+r)%3))n+=r;else if(!(0<(i-=r)))return r=Math.min(r,r+i+n),c=[...l[0]][0].length,c=s.slice(0,t+l.index+c+r),Math.min(t,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(i){if(i=this.rules.inline.code.exec(i)){let t=i[2].replace(this.rules.other.newLineCharGlobal," "),e=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return e&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:i[0],text:t}}}br(t){if(t=this.rules.inline.br.exec(t))return{type:"br",raw:t[0]}}del(t){if(t=this.rules.inline.del.exec(t))return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let t,e;return e="@"===r[2]?"mailto:"+(t=r[1]):t=r[1],{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var r,i;if(r=this.rules.inline.url.exec(t)){let t,e;if("@"===r[2])t=r[0],e="mailto:"+t;else{for(;i=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",i!==r[0];);t=r[0],e="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){var e;if(t=this.rules.inline.text.exec(t))return e=this.lexer.state.inRawBlock,{type:"text",raw:t[0],text:t[0],escaped:e}}},v9=class r{static{me(this,"_Lexer")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||qA,this.options.tokenizer=this.options.tokenizer||new y9,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},t={other:WA,block:p9.normal,inline:g9.normal},this.options.pedantic?(t.block=p9.pedantic,t.inline=g9.pedantic):this.options.gfm&&(t.block=p9.gfm,this.options.breaks?t.inline=g9.breaks:t.inline=g9.gfm),this.tokenizer.rules=t}static get rules(){return{block:p9,inline:g9}}static lex(t,e){return new r(e).lex(t)}static lexInline(t,e){return new r(e).inlineTokens(t)}lex(t){t=t.replace(WA.carriageReturn,` -`),this.blockTokens(t,this.tokens);for(let t=0;t!!(e=t.call({lexer:this},n,r))&&(n=n.substring(e.raw.length),r.push(e),!0)))if(e=this.tokenizer.space(n)){n=n.substring(e.raw.length);var t=r.at(-1);1===e.raw.length&&void 0!==t?t.raw+=` -`:r.push(e)}else if(e=this.tokenizer.code(n))n=n.substring(e.raw.length),"paragraph"===(t=r.at(-1))?.type||"text"===t?.type?(t.raw+=` +`+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 t=p[1].trim(),e=1" ".repeat(3*t.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)&&(e+=i+` +`,d=d.substring(i.length+1),t=!0),!t)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),e+=b+` +`,d=d.substring(b.length+1),n=x.slice(s)}c.loose||(u?c.loose=!0:this.rules.other.doubleBlankLine.test(e)&&(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:e,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=e}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 t=0;t"space"===t.type)).length&&r.some(t=>this.rules.other.anyLine.test(t.raw)),c.loose=r);if(c.loose)for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]})));return n}}}lheading(t){if(t=this.rules.block.lheading.exec(t))return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(t){var e;if(t=this.rules.block.paragraph.exec(t))return e=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(t){if(t=this.rules.block.text.exec(t))return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(t){if(t=this.rules.inline.escape.exec(t))return{type:"escape",raw:t[0],text:t[1]}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(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=$A(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else-1<(a=zA(r[2],"()"))&&(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 t=r[2],e="";return this.options.pedantic?(a=this.rules.other.pedanticHrefTitle.exec(t))&&(t=a[1],e=a[3]):e=r[3]?r[3].slice(1,-1):"",t=t.trim(),GA(r,{href:(t=this.rules.other.startAngleBracket.test(t)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?t.slice(1):t.slice(1,-1):t)&&t.replace(this.rules.inline.anyPunctuation,"$1"),title:e&&e.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,e){var r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t))return(t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()])?GA(r,t,r[0],this.lexer,this.rules):{type:"text",raw:e=r[0].charAt(0),text:e}}emStrong(s,o,t=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!l[1]&&!l[2]||!t||this.rules.inline.punctuation.exec(t))){let t=[...l[0]].length-1,e,r,n=t,i=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,o=o.slice(-1*s.length+t);null!=(l=a.exec(o));){var c,h;if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...e].length,l[3]||l[4])n+=r;else if((l[5]||l[6])&&t%3&&!((t+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,t+l.index+c+r),Math.min(t,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 t=n[2].replace(this.rules.other.newLineCharGlobal," "),e=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return e&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:n[0],text:t}}}br(t){if(t=this.rules.inline.br.exec(t))return{type:"br",raw:t[0]}}del(t){if(t=this.rules.inline.del.exec(t))return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let t,e;return e="@"===r[2]?"mailto:"+(t=r[1]):t=r[1],{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var r,n;if(r=this.rules.inline.url.exec(t)){let t,e;if("@"===r[2])t=r[0],e="mailto:"+t;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==r[0];);t=r[0],e="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){var e;if(t=this.rules.inline.text.exec(t))return e=this.lexer.state.inRawBlock,{type:"text",raw:t[0],text:t[0],escaped:e}}},x9=class r{static{me(this,"_Lexer")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||jA,this.options.tokenizer=this.options.tokenizer||new v9,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},t={other:YA,block:g9.normal,inline:f9.normal},this.options.pedantic?(t.block=g9.pedantic,t.inline=f9.pedantic):this.options.gfm&&(t.block=g9.gfm,this.options.breaks?t.inline=f9.breaks:t.inline=f9.gfm),this.tokenizer.rules=t}static get rules(){return{block:g9,inline:f9}}static lex(t,e){return new r(e).lex(t)}static lexInline(t,e){return new r(e).inlineTokens(t)}lex(t){t=t.replace(YA.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let t=0;t!!(e=t.call({lexer:this},i,r))&&(i=i.substring(e.raw.length),r.push(e),!0)))if(e=this.tokenizer.space(i)){i=i.substring(e.raw.length);var t=r.at(-1);1===e.raw.length&&void 0!==t?t.raw+=` +`:r.push(e)}else if(e=this.tokenizer.code(i))i=i.substring(e.raw.length),"paragraph"===(t=r.at(-1))?.type||"text"===t?.type?(t.raw+=` `+e.raw,t.text+=` -`+e.text,this.inlineQueue.at(-1).src=t.text):r.push(e);else if(e=this.tokenizer.fences(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.heading(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.hr(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.blockquote(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.list(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.html(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.def(n)){n=n.substring(e.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=` +`+e.text,this.inlineQueue.at(-1).src=t.text):r.push(e);else if(e=this.tokenizer.fences(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.heading(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.hr(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.blockquote(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.list(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.html(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.def(i)){i=i.substring(e.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=` `+e.raw,a.text+=` -`+e.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title})}else if(e=this.tokenizer.table(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.lheading(n))n=n.substring(e.raw.length),r.push(e);else{let t=n;if(this.options.extensions?.startBlock){let e=1/0,r=n.slice(1),i;this.options.extensions.startBlock.forEach(t=>{"number"==typeof(i=t.call({lexer:this},r))&&0<=i&&(e=Math.min(e,i))}),e<1/0&&0<=e&&(t=n.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(t)))a=r.at(-1),i&&"paragraph"===a?.type?(a.raw+=` +`+e.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title})}else if(e=this.tokenizer.table(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.lheading(i))i=i.substring(e.raw.length),r.push(e);else{let t=i;if(this.options.extensions?.startBlock){let e=1/0,r=i.slice(1),n;this.options.extensions.startBlock.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(t=i.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(t)))a=r.at(-1),n&&"paragraph"===a?.type?(a.raw+=` `+e.raw,a.text+=` -`+e.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(e),i=t.length!==n.length,n=n.substring(e.raw.length);else if(e=this.tokenizer.text(n)){n=n.substring(e.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=` +`+e.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(e),n=t.length!==i.length,i=i.substring(e.raw.length);else if(e=this.tokenizer.text(i)){i=i.substring(e.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=` `+e.raw,s.text+=` -`+e.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(e)}else if(n){if(s="Infinite loop on byte: "+n.charCodeAt(0),this.options.silent){console.error(s);break}throw new Error(s)}}}return this.state.top=!0,r}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(n,r=[]){let t=n,e=null;if(this.tokens.links){var i=Object.keys(this.tokens.links);if(0!!(e=t.call({lexer:this},n,r))&&(n=n.substring(e.raw.length),r.push(e),!0)))if(e=this.tokenizer.escape(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.tag(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.link(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(e.raw.length);var o=r.at(-1);"text"===e.type&&"text"===o?.type?(o.raw+=e.raw,o.text+=e.text):r.push(e)}else if(e=this.tokenizer.emStrong(n,t,s))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.codespan(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.br(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.del(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.autolink(n))n=n.substring(e.raw.length),r.push(e);else if(!this.state.inLink&&(e=this.tokenizer.url(n)))n=n.substring(e.raw.length),r.push(e);else{let t=n;if(this.options.extensions?.startInline){let e=1/0,r=n.slice(1),i;this.options.extensions.startInline.forEach(t=>{"number"==typeof(i=t.call({lexer:this},r))&&0<=i&&(e=Math.min(e,i))}),e<1/0&&0<=e&&(t=n.substring(0,e+1))}if(e=this.tokenizer.inlineText(t))n=n.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(s=e.raw.slice(-1)),a=!0,"text"===(o=r.at(-1))?.type?(o.raw+=e.raw,o.text+=e.text):r.push(e);else if(n){var l="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}}return r}},x9=class{static{me(this,"_Renderer")}options;parser;constructor(t){this.options=t||qA}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(WA.notSpaceStart)?.[0],t=t.replace(WA.endingNewline,"")+` -`,e?'
'+(r?t:OA(t,!0))+`
-`:"
"+(r?t:OA(t,!0))+`
+`+e.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(e)}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(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(i,r=[]){let t=i,e=null;if(this.tokens.links){var n=Object.keys(this.tokens.links);if(0!!(e=t.call({lexer:this},i,r))&&(i=i.substring(e.raw.length),r.push(e),!0)))if(e=this.tokenizer.escape(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.tag(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.link(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(e.raw.length);var o=r.at(-1);"text"===e.type&&"text"===o?.type?(o.raw+=e.raw,o.text+=e.text):r.push(e)}else if(e=this.tokenizer.emStrong(i,t,s))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.codespan(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.br(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.del(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.autolink(i))i=i.substring(e.raw.length),r.push(e);else if(!this.state.inLink&&(e=this.tokenizer.url(i)))i=i.substring(e.raw.length),r.push(e);else{let t=i;if(this.options.extensions?.startInline){let e=1/0,r=i.slice(1),n;this.options.extensions.startInline.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(t=i.substring(0,e+1))}if(e=this.tokenizer.inlineText(t))i=i.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(s=e.raw.slice(-1)),a=!0,"text"===(o=r.at(-1))?.type?(o.raw+=e.raw,o.text+=e.text):r.push(e);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}},b9=class{static{me(this,"_Renderer")}options;parser;constructor(t){this.options=t||jA}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(YA.notSpaceStart)?.[0],t=t.replace(YA.endingNewline,"")+` +`,e?'
'+(r?t:PA(t,!0))+`
+`:"
"+(r?t:PA(t,!0))+`
`}blockquote({tokens:t}){return`
${this.parser.parse(t)}
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} `}hr(t){return`
-`}list(e){let t=e.ordered,r=e.start,i="";for(let t=0;t -`+i+" -`}listitem(t){let e="",r;return t.task&&(r=this.checkbox({checked:!!t.checked}),t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&0${e+=this.parser.parse(t.tokens,!!t.loose)} +`}list(e){let t=e.ordered,r=e.start,n="";for(let t=0;t +`+n+" +`}listitem(t){let e="",r;return t.task&&(r=this.checkbox({checked:!!t.checked}),t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&0${e+=this.parser.parse(t.tokens,!!t.loose)} `}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

${this.parser.parseInline(t)}

-`}table(e){let t="",r="";for(let t=0;t +`}table(e){let t="",r="";for(let t=0;t `+t+` -`+(i=i&&`${i}`)+` +`+(n=n&&`${n}`)+` `}tablerow({text:t}){return` ${t} `}tablecell(t){var e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+` -`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${OA(t,!0)}`}br(t){return"
"}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){var r=this.parser.parseInline(r),i=PA(t);if(null===i)return r;let n='
"}image({href:t,title:e,text:r}){var i=PA(t);if(null===i)return OA(r);let n=`${r}{t=e[t].flat(1/0),i=i.concat(this.walkTokens(t,r))}):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,r)))}}return i}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{var t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let r=n.renderers[i.name];r?n.renderers[i.name]=function(...t){var e=i.renderer.apply(this,t);return!1===e?r.apply(this,t):e}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||"block"!==i.level&&"inline"!==i.level)throw new Error("extension level must be 'block' or 'inline'");var t=n[i.level];t?t.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&("block"===i.level?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:"inline"===i.level&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),t.extensions=n),e.renderer){let n=this.defaults.renderer||new x9(this.defaults);for(var a in e.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(!["options","parser"].includes(a)){let t=a,r=e.renderer[t],i=n[t];n[t]=(...t)=>{var e=r.apply(n,t);return(!1===e?i.apply(n,t):e)||""}}}t.renderer=n}if(e.tokenizer){let n=this.defaults.tokenizer||new y9(this.defaults);for(var s in e.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let t=s,r=e.tokenizer[t],i=n[t];n[t]=(...t)=>{var e=r.apply(n,t);return!1===e?i.apply(n,t):e}}}t.tokenizer=n}if(e.hooks){let n=this.defaults.hooks||new k9;for(var o in e.hooks){if(!(o in n))throw new Error(`hook '${o}' does not exist`);if(!["options","block"].includes(o)){let t=o,r=e.hooks[t],i=n[t];k9.passThroughHooks.has(o)?n[t]=t=>this.defaults.async?Promise.resolve(r.call(n,t)).then(t=>i.call(n,t)):(t=r.call(n,t),i.call(n,t)):n[t]=(...t)=>{var e=r.apply(n,t);return!1===e?i.apply(n,t):e}}}t.hooks=n}if(e.walkTokens){let r=this.defaults.walkTokens,i=e.walkTokens;t.walkTokens=function(t){let e=[];return e.push(i.call(this,t)),e=r?e.concat(r.call(this,t)):e}}this.defaults={...this.defaults,...t}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return v9.lex(t,e??this.defaults)}parser(t,e){return w9.parse(t,e??this.defaults)}parseMarkdown(o){return me((r,t)=>{let e={...t},i={...this.defaults,...e},n=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===e.async)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("u"a(t,i)).then(t=>i.hooks?i.hooks.processAllTokens(t):t).then(t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then(()=>t):t).then(t=>s(t,i)).then(t=>i.hooks?i.hooks.postprocess(t):t).catch(n);try{i.hooks&&(r=i.hooks.preprocess(r));let t=a(r,i),e=(i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens),s(t,i));return i.hooks?i.hooks.postprocess(e):e}catch(t){return n(t)}},"parse")}onError(r,i){return t=>{var e;if(t.message+=` -Please report this to https://github.com/markedjs/marked.`,r)return e="

An error occurred:

"+OA(t.message+"",!0)+"
",i?Promise.resolve(e):e;if(i)return Promise.reject(t);throw t}}},E9=new T9,me(UA,"marked"),UA.options=UA.setOptions=function(t){return E9.setOptions(t),MA(UA.defaults=E9.defaults),UA},UA.getDefaults=RA,UA.defaults=qA,UA.use=function(...t){return E9.use(...t),MA(UA.defaults=E9.defaults),UA},UA.walkTokens=function(t,e){return E9.walkTokens(t,e)},UA.parseInline=E9.parseInline,UA.Parser=w9,UA.parser=w9.parse,UA.Renderer=x9,UA.TextRenderer=b9,UA.Lexer=v9,UA.lexer=v9.lex,UA.Tokenizer=y9,UA.Hooks=k9,UA.parse=UA,v9.lex});function _9(t,{markdownAutoWrap:e}){return t=jt(t.replace(//g,` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${PA(t,!0)}`}br(t){return"
"}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){var r=this.parser.parseInline(r),n=BA(t);if(null===n)return r;let i='
"}image({href:t,title:e,text:r}){var n=BA(t);if(null===n)return PA(r);let i=`${r}{t=e[t].flat(1/0),n=n.concat(this.walkTokens(t,r))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,r)))}}return n}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{var t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.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(...t){var e=n.renderer.apply(this,t);return!1===e?r.apply(this,t):e}: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 t=i[n.level];t?t.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)}),t.extensions=i),e.renderer){let i=this.defaults.renderer||new b9(this.defaults);for(var a in e.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(!["options","parser"].includes(a)){let t=a,r=e.renderer[t],n=i[t];i[t]=(...t)=>{var e=r.apply(i,t);return(!1===e?n.apply(i,t):e)||""}}}t.renderer=i}if(e.tokenizer){let i=this.defaults.tokenizer||new v9(this.defaults);for(var s in e.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let t=s,r=e.tokenizer[t],n=i[t];i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.tokenizer=i}if(e.hooks){let i=this.defaults.hooks||new T9;for(var o in e.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(!["options","block"].includes(o)){let t=o,r=e.hooks[t],n=i[t];T9.passThroughHooks.has(o)?i[t]=t=>this.defaults.async?Promise.resolve(r.call(i,t)).then(t=>n.call(i,t)):(t=r.call(i,t),n.call(i,t)):i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.hooks=i}if(e.walkTokens){let r=this.defaults.walkTokens,n=e.walkTokens;t.walkTokens=function(t){let e=[];return e.push(n.call(this,t)),e=r?e.concat(r.call(this,t)):e}}this.defaults={...this.defaults,...t}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return x9.lex(t,e??this.defaults)}parser(t,e){return k9.parse(t,e??this.defaults)}parseMarkdown(o){return me((r,t)=>{let e={...t},n={...this.defaults,...e},i=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===e.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"a(t,n)).then(t=>n.hooks?n.hooks.processAllTokens(t):t).then(t=>n.walkTokens?Promise.all(this.walkTokens(t,n.walkTokens)).then(()=>t):t).then(t=>s(t,n)).then(t=>n.hooks?n.hooks.postprocess(t):t).catch(i);try{n.hooks&&(r=n.hooks.preprocess(r));let t=a(r,n),e=(n.hooks&&(t=n.hooks.processAllTokens(t)),n.walkTokens&&this.walkTokens(t,n.walkTokens),s(t,n));return n.hooks?n.hooks.postprocess(e):e}catch(t){return i(t)}},"parse")}onError(r,n){return t=>{var e;if(t.message+=` +Please report this to https://github.com/markedjs/marked.`,r)return e="

An error occurred:

"+PA(t.message+"",!0)+"
",n?Promise.resolve(e):e;if(n)return Promise.reject(t);throw t}}},C9=new E9,me(qA,"marked"),qA.options=qA.setOptions=function(t){return C9.setOptions(t),DA(qA.defaults=C9.defaults),qA},qA.getDefaults=MA,qA.defaults=jA,qA.use=function(...t){return C9.use(...t),DA(qA.defaults=C9.defaults),qA},qA.walkTokens=function(t,e){return C9.walkTokens(t,e)},qA.parseInline=C9.parseInline,qA.Parser=k9,qA.parser=k9.parse,qA.Renderer=b9,qA.TextRenderer=w9,qA.Lexer=x9,qA.lexer=x9.lex,qA.Tokenizer=v9,qA.Hooks=T9,qA.parse=qA,x9.lex});function S9(t,{markdownAutoWrap:e}){return t=Wt(t.replace(//g,` `).replace(/\n{2,}/g,` -`)),!1===e?t.replace(/ /g," "):t}function S9(t,e={}){let r=_9(t,e),i=UA.lexer(r),n=[[]],a=0;function s(e,r="normal"){"text"===e.type?e.text.split(` -`).forEach((t,e)=>{0!==e&&(a++,n.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&n[a].push({content:t,type:r})})}):"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{s(t,e.type)}):"html"===e.type&&n[a].push({content:e.text,type:"normal"})}return me(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type&&n[a].push({content:t.text,type:"normal"})}),n}function A9(t,{markdownAutoWrap:e}={}){function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
").replace(/ /g," "):t.text.replace(/\n */g,"
"):"strong"===t.type?`${t.tokens?.map(r).join("")}`:"em"===t.type?`${t.tokens?.map(r).join("")}`:"paragraph"===t.type?`

${t.tokens?.map(r).join("")}

`:"space"===t.type?"":"html"===t.type?""+t.text:"escape"===t.type?t.text:"Unsupported markdown: "+t.type}return t=UA.lexer(t),me(r,"output"),t.map(r).join("")}var L9=t(()=>{C9(),Fr(),me(_9,"preprocessMarkdown"),me(S9,"markdownToLines"),me(A9,"markdownToHTML")});function N9(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function I9(t,e){return R9(t,[],N9(e.content),e.type)}function R9(t,e,r,i){var n,a,s;return 0===r.length?[{content:e.join(""),type:i},{content:"",type:i}]:([n,...a]=r,t([{content:(s=[...e,n]).join(""),type:i}])?R9(t,s,a,i):(0===e.length&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}]))}function M9(t,e){if(t.some(({content:t})=>t.includes(` -`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return D9(t,e)}function D9(t,e,r=[],i=[]){if(0===t.length)return 0{me(N9,"splitTextToChars"),me(I9,"splitWordToFitWidth"),me(R9,"splitWordToFitWidthRecursion"),me(M9,"splitLineToFitWidth"),me(D9,"splitLineToFitWidthRecursion")});function P9(t,e){e&&t.attr("style",e)}async function B9(t,e,r,i,n=!1){(t=t.append("foreignObject")).attr("width",10*r+"px"),t.attr("height",10*r+"px");let a=t.append("xhtml:div"),s=e.label;e.label&&Uc(e.label)&&(s=await jc(e.label.replace(L.lineBreakRegex,` -`),D()));var o=e.isNode?"nodeLabel":"edgeLabel",l=a.append("span");return l.html(s),P9(l,e.labelStyle),l.attr("class",o+" "+i),P9(a,e.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"),n&&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()),t.node()}function F9(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function $9(t,e,r){return U9(e=F9(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function z9(t,e,r){return U9(e=F9(t=t.append("text"),1,e),[{content:r,type:"normal"}]),(r=e.node()?.getBoundingClientRect())&&t.remove(),r}function G9(e,t,r,i=!1){let n=t.append("g"),a=n.insert("rect").attr("class","background").attr("style","stroke: none"),s=n.append("text").attr("y","-10.1"),o=0;for(var l of r){var c,h=me(t=>$9(n,1.1,t)<=e,"checkWidth");for(c of h(l)?[l]:M9(l,h))U9(F9(s,o,1.1),c),o++}return(i?(t=s.node().getBBox(),a.attr("x",t.x-2).attr("y",t.y-2).attr("width",t.width+4).attr("height",t.height+4),n):s).node()}function U9(i,t){i.text(""),t.forEach((t,e)=>{var r=i.append("tspan").attr("font-style","em"===t.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===t.type?"bold":"normal");0===e?r.text(t.content):r.text(" "+t.content)})}function q9(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>``)}var j9,W9=t(()=>{fu(),Jc(),Z3(),e(),L9(),KE(),O9(),me(P9,"applyStyle"),me(B9,"addHtmlSpan"),me(F9,"createTspan"),me($9,"computeWidthOfText"),me(z9,"computeDimensionOfText"),me(G9,"createFormattedText"),me(U9,"updateTextContentAndStyles"),me(q9,"replaceIconSubstring"),j9=me(async(t,e="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(M.debug("XYZ createText",e,r,i,n,a,s,"addSvgBackground: ",l),a?(i=A9(e,c),a=q9(VE(i)),i=e.replace(/\\\\/g,"\\"),B9(t,{isNode:s,label:Uc(e)?i:a,labelStyle:r.replace("fill:","color:")},o,n,l)):(i=G9(o,t,S9(e.replace(//g,"
").replace("
","
"),c),!!e&&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:"),j(i).attr("style",a)):(n=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),j(i).select("rect").attr("style",n.replace(/background:/g,"fill:")),o=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),j(i).select("text").attr("style",o)),i)),"createText")});function Y9(t){return(t=t.map((t,e)=>(0===e?"M":"L")+t.x+","+t.y)).push("Z"),t.join(" ")}function H9(e,t,r,i,n,a){var s=[],o=r-e,l=2*Math.PI/(o/a),c=t+(i-t)/2;for(let t=0;t<=50;t++){var h=e+t/50*o,u=c+n*Math.sin(l*(h-e));s.push({x:h,y:u})}return s}function V9(e,r,i,n,t,a){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let t=0;t{W9(),fu(),Z3(),_i(),Jc(),KE(),X9=me(async(t,e,r)=>{let i,n=e.useHtmlLabels||Mc(D()?.htmlLabels),a=(i=r||"node default",t.insert("g").attr("class",i).attr("id",e.domId||e.id)),s=a.insert("g").attr("class","label").attr("style",bE(e.labelStyle)),o,l=(o=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],await j9(s,_c(VE(o),D()),{useHtmlLabels:n,width:e.width||D().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img})),c=l.getBBox(),h=(e?.padding??0)/2;if(n){var r=l.children[0],t=j(l),u=r.getElementsByTagName("img");if(u){let i=""===o.replace(/]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",i?(t=(D().fontSize?D():window.getComputedStyle(document.body)).fontSize,[t=mr.fontSize]=WE(t),r.style.minWidth=t=5*t+"px",r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=r.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}return n?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),e.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"),K9=me(async(t,e,r)=>{let i=r.useHtmlLabels||Mc(D()?.flowchart?.htmlLabels),n=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await j9(n,_c(VE(e),D()),{useHtmlLabels:i,width:r.width||D()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return Mc(D()?.flowchart?.htmlLabels)&&(e=a.children[0],l=j(a),s=e.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)),i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:n}},"insertLabel"),Z9=me((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),Q9=me((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses"),me(Y9,"createPathFromPoints"),me(H9,"generateFullSineWavePoints"),me(V9,"generateCirclePoints")});function J9(t,e){return t.intersect(e)}var tL,eL=t(()=>{me(J9,"intersectNode"),tL=J9});function rL(t,e,r,i){var n=t.x,t=t.y,a=n-i.x,s=t-i.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(i.x{me(rL,"intersectEllipse"),iL=rL});function aL(t,e,r){return iL(t,e,e,r)}var sL,oL=t(()=>{nL(),me(aL,"intersectCircle"),sL=aL});function lL(t,e,r,i){var n,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*i.x+c*i.y+h;if(!(0!=u&&0!=d&&0{me(lL,"intersectLine"),me(cL,"sameSign"),hL=lL});function dL(e,r,i){let t=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=t-e.width/2-s,c=n-e.height/2-o;for(let t=0;t{uL(),me(dL,"intersectPolygon"),pL=dL}),EL=t(()=>{gL=me((t,e)=>{var r,i=t.x,n=t.y,a=e.x-i,e=e.y-n,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:i+r,y:n+t}},"intersectRect"),fL=gL}),CL=t(()=>{eL(),oL(),nL(),TL(),EL(),mL={node:tL,circle:sL,ellipse:iL,polygon:pL,rect:fL}}),_L=t(()=>{fu(),yL=me(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:D().handDrawnSeed}),"solidStateFill"),vL=me(t=>({stylesMap:t=xL([...t.cssCompiledStyles||[],...t.cssStyles||[]]),stylesArray:[...t]}),"compileStyles"),xL=me(t=>{let r=new Map;return t.forEach(t=>{var[t,e]=t.split(":");r.set(t.trim(),e?.trim())}),r},"styles2Map"),bL=me(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),wL=me(t=>{let e=vL(t).stylesArray,r=[],i=[],n=[],a=[];return e.forEach(t=>{var e=t[0];bL(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:a}},"styles2String"),kL=me((t,e)=>{var{themeVariables:r,handDrawnSeed:i}=D(),{nodeBorder:r,mainBkg:n}=r,t=vL(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:t.get("stroke")||r,seed:i,strokeWidth:t.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides")});function SL(t,e,r){if(t&&t.length){var i,[n,a]=e,e=Math.PI/180*r,s=Math.cos(e),o=Math.sin(e);for(i of t){var[l,c]=i;i[0]=(l-n)*s-(c-a)*o+n,i[1]=(l-n)*o+(c-a)*s+a}}}function AL(t,e){return t[0]===e[0]&&t[1]===e[1]}function LL(t,r,i,e=1){var n=i,i=Math.max(r,.1),p=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,a=[0,0];if(n)for(var s of p)SL(s,a,n);if(r=((e,n)=>{var t,r=[];for(t of p){var i=[...t];AL(i[0],i[i.length-1])||i.push([i[0][0],i[0][1]]),2t.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),o.length){let r=[],i=o[0].ymin,t=0;for(;r.length||o.length;){if(o.length){let e=-1;for(let t=0;ti);t++)e=t;o.splice(0,e+1).forEach(t=>{r.push({s:i,edge:t})})}if((r=r.filter(t=>!(t.edge.ymax<=i))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==n||t%e==0)&&1=r.length);t+=2){var u=r[t].edge,d=r[d].edge;s.push([[Math.round(u.x),i],[Math.round(d.x),i]])}i+=n,r.forEach(t=>{t.edge.x=t.edge.x+n*t.edge.islope}),t++}}return s})(i,e),n){for(var o of p)SL(o,a,-n);{t=a,i=-n;let e=[];r.forEach(t=>e.push(...t)),SL(e,t,i)}}return r}function NL(t,e){let r,i=e.hachureAngle+90,n=e.hachureGap,a=(n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1)),1);return 1<=e.roughness&&.7<((null==(r=e.randomizer)?void 0:r.next())||Math.random())&&(a=n),LL(t,n,i,a||1)}function IL(t){var e=t[0],t=t[1];return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function RL(t,e){return t.type===e}function ML(t){let i=[],n=(t=>{for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:kN,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:TN,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:EN,text:""},e})(t),a="BOD",s=0,o=n[s];for(;!RL(o,EN);){let e=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return ML("M0,0"+t);s++,e=CN[o.text],a=o.text}else RL(o,TN)?e=CN[a]:(s++,e=CN[o.text],a=o.text);if(!(s+ee%2?t+i:t+r);a.push({key:"C",data:l}),r=l[4],i=l[5];break;case"Q":a.push({key:"Q",data:[...o]}),r=o[2],i=o[3];break;case"q":l=o.map((t,e)=>e%2?t+i:t+r),a.push({key:"Q",data:l}),r=l[2],i=l[3];break;case"A":a.push({key:"A",data:[...o]}),r=o[5],i=o[6];break;case"a":r+=o[5],i+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,i]});break;case"H":a.push({key:"H",data:[...o]}),r=o[0];break;case"h":r+=o[0],a.push({key:"H",data:[r]});break;case"V":a.push({key:"V",data:[...o]}),i=o[0];break;case"v":i+=o[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],i=o[3];break;case"s":var c=o.map((t,e)=>e%2?t+i:t+r);a.push({key:"S",data:c}),r=c[2],i=c[3];break;case"T":a.push({key:"T",data:[...o]}),r=o[0],i=o[1];break;case"t":r+=o[0],i+=o[1],a.push({key:"T",data:[r,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=e,i=n}return a}function OL(t){let n=[],a="",s=0,o=0,e=0,r=0,l=0,c=0;for(var{key:i,data:h}of t){switch(i){case"M":n.push({key:"M",data:[...h]}),[s,o]=h,[e,r]=h;break;case"C":n.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":n.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],n.push({key:"L",data:[s,o]});break;case"V":o=h[0],n.push({key:"L",data:[s,o]});break;case"S":{let t=0,e;e="C"===a||"S"===a?(t=s+(s-l),o+(o-c)):(t=s,o),n.push({key:"C",data:[t,e,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[t,e]=h,r=0,i;i="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(i-o)/3,p=t+2*(r-t)/3,g=e+2*(i-e)/3;n.push({key:"C",data:[u,d,p,g,t,e]}),l=r,c=i,s=t,o=e;break}case"Q":var[u,d,p,g]=h,f=s+2*(u-s)/3,m=o+2*(d-o)/3;n.push({key:"C",data:[f,m,p+2*(u-p)/3,g+2*(d-g)/3,p,g]}),l=u,c=d,s=p,o=g;break;case"A":var f=Math.abs(h[0]),m=Math.abs(h[1]),y=h[2],v=h[3],x=h[4],b=h[5],w=h[6];0===f||0===m?(n.push({key:"C",data:[s,o,b,w,b,w]}),s=b,o=w):s===b&&o===w||(BL(s,o,b,w,f,m,y,v,x).forEach(function(t){n.push({key:"C",data:t})}),s=b,o=w);break;case"Z":n.push({key:"Z",data:[]}),s=e,o=r}a=i}return n}function PL(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function BL(t,e,r,i,n,a,s,o,l,c){let h=Math.PI*s/180,u=[],d=0,p=0,g=0,f=0;c?[d,p,g,f]=c:([t,e]=PL(t,e,-h),[r,i]=PL(r,i,-h),1<(m=(y=(t-r)/2)*y/(n*n)+(v=(e-i)/2)*v/(a*a))&&(n*=m=Math.sqrt(m),a*=m),m=n*n,x=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=o*n*v/a+(t+r)/2,f=o*-a*y/n+(e+i)/2,d=Math.asin(parseFloat(((e-f)/a).toFixed(9))),p=Math.asin(parseFloat(((i-f)/a).toFixed(9))),tp&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI));var m=p-d,y=(Math.abs(m)>120*Math.PI/180&&(x=p,v=r,o=i,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=BL(r=g+n*Math.cos(p),i=f+a*Math.sin(p),v,o,n,a,s,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),x=4/3*n*(l=Math.tan(m/4)),n=[t,e],a=[t+x*v,e-(m=4/3*a*l)*y],l=[r+x*s,i-m*o],t=[r,i];if(a[0]=2*n[0]-a[0],a[1]=2*n[1]-a[1],c)return[a,l,t].concat(u);u=[a,l,t].concat(u);var b=[];for(let t=0;t2*Math.PI&&(c=0,h=2*Math.PI),n=2*Math.PI/l.curveStepCount,n=iN(a=Math.min(n/2,(h-c)/2),t,e,r,i,c,h,1,l),l.disableMultiStroke||(a=iN(a,t,e,r,i,c,h,1.5,l),n.push(...a)),s&&(o?n.push(...QL(t,e,t+r*Math.cos(c),e+i*Math.sin(c),l),...QL(t,e,t+r*Math.cos(h),e+i*Math.sin(h),l)):n.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+r*Math.cos(c),e+i*Math.sin(c)]})),{type:"path",ops:n}}function WL(t,e){let r=OL(DL(ML(t))),i=[],n=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...QL(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;i.push(...nN(l,c,h,u,d,p,a,e)),a=[d,p];break;case"Z":i.push(...QL(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:i}}function YL(t,e){var r,i=[];for(r of t)if(r.length){var n=e.maxRandomnessOffset||0,a=r.length;if(2{let e=r.fillStyle||"hachure";if(!bN[e])switch(e){case"zigzag":bN[e]||(bN[e]=new fN(t));break;case"cross-hatch":bN[e]||(bN[e]=new mN(t));break;case"dots":bN[e]||(bN[e]=new yN(t));break;case"dashed":bN[e]||(bN[e]=new vN(t));break;case"zigzag-line":bN[e]||(bN[e]=new xN(t));break;default:e="hachure",bN[e]||(bN[e]=new gN(t))}return bN[e]})(_N).fillPolygons(t,r)}function VL(t){var e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function XL(t){return t.randomizer||(t.randomizer=new wN(t.seed||0)),t.randomizer.next()}function KL(t,e,r,i=1){return r.roughness*i*(XL(r)*(e-t)+t)}function ZL(t,e,r=1){return KL(-t,t,e,r)}function QL(t,e,r,i,n,a=!1){var a=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=JL(t,e,r,i,n,!0,!1);return a?s:(a=JL(t,e,r,i,n,!0,!0),s.concat(a))}function JL(t,e,r,i,n,a,s){let o=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(o),c,h=(c=l<200?1:500o?l/10:h)/2,d=.2+.2*XL(n),p=n.bowing*n.maxRandomnessOffset*(i-e)/200,g=n.bowing*n.maxRandomnessOffset*(t-r)/200;p=ZL(p,n,c),g=ZL(g,n,c);var f=[],m=me(()=>ZL(u,n,c),"M"),y=me(()=>ZL(h,n,c),"k"),v=n.preserveVertices;return a&&f.push(s?{op:"move",data:[t+(v?0:m()),e+(v?0:m())]}:{op:"move",data:[t+(v?0:ZL(h,n,c)),e+(v?0:ZL(h,n,c))]}),f.push(s?{op:"bcurveTo",data:[p+t+(r-t)*d+m(),g+e+(i-e)*d+m(),p+t+2*(r-t)*d+m(),g+e+2*(i-e)*d+m(),r+(v?0:m()),i+(v?0:m())]}:{op:"bcurveTo",data:[p+t+(r-t)*d+y(),g+e+(i-e)*d+y(),p+t+2*(r-t)*d+y(),g+e+2*(i-e)*d+y(),r+(v?0:y()),i+(v?0:y())]}),f}function tN(e,r,i){if(!e.length)return[];var n=[];n.push([e[0][0]+ZL(r,i),e[0][1]+ZL(r,i)]),n.push([e[0][0]+ZL(r,i),e[0][1]+ZL(r,i)]);for(let t=1;t{let t=l[c+0],e=l[c+1],r=l[c+2],i=l[c+3],n=3*e[0]-2*t[0]-i[0],a=(n*=n,3*e[1]-2*t[1]-i[1]);a*=a;var s=3*r[0]-2*i[0]-t[0],o=(s*=s,3*r[1]-2*i[1]-t[1]);return o*=o,nl&&(l=h,c=t)}return Math.sqrt(l)>t?(dN(e,r,c+1,t,a),dN(e,c,i,t,a)):(a.length||a.push(s),a.push(o)),a}function pN(e,r=.15,t){var i=[],n=(e.length-1)/3;for(let t=0;t{me(SL,"t"),me(AL,"e"),me(LL,"s"),me(NL,"n"),gN=class{static{me(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=NL(t,e),{type:"fillSketch",ops:this.renderLines(t,e)}}renderLines(t,e){var r,i=[];for(r of t)i.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return i}},me(IL,"a"),fN=class extends gN{static{me(this,"h")}fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);var i,n,t=NL(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([i,n]of t)IL([i,n])&&s.push([[i[0]-o,i[1]+l],[...n]],[[i[0]+o,i[1]-l],[...n]]);return{type:"fillSketch",ops:this.renderLines(s,e)}}},mN=class extends gN{static{me(this,"r")}fillPolygons(t,e){var r=this._fillPolygons(t,e),e=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),t=this._fillPolygons(t,e);return r.ops=r.ops.concat(t.ops),r}},yN=class{static{me(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){return t=NL(t,e=Object.assign({},e,{hachureAngle:0})),this.dotsOnLines(t,e)}dotsOnLines(t,e){let r=[],i=e.hachureGap,n=(i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1),e.fillWeight);n<0&&(n=e.strokeWidth/2);var a,s=i/4;for(a of t){var o=IL(a),l=o/i,c=Math.ceil(l)-1,h=o-c*i,u=(a[0][0]+a[1][0])/2-i/4,d=Math.min(a[0][1],a[1][1]);for(let t=0;t{let e=IL(t),r=Math.floor(e/(h+u)),i=(e+u-r*(h+u))/2,n=t[0],a=t[1];n[0]>a[0]&&(n=t[1],a=t[0]);var s=Math.atan((a[1]-n[1])/(a[0]-n[0]));for(let t=0;t{let e=IL(t),r=Math.round(e/(2*c)),i=t[0],n=t[1];i[0]>n[0]&&(i=t[1],n=t[0]);var a=Math.atan((n[1]-i[1])/(n[0]-i[0]));for(let t=0;t{var n=d,a=p,s=Math.abs(g/2),o=Math.abs(t/2);s+=ZL(.01*s,i),o+=ZL(.01*o,i);let l=e,c=r;for(;l<0;)l+=2*Math.PI,c+=2*Math.PI;c-l>2*Math.PI&&(l=0,c=2*Math.PI);var h=(c-l)/i.curveStepCount,u=[];for(let t=l;t<=c;t+=h)u.push([n+s*Math.cos(t),a+o*Math.sin(t)]);return u.push([n+s*Math.cos(c),a+o*Math.sin(c)]),u.push([n,a]),HL([u],i)})(t,e,r,n))),n.stroke!==SN&&a.push(s),this._d("arc",a,n)}curve(t,e){var r=this._o(e),e=[],i=GL(t,r);if(r.fill&&r.fill!==SN)if("solid"===r.fillStyle){var n=GL(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));e.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{var a,s=[];if((n=t).length)for(a of"number"==typeof n[0][0]?[n]:n)a.length<3?s.push(...a):3===a.length?s.push(...pN(sN([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...pN(sN(a),10,(1+r.roughness)/2));s.length&&e.push(HL([s],r))}return r.stroke!==SN&&e.push(i),this._d("curve",e,r)}polygon(t,e){var r=[],i=$L(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(YL([t],e)):r.push(HL([t],e))),e.stroke!==SN&&r.push(i),this._d("polygon",r,e)}path(t,e){let r=this._o(e),i=[];var n,a,s,o;return t&&(t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),e=r.fill&&"transparent"!==r.fill&&r.fill!==SN,n=r.stroke!==SN,s=((t,e)=>{let r=OL(DL(ML(t))),i=[],n=[],a=[0,0],s=[],o=me(()=>{4<=s.length&&n.push(...pN(s,1)),s=[]},"i"),l=me(()=>{o(),n.length&&(i.push(n),n=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],n.push(a);break;case"L":o(),n.push([h[0],h[1]]);break;case"C":var u;s.length||(u=n.length?n[n.length-1]:a,s.push([u[0],u[1]])),s.push([h[0],h[1]]),s.push([h[2],h[3]]),s.push([h[4],h[5]]);break;case"Z":o(),n.push([a[0],a[1]])}if(l(),!e)return i;var d,p=[];for(d of i){var g=uN(d,e);g.length&&p.push(g)}return p})(t,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=WL(t,r),e&&("solid"===r.fillStyle?1===s.length?(e=WL(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),i.push({type:"fillPath",ops:this._mergedShape(e.ops)})):i.push(YL(s,r)):i.push(HL(s,r))),n)&&(a?s.forEach(t=>{i.push($L(t,!1,r))}):i.push(o)),this._d("path",i,r)}opsToPath(t,e){let r="";for(var i of t.ops){var n="number"==typeof e&&0<=e?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":r+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":r+=`L${n[0]} ${n[1]} `}}return r.trim()}toPaths(t){var e,r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(e of r){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:SN};break;case"fillPath":t={d:this.opsToPath(e),stroke:SN,strokeWidth:0,fill:i.fill||SN};break;case"fillSketch":t=this.fillSketch(e,i)}t&&n.push(t)}return n}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||SN,strokeWidth:r,fill:SN}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}},LN=class{static{me(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new AN(e)}draw(t){var e,r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(e of r)switch(e.type){case"path":n.save(),n.strokeStyle="none"===i.stroke?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,e,a),n.restore();break;case"fillPath":n.save(),n.fillStyle=i.fill||"";var s="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,e,a,s),n.restore();break;case"fillSketch":this.fillSketch(n,e,i)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(var n of e.ops){var a="number"==typeof r&&0<=r?n.data.map(t=>+t.toFixed(r)):n.data;switch(n.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,n){return t=this.gen.line(t,e,r,i,n),this.draw(t),t}rectangle(t,e,r,i,n){return t=this.gen.rectangle(t,e,r,i,n),this.draw(t),t}ellipse(t,e,r,i,n){return t=this.gen.ellipse(t,e,r,i,n),this.draw(t),t}circle(t,e,r,i){return t=this.gen.circle(t,e,r,i),this.draw(t),t}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t),t}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t),t}arc(t,e,r,i,n,a,s=!1,o){return t=this.gen.arc(t,e,r,i,n,a,s,o),this.draw(t),t}curve(t,e){return t=this.gen.curve(t,e),this.draw(t),t}path(t,e){return t=this.gen.path(t,e),this.draw(t),t}},NN="http://www.w3.org/2000/svg",IN=class{static{me(this,"ot")}constructor(t,e){this.svg=t,this.gen=new AN(e)}draw(e){var r,t=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(NN,"g"),s=e.options.fixedDecimalPlaceDigits;for(r of t){let t=null;switch(r.type){case"path":(t=n.createElementNS(NN,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke",i.stroke),t.setAttribute("stroke-width",i.strokeWidth+""),t.setAttribute("fill","none"),i.strokeLineDash&&t.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",""+i.strokeLineDashOffset);break;case"fillPath":(t=n.createElementNS(NN,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",i.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(n,r,i)}t&&a.appendChild(t)}return a}fillSketch(t,e,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),(t=t.createElementNS(NN,"path")).setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),t.setAttribute("stroke",r.fill||""),t.setAttribute("stroke-width",i+""),t.setAttribute("fill","none"),r.fillLineDash&&t.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&t.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),t}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,n){return t=this.gen.line(t,e,r,i,n),this.draw(t)}rectangle(t,e,r,i,n){return t=this.gen.rectangle(t,e,r,i,n),this.draw(t)}ellipse(t,e,r,i,n){return t=this.gen.ellipse(t,e,r,i,n),this.draw(t)}circle(t,e,r,i){return t=this.gen.circle(t,e,r,i),this.draw(t)}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t)}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t)}arc(t,e,r,i,n,a,s=!1,o){return t=this.gen.arc(t,e,r,i,n,a,s,o),this.draw(t)}curve(t,e){return t=this.gen.curve(t,e),this.draw(t)}path(t,e){return t=this.gen.path(t,e),this.draw(t)}},RN={canvas:me((t,e)=>new LN(t,e),"canvas"),svg:me((t,e)=>new IN(t,e),"svg"),generator:me(t=>new AN(t),"generator"),newSeed:me(()=>AN.newSeed(),"newSeed")}});function DN(t,e){var r=wL(e).labelStyles;e.labelStyle=r;let i=Q9(e),n=i,a=(i||(n="anchor"),t.insert("g").attr("class",n).attr("id",e.domId||e.id)),s=e.cssStyles,o=RN.svg(a),l=kL(e,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==e.look&&(l.roughness=0),o.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",bE(s)),Z9(e,h),e.intersect=function(t){return M.info("Circle intersect",e,1,t),mL.circle(e,1,t)},a}var ON=t(()=>{e(),n(),CL(),_L(),MN(),KE(),me(DN,"anchor")});function PN(t,e,r,i,n,a,s){var o=(t+r)/2,l=(e+i)/2,c=Math.atan2(i-e,r-t),h=Math.sqrt(((r-t)/2/n)**2+((i-e)/2/a)**2);if(1f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(${c/2}, 0)`),Z9(e,m),e.intersect=function(t){return mL.polygon(e,u,t)},n}var FN=t(()=>{n(),CL(),_L(),MN(),me(PN,"generateArcPoints"),me(BN,"bowTieRect")});function $N(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var zN=t(()=>{me($N,"insertPolygonShape")});async function GN(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(n)),s=i.height+n.padding,o=i.width+n.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=n.cssStyles;if("handDrawn"===n.look){let t=RN.svg(a),e=kL(n,{}),r=Y9(h),i=t.path(r,e);u=a.insert(()=>i,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=$N(a,o,s,h);return r&&u.attr("style",r),Z9(n,u),n.intersect=function(t){return mL.polygon(n,h,t)},a}var UN=t(()=>{n(),CL(),_L(),MN(),zN(),n(),me(GN,"card")});function qN(t,e){var r=wL(e).nodeStyles;e.label="";let i=t.insert("g").attr("class",Q9(e)).attr("id",e.domId??e.id),n=e.cssStyles,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=RN.svg(i),l=kL(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),Y9(s)),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",n),r&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return mL.polygon(e,s,t)},i}var jN=t(()=>{CL(),MN(),_L(),n(),me(qN,"choice")});async function WN(t,i){var{labelStyles:e,nodeStyles:r}=wL(i);i.labelStyle=e;let{shapeSvg:n,bbox:a,halfPadding:s}=await X9(t,i,Q9(i)),o=a.width/2+s,l,c=i.cssStyles;if("handDrawn"===i.look){let t=RN.svg(n),e=kL(i,{}),r=t.circle(0,0,2*o,e);(l=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",bE(c))}else l=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",o).attr("cx",0).attr("cy",0);return Z9(i,l),i.intersect=function(t){return M.info("Circle intersect",i,o,t),mL.circle(i,o,t)},n}var YN=t(()=>{e(),n(),CL(),_L(),MN(),KE(),me(WN,"circle")});function HN(t){var e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(t*=2)/2*e},${t/2*r} L ${t/2*e},${-t/2*r} - M ${t/2*e},${t/2*r} L ${-t/2*e},`+-t/2*r}function VN(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r,e.label="";let n=t.insert("g").attr("class",Q9(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),s=e.cssStyles,o=RN.svg(n),l=kL(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=HN(a),u=o.path(h,l),d=n.insert(()=>c,":first-child");return d.insert(()=>u),s&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",i),Z9(e,d),e.intersect=function(t){return M.info("crossedCircle intersect",e,{radius:a,point:t}),mL.circle(e,a,t)},n}var XN=t(()=>{e(),n(),_L(),MN(),CL(),me(HN,"createLine"),me(VN,"crossedCircle")});function KN(e,r,i,n=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let t=0;tv,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Z9(e,x),e.intersect=function(t){return mL.polygon(e,d,t)},n}var QN=t(()=>{n(),CL(),_L(),MN(),me(KN,"generateCirclePoints"),me(ZN,"curlyBraceLeft")});function JN(e,r,i,n=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let t=0;tv,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Z9(e,x),e.intersect=function(t){return mL.polygon(e,d,t)},n}var eI=t(()=>{n(),CL(),_L(),MN(),me(JN,"generateCirclePoints"),me(tI,"curlyBraceRight")});function rI(e,r,i,n=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let t=0;tw,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Z9(e,k),e.intersect=function(t){return mL.polygon(e,p,t)},n}var nI=t(()=>{n(),CL(),_L(),MN(),me(rI,"generateCirclePoints"),me(iI,"curlyBraces")});async function aI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await X9(t,e,Q9(e))),n=Math.max(80,1.25*(t.width+2*(e.padding??0)),e?.width??0),a=(t=Math.max(20,t.height+2*(e.padding??0),e?.height??0))/2,s=e.cssStyles,o=RN.svg(r),l=kL(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=n,h=t,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},...V9(-u,-h/2,a,50,270,90)],g=Y9(p),f=o.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),s&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",s),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-n/2}, ${-t/2})`),Z9(e,m),e.intersect=function(t){return mL.polygon(e,p,t)},r}var sI=t(()=>{n(),CL(),_L(),MN(),me(aI,"curvedTrapezoid")});async function oI(t,a){var{labelStyles:e,nodeStyles:r}=wL(a);a.labelStyle=e;let{shapeSvg:s,bbox:i,label:n}=await X9(t,a,Q9(a)),o=Math.max(i.width+a.padding,a.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(i.height+c+a.padding,a.height??0),u,d=a.cssStyles;if("handDrawn"===a.look){let t=RN.svg(s),e=cI(0,0,o,h,l,c),r=hI(0,c,o,h,l,c),i=t.path(e,kL(a,{})),n=t.path(r,kL(a,{fill:"none"}));u=s.insert(()=>n,":first-child"),(u=s.insert(()=>i,":first-child")).attr("class","basic label-container"),d&&u.attr("style",d)}else e=lI(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",bE(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),Z9(a,u),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2+(a.padding??0)/1.5-(i.y-(i.top??0))})`),a.intersect=function(e){var r=mL.rect(a,e),i=r.x-(a.x??0);if(0!=l&&(Math.abs(i)<(a.width??0)/2||Math.abs(i)==(a.width??0)/2&&Math.abs(r.y-(a.y??0))>(a.height??0)/2-c)){let t=c*c*(1-i*i/(l*l));0{n(),CL(),_L(),MN(),KE(),lI=me((t,e,r,i,n,a)=>[`M${t},`+(e+a),`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),cI=me((t,e,r,i,n,a)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),hI=me((t,e,r,i,n,a)=>[`M${t-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),me(oI,"cylinder")});async function dI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=t.width+e.padding,s=.2*(o=t.height+e.padding),a=-a/2,o=-o/2-s/2,l=e.cssStyles,c=RN.svg(r),h=kL(e,{});"handDrawn"!==e.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(t=>[t.x,t.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),n.attr("transform",`translate(${a+(e.padding??0)/2-(t.x-(t.left??0))}, ${o+s+(e.padding??0)/2-(t.y-(t.top??0))})`),Z9(e,p),e.intersect=function(t){return mL.rect(e,t)},r}var pI=t(()=>{n(),CL(),_L(),MN(),me(dI,"dividedRectangle")});async function gI(t,e){var r,{labelStyles:i,nodeStyles:n}=wL(e);e.labelStyle=i;let{shapeSvg:a,bbox:s,halfPadding:o}=await X9(t,e,Q9(e)),l=s.width/2+o+5,c=s.width/2+o,h,u=e.cssStyles;return"handDrawn"===e.look?(i=RN.svg(a),t=kL(e,{roughness:.2,strokeWidth:2.5}),r=kL(e,{roughness:.2,strokeWidth:1.5}),t=i.circle(0,0,2*l,t),i=i.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",bE(e.cssClasses)).attr("style",bE(u)),h.node()?.appendChild(t),h.node()?.appendChild(i)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),t=h.insert("circle"),h.attr("class","basic label-container").attr("style",n),r.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),t.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)),Z9(e,h),e.intersect=function(t){return M.info("DoubleCircle intersect",e,l,t),mL.circle(e,l,t)},a}var fI=t(()=>{e(),n(),CL(),_L(),MN(),KE(),me(gI,"doublecircle")});function mI(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=wL(e);e.label="",e.labelStyle=i;let a=t.insert("g").attr("class",Q9(e)).attr("id",e.domId??e.id),s=e.cssStyles,o=RN.svg(a),l=r.nodeBorder,c=kL(e,{fillStyle:"solid"}),h=("handDrawn"!==e.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{MN(),e(),CL(),_L(),n(),me(mI,"filledCircle")});async function vI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=a.width+(e.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=e.cssStyles,d=RN.svg(n),p=kL(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),Y9(h)),f=d.path(g,p),m=n.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),e.width=o,e.height=l,Z9(e,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return M.info("Triangle intersect",e,h,t),mL.polygon(e,h,t)},n}var xI=t(()=>{e(),n(),CL(),_L(),MN(),n(),me(vI,"flippedTriangle")});function bI(t,e,{dir:r,config:{state:i,themeVariables:n}}){var a=wL(e).nodeStyles;e.label="";let s=t.insert("g").attr("class",Q9(e)).attr("id",e.domId??e.id),o=e.cssStyles,l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));var t=-1*l/2,r=-1*c/2,h=RN.svg(s),n=kL(e,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==e.look&&(n.roughness=0,n.fillStyle="solid");let u=h.rectangle(t,r,l,c,n),d=s.insert(()=>u,":first-child");return o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),Z9(e,d),h=i?.padding??0,e.width&&e.height&&(e.width+=h/2||0,e.height+=h/2||0),e.intersect=function(t){return mL.rect(e,t)},s}var wI=t(()=>{MN(),CL(),_L(),n(),me(bI,"forkJoin")});async function kI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a}=await X9(t,e,Q9(e)),s=Math.max(80,a.width+2*(e.padding??0),e?.width??0),o=Math.max(50,a.height+2*(e.padding??0),e?.height??0),l=o/2,c=e.cssStyles,h=RN.svg(n),u=kL(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...V9(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=Y9(d),g=h.path(p,u),f=n.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),i&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",i),Z9(e,f),e.intersect=function(t){return M.info("Pill intersect",e,{radius:l,point:t}),mL.polygon(e,d,t)},n}var TI=t(()=>{e(),n(),CL(),_L(),MN(),me(kI,"halfRoundedRectangle")});async function EI(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(n)),s=i.height+n.padding,o=s/4,l=i.width+2*o+n.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=n.cssStyles;if("handDrawn"===n.look){let t=RN.svg(a),e=kL(n,{}),r=CI(0,0,l,s,o),i=t.path(r,e);h=a.insert(()=>i,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=$N(a,l,s,c);return r&&h.attr("style",r),n.width=l,n.height=s,Z9(n,h),n.intersect=function(t){return mL.polygon(n,c,t)},a}var CI,_I=t(()=>{n(),CL(),_L(),MN(),zN(),CI=me((t,e,r,i,n)=>[`M${t+n},`+e,`L${t+r-n},`+e,`L${t+r},`+(e-i/2),`L${t+r-n},`+(e-i),`L${t+n},`+(e-i),`L${t},`+(e-i/2),"Z"].join(" "),"createHexagonPathD"),me(EI,"hexagon")});async function SI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),r=(e.label="",e.labelStyle=r,(await X9(t,e,Q9(e))).shapeSvg),t=Math.max(30,e?.width??0),n=Math.max(30,e?.height??0),a=e.cssStyles,s=RN.svg(r),o=kL(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:t,y:0},{x:0,y:n},{x:t,y:n}],c=Y9(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),i&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-t/2}, ${-n/2})`),Z9(e,u),e.intersect=function(t){return M.info("Pill intersect",e,{points:l}),mL.polygon(e,l,t)},r}var AI=t(()=>{e(),n(),CL(),_L(),MN(),me(SI,"hourglass")});async function LI(t,n,{config:{themeVariables:e,flowchart:r}}){var i,a=wL(n).labelStyles,a=(n.labelStyle=a,n.assetHeight??48),a=Math.max(a,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(a,r??0);let{shapeSvg:s,bbox:o,label:l}=await X9(t,n,"icon-shape default"),c="t"===n.pos,h=a,u=a,d=e.nodeBorder,p=vL(n).stylesMap,g=-u/2,f=-h/2,m=n.label?8:0,y=RN.svg(s),v=kL(n,{stroke:"none",fill:"none"}),x=("handDrawn"!==n.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 n.icon&&((r=s.append("g")).html(`${await Bt(n.icon,{height:a,width:a,fallbackPrefix:""})}`),e=(t=r.node().getBBox()).width,a=t.height,i=t.y,r.attr("transform",`translate(${-e/2-t.x},${c?o.height/2+m/2-a/2-i:-o.height/2-m/2-a/2-i})`),r.attr("style",`color: ${p.get("stroke")??d};`)),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${c?-w/2:w/2-o.height})`),T.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),Z9(n,E),n.intersect=function(t){var e,r,i;return M.info("iconSquare intersect",n,t),n.label?(i=n.x??0,e=n.y??0,r=n.height??0,i=c?[{x:i-o.width/2,y:e-r/2},{x:i+o.width/2,y:e-r/2},{x:i+o.width/2,y:e-r/2+o.height+m},{x:i+u/2,y:e-r/2+o.height+m},{x:i+u/2,y:e+r/2},{x:i-u/2,y:e+r/2},{x:i-u/2,y:e-r/2+o.height+m},{x:i-o.width/2,y:e-r/2+o.height+m}]:[{x:i-u/2,y:e-r/2},{x:i+u/2,y:e-r/2},{x:i+u/2,y:e-r/2+h},{x:i+o.width/2,y:e-r/2+h},{x:i+o.width/2/2,y:e+r/2},{x:i-o.width/2,y:e+r/2},{x:i-o.width/2,y:e-r/2+h},{x:i-u/2,y:e-r/2+h}],mL.polygon(n,i,t)):mL.rect(n,t)},s}var NI=t(()=>{MN(),e(),qt(),CL(),_L(),n(),me(LI,"icon")});async function II(t,e,{config:{themeVariables:r,flowchart:i}}){var n=wL(e).labelStyles,n=(e.labelStyle=n,e.assetHeight??48),n=Math.max(n,e.assetWidth??48),i=i?.wrappingWidth,{shapeSvg:i,bbox:t,label:a}=(e.width=Math.max(n,i??0),await X9(t,e,"icon-shape default")),s=e.label?8:0,o="t"===e.pos,{nodeBorder:r,mainBkg:l}=r,c=vL(e).stylesMap,h=RN.svg(i),u=kL(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,i.append("g"));e.icon&&d.html(`${await Bt(e.icon,{height:n,width:n,fallbackPrefix:""})}`);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,t.width),w=v+t.height+s,k=h.rectangle(-b/2,-w/2,b,w,{...u,fill:"transparent",stroke:"none"}),T=i.insert(()=>x,":first-child"),E=i.insert(()=>k);return d.attr("transform",`translate(${-g/2-m},${o?t.height/2+s/2-f/2-y:-t.height/2-s/2-f/2-y})`),d.attr("style",`color: ${c.get("stroke")??r};`),a.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))},${o?-w/2:w/2-t.height})`),T.attr("transform",`translate(0,${o?t.height/2+s/2:-t.height/2-s/2})`),Z9(e,E),e.intersect=function(t){return M.info("iconSquare intersect",e,t),mL.rect(e,t)},i}var RI,MI=t(()=>{MN(),e(),qt(),CL(),_L(),n(),me(II,"iconCircle")}),DI=t(()=>{RI=me((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD")});async function OI(t,n,{config:{themeVariables:e,flowchart:r}}){var i=wL(n).labelStyles,i=(n.labelStyle=i,n.assetHeight??48),i=Math.max(i,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(i,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await X9(t,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=e,g=vL(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=RN.svg(a),x=kL(n,{});"handDrawn"!==n.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(RI(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"),_=a.insert(()=>E);return n.icon&&((t=a.append("g")).html(`${await Bt(n.icon,{height:i,width:i,fallbackPrefix:""})}`),r=(e=t.node().getBBox()).width,i=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-i/2-b:-s.height/2-y/2-i/2-b})`),t.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})`),Z9(n,_),n.intersect=function(t){var e,r,i;return M.info("iconSquare intersect",n,t),n.label?(i=n.x??0,e=n.y??0,r=n.height??0,i=c?[{x:i-s.width/2,y:e-r/2},{x:i+s.width/2,y:e-r/2},{x:i+s.width/2,y:e-r/2+s.height+y},{x:i+u/2,y:e-r/2+s.height+y},{x:i+u/2,y:e+r/2},{x:i-u/2,y:e+r/2},{x:i-u/2,y:e-r/2+s.height+y},{x:i-s.width/2,y:e-r/2+s.height+y}]:[{x:i-u/2,y:e-r/2},{x:i+u/2,y:e-r/2},{x:i+u/2,y:e-r/2+h},{x:i+s.width/2,y:e-r/2+h},{x:i+s.width/2/2,y:e+r/2},{x:i-s.width/2,y:e+r/2},{x:i-s.width/2,y:e-r/2+h},{x:i-u/2,y:e-r/2+h}],mL.polygon(n,i,t)):mL.rect(n,t)},a}var PI=t(()=>{MN(),e(),qt(),CL(),_L(),DI(),n(),me(OI,"iconRounded")});async function BI(t,n,{config:{themeVariables:e,flowchart:r}}){var i=wL(n).labelStyles,i=(n.labelStyle=i,n.assetHeight??48),i=Math.max(i,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(i,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await X9(t,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=e,g=vL(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=RN.svg(a),x=kL(n,{});"handDrawn"!==n.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(RI(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"),_=a.insert(()=>E);return n.icon&&((t=a.append("g")).html(`${await Bt(n.icon,{height:i,width:i,fallbackPrefix:""})}`),r=(e=t.node().getBBox()).width,i=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-i/2-b:-s.height/2-y/2-i/2-b})`),t.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})`),Z9(n,_),n.intersect=function(t){var e,r,i;return M.info("iconSquare intersect",n,t),n.label?(i=n.x??0,e=n.y??0,r=n.height??0,i=c?[{x:i-s.width/2,y:e-r/2},{x:i+s.width/2,y:e-r/2},{x:i+s.width/2,y:e-r/2+s.height+y},{x:i+u/2,y:e-r/2+s.height+y},{x:i+u/2,y:e+r/2},{x:i-u/2,y:e+r/2},{x:i-u/2,y:e-r/2+s.height+y},{x:i-s.width/2,y:e-r/2+s.height+y}]:[{x:i-u/2,y:e-r/2},{x:i+u/2,y:e-r/2},{x:i+u/2,y:e-r/2+h},{x:i+s.width/2,y:e-r/2+h},{x:i+s.width/2/2,y:e+r/2},{x:i-s.width/2,y:e+r/2},{x:i-s.width/2,y:e-r/2+h},{x:i-u/2,y:e-r/2+h}],mL.polygon(n,i,t)):mL.rect(n,t)},a}var FI=t(()=>{MN(),e(),qt(),CL(),DI(),_L(),n(),me(BI,"iconSquare")});async function $I(t,n,{config:{flowchart:e}}){(i=new Image).src=n?.img??"",await i.decode();var r=Number(i.naturalWidth.toString().replace("px","")),i=Number(i.naturalHeight.toString().replace("px","")),a=(n.imageAspectRatio=r/i,wL(n).labelStyles),a=(n.labelStyle=a,e?.wrappingWidth);n.defaultWidth=e?.wrappingWidth;let s=Math.max(n.label?a??0:0,n?.assetWidth??r),o="on"===n.constraint&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:s,l="on"===n.constraint?o/n.imageAspectRatio:n?.assetHeight??i,{shapeSvg:c,bbox:h,label:u}=(n.width=Math.max(o,a??0),await X9(t,n,"image-shape default")),d="t"===n.pos,p=-o/2,g=-l/2,f=n.label?8:0,m=RN.svg(c),y=kL(n,{}),v=("handDrawn"!==n.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 n.img&&((e=c.append("image")).attr("href",n.img),e.attr("width",o),e.attr("height",l),e.attr("preserveAspectRatio","none"),e.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})`),Z9(n,T),n.intersect=function(t){var e,r,i;return M.info("iconSquare intersect",n,t),n.label?(i=n.x??0,e=n.y??0,r=n.height??0,i=d?[{x:i-h.width/2,y:e-r/2},{x:i+h.width/2,y:e-r/2},{x:i+h.width/2,y:e-r/2+h.height+f},{x:i+o/2,y:e-r/2+h.height+f},{x:i+o/2,y:e+r/2},{x:i-o/2,y:e+r/2},{x:i-o/2,y:e-r/2+h.height+f},{x:i-h.width/2,y:e-r/2+h.height+f}]:[{x:i-o/2,y:e-r/2},{x:i+o/2,y:e-r/2},{x:i+o/2,y:e-r/2+l},{x:i+h.width/2,y:e-r/2+l},{x:i+h.width/2/2,y:e+r/2},{x:i-h.width/2,y:e+r/2},{x:i-h.width/2,y:e-r/2+l},{x:i-o/2,y:e-r/2+l}],mL.polygon(n,i,t)):mL.rect(n,t)},c}var zI=t(()=>{MN(),e(),CL(),_L(),n(),me($I,"imageSquare")});async function GI(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(n)),s=Math.max(i.width+2*(n.padding??0),n?.width??0),o=Math.max(i.height+2*(n.padding??0),n?.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=n.cssStyles;if("handDrawn"===n.look){let t=RN.svg(a),e=kL(n,{}),r=Y9(l),i=t.path(r,e);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$N(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,Z9(n,c),n.intersect=function(t){return mL.polygon(n,l,t)},a}var UI=t(()=>{n(),CL(),_L(),MN(),zN(),me(GI,"inv_trapezoid")});async function qI(t,i,e){var{labelStyles:r,nodeStyles:n}=wL(i);i.labelStyle=r;let{shapeSvg:a,bbox:s}=await X9(t,i,Q9(i)),o=Math.max(s.width+2*e.labelPaddingX,i?.width||0),l=Math.max(s.height+2*e.labelPaddingY,i?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=i,g=i.cssStyles;if(e?.rx&&e.ry&&(d=e.rx,p=e.ry),"handDrawn"===i.look){let t=RN.svg(a),e=kL(i,{}),r=d||p?t.path(RI(c,h,o,l,d||0),e):t.rectangle(c,h,o,l,e);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",bE(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",bE(d)).attr("ry",bE(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return Z9(i,u),i.intersect=function(t){return mL.rect(i,t)},a}var jI=t(()=>{n(),CL(),DI(),_L(),MN(),KE(),me(qI,"drawRect")});async function WI(t,e){var{shapeSvg:t,bbox:r,label:i}=await X9(t,e,"label"),n=t.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),i.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),Z9(e,n),e.intersect=function(t){return mL.rect(e,t)},t}var YI=t(()=>{jI(),n(),CL(),me(WI,"labelRect")});async function HI(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(n)),s=Math.max(i.width+(n.padding??0),n?.width??0),o=Math.max(i.height+(n.padding??0),n?.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=n.cssStyles;if("handDrawn"===n.look){let t=RN.svg(a),e=kL(n,{}),r=Y9(l),i=t.path(r,e);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$N(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,Z9(n,c),n.intersect=function(t){return mL.polygon(n,l,t)},a}var VI=t(()=>{n(),CL(),_L(),MN(),zN(),me(HI,"lean_left")});async function XI(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(n)),s=Math.max(i.width+(n.padding??0),n?.width??0),o=Math.max(i.height+(n.padding??0),n?.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=n.cssStyles;if("handDrawn"===n.look){let t=RN.svg(a),e=kL(n,{}),r=Y9(l),i=t.path(r,e);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$N(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,Z9(n,c),n.intersect=function(t){return mL.polygon(n,l,t)},a}var KI=t(()=>{n(),CL(),_L(),MN(),zN(),me(XI,"lean_right")});function ZI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.label="",e.labelStyle=r;let n=t.insert("g").attr("class",Q9(e)).attr("id",e.domId??e.id),a=e.cssStyles,s=Math.max(35,e?.width??0),o=Math.max(35,e?.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=RN.svg(n),h=kL(e,{}),u=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),Y9(l)),d=c.path(u,h),p=n.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${s/2},${-o})`),Z9(e,p),e.intersect=function(t){return M.info("lightningBolt intersect",e,t),mL.polygon(e,l,t)},n}var QI=t(()=>{e(),n(),_L(),MN(),CL(),n(),me(ZI,"lightningBolt")});async function JI(t,s){var{labelStyles:e,nodeStyles:r}=wL(s);s.labelStyle=e;let{shapeSvg:o,bbox:i,label:n}=await X9(t,s,Q9(s)),l=Math.max(i.width+(s.padding??0),s.width??0),c=l/2,h=c/(2.5+l/50),u=Math.max(i.height+h+(s.padding??0),s.height??0),d=.1*u,p,g=s.cssStyles;if("handDrawn"===s.look){let t=RN.svg(o),e=eR(0,0,l,u,c,h,d),r=rR(0,h,l,u,c,h),i=kL(s,{}),n=t.path(e,i),a=t.path(r,i);o.insert(()=>a,":first-child").attr("class","line"),(p=o.insert(()=>n,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else e=tR(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",bE(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),Z9(s,p),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2+h-(i.y-(i.top??0))})`),s.intersect=function(e){var r=mL.rect(s,e),i=r.x-(s.x??0);if(0!=c&&(Math.abs(i)<(s.width??0)/2||Math.abs(i)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-h)){let t=h*h*(1-i*i/(c*c));0{n(),CL(),_L(),MN(),KE(),tR=me((t,e,r,i,n,a,s)=>[`M${t},`+(e+a),`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},`+(e+a+s),`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),eR=me((t,e,r,i,n,a,s)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},`+(e+a+s),`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),rR=me((t,e,r,i,n,a)=>[`M${t-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),me(JI,"linedCylinder")});async function nR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=s+o,c=e.cssStyles,h=RN.svg(r),u=kL(e,{});"handDrawn"!==e.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},...H9(-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(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(e.padding??0)+a/2*.1/2-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),Z9(e,g),e.intersect=function(t){return mL.polygon(e,d,t)},r}var aR=t(()=>{n(),CL(),MN(),_L(),me(nR,"linedWaveEdgedRect")});async function sR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=RN.svg(n),p=kL(e,{}),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"!==e.look&&(p.roughness=0,p.fillStyle="solid"),Y9(g)),y=d.path(m,p),v=Y9(f),x=d.path(v,{...p,fill:"none"}),b=n.insert(()=>x,":first-child");return b.insert(()=>y,":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),Z9(e,b),e.intersect=function(t){return mL.polygon(e,g,t)},n}var oR=t(()=>{n(),_L(),MN(),CL(),me(sR,"multiRect")});async function lR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,p=e.cssStyles,g=H9(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=RN.svg(n),x=kL(e,{}),b=("handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid"),Y9(m)),w=v.path(b,x),k=Y9(y),T=v.path(k,x),E=n.insert(()=>w,":first-child");return E.insert(()=>T),E.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",i),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))})`),Z9(e,E),e.intersect=function(t){return mL.polygon(e,m,t)},n}var cR=t(()=>{n(),CL(),MN(),_L(),me(lR,"multiWaveEdgedRectangle")});async function hR(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=wL(e),{shapeSvg:i,bbox:t}=(e.labelStyle=i,e.useHtmlLabels||!1!==Nr().flowchart?.htmlLabels||(e.centerLabel=!0),await X9(t,e,Q9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=-a/2,o=-(t=Math.max(t.height+2*(e.padding??0),e?.height??0))/2,l=e.cssStyles,c=RN.svg(i),r=kL(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(r.roughness=0,r.fillStyle="solid");let h=c.rectangle(s,o,a,t,r),u=i.insert(()=>h,":first-child");return u.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",l),n&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",n),Z9(e,u),e.intersect=function(t){return mL.rect(e,t)},i}var uR=t(()=>{MN(),CL(),_L(),n(),Ai(),me(hR,"note")});async function dR(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(n)),s=i.width+n.padding,o=i.height+n.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=n.cssStyles;if("handDrawn"===n.look){let t=RN.svg(a),e=kL(n,{}),r=pR(0,0,l),i=t.path(r,e);h=a.insert(()=>i,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=$N(a,l,l,c);return r&&h.attr("style",r),Z9(n,h),n.intersect=function(t){return M.debug(`APA12 Intersect called SPLIT +`)),!1===e?t.replace(/ /g," "):t}function A9(t,e={}){let r=S9(t,e),n=qA.lexer(r),i=[[]],a=0;function s(e,r="normal"){"text"===e.type?e.text.split(` +`).forEach((t,e)=>{0!==e&&(a++,i.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&i[a].push({content:t,type:r})})}):"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{s(t,e.type)}):"html"===e.type&&i[a].push({content:e.text,type:"normal"})}return me(s,"processNode"),n.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}),i}function L9(t,{markdownAutoWrap:e}={}){function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
").replace(/ /g," "):t.text.replace(/\n */g,"
"):"strong"===t.type?`${t.tokens?.map(r).join("")}`:"em"===t.type?`${t.tokens?.map(r).join("")}`:"paragraph"===t.type?`

${t.tokens?.map(r).join("")}

`:"space"===t.type?"":"html"===t.type?""+t.text:"escape"===t.type?t.text:"Unsupported markdown: "+t.type}return t=qA.lexer(t),me(r,"output"),t.map(r).join("")}var N9=t(()=>{_9(),$r(),me(S9,"preprocessMarkdown"),me(A9,"markdownToLines"),me(L9,"markdownToHTML")});function I9(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function R9(t,e){return M9(t,[],I9(e.content),e.type)}function M9(t,e,r,n){var i,a,s;return 0===r.length?[{content:e.join(""),type:n},{content:"",type:n}]:([i,...a]=r,t([{content:(s=[...e,i]).join(""),type:n}])?M9(t,s,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}]))}function D9(t,e){if(t.some(({content:t})=>t.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return O9(t,e)}function O9(t,e,r=[],n=[]){if(0===t.length)return 0{me(I9,"splitTextToChars"),me(R9,"splitWordToFitWidth"),me(M9,"splitWordToFitWidthRecursion"),me(D9,"splitLineToFitWidth"),me(O9,"splitLineToFitWidthRecursion")});function B9(t,e){e&&t.attr("style",e)}async function F9(t,e,r,n,i=!1){(t=t.append("foreignObject")).attr("width",10*r+"px"),t.attr("height",10*r+"px");let a=t.append("xhtml:div"),s=e.label;e.label&&qc(e.label)&&(s=await Wc(e.label.replace(L.lineBreakRegex,` +`),D()));var o=e.isNode?"nodeLabel":"edgeLabel",l=a.append("span");return l.html(s),B9(l,e.labelStyle),l.attr("class",o+" "+n),B9(a,e.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()),t.node()}function $9(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function z9(t,e,r){return q9(e=$9(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function G9(t,e,r){return q9(e=$9(t=t.append("text"),1,e),[{content:r,type:"normal"}]),(r=e.node()?.getBoundingClientRect())&&t.remove(),r}function U9(e,t,r,n=!1){let i=t.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=me(t=>z9(i,1.1,t)<=e,"checkWidth");for(c of h(l)?[l]:D9(l,h))q9($9(s,o,1.1),c),o++}return(n?(t=s.node().getBBox(),a.attr("x",t.x-2).attr("y",t.y-2).attr("width",t.width+4).attr("height",t.height+4),i):s).node()}function q9(n,t){n.text(""),t.forEach((t,e)=>{var r=n.append("tspan").attr("font-style","em"===t.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===t.type?"bold":"normal");0===e?r.text(t.content):r.text(" "+t.content)})}async function j9(t){let i=[],e=(t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,n)=>(i.push((async()=>{var t=r+":"+n;return await Bt(t)?await Ft(t,void 0,{class:"label-icon"}):``})()),e)),await Promise.all(i));return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>e.shift()??"")}var W9,Y9=t(()=>{Q3(),mu(),th(),e(),N9(),ZE(),jt(),P9(),me(B9,"applyStyle"),me(F9,"addHtmlSpan"),me($9,"createTspan"),me(z9,"computeWidthOfText"),me(G9,"computeDimensionOfText"),me(U9,"createFormattedText"),me(q9,"updateTextContentAndStyles"),me(j9,"replaceIconSubstring"),W9=me(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(M.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a?(n=L9(e,c),a=await j9(XE(n)),n=e.replace(/\\\\/g,"\\"),F9(t,{isNode:s,label:qc(e)?n:a,labelStyle:r.replace("fill:","color:")},o,i,l)):(n=U9(o,t,A9(e.replace(//g,"
").replace("
","
"),c),!!e&&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 H9(t){return(t=t.map((t,e)=>(0===e?"M":"L")+t.x+","+t.y)).push("Z"),t.join(" ")}function V9(e,t,r,n,i,a){var s=[],o=r-e,l=2*Math.PI/(o/a),c=t+(n-t)/2;for(let t=0;t<=50;t++){var h=e+t/50*o,u=c+i*Math.sin(l*(h-e));s.push({x:h,y:u})}return s}function X9(e,r,n,i,t,a){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;t{Y9(),mu(),Q3(),An(),th(),ZE(),K9=me(async(t,e,r)=>{let n,i=e.useHtmlLabels||Dc(D()?.htmlLabels),a=(n=r||"node default",t.insert("g").attr("class",n).attr("id",e.domId||e.id)),s=a.insert("g").attr("class","label").attr("style",wE(e.labelStyle)),o,l=(o=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],await W9(s,Sc(XE(o),D()),{useHtmlLabels:i,width:e.width||D().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img})),c=l.getBBox(),h=(e?.padding??0)/2;if(i){var r=l.children[0],t=H(l),u=r.getElementsByTagName("img");if(u){let n=""===o.replace(/]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=(D().fontSize?D():window.getComputedStyle(document.body)).fontSize,[t=yr.fontSize]=YE(t),r.style.minWidth=t=5*t+"px",r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=r.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),e.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"),Z9=me(async(t,e,r)=>{let n=r.useHtmlLabels||Dc(D()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await W9(i,Sc(XE(e),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 Dc(D()?.flowchart?.htmlLabels)&&(e=a.children[0],l=H(a),s=e.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:t,bbox:s,halfPadding:o,label:i}},"insertLabel"),Q9=me((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),J9=me((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses"),me(H9,"createPathFromPoints"),me(V9,"generateFullSineWavePoints"),me(X9,"generateCirclePoints")});function tL(t,e){return t.intersect(e)}var eL,rL=t(()=>{me(tL,"intersectNode"),eL=tL});function nL(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,s=t-n.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(n.x{me(nL,"intersectEllipse"),iL=nL});function sL(t,e,r){return iL(t,e,e,r)}var oL,lL=t(()=>{aL(),me(sL,"intersectCircle"),oL=sL});function cL(t,e,r,n){var i,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0{me(cL,"intersectLine"),me(hL,"sameSign"),uL=cL});function pL(e,r,n){let t=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=t-e.width/2-s,c=i-e.height/2-o;for(let t=0;t{dL(),me(pL,"intersectPolygon"),gL=pL}),CL=t(()=>{fL=me((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:n+r,y:i+t}},"intersectRect"),mL=fL}),_L=t(()=>{rL(),lL(),aL(),EL(),CL(),yL={node:eL,circle:oL,ellipse:iL,polygon:gL,rect:mL}}),SL=t(()=>{mu(),vL=me(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:D().handDrawnSeed}),"solidStateFill"),xL=me(t=>({stylesMap:t=bL([...t.cssCompiledStyles||[],...t.cssStyles||[]]),stylesArray:[...t]}),"compileStyles"),bL=me(t=>{let r=new Map;return t.forEach(t=>{var[t,e]=t.split(":");r.set(t.trim(),e?.trim())}),r},"styles2Map"),wL=me(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),kL=me(t=>{let e=xL(t).stylesArray,r=[],n=[],i=[],a=[];return e.forEach(t=>{var e=t[0];wL(e)?r.push(t.join(":")+" !important"):(n.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),TL=me((t,e)=>{var{themeVariables:r,handDrawnSeed:n}=D(),{nodeBorder:r,mainBkg:i}=r,t=xL(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:t.get("stroke")||r,seed:n,strokeWidth:t.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides")});function AL(t,e,r){if(t&&t.length){var n,[i,a]=e,e=Math.PI/180*r,s=Math.cos(e),o=Math.sin(e);for(n of t){var[l,c]=n;n[0]=(l-i)*s-(c-a)*o+i,n[1]=(l-i)*o+(c-a)*s+a}}}function LL(t,e){return t[0]===e[0]&&t[1]===e[1]}function NL(t,r,n,e=1){var i=n,n=Math.max(r,.1),p=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,a=[0,0];if(i)for(var s of p)AL(s,a,i);if(r=((e,i)=>{var t,r=[];for(t of p){var n=[...t];LL(n[0],n[n.length-1])||n.push([n[0][0],n[0][1]]),2t.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),o.length){let r=[],n=o[0].ymin,t=0;for(;r.length||o.length;){if(o.length){let e=-1;for(let t=0;tn);t++)e=t;o.splice(0,e+1).forEach(t=>{r.push({s:n,edge:t})})}if((r=r.filter(t=>!(t.edge.ymax<=n))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==i||t%e==0)&&1=r.length);t+=2){var u=r[t].edge,d=r[d].edge;s.push([[Math.round(u.x),n],[Math.round(d.x),n]])}n+=i,r.forEach(t=>{t.edge.x=t.edge.x+i*t.edge.islope}),t++}}return s})(n,e),i){for(var o of p)AL(o,a,-i);{t=a,n=-i;let e=[];r.forEach(t=>e.push(...t)),AL(e,t,n)}}return r}function IL(t,e){let r,n=e.hachureAngle+90,i=e.hachureGap,a=(i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1)),1);return 1<=e.roughness&&.7<((null==(r=e.randomizer)?void 0:r.next())||Math.random())&&(a=i),NL(t,i,n,a||1)}function RL(t){var e=t[0],t=t[1];return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function ML(t,e){return t.type===e}function DL(t){let n=[],i=(t=>{for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:TN,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:EN,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:CN,text:""},e})(t),a="BOD",s=0,o=i[s];for(;!ML(o,CN);){let e=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return DL("M0,0"+t);s++,e=_N[o.text],a=o.text}else ML(o,EN)?e=_N[a]:(s++,e=_N[o.text],a=o.text);if(!(s+ee%2?t+n:t+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((t,e)=>e%2?t+n:t+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((t,e)=>e%2?t+n:t+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=e,n=i}return a}function PL(t){let i=[],a="",s=0,o=0,e=0,r=0,l=0,c=0;for(var{key:n,data:h}of t){switch(n){case"M":i.push({key:"M",data:[...h]}),[s,o]=h,[e,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 t=0,e;e="C"===a||"S"===a?(t=s+(s-l),o+(o-c)):(t=s,o),i.push({key:"C",data:[t,e,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[t,e]=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=t+2*(r-t)/3,g=e+2*(n-e)/3;i.push({key:"C",data:[u,d,p,g,t,e]}),l=r,c=n,s=t,o=e;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||(FL(s,o,b,w,f,m,y,v,x).forEach(function(t){i.push({key:"C",data:t})}),s=b,o=w);break;case"Z":i.push({key:"Z",data:[]}),s=e,o=r}a=n}return i}function BL(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function FL(t,e,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:([t,e]=BL(t,e,-h),[r,n]=BL(r,n,-h),1<(m=(y=(t-r)/2)*y/(i*i)+(v=(e-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+(t+r)/2,f=o*-a*y/i+(e+n)/2,d=Math.asin(parseFloat(((e-f)/a).toFixed(9))),p=Math.asin(parseFloat(((n-f)/a).toFixed(9))),tp&&(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=FL(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=[t,e],a=[t+x*v,e-(m=4/3*a*l)*y],l=[r+x*s,n-m*o],t=[r,n];if(a[0]=2*i[0]-a[0],a[1]=2*i[1]-a[1],c)return[a,l,t].concat(u);u=[a,l,t].concat(u);var b=[];for(let t=0;t2*Math.PI&&(c=0,h=2*Math.PI),i=2*Math.PI/l.curveStepCount,i=iN(a=Math.min(i/2,(h-c)/2),t,e,r,n,c,h,1,l),l.disableMultiStroke||(a=iN(a,t,e,r,n,c,h,1.5,l),i.push(...a)),s&&(o?i.push(...JL(t,e,t+r*Math.cos(c),e+n*Math.sin(c),l),...JL(t,e,t+r*Math.cos(h),e+n*Math.sin(h),l)):i.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+r*Math.cos(c),e+n*Math.sin(c)]})),{type:"path",ops:i}}function YL(t,e){let r=PL(OL(DL(t))),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(...JL(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;n.push(...aN(l,c,h,u,d,p,a,e)),a=[d,p];break;case"Z":n.push(...JL(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function HL(t,e){var r,n=[];for(r of t)if(r.length){var i=e.maxRandomnessOffset||0,a=r.length;if(2{let e=r.fillStyle||"hachure";if(!wN[e])switch(e){case"zigzag":wN[e]||(wN[e]=new mN(t));break;case"cross-hatch":wN[e]||(wN[e]=new yN(t));break;case"dots":wN[e]||(wN[e]=new vN(t));break;case"dashed":wN[e]||(wN[e]=new xN(t));break;case"zigzag-line":wN[e]||(wN[e]=new bN(t));break;default:e="hachure",wN[e]||(wN[e]=new fN(t))}return wN[e]})(SN).fillPolygons(t,r)}function XL(t){var e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function KL(t){return t.randomizer||(t.randomizer=new kN(t.seed||0)),t.randomizer.next()}function ZL(t,e,r,n=1){return r.roughness*n*(KL(r)*(e-t)+t)}function QL(t,e,r=1){return ZL(-t,t,e,r)}function JL(t,e,r,n,i,a=!1){var a=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=tN(t,e,r,n,i,!0,!1);return a?s:(a=tN(t,e,r,n,i,!0,!0),s.concat(a))}function tN(t,e,r,n,i,a,s){let o=Math.pow(t-r,2)+Math.pow(e-n,2),l=Math.sqrt(o),c,h=(c=l<200?1:500o?l/10:h)/2,d=.2+.2*KL(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=QL(p,i,c),g=QL(g,i,c);var f=[],m=me(()=>QL(u,i,c),"M"),y=me(()=>QL(h,i,c),"k"),v=i.preserveVertices;return a&&f.push(s?{op:"move",data:[t+(v?0:m()),e+(v?0:m())]}:{op:"move",data:[t+(v?0:QL(h,i,c)),e+(v?0:QL(h,i,c))]}),f.push(s?{op:"bcurveTo",data:[p+t+(r-t)*d+m(),g+e+(n-e)*d+m(),p+t+2*(r-t)*d+m(),g+e+2*(n-e)*d+m(),r+(v?0:m()),n+(v?0:m())]}:{op:"bcurveTo",data:[p+t+(r-t)*d+y(),g+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),g+e+2*(n-e)*d+y(),r+(v?0:y()),n+(v?0:y())]}),f}function eN(e,r,n){if(!e.length)return[];var i=[];i.push([e[0][0]+QL(r,n),e[0][1]+QL(r,n)]),i.push([e[0][0]+QL(r,n),e[0][1]+QL(r,n)]);for(let t=1;t{let t=l[c+0],e=l[c+1],r=l[c+2],n=l[c+3],i=3*e[0]-2*t[0]-n[0],a=(i*=i,3*e[1]-2*t[1]-n[1]);a*=a;var s=3*r[0]-2*n[0]-t[0],o=(s*=s,3*r[1]-2*n[1]-t[1]);return o*=o,il&&(l=h,c=t)}return Math.sqrt(l)>t?(pN(e,r,c+1,t,a),pN(e,c,n,t,a)):(a.length||a.push(s),a.push(o)),a}function gN(e,r=.15,t){var n=[],i=(e.length-1)/3;for(let t=0;t{me(AL,"t"),me(LL,"e"),me(NL,"s"),me(IL,"n"),fN=class{static{me(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=IL(t,e),{type:"fillSketch",ops:this.renderLines(t,e)}}renderLines(t,e){var r,n=[];for(r of t)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return n}},me(RL,"a"),mN=class extends fN{static{me(this,"h")}fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);var n,i,t=IL(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([n,i]of t)RL([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,e)}}},yN=class extends fN{static{me(this,"r")}fillPolygons(t,e){var r=this._fillPolygons(t,e),e=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),t=this._fillPolygons(t,e);return r.ops=r.ops.concat(t.ops),r}},vN=class{static{me(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){return t=IL(t,e=Object.assign({},e,{hachureAngle:0})),this.dotsOnLines(t,e)}dotsOnLines(t,e){let r=[],n=e.hachureGap,i=(n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1),e.fillWeight);i<0&&(i=e.strokeWidth/2);var a,s=n/4;for(a of t){var o=RL(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 t=0;t{let e=RL(t),r=Math.floor(e/(h+u)),n=(e+u-r*(h+u))/2,i=t[0],a=t[1];i[0]>a[0]&&(i=t[1],a=t[0]);var s=Math.atan((a[1]-i[1])/(a[0]-i[0]));for(let t=0;t{let e=RL(t),r=Math.round(e/(2*c)),n=t[0],i=t[1];n[0]>i[0]&&(n=t[1],i=t[0]);var a=Math.atan((i[1]-n[1])/(i[0]-n[0]));for(let t=0;t{var i=d,a=p,s=Math.abs(g/2),o=Math.abs(t/2);s+=QL(.01*s,n),o+=QL(.01*o,n);let l=e,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 t=l;t<=c;t+=h)u.push([i+s*Math.cos(t),a+o*Math.sin(t)]);return u.push([i+s*Math.cos(c),a+o*Math.sin(c)]),u.push([i,a]),VL([u],n)})(t,e,r,i))),i.stroke!==AN&&a.push(s),this._d("arc",a,i)}curve(t,e){var r=this._o(e),e=[],n=UL(t,r);if(r.fill&&r.fill!==AN)if("solid"===r.fillStyle){var i=UL(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));e.push({type:"fillPath",ops:this._mergedShape(i.ops)})}else{var a,s=[];if((i=t).length)for(a of"number"==typeof i[0][0]?[i]:i)a.length<3?s.push(...a):3===a.length?s.push(...gN(oN([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...gN(oN(a),10,(1+r.roughness)/2));s.length&&e.push(VL([s],r))}return r.stroke!==AN&&e.push(n),this._d("curve",e,r)}polygon(t,e){var r=[],n=zL(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(HL([t],e)):r.push(VL([t],e))),e.stroke!==AN&&r.push(n),this._d("polygon",r,e)}path(t,e){let r=this._o(e),n=[];var i,a,s,o;return t&&(t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),e=r.fill&&"transparent"!==r.fill&&r.fill!==AN,i=r.stroke!==AN,s=((t,e)=>{let r=PL(OL(DL(t))),n=[],i=[],a=[0,0],s=[],o=me(()=>{4<=s.length&&i.push(...gN(s,1)),s=[]},"i"),l=me(()=>{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(),!e)return n;var d,p=[];for(d of n){var g=dN(d,e);g.length&&p.push(g)}return p})(t,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=YL(t,r),e&&("solid"===r.fillStyle?1===s.length?(e=YL(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),n.push({type:"fillPath",ops:this._mergedShape(e.ops)})):n.push(HL(s,r)):n.push(VL(s,r))),i)&&(a?s.forEach(t=>{n.push(zL(t,!1,r))}):n.push(o)),this._d("path",n,r)}opsToPath(t,e){let r="";for(var n of t.ops){var i="number"==typeof e&&0<=e?n.data.map(t=>+t.toFixed(e)):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(t){var e,r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(e of r){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:AN};break;case"fillPath":t={d:this.opsToPath(e),stroke:AN,strokeWidth:0,fill:n.fill||AN};break;case"fillSketch":t=this.fillSketch(e,n)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||AN,strokeWidth:r,fill:AN}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}},NN=class{static{me(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new LN(e)}draw(t){var e,r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(e of r)switch(e.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,e,a),i.restore();break;case"fillPath":i.save(),i.fillStyle=n.fill||"";var s="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,e,a,s),i.restore();break;case"fillSketch":this.fillSketch(i,e,n)}}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=n,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,n="nonzero"){t.beginPath();for(var i of e.ops){var a="number"==typeof r&&0<=r?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,n,i){return t=this.gen.line(t,e,r,n,i),this.draw(t),t}rectangle(t,e,r,n,i){return t=this.gen.rectangle(t,e,r,n,i),this.draw(t),t}ellipse(t,e,r,n,i){return t=this.gen.ellipse(t,e,r,n,i),this.draw(t),t}circle(t,e,r,n){return t=this.gen.circle(t,e,r,n),this.draw(t),t}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t),t}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t),t}arc(t,e,r,n,i,a,s=!1,o){return t=this.gen.arc(t,e,r,n,i,a,s,o),this.draw(t),t}curve(t,e){return t=this.gen.curve(t,e),this.draw(t),t}path(t,e){return t=this.gen.path(t,e),this.draw(t),t}},IN="http://www.w3.org/2000/svg",RN=class{static{me(this,"ot")}constructor(t,e){this.svg=t,this.gen=new LN(e)}draw(e){var r,t=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(IN,"g"),s=e.options.fixedDecimalPlaceDigits;for(r of t){let t=null;switch(r.type){case"path":(t=i.createElementNS(IN,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke",n.stroke),t.setAttribute("stroke-width",n.strokeWidth+""),t.setAttribute("fill","none"),n.strokeLineDash&&t.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",""+n.strokeLineDashOffset);break;case"fillPath":(t=i.createElementNS(IN,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",n.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(i,r,n)}t&&a.appendChild(t)}return a}fillSketch(t,e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),(t=t.createElementNS(IN,"path")).setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),t.setAttribute("stroke",r.fill||""),t.setAttribute("stroke-width",n+""),t.setAttribute("fill","none"),r.fillLineDash&&t.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&t.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),t}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,n,i){return t=this.gen.line(t,e,r,n,i),this.draw(t)}rectangle(t,e,r,n,i){return t=this.gen.rectangle(t,e,r,n,i),this.draw(t)}ellipse(t,e,r,n,i){return t=this.gen.ellipse(t,e,r,n,i),this.draw(t)}circle(t,e,r,n){return t=this.gen.circle(t,e,r,n),this.draw(t)}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t)}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t)}arc(t,e,r,n,i,a,s=!1,o){return t=this.gen.arc(t,e,r,n,i,a,s,o),this.draw(t)}curve(t,e){return t=this.gen.curve(t,e),this.draw(t)}path(t,e){return t=this.gen.path(t,e),this.draw(t)}},MN={canvas:me((t,e)=>new NN(t,e),"canvas"),svg:me((t,e)=>new RN(t,e),"svg"),generator:me(t=>new LN(t),"generator"),newSeed:me(()=>LN.newSeed(),"newSeed")}});function ON(t,e){var r=kL(e).labelStyles;e.labelStyle=r;let n=J9(e),i=n,a=(n||(i="anchor"),t.insert("g").attr("class",i).attr("id",e.domId||e.id)),s=e.cssStyles,o=MN.svg(a),l=TL(e,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==e.look&&(l.roughness=0),o.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",wE(s)),Q9(e,h),e.intersect=function(t){return M.info("Circle intersect",e,1,t),yL.circle(e,1,t)},a}var PN=t(()=>{e(),i(),_L(),SL(),DN(),ZE(),me(ON,"anchor")});function BN(t,e,r,n,i,a,s){var o=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=Math.sqrt(((r-t)/2/i)**2+((n-e)/2/a)**2);if(1f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),Q9(e,m),e.intersect=function(t){return yL.polygon(e,u,t)},i}var $N=t(()=>{i(),_L(),SL(),DN(),me(BN,"generateArcPoints"),me(FN,"bowTieRect")});function zN(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var GN=t(()=>{me(zN,"insertPolygonShape")});async function UN(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(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 t=MN.svg(a),e=TL(i,{}),r=H9(h),n=t.path(r,e);u=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=zN(a,o,s,h);return r&&u.attr("style",r),Q9(i,u),i.intersect=function(t){return yL.polygon(i,h,t)},a}var qN=t(()=>{i(),_L(),SL(),DN(),GN(),i(),me(UN,"card")});function jN(t,e){var r=kL(e).nodeStyles;e.label="";let n=t.insert("g").attr("class",J9(e)).attr("id",e.domId??e.id),i=e.cssStyles,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=MN.svg(n),l=TL(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),H9(s)),h=o.path(c,l),u=n.insert(()=>h,":first-child");return i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),r&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return yL.polygon(e,s,t)},n}var WN=t(()=>{_L(),DN(),SL(),i(),me(jN,"choice")});async function YN(t,n){var{labelStyles:e,nodeStyles:r}=kL(n);n.labelStyle=e;let{shapeSvg:i,bbox:a,halfPadding:s}=await K9(t,n,J9(n)),o=a.width/2+s,l,c=n.cssStyles;if("handDrawn"===n.look){let t=MN.svg(i),e=TL(n,{}),r=t.circle(0,0,2*o,e);(l=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",wE(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 Q9(n,l),n.intersect=function(t){return M.info("Circle intersect",n,o,t),yL.circle(n,o,t)},i}var HN=t(()=>{e(),i(),_L(),SL(),DN(),ZE(),me(YN,"circle")});function VN(t){var e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(t*=2)/2*e},${t/2*r} L ${t/2*e},${-t/2*r} + M ${t/2*e},${t/2*r} L ${-t/2*e},`+-t/2*r}function XN(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",J9(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),s=e.cssStyles,o=MN.svg(i),l=TL(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=VN(a),u=o.path(h,l),d=i.insert(()=>c,":first-child");return d.insert(()=>u),s&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",n),Q9(e,d),e.intersect=function(t){return M.info("crossedCircle intersect",e,{radius:a,point:t}),yL.circle(e,a,t)},i}var KN=t(()=>{e(),i(),SL(),DN(),_L(),me(VN,"createLine"),me(XN,"crossedCircle")});function ZN(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;tv,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.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+(e.padding??0)/2-(a.y-(a.top??0))})`),Q9(e,x),e.intersect=function(t){return yL.polygon(e,d,t)},i}var JN=t(()=>{i(),_L(),SL(),DN(),me(ZN,"generateCirclePoints"),me(QN,"curlyBraceLeft")});function tI(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;tv,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Q9(e,x),e.intersect=function(t){return yL.polygon(e,d,t)},i}var rI=t(()=>{i(),_L(),SL(),DN(),me(tI,"generateCirclePoints"),me(eI,"curlyBraceRight")});function nI(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;tw,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Q9(e,k),e.intersect=function(t){return yL.polygon(e,p,t)},i}var aI=t(()=>{i(),_L(),SL(),DN(),me(nI,"generateCirclePoints"),me(iI,"curlyBraces")});async function sI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await K9(t,e,J9(e))),i=Math.max(80,1.25*(t.width+2*(e.padding??0)),e?.width??0),a=(t=Math.max(20,t.height+2*(e.padding??0),e?.height??0))/2,s=e.cssStyles,o=MN.svg(r),l=TL(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=i,h=t,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},...X9(-u,-h/2,a,50,270,90)],g=H9(p),f=o.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),s&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",s),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-i/2}, ${-t/2})`),Q9(e,m),e.intersect=function(t){return yL.polygon(e,p,t)},r}var oI=t(()=>{i(),_L(),SL(),DN(),me(sI,"curvedTrapezoid")});async function lI(t,a){var{labelStyles:e,nodeStyles:r}=kL(a);a.labelStyle=e;let{shapeSvg:s,bbox:n,label:i}=await K9(t,a,J9(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 t=MN.svg(s),e=hI(0,0,o,h,l,c),r=uI(0,c,o,h,l,c),n=t.path(e,TL(a,{})),i=t.path(r,TL(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 e=cI(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wE(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),Q9(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(e){var r=yL.rect(a,e),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 t=c*c*(1-n*n/(l*l));0{i(),_L(),SL(),DN(),ZE(),cI=me((t,e,r,n,i,a)=>[`M${t},`+(e+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"),hI=me((t,e,r,n,i,a)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),uI=me((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),me(lI,"cylinder")});async function pI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=t.width+e.padding,s=.2*(o=t.height+e.padding),a=-a/2,o=-o/2-s/2,l=e.cssStyles,c=MN.svg(r),h=TL(e,{});"handDrawn"!==e.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(t=>[t.x,t.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),i.attr("transform",`translate(${a+(e.padding??0)/2-(t.x-(t.left??0))}, ${o+s+(e.padding??0)/2-(t.y-(t.top??0))})`),Q9(e,p),e.intersect=function(t){return yL.rect(e,t)},r}var gI=t(()=>{i(),_L(),SL(),DN(),me(pI,"dividedRectangle")});async function fI(t,e){var r,{labelStyles:n,nodeStyles:i}=kL(e);e.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:o}=await K9(t,e,J9(e)),l=s.width/2+o+5,c=s.width/2+o,h,u=e.cssStyles;return"handDrawn"===e.look?(n=MN.svg(a),t=TL(e,{roughness:.2,strokeWidth:2.5}),r=TL(e,{roughness:.2,strokeWidth:1.5}),t=n.circle(0,0,2*l,t),n=n.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",wE(e.cssClasses)).attr("style",wE(u)),h.node()?.appendChild(t),h.node()?.appendChild(n)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),t=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),t.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)),Q9(e,h),e.intersect=function(t){return M.info("DoubleCircle intersect",e,l,t),yL.circle(e,l,t)},a}var mI=t(()=>{e(),i(),_L(),SL(),DN(),ZE(),me(fI,"doublecircle")});function yI(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=kL(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",J9(e)).attr("id",e.domId??e.id),s=e.cssStyles,o=MN.svg(a),l=r.nodeBorder,c=TL(e,{fillStyle:"solid"}),h=("handDrawn"!==e.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{DN(),e(),_L(),SL(),i(),me(yI,"filledCircle")});async function xI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=a.width+(e.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=e.cssStyles,d=MN.svg(i),p=TL(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),H9(h)),f=d.path(g,p),m=i.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),e.width=o,e.height=l,Q9(e,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return M.info("Triangle intersect",e,h,t),yL.polygon(e,h,t)},i}var bI=t(()=>{e(),i(),_L(),SL(),DN(),i(),me(xI,"flippedTriangle")});function wI(t,e,{dir:r,config:{state:n,themeVariables:i}}){var a=kL(e).nodeStyles;e.label="";let s=t.insert("g").attr("class",J9(e)).attr("id",e.domId??e.id),o=e.cssStyles,l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));var t=-1*l/2,r=-1*c/2,h=MN.svg(s),i=TL(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(i.roughness=0,i.fillStyle="solid");let u=h.rectangle(t,r,l,c,i),d=s.insert(()=>u,":first-child");return o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),Q9(e,d),h=n?.padding??0,e.width&&e.height&&(e.width+=h/2||0,e.height+=h/2||0),e.intersect=function(t){return yL.rect(e,t)},s}var kI=t(()=>{DN(),_L(),SL(),i(),me(wI,"forkJoin")});async function TI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await K9(t,e,J9(e)),s=Math.max(80,a.width+2*(e.padding??0),e?.width??0),o=Math.max(50,a.height+2*(e.padding??0),e?.height??0),l=o/2,c=e.cssStyles,h=MN.svg(i),u=TL(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...X9(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=H9(d),g=h.path(p,u),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),Q9(e,f),e.intersect=function(t){return M.info("Pill intersect",e,{radius:l,point:t}),yL.polygon(e,d,t)},i}var EI=t(()=>{e(),i(),_L(),SL(),DN(),me(TI,"halfRoundedRectangle")});async function CI(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(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 t=MN.svg(a),e=TL(i,{}),r=_I(0,0,l,s,o),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=zN(a,l,s,c);return r&&h.attr("style",r),i.width=l,i.height=s,Q9(i,h),i.intersect=function(t){return yL.polygon(i,c,t)},a}var _I,SI=t(()=>{i(),_L(),SL(),DN(),GN(),_I=me((t,e,r,n,i)=>[`M${t+i},`+e,`L${t+r-i},`+e,`L${t+r},`+(e-n/2),`L${t+r-i},`+(e-n),`L${t+i},`+(e-n),`L${t},`+(e-n/2),"Z"].join(" "),"createHexagonPathD"),me(CI,"hexagon")});async function AI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),r=(e.label="",e.labelStyle=r,(await K9(t,e,J9(e))).shapeSvg),t=Math.max(30,e?.width??0),i=Math.max(30,e?.height??0),a=e.cssStyles,s=MN.svg(r),o=TL(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:t,y:0},{x:0,y:i},{x:t,y:i}],c=H9(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",n),u.attr("transform",`translate(${-t/2}, ${-i/2})`),Q9(e,u),e.intersect=function(t){return M.info("Pill intersect",e,{points:l}),yL.polygon(e,l,t)},r}var LI=t(()=>{e(),i(),_L(),SL(),DN(),me(AI,"hourglass")});async function NI(t,i,{config:{themeVariables:e,flowchart:r}}){var n,a=kL(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 K9(t,i,"icon-shape default"),c="t"===i.pos,h=a,u=a,d=e.nodeBorder,p=xL(i).stylesMap,g=-u/2,f=-h/2,m=i.label?8:0,y=MN.svg(s),v=TL(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(`${await Ft(i.icon,{height:a,width:a,fallbackPrefix:""})}`),e=(t=r.node().getBBox()).width,a=t.height,n=t.y,r.attr("transform",`translate(${-e/2-t.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})`),Q9(i,E),i.intersect=function(t){var e,r,n;return M.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-o.width/2,y:e-r/2},{x:n+o.width/2,y:e-r/2},{x:n+o.width/2,y:e-r/2+o.height+m},{x:n+u/2,y:e-r/2+o.height+m},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+o.height+m},{x:n-o.width/2,y:e-r/2+o.height+m}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+o.width/2,y:e-r/2+h},{x:n+o.width/2/2,y:e+r/2},{x:n-o.width/2,y:e+r/2},{x:n-o.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],yL.polygon(i,n,t)):yL.rect(i,t)},s}var II=t(()=>{DN(),e(),jt(),_L(),SL(),i(),me(NI,"icon")});async function RI(t,e,{config:{themeVariables:r,flowchart:n}}){var i=kL(e).labelStyles,i=(e.labelStyle=i,e.assetHeight??48),i=Math.max(i,e.assetWidth??48),n=n?.wrappingWidth,{shapeSvg:n,bbox:t,label:a}=(e.width=Math.max(i,n??0),await K9(t,e,"icon-shape default")),s=e.label?8:0,o="t"===e.pos,{nodeBorder:r,mainBkg:l}=r,c=xL(e).stylesMap,h=MN.svg(n),u=TL(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,n.append("g"));e.icon&&d.html(`${await Ft(e.icon,{height:i,width:i,fallbackPrefix:""})}`);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,t.width),w=v+t.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?t.height/2+s/2-f/2-y:-t.height/2-s/2-f/2-y})`),d.attr("style",`color: ${c.get("stroke")??r};`),a.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))},${o?-w/2:w/2-t.height})`),T.attr("transform",`translate(0,${o?t.height/2+s/2:-t.height/2-s/2})`),Q9(e,E),e.intersect=function(t){return M.info("iconSquare intersect",e,t),yL.rect(e,t)},n}var MI,DI=t(()=>{DN(),e(),jt(),_L(),SL(),i(),me(RI,"iconCircle")}),OI=t(()=>{MI=me((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD")});async function PI(t,i,{config:{themeVariables:e,flowchart:r}}){var n=kL(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 K9(t,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=e,g=xL(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=MN.svg(a),x=TL(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(MI(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"),_=a.insert(()=>E);return i.icon&&((t=a.append("g")).html(`${await Ft(i.icon,{height:n,width:n,fallbackPrefix:""})}`),r=(e=t.node().getBBox()).width,n=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),t.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})`),Q9(i,_),i.intersect=function(t){var e,r,n;return M.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+y},{x:n+u/2,y:e-r/2+s.height+y},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+s.height+y},{x:n-s.width/2,y:e-r/2+s.height+y}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+s.width/2,y:e-r/2+h},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],yL.polygon(i,n,t)):yL.rect(i,t)},a}var BI=t(()=>{DN(),e(),jt(),_L(),SL(),OI(),i(),me(PI,"iconRounded")});async function FI(t,i,{config:{themeVariables:e,flowchart:r}}){var n=kL(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 K9(t,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=e,g=xL(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=MN.svg(a),x=TL(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(MI(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"),_=a.insert(()=>E);return i.icon&&((t=a.append("g")).html(`${await Ft(i.icon,{height:n,width:n,fallbackPrefix:""})}`),r=(e=t.node().getBBox()).width,n=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),t.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})`),Q9(i,_),i.intersect=function(t){var e,r,n;return M.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+y},{x:n+u/2,y:e-r/2+s.height+y},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+s.height+y},{x:n-s.width/2,y:e-r/2+s.height+y}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+s.width/2,y:e-r/2+h},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],yL.polygon(i,n,t)):yL.rect(i,t)},a}var $I=t(()=>{DN(),e(),jt(),_L(),OI(),SL(),i(),me(FI,"iconSquare")});async function zI(t,i,{config:{flowchart:e}}){(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,kL(i).labelStyles),a=(i.labelStyle=a,e?.wrappingWidth);i.defaultWidth=e?.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 K9(t,i,"image-shape default")),d="t"===i.pos,p=-o/2,g=-l/2,f=i.label?8:0,m=MN.svg(c),y=TL(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&&((e=c.append("image")).attr("href",i.img),e.attr("width",o),e.attr("height",l),e.attr("preserveAspectRatio","none"),e.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})`),Q9(i,T),i.intersect=function(t){var e,r,n;return M.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=d?[{x:n-h.width/2,y:e-r/2},{x:n+h.width/2,y:e-r/2},{x:n+h.width/2,y:e-r/2+h.height+f},{x:n+o/2,y:e-r/2+h.height+f},{x:n+o/2,y:e+r/2},{x:n-o/2,y:e+r/2},{x:n-o/2,y:e-r/2+h.height+f},{x:n-h.width/2,y:e-r/2+h.height+f}]:[{x:n-o/2,y:e-r/2},{x:n+o/2,y:e-r/2},{x:n+o/2,y:e-r/2+l},{x:n+h.width/2,y:e-r/2+l},{x:n+h.width/2/2,y:e+r/2},{x:n-h.width/2,y:e+r/2},{x:n-h.width/2,y:e-r/2+l},{x:n-o/2,y:e-r/2+l}],yL.polygon(i,n,t)):yL.rect(i,t)},c}var GI=t(()=>{DN(),e(),_L(),SL(),i(),me(zI,"imageSquare")});async function UI(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(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 t=MN.svg(a),e=TL(i,{}),r=H9(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=zN(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,Q9(i,c),i.intersect=function(t){return yL.polygon(i,l,t)},a}var qI=t(()=>{i(),_L(),SL(),DN(),GN(),me(UI,"inv_trapezoid")});async function jI(t,n,e){var{labelStyles:r,nodeStyles:i}=kL(n);n.labelStyle=r;let{shapeSvg:a,bbox:s}=await K9(t,n,J9(n)),o=Math.max(s.width+2*e.labelPaddingX,n?.width||0),l=Math.max(s.height+2*e.labelPaddingY,n?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=n,g=n.cssStyles;if(e?.rx&&e.ry&&(d=e.rx,p=e.ry),"handDrawn"===n.look){let t=MN.svg(a),e=TL(n,{}),r=d||p?t.path(MI(c,h,o,l,d||0),e):t.rectangle(c,h,o,l,e);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",wE(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",wE(d)).attr("ry",wE(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return Q9(n,u),n.intersect=function(t){return yL.rect(n,t)},a}var WI=t(()=>{i(),_L(),OI(),SL(),DN(),ZE(),me(jI,"drawRect")});async function YI(t,e){var{shapeSvg:t,bbox:r,label:n}=await K9(t,e,"label"),i=t.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),n.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),Q9(e,i),e.intersect=function(t){return yL.rect(e,t)},t}var HI=t(()=>{WI(),i(),_L(),me(YI,"labelRect")});async function VI(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(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 t=MN.svg(a),e=TL(i,{}),r=H9(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=zN(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,Q9(i,c),i.intersect=function(t){return yL.polygon(i,l,t)},a}var XI=t(()=>{i(),_L(),SL(),DN(),GN(),me(VI,"lean_left")});async function KI(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(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 t=MN.svg(a),e=TL(i,{}),r=H9(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=zN(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,Q9(i,c),i.intersect=function(t){return yL.polygon(i,l,t)},a}var ZI=t(()=>{i(),_L(),SL(),DN(),GN(),me(KI,"lean_right")});function QI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",J9(e)).attr("id",e.domId??e.id),a=e.cssStyles,s=Math.max(35,e?.width??0),o=Math.max(35,e?.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=MN.svg(i),h=TL(e,{}),u=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),H9(l)),d=c.path(u,h),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${s/2},${-o})`),Q9(e,p),e.intersect=function(t){return M.info("lightningBolt intersect",e,t),yL.polygon(e,l,t)},i}var JI=t(()=>{e(),i(),SL(),DN(),_L(),i(),me(QI,"lightningBolt")});async function tR(t,s){var{labelStyles:e,nodeStyles:r}=kL(s);s.labelStyle=e;let{shapeSvg:o,bbox:n,label:i}=await K9(t,s,J9(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 t=MN.svg(o),e=rR(0,0,l,u,c,h,d),r=nR(0,h,l,u,c,h),n=TL(s,{}),i=t.path(e,n),a=t.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 e=eR(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wE(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),Q9(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(e){var r=yL.rect(s,e),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 t=h*h*(1-n*n/(c*c));0{i(),_L(),SL(),DN(),ZE(),eR=me((t,e,r,n,i,a,s)=>[`M${t},`+(e+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${t},`+(e+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),rR=me((t,e,r,n,i,a,s)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},`+(e+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),nR=me((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),me(tR,"linedCylinder")});async function aR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=s+o,c=e.cssStyles,h=MN.svg(r),u=TL(e,{});"handDrawn"!==e.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},...V9(-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(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",c),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)+a/2*.1/2-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),Q9(e,g),e.intersect=function(t){return yL.polygon(e,d,t)},r}var sR=t(()=>{i(),_L(),DN(),SL(),me(aR,"linedWaveEdgedRect")});async function oR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=MN.svg(i),p=TL(e,{}),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"!==e.look&&(p.roughness=0,p.fillStyle="solid"),H9(g)),y=d.path(m,p),v=H9(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"!==e.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==e.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))})`),Q9(e,b),e.intersect=function(t){return yL.polygon(e,g,t)},i}var lR=t(()=>{i(),SL(),DN(),_L(),me(oR,"multiRect")});async function cR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,p=e.cssStyles,g=V9(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=MN.svg(i),x=TL(e,{}),b=("handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid"),H9(m)),w=v.path(b,x),k=H9(y),T=v.path(k,x),E=i.insert(()=>w,":first-child");return E.insert(()=>T),E.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",p),n&&"handDrawn"!==e.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))})`),Q9(e,E),e.intersect=function(t){return yL.polygon(e,m,t)},i}var hR=t(()=>{i(),_L(),DN(),SL(),me(cR,"multiWaveEdgedRectangle")});async function uR(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=kL(e),{shapeSvg:n,bbox:t}=(e.labelStyle=n,e.useHtmlLabels||!1!==Ir().flowchart?.htmlLabels||(e.centerLabel=!0),await K9(t,e,J9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=-a/2,o=-(t=Math.max(t.height+2*(e.padding??0),e?.height??0))/2,l=e.cssStyles,c=MN.svg(n),r=TL(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(r.roughness=0,r.fillStyle="solid");let h=c.rectangle(s,o,a,t,r),u=n.insert(()=>h,":first-child");return u.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),Q9(e,u),e.intersect=function(t){return yL.rect(e,t)},n}var dR=t(()=>{DN(),_L(),SL(),i(),Nn(),me(uR,"note")});async function pR(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(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 t=MN.svg(a),e=TL(i,{}),r=gR(0,0,l),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=zN(a,l,l,c);return r&&h.attr("style",r),Q9(i,h),i.intersect=function(t){return M.debug(`APA12 Intersect called SPLIT point:`,t,` node: -`,n,` -res:`,mL.polygon(n,c,t)),mL.polygon(n,c,t)},a}var pR,gR=t(()=>{e(),n(),CL(),_L(),MN(),zN(),pR=me((t,e,r)=>[`M${t+r/2},`+e,`L${t+r},`+(e-r/2),`L${t+r/2},`+(e-r),`L${t},`+(e-r/2),"Z"].join(" "),"createDecisionBoxPathD"),me(dR,"question")});async function fR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.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=e.cssStyles,g=RN.svg(n),f=kL(e,{}),m=("handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid"),Y9(d)),y=g.path(m,f),v=n.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),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))})`),Z9(e,v),e.intersect=function(t){return mL.polygon(e,d,t)},n}var mR=t(()=>{n(),CL(),_L(),MN(),me(fR,"rect_left_inv_arrow")});function yR(t,e){e&&t.attr("style",e)}async function vR(t){let e=j(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=t.label;return t.label&&Uc(t.label)&&(i=await jc(t.label.replace(L.lineBreakRegex,` -`),D())),r.html('"+i+""),yR(r,t.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"),e.node()}var xR,bR,wR=t(()=>{Z3(),e(),fu(),Jc(),KE(),me(yR,"applyStyle"),me(vR,"addHtmlLabel"),xR=me(async(t,e,r,i)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),Mc(D().flowchart.htmlLabels))return n=n.replace(/\\n|\n/g,"
"),M.info("vertexText"+n),vR({isNode:i,label:VE(n).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),labelStyle:e&&e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof n?n.split(/\\n|\n|/gi):Array.isArray(n)?n:[]){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"),bR=xR});async function kR(n,a){var{labelStyles:t,nodeStyles:e}=wL(a);a.labelStyle=t;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",n.insert("g").attr("class",r).attr("id",a.domId||a.id)),i=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",e),l=a.description,c=a.label,h=o.node().appendChild(await bR(c,a.labelStyle,!0,!0)),u={width:0,height:0};Mc(D()?.flowchart?.htmlLabels)&&(t=h.children[0],n=j(h),u=t.getBoundingClientRect(),n.attr("width",u.width),n.attr("height",u.height)),M.info("Text 2",l);var t=l||[],n=h.getBBox(),d=(t=o.node().appendChild(await bR(t.join?t.join("
"):t,a.labelStyle,!0,!0))).children[0],p=j(t),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);j(t).attr("transform","translate( "+(u.width>n.width?0:(n.width-u.width)/2)+", "+(n.height+d+5)+")"),j(h).attr("transform","translate( "+(u.width(M.debug("Rough node insert CXC",r),i),":first-child"),v=s.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")}else v=i.insert("rect",":first-child"),x=i.insert("line"),v.attr("class","outer title-state").attr("style",e).attr("x",-u.width/2-d).attr("y",-u.height/2-d).attr("width",u.width+(a.padding||0)).attr("height",u.height+(a.padding||0)),x.attr("class","divider").attr("x1",-u.width/2-d).attr("x2",u.width/2+d).attr("y1",-u.height/2-d+n.height+d).attr("y2",-u.height/2-d+n.height+d);return Z9(a,v),a.intersect=function(t){return mL.rect(a,t)},s}var TR=t(()=>{Z3(),Jc(),n(),wR(),CL(),_L(),MN(),fu(),DI(),e(),me(kR,"rectWithTitle")});async function ER(t,e){return qI(t,e,{rx:5,ry:5,classes:"",labelPaddingX:+(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var CR=t(()=>{jI(),me(ER,"roundedRect")});async function _R(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=e?.padding??0,s=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),l=-t.width/2-a,a=-t.height/2-a,c=e.cssStyles,h=RN.svg(r),u=kL(e,{});"handDrawn"!==e.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(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",bE(c)),i&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),n.attr("transform",`translate(${-s/2+4+(e.padding??0)-(t.x-(t.left??0))},${-o/2+(e.padding??0)-(t.y-(t.top??0))})`),Z9(e,g),e.intersect=function(t){return mL.rect(e,t)},r}var SR=t(()=>{n(),CL(),_L(),MN(),KE(),me(_R,"shadedProcess")});async function AR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=-a/2,l=-s/2,c=e.cssStyles,h=RN.svg(r),u=kL(e,{});"handDrawn"!==e.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=Y9(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),i&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(0, ${s/4})`),n.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))}, ${-s/4+(e.padding??0)-(t.y-(t.top??0))})`),Z9(e,f),e.intersect=function(t){return mL.polygon(e,d,t)},r}var LR=t(()=>{n(),CL(),_L(),MN(),me(AR,"slopedRect")});async function NR(t,e){return qI(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var IR=t(()=>{jI(),me(NR,"squareRect")});async function RR(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(n)),s=i.height+n.padding,o=i.width+s/4+n.padding,l,c=n.cssStyles;if("handDrawn"===n.look){let t=RN.svg(a),e=kL(n,{}),r=RI(-o/2,-s/2,o,s,s/2),i=t.path(r,e);(l=a.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",bE(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 Z9(n,l),n.intersect=function(t){return mL.rect(n,t)},a}var MR=t(()=>{n(),CL(),_L(),MN(),DI(),KE(),me(RR,"stadium")});async function DR(t,e){return qI(t,e,{rx:5,ry:5,classes:"flowchart-node"})}var OR=t(()=>{jI(),me(DR,"state")});function PR(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=wL(e),i=(e.labelStyle=i,e.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s}=r,t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),o=RN.svg(t),l=kL(e,{});"handDrawn"!==e.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=t.insert(()=>c,":first-child");return d.insert(()=>u),i&&d.selectAll("path").attr("style",i),n&&d.selectAll("path").attr("style",n),Z9(e,d),e.intersect=function(t){return mL.circle(e,7,t)},t}var BR=t(()=>{MN(),CL(),_L(),n(),me(PR,"stateEnd")});function FR(t,e,{config:{themeVariables:r}}){let i=r.lineColor,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if("handDrawn"===e.look){let t=RN.svg(n).circle(0,0,14,yL(i));(a=n.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(a=n.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Z9(e,a),e.intersect=function(t){return mL.circle(e,7,t)},n}var $R=t(()=>{MN(),CL(),_L(),n(),me(FR,"stateStart")});async function zR(a,s){var{labelStyles:o,nodeStyles:t}=wL(s);s.labelStyle=o;let{shapeSvg:l,bbox:e}=await X9(a,s,Q9(s)),r=(s?.padding||0)/2,c=e.width+s.padding,h=e.height+s.padding,u=-e.width/2-r,d=-e.height/2-r,i=[{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 t=RN.svg(l),e=kL(s,{}),r=t.rectangle(u-8,d,c+16,h,e),i=t.line(u,d,u,d+h,e),n=t.line(u+c,d,u+c,d+h,e);l.insert(()=>i,":first-child"),l.insert(()=>n,":first-child"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",bE(a)),Z9(s,o)}else a=$N(l,c,h,i),t&&a.attr("style",t),Z9(s,a);return s.intersect=function(t){return mL.polygon(s,i,t)},l}var GR=t(()=>{n(),CL(),_L(),MN(),zN(),KE(),me(zR,"subroutine")});async function UR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a}=await X9(t,e,Q9(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,d=e.cssStyles,p=RN.svg(n),g=kL(e,{}),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"!==e.look&&(g.roughness=0,g.fillStyle="solid"),Y9(f)),v=p.path(y,g),x=Y9(m),b=p.path(x,{...g,fillStyle:"solid"}),w=n.insert(()=>b,":first-child");return w.insert(()=>v,":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),Z9(e,w),e.intersect=function(t){return mL.polygon(e,f,t)},n}var qR=t(()=>{n(),_L(),MN(),CL(),me(UR,"taggedRect")});async function jR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=.2*a,c=.2*s,h=s+o,u=e.cssStyles,d=RN.svg(r),p=kL(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...H9(-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)},...H9(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=Y9(g),x=d.path(v,p),b=Y9(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"!==e.look&&k.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),Z9(e,k),e.intersect=function(t){return mL.polygon(e,g,t)},r}var WR=t(()=>{n(),CL(),MN(),_L(),me(jR,"taggedWaveEdgedRectangle")});async function YR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await X9(t,e,Q9(e))),n=Math.max(t.width+e.padding,e?.width||0),a=-n/2,s=-(t=Math.max(t.height+e.padding,e?.height||0))/2,o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",n).attr("height",t),Z9(e,o),e.intersect=function(t){return mL.rect(e,t)},r}var HR=t(()=>{n(),CL(),_L(),me(YR,"text")});async function VR(t,a){var{labelStyles:e,nodeStyles:r}=wL(a);a.labelStyle=e;let{shapeSvg:s,bbox:i,label:n,halfPadding:o}=await X9(t,a,Q9(a)),l="neo"===a.look?2*o:o,c=i.height+l,h=c/2,u=h/(2.5+c/50),d=i.width+u+l,p=a.cssStyles,g;if("handDrawn"===a.look){let t=RN.svg(s),e=KR(0,0,d,c,u,h),r=ZR(0,0,d,c,u,h),i=t.path(e,kL(a,{})),n=t.path(r,kL(a,{fill:"none"}));g=s.insert(()=>n,":first-child"),(g=s.insert(()=>i,":first-child")).attr("class","basic label-container"),p&&g.attr("style",p)}else e=XR(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",bE(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} )`),n.attr("transform",`translate(${-i.width/2-u-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),Z9(a,g),a.intersect=function(e){var r=mL.rect(a,e),i=r.y-(a.y??0);if(0!=h&&(Math.abs(i)<(a.height??0)/2||Math.abs(i)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-u)){let t=u*u*(1-i*i/(h*h));0!=t&&(t=Math.sqrt(Math.abs(t))),t=u-t,0{n(),_L(),MN(),CL(),KE(),XR=me((t,e,r,i,n,a)=>`M${t},${e} - a${n},${a} 0,0,1 0,${-i} +`,i,` +res:`,yL.polygon(i,c,t)),yL.polygon(i,c,t)},a}var gR,fR=t(()=>{e(),i(),_L(),SL(),DN(),GN(),gR=me((t,e,r)=>[`M${t+r/2},`+e,`L${t+r},`+(e-r/2),`L${t+r/2},`+(e-r),`L${t},`+(e-r/2),"Z"].join(" "),"createDecisionBoxPathD"),me(pR,"question")});async function mR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.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=e.cssStyles,g=MN.svg(i),f=TL(e,{}),m=("handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid"),H9(d)),y=g.path(m,f),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",p),n&&"handDrawn"!==e.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))})`),Q9(e,v),e.intersect=function(t){return yL.polygon(e,d,t)},i}var yR=t(()=>{i(),_L(),SL(),DN(),me(mR,"rect_left_inv_arrow")});function vR(t,e){e&&t.attr("style",e)}async function xR(t){let e=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;return t.label&&qc(t.label)&&(n=await Wc(t.label.replace(L.lineBreakRegex,` +`),D())),r.html('"+n+""),vR(r,t.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"),e.node()}var bR,wR,kR=t(()=>{Q3(),e(),mu(),th(),ZE(),me(vR,"applyStyle"),me(xR,"addHtmlLabel"),bR=me(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Dc(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),M.info("vertexText"+i),xR({isNode:n,label:XE(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),labelStyle:e&&e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|/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"),wR=bR});async function TR(i,a){var{labelStyles:t,nodeStyles:e}=kL(a);a.labelStyle=t;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",e),l=a.description,c=a.label,h=o.node().appendChild(await wR(c,a.labelStyle,!0,!0)),u={width:0,height:0};Dc(D()?.flowchart?.htmlLabels)&&(t=h.children[0],i=H(h),u=t.getBoundingClientRect(),i.attr("width",u.width),i.attr("height",u.height)),M.info("Text 2",l);var t=l||[],i=h.getBBox(),d=(t=o.node().appendChild(await wR(t.join?t.join("
"):t,a.labelStyle,!0,!0))).children[0],p=H(t),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);H(t).attr("transform","translate( "+(u.width>i.width?0:(i.width-u.width)/2)+", "+(i.height+d+5)+")"),H(h).attr("transform","translate( "+(u.width(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",e).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 Q9(a,v),a.intersect=function(t){return yL.rect(a,t)},s}var ER=t(()=>{Q3(),th(),i(),kR(),_L(),SL(),DN(),mu(),OI(),e(),me(TR,"rectWithTitle")});async function CR(t,e){return jI(t,e,{rx:5,ry:5,classes:"",labelPaddingX:+(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var _R=t(()=>{WI(),me(CR,"roundedRect")});async function SR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=e?.padding??0,s=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),l=-t.width/2-a,a=-t.height/2-a,c=e.cssStyles,h=MN.svg(r),u=TL(e,{});"handDrawn"!==e.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(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",wE(c)),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),i.attr("transform",`translate(${-s/2+4+(e.padding??0)-(t.x-(t.left??0))},${-o/2+(e.padding??0)-(t.y-(t.top??0))})`),Q9(e,g),e.intersect=function(t){return yL.rect(e,t)},r}var AR=t(()=>{i(),_L(),SL(),DN(),ZE(),me(SR,"shadedProcess")});async function LR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=-a/2,l=-s/2,c=e.cssStyles,h=MN.svg(r),u=TL(e,{});"handDrawn"!==e.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=H9(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),f.attr("transform",`translate(0, ${s/4})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))}, ${-s/4+(e.padding??0)-(t.y-(t.top??0))})`),Q9(e,f),e.intersect=function(t){return yL.polygon(e,d,t)},r}var NR=t(()=>{i(),_L(),SL(),DN(),me(LR,"slopedRect")});async function IR(t,e){return jI(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var RR=t(()=>{WI(),me(IR,"squareRect")});async function MR(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(i)),s=n.height+i.padding,o=n.width+s/4+i.padding,l,c=i.cssStyles;if("handDrawn"===i.look){let t=MN.svg(a),e=TL(i,{}),r=MI(-o/2,-s/2,o,s,s/2),n=t.path(r,e);(l=a.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",wE(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 Q9(i,l),i.intersect=function(t){return yL.rect(i,t)},a}var DR=t(()=>{i(),_L(),SL(),DN(),OI(),ZE(),me(MR,"stadium")});async function OR(t,e){return jI(t,e,{rx:5,ry:5,classes:"flowchart-node"})}var PR=t(()=>{WI(),me(OR,"state")});function BR(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=kL(e),n=(e.labelStyle=n,e.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s}=r,t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),o=MN.svg(t),l=TL(e,{});"handDrawn"!==e.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=t.insert(()=>c,":first-child");return d.insert(()=>u),n&&d.selectAll("path").attr("style",n),i&&d.selectAll("path").attr("style",i),Q9(e,d),e.intersect=function(t){return yL.circle(e,7,t)},t}var FR=t(()=>{DN(),_L(),SL(),i(),me(BR,"stateEnd")});function $R(t,e,{config:{themeVariables:r}}){let n=r.lineColor,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if("handDrawn"===e.look){let t=MN.svg(i).circle(0,0,14,vL(n));(a=i.insert(()=>t)).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 Q9(e,a),e.intersect=function(t){return yL.circle(e,7,t)},i}var zR=t(()=>{DN(),_L(),SL(),i(),me($R,"stateStart")});async function GR(a,s){var{labelStyles:o,nodeStyles:t}=kL(s);s.labelStyle=o;let{shapeSvg:l,bbox:e}=await K9(a,s,J9(s)),r=(s?.padding||0)/2,c=e.width+s.padding,h=e.height+s.padding,u=-e.width/2-r,d=-e.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 t=MN.svg(l),e=TL(s,{}),r=t.rectangle(u-8,d,c+16,h,e),n=t.line(u,d,u,d+h,e),i=t.line(u+c,d,u+c,d+h,e);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",wE(a)),Q9(s,o)}else a=zN(l,c,h,n),t&&a.attr("style",t),Q9(s,a);return s.intersect=function(t){return yL.polygon(s,n,t)},l}var UR=t(()=>{i(),_L(),SL(),DN(),GN(),ZE(),me(GR,"subroutine")});async function qR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await K9(t,e,J9(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,d=e.cssStyles,p=MN.svg(i),g=TL(e,{}),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"!==e.look&&(g.roughness=0,g.fillStyle="solid"),H9(f)),v=p.path(y,g),x=H9(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"!==e.look&&w.selectAll("path").attr("style",d),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),Q9(e,w),e.intersect=function(t){return yL.polygon(e,f,t)},i}var jR=t(()=>{i(),SL(),DN(),_L(),me(qR,"taggedRect")});async function WR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=.2*a,c=.2*s,h=s+o,u=e.cssStyles,d=MN.svg(r),p=TL(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...V9(-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)},...V9(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=H9(g),x=d.path(v,p),b=H9(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"!==e.look&&k.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),Q9(e,k),e.intersect=function(t){return yL.polygon(e,g,t)},r}var YR=t(()=>{i(),_L(),DN(),SL(),me(WR,"taggedWaveEdgedRectangle")});async function HR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await K9(t,e,J9(e))),i=Math.max(t.width+e.padding,e?.width||0),a=-i/2,s=-(t=Math.max(t.height+e.padding,e?.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",t),Q9(e,o),e.intersect=function(t){return yL.rect(e,t)},r}var VR=t(()=>{i(),_L(),SL(),me(HR,"text")});async function XR(t,a){var{labelStyles:e,nodeStyles:r}=kL(a);a.labelStyle=e;let{shapeSvg:s,bbox:n,label:i,halfPadding:o}=await K9(t,a,J9(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 t=MN.svg(s),e=ZR(0,0,d,c,u,h),r=QR(0,0,d,c,u,h),n=t.path(e,TL(a,{})),i=t.path(r,TL(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 e=KR(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wE(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))})`),Q9(a,g),a.intersect=function(e){var r=yL.rect(a,e),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 t=u*u*(1-n*n/(h*h));0!=t&&(t=Math.sqrt(Math.abs(t))),t=u-t,0{i(),SL(),DN(),_L(),ZE(),KR=me((t,e,r,n,i,a)=>`M${t},${e} + a${i},${a} 0,0,1 0,${-n} l${r},0 - a${n},${a} 0,0,1 0,${i} - M${r},${-i} - a${n},${a} 0,0,0 0,${i} - l${-r},0`,"createCylinderPathD"),KR=me((t,e,r,i,n,a)=>[`M${t},`+e,`M${t+r},`+e,`a${n},${a} 0,0,0 0,`+-i,`l${-r},0`,`a${n},${a} 0,0,0 0,`+i,`l${r},0`].join(" "),"createOuterCylinderPathD"),ZR=me((t,e,r,i,n,a)=>[`M${t+r/2},`+-i/2,`a${n},${a} 0,0,0 0,`+i].join(" "),"createInnerCylinderPathD"),me(VR,"tiltedCylinder")});async function JR(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(n)),s=i.width+n.padding,o=i.height+n.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=n.cssStyles;if("handDrawn"===n.look){let t=RN.svg(a),e=kL(n,{}),r=Y9(l),i=t.path(r,e);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$N(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,Z9(n,c),n.intersect=function(t){return mL.polygon(n,l,t)},a}var tM=t(()=>{n(),CL(),_L(),MN(),zN(),me(JR,"trapezoid")});async function eM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await X9(t,e,Q9(e))),n=Math.max(60,t.width+2*(e.padding??0),e?.width??0),t=Math.max(20,t.height+2*(e.padding??0),e?.height??0),a=e.cssStyles,s=RN.svg(r),o=kL(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-n/2*.8,y:-t/2},{x:n/2*.8,y:-t/2},{x:n/2,y:-t/2*.6},{x:n/2,y:t/2},{x:-n/2,y:t/2},{x:-n/2,y:-t/2*.6}],c=Y9(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),i&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",i),Z9(e,u),e.intersect=function(t){return mL.polygon(e,l,t)},r}var rM=t(()=>{n(),CL(),_L(),MN(),me(eM,"trapezoidalPentagon")});async function iM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=Mc(D().flowchart?.htmlLabels),l=a.width+(e.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=e.cssStyles,p=RN.svg(n),g=kL(e,{}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),Y9(u)),m=p.path(f,g),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",i),e.width=l,e.height=c,Z9(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return M.info("Triangle intersect",e,u,t),mL.polygon(e,u,t)},n}var nM=t(()=>{e(),n(),CL(),_L(),MN(),n(),Jc(),fu(),me(iM,"triangle")});async function aM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/8,l=s+o,c=e.cssStyles,h=0<(h=70-a)?h/2:0,u=RN.svg(r),d=kL(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...H9(-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=Y9(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o-(t.y-(t.top??0))})`),Z9(e,m),e.intersect=function(t){return mL.polygon(e,p,t)},r}var sM=t(()=>{n(),CL(),MN(),_L(),me(aM,"waveEdgedRectangle")});async function oM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a}=await X9(t,e,Q9(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.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),t=h+2*r,u=e.cssStyles,d=RN.svg(n),p=kL(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:t/2},...H9(-c/2,t/2,c/2,t/2,r,1),{x:c/2,y:-t/2},...H9(c/2,-t/2,-c/2,-t/2,r,-1)],f=Y9(g),m=d.path(f,p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),Z9(e,y),e.intersect=function(t){return mL.polygon(e,g,t)},n}var lM=t(()=>{n(),CL(),_L(),MN(),me(oM,"waveRectangle")});async function cM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=RN.svg(n),p=kL(e,{}),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} + a${i},${a} 0,0,1 0,${n} + M${r},${-n} + a${i},${a} 0,0,0 0,${n} + l${-r},0`,"createCylinderPathD"),ZR=me((t,e,r,n,i,a)=>[`M${t},`+e,`M${t+r},`+e,`a${i},${a} 0,0,0 0,`+-n,`l${-r},0`,`a${i},${a} 0,0,0 0,`+n,`l${r},0`].join(" "),"createOuterCylinderPathD"),QR=me((t,e,r,n,i,a)=>[`M${t+r/2},`+-n/2,`a${i},${a} 0,0,0 0,`+n].join(" "),"createInnerCylinderPathD"),me(XR,"tiltedCylinder")});async function tM(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(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 t=MN.svg(a),e=TL(i,{}),r=H9(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=zN(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,Q9(i,c),i.intersect=function(t){return yL.polygon(i,l,t)},a}var eM=t(()=>{i(),_L(),SL(),DN(),GN(),me(tM,"trapezoid")});async function rM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await K9(t,e,J9(e))),i=Math.max(60,t.width+2*(e.padding??0),e?.width??0),t=Math.max(20,t.height+2*(e.padding??0),e?.height??0),a=e.cssStyles,s=MN.svg(r),o=TL(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-i/2*.8,y:-t/2},{x:i/2*.8,y:-t/2},{x:i/2,y:-t/2*.6},{x:i/2,y:t/2},{x:-i/2,y:t/2},{x:-i/2,y:-t/2*.6}],c=H9(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",n),Q9(e,u),e.intersect=function(t){return yL.polygon(e,l,t)},r}var nM=t(()=>{i(),_L(),SL(),DN(),me(rM,"trapezoidalPentagon")});async function iM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=Dc(D().flowchart?.htmlLabels),l=a.width+(e.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=e.cssStyles,p=MN.svg(i),g=TL(e,{}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),H9(u)),m=p.path(f,g),y=i.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),n&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",n),e.width=l,e.height=c,Q9(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return M.info("Triangle intersect",e,u,t),yL.polygon(e,u,t)},i}var aM=t(()=>{e(),i(),_L(),SL(),DN(),i(),th(),mu(),me(iM,"triangle")});async function sM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/8,l=s+o,c=e.cssStyles,h=0<(h=70-a)?h/2:0,u=MN.svg(r),d=TL(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...V9(-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=H9(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",c),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o-(t.y-(t.top??0))})`),Q9(e,m),e.intersect=function(t){return yL.polygon(e,p,t)},r}var oM=t(()=>{i(),_L(),DN(),SL(),me(sM,"waveEdgedRectangle")});async function lM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await K9(t,e,J9(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.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),t=h+2*r,u=e.cssStyles,d=MN.svg(i),p=TL(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:t/2},...V9(-c/2,t/2,c/2,t/2,r,1),{x:c/2,y:-t/2},...V9(c/2,-t/2,-c/2,-t/2,r,-1)],f=H9(g),m=d.path(f,p),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),Q9(e,y),e.intersect=function(t){return yL.polygon(e,g,t)},i}var cM=t(()=>{i(),_L(),SL(),DN(),me(lM,"waveRectangle")});async function hM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=MN.svg(i),p=TL(e,{}),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"!==e.look&&(p.roughness=0,p.fillStyle="solid"),d.path(f,p)),y=n.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),Z9(e,y),e.intersect=function(t){return mL.polygon(e,g,t)},n}var hM=t(()=>{n(),_L(),MN(),CL(),me(cM,"windowPane")});async function uM(t,e){var r,i=e,n=(i.alias&&(e.label=i.alias),"handDrawn"===e.look&&(A=(A=Nr().themeVariables).background,await uM(t,{...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none","fill: "+A]})),Nr());e.useHtmlLabels=n.htmlLabels;let o=n.er?.diagramPadding??10,l=n.er?.entityPadding??6,a=e.cssStyles,s=wL(e).labelStyles;if(0===i.attributes.length&&e.label)return A={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},yE(e.label,n)+2*A.labelPaddingX{let i=j(r[e]),n=i.attr("transform"),a=0,s=0;n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))&&(a=parseFloat(r[1]),s=parseFloat(r[2]),i.attr("class").includes("attribute-name")?a+=g:i.attr("class").includes("attribute-keys")?a+=g+f:i.attr("class").includes("attribute-comment")&&(a+=g+f+m)),i.attr("transform",`translate(${M+o/2+a}, ${s+D+u.height+l/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(D+l/2)+")"),L.rectangle(M,D,I,R,N)),$=h.insert(()=>F,":first-child").attr("style",a.join("")),z=Nr().themeVariables,{rowEven:G,rowOdd:U,nodeBorder:q}=z;p.push(0);for([E,C]of p.entries())if(!(0===E&&1e,"g.label").attr("style",a.join("")).attr("class","row-rect-"+(E%2==0?"even":"odd"))}let O=L.line(M,u.height+D,I+M,u.height+D,N);h.insert(()=>O).attr("class","divider"),O=L.line(g+M,u.height+D,g+M,R+D,N),h.insert(()=>O).attr("class","divider"),v&&(O=L.line(g+f+M,u.height+D,g+f+M,R+D,N),h.insert(()=>O).attr("class","divider")),x&&(O=L.line(g+f+m+M,u.height+D,g+f+m+M,R+D,N),h.insert(()=>O).attr("class","divider"));for(_ of p)O=L.line(M,u.height+D+_,I+M,u.height+D+_,N),h.insert(()=>O).attr("class","divider");return Z9(e,$),e.intersect=function(t){return mL.rect(e,t)},h}async function dM(t,e,r,i=0,n=0,a=[],s=""){if(t=t.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${i}, ${n})`).attr("style",s),e!==Pc(e)&&(e=(e=Pc(e)).replaceAll("<","<").replaceAll(">",">")),a=t.node().appendChild(await j9(t,e,{width:yE(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),e.includes("<")||e.includes(">")){let t=a.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let o=a.getBBox();return Mc(r.htmlLabels)&&((i=a.children[0]).style.textAlign="start",n=j(a),o=i.getBoundingClientRect(),n.attr("width",o.width),n.attr("height",o.height)),o}var pM=t(()=>{n(),CL(),_L(),MN(),jI(),Ai(),W9(),Jc(),Z3(),KE(),me(uM,"erBox"),me(dM,"addText")});async function gM(t,e,r,i,n=r.class.padding??12){let a=i?0:3,s=t.insert("g").attr("class",Q9(e)).attr("id",e.domId||e.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").length,t.innerHTML.includes("")&&(h+=t.innerHTML.split("").length-1),t.getElementsByTagName("img"));if(u){let i=""===o.replace(/]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",i?(t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}else i.includes("font-weight: bolder")&&j(l).selectAll("tspan").attr("font-weight",""),h=l.children.length,u=l.children[0],""!==l.textContent&&!l.textContent.includes(">")||(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "!==o[1])||(u.textContent=u.textContent[0]+" "+u.textContent.substring(1)),"undefined"===u.textContent&&(u.textContent=""),c=l.getBBox();return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}var mM=t(()=>{Z3(),Ai(),n(),KE(),fu(),W9(),Jc(),me(gM,"textHelper"),me(fM,"addText")});async function yM(e,r){let t=D(),s=t.class.padding??12,i=s,o=r.useHtmlLabels??Mc(t.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:n}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await gM(e,r,t,o,i)),{labelStyles:a,nodeStyles:h}=wL(r),u=(r.labelStyle=a,r.cssStyles=l.styles||"",e=l.styles?.join(";")||h||"",r.cssStyles||(r.cssStyles=e.replaceAll("!important","").split(";")),0===l.members.length&&0===l.methods.length&&!t.class?.hideEmptyMembersBox),d=RN.svg(c),p=kL(r,{}),g=("handDrawn"!==r.look&&(p.roughness=0,p.fillStyle="solid"),n.width),f=n.height,m=(0===l.members.length&&0===l.methods.length?f+=i:0v,":first-child");x.attr("class","basic label-container");var b=x.node().getBBox(),w=(c.selectAll(".text").each((t,e,r)=>{let i=(e=j(r[e])).attr("transform"),n=(i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))?parseFloat(r[2]):0)+y+s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),a=(o||(n-=4),m);(e.attr("class").includes("label-group")||e.attr("class").includes("annotation-group"))&&(a=-e.node()?.getBBox().width/2||0,c.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(a=0)})),e.attr("transform",`translate(${a}, ${n})`)}),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(0t).attr("class","divider").attr("style",e)}if(u||0t).attr("class","divider").attr("style",e)}return"handDrawn"!==l.look&&c.selectAll("path").attr("style",e),x.select(":nth-child(2)").attr("style",e),c.selectAll(".divider").select("path").attr("style",e),r.labelStyle?c.selectAll("span").attr("style",r.labelStyle):c.selectAll("span").attr("style",e),o||((w=(b=RegExp(/color\s*:\s*([^;]*)/)).exec(e))?(k=w[0].replace("color","fill"),c.selectAll("tspan").attr("style",k)):a&&(T=b.exec(a))&&(e=T[0].replace("color","fill"),c.selectAll("tspan").attr("style",e))),Z9(r,x),r.intersect=function(t){return mL.rect(r,t)},c}var vM=t(()=>{n(),fu(),Z3(),MN(),_L(),CL(),mM(),Jc(),me(yM,"classBox")});async function xM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let n=e,a=e,s="verifyMethod"in e,o=Q9(e),l=t.insert("g").attr("class",o).attr("id",e.domId??e.id),c,h=c=s?await bM(l,`<<${n.type}>>`,0,e.labelStyle):await bM(l,"<<Element>>",0,e.labelStyle),u=await bM(l,n.name,h,e.labelStyle+"; font-weight: bold;"),d=(h+=u+20,s?(r=await bM(l,n.requirementId?"Id: "+n.requirementId:"",h,e.labelStyle),h+=r,t=await bM(l,n.text?"Text: "+n.text:"",h,e.labelStyle),h+=t,r=await bM(l,n.risk?"Risk: "+n.risk:"",h,e.labelStyle),h+=r,await bM(l,n.verifyMethod?"Verification: "+n.verifyMethod:"",h,e.labelStyle)):(t=await bM(l,a.type?"Type: "+a.type:"",h,e.labelStyle),h+=t,await bM(l,a.docRef?"Doc Ref: "+a.docRef:"",h,e.labelStyle)),(l.node()?.getBBox().width??200)+20),p=(l.node()?.getBBox().height??200)+20,g=-d/2,f=-p/2,m=RN.svg(l),y=kL(e,{}),v=("handDrawn"!==e.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",i),l.selectAll(".label").each((t,e,r)=>{let i=j(r[e]),n=i.attr("transform"),a=0,s=0,o=(n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))&&(a=parseFloat(r[1]),s=parseFloat(r[2])),s-p/2),l=10+g;0!==e&&1!==e||(l=a),i.attr("transform",`translate(${l}, ${20+o})`)}),h>c+u+20){let t=m.line(g,f+c+u+20,g+d,f+c+u+20,y);l.insert(()=>t).attr("style",i)}return Z9(e,x),e.intersect=function(t){return mL.rect(e,t)},l}async function bM(t,e,r,i=""){if(""===e)return 0;let n=t.insert("g").attr("class","label").attr("style",i),a=D(),s=a.htmlLabels??!0,o=await j9(n,vh(VE(e)),{width:yE(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a),l;if(s)t=o.children[0],e=j(o),l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height);else{var c;for(c of o.children[0].children)c.textContent=c.textContent.replaceAll(">",">").replaceAll("<","<"),i&&c.setAttribute("style",i);(l=o.getBBox()).height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}var wM=t(()=>{n(),CL(),_L(),MN(),KE(),fu(),W9(),Z3(),me(xM,"requirementBox"),me(bM,"addText")});async function kM(t,i,{config:e}){var{labelStyles:n,nodeStyles:r}=wL(i),n=(i.labelStyle=n||"",i.width);i.width=(i.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await X9(t,i,Q9(i)),l=i.padding||10,c,h,u=("ticket"in i&&i.ticket&&e?.kanban?.ticketBaseUrl&&(c=e?.kanban?.ticketBaseUrl.replace("#TICKET#",i.ticket),h=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",c).attr("target","_blank")),{useHtmlLabels:i.useHtmlLabels,labelStyle:i.labelStyle||"",width:i.width,img:i.img,padding:i.padding||8,centerLabel:!1}),d,p;h?{label:d,bbox:p}=await K9(h,"ticket"in i&&i.ticket||"",u):{label:d,bbox:p}=await K9(a,"ticket"in i&&i.ticket||"",u);var{label:t,bbox:e}=await K9(a,"assigned"in i&&i.assigned||"",u),n=(i.width=n,i?.width||0),g=Math.max(p.height,e.height)/2,f=Math.max(s.height+20,i?.height||0)+g,m=-n/2,y=-f/2;o.attr("transform","translate("+(l-n/2)+", "+(-g-s.height/2)+")"),d.attr("transform","translate("+(l-n/2)+", "+(-g+s.height/2)+")"),t.attr("transform","translate("+(l+n/2-e.width-20)+", "+(-g+s.height/2)+")");let v,{rx:x,ry:b}=i,w=i.cssStyles;if("handDrawn"===i.look){let t=RN.svg(a),e=kL(i,{}),r=x||b?t.path(RI(m,y,n,f,x||0),e):t.rectangle(m,y,n,f,e);(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",n).attr("height",f),(t="priority"in i&&i.priority)&&(e=a.append("line"),g=2+m,r=y+Math.floor((x??0)/2),n=y+f-Math.floor((x??0)/2),e.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",n).attr("stroke-width","4").attr("stroke",TM(t)));return Z9(i,v),i.height=f,i.intersect=function(t){return mL.rect(i,t)},a}var TM,EM=t(()=>{n(),CL(),DI(),_L(),MN(),TM=me(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority"),me(kM,"kanbanItem")});function CM(t){return t in AM}var _M,SM,AM,LM,NM,IM,RM,MM,DM,OM,PM,BM,FM,$M,zM,GM=t(()=>{ON(),FN(),UN(),jN(),YN(),XN(),QN(),eI(),nI(),sI(),uI(),pI(),fI(),yI(),xI(),wI(),TI(),_I(),AI(),NI(),MI(),PI(),FI(),zI(),UI(),YI(),VI(),KI(),QI(),iR(),aR(),oR(),cR(),uR(),gR(),mR(),TR(),CR(),SR(),LR(),IR(),MR(),OR(),BR(),$R(),GR(),qR(),WR(),HR(),QR(),tM(),rM(),nM(),sM(),lM(),hM(),pM(),vM(),wM(),EM(),_M=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:NR},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ER},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:RR},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:zR},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:oI},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:WN},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:dR},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:EI},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:XI},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:HI},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:JR},{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:GI},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:gI},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:YR},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:GN},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:_R},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:FR},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:PR},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:bI},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:SI},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ZN},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tI},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:iI},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ZI},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:aM},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:kI},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:VR},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:JI},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:aI},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:dI},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:iM},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:cM},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:mI},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:eM},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:vI},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:AR},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:lR},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:sR},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:BN},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:VN},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:jR},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:UR},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:oM},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:fR},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:nR}],SM=me(()=>{var t=[...Object.entries({state:DR,choice:qN,note:hR,rectWithTitle:kR,labelRect:WI,iconSquare:BI,iconCircle:II,icon:LI,iconRounded:OI,imageSquare:$I,anchor:DN,kanbanItem:kM,classBox:yM,erBox:uM,requirementBox:xM}),..._M.flatMap(e=>[e.shortName,..."aliases"in e?e.aliases:[],..."internalAliases"in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(t)},"generateShapeMap"),AM=SM(),me(CM,"isValidShape")}),UM=t(()=>{Z3(),IA(),fu(),e(),GM(),KE(),Jc(),gu(),LM=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=lh,this.setAccDescription=hh,this.setDiagramTitle=dh,this.getAccTitle=ch,this.getAccDescription=uh,this.getDiagramTitle=ph,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{me(this,"FlowDB")}sanitizeText(t){return L.sanitizeText(t,this.config)}lookUpDomId(t){for(var e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(i,n,a,s,o,l,c={},t){if(i&&0!==i.trim().length){let r;var e;if(void 0!==t&&(e=t.includes(` + M${c},${h-5} L${c},`+(h+l),m=("handDrawn"!==e.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"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.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))})`),Q9(e,y),e.intersect=function(t){return yL.polygon(e,g,t)},i}var uM=t(()=>{i(),SL(),DN(),_L(),me(hM,"windowPane")});async function dM(t,e){var r,n=e,i=(n.alias&&(e.label=n.alias),"handDrawn"===e.look&&(A=(A=Ir().themeVariables).background,await dM(t,{...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none","fill: "+A]})),Ir());e.useHtmlLabels=i.htmlLabels;let o=i.er?.diagramPadding??10,l=i.er?.entityPadding??6,a=e.cssStyles,{labelStyles:s,nodeStyles:c}=kL(e);if(0===n.attributes.length&&e.label)return A={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},vE(e.label,i)+2*A.labelPaddingXt+(e?.rowHeight??0),0)),Math.max(S.width+2*o,e?.width||0,A)),R=Math.max((z??0)+d.height,e?.height||0),M=-I/2,D=-R/2,G=(u.selectAll("g:not(:first-child)").each((t,e,r)=>{let n=H(r[e]),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([$,C]of f.entries()){let t=($+1)%2==0&&0!==C.yOffset,e=L.rectangle(M,d.height+D+C?.yOffset,I,C?.rowHeight,{...N,fill:t?j:W,stroke:Y});u.insert(()=>e,"g.label").attr("style",a.join("")).attr("class","row-rect-"+(t?"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(_ of g)O=L.line(M,d.height+D+_,I+M,d.height+D+_,N),u.insert(()=>O).attr("class","divider");return Q9(e,U),c&&"handDrawn"!==e.look&&(t=c.split(";")?.filter(t=>t.includes("stroke"))?.map(t=>""+t).join("; "),u.selectAll("path").attr("style",t??""),u.selectAll(".row-rect-even path").attr("style",c)),e.intersect=function(t){return yL.rect(e,t)},u}async function pM(t,e,r,n=0,i=0,a=[],s=""){if(t=t.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${n}, ${i})`).attr("style",s),e!==Bc(e)&&(e=(e=Bc(e)).replaceAll("<","<").replaceAll(">",">")),a=t.node().appendChild(await W9(t,e,{width:vE(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),e.includes("<")||e.includes(">")){let t=a.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let o=a.getBBox();return Dc(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 gM=t(()=>{i(),_L(),SL(),DN(),WI(),Nn(),Y9(),th(),Q3(),ZE(),me(dM,"erBox"),me(pM,"addText")});async function fM(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",J9(e)).attr("id",e.domId||e.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").length,t.innerHTML.includes("")&&(h+=t.innerHTML.split("").length-1),t.getElementsByTagName("img"));if(u){let n=""===o.replace(/]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=t.getBoundingClientRect(),e.attr("width",c.width),e.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 yM=t(()=>{Q3(),Nn(),i(),ZE(),mu(),Y9(),th(),me(fM,"textHelper"),me(mM,"addText")});async function vM(e,r){let t=D(),s=t.class.padding??12,n=s,o=r.useHtmlLabels??Dc(t.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:i}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await fM(e,r,t,o,n)),{labelStyles:a,nodeStyles:h}=kL(r),u=(r.labelStyle=a,r.cssStyles=l.styles||"",e=l.styles?.join(";")||h||"",r.cssStyles||(r.cssStyles=e.replaceAll("!important","").split(";")),0===l.members.length&&0===l.methods.length&&!t.class?.hideEmptyMembersBox),d=MN.svg(c),p=TL(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:0v,":first-child");x.attr("class","basic label-container");var b=x.node().getBBox(),w=(c.selectAll(".text").each((t,e,r)=>{let n=(e=H(r[e])).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);(e.attr("class").includes("label-group")||e.attr("class").includes("annotation-group"))&&(a=-e.node()?.getBBox().width/2||0,c.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(a=0)})),e.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(0t).attr("class","divider").attr("style",e)}if(u||0t).attr("class","divider").attr("style",e)}return"handDrawn"!==l.look&&c.selectAll("path").attr("style",e),x.select(":nth-child(2)").attr("style",e),c.selectAll(".divider").select("path").attr("style",e),r.labelStyle?c.selectAll("span").attr("style",r.labelStyle):c.selectAll("span").attr("style",e),o||((w=(b=RegExp(/color\s*:\s*([^;]*)/)).exec(e))?(k=w[0].replace("color","fill"),c.selectAll("tspan").attr("style",k)):a&&(T=b.exec(a))&&(e=T[0].replace("color","fill"),c.selectAll("tspan").attr("style",e))),Q9(r,x),r.intersect=function(t){return yL.rect(r,t)},c}var xM=t(()=>{i(),mu(),Q3(),DN(),SL(),_L(),yM(),th(),me(vM,"classBox")});async function bM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let i=e,a=e,s="verifyMethod"in e,o=J9(e),l=t.insert("g").attr("class",o).attr("id",e.domId??e.id),c,h=c=s?await wM(l,`<<${i.type}>>`,0,e.labelStyle):await wM(l,"<<Element>>",0,e.labelStyle),u=await wM(l,i.name,h,e.labelStyle+"; font-weight: bold;"),d=(h+=u+20,s?(r=await wM(l,i.requirementId?"id: "+i.requirementId:"",h,e.labelStyle),h+=r,t=await wM(l,i.text?"Text: "+i.text:"",h,e.labelStyle),h+=t,r=await wM(l,i.risk?"Risk: "+i.risk:"",h,e.labelStyle),h+=r,await wM(l,i.verifyMethod?"Verification: "+i.verifyMethod:"",h,e.labelStyle)):(t=await wM(l,a.type?"Type: "+a.type:"",h,e.labelStyle),h+=t,await wM(l,a.docRef?"Doc Ref: "+a.docRef:"",h,e.labelStyle)),(l.node()?.getBBox().width??200)+20),p=(l.node()?.getBBox().height??200)+20,g=-d/2,f=-p/2,m=MN.svg(l),y=TL(e,{}),v=("handDrawn"!==e.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((t,e,r)=>{let n=H(r[e]),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!==e&&1!==e||(l=a),n.attr("transform",`translate(${l}, ${20+o})`)}),h>c+u+20){let t=m.line(g,f+c+u+20,g+d,f+c+u+20,y);l.insert(()=>t).attr("style",n)}return Q9(e,x),e.intersect=function(t){return yL.rect(e,t)},l}async function wM(t,e,r,n=""){if(""===e)return 0;let i=t.insert("g").attr("class","label").attr("style",n),a=D(),s=a.htmlLabels??!0,o=await W9(i,xh(XE(e)),{width:vE(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),l;if(s)t=o.children[0],e=H(o),l=t.getBoundingClientRect(),e.attr("width",l.width),e.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 kM=t(()=>{i(),_L(),SL(),DN(),ZE(),mu(),Y9(),Q3(),me(bM,"requirementBox"),me(wM,"addText")});async function TM(t,n,{config:e}){var{labelStyles:i,nodeStyles:r}=kL(n),i=(n.labelStyle=i||"",n.width);n.width=(n.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await K9(t,n,J9(n)),l=n.padding||10,c,h,u=("ticket"in n&&n.ticket&&e?.kanban?.ticketBaseUrl&&(c=e?.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 Z9(h,"ticket"in n&&n.ticket||"",u):{label:d,bbox:p}=await Z9(a,"ticket"in n&&n.ticket||"",u);var{label:t,bbox:e}=await Z9(a,"assigned"in n&&n.assigned||"",u),i=(n.width=i,n?.width||0),g=Math.max(p.height,e.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)+")"),t.attr("transform","translate("+(l+i/2-e.width-20)+", "+(-g+s.height/2)+")");let v,{rx:x,ry:b}=n,w=n.cssStyles;if("handDrawn"===n.look){let t=MN.svg(a),e=TL(n,{}),r=x||b?t.path(MI(m,y,i,f,x||0),e):t.rectangle(m,y,i,f,e);(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),(t="priority"in n&&n.priority)&&(e=a.append("line"),g=2+m,r=y+Math.floor((x??0)/2),i=y+f-Math.floor((x??0)/2),e.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",i).attr("stroke-width","4").attr("stroke",EM(t)));return Q9(n,v),n.height=f,n.intersect=function(t){return yL.rect(n,t)},a}var EM,CM=t(()=>{i(),_L(),OI(),SL(),DN(),EM=me(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority"),me(TM,"kanbanItem")});function _M(t){return t in LM}var SM,AM,LM,NM,IM,RM,MM,DM,OM,PM,BM,FM,$M,zM,GM,UM=t(()=>{PN(),$N(),qN(),WN(),HN(),KN(),JN(),rI(),aI(),oI(),dI(),gI(),mI(),vI(),bI(),kI(),EI(),SI(),LI(),II(),DI(),BI(),$I(),GI(),qI(),HI(),XI(),ZI(),JI(),iR(),sR(),lR(),hR(),dR(),fR(),yR(),ER(),_R(),AR(),NR(),RR(),DR(),PR(),FR(),zR(),UR(),jR(),YR(),VR(),JR(),eM(),nM(),aM(),oM(),cM(),uM(),gM(),xM(),kM(),CM(),SM=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:IR},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:CR},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:MR},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:GR},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:lI},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:YN},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:pR},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:CI},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:KI},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:VI},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tM},{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:UI},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:fI},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:HR},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:UN},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:SR},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:$R},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:BR},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:wI},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:AI},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:QN},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:eI},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:iI},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:QI},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:sM},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:TI},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:XR},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tR},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:sI},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:pI},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:iM},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:hM},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:yI},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:rM},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:xI},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:LR},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:cR},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:oR},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:FN},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:XN},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:WR},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:qR},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:lM},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:mR},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:aR}],AM=me(()=>{var t=[...Object.entries({state:OR,choice:jN,note:uR,rectWithTitle:TR,labelRect:YI,iconSquare:FI,iconCircle:RI,icon:NI,iconRounded:PI,imageSquare:zI,anchor:ON,kanbanItem:TM,classBox:vM,erBox:dM,requirementBox:bM}),...SM.flatMap(e=>[e.shortName,..."aliases"in e?e.aliases:[],..."internalAliases"in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(t)},"generateShapeMap"),LM=AM(),me(_M,"isValidShape")}),qM=t(()=>{Q3(),RA(),mu(),e(),UM(),ZE(),th(),fu(),NM=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=ch,this.setAccDescription=uh,this.setDiagramTitle=ph,this.getAccTitle=hh,this.getAccDescription=dh,this.getDiagramTitle=gh,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{me(this,"FlowDB")}sanitizeText(t){return L.sanitizeText(t,this.config)}lookUpDomId(t){for(var e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(n,i,a,s,o,l,c={},t){if(n&&0!==n.trim().length){let r;var e;if(void 0!==t&&(e=t.includes(` `)?t+` `:`{ `+t+` -}`,r=NA(e,{schema:LA})),t=this.edges.find(t=>t.id===i))void 0!==(e=r)?.animate&&(t.animate=e.animate),void 0!==e?.animation&&(t.animation=e.animation);else{let t,e=this.vertices.get(i);if(void 0===e&&(e={id:i,labelType:"text",domId:"flowchart-"+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,e)),this.vertexCounter++,void 0!==n?(this.config=D(),t=this.sanitizeText(n.text.trim()),e.labelType=n.type,t.startsWith('"')&&t.endsWith('"')&&(t=t.substring(1,t.length-1)),e.text=t):void 0===e.text&&(e.text=i),void 0!==a&&(e.type=a),s?.forEach(t=>{e.styles.push(t)}),o?.forEach(t=>{e.classes.push(t)}),void 0!==l&&(e.dir=l),void 0===e.props?e.props=c:void 0!==c&&Object.assign(e.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(!CM(r.shape))throw new Error(`No such shape: ${r.shape}.`);e.type=r?.shape}r?.label&&(e.text=r?.label),r?.icon&&(e.icon=r?.icon,!r.label?.trim())&&e.text===i&&(e.text=""),r?.form&&(e.form=r?.form),r?.pos&&(e.pos=r?.pos),r?.img&&(e.img=r?.img,!r.label?.trim())&&e.text===i&&(e.text=""),r?.constraint&&(e.constraint=r.constraint),r.w&&(e.assetWidth=Number(r.w)),r.h&&(e.assetHeight=Number(r.h))}}}}addSingleLink(t,e,r,i){let n={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(M.info("abc78 Got edge...",n),void 0!==(t=r.text)&&(n.text=this.sanitizeText(t.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=t.type),void 0!==r&&(n.type=r.type,n.stroke=r.stroke,n.length=10t.id===i)?(n.id=i,n.isUserDefinedId=!0):0===(e=this.edges.filter(t=>t.start===n.start&&t.end===n.end)).length?n.id=XE(n.start,n.end,{counter:0,prefix:"L"}):n.id=XE(n.start,n.end,{counter:e.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}. +}`,r=IA(e,{schema:NA})),t=this.edges.find(t=>t.id===n))void 0!==(e=r)?.animate&&(t.animate=e.animate),void 0!==e?.animation&&(t.animation=e.animation);else{let t,e=this.vertices.get(n);if(void 0===e&&(e={id:n,labelType:"text",domId:"flowchart-"+n+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(n,e)),this.vertexCounter++,void 0!==i?(this.config=D(),t=this.sanitizeText(i.text.trim()),e.labelType=i.type,t.startsWith('"')&&t.endsWith('"')&&(t=t.substring(1,t.length-1)),e.text=t):void 0===e.text&&(e.text=n),void 0!==a&&(e.type=a),s?.forEach(t=>{e.styles.push(t)}),o?.forEach(t=>{e.classes.push(t)}),void 0!==l&&(e.dir=l),void 0===e.props?e.props=c:void 0!==c&&Object.assign(e.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(!_M(r.shape))throw new Error(`No such shape: ${r.shape}.`);e.type=r?.shape}r?.label&&(e.text=r?.label),r?.icon&&(e.icon=r?.icon,!r.label?.trim())&&e.text===n&&(e.text=""),r?.form&&(e.form=r?.form),r?.pos&&(e.pos=r?.pos),r?.img&&(e.img=r?.img,!r.label?.trim())&&e.text===n&&(e.text=""),r?.constraint&&(e.constraint=r.constraint),r.w&&(e.assetWidth=Number(r.w)),r.h&&(e.assetHeight=Number(r.h))}}}}addSingleLink(t,e,r,n){let i={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(M.info("abc78 Got edge...",i),void 0!==(t=r.text)&&(i.text=this.sanitizeText(t.text.trim()),i.text.startsWith('"')&&i.text.endsWith('"')&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=t.type),void 0!==r&&(i.type=r.type,i.stroke=r.stroke,i.length=10t.id===n)?(i.id=n,i.isUserDefinedId=!0):0===(e=this.edges.filter(t=>t.start===i.start&&t.end===i.end)).length?i.id=KE(i.start,i.end,{counter:0,prefix:"L"}):i.id=KE(i.start,i.end,{counter:e.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(n)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,r){var i,n=this.isLinkData(r)?r.id.replace("@",""):void 0;M.info("addLink",t,e,n);for(i of t)for(var a of e){var s=i===t[t.length-1],o=a===e[0];s&&o?this.addSingleLink(i,a,r,n):this.addSingleLink(i,a,r,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,0<(this.edges[t]?.style?.length??0)&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){let i=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),i?.forEach(t=>{var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})}setDirection(t){this.direction=t,/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,r){for(let e of t.split(",")){var i=this.vertices.get(e);i&&i.classes.push(r),(i=this.edges.find(t=>t.id===e))&&i.classes.push(r),(i=this.subGraphLookup.get(e))&&i.classes.push(r)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(var r of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,e)}}setClickFun(t,e,i){let n=this.lookUpDomId(t);if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{var t=document.querySelector(`[id="${n}"]`);null!==t&&t.addEventListener("click",()=>{YE.runFunc(e,...r)},!1)}))}}setLink(t,e,r){t.split(",").forEach(t=>{void 0!==(t=this.vertices.get(t))&&(t.link=YE.formatUrl(e,this.config),t.linkTarget=r)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFun(t,e,r)}),this.setClass(t,"clickable")}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=j(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=j("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),j(t).select("svg").selectAll("g.node").on("mouseover",t=>{var e=j(t.currentTarget);null!==e.attr("title")&&(t=t.currentTarget?.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.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"
")),e.classed("hover",!0))}).on("mouseout",t=>{r.transition().duration(500).style("opacity",0),j(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=D(),oh()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,r){let i=t.text.trim(),n=r.text;t===r&&/\s/.exec(r.text)&&(i=void 0);var{nodeList:a,dir:t}=me(t=>{let r={boolean:{},number:{},string:{}},i=[],n;return{nodeList:t.filter(function(t){var e=typeof t;return t.stmt&&"dir"===t.stmt?(n=t.value,!1):""!==t.trim()&&(e in r?!r[e].hasOwnProperty(t)&&(r[e][t]=!0):!i.includes(t)&&i.push(t))}),dir:n}},"uniq")(e.flat());if("gen-1"===this.version)for(let t=0;t":i="arrow_point",e.startsWith("<")&&(i="double_"+i,r=r.slice(1));break;case"o":i="arrow_circle",e.startsWith("o")&&(i="double_"+i,r=r.slice(1))}let n="normal",a=r.length-1;return r.startsWith("=")&&(n="thick"),r.startsWith("~")&&(n="invisible"),(t=this.countChar(".",r))&&(n="dotted",a=t),{type:i,stroke:n,length:a}}destructLink(t,e){if(t=this.destructEndLink(t),e){if((e=this.destructStartLink(e)).stroke!==t.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===e.type)e.type=t.type;else{if(e.type!==t.type)return{type:"INVALID",stroke:"INVALID"};e.type="double_"+e.type}return"double_arrow"===e.type&&(e.type="double_arrow_point"),e.length=t.length,e}return t}exists(t,e){for(var r of t)if(r.nodes.includes(e))return!0;return!1}makeUniq(r,i){let n=[];return r.nodes.forEach((t,e)=>{this.exists(i,t)||n.push(r.nodes[e])}),{nodes:n}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e}return{arrowTypeStart:e,arrowTypeEnd:r}}addNodeFromVertex(t,e,r,i,n,a){var r=r.get(t.id),i=i.get(t.id)??!1,s=this.findNode(e,t.id);s?(s.cssStyles=t.styles,s.cssCompiledStyles=this.getCompiledStyles(t.classes),s.cssClasses=t.classes.join(" ")):(s={id:t.id,label:t.text,labelStyle:"",parentId:r,padding:n.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint},i?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t)}))}getCompiledStyles(t){let e=[];for(var r of t)(r=this.classes.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}getData(){let a=D(),e=[],s=[],r=this.getSubGraphs(),i=new Map,n=new Map;for(let t=r.length-1;0<=t;t--){var o,l=r[t];0{this.addNodeFromVertex(t,e,i,n,a,a.look||"classic")});let h=this.getEdges();return h.forEach((t,e)=>{var{arrowTypeStart:r,arrowTypeEnd:i}=this.destructEdgeType(t.type),n=[...h.defaultStyle??[]],e=(t.style&&n.push(...t.style),{id:XE(t.start,t.end,{counter:e,prefix:"L"},t.id),isUserDefinedId:t.isUserDefinedId,start:t.start,end:t.end,type:t.type??"normal",label:t.text,labelpos:"c",thickness:t.stroke,minlen:t.length,classes:"invisible"===t?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===t?.stroke||"arrow_open"===t?.type?"none":r,arrowTypeEnd:"invisible"===t?.stroke||"arrow_open"===t?.type?"none":i,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:n,style:n,pattern:t.stroke,look:a.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||a.flowchart?.curve});s.push(e)}),{nodes:e,edges:s,other:{},config:a}}defaultConfig(){return yh.flowchart}}}),qM=t(()=>{Z3(),NM=me((t,e)=>{let r;return"sandbox"===e&&(r=j("#i"+t)),j("sandbox"===e?r.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)},"getDiagramElement")}),jM=t(()=>{IM=me(({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}},"getSubGraphTitleMargins")}),WM=t(()=>{fu(),Jc(),e(),jM(),Z3(),MN(),W9(),EL(),wR(),DI(),_L(),RM=me(async(i,n)=>{M.info("Creating subgraph rect for ",n.id,n);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=wL(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.id).attr("data-look",n.look),d=Mc(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await j9(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();Mc(t.flowchart.htmlLabels)&&(i=g.children[0],m=j(g),f=i.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var i=n.width<=f.width+n.padding?f.width+n.padding:n.width,m=(n.width<=f.width+n.padding?n.diff=(i-n.width)/2-n.padding:n.diff=-n.padding,n.height),y=n.x-i/2,v=n.y-m/2;M.trace("Data ",n,JSON.stringify(n));let x;if("handDrawn"===n.look){let t=RN.svg(u),e=kL(n,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=t.path(RI(y,v,i,m,0),e);(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",n.rx).attr("ry",n.ry).attr("x",y).attr("y",v).attr("width",i).attr("height",m);return y=IM(t).subGraphTitleTopMargin,p.attr("transform",`translate(${n.x-f.width/2}, ${n.y-n.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),i=x.node().getBBox(),n.offsetX=0,n.width=i.width,n.height=i.height,n.offsetY=f.height-n.padding/2,n.intersect=function(t){return fL(n,t)},{cluster:u,labelBBox:f}},"rect"),MM=me((t,e)=>{var r=(t=t.insert("g").attr("class","note-cluster").attr("id",e.id)).insert("rect",":first-child"),i=0*e.padding,n=i/2,n=(r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none"),r.node().getBBox());return e.width=n.width,e.height=n.height,e.intersect=function(t){return fL(e,t)},{cluster:t,labelBBox:{width:0,height:0}}},"noteGroup"),DM=me(async(n,a)=>{let t=D(),{themeVariables:e,handDrawnSeed:s}=t,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=e,u=n.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"),i=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=i.node().appendChild(await bR(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();Mc(t.flowchart.htmlLabels)&&(n=p.children[0],f=j(p),g=n.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(n=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+n,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+n),n=a.height+n-g.height-6,v=a.x-m/2,x=a.y-y/2;a.width=m;let b=a.y-a.height/2-f+g.height+2,w;if("handDrawn"===a.look){let t=a.cssClasses.includes("statediagram-cluster-alt"),e=RN.svg(u),r=a.rx||a.ry?e.path(RI(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):e.rectangle(v,x,m,y,{seed:s}),i=(w=u.insert(()=>r,":first-child"),e.rectangle(v,b,m,n,{fill:t?o:l,fillStyle:t?"hachure":"solid",stroke:h,seed:s}));w=u.insert(()=>r,":first-child"),d=u.insert(()=>i)}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",n);return i.attr("transform",`translate(${a.x-g.width/2}, ${1+x-(Mc(t.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(t){return fL(a,t)},{cluster:u,labelBBox:g}},"roundedWithTitle"),OM=me(async(i,n)=>{M.info("Creating subgraph rect for ",n.id,n);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=wL(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.id).attr("data-look",n.look),d=Mc(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await j9(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}),f=g.getBBox();Mc(t.flowchart.htmlLabels)&&(i=g.children[0],m=j(g),f=i.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var i=n.width<=f.width+n.padding?f.width+n.padding:n.width,m=(n.width<=f.width+n.padding?n.diff=(i-n.width)/2-n.padding:n.diff=-n.padding,n.height),y=n.x-i/2,v=n.y-m/2;M.trace("Data ",n,JSON.stringify(n));let x;if("handDrawn"===n.look){let t=RN.svg(u),e=kL(n,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=t.path(RI(y,v,i,m,n.rx),e);(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",n.rx).attr("ry",n.ry).attr("x",y).attr("y",v).attr("width",i).attr("height",m);return y=IM(t).subGraphTitleTopMargin,p.attr("transform",`translate(${n.x-f.width/2}, ${n.y-n.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),i=x.node().getBBox(),n.offsetX=0,n.width=i.width,n.height=i.height,n.offsetY=f.height-n.padding/2,n.intersect=function(t){return fL(n,t)},{cluster:u,labelBBox:f}},"kanbanSection"),PM=me((e,r)=>{var{themeVariables:i,handDrawnSeed:n}=D(),i=i.nodeBorder,t=(e=e.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 t=RN.svg(e).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:n});c=e.insert(()=>t,":first-child")}else(c=t.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 i=c.node().getBBox(),r.height=i.height,r.offsetX=0,r.offsetY=0,r.intersect=function(t){return fL(r,t)},{cluster:e,labelBBox:{}}},"divider"),BM={rect:RM,squareRect:RM,roundedWithTitle:DM,noteGroup:MM,divider:PM,kanbanSection:OM},FM=new Map,$M=me(async(t,e)=>{var r=e.shape||"rect",r=await BM[r](t,e);return FM.set(e.id,r),r},"insertCluster"),zM=me(()=>{FM=new Map},"clear")});function YM(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=VM(t),e=VM(e);var[t,r]=[t.x,t.y],[e,i]=[e.x,e.y],e=e-t,t=i-r;return{angle:Math.atan(t/e),deltaX:e,deltaY:t}}var HM,VM,XM,KM,ZM,QM,JM=t(()=>{HM={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},me(YM,"calculateDeltaAndAngle"),VM=me(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),XM=me(c=>({x:me(function(t,e,r){let i=0,n=VM(r[0]).x{e(),KM=me((t,e,r,i,n,a)=>{e.arrowTypeStart&&QM(t,"start",e.arrowTypeStart,r,i,n,a),e.arrowTypeEnd&&QM(t,"end",e.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),ZM={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}},QM=me((t,e,r,i,n,a,s)=>{let o=ZM[r],l,c;o?(n=n+`_${a}-`+o.type+("start"===e?"Start":"End"),s&&""!==s.trim()?(a=n+"_"+s.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(l=document.getElementById(n))&&((c=l.cloneNode(!0)).id=a,c.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),o.fill&&t.setAttribute("fill",s)}),l.parentNode?.appendChild(c)),t.attr("marker-"+e,`url(${i}#${a})`)):t.attr("marker-"+e,`url(${i}#${n})`)):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function eD(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}function rD(e){var r=[],i=[];for(let t=1;t{fu(),Jc(),e(),W9(),KE(),JM(),jM(),Z3(),MN(),wR(),tD(),_L(),iD=new Map,nD=new Map,aD=me(()=>{iD.clear(),nD.clear()},"clear"),sD=me(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),oD=me(async(t,e)=>{var r,i=Mc(D().flowchart.htmlLabels),n=await j9(t,e.label,{style:sD(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1}),a=(M.info("abc82",e,e.labelType),t.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=j(n),o=i.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),iD.set(e.id,a),e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(i=await bR(e.startLabelLeft,sD(e.labelStyle)),s=(r=t.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+")"),nD.get(e.id)||nD.set(e.id,{}),nD.get(e.id).startLeft=r,eD(l,e.startLabelLeft)),e.startLabelRight&&(i=await bR(e.startLabelRight,sD(e.labelStyle)),a=(s=t.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+")"),nD.get(e.id)||nD.set(e.id,{}),nD.get(e.id).startRight=s,eD(l,e.startLabelRight)),e.endLabelLeft&&(i=await bR(e.endLabelLeft,sD(e.labelStyle)),r=(a=t.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),nD.get(e.id)||nD.set(e.id,{}),nD.get(e.id).endLeft=a,eD(l,e.endLabelLeft)),e.endLabelRight&&(r=await bR(e.endLabelRight,sD(e.labelStyle)),i=(s=t.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),nD.get(e.id)||nD.set(e.id,{}),nD.get(e.id).endRight=s,eD(l,e.endLabelRight)),n},"insertEdgeLabel"),me(eD,"setTerminalWidth"),lD=me((i,n)=>{M.debug("Moving label abc88 ",i.id,i.label,iD.get(i.id),n);var a,s=n.updatedPath||n.originalPath,o=D(),o=IM(o).subGraphTitleTotalMargin;if(i.label){let t=iD.get(i.id),e=i.x,r=i.y;s&&(a=YE.calcLabelPosition(s),M.debug("Moving label "+i.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),n.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(i.startLabelLeft){let t=nD.get(i.id).startLeft,e=i.x,r=i.y;s&&(n=YE.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",s),e=n.x,r=n.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.startLabelRight){let t=nD.get(i.id).startRight,e=i.x,r=i.y;s&&(a=YE.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.endLabelLeft){let t=nD.get(i.id).endLeft,e=i.x,r=i.y;s&&(o=YE.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.endLabelRight){let t=nD.get(i.id).endRight,e=i.x,r=i.y;s&&(n=YE.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),e=n.x,r=n.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),cD=me((t,e)=>{var r=t.x,i=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-i);return t.width/2<=r||t.height/2<=e},"outsideNode"),hD=me((t,i,n)=>{M.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(i)} - insidePoint : ${JSON.stringify(n)} - node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-n.x),s=t.width/2,o=n.xMath.abs(a-i.x)*l)return t=n.y{M.warn("abc88 cutPathAtIntersect",t,i);let n=[],a=t[0],s=!1;return t.forEach(t=>{if(M.info("abc88 checking point",t,i),cD(i,t)||s)M.warn("abc88 outside",t,a),a=t,s||n.push(t);else{let e=hD(i,a,t),r=(M.debug("abc88 inside",t,a,e),M.debug("abc88 intersection",e,i),!1);n.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),n.some(t=>t.x===e.x&&t.y===e.y)?M.warn("abc88 no intersect",e,n):n.push(e),s=!0}}),M.debug("returning points",n),n},"cutPathAtIntersect"),me(rD,"extractCornerPoints"),dD=me(function(t,e,r){var i=e.x-t.x,t=e.y-t.y,r=r/Math.sqrt(i*i+t*t);return{x:e.x-r*i,y:e.y-r*t}},"findAdjacentPoint"),pD=me(function(i){var t=rD(i).cornerPointPositions,n=[];for(let r=0;r!Number.isNaN(t.y)),r=pD(r);let g=u5;switch(g=j4,n.curve){case"linear":g=j4;break;case"basis":g=u5;break;case"cardinal":g=E5;break;case"bumpX":g=i5;break;case"bumpY":g=n5;break;case"catmullRom":g=D5;break;case"monotoneX":g=Q5;break;case"monotoneY":g=J5;break;case"natural":g=i3;break;case"step":g=s3;break;case"stepAfter":g=l3;break;case"stepBefore":g=o3;break;default:g=u5}let{x:f,y:m}=XM(n),y=X4().x(f).y(m).curve(g),v;switch(n.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(n.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(n.style)?n.style:[n.style],k=w.find(t=>t?.startsWith("stroke:"));if("handDrawn"===n.look)a=RN.svg(i),Object.assign([],r),t=a.path(b,{roughness:.3,seed:o}),v+=" transition",r=(x=j(t).select("path").attr("id",n.id).attr("class"," "+v+(n.classes?" "+n.classes:"")).attr("style",w?w.reduce((t,e)=>t+";"+e,""):"")).attr("d"),x.attr("d",r),i.node().appendChild(x.node());else{let t=p.join(";"),e=w?w.reduce((t,e)=>t+e+";",""):"",r="";n.animate&&(r=" edge-animation-fast"),n.animation&&(r=" edge-animation-"+n.animation),a=t?t+";"+e+";":e,x=i.append("path").attr("d",b).attr("id",n.id).attr("class"," "+v+(n.classes?" "+n.classes:"")+(r??"")).attr("style",a),k=a.match(/stroke:([^;]+)/)?.[1]}let T="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(T=(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),M.info("arrowTypeStart",n.arrowTypeStart),M.info("arrowTypeEnd",n.arrowTypeEnd),KM(x,n,T,s,e,k),t={},c&&(t.updatedPath=l),t.originalPath=n.points,t},"insertEdge")}),DD=t(()=>{e(),fD=me((e,t,r,i)=>{t.forEach(t=>{ID[t](e,r,i)})},"insertMarkers"),mD=me((t,e,r)=>{M.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),yD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),vD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),xD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),bD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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"),wD=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),kD=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),TD=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),ED=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),CD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),_D=me((t,e,r)=>{var i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18"),(i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),SD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),AD=me((t,e,r)=>{var i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),LD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 +You have to call mermaid.initialize.`);M.info("Pushing edge..."),this.edges.push(i)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,r){var n,i=this.isLinkData(r)?r.id.replace("@",""):void 0;M.info("addLink",t,e,i);for(n of t)for(var a of e){var s=n===t[t.length-1],o=a===e[0];s&&o?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,0<(this.edges[t]?.style?.length??0)&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){let n=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),n?.forEach(t=>{var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})}setDirection(t){this.direction=t,/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,r){for(let e of t.split(",")){var n=this.vertices.get(e);n&&n.classes.push(r),(n=this.edges.find(t=>t.id===e))&&n.classes.push(r),(n=this.subGraphLookup.get(e))&&n.classes.push(r)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(var r of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,e)}}setClickFun(t,e,n){let i=this.lookUpDomId(t);if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{var t=document.querySelector(`[id="${i}"]`);null!==t&&t.addEventListener("click",()=>{HE.runFunc(e,...r)},!1)}))}}setLink(t,e,r){t.split(",").forEach(t=>{void 0!==(t=this.vertices.get(t))&&(t.link=HE.formatUrl(e,this.config),t.linkTarget=r)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFun(t,e,r)}),this.setClass(t,"clickable")}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(t).select("svg").selectAll("g.node").on("mouseover",t=>{var e=H(t.currentTarget);null!==e.attr("title")&&(t=t.currentTarget?.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.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"
")),e.classed("hover",!0))}).on("mouseout",t=>{r.transition().duration(500).style("opacity",0),H(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=D(),lh()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\s/.exec(r.text)&&(n=void 0);var a=(t=me(t=>{let r={boolean:{},number:{},string:{}},n=[],i;return{nodeList:t.filter(function(t){var e=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(e in r?!r[e].hasOwnProperty(t)&&(r[e][t]=!0):!n.includes(t)&&n.push(t))}),dir:i}},"uniq")(e.flat())).nodeList,e=t.dir,t=D().flowchart??{},e=e??(t.inheritDir?this.getDirection()??D().direction??void 0:void 0);if("gen-1"===this.version)for(let t=0;t":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.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"),(t=this.countChar(".",r))&&(i="dotted",a=t),{type:n,stroke:i,length:a}}destructLink(t,e){if(t=this.destructEndLink(t),e){if((e=this.destructStartLink(e)).stroke!==t.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===e.type)e.type=t.type;else{if(e.type!==t.type)return{type:"INVALID",stroke:"INVALID"};e.type="double_"+e.type}return"double_arrow"===e.type&&(e.type="double_arrow_point"),e.length=t.length,e}return t}exists(t,e){for(var r of t)if(r.nodes.includes(e))return!0;return!1}makeUniq(r,n){let i=[];return r.nodes.forEach((t,e)=>{this.exists(n,t)||i.push(r.nodes[e])}),{nodes:i}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e}return{arrowTypeStart:e,arrowTypeEnd:r}}addNodeFromVertex(t,e,r,n,i,a){var r=r.get(t.id),n=n.get(t.id)??!1,s=this.findNode(e,t.id);s?(s.cssStyles=t.styles,s.cssCompiledStyles=this.getCompiledStyles(t.classes),s.cssClasses=t.classes.join(" ")):(s={id:t.id,label:t.text,labelStyle:"",parentId:r,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint},n?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t)}))}getCompiledStyles(t){let e=[];for(var r of t)(r=this.classes.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}getData(){let a=D(),e=[],s=[],r=this.getSubGraphs(),n=new Map,i=new Map;for(let t=r.length-1;0<=t;t--){var o,l=r[t];0{this.addNodeFromVertex(t,e,n,i,a,a.look||"classic")});let h=this.getEdges();return h.forEach((t,e)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=this.destructEdgeType(t.type),i=[...h.defaultStyle??[]],e=(t.style&&i.push(...t.style),{id:KE(t.start,t.end,{counter:e,prefix:"L"},t.id),isUserDefinedId:t.isUserDefinedId,start:t.start,end:t.end,type:t.type??"normal",label:t.text,labelpos:"c",thickness:t.stroke,minlen:t.length,classes:"invisible"===t?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===t?.stroke||"arrow_open"===t?.type?"none":r,arrowTypeEnd:"invisible"===t?.stroke||"arrow_open"===t?.type?"none":n,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:i,style:i,pattern:t.stroke,look:a.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||a.flowchart?.curve});s.push(e)}),{nodes:e,edges:s,other:{},config:a}}defaultConfig(){return vh.flowchart}}}),jM=t(()=>{Q3(),IM=me((t,e)=>{let r;return"sandbox"===e&&(r=H("#i"+t)),H("sandbox"===e?r.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)},"getDiagramElement")}),WM=t(()=>{RM=me(({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}},"getSubGraphTitleMargins")}),YM=t(()=>{mu(),th(),e(),WM(),Q3(),DN(),Y9(),CL(),kR(),OI(),SL(),MM=me(async(n,i)=>{M.info("Creating subgraph rect for ",i.id,i);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=kL(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Dc(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await W9(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();Dc(t.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 t=MN.svg(u),e=TL(i,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=t.path(MI(y,v,n,m,0),e);(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=RM(t).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(t){return mL(i,t)},{cluster:u,labelBBox:f}},"rect"),DM=me((t,e)=>{var r=(t=t.insert("g").attr("class","note-cluster").attr("id",e.id)).insert("rect",":first-child"),n=0*e.padding,i=n/2,i=(r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none"),r.node().getBBox());return e.width=i.width,e.height=i.height,e.intersect=function(t){return mL(e,t)},{cluster:t,labelBBox:{width:0,height:0}}},"noteGroup"),OM=me(async(i,a)=>{let t=D(),{themeVariables:e,handDrawnSeed:s}=t,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=e,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 wR(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();Dc(t.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 t=a.cssClasses.includes("statediagram-cluster-alt"),e=MN.svg(u),r=a.rx||a.ry?e.path(MI(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):e.rectangle(v,x,m,y,{seed:s}),n=(w=u.insert(()=>r,":first-child"),e.rectangle(v,b,m,i,{fill:t?o:l,fillStyle:t?"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-(Dc(t.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(t){return mL(a,t)},{cluster:u,labelBBox:g}},"roundedWithTitle"),PM=me(async(n,i)=>{M.info("Creating subgraph rect for ",i.id,i);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=kL(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Dc(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await W9(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0,width:i.width}),f=g.getBBox();Dc(t.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 t=MN.svg(u),e=TL(i,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=t.path(MI(y,v,n,m,i.rx),e);(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=RM(t).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(t){return mL(i,t)},{cluster:u,labelBBox:f}},"kanbanSection"),BM=me((e,r)=>{var{themeVariables:n,handDrawnSeed:i}=D(),n=n.nodeBorder,t=(e=e.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 t=MN.svg(e).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:i});c=e.insert(()=>t,":first-child")}else(c=t.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(t){return mL(r,t)},{cluster:e,labelBBox:{}}},"divider"),FM={rect:MM,squareRect:MM,roundedWithTitle:OM,noteGroup:DM,divider:BM,kanbanSection:PM},$M=new Map,zM=me(async(t,e)=>{var r=e.shape||"rect",r=await FM[r](t,e);return $M.set(e.id,r),r},"insertCluster"),GM=me(()=>{$M=new Map},"clear")});function HM(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=XM(t),e=XM(e);var[t,r]=[t.x,t.y],[e,n]=[e.x,e.y],e=e-t,t=n-r;return{angle:Math.atan(t/e),deltaX:e,deltaY:t}}var VM,XM,KM,ZM,QM,JM,tD=t(()=>{VM={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},me(HM,"calculateDeltaAndAngle"),XM=me(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),KM=me(c=>({x:me(function(t,e,r){let n=0,i=XM(r[0]).x{e(),ZM=me((t,e,r,n,i,a)=>{e.arrowTypeStart&&JM(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&JM(t,"end",e.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),QM={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}},JM=me((t,e,r,n,i,a,s)=>{let o=QM[r],l,c;o?(i=i+`_${a}-`+o.type+("start"===e?"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(t=>{t.setAttribute("stroke",s),o.fill&&t.setAttribute("fill",s)}),l.parentNode?.appendChild(c)),t.attr("marker-"+e,`url(${n}#${a})`)):t.attr("marker-"+e,`url(${n}#${i})`)):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function rD(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}function nD(e){var r=[],n=[];for(let t=1;t{mu(),th(),e(),Y9(),ZE(),tD(),WM(),Q3(),DN(),kR(),eD(),SL(),iD=new Map,aD=new Map,sD=me(()=>{iD.clear(),aD.clear()},"clear"),oD=me(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),lD=me(async(t,e)=>{var r,n=Dc(D().flowchart.htmlLabels),i=await W9(t,e.label,{style:oD(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1}),a=(M.info("abc82",e,e.labelType),t.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+")"),iD.set(e.id,a),e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(n=await wR(e.startLabelLeft,oD(e.labelStyle)),s=(r=t.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+")"),aD.get(e.id)||aD.set(e.id,{}),aD.get(e.id).startLeft=r,rD(l,e.startLabelLeft)),e.startLabelRight&&(n=await wR(e.startLabelRight,oD(e.labelStyle)),a=(s=t.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+")"),aD.get(e.id)||aD.set(e.id,{}),aD.get(e.id).startRight=s,rD(l,e.startLabelRight)),e.endLabelLeft&&(n=await wR(e.endLabelLeft,oD(e.labelStyle)),r=(a=t.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),aD.get(e.id)||aD.set(e.id,{}),aD.get(e.id).endLeft=a,rD(l,e.endLabelLeft)),e.endLabelRight&&(r=await wR(e.endLabelRight,oD(e.labelStyle)),n=(s=t.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),aD.get(e.id)||aD.set(e.id,{}),aD.get(e.id).endRight=s,rD(l,e.endLabelRight)),i},"insertEdgeLabel"),me(rD,"setTerminalWidth"),cD=me((n,i)=>{M.debug("Moving label abc88 ",n.id,n.label,iD.get(n.id),i);var a,s=i.updatedPath||i.originalPath,o=D(),o=RM(o).subGraphTitleTotalMargin;if(n.label){let t=iD.get(n.id),e=n.x,r=n.y;s&&(a=HE.calcLabelPosition(s),M.debug("Moving label "+n.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(n.startLabelLeft){let t=aD.get(n.id).startLeft,e=n.x,r=n.y;s&&(i=HE.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=aD.get(n.id).startRight,e=n.x,r=n.y;s&&(a=HE.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=aD.get(n.id).endLeft,e=n.x,r=n.y;s&&(o=HE.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=aD.get(n.id).endRight,e=n.x,r=n.y;s&&(i=HE.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),hD=me((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n);return t.width/2<=r||t.height/2<=e},"outsideNode"),uD=me((t,n,i)=>{M.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(n)} + insidePoint : ${JSON.stringify(i)} + node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),s=t.width/2,o=i.xMath.abs(a-n.x)*l)return t=i.y{M.warn("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],s=!1;return t.forEach(t=>{if(M.info("abc88 checking point",t,n),hD(n,t)||s)M.warn("abc88 outside",t,a),a=t,s||i.push(t);else{let e=uD(n,a,t),r=(M.debug("abc88 inside",t,a,e),M.debug("abc88 intersection",e,n),!1);i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)?M.warn("abc88 no intersect",e,i):i.push(e),s=!0}}),M.debug("returning points",i),i},"cutPathAtIntersect"),me(nD,"extractCornerPoints"),pD=me(function(t,e,r){var n=e.x-t.x,t=e.y-t.y,r=r/Math.sqrt(n*n+t*t);return{x:e.x-r*n,y:e.y-r*t}},"findAdjacentPoint"),gD=me(function(n){var t=nD(n).cornerPointPositions,i=[];for(let r=0;r!Number.isNaN(t.y)),r=gD(r);let g=d5;switch(g=W4,i.curve){case"linear":g=W4;break;case"basis":g=d5;break;case"cardinal":g=C5;break;case"bumpX":g=i5;break;case"bumpY":g=a5;break;case"catmullRom":g=O5;break;case"monotoneX":g=J5;break;case"monotoneY":g=t3;break;case"natural":g=i3;break;case"step":g=o3;break;case"stepAfter":g=c3;break;case"stepBefore":g=l3;break;default:g=d5}let{x:f,y:m}=KM(i),y=K4().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(t=>t?.startsWith("stroke:"));if("handDrawn"===i.look)a=MN.svg(n),Object.assign([],r),t=a.path(b,{roughness:.3,seed:o}),v+=" transition",r=(x=H(t).select("path").attr("id",i.id).attr("class"," "+v+(i.classes?" "+i.classes:"")).attr("style",w?w.reduce((t,e)=>t+";"+e,""):"")).attr("d"),x.attr("d",r),n.node().appendChild(x.node());else{let t=p.join(";"),e=w?w.reduce((t,e)=>t+e+";",""):"",r="";i.animate&&(r=" edge-animation-fast"),i.animation&&(r=" edge-animation-"+i.animation),a=t?t+";"+e+";":e,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=Mc(!0)),M.info("arrowTypeStart",i.arrowTypeStart),M.info("arrowTypeEnd",i.arrowTypeEnd),ZM(x,i,T,s,e,k),t={},c&&(t.updatedPath=l),t.originalPath=i.points,t},"insertEdge")}),OD=t(()=>{e(),mD=me((e,t,r,n)=>{t.forEach(t=>{RD[t](e,r,n)})},"insertMarkers"),yD=me((t,e,r)=>{M.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),vD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),xD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),bD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),wD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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"),kD=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),TD=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),ED=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),CD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),_D=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),SD=me((t,e,r)=>{var n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).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=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).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"),AD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),LD=me((t,e,r)=>{var n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).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=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).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"),ND=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),ND=me((t,e,r)=>{(t=t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),t.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),t.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),ID={extension:mD,composition:yD,aggregation:vD,dependency:xD,lollipop:bD,point:wD,circle:kD,cross:TD,barb:ED,only_one:CD,zero_or_one:_D,one_or_more:SD,zero_or_more:AD,requirement_arrow:LD,requirement_contains:ND},RD=fD});async function OD(e,r,i){let n,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?AM[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===i.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t??null),a=await s(n,r,i)}else a=await s(e,r,i),n=a;return r.tooltip&&a.attr("title",r.tooltip),PD.set(r.id,n),r.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var PD,BD,FD,$D,zD,GD=t(()=>{e(),GM(),PD=new Map,me(OD,"insertNode"),BD=me((t,e)=>{PD.set(e.id,t)},"setNodeElem"),FD=me(()=>{PD.clear()},"clear"),$D=me(t=>{var e=PD.get(t.id),r=(M.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")}),UD=t(()=>{Ai(),Jc(),e(),WM(),MD(),DD(),GD(),n(),KE(),zD={common:L,getConfig:Nr,insertCluster:$M,insertEdge:gD,insertEdgeLabel:oD,insertMarkers:RD,insertNode:OD,interpolateToCurve:lE,labelHelper:X9,log:M,positionEdgeLabel:lD}});function qD(t){return"symbol"==typeof t||GT(t)&&"[object Symbol]"==x6(t)}var jD,WD=t(()=>{b6(),UT(),me(qD,"isSymbol"),jD=qD});function YD(t,e){for(var r=-1,i=null==t?0:t.length,n=Array(i);++r{me(YD,"arrayMap"),HD=YD});function XD(t){var e;return"string"==typeof t?t:KT(t)?HD(t,XD)+"":jD(t)?QD?QD.call(t):"":"0"==(e=t+"")&&1/t==-KD?"-0":e}var KD,ZD,QD,JD,tO=t(()=>{n6(),VD(),JT(),WD(),KD=1/0,ZD=Y3?Y3.prototype:void 0,QD=ZD?ZD.toString:void 0,me(XD,"baseToString"),JD=XD});function eO(t){for(var e=t.length;e--&&rO.test(t.charAt(e)););return e}var rO,iO,nO=t(()=>{rO=/\s/,me(eO,"trimmedEndIndex"),iO=eO});function aO(t){return t&&t.slice(0,iO(t)+1).replace(sO,"")}var sO,oO,lO=t(()=>{nO(),sO=/^\s+/,me(aO,"baseTrim"),oO=aO});function cO(t){if("number"==typeof t)return t;if(jD(t))return hO;if(k6(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=k6(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=oO(t);var e=dO.test(t);return e||pO.test(t)?gO(t.slice(2),e?2:8):uO.test(t)?hO:+t}var hO,uO,dO,pO,gO,fO,mO=t(()=>{lO(),T6(),WD(),hO=NaN,uO=/^[-+]0x[0-9a-f]+$/i,dO=/^0b[01]+$/i,pO=/^0o[0-7]+$/i,gO=parseInt,me(cO,"toNumber"),fO=cO});function yO(t){return t?(t=fO(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}var vO,xO=t(()=>{mO(),me(yO,"toFinite"),vO=yO});function bO(t){var e=(t=vO(t))%1;return t==t?e?t-e:t:0}var wO,kO,TO,EO=t(()=>{xO(),me(bO,"toInteger"),wO=bO}),CO=t(()=>{tw(),i6(),kO=Z6(j3,"WeakMap"),TO=kO});function _O(){}var SO,AO=t(()=>{me(_O,"noop"),SO=_O});function LO(t,e){for(var r=-1,i=null==t?0:t.length;++r{me(LO,"arrayEach"),NO=LO});function RO(t,e,r,i){for(var n=t.length,a=r+(i?1:-1);i?a--:++a{me(RO,"baseFindIndex"),MO=RO});function OO(t){return t!=t}var PO,BO=t(()=>{me(OO,"baseIsNaN"),PO=OO});function FO(t,e,r){for(var i=r-1,n=t.length;++i{me(FO,"strictIndexOf"),$O=FO});function GO(t,e,r){return e==e?$O(t,e,r):MO(t,PO,r)}var UO,qO=t(()=>{DO(),BO(),zO(),me(GO,"baseIndexOf"),UO=GO});function jO(t,e){return!(null==t||!t.length)&&-1{qO(),me(jO,"arrayIncludes"),WO=jO}),XO=t(()=>{IT(),YO=AT(Object.keys,Object),HO=YO});function KO(t){if(!OT(t))return HO(t);var e,r=[];for(e in Object(t))QO.call(t,e)&&"constructor"!=e&&r.push(e);return r}var ZO,QO,JO,tP=t(()=>{PT(),XO(),ZO=Object.prototype,QO=ZO.hasOwnProperty,me(KO,"baseKeys"),JO=KO});function eP(t){return(n7(t)?s8:JO)(t)}var rP,iP,nP,aP,sP=t(()=>{o8(),tP(),a7(),me(eP,"keys"),rP=eP}),oP=t(()=>{Y7(),X7(),sE(),a7(),PT(),sP(),nP=Object.prototype,iP=nP.hasOwnProperty,nP=iE(function(t,e){if(OT(e)||n7(e))V7(e,rP(e),t);else for(var r in e)iP.call(e,r)&&W7(t,r,e[r])}),aP=nP});function lP(t,e){var r;return!KT(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!jD(t))||hP.test(t)||!cP.test(t)||null!=e&&t in Object(e))}var cP,hP,uP,dP=t(()=>{JT(),WD(),cP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hP=/^\w*$/,me(lP,"isKey"),uP=lP});function pP(t){var e=(t=Ck(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}var gP,fP,mP,yP,vP,xP=t(()=>{_k(),me(pP,"memoizeCapped"),gP=pP}),bP=t(()=>{xP(),fP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mP=/\\(\\)?/g,yP=gP(function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(fP,function(t,e,r,i){n.push(r?i.replace(mP,"$1"):e||t)}),n}),vP=yP});function wP(t){return null==t?"":JD(t)}var kP,TP=t(()=>{tO(),me(wP,"toString"),kP=wP});function EP(t,e){return KT(t)?t:uP(t,e)?[t]:vP(kP(t))}var CP,_P=t(()=>{JT(),dP(),bP(),TP(),me(EP,"castPath"),CP=EP});function SP(t){var e;return"string"==typeof t||jD(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}var AP,LP=t(()=>{WD(),me(SP,"toKey"),AP=SP});function NP(t,e){for(var r=0,i=(e=CP(e,t)).length;null!=t&&r{_P(),LP(),me(NP,"baseGet"),IP=NP});function MP(t,e,r){return void 0===(t=null==t?void 0:IP(t,e))?r:t}var DP,OP=t(()=>{RP(),me(MP,"get"),DP=MP});function PP(t,e){for(var r=-1,i=e.length,n=t.length;++r{me(PP,"arrayPush"),BP=PP});function $P(t){return KT(t)||VT(t)||!!(zP&&t&&t[zP])}var zP,GP,UP=t(()=>{n6(),QT(),JT(),zP=Y3?Y3.isConcatSpreadable:void 0,me($P,"isFlattenable"),GP=$P});function qP(t,e,r,i,n){var a=-1,s=t.length;for(r=r||GP,n=n||[];++a{FP(),UP(),me(qP,"baseFlatten"),jP=qP});function YP(t){return null!=t&&t.length?jP(t,1):[]}var HP,VP=t(()=>{WP(),me(YP,"flatten"),HP=YP});function XP(t){return H8(P8(t,void 0,HP),t+"")}var KP,ZP=t(()=>{VP(),B8(),X8(),me(XP,"flatRest"),KP=XP});function QP(t,e,r){var i=-1,n=t.length;(r=n>>0,e>>>=0;for(var a=Array(n);++i{me(QP,"baseSlice"),JP=QP});function eB(t){return rB.test(t)}var rB,iB,nB=t(()=>{rB=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),me(eB,"hasUnicode"),iB=eB});function aB(t,e,r,i){var n=-1,a=null==t?0:t.length;for(i&&a&&(r=t[++n]);++n{me(aB,"arrayReduce"),sB=aB});function lB(t,e){return t&&V7(e,rP(e),t)}var cB,hB=t(()=>{X7(),sP(),me(lB,"baseAssign"),cB=lB});function uB(t,e){return t&&V7(e,y8(e),t)}var dB,pB=t(()=>{X7(),v8(),me(uB,"baseAssignIn"),dB=uB});function gB(t,e){for(var r=-1,i=null==t?0:t.length,n=0,a=[];++r{me(gB,"arrayFilter"),fB=gB});function yB(){return[]}var vB,xB,bB,wB,kB,TB=t(()=>{me(yB,"stubArray"),vB=yB}),EB=t(()=>{mB(),TB(),xB=Object.prototype,bB=xB.propertyIsEnumerable,kB=(wB=Object.getOwnPropertySymbols)?function(e){return null==e?[]:(e=Object(e),fB(wB(e),function(t){return bB.call(e,t)}))}:vB});function CB(t,e){return V7(t,kB(t),e)}var _B,SB,AB,LB=t(()=>{X7(),EB(),me(CB,"copySymbols"),_B=CB}),NB=t(()=>{FP(),RT(),EB(),TB(),SB=Object.getOwnPropertySymbols,AB=SB?function(t){for(var e=[];t;)BP(e,kB(t)),t=NT(t);return e}:vB});function IB(t,e){return V7(t,AB(t),e)}var RB,MB=t(()=>{X7(),NB(),me(IB,"copySymbolsIn"),RB=IB});function DB(t,e,r){return e=e(t),KT(t)?e:BP(e,r(t))}var OB,PB=t(()=>{FP(),JT(),me(DB,"baseGetAllKeys"),OB=DB});function BB(t){return OB(t,rP,kB)}var FB,$B=t(()=>{PB(),EB(),sP(),me(BB,"getAllKeys"),FB=BB});function zB(t){return OB(t,y8,AB)}var GB,UB,qB,jB,WB,YB,HB,VB,XB,KB,ZB,QB,JB,tF,eF,rF,iF,nF,aF,sF=t(()=>{PB(),NB(),v8(),me(zB,"getAllKeysIn"),GB=zB}),oF=t(()=>{tw(),i6(),UB=Z6(j3,"DataView"),qB=UB}),lF=t(()=>{tw(),i6(),jB=Z6(j3,"Promise"),WB=jB}),cF=t(()=>{tw(),i6(),YB=Z6(j3,"Set"),HB=YB}),hF=t(()=>{oF(),Qw(),lF(),cF(),CO(),b6(),F6(),VB="[object Map]",XB="[object Promise]",KB="[object Set]",ZB="[object WeakMap]",QB="[object DataView]",JB=B6(qB),tF=B6(Kw),eF=B6(WB),rF=B6(HB),iF=B6(TO),nF=x6,(qB&&nF(new qB(new ArrayBuffer(1)))!=QB||Kw&&nF(new Kw)!=VB||WB&&nF(WB.resolve())!=XB||HB&&nF(new HB)!=KB||TO&&nF(new TO)!=ZB)&&(nF=me(function(t){var e=x6(t);if(t=(t="[object Object]"==e?t.constructor:void 0)?B6(t):"")switch(t){case JB:return QB;case tF:return VB;case eF:return XB;case rF:return KB;case iF:return ZB}return e},"getTag")),aF=nF});function uF(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&pF.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var dF,pF,gF,fF=t(()=>{dF=Object.prototype,pF=dF.hasOwnProperty,me(uF,"initCloneArray"),gF=uF});function mF(t,e){return e=e?mT(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)}var yF,vF=t(()=>{yT(),me(mF,"cloneDataView"),yF=mF});function xF(t){var e=new t.constructor(t.source,bF.exec(t));return e.lastIndex=t.lastIndex,e}var bF,wF,kF=t(()=>{bF=/\w*$/,me(xF,"cloneRegExp"),wF=xF});function TF(t){return CF?Object(CF.call(t)):{}}var EF,CF,_F,SF=t(()=>{n6(),EF=Y3?Y3.prototype:void 0,CF=EF?EF.valueOf:void 0,me(TF,"cloneSymbol"),_F=TF});function AF(t,e,r){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return mT(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return yF(t,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 xT(t,r);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return wF(t);case"[object Set]":return new i;case"[object Symbol]":return _F(t)}}var LF,NF=t(()=>{yT(),vF(),kF(),SF(),bT(),me(AF,"initCloneByTag"),LF=AF});function IF(t){return GT(t)&&"[object Map]"==aF(t)}var RF,MF,DF,OF=t(()=>{hF(),UT(),me(IF,"baseIsMap"),RF=IF}),PF=t(()=>{OF(),P7(),B7(),MF=(MF=M7&&M7.isMap)?L7(MF):RF,DF=MF});function BF(t){return GT(t)&&"[object Set]"==aF(t)}var FF,$F,zF,GF=t(()=>{hF(),UT(),me(BF,"baseIsSet"),FF=BF}),UF=t(()=>{GF(),P7(),B7(),$F=($F=M7&&M7.isSet)?L7($F):FF,zF=$F});function qF(r,i,n,t,e,a){var s,o=i&jF,l=i&WF,c=i&YF;if(void 0===(s=n?e?n(r,t,e,a):n(r):s)){if(!k6(r))return r;if(t=KT(r)){if(s=gF(r),!o)return kT(r,s)}else{var h=aF(r),u=h==VF||h==XF;if(p7(r))return hT(r,o);if(h==KF||h==HF||u&&!e){if(s=l||u?{}:FT(r),!o)return l?RB(r,dB(s,r)):_B(r,cB(s,r))}else{if(!ZF[h])return e?r:{};s=LF(r,h,o)}}if(u=(a=a||new qk).get(r))return u;a.set(r,s),zF(r)?r.forEach(function(t){s.add(qF(t,i,n,t,r,a))}):DF(r)&&r.forEach(function(t,e){s.set(e,qF(t,i,n,e,r,a))});var d=t?void 0:(c?l?GB:FB:l?y8:rP)(r);NO(d||r,function(t,e){d&&(t=r[e=t]),W7(s,e,qF(t,i,n,e,r,a))})}return s}var jF,WF,YF,HF,VF,XF,KF,ZF,QF,JF=t(()=>{Yk(),IO(),Y7(),hB(),pB(),pT(),CT(),LB(),MB(),$B(),sF(),hF(),fF(),NF(),$T(),JT(),f7(),PF(),T6(),UF(),sP(),v8(),jF=1,WF=2,YF=4,VF="[object Function]",XF="[object GeneratorFunction]",KF="[object Object]",(ZF={})[HF="[object Arguments]"]=ZF["[object Array]"]=ZF["[object ArrayBuffer]"]=ZF["[object DataView]"]=ZF["[object Boolean]"]=ZF["[object Date]"]=ZF["[object Float32Array]"]=ZF["[object Float64Array]"]=ZF["[object Int8Array]"]=ZF["[object Int16Array]"]=ZF["[object Int32Array]"]=ZF["[object Map]"]=ZF["[object Number]"]=ZF[KF]=ZF["[object RegExp]"]=ZF["[object Set]"]=ZF["[object String]"]=ZF["[object Symbol]"]=ZF["[object Uint8Array]"]=ZF["[object Uint8ClampedArray]"]=ZF["[object Uint16Array]"]=ZF["[object Uint32Array]"]=!0,ZF["[object Error]"]=ZF[VF]=ZF["[object WeakMap]"]=!1,me(qF,"baseClone"),QF=qF});function t$(t){return QF(t,4)}var e$,r$=t(()=>{JF(),me(t$,"clone"),e$=t$});function i$(t){return QF(t,5)}var n$,a$=t(()=>{JF(),me(i$,"cloneDeep"),n$=i$});function s$(t){for(var e=-1,r=null==t?0:t.length,i=0,n=[];++e{me(s$,"compact"),o$=s$});function c$(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}var h$,u$=t(()=>{me(c$,"setCacheAdd"),h$=c$});function d$(t){return this.__data__.has(t)}var p$,g$=t(()=>{me(d$,"setCacheHas"),p$=d$});function f$(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new wk;++e{kk(),u$(),g$(),me(f$,"SetCache"),f$.prototype.add=f$.prototype.push=h$,f$.prototype.has=p$,m$=f$});function v$(t,e){for(var r=-1,i=null==t?0:t.length;++r{me(v$,"arraySome"),x$=v$});function w$(t,e){return t.has(e)}var k$,T$=t(()=>{me(w$,"cacheHas"),k$=w$});function E$(t,e,r,i,n,a){var s=1&r,o=t.length;if(o!=(l=e.length)&&!(s&&o{y$(),b$(),T$(),me(E$,"equalArrays"),C$=E$});function S$(t){var r=-1,i=Array(t.size);return t.forEach(function(t,e){i[++r]=[e,t]}),i}var A$,L$=t(()=>{me(S$,"mapToArray"),A$=S$});function N$(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var I$,R$=t(()=>{me(N$,"setToArray"),I$=N$});function M$(t,e,r,i,n,a,s){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new dT(t),new dT(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Aw(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var o=A$;case"[object Set]":var l,o=o||I$;return!!(t.size==e.size||1&i)&&((l=s.get(t))?l==e:(i|=2,s.set(t,e),l=C$(o(t),o(e),i,n,a,s),s.delete(t),l));case"[object Symbol]":if(O$)return O$.call(t)==O$.call(e)}return!1}var D$,O$,P$,B$=t(()=>{n6(),gT(),Lw(),_$(),L$(),R$(),D$=Y3?Y3.prototype:void 0,O$=D$?D$.valueOf:void 0,me(M$,"equalByTag"),P$=M$});function F$(t,e,r,i,n,a){var s=1&r,o=FB(t),l=o.length;if(l!=FB(e).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in e:z$.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=s;++c{$B(),$$=Object.prototype,z$=$$.hasOwnProperty,me(F$,"equalObjects"),G$=F$});function q$(t,e,r,i,n,a){var s=KT(t),o=KT(e),l=s?W$:aF(t),o=o?W$:aF(e),c=(l=l==j$?Y$:l)==Y$,h=(o=o==j$?Y$:o)==Y$;if((o=l==o)&&p7(t)){if(!p7(e))return!1;c=!(s=!0)}return o&&!c?(a=a||new qk,s||O7(t)?C$(t,e,r,i,n,a):P$(t,e,l,r,i,n,a)):1&r||(s=c&&V$.call(t,"__wrapped__"),l=h&&V$.call(e,"__wrapped__"),!s&&!l)?o&&(a=a||new qk,G$(t,e,r,i,n,a)):n(s?t.value():t,l?e.value():e,r,i,a=a||new qk)}var j$,W$,Y$,H$,V$,X$,K$=t(()=>{Yk(),_$(),B$(),U$(),hF(),JT(),f7(),F7(),j$="[object Arguments]",W$="[object Array]",Y$="[object Object]",H$=Object.prototype,V$=H$.hasOwnProperty,me(q$,"baseIsEqualDeep"),X$=q$});function Z$(t,e,r,i,n){return t===e||(null==t||null==e||!GT(t)&&!GT(e)?t!=t&&e!=e:X$(t,e,r,i,Z$,n))}var Q$,J$=t(()=>{K$(),UT(),me(Z$,"baseIsEqual"),Q$=Z$});function tz(t,e,r,i){var n=r.length,a=n,s=!i;if(null==t)return!a;for(t=Object(t);n--;){var o=r[n];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n{Yk(),J$(),me(tz,"baseIsMatch"),ez=tz});function iz(t){return t==t&&!k6(t)}var nz,az=t(()=>{T6(),me(iz,"isStrictComparable"),nz=iz});function sz(t){for(var e=rP(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,nz(n)]}return e}var oz,lz=t(()=>{az(),sP(),me(sz,"getMatchData"),oz=sz});function cz(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}}var hz,uz=t(()=>{me(cz,"matchesStrictComparable"),hz=cz});function dz(e){var r=oz(e);return 1==r.length&&r[0][2]?hz(r[0][0],r[0][1]):function(t){return t===e||ez(t,e,r)}}var pz,gz=t(()=>{rz(),lz(),uz(),me(dz,"baseMatches"),pz=dz});function fz(t,e){return null!=t&&e in Object(t)}var mz,yz=t(()=>{me(fz,"baseHasIn"),mz=fz});function vz(t,e,r){for(var i=-1,n=(e=CP(e,t)).length,a=!1;++i{_P(),QT(),JT(),r8(),r7(),LP(),me(vz,"hasPath"),xz=vz});function wz(t,e){return null!=t&&xz(t,e,mz)}var kz,Tz=t(()=>{yz(),bz(),me(wz,"hasIn"),kz=wz});function Ez(r,i){return uP(r)&&nz(i)?hz(AP(r),i):function(t){var e=DP(t,r);return void 0===e&&e===i?kz(t,r):Q$(i,e,3)}}var Cz,_z=t(()=>{J$(),OP(),Tz(),dP(),az(),uz(),LP(),me(Ez,"baseMatchesProperty"),Cz=Ez});function Sz(e){return function(t){return t?.[e]}}var Az,Lz=t(()=>{me(Sz,"baseProperty"),Az=Sz});function Nz(e){return function(t){return IP(t,e)}}var Iz,Rz=t(()=>{RP(),me(Nz,"basePropertyDeep"),Iz=Nz});function Mz(t){return uP(t)?Az(AP(t)):Iz(t)}var Dz,Oz=t(()=>{Lz(),Rz(),dP(),LP(),me(Mz,"property"),Dz=Mz});function Pz(t){return"function"==typeof t?t:null==t?L8:"object"==typeof t?KT(t)?Cz(t[0],t[1]):pz(t):Dz(t)}var Bz,Fz=t(()=>{gz(),_z(),N8(),JT(),Oz(),me(Pz,"baseIteratee"),Bz=Pz});function $z(t,e,r,i){for(var n=-1,a=null==t?0:t.length;++n{me($z,"arrayAggregator"),zz=$z});function Uz(t,e){return t&&iT(t,e,rP)}var qz,jz=t(()=>{aT(),sP(),me(Uz,"baseForOwn"),qz=Uz});function Wz(a,s){return function(t,e){if(null!=t){if(!n7(t))return a(t,e);for(var r=t.length,i=s?r:-1,n=Object(t);(s?i--:++i{a7(),me(Wz,"createBaseEach"),Yz=Wz}),Kz=t(()=>{jz(),Xz(),Hz=Yz(qz),Vz=Hz});function Zz(t,i,n,a){return Vz(t,function(t,e,r){i(a,t,n(t),r)}),a}var Qz,Jz=t(()=>{Kz(),me(Zz,"baseAggregator"),Qz=Zz});function tG(n,a){return function(t,e){var r=KT(t)?zz:Qz,i=a?a():{};return r(t,n,Bz(e,2),i)}}var eG,rG,iG,nG,aG,sG,oG,lG=t(()=>{Gz(),Jz(),Fz(),JT(),me(tG,"createAggregator"),eG=tG}),cG=t(()=>{i6(),rG=me(function(){return j3.Date.now()},"now"),iG=rG}),hG=t(()=>{Q8(),Lw(),eE(),v8(),nG=Object.prototype,aG=nG.hasOwnProperty,sG=Z8(function(t,e){t=Object(t);var r=-1,i=e.length,n=2{me(uG,"arrayIncludesWith"),dG=uG});function gG(t,e,r,i){var n=-1,a=WO,s=!0,o=t.length,l=[],c=e.length;if(o){r&&(e=HD(e,L7(r))),i?(a=dG,s=!1):200<=e.length&&(a=k$,s=!1,e=new m$(e));t:for(;++n{y$(),VO(),pG(),VD(),P7(),T$(),me(gG,"baseDifference"),fG=gG}),xG=t(()=>{vG(),WP(),Q8(),l7(),mG=Z8(function(t,e){return o7(t)?fG(t,jP(e,1,o7,!0)):[]}),yG=mG});function bG(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var wG,kG=t(()=>{me(bG,"last"),wG=bG});function TG(t,e,r){var i=null==t?0:t.length;return i?(e=r||void 0===e?1:wO(e),JP(t,e<0?0:e,i)):[]}var EG,CG=t(()=>{tB(),EO(),me(TG,"drop"),EG=TG});function _G(t,e,r){var i=null==t?0:t.length;return i?(e=r||void 0===e?1:wO(e),JP(t,0,(e=i-e)<0?0:e)):[]}var SG,AG=t(()=>{tB(),EO(),me(_G,"dropRight"),SG=_G});function LG(t){return"function"==typeof t?t:L8}var NG,IG=t(()=>{N8(),me(LG,"castFunction"),NG=LG});function RG(t,e){return(KT(t)?NO:Vz)(t,NG(e))}var v,MG=t(()=>{IO(),Kz(),IG(),JT(),me(RG,"forEach"),v=RG}),DG=t(()=>{MG()});function OG(t,e){for(var r=-1,i=null==t?0:t.length;++r{me(OG,"arrayEvery"),PG=OG});function FG(t,i){var n=!0;return Vz(t,function(t,e,r){return n=!!i(t,e,r)}),n}var $G,zG=t(()=>{Kz(),me(FG,"baseEvery"),$G=FG});function GG(t,e,r){var i=KT(t)?PG:$G;return r&&tE(t,e,r)&&(e=void 0),i(t,Bz(e,3))}var UG,qG=t(()=>{BG(),zG(),Fz(),JT(),eE(),me(GG,"every"),UG=GG});function jG(t,i){var n=[];return Vz(t,function(t,e,r){i(t,e,r)&&n.push(t)}),n}var WG,YG=t(()=>{Kz(),me(jG,"baseFilter"),WG=jG});function HG(t,e){return(KT(t)?fB:WG)(t,Bz(e,3))}var VG,XG=t(()=>{mB(),YG(),Fz(),JT(),me(HG,"filter"),VG=HG});function KG(a){return function(t,e,r){var i,n=Object(t);return n7(t)||(i=Bz(e,3),t=rP(t),e=me(function(t){return i(n[t],t,n)},"predicate")),-1<(e=a(t,e,r))?n[i?t[e]:e]:void 0}}var ZG,QG=t(()=>{Fz(),a7(),sP(),me(KG,"createFind"),ZG=KG});function JG(t,e,r){var i=null==t?0:t.length;return i?((r=null==r?0:wO(r))<0&&(r=tU(i+r,0)),MO(t,Bz(e,3),r)):-1}var tU,eU,rU,iU,nU=t(()=>{DO(),Fz(),EO(),tU=Math.max,me(JG,"findIndex"),eU=JG}),aU=t(()=>{QG(),nU(),rU=ZG(eU),iU=rU});function sU(t){return t&&t.length?t[0]:void 0}var oU,lU=t(()=>{me(sU,"head"),oU=sU}),cU=t(()=>{lU()});function hU(t,i){var n=-1,a=n7(t)?Array(t.length):[];return Vz(t,function(t,e,r){a[++n]=i(t,e,r)}),a}var uU,dU=t(()=>{Kz(),a7(),me(hU,"baseMap"),uU=hU});function pU(t,e){return(KT(t)?HD:uU)(t,Bz(e,3))}var x,gU=t(()=>{VD(),Fz(),dU(),JT(),me(pU,"map"),x=pU});function fU(t,e){return jP(x(t,e),1)}var mU,yU=t(()=>{WP(),gU(),me(fU,"flatMap"),mU=fU});function vU(t,e){return null==t?t:iT(t,NG(e),y8)}var xU,bU=t(()=>{aT(),IG(),v8(),me(vU,"forIn"),xU=vU});function wU(t,e){return t&&qz(t,NG(e))}var kU,TU,EU,CU,_U=t(()=>{jz(),IG(),me(wU,"forOwn"),kU=wU}),SU=t(()=>{Kk(),lG(),EU=Object.prototype,TU=EU.hasOwnProperty,EU=eG(function(t,e,r){TU.call(t,r)?t[r].push(e):Xk(t,r,[e])}),CU=EU});function AU(t,e){return e{me(AU,"baseGt"),LU=AU});function IU(t,e){return null!=t&&MU.call(t,e)}var RU,MU,DU,OU=t(()=>{RU=Object.prototype,MU=RU.hasOwnProperty,me(IU,"baseHas"),DU=IU});function PU(t,e){return null!=t&&xz(t,e,DU)}var BU,FU=t(()=>{OU(),bz(),me(PU,"has"),BU=PU});function $U(t){return"string"==typeof t||!KT(t)&>(t)&&"[object String]"==x6(t)}var zU,GU=t(()=>{b6(),JT(),UT(),me($U,"isString"),zU=$U});function UU(e,t){return HD(t,function(t){return e[t]})}var qU,jU=t(()=>{VD(),me(UU,"baseValues"),qU=UU});function WU(t){return null==t?[]:qU(t,rP(t))}var YU,HU=t(()=>{jU(),sP(),me(WU,"values"),YU=WU});function VU(t,e,r,i){return t=n7(t)?t:YU(t),r=r&&!i?wO(r):0,i=t.length,r<0&&(r=XU(i+r,0)),zU(t)?r<=i&&-1{qO(),a7(),GU(),EO(),HU(),XU=Math.max,me(VU,"includes"),KU=VU});function QU(t,e,r){var i=null==t?0:t.length;return i?((r=null==r?0:wO(r))<0&&(r=JU(i+r,0)),UO(t,e,r)):-1}var JU,tq,eq=t(()=>{qO(),EO(),JU=Math.max,me(QU,"indexOf"),tq=QU});function rq(t){if(null!=t){if(n7(t)&&(KT(t)||"string"==typeof t||"function"==typeof t.splice||p7(t)||O7(t)||VT(t)))return!t.length;var e,r=aF(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(OT(t))return!JO(t).length;for(e in t)if(nq.call(t,e))return!1}return!0}var iq,nq,aq,sq=t(()=>{tP(),hF(),QT(),JT(),a7(),f7(),PT(),F7(),iq=Object.prototype,nq=iq.hasOwnProperty,me(rq,"isEmpty"),aq=rq});function oq(t){return GT(t)&&"[object RegExp]"==x6(t)}var lq,cq,hq,uq=t(()=>{b6(),UT(),me(oq,"baseIsRegExp"),lq=oq}),dq=t(()=>{uq(),P7(),B7(),cq=(cq=M7&&M7.isRegExp)?L7(cq):lq,hq=cq});function pq(t){return void 0===t}var gq,fq=t(()=>{me(pq,"isUndefined"),gq=pq});function mq(t,e){return t{me(mq,"baseLt"),yq=mq});function xq(t,i){var n={};return i=Bz(i,3),qz(t,function(t,e,r){Xk(n,e,i(t,e,r))}),n}var bq,wq=t(()=>{Kk(),jz(),Fz(),me(xq,"mapValues"),bq=xq});function kq(t,e,r){for(var i=-1,n=t.length;++i{WD(),me(kq,"baseExtremum"),Tq=kq});function Cq(t){return t&&t.length?Tq(t,L8,LU):void 0}var _q,Sq=t(()=>{Eq(),NU(),N8(),me(Cq,"max"),_q=Cq});function Aq(t){return t&&t.length?Tq(t,L8,yq):void 0}var Lq,Nq=t(()=>{Eq(),vq(),N8(),me(Aq,"min"),Lq=Aq});function Iq(t,e){return t&&t.length?Tq(t,Bz(e,2),yq):void 0}var Rq,Mq=t(()=>{Eq(),Fz(),vq(),me(Iq,"minBy"),Rq=Iq});function Dq(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var Oq,Pq=t(()=>{me(Dq,"negate"),Oq=Dq});function Bq(t,e,r,i){if(k6(t))for(var n=-1,a=(e=CP(e,t)).length,s=a-1,o=t;null!=o&&++n{Y7(),_P(),r8(),T6(),LP(),me(Bq,"baseSet"),Fq=Bq});function zq(t,e,r){for(var i=-1,n=e.length,a={};++i{RP(),$q(),_P(),me(zq,"basePickBy"),Gq=zq});function qq(t,r){var e;return null==t?{}:(e=HD(GB(t),function(t){return[t]}),r=Bz(r),Gq(t,e,function(t,e){return r(t,e[0])}))}var jq,Wq=t(()=>{VD(),Fz(),Uq(),sF(),me(qq,"pickBy"),jq=qq});function Yq(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var Hq,Vq=t(()=>{me(Yq,"baseSortBy"),Hq=Yq});function Xq(t,e){if(t!==e){var r=void 0!==t,i=null===t,n=t==t,a=jD(t),s=void 0!==e,o=null===e,l=e==e,c=jD(e);if(!o&&!c&&!a&&e{WD(),me(Xq,"compareAscending"),Kq=Xq});function Qq(t,e,r){for(var i=-1,n=t.criteria,a=e.criteria,s=n.length,o=r.length;++i{Zq(),me(Qq,"compareMultiple"),Jq=Qq});function ej(t,i,r){i=i.length?HD(i,function(e){return KT(e)?function(t){return IP(t,1===e.length?e[0]:e)}:e}):[L8];var n=-1,t=(i=HD(i,L7(Bz)),uU(t,function(e,t,r){return{criteria:HD(i,function(t){return t(e)}),index:++n,value:e}}));return Hq(t,function(t,e){return Jq(t,e,r)})}var rj,ij,nj,aj=t(()=>{VD(),RP(),Fz(),dU(),Vq(),P7(),tj(),N8(),JT(),me(ej,"baseOrderBy"),rj=ej}),sj=t(()=>{Lz(),ij=Az("length"),nj=ij});function oj(t){for(var e=fj.lastIndex=0;fj.test(t);)++e;return e}var lj,cj,hj,uj,dj,pj,gj,fj,mj,yj=t(()=>{lj="["+(uj="\\ud800-\\udfff")+"]",cj="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",hj="\\ud83c[\\udffb-\\udfff]",gj="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",pj="[\\ufe0e\\ufe0f]?",dj="(?:\\u200d(?:"+[uj="[^"+uj+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+pj+gj+")*",pj=pj+gj+dj,gj="(?:"+[uj+cj+"?",cj,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",lj].join("|")+")",fj=RegExp(hj+"(?="+hj+")|"+gj+pj,"g"),me(oj,"unicodeSize"),mj=oj});function vj(t){return(iB(t)?mj:nj)(t)}var xj,bj=t(()=>{sj(),nB(),yj(),me(vj,"stringSize"),xj=vj});function wj(r,t){return Gq(r,t,function(t,e){return kz(r,e)})}var kj,Tj,Ej,Cj=t(()=>{Uq(),Tz(),me(wj,"basePick"),kj=wj}),_j=t(()=>{Cj(),ZP(),Tj=KP(function(t,e){return null==t?{}:kj(t,e)}),Ej=Tj});function Sj(t,e,r,i){for(var n=-1,a=Lj(Aj((e-t)/(r||1)),0),s=Array(a);a--;)s[i?a:++n]=t,t+=r;return s}var Aj,Lj,Nj,Ij=t(()=>{Aj=Math.ceil,Lj=Math.max,me(Sj,"baseRange"),Nj=Sj});function Rj(i){return function(t,e,r){return r&&"number"!=typeof r&&tE(t,e,r)&&(e=r=void 0),t=vO(t),void 0===e?(e=t,t=0):e=vO(e),r=void 0===r?t{Ij(),eE(),xO(),me(Rj,"createRange"),Mj=Rj}),Bj=t(()=>{Pj(),Dj=Mj(),Oj=Dj});function Fj(t,i,n,a,e){return e(t,function(t,e,r){n=a?(a=!1,t):i(n,t,e,r)}),n}var $j,zj=t(()=>{me(Fj,"baseReduce"),$j=Fj});function Gj(t,e,r){var i=KT(t)?sB:$j,n=arguments.length<3;return i(t,Bz(e,4),r,n,Vz)}var Uj,qj=t(()=>{oB(),Kz(),Fz(),zj(),JT(),me(Gj,"reduce"),Uj=Gj});function jj(t,e){return(KT(t)?fB:WG)(t,Oq(Bz(e,3)))}var Wj,Yj=t(()=>{mB(),YG(),Fz(),JT(),Pq(),me(jj,"reject"),Wj=jj});function Hj(t){var e;return null==t?0:n7(t)?zU(t)?xj(t):t.length:"[object Map]"==(e=aF(t))||"[object Set]"==e?t.size:JO(t).length}var Vj,Xj=t(()=>{tP(),hF(),a7(),GU(),bj(),me(Hj,"size"),Vj=Hj});function Kj(t,i){var n;return Vz(t,function(t,e,r){return!(n=i(t,e,r))}),!!n}var Zj,Qj=t(()=>{Kz(),me(Kj,"baseSome"),Zj=Kj});function Jj(t,e,r){var i=KT(t)?x$:Zj;return r&&tE(t,e,r)&&(e=void 0),i(t,Bz(e,3))}var tW,eW,rW,iW,nW,aW=t(()=>{b$(),Fz(),Qj(),JT(),eE(),me(Jj,"some"),tW=Jj}),sW=t(()=>{WP(),aj(),Q8(),eE(),eW=Z8(function(t,e){var r;return null==t?[]:(1<(r=e.length)&&tE(t,e[0],e[1])?e=[]:2{cF(),AO(),R$(),iW=HB&&1/I$(new HB([,-0]))[1]==1/0?function(t){return new HB(t)}:SO,nW=iW});function lW(t,e,r){var i=-1,n=WO,a=t.length,s=!0,o=[],l=o;if(r)s=!1,n=dG;else if(200<=a){var c=e?null:nW(t);if(c)return I$(c);s=!1,n=k$,l=new m$}else l=e?[]:o;t:for(;++i{y$(),VO(),pG(),T$(),oW(),R$(),me(lW,"baseUniq"),cW=lW}),pW=t(()=>{WP(),Q8(),dW(),l7(),hW=Z8(function(t){return cW(jP(t,1,o7,!0))}),uW=hW});function gW(t){return t&&t.length?cW(t):[]}var fW,mW=t(()=>{dW(),me(gW,"uniq"),fW=gW});function yW(t,e){return t&&t.length?cW(t,Bz(e,2)):[]}var vW,xW=t(()=>{Fz(),dW(),me(yW,"uniqBy"),vW=yW});function bW(t){var e=++wW;return kP(t)+e}var wW,kW,TW=t(()=>{TP(),wW=0,me(bW,"uniqueId"),kW=bW});function EW(t,e,r){for(var i=-1,n=t.length,a=e.length,s={};++i{me(EW,"baseZipObject"),CW=EW});function SW(t,e){return CW(t||[],e||[],W7)}var AW,LW=t(()=>{Y7(),_W(),me(SW,"zipObject"),AW=SW}),NW=t(()=>{oP(),r$(),a$(),l$(),G8(),hG(),xG(),CG(),AG(),DG(),qG(),XG(),aU(),cU(),yU(),VP(),MG(),bU(),_U(),SU(),FU(),N8(),ZU(),eq(),JT(),sq(),A6(),T6(),dq(),GU(),fq(),sP(),kG(),gU(),wq(),Sq(),oE(),Nq(),Mq(),AO(),cG(),_j(),Wq(),Bj(),qj(),Yj(),Xj(),aW(),sW(),pW(),mW(),TW(),HU(),LW()});function IW(t,e){t[e]?t[e]++:t[e]=1}function RW(t,e){--t[e]||delete t[e]}function MW(t,e,r,i){return e=""+e,r=""+r,!t&&r{NW(),PW="\0",(BW=class{static{me(this,"Graph")}constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=$8(void 0),this._defaultEdgeLabelFn=$8(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[PW]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return C6(t)||(t=$8(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return rP(this._nodes)}sources(){var e=this;return VG(this.nodes(),function(t){return aq(e._in[t])})}sinks(){var e=this;return VG(this.nodes(),function(t){return aq(e._out[t])})}setNodes(t,e){var r=arguments,i=this;return v(t,function(t){1this.removeEdge(this._edgeObjs[t]),"removeEdge"),delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],v(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),v(rP(this._in[t]),e),delete this._in[t],delete this._preds[t],v(rP(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount),this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(gq(e))e=PW;else{for(var r=e+="";!gq(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound&&(t=this._parent[t])!==PW)return t}children(t){var e;return gq(t)&&(t=PW),this._isCompound?(e=this._children[t])?rP(e):void 0:t===PW?this.nodes():this.hasNode(t)?[]:void 0}predecessors(t){if(t=this._preds[t])return rP(t)}successors(t){if(t=this._sucs[t])return rP(t)}neighbors(t){var e=this.predecessors(t);if(e)return uW(e,this.successors(t))}isLeaf(t){return 0===(t=this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(r){var i=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),n=(i.setGraph(this.graph()),this),a=(v(this._nodes,function(t,e){r(e)&&i.setNode(e,t)}),v(this._edgeObjs,function(t){i.hasNode(t.v)&&i.hasNode(t.w)&&i.setEdge(t,n.edge(t))}),{});function s(t){var e=n.parent(t);return void 0===e||i.hasNode(e)?a[t]=e:e in a?a[e]:s(e)}return me(s,"findParent"),this._isCompound&&v(i.nodes(),function(t){i.setParent(t,s(t))}),i}setDefaultEdgeLabel(t){return C6(t)||(t=$8(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return YU(this._edgeObjs)}setPath(t,r){var i=this,n=arguments;return Uj(t,function(t,e){return 1{FW()});function zW(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function GW(t,e){if("_next"!==t&&"_prev"!==t)return e}var UW,qW=t(()=>{UW=class{static{me(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,e=t._prev;if(e!==t)return zW(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&zW(t),t._next=e._next,e._next._prev=t,(e._next=t)._prev=e}toString(){for(var t=[],e=this._sentinel,r=e._prev;r!==e;)t.push(JSON.stringify(r,GW)),r=r._prev;return"["+t.join(", ")+"]"}},me(zW,"unlink"),me(GW,"filterOutLinks")});function jW(e,t){return e.nodeCount()<=1?[]:(t=WW((t=HW(e,t||XW)).graph,t.buckets,t.zeroIdx),HP(x(t,function(t){return e.outEdges(t.v,t.w)})))}function WW(t,e,r){for(var i,n=[],a=e[e.length-1],s=e[0];t.nodeCount();){for(;i=s.dequeue();)YW(t,e,r,i);for(;i=a.dequeue();)YW(t,e,r,i);if(t.nodeCount())for(var o=e.length-2;0{NW(),$W(),qW(),XW=$8(1),me(jW,"greedyFAS"),me(WW,"doGreedyFAS"),me(YW,"removeNode"),me(HW,"buildState"),me(VW,"assignBucket")});function ZW(r){var t="greedy"===r.graph().acyclicer?jW(r,e(r)):QW(r);function e(e){return function(t){return e.edge(t).weight}}v(t,function(t){var e=r.edge(t);r.removeEdge(t),e.forwardName=t.name,e.reversed=!0,r.setEdge(t.w,t.v,e,kW("rev"))}),me(e,"weightFn")}function QW(e){var r=[],i={},n={};function a(t){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,i[t]=!0,v(e.outEdges(t),function(t){Object.prototype.hasOwnProperty.call(i,t.w)?r.push(t):a(t.w)}),delete i[t])}return me(a,"dfs"),v(e.nodes(),a),r}function JW(i){v(i.edges(),function(t){var e,r=i.edge(t);r.reversed&&(i.removeEdge(t),e=r.forwardName,delete r.reversed,delete r.forwardName,i.setEdge(t.w,t.v,r,e))})}var tY=t(()=>{NW(),KW(),me(ZW,"run"),me(QW,"dfsFAS"),me(JW,"undo")});function eY(t,e,r,i){for(var n;n=kW(i),t.hasNode(n););return r.dummy=e,t.setNode(n,r),n}function rY(i){var n=(new BW).setGraph(i.graph());return v(i.nodes(),function(t){n.setNode(t,i.node(t))}),v(i.edges(),function(t){var e=n.edge(t.v,t.w)||{weight:0,minlen:1},r=i.edge(t);n.setEdge(t.v,t.w,{weight:e.weight+r.weight,minlen:Math.max(e.minlen,r.minlen)})}),n}function iY(e){var r=new BW({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(t){e.children(t).length||r.setNode(t,e.node(t))}),v(e.edges(),function(t){r.setEdge(t,e.edge(t))}),r}function nY(t,e){var r,i=t.x,n=t.y,a=e.x-i,e=e.y-n,s=t.width/2,t=t.height/2;if(a||e)return t=Math.abs(e)*s>Math.abs(a)*t?(r=(t=e<0?-t:t)*a/e,t):(r=a<0?-s:s)*e/a,{x:i+r,y:n+t};throw new Error("Not possible to find intersection inside of the rectangle")}function aY(i){var n=x(Oj(cY(i)+1),function(){return[]});return v(i.nodes(),function(t){var e=i.node(t),r=e.rank;gq(r)||(n[r][e.order]=t)}),n}function sY(e){var r=Lq(x(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(t){t=e.node(t),BU(t,"rank")&&(t.rank-=r)})}function oY(r){var i=Lq(x(r.nodes(),function(t){return r.node(t).rank})),n=[],a=(v(r.nodes(),function(t){var e=r.node(t).rank-i;n[e]||(n[e]=[]),n[e].push(t)}),0),s=r.graph().nodeRankFactor;v(n,function(t,e){gq(t)&&e%s!=0?--a:a&&v(t,function(t){r.node(t).rank+=a})})}function lY(t,e,r,i){var n={width:0,height:0};return 4<=arguments.length&&(n.rank=r,n.order=i),eY(t,"border",n,e)}function cY(e){return _q(x(e.nodes(),function(t){if(t=e.node(t).rank,!gq(t))return t}))}function hY(t,e){var r={lhs:[],rhs:[]};return v(t,function(t){(e(t)?r.lhs:r.rhs).push(t)}),r}function uY(t,e){var r=iG();try{return e()}finally{console.log(t+" time: "+(iG()-r)+"ms")}}function dY(t,e){return e()}var pY=t(()=>{NW(),$W(),me(eY,"addDummyNode"),me(rY,"simplify"),me(iY,"asNonCompoundGraph"),me(nY,"intersectRect"),me(aY,"buildLayerMatrix"),me(sY,"normalizeRanks"),me(oY,"removeEmptyRanks"),me(lY,"addBorderNode"),me(cY,"maxRank"),me(hY,"partition"),me(uY,"time"),me(dY,"notime")});function gY(a){function s(t){var e=a.children(t),r=a.node(t);if(e.length&&v(e,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var i=r.minRank,n=r.maxRank+1;i{NW(),pY(),me(gY,"addBorderSegments"),me(fY,"addBorderNode")});function yY(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||xY(t)}function vY(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||wY(t),"lr"!==e&&"rl"!==e||(TY(t),xY(t))}function xY(e){v(e.nodes(),function(t){bY(e.node(t))}),v(e.edges(),function(t){bY(e.edge(t))})}function bY(t){var e=t.width;t.width=t.height,t.height=e}function wY(e){v(e.nodes(),function(t){kY(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,kY),Object.prototype.hasOwnProperty.call(t,"y")&&kY(t)})}function kY(t){t.y=-t.y}function TY(e){v(e.nodes(),function(t){EY(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,EY),Object.prototype.hasOwnProperty.call(t,"x")&&EY(t)})}function EY(t){var e=t.x;t.x=t.y,t.y=e}var CY=t(()=>{NW(),me(yY,"adjust"),me(vY,"undo"),me(xY,"swapWidthHeight"),me(bY,"swapWidthHeightOne"),me(wY,"reverseY"),me(kY,"reverseYOne"),me(TY,"swapXY"),me(EY,"swapXYOne")});function _Y(e){e.graph().dummyChains=[],v(e.edges(),function(t){SY(e,t)})}function SY(t,e){var r=e.v,i=t.node(r).rank,n=e.w,a=t.node(n).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==i+1){t.removeEdge(e);var c,h=void 0,u=0;for(++i;i{NW(),pY(),me(_Y,"run"),me(SY,"normalizeEdge"),me(AY,"undo")});function NY(r){var i={};function n(t){var e=r.node(t);return Object.prototype.hasOwnProperty.call(i,t)?e.rank:(i[t]=!0,(t=Lq(x(r.outEdges(t),function(t){return n(t.w)-r.edge(t).minlen})))!==Number.POSITIVE_INFINITY&&null!=t||(t=0),e.rank=t)}me(n,"dfs"),v(r.sources(),n)}function IY(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var RY=t(()=>{NW(),me(NY,"longestPath"),me(IY,"slack")});function MY(t){var e,r=new BW({directed:!1}),i=t.nodes()[0],n=t.nodeCount();for(r.setNode(i,{});DY(r,t){NW(),$W(),RY(),me(MY,"feasibleTree"),me(DY,"tightTree"),me(OY,"findMinSlackEdge"),me(PY,"shiftRanks")}),FY=t(()=>{}),$Y=t(()=>{}),zY=t(()=>{NW(),$Y(),$8(1)}),GY=t(()=>{zY()}),UY=t(()=>{}),qY=t(()=>{UY()}),jY=t(()=>{NW(),$8(1)});function WY(e){var r={},i={},n=[];function a(t){if(Object.prototype.hasOwnProperty.call(i,t))throw new YY;Object.prototype.hasOwnProperty.call(r,t)||(i[t]=!0,r[t]=!0,v(e.predecessors(t),a),delete i[t],n.push(t))}if(me(a,"visit"),v(e.sinks(),a),Vj(r)!==e.nodeCount())throw new YY;return n}function YY(){}var HY=t(()=>{NW(),WY.CycleException=YY,me(WY,"topsort"),me(YY,"CycleException"),YY.prototype=new Error}),VY=t(()=>{HY()});function XY(e,t,r){KT(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),n=[],a={};return v(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);KY(e,t,"post"===r,a,i,n)}),n}function KY(e,t,r,i,n,a){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,r||a.push(t),v(n(t),function(t){KY(e,t,r,i,n,a)}),r&&a.push(t))}var ZY=t(()=>{NW(),me(XY,"dfs"),me(KY,"doDfs")});function QY(t,e){return XY(t,e,"post")}var JY=t(()=>{ZY(),me(QY,"postorder")});function tH(t,e){return XY(t,e,"pre")}var eH=t(()=>{ZY(),me(tH,"preorder")}),rH=t(()=>{$Y(),FW()}),iH=t(()=>{FY(),zY(),GY(),qY(),jY(),VY(),JY(),eH(),rH(),UY(),HY()});function nH(t){NY(t=rY(t));var e,r=MY(t);for(lH(r),aH(r,t);e=hH(r);)dH(r,t,e,uH(r,t,e))}function aH(e,r){var t=(t=QY(e,e.nodes())).slice(0,t.length-1);v(t,function(t){sH(e,r,t)})}function sH(t,e,r){var i=t.node(r).parent;t.edge(r,i).cutvalue=oH(t,e,r)}function oH(i,n,a){var s=i.node(a).parent,o=!0,t=n.edge(a,s),l=0;return t||(o=!1,t=n.edge(s,a)),l=t.weight,v(n.nodeEdges(a),function(t){var e=t.v===a,r=e?t.w:t.v;r!==s&&(e=e===o,t=n.edge(t).weight,l+=e?t:-t,gH(i,a,r))&&(t=i.edge(a,r).cutvalue,l+=e?-t:t)}),l}function lH(t,e){arguments.length<2&&(e=t.nodes()[0]),cH(t,{},1,e)}function cH(e,r,i,n,t){var a=i,s=e.node(n);return r[n]=!0,v(e.neighbors(n),function(t){Object.prototype.hasOwnProperty.call(r,t)||(i=cH(e,r,i,t,n))}),s.low=a,s.lim=i++,t?s.parent=t:delete s.parent,i}function hH(e){return iU(e.edges(),function(t){return e.edge(t).cutvalue<0})}function uH(e,r,t){var i=t.v,n=t.w,t=(r.hasEdge(i,n)||(i=t.w,n=t.v),e.node(i)),i=e.node(n),a=t,s=!1,n=(t.lim>i.lim&&(a=i,s=!0),VG(r.edges(),function(t){return s===fH(0,e.node(t.v),a)&&s!==fH(0,e.node(t.w),a)}));return Rq(n,function(t){return IY(r,t)})}function dH(t,e,r,i){var n=r.v;t.removeEdge(n,r.w),t.setEdge(i.v,i.w,{}),lH(t),aH(t,e),pH(t,e)}function pH(n,a){var t=iU(n.nodes(),function(t){return!a.node(t).parent}),t=(t=tH(n,t)).slice(1);v(t,function(t){var e=n.node(t).parent,r=a.edge(t,e),i=!1;r||(r=a.edge(e,t),i=!0),a.node(t).rank=a.node(e).rank+(i?r.minlen:-r.minlen)})}function gH(t,e,r){return t.hasEdge(e,r)}function fH(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var mH=t(()=>{NW(),iH(),pY(),BY(),RY(),nH.initLowLimValues=lH,nH.initCutValues=aH,nH.calcCutValue=oH,nH.leaveEdge=hH,nH.enterEdge=uH,nH.exchangeEdges=dH,me(nH,"networkSimplex"),me(aH,"initCutValues"),me(sH,"assignCutValue"),me(oH,"calcCutValue"),me(lH,"initLowLimValues"),me(cH,"dfsAssignLowLim"),me(hH,"leaveEdge"),me(uH,"enterEdge"),me(dH,"exchangeEdges"),me(pH,"updateRanks"),me(gH,"isTreeEdge"),me(fH,"isDescendant")});function yH(t){switch(t.graph().ranker){case"network-simplex":xH(t);break;case"tight-tree":vH(t);break;case"longest-path":bH(t);break;default:xH(t)}}function vH(t){NY(t),MY(t)}function xH(t){nH(t)}var bH,wH=t(()=>{BY(),mH(),RY(),me(yH,"rank"),bH=NY,me(vH,"tightTreeRanker"),me(xH,"networkSimplexRanker")});function kH(e){var r=eY(e,"root",{},"_root"),i=EH(e),n=_q(YU(i))-1,a=2*n+1,s=(e.graph().nestingRoot=r,v(e.edges(),function(t){e.edge(t).minlen*=a}),CH(e)+1);v(e.children(),function(t){TH(e,r,a,s,n,i,t)}),e.graph().nodeRankFactor=a}function TH(n,a,s,o,l,c,h){var u,d,t,e=n.children(h);e.length?(u=lY(n,"_bt"),d=lY(n,"_bb"),t=n.node(h),n.setParent(u,h),t.borderTop=u,n.setParent(d,h),t.borderBottom=d,v(e,function(t){TH(n,a,s,o,l,c,t);var e=n.node(t),r=e.borderTop||t,i=r!==(t=e.borderBottom||t)?1:l-c[h]+1;n.setEdge(u,r,{weight:e=e.borderTop?o:2*o,minlen:i,nestingEdge:!0}),n.setEdge(t,d,{weight:e,minlen:i,nestingEdge:!0})}),n.parent(h)||n.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&n.setEdge(a,h,{weight:0,minlen:s})}function EH(i){var n={};function a(t,e){var r=i.children(t);r&&r.length&&v(r,function(t){a(t,e+1)}),n[t]=e}return me(a,"dfs"),v(i.children(),function(t){a(t,1)}),n}function CH(r){return Uj(r.edges(),function(t,e){return t+r.edge(e).weight},0)}function _H(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}var SH=t(()=>{NW(),pY(),me(kH,"run"),me(TH,"dfs"),me(EH,"treeDepths"),me(CH,"sumWeights"),me(_H,"cleanup")});function AH(n,a,t){var s,o={};v(t,function(t){for(var e,r,i=n.parent(t);i;){if((e=n.parent(i))?(r=o[e],o[e]=i):(r=s,s=i),r&&r!==i)return void a.setEdge(r,i);i=e}})}var LH=t(()=>{NW(),me(AH,"addSubgraphConstraints")});function NH(n,r,a){var s=IH(n),o=new BW({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(t){return n.node(t)});return v(n.nodes(),function(i){var t=n.node(i),e=n.parent(i);(t.rank===r||t.minRank<=r&&r<=t.maxRank)&&(o.setNode(i),o.setParent(i,e||s),v(n[a](i),function(t){var e=t.v===i?t.w:t.v,r=o.edge(e,i),r=gq(r)?0:r.weight;o.setEdge(e,i,{weight:n.edge(t).weight+r})}),Object.prototype.hasOwnProperty.call(t,"minRank"))&&o.setNode(i,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]})}),o}function IH(t){for(var e;t.hasNode(e=kW("_root")););return e}var RH=t(()=>{NW(),$W(),me(NH,"buildLayerGraph"),me(IH,"createRootNode")});function MH(t,e){for(var r=0,i=1;i>1]+=t.weight;o+=t.weight*r})),o}var OH=t(()=>{NW(),me(MH,"crossCount"),me(DH,"twoLayerCrossCount")});function PH(r){var i={},t=VG(r.nodes(),function(t){return!r.children(t).length}),e=_q(x(t,function(t){return r.node(t).rank})),n=x(Oj(e+1),function(){return[]});function a(t){var e;BU(i,t)||(i[t]=!0,e=r.node(t),n[e.rank].push(t),v(r.successors(t),a))}return me(a,"dfs"),e=rW(t,function(t){return r.node(t).rank}),v(e,a),n}var BH=t(()=>{NW(),me(PH,"initOrder")});function FH(i,t){return x(t,function(t){var e=i.inEdges(t);return e.length?{v:t,barycenter:(e=Uj(e,function(t,e){var r=i.edge(e),e=i.node(e.v);return{sum:t.sum+r.weight*e.order,weight:t.weight+r.weight}},{sum:0,weight:0})).sum/e.weight,weight:e.weight}:{v:t}})}var $H=t(()=>{NW(),me(FH,"barycenter")});function zH(t,e){var i={};return v(t,function(t,e){e=i[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e},gq(t.barycenter)||(e.barycenter=t.barycenter,e.weight=t.weight)}),v(e.edges(),function(t){var e=i[t.v],r=i[t.w];gq(e)||gq(r)||(r.indegree++,e.out.push(i[t.w]))}),GH(VG(i,function(t){return!t.indegree}))}function GH(r){var t=[];function e(e){return function(t){t.merged||(gq(t.barycenter)||gq(e.barycenter)||t.barycenter>=e.barycenter)&&UH(e,t)}}function i(e){return function(t){t.in.push(e),0==--t.indegree&&r.push(t)}}for(me(e,"handleIn"),me(i,"handleOut");r.length;){var n=r.pop();t.push(n),v(n.in.reverse(),e(n)),v(n.out,i(n))}return x(VG(t,function(t){return!t.merged}),function(t){return Ej(t,["vs","i","barycenter","weight"])})}function UH(t,e){var r=0,i=0;t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0}var qH=t(()=>{NW(),me(zH,"resolveConflicts"),me(GH,"doResolveConflicts"),me(UH,"mergeEntries")});function jH(t,e){var r=(t=hY(t,function(t){return Object.prototype.hasOwnProperty.call(t,"barycenter")})).lhs,i=rW(t.rhs,function(t){return-t.i}),n=[],a=0,s=0,o=0,t=(r.sort(YH(!!e)),o=WH(n,i,o),v(r,function(t){o+=t.vs.length,n.push(t.vs),a+=t.barycenter*t.weight,s+=t.weight,o=WH(n,i,o)}),{vs:HP(n)});return s&&(t.barycenter=a/s,t.weight=s),t}function WH(t,e,r){for(var i;e.length&&(i=wG(e)).i<=r;)e.pop(),t.push(i.vs),r++;return r}function YH(r){return function(t,e){return t.barycentere.barycenter?1:r?e.i-t.i:t.i-e.i}}var HH=t(()=>{NW(),pY(),me(jH,"sort"),me(WH,"consumeUnsortable"),me(YH,"compareWithBias")});function VH(r,t,i,n){var e,a=r.children(t),s=(t=r.node(t))?t.borderLeft:void 0,o=t?t.borderRight:void 0,l={},t=(s&&(a=VG(a,function(t){return t!==s&&t!==o})),FH(r,a));return v(t,function(t){var e;r.children(t.v).length&&(e=VH(r,t.v,i,n),l[t.v]=e,Object.prototype.hasOwnProperty.call(e,"barycenter"))&&KH(t,e)}),XH(a=zH(t,i),l),t=jH(a,n),s&&(t.vs=HP([s,t.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),e=r.node(r.predecessors(o)[0]),Object.prototype.hasOwnProperty.call(t,"barycenter")||(t.barycenter=0,t.weight=0),t.barycenter=(t.barycenter*t.weight+a.order+e.order)/(t.weight+2),t.weight+=2),t}function XH(t,e){v(t,function(t){t.vs=HP(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}function KH(t,e){gq(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var ZH=t(()=>{NW(),$H(),qH(),HH(),me(VH,"sortSubgraph"),me(XH,"expandSubgraphs"),me(KH,"mergeBarycenters")});function QH(t){var e=cY(t),r=JH(t,Oj(1,e+1),"inEdges"),i=JH(t,Oj(e-1,-1,-1),"outEdges");eV(t,PH(t));for(var n,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){tV(s%2?r:i,2<=s%4);var l,c=MH(t,l=aY(t));c{NW(),$W(),pY(),LH(),RH(),OH(),BH(),ZH(),me(QH,"order"),me(JH,"buildLayerGraphs"),me(tV,"sweepLayerGraphs"),me(eV,"assignOrder")});function iV(c){var h=aV(c);v(c.graph().dummyChains,function(t){for(var e,r=c.node(t).edgeObj,i=nV(c,h,r.v,r.w),n=i.path,a=i.lca,s=0,o=n[s],l=!0;t!==r.w;){if(e=c.node(t),l){for(;(o=n[s])!==a&&c.node(o).maxRanko||l>e[c].lim););for(n=c,c=i;(c=t.parent(c))!==n;)s.push(c);return{path:a.concat(s.reverse()),lca:n}}function aV(r){var i={},n=0;function a(t){var e=n;v(r.children(t),a),i[t]={low:e,lim:n++}}return me(a,"dfs"),v(r.children(),a),i}var sV=t(()=>{NW(),me(iV,"parentDummyChains"),me(nV,"findPath"),me(aV,"postorder")});function oV(c,t){var h={};function e(t,i){var a=0,s=0,o=t.length,l=wG(i);return v(i,function(t,e){var r=cV(c,t),n=r?c.node(r).order:o;!r&&t!==l||(v(i.slice(s,e+1),function(i){v(c.predecessors(i),function(t){var e=c.node(t),r=e.order;!(rn)&&hV(s,t,a)})})}function e(r,i){var n,a=-1,s=0;return v(i,function(t,e){"border"===o.node(t).dummy&&(t=o.predecessors(t)).length&&(n=o.node(t[0]).order,l(i,s,e,a,n),s=e,a=n),l(i,s,i.length,n,r.length)}),i}return me(l,"scan"),me(e,"visitLayer"),Uj(t,e),s}function cV(e,t){if(e.node(t).dummy)return iU(e.predecessors(t),function(t){return e.node(t).dummy})}function hV(t,e,r){r{NW(),$W(),pY(),me(oV,"findType1Conflicts"),me(lV,"findType2Conflicts"),me(cV,"findOtherInnerSegmentNode"),me(hV,"addConflict"),me(uV,"hasConflict"),me(dV,"verticalAlignment"),me(pV,"horizontalCompaction"),me(gV,"buildBlockGraph"),me(fV,"findSmallestWidthAlignment"),me(mV,"alignCoordinates"),me(yV,"balance"),me(vV,"positionX"),me(xV,"sep"),me(bV,"width")});function kV(r){TV(r=iY(r)),kU(vV(r),function(t,e){r.node(e).x=t})}function TV(r){var t=aY(r),i=r.graph().ranksep,n=0;v(t,function(t){var e=_q(x(t,function(t){return r.node(t).height}));v(t,function(t){r.node(t).y=n+e/2}),n+=e+i})}var EV=t(()=>{NW(),pY(),wV(),me(kV,"position"),me(TV,"positionY")});function CV(e,t){var r=t&&t.debugTiming?uY:dY;r("layout",()=>{var t=r(" buildLayoutGraph",()=>AV(e));r(" runLayout",()=>_V(t,r)),r(" updateInputGraph",()=>SV(e,t))})}function _V(t,e){e(" makeSpaceForEdgeLabels",()=>LV(t)),e(" removeSelfEdges",()=>FV(t)),e(" acyclic",()=>ZW(t)),e(" nestingGraph.run",()=>kH(t)),e(" rank",()=>yH(iY(t))),e(" injectEdgeLabelProxies",()=>NV(t)),e(" removeEmptyRanks",()=>oY(t)),e(" nestingGraph.cleanup",()=>_H(t)),e(" normalizeRanks",()=>sY(t)),e(" assignRankMinMax",()=>IV(t)),e(" removeEdgeLabelProxies",()=>RV(t)),e(" normalize.run",()=>_Y(t)),e(" parentDummyChains",()=>iV(t)),e(" addBorderSegments",()=>gY(t)),e(" order",()=>QH(t)),e(" insertSelfEdges",()=>$V(t)),e(" adjustCoordinateSystem",()=>yY(t)),e(" position",()=>kV(t)),e(" positionSelfEdges",()=>zV(t)),e(" removeBorderNodes",()=>BV(t)),e(" normalize.undo",()=>AY(t)),e(" fixupEdgeLabelCoords",()=>OV(t)),e(" undoCoordinateSystem",()=>vY(t)),e(" translateGraph",()=>MV(t)),e(" assignNodeIntersects",()=>DV(t)),e(" reversePoints",()=>PV(t)),e(" acyclic.undo",()=>JW(t))}function SV(i,n){v(i.nodes(),function(t){var e=i.node(t),r=n.node(t);e&&(e.x=r.x,e.y=r.y,n.children(t).length)&&(e.width=r.width,e.height=r.height)}),v(i.edges(),function(t){var e=i.edge(t),t=n.edge(t);e.points=t.points,Object.prototype.hasOwnProperty.call(t,"x")&&(e.x=t.x,e.y=t.y)}),i.graph().width=n.graph().width,i.graph().height=n.graph().height}function AV(r){var i=new BW({multigraph:!0,compound:!0}),t=UV(r.graph());return i.setGraph(aE({},jV,GV(t,qV),Ej(t,WV))),v(r.nodes(),function(t){var e=UV(r.node(t));i.setNode(t,oG(GV(e,YV),HV)),i.setParent(t,r.parent(t))}),v(r.edges(),function(t){var e=UV(r.edge(t));i.setEdge(t,aE({},XV,GV(e,VV),Ej(e,KV)))}),i}function LV(e){var r=e.graph();r.ranksep/=2,v(e.edges(),function(t){(t=e.edge(t)).minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function NV(r){v(r.edges(),function(t){var e=r.edge(t);e.width&&e.height&&(e=r.node(t.v),e={rank:(r.node(t.w).rank-e.rank)/2+e.rank,e:t},eY(r,"edge-proxy",e,"_ep"))})}function IV(e){var r=0;v(e.nodes(),function(t){(t=e.node(t)).borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,r=_q(r,t.maxRank))}),e.graph().maxRank=r}function RV(r){v(r.nodes(),function(t){var e=r.node(t);"edge-proxy"===e.dummy&&(r.edge(e.e).labelRank=e.rank,r.removeNode(t))})}function MV(e){var n=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,t=e.graph(),r=t.marginx||0,i=t.marginy||0;function l(t){var e=t.x,r=t.y,i=t.width,t=t.height;n=Math.min(n,e-i/2),a=Math.max(a,e+i/2),s=Math.min(s,r-t/2),o=Math.max(o,r+t/2)}me(l,"getExtremes"),v(e.nodes(),function(t){l(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),Object.prototype.hasOwnProperty.call(t,"x")&&l(t)}),n-=r,s-=i,v(e.nodes(),function(t){(t=e.node(t)).x-=n,t.y-=s}),v(e.edges(),function(t){t=e.edge(t),v(t.points,function(t){t.x-=n,t.y-=s}),Object.prototype.hasOwnProperty.call(t,"x")&&(t.x-=n),Object.prototype.hasOwnProperty.call(t,"y")&&(t.y-=s)}),t.width=a-n+r,t.height=o-s+i}function DV(a){v(a.edges(),function(t){var e,r=a.edge(t),i=a.node(t.v),t=a.node(t.w),n=r.points?(e=r.points[0],r.points[r.points.length-1]):(r.points=[],e=t,i);r.points.unshift(nY(i,e)),r.points.push(nY(t,n))})}function OV(r){v(r.edges(),function(t){var e=r.edge(t);if(Object.prototype.hasOwnProperty.call(e,"x"))switch("l"!==e.labelpos&&"r"!==e.labelpos||(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset}})}function PV(e){v(e.edges(),function(t){(t=e.edge(t)).reversed&&t.points.reverse()})}function BV(a){v(a.nodes(),function(t){var e,r,i,n;a.children(t).length&&(t=a.node(t),e=a.node(t.borderTop),r=a.node(t.borderBottom),i=a.node(wG(t.borderLeft)),n=a.node(wG(t.borderRight)),t.width=Math.abs(n.x-i.x),t.height=Math.abs(r.y-e.y),t.x=i.x+t.width/2,t.y=e.y+t.height/2)}),v(a.nodes(),function(t){"border"===a.node(t).dummy&&a.removeNode(t)})}function FV(r){v(r.edges(),function(t){var e;t.v===t.w&&((e=r.node(t.v)).selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:t,label:r.edge(t)}),r.removeEdge(t))})}function $V(n){var t=aY(n);v(t,function(t){var i=0;v(t,function(t,e){var r=n.node(t);r.order=e+i,v(r.selfEdges,function(t){eY(n,"selfedge",{width:t.label.width,height:t.label.height,rank:r.rank,order:e+ ++i,e:t.e,label:t.label},"_se")}),delete r.selfEdges})})}function zV(s){v(s.nodes(),function(t){var e,r,i,n,a=s.node(t);"selfedge"===a.dummy&&(e=(n=s.node(a.e.v)).x+n.width/2,r=n.y,i=a.x-e,n=n.height/2,s.setEdge(a.e,a.label),s.removeNode(t),a.label.points=[{x:e+2*i/3,y:r-n},{x:e+5*i/6,y:r-n},{x:e+i,y:r},{x:e+5*i/6,y:r+n},{x:e+2*i/3,y:r+n}],a.label.x=a.x,a.label.y=a.y)})}function GV(t,e){return bq(Ej(t,e),Number)}function UV(t){var r={};return v(t,function(t,e){r[e.toLowerCase()]=t}),r}var qV,jV,WV,YV,HV,VV,XV,KV,ZV=t(()=>{NW(),$W(),mY(),CY(),tY(),LY(),wH(),SH(),rV(),sV(),EV(),pY(),me(CV,"layout"),me(_V,"runLayout"),me(SV,"updateInputGraph"),qV=["nodesep","edgesep","ranksep","marginx","marginy"],jV={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},WV=["acyclicer","ranker","rankdir","align"],YV=["width","height"],HV={width:0,height:0},VV=["minlen","weight","width","height","labeloffset"],XV={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},KV=["labelpos"],me(AV,"buildLayoutGraph"),me(LV,"makeSpaceForEdgeLabels"),me(NV,"injectEdgeLabelProxies"),me(IV,"assignRankMinMax"),me(RV,"removeEdgeLabelProxies"),me(MV,"translateGraph"),me(DV,"assignNodeIntersects"),me(OV,"fixupEdgeLabelCoords"),me(PV,"reversePointsForReversedEdges"),me(BV,"removeBorderNodes"),me(FV,"removeSelfEdges"),me($V,"insertSelfEdges"),me(zV,"positionSelfEdges"),me(GV,"selectNumberAttrs"),me(UV,"canonicalize")}),QV=t(()=>{tY(),ZV(),LY(),wH()});function JV(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:tX(t),edges:eX(t)};return gq(t.graph())||(e.value=e$(t.graph())),e}function tX(i){return x(i.nodes(),function(t){var e=i.node(t),r=i.parent(t),t={v:t};return gq(e)||(t.value=e),gq(r)||(t.parent=r),t})}function eX(i){return x(i.edges(),function(t){var e=i.edge(t),r={v:t.v,w:t.w};return gq(t.name)||(r.name=t.name),gq(e)||(r.value=e),r})}var rX,iX,nX,aX,sX,oX,lX,cX,hX,uX,dX,pX,gX,fX,mX,yX=t(()=>{NW(),FW(),me(JV,"write"),me(tX,"writeNodes"),me(eX,"writeEdges")}),vX=t(()=>{e(),$W(),yX(),rX=new Map,iX=new Map,nX=new Map,aX=me(()=>{iX.clear(),nX.clear(),rX.clear()},"clear"),sX=me((t,e)=>{var r=iX.get(e)||[];return M.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),oX=me((t,e)=>{var r=iX.get(e)||[];return M.info("Descendants of ",e," is ",r),M.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||sX(t.v,e)||sX(t.w,e)||r.includes(t.w):(M.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),lX=me((r,i,n,a)=>{M.warn("Copying children of ",r,"root",a,"data",i.node(r),a);var t=i.children(r)||[];r!==a&&t.push(r),M.warn("Copying (nodes) clusterId",r,"nodes",t),t.forEach(t=>{var e;0{M.info("Edge",t);var e=i.edge(t.v,t.w,t.name);M.info("Edge data",e,a);try{oX(t,a)?(M.info("Copying as ",t.v,t.w,e,t.name),n.setEdge(t.v,t.w,e,t.name),M.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):M.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",r)}catch(t){M.error(t)}})),M.debug("Removing node",t),i.removeNode(t)})},"copy"),cX=me((t,e)=>{let r=e.children(t),i=[...r];for(var n of r)nX.set(n,t),i=[...i,...cX(n,e)];return i},"extractDescendants"),hX=me((t,e,r)=>{let i=t.edges().filter(t=>t.v===e||t.w===e),n=t.edges().filter(t=>t.v===r||t.w===r),a=i.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),s=n.map(t=>({v:t.v,w:t.w}));return a.filter(e=>s.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),uX=me((t,e,r)=>{var i,n=e.children(t);if(M.trace("Searching children of id ",t,n),n.length<1)return t;let a;for(i of n){var s=uX(i,e,r),o=hX(e,r,s);if(s){if(!(0rX.has(t)&&rX.get(t).externalConnections&&rX.has(t)?rX.get(t).id:t,"getAnchorId"),pX=me((a,t)=>{if(!a||10{sX(t.v,e)^sX(t.w,e)&&(M.warn("Edge: ",t," leaves cluster ",e),M.warn("Descendants of XXX ",e,": ",iX.get(e)),rX.get(e).externalConnections=!0)})):M.debug("Not a cluster ",e,iX)});for(var e of rX.keys()){var r=rX.get(e).id;(r=a.parent(r))!==e&&rX.has(r)&&!rX.get(r).externalConnections&&(rX.get(e).id=r)}a.edges().forEach(function(t){var e,r,i,n=a.edge(t);M.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),M.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(a.edge(t))),t.v,M.warn("Fix XXX",rX,"ids:",t.v,t.w,"Translating: ",rX.get(t.v)," --- ",rX.get(t.w)),(rX.get(t.v)||rX.get(t.w))&&(M.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),e=dX(t.v),r=dX(t.w),a.removeEdge(t.v,t.w,t.name),e!==t.v&&(i=a.parent(e),rX.get(i).externalConnections=!0,n.fromCluster=t.v),r!==t.w&&(i=a.parent(r),rX.get(i).externalConnections=!0,n.toCluster=t.w),M.warn("Fix Replacing with XXX",e,r,t.name),a.setEdge(e,r,n,t.name))}),M.warn("Adjusted Graph",JV(a)),gX(a,0),M.trace(rX)}},"adjustClustersAndEdges"),gX=me((r,i)=>{if(M.warn("extractor - ",i,JV(r),r.children("D")),10{if(0===t.length)return[];let r=Object.assign([],t);return t.forEach(t=>{t=e.children(t),t=fX(e,t),r=[...r,...t]}),r},"sorter"),mX=me(t=>fX(t,t.children()),"sortNodesByHierarchy")}),xX={};lPt(xX,{render:()=>wX});var bX,wX,kX,TX,EX,CX,_X,SX,AX,LX,NX,IX,RX,MX,DX,OX,PX,BX,FX,$X=t(()=>{QV(),yX(),$W(),DD(),n(),vX(),GD(),WM(),MD(),e(),jM(),fu(),bX=me(async(t,n,a,s,o,l)=>{M.warn("Graph in recursive render:XAX",JV(n),o);let c=n.graph().rankdir,i=(M.trace("Dir in recursive render - dir:",c),t=t.insert("g").attr("class","root"),n.nodes()?M.info("Recursive render XXX",n.nodes()):M.info("No nodes found for",n),0{(t=t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),t.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),t.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),RD={extension:yD,composition:vD,aggregation:xD,dependency:bD,lollipop:wD,point:kD,circle:TD,cross:ED,barb:CD,only_one:_D,zero_or_one:SD,one_or_more:AD,zero_or_more:LD,requirement_arrow:ND,requirement_contains:ID},MD=mD});async function PD(e,r,n){let i,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?LM[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===n.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t??null),a=await s(i,r,n)}else a=await s(e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),BD.set(r.id,i),r.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var BD,FD,$D,zD,GD,UD=t(()=>{e(),UM(),BD=new Map,me(PD,"insertNode"),FD=me((t,e)=>{BD.set(e.id,t)},"setNodeElem"),$D=me(()=>{BD.clear()},"clear"),zD=me(t=>{var e=BD.get(t.id),r=(M.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")}),qD=t(()=>{Nn(),th(),e(),YM(),DD(),OD(),UD(),i(),ZE(),GD={common:L,getConfig:Ir,insertCluster:zM,insertEdge:fD,insertEdgeLabel:lD,insertMarkers:MD,insertNode:PD,interpolateToCurve:cE,labelHelper:K9,log:M,positionEdgeLabel:cD}});function jD(t){return"symbol"==typeof t||UT(t)&&"[object Symbol]"==bw(t)}var WD,YD=t(()=>{ww(),qT(),me(jD,"isSymbol"),WD=jD});function HD(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r{me(HD,"arrayMap"),VD=HD});function KD(t){var e;return"string"==typeof t?t:ZT(t)?VD(t,KD)+"":WD(t)?JD?JD.call(t):"":"0"==(e=t+"")&&1/t==-ZD?"-0":e}var ZD,QD,JD,tO,eO=t(()=>{aw(),XD(),t7(),YD(),ZD=1/0,QD=H3?H3.prototype:void 0,JD=QD?QD.toString:void 0,me(KD,"baseToString"),tO=KD});function rO(t){for(var e=t.length;e--&&nO.test(t.charAt(e)););return e}var nO,iO,aO=t(()=>{nO=/\s/,me(rO,"trimmedEndIndex"),iO=rO});function sO(t){return t&&t.slice(0,iO(t)+1).replace(oO,"")}var oO,lO,cO=t(()=>{aO(),oO=/^\s+/,me(sO,"baseTrim"),lO=sO});function hO(t){if("number"==typeof t)return t;if(WD(t))return uO;if(Tw(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=Tw(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=lO(t);var e=pO.test(t);return e||gO.test(t)?fO(t.slice(2),e?2:8):dO.test(t)?uO:+t}var uO,dO,pO,gO,fO,mO,yO=t(()=>{cO(),Ew(),YD(),uO=NaN,dO=/^[-+]0x[0-9a-f]+$/i,pO=/^0b[01]+$/i,gO=/^0o[0-7]+$/i,fO=parseInt,me(hO,"toNumber"),mO=hO});function vO(t){return t?(t=mO(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}var xO,bO=t(()=>{yO(),me(vO,"toFinite"),xO=vO});function wO(t){var e=(t=xO(t))%1;return t==t?e?t-e:t:0}var kO,TO,EO,CO=t(()=>{bO(),me(wO,"toInteger"),kO=wO}),_O=t(()=>{e6(),iw(),TO=Qw(W3,"WeakMap"),EO=TO});function SO(){}var AO,LO=t(()=>{me(SO,"noop"),AO=SO});function NO(t,e){for(var r=-1,n=null==t?0:t.length;++r{me(NO,"arrayEach"),IO=NO});function MO(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{me(MO,"baseFindIndex"),DO=MO});function PO(t){return t!=t}var BO,FO=t(()=>{me(PO,"baseIsNaN"),BO=PO});function $O(t,e,r){for(var n=r-1,i=t.length;++n{me($O,"strictIndexOf"),zO=$O});function UO(t,e,r){return e==e?zO(t,e,r):DO(t,BO,r)}var qO,jO=t(()=>{OO(),FO(),GO(),me(UO,"baseIndexOf"),qO=UO});function WO(t,e){return!(null==t||!t.length)&&-1{jO(),me(WO,"arrayIncludes"),YO=WO}),KO=t(()=>{RT(),HO=LT(Object.keys,Object),VO=HO});function ZO(t){if(!PT(t))return VO(t);var e,r=[];for(e in Object(t))JO.call(t,e)&&"constructor"!=e&&r.push(e);return r}var QO,JO,tP,eP=t(()=>{BT(),KO(),QO=Object.prototype,JO=QO.hasOwnProperty,me(ZO,"baseKeys"),tP=ZO});function rP(t){return(a7(t)?o8:tP)(t)}var nP,iP,aP,sP,oP=t(()=>{l8(),eP(),s7(),me(rP,"keys"),nP=rP}),lP=t(()=>{H7(),K7(),oE(),s7(),BT(),oP(),aP=Object.prototype,iP=aP.hasOwnProperty,aP=iE(function(t,e){if(PT(e)||a7(e))X7(e,nP(e),t);else for(var r in e)iP.call(e,r)&&Y7(t,r,e[r])}),sP=aP});function cP(t,e){var r;return!ZT(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!WD(t))||uP.test(t)||!hP.test(t)||null!=e&&t in Object(e))}var hP,uP,dP,pP=t(()=>{t7(),YD(),hP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uP=/^\w*$/,me(cP,"isKey"),dP=cP});function gP(t){var e=(t=_k(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}var fP,mP,yP,vP,xP,bP=t(()=>{Sk(),me(gP,"memoizeCapped"),fP=gP}),wP=t(()=>{bP(),mP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yP=/\\(\\)?/g,vP=fP(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(mP,function(t,e,r,n){i.push(r?n.replace(yP,"$1"):e||t)}),i}),xP=vP});function kP(t){return null==t?"":tO(t)}var TP,EP=t(()=>{eO(),me(kP,"toString"),TP=kP});function CP(t,e){return ZT(t)?t:dP(t,e)?[t]:xP(TP(t))}var _P,SP=t(()=>{t7(),pP(),wP(),EP(),me(CP,"castPath"),_P=CP});function AP(t){var e;return"string"==typeof t||WD(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}var LP,NP=t(()=>{YD(),me(AP,"toKey"),LP=AP});function IP(t,e){for(var r=0,n=(e=_P(e,t)).length;null!=t&&r{SP(),NP(),me(IP,"baseGet"),RP=IP});function DP(t,e,r){return void 0===(t=null==t?void 0:RP(t,e))?r:t}var OP,PP=t(()=>{MP(),me(DP,"get"),OP=DP});function BP(t,e){for(var r=-1,n=e.length,i=t.length;++r{me(BP,"arrayPush"),FP=BP});function zP(t){return ZT(t)||XT(t)||!!(GP&&t&&t[GP])}var GP,UP,qP=t(()=>{aw(),JT(),t7(),GP=H3?H3.isConcatSpreadable:void 0,me(zP,"isFlattenable"),UP=zP});function jP(t,e,r,n,i){var a=-1,s=t.length;for(r=r||UP,i=i||[];++a{$P(),qP(),me(jP,"baseFlatten"),WP=jP});function HP(t){return null!=t&&t.length?WP(t,1):[]}var VP,XP=t(()=>{YP(),me(HP,"flatten"),VP=HP});function KP(t){return V8(B8(t,void 0,VP),t+"")}var ZP,QP=t(()=>{XP(),F8(),K8(),me(KP,"flatRest"),ZP=KP});function JP(t,e,r){var n=-1,i=t.length;(r=i>>0,e>>>=0;for(var a=Array(i);++n{me(JP,"baseSlice"),tB=JP});function rB(t){return nB.test(t)}var nB,iB,aB=t(()=>{nB=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),me(rB,"hasUnicode"),iB=rB});function sB(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i{me(sB,"arrayReduce"),oB=sB});function cB(t,e){return t&&X7(e,nP(e),t)}var hB,uB=t(()=>{K7(),oP(),me(cB,"baseAssign"),hB=cB});function dB(t,e){return t&&X7(e,v8(e),t)}var pB,gB=t(()=>{K7(),x8(),me(dB,"baseAssignIn"),pB=dB});function fB(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r{me(fB,"arrayFilter"),mB=fB});function vB(){return[]}var xB,bB,wB,kB,TB,EB=t(()=>{me(vB,"stubArray"),xB=vB}),CB=t(()=>{yB(),EB(),bB=Object.prototype,wB=bB.propertyIsEnumerable,TB=(kB=Object.getOwnPropertySymbols)?function(e){return null==e?[]:(e=Object(e),mB(kB(e),function(t){return wB.call(e,t)}))}:xB});function _B(t,e){return X7(t,TB(t),e)}var SB,AB,LB,NB=t(()=>{K7(),CB(),me(_B,"copySymbols"),SB=_B}),IB=t(()=>{$P(),MT(),CB(),EB(),AB=Object.getOwnPropertySymbols,LB=AB?function(t){for(var e=[];t;)FP(e,TB(t)),t=IT(t);return e}:xB});function RB(t,e){return X7(t,LB(t),e)}var MB,DB=t(()=>{K7(),IB(),me(RB,"copySymbolsIn"),MB=RB});function OB(t,e,r){return e=e(t),ZT(t)?e:FP(e,r(t))}var PB,BB=t(()=>{$P(),t7(),me(OB,"baseGetAllKeys"),PB=OB});function FB(t){return PB(t,nP,TB)}var $B,zB=t(()=>{BB(),CB(),oP(),me(FB,"getAllKeys"),$B=FB});function GB(t){return PB(t,v8,LB)}var UB,qB,jB,WB,YB,HB,VB,XB,KB,ZB,QB,JB,tF,eF,rF,nF,iF,aF,sF,oF=t(()=>{BB(),IB(),x8(),me(GB,"getAllKeysIn"),UB=GB}),lF=t(()=>{e6(),iw(),qB=Qw(W3,"DataView"),jB=qB}),cF=t(()=>{e6(),iw(),WB=Qw(W3,"Promise"),YB=WB}),hF=t(()=>{e6(),iw(),HB=Qw(W3,"Set"),VB=HB}),uF=t(()=>{lF(),J6(),cF(),hF(),_O(),ww(),$w(),XB="[object Map]",KB="[object Promise]",ZB="[object Set]",QB="[object WeakMap]",JB="[object DataView]",tF=Fw(jB),eF=Fw(Z6),rF=Fw(YB),nF=Fw(VB),iF=Fw(EO),aF=bw,(jB&&aF(new jB(new ArrayBuffer(1)))!=JB||Z6&&aF(new Z6)!=XB||YB&&aF(YB.resolve())!=KB||VB&&aF(new VB)!=ZB||EO&&aF(new EO)!=QB)&&(aF=me(function(t){var e=bw(t);if(t=(t="[object Object]"==e?t.constructor:void 0)?Fw(t):"")switch(t){case tF:return JB;case eF:return XB;case rF:return KB;case nF:return ZB;case iF:return QB}return e},"getTag")),sF=aF});function dF(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&gF.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var pF,gF,fF,mF=t(()=>{pF=Object.prototype,gF=pF.hasOwnProperty,me(dF,"initCloneArray"),fF=dF});function yF(t,e){return e=e?yT(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)}var vF,xF=t(()=>{vT(),me(yF,"cloneDataView"),vF=yF});function bF(t){var e=new t.constructor(t.source,wF.exec(t));return e.lastIndex=t.lastIndex,e}var wF,kF,TF=t(()=>{wF=/\w*$/,me(bF,"cloneRegExp"),kF=bF});function EF(t){return _F?Object(_F.call(t)):{}}var CF,_F,SF,AF=t(()=>{aw(),CF=H3?H3.prototype:void 0,_F=CF?CF.valueOf:void 0,me(EF,"cloneSymbol"),SF=EF});function LF(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return yT(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return vF(t,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 bT(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return kF(t);case"[object Set]":return new n;case"[object Symbol]":return SF(t)}}var NF,IF=t(()=>{vT(),xF(),TF(),AF(),wT(),me(LF,"initCloneByTag"),NF=LF});function RF(t){return UT(t)&&"[object Map]"==sF(t)}var MF,DF,OF,PF=t(()=>{uF(),qT(),me(RF,"baseIsMap"),MF=RF}),BF=t(()=>{PF(),B7(),F7(),DF=(DF=D7&&D7.isMap)?N7(DF):MF,OF=DF});function FF(t){return UT(t)&&"[object Set]"==sF(t)}var $F,zF,GF,UF=t(()=>{uF(),qT(),me(FF,"baseIsSet"),$F=FF}),qF=t(()=>{UF(),B7(),F7(),zF=(zF=D7&&D7.isSet)?N7(zF):$F,GF=zF});function jF(r,n,i,t,e,a){var s,o=n&WF,l=n&YF,c=n&HF;if(void 0===(s=i?e?i(r,t,e,a):i(r):s)){if(!Tw(r))return r;if(t=ZT(r)){if(s=fF(r),!o)return TT(r,s)}else{var h=sF(r),u=h==XF||h==KF;if(g7(r))return uT(r,o);if(h==ZF||h==VF||u&&!e){if(s=l||u?{}:$T(r),!o)return l?MB(r,pB(s,r)):SB(r,hB(s,r))}else{if(!QF[h])return e?r:{};s=NF(r,h,o)}}if(u=(a=a||new jk).get(r))return u;a.set(r,s),GF(r)?r.forEach(function(t){s.add(jF(t,n,i,t,r,a))}):OF(r)&&r.forEach(function(t,e){s.set(e,jF(t,n,i,e,r,a))});var d=t?void 0:(c?l?UB:$B:l?v8:nP)(r);IO(d||r,function(t,e){d&&(t=r[e=t]),Y7(s,e,jF(t,n,i,e,r,a))})}return s}var WF,YF,HF,VF,XF,KF,ZF,QF,JF,t$=t(()=>{Hk(),RO(),H7(),uB(),gB(),gT(),_T(),NB(),DB(),zB(),oF(),uF(),mF(),IF(),zT(),t7(),m7(),BF(),Ew(),qF(),oP(),x8(),WF=1,YF=2,HF=4,XF="[object Function]",KF="[object GeneratorFunction]",ZF="[object Object]",(QF={})[VF="[object Arguments]"]=QF["[object Array]"]=QF["[object ArrayBuffer]"]=QF["[object DataView]"]=QF["[object Boolean]"]=QF["[object Date]"]=QF["[object Float32Array]"]=QF["[object Float64Array]"]=QF["[object Int8Array]"]=QF["[object Int16Array]"]=QF["[object Int32Array]"]=QF["[object Map]"]=QF["[object Number]"]=QF[ZF]=QF["[object RegExp]"]=QF["[object Set]"]=QF["[object String]"]=QF["[object Symbol]"]=QF["[object Uint8Array]"]=QF["[object Uint8ClampedArray]"]=QF["[object Uint16Array]"]=QF["[object Uint32Array]"]=!0,QF["[object Error]"]=QF[XF]=QF["[object WeakMap]"]=!1,me(jF,"baseClone"),JF=jF});function e$(t){return JF(t,4)}var r$,n$=t(()=>{t$(),me(e$,"clone"),r$=e$});function i$(t){return JF(t,5)}var a$,s$=t(()=>{t$(),me(i$,"cloneDeep"),a$=i$});function o$(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e{me(o$,"compact"),l$=o$});function h$(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}var u$,d$=t(()=>{me(h$,"setCacheAdd"),u$=h$});function p$(t){return this.__data__.has(t)}var g$,f$=t(()=>{me(p$,"setCacheHas"),g$=p$});function m$(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new kk;++e{Tk(),d$(),f$(),me(m$,"SetCache"),m$.prototype.add=m$.prototype.push=u$,m$.prototype.has=g$,y$=m$});function x$(t,e){for(var r=-1,n=null==t?0:t.length;++r{me(x$,"arraySome"),b$=x$});function k$(t,e){return t.has(e)}var T$,E$=t(()=>{me(k$,"cacheHas"),T$=k$});function C$(t,e,r,n,i,a){var s=1&r,o=t.length;if(o!=(l=e.length)&&!(s&&o{v$(),w$(),E$(),me(C$,"equalArrays"),_$=C$});function A$(t){var r=-1,n=Array(t.size);return t.forEach(function(t,e){n[++r]=[e,t]}),n}var L$,N$=t(()=>{me(A$,"mapToArray"),L$=A$});function I$(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var R$,M$=t(()=>{me(I$,"setToArray"),R$=I$});function D$(t,e,r,n,i,a,s){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new pT(t),new pT(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return L6(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var o=L$;case"[object Set]":var l,o=o||R$;return!!(t.size==e.size||1&n)&&((l=s.get(t))?l==e:(n|=2,s.set(t,e),l=_$(o(t),o(e),n,i,a,s),s.delete(t),l));case"[object Symbol]":if(P$)return P$.call(t)==P$.call(e)}return!1}var O$,P$,B$,F$=t(()=>{aw(),fT(),N6(),S$(),N$(),M$(),O$=H3?H3.prototype:void 0,P$=O$?O$.valueOf:void 0,me(D$,"equalByTag"),B$=D$});function $$(t,e,r,n,i,a){var s=1&r,o=$B(t),l=o.length;if(l!=$B(e).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in e:G$.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=s;++c{zB(),z$=Object.prototype,G$=z$.hasOwnProperty,me($$,"equalObjects"),U$=$$});function j$(t,e,r,n,i,a){var s=ZT(t),o=ZT(e),l=s?Y$:sF(t),o=o?Y$:sF(e),c=(l=l==W$?H$:l)==H$,h=(o=o==W$?H$:o)==H$;if((o=l==o)&&g7(t)){if(!g7(e))return!1;c=!(s=!0)}return o&&!c?(a=a||new jk,s||P7(t)?_$(t,e,r,n,i,a):B$(t,e,l,r,n,i,a)):1&r||(s=c&&X$.call(t,"__wrapped__"),l=h&&X$.call(e,"__wrapped__"),!s&&!l)?o&&(a=a||new jk,U$(t,e,r,n,i,a)):i(s?t.value():t,l?e.value():e,r,n,a=a||new jk)}var W$,Y$,H$,V$,X$,K$,Z$=t(()=>{Hk(),S$(),F$(),q$(),uF(),t7(),m7(),$7(),W$="[object Arguments]",Y$="[object Array]",H$="[object Object]",V$=Object.prototype,X$=V$.hasOwnProperty,me(j$,"baseIsEqualDeep"),K$=j$});function Q$(t,e,r,n,i){return t===e||(null==t||null==e||!UT(t)&&!UT(e)?t!=t&&e!=e:K$(t,e,r,n,Q$,i))}var J$,tz=t(()=>{Z$(),qT(),me(Q$,"baseIsEqual"),J$=Q$});function ez(t,e,r,n){var i=r.length,a=i,s=!n;if(null==t)return!a;for(t=Object(t);i--;){var o=r[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i{Hk(),tz(),me(ez,"baseIsMatch"),rz=ez});function iz(t){return t==t&&!Tw(t)}var az,sz=t(()=>{Ew(),me(iz,"isStrictComparable"),az=iz});function oz(t){for(var e=nP(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,az(i)]}return e}var lz,cz=t(()=>{sz(),oP(),me(oz,"getMatchData"),lz=oz});function hz(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}}var uz,dz=t(()=>{me(hz,"matchesStrictComparable"),uz=hz});function pz(e){var r=lz(e);return 1==r.length&&r[0][2]?uz(r[0][0],r[0][1]):function(t){return t===e||rz(t,e,r)}}var gz,fz=t(()=>{nz(),cz(),dz(),me(pz,"baseMatches"),gz=pz});function mz(t,e){return null!=t&&e in Object(t)}var yz,vz=t(()=>{me(mz,"baseHasIn"),yz=mz});function xz(t,e,r){for(var n=-1,i=(e=_P(e,t)).length,a=!1;++n{SP(),JT(),t7(),n8(),n7(),NP(),me(xz,"hasPath"),bz=xz});function kz(t,e){return null!=t&&bz(t,e,yz)}var Tz,Ez=t(()=>{vz(),wz(),me(kz,"hasIn"),Tz=kz});function Cz(r,n){return dP(r)&&az(n)?uz(LP(r),n):function(t){var e=OP(t,r);return void 0===e&&e===n?Tz(t,r):J$(n,e,3)}}var _z,Sz=t(()=>{tz(),PP(),Ez(),pP(),sz(),dz(),NP(),me(Cz,"baseMatchesProperty"),_z=Cz});function Az(e){return function(t){return t?.[e]}}var Lz,Nz=t(()=>{me(Az,"baseProperty"),Lz=Az});function Iz(e){return function(t){return RP(t,e)}}var Rz,Mz=t(()=>{MP(),me(Iz,"basePropertyDeep"),Rz=Iz});function Dz(t){return dP(t)?Lz(LP(t)):Rz(t)}var Oz,Pz=t(()=>{Nz(),Mz(),pP(),NP(),me(Dz,"property"),Oz=Dz});function Bz(t){return"function"==typeof t?t:null==t?N8:"object"==typeof t?ZT(t)?_z(t[0],t[1]):gz(t):Oz(t)}var Fz,$z=t(()=>{fz(),Sz(),I8(),t7(),Pz(),me(Bz,"baseIteratee"),Fz=Bz});function zz(t,e,r,n){for(var i=-1,a=null==t?0:t.length;++i{me(zz,"arrayAggregator"),Gz=zz});function qz(t,e){return t&&iT(t,e,nP)}var jz,Wz=t(()=>{sT(),oP(),me(qz,"baseForOwn"),jz=qz});function Yz(a,s){return function(t,e){if(null!=t){if(!a7(t))return a(t,e);for(var r=t.length,n=s?r:-1,i=Object(t);(s?n--:++n{s7(),me(Yz,"createBaseEach"),Hz=Yz}),Zz=t(()=>{Wz(),Kz(),Vz=Hz(jz),Xz=Vz});function Qz(t,n,i,a){return Xz(t,function(t,e,r){n(a,t,i(t),r)}),a}var Jz,tG=t(()=>{Zz(),me(Qz,"baseAggregator"),Jz=Qz});function eG(i,a){return function(t,e){var r=ZT(t)?Gz:Jz,n=a?a():{};return r(t,i,Fz(e,2),n)}}var rG,nG,iG,aG,sG,oG,lG,cG=t(()=>{Uz(),tG(),$z(),t7(),me(eG,"createAggregator"),rG=eG}),hG=t(()=>{iw(),nG=me(function(){return W3.Date.now()},"now"),iG=nG}),uG=t(()=>{J8(),N6(),rE(),x8(),aG=Object.prototype,sG=aG.hasOwnProperty,oG=Q8(function(t,e){t=Object(t);var r=-1,n=e.length,i=2{me(dG,"arrayIncludesWith"),pG=dG});function fG(t,e,r,n){var i=-1,a=YO,s=!0,o=t.length,l=[],c=e.length;if(o){r&&(e=VD(e,N7(r))),n?(a=pG,s=!1):200<=e.length&&(a=T$,s=!1,e=new y$(e));t:for(;++i{v$(),XO(),gG(),XD(),B7(),E$(),me(fG,"baseDifference"),mG=fG}),bG=t(()=>{xG(),YP(),J8(),c7(),yG=Q8(function(t,e){return l7(t)?mG(t,WP(e,1,l7,!0)):[]}),vG=yG});function wG(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var kG,TG=t(()=>{me(wG,"last"),kG=wG});function EG(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:kO(e),tB(t,e<0?0:e,n)):[]}var CG,_G=t(()=>{eB(),CO(),me(EG,"drop"),CG=EG});function SG(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:kO(e),tB(t,0,(e=n-e)<0?0:e)):[]}var AG,LG=t(()=>{eB(),CO(),me(SG,"dropRight"),AG=SG});function NG(t){return"function"==typeof t?t:N8}var IG,RG=t(()=>{I8(),me(NG,"castFunction"),IG=NG});function MG(t,e){return(ZT(t)?IO:Xz)(t,IG(e))}var v,DG=t(()=>{RO(),Zz(),RG(),t7(),me(MG,"forEach"),v=MG}),OG=t(()=>{DG()});function PG(t,e){for(var r=-1,n=null==t?0:t.length;++r{me(PG,"arrayEvery"),BG=PG});function $G(t,n){var i=!0;return Xz(t,function(t,e,r){return i=!!n(t,e,r)}),i}var zG,GG=t(()=>{Zz(),me($G,"baseEvery"),zG=$G});function UG(t,e,r){var n=ZT(t)?BG:zG;return r&&eE(t,e,r)&&(e=void 0),n(t,Fz(e,3))}var qG,jG=t(()=>{FG(),GG(),$z(),t7(),rE(),me(UG,"every"),qG=UG});function WG(t,n){var i=[];return Xz(t,function(t,e,r){n(t,e,r)&&i.push(t)}),i}var YG,HG=t(()=>{Zz(),me(WG,"baseFilter"),YG=WG});function VG(t,e){return(ZT(t)?mB:YG)(t,Fz(e,3))}var XG,KG=t(()=>{yB(),HG(),$z(),t7(),me(VG,"filter"),XG=VG});function ZG(a){return function(t,e,r){var n,i=Object(t);return a7(t)||(n=Fz(e,3),t=nP(t),e=me(function(t){return n(i[t],t,i)},"predicate")),-1<(e=a(t,e,r))?i[n?t[e]:e]:void 0}}var QG,JG=t(()=>{$z(),s7(),oP(),me(ZG,"createFind"),QG=ZG});function tU(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:kO(r))<0&&(r=eU(n+r,0)),DO(t,Fz(e,3),r)):-1}var eU,rU,nU,iU,aU=t(()=>{OO(),$z(),CO(),eU=Math.max,me(tU,"findIndex"),rU=tU}),sU=t(()=>{JG(),aU(),nU=QG(rU),iU=nU});function oU(t){return t&&t.length?t[0]:void 0}var lU,cU=t(()=>{me(oU,"head"),lU=oU}),hU=t(()=>{cU()});function uU(t,n){var i=-1,a=a7(t)?Array(t.length):[];return Xz(t,function(t,e,r){a[++i]=n(t,e,r)}),a}var dU,pU=t(()=>{Zz(),s7(),me(uU,"baseMap"),dU=uU});function gU(t,e){return(ZT(t)?VD:dU)(t,Fz(e,3))}var x,fU=t(()=>{XD(),$z(),pU(),t7(),me(gU,"map"),x=gU});function mU(t,e){return WP(x(t,e),1)}var yU,vU=t(()=>{YP(),fU(),me(mU,"flatMap"),yU=mU});function xU(t,e){return null==t?t:iT(t,IG(e),v8)}var bU,wU=t(()=>{sT(),RG(),x8(),me(xU,"forIn"),bU=xU});function kU(t,e){return t&&jz(t,IG(e))}var TU,EU,CU,_U,SU=t(()=>{Wz(),RG(),me(kU,"forOwn"),TU=kU}),AU=t(()=>{Zk(),cG(),CU=Object.prototype,EU=CU.hasOwnProperty,CU=rG(function(t,e,r){EU.call(t,r)?t[r].push(e):Kk(t,r,[e])}),_U=CU});function LU(t,e){return e{me(LU,"baseGt"),NU=LU});function RU(t,e){return null!=t&&DU.call(t,e)}var MU,DU,OU,PU=t(()=>{MU=Object.prototype,DU=MU.hasOwnProperty,me(RU,"baseHas"),OU=RU});function BU(t,e){return null!=t&&bz(t,e,OU)}var FU,$U=t(()=>{PU(),wz(),me(BU,"has"),FU=BU});function zU(t){return"string"==typeof t||!ZT(t)&&UT(t)&&"[object String]"==bw(t)}var GU,UU=t(()=>{ww(),t7(),qT(),me(zU,"isString"),GU=zU});function qU(e,t){return VD(t,function(t){return e[t]})}var jU,WU=t(()=>{XD(),me(qU,"baseValues"),jU=qU});function YU(t){return null==t?[]:jU(t,nP(t))}var HU,VU=t(()=>{WU(),oP(),me(YU,"values"),HU=YU});function XU(t,e,r,n){return t=a7(t)?t:HU(t),r=r&&!n?kO(r):0,n=t.length,r<0&&(r=KU(n+r,0)),GU(t)?r<=n&&-1{jO(),s7(),UU(),CO(),VU(),KU=Math.max,me(XU,"includes"),ZU=XU});function JU(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:kO(r))<0&&(r=tq(n+r,0)),qO(t,e,r)):-1}var tq,eq,rq=t(()=>{jO(),CO(),tq=Math.max,me(JU,"indexOf"),eq=JU});function nq(t){if(null!=t){if(a7(t)&&(ZT(t)||"string"==typeof t||"function"==typeof t.splice||g7(t)||P7(t)||XT(t)))return!t.length;var e,r=sF(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(PT(t))return!tP(t).length;for(e in t)if(aq.call(t,e))return!1}return!0}var iq,aq,sq,oq=t(()=>{eP(),uF(),JT(),t7(),s7(),m7(),BT(),$7(),iq=Object.prototype,aq=iq.hasOwnProperty,me(nq,"isEmpty"),sq=nq});function lq(t){return UT(t)&&"[object RegExp]"==bw(t)}var cq,hq,uq,dq=t(()=>{ww(),qT(),me(lq,"baseIsRegExp"),cq=lq}),pq=t(()=>{dq(),B7(),F7(),hq=(hq=D7&&D7.isRegExp)?N7(hq):cq,uq=hq});function gq(t){return void 0===t}var fq,mq=t(()=>{me(gq,"isUndefined"),fq=gq});function yq(t,e){return t{me(yq,"baseLt"),vq=yq});function bq(t,n){var i={};return n=Fz(n,3),jz(t,function(t,e,r){Kk(i,e,n(t,e,r))}),i}var wq,kq=t(()=>{Zk(),Wz(),$z(),me(bq,"mapValues"),wq=bq});function Tq(t,e,r){for(var n=-1,i=t.length;++n{YD(),me(Tq,"baseExtremum"),Eq=Tq});function _q(t){return t&&t.length?Eq(t,N8,NU):void 0}var Sq,Aq=t(()=>{Cq(),IU(),I8(),me(_q,"max"),Sq=_q});function Lq(t){return t&&t.length?Eq(t,N8,vq):void 0}var Nq,Iq=t(()=>{Cq(),xq(),I8(),me(Lq,"min"),Nq=Lq});function Rq(t,e){return t&&t.length?Eq(t,Fz(e,2),vq):void 0}var Mq,Dq=t(()=>{Cq(),$z(),xq(),me(Rq,"minBy"),Mq=Rq});function Oq(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var Pq,Bq=t(()=>{me(Oq,"negate"),Pq=Oq});function Fq(t,e,r,n){if(Tw(t))for(var i=-1,a=(e=_P(e,t)).length,s=a-1,o=t;null!=o&&++i{H7(),SP(),n8(),Ew(),NP(),me(Fq,"baseSet"),$q=Fq});function Gq(t,e,r){for(var n=-1,i=e.length,a={};++n{MP(),zq(),SP(),me(Gq,"basePickBy"),Uq=Gq});function jq(t,r){var e;return null==t?{}:(e=VD(UB(t),function(t){return[t]}),r=Fz(r),Uq(t,e,function(t,e){return r(t,e[0])}))}var Wq,Yq=t(()=>{XD(),$z(),qq(),oF(),me(jq,"pickBy"),Wq=jq});function Hq(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var Vq,Xq=t(()=>{me(Hq,"baseSortBy"),Vq=Hq});function Kq(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,a=WD(t),s=void 0!==e,o=null===e,l=e==e,c=WD(e);if(!o&&!c&&!a&&e{YD(),me(Kq,"compareAscending"),Zq=Kq});function Jq(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,o=r.length;++n{Qq(),me(Jq,"compareMultiple"),tj=Jq});function rj(t,n,r){n=n.length?VD(n,function(e){return ZT(e)?function(t){return RP(t,1===e.length?e[0]:e)}:e}):[N8];var i=-1,t=(n=VD(n,N7(Fz)),dU(t,function(e,t,r){return{criteria:VD(n,function(t){return t(e)}),index:++i,value:e}}));return Vq(t,function(t,e){return tj(t,e,r)})}var nj,ij,aj,sj=t(()=>{XD(),MP(),$z(),pU(),Xq(),B7(),ej(),I8(),t7(),me(rj,"baseOrderBy"),nj=rj}),oj=t(()=>{Nz(),ij=Lz("length"),aj=ij});function lj(t){for(var e=mj.lastIndex=0;mj.test(t);)++e;return e}var cj,hj,uj,dj,pj,gj,fj,mj,yj,vj=t(()=>{cj="["+(dj="\\ud800-\\udfff")+"]",hj="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",uj="\\ud83c[\\udffb-\\udfff]",fj="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",gj="[\\ufe0e\\ufe0f]?",pj="(?:\\u200d(?:"+[dj="[^"+dj+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+gj+fj+")*",gj=gj+fj+pj,fj="(?:"+[dj+hj+"?",hj,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",cj].join("|")+")",mj=RegExp(uj+"(?="+uj+")|"+fj+gj,"g"),me(lj,"unicodeSize"),yj=lj});function xj(t){return(iB(t)?yj:aj)(t)}var bj,wj=t(()=>{oj(),aB(),vj(),me(xj,"stringSize"),bj=xj});function kj(r,t){return Uq(r,t,function(t,e){return Tz(r,e)})}var Tj,Ej,Cj,_j=t(()=>{qq(),Ez(),me(kj,"basePick"),Tj=kj}),Sj=t(()=>{_j(),QP(),Ej=ZP(function(t,e){return null==t?{}:Tj(t,e)}),Cj=Ej});function Aj(t,e,r,n){for(var i=-1,a=Nj(Lj((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var Lj,Nj,Ij,Rj=t(()=>{Lj=Math.ceil,Nj=Math.max,me(Aj,"baseRange"),Ij=Aj});function Mj(n){return function(t,e,r){return r&&"number"!=typeof r&&eE(t,e,r)&&(e=r=void 0),t=xO(t),void 0===e?(e=t,t=0):e=xO(e),r=void 0===r?t{Rj(),rE(),bO(),me(Mj,"createRange"),Dj=Mj}),Fj=t(()=>{Bj(),Oj=Dj(),Pj=Oj});function $j(t,n,i,a,e){return e(t,function(t,e,r){i=a?(a=!1,t):n(i,t,e,r)}),i}var zj,Gj=t(()=>{me($j,"baseReduce"),zj=$j});function Uj(t,e,r){var n=ZT(t)?oB:zj,i=arguments.length<3;return n(t,Fz(e,4),r,i,Xz)}var qj,jj=t(()=>{lB(),Zz(),$z(),Gj(),t7(),me(Uj,"reduce"),qj=Uj});function Wj(t,e){return(ZT(t)?mB:YG)(t,Pq(Fz(e,3)))}var Yj,Hj=t(()=>{yB(),HG(),$z(),t7(),Bq(),me(Wj,"reject"),Yj=Wj});function Vj(t){var e;return null==t?0:a7(t)?GU(t)?bj(t):t.length:"[object Map]"==(e=sF(t))||"[object Set]"==e?t.size:tP(t).length}var Xj,Kj=t(()=>{eP(),uF(),s7(),UU(),wj(),me(Vj,"size"),Xj=Vj});function Zj(t,n){var i;return Xz(t,function(t,e,r){return!(i=n(t,e,r))}),!!i}var Qj,Jj=t(()=>{Zz(),me(Zj,"baseSome"),Qj=Zj});function tW(t,e,r){var n=ZT(t)?b$:Qj;return r&&eE(t,e,r)&&(e=void 0),n(t,Fz(e,3))}var eW,rW,nW,iW,aW,sW=t(()=>{w$(),$z(),Jj(),t7(),rE(),me(tW,"some"),eW=tW}),oW=t(()=>{YP(),sj(),J8(),rE(),rW=Q8(function(t,e){var r;return null==t?[]:(1<(r=e.length)&&eE(t,e[0],e[1])?e=[]:2{hF(),LO(),M$(),iW=VB&&1/R$(new VB([,-0]))[1]==1/0?function(t){return new VB(t)}:AO,aW=iW});function cW(t,e,r){var n=-1,i=YO,a=t.length,s=!0,o=[],l=o;if(r)s=!1,i=pG;else if(200<=a){var c=e?null:aW(t);if(c)return R$(c);s=!1,i=T$,l=new y$}else l=e?[]:o;t:for(;++n{v$(),XO(),gG(),E$(),lW(),M$(),me(cW,"baseUniq"),hW=cW}),gW=t(()=>{YP(),J8(),pW(),c7(),uW=Q8(function(t){return hW(WP(t,1,l7,!0))}),dW=uW});function fW(t){return t&&t.length?hW(t):[]}var mW,yW=t(()=>{pW(),me(fW,"uniq"),mW=fW});function vW(t,e){return t&&t.length?hW(t,Fz(e,2)):[]}var xW,bW=t(()=>{$z(),pW(),me(vW,"uniqBy"),xW=vW});function wW(t){var e=++kW;return TP(t)+e}var kW,TW,EW=t(()=>{EP(),kW=0,me(wW,"uniqueId"),TW=wW});function CW(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n{me(CW,"baseZipObject"),_W=CW});function AW(t,e){return _W(t||[],e||[],Y7)}var LW,NW=t(()=>{H7(),SW(),me(AW,"zipObject"),LW=AW}),IW=t(()=>{lP(),n$(),s$(),c$(),U8(),uG(),bG(),_G(),LG(),OG(),jG(),KG(),sU(),hU(),vU(),XP(),DG(),wU(),SU(),AU(),$U(),I8(),QU(),rq(),t7(),oq(),Lw(),Ew(),pq(),UU(),mq(),oP(),TG(),fU(),kq(),Aq(),lE(),Iq(),Dq(),LO(),hG(),Sj(),Yq(),Fj(),jj(),Hj(),Kj(),sW(),oW(),gW(),yW(),EW(),VU(),NW()});function RW(t,e){t[e]?t[e]++:t[e]=1}function MW(t,e){--t[e]||delete t[e]}function DW(t,e,r,n){return e=""+e,r=""+r,!t&&r{IW(),BW="\0",(FW=class{static{me(this,"Graph")}constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=z8(void 0),this._defaultEdgeLabelFn=z8(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[BW]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return _w(t)||(t=z8(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return nP(this._nodes)}sources(){var e=this;return XG(this.nodes(),function(t){return sq(e._in[t])})}sinks(){var e=this;return XG(this.nodes(),function(t){return sq(e._out[t])})}setNodes(t,e){var r=arguments,n=this;return v(t,function(t){1this.removeEdge(this._edgeObjs[t]),"removeEdge"),delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],v(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),v(nP(this._in[t]),e),delete this._in[t],delete this._preds[t],v(nP(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount),this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(fq(e))e=BW;else{for(var r=e+="";!fq(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound&&(t=this._parent[t])!==BW)return t}children(t){var e;return fq(t)&&(t=BW),this._isCompound?(e=this._children[t])?nP(e):void 0:t===BW?this.nodes():this.hasNode(t)?[]:void 0}predecessors(t){if(t=this._preds[t])return nP(t)}successors(t){if(t=this._sucs[t])return nP(t)}neighbors(t){var e=this.predecessors(t);if(e)return dW(e,this.successors(t))}isLeaf(t){return 0===(t=this.isDirected()?this.successors(t):this.neighbors(t)).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(t,e){r(e)&&n.setNode(e,t)}),v(this._edgeObjs,function(t){n.hasNode(t.v)&&n.hasNode(t.w)&&n.setEdge(t,i.edge(t))}),{});function s(t){var e=i.parent(t);return void 0===e||n.hasNode(e)?a[t]=e:e in a?a[e]:s(e)}return me(s,"findParent"),this._isCompound&&v(n.nodes(),function(t){n.setParent(t,s(t))}),n}setDefaultEdgeLabel(t){return _w(t)||(t=z8(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return HU(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return qj(t,function(t,e){return 1{$W()});function GW(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function UW(t,e){if("_next"!==t&&"_prev"!==t)return e}var qW,jW=t(()=>{qW=class{static{me(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,e=t._prev;if(e!==t)return GW(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&GW(t),t._next=e._next,e._next._prev=t,(e._next=t)._prev=e}toString(){for(var t=[],e=this._sentinel,r=e._prev;r!==e;)t.push(JSON.stringify(r,UW)),r=r._prev;return"["+t.join(", ")+"]"}},me(GW,"unlink"),me(UW,"filterOutLinks")});function WW(e,t){return e.nodeCount()<=1?[]:(t=YW((t=VW(e,t||KW)).graph,t.buckets,t.zeroIdx),VP(x(t,function(t){return e.outEdges(t.v,t.w)})))}function YW(t,e,r){for(var n,i=[],a=e[e.length-1],s=e[0];t.nodeCount();){for(;n=s.dequeue();)HW(t,e,r,n);for(;n=a.dequeue();)HW(t,e,r,n);if(t.nodeCount())for(var o=e.length-2;0{IW(),zW(),jW(),KW=z8(1),me(WW,"greedyFAS"),me(YW,"doGreedyFAS"),me(HW,"removeNode"),me(VW,"buildState"),me(XW,"assignBucket")});function QW(r){var t="greedy"===r.graph().acyclicer?WW(r,e(r)):JW(r);function e(e){return function(t){return e.edge(t).weight}}v(t,function(t){var e=r.edge(t);r.removeEdge(t),e.forwardName=t.name,e.reversed=!0,r.setEdge(t.w,t.v,e,TW("rev"))}),me(e,"weightFn")}function JW(e){var r=[],n={},i={};function a(t){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,n[t]=!0,v(e.outEdges(t),function(t){Object.prototype.hasOwnProperty.call(n,t.w)?r.push(t):a(t.w)}),delete n[t])}return me(a,"dfs"),v(e.nodes(),a),r}function tY(n){v(n.edges(),function(t){var e,r=n.edge(t);r.reversed&&(n.removeEdge(t),e=r.forwardName,delete r.reversed,delete r.forwardName,n.setEdge(t.w,t.v,r,e))})}var eY=t(()=>{IW(),ZW(),me(QW,"run"),me(JW,"dfsFAS"),me(tY,"undo")});function rY(t,e,r,n){for(var i;i=TW(n),t.hasNode(i););return r.dummy=e,t.setNode(i,r),i}function nY(n){var i=(new FW).setGraph(n.graph());return v(n.nodes(),function(t){i.setNode(t,n.node(t))}),v(n.edges(),function(t){var e=i.edge(t.v,t.w)||{weight:0,minlen:1},r=n.edge(t);i.setEdge(t.v,t.w,{weight:e.weight+r.weight,minlen:Math.max(e.minlen,r.minlen)})}),i}function iY(e){var r=new FW({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(t){e.children(t).length||r.setNode(t,e.node(t))}),v(e.edges(),function(t){r.setEdge(t,e.edge(t))}),r}function aY(t,e){var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2;if(a||e)return t=Math.abs(e)*s>Math.abs(a)*t?(r=(t=e<0?-t:t)*a/e,t):(r=a<0?-s:s)*e/a,{x:n+r,y:i+t};throw new Error("Not possible to find intersection inside of the rectangle")}function sY(n){var i=x(Pj(hY(n)+1),function(){return[]});return v(n.nodes(),function(t){var e=n.node(t),r=e.rank;fq(r)||(i[r][e.order]=t)}),i}function oY(e){var r=Nq(x(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(t){t=e.node(t),FU(t,"rank")&&(t.rank-=r)})}function lY(r){var n=Nq(x(r.nodes(),function(t){return r.node(t).rank})),i=[],a=(v(r.nodes(),function(t){var e=r.node(t).rank-n;i[e]||(i[e]=[]),i[e].push(t)}),0),s=r.graph().nodeRankFactor;v(i,function(t,e){fq(t)&&e%s!=0?--a:a&&v(t,function(t){r.node(t).rank+=a})})}function cY(t,e,r,n){var i={width:0,height:0};return 4<=arguments.length&&(i.rank=r,i.order=n),rY(t,"border",i,e)}function hY(e){return Sq(x(e.nodes(),function(t){if(t=e.node(t).rank,!fq(t))return t}))}function uY(t,e){var r={lhs:[],rhs:[]};return v(t,function(t){(e(t)?r.lhs:r.rhs).push(t)}),r}function dY(t,e){var r=iG();try{return e()}finally{console.log(t+" time: "+(iG()-r)+"ms")}}function pY(t,e){return e()}var gY=t(()=>{IW(),zW(),me(rY,"addDummyNode"),me(nY,"simplify"),me(iY,"asNonCompoundGraph"),me(aY,"intersectRect"),me(sY,"buildLayerMatrix"),me(oY,"normalizeRanks"),me(lY,"removeEmptyRanks"),me(cY,"addBorderNode"),me(hY,"maxRank"),me(uY,"partition"),me(dY,"time"),me(pY,"notime")});function fY(a){function s(t){var e=a.children(t),r=a.node(t);if(e.length&&v(e,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var n=r.minRank,i=r.maxRank+1;n{IW(),gY(),me(fY,"addBorderSegments"),me(mY,"addBorderNode")});function vY(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||bY(t)}function xY(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||kY(t),"lr"!==e&&"rl"!==e||(EY(t),bY(t))}function bY(e){v(e.nodes(),function(t){wY(e.node(t))}),v(e.edges(),function(t){wY(e.edge(t))})}function wY(t){var e=t.width;t.width=t.height,t.height=e}function kY(e){v(e.nodes(),function(t){TY(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,TY),Object.prototype.hasOwnProperty.call(t,"y")&&TY(t)})}function TY(t){t.y=-t.y}function EY(e){v(e.nodes(),function(t){CY(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,CY),Object.prototype.hasOwnProperty.call(t,"x")&&CY(t)})}function CY(t){var e=t.x;t.x=t.y,t.y=e}var _Y=t(()=>{IW(),me(vY,"adjust"),me(xY,"undo"),me(bY,"swapWidthHeight"),me(wY,"swapWidthHeightOne"),me(kY,"reverseY"),me(TY,"reverseYOne"),me(EY,"swapXY"),me(CY,"swapXYOne")});function SY(e){e.graph().dummyChains=[],v(e.edges(),function(t){AY(e,t)})}function AY(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==n+1){t.removeEdge(e);var c,h=void 0,u=0;for(++n;n{IW(),gY(),me(SY,"run"),me(AY,"normalizeEdge"),me(LY,"undo")});function IY(r){var n={};function i(t){var e=r.node(t);return Object.prototype.hasOwnProperty.call(n,t)?e.rank:(n[t]=!0,(t=Nq(x(r.outEdges(t),function(t){return i(t.w)-r.edge(t).minlen})))!==Number.POSITIVE_INFINITY&&null!=t||(t=0),e.rank=t)}me(i,"dfs"),v(r.sources(),i)}function RY(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var MY=t(()=>{IW(),me(IY,"longestPath"),me(RY,"slack")});function DY(t){var e,r=new FW({directed:!1}),n=t.nodes()[0],i=t.nodeCount();for(r.setNode(n,{});OY(r,t){IW(),zW(),MY(),me(DY,"feasibleTree"),me(OY,"tightTree"),me(PY,"findMinSlackEdge"),me(BY,"shiftRanks")}),$Y=t(()=>{}),zY=t(()=>{}),GY=t(()=>{IW(),zY(),z8(1)}),UY=t(()=>{GY()}),qY=t(()=>{}),jY=t(()=>{qY()}),WY=t(()=>{IW(),z8(1)});function YY(e){var r={},n={},i=[];function a(t){if(Object.prototype.hasOwnProperty.call(n,t))throw new HY;Object.prototype.hasOwnProperty.call(r,t)||(n[t]=!0,r[t]=!0,v(e.predecessors(t),a),delete n[t],i.push(t))}if(me(a,"visit"),v(e.sinks(),a),Xj(r)!==e.nodeCount())throw new HY;return i}function HY(){}var VY=t(()=>{IW(),YY.CycleException=HY,me(YY,"topsort"),me(HY,"CycleException"),HY.prototype=new Error}),XY=t(()=>{VY()});function KY(e,t,r){ZT(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return v(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);ZY(e,t,"post"===r,a,n,i)}),i}function ZY(e,t,r,n,i,a){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,r||a.push(t),v(i(t),function(t){ZY(e,t,r,n,i,a)}),r&&a.push(t))}var QY=t(()=>{IW(),me(KY,"dfs"),me(ZY,"doDfs")});function JY(t,e){return KY(t,e,"post")}var tH=t(()=>{QY(),me(JY,"postorder")});function eH(t,e){return KY(t,e,"pre")}var rH=t(()=>{QY(),me(eH,"preorder")}),nH=t(()=>{zY(),$W()}),iH=t(()=>{$Y(),GY(),UY(),jY(),WY(),XY(),tH(),rH(),nH(),qY(),VY()});function aH(t){IY(t=nY(t));var e,r=DY(t);for(cH(r),sH(r,t);e=uH(r);)pH(r,t,e,dH(r,t,e))}function sH(e,r){var t=(t=JY(e,e.nodes())).slice(0,t.length-1);v(t,function(t){oH(e,r,t)})}function oH(t,e,r){var n=t.node(r).parent;t.edge(r,n).cutvalue=lH(t,e,r)}function lH(n,i,a){var s=n.node(a).parent,o=!0,t=i.edge(a,s),l=0;return t||(o=!1,t=i.edge(s,a)),l=t.weight,v(i.nodeEdges(a),function(t){var e=t.v===a,r=e?t.w:t.v;r!==s&&(e=e===o,t=i.edge(t).weight,l+=e?t:-t,fH(n,a,r))&&(t=n.edge(a,r).cutvalue,l+=e?-t:t)}),l}function cH(t,e){arguments.length<2&&(e=t.nodes()[0]),hH(t,{},1,e)}function hH(e,r,n,i,t){var a=n,s=e.node(i);return r[i]=!0,v(e.neighbors(i),function(t){Object.prototype.hasOwnProperty.call(r,t)||(n=hH(e,r,n,t,i))}),s.low=a,s.lim=n++,t?s.parent=t:delete s.parent,n}function uH(e){return iU(e.edges(),function(t){return e.edge(t).cutvalue<0})}function dH(e,r,t){var n=t.v,i=t.w,t=(r.hasEdge(n,i)||(n=t.w,i=t.v),e.node(n)),n=e.node(i),a=t,s=!1,i=(t.lim>n.lim&&(a=n,s=!0),XG(r.edges(),function(t){return s===mH(0,e.node(t.v),a)&&s!==mH(0,e.node(t.w),a)}));return Mq(i,function(t){return RY(r,t)})}function pH(t,e,r,n){var i=r.v;t.removeEdge(i,r.w),t.setEdge(n.v,n.w,{}),cH(t),sH(t,e),gH(t,e)}function gH(i,a){var t=iU(i.nodes(),function(t){return!a.node(t).parent}),t=(t=eH(i,t)).slice(1);v(t,function(t){var e=i.node(t).parent,r=a.edge(t,e),n=!1;r||(r=a.edge(e,t),n=!0),a.node(t).rank=a.node(e).rank+(n?r.minlen:-r.minlen)})}function fH(t,e,r){return t.hasEdge(e,r)}function mH(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var yH=t(()=>{IW(),iH(),gY(),FY(),MY(),aH.initLowLimValues=cH,aH.initCutValues=sH,aH.calcCutValue=lH,aH.leaveEdge=uH,aH.enterEdge=dH,aH.exchangeEdges=pH,me(aH,"networkSimplex"),me(sH,"initCutValues"),me(oH,"assignCutValue"),me(lH,"calcCutValue"),me(cH,"initLowLimValues"),me(hH,"dfsAssignLowLim"),me(uH,"leaveEdge"),me(dH,"enterEdge"),me(pH,"exchangeEdges"),me(gH,"updateRanks"),me(fH,"isTreeEdge"),me(mH,"isDescendant")});function vH(t){switch(t.graph().ranker){case"network-simplex":bH(t);break;case"tight-tree":xH(t);break;case"longest-path":wH(t);break;default:bH(t)}}function xH(t){IY(t),DY(t)}function bH(t){aH(t)}var wH,kH=t(()=>{FY(),yH(),MY(),me(vH,"rank"),wH=IY,me(xH,"tightTreeRanker"),me(bH,"networkSimplexRanker")});function TH(e){var r=rY(e,"root",{},"_root"),n=CH(e),i=Sq(HU(n))-1,a=2*i+1,s=(e.graph().nestingRoot=r,v(e.edges(),function(t){e.edge(t).minlen*=a}),_H(e)+1);v(e.children(),function(t){EH(e,r,a,s,i,n,t)}),e.graph().nodeRankFactor=a}function EH(i,a,s,o,l,c,h){var u,d,t,e=i.children(h);e.length?(u=cY(i,"_bt"),d=cY(i,"_bb"),t=i.node(h),i.setParent(u,h),t.borderTop=u,i.setParent(d,h),t.borderBottom=d,v(e,function(t){EH(i,a,s,o,l,c,t);var e=i.node(t),r=e.borderTop||t,n=r!==(t=e.borderBottom||t)?1:l-c[h]+1;i.setEdge(u,r,{weight:e=e.borderTop?o:2*o,minlen:n,nestingEdge:!0}),i.setEdge(t,d,{weight:e,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 CH(n){var i={};function a(t,e){var r=n.children(t);r&&r.length&&v(r,function(t){a(t,e+1)}),i[t]=e}return me(a,"dfs"),v(n.children(),function(t){a(t,1)}),i}function _H(r){return qj(r.edges(),function(t,e){return t+r.edge(e).weight},0)}function SH(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}var AH=t(()=>{IW(),gY(),me(TH,"run"),me(EH,"dfs"),me(CH,"treeDepths"),me(_H,"sumWeights"),me(SH,"cleanup")});function LH(i,a,t){var s,o={};v(t,function(t){for(var e,r,n=i.parent(t);n;){if((e=i.parent(n))?(r=o[e],o[e]=n):(r=s,s=n),r&&r!==n)return void a.setEdge(r,n);n=e}})}var NH=t(()=>{IW(),me(LH,"addSubgraphConstraints")});function IH(i,r,a){var s=RH(i),o=new FW({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(t){return i.node(t)});return v(i.nodes(),function(n){var t=i.node(n),e=i.parent(n);(t.rank===r||t.minRank<=r&&r<=t.maxRank)&&(o.setNode(n),o.setParent(n,e||s),v(i[a](n),function(t){var e=t.v===n?t.w:t.v,r=o.edge(e,n),r=fq(r)?0:r.weight;o.setEdge(e,n,{weight:i.edge(t).weight+r})}),Object.prototype.hasOwnProperty.call(t,"minRank"))&&o.setNode(n,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]})}),o}function RH(t){for(var e;t.hasNode(e=TW("_root")););return e}var MH=t(()=>{IW(),zW(),me(IH,"buildLayerGraph"),me(RH,"createRootNode")});function DH(t,e){for(var r=0,n=1;n>1]+=t.weight;o+=t.weight*r})),o}var PH=t(()=>{IW(),me(DH,"crossCount"),me(OH,"twoLayerCrossCount")});function BH(r){var n={},t=XG(r.nodes(),function(t){return!r.children(t).length}),e=Sq(x(t,function(t){return r.node(t).rank})),i=x(Pj(e+1),function(){return[]});function a(t){var e;FU(n,t)||(n[t]=!0,e=r.node(t),i[e.rank].push(t),v(r.successors(t),a))}return me(a,"dfs"),e=nW(t,function(t){return r.node(t).rank}),v(e,a),i}var FH=t(()=>{IW(),me(BH,"initOrder")});function $H(n,t){return x(t,function(t){var e=n.inEdges(t);return e.length?{v:t,barycenter:(e=qj(e,function(t,e){var r=n.edge(e),e=n.node(e.v);return{sum:t.sum+r.weight*e.order,weight:t.weight+r.weight}},{sum:0,weight:0})).sum/e.weight,weight:e.weight}:{v:t}})}var zH=t(()=>{IW(),me($H,"barycenter")});function GH(t,e){var n={};return v(t,function(t,e){e=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e},fq(t.barycenter)||(e.barycenter=t.barycenter,e.weight=t.weight)}),v(e.edges(),function(t){var e=n[t.v],r=n[t.w];fq(e)||fq(r)||(r.indegree++,e.out.push(n[t.w]))}),UH(XG(n,function(t){return!t.indegree}))}function UH(r){var t=[];function e(e){return function(t){t.merged||(fq(t.barycenter)||fq(e.barycenter)||t.barycenter>=e.barycenter)&&qH(e,t)}}function n(e){return function(t){t.in.push(e),0==--t.indegree&&r.push(t)}}for(me(e,"handleIn"),me(n,"handleOut");r.length;){var i=r.pop();t.push(i),v(i.in.reverse(),e(i)),v(i.out,n(i))}return x(XG(t,function(t){return!t.merged}),function(t){return Cj(t,["vs","i","barycenter","weight"])})}function qH(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var jH=t(()=>{IW(),me(GH,"resolveConflicts"),me(UH,"doResolveConflicts"),me(qH,"mergeEntries")});function WH(t,e){var r=(t=uY(t,function(t){return Object.prototype.hasOwnProperty.call(t,"barycenter")})).lhs,n=nW(t.rhs,function(t){return-t.i}),i=[],a=0,s=0,o=0,t=(r.sort(HH(!!e)),o=YH(i,n,o),v(r,function(t){o+=t.vs.length,i.push(t.vs),a+=t.barycenter*t.weight,s+=t.weight,o=YH(i,n,o)}),{vs:VP(i)});return s&&(t.barycenter=a/s,t.weight=s),t}function YH(t,e,r){for(var n;e.length&&(n=kG(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function HH(r){return function(t,e){return t.barycentere.barycenter?1:r?e.i-t.i:t.i-e.i}}var VH=t(()=>{IW(),gY(),me(WH,"sort"),me(YH,"consumeUnsortable"),me(HH,"compareWithBias")});function XH(r,t,n,i){var e,a=r.children(t),s=(t=r.node(t))?t.borderLeft:void 0,o=t?t.borderRight:void 0,l={},t=(s&&(a=XG(a,function(t){return t!==s&&t!==o})),$H(r,a));return v(t,function(t){var e;r.children(t.v).length&&(e=XH(r,t.v,n,i),l[t.v]=e,Object.prototype.hasOwnProperty.call(e,"barycenter"))&&ZH(t,e)}),KH(a=GH(t,n),l),t=WH(a,i),s&&(t.vs=VP([s,t.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),e=r.node(r.predecessors(o)[0]),Object.prototype.hasOwnProperty.call(t,"barycenter")||(t.barycenter=0,t.weight=0),t.barycenter=(t.barycenter*t.weight+a.order+e.order)/(t.weight+2),t.weight+=2),t}function KH(t,e){v(t,function(t){t.vs=VP(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}function ZH(t,e){fq(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var QH=t(()=>{IW(),zH(),jH(),VH(),me(XH,"sortSubgraph"),me(KH,"expandSubgraphs"),me(ZH,"mergeBarycenters")});function JH(t){var e=hY(t),r=tV(t,Pj(1,e+1),"inEdges"),n=tV(t,Pj(e-1,-1,-1),"outEdges");rV(t,BH(t));for(var i,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){eV(s%2?r:n,2<=s%4);var l,c=DH(t,l=sY(t));c{IW(),zW(),gY(),NH(),MH(),PH(),FH(),QH(),me(JH,"order"),me(tV,"buildLayerGraphs"),me(eV,"sweepLayerGraphs"),me(rV,"assignOrder")});function iV(c){var h=sV(c);v(c.graph().dummyChains,function(t){for(var e,r=c.node(t).edgeObj,n=aV(c,h,r.v,r.w),i=n.path,a=n.lca,s=0,o=i[s],l=!0;t!==r.w;){if(e=c.node(t),l){for(;(o=i[s])!==a&&c.node(o).maxRanko||l>e[c].lim););for(i=c,c=n;(c=t.parent(c))!==i;)s.push(c);return{path:a.concat(s.reverse()),lca:i}}function sV(r){var n={},i=0;function a(t){var e=i;v(r.children(t),a),n[t]={low:e,lim:i++}}return me(a,"dfs"),v(r.children(),a),n}var oV=t(()=>{IW(),me(iV,"parentDummyChains"),me(aV,"findPath"),me(sV,"postorder")});function lV(c,t){var h={};function e(t,n){var a=0,s=0,o=t.length,l=kG(n);return v(n,function(t,e){var r=hV(c,t),i=r?c.node(r).order:o;!r&&t!==l||(v(n.slice(s,e+1),function(n){v(c.predecessors(n),function(t){var e=c.node(t),r=e.order;!(ri)&&uV(s,t,a)})})}function e(r,n){var i,a=-1,s=0;return v(n,function(t,e){"border"===o.node(t).dummy&&(t=o.predecessors(t)).length&&(i=o.node(t[0]).order,l(n,s,e,a,i),s=e,a=i),l(n,s,n.length,i,r.length)}),n}return me(l,"scan"),me(e,"visitLayer"),qj(t,e),s}function hV(e,t){if(e.node(t).dummy)return iU(e.predecessors(t),function(t){return e.node(t).dummy})}function uV(t,e,r){r{IW(),zW(),gY(),me(lV,"findType1Conflicts"),me(cV,"findType2Conflicts"),me(hV,"findOtherInnerSegmentNode"),me(uV,"addConflict"),me(dV,"hasConflict"),me(pV,"verticalAlignment"),me(gV,"horizontalCompaction"),me(fV,"buildBlockGraph"),me(mV,"findSmallestWidthAlignment"),me(yV,"alignCoordinates"),me(vV,"balance"),me(xV,"positionX"),me(bV,"sep"),me(wV,"width")});function TV(r){EV(r=iY(r)),TU(xV(r),function(t,e){r.node(e).x=t})}function EV(r){var t=sY(r),n=r.graph().ranksep,i=0;v(t,function(t){var e=Sq(x(t,function(t){return r.node(t).height}));v(t,function(t){r.node(t).y=i+e/2}),i+=e+n})}var CV=t(()=>{IW(),gY(),kV(),me(TV,"position"),me(EV,"positionY")});function _V(e,t){var r=t&&t.debugTiming?dY:pY;r("layout",()=>{var t=r(" buildLayoutGraph",()=>LV(e));r(" runLayout",()=>SV(t,r)),r(" updateInputGraph",()=>AV(e,t))})}function SV(t,e){e(" makeSpaceForEdgeLabels",()=>NV(t)),e(" removeSelfEdges",()=>$V(t)),e(" acyclic",()=>QW(t)),e(" nestingGraph.run",()=>TH(t)),e(" rank",()=>vH(iY(t))),e(" injectEdgeLabelProxies",()=>IV(t)),e(" removeEmptyRanks",()=>lY(t)),e(" nestingGraph.cleanup",()=>SH(t)),e(" normalizeRanks",()=>oY(t)),e(" assignRankMinMax",()=>RV(t)),e(" removeEdgeLabelProxies",()=>MV(t)),e(" normalize.run",()=>SY(t)),e(" parentDummyChains",()=>iV(t)),e(" addBorderSegments",()=>fY(t)),e(" order",()=>JH(t)),e(" insertSelfEdges",()=>zV(t)),e(" adjustCoordinateSystem",()=>vY(t)),e(" position",()=>TV(t)),e(" positionSelfEdges",()=>GV(t)),e(" removeBorderNodes",()=>FV(t)),e(" normalize.undo",()=>LY(t)),e(" fixupEdgeLabelCoords",()=>PV(t)),e(" undoCoordinateSystem",()=>xY(t)),e(" translateGraph",()=>DV(t)),e(" assignNodeIntersects",()=>OV(t)),e(" reversePoints",()=>BV(t)),e(" acyclic.undo",()=>tY(t))}function AV(n,i){v(n.nodes(),function(t){var e=n.node(t),r=i.node(t);e&&(e.x=r.x,e.y=r.y,i.children(t).length)&&(e.width=r.width,e.height=r.height)}),v(n.edges(),function(t){var e=n.edge(t),t=i.edge(t);e.points=t.points,Object.prototype.hasOwnProperty.call(t,"x")&&(e.x=t.x,e.y=t.y)}),n.graph().width=i.graph().width,n.graph().height=i.graph().height}function LV(r){var n=new FW({multigraph:!0,compound:!0}),t=qV(r.graph());return n.setGraph(sE({},WV,UV(t,jV),Cj(t,YV))),v(r.nodes(),function(t){var e=qV(r.node(t));n.setNode(t,lG(UV(e,HV),VV)),n.setParent(t,r.parent(t))}),v(r.edges(),function(t){var e=qV(r.edge(t));n.setEdge(t,sE({},KV,UV(e,XV),Cj(e,ZV)))}),n}function NV(e){var r=e.graph();r.ranksep/=2,v(e.edges(),function(t){(t=e.edge(t)).minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function IV(r){v(r.edges(),function(t){var e=r.edge(t);e.width&&e.height&&(e=r.node(t.v),e={rank:(r.node(t.w).rank-e.rank)/2+e.rank,e:t},rY(r,"edge-proxy",e,"_ep"))})}function RV(e){var r=0;v(e.nodes(),function(t){(t=e.node(t)).borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,r=Sq(r,t.maxRank))}),e.graph().maxRank=r}function MV(r){v(r.nodes(),function(t){var e=r.node(t);"edge-proxy"===e.dummy&&(r.edge(e.e).labelRank=e.rank,r.removeNode(t))})}function DV(e){var i=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,t=e.graph(),r=t.marginx||0,n=t.marginy||0;function l(t){var e=t.x,r=t.y,n=t.width,t=t.height;i=Math.min(i,e-n/2),a=Math.max(a,e+n/2),s=Math.min(s,r-t/2),o=Math.max(o,r+t/2)}me(l,"getExtremes"),v(e.nodes(),function(t){l(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),Object.prototype.hasOwnProperty.call(t,"x")&&l(t)}),i-=r,s-=n,v(e.nodes(),function(t){(t=e.node(t)).x-=i,t.y-=s}),v(e.edges(),function(t){t=e.edge(t),v(t.points,function(t){t.x-=i,t.y-=s}),Object.prototype.hasOwnProperty.call(t,"x")&&(t.x-=i),Object.prototype.hasOwnProperty.call(t,"y")&&(t.y-=s)}),t.width=a-i+r,t.height=o-s+n}function OV(a){v(a.edges(),function(t){var e,r=a.edge(t),n=a.node(t.v),t=a.node(t.w),i=r.points?(e=r.points[0],r.points[r.points.length-1]):(r.points=[],e=t,n);r.points.unshift(aY(n,e)),r.points.push(aY(t,i))})}function PV(r){v(r.edges(),function(t){var e=r.edge(t);if(Object.prototype.hasOwnProperty.call(e,"x"))switch("l"!==e.labelpos&&"r"!==e.labelpos||(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset}})}function BV(e){v(e.edges(),function(t){(t=e.edge(t)).reversed&&t.points.reverse()})}function FV(a){v(a.nodes(),function(t){var e,r,n,i;a.children(t).length&&(t=a.node(t),e=a.node(t.borderTop),r=a.node(t.borderBottom),n=a.node(kG(t.borderLeft)),i=a.node(kG(t.borderRight)),t.width=Math.abs(i.x-n.x),t.height=Math.abs(r.y-e.y),t.x=n.x+t.width/2,t.y=e.y+t.height/2)}),v(a.nodes(),function(t){"border"===a.node(t).dummy&&a.removeNode(t)})}function $V(r){v(r.edges(),function(t){var e;t.v===t.w&&((e=r.node(t.v)).selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:t,label:r.edge(t)}),r.removeEdge(t))})}function zV(i){var t=sY(i);v(t,function(t){var n=0;v(t,function(t,e){var r=i.node(t);r.order=e+n,v(r.selfEdges,function(t){rY(i,"selfedge",{width:t.label.width,height:t.label.height,rank:r.rank,order:e+ ++n,e:t.e,label:t.label},"_se")}),delete r.selfEdges})})}function GV(s){v(s.nodes(),function(t){var e,r,n,i,a=s.node(t);"selfedge"===a.dummy&&(e=(i=s.node(a.e.v)).x+i.width/2,r=i.y,n=a.x-e,i=i.height/2,s.setEdge(a.e,a.label),s.removeNode(t),a.label.points=[{x:e+2*n/3,y:r-i},{x:e+5*n/6,y:r-i},{x:e+n,y:r},{x:e+5*n/6,y:r+i},{x:e+2*n/3,y:r+i}],a.label.x=a.x,a.label.y=a.y)})}function UV(t,e){return wq(Cj(t,e),Number)}function qV(t){var r={};return v(t,function(t,e){r[e.toLowerCase()]=t}),r}var jV,WV,YV,HV,VV,XV,KV,ZV,QV=t(()=>{IW(),zW(),yY(),_Y(),eY(),NY(),kH(),AH(),nV(),oV(),CV(),gY(),me(_V,"layout"),me(SV,"runLayout"),me(AV,"updateInputGraph"),jV=["nodesep","edgesep","ranksep","marginx","marginy"],WV={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},YV=["acyclicer","ranker","rankdir","align"],HV=["width","height"],VV={width:0,height:0},XV=["minlen","weight","width","height","labeloffset"],KV={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ZV=["labelpos"],me(LV,"buildLayoutGraph"),me(NV,"makeSpaceForEdgeLabels"),me(IV,"injectEdgeLabelProxies"),me(RV,"assignRankMinMax"),me(MV,"removeEdgeLabelProxies"),me(DV,"translateGraph"),me(OV,"assignNodeIntersects"),me(PV,"fixupEdgeLabelCoords"),me(BV,"reversePointsForReversedEdges"),me(FV,"removeBorderNodes"),me($V,"removeSelfEdges"),me(zV,"insertSelfEdges"),me(GV,"positionSelfEdges"),me(UV,"selectNumberAttrs"),me(qV,"canonicalize")}),JV=t(()=>{eY(),QV(),NY(),kH()});function tX(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:eX(t),edges:rX(t)};return fq(t.graph())||(e.value=r$(t.graph())),e}function eX(n){return x(n.nodes(),function(t){var e=n.node(t),r=n.parent(t),t={v:t};return fq(e)||(t.value=e),fq(r)||(t.parent=r),t})}function rX(n){return x(n.edges(),function(t){var e=n.edge(t),r={v:t.v,w:t.w};return fq(t.name)||(r.name=t.name),fq(e)||(r.value=e),r})}var nX,iX,aX,sX,oX,lX,cX,hX,uX,dX,pX,gX,fX,mX,yX,vX=t(()=>{IW(),$W(),me(tX,"write"),me(eX,"writeNodes"),me(rX,"writeEdges")}),xX=t(()=>{e(),zW(),vX(),nX=new Map,iX=new Map,aX=new Map,sX=me(()=>{iX.clear(),aX.clear(),nX.clear()},"clear"),oX=me((t,e)=>{var r=iX.get(e)||[];return M.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),lX=me((t,e)=>{var r=iX.get(e)||[];return M.info("Descendants of ",e," is ",r),M.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||oX(t.v,e)||oX(t.w,e)||r.includes(t.w):(M.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),cX=me((r,n,i,a)=>{M.warn("Copying children of ",r,"root",a,"data",n.node(r),a);var t=n.children(r)||[];r!==a&&t.push(r),M.warn("Copying (nodes) clusterId",r,"nodes",t),t.forEach(t=>{var e;0{M.info("Edge",t);var e=n.edge(t.v,t.w,t.name);M.info("Edge data",e,a);try{lX(t,a)?(M.info("Copying as ",t.v,t.w,e,t.name),i.setEdge(t.v,t.w,e,t.name),M.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):M.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",r)}catch(t){M.error(t)}})),M.debug("Removing node",t),n.removeNode(t)})},"copy"),hX=me((t,e)=>{let r=e.children(t),n=[...r];for(var i of r)aX.set(i,t),n=[...n,...hX(i,e)];return n},"extractDescendants"),uX=me((t,e,r)=>{let n=t.edges().filter(t=>t.v===e||t.w===e),i=t.edges().filter(t=>t.v===r||t.w===r),a=n.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),s=i.map(t=>({v:t.v,w:t.w}));return a.filter(e=>s.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),dX=me((t,e,r)=>{var n,i=e.children(t);if(M.trace("Searching children of id ",t,i),i.length<1)return t;let a;for(n of i){var s=dX(n,e,r),o=uX(e,r,s);if(s){if(!(0nX.has(t)&&nX.get(t).externalConnections&&nX.has(t)?nX.get(t).id:t,"getAnchorId"),gX=me((a,t)=>{if(!a||10{oX(t.v,e)^oX(t.w,e)&&(M.warn("Edge: ",t," leaves cluster ",e),M.warn("Descendants of XXX ",e,": ",iX.get(e)),nX.get(e).externalConnections=!0)})):M.debug("Not a cluster ",e,iX)});for(var e of nX.keys()){var r=nX.get(e).id;(r=a.parent(r))!==e&&nX.has(r)&&!nX.get(r).externalConnections&&(nX.get(e).id=r)}a.edges().forEach(function(t){var e,r,n,i=a.edge(t);M.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),M.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(a.edge(t))),t.v,M.warn("Fix XXX",nX,"ids:",t.v,t.w,"Translating: ",nX.get(t.v)," --- ",nX.get(t.w)),(nX.get(t.v)||nX.get(t.w))&&(M.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),e=pX(t.v),r=pX(t.w),a.removeEdge(t.v,t.w,t.name),e!==t.v&&(n=a.parent(e),nX.get(n).externalConnections=!0,i.fromCluster=t.v),r!==t.w&&(n=a.parent(r),nX.get(n).externalConnections=!0,i.toCluster=t.w),M.warn("Fix Replacing with XXX",e,r,t.name),a.setEdge(e,r,i,t.name))}),M.warn("Adjusted Graph",tX(a)),fX(a,0),M.trace(nX)}},"adjustClustersAndEdges"),fX=me((r,n)=>{if(M.warn("extractor - ",n,tX(r),r.children("D")),10{if(0===t.length)return[];let r=Object.assign([],t);return t.forEach(t=>{t=e.children(t),t=mX(e,t),r=[...r,...t]}),r},"sorter"),yX=me(t=>mX(t,t.children()),"sortNodesByHierarchy")}),bX={};oPt(bX,{render:()=>kX});var wX,kX,TX,EX,CX,_X,SX,AX,LX,NX,IX,RX,MX,DX,OX,PX,BX,FX,$X,zX,GX=t(()=>{JV(),vX(),zW(),OD(),i(),xX(),UD(),YM(),DD(),e(),WM(),mu(),wX=me(async(t,i,a,s,o,l)=>{M.warn("Graph in recursive render:XAX",tX(i),o);let c=i.graph().rankdir,n=(M.trace("Dir in recursive render - dir:",c),t=t.insert("g").attr("class","root"),i.nodes()?M.info("Recursive render XXX",i.nodes()):M.info("No nodes found for",i),0{var t=n.edges().map(async function(t){var e=n.edge(t.v,t.w,t.name);M.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),M.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),M.info("Fix",rX,"ids:",t.v,t.w,"Translating: ",rX.get(t.v),rX.get(t.w)),await oD(r,e)});await Promise.all(t)},"processEdges")(),M.info("Graph before layout:",JSON.stringify(JV(n))),M.info("############################################# XXX"),M.info("### Layout ### XXX"),M.info("############################################# XXX"),CV(n),M.info("Graph after layout:",JSON.stringify(JV(n))),0),p=IM(l).subGraphTitleTotalMargin;return await Promise.all(mX(n).map(async function(t){var e,r=n.node(t);M.info("Position XBX => "+t+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,M.info("A tainted cluster node XBX1",t,r.id,r.width,r.height,r.x,r.y,n.parent(t)),rX.get(r.id).node=r,$D(r)):0 "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),n.node(t.v)),t=n.node(t.w),r=gD(h,e,rX,a,r,t,s);lD(e,r)}),n.nodes().forEach(function(t){var e=n.node(t);M.info(t,e.type,e.diff),e.isGroup&&(d=e.diff)}),M.warn("Returning from recursive render XAX",t,d),{elem:t,diff:d}},"recursiveRender"),wX=me(async(t,e)=>{let l=new BW({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=e.select("g");RD(r,t.markers,t.type,t.diagramId),FD(),aD(),zM(),aX(),t.nodes.forEach(t=>{l.setNode(t.id,{...t}),t.parentId&&l.setParent(t.id,t.parentId)}),M.debug("Edges:",t.edges),t.edges.forEach(t=>{var e,r,i,n,a,s,o;t.start===t.end?(r=(e=t.start)+"---"+e+"---1",i=e+"---"+e+"---2",n=l.node(e),l.setNode(r,{domId:r,id:r,parentId:n.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,n.parentId),l.setNode(i,{domId:i,id:i,parentId:n.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(i,n.parentId),a=structuredClone(t),s=structuredClone(t),o=structuredClone(t),a.label="",a.arrowTypeEnd="none",a.id=e+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=e+"-cyclic-special-mid",o.label="",n.isGroup&&(a.fromCluster=e,o.toCluster=e),o.id=e+"-cyclic-special-2",o.arrowTypeStart="none",l.setEdge(e,r,a,e+"-cyclic-special-0"),l.setEdge(r,i,s,e+"-cyclic-special-1"),l.setEdge(i,e,o,e+"-cyc{UD(),e(),kX={},TX=me(t=>{for(var e of t)kX[e.name]=e},"registerLayoutLoaders"),me(()=>{TX([{name:"dagre",loader:me(async()=>Promise.resolve().then(()=>($X(),xX)),"loader")}])},"registerDefaultLayoutLoaders")(),EX=me(async(t,e)=>{var r;if(t.layoutAlgorithm in kX)return(await(r=kX[t.layoutAlgorithm]).loader()).render(t,e,zD,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm)},"render"),CX=me((t="",{fallback:e="dagre"}={})=>{if(t in kX)return t;if(e in kX)return M.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")}),GX=t(()=>{th(),e(),_X=me((t,e,r,i)=>{t.attr("class",r);var{width:r,height:n,x:a,y:s}=SX(t,e),i=(Hc(t,n,r,i),AX(a,s,r,n,e));t.attr("viewBox",i),M.debug(`viewBox configured: ${i} with padding: `+e)},"setupViewPortForSVG"),SX=me((t,e)=>({width:(t=t.node()?.getBBox()||{width:0,height:0,x:0,y:0}).width+2*e,height:t.height+2*e,x:t.x,y:t.y}),"calculateDimensionsWithPadding"),AX=me((t,e,r,i,n)=>t-n+` ${e-n} ${r} `+i,"createViewBox")}),UX=t(()=>{Z3(),fu(),e(),qM(),zX(),GX(),KE(),LX=me(function(t,e){return e.db.getClasses()},"getClasses"),NX=me(async function(t,e,r,i){M.info("REF0:"),M.info("Drawing state diagram (v2)",e);let{securityLevel:n,flowchart:a,layout:s}=D(),o;"sandbox"===n&&(o=j("#i"+e));var l,c="sandbox"===n?o.nodes()[0].contentDocument:document,h=(M.debug("Before getData: "),i.db.getData()),u=(M.debug("Data: ",h),NM(e,n)),d=i.db.getDirection(),d=(h.type=i.type,h.layoutAlgorithm=CX(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=e,M.debug("REF1:",h),await EX(h,u),h.config.flowchart?.diagramPadding??8);YE.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,i.db.getDiagramTitle()),_X(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=j(`#${e} [id="${l.id}"]`);if(p&&l.link){let t=c.createElementNS("http://www.w3.org/2000/svg","a"),e=(t.setAttributeNS("http://www.w3.org/2000/svg","class",l.cssClasses),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===n?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):l.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",l.linkTarget),p.insert(function(){return t},":first-child")),r=p.select(".label-container"),i=(r&&e.append(function(){return r.node()}),p.select(".label"));i&&e.append(function(){return i.node()})}}},"draw"),IX={getClasses:LX,draw:NX}}),qX=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),B=[1,4],F=[1,3],$=[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],e=[1,49],r=[1,48],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],tt=[1,33],i=[1,44],n=[1,46],a=[1,42],s=[1,47],o=[1,43],l=[1,50],c=[1,45],h=[1,51],u=[1,52],et=[1,34],rt=[1,35],it=[1,36],nt=[1,37],at=[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],st=[8,9,11,75,77,78],ot=[1,78],lt=[1,91],ct=[1,96],ht=[1,95],ut=[1,92],dt=[1,88],pt=[1,94],gt=[1,90],ft=[1,97],mt=[1,93],yt=[1,98],vt=[1,89],xt=[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],bt=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],wt=[44,60,89,102,105,106,109,111,114,115,116],kt=[1,121],Tt=[1,122],Et=[1,124],Ct=[1,123],_t=[44,60,62,74,89,102,105,106,109,111,114,115,116],St=[1,133],At=[1,147],Lt=[1,148],Nt=[1,149],It=[1,150],Rt=[1,135],Mt=[1,137],Dt=[1,141],Ot=[1,142],Pt=[1,143],Bt=[1,144],Ft=[1,145],$t=[1,146],zt=[1,151],Gt=[1,152],Ut=[1,131],qt=[1,132],jt=[1,139],Wt=[1,134],Yt=[1,138],Ht=[1,136],Vt=[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],Xt=[1,154],Kt=[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],Zt=[77,116,119],_=[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],Qt=[10,106],Jt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],S=[1,247],A=[1,245],L=[1,249],N=[1,243],I=[1,244],R=[1,246],M=[1,248],D=[1,250],te=[1,268],ee=[8,9,11,106],O=[8,9,10,11,60,84,105,106,109,110,111,112],B={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0{var t=i.edges().map(async function(t){var e=i.edge(t.v,t.w,t.name);M.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),M.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(i.edge(t))),M.info("Fix",nX,"ids:",t.v,t.w,"Translating: ",nX.get(t.v),nX.get(t.w)),await lD(r,e)});await Promise.all(t)},"processEdges")(),M.info("Graph before layout:",JSON.stringify(tX(i))),M.info("############################################# XXX"),M.info("### Layout ### XXX"),M.info("############################################# XXX"),_V(i),M.info("Graph after layout:",JSON.stringify(tX(i))),0),p=RM(l).subGraphTitleTotalMargin;return await Promise.all(yX(i).map(async function(t){var e,r=i.node(t);M.info("Position XBX => "+t+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,M.info("A tainted cluster node XBX1",t,r.id,r.width,r.height,r.x,r.y,i.parent(t)),nX.get(r.id).node=r,zD(r)):0 "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),i.node(t.v)),t=i.node(t.w),r=fD(h,e,nX,a,r,t,s);cD(e,r)}),i.nodes().forEach(function(t){var e=i.node(t);M.info(t,e.type,e.diff),e.isGroup&&(d=e.diff)}),M.warn("Returning from recursive render XAX",t,d),{elem:t,diff:d}},"recursiveRender"),kX=me(async(t,e)=>{let l=new FW({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=e.select("g");MD(r,t.markers,t.type,t.diagramId),$D(),sD(),GM(),sX(),t.nodes.forEach(t=>{l.setNode(t.id,{...t}),t.parentId&&l.setParent(t.id,t.parentId)}),M.debug("Edges:",t.edges),t.edges.forEach(t=>{var e,r,n,i,a,s,o;t.start===t.end?(r=(e=t.start)+"---"+e+"---1",n=e+"---"+e+"---2",i=l.node(e),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(t),s=structuredClone(t),o=structuredClone(t),a.label="",a.arrowTypeEnd="none",a.id=e+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=e+"-cyclic-special-mid",o.label="",i.isGroup&&(a.fromCluster=e,o.toCluster=e),o.id=e+"-cyclic-special-2",o.arrowTypeStart="none",l.setEdge(e,r,a,e+"-cyclic-special-0"),l.setEdge(r,n,s,e+"-cyclic-special-1"),l.setEdge(n,e,o,e+"-cyc{qD(),e(),TX={},EX=me(t=>{for(var e of t)TX[e.name]=e},"registerLayoutLoaders"),me(()=>{EX([{name:"dagre",loader:me(async()=>Promise.resolve().then(()=>(GX(),bX)),"loader")}])},"registerDefaultLayoutLoaders")(),CX=me(async(t,e)=>{var r;if(t.layoutAlgorithm in TX)return(await(r=TX[t.layoutAlgorithm]).loader()).render(t,e,GD,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm)},"render"),_X=me((t="",{fallback:e="dagre"}={})=>{if(t in TX)return t;if(e in TX)return M.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")}),qX=t(()=>{eh(),e(),SX=me((t,e,r,n)=>{t.attr("class",r);var{width:r,height:i,x:a,y:s}=AX(t,e),n=(Vc(t,i,r,n),LX(a,s,r,i,e));t.attr("viewBox",n),M.debug(`viewBox configured: ${n} with padding: `+e)},"setupViewPortForSVG"),AX=me((t,e)=>({width:(t=t.node()?.getBBox()||{width:0,height:0,x:0,y:0}).width+2*e,height:t.height+2*e,x:t.x,y:t.y}),"calculateDimensionsWithPadding"),LX=me((t,e,r,n,i)=>t-i+` ${e-i} ${r} `+n,"createViewBox")}),jX=t(()=>{Q3(),mu(),e(),jM(),UX(),qX(),ZE(),NX=me(function(t,e){return e.db.getClasses()},"getClasses"),IX=me(async function(t,e,r,n){M.info("REF0:"),M.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=D(),o;"sandbox"===i&&(o=H("#i"+e));var l,c="sandbox"===i?o.nodes()[0].contentDocument:document,h=(M.debug("Before getData: "),n.db.getData()),u=(M.debug("Data: ",h),IM(e,i)),d=n.db.getDirection(),d=(h.type=n.type,h.layoutAlgorithm=_X(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=e,M.debug("REF1:",h),await CX(h,u),h.config.flowchart?.diagramPadding??8);HE.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),SX(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=H(`#${e} [id="${l.id}"]`);if(p&&l.link){let t=c.createElementNS("http://www.w3.org/2000/svg","a"),e=(t.setAttributeNS("http://www.w3.org/2000/svg","class",l.cssClasses),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):l.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",l.linkTarget),p.insert(function(){return t},":first-child")),r=p.select(".label-container"),n=(r&&e.append(function(){return r.node()}),p.select(".label"));n&&e.append(function(){return n.node()})}}},"draw"),RX={getClasses:NX,draw:IX}}),WX=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),B=[1,4],F=[1,3],$=[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],e=[1,49],r=[1,48],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],tt=[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],et=[1,34],rt=[1,35],nt=[1,36],it=[1,37],at=[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],st=[8,9,11,75,77,78],ot=[1,78],lt=[1,91],ct=[1,96],ht=[1,95],ut=[1,92],dt=[1,88],pt=[1,94],gt=[1,90],ft=[1,97],mt=[1,93],yt=[1,98],vt=[1,89],xt=[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],bt=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],wt=[44,60,89,102,105,106,109,111,114,115,116],kt=[1,121],Tt=[1,122],Et=[1,124],Ct=[1,123],_t=[44,60,62,74,89,102,105,106,109,111,114,115,116],St=[1,133],At=[1,147],Lt=[1,148],Nt=[1,149],It=[1,150],Rt=[1,135],Mt=[1,137],Dt=[1,141],Ot=[1,142],Pt=[1,143],Bt=[1,144],Ft=[1,145],$t=[1,146],zt=[1,151],Gt=[1,152],Ut=[1,131],qt=[1,132],jt=[1,139],Wt=[1,134],Yt=[1,138],Ht=[1,136],Vt=[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],Xt=[1,154],Kt=[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],Zt=[77,116,119],_=[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],Qt=[10,106],Jt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],S=[1,247],A=[1,245],L=[1,249],N=[1,243],I=[1,244],R=[1,246],M=[1,248],D=[1,250],te=[1,268],ee=[8,9,11,106],O=[8,9,10,11,60,84,105,106,109,110,111,112],B={trace:me(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:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0"),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 t.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=F,me(P,"Parser"),(RX=new((P.prototype=B).Parser=P)).parser=RX,MX=RX}),jX=t(()=>{qX(),(DX=Object.assign({},MX)).parse=t=>(t=t.replace(/}\s*\n/g,`} -`),MX.parse(t)),OX=DX}),WX=t(()=>{mi(),PX=me((t,e)=>{var r=(n=Pe)(t,"r"),i=n(t,"g"),n=n(t,"b");return De(r,i,n,e)},"fade"),BX=me(t=>`.label { +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0"),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 t.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=F,me(P,"Parser"),(MX=new((P.prototype=B).Parser=P)).parser=MX,DX=MX}),YX=t(()=>{WX(),(OX=Object.assign({},DX)).parse=t=>(t=t.replace(/}\s*\n/g,`} +`),DX.parse(t)),PX=OX}),HX=t(()=>{BX=me(()=>` + /* 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")}),VX=t(()=>{vn(),HX(),FX=me((t,e)=>{var r=(i=Be)(t,"r"),n=i(t,"g"),i=i(t,"b");return Oe(r,n,i,e)},"fade"),$X=me(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } @@ -564,7 +578,7 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l /* For html labels only */ .labelBkg { - background-color: ${PX(t.edgeLabelBackground,.5)}; + background-color: ${FX(t.edgeLabelBackground,.5)}; // background-color: } @@ -623,12 +637,13 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l } text-align: center; } -`,"getStyles"),FX=BX}),YX={};lPt(YX,{diagram:()=>HX});var HX,VX,XX,KX,ZX=t(()=>{fu(),UM(),UX(),jX(),WX(),HX={parser:OX,get db(){return new LM},renderer:IX,styles:FX,init:me(t=>{t.flowchart||(t.flowchart={}),t.layout&&mh({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,mh({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}}),QX=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],i=[1,10],n=[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],_=[1,58],S=[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],F=[63,64,65,66,67],$=[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],i={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 1:break;case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.addEntity(a[o-4]),i.addEntity(a[o-2]),i.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:i.addEntity(a[o-8]),i.addEntity(a[o-4]),i.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),i.setClass([a[o-8]],a[o-6]),i.setClass([a[o-4]],a[o-2]);break;case 10:i.addEntity(a[o-6]),i.addEntity(a[o-2]),i.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),i.setClass([a[o-6]],a[o-4]);break;case 11:i.addEntity(a[o-6]),i.addEntity(a[o-4]),i.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),i.setClass([a[o-4]],a[o-2]);break;case 12:i.addEntity(a[o-3]),i.addAttributes(a[o-3],a[o-1]);break;case 13:i.addEntity(a[o-5]),i.addAttributes(a[o-5],a[o-1]),i.setClass([a[o-5]],a[o-3]);break;case 14:i.addEntity(a[o-2]);break;case 15:i.addEntity(a[o-4]),i.setClass([a[o-4]],a[o-2]);break;case 16:i.addEntity(a[o]);break;case 17:i.addEntity(a[o-2]),i.setClass([a[o-2]],a[o]);break;case 18:i.addEntity(a[o-6],a[o-4]),i.addAttributes(a[o-6],a[o-1]);break;case 19:i.addEntity(a[o-8],a[o-6]),i.addAttributes(a[o-8],a[o-1]),i.setClass([a[o-8]],a[o-3]);break;case 20:i.addEntity(a[o-5],a[o-3]);break;case 21:i.addEntity(a[o-7],a[o-5]),i.setClass([a[o-7]],a[o-2]);break;case 22:i.addEntity(a[o-3],a[o-1]);break;case 23:i.addEntity(a[o-5],a[o-3]),i.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:i.setDirection("TB");break;case 33:i.setDirection("BT");break;case 34:i.setDirection("RL");break;case 35:i.setDirection("LR");break;case 36:this.$=a[o-3],i.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 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],i.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],i.addCssStyles(a[o-2],a[o-1]);break;case 43:this.$=[a[o]];break;case 44:a[o-2].push(a[o]),this.$=a[o-2];break;case 46:this.$=a[o-1]+a[o];break;case 54:case 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.$=i.Cardinality.ZERO_OR_ONE;break;case 70:this.$=i.Cardinality.ZERO_OR_MORE;break;case 71:this.$=i.Cardinality.ONE_OR_MORE;break;case 72:this.$=i.Cardinality.ONLY_ONE;break;case 73:this.$=i.Cardinality.MD_PARENT;break;case 74:this.$=i.Identification.NON_IDENTIFYING;break;case 75:this.$=i.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:n,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:27,11:9,22:i,24:n,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},e(r,[2,5]),e(r,[2,6]),e(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]},e(r,[2,27]),e(r,[2,28]),e(r,[2,29]),e(r,[2,30]),e(r,[2,31]),e(B,[2,54]),e(B,[2,55]),e(r,[2,32]),e(r,[2,33]),e(r,[2,34]),e(r,[2,35]),{16:41,40:b,41:w},{16:44,40:b,41:w},{16:45,40:b,41:w},e(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]},e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),{13:E,38:57,41:C,42:_,45:59,46:60,48:S,49:A},e(L,[2,37]),e(L,[2,38]),{16:65,40:b,41:w,42:_},{13:E,38:66,41:C,42:_,45:59,46:60,48:S,49:A},{13:[1,67],15:[1,68]},e(r,[2,17],{61:32,12:69,17:[1,70],42:_,63:f,64:m,65:y,66:v,67:x}),{19:[1,71]},e(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},e(F,[2,74]),e(F,[2,75]),{6:$,10:z,39:77,42:G,47:U},{40:[1,82],41:[1,83]},e(q,[2,43],{46:84,13:E,41:C,48:S,49:A}),e(N,[2,45]),e(N,[2,50]),e(N,[2,51]),e(N,[2,52]),e(N,[2,53]),e(r,[2,41],{42:_}),{6:$,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},e(r,[2,12]),{19:[2,57]},e(D,[2,58],{54:94,55:95,57:96,59:j,60:W}),e([19,56,59,60],[2,63]),e(r,[2,22],{15:[1,100],17:[1,99]}),e([40,50],[2,68]),e(r,[2,36]),{13:E,41:C,45:101,46:60,48:S,49:A},e(r,[2,47]),e(r,[2,48]),e(r,[2,49]),e(L,[2,39]),e(L,[2,40]),e(N,[2,46]),e(r,[2,42]),e(r,[2,8]),e(r,[2,76]),e(r,[2,77]),e(r,[2,78]),{13:[1,102],42:_},{13:[1,104],15:[1,103]},{19:[1,105]},e(r,[2,15]),e(D,[2,59],{55:106,58:[1,107],60:W}),e(D,[2,60]),e(O,[2,64]),e(D,[2,67]),e(O,[2,66]),{18:108,19:[1,109],51:50,52:51,56:k},{16:110,40:b,41:w},e(q,[2,44],{46:84,13:E,41:C,48:S,49:A}),{14:111,40:I,50:R,70:M},{16:112,40:b,41:w},{14:113,40:I,50:R,70:M},e(r,[2,13]),e(D,[2,61]),{57:114,59:j},{19:[1,115]},e(r,[2,20]),e(r,[2,23],{17:[1,116],42:_}),e(r,[2,11]),{13:[1,117],42:_},e(r,[2,10]),e(O,[2,65]),e(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]},e(r,[2,21]),e(r,[2,9]),e(r,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"KX});var KX,ZX,QX,JX,tK=t(()=>{mu(),qM(),jX(),YX(),VX(),KX={parser:PX,get db(){return new NM},renderer:RX,styles:zX,init:me(t=>{t.flowchart||(t.flowchart={}),t.layout&&yh({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,yh({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}}),eK=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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],_=[1,58],S=[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],F=[63,64,65,66,67],$=[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:me(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:me(function(t,e,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]},e(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},e(r,[2,7],{1:[2,1]}),e(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},e(r,[2,5]),e(r,[2,6]),e(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]},e(r,[2,27]),e(r,[2,28]),e(r,[2,29]),e(r,[2,30]),e(r,[2,31]),e(B,[2,54]),e(B,[2,55]),e(r,[2,32]),e(r,[2,33]),e(r,[2,34]),e(r,[2,35]),{16:41,40:b,41:w},{16:44,40:b,41:w},{16:45,40:b,41:w},e(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]},e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),{13:E,38:57,41:C,42:_,45:59,46:60,48:S,49:A},e(L,[2,37]),e(L,[2,38]),{16:65,40:b,41:w,42:_},{13:E,38:66,41:C,42:_,45:59,46:60,48:S,49:A},{13:[1,67],15:[1,68]},e(r,[2,17],{61:32,12:69,17:[1,70],42:_,63:f,64:m,65:y,66:v,67:x}),{19:[1,71]},e(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},e(F,[2,74]),e(F,[2,75]),{6:$,10:z,39:77,42:G,47:U},{40:[1,82],41:[1,83]},e(q,[2,43],{46:84,13:E,41:C,48:S,49:A}),e(N,[2,45]),e(N,[2,50]),e(N,[2,51]),e(N,[2,52]),e(N,[2,53]),e(r,[2,41],{42:_}),{6:$,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},e(r,[2,12]),{19:[2,57]},e(D,[2,58],{54:94,55:95,57:96,59:j,60:W}),e([19,56,59,60],[2,63]),e(r,[2,22],{15:[1,100],17:[1,99]}),e([40,50],[2,68]),e(r,[2,36]),{13:E,41:C,45:101,46:60,48:S,49:A},e(r,[2,47]),e(r,[2,48]),e(r,[2,49]),e(L,[2,39]),e(L,[2,40]),e(N,[2,46]),e(r,[2,42]),e(r,[2,8]),e(r,[2,76]),e(r,[2,77]),e(r,[2,78]),{13:[1,102],42:_},{13:[1,104],15:[1,103]},{19:[1,105]},e(r,[2,15]),e(D,[2,59],{55:106,58:[1,107],60:W}),e(D,[2,60]),e(O,[2,64]),e(D,[2,67]),e(O,[2,66]),{18:108,19:[1,109],51:50,52:51,56:k},{16:110,40:b,41:w},e(q,[2,44],{46:84,13:E,41:C,48:S,49:A}),{14:111,40:I,50:R,70:M},{16:112,40:b,41:w},{14:113,40:I,50:R,70:M},e(r,[2,13]),e(D,[2,61]),{57:114,59:j},{19:[1,115]},e(r,[2,20]),e(r,[2,23],{17:[1,116],42:_}),e(r,[2,11]),{13:[1,117],42:_},e(r,[2,10]),e(O,[2,65]),e(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]},e(r,[2,21]),e(r,[2,9]),e(r,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{e(),fu(),gu(),KE(),KX=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=lh,this.getAccTitle=ch,this.setAccDescription=hh,this.getAccDescription=uh,this.setDiagramTitle=dh,this.getDiagramTitle=ph,this.getConfig=me(()=>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{me(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,M.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-`+this.entities.size,label:t,attributes:[],alias:e,shape:"erBox",look:D().look??"default",cssClasses:"default",cssStyles:[]}),M.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let r=this.addEntity(t),i;for(i=e.length-1;0<=i;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),r.attributes.push(e[i]),M.debug("Added attribute ",e[i].name)}addRelationship(t,e,r,i){t=this.entities.get(t),r=this.entities.get(r),t&&r&&(t={entityA:t.id,roleA:e,entityB:r.id,relSpec:i},this.relationships.push(t),M.debug("Added new relationship :",t))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(var r of t)(r=this.classes.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}addCssStyles(t,e){for(var r of t){var i,n=this.entities.get(r);if(!e||!n)return;for(i of e)n.cssStyles.push(i)}}addClass(t,e){t.forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),e&&e.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})}setClass(t,e){for(var r of t){var i=this.entities.get(r);if(i)for(var n of e)i.cssClasses+=" "+n}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],oh()}getData(){var t,e,r=[],i=[],n=D();for(t of this.entities.keys()){var a=this.entities.get(t);a&&(a.cssCompiledStyles=this.getCompiledStyles(a.cssClasses.split(" ")),r.push(a))}let s=0;for(e of this.relationships){var o={id:XE(e.entityA,e.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:e.entityA,end:e.entityB,label:e.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==e.relSpec.relType?"solid":"dashed",look:n.look};i.push(o)}return{nodes:r,edges:i,other:{},config:n,direction:"TB"}}}}),tK={};lPt(tK,{draw:()=>eK});var eK,rK,iK,nK,aK=t(()=>{fu(),e(),qM(),zX(),GX(),KE(),Z3(),eK=me(async function(t,e,r,i){M.info("REF0:"),M.info("Drawing er diagram (unified)",e);let{securityLevel:n,er:a,layout:s}=D(),o=i.db.getData(),l=NM(e,n);o.type=i.type,o.layoutAlgorithm=CX(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=i.db.getDirection(),o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=e,await EX(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),e=l.selectAll('[id*="-background"]'),0{mi(),rK=me((t,e)=>{var r=(n=Pe)(t,"r"),i=n(t,"g"),n=n(t,"b");return De(r,i,n,e)},"fade"),iK=me(t=>` +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{e(),mu(),fu(),ZE(),JX=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=ch,this.getAccTitle=hh,this.setAccDescription=uh,this.getAccDescription=dh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,this.getConfig=me(()=>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{me(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,M.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-`+this.entities.size,label:t,attributes:[],alias:e,shape:"erBox",look:D().look??"default",cssClasses:"default",cssStyles:[]}),M.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let r=this.addEntity(t),n;for(n=e.length-1;0<=n;n--)e[n].keys||(e[n].keys=[]),e[n].comment||(e[n].comment=""),r.attributes.push(e[n]),M.debug("Added attribute ",e[n].name)}addRelationship(t,e,r,n){t=this.entities.get(t),r=this.entities.get(r),t&&r&&(t={entityA:t.id,roleA:e,entityB:r.id,relSpec:n},this.relationships.push(t),M.debug("Added new relationship :",t))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(var r of t)(r=this.classes.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}addCssStyles(t,e){for(var r of t){var n,i=this.entities.get(r);if(!e||!i)return;for(n of e)i.cssStyles.push(n)}}addClass(t,e){t.forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),e&&e.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})}setClass(t,e){for(var r of t){var n=this.entities.get(r);if(n)for(var i of e)n.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],lh()}getData(){var t,e,r=[],n=[],i=D();for(t of this.entities.keys()){var a=this.entities.get(t);a&&(a.cssCompiledStyles=this.getCompiledStyles(a.cssClasses.split(" ")),r.push(a))}let s=0;for(e of this.relationships){var o={id:KE(e.entityA,e.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:e.entityA,end:e.entityB,label:e.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==e.relSpec.relType?"solid":"dashed",look:i.look};n.push(o)}return{nodes:r,edges:n,other:{},config:i,direction:"TB"}}}}),nK={};oPt(nK,{draw:()=>iK});var iK,aK,sK,oK,lK=t(()=>{mu(),e(),jM(),UX(),qX(),ZE(),Q3(),iK=me(async function(t,e,r,n){M.info("REF0:"),M.info("Drawing er diagram (unified)",e);let{securityLevel:i,er:a,layout:s}=D(),o=n.db.getData(),l=IM(e,i);o.type=n.type,o.layoutAlgorithm=_X(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=e,await CX(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),e=l.selectAll('[id*="-background"]'),0{vn(),aK=me((t,e)=>{var r=(i=Be)(t,"r"),n=i(t,"g"),i=i(t,"b");return Oe(r,n,i,e)},"fade"),sK=me(t=>` .entityBox { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; @@ -644,7 +659,7 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l } .labelBkg { - background-color: ${rK(t.tertiaryColor,.5)}; + background-color: ${aK(t.tertiaryColor,.5)}; } .edgeLabel .label { @@ -682,84 +697,84 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l stroke: ${t.lineColor} !important; stroke-width: 1; } -`,"getStyles"),nK=iK}),oK={};lPt(oK,{diagram:()=>lK});var lK,cK=t(()=>{QX(),JX(),aK(),sK(),lK={parser:XX,get db(){return new KX},renderer:tK,styles:nK}});function hK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function uK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function dK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function pK(t){return"object"==typeof t&&null!==t&&hK(t.container)&&uK(t.reference)&&"string"==typeof t.message}function gK(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function fK(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function mK(t){return gK(t)&&"string"==typeof t.fullText}var yK,vK=t(()=>{me(hK,"isAstNode"),me(uK,"isReference"),me(dK,"isAstNodeDescription"),me(pK,"isLinkingError"),yK=class{static{me(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return hK(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){var r,i;return t===e||(void 0!==(i=(r=(r=this.subtypes[t])||(this.subtypes[t]={}))[e])?i:(i=this.computeIsSubtype(t,e),r[e]=i))}getAllSubTypes(t){var e=this.allSubtypes[t];if(e)return e;var r,i=[];for(r of this.getAllTypes())this.isSubtype(r,t)&&i.push(r);return this.allSubtypes[t]=i}},me(gK,"isCompositeCstNode"),me(fK,"isLeafCstNode"),me(mK,"isRootCstNode")});function xK(t){return"string"==typeof t?t:"u"e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new kK(()=>({index:0}),t=>t.index({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){var e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex{function t(t){return t.reduce((t,e)=>t+e,0)}function e(t){return t.reduce((t,e)=>t*e,0)}function r(t){return t.reduce((t,e)=>Math.min(t,e))}function i(t){return t.reduce((t,e)=>Math.max(t,e))}var n;kK=class a{static{me(this,"StreamImpl")}constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){let t={state:this.startFn(),next:me(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),e=0,r=t.next();for(;!r.done;)e++,r=t.next();return e}toArray(){for(var t,e=[],r=this.iterator();void 0!==(t=r.next()).value&&e.push(t.value),!t.done;);return e}toSet(){return new Set(this)}toMap(e,r){var t=this.map(t=>[e?e(t):t,r?r(t):t]);return new Map(t)}toString(){return this.join()}concat(t){return new a(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),t=>{let e;if(!t.firstDone){do{if(!(e=this.nextFn(t.first)).done)return e}while(!e.done);t.firstDone=!0}do{if(!(e=t.iterator.next()).done)return e}while(!e.done);return EK})}join(t=","){let e=this.iterator(),r="",i,n=!1;for(;(i=e.next()).done||(n&&(r+=t),r+=xK(i.value)),n=!0,!i.done;);return r}indexOf(t,e=0){let r=this.iterator(),i=0,n=r.next();for(;!n.done;){if(i>=e&&n.value===t)return i;n=r.next(),i++}return-1}every(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(!t(r.value))return!1;r=e.next()}return!0}some(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return!0;r=e.next()}return!1}forEach(t){let e=this.iterator(),r=0,i=e.next();for(;!i.done;)t(i.value,r),i=e.next(),r++}map(r){return new a(this.startFn,t=>{var{done:t,value:e}=this.nextFn(t);return t?EK:{done:!1,value:r(e)}})}filter(r){return new a(this.startFn,t=>{var e;do{if(!(e=this.nextFn(t)).done&&r(e.value))return e}while(!e.done);return EK})}nonNullable(){return this.filter(t=>null!=t)}reduce(t,e){let r=this.iterator(),i=e,n=r.next();for(;!n.done;)i=void 0===i?n.value:t(i,n.value),n=r.next();return i}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,r){var i=t.next();return i.done?r:void 0===(t=this.recursiveReduce(t,e,r))?i.value:e(t,i.value)}find(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return r.value;r=e.next()}}findIndex(t){let e=this.iterator(),r=0,i=e.next();for(;!i.done;){if(t(i.value))return r;i=e.next(),r++}return-1}includes(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(r.value===t)return!0;r=e.next()}return!1}flatMap(i){return new a(()=>({this:this.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=this.nextFn(t.this);if(!e){if(!bK(r=i(r)))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return EK})}flat(t){if((t=void 0===t?1:t)<=0)return this;let i=1({this:i.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=i.nextFn(t.this);if(!e){if(!bK(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return EK})}head(){var t=this.iterator().next();if(!t.done)return t.value}tail(r=1){return new a(()=>{var e=this.startFn();for(let t=0;t({size:0,state:this.startFn()}),t=>(t.size++,e({set:new Set,internalState:this.startFn()}),t=>{var e;do{if(!(e=this.nextFn(t.internalState)).done){var r=i?i(e.value):e.value;if(!t.set.has(r))return t.set.add(r),e}}while(!e.done);return EK})}exclude(t,e){let r=new Set;for(var i of t)i=e?e(i):i,r.add(i);return this.filter(t=>(t=e?e(t):t,!r.has(t)))}},me(xK,"toString"),me(bK,"isIterable"),TK=new kK(()=>{},()=>EK),EK=Object.freeze({done:!0,value:void 0}),me(wK,"stream"),CK=class extends kK{static{me(this,"TreeStreamImpl")}constructor(t,r,e){super(()=>({iterators:e?.includeRoot?[[t][Symbol.iterator]()]:[r(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&(t.iterators.pop(),t.pruned=!1);0this.nextFn(t.state),"next"),prune:me(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}},n=_K=_K||{},me(t,"sum"),n.sum=t,me(e,"product"),n.product=e,me(r,"min"),n.min=r,me(i,"max"),n.max=i}),AK={};function LK(t){return new CK(t,t=>gK(t)?t.content:[],{includeRoot:!0})}function NK(t){return LK(t).filter(fK)}function IK(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function RK(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function MK(t){var e,r;if(t)return{offset:t,end:e,range:r}=t,{range:r,offset:t,end:e,length:e-t}}function DK(t,e){var r;return t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character?VK.After:(r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,t=t.end.lineVK.After}function PK(t,e,r=XK){var i;if(t)return 0!t.hidden)-1;0<=t;t--){var i=e.content[t];if(FK(i,r))return i}}}function FK(t,e){return fK(t)&&e.includes(t.tokenType.name)}function $K(t,e){return fK(t)?t:gK(t)&&(t=GK(t,e,!1))?$K(t,e):void 0}function zK(t,e){return fK(t)?t:gK(t)&&(t=GK(t,e,!0))?zK(t,e):void 0}function GK(t,e,r){let i=0,n=t.content.length-1,a;for(;i<=n;){var s=Math.floor((i+n)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(a=r?o:void 0,i=s+1):n=s-1}return a}function UK(r,i=!0){for(;r.container;){let t=r.container,e=t.content.indexOf(r);for(;0XK,RangeComparison:()=>VK,compareRange:()=>DK,findCommentNode:()=>BK,findDeclarationNodeAtOffset:()=>PK,findLeafNodeAtOffset:()=>$K,findLeafNodeBeforeOffset:()=>zK,flattenCst:()=>NK,getInteriorNodes:()=>WK,getNextNode:()=>qK,getPreviousNode:()=>UK,getStartlineNode:()=>jK,inRange:()=>OK,isChildNode:()=>IK,isCommentNode:()=>FK,streamCst:()=>LK,toDocumentSegment:()=>MK,tokenToRange:()=>RK});var VK,XK,KK=t(()=>{var t;vK(),SK(),me(LK,"streamCst"),me(NK,"flattenCst"),me(IK,"isChildNode"),me(RK,"tokenToRange"),me(MK,"toDocumentSegment"),(t=VK=VK||{})[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside",me(DK,"compareRange"),me(OK,"inRange"),XK=/^[\w\p{L}]$/u,me(PK,"findDeclarationNodeAtOffset"),me(BK,"findCommentNode"),me(FK,"isCommentNode"),me($K,"findLeafNodeAtOffset"),me(zK,"findLeafNodeBeforeOffset"),me(GK,"binarySearch"),me(UK,"getPreviousNode"),me(qK,"getNextNode"),me(jK,"getStartlineNode"),me(WK,"getInteriorNodes"),me(YK,"getCommonParent"),me(HK,"getParentChain")});function ZK(t){throw new Error("Error! The input value was not handled.")}var QK,JK=t(()=>{QK=class extends Error{static{me(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:`+t.range.start.character:e)}},me(ZK,"assertUnreachable")}),tZ={};function eZ(t){return qQ.isInstance(t,KZ)}function rZ(t){return qQ.isInstance(t,ZZ)}function iZ(t){return qQ.isInstance(t,QZ)}function nZ(t){return aZ(t)||"current"===t||"entry"===t||"extends"===t||"false"===t||"fragment"===t||"grammar"===t||"hidden"===t||"import"===t||"interface"===t||"returns"===t||"terminal"===t||"true"===t||"type"===t||"infer"===t||"infers"===t||"with"===t||"string"==typeof t&&/\^?[_a-zA-Z][\w_]*/.test(t)}function aZ(t){return"string"===t||"number"===t||"boolean"===t||"Date"===t||"bigint"===t}function sZ(t){return qQ.isInstance(t,JZ)}function oZ(t){return qQ.isInstance(t,tQ)}function lZ(t){return qQ.isInstance(t,eQ)}function cZ(t){return qQ.isInstance(t,rQ)}function hZ(t){return qQ.isInstance(t,iQ)}function uZ(t){return qQ.isInstance(t,nQ)}function dZ(t){return qQ.isInstance(t,aQ)}function pZ(t){return qQ.isInstance(t,sQ)}function gZ(t){return qQ.isInstance(t,oQ)}function fZ(t){return qQ.isInstance(t,lQ)}function mZ(t){return qQ.isInstance(t,cQ)}function yZ(t){return qQ.isInstance(t,hQ)}function vZ(t){return qQ.isInstance(t,uQ)}function xZ(t){return qQ.isInstance(t,dQ)}function bZ(t){return qQ.isInstance(t,pQ)}function wZ(t){return qQ.isInstance(t,gQ)}function kZ(t){return qQ.isInstance(t,fQ)}function TZ(t){return qQ.isInstance(t,mQ)}function EZ(t){return qQ.isInstance(t,yQ)}function CZ(t){return qQ.isInstance(t,vQ)}function _Z(t){return qQ.isInstance(t,xQ)}function SZ(t){return qQ.isInstance(t,bQ)}function AZ(t){return qQ.isInstance(t,wQ)}function LZ(t){return qQ.isInstance(t,kQ)}function NZ(t){return qQ.isInstance(t,TQ)}function IZ(t){return qQ.isInstance(t,EQ)}function RZ(t){return qQ.isInstance(t,CQ)}function MZ(t){return qQ.isInstance(t,_Q)}function DZ(t){return qQ.isInstance(t,SQ)}function OZ(t){return qQ.isInstance(t,AQ)}function PZ(t){return qQ.isInstance(t,LQ)}function BZ(t){return qQ.isInstance(t,NQ)}function FZ(t){return qQ.isInstance(t,IQ)}function $Z(t){return qQ.isInstance(t,RQ)}function zZ(t){return qQ.isInstance(t,MQ)}function GZ(t){return qQ.isInstance(t,DQ)}function UZ(t){return qQ.isInstance(t,OQ)}function qZ(t){return qQ.isInstance(t,PQ)}function jZ(t){return qQ.isInstance(t,BQ)}function WZ(t){return qQ.isInstance(t,FQ)}function YZ(t){return qQ.isInstance(t,$Q)}function HZ(t){return qQ.isInstance(t,zQ)}function VZ(t){return qQ.isInstance(t,GQ)}lPt(tZ,{AbstractElement:()=>eQ,AbstractRule:()=>KZ,AbstractType:()=>ZZ,Action:()=>CQ,Alternatives:()=>_Q,ArrayLiteral:()=>rQ,ArrayType:()=>iQ,Assignment:()=>SQ,BooleanLiteral:()=>nQ,CharacterRange:()=>AQ,Condition:()=>QZ,Conjunction:()=>aQ,CrossReference:()=>LQ,Disjunction:()=>sQ,EndOfFile:()=>NQ,Grammar:()=>oQ,GrammarImport:()=>lQ,Group:()=>IQ,InferredType:()=>cQ,Interface:()=>hQ,Keyword:()=>RQ,LangiumGrammarAstReflection:()=>UQ,LangiumGrammarTerminals:()=>XZ,NamedArgument:()=>uQ,NegatedToken:()=>MQ,Negation:()=>dQ,NumberLiteral:()=>pQ,Parameter:()=>gQ,ParameterReference:()=>fQ,ParserRule:()=>mQ,ReferenceType:()=>yQ,RegexToken:()=>DQ,ReturnType:()=>vQ,RuleCall:()=>OQ,SimpleType:()=>xQ,StringLiteral:()=>bQ,TerminalAlternatives:()=>PQ,TerminalGroup:()=>BQ,TerminalRule:()=>wQ,TerminalRuleCall:()=>FQ,Type:()=>kQ,TypeAttribute:()=>TQ,TypeDefinition:()=>JZ,UnionType:()=>EQ,UnorderedGroup:()=>$Q,UntilToken:()=>zQ,ValueLiteral:()=>tQ,Wildcard:()=>GQ,isAbstractElement:()=>lZ,isAbstractRule:()=>eZ,isAbstractType:()=>rZ,isAction:()=>RZ,isAlternatives:()=>MZ,isArrayLiteral:()=>cZ,isArrayType:()=>hZ,isAssignment:()=>DZ,isBooleanLiteral:()=>uZ,isCharacterRange:()=>OZ,isCondition:()=>iZ,isConjunction:()=>dZ,isCrossReference:()=>PZ,isDisjunction:()=>pZ,isEndOfFile:()=>BZ,isFeatureName:()=>nZ,isGrammar:()=>gZ,isGrammarImport:()=>fZ,isGroup:()=>FZ,isInferredType:()=>mZ,isInterface:()=>yZ,isKeyword:()=>$Z,isNamedArgument:()=>vZ,isNegatedToken:()=>zZ,isNegation:()=>xZ,isNumberLiteral:()=>bZ,isParameter:()=>wZ,isParameterReference:()=>kZ,isParserRule:()=>TZ,isPrimitiveType:()=>aZ,isReferenceType:()=>EZ,isRegexToken:()=>GZ,isReturnType:()=>CZ,isRuleCall:()=>UZ,isSimpleType:()=>_Z,isStringLiteral:()=>SZ,isTerminalAlternatives:()=>qZ,isTerminalGroup:()=>jZ,isTerminalRule:()=>AZ,isTerminalRuleCall:()=>WZ,isType:()=>LZ,isTypeAttribute:()=>NZ,isTypeDefinition:()=>sZ,isUnionType:()=>IZ,isUnorderedGroup:()=>YZ,isUntilToken:()=>HZ,isValueLiteral:()=>oZ,isWildcard:()=>VZ,reflection:()=>qQ});var XZ,KZ,ZZ,QZ,JZ,tQ,eQ,rQ,iQ,nQ,aQ,sQ,oQ,lQ,cQ,hQ,uQ,dQ,pQ,gQ,fQ,mQ,yQ,vQ,xQ,bQ,wQ,kQ,TQ,EQ,CQ,_Q,SQ,AQ,LQ,NQ,IQ,RQ,MQ,DQ,OQ,PQ,BQ,FQ,$Q,zQ,GQ,UQ,qQ,jQ=t(()=>{vK(),XZ={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]*/},KZ="AbstractRule",me(eZ,"isAbstractRule"),ZZ="AbstractType",me(rZ,"isAbstractType"),QZ="Condition",me(iZ,"isCondition"),me(nZ,"isFeatureName"),me(aZ,"isPrimitiveType"),JZ="TypeDefinition",me(sZ,"isTypeDefinition"),tQ="ValueLiteral",me(oZ,"isValueLiteral"),eQ="AbstractElement",me(lZ,"isAbstractElement"),rQ="ArrayLiteral",me(cZ,"isArrayLiteral"),iQ="ArrayType",me(hZ,"isArrayType"),nQ="BooleanLiteral",me(uZ,"isBooleanLiteral"),aQ="Conjunction",me(dZ,"isConjunction"),sQ="Disjunction",me(pZ,"isDisjunction"),oQ="Grammar",me(gZ,"isGrammar"),lQ="GrammarImport",me(fZ,"isGrammarImport"),cQ="InferredType",me(mZ,"isInferredType"),hQ="Interface",me(yZ,"isInterface"),uQ="NamedArgument",me(vZ,"isNamedArgument"),dQ="Negation",me(xZ,"isNegation"),pQ="NumberLiteral",me(bZ,"isNumberLiteral"),gQ="Parameter",me(wZ,"isParameter"),fQ="ParameterReference",me(kZ,"isParameterReference"),mQ="ParserRule",me(TZ,"isParserRule"),yQ="ReferenceType",me(EZ,"isReferenceType"),vQ="ReturnType",me(CZ,"isReturnType"),xQ="SimpleType",me(_Z,"isSimpleType"),bQ="StringLiteral",me(SZ,"isStringLiteral"),wQ="TerminalRule",me(AZ,"isTerminalRule"),kQ="Type",me(LZ,"isType"),TQ="TypeAttribute",me(NZ,"isTypeAttribute"),EQ="UnionType",me(IZ,"isUnionType"),CQ="Action",me(RZ,"isAction"),_Q="Alternatives",me(MZ,"isAlternatives"),SQ="Assignment",me(DZ,"isAssignment"),AQ="CharacterRange",me(OZ,"isCharacterRange"),LQ="CrossReference",me(PZ,"isCrossReference"),NQ="EndOfFile",me(BZ,"isEndOfFile"),IQ="Group",me(FZ,"isGroup"),RQ="Keyword",me($Z,"isKeyword"),MQ="NegatedToken",me(zZ,"isNegatedToken"),DQ="RegexToken",me(GZ,"isRegexToken"),OQ="RuleCall",me(UZ,"isRuleCall"),PQ="TerminalAlternatives",me(qZ,"isTerminalAlternatives"),BQ="TerminalGroup",me(jZ,"isTerminalGroup"),FQ="TerminalRuleCall",me(WZ,"isTerminalRuleCall"),$Q="UnorderedGroup",me(YZ,"isUnorderedGroup"),zQ="UntilToken",me(HZ,"isUntilToken"),GQ="Wildcard",me(VZ,"isWildcard"),UQ=class extends yK{static{me(this,"LangiumGrammarAstReflection")}getAllTypes(){return[eQ,KZ,ZZ,CQ,_Q,rQ,iQ,SQ,nQ,AQ,QZ,aQ,LQ,sQ,NQ,oQ,lQ,IQ,cQ,hQ,RQ,uQ,MQ,dQ,pQ,gQ,fQ,mQ,yQ,DQ,vQ,OQ,xQ,bQ,PQ,BQ,wQ,FQ,kQ,TQ,JZ,EQ,$Q,zQ,tQ,GQ]}computeIsSubtype(t,e){switch(t){case CQ:case _Q:case SQ:case AQ:case LQ:case NQ:case IQ:case RQ:case MQ:case DQ:case OQ:case PQ:case BQ:case FQ:case $Q:case zQ:case GQ:return this.isSubtype(eQ,e);case rQ:case pQ:case bQ:return this.isSubtype(tQ,e);case iQ:case yQ:case xQ:case EQ:return this.isSubtype(JZ,e);case nQ:return this.isSubtype(QZ,e)||this.isSubtype(tQ,e);case aQ:case sQ:case dQ:case fQ:return this.isSubtype(QZ,e);case cQ:case hQ:case kQ:return this.isSubtype(ZZ,e);case mQ:return this.isSubtype(KZ,e)||this.isSubtype(ZZ,e);case wQ:return this.isSubtype(KZ,e);default:return!1}}getReferenceType(t){var e=t.container.$type+":"+t.property;switch(e){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return ZZ;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return KZ;case"Grammar:usedGrammars":return oQ;case"NamedArgument:parameter":case"ParameterReference:parameter":return gQ;case"TerminalRuleCall:rule":return wQ;default:throw new Error(e+" is not a valid reference id.")}}getTypeMetaData(t){switch(t){case eQ:return{name:eQ,properties:[{name:"cardinality"},{name:"lookahead"}]};case rQ:return{name:rQ,properties:[{name:"elements",defaultValue:[]}]};case iQ:return{name:iQ,properties:[{name:"elementType"}]};case nQ:return{name:nQ,properties:[{name:"true",defaultValue:!1}]};case aQ:return{name:aQ,properties:[{name:"left"},{name:"right"}]};case sQ:return{name:sQ,properties:[{name:"left"},{name:"right"}]};case oQ:return{name:oQ,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 lQ:return{name:lQ,properties:[{name:"path"}]};case cQ:return{name:cQ,properties:[{name:"name"}]};case hQ:return{name:hQ,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case uQ:return{name:uQ,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case dQ:return{name:dQ,properties:[{name:"value"}]};case pQ:return{name:pQ,properties:[{name:"value"}]};case gQ:return{name:gQ,properties:[{name:"name"}]};case fQ:return{name:fQ,properties:[{name:"parameter"}]};case mQ:return{name:mQ,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 yQ:return{name:yQ,properties:[{name:"referenceType"}]};case vQ:return{name:vQ,properties:[{name:"name"}]};case xQ:return{name:xQ,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case bQ:return{name:bQ,properties:[{name:"value"}]};case wQ:return{name:wQ,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case kQ:return{name:kQ,properties:[{name:"name"},{name:"type"}]};case TQ:return{name:TQ,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case EQ:return{name:EQ,properties:[{name:"types",defaultValue:[]}]};case CQ:return{name:CQ,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case _Q:return{name:_Q,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case SQ:return{name:SQ,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case AQ:return{name:AQ,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case LQ:return{name:LQ,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case NQ:return{name:NQ,properties:[{name:"cardinality"},{name:"lookahead"}]};case IQ:return{name:IQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case RQ:return{name:RQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case MQ:return{name:MQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case DQ:return{name:DQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case OQ:return{name:OQ,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case PQ:return{name:PQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case BQ:return{name:BQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case FQ:return{name:FQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case $Q:return{name:$Q,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case zQ:return{name:zQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case GQ:return{name:GQ,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:t,properties:[]}}}},qQ=new UQ}),WQ={};function YQ(i){for(let[r,t]of Object.entries(i))r.startsWith("$")||(Array.isArray(t)?t.forEach((t,e)=>{hK(t)&&(t.$container=i,t.$containerProperty=r,t.$containerIndex=e)}):hK(t)&&(t.$container=i,t.$containerProperty=r))}function HQ(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function VQ(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function XQ(t){if(t=KQ(t).$document)return t;throw new Error("AST node has no document.")}function KQ(t){for(;t.$container;)t=t.$container;return t}function ZQ(n,t){if(!n)throw new Error("Node must be an AstNode.");let a=t?.range;return new kK(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexZQ(t,e));throw new Error("Root node must be an AstNode.")}function JQ(t,e){if(t)return e?.range&&!tJ(t,e.range)?new CK(t,()=>[]):new CK(t,t=>ZQ(t,e),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function tJ(t,e){return!e||!!(t=null==(t=t.$cstNode)?void 0:t.range)&&OK(t,e)}function eJ(a){return new kK(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex{eJ(t).forEach(t=>{t.reference.ref===e&&r.push(t.reference)})}),wK(r)}function iJ(t,e){var r,i=e;for(r of t.getTypeMetaData(e.$type).properties)void 0!==r.defaultValue&&void 0===i[r.name]&&(i[r.name]=nJ(r.defaultValue))}function nJ(t){return Array.isArray(t)?[...t.map(nJ)]:t}function aJ(t,e){var r,i,n={$type:t.$type};for([r,i]of Object.entries(t))if(!r.startsWith("$"))if(hK(i))n[r]=aJ(i,e);else if(uK(i))n[r]=e(n,r,i.$refNode,i.$refText);else if(Array.isArray(i)){var a,s=[];for(a of i)hK(a)?s.push(aJ(a,e)):uK(a)?s.push(e(n,r,a.$refNode,a.$refText)):s.push(a);n[r]=s}else n[r]=i;return YQ(n),n}lPt(WQ,{assignMandatoryProperties:()=>iJ,copyAstNode:()=>aJ,findLocalReferences:()=>rJ,findRootNode:()=>KQ,getContainerOfType:()=>HQ,getDocument:()=>XQ,hasContainerOfType:()=>VQ,linkContentToContainer:()=>YQ,streamAllContents:()=>QQ,streamAst:()=>JQ,streamContents:()=>ZQ,streamReferences:()=>eJ});var sJ=t(()=>{vK(),SK(),KK(),me(YQ,"linkContentToContainer"),me(HQ,"getContainerOfType"),me(VQ,"hasContainerOfType"),me(XQ,"getDocument"),me(KQ,"findRootNode"),me(ZQ,"streamContents"),me(QQ,"streamAllContents"),me(JQ,"streamAst"),me(tJ,"isAstNodeInRange"),me(eJ,"streamReferences"),me(rJ,"findLocalReferences"),me(iJ,"assignMandatoryProperties"),me(nJ,"copyDefaultValue"),me(aJ,"copyAstNode")});function oJ(t){return t.charCodeAt(0)}function lJ(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function cJ(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function hJ(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function uJ(){throw Error("Internal Error - Should never get here!")}function dJ(t){return"Character"===t.type}var pJ,gJ,fJ,mJ,yJ,vJ,xJ,bJ,wJ=t(()=>{me(oJ,"cc"),me(lJ,"insertToSet"),me(cJ,"addFlag"),me(hJ,"ASSERT_EXISTS"),me(uJ,"ASSERT_NEVER_REACH_HERE"),me(dJ,"isCharacter")}),kJ=t(()=>{wJ(),pJ=[];for(let t=oJ("0");t<=oJ("9");t++)pJ.push(t);gJ=[oJ("_")].concat(pJ);for(let t=oJ("a");t<=oJ("z");t++)gJ.push(t);for(let t=oJ("A");t<=oJ("Z");t++)gJ.push(t);fJ=[oJ(" "),oJ("\f"),oJ(` -`),oJ("\r"),oJ("\t"),oJ("\v"),oJ("\t"),oJ(" "),oJ(" "),oJ(" "),oJ(" "),oJ(" "),oJ(" "),oJ(" "),oJ(" "),oJ(" "),oJ(" "),oJ(" "),oJ(" "),oJ(" "),oJ("\u2028"),oJ("\u2029"),oJ(" "),oJ(" "),oJ(" "),oJ("\ufeff")]}),TJ=t(()=>{wJ(),kJ(),mJ=/[0-9a-fA-F]/,yJ=/[0-9]/,vJ=/[1-9]/,xJ=class{static{me(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");for(var e=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":cJ(r,"global");break;case"i":cJ(r,"ignoreCase");break;case"m":cJ(r,"multiLine");break;case"u":cJ(r,"unicode");break;case"y":cJ(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:e,loc:this.loc(0)}}disjunction(){var t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){for(var t=[],e=this.idx;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}hJ(t);var r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return uJ()}quantifier(t=!1){let e,r=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":var i=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:i,atMost:i};break;case",":e=this.isDigit()?{atLeast:i,atMost:this.integerIncludingZero()}:{atLeast:i,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;hJ(e)}if((!0!==t||void 0!==e)&&hJ(e))return"?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(r),e}atom(){let t,e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return hJ(t=void 0===t&&this.isPatternCharacter()?this.patternCharacter():t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):uJ()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[oJ(` -`),oJ("\r"),oJ("\u2028"),oJ("\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 t,e=!1;switch(this.popChar()){case"d":t=pJ;break;case"D":t=pJ,e=!0;break;case"s":t=fJ;break;case"S":t=fJ,e=!0;break;case"w":t=gJ;break;case"W":t=gJ,e=!0}return hJ(t)?{type:"Set",value:t,complement:e}:uJ()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=oJ("\f");break;case"n":t=oJ(` -`);break;case"r":t=oJ("\r");break;case"t":t=oJ("\t");break;case"v":t=oJ("\v")}return hJ(t)?{type:"Character",value:t}:uJ()}controlLetterEscapeAtom(){this.consumeChar("c");var t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:oJ("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:oJ(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` -`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:oJ(this.popChar())}}}characterClass(){let t=[],e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,dJ(r)&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom();if(i.type,dJ(i)){if(i.valueuK});var uK,dK=t(()=>{eK(),rK(),lK(),cK(),uK={parser:QX,get db(){return new JX},renderer:nK,styles:oK}});function pK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function gK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function fK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function mK(t){return"object"==typeof t&&null!==t&&pK(t.container)&&gK(t.reference)&&"string"==typeof t.message}function yK(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function vK(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function xK(t){return yK(t)&&"string"==typeof t.fullText}var bK,wK=t(()=>{me(pK,"isAstNode"),me(gK,"isReference"),me(fK,"isAstNodeDescription"),me(mK,"isLinkingError"),bK=class{static{me(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return pK(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){var r,n;return t===e||(void 0!==(n=(r=(r=this.subtypes[t])||(this.subtypes[t]={}))[e])?n:(n=this.computeIsSubtype(t,e),r[e]=n))}getAllSubTypes(t){var e=this.allSubtypes[t];if(e)return e;var r,n=[];for(r of this.getAllTypes())this.isSubtype(r,t)&&n.push(r);return this.allSubtypes[t]=n}},me(yK,"isCompositeCstNode"),me(vK,"isLeafCstNode"),me(xK,"isRootCstNode")});function kK(t){return"string"==typeof t?t:"u"e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new CK(()=>({index:0}),t=>t.index({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){var e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex{function t(t){return t.reduce((t,e)=>t+e,0)}function e(t){return t.reduce((t,e)=>t*e,0)}function r(t){return t.reduce((t,e)=>Math.min(t,e))}function n(t){return t.reduce((t,e)=>Math.max(t,e))}var i;CK=class a{static{me(this,"StreamImpl")}constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){let t={state:this.startFn(),next:me(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),e=0,r=t.next();for(;!r.done;)e++,r=t.next();return e}toArray(){for(var t,e=[],r=this.iterator();void 0!==(t=r.next()).value&&e.push(t.value),!t.done;);return e}toSet(){return new Set(this)}toMap(e,r){var t=this.map(t=>[e?e(t):t,r?r(t):t]);return new Map(t)}toString(){return this.join()}concat(t){return new a(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),t=>{let e;if(!t.firstDone){do{if(!(e=this.nextFn(t.first)).done)return e}while(!e.done);t.firstDone=!0}do{if(!(e=t.iterator.next()).done)return e}while(!e.done);return SK})}join(t=","){let e=this.iterator(),r="",n,i=!1;for(;(n=e.next()).done||(i&&(r+=t),r+=kK(n.value)),i=!0,!n.done;);return r}indexOf(t,e=0){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(n>=e&&i.value===t)return n;i=r.next(),n++}return-1}every(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(!t(r.value))return!1;r=e.next()}return!0}some(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return!0;r=e.next()}return!1}forEach(t){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)t(n.value,r),n=e.next(),r++}map(r){return new a(this.startFn,t=>{var{done:t,value:e}=this.nextFn(t);return t?SK:{done:!1,value:r(e)}})}filter(r){return new a(this.startFn,t=>{var e;do{if(!(e=this.nextFn(t)).done&&r(e.value))return e}while(!e.done);return SK})}nonNullable(){return this.filter(t=>null!=t)}reduce(t,e){let r=this.iterator(),n=e,i=r.next();for(;!i.done;)n=void 0===n?i.value:t(n,i.value),i=r.next();return n}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,r){var n=t.next();return n.done?r:void 0===(t=this.recursiveReduce(t,e,r))?n.value:e(t,n.value)}find(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return r.value;r=e.next()}}findIndex(t){let e=this.iterator(),r=0,n=e.next();for(;!n.done;){if(t(n.value))return r;n=e.next(),r++}return-1}includes(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(r.value===t)return!0;r=e.next()}return!1}flatMap(n){return new a(()=>({this:this.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=this.nextFn(t.this);if(!e){if(!TK(r=n(r)))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return SK})}flat(t){if((t=void 0===t?1:t)<=0)return this;let n=1({this:n.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=n.nextFn(t.this);if(!e){if(!TK(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return SK})}head(){var t=this.iterator().next();if(!t.done)return t.value}tail(r=1){return new a(()=>{var e=this.startFn();for(let t=0;t({size:0,state:this.startFn()}),t=>(t.size++,e({set:new Set,internalState:this.startFn()}),t=>{var e;do{if(!(e=this.nextFn(t.internalState)).done){var r=n?n(e.value):e.value;if(!t.set.has(r))return t.set.add(r),e}}while(!e.done);return SK})}exclude(t,e){let r=new Set;for(var n of t)n=e?e(n):n,r.add(n);return this.filter(t=>(t=e?e(t):t,!r.has(t)))}},me(kK,"toString"),me(TK,"isIterable"),_K=new CK(()=>{},()=>SK),SK=Object.freeze({done:!0,value:void 0}),me(EK,"stream"),AK=class extends CK{static{me(this,"TreeStreamImpl")}constructor(t,r,e){super(()=>({iterators:e?.includeRoot?[[t][Symbol.iterator]()]:[r(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&(t.iterators.pop(),t.pruned=!1);0this.nextFn(t.state),"next"),prune:me(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}},i=LK=LK||{},me(t,"sum"),i.sum=t,me(e,"product"),i.product=e,me(r,"min"),i.min=r,me(n,"max"),i.max=n}),IK={};function RK(t){return new AK(t,t=>yK(t)?t.content:[],{includeRoot:!0})}function MK(t){return RK(t).filter(vK)}function DK(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function OK(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function PK(t){var e,r;if(t)return{offset:t,end:e,range:r}=t,{range:r,offset:t,end:e,length:e-t}}function BK(t,e){var r;return t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character?ZK.After:(r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,t=t.end.lineZK.After}function $K(t,e,r=QK){var n;if(t)return 0!t.hidden)-1;0<=t;t--){var n=e.content[t];if(GK(n,r))return n}}}function GK(t,e){return vK(t)&&e.includes(t.tokenType.name)}function UK(t,e){return vK(t)?t:yK(t)&&(t=jK(t,e,!1))?UK(t,e):void 0}function qK(t,e){return vK(t)?t:yK(t)&&(t=jK(t,e,!0))?qK(t,e):void 0}function jK(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){var s=Math.floor((n+i)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(a=r?o:void 0,n=s+1):i=s-1}return a}function WK(r,n=!0){for(;r.container;){let t=r.container,e=t.content.indexOf(r);for(;0QK,RangeComparison:()=>ZK,compareRange:()=>BK,findCommentNode:()=>zK,findDeclarationNodeAtOffset:()=>$K,findLeafNodeAtOffset:()=>UK,findLeafNodeBeforeOffset:()=>qK,flattenCst:()=>MK,getInteriorNodes:()=>VK,getNextNode:()=>YK,getPreviousNode:()=>WK,getStartlineNode:()=>HK,inRange:()=>FK,isChildNode:()=>DK,isCommentNode:()=>GK,streamCst:()=>RK,toDocumentSegment:()=>PK,tokenToRange:()=>OK});var ZK,QK,JK=t(()=>{var t;wK(),NK(),me(RK,"streamCst"),me(MK,"flattenCst"),me(DK,"isChildNode"),me(OK,"tokenToRange"),me(PK,"toDocumentSegment"),(t=ZK=ZK||{})[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside",me(BK,"compareRange"),me(FK,"inRange"),QK=/^[\w\p{L}]$/u,me($K,"findDeclarationNodeAtOffset"),me(zK,"findCommentNode"),me(GK,"isCommentNode"),me(UK,"findLeafNodeAtOffset"),me(qK,"findLeafNodeBeforeOffset"),me(jK,"binarySearch"),me(WK,"getPreviousNode"),me(YK,"getNextNode"),me(HK,"getStartlineNode"),me(VK,"getInteriorNodes"),me(XK,"getCommonParent"),me(KK,"getParentChain")});function tZ(t){throw new Error("Error! The input value was not handled.")}var eZ,rZ=t(()=>{eZ=class extends Error{static{me(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:`+t.range.start.character:e)}},me(tZ,"assertUnreachable")}),nZ={};function iZ(t){return YQ.isInstance(t,JZ)}function aZ(t){return YQ.isInstance(t,tQ)}function sZ(t){return YQ.isInstance(t,eQ)}function oZ(t){return lZ(t)||"current"===t||"entry"===t||"extends"===t||"false"===t||"fragment"===t||"grammar"===t||"hidden"===t||"import"===t||"interface"===t||"returns"===t||"terminal"===t||"true"===t||"type"===t||"infer"===t||"infers"===t||"with"===t||"string"==typeof t&&/\^?[_a-zA-Z][\w_]*/.test(t)}function lZ(t){return"string"===t||"number"===t||"boolean"===t||"Date"===t||"bigint"===t}function cZ(t){return YQ.isInstance(t,rQ)}function hZ(t){return YQ.isInstance(t,nQ)}function uZ(t){return YQ.isInstance(t,iQ)}function dZ(t){return YQ.isInstance(t,aQ)}function pZ(t){return YQ.isInstance(t,sQ)}function gZ(t){return YQ.isInstance(t,oQ)}function fZ(t){return YQ.isInstance(t,lQ)}function mZ(t){return YQ.isInstance(t,cQ)}function yZ(t){return YQ.isInstance(t,hQ)}function vZ(t){return YQ.isInstance(t,uQ)}function xZ(t){return YQ.isInstance(t,dQ)}function bZ(t){return YQ.isInstance(t,pQ)}function wZ(t){return YQ.isInstance(t,gQ)}function kZ(t){return YQ.isInstance(t,fQ)}function TZ(t){return YQ.isInstance(t,mQ)}function EZ(t){return YQ.isInstance(t,yQ)}function CZ(t){return YQ.isInstance(t,vQ)}function _Z(t){return YQ.isInstance(t,xQ)}function SZ(t){return YQ.isInstance(t,bQ)}function AZ(t){return YQ.isInstance(t,wQ)}function LZ(t){return YQ.isInstance(t,kQ)}function NZ(t){return YQ.isInstance(t,TQ)}function IZ(t){return YQ.isInstance(t,EQ)}function RZ(t){return YQ.isInstance(t,CQ)}function MZ(t){return YQ.isInstance(t,_Q)}function DZ(t){return YQ.isInstance(t,SQ)}function OZ(t){return YQ.isInstance(t,AQ)}function PZ(t){return YQ.isInstance(t,LQ)}function BZ(t){return YQ.isInstance(t,NQ)}function FZ(t){return YQ.isInstance(t,IQ)}function $Z(t){return YQ.isInstance(t,RQ)}function zZ(t){return YQ.isInstance(t,MQ)}function GZ(t){return YQ.isInstance(t,DQ)}function UZ(t){return YQ.isInstance(t,OQ)}function qZ(t){return YQ.isInstance(t,PQ)}function jZ(t){return YQ.isInstance(t,BQ)}function WZ(t){return YQ.isInstance(t,FQ)}function YZ(t){return YQ.isInstance(t,$Q)}function HZ(t){return YQ.isInstance(t,zQ)}function VZ(t){return YQ.isInstance(t,GQ)}function XZ(t){return YQ.isInstance(t,UQ)}function KZ(t){return YQ.isInstance(t,qQ)}function ZZ(t){return YQ.isInstance(t,jQ)}oPt(nZ,{AbstractElement:()=>iQ,AbstractRule:()=>JZ,AbstractType:()=>tQ,Action:()=>AQ,Alternatives:()=>LQ,ArrayLiteral:()=>aQ,ArrayType:()=>sQ,Assignment:()=>NQ,BooleanLiteral:()=>oQ,CharacterRange:()=>IQ,Condition:()=>eQ,Conjunction:()=>lQ,CrossReference:()=>RQ,Disjunction:()=>cQ,EndOfFile:()=>MQ,Grammar:()=>hQ,GrammarImport:()=>uQ,Group:()=>DQ,InferredType:()=>dQ,Interface:()=>pQ,Keyword:()=>OQ,LangiumGrammarAstReflection:()=>WQ,LangiumGrammarTerminals:()=>QZ,NamedArgument:()=>gQ,NegatedToken:()=>PQ,Negation:()=>fQ,NumberLiteral:()=>mQ,Parameter:()=>yQ,ParameterReference:()=>vQ,ParserRule:()=>xQ,ReferenceType:()=>bQ,RegexToken:()=>BQ,ReturnType:()=>wQ,RuleCall:()=>FQ,SimpleType:()=>kQ,StringLiteral:()=>TQ,TerminalAlternatives:()=>$Q,TerminalGroup:()=>zQ,TerminalRule:()=>EQ,TerminalRuleCall:()=>GQ,Type:()=>CQ,TypeAttribute:()=>_Q,TypeDefinition:()=>rQ,UnionType:()=>SQ,UnorderedGroup:()=>UQ,UntilToken:()=>qQ,ValueLiteral:()=>nQ,Wildcard:()=>jQ,isAbstractElement:()=>uZ,isAbstractRule:()=>iZ,isAbstractType:()=>aZ,isAction:()=>OZ,isAlternatives:()=>PZ,isArrayLiteral:()=>dZ,isArrayType:()=>pZ,isAssignment:()=>BZ,isBooleanLiteral:()=>gZ,isCharacterRange:()=>FZ,isCondition:()=>sZ,isConjunction:()=>fZ,isCrossReference:()=>$Z,isDisjunction:()=>mZ,isEndOfFile:()=>zZ,isFeatureName:()=>oZ,isGrammar:()=>yZ,isGrammarImport:()=>vZ,isGroup:()=>GZ,isInferredType:()=>xZ,isInterface:()=>bZ,isKeyword:()=>UZ,isNamedArgument:()=>wZ,isNegatedToken:()=>qZ,isNegation:()=>kZ,isNumberLiteral:()=>TZ,isParameter:()=>EZ,isParameterReference:()=>CZ,isParserRule:()=>_Z,isPrimitiveType:()=>lZ,isReferenceType:()=>SZ,isRegexToken:()=>jZ,isReturnType:()=>AZ,isRuleCall:()=>WZ,isSimpleType:()=>LZ,isStringLiteral:()=>NZ,isTerminalAlternatives:()=>YZ,isTerminalGroup:()=>HZ,isTerminalRule:()=>IZ,isTerminalRuleCall:()=>VZ,isType:()=>RZ,isTypeAttribute:()=>MZ,isTypeDefinition:()=>cZ,isUnionType:()=>DZ,isUnorderedGroup:()=>XZ,isUntilToken:()=>KZ,isValueLiteral:()=>hZ,isWildcard:()=>ZZ,reflection:()=>YQ});var QZ,JZ,tQ,eQ,rQ,nQ,iQ,aQ,sQ,oQ,lQ,cQ,hQ,uQ,dQ,pQ,gQ,fQ,mQ,yQ,vQ,xQ,bQ,wQ,kQ,TQ,EQ,CQ,_Q,SQ,AQ,LQ,NQ,IQ,RQ,MQ,DQ,OQ,PQ,BQ,FQ,$Q,zQ,GQ,UQ,qQ,jQ,WQ,YQ,HQ=t(()=>{wK(),QZ={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]*/},JZ="AbstractRule",me(iZ,"isAbstractRule"),tQ="AbstractType",me(aZ,"isAbstractType"),eQ="Condition",me(sZ,"isCondition"),me(oZ,"isFeatureName"),me(lZ,"isPrimitiveType"),rQ="TypeDefinition",me(cZ,"isTypeDefinition"),nQ="ValueLiteral",me(hZ,"isValueLiteral"),iQ="AbstractElement",me(uZ,"isAbstractElement"),aQ="ArrayLiteral",me(dZ,"isArrayLiteral"),sQ="ArrayType",me(pZ,"isArrayType"),oQ="BooleanLiteral",me(gZ,"isBooleanLiteral"),lQ="Conjunction",me(fZ,"isConjunction"),cQ="Disjunction",me(mZ,"isDisjunction"),hQ="Grammar",me(yZ,"isGrammar"),uQ="GrammarImport",me(vZ,"isGrammarImport"),dQ="InferredType",me(xZ,"isInferredType"),pQ="Interface",me(bZ,"isInterface"),gQ="NamedArgument",me(wZ,"isNamedArgument"),fQ="Negation",me(kZ,"isNegation"),mQ="NumberLiteral",me(TZ,"isNumberLiteral"),yQ="Parameter",me(EZ,"isParameter"),vQ="ParameterReference",me(CZ,"isParameterReference"),xQ="ParserRule",me(_Z,"isParserRule"),bQ="ReferenceType",me(SZ,"isReferenceType"),wQ="ReturnType",me(AZ,"isReturnType"),kQ="SimpleType",me(LZ,"isSimpleType"),TQ="StringLiteral",me(NZ,"isStringLiteral"),EQ="TerminalRule",me(IZ,"isTerminalRule"),CQ="Type",me(RZ,"isType"),_Q="TypeAttribute",me(MZ,"isTypeAttribute"),SQ="UnionType",me(DZ,"isUnionType"),AQ="Action",me(OZ,"isAction"),LQ="Alternatives",me(PZ,"isAlternatives"),NQ="Assignment",me(BZ,"isAssignment"),IQ="CharacterRange",me(FZ,"isCharacterRange"),RQ="CrossReference",me($Z,"isCrossReference"),MQ="EndOfFile",me(zZ,"isEndOfFile"),DQ="Group",me(GZ,"isGroup"),OQ="Keyword",me(UZ,"isKeyword"),PQ="NegatedToken",me(qZ,"isNegatedToken"),BQ="RegexToken",me(jZ,"isRegexToken"),FQ="RuleCall",me(WZ,"isRuleCall"),$Q="TerminalAlternatives",me(YZ,"isTerminalAlternatives"),zQ="TerminalGroup",me(HZ,"isTerminalGroup"),GQ="TerminalRuleCall",me(VZ,"isTerminalRuleCall"),UQ="UnorderedGroup",me(XZ,"isUnorderedGroup"),qQ="UntilToken",me(KZ,"isUntilToken"),jQ="Wildcard",me(ZZ,"isWildcard"),WQ=class extends bK{static{me(this,"LangiumGrammarAstReflection")}getAllTypes(){return[iQ,JZ,tQ,AQ,LQ,aQ,sQ,NQ,oQ,IQ,eQ,lQ,RQ,cQ,MQ,hQ,uQ,DQ,dQ,pQ,OQ,gQ,PQ,fQ,mQ,yQ,vQ,xQ,bQ,BQ,wQ,FQ,kQ,TQ,$Q,zQ,EQ,GQ,CQ,_Q,rQ,SQ,UQ,qQ,nQ,jQ]}computeIsSubtype(t,e){switch(t){case AQ:case LQ:case NQ:case IQ:case RQ:case MQ:case DQ:case OQ:case PQ:case BQ:case FQ:case $Q:case zQ:case GQ:case UQ:case qQ:case jQ:return this.isSubtype(iQ,e);case aQ:case mQ:case TQ:return this.isSubtype(nQ,e);case sQ:case bQ:case kQ:case SQ:return this.isSubtype(rQ,e);case oQ:return this.isSubtype(eQ,e)||this.isSubtype(nQ,e);case lQ:case cQ:case fQ:case vQ:return this.isSubtype(eQ,e);case dQ:case pQ:case CQ:return this.isSubtype(tQ,e);case xQ:return this.isSubtype(JZ,e)||this.isSubtype(tQ,e);case EQ:return this.isSubtype(JZ,e);default:return!1}}getReferenceType(t){var e=t.container.$type+":"+t.property;switch(e){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return tQ;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return JZ;case"Grammar:usedGrammars":return hQ;case"NamedArgument:parameter":case"ParameterReference:parameter":return yQ;case"TerminalRuleCall:rule":return EQ;default:throw new Error(e+" is not a valid reference id.")}}getTypeMetaData(t){switch(t){case iQ:return{name:iQ,properties:[{name:"cardinality"},{name:"lookahead"}]};case aQ:return{name:aQ,properties:[{name:"elements",defaultValue:[]}]};case sQ:return{name:sQ,properties:[{name:"elementType"}]};case oQ:return{name:oQ,properties:[{name:"true",defaultValue:!1}]};case lQ:return{name:lQ,properties:[{name:"left"},{name:"right"}]};case cQ:return{name:cQ,properties:[{name:"left"},{name:"right"}]};case hQ:return{name:hQ,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 uQ:return{name:uQ,properties:[{name:"path"}]};case dQ:return{name:dQ,properties:[{name:"name"}]};case pQ:return{name:pQ,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case gQ:return{name:gQ,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case fQ:return{name:fQ,properties:[{name:"value"}]};case mQ:return{name:mQ,properties:[{name:"value"}]};case yQ:return{name:yQ,properties:[{name:"name"}]};case vQ:return{name:vQ,properties:[{name:"parameter"}]};case xQ:return{name:xQ,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 bQ:return{name:bQ,properties:[{name:"referenceType"}]};case wQ:return{name:wQ,properties:[{name:"name"}]};case kQ:return{name:kQ,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case TQ:return{name:TQ,properties:[{name:"value"}]};case EQ:return{name:EQ,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case CQ:return{name:CQ,properties:[{name:"name"},{name:"type"}]};case _Q:return{name:_Q,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case SQ:return{name:SQ,properties:[{name:"types",defaultValue:[]}]};case AQ:return{name:AQ,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case LQ:return{name:LQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case NQ:return{name:NQ,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case IQ:return{name:IQ,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case RQ:return{name:RQ,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case MQ:return{name:MQ,properties:[{name:"cardinality"},{name:"lookahead"}]};case DQ:return{name:DQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case OQ:return{name:OQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case PQ:return{name:PQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case BQ:return{name:BQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case FQ:return{name:FQ,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case $Q:return{name:$Q,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case zQ:return{name:zQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case GQ:return{name:GQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case UQ:return{name:UQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case qQ:return{name:qQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case jQ:return{name:jQ,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:t,properties:[]}}}},YQ=new WQ}),VQ={};function XQ(n){for(let[r,t]of Object.entries(n))r.startsWith("$")||(Array.isArray(t)?t.forEach((t,e)=>{pK(t)&&(t.$container=n,t.$containerProperty=r,t.$containerIndex=e)}):pK(t)&&(t.$container=n,t.$containerProperty=r))}function KQ(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function ZQ(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function QQ(t){if(t=JQ(t).$document)return t;throw new Error("AST node has no document.")}function JQ(t){for(;t.$container;)t=t.$container;return t}function tJ(i,t){if(!i)throw new Error("Node must be an AstNode.");let a=t?.range;return new CK(()=>({keys:Object.keys(i),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndextJ(t,e));throw new Error("Root node must be an AstNode.")}function rJ(t,e){if(t)return e?.range&&!nJ(t,e.range)?new AK(t,()=>[]):new AK(t,t=>tJ(t,e),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function nJ(t,e){return!e||!!(t=null==(t=t.$cstNode)?void 0:t.range)&&FK(t,e)}function iJ(a){return new CK(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex{iJ(t).forEach(t=>{t.reference.ref===e&&r.push(t.reference)})}),EK(r)}function sJ(t,e){var r,n=e;for(r of t.getTypeMetaData(e.$type).properties)void 0!==r.defaultValue&&void 0===n[r.name]&&(n[r.name]=oJ(r.defaultValue))}function oJ(t){return Array.isArray(t)?[...t.map(oJ)]:t}function lJ(t,e){var r,n,i={$type:t.$type};for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(pK(n))i[r]=lJ(n,e);else if(gK(n))i[r]=e(i,r,n.$refNode,n.$refText);else if(Array.isArray(n)){var a,s=[];for(a of n)pK(a)?s.push(lJ(a,e)):gK(a)?s.push(e(i,r,a.$refNode,a.$refText)):s.push(a);i[r]=s}else i[r]=n;return XQ(i),i}oPt(VQ,{assignMandatoryProperties:()=>sJ,copyAstNode:()=>lJ,findLocalReferences:()=>aJ,findRootNode:()=>JQ,getContainerOfType:()=>KQ,getDocument:()=>QQ,hasContainerOfType:()=>ZQ,linkContentToContainer:()=>XQ,streamAllContents:()=>eJ,streamAst:()=>rJ,streamContents:()=>tJ,streamReferences:()=>iJ});var cJ=t(()=>{wK(),NK(),JK(),me(XQ,"linkContentToContainer"),me(KQ,"getContainerOfType"),me(ZQ,"hasContainerOfType"),me(QQ,"getDocument"),me(JQ,"findRootNode"),me(tJ,"streamContents"),me(eJ,"streamAllContents"),me(rJ,"streamAst"),me(nJ,"isAstNodeInRange"),me(iJ,"streamReferences"),me(aJ,"findLocalReferences"),me(sJ,"assignMandatoryProperties"),me(oJ,"copyDefaultValue"),me(lJ,"copyAstNode")});function hJ(t){return t.charCodeAt(0)}function uJ(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function dJ(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function pJ(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function gJ(){throw Error("Internal Error - Should never get here!")}function fJ(t){return"Character"===t.type}var mJ,yJ,vJ,xJ,bJ,wJ,kJ,TJ,EJ=t(()=>{me(hJ,"cc"),me(uJ,"insertToSet"),me(dJ,"addFlag"),me(pJ,"ASSERT_EXISTS"),me(gJ,"ASSERT_NEVER_REACH_HERE"),me(fJ,"isCharacter")}),CJ=t(()=>{EJ(),mJ=[];for(let t=hJ("0");t<=hJ("9");t++)mJ.push(t);yJ=[hJ("_")].concat(mJ);for(let t=hJ("a");t<=hJ("z");t++)yJ.push(t);for(let t=hJ("A");t<=hJ("Z");t++)yJ.push(t);vJ=[hJ(" "),hJ("\f"),hJ(` +`),hJ("\r"),hJ("\t"),hJ("\v"),hJ("\t"),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ("\u2028"),hJ("\u2029"),hJ(" "),hJ(" "),hJ(" "),hJ("\ufeff")]}),_J=t(()=>{EJ(),CJ(),xJ=/[0-9a-fA-F]/,bJ=/[0-9]/,wJ=/[1-9]/,kJ=class{static{me(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");for(var e=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":dJ(r,"global");break;case"i":dJ(r,"ignoreCase");break;case"m":dJ(r,"multiLine");break;case"u":dJ(r,"unicode");break;case"y":dJ(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:e,loc:this.loc(0)}}disjunction(){var t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){for(var t=[],e=this.idx;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}pJ(t);var r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return gJ()}quantifier(t=!1){let e,r=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:n,atMost:n};break;case",":e=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;pJ(e)}if((!0!==t||void 0!==e)&&pJ(e))return"?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(r),e}atom(){let t,e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return pJ(t=void 0===t&&this.isPatternCharacter()?this.patternCharacter():t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):gJ()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[hJ(` +`),hJ("\r"),hJ("\u2028"),hJ("\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 t,e=!1;switch(this.popChar()){case"d":t=mJ;break;case"D":t=mJ,e=!0;break;case"s":t=vJ;break;case"S":t=vJ,e=!0;break;case"w":t=yJ;break;case"W":t=yJ,e=!0}return pJ(t)?{type:"Set",value:t,complement:e}:gJ()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=hJ("\f");break;case"n":t=hJ(` +`);break;case"r":t=hJ("\r");break;case"t":t=hJ("\t");break;case"v":t=hJ("\v")}return pJ(t)?{type:"Character",value:t}:gJ()}controlLetterEscapeAtom(){this.consumeChar("c");var t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:hJ("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:hJ(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:hJ(this.popChar())}}}characterClass(){let t=[],e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,fJ(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,fJ(n)){if(n.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}}),EJ=t(()=>{bJ=class{static{me(this,"BaseRegExpVisitor")}visitChildren(t){for(var e in t){var r=t[e];t.hasOwnProperty(e)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}}),CJ=t(()=>{TJ(),EJ()}),_J={};function SJ(t){try{t=`/${t="string"!=typeof t?t.source:t}/`;var e,r=OJ.pattern(t),i=[];for(e of r.value.value)BJ.reset(t),BJ.visit(e),i.push({start:BJ.startRegexp,end:BJ.endRegex});return i}catch{return[]}}function AJ(t){try{return t=(t="string"==typeof t?new RegExp(t):t).toString(),BJ.reset(t),BJ.visit(OJ.pattern(t)),BJ.multiline}catch{return!1}}function LJ(t){let e="string"==typeof t?new RegExp(t):t;return FJ.some(t=>e.test(t))}function NJ(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function IJ(t){return Array.prototype.map.call(t,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:NJ(t)).join("")}function RJ(t,e){return t=MJ(t),!!(e=e.match(t))&&0",s)-s+1);break;default:i(2)}break;case"[":(t=/\[(?:\\.|.)*?\]/g).lastIndex=s,i((t=t.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(t=/\{\d+,?\d*\}/g).lastIndex=s,(t=t.exec(a))?r(t[0].length):i(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":e+="(?:",s+=3,e+=o()+"|$)";break;case"=":e+="(?=",s+=3,e+=o()+")";break;case"!":t=s,s+=3,o(),e+=a.substr(t,s-t);break;case"<":switch(a[s+3]){case"=":case"!":t=s,s+=4,o(),e+=a.substr(t,s-t);break;default:r(a.indexOf(">",s)-s+1),e+=o()+"|$)"}}else r(1),e+=o()+"|$)";break;case")":return++s,e;default:i(1)}return e}return me(o,"process"),new RegExp(o(),t.flags)}lPt(_J,{NEWLINE_REGEXP:()=>DJ,escapeRegExp:()=>NJ,getCaseInsensitivePattern:()=>IJ,getTerminalParts:()=>SJ,isMultilineComment:()=>AJ,isWhitespace:()=>LJ,partialMatches:()=>RJ,partialRegExp:()=>MJ,whitespaceCharacters:()=>FJ});var DJ,OJ,PJ,BJ,FJ,$J=t(()=>{CJ(),DJ=/\r?\n/gm,OJ=new xJ,PJ=class extends bJ{static{me(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(t){this.multiline=!1,this.regex=t,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){var e=String.fromCharCode(t.value);this.multiline||e!==` -`||(this.multiline=!0),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=NJ(e),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitSet(t){var e;this.multiline||(e=this.regex.substring(t.loc.begin,t.loc.end),e=new RegExp(e),this.multiline=!!` -`.match(e)),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=this.regex.substring(t.loc.begin,t.loc.end),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitChildren(t){"Group"===t.type&&t.quantifier||super.visitChildren(t)}},BJ=new PJ,me(SJ,"getTerminalParts"),me(AJ,"isMultilineComment"),FJ=` -\r              

   `.split(""),me(LJ,"isWhitespace"),me(NJ,"escapeRegExp"),me(IJ,"getCaseInsensitivePattern"),me(RJ,"partialMatches"),me(MJ,"partialRegExp")}),zJ={};function GJ(t){return t.rules.find(t=>TZ(t)&&t.entry)}function UJ(t){return t.rules.filter(t=>AZ(t)&&t.hidden)}function qJ(t,e){var r,i=new Set,n=GJ(t);if(!n)return new Set(t.rules);for(r of[n].concat(UJ(t)))jJ(r,i,e);var a,s=new Set;for(a of t.rules)(i.has(a.name)||AZ(a)&&a.hidden)&&s.add(a);return s}function jJ(t,e,r){e.add(t.name),QQ(t).forEach(t=>{(UZ(t)||r&&WZ(t))&&(t=t.rule.ref)&&!e.has(t.name)&&jJ(t,e,r)})}function WJ(t){return t.terminal||(t.type.ref?ttt(t.type.ref)?.terminal:void 0)}function YJ(t){return t.hidden&&!LJ(ftt(t))}function HJ(t,e){return t&&e?XJ(t,e,t.astNode,!0):[]}function VJ(t,e,r){return t&&e&&0!==(e=XJ(t,e,t.astNode,!0)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function XJ(t,e,r,i){return!i&&(i=HQ(t.grammarSource,DZ))&&i.feature===e?[t]:gK(t)&&t.astNode===r?t.content.flatMap(t=>XJ(t,e,r,!1)):[]}function KJ(t,e){return t?QJ(t,e,t?.astNode):[]}function ZJ(t,e,r){return t&&0!==(e=QJ(t,e,t?.astNode)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function QJ(t,e,r){if(t.astNode!==r)return[];if($Z(t.grammarSource)&&t.grammarSource.value===e)return[t];for(var i,n,a=LK(t).iterator(),s=[];(n=a.next()).done||((i=n.value).astNode===r?$Z(i.grammarSource)&&i.grammarSource.value===e&&s.push(i):a.prune()),!n.done;);return s}function JJ(t){for(var e=t.astNode;e===(null==(r=t.container)?void 0:r.astNode);){var r=HQ(t.grammarSource,DZ);if(r)return r;t=t.container}}function ttt(t){let e=t;return mZ(e)&&(RZ(e.$container)?e=e.$container.$container:TZ(e.$container)?e=e.$container:ZK(e.$container)),ett(t,e,new Map)}function ett(i,t,n){var e,r;function a(t,e){let r;return HQ(t,DZ)||(r=ett(e,e,n)),n.set(i,r),r}if(me(a,"go"),n.has(i))return n.get(i);n.set(i,void 0);for(r of QQ(t)){if(DZ(r)&&"name"===r.feature.toLowerCase())return n.set(i,r),r;if(UZ(r)&&TZ(r.rule.ref))return a(r,r.rule.ref);if(_Z(r)&&null!=(e=r.typeRef)&&e.ref)return a(r,r.typeRef.ref)}}function rtt(e){var t=e.$container;if(FZ(t)){var r=t.elements;for(let t=r.indexOf(e)-1;0<=t;t--){var i=r[t];if(RZ(i))return i;if(i=QQ(r[t]).find(RZ))return i}}if(lZ(t))return rtt(t)}function itt(t,e){return"?"===t||"*"===t||FZ(e)&&!!e.guardCondition}function ntt(t){return"*"===t||"+"===t}function att(t){return"+="===t}function stt(t){return ott(t,new Set)}function ott(t,e){if(e.has(t))return!0;e.add(t);for(var r of QQ(t))if(UZ(r)){if(!r.rule.ref||TZ(r.rule.ref)&&!ott(r.rule.ref,e))return!1}else{if(DZ(r))return!1;if(RZ(r))return!1}return!!t.definition}function ltt(t){return ctt(t.type,new Set)}function ctt(t,e){return!!e.has(t)||(e.add(t),!hZ(t)&&!EZ(t)&&(IZ(t)?t.types.every(t=>ctt(t,e)):!!_Z(t)&&(void 0!==t.primitiveType||void 0!==t.stringType||void 0!==t.typeRef&&!!LZ(t=t.typeRef.ref)&&ctt(t.type,e))))}function htt(t){return t.inferredType?t.inferredType.name:t.dataType||(t.returnType&&(t=t.returnType.ref)&&(TZ(t)||yZ(t)||LZ(t))?t.name:void 0)}function utt(t){if(TZ(t))return stt(t)||null==(e=htt(t))?t.name:e;if(yZ(t)||LZ(t)||CZ(t))return t.name;if(RZ(t)){var e=dtt(t);if(e)return e}else if(mZ(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function dtt(t){var e;return t.inferredType?t.inferredType.name:null!=(e=t.type)&&e.ref?utt(t.type.ref):void 0}function ptt(t){var e;return AZ(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":stt(t)||null==(e=htt(t))?t.name:e}function gtt(t){var e;return AZ(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":null!=(e=htt(t))?e:t.name}function ftt(t){var t=mtt(t.definition,e={s:!1,i:!1,u:!1}),e=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(t,e)}function mtt(t,e){if(qZ(t))return ytt(t);if(jZ(t))return vtt(t);if(OZ(t))return wtt(t);if(WZ(t)){var r=t.rule.ref;if(r)return Ttt(mtt(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Missing rule reference.")}if(zZ(t))return btt(t);if(HZ(t))return xtt(t);var i;if(GZ(t))return r=t.regex.lastIndexOf("/"),i=t.regex.substring(1,r),r=t.regex.substring(r+1),e&&(e.i=r.includes("i"),e.s=r.includes("s"),e.u=r.includes("u")),Ttt(i,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});if(VZ(t))return Ttt(Ett,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Invalid terminal element: "+t?.$type)}function ytt(t){return Ttt(t.elements.map(t=>mtt(t)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function vtt(t){return Ttt(t.elements.map(t=>mtt(t)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function xtt(t){return Ttt(Ett+"*?"+mtt(t.terminal),{cardinality:t.cardinality,lookahead:t.lookahead})}function btt(t){return Ttt(`(?!${mtt(t.terminal)})${Ett}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function wtt(t){return t.right?Ttt(`[${ktt(t.left)}-${ktt(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):Ttt(ktt(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function ktt(t){return NJ(t.value)}function Ttt(t,e){var r;return!1===e.wrap&&!e.lookahead||(t=`(${null!=(r=e.lookahead)?r:""}${t})`),e.cardinality?""+t+e.cardinality:t}lPt(zJ,{findAssignment:()=>JJ,findNameAssignment:()=>ttt,findNodeForKeyword:()=>ZJ,findNodeForProperty:()=>VJ,findNodesForKeyword:()=>KJ,findNodesForKeywordInternal:()=>QJ,findNodesForProperty:()=>HJ,getActionAtElement:()=>rtt,getActionType:()=>dtt,getAllReachableRules:()=>qJ,getCrossReferenceTerminal:()=>WJ,getEntryRule:()=>GJ,getExplicitRuleType:()=>htt,getHiddenRules:()=>UJ,getRuleType:()=>gtt,getRuleTypeName:()=>ptt,getTypeName:()=>utt,isArrayCardinality:()=>ntt,isArrayOperator:()=>att,isCommentTerminal:()=>YJ,isDataType:()=>ltt,isDataTypeRule:()=>stt,isOptionalCardinality:()=>itt,terminalRegex:()=>ftt});var Ett,Ctt=t(()=>{JK(),jQ(),vK(),sJ(),KK(),$J(),me(GJ,"getEntryRule"),me(UJ,"getHiddenRules"),me(qJ,"getAllReachableRules"),me(jJ,"ruleDfs"),me(WJ,"getCrossReferenceTerminal"),me(YJ,"isCommentTerminal"),me(HJ,"findNodesForProperty"),me(VJ,"findNodeForProperty"),me(XJ,"findNodesForPropertyInternal"),me(KJ,"findNodesForKeyword"),me(ZJ,"findNodeForKeyword"),me(QJ,"findNodesForKeywordInternal"),me(JJ,"findAssignment"),me(ttt,"findNameAssignment"),me(ett,"findNameAssignmentInternal"),me(rtt,"getActionAtElement"),me(itt,"isOptionalCardinality"),me(ntt,"isArrayCardinality"),me(att,"isArrayOperator"),me(stt,"isDataTypeRule"),me(ott,"isDataTypeRuleInternal"),me(ltt,"isDataType"),me(ctt,"isDataTypeInternal"),me(htt,"getExplicitRuleType"),me(utt,"getTypeName"),me(dtt,"getActionType"),me(ptt,"getRuleTypeName"),me(gtt,"getRuleType"),me(ftt,"terminalRegex"),Ett=/[\s\S]/.source,me(mtt,"abstractElementToRegex"),me(ytt,"terminalAlternativesToRegex"),me(vtt,"terminalGroupToRegex"),me(xtt,"untilTokenToRegex"),me(btt,"negateTokenToRegex"),me(wtt,"characterRangeToRegex"),me(ktt,"keywordToRegex"),me(Ttt,"withCardinality")});function _tt(t){var e,r=[];for(e of t.Grammar.rules)AZ(e)&&YJ(e)&&AJ(ftt(e))&&r.push(e.name);return{multilineCommentRules:r,nameRegexp:XK}}var Stt=t(()=>{KK(),Ctt(),$J(),jQ(),me(_tt,"createGrammarConfig")}),Att=t(()=>{});function Ltt(t){console&&console.error&&console.error("Error: "+t)}function Ntt(t){console&&console.warn&&console.warn("Warning: "+t)}var Itt=t(()=>{me(Ltt,"PRINT_ERROR"),me(Ntt,"PRINT_WARNING")});function Rtt(t){var e=(new Date).getTime(),t=t();return{time:(new Date).getTime()-e,value:t}}var Mtt=t(()=>{me(Rtt,"timer")});function Dtt(t){function e(){}me(e,"FakeConstructor"),e.prototype=t;let r=new e;function i(){return typeof r.bar}return me(i,"fakeAccess"),i(),i(),t}var Ott=t(()=>{me(Dtt,"toFastProperties")}),Ptt=t(()=>{Itt(),Mtt(),Ott()});function Btt(t){return Ftt(t)?t.LABEL:t.name}function Ftt(t){return zU(t.LABEL)&&""!==t.LABEL}function $tt(t){return x(t,ztt)}function ztt(t){function e(t){return x(t,ztt)}var r,i;if(me(e,"convertDefinition"),t instanceof Utt)return r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx},zU(t.label)&&(r.label=t.label),r;if(t instanceof jtt)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Wtt)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Ytt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Htt)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:ztt(new Ztt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Xtt)return{type:"RepetitionWithSeparator",idx:t.idx,separator:ztt(new Ztt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Vtt)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Ktt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof Ztt)return r={type:"Terminal",name:t.terminalType.name,label:Btt(t.terminalType),idx:t.idx},zU(t.label)&&(r.terminalLabel=t.label),i=t.terminalType.PATTERN,t.terminalType.PATTERN&&(r.pattern=hq(i)?i.source:i),r;if(t instanceof qtt)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var Gtt,Utt,qtt,jtt,Wtt,Ytt,Htt,Vtt,Xtt,Ktt,Ztt,Qtt,Jtt=t(()=>{NW(),me(Btt,"tokenLabel"),me(Ftt,"hasTokenLabel"),Gtt=class{static{me(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(e){e.visit(this),v(this.definition,t=>{t.accept(e)})}},Utt=class extends Gtt{static{me(this,"NonTerminal")}constructor(t){super([]),this.idx=1,aP(this,jq(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},qtt=class extends Gtt{static{me(this,"Rule")}constructor(t){super(t.definition),this.orgText="",aP(this,jq(t,t=>void 0!==t))}},jtt=class extends Gtt{static{me(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,aP(this,jq(t,t=>void 0!==t))}},Wtt=class extends Gtt{static{me(this,"Option")}constructor(t){super(t.definition),this.idx=1,aP(this,jq(t,t=>void 0!==t))}},Ytt=class extends Gtt{static{me(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,aP(this,jq(t,t=>void 0!==t))}},Htt=class extends Gtt{static{me(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,aP(this,jq(t,t=>void 0!==t))}},Vtt=class extends Gtt{static{me(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,aP(this,jq(t,t=>void 0!==t))}},Xtt=class extends Gtt{static{me(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,aP(this,jq(t,t=>void 0!==t))}},Ktt=class extends Gtt{static{me(this,"Alternation")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,aP(this,jq(t,t=>void 0!==t))}},Ztt=class{static{me(this,"Terminal")}constructor(t){this.idx=1,aP(this,jq(t,t=>void 0!==t))}accept(t){t.visit(this)}},me($tt,"serializeGrammar"),me(ztt,"serializeProduction")}),tet=t(()=>{Jtt(),Qtt=class{static{me(this,"GAstVisitor")}visit(t){var e=t;switch(e.constructor){case Utt:return this.visitNonTerminal(e);case jtt:return this.visitAlternative(e);case Wtt:return this.visitOption(e);case Ytt:return this.visitRepetitionMandatory(e);case Htt:return this.visitRepetitionMandatoryWithSeparator(e);case Xtt:return this.visitRepetitionWithSeparator(e);case Vtt:return this.visitRepetition(e);case Ktt:return this.visitAlternation(e);case Ztt:return this.visitTerminal(e);case qtt:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}});function eet(t){return t instanceof jtt||t instanceof Wtt||t instanceof Vtt||t instanceof Ytt||t instanceof Htt||t instanceof Xtt||t instanceof Ztt||t instanceof qtt}function ret(t,e=[]){return t instanceof Wtt||t instanceof Vtt||t instanceof Xtt||(t instanceof Ktt?tW(t.definition,t=>ret(t,e)):!(t instanceof Utt&&KU(e,t))&&t instanceof Gtt&&(t instanceof Utt&&e.push(t),UG(t.definition,t=>ret(t,e))))}function iet(t){return t instanceof Ktt}function net(t){if(t instanceof Utt)return"SUBRULE";if(t instanceof Wtt)return"OPTION";if(t instanceof Ktt)return"OR";if(t instanceof Ytt)return"AT_LEAST_ONE";if(t instanceof Htt)return"AT_LEAST_ONE_SEP";if(t instanceof Xtt)return"MANY_SEP";if(t instanceof Vtt)return"MANY";if(t instanceof Ztt)return"CONSUME";throw Error("non exhaustive match")}var aet=t(()=>{NW(),Jtt(),me(eet,"isSequenceProd"),me(ret,"isOptionalProd"),me(iet,"isBranchingProd"),me(net,"getProductionDslName")}),set=t(()=>{Jtt(),tet(),aet()});function oet(t,e,r){return[new Wtt({definition:[new Ztt({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var cet,het=t(()=>{NW(),set(),cet=class{static{me(this,"RestWalker")}walk(r,i=[]){v(r.definition,(t,e)=>{if(e=EG(r.definition,e+1),t instanceof Utt)this.walkProdRef(t,e,i);else if(t instanceof Ztt)this.walkTerminal(t,e,i);else if(t instanceof jtt)this.walkFlat(t,e,i);else if(t instanceof Wtt)this.walkOption(t,e,i);else if(t instanceof Ytt)this.walkAtLeastOne(t,e,i);else if(t instanceof Htt)this.walkAtLeastOneSep(t,e,i);else if(t instanceof Xtt)this.walkManySep(t,e,i);else if(t instanceof Vtt)this.walkMany(t,e,i);else{if(!(t instanceof Ktt))throw Error("non exhaustive match");this.walkOr(t,e,i)}})}walkTerminal(t,e,r){}walkProdRef(t,e,r){}walkFlat(t,e,r){e=e.concat(r),this.walk(t,e)}walkOption(t,e,r){e=e.concat(r),this.walk(t,e)}walkAtLeastOne(t,e,r){e=[new Wtt({definition:t.definition})].concat(e,r),this.walk(t,e)}walkAtLeastOneSep(t,e,r){e=oet(t,e,r),this.walk(t,e)}walkMany(t,e,r){e=[new Wtt({definition:t.definition})].concat(e,r),this.walk(t,e)}walkManySep(t,e,r){e=oet(t,e,r),this.walk(t,e)}walkOr(t,e,r){let i=e.concat(r);v(t.definition,t=>{t=new jtt({definition:[t]}),this.walk(t,i)})}},me(oet,"restForRepetitionWithSeparator")});function uet(t){if(t instanceof Utt)return uet(t.referencedRule);if(t instanceof Ztt)return get(t);if(eet(t))return det(t);if(iet(t))return pet(t);throw Error("non exhaustive match")}function det(t){let e=[],r=t.definition,i=0,n=r.length>i,a,s=!0;for(;n&&s;)a=r[i],s=ret(a),e=e.concat(uet(a)),i+=1,n=r.length>i;return fW(e)}function pet(t){return t=x(t.definition,t=>uet(t)),fW(HP(t))}function get(t){return[t.terminalType]}var fet,met=t(()=>{NW(),set(),me(uet,"first"),me(det,"firstForSequence"),me(pet,"firstForBranching"),me(get,"firstForTerminal")}),yet=t(()=>{fet="_~IN~_"});function vet(t){let e={};return v(t,t=>{t=new bet(t).startWalking(),aP(e,t)}),e}function xet(t,e){return t.name+e+fet}var bet,wet=t(()=>{het(),met(),NW(),yet(),set(),bet=class extends cet{static{me(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,r){}walkProdRef(t,e,r){t=xet(t.referencedRule,t.idx)+this.topProd.name,e=e.concat(r),r=uet(new jtt({definition:e})),this.follows[t]=r}},me(vet,"computeAllProdsFollows"),me(xet,"buildBetweenProdsFollowPrefix")});function ket(t){var e,t=t.toString();return Eet.hasOwnProperty(t)?Eet[t]:(e=Cet.pattern(t),Eet[t]=e)}function Tet(){Eet={}}var Eet,Cet,_et=t(()=>{CJ(),Eet={},Cet=new xJ,me(ket,"getRegExpAst"),me(Tet,"clearRegExpParserCache")});function Aet(t,e=!1){try{var r=ket(t);return Let(r.value,{},r.flags.ignoreCase)}catch(r){r.message===Oet?e&&Ntt(`${Pet} Unable to optimize: < ${t.toString()} > +`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let t=0;t=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}}),SJ=t(()=>{TJ=class{static{me(this,"BaseRegExpVisitor")}visitChildren(t){for(var e in t){var r=t[e];t.hasOwnProperty(e)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}}),AJ=t(()=>{_J(),SJ()}),LJ={};function NJ(t){try{t=`/${t="string"!=typeof t?t.source:t}/`;var e,r=FJ.pattern(t),n=[];for(e of r.value.value)zJ.reset(t),zJ.visit(e),n.push({start:zJ.startRegexp,end:zJ.endRegex});return n}catch{return[]}}function IJ(t){try{return t=(t="string"==typeof t?new RegExp(t):t).toString(),zJ.reset(t),zJ.visit(FJ.pattern(t)),zJ.multiline}catch{return!1}}function RJ(t){let e="string"==typeof t?new RegExp(t):t;return GJ.some(t=>e.test(t))}function MJ(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function DJ(t){return Array.prototype.map.call(t,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:MJ(t)).join("")}function OJ(t,e){return t=PJ(t),!!(e=e.match(t))&&0",s)-s+1);break;default:n(2)}break;case"[":(t=/\[(?:\\.|.)*?\]/g).lastIndex=s,n((t=t.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(t=/\{\d+,?\d*\}/g).lastIndex=s,(t=t.exec(a))?r(t[0].length):n(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":e+="(?:",s+=3,e+=o()+"|$)";break;case"=":e+="(?=",s+=3,e+=o()+")";break;case"!":t=s,s+=3,o(),e+=a.substr(t,s-t);break;case"<":switch(a[s+3]){case"=":case"!":t=s,s+=4,o(),e+=a.substr(t,s-t);break;default:r(a.indexOf(">",s)-s+1),e+=o()+"|$)"}}else r(1),e+=o()+"|$)";break;case")":return++s,e;default:n(1)}return e}return me(o,"process"),new RegExp(o(),t.flags)}oPt(LJ,{NEWLINE_REGEXP:()=>BJ,escapeRegExp:()=>MJ,getCaseInsensitivePattern:()=>DJ,getTerminalParts:()=>NJ,isMultilineComment:()=>IJ,isWhitespace:()=>RJ,partialMatches:()=>OJ,partialRegExp:()=>PJ,whitespaceCharacters:()=>GJ});var BJ,FJ,$J,zJ,GJ,UJ=t(()=>{AJ(),BJ=/\r?\n/gm,FJ=new kJ,$J=class extends TJ{static{me(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(t){this.multiline=!1,this.regex=t,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){var e=String.fromCharCode(t.value);this.multiline||e!==` +`||(this.multiline=!0),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=MJ(e),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitSet(t){var e;this.multiline||(e=this.regex.substring(t.loc.begin,t.loc.end),e=new RegExp(e),this.multiline=!!` +`.match(e)),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=this.regex.substring(t.loc.begin,t.loc.end),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitChildren(t){"Group"===t.type&&t.quantifier||super.visitChildren(t)}},zJ=new $J,me(NJ,"getTerminalParts"),me(IJ,"isMultilineComment"),GJ=` +\r              

   `.split(""),me(RJ,"isWhitespace"),me(MJ,"escapeRegExp"),me(DJ,"getCaseInsensitivePattern"),me(OJ,"partialMatches"),me(PJ,"partialRegExp")}),qJ={};function jJ(t){return t.rules.find(t=>_Z(t)&&t.entry)}function WJ(t){return t.rules.filter(t=>IZ(t)&&t.hidden)}function YJ(t,e){var r,n=new Set,i=jJ(t);if(!i)return new Set(t.rules);for(r of[i].concat(WJ(t)))HJ(r,n,e);var a,s=new Set;for(a of t.rules)(n.has(a.name)||IZ(a)&&a.hidden)&&s.add(a);return s}function HJ(t,e,r){e.add(t.name),eJ(t).forEach(t=>{(WZ(t)||r&&VZ(t))&&(t=t.rule.ref)&&!e.has(t.name)&&HJ(t,e,r)})}function VJ(t){return t.terminal||(t.type.ref?ntt(t.type.ref)?.terminal:void 0)}function XJ(t){return t.hidden&&!RJ(vtt(t))}function KJ(t,e){return t&&e?QJ(t,e,t.astNode,!0):[]}function ZJ(t,e,r){return t&&e&&0!==(e=QJ(t,e,t.astNode,!0)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function QJ(t,e,r,n){return!n&&(n=KQ(t.grammarSource,BZ))&&n.feature===e?[t]:yK(t)&&t.astNode===r?t.content.flatMap(t=>QJ(t,e,r,!1)):[]}function JJ(t,e){return t?ett(t,e,t?.astNode):[]}function ttt(t,e,r){return t&&0!==(e=ett(t,e,t?.astNode)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function ett(t,e,r){if(t.astNode!==r)return[];if(UZ(t.grammarSource)&&t.grammarSource.value===e)return[t];for(var n,i,a=RK(t).iterator(),s=[];(i=a.next()).done||((n=i.value).astNode===r?UZ(n.grammarSource)&&n.grammarSource.value===e&&s.push(n):a.prune()),!i.done;);return s}function rtt(t){for(var e=t.astNode;e===(null==(r=t.container)?void 0:r.astNode);){var r=KQ(t.grammarSource,BZ);if(r)return r;t=t.container}}function ntt(t){let e=t;return xZ(e)&&(OZ(e.$container)?e=e.$container.$container:_Z(e.$container)?e=e.$container:tZ(e.$container)),itt(t,e,new Map)}function itt(n,t,i){var e,r;function a(t,e){let r;return KQ(t,BZ)||(r=itt(e,e,i)),i.set(n,r),r}if(me(a,"go"),i.has(n))return i.get(n);i.set(n,void 0);for(r of eJ(t)){if(BZ(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(WZ(r)&&_Z(r.rule.ref))return a(r,r.rule.ref);if(LZ(r)&&null!=(e=r.typeRef)&&e.ref)return a(r,r.typeRef.ref)}}function att(e){var t=e.$container;if(GZ(t)){var r=t.elements;for(let t=r.indexOf(e)-1;0<=t;t--){var n=r[t];if(OZ(n))return n;if(n=eJ(r[t]).find(OZ))return n}}if(uZ(t))return att(t)}function stt(t,e){return"?"===t||"*"===t||GZ(e)&&!!e.guardCondition}function ott(t){return"*"===t||"+"===t}function ltt(t){return"+="===t}function ctt(t){return htt(t,new Set)}function htt(t,e){if(e.has(t))return!0;e.add(t);for(var r of eJ(t))if(WZ(r)){if(!r.rule.ref||_Z(r.rule.ref)&&!htt(r.rule.ref,e))return!1}else{if(BZ(r))return!1;if(OZ(r))return!1}return!!t.definition}function utt(t){return dtt(t.type,new Set)}function dtt(t,e){return!!e.has(t)||(e.add(t),!pZ(t)&&!SZ(t)&&(DZ(t)?t.types.every(t=>dtt(t,e)):!!LZ(t)&&(void 0!==t.primitiveType||void 0!==t.stringType||void 0!==t.typeRef&&!!RZ(t=t.typeRef.ref)&&dtt(t.type,e))))}function ptt(t){return t.inferredType?t.inferredType.name:t.dataType||(t.returnType&&(t=t.returnType.ref)&&(_Z(t)||bZ(t)||RZ(t))?t.name:void 0)}function gtt(t){if(_Z(t))return ctt(t)||null==(e=ptt(t))?t.name:e;if(bZ(t)||RZ(t)||AZ(t))return t.name;if(OZ(t)){var e=ftt(t);if(e)return e}else if(xZ(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function ftt(t){var e;return t.inferredType?t.inferredType.name:null!=(e=t.type)&&e.ref?gtt(t.type.ref):void 0}function mtt(t){var e;return IZ(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":ctt(t)||null==(e=ptt(t))?t.name:e}function ytt(t){var e;return IZ(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":null!=(e=ptt(t))?e:t.name}function vtt(t){var t=xtt(t.definition,e={s:!1,i:!1,u:!1}),e=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(t,e)}function xtt(t,e){if(YZ(t))return btt(t);if(HZ(t))return wtt(t);if(FZ(t))return Ett(t);if(VZ(t)){var r=t.rule.ref;if(r)return _tt(xtt(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Missing rule reference.")}if(qZ(t))return Ttt(t);if(KZ(t))return ktt(t);var n;if(jZ(t))return r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),r=t.regex.substring(r+1),e&&(e.i=r.includes("i"),e.s=r.includes("s"),e.u=r.includes("u")),_tt(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});if(ZZ(t))return _tt(Stt,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Invalid terminal element: "+t?.$type)}function btt(t){return _tt(t.elements.map(t=>xtt(t)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function wtt(t){return _tt(t.elements.map(t=>xtt(t)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function ktt(t){return _tt(Stt+"*?"+xtt(t.terminal),{cardinality:t.cardinality,lookahead:t.lookahead})}function Ttt(t){return _tt(`(?!${xtt(t.terminal)})${Stt}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function Ett(t){return t.right?_tt(`[${Ctt(t.left)}-${Ctt(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):_tt(Ctt(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function Ctt(t){return MJ(t.value)}function _tt(t,e){var r;return!1===e.wrap&&!e.lookahead||(t=`(${null!=(r=e.lookahead)?r:""}${t})`),e.cardinality?""+t+e.cardinality:t}oPt(qJ,{findAssignment:()=>rtt,findNameAssignment:()=>ntt,findNodeForKeyword:()=>ttt,findNodeForProperty:()=>ZJ,findNodesForKeyword:()=>JJ,findNodesForKeywordInternal:()=>ett,findNodesForProperty:()=>KJ,getActionAtElement:()=>att,getActionType:()=>ftt,getAllReachableRules:()=>YJ,getCrossReferenceTerminal:()=>VJ,getEntryRule:()=>jJ,getExplicitRuleType:()=>ptt,getHiddenRules:()=>WJ,getRuleType:()=>ytt,getRuleTypeName:()=>mtt,getTypeName:()=>gtt,isArrayCardinality:()=>ott,isArrayOperator:()=>ltt,isCommentTerminal:()=>XJ,isDataType:()=>utt,isDataTypeRule:()=>ctt,isOptionalCardinality:()=>stt,terminalRegex:()=>vtt});var Stt,Att=t(()=>{rZ(),HQ(),wK(),cJ(),JK(),UJ(),me(jJ,"getEntryRule"),me(WJ,"getHiddenRules"),me(YJ,"getAllReachableRules"),me(HJ,"ruleDfs"),me(VJ,"getCrossReferenceTerminal"),me(XJ,"isCommentTerminal"),me(KJ,"findNodesForProperty"),me(ZJ,"findNodeForProperty"),me(QJ,"findNodesForPropertyInternal"),me(JJ,"findNodesForKeyword"),me(ttt,"findNodeForKeyword"),me(ett,"findNodesForKeywordInternal"),me(rtt,"findAssignment"),me(ntt,"findNameAssignment"),me(itt,"findNameAssignmentInternal"),me(att,"getActionAtElement"),me(stt,"isOptionalCardinality"),me(ott,"isArrayCardinality"),me(ltt,"isArrayOperator"),me(ctt,"isDataTypeRule"),me(htt,"isDataTypeRuleInternal"),me(utt,"isDataType"),me(dtt,"isDataTypeInternal"),me(ptt,"getExplicitRuleType"),me(gtt,"getTypeName"),me(ftt,"getActionType"),me(mtt,"getRuleTypeName"),me(ytt,"getRuleType"),me(vtt,"terminalRegex"),Stt=/[\s\S]/.source,me(xtt,"abstractElementToRegex"),me(btt,"terminalAlternativesToRegex"),me(wtt,"terminalGroupToRegex"),me(ktt,"untilTokenToRegex"),me(Ttt,"negateTokenToRegex"),me(Ett,"characterRangeToRegex"),me(Ctt,"keywordToRegex"),me(_tt,"withCardinality")});function Ltt(t){var e,r=[];for(e of t.Grammar.rules)IZ(e)&&XJ(e)&&IJ(vtt(e))&&r.push(e.name);return{multilineCommentRules:r,nameRegexp:QK}}var Ntt=t(()=>{JK(),Att(),UJ(),HQ(),me(Ltt,"createGrammarConfig")}),Itt=t(()=>{});function Rtt(t){console&&console.error&&console.error("Error: "+t)}function Mtt(t){console&&console.warn&&console.warn("Warning: "+t)}var Dtt=t(()=>{me(Rtt,"PRINT_ERROR"),me(Mtt,"PRINT_WARNING")});function Ott(t){var e=(new Date).getTime(),t=t();return{time:(new Date).getTime()-e,value:t}}var Ptt=t(()=>{me(Ott,"timer")});function Btt(t){function e(){}me(e,"FakeConstructor"),e.prototype=t;let r=new e;function n(){return typeof r.bar}return me(n,"fakeAccess"),n(),n(),t}var Ftt=t(()=>{me(Btt,"toFastProperties")}),$tt=t(()=>{Dtt(),Ptt(),Ftt()});function ztt(t){return Gtt(t)?t.LABEL:t.name}function Gtt(t){return GU(t.LABEL)&&""!==t.LABEL}function Utt(t){return x(t,qtt)}function qtt(t){function e(t){return x(t,qtt)}var r,n;if(me(e,"convertDefinition"),t instanceof Wtt)return r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx},GU(t.label)&&(r.label=t.label),r;if(t instanceof Htt)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Vtt)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Xtt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ktt)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:qtt(new tet({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Qtt)return{type:"RepetitionWithSeparator",idx:t.idx,separator:qtt(new tet({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Ztt)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Jtt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof tet)return r={type:"Terminal",name:t.terminalType.name,label:ztt(t.terminalType),idx:t.idx},GU(t.label)&&(r.terminalLabel=t.label),n=t.terminalType.PATTERN,t.terminalType.PATTERN&&(r.pattern=uq(n)?n.source:n),r;if(t instanceof Ytt)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var jtt,Wtt,Ytt,Htt,Vtt,Xtt,Ktt,Ztt,Qtt,Jtt,tet,eet,ret=t(()=>{IW(),me(ztt,"tokenLabel"),me(Gtt,"hasTokenLabel"),jtt=class{static{me(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(e){e.visit(this),v(this.definition,t=>{t.accept(e)})}},Wtt=class extends jtt{static{me(this,"NonTerminal")}constructor(t){super([]),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},Ytt=class extends jtt{static{me(this,"Rule")}constructor(t){super(t.definition),this.orgText="",sP(this,Wq(t,t=>void 0!==t))}},Htt=class extends jtt{static{me(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,sP(this,Wq(t,t=>void 0!==t))}},Vtt=class extends jtt{static{me(this,"Option")}constructor(t){super(t.definition),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}},Xtt=class extends jtt{static{me(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}},Ktt=class extends jtt{static{me(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}},Ztt=class extends jtt{static{me(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}},Qtt=class extends jtt{static{me(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}},Jtt=class extends jtt{static{me(this,"Alternation")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,sP(this,Wq(t,t=>void 0!==t))}},tet=class{static{me(this,"Terminal")}constructor(t){this.idx=1,sP(this,Wq(t,t=>void 0!==t))}accept(t){t.visit(this)}},me(Utt,"serializeGrammar"),me(qtt,"serializeProduction")}),net=t(()=>{ret(),eet=class{static{me(this,"GAstVisitor")}visit(t){var e=t;switch(e.constructor){case Wtt:return this.visitNonTerminal(e);case Htt:return this.visitAlternative(e);case Vtt:return this.visitOption(e);case Xtt:return this.visitRepetitionMandatory(e);case Ktt:return this.visitRepetitionMandatoryWithSeparator(e);case Qtt:return this.visitRepetitionWithSeparator(e);case Ztt:return this.visitRepetition(e);case Jtt:return this.visitAlternation(e);case tet:return this.visitTerminal(e);case Ytt:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}});function iet(t){return t instanceof Htt||t instanceof Vtt||t instanceof Ztt||t instanceof Xtt||t instanceof Ktt||t instanceof Qtt||t instanceof tet||t instanceof Ytt}function aet(t,e=[]){return t instanceof Vtt||t instanceof Ztt||t instanceof Qtt||(t instanceof Jtt?eW(t.definition,t=>aet(t,e)):!(t instanceof Wtt&&ZU(e,t))&&t instanceof jtt&&(t instanceof Wtt&&e.push(t),qG(t.definition,t=>aet(t,e))))}function set(t){return t instanceof Jtt}function oet(t){if(t instanceof Wtt)return"SUBRULE";if(t instanceof Vtt)return"OPTION";if(t instanceof Jtt)return"OR";if(t instanceof Xtt)return"AT_LEAST_ONE";if(t instanceof Ktt)return"AT_LEAST_ONE_SEP";if(t instanceof Qtt)return"MANY_SEP";if(t instanceof Ztt)return"MANY";if(t instanceof tet)return"CONSUME";throw Error("non exhaustive match")}var cet=t(()=>{IW(),ret(),me(iet,"isSequenceProd"),me(aet,"isOptionalProd"),me(set,"isBranchingProd"),me(oet,"getProductionDslName")}),het=t(()=>{ret(),net(),cet()});function uet(t,e,r){return[new Vtt({definition:[new tet({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var det,pet=t(()=>{IW(),het(),det=class{static{me(this,"RestWalker")}walk(r,n=[]){v(r.definition,(t,e)=>{if(e=CG(r.definition,e+1),t instanceof Wtt)this.walkProdRef(t,e,n);else if(t instanceof tet)this.walkTerminal(t,e,n);else if(t instanceof Htt)this.walkFlat(t,e,n);else if(t instanceof Vtt)this.walkOption(t,e,n);else if(t instanceof Xtt)this.walkAtLeastOne(t,e,n);else if(t instanceof Ktt)this.walkAtLeastOneSep(t,e,n);else if(t instanceof Qtt)this.walkManySep(t,e,n);else if(t instanceof Ztt)this.walkMany(t,e,n);else{if(!(t instanceof Jtt))throw Error("non exhaustive match");this.walkOr(t,e,n)}})}walkTerminal(t,e,r){}walkProdRef(t,e,r){}walkFlat(t,e,r){e=e.concat(r),this.walk(t,e)}walkOption(t,e,r){e=e.concat(r),this.walk(t,e)}walkAtLeastOne(t,e,r){e=[new Vtt({definition:t.definition})].concat(e,r),this.walk(t,e)}walkAtLeastOneSep(t,e,r){e=uet(t,e,r),this.walk(t,e)}walkMany(t,e,r){e=[new Vtt({definition:t.definition})].concat(e,r),this.walk(t,e)}walkManySep(t,e,r){e=uet(t,e,r),this.walk(t,e)}walkOr(t,e,r){let n=e.concat(r);v(t.definition,t=>{t=new Htt({definition:[t]}),this.walk(t,n)})}},me(uet,"restForRepetitionWithSeparator")});function get(t){if(t instanceof Wtt)return get(t.referencedRule);if(t instanceof tet)return yet(t);if(iet(t))return fet(t);if(set(t))return met(t);throw Error("non exhaustive match")}function fet(t){let e=[],r=t.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=aet(a),e=e.concat(get(a)),n+=1,i=r.length>n;return mW(e)}function met(t){return t=x(t.definition,t=>get(t)),mW(VP(t))}function yet(t){return[t.terminalType]}var vet,xet=t(()=>{IW(),het(),me(get,"first"),me(fet,"firstForSequence"),me(met,"firstForBranching"),me(yet,"firstForTerminal")}),bet=t(()=>{vet="_~IN~_"});function wet(t){let e={};return v(t,t=>{t=new Tet(t).startWalking(),sP(e,t)}),e}function ket(t,e){return t.name+e+vet}var Tet,Eet=t(()=>{pet(),xet(),IW(),bet(),het(),Tet=class extends det{static{me(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,r){}walkProdRef(t,e,r){t=ket(t.referencedRule,t.idx)+this.topProd.name,e=e.concat(r),r=get(new Htt({definition:e})),this.follows[t]=r}},me(wet,"computeAllProdsFollows"),me(ket,"buildBetweenProdsFollowPrefix")});function Cet(t){var e,t=t.toString();return Aet.hasOwnProperty(t)?Aet[t]:(e=Let.pattern(t),Aet[t]=e)}function _et(){Aet={}}var Aet,Let,Net=t(()=>{AJ(),Aet={},Let=new kJ,me(Cet,"getRegExpAst"),me(_et,"clearRegExpParserCache")});function Iet(t,e=!1){try{var r=Cet(t);return Ret(r.value,{},r.flags.ignoreCase)}catch(r){r.message===Fet?e&&Mtt(`${$et} Unable to optimize: < ${t.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.`):(e=e?` This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",Ltt(`${Pet} + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",Rtt(`${$et} Failed parsing: < ${t.toString()} > Using the @chevrotain/regexp-to-ast library - Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+e))}return[]}function Let(e,n,a){switch(e.type){case"Disjunction":for(let t=0;t{if("number"==typeof e)Net(e,n,a);else{var r=e;if(!0===a)for(let t=r.from;t<=r.to;t++)Net(t,n,a);else{for(let t=r.from;t<=r.to&&t=brt){var e=r.from>=brt?r.from:brt,t=r.to,e=urt(e),i=urt(t);for(let t=e;t<=i;t++)n[t]=t}}}});break;case"Group":Let(s.value,n,a);break;default:throw Error("Non Exhaustive Match")}if(i=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===Met(s)||"Group"!==s.type&&0==i)break}break;default:throw Error("non exhaustive match!")}return YU(n)}function Net(t,e,r){var i=urt(t);e[i]=i,!0===r&&Iet(t,e)}function Iet(t,e){var r=(t=String.fromCharCode(t)).toUpperCase();r!==t?e[r=urt(r.charCodeAt(0))]=r:(r=t.toLowerCase())!==t&&(e[t=urt(r.charCodeAt(0))]=t)}function Ret(t,r){return iU(t.value,t=>{if("number"==typeof t)return KU(r,t);{let e=t;return void 0!==iU(r,t=>e.from<=t&&t<=e.to)}})}function Met(t){var e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(KT(t.value)?UG(t.value,Met):Met(t.value))}function Det(e,t){var r,i;return t instanceof RegExp?(r=ket(t),(i=new Bet(e)).visit(r),i.found):void 0!==iU(t,t=>KU(e,t.charCodeAt(0)))}var Oet,Pet,Bet,Fet=t(()=>{CJ(),NW(),Ptt(),_et(),krt(),Oet="Complement Sets are not supported for first char optimization",Pet=`Unable to use "first char" lexer optimizations: -`,me(Aet,"getOptimizedStartCodesIndices"),me(Let,"firstCharOptimizedIndices"),me(Net,"addOptimizedIdxToResult"),me(Iet,"handleIgnoreCase"),me(Ret,"findCode"),me(Met,"isWholeOptional"),Bet=class extends bJ{static{me(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}super.visitChildren(t)}}visitCharacter(t){KU(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===Ret(t,this.targetCharCodes)&&(this.found=!0):void 0!==Ret(t,this.targetCharCodes)&&(this.found=!0)}},me(Det,"canMatchCharCode")});function $et(t,n){var e=(n=oG(n,{useSticky:mrt,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:me((t,e)=>e(),"tracer")})).tracer;e("initCharCodeToOptimizedIndexMap",()=>{drt()});let r,i=(e("Reject Lexer.NA",()=>{r=Wj(t,t=>t[prt]===Grt.NA)}),!1),a;e("Transform Patterns",()=>{i=!1,a=x(r,t=>{var e,t=t[prt];if(hq(t))return 1!==(e=t.source).length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||KU(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?(n.useSticky?ert:trt)(t):e[1]:e;if(C6(t))return i=!0,{exec:t};if("object"==typeof t)return i=!0,t;if("string"==typeof t)return 1===t.length?t:(e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),t=new RegExp(e),(n.useSticky?ert:trt)(t));throw Error("non exhaustive match")})});let s,o,l,c,h;e("misc mapping",()=>{s=x(r,t=>t.tokenTypeIdx),o=x(r,t=>{if((t=t.GROUP)!==Grt.SKIPPED){if(zU(t))return t;if(gq(t))return!1;throw Error("non exhaustive match")}}),l=x(r,t=>{if(t=t.LONGER_ALT)return KT(t)?x(t,t=>tq(r,t)):[tq(r,t)]}),c=x(r,t=>t.PUSH_MODE),h=x(r,t=>BU(t,"POP_MODE"))});let u;e("Line Terminator Handling",()=>{let e=crt(n.lineTerminatorCharacters);u=x(r,t=>!1),"onlyOffset"!==n.positionTracking&&(u=x(r,t=>BU(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===ort(t,e)&&Det(e,t.PATTERN)))});let d,p,g,f,m=(e("Misc Mapping #2",()=>{d=x(r,art),p=x(a,srt),g=Uj(r,(t,e)=>(e=e.GROUP,zU(e)&&e!==Grt.SKIPPED&&(t[e]=[]),t),{}),f=x(a,(t,e)=>({pattern:a[e],longerAlt:l[e],canLineTerminator:u[e],isCustom:d[e],short:p[e],group:o[e],push:c[e],pop:h[e],tokenTypeIdx:s[e],tokenType:r[e]}))}),!0),y=[];return n.safeMode||e("First Char Optimization",()=>{y=Uj(r,(r,t,i)=>{if("string"==typeof t.PATTERN){var e=urt(t.PATTERN.charCodeAt(0));hrt(r,e,f[i])}else if(KT(t.START_CHARS_HINT)){let e;v(t.START_CHARS_HINT,t=>{t=urt("string"==typeof t?t.charCodeAt(0):t),e!==t&&(e=t,hrt(r,t,f[i]))})}else hq(t.PATTERN)?t.PATTERN.unicode?(m=!1,n.ensureOptimizations&&Ltt(`${Pet} Unable to analyze < ${t.PATTERN.toString()} > pattern. + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+e))}return[]}function Ret(e,i,a){switch(e.type){case"Disjunction":for(let t=0;t{if("number"==typeof e)Met(e,i,a);else{var r=e;if(!0===a)for(let t=r.from;t<=r.to;t++)Met(t,i,a);else{for(let t=r.from;t<=r.to&&t=Trt){var e=r.from>=Trt?r.from:Trt,t=r.to,e=grt(e),n=grt(t);for(let t=e;t<=n;t++)i[t]=t}}}});break;case"Group":Ret(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===Pet(s)||"Group"!==s.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return HU(i)}function Met(t,e,r){var n=grt(t);e[n]=n,!0===r&&Det(t,e)}function Det(t,e){var r=(t=String.fromCharCode(t)).toUpperCase();r!==t?e[r=grt(r.charCodeAt(0))]=r:(r=t.toLowerCase())!==t&&(e[t=grt(r.charCodeAt(0))]=t)}function Oet(t,r){return iU(t.value,t=>{if("number"==typeof t)return ZU(r,t);{let e=t;return void 0!==iU(r,t=>e.from<=t&&t<=e.to)}})}function Pet(t){var e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(ZT(t.value)?qG(t.value,Pet):Pet(t.value))}function Bet(e,t){var r,n;return t instanceof RegExp?(r=Cet(t),(n=new zet(e)).visit(r),n.found):void 0!==iU(t,t=>ZU(e,t.charCodeAt(0)))}var Fet,$et,zet,Get=t(()=>{AJ(),IW(),$tt(),Net(),Crt(),Fet="Complement Sets are not supported for first char optimization",$et=`Unable to use "first char" lexer optimizations: +`,me(Iet,"getOptimizedStartCodesIndices"),me(Ret,"firstCharOptimizedIndices"),me(Met,"addOptimizedIdxToResult"),me(Det,"handleIgnoreCase"),me(Oet,"findCode"),me(Pet,"isWholeOptional"),zet=class extends TJ{static{me(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}super.visitChildren(t)}}visitCharacter(t){ZU(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===Oet(t,this.targetCharCodes)&&(this.found=!0):void 0!==Oet(t,this.targetCharCodes)&&(this.found=!0)}},me(Bet,"canMatchCharCode")});function Uet(t,i){var e=(i=lG(i,{useSticky:xrt,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:me((t,e)=>e(),"tracer")})).tracer;e("initCharCodeToOptimizedIndexMap",()=>{frt()});let r,n=(e("Reject Lexer.NA",()=>{r=Yj(t,t=>t[mrt]===jrt.NA)}),!1),a;e("Transform Patterns",()=>{n=!1,a=x(r,t=>{var e,t=t[mrt];if(uq(t))return 1!==(e=t.source).length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||ZU(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?(i.useSticky?irt:nrt)(t):e[1]:e;if(_w(t))return n=!0,{exec:t};if("object"==typeof t)return n=!0,t;if("string"==typeof t)return 1===t.length?t:(e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),t=new RegExp(e),(i.useSticky?irt:nrt)(t));throw Error("non exhaustive match")})});let s,o,l,c,h;e("misc mapping",()=>{s=x(r,t=>t.tokenTypeIdx),o=x(r,t=>{if((t=t.GROUP)!==jrt.SKIPPED){if(GU(t))return t;if(fq(t))return!1;throw Error("non exhaustive match")}}),l=x(r,t=>{if(t=t.LONGER_ALT)return ZT(t)?x(t,t=>eq(r,t)):[eq(r,t)]}),c=x(r,t=>t.PUSH_MODE),h=x(r,t=>FU(t,"POP_MODE"))});let u;e("Line Terminator Handling",()=>{let e=drt(i.lineTerminatorCharacters);u=x(r,t=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,t=>FU(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===hrt(t,e)&&Bet(e,t.PATTERN)))});let d,p,g,f,m=(e("Misc Mapping #2",()=>{d=x(r,lrt),p=x(a,crt),g=qj(r,(t,e)=>(e=e.GROUP,GU(e)&&e!==jrt.SKIPPED&&(t[e]=[]),t),{}),f=x(a,(t,e)=>({pattern:a[e],longerAlt:l[e],canLineTerminator:u[e],isCustom:d[e],short:p[e],group:o[e],push:c[e],pop:h[e],tokenTypeIdx:s[e],tokenType:r[e]}))}),!0),y=[];return i.safeMode||e("First Char Optimization",()=>{y=qj(r,(r,t,n)=>{if("string"==typeof t.PATTERN){var e=grt(t.PATTERN.charCodeAt(0));prt(r,e,f[n])}else if(ZT(t.START_CHARS_HINT)){let e;v(t.START_CHARS_HINT,t=>{t=grt("string"==typeof t?t.charCodeAt(0):t),e!==t&&(e=t,prt(r,t,f[n]))})}else uq(t.PATTERN)?t.PATTERN.unicode?(m=!1,i.ensureOptimizations&&Rtt(`${$et} Unable to analyze < ${t.PATTERN.toString()} > pattern. The regexp unicode flag is not currently supported by the regexp-to-ast library. This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)):(e=Aet(t.PATTERN,n.ensureOptimizations),aq(e)&&(m=!1),v(e,t=>{hrt(r,t,f[i])})):(n.ensureOptimizations&&Ltt(`${Pet} TokenType: <${t.name}> is using a custom token pattern without providing parameter. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)):(e=Iet(t.PATTERN,i.ensureOptimizations),sq(e)&&(m=!1),v(e,t=>{prt(r,t,f[n])})):(i.ensureOptimizations&&Rtt(`${$et} TokenType: <${t.name}> is using a custom token pattern without providing parameter. This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:m}}function zet(t,e){let r=[],i=Uet(t);r=r.concat(i.errors);var n=(t=qet(i.valid)).valid;return r=(r=(r=(r=(r=r.concat(t.errors)).concat(Get(n))).concat(Xet(n))).concat(Ket(n,e))).concat(Zet(n))}function Get(t){let e=[],r=VG(t,t=>hq(t[prt]));return e=(e=(e=(e=(e=e.concat(jet(r))).concat(Yet(r))).concat(Het(r))).concat(Vet(r))).concat(Wet(r))}function Uet(t){var e=VG(t,t=>!BU(t,prt));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:$rt.MISSING_PATTERN,tokenTypes:[t]})),valid:yG(t,e)}}function qet(t){var e=VG(t,t=>(t=t[prt],!(hq(t)||C6(t)||BU(t,"exec")||zU(t))));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:$rt.INVALID_PATTERN,tokenTypes:[t]})),valid:yG(t,e)}}function jet(t){class i extends bJ{static{me(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}return t=VG(t,t=>{t=t.PATTERN;try{var e=ket(t),r=new i;return r.visit(e),r.found}catch{return yrt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: + 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 qet(t,e){let r=[],n=Wet(t);r=r.concat(n.errors);var i=(t=Yet(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(t.errors)).concat(jet(i))).concat(Qet(i))).concat(Jet(i,e))).concat(trt(i))}function jet(t){let e=[],r=XG(t,t=>uq(t[mrt]));return e=(e=(e=(e=(e=e.concat(Het(r))).concat(Xet(r))).concat(Ket(r))).concat(Zet(r))).concat(Vet(r))}function Wet(t){var e=XG(t,t=>!FU(t,mrt));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:Urt.MISSING_PATTERN,tokenTypes:[t]})),valid:vG(t,e)}}function Yet(t){var e=XG(t,t=>(t=t[mrt],!(uq(t)||_w(t)||FU(t,"exec")||GU(t))));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Urt.INVALID_PATTERN,tokenTypes:[t]})),valid:vG(t,e)}}function Het(t){class n extends TJ{static{me(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}return t=XG(t,t=>{t=t.PATTERN;try{var e=Cet(t),r=new n;return r.visit(e),r.found}catch{return brt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:$rt.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Wet(t){return t=VG(t,t=>t.PATTERN.test("")),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:$rt.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}function Yet(t){class i extends bJ{static{me(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}return t=VG(t,t=>{t=t.PATTERN;try{var e=ket(t),r=new i;return r.visit(e),r.found}catch{return vrt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Urt.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Vet(t){return t=XG(t,t=>t.PATTERN.test("")),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:Urt.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}function Xet(t){class n extends TJ{static{me(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}return t=XG(t,t=>{t=t.PATTERN;try{var e=Cet(t),r=new n;return r.visit(e),r.found}catch{return wrt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:$rt.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Het(t){return t=VG(t,t=>(t=t[prt])instanceof RegExp&&(t.multiline||t.global)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:$rt.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function Vet(t){let i=[],e=x(t,r=>Uj(t,(t,e)=>(r.PATTERN.source!==e.PATTERN.source||KU(i,e)||e.PATTERN===Grt.NA||(i.push(e),t.push(e)),t),[]));e=o$(e);var r=VG(e,t=>1{var e=x(t,t=>t.name);return{message:`The same RegExp pattern ->${oU(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:$rt.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function Xet(t){return t=VG(t,t=>!!BU(t,"GROUP")&&(t=t.GROUP)!==Grt.SKIPPED&&t!==Grt.NA&&!zU(t)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:$rt.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function Ket(t,e){return t=VG(t,t=>void 0!==t.PUSH_MODE&&!KU(e,t.PUSH_MODE)),x(t,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:$rt.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function Zet(t){let a=[],e=Uj(t,(t,e,r)=>{var i=e.PATTERN;return i!==Grt.NA&&(zU(i)?t.push({str:i,idx:r,tokenType:e}):hq(i)&&Jet(i)&&t.push({str:i.source,idx:r,tokenType:e})),t},[]);return v(t,(i,n)=>{v(e,({str:t,idx:e,tokenType:r})=>{n${r.name}<- can never be matched. -Because it appears AFTER the Token Type ->${i.name}<-in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:e,type:$rt.UNREACHABLE_PATTERN,tokenTypes:[i,r]}))})}),a}function Qet(t,e){var r;if(hq(e))return null!==(r=e.exec(t))&&0===r.index;if(C6(e))return e(t,0,[],{});if(BU(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function Jet(e){return void 0===iU([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function trt(t){var e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function ert(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function rrt(t,e,r){let n=[];return BU(t,grt)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+grt+`> property in its definition -`,type:$rt.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),BU(t,frt)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+frt+`> property in its definition -`,type:$rt.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),BU(t,frt)&&BU(t,grt)&&!BU(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${grt}: <${t.defaultMode}>which does not exist -`,type:$rt.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),BU(t,frt)&&v(t.modes,(r,i)=>{v(r,(e,t)=>{gq(e)?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${t}> -`,type:$rt.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):BU(e,"LONGER_ALT")&&(t=KT(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT],v(t,t=>{gq(t)||KU(r,t)||n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${t.name}> on token <${e.name}> outside of mode <${i}> -`,type:$rt.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),n}function irt(t,e,r){let i=[],n=!1,a=o$(HP(YU(t.modes))),s=Wj(a,t=>t[prt]===Grt.NA),o=crt(r);return e&&v(s,t=>{var e=ort(t,o);!1!==e?(e={message:lrt(t,e),type:e.issue,tokenType:t},i.push(e)):BU(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(n=!0):Det(o,t.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Urt.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Ket(t){return t=XG(t,t=>(t=t[mrt])instanceof RegExp&&(t.multiline||t.global)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Urt.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function Zet(t){let n=[],e=x(t,r=>qj(t,(t,e)=>(r.PATTERN.source!==e.PATTERN.source||ZU(n,e)||e.PATTERN===jrt.NA||(n.push(e),t.push(e)),t),[]));e=l$(e);var r=XG(e,t=>1{var e=x(t,t=>t.name);return{message:`The same RegExp pattern ->${lU(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:Urt.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function Qet(t){return t=XG(t,t=>!!FU(t,"GROUP")&&(t=t.GROUP)!==jrt.SKIPPED&&t!==jrt.NA&&!GU(t)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Urt.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function Jet(t,e){return t=XG(t,t=>void 0!==t.PUSH_MODE&&!ZU(e,t.PUSH_MODE)),x(t,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:Urt.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function trt(t){let a=[],e=qj(t,(t,e,r)=>{var n=e.PATTERN;return n!==jrt.NA&&(GU(n)?t.push({str:n,idx:r,tokenType:e}):uq(n)&&rrt(n)&&t.push({str:n.source,idx:r,tokenType:e})),t},[]);return v(t,(n,i)=>{v(e,({str:t,idx:e,tokenType:r})=>{i${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:e,type:Urt.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function ert(t,e){var r;if(uq(e))return null!==(r=e.exec(t))&&0===r.index;if(_w(e))return e(t,0,[],{});if(FU(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function rrt(e){return void 0===iU([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function nrt(t){var e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function irt(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function art(t,e,r){let i=[];return FU(t,yrt)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+yrt+`> property in its definition +`,type:Urt.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),FU(t,vrt)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+vrt+`> property in its definition +`,type:Urt.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),FU(t,vrt)&&FU(t,yrt)&&!FU(t.modes,t.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${yrt}: <${t.defaultMode}>which does not exist +`,type:Urt.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),FU(t,vrt)&&v(t.modes,(r,n)=>{v(r,(e,t)=>{fq(e)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${t}> +`,type:Urt.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):FU(e,"LONGER_ALT")&&(t=ZT(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT],v(t,t=>{fq(t)||ZU(r,t)||i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${t.name}> on token <${e.name}> outside of mode <${n}> +`,type:Urt.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function srt(t,e,r){let n=[],i=!1,a=l$(VP(HU(t.modes))),s=Yj(a,t=>t[mrt]===jrt.NA),o=drt(r);return e&&v(s,t=>{var e=hrt(t,o);!1!==e?(e={message:urt(t,e),type:e.issue,tokenType:t},n.push(e)):FU(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(i=!0):Bet(o,t.PATTERN)&&(i=!0)}),e&&!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:$rt.NO_LINE_BREAKS_FLAGS}),i}function nrt(r){let i={},t=rP(r);return v(t,t=>{var e=r[t];if(!KT(e))throw Error("non exhaustive match");i[t]=[]}),i}function art(t){if(t=t.PATTERN,hq(t))return!1;if(C6(t))return!0;if(BU(t,"exec"))return!0;if(zU(t))return!1;throw Error("non exhaustive match")}function srt(t){return!(!zU(t)||1!==t.length)&&t.charCodeAt(0)}function ort(t,e){if(BU(t,"LINE_BREAKS"))return!1;if(hq(t.PATTERN)){try{Det(e,t.PATTERN)}catch(t){return{issue:$rt.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(zU(t.PATTERN))return!1;if(art(t))return{issue:$rt.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function lrt(t,e){if(e.issue===$rt.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + for details.`,type:Urt.NO_LINE_BREAKS_FLAGS}),n}function ort(r){let n={},t=nP(r);return v(t,t=>{var e=r[t];if(!ZT(e))throw Error("non exhaustive match");n[t]=[]}),n}function lrt(t){if(t=t.PATTERN,uq(t))return!1;if(_w(t))return!0;if(FU(t,"exec"))return!0;if(GU(t))return!1;throw Error("non exhaustive match")}function crt(t){return!(!GU(t)||1!==t.length)&&t.charCodeAt(0)}function hrt(t,e){if(FU(t,"LINE_BREAKS"))return!1;if(uq(t.PATTERN)){try{Bet(e,t.PATTERN)}catch(t){return{issue:Urt.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(GU(t.PATTERN))return!1;if(lrt(t))return{issue:Urt.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function urt(t,e){if(e.issue===Urt.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. The problem is in the <${t.name}> Token Type Root cause: ${e.errMsg}. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===$rt.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Urt.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. The problem is in the <${t.name}> Token Type - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function crt(t){return x(t,t=>zU(t)?t.charCodeAt(0):t)}function hrt(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}function urt(t){return t{CJ(),jrt(),NW(),Ptt(),Fet(),_et(),prt="PATTERN",grt="defaultMode",frt="modes",mrt="boolean"==typeof new RegExp("(?:)").sticky,me($et,"analyzeTokenTypes"),me(zet,"validatePatterns"),me(Get,"validateRegExpPattern"),me(Uet,"findMissingPatterns"),me(qet,"findInvalidPatterns"),yrt=/[^\\][$]/,me(jet,"findEndOfInputAnchor"),me(Wet,"findEmptyMatchRegExps"),vrt=/[^\\[][\^]|^\^/,me(Yet,"findStartOfInputAnchor"),me(Het,"findUnsupportedFlags"),me(Vet,"findDuplicatePatterns"),me(Xet,"findInvalidGroupType"),me(Ket,"findModesThatDoNotExist"),me(Zet,"findUnreachablePatterns"),me(Qet,"testTokenType"),me(Jet,"noMetaChar"),me(trt,"addStartOfInput"),me(ert,"addStickyFlag"),me(rrt,"performRuntimeChecks"),me(irt,"performWarningRuntimeChecks"),me(nrt,"cloneEmptyGroups"),me(art,"isCustomPattern"),me(srt,"isShortPattern"),xrt={test:me(function(e){var r=e.length;for(let t=this.lastIndex;t{t.isParent=0t.CATEGORIES)));var n=yG(r,e);e=e.concat(n),aq(n)?i=!1:r=n}return e}function Srt(t){v(t,t=>{Irt(t)||((Brt[Prt]=t).tokenTypeIdx=Prt++),Rrt(t)&&!KT(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Rrt(t)||(t.CATEGORIES=[]),Mrt(t)||(t.categoryMatches=[]),Drt(t)||(t.categoryMatchesMap={})})}function Art(t){v(t,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(t,e)=>{r.categoryMatches.push(Brt[e].tokenTypeIdx)})})}function Lrt(t){v(t,t=>{Nrt([],t)})}function Nrt(r,i){v(r,t=>{i.categoryMatchesMap[t.tokenTypeIdx]=!0}),v(i.CATEGORIES,t=>{var e=r.concat(i);KU(e,t)||Nrt(e,t)})}function Irt(t){return BU(t,"tokenTypeIdx")}function Rrt(t){return BU(t,"CATEGORIES")}function Mrt(t){return BU(t,"categoryMatches")}function Drt(t){return BU(t,"categoryMatchesMap")}function Ort(t){return BU(t,"tokenTypeIdx")}var Prt,Brt,Frt,$rt,zrt,Grt,Urt=t(()=>{NW(),me(Trt,"tokenStructuredMatcher"),me(Ert,"tokenStructuredMatcherNoCategories"),Prt=1,Brt={},me(Crt,"augmentTokenTypes"),me(_rt,"expandCategories"),me(Srt,"assignTokenDefaultProps"),me(Art,"assignCategoriesTokensProp"),me(Lrt,"assignCategoriesMapProp"),me(Nrt,"singleAssignCategoriesToksMap"),me(Irt,"hasShortKeyProperty"),me(Rrt,"hasCategoriesProperty"),me(Mrt,"hasExtendingTokensTypesProperty"),me(Drt,"hasExtendingTokensTypesMapProperty"),me(Ort,"isTokenType")}),qrt=t(()=>{Frt={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,i,n){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}}),jrt=t(()=>{var t;krt(),NW(),Ptt(),Urt(),qrt(),_et(),(t=$rt=$rt||{})[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE",zrt={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Frt,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(zrt),(Grt=class{static{me(this,"Lexer")}constructor(n,a=zrt){if(this.lexerDefinition=n,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(t,e)=>{var r,i,n,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:i,value:n}=(this.traceInitIndent <${t}>`),Rtt(e)),a=10 time: ${i}ms`),this.traceInitIndent--,n):e()},"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=aP({},zrt,a);var t=this.config.traceInitPerf;!0===t?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof t&&(this.traceInitMaxIdent=t,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,t=!0,i=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===zrt.lineTerminatorsPattern)this.config.lineTerminatorsPattern=xrt;else if(this.config.lineTerminatorCharacters===zrt.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(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=KT(n)?{modes:{defaultMode:e$(n)},defaultMode:grt}:(t=!1,e$(n))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(rrt(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(irt(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(t,e)=>{r.modes[e]=Wj(t,t=>gq(t))}),rP(r.modes)),e;if(v(r.modes,(e,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(zet(e,i))}),aq(this.lexerDefinitionErrors)){Crt(e);let t;this.TRACE_INIT("analyzeTokenTypes",()=>{t=$et(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=t.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=t.charCodeToPatternIdxToConfig,this.emptyGroups=aP({},this.emptyGroups,t.emptyGroups),this.hasCustom=t.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=t.canBeOptimized}})}),this.defaultMode=r.defaultMode,!aq(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw e=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function drt(t){return x(t,t=>GU(t)?t.charCodeAt(0):t)}function prt(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}function grt(t){return t{AJ(),Hrt(),IW(),$tt(),Get(),Net(),mrt="PATTERN",yrt="defaultMode",vrt="modes",xrt="boolean"==typeof new RegExp("(?:)").sticky,me(Uet,"analyzeTokenTypes"),me(qet,"validatePatterns"),me(jet,"validateRegExpPattern"),me(Wet,"findMissingPatterns"),me(Yet,"findInvalidPatterns"),brt=/[^\\][$]/,me(Het,"findEndOfInputAnchor"),me(Vet,"findEmptyMatchRegExps"),wrt=/[^\\[][\^]|^\^/,me(Xet,"findStartOfInputAnchor"),me(Ket,"findUnsupportedFlags"),me(Zet,"findDuplicatePatterns"),me(Qet,"findInvalidGroupType"),me(Jet,"findModesThatDoNotExist"),me(trt,"findUnreachablePatterns"),me(ert,"testTokenType"),me(rrt,"noMetaChar"),me(nrt,"addStartOfInput"),me(irt,"addStickyFlag"),me(art,"performRuntimeChecks"),me(srt,"performWarningRuntimeChecks"),me(ort,"cloneEmptyGroups"),me(lrt,"isCustomPattern"),me(crt,"isShortPattern"),krt={test:me(function(e){var r=e.length;for(let t=this.lastIndex;t{t.isParent=0t.CATEGORIES)));var i=vG(r,e);e=e.concat(i),sq(i)?n=!1:r=i}return e}function Nrt(t){v(t,t=>{Drt(t)||((zrt[$rt]=t).tokenTypeIdx=$rt++),Ort(t)&&!ZT(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Ort(t)||(t.CATEGORIES=[]),Prt(t)||(t.categoryMatches=[]),Brt(t)||(t.categoryMatchesMap={})})}function Irt(t){v(t,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(t,e)=>{r.categoryMatches.push(zrt[e].tokenTypeIdx)})})}function Rrt(t){v(t,t=>{Mrt([],t)})}function Mrt(r,n){v(r,t=>{n.categoryMatchesMap[t.tokenTypeIdx]=!0}),v(n.CATEGORIES,t=>{var e=r.concat(n);ZU(e,t)||Mrt(e,t)})}function Drt(t){return FU(t,"tokenTypeIdx")}function Ort(t){return FU(t,"CATEGORIES")}function Prt(t){return FU(t,"categoryMatches")}function Brt(t){return FU(t,"categoryMatchesMap")}function Frt(t){return FU(t,"tokenTypeIdx")}var $rt,zrt,Grt,Urt,qrt,jrt,Wrt=t(()=>{IW(),me(_rt,"tokenStructuredMatcher"),me(Srt,"tokenStructuredMatcherNoCategories"),$rt=1,zrt={},me(Art,"augmentTokenTypes"),me(Lrt,"expandCategories"),me(Nrt,"assignTokenDefaultProps"),me(Irt,"assignCategoriesTokensProp"),me(Rrt,"assignCategoriesMapProp"),me(Mrt,"singleAssignCategoriesToksMap"),me(Drt,"hasShortKeyProperty"),me(Ort,"hasCategoriesProperty"),me(Prt,"hasExtendingTokensTypesProperty"),me(Brt,"hasExtendingTokensTypesMapProperty"),me(Frt,"isTokenType")}),Yrt=t(()=>{Grt={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}}),Hrt=t(()=>{var t;Crt(),IW(),$tt(),Wrt(),Yrt(),Net(),(t=Urt=Urt||{})[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE",qrt={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Grt,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(qrt),(jrt=class{static{me(this,"Lexer")}constructor(i,a=qrt){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=(t,e)=>{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 <${t}>`),Ott(e)),a=10 time: ${n}ms`),this.traceInitIndent--,i):e()},"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=sP({},qrt,a);var t=this.config.traceInitPerf;!0===t?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof t&&(this.traceInitMaxIdent=t,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,t=!0,n=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===qrt.lineTerminatorsPattern)this.config.lineTerminatorsPattern=krt;else if(this.config.lineTerminatorCharacters===qrt.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(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=ZT(i)?{modes:{defaultMode:r$(i)},defaultMode:yrt}:(t=!1,r$(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(art(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(srt(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(t,e)=>{r.modes[e]=Yj(t,t=>fq(t))}),nP(r.modes)),e;if(v(r.modes,(e,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(qet(e,n))}),sq(this.lexerDefinitionErrors)){Art(e);let t;this.TRACE_INIT("analyzeTokenTypes",()=>{t=Uet(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=t.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=t.charCodeToPatternIdxToConfig,this.emptyGroups=sP({},this.emptyGroups,t.emptyGroups),this.hasCustom=t.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=t.canBeOptimized}})}),this.defaultMode=r.defaultMode,!sq(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw e=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- `),new Error(`Errors detected in definition of Lexer: -`+e);v(this.lexerDefinitionWarning,t=>{Ntt(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(mrt?(this.chopInput=L8,this.match=this.matchWithTest):(this.updateLastIndex=SO,this.match=this.matchWithExec),t&&(this.handleModes=SO),!1===this.trackStartLines&&(this.computeNewColumn=L8),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=SO),/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 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 t=Uj(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(a.ensureOptimizations&&!aq(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized. +`+e);v(this.lexerDefinitionWarning,t=>{Mtt(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(xrt?(this.chopInput=N8,this.match=this.matchWithTest):(this.updateLastIndex=AO,this.match=this.matchWithExec),t&&(this.handleModes=AO),!1===this.trackStartLines&&(this.computeNewColumn=N8),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=AO),/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 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 t=qj(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(a.ensureOptimizations&&!sq(t))throw Error(`Lexer Modes: < ${t.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",()=>{Tet()}),this.TRACE_INIT("toFastProperties",()=>{Dtt(this)})})}tokenize(t,e=this.defaultMode){if(aq(this.lexerDefinitionErrors))return this.tokenizeInternal(t,e);throw t=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{_et()}),this.TRACE_INIT("toFastProperties",()=>{Btt(this)})})}tokenize(t,e=this.defaultMode){if(sq(this.lexerDefinitionErrors))return this.tokenizeInternal(t,e);throw t=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- `),new Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+t)}tokenizeInternal(n,P){let t,a,e,r,i,s,o,l,c,h,B,u,d,F,p,g=n,$=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(n.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,w=nrt(this.emptyGroups),G=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,E=[],C=[],_=[],U=[];Object.freeze(U);let S;function A(){return E}function L(t){return t=urt(t),void 0===(t=C[t])?U:t}me(A,"getPossiblePatternsSlow"),me(L,"getPossiblePatternsOptimized");var q=me(t=>{var e;1===_.length&&void 0===t.tokenType.PUSH_MODE?(e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t),v.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})):(_.pop(),t=wG(_),E=this.patternIdxToConfig[t],C=this.charCodeToPatternIdxToConfig[t],T=E.length,e=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=C&&e?L:A)},"pop_mode");function N(t){_.push(t),C=this.charCodeToPatternIdxToConfig[t],E=this.patternIdxToConfig[t],T=E.length,T=E.length,t=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=C&&t?L:A}me(N,"push_mode"),N.call(this,P);let I,j=this.config.recoveryEnabled;for(;f<$;){s=null;var W=g.charCodeAt(f),Y=S(W),H=Y.length;for(t=0;ts.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)),n=this.chopInput(n,c),f+=c,b=this.computeNewColumn(b,c),!0===G&&!0===I.canLineTerminator){let t=0,e,r;for(k.lastIndex=0;!0===(e=k.test(s))&&(r=k.lastIndex-1,t++),!0===e;);0!==t&&(x+=t,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,t,x,b,c))}this.handleModes(I,q,N,u)}else{let t=f,e=x,r=b,i=!1===j;for(;!1===i&&f<$;)for(n=this.chopInput(n,1),f++,a=0;a{NW(),jrt(),Urt(),me(Wrt,"tokenLabel"),me(Yrt,"hasTokenLabel"),Zrt="parent",Qrt="categories",Jrt="label",tit="group",eit="push_mode",rit="pop_mode",iit="longer_alt",nit="line_breaks",ait="start_chars_hint",me(Hrt,"createToken"),me(Vrt,"createTokenInternal"),Crt([sit=Hrt({name:"EOF",pattern:Grt.NA})]),me(Xrt,"createTokenInstance"),me(Krt,"tokenMatcher")}),uit=t(()=>{hit(),NW(),set(),oit={buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${Yrt(t)?`--> ${Wrt(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,customUserDescription:r}){var i="Expecting: ",e=` -but found: '`+oU(e).image+"'";return r?i+r+e:(r=Uj(t,(t,e)=>t.concat(e),[]),t=x(r,t=>`[${x(t,t=>Wrt(t)).join(", ")}]`),i+`one of these possible Token sequences: +`+t)}tokenizeInternal(i,P){let t,a,e,r,n,s,o,l,c,h,B,u,d,F,p,g=i,$=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=ort(this.emptyGroups),G=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,E=[],C=[],_=[],U=[];Object.freeze(U);let S;function A(){return E}function L(t){return t=grt(t),void 0===(t=C[t])?U:t}me(A,"getPossiblePatternsSlow"),me(L,"getPossiblePatternsOptimized");var q=me(t=>{var e;1===_.length&&void 0===t.tokenType.PUSH_MODE?(e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t),v.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})):(_.pop(),t=kG(_),E=this.patternIdxToConfig[t],C=this.charCodeToPatternIdxToConfig[t],T=E.length,e=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=C&&e?L:A)},"pop_mode");function N(t){_.push(t),C=this.charCodeToPatternIdxToConfig[t],E=this.patternIdxToConfig[t],T=E.length,T=E.length,t=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=C&&t?L:A}me(N,"push_mode"),N.call(this,P);let I,j=this.config.recoveryEnabled;for(;f<$;){s=null;var W=g.charCodeAt(f),Y=S(W),H=Y.length;for(t=0;ts.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 t=0,e,r;for(k.lastIndex=0;!0===(e=k.test(s))&&(r=k.lastIndex-1,t++),!0===e;);0!==t&&(x+=t,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,t,x,b,c))}this.handleModes(I,q,N,u)}else{let t=f,e=x,r=b,n=!1===j;for(;!1===n&&f<$;)for(i=this.chopInput(i,1),f++,a=0;a{IW(),Hrt(),Wrt(),me(Vrt,"tokenLabel"),me(Xrt,"hasTokenLabel"),tnt="parent",ent="categories",rnt="label",nnt="group",ant="push_mode",snt="pop_mode",ont="longer_alt",lnt="line_breaks",cnt="start_chars_hint",me(Krt,"createToken"),me(Zrt,"createTokenInternal"),Art([hnt=Krt({name:"EOF",pattern:jrt.NA})]),me(Qrt,"createTokenInstance"),me(Jrt,"tokenMatcher")}),fnt=t(()=>{gnt(),IW(),het(),unt={buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${Xrt(t)?`--> ${Vrt(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=` +but found: '`+lU(e).image+"'";return r?n+r+e:(r=qj(t,(t,e)=>t.concat(e),[]),t=x(r,t=>`[${x(t,t=>Vrt(t)).join(", ")}]`),n+`one of these possible Token sequences: `+x(t,(t,e)=>` ${e+1}. `+t).join(` -`)+e)},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r}){var i="Expecting: ",e=` -but found: '`+oU(e).image+"'";return r?i+r+e:i+`expecting at least one iteration which starts with one of these possible Token sequences:: - <${x(t,t=>`[${x(t,t=>Wrt(t)).join(",")}]`).join(" ,")}>`+e}},Object.freeze(oit),lit={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- -inside top level rule: ->`+t.name+"<-"}},cit={buildDuplicateFoundError(t,e){function r(t){return t instanceof Ztt?t.terminalType.name:t instanceof Utt?t.nonTerminalName:""}me(r,"getExtraProductionArgument");let i=t.name,n=oU(e),a=n.idx,s=net(n),o=r(n),l=0${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} - appears more than once (${e.length} times) in the top level rule: ->${i}<-. +`)+e)},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=` +but found: '`+lU(e).image+"'";return r?n+r+e:n+`expecting at least one iteration which starts with one of these possible Token sequences:: + <${x(t,t=>`[${x(t,t=>Vrt(t)).join(",")}]`).join(" ,")}>`+e}},Object.freeze(unt),dnt={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+t.name+"<-"}},pnt={buildDuplicateFoundError(t,e){function r(t){return t instanceof tet?t.terminalType.name:t instanceof Wtt?t.nonTerminalName:""}me(r,"getExtraProductionArgument");let n=t.name,i=lU(e),a=i.idx,s=oet(i),o=r(i),l=0${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} + appears more than once (${e.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(t){return`Namespace conflict found in grammar. The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.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(t){var e=x(t.prefixPath,t=>Wrt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){var e=x(t.prefixPath,t=>Vrt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix in inside <${t.topLevelRule.name}> Rule, <${e}> 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(t){var e=x(t.prefixPath,t=>Wrt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, +For Further details.`},buildAlternationAmbiguityError(t){var e=x(t.prefixPath,t=>Vrt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, <${e}> 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(t){let e=net(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. +For Further details.`},buildEmptyRepetitionError(t){let e=oet(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in inside <${t.topLevelRule.name}> Rule. Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives: inside <${t.topLevelRule.name}> Rule. @@ -768,62 +783,62 @@ rule: <${e}> can be invoked from itself (directly or indirectly) without consuming any Tokens. The grammar path that causes this is: ${e+" --\x3e "+x(t.leftRecursionPath,t=>t.name).concat([e]).join(" --\x3e ")} To fix this refactor your grammar to remove the left recursion. -see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){return`Duplicate definition, rule: ->${t.topLevelRule instanceof qtt?t.topLevelRule.name:t.topLevelRule}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function dit(t,e){return(t=new pit(t,e)).resolveRefs(),t.errors}var pit,git=t(()=>{Rat(),NW(),set(),me(dit,"resolveGrammar"),pit=class extends Qtt{static{me(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){v(YU(this.nameToTopRule),t=>{(this.currTopLevel=t).accept(this)})}visitNonTerminal(t){var e=this.nameToTopRule[t.nonTerminalName];e?t.referencedRule=e:(e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t),this.errors.push({message:e,type:Lat.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName}))}}});function fit(e,r,i=[]){i=e$(i);let n=[],a=0;function s(t){return t.concat(EG(e,a+1))}function o(t){return t=fit(s(t),r,i),n.concat(t)}for(me(s,"remainingPathWith"),me(o,"getAlternativesForProd");i.length{!1===aq(t.definition)&&(n=o(t.definition))}),n;if(!(t instanceof Ztt))throw Error("non exhaustive match");i.push(t.terminalType)}}a++}return n.push({partialPath:i,suffixDef:EG(e,a)}),n}function mit(t,e,r,i){let n="EXIT_NONE_TERMINAL",a=[n],s="EXIT_ALTERNATIVE",o=!1,l=e.length,c=l-i-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!aq(u);)if((v=u.pop())===s)o&&wG(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!aq(d)){var m=d[0];if(m===n)v={idx:p,def:EG(d),ruleStack:SG(g),occurrenceStack:SG(f)},u.push(v);else if(m instanceof Ztt)if(p{NW(),met(),het(),set(),xit=class extends cet{static{me(this,"AbstractNextPossibleTokensWalker")}constructor(t,e){super(),this.topProd=t,this.path=e,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=e$(this.path.ruleStack).reverse(),this.occurrenceStack=e$(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,e=[]){this.found||super.walk(t,e)}walkProdRef(t,e,r){t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence&&(e=e.concat(r),this.updateExpectedNext(),this.walk(t.referencedRule,e))}updateExpectedNext(){aq(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},vit=class extends xit{static{me(this,"NextAfterTokenWalker")}constructor(t,e){super(t,e),this.path=e,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,e,r){this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found&&(t=e.concat(r),e=new jtt({definition:t}),this.possibleTokTypes=uet(e),this.found=!0)}},xit=class extends cet{static{me(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,e){super(),this.topRule=t,this.occurrence=e,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},bit=class extends xit{static{me(this,"NextTerminalAfterManyWalker")}walkMany(t,e,r){var i;t.idx===this.occurrence?(i=oU(e.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Ztt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkMany(t,e,r)}},wit=class extends xit{static{me(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,r){var i;t.idx===this.occurrence?(i=oU(e.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Ztt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkManySep(t,e,r)}},kit=class extends xit{static{me(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,r){var i;t.idx===this.occurrence?(i=oU(e.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Ztt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOne(t,e,r)}},Tit=class extends xit{static{me(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,r){var i;t.idx===this.occurrence?(i=oU(e.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Ztt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOneSep(t,e,r)}},me(fit,"possiblePathsFrom"),me(mit,"nextPossibleTokensAfter"),me(yit,"expandTopLevelRule")});function Cit(t){if(t instanceof Wtt||"Option"===t)return zit.OPTION;if(t instanceof Vtt||"Repetition"===t)return zit.REPETITION;if(t instanceof Ytt||"RepetitionMandatory"===t)return zit.REPETITION_MANDATORY;if(t instanceof Htt||"RepetitionMandatoryWithSeparator"===t)return zit.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Xtt||"RepetitionWithSeparator"===t)return zit.REPETITION_WITH_SEPARATOR;if(t instanceof Ktt||"Alternation"===t)return zit.ALTERNATION;throw Error("non exhaustive match")}function _it(t){var{occurrence:t,rule:e,prodType:r,maxLookahead:i}=t;return(r=Cit(r))===zit.ALTERNATION?Oit(t,e,i):Pit(t,e,r,i)}function Sit(t,e,r,i,n,a){return a(t=Oit(t,e,r),i,$it(t)?Ert:Trt,n)}function Ait(t,e,r,i,n,a){return e=$it(t=Pit(t,e,n,r))?Ert:Trt,a(t[0],e,i)}function Lit(c,t,h,e){let u=c.length,r=UG(c,t=>UG(t,t=>1===t.length));if(t)return function(t){var r=x(t,t=>t.GATE);for(let e=0;eHP(t)),e=Uj(t,(e,t,r)=>(v(t,t=>{BU(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),v(t.categoryMatches,t=>{BU(e,t)||(e[t]=r)})}),e),{});return function(){var t=this.LA(1);return e[t.tokenTypeIdx]}}}function Nit(n,a,r){let t=UG(n,t=>1===t.length),s=n.length;if(!t||r)return function(){t:for(let t=0;t(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}function Iit(e){var r=new Array(e);for(let t=0;tfit([t],1)),n=Iit(e.length),a=x(e,t=>{let e={};return v(t,t=>{t=Rit(t.partialPath),v(t,t=>{e[t]=!0})}),e}),s=e;for(let r=1;r<=i;r++){var o=s;s=Iit(o.length);for(let e=0;e{t=Rit(t.partialPath),v(t,t=>{a[e][t]=!0})})}}}return n}function Oit(t,e,r,i){return t=new Uit(t,zit.ALTERNATION,i),e.accept(t),Dit(t.result,r)}function Pit(t,e,r,i){var n=new Uit(t,r),n=(e.accept(n),n.result),e=new Git(e,t,r).startWalking();return Dit([new jtt({definition:n}),new jtt({definition:e})],i)}function Bit(e,r){t:for(let t=0;tt===(e=r[e])||e.categoryMatchesMap[t.tokenTypeIdx])}function $it(t){return UG(t,t=>UG(t,t=>UG(t,t=>aq(t.categoryMatches))))}var zit,Git,Uit,qit=t(()=>{var t;NW(),Eit(),het(),Urt(),set(),(t=zit=zit||{})[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION",me(Cit,"getProdType"),me(_it,"getLookaheadPaths"),me(Sit,"buildLookaheadFuncForOr"),me(Ait,"buildLookaheadFuncForOptionalProd"),me(Lit,"buildAlternativesLookAheadFunc"),me(Nit,"buildSingleAlternativeLookaheadFunction"),Git=class extends cet{static{me(this,"RestDefinitionFinderWalker")}constructor(t,e,r){super(),this.topProd=t,this.targetOccurrence=e,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,e,r,i){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=r.concat(i),!0)}walkOption(t,e,r){this.checkIsTarget(t,zit.OPTION,e,r)||super.walkOption(t,e,r)}walkAtLeastOne(t,e,r){this.checkIsTarget(t,zit.REPETITION_MANDATORY,e,r)||super.walkOption(t,e,r)}walkAtLeastOneSep(t,e,r){this.checkIsTarget(t,zit.REPETITION_MANDATORY_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}walkMany(t,e,r){this.checkIsTarget(t,zit.REPETITION,e,r)||super.walkOption(t,e,r)}walkManySep(t,e,r){this.checkIsTarget(t,zit.REPETITION_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}},Uit=class extends Qtt{static{me(this,"InsideDefinitionFinderVisitor")}constructor(t,e,r){super(),this.targetOccurrence=t,this.targetProdType=e,this.targetRef=r,this.result=[]}checkIsTarget(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,zit.OPTION)}visitRepetition(t){this.checkIsTarget(t,zit.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,zit.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,zit.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,zit.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,zit.ALTERNATION)}},me(Iit,"initializeArrayOfArrays"),me(Rit,"pathToHashKeys"),me(Mit,"isUniquePrefixHash"),me(Dit,"lookAheadSequenceFromAlternatives"),me(Oit,"getLookaheadPathsForOr"),me(Pit,"getLookaheadPathsForOptionalProd"),me(Bit,"containsPath"),me(Fit,"isStrictPrefixOfPath"),me($it,"areTokenCategoriesNotUsed")});function jit(t){return t=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName}),x(t,t=>Object.assign({type:Lat.CUSTOM_LOOKAHEAD_VALIDATION},t))}function Wit(e,t,r,i){var n=mU(e,t=>Yit(t,r)),t=snt(e,t,r),a=mU(e,t=>ent(t,r)),s=mU(e,t=>Xit(t,e,i,r));return n.concat(t,a,s)}function Yit(i,n){var t=new ont,t=(i.accept(t),t.allProductions),t=CU(t,Hit),t=jq(t,t=>1{var e=oU(t),t=n.buildDuplicateFoundError(i,t),r=net(e),t={message:t,type:Lat.DUPLICATE_PRODUCTIONS,ruleName:i.name,dslName:r,occurrence:e.idx};return(r=Vit(e))&&(t.parameter=r),t})}function Hit(t){return`${net(t)}_#_${t.idx}_#_`+Vit(t)}function Vit(t){return t instanceof Ztt?t.terminalType.name:t instanceof Utt?t.nonTerminalName:""}function Xit(r,t,e,i){var n=[];return 1e.name===r.name?t+1:t,0)&&(t=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:e}),n.push({message:t,type:Lat.DUPLICATE_RULE_NAME,ruleName:r.name})),n}function Kit(t,e,r){var i=[];return KU(e,t)||i.push({message:`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,type:Lat.INVALID_RULE_OVERRIDE,ruleName:t}),i}function Zit(r,t,i,n=[]){var e,a=[],t=Qit(t.definition);return aq(t)?[]:(e=r.name,KU(t,r)&&a.push({message:i.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:n}),type:Lat.LEFT_RECURSION,ruleName:e}),e=yG(t,n.concat([r])),t=mU(e,t=>{var e=e$(n);return e.push(t),Zit(r,t,i,e)}),a.concat(t))}function Qit(t){let e=[];if(aq(t))return e;if((r=oU(t))instanceof Utt)e.push(r.referencedRule);else if(r instanceof jtt||r instanceof Wtt||r instanceof Ytt||r instanceof Htt||r instanceof Xtt||r instanceof Vtt)e=e.concat(Qit(r.definition));else if(r instanceof Ktt)e=HP(x(r.definition,t=>Qit(t.definition)));else if(!(r instanceof Ztt))throw Error("non exhaustive match");var r=ret(r),i=1{var t=SG(r.definition);return mU(t,(t,e)=>(t=mit([t],[],Trt,1),aq(t)?[{message:n.buildEmptyAlternationError({topLevelRule:i,alternation:r,emptyChoiceIdx:e}),type:Lat.NONE_LAST_EMPTY_ALT,ruleName:i.name,occurrence:r.idx,alternative:e+1}]:[]))})}function tnt(i,n,a){var t=new lnt,t=(i.accept(t),t.alternations),t=Wj(t,t=>!0===t.ignoreAmbiguities);return mU(t,t=>{var e=nnt(r=Oit(t.idx,i,t.maxLookahead||n,t),t,i,a),r=ant(r,t,i,a);return e.concat(r)})}function ent(e,r){var t=new lnt,t=(e.accept(t),t.alternations);return mU(t,t=>255{var t=new cnt,t=(i.accept(t),t.allProductions);v(t,t=>{var e=Cit(t),r=t.maxLookahead||n,e=Pit(t.idx,i,e,r)[0];aq(HP(e))&&(r=a.buildEmptyRepetitionError({topLevelRule:i,repetition:t}),s.push({message:r,type:Lat.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name}))})}),s}function nnt(a,s,r,i){let o=[],t=Uj(a,(t,e,n)=>(!0!==s.definition[n].ignoreAmbiguities&&v(e,r=>{let i=[n];v(a,(t,e)=>{n!==e&&Bit(t,r)&&!0!==s.definition[e].ignoreAmbiguities&&i.push(e)}),1{var e=x(t.alts,t=>t+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:e,prefixPath:t.path}),type:Lat.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:t.alts}})}function ant(t,n,a,s){let o=Uj(t,(t,e,r)=>(e=x(e,t=>({idx:r,path:t})),t.concat(e)),[]);return o$(mU(o,t=>{if(!0===n.definition[t.idx].ignoreAmbiguities)return[];let i=t.idx,e=t.path,r=VG(o,t=>!0!==n.definition[t.idx].ignoreAmbiguities&&t.idx{var e=[t.idx+1,i+1],r=0===n.idx?"":n.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:n,ambiguityIndices:e,prefixPath:t.path}),type:Lat.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:e}})}))}function snt(t,e,r){let i=[],n=x(e,t=>t.name);return v(t,t=>{var e=t.name;KU(n,e)&&(t=r.buildNamespaceConflictError(t),i.push({message:t,type:Lat.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e}))}),i}var ont,lnt,cnt,hnt=t(()=>{NW(),Rat(),set(),qit(),Eit(),Urt(),me(jit,"validateLookahead"),me(Wit,"validateGrammar"),me(Yit,"validateDuplicateProductions"),me(Hit,"identifyProductionForDuplicates"),me(Vit,"getExtraProductionArgument"),ont=class extends Qtt{static{me(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}},me(Xit,"validateRuleDoesNotAlreadyExist"),me(Kit,"validateRuleIsOverridden"),me(Zit,"validateNoLeftRecursion"),me(Qit,"getFirstNoneTerminal"),lnt=class extends Qtt{static{me(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}},me(Jit,"validateEmptyOrAlternative"),me(tnt,"validateAmbiguousAlternationAlternatives"),cnt=class extends Qtt{static{me(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}},me(ent,"validateTooManyAlts"),me(rnt,"validateSomeNonEmptyLookaheadPath"),me(nnt,"checkAlternativesAmbiguities"),me(ant,"checkPrefixAlternativesAmbiguities"),me(snt,"checkTerminalAndNoneTerminalsNameSpace")});function unt(t){let e=oG(t,{errMsgProvider:lit}),r={};return v(t.rules,t=>{r[t.name]=t}),dit(r,e.errMsgProvider)}function dnt(t){return Wit((t=oG(t,{errMsgProvider:cit})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var pnt=t(()=>{NW(),git(),hnt(),uit(),me(unt,"resolveGrammar"),me(dnt,"validateGrammar")});function gnt(t){return KU(fnt,t.name)}var fnt,mnt,ynt,vnt,xnt,bnt,wnt=t(()=>{NW(),fnt=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(fnt),me(gnt,"isRecognitionException"),mnt=class extends Error{static{me(this,"RecognitionException")}constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},ynt=class extends mnt{static{me(this,"MismatchedTokenException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="MismatchedTokenException"}},vnt=class extends mnt{static{me(this,"NoViableAltException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="NoViableAltException"}},xnt=class extends mnt{static{me(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name="NotAllInputParsedException"}},bnt=class extends mnt{static{me(this,"EarlyExitException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="EarlyExitException"}}});function knt(t,e,r,i,n,a,s){let o=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[o],c=(void 0===l&&(i=this.getCurrRuleFullName(),i=this.getGAstProductions()[i],l=new a(i,n).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=sit,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(t,e,r,c)}var Tnt,Ent,Cnt,_nt,Snt=t(()=>{hit(),NW(),wnt(),yet(),Rat(),Tnt={},Ent="InRuleRecoveryException",Cnt=class extends Error{static{me(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=Ent}},_nt=class{static{me(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(BU(t,"recoveryEnabled")?t:Sat).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=knt)}getTokenToInsert(t){return(t=Xrt(t,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,r,i){let n=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=me(()=>{var t=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:t,ruleName:this.getCurrRuleFullName()});(t=new ynt(t,l,this.LA(0))).resyncedTokens=SG(s),this.SAVE_ERROR(t)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,i))return void h();if(r.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,n)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,r){return!(!1===r||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))}getFollowsForInRuleRecovery(t,e){return t=this.getCurrentGrammarPath(t,e),this.getNextPossibleTokenTypes(t)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t))return e=this.SKIP_TOKEN(),this.consumeToken(),e;throw new Cnt("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t)||aq(e))return!1;let r=this.LA(1);return void 0!==iU(e,t=>this.tokenMatcher(r,t))}canRecoverWithSingleTokenDeletion(t){return!!this.canTokenTypeBeDeletedInRecovery(t)&&this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){var e=this.getCurrFollowKey(),e=this.getFollowSetFromFollowKey(e);return KU(e,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),e=this.LA(1),r=2;for(;;){var i=iU(t,t=>Krt(e,t));if(void 0!==i)return i;e=this.LA(r),r++}}getCurrFollowKey(){var t,e,r;return 1===this.RULE_STACK.length?Tnt:(t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName(),{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(r)})}buildFullFollowKeyStack(){let r=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return x(r,(t,e)=>0===e?Tnt:{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:i[e],inRule:this.shortRuleNameToFullName(r[e-1])})}flattenFollowSet(){var t=x(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return HP(t)}getFollowSetFromFollowKey(t){return t===Tnt?[sit]:(t=t.ruleName+t.idxInCallingRule+fet+t.inRule,this.resyncFollows[t])}addToResyncTokens(t,e){return this.tokenMatcher(t,sit)||e.push(t),e}reSyncTo(t){let e=[],r=this.LA(1);for(;!1===this.tokenMatcher(r,t);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,e);return SG(e)}attemptInRepetitionRecovery(t,e,r,i,n,a,s){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:e$(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return x(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},me(knt,"attemptInRepetitionRecovery")});function Ant(t,e,r){return r|e|t}var Lnt,Nnt=t(()=>{me(Ant,"getKeyForAutomaticLookahead")}),Int=t(()=>{NW(),uit(),Rat(),hnt(),qit(),Lnt=class{static{me(this,"LLkLookaheadStrategy")}constructor(t){this.maxLookahead=null!=(t=t?.maxLookahead)?t:Sat.maxLookahead}validate(t){var e,r,i=this.validateNoLeftRecursion(t.rules);return aq(i)?(e=this.validateEmptyOrAlternatives(t.rules),r=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),t=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead),[...i,...e,...r,...t]):i}validateNoLeftRecursion(t){return mU(t,t=>Zit(t,t,cit))}validateEmptyOrAlternatives(t){return mU(t,t=>Jit(t,cit))}validateAmbiguousAlternationAlternatives(t,e){return mU(t,t=>tnt(t,e,cit))}validateSomeNonEmptyLookaheadPath(t,e){return rnt(t,e,cit)}buildLookaheadForAlternation(t){return Sit(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Lit)}buildLookaheadForOptional(t){return Ait(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,Cit(t.prodType),Nit)}}});function Rnt(t){return Ont.reset(),t.accept(Ont),t=Ont.dslMethods,Ont.reset(),t}var Mnt,Dnt,Ont,Pnt=t(()=>{NW(),Rat(),Nnt(),set(),Int(),Mnt=class{static{me(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=(BU(t,"dynamicTokensEnabled")?t:Sat).dynamicTokensEnabled,this.maxLookahead=(BU(t,"maxLookahead")?t:Sat).maxLookahead,this.lookaheadStrategy=BU(t,"lookaheadStrategy")?t.lookaheadStrategy:new Lnt({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){v(t,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:t,repetition:e,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:n,repetitionWithSeparator:a}=Rnt(s);v(t,r=>{var t=0===r.idx?"":r.idx;this.TRACE_INIT(""+net(r)+t,()=>{var t=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),e=Ant(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(e,t)})}),v(e,t=>{this.computeLookaheadFunc(s,t.idx,768,"Repetition",t.maxLookahead,net(t))}),v(r,t=>{this.computeLookaheadFunc(s,t.idx,512,"Option",t.maxLookahead,net(t))}),v(i,t=>{this.computeLookaheadFunc(s,t.idx,1024,"RepetitionMandatory",t.maxLookahead,net(t))}),v(n,t=>{this.computeLookaheadFunc(s,t.idx,1536,"RepetitionMandatoryWithSeparator",t.maxLookahead,net(t))}),v(a,t=>{this.computeLookaheadFunc(s,t.idx,1280,"RepetitionWithSeparator",t.maxLookahead,net(t))})})})}computeLookaheadFunc(r,i,n,a,s,t){this.TRACE_INIT(""+t+(0===i?"":i),()=>{var t=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:i,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),e=Ant(this.fullRuleNameToShort[r.name],n,i);this.setLaFuncCache(e,t)})}getKeyForAutomaticLookahead(t,e){return e|t|this.getLastExplicitRuleShortName()}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},Dnt=class extends Qtt{static{me(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},Ont=new Dnt,me(Rnt,"collectMethods")});function Bnt(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{me(Bnt,"setNodeLocationOnlyOffset"),me(Fnt,"setNodeLocationFull"),me($nt,"addTerminalToCst"),me(znt,"addNoneTerminalToCst")});function Unt(t,e){Object.defineProperty(t,qnt,{enumerable:!1,configurable:!0,writable:!1,value:e})}var qnt,jnt=t(()=>{qnt="name",me(Unt,"defineNameProp")});function Wnt(e,r){var i=rP(e),n=i.length;for(let t=0;tt.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>: +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){return`Duplicate definition, rule: ->${t.topLevelRule instanceof Ytt?t.topLevelRule.name:t.topLevelRule}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function mnt(t,e){return(t=new ynt(t,e)).resolveRefs(),t.errors}var ynt,vnt=t(()=>{Oat(),IW(),het(),me(mnt,"resolveGrammar"),ynt=class extends eet{static{me(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){v(HU(this.nameToTopRule),t=>{(this.currTopLevel=t).accept(this)})}visitNonTerminal(t){var e=this.nameToTopRule[t.nonTerminalName];e?t.referencedRule=e:(e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t),this.errors.push({message:e,type:Rat.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName}))}}});function xnt(e,r,n=[]){n=r$(n);let i=[],a=0;function s(t){return t.concat(CG(e,a+1))}function o(t){return t=xnt(s(t),r,n),i.concat(t)}for(me(s,"remainingPathWith"),me(o,"getAlternativesForProd");n.length{!1===sq(t.definition)&&(i=o(t.definition))}),i;if(!(t instanceof tet))throw Error("non exhaustive match");n.push(t.terminalType)}}a++}return i.push({partialPath:n,suffixDef:CG(e,a)}),i}function bnt(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=e.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!sq(u);)if((v=u.pop())===s)o&&kG(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!sq(d)){var m=d[0];if(m===i)v={idx:p,def:CG(d),ruleStack:AG(g),occurrenceStack:AG(f)},u.push(v);else if(m instanceof tet)if(p{IW(),xet(),pet(),het(),Tnt=class extends det{static{me(this,"AbstractNextPossibleTokensWalker")}constructor(t,e){super(),this.topProd=t,this.path=e,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=r$(this.path.ruleStack).reverse(),this.occurrenceStack=r$(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,e=[]){this.found||super.walk(t,e)}walkProdRef(t,e,r){t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence&&(e=e.concat(r),this.updateExpectedNext(),this.walk(t.referencedRule,e))}updateExpectedNext(){sq(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},knt=class extends Tnt{static{me(this,"NextAfterTokenWalker")}constructor(t,e){super(t,e),this.path=e,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,e,r){this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found&&(t=e.concat(r),e=new Htt({definition:t}),this.possibleTokTypes=get(e),this.found=!0)}},Tnt=class extends det{static{me(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,e){super(),this.topRule=t,this.occurrence=e,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},Ent=class extends Tnt{static{me(this,"NextTerminalAfterManyWalker")}walkMany(t,e,r){var n;t.idx===this.occurrence?(n=lU(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof tet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkMany(t,e,r)}},Cnt=class extends Tnt{static{me(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,r){var n;t.idx===this.occurrence?(n=lU(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof tet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkManySep(t,e,r)}},_nt=class extends Tnt{static{me(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,r){var n;t.idx===this.occurrence?(n=lU(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof tet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOne(t,e,r)}},Snt=class extends Tnt{static{me(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,r){var n;t.idx===this.occurrence?(n=lU(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof tet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOneSep(t,e,r)}},me(xnt,"possiblePathsFrom"),me(bnt,"nextPossibleTokensAfter"),me(wnt,"expandTopLevelRule")});function Lnt(t){if(t instanceof Vtt||"Option"===t)return jnt.OPTION;if(t instanceof Ztt||"Repetition"===t)return jnt.REPETITION;if(t instanceof Xtt||"RepetitionMandatory"===t)return jnt.REPETITION_MANDATORY;if(t instanceof Ktt||"RepetitionMandatoryWithSeparator"===t)return jnt.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Qtt||"RepetitionWithSeparator"===t)return jnt.REPETITION_WITH_SEPARATOR;if(t instanceof Jtt||"Alternation"===t)return jnt.ALTERNATION;throw Error("non exhaustive match")}function Nnt(t){var{occurrence:t,rule:e,prodType:r,maxLookahead:n}=t;return(r=Lnt(r))===jnt.ALTERNATION?$nt(t,e,n):znt(t,e,r,n)}function Int(t,e,r,n,i,a){return a(t=$nt(t,e,r),n,qnt(t)?Srt:_rt,i)}function Rnt(t,e,r,n,i,a){return e=qnt(t=znt(t,e,i,r))?Srt:_rt,a(t[0],e,n)}function Mnt(c,t,h,e){let u=c.length,r=qG(c,t=>qG(t,t=>1===t.length));if(t)return function(t){var r=x(t,t=>t.GATE);for(let e=0;eVP(t)),e=qj(t,(e,t,r)=>(v(t,t=>{FU(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),v(t.categoryMatches,t=>{FU(e,t)||(e[t]=r)})}),e),{});return function(){var t=this.LA(1);return e[t.tokenTypeIdx]}}}function Dnt(i,a,r){let t=qG(i,t=>1===t.length),s=i.length;if(!t||r)return function(){t:for(let t=0;t(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}function Ont(e){var r=new Array(e);for(let t=0;txnt([t],1)),i=Ont(e.length),a=x(e,t=>{let e={};return v(t,t=>{t=Pnt(t.partialPath),v(t,t=>{e[t]=!0})}),e}),s=e;for(let r=1;r<=n;r++){var o=s;s=Ont(o.length);for(let e=0;e{t=Pnt(t.partialPath),v(t,t=>{a[e][t]=!0})})}}}return i}function $nt(t,e,r,n){return t=new Ynt(t,jnt.ALTERNATION,n),e.accept(t),Fnt(t.result,r)}function znt(t,e,r,n){var i=new Ynt(t,r),i=(e.accept(i),i.result),e=new Wnt(e,t,r).startWalking();return Fnt([new Htt({definition:i}),new Htt({definition:e})],n)}function Gnt(e,r){t:for(let t=0;tt===(e=r[e])||e.categoryMatchesMap[t.tokenTypeIdx])}function qnt(t){return qG(t,t=>qG(t,t=>qG(t,t=>sq(t.categoryMatches))))}var jnt,Wnt,Ynt,Hnt=t(()=>{var t;IW(),Ant(),pet(),Wrt(),het(),(t=jnt=jnt||{})[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION",me(Lnt,"getProdType"),me(Nnt,"getLookaheadPaths"),me(Int,"buildLookaheadFuncForOr"),me(Rnt,"buildLookaheadFuncForOptionalProd"),me(Mnt,"buildAlternativesLookAheadFunc"),me(Dnt,"buildSingleAlternativeLookaheadFunction"),Wnt=class extends det{static{me(this,"RestDefinitionFinderWalker")}constructor(t,e,r){super(),this.topProd=t,this.targetOccurrence=e,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,e,r,n){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=r.concat(n),!0)}walkOption(t,e,r){this.checkIsTarget(t,jnt.OPTION,e,r)||super.walkOption(t,e,r)}walkAtLeastOne(t,e,r){this.checkIsTarget(t,jnt.REPETITION_MANDATORY,e,r)||super.walkOption(t,e,r)}walkAtLeastOneSep(t,e,r){this.checkIsTarget(t,jnt.REPETITION_MANDATORY_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}walkMany(t,e,r){this.checkIsTarget(t,jnt.REPETITION,e,r)||super.walkOption(t,e,r)}walkManySep(t,e,r){this.checkIsTarget(t,jnt.REPETITION_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}},Ynt=class extends eet{static{me(this,"InsideDefinitionFinderVisitor")}constructor(t,e,r){super(),this.targetOccurrence=t,this.targetProdType=e,this.targetRef=r,this.result=[]}checkIsTarget(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,jnt.OPTION)}visitRepetition(t){this.checkIsTarget(t,jnt.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,jnt.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,jnt.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,jnt.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,jnt.ALTERNATION)}},me(Ont,"initializeArrayOfArrays"),me(Pnt,"pathToHashKeys"),me(Bnt,"isUniquePrefixHash"),me(Fnt,"lookAheadSequenceFromAlternatives"),me($nt,"getLookaheadPathsForOr"),me(znt,"getLookaheadPathsForOptionalProd"),me(Gnt,"containsPath"),me(Unt,"isStrictPrefixOfPath"),me(qnt,"areTokenCategoriesNotUsed")});function Vnt(t){return t=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName}),x(t,t=>Object.assign({type:Rat.CUSTOM_LOOKAHEAD_VALIDATION},t))}function Xnt(e,t,r,n){var i=yU(e,t=>Knt(t,r)),t=cit(e,t,r),a=yU(e,t=>ait(t,r)),s=yU(e,t=>Jnt(t,e,n,r));return i.concat(t,a,s)}function Knt(n,i){var t=new hit,t=(n.accept(t),t.allProductions),t=_U(t,Znt),t=Wq(t,t=>1{var e=lU(t),t=i.buildDuplicateFoundError(n,t),r=oet(e),t={message:t,type:Rat.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:r,occurrence:e.idx};return(r=Qnt(e))&&(t.parameter=r),t})}function Znt(t){return`${oet(t)}_#_${t.idx}_#_`+Qnt(t)}function Qnt(t){return t instanceof tet?t.terminalType.name:t instanceof Wtt?t.nonTerminalName:""}function Jnt(r,t,e,n){var i=[];return 1e.name===r.name?t+1:t,0)&&(t=n.buildDuplicateRuleNameError({topLevelRule:r,grammarName:e}),i.push({message:t,type:Rat.DUPLICATE_RULE_NAME,ruleName:r.name})),i}function tit(t,e,r){var n=[];return ZU(e,t)||n.push({message:`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,type:Rat.INVALID_RULE_OVERRIDE,ruleName:t}),n}function eit(r,t,n,i=[]){var e,a=[],t=rit(t.definition);return sq(t)?[]:(e=r.name,ZU(t,r)&&a.push({message:n.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:Rat.LEFT_RECURSION,ruleName:e}),e=vG(t,i.concat([r])),t=yU(e,t=>{var e=r$(i);return e.push(t),eit(r,t,n,e)}),a.concat(t))}function rit(t){let e=[];if(sq(t))return e;if((r=lU(t))instanceof Wtt)e.push(r.referencedRule);else if(r instanceof Htt||r instanceof Vtt||r instanceof Xtt||r instanceof Ktt||r instanceof Qtt||r instanceof Ztt)e=e.concat(rit(r.definition));else if(r instanceof Jtt)e=VP(x(r.definition,t=>rit(t.definition)));else if(!(r instanceof tet))throw Error("non exhaustive match");var r=aet(r),n=1{var t=AG(r.definition);return yU(t,(t,e)=>(t=bnt([t],[],_rt,1),sq(t)?[{message:i.buildEmptyAlternationError({topLevelRule:n,alternation:r,emptyChoiceIdx:e}),type:Rat.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:r.idx,alternative:e+1}]:[]))})}function iit(n,i,a){var t=new uit,t=(n.accept(t),t.alternations),t=Yj(t,t=>!0===t.ignoreAmbiguities);return yU(t,t=>{var e=oit(r=$nt(t.idx,n,t.maxLookahead||i,t),t,n,a),r=lit(r,t,n,a);return e.concat(r)})}function ait(e,r){var t=new uit,t=(e.accept(t),t.alternations);return yU(t,t=>255{var t=new dit,t=(n.accept(t),t.allProductions);v(t,t=>{var e=Lnt(t),r=t.maxLookahead||i,e=znt(t.idx,n,e,r)[0];sq(VP(e))&&(r=a.buildEmptyRepetitionError({topLevelRule:n,repetition:t}),s.push({message:r,type:Rat.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name}))})}),s}function oit(a,s,r,n){let o=[],t=qj(a,(t,e,i)=>(!0!==s.definition[i].ignoreAmbiguities&&v(e,r=>{let n=[i];v(a,(t,e)=>{i!==e&&Gnt(t,r)&&!0!==s.definition[e].ignoreAmbiguities&&n.push(e)}),1{var e=x(t.alts,t=>t+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:e,prefixPath:t.path}),type:Rat.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:t.alts}})}function lit(t,i,a,s){let o=qj(t,(t,e,r)=>(e=x(e,t=>({idx:r,path:t})),t.concat(e)),[]);return l$(yU(o,t=>{if(!0===i.definition[t.idx].ignoreAmbiguities)return[];let n=t.idx,e=t.path,r=XG(o,t=>!0!==i.definition[t.idx].ignoreAmbiguities&&t.idx{var e=[t.idx+1,n+1],r=0===i.idx?"":i.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:i,ambiguityIndices:e,prefixPath:t.path}),type:Rat.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:e}})}))}function cit(t,e,r){let n=[],i=x(e,t=>t.name);return v(t,t=>{var e=t.name;ZU(i,e)&&(t=r.buildNamespaceConflictError(t),n.push({message:t,type:Rat.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e}))}),n}var hit,uit,dit,pit=t(()=>{IW(),Oat(),het(),Hnt(),Ant(),Wrt(),me(Vnt,"validateLookahead"),me(Xnt,"validateGrammar"),me(Knt,"validateDuplicateProductions"),me(Znt,"identifyProductionForDuplicates"),me(Qnt,"getExtraProductionArgument"),hit=class extends eet{static{me(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}},me(Jnt,"validateRuleDoesNotAlreadyExist"),me(tit,"validateRuleIsOverridden"),me(eit,"validateNoLeftRecursion"),me(rit,"getFirstNoneTerminal"),uit=class extends eet{static{me(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}},me(nit,"validateEmptyOrAlternative"),me(iit,"validateAmbiguousAlternationAlternatives"),dit=class extends eet{static{me(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}},me(ait,"validateTooManyAlts"),me(sit,"validateSomeNonEmptyLookaheadPath"),me(oit,"checkAlternativesAmbiguities"),me(lit,"checkPrefixAlternativesAmbiguities"),me(cit,"checkTerminalAndNoneTerminalsNameSpace")});function git(t){let e=lG(t,{errMsgProvider:dnt}),r={};return v(t.rules,t=>{r[t.name]=t}),mnt(r,e.errMsgProvider)}function fit(t){return Xnt((t=lG(t,{errMsgProvider:pnt})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var mit=t(()=>{IW(),vnt(),pit(),fnt(),me(git,"resolveGrammar"),me(fit,"validateGrammar")});function yit(t){return ZU(vit,t.name)}var vit,xit,bit,wit,kit,Tit,Eit=t(()=>{IW(),vit=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(vit),me(yit,"isRecognitionException"),xit=class extends Error{static{me(this,"RecognitionException")}constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},bit=class extends xit{static{me(this,"MismatchedTokenException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="MismatchedTokenException"}},wit=class extends xit{static{me(this,"NoViableAltException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="NoViableAltException"}},kit=class extends xit{static{me(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name="NotAllInputParsedException"}},Tit=class extends xit{static{me(this,"EarlyExitException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="EarlyExitException"}}});function Cit(t,e,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=hnt,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(t,e,r,c)}var _it,Sit,Ait,Lit,Nit=t(()=>{gnt(),IW(),Eit(),bet(),Oat(),_it={},Sit="InRuleRecoveryException",Ait=class extends Error{static{me(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=Sit}},Lit=class{static{me(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(FU(t,"recoveryEnabled")?t:Nat).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Cit)}getTokenToInsert(t){return(t=Qrt(t,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,r,n){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=me(()=>{var t=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:t,ruleName:this.getCurrRuleFullName()});(t=new bit(t,l,this.LA(0))).resyncedTokens=AG(s),this.SAVE_ERROR(t)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,r){return!(!1===r||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))}getFollowsForInRuleRecovery(t,e){return t=this.getCurrentGrammarPath(t,e),this.getNextPossibleTokenTypes(t)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t))return e=this.SKIP_TOKEN(),this.consumeToken(),e;throw new Ait("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t)||sq(e))return!1;let r=this.LA(1);return void 0!==iU(e,t=>this.tokenMatcher(r,t))}canRecoverWithSingleTokenDeletion(t){return!!this.canTokenTypeBeDeletedInRecovery(t)&&this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){var e=this.getCurrFollowKey(),e=this.getFollowSetFromFollowKey(e);return ZU(e,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),e=this.LA(1),r=2;for(;;){var n=iU(t,t=>Jrt(e,t));if(void 0!==n)return n;e=this.LA(r),r++}}getCurrFollowKey(){var t,e,r;return 1===this.RULE_STACK.length?_it:(t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName(),{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(r)})}buildFullFollowKeyStack(){let r=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return x(r,(t,e)=>0===e?_it:{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:n[e],inRule:this.shortRuleNameToFullName(r[e-1])})}flattenFollowSet(){var t=x(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return VP(t)}getFollowSetFromFollowKey(t){return t===_it?[hnt]:(t=t.ruleName+t.idxInCallingRule+vet+t.inRule,this.resyncFollows[t])}addToResyncTokens(t,e){return this.tokenMatcher(t,hnt)||e.push(t),e}reSyncTo(t){let e=[],r=this.LA(1);for(;!1===this.tokenMatcher(r,t);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,e);return AG(e)}attemptInRepetitionRecovery(t,e,r,n,i,a,s){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:r$(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return x(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},me(Cit,"attemptInRepetitionRecovery")});function Iit(t,e,r){return r|e|t}var Rit,Mit=t(()=>{me(Iit,"getKeyForAutomaticLookahead")}),Dit=t(()=>{IW(),fnt(),Oat(),pit(),Hnt(),Rit=class{static{me(this,"LLkLookaheadStrategy")}constructor(t){this.maxLookahead=null!=(t=t?.maxLookahead)?t:Nat.maxLookahead}validate(t){var e,r,n=this.validateNoLeftRecursion(t.rules);return sq(n)?(e=this.validateEmptyOrAlternatives(t.rules),r=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),t=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead),[...n,...e,...r,...t]):n}validateNoLeftRecursion(t){return yU(t,t=>eit(t,t,pnt))}validateEmptyOrAlternatives(t){return yU(t,t=>nit(t,pnt))}validateAmbiguousAlternationAlternatives(t,e){return yU(t,t=>iit(t,e,pnt))}validateSomeNonEmptyLookaheadPath(t,e){return sit(t,e,pnt)}buildLookaheadForAlternation(t){return Int(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Mnt)}buildLookaheadForOptional(t){return Rnt(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,Lnt(t.prodType),Dnt)}}});function Oit(t){return Fit.reset(),t.accept(Fit),t=Fit.dslMethods,Fit.reset(),t}var Pit,Bit,Fit,$it=t(()=>{IW(),Oat(),Mit(),het(),Dit(),Pit=class{static{me(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=(FU(t,"dynamicTokensEnabled")?t:Nat).dynamicTokensEnabled,this.maxLookahead=(FU(t,"maxLookahead")?t:Nat).maxLookahead,this.lookaheadStrategy=FU(t,"lookaheadStrategy")?t.lookaheadStrategy:new Rit({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){v(t,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:t,repetition:e,option:r,repetitionMandatory:n,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:a}=Oit(s);v(t,r=>{var t=0===r.idx?"":r.idx;this.TRACE_INIT(""+oet(r)+t,()=>{var t=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),e=Iit(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(e,t)})}),v(e,t=>{this.computeLookaheadFunc(s,t.idx,768,"Repetition",t.maxLookahead,oet(t))}),v(r,t=>{this.computeLookaheadFunc(s,t.idx,512,"Option",t.maxLookahead,oet(t))}),v(n,t=>{this.computeLookaheadFunc(s,t.idx,1024,"RepetitionMandatory",t.maxLookahead,oet(t))}),v(i,t=>{this.computeLookaheadFunc(s,t.idx,1536,"RepetitionMandatoryWithSeparator",t.maxLookahead,oet(t))}),v(a,t=>{this.computeLookaheadFunc(s,t.idx,1280,"RepetitionWithSeparator",t.maxLookahead,oet(t))})})})}computeLookaheadFunc(r,n,i,a,s,t){this.TRACE_INIT(""+t+(0===n?"":n),()=>{var t=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),e=Iit(this.fullRuleNameToShort[r.name],i,n);this.setLaFuncCache(e,t)})}getKeyForAutomaticLookahead(t,e){return e|t|this.getLastExplicitRuleShortName()}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},Bit=class extends eet{static{me(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},Fit=new Bit,me(Oit,"collectMethods")});function zit(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{me(zit,"setNodeLocationOnlyOffset"),me(Git,"setNodeLocationFull"),me(Uit,"addTerminalToCst"),me(qit,"addNoneTerminalToCst")});function Wit(t,e){Object.defineProperty(t,Yit,{enumerable:!1,configurable:!0,writable:!1,value:e})}var Yit,Hit=t(()=>{Yit="name",me(Wit,"defineNameProp")});function Vit(e,r){var n=nP(e),i=n.length;for(let t=0;tt.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>: `+t.join(` `).replace(/\n/g,` - `))},"validateVisitor")});return r.prototype=t,(r.prototype.constructor=r)._RULE_NAMES=e,r}function Hnt(t,e,r){var i=me(function(){},"derivedConstructor");Unt(i,t+"BaseSemanticsWithDefaults");let n=Object.create(r.prototype);return v(e,t=>{n[t]=Wnt}),i.prototype=n,i.prototype.constructor=i}function Vnt(t,e){return Xnt(t,e)}function Xnt(e,t){return t=VG(t,t=>!1===C6(e[t])),t=x(t,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Knt.MISSING_METHOD,methodName:t})),o$(t)}var Knt,Znt,Qnt,Jnt,tat,eat,rat,iat=t(()=>{var t;NW(),jnt(),me(Wnt,"defaultVisit"),me(Ynt,"createBaseSemanticVisitorConstructor"),me(Hnt,"createBaseVisitorConstructorWithDefaults"),(t=Knt=Knt||{})[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD",me(Vnt,"validateVisitor"),me(Xnt,"validateMissingCstMethods")}),nat=t(()=>{Gnt(),NW(),iat(),Rat(),Znt=class{static{me(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(BU(t,"nodeLocationTracking")?t:Sat).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Fnt,this.setNodeLocationFromNode=Fnt,this.cstPostRule=SO,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=SO,this.setNodeLocationFromNode=SO,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Bnt,this.setNodeLocationFromNode=Bnt,this.cstPostRule=SO,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=SO,this.setNodeLocationFromNode=SO,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=SO,this.setNodeLocationFromNode=SO,this.cstPostRule=SO,this.setInitialNodeLocation=SO}else this.cstInvocationStateUpdate=SO,this.cstFinallyStateUpdate=SO,this.cstPostTerminal=SO,this.cstPostNonTerminal=SO,this.cstPostRule=SO}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){t={name:t,children:Object.create(null)},this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?(t.endOffset=e.endOffset,t.endLine=e.endLine,t.endColumn=e.endColumn):(t.startOffset=NaN,t.startLine=NaN,t.startColumn=NaN)}cstPostRuleOnlyOffset(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?t.endOffset=e.endOffset:t.startOffset=NaN}cstPostTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];$nt(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];znt(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){var t;return gq(this.baseCstVisitorConstructor)?(t=Ynt(this.className,rP(this.gastProductionsCache)),this.baseCstVisitorConstructor=t):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var t;return gq(this.baseCstVisitorWithDefaultsConstructor)?(t=Hnt(this.className,rP(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=t):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}}}),aat=t(()=>{Rat(),Qnt=class{static{me(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):_at}LA(t){return(t=this.currIdx+t)<0||this.tokVectorLength<=t?_at:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}}),sat=t(()=>{NW(),wnt(),Rat(),uit(),hnt(),set(),Jnt=class{static{me(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,e,r){return this.consumeInternal(e,t,r)}subrule(t,e,r){return this.subruleInternal(e,t,r)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,r=Aat){KU(this.definedRulesNames,t)&&(i={message:cit.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Lat.DUPLICATE_RULE_NAME,ruleName:t},this.definitionErrors.push(i)),this.definedRulesNames.push(t);var i=this.defineRule(t,e,r);return this[t]=i}OVERRIDE_RULE(t,e,r=Aat){var i=Kit(t,this.definedRulesNames,this.className),i=(this.definitionErrors=this.definitionErrors.concat(i),this.defineRule(t,e,r));return this[t]=i}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);var t=this.saveRecogState();try{return e.apply(this,r),!0}catch(t){if(gnt(t))return!1;throw t}finally{this.reloadRecogState(t),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return $tt(YU(this.gastProductionsCache))}}}),oat=t(()=>{NW(),Nnt(),wnt(),qit(),Eit(),Rat(),Snt(),hit(),Urt(),tat=class{static{me(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ert,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},BU(e,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + `))},"validateVisitor")});return r.prototype=t,(r.prototype.constructor=r)._RULE_NAMES=e,r}function Kit(t,e,r){var n=me(function(){},"derivedConstructor");Wit(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(e,t=>{i[t]=Vit}),n.prototype=i,n.prototype.constructor=n}function Zit(t,e){return Qit(t,e)}function Qit(e,t){return t=XG(t,t=>!1===_w(e[t])),t=x(t,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Jit.MISSING_METHOD,methodName:t})),l$(t)}var Jit,tat,eat,rat,nat,iat,aat,sat=t(()=>{var t;IW(),Hit(),me(Vit,"defaultVisit"),me(Xit,"createBaseSemanticVisitorConstructor"),me(Kit,"createBaseVisitorConstructorWithDefaults"),(t=Jit=Jit||{})[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD",me(Zit,"validateVisitor"),me(Qit,"validateMissingCstMethods")}),oat=t(()=>{jit(),IW(),sat(),Oat(),tat=class{static{me(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(FU(t,"nodeLocationTracking")?t:Nat).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Git,this.setNodeLocationFromNode=Git,this.cstPostRule=AO,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=AO,this.setNodeLocationFromNode=AO,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=zit,this.setNodeLocationFromNode=zit,this.cstPostRule=AO,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=AO,this.setNodeLocationFromNode=AO,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=AO,this.setNodeLocationFromNode=AO,this.cstPostRule=AO,this.setInitialNodeLocation=AO}else this.cstInvocationStateUpdate=AO,this.cstFinallyStateUpdate=AO,this.cstPostTerminal=AO,this.cstPostNonTerminal=AO,this.cstPostRule=AO}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){t={name:t,children:Object.create(null)},this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?(t.endOffset=e.endOffset,t.endLine=e.endLine,t.endColumn=e.endColumn):(t.startOffset=NaN,t.startLine=NaN,t.startColumn=NaN)}cstPostRuleOnlyOffset(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?t.endOffset=e.endOffset:t.startOffset=NaN}cstPostTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];Uit(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];qit(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){var t;return fq(this.baseCstVisitorConstructor)?(t=Xit(this.className,nP(this.gastProductionsCache)),this.baseCstVisitorConstructor=t):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var t;return fq(this.baseCstVisitorWithDefaultsConstructor)?(t=Kit(this.className,nP(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=t):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}}}),lat=t(()=>{Oat(),eat=class{static{me(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Lat}LA(t){return(t=this.currIdx+t)<0||this.tokVectorLength<=t?Lat:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}}),cat=t(()=>{IW(),Eit(),Oat(),fnt(),pit(),het(),rat=class{static{me(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,e,r){return this.consumeInternal(e,t,r)}subrule(t,e,r){return this.subruleInternal(e,t,r)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,r=Iat){ZU(this.definedRulesNames,t)&&(n={message:pnt.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Rat.DUPLICATE_RULE_NAME,ruleName:t},this.definitionErrors.push(n)),this.definedRulesNames.push(t);var n=this.defineRule(t,e,r);return this[t]=n}OVERRIDE_RULE(t,e,r=Iat){var n=tit(t,this.definedRulesNames,this.className),n=(this.definitionErrors=this.definitionErrors.concat(n),this.defineRule(t,e,r));return this[t]=n}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);var t=this.saveRecogState();try{return e.apply(this,r),!0}catch(t){if(yit(t))return!1;throw t}finally{this.reloadRecogState(t),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Utt(HU(this.gastProductionsCache))}}}),hat=t(()=>{IW(),Mit(),Eit(),Hnt(),Ant(),Oat(),Nit(),gnt(),Wrt(),nat=class{static{me(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Srt,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},FU(e,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 - For Further details.`);if(KT(t)){if(aq(t))throw Error(`A Token Vocabulary cannot be empty. + For Further details.`);if(ZT(t)){if(sq(t))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 t[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(KT(t))this.tokensMap=Uj(t,(t,e)=>(t[e.name]=e,t),{});else if(BU(t,"modes")&&UG(HP(YU(t.modes)),Ort))e=HP(YU(t.modes)),e=fW(e),this.tokensMap=Uj(e,(t,e)=>(t[e.name]=e,t),{});else{if(!k6(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=e$(t)}this.tokensMap.EOF=sit,e=BU(t,"modes")?HP(YU(t.modes)):YU(t),t=UG(e,t=>aq(t.categoryMatches)),this.tokenMatcher=t?Ert:Trt,Crt(YU(this.tokensMap))}defineRule(r,i,t){if(this.selfAnalysisDone)throw Error(`Grammar rule <${r}> may not be defined after the 'performSelfAnalysis' method has been called' -Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let n=(BU(t,"resyncEnabled")?t:Aat).resyncEnabled,a=(BU(t,"recoveryValueFunc")?t:Aat).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,t=!0===this.outputCst?me(function(...t){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),i.apply(this,t);var e=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(e),e}catch(t){return this.invokeRuleCatch(t,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):me(function(...t){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),i.apply(this,t)}catch(t){return this.invokeRuleCatch(t,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(t,{ruleName:r,originalGrammarAction:i})}invokeRuleCatch(t,e,r){var i=1===this.RULE_STACK.length,e=e&&!this.isBackTracking()&&this.recoveryEnabled;if(gnt(t)){var n=t;if(e){if(e=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(e))return n.resyncedTokens=this.reSyncTo(e),this.outputCst?((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,e):r(t);this.outputCst&&((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,n.partialCstResult=e)}else if(i)return this.moveToTerminatedState(),r(t);throw n}throw t}optionInternal(t,e){var r=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,r)}optionInternalLogic(t,e,r){let i=this.getLaFuncFromCache(r),n;if("function"!=typeof t){n=t.DEF;let e=t.GATE;if(void 0!==e){let t=i;i=me(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else n=t;if(!0===i.call(this))return n.call(this)}atLeastOneInternal(t,e){var r=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,r)}atLeastOneInternalLogic(t,r,e){let i=this.getLaFuncFromCache(e),n;if("function"!=typeof r){n=r.DEF;let e=r.GATE;if(void 0!==e){let t=i;i=me(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else n=r;if(!0!==i.call(this))throw this.raiseEarlyExitException(t,zit.REPETITION_MANDATORY,r.ERR_MSG);{let t=this.doSingleRepetition(n);for(;!0===i.call(this)&&!0===t;)t=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],i,1024,t,kit)}atLeastOneSepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,r)}atLeastOneSepFirstInternalLogic(t,e,r){let i=e.DEF,n=e.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(t,zit.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);for(i.call(this),r=me(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),n);)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,n,r,i,Tit],r,1536,t,Tit)}manyInternal(t,e){var r=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,r)}manyInternalLogic(t,r,e){let i=this.getLaFuncFromCache(e),n;if("function"!=typeof r){n=r.DEF;let e=r.GATE;if(void 0!==e){let t=i;i=me(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else n=r;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],i,768,t,bit,a)}manySepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,r)}manySepFirstInternalLogic(t,e,r){let i=e.DEF,n=e.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(i.call(this),e=me(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),n);)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,n,e,i,wit],e,1280,t,wit)}}repetitionSepSecondInternal(t,e,r,i,n){for(;r();)this.CONSUME(e),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,r,i,n],r,1536,t,n)}doSingleRepetition(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){var r=this.getKeyForAutomaticLookahead(256,e),i=KT(t)?t:t.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,i)))return i[r].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){var t,e;this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()&&(t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new xnt(e,t)))}subruleInternal(t,e,r){var i;try{var n=void 0!==r?r.ARGS:void 0;return this.subruleIdx=e,i=t.apply(this,n),this.cstPostNonTerminal(i,void 0!==r&&void 0!==r.LABEL?r.LABEL:t.ruleName),i}catch(e){throw this.subruleInternalError(e,r,t.ruleName)}}subruleInternalError(t,e,r){throw gnt(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:r),delete t.partialCstResult),t}consumeInternal(t,e,r){let i;try{var n=this.LA(1);!0===this.tokenMatcher(n,t)?(this.consumeToken(),i=n):this.consumeInternalError(t,n,r)}catch(r){i=this.consumeInternalRecovery(t,e,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:t.name,i),i}consumeInternalError(t,e,r){var i=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new ynt(r,e,i))}consumeInternalRecovery(t,e,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;e=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,e)}catch(t){throw t.name===Ent?r:t}}saveRecogState(){var t=this.errors,e=e$(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),sit)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),lat=t(()=>{wnt(),NW(),qit(),Rat(),eat=class{static{me(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=(BU(t,"errorMessageProvider")?t:Sat).errorMessageProvider}SAVE_ERROR(t){if(gnt(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:e$(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return e$(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){var i=this.getCurrRuleFullName(),t=Pit(t,this.getGAstProductions()[i],e,this.maxLookahead)[0],n=[];for(let t=1;t<=this.maxLookahead;t++)n.push(this.LA(t));throw e=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:t,actual:n,previous:this.LA(0),customUserDescription:r,ruleName:i}),this.SAVE_ERROR(new bnt(e,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){var r=this.getCurrRuleFullName(),t=Oit(t,this.getGAstProductions()[r],this.maxLookahead),i=[];for(let t=1;t<=this.maxLookahead;t++)i.push(this.LA(t));throw r=this.LA(0),t=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:t,actual:i,previous:r,customUserDescription:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new vnt(t,this.LA(1),r))}}}),cat=t(()=>{Eit(),NW(),rat=class{static{me(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){var r=this.gastProductionsCache[t];if(gq(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return mit([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){var e=oU(t.ruleStack),e=this.getGAstProductions()[e];return new vit(e,t).startWalking()}}});function hat(t,e,r,i=!1){pat(r);var n=wG(this.recordingProdStack),a=C6(e)?e:e.DEF,t=new t({definition:[],idx:r});return i&&(t.separator=e.SEP),BU(e,"MAX_LOOKAHEAD")&&(t.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(t),a.call(this),n.definition.push(t),this.recordingProdStack.pop(),gat}function uat(t,e){pat(e);let r=wG(this.recordingProdStack),i=!1===KT(t),n=0==i?t:t.DEF,a=new Ktt({definition:[],idx:e,ignoreAmbiguities:i&&!0===t.IGNORE_AMBIGUITIES});return BU(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),e=tW(n,t=>C6(t.GATE)),a.hasPredicates=e,r.definition.push(a),v(n,t=>{var e=new jtt({definition:[]});a.definition.push(e),BU(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:BU(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),gat}function dat(t){return 0===t?"":""+t}function pat(t){if(t<0||fat - Idx value must be a none negative value smaller than `+(fat+1))).KNOWN_RECORDER_ERROR=!0,t}var gat,fat,mat,yat,vat,xat,bat,wat=t(()=>{NW(),set(),jrt(),Urt(),hit(),Rat(),Nnt(),gat={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(gat),fat=Math.pow(2,8)-1,Crt([mat=Hrt({name:"RECORDING_PHASE_TOKEN",pattern:Grt.NA})]),yat=Xrt(mat,`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(yat),vat={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},xat=class{static{me(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var t=0{var e=this;for(let t=0;t<10;t++){var r=0!0}LA_RECORD(t){return _at}topLevelRuleRecord(t,e){try{var r=new qtt({definition:[],name:t});return r.name=t,this.recordingProdStack.push(r),e.call(this),this.recordingProdStack.pop(),r}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+` + For Further details.`)}if(ZT(t))this.tokensMap=qj(t,(t,e)=>(t[e.name]=e,t),{});else if(FU(t,"modes")&&qG(VP(HU(t.modes)),Frt))e=VP(HU(t.modes)),e=mW(e),this.tokensMap=qj(e,(t,e)=>(t[e.name]=e,t),{});else{if(!Tw(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=r$(t)}this.tokensMap.EOF=hnt,e=FU(t,"modes")?VP(HU(t.modes)):HU(t),t=qG(e,t=>sq(t.categoryMatches)),this.tokenMatcher=t?Srt:_rt,Art(HU(this.tokensMap))}defineRule(r,n,t){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=(FU(t,"resyncEnabled")?t:Iat).resyncEnabled,a=(FU(t,"recoveryValueFunc")?t:Iat).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,t=!0===this.outputCst?me(function(...t){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,t);var e=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(e),e}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):me(function(...t){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,t)}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(t,{ruleName:r,originalGrammarAction:n})}invokeRuleCatch(t,e,r){var n=1===this.RULE_STACK.length,e=e&&!this.isBackTracking()&&this.recoveryEnabled;if(yit(t)){var i=t;if(e){if(e=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(e))return i.resyncedTokens=this.reSyncTo(e),this.outputCst?((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,e):r(t);this.outputCst&&((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i.partialCstResult=e)}else if(n)return this.moveToTerminatedState(),r(t);throw i}throw t}optionInternal(t,e){var r=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,r)}optionInternalLogic(t,e,r){let n=this.getLaFuncFromCache(r),i;if("function"!=typeof t){i=t.DEF;let e=t.GATE;if(void 0!==e){let t=n;n=me(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=t;if(!0===n.call(this))return i.call(this)}atLeastOneInternal(t,e){var r=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,r)}atLeastOneInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=me(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=r;if(!0!==n.call(this))throw this.raiseEarlyExitException(t,jnt.REPETITION_MANDATORY,r.ERR_MSG);{let t=this.doSingleRepetition(i);for(;!0===n.call(this)&&!0===t;)t=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],n,1024,t,_nt)}atLeastOneSepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,r)}atLeastOneSepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(t,jnt.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);for(n.call(this),r=me(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,r,n,Snt],r,1536,t,Snt)}manyInternal(t,e){var r=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,r)}manyInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=me(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else i=r;let a=!0;for(;!0===n.call(this)&&!0===a;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],n,768,t,Ent,a)}manySepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,r)}manySepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(n.call(this),e=me(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,n,Cnt],e,1280,t,Cnt)}}repetitionSepSecondInternal(t,e,r,n,i){for(;r();)this.CONSUME(e),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,r,n,i],r,1536,t,i)}doSingleRepetition(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){var r=this.getKeyForAutomaticLookahead(256,e),n=ZT(t)?t:t.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,n)))return n[r].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){var t,e;this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()&&(t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new kit(e,t)))}subruleInternal(t,e,r){var n;try{var i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=e,n=t.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:t.ruleName),n}catch(e){throw this.subruleInternalError(e,r,t.ruleName)}}subruleInternalError(t,e,r){throw yit(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:r),delete t.partialCstResult),t}consumeInternal(t,e,r){let n;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),n=i):this.consumeInternalError(t,i,r)}catch(r){n=this.consumeInternalRecovery(t,e,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:t.name,n),n}consumeInternalError(t,e,r){var n=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new bit(r,e,n))}consumeInternalRecovery(t,e,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;e=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,e)}catch(t){throw t.name===Sit?r:t}}saveRecogState(){var t=this.errors,e=r$(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),hnt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),uat=t(()=>{Eit(),IW(),Hnt(),Oat(),iat=class{static{me(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=(FU(t,"errorMessageProvider")?t:Nat).errorMessageProvider}SAVE_ERROR(t){if(yit(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:r$(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return r$(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){var n=this.getCurrRuleFullName(),t=znt(t,this.getGAstProductions()[n],e,this.maxLookahead)[0],i=[];for(let t=1;t<=this.maxLookahead;t++)i.push(this.LA(t));throw e=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:t,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n}),this.SAVE_ERROR(new Tit(e,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){var r=this.getCurrRuleFullName(),t=$nt(t,this.getGAstProductions()[r],this.maxLookahead),n=[];for(let t=1;t<=this.maxLookahead;t++)n.push(this.LA(t));throw r=this.LA(0),t=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:t,actual:n,previous:r,customUserDescription:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new wit(t,this.LA(1),r))}}}),dat=t(()=>{Ant(),IW(),aat=class{static{me(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){var r=this.gastProductionsCache[t];if(fq(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return bnt([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){var e=lU(t.ruleStack),e=this.getGAstProductions()[e];return new knt(e,t).startWalking()}}});function pat(t,e,r,n=!1){mat(r);var i=kG(this.recordingProdStack),a=_w(e)?e:e.DEF,t=new t({definition:[],idx:r});return n&&(t.separator=e.SEP),FU(e,"MAX_LOOKAHEAD")&&(t.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(t),a.call(this),i.definition.push(t),this.recordingProdStack.pop(),yat}function gat(t,e){mat(e);let r=kG(this.recordingProdStack),n=!1===ZT(t),i=0==n?t:t.DEF,a=new Jtt({definition:[],idx:e,ignoreAmbiguities:n&&!0===t.IGNORE_AMBIGUITIES});return FU(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),e=eW(i,t=>_w(t.GATE)),a.hasPredicates=e,r.definition.push(a),v(i,t=>{var e=new Htt({definition:[]});a.definition.push(e),FU(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:FU(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),yat}function fat(t){return 0===t?"":""+t}function mat(t){if(t<0||vat + Idx value must be a none negative value smaller than `+(vat+1))).KNOWN_RECORDER_ERROR=!0,t}var yat,vat,xat,bat,wat,kat,Tat,Eat=t(()=>{IW(),het(),Hrt(),Wrt(),gnt(),Oat(),Mit(),yat={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(yat),vat=Math.pow(2,8)-1,Art([xat=Krt({name:"RECORDING_PHASE_TOKEN",pattern:jrt.NA})]),bat=Qrt(xat,`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(bat),wat={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},kat=class{static{me(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var t=0{var e=this;for(let t=0;t<10;t++){var r=0!0}LA_RECORD(t){return Lat}topLevelRuleRecord(t,e){try{var r=new Ytt({definition:[],name:t});return r.name=t,this.recordingProdStack.push(r),e.call(this),this.recordingProdStack.pop(),r}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.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 t}}optionInternalRecord(t,e){return hat.call(this,Wtt,t,e)}atLeastOneInternalRecord(t,e){hat.call(this,Ytt,e,t)}atLeastOneSepFirstInternalRecord(t,e){hat.call(this,Htt,e,t,!0)}manyInternalRecord(t,e){hat.call(this,Vtt,e,t)}manySepFirstInternalRecord(t,e){hat.call(this,Xtt,e,t,!0)}orInternalRecord(t,e){return uat.call(this,t,e)}subruleInternalRecord(t,e,r){var i,n;if(pat(e),t&&!1!==BU(t,"ruleName"))return i=wG(this.recordingProdStack),n=t.ruleName,n=new Utt({idx:e,nonTerminalName:n,label:r?.LABEL,referencedRule:void 0}),i.definition.push(n),this.outputCst?vat:gat;throw(r=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}> - inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(t,e,r){var i;if(pat(e),Irt(t))return i=wG(this.recordingProdStack),r=new Ztt({idx:e,terminalType:t,label:r?.LABEL}),i.definition.push(r),yat;throw(i=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}> - inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,i}},me(hat,"recordProd"),me(uat,"recordOrProd"),me(dat,"getIdxSuffix"),me(pat,"assertMethodIdxIsValid")}),kat=t(()=>{NW(),Ptt(),Rat(),bat=class{static{me(this,"PerformanceTracer")}initPerformanceTracer(t){var e;BU(t,"traceInitPerf")?(t=t.traceInitPerf,this.traceInitMaxIdent=(e="number"==typeof t)?t:1/0,this.traceInitPerf=e?0 <${t}>`),Rtt(e)),a=10 time: ${i}ms`),this.traceInitIndent--,n):e()}}});function Tat(n,t){t.forEach(r=>{let i=r.prototype;Object.getOwnPropertyNames(i).forEach(t=>{var e;"constructor"!==t&&((e=Object.getOwnPropertyDescriptor(i,t))&&(e.get||e.set)?Object.defineProperty(n.prototype,t,e):n.prototype[t]=r.prototype[t])})})}var Eat=t(()=>{me(Tat,"applyMixins")});function Cat(t=void 0){return function(){return t}}var _at,Sat,Aat,Lat,Nat,Iat,Rat=t(()=>{var t;NW(),Ptt(),wet(),hit(),uit(),pnt(),Snt(),Pnt(),nat(),aat(),sat(),oat(),lat(),cat(),wat(),kat(),Eat(),hnt(),_at=Xrt(sit,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(_at),Sat=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:oit,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Aat=Object.freeze({recoveryValueFunc:me(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(t=Lat=Lat||{})[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",me(Cat,"EMPTY_ALT"),(Nat=class e{static{me(this,"Parser")}static performSelfAnalysis(t){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 t;this.selfAnalysisDone=!0;let r=this.className,i=(this.TRACE_INIT("toFastProps",()=>{Dtt(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,t=>{let e=this[t].originalGrammarAction,r;this.TRACE_INIT(t+" Rule",()=>{r=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{i=unt({rules:YU(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{var t,e;aq(i)&&!1===this.skipValidations&&(t=dnt({rules:YU(this.gastProductionsCache),tokenTypes:YU(this.tokensMap),errMsgProvider:cit,grammarName:r}),e=jit({lookaheadStrategy:this.lookaheadStrategy,rules:YU(this.gastProductionsCache),tokenTypes:YU(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(t,e))}),aq(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var t=vet(YU(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null!=(e=(t=this.lookaheadStrategy).initialize)&&e.call(t,{rules:YU(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(YU(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!aq(this.definitionErrors))throw t=x(this.definitionErrors,t=>t.message),new Error(`Parser Definition Errors detected: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{}throw t}}optionInternalRecord(t,e){return pat.call(this,Vtt,t,e)}atLeastOneInternalRecord(t,e){pat.call(this,Xtt,e,t)}atLeastOneSepFirstInternalRecord(t,e){pat.call(this,Ktt,e,t,!0)}manyInternalRecord(t,e){pat.call(this,Ztt,e,t)}manySepFirstInternalRecord(t,e){pat.call(this,Qtt,e,t,!0)}orInternalRecord(t,e){return gat.call(this,t,e)}subruleInternalRecord(t,e,r){var n,i;if(mat(e),t&&!1!==FU(t,"ruleName"))return n=kG(this.recordingProdStack),i=t.ruleName,i=new Wtt({idx:e,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?wat:yat;throw(r=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(t,e,r){var n;if(mat(e),Drt(t))return n=kG(this.recordingProdStack),r=new tet({idx:e,terminalType:t,label:r?.LABEL}),n.definition.push(r),bat;throw(n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,n}},me(pat,"recordProd"),me(gat,"recordOrProd"),me(fat,"getIdxSuffix"),me(mat,"assertMethodIdxIsValid")}),Cat=t(()=>{IW(),$tt(),Oat(),Tat=class{static{me(this,"PerformanceTracer")}initPerformanceTracer(t){var e;FU(t,"traceInitPerf")?(t=t.traceInitPerf,this.traceInitMaxIdent=(e="number"==typeof t)?t:1/0,this.traceInitPerf=e?0 <${t}>`),Ott(e)),a=10 time: ${n}ms`),this.traceInitIndent--,i):e()}}});function _at(i,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(t=>{var e;"constructor"!==t&&((e=Object.getOwnPropertyDescriptor(n,t))&&(e.get||e.set)?Object.defineProperty(i.prototype,t,e):i.prototype[t]=r.prototype[t])})})}var Sat=t(()=>{me(_at,"applyMixins")});function Aat(t=void 0){return function(){return t}}var Lat,Nat,Iat,Rat,Mat,Dat,Oat=t(()=>{var t;IW(),$tt(),Eet(),gnt(),fnt(),mit(),Nit(),$it(),oat(),lat(),cat(),hat(),uat(),dat(),Eat(),Cat(),Sat(),pit(),Lat=Qrt(hnt,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(Lat),Nat=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:unt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Iat=Object.freeze({recoveryValueFunc:me(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(t=Rat=Rat||{})[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",me(Aat,"EMPTY_ALT"),(Mat=class e{static{me(this,"Parser")}static performSelfAnalysis(t){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 t;this.selfAnalysisDone=!0;let r=this.className,n=(this.TRACE_INIT("toFastProps",()=>{Btt(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,t=>{let e=this[t].originalGrammarAction,r;this.TRACE_INIT(t+" Rule",()=>{r=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{n=git({rules:HU(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var t,e;sq(n)&&!1===this.skipValidations&&(t=fit({rules:HU(this.gastProductionsCache),tokenTypes:HU(this.tokensMap),errMsgProvider:pnt,grammarName:r}),e=Vnt({lookaheadStrategy:this.lookaheadStrategy,rules:HU(this.gastProductionsCache),tokenTypes:HU(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(t,e))}),sq(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var t=wet(HU(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null!=(e=(t=this.lookaheadStrategy).initialize)&&e.call(t,{rules:HU(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(HU(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!sq(this.definitionErrors))throw t=x(this.definitionErrors,t=>t.message),new Error(`Parser Definition Errors detected: `+t.join(` ------------------------------- -`))})}constructor(t,e){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),BU(e,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. +`))})}constructor(t,e){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),FU(e,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=(BU(e,"skipValidations")?e:Sat).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,Tat(Nat,[_nt,Mnt,Znt,Qnt,tat,Jnt,eat,rat,xat,bat]),Iat=class extends Nat{static{me(this,"EmbeddedActionsParser")}constructor(t,e=Sat){(e=e$(e)).outputCst=!1,super(t,e)}}}),Mat=t(()=>{set()}),Dat=t(()=>{}),Oat=t(()=>{Mat(),Dat()}),Pat=t(()=>{Att()}),Bat=t(()=>{Att(),Rat(),jrt(),hit(),qit(),Int(),uit(),wnt(),qrt(),set(),set(),Oat(),Pat()});function Fat(t,e,r){return t.name+`_${e}_`+r}function $at(e){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},i=(zat(r,e),e.length);for(let t=0;tGat(e,r,t)));return Jat(e,r,i,t,...n)}function Hat(t,e,r){var i=sst(t,e,r,{type:cst});return Qat(t,i),Zat(t,e,r,Jat(t,e,i,r,Vat(t,e,r)))}function Vat(e,r,t){return 1===(t=VG(x(t.definition,t=>Gat(e,r,t)),t=>void 0!==t)).length?t[0]:0===t.length?void 0:est(e,t)}function Xat(t,e,r,i,n){var a=i.left,i=i.right,s=sst(t,e,r,{type:yst}),o=(Qat(t,s),sst(t,e,r,{type:vst}));return a.loopback=s,o.loopback=s,ast(i,t.decisionMap[Fat(e,n?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===n?(ast(s,a),ast(s,o)):(ast(s,o),ast(s,n.left),ast(n.right,a)),{left:a,right:o}}function Kat(t,e,r,i,n){var a=i.left,i=i.right,s=sst(t,e,r,{type:mst}),o=(Qat(t,s),sst(t,e,r,{type:vst})),l=sst(t,e,r,{type:fst});return s.loopback=l,o.loopback=l,ast(s,a),ast(s,o),ast(i,l),void 0!==n?(ast(l,o),ast(l,n.left),ast(n.right,a)):ast(l,s),{left:t.decisionMap[Fat(e,n?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function Zat(t,e,r,i){var n=i.left;return ast(n,i.right),t.decisionMap[Fat(e,"Option",r.idx)]=n,i}function Qat(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Jat(t,e,r,i,...n){var a,s=sst(t,e,i,{type:gst,start:r});r.end=s;for(a of n)void 0!==a?(ast(r,a.left),ast(a.right,s)):ast(r,s);return n={left:r,right:s},t.decisionMap[Fat(e,tst(i),i.idx)]=r,n}function tst(t){if(t instanceof Ktt)return"Alternation";if(t instanceof Wtt)return"Option";if(t instanceof Vtt)return"Repetition";if(t instanceof Xtt)return"RepetitionWithSeparator";if(t instanceof Ytt)return"RepetitionMandatory";if(t instanceof Htt)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function est(e,r){var i=r.length;for(let t=0;t{gU(),XG(),Bat(),me(Fat,"buildATNKey"),cst=1,hst=2,ust=4,dst=5,pst=7,gst=8,fst=9,mst=10,yst=11,vst=12,xst=class{static{me(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},bst=class extends xst{static{me(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},wst=class extends xst{static{me(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},kst=class extends xst{static{me(this,"RuleTransition")}constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}},me($at,"createATN"),me(zat,"createRuleStartAndStopATNStates"),me(Gat,"atom"),me(Uat,"repetition"),me(qat,"repetitionSep"),me(jat,"repetitionMandatory"),me(Wat,"repetitionMandatorySep"),me(Yat,"alternation"),me(Hat,"option"),me(Vat,"block"),me(Xat,"plus"),me(Kat,"star"),me(Zat,"optional"),me(Qat,"defineDecisionState"),me(Jat,"makeAlts"),me(tst,"getProdType"),me(est,"makeBlock"),me(rst,"tokenRef"),me(ist,"ruleRef"),me(nst,"buildRuleHandle"),me(ast,"epsilon"),me(sst,"newState"),me(ost,"addTransition"),me(lst,"removeState")});function Est(t,e=!0){return`${e?"a"+t.alt:""}s${t.state.stateNumber}:`+t.stack.map(t=>t.stateNumber.toString()).join("_")}var Cst,_st,Sst=t(()=>{gU(),Cst={},_st=class{static{me(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){var e=Est(t);e in this.map||(this.map[e]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return x(this.configs,t=>t.alt)}get key(){let t="";for(var e in this.map)t+=e+":";return t}},me(Est,"getATNConfigKey")});function Ast(i,n){let a={};return t=>{let e=t.toString(),r=a[e];return void 0===r&&(r={atnStartState:i,decision:n,states:{}},a[e]=r),r}}function Lst(t,e=!0){var r,i=new Set;for(r of t){var n,a,s=new Set;for(n of r){if(void 0===n){if(e)break;return!1}for(a of[n.tokenTypeIdx].concat(n.categoryMatches))if(i.has(a)){if(!s.has(a))return!1}else i.add(a),s.add(a)}}return!0}function Nst(e){var r=e.decisionStates.length,i=Array(r);for(let t=0;tWrt(t)).join(", "),r=0===t.production.idx?"":t.production.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${Pst(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, + For further details.`);this.skipValidations=(FU(e,"skipValidations")?e:Nat).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,_at(Mat,[Lit,Pit,tat,eat,nat,rat,iat,aat,kat,Tat]),Dat=class extends Mat{static{me(this,"EmbeddedActionsParser")}constructor(t,e=Nat){(e=r$(e)).outputCst=!1,super(t,e)}}}),Pat=t(()=>{het()}),Bat=t(()=>{}),Fat=t(()=>{Pat(),Bat()}),$at=t(()=>{Itt()}),zat=t(()=>{Itt(),Oat(),Hrt(),gnt(),Hnt(),Dit(),fnt(),Eit(),Yrt(),het(),het(),Fat(),$at()});function Gat(t,e,r){return t.name+`_${e}_`+r}function Uat(e){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=(qat(r,e),e.length);for(let t=0;tjat(e,r,t)));return rst(e,r,n,t,...i)}function Kat(t,e,r){var n=cst(t,e,r,{type:dst});return est(t,n),tst(t,e,r,rst(t,e,n,r,Zat(t,e,r)))}function Zat(e,r,t){return 1===(t=XG(x(t.definition,t=>jat(e,r,t)),t=>void 0!==t)).length?t[0]:0===t.length?void 0:ist(e,t)}function Qat(t,e,r,n,i){var a=n.left,n=n.right,s=cst(t,e,r,{type:bst}),o=(est(t,s),cst(t,e,r,{type:wst}));return a.loopback=s,o.loopback=s,lst(n,t.decisionMap[Gat(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===i?(lst(s,a),lst(s,o)):(lst(s,o),lst(s,i.left),lst(i.right,a)),{left:a,right:o}}function Jat(t,e,r,n,i){var a=n.left,n=n.right,s=cst(t,e,r,{type:xst}),o=(est(t,s),cst(t,e,r,{type:wst})),l=cst(t,e,r,{type:vst});return s.loopback=l,o.loopback=l,lst(s,a),lst(s,o),lst(n,l),void 0!==i?(lst(l,o),lst(l,i.left),lst(i.right,a)):lst(l,s),{left:t.decisionMap[Gat(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function tst(t,e,r,n){var i=n.left;return lst(i,n.right),t.decisionMap[Gat(e,"Option",r.idx)]=i,n}function est(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function rst(t,e,r,n,...i){var a,s=cst(t,e,n,{type:yst,start:r});r.end=s;for(a of i)void 0!==a?(lst(r,a.left),lst(a.right,s)):lst(r,s);return i={left:r,right:s},t.decisionMap[Gat(e,nst(n),n.idx)]=r,i}function nst(t){if(t instanceof Jtt)return"Alternation";if(t instanceof Vtt)return"Option";if(t instanceof Ztt)return"Repetition";if(t instanceof Qtt)return"RepetitionWithSeparator";if(t instanceof Xtt)return"RepetitionMandatory";if(t instanceof Ktt)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function ist(e,r){var n=r.length;for(let t=0;t{fU(),KG(),zat(),me(Gat,"buildATNKey"),dst=1,pst=2,gst=4,fst=5,mst=7,yst=8,vst=9,xst=10,bst=11,wst=12,kst=class{static{me(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},Tst=class extends kst{static{me(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},Est=class extends kst{static{me(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},Cst=class extends kst{static{me(this,"RuleTransition")}constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}},me(Uat,"createATN"),me(qat,"createRuleStartAndStopATNStates"),me(jat,"atom"),me(Wat,"repetition"),me(Yat,"repetitionSep"),me(Hat,"repetitionMandatory"),me(Vat,"repetitionMandatorySep"),me(Xat,"alternation"),me(Kat,"option"),me(Zat,"block"),me(Qat,"plus"),me(Jat,"star"),me(tst,"optional"),me(est,"defineDecisionState"),me(rst,"makeAlts"),me(nst,"getProdType"),me(ist,"makeBlock"),me(ast,"tokenRef"),me(sst,"ruleRef"),me(ost,"buildRuleHandle"),me(lst,"epsilon"),me(cst,"newState"),me(hst,"addTransition"),me(ust,"removeState")});function Sst(t,e=!0){return`${e?"a"+t.alt:""}s${t.state.stateNumber}:`+t.stack.map(t=>t.stateNumber.toString()).join("_")}var Ast,Lst,Nst=t(()=>{fU(),Ast={},Lst=class{static{me(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){var e=Sst(t);e in this.map||(this.map[e]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return x(this.configs,t=>t.alt)}get key(){let t="";for(var e in this.map)t+=e+":";return t}},me(Sst,"getATNConfigKey")});function Ist(n,i){let a={};return t=>{let e=t.toString(),r=a[e];return void 0===r&&(r={atnStartState:n,decision:i,states:{}},a[e]=r),r}}function Rst(t,e=!0){var r,n=new Set;for(r of t){var i,a,s=new Set;for(i of r){if(void 0===i){if(e)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 Mst(e){var r=e.decisionStates.length,n=Array(r);for(let t=0;tVrt(t)).join(", "),r=0===t.production.idx?"":t.production.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${$st(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, <${e}> 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 Pst(t){if(t instanceof Utt)return"SUBRULE";if(t instanceof Wtt)return"OPTION";if(t instanceof Ktt)return"OR";if(t instanceof Ytt)return"AT_LEAST_ONE";if(t instanceof Htt)return"AT_LEAST_ONE_SEP";if(t instanceof Xtt)return"MANY_SEP";if(t instanceof Vtt)return"MANY";if(t instanceof Ztt)return"CONSUME";throw Error("non exhaustive match")}function Bst(t,e,r){return e=mU(e.configs.elements,t=>t.state.transitions),{actualToken:r,possibleTokenTypes:vW(e.filter(t=>t instanceof bst).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function Fst(t,e){return t.edges[e.tokenTypeIdx]}function $st(t,e,r){var i,n=new _st,a=[];for(i of t.elements)if(!1!==r.is(i.alt))if(i.state.type===pst)a.push(i);else{var s=i.state.transitions.length;for(let t=0;t{Bat(),Tst(),Sst(),Nq(),yU(),xW(),gU(),VP(),MG(),sq(),qj(),me(Ast,"createDFACache"),tot=class{static{me(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let e="",r=this.predicates.length;for(let t=0;tconsole.log(t)}initialize(t){this.atn=$at(t.rules),this.dfas=Nst(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:e,rule:r,hasPredicates:i,dynamicTokensEnabled:n}=t,a=this.dfas,s=this.logging,o=Fat(r,"Alternation",e),l=this.atn.decisionMap[o].decision,c=x(_it({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>x(t,t=>t[0]));if(!Lst(c,!1)||n)return i?function(e){var r=new tot,i=void 0===e?0:e.length;for(let t=0;t(v(t,t=>{t&&(e[t.tokenTypeIdx]=r,v(t.categoryMatches,t=>{e[t]=r}))}),e),{});return i?function(t){var e=this.LA(1),e=r[e.tokenTypeIdx];if(void 0===t||void 0===e||void 0===(t=null==(t=t[e])?void 0:t.GATE)||!1!==t.call(this))return e}:function(){var t=this.LA(1);return r[t.tokenTypeIdx]}}}buildLookaheadForOptional(r){let{prodOccurrence:t,rule:e,prodType:i,dynamicTokensEnabled:n}=r,a=this.dfas,s=this.logging,o=Fat(e,i,t),l=this.atn.decisionMap[o].decision,c=x(_it({maxLookahead:1,occurrence:t,prodType:i,rule:e}),t=>x(t,t=>t[0]));if(Lst(c)&&c[0][0]&&!n){if(r=c[0],1===(r=HP(r)).length&&aq(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=Uj(r,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){var t=Ist.call(this,a,l,eot,s);return"object"!=typeof t&&0===t}}},me(Lst,"isLL1Sequence"),me(Nst,"initATNSimulator"),me(Ist,"adaptivePredict"),me(Rst,"performLookahead"),me(Mst,"computeLookaheadTarget"),me(Dst,"reportLookaheadAmbiguity"),me(Ost,"buildAmbiguityError"),me(Pst,"getProductionDslName"),me(Bst,"buildAdaptivePredictError"),me(Fst,"getExistingTargetState"),me($st,"computeReachSet"),me(zst,"getReachableTarget"),me(Gst,"getUniqueAlt"),me(Ust,"newDFAState"),me(qst,"addDFAEdge"),me(jst,"addDFAState"),me(Wst,"computeStartState"),me(Yst,"closure"),me(Hst,"getEpsilonTarget"),me(Vst,"hasConfigInRuleStopState"),me(Xst,"allConfigsInRuleStopStates"),me(Kst,"hasConflictTerminatingPrediction"),me(Zst,"getConflictingAltSets"),me(Qst,"hasConflictingAltSet"),me(Jst,"hasStateAssociatedWithOneAlt")}),Dlt=t(()=>{Mlt()}),Olt=t(()=>{function t(t){return"string"==typeof t}var e,r,i,n;function a(t){return"string"==typeof t}function s(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}function o(t){return"number"==typeof t&&r.MIN_VALUE<=t&&t<=r.MAX_VALUE}function l(t,e){return{line:t=t===Number.MAX_VALUE?sot.MAX_VALUE:t,character:e=e===Number.MAX_VALUE?sot.MAX_VALUE:e}}function c(t){return ye.objectLiteral(t)&&ye.uinteger(t.line)&&ye.uinteger(t.character)}function h(t,e,r,i){if(ye.uinteger(t)&&ye.uinteger(e)&&ye.uinteger(r)&&ye.uinteger(i))return{start:oot.create(t,e),end:oot.create(r,i)};if(oot.is(t)&&oot.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${r}, ${i}]`)}function u(t){return ye.objectLiteral(t)&&oot.is(t.start)&&oot.is(t.end)}function d(t,e){return{uri:t,range:e}}function p(t){return ye.objectLiteral(t)&&lot.is(t.range)&&(ye.string(t.uri)||ye.undefined(t.uri))}function g(t,e,r,i){return{targetUri:t,targetRange:e,targetSelectionRange:r,originSelectionRange:i}}function f(t){return ye.objectLiteral(t)&&lot.is(t.targetRange)&&ye.string(t.targetUri)&&lot.is(t.targetSelectionRange)&&(lot.is(t.originSelectionRange)||ye.undefined(t.originSelectionRange))}function m(t,e,r,i){return{red:t,green:e,blue:r,alpha:i}}function y(t){return ye.objectLiteral(t)&&ye.numberRange(t.red,0,1)&&ye.numberRange(t.green,0,1)&&ye.numberRange(t.blue,0,1)&&ye.numberRange(t.alpha,0,1)}function v(t,e){return{range:t,color:e}}function x(t){return ye.objectLiteral(t)&&lot.is(t.range)&&uot.is(t.color)}function b(t,e,r){return{label:t,textEdit:e,additionalTextEdits:r}}function w(t){return ye.objectLiteral(t)&&ye.string(t.label)&&(ye.undefined(t.textEdit)||kot.is(t))&&(ye.undefined(t.additionalTextEdits)||ye.typedArray(t.additionalTextEdits,kot.is))}function k(t,e,r,i,n,a){return t={startLine:t,endLine:e},ye.defined(r)&&(t.startCharacter=r),ye.defined(i)&&(t.endCharacter=i),ye.defined(n)&&(t.kind=n),ye.defined(a)&&(t.collapsedText=a),t}function T(t){return ye.objectLiteral(t)&&ye.uinteger(t.startLine)&&ye.uinteger(t.startLine)&&(ye.undefined(t.startCharacter)||ye.uinteger(t.startCharacter))&&(ye.undefined(t.endCharacter)||ye.uinteger(t.endCharacter))&&(ye.undefined(t.kind)||ye.string(t.kind))}function E(t,e){return{location:t,message:e}}function C(t){return ye.defined(t)&&cot.is(t.location)&&ye.string(t.message)}function _(t){return ye.objectLiteral(t)&&ye.string(t.href)}function S(t,e,r,i,n,a){return t={range:t,message:e},ye.defined(r)&&(t.severity=r),ye.defined(i)&&(t.code=i),ye.defined(n)&&(t.source=n),ye.defined(a)&&(t.relatedInformation=a),t}function A(t){var e;return ye.defined(t)&&lot.is(t.range)&&ye.string(t.message)&&(ye.number(t.severity)||ye.undefined(t.severity))&&(ye.integer(t.code)||ye.string(t.code)||ye.undefined(t.code))&&(ye.undefined(t.codeDescription)||ye.string(null==(e=t.codeDescription)?void 0:e.href))&&(ye.string(t.source)||ye.undefined(t.source))&&(ye.undefined(t.relatedInformation)||ye.typedArray(t.relatedInformation,mot.is))}function L(t,e,...r){return t={title:t,command:e},ye.defined(r)&&0ye.string(t.kind)?Sot.is(t)||Aot.is(t)||Lot.is(t):_ot.is(t)))}function J(t){return{uri:t}}function tt(t){return ye.defined(t)&&ye.string(t.uri)}function et(t,e){return{uri:t,version:e}}function rt(t){return ye.defined(t)&&ye.string(t.uri)&&ye.integer(t.version)}function it(t,e){return{uri:t,version:e}}function nt(t){return ye.defined(t)&&ye.string(t.uri)&&(null===t.version||ye.integer(t.version))}function at(t,e,r,i){return{uri:t,languageId:e,version:r,text:i}}function st(t){return ye.defined(t)&&ye.string(t.uri)&&ye.string(t.languageId)&&ye.integer(t.version)&&ye.string(t.text)}function ot(t){return t===i.PlainText||t===i.Markdown}function lt(t){var e=t;return ye.objectLiteral(t)&&Oot.is(e.kind)&&ye.string(e.value)}function ct(t,e,r){return{newText:t,insert:e,replace:r}}function ht(t){return t&&ye.string(t.newText)&&lot.is(t.insert)&&lot.is(t.replace)}function ut(t){return t&&(ye.string(t.detail)||void 0===t.detail)&&(ye.string(t.description)||void 0===t.description)}function dt(t){return{label:t}}function pt(t,e){return{items:t||[],isIncomplete:!!e}}function gt(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function ft(t){return ye.string(t)||ye.objectLiteral(t)&&ye.string(t.language)&&ye.string(t.value)}function mt(t){var e=t;return!!e&&ye.objectLiteral(e)&&(Pot.is(e.contents)||jot.is(e.contents)||ye.typedArray(e.contents,jot.is))&&(void 0===t.range||lot.is(t.range))}function yt(t,e){return e?{label:t,documentation:e}:{label:t}}function vt(t,e,...r){return t={label:t},ye.defined(e)&&(t.documentation=e),ye.defined(r)?t.parameters=r:t.parameters=[],t}function xt(t,e){return t={range:t},ye.number(e)&&(t.kind=e),t}function bt(t,e,r,i,n){return t={name:t,kind:e,location:{uri:i,range:r}},n&&(t.containerName=n),t}function wt(t,e,r,i){return void 0!==i?{name:t,kind:e,location:{uri:r,range:i}}:{name:t,kind:e,location:{uri:r}}}function kt(t,e,r,i,n,a){return t={name:t,detail:e,kind:r,range:i,selectionRange:n},void 0!==a&&(t.children=a),t}function Tt(t){return t&&ye.string(t.name)&&ye.number(t.kind)&&lot.is(t.range)&&lot.is(t.selectionRange)&&(void 0===t.detail||ye.string(t.detail))&&(void 0===t.deprecated||ye.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}function Et(t,e,r){return t={diagnostics:t},null!=e&&(t.only=e),null!=r&&(t.triggerKind=r),t}function Ct(t){return ye.defined(t)&&ye.typedArray(t.diagnostics,bot.is)&&(void 0===t.only||ye.typedArray(t.only,ye.string))&&(void 0===t.triggerKind||t.triggerKind===elt.Invoked||t.triggerKind===elt.Automatic)}function _t(t,e,r){let i={title:t},n=!0;return"string"==typeof e?(n=!1,i.kind=e):wot.is(e)?i.command=e:i.edit=e,n&&void 0!==r&&(i.kind=r),i}function St(t){return t&&ye.string(t.title)&&(void 0===t.diagnostics||ye.typedArray(t.diagnostics,bot.is))&&(void 0===t.kind||ye.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||wot.is(t.command))&&(void 0===t.isPreferred||ye.boolean(t.isPreferred))&&(void 0===t.edit||Not.is(t.edit))}function At(t,e){return t={range:t},ye.defined(e)&&(t.data=e),t}function Lt(t){return ye.defined(t)&&lot.is(t.range)&&(ye.undefined(t.command)||wot.is(t.command))}function Nt(t,e){return{tabSize:t,insertSpaces:e}}function It(t){return ye.defined(t)&&ye.uinteger(t.tabSize)&&ye.boolean(t.insertSpaces)}function Rt(t,e,r){return{range:t,target:e,data:r}}function Mt(t){return ye.defined(t)&&lot.is(t.range)&&(ye.undefined(t.target)||ye.string(t.target))}function Dt(t,e){return{range:t,parent:e}}function Ot(t){return ye.objectLiteral(t)&&lot.is(t.range)&&(void 0===t.parent||n.is(t.parent))}function Pt(t){return ye.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}function Bt(t,e){return{range:t,text:e}}function Ft(t){return null!=t&&lot.is(t.range)&&ye.string(t.text)}function $t(t,e,r){return{range:t,variableName:e,caseSensitiveLookup:r}}function zt(t){return null!=t&&lot.is(t.range)&&ye.boolean(t.caseSensitiveLookup)&&(ye.string(t.variableName)||void 0===t.variableName)}function Gt(t,e){return{range:t,expression:e}}function Ut(t){return null!=t&&lot.is(t.range)&&(ye.string(t.expression)||void 0===t.expression)}function qt(t,e){return{frameId:t,stoppedLocation:e}}function jt(t){return ye.defined(t)&&lot.is(t.stoppedLocation)}function Wt(t){return 1===t||2===t}function Yt(t){return{value:t}}function Ht(t){return ye.objectLiteral(t)&&(void 0===t.tooltip||ye.string(t.tooltip)||Pot.is(t.tooltip))&&(void 0===t.location||cot.is(t.location))&&(void 0===t.command||wot.is(t.command))}function Vt(t,e,r){return t={position:t,label:e},void 0!==r&&(t.kind=r),t}function Xt(t){return ye.objectLiteral(t)&&oot.is(t.position)&&(ye.string(t.label)||ye.typedArray(t.label,mlt.is))&&(void 0===t.kind||flt.is(t.kind))&&void 0===t.textEdits||ye.typedArray(t.textEdits,kot.is)&&(void 0===t.tooltip||ye.string(t.tooltip)||Pot.is(t.tooltip))&&(void 0===t.paddingLeft||ye.boolean(t.paddingLeft))&&(void 0===t.paddingRight||ye.boolean(t.paddingRight))}function Kt(t){return{kind:"snippet",value:t}}function Zt(t,e,r,i){return{insertText:t,filterText:e,range:r,command:i}}function Qt(t){return{items:t}}function Jt(t,e){return{range:t,text:e}}function te(t,e){return{triggerKind:t,selectedCompletionInfo:e}}function ee(t){return ye.objectLiteral(t)&¬.is(t.uri)&&ye.string(t.name)}function re(t,e,r,i){return new _lt(t,e,r,i)}function ie(t){return!!(ye.defined(t)&&ye.string(t.uri)&&(ye.undefined(t.languageId)||ye.string(t.languageId))&&ye.uinteger(t.lineCount)&&ye.func(t.getText)&&ye.func(t.positionAt)&&ye.func(t.offsetAt))}function ne(e,t){let r=e.getText(),i=D(t,(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),n=r.length;for(let t=i.length-1;0<=t;t--){var a=i[t],s=e.offsetAt(a.range.start),o=e.offsetAt(a.range.end);if(!(o<=n))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),n=s}return r}function D(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);D(s,n),D(o,n);let t=0,e=0,r=0;for(;tt?i=n:r=n+1}var a=r-1;return oot.create(a,t-e[a])}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],r=t.line+1{Olt(),KK(),Slt=class{static{me(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){var t;return null!=(t=this.nodeStack[this.nodeStack.length-1])?t:this.rootNode}buildRootNode(t){return this.rootNode=new Rlt(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){var e=new Nlt;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){return(t=new Llt(t.startOffset,t.image.length,RK(t),t.tokenType,!e)).grammarSource=e,t.root=this.rootNode,this.current.content.push(t),t}removeNode(t){var e=t.container;e&&0<=(t=e.content.indexOf(t))&&e.content.splice(t,1)}addHiddenNodes(t){var e,r=[];for(e of t){var i=new Llt(e.startOffset,e.image.length,RK(e),e.tokenType,!0);i.root=this.rootNode,r.push(i)}let n=this.current,a=!1;if(0{Bat(),Dlt(),jQ(),Ctt(),sJ(),Plt(),Flt=Symbol("Datatype"),me(Blt,"isDataTypeNode"),$lt=me(t=>t.endsWith("​")?t:t+"​","withRuleSuffix"),zlt=class{static{me(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;var e=this.lexer.definition,r="production"===t.LanguageMetaData.mode;this.wrapper=new Ylt(e,Object.assign(Object.assign({},t.parser.ParserConfig),{skipValidations:r,errorMessageProvider:t.parser.ParserErrorMessageProvider}))}alternatives(t,e){this.wrapper.wrapOr(t,e)}optional(t,e){this.wrapper.wrapOption(t,e)}many(t,e){this.wrapper.wrapMany(t,e)}atLeastOne(t,e){this.wrapper.wrapAtLeastOne(t,e)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Glt=class extends zlt{static{me(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new Slt,this.stack=[],this.assignmentMap=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,e){var r=this.computeRuleType(t),r=this.wrapper.DEFINE_RULE($lt(t.name),this.startImplementation(r,e).bind(this));return this.allRules.set(t.name,r),t.entry&&(this.mainRule=r),r}computeRuleType(t){if(!t.fragment)return stt(t)?Flt:htt(t)??t.name}parse(t,e={}){this.nodeBuilder.buildRootNode(t);var t=this.lexerResult=this.lexer.tokenize(t),r=(this.wrapper.input=t.tokens,e.rule?this.allRules.get(e.rule):this.mainRule);if(r)return r=r.call(this.wrapper,{}),this.nodeBuilder.addHiddenNodes(t.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:r,lexerErrors:t.errors,lexerReport:t.report,parserErrors:this.wrapper.errors};throw new Error(e.rule?`No rule found with name '${e.rule}'`:"No main rule available.")}startImplementation(n,a){return t=>{var e,r=!this.isRecording()&&void 0!==n;r&&(this.stack.push(e={$type:n}),n===Flt)&&(e.value="");let i;try{i=a(t)}catch{i=void 0}return i=void 0===i&&r?this.construct():i}}extractHiddenTokens(t){var e=this.lexerResult.hidden;if(!e.length)return[];var r=t.startOffset;for(let t=0;tr)return e.splice(0,t);return e.splice(0,e.length)}consume(e,r,i){if(e=this.wrapper.wrapConsume(e,r),!this.isRecording()&&this.isValidToken(e)){var r=this.extractHiddenTokens(e),r=(this.nodeBuilder.addHiddenNodes(r),this.nodeBuilder.buildLeafNode(e,i)),{assignment:t,isCrossRef:n}=this.getAssignment(i),a=this.current;if(t){var s=$Z(i)?e.image:this.converter.convert(e.image,r);this.assign(t.operator,t.feature,s,r,n)}else if(Blt(a)){let t=e.image;$Z(i)||(t=this.converter.convert(t,r).toString()),a.value+=t}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&"number"==typeof t.endOffset&&!isNaN(t.endOffset)}subrule(t,e,r,i,n){let a;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(i)),r=this.wrapper.wrapSubrule(t,e,n),!this.isRecording()&&a&&0{var e=this.keepStackSize();try{r(t)}finally{this.resetStackSize(e)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){var t=this.elementStack.length;return this.stackSize=t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,e,r){this.wrapper.wrapConsume(t,e),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(t,e,r,i,n){this.before(i),this.wrapper.wrapSubrule(t,e,n),this.after(i)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){this.isRecording()||0<=(t=this.elementStack.lastIndexOf(t))&&this.elementStack.splice(t)}get currIdx(){return this.wrapper.currIdx}},Wlt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new qlt},Ylt=class extends Iat{static{me(this,"ChevrotainWrapper")}constructor(t,e){var r=e&&"maxLookahead"in e;super(t,Object.assign(Object.assign(Object.assign({},Wlt),{lookaheadStrategy:r?new Lnt({maxLookahead:e.maxLookahead}):new rot({logging:e.skipValidations?()=>{}:void 0})}),e))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,e){return this.RULE(t,e)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,e){return this.consume(t,e)}wrapSubrule(t,e,r){return this.subrule(t,e,{ARGS:[r]})}wrapOr(t,e){this.or(t,e)}wrapOption(t,e){this.option(t,e)}wrapMany(t,e){this.many(t,e)}wrapAtLeastOne(t,e){this.atLeastOne(t,e)}}});function Vlt(t,e,r){return Xlt({parser:e,tokens:r,ruleNames:new Map},t),e}function Xlt(t,e){let r=qJ(e,!1),i=wK(e.rules).filter(TZ).filter(t=>r.has(t));for(var n of i){var a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(n,Klt(a,n.definition))}}function Klt(e,r,t=!1){let i;if($Z(r))i=sct(e,r);else if(RZ(r))i=Zlt(e,r);else if(DZ(r))i=Klt(e,r.terminal);else if(PZ(r))i=act(e,r);else if(UZ(r))i=Qlt(e,r);else if(MZ(r))i=ect(e,r);else if(YZ(r))i=rct(e,r);else if(FZ(r))i=ict(e,r);else{if(!BZ(r))throw new QK(r.$cstNode,"Unexpected element type: "+r.$type);{let t=e.consume++;i=me(()=>e.parser.consume(t,sit,r),"method")}}return oct(e,t?void 0:nct(r),i,r.cardinality)}function Zlt(t,e){let r=utt(e);return()=>t.parser.action(r,e)}function Qlt(n,a){let s=a.rule.ref;if(TZ(s)){let e=n.subrule++,r=s.fragment,i=0({});return t=>n.parser.subrule(e,lct(n,s),r,a,i(t))}if(AZ(s)){let t=n.consume++,e=hct(n,s.name);return()=>n.parser.consume(t,e,a)}if(!s)throw new QK(a.$cstNode,"Undefined rule: "+a.rule.$refText);ZK(s)}function Jlt(a,t){let s=t.map(t=>tct(t.value));return e=>{var r={};for(let t=0;te(t)||r(t)}if(dZ(i)){let e=tct(i.left),r=tct(i.right);return t=>e(t)&&r(t)}if(xZ(i)){let e=tct(i.value);return t=>!e(t)}if(kZ(i)){let e=i.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(uZ(i)){let t=!!i.true;return()=>t}ZK()}function ect(r,i){if(1===i.elements.length)return Klt(r,i.elements[0]);{let t=[];for(var n of i.elements){var a={ALT:Klt(r,n,!0)};(n=nct(n))&&(a.GATE=tct(n)),t.push(a)}let e=r.or++;return i=>r.parser.alternatives(e,t.map(t=>{let e={ALT:me(()=>t.ALT(i),"ALT")},r=t.GATE;return r&&(e.GATE=()=>r(i)),e}))}}function rct(s,t){if(1===t.elements.length)return Klt(s,t.elements[0]);let e=[];for(var r of t.elements){var i={ALT:Klt(s,r,!0)};(r=nct(r))&&(i.GATE=tct(r)),e.push(i)}let o=s.or++,l=me((t,e)=>`uGroup_${t}_`+e.getRuleStack().join("-"),"idFunc"),n=me(a=>s.parser.alternatives(o,e.map((e,r)=>{let t={ALT:me(()=>!0,"ALT")},i=s.parser,n=(t.ALT=()=>{var t;e.ALT(a),i.isRecording()||(t=l(o,i),i.unorderedGroups.get(t)||i.unorderedGroups.set(t,[]),"u"n(a):t.GATE=()=>!i.unorderedGroups.get(l(o,i))?.[r],t})),"alternatives"),a=oct(s,nct(t),n,"*");return t=>{a(t),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function ict(e,t){let r=t.elements.map(t=>Klt(e,t));return e=>r.forEach(t=>t(e))}function nct(t){if(FZ(t))return t.guardCondition}function act(i,n,a=n.terminal){if(a){if(UZ(a)&&TZ(a.rule.ref)){let e=a.rule.ref,r=i.subrule++;return t=>i.parser.subrule(r,lct(i,e),!1,n,t)}if(UZ(a)&&AZ(a.rule.ref)){let t=i.consume++,e=hct(i,a.rule.ref.name);return()=>i.parser.consume(t,e,n)}if($Z(a)){let t=i.consume++,e=hct(i,a.value);return()=>i.parser.consume(t,e,n)}throw new Error("Could not build cross reference parser")}if(!n.type.ref)throw new Error("Could not resolve reference to type: "+n.type.$refText);if(a=ttt(n.type.ref)?.terminal)return act(i,n,a);throw new Error("Could not find name assignment for type: "+utt(n.type.ref))}function sct(t,e){let r=t.consume++,i=t.tokens[e.value];if(i)return()=>t.parser.consume(r,i,e);throw new Error("Could not find token for keyword: "+e.value)}function oct(i,t,n,e){let a=t&&tct(t);if(!e){if(a){let e=i.or++;return t=>i.parser.alternatives(e,[{ALT:me(()=>n(t),"ALT"),GATE:me(()=>a(t),"GATE")},{ALT:Cat(),GATE:me(()=>!a(t),"GATE")}])}return n}if("*"===e){let e=i.many++;return t=>i.parser.many(e,{DEF:me(()=>n(t),"DEF"),GATE:a?()=>a(t):void 0})}if("+"===e){let r=i.many++;if(a){let e=i.or++;return t=>i.parser.alternatives(e,[{ALT:me(()=>i.parser.atLeastOne(r,{DEF:me(()=>n(t),"DEF")}),"ALT"),GATE:me(()=>a(t),"GATE")},{ALT:Cat(),GATE:me(()=>!a(t),"GATE")}])}return t=>i.parser.atLeastOne(r,{DEF:me(()=>n(t),"DEF")})}if("?"===e){let e=i.optional++;return t=>i.parser.optional(e,{DEF:me(()=>n(t),"DEF"),GATE:a?()=>a(t):void 0})}ZK()}function lct(t,e){if(e=cct(t,e),t=t.parser.getRule(e))return t;throw new Error(`Rule "${e}" not found."`)}function cct(i,n){if(TZ(n))return n.name;if(i.ruleNames.has(n))return i.ruleNames.get(n);{let t=n,e=t.$container,r=n.$type;for(;!TZ(e);)(FZ(e)||MZ(e)||YZ(e))&&(r=e.elements.indexOf(t).toString()+":"+r),e=(t=e).$container;return r=e.name+":"+r,i.ruleNames.set(n,r),r}}function hct(t,e){if(t=t.tokens[e])return t;throw new Error(`Token "${e}" not found."`)}var uct=t(()=>{Bat(),jQ(),JK(),SK(),Ctt(),me(Vlt,"createParser"),me(Xlt,"buildRules"),me(Klt,"buildElement"),me(Zlt,"buildAction"),me(Qlt,"buildRuleCall"),me(Jlt,"buildRuleCallPredicate"),me(tct,"buildPredicate"),me(ect,"buildAlternatives"),me(rct,"buildUnorderedGroup"),me(ict,"buildGroup"),me(nct,"getGuardCondition"),me(act,"buildCrossReference"),me(sct,"buildKeyword"),me(oct,"wrap"),me(lct,"getRule"),me(cct,"getRuleName"),me(hct,"getToken")});function dct(t){var e=t.Grammar,r=t.parser.Lexer;return Vlt(e,t=new jlt(t),r.definition),t.finalize(),t}var pct=t(()=>{Hlt(),uct(),me(dct,"createCompletionParser")});function gct(t){return(t=fct(t)).finalize(),t}function fct(t){var e=t.Grammar,r=t.parser.Lexer;return Vlt(e,new Glt(t),r.definition)}var mct,yct,vct,xct=t(()=>{Hlt(),uct(),me(gct,"createLangiumParser"),me(fct,"prepareLangiumParser")}),bct=t(()=>{Bat(),jQ(),sJ(),Ctt(),$J(),SK(),mct=class{static{me(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(t,e){let r=wK(qJ(t,!1)),i=this.buildTerminalTokens(r),n=this.buildKeywordTokens(r,i,e);return i.forEach(t=>{var e=t.PATTERN;"object"==typeof e&&e&&"test"in e&&LJ(e)?n.unshift(t):n.push(t)}),n}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(AZ).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){var e=ftt(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,i={name:t.name,PATTERN:r};return"function"==typeof r&&(i.LINE_BREAKS=!0),t.hidden&&(i.GROUP=LJ(e)?Grt.SKIPPED:"hidden"),i}requiresCustomPattern(t){return!!(t.flags.includes("u")||t.flags.includes("s")||t.source.includes("?<=")||t.source.includes("?(r.lastIndex=e,r.exec(t))}buildKeywordTokens(t,e,r){return t.filter(TZ).flatMap(t=>QQ(t).filter($Z)).distinct(t=>t.value).toArray().sort((t,e)=>e.value.length-t.value.length).map(t=>this.buildKeywordToken(t,e,!!r?.caseInsensitive))}buildKeywordToken(t,e,r){return r=this.buildKeywordPattern(t,r),t={name:t.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(t,e)},"function"==typeof r&&(t.LINE_BREAKS=!0),t}buildKeywordPattern(t,e){return e?new RegExp(IJ(t.value)):t.value}findLongerAlt(i,t){return t.reduce((t,e)=>{var r=e?.PATTERN;return r?.source&&RJ("^"+r.source+"$",i.value)&&t.push(e),t},[])}}}),wct=t(()=>{function t(e){let r="";for(let t=1;t{var e,r;function i(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}function n(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t}Object.defineProperty(t,"__esModule",{value:!0}),me(i,"RAL"),r=i,me(n,"install"),r.install=n,t.default=i}),Tct=iPt(t=>{function e(t){return!0===t||!1===t}function r(t){return"string"==typeof t||t instanceof String}function i(t){return"number"==typeof t||t instanceof Number}function n(t){return t instanceof Error}function a(t){return"function"==typeof t}function s(t){return Array.isArray(t)}function o(t){return s(t)&&t.every(t=>r(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,me(e,"boolean"),t.boolean=e,me(r,"string"),t.string=r,me(i,"number"),t.number=i,me(n,"error"),t.error=n,me(a,"func"),t.func=a,me(s,"array"),t.array=s,me(o,"stringArray"),t.stringArray=o}),Ect=iPt(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var s=kct();{var r=e.Event={};let t={dispose(){}};r.None=function(){return t}}var n=class{static{me(this,"CallbackList")}add(t,e=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(r)&&r.push({dispose:me(()=>this.remove(t,e),"dispose")})}remove(i,n=null){if(this._callbacks){let r=!1;for(let t=0,e=this._callbacks.length;t{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,e);let i={dispose:me(()=>{this._callbacks&&(this._callbacks.remove(t,e),i.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(e.Emitter=r)._noop=function(){}}),Cct=iPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,r,i=kct(),n=Tct(),a=Ect();function s(t){return t&&(t===r.None||t===r.Cancelled||n.boolean(t.isCancellationRequested)&&!!t.onCancellationRequested)}(r=e||(t.CancellationToken=e={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),me(s,"is"),r.is=s;var o=Object.freeze(function(t,e){let r=(0,i.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),l=class{static{me(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{me(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=e.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=e.None}};t.CancellationTokenSource=c}),_ct={},Sct=t(()=>{H(_ct,tt(Cct(),1))});function Act(){return new Promise(t=>{"u"{Sct(),me(Act,"delayNextTick"),Mct=0,Dct=10,me(Lct,"startCancelableOperation"),me(Nct,"setInterruptionPeriod"),Oct=Symbol("OperationCancelled"),me(Ict,"isOperationCancelled"),me(Rct,"interruptAndCheck"),Pct=class{static{me(this,"Deferred")}constructor(){this.promise=new Promise((e,r)=>{this.resolve=t=>(e(t),this),this.reject=t=>(r(t),this)})}}});function Fct(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);Fct(s,n),Fct(o,n);let t=0,e=0,r=0;for(;tr.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function Uct(t){var e=Gct(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var qct,jct,Wct,Yct,Hct,Vct,Xct,Kct,Zct,Qct,Jct=t(()=>{function t(t,e,r,i){return new qct(t,e,r,i)}function e(t,e,r){if(t instanceof qct)return t.update(e,r),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(t,e){let r=t.getText(),i=Fct(e.map(Uct),(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),n=0,a=[];for(var s of i){var o=t.offsetAt(s.range.start);if(on&&a.push(r.substring(n,o)),s.newText.length&&a.push(s.newText),n=t.offsetAt(s.range.end)}return a.push(r.substr(n)),a.join("")}var i;qct=class n{static{me(this,"FullTextDocument")}constructor(t,e,r,i){this._uri=t,this._languageId=e,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){var e;return t?(e=this.offsetAt(t.start),t=this.offsetAt(t.end),this._content.substring(e,t)):this._content}update(t,e){for(var a of t)if(n.isIncremental(a)){var s=Gct(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),t=Math.max(s.end.line,0),i=this._lineOffsets,n=$ct(a.text,!1,o);if(t-r===n.length)for(let t=0,e=n.length;tt?i=n:r=n+1}var a=r-1;return{line:a,character:(t=this.ensureBeforeEOL(t,e[a]))-e[a]}}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],t.character<=0?e:(r=t.line+1{var r={470:t=>{function d(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function a(t,e){for(var r,i="",n=0,a=-1,s=0,o=0;o<=t.length;++o){if(o{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var u,d,p={};{let i,r=((h.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(p),h.d(p,{URI:me(()=>w,"URI"),Utils:me(()=>u,"Utils")}),"object"==typeof process?i="win32"===process.platform:"object"==typeof navigator&&(i=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),n=/^\//,a=/^\/\//;function g(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!r.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!n.test(t.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(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}me(g,"s");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{me(this,"f")}static isUri(t){return t instanceof w||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,i,n,a=!1){"object"==typeof t?(this.scheme=t.scheme||"",this.authority=t.authority||"",this.path=t.path||"",this.query=t.query||"",this.fragment=t.fragment||""):(this.scheme=t||a?t:"file",this.authority=e||"",this.path=((t,e)=>{switch(t){case"https":case"http":case"file":e?"/"!==e[0]&&(e="/"+e):e="/"}return e})(this.scheme,r||""),this.query=i||"",this.fragment=n||"",g(this,a))}get fsPath(){return y(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:i,query:n,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===i?i=this.path:null===i&&(i=""),void 0===n?n=this.query:null===n&&(n=""),void 0===a?a=this.fragment:null===a&&(a=""),e===this.scheme&&r===this.authority&&i===this.path&&n===this.query&&a===this.fragment?this:new k(e,r,i,n,a)}static parse(t,e=!1){return(t=s.exec(t))?new k(t[2]||"",b(t[4]||""),b(t[5]||""),b(t[7]||""),b(t[9]||""),e):new k("","","","","")}static file(t){let e="",r;return"/"===(t=i?t.replace(/\\/g,"/"):t)[0]&&"/"===t[1]&&(t=-1===(r=t.indexOf("/",2))?(e=t.substring(2),"/"):(e=t.substring(2,r),t.substring(r)||"/")),new k("file",e,t,"","")}static from(t){return g(t=new k(t.scheme,t.authority,t.path,t.query,t.fragment),!0),t}toString(t=!1){return v(this,t)}toJSON(){return this}static revive(t){var e;return t&&(t instanceof w?t:((e=new k(t))._formatted=t.external,e._fsPath=t._sep===o?t.fsPath:null,e))}}let o=i?1:void 0;class k extends w{static{me(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(t=!1){return t?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=o),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}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(e,r,i){let n,a=-1;for(let t=0;tx(t)):t}me(b,"C");let t=h(470),c=t.posix||t;(d=u=u||{}).joinPath=function(t,...e){return t.with({path:c.join(t.path,...e)})},d.resolvePath=function(t,...e){let r=t.path,i=!1,n=("/"!==r[0]&&(r="/"+r,i=!0),c.resolve(r,...e));return i&&"/"===n[0]&&!t.authority&&(n=n.substring(1)),t.with({path:n})},d.dirname=function(t){if(0===t.path.length||"/"===t.path)return t;let e=c.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},d.basename=function(t){return c.basename(t.path)},d.extname=function(t){return c.extname(t.path)}}({URI:Wct,Utils:Yct}=p)}),eht=t(()=>{function t(t,e){return t?.toString()===e?.toString()}function e(t,e){let r="string"==typeof t?t:t.path,i="string"==typeof e?e:e.path,n=r.split("/").filter(t=>00{var t;Jct(),rht(),Sct(),SK(),eht(),(t=Vct=Vct||{})[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated",Xct=class{static{me(this,"DefaultLangiumDocumentFactory")}constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,e=_ct.CancellationToken.None){var r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??Wct.parse(t.uri),_ct.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromString(t,e,r){return _ct.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromModel(t,e){return this.create(e,{$model:t})}create(t,e,r){var i;return"string"==typeof e?(i=this.parse(t,e,r),this.createLangiumDocument(i,t,void 0,e)):"$model"in e?(i={value:e.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(i,t)):(i=this.parse(t,e.getText(),r),this.createLangiumDocument(i,t,e))}async createAsync(t,e,r){var i;return"string"==typeof e?(i=await this.parseAsync(t,e,r),this.createLangiumDocument(i,t,void 0,e)):(i=await this.parseAsync(t,e.getText(),r),this.createLangiumDocument(i,t,e))}createLangiumDocument(e,r,t,i){let n;if(t)n={parseResult:e,uri:r,state:Vct.Parsed,references:[],textDocument:t};else{let t=this.createTextDocumentGetter(r,i);n={parseResult:e,uri:r,state:Vct.Parsed,references:[],get textDocument(){return t()}}}return e.value.$document=n}async update(t,e){var r=null==(r=t.parseResult.value.$cstNode)?void 0:r.root.fullText,i=null==(i=this.textDocuments)?void 0:i.get(t.uri.toString()),n=i?i.getText():await this.fileSystemProvider.readFile(t.uri);return i?Object.defineProperty(t,"textDocument",{value:i}):(i=this.createTextDocumentGetter(t.uri,n),Object.defineProperty(t,"textDocument",{get:i})),r!==n&&(t.parseResult=await this.parseAsync(t.uri,n,e),t.parseResult.value.$document=t),t.state=Vct.Parsed,t}parse(t,e,r){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(e,r)}parseAsync(t,e,r){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(e,r)}createTextDocumentGetter(t,e){let r=this.serviceRegistry,i;return()=>i=i??jct.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??"")}},Kct=class{static{me(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.serviceRegistry=t.ServiceRegistry}get all(){return wK(this.documentMap.values())}addDocument(t){var e=t.uri.toString();if(this.documentMap.has(e))throw new Error(`A document with the URI '${e}' is already present.`);this.documentMap.set(e,t)}getDocument(t){return t=t.toString(),this.documentMap.get(t)}async getOrCreateDocument(t,e){return this.getDocument(t)||(t=await this.langiumDocumentFactory.fromUri(t,e),this.addDocument(t),t)}createDocument(t,e,r){return r?this.langiumDocumentFactory.fromString(e,t,r).then(t=>(this.addDocument(t),t)):(r=this.langiumDocumentFactory.fromString(e,t),this.addDocument(r),r)}hasDocument(t){return this.documentMap.has(t.toString())}invalidateDocument(t){var e=t.toString();return(e=this.documentMap.get(e))&&(this.serviceRegistry.getServices(t).references.Linker.unlink(e),e.state=Vct.Changed,e.precomputedScopes=void 0,e.diagnostics=void 0),e}deleteDocument(t){var t=t.toString(),e=this.documentMap.get(t);return e&&(e.state=Vct.Changed,this.documentMap.delete(t)),e}}}),iht=t(()=>{Sct(),vK(),sJ(),Bct(),rht(),Zct=Symbol("ref_resolving"),Qct=class{static{me(this,"DefaultLinker")}constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator}async link(e,t=_ct.CancellationToken.None){for(var r of JQ(e.parseResult.value))await Rct(t),eJ(r).forEach(t=>this.doLink(t,e))}doLink(t,e){var r=t.reference;if(void 0===r._ref){r._ref=Zct;try{var i,n=this.getCandidate(t);pK(n)?r._ref=n:(r._nodeDescription=n,this.langiumDocuments().hasDocument(n.documentUri)?(i=this.loadAstNode(n),r._ref=i??this.createLinkingError(t,n)):r._ref=void 0)}catch(e){console.error(`An error occurred while resolving reference to '${r.$refText}':`,e),n=null!=(i=e.message)?i:String(e),r._ref=Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${r.$refText}': `+n})}e.references.push(r)}}unlink(t){for(var e of t.references)delete e._ref,delete e._nodeDescription;t.references=[]}getCandidate(t){return this.scopeProvider.getScope(t).getElement(t.reference.$refText)??this.createLinkingError(t)}buildReference(i,n,t,a){let s=this,o={$refNode:t,$refText:a,get ref(){var t;if(hK(this._ref))return this._ref;if(dK(this._nodeDescription)){var e=s.loadAstNode(this._nodeDescription);this._ref=e??s.createLinkingError({reference:o,container:i,property:n},this._nodeDescription)}else if(void 0===this._ref){this._ref=Zct;var e=KQ(i).$document,r=s.getLinkedNode({reference:o,container:i,property:n});if(r.error&&e&&e.state{Ctt(),me(nht,"isNamed"),aht=class{static{me(this,"DefaultNameProvider")}getName(t){if(nht(t))return t.name}getNameNode(t){return VJ(t.$cstNode,"name")}}}),bht=t(()=>{Ctt(),vK(),sJ(),KK(),SK(),eht(),sht=class{static{me(this,"DefaultReferences")}constructor(t){this.nameProvider=t.references.NameProvider,this.index=t.shared.workspace.IndexManager,this.nodeLocator=t.workspace.AstNodeLocator}findDeclaration(t){if(t){var e=JJ(t),r=t.astNode;if(e&&r){if(uK(e=r[e.feature]))return e.ref;if(Array.isArray(e))for(var i of e)if(uK(i)&&i.$refNode&&i.$refNode.offset<=t.offset&&i.$refNode.end>=t.end)return i.ref}if(r&&(e=this.nameProvider.getNameNode(r))&&(e===t||IK(t,e)))return r}}findDeclarationNode(t){if((t=this.findDeclaration(t))?.$cstNode)return this.nameProvider.getNameNode(t)??t.$cstNode}findReferences(t,e){var r,i=[];e.includeDeclaration&&(r=this.getReferenceToSelf(t))&&i.push(r);let n=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(n=n.filter(t=>Hct.equals(t.sourceUri,e.documentUri))),i.push(...n),wK(i)}getReferenceToSelf(t){var e,r=this.nameProvider.getNameNode(t);if(r)return e=XQ(t),t=this.nodeLocator.getAstNodePath(t),{sourceUri:e.uri,sourcePath:t,targetUri:e.uri,targetPath:t,segment:MK(r),local:!0}}}}),wht=t(()=>{SK(),oht=class{static{me(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(var[e,r]of t)this.add(e,r)}get size(){return _K.sum(wK(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,e){var r;return void 0===e?this.map.delete(t):!!((r=this.map.get(t))&&0<=(e=r.indexOf(e)))&&(1===r.length?this.map.delete(t):r.splice(e,1),!0)}get(t){return null!=(t=this.map.get(t))?t:[]}has(t,e){return void 0===e?this.map.has(t):!!(t=this.map.get(t))&&0<=t.indexOf(e)}add(t,e){return this.map.has(t)?this.map.get(t).push(e):this.map.set(t,[e]),this}addAll(t,e){return this.map.has(t)?this.map.get(t).push(...e):this.map.set(t,Array.from(e)),this}forEach(r){this.map.forEach((t,e)=>t.forEach(t=>r(t,e,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return wK(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return wK(this.map.keys())}values(){return wK(this.map.values()).flat()}entriesGroupedByKey(){return wK(this.map.entries())}},lht=class{static{me(this,"BiMap")}get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(var[e,r]of t)this.set(e,r)}clear(){this.map.clear(),this.inverse.clear()}set(t,e){return this.map.set(t,e),this.inverse.set(e,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){var e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.inverse.delete(e),!0)}}}),kht=t(()=>{Sct(),sJ(),wht(),Bct(),cht=class{static{me(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,e=_ct.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,e)}async computeExportsForNode(t,e,r=ZQ,i=_ct.CancellationToken.None){var n,a=[];this.exportNode(t,a,e);for(n of r(t))await Rct(i),this.exportNode(n,a,e);return a}exportNode(t,e,r){var i=this.nameProvider.getName(t);i&&e.push(this.descriptions.createDescription(t,i,r))}async computeLocalScopes(t,e=_ct.CancellationToken.None){var r,i=t.parseResult.value,n=new oht;for(r of QQ(i))await Rct(e),this.processNode(r,t,n);return n}processNode(t,e,r){var i,n=t.$container;n&&(i=this.nameProvider.getName(t))&&r.add(n,this.descriptions.createDescription(t,i,e))}}}),Tht=t(()=>{SK(),hht=class{static{me(this,"StreamScope")}constructor(t,e,r){this.elements=t,this.outerScope=e,this.caseInsensitive=null!=(t=r?.caseInsensitive)&&t}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){return(this.caseInsensitive?this.elements.find(t=>t.name.toLowerCase()===e.toLowerCase()):this.elements.find(t=>t.name===e))||(this.outerScope?this.outerScope.getElement(e):void 0)}},uht=class{static{me(this,"MapScope")}constructor(t,e,r){var i;this.elements=new Map,this.caseInsensitive=null!=(r=r?.caseInsensitive)&&r;for(i of t){var n=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(n,i)}this.outerScope=e}getElement(t){var e=this.caseInsensitive?t.toLowerCase():t;return this.elements.get(e)||(this.outerScope?this.outerScope.getElement(t):void 0)}getAllElements(){let t=wK(this.elements.values());return t=this.outerScope?t.concat(this.outerScope.getAllElements()):t}},dht={getElement(){},getAllElements(){return TK}}}),Eht=t(()=>{pht=class{static{me(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(t){this.toDispose.push(t)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(t=>t.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},ght=class extends pht{static{me(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,e){this.throwIfDisposed(),this.cache.set(t,e)}get(t,e){return this.throwIfDisposed(),this.cache.has(t)?this.cache.get(t):e?(e=e(),this.cache.set(t,e),e):void 0}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}},fht=class extends pht{static{me(this,"ContextCache")}constructor(t){super(),this.cache=new Map,this.converter=t??(t=>t)}has(t,e){return this.throwIfDisposed(),this.cacheForContext(t).has(e)}set(t,e,r){this.throwIfDisposed(),this.cacheForContext(t).set(e,r)}get(t,e,r){return this.throwIfDisposed(),(t=this.cacheForContext(t)).has(e)?t.get(e):r?(r=r(),t.set(e,r),r):void 0}delete(t,e){return this.throwIfDisposed(),this.cacheForContext(t).delete(e)}clear(t){this.throwIfDisposed(),t?(t=this.converter(t),this.cache.delete(t)):this.cache.clear()}cacheForContext(t){let e=this.converter(t),r=this.cache.get(e);return r||(r=new Map,this.cache.set(e,r)),r}},mht=class extends fht{static{me(this,"DocumentCache")}constructor(t,e){super(t=>t.toString()),e?(this.toDispose.push(t.workspace.DocumentBuilder.onDocumentPhase(e,t=>{this.clear(t.uri.toString())})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{for(var r of e)this.clear(r)}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{var r;for(r of t.concat(e))this.clear(r)}))}},yht=class extends ght{static{me(this,"WorkspaceCache")}constructor(t,e){super(),e?(this.toDispose.push(t.workspace.DocumentBuilder.onBuildPhase(e,()=>{this.clear()})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{0{this.clear()}))}}}),Cht=t(()=>{Tht(),sJ(),SK(),Eht(),vht=class{static{me(this,"DefaultScopeProvider")}constructor(t){this.reflection=t.shared.AstReflection,this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider,this.indexManager=t.shared.workspace.IndexManager,this.globalScopeCache=new yht(t.shared)}getScope(e){let r=[],i=this.reflection.getReferenceType(e),n=XQ(e.container).precomputedScopes;if(n){let t=e.container;do{var a=n.get(t);0this.reflection.isSubtype(t.type,i))),t=t.$container}while(t)}let s=this.getGlobalScope(i,e);for(let t=r.length-1;0<=t;t--)s=this.createScope(r[t],s);return s}createScope(t,e,r){return new hht(wK(t),e,r)}createScopeForNodes(t,e,r){return t=wK(t).map(t=>{var e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable(),new hht(t,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new uht(this.indexManager.allElements(t)))}}});function _ht(t){return"string"==typeof t.$comment}function Sht(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}var Aht,Lht,Nht=t(()=>{tht(),vK(),sJ(),Ctt(),me(_ht,"isAstNodeWithComment"),me(Sht,"isIntermediateReference"),Aht=class{static{me(this,"DefaultJsonSerializer")}constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,e){let r=e??{},i=e?.replacer,n=me((t,e)=>this.replacer(t,e,r),"defaultReplacer"),a=i?(t,e)=>i(t,e,n):n;try{return this.currentDocument=XQ(t),JSON.stringify(t,a,e?.space)}finally{this.currentDocument=void 0}}deserialize(t,e){return e=e??{},t=JSON.parse(t),this.linkNode(t,t,e),t}replacer(e,r,{refText:i,sourceText:n,textRegions:a,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(e)){if(uK(r)){var l=r.ref,i=i?r.$refText:void 0;if(l){let t=XQ(l),e="";return this.currentDocument&&this.currentDocument!==t&&(e=o?o(t.uri,r):t.uri.toString()),o=this.astNodeLocator.getAstNodePath(l),{$ref:e+"#"+o,$refText:i}}return{$error:null!=(o=null==(l=r.error)?void 0:l.message)?o:"Could not resolve reference",$refText:i}}if(hK(r)){let t;return a&&(t=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),!e||r.$document)&&t?.$textRegion&&(t.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString()),n&&!e&&((t=t??Object.assign({},r)).$sourceText=null==(o=r.$cstNode)?void 0:o.text),s&&(t=t??Object.assign({},r),i=this.commentProvider.getComment(r))&&(t.$comment=i.replace(/\r/g,"")),t??r}return r}}addAstNodeRegionWithAssignmentsTo(i){let n=me(t=>({offset:t.offset,end:t.end,length:t.length,range:t.range}),"createDocumentSegment");if(i.$cstNode){let t=i.$textRegion=n(i.$cstNode),r=t.assignments={};return Object.keys(i).filter(t=>!t.startsWith("$")).forEach(t=>{var e=HJ(i.$cstNode,t).map(n);0!==e.length&&(r[t]=e)}),i}}linkNode(e,r,i,t,n,a){for(var[s,o]of Object.entries(e))if(Array.isArray(o))for(let t=0;t{eht(),Lht=class{static{me(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(t){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=t?.workspace.TextDocuments}register(t){var e,r=t.LanguageMetaData;for(e of r.fileExtensions)this.fileExtensionMap.has(e)&&console.warn(`The file extension ${e} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(e,t);this.languageIdMap.set(r.languageId,t),1===this.languageIdMap.size?this.singleton=t:this.singleton=void 0}getServices(t){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 e=null==(e=null==(e=this.textDocuments)?void 0:e.get(t))?void 0:e.languageId;if(void 0!==e){var r=this.languageIdMap.get(e);if(r)return r}if(r=Hct.extname(t),t=this.fileExtensionMap.get(r))return t;throw e?new Error(`The service registry contains no services for the extension '${r}' for language '${e}'.`):new Error(`The service registry contains no services for the extension '${r}'.`)}hasServices(t){try{return this.getServices(t),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function Rht(t){return{code:t}}var Mht,Dht,Oht=t(()=>{Pdt(),wht(),Bct(),SK(),me(Rht,"diagnosticData"),(Mht=Mht||{}).all=["fast","slow","built-in"],Dht=class{static{me(this,"ValidationRegistry")}constructor(t){this.entries=new oht,this.entriesBefore=[],this.entriesAfter=[],this.reflection=t.shared.AstReflection}register(t,e=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(var[i,n]of Object.entries(t))if(Array.isArray(n))for(var a of n)a={check:this.wrapValidationException(a,e),category:r},this.addEntry(i,a);else"function"==typeof n?(n={check:this.wrapValidationException(n,e),category:r},this.addEntry(i,n)):ZK()}wrapValidationException(i,n){return async(t,e,r)=>{await this.handleException(()=>i.call(n,t,e,r),"An error occurred during validation",e,t)}}async handleException(t,e,r,i){try{await t()}catch(t){if(Ict(t))throw t;console.error(e+":",t),t instanceof Error&&t.stack&&console.error(t.stack),r("error",e+": "+(t instanceof Error?t.message:String(t)),{node:i})}}addEntry(t,e){if("AstNode"===t)this.entries.add("AstNode",e);else for(var r of this.reflection.getAllSubTypes(t))this.entries.add(r,e)}getChecks(t,e){let r=wK(this.entries.get(t)).concat(this.entries.get("AstNode"));return(r=e?r.filter(t=>e.includes(t.category)):r).map(t=>t.check)}registerBeforeDocument(t,e=this){this.entriesBefore.push(this.wrapPreparationException(t,"An error occurred during set-up of the validation",e))}registerAfterDocument(t,e=this){this.entriesAfter.push(this.wrapPreparationException(t,"An error occurred during tear-down of the validation",e))}wrapPreparationException(n,a,s){return async(t,e,r,i)=>{await this.handleException(()=>n.call(s,t,e,r,i),a,e,t)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function Pht(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=VJ(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=ZJ(t.node.$cstNode,t.keyword,t.index)),(e=e??t.node.$cstNode)?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Bht(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function Fht(t){switch(t){case"error":return Rht(zht.LexingError);case"warning":return Rht(zht.LexingWarning);case"info":return Rht(zht.LexingInfo);case"hint":return Rht(zht.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var $ht,zht,Ght,Uht,qht,jht,Wht,Yht,Hht,Vht,Xht=t(()=>{var t;Sct(),Ctt(),sJ(),KK(),Bct(),Oht(),$ht=class{static{me(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,e={},r=_ct.CancellationToken.None){var i=t.parseResult,n=[];if(await Rct(r),e.categories&&!e.categories.includes("built-in")||(this.processLexingErrors(i,n,e),!(e.stopAfterLexingErrors&&n.some(t=>(null==(t=t.data)?void 0:t.code)===zht.LexingError)||(this.processParsingErrors(i,n,e),e.stopAfterParsingErrors&&n.some(t=>(null==(t=t.data)?void 0:t.code)===zht.ParsingError))||(this.processLinkingErrors(t,n,e),e.stopAfterLinkingErrors&&n.some(t=>(null==(t=t.data)?void 0:t.code)===zht.LinkingError))))){try{n.push(...await this.validateAst(i.value,e,r))}catch(t){if(Ict(t))throw t;console.error("An error occurred during validation:",t)}await Rct(r)}return n}processLexingErrors(t,e,r){var i;for(i of[...t.lexerErrors,...null!=(t=null==(t=t.lexerReport)?void 0:t.diagnostics)?t:[]]){var n={severity:Bht(n=null!=(n=i.severity)?n:"error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:Fht(n),source:this.getSource()};e.push(n)}}processParsingErrors(t,e,r){for(var i of t.parserErrors){let t;var n,a;isNaN(i.token.startOffset)?"previousToken"in i&&(a=i.previousToken,t=isNaN(a.startOffset)?{start:n={line:0,character:0},end:n}:{start:n={line:a.endLine-1,character:a.endColumn},end:n}):t=RK(i.token),t&&(a={severity:Bht("error"),range:t,message:i.message,data:Rht(zht.ParsingError),source:this.getSource()},e.push(a))}}processLinkingErrors(t,e,r){for(var i of t.references){var n;(i=i.error)&&(n={node:i.container,property:i.property,index:i.index,data:{code:zht.LinkingError,containerType:i.container.$type,property:i.property,refText:i.reference.$refText}},e.push(this.toDiagnostic("error",i.message,n)))}}async validateAst(t,e,r=_ct.CancellationToken.None){let i=[],n=me((t,e,r)=>{i.push(this.toDiagnostic(t,e,r))},"acceptor");return await this.validateAstBefore(t,e,n,r),await this.validateAstNodes(t,e,n,r),await this.validateAstAfter(t,e,n,r),i}async validateAstBefore(t,e,r,i=_ct.CancellationToken.None){var n,a;for(a of this.validationRegistry.checksBefore)await Rct(i),await a(t,r,null!=(n=e.categories)?n:[],i)}async validateAstNodes(t,r,i,n=_ct.CancellationToken.None){await Promise.all(JQ(t).map(async t=>{var e;await Rct(n);for(e of this.validationRegistry.getChecks(t.$type,r.categories))await e(t,i,n)}))}async validateAstAfter(t,e,r,i=_ct.CancellationToken.None){var n,a;for(a of this.validationRegistry.checksAfter)await Rct(i),await a(t,r,null!=(n=e.categories)?n:[],i)}toDiagnostic(t,e,r){return{message:e,range:Pht(r),severity:Bht(t),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},me(Pht,"getDiagnosticRange"),me(Bht,"toDiagnosticSeverity"),me(Fht,"toDiagnosticData"),(t=zht=zht||{}).LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"}),Kht=t(()=>{Sct(),vK(),sJ(),KK(),Bct(),eht(),Ght=class{static{me(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(e,t,r){var r=r??XQ(e),i=(t=t??this.nameProvider.getName(e),this.astNodeLocator.getAstNodePath(e));if(!t)throw new Error(`Node at path ${i} has no name.`);let n,a=me(()=>{var t;return n=n??MK(null!=(t=this.nameProvider.getNameNode(e))?t:e.$cstNode)},"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:MK(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},Uht=class{static{me(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=_ct.CancellationToken.None){let r=[],i=t.parseResult.value;for(var n of JQ(i))await Rct(e),eJ(n).filter(t=>!pK(t)).forEach(t=>{(t=this.createDescription(t))&&r.push(t)});return r}createDescription(t){var e,r=t.reference.$nodeDescription,i=t.reference.$refNode;if(r&&i)return{sourceUri:e=XQ(t.container).uri,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:r.documentUri,targetPath:r.path,segment:MK(i),local:Hct.equals(r.documentUri,e)}}}}),Zht=t(()=>{qht=class{static{me(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){var e;return t.$container?(e=this.getAstNodePath(t.$container),t=this.getPathSegment(t),e+this.segmentSeparator+t):""}getPathSegment({$containerProperty:t,$containerIndex:e}){if(t)return void 0!==e?t+this.indexSeparator+e:t;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(t,e){return e.split(this.segmentSeparator).reduce((t,e)=>{var r,i;return t&&0!==e.length?0<(i=e.indexOf(this.indexSeparator))?(r=e.substring(0,i),i=parseInt(e.substring(i+1)),t[r]?.[i]):t[e]:t},t)}}}),Qht={},Jht=t(()=>{H(Qht,tt(Ect(),1))}),tut=t(()=>{Jht(),Bct(),jht=class{static{me(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new Pct,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new Qht.Emitter,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){this.workspaceConfig=null!=(t=null==(t=t.capabilities.workspace)?void 0:t.configuration)&&t}async initialized(e){var t;if(this.workspaceConfig&&(e.register&&(t=this.serviceRegistry.all,e.register({section:t.map(t=>this.toSectionName(t.LanguageMetaData.languageId))})),e.fetchConfiguration)){let t=this.serviceRegistry.all.map(t=>({section:this.toSectionName(t.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((t,e)=>{this.updateSectionConfiguration(t.section,r[e])})}this._ready.resolve()}updateConfiguration(r){r.settings&&Object.keys(r.settings).forEach(t=>{var e=r.settings[t];this.updateSectionConfiguration(t,e),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:e})})}updateSectionConfiguration(t,e){this.settings[t]=e}async getConfiguration(t,e){if(await this.ready,t=this.toSectionName(t),this.settings[t])return this.settings[t][e]}toSectionName(t){return""+t}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}}),eut=t(()=>{function t(t){return{dispose:me(async()=>t(),"dispose")}}var e=Wht=Wht||{};me(t,"create"),e.create=t}),rut=t(()=>{Sct(),eut(),wht(),Bct(),SK(),Oht(),rht(),Yht=class{static{me(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new oht,this.documentPhaseListeners=new oht,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Vct.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.textDocuments=t.workspace.TextDocuments,this.indexManager=t.workspace.IndexManager,this.serviceRegistry=t.ServiceRegistry}async build(t,r={},e=_ct.CancellationToken.None){var i;for(i of t){var n,a=i.uri.toString();if(i.state===Vct.Validated){if("boolean"==typeof r.validation&&r.validation)i.state=Vct.IndexedReferences,i.diagnostics=void 0,this.buildState.delete(a);else if("object"==typeof r.validation){let t=this.buildState.get(a),e=null==(n=t?.result)?void 0:n.validationChecks;e&&0<(n=(null!=(n=r.validation.categories)?n:Mht.all).filter(t=>!e.includes(t))).length&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:n})},result:t.result}),i.state=Vct.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Vct.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,r,e)}async update(t,e,r=_ct.CancellationToken.None){this.currentState=Vct.Changed;for(var i of e)this.langiumDocuments.deleteDocument(i),this.buildState.delete(i.toString()),this.indexManager.remove(i);for(var n of t){var a;this.langiumDocuments.invalidateDocument(n)||((a=this.langiumDocumentFactory.fromModel({$type:"INVALID"},n)).state=Vct.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(n.toString())}let s=wK(t).concat(e).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!s.has(t.uri.toString())&&this.shouldRelink(t,s)).forEach(t=>{this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t),t.state=Math.min(t.state,Vct.ComputedScopes),t.diagnostics=void 0}),await this.emitUpdate(t,e),await Rct(r),t=this.sortDocuments(this.langiumDocuments.all.filter(t=>t.statet(e,r)))}sortDocuments(t){let e=0,r=t.length-1;for(;evoid 0!==t.error)||this.indexManager.isAffected(t,e)}onUpdate(e){return this.updateListeners.push(e),Wht.create(()=>{var t=this.updateListeners.indexOf(e);0<=t&&this.updateListeners.splice(t,1)})}async buildDocuments(t,e,r){this.prepareBuild(t,e),await this.runCancelable(t,Vct.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,Vct.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,Vct.ComputedScopes,r,async t=>{var e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.precomputedScopes=await e.computeLocalScopes(t,r)}),await this.runCancelable(t,Vct.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(t,Vct.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));var i,e=t.filter(t=>this.shouldValidate(t));await this.runCancelable(e,Vct.Validated,r,t=>this.validate(t,r));for(i of t){var n=this.buildState.get(i.uri.toString());n&&(n.completed=!0)}}prepareBuild(t,e){for(var r of t){var r=r.uri.toString(),i=this.buildState.get(r);i&&!i.completed||this.buildState.set(r,{completed:!1,options:e,result:i?.result})}}async runCancelable(t,e,r,i){var n;for(n of t.filter(t=>t.statet.state===e),await this.notifyBuildPhase(t,e,r),this.currentState=e}onBuildPhase(t,e){return this.buildPhaseListeners.add(t,e),Wht.create(()=>{this.buildPhaseListeners.delete(t,e)})}onDocumentPhase(t,e){return this.documentPhaseListeners.add(t,e),Wht.create(()=>{this.documentPhaseListeners.delete(t,e)})}waitUntil(n,t,a){let s;return t&&"path"in t?s=t:a=t,a=a??_ct.CancellationToken.None,s&&(t=this.langiumDocuments.getDocument(s))&&t.state>n?Promise.resolve(s):this.currentState>=n?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(Oct):new Promise((e,t)=>{let r=this.onBuildPhase(n,()=>{var t;r.dispose(),i.dispose(),s?(t=this.langiumDocuments.getDocument(s),e(t?.uri)):e(void 0)}),i=a.onCancellationRequested(()=>{r.dispose(),i.dispose(),t(Oct)})})}async notifyDocumentPhase(t,e,r){var i;for(i of this.documentPhaseListeners.get(e).slice())try{await i(t,r)}catch(t){if(!Ict(t))throw t}}async notifyBuildPhase(t,e,r){var i;if(0!==t.length)for(i of this.buildPhaseListeners.get(e).slice())await Rct(r),await i(t,r)}shouldValidate(t){return!!this.getBuildOptions(t).validation}async validate(t,e){var r=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,i=this.getBuildOptions(t).validation,r=await r.validateDocument(t,i="object"==typeof i?i:void 0,e);t.diagnostics?t.diagnostics.push(...r):t.diagnostics=r,(e=this.buildState.get(t.uri.toString()))&&(null==e.result&&(e.result={}),t=null!=(r=i?.categories)?r:Mht.all,e.result.validationChecks?e.result.validationChecks.push(...t):e.result.validationChecks=[...t])}getBuildOptions(t){return null!=(t=null==(t=this.buildState.get(t.uri.toString()))?void 0:t.options)?t:{}}}}),iut=t(()=>{sJ(),Eht(),Sct(),SK(),eht(),Hht=class{static{me(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new fht,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){let r=XQ(t).uri,i=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{Hct.equals(t.targetUri,r)&&t.targetPath===e&&i.push(t)})}),wK(i)}allElements(e,r){let t=wK(this.symbolIndex.keys());return(t=r?t.filter(t=>!r||r.has(t)):t).map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,r){var t;return r?this.symbolByTypeIndex.get(e,r,()=>{var t;return(null!=(t=this.symbolIndex.get(e))?t:[]).filter(t=>this.astReflection.isSubtype(t.type,r))}):null!=(t=this.symbolIndex.get(e))?t:[]}remove(t){t=t.toString(),this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(t,e=_ct.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).references.ScopeComputation.computeExports(t,e),t=t.uri.toString(),this.symbolIndex.set(t,e),this.symbolByTypeIndex.clear(t)}async updateReferences(t,e=_ct.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).workspace.ReferenceDescriptionProvider.createDescriptions(t,e),this.referenceIndex.set(t.uri.toString(),e)}isAffected(t,e){return!!(t=this.referenceIndex.get(t.uri.toString()))&&t.some(t=>!t.local&&e.has(t.targetUri.toString()))}}}),nut=t(()=>{Sct(),Bct(),eht(),Vht=class{static{me(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new Pct,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(t){this.folders=null!=(t=t.workspaceFolders)?t:void 0}initialized(t){return this.mutex.write(t=>{var e;return this.initializeWorkspace(null!=(e=this.folders)?e:[],t)})}async initializeWorkspace(t,e=_ct.CancellationToken.None){t=await this.performStartup(t),await Rct(e),await this.documentBuilder.build(t,this.initialBuildOptions,e)}async performStartup(t){let e=this.serviceRegistry.all.flatMap(t=>t.LanguageMetaData.fileExtensions),r=[],i=me(t=>{r.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)},"collector");return await this.loadAdditionalDocuments(t,i),await Promise.all(t.map(t=>[t,this.getRootFolder(t)]).map(async t=>this.traverseFolder(...t,e,i))),this._ready.resolve(),r}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return Wct.parse(t.uri)}async traverseFolder(e,t,r,i){t=await this.fileSystemProvider.readDirectory(t),await Promise.all(t.map(async t=>{this.includeEntry(e,t,r)&&(t.isDirectory?await this.traverseFolder(e,t.uri,r,i):t.isFile&&(t=await this.langiumDocuments.getOrCreateDocument(t.uri),i(t)))}))}includeEntry(t,e,r){var i=Hct.basename(e.uri);return!i.startsWith(".")&&(e.isDirectory?"node_modules"!==i&&"out"!==i:!!e.isFile&&(i=Hct.extname(e.uri),r.includes(i)))}}});function aut(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function sut(t){return t&&"modes"in t&&"defaultMode"in t}function out(t){return!aut(t)&&!sut(t)}var lut,cut,hut,uut=t(()=>{Bat(),lut=class{static{me(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(t,e,r,i,n){return Frt.buildUnexpectedCharactersMessage(t,e,r,i,n)}buildUnableToPopLexerModeMessage(t){return Frt.buildUnableToPopLexerModeMessage(t)}},cut={mode:"full"},hut=class{static{me(this,"DefaultLexer")}constructor(t){this.errorMessageProvider=t.parser.LexerErrorMessageProvider,this.tokenBuilder=t.parser.TokenBuilder;var e=this.tokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive}),e=(this.tokenTypes=this.toTokenTypeDictionary(e),out(e)?Object.values(e):e),t="production"===t.LanguageMetaData.mode;this.chevrotainLexer=new Grt(e,{positionTracking:"full",skipValidations:t,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(t,e=0){var r,i=this.chevrotainLexer.tokenize(t);return{tokens:i.tokens,errors:i.errors,hidden:null!=(i=i.groups.hidden)?i:[],report:null==(r=(i=this.tokenBuilder).flushLexingReport)?void 0:r.call(i,t)}}toTokenTypeDictionary(t){if(out(t))return t;let e=sut(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}},me(aut,"isTokenTypeArray"),me(sut,"isIMultiModeLexerDefinition"),me(out,"isTokenTypeDictionary")});function dut(t,e,r){let i,n;return i="string"==typeof t?(n=e,r):(n=t.range.start,e),n=n||oot.create(0,0),r=gut(t),e=_ut(i),xut({index:0,tokens:fut({lines:r,position:n,options:e}),position:n})}function put(t,e){var r,i,e=_ut(e);return 0!==(t=gut(t)).length&&(r=t[t.length-1],i=e.start,e=e.end,!!i?.exec(t[0]))&&!!e?.exec(r)}function gut(t){return("string"==typeof t?t:t.text).split(DJ)}function fut(a){let s,o,l,c=[],h=a.position.line,u=a.position.character;for(let n=0;n=r.length?0t.state.transitions),{actualToken:r,possibleTokenTypes:xW(e.filter(t=>t instanceof Tst).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function Gst(t,e){return t.edges[e.tokenTypeIdx]}function Ust(t,e,r){var n,i=new Lst,a=[];for(n of t.elements)if(!1!==r.is(n.alt))if(n.state.type===mst)a.push(n);else{var s=n.state.transitions.length;for(let t=0;t{zat(),_st(),Nst(),Iq(),vU(),bW(),fU(),XP(),DG(),oq(),jj(),me(Ist,"createDFACache"),not=class{static{me(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let e="",r=this.predicates.length;for(let t=0;tconsole.log(t)}initialize(t){this.atn=Uat(t.rules),this.dfas=Mst(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:e,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,o=Gat(r,"Alternation",e),l=this.atn.decisionMap[o].decision,c=x(Nnt({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>x(t,t=>t[0]));if(!Rst(c,!1)||i)return n?function(e){var r=new not,n=void 0===e?0:e.length;for(let t=0;t(v(t,t=>{t&&(e[t.tokenTypeIdx]=r,v(t.categoryMatches,t=>{e[t]=r}))}),e),{});return n?function(t){var e=this.LA(1),e=r[e.tokenTypeIdx];if(void 0===t||void 0===e||void 0===(t=null==(t=t[e])?void 0:t.GATE)||!1!==t.call(this))return e}:function(){var t=this.LA(1);return r[t.tokenTypeIdx]}}}buildLookaheadForOptional(r){let{prodOccurrence:t,rule:e,prodType:n,dynamicTokensEnabled:i}=r,a=this.dfas,s=this.logging,o=Gat(e,n,t),l=this.atn.decisionMap[o].decision,c=x(Nnt({maxLookahead:1,occurrence:t,prodType:n,rule:e}),t=>x(t,t=>t[0]));if(Rst(c)&&c[0][0]&&!i){if(r=c[0],1===(r=VP(r)).length&&sq(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=qj(r,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){var t=Dst.call(this,a,l,iot,s);return"object"!=typeof t&&0===t}}},me(Rst,"isLL1Sequence"),me(Mst,"initATNSimulator"),me(Dst,"adaptivePredict"),me(Ost,"performLookahead"),me(Pst,"computeLookaheadTarget"),me(Bst,"reportLookaheadAmbiguity"),me(Fst,"buildAmbiguityError"),me($st,"getProductionDslName"),me(zst,"buildAdaptivePredictError"),me(Gst,"getExistingTargetState"),me(Ust,"computeReachSet"),me(qst,"getReachableTarget"),me(jst,"getUniqueAlt"),me(Wst,"newDFAState"),me(Yst,"addDFAEdge"),me(Hst,"addDFAState"),me(Vst,"computeStartState"),me(Xst,"closure"),me(Kst,"getEpsilonTarget"),me(Zst,"hasConfigInRuleStopState"),me(Qst,"allConfigsInRuleStopStates"),me(Jst,"hasConflictTerminatingPrediction"),me(tot,"getConflictingAltSets"),me(eot,"hasConflictingAltSet"),me(rot,"hasStateAssociatedWithOneAlt")}),Blt=t(()=>{Plt()}),Flt=t(()=>{function t(t){return"string"==typeof t}var e,r,n,i;function a(t){return"string"==typeof t}function s(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}function o(t){return"number"==typeof t&&r.MIN_VALUE<=t&&t<=r.MAX_VALUE}function l(t,e){return{line:t=t===Number.MAX_VALUE?cot.MAX_VALUE:t,character:e=e===Number.MAX_VALUE?cot.MAX_VALUE:e}}function c(t){return ye.objectLiteral(t)&&ye.uinteger(t.line)&&ye.uinteger(t.character)}function h(t,e,r,n){if(ye.uinteger(t)&&ye.uinteger(e)&&ye.uinteger(r)&&ye.uinteger(n))return{start:hot.create(t,e),end:hot.create(r,n)};if(hot.is(t)&&hot.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${r}, ${n}]`)}function u(t){return ye.objectLiteral(t)&&hot.is(t.start)&&hot.is(t.end)}function d(t,e){return{uri:t,range:e}}function p(t){return ye.objectLiteral(t)&&uot.is(t.range)&&(ye.string(t.uri)||ye.undefined(t.uri))}function g(t,e,r,n){return{targetUri:t,targetRange:e,targetSelectionRange:r,originSelectionRange:n}}function f(t){return ye.objectLiteral(t)&&uot.is(t.targetRange)&&ye.string(t.targetUri)&&uot.is(t.targetSelectionRange)&&(uot.is(t.originSelectionRange)||ye.undefined(t.originSelectionRange))}function m(t,e,r,n){return{red:t,green:e,blue:r,alpha:n}}function y(t){return ye.objectLiteral(t)&&ye.numberRange(t.red,0,1)&&ye.numberRange(t.green,0,1)&&ye.numberRange(t.blue,0,1)&&ye.numberRange(t.alpha,0,1)}function v(t,e){return{range:t,color:e}}function x(t){return ye.objectLiteral(t)&&uot.is(t.range)&&got.is(t.color)}function b(t,e,r){return{label:t,textEdit:e,additionalTextEdits:r}}function w(t){return ye.objectLiteral(t)&&ye.string(t.label)&&(ye.undefined(t.textEdit)||Cot.is(t))&&(ye.undefined(t.additionalTextEdits)||ye.typedArray(t.additionalTextEdits,Cot.is))}function k(t,e,r,n,i,a){return t={startLine:t,endLine:e},ye.defined(r)&&(t.startCharacter=r),ye.defined(n)&&(t.endCharacter=n),ye.defined(i)&&(t.kind=i),ye.defined(a)&&(t.collapsedText=a),t}function T(t){return ye.objectLiteral(t)&&ye.uinteger(t.startLine)&&ye.uinteger(t.startLine)&&(ye.undefined(t.startCharacter)||ye.uinteger(t.startCharacter))&&(ye.undefined(t.endCharacter)||ye.uinteger(t.endCharacter))&&(ye.undefined(t.kind)||ye.string(t.kind))}function E(t,e){return{location:t,message:e}}function C(t){return ye.defined(t)&&dot.is(t.location)&&ye.string(t.message)}function _(t){return ye.objectLiteral(t)&&ye.string(t.href)}function S(t,e,r,n,i,a){return t={range:t,message:e},ye.defined(r)&&(t.severity=r),ye.defined(n)&&(t.code=n),ye.defined(i)&&(t.source=i),ye.defined(a)&&(t.relatedInformation=a),t}function A(t){var e;return ye.defined(t)&&uot.is(t.range)&&ye.string(t.message)&&(ye.number(t.severity)||ye.undefined(t.severity))&&(ye.integer(t.code)||ye.string(t.code)||ye.undefined(t.code))&&(ye.undefined(t.codeDescription)||ye.string(null==(e=t.codeDescription)?void 0:e.href))&&(ye.string(t.source)||ye.undefined(t.source))&&(ye.undefined(t.relatedInformation)||ye.typedArray(t.relatedInformation,xot.is))}function L(t,e,...r){return t={title:t,command:e},ye.defined(r)&&0ye.string(t.kind)?Not.is(t)||Iot.is(t)||Rot.is(t):Lot.is(t)))}function J(t){return{uri:t}}function tt(t){return ye.defined(t)&&ye.string(t.uri)}function et(t,e){return{uri:t,version:e}}function rt(t){return ye.defined(t)&&ye.string(t.uri)&&ye.integer(t.version)}function nt(t,e){return{uri:t,version:e}}function it(t){return ye.defined(t)&&ye.string(t.uri)&&(null===t.version||ye.integer(t.version))}function at(t,e,r,n){return{uri:t,languageId:e,version:r,text:n}}function st(t){return ye.defined(t)&&ye.string(t.uri)&&ye.string(t.languageId)&&ye.integer(t.version)&&ye.string(t.text)}function ot(t){return t===n.PlainText||t===n.Markdown}function lt(t){var e=t;return ye.objectLiteral(t)&&Fot.is(e.kind)&&ye.string(e.value)}function ct(t,e,r){return{newText:t,insert:e,replace:r}}function ht(t){return t&&ye.string(t.newText)&&uot.is(t.insert)&&uot.is(t.replace)}function ut(t){return t&&(ye.string(t.detail)||void 0===t.detail)&&(ye.string(t.description)||void 0===t.description)}function dt(t){return{label:t}}function pt(t,e){return{items:t||[],isIncomplete:!!e}}function gt(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function ft(t){return ye.string(t)||ye.objectLiteral(t)&&ye.string(t.language)&&ye.string(t.value)}function mt(t){var e=t;return!!e&&ye.objectLiteral(e)&&($ot.is(e.contents)||Hot.is(e.contents)||ye.typedArray(e.contents,Hot.is))&&(void 0===t.range||uot.is(t.range))}function yt(t,e){return e?{label:t,documentation:e}:{label:t}}function vt(t,e,...r){return t={label:t},ye.defined(e)&&(t.documentation=e),ye.defined(r)?t.parameters=r:t.parameters=[],t}function xt(t,e){return t={range:t},ye.number(e)&&(t.kind=e),t}function bt(t,e,r,n,i){return t={name:t,kind:e,location:{uri:n,range:r}},i&&(t.containerName=i),t}function wt(t,e,r,n){return void 0!==n?{name:t,kind:e,location:{uri:r,range:n}}:{name:t,kind:e,location:{uri:r}}}function kt(t,e,r,n,i,a){return t={name:t,detail:e,kind:r,range:n,selectionRange:i},void 0!==a&&(t.children=a),t}function Tt(t){return t&&ye.string(t.name)&&ye.number(t.kind)&&uot.is(t.range)&&uot.is(t.selectionRange)&&(void 0===t.detail||ye.string(t.detail))&&(void 0===t.deprecated||ye.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}function Et(t,e,r){return t={diagnostics:t},null!=e&&(t.only=e),null!=r&&(t.triggerKind=r),t}function Ct(t){return ye.defined(t)&&ye.typedArray(t.diagnostics,Tot.is)&&(void 0===t.only||ye.typedArray(t.only,ye.string))&&(void 0===t.triggerKind||t.triggerKind===ilt.Invoked||t.triggerKind===ilt.Automatic)}function _t(t,e,r){let n={title:t},i=!0;return"string"==typeof e?(i=!1,n.kind=e):Eot.is(e)?n.command=e:n.edit=e,i&&void 0!==r&&(n.kind=r),n}function St(t){return t&&ye.string(t.title)&&(void 0===t.diagnostics||ye.typedArray(t.diagnostics,Tot.is))&&(void 0===t.kind||ye.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Eot.is(t.command))&&(void 0===t.isPreferred||ye.boolean(t.isPreferred))&&(void 0===t.edit||Mot.is(t.edit))}function At(t,e){return t={range:t},ye.defined(e)&&(t.data=e),t}function Lt(t){return ye.defined(t)&&uot.is(t.range)&&(ye.undefined(t.command)||Eot.is(t.command))}function Nt(t,e){return{tabSize:t,insertSpaces:e}}function It(t){return ye.defined(t)&&ye.uinteger(t.tabSize)&&ye.boolean(t.insertSpaces)}function Rt(t,e,r){return{range:t,target:e,data:r}}function Mt(t){return ye.defined(t)&&uot.is(t.range)&&(ye.undefined(t.target)||ye.string(t.target))}function Dt(t,e){return{range:t,parent:e}}function Ot(t){return ye.objectLiteral(t)&&uot.is(t.range)&&(void 0===t.parent||i.is(t.parent))}function Pt(t){return ye.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}function Bt(t,e){return{range:t,text:e}}function Ft(t){return null!=t&&uot.is(t.range)&&ye.string(t.text)}function $t(t,e,r){return{range:t,variableName:e,caseSensitiveLookup:r}}function zt(t){return null!=t&&uot.is(t.range)&&ye.boolean(t.caseSensitiveLookup)&&(ye.string(t.variableName)||void 0===t.variableName)}function Gt(t,e){return{range:t,expression:e}}function Ut(t){return null!=t&&uot.is(t.range)&&(ye.string(t.expression)||void 0===t.expression)}function qt(t,e){return{frameId:t,stoppedLocation:e}}function jt(t){return ye.defined(t)&&uot.is(t.stoppedLocation)}function Wt(t){return 1===t||2===t}function Yt(t){return{value:t}}function Ht(t){return ye.objectLiteral(t)&&(void 0===t.tooltip||ye.string(t.tooltip)||$ot.is(t.tooltip))&&(void 0===t.location||dot.is(t.location))&&(void 0===t.command||Eot.is(t.command))}function Vt(t,e,r){return t={position:t,label:e},void 0!==r&&(t.kind=r),t}function Xt(t){return ye.objectLiteral(t)&&hot.is(t.position)&&(ye.string(t.label)||ye.typedArray(t.label,xlt.is))&&(void 0===t.kind||vlt.is(t.kind))&&void 0===t.textEdits||ye.typedArray(t.textEdits,Cot.is)&&(void 0===t.tooltip||ye.string(t.tooltip)||$ot.is(t.tooltip))&&(void 0===t.paddingLeft||ye.boolean(t.paddingLeft))&&(void 0===t.paddingRight||ye.boolean(t.paddingRight))}function Kt(t){return{kind:"snippet",value:t}}function Zt(t,e,r,n){return{insertText:t,filterText:e,range:r,command:n}}function Qt(t){return{items:t}}function Jt(t,e){return{range:t,text:e}}function te(t,e){return{triggerKind:t,selectedCompletionInfo:e}}function ee(t){return ye.objectLiteral(t)&&oot.is(t.uri)&&ye.string(t.name)}function re(t,e,r,n){return new Llt(t,e,r,n)}function ne(t){return!!(ye.defined(t)&&ye.string(t.uri)&&(ye.undefined(t.languageId)||ye.string(t.languageId))&&ye.uinteger(t.lineCount)&&ye.func(t.getText)&&ye.func(t.positionAt)&&ye.func(t.offsetAt))}function ie(e,t){let r=e.getText(),n=D(t,(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),i=r.length;for(let t=n.length-1;0<=t;t--){var a=n[t],s=e.offsetAt(a.range.start),o=e.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 t=0,e=0,r=0;for(;tt?n=i:r=i+1}var a=r-1;return hot.create(a,t-e[a])}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],r=t.line+1{Flt(),JK(),Nlt=class{static{me(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){var t;return null!=(t=this.nodeStack[this.nodeStack.length-1])?t:this.rootNode}buildRootNode(t){return this.rootNode=new Olt(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){var e=new Mlt;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){return(t=new Rlt(t.startOffset,t.image.length,OK(t),t.tokenType,!e)).grammarSource=e,t.root=this.rootNode,this.current.content.push(t),t}removeNode(t){var e=t.container;e&&0<=(t=e.content.indexOf(t))&&e.content.splice(t,1)}addHiddenNodes(t){var e,r=[];for(e of t){var n=new Rlt(e.startOffset,e.image.length,OK(e),e.tokenType,!0);n.root=this.rootNode,r.push(n)}let i=this.current,a=!1;if(0{zat(),Blt(),HQ(),Att(),cJ(),$lt(),Glt=Symbol("Datatype"),me(zlt,"isDataTypeNode"),Ult=me(t=>t.endsWith("​")?t:t+"​","withRuleSuffix"),qlt=class{static{me(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;var e=this.lexer.definition,r="production"===t.LanguageMetaData.mode;this.wrapper=new Xlt(e,Object.assign(Object.assign({},t.parser.ParserConfig),{skipValidations:r,errorMessageProvider:t.parser.ParserErrorMessageProvider}))}alternatives(t,e){this.wrapper.wrapOr(t,e)}optional(t,e){this.wrapper.wrapOption(t,e)}many(t,e){this.wrapper.wrapMany(t,e)}atLeastOne(t,e){this.wrapper.wrapAtLeastOne(t,e)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},jlt=class extends qlt{static{me(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new Nlt,this.stack=[],this.assignmentMap=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,e){var r=this.computeRuleType(t),r=this.wrapper.DEFINE_RULE(Ult(t.name),this.startImplementation(r,e).bind(this));return this.allRules.set(t.name,r),t.entry&&(this.mainRule=r),r}computeRuleType(t){if(!t.fragment)return ctt(t)?Glt:ptt(t)??t.name}parse(t,e={}){this.nodeBuilder.buildRootNode(t);var t=this.lexerResult=this.lexer.tokenize(t),r=(this.wrapper.input=t.tokens,e.rule?this.allRules.get(e.rule):this.mainRule);if(r)return r=r.call(this.wrapper,{}),this.nodeBuilder.addHiddenNodes(t.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:r,lexerErrors:t.errors,lexerReport:t.report,parserErrors:this.wrapper.errors};throw new Error(e.rule?`No rule found with name '${e.rule}'`:"No main rule available.")}startImplementation(i,a){return t=>{var e,r=!this.isRecording()&&void 0!==i;r&&(this.stack.push(e={$type:i}),i===Glt)&&(e.value="");let n;try{n=a(t)}catch{n=void 0}return n=void 0===n&&r?this.construct():n}}extractHiddenTokens(t){var e=this.lexerResult.hidden;if(!e.length)return[];var r=t.startOffset;for(let t=0;tr)return e.splice(0,t);return e.splice(0,e.length)}consume(e,r,n){if(e=this.wrapper.wrapConsume(e,r),!this.isRecording()&&this.isValidToken(e)){var r=this.extractHiddenTokens(e),r=(this.nodeBuilder.addHiddenNodes(r),this.nodeBuilder.buildLeafNode(e,n)),{assignment:t,isCrossRef:i}=this.getAssignment(n),a=this.current;if(t){var s=UZ(n)?e.image:this.converter.convert(e.image,r);this.assign(t.operator,t.feature,s,r,i)}else if(zlt(a)){let t=e.image;UZ(n)||(t=this.converter.convert(t,r).toString()),a.value+=t}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&"number"==typeof t.endOffset&&!isNaN(t.endOffset)}subrule(t,e,r,n,i){let a;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(n)),r=this.wrapper.wrapSubrule(t,e,i),!this.isRecording()&&a&&0{var e=this.keepStackSize();try{r(t)}finally{this.resetStackSize(e)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){var t=this.elementStack.length;return this.stackSize=t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,e,r){this.wrapper.wrapConsume(t,e),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(t,e,r,n,i){this.before(n),this.wrapper.wrapSubrule(t,e,i),this.after(n)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){this.isRecording()||0<=(t=this.elementStack.lastIndexOf(t))&&this.elementStack.splice(t)}get currIdx(){return this.wrapper.currIdx}},Vlt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Ylt},Xlt=class extends Dat{static{me(this,"ChevrotainWrapper")}constructor(t,e){var r=e&&"maxLookahead"in e;super(t,Object.assign(Object.assign(Object.assign({},Vlt),{lookaheadStrategy:r?new Rit({maxLookahead:e.maxLookahead}):new aot({logging:e.skipValidations?()=>{}:void 0})}),e))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,e){return this.RULE(t,e)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,e){return this.consume(t,e)}wrapSubrule(t,e,r){return this.subrule(t,e,{ARGS:[r]})}wrapOr(t,e){this.or(t,e)}wrapOption(t,e){this.option(t,e)}wrapMany(t,e){this.many(t,e)}wrapAtLeastOne(t,e){this.atLeastOne(t,e)}}});function Zlt(t,e,r){return Qlt({parser:e,tokens:r,ruleNames:new Map},t),e}function Qlt(t,e){let r=YJ(e,!1),n=EK(e.rules).filter(_Z).filter(t=>r.has(t));for(var i of n){var a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(i,Jlt(a,i.definition))}}function Jlt(e,r,t=!1){let n;if(UZ(r))n=cct(e,r);else if(OZ(r))n=tct(e,r);else if(BZ(r))n=Jlt(e,r.terminal);else if($Z(r))n=lct(e,r);else if(WZ(r))n=ect(e,r);else if(PZ(r))n=ict(e,r);else if(XZ(r))n=act(e,r);else if(GZ(r))n=sct(e,r);else{if(!zZ(r))throw new eZ(r.$cstNode,"Unexpected element type: "+r.$type);{let t=e.consume++;n=me(()=>e.parser.consume(t,hnt,r),"method")}}return hct(e,t?void 0:oct(r),n,r.cardinality)}function tct(t,e){let r=gtt(e);return()=>t.parser.action(r,e)}function ect(i,a){let s=a.rule.ref;if(_Z(s)){let e=i.subrule++,r=s.fragment,n=0({});return t=>i.parser.subrule(e,uct(i,s),r,a,n(t))}if(IZ(s)){let t=i.consume++,e=pct(i,s.name);return()=>i.parser.consume(t,e,a)}if(!s)throw new eZ(a.$cstNode,"Undefined rule: "+a.rule.$refText);tZ(s)}function rct(a,t){let s=t.map(t=>nct(t.value));return e=>{var r={};for(let t=0;te(t)||r(t)}if(fZ(n)){let e=nct(n.left),r=nct(n.right);return t=>e(t)&&r(t)}if(kZ(n)){let e=nct(n.value);return t=>!e(t)}if(CZ(n)){let e=n.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(gZ(n)){let t=!!n.true;return()=>t}tZ()}function ict(r,n){if(1===n.elements.length)return Jlt(r,n.elements[0]);{let t=[];for(var i of n.elements){var a={ALT:Jlt(r,i,!0)};(i=oct(i))&&(a.GATE=nct(i)),t.push(a)}let e=r.or++;return n=>r.parser.alternatives(e,t.map(t=>{let e={ALT:me(()=>t.ALT(n),"ALT")},r=t.GATE;return r&&(e.GATE=()=>r(n)),e}))}}function act(s,t){if(1===t.elements.length)return Jlt(s,t.elements[0]);let e=[];for(var r of t.elements){var n={ALT:Jlt(s,r,!0)};(r=oct(r))&&(n.GATE=nct(r)),e.push(n)}let o=s.or++,l=me((t,e)=>`uGroup_${t}_`+e.getRuleStack().join("-"),"idFunc"),i=me(a=>s.parser.alternatives(o,e.map((e,r)=>{let t={ALT:me(()=>!0,"ALT")},n=s.parser,i=(t.ALT=()=>{var t;e.ALT(a),n.isRecording()||(t=l(o,n),n.unorderedGroups.get(t)||n.unorderedGroups.set(t,[]),"u"i(a):t.GATE=()=>!n.unorderedGroups.get(l(o,n))?.[r],t})),"alternatives"),a=hct(s,oct(t),i,"*");return t=>{a(t),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function sct(e,t){let r=t.elements.map(t=>Jlt(e,t));return e=>r.forEach(t=>t(e))}function oct(t){if(GZ(t))return t.guardCondition}function lct(n,i,a=i.terminal){if(a){if(WZ(a)&&_Z(a.rule.ref)){let e=a.rule.ref,r=n.subrule++;return t=>n.parser.subrule(r,uct(n,e),!1,i,t)}if(WZ(a)&&IZ(a.rule.ref)){let t=n.consume++,e=pct(n,a.rule.ref.name);return()=>n.parser.consume(t,e,i)}if(UZ(a)){let t=n.consume++,e=pct(n,a.value);return()=>n.parser.consume(t,e,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=ntt(i.type.ref)?.terminal)return lct(n,i,a);throw new Error("Could not find name assignment for type: "+gtt(i.type.ref))}function cct(t,e){let r=t.consume++,n=t.tokens[e.value];if(n)return()=>t.parser.consume(r,n,e);throw new Error("Could not find token for keyword: "+e.value)}function hct(n,t,i,e){let a=t&&nct(t);if(!e){if(a){let e=n.or++;return t=>n.parser.alternatives(e,[{ALT:me(()=>i(t),"ALT"),GATE:me(()=>a(t),"GATE")},{ALT:Aat(),GATE:me(()=>!a(t),"GATE")}])}return i}if("*"===e){let e=n.many++;return t=>n.parser.many(e,{DEF:me(()=>i(t),"DEF"),GATE:a?()=>a(t):void 0})}if("+"===e){let r=n.many++;if(a){let e=n.or++;return t=>n.parser.alternatives(e,[{ALT:me(()=>n.parser.atLeastOne(r,{DEF:me(()=>i(t),"DEF")}),"ALT"),GATE:me(()=>a(t),"GATE")},{ALT:Aat(),GATE:me(()=>!a(t),"GATE")}])}return t=>n.parser.atLeastOne(r,{DEF:me(()=>i(t),"DEF")})}if("?"===e){let e=n.optional++;return t=>n.parser.optional(e,{DEF:me(()=>i(t),"DEF"),GATE:a?()=>a(t):void 0})}tZ()}function uct(t,e){if(e=dct(t,e),t=t.parser.getRule(e))return t;throw new Error(`Rule "${e}" not found."`)}function dct(n,i){if(_Z(i))return i.name;if(n.ruleNames.has(i))return n.ruleNames.get(i);{let t=i,e=t.$container,r=i.$type;for(;!_Z(e);)(GZ(e)||PZ(e)||XZ(e))&&(r=e.elements.indexOf(t).toString()+":"+r),e=(t=e).$container;return r=e.name+":"+r,n.ruleNames.set(i,r),r}}function pct(t,e){if(t=t.tokens[e])return t;throw new Error(`Token "${e}" not found."`)}var gct=t(()=>{zat(),HQ(),rZ(),NK(),Att(),me(Zlt,"createParser"),me(Qlt,"buildRules"),me(Jlt,"buildElement"),me(tct,"buildAction"),me(ect,"buildRuleCall"),me(rct,"buildRuleCallPredicate"),me(nct,"buildPredicate"),me(ict,"buildAlternatives"),me(act,"buildUnorderedGroup"),me(sct,"buildGroup"),me(oct,"getGuardCondition"),me(lct,"buildCrossReference"),me(cct,"buildKeyword"),me(hct,"wrap"),me(uct,"getRule"),me(dct,"getRuleName"),me(pct,"getToken")});function fct(t){var e=t.Grammar,r=t.parser.Lexer;return Zlt(e,t=new Hlt(t),r.definition),t.finalize(),t}var mct=t(()=>{Klt(),gct(),me(fct,"createCompletionParser")});function yct(t){return(t=vct(t)).finalize(),t}function vct(t){var e=t.Grammar,r=t.parser.Lexer;return Zlt(e,new jlt(t),r.definition)}var xct,bct,wct,kct=t(()=>{Klt(),gct(),me(yct,"createLangiumParser"),me(vct,"prepareLangiumParser")}),Tct=t(()=>{zat(),HQ(),cJ(),Att(),UJ(),NK(),xct=class{static{me(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(t,e){let r=EK(YJ(t,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,e);return n.forEach(t=>{var e=t.PATTERN;"object"==typeof e&&e&&"test"in e&&RJ(e)?i.unshift(t):i.push(t)}),i}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(IZ).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){var e=vtt(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,n={name:t.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),t.hidden&&(n.GROUP=RJ(e)?jrt.SKIPPED:"hidden"),n}requiresCustomPattern(t){return!!(t.flags.includes("u")||t.flags.includes("s")||t.source.includes("?<=")||t.source.includes("?(r.lastIndex=e,r.exec(t))}buildKeywordTokens(t,e,r){return t.filter(_Z).flatMap(t=>eJ(t).filter(UZ)).distinct(t=>t.value).toArray().sort((t,e)=>e.value.length-t.value.length).map(t=>this.buildKeywordToken(t,e,!!r?.caseInsensitive))}buildKeywordToken(t,e,r){return r=this.buildKeywordPattern(t,r),t={name:t.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(t,e)},"function"==typeof r&&(t.LINE_BREAKS=!0),t}buildKeywordPattern(t,e){return e?new RegExp(DJ(t.value)):t.value}findLongerAlt(n,t){return t.reduce((t,e)=>{var r=e?.PATTERN;return r?.source&&OJ("^"+r.source+"$",n.value)&&t.push(e),t},[])}}}),Ect=t(()=>{function t(e){let r="";for(let t=1;t{var e,r;function n(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}function i(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t}Object.defineProperty(t,"__esModule",{value:!0}),me(n,"RAL"),r=n,me(i,"install"),r.install=i,t.default=n}),_ct=rPt(t=>{function e(t){return!0===t||!1===t}function r(t){return"string"==typeof t||t instanceof String}function n(t){return"number"==typeof t||t instanceof Number}function i(t){return t instanceof Error}function a(t){return"function"==typeof t}function s(t){return Array.isArray(t)}function o(t){return s(t)&&t.every(t=>r(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,me(e,"boolean"),t.boolean=e,me(r,"string"),t.string=r,me(n,"number"),t.number=n,me(i,"error"),t.error=i,me(a,"func"),t.func=a,me(s,"array"),t.array=s,me(o,"stringArray"),t.stringArray=o}),Sct=rPt(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var s=Cct();{var r=e.Event={};let t={dispose(){}};r.None=function(){return t}}var i=class{static{me(this,"CallbackList")}add(t,e=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(r)&&r.push({dispose:me(()=>this.remove(t,e),"dispose")})}remove(n,i=null){if(this._callbacks){let r=!1;for(let t=0,e=this._callbacks.length;t{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,e);let n={dispose:me(()=>{this._callbacks&&(this._callbacks.remove(t,e),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(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(e.Emitter=r)._noop=function(){}}),Act=rPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,r,n=Cct(),i=_ct(),a=Sct();function s(t){return t&&(t===r.None||t===r.Cancelled||i.boolean(t.isCancellationRequested)&&!!t.onCancellationRequested)}(r=e||(t.CancellationToken=e={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),me(s,"is"),r.is=s;var o=Object.freeze(function(t,e){let r=(0,n.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),l=class{static{me(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{me(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=e.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=e.None}};t.CancellationTokenSource=c}),Lct={},Nct=t(()=>{Y(Lct,tt(Act(),1))});function Ict(){return new Promise(t=>{"u"{Nct(),me(Ict,"delayNextTick"),Pct=0,Bct=10,me(Rct,"startCancelableOperation"),me(Mct,"setInterruptionPeriod"),Fct=Symbol("OperationCancelled"),me(Dct,"isOperationCancelled"),me(Oct,"interruptAndCheck"),$ct=class{static{me(this,"Deferred")}constructor(){this.promise=new Promise((e,r)=>{this.resolve=t=>(e(t),this),this.reject=t=>(r(t),this)})}}});function Gct(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);Gct(s,i),Gct(o,i);let t=0,e=0,r=0;for(;tr.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function Wct(t){var e=jct(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Yct,Hct,Vct,Xct,Kct,Zct,Qct,Jct,tht,eht,rht=t(()=>{function t(t,e,r,n){return new Yct(t,e,r,n)}function e(t,e,r){if(t instanceof Yct)return t.update(e,r),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(t,e){let r=t.getText(),n=Gct(e.map(Wct),(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),i=0,a=[];for(var s of n){var o=t.offsetAt(s.range.start);if(oi&&a.push(r.substring(i,o)),s.newText.length&&a.push(s.newText),i=t.offsetAt(s.range.end)}return a.push(r.substr(i)),a.join("")}var n;Yct=class i{static{me(this,"FullTextDocument")}constructor(t,e,r,n){this._uri=t,this._languageId=e,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(t){var e;return t?(e=this.offsetAt(t.start),t=this.offsetAt(t.end),this._content.substring(e,t)):this._content}update(t,e){for(var a of t)if(i.isIncremental(a)){var s=jct(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),t=Math.max(s.end.line,0),n=this._lineOffsets,i=Uct(a.text,!1,o);if(t-r===i.length)for(let t=0,e=i.length;tt?n=i:r=i+1}var a=r-1;return{line:a,character:(t=this.ensureBeforeEOL(t,e[a]))-e[a]}}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],t.character<=0?e:(r=t.line+1{var r={470:t=>{function d(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function a(t,e){for(var r,n="",i=0,a=-1,s=0,o=0;o<=t.length;++o){if(o{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var u,d,p={};{let n,r=((h.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(p),h.d(p,{URI:me(()=>w,"URI"),Utils:me(()=>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(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!r.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!i.test(t.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(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}me(g,"s");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{me(this,"f")}static isUri(t){return t instanceof w||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,a=!1){"object"==typeof t?(this.scheme=t.scheme||"",this.authority=t.authority||"",this.path=t.path||"",this.query=t.query||"",this.fragment=t.fragment||""):(this.scheme=t||a?t:"file",this.authority=e||"",this.path=((t,e)=>{switch(t){case"https":case"http":case"file":e?"/"!==e[0]&&(e="/"+e):e="/"}return e})(this.scheme,r||""),this.query=n||"",this.fragment=i||"",g(this,a))}get fsPath(){return y(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=""),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=""),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new k(e,r,n,i,a)}static parse(t,e=!1){return(t=s.exec(t))?new k(t[2]||"",b(t[4]||""),b(t[5]||""),b(t[7]||""),b(t[9]||""),e):new k("","","","","")}static file(t){let e="",r;return"/"===(t=n?t.replace(/\\/g,"/"):t)[0]&&"/"===t[1]&&(t=-1===(r=t.indexOf("/",2))?(e=t.substring(2),"/"):(e=t.substring(2,r),t.substring(r)||"/")),new k("file",e,t,"","")}static from(t){return g(t=new k(t.scheme,t.authority,t.path,t.query,t.fragment),!0),t}toString(t=!1){return v(this,t)}toJSON(){return this}static revive(t){var e;return t&&(t instanceof w?t:((e=new k(t))._formatted=t.external,e._fsPath=t._sep===o?t.fsPath:null,e))}}let o=n?1:void 0;class k extends w{static{me(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(t=!1){return t?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=o),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}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(e,r,n){let i,a=-1;for(let t=0;tx(t)):t}me(b,"C");let t=h(470),c=t.posix||t;(d=u=u||{}).joinPath=function(t,...e){return t.with({path:c.join(t.path,...e)})},d.resolvePath=function(t,...e){let r=t.path,n=!1,i=("/"!==r[0]&&(r="/"+r,n=!0),c.resolve(r,...e));return n&&"/"===i[0]&&!t.authority&&(i=i.substring(1)),t.with({path:i})},d.dirname=function(t){if(0===t.path.length||"/"===t.path)return t;let e=c.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},d.basename=function(t){return c.basename(t.path)},d.extname=function(t){return c.extname(t.path)}}({URI:Vct,Utils:Xct}=p)}),iht=t(()=>{function t(t,e){return t?.toString()===e?.toString()}function e(t,e){let r="string"==typeof t?t:t.path,n="string"==typeof e?e:e.path,i=r.split("/").filter(t=>00{var t;rht(),aht(),Nct(),NK(),iht(),(t=Zct=Zct||{})[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated",Qct=class{static{me(this,"DefaultLangiumDocumentFactory")}constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,e=Lct.CancellationToken.None){var r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??Vct.parse(t.uri),Lct.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromString(t,e,r){return Lct.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromModel(t,e){return this.create(e,{$model:t})}create(t,e,r){var n;return"string"==typeof e?(n=this.parse(t,e,r),this.createLangiumDocument(n,t,void 0,e)):"$model"in e?(n={value:e.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(n,t)):(n=this.parse(t,e.getText(),r),this.createLangiumDocument(n,t,e))}async createAsync(t,e,r){var n;return"string"==typeof e?(n=await this.parseAsync(t,e,r),this.createLangiumDocument(n,t,void 0,e)):(n=await this.parseAsync(t,e.getText(),r),this.createLangiumDocument(n,t,e))}createLangiumDocument(e,r,t,n){let i;if(t)i={parseResult:e,uri:r,state:Zct.Parsed,references:[],textDocument:t};else{let t=this.createTextDocumentGetter(r,n);i={parseResult:e,uri:r,state:Zct.Parsed,references:[],get textDocument(){return t()}}}return e.value.$document=i}async update(t,e){var r=null==(r=t.parseResult.value.$cstNode)?void 0:r.root.fullText,n=null==(n=this.textDocuments)?void 0:n.get(t.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(t.uri);return n?Object.defineProperty(t,"textDocument",{value:n}):(n=this.createTextDocumentGetter(t.uri,i),Object.defineProperty(t,"textDocument",{get:n})),r!==i&&(t.parseResult=await this.parseAsync(t.uri,i,e),t.parseResult.value.$document=t),t.state=Zct.Parsed,t}parse(t,e,r){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(e,r)}parseAsync(t,e,r){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(e,r)}createTextDocumentGetter(t,e){let r=this.serviceRegistry,n;return()=>n=n??Hct.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??"")}},Jct=class{static{me(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.serviceRegistry=t.ServiceRegistry}get all(){return EK(this.documentMap.values())}addDocument(t){var e=t.uri.toString();if(this.documentMap.has(e))throw new Error(`A document with the URI '${e}' is already present.`);this.documentMap.set(e,t)}getDocument(t){return t=t.toString(),this.documentMap.get(t)}async getOrCreateDocument(t,e){return this.getDocument(t)||(t=await this.langiumDocumentFactory.fromUri(t,e),this.addDocument(t),t)}createDocument(t,e,r){return r?this.langiumDocumentFactory.fromString(e,t,r).then(t=>(this.addDocument(t),t)):(r=this.langiumDocumentFactory.fromString(e,t),this.addDocument(r),r)}hasDocument(t){return this.documentMap.has(t.toString())}invalidateDocument(t){var e=t.toString();return(e=this.documentMap.get(e))&&(this.serviceRegistry.getServices(t).references.Linker.unlink(e),e.state=Zct.Changed,e.precomputedScopes=void 0,e.diagnostics=void 0),e}deleteDocument(t){var t=t.toString(),e=this.documentMap.get(t);return e&&(e.state=Zct.Changed,this.documentMap.delete(t)),e}}}),sht=t(()=>{Nct(),wK(),cJ(),zct(),aht(),tht=Symbol("ref_resolving"),eht=class{static{me(this,"DefaultLinker")}constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator}async link(e,t=Lct.CancellationToken.None){for(var r of rJ(e.parseResult.value))await Oct(t),iJ(r).forEach(t=>this.doLink(t,e))}doLink(t,e){var r=t.reference;if(void 0===r._ref){r._ref=tht;try{var n,i=this.getCandidate(t);mK(i)?r._ref=i:(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)?(n=this.loadAstNode(i),r._ref=n??this.createLinkingError(t,i)):r._ref=void 0)}catch(e){console.error(`An error occurred while resolving reference to '${r.$refText}':`,e),i=null!=(n=e.message)?n:String(e),r._ref=Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${r.$refText}': `+i})}e.references.push(r)}}unlink(t){for(var e of t.references)delete e._ref,delete e._nodeDescription;t.references=[]}getCandidate(t){return this.scopeProvider.getScope(t).getElement(t.reference.$refText)??this.createLinkingError(t)}buildReference(n,i,t,a){let s=this,o={$refNode:t,$refText:a,get ref(){var t;if(pK(this._ref))return this._ref;if(fK(this._nodeDescription)){var e=s.loadAstNode(this._nodeDescription);this._ref=e??s.createLinkingError({reference:o,container:n,property:i},this._nodeDescription)}else if(void 0===this._ref){this._ref=tht;var e=JQ(n).$document,r=s.getLinkedNode({reference:o,container:n,property:i});if(r.error&&e&&e.state{Att(),me(oht,"isNamed"),lht=class{static{me(this,"DefaultNameProvider")}getName(t){if(oht(t))return t.name}getNameNode(t){return ZJ(t.$cstNode,"name")}}}),Tht=t(()=>{Att(),wK(),cJ(),JK(),NK(),iht(),cht=class{static{me(this,"DefaultReferences")}constructor(t){this.nameProvider=t.references.NameProvider,this.index=t.shared.workspace.IndexManager,this.nodeLocator=t.workspace.AstNodeLocator}findDeclaration(t){if(t){var e=rtt(t),r=t.astNode;if(e&&r){if(gK(e=r[e.feature]))return e.ref;if(Array.isArray(e))for(var n of e)if(gK(n)&&n.$refNode&&n.$refNode.offset<=t.offset&&n.$refNode.end>=t.end)return n.ref}if(r&&(e=this.nameProvider.getNameNode(r))&&(e===t||DK(t,e)))return r}}findDeclarationNode(t){if((t=this.findDeclaration(t))?.$cstNode)return this.nameProvider.getNameNode(t)??t.$cstNode}findReferences(t,e){var r,n=[];e.includeDeclaration&&(r=this.getReferenceToSelf(t))&&n.push(r);let i=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(i=i.filter(t=>Kct.equals(t.sourceUri,e.documentUri))),n.push(...i),EK(n)}getReferenceToSelf(t){var e,r=this.nameProvider.getNameNode(t);if(r)return e=QQ(t),t=this.nodeLocator.getAstNodePath(t),{sourceUri:e.uri,sourcePath:t,targetUri:e.uri,targetPath:t,segment:PK(r),local:!0}}}}),Eht=t(()=>{NK(),hht=class{static{me(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(var[e,r]of t)this.add(e,r)}get size(){return LK.sum(EK(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,e){var r;return void 0===e?this.map.delete(t):!!((r=this.map.get(t))&&0<=(e=r.indexOf(e)))&&(1===r.length?this.map.delete(t):r.splice(e,1),!0)}get(t){return null!=(t=this.map.get(t))?t:[]}has(t,e){return void 0===e?this.map.has(t):!!(t=this.map.get(t))&&0<=t.indexOf(e)}add(t,e){return this.map.has(t)?this.map.get(t).push(e):this.map.set(t,[e]),this}addAll(t,e){return this.map.has(t)?this.map.get(t).push(...e):this.map.set(t,Array.from(e)),this}forEach(r){this.map.forEach((t,e)=>t.forEach(t=>r(t,e,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return EK(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return EK(this.map.keys())}values(){return EK(this.map.values()).flat()}entriesGroupedByKey(){return EK(this.map.entries())}},uht=class{static{me(this,"BiMap")}get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(var[e,r]of t)this.set(e,r)}clear(){this.map.clear(),this.inverse.clear()}set(t,e){return this.map.set(t,e),this.inverse.set(e,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){var e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.inverse.delete(e),!0)}}}),Cht=t(()=>{Nct(),cJ(),Eht(),zct(),dht=class{static{me(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,e=Lct.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,e)}async computeExportsForNode(t,e,r=tJ,n=Lct.CancellationToken.None){var i,a=[];this.exportNode(t,a,e);for(i of r(t))await Oct(n),this.exportNode(i,a,e);return a}exportNode(t,e,r){var n=this.nameProvider.getName(t);n&&e.push(this.descriptions.createDescription(t,n,r))}async computeLocalScopes(t,e=Lct.CancellationToken.None){var r,n=t.parseResult.value,i=new hht;for(r of eJ(n))await Oct(e),this.processNode(r,t,i);return i}processNode(t,e,r){var n,i=t.$container;i&&(n=this.nameProvider.getName(t))&&r.add(i,this.descriptions.createDescription(t,n,e))}}}),_ht=t(()=>{NK(),pht=class{static{me(this,"StreamScope")}constructor(t,e,r){this.elements=t,this.outerScope=e,this.caseInsensitive=null!=(t=r?.caseInsensitive)&&t}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){return(this.caseInsensitive?this.elements.find(t=>t.name.toLowerCase()===e.toLowerCase()):this.elements.find(t=>t.name===e))||(this.outerScope?this.outerScope.getElement(e):void 0)}},ght=class{static{me(this,"MapScope")}constructor(t,e,r){var n;this.elements=new Map,this.caseInsensitive=null!=(r=r?.caseInsensitive)&&r;for(n of t){var i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(i,n)}this.outerScope=e}getElement(t){var e=this.caseInsensitive?t.toLowerCase():t;return this.elements.get(e)||(this.outerScope?this.outerScope.getElement(t):void 0)}getAllElements(){let t=EK(this.elements.values());return t=this.outerScope?t.concat(this.outerScope.getAllElements()):t}},fht={getElement(){},getAllElements(){return _K}}}),Sht=t(()=>{mht=class{static{me(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(t){this.toDispose.push(t)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(t=>t.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},yht=class extends mht{static{me(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,e){this.throwIfDisposed(),this.cache.set(t,e)}get(t,e){return this.throwIfDisposed(),this.cache.has(t)?this.cache.get(t):e?(e=e(),this.cache.set(t,e),e):void 0}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}},vht=class extends mht{static{me(this,"ContextCache")}constructor(t){super(),this.cache=new Map,this.converter=t??(t=>t)}has(t,e){return this.throwIfDisposed(),this.cacheForContext(t).has(e)}set(t,e,r){this.throwIfDisposed(),this.cacheForContext(t).set(e,r)}get(t,e,r){return this.throwIfDisposed(),(t=this.cacheForContext(t)).has(e)?t.get(e):r?(r=r(),t.set(e,r),r):void 0}delete(t,e){return this.throwIfDisposed(),this.cacheForContext(t).delete(e)}clear(t){this.throwIfDisposed(),t?(t=this.converter(t),this.cache.delete(t)):this.cache.clear()}cacheForContext(t){let e=this.converter(t),r=this.cache.get(e);return r||(r=new Map,this.cache.set(e,r)),r}},xht=class extends vht{static{me(this,"DocumentCache")}constructor(t,e){super(t=>t.toString()),e?(this.toDispose.push(t.workspace.DocumentBuilder.onDocumentPhase(e,t=>{this.clear(t.uri.toString())})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{for(var r of e)this.clear(r)}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{var r;for(r of t.concat(e))this.clear(r)}))}},bht=class extends yht{static{me(this,"WorkspaceCache")}constructor(t,e){super(),e?(this.toDispose.push(t.workspace.DocumentBuilder.onBuildPhase(e,()=>{this.clear()})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{0{this.clear()}))}}}),Aht=t(()=>{_ht(),cJ(),NK(),Sht(),wht=class{static{me(this,"DefaultScopeProvider")}constructor(t){this.reflection=t.shared.AstReflection,this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider,this.indexManager=t.shared.workspace.IndexManager,this.globalScopeCache=new bht(t.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=QQ(e.container).precomputedScopes;if(i){let t=e.container;do{var a=i.get(t);0this.reflection.isSubtype(t.type,n))),t=t.$container}while(t)}let s=this.getGlobalScope(n,e);for(let t=r.length-1;0<=t;t--)s=this.createScope(r[t],s);return s}createScope(t,e,r){return new pht(EK(t),e,r)}createScopeForNodes(t,e,r){return t=EK(t).map(t=>{var e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable(),new pht(t,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new ght(this.indexManager.allElements(t)))}}});function Lht(t){return"string"==typeof t.$comment}function Nht(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}var Iht,Rht,Mht=t(()=>{nht(),wK(),cJ(),Att(),me(Lht,"isAstNodeWithComment"),me(Nht,"isIntermediateReference"),Iht=class{static{me(this,"DefaultJsonSerializer")}constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,e){let r=e??{},n=e?.replacer,i=me((t,e)=>this.replacer(t,e,r),"defaultReplacer"),a=n?(t,e)=>n(t,e,i):i;try{return this.currentDocument=QQ(t),JSON.stringify(t,a,e?.space)}finally{this.currentDocument=void 0}}deserialize(t,e){return e=e??{},t=JSON.parse(t),this.linkNode(t,t,e),t}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(e)){if(gK(r)){var l=r.ref,n=n?r.$refText:void 0;if(l){let t=QQ(l),e="";return this.currentDocument&&this.currentDocument!==t&&(e=o?o(t.uri,r):t.uri.toString()),o=this.astNodeLocator.getAstNodePath(l),{$ref:e+"#"+o,$refText:n}}return{$error:null!=(o=null==(l=r.error)?void 0:l.message)?o:"Could not resolve reference",$refText:n}}if(pK(r)){let t;return a&&(t=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),!e||r.$document)&&t?.$textRegion&&(t.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString()),i&&!e&&((t=t??Object.assign({},r)).$sourceText=null==(o=r.$cstNode)?void 0:o.text),s&&(t=t??Object.assign({},r),n=this.commentProvider.getComment(r))&&(t.$comment=n.replace(/\r/g,"")),t??r}return r}}addAstNodeRegionWithAssignmentsTo(n){let i=me(t=>({offset:t.offset,end:t.end,length:t.length,range:t.range}),"createDocumentSegment");if(n.$cstNode){let t=n.$textRegion=i(n.$cstNode),r=t.assignments={};return Object.keys(n).filter(t=>!t.startsWith("$")).forEach(t=>{var e=KJ(n.$cstNode,t).map(i);0!==e.length&&(r[t]=e)}),n}}linkNode(e,r,n,t,i,a){for(var[s,o]of Object.entries(e))if(Array.isArray(o))for(let t=0;t{iht(),Rht=class{static{me(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(t){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=t?.workspace.TextDocuments}register(t){var e,r=t.LanguageMetaData;for(e of r.fileExtensions)this.fileExtensionMap.has(e)&&console.warn(`The file extension ${e} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(e,t);this.languageIdMap.set(r.languageId,t),1===this.languageIdMap.size?this.singleton=t:this.singleton=void 0}getServices(t){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 e=null==(e=null==(e=this.textDocuments)?void 0:e.get(t))?void 0:e.languageId;if(void 0!==e){var r=this.languageIdMap.get(e);if(r)return r}if(r=Kct.extname(t),t=this.fileExtensionMap.get(r))return t;throw e?new Error(`The service registry contains no services for the extension '${r}' for language '${e}'.`):new Error(`The service registry contains no services for the extension '${r}'.`)}hasServices(t){try{return this.getServices(t),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function Oht(t){return{code:t}}var Pht,Bht,Fht=t(()=>{$dt(),Eht(),zct(),NK(),me(Oht,"diagnosticData"),(Pht=Pht||{}).all=["fast","slow","built-in"],Bht=class{static{me(this,"ValidationRegistry")}constructor(t){this.entries=new hht,this.entriesBefore=[],this.entriesAfter=[],this.reflection=t.shared.AstReflection}register(t,e=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(t))if(Array.isArray(i))for(var a of i)a={check:this.wrapValidationException(a,e),category:r},this.addEntry(n,a);else"function"==typeof i?(i={check:this.wrapValidationException(i,e),category:r},this.addEntry(n,i)):tZ()}wrapValidationException(n,i){return async(t,e,r)=>{await this.handleException(()=>n.call(i,t,e,r),"An error occurred during validation",e,t)}}async handleException(t,e,r,n){try{await t()}catch(t){if(Dct(t))throw t;console.error(e+":",t),t instanceof Error&&t.stack&&console.error(t.stack),r("error",e+": "+(t instanceof Error?t.message:String(t)),{node:n})}}addEntry(t,e){if("AstNode"===t)this.entries.add("AstNode",e);else for(var r of this.reflection.getAllSubTypes(t))this.entries.add(r,e)}getChecks(t,e){let r=EK(this.entries.get(t)).concat(this.entries.get("AstNode"));return(r=e?r.filter(t=>e.includes(t.category)):r).map(t=>t.check)}registerBeforeDocument(t,e=this){this.entriesBefore.push(this.wrapPreparationException(t,"An error occurred during set-up of the validation",e))}registerAfterDocument(t,e=this){this.entriesAfter.push(this.wrapPreparationException(t,"An error occurred during tear-down of the validation",e))}wrapPreparationException(i,a,s){return async(t,e,r,n)=>{await this.handleException(()=>i.call(s,t,e,r,n),a,e,t)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function $ht(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=ZJ(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=ttt(t.node.$cstNode,t.keyword,t.index)),(e=e??t.node.$cstNode)?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function zht(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function Ght(t){switch(t){case"error":return Oht(qht.LexingError);case"warning":return Oht(qht.LexingWarning);case"info":return Oht(qht.LexingInfo);case"hint":return Oht(qht.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var Uht,qht,jht,Wht,Yht,Hht,Vht,Xht,Kht,Zht,Qht=t(()=>{var t;Nct(),Att(),cJ(),JK(),zct(),Fht(),Uht=class{static{me(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,e={},r=Lct.CancellationToken.None){var n=t.parseResult,i=[];if(await Oct(r),e.categories&&!e.categories.includes("built-in")||(this.processLexingErrors(n,i,e),!(e.stopAfterLexingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===qht.LexingError)||(this.processParsingErrors(n,i,e),e.stopAfterParsingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===qht.ParsingError))||(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===qht.LinkingError))))){try{i.push(...await this.validateAst(n.value,e,r))}catch(t){if(Dct(t))throw t;console.error("An error occurred during validation:",t)}await Oct(r)}return i}processLexingErrors(t,e,r){var n;for(n of[...t.lexerErrors,...null!=(t=null==(t=t.lexerReport)?void 0:t.diagnostics)?t:[]]){var i={severity:zht(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:Ght(i),source:this.getSource()};e.push(i)}}processParsingErrors(t,e,r){for(var n of t.parserErrors){let t;var i,a;isNaN(n.token.startOffset)?"previousToken"in n&&(a=n.previousToken,t=isNaN(a.startOffset)?{start:i={line:0,character:0},end:i}:{start:i={line:a.endLine-1,character:a.endColumn},end:i}):t=OK(n.token),t&&(a={severity:zht("error"),range:t,message:n.message,data:Oht(qht.ParsingError),source:this.getSource()},e.push(a))}}processLinkingErrors(t,e,r){for(var n of t.references){var i;(n=n.error)&&(i={node:n.container,property:n.property,index:n.index,data:{code:qht.LinkingError,containerType:n.container.$type,property:n.property,refText:n.reference.$refText}},e.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(t,e,r=Lct.CancellationToken.None){let n=[],i=me((t,e,r)=>{n.push(this.toDiagnostic(t,e,r))},"acceptor");return await this.validateAstBefore(t,e,i,r),await this.validateAstNodes(t,e,i,r),await this.validateAstAfter(t,e,i,r),n}async validateAstBefore(t,e,r,n=Lct.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksBefore)await Oct(n),await a(t,r,null!=(i=e.categories)?i:[],n)}async validateAstNodes(t,r,n,i=Lct.CancellationToken.None){await Promise.all(rJ(t).map(async t=>{var e;await Oct(i);for(e of this.validationRegistry.getChecks(t.$type,r.categories))await e(t,n,i)}))}async validateAstAfter(t,e,r,n=Lct.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksAfter)await Oct(n),await a(t,r,null!=(i=e.categories)?i:[],n)}toDiagnostic(t,e,r){return{message:e,range:$ht(r),severity:zht(t),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},me($ht,"getDiagnosticRange"),me(zht,"toDiagnosticSeverity"),me(Ght,"toDiagnosticData"),(t=qht=qht||{}).LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"}),Jht=t(()=>{Nct(),wK(),cJ(),JK(),zct(),iht(),jht=class{static{me(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(e,t,r){var r=r??QQ(e),n=(t=t??this.nameProvider.getName(e),this.astNodeLocator.getAstNodePath(e));if(!t)throw new Error(`Node at path ${n} has no name.`);let i,a=me(()=>{var t;return i=i??PK(null!=(t=this.nameProvider.getNameNode(e))?t:e.$cstNode)},"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:PK(e.$cstNode),type:e.$type,documentUri:r.uri,path:n}}},Wht=class{static{me(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=Lct.CancellationToken.None){let r=[],n=t.parseResult.value;for(var i of rJ(n))await Oct(e),iJ(i).filter(t=>!mK(t)).forEach(t=>{(t=this.createDescription(t))&&r.push(t)});return r}createDescription(t){var e,r=t.reference.$nodeDescription,n=t.reference.$refNode;if(r&&n)return{sourceUri:e=QQ(t.container).uri,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:r.documentUri,targetPath:r.path,segment:PK(n),local:Kct.equals(r.documentUri,e)}}}}),tut=t(()=>{Yht=class{static{me(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){var e;return t.$container?(e=this.getAstNodePath(t.$container),t=this.getPathSegment(t),e+this.segmentSeparator+t):""}getPathSegment({$containerProperty:t,$containerIndex:e}){if(t)return void 0!==e?t+this.indexSeparator+e:t;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(t,e){return e.split(this.segmentSeparator).reduce((t,e)=>{var r,n;return t&&0!==e.length?0<(n=e.indexOf(this.indexSeparator))?(r=e.substring(0,n),n=parseInt(e.substring(n+1)),t[r]?.[n]):t[e]:t},t)}}}),eut={},rut=t(()=>{Y(eut,tt(Sct(),1))}),nut=t(()=>{rut(),zct(),Hht=class{static{me(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new $ct,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new eut.Emitter,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){this.workspaceConfig=null!=(t=null==(t=t.capabilities.workspace)?void 0:t.configuration)&&t}async initialized(e){var t;if(this.workspaceConfig&&(e.register&&(t=this.serviceRegistry.all,e.register({section:t.map(t=>this.toSectionName(t.LanguageMetaData.languageId))})),e.fetchConfiguration)){let t=this.serviceRegistry.all.map(t=>({section:this.toSectionName(t.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((t,e)=>{this.updateSectionConfiguration(t.section,r[e])})}this._ready.resolve()}updateConfiguration(r){r.settings&&Object.keys(r.settings).forEach(t=>{var e=r.settings[t];this.updateSectionConfiguration(t,e),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:e})})}updateSectionConfiguration(t,e){this.settings[t]=e}async getConfiguration(t,e){if(await this.ready,t=this.toSectionName(t),this.settings[t])return this.settings[t][e]}toSectionName(t){return""+t}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}}),iut=t(()=>{function t(t){return{dispose:me(async()=>t(),"dispose")}}var e=Vht=Vht||{};me(t,"create"),e.create=t}),aut=t(()=>{Nct(),iut(),Eht(),zct(),NK(),Fht(),aht(),Xht=class{static{me(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new hht,this.documentPhaseListeners=new hht,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Zct.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.textDocuments=t.workspace.TextDocuments,this.indexManager=t.workspace.IndexManager,this.serviceRegistry=t.ServiceRegistry}async build(t,r={},e=Lct.CancellationToken.None){var n;for(n of t){var i,a=n.uri.toString();if(n.state===Zct.Validated){if("boolean"==typeof r.validation&&r.validation)n.state=Zct.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(a);else if("object"==typeof r.validation){let t=this.buildState.get(a),e=null==(i=t?.result)?void 0:i.validationChecks;e&&0<(i=(null!=(i=r.validation.categories)?i:Pht.all).filter(t=>!e.includes(t))).length&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:i})},result:t.result}),n.state=Zct.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Zct.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,r,e)}async update(t,e,r=Lct.CancellationToken.None){this.currentState=Zct.Changed;for(var n of e)this.langiumDocuments.deleteDocument(n),this.buildState.delete(n.toString()),this.indexManager.remove(n);for(var i of t){var a;this.langiumDocuments.invalidateDocument(i)||((a=this.langiumDocumentFactory.fromModel({$type:"INVALID"},i)).state=Zct.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(i.toString())}let s=EK(t).concat(e).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!s.has(t.uri.toString())&&this.shouldRelink(t,s)).forEach(t=>{this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t),t.state=Math.min(t.state,Zct.ComputedScopes),t.diagnostics=void 0}),await this.emitUpdate(t,e),await Oct(r),t=this.sortDocuments(this.langiumDocuments.all.filter(t=>t.statet(e,r)))}sortDocuments(t){let e=0,r=t.length-1;for(;evoid 0!==t.error)||this.indexManager.isAffected(t,e)}onUpdate(e){return this.updateListeners.push(e),Vht.create(()=>{var t=this.updateListeners.indexOf(e);0<=t&&this.updateListeners.splice(t,1)})}async buildDocuments(t,e,r){this.prepareBuild(t,e),await this.runCancelable(t,Zct.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,Zct.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,Zct.ComputedScopes,r,async t=>{var e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.precomputedScopes=await e.computeLocalScopes(t,r)}),await this.runCancelable(t,Zct.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(t,Zct.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));var n,e=t.filter(t=>this.shouldValidate(t));await this.runCancelable(e,Zct.Validated,r,t=>this.validate(t,r));for(n of t){var i=this.buildState.get(n.uri.toString());i&&(i.completed=!0)}}prepareBuild(t,e){for(var r of t){var r=r.uri.toString(),n=this.buildState.get(r);n&&!n.completed||this.buildState.set(r,{completed:!1,options:e,result:n?.result})}}async runCancelable(t,e,r,n){var i;for(i of t.filter(t=>t.statet.state===e),await this.notifyBuildPhase(t,e,r),this.currentState=e}onBuildPhase(t,e){return this.buildPhaseListeners.add(t,e),Vht.create(()=>{this.buildPhaseListeners.delete(t,e)})}onDocumentPhase(t,e){return this.documentPhaseListeners.add(t,e),Vht.create(()=>{this.documentPhaseListeners.delete(t,e)})}waitUntil(i,t,a){let s;return t&&"path"in t?s=t:a=t,a=a??Lct.CancellationToken.None,s&&(t=this.langiumDocuments.getDocument(s))&&t.state>i?Promise.resolve(s):this.currentState>=i?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(Fct):new Promise((e,t)=>{let r=this.onBuildPhase(i,()=>{var t;r.dispose(),n.dispose(),s?(t=this.langiumDocuments.getDocument(s),e(t?.uri)):e(void 0)}),n=a.onCancellationRequested(()=>{r.dispose(),n.dispose(),t(Fct)})})}async notifyDocumentPhase(t,e,r){var n;for(n of this.documentPhaseListeners.get(e).slice())try{await n(t,r)}catch(t){if(!Dct(t))throw t}}async notifyBuildPhase(t,e,r){var n;if(0!==t.length)for(n of this.buildPhaseListeners.get(e).slice())await Oct(r),await n(t,r)}shouldValidate(t){return!!this.getBuildOptions(t).validation}async validate(t,e){var r=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,n=this.getBuildOptions(t).validation,r=await r.validateDocument(t,n="object"==typeof n?n:void 0,e);t.diagnostics?t.diagnostics.push(...r):t.diagnostics=r,(e=this.buildState.get(t.uri.toString()))&&(null==e.result&&(e.result={}),t=null!=(r=n?.categories)?r:Pht.all,e.result.validationChecks?e.result.validationChecks.push(...t):e.result.validationChecks=[...t])}getBuildOptions(t){return null!=(t=null==(t=this.buildState.get(t.uri.toString()))?void 0:t.options)?t:{}}}}),sut=t(()=>{cJ(),Sht(),Nct(),NK(),iht(),Kht=class{static{me(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new vht,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){let r=QQ(t).uri,n=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{Kct.equals(t.targetUri,r)&&t.targetPath===e&&n.push(t)})}),EK(n)}allElements(e,r){let t=EK(this.symbolIndex.keys());return(t=r?t.filter(t=>!r||r.has(t)):t).map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,r){var t;return r?this.symbolByTypeIndex.get(e,r,()=>{var t;return(null!=(t=this.symbolIndex.get(e))?t:[]).filter(t=>this.astReflection.isSubtype(t.type,r))}):null!=(t=this.symbolIndex.get(e))?t:[]}remove(t){t=t.toString(),this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(t,e=Lct.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).references.ScopeComputation.computeExports(t,e),t=t.uri.toString(),this.symbolIndex.set(t,e),this.symbolByTypeIndex.clear(t)}async updateReferences(t,e=Lct.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).workspace.ReferenceDescriptionProvider.createDescriptions(t,e),this.referenceIndex.set(t.uri.toString(),e)}isAffected(t,e){return!!(t=this.referenceIndex.get(t.uri.toString()))&&t.some(t=>!t.local&&e.has(t.targetUri.toString()))}}}),out=t(()=>{Nct(),zct(),iht(),Zht=class{static{me(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new $ct,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(t){this.folders=null!=(t=t.workspaceFolders)?t:void 0}initialized(t){return this.mutex.write(t=>{var e;return this.initializeWorkspace(null!=(e=this.folders)?e:[],t)})}async initializeWorkspace(t,e=Lct.CancellationToken.None){t=await this.performStartup(t),await Oct(e),await this.documentBuilder.build(t,this.initialBuildOptions,e)}async performStartup(t){let e=this.serviceRegistry.all.flatMap(t=>t.LanguageMetaData.fileExtensions),r=[],n=me(t=>{r.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)},"collector");return await this.loadAdditionalDocuments(t,n),await Promise.all(t.map(t=>[t,this.getRootFolder(t)]).map(async t=>this.traverseFolder(...t,e,n))),this._ready.resolve(),r}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return Vct.parse(t.uri)}async traverseFolder(e,t,r,n){t=await this.fileSystemProvider.readDirectory(t),await Promise.all(t.map(async t=>{this.includeEntry(e,t,r)&&(t.isDirectory?await this.traverseFolder(e,t.uri,r,n):t.isFile&&(t=await this.langiumDocuments.getOrCreateDocument(t.uri),n(t)))}))}includeEntry(t,e,r){var n=Kct.basename(e.uri);return!n.startsWith(".")&&(e.isDirectory?"node_modules"!==n&&"out"!==n:!!e.isFile&&(n=Kct.extname(e.uri),r.includes(n)))}}});function lut(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function cut(t){return t&&"modes"in t&&"defaultMode"in t}function hut(t){return!lut(t)&&!cut(t)}var uut,dut,put,gut=t(()=>{zat(),uut=class{static{me(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(t,e,r,n,i){return Grt.buildUnexpectedCharactersMessage(t,e,r,n,i)}buildUnableToPopLexerModeMessage(t){return Grt.buildUnableToPopLexerModeMessage(t)}},dut={mode:"full"},put=class{static{me(this,"DefaultLexer")}constructor(t){this.errorMessageProvider=t.parser.LexerErrorMessageProvider,this.tokenBuilder=t.parser.TokenBuilder;var e=this.tokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive}),e=(this.tokenTypes=this.toTokenTypeDictionary(e),hut(e)?Object.values(e):e),t="production"===t.LanguageMetaData.mode;this.chevrotainLexer=new jrt(e,{positionTracking:"full",skipValidations:t,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(t,e=0){var r,n=this.chevrotainLexer.tokenize(t);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,t)}}toTokenTypeDictionary(t){if(hut(t))return t;let e=cut(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}},me(lut,"isTokenTypeArray"),me(cut,"isIMultiModeLexerDefinition"),me(hut,"isTokenTypeDictionary")});function fut(t,e,r){let n,i;return n="string"==typeof t?(i=e,r):(i=t.range.start,e),i=i||hot.create(0,0),r=yut(t),e=Lut(n),kut({index:0,tokens:vut({lines:r,position:i,options:e}),position:i})}function mut(t,e){var r,n,e=Lut(e);return 0!==(t=yut(t)).length&&(r=t[t.length-1],n=e.start,e=e.end,!!n?.exec(t[0]))&&!!e?.exec(r)}function yut(t){return("string"==typeof t?t:t.text).split(BJ)}function vut(a){let s,o,l,c=[],h=a.position.line,u=a.position.character;for(let i=0;i=r.length?0{Olt(),$J(),eht(),me(dut,"parseJSDoc"),me(put,"isJSDoc"),me(gut,"getLines"),Iut=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Rut=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,me(fut,"tokenize"),me(mut,"buildInlineTokens"),Mut=/\S/,Dut=/\s*$/,me(yut,"skipWhitespace"),me(vut,"lastCharacter"),me(xut,"parseJSDocComment"),me(but,"parseJSDocElement"),me(wut,"appendEmptyLine"),me(kut,"parseJSDocText"),me(Tut,"parseJSDocInline"),me(Eut,"parseJSDocTag"),me(Cut,"parseJSDocLine"),me(_ut,"normalizeOptions"),me(Sut,"normalizeOption"),Out=class{static{me(this,"JSDocCommentImpl")}constructor(t,e){this.elements=t,this.range=e}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(var e of this.elements)0===t.length?t=e.toString():(e=e.toString(),t+=Nut(t)+e);return t.trim()}toMarkdown(t){let e="";for(var r of this.elements)0===e.length?e=r.toMarkdown(t):(r=r.toMarkdown(t),e+=Nut(e)+r);return e.trim()}},Put=class{static{me(this,"JSDocTagImpl")}constructor(t,e,r,i){this.name=t,this.content=e,this.inline=r,this.range=i}toString(){let t="@"+this.name,e=this.content.toString();return 1===this.content.inlines.length?t=t+" "+e:1r.range.start.line&&(e+=` -`)}return e}toMarkdown(e){let r="";for(let t=0;ti.range.start.line&&(r+=` -`)}return r}},Fut=class{static{me(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}},me(Nut,"fillNewlines")}),Hut=t(()=>{sJ(),Yut(),$ut=class{static{me(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(r){var t=this.commentProvider.getComment(r);if(t&&put(t))return dut(t).toMarkdown({renderLink:me((t,e)=>this.documentationLinkRenderer(r,t,e),"renderLink"),renderTag:me(t=>this.documentationTagRenderer(r,t),"renderTag")})}documentationLinkRenderer(t,e,r){var i=null!=(i=this.findNameInPrecomputedScopes(t,e))?i:this.findNameInGlobalScope(t,e);return i&&i.nameSegment?(t=i.nameSegment.range.start.line+1,e=i.nameSegment.range.start.character+1,`[${r}](${i.documentUri.with({fragment:`L${t},`+e}).toString()})`):void 0}documentationTagRenderer(t,e){}findNameInPrecomputedScopes(e,r){var i=XQ(e).precomputedScopes;if(i){let t=e;do{var n=i.get(t).find(t=>t.name===r);if(n)return n}while(t=t.$container)}}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}}}),Vut=t(()=>{Nht(),KK(),zut=class{static{me(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return _ht(t)?t.$comment:null==(t=BK(t.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}}}),Xut=t(()=>{Bct(),Jht(),Gut=class{static{me(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t,e){return Promise.resolve(this.syncParser.parse(t))}},Uut=class{static{me(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{var t;0{n=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(t).then(t=>{t=this.hydrator.hydrate(t),i.resolve(t)}).catch(t=>{i.reject(t)}).finally(()=>{a.dispose(),clearTimeout(n)}),i.promise}terminateWorker(t){t.terminate(),0<=(t=this.workerPool.indexOf(t))&&this.workerPool.splice(t,1)}async acquireParserWorker(t){this.initializeWorkers();for(var e of this.workerPool)if(e.ready)return e.lock(),e;let r=new Pct;return t.onCancellationRequested(()=>{var t=this.queue.indexOf(r);0<=t&&this.queue.splice(t,1),r.reject(Oct)}),this.queue.push(r),r.promise}},qut=class{static{me(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,i){this.onReadyEmitter=new Qht.Emitter,this.deferred=new Pct,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=i,e(t=>{this.deferred.resolve(t),this.unlock()}),r(t=>{this.deferred.reject(t),this.unlock()})}terminate(){this.deferred.reject(Oct),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(t){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Pct,this.sendMessage(t),this.deferred.promise}}}),Kut=t(()=>{Sct(),Bct(),jut=class{static{me(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new _ct.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();var e=Lct();return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,r=_ct.CancellationToken.None){var i=new Pct;return t.push({action:e,deferred:i,cancellationToken:r}),this.performNextOperation(),i.promise}async performNextOperation(){if(this.done){var t=[];if(0{try{var i=await Promise.resolve().then(()=>t(r));e.resolve(i)}catch(t){Ict(t)?e.resolve(void 0):e.reject(t)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),Zut=t(()=>{Plt(),jQ(),vK(),sJ(),wht(),KK(),Wut=class{static{me(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new lht,this.tokenTypeIdMap=new lht,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport?this.dehydrateLexerReport(t.lexerReport):void 0,parserErrors:t.parserErrors.map(t=>Object.assign(Object.assign({},t),{message:t.message})),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}dehydrateLexerReport(t){return t}createDehyrationContext(t){var e,r=new Map,i=new Map;for(e of JQ(t))r.set(e,{});if(t.$cstNode)for(var n of LK(t.$cstNode))i.set(n,{});return{astNodes:r,cstNodes:i}}dehydrateAstNode(t,e){var r,i,n=e.astNodes.get(t);n.$type=t.$type,n.$containerIndex=t.$containerIndex,n.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(n.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for([r,i]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(i)){var a,s=[];n[r]=s;for(a of i)hK(a)?s.push(this.dehydrateAstNode(a,e)):uK(a)?s.push(this.dehydrateReference(a,e)):s.push(a)}else hK(i)?n[r]=this.dehydrateAstNode(i,e):uK(i)?n[r]=this.dehydrateReference(i,e):void 0!==i&&(n[r]=i);return n}dehydrateReference(t,e){var r={};return r.$refText=t.$refText,t.$refNode&&(r.$refNode=e.cstNodes.get(t.$refNode)),r}dehydrateCstNode(t,e){var r=e.cstNodes.get(t);return mK(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),gK(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):fK(t)&&(r.tokenType=t.tokenType.name,r.offset=t.offset,r.length=t.length,r.startLine=t.range.start.line,r.startColumn=t.range.start.character,r.endLine=t.range.end.line,r.endColumn=t.range.end.character),r}hydrate(t){var e=t.value,r=this.createHydrationContext(e);return"$cstNode"in e&&this.hydrateCstNode(e.$cstNode,r),{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,r)}}createHydrationContext(t){var e,r=new Map,i=new Map;for(e of JQ(t))r.set(e,{});let n;if(t.$cstNode)for(var a of LK(t.$cstNode)){let t;"fullText"in a?(t=new Rlt(a.fullText),n=t):"content"in a?t=new Nlt:"tokenType"in a&&(t=this.hydrateCstLeafNode(a)),t&&(i.set(a,t),t.root=n)}return{astNodes:r,cstNodes:i}}hydrateAstNode(t,e){var r,i,n=e.astNodes.get(t);n.$type=t.$type,n.$containerIndex=t.$containerIndex,n.$containerProperty=t.$containerProperty,t.$cstNode&&(n.$cstNode=e.cstNodes.get(t.$cstNode));for([r,i]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(i)){var a,s=[];n[r]=s;for(a of i)hK(a)?s.push(this.setParent(this.hydrateAstNode(a,e),n)):uK(a)?s.push(this.hydrateReference(a,n,r,e)):s.push(a)}else hK(i)?n[r]=this.setParent(this.hydrateAstNode(i,e),n):uK(i)?n[r]=this.hydrateReference(i,n,r,e):void 0!==i&&(n[r]=i);return n}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,r,i){return this.linker.buildReference(e,r,i.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,r=0){var i=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(i.grammarSource=this.getGrammarElement(t.grammarSource)),i.astNode=e.astNodes.get(t.astNode),gK(i))for(var n of t.content)n=this.hydrateCstNode(n,e,r++),i.content.push(n);return i}hydrateCstLeafNode(t){var e=this.getTokenType(t.tokenType),r=t.offset;return new Llt(r,t.length,{start:{line:t.startLine,character:t.startColumn},end:{line:t.endLine,character:t.endColumn}},e,t.hidden)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){if(t)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(t)}createGrammarElementIdMap(){let t=0;for(var e of JQ(this.grammar))lZ(e)&&this.grammarElementIdMap.set(e,t++)}}});function Qut(t){return{documentation:{CommentProvider:me(t=>new zut(t),"CommentProvider"),DocumentationProvider:me(t=>new $ut(t),"DocumentationProvider")},parser:{AsyncParser:me(t=>new Gut(t),"AsyncParser"),GrammarConfig:me(t=>_tt(t),"GrammarConfig"),LangiumParser:me(t=>gct(t),"LangiumParser"),CompletionParser:me(t=>dct(t),"CompletionParser"),ValueConverter:me(()=>new yct,"ValueConverter"),TokenBuilder:me(()=>new mct,"TokenBuilder"),Lexer:me(t=>new hut(t),"Lexer"),ParserErrorMessageProvider:me(()=>new qlt,"ParserErrorMessageProvider"),LexerErrorMessageProvider:me(()=>new lut,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:me(()=>new qht,"AstNodeLocator"),AstNodeDescriptionProvider:me(t=>new Ght(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:me(t=>new Uht(t),"ReferenceDescriptionProvider")},references:{Linker:me(t=>new Qct(t),"Linker"),NameProvider:me(()=>new aht,"NameProvider"),ScopeProvider:me(t=>new vht(t),"ScopeProvider"),ScopeComputation:me(t=>new cht(t),"ScopeComputation"),References:me(t=>new sht(t),"References")},serializer:{Hydrator:me(t=>new Wut(t),"Hydrator"),JsonSerializer:me(t=>new Aht(t),"JsonSerializer")},validation:{DocumentValidator:me(t=>new $ht(t),"DocumentValidator"),ValidationRegistry:me(t=>new Dht(t),"ValidationRegistry")},shared:me(()=>t.shared,"shared")}}function Jut(e){return{ServiceRegistry:me(t=>new Lht(t),"ServiceRegistry"),workspace:{LangiumDocuments:me(t=>new Kct(t),"LangiumDocuments"),LangiumDocumentFactory:me(t=>new Xct(t),"LangiumDocumentFactory"),DocumentBuilder:me(t=>new Yht(t),"DocumentBuilder"),IndexManager:me(t=>new Hht(t),"IndexManager"),WorkspaceManager:me(t=>new Vht(t),"WorkspaceManager"),FileSystemProvider:me(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:me(()=>new jut,"WorkspaceLock"),ConfigurationProvider:me(t=>new jht(t),"ConfigurationProvider")}}}var tdt=t(()=>{Stt(),pct(),xct(),bct(),wct(),iht(),xht(),bht(),kht(),Cht(),Nht(),Iht(),Xht(),Oht(),Kht(),Zht(),tut(),rut(),rht(),iut(),nut(),uut(),Hut(),Vut(),Hlt(),Xut(),Kut(),Zut(),me(Qut,"createDefaultCoreModule"),me(Jut,"createDefaultSharedCoreModule")});function edt(t,e,r,i,n,a,s,o,l){return idt([t,e,r,i,n,a,s,o,l].reduce(adt,{}))}function rdt(t){if(t&&t[odt])for(var e of Object.values(t))rdt(e);return t}function idt(r,i){let n=new Proxy({},{deleteProperty:me(()=>!1,"deleteProperty"),set:me(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:me((t,e)=>e===odt||ndt(t,e,r,i||n),"get"),getOwnPropertyDescriptor:me((t,e)=>(ndt(t,e,r,i||n),Object.getOwnPropertyDescriptor(t,e)),"getOwnPropertyDescriptor"),has:me((t,e)=>e in r,"has"),ownKeys:me(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return n}function ndt(t,e,r,i){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===ldt)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in r){r=r[e],t[e]=ldt;try{t[e]="function"==typeof r?r(i):idt(r,i)}catch(r){throw t[e]=r instanceof Error?r:void 0,r}return t[e]}}function adt(t,e){if(e)for(var[r,i]of Object.entries(e)){var n;void 0!==i&&(null!==(n=t[r])&&null!==i&&"object"==typeof n&&"object"==typeof i?t[r]=adt(n,i):t[r]=i)}return t}var sdt,odt,ldt,cdt,hdt,udt,ddt,pdt,gdt,fdt=t(()=>{(sdt=sdt||{}).merge=(t,e)=>adt(adt({},t),e),me(edt,"inject"),odt=Symbol("isProxy"),me(rdt,"eagerLoad"),me(idt,"_inject"),ldt=Symbol(),me(ndt,"_resolve"),me(adt,"_merge")}),mdt=t(()=>{}),ydt=t(()=>{Vut(),Hut(),Yut()}),vdt=t(()=>{}),xdt=t(()=>{Stt(),vdt()}),bdt=t(()=>{Bat(),bct(),uut(),cdt={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(hdt=hdt||{}).REGULAR="indentation-sensitive",hdt.IGNORE_INDENTATION="ignore-indentation",udt=class extends mct{static{me(this,"IndentationAwareTokenBuilder")}constructor(t=cdt){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},cdt),t),this.indentTokenType=Hrt({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Hrt({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(t,e){var r;if(!aut(t=super.buildTokens(t,e)))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:n,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options,o,l,c,h=[];for(r of t){for(var[u,d]of s)r.name===u?r.PUSH_MODE=hdt.IGNORE_INDENTATION:r.name===d&&(r.POP_MODE=!0);r.name===n?o=r:r.name===i?l=r:r.name===a?c=r:h.push(r)}if(o&&l&&c)return 0{}),kdt=t(()=>{Xut(),pct(),Plt(),bdt(),xct(),Hlt(),uut(),uct(),wdt(),bct(),wct()}),Tdt=t(()=>{iht(),xht(),bht(),Tht(),kht(),Cht()}),Edt=t(()=>{Zut(),Nht()}),Cdt=t(()=>{pdt=class{static{me(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},gdt={fileSystemProvider:me(()=>new pdt,"fileSystemProvider")}});function _dt(){var t=edt(Jut(gdt),Ldt),e=edt(Qut({shared:t}),Adt);return t.ServiceRegistry.register(e),e}function Sdt(t){var e=_dt(),t=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(t,Wct.parse(`memory://${null!=(e=t.name)?e:"grammar"}.langium`)),t}var Adt,Ldt,Ndt=t(()=>{tdt(),fdt(),jQ(),Cdt(),eht(),Adt={Grammar:me(()=>{},"Grammar"),LanguageMetaData:me(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Ldt={AstReflection:me(()=>new UQ,"AstReflection")},me(_dt,"createMinimalGrammarServices"),me(Sdt,"loadGrammarFromJson")}),Idt={},Rdt=(lPt(Idt,{AstUtils:()=>WQ,BiMap:()=>lht,Cancellation:()=>_ct,ContextCache:()=>fht,CstUtils:()=>AK,DONE_RESULT:()=>EK,Deferred:()=>Pct,Disposable:()=>Wht,DisposableCache:()=>pht,DocumentCache:()=>mht,EMPTY_STREAM:()=>TK,ErrorWithLocation:()=>QK,GrammarUtils:()=>zJ,MultiMap:()=>oht,OperationCancelled:()=>Oct,Reduction:()=>_K,RegExpUtils:()=>_J,SimpleCache:()=>ght,StreamImpl:()=>kK,TreeStreamImpl:()=>CK,URI:()=>Wct,UriUtils:()=>Hct,WorkspaceCache:()=>yht,assertUnreachable:()=>ZK,delayNextTick:()=>Act,interruptAndCheck:()=>Rct,isOperationCancelled:()=>Ict,loadGrammarFromJson:()=>Sdt,setInterruptionPeriod:()=>Nct,startCancelableOperation:()=>Lct,stream:()=>wK}),t(()=>{Eht(),Jht(),H(Idt,Qht),wht(),eut(),JK(),Ndt(),Bct(),SK(),eht(),sJ(),Sct(),KK(),Ctt(),$J()})),Mdt=t(()=>{Xht(),Oht()}),Ddt=t(()=>{Kht(),Zht(),tut(),rut(),rht(),Cdt(),iut(),Kut(),nut()}),Odt={},Pdt=(lPt(Odt,{AbstractAstReflection:()=>yK,AbstractCstNode:()=>Alt,AbstractLangiumParser:()=>zlt,AbstractParserErrorMessageProvider:()=>Ult,AbstractThreadedAsyncParser:()=>Uut,AstUtils:()=>WQ,BiMap:()=>lht,Cancellation:()=>_ct,CompositeCstNodeImpl:()=>Nlt,ContextCache:()=>fht,CstNodeBuilder:()=>Slt,CstUtils:()=>AK,DEFAULT_TOKENIZE_OPTIONS:()=>cut,DONE_RESULT:()=>EK,DatatypeSymbol:()=>Flt,DefaultAstNodeDescriptionProvider:()=>Ght,DefaultAstNodeLocator:()=>qht,DefaultAsyncParser:()=>Gut,DefaultCommentProvider:()=>zut,DefaultConfigurationProvider:()=>jht,DefaultDocumentBuilder:()=>Yht,DefaultDocumentValidator:()=>$ht,DefaultHydrator:()=>Wut,DefaultIndexManager:()=>Hht,DefaultJsonSerializer:()=>Aht,DefaultLangiumDocumentFactory:()=>Xct,DefaultLangiumDocuments:()=>Kct,DefaultLexer:()=>hut,DefaultLexerErrorMessageProvider:()=>lut,DefaultLinker:()=>Qct,DefaultNameProvider:()=>aht,DefaultReferenceDescriptionProvider:()=>Uht,DefaultReferences:()=>sht,DefaultScopeComputation:()=>cht,DefaultScopeProvider:()=>vht,DefaultServiceRegistry:()=>Lht,DefaultTokenBuilder:()=>mct,DefaultValueConverter:()=>yct,DefaultWorkspaceLock:()=>jut,DefaultWorkspaceManager:()=>Vht,Deferred:()=>Pct,Disposable:()=>Wht,DisposableCache:()=>pht,DocumentCache:()=>mht,DocumentState:()=>Vct,DocumentValidator:()=>zht,EMPTY_SCOPE:()=>dht,EMPTY_STREAM:()=>TK,EmptyFileSystem:()=>gdt,EmptyFileSystemProvider:()=>pdt,ErrorWithLocation:()=>QK,GrammarAST:()=>tZ,GrammarUtils:()=>zJ,IndentationAwareLexer:()=>ddt,IndentationAwareTokenBuilder:()=>udt,JSDocDocumentationProvider:()=>$ut,LangiumCompletionParser:()=>jlt,LangiumParser:()=>Glt,LangiumParserErrorMessageProvider:()=>qlt,LeafCstNodeImpl:()=>Llt,LexingMode:()=>hdt,MapScope:()=>uht,Module:()=>sdt,MultiMap:()=>oht,OperationCancelled:()=>Oct,ParserWorker:()=>qut,Reduction:()=>_K,RegExpUtils:()=>_J,RootCstNodeImpl:()=>Rlt,SimpleCache:()=>ght,StreamImpl:()=>kK,StreamScope:()=>hht,TextDocument:()=>jct,TreeStreamImpl:()=>CK,URI:()=>Wct,UriUtils:()=>Hct,ValidationCategory:()=>Mht,ValidationRegistry:()=>Dht,ValueConverter:()=>vct,WorkspaceCache:()=>yht,assertUnreachable:()=>ZK,createCompletionParser:()=>dct,createDefaultCoreModule:()=>Qut,createDefaultSharedCoreModule:()=>Jut,createGrammarConfig:()=>_tt,createLangiumParser:()=>gct,createParser:()=>Vlt,delayNextTick:()=>Act,diagnosticData:()=>Rht,eagerLoad:()=>rdt,getDiagnosticRange:()=>Pht,indentationBuilderDefaultOptions:()=>cdt,inject:()=>edt,interruptAndCheck:()=>Rct,isAstNode:()=>hK,isAstNodeDescription:()=>dK,isAstNodeWithComment:()=>_ht,isCompositeCstNode:()=>gK,isIMultiModeLexerDefinition:()=>sut,isJSDoc:()=>put,isLeafCstNode:()=>fK,isLinkingError:()=>pK,isNamed:()=>nht,isOperationCancelled:()=>Ict,isReference:()=>uK,isRootCstNode:()=>mK,isTokenTypeArray:()=>aut,isTokenTypeDictionary:()=>out,loadGrammarFromJson:()=>Sdt,parseJSDoc:()=>dut,prepareLangiumParser:()=>fct,setInterruptionPeriod:()=>Nct,startCancelableOperation:()=>Lct,stream:()=>wK,toDiagnosticData:()=>Fht,toDiagnosticSeverity:()=>Bht}),t(()=>{tdt(),fdt(),Iht(),mdt(),vK(),ydt(),xdt(),kdt(),Tdt(),Edt(),Rdt(),H(Odt,Idt),Mdt(),Ddt(),jQ()}));function Bdt(t){return p0t.isInstance(t,Xdt)}function Fdt(t){return p0t.isInstance(t,Zdt)}function $dt(t){return p0t.isInstance(t,t0t)}function zdt(t){return p0t.isInstance(t,e0t)}function Gdt(t){return p0t.isInstance(t,r0t)}function Udt(t){return p0t.isInstance(t,i0t)}function qdt(t){return p0t.isInstance(t,a0t)}function jdt(t){return p0t.isInstance(t,o0t)}function Wdt(t){return p0t.isInstance(t,l0t)}function Ydt(t){return p0t.isInstance(t,"Pie")}function Hdt(t){return p0t.isInstance(t,c0t)}var Vdt,s,Xdt,Kdt,Zdt,Qdt,Jdt,t0t,e0t,r0t,i0t,n0t,a0t,s0t,o0t,l0t,c0t,h0t,u0t,d0t,p0t,g0t,f0t,m0t,y0t,v0t,x0t,b0t,w0t,k0t,T0t,E0t,C0t,_0t,S0t,A0t,L0t,N0t,I0t,R0t,M0t,D0t,O0t,P0t,B0t,F0t,$0t,z0t,G0t,U0t,q0t=t(()=>{Pdt(),Pdt(),Pdt(),Pdt(),Vdt=Object.defineProperty,s=me((t,e)=>Vdt(t,"name",{value:e,configurable:!0}),"__name"),Xdt="Architecture",me(Bdt,"isArchitecture"),s(Bdt,"isArchitecture"),Kdt="Axis",Zdt="Branch",me(Fdt,"isBranch"),s(Fdt,"isBranch"),Qdt="Checkout",Jdt="CherryPicking",t0t="Commit",me($dt,"isCommit"),s($dt,"isCommit"),e0t="Common",me(zdt,"isCommon"),s(zdt,"isCommon"),r0t="GitGraph",me(Gdt,"isGitGraph"),s(Gdt,"isGitGraph"),i0t="Info",me(Udt,"isInfo"),s(Udt,"isInfo"),n0t="Junction",a0t="Merge",me(qdt,"isMerge"),s(qdt,"isMerge"),s0t="Option",o0t="Packet",me(jdt,"isPacket"),s(jdt,"isPacket"),l0t="PacketBlock",me(Wdt,"isPacketBlock"),s(Wdt,"isPacketBlock"),me(Ydt,"isPie"),s(Ydt,"isPie"),c0t="PieSection",me(Hdt,"isPieSection"),s(Hdt,"isPieSection"),h0t="Service",u0t="Direction",d0t=class extends yK{static{me(this,"MermaidAstReflection")}static{s(this,"MermaidAstReflection")}getAllTypes(){return[Xdt,Kdt,Zdt,Qdt,Jdt,t0t,e0t,"Curve",u0t,"Edge","Entry",r0t,"Group",i0t,n0t,a0t,s0t,o0t,l0t,"Pie",c0t,"Radar",h0t,"Statement"]}computeIsSubtype(t,e){switch(t){case Zdt:case Qdt:case Jdt:case t0t:case a0t:return this.isSubtype("Statement",e);case u0t:return this.isSubtype(r0t,e);default:return!1}}getReferenceType(t){if("Entry:axis"!=(t=t.container.$type+":"+t.property))throw new Error(t+" is not a valid reference id.");return Kdt}getTypeMetaData(t){switch(t){case Xdt:return{name:Xdt,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case Kdt:return{name:Kdt,properties:[{name:"label"},{name:"name"}]};case Zdt:return{name:Zdt,properties:[{name:"name"},{name:"order"}]};case Qdt:return{name:Qdt,properties:[{name:"branch"}]};case Jdt:return{name:Jdt,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case t0t:return{name:t0t,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case e0t:return{name:e0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};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 r0t:return{name:r0t,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 i0t:return{name:i0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case n0t:return{name:n0t,properties:[{name:"id"},{name:"in"}]};case a0t:return{name:a0t,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case s0t:return{name:s0t,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case o0t:return{name:o0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case l0t:return{name:l0t,properties:[{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 c0t:return{name:c0t,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 h0t:return{name:h0t,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case u0t:return{name:u0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},p0t=new d0t,f0t=s(()=>g0t=g0t??Sdt('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":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@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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","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":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'),"InfoGrammar"),y0t=s(()=>m0t=m0t??Sdt(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":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":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":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@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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","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":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`),"PacketGrammar"),x0t=s(()=>v0t=v0t??Sdt('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"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@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":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@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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","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":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'),"PieGrammar"),w0t=s(()=>b0t=b0t??Sdt('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"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@15"},"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@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"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@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"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@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"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@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"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@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"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":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":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},{"$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":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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","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":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'),"ArchitectureGrammar"),T0t=s(()=>k0t=k0t??Sdt(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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","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":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"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@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"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@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"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@1"},"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@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"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@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"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@1"},"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@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"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@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"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":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`),"GitGraphGrammar"),C0t=s(()=>E0t=E0t??Sdt(`{"$type":"Grammar","isDeclared":true,"name":"Radar","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@12"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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","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":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"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@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"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@22"},"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@21"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"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@21"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"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@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@12"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"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@19"},"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@18"},"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@18"},"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@18"},"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@20"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":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":"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":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9\\\\-_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`),"RadarGrammar"),I0t={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(N0t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(L0t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(A0t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(S0t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(_0t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},R0t={AstReflection:s(()=>new d0t,"AstReflection")},M0t={Grammar:s(()=>f0t(),"Grammar"),LanguageMetaData:s(()=>_0t,"LanguageMetaData"),parser:{}},D0t={Grammar:s(()=>y0t(),"Grammar"),LanguageMetaData:s(()=>S0t,"LanguageMetaData"),parser:{}},O0t={Grammar:s(()=>x0t(),"Grammar"),LanguageMetaData:s(()=>A0t,"LanguageMetaData"),parser:{}},P0t={Grammar:s(()=>w0t(),"Grammar"),LanguageMetaData:s(()=>L0t,"LanguageMetaData"),parser:{}},B0t={Grammar:s(()=>T0t(),"Grammar"),LanguageMetaData:s(()=>N0t,"LanguageMetaData"),parser:{}},F0t={Grammar:s(()=>C0t(),"Grammar"),LanguageMetaData:s(()=>I0t,"LanguageMetaData"),parser:{}},$0t={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},z0t=class extends yct{static{me(this,"AbstractMermaidValueConverter")}static{s(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){var i=this.runCommonConverter(t,e,r);return void 0===(i=void 0===i?this.runCustomConverter(t,e,r):i)?super.runConverter(t,e,r):i}runCommonConverter(t,e,r){return void 0!==(t=$0t[t.name])&&null!==(t=t.exec(e))?void 0!==t[1]?t[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==t[2]?t[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` -`):void 0:void 0}},G0t=class extends z0t{static{me(this,"CommonValueConverter")}static{s(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},U0t=class extends mct{static{me(this,"AbstractMermaidTokenBuilder")}static{s(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){return(t=super.buildKeywordTokens(t,e,r)).forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),t}},class extends U0t{static{me(this,"CommonTokenBuilder")}static{s(this,"CommonTokenBuilder")}}});function j0t(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),B0t,Y0t);return t.ServiceRegistry.register(e),{shared:t,GitGraph:e}}var W0t,Y0t,H0t=t(()=>{q0t(),Pdt(),W0t=class extends U0t{static{me(this,"GitGraphTokenBuilder")}static{s(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},Y0t={parser:{TokenBuilder:s(()=>new W0t,"TokenBuilder"),ValueConverter:s(()=>new G0t,"ValueConverter")}},me(j0t,"createGitGraphServices"),s(j0t,"createGitGraphServices")});function V0t(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),M0t,K0t);return t.ServiceRegistry.register(e),{shared:t,Info:e}}var X0t,K0t,Z0t=t(()=>{q0t(),Pdt(),X0t=class extends U0t{static{me(this,"InfoTokenBuilder")}static{s(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},K0t={parser:{TokenBuilder:s(()=>new X0t,"TokenBuilder"),ValueConverter:s(()=>new G0t,"ValueConverter")}},me(V0t,"createInfoServices"),s(V0t,"createInfoServices")});function Q0t(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),D0t,tpt);return t.ServiceRegistry.register(e),{shared:t,Packet:e}}var J0t,tpt,ept=t(()=>{q0t(),Pdt(),J0t=class extends U0t{static{me(this,"PacketTokenBuilder")}static{s(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},tpt={parser:{TokenBuilder:s(()=>new J0t,"TokenBuilder"),ValueConverter:s(()=>new G0t,"ValueConverter")}},me(Q0t,"createPacketServices"),s(Q0t,"createPacketServices")});function rpt(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),O0t,apt);return t.ServiceRegistry.register(e),{shared:t,Pie:e}}var ipt,npt,apt,spt=t(()=>{q0t(),Pdt(),ipt=class extends U0t{static{me(this,"PieTokenBuilder")}static{s(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},npt=class extends z0t{static{me(this,"PieValueConverter")}static{s(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},apt={parser:{TokenBuilder:s(()=>new ipt,"TokenBuilder"),ValueConverter:s(()=>new npt,"ValueConverter")}},me(rpt,"createPieServices"),s(rpt,"createPieServices")});function opt(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),P0t,hpt);return t.ServiceRegistry.register(e),{shared:t,Architecture:e}}var lpt,cpt,hpt,upt=t(()=>{q0t(),Pdt(),lpt=class extends U0t{static{me(this,"ArchitectureTokenBuilder")}static{s(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},cpt=class extends z0t{static{me(this,"ArchitectureValueConverter")}static{s(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){return"ARCH_ICON"===t.name?e.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===t.name?e.replace(/["()]/g,""):"ARCH_TITLE"===t.name?e.replace(/[[\]]/g,"").trim():void 0}},hpt={parser:{TokenBuilder:s(()=>new lpt,"TokenBuilder"),ValueConverter:s(()=>new cpt,"ValueConverter")}},me(opt,"createArchitectureServices"),s(opt,"createArchitectureServices")});function dpt(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),F0t,gpt);return t.ServiceRegistry.register(e),{shared:t,Radar:e}}var ppt,gpt,fpt=t(()=>{q0t(),Pdt(),ppt=class extends U0t{static{me(this,"RadarTokenBuilder")}static{s(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},gpt={parser:{TokenBuilder:s(()=>new ppt,"TokenBuilder"),ValueConverter:s(()=>new G0t,"ValueConverter")}},me(dpt,"createRadarServices"),s(dpt,"createRadarServices")}),mpt={},ypt=(lPt(mpt,{InfoModule:()=>K0t,createInfoServices:()=>V0t}),t(()=>{Z0t(),q0t()})),vpt={},xpt=(lPt(vpt,{PacketModule:()=>tpt,createPacketServices:()=>Q0t}),t(()=>{ept(),q0t()})),bpt={},wpt=(lPt(bpt,{PieModule:()=>apt,createPieServices:()=>rpt}),t(()=>{spt(),q0t()})),kpt={},Tpt=(lPt(kpt,{ArchitectureModule:()=>hpt,createArchitectureServices:()=>opt}),t(()=>{upt(),q0t()})),Ept={},Cpt=(lPt(Ept,{GitGraphModule:()=>Y0t,createGitGraphServices:()=>j0t}),t(()=>{H0t(),q0t()})),_pt={},Spt=(lPt(_pt,{RadarModule:()=>gpt,createRadarServices:()=>dpt}),t(()=>{fpt(),q0t()}));async function Apt(t,e){var r=Npt[t];if(!r)throw new Error("Unknown diagram type: "+t);if(Lpt[t]||await r(),0<(r=Lpt[t].parse(e)).lexerErrors.length||0{H0t(),Z0t(),ept(),spt(),upt(),fpt(),q0t(),Lpt={},Npt={info:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(ypt(),mpt))).createInfoServices)().Info.parser.LangiumParser;Lpt.info=t},"info"),packet:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(xpt(),vpt))).createPacketServices)().Packet.parser.LangiumParser;Lpt.packet=t},"packet"),pie:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(wpt(),bpt))).createPieServices)().Pie.parser.LangiumParser;Lpt.pie=t},"pie"),architecture:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(Tpt(),kpt))).createArchitectureServices)().Architecture.parser.LangiumParser;Lpt.architecture=t},"architecture"),gitGraph:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(Cpt(),Ept))).createGitGraphServices)().GitGraph.parser.LangiumParser;Lpt.gitGraph=t},"gitGraph"),radar:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(Spt(),_pt))).createRadarServices)().Radar.parser.LangiumParser;Lpt.radar=t},"radar")},me(Apt,"parse"),s(Apt,"parse"),Ipt=class extends Error{static{me(this,"MermaidParseError")}constructor(t){super(`Parsing failed: ${t.lexerErrors.map(t=>t.message).join(` +`}var Dut,Out,Put,But,Fut,$ut,zut,Gut,Uut,qut,jut,Wut,Yut,Hut,Vut,Xut=t(()=>{Flt(),UJ(),iht(),me(fut,"parseJSDoc"),me(mut,"isJSDoc"),me(yut,"getLines"),Dut=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Out=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,me(vut,"tokenize"),me(xut,"buildInlineTokens"),Put=/\S/,But=/\s*$/,me(but,"skipWhitespace"),me(wut,"lastCharacter"),me(kut,"parseJSDocComment"),me(Tut,"parseJSDocElement"),me(Eut,"appendEmptyLine"),me(Cut,"parseJSDocText"),me(_ut,"parseJSDocInline"),me(Sut,"parseJSDocTag"),me(Aut,"parseJSDocLine"),me(Lut,"normalizeOptions"),me(Nut,"normalizeOption"),Fut=class{static{me(this,"JSDocCommentImpl")}constructor(t,e){this.elements=t,this.range=e}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(var e of this.elements)0===t.length?t=e.toString():(e=e.toString(),t+=Mut(t)+e);return t.trim()}toMarkdown(t){let e="";for(var r of this.elements)0===e.length?e=r.toMarkdown(t):(r=r.toMarkdown(t),e+=Mut(e)+r);return e.trim()}},$ut=class{static{me(this,"JSDocTagImpl")}constructor(t,e,r,n){this.name=t,this.content=e,this.inline=r,this.range=n}toString(){let t="@"+this.name,e=this.content.toString();return 1===this.content.inlines.length?t=t+" "+e:1r.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let r="";for(let t=0;tn.range.start.line&&(r+=` +`)}return r}},Gut=class{static{me(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}},me(Mut,"fillNewlines")}),Kut=t(()=>{cJ(),Xut(),Uut=class{static{me(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(r){var t=this.commentProvider.getComment(r);if(t&&mut(t))return fut(t).toMarkdown({renderLink:me((t,e)=>this.documentationLinkRenderer(r,t,e),"renderLink"),renderTag:me(t=>this.documentationTagRenderer(r,t),"renderTag")})}documentationLinkRenderer(t,e,r){var n=null!=(n=this.findNameInPrecomputedScopes(t,e))?n:this.findNameInGlobalScope(t,e);return n&&n.nameSegment?(t=n.nameSegment.range.start.line+1,e=n.nameSegment.range.start.character+1,`[${r}](${n.documentUri.with({fragment:`L${t},`+e}).toString()})`):void 0}documentationTagRenderer(t,e){}findNameInPrecomputedScopes(e,r){var n=QQ(e).precomputedScopes;if(n){let t=e;do{var i=n.get(t).find(t=>t.name===r);if(i)return i}while(t=t.$container)}}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}}}),Zut=t(()=>{Mht(),JK(),qut=class{static{me(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return Lht(t)?t.$comment:null==(t=zK(t.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}}}),Qut=t(()=>{zct(),rut(),jut=class{static{me(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t,e){return Promise.resolve(this.syncParser.parse(t))}},Wut=class{static{me(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{var t;0{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(t).then(t=>{t=this.hydrator.hydrate(t),n.resolve(t)}).catch(t=>{n.reject(t)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(t){t.terminate(),0<=(t=this.workerPool.indexOf(t))&&this.workerPool.splice(t,1)}async acquireParserWorker(t){this.initializeWorkers();for(var e of this.workerPool)if(e.ready)return e.lock(),e;let r=new $ct;return t.onCancellationRequested(()=>{var t=this.queue.indexOf(r);0<=t&&this.queue.splice(t,1),r.reject(Fct)}),this.queue.push(r),r.promise}},Yut=class{static{me(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,n){this.onReadyEmitter=new eut.Emitter,this.deferred=new $ct,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=n,e(t=>{this.deferred.resolve(t),this.unlock()}),r(t=>{this.deferred.reject(t),this.unlock()})}terminate(){this.deferred.reject(Fct),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(t){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new $ct,this.sendMessage(t),this.deferred.promise}}}),Jut=t(()=>{Nct(),zct(),Hut=class{static{me(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Lct.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();var e=Rct();return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,r=Lct.CancellationToken.None){var n=new $ct;return t.push({action:e,deferred:n,cancellationToken:r}),this.performNextOperation(),n.promise}async performNextOperation(){if(this.done){var t=[];if(0{try{var n=await Promise.resolve().then(()=>t(r));e.resolve(n)}catch(t){Dct(t)?e.resolve(void 0):e.reject(t)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),tdt=t(()=>{$lt(),HQ(),wK(),cJ(),Eht(),JK(),Vut=class{static{me(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new uht,this.tokenTypeIdMap=new uht,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport?this.dehydrateLexerReport(t.lexerReport):void 0,parserErrors:t.parserErrors.map(t=>Object.assign(Object.assign({},t),{message:t.message})),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}dehydrateLexerReport(t){return t}createDehyrationContext(t){var e,r=new Map,n=new Map;for(e of rJ(t))r.set(e,{});if(t.$cstNode)for(var i of RK(t.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(t,e){var r,n,i=e.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(i.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)pK(a)?s.push(this.dehydrateAstNode(a,e)):gK(a)?s.push(this.dehydrateReference(a,e)):s.push(a)}else pK(n)?i[r]=this.dehydrateAstNode(n,e):gK(n)?i[r]=this.dehydrateReference(n,e):void 0!==n&&(i[r]=n);return i}dehydrateReference(t,e){var r={};return r.$refText=t.$refText,t.$refNode&&(r.$refNode=e.cstNodes.get(t.$refNode)),r}dehydrateCstNode(t,e){var r=e.cstNodes.get(t);return xK(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),yK(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):vK(t)&&(r.tokenType=t.tokenType.name,r.offset=t.offset,r.length=t.length,r.startLine=t.range.start.line,r.startColumn=t.range.start.character,r.endLine=t.range.end.line,r.endColumn=t.range.end.character),r}hydrate(t){var e=t.value,r=this.createHydrationContext(e);return"$cstNode"in e&&this.hydrateCstNode(e.$cstNode,r),{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,r)}}createHydrationContext(t){var e,r=new Map,n=new Map;for(e of rJ(t))r.set(e,{});let i;if(t.$cstNode)for(var a of RK(t.$cstNode)){let t;"fullText"in a?(t=new Olt(a.fullText),i=t):"content"in a?t=new Mlt:"tokenType"in a&&(t=this.hydrateCstLeafNode(a)),t&&(n.set(a,t),t.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(t,e){var r,n,i=e.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,t.$cstNode&&(i.$cstNode=e.cstNodes.get(t.$cstNode));for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)pK(a)?s.push(this.setParent(this.hydrateAstNode(a,e),i)):gK(a)?s.push(this.hydrateReference(a,i,r,e)):s.push(a)}else pK(n)?i[r]=this.setParent(this.hydrateAstNode(n,e),i):gK(n)?i[r]=this.hydrateReference(n,i,r,e):void 0!==n&&(i[r]=n);return i}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,r,n){return this.linker.buildReference(e,r,n.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,r=0){var n=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(n.grammarSource=this.getGrammarElement(t.grammarSource)),n.astNode=e.astNodes.get(t.astNode),yK(n))for(var i of t.content)i=this.hydrateCstNode(i,e,r++),n.content.push(i);return n}hydrateCstLeafNode(t){var e=this.getTokenType(t.tokenType),r=t.offset;return new Rlt(r,t.length,{start:{line:t.startLine,character:t.startColumn},end:{line:t.endLine,character:t.endColumn}},e,t.hidden)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){if(t)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(t)}createGrammarElementIdMap(){let t=0;for(var e of rJ(this.grammar))uZ(e)&&this.grammarElementIdMap.set(e,t++)}}});function edt(t){return{documentation:{CommentProvider:me(t=>new qut(t),"CommentProvider"),DocumentationProvider:me(t=>new Uut(t),"DocumentationProvider")},parser:{AsyncParser:me(t=>new jut(t),"AsyncParser"),GrammarConfig:me(t=>Ltt(t),"GrammarConfig"),LangiumParser:me(t=>yct(t),"LangiumParser"),CompletionParser:me(t=>fct(t),"CompletionParser"),ValueConverter:me(()=>new bct,"ValueConverter"),TokenBuilder:me(()=>new xct,"TokenBuilder"),Lexer:me(t=>new put(t),"Lexer"),ParserErrorMessageProvider:me(()=>new Ylt,"ParserErrorMessageProvider"),LexerErrorMessageProvider:me(()=>new uut,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:me(()=>new Yht,"AstNodeLocator"),AstNodeDescriptionProvider:me(t=>new jht(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:me(t=>new Wht(t),"ReferenceDescriptionProvider")},references:{Linker:me(t=>new eht(t),"Linker"),NameProvider:me(()=>new lht,"NameProvider"),ScopeProvider:me(t=>new wht(t),"ScopeProvider"),ScopeComputation:me(t=>new dht(t),"ScopeComputation"),References:me(t=>new cht(t),"References")},serializer:{Hydrator:me(t=>new Vut(t),"Hydrator"),JsonSerializer:me(t=>new Iht(t),"JsonSerializer")},validation:{DocumentValidator:me(t=>new Uht(t),"DocumentValidator"),ValidationRegistry:me(t=>new Bht(t),"ValidationRegistry")},shared:me(()=>t.shared,"shared")}}function rdt(e){return{ServiceRegistry:me(t=>new Rht(t),"ServiceRegistry"),workspace:{LangiumDocuments:me(t=>new Jct(t),"LangiumDocuments"),LangiumDocumentFactory:me(t=>new Qct(t),"LangiumDocumentFactory"),DocumentBuilder:me(t=>new Xht(t),"DocumentBuilder"),IndexManager:me(t=>new Kht(t),"IndexManager"),WorkspaceManager:me(t=>new Zht(t),"WorkspaceManager"),FileSystemProvider:me(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:me(()=>new Hut,"WorkspaceLock"),ConfigurationProvider:me(t=>new Hht(t),"ConfigurationProvider")}}}var ndt=t(()=>{Ntt(),mct(),kct(),Tct(),Ect(),sht(),kht(),Tht(),Cht(),Aht(),Mht(),Dht(),Qht(),Fht(),Jht(),tut(),nut(),aut(),aht(),sut(),out(),gut(),Kut(),Zut(),Klt(),Qut(),Jut(),tdt(),me(edt,"createDefaultCoreModule"),me(rdt,"createDefaultSharedCoreModule")});function idt(t,e,r,n,i,a,s,o,l){return sdt([t,e,r,n,i,a,s,o,l].reduce(ldt,{}))}function adt(t){if(t&&t[hdt])for(var e of Object.values(t))adt(e);return t}function sdt(r,n){let i=new Proxy({},{deleteProperty:me(()=>!1,"deleteProperty"),set:me(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:me((t,e)=>e===hdt||odt(t,e,r,n||i),"get"),getOwnPropertyDescriptor:me((t,e)=>(odt(t,e,r,n||i),Object.getOwnPropertyDescriptor(t,e)),"getOwnPropertyDescriptor"),has:me((t,e)=>e in r,"has"),ownKeys:me(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return i}function odt(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===udt)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in r){r=r[e],t[e]=udt;try{t[e]="function"==typeof r?r(n):sdt(r,n)}catch(r){throw t[e]=r instanceof Error?r:void 0,r}return t[e]}}function ldt(t,e){if(e)for(var[r,n]of Object.entries(e)){var i;void 0!==n&&(null!==(i=t[r])&&null!==n&&"object"==typeof i&&"object"==typeof n?t[r]=ldt(i,n):t[r]=n)}return t}var cdt,hdt,udt,ddt,pdt,gdt,fdt,mdt,ydt,vdt=t(()=>{(cdt=cdt||{}).merge=(t,e)=>ldt(ldt({},t),e),me(idt,"inject"),hdt=Symbol("isProxy"),me(adt,"eagerLoad"),me(sdt,"_inject"),udt=Symbol(),me(odt,"_resolve"),me(ldt,"_merge")}),xdt=t(()=>{}),bdt=t(()=>{Zut(),Kut(),Xut()}),wdt=t(()=>{}),kdt=t(()=>{Ntt(),wdt()}),Tdt=t(()=>{zat(),Tct(),gut(),ddt={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(pdt=pdt||{}).REGULAR="indentation-sensitive",pdt.IGNORE_INDENTATION="ignore-indentation",gdt=class extends xct{static{me(this,"IndentationAwareTokenBuilder")}constructor(t=ddt){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},ddt),t),this.indentTokenType=Krt({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Krt({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(t,e){var r;if(!lut(t=super.buildTokens(t,e)))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 t){for(var[u,d]of s)r.name===u?r.PUSH_MODE=pdt.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{}),Cdt=t(()=>{Qut(),mct(),$lt(),Tdt(),kct(),Klt(),gut(),gct(),Edt(),Tct(),Ect()}),_dt=t(()=>{sht(),kht(),Tht(),_ht(),Cht(),Aht()}),Sdt=t(()=>{tdt(),Mht()}),Adt=t(()=>{mdt=class{static{me(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},ydt={fileSystemProvider:me(()=>new mdt,"fileSystemProvider")}});function Ldt(){var t=idt(rdt(ydt),Rdt),e=idt(edt({shared:t}),Idt);return t.ServiceRegistry.register(e),e}function Ndt(t){var e=Ldt(),t=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(t,Vct.parse(`memory://${null!=(e=t.name)?e:"grammar"}.langium`)),t}var Idt,Rdt,Mdt=t(()=>{ndt(),vdt(),HQ(),Adt(),iht(),Idt={Grammar:me(()=>{},"Grammar"),LanguageMetaData:me(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Rdt={AstReflection:me(()=>new WQ,"AstReflection")},me(Ldt,"createMinimalGrammarServices"),me(Ndt,"loadGrammarFromJson")}),Ddt={},Odt=(oPt(Ddt,{AstUtils:()=>VQ,BiMap:()=>uht,Cancellation:()=>Lct,ContextCache:()=>vht,CstUtils:()=>IK,DONE_RESULT:()=>SK,Deferred:()=>$ct,Disposable:()=>Vht,DisposableCache:()=>mht,DocumentCache:()=>xht,EMPTY_STREAM:()=>_K,ErrorWithLocation:()=>eZ,GrammarUtils:()=>qJ,MultiMap:()=>hht,OperationCancelled:()=>Fct,Reduction:()=>LK,RegExpUtils:()=>LJ,SimpleCache:()=>yht,StreamImpl:()=>CK,TreeStreamImpl:()=>AK,URI:()=>Vct,UriUtils:()=>Kct,WorkspaceCache:()=>bht,assertUnreachable:()=>tZ,delayNextTick:()=>Ict,interruptAndCheck:()=>Oct,isOperationCancelled:()=>Dct,loadGrammarFromJson:()=>Ndt,setInterruptionPeriod:()=>Mct,startCancelableOperation:()=>Rct,stream:()=>EK}),t(()=>{Sht(),rut(),Y(Ddt,eut),Eht(),iut(),rZ(),Mdt(),zct(),NK(),iht(),cJ(),Nct(),JK(),Att(),UJ()})),Pdt=t(()=>{Qht(),Fht()}),Bdt=t(()=>{Jht(),tut(),nut(),aut(),aht(),Adt(),sut(),Jut(),out()}),Fdt={},$dt=(oPt(Fdt,{AbstractAstReflection:()=>bK,AbstractCstNode:()=>Ilt,AbstractLangiumParser:()=>qlt,AbstractParserErrorMessageProvider:()=>Wlt,AbstractThreadedAsyncParser:()=>Wut,AstUtils:()=>VQ,BiMap:()=>uht,Cancellation:()=>Lct,CompositeCstNodeImpl:()=>Mlt,ContextCache:()=>vht,CstNodeBuilder:()=>Nlt,CstUtils:()=>IK,DEFAULT_TOKENIZE_OPTIONS:()=>dut,DONE_RESULT:()=>SK,DatatypeSymbol:()=>Glt,DefaultAstNodeDescriptionProvider:()=>jht,DefaultAstNodeLocator:()=>Yht,DefaultAsyncParser:()=>jut,DefaultCommentProvider:()=>qut,DefaultConfigurationProvider:()=>Hht,DefaultDocumentBuilder:()=>Xht,DefaultDocumentValidator:()=>Uht,DefaultHydrator:()=>Vut,DefaultIndexManager:()=>Kht,DefaultJsonSerializer:()=>Iht,DefaultLangiumDocumentFactory:()=>Qct,DefaultLangiumDocuments:()=>Jct,DefaultLexer:()=>put,DefaultLexerErrorMessageProvider:()=>uut,DefaultLinker:()=>eht,DefaultNameProvider:()=>lht,DefaultReferenceDescriptionProvider:()=>Wht,DefaultReferences:()=>cht,DefaultScopeComputation:()=>dht,DefaultScopeProvider:()=>wht,DefaultServiceRegistry:()=>Rht,DefaultTokenBuilder:()=>xct,DefaultValueConverter:()=>bct,DefaultWorkspaceLock:()=>Hut,DefaultWorkspaceManager:()=>Zht,Deferred:()=>$ct,Disposable:()=>Vht,DisposableCache:()=>mht,DocumentCache:()=>xht,DocumentState:()=>Zct,DocumentValidator:()=>qht,EMPTY_SCOPE:()=>fht,EMPTY_STREAM:()=>_K,EmptyFileSystem:()=>ydt,EmptyFileSystemProvider:()=>mdt,ErrorWithLocation:()=>eZ,GrammarAST:()=>nZ,GrammarUtils:()=>qJ,IndentationAwareLexer:()=>fdt,IndentationAwareTokenBuilder:()=>gdt,JSDocDocumentationProvider:()=>Uut,LangiumCompletionParser:()=>Hlt,LangiumParser:()=>jlt,LangiumParserErrorMessageProvider:()=>Ylt,LeafCstNodeImpl:()=>Rlt,LexingMode:()=>pdt,MapScope:()=>ght,Module:()=>cdt,MultiMap:()=>hht,OperationCancelled:()=>Fct,ParserWorker:()=>Yut,Reduction:()=>LK,RegExpUtils:()=>LJ,RootCstNodeImpl:()=>Olt,SimpleCache:()=>yht,StreamImpl:()=>CK,StreamScope:()=>pht,TextDocument:()=>Hct,TreeStreamImpl:()=>AK,URI:()=>Vct,UriUtils:()=>Kct,ValidationCategory:()=>Pht,ValidationRegistry:()=>Bht,ValueConverter:()=>wct,WorkspaceCache:()=>bht,assertUnreachable:()=>tZ,createCompletionParser:()=>fct,createDefaultCoreModule:()=>edt,createDefaultSharedCoreModule:()=>rdt,createGrammarConfig:()=>Ltt,createLangiumParser:()=>yct,createParser:()=>Zlt,delayNextTick:()=>Ict,diagnosticData:()=>Oht,eagerLoad:()=>adt,getDiagnosticRange:()=>$ht,indentationBuilderDefaultOptions:()=>ddt,inject:()=>idt,interruptAndCheck:()=>Oct,isAstNode:()=>pK,isAstNodeDescription:()=>fK,isAstNodeWithComment:()=>Lht,isCompositeCstNode:()=>yK,isIMultiModeLexerDefinition:()=>cut,isJSDoc:()=>mut,isLeafCstNode:()=>vK,isLinkingError:()=>mK,isNamed:()=>oht,isOperationCancelled:()=>Dct,isReference:()=>gK,isRootCstNode:()=>xK,isTokenTypeArray:()=>lut,isTokenTypeDictionary:()=>hut,loadGrammarFromJson:()=>Ndt,parseJSDoc:()=>fut,prepareLangiumParser:()=>vct,setInterruptionPeriod:()=>Mct,startCancelableOperation:()=>Rct,stream:()=>EK,toDiagnosticData:()=>Ght,toDiagnosticSeverity:()=>zht}),t(()=>{ndt(),vdt(),Dht(),xdt(),wK(),bdt(),kdt(),Cdt(),_dt(),Sdt(),Odt(),Y(Fdt,Ddt),Pdt(),Bdt(),HQ()}));function zdt(t){return g0t.isInstance(t,Zdt)}function Gdt(t){return g0t.isInstance(t,Jdt)}function Udt(t){return g0t.isInstance(t,r0t)}function qdt(t){return g0t.isInstance(t,n0t)}function jdt(t){return g0t.isInstance(t,i0t)}function Wdt(t){return g0t.isInstance(t,s0t)}function Ydt(t){return g0t.isInstance(t,l0t)}function Hdt(t){return g0t.isInstance(t,c0t)}function Vdt(t){return g0t.isInstance(t,"Pie")}function Xdt(t){return g0t.isInstance(t,h0t)}var Kdt,s,Zdt,Qdt,Jdt,t0t,e0t,r0t,n0t,i0t,a0t,s0t,o0t,l0t,c0t,h0t,u0t,d0t,p0t,g0t,f0t,m0t,y0t,v0t,x0t,b0t,w0t,k0t,T0t,E0t,C0t,_0t,S0t,A0t,L0t,N0t,I0t,R0t,M0t,D0t,O0t,P0t,B0t,F0t,$0t,z0t,G0t,U0t,q0t,j0t=t(()=>{$dt(),$dt(),$dt(),$dt(),Kdt=Object.defineProperty,s=me((t,e)=>Kdt(t,"name",{value:e,configurable:!0}),"__name"),Zdt="Architecture",me(zdt,"isArchitecture"),s(zdt,"isArchitecture"),Qdt="Axis",Jdt="Branch",me(Gdt,"isBranch"),s(Gdt,"isBranch"),t0t="Checkout",e0t="CherryPicking",r0t="Commit",me(Udt,"isCommit"),s(Udt,"isCommit"),n0t="GitGraph",me(qdt,"isGitGraph"),s(qdt,"isGitGraph"),i0t="Info",me(jdt,"isInfo"),s(jdt,"isInfo"),a0t="Junction",s0t="Merge",me(Wdt,"isMerge"),s(Wdt,"isMerge"),o0t="Option",l0t="Packet",me(Ydt,"isPacket"),s(Ydt,"isPacket"),c0t="PacketBlock",me(Hdt,"isPacketBlock"),s(Hdt,"isPacketBlock"),me(Vdt,"isPie"),s(Vdt,"isPie"),h0t="PieSection",me(Xdt,"isPieSection"),s(Xdt,"isPieSection"),u0t="Service",d0t="Direction",p0t=class extends bK{static{me(this,"MermaidAstReflection")}static{s(this,"MermaidAstReflection")}getAllTypes(){return[Zdt,Qdt,Jdt,t0t,e0t,r0t,"Curve",d0t,"Edge","Entry",n0t,"Group",i0t,a0t,s0t,o0t,l0t,c0t,"Pie",h0t,"Radar",u0t,"Statement"]}computeIsSubtype(t,e){switch(t){case Jdt:case t0t:case e0t:case r0t:case s0t:return this.isSubtype("Statement",e);case d0t:return this.isSubtype(n0t,e);default:return!1}}getReferenceType(t){if("Entry:axis"!=(t=t.container.$type+":"+t.property))throw new Error(t+" is not a valid reference id.");return Qdt}getTypeMetaData(t){switch(t){case Zdt:return{name:Zdt,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case Qdt:return{name:Qdt,properties:[{name:"label"},{name:"name"}]};case Jdt:return{name:Jdt,properties:[{name:"name"},{name:"order"}]};case t0t:return{name:t0t,properties:[{name:"branch"}]};case e0t:return{name:e0t,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case r0t:return{name:r0t,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 n0t:return{name:n0t,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 i0t:return{name:i0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case a0t:return{name:a0t,properties:[{name:"id"},{name:"in"}]};case s0t:return{name:s0t,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case o0t:return{name:o0t,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case l0t:return{name:l0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case c0t:return{name:c0t,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 h0t:return{name:h0t,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 u0t:return{name:u0t,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case d0t:return{name:d0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},g0t=new p0t,m0t=s(()=>f0t=f0t??Ndt(`{"$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"),v0t=s(()=>y0t=y0t??Ndt(`{"$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":"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"),b0t=s(()=>x0t=x0t??Ndt(`{"$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"),k0t=s(()=>w0t=w0t??Ndt(`{"$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"),E0t=s(()=>T0t=T0t??Ndt(`{"$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"),_0t=s(()=>C0t=C0t??Ndt(`{"$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"),R0t={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(I0t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(N0t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(L0t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(A0t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(S0t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},M0t={AstReflection:s(()=>new p0t,"AstReflection")},D0t={Grammar:s(()=>m0t(),"Grammar"),LanguageMetaData:s(()=>S0t,"LanguageMetaData"),parser:{}},O0t={Grammar:s(()=>v0t(),"Grammar"),LanguageMetaData:s(()=>A0t,"LanguageMetaData"),parser:{}},P0t={Grammar:s(()=>b0t(),"Grammar"),LanguageMetaData:s(()=>L0t,"LanguageMetaData"),parser:{}},B0t={Grammar:s(()=>k0t(),"Grammar"),LanguageMetaData:s(()=>N0t,"LanguageMetaData"),parser:{}},F0t={Grammar:s(()=>E0t(),"Grammar"),LanguageMetaData:s(()=>I0t,"LanguageMetaData"),parser:{}},$0t={Grammar:s(()=>_0t(),"Grammar"),LanguageMetaData:s(()=>R0t,"LanguageMetaData"),parser:{}},z0t={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},G0t=class extends bct{static{me(this,"AbstractMermaidValueConverter")}static{s(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){var n=this.runCommonConverter(t,e,r);return void 0===(n=void 0===n?this.runCustomConverter(t,e,r):n)?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){return void 0!==(t=z0t[t.name])&&null!==(t=t.exec(e))?void 0!==t[1]?t[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==t[2]?t[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`):void 0:void 0}},U0t=class extends G0t{static{me(this,"CommonValueConverter")}static{s(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},q0t=class extends xct{static{me(this,"AbstractMermaidTokenBuilder")}static{s(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){return(t=super.buildKeywordTokens(t,e,r)).forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),t}},class extends q0t{static{me(this,"CommonTokenBuilder")}static{s(this,"CommonTokenBuilder")}}});function W0t(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),F0t,H0t);return t.ServiceRegistry.register(e),{shared:t,GitGraph:e}}var Y0t,H0t,V0t=t(()=>{j0t(),$dt(),Y0t=class extends q0t{static{me(this,"GitGraphTokenBuilder")}static{s(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},H0t={parser:{TokenBuilder:s(()=>new Y0t,"TokenBuilder"),ValueConverter:s(()=>new U0t,"ValueConverter")}},me(W0t,"createGitGraphServices"),s(W0t,"createGitGraphServices")});function X0t(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),D0t,Z0t);return t.ServiceRegistry.register(e),{shared:t,Info:e}}var K0t,Z0t,Q0t=t(()=>{j0t(),$dt(),K0t=class extends q0t{static{me(this,"InfoTokenBuilder")}static{s(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},Z0t={parser:{TokenBuilder:s(()=>new K0t,"TokenBuilder"),ValueConverter:s(()=>new U0t,"ValueConverter")}},me(X0t,"createInfoServices"),s(X0t,"createInfoServices")});function J0t(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),O0t,ept);return t.ServiceRegistry.register(e),{shared:t,Packet:e}}var tpt,ept,rpt=t(()=>{j0t(),$dt(),tpt=class extends q0t{static{me(this,"PacketTokenBuilder")}static{s(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},ept={parser:{TokenBuilder:s(()=>new tpt,"TokenBuilder"),ValueConverter:s(()=>new U0t,"ValueConverter")}},me(J0t,"createPacketServices"),s(J0t,"createPacketServices")});function npt(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),P0t,spt);return t.ServiceRegistry.register(e),{shared:t,Pie:e}}var ipt,apt,spt,opt=t(()=>{j0t(),$dt(),ipt=class extends q0t{static{me(this,"PieTokenBuilder")}static{s(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},apt=class extends G0t{static{me(this,"PieValueConverter")}static{s(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},spt={parser:{TokenBuilder:s(()=>new ipt,"TokenBuilder"),ValueConverter:s(()=>new apt,"ValueConverter")}},me(npt,"createPieServices"),s(npt,"createPieServices")});function lpt(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),B0t,upt);return t.ServiceRegistry.register(e),{shared:t,Architecture:e}}var cpt,hpt,upt,dpt=t(()=>{j0t(),$dt(),cpt=class extends q0t{static{me(this,"ArchitectureTokenBuilder")}static{s(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},hpt=class extends G0t{static{me(this,"ArchitectureValueConverter")}static{s(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){return"ARCH_ICON"===t.name?e.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===t.name?e.replace(/["()]/g,""):"ARCH_TITLE"===t.name?e.replace(/[[\]]/g,"").trim():void 0}},upt={parser:{TokenBuilder:s(()=>new cpt,"TokenBuilder"),ValueConverter:s(()=>new hpt,"ValueConverter")}},me(lpt,"createArchitectureServices"),s(lpt,"createArchitectureServices")});function ppt(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),$0t,fpt);return t.ServiceRegistry.register(e),{shared:t,Radar:e}}var gpt,fpt,mpt=t(()=>{j0t(),$dt(),gpt=class extends q0t{static{me(this,"RadarTokenBuilder")}static{s(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},fpt={parser:{TokenBuilder:s(()=>new gpt,"TokenBuilder"),ValueConverter:s(()=>new U0t,"ValueConverter")}},me(ppt,"createRadarServices"),s(ppt,"createRadarServices")}),ypt={},vpt=(oPt(ypt,{InfoModule:()=>Z0t,createInfoServices:()=>X0t}),t(()=>{Q0t(),j0t()})),xpt={},bpt=(oPt(xpt,{PacketModule:()=>ept,createPacketServices:()=>J0t}),t(()=>{rpt(),j0t()})),wpt={},kpt=(oPt(wpt,{PieModule:()=>spt,createPieServices:()=>npt}),t(()=>{opt(),j0t()})),Tpt={},Ept=(oPt(Tpt,{ArchitectureModule:()=>upt,createArchitectureServices:()=>lpt}),t(()=>{dpt(),j0t()})),Cpt={},_pt=(oPt(Cpt,{GitGraphModule:()=>H0t,createGitGraphServices:()=>W0t}),t(()=>{V0t(),j0t()})),Spt={},Apt=(oPt(Spt,{RadarModule:()=>fpt,createRadarServices:()=>ppt}),t(()=>{mpt(),j0t()}));async function Lpt(t,e){var r=Ipt[t];if(!r)throw new Error("Unknown diagram type: "+t);if(Npt[t]||await r(),0<(r=Npt[t].parse(e)).lexerErrors.length||0{V0t(),Q0t(),rpt(),opt(),dpt(),mpt(),j0t(),Npt={},Ipt={info:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(vpt(),ypt))).createInfoServices)().Info.parser.LangiumParser;Npt.info=t},"info"),packet:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(bpt(),xpt))).createPacketServices)().Packet.parser.LangiumParser;Npt.packet=t},"packet"),pie:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(kpt(),wpt))).createPieServices)().Pie.parser.LangiumParser;Npt.pie=t},"pie"),architecture:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(Ept(),Tpt))).createArchitectureServices)().Architecture.parser.LangiumParser;Npt.architecture=t},"architecture"),gitGraph:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(_pt(),Cpt))).createGitGraphServices)().GitGraph.parser.LangiumParser;Npt.gitGraph=t},"gitGraph"),radar:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(Apt(),Spt))).createRadarServices)().Radar.parser.LangiumParser;Npt.radar=t},"radar")},me(Lpt,"parse"),s(Lpt,"parse"),Rpt=class extends Error{static{me(this,"MermaidParseError")}constructor(t){super(`Parsing failed: ${t.lexerErrors.map(t=>t.message).join(` `)} `+t.parserErrors.map(t=>t.message).join(` -`)),this.result=t}static{s(this,"MermaidParseError")}}});function Mpt(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var Dpt,Opt,Ppt=t(()=>{me(Mpt,"populateCommonDb")}),Bpt=t(()=>{Dpt={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),Fpt=t(()=>{Opt=class{constructor(t){this.init=t,this.records=this.init()}static{me(this,"ImperativeState")}reset(){this.records=this.init()}}});function $pt(){return OE({length:7})}function zpt(t,i){let n=Object.create(null);return t.reduce((t,e)=>{var r=i(e);return n[r]||(n[r]=!0,t.push(e)),t},[])}function Gpt(t,e,r){-1===(e=t.indexOf(e))?t.push(r):t.splice(e,1,r)}function Upt(t){let e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]),r="";t.forEach(function(t){t===e?r+="\t*":r+="\t|"});var i,n=[r,e.id,e.seq];for(i in b.records.branches)b.records.branches.get(i)===e.id&&n.push(i);if(M.debug(n.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){var a=b.records.commits.get(e.parents[0]);Gpt(t,e,a),e.parents[1]&&t.push(b.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;e.parents[0]&&(a=b.records.commits.get(e.parents[0]),Gpt(t,e,a))}Upt(t=zpt(t,t=>t.id))}var qpt,jpt,b,Wpt,Ypt,Hpt,Vpt,Xpt,Kpt,Zpt,Qpt,Jpt,tgt,egt,rgt,igt,ngt,agt,sgt,ogt,lgt,cgt,hgt,ugt,dgt,pgt,ggt,fgt,mgt,ygt,vgt,xgt,bgt,wgt,kgt,Tgt,Egt,Cgt,_gt,Sgt,Agt,Lgt,Ngt,Igt,Rgt,Mgt,Dgt,Ogt,Pgt,Bgt,Fgt,$gt,zgt,Ggt,Ugt,qgt,jgt,Wgt,Ygt,Hgt,Vgt,Xgt,Kgt=t(()=>{e(),KE(),Ai(),Jc(),gu(),Bpt(),Fpt(),_i(),qpt=mr.gitGraph,jpt=me(()=>xE({...qpt,...Nr().gitGraph}),"getConfig"),b=new Opt(()=>{var t=(e=jpt()).mainBranchName,e=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:e}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}}),me($pt,"getID"),me(zpt,"uniqBy"),Wpt=me(function(t){b.records.direction=t},"setDirection"),Ypt=me(function(t){M.debug("options str",t),t=t?.trim()||"{}";try{b.records.options=JSON.parse(t)}catch(t){M.error("error while parsing gitGraph options",t.message)}},"setOptions"),Hpt=me(function(){return b.records.options},"getOptions"),Vpt=me(function(t){let e=t.msg,r=t.id,i=t.type,n=t.tags,a=(M.info("commit",e,r,i,n),M.debug("Entering commit:",e,r,i,n),jpt());r=L.sanitizeText(r,a),e=L.sanitizeText(e,a),n=n?.map(t=>L.sanitizeText(t,a)),t={id:r||b.records.seq+"-"+$pt(),message:e,seq:b.records.seq++,type:i??Dpt.NORMAL,tags:n??[],parents:null==b.records.head?[]:[b.records.head.id],branch:b.records.currBranch},b.records.head=t,M.info("main branch",a.mainBranchName),b.records.commits.set(t.id,t),b.records.branches.set(b.records.currBranch,t.id),M.debug("in pushCommit "+t.id)},"commit"),Xpt=me(function(t){var e=t.name,t=t.order,e=L.sanitizeText(e,jpt());if(b.records.branches.has(e))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 ${e}")`);b.records.branches.set(e,null!=b.records.head?b.records.head.id:null),b.records.branchConfig.set(e,{name:e,order:t}),Qpt(e),M.debug("in createBranch")},"branch"),Kpt=me(t=>{var e=t.branch,r=t.id,i=t.type,n=t.tags,a=jpt(),e=L.sanitizeText(e,a),r=r&&L.sanitizeText(r,a),t=b.records.branches.get(b.records.currBranch),a=b.records.branches.get(e),t=t?b.records.commits.get(t):void 0,s=a?b.records.commits.get(a):void 0;if(t&&s&&t.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(b.records.currBranch===e)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(void 0===t||!t)throw(o=new Error(`Incorrect usage of "merge". Current branch (${b.records.currBranch})has no commits`)).hash={text:"merge "+e,token:"merge "+e,expected:["commit"]},o;if(!b.records.branches.has(e))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist")).hash={text:"merge "+e,token:"merge "+e,expected:["branch "+e]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits")).hash={text:"merge "+e,token:"merge "+e,expected:['"commit"']},o;if(t===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(r&&b.records.commits.has(r))throw(t=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom Id")).hash={text:`merge ${e} ${r} ${i} `+n?.join(" "),token:`merge ${e} ${r} ${i} `+n?.join(" "),expected:[`merge ${e} ${r}_UNIQUE ${i} `+n?.join(" ")]},t;var s=a||"",o={id:r||b.records.seq+"-"+$pt(),message:`merged branch ${e} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,s],branch:b.records.currBranch,type:Dpt.MERGE,customType:i,customId:!!r,tags:n??[]};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"),Zpt=me(function(t){let e=t.id,r=t.targetId,i=t.tags,n=t.parent,a=(M.debug("Entering cherryPick:",e,r,i),jpt());if(e=L.sanitizeText(e,a),r=L.sanitizeText(r,a),i=i?.map(t=>L.sanitizeText(t,a)),n=L.sanitizeText(n,a),!e||!b.records.commits.has(e))throw(t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},t;if(void 0===(t=b.records.commits.get(e))||!t)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(t.parents)||!t.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var s=t.branch;if(t.type===Dpt.MERGE&&!n)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!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 ${e} `+r,token:`cherryPick ${e} `+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 ${e} `+r,token:`cherryPick ${e} `+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 ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;o={id:b.records.seq+"-"+$pt(),message:`cherry-picked ${t?.message} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,t.id],branch:b.records.currBranch,type:Dpt.CHERRY_PICK,tags:i?i.filter(Boolean):["cherry-pick:"+t.id+(t.type===Dpt.MERGE?"|parent:"+n:"")]},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"),Qpt=me(function(t){var e;if(t=L.sanitizeText(t,jpt()),!b.records.branches.has(t))throw(e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`)).hash={text:"checkout "+t,token:"checkout "+t,expected:["branch "+t]},e;b.records.currBranch=t,e=b.records.branches.get(b.records.currBranch),b.records.head=void 0!==e&&e?b.records.commits.get(e)??null:null},"checkout"),me(Gpt,"upsert"),me(Upt,"prettyPrintCommitHistory"),Jpt=me(function(){M.debug(b.records.commits),Upt([ngt()[0]])},"prettyPrint"),tgt=me(function(){b.reset(),oh()},"clear"),egt=me(function(){return[...b.records.branchConfig.values()].map((t,e)=>null!=t.order?t:{...t,order:parseFloat("0."+e)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),rgt=me(function(){return b.records.branches},"getBranches"),igt=me(function(){return b.records.commits},"getCommits"),ngt=me(function(){var t=[...b.records.commits.values()];return t.forEach(function(t){M.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),agt=me(function(){return b.records.currBranch},"getCurrentBranch"),sgt=me(function(){return b.records.direction},"getDirection"),ogt=me(function(){return b.records.head},"getHead"),lgt={commitType:Dpt,getConfig:jpt,setDirection:Wpt,setOptions:Ypt,getOptions:Hpt,commit:Vpt,branch:Xpt,merge:Kpt,cherryPick:Zpt,checkout:Qpt,prettyPrint:Jpt,clear:tgt,getBranchesAsObjArray:egt,getBranches:rgt,getCommits:igt,getCommitsArray:ngt,getCurrentBranch:agt,getDirection:sgt,getHead:ogt,setAccTitle:lh,getAccTitle:ch,getAccDescription:uh,setAccDescription:hh,setDiagramTitle:dh,getDiagramTitle:ph}}),Zgt=t(()=>{Rpt(),e(),Ppt(),Kgt(),Bpt(),cgt=me((t,e)=>{Mpt(t,e),t.dir&&e.setDirection(t.dir);for(var r of t.statements)hgt(r,e)},"populate"),hgt=me((t,e)=>{var r={Commit:me(t=>e.commit(ugt(t)),"Commit"),Branch:me(t=>e.branch(dgt(t)),"Branch"),Merge:me(t=>e.merge(pgt(t)),"Merge"),Checkout:me(t=>e.checkout(ggt(t)),"Checkout"),CherryPicking:me(t=>e.cherryPick(fgt(t)),"CherryPicking")}[t.$type];r?r(t):M.error("Unknown statement type: "+t.$type)},"parseStatement"),ugt=me(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?Dpt[t.type]:Dpt.NORMAL,tags:t.tags??void 0}),"parseCommit"),dgt=me(t=>({name:t.name,order:t.order??0}),"parseBranch"),pgt=me(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?Dpt[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),ggt=me(t=>t.branch,"parseCheckout"),fgt=me(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),mgt={parse:me(async t=>{t=await Apt("gitGraph",t),M.debug(t),cgt(t,lgt)},"parse")}}),Qgt=t(()=>{Z3(),fu(),e(),KE(),Bpt(),Ygt=D(),ygt=Ygt?.gitGraph,vgt=new Map,xgt=new Map,bgt=new Map,wgt=[],kgt=0,Tgt="LR",Egt=me(()=>{vgt.clear(),xgt.clear(),bgt.clear(),kgt=0,wgt=[],Tgt="LR"},"clear"),Cgt=me(t=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach(t=>{var e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),_gt=me(t=>{let r,i,n;return n="BT"===Tgt?(i=me((t,e)=>t<=e,"comparisonFunc"),1/0):(i=me((t,e)=>e<=t,"comparisonFunc"),0),t.forEach(t=>{var e="TB"===Tgt||"BT"==Tgt?xgt.get(t)?.y:xgt.get(t)?.x;void 0!==e&&i(e,n)&&(r=t,n=e)}),r},"findClosestParent"),Sgt=me(t=>{let r="",i=1/0;return t.forEach(t=>{var e=xgt.get(t).y;e<=i&&(r=t,i=e)}),r||void 0},"findClosestParentBT"),Agt=me((t,i,e)=>{let n=e,a=e,r=[];t.forEach(t=>{var e=i.get(t);if(!e)throw new Error("Commit not found for key "+t);e.parents.length?(n=Ngt(e),a=Math.max(n,a)):r.push(e),Igt(e,n)}),n=a,r.forEach(t=>{Rgt(t,n,e)}),t.forEach(t=>{var e,r;(t=i.get(t))?.parents.length&&(e=Sgt(t.parents),(n=xgt.get(e).y-40)<=a&&(a=n),e=vgt.get(t.branch).pos,r=n-10,xgt.set(t.id,{x:e,y:r}))})},"setParallelBTPos"),Lgt=me(t=>{var e=_gt(t.parents.filter(t=>null!==t));if(!e)throw new Error("Closest parent not found for commit "+t.id);if(void 0===(e=xgt.get(e)?.y))throw new Error("Closest parent position not found for commit "+t.id);return e},"findClosestParentPos"),Ngt=me(t=>Lgt(t)+40,"calculateCommitPosition"),Igt=me((t,e)=>{var r=vgt.get(t.branch);if(r)return r=r.pos,xgt.set(t.id,{x:r,y:e+=10}),{x:r,y:e};throw new Error("Branch not found for commit "+t.id)},"setCommitPosition"),Rgt=me((t,e,r)=>{var i=vgt.get(t.branch);if(!i)throw new Error("Branch not found for commit "+t.id);i=i.pos,xgt.set(t.id,{x:i,y:e+r})},"setRootPosition"),Mgt=me((t,e,r,i,n,a)=>{var s;a===Dpt.HIGHLIGHT?(t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${n%8} ${i}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${n%8} ${i}-inner`)):a===Dpt.CHERRY_PICK?(t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} `+i),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+i),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+i),t.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 ${e.id} `+i),t.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 ${e.id} `+i)):((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===Dpt.MERGE?9:10),s.attr("class",`commit ${e.id} commit`+n%8),a===Dpt.MERGE&&((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${i} ${e.id} commit`+n%8)),a===Dpt.REVERSE&&t.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 ${i} ${e.id} commit`+n%8))},"drawCommitBullet"),Dgt=me((t,e,r,i)=>{var n,a;e.type!==Dpt.CHERRY_PICK&&(e.customId&&e.type===Dpt.MERGE||e.type!==Dpt.MERGE)&&ygt?.showCommitLabel&&(a=(t=t.append("g")).insert("rect").attr("class","commit-label-bkg"),n=(e=t.append("text").attr("x",i).attr("y",r.y+25).attr("class","commit-label").text(e.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-n.width/2-2).attr("y",r.y+13.5).attr("width",n.width+4).attr("height",n.height+4),"TB"===Tgt||"BT"===Tgt?(a.attr("x",r.x-(n.width+16+5)).attr("y",r.y-12),e.attr("x",r.x-(n.width+16)).attr("y",r.y+n.height-12)):e.attr("x",r.posWithOffset-n.width/2),ygt.rotateCommitLabel)&&("TB"===Tgt||"BT"===Tgt?(e.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(e=-7.5-(n.width+10)/25*9.5,a=10+n.width/25*8.5,t.attr("transform","translate("+e+", "+a+") rotate(-45, "+i+", "+r.y+")")))},"drawCommitLabel"),Ogt=me((n,a,s,o)=>{if(0{me(Dpt,"populateCommonDb")}),Fpt=t(()=>{Opt={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),$pt=t(()=>{Ppt=class{constructor(t){this.init=t,this.records=this.init()}static{me(this,"ImperativeState")}reset(){this.records=this.init()}}});function zpt(){return PE({length:7})}function Gpt(t,n){let i=Object.create(null);return t.reduce((t,e)=>{var r=n(e);return i[r]||(i[r]=!0,t.push(e)),t},[])}function Upt(t,e,r){-1===(e=t.indexOf(e))?t.push(r):t.splice(e,1,r)}function qpt(t){let e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]),r="";t.forEach(function(t){t===e?r+="\t*":r+="\t|"});var n,i=[r,e.id,e.seq];for(n in b.records.branches)b.records.branches.get(n)===e.id&&i.push(n);if(M.debug(i.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){var a=b.records.commits.get(e.parents[0]);Upt(t,e,a),e.parents[1]&&t.push(b.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;e.parents[0]&&(a=b.records.commits.get(e.parents[0]),Upt(t,e,a))}qpt(t=Gpt(t,t=>t.id))}var jpt,Wpt,b,Ypt,Hpt,Vpt,Xpt,Kpt,Zpt,Qpt,Jpt,tgt,egt,rgt,ngt,igt,agt,sgt,ogt,lgt,cgt,hgt,ugt,dgt,pgt,ggt,fgt,mgt,ygt,vgt,xgt,bgt,wgt,kgt,Tgt,Egt,Cgt,_gt,Sgt,Agt,Lgt,Ngt,Igt,Rgt,Mgt,Dgt,Ogt,Pgt,Bgt,Fgt,$gt,zgt,Ggt,Ugt,qgt,jgt,Wgt,Ygt,Hgt,Vgt,Xgt,Kgt,Zgt=t(()=>{e(),ZE(),Nn(),th(),fu(),Fpt(),$pt(),An(),jpt=yr.gitGraph,Wpt=me(()=>bE({...jpt,...Ir().gitGraph}),"getConfig"),b=new Ppt(()=>{var t=(e=Wpt()).mainBranchName,e=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:e}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}}),me(zpt,"getID"),me(Gpt,"uniqBy"),Ypt=me(function(t){b.records.direction=t},"setDirection"),Hpt=me(function(t){M.debug("options str",t),t=t?.trim()||"{}";try{b.records.options=JSON.parse(t)}catch(t){M.error("error while parsing gitGraph options",t.message)}},"setOptions"),Vpt=me(function(){return b.records.options},"getOptions"),Xpt=me(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags,a=(M.info("commit",e,r,n,i),M.debug("Entering commit:",e,r,n,i),Wpt());r=L.sanitizeText(r,a),e=L.sanitizeText(e,a),i=i?.map(t=>L.sanitizeText(t,a)),t={id:r||b.records.seq+"-"+zpt(),message:e,seq:b.records.seq++,type:n??Opt.NORMAL,tags:i??[],parents:null==b.records.head?[]:[b.records.head.id],branch:b.records.currBranch},b.records.head=t,M.info("main branch",a.mainBranchName),b.records.commits.set(t.id,t),b.records.branches.set(b.records.currBranch,t.id),M.debug("in pushCommit "+t.id)},"commit"),Kpt=me(function(t){var e=t.name,t=t.order,e=L.sanitizeText(e,Wpt());if(b.records.branches.has(e))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 ${e}")`);b.records.branches.set(e,null!=b.records.head?b.records.head.id:null),b.records.branchConfig.set(e,{name:e,order:t}),Jpt(e),M.debug("in createBranch")},"branch"),Zpt=me(t=>{var e=t.branch,r=t.id,n=t.type,i=t.tags,a=Wpt(),e=L.sanitizeText(e,a),r=r&&L.sanitizeText(r,a),t=b.records.branches.get(b.records.currBranch),a=b.records.branches.get(e),t=t?b.records.commits.get(t):void 0,s=a?b.records.commits.get(a):void 0;if(t&&s&&t.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(b.records.currBranch===e)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(void 0===t||!t)throw(o=new Error(`Incorrect usage of "merge". Current branch (${b.records.currBranch})has no commits`)).hash={text:"merge "+e,token:"merge "+e,expected:["commit"]},o;if(!b.records.branches.has(e))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist")).hash={text:"merge "+e,token:"merge "+e,expected:["branch "+e]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits")).hash={text:"merge "+e,token:"merge "+e,expected:['"commit"']},o;if(t===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(r&&b.records.commits.has(r))throw(t=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id")).hash={text:`merge ${e} ${r} ${n} `+i?.join(" "),token:`merge ${e} ${r} ${n} `+i?.join(" "),expected:[`merge ${e} ${r}_UNIQUE ${n} `+i?.join(" ")]},t;var s=a||"",o={id:r||b.records.seq+"-"+zpt(),message:`merged branch ${e} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,s],branch:b.records.currBranch,type:Opt.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"),Qpt=me(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent,a=(M.debug("Entering cherryPick:",e,r,n),Wpt());if(e=L.sanitizeText(e,a),r=L.sanitizeText(r,a),n=n?.map(t=>L.sanitizeText(t,a)),i=L.sanitizeText(i,a),!e||!b.records.commits.has(e))throw(t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},t;if(void 0===(t=b.records.commits.get(e))||!t)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(t.parents)||!t.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var s=t.branch;if(t.type===Opt.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 ${e} `+r,token:`cherryPick ${e} `+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 ${e} `+r,token:`cherryPick ${e} `+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 ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;o={id:b.records.seq+"-"+zpt(),message:`cherry-picked ${t?.message} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,t.id],branch:b.records.currBranch,type:Opt.CHERRY_PICK,tags:n?n.filter(Boolean):["cherry-pick:"+t.id+(t.type===Opt.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"),Jpt=me(function(t){var e;if(t=L.sanitizeText(t,Wpt()),!b.records.branches.has(t))throw(e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`)).hash={text:"checkout "+t,token:"checkout "+t,expected:["branch "+t]},e;b.records.currBranch=t,e=b.records.branches.get(b.records.currBranch),b.records.head=void 0!==e&&e?b.records.commits.get(e)??null:null},"checkout"),me(Upt,"upsert"),me(qpt,"prettyPrintCommitHistory"),tgt=me(function(){M.debug(b.records.commits),qpt([agt()[0]])},"prettyPrint"),egt=me(function(){b.reset(),lh()},"clear"),rgt=me(function(){return[...b.records.branchConfig.values()].map((t,e)=>null!=t.order?t:{...t,order:parseFloat("0."+e)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),ngt=me(function(){return b.records.branches},"getBranches"),igt=me(function(){return b.records.commits},"getCommits"),agt=me(function(){var t=[...b.records.commits.values()];return t.forEach(function(t){M.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),sgt=me(function(){return b.records.currBranch},"getCurrentBranch"),ogt=me(function(){return b.records.direction},"getDirection"),lgt=me(function(){return b.records.head},"getHead"),cgt={commitType:Opt,getConfig:Wpt,setDirection:Ypt,setOptions:Hpt,getOptions:Vpt,commit:Xpt,branch:Kpt,merge:Zpt,cherryPick:Qpt,checkout:Jpt,prettyPrint:tgt,clear:egt,getBranchesAsObjArray:rgt,getBranches:ngt,getCommits:igt,getCommitsArray:agt,getCurrentBranch:sgt,getDirection:ogt,getHead:lgt,setAccTitle:ch,getAccTitle:hh,getAccDescription:dh,setAccDescription:uh,setDiagramTitle:ph,getDiagramTitle:gh}}),Qgt=t(()=>{Mpt(),e(),Bpt(),Zgt(),Fpt(),hgt=me((t,e)=>{Dpt(t,e),t.dir&&e.setDirection(t.dir);for(var r of t.statements)ugt(r,e)},"populate"),ugt=me((t,e)=>{var r={Commit:me(t=>e.commit(dgt(t)),"Commit"),Branch:me(t=>e.branch(pgt(t)),"Branch"),Merge:me(t=>e.merge(ggt(t)),"Merge"),Checkout:me(t=>e.checkout(fgt(t)),"Checkout"),CherryPicking:me(t=>e.cherryPick(mgt(t)),"CherryPicking")}[t.$type];r?r(t):M.error("Unknown statement type: "+t.$type)},"parseStatement"),dgt=me(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?Opt[t.type]:Opt.NORMAL,tags:t.tags??void 0}),"parseCommit"),pgt=me(t=>({name:t.name,order:t.order??0}),"parseBranch"),ggt=me(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?Opt[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),fgt=me(t=>t.branch,"parseCheckout"),mgt=me(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),ygt={parse:me(async t=>{t=await Lpt("gitGraph",t),M.debug(t),hgt(t,cgt)},"parse")}}),Jgt=t(()=>{Q3(),mu(),e(),ZE(),Fpt(),Hgt=D(),vgt=Hgt?.gitGraph,xgt=new Map,bgt=new Map,wgt=new Map,kgt=[],Tgt=0,Egt="LR",Cgt=me(()=>{xgt.clear(),bgt.clear(),wgt.clear(),Tgt=0,kgt=[],Egt="LR"},"clear"),_gt=me(t=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach(t=>{var e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),Sgt=me(t=>{let r,n,i;return i="BT"===Egt?(n=me((t,e)=>t<=e,"comparisonFunc"),1/0):(n=me((t,e)=>e<=t,"comparisonFunc"),0),t.forEach(t=>{var e="TB"===Egt||"BT"==Egt?bgt.get(t)?.y:bgt.get(t)?.x;void 0!==e&&n(e,i)&&(r=t,i=e)}),r},"findClosestParent"),Agt=me(t=>{let r="",n=1/0;return t.forEach(t=>{var e=bgt.get(t).y;e<=n&&(r=t,n=e)}),r||void 0},"findClosestParentBT"),Lgt=me((t,n,e)=>{let i=e,a=e,r=[];t.forEach(t=>{var e=n.get(t);if(!e)throw new Error("Commit not found for key "+t);e.parents.length?(i=Igt(e),a=Math.max(i,a)):r.push(e),Rgt(e,i)}),i=a,r.forEach(t=>{Mgt(t,i,e)}),t.forEach(t=>{var e,r;(t=n.get(t))?.parents.length&&(e=Agt(t.parents),(i=bgt.get(e).y-40)<=a&&(a=i),e=xgt.get(t.branch).pos,r=i-10,bgt.set(t.id,{x:e,y:r}))})},"setParallelBTPos"),Ngt=me(t=>{var e=Sgt(t.parents.filter(t=>null!==t));if(!e)throw new Error("Closest parent not found for commit "+t.id);if(void 0===(e=bgt.get(e)?.y))throw new Error("Closest parent position not found for commit "+t.id);return e},"findClosestParentPos"),Igt=me(t=>Ngt(t)+40,"calculateCommitPosition"),Rgt=me((t,e)=>{var r=xgt.get(t.branch);if(r)return r=r.pos,bgt.set(t.id,{x:r,y:e+=10}),{x:r,y:e};throw new Error("Branch not found for commit "+t.id)},"setCommitPosition"),Mgt=me((t,e,r)=>{var n=xgt.get(t.branch);if(!n)throw new Error("Branch not found for commit "+t.id);n=n.pos,bgt.set(t.id,{x:n,y:e+r})},"setRootPosition"),Dgt=me((t,e,r,n,i,a)=>{var s;a===Opt.HIGHLIGHT?(t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%8} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%8} ${n}-inner`)):a===Opt.CHERRY_PICK?(t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} `+n),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+n),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+n),t.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 ${e.id} `+n),t.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 ${e.id} `+n)):((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===Opt.MERGE?9:10),s.attr("class",`commit ${e.id} commit`+i%8),a===Opt.MERGE&&((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${n} ${e.id} commit`+i%8)),a===Opt.REVERSE&&t.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} ${e.id} commit`+i%8))},"drawCommitBullet"),Ogt=me((t,e,r,n)=>{var i,a;e.type!==Opt.CHERRY_PICK&&(e.customId&&e.type===Opt.MERGE||e.type!==Opt.MERGE)&&vgt?.showCommitLabel&&(a=(t=t.append("g")).insert("rect").attr("class","commit-label-bkg"),i=(e=t.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.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"===Egt||"BT"===Egt?(a.attr("x",r.x-(i.width+16+5)).attr("y",r.y-12),e.attr("x",r.x-(i.width+16)).attr("y",r.y+i.height-12)):e.attr("x",r.posWithOffset-i.width/2),vgt.rotateCommitLabel)&&("TB"===Egt||"BT"===Egt?(e.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(e=-7.5-(i.width+10)/25*9.5,a=10+i.width/25*8.5,t.attr("transform","translate("+e+", "+a+") rotate(-45, "+n+", "+r.y+")")))},"drawCommitLabel"),Pgt=me((i,a,s,o)=>{if(0{switch(t.customType??t.type){case Dpt.NORMAL:return"commit-normal";case Dpt.REVERSE:return"commit-reverse";case Dpt.HIGHLIGHT:return"commit-highlight";case Dpt.MERGE:return"commit-merge";case Dpt.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Bgt=me((t,e,r,i)=>{var n,a={x:0,y:0};return 0{var r="BT"===Tgt&&r?e:e+10,e="TB"===Tgt||"BT"===Tgt?r:vgt.get(t.branch)?.pos,i="TB"===Tgt||"BT"===Tgt?vgt.get(t.branch)?.pos:r;if(void 0===i||void 0===e)throw new Error("Position were undefined for commit "+t.id);return{x:i,y:e,posWithOffset:r}},"getCommitPosition"),$gt=me((t,a,s)=>{if(!ygt)throw new Error("GitGraph config not found");let o=t.append("g").attr("class","commit-bullets"),l=t.append("g").attr("class","commit-labels"),c="TB"===Tgt||"BT"===Tgt?30:0,e=[...a.keys()],h=ygt?.parallelCommits??!1,r=me((t,e)=>(t=a.get(t)?.seq,e=a.get(e)?.seq,void 0!==t&&void 0!==e?t-e:0),"sortKeys"),i=e.sort(r);"BT"===Tgt&&(h&&Agt(i,a,c),i=i.reverse()),i.forEach(t=>{var e=a.get(t);if(!e)throw new Error("Commit not found for key "+t);h&&(c=Bgt(e,Tgt,c,xgt));var r,i,n,t=Fgt(e,c,h);s&&(r=Pgt(e),i=e.customType??e.type,n=vgt.get(e.branch)?.index??0,Mgt(o,e,t,r,n,i),Dgt(l,e,t,c),Ogt(l,e,t,c)),"TB"===Tgt||"BT"===Tgt?xgt.set(e.id,{x:t.x,y:t.posWithOffset}):xgt.set(e.id,{x:t.posWithOffset,y:t.y}),(c="BT"===Tgt&&h?c+40:c+40+10)>kgt&&(kgt=c)})},"drawCommits"),zgt=me((e,r,t,i,n)=>{let a=(("TB"===Tgt||"BT"===Tgt?t.xt.branch===a,"isOnBranchToGetCurve"),o=me(t=>t.seq>e.seq&&t.seqo(t)&&s(t))},"shouldRerouteArrow"),Ggt=me((t,e,r=0)=>{let i=t+Math.abs(t-e)/2,n;return 510<=Math.abs(t-i))?(wgt.push(i),i):(n=Math.abs(t-e),Ggt(t,e-n/5,r+1))},"findLane"),Ugt=me((t,e,r,i)=>{var n,a=xgt.get(e.id),s=xgt.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${e.id} and `+r.id);let o=zgt(e,r,a,s,i),l="",c="",h=0,u=0,d=vgt.get(r.branch)?.index;r.type===Dpt.MERGE&&e.id!==r.parents[0]&&(d=vgt.get(e.branch)?.index);let p;if(o?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,i=a.ys.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===Dpt.MERGE&&e.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"===Tgt?(a.xs.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===Dpt.MERGE&&e.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.ys.y&&(p=r.type===Dpt.MERGE&&e.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");t.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),qgt=me((t,r)=>{let i=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{let e=r.get(t);e.parents&&0{Ugt(i,r.get(t),e,r)})})},"drawArrows"),jgt=me((t,e)=>{let a=t.append("g");e.forEach((t,e)=>{var e=e%8,r=vgt.get(t.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+t.name);(i=a.append("line")).attr("x1",0),i.attr("y1",r),i.attr("x2",kgt),i.attr("y2",r),i.attr("class","branch branch"+e),"TB"===Tgt?(i.attr("y1",30),i.attr("x1",r),i.attr("y2",kgt),i.attr("x2",r)):"BT"===Tgt&&(i.attr("y1",kgt),i.attr("x1",r),i.attr("y2",30),i.attr("x2",r)),wgt.push(r);var i=t.name,t=Cgt(i),i=a.insert("rect"),n=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+e),t=(n.node().appendChild(t),t.getBBox());i.attr("class","branchLabelBkg label"+e).attr("rx",4).attr("ry",4).attr("x",-t.width-4-(!0===ygt?.rotateCommitLabel?30:0)).attr("y",-t.height/2+8).attr("width",t.width+18).attr("height",t.height+4),n.attr("transform","translate("+(-t.width-14-(!0===ygt?.rotateCommitLabel?30:0))+", "+(r-t.height/2-1)+")"),"TB"===Tgt?(i.attr("x",r-t.width/2-10).attr("y",0),n.attr("transform","translate("+(r-t.width/2-5)+", 0)")):"BT"===Tgt?(i.attr("x",r-t.width/2-10).attr("y",kgt),n.attr("transform","translate("+(r-t.width/2-5)+", "+kgt+")")):i.attr("transform","translate(-19, "+(r-t.height/2)+")")})},"drawBranches"),Wgt=me(function(t,e,r,i,n){return vgt.set(t,{pos:e,index:r}),e+(50+(n?40:0)+("TB"===Tgt||"BT"===Tgt?i.width/2:0))},"setBranchPosition"),Ygt=me(function(t,e,r,i){if(Egt(),M.debug("in gitgraph renderer",t+` -`,"id:",e,r),!ygt)throw new Error("GitGraph config not found");let s=ygt.rotateCommitLabel??!1,n=i.db,o=(bgt=n.getCommits(),t=n.getBranchesAsObjArray(),Tgt=n.getDirection(),j(`[id="${e}"]`)),l=0;t.forEach((t,e)=>{var r=Cgt(t.name),i=o.append("g"),n=i.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());l=Wgt(t.name,l,e,r,s),a.remove(),n.remove(),i.remove()}),$gt(o,bgt,!1),ygt.showBranches&&jgt(o,t),qgt(o,bgt),$gt(o,bgt,!0),YE.insertTitle(o,"gitTitleText",ygt.titleTopMargin??0,n.getDiagramTitle()),xh(void 0,o,ygt.diagramPadding,ygt.useMaxWidth)},"draw"),Hgt={draw:Ygt}}),Jgt=t(()=>{Vgt=me(e=>` + ${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"),Bgt=me(t=>{switch(t.customType??t.type){case Opt.NORMAL:return"commit-normal";case Opt.REVERSE:return"commit-reverse";case Opt.HIGHLIGHT:return"commit-highlight";case Opt.MERGE:return"commit-merge";case Opt.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Fgt=me((t,e,r,n)=>{var i,a={x:0,y:0};return 0{var r="BT"===Egt&&r?e:e+10,e="TB"===Egt||"BT"===Egt?r:xgt.get(t.branch)?.pos,n="TB"===Egt||"BT"===Egt?xgt.get(t.branch)?.pos:r;if(void 0===n||void 0===e)throw new Error("Position were undefined for commit "+t.id);return{x:n,y:e,posWithOffset:r}},"getCommitPosition"),zgt=me((t,a,s)=>{if(!vgt)throw new Error("GitGraph config not found");let o=t.append("g").attr("class","commit-bullets"),l=t.append("g").attr("class","commit-labels"),c="TB"===Egt||"BT"===Egt?30:0,e=[...a.keys()],h=vgt?.parallelCommits??!1,r=me((t,e)=>(t=a.get(t)?.seq,e=a.get(e)?.seq,void 0!==t&&void 0!==e?t-e:0),"sortKeys"),n=e.sort(r);"BT"===Egt&&(h&&Lgt(n,a,c),n=n.reverse()),n.forEach(t=>{var e=a.get(t);if(!e)throw new Error("Commit not found for key "+t);h&&(c=Fgt(e,Egt,c,bgt));var r,n,i,t=$gt(e,c,h);s&&(r=Bgt(e),n=e.customType??e.type,i=xgt.get(e.branch)?.index??0,Dgt(o,e,t,r,i,n),Ogt(l,e,t,c),Pgt(l,e,t,c)),"TB"===Egt||"BT"===Egt?bgt.set(e.id,{x:t.x,y:t.posWithOffset}):bgt.set(e.id,{x:t.posWithOffset,y:t.y}),(c="BT"===Egt&&h?c+40:c+40+10)>Tgt&&(Tgt=c)})},"drawCommits"),Ggt=me((e,r,t,n,i)=>{let a=(("TB"===Egt||"BT"===Egt?t.xt.branch===a,"isOnBranchToGetCurve"),o=me(t=>t.seq>e.seq&&t.seqo(t)&&s(t))},"shouldRerouteArrow"),Ugt=me((t,e,r=0)=>{let n=t+Math.abs(t-e)/2,i;return 510<=Math.abs(t-n))?(kgt.push(n),n):(i=Math.abs(t-e),Ugt(t,e-i/5,r+1))},"findLane"),qgt=me((t,e,r,n)=>{var i,a=bgt.get(e.id),s=bgt.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${e.id} and `+r.id);let o=Ggt(e,r,a,s,n),l="",c="",h=0,u=0,d=xgt.get(r.branch)?.index;r.type===Opt.MERGE&&e.id!==r.parents[0]&&(d=xgt.get(e.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.ys.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===Opt.MERGE&&e.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"===Egt?(a.xs.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===Opt.MERGE&&e.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.ys.y&&(p=r.type===Opt.MERGE&&e.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");t.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),jgt=me((t,r)=>{let n=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{let e=r.get(t);e.parents&&0{qgt(n,r.get(t),e,r)})})},"drawArrows"),Wgt=me((t,e)=>{let a=t.append("g");e.forEach((t,e)=>{var e=e%8,r=xgt.get(t.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+t.name);(n=a.append("line")).attr("x1",0),n.attr("y1",r),n.attr("x2",Tgt),n.attr("y2",r),n.attr("class","branch branch"+e),"TB"===Egt?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",Tgt),n.attr("x2",r)):"BT"===Egt&&(n.attr("y1",Tgt),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),kgt.push(r);var n=t.name,t=_gt(n),n=a.insert("rect"),i=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+e),t=(i.node().appendChild(t),t.getBBox());n.attr("class","branchLabelBkg label"+e).attr("rx",4).attr("ry",4).attr("x",-t.width-4-(!0===vgt?.rotateCommitLabel?30:0)).attr("y",-t.height/2+8).attr("width",t.width+18).attr("height",t.height+4),i.attr("transform","translate("+(-t.width-14-(!0===vgt?.rotateCommitLabel?30:0))+", "+(r-t.height/2-1)+")"),"TB"===Egt?(n.attr("x",r-t.width/2-10).attr("y",0),i.attr("transform","translate("+(r-t.width/2-5)+", 0)")):"BT"===Egt?(n.attr("x",r-t.width/2-10).attr("y",Tgt),i.attr("transform","translate("+(r-t.width/2-5)+", "+Tgt+")")):n.attr("transform","translate(-19, "+(r-t.height/2)+")")})},"drawBranches"),Ygt=me(function(t,e,r,n,i){return xgt.set(t,{pos:e,index:r}),e+(50+(i?40:0)+("TB"===Egt||"BT"===Egt?n.width/2:0))},"setBranchPosition"),Hgt=me(function(t,e,r,n){if(Cgt(),M.debug("in gitgraph renderer",t+` +`,"id:",e,r),!vgt)throw new Error("GitGraph config not found");let s=vgt.rotateCommitLabel??!1,i=n.db,o=(wgt=i.getCommits(),t=i.getBranchesAsObjArray(),Egt=i.getDirection(),H(`[id="${e}"]`)),l=0;t.forEach((t,e)=>{var r=_gt(t.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=Ygt(t.name,l,e,r,s),a.remove(),i.remove(),n.remove()}),zgt(o,wgt,!1),vgt.showBranches&&Wgt(o,t),jgt(o,wgt),zgt(o,wgt,!0),HE.insertTitle(o,"gitTitleText",vgt.titleTopMargin??0,i.getDiagramTitle()),bh(void 0,o,vgt.diagramPadding,vgt.useMaxWidth)},"draw"),Vgt={draw:Hgt}}),t1t=t(()=>{Xgt=me(e=>` .commit-id, .commit-msg, .branch-label { @@ -874,12 +889,12 @@ For Further details.`}function Pst(t){if(t instanceof Utt)return"SUBRULE";if(t i font-size: 18px; fill: ${e.textColor}; } -`,"getStyles"),Xgt=Vgt}),t1t={};lPt(t1t,{diagram:()=>e1t});var e1t,r1t,i1t,n1t=t(()=>{Zgt(),Kgt(),Qgt(),Jgt(),e1t={parser:mgt,db:lgt,renderer:Hgt,styles:Xgt}}),a1t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],i=[1,26],n=[1,27],a=[1,28],s=[1,29],o=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],g=[1,11],f=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],E=[1,23],C=[1,25],_=[1,35],i={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:i.TopAxis(),this.$=a[o].substr(8);break;case 20:i.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:i.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:i.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:i.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:i.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:i.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:i.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],i.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],null),i.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],i.setClickEvent(a[o-2],a[o],null),i.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-1],a[o]),i.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],i.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:n,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:_},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:i,13:n,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:_},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"r1t});var r1t,n1t,i1t,a1t=t(()=>{Qgt(),Zgt(),Jgt(),t1t(),r1t={parser:ygt,db:cgt,renderer:Vgt,styles:Kgt}}),s1t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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],_=[1,35],n={trace:me(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:me(function(t,e,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]},e(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:_},e(r,[2,7],{1:[2,1]}),e(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:_},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{function r(){return function(t,e,n){var a=me(function(t){return t.add(4-t.isoWeekday(),"day")},"a"),s=((e=e.prototype).isoWeekYear=function(){return a(this).year()},e.isoWeek=function(t){var e,r,i;return this.$utils().u(t)?(r=a(this),i=this.isoWeekYear(),e=4-(i=(this.$u?n.utc:n)().year(i).startOf("year")).isoWeekday(),4{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,t=/\d/,e=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,g={},n=me(function(t){return(t=+t)+(68{try{if(-1<["x","X"].indexOf(e))return new Date(("X"===e?1e3:1)*t);var n=T(e)(t),a=n.year,s=n.month,o=n.day,l=n.hours,c=n.minutes,h=n.seconds,u=n.milliseconds,d=n.zone,p=n.week,g=new Date,f=o||(a||s?1:g.getDate()),m=a||g.getFullYear(),y=0;a&&!s||(y=0{function r(){return function(t,e){var a=(e=e.prototype).format;e.format=function(t){var e,r,i=this,n=this.$locale();return this.isValid()?(e=this.$utils(),r=(t||"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(t){switch(t){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return n.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return n.ordinal(i.week(),"W");case"w":case"ww":return e.s(i.week(),"w"===t?1:2,"0");case"W":case"WW":return e.s(i.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return e.s(String(0===i.$H?24:i.$H),"k"===t?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return t}}),a.bind(this)(r)):a.bind(this)(t)}}}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=r()});function c1t(r,i,t){let n=!0;for(;n;)n=!1,t.forEach(function(t){var e=new RegExp("^\\s*"+t+"\\s*$");r[0].match(e)&&(i[t]=!0,r.shift(1),n=!0)})}var h1t,u1t,d1t,p1t,g1t,f1t,m1t,y1t,v1t,x1t,b1t,w1t,k1t,T1t,E1t,C1t,_1t,S1t,A1t,L1t,N1t,I1t,R1t,M1t,D1t,O1t,P1t,B1t,F1t,$1t,z1t,G1t,U1t,q1t,j1t,W1t,Y1t,H1t,V1t,X1t,K1t,Z1t,Q1t,J1t,tft,eft,rft,ift,nft,aft,sft,oft,lft,cft,hft,uft,dft,pft,gft,fft,mft,yft,vft,xft,bft,wft,kft,Tft,Eft,Cft,_ft,Sft,Aft,Lft,Nft,Ift,Rft,Mft,Dft,Oft,Pft,Bft=t(()=>{h1t=tt(J3(),1),u1t=tt(et(),1),I1t=tt(s1t(),1),R1t=tt(o1t(),1),M1t=tt(l1t(),1),e(),fu(),KE(),gu(),u1t.default.extend(I1t.default),u1t.default.extend(R1t.default),u1t.default.extend(M1t.default),d1t={friday:5,saturday:6},m1t=g1t=p1t="",y1t=[],v1t=[],x1t=new Map,b1t=[],w1t=[],T1t=k1t="",E1t=["active","done","crit","milestone"],S1t=_1t=!(C1t=[]),A1t="sunday",L1t="saturday",N1t=0,I1t=me(function(){b1t=[],w1t=[],C1t=[],fft=[],f1t=gft=pft=void(cft=0),m1t=T1t=g1t=p1t=k1t="",y1t=[],S1t=_1t=!(v1t=[]),N1t=0,x1t=new Map,oh(),A1t="sunday",L1t="saturday"},"clear"),R1t=me(function(t){g1t=t},"setAxisFormat"),M1t=me(function(){return g1t},"getAxisFormat"),D1t=me(function(t){f1t=t},"setTickInterval"),O1t=me(function(){return f1t},"getTickInterval"),P1t=me(function(t){m1t=t},"setTodayMarker"),B1t=me(function(){return m1t},"getTodayMarker"),F1t=me(function(t){p1t=t},"setDateFormat"),$1t=me(function(){_1t=!0},"enableInclusiveEndDates"),z1t=me(function(){return _1t},"endDatesAreInclusive"),G1t=me(function(){S1t=!0},"enableTopAxis"),U1t=me(function(){return S1t},"topAxisEnabled"),q1t=me(function(t){T1t=t},"setDisplayMode"),j1t=me(function(){return T1t},"getDisplayMode"),W1t=me(function(){return p1t},"getDateFormat"),Y1t=me(function(t){y1t=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),H1t=me(function(){return y1t},"getIncludes"),V1t=me(function(t){v1t=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),X1t=me(function(){return v1t},"getExcludes"),K1t=me(function(){return x1t},"getLinks"),Z1t=me(function(t){k1t=t,b1t.push(t)},"addSection"),Q1t=me(function(){return b1t},"getSections"),J1t=me(function(){let t=bft(),e=0;for(;!t&&e<10;)t=bft(),e++;return w1t=fft},"getTasks"),tft=me(function(t,e,r,i){return!i.includes(t.format(e.trim()))&&(!((!r.includes("weekends")||t.isoWeekday()!==d1t[L1t]&&t.isoWeekday()!==d1t[L1t]+1)&&!r.includes(t.format("dddd").toLowerCase()))||r.includes(t.format(e.trim())))},"isInvalidDate"),eft=me(function(t){A1t=t},"setWeekday"),rft=me(function(){return A1t},"getWeekday"),ift=me(function(t){L1t=t},"setWeekend"),nft=me(function(e,r,i,n){if(i.length&&!e.manualEndTime){let t;t=(t=e.startTime instanceof Date?(0,u1t.default)(e.startTime):(0,u1t.default)(e.startTime,r,!0)).add(1,"d");var a=e.endTime instanceof Date?(0,u1t.default)(e.endTime):(0,u1t.default)(e.endTime,r,!0),[r,i]=aft(t,a,r,i,n);e.endTime=r.toDate(),e.renderEndTime=i}},"checkTaskDates"),aft=me(function(t,e,r,i,n){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),(a=tft(t,r,i,n))&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),sft=me(function(t,e,r){r=r.trim();var i=/^after\s+(?[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(var n of i.groups.ids.split(" "))void 0!==(n=vft(n))&&(!t||n.endTime>t.endTime)&&(t=n);return t?t.endTime:((i=new Date).setHours(0,0,0,0),i)}if((i=(0,u1t.default)(r,e.trim(),!0)).isValid())return i.toDate();if(M.debug("Invalid date:"+r),M.debug("With date format:"+e.trim()),void 0===(i=new Date(r))||isNaN(i.getTime())||i.getFullYear()<-1e4||1e4[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(var a of n.groups.ids.split(" "))void 0!==(a=vft(a))&&(!t||a.startTime{window.open(r,"_self")}),x1t.set(t,r))}),kft(t,"clickable")},"setLink"),kft=me(function(t,e){t.split(",").forEach(function(t){void 0!==(t=vft(t))&&t.classes.push(e)})},"setClass"),Tft=me(function(t,e,i){if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{YE.runFunc(e,...r)})}},"setClickFun"),Eft=me(function(e,r){C1t.push(function(){var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",function(){r()})},function(){var t=document.querySelector(`[id="${e}-text"]`);null!==t&&t.addEventListener("click",function(){r()})})},"pushFun"),Cft=me(function(t,e,r){t.split(",").forEach(function(t){Tft(t,e,r)}),kft(t,"clickable")},"setClickEvent"),_ft=me(function(e){C1t.forEach(function(t){t(e)})},"bindFunctions"),Sft={getConfig:me(()=>D().gantt,"getConfig"),clear:I1t,setDateFormat:F1t,getDateFormat:W1t,enableInclusiveEndDates:$1t,endDatesAreInclusive:z1t,enableTopAxis:G1t,topAxisEnabled:U1t,setAxisFormat:R1t,getAxisFormat:M1t,setTickInterval:D1t,getTickInterval:O1t,setTodayMarker:P1t,getTodayMarker:B1t,setAccTitle:lh,getAccTitle:ch,setDiagramTitle:dh,getDiagramTitle:ph,setDisplayMode:q1t,getDisplayMode:j1t,setAccDescription:hh,getAccDescription:uh,addSection:Z1t,getSections:Q1t,getTasks:J1t,addTask:yft,findTaskById:vft,addTaskOrg:xft,setIncludes:Y1t,getIncludes:H1t,setExcludes:V1t,getExcludes:X1t,setClickEvent:Cft,setLink:wft,getLinks:K1t,bindFunctions:_ft,parseDuration:oft,isInvalidDate:tft,setWeekday:eft,getWeekday:rft,setWeekend:ift},me(c1t,"getTaskTags")}),Fft=t(()=>{Aft=tt(et(),1),e(),Z3(),Jc(),fu(),th(),Lft=me(function(){M.debug("Something is calling, setConf, remove the call")},"setConf"),Nft={monday:ix,tuesday:nx,wednesday:ax,thursday:sx,friday:ox,saturday:lx,sunday:rx},Ift=me((t,e)=>{let r=[...t].map(()=>-1/0),i=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),n=0;for(var a of i)for(let t=0;t=r[t]){r[t]=a.endTime,a.order=t+e,t>n&&(n=t);break}return n},"getMaxIntersections"),Mft=me(function(t,l,e,d){let p=D().gantt,r=D().securityLevel,i,n=("sandbox"===r&&(i=j("#i"+l)),j("sandbox"===r?i.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?i.nodes()[0].contentDocument:document,a=s.getElementById(l),o=(void 0===(Rft=a.parentElement.offsetWidth)&&(Rft=1200),void 0!==p.useWidth&&(Rft=p.useWidth),d.db.getTasks()),u=[];for(var c of o)u.push(c.type);u=A(u);let h={},g=2*p.topPadding;if("compact"===d.db.getDisplayMode()||"compact"===p.displayMode){var f,m,y={};for(f of o)void 0===y[f.section]?y[f.section]=[f]:y[f.section].push(f);let t=0;for(m of Object.keys(y)){var v=Ift(y[m],t)+1;t+=v,g+=v*(p.barHeight+p.barGap),h[m]=v}}else{g+=o.length*(p.barHeight+p.barGap);for(let e of u)h[e]=o.filter(t=>t.type===e).length}a.setAttribute("viewBox","0 0 "+Rft+" "+g);let x=n.select(`[id="${l}"]`),b=s4().domain([Wu(o,function(t){return t.startTime}),qu(o,function(t){return t.endTime})]).rangeRound([0,Rft-p.leftPadding-p.rightPadding]);function w(t,e){let r=t.startTime,i=e.startTime,n=0;return it.order))].map(e=>t.find(t=>t.order===e));x.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*r+i-2}).attr("width",function(){return h-p.rightPadding/2}).attr("height",r).attr("class",function(t){for(var[e,r]of u.entries())if(t.type===r)return"section section"+e%p.numberSectionStyles;return"section section0"});let s=x.append("g").selectAll("rect").data(t).enter(),o=d.db.getLinks();if(s.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?b(t.startTime)+n+.5*(b(t.endTime)-b(t.startTime))-.5*c:b(t.startTime)+n}).attr("y",function(t,e){return t.order*r+i}).attr("width",function(t){return t.milestone?c:b(t.renderEndTime||t.endTime)-b(t.startTime)}).attr("height",c).attr("transform-origin",function(t,e){return e=t.order,(b(t.startTime)+n+.5*(b(t.endTime)-b(t.startTime))).toString()+"px "+(e*r+i+.5*c).toString()+"px"}).attr("class",function(t){let e="",r=(0r-e?r+t+1.5*p.leftPadding>h?e+n-5:r+n+5:(r-e)/2+e+n}).attr("y",function(t,e){return t.order*r+p.barHeight/2+(p.fontSize/2-2)+i}).attr("text-height",c).attr("class",function(t){let e=b(t.startTime),r=b(t.endTime),i=(t.milestone&&(r=e+c),this.getBBox().width),n="",a=(0r-e?r+i+1.5*p.leftPadding>h?n+" taskTextOutsideLeft taskTextOutside"+a+" "+l:n+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+i:n+" taskText taskText"+a+" "+l+" width-"+i}),"sandbox"===D().securityLevel){let a=j("#i"+l).nodes()[0].contentDocument;s.filter(function(t){return o.has(t.id)}).each(function(t){var e=a.querySelector("#"+t.id),r=a.querySelector("#"+t.id+"-text"),i=e.parentNode,n=a.createElement("a");n.setAttribute("xlink:href",o.get(t.id)),n.setAttribute("target","_top"),i.appendChild(n),n.appendChild(e),n.appendChild(r)})}}function E(s,o,l,t,c,e,h,u){if(0!==h.length||0!==u.length){let n,a;for(var{startTime:r,endTime:i}of e)(void 0===n||ra)&&(a=i);if(n&&a)if(5<(0,Aft.default)(a).diff((0,Aft.default)(n),"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 t=d.db.getDateFormat(),e=[],r=null,i=(0,Aft.default)(n);for(;i.valueOf()<=a;)d.db.isInvalidDate(i,t,h,u)?r?r.end=i:r={start:i,end:i}:r&&(e.push(r),r=null),i=i.add(1,"d");x.append("g").selectAll("rect").data(e).enter().append("rect").attr("id",function(t){return"exclude-"+t.start.format("YYYY-MM-DD")}).attr("x",function(t){return b(t.start)+l}).attr("y",p.gridLineStartPadding).attr("width",function(t){var e=t.end.add(1,"day");return b(e)-b(t.start)}).attr("height",c-o-p.gridLineStartPadding).attr("transform-origin",function(t,e){return(b(t.start)+l+.5*(b(t.end)-b(t.start))).toString()+"px "+(e*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function C(t,e,r,i){var n=ad(b).tickSize(-i+e+p.gridLineStartPadding).tickFormat(t4(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":n.ticks($v.every(s));break;case"second":n.ticks(zv.every(s));break;case"minute":n.ticks(Gv.every(s));break;case"hour":n.ticks(qv.every(s));break;case"day":n.ticks(Wv.every(s));break;case"week":n.ticks(Nft[l].every(s));break;case"month":n.ticks(mx.every(s))}}if(x.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(n).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=nd(b).tickSize(-i+e+p.gridLineStartPadding).tickFormat(t4(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($v.every(h));break;case"second":c.ticks(zv.every(h));break;case"minute":c.ticks(Gv.every(h));break;case"hour":c.ticks(qv.every(h));break;case"day":c.ticks(Wv.every(h));break;case"week":c.ticks(Nft[u].every(h));break;case"month":c.ticks(mx.every(h))}}x.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(r,i){let n=0,a=Object.keys(h).map(t=>[t,h[t]]);x.append("g").selectAll("text").data(a).enter().append(function(t){var e,r,i=-((t=t[0].split(L.lineBreakRegex)).length-1)/2,n=s.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("dy",i+"em");for([e,r]of t.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0{Oft=me(t=>` +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{function r(){return function(t,e,i){var a=me(function(t){return t.add(4-t.isoWeekday(),"day")},"a"),s=((e=e.prototype).isoWeekYear=function(){return a(this).year()},e.isoWeek=function(t){var e,r,n;return this.$utils().u(t)?(r=a(this),n=this.isoWeekYear(),e=4-(n=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),4{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,t=/\d/,e=/\d\d/,r=/\d\d?/,n=/\d*[^-_:/,()\s\d]+/,g={},i=me(function(t){return(t=+t)+(68{try{if(-1<["x","X"].indexOf(e))return new Date(("X"===e?1e3:1)*t);var i=T(e)(t),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{function r(){return function(t,e){var a=(e=e.prototype).format;e.format=function(t){var e,r,n=this,i=this.$locale();return this.isValid()?(e=this.$utils(),r=(t||"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(t){switch(t){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 e.s(n.week(),"w"===t?1:2,"0");case"W":case"WW":return e.s(n.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return e.s(String(0===n.$H?24:n.$H),"k"===t?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 t}}),a.bind(this)(r)):a.bind(this)(t)}}}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=r()});function h1t(r,n,t){let i=!0;for(;i;)i=!1,t.forEach(function(t){var e=new RegExp("^\\s*"+t+"\\s*$");r[0].match(e)&&(n[t]=!0,r.shift(1),i=!0)})}var u1t,d1t,p1t,g1t,f1t,m1t,y1t,v1t,x1t,b1t,w1t,k1t,T1t,E1t,C1t,_1t,S1t,A1t,L1t,N1t,I1t,R1t,M1t,D1t,O1t,P1t,B1t,F1t,$1t,z1t,G1t,U1t,q1t,j1t,W1t,Y1t,H1t,V1t,X1t,K1t,Z1t,Q1t,J1t,tft,eft,rft,nft,ift,aft,sft,oft,lft,cft,hft,uft,dft,pft,gft,fft,mft,yft,vft,xft,bft,wft,kft,Tft,Eft,Cft,_ft,Sft,Aft,Lft,Nft,Ift,Rft,Mft,Dft,Oft,Pft,Bft,Fft=t(()=>{u1t=tt(tw(),1),d1t=tt(et(),1),R1t=tt(o1t(),1),M1t=tt(l1t(),1),D1t=tt(c1t(),1),e(),mu(),ZE(),fu(),d1t.default.extend(R1t.default),d1t.default.extend(M1t.default),d1t.default.extend(D1t.default),p1t={friday:5,saturday:6},y1t=f1t=g1t="",v1t=[],x1t=[],b1t=new Map,w1t=[],k1t=[],E1t=T1t="",C1t=["active","done","crit","milestone","vert"],A1t=S1t=!(_1t=[]),L1t="sunday",N1t="saturday",I1t=0,R1t=me(function(){w1t=[],k1t=[],_1t=[],mft=[],m1t=fft=gft=void(hft=0),y1t=E1t=f1t=g1t=T1t="",v1t=[],A1t=S1t=!(x1t=[]),I1t=0,b1t=new Map,lh(),L1t="sunday",N1t="saturday"},"clear"),M1t=me(function(t){f1t=t},"setAxisFormat"),D1t=me(function(){return f1t},"getAxisFormat"),O1t=me(function(t){m1t=t},"setTickInterval"),P1t=me(function(){return m1t},"getTickInterval"),B1t=me(function(t){y1t=t},"setTodayMarker"),F1t=me(function(){return y1t},"getTodayMarker"),$1t=me(function(t){g1t=t},"setDateFormat"),z1t=me(function(){S1t=!0},"enableInclusiveEndDates"),G1t=me(function(){return S1t},"endDatesAreInclusive"),U1t=me(function(){A1t=!0},"enableTopAxis"),q1t=me(function(){return A1t},"topAxisEnabled"),j1t=me(function(t){E1t=t},"setDisplayMode"),W1t=me(function(){return E1t},"getDisplayMode"),Y1t=me(function(){return g1t},"getDateFormat"),H1t=me(function(t){v1t=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),V1t=me(function(){return v1t},"getIncludes"),X1t=me(function(t){x1t=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),K1t=me(function(){return x1t},"getExcludes"),Z1t=me(function(){return b1t},"getLinks"),Q1t=me(function(t){T1t=t,w1t.push(t)},"addSection"),J1t=me(function(){return w1t},"getSections"),tft=me(function(){let t=wft(),e=0;for(;!t&&e<10;)t=wft(),e++;return k1t=mft},"getTasks"),eft=me(function(t,e,r,n){return!n.includes(t.format(e.trim()))&&(!((!r.includes("weekends")||t.isoWeekday()!==p1t[N1t]&&t.isoWeekday()!==p1t[N1t]+1)&&!r.includes(t.format("dddd").toLowerCase()))||r.includes(t.format(e.trim())))},"isInvalidDate"),rft=me(function(t){L1t=t},"setWeekday"),nft=me(function(){return L1t},"getWeekday"),ift=me(function(t){N1t=t},"setWeekend"),aft=me(function(e,r,n,i){if(n.length&&!e.manualEndTime){let t;t=(t=e.startTime instanceof Date?(0,d1t.default)(e.startTime):(0,d1t.default)(e.startTime,r,!0)).add(1,"d");var a=e.endTime instanceof Date?(0,d1t.default)(e.endTime):(0,d1t.default)(e.endTime,r,!0),[r,n]=sft(t,a,r,n,i);e.endTime=r.toDate(),e.renderEndTime=n}},"checkTaskDates"),sft=me(function(t,e,r,n,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),(a=eft(t,r,n,i))&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),oft=me(function(t,e,r){r=r.trim();var n=/^after\s+(?[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(var i of n.groups.ids.split(" "))void 0!==(i=xft(i))&&(!t||i.endTime>t.endTime)&&(t=i);return t?t.endTime:((n=new Date).setHours(0,0,0,0),n)}if((n=(0,d1t.default)(r,e.trim(),!0)).isValid())return n.toDate();if(M.debug("Invalid date:"+r),M.debug("With date format:"+e.trim()),void 0===(n=new Date(r))||isNaN(n.getTime())||n.getFullYear()<-1e4||1e4[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(var a of i.groups.ids.split(" "))void 0!==(a=xft(a))&&(!t||a.startTime{window.open(r,"_self")}),b1t.set(t,r))}),Tft(t,"clickable")},"setLink"),Tft=me(function(t,e){t.split(",").forEach(function(t){void 0!==(t=xft(t))&&t.classes.push(e)})},"setClass"),Eft=me(function(t,e,n){if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{HE.runFunc(e,...r)})}},"setClickFun"),Cft=me(function(e,r){_1t.push(function(){var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",function(){r()})},function(){var t=document.querySelector(`[id="${e}-text"]`);null!==t&&t.addEventListener("click",function(){r()})})},"pushFun"),_ft=me(function(t,e,r){t.split(",").forEach(function(t){Eft(t,e,r)}),Tft(t,"clickable")},"setClickEvent"),Sft=me(function(e){_1t.forEach(function(t){t(e)})},"bindFunctions"),Aft={getConfig:me(()=>D().gantt,"getConfig"),clear:R1t,setDateFormat:$1t,getDateFormat:Y1t,enableInclusiveEndDates:z1t,endDatesAreInclusive:G1t,enableTopAxis:U1t,topAxisEnabled:q1t,setAxisFormat:M1t,getAxisFormat:D1t,setTickInterval:O1t,getTickInterval:P1t,setTodayMarker:B1t,getTodayMarker:F1t,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,setDisplayMode:j1t,getDisplayMode:W1t,setAccDescription:uh,getAccDescription:dh,addSection:Q1t,getSections:J1t,getTasks:tft,addTask:vft,findTaskById:xft,addTaskOrg:bft,setIncludes:H1t,getIncludes:V1t,setExcludes:X1t,getExcludes:K1t,setClickEvent:_ft,setLink:kft,getLinks:Z1t,bindFunctions:Sft,parseDuration:lft,isInvalidDate:eft,setWeekday:rft,getWeekday:nft,setWeekend:ift},me(h1t,"getTaskTags")}),$ft=t(()=>{Lft=tt(et(),1),e(),Q3(),th(),mu(),eh(),Nft=me(function(){M.debug("Something is calling, setConf, remove the call")},"setConf"),Ift={monday:ix,tuesday:ax,wednesday:sx,thursday:ox,friday:lx,saturday:cx,sunday:nx},Rft=me((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),i=0;for(var a of n)for(let t=0;t=r[t]){r[t]=a.endTime,a.order=t+e,t>i&&(i=t);break}return i},"getMaxIntersections"),Dft=me(function(t,l,e,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===(Mft=a.parentElement.offsetWidth)&&(Mft=1200),void 0!==p.useWidth&&(Mft=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 t=0;for(m of Object.keys(y)){var v=Rft(y[m],t)+1;t+=v,h+=v*(p.barHeight+p.barGap),c[m]=v}}else{h+=u.length*(p.barHeight+p.barGap);for(let e of g)c[e]=u.filter(t=>t.type===e).length}a.setAttribute("viewBox","0 0 "+Mft+" "+h);let x=i.select(`[id="${l}"]`),b=o4().domain([Yu(u,function(t){return t.startTime}),ju(u,function(t){return t.endTime})]).rangeRound([0,Mft-p.leftPadding-p.rightPadding]);function w(t,e){let r=t.startTime,n=e.startTime,i=0;return nt.vert===e.vert?0:t.vert?1:-1);var a=[...new Set(t.map(t=>t.order))].map(e=>t.find(t=>t.order===e));x.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*r+n-2}).attr("width",function(){return h-p.rightPadding/2}).attr("height",r).attr("class",function(t){for(var[e,r]of g.entries())if(t.type===r)return"section section"+e%p.numberSectionStyles;return"section section0"}).enter();let s=x.append("g").selectAll("rect").data(t).enter(),o=d.db.getLinks();if(s.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?b(t.startTime)+i+.5*(b(t.endTime)-b(t.startTime))-.5*c:b(t.startTime)+i}).attr("y",function(t,e){return e=t.order,t.vert?p.gridLineStartPadding:e*r+n}).attr("width",function(t){return t.milestone?c:t.vert?.08*c:b(t.renderEndTime||t.endTime)-b(t.startTime)}).attr("height",function(t){return t.vert?u.length*(p.barHeight+p.barGap)+2*p.barHeight:c}).attr("transform-origin",function(t,e){return e=t.order,(b(t.startTime)+i+.5*(b(t.endTime)-b(t.startTime))).toString()+"px "+(e*r+n+.5*c).toString()+"px"}).attr("class",function(t){let e="",r=(0r-e?r+t+1.5*p.leftPadding>h?e+i-5:r+i+5:(r-e)/2+e+i}).attr("y",function(t,e){return t.vert?p.gridLineStartPadding+u.length*(p.barHeight+p.barGap)+60:t.order*r+p.barHeight/2+(p.fontSize/2-2)+n}).attr("text-height",c).attr("class",function(t){let e=b(t.startTime),r=b(t.endTime),n=(t.milestone&&(r=e+c),this.getBBox().width),i="",a=(0r-e?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(t){return o.has(t.id)}).each(function(t){var e=a.querySelector("#"+t.id),r=a.querySelector("#"+t.id+"-text"),n=e.parentNode,i=a.createElement("a");i.setAttribute("xlink:href",o.get(t.id)),i.setAttribute("target","_top"),n.appendChild(i),i.appendChild(e),i.appendChild(r)})}}function E(s,o,l,t,c,e,h,u){if(0!==h.length||0!==u.length){let i,a;for(var{startTime:r,endTime:n}of e)(void 0===i||ra)&&(a=n);if(i&&a)if(5<(0,Lft.default)(a).diff((0,Lft.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 t=d.db.getDateFormat(),e=[],r=null,n=(0,Lft.default)(i);for(;n.valueOf()<=a;)d.db.isInvalidDate(n,t,h,u)?r?r.end=n:r={start:n,end:n}:r&&(e.push(r),r=null),n=n.add(1,"d");x.append("g").selectAll("rect").data(e).enter().append("rect").attr("id",function(t){return"exclude-"+t.start.format("YYYY-MM-DD")}).attr("x",function(t){return b(t.start)+l}).attr("y",p.gridLineStartPadding).attr("width",function(t){var e=t.end.add(1,"day");return b(e)-b(t.start)}).attr("height",c-o-p.gridLineStartPadding).attr("transform-origin",function(t,e){return(b(t.start)+l+.5*(b(t.end)-b(t.start))).toString()+"px "+(e*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function C(t,e,r,n){var i=sd(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(e4(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(zv.every(s));break;case"second":i.ticks(Gv.every(s));break;case"minute":i.ticks(Uv.every(s));break;case"hour":i.ticks(jv.every(s));break;case"day":i.ticks(Yv.every(s));break;case"week":i.ticks(Ift[l].every(s));break;case"month":i.ticks(yx.every(s))}}if(x.append("g").attr("class","grid").attr("transform","translate("+t+", "+(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=ad(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(e4(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(zv.every(h));break;case"second":c.ticks(Gv.every(h));break;case"minute":c.ticks(Uv.every(h));break;case"hour":c.ticks(jv.every(h));break;case"day":c.ticks(Yv.every(h));break;case"week":c.ticks(Ift[u].every(h));break;case"month":c.ticks(yx.every(h))}}x.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(r,n){let i=0,a=Object.keys(c).map(t=>[t,c[t]]);x.append("g").selectAll("text").data(a).enter().append(function(t){var e,r,n=-((t=t[0].split(L.lineBreakRegex)).length-1)/2,i=s.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for([e,r]of t.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0{Pft=me(t=>` .mermaid-main-font { font-family: ${t.fontFamily}; } @@ -1117,6 +1132,16 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l fill: ${t.taskTextDarkColor} !important; } + .vert { + stroke: ${t.vertLineColor}; + } + + .vertText { + font-size: 15px; + text-anchor: middle; + fill: ${t.vertLineColor} !important; + } + .activeCritText0, .activeCritText1, .activeCritText2, @@ -1130,8 +1155,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l fill: ${t.titleColor||t.textColor}; font-family: ${t.fontFamily}; } -`,"getStyles"),Pft=Oft}),zft={};lPt(zft,{diagram:()=>Gft});var Gft,Uft,qft,jft,Wft,Yft,Hft,Vft,Xft,Kft=t(()=>{a1t(),Bft(),Fft(),$ft(),Gft={parser:i1t,db:Sft,renderer:Dft,styles:Pft}}),Zft=t(()=>{Rpt(),e(),Uft={parse:me(async t=>{t=await Apt("info",t),M.debug(t)},"parse")}}),Qft=t(()=>{qft={name:"mermaid",version:"11.6.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.4",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",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",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.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"}}}),Jft=t(()=>{Qft(),jft={version:qft.version},Wft=me(()=>jft.version,"getVersion"),Yft={getVersion:Wft}}),tmt=t(()=>{Z3(),fu(),Hft=me(t=>{let e=D().securityLevel,r=j("body"),i;return"sandbox"===e&&(i=j("#i"+t).node()?.contentDocument??document,r=j(i.body)),r.select("#"+t)},"selectSvgElement")}),emt=t(()=>{e(),tmt(),th(),Vft=me((t,e,r)=>{M.debug(`rendering info diagram -`+t),t=Hft(e),Hc(t,100,400,!0),t.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"),Xft={draw:Vft}}),rmt={};lPt(rmt,{diagram:()=>imt});var imt,nmt,amt,smt,omt,lmt,cmt,hmt,umt,dmt,pmt,gmt,fmt,mmt,ymt,vmt,xmt,bmt,wmt,kmt=t(()=>{Zft(),Jft(),emt(),imt={parser:Uft,db:Yft,renderer:Xft}}),Tmt=t(()=>{e(),gu(),_i(),lmt=mr.pie,nmt={sections:new Map,showData:!1,config:lmt},amt=nmt.sections,smt=nmt.showData,omt=structuredClone(lmt),lmt=me(()=>structuredClone(omt),"getConfig"),cmt=me(()=>{amt=new Map,smt=nmt.showData,oh()},"clear"),hmt=me(({label:t,value:e})=>{amt.has(t)||(amt.set(t,e),M.debug(`added new section: ${t}, with value: `+e))},"addSection"),umt=me(()=>amt,"getSections"),dmt=me(t=>{smt=t},"setShowData"),pmt=me(()=>smt,"getShowData"),gmt={getConfig:lmt,clear:cmt,setDiagramTitle:dh,getDiagramTitle:ph,setAccTitle:lh,getAccTitle:ch,setAccDescription:hh,getAccDescription:uh,addSection:hmt,getSections:umt,setShowData:dmt,getShowData:pmt}}),Emt=t(()=>{Rpt(),e(),Ppt(),Tmt(),fmt=me((t,e)=>{Mpt(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),mmt={parse:me(async t=>{t=await Apt("pie",t),M.debug(t),fmt(t,gmt)},"parse")}}),Cmt=t(()=>{ymt=me(t=>` +`,"getStyles"),Bft=Pft}),Gft={};oPt(Gft,{diagram:()=>Uft});var Uft,qft,jft,Wft,Yft,Hft,Vft,Xft,Kft,Zft=t(()=>{s1t(),Fft(),$ft(),zft(),Uft={parser:i1t,db:Aft,renderer:Oft,styles:Bft}}),Qft=t(()=>{Mpt(),e(),qft={parse:me(async t=>{t=await Lpt("info",t),M.debug(t)},"parse")}}),Jft=t(()=>{jft={name:"mermaid",version:"11.7.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.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",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",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.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"}}}),tmt=t(()=>{Jft(),Wft={version:jft.version+""},Yft=me(()=>Wft.version,"getVersion"),Hft={getVersion:Yft}}),emt=t(()=>{Q3(),mu(),Vft=me(t=>{let e=D().securityLevel,r=H("body"),n;return"sandbox"===e&&(n=H("#i"+t).node()?.contentDocument??document,r=H(n.body)),r.select("#"+t)},"selectSvgElement")}),rmt=t(()=>{e(),emt(),eh(),Xft=me((t,e,r)=>{M.debug(`rendering info diagram +`+t),t=Vft(e),Vc(t,100,400,!0),t.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"),Kft={draw:Xft}}),nmt={};oPt(nmt,{diagram:()=>imt});var imt,amt,smt,omt,lmt,cmt,hmt,umt,dmt,pmt,gmt,fmt,mmt,ymt,vmt,xmt,bmt,wmt,kmt,Tmt=t(()=>{Qft(),tmt(),rmt(),imt={parser:qft,db:Hft,renderer:Kft}}),Emt=t(()=>{e(),fu(),An(),cmt=yr.pie,amt={sections:new Map,showData:!1,config:cmt},smt=amt.sections,omt=amt.showData,lmt=structuredClone(cmt),cmt=me(()=>structuredClone(lmt),"getConfig"),hmt=me(()=>{smt=new Map,omt=amt.showData,lh()},"clear"),umt=me(({label:t,value:e})=>{smt.has(t)||(smt.set(t,e),M.debug(`added new section: ${t}, with value: `+e))},"addSection"),dmt=me(()=>smt,"getSections"),pmt=me(t=>{omt=t},"setShowData"),gmt=me(()=>omt,"getShowData"),fmt={getConfig:cmt,clear:hmt,setDiagramTitle:ph,getDiagramTitle:gh,setAccTitle:ch,getAccTitle:hh,setAccDescription:uh,getAccDescription:dh,addSection:umt,getSections:dmt,setShowData:pmt,getShowData:gmt}}),Cmt=t(()=>{Mpt(),e(),Bpt(),Emt(),mmt=me((t,e)=>{Dpt(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),ymt={parse:me(async t=>{t=await Lpt("pie",t),M.debug(t),mmt(t,fmt)},"parse")}}),_mt=t(()=>{vmt=me(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; @@ -1159,25 +1184,25 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l font-family: ${t.fontFamily}; font-size: ${t.pieLegendTextSize}; } -`,"getStyles"),vmt=ymt}),_mt=t(()=>{Z3(),fu(),e(),tmt(),th(),KE(),xmt=me(t=>(t=[...t.entries()].map(t=>({label:t[0],value:t[1]})).sort((t,e)=>e.value-t.value),e5().value(t=>t.value)(t)),"createPieArcs"),bmt=me((t,e,r,i)=>{M.debug(`rendering pie chart -`+t);let n=i.db,a=D(),s=xE(n.getConfig(),a.pie),o=Hft(e),l=o.append("g");l.attr("transform","translate(225,225)");var t=a.themeVariables,[i]=WE(t.pieOuterStrokeWidth);i??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=$4().innerRadius(0).outerRadius(h),d=$4().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+i/2).attr("class","pieOuterCircle"),n.getSections()),g=xmt(p),f=[t.pie1,t.pie2,t.pie3,t.pie4,t.pie5,t.pie6,t.pie7,t.pie8,t.pie9,t.pie10,t.pie11,t.pie12],m=hv(f),y=(l.selectAll("mySlices").data(g).enter().append("path").attr("d",u).attr("fill",t=>m(t.data.label)).attr("class","pieCircle"),0);p.forEach(t=>{y+=t}),l.selectAll("mySlices").data(g).enter().append("text").text(t=>(t.data.value/y*100).toFixed(0)+"%").attr("transform",t=>"translate("+d.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),(e=l.selectAll(".legend").data(m.domain()).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*m.domain().length/2)+")")).append("rect").attr("width",18).attr("height",18).style("fill",m).style("stroke",m),e.data(g).append("text").attr("x",22).attr("y",14).text(t=>{var{label:t,value:e}=t.data;return n.getShowData()?t+` [${e}]`:t}),t=512+(i=Math.max(...e.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0))),o.attr("viewBox",`0 0 ${t} 450`),Hc(o,450,t,s.useMaxWidth)},"draw"),wmt={draw:bmt}}),Smt={};lPt(Smt,{diagram:()=>Amt});var Amt,Lmt,Nmt,Imt,Rmt,Mmt=t(()=>{Emt(),Tmt(),Cmt(),_mt(),Amt={parser:mmt,db:gmt,renderer:wmt,styles:vmt}}),Dmt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[1,3],i=[1,4],n=[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],F=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],$=[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],tt=[1,67],et=[1,68],rt=[1,69],it=[1,70],nt=[1,71],at=[1,72],st=[1,73],ot=[1,74],lt=[1,75],ct=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],C=[1,90],_=[1,91],S=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],R=[1,95],M=[1,97],D=[1,98],ht=[1,102],ut=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 23:this.$=a[o];break;case 24:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],i.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),i.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 46:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:i.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:i.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:i.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:i.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:i.setXAxisLeftText(a[o-2]),i.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",i.setXAxisLeftText(a[o-1]);break;case 53:i.setXAxisLeftText(a[o]);break;case 54:i.setYAxisBottomText(a[o-2]),i.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",i.setYAxisBottomText(a[o-1]);break;case 56:i.setYAxisBottomText(a[o]);break;case 57:i.setQuadrant1Text(a[o]);break;case 58:i.setQuadrant2Text(a[o]);break;case 59:i.setQuadrant3Text(a[o]);break;case 60:i.setQuadrant4Text(a[o]);break;case 64:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 66:this.$={text:a[o],type:"text"};break;case 67:this.$={text:a[o],type:"markdown"};break;case 68:this.$=a[o];break;case 69:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[{18:r,26:1,27:2,28:i,55:n,56:a,57:s},{1:[3]},{18:r,26:8,27:2,28:i,55:n,56:a,57:s},{18:r,26:9,27:2,28:i,55:n,56:a,57:s},e(P,[2,33],{29:10}),e(B,[2,61]),e(B,[2,62]),e(B,[2,63]),{1:[2,30]},{1:[2,31]},e(o,F,{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:$,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}),e(P,[2,34]),{27:45,55:n,56:a,57:s},e(o,[2,37]),e(o,F,{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:$,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}),e(o,[2,39]),e(o,[2,40]),e(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(o,[2,45]),e(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},e(T,[2,64]),e(T,[2,66]),e(T,[2,67]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(T,[2,79]),e(T,[2,80]),e(P,[2,35]),e(o,[2,38]),e(o,[2,42]),e(o,[2,43]),e(o,[2,44]),{3:64,4:Q,5:J,6:tt,7:et,8:rt,9:it,10:nt,11:at,12:st,13:ot,14:lt,15:ct,21:63},e(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}),e(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}),e(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}),e(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}),e(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}),e(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]},e(T,[2,65]),e(T,[2,81]),e(T,[2,82]),e(T,[2,83]),{3:82,4:Q,5:J,6:tt,7:et,8:rt,9:it,10:nt,11:at,12:st,13:ot,14:lt,15:ct,18:[1,81]},e(E,[2,23]),e(E,[2,1]),e(E,[2,2]),e(E,[2,3]),e(E,[2,4]),e(E,[2,5]),e(E,[2,6]),e(E,[2,7]),e(E,[2,8]),e(E,[2,9]),e(E,[2,10]),e(E,[2,11]),e(E,[2,12]),e(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}),e(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:_,6:S,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:88,23:87},e(E,[2,24]),e(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}),e(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}),e(o,[2,47],{22:88,16:89,23:100,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{46:[1,101]},e(o,[2,29],{10:ht}),e(ut,[2,27],{16:103,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),e(O,[2,25]),e(O,[2,13]),e(O,[2,14]),e(O,[2,15]),e(O,[2,16]),e(O,[2,17]),e(O,[2,18]),e(O,[2,19]),e(O,[2,20]),e(O,[2,21]),e(O,[2,22]),e(o,[2,49],{10:ht}),e(o,[2,48],{22:88,16:89,23:104,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{4:C,5:_,6:S,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:105},e(O,[2,26]),e(o,[2,50],{10:ht}),e(ut,[2,28],{16:103,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D})],defaultActions:{8:[2,30],9:[2,31]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{Q3(),mu(),e(),emt(),eh(),ZE(),bmt=me(t=>(t=[...t.entries()].map(t=>({label:t[0],value:t[1]})).sort((t,e)=>e.value-t.value),r5().value(t=>t.value)(t)),"createPieArcs"),wmt=me((t,e,r,n)=>{M.debug(`rendering pie chart +`+t);let i=n.db,a=D(),s=bE(i.getConfig(),a.pie),o=Vft(e),l=o.append("g");l.attr("transform","translate(225,225)");var t=a.themeVariables,[n]=YE(t.pieOuterStrokeWidth);n??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=z4().innerRadius(0).outerRadius(h),d=z4().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=bmt(p),f=[t.pie1,t.pie2,t.pie3,t.pie4,t.pie5,t.pie6,t.pie7,t.pie8,t.pie9,t.pie10,t.pie11,t.pie12],m=uv(f),y=(l.selectAll("mySlices").data(g).enter().append("path").attr("d",u).attr("fill",t=>m(t.data.label)).attr("class","pieCircle"),0);p.forEach(t=>{y+=t}),l.selectAll("mySlices").data(g).enter().append("text").text(t=>(t.data.value/y*100).toFixed(0)+"%").attr("transform",t=>"translate("+d.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),(e=l.selectAll(".legend").data(m.domain()).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*m.domain().length/2)+")")).append("rect").attr("width",18).attr("height",18).style("fill",m).style("stroke",m),e.data(g).append("text").attr("x",22).attr("y",14).text(t=>{var{label:t,value:e}=t.data;return i.getShowData()?t+` [${e}]`:t}),t=512+(n=Math.max(...e.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0))),o.attr("viewBox",`0 0 ${t} 450`),Vc(o,450,t,s.useMaxWidth)},"draw"),kmt={draw:wmt}}),Amt={};oPt(Amt,{diagram:()=>Lmt});var Lmt,Nmt,Imt,Rmt,Mmt,Dmt=t(()=>{Cmt(),Emt(),_mt(),Smt(),Lmt={parser:ymt,db:fmt,renderer:kmt,styles:xmt}}),Omt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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],F=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],$=[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],tt=[1,67],et=[1,68],rt=[1,69],nt=[1,70],it=[1,71],at=[1,72],st=[1,73],ot=[1,74],lt=[1,75],ct=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],C=[1,90],_=[1,91],S=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],R=[1,95],M=[1,97],D=[1,98],ht=[1,102],ut=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:me(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:me(function(t,e,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},e(P,[2,33],{29:10}),e(B,[2,61]),e(B,[2,62]),e(B,[2,63]),{1:[2,30]},{1:[2,31]},e(o,F,{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:$,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}),e(P,[2,34]),{27:45,55:i,56:a,57:s},e(o,[2,37]),e(o,F,{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:$,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}),e(o,[2,39]),e(o,[2,40]),e(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(o,[2,45]),e(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},e(T,[2,64]),e(T,[2,66]),e(T,[2,67]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(T,[2,79]),e(T,[2,80]),e(P,[2,35]),e(o,[2,38]),e(o,[2,42]),e(o,[2,43]),e(o,[2,44]),{3:64,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:st,13:ot,14:lt,15:ct,21:63},e(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}),e(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}),e(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}),e(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}),e(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}),e(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]},e(T,[2,65]),e(T,[2,81]),e(T,[2,82]),e(T,[2,83]),{3:82,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:st,13:ot,14:lt,15:ct,18:[1,81]},e(E,[2,23]),e(E,[2,1]),e(E,[2,2]),e(E,[2,3]),e(E,[2,4]),e(E,[2,5]),e(E,[2,6]),e(E,[2,7]),e(E,[2,8]),e(E,[2,9]),e(E,[2,10]),e(E,[2,11]),e(E,[2,12]),e(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}),e(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:_,6:S,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:88,23:87},e(E,[2,24]),e(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}),e(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}),e(o,[2,47],{22:88,16:89,23:100,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{46:[1,101]},e(o,[2,29],{10:ht}),e(ut,[2,27],{16:103,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),e(O,[2,25]),e(O,[2,13]),e(O,[2,14]),e(O,[2,15]),e(O,[2,16]),e(O,[2,17]),e(O,[2,18]),e(O,[2,19]),e(O,[2,20]),e(O,[2,21]),e(O,[2,22]),e(o,[2,49],{10:ht}),e(o,[2,48],{22:88,16:89,23:104,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{4:C,5:_,6:S,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:105},e(O,[2,26]),e(o,[2,50],{10:ht}),e(ut,[2,28],{16:103,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D})],defaultActions:{8:[2,30],9:[2,31]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0 *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=i,me(t,"Parser"),(Lmt=new((t.prototype=r).Parser=t)).parser=Lmt,Nmt=Lmt}),Omt=t(()=>{Z3(),_i(),e(),wi(),Imt=sr(),Rmt=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{me(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:mr.quadrantChart?.chartWidth||500,chartWidth:mr.quadrantChart?.chartHeight||500,titlePadding:mr.quadrantChart?.titlePadding||10,titleFontSize:mr.quadrantChart?.titleFontSize||20,quadrantPadding:mr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:mr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:mr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:mr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:mr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:mr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:mr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:mr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:mr.quadrantChart?.pointLabelFontSize||12,pointRadius:mr.quadrantChart?.pointRadius||5,xAxisPosition:mr.quadrantChart?.xAxisPosition||"top",yAxisPosition:mr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:mr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:mr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Imt.quadrant1Fill,quadrant2Fill:Imt.quadrant2Fill,quadrant3Fill:Imt.quadrant3Fill,quadrant4Fill:Imt.quadrant4Fill,quadrant1TextFill:Imt.quadrant1TextFill,quadrant2TextFill:Imt.quadrant2TextFill,quadrant3TextFill:Imt.quadrant3TextFill,quadrant4TextFill:Imt.quadrant4TextFill,quadrantPointFill:Imt.quadrantPointFill,quadrantPointTextFill:Imt.quadrantPointTextFill,quadrantXAxisTextFill:Imt.quadrantXAxisTextFill,quadrantYAxisTextFill:Imt.quadrantYAxisTextFill,quadrantTitleFill:Imt.quadrantTitleFill,quadrantInternalBorderStrokeFill:Imt.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Imt.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,M.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){M.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){M.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,i){var n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,t={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},e=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,n={left:"left"===this.config.yAxisPosition&&r?e:0,right:"right"===this.config.yAxisPosition&&r?e:0},r=this.config.titleFontSize+2*this.config.titlePadding,e={top:i?r:0},i=this.config.quadrantPadding+n.left,r=this.config.quadrantPadding+t.top+e.top,a=this.config.chartWidth-2*this.config.quadrantPadding-n.left-n.right,s=this.config.chartHeight-2*this.config.quadrantPadding-t.top-t.bottom-e.top;return{xAxisSpace:t,yAxisSpace:n,titleSpace:e,quadrantSpace:{quadrantLeft:i,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(t,e,r,i){var{quadrantSpace:i,titleSpace:n}=i,{quadrantHalfHeight:i,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:c}=i,h=!!this.data.xAxisRightText,u=!!this.data.yAxisTopText,d=[];return this.data.xAxisLeftText&&e&&d.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(h?o/2:0),y:"top"===t?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(h?o/2:0),y:"top"===t?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&d.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+a-(u?i/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&d.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+i-(u?i/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(t){var e,{quadrantHalfHeight:t,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:n}=t=t.quadrantSpace;for(e of r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+i,y:n,width:i,height:t,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:n,width:i,height:t,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:n+t,width:i,height:t,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+i,y:n+t,width:i,height:t,fill:this.themeConfig.quadrant4Fill}])e.text.x=e.x+e.width/2,0===this.data.points.length?(e.text.y=e.y+e.height/2,e.text.horizontalPos="middle"):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos="top");return r}getQuadrantPoints(t){let e=t.quadrantSpace,{quadrantHeight:r,quadrantLeft:i,quadrantTop:n,quadrantWidth:a}=e,s=Rv().domain([0,1]).range([i,a+i]),o=Rv().domain([0,1]).range([r+n,n]);return this.data.points.map(t=>{var e=this.classes.get(t.className);return e&&(t={...e,...t}),{x:s(t.x),y:o(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:s(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){var e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:t,quadrantHeight:r,quadrantLeft:i,quadrantHalfWidth:n,quadrantTop:a,quadrantWidth:s}=t=t.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i-e,y1:a,x2:i+s+e,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i+s,y1:a+e,x2:i+s,y2:a+r-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i-e,y1:a+r,x2:i+s+e,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i,y1:a+e,x2:i,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:i+n,y1:a+e,x2:i+n,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:i+e,y1:a+t,x2:i+s-e,y2:a+t}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){var t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,i=0{$mt=class extends Error{static{me(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},me(Pmt,"validateHexCode"),me(Bmt,"validateNumber"),me(Fmt,"validateSizeInPixels")});function Gmt(t){return _c(t.trim(),ryt)}function Umt(t){iyt.setData({quadrant1Text:Gmt(t.text)})}function qmt(t){iyt.setData({quadrant2Text:Gmt(t.text)})}function jmt(t){iyt.setData({quadrant3Text:Gmt(t.text)})}function Wmt(t){iyt.setData({quadrant4Text:Gmt(t.text)})}function Ymt(t){iyt.setData({xAxisLeftText:Gmt(t.text)})}function Hmt(t){iyt.setData({xAxisRightText:Gmt(t.text)})}function Vmt(t){iyt.setData({yAxisTopText:Gmt(t.text)})}function Xmt(t){iyt.setData({yAxisBottomText:Gmt(t.text)})}function Kmt(t){var e,r={};for(e of t){var[i,n]=e.trim().split(/\s*:\s*/);if("radius"===i){if(Bmt(n))throw new $mt(i,n,"number");r.radius=parseInt(n)}else if("color"===i){if(Pmt(n))throw new $mt(i,n,"hex code");r.color=n}else if("stroke-color"===i){if(Pmt(n))throw new $mt(i,n,"hex code");r.strokeColor=n}else{if("stroke-width"!==i)throw new Error(`style named ${i} is not supported.`);if(Fmt(n))throw new $mt(i,n,"number of pixels (eg. 10px)");r.strokeWidth=n}}return r}function Zmt(t,e,r,i,n){n=Kmt(n),iyt.addPoints([{x:r,y:i,text:Gmt(t.text),className:e,...n}])}function Qmt(t,e){iyt.addClass(t,Kmt(e))}function Jmt(t){iyt.setConfig({chartWidth:t})}function tyt(t){iyt.setConfig({chartHeight:t})}function eyt(){var{themeVariables:t,quadrantChart:e}=D();return e&&iyt.setConfig(e),iyt.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),iyt.setData({titleText:ph()}),iyt.build()}var ryt,iyt,nyt,ayt,syt,oyt,lyt=t(()=>{fu(),Jc(),gu(),Omt(),zmt(),ryt=D(),me(Gmt,"textSanitizer"),iyt=new Rmt,me(Umt,"setQuadrant1Text"),me(qmt,"setQuadrant2Text"),me(jmt,"setQuadrant3Text"),me(Wmt,"setQuadrant4Text"),me(Ymt,"setXAxisLeftText"),me(Hmt,"setXAxisRightText"),me(Vmt,"setYAxisTopText"),me(Xmt,"setYAxisBottomText"),me(Kmt,"parseStyles"),me(Zmt,"addPoint"),me(Qmt,"addClass"),me(Jmt,"setWidth"),me(tyt,"setHeight"),me(eyt,"getQuadrantData"),nyt=me(function(){iyt.clear(),oh()},"clear"),ayt={setWidth:Jmt,setHeight:tyt,setQuadrant1Text:Umt,setQuadrant2Text:qmt,setQuadrant3Text:jmt,setQuadrant4Text:Wmt,setXAxisLeftText:Ymt,setXAxisRightText:Hmt,setYAxisTopText:Vmt,setYAxisBottomText:Xmt,parseStyles:Kmt,addPoint:Zmt,addClass:Qmt,getQuadrantData:eyt,clear:nyt,setAccTitle:lh,getAccTitle:ch,setDiagramTitle:dh,getDiagramTitle:ph,getAccDescription:uh,setAccDescription:hh}}),cyt=t(()=>{Z3(),fu(),e(),th(),syt=me((t,e,r,i)=>{function n(t){return"top"===t?"hanging":"middle"}function a(t){return"left"===t?"start":"middle"}function s(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}me(n,"getDominantBaseLine"),me(a,"getTextAnchor"),me(s,"getTransformation");var o=D();M.debug(`Rendering quadrant chart -`+t);let l=o.securityLevel,c;"sandbox"===l&&(c=j("#i"+e));var e=(t=j("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)).append("g").attr("class","main"),h=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(Hc(t,u,h,o.quadrantChart?.useMaxWidth??!0),t.attr("viewBox","0 0 "+h+" "+u),i.db.setHeight(u),i.db.setWidth(h),i.db.getQuadrantData()),t=e.append("g").attr("class","quadrants"),u=e.append("g").attr("class","border"),h=e.append("g").attr("class","data-points"),i=e.append("g").attr("class","labels"),e=e.append("g").attr("class","title");o.title&&e.append("text").attr("x",0).attr("y",0).attr("fill",o.title.fill).attr("font-size",o.title.fontSize).attr("dominant-baseline",n(o.title.horizontalPos)).attr("text-anchor",a(o.title.verticalPos)).attr("transform",s(o.title)).text(o.title.text),o.borderLines&&u.selectAll("line").data(o.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth),(e=t.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),e.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>n(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text)).text(t=>t.text.text),i.selectAll("g.label").data(o.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>n(t.horizontalPos)).attr("text-anchor",t=>a(t.verticalPos)).attr("transform",t=>s(t)),(u=h.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>n(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text))},"draw"),oyt={draw:syt}}),hyt={};lPt(hyt,{diagram:()=>uyt});var uyt,dyt,pyt,gyt=t(()=>{Dmt(),lyt(),cyt(),uyt={parser:Nmt,db:ayt,renderer:oyt,styles:me(()=>"","styles")}}),fyt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[1,10,12,14,16,18,19,21,23],i=[2,6],n=[1,3],a=[1,5],s=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],g=[1,31],f=[1,32],m=[1,33],y=[1,34],v=[1,35],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],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],i={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 5:i.setOrientation(a[o]);break;case 9:i.setDiagramTitle(a[o].text.trim());break;case 12:i.setLineData({text:"",type:"text"},a[o]);break;case 13:i.setLineData(a[o-1],a[o]);break;case 14:i.setBarData({text:"",type:"text"},a[o]);break;case 15:i.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 19:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:i.setXAxisTitle(a[o]);break;case 23:i.setXAxisTitle(a[o-1]);break;case 24:i.setXAxisTitle({type:"text",text:""});break;case 25:i.setXAxisBand(a[o]);break;case 26:i.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 27:this.$=a[o-1];break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:i.setYAxisTitle(a[o]);break;case 31:i.setYAxisTitle(a[o-1]);break;case 32:i.setYAxisTitle({type:"text",text:""});break;case 33:i.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[e(r,i,{3:1,4:2,7:4,5:n,34:a,35:s,36:o}),{1:[3]},e(r,i,{4:2,7:4,3:8,5:n,34:a,35:s,36:o}),e(r,i,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:a,35:s,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(l,[2,34]),e(l,[2,35]),e(l,[2,36]),{1:[2,1]},e(r,i,{4:2,7:4,3:21,5:n,34:a,35:s,36:o}),{1:[2,3]},e(l,[2,5]),e(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]},e(C,[2,18]),{1:[2,2]},e(C,[2,8]),e(C,[2,9]),e(_,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),e(_,[2,38]),e(_,[2,39]),e(S,[2,40]),e(S,[2,42]),e(S,[2,43]),e(S,[2,44]),e(S,[2,45]),e(S,[2,46]),e(S,[2,47]),e(S,[2,48]),e(S,[2,49]),e(S,[2,50]),e(S,[2,51]),e(C,[2,10]),e(C,[2,22],{30:41,29:56,24:w,27:k}),e(C,[2,24]),e(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},e(C,[2,11]),e(C,[2,30],{33:60,27:T}),e(C,[2,32]),{31:[1,61]},e(C,[2,12]),{17:62,24:E},{25:63,27:A},e(C,[2,14]),{17:65,24:E},e(C,[2,16]),e(C,[2,17]),e(S,[2,41]),e(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(C,[2,31]),{27:[1,69]},e(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(C,[2,15]),e(C,[2,26]),e(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},e(C,[2,33]),e(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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0 *)/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,me(t,"Parser"),(Nmt=new((t.prototype=r).Parser=t)).parser=Nmt,Imt=Nmt}),Pmt=t(()=>{Q3(),An(),e(),Tn(),Rmt=or(),Mmt=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{me(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:Rmt.quadrant1Fill,quadrant2Fill:Rmt.quadrant2Fill,quadrant3Fill:Rmt.quadrant3Fill,quadrant4Fill:Rmt.quadrant4Fill,quadrant1TextFill:Rmt.quadrant1TextFill,quadrant2TextFill:Rmt.quadrant2TextFill,quadrant3TextFill:Rmt.quadrant3TextFill,quadrant4TextFill:Rmt.quadrant4TextFill,quadrantPointFill:Rmt.quadrantPointFill,quadrantPointTextFill:Rmt.quadrantPointTextFill,quadrantXAxisTextFill:Rmt.quadrantXAxisTextFill,quadrantYAxisTextFill:Rmt.quadrantYAxisTextFill,quadrantTitleFill:Rmt.quadrantTitleFill,quadrantInternalBorderStrokeFill:Rmt.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Rmt.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,M.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){M.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){M.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,n){var i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,t={top:"top"===t&&e?i:0,bottom:"bottom"===t&&e?i:0},e=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,i={left:"left"===this.config.yAxisPosition&&r?e:0,right:"right"===this.config.yAxisPosition&&r?e:0},r=this.config.titleFontSize+2*this.config.titlePadding,e={top:n?r:0},n=this.config.quadrantPadding+i.left,r=this.config.quadrantPadding+t.top+e.top,a=this.config.chartWidth-2*this.config.quadrantPadding-i.left-i.right,s=this.config.chartHeight-2*this.config.quadrantPadding-t.top-t.bottom-e.top;return{xAxisSpace:t,yAxisSpace:i,titleSpace:e,quadrantSpace:{quadrantLeft:n,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(t,e,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&&e&&d.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(h?o/2:0),y:"top"===t?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&&e&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(h?o/2:0),y:"top"===t?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(t){var e,{quadrantHalfHeight:t,quadrantLeft:r,quadrantHalfWidth:n,quadrantTop:i}=t=t.quadrantSpace;for(e 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:t,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:t,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+t,width:n,height:t,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+t,width:n,height:t,fill:this.themeConfig.quadrant4Fill}])e.text.x=e.x+e.width/2,0===this.data.points.length?(e.text.y=e.y+e.height/2,e.text.horizontalPos="middle"):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos="top");return r}getQuadrantPoints(t){let e=t.quadrantSpace,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:a}=e,s=Mv().domain([0,1]).range([n,a+n]),o=Mv().domain([0,1]).range([r+i,i]);return this.data.points.map(t=>{var e=this.classes.get(t.className);return e&&(t={...e,...t}),{x:s(t.x),y:o(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:s(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){var e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:t,quadrantHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a,quadrantWidth:s}=t=t.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a,x2:n+s+e,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+s,y1:a+e,x2:n+s,y2:a+r-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a+r,x2:n+s+e,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n,y1:a+e,x2:n,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+i,y1:a+e,x2:n+i,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+e,y1:a+t,x2:n+s-e,y2:a+t}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){var t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=0{zmt=class extends Error{static{me(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},me(Bmt,"validateHexCode"),me(Fmt,"validateNumber"),me($mt,"validateSizeInPixels")});function Umt(t){return Sc(t.trim(),nyt)}function qmt(t){iyt.setData({quadrant1Text:Umt(t.text)})}function jmt(t){iyt.setData({quadrant2Text:Umt(t.text)})}function Wmt(t){iyt.setData({quadrant3Text:Umt(t.text)})}function Ymt(t){iyt.setData({quadrant4Text:Umt(t.text)})}function Hmt(t){iyt.setData({xAxisLeftText:Umt(t.text)})}function Vmt(t){iyt.setData({xAxisRightText:Umt(t.text)})}function Xmt(t){iyt.setData({yAxisTopText:Umt(t.text)})}function Kmt(t){iyt.setData({yAxisBottomText:Umt(t.text)})}function Zmt(t){var e,r={};for(e of t){var[n,i]=e.trim().split(/\s*:\s*/);if("radius"===n){if(Fmt(i))throw new zmt(n,i,"number");r.radius=parseInt(i)}else if("color"===n){if(Bmt(i))throw new zmt(n,i,"hex code");r.color=i}else if("stroke-color"===n){if(Bmt(i))throw new zmt(n,i,"hex code");r.strokeColor=i}else{if("stroke-width"!==n)throw new Error(`style named ${n} is not supported.`);if($mt(i))throw new zmt(n,i,"number of pixels (eg. 10px)");r.strokeWidth=i}}return r}function Qmt(t,e,r,n,i){i=Zmt(i),iyt.addPoints([{x:r,y:n,text:Umt(t.text),className:e,...i}])}function Jmt(t,e){iyt.addClass(t,Zmt(e))}function tyt(t){iyt.setConfig({chartWidth:t})}function eyt(t){iyt.setConfig({chartHeight:t})}function ryt(){var{themeVariables:t,quadrantChart:e}=D();return e&&iyt.setConfig(e),iyt.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),iyt.setData({titleText:gh()}),iyt.build()}var nyt,iyt,ayt,syt,oyt,lyt,cyt=t(()=>{mu(),th(),fu(),Pmt(),Gmt(),nyt=D(),me(Umt,"textSanitizer"),iyt=new Mmt,me(qmt,"setQuadrant1Text"),me(jmt,"setQuadrant2Text"),me(Wmt,"setQuadrant3Text"),me(Ymt,"setQuadrant4Text"),me(Hmt,"setXAxisLeftText"),me(Vmt,"setXAxisRightText"),me(Xmt,"setYAxisTopText"),me(Kmt,"setYAxisBottomText"),me(Zmt,"parseStyles"),me(Qmt,"addPoint"),me(Jmt,"addClass"),me(tyt,"setWidth"),me(eyt,"setHeight"),me(ryt,"getQuadrantData"),ayt=me(function(){iyt.clear(),lh()},"clear"),syt={setWidth:tyt,setHeight:eyt,setQuadrant1Text:qmt,setQuadrant2Text:jmt,setQuadrant3Text:Wmt,setQuadrant4Text:Ymt,setXAxisLeftText:Hmt,setXAxisRightText:Vmt,setYAxisTopText:Xmt,setYAxisBottomText:Kmt,parseStyles:Zmt,addPoint:Qmt,addClass:Jmt,getQuadrantData:ryt,clear:ayt,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh}}),hyt=t(()=>{Q3(),mu(),e(),eh(),oyt=me((t,e,r,n)=>{function i(t){return"top"===t?"hanging":"middle"}function a(t){return"left"===t?"start":"middle"}function s(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}me(i,"getDominantBaseLine"),me(a,"getTextAnchor"),me(s,"getTransformation");var o=D();M.debug(`Rendering quadrant chart +`+t);let l=o.securityLevel,c;"sandbox"===l&&(c=H("#i"+e));var e=(t=H("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)).append("g").attr("class","main"),h=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(Vc(t,u,h,o.quadrantChart?.useMaxWidth??!0),t.attr("viewBox","0 0 "+h+" "+u),n.db.setHeight(u),n.db.setWidth(h),n.db.getQuadrantData()),t=e.append("g").attr("class","quadrants"),u=e.append("g").attr("class","border"),h=e.append("g").attr("class","data-points"),n=e.append("g").attr("class","labels"),e=e.append("g").attr("class","title");o.title&&e.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",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth),(e=t.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),e.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text)).text(t=>t.text.text),n.selectAll("g.label").data(o.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>i(t.horizontalPos)).attr("text-anchor",t=>a(t.verticalPos)).attr("transform",t=>s(t)),(u=h.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text))},"draw"),lyt={draw:oyt}}),uyt={};oPt(uyt,{diagram:()=>dyt});var dyt,pyt,gyt,fyt=t(()=>{Omt(),cyt(),hyt(),dyt={parser:Imt,db:syt,renderer:lyt,styles:me(()=>"","styles")}}),myt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[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:me(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:me(function(t,e,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:[e(r,n,{3:1,4:2,7:4,5:i,34:a,35:s,36:o}),{1:[3]},e(r,n,{4:2,7:4,3:8,5:i,34:a,35:s,36:o}),e(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]},e(l,[2,34]),e(l,[2,35]),e(l,[2,36]),{1:[2,1]},e(r,n,{4:2,7:4,3:21,5:i,34:a,35:s,36:o}),{1:[2,3]},e(l,[2,5]),e(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]},e(C,[2,18]),{1:[2,2]},e(C,[2,8]),e(C,[2,9]),e(_,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),e(_,[2,38]),e(_,[2,39]),e(S,[2,40]),e(S,[2,42]),e(S,[2,43]),e(S,[2,44]),e(S,[2,45]),e(S,[2,46]),e(S,[2,47]),e(S,[2,48]),e(S,[2,49]),e(S,[2,50]),e(S,[2,51]),e(C,[2,10]),e(C,[2,22],{30:41,29:56,24:w,27:k}),e(C,[2,24]),e(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},e(C,[2,11]),e(C,[2,30],{33:60,27:T}),e(C,[2,32]),{31:[1,61]},e(C,[2,12]),{17:62,24:E},{25:63,27:A},e(C,[2,14]),{17:65,24:E},e(C,[2,16]),e(C,[2,17]),e(S,[2,41]),e(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(C,[2,31]),{27:[1,69]},e(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(C,[2,15]),e(C,[2,26]),e(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},e(C,[2,33]),e(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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,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}}};i.lexer=n,me(t,"Parser"),(dyt=new((t.prototype=i).Parser=t)).parser=dyt,pyt=dyt});function myt(t){return"bar"===t.type}function yyt(t){return"band"===t.type}function vyt(t){return"linear"===t.type}var xyt,byt,wyt,kyt,Tyt=t(()=>{me(myt,"isBarPlot"),me(yyt,"isBandAxisData"),me(vyt,"isLinearAxisData")}),Eyt=t(()=>{W9(),xyt=class{constructor(t){this.parentGroup=t}static{me(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((t,e)=>Math.max(e.length,t),0)*e,height:e};var r,i={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(r of t){var a=(s=z9(n,1,r))?s.width:r.length*e,s=s?s.height:e;i.width=Math.max(i.width,a),i.height=Math.max(i.height,s)}return n.remove(),i}}}),Cyt=t(()=>{byt=class{constructor(t,e,r,i){this.axisConfig=t,this.title=e,this.textDimensionCalculator=r,this.axisThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{me(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){var t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;var r,i;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),i=.2*t.width,this.outerPadding=Math.min(r.width/2,i),i=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,i<=e)&&(e-=i,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(i=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,i<=e)&&(e-=i,this.showTitle=!0),this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;var r,i;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),i=.2*t.height,this.outerPadding=Math.min(r.height/2,i),(i=r.width+2*this.axisConfig.labelPadding)<=e)&&(e-=i,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(i=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,i<=e)&&(e-=i,this.showTitle=!0),this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){var t,r=[];if(this.showAxisLine&&(t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${e},${this.getScaleValue(t)} L ${e-this.axisConfig.tickLength},`+this.getScaleValue(t),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 t,r=[];if(this.showAxisLine&&(t=this.boundingRect.y+this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),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 e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e} L ${this.getScaleValue(t)},`+(e+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 t,r=[];if(this.showAxisLine&&(t=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},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+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 e=this.boundingRect.y;r.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},`+(e+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():[]}}}),_yt=t(()=>{Z3(),e(),Cyt(),wyt=class extends byt{static{me(this,"BandAxis")}constructor(t,e,r,i,n){super(t,i,n,e),this.categories=r,this.scale=pv().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=pv().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(t){return this.scale(t)??this.getRange()[0]}}}),Syt=t(()=>{Z3(),Cyt(),kyt=class extends byt{static{me(this,"LinearAxis")}constructor(t,e,r,i,n){super(t,i,n,e),this.domain=r,this.scale=Rv().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=Rv().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function Ayt(t,e,r,i){return i=new xyt(i),yyt(t)?new wyt(e,r,t.categories,t.title,i):new kyt(e,r,[t.min,t.max],t.title,i)}var Lyt=t(()=>{Tyt(),Eyt(),_yt(),Syt(),me(Ayt,"getAxis")});function Nyt(t,e,r,i){return i=new xyt(i),new Iyt(i,t,e,r)}var Iyt,Ryt,Myt,Dyt=t(()=>{Eyt(),Iyt=class{constructor(t,e,r,i){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{me(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){var e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),t=Math.max(e.width,t.width),r=e.height+2*this.chartConfig.titlePadding;return e.width<=t&&e.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=t,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){var t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},me(Nyt,"getChartTitleComponent")}),Oyt=t(()=>{Z3(),Ryt=class{constructor(t,e,r,i,n){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=i,this.plotIndex=n}static{me(this,"LinePlot")}getDrawableElement(){var t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);return(t=("horizontal"===this.orientation?X4().y(t=>t[0]).x(t=>t[1]):X4().x(t=>t[0]).y(t=>t[1]))(t))?[{groupTexts:["plot","line-plot-"+this.plotIndex],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}}),Pyt=t(()=>{Myt=class{constructor(t,e,r,i,n,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=i,this.orientation=n,this.plotIndex=a}static{me(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),e=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=e/2;return"horizontal"===this.orientation?[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-r,height:e,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:t[0]-r,y:t[1],width:e,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function Byt(t,e,r){return new Fyt(t,e,r)}var Fyt,$yt,zyt,Gyt=t(()=>{Oyt(),Pyt(),Fyt=class{constructor(t,e,r){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{me(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");var t,e,r=[];for([t,e]of this.chartData.plots.entries())switch(e.type){case"line":var i=new Ryt(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);r.push(...i.getDrawableElement());break;case"bar":i=new Myt(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t),r.push(...i.getDrawableElement())}return r}},me(Byt,"getPlotComponent")}),Uyt=t(()=>{Lyt(),Dyt(),Gyt(),Tyt(),$yt=class{constructor(t,e,r,i){this.chartConfig=t,this.chartData=e,this.componentStore={title:Nyt(t,e,r,i),plot:Byt(t,e,r),xAxis:Ayt(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},i),yAxis:Ayt(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},i)}}static{me(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,i,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:n,height:a});t-=s.width,i=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=s.height})).height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),e-=this.componentStore.xAxis.calculateSpace({width:t,height:e}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:t,height:e})).width,0<(t-=s.width)&&(n+=t),0myt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,i,n,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=o.height})).height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),t-=(o=this.componentStore.xAxis.calculateSpace({width:t,height:e})).width,i=o.width,this.componentStore.yAxis.setAxisPosition("top"),e-=(o=this.componentStore.yAxis.calculateSpace({width:t,height:e})).height,n=r+o.height,0myt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();var t,e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}}}),qyt=t(()=>{Uyt(),zyt=class{static{me(this,"XYChartBuilder")}static build(t,e,r,i){return new $yt(t,e,r,i).getDrawableElement()}}});function jyt(){var t=sr(),e=Nr();return xE(t.xyChart,e.themeVariables.xyChart)}function Wyt(){var t=Nr();return xE(mr.xyChart,t.xyChart)}function Yyt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Hyt(t){var e=Nr();return _c(t.trim(),e)}function Vyt(t){h2t=t}function Xyt(t){u2t.chartOrientation="horizontal"===t?"horizontal":"vertical"}function Kyt(t){p2t.xAxis.title=Hyt(t.text)}function Zyt(t,e){p2t.xAxis={type:"linear",title:p2t.xAxis.title,min:t,max:e},f2t=!0}function Qyt(t){p2t.xAxis={type:"band",title:p2t.xAxis.title,categories:t.map(t=>Hyt(t.text))},f2t=!0}function Jyt(t){p2t.yAxis.title=Hyt(t.text)}function t2t(t,e){p2t.yAxis={type:"linear",title:p2t.yAxis.title,min:t,max:e},m2t=!0}function e2t(t){var e=Math.min(...t),t=Math.max(...t),r=vyt(p2t.yAxis)?p2t.yAxis.min:1/0,i=vyt(p2t.yAxis)?p2t.yAxis.max:-1/0;p2t.yAxis={type:"linear",title:p2t.yAxis.title,min:Math.min(r,e),max:Math.max(i,t)}}function r2t(r){let t=[],e;if(0!==r.length&&(f2t||(i=vyt(p2t.xAxis)?p2t.xAxis.min:1/0,e=vyt(p2t.xAxis)?p2t.xAxis.max:-1/0,Zyt(Math.min(i,1),Math.max(e,r.length))),m2t||e2t(r),yyt(p2t.xAxis)&&(t=p2t.xAxis.categories.map((t,e)=>[t,r[e]])),vyt(p2t.xAxis))){var i=p2t.xAxis.min,n=p2t.xAxis.max,a=(n-i)/(r.length-1),s=[];for(let t=i;t<=n;t+=a)s.push(""+t);t=s.map((t,e)=>[t,r[e]])}return t}function i2t(t){return g2t[0===t?0:t%g2t.length]}function n2t(t,e){e=r2t(e),p2t.plots.push({type:"line",strokeFill:i2t(c2t),strokeWidth:2,data:e}),c2t++}function a2t(t,e){e=r2t(e),p2t.plots.push({type:"bar",fill:i2t(c2t),data:e}),c2t++}function s2t(){if(0===p2t.plots.length)throw Error("No Plot to render, please provide a plot with some data");return p2t.title=ph(),zyt.build(u2t,p2t,d2t,h2t)}function o2t(){return d2t}function l2t(){return u2t}var c2t,h2t,u2t,d2t,p2t,g2t,f2t,m2t,y2t,v2t,x2t,b2t,w2t=t(()=>{Ai(),_i(),wi(),KE(),Jc(),gu(),qyt(),Tyt(),c2t=0,u2t=Wyt(),d2t=jyt(),p2t=Yyt(),g2t=d2t.plotColorPalette.split(",").map(t=>t.trim()),m2t=f2t=!1,me(jyt,"getChartDefaultThemeConfig"),me(Wyt,"getChartDefaultConfig"),me(Yyt,"getChartDefaultData"),me(Hyt,"textSanitizer"),me(Vyt,"setTmpSVGG"),me(Xyt,"setOrientation"),me(Kyt,"setXAxisTitle"),me(Zyt,"setXAxisRangeData"),me(Qyt,"setXAxisBand"),me(Jyt,"setYAxisTitle"),me(t2t,"setYAxisRangeData"),me(e2t,"setYAxisRangeFromPlotData"),me(r2t,"transformDataWithoutCategory"),me(i2t,"getPlotColorFromPalette"),me(n2t,"setLineData"),me(a2t,"setBarData"),me(s2t,"getDrawableElem"),me(o2t,"getChartThemeConfig"),me(l2t,"getChartConfig"),y2t=me(function(){oh(),c2t=0,u2t=Wyt(),p2t=Yyt(),d2t=jyt(),g2t=d2t.plotColorPalette.split(",").map(t=>t.trim()),m2t=f2t=!1},"clear"),v2t={getDrawableElem:s2t,clear:y2t,setAccTitle:lh,getAccTitle:ch,setDiagramTitle:dh,getDiagramTitle:ph,getAccDescription:uh,setAccDescription:hh,setOrientation:Xyt,setXAxisTitle:Kyt,setXAxisRangeData:Zyt,setXAxisBand:Qyt,setYAxisTitle:Jyt,setYAxisRangeData:t2t,setLineData:n2t,setBarData:a2t,setTmpSVGG:Vyt,getChartThemeConfig:o2t,getChartConfig:l2t}}),k2t=t(()=>{e(),tmt(),th(),x2t=me((t,e,r,i)=>{var n,a=(i=i.db).getChartThemeConfig(),s=i.getChartConfig();function o(t){return"top"===t?"text-before-edge":"middle"}function l(t){return"left"===t?"start":"right"===t?"end":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}me(o,"getDominantBaseLine"),me(l,"getTextAnchor"),me(c,"getTextTransformation"),M.debug(`Rendering xychart chart -`+t);let h=Hft(e),u=h.append("g").attr("class","main"),d=u.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),p=(Hc(h,s.height,s.width,!0),h.attr("viewBox",`0 0 ${s.width} `+s.height),d.attr("fill",a.backgroundColor),i.setTmpSVGG(h.append("g").attr("class","mermaid-tmp-group")),i.getDrawableElem()),g={};function f(e){let r=u,i="";for(var[n]of e.entries()){let t=u;0t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth);break;case"text":m.selectAll("text").data(n.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>o(t.verticalPos)).attr("text-anchor",t=>l(t.horizontalPos)).attr("transform",t=>c(t)).text(t=>t.text);break;case"path":m.selectAll("path").data(n.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill||"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw"),b2t={draw:x2t}}),T2t={};lPt(T2t,{diagram:()=>E2t});var E2t,C2t,_2t,S2t,A2t,L2t,N2t=t(()=>{fyt(),w2t(),k2t(),E2t={parser:pyt,db:v2t,renderer:b2t}}),I2t=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),e=[1,3],r=[1,4],i=[1,5],n=[1,6],B=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],a=[1,22],s=[2,7],o=[1,26],l=[1,27],c=[1,28],h=[1,29],u=[1,33],d=[1,34],p=[1,35],g=[1,36],f=[1,37],m=[1,38],y=[1,24],v=[1,31],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],F=[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],$=[27,29],z=[1,70],G=[1,71],U=[1,72],q=[1,73],j=[1,74],W=[1,75],Y=[1,76],_=[1,83],S=[1,80],H=[1,84],V=[1,85],X=[1,86],K=[1,87],Z=[1,88],Q=[1,89],J=[1,90],tt=[1,91],et=[1,92],rt=[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],it=[1,101],nt=[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],at=[1,116],st=[1,117],ot=[1,114],lt=[1,115],e={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 4:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(a[o-3],a[o-4]);break;case 22:i.addRequirement(a[o-5],a[o-6]),i.setClass([a[o-5]],a[o-3]);break;case 23:i.setNewReqId(a[o-2]);break;case 24:i.setNewReqText(a[o-2]);break;case 25:i.setNewReqRisk(a[o-2]);break;case 26:i.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(a[o-3]);break;case 43:i.addElement(a[o-5]),i.setClass([a[o-5]],a[o-3]);break;case 44:i.setNewElementType(a[o-2]);break;case 45:i.setNewElementDocRef(a[o-2]);break;case 48:i.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:i.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 58:i.setClass(a[o-1],a[o]);break;case 59:i.setClass([a[o-2]],a[o]);break;case 60:case 62:this.$=[a[o]];break;case 61:case 63:this.$=a[o-2].concat([a[o]]);break;case 64:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 65:this.$=[a[o]];break;case 66:a[o-2].push(a[o]),this.$=a[o-2];break;case 68:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,6:e,9:r,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(B,[2,6]),{3:12,4:2,6:e,9:r,11:i,13:n},{1:[2,2]},{4:17,5:a,7:13,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},t(B,[2,4]),t(B,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:43,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:44,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:45,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:46,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:47,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:48,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:49,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:50,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74: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]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(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},t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),t(F,[2,81]),t(F,[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]},t($,[2,79]),t($,[2,80]),{27:[1,67],29:[1,68]},t($,[2,85]),t($,[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:_,76:S,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},t(rt,[2,60]),t(rt,[2,62]),{73:93,75:_,76:S,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},{30:94,33:62,75:E,76:S,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]},t(A,[2,50]),t(A,[2,51]),t(A,[2,52]),t(A,[2,53]),t(A,[2,54]),t(A,[2,55]),t(A,[2,56]),{64:[1,100]},t(T,[2,59],{76:S}),t(T,[2,64],{76:it}),{33:103,75:[1,102],89:w,90:k},t(nt,[2,65],{79:104,75:_,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et}),t(L,[2,67]),t(L,[2,69]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(T,[2,57],{76:it}),t(T,[2,58],{76:S}),{5:N,28:105,31:I,34:R,36:M,38:D,40:O},{27:[1,112],76:S},{5:at,40:st,56:113,57:ot,59:lt},{27:[1,118],76:S},{33:119,89:w,90:k},{33:120,89:w,90:k},{75:_,78:121,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},t(rt,[2,61]),t(rt,[2,63]),t(L,[2,68]),t(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},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:at,40:st,56:130,57:ot,59:lt},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(nt,[2,66],{79:104,75:_,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et}),{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]},t(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]},t(T,[2,46]),{5:at,40:st,56:152,57:ot,59:lt},{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]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(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:at,40:st,56:163,57:ot,59:lt},{5:at,40:st,56:164,57:ot,59:lt},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,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,me(t,"Parser"),(pyt=new((t.prototype=n).Parser=t)).parser=pyt,gyt=pyt});function yyt(t){return"bar"===t.type}function vyt(t){return"band"===t.type}function xyt(t){return"linear"===t.type}var byt,wyt,kyt,Tyt,Eyt=t(()=>{me(yyt,"isBarPlot"),me(vyt,"isBandAxisData"),me(xyt,"isLinearAxisData")}),Cyt=t(()=>{Y9(),byt=class{constructor(t){this.parentGroup=t}static{me(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((t,e)=>Math.max(e.length,t),0)*e,height:e};var r,n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(r of t){var a=(s=G9(i,1,r))?s.width:r.length*e,s=s?s.height:e;n.width=Math.max(n.width,a),n.height=Math.max(n.height,s)}return i.remove(),n}}}),_yt=t(()=>{wyt=class{constructor(t,e,r,n){this.axisConfig=t,this.title=e,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{me(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){var t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;var r,n;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*t.width,this.outerPadding=Math.min(r.width/2,n),n=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,n<=e)&&(e-=n,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=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<=e)&&(e-=n,this.showTitle=!0),this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;var r,n;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*t.height,this.outerPadding=Math.min(r.height/2,n),(n=r.width+2*this.axisConfig.labelPadding)<=e)&&(e-=n,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=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<=e)&&(e-=n,this.showTitle=!0),this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){var t,r=[];if(this.showAxisLine&&(t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${e},${this.getScaleValue(t)} L ${e-this.axisConfig.tickLength},`+this.getScaleValue(t),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 t,r=[];if(this.showAxisLine&&(t=this.boundingRect.y+this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),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 e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e} L ${this.getScaleValue(t)},`+(e+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 t,r=[];if(this.showAxisLine&&(t=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},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+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 e=this.boundingRect.y;r.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},`+(e+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():[]}}}),Syt=t(()=>{Q3(),e(),_yt(),kyt=class extends wyt{static{me(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=gv().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=gv().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(t){return this.scale(t)??this.getRange()[0]}}}),Ayt=t(()=>{Q3(),_yt(),Tyt=class extends wyt{static{me(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=Mv().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=Mv().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function Lyt(t,e,r,n){return n=new byt(n),vyt(t)?new kyt(e,r,t.categories,t.title,n):new Tyt(e,r,[t.min,t.max],t.title,n)}var Nyt=t(()=>{Eyt(),Cyt(),Syt(),Ayt(),me(Lyt,"getAxis")});function Iyt(t,e,r,n){return n=new byt(n),new Ryt(n,t,e,r)}var Ryt,Myt,Dyt,Oyt=t(()=>{Cyt(),Ryt=class{constructor(t,e,r,n){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{me(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){var e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),t=Math.max(e.width,t.width),r=e.height+2*this.chartConfig.titlePadding;return e.width<=t&&e.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=t,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){var t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},me(Iyt,"getChartTitleComponent")}),Pyt=t(()=>{Q3(),Myt=class{constructor(t,e,r,n,i){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{me(this,"LinePlot")}getDrawableElement(){var t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);return(t=("horizontal"===this.orientation?K4().y(t=>t[0]).x(t=>t[1]):K4().x(t=>t[0]).y(t=>t[1]))(t))?[{groupTexts:["plot","line-plot-"+this.plotIndex],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}}),Byt=t(()=>{Dyt=class{constructor(t,e,r,n,i,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{me(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),e=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=e/2;return"horizontal"===this.orientation?[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-r,height:e,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:t[0]-r,y:t[1],width:e,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function Fyt(t,e,r){return new $yt(t,e,r)}var $yt,zyt,Gyt,Uyt=t(()=>{Pyt(),Byt(),$yt=class{constructor(t,e,r){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{me(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");var t,e,r=[];for([t,e]of this.chartData.plots.entries())switch(e.type){case"line":var n=new Myt(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);r.push(...n.getDrawableElement());break;case"bar":n=new Dyt(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t),r.push(...n.getDrawableElement())}return r}},me(Fyt,"getPlotComponent")}),qyt=t(()=>{Nyt(),Oyt(),Uyt(),Eyt(),zyt=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:Iyt(t,e,r,n),plot:Fyt(t,e,r),xAxis:Lyt(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:Lyt(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{me(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,n,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});t-=s.width,n=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=s.height})).height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),e-=this.componentStore.xAxis.calculateSpace({width:t,height:e}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:t,height:e})).width,0<(t-=s.width)&&(i+=t),0yyt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,n,i,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=o.height})).height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),t-=(o=this.componentStore.xAxis.calculateSpace({width:t,height:e})).width,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),e-=(o=this.componentStore.yAxis.calculateSpace({width:t,height:e})).height,i=r+o.height,0yyt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();var t,e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}}}),jyt=t(()=>{qyt(),Gyt=class{static{me(this,"XYChartBuilder")}static build(t,e,r,n){return new zyt(t,e,r,n).getDrawableElement()}}});function Wyt(){var t=or(),e=Ir();return bE(t.xyChart,e.themeVariables.xyChart)}function Yyt(){var t=Ir();return bE(yr.xyChart,t.xyChart)}function Hyt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Vyt(t){var e=Ir();return Sc(t.trim(),e)}function Xyt(t){d2t=t}function Kyt(t){p2t.chartOrientation="horizontal"===t?"horizontal":"vertical"}function Zyt(t){f2t.xAxis.title=Vyt(t.text)}function Qyt(t,e){f2t.xAxis={type:"linear",title:f2t.xAxis.title,min:t,max:e},y2t=!0}function Jyt(t){f2t.xAxis={type:"band",title:f2t.xAxis.title,categories:t.map(t=>Vyt(t.text))},y2t=!0}function t2t(t){f2t.yAxis.title=Vyt(t.text)}function e2t(t,e){f2t.yAxis={type:"linear",title:f2t.yAxis.title,min:t,max:e},v2t=!0}function r2t(t){var e=Math.min(...t),t=Math.max(...t),r=xyt(f2t.yAxis)?f2t.yAxis.min:1/0,n=xyt(f2t.yAxis)?f2t.yAxis.max:-1/0;f2t.yAxis={type:"linear",title:f2t.yAxis.title,min:Math.min(r,e),max:Math.max(n,t)}}function n2t(r){let t=[],e;if(0!==r.length&&(y2t||(n=xyt(f2t.xAxis)?f2t.xAxis.min:1/0,e=xyt(f2t.xAxis)?f2t.xAxis.max:-1/0,Qyt(Math.min(n,1),Math.max(e,r.length))),v2t||r2t(r),vyt(f2t.xAxis)&&(t=f2t.xAxis.categories.map((t,e)=>[t,r[e]])),xyt(f2t.xAxis))){var n=f2t.xAxis.min,i=f2t.xAxis.max,a=(i-n)/(r.length-1),s=[];for(let t=n;t<=i;t+=a)s.push(""+t);t=s.map((t,e)=>[t,r[e]])}return t}function i2t(t){return m2t[0===t?0:t%m2t.length]}function a2t(t,e){e=n2t(e),f2t.plots.push({type:"line",strokeFill:i2t(u2t),strokeWidth:2,data:e}),u2t++}function s2t(t,e){e=n2t(e),f2t.plots.push({type:"bar",fill:i2t(u2t),data:e}),u2t++}function o2t(){if(0===f2t.plots.length)throw Error("No Plot to render, please provide a plot with some data");return f2t.title=gh(),Gyt.build(p2t,f2t,g2t,d2t)}function l2t(){return g2t}function c2t(){return p2t}function h2t(){return f2t}var u2t,d2t,p2t,g2t,f2t,m2t,y2t,v2t,x2t,b2t,w2t,k2t,T2t=t(()=>{Nn(),An(),Tn(),ZE(),th(),fu(),jyt(),Eyt(),u2t=0,p2t=Yyt(),g2t=Wyt(),f2t=Hyt(),m2t=g2t.plotColorPalette.split(",").map(t=>t.trim()),v2t=y2t=!1,me(Wyt,"getChartDefaultThemeConfig"),me(Yyt,"getChartDefaultConfig"),me(Hyt,"getChartDefaultData"),me(Vyt,"textSanitizer"),me(Xyt,"setTmpSVGG"),me(Kyt,"setOrientation"),me(Zyt,"setXAxisTitle"),me(Qyt,"setXAxisRangeData"),me(Jyt,"setXAxisBand"),me(t2t,"setYAxisTitle"),me(e2t,"setYAxisRangeData"),me(r2t,"setYAxisRangeFromPlotData"),me(n2t,"transformDataWithoutCategory"),me(i2t,"getPlotColorFromPalette"),me(a2t,"setLineData"),me(s2t,"setBarData"),me(o2t,"getDrawableElem"),me(l2t,"getChartThemeConfig"),me(c2t,"getChartConfig"),me(h2t,"getXYChartData"),x2t=me(function(){lh(),u2t=0,p2t=Yyt(),f2t=Hyt(),g2t=Wyt(),m2t=g2t.plotColorPalette.split(",").map(t=>t.trim()),v2t=y2t=!1},"clear"),b2t={getDrawableElem:o2t,clear:x2t,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh,setOrientation:Kyt,setXAxisTitle:Zyt,setXAxisRangeData:Qyt,setXAxisBand:Jyt,setYAxisTitle:t2t,setYAxisRangeData:e2t,setLineData:a2t,setBarData:s2t,setTmpSVGG:Xyt,getChartThemeConfig:l2t,getChartConfig:c2t,getXYChartData:h2t}}),E2t=t(()=>{e(),emt(),eh(),w2t=me((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig(),o=i.getXYChartData().plots[0].data.map(t=>t[1]);function l(t){return"top"===t?"text-before-edge":"middle"}function c(t){return"left"===t?"start":"right"===t?"end":"middle"}function h(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}me(l,"getDominantBaseLine"),me(c,"getTextAnchor"),me(h,"getTextTransformation"),M.debug(`Rendering xychart chart +`+t);let u=Vft(e),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(Vc(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(e){let r=d,n="";for(var[i]of e.entries()){let t=d;0t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),s.showDataLabel)if("horizontal"===s.chartOrientation){let n=function(t,e){var{data:t,label:r}=t;return e*r.length*.7<=t.width-10};n,me(n,"fitsHorizontally");var x=(b=y.data.map((t,e)=>({data:t,label:o[e].toString()})).filter(t=>0{let e=t.data,r=.7*e.height;for(;!n(t,r)&&0t.data.x+t.data.width-10).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",x+"px").text(t=>t.label)}else{let i=function(t,e,r){var{data:t,label:n}=t,n=e*n.length*.7,i=t.x+t.width/2;return t.x<=i-n/2&&i+n/2<=t.x+t.width&&t.y+r+e<=t.y+t.height};i,me(i,"fitsInBar");var b,x=(b=y.data.map((t,e)=>({data:t,label:o[e].toString()})).filter(t=>0{let{data:e,label:r}=t,n=e.width/(.7*r.length);for(;!i(t,n,10)&&0t.data.x+t.data.width/2).attr("y",t=>t.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",w+"px").text(t=>t.label)}break;case"text":v.selectAll("text").data(y.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>l(t.verticalPos)).attr("text-anchor",t=>c(t.horizontalPos)).attr("transform",t=>h(t)).text(t=>t.text);break;case"path":v.selectAll("path").data(y.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill||"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw"),k2t={draw:w2t}}),C2t={};oPt(C2t,{diagram:()=>_2t});var _2t,S2t,A2t,L2t,N2t,I2t,R2t=t(()=>{myt(),T2t(),E2t(),_2t={parser:gyt,db:b2t,renderer:k2t}}),M2t=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[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],F=[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],$=[27,29],z=[1,70],G=[1,71],U=[1,72],q=[1,73],j=[1,74],W=[1,75],Y=[1,76],_=[1,83],S=[1,80],H=[1,84],V=[1,85],X=[1,86],K=[1,87],Z=[1,88],Q=[1,89],J=[1,90],tt=[1,91],et=[1,92],rt=[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],nt=[1,101],it=[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],at=[1,116],st=[1,117],ot=[1,114],lt=[1,115],e={trace:me(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:me(function(t,e,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:e,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(B,[2,6]),{3:12,4:2,6:e,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},t(B,[2,4]),t(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]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(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},t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),t(F,[2,81]),t(F,[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]},t($,[2,79]),t($,[2,80]),{27:[1,67],29:[1,68]},t($,[2,85]),t($,[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:_,76:S,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},t(rt,[2,60]),t(rt,[2,62]),{73:93,75:_,76:S,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},{30:94,33:62,75:E,76:S,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]},t(A,[2,50]),t(A,[2,51]),t(A,[2,52]),t(A,[2,53]),t(A,[2,54]),t(A,[2,55]),t(A,[2,56]),{64:[1,100]},t(T,[2,59],{76:S}),t(T,[2,64],{76:nt}),{33:103,75:[1,102],89:w,90:k},t(it,[2,65],{79:104,75:_,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et}),t(L,[2,67]),t(L,[2,69]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(T,[2,57],{76:nt}),t(T,[2,58],{76:S}),{5:N,28:105,31:I,34:R,36:M,38:D,40:O},{27:[1,112],76:S},{5:at,40:st,56:113,57:ot,59:lt},{27:[1,118],76:S},{33:119,89:w,90:k},{33:120,89:w,90:k},{75:_,78:121,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},t(rt,[2,61]),t(rt,[2,63]),t(L,[2,68]),t(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},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:at,40:st,56:130,57:ot,59:lt},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(it,[2,66],{79:104,75:_,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et}),{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]},t(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]},t(T,[2,46]),{5:at,40:st,56:152,57:ot,59:lt},{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]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(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:at,40:st,56:163,57:ot,59:lt},{5:at,40:st,56:164,57:ot,59:lt},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0)/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}}};e.lexer=B,me(P,"Parser"),(C2t=new((P.prototype=e).Parser=P)).parser=C2t,_2t=C2t}),R2t=t(()=>{fu(),e(),gu(),S2t=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=lh,this.getAccTitle=ch,this.setAccDescription=hh,this.getAccDescription=uh,this.setDiagramTitle=dh,this.getDiagramTitle=ph,this.getConfig=me(()=>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{me(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,e){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:e,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=t)}setNewReqText(t){void 0!==this.latestRequirement&&(this.latestRequirement.text=t)}setNewReqRisk(t){void 0!==this.latestRequirement&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),M.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){void 0!==this.latestElement&&(this.latestElement.type=t)}setNewElementDocRef(t){void 0!==this.latestElement&&(this.latestElement.docRef=t)}addRelationship(t,e,r){this.relations.push({type:t,src:e,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,oh()}setCssStyle(t,e){for(var r of t){var i,n=this.requirements.get(r)??this.elements.get(r);if(!e||!n)return;for(i of e)i.includes(",")?n.cssStyles.push(...i.split(",")):n.cssStyles.push(i)}}setClass(t,e){for(var r of t){var i=this.requirements.get(r)??this.elements.get(r);if(i)for(var n of e)i.classes.push(n),(n=this.classes.get(n)?.styles)&&i.cssStyles.push(...n)}}defineClass(t,i){for(let e of t){let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),i&&i.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),this.requirements.forEach(t=>{t.classes.includes(e)&&t.cssStyles.push(...i.flatMap(t=>t.split(",")))}),this.elements.forEach(t=>{t.classes.includes(e)&&t.cssStyles.push(...i.flatMap(t=>t.split(",")))})}}getClasses(){return this.classes}getData(){var t,e,r,i=D(),n=[],a=[];for(t of this.requirements.values()){var s=t;s.id=t.name,s.cssStyles=t.cssStyles,s.cssClasses=t.classes.join(" "),s.shape="requirementBox",s.look=i.look,n.push(s)}for(e of this.elements.values()){var o=e;o.shape="requirementBox",o.look=i.look,o.id=e.name,o.cssStyles=e.cssStyles,o.cssClasses=e.classes.join(" "),n.push(o)}for(r of this.relations){var l=r.type===this.Relationships.CONTAINS,l={id:r.src+`-${r.dst}-0`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`<<${r.type}>>`,classes:"relationshipLine",style:["fill:none",l?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:l?"normal":"dashed",arrowTypeStart:l?"requirement_contains":"",arrowTypeEnd:l?"":"requirement_arrow",look:i.look};a.push(l)}return{nodes:n,edges:a,other:{},config:i,direction:this.getDirection()}}}}),M2t=t(()=>{A2t=me(t=>` +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0)/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}}};e.lexer=B,me(P,"Parser"),(S2t=new((P.prototype=e).Parser=P)).parser=S2t,A2t=S2t}),D2t=t(()=>{mu(),e(),fu(),L2t=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=ch,this.getAccTitle=hh,this.setAccDescription=uh,this.getAccDescription=dh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,this.getConfig=me(()=>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{me(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,e){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:e,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=t)}setNewReqText(t){void 0!==this.latestRequirement&&(this.latestRequirement.text=t)}setNewReqRisk(t){void 0!==this.latestRequirement&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),M.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){void 0!==this.latestElement&&(this.latestElement.type=t)}setNewElementDocRef(t){void 0!==this.latestElement&&(this.latestElement.docRef=t)}addRelationship(t,e,r){this.relations.push({type:t,src:e,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,lh()}setCssStyle(t,e){for(var r of t){var n,i=this.requirements.get(r)??this.elements.get(r);if(!e||!i)return;for(n of e)n.includes(",")?i.cssStyles.push(...n.split(",")):i.cssStyles.push(n)}}setClass(t,e){for(var r of t){var n=this.requirements.get(r)??this.elements.get(r);if(n)for(var i of e)n.classes.push(i),(i=this.classes.get(i)?.styles)&&n.cssStyles.push(...i)}}defineClass(t,n){for(let e of t){let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),n&&n.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),this.requirements.forEach(t=>{t.classes.includes(e)&&t.cssStyles.push(...n.flatMap(t=>t.split(",")))}),this.elements.forEach(t=>{t.classes.includes(e)&&t.cssStyles.push(...n.flatMap(t=>t.split(",")))})}}getClasses(){return this.classes}getData(){var t,e,r,n=D(),i=[],a=[];for(t of this.requirements.values()){var s=t;s.id=t.name,s.cssStyles=t.cssStyles,s.cssClasses=t.classes.join(" "),s.shape="requirementBox",s.look=n.look,i.push(s)}for(e of this.elements.values()){var o=e;o.shape="requirementBox",o.look=n.look,o.id=e.name,o.cssStyles=e.cssStyles,o.cssClasses=e.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()}}}}),O2t=t(()=>{N2t=me(t=>` marker { fill: ${t.relationColor}; @@ -1235,12 +1260,12 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l background-color: ${t.edgeLabelBackground}; } -`,"getStyles"),L2t=A2t}),D2t={};lPt(D2t,{draw:()=>O2t});var O2t,P2t=t(()=>{fu(),e(),qM(),zX(),GX(),KE(),O2t=me(async function(t,e,r,i){M.info("REF0:"),M.info("Drawing requirement diagram (unified)",e);var{securityLevel:n,state:a,layout:s}=D(),o=i.db.getData(),n=NM(e,n);o.type=i.type,o.layoutAlgorithm=CX(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=e,await EX(o,n),YE.insertTitle(n,"requirementDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),_X(n,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),B2t={};lPt(B2t,{diagram:()=>F2t});var F2t,$2t,z2t,G2t,U2t,q2t,j2t,W2t,Y2t,H2t,V2t,X2t,K2t,Z2t,Q2t,J2t,tvt,evt,rvt,ivt,nvt,avt,svt,ovt,lvt,cvt,hvt,uvt,dvt,pvt,gvt,fvt,mvt,yvt,vvt,xvt,bvt,wvt,kvt,Tvt,Evt=t(()=>{I2t(),R2t(),M2t(),P2t(),F2t={parser:_2t,get db(){return new S2t},renderer:D2t,styles:L2t}}),Cvt=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),e=[1,2],B=[1,3],F=[1,4],r=[2,4],i=[1,9],n=[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],_=[1,41],S=[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],$=[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],e={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 3:return i.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:i.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:i.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:i.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:i.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:i.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 31:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 34:a[o-1].unshift({type:"loopStart",loopText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:i.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"rectStart",color:i.parseMessage(a[o-2]),signalType:i.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:i.parseMessage(a[o-2]),signalType:i.LINETYPE.RECT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"optStart",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.OPT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"altStart",altText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:i.LINETYPE.ALT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"parStart",parText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"criticalStart",criticalText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:i.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"breakStart",breakText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 43:this.$=a[o-3].concat([{type:"option",optionText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.ALT_ELSE},a[o]]);break;case 48:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 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=i.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:i.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.$=i.PLACEMENT.LEFTOF;break;case 64:this.$=i.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:i.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:i.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.$=i.LINETYPE.SOLID_OPEN;break;case 70:this.$=i.LINETYPE.DOTTED_OPEN;break;case 71:this.$=i.LINETYPE.SOLID;break;case 72:this.$=i.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=i.LINETYPE.DOTTED;break;case 74:this.$=i.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=i.LINETYPE.SOLID_CROSS;break;case 76:this.$=i.LINETYPE.DOTTED_CROSS;break;case 77:this.$=i.LINETYPE.SOLID_POINT;break;case 78:this.$=i.LINETYPE.DOTTED_POINT;break;case 79:this.$=i.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:B,6:F},{1:[3]},{3:5,4:e,5:B,6:F},{3:6,4:e,5:B,6:F},t([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:i,5:n,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:_,59:S,60:A,61:L,62:N,70:I},t(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:_,59:S,60:A,61:L,62:N,70:I},t(R,[2,7]),t(R,[2,8]),t(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]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(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},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(R,[2,6]),t(R,[2,15]),t(M,[2,9],{10:93}),t(R,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(R,[2,21]),{5:[1,97]},{5:[1,98]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t($,r,{7:99}),t($,r,{7:100}),t($,r,{7:101}),t(z,r,{40:102,7:103}),t(G,r,{42:104,7:105}),t(G,r,{7:105,42:106}),t(U,r,{45:107,7:108}),t($,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},t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(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]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:i,5:n,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:_,59:S,60:A,61:L,62:N,70:I},{4:i,5:n,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:_,59:S,60:A,61:L,62:N,70:I},{4:i,5:n,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:_,59:S,60:A,61:L,62:N,70:I},{16:[1,135]},{4:i,5:n,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:_,59:S,60:A,61:L,62:N,70:I},{16:[1,137]},{4:i,5:n,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:_,59:S,60:A,61:L,62:N,70:I},{16:[1,139]},{16:[1,140]},{4:i,5:n,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:_,59:S,60:A,61:L,62:N,70:I},{4:i,5:n,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:_,59:S,60:A,61:L,62:N,70:I},{15:[1,143]},t(R,[2,49]),{15:[1,144]},t(R,[2,51]),t(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]},t(R,[2,16]),t(M,[2,10]),{12:151,50:T,52:E,53:C},t(M,[2,12]),t(M,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,152]},t(R,[2,38]),{15:[1,153]},t(R,[2,39]),t(R,[2,40]),{15:[1,154]},t(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},t(M,[2,11]),t(z,r,{7:103,40:160}),t(G,r,{7:105,42:161}),t(U,r,{7:108,45:162}),t(R,[2,48]),t(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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"B2t});var B2t,F2t=t(()=>{mu(),e(),jM(),UX(),qX(),ZE(),B2t=me(async function(t,e,r,n){M.info("REF0:"),M.info("Drawing requirement diagram (unified)",e);var{securityLevel:i,state:a,layout:s}=D(),o=n.db.getData(),i=IM(e,i);o.type=n.type,o.layoutAlgorithm=_X(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=e,await CX(o,i),HE.insertTitle(i,"requirementDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),SX(i,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),$2t={};oPt($2t,{diagram:()=>z2t});var z2t,G2t,U2t,q2t,j2t,W2t,Y2t,H2t,V2t,X2t,K2t,Z2t,Q2t,J2t,tvt,evt,rvt,nvt,ivt,avt,svt,ovt,lvt,cvt,hvt,uvt,dvt,pvt,gvt,fvt,mvt,yvt,vvt,xvt,bvt,wvt,kvt,Tvt,Evt,Cvt,_vt=t(()=>{M2t(),D2t(),O2t(),F2t(),z2t={parser:A2t,get db(){return new L2t},renderer:P2t,styles:I2t}}),Svt=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,2],B=[1,3],F=[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],_=[1,41],S=[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],$=[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],e={trace:me(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:me(function(t,e,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:e,5:B,6:F},{1:[3]},{3:5,4:e,5:B,6:F},{3:6,4:e,5:B,6:F},t([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:_,59:S,60:A,61:L,62:N,70:I},t(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:_,59:S,60:A,61:L,62:N,70:I},t(R,[2,7]),t(R,[2,8]),t(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]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(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},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(R,[2,6]),t(R,[2,15]),t(M,[2,9],{10:93}),t(R,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(R,[2,21]),{5:[1,97]},{5:[1,98]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t($,r,{7:99}),t($,r,{7:100}),t($,r,{7:101}),t(z,r,{40:102,7:103}),t(G,r,{42:104,7:105}),t(G,r,{7:105,42:106}),t(U,r,{45:107,7:108}),t($,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},t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(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]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(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:_,59:S,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:_,59:S,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:_,59:S,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:_,59:S,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:_,59:S,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:_,59:S,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:_,59:S,60:A,61:L,62:N,70:I},{15:[1,143]},t(R,[2,49]),{15:[1,144]},t(R,[2,51]),t(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]},t(R,[2,16]),t(M,[2,10]),{12:151,50:T,52:E,53:C},t(M,[2,12]),t(M,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,152]},t(R,[2,38]),{15:[1,153]},t(R,[2,39]),t(R,[2,40]),{15:[1,154]},t(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},t(M,[2,11]),t(z,r,{7:103,40:160}),t(G,r,{7:105,42:161}),t(U,r,{7:108,45:162}),t(R,[2,48]),t(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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0\->:\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],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],inclusive:!0}}};e.lexer=B,me(P,"Parser"),($2t=new((P.prototype=e).Parser=P)).parser=$2t,z2t=$2t}),_vt=t(()=>{fu(),e(),Fpt(),Jc(),gu(),G2t={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},U2t={FILLED:0,OPEN:1},q2t={LEFTOF:0,RIGHTOF:1,OVER:2},j2t=class{constructor(){this.state=new Opt(()=>({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=lh,this.setAccDescription=hh,this.setDiagramTitle=dh,this.getAccTitle=ch,this.getAccDescription=uh,this.getDiagramTitle=ph,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=G2t,this.ARROWTYPE=U2t,this.PLACEMENT=q2t}static{me(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,r,i){let n=this.state.records.currentBox,a=this.state.records.actors.get(t);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(n=a.box||this.state.records.currentBox,a.box=n,a&&e===a.name&&null==r)return}null==r?.text&&(r={text:e,type:i}),null!=i&&null!=r.text||(r={text:e,type:i}),this.state.records.actors.set(t,{box:n,name:e,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor&&(e=this.state.records.actors.get(this.state.records.prevActor))&&(e.nextActor=t),this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,r=0;if(!t)return 0;for(e=0;e>-",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:t,to:e,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:i,activate:n}),!0}hasAtLeastOneBox(){return 0t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();var e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:D().sequence?.wrap??!1}clear(){this.state.reset(),oh()}parseMessage(t){var t=t.trim(),{wrap:t,cleanedText:e}=this.extractWrap(t),e={text:e,wrap:t};return M.debug("parseMessage: "+JSON.stringify(e)),e}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",i=e?.[2]?e[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",i=t.trim()):((n=(new Option).style).color=r,n.color!==r&&(r="transparent",i=t.trim()));var{wrap:n,cleanedText:t}=this.extractWrap(i);return{text:t?_c(t,D()):void 0,color:r,wrap:n}}addNote(t,e,r){var i={actor:t,placement:e,message:r.text,wrap:r.wrap??this.autoWrap()},t=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t[0],to:t[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(e,r){e=this.getActor(e);try{let t=_c(r.text,D());t=(t=t.replace(/=/g,"=")).replace(/&/g,"&");var i=JSON.parse(t);this.insertLinks(e,i)}catch(t){M.error("error while parsing actor link text",t)}}addALink(a,s){a=this.getActor(a);try{let t={},e=_c(s.text,D()),r=e.indexOf("@"),i=(e=(e=e.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),n=e.slice(r+1).trim();t[i]=n,this.insertLinks(a,t)}catch(t){M.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(var r in e)t.links[r]=e[r]}addProperties(t,e){t=this.getActor(t);try{var r=_c(e.text,D()),i=JSON.parse(r);this.insertProperties(t,i)}catch(t){M.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(var r in e)t.properties[r]=e[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){t=this.getActor(t),e=document.getElementById(e.text);try{var r=e.innerHTML,i=JSON.parse(r);i.properties&&this.insertProperties(t,i.properties),i.links&&this.insertLinks(t,i.links)}catch(t){M.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(this.state.records.actors.has(t.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=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)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(t.to!==this.state.records.lastDestroyed&&t.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(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":lh(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType)}}getConfig(){return D().sequence}}}),Svt=t(()=>{W2t=me(t=>`.actor { +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0\->:\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}}};e.lexer=B,me(P,"Parser"),(G2t=new((P.prototype=e).Parser=P)).parser=G2t,U2t=G2t}),Avt=t(()=>{mu(),e(),$pt(),th(),fu(),q2t={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},j2t={FILLED:0,OPEN:1},W2t={LEFTOF:0,RIGHTOF:1,OVER:2},Y2t=class{constructor(){this.state=new Ppt(()=>({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=ch,this.setAccDescription=uh,this.setDiagramTitle=ph,this.getAccTitle=hh,this.getAccDescription=dh,this.getDiagramTitle=gh,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=q2t,this.ARROWTYPE=j2t,this.PLACEMENT=W2t}static{me(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,r,n){let i=this.state.records.currentBox,a=this.state.records.actors.get(t);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&&e===a.name&&null==r)return}null==r?.text&&(r={text:e,type:n}),null!=n&&null!=r.text||(r={text:e,type:n}),this.state.records.actors.set(t,{box:i,name:e,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&&(e=this.state.records.actors.get(this.state.records.prevActor))&&(e.nextActor=t),this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,r=0;if(!t)return 0;for(e=0;e>-",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:t,to:e,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:n,activate:i}),!0}hasAtLeastOneBox(){return 0t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();var e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:D().sequence?.wrap??!1}clear(){this.state.reset(),lh()}parseMessage(t){var t=t.trim(),{wrap:t,cleanedText:e}=this.extractWrap(t),e={text:e,wrap:t};return M.debug("parseMessage: "+JSON.stringify(e)),e}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",n=t.trim()):((i=(new Option).style).color=r,i.color!==r&&(r="transparent",n=t.trim()));var{wrap:i,cleanedText:t}=this.extractWrap(n);return{text:t?Sc(t,D()):void 0,color:r,wrap:i}}addNote(t,e,r){var n={actor:t,placement:e,message:r.text,wrap:r.wrap??this.autoWrap()},t=[].concat(t,t);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t[0],to:t[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(e,r){e=this.getActor(e);try{let t=Sc(r.text,D());t=(t=t.replace(/=/g,"=")).replace(/&/g,"&");var n=JSON.parse(t);this.insertLinks(e,n)}catch(t){M.error("error while parsing actor link text",t)}}addALink(a,s){a=this.getActor(a);try{let t={},e=Sc(s.text,D()),r=e.indexOf("@"),n=(e=(e=e.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),i=e.slice(r+1).trim();t[n]=i,this.insertLinks(a,t)}catch(t){M.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(var r in e)t.links[r]=e[r]}addProperties(t,e){t=this.getActor(t);try{var r=Sc(e.text,D()),n=JSON.parse(r);this.insertProperties(t,n)}catch(t){M.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(var r in e)t.properties[r]=e[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){t=this.getActor(t),e=document.getElementById(e.text);try{var r=e.innerHTML,n=JSON.parse(r);n.properties&&this.insertProperties(t,n.properties),n.links&&this.insertLinks(t,n.links)}catch(t){M.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(this.state.records.actors.has(t.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=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)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(t.to!==this.state.records.lastDestroyed&&t.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(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":ch(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType)}}getConfig(){return D().sequence}}}),Lvt=t(()=>{H2t=me(t=>`.actor { stroke: ${t.actorBorder}; fill: ${t.actorBkg}; } @@ -1356,12 +1381,12 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l fill: ${t.actorBkg}; stroke-width: 2px; } -`,"getStyles"),Y2t=W2t}),Avt=t(()=>{function e(t,e,r,i,n,a,s){g(e.append("text").attr("x",r).attr("y",i).style("text-anchor","start").text(t),s)}function l(t,e,r,i,n,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;tr?o.width:r);if((t=l.append("rect")).attr("class","actorPopupMenuPanel"+n),t.attr("x",o.x),t.attr("y",o.height),t.attr("fill",o.fill),t.attr("stroke",o.stroke),t.attr("width",c),t.attr("height",o.height),t.attr("rx",o.rx),t.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,H2t.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),kvt(i)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},i),u+=30}}return t.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),Q2t=me(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),J2t=me(async function(i,n,a=null){var s=i.append("foreignObject"),o=await jc(n.text,Nr()),o=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(o).node().getBoundingClientRect();if(s.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),"noteText"===n.class)(i=i.node().firstChild).setAttribute("height",o.height+2*n.textMargin),i=i.getBBox(),s.attr("x",Math.round(i.x+i.width/2-o.width/2)).attr("y",Math.round(i.y+i.height/2-o.height/2));else if(a){let{startx:t,stopx:e,starty:r}=a;t>e&&(i=t,t=e,e=i),s.attr("x",Math.round(t+Math.abs(t-e)/2-o.width/2)),"loopText"===n.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),tvt=me(function(t,e){let r=0,i=0,n=e.text.split(L.lineBreakRegex),[a,s]=WE(e.fontSize),o=[],l=0,c=me(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&0Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":c=me(()=>Math.round(e.y+(r+i+e.textMargin)/2),"yfunc");break;case"bottom":case"end":c=me(()=>Math.round(e.y+(r+i+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(var[h,u]of n.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(l=h*a),(h=t.append("text")).attr("x",e.x),h.attr("y",c()),void 0!==e.anchor&&h.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&h.style("font-family",e.fontFamily),void 0!==s&&h.style("font-size",s),void 0!==e.fontWeight&&h.style("font-weight",e.fontWeight),void 0!==e.fill&&h.attr("fill",e.fill),void 0!==e.class&&h.attr("class",e.class),void 0!==e.dy?h.attr("dy",e.dy):0!==l&&h.attr("dy",l);var d,u=u||kE;(e.tspan?((d=h.append("tspan")).attr("x",e.x),void 0!==e.fill&&d.attr("fill",e.fill),d):h).text(u),void 0!==e.valign&&void 0!==e.textMargin&&0{r.select&&t.forEach(t=>{var t=i.get(t),e=r.select("#actor"+t.actorCnt);!n.mirrorActors&&t.stopy?e.attr("y2",t.stopy+t.height/2):n.mirrorActors&&e.attr("y2",t.stopy)})},"fixLifeLineHeights"),nvt=me(function(t,e,r,i){var n=i?e.stopy:e.starty,a=e.x+e.width/2,s=n+e.height,o=t=t.append("g").lower(),s=(i||(rvt++,Object.keys(e.links||{}).length&&!r.forceMenus&&o.attr("onclick",Q2t(`actor${rvt}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+rvt).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",e.name),o=t.append("g"),e.actorCnt=rvt,null!=e.links&&o.attr("id","root-"+rvt)),k3()),a="actor",t=(e.properties?.class?a=e.properties.class:s.fill="#eaeaea",a+=i?" "+X2t:" actor-top",s.x=e.x,s.y=n,s.width=e.width,s.height=e.height,s.class=a,s.rx=3,s.ry=3,s.name=e.name,K2t(o,s));e.rectData=s,e.properties?.icon&&("@"===(i=e.properties.icon.trim()).charAt(0)?w3(o,s.x+s.width-20,s.y+10,i.substr(1)):b3(o,s.x+s.width-20,s.y+10,i)),wvt(r,Uc(e.description))(e.description,o,s.x,s.y,s.width,s.height,{class:"actor actor-box"},r);let l=e.height;return t.node&&(n=t.node().getBBox(),e.height=n.height,l=n.height),l},"drawActorTypeParticipant"),avt=me(function(t,e,r,i){var n=i?e.stopy:e.starty,a=e.x+e.width/2,s=n+80,o=t.append("g").lower(),l=(i||(rvt++,o.append("line").attr("id","actor"+rvt).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",e.name),e.actorCnt=rvt),t.append("g")),c="actor-man";return l.attr("class",c+=i?" "+X2t:" actor-top"),l.attr("name",e.name),(o=k3()).x=e.x,o.y=n,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+rvt).attr("x1",a).attr("y1",n+25).attr("x2",a).attr("y2",n+45),l.append("line").attr("id","actor-man-arms"+rvt).attr("x1",a-V2t/2).attr("y1",n+33).attr("x2",a+V2t/2).attr("y2",n+33),l.append("line").attr("x1",a-V2t/2).attr("y1",n+60).attr("x2",a).attr("y2",n+45),l.append("line").attr("x1",a).attr("y1",n+45).attr("x2",a+V2t/2-2).attr("y2",n+60),(s=l.append("circle")).attr("cx",e.x+e.width/2),s.attr("cy",n+10),s.attr("r",15),s.attr("width",e.width),s.attr("height",e.height),t=l.node().getBBox(),e.height=t.height,wvt(r,Uc(e.description))(e.description,l,o.x,o.y+35,o.width,o.height,{class:"actor actor-man"},r),e.height},"drawActorTypeActor"),svt=me(async function(t,e,r,i){switch(e.type){case"actor":return avt(t,e,r,i);case"participant":return nvt(t,e,r,i)}},"drawActor"),ovt=me(function(t,e,r){t=t.append("g"),uvt(t,e),e.name&&wvt(r)(e.name,t,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),t.lower()},"drawBox"),lvt=me(function(t){return t.append("g")},"anchorElement"),cvt=me(function(t,e,r,i,n){var a=k3(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+n%3,a.width=e.stopx-e.startx,a.height=r-e.starty,K2t(s,a)},"drawActivation"),hvt=me(async function(t,e,r,i){let{boxMargin:n,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=i,u=t.append("g"),d=me(function(t,e,r,i){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",i).attr("class","loopLine")},"drawLoopLine"),p=(d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){d(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}),T3());p.text=r,p.x=e.startx,p.y=e.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",evt(u,p),(p=xvt()).text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+n+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=Uc(p.text)?await J2t(u,p,e):tvt(u,p);if(void 0!==e.sectionTitles)for(var[f,m]of Object.entries(e.sectionTitles))m.message&&(p.text=m.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[f].y+n+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=e.wrap,Uc(p.text)?(e.starty=e.sections[f].y,await J2t(u,p,e)):tvt(u,p),m=Math.round(g.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e)),e.sections[f].height+=m-(n+a));return e.height=Math.round(e.stopy-e.starty),u},"drawLoop"),uvt=me(function(t,e){v3(t,e)},"drawBackgroundRect"),dvt=me(function(t){t.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"),pvt=me(function(t){t.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"),gvt=me(function(t){t.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"),fvt=me(function(t){t.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"),mvt=me(function(t){t.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"),yvt=me(function(t){t.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"),vvt=me(function(t){t.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"),xvt=me(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"),bvt=me(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),me(i,"byText"),me(c,"byTspan"),me(n,"byFo"),me(a,"byKatex"),me(f,"_setTextAttrs"),wvt=function(t,e=!1){return e?a:"fo"===t.textPlacement?n:"old"===t.textPlacement?i:c},me(e,"byText"),me(l,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),kvt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},Tvt={drawRect:K2t,drawText:tvt,drawLabel:evt,drawActor:svt,drawBox:ovt,drawPopup:Z2t,anchorElement:lvt,drawActivation:cvt,drawLoop:hvt,drawBackgroundRect:uvt,insertArrowHead:fvt,insertArrowFilledHead:mvt,insertSequenceNumber:yvt,insertArrowCrossHead:vvt,insertDatabaseIcon:dvt,insertComputerIcon:pvt,insertClockIcon:gvt,getTextObj:xvt,getNoteRect:bvt,fixLifeLineHeights:ivt,sanitizeUrl:H2t.sanitizeUrl}});async function Lvt(t,e){P.bumpVerticalPos(10);var{startx:r,stopx:i,message:n}=e,a=L.splitBreaks(n).length,s=Uc(n),n=s?await qc(n,D()):YE.calculateTextDimensions(n,Ovt(O));s||(s=n.height/a,e.height+=s,P.bumpVerticalPos(s));let o,l=n.height-10,c=n.width;return r===i?(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,i+a,P.getVerticalPos()+30+l)):(l+=O.boxMargin,o=P.getVerticalPos()+l,P.insert(r,o-10,i,o)),P.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,P.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),o}function Nvt(t,e,r,i,n){P.bumpVerticalPos(r);let a=i;e.id&&e.message&&t[e.id]&&(r=t[e.id].width,t=Ovt(O),e.message=YE.wrapLabel(`[${e.message}]`,r-2*O.wrapPadding,t),e.width=r,e.wrap=!0,r=YE.calculateTextDimensions(e.message,t),t=L.getMax(r.height,O.labelBoxHeight),a=i+t,M.debug(t+" - "+e.message)),n(e),P.bumpVerticalPos(a)}function Ivt(r,i,t,e,n,a,s){function o(t,e){t.x{var e=Ovt(O),r=t.actorKeys.reduce((t,e)=>t+(i.get(e).width+(i.get(e).margin||0)),0),e=(r-=2*O.boxTextMargin,t.wrap&&(t.name=YE.wrapLabel(t.name,r-2*O.wrapPadding,e)),YE.calculateTextDimensions(t.name,e)),e=(c=L.getMax(e.height,c),L.getMax(r,e.width+2*O.wrapPadding));t.margin=O.boxTextMargin,rt.textMaxHeight=c),L.getMax(r,O.height)}var O,P,Dvt,Ovt,Pvt,Bvt,Fvt,$vt,zvt,Gvt,Uvt,qvt,jvt,Wvt,Yvt,Hvt,Vvt,Xvt,Kvt,Zvt=t(()=>{Z3(),Avt(),e(),Jc(),t6(),fu(),qr(),KE(),th(),O={},P={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:me(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:me(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:me(function(t){this.boxes.push(t)},"addBox"),addActor:me(function(t){this.actors.push(t)},"addActor"),addLoop:me(function(t){this.loops.push(t)},"addLoop"),addMessage:me(function(t){this.messages.push(t)},"addMessage"),addNote:me(function(t){this.notes.push(t)},"addNote"),lastActor:me(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:me(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:me(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:me(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:me(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,Uvt(D())},"init"),updateVal:me(function(t,e,r,i){void 0===t[e]?t[e]=r:t[e]=i(r,t[e])},"updateVal"),updateBounds:me(function(i,n,a,s){let o=this,l=0;function t(r){return me(function(t){l++;var e=o.sequenceItems.length-l+1;o.updateVal(t,"starty",n-e*O.boxMargin,Math.min),o.updateVal(t,"stopy",s+e*O.boxMargin,Math.max),o.updateVal(P.data,"startx",i-e*O.boxMargin,Math.min),o.updateVal(P.data,"stopx",a+e*O.boxMargin,Math.max),"activation"!==r&&(o.updateVal(t,"startx",i-e*O.boxMargin,Math.min),o.updateVal(t,"stopx",a+e*O.boxMargin,Math.max),o.updateVal(P.data,"starty",n-e*O.boxMargin,Math.min),o.updateVal(P.data,"stopy",s+e*O.boxMargin,Math.max))},"updateItemBounds")}me(t,"updateFn"),this.sequenceItems.forEach(t()),this.activations.forEach(t("activation"))},"updateBounds"),insert:me(function(t,e,r,i){var n=L.getMin(t,r),t=L.getMax(t,r),r=L.getMin(e,i),e=L.getMax(e,i);this.updateVal(P.data,"startx",n,Math.min),this.updateVal(P.data,"starty",r,Math.min),this.updateVal(P.data,"stopx",t,Math.max),this.updateVal(P.data,"stopy",e,Math.max),this.updateBounds(n,r,t,e)},"insert"),newActivation:me(function(t,e,r){var r=r.get(t.from),i=qvt(t.from).length||0,r=r.x+r.width/2+(i-1)*O.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+O.activationWidth,stopy:void 0,actor:t.from,anchored:Tvt.anchorElement(e)})},"newActivation"),endActivation:me(function(t){return t=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from),this.activations.splice(t,1)[0]},"endActivation"),createLoop:me(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:me(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:me(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:me(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:me(function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:P.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:me(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:me(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:me(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=L.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:me(function(){return this.verticalPos},"getVerticalPos"),getBounds:me(function(){return{bounds:this.data,models:this.models}},"getBounds")},Dvt=me(async function(t,e){P.bumpVerticalPos(O.boxMargin),e.height=O.boxMargin,e.starty=P.getVerticalPos();var r=k3(),t=(r.x=e.startx,r.y=e.starty,r.width=e.width||O.width,r.class="note",t.append("g")),i=Tvt.drawRect(t,r),t=((n=T3()).x=e.startx,n.y=e.starty,n.width=r.width,n.dy="1em",n.text=e.message,n.class="noteText",n.fontFamily=O.noteFontFamily,n.fontSize=O.noteFontSize,n.fontWeight=O.noteFontWeight,n.anchor=O.noteAlign,n.textMargin=O.noteMargin,n.valign="center",Uc(n.text)?await J2t(t,n):tvt(t,n)),n=Math.round(t.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));i.attr("height",n+2*O.noteMargin),e.height+=n+2*O.noteMargin,P.bumpVerticalPos(n+2*O.noteMargin),e.stopy=e.starty+n+2*O.noteMargin,e.stopx=e.startx+r.width,P.insert(e.startx,e.starty,e.stopx,e.stopy),P.models.addNote(e)},"drawNote"),Ovt=me(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Pvt=me(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),Bvt=me(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont"),me(Lvt,"boundMessage"),Fvt=me(async function(t,e,r,i){var{startx:e,stopx:n,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=e,h=YE.calculateTextDimensions(s,Ovt(O)),u=T3();u.x=e,u.y=a+10,u.width=n-e,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,Uc(u.text)?await J2t(t,u,{startx:e,stopx:n,starty:r}):tvt(t,u);let d=h.width,p,g=(e===n?p=O.rightAngles?t.append("path").attr("d",`M ${e},${r} H ${e+L.getMax(O.width/2,d/2)} V ${r+25} H `+e):t.append("path").attr("d","M "+e+","+r+" C "+(e+60)+","+(r-10)+" "+(e+60)+","+(r+30)+" "+e+","+(r+20)):((p=t.append("line")).attr("x1",e),p.attr("y1",r),p.attr("x2",n),p.attr("y2",r)),o===i.db.LINETYPE.DOTTED||o===i.db.LINETYPE.DOTTED_CROSS||o===i.db.LINETYPE.DOTTED_POINT||o===i.db.LINETYPE.DOTTED_OPEN||o===i.db.LINETYPE.BIDIRECTIONAL_DOTTED?(p.style("stroke-dasharray","3, 3"),p.attr("class","messageLine1")):p.attr("class","messageLine0"),"");O.arrowMarkerAbsolute&&(g=(g=(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),p.attr("stroke-width",2),p.attr("stroke","none"),p.style("fill","none"),o!==i.db.LINETYPE.SOLID&&o!==i.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),o!==i.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==i.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p.attr("marker-start","url("+g+"#arrowhead)"),p.attr("marker-end","url("+g+"#arrowhead)")),o!==i.db.LINETYPE.SOLID_POINT&&o!==i.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),o!==i.db.LINETYPE.SOLID_CROSS&&o!==i.db.LINETYPE.DOTTED_CROSS||p.attr("marker-end","url("+g+"#crosshead)"),(c||O.showSequenceNumbers)&&(p.attr("marker-start","url("+g+"#sequencenumber)"),t.append("text").attr("x",e).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))},"drawMessage"),$vt=me(function(t,e,r,i,n,a,s){let o=0,l=0,c,h=0;for(var u of i){var d=(u=e.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=n),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,n,u.x+u.width,u.height),o+=u.width+l,u.box&&(u.box.width=o+d.margin-u.box.x),l=u.margin,c=u.box,P.models.addActor(u)}c&&!s&&P.models.addBox(c),P.bumpVerticalPos(h)},"addActorRenderingData"),zvt=me(async function(e,r,i,t){if(t){let t=0;P.bumpVerticalPos(2*O.boxMargin);for(var n of i)(n=r.get(n)).stopy||(n.stopy=P.getVerticalPos()),n=await Tvt.drawActor(e,n,O,!0),t=L.getMax(t,n);P.bumpVerticalPos(t+O.boxMargin)}else for(var a of i)a=r.get(a),await Tvt.drawActor(e,a,O,!1)},"drawActors"),Gvt=me(function(t,e,r,i){let n=0,a=0;for(var s of r){var s=e.get(s),o=Yvt(s);(o=Tvt.drawPopup(t,s,o,O,O.forceMenus,i)).height>n&&(n=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:n,maxWidth:a}},"drawActorsPopup"),Uvt=me(function(t){ie(O,t),t.fontFamily&&(O.actorFontFamily=O.noteFontFamily=O.messageFontFamily=t.fontFamily),t.fontSize&&(O.actorFontSize=O.noteFontSize=O.messageFontSize=t.fontSize),t.fontWeight&&(O.actorFontWeight=O.noteFontWeight=O.messageFontWeight=t.fontWeight)},"setConf"),qvt=me(function(e){return P.activations.filter(function(t){return t.actor===e})},"actorActivations"),jvt=me(function(t,e){return e=e.get(t),[(t=qvt(t)).reduce(function(t,e){return L.getMin(t,e.startx)},e.x+e.width/2-1),t.reduce(function(t,e){return L.getMax(t,e.stopx)},e.x+e.width/2+1)]},"activationBounds"),me(Nvt,"adjustLoopHeightForWrap"),me(Ivt,"adjustCreatedDestroyedData"),Wvt=me(async function(i,t,e,n){var{securityLevel:r,sequence:a}=D();O=a;let s;"sandbox"===r&&(s=j("#i"+t));var a=j("sandbox"===r?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===r?s.nodes()[0].contentDocument:document;P.init(),M.debug(n.db);let l="sandbox"===r?a.select(`[id="${t}"]`):j(`[id="${t}"]`),c=n.db.getActors(),h=n.db.getCreatedActors(),u=n.db.getDestroyedActors(),d=n.db.getBoxes(),p=n.db.getActorKeys(),g=n.db.getMessages(),f=n.db.getDiagramTitle(),m=n.db.hasAtLeastOneBox(),y=n.db.hasAtLeastOneBoxWithTitle(),v=await Rvt(c,g,n);if(O.height=await Mvt(c,v,d),Tvt.insertComputerIcon(l),Tvt.insertDatabaseIcon(l),Tvt.insertClockIcon(l),m&&(P.bumpVerticalPos(O.boxMargin),y)&&P.bumpVerticalPos(d[0].textMaxHeight),!0===O.hideUnusedParticipants){let e=new Set;g.forEach(t=>{e.add(t.from),e.add(t.to)}),p=p.filter(t=>e.has(t))}$vt(l,c,h,p,0,g,!1);var x,b,w,k=await Xvt(g,c,v,n);function T(t,e){var r=P.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),Tvt.drawActivation(l,r,e,O,qvt(t.from).length),P.insert(r.startx,e-10,r.stopx,e)}Tvt.insertArrowHead(l),Tvt.insertArrowCrossHead(l),Tvt.insertArrowFilledHead(l),Tvt.insertSequenceNumber(l),me(T,"activeEnd");let E=1,C=1,_=[],S=[],A=0;for(x of g){let t,e,r;switch(x.type){case n.db.LINETYPE.NOTE:P.resetVerticalPos(),e=x.noteModel,await Dvt(l,e);break;case n.db.LINETYPE.ACTIVE_START:P.newActivation(x,l,c);break;case n.db.LINETYPE.ACTIVE_END:T(x,P.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case n.db.LINETYPE.LOOP_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"loop",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case n.db.LINETYPE.RECT_START:Nvt(k,x,O.boxMargin,O.boxMargin,t=>P.newLoop(void 0,t.message));break;case n.db.LINETYPE.RECT_END:t=P.endLoop(),S.push(t),P.models.addLoop(t),P.bumpVerticalPos(t.stopy-P.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case n.db.LINETYPE.OPT_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"opt",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case n.db.LINETYPE.ALT_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case n.db.LINETYPE.ALT_ELSE:Nvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case n.db.LINETYPE.ALT_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"alt",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t)),P.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Nvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case n.db.LINETYPE.PAR_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"par",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case n.db.LINETYPE.AUTONUMBER:E=x.message.start||E,C=x.message.step||C,x.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case n.db.LINETYPE.CRITICAL_OPTION:Nvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case n.db.LINETYPE.CRITICAL_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"critical",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case n.db.LINETYPE.BREAK_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case n.db.LINETYPE.BREAK_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"break",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;default:try{(r=x.msgModel).starty=P.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=n.db.showSequenceNumbers();var L=await Lvt(l,r);Ivt(x,r,L,A,c,h,u),_.push({messageModel:r,lineStartY:L}),P.models.addMessage(r)}catch(i){M.error("error while drawing message",i)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(x.type)&&(E+=C),A++}M.debug("createdActors",h),M.debug("destroyedActors",u),await zvt(l,c,p,!1);for(b of _)await Fvt(l,b.messageModel,b.lineStartY,n);O.mirrorActors&&await zvt(l,c,p,!0),S.forEach(t=>Tvt.drawBackgroundRect(l,t)),ivt(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)",Tvt.drawBox(l,w,O);m&&P.bumpVerticalPos(O.boxMargin),r=Gvt(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=(No?-t:t,"adjustValue");t.from===t.to?c=l:(t.activate&&!h&&(c+=u(O.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(c+=u(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=u(3)));var e=[i,n,a,s],r=Math.abs(l-c),d=(t.wrap&&t.message&&(t.message=YE.wrapLabel(t.message,L.getMax(r+2*O.wrapPadding,O.width),Ovt(O))),YE.calculateTextDimensions(t.message,Ovt(O)));return{width:L.getMax(t.wrap?0:d.width+2*O.wrapPadding,r+2*O.wrapPadding,O.width),height:0,startx:l,stopx:c,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,e),toBounds:Math.max.apply(null,e)}},"buildMessageModel"),Xvt=me(async function(t,i,e,n){let a={},s=[],o,l,c;for(let r of t){switch(r.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:s.push({id:r.id,msg:r.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:r.message&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:o=s.pop(),a[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:var h=i.get(r.from||r.to.actor),u=qvt(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 n.db.LINETYPE.ACTIVE_END:h=P.activations.map(t=>t.actor).lastIndexOf(r.from),P.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await Hvt(r,i,n),r.noteModel=l,s.forEach(t=>{(o=t).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=Vvt(r,i,n),(r.msgModel=c).startx&&c.stopx&&0{var e;o=t,c.startx===c.stopx?(t=i.get(r.from),e=i.get(r.to),o.from=L.getMin(t.x-c.width/2,t.x-t.width/2,o.from),o.to=L.getMax(e.x+c.width/2,e.x+t.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"),Kvt={bounds:P,drawActors:zvt,drawActorsPopup:Gvt,setConf:Uvt,draw:Wvt}}),Qvt={};lPt(Qvt,{diagram:()=>Jvt});var Jvt,txt,ext,rxt,ixt,nxt,axt,sxt,oxt,lxt,cxt,hxt,uxt,dxt,pxt,gxt=t(()=>{Cvt(),_vt(),Svt(),fu(),Zvt(),Jvt={parser:z2t,get db(){return new j2t},renderer:Kvt,styles:Y2t,init:me(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,mh({sequence:{wrap:t.wrap}}))},"init")}}),fxt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[1,18],i=[1,19],n=[1,20],a=[1,41],s=[1,42],o=[1,26],l=[1,24],P=[1,25],B=[1,32],F=[1,33],$=[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],tt=[1,98],C=[1,115],_=[1,107],S=[1,113],A=[1,108],L=[1,109],N=[1,110],I=[1,111],R=[1,112],M=[1,114],et=[22,58,59,80,84,85,86,87,88,89],rt=[1,8,9,39,41,44],D=[1,8,9,22],it=[1,143],nt=[1,8,9,59],O=[1,8,9,22,58,59,80,84,85,86,87,88,89],k={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){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:i.addRelation(a[o]);break;case 19:a[o-1].title=i.cleanupLabel(a[o]),i.addRelation(a[o-1]);break;case 30:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 31:case 32:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 33:i.addClassesToNamespace(a[o-3],a[o-1]);break;case 34:i.addClassesToNamespace(a[o-4],a[o-1]);break;case 35:this.$=a[o],i.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:i.setCssClass(a[o-2],a[o]);break;case 41:i.addMembers(a[o-3],a[o-1]);break;case 42:i.setCssClass(a[o-5],a[o-3]),i.addMembers(a[o-5],a[o-1]);break;case 43:this.$=a[o],i.addClass(a[o]);break;case 44:this.$=a[o-1],i.addClass(a[o-1]),i.setClassLabel(a[o-1],a[o]);break;case 45:i.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:i.addMember(a[o-1],i.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:i.addNote(a[o],a[o-1]);break;case 57:i.addNote(a[o]);break;case 58:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 60:this.$=a[o-2].concat([a[o]]);break;case 61:i.setDirection("TB");break;case 62:i.setDirection("BT");break;case 63:i.setDirection("RL");break;case 64:i.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.$=i.relationType.AGGREGATION;break;case 70:this.$=i.relationType.EXTENSION;break;case 71:this.$=i.relationType.COMPOSITION;break;case 72:this.$=i.relationType.DEPENDENCY;break;case 73:this.$=i.relationType.LOLLIPOP;break;case 74:this.$=i.lineType.LINE;break;case 75:this.$=i.lineType.DOTTED_LINE;break;case 76:case 82:this.$=a[o-2],i.setClickEvent(a[o-1],a[o]);break;case 77:case 83:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 78:this.$=a[o-2],i.setLink(a[o-1],a[o]);break;case 79:this.$=a[o-3],i.setLink(a[o-2],a[o-1],a[o]);break;case 80:this.$=a[o-3],i.setLink(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 81:this.$=a[o-4],i.setLink(a[o-3],a[o-2],a[o]),i.setTooltip(a[o-3],a[o-1]);break;case 84:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-4],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 86:this.$=a[o-3],i.setLink(a[o-2],a[o]);break;case 87:this.$=a[o-4],i.setLink(a[o-3],a[o-1],a[o]);break;case 88:this.$=a[o-4],i.setLink(a[o-3],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 89:this.$=a[o-5],i.setLink(a[o-4],a[o-2],a[o]),i.setTooltip(a[o-4],a[o-1]);break;case 90:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 91:i.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:i,37:n,38:22,42:a,43:23,46:s,47:o,49:l,50:P,52:B,54:F,55:$,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]},e(X,[2,5],{8:[1,48]}),{8:[1,49]},e(g,[2,18],{22:[1,50]}),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,27]),e(g,[2,28]),e(g,[2,29]),{34:[1,51]},{36:[1,52]},e(g,[2,32]),e(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]},e(b,[2,39],{39:[1,67],44:[1,66]}),e(g,[2,50]),e(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]},e(g,[2,61]),e(g,[2,62]),e(g,[2,63]),e(g,[2,64]),e(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}),e(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},e(k,[2,118]),e(k,[2,119]),e(k,[2,120]),e(k,[2,121]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),e(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:i,37:n,42:a,46:s,47:o,49:l,50:P,52:B,54:F,55:$,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:i,37:n,38:22,42:a,43:23,46:s,47:o,49:l,50:P,52:B,54:F,55:$,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},e(g,[2,19]),e(g,[2,30]),e(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},e(g,[2,49]),{65:91,71:K,72:Z},e(T,[2,68],{64:92,66:f,67:m,68:y,69:v,70:x}),e(E,[2,69]),e(E,[2,70]),e(E,[2,71]),e(E,[2,72]),e(E,[2,73]),e(J,[2,74]),e(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:tt},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:C,57:104,58:_,80:S,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},{58:[1,116]},{13:Q,53:117},e(g,[2,57]),e(g,[2,123]),{22:C,57:118,58:_,59:[1,119],80:S,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},e(et,[2,59]),{16:39,18:120,19:40,58:c,84:h,99:u,101:d,102:p},e(w,[2,15]),e(w,[2,16]),e(w,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:c,84:h,99:u,101:d},e(rt,[2,43],{11:123,12:[1,124]}),e(X,[2,7]),{9:[1,125]},e(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},e(T,[2,67],{64:129,66:f,67:m,68:y,69:v,70:x}),e(T,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:s},{8:[1,132],41:[2,36]},e(b,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:tt},{16:39,18:136,19:40,58:c,84:h,99:u,101:d,102:p},e(g,[2,76],{13:[1,137]}),e(g,[2,78],{13:[1,139],75:[1,138]}),e(g,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},e(g,[2,90],{59:it}),e(nt,[2,92],{83:144,22:C,58:_,80:S,84:A,85:L,86:N,87:I,88:R,89:M}),e(O,[2,94]),e(O,[2,96]),e(O,[2,97]),e(O,[2,98]),e(O,[2,99]),e(O,[2,100]),e(O,[2,101]),e(O,[2,102]),e(O,[2,103]),e(O,[2,104]),e(g,[2,91]),e(g,[2,56]),e(g,[2,58],{59:it}),{58:[1,145]},e(w,[2,13]),{15:146,16:84,58:c,84:h,99:u,101:d},{39:[2,11]},e(rt,[2,44]),{13:[1,147]},{1:[2,4]},e(D,[2,54]),e(D,[2,53]),{16:39,18:148,19:40,58:c,84:h,99:u,101:d,102:p},e(T,[2,65]),e(g,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:s},{45:151,49:tt},e(b,[2,41]),{41:[2,47]},e(g,[2,45]),e(g,[2,77]),e(g,[2,79]),e(g,[2,80],{75:[1,152]}),e(g,[2,83]),e(g,[2,84],{13:[1,153]}),e(g,[2,86],{13:[1,155],75:[1,154]}),{22:C,58:_,80:S,82:156,83:106,84:A,85:L,86:N,87:I,88:R,89:M},e(O,[2,95]),e(et,[2,60]),{39:[2,10]},{14:[1,157]},e(D,[2,55]),e(g,[2,34]),{41:[2,38]},{41:[1,158]},e(g,[2,81]),e(g,[2,85]),e(g,[2,87]),e(g,[2,88],{75:[1,159]}),e(nt,[2,93],{83:144,22:C,58:_,80:S,84:A,85:L,86:N,87:I,88:R,89:M}),e(rt,[2,8]),e(b,[2,42]),e(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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{function e(t,e,r,n,i,a,s){g(e.append("text").attr("x",r).attr("y",n).style("text-anchor","start").text(t),s)}function l(t,e,r,n,i,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;tr?o.width:r);if((t=l.append("rect")).attr("class","actorPopupMenuPanel"+i),t.attr("x",o.x),t.attr("y",o.height),t.attr("fill",o.fill),t.attr("stroke",o.stroke),t.attr("width",c),t.attr("height",o.height),t.attr("rx",o.rx),t.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,X2t.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),Evt(n)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},n),u+=30}}return t.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),tvt=me(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),evt=me(async function(n,i,a=null){var s=n.append("foreignObject"),o=await Wc(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:t,stopx:e,starty:r}=a;t>e&&(n=t,t=e,e=n),s.attr("x",Math.round(t+Math.abs(t-e)/2-o.width/2)),"loopText"===i.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),rvt=me(function(t,e){let r=0,n=0,i=e.text.split(L.lineBreakRegex),[a,s]=YE(e.fontSize),o=[],l=0,c=me(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&0Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":c=me(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":c=me(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(var[h,u]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(l=h*a),(h=t.append("text")).attr("x",e.x),h.attr("y",c()),void 0!==e.anchor&&h.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&h.style("font-family",e.fontFamily),void 0!==s&&h.style("font-size",s),void 0!==e.fontWeight&&h.style("font-weight",e.fontWeight),void 0!==e.fill&&h.attr("fill",e.fill),void 0!==e.class&&h.attr("class",e.class),void 0!==e.dy?h.attr("dy",e.dy):0!==l&&h.attr("dy",l);var d,u=u||TE;(e.tspan?((d=h.append("tspan")).attr("x",e.x),void 0!==e.fill&&d.attr("fill",e.fill),d):h).text(u),void 0!==e.valign&&void 0!==e.textMargin&&0{r.select&&t.forEach(t=>{var t=n.get(t),e=r.select("#actor"+t.actorCnt);!i.mirrorActors&&t.stopy?e.attr("y2",t.stopy+t.height/2):i.mirrorActors&&e.attr("y2",t.stopy)})},"fixLifeLineHeights"),svt=me(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t=t.append("g").lower(),s=(n||(ivt++,Object.keys(e.links||{}).length&&!r.forceMenus&&o.attr("onclick",tvt(`actor${ivt}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+ivt).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",e.name),o=t.append("g"),e.actorCnt=ivt,null!=e.links&&o.attr("id","root-"+ivt)),T3()),a="actor",t=(e.properties?.class?a=e.properties.class:s.fill="#eaeaea",a+=n?" "+Z2t:" actor-top",s.x=e.x,s.y=i,s.width=e.width,s.height=e.height,s.class=a,s.rx=3,s.ry=3,s.name=e.name,Q2t(o,s));e.rectData=s,e.properties?.icon&&("@"===(n=e.properties.icon.trim()).charAt(0)?k3(o,s.x+s.width-20,s.y+10,n.substr(1)):w3(o,s.x+s.width-20,s.y+10,n)),Tvt(r,qc(e.description))(e.description,o,s.x,s.y,s.width,s.height,{class:"actor actor-box"},r);let l=e.height;return t.node&&(i=t.node().getBBox(),e.height=i.height,l=i.height),l},"drawActorTypeParticipant"),ovt=me(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower(),l=(n||(ivt++,o.append("line").attr("id","actor"+ivt).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",e.name),e.actorCnt=ivt),t.append("g")),c="actor-man";return l.attr("class",c+=n?" "+Z2t:" actor-top"),l.attr("name",e.name),(o=T3()).x=e.x,o.y=i,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+ivt).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+ivt).attr("x1",a-K2t/2).attr("y1",i+33).attr("x2",a+K2t/2).attr("y2",i+33),l.append("line").attr("x1",a-K2t/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+K2t/2-2).attr("y2",i+60),(s=l.append("circle")).attr("cx",e.x+e.width/2),s.attr("cy",i+10),s.attr("r",15),s.attr("width",e.width),s.attr("height",e.height),t=l.node().getBBox(),e.height=t.height,Tvt(r,qc(e.description))(e.description,l,o.x,o.y+35,o.width,o.height,{class:"actor actor-man"},r),e.height},"drawActorTypeActor"),lvt=me(async function(t,e,r,n){switch(e.type){case"actor":return ovt(t,e,r,n);case"participant":return svt(t,e,r,n)}},"drawActor"),cvt=me(function(t,e,r){t=t.append("g"),pvt(t,e),e.name&&Tvt(r)(e.name,t,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),t.lower()},"drawBox"),hvt=me(function(t){return t.append("g")},"anchorElement"),uvt=me(function(t,e,r,n,i){var a=T3(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,Q2t(s,a)},"drawActivation"),dvt=me(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=n,u=t.append("g"),d=me(function(t,e,r,n){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",n).attr("class","loopLine")},"drawLoopLine"),p=(d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){d(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}),E3());p.text=r,p.x=e.startx,p.y=e.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",nvt(u,p),(p=wvt()).text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.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=qc(p.text)?await evt(u,p,e):rvt(u,p);if(void 0!==e.sectionTitles)for(var[f,m]of Object.entries(e.sectionTitles))m.message&&(p.text=m.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.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=e.wrap,qc(p.text)?(e.starty=e.sections[f].y,await evt(u,p,e)):rvt(u,p),m=Math.round(g.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e)),e.sections[f].height+=m-(i+a));return e.height=Math.round(e.stopy-e.starty),u},"drawLoop"),pvt=me(function(t,e){x3(t,e)},"drawBackgroundRect"),gvt=me(function(t){t.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"),fvt=me(function(t){t.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"),mvt=me(function(t){t.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"),yvt=me(function(t){t.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"),vvt=me(function(t){t.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"),xvt=me(function(t){t.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"),bvt=me(function(t){t.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"),wvt=me(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"),kvt=me(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),me(n,"byText"),me(c,"byTspan"),me(i,"byFo"),me(a,"byKatex"),me(f,"_setTextAttrs"),Tvt=function(t,e=!1){return e?a:"fo"===t.textPlacement?i:"old"===t.textPlacement?n:c},me(e,"byText"),me(l,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),Evt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},Cvt={drawRect:Q2t,drawText:rvt,drawLabel:nvt,drawActor:lvt,drawBox:cvt,drawPopup:J2t,anchorElement:hvt,drawActivation:uvt,drawLoop:dvt,drawBackgroundRect:pvt,insertArrowHead:yvt,insertArrowFilledHead:vvt,insertSequenceNumber:xvt,insertArrowCrossHead:bvt,insertDatabaseIcon:gvt,insertComputerIcon:fvt,insertClockIcon:mvt,getTextObj:wvt,getNoteRect:kvt,fixLifeLineHeights:avt,sanitizeUrl:X2t.sanitizeUrl}});async function Ivt(t,e){P.bumpVerticalPos(10);var{startx:r,stopx:n,message:i}=e,a=L.splitBreaks(i).length,s=qc(i),i=s?await jc(i,D()):HE.calculateTextDimensions(i,Bvt(O));s||(s=i.height/a,e.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),e.height+=l,e.stopy=e.starty+e.height,P.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),o}function Rvt(t,e,r,n,i){P.bumpVerticalPos(r);let a=n;e.id&&e.message&&t[e.id]&&(r=t[e.id].width,t=Bvt(O),e.message=HE.wrapLabel(`[${e.message}]`,r-2*O.wrapPadding,t),e.width=r,e.wrap=!0,r=HE.calculateTextDimensions(e.message,t),t=L.getMax(r.height,O.labelBoxHeight),a=n+t,M.debug(t+" - "+e.message)),i(e),P.bumpVerticalPos(a)}function Mvt(r,n,t,e,i,a,s){function o(t,e){t.x{var e=Bvt(O),r=t.actorKeys.reduce((t,e)=>t+(n.get(e).width+(n.get(e).margin||0)),0),e=(r-=2*O.boxTextMargin,t.wrap&&(t.name=HE.wrapLabel(t.name,r-2*O.wrapPadding,e)),HE.calculateTextDimensions(t.name,e)),e=(c=L.getMax(e.height,c),L.getMax(r,e.width+2*O.wrapPadding));t.margin=O.boxTextMargin,rt.textMaxHeight=c),L.getMax(r,O.height)}var O,P,Pvt,Bvt,Fvt,$vt,zvt,Gvt,Uvt,qvt,jvt,Wvt,Yvt,Hvt,Vvt,Xvt,Kvt,Zvt,Qvt,Jvt=t(()=>{Q3(),Nvt(),e(),th(),th(),ew(),mu(),jr(),ZE(),eh(),O={},P={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:me(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:me(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:me(function(t){this.boxes.push(t)},"addBox"),addActor:me(function(t){this.actors.push(t)},"addActor"),addLoop:me(function(t){this.loops.push(t)},"addLoop"),addMessage:me(function(t){this.messages.push(t)},"addMessage"),addNote:me(function(t){this.notes.push(t)},"addNote"),lastActor:me(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:me(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:me(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:me(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:me(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,jvt(D())},"init"),updateVal:me(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:me(function(n,i,a,s){let o=this,l=0;function t(r){return me(function(t){l++;var e=o.sequenceItems.length-l+1;o.updateVal(t,"starty",i-e*O.boxMargin,Math.min),o.updateVal(t,"stopy",s+e*O.boxMargin,Math.max),o.updateVal(P.data,"startx",n-e*O.boxMargin,Math.min),o.updateVal(P.data,"stopx",a+e*O.boxMargin,Math.max),"activation"!==r&&(o.updateVal(t,"startx",n-e*O.boxMargin,Math.min),o.updateVal(t,"stopx",a+e*O.boxMargin,Math.max),o.updateVal(P.data,"starty",i-e*O.boxMargin,Math.min),o.updateVal(P.data,"stopy",s+e*O.boxMargin,Math.max))},"updateItemBounds")}me(t,"updateFn"),this.sequenceItems.forEach(t()),this.activations.forEach(t("activation"))},"updateBounds"),insert:me(function(t,e,r,n){var i=L.getMin(t,r),t=L.getMax(t,r),r=L.getMin(e,n),e=L.getMax(e,n);this.updateVal(P.data,"startx",i,Math.min),this.updateVal(P.data,"starty",r,Math.min),this.updateVal(P.data,"stopx",t,Math.max),this.updateVal(P.data,"stopy",e,Math.max),this.updateBounds(i,r,t,e)},"insert"),newActivation:me(function(t,e,r){var r=r.get(t.from),n=Wvt(t.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:t.from,anchored:Cvt.anchorElement(e)})},"newActivation"),endActivation:me(function(t){return t=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from),this.activations.splice(t,1)[0]},"endActivation"),createLoop:me(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:me(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:me(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:me(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:me(function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:P.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:me(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:me(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:me(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=L.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:me(function(){return this.verticalPos},"getVerticalPos"),getBounds:me(function(){return{bounds:this.data,models:this.models}},"getBounds")},Pvt=me(async function(t,e){P.bumpVerticalPos(O.boxMargin),e.height=O.boxMargin,e.starty=P.getVerticalPos();var r=T3(),t=(r.x=e.startx,r.y=e.starty,r.width=e.width||O.width,r.class="note",t.append("g")),n=Cvt.drawRect(t,r),t=((i=E3()).x=e.startx,i.y=e.starty,i.width=r.width,i.dy="1em",i.text=e.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",qc(i.text)?await evt(t,i):rvt(t,i)),i=Math.round(t.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",i+2*O.noteMargin),e.height+=i+2*O.noteMargin,P.bumpVerticalPos(i+2*O.noteMargin),e.stopy=e.starty+i+2*O.noteMargin,e.stopx=e.startx+r.width,P.insert(e.startx,e.starty,e.stopx,e.stopy),P.models.addNote(e)},"drawNote"),Bvt=me(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Fvt=me(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),$vt=me(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont"),me(Ivt,"boundMessage"),zvt=me(async function(t,e,r,n){var{startx:e,stopx:i,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=e,h=HE.calculateTextDimensions(s,Bvt(O)),u=E3();u.x=e,u.y=a+10,u.width=i-e,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,qc(u.text)?await evt(t,u,{startx:e,stopx:i,starty:r}):rvt(t,u);let d=h.width,p,g=(e===i?p=O.rightAngles?t.append("path").attr("d",`M ${e},${r} H ${e+L.getMax(O.width/2,d/2)} V ${r+25} H `+e):t.append("path").attr("d","M "+e+","+r+" C "+(e+60)+","+(r-10)+" "+(e+60)+","+(r+30)+" "+e+","+(r+20)):((p=t.append("line")).attr("x1",e),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=Mc(!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)"),t.append("text").attr("x",e).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))},"drawMessage"),Gvt=me(function(t,e,r,n,i,a,s){let o=0,l=0,c,h=0;for(var u of n){var d=(u=e.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"),Uvt=me(async function(e,r,n,t){if(t){let t=0;P.bumpVerticalPos(2*O.boxMargin);for(var i of n)(i=r.get(i)).stopy||(i.stopy=P.getVerticalPos()),i=await Cvt.drawActor(e,i,O,!0),t=L.getMax(t,i);P.bumpVerticalPos(t+O.boxMargin)}else for(var a of n)a=r.get(a),await Cvt.drawActor(e,a,O,!1)},"drawActors"),qvt=me(function(t,e,r,n){let i=0,a=0;for(var s of r){var s=e.get(s),o=Vvt(s);(o=Cvt.drawPopup(t,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"),jvt=me(function(t){ie(O,t),t.fontFamily&&(O.actorFontFamily=O.noteFontFamily=O.messageFontFamily=t.fontFamily),t.fontSize&&(O.actorFontSize=O.noteFontSize=O.messageFontSize=t.fontSize),t.fontWeight&&(O.actorFontWeight=O.noteFontWeight=O.messageFontWeight=t.fontWeight)},"setConf"),Wvt=me(function(e){return P.activations.filter(function(t){return t.actor===e})},"actorActivations"),Yvt=me(function(t,e){return e=e.get(t),[(t=Wvt(t)).reduce(function(t,e){return L.getMin(t,e.startx)},e.x+e.width/2-1),t.reduce(function(t,e){return L.getMax(t,e.stopx)},e.x+e.width/2+1)]},"activationBounds"),me(Rvt,"adjustLoopHeightForWrap"),me(Mvt,"adjustCreatedDestroyedData"),Hvt=me(async function(n,t,e,i){var{securityLevel:r,sequence:a}=D();O=a;let s;"sandbox"===r&&(s=H("#i"+t));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="${t}"]`):H(`[id="${t}"]`),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 Dvt(c,g,i);if(O.height=await Ovt(c,v,d),Cvt.insertComputerIcon(l),Cvt.insertDatabaseIcon(l),Cvt.insertClockIcon(l),m&&(P.bumpVerticalPos(O.boxMargin),y)&&P.bumpVerticalPos(d[0].textMaxHeight),!0===O.hideUnusedParticipants){let e=new Set;g.forEach(t=>{e.add(t.from),e.add(t.to)}),p=p.filter(t=>e.has(t))}Gvt(l,c,h,p,0,g,!1);var x,b,w,k=await Zvt(g,c,v,i);function T(t,e){var r=P.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),Cvt.drawActivation(l,r,e,O,Wvt(t.from).length),P.insert(r.startx,e-10,r.stopx,e)}Cvt.insertArrowHead(l),Cvt.insertArrowCrossHead(l),Cvt.insertArrowFilledHead(l),Cvt.insertSequenceNumber(l),me(T,"activeEnd");let E=1,C=1,_=[],S=[],A=0;for(x of g){let t,e,r;switch(x.type){case i.db.LINETYPE.NOTE:P.resetVerticalPos(),e=x.noteModel,await Pvt(l,e);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:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case i.db.LINETYPE.LOOP_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"loop",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case i.db.LINETYPE.RECT_START:Rvt(k,x,O.boxMargin,O.boxMargin,t=>P.newLoop(void 0,t.message));break;case i.db.LINETYPE.RECT_END:t=P.endLoop(),S.push(t),P.models.addLoop(t),P.bumpVerticalPos(t.stopy-P.getVerticalPos());break;case i.db.LINETYPE.OPT_START:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case i.db.LINETYPE.OPT_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"opt",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case i.db.LINETYPE.ALT_START:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case i.db.LINETYPE.ALT_ELSE:Rvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case i.db.LINETYPE.ALT_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"alt",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t)),P.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:Rvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case i.db.LINETYPE.PAR_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"par",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);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:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case i.db.LINETYPE.CRITICAL_OPTION:Rvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case i.db.LINETYPE.CRITICAL_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"critical",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case i.db.LINETYPE.BREAK_START:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case i.db.LINETYPE.BREAK_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"break",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;default:try{(r=x.msgModel).starty=P.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=i.db.showSequenceNumbers();var L=await Ivt(l,r);Mvt(x,r,L,A,c,h,u),_.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 Uvt(l,c,p,!1);for(b of _)await zvt(l,b.messageModel,b.lineStartY,i);O.mirrorActors&&await Uvt(l,c,p,!0),S.forEach(t=>Cvt.drawBackgroundRect(l,t)),avt(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)",Cvt.drawBox(l,w,O);m&&P.bumpVerticalPos(O.boxMargin),r=qvt(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=(No?-t:t,"adjustValue");t.from===t.to?c=l:(t.activate&&!h&&(c+=u(O.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(c+=u(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=u(3)));var e=[n,i,a,s],r=Math.abs(l-c),d=(t.wrap&&t.message&&(t.message=HE.wrapLabel(t.message,L.getMax(r+2*O.wrapPadding,O.width),Bvt(O))),HE.calculateTextDimensions(t.message,Bvt(O)));return{width:L.getMax(t.wrap?0:d.width+2*O.wrapPadding,r+2*O.wrapPadding,O.width),height:0,startx:l,stopx:c,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,e),toBounds:Math.max.apply(null,e)}},"buildMessageModel"),Zvt=me(async function(t,n,e,i){let a={},s=[],o,l,c;for(let r of t){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=Wvt(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(t=>t.actor).lastIndexOf(r.from),P.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await Xvt(r,n,i),r.noteModel=l,s.forEach(t=>{(o=t).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=Kvt(r,n,i),(r.msgModel=c).startx&&c.stopx&&0{var e;o=t,c.startx===c.stopx?(t=n.get(r.from),e=n.get(r.to),o.from=L.getMin(t.x-c.width/2,t.x-t.width/2,o.from),o.to=L.getMax(e.x+c.width/2,e.x+t.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"),Qvt={bounds:P,drawActors:Uvt,drawActorsPopup:qvt,setConf:jvt,draw:Hvt}}),txt={};oPt(txt,{diagram:()=>ext});var ext,rxt,nxt,ixt,axt,sxt,oxt,lxt,cxt,hxt,uxt,dxt,pxt,gxt,fxt,mxt=t(()=>{Svt(),Avt(),Lvt(),mu(),Jvt(),ext={parser:U2t,get db(){return new Y2t},renderer:Qvt,styles:V2t,init:me(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,yh({sequence:{wrap:t.wrap}}))},"init")}}),yxt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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],F=[1,33],$=[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],tt=[1,98],C=[1,115],_=[1,107],S=[1,113],A=[1,108],L=[1,109],N=[1,110],I=[1,111],R=[1,112],M=[1,114],et=[22,58,59,80,84,85,86,87,88,89],rt=[1,8,9,39,41,44],D=[1,8,9,22],nt=[1,143],it=[1,8,9,59],O=[1,8,9,22,58,59,80,84,85,86,87,88,89],k={trace:me(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:me(function(t,e,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:F,55:$,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]},e(X,[2,5],{8:[1,48]}),{8:[1,49]},e(g,[2,18],{22:[1,50]}),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,27]),e(g,[2,28]),e(g,[2,29]),{34:[1,51]},{36:[1,52]},e(g,[2,32]),e(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]},e(b,[2,39],{39:[1,67],44:[1,66]}),e(g,[2,50]),e(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]},e(g,[2,61]),e(g,[2,62]),e(g,[2,63]),e(g,[2,64]),e(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}),e(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},e(k,[2,118]),e(k,[2,119]),e(k,[2,120]),e(k,[2,121]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),e(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:F,55:$,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:F,55:$,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},e(g,[2,19]),e(g,[2,30]),e(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},e(g,[2,49]),{65:91,71:K,72:Z},e(T,[2,68],{64:92,66:f,67:m,68:y,69:v,70:x}),e(E,[2,69]),e(E,[2,70]),e(E,[2,71]),e(E,[2,72]),e(E,[2,73]),e(J,[2,74]),e(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:tt},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:C,57:104,58:_,80:S,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},{58:[1,116]},{13:Q,53:117},e(g,[2,57]),e(g,[2,123]),{22:C,57:118,58:_,59:[1,119],80:S,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},e(et,[2,59]),{16:39,18:120,19:40,58:c,84:h,99:u,101:d,102:p},e(w,[2,15]),e(w,[2,16]),e(w,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:c,84:h,99:u,101:d},e(rt,[2,43],{11:123,12:[1,124]}),e(X,[2,7]),{9:[1,125]},e(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},e(T,[2,67],{64:129,66:f,67:m,68:y,69:v,70:x}),e(T,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:s},{8:[1,132],41:[2,36]},e(b,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:tt},{16:39,18:136,19:40,58:c,84:h,99:u,101:d,102:p},e(g,[2,76],{13:[1,137]}),e(g,[2,78],{13:[1,139],75:[1,138]}),e(g,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},e(g,[2,90],{59:nt}),e(it,[2,92],{83:144,22:C,58:_,80:S,84:A,85:L,86:N,87:I,88:R,89:M}),e(O,[2,94]),e(O,[2,96]),e(O,[2,97]),e(O,[2,98]),e(O,[2,99]),e(O,[2,100]),e(O,[2,101]),e(O,[2,102]),e(O,[2,103]),e(O,[2,104]),e(g,[2,91]),e(g,[2,56]),e(g,[2,58],{59:nt}),{58:[1,145]},e(w,[2,13]),{15:146,16:84,58:c,84:h,99:u,101:d},{39:[2,11]},e(rt,[2,44]),{13:[1,147]},{1:[2,4]},e(D,[2,54]),e(D,[2,53]),{16:39,18:148,19:40,58:c,84:h,99:u,101:d,102:p},e(T,[2,65]),e(g,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:s},{45:151,49:tt},e(b,[2,41]),{41:[2,47]},e(g,[2,45]),e(g,[2,77]),e(g,[2,79]),e(g,[2,80],{75:[1,152]}),e(g,[2,83]),e(g,[2,84],{13:[1,153]}),e(g,[2,86],{13:[1,155],75:[1,154]}),{22:C,58:_,80:S,82:156,83:106,84:A,85:L,86:N,87:I,88:R,89:M},e(O,[2,95]),e(et,[2,60]),{39:[2,10]},{14:[1,157]},e(D,[2,55]),e(g,[2,34]),{41:[2,38]},{41:[1,158]},e(g,[2,81]),e(g,[2,85]),e(g,[2,87]),e(g,[2,88],{75:[1,159]}),e(it,[2,93],{83:144,22:C,58:_,80:S,84:A,85:L,86:N,87:I,88:R,89:M}),e(rt,[2,8]),e(b,[2,42]),e(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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0>)/,/^(?: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,me(t,"Parser"),(txt=new((t.prototype=k).Parser=t)).parser=txt,ext=txt}),mxt=t(()=>{fu(),Jc(),rxt=["#","+","~","-",""],ixt=class{static{me(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="",e=_c(t,D()),this.parseMember(e)}getDisplayDetails(){let t=this.visibility+Pc(this.id);"method"===this.memberType&&(t+=`(${Pc(this.parameters.trim())})`,this.returnType)&&(t+=" : "+Pc(this.returnType)),t=t.trim();var e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t))&&(n=r[1]?r[1].trim():"",rxt.includes(n)&&(this.visibility=n),this.id=r[2],this.parameters=r[3]?r[3].trim():"",e=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===e)&&(n=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(n))&&(e=n,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=t.length,n=t.substring(0,1),i=t.substring(r-1),rxt.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?r:r-1)),this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();var r,i,n=(this.visibility?"\\"+this.visibility:"")+Pc(this.id)+("method"===this.memberType?`(${Pc(this.parameters)})`+(this.returnType?" : "+Pc(this.returnType):""):"");this.text=n.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}}),yxt=t(()=>{Z3(),e(),fu(),Jc(),KE(),gu(),mxt(),nxt="classId-",axt=0,sxt=me(t=>L.sanitizeText(t,D()),"sanitizeText"),oxt=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=me(t=>{let r=j(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=j("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),j(t).select("svg").selectAll("g.node").on("mouseover",t=>{var e;null!==(t=j(t.currentTarget)).attr("title")&&(e=this.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.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"
")),t.classed("hover",!0))}).on("mouseout",t=>{r.transition().duration(500).style("opacity",0),j(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=lh,this.getAccTitle=ch,this.setAccDescription=hh,this.getAccDescription=uh,this.setDiagramTitle=dh,this.getDiagramTitle=ph,this.getConfig=me(()=>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{me(this,"ClassDB")}splitClassNameAndType(t){let e=L.sanitizeText(t,D()),r="",i=e;return 0`:"")}addClass(t){var t=L.sanitizeText(t,D()),{className:t,type:e}=this.splitClassNameAndType(t);this.classes.has(t)||(t=L.sanitizeText(t,D()),this.classes.set(t,{id:t,type:e,label:t,text:t+(e?`<${e}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:nxt+t+"-"+axt}),axt++)}addInterface(t,e){t={id:"interface"+this.interfaces.length,label:t,classId:e},this.interfaces.push(t)}lookUpDomId(t){if(t=L.sanitizeText(t,D()),this.classes.has(t))return this.classes.get(t).domId;throw new Error("Class not found: "+t)}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",oh()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){M.debug("Adding relation: "+JSON.stringify(t));var e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=L.sanitizeText(t.relationTitle1.trim(),D()),t.relationTitle2=L.sanitizeText(t.relationTitle2.trim(),D()),this.relations.push(t)}addAnnotation(t,e){t=this.splitClassNameAndType(t).className,this.classes.get(t).annotations.push(e)}addMember(t,e){this.addClass(t),t=this.splitClassNameAndType(t).className,t=this.classes.get(t),"string"==typeof e&&((e=e.trim()).startsWith("<<")&&e.endsWith(">>")?t.annotations.push(sxt(e.substring(2,e.length-2))):0this.addMember(e,t)))}addNote(t,e){e={id:"note"+this.notes.length,class:e,text:t},this.notes.push(e)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),sxt(t.trim())}setCssClass(t,r){t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=nxt+e),(t=this.classes.get(e))&&(t.cssClasses+=" "+r)})}defineClass(t,i){for(let e of t){let r=this.styleClasses.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.styleClasses.set(e,r)),i&&i.forEach(t=>{var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),this.classes.forEach(t=>{t.cssClasses.includes(e)&&t.styles.push(...i.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{void 0!==e&&(this.classes.get(t).tooltip=sxt(e))})}getTooltip(t,e){return(e&&this.namespaces.has(e)?this.namespaces.get(e):this).classes.get(t).tooltip}setLink(t,r,i){let n=D();t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=nxt+e),(t=this.classes.get(e))&&(t.link=YE.formatUrl(r,n),"sandbox"===n.securityLevel?t.linkTarget="_top":t.linkTarget="string"==typeof i?sxt(i):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFunc(t,e,r),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,i,n){if(t=L.sanitizeText(t,D()),"loose"===D().securityLevel&&void 0!==i&&this.classes.has(t)){let e=this.lookUpDomId(t),r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",()=>{YE.runFunc(i,...r)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,children:{},domId:nxt+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e){if(this.namespaces.has(t))for(var r of e)r=this.splitClassNameAndType(r).className,this.classes.get(r).parent=t,this.namespaces.get(t).classes.set(r,this.classes.get(r))}setCssStyle(t,e){var r=this.classes.get(t);if(e&&r)for(var i of e)i.includes(",")?r.styles.push(...i.split(",")):r.styles.push(i)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}getData(){var t,e,r,i,n,a=[],s=[],o=D();for(t of this.namespaces.keys()){var l=this.namespaces.get(t);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(e of this.classes.keys()){var c,h=this.classes.get(e);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(i of this.interfaces){var p={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};a.push(p)}u=0;for(n of this.relations){u++;var g={id:XE(n.id1,n.id2,{prefix:"id",counter:u}),start:n.id1,end:n.id2,type:"normal",label:n.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(n.relation.type1),arrowTypeEnd:this.getArrowMarker(n.relation.type2),startLabelRight:"none"===n.relationTitle1?"":n.relationTitle1,endLabelLeft:"none"===n.relationTitle2?"":n.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:n.style||"",pattern:1==n.relation.lineType?"dashed":"solid",look:o.look};s.push(g)}return{nodes:a,edges:s,other:{},config:o,direction:this.getDirection()}}}}),vxt=t(()=>{lxt=me(t=>`g.classGroup text { +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0>)/,/^(?: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,me(t,"Parser"),(rxt=new((t.prototype=k).Parser=t)).parser=rxt,nxt=rxt}),vxt=t(()=>{mu(),th(),ixt=["#","+","~","-",""],axt=class{static{me(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="",e=Sc(t,D()),this.parseMember(e)}getDisplayDetails(){let t=this.visibility+Bc(this.id);"method"===this.memberType&&(t+=`(${Bc(this.parameters.trim())})`,this.returnType)&&(t+=" : "+Bc(this.returnType)),t=t.trim();var e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t))&&(i=r[1]?r[1].trim():"",ixt.includes(i)&&(this.visibility=i),this.id=r[2],this.parameters=r[3]?r[3].trim():"",e=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===e)&&(i=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(i))&&(e=i,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=t.length,i=t.substring(0,1),n=t.substring(r-1),ixt.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?r:r-1)),this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();var r,n,i=(this.visibility?"\\"+this.visibility:"")+Bc(this.id)+("method"===this.memberType?`(${Bc(this.parameters)})`+(this.returnType?" : "+Bc(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""}}}}),xxt=t(()=>{Q3(),e(),mu(),th(),ZE(),fu(),vxt(),sxt="classId-",oxt=0,lxt=me(t=>L.sanitizeText(t,D()),"sanitizeText"),cxt=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=me(t=>{let r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(t).select("svg").selectAll("g.node").on("mouseover",t=>{var e;null!==(t=H(t.currentTarget)).attr("title")&&(e=this.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.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"
")),t.classed("hover",!0))}).on("mouseout",t=>{r.transition().duration(500).style("opacity",0),H(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=ch,this.getAccTitle=hh,this.setAccDescription=uh,this.getAccDescription=dh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,this.getConfig=me(()=>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{me(this,"ClassDB")}splitClassNameAndType(t){let e=L.sanitizeText(t,D()),r="",n=e;return 0`:"")}addClass(t){var t=L.sanitizeText(t,D()),{className:t,type:e}=this.splitClassNameAndType(t);this.classes.has(t)||(t=L.sanitizeText(t,D()),this.classes.set(t,{id:t,type:e,label:t,text:t+(e?`<${e}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:sxt+t+"-"+oxt}),oxt++)}addInterface(t,e){t={id:"interface"+this.interfaces.length,label:t,classId:e},this.interfaces.push(t)}lookUpDomId(t){if(t=L.sanitizeText(t,D()),this.classes.has(t))return this.classes.get(t).domId;throw new Error("Class not found: "+t)}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",lh()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){M.debug("Adding relation: "+JSON.stringify(t));var e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=L.sanitizeText(t.relationTitle1.trim(),D()),t.relationTitle2=L.sanitizeText(t.relationTitle2.trim(),D()),this.relations.push(t)}addAnnotation(t,e){t=this.splitClassNameAndType(t).className,this.classes.get(t).annotations.push(e)}addMember(t,e){this.addClass(t),t=this.splitClassNameAndType(t).className,t=this.classes.get(t),"string"==typeof e&&((e=e.trim()).startsWith("<<")&&e.endsWith(">>")?t.annotations.push(lxt(e.substring(2,e.length-2))):0this.addMember(e,t)))}addNote(t,e){e={id:"note"+this.notes.length,class:e,text:t},this.notes.push(e)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),lxt(t.trim())}setCssClass(t,r){t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=sxt+e),(t=this.classes.get(e))&&(t.cssClasses+=" "+r)})}defineClass(t,n){for(let e of t){let r=this.styleClasses.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.styleClasses.set(e,r)),n&&n.forEach(t=>{var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),this.classes.forEach(t=>{t.cssClasses.includes(e)&&t.styles.push(...n.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{void 0!==e&&(this.classes.get(t).tooltip=lxt(e))})}getTooltip(t,e){return(e&&this.namespaces.has(e)?this.namespaces.get(e):this).classes.get(t).tooltip}setLink(t,r,n){let i=D();t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=sxt+e),(t=this.classes.get(e))&&(t.link=HE.formatUrl(r,i),"sandbox"===i.securityLevel?t.linkTarget="_top":t.linkTarget="string"==typeof n?lxt(n):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFunc(t,e,r),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,n,i){if(t=L.sanitizeText(t,D()),"loose"===D().securityLevel&&void 0!==n&&this.classes.has(t)){let e=this.lookUpDomId(t),r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",()=>{HE.runFunc(n,...r)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,children:{},domId:sxt+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e){if(this.namespaces.has(t))for(var r of e)r=this.splitClassNameAndType(r).className,this.classes.get(r).parent=t,this.namespaces.get(t).classes.set(r,this.classes.get(r))}setCssStyle(t,e){var r=this.classes.get(t);if(e&&r)for(var n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}getData(){var t,e,r,n,i,a=[],s=[],o=D();for(t of this.namespaces.keys()){var l=this.namespaces.get(t);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(e of this.classes.keys()){var c,h=this.classes.get(e);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:KE(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()}}}}),bxt=t(()=>{HX(),hxt=me(t=>`g.classGroup text { fill: ${t.nodeBorder||t.classText}; stroke: none; font-family: ${t.fontFamily}; @@ -1519,12 +1544,13 @@ g.classGroup line { font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),cxt=lxt}),xxt=t(()=>{fu(),e(),qM(),zX(),GX(),KE(),hxt=me((t,e="TB")=>{if(!t.doc)return e;let r=e;for(var i of t.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),uxt=me(function(t,e){return e.db.getClasses()},"getClasses"),dxt=me(async function(t,e,r,i){M.info("REF0:"),M.info("Drawing class diagram (v3)",e);var{securityLevel:n,state:a,layout:s}=D(),o=i.db.getData(),n=NM(e,n);o.type=i.type,o.layoutAlgorithm=CX(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await EX(o,n),YE.insertTitle(n,"classDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),_X(n,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),pxt={getClasses:uxt,draw:dxt,getDir:hxt}}),bxt={};lPt(bxt,{diagram:()=>wxt});var wxt,kxt=t(()=>{fxt(),yxt(),vxt(),xxt(),wxt={parser:ext,get db(){return new oxt},renderer:pxt,styles:cxt,init:me(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),Txt={};lPt(Txt,{diagram:()=>Ext});var Ext,Cxt,_xt,Sxt,Axt,Lxt,Nxt,Ixt,Rxt,Mxt,Dxt,Oxt,Pxt,Bxt,Fxt,$xt,zxt,Gxt,Uxt,qxt,jxt,Wxt,Yxt,Hxt,Vxt,Xxt,Kxt,Zxt,Qxt,Jxt,tbt,ebt,rbt,ibt,nbt,abt,sbt,obt,lbt,cbt=t(()=>{fxt(),yxt(),vxt(),xxt(),Ext={parser:ext,get db(){return new oxt},renderer:pxt,styles:cxt,init:me(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),hbt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[1,2],i=[1,3],n=[1,4],a=[2,4],s=[1,9],o=[1,11],l=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,32],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,34],C=[1,35],_=[1,36],S=[1,37],A=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],N=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],r={trace:me(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,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$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:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"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],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 3:return i.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:this.$=a[o];break;case 8:this.$="nl";break;case 12:this.$=a[o];break;case 13:(c=a[o-1]).description=i.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=i.trimColon(a[o]),this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l,c=a[o],h=a[o-2].trim();a[o].match(":")&&(c=(l=a[o].split(":"))[0],h=[h,l[1]]),this.$={stmt:"state",id:c,type:"default",description:h};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 34:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 35:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 36:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 44:case 45:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:r,5:i,6:n},{1:[3]},{3:5,4:r,5:i,6:n},{3:6,4:r,5:i,6:n},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],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,42:k,45:T,48:E,49:C,50:_,51:S,54:A},e(L,[2,5]),{9:38,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,42:k,45:T,48:E,49:C,50:_,51:S,54:A},e(L,[2,7]),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(L,[2,11]),e(L,[2,12],{14:[1,39],15:[1,40]}),e(L,[2,16]),{18:[1,41]},e(L,[2,18],{20:[1,42]}),{23:[1,43]},e(L,[2,22]),e(L,[2,23]),e(L,[2,24]),e(L,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},e(L,[2,28]),{34:[1,48]},{36:[1,49]},e(L,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},e(N,[2,42],{55:[1,54]}),e(N,[2,43],{55:[1,55]}),e(L,[2,36]),e(L,[2,37]),e(L,[2,38]),e(L,[2,39]),e(L,[2,6]),e(L,[2,13]),{13:56,24:d,54:A},e(L,[2,17]),e(I,a,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},e(L,[2,29]),e(L,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},e(L,[2,14],{14:[1,67]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,68],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:E,49:C,50:_,51:S,54:A},e(L,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},e(L,[2,32]),e(L,[2,33]),e(L,[2,34]),e(L,[2,35]),e(N,[2,44]),e(N,[2,45]),e(L,[2,15]),e(L,[2,19]),e(I,a,{7:72}),e(L,[2,26]),e(L,[2,27]),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,73],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:E,49:C,50:_,51:S,54:A},e(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{mu(),e(),jM(),UX(),qX(),ZE(),dxt=me((t,e="TB")=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),pxt=me(function(t,e){return e.db.getClasses()},"getClasses"),gxt=me(async function(t,e,r,n){M.info("REF0:"),M.info("Drawing class diagram (v3)",e);var{securityLevel:i,state:a,layout:s}=D(),o=n.db.getData(),i=IM(e,i);o.type=n.type,o.layoutAlgorithm=_X(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await CX(o,i),HE.insertTitle(i,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),SX(i,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),fxt={getClasses:pxt,draw:gxt,getDir:dxt}}),kxt={};oPt(kxt,{diagram:()=>Txt});var Txt,Ext=t(()=>{yxt(),xxt(),bxt(),wxt(),Txt={parser:nxt,get db(){return new cxt},renderer:fxt,styles:uxt,init:me(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),Cxt={};oPt(Cxt,{diagram:()=>_xt});var _xt,Sxt,Axt,Lxt,Nxt,Ixt,Rxt,Mxt,Dxt,Oxt,Pxt,Bxt,Fxt,$xt,zxt,Gxt,Uxt,qxt,jxt,Wxt,Yxt,Hxt,Vxt,Xxt,Kxt,Zxt,Qxt,Jxt,tbt,ebt,rbt,nbt,ibt,abt,sbt,obt,lbt,cbt,hbt,ubt,dbt=t(()=>{yxt(),xxt(),bxt(),wxt(),_xt={parser:nxt,get db(){return new cxt},renderer:fxt,styles:uxt,init:me(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),pbt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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],_=[1,36],S=[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:me(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:me(function(t,e,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},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],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:_,53:S,54:A,57:L},e(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:_,53:S,54:A,57:L},e(N,[2,7]),e(N,[2,8]),e(N,[2,9]),e(N,[2,10]),e(N,[2,11]),e(N,[2,12],{14:[1,40],15:[1,41]}),e(N,[2,16]),{18:[1,42]},e(N,[2,18],{20:[1,43]}),{23:[1,44]},e(N,[2,22]),e(N,[2,23]),e(N,[2,24]),e(N,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(N,[2,28]),{34:[1,49]},{36:[1,50]},e(N,[2,31]),{13:51,24:d,57:L},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(I,[2,44],{58:[1,56]}),e(I,[2,45],{58:[1,57]}),e(N,[2,38]),e(N,[2,39]),e(N,[2,40]),e(N,[2,41]),e(N,[2,6]),e(N,[2,13]),{13:58,24:d,57:L},e(N,[2,17]),e(R,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(N,[2,29]),e(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]},e(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:_,53:S,54:A,57:L},e(N,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(N,[2,34]),e(N,[2,35]),e(N,[2,36]),e(N,[2,37]),e(I,[2,46]),e(I,[2,47]),e(N,[2,15]),e(N,[2,19]),e(R,a,{7:78}),e(N,[2,26]),e(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:_,53:S,54:A,57:L},e(N,[2,32]),e(N,[2,33]),e(N,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\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:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};r.lexer=i,me(t,"Parser"),(Cxt=new((t.prototype=r).Parser=t)).parser=Cxt,_xt=Cxt}),ubt=t(()=>{Axt=Sxt="TB",Lxt="dir",Ixt="relation",Rxt="classDef",Mxt="style",Dxt="applyClass",Oxt="default",Bxt="fill:none",Fxt="fill: #333",$xt="c",zxt="text",Gxt="normal",Uxt="rect",qxt="rectWithTitle",jxt="stateStart",Wxt="stateEnd",Yxt=Pxt="divider",Hxt="roundedWithTitle",Xxt="noteGroup",Zxt=(Kxt="statediagram")+"-state",Jxt=(Qxt="transition")+" note-edge",tbt=Kxt+"-note",ebt=Kxt+"-cluster",rbt=Kxt+"-cluster-alt",abt=Nxt="state",obt=(sbt="----")+(nbt=Vxt="note"),lbt=""+sbt+(ibt="parent")});function dbt(t="",e=0,r="",i=sbt){return i=null!==r&&0"!==e.id&&""!==e.id&&(e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{r.get(t)&&(t=r.get(t),e.cssCompiledStyles=[...e.cssCompiledStyles,...t.styles])})),(i=t.find(t=>t.id===e.id))?Object.assign(i,e):t.push(e))}function gbt(t){return t?.classes?.join(" ")??""}function fbt(t){return t?.styles??[]}var mbt,ybt,vbt,xbt,bbt,wbt,kbt,Tbt,Ebt,Cbt,_bt=t(()=>{fu(),e(),Jc(),ubt(),mbt=new Map,ybt=0,me(dbt,"stateDomId"),vbt=me((r,t,i,n,a,s,o,l)=>{M.trace("items",t),t.forEach(t=>{switch(t.stmt){case Nxt:case Oxt:bbt(r,t,i,n,a,s,o,l);break;case Ixt:bbt(r,t.state1,i,n,a,s,o,l),bbt(r,t.state2,i,n,a,s,o,l);var e={id:"edge"+ybt,start:t.state1.id,end:t.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Bxt,labelStyle:"",label:L.sanitizeText(t.description,D()),arrowheadStyle:Fxt,labelpos:$xt,labelType:zxt,thickness:Gxt,classes:Qxt,look:o};a.push(e),ybt++}})},"setupDoc"),xbt=me((t,e=Axt)=>{let r=e;if(t.doc)for(var i of t.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),me(pbt,"insertOrUpdateNode"),me(gbt,"getClassesFromDbInfo"),me(fbt,"getStylesFromDbInfo"),bbt=me((r,i,t,n,a,e,s,o)=>{var l=i.id,c=t.get(l),h=gbt(c),u=fbt(c);if(M.info("dataFetcher parsedItem",i,c,u),"root"!==l){let t=Uxt;if(!0===i.start?t=jxt:!1===i.start&&(t=Wxt),i.type!==Oxt&&(t=i.type),mbt.get(l)||mbt.set(l,{id:l,shape:t,description:L.sanitizeText(l,D()),cssClasses:h+" "+Zxt,cssStyles:u}),c=mbt.get(l),i.description&&(Array.isArray(c.description)?(c.shape=qxt,c.description.push(i.description)):0{mbt.clear(),ybt=0},"reset")}),Sbt=t(()=>{fu(),e(),qM(),zX(),GX(),KE(),ubt(),kbt=me((t,e=Axt)=>{if(!t.doc)return e;let r=e;for(var i of t.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),Tbt=me(function(t,e){return e.db.getClasses()},"getClasses"),Ebt=me(async function(t,e,r,i){M.info("REF0:"),M.info("Drawing state diagram (v2)",e);var{securityLevel:n,state:a,layout:s}=D(),o=(i.db.extract(i.db.getRootDocV2()),i.db.getData()),n=NM(e,n);o.type=i.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await EX(o,n),YE.insertTitle(n,"statediagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),_X(n,8,Kxt,a?.useMaxWidth??!0)},"draw"),Cbt={getClasses:Tbt,draw:Ebt,getDir:kbt}});function Abt(){return new Map}var Lbt,Nbt,Ibt,Rbt,Mbt,Dbt,Obt,Pbt,Bbt,Fbt,$bt,zbt,Gbt,Ubt,qbt,jbt,Wbt,Ybt,Hbt,Vbt,Xbt,Kbt,Zbt,Qbt,Jbt,t4t,e4t,r4t,i4t,n4t,a4t,s4t=t(()=>{fu(),e(),KE(),Jc(),gu(),_bt(),Sbt(),ubt(),me(Abt,"newClassesList"),Lbt=me(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Nbt=me(t=>JSON.parse(JSON.stringify(t)),"clone"),Ibt=class{static{me(this,"StateDB")}constructor(t){this.clear(),this.version=t,this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}version;nodes=[];edges=[];rootDoc=[];classes=Abt();documents={root:Lbt()};currentDocument=this.documents.root;startEndCount=0;dividerCnt=0;static relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3};setRootDoc(t){M.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}getRootDoc(){return this.rootDoc}docTranslator(i,n,t){if(n.stmt===Ixt)this.docTranslator(i,n.state1,!0),this.docTranslator(i,n.state2,!1);else if(n.stmt===Nxt&&("[*]"===n.id?(n.id=t?i.id+"_start":i.id+"_end",n.start=t):n.id=n.id.trim()),n.doc){let t=[],e=[],r;for(r=0;rthis.docTranslator(n,t,!0))}}getRootDocV2(){return this.docTranslator({id:"root"},{id:"root",doc:this.rootDoc},!0),{id:"root",doc:this.rootDoc}}extract(t){var e=t.doc||t,t=(M.info(e),this.clear(!0),M.info("Extract initial document:",e),e.forEach(e=>{switch(M.warn("Statement",e.stmt),e.stmt){case Nxt:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles);break;case Ixt:this.addRelation(e.state1,e.state2,e.description);break;case Rxt:this.addStyleClass(e.id.trim(),e.classes);break;case Mxt:{let t=e.id.trim().split(","),r=e.styleClass.split(",");t.forEach(t=>{let e=this.getState(t);void 0===e&&(t=t.trim(),this.addState(t),e=this.getState(t)),e.styles=r.map(t=>t.replace(/;/g,"")?.trim())})}break;case Dxt:this.setCssClass(e.id.trim(),e.styleClass)}}),this.getStates()),e=D().look;wbt(),bbt(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,e,this.classes),this.nodes.forEach(t=>{if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&0this.addDescription(l,t.trim())),n&&((t=this.currentDocument.states.get(l)).note=n,t.note.text=L.sanitizeText(t.note.text,D())),a&&(M.info("Setting state classes",l,a),("string"==typeof a?[a]:a).forEach(t=>this.setCssClass(l,t.trim()))),s&&(M.info("Setting state styles",l,s),("string"==typeof s?[s]:s).forEach(t=>this.setStyle(l,t.trim()))),o&&(M.info("Setting state styles",l,s),("string"==typeof o?[o]:o).forEach(t=>this.setTextStyle(l,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Lbt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Abt(),t||oh()}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){M.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}startIdIfNeeded(t=""){let e=t;return"[*]"===t&&(this.startEndCount++,e="start"+this.startEndCount),e}startTypeIfNeeded(t="",e=Oxt){return"[*]"===t?"start":e}endIdIfNeeded(t=""){let e=t;return"[*]"===t&&(this.startEndCount++,e="end"+this.startEndCount),e}endTypeIfNeeded(t="",e=Oxt){return"[*]"===t?"end":e}addRelationObjs(t,e,r){var i=this.startIdIfNeeded(t.id.trim()),n=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),s=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:L.sanitizeText(r,D())})}addRelation(t,e,r){var i,n;"object"==typeof t?this.addRelationObjs(t,e,r):(i=this.startIdIfNeeded(t.trim()),t=this.startTypeIfNeeded(t),n=this.endIdIfNeeded(e.trim()),e=this.endTypeIfNeeded(e),this.addState(i,t),this.addState(n,e),this.currentDocument.relations.push({id1:i,id2:n,title:L.sanitizeText(r,D())}))}addDescription(t,e){t=this.currentDocument.states.get(t),e=e.startsWith(":")?e.replace(":","").trim():e,t.descriptions.push(L.sanitizeText(e,D()))}cleanupLabel(t){return(":"===t.substring(0,1)?t.substr(2):t).trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let r=this.classes.get(t);e?.split(",").forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(t)&&(t=e.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(t)),r.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,r){t.split(",").forEach(t=>{let e=this.getState(t);void 0===e&&(t=t.trim(),this.addState(t),e=this.getState(t)),e.classes.push(r)})}setStyle(t,e){void 0!==(t=this.getState(t))&&t.styles.push(e)}setTextStyle(t,e){void 0!==(t=this.getState(t))&&t.textStyles.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===Lxt)}getDirection(){return this.getDirectionStatement()?.value??Sxt}setDirection(t){var e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:Lxt,value:t})}trimColon(t){return(t&&":"===t[0]?t.substr(1):t).trim()}getData(){var t=D();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:kbt(this.getRootDocV2())}}getConfig(){return D().state}getAccTitle=ch;setAccTitle=lh;getAccDescription=uh;setAccDescription=hh;setDiagramTitle=dh;getDiagramTitle=ph}}),o4t=t(()=>{Rbt=me(t=>` +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\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,me(t,"Parser"),(Sxt=new((t.prototype=r).Parser=t)).parser=Sxt,Axt=Sxt}),gbt=t(()=>{Nxt=Lxt="TB",Ixt="dir",Mxt="root",Dxt="relation",Oxt="classDef",Pxt="style",Bxt="applyClass",Fxt="default",zxt="fill:none",Gxt="fill: #333",Uxt="c",qxt="text",jxt="normal",Wxt="rect",Yxt="rectWithTitle",Hxt="stateStart",Vxt="stateEnd",Xxt=$xt="divider",Kxt="roundedWithTitle",Qxt="noteGroup",tbt=(Jxt="statediagram")+"-state",rbt=(ebt="transition")+" note-edge",nbt=Jxt+"-note",ibt=Jxt+"-cluster",abt=Jxt+"-cluster-alt",lbt=Rxt="state",hbt=(cbt="----")+(obt=Zxt="note"),ubt=""+cbt+(sbt="parent")});function fbt(t="",e=0,r="",n=cbt){return n=null!==r&&0"!==e.id&&""!==e.id&&(e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{(t=r.get(t))&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...t.styles])})),(n=t.find(t=>t.id===e.id))?Object.assign(n,e):t.push(e))}function ybt(t){return t?.classes?.join(" ")??""}function vbt(t){return t?.styles??[]}var xbt,bbt,wbt,kbt,Tbt,Ebt,Cbt,_bt,Sbt,Abt,Lbt,Nbt,Ibt,Rbt,Mbt,Dbt,Obt,Pbt,Bbt,Fbt,$bt,zbt,Gbt,Ubt,qbt,jbt,Wbt,Ybt,Hbt,Vbt,Xbt,Kbt,Zbt,Qbt,Jbt,t4t,e4t,r4t=t(()=>{mu(),e(),th(),gbt(),xbt=new Map,bbt=0,me(fbt,"stateDomId"),wbt=me((r,t,n,i,a,s,o,l)=>{M.trace("items",t),t.forEach(t=>{switch(t.stmt){case Rxt:case Fxt:Tbt(r,t,n,i,a,s,o,l);break;case Dxt:Tbt(r,t.state1,n,i,a,s,o,l),Tbt(r,t.state2,n,i,a,s,o,l);var e={id:"edge"+bbt,start:t.state1.id,end:t.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:zxt,labelStyle:"",label:L.sanitizeText(t.description??"",D()),arrowheadStyle:Gxt,labelpos:Uxt,labelType:qxt,thickness:jxt,classes:ebt,look:o};a.push(e),bbt++}})},"setupDoc"),kbt=me((t,e=Nxt)=>{let r=e;if(t.doc)for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),me(mbt,"insertOrUpdateNode"),me(ybt,"getClassesFromDbInfo"),me(vbt,"getStylesFromDbInfo"),Tbt=me((r,n,t,i,a,e,s,o)=>{var l=n.id,c=t.get(l),h=ybt(c),u=vbt(c),d=D();if(M.info("dataFetcher parsedItem",n,c,u),"root"!==l){let t=Wxt;if(!0===n.start?t=Hxt:!1===n.start&&(t=Vxt),n.type!==Fxt&&(t=n.type),xbt.get(l)||xbt.set(l,{id:l,shape:t,description:L.sanitizeText(l,d),cssClasses:h+" "+tbt,cssStyles:u}),c=xbt.get(l),n.description&&(Array.isArray(c.description)?(c.shape=Yxt,c.description.push(n.description)):c.description?.length&&0{xbt.clear(),bbt=0},"reset")}),n4t=t(()=>{mu(),e(),jM(),UX(),qX(),ZE(),gbt(),Cbt=me((t,e=Nxt)=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),_bt=me(function(t,e){return e.db.getClasses()},"getClasses"),Sbt=me(async function(t,e,r,n){M.info("REF0:"),M.info("Drawing state diagram (v2)",e);var{securityLevel:i,state:a,layout:s}=D();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=IM(e,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await CX(o,l);try{("function"==typeof n.db.getLinks?n.db.getLinks():new Map).forEach((a,t)=>{let s="string"==typeof t?t:"string"==typeof t?.id?t.id:"";if(s){let t=l.node()?.querySelectorAll("g"),e,r,n,i;t?.forEach(t=>{t.textContent?.trim()===s&&(e=t)}),e?(r=e.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,e),n.appendChild(e),M.info("🔗 Wrapped node in
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(t))})}catch(t){M.error("❌ Error injecting clickable links:",t)}HE.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),SX(l,8,Jxt,a?.useMaxWidth??!0)},"draw"),Abt={getClasses:_bt,draw:Sbt,getDir:Cbt}}),i4t=t(()=>{mu(),e(),ZE(),th(),fu(),r4t(),n4t(),gbt(),Lbt={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Nbt=me(()=>new Map,"newClassesList"),Ibt=me(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Rbt=me(t=>JSON.parse(JSON.stringify(t)),"clone"),Mbt=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Nbt(),this.documents={root:Ibt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=hh,this.setAccTitle=ch,this.getAccDescription=dh,this.setAccDescription=uh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,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{me(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(var e of Array.isArray(t)?t:t.doc)switch(e.stmt){case Rxt:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case Dxt:this.addRelation(e.state1,e.state2,e.description);break;case Oxt:this.addStyleClass(e.id.trim(),e.classes);break;case Pxt:this.handleStyleDef(e);break;case Bxt:this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}var r,t=this.getStates(),n=D();Ebt(),Tbt(void 0,this.getRootDocV2(),t,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&&0t.replace(/;/g,"")?.trim()))}}setRootDoc(t){M.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(r,n,t){if(n.stmt===Dxt)this.docTranslator(r,n.state1,!0),this.docTranslator(r,n.state2,!1);else if(n.stmt===Rxt&&(n.id===Lbt.START_NODE?(n.id=r.id+(t?"_start":"_end"),n.start=t):n.id=n.id.trim()),(n.stmt===Mxt||n.stmt===Rxt)&&n.doc){let t=[],e=[];for(var i of n.doc){var a;i.type===$xt?((a=Rbt(i)).doc=Rbt(e),t.push(a),e=[]):e.push(i)}0this.docTranslator(n,t,!0))}}getRootDocV2(){return this.docTranslator({id:Mxt,stmt:Mxt},{id:Mxt,stmt:Mxt,doc:this.rootDoc},!0),{id:Mxt,doc:this.rootDoc}}addState(t,e=Fxt,r=void 0,n=void 0,i=void 0,a=void 0,s=void 0,o=void 0){let l=t?.trim();if(this.currentDocument.states.has(l)){if(!(t=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);t.doc||(t.doc=r),t.type||(t.type=e)}else M.info("Adding state ",l,n),this.currentDocument.states.set(l,{stmt:Rxt,id:l,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]});if(n&&(M.info("Setting state description",l,n),(Array.isArray(n)?n:[n]).forEach(t=>this.addDescription(l,t.trim()))),i){if(!(t=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);t.note=i,t.note.text=L.sanitizeText(t.note.text,D())}a&&(M.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(l,t.trim()))),s&&(M.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(t=>this.setStyle(l,t.trim()))),o&&(M.info("Setting state styles",l,s),(Array.isArray(o)?o:[o]).forEach(t=>this.setTextStyle(l,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Ibt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Nbt(),t||(this.links=new Map,lh())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){M.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,r){this.links.set(t,{url:e,tooltip:r}),M.warn("Adding link",t,e,r)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===Lbt.START_NODE?(this.startEndCount++,""+Lbt.START_TYPE+this.startEndCount):t}startTypeIfNeeded(t="",e=Fxt){return t===Lbt.START_NODE?Lbt.START_TYPE:e}endIdIfNeeded(t=""){return t===Lbt.END_NODE?(this.startEndCount++,""+Lbt.END_TYPE+this.startEndCount):t}endTypeIfNeeded(t="",e=Fxt){return t===Lbt.END_NODE?Lbt.END_TYPE:e}addRelationObjs(t,e,r=""){var n=this.startIdIfNeeded(t.id.trim()),i=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),s=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:L.sanitizeText(r,D())})}addRelation(t,e,r){var n,i;"object"==typeof t&&"object"==typeof e?this.addRelationObjs(t,e,r):"string"==typeof t&&"string"==typeof e&&(n=this.startIdIfNeeded(t.trim()),t=this.startTypeIfNeeded(t),i=this.endIdIfNeeded(e.trim()),e=this.endTypeIfNeeded(e),this.addState(n,t),this.addState(i,e),this.currentDocument.relations.push({id1:n,id2:i,relationTitle:r?L.sanitizeText(r,D()):void 0}))}addDescription(t,e){t=this.currentDocument.states.get(t),e=e.startsWith(":")?e.replace(":","").trim():e,t?.descriptions?.push(L.sanitizeText(e,D()))}cleanupLabel(t){return(t.startsWith(":")?t.slice(2):t).trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let r=this.classes.get(t);e&&r&&e.split(Lbt.STYLECLASS_SEP).forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp(Lbt.COLOR_KEYWORD).exec(t)&&(t=e.replace(Lbt.FILL_KEYWORD,Lbt.BG_FILL).replace(Lbt.COLOR_KEYWORD,Lbt.FILL_KEYWORD),r.textStyles.push(t)),r.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,r){t.split(",").forEach(t=>{let e=this.getState(t);e||(t=t.trim(),this.addState(t),e=this.getState(t)),e?.classes?.push(r)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===Ixt)}getDirection(){return this.getDirectionStatement()?.value??Lxt}setDirection(t){var e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:Ixt,value:t})}trimColon(t){return(t.startsWith(":")?t.slice(1):t).trim()}getData(){var t=D();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Cbt(this.getRootDocV2())}}getConfig(){return D().state}}}),a4t=t(()=>{Dbt=me(t=>` defs #statediagram-barbEnd { fill: ${t.transitionColor}; stroke: ${t.transitionColor}; @@ -1738,12 +1764,12 @@ g.stateGroup line { font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),Mbt=Rbt}),l4t=t(()=>{Dbt={},Obt=me((t,e)=>{Dbt[t]=e},"set"),Pbt=me(t=>Dbt[t],"get"),Bbt=me(()=>Object.keys(Dbt),"keys"),Fbt=me(()=>Bbt().length,"size"),$bt={get:Pbt,set:Obt,keys:Bbt,size:Fbt}}),c4t=t(()=>{Z3(),l4t(),s4t(),KE(),Jc(),fu(),e(),zbt=me(t=>t.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"),Gbt=me(t=>t.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"),Ubt=me((t,e)=>{var r=(e=t.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(e.id)).node().getBBox();return t.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),e},"drawSimpleState"),qbt=me((t,e)=>{let r=me(function(t,e,r){t=t.append("tspan").attr("x",2*D().state.padding).text(e),r||t.attr("dy",D().state.textHeight)},"addTspan"),i=t.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(e.descriptions[0]).node().getBBox(),n=i.height,a=t.append("text").attr("x",D().state.padding).attr("y",n+.4*D().state.padding+D().state.dividerMargin+D().state.textHeight).attr("class","state-description"),s=!0,o=!0;e.descriptions.forEach(function(t){s||(r(a,t,o),o=!1),s=!1});var e=t.append("line").attr("x1",D().state.padding).attr("y1",D().state.padding+n+D().state.dividerMargin/2).attr("y2",D().state.padding+n+D().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,i.width);return e.attr("x2",c+3*D().state.padding),t.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+n+2*D().state.padding).attr("rx",D().state.radius),t},"drawDescrState"),jbt=me((t,e,r)=>{let i=D().state.padding,n=2*D().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",D().state.titleShift).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+n,h=Math.max(c,s);h===s&&(h+=n);let u,d=t.node().getBBox();return e.doc,u=o-i,s(t.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),t.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"),Ybt=me((t,e)=>{let r=D().state.forkWidth,i=D().state.forkHeight;return e.parentId&&(e=r,r=i,i=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",D().state.padding).attr("y",D().state.padding)},"drawForkJoinState"),Hbt=me((t,e,r,i)=>{let n=0,a=i.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),t.replace(/\r\n/g,"
")),o=(s=s.replace(/\n/g,"
")).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),n+=l,h.attr("x",e+D().state.noteMargin),h.attr("y",r+n+1.25*D().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:n}},"_drawLongText"),Vbt=me((t,e)=>{e.attr("class","state-note");var r=e.append("rect").attr("x",0).attr("y",D().state.padding),e=e.append("g"),{textWidth:t,textHeight:e}=Hbt(t,0,0,e);return r.attr("height",e+2*D().state.noteMargin),r.attr("width",t+2*D().state.noteMargin),r},"drawNote"),Xbt=me(function(t,e){var r=e.id,i={id:r,label:e.id,width:0,height:0},t=t.append("g").attr("id",r).attr("class","stateGroup"),e=("start"===e.type&&zbt(t),"end"===e.type&&Wbt(t),"fork"!==e.type&&"join"!==e.type||Ybt(t,e),"note"===e.type&&Vbt(e.note.text,t),"divider"===e.type&&Gbt(t),"default"===e.type&&0===e.descriptions.length&&Ubt(t,e),"default"===e.type&&0!Number.isNaN(t.y));let t=h.points,e=X4().x(function(t){return t.x}).y(function(t){return t.y}).curve(u5),r=c.append("path").attr("d",e(t)).attr("id","edge"+Kbt).attr("class","transition"),i="";if(D().state.arrowMarkerAbsolute&&(i=(i=(i=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),r.attr("marker-end","url("+i+"#"+d(Ibt.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let e=c.append("g").attr("class","stateLabel"),{x:r,y:i}=YE.calcLabelPosition(h.points),n=L.getRows(u.title),a=0,s=[],o=0,l=0;for(let t=0;t<=n.length;t++){var p=e.append("text").attr("text-anchor","middle").text(n[t]).attr("x",r).attr("y",i+a),g=p.node().getBBox();o=Math.max(o,g.width),l=Math.min(l,g.x),M.info(g.x,r,i+a),0===a&&(a=p.node().getBBox().height,M.info("Title height",a,i)),s.push(p)}let t=a*n.length;if(1t.attr("y",i+e*a-r)),t=a*n.length}d=e.node().getBBox(),e.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-D().state.padding/2).attr("y",i-t/2-D().state.padding/2-3.5).attr("width",o+D().state.padding).attr("height",t+D().state.padding),M.info(d)}Kbt++},"drawEdge")}),h4t=t(()=>{Z3(),QV(),$W(),e(),Jc(),c4t(),fu(),th(),Jbt={},t4t=me(function(){},"setConf"),e4t=me(function(t){t.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"),r4t=me(function(t,e,r,i){Qbt=D().state;let n=D().securityLevel,a;"sandbox"===n&&(a=j("#i"+e));var s=j("sandbox"===n?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===n?a.nodes()[0].contentDocument:document,t=(M.debug("Rendering diagram "+t),s.select(`[id='${e}']`)),e=(e4t(t),i.db.getRootDoc()),e=(n4t(e,t,void 0,!1,s,o,i),Qbt.padding),o=(s=t.node().getBBox()).width+2*e;Hc(t,i=s.height+2*e,1.75*o,Qbt.useMaxWidth),t.attr("viewBox",`${s.x-Qbt.padding} ${s.y-Qbt.padding} `+o+" "+i)},"draw"),i4t=me(t=>t?t.length*Qbt.fontSizeFactor:1,"getLabelWidth"),n4t=me((t,e,r,i,n,a,s)=>{let o=new BW({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l{let e=t.parentElement,r=0,i=0;e&&(e.parentElement&&(r=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i))&&(i=0),t.setAttribute("x1",0-i+8),t.setAttribute("x2",r-i-8)})):M.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}),y.getBBox(),o.edges().forEach(function(t){void 0!==t&&void 0!==o.edge(t)&&(M.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),Zbt(e,o.edge(t),o.edge(t).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*Qbt.padding,v.height=d.height+2*Qbt.padding,M.debug("Doc rendered",v,o),v},"renderDoc"),a4t={setConf:t4t,draw:r4t}}),u4t={};lPt(u4t,{diagram:()=>d4t});var d4t,p4t=t(()=>{hbt(),s4t(),o4t(),h4t(),d4t={parser:_xt,get db(){return new Ibt(1)},renderer:a4t,styles:Mbt,init:me(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),g4t={};lPt(g4t,{diagram:()=>f4t});var f4t,m4t,y4t,v4t,x4t,b4t,w4t,k4t,T4t,E4t,C4t,_4t,S4t,A4t,L4t,N4t,I4t,R4t,M4t,D4t,O4t,P4t,B4t,F4t,$4t,z4t,G4t,U4t,q4t,j4t,W4t,Y4t=t(()=>{hbt(),s4t(),o4t(),Sbt(),f4t={parser:_xt,get db(){return new Ibt(2)},renderer:Cbt,styles:Mbt,init:me(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),H4t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[6,8,10,11,12,14,16,17,18],i=[1,9],n=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,14],i={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:i.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:n,14:a,16:s,17:o,18:l},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:15,11:i,12:n,14:a,16:s,17:o,18:l},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,16]},{15:[1,17]},e(r,[2,11]),e(r,[2,12]),{19:[1,18]},e(r,[2,4]),e(r,[2,9]),e(r,[2,10]),e(r,[2,13])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{Q3(),i4t(),ZE(),th(),mu(),e(),Pbt=me(t=>t.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"),Bbt=me(t=>t.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"),Fbt=me((t,e)=>{var r=(e=t.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(e.id)).node().getBBox();return t.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),e},"drawSimpleState"),$bt=me((t,e)=>{let r=me(function(t,e,r){t=t.append("tspan").attr("x",2*D().state.padding).text(e),r||t.attr("dy",D().state.textHeight)},"addTspan"),n=t.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(e.descriptions[0]).node().getBBox(),i=n.height,a=t.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;e.descriptions.forEach(function(t){s||(r(a,t,o),o=!1),s=!1});var e=t.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 e.attr("x2",c+3*D().state.padding),t.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),t},"drawDescrState"),zbt=me((t,e,r)=>{let n=D().state.padding,i=2*D().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",D().state.titleShift).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+i,h=Math.max(c,s);h===s&&(h+=i);let u,d=t.node().getBBox();return e.doc,u=o-n,s(t.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),t.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"),Ubt=me((t,e)=>{let r=D().state.forkWidth,n=D().state.forkHeight;return e.parentId&&(e=r,r=n,n=e),t.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"),qbt=me((t,e,r,n)=>{let i=0,a=n.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),t.replace(/\r\n/g,"
")),o=(s=s.replace(/\n/g,"
")).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",e+D().state.noteMargin),h.attr("y",r+i+1.25*D().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),jbt=me((t,e)=>{e.attr("class","state-note");var r=e.append("rect").attr("x",0).attr("y",D().state.padding),e=e.append("g"),{textWidth:t,textHeight:e}=qbt(t,0,0,e);return r.attr("height",e+2*D().state.noteMargin),r.attr("width",t+2*D().state.noteMargin),r},"drawNote"),Wbt=me(function(t,e){var r={id:n=e.id,label:e.id,width:0,height:0},t=t.append("g").attr("id",n).attr("class","stateGroup"),n=("start"===e.type&&Pbt(t),"end"===e.type&&Gbt(t),"fork"!==e.type&&"join"!==e.type||Ubt(t,e),"note"===e.type&&jbt(e.note.text,t),"divider"===e.type&&Bbt(t),"default"===e.type&&0===e.descriptions.length&&Fbt(t,e),"default"===e.type&&0!Number.isNaN(t.y));let t=h.points,e=K4().x(function(t){return t.x}).y(function(t){return t.y}).curve(d5),r=c.append("path").attr("d",e(t)).attr("id","edge"+Ybt).attr("class","transition"),n="";if(D().state.arrowMarkerAbsolute&&(n=Mc(!0)),r.attr("marker-end","url("+n+"#"+d(Mbt.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let e=c.append("g").attr("class","stateLabel"),{x:r,y:n}=HE.calcLabelPosition(h.points),i=L.getRows(u.title),a=0,s=[],o=0,l=0;for(let t=0;t<=i.length;t++){var p=e.append("text").attr("text-anchor","middle").text(i[t]).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 t=a*i.length;if(1t.attr("y",n+e*a-r)),t=a*i.length}d=e.node().getBBox(),e.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-D().state.padding/2).attr("y",n-t/2-D().state.padding/2-3.5).attr("width",o+D().state.padding).attr("height",t+D().state.padding),M.info(d)}Ybt++},"drawEdge")}),o4t=t(()=>{Q3(),JV(),zW(),e(),th(),s4t(),mu(),eh(),Xbt={},Kbt=me(function(){},"setConf"),Zbt=me(function(t){t.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"),Qbt=me(function(t,e,r,n){Vbt=D().state;let i=D().securityLevel,a;"sandbox"===i&&(a=H("#i"+e));var s=H("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===i?a.nodes()[0].contentDocument:document,t=(M.debug("Rendering diagram "+t),s.select(`[id='${e}']`)),e=(Zbt(t),n.db.getRootDoc()),e=(t4t(e,t,void 0,!1,s,o,n),Vbt.padding),o=(s=t.node().getBBox()).width+2*e;Vc(t,n=s.height+2*e,1.75*o,Vbt.useMaxWidth),t.attr("viewBox",`${s.x-Vbt.padding} ${s.y-Vbt.padding} `+o+" "+n)},"draw"),Jbt=me(t=>t?t.length*Vbt.fontSizeFactor:1,"getLabelWidth"),t4t=me((t,e,r,n,i,a,s)=>{let o=new FW({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l{let e=t.parentElement,r=0,n=0;e&&(e.parentElement&&(r=e.parentElement.getBBox().width),n=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(n))&&(n=0),t.setAttribute("x1",0-n+8),t.setAttribute("x2",r-n-8)})):M.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}),y.getBBox(),o.edges().forEach(function(t){void 0!==t&&void 0!==o.edge(t)&&(M.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),Hbt(e,o.edge(t),o.edge(t).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*Vbt.padding,v.height=d.height+2*Vbt.padding,M.debug("Doc rendered",v,o),v},"renderDoc"),e4t={setConf:Kbt,draw:Qbt}}),l4t={};oPt(l4t,{diagram:()=>c4t});var c4t,h4t=t(()=>{pbt(),i4t(),a4t(),o4t(),c4t={parser:Axt,get db(){return new Mbt(1)},renderer:e4t,styles:Obt,init:me(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),u4t={};oPt(u4t,{diagram:()=>d4t});var d4t,p4t,g4t,f4t,m4t,y4t,v4t,x4t,b4t,w4t,k4t,T4t,E4t,C4t,_4t,S4t,A4t,L4t,N4t,I4t,R4t,M4t,D4t,O4t,P4t,B4t,F4t,$4t,z4t,G4t,U4t,q4t=t(()=>{pbt(),i4t(),a4t(),n4t(),d4t={parser:Axt,get db(){return new Mbt(2)},renderer:Abt,styles:Obt,init:me(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),j4t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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:me(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:me(function(t,e,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]},e(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},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:15,11:n,12:i,14:a,16:s,17:o,18:l},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,16]},{15:[1,17]},e(r,[2,11]),e(r,[2,12]),{19:[1,18]},e(r,[2,4]),e(r,[2,9]),e(r,[2,10]),e(r,[2,13])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{fu(),gu(),v4t="",x4t=[],b4t=[],w4t=[],k4t=me(function(){x4t.length=0,b4t.length=0,v4t="",w4t.length=0,oh()},"clear"),T4t=me(function(t){v4t=t,x4t.push(t)},"addSection"),E4t=me(function(){return x4t},"getSections"),C4t=me(function(){let t=L4t(),e=0;for(;!t&&e<100;)t=L4t(),e++;return b4t.push(...w4t),b4t},"getTasks"),_4t=me(function(){let e=[];return b4t.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),S4t=me(function(t,e){let r=e.substr(1).split(":"),i=0;e=(1===r.length?(i=Number(r[0]),[]):(i=Number(r[0]),r[1].split(","))).map(t=>t.trim()),e={section:v4t,type:v4t,people:e,task:t,score:i},w4t.push(e)},"addTask"),A4t=me(function(t){t={section:v4t,type:v4t,description:t,task:t,classes:[]},b4t.push(t)},"addTaskOrg"),L4t=me(function(){let t=me(function(t){return w4t[t].processed},"compileTask"),e=!0;for(var[r,i]of w4t.entries())t(r),e=e&&i.processed;return e},"compileTasks"),N4t=me(function(){return _4t()},"getActors"),I4t={getConfig:me(()=>D().journey,"getConfig"),clear:k4t,setDiagramTitle:dh,getDiagramTitle:ph,setAccTitle:lh,getAccTitle:ch,setAccDescription:hh,getAccDescription:uh,addSection:T4t,getSections:E4t,getTasks:C4t,addTask:S4t,addTaskOrg:A4t,getActors:N4t}}),X4t=t(()=>{R4t=me(t=>`.label { +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{mu(),fu(),f4t="",m4t=[],y4t=[],v4t=[],x4t=me(function(){m4t.length=0,y4t.length=0,f4t="",v4t.length=0,lh()},"clear"),b4t=me(function(t){f4t=t,m4t.push(t)},"addSection"),w4t=me(function(){return m4t},"getSections"),k4t=me(function(){let t=_4t(),e=0;for(;!t&&e<100;)t=_4t(),e++;return y4t.push(...v4t),y4t},"getTasks"),T4t=me(function(){let e=[];return y4t.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),E4t=me(function(t,e){let r=e.substr(1).split(":"),n=0;e=(1===r.length?(n=Number(r[0]),[]):(n=Number(r[0]),r[1].split(","))).map(t=>t.trim()),e={section:f4t,type:f4t,people:e,task:t,score:n},v4t.push(e)},"addTask"),C4t=me(function(t){t={section:f4t,type:f4t,description:t,task:t,classes:[]},y4t.push(t)},"addTaskOrg"),_4t=me(function(){let t=me(function(t){return v4t[t].processed},"compileTask"),e=!0;for(var[r,n]of v4t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),S4t=me(function(){return T4t()},"getActors"),A4t={getConfig:me(()=>D().journey,"getConfig"),clear:x4t,setDiagramTitle:ph,getDiagramTitle:gh,setAccTitle:ch,getAccTitle:hh,setAccDescription:uh,getAccDescription:dh,addSection:b4t,getSections:w4t,getTasks:k4t,addTask:E4t,addTaskOrg:C4t,getActors:S4t}}),Y4t=t(()=>{HX(),L4t=me(t=>`.label { font-family: ${t.fontFamily}; color: ${t.textColor}; } @@ -1875,12 +1901,13 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .actor-5 { ${t.actor5?"fill: "+t.actor5:""}; } -`,"getStyles"),M4t=R4t}),K4t=t(()=>{function e(t,e,r,i,n,a,s,o){g(e.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,i,n,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(//gi);for(let t=0;t{var e=r.actors[t].color,e={cx:a,cy:r.y,r:7,fill:e,stroke:"#000",title:t,pos:r.actors[t].position};P4t(n,e),a+=10}),q4t(e)(r.task,n,t.x,t.y,t.width,t.height,{class:"task"},e,r.colour)},"drawTask"),U4t=me(function(t,e){v3(t,e)},"drawBackgroundRect"),me(e,"byText"),me(c,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),q4t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},j4t=me(function(t){t.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"),W4t={drawRect:D4t,drawCircle:P4t,drawSection:$4t,drawText:B4t,drawLabel:F4t,drawTask:G4t,drawBackgroundRect:U4t,initGraphics:j4t}});function Z4t(r){let i=D().journey,n=60;Object.keys(J4t).forEach(t=>{var e=J4t[t].color,e={cx:20,cy:n,r:7,fill:e,stroke:"#000",pos:J4t[t].position},e=(W4t.drawCircle(r,e),{x:40,y:n+7,fill:"#666",text:t,textMargin:5|i.boxTextMargin});W4t.drawText(r,e),n+=20})}var Q4t,J4t,t5t,e5t,r5t,i5t,n5t,a5t,s5t,o5t,l5t=t(()=>{Z3(),K4t(),fu(),th(),Q4t=me(function(e){Object.keys(e).forEach(function(t){t5t[t]=e[t]})},"setConf"),J4t={},me(Z4t,"drawActorLegend"),t5t=D().journey,e5t=t5t.leftMargin,r5t=me(function(t,e,r,i){let n=D().journey,a=D().securityLevel,s;"sandbox"===a&&(s=j("#i"+e));var o,l=j("sandbox"===a?s.nodes()[0].contentDocument.body:"body"),l=(i5t.init(),l.select("#"+e)),e=(W4t.initGraphics(l),i.db.getTasks()),c=i.db.getDiagramTitle(),i=i.db.getActors();for(o in J4t)delete J4t[o];let h=0;i.forEach(t=>{J4t[t]={color:n.actorColours[h%n.actorColours.length],position:h},h++}),Z4t(l),i5t.insert(0,0,e5t,50*Object.keys(J4t).length),s5t(l,e,0);var i=i5t.getBounds(),e=(c&&l.append("text").text(c).attr("x",e5t).attr("font-size","4ex").attr("font-weight","bold").attr("y",25),i.stopy-i.starty+2*n.diagramMarginY),u=e5t+i.stopx+2*n.diagramMarginX,c=(Hc(l,e,u,n.useMaxWidth),l.append("line").attr("x1",e5t).attr("y1",4*n.height).attr("x2",u-e5t-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),c?70:0);l.attr("viewBox",i.startx+` -25 ${u} `+(e+c)),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",e+c+25)},"draw"),i5t={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:me(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:me(function(t,e,r,i){void 0===t[e]?t[e]=r:t[e]=i(r,t[e])},"updateVal"),updateBounds:me(function(i,n,a,s){let o=D().journey,l=this,c=0;function t(r){return me(function(t){c++;var e=l.sequenceItems.length-c+1;l.updateVal(t,"starty",n-e*o.boxMargin,Math.min),l.updateVal(t,"stopy",s+e*o.boxMargin,Math.max),l.updateVal(i5t.data,"startx",i-e*o.boxMargin,Math.min),l.updateVal(i5t.data,"stopx",a+e*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(t,"startx",i-e*o.boxMargin,Math.min),l.updateVal(t,"stopx",a+e*o.boxMargin,Math.max),l.updateVal(i5t.data,"starty",n-e*o.boxMargin,Math.min),l.updateVal(i5t.data,"stopy",s+e*o.boxMargin,Math.max))},"updateItemBounds")}me(t,"updateFn"),this.sequenceItems.forEach(t())},"updateBounds"),insert:me(function(t,e,r,i){var n=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,i),e=Math.max(e,i);this.updateVal(i5t.data,"startx",n,Math.min),this.updateVal(i5t.data,"starty",r,Math.min),this.updateVal(i5t.data,"stopx",t,Math.max),this.updateVal(i5t.data,"stopy",e,Math.max),this.updateBounds(n,r,t,e)},"insert"),bumpVerticalPos:me(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:me(function(){return this.verticalPos},"getVerticalPos"),getBounds:me(function(){return this.data},"getBounds")},n5t=t5t.sectionFills,a5t=t5t.sectionColours,s5t=me(function(t,i,e){let n=D().journey,a="",r=2*n.height+n.diagramMarginY,s=e+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of i.entries()){if(a!==d.section){l=n5t[o%n5t.length],h=o%n5t.length,c=a5t[o%a5t.length];let e=0,r=d.section;for(let t=u;t(J4t[e]&&(t[e]=J4t[e]),t),{}),d.x=u*n.taskMargin+u*n.width+e5t,d.y=s,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,W4t.drawTask(t,d,n),i5t.insert(d.x,d.y,d.x+d.width+n.taskMargin,450)}},"drawTasks"),o5t={setConf:Q4t,draw:r5t}}),c5t={};lPt(c5t,{diagram:()=>h5t});var h5t,u5t,d5t,p5t=t(()=>{H4t(),V4t(),X4t(),l5t(),h5t={parser:y4t,db:I4t,renderer:o5t,styles:M4t,init:me(t=>{o5t.setConf(t.journey),I4t.clear()},"init")}}),g5t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[6,8,10,11,12,14,16,17,20,21],i=[1,9],n=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17],i={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:i.addTask(a[o],0,""),this.$=a[o];break;case 16:i.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:n,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:18,11:i,12:n,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,19]},{15:[1,20]},e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),e(r,[2,4]),e(r,[2,9]),e(r,[2,10])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{function e(t,e,r,n,i,a,s,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(//gi);for(let t=0;t{var e=r.actors[t].color,e={cx:a,cy:r.y,r:7,fill:e,stroke:"#000",title:t,pos:r.actors[t].position};M4t(i,e),a+=10}),z4t(e)(r.task,i,t.x,t.y,t.width,t.height,{class:"task"},e,r.colour)},"drawTask"),$4t=me(function(t,e){x3(t,e)},"drawBackgroundRect"),me(e,"byText"),me(c,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),z4t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},G4t=me(function(t){t.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"),U4t={drawRect:I4t,drawCircle:M4t,drawSection:P4t,drawText:D4t,drawLabel:O4t,drawTask:F4t,drawBackgroundRect:$4t,initGraphics:G4t}});function V4t(s){let n=D().journey,o=n.maxLabelWidth,l=(Z4t=0,60);Object.keys(K4t).forEach(e=>{var t=K4t[e].color,t={cx:20,cy:l,r:7,fill:t,stroke:"#000",pos:K4t[e].position};U4t.drawCircle(s,t);let i=s.append("text").attr("visibility","hidden").text(e),r=i.node().getBoundingClientRect().width,a=(i.remove(),[]);if(r<=o)a=[e];else{let t=e.split(" "),n="";i=s.append("text").attr("visibility","hidden"),t.forEach(e=>{var t=n?n+" "+e:e;if(i.text(t),i.node().getBoundingClientRect().width>o){if(n&&a.push(n),n=e,i.text(e),i.node().getBoundingClientRect().width>o){let t="";for(var r of e)t+=r,i.text(t+"-"),i.node().getBoundingClientRect().width>o&&(a.push(t.slice(0,-1)+"-"),t=r);n=t}}else n=t}),n&&a.push(n),i.remove()}a.forEach((t,e)=>{e={x:40,y:l+7+20*e,fill:"#666",text:t,textMargin:n.boxTextMargin??5},t=U4t.drawText(s,e).node().getBoundingClientRect().width,Z4tn.leftMargin-t&&(Z4t=t)}),l+=Math.max(20,20*a.length)})}var X4t,K4t,Z4t,Q4t,J4t,t5t,e5t,r5t,n5t,i5t,a5t,s5t=t(()=>{Q3(),H4t(),mu(),eh(),X4t=me(function(e){Object.keys(e).forEach(function(t){Q4t[t]=e[t]})},"setConf"),K4t={},Z4t=0,me(V4t,"drawActorLegend"),Q4t=D().journey,J4t=0,t5t=me(function(t,e,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"+e));var h,u=H("sandbox"===l?c.nodes()[0].contentDocument.body:"body"),u=(e5t.init(),u.select("#"+e)),e=(U4t.initGraphics(u),n.db.getTasks()),d=n.db.getDiagramTitle(),n=n.db.getActors();for(h in K4t)delete K4t[h];let p=0;n.forEach(t=>{K4t[t]={color:Q4t.actorColours[p%Q4t.actorColours.length],position:p},p++}),V4t(u),J4t=Q4t.leftMargin+Z4t,e5t.insert(0,0,J4t,50*Object.keys(K4t).length),i5t(u,e,0);var n=e5t.getBounds(),e=(d&&u.append("text").text(d).attr("x",J4t).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),n.stopy-n.starty+2*Q4t.diagramMarginY),g=J4t+n.stopx+2*Q4t.diagramMarginX,d=(Vc(u,e,g,Q4t.useMaxWidth),u.append("line").attr("x1",J4t).attr("y1",4*Q4t.height).attr("x2",g-J4t-4).attr("y2",4*Q4t.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),d?70:0);u.attr("viewBox",n.startx+` -25 ${g} `+(e+d)),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",e+d+25)},"draw"),e5t={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:me(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:me(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:me(function(n,i,a,s){let o=D().journey,l=this,c=0;function t(r){return me(function(t){c++;var e=l.sequenceItems.length-c+1;l.updateVal(t,"starty",i-e*o.boxMargin,Math.min),l.updateVal(t,"stopy",s+e*o.boxMargin,Math.max),l.updateVal(e5t.data,"startx",n-e*o.boxMargin,Math.min),l.updateVal(e5t.data,"stopx",a+e*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(t,"startx",n-e*o.boxMargin,Math.min),l.updateVal(t,"stopx",a+e*o.boxMargin,Math.max),l.updateVal(e5t.data,"starty",i-e*o.boxMargin,Math.min),l.updateVal(e5t.data,"stopy",s+e*o.boxMargin,Math.max))},"updateItemBounds")}me(t,"updateFn"),this.sequenceItems.forEach(t())},"updateBounds"),insert:me(function(t,e,r,n){var i=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,n),e=Math.max(e,n);this.updateVal(e5t.data,"startx",i,Math.min),this.updateVal(e5t.data,"starty",r,Math.min),this.updateVal(e5t.data,"stopx",t,Math.max),this.updateVal(e5t.data,"stopy",e,Math.max),this.updateBounds(i,r,t,e)},"insert"),bumpVerticalPos:me(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:me(function(){return this.verticalPos},"getVerticalPos"),getBounds:me(function(){return this.data},"getBounds")},r5t=Q4t.sectionFills,n5t=Q4t.sectionColours,i5t=me(function(t,n,e){let i=D().journey,a="",r=2*i.height+i.diagramMarginY,s=e+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of n.entries()){if(a!==d.section){l=r5t[o%r5t.length],h=o%r5t.length,c=n5t[o%n5t.length];let e=0,r=d.section;for(let t=u;t(K4t[e]&&(t[e]=K4t[e]),t),{}),d.x=u*i.taskMargin+u*i.width+J4t,d.y=s,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,U4t.drawTask(t,d,i),e5t.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),a5t={setConf:X4t,draw:t5t}}),o5t={};oPt(o5t,{diagram:()=>l5t});var l5t,c5t,h5t,u5t=t(()=>{j4t(),W4t(),Y4t(),s5t(),l5t={parser:g4t,db:A4t,renderer:a5t,styles:N4t,init:me(t=>{a5t.setConf(t.journey),A4t.clear()},"init")}}),d5t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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:me(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:me(function(t,e,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]},e(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},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:18,11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,19]},{15:[1,20]},e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),e(r,[2,4]),e(r,[2,9]),e(r,[2,10])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0S5t,addSection:()=>T5t,addTask:()=>_5t,addTaskOrg:()=>A5t,clear:()=>k5t,default:()=>N5t,getCommonDb:()=>w5t,getSections:()=>E5t,getTasks:()=>C5t});var m5t,y5t,v5t,x5t,b5t,w5t,k5t,T5t,E5t,C5t,_5t,S5t,A5t,L5t,N5t,I5t=t(()=>{gu(),m5t="",y5t=0,v5t=[],x5t=[],b5t=[],w5t=me(()=>rh,"getCommonDb"),k5t=me(function(){v5t.length=0,x5t.length=0,m5t="",b5t.length=0,oh()},"clear"),T5t=me(function(t){m5t=t,v5t.push(t)},"addSection"),E5t=me(function(){return v5t},"getSections"),C5t=me(function(){let t=L5t(),e=0;for(;!t&&e<100;)t=L5t(),e++;return x5t.push(...b5t),x5t},"getTasks"),_5t=me(function(t,e,r){t={id:y5t++,section:m5t,type:m5t,task:t,score:e||0,events:r?[r]:[]},b5t.push(t)},"addTask"),S5t=me(function(t){b5t.find(t=>t.id===y5t-1).events.push(t)},"addEvent"),A5t=me(function(t){t={section:m5t,type:m5t,description:t,task:t,classes:[]},x5t.push(t)},"addTaskOrg"),L5t=me(function(){let t=me(function(t){return b5t[t].processed},"compileTask"),e=!0;for(var[r,i]of b5t.entries())t(r),e=e&&i.processed;return e},"compileTasks"),N5t={clear:k5t,getCommonDb:w5t,addSection:T5t,getSections:E5t,getTasks:C5t,addTask:_5t,addTaskOrg:A5t,addEvent:S5t}});function R5t(t,o){t.each(function(){var e,r=j(this),i=r.text().split(/(\s+|
)/).reverse(),n=[],a=r.attr("y"),t=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",t+"em");for(let t=0;to||"
"===e)&&(n.pop(),s.text(n.join(" ").trim()),n="
"===e?[""]:[e],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(e))})}var M5t,D5t,O5t,P5t,B5t,F5t,$5t,z5t,G5t,U5t,q5t,j5t,W5t,Y5t,H5t,V5t,X5t,K5t,Z5t,Q5t,J5t,t3t,e3t,r3t,i3t=t(()=>{function e(t,e,r,i,n,a,s,o){g(e.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,i,n,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(//gi);for(let t=0;t/gi," "),i=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"));return i.attr("x",e.x+2*e.textMargin),i.text(r),t},"drawText"),B5t=me(function(t,e){function r(t,e,r,i,n){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+i-n)+" "+(t+r-1.2*n)+","+(e+i)+" "+t+","+(e+i)}me(r,"genPoints");var i=t.append("polygon");i.attr("points",r(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,P5t(t,e)},"drawLabel"),F5t=me(function(t,e,r){var t=t.append("g"),i=q5t();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,M5t(t,i),j5t(r)(e.text,t,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),$5t=-1,z5t=me(function(t,e,r){var i=e.x+r.width/2,t=t.append("g");$5t++,t.append("line").attr("id","task"+$5t).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),D5t(t,{cx:i,cy:300+30*(5-e.score),score:e.score}),(i=q5t()).x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="task task-type-"+e.num,i.rx=3,i.ry=3,M5t(t,i),j5t(r)(e.task,t,i.x,i.y,i.width,i.height,{class:"task"},r,e.colour)},"drawTask"),G5t=me(function(t,e){M5t(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),U5t=me(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),q5t=me(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),me(e,"byText"),me(c,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),j5t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},W5t=me(function(t){t.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"),me(R5t,"wrap"),Y5t=me(function(t,e,r,i){var r=r%12-1,t=t.append("g"),n=(e.section=r,t.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+r),t.append("g")),a=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(R5t,e.width).node().getBBox(),s=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),V5t(n,e,r,i),e},"drawNode"),H5t=me(function(t,e,r){var i=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(R5t,e.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return t.remove(),i.height+1.1*r*.5+e.padding},"getVirtualNodeHeight"),V5t=me(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),X5t={drawRect:M5t,drawCircle:O5t,drawSection:F5t,drawText:P5t,drawLabel:B5t,drawTask:z5t,drawBackgroundRect:G5t,getTextObj:U5t,getNoteRect:q5t,initGraphics:W5t,drawNode:Y5t,getVirtualNodeHeight:H5t}}),n3t=t(()=>{Z3(),i3t(),e(),fu(),th(),K5t=me(function(t,e,r,i){let n=D(),a=n.leftMargin??50,s=(M.debug("timeline",i.db),n.securityLevel),o,l=("sandbox"===s&&(o=j("#i"+e)),j("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+e)),c=(l.append("g"),i.db.getTasks()),h=i.db.getCommonDb().getDiagramTitle();M.debug("task",c),X5t.initGraphics(l);var u,d,e=i.db.getSections();M.debug("sections",e);let p=0,g=0,f,m=50+a,y=50,v=0,x=!0,b=(e.forEach(function(t){t={number:v,descr:t,section:v,width:150,padding:20,maxHeight:p},t=X5t.getVirtualNodeHeight(l,t,n),M.debug("sectionHeight before draw",t),p=Math.max(p,t+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=X5t.getVirtualNodeHeight(l,T,n);M.debug("taskHeight before draw",T),g=Math.max(g,T+20),b=Math.max(b,d.events.length);let t=0;for(k of d.events){var E={descr:k,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};t+=X5t.getVirtualNodeHeight(l,E,n)}w=Math.max(w,t)}M.debug("maxSectionHeight before draw",p),M.debug("maxTaskHeight before draw",g),e&&0{var t=c.filter(t=>t.section===e),r={number:v,descr:e,section:v,width:200*Math.max(t.length,1)-50,padding:20,maxHeight:p},i=(M.debug("sectionNode",r),l.append("g")),r=X5t.drawNode(i,r,v,n);M.debug("sectionNode output",r),i.attr("transform",`translate(${m}, 50)`),y+=p+50,0{},"setConf"),draw:K5t}}),a3t=t(()=>{mi(),t3t=me(e=>{let r="";for(let t=0;te[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0C5t,addSection:()=>w5t,addTask:()=>E5t,addTaskOrg:()=>_5t,clear:()=>b5t,default:()=>A5t,getCommonDb:()=>x5t,getSections:()=>k5t,getTasks:()=>T5t});var g5t,f5t,m5t,y5t,v5t,x5t,b5t,w5t,k5t,T5t,E5t,C5t,_5t,S5t,A5t,L5t=t(()=>{fu(),g5t="",f5t=0,m5t=[],y5t=[],v5t=[],x5t=me(()=>nh,"getCommonDb"),b5t=me(function(){m5t.length=0,y5t.length=0,g5t="",v5t.length=0,lh()},"clear"),w5t=me(function(t){g5t=t,m5t.push(t)},"addSection"),k5t=me(function(){return m5t},"getSections"),T5t=me(function(){let t=S5t(),e=0;for(;!t&&e<100;)t=S5t(),e++;return y5t.push(...v5t),y5t},"getTasks"),E5t=me(function(t,e,r){t={id:f5t++,section:g5t,type:g5t,task:t,score:e||0,events:r?[r]:[]},v5t.push(t)},"addTask"),C5t=me(function(t){v5t.find(t=>t.id===f5t-1).events.push(t)},"addEvent"),_5t=me(function(t){t={section:g5t,type:g5t,description:t,task:t,classes:[]},y5t.push(t)},"addTaskOrg"),S5t=me(function(){let t=me(function(t){return v5t[t].processed},"compileTask"),e=!0;for(var[r,n]of v5t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),A5t={clear:b5t,getCommonDb:x5t,addSection:w5t,getSections:k5t,getTasks:T5t,addTask:E5t,addTaskOrg:_5t,addEvent:C5t}});function N5t(t,o){t.each(function(){var e,r=H(this),n=r.text().split(/(\s+|
)/).reverse(),i=[],a=r.attr("y"),t=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",t+"em");for(let t=0;to||"
"===e)&&(i.pop(),s.text(i.join(" ").trim()),i="
"===e?[""]:[e],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(e))})}var I5t,R5t,M5t,D5t,O5t,P5t,B5t,F5t,$5t,z5t,G5t,U5t,q5t,j5t,W5t,Y5t,H5t,V5t,X5t,K5t,Z5t,Q5t,J5t,t3t,e3t=t(()=>{function e(t,e,r,n,i,a,s,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(//gi);for(let t=0;t/gi," "),n=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"));return n.attr("x",e.x+2*e.textMargin),n.text(r),t},"drawText"),O5t=me(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}me(r,"genPoints");var n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,D5t(t,e)},"drawLabel"),P5t=me(function(t,e,r){var t=t.append("g"),n=G5t();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,I5t(t,n),U5t(r)(e.text,t,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),B5t=-1,F5t=me(function(t,e,r){var n=e.x+r.width/2,t=t.append("g");B5t++,t.append("line").attr("id","task"+B5t).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),R5t(t,{cx:n,cy:300+30*(5-e.score),score:e.score}),(n=G5t()).x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="task task-type-"+e.num,n.rx=3,n.ry=3,I5t(t,n),U5t(r)(e.task,t,n.x,n.y,n.width,n.height,{class:"task"},r,e.colour)},"drawTask"),$5t=me(function(t,e){I5t(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),z5t=me(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),G5t=me(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),me(e,"byText"),me(c,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),U5t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},q5t=me(function(t){t.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"),me(N5t,"wrap"),j5t=me(function(t,e,r,n){var r=r%12-1,t=t.append("g"),i=(e.section=r,t.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+r),t.append("g")),a=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(N5t,e.width).node().getBBox(),s=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),Y5t(i,e,r,n),e},"drawNode"),W5t=me(function(t,e,r){var n=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(N5t,e.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return t.remove(),n.height+1.1*r*.5+e.padding},"getVirtualNodeHeight"),Y5t=me(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),H5t={drawRect:I5t,drawCircle:M5t,drawSection:P5t,drawText:D5t,drawLabel:O5t,drawTask:F5t,drawBackgroundRect:$5t,getTextObj:z5t,getNoteRect:G5t,initGraphics:q5t,drawNode:j5t,getVirtualNodeHeight:W5t}}),r3t=t(()=>{Q3(),e3t(),e(),mu(),eh(),V5t=me(function(t,e,r,n){let i=D(),a=i.leftMargin??50,s=(M.debug("timeline",n.db),i.securityLevel),o,l=("sandbox"===s&&(o=H("#i"+e)),H("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+e)),c=(l.append("g"),n.db.getTasks()),h=n.db.getCommonDb().getDiagramTitle();M.debug("task",c),H5t.initGraphics(l);var u,d,e=n.db.getSections();M.debug("sections",e);let p=0,g=0,f,m=50+a,y=50,v=0,x=!0,b=(e.forEach(function(t){t={number:v,descr:t,section:v,width:150,padding:20,maxHeight:p},t=H5t.getVirtualNodeHeight(l,t,i),M.debug("sectionHeight before draw",t),p=Math.max(p,t+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=H5t.getVirtualNodeHeight(l,T,i);M.debug("taskHeight before draw",T),g=Math.max(g,T+20),b=Math.max(b,d.events.length);let t=0;for(k of d.events){var E={descr:k,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};t+=H5t.getVirtualNodeHeight(l,E,i)}0{var t=c.filter(t=>t.section===e),r={number:v,descr:e,section:v,width:200*Math.max(t.length,1)-50,padding:20,maxHeight:p},n=(M.debug("sectionNode",r),l.append("g")),r=H5t.drawNode(n,r,v,i);M.debug("sectionNode output",r),n.attr("transform",`translate(${m}, 50)`),y+=p+50,0{},"setConf"),draw:V5t}}),n3t=t(()=>{vn(),Q5t=me(e=>{let r="";for(let t=0;t` + `}return r},"genSections"),J5t=me(t=>` .edge { stroke-width: 3; } - ${t3t(t)} + ${Q5t(t)} .section-root rect, .section-root path, .section-root circle { fill: ${t.git0}; } @@ -1935,18 +1962,18 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .eventWrapper { filter: brightness(120%); } -`,"getStyles"),r3t=e3t}),s3t={};lPt(s3t,{diagram:()=>o3t});var o3t,l3t,c3t,h3t,u3t,d3t,p3t,g3t,f3t,m3t,y3t,v3t,x3t,b3t,w3t,k3t,T3t,E3t,C3t=t(()=>{g5t(),I5t(),n3t(),a3t(),o3t={db:f5t,renderer:J5t,parser:d5t,styles:r3t}}),_3t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[1,4],i=[1,13],n=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],f=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],r={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",a[o].id),i.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:i.getLogger().trace("Icon: ",a[o]),i.decorateNode({icon:a[o]});break;case 17:case 21:i.decorateNode({class:a[o]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",a[o].id),i.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:i.decorateNode({icon:a[o]});break;case 25:i.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:i.getType(a[o-2],a[o])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:i,7:[1,10],9:9,12:11,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:i,9:22,12:11,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:h,7:u,10:23,11:d},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:i,12:21,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(g,[2,14],{7:f,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:f,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"a3t});var a3t,s3t,o3t,l3t,c3t,h3t,u3t,d3t,p3t,g3t,f3t,m3t,y3t,v3t,x3t,b3t,w3t,k3t,T3t=t(()=>{d5t(),L5t(),r3t(),n3t(),a3t={db:p5t,renderer:Z5t,parser:h5t,styles:t3t}}),E3t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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:me(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:me(function(t,e,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},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(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},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7: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},e(g,[2,14],{7:f,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:f,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{fu(),Jc(),e(),_i(),h3t=[],u3t=0,d3t={},p3t=me(()=>{h3t=[],u3t=0,d3t={}},"clear"),g3t=me(function(e){for(let t=h3t.length-1;0<=t;t--)if(h3t[t].level0{M.info("addNode",t,e,r,i);let n=D(),a=n.mindmap?.padding??mr.mindmap.padding;switch(i){case y3t.ROUNDED_RECT:case y3t.RECT:case y3t.HEXAGON:a*=2}if(e={id:u3t++,nodeId:_c(e,n),level:t,descr:_c(r,n),type:i,children:[],width:n.mindmap?.maxNodeWidth??mr.mindmap.maxNodeWidth,padding:a},r=g3t(t))r.children.push(e);else if(0!==h3t.length)throw new Error('There can be only one root. No parent could be found for ("'+e.descr+'")');h3t.push(e)},"addNode"),y3t={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},v3t=me((t,e)=>{switch(M.debug("In get type",t,e),t){case"[":return y3t.RECT;case"(":return")"===e?y3t.ROUNDED_RECT:y3t.CLOUD;case"((":return y3t.CIRCLE;case")":return y3t.CLOUD;case"))":return y3t.BANG;case"{{":return y3t.HEXAGON;default:return y3t.DEFAULT}},"getType"),x3t=me((t,e)=>{d3t[t]=e},"setElementForId"),b3t=me(t=>{var e,r;t&&(e=D(),r=h3t[h3t.length-1],t.icon&&(r.icon=_c(t.icon,e)),t.class)&&(r.class=_c(t.class,e))},"decorateNode"),w3t=me(t=>{switch(t){case y3t.DEFAULT:return"no-border";case y3t.RECT:return"rect";case y3t.ROUNDED_RECT:return"rounded-rect";case y3t.CIRCLE:return"circle";case y3t.CLOUD:return"cloud";case y3t.BANG:return"bang";case y3t.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),k3t=me(()=>M,"getLogger"),T3t=me(t=>d3t[t],"getElementById"),E3t={clear:p3t,addNode:m3t,getMindmap:f3t,nodeType:y3t,getType:v3t,setElementForId:x3t,decorateNode:b3t,type2Str:w3t,getLogger:k3t,getElementById:T3t}});function A3t(t){return(A3t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function L3t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N3t(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[a++]}},"n"),e:me(function(t){throw t},"e"),f:e};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 j3t(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function W3t(t,e){return t(e={exports:{}},e.exports),e.exports}function Y3t(t){for(var e=t.length;e--&&wTt.test(t.charAt(e)););return e}function H3t(t){return t&&t.slice(0,kTt(t)+1).replace(TTt,"")}function V3t(t){var e=CTt.call(t,STt),r=t[STt];try{var i=!(t[STt]=void 0)}catch{}var n=_Tt.call(t);return i&&(e?t[STt]=r:delete t[STt]),n}function X3t(t){return LTt.call(t)}function K3t(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(ITt&&ITt in Object(t)?ATt:NTt)(t)}function Z3t(t){return null!=t&&"object"==typeof t}function Q3t(t){return"symbol"==typeof t||MTt(t)&&"[object Symbol]"==RTt(t)}function J3t(t){if("number"==typeof t)return t;if(DTt(t))return OTt;if(yTt(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=yTt(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=ETt(t);var e=BTt.test(t);return e||FTt.test(t)?$Tt(t.slice(2),e?2:8):PTt.test(t)?OTt:+t}function t6t(i,r,t){var n,a,s,o,l,c,h=0,e=!1,u=!1,d=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function p(t){var e=n,r=a;return n=a=void 0,h=t,o=i.apply(r,e)}function g(t){return h=t,l=setTimeout(y,r),e?p(t):o}function f(t){var e=r-(t-c);return u?UTt(e,s-(t-h)):e}function m(t){var e=t-c;return void 0===c||r<=e||e<0||u&&s<=t-h}function y(){var t=bTt();if(m(t))return v(t);l=setTimeout(y,f(t))}function v(t){return l=void 0,d&&n?p(t):(n=a=void 0,o)}function x(){void 0!==l&&clearTimeout(l),n=c=a=l=void(h=0)}function b(){return void 0===l?o:v(bTt())}function w(){var t=bTt(),e=m(t);if(n=arguments,a=this,c=t,e){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=zTt(r)||0,yTt(t)&&(e=!!t.leading,u="maxWait"in t,s=u?GTt(zTt(t.maxWait)||0,r):s,d="trailing"in t?!!t.trailing:d),me(p,"invokeFunc"),me(g,"leadingEdge"),me(f,"remainingWait"),me(m,"shouldInvoke"),me(y,"timerExpired"),me(v,"trailingEdge"),me(x,"cancel"),me(b,"flush"),me(w,"debounced"),w.cancel=x,w.flush=b,w}function e6t(t,e,r,i,n,a){var s=Bkt(t)?t:gEt[t]||gEt.euclidean;return 0===e&&Bkt(t)?s(n,a):s(e,r,i,n,a)}function r6t(t,e){var r;return!tCt(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!DTt(t))||rCt.test(t)||!eCt.test(t)||null!=e&&t in Object(e))}function i6t(t){return!!yTt(t)&&("[object Function]"==(t=RTt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function n6t(t){return!!aCt&&aCt in t}function a6t(t){if(null!=t){try{return oCt.call(t)}catch{}try{return t+""}catch{}}return""}function s6t(t){return!(!yTt(t)||sCt(t))&&(nCt(t)?hCt:cCt).test(lCt(t))}function o6t(t,e){return t?.[e]}function l6t(t,e){return t=dCt(t,e),uCt(t)?t:void 0}function c6t(){this.__data__=gCt?gCt(null):{},this.size=0}function h6t(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function u6t(t){var e,r=this.__data__;return gCt?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:fCt.call(r,t)?r[t]:void 0}function d6t(t){var e=this.__data__;return gCt?void 0!==e[t]:mCt.call(e,t)}function p6t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=gCt&&void 0===e?"__lodash_hash_undefined__":e,this}function g6t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e>0&255)/255,e[1]=(t>>8&255)/255,e[2]=(t>>16&255)/255,e[3]=(t>>24&255)/255,e}function Ywt(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function Hwt(e,t){var r=e.createTexture();return r.buffer=function(t){e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},r.deleteTexture=function(){e.deleteTexture(r)},r}function Vwt(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function Xwt(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function Kwt(t,e,r,i,n,a){switch(e){case t.FLOAT:return new Float32Array(r.buffer,a*i,n);case t.INT:return new Int32Array(r.buffer,a*i,n)}}function Zwt(t,e,r,i){var n=(e=M3t(Vwt(t,e),2))[0],i=Xwt(t,e=e[1],i),a=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,i,t.STATIC_DRAW),e===t.FLOAT?t.vertexAttribPointer(r,n,e,!1,0,0):e===t.INT&&t.vertexAttribIPointer(r,n,e,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),a}function Qwt(e,t,r,i){var n=(r=M3t(Vwt(e,r),3))[0],a=r[1],r=r[2],s=Xwt(e,a,t*n),o=n*r,l=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferData(e.ARRAY_BUFFER,t*o,e.DYNAMIC_DRAW),e.enableVertexAttribArray(i),a===e.FLOAT?e.vertexAttribPointer(i,n,a,!1,o,0):a===e.INT&&e.vertexAttribIPointer(i,n,a,o,0),e.vertexAttribDivisor(i,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var c=new Array(t),h=0;h{function i(t){if(L3t(this,i),this._obj=Object.create(null),this.size=0,null!=t)for(var e=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t,r=0;r{if(Lkt){if(Lkt.requestAnimationFrame)return function(t){Lkt.requestAnimationFrame(t)};if(Lkt.mozRequestAnimationFrame)return function(t){Lkt.mozRequestAnimationFrame(t)};if(Lkt.webkitRequestAnimationFrame)return function(t){Lkt.webkitRequestAnimationFrame(t)};if(Lkt.msRequestAnimationFrame)return function(t){Lkt.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(WTt())},1e3/60)}})(),HTt=me(function(t){return YTt(t)},"requestAnimationFrame"),VTt=WTt,XTt=me(function(t){for(var e,r=1>1])<0;)t[r]=a,r=s;return t[r]=n},"_siftdown"),u=me(function(t,e,r){var i,n,a,s,o;for(null==r&&(r=d),n=t.length,a=t[o=e],i=2*e+1;iy&&(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=t.x1&&t.y2>=t.y1?{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1}:null!=t.w&&null!=t.h&&0<=t.w&&0<=t.h?{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}:void 0:void 0},"makeBoundingBox"),a8t=me(function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},"copyBoundingBox"),s8t=me(function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},"clearBoundingBox"),o8t=me(function(t,e,r){return{x1:t.x1+e,x2:t.x2+e,y1:t.y1+r,y2:t.y2+r,w:t.w,h:t.h}},"shiftBoundingBox"),l8t=me(function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},"updateBoundingBox"),c8t=me(function(t,e,r){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r),t.y2=Math.max(t.y2,r),t.h=t.y2-t.y1},"expandBoundingBoxByPoint"),h8t=me(function(t){var e=1e.x2||e.x1>t.x2||t.x2e.y2||e.y1>t.y2)},"boundingBoxesIntersect"),g8t=me(function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},"inBoundingBox"),f8t=me(function(t,e){return g8t(t,e.x,e.y)},"pointInBoundingBox"),m8t=me(function(t,e){return g8t(t,e.x1,e.y1)&&g8t(t,e.x2,e.y2)},"boundingBoxInBoundingBox"),y8t=me(function(t,e,r,i,n,a,s){var o,l="auto"===(l=7=u&&c[1]<=o||0<(c=I8t(t,e,r,i,h=r+n-l,u=i+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=I8t(t,e,r,i,o=r-n+l,h=i+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),v8t=me(function(t,e,r,i,n,a,s){var o=Math.min(r,n),r=Math.max(r,n),n=Math.min(i,a),i=Math.max(i,a);return o-s<=t&&t<=r+s&&n-s<=e&&e<=i+s},"inLineVicinity"),x8t=me(function(t,e,r,i,n,a,s,o,l){var c=Math.min(r,s,n)-l,r=Math.max(r,s,n)+l,s=Math.min(i,o,a)-l,n=Math.max(i,o,a)+l;return!(to&&(o=e[s][c],l=c);n[l].push(t[s])}for(var h=0;h=n.threshold||"dendrogram"===n.mode&&1===t.length)return!1;var p=e[s],g=e[i[s]],f="dendrogram"===n.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key};t[p.index]=f,t.splice(g.index,1),e[p.key]=f;for(var m=0;mr[g.key][y.key]&&(a=r[g.key][y.key])):"max"===n.linkage?(a=r[p.key][y.key],r[p.key][y.key]s&&(s=e[n*t+(a=l)])}0=e.minIterations-1||v==e.maxIterations-1)){for(var q=0,R=0;R{var t=o[e];null!=t&&null!=t.then?t.then(function(t){s(e,t)},function(t){i(t)}):s(e,t)})(t)})},YEt.resolve=function(r){return new YEt(function(t,e){t(r)})},YEt.reject=function(r){return new YEt(function(t,e){e(r)})},QEt=typeof Promise<"u"?Promise:YEt,JEt=me(function(t,e,r){var i=Ykt(t),n=!i;(e=this._private=lTt({duration:1e3},e,r)).target=t,e.style=e.style||e.css,e.started=!1,e.playing=!1,e.hooked=!1,e.applying=!1,e.progress=0,e.completes=[],e.frames=[],e.complete&&Bkt(e.complete)&&e.completes.push(e.complete),n&&(r=t.position(),e.startPosition=e.startPosition||{x:r.x,y:r.y},e.startStyle=e.startStyle||t.cy().style().getAnimationStartStyle(t,e.style)),i&&(n=t.pan(),e.startPan={x:n.x,y:n.y},e.startZoom=t.zoom()),this.length=1,this[0]=this},"Animation"),r9t=JEt.prototype,lTt(r9t,{instanceString:me(function(){return"animation"},"instanceString"),hook:me(function(){var t,e=this._private;return e.hooked||(t=e.target._private.animation,(e.queue?t.queue:t.current).push(this),qkt(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0),this},"hook"),play:me(function(){var t=this._private;return 1===t.progress&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},"play"),playing:me(function(){return this._private.playing},"playing"),apply:me(function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},"apply"),applying:me(function(){return this._private.applying},"applying"),pause:me(function(){var t=this._private;return t.playing=!1,t.started=!1,this},"pause"),stop:me(function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},"stop"),rewind:me(function(){return this.progress(0)},"rewind"),fastforward:me(function(){return this.progress(1)},"fastforward"),time:me(function(t){var e=this._private;return void 0===t?e.progress*e.duration:this.progress(t/e.duration)},"time"),progress:me(function(t){var e=this._private,r=e.playing;return void 0===t?e.progress:(r&&this.pause(),e.progress=t,e.started=!1,r&&this.play(),this)},"progress"),completed:me(function(){return 1===this._private.progress},"completed"),reverse:me(function(){var i=this._private,t=i.playing,e=(t&&this.pause(),i.progress=1-i.progress,i.started=!1,me(function(t,e){var r=i[t];null!=r&&(i[t]=i[e],i[e]=r)},"swap"));if(e("zoom","startZoom"),e("pan","startPan"),e("position","startPosition"),i.style)for(var r=0;r{try{var t=pCt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),zCt=EAt,me(z6t,"baseAssignValue"),GCt=z6t,YAt=Object.prototype,UCt=YAt.hasOwnProperty,me(G6t,"assignValue"),qCt=G6t,jCt=/^(?:0|[1-9]\d*)$/,me(U6t,"isIndex"),WCt=U6t,me(q6t,"baseSet"),YCt=q6t,me(j6t,"set"),HCt=j6t,me(W6t,"copyArray"),VCt=W6t,me(Y6t,"toPath"),XCt=Y6t,a9t={data:me(function(b){var t={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:me(function(t){},"beforeGet"),beforeSet:me(function(t,e){},"beforeSet"),onSet:me(function(t){},"onSet"),canSet:me(function(t){return!0},"canSet")};return b=lTt({},t,b),me(function(t,e){var r,i=b,n=this,a=void 0!==n.length,s=a?n:[n],o=a?n[0]:n;if(Pkt(t)){var l,c=-1!==t.indexOf(".")&&XCt(t);if(i.allowGetting&&void 0===e)return o&&(i.beforeGet(o),l=c&&void 0===o._private[i.field][t]?$Ct(o._private[i.field],c):o._private[i.field][t]),l;if(i.allowSetting&&void 0!==e&&!i.immutableKeys[t]){a=R3t({},t,e),i.beforeSet(n,a);for(var h=0,u=s.length;h\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:aTt,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+ZCt.metaChar+"))+",ZCt.className="(?:[\\w-]|(?:\\\\"+ZCt.metaChar+"))+",ZCt.value=ZCt.string+"|"+ZCt.number,ZCt.id=ZCt.variable;for(var e,r=ZCt.comparatorOp.split("|"),n=0;n{for(var t,e={},r=0;r")+h(t.child,e);case V.ANCESTOR:case V.DESCENDANT:return h(t.ancestor,e)+" "+h(t.descendant,e);case V.COMPOUND_SPLIT:var a=h(t.left,e),n=h(t.subject,e),s=h(t.right,e);return a+(0":u=!0,i=r=":u=!0,i=r<=t;break;case"<":u=!0,i=ta.length?e.substr(a.length):""}function i(){c=c.length>u.length?c.substr(u.length):""}for(e=e.replace(/[/][*](\s|.)+?[*][/]/g,""),me(r,"removeSelAndBlockFromRemaining"),me(i,"removePropAndValFromRem");!e.match(/^\s*$/);){var n=e.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!n){f7t("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+e);break}var a=n[0],s=n[1];if("core"!==s&&new g_t(s).invalid)f7t("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=n[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){f7t("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}):f7t("Skipping property: Invalid property definition in: "+u):f7t("Skipping property: Invalid property name in: "+u),i()}if(l){r();break}this.selector(s);for(var g=0;gl.max||l.strictMax&&r===l.max)?null:(s={name:e,value:r,strValue:""+r+(x||""),units:x,bypass:i},l.unitless||"px"!==x&&"em"!==x?s.pfValue=r:s.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(s.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(s.pfValue="rad"===x?r:H7t(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;Ethis._private.maxZoom?this._private.maxZoom:e)=i.minZoom&&(i.maxZoom=e),this},"zoomRange"),minZoom:me(function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},"minZoom"),maxZoom:me(function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},"maxZoom"),getZoomedViewport:me(function(t){var e,r,i=this._private,n=i.pan,a=i.zoom,s=!i.zoomingEnabled;return at(t)?r=t:$kt(t)&&(r=t.level,null!=t.position?e=z7t(t.position,a,n):null!=t.renderedPosition&&(e=t.renderedPosition),null!=e)&&!i.panningEnabled&&(s=!0),r=(r=r>i.maxZoom?i.maxZoom:r)e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=r,n.push("zoom"))),!i||a&&t.cancelOnFailedZoom||!e.panningEnabled||(r=t.pan,at(r.x)&&(e.pan.x=r.x,s=!1),at(r.y)&&(e.pan.y=r.y,s=!1),s)||n.push("pan"),0=r.numIter||(ESt(n,r),n.temperature=n.temperature*r.coolingFactor,n.temperature=r.animationThreshold&&s(),HTt(t)):(PSt(n,r),l())},"frame")();else{for(;h;)h=o(c),c++;PSt(n,r),l()}return this},Twt.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Twt.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},vSt=me(function(t,e,r){for(var i=r.eles.edges(),n=r.eles.nodes(),a=n8t(r.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),s={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:n.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=r.eles.components(),l={},c=0;ci.maxX)&&(i.maxX=e.maxX+i.padRight,n=!0),(null==i.minX||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,n=!0),(null==i.minY||e.minY-i.padTop(e=T8t(y,v,h[u],h[u+1],h[u+2],h[u+3])))return E(t,e),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(h=i.allpts,u=0;u+5(e=k8t(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return E(t,e),!0;for(var l=l||r.source,c=c||r.target,d=x.getArrowWidth(n,a),p=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}],u=0;uMath.abs(b)?n:i:"upward"===u||"downward"===u?(h=i,y=!0):"leftward"!==u&&"rightward"!==u||(h=n,y=!0),(n=h===i)?b:m),i=K7t(h=n?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0=Math.abs(w)},"getIsTooClose"))(m),u=y(Math.abs(w)-Math.abs(m)),!g&&!u||b?n?(h=a.y1+m+(c?o/2*i:0),x=a.x1,e=a.x2,r.segpts=[x,h,e,h]):(p=a.x1+m+(c?s/2*i:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):n?(p=Math.abs(h)<=o/2,d=Math.abs(v)<=l/2,p?(y=(a.x1+a.x2)/2,g=a.y1,u=a.y2,r.segpts=[y,g,y,u]):d?(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)<=e/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=t.pstyle("taxi-radius").value,g="arc-radius"===t.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(t,e){var r,i,n,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k,T,E=t._private.rscratch;"bezier"===E.edgeType&&(m=e.srcPos,r=e.tgtPos,i=e.srcW,n=e.srcH,a=e.tgtW,s=e.tgtH,T=e.srcShape,o=e.tgtShape,v=e.srcCornerRadius,l=e.tgtCornerRadius,x=e.srcRs,e=e.tgtRs,y=!at(E.startX)||!at(E.startY),f=!at(E.arrowStartX)||!at(E.arrowStartY),c=!at(E.endX)||!at(E.endY),h=!at(E.arrowEndX)||!at(E.arrowEndY),u=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=Z7t({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))n.poolIndex()&&(t=i,i=n,n=t),e.srcPos=i.position()),s=e.tgtPos=n.position(),o=e.srcW=i.outerWidth(),l=e.srcH=i.outerHeight(),c=e.tgtW=n.outerWidth(),h=e.tgtH=n.outerHeight(),u=e.srcShape=D.nodeShapes[M.getNodeShape(i)],d=e.tgtShape=D.nodeShapes[M.getNodeShape(n)],p=e.srcCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,g=e.tgtCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,f=e.tgtRs=n._private.rscratch,m=e.srcRs=i._private.rscratch;e.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y=N.desktopTapThreshold2),v(t)),o=(e&&(N.hoverData.tapholdCancelled=!0),me(function(){var t=N.hoverData.dragDelta=N.hoverData.dragDelta||[];0===t.length?(t.push(f[0]),t.push(f[1])):(t[0]+=f[0],t[1]+=f[1])},"updateDragDelta")),y=(n=!0,I(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),me(function(){N.data.bgActivePosistion=void 0,N.hoverData.selecting||a.emit({originalEvent:t,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?e&&(r={originalEvent:t,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:t,type:"cxtdragout",position:{x:l[0],y:l[1]}}),N.hoverData.cxtOver=d)&&d.emit({originalEvent:t,type:"cxtdragover",position:{x:l[0],y:l[1]}}):N.hoverData.dragging?(n=!0,a.panningEnabled()&&a.userPanningEnabled()&&(N.hoverData.justStartedPan?(r=N.hoverData.mdownPos,i={x:(l[0]-r[0])*s,y:(l[1]-r[1])*s},N.hoverData.justStartedPan=!1):i={x:f[0]*s,y:f[1]*s},a.panBy(i),a.emit("dragpan"),N.hoverData.dragged=!0),l=N.projectIntoViewport(t.clientX,t.clientY)):1!=u[4]||null!=g&&!g.pannable()?(g&&g.pannable()&&g.active()&&g.unactivate(),g&&g.grabbed()||d==p||(p&&I(p,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),d&&I(d,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),N.hoverData.last=d),g&&(e?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},at(f[0])&&at(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((i=N.hoverData.dragDelta)&&at(i[0])&&at(i[1])&&(s.x+=i[0],s.y+=i[1])),N.hoverData.draggingEles=!0,m.silentShift(s).emit("position drag"),N.redrawHint("drag",!0),N.redraw()):o()),n=!0):e&&(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=U7t(c),N.redrawHint("select",!0),N.redraw()):y(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],n)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},"mousemoveHandler"),!1),N.registerBinding(t,"mouseup",me(function(t){var e,r,i,n,a,s,o,l;1===N.hoverData.which&&1!==t.which&&N.hoverData.capture||N.hoverData.capture&&(N.hoverData.capture=!1,e=N.cy,r=N.projectIntoViewport(t.clientX,t.clientY),i=N.selection,o=N.findNearestElement(r[0],r[1],!0,!1),n=N.dragData.possibleDragElements,a=N.hoverData.down,l=v(t),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:t,type:"cxttapend",position:{x:r[0],y:r[1]}},(a||e).emit(s),N.hoverData.cxtDragged||(s={originalEvent:t,type:"cxttap",position:{x:r[0],y:r[1]}},(a||e).emit(s)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(o,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(I(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),h=!1,t.timeStamp-u<=e.multiClickDebounceTime()?(c&&clearTimeout(c),h=!0,u=null,I(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(c=setTimeout(function(){h||I(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),u=t.timeStamp)),null!=a||N.dragData.didDrag||N.hoverData.selecting||N.hoverData.dragged||v(t)||(e.$(d).unselect(["tapunselect"]),0=N.touchTapThreshold2}if(e&&N.touchData.cxt&&(t.preventDefault(),x=t.touches[0].clientX-q,b=t.touches[0].clientY-j,w=t.touches[1].clientX-q,k=t.touches[1].clientY-j,2.25<=(o=nt(x,b,w,k))/G||22500<=o)&&(N.touchData.cxt=!1,N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),p={originalEvent:t,type:"cxttapend",position:{x:n[0],y:n[1]}},N.touchData.start?(N.touchData.start.unactivate().emit(p),N.touchData.start=null):i.emit(p)),e&&N.touchData.cxt){var p={originalEvent:t,type:"cxtdrag",position:{x:n[0],y:n[1]}},g=(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),(N.touchData.start||i).emit(p),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxtDragged=!0,N.findNearestElement(n[0],n[1],!0,!0));(!N.touchData.cxtOver||g!==N.touchData.cxtOver)&&(N.touchData.cxtOver&&N.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:n[0],y:n[1]}}),N.touchData.cxtOver=g)&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:n[0],y:n[1]}})}else if(e&&t.touches[2]&&i.boxSelectionEnabled())t.preventDefault(),N.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,N.touchData.selecting||i.emit({originalEvent:t,type:"boxstart",position:{x:n[0],y:n[1]}}),N.touchData.selecting=!0,N.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(n[0]+n[2]+n[4])/3,r[3]=(n[1]+n[3]+n[5])/3):(r[0]=(n[0]+n[2]+n[4])/3,r[1]=(n[1]+n[3]+n[5])/3,r[2]=(n[0]+n[2]+n[4])/3+1,r[3]=(n[1]+n[3]+n[5])/3+1),N.redrawHint("select",!0),N.redraw();else if(e&&t.touches[1]&&!N.touchData.didSelect&&i.zoomingEnabled()&&i.panningEnabled()&&i.userZoomingEnabled()&&i.userPanningEnabled()){if(t.preventDefault(),N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),T=N.dragData.touchDragEles){N.redrawHint("drag",!0);for(var f=0;f=f.deqFastCost*(1e3/60-(t?i:0)))break}else if(t){if(l>=f.deqCost*n||l>=f.deqAvgCost*i)break}else if(c>=f.deqNoDrawCost*(1e3/60))break;var h=f.deq(p,o,s);if(!(0=.2*t.width&&this.retireTexture(t)},a9t.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);.8=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,E7t(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),T7t(i,a),r.push(a),a}},a9t.queueElement=function(t,e){var r=this.getElementQueue(),i=this.getElementKeyToQueue(),n=this.getKey(t),a=i[n];a?(a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,r.updateItem(a)):(a={eles:t.spawn().merge(t),level:e,reqs:1,key:n},r.push(a),i[n]=a)},a9t.dequeue=function(t){for(var e=this.getElementQueue(),r=this.getElementKeyToQueue(),i=[],n=this.lookup,a=0;a<1&&0=f||!m8t(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;l||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,t),g.eles.push(v),x[a]=g}}return l||(m?null:u)},J.getEleLevelForLayerLevel=function(t,e){return t},J.drawEleInLayer=function(t,e,r,i){var n=this.renderer,t=t.context,a=e.boundingBox();0!==a.w&&0!==a.h&&e.visible()&&(r=this.getEleLevelForLayerLevel(r,i),n.setImgSmoothing(t,!1),n.drawCachedElement(t,e,null,null,r,!0),n.setImgSmoothing(t,!0))},J.levelIsComplete=function(t,e){var r=this.layersByLevel[t];if(!r||0===r.length)return!1;for(var i=0,n=0;ns.minMbLowQualFrames)&&(s.motionBlurPxRatio=s.mbPxRBlurry),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!a&&(n[s.NODE]=!0,n[s.SELECT_BOX]=!0),e.style()),v=e.zoom(),x=void 0!==c?c:v,b=e.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*=i,(w=h||w).x*=i,w.y*=i,s.getCachedZSortedEles());function E(t,e,r,i,n){var a=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",s.colorFillStyle(t,255,255,255,s.motionBlurTransparency),t.fillRect(e,r,i,n),t.globalCompositeOperation=a}function C(t,e){var r,i,n,a=s.clearingMotionBlur||t!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&t!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=w,i=x,n=s.canvasWidth,s.canvasHeight):(r={x:b.x*p,y:b.y*p},i=v*p,n=s.canvasWidth*p,s.canvasHeight*p);t.setTransform(1,0,0,1,0,0),"motionBlur"===e?E(t,0,0,n,a):o||void 0!==e&&!e||t.clearRect(0,0,n,a),l||(t.translate(r.x,r.y),t.scale(i,i)),h&&t.translate(h.x,h.y),c&&t.scale(c,c)}me(E,"mbclear"),me(C,"setContextTransform"),a||(s.textureDrawLastFrame=!1),a?(s.textureDrawLastFrame=!0,s.textureCache||(s.textureCache={},s.textureCache.bb=e.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER],(f=s.data.bufferContexts[s.TEXTURE_BUFFER]).setTransform(1,0,0,1,0,0),f.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:f,drawOnlyNodeLayer:!0,forcedPxRatio:i*s.textureMult}),(k=s.textureCache.viewport={zoom:e.zoom(),pan:e.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}),n[s.DRAG]=!1,n[s.NODE]=!1,_=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,_.setTransform(1,0,0,1,0,0),d?E(_,0,0,k.width,k.height):_.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(_,f[0],f[1],f[2],m),_.fillRect(0,0,k.width,k.height),v=e.zoom(),C(_,!1),_.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/i,k.height/k.zoom/i),_.drawImage(g,k.mpan.x,k.mpan.y,k.width/k.zoom/i,k.height/k.zoom/i)):s.textureOnViewport&&!o&&(s.textureCache=null);var _,S,f=e.extent(),m=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),g=s.hideEdgesOnViewport&&m;(m=[])[s.NODE]=!n[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,m[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),m[s.DRAG]=!n[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,m[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),(n[s.NODE]||l||r||m[s.NODE])&&(S=d&&!m[s.NODE]&&1!==p,C(_=o||(S?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!S?"motionBlur":void 0),g?s.drawCachedNodes(_,T.nondrag,i,f):s.drawLayeredElements(_,T.nondrag,i,f),s.debug&&s.drawDebugPoints(_,T.nondrag),l||d||(n[s.NODE]=!1)),!r&&(n[s.DRAG]||l||m[s.DRAG])&&(S=d&&!m[s.DRAG]&&1!==p,C(_=o||(S?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!S?"motionBlur":void 0),g?s.drawCachedNodes(_,T.drag,i,f):s.drawCachedElements(_,T.drag,i,f),s.debug&&s.drawDebugPoints(_,T.drag),l||d||(n[s.DRAG]=!1)),this.drawSelectionRectangle(t,C),d&&1!==p&&(r=u.contexts[s.NODE],S=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],i=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],f=me(function(t,e,r){t.setTransform(1,0,0,1,0,0),r||!y?t.clearRect(0,0,s.canvasWidth,s.canvasHeight):E(t,0,0,s.canvasWidth,s.canvasHeight),r=p,t.drawImage(e,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)},"drawMotionBlur"),(n[s.NODE]||m[s.NODE])&&(f(r,S,m[s.NODE]),n[s.NODE]=!1),n[s.DRAG]||m[s.DRAG])&&(f(g,i,m[s.DRAG]),n[s.DRAG]=!1),s.prevViewport=k,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),d&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!a,s.mbFrames=0,n[s.NODE]=!0,n[s.DRAG]=!0,s.redraw()},100)),o||e.emit("render")},drawSelectionRectangle:function(t,e){var r,i=this,n=i.cy,a=i.data,n=n.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=a.canvasNeedsRedraw;(i.showFps||!s&&l[i.SELECT_BOX]&&!o)&&(e(s=t.forcedContext||a.contexts[i.SELECT_BOX]),1==i.selection[4]&&(i.hoverData.selecting||i.touchData.selecting)&&(r=i.cy.zoom(),e=n.core("selection-box-border-width").value/r,s.lineWidth=e,s.fillStyle="rgba("+n.core("selection-box-color").value[0]+","+n.core("selection-box-color").value[1]+","+n.core("selection-box-color").value[2]+","+n.core("selection-box-opacity").value+")",s.fillRect(i.selection[0],i.selection[1],i.selection[2]-i.selection[0],i.selection[3]-i.selection[1]),0=e-1)return!1;(this.freePointer.x!==c&&this.enableWrapping?s:(o(),r))()}return this.keyToLocation.set(t,p),this.needsBuffer=!0,p},"draw")},{key:"getOffsets",value:me(function(t){return this.keyToLocation.get(t)},"getOffsets")},{key:"isEmpty",value:me(function(){return 0===this.freePointer.x&&0===this.freePointer.row},"isEmpty")},{key:"canFit",value:me(function(t){var e=this.atlasSize,r=this.rows,t=this.getScale(t).texW;return!(this.freePointer.x+t>e)||this.freePointer.rowe[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{mu(),th(),e(),An(),l3t=[],c3t=0,h3t={},u3t=me(()=>{l3t=[],c3t=0,h3t={}},"clear"),d3t=me(function(e){for(let t=l3t.length-1;0<=t;t--)if(l3t[t].level0{M.info("addNode",t,e,r,n);let i=D(),a=i.mindmap?.padding??yr.mindmap.padding;switch(n){case f3t.ROUNDED_RECT:case f3t.RECT:case f3t.HEXAGON:a*=2}if(e={id:c3t++,nodeId:Sc(e,i),level:t,descr:Sc(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??yr.mindmap.maxNodeWidth,padding:a},r=d3t(t))r.children.push(e);else if(0!==l3t.length)throw new Error('There can be only one root. No parent could be found for ("'+e.descr+'")');l3t.push(e)},"addNode"),f3t={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},m3t=me((t,e)=>{switch(M.debug("In get type",t,e),t){case"[":return f3t.RECT;case"(":return")"===e?f3t.ROUNDED_RECT:f3t.CLOUD;case"((":return f3t.CIRCLE;case")":return f3t.CLOUD;case"))":return f3t.BANG;case"{{":return f3t.HEXAGON;default:return f3t.DEFAULT}},"getType"),y3t=me((t,e)=>{h3t[t]=e},"setElementForId"),v3t=me(t=>{var e,r;t&&(e=D(),r=l3t[l3t.length-1],t.icon&&(r.icon=Sc(t.icon,e)),t.class)&&(r.class=Sc(t.class,e))},"decorateNode"),x3t=me(t=>{switch(t){case f3t.DEFAULT:return"no-border";case f3t.RECT:return"rect";case f3t.ROUNDED_RECT:return"rounded-rect";case f3t.CIRCLE:return"circle";case f3t.CLOUD:return"cloud";case f3t.BANG:return"bang";case f3t.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),b3t=me(()=>M,"getLogger"),w3t=me(t=>h3t[t],"getElementById"),k3t={clear:u3t,addNode:g3t,getMindmap:p3t,nodeType:f3t,getType:m3t,setElementForId:y3t,decorateNode:v3t,type2Str:x3t,getLogger:b3t,getElementById:w3t}});function _3t(t){return(_3t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function S3t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A3t(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[a++]}},"n"),e:me(function(t){throw t},"e"),f:e};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 U3t(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function q3t(t,e){return t(e={exports:{}},e.exports),e.exports}function j3t(t){for(var e=t.length;e--&&xTt.test(t.charAt(e)););return e}function W3t(t){return t&&t.slice(0,bTt(t)+1).replace(wTt,"")}function Y3t(t){var e=TTt.call(t,CTt),r=t[CTt];try{var n=!(t[CTt]=void 0)}catch{}var i=ETt.call(t);return n&&(e?t[CTt]=r:delete t[CTt]),i}function H3t(t){return STt.call(t)}function V3t(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(LTt&<t in Object(t)?_Tt:ATt)(t)}function X3t(t){return null!=t&&"object"==typeof t}function K3t(t){return"symbol"==typeof t||ITt(t)&&"[object Symbol]"==NTt(t)}function Z3t(t){if("number"==typeof t)return t;if(RTt(t))return MTt;if(fTt(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=fTt(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=kTt(t);var e=OTt.test(t);return e||PTt.test(t)?BTt(t.slice(2),e?2:8):DTt.test(t)?MTt:+t}function Q3t(n,r,t){var i,a,s,o,l,c,h=0,e=!1,u=!1,d=!0;if("function"!=typeof n)throw new TypeError("Expected a function");function p(t){var e=i,r=a;return i=a=void 0,h=t,o=n.apply(r,e)}function g(t){return h=t,l=setTimeout(y,r),e?p(t):o}function f(t){var e=r-(t-c);return u?zTt(e,s-(t-h)):e}function m(t){var e=t-c;return void 0===c||r<=e||e<0||u&&s<=t-h}function y(){var t=vTt();if(m(t))return v(t);l=setTimeout(y,f(t))}function v(t){return l=void 0,d&&i?p(t):(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(vTt())}function w(){var t=vTt(),e=m(t);if(i=arguments,a=this,c=t,e){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=FTt(r)||0,fTt(t)&&(e=!!t.leading,u="maxWait"in t,s=u?$Tt(FTt(t.maxWait)||0,r):s,d="trailing"in t?!!t.trailing:d),me(p,"invokeFunc"),me(g,"leadingEdge"),me(f,"remainingWait"),me(m,"shouldInvoke"),me(y,"timerExpired"),me(v,"trailingEdge"),me(x,"cancel"),me(b,"flush"),me(w,"debounced"),w.cancel=x,w.flush=b,w}function J3t(t,e,r,n,i,a){var s=Okt(t)?t:dEt[t]||dEt.euclidean;return 0===e&&Okt(t)?s(i,a):s(e,r,n,i,a)}function twt(t,e){var r;return!QEt(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!RTt(t))||tCt.test(t)||!JEt.test(t)||null!=e&&t in Object(e))}function ewt(t){return!!fTt(t)&&("[object Function]"==(t=NTt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function rwt(t){return!!nCt&&nCt in t}function nwt(t){if(null!=t){try{return aCt.call(t)}catch{}try{return t+""}catch{}}return""}function iwt(t){return!(!fTt(t)||iCt(t))&&(rCt(t)?lCt:oCt).test(sCt(t))}function awt(t,e){return t?.[e]}function swt(t,e){return t=hCt(t,e),cCt(t)?t:void 0}function owt(){this.__data__=dCt?dCt(null):{},this.size=0}function lwt(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function cwt(t){var e,r=this.__data__;return dCt?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:pCt.call(r,t)?r[t]:void 0}function hwt(t){var e=this.__data__;return dCt?void 0!==e[t]:gCt.call(e,t)}function uwt(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=dCt&&void 0===e?"__lodash_hash_undefined__":e,this}function dwt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e>0&255)/255,e[1]=(t>>8&255)/255,e[2]=(t>>16&255)/255,e[3]=(t>>24&255)/255,e}function j6t(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function W6t(e,t){var r=e.createTexture();return r.buffer=function(t){e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},r.deleteTexture=function(){e.deleteTexture(r)},r}function Y6t(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function H6t(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function V6t(t,e,r,n,i,a){switch(e){case t.FLOAT:return new Float32Array(r.buffer,a*n,i);case t.INT:return new Int32Array(r.buffer,a*n,i)}}function X6t(t,e,r,n){var i=(e=I3t(Y6t(t,e),2))[0],n=H6t(t,e=e[1],n),a=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,n,t.STATIC_DRAW),e===t.FLOAT?t.vertexAttribPointer(r,i,e,!1,0,0):e===t.INT&&t.vertexAttribIPointer(r,i,e,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),a}function K6t(e,t,r,n){var i=(r=I3t(Y6t(e,r),3))[0],a=r[1],r=r[2],s=H6t(e,a,t*i),o=i*r,l=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferData(e.ARRAY_BUFFER,t*o,e.DYNAMIC_DRAW),e.enableVertexAttribArray(n),a===e.FLOAT?e.vertexAttribPointer(n,i,a,!1,o,0):a===e.INT&&e.vertexAttribIPointer(n,i,a,o,0),e.vertexAttribDivisor(n,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var c=new Array(t),h=0;h{function n(t){if(S3t(this,n),this._obj=Object.create(null),this.size=0,null!=t)for(var e=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t,r=0;r{if(Skt){if(Skt.requestAnimationFrame)return function(t){Skt.requestAnimationFrame(t)};if(Skt.mozRequestAnimationFrame)return function(t){Skt.mozRequestAnimationFrame(t)};if(Skt.webkitRequestAnimationFrame)return function(t){Skt.webkitRequestAnimationFrame(t)};if(Skt.msRequestAnimationFrame)return function(t){Skt.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(qTt())},1e3/60)}})(),WTt=me(function(t){return jTt(t)},"requestAnimationFrame"),YTt=qTt,HTt=me(function(t){for(var e,r=1>1])<0;)t[r]=a,r=s;return t[r]=i},"_siftdown"),u=me(function(t,e,r){var n,i,a,s,o;for(null==r&&(r=d),i=t.length,a=t[o=e],n=2*e+1;ny&&(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=t.x1&&t.y2>=t.y1?{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1}:null!=t.w&&null!=t.h&&0<=t.w&&0<=t.h?{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}:void 0:void 0},"makeBoundingBox"),n8t=me(function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},"copyBoundingBox"),i8t=me(function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},"clearBoundingBox"),a8t=me(function(t,e,r){return{x1:t.x1+e,x2:t.x2+e,y1:t.y1+r,y2:t.y2+r,w:t.w,h:t.h}},"shiftBoundingBox"),s8t=me(function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},"updateBoundingBox"),o8t=me(function(t,e,r){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r),t.y2=Math.max(t.y2,r),t.h=t.y2-t.y1},"expandBoundingBoxByPoint"),l8t=me(function(t){var e=1e.x2||e.x1>t.x2||t.x2e.y2||e.y1>t.y2)},"boundingBoxesIntersect"),d8t=me(function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},"inBoundingBox"),p8t=me(function(t,e){return d8t(t,e.x,e.y)},"pointInBoundingBox"),g8t=me(function(t,e){return d8t(t,e.x1,e.y1)&&d8t(t,e.x2,e.y2)},"boundingBoxInBoundingBox"),f8t=me(function(t,e,r,n,i,a,s){var o,l="auto"===(l=7=u&&c[1]<=o||0<(c=L8t(t,e,r,n,h=r+i-l,u=n+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=L8t(t,e,r,n,o=r-i+l,h=n+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),m8t=me(function(t,e,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<=t&&t<=r+s&&i-s<=e&&e<=n+s},"inLineVicinity"),y8t=me(function(t,e,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!(to&&(o=e[s][c],l=c);i[l].push(t[s])}for(var h=0;h=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var p=e[s],g=e[n[s]],f="dendrogram"===i.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key};t[p.index]=f,t.splice(g.index,1),e[p.key]=f;for(var m=0;mr[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]s&&(s=e[i*t+(a=l)])}0=e.minIterations-1||v==e.maxIterations-1)){for(var q=0,R=0;R{var t=o[e];null!=t&&null!=t.then?t.then(function(t){s(e,t)},function(t){n(t)}):s(e,t)})(t)})},jEt.resolve=function(r){return new jEt(function(t,e){t(r)})},jEt.reject=function(r){return new jEt(function(t,e){e(r)})},KEt=typeof Promise<"u"?Promise:jEt,ZEt=me(function(t,e,r){var n=jkt(t),i=!n;(e=this._private=sTt({duration:1e3},e,r)).target=t,e.style=e.style||e.css,e.started=!1,e.playing=!1,e.hooked=!1,e.applying=!1,e.progress=0,e.completes=[],e.frames=[],e.complete&&Okt(e.complete)&&e.completes.push(e.complete),i&&(r=t.position(),e.startPosition=e.startPosition||{x:r.x,y:r.y},e.startStyle=e.startStyle||t.cy().style().getAnimationStartStyle(t,e.style)),n&&(i=t.pan(),e.startPan={x:i.x,y:i.y},e.startZoom=t.zoom()),this.length=1,this[0]=this},"Animation"),t9t=ZEt.prototype,sTt(t9t,{instanceString:me(function(){return"animation"},"instanceString"),hook:me(function(){var t,e=this._private;return e.hooked||(t=e.target._private.animation,(e.queue?t.queue:t.current).push(this),Gkt(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0),this},"hook"),play:me(function(){var t=this._private;return 1===t.progress&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},"play"),playing:me(function(){return this._private.playing},"playing"),apply:me(function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},"apply"),applying:me(function(){return this._private.applying},"applying"),pause:me(function(){var t=this._private;return t.playing=!1,t.started=!1,this},"pause"),stop:me(function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},"stop"),rewind:me(function(){return this.progress(0)},"rewind"),fastforward:me(function(){return this.progress(1)},"fastforward"),time:me(function(t){var e=this._private;return void 0===t?e.progress*e.duration:this.progress(t/e.duration)},"time"),progress:me(function(t){var e=this._private,r=e.playing;return void 0===t?e.progress:(r&&this.pause(),e.progress=t,e.started=!1,r&&this.play(),this)},"progress"),completed:me(function(){return 1===this._private.progress},"completed"),reverse:me(function(){var n=this._private,t=n.playing,e=(t&&this.pause(),n.progress=1-n.progress,n.started=!1,me(function(t,e){var r=n[t];null!=r&&(n[t]=n[e],n[e]=r)},"swap"));if(e("zoom","startZoom"),e("pan","startPan"),e("position","startPosition"),n.style)for(var r=0;r{try{var t=uCt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),FCt=kAt,me(Fwt,"baseAssignValue"),$Ct=Fwt,jAt=Object.prototype,zCt=jAt.hasOwnProperty,me($wt,"assignValue"),GCt=$wt,UCt=/^(?:0|[1-9]\d*)$/,me(zwt,"isIndex"),qCt=zwt,me(Gwt,"baseSet"),jCt=Gwt,me(Uwt,"set"),WCt=Uwt,me(qwt,"copyArray"),YCt=qwt,me(jwt,"toPath"),HCt=jwt,n9t={data:me(function(b){var t={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:me(function(t){},"beforeGet"),beforeSet:me(function(t,e){},"beforeSet"),onSet:me(function(t){},"onSet"),canSet:me(function(t){return!0},"canSet")};return b=sTt({},t,b),me(function(t,e){var r,n=b,i=this,a=void 0!==i.length,s=a?i:[i],o=a?i[0]:i;if(Dkt(t)){var l,c=-1!==t.indexOf(".")&&HCt(t);if(n.allowGetting&&void 0===e)return o&&(n.beforeGet(o),l=c&&void 0===o._private[n.field][t]?BCt(o._private[n.field],c):o._private[n.field][t]),l;if(n.allowSetting&&void 0!==e&&!n.immutableKeys[t]){a=N3t({},t,e),n.beforeSet(i,a);for(var h=0,u=s.length;h\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:nTt,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+XCt.metaChar+"))+",XCt.className="(?:[\\w-]|(?:\\\\"+XCt.metaChar+"))+",XCt.value=XCt.string+"|"+XCt.number,XCt.id=XCt.variable;for(var e,r=XCt.comparatorOp.split("|"),i=0;i{for(var t,e={},r=0;r")+h(t.child,e);case V.ANCESTOR:case V.DESCENDANT:return h(t.ancestor,e)+" "+h(t.descendant,e);case V.COMPOUND_SPLIT:var a=h(t.left,e),i=h(t.subject,e),s=h(t.right,e);return a+(0":u=!0,n=r=":u=!0,n=r<=t;break;case"<":u=!0,n=ta.length?e.substr(a.length):""}function n(){c=c.length>u.length?c.substr(u.length):""}for(e=e.replace(/[/][*](\s|.)+?[*][/]/g,""),me(r,"removeSelAndBlockFromRemaining"),me(n,"removePropAndValFromRem");!e.match(/^\s*$/);){var i=e.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!i){p7t("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+e);break}var a=i[0],s=i[1];if("core"!==s&&new d_t(s).invalid)p7t("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*$)/))){p7t("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}):p7t("Skipping property: Invalid property definition in: "+u):p7t("Skipping property: Invalid property name in: "+u),n()}if(l){r();break}this.selector(s);for(var g=0;gl.max||l.strictMax&&r===l.max)?null:(s={name:e,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:W7t(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;Ethis._private.maxZoom?this._private.maxZoom:e)=n.minZoom&&(n.maxZoom=e),this},"zoomRange"),minZoom:me(function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},"minZoom"),maxZoom:me(function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},"maxZoom"),getZoomedViewport:me(function(t){var e,r,n=this._private,i=n.pan,a=n.zoom,s=!n.zoomingEnabled;return at(t)?r=t:Bkt(t)&&(r=t.level,null!=t.position?e=F7t(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null!=e)&&!n.panningEnabled&&(s=!0),r=(r=r>n.maxZoom?n.maxZoom:r)e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=r,i.push("zoom"))),!n||a&&t.cancelOnFailedZoom||!e.panningEnabled||(r=t.pan,at(r.x)&&(e.pan.x=r.x,s=!1),at(r.y)&&(e.pan.y=r.y,s=!1),s)||i.push("pan"),0=r.numIter||(kSt(i,r),i.temperature=i.temperature*r.coolingFactor,i.temperature=r.animationThreshold&&s(),WTt(t)):(DSt(i,r),l())},"frame")();else{for(;h;)h=o(c),c++;DSt(i,r),l()}return this},w6t.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},w6t.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},mSt=me(function(t,e,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=r8t(r.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),s={isCompound:t.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;cn.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(null==n.minX||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(null==n.minY||e.minY-n.padTop(e=w8t(y,v,h[u],h[u+1],h[u+2],h[u+3])))return E(t,e),!0}else if("bezier"===n.edgeType||"multibezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType)for(h=n.allpts,u=0;u+5(e=b8t(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return E(t,e),!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;uMath.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=V7t(h=i?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0=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,e=a.x2,r.segpts=[x,h,e,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)<=e/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=t.pstyle("taxi-radius").value,g="arc-radius"===t.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(t,e){var r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k,T,E=t._private.rscratch;"bezier"===E.edgeType&&(m=e.srcPos,r=e.tgtPos,n=e.srcW,i=e.srcH,a=e.tgtW,s=e.tgtH,T=e.srcShape,o=e.tgtShape,v=e.srcCornerRadius,l=e.tgtCornerRadius,x=e.srcRs,e=e.tgtRs,y=!at(E.startX)||!at(E.startY),f=!at(E.arrowStartX)||!at(E.arrowStartY),c=!at(E.endX)||!at(E.endY),h=!at(E.arrowEndX)||!at(E.arrowEndY),u=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=X7t({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))i.poolIndex()&&(t=n,n=i,i=t),e.srcPos=n.position()),s=e.tgtPos=i.position(),o=e.srcW=n.outerWidth(),l=e.srcH=n.outerHeight(),c=e.tgtW=i.outerWidth(),h=e.tgtH=i.outerHeight(),u=e.srcShape=D.nodeShapes[M.getNodeShape(n)],d=e.tgtShape=D.nodeShapes[M.getNodeShape(i)],p=e.srcCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,g=e.tgtCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,f=e.tgtRs=i._private.rscratch,m=e.srcRs=n._private.rscratch;e.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y=N.desktopTapThreshold2),v(t)),o=(e&&(N.hoverData.tapholdCancelled=!0),me(function(){var t=N.hoverData.dragDelta=N.hoverData.dragDelta||[];0===t.length?(t.push(f[0]),t.push(f[1])):(t[0]+=f[0],t[1]+=f[1])},"updateDragDelta")),y=(i=!0,I(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),me(function(){N.data.bgActivePosistion=void 0,N.hoverData.selecting||a.emit({originalEvent:t,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?e&&(r={originalEvent:t,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:t,type:"cxtdragout",position:{x:l[0],y:l[1]}}),N.hoverData.cxtOver=d)&&d.emit({originalEvent:t,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(t.clientX,t.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"],t,{x:l[0],y:l[1]}),d&&I(d,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),N.hoverData.last=d),g&&(e?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},at(f[0])&&at(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((n=N.hoverData.dragDelta)&&at(n[0])&&at(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):e&&(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=z7t(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 t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},"mousemoveHandler"),!1),N.registerBinding(t,"mouseup",me(function(t){var e,r,n,i,a,s,o,l;1===N.hoverData.which&&1!==t.which&&N.hoverData.capture||N.hoverData.capture&&(N.hoverData.capture=!1,e=N.cy,r=N.projectIntoViewport(t.clientX,t.clientY),n=N.selection,o=N.findNearestElement(r[0],r[1],!0,!1),i=N.dragData.possibleDragElements,a=N.hoverData.down,l=v(t),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:t,type:"cxttapend",position:{x:r[0],y:r[1]}},(a||e).emit(s),N.hoverData.cxtDragged||(s={originalEvent:t,type:"cxttap",position:{x:r[0],y:r[1]}},(a||e).emit(s)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(o,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(I(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),h=!1,t.timeStamp-u<=e.multiClickDebounceTime()?(c&&clearTimeout(c),h=!0,u=null,I(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(c=setTimeout(function(){h||I(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),u=t.timeStamp)),null!=a||N.dragData.didDrag||N.hoverData.selecting||N.hoverData.dragged||v(t)||(e.$(d).unselect(["tapunselect"]),0=N.touchTapThreshold2}if(e&&N.touchData.cxt&&(t.preventDefault(),x=t.touches[0].clientX-q,b=t.touches[0].clientY-j,w=t.touches[1].clientX-q,k=t.touches[1].clientY-j,2.25<=(o=it(x,b,w,k))/G||22500<=o)&&(N.touchData.cxt=!1,N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),p={originalEvent:t,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)),e&&N.touchData.cxt){var p={originalEvent:t,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:t,type:"cxtdragout",position:{x:i[0],y:i[1]}}),N.touchData.cxtOver=g)&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:i[0],y:i[1]}})}else if(e&&t.touches[2]&&n.boxSelectionEnabled())t.preventDefault(),N.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,N.touchData.selecting||n.emit({originalEvent:t,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(e&&t.touches[1]&&!N.touchData.didSelect&&n.zoomingEnabled()&&n.panningEnabled()&&n.userZoomingEnabled()&&n.userPanningEnabled()){if(t.preventDefault(),N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),T=N.dragData.touchDragEles){N.redrawHint("drag",!0);for(var f=0;f=f.deqFastCost*(1e3/60-(t?n:0)))break}else if(t){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=.2*t.width&&this.retireTexture(t)},n9t.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);.8=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,k7t(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),w7t(n,a),r.push(a),a}},n9t.queueElement=function(t,e){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(t),a=n[i];a?(a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,r.updateItem(a)):(a={eles:t.spawn().merge(t),level:e,reqs:1,key:i},r.push(a),n[i]=a)},n9t.dequeue=function(t){for(var e=this.getElementQueue(),r=this.getElementKeyToQueue(),n=[],i=this.lookup,a=0;a<1&&0=f||!g8t(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;l||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,t),g.eles.push(v),x[a]=g}}return l||(m?null:u)},J.getEleLevelForLayerLevel=function(t,e){return t},J.drawEleInLayer=function(t,e,r,n){var i=this.renderer,t=t.context,a=e.boundingBox();0!==a.w&&0!==a.h&&e.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(t,!1),i.drawCachedElement(t,e,null,null,r,!0),i.setImgSmoothing(t,!0))},J.levelIsComplete=function(t,e){var r=this.layersByLevel[t];if(!r||0===r.length)return!1;for(var n=0,i=0;is.minMbLowQualFrames)&&(s.motionBlurPxRatio=s.mbPxRBlurry),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!a&&(i[s.NODE]=!0,i[s.SELECT_BOX]=!0),e.style()),v=e.zoom(),x=void 0!==c?c:v,b=e.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(t,e,r,n,i){var a=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",s.colorFillStyle(t,255,255,255,s.motionBlurTransparency),t.fillRect(e,r,n,i),t.globalCompositeOperation=a}function C(t,e){var r,n,i,a=s.clearingMotionBlur||t!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&t!==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);t.setTransform(1,0,0,1,0,0),"motionBlur"===e?E(t,0,0,i,a):o||void 0!==e&&!e||t.clearRect(0,0,i,a),l||(t.translate(r.x,r.y),t.scale(n,n)),h&&t.translate(h.x,h.y),c&&t.scale(c,c)}me(E,"mbclear"),me(C,"setContextTransform"),a||(s.textureDrawLastFrame=!1),a?(s.textureDrawLastFrame=!0,s.textureCache||(s.textureCache={},s.textureCache.bb=e.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:e.zoom(),pan:e.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,_=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,_.setTransform(1,0,0,1,0,0),d?E(_,0,0,k.width,k.height):_.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(_,f[0],f[1],f[2],m),_.fillRect(0,0,k.width,k.height),v=e.zoom(),C(_,!1),_.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n),_.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=e.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])&&(S=d&&!m[s.NODE]&&1!==p,C(_=o||(S?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!S?"motionBlur":void 0),g?s.drawCachedNodes(_,T.nondrag,n,f):s.drawLayeredElements(_,T.nondrag,n,f),s.debug&&s.drawDebugPoints(_,T.nondrag),l||d||(i[s.NODE]=!1)),!r&&(i[s.DRAG]||l||m[s.DRAG])&&(S=d&&!m[s.DRAG]&&1!==p,C(_=o||(S?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!S?"motionBlur":void 0),g?s.drawCachedNodes(_,T.drag,n,f):s.drawCachedElements(_,T.drag,n,f),s.debug&&s.drawDebugPoints(_,T.drag),l||d||(i[s.DRAG]=!1)),this.drawSelectionRectangle(t,C),d&&1!==p&&(r=u.contexts[s.NODE],S=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],n=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],f=me(function(t,e,r){t.setTransform(1,0,0,1,0,0),r||!y?t.clearRect(0,0,s.canvasWidth,s.canvasHeight):E(t,0,0,s.canvasWidth,s.canvasHeight),r=p,t.drawImage(e,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)},"drawMotionBlur"),(i[s.NODE]||m[s.NODE])&&(f(r,S,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||e.emit("render")},drawSelectionRectangle:function(t,e){var r,n=this,i=n.cy,a=n.data,i=i.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=a.canvasNeedsRedraw;(n.showFps||!s&&l[n.SELECT_BOX]&&!o)&&(e(s=t.forcedContext||a.contexts[n.SELECT_BOX]),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)&&(r=n.cy.zoom(),e=i.core("selection-box-border-width").value/r,s.lineWidth=e,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=e-1)return!1;(this.freePointer.x!==c&&this.enableWrapping?s:(o(),r))()}return this.keyToLocation.set(t,p),this.needsBuffer=!0,p},"draw")},{key:"getOffsets",value:me(function(t){return this.keyToLocation.get(t)},"getOffsets")},{key:"isEmpty",value:me(function(){return 0===this.freePointer.x&&0===this.freePointer.row},"isEmpty")},{key:"canFit",value:me(function(t){var e=this.atlasSize,r=this.rows,t=this.getScale(t).texW;return!(this.freePointer.x+t>e)||this.freePointer.row=this.maxInstances&&this.endBatch()}},"drawTexture")},{key:"drawEdgeArrow",value:me(function(t,e,r){var i,n,a,s,o=t._private.rscratch,o="source"===r?(n=o.arrowStartX,a=o.arrowStartY,o.srcArrowAngle):(n=o.arrowEndX,a=o.arrowEndY,o.tgtArrowAngle);isNaN(n)||null==n||isNaN(a)||null==a||isNaN(o)||null==o||"none"!==t.pstyle(r+"-arrow-shape").value&&(r=t.pstyle(r+"-arrow-color").value,i=t.pstyle("opacity").value*t.pstyle("line-opacity").value,s=t.pstyle("width").pfValue,t=t.pstyle("arrow-scale").value,s=this.r.getArrowWidth(s,t),ekt(t=this.getTempMatrix()),ikt(t,t,[n,a]),akt(t,t,[s,s]),nkt(t,t,o),n=this.instanceCount,this.vertTypeBuffer.getView(n)[0]=3,Wwt(e,this.indexBuffer.getView(n)),jwt(r,i,this.edgeColorBuffer.getView(n)),(a=this.scaleRotate1Buffer.getView(n))[0]=t[0],a[1]=t[1],a[2]=t[3],a[3]=t[4],(s=this.translate1Buffer.getView(n))[0]=t[6],s[1]=t[7],this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch()},"drawEdgeArrow")},{key:"drawEdgeLine",value:me(function(t,e){var r=t.pstyle("opacity").value,i=t.pstyle("line-opacity").value,n=t.pstyle("width").pfValue,a=t.pstyle("line-color").value,s=r*i,o=this.getEdgePoints(t);if(o.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==o.length)r=this.instanceCount,this.vertTypeBuffer.getView(r)[0]=1,Wwt(e,this.indexBuffer.getView(r)),jwt(a,s,this.edgeColorBuffer.getView(r)),this.lineWidthBuffer.getView(r)[0]=n,(i=this.pointAPointBBuffer.getView(r))[0]=o[0],i[1]=o[1],i[2]=o[2],i[3]=o[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();else for(var l=0;l=this.maxInstances&&this.endBatch()}},"drawEdgeLine")},{key:"getEdgePoints",value:me(function(t){var e=t._private.rscratch.allpts;return 4==e.length?e:(t=this.getNumSegments(t),this.getCurveSegmentPoints(e,t))},"getEdgePoints")},{key:"getNumSegments",value:me(function(t){return Math.min(Math.max(15,5),this.maxInstances)},"getNumSegments")},{key:"getCurveSegmentPoints",value:me(function(t,e){if(4==t.length)return t;for(var r=Array(2*(e+1)),i=0;i<=e;i++)0==i?(r[0]=t[0],r[1]=t[1]):i==e?(r[2*i]=t[t.length-2],r[2*i+1]=t[t.length-1]):this.setCurvePoint(t,i/e,r,2*i);return r},"getCurveSegmentPoints")},{key:"setCurvePoint",value:me(function(t,e,r,i){if(!(t.length<=2)){for(var n=Array(t.length-2),a=0;a{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function i(){}me(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_HALF_SIZE=(i.SIMPLE_NODE_SIZE=40)/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.INITIAL_WORLD_BOUNDARY=(i.WORLD_BOUNDARY=1e6)/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,t.exports=i},function(t,e,r){var i,n=r(2),a=r(8),s=r(9);function o(t,e,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(i in me(o,"LEdge"),o.prototype=Object.create(n.prototype),n)o[i]=n[i];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),i=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==i)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[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)},t.exports=o},function(t,e,r){function i(t){this.vGraphObject=t}me(i,"LGraphObject"),t.exports=i},function(t,e,r){var i,n=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(t,e,r,i){n.call(this,i=null==r&&null==i?e:i),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=i,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(i in me(h,"LNode"),h.prototype=Object.create(n.prototype),n)h[i]=n[i];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},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(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],i=this;return i.edges.forEach(function(t){if(t.target==e){if(t.source!=i)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],i=this;return i.edges.forEach(function(t){if(t.source!=i&&t.target!=i)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;rt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>e)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-e)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-e),this.setHeight(this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);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()},t.exports=h},function(t,e,r){function i(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}me(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(t){this.x=t},i.prototype.setY=function(t){this.y=t},i.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=i},function(t,e,r){var i,n=r(2),d=r(10),a=r(0),s=r(6),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(t,e,r){n.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(i in me(u,"LGraph"),u.prototype=Object.create(n.prototype),n)u[i]=n[i];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,r){if(null==e&&null==r){var i=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,n.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function i(t){c=r(5),this.layout=t,this.graphs=[],this.edges=[]}me(i,"LGraphManager"),i.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},i.prototype.add=function(t,e,r,i,n){if(null==r&&null==i&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-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 t,e=this.getAllEdges(),r=0;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e(d9t()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(d9t()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return n=[function(t,e){t.exports=r},function(t,e,r){var i,n=r(0).FDLayoutConstants;function a(){}for(i in me(a,"CoSEConstants"),n)a[i]=n[i];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=a},function(t,e,r){var i,n=r(0).FDLayoutEdge;function a(t,e,r){n.call(this,t,e,r)}for(i in me(a,"CoSEEdge"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},function(t,e,r){var i,n=r(0).LGraph;function a(t,e,r){n.call(this,t,e,r)}for(i in me(a,"CoSEGraph"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},function(t,e,r){var i,n=r(0).LGraphManager;function a(t){n.call(this,t)}for(i in me(a,"CoSEGraphManager"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},function(t,e,r){var i,n=r(0).FDLayoutNode,a=r(0).IMath;function s(t,e,r,i){n.call(this,t,e,r,i)}for(i in me(s,"CoSENode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.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),t.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(t,e){for(var r,i=this.getChild().getNodes(),n=0;ni&&(i=Math.floor(s.y)),a=Math.floor(s.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},x.radialLayout=function(t,e,r){var i=Math.max(this.maxDiagonalInTree(t),u.DEFAULT_RADIAL_SEPARATION),e=(x.branchRadialLayout(e,null,0,359,0,i),l.calculateBounds(t)),n=new c;n.setDeviceOrgX(e.getMinX()),n.setDeviceOrgY(e.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;al&&(l=h.rect.height)}r+=l+t.verticalPadding}},x.prototype.tileCompoundMembers=function(r,i){var n=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(t){var e=i[t];n.tiledMemberPack[t]=n.tileNodes(r[t],e.paddingLeft+e.paddingRight),e.rect.width=n.tiledMemberPack[t].width,e.rect.height=n.tiledMemberPack[t].height})},x.prototype.tileNodes=function(t,e){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.heightt.rowHeight[r]&&(n=t.rowHeight[r],t.rowHeight[r]=i,n=t.rowHeight[r]-n),t.height+=n,t.rows[r].push(e)},x.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,i=0;ir&&(e=i,r=t.rowWidth[i]);return e},x.prototype.canAddHorizontal=function(t,e,r){var i,n,a=this.getShortestRowIndex(t);return a<0||(n=t.rowWidth[a])+t.horizontalPadding+e<=t.width||(i=0,t.rowHeight[a]a&&e!=r){i.splice(-1,1),t.rows[r].push(n),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=i[o].height);0{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e(p9t()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeCoseBilkent=e(p9t()):t.cytoscapeCoseBilkent=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return n=[function(t,e){t.exports=r},function(t,e,r){var i=r(0).layoutBase.LayoutConstants,n=r(0).layoutBase.FDLayoutConstants,a=r(0).CoSEConstants,g=r(0).CoSELayout,u=r(0).CoSENode,d=r(0).layoutBase.PointD,p=r(0).layoutBase.DimensionD,s={ready:me(function(){},"ready"),stop:me(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(t,e){var r,i={};for(r in t)i[r]=t[r];for(r in e)i[r]=e[r];return i}function l(t){this.options=o(s,t),c(this.options)}me(o,"extend"),me(l,"_CoSELayout");var c=me(function(t){null!=t.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=n.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=n.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(a.MAX_ITERATIONS=n.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?i.QUALITY=0:"proof"==t.quality?i.QUALITY=2:i.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!t.randomize,a.ANIMATE=n.ANIMATE=i.ANIMATE=t.animate,a.TILE=t.tile,a.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal},"getUserOptions"),r=(l.prototype.run=function(){var s,o,l=this.options,c=(this.idToLNode={},this.layout=new g),h=this,t=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.newGraphManager()),e=(this.gm=t,this.options.eles.nodes()),r=this.options.eles.edges();this.root=t.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(e),c);for(var i=0;i{W9(),KE(),m9t=me(function(t,e,r,i){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.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`),e.append("line").attr("class","node-line-"+i).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),y9t=me(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),v9t=me(function(t,e,r){var i=r.width,n=r.height,a=.15*i,s=.25*i,o=.35*i,l=.2*i;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*i},${-1*i*.1} - a${o},${o} 1 0,1 ${.4*i},${-1*i*.1} - a${s},${s} 1 0,1 ${.35*i},${.2*+i} + `));i.aPosition=e.getAttribLocation(i,"aPosition"),i.aIndex=e.getAttribLocation(i,"aIndex"),i.aVertType=e.getAttribLocation(i,"aVertType"),i.aAtlasId=e.getAttribLocation(i,"aAtlasId"),i.aTex1=e.getAttribLocation(i,"aTex1"),i.aTex2=e.getAttribLocation(i,"aTex2"),i.aScaleRotate1=e.getAttribLocation(i,"aScaleRotate1"),i.aTranslate1=e.getAttribLocation(i,"aTranslate1"),i.aScaleRotate2=e.getAttribLocation(i,"aScaleRotate2"),i.aTranslate2=e.getAttribLocation(i,"aTranslate2"),i.aPointAPointB=e.getAttribLocation(i,"aPointAPointB"),i.aPointCPointD=e.getAttribLocation(i,"aPointCPointD"),i.aLineWidth=e.getAttribLocation(i,"aLineWidth"),i.aEdgeColor=e.getAttribLocation(i,"aEdgeColor"),i.uPanZoomMatrix=e.getUniformLocation(i,"uPanZoomMatrix"),i.uAtlasSize=e.getUniformLocation(i,"uAtlasSize"),i.uBGColor=e.getUniformLocation(i,"uBGColor"),i.uTextures=[];for(var a=0;a=this.maxInstances&&this.endBatch()}},"drawTexture")},{key:"drawEdgeArrow",value:me(function(t,e,r){var n,i,a,s,o=t._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"!==t.pstyle(r+"-arrow-shape").value&&(r=t.pstyle(r+"-arrow-color").value,n=t.pstyle("opacity").value*t.pstyle("line-opacity").value,s=t.pstyle("width").pfValue,t=t.pstyle("arrow-scale").value,s=this.r.getArrowWidth(s,t),J6t(t=this.getTempMatrix()),ekt(t,t,[i,a]),nkt(t,t,[s,s]),rkt(t,t,o),i=this.instanceCount,this.vertTypeBuffer.getView(i)[0]=3,q6t(e,this.indexBuffer.getView(i)),U6t(r,n,this.edgeColorBuffer.getView(i)),(a=this.scaleRotate1Buffer.getView(i))[0]=t[0],a[1]=t[1],a[2]=t[3],a[3]=t[4],(s=this.translate1Buffer.getView(i))[0]=t[6],s[1]=t[7],this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch()},"drawEdgeArrow")},{key:"drawEdgeLine",value:me(function(t,e){var r=t.pstyle("opacity").value,n=t.pstyle("line-opacity").value,i=t.pstyle("width").pfValue,a=t.pstyle("line-color").value,s=r*n,o=this.getEdgePoints(t);if(o.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==o.length)r=this.instanceCount,this.vertTypeBuffer.getView(r)[0]=1,q6t(e,this.indexBuffer.getView(r)),U6t(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=this.maxInstances&&this.endBatch()}},"drawEdgeLine")},{key:"getEdgePoints",value:me(function(t){var e=t._private.rscratch.allpts;return 4==e.length?e:(t=this.getNumSegments(t),this.getCurveSegmentPoints(e,t))},"getEdgePoints")},{key:"getNumSegments",value:me(function(t){return Math.min(Math.max(15,5),this.maxInstances)},"getNumSegments")},{key:"getCurveSegmentPoints",value:me(function(t,e){if(4==t.length)return t;for(var r=Array(2*(e+1)),n=0;n<=e;n++)0==n?(r[0]=t[0],r[1]=t[1]):n==e?(r[2*n]=t[t.length-2],r[2*n+1]=t[t.length-1]):this.setCurvePoint(t,n/e,r,2*n);return r},"getCurveSegmentPoints")},{key:"setCurvePoint",value:me(function(t,e,r,n){if(!(t.length<=2)){for(var i=Array(t.length-2),a=0;a{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}me(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,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),s=r(9);function o(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in me(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(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[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)},t.exports=o},function(t,e,r){function n(t){this.vGraphObject=t}me(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(n in me(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(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},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(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.target==e){if(t.source!=n)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.source!=n&&t.target!=n)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;rt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>e)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-e)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-e),this.setHeight(this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);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()},t.exports=h},function(t,e,r){function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}me(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,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(t,e,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=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in me(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(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,i.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function n(t){c=r(5),this.layout=t,this.graphs=[],this.edges=[]}me(n,"LGraphManager"),n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},n.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-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 t,e=this.getAllEdges(),r=0;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(h9t()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(h9t()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(t,e){t.exports=r},function(t,e,r){var n,i=r(0).FDLayoutConstants;function a(){}for(n in me(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,t.exports=a},function(t,e,r){var n,i=r(0).FDLayoutEdge;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).LGraph;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).LGraphManager;function a(t){i.call(this,t)}for(n in me(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).FDLayoutNode,a=r(0).IMath;function s(t,e,r,n){i.call(this,t,e,r,n)}for(n in me(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.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),t.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(t,e){for(var r,n=this.getChild().getNodes(),i=0;in&&(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(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),u.DEFAULT_RADIAL_SEPARATION),e=(x.branchRadialLayout(e,null,0,359,0,n),l.calculateBounds(t)),i=new c;i.setDeviceOrgX(e.getMinX()),i.setDeviceOrgY(e.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;al&&(l=h.rect.height)}r+=l+t.verticalPadding}},x.prototype.tileCompoundMembers=function(r,n){var i=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(t){var e=n[t];i.tiledMemberPack[t]=i.tileNodes(r[t],e.paddingLeft+e.paddingRight),e.rect.width=i.tiledMemberPack[t].width,e.rect.height=i.tiledMemberPack[t].height})},x.prototype.tileNodes=function(t,e){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.heightt.rowHeight[r]&&(i=t.rowHeight[r],t.rowHeight[r]=n,i=t.rowHeight[r]-i),t.height+=i,t.rows[r].push(e)},x.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;nr&&(e=n,r=t.rowWidth[n]);return e},x.prototype.canAddHorizontal=function(t,e,r){var n,i,a=this.getShortestRowIndex(t);return a<0||(i=t.rowWidth[a])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[a]a&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=n[o].height);0{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(u9t()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeCoseBilkent=e(u9t()):t.cytoscapeCoseBilkent=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(t,e){t.exports=r},function(t,e,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:me(function(){},"ready"),stop:me(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(t,e){var r,n={};for(r in t)n[r]=t[r];for(r in e)n[r]=e[r];return n}function l(t){this.options=o(s,t),c(this.options)}me(o,"extend"),me(l,"_CoSELayout");var c=me(function(t){null!=t.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?n.QUALITY=0:"proof"==t.quality?n.QUALITY=2:n.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!t.randomize,a.ANIMATE=i.ANIMATE=n.ANIMATE=t.animate,a.TILE=t.tile,a.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal},"getUserOptions"),r=(l.prototype.run=function(){var s,o,l=this.options,c=(this.idToLNode={},this.layout=new g),h=this,t=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.newGraphManager()),e=(this.gm=t,this.options.eles.nodes()),r=this.options.eles.edges();this.root=t.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(e),c);for(var n=0;n{Y9(),ZE(),g9t=me(function(t,e,r,n){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.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`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),f9t=me(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),m9t=me(function(t,e,r){var n=r.width,i=r.height,a=.15*n,s=.25*n,o=.35*n,l=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.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*i},${.35*+n} - a${l},${l} 1 0,1 ${-1*i*.15},${.65*+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*i*.25},${.15*i} - a${o},${o} 1 0,1 ${-1*i*.5},0 - a${a},${a} 1 0,1 ${-1*i*.25},${-1*i*.15} + 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*i*.1},${-1*n*.35} - a${l},${l} 1 0,1 ${.1*i},${-1*n*.65} + 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"),x9t=me(function(t,e,r){var i=r.width,n=r.height,a=.15*i;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*i},${-1*n*.1} - a${a},${a} 1 0,0 ${.25*i},0 - a${a},${a} 1 0,0 ${.25*i},0 - a${a},${a} 1 0,0 ${.25*i},${.1*+n} + H0 V0 Z`)},"cloudBkg"),y9t=me(function(t,e,r){var n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.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*i},${.33*+n} - a${.8*a},${.8*a} 1 0,0 0,${.34*+n} - a${a},${a} 1 0,0 ${-1*i*.15},${.33*+n} + 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*i*.25},${.15*n} - a${a},${a} 1 0,0 ${-1*i*.25},0 - a${a},${a} 1 0,0 ${-1*i*.25},0 - a${a},${a} 1 0,0 ${-1*i*.25},${-1*n*.15} + 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*i*.1},${-1*n*.33} - a${.8*a},${.8*a} 1 0,0 0,${-1*n*.34} - a${a},${a} 1 0,0 ${.1*i},${-1*n*.33} + 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"),b9t=me(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg"),me(f9t,"insertPolygonShape"),w9t=me(function(t,e,r){var i=r.height,n=i/4,a=r.width-r.padding+2*n;f9t(e,a,i,[{x:n,y:0},{x:a-n,y:0},{x:a,y:-i/2},{x:a-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}],r)},"hexagonBkg"),k9t=me(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),T9t=me(async function(t,e,r,i,n){var a=n.htmlLabels,s=i%11,i=e.append("g");let o="section-"+(r.section=s);s<0&&(o+=" section-root"),i.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+o);var l=i.append("g"),e=i.append("g"),c=r.descr.replace(/()/g,` -`),c=(await j9(e,c,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},n),a||e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.node().getBBox()),[n]=WE(n.fontSize);switch(r.height=c.height+1.1*n*.5+r.padding,r.width=c.width+2*r.padding,r.icon?r.type===t.nodeType.CIRCLE?(r.height+=50,r.width+=50,i.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),e.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")")):(r.width+=50,n=r.height,r.height=Math.max(n,60),n=Math.abs(r.height-n),i.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+n/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),e.attr("transform","translate("+(25+r.width/2)+", "+(n/2+r.padding/2)+")")):a?(n=(r.width-c.width)/2,a=(r.height-c.height)/2,e.attr("transform","translate("+n+", "+a+")")):(c=r.width/2,e.attr("transform","translate("+c+", "+r.padding/2+")")),r.type){case t.nodeType.DEFAULT:m9t(t,l,r,s);break;case t.nodeType.ROUNDED_RECT:k9t(t,l,r,s);break;case t.nodeType.RECT:y9t(t,l,r,s);break;case t.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),b9t(t,l,r,s);break;case t.nodeType.CLOUD:v9t(t,l,r,s);break;case t.nodeType.BANG:x9t(t,l,r,s);break;case t.nodeType.HEXAGON:w9t(t,l,r,s)}return t.setElementForId(r.id,i),r.height},"drawNode"),E9t=me(function(t,e){var t=t.getElementById(e.id),r=e.x||0;t.attr("transform","translate("+r+","+(e.y||0)+")")},"positionNode")});async function _9t(r,i,t,n,a){await T9t(r,i,t,n,a),t.children&&await Promise.all(t.children.map((t,e)=>_9t(r,i,t,n<0?e:n,a)))}function S9t(i,t){t.edges().map((t,e)=>{var r=t.data();t[0]._private.bodyBounds&&(t=t[0]._private.rscratch,M.trace("Edge: ",e,r),i.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth))})}function A9t(e,r,i,n){r.add({group:"nodes",data:{id:e.id.toString(),labelText:e.descr,height:e.height,width:e.width,level:n,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach(t=>{A9t(t,r,i,n+1),r.add({group:"edges",data:{id:e.id+"_"+t.id,source:e.id,target:t.id,depth:n,section:t.section}})})}function L9t(i,n){return new Promise(e=>{let t=j("body").append("div").attr("id","cy").attr("style","display:none"),r=h9t({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});t.remove(),A9t(i,r,n,0),r.nodes().forEach(function(e){e.layoutDimensions=()=>{var t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(t=>{M.info("Ready",t),e(r)})})}function N9t(n,t){t.nodes().map((t,e)=>{var r=t.data(),i=(r.x=t.position().x,r.y=t.position().y,E9t(n,r),n.getElementById(r.nodeId));M.info("Id:",e,"Position: (",t.position().x,", ",t.position().y,")",r),i.attr("transform",`translate(${t.position().x-r.width/2}, ${t.position().y-r.height/2})`),i.attr("attr",`apa-${e})`)})}var I9t,R9t,M9t,D9t,O9t,P9t=t(()=>{u9t(),I9t=tt(g9t(),1),Z3(),fu(),e(),tmt(),th(),C9t(),_i(),h9t.use(I9t.default),me(_9t,"drawNodes"),me(S9t,"drawEdges"),me(A9t,"addNodes"),me(L9t,"layoutMindmap"),me(N9t,"positionNodes"),I9t=me(async(t,e,r,i)=>{var n,a,s;M.debug(`Rendering mindmap diagram -`+t),(i=(t=i.db).getMindmap())&&((n=D()).htmlLabels=!1,(a=(e=Hft(e)).append("g")).attr("class","mindmap-edges"),(s=e.append("g")).attr("class","mindmap-nodes"),await _9t(t,s,i,-1,n),S9t(a,s=await L9t(i,n)),N9t(t,s),Vc(void 0,e,n.mindmap?.padding??mr.mindmap.padding,n.mindmap?.useMaxWidth??mr.mindmap.useMaxWidth))},"draw"),R9t={draw:I9t}}),B9t=t(()=>{mi(),M9t=me(e=>{let r="";for(let t=0;t)/g,` +`),c=(await W9(e,c,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.node().getBBox()),[i]=YE(i.fontSize);switch(r.height=c.height+1.1*i*.5+r.padding,r.width=c.width+2*r.padding,r.icon?r.type===t.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),e.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),e.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,e.attr("transform","translate("+i+", "+a+")")):(c=r.width/2,e.attr("transform","translate("+c+", "+r.padding/2+")")),r.type){case t.nodeType.DEFAULT:g9t(t,l,r,s);break;case t.nodeType.ROUNDED_RECT:b9t(t,l,r,s);break;case t.nodeType.RECT:f9t(t,l,r,s);break;case t.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),v9t(t,l,r,s);break;case t.nodeType.CLOUD:m9t(t,l,r,s);break;case t.nodeType.BANG:y9t(t,l,r,s);break;case t.nodeType.HEXAGON:x9t(t,l,r,s)}return t.setElementForId(r.id,n),r.height},"drawNode"),k9t=me(function(t,e){var t=t.getElementById(e.id),r=e.x||0;t.attr("transform","translate("+r+","+(e.y||0)+")")},"positionNode")});async function E9t(r,n,t,i,a){await w9t(r,n,t,i,a),t.children&&await Promise.all(t.children.map((t,e)=>E9t(r,n,t,i<0?e:i,a)))}function C9t(n,t){t.edges().map((t,e)=>{var r=t.data();t[0]._private.bodyBounds&&(t=t[0]._private.rscratch,M.trace("Edge: ",e,r),n.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth))})}function _9t(e,r,n,i){r.add({group:"nodes",data:{id:e.id.toString(),labelText:e.descr,height:e.height,width:e.width,level:i,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach(t=>{_9t(t,r,n,i+1),r.add({group:"edges",data:{id:e.id+"_"+t.id,source:e.id,target:t.id,depth:i,section:t.section}})})}function S9t(n,i){return new Promise(e=>{let t=H("body").append("div").attr("id","cy").attr("style","display:none"),r=l9t({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});t.remove(),_9t(n,r,i,0),r.nodes().forEach(function(e){e.layoutDimensions=()=>{var t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(t=>{M.info("Ready",t),e(r)})})}function A9t(i,t){t.nodes().map((t,e)=>{var r=t.data(),n=(r.x=t.position().x,r.y=t.position().y,k9t(i,r),i.getElementById(r.nodeId));M.info("id:",e,"Position: (",t.position().x,", ",t.position().y,")",r),n.attr("transform",`translate(${t.position().x-r.width/2}, ${t.position().y-r.height/2})`),n.attr("attr",`apa-${e})`)})}var L9t,N9t,I9t,R9t,M9t,D9t=t(()=>{c9t(),L9t=tt(d9t(),1),Q3(),mu(),e(),emt(),eh(),T9t(),An(),l9t.use(L9t.default),me(E9t,"drawNodes"),me(C9t,"drawEdges"),me(_9t,"addNodes"),me(S9t,"layoutMindmap"),me(A9t,"positionNodes"),L9t=me(async(t,e,r,n)=>{var i,a,s;M.debug(`Rendering mindmap diagram +`+t),(n=(t=n.db).getMindmap())&&((i=D()).htmlLabels=!1,(a=(e=Vft(e)).append("g")).attr("class","mindmap-edges"),(s=e.append("g")).attr("class","mindmap-nodes"),await E9t(t,s,n,-1,i),C9t(a,s=await S9t(n,i)),A9t(t,s),Xc(void 0,e,i.mindmap?.padding??yr.mindmap.padding,i.mindmap?.useMaxWidth??yr.mindmap.useMaxWidth))},"draw"),N9t={draw:L9t}}),O9t=t(()=>{vn(),I9t=me(e=>{let r="";for(let t=0;t` + `}return r},"genSections"),R9t=me(t=>` .edge { stroke-width: 3; } - ${M9t(t)} + ${I9t(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } @@ -2236,20 +2263,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho dominant-baseline: middle; text-align: center; } -`,"getStyles"),O9t=D9t}),F9t={};lPt(F9t,{diagram:()=>$9t});var $9t,z9t,G9t,U9t,q9t,j9t,W9t,Y9t,H9t,V9t,X9t,K9t,Z9t,Q9t,J9t,tLt,eLt,rLt,iLt,nLt,aLt,sLt,oLt,lLt,cLt,hLt=t(()=>{_3t(),S3t(),P9t(),B9t(),$9t={db:E3t,renderer:R9t,parser:c3t,styles:O9t}}),uLt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[1,4],i=[1,13],n=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,31],f=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],x=[1,6,7,11,13,16,17,20,23],b=[1,38],r={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",a[o-1].id),i.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:i.getLogger().info("Node: ",a[o].id),i.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:i.getLogger().trace("Icon: ",a[o]),i.decorateNode({icon:a[o]});break;case 18:case 23:i.decorateNode({class:a[o]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",a[o-1].id),i.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:i.getLogger().trace("Node: ",a[o].id),i.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:i.decorateNode({icon:a[o]});break;case 27:i.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:i.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 30:this.$=a[o-1]+a[o];break;case 31:this.$=a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:i,7:[1,10],9:9,12:11,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:i,9:22,12:11,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:h,7:u,10:23,11:d},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),e(p,[2,19]),e(p,[2,21],{15:30,24:g}),e(p,[2,22]),e(p,[2,23]),e(f,[2,25]),e(f,[2,26]),e(f,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:i,12:21,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},e(m,[2,14],{7:y,11:v}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(p,[2,16],{15:37,24:g}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:b}),e(f,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:y,11:v}),e(x,[2,11]),e(x,[2,12]),e(p,[2,15],{24:b}),e(f,[2,30]),{22:[1,41]},e(f,[2,27]),e(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"B9t});var B9t,F9t,$9t,z9t,G9t,U9t,q9t,j9t,W9t,Y9t,H9t,V9t,X9t,K9t,Z9t,Q9t,J9t,tLt,eLt,rLt,nLt,iLt,aLt,sLt,oLt,lLt=t(()=>{E3t(),C3t(),D9t(),O9t(),B9t={db:k3t,renderer:N9t,parser:o3t,styles:M9t}}),cLt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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:me(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:me(function(t,e,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},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(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},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),e(p,[2,19]),e(p,[2,21],{15:30,24:g}),e(p,[2,22]),e(p,[2,23]),e(f,[2,25]),e(f,[2,26]),e(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},e(m,[2,14],{7:y,11:v}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(p,[2,16],{15:37,24:g}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:b}),e(f,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:y,11:v}),e(x,[2,11]),e(x,[2,12]),e(p,[2,15],{24:b}),e(f,[2,30]),{22:[1,41]},e(f,[2,27]),e(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0"),24;case 4:return 24;case 5:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.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:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.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:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.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,me(t,"Parser"),(z9t=new((t.prototype=r).Parser=t)).parser=z9t,G9t=z9t}),dLt=t(()=>{fu(),Jc(),e(),_i(),IA(),U9t=[],q9t=[],j9t=0,W9t={},Y9t=me(()=>{U9t=[],q9t=[],j9t=0,W9t={}},"clear"),H9t=me(t=>{if(0===U9t.length)return null;let e=U9t[0].level,r=null;for(let t=U9t.length-1;0<=t;t--)if(U9t[t].level===e&&(r=r||U9t[t]),U9t[t].levelt.parentId===e.id)){var s={id:n.id,parentId:e.id,label:_c(n.label??"",i),isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:"kanbanItem",level:n.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:D()}},"getData"),K9t=me((t,e,r,i,n)=>{let a=D(),s=a.mindmap?.padding??mr.mindmap.padding;switch(i){case Z9t.ROUNDED_RECT:case Z9t.RECT:case Z9t.HEXAGON:s*=2}if(i={id:_c(e,a)||"kbn"+j9t++,level:t,label:_c(r,a),width:a.mindmap?.maxNodeWidth??mr.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==n){if(n=n.includes(` -`)?n+` +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0"),24;case 4:return 24;case 5:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.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:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.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:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.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,me(t,"Parser"),(F9t=new((t.prototype=r).Parser=t)).parser=F9t,$9t=F9t}),hLt=t(()=>{mu(),th(),e(),An(),RA(),z9t=[],G9t=[],U9t=0,q9t={},j9t=me(()=>{z9t=[],G9t=[],U9t=0,q9t={}},"clear"),W9t=me(t=>{if(0===z9t.length)return null;let e=z9t[0].level,r=null;for(let t=z9t.length-1;0<=t;t--)if(z9t[t].level===e&&(r=r||z9t[t]),z9t[t].levelt.parentId===e.id)){var s={id:i.id,parentId:e.id,label:Sc(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"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:D()}},"getData"),V9t=me((t,e,r,n,i)=>{let a=D(),s=a.mindmap?.padding??yr.mindmap.padding;switch(n){case X9t.ROUNDED_RECT:case X9t.RECT:case X9t.HEXAGON:s*=2}if(n={id:Sc(e,a)||"kbn"+U9t++,level:t,label:Sc(r,a),width:a.mindmap?.maxNodeWidth??yr.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==i){if(i=i.includes(` +`)?i+` `:`{ -`+n+` -}`,(e=NA(n,{schema:LA})).shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(i.shape=e?.shape),e?.label&&(i.label=e?.label),e?.icon&&(i.icon=e?.icon.toString()),e?.assigned&&(i.assigned=e?.assigned.toString()),e?.ticket&&(i.ticket=e?.ticket.toString()),e?.priority&&(i.priority=e?.priority)}(r=H9t(t))?i.parentId=r.id||"kbn"+j9t++:q9t.push(i),U9t.push(i)},"addNode"),Z9t={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Q9t=me((t,e)=>{switch(M.debug("In get type",t,e),t){case"[":return Z9t.RECT;case"(":return")"===e?Z9t.ROUNDED_RECT:Z9t.CLOUD;case"((":return Z9t.CIRCLE;case")":return Z9t.CLOUD;case"))":return Z9t.BANG;case"{{":return Z9t.HEXAGON;default:return Z9t.DEFAULT}},"getType"),J9t=me((t,e)=>{W9t[t]=e},"setElementForId"),tLt=me(t=>{var e,r;t&&(e=D(),r=U9t[U9t.length-1],t.icon&&(r.icon=_c(t.icon,e)),t.class)&&(r.cssClasses=_c(t.class,e))},"decorateNode"),eLt=me(t=>{switch(t){case Z9t.DEFAULT:return"no-border";case Z9t.RECT:return"rect";case Z9t.ROUNDED_RECT:return"rounded-rect";case Z9t.CIRCLE:return"circle";case Z9t.CLOUD:return"cloud";case Z9t.BANG:return"bang";case Z9t.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),rLt=me(()=>M,"getLogger"),iLt=me(t=>W9t[t],"getElementById"),nLt={clear:Y9t,addNode:K9t,getSections:V9t,getData:X9t,nodeType:Z9t,getType:Q9t,setElementForId:J9t,decorateNode:tLt,type2Str:eLt,getLogger:rLt,getElementById:iLt}}),pLt=t(()=>{fu(),e(),tmt(),th(),_i(),WM(),GD(),aLt=me(async(t,e,r,i)=>{M.debug(`Rendering kanban diagram -`+t);var n,a=i.db.getData(),s=D(),o=(s.htmlLabels=!1,(t=Hft(e)).append("g")),l=(o.attr("class","sections"),t.append("g"));l.attr("class","items");let c=a.nodes.filter(t=>t.isGroup),h=0,u=[],d=25;for(n of c){var p=s?.kanban?.sectionWidth||200,p=(h+=1,n.x=p*h+10*(h-1)/2,n.width=p,n.y=0,n.height=3*p,n.rx=5,n.ry=5,n.cssClasses=n.cssClasses+" section-"+h,await $M(o,n));d=Math.max(d,p?.labelBBox?.height),u.push(p)}let g=0;for(let n of c){var f,m=u[g];g+=1;let t=s?.kanban?.sectionWidth||200,e=3*-t/2+d,r=e,i=a.nodes.filter(t=>t.parentId===n.id);for(f of i){if(f.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");f.x=n.x,f.width=t-15;var y=(await OD(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await $D(f),r=f.y+y.height/2+5}var m=m.cluster.select("rect"),v=Math.max(r-e+30,50)+(d-25);m.attr("height",v)}Vc(void 0,t,s.mindmap?.padding??mr.kanban.padding,s.mindmap?.useMaxWidth??mr.kanban.useMaxWidth)},"draw"),sLt={draw:aLt}}),gLt=t(()=>{mi(),oLt=me(r=>{let e="";for(let t=0;t(r.darkMode?He:a)(t,e),"adjuster");for(let t=0;t{switch(M.debug("In get type",t,e),t){case"[":return X9t.RECT;case"(":return")"===e?X9t.ROUNDED_RECT:X9t.CLOUD;case"((":return X9t.CIRCLE;case")":return X9t.CLOUD;case"))":return X9t.BANG;case"{{":return X9t.HEXAGON;default:return X9t.DEFAULT}},"getType"),Z9t=me((t,e)=>{q9t[t]=e},"setElementForId"),Q9t=me(t=>{var e,r;t&&(e=D(),r=z9t[z9t.length-1],t.icon&&(r.icon=Sc(t.icon,e)),t.class)&&(r.cssClasses=Sc(t.class,e))},"decorateNode"),J9t=me(t=>{switch(t){case X9t.DEFAULT:return"no-border";case X9t.RECT:return"rect";case X9t.ROUNDED_RECT:return"rounded-rect";case X9t.CIRCLE:return"circle";case X9t.CLOUD:return"cloud";case X9t.BANG:return"bang";case X9t.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),tLt=me(()=>M,"getLogger"),eLt=me(t=>q9t[t],"getElementById"),rLt={clear:j9t,addNode:V9t,getSections:Y9t,getData:H9t,nodeType:X9t,getType:K9t,setElementForId:Z9t,decorateNode:Q9t,type2Str:J9t,getLogger:tLt,getElementById:eLt}}),uLt=t(()=>{mu(),e(),emt(),eh(),An(),YM(),UD(),nLt=me(async(t,e,r,n)=>{M.debug(`Rendering kanban diagram +`+t);var i,a=n.db.getData(),s=D(),o=(s.htmlLabels=!1,(t=Vft(e)).append("g")),l=(o.attr("class","sections"),t.append("g"));l.attr("class","items");let c=a.nodes.filter(t=>t.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 zM(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 t=s?.kanban?.sectionWidth||200,e=3*-t/2+d,r=e,n=a.nodes.filter(t=>t.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=t-15;var y=(await PD(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await zD(f),r=f.y+y.height/2+5}var m=m.cluster.select("rect"),v=Math.max(r-e+30,50)+(d-25);m.attr("height",v)}Xc(void 0,t,s.mindmap?.padding??yr.kanban.padding,s.mindmap?.useMaxWidth??yr.kanban.useMaxWidth)},"draw"),iLt={draw:nLt}}),dLt=t(()=>{vn(),HX(),aLt=me(r=>{let e="";for(let t=0;t(r.darkMode?Ve:a)(t,e),"adjuster");for(let t=0;t` + `}return e},"genSections"),sLt=me(t=>` .edge { stroke-width: 3; } - ${oLt(t)} + ${aLt(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } @@ -2323,18 +2350,19 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l dominant-baseline: middle; text-align: center; } -`,"getStyles"),cLt=lLt}),fLt={};lPt(fLt,{diagram:()=>mLt});var mLt,yLt,vLt,xLt,bLt,wLt,kLt,TLt,ELt,CLt,_Lt,SLt,ALt,LLt,NLt,ILt=t(()=>{uLt(),dLt(),pLt(),gLt(),mLt={db:nLt,renderer:sLt,parser:G9t,styles:cLt}}),RLt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[1,9],i=[1,10],n=[1,5,10,12],n={trace:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 7:var l=i.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),c=i.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());i.addLink(l,c,h);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20:i},{1:[2,6],7:11,10:[1,12]},e(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(n,[2,8]),e(n,[2,9]),{19:[1,16]},e(n,[2,11]),{1:[2,1]},{1:[2,5]},e(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:i},{15:18,16:7,17:8,18:r,20:i},{18:[1,19]},e(i,[2,3]),{12:[1,20]},e(n,[2,10]),{15:21,16:7,17:8,18:r,20:i},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"gLt});var gLt,fLt,mLt,yLt,vLt,xLt,bLt,wLt,kLt,TLt,ELt,CLt,_Lt,SLt,ALt,LLt=t(()=>{cLt(),hLt(),uLt(),dLt(),gLt={db:rLt,renderer:iLt,parser:$9t,styles:oLt}}),NLt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,9],n=[1,10],i=[1,5,10,12],i={trace:me(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:me(function(t,e,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]},e(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(i,[2,8]),e(i,[2,9]),{19:[1,16]},e(i,[2,11]),{1:[2,1]},{1:[2,5]},e(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]},e(n,[2,3]),{12:[1,20]},e(i,[2,10]),{15:21,16:7,17:8,18:r,20:n},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{fu(),Jc(),gu(),xLt=[],bLt=[],wLt=new Map,kLt=me(()=>{xLt=[],bLt=[],wLt=new Map,oh()},"clear"),TLt=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{me(this,"SankeyLink")}},ELt=me((t,e,r)=>{xLt.push(new TLt(t,e,r))},"addLink"),CLt=class{constructor(t){this.ID=t}static{me(this,"SankeyNode")}},_Lt=me(t=>{t=L.sanitizeText(t,D());let e=wLt.get(t);return void 0===e&&(e=new CLt(t),wLt.set(t,e),bLt.push(e)),e},"findOrCreateNode"),SLt=me(()=>bLt,"getNodes"),ALt=me(()=>xLt,"getLinks"),LLt=me(()=>({nodes:bLt.map(t=>({id:t.ID})),links:xLt.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),NLt={nodesMap:wLt,getConfig:me(()=>D().sankey,"getConfig"),getNodes:SLt,getLinks:ALt,getGraph:LLt,addLink:ELt,findOrCreateNode:_Lt,getAccTitle:ch,setAccTitle:lh,getAccDescription:uh,setAccDescription:hh,getDiagramTitle:ph,setDiagramTitle:dh,clear:kLt}});function DLt(e,r){let i;if(void 0===r)for(var t of e)null!=t&&(i{me(DLt,"max")});function PLt(e,r){let i;if(void 0===r)for(var t of e)null!=t&&(i>t||void 0===i&&t<=t)&&(i=t);else{let t=-1;for(var n of e)null!=(n=r(n,++t,e))&&(i>n||void 0===i&&n<=n)&&(i=n)}return i}var BLt=t(()=>{me(PLt,"min")});function FLt(e,r){let i=0;if(void 0===r)for(var t of e)(t=+t)&&(i+=t);else{let t=-1;for(var n of e)(n=+r(n,++t,e))&&(i+=n)}return i}var $Lt=t(()=>{me(FLt,"sum")}),zLt=t(()=>{OLt(),BLt(),$Lt()});function GLt(t){return t.target.depth}function ULt(t){return t.depth}function qLt(t,e){return e-1-t.height}function jLt(t,e){return t.sourceLinks.length?t.depth:e-1}function WLt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?PLt(t.sourceLinks,GLt)-1:0}var YLt=t(()=>{zLt(),me(GLt,"targetDepth"),me(ULt,"left"),me(qLt,"right"),me(jLt,"justify"),me(WLt,"center")});function HLt(t){return function(){return t}}var VLt=t(()=>{me(HLt,"constant")});function XLt(t,e){return ZLt(t.source,e.source)||t.index-e.index}function KLt(t,e){return ZLt(t.target,e.target)||t.index-e.index}function ZLt(t,e){return t.y0-e.y0}function QLt(t){return t.value}function JLt(t){return t.index}function tNt(t){return t.nodes}function eNt(t){return t.links}function rNt(t,e){if(t=t.get(e))return t;throw new Error("missing: "+e)}function iNt({nodes:t}){for(var r of t){let t=r.y0,e=t;for(var i of r.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(var n of r.targetLinks)n.y1=e+n.width/2,e+=n.width}}function nNt(){let o=0,l=0,c=1,h=1,u=24,n=8,d,p=JLt,g=jLt,f,m,e=tNt,r=eNt,a=6;function i(){var t={nodes:e.apply(null,arguments),links:r.apply(null,arguments)};return s(t),y(t),v(t),x(t),k(t),iNt(t),t}function s({nodes:r,links:t}){for(var[e,i]of r.entries())i.index=e,i.sourceLinks=[],i.targetLinks=[];var n,a,s=new Map(r.map((t,e)=>[p(t,e,r),t]));for([n,a]of t.entries()){a.index=n;let{source:t,target:e}=a;"object"!=typeof t&&(t=a.source=rNt(s,t)),"object"!=typeof e&&(e=a.target=rNt(s,e)),t.sourceLinks.push(a),e.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:t}){for(var e of t)e.value=void 0===e.fixedValue?Math.max(FLt(e.sourceLinks,QLt),FLt(e.targetLinks,QLt)):e.fixedValue}function v({nodes:t}){let e=t.length,r=new Set(t),i=new Set,n=0;for(;r.size;){for(var a of r){a.depth=n;for(var{target:s}of a.sourceLinks)i.add(s)}if(++n>e)throw new Error("circular link");r=i,i=new Set}}function x({nodes:t}){let e=t.length,r=new Set(t),i=new Set,n=0;for(;r.size;){for(var a of r){a.height=n;for(var{source:s}of a.targetLinks)i.add(s)}if(++n>e)throw new Error("circular link");r=i,i=new Set}}function b({nodes:t}){var e,r=DLt(t,t=>t.depth)+1,i=(c-o-u)/(r-1),n=new Array(r);for(e of t){var a=Math.max(0,Math.min(r-1,Math.floor(g.call(null,e,r))));e.layer=a,e.x0=o+a*i,e.x1=e.x0+u,n[a]?n[a].push(e):n[a]=[e]}if(f)for(var s of n)s.sort(f);return n}function w(t){var r,i=PLt(t,t=>(h-l-(t.length-1)*d)/FLt(t,QLt));for(r of t){let e=l;for(var n of r){n.y0=e,n.y1=e+n.value*i,e=n.y1+d;for(var a of n.sourceLinks)a.width=a.value*i}e=(h-e+d)/(r.length+1);for(let t=0;tt.length)-1)),w(e);for(let t=0;t>1,i=t[r];S(t,i.y0-d,r-1,e),_(t,i.y1+d,1+r,e),S(t,h,t.length-1,e),_(t,l,0,e)}function _(t,e,r,i){for(;r{zLt(),YLt(),VLt(),me(XLt,"ascendingSourceBreadth"),me(KLt,"ascendingTargetBreadth"),me(ZLt,"ascendingBreadth"),me(QLt,"value"),me(JLt,"defaultId"),me(tNt,"defaultNodes"),me(eNt,"defaultLinks"),me(rNt,"find"),me(iNt,"computeLinkBreadths"),me(nNt,"Sankey")});function sNt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function oNt(){return new sNt}var lNt,cNt,hNt,uNt,dNt=t(()=>{lNt=Math.PI,hNt=(cNt=2*lNt)-1e-6,me(sNt,"Path"),me(oNt,"path"),sNt.prototype=oNt.prototype={constructor:sNt,moveTo:me(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:me(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:me(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:me(function(t,e,r,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+i)},"quadraticCurveTo"),bezierCurveTo:me(function(t,e,r,i,n,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:me(function(t,e,r,i,n){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(t=+t),h=(i=+i)-(e=+e),u=o-t,d=l-e,p=u*u+d*d;if((n=+n)<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):1e-6{dNt()});function gNt(t){return me(function(){return t},"constant")}var fNt=t(()=>{me(gNt,"default")});function mNt(t){return t[0]}function yNt(t){return t[1]}var vNt,xNt=t(()=>{me(mNt,"x"),me(yNt,"y")}),bNt=t(()=>{vNt=Array.prototype.slice});function wNt(t){return t.source}function kNt(t){return t.target}function TNt(n){var a=wNt,s=kNt,o=mNt,l=yNt,c=null;function e(){var t,e=vNt.call(arguments),r=a.apply(this,e),i=s.apply(this,e);if(c=c||(t=uNt()),n(c,+o.apply(this,(e[0]=r,e)),+l.apply(this,e),+o.apply(this,(e[0]=i,e)),+l.apply(this,e)),t)return c=null,t+""||null}return me(e,"link"),e.source=function(t){return arguments.length?(a=t,e):a},e.target=function(t){return arguments.length?(s=t,e):s},e.x=function(t){return arguments.length?(o="function"==typeof t?t:gNt(+t),e):o},e.y=function(t){return arguments.length?(l="function"==typeof t?t:gNt(+t),e):l},e.context=function(t){return arguments.length?(c=t??null,e):c},e}function ENt(t,e,r,i,n){t.moveTo(e,r),t.bezierCurveTo(e=(e+i)/2,r,e,n,i,n)}function CNt(){return TNt(ENt)}var _Nt=t(()=>{pNt(),bNt(),fNt(),xNt(),me(wNt,"linkSource"),me(kNt,"linkTarget"),me(TNt,"link"),me(ENt,"curveHorizontal"),me(CNt,"linkHorizontal")}),SNt=t(()=>{_Nt()});function ANt(t){return[t.source.x1,t.y0]}function LNt(t){return[t.target.x0,t.y1]}function NNt(){return CNt().source(ANt).target(LNt)}var INt,RNt,MNt,DNt,ONt,PNt,BNt,FNt=t(()=>{SNt(),me(ANt,"horizontalSource"),me(LNt,"horizontalTarget"),me(NNt,"default")}),$Nt=t(()=>{aNt(),YLt(),FNt()}),zNt=t(()=>{INt=class e{static{me(this,"Uid")}static{this.count=0}static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href="#"+t}toString(){return"url("+this.href+")"}}}),GNt=t(()=>{fu(),Z3(),$Nt(),th(),zNt(),RNt={left:ULt,right:qLt,center:WLt,justify:jLt},MNt=me(function(t,e,r,i){let{securityLevel:n,sankey:a}=D(),s=yh.sankey,o,l=("sandbox"===n&&(o=j("#i"+e)),j("sandbox"===n?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===n?l.select(`[id="${e}"]`):j(`[id="${e}"]`),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=i.db.getGraph(),v=RNt[p],x=(nNt().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),hv(h4));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=INt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>x(t.id));var e=me(({id:t,value:e})=>m?t+` -`+g+Math.round(100*e)/100+f:t,"getText"),i=(c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",t=>t.x0(t.y1+t.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",t=>t.x0(t.uid=INt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0)).append("stop").attr("offset","0%").attr("stop-color",t=>x(t.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",t=>x(t.target.id)));let w;switch(b){case"gradient":w=me(t=>t.uid,"coloring");break;case"source":w=me(t=>x(t.source.id),"coloring");break;case"target":w=me(t=>x(t.target.id),"coloring");break;default:w=b}i.append("path").attr("d",NNt()).attr("stroke",w).attr("stroke-width",t=>Math.max(1,t.width)),Vc(void 0,c,0,d)},"draw"),DNt={draw:MNt}}),UNt=t(()=>{ONt=me(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` -`).trim(),"prepareTextForParsing")}),qNt=t(()=>{PNt=me(t=>`.label { +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{mu(),th(),fu(),yLt=[],vLt=[],xLt=new Map,bLt=me(()=>{yLt=[],vLt=[],xLt=new Map,lh()},"clear"),wLt=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{me(this,"SankeyLink")}},kLt=me((t,e,r)=>{yLt.push(new wLt(t,e,r))},"addLink"),TLt=class{constructor(t){this.ID=t}static{me(this,"SankeyNode")}},ELt=me(t=>{t=L.sanitizeText(t,D());let e=xLt.get(t);return void 0===e&&(e=new TLt(t),xLt.set(t,e),vLt.push(e)),e},"findOrCreateNode"),CLt=me(()=>vLt,"getNodes"),_Lt=me(()=>yLt,"getLinks"),SLt=me(()=>({nodes:vLt.map(t=>({id:t.ID})),links:yLt.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),ALt={nodesMap:xLt,getConfig:me(()=>D().sankey,"getConfig"),getNodes:CLt,getLinks:_Lt,getGraph:SLt,addLink:kLt,findOrCreateNode:ELt,getAccTitle:hh,setAccTitle:ch,getAccDescription:dh,setAccDescription:uh,getDiagramTitle:gh,setDiagramTitle:ph,clear:bLt}});function RLt(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n{me(RLt,"max")});function DLt(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var OLt=t(()=>{me(DLt,"min")});function PLt(e,r){let n=0;if(void 0===r)for(var t of e)(t=+t)&&(n+=t);else{let t=-1;for(var i of e)(i=+r(i,++t,e))&&(n+=i)}return n}var BLt=t(()=>{me(PLt,"sum")}),FLt=t(()=>{MLt(),OLt(),BLt()});function $Lt(t){return t.target.depth}function zLt(t){return t.depth}function GLt(t,e){return e-1-t.height}function ULt(t,e){return t.sourceLinks.length?t.depth:e-1}function qLt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?DLt(t.sourceLinks,$Lt)-1:0}var jLt=t(()=>{FLt(),me($Lt,"targetDepth"),me(zLt,"left"),me(GLt,"right"),me(ULt,"justify"),me(qLt,"center")});function WLt(t){return function(){return t}}var YLt=t(()=>{me(WLt,"constant")});function HLt(t,e){return XLt(t.source,e.source)||t.index-e.index}function VLt(t,e){return XLt(t.target,e.target)||t.index-e.index}function XLt(t,e){return t.y0-e.y0}function KLt(t){return t.value}function ZLt(t){return t.index}function QLt(t){return t.nodes}function JLt(t){return t.links}function tNt(t,e){if(t=t.get(e))return t;throw new Error("missing: "+e)}function eNt({nodes:t}){for(var r of t){let t=r.y0,e=t;for(var n of r.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(var i of r.targetLinks)i.y1=e+i.width/2,e+=i.width}}function rNt(){let o=0,l=0,c=1,h=1,u=24,i=8,d,p=ZLt,g=ULt,f,m,e=QLt,r=JLt,a=6;function n(){var t={nodes:e.apply(null,arguments),links:r.apply(null,arguments)};return s(t),y(t),v(t),x(t),k(t),eNt(t),t}function s({nodes:r,links:t}){for(var[e,n]of r.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];var i,a,s=new Map(r.map((t,e)=>[p(t,e,r),t]));for([i,a]of t.entries()){a.index=i;let{source:t,target:e}=a;"object"!=typeof t&&(t=a.source=tNt(s,t)),"object"!=typeof e&&(e=a.target=tNt(s,e)),t.sourceLinks.push(a),e.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:t}){for(var e of t)e.value=void 0===e.fixedValue?Math.max(PLt(e.sourceLinks,KLt),PLt(e.targetLinks,KLt)):e.fixedValue}function v({nodes:t}){let e=t.length,r=new Set(t),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>e)throw new Error("circular link");r=n,n=new Set}}function x({nodes:t}){let e=t.length,r=new Set(t),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>e)throw new Error("circular link");r=n,n=new Set}}function b({nodes:t}){var e,r=RLt(t,t=>t.depth)+1,n=(c-o-u)/(r-1),i=new Array(r);for(e of t){var a=Math.max(0,Math.min(r-1,Math.floor(g.call(null,e,r))));e.layer=a,e.x0=o+a*n,e.x1=e.x0+u,i[a]?i[a].push(e):i[a]=[e]}if(f)for(var s of i)s.sort(f);return i}function w(t){var r,n=DLt(t,t=>(h-l-(t.length-1)*d)/PLt(t,KLt));for(r of t){let e=l;for(var i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+d;for(var a of i.sourceLinks)a.width=a.value*n}e=(h-e+d)/(r.length+1);for(let t=0;tt.length)-1)),w(e);for(let t=0;t>1,n=t[r];S(t,n.y0-d,r-1,e),_(t,n.y1+d,1+r,e),S(t,h,t.length-1,e),_(t,l,0,e)}function _(t,e,r,n){for(;r{FLt(),jLt(),YLt(),me(HLt,"ascendingSourceBreadth"),me(VLt,"ascendingTargetBreadth"),me(XLt,"ascendingBreadth"),me(KLt,"value"),me(ZLt,"defaultId"),me(QLt,"defaultNodes"),me(JLt,"defaultLinks"),me(tNt,"find"),me(eNt,"computeLinkBreadths"),me(rNt,"Sankey")});function iNt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function aNt(){return new iNt}var sNt,oNt,lNt,cNt,hNt=t(()=>{sNt=Math.PI,lNt=(oNt=2*sNt)-1e-6,me(iNt,"Path"),me(aNt,"path"),iNt.prototype=aNt.prototype={constructor:iNt,moveTo:me(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:me(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:me(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:me(function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:me(function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:me(function(t,e,r,n,i){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(t=+t),h=(n=+n)-(e=+e),u=o-t,d=l-e,p=u*u+d*d;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):1e-6{hNt()});function dNt(t){return me(function(){return t},"constant")}var pNt=t(()=>{me(dNt,"default")});function gNt(t){return t[0]}function fNt(t){return t[1]}var mNt,yNt=t(()=>{me(gNt,"x"),me(fNt,"y")}),vNt=t(()=>{mNt=Array.prototype.slice});function xNt(t){return t.source}function bNt(t){return t.target}function wNt(i){var a=xNt,s=bNt,o=gNt,l=fNt,c=null;function e(){var t,e=mNt.call(arguments),r=a.apply(this,e),n=s.apply(this,e);if(c=c||(t=cNt()),i(c,+o.apply(this,(e[0]=r,e)),+l.apply(this,e),+o.apply(this,(e[0]=n,e)),+l.apply(this,e)),t)return c=null,t+""||null}return me(e,"link"),e.source=function(t){return arguments.length?(a=t,e):a},e.target=function(t){return arguments.length?(s=t,e):s},e.x=function(t){return arguments.length?(o="function"==typeof t?t:dNt(+t),e):o},e.y=function(t){return arguments.length?(l="function"==typeof t?t:dNt(+t),e):l},e.context=function(t){return arguments.length?(c=t??null,e):c},e}function kNt(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function TNt(){return wNt(kNt)}var ENt=t(()=>{uNt(),vNt(),pNt(),yNt(),me(xNt,"linkSource"),me(bNt,"linkTarget"),me(wNt,"link"),me(kNt,"curveHorizontal"),me(TNt,"linkHorizontal")}),CNt=t(()=>{ENt()});function _Nt(t){return[t.source.x1,t.y0]}function SNt(t){return[t.target.x0,t.y1]}function ANt(){return TNt().source(_Nt).target(SNt)}var LNt,NNt,INt,RNt,MNt,DNt,ONt,PNt=t(()=>{CNt(),me(_Nt,"horizontalSource"),me(SNt,"horizontalTarget"),me(ANt,"default")}),BNt=t(()=>{nNt(),jLt(),PNt()}),FNt=t(()=>{LNt=class e{static{me(this,"Uid")}static{this.count=0}static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href="#"+t}toString(){return"url("+this.href+")"}}}),$Nt=t(()=>{mu(),Q3(),BNt(),eh(),FNt(),NNt={left:zLt,right:GLt,center:qLt,justify:ULt},INt=me(function(t,e,r,n){let{securityLevel:i,sankey:a}=D(),s=vh.sankey,o,l=("sandbox"===i&&(o=H("#i"+e)),H("sandbox"===i?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===i?l.select(`[id="${e}"]`):H(`[id="${e}"]`),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=NNt[p],x=(rNt().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),uv(u4));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=LNt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>x(t.id));var e=me(({id:t,value:e})=>m?t+` +`+g+Math.round(100*e)/100+f:t,"getText"),n=(c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",t=>t.x0(t.y1+t.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",t=>t.x0(t.uid=LNt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0)).append("stop").attr("offset","0%").attr("stop-color",t=>x(t.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",t=>x(t.target.id)));let w;switch(b){case"gradient":w=me(t=>t.uid,"coloring");break;case"source":w=me(t=>x(t.source.id),"coloring");break;case"target":w=me(t=>x(t.target.id),"coloring");break;default:w=b}n.append("path").attr("d",ANt()).attr("stroke",w).attr("stroke-width",t=>Math.max(1,t.width)),Xc(void 0,c,0,d)},"draw"),RNt={draw:INt}}),zNt=t(()=>{MNt=me(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")}),GNt=t(()=>{DNt=me(t=>`.label { font-family: ${t.fontFamily}; - }`,"getStyles"),BNt=PNt}),jNt={};lPt(jNt,{diagram:()=>YNt});var WNt,YNt,HNt,VNt,XNt,KNt,ZNt,QNt,JNt,tIt,eIt,rIt,iIt,nIt,aIt,sIt,oIt,lIt,cIt=t(()=>{RLt(),MLt(),GNt(),UNt(),qNt(),WNt=vLt.parse.bind(vLt),vLt.parse=t=>WNt(ONt(t)),YNt={styles:BNt,parser:vLt,db:NLt,renderer:DNt}}),hIt=t(()=>{Ai(),_i(),KE(),gu(),HNt={packet:[]},VNt=structuredClone(HNt),XNt=mr.packet,KNt=me(()=>{var t=xE({...XNt,...Nr().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),ZNt=me(()=>VNt.packet,"getPacket"),QNt=me(t=>{0{oh(),VNt=structuredClone(HNt)},"clear"),tIt={pushWord:QNt,getPacket:ZNt,getConfig:KNt,clear:JNt,setAccTitle:lh,getAccTitle:ch,setDiagramTitle:dh,getDiagramTitle:ph,getAccDescription:uh,setAccDescription:hh}}),uIt=t(()=>{Rpt(),e(),Ppt(),hIt(),eIt=me(t=>{Mpt(t,tIt);let e=-1,r=[],i=1,n=tIt.getConfig().bitsPerRow;for(var{start:a,end:s,label:o}of t.blocks){if(s&&s{if(void 0===t.end&&(t.end=t.start),t.end{t=await Apt("packet",t),M.debug(t),eIt(t)},"parse")}}),dIt=t(()=>{tmt(),th(),nIt=me((t,e,r,i)=>{var n,a,s=(i=i.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=i.getPacket(),i=i.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(i?0:o),c=c*h+2,d=Hft(e);d.attr("viewbox",`0 0 ${c} `+o),Hc(d,o,c,s.useMaxWidth);for([n,a]of u.entries())aIt(d,a,n,s);d.append("text").text(i).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),aIt=me((t,e,r,{rowHeight:i,paddingX:n,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=t.append("g"),u=r*(i+a)+a;for(c of e){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-n;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",i).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),l&&(d=c.end===c.start,p=u-2,h.append("text").attr("x",g+(d?f/2:0)).attr("y",p).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",d?"middle":"start").text(c.start),d||h.append("text").attr("x",g+f).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(c.end))}},"drawWord"),sIt={draw:nIt}}),pIt=t(()=>{KE(),oIt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},lIt=me(({packet:t}={})=>` + }`,"getStyles"),ONt=DNt}),UNt={};oPt(UNt,{diagram:()=>jNt});var qNt,jNt,WNt,YNt,HNt,VNt,XNt,KNt,ZNt,QNt,JNt,tIt,eIt,rIt,nIt,iIt,aIt,sIt,oIt=t(()=>{NLt(),ILt(),$Nt(),zNt(),GNt(),qNt=mLt.parse.bind(mLt),mLt.parse=t=>qNt(MNt(t)),jNt={styles:ONt,parser:mLt,db:ALt,renderer:RNt}}),lIt=t(()=>{Nn(),An(),ZE(),fu(),WNt={packet:[]},YNt=structuredClone(WNt),HNt=yr.packet,VNt=me(()=>{var t=bE({...HNt,...Ir().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),XNt=me(()=>YNt.packet,"getPacket"),KNt=me(t=>{0{lh(),YNt=structuredClone(WNt)},"clear"),QNt={pushWord:KNt,getPacket:XNt,getConfig:VNt,clear:ZNt,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh}}),cIt=t(()=>{Mpt(),e(),Bpt(),lIt(),JNt=me(t=>{Dpt(t,QNt);let e=-1,r=[],n=1,i=QNt.getConfig().bitsPerRow;for(var{start:a,end:s,bits:o,label:l}of t.blocks){if(void 0!==a&&void 0!==s&&s{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.end{t=await Lpt("packet",t),M.debug(t),JNt(t)},"parse")}}),hIt=t(()=>{emt(),eh(),rIt=me((t,e,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=Vft(e);d.attr("viewbox",`0 0 ${c} `+o),Vc(d,o,c,s.useMaxWidth);for([i,a]of u.entries())nIt(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"),nIt=me((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=t.append("g"),u=r*(n+a)+a;for(c of e){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"),iIt={draw:rIt}}),uIt=t(()=>{ZE(),aIt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},sIt=me(({packet:t}={})=>` .packetByte { - font-size: ${(t=xE(oIt,t)).byteFontSize}; + font-size: ${(t=bE(aIt,t)).byteFontSize}; } .packetByte.start { fill: ${t.startByteColor}; @@ -2355,20 +2383,20 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l stroke-width: ${t.blockStrokeWidth}; fill: ${t.blockFillColor}; } - `,"styles")}),gIt={};lPt(gIt,{diagram:()=>fIt});var fIt,mIt,yIt,vIt,xIt,bIt,wIt,kIt,TIt,EIt,CIt,_It,SIt,AIt,LIt,NIt,IIt,RIt=t(()=>{hIt(),uIt(),dIt(),pIt(),fIt={parser:iIt,db:tIt,renderer:sIt,styles:lIt}}),MIt=t(()=>{Ai(),_i(),KE(),gu(),yIt={axes:[],curves:[],options:mIt={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},vIt=structuredClone(yIt),xIt=mr.radar,bIt=me(()=>xE({...xIt,...Nr().radar}),"getConfig"),wIt=me(()=>vIt.axes,"getAxes"),kIt=me(()=>vIt.curves,"getCurves"),TIt=me(()=>vIt.options,"getOptions"),EIt=me(t=>{vIt.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),CIt=me(t=>{vIt.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:_It(t.entries)}))},"setCurves"),_It=me(r=>{if(null==r[0].axis)return r.map(t=>t.value);var t=wIt();if(0===t.length)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{var t=r.find(t=>t.axis?.$refText===e.name);if(void 0===t)throw new Error("Missing entry for axis "+e.label);return t.value})},"computeCurveEntries"),SIt=me(t=>{t=t.reduce((t,e)=>(t[e.name]=e,t),{}),vIt.options={showLegend:t.showLegend?.value??mIt.showLegend,ticks:t.ticks?.value??mIt.ticks,max:t.max?.value??mIt.max,min:t.min?.value??mIt.min,graticule:t.graticule?.value??mIt.graticule}},"setOptions"),AIt=me(()=>{oh(),vIt=structuredClone(yIt)},"clear"),LIt={getAxes:wIt,getCurves:kIt,getOptions:TIt,setAxes:EIt,setCurves:CIt,setOptions:SIt,getConfig:bIt,clear:AIt,setAccTitle:lh,getAccTitle:ch,setDiagramTitle:dh,getDiagramTitle:ph,getAccDescription:uh,setAccDescription:hh}}),DIt=t(()=>{Rpt(),e(),Ppt(),MIt(),NIt=me(t=>{Mpt(t,LIt);var{axes:t,curves:e,options:r}=t;LIt.setAxes(t),LIt.setCurves(e),LIt.setOptions(r)},"populate"),IIt={parse:me(async t=>{t=await Apt("radar",t),M.debug(t),NIt(t)},"parse")}});function OIt(r,t,e,i,n,a,s){let o=t.length,l=Math.min(s.width,s.height)/2;e.forEach((t,e)=>{t.entries.length===o&&(t=t.entries.map((t,e)=>(e=2*Math.PI*e/o-Math.PI/2,{x:(t=PIt(t,i,n,l))*Math.cos(e),y:t*Math.sin(e)})),"circle"===a?r.append("path").attr("d",BIt(t,s.curveTension)).attr("class","radarCurve-"+e):"polygon"===a&&r.append("polygon").attr("points",t.map(t=>t.x+","+t.y).join(" ")).attr("class","radarCurve-"+e))})}function PIt(t,e,r,i){return i*(Math.min(Math.max(t,e),r)-e)/(r-e)}function BIt(e,r){let i=e.length,n=`M${e[0].x},`+e[0].y;for(let t=0;t{var r=a.append("g").attr("transform",`translate(${i}, ${n+20*e})`);r.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+e),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(t.label)})}}var $It,zIt,GIt,UIt,qIt,jIt,WIt,YIt,HIt=t(()=>{tmt(),$It=me((t,e,r,i)=>{var n=(i=i.db).getAxes(),a=i.getCurves(),s=i.getOptions(),o=i.getConfig(),i=i.getDiagramTitle(),e=Hft(e),e=zIt(e,o),l=s.max??Math.max(...a.map(t=>Math.max(...t.entries))),c=s.min,h=Math.min(o.width,o.height)/2;GIt(e,n,h,s.ticks,s.graticule),UIt(e,n,h,o),OIt(e,n,a,c,l,s.graticule,o),FIt(e,a,s.showLegend,o),e.append("text").attr("class","radarTitle").text(i).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),zIt=me((t,e)=>{var r=e.width+e.marginLeft+e.marginRight,i=e.height+e.marginTop+e.marginBottom,n=e.marginLeft+e.width/2,e=e.marginTop+e.height/2;return t.attr("viewbox",`0 0 ${r} `+i).attr("width",r).attr("height",i),t.append("g").attr("transform",`translate(${n}, ${e})`)},"drawFrame"),GIt=me((n,a,s,o,t)=>{if("circle"===t)for(let t=0;t(e=2*e*Math.PI/i-Math.PI/2,r*Math.cos(e)+","+r*Math.sin(e))).join(" ");n.append("polygon").attr("points",t).attr("class","radarGraticule")}}},"drawGraticule"),UIt=me((e,r,i,n)=>{var a=r.length;for(let t=0;t{KE(),wi(),Ai(),jIt=me((e,r)=>{let i="";for(let t=0;tpIt});var pIt,gIt,fIt,mIt,yIt,vIt,xIt,bIt,wIt,kIt,TIt,EIt,CIt,_It,SIt,AIt,LIt,NIt=t(()=>{lIt(),cIt(),hIt(),uIt(),pIt={parser:eIt,db:QNt,renderer:iIt,styles:sIt}}),IIt=t(()=>{Nn(),An(),ZE(),fu(),fIt={axes:[],curves:[],options:gIt={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},mIt=structuredClone(fIt),yIt=yr.radar,vIt=me(()=>bE({...yIt,...Ir().radar}),"getConfig"),xIt=me(()=>mIt.axes,"getAxes"),bIt=me(()=>mIt.curves,"getCurves"),wIt=me(()=>mIt.options,"getOptions"),kIt=me(t=>{mIt.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),TIt=me(t=>{mIt.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:EIt(t.entries)}))},"setCurves"),EIt=me(r=>{if(null==r[0].axis)return r.map(t=>t.value);var t=xIt();if(0===t.length)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{var t=r.find(t=>t.axis?.$refText===e.name);if(void 0===t)throw new Error("Missing entry for axis "+e.label);return t.value})},"computeCurveEntries"),CIt=me(t=>{t=t.reduce((t,e)=>(t[e.name]=e,t),{}),mIt.options={showLegend:t.showLegend?.value??gIt.showLegend,ticks:t.ticks?.value??gIt.ticks,max:t.max?.value??gIt.max,min:t.min?.value??gIt.min,graticule:t.graticule?.value??gIt.graticule}},"setOptions"),_It=me(()=>{lh(),mIt=structuredClone(fIt)},"clear"),SIt={getAxes:xIt,getCurves:bIt,getOptions:wIt,setAxes:kIt,setCurves:TIt,setOptions:CIt,getConfig:vIt,clear:_It,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh}}),RIt=t(()=>{Mpt(),e(),Bpt(),IIt(),AIt=me(t=>{Dpt(t,SIt);var{axes:t,curves:e,options:r}=t;SIt.setAxes(t),SIt.setCurves(e),SIt.setOptions(r)},"populate"),LIt={parse:me(async t=>{t=await Lpt("radar",t),M.debug(t),AIt(t)},"parse")}});function MIt(r,t,e,n,i,a,s){let o=t.length,l=Math.min(s.width,s.height)/2;e.forEach((t,e)=>{t.entries.length===o&&(t=t.entries.map((t,e)=>(e=2*Math.PI*e/o-Math.PI/2,{x:(t=DIt(t,n,i,l))*Math.cos(e),y:t*Math.sin(e)})),"circle"===a?r.append("path").attr("d",OIt(t,s.curveTension)).attr("class","radarCurve-"+e):"polygon"===a&&r.append("polygon").attr("points",t.map(t=>t.x+","+t.y).join(" ")).attr("class","radarCurve-"+e))})}function DIt(t,e,r,n){return n*(Math.min(Math.max(t,e),r)-e)/(r-e)}function OIt(e,r){let n=e.length,i=`M${e[0].x},`+e[0].y;for(let t=0;t{var r=a.append("g").attr("transform",`translate(${n}, ${i+20*e})`);r.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+e),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(t.label)})}}var BIt,FIt,$It,zIt,GIt,UIt,qIt,jIt,WIt=t(()=>{emt(),BIt=me((t,e,r,n)=>{var i=(n=n.db).getAxes(),a=n.getCurves(),s=n.getOptions(),o=n.getConfig(),n=n.getDiagramTitle(),e=Vft(e),e=FIt(e,o),l=s.max??Math.max(...a.map(t=>Math.max(...t.entries))),c=s.min,h=Math.min(o.width,o.height)/2;$It(e,i,h,s.ticks,s.graticule),zIt(e,i,h,o),MIt(e,i,a,c,l,s.graticule,o),PIt(e,a,s.showLegend,o),e.append("text").attr("class","radarTitle").text(n).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),FIt=me((t,e)=>{var r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,i=e.marginLeft+e.width/2,e=e.marginTop+e.height/2;return t.attr("viewbox",`0 0 ${r} `+n).attr("width",r).attr("height",n),t.append("g").attr("transform",`translate(${i}, ${e})`)},"drawFrame"),$It=me((i,a,s,o,t)=>{if("circle"===t)for(let t=0;t(e=2*e*Math.PI/n-Math.PI/2,r*Math.cos(e)+","+r*Math.sin(e))).join(" ");i.append("polygon").attr("points",t).attr("class","radarGraticule")}}},"drawGraticule"),zIt=me((e,r,n,i)=>{var a=r.length;for(let t=0;t{ZE(),Tn(),Nn(),UIt=me((e,r)=>{let n="";for(let t=0;t{var e=xE(sr(),Nr().themeVariables);return{themeVariables:e,radarOptions:xE(e.radar,t)}},"buildRadarStyleOptions"),YIt=me(({radar:t}={})=>{var{themeVariables:t,radarOptions:e}=WIt(t);return` + `}return n},"genIndexStyles"),qIt=me(t=>{var e=bE(or(),Ir().themeVariables);return{themeVariables:e,radarOptions:bE(e.radar,t)}},"buildRadarStyleOptions"),jIt=me(({radar:t}={})=>{var{themeVariables:t,radarOptions:e}=qIt(t);return` .radarTitle { font-size: ${t.fontSize}; color: ${t.titleColor}; @@ -2396,13 +2424,13 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l font-size: ${e.legendFontSize}px; dominant-baseline: hanging; } - ${jIt(t,e)} - `},"styles")}),XIt={};lPt(XIt,{diagram:()=>KIt});var KIt,ZIt,QIt,JIt=t(()=>{MIt(),DIt(),HIt(),VIt(),KIt={parser:IIt,db:LIt,renderer:qIt,styles:YIt}}),tRt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[1,7],i=[1,13],n=[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:me(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:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 4:i.getLogger().debug("Rule: separator (NL) ");break;case 5:i.getLogger().debug("Rule: separator (Space) ");break;case 6:i.getLogger().debug("Rule: separator (EOF) ");break;case 7:i.getLogger().debug("Rule: hierarchy: ",a[o-1]),i.setHierarchy(a[o-1]);break;case 8:i.getLogger().debug("Stop NL ");break;case 9:i.getLogger().debug("Stop EOF ");break;case 10:i.getLogger().debug("Stop NL2 ");break;case 11:i.getLogger().debug("Stop EOF2 ");break;case 12:i.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:i.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:i.getLogger().debug("Rule: link: ",a[o],t),this.$={edgeTypeStr:a[o],label:""};break;case 15:i.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:var l=parseInt(a[o]),c=i.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:i.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr),c=i.edgeStrToEdgeData(a[o-1].edgeTypeStr),this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:i.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:i.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:i.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:i.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:i.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:i.getLogger().debug("APA123",this||"na"),i.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:i.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),i.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:i.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),l=i.generateId(),this.$={id:l,type:"composite",label:"",children:a[o-1]};break;case 29:i.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:i.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:i.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:i.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,32:s,40:o,44:l,47:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:r,28:i,29:n,31:a,32:s,40:o,44:l,47:c}),e(u,[2,16],{14:22,15:d,16:p}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(g,[2,25],{27:[1,25]}),e(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:i,29:n,31:a,32:s,40:o,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(f,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},e(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:i,29:n,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]},e(f,[2,30]),{18:[1,43]},{18:[1,44]},e(g,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{37:[1,47]},{34:48,35:m},{15:[1,50]},e(u,[2,27]),e(f,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},e(f,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"VIt});var VIt,XIt,KIt,ZIt=t(()=>{IIt(),RIt(),WIt(),YIt(),VIt={parser:LIt,db:SIt,renderer:GIt,styles:jIt}}),QIt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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:me(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:me(function(t,e,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],t),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]},e(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}),e(u,[2,16],{14:22,15:d,16:p}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(g,[2,25],{27:[1,25]}),e(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]},e(f,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},e(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]},e(f,[2,30]),{18:[1,43]},{18:[1,44]},e(g,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{37:[1,47]},{34:48,35:m},{15:[1,50]},e(u,[2,27]),e(f,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},e(f,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0"),"NODE_DEND";case 54:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:case 61:case 62:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return t.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 t.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),38;case 75:return t.getLogger().debug("Lex: NODE_ID",e.yytext),32;case 76:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 77:case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 84:t.getLogger().debug("LEX POPPING"),this.popState();break;case 85:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 91:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 92:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 94:case 95:case 96:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 97:case 98:case 99:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 103:case 104:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 105:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.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,me(t,"Parser"),(ZIt=new((t.prototype=h).Parser=t)).parser=ZIt,QIt=ZIt});function eRt(t){switch(M.debug("typeStr2Type",t),t){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 rRt(t){return"=="!==(M.debug("typeStr2Type",t),t)?"normal":"thick"}function iRt(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var nRt,aRt,sRt,oRt,lRt,cRt,hRt,uRt,dRt,pRt,gRt,fRt,mRt,yRt,vRt,xRt,bRt,wRt,kRt,TRt,ERt,CRt,_Rt,SRt,ARt,LRt,NRt,IRt,RRt,MRt,DRt,ORt,PRt,BRt,FRt,$Rt,zRt,GRt,URt,qRt,jRt=t(()=>{r$(),Ai(),fu(),e(),Jc(),gu(),nRt=new Map,aRt=[],sRt=new Map,oRt=D(),lRt=new Map,cRt=me(t=>L.sanitizeText(t,oRt),"sanitizeText"),hRt=me(function(t,e=""){let r=lRt.get(t);r||(r={id:t,styles:[],textStyles:[]},lRt.set(t,r)),e?.split(",").forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(t)&&(t=e.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(t)),r.styles.push(e)})},"addStyleClass"),uRt=me(function(t,e=""){t=nRt.get(t),null!=e&&(t.styles=e.split(","))},"addStyle2Node"),dRt=me(function(t,r){t.split(",").forEach(function(t){let e=nRt.get(t);void 0===e&&(t=t.trim(),e={id:t,type:"na",children:[]},nRt.set(t,e)),e.classes||(e.classes=[]),e.classes.push(r)})},"setCssClass"),pRt=me((t,e)=>{var r,i=[];for(r of t.flat())if(r.label&&(r.label=cRt(r.label)),"classDef"===r.type)hRt(r.id,r.css);else if("applyClass"===r.type)dRt(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&uRt(r.id,r?.stylesStr);else if("column-setting"===r.type)e.columns=r.columns??-1;else if("edge"===r.type){var n=(sRt.get(r.id)??0)+1;sRt.set(r.id,n),r.id=n+"-"+r.id,aRt.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(n=nRt.get(r.id))?nRt.set(r.id,r):("na"!==r.type&&(n.type=r.type),r.label!==r.id&&(n.label=r.label)),r.children&&pRt(r.children,r),"space"===r.type){var a=r.width??1;for(let t=0;t{M.debug("Clear called"),oh(),fRt={id:"root",type:"composite",children:[],columns:-1},nRt=new Map([["root",fRt]]),gRt=[],lRt=new Map,aRt=[],sRt=new Map},"clear"),me(eRt,"typeStr2Type"),me(rRt,"edgeTypeStr2Type"),me(iRt,"edgeStrToEdgeData"),yRt=0,vRt=me(()=>(yRt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+yRt),"generateId"),xRt=me(t=>{fRt.children=t,pRt(t,fRt),gRt=fRt.children},"setHierarchy"),bRt=me(t=>(t=nRt.get(t))?t.columns||(t.children?t.children.length:-1):-1,"getColumns"),wRt=me(()=>[...nRt.values()],"getBlocksFlat"),kRt=me(()=>gRt||[],"getBlocks"),TRt=me(()=>aRt,"getEdges"),ERt=me(t=>nRt.get(t),"getBlock"),CRt=me(t=>{nRt.set(t.id,t)},"setBlock"),SRt=me(()=>console,"getLogger"),_Rt=me(function(){return lRt},"getClasses"),SRt={getConfig:me(()=>Nr().block,"getConfig"),typeStr2Type:eRt,edgeTypeStr2Type:rRt,edgeStrToEdgeData:iRt,getLogger:SRt,getBlocksFlat:wRt,getBlocks:kRt,getEdges:TRt,setHierarchy:xRt,getBlock:ERt,setBlock:CRt,getColumns:bRt,getClasses:_Rt,clear:mRt,generateId:vRt},ARt=SRt}),WRt=t(()=>{mi(),LRt=me((t,e)=>{var r=(n=Pe)(t,"r"),i=n(t,"g"),n=n(t,"b");return De(r,i,n,e)},"fade"),NRt=me(t=>`.label { +`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,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:me(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0"),"NODE_DEND";case 54:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:case 61:case 62:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return t.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 t.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),38;case 75:return t.getLogger().debug("Lex: NODE_ID",e.yytext),32;case 76:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 77:case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 84:t.getLogger().debug("LEX POPPING"),this.popState();break;case 85:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 91:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 92:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 94:case 95:case 96:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 97:case 98:case 99:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 103:case 104:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 105:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.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,me(t,"Parser"),(XIt=new((t.prototype=h).Parser=t)).parser=XIt,KIt=XIt});function JIt(t){switch(M.debug("typeStr2Type",t),t){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 tRt(t){return"=="!==(M.debug("typeStr2Type",t),t)?"normal":"thick"}function eRt(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var rRt,nRt,iRt,aRt,sRt,oRt,lRt,cRt,hRt,uRt,dRt,pRt,gRt,fRt,mRt,yRt,vRt,xRt,bRt,wRt,kRt,TRt,ERt,CRt,_Rt,SRt,ARt,LRt,NRt,IRt,RRt,MRt,DRt,ORt,PRt,BRt,FRt,$Rt,zRt,GRt,URt=t(()=>{n$(),Nn(),mu(),e(),th(),fu(),rRt=new Map,nRt=[],iRt=new Map,aRt=D(),sRt=new Map,oRt=me(t=>L.sanitizeText(t,aRt),"sanitizeText"),lRt=me(function(t,e=""){let r=sRt.get(t);r||(r={id:t,styles:[],textStyles:[]},sRt.set(t,r)),e?.split(",").forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(t)&&(t=e.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(t)),r.styles.push(e)})},"addStyleClass"),cRt=me(function(t,e=""){t=rRt.get(t),null!=e&&(t.styles=e.split(","))},"addStyle2Node"),hRt=me(function(t,r){t.split(",").forEach(function(t){let e=rRt.get(t);void 0===e&&(t=t.trim(),e={id:t,type:"na",children:[]},rRt.set(t,e)),e.classes||(e.classes=[]),e.classes.push(r)})},"setCssClass"),uRt=me((t,e)=>{var r,n=[];for(r of t.flat())if(r.label&&(r.label=oRt(r.label)),"classDef"===r.type)lRt(r.id,r.css);else if("applyClass"===r.type)hRt(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&cRt(r.id,r?.stylesStr);else if("column-setting"===r.type)e.columns=r.columns??-1;else if("edge"===r.type){var i=(iRt.get(r.id)??0)+1;iRt.set(r.id,i),r.id=i+"-"+r.id,nRt.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(i=rRt.get(r.id))?rRt.set(r.id,r):("na"!==r.type&&(i.type=r.type),r.label!==r.id&&(i.label=r.label)),r.children&&uRt(r.children,r),"space"===r.type){var a=r.width??1;for(let t=0;t{M.debug("Clear called"),lh(),pRt={id:"root",type:"composite",children:[],columns:-1},rRt=new Map([["root",pRt]]),dRt=[],sRt=new Map,nRt=[],iRt=new Map},"clear"),me(JIt,"typeStr2Type"),me(tRt,"edgeTypeStr2Type"),me(eRt,"edgeStrToEdgeData"),fRt=0,mRt=me(()=>(fRt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+fRt),"generateId"),yRt=me(t=>{pRt.children=t,uRt(t,pRt),dRt=pRt.children},"setHierarchy"),vRt=me(t=>(t=rRt.get(t))?t.columns||(t.children?t.children.length:-1):-1,"getColumns"),xRt=me(()=>[...rRt.values()],"getBlocksFlat"),bRt=me(()=>dRt||[],"getBlocks"),wRt=me(()=>nRt,"getEdges"),kRt=me(t=>rRt.get(t),"getBlock"),TRt=me(t=>{rRt.set(t.id,t)},"setBlock"),CRt=me(()=>console,"getLogger"),ERt=me(function(){return sRt},"getClasses"),CRt={getConfig:me(()=>Ir().block,"getConfig"),typeStr2Type:JIt,edgeTypeStr2Type:tRt,edgeStrToEdgeData:eRt,getLogger:CRt,getBlocksFlat:xRt,getBlocks:bRt,getEdges:wRt,setHierarchy:yRt,getBlock:kRt,setBlock:TRt,getColumns:vRt,getClasses:ERt,clear:gRt,generateId:mRt},_Rt=CRt}),qRt=t(()=>{vn(),HX(),SRt=me((t,e)=>{var r=(i=Be)(t,"r"),n=i(t,"g"),i=i(t,"b");return Oe(r,n,i,e)},"fade"),ARt=me(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } @@ -2472,14 +2500,14 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l /* For html labels only */ .labelBkg { - background-color: ${LRt(t.edgeLabelBackground,.5)}; + background-color: ${SRt(t.edgeLabelBackground,.5)}; // background-color: } .node .cluster { - // fill: ${LRt(t.mainBkg,.5)}; - fill: ${LRt(t.clusterBkg,.5)}; - stroke: ${LRt(t.clusterBorder,.2)}; + // fill: ${SRt(t.mainBkg,.5)}; + fill: ${SRt(t.clusterBkg,.5)}; + stroke: ${SRt(t.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; } @@ -2514,10 +2542,11 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),IRt=NRt}),YRt=t(()=>{e(),RRt=me((e,t,r,i)=>{t.forEach(t=>{URt[t](e,r,i)})},"insertMarkers"),MRt=me((t,e,r)=>{M.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),DRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),ORt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),PRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),BRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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"),FRt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),$Rt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),zRt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),GRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),URt={extension:MRt,composition:DRt,aggregation:ORt,dependency:PRt,lollipop:BRt,point:FRt,circle:$Rt,cross:zRt,barb:GRt},qRt=RRt});function HRt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}function VRt(s,o,l=0,c=0){if(M.debug("setBlockSizes abc95 (start)",s.id,s?.size?.x,"block width =",s?.size,"sieblingWidth",l),s?.size?.width||(s.size={width:l,height:c,x:0,y:0}),0layoutBlocks) ${i.id} x: ${i?.size?.x} y: ${i?.size?.y} width: `+i?.size?.width);var a=i.columns??-1;if(M.debug("layoutBlocks columns abc95",i.id,"=>",a,i),i.children&&0 x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 `+l*(s?.widthInColumns??1)/2),e=s.size.x+u,s.size.y=d.size.y-d.size.height/2+h*(c+QRt)+c/2+QRt,M.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${e}${QRt}${u}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2`+l*(s?.widthInColumns??1)/2)),s.children&&XRt(s,n),t+=s?.widthInColumns??1,M.debug("abc88 columnsPos",s,t))}}M.debug(`layout blocks (<==layoutBlocks) ${i.id} x: ${i?.size?.x} y: ${i?.size?.y} width: `+i?.size?.width)}function KRt(t,{minX:e,minY:r,maxX:i,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(t.size&&"root"!==t.id&&({x:a,y:s,width:o,height:l}=t.size,a-o/2{e(),fu(),QRt=D()?.block?.padding??8,me(HRt,"calculateBlockPosition"),JRt=me(t=>{let e=0,r=0;for(var i of t.children){var{width:n,height:a,x:s,y:o}=i.size??{width:0,height:0,x:0,y:0};M.debug("getMaxChildSize abc95 child:",i.id,"width:",n,"height:",a,"x:",s,"y:",o,i.type),"space"!==i.type&&(n>e&&(e=n/(t.widthInColumns??1)),a>r)&&(r=a)}return{width:e,height:r}},"getMaxChildSize"),me(VRt,"setBlockSizes"),me(XRt,"layoutBlocks"),me(KRt,"findBounds"),me(ZRt,"layout")});function eMt(t,e){e&&t.attr("style",e)}function rMt(t){var e=j(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=t.label,n=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(i),eMt(a,t.labelStyle),a.attr("class",n),eMt(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var iMt,nMt,aMt,sMt,oMt,lMt=t(()=>{Z3(),e(),fu(),Jc(),KE(),W9(),me(eMt,"applyStyle"),me(rMt,"addHtmlLabel"),iMt=me((t,e,r,i)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),Mc(D().flowchart.htmlLabels))return n=n.replace(/\\n|\n/g,"
"),M.debug("vertexText"+n),rMt({isNode:i,label:q9(VE(n)),labelStyle:e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof n?n.split(/\\n|\n|/gi):Array.isArray(n)?n:[]){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"),nMt=iMt}),cMt=t(()=>{e(),aMt=me((t,e,r,i,n)=>{e.arrowTypeStart&&oMt(t,"start",e.arrowTypeStart,r,i,n),e.arrowTypeEnd&&oMt(t,"end",e.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),sMt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},oMt=me((t,e,r,i,n,a)=>{var s=sMt[r];s?t.attr("marker-"+e,`url(${i}#${n}_${a}-${s}${"start"===e?"Start":"End"})`):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function hMt(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var uMt,dMt,pMt,gMt,fMt,mMt,yMt,vMt,xMt,bMt,wMt=t(()=>{e(),lMt(),W9(),Z3(),fu(),KE(),Jc(),JM(),jM(),cMt(),uMt={},dMt={},pMt=me((t,e)=>{var r,i=D(),n=Mc(i.flowchart.htmlLabels),i="markdown"===e.labelType?j9(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},i):nMt(e.label,e.labelStyle),a=t.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=j(i),o=n.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),uMt[e.id]=a,e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(n=nMt(e.startLabelLeft,e.labelStyle),s=(r=t.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+")"),dMt[e.id]||(dMt[e.id]={}),dMt[e.id].startLeft=r,hMt(l,e.startLabelLeft)),e.startLabelRight&&(n=nMt(e.startLabelRight,e.labelStyle),a=(s=t.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+")"),dMt[e.id]||(dMt[e.id]={}),dMt[e.id].startRight=s,hMt(l,e.startLabelRight)),e.endLabelLeft&&(n=nMt(e.endLabelLeft,e.labelStyle),r=(a=t.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),dMt[e.id]||(dMt[e.id]={}),dMt[e.id].endLeft=a,hMt(l,e.endLabelLeft)),e.endLabelRight&&(r=nMt(e.endLabelRight,e.labelStyle),n=(s=t.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),dMt[e.id]||(dMt[e.id]={}),dMt[e.id].endRight=s,hMt(l,e.endLabelRight)),i},"insertEdgeLabel"),me(hMt,"setTerminalWidth"),gMt=me((i,n)=>{M.debug("Moving label abc88 ",i.id,i.label,uMt[i.id],n);var a,s=n.updatedPath||n.originalPath,o=D(),o=IM(o).subGraphTitleTotalMargin;if(i.label){let t=uMt[i.id],e=i.x,r=i.y;s&&(a=YE.calcLabelPosition(s),M.debug("Moving label "+i.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),n.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(i.startLabelLeft){let t=dMt[i.id].startLeft,e=i.x,r=i.y;s&&(n=YE.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",s),e=n.x,r=n.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.startLabelRight){let t=dMt[i.id].startRight,e=i.x,r=i.y;s&&(a=YE.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.endLabelLeft){let t=dMt[i.id].endLeft,e=i.x,r=i.y;s&&(o=YE.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.endLabelRight){let t=dMt[i.id].endRight,e=i.x,r=i.y;s&&(n=YE.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),e=n.x,r=n.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),fMt=me((t,e)=>{var r=t.x,i=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-i);return t.width/2<=r||t.height/2<=e},"outsideNode"),mMt=me((t,i,n)=>{M.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(i)} - insidePoint : ${JSON.stringify(n)} - node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-n.x),s=t.width/2,o=n.xMath.abs(a-i.x)*l)return t=n.y{M.debug("abc88 cutPathAtIntersect",t,i);let n=[],a=t[0],s=!1;return t.forEach(t=>{if(fMt(i,t)||s)a=t,s||n.push(t);else{let e=mMt(i,a,t),r=!1;n.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),n.some(t=>t.x===e.x&&t.y===e.y)||n.push(e),s=!0}}),n},"cutPathAtIntersect"),vMt=me(function(t,e,r,i,n,a,s){let o=r.points,l=(M.debug("abc88 InsertEdge: edge=",r,"e=",e),!1),c=a.node(e.v),h=a.node(e.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",i[r.toCluster]),o=yMt(r.points,i[r.toCluster].node),l=!0),r.fromCluster&&(M.debug("from cluster abc88",i[r.fromCluster]),o=yMt(o.reverse(),i[r.fromCluster].node).reverse(),l=!0),o.filter(t=>!Number.isNaN(t.y))),d=u5,{x:p,y:g}=(!r.curve||"graph"!==n&&"flowchart"!==n||(d=r.curve),XM(r)),f=X4().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=t.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=(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),aMt(y,r,v,s,n),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),kMt=t(()=>{xMt=me(t=>{var e,r=new Set;for(e of t)switch(e){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(e)}return r},"expandAndDeduplicateDirections"),bMt=me((t,e,r)=>{var t=xMt(t),i=e.height+2*r.padding,n=i/2,e=e.width+2*n+r.padding,r=r.padding/2;return t.has("right")&&t.has("left")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:n,y:0},{x:e/2,y:2*r},{x:e-n,y:0},{x:e,y:0},{x:e,y:-i/3},{x:e+2*r,y:-i/2},{x:e,y:-2*i/3},{x:e,y:-i},{x:e-n,y:-i},{x:e/2,y:-i-2*r},{x:n,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*r,y:-i/2},{x:0,y:-i/3}]:t.has("right")&&t.has("left")&&t.has("up")?[{x:n,y:0},{x:e-n,y:0},{x:e,y:-i/2},{x:e-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}]:t.has("right")&&t.has("left")&&t.has("down")?[{x:0,y:0},{x:n,y:-i},{x:e-n,y:-i},{x:e,y:0}]:t.has("right")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:e,y:-n},{x:e,y:n-i},{x:0,y:-i}]:t.has("left")&&t.has("up")&&t.has("down")?[{x:e,y:0},{x:0,y:-n},{x:0,y:n-i},{x:e,y:-i}]:t.has("right")&&t.has("left")?[{x:n,y:0},{x:n,y:-r},{x:e-n,y:-r},{x:e-n,y:0},{x:e,y:-i/2},{x:e-n,y:-i},{x:e-n,y:r-i},{x:n,y:r-i},{x:n,y:-i},{x:0,y:-i/2}]:t.has("up")&&t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:n,y:-r},{x:n,y:r-i},{x:0,y:r-i},{x:e/2,y:-i},{x:e,y:r-i},{x:e-n,y:r-i},{x:e-n,y:-r},{x:e,y:-r}]:t.has("right")&&t.has("up")?[{x:0,y:0},{x:e,y:-n},{x:0,y:-i}]:t.has("right")&&t.has("down")?[{x:0,y:0},{x:e,y:0},{x:0,y:-i}]:t.has("left")&&t.has("up")?[{x:e,y:0},{x:0,y:-n},{x:e,y:-i}]:t.has("left")&&t.has("down")?[{x:e,y:0},{x:0,y:0},{x:e,y:-i}]:t.has("right")?[{x:n,y:-r},{x:n,y:-r},{x:e-n,y:-r},{x:e-n,y:0},{x:e,y:-i/2},{x:e-n,y:-i},{x:e-n,y:r-i},{x:n,y:r-i},{x:n,y:r-i}]:t.has("left")?[{x:n,y:0},{x:n,y:-r},{x:e-n,y:-r},{x:e-n,y:r-i},{x:n,y:r-i},{x:n,y:-i},{x:0,y:-i/2}]:t.has("up")?[{x:n,y:-r},{x:n,y:r-i},{x:0,y:r-i},{x:e/2,y:-i},{x:e,y:r-i},{x:e-n,y:r-i},{x:e-n,y:-r}]:t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:n,y:-r},{x:n,y:r-i},{x:e-n,y:r-i},{x:e-n,y:-r},{x:e,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function TMt(t,e){return t.intersect(e)}var EMt,CMt=t(()=>{me(TMt,"intersectNode"),EMt=TMt});function _Mt(t,e,r,i){var n=t.x,t=t.y,a=n-i.x,s=t-i.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(i.x{me(_Mt,"intersectEllipse"),SMt=_Mt});function LMt(t,e,r){return SMt(t,e,e,r)}var NMt,IMt=t(()=>{AMt(),me(LMt,"intersectCircle"),NMt=LMt});function RMt(t,e,r,i){var n,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*i.x+c*i.y+h;if(!(0!=u&&0!=d&&0{me(RMt,"intersectLine"),me(MMt,"sameSign"),DMt=RMt});function PMt(t,e,i){var r=t.x,n=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-s,c=n-t.height/2-o,h=0;h{OMt(),me(BMt=PMt,"intersectPolygon")}),UMt=t(()=>{FMt=me((t,e)=>{var r,i=t.x,n=t.y,a=e.x-i,e=e.y-n,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:i+r,y:n+t}},"intersectRect"),$Mt=FMt}),qMt=t(()=>{CMt(),IMt(),AMt(),GMt(),UMt(),zMt={node:EMt,circle:NMt,ellipse:SMt,polygon:BMt,rect:$Mt}});function jMt(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var WMt,YMt,HMt,VMt,XMt=t(()=>{lMt(),W9(),fu(),Z3(),Jc(),KE(),WMt=me(async(t,e,r,n)=>{let a=D(),i,s=e.useHtmlLabels||Mc(a.flowchart.htmlLabels),o=(i=r||"node default",t.insert("g").attr("class",i).attr("id",e.domId||e.id)),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),c,h=(c=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],l.node()),u,d=(u="markdown"===e.labelType?j9(l,_c(VE(c),a),{useHtmlLabels:s,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(nMt(_c(VE(c),a),e.labelStyle,!1,n))).getBBox(),p=e.padding/2;if(Mc(a.flowchart.htmlLabels)){if(r=u.children[0],t=j(u),n=r.getElementsByTagName("img")){let i=""===c.replace(/]*>/g,"").trim();await Promise.all([...n].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",i?(t=a.fontSize||window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}d=r.getBoundingClientRect(),t.attr("width",d.width),t.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.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"),YMt=me((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),me(jMt,"insertPolygonShape")}),KMt=t(()=>{XMt(),e(),fu(),qMt(),HMt=me(async(t,e)=>{e.useHtmlLabels||D().flowchart.htmlLabels||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:i}=await WMt(t,e,"node "+e.classes,!0),n=(M.info("Classes = ",e.classes),t.insert("rect",":first-child"));return n.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),YMt(e,n),e.intersect=function(t){return zMt.rect(e,t)},t},"note"),VMt=HMt});function ZMt(t,e,r,i){let n=[],a=me(t=>{n.push(t,0)},"addBorder"),s=me(t=>{n.push(0,t)},"skipBorder");(e.includes("t")?(M.debug("add top border"),a):s)(r),(e.includes("r")?(M.debug("add right border"),a):s)(i),(e.includes("b")?(M.debug("add bottom border"),a):s)(r),(e.includes("l")?(M.debug("add left border"),a):s)(i),t.attr("stroke-dasharray",n.join(" "))}var QMt,JMt,tDt,eDt,rDt,iDt,nDt,aDt,sDt,oDt,lDt,cDt,hDt,uDt,dDt,pDt,gDt,fDt,mDt,yDt,vDt,xDt,bDt,wDt,kDt,TDt,EDt,CDt,_Dt,SDt=t(()=>{Z3(),fu(),Jc(),e(),kMt(),lMt(),qMt(),KMt(),XMt(),QMt=me(t=>t?" "+t:"","formatClass"),JMt=me((t,e)=>`${e||"node default"}${QMt(t.classes)} `+QMt(t.class),"getClassesFromNode"),tDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.padding,s=n+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return M.info("Question main (Circle)"),(t=jMt(r,s,s,o)).attr("style",e.style),YMt(e,t),e.intersect=function(t){return M.warn("Intersect called"),zMt.polygon(e,o,t)},r},"question"),eDt=me((t,e)=>((t=t.insert("g").attr("class","node default").attr("id",e.domId||e.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(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return zMt.circle(e,14,t)},t),"choice"),rDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.height+e.padding,a=n/4,s=i.width+2*a+e.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-n/2},{x:s-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}],l=jMt(r,s,n,o);return l.attr("style",e.style),YMt(e,l),e.intersect=function(t){return zMt.polygon(e,o,t)},r},"hexagon"),iDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,void 0,!0),n=i.height+2*e.padding,a=n/2,s=i.width+2*a+e.padding,o=bMt(e.directions,i,e),l=jMt(r,s,n,o);return l.attr("style",e.style),YMt(e,l),e.intersect=function(t){return zMt.polygon(e,o,t)},r},"block_arrow"),nDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.padding,s=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return jMt(r,n,a,s).attr("style",e.style),e.width=n+a,e.height=a,e.intersect=function(t){return zMt.polygon(e,s,t)},r},"rect_left_inv_arrow"),aDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e),!0),n=i.width+e.padding,a=i.height+e.padding,s=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],o=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"lean_right"),sDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.padding,s=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],o=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"lean_left"),oDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.padding,s=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],o=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"trapezoid"),lDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.padding,s=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"inv_trapezoid"),cDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.padding,s=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],o=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"rect_right_inv_arrow"),hDt=me(async(t,n)=>{let{shapeSvg:e,bbox:r}=await WMt(t,n,JMt(n,void 0),!0),i=r.width+n.padding,a=i/2,s=a/(2.5+i/50),o=r.height+s+n.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,c=e.attr("label-offset-y",s).insert("path",":first-child").attr("style",n.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return YMt(n,c),n.intersect=function(e){var r=zMt.rect(n,e),i=r.x-n.x;if(0!=a&&(Math.abs(i)n.height/2-s)){let t=s*s*(1-i*i/(a*a));0!=t&&(t=Math.sqrt(t)),t=s-t,0{var{shapeSvg:t,bbox:r,halfPadding:i}=await WMt(t,e,"node "+e.classes+" "+e.class,!0),n=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-i,r=e.positioned?-s/2:-r.height/2-i;return n.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(i=new Set(Object.keys(e.props)),e.props.borders&&(ZMt(n,e.props.borders,a,s),i.delete("borders")),i.forEach(t=>{M.warn("Unknown node property "+t)})),YMt(e,n),e.intersect=function(t){return zMt.rect(e,t)},t},"rect"),dDt=me(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:i}=await WMt(t,e,"node "+e.classes,!0),n=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-i,r=e.positioned?-s/2:-r.height/2-i;return n.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(i=new Set(Object.keys(e.props)),e.props.borders&&(ZMt(n,e.props.borders,a,s),i.delete("borders")),i.forEach(t=>{M.warn("Unknown node property "+t)})),YMt(e,n),e.intersect=function(t){return zMt.rect(e,t)},t},"composite"),pDt=me(async(t,e)=>{var r,t=(await WMt(t,e,"label",!0)).shapeSvg,i=(M.trace("Classes = ",e.class),t.insert("rect",":first-child"));return i.attr("width",0).attr("height",0),t.attr("class","label edgeLabel"),e.props&&(r=new Set(Object.keys(e.props)),e.props.borders&&(ZMt(i,e.props.borders,0,0),r.delete("borders")),r.forEach(t=>{M.warn("Unknown node property "+t)})),YMt(e,i),e.intersect=function(t){return zMt.rect(e,t)},t},"labelRect"),me(ZMt,"applyNodePropertyBorders"),gDt=me((t,e)=>{let r,i=(r=e.classes?"node "+e.classes:"node default",t.insert("g").attr("class",r).attr("id",e.domId||e.id)),n=i.insert("rect",":first-child"),a=i.insert("line"),s=i.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l,c=(l="object"==typeof o?o[0]:o,M.info("Label text abc79",l,o,"object"==typeof o),s.node().appendChild(nMt(l,e.labelStyle,!0,!0))),h={width:0,height:0};Mc(D().flowchart.htmlLabels)&&(t=c.children[0],d=j(c),h=t.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),M.info("Text 2",o);var u,t=o.slice(1,o.length),d=c.getBBox(),t=s.node().appendChild(nMt(t.join?t.join("
"):t,e.labelStyle,!0,!0)),p=(Mc(D().flowchart.htmlLabels)&&(p=t.children[0],u=j(t),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),e.padding/2);return j(t).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),j(c).attr("transform","translate( "+(h.width{var{shapeSvg:t,bbox:r}=await WMt(t,e,JMt(e,void 0),!0),i=r.height+e.padding,r=r.width+i/4+e.padding,r=t.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-r/2).attr("y",-i/2).attr("width",r).attr("height",i);return YMt(e,r),e.intersect=function(t){return zMt.rect(e,t)},t},"stadium"),mDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await WMt(t,e,JMt(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),M.info("Circle main"),YMt(e,a),e.intersect=function(t){return M.info("Circle intersect",e,i.width/2+n,t),zMt.circle(e,i.width/2+n,t)},r},"circle"),yDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await WMt(t,e,JMt(e,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n+5).attr("width",i.width+e.padding+10).attr("height",i.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),M.info("DoubleCircle main"),YMt(e,s),e.intersect=function(t){return M.info("DoubleCircle intersect",e,i.width/2+n+5,t),zMt.circle(e,i.width/2+n+5,t)},r},"doublecircle"),vDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"subroutine"),xDt=me((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),YMt(e,r),e.intersect=function(t){return zMt.circle(e,7,t)},t},"start"),bDt=me((t,e,r)=>{let i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=70,a=10;return"LR"===r&&(n=10,a=70),t=i.append("rect").attr("x",-1*n/2).attr("y",-1*a/2).attr("width",n).attr("height",a).attr("class","fork-join"),YMt(e,t),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return zMt.rect(e,t)},i},"forkJoin"),wDt=me((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child"),i=t.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),YMt(e,i),e.intersect=function(t){return zMt.circle(e,7,t)},t},"end"),kDt=me((t,s)=>{let e=s.padding/2,r,i=(r=s.classes?"node "+s.classes:"node default",t.insert("g").attr("class",r).attr("id",s.domId||s.id)),n=i.insert("rect",":first-child"),a=i.insert("line"),o=i.insert("line"),l=0,c=4,h=i.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=h.node().appendChild(nMt(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=(Mc(D().flowchart.htmlLabels)&&(t=g.children[0],y=j(g),f=t.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+">"),j(t=h.node().appendChild(nMt(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=t.getBBox(),x=(Mc(D().flowchart.htmlLabels)&&(y=t.children[0],w=j(t),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(t=>{let e=t.getDisplayDetails(),r=e.displayText,i=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(nMt(r,e.cssStyle||s.labelStyle,!0,!0))),n=i.getBBox(),a;Mc(D().flowchart.htmlLabels)&&(t=i.children[0],a=j(i),n=t.getBoundingClientRect(),a.attr("width",n.width),a.attr("height",n.height)),n.width>l&&(l=n.width),c+=n.height+4,x.push(i)}),c+=8,[]);s.classData.methods.forEach(t=>{let e=t.getDisplayDetails(),r=e.displayText,i=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(nMt(r,e.cssStyle||s.labelStyle,!0,!0))),n=i.getBBox(),a;Mc(D().flowchart.htmlLabels)&&(t=i.children[0],a=j(i),n=t.getBoundingClientRect(),a.attr("width",n.width),a.attr("height",n.height)),n.width>l&&(l=n.width),c+=n.height+4,b.push(i)}),c+=8,d&&(y=(l-f.width)/2,j(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var w=(l-v.width)/2;return j(t).attr("transform","translate( "+(-1*l/2+w)+", "+(-1*c/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,x.forEach(t=>{j(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,b.forEach(t=>{j(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),n.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-e).attr("y",-c/2-e).attr("width",l+s.padding).attr("height",c+s.padding),YMt(s,n),s.intersect=function(t){return zMt.rect(s,t)},i},"class_box"),TDt={rhombus:tDt,composite:dDt,question:tDt,rect:uDt,labelRect:pDt,rectWithTitle:gDt,choice:eDt,circle:mDt,doublecircle:yDt,stadium:fDt,hexagon:rDt,block_arrow:iDt,rect_left_inv_arrow:nDt,lean_right:aDt,lean_left:sDt,trapezoid:oDt,inv_trapezoid:lDt,rect_right_inv_arrow:cDt,cylinder:hDt,start:xDt,end:wDt,note:VMt,subroutine:vDt,fork:bDt,join:bDt,class_box:kDt},EDt={},CDt=me(async(e,r,i)=>{let n,a;if(r.link){let t;"sandbox"===D().securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t),a=await TDt[r.shape](n,r,i)}else a=await TDt[r.shape](e,r,i),n=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),EDt[r.id]=n,r.haveCallback&&EDt[r.id].attr("class",EDt[r.id].attr("class")+" clickable"),n},"insertNode"),_Dt=me(t=>{var e=EDt[t.id],r=(M.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")});function ADt(t,e,r=!1){let i=t,n="default",a=(0<(i?.classes?.length||0)&&(n=(i?.classes??[]).join(" ")),n+=" flowchart-label",0),s="",o;switch(i.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}var t=gE(i?.styles??[]),l=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:t.labelStyle,shape:s,labelText:i.label,rx:a,ry:a,class:n,style:t.style,id:i.id,directions:i.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:r,intersect:void 0,type:i.type,padding:o??Nr()?.block?.padding??0}}async function LDt(t,e,r){var i;"group"!==(e=ADt(e,0,!1)).type&&(i=Nr(),i=(t=await CDt(t,e,{config:i})).node().getBBox(),(e=r.getBlock(e.id)).size={width:i.width,height:i.height,x:0,y:0,node:t},r.setBlock(e),t.remove())}async function NDt(t,e,r){var i=ADt(e,0,!0);"space"!==r.getBlock(i.id).type&&(r=Nr(),await CDt(t,i,{config:r}),e.intersect=i?.intersect,_Dt(i))}async function IDt(t,e,r,i){for(var n of e)await i(t,n,r),n.children&&await IDt(t,n.children,r,i)}async function RDt(t,e,r){await IDt(t,e,r,LDt)}async function MDt(t,e,r){await IDt(t,e,r,NDt)}async function DDt(t,e,r,i,n){var a,s,o,l,c=new BW({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 e)s.start&&s.end&&(l=i.getBlock(s.start),o=i.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}],vMt(t,{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,n),s.label)&&(await pMt(t,{...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"}),gMt({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var ODt,PDt,BDt,FDt=t(()=>{$W(),Ai(),wMt(),SDt(),KE(),me(ADt,"getNodeFromBlock"),me(LDt,"calculateBlockSize"),me(NDt,"insertBlockPositioned"),me(IDt,"performOperations"),me(RDt,"calculateBlockSizes"),me(MDt,"insertBlocks"),me(DDt,"insertEdges")}),$Dt=t(()=>{Z3(),Ai(),YRt(),e(),th(),tMt(),FDt(),ODt=me(function(t,e){return e.db.getClasses()},"getClasses"),PDt=me(async function(t,e,r,i){let{securityLevel:n,block:a}=Nr(),s=i.db,o;"sandbox"===n&&(o=j("#i"+e));var l=j("sandbox"===n?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===n?l.select(`[id="${e}"]`):j(`[id="${e}"]`),i=(qRt(l,["point","circle","cross"],i.type,e),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await RDt(u,i,s),ZRt(s));await MDt(u,i,s),await DDt(u,h,c,s,e),d&&(i=d,u=Math.max(1,Math.round(i.width/i.height*.125)),h=i.height+u+10,c=i.width+10,e=a.useMaxWidth,Hc(l,h,c,!!e),M.debug("Here Bounds",d,i),l.attr("viewBox",`${i.x-5} ${i.y-5} ${i.width+10} `+(i.height+10)))},"draw"),BDt={draw:PDt,getClasses:ODt}}),zDt={};lPt(zDt,{diagram:()=>GDt});var GDt,UDt,qDt,jDt,WDt,YDt,HDt,VDt,XDt,KDt,ZDt,QDt,JDt,tOt,eOt,rOt,iOt,nOt,aOt,sOt=t(()=>{tRt(),jRt(),WRt(),$Dt(),GDt={parser:QIt,db:ARt,renderer:BDt,styles:IRt}}),oOt=t(()=>{UDt={L:"left",R:"right",T:"top",B:"bottom"},qDt={L:me(t=>t+`,${t/2} 0,${t} 0,0`,"L"),R:me(t=>`0,${t/2} ${t},0 ${t},`+t,"R"),T:me(t=>`0,0 ${t},0 ${t/2},`+t,"T"),B:me(t=>t/2+`,0 ${t},${t} 0,`+t,"B")},jDt={L:me((t,e)=>t-e+2,"L"),R:me((t,e)=>t-2,"R"),T:me((t,e)=>t-e+2,"T"),B:me((t,e)=>t-2,"B")},WDt=me(function(t){return HDt(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),YDt=me(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),HDt=me(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),VDt=me(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),XDt=me(function(t,e){var r=HDt(t)&&VDt(e),t=VDt(t)&&HDt(e);return r||t},"isArchitectureDirectionXY"),KDt=me(function(t){var e=t[0],t=t[1],r=HDt(e)&&VDt(t),e=VDt(e)&&HDt(t);return r||e},"isArchitecturePairXY"),ZDt=me(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),QDt=me(function(t,e){return ZDt(t=""+t+e)?t:void 0},"getArchitectureDirectionPair"),JDt=me(function([t,e],r){var i=r[0],r=r[1];return HDt(i)?VDt(r)?[t+("L"===i?-1:1),e+("T"===r?1:-1)]:[t+("L"===i?-1:1),e]:HDt(r)?[t+("L"===r?1:-1),e+("T"===i?1:-1)]:[t,e+("T"===i?1:-1)]},"shiftPositionByArchitectureDirectionPair"),tOt=me(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),eOt=me(function(t,e){return XDt(t,e)?"bend":HDt(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),rOt=me(function(t){return"service"===t.type},"isArchitectureService"),iOt=me(function(t){return"junction"===t.type},"isArchitectureJunction"),nOt=me(t=>t.data(),"edgeData"),aOt=me(t=>t.data(),"nodeData")});function lOt(t){var e=D().architecture;return(e?.[t]?e:cOt)[t]}var cOt,hOt,uOt,dOt,pOt,gOt,fOt,mOt,yOt,vOt,xOt,bOt,wOt,kOt,TOt,EOt,COt,_Ot,SOt,AOt,LOt,NOt,IOt,ROt,MOt,DOt,OOt,POt=t(()=>{_i(),fu(),Fpt(),gu(),oOt(),cOt=mr.architecture,hOt=new Opt(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:cOt,dataStructures:void 0,elements:{}})),uOt=me(()=>{hOt.reset(),oh()},"clear"),dOt=me(function({id:t,icon:e,in:r,title:i,iconText:n}){if(void 0!==hOt.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another `+hOt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===hOt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===hOt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent is not a group`)}hOt.records.registeredIds[t]="node",hOt.records.nodes[t]={id:t,type:"service",icon:e,iconText:n,title:i,edges:[],in:r}},"addService"),pOt=me(()=>Object.values(hOt.records.nodes).filter(rOt),"getServices"),gOt=me(function({id:t,in:e}){hOt.records.registeredIds[t]="node",hOt.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),fOt=me(()=>Object.values(hOt.records.nodes).filter(iOt),"getJunctions"),mOt=me(()=>Object.values(hOt.records.nodes),"getNodes"),yOt=me(t=>hOt.records.nodes[t],"getNode"),vOt=me(function({id:t,icon:e,in:r,title:i}){if(void 0!==hOt.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another `+hOt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===hOt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===hOt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent is not a group`)}hOt.records.registeredIds[t]="group",hOt.records.groups[t]={id:t,icon:e,title:i,in:r}},"addGroup"),xOt=me(()=>Object.values(hOt.records.groups),"getGroups"),bOt=me(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:i,lhsInto:n,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!YDt(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+r);if(!YDt(i))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+i);if(void 0===hOt.records.nodes[t]&&void 0===hOt.records.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===hOt.records.nodes[e]&&void 0===hOt.records.groups[t])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);var c=hOt.records.nodes[t].in,h=hOt.records.nodes[e].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);hOt.records.edges.push({lhsId:t,lhsDir:r,lhsInto:n,lhsGroup:s,rhsId:e,rhsDir:i,rhsInto:a,rhsGroup:o,title:l}),hOt.records.nodes[t]&&hOt.records.nodes[e]&&(hOt.records.nodes[t].edges.push(hOt.records.edges[hOt.records.edges.length-1]),hOt.records.nodes[e].edges.push(hOt.records.edges[hOt.records.edges.length-1]))},"addEdge"),wOt=me(()=>hOt.records.edges,"getEdges"),kOt=me(()=>{if(void 0===hOt.records.dataStructures){let s={},o=Object.entries(hOt.records.nodes).reduce((t,[a,e])=>(t[a]=e.edges.reduce((t,e)=>{var r,i=yOt(e.lhsId)?.in,n=yOt(e.rhsId)?.in;return i&&n&&i!==n&&"bend"!==(r=eOt(e.lhsDir,e.rhsDir))&&(s[i]??={},s[i][n]=r,s[n]??={},s[n][i]=r),e.lhsId===a?(n=QDt(e.lhsDir,e.rhsDir))&&(t[n]=e.rhsId):(i=QDt(e.rhsDir,e.lhsDir))&&(t[i]=e.lhsId),t},{}),t),{}),r=Object.keys(o)[0],l={[r]:1},c=Object.keys(o).reduce((t,e)=>e===r?t:{...t,[e]:1},{}),t=me(t=>{let n={[t]:[0,0]},a=[t];for(;0{l[e]||(n[e]=JDt([r,i],t),a.push(e))})}}return n},"BFS"),e=[t(r)];for(;0{hOt.records.elements[t]=e},"setElementForId"),EOt=me(t=>hOt.records.elements[t],"getElementById"),COt={clear:uOt,setDiagramTitle:dh,getDiagramTitle:ph,setAccTitle:lh,getAccTitle:ch,setAccDescription:hh,getAccDescription:uh,addService:dOt,getServices:pOt,addJunction:gOt,getJunctions:fOt,getNodes:mOt,getNode:yOt,addGroup:vOt,getGroups:xOt,addEdge:bOt,getEdges:wOt,setElementForId:TOt,getElementById:EOt,getDataStructures:kOt},me(lOt,"getConfigField")}),BOt=t(()=>{Rpt(),e(),Ppt(),POt(),_Ot=me((t,e)=>{Mpt(t,e),t.groups.map(e.addGroup),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(e.addEdge)},"populateDb"),SOt={parse:me(async t=>{t=await Apt("architecture",t),M.debug(t),_Ot(t,COt)},"parse")}}),FOt=t(()=>{AOt=me(t=>` + ${BX()} +`,"getStyles"),LRt=ARt}),jRt=t(()=>{e(),NRt=me((e,t,r,n)=>{t.forEach(t=>{zRt[t](e,r,n)})},"insertMarkers"),IRt=me((t,e,r)=>{M.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),RRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),MRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),DRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),ORt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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"),PRt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),BRt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),FRt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),$Rt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),zRt={extension:IRt,composition:RRt,aggregation:MRt,dependency:DRt,lollipop:ORt,point:PRt,circle:BRt,cross:FRt,barb:$Rt},GRt=NRt});function WRt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}function YRt(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}),0layoutBlocks) ${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 x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 `+l*(s?.widthInColumns??1)/2),e=s.size.x+u,s.size.y=d.size.y-d.size.height/2+h*(c+KRt)+c/2+KRt,M.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${e}${KRt}${u}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2`+l*(s?.widthInColumns??1)/2)),s.children&&HRt(s,i),t+=s?.widthInColumns??1,M.debug("abc88 columnsPos",s,t))}}M.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function VRt(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(t.size&&"root"!==t.id&&({x:a,y:s,width:o,height:l}=t.size,a-o/2{e(),mu(),KRt=D()?.block?.padding??8,me(WRt,"calculateBlockPosition"),ZRt=me(t=>{let e=0,r=0;for(var n of t.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>e&&(e=i/(t.widthInColumns??1)),a>r)&&(r=a)}return{width:e,height:r}},"getMaxChildSize"),me(YRt,"setBlockSizes"),me(HRt,"layoutBlocks"),me(VRt,"findBounds"),me(XRt,"layout")});function JRt(t,e){e&&t.attr("style",e)}function tMt(t){var e=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),JRt(a,t.labelStyle),a.attr("class",i),JRt(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var eMt,rMt,nMt,iMt,aMt,sMt=t(()=>{Q3(),e(),mu(),th(),ZE(),Y9(),me(JRt,"applyStyle"),me(tMt,"addHtmlLabel"),eMt=me(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Dc(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),M.debug("vertexText"+i),tMt({isNode:n,label:await j9(XE(i)),labelStyle:e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|/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"),rMt=eMt}),oMt=t(()=>{e(),nMt=me((t,e,r,n,i)=>{e.arrowTypeStart&&aMt(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&aMt(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),iMt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},aMt=me((t,e,r,n,i,a)=>{var s=iMt[r];s?t.attr("marker-"+e,`url(${n}#${i}_${a}-${s}${"start"===e?"Start":"End"})`):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function lMt(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var cMt,hMt,uMt,dMt,pMt,gMt,fMt,mMt,yMt,vMt,xMt=t(()=>{e(),sMt(),Y9(),Q3(),mu(),ZE(),th(),tD(),WM(),oMt(),cMt={},hMt={},uMt=me(async(t,e)=>{var r,n=D(),i=Dc(n.flowchart.htmlLabels),n="markdown"===e.labelType?W9(t,e.label,{style:e.labelStyle,useHtmlLabels:i,addSvgBackground:!0},n):await rMt(e.label,e.labelStyle),a=t.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+")"),cMt[e.id]=a,e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(i=await rMt(e.startLabelLeft,e.labelStyle),s=(r=t.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+")"),hMt[e.id]||(hMt[e.id]={}),hMt[e.id].startLeft=r,lMt(l,e.startLabelLeft)),e.startLabelRight&&(i=await rMt(e.startLabelRight,e.labelStyle),a=(s=t.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+")"),hMt[e.id]||(hMt[e.id]={}),hMt[e.id].startRight=s,lMt(l,e.startLabelRight)),e.endLabelLeft&&(i=await rMt(e.endLabelLeft,e.labelStyle),r=(a=t.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),hMt[e.id]||(hMt[e.id]={}),hMt[e.id].endLeft=a,lMt(l,e.endLabelLeft)),e.endLabelRight&&(r=await rMt(e.endLabelRight,e.labelStyle),i=(s=t.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),hMt[e.id]||(hMt[e.id]={}),hMt[e.id].endRight=s,lMt(l,e.endLabelRight)),n},"insertEdgeLabel"),me(lMt,"setTerminalWidth"),dMt=me((n,i)=>{M.debug("Moving label abc88 ",n.id,n.label,cMt[n.id],i);var a,s=i.updatedPath||i.originalPath,o=D(),o=RM(o).subGraphTitleTotalMargin;if(n.label){let t=cMt[n.id],e=n.x,r=n.y;s&&(a=HE.calcLabelPosition(s),M.debug("Moving label "+n.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(n.startLabelLeft){let t=hMt[n.id].startLeft,e=n.x,r=n.y;s&&(i=HE.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=hMt[n.id].startRight,e=n.x,r=n.y;s&&(a=HE.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=hMt[n.id].endLeft,e=n.x,r=n.y;s&&(o=HE.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=hMt[n.id].endRight,e=n.x,r=n.y;s&&(i=HE.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),pMt=me((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n);return t.width/2<=r||t.height/2<=e},"outsideNode"),gMt=me((t,n,i)=>{M.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(n)} + insidePoint : ${JSON.stringify(i)} + node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),s=t.width/2,o=i.xMath.abs(a-n.x)*l)return t=i.y{M.debug("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],s=!1;return t.forEach(t=>{if(pMt(n,t)||s)a=t,s||i.push(t);else{let e=gMt(n,a,t),r=!1;i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)||i.push(e),s=!0}}),i},"cutPathAtIntersect"),mMt=me(function(t,e,r,n,i,a,s){let o=r.points,l=(M.debug("abc88 InsertEdge: edge=",r,"e=",e),!1),c=a.node(e.v),h=a.node(e.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=fMt(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(M.debug("from cluster abc88",n[r.fromCluster]),o=fMt(o.reverse(),n[r.fromCluster].node).reverse(),l=!0),o.filter(t=>!Number.isNaN(t.y))),d=d5,{x:p,y:g}=(!r.curve||"graph"!==i&&"flowchart"!==i||(d=r.curve),KM(r)),f=K4().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=t.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=Mc(!0)),nMt(y,r,v,s,i),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),bMt=t(()=>{yMt=me(t=>{var e,r=new Set;for(e of t)switch(e){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(e)}return r},"expandAndDeduplicateDirections"),vMt=me((t,e,r)=>{var t=yMt(t),n=e.height+2*r.padding,i=n/2,e=e.width+2*i+r.padding,r=r.padding/2;return t.has("right")&&t.has("left")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:i,y:0},{x:e/2,y:2*r},{x:e-i,y:0},{x:e,y:0},{x:e,y:-n/3},{x:e+2*r,y:-n/2},{x:e,y:-2*n/3},{x:e,y:-n},{x:e-i,y:-n},{x:e/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}]:t.has("right")&&t.has("left")&&t.has("up")?[{x:i,y:0},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("right")&&t.has("left")&&t.has("down")?[{x:0,y:0},{x:i,y:-n},{x:e-i,y:-n},{x:e,y:0}]:t.has("right")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:e,y:-i},{x:e,y:i-n},{x:0,y:-n}]:t.has("left")&&t.has("up")&&t.has("down")?[{x:e,y:0},{x:0,y:-i},{x:0,y:i-n},{x:e,y:-n}]:t.has("right")&&t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("up")&&t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:e/2,y:-n},{x:e,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r},{x:e,y:-r}]:t.has("right")&&t.has("up")?[{x:0,y:0},{x:e,y:-i},{x:0,y:-n}]:t.has("right")&&t.has("down")?[{x:0,y:0},{x:e,y:0},{x:0,y:-n}]:t.has("left")&&t.has("up")?[{x:e,y:0},{x:0,y:-i},{x:e,y:-n}]:t.has("left")&&t.has("down")?[{x:e,y:0},{x:0,y:0},{x:e,y:-n}]:t.has("right")?[{x:i,y:-r},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:r-n}]:t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("up")?[{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:e/2,y:-n},{x:e,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r}]:t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r},{x:e,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function wMt(t,e){return t.intersect(e)}var kMt,TMt=t(()=>{me(wMt,"intersectNode"),kMt=wMt});function EMt(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,s=t-n.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(n.x{me(EMt,"intersectEllipse"),CMt=EMt});function SMt(t,e,r){return CMt(t,e,e,r)}var AMt,LMt=t(()=>{_Mt(),me(SMt,"intersectCircle"),AMt=SMt});function NMt(t,e,r,n){var i,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0{me(NMt,"intersectLine"),me(IMt,"sameSign"),RMt=NMt});function DMt(t,e,n){var r=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-s,c=i-t.height/2-o,h=0;h{MMt(),me(OMt=DMt,"intersectPolygon")}),zMt=t(()=>{PMt=me((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:n+r,y:i+t}},"intersectRect"),BMt=PMt}),GMt=t(()=>{TMt(),LMt(),_Mt(),$Mt(),zMt(),FMt={node:kMt,circle:AMt,ellipse:CMt,polygon:OMt,rect:BMt}});function UMt(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var qMt,jMt,WMt,YMt,HMt=t(()=>{sMt(),Y9(),mu(),Q3(),th(),ZE(),qMt=me(async(t,e,r,i)=>{let a=D(),n,s=e.useHtmlLabels||Dc(a.flowchart.htmlLabels),o=(n=r||"node default",t.insert("g").attr("class",n).attr("id",e.domId||e.id)),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),c,h=(c=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],l.node()),u,d=(u="markdown"===e.labelType?W9(l,Sc(XE(c),a),{useHtmlLabels:s,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(await rMt(Sc(XE(c),a),e.labelStyle,!1,i))).getBBox(),p=e.padding/2;if(Dc(a.flowchart.htmlLabels)){if(r=u.children[0],t=H(u),i=r.getElementsByTagName("img")){let n=""===c.replace(/]*>/g,"").trim();await Promise.all([...i].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=a.fontSize||window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}d=r.getBoundingClientRect(),t.attr("width",d.width),t.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.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"),jMt=me((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),me(UMt,"insertPolygonShape")}),VMt=t(()=>{HMt(),e(),mu(),GMt(),WMt=me(async(t,e)=>{e.useHtmlLabels||D().flowchart.htmlLabels||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:n}=await qMt(t,e,"node "+e.classes,!0),i=(M.info("Classes = ",e.classes),t.insert("rect",":first-child"));return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-n).attr("y",-r.height/2-n).attr("width",r.width+e.padding).attr("height",r.height+e.padding),jMt(e,i),e.intersect=function(t){return FMt.rect(e,t)},t},"note"),YMt=WMt});function XMt(t,e,r,n){let i=[],a=me(t=>{i.push(t,0)},"addBorder"),s=me(t=>{i.push(0,t)},"skipBorder");(e.includes("t")?(M.debug("add top border"),a):s)(r),(e.includes("r")?(M.debug("add right border"),a):s)(n),(e.includes("b")?(M.debug("add bottom border"),a):s)(r),(e.includes("l")?(M.debug("add left border"),a):s)(n),t.attr("stroke-dasharray",i.join(" "))}var KMt,ZMt,QMt,JMt,tDt,eDt,rDt,nDt,iDt,aDt,sDt,oDt,lDt,cDt,hDt,uDt,dDt,pDt,gDt,fDt,mDt,yDt,vDt,xDt,bDt,wDt,kDt,TDt,EDt,CDt=t(()=>{Q3(),mu(),th(),e(),bMt(),sMt(),GMt(),VMt(),HMt(),KMt=me(t=>t?" "+t:"","formatClass"),ZMt=me((t,e)=>`${e||"node default"}${KMt(t.classes)} `+KMt(t.class),"getClassesFromNode"),QMt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.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)"),(t=UMt(r,s,s,o)).attr("style",e.style),jMt(e,t),e.intersect=function(t){return M.warn("Intersect called"),FMt.polygon(e,o,t)},r},"question"),JMt=me((t,e)=>((t=t.insert("g").attr("class","node default").attr("id",e.domId||e.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(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return FMt.circle(e,14,t)},t),"choice"),tDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.height+e.padding,a=i/4,s=n.width+2*a+e.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=UMt(r,s,i,o);return l.attr("style",e.style),jMt(e,l),e.intersect=function(t){return FMt.polygon(e,o,t)},r},"hexagon"),eDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,void 0,!0),i=n.height+2*e.padding,a=i/2,s=n.width+2*a+e.padding,o=vMt(e.directions,n,e),l=UMt(r,s,i,o);return l.attr("style",e.style),jMt(e,l),e.intersect=function(t){return FMt.polygon(e,o,t)},r},"block_arrow"),rDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.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 UMt(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return FMt.polygon(e,s,t)},r},"rect_left_inv_arrow"),nDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e),!0),i=n.width+e.padding,a=n.height+e.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=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"lean_right"),iDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.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=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"lean_left"),aDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.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=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"trapezoid"),sDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.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=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"inv_trapezoid"),oDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.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=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"rect_right_inv_arrow"),lDt=me(async(t,i)=>{let{shapeSvg:e,bbox:r}=await qMt(t,i,ZMt(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=e.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 jMt(i,c),i.intersect=function(e){var r=FMt.rect(i,e),n=r.x-i.x;if(0!=a&&(Math.abs(n)i.height/2-s)){let t=s*s*(1-n*n/(a*a));0!=t&&(t=Math.sqrt(t)),t=s-t,0{var{shapeSvg:t,bbox:r,halfPadding:n}=await qMt(t,e,"node "+e.classes+" "+e.class,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-s/2:-r.height/2-n;return i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(XMt(i,e.props.borders,a,s),n.delete("borders")),n.forEach(t=>{M.warn("Unknown node property "+t)})),jMt(e,i),e.intersect=function(t){return FMt.rect(e,t)},t},"rect"),hDt=me(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:n}=await qMt(t,e,"node "+e.classes,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-s/2:-r.height/2-n;return i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(XMt(i,e.props.borders,a,s),n.delete("borders")),n.forEach(t=>{M.warn("Unknown node property "+t)})),jMt(e,i),e.intersect=function(t){return FMt.rect(e,t)},t},"composite"),uDt=me(async(t,e)=>{var r,t=(await qMt(t,e,"label",!0)).shapeSvg,n=(M.trace("Classes = ",e.class),t.insert("rect",":first-child"));return n.attr("width",0).attr("height",0),t.attr("class","label edgeLabel"),e.props&&(r=new Set(Object.keys(e.props)),e.props.borders&&(XMt(n,e.props.borders,0,0),r.delete("borders")),r.forEach(t=>{M.warn("Unknown node property "+t)})),jMt(e,n),e.intersect=function(t){return FMt.rect(e,t)},t},"labelRect"),me(XMt,"applyNodePropertyBorders"),dDt=me(async(t,e)=>{let r,n=(r=e.classes?"node "+e.classes:"node default",t.insert("g").attr("class",r).attr("id",e.domId||e.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l,c=(l="object"==typeof o?o[0]:o,M.info("Label text abc79",l,o,"object"==typeof o),s.node().appendChild(await rMt(l,e.labelStyle,!0,!0))),h={width:0,height:0};Dc(D().flowchart.htmlLabels)&&(t=c.children[0],d=H(c),h=t.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),M.info("Text 2",o);var u,t=o.slice(1,o.length),d=c.getBBox(),t=s.node().appendChild(await rMt(t.join?t.join("
"):t,e.labelStyle,!0,!0)),p=(Dc(D().flowchart.htmlLabels)&&(p=t.children[0],u=H(t),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),e.padding/2);return H(t).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),H(c).attr("transform","translate( "+(h.width{var{shapeSvg:t,bbox:r}=await qMt(t,e,ZMt(e,void 0),!0),n=r.height+e.padding,r=r.width+n/4+e.padding,r=t.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-r/2).attr("y",-n/2).attr("width",r).attr("height",n);return jMt(e,r),e.intersect=function(t){return FMt.rect(e,t)},t},"stadium"),gDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await qMt(t,e,ZMt(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),M.info("Circle main"),jMt(e,a),e.intersect=function(t){return M.info("Circle intersect",e,n.width/2+i,t),FMt.circle(e,n.width/2+i,t)},r},"circle"),fDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await qMt(t,e,ZMt(e,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),M.info("DoubleCircle main"),jMt(e,s),e.intersect=function(t){return M.info("DoubleCircle intersect",e,n.width/2+i+5,t),FMt.circle(e,n.width/2+i+5,t)},r},"doublecircle"),mDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.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=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"subroutine"),yDt=me((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),jMt(e,r),e.intersect=function(t){return FMt.circle(e,7,t)},t},"start"),vDt=me((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;return"LR"===r&&(i=10,a=70),t=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join"),jMt(e,t),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return FMt.rect(e,t)},n},"forkJoin"),xDt=me((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child"),n=t.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),jMt(e,n),e.intersect=function(t){return FMt.circle(e,7,t)},t},"end"),bDt=me(async(t,s)=>{let e=s.padding/2,r,n=(r=s.classes?"node "+s.classes:"node default",t.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 rMt(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=(Dc(D().flowchart.htmlLabels)&&(t=g.children[0],y=H(g),f=t.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(t=h.node().appendChild(await rMt(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=t.getBBox(),x=(Dc(D().flowchart.htmlLabels)&&(y=t.children[0],w=H(t),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 t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(await rMt(r,e.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;Dc(D().flowchart.htmlLabels)&&(t=n.children[0],a=H(n),i=t.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 t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(await rMt(r,e.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;Dc(D().flowchart.htmlLabels)&&(t=n.children[0],a=H(n),i=t.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(t).attr("transform","translate( "+(-1*l/2+w)+", "+(-1*c/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,x.forEach(t=>{H(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,b.forEach(t=>{H(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),i.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-e).attr("y",-c/2-e).attr("width",l+s.padding).attr("height",c+s.padding),jMt(s,i),s.intersect=function(t){return FMt.rect(s,t)},n},"class_box"),wDt={rhombus:QMt,composite:hDt,question:QMt,rect:cDt,labelRect:uDt,rectWithTitle:dDt,choice:JMt,circle:gDt,doublecircle:fDt,stadium:pDt,hexagon:tDt,block_arrow:eDt,rect_left_inv_arrow:rDt,lean_right:nDt,lean_left:iDt,trapezoid:aDt,inv_trapezoid:sDt,rect_right_inv_arrow:oDt,cylinder:lDt,start:yDt,end:xDt,note:YMt,subroutine:mDt,fork:vDt,join:vDt,class_box:bDt},kDt={},TDt=me(async(e,r,n)=>{let i,a;if(r.link){let t;"sandbox"===D().securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t),a=await wDt[r.shape](i,r,n)}else a=await wDt[r.shape](e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),kDt[r.id]=i,r.haveCallback&&kDt[r.id].attr("class",kDt[r.id].attr("class")+" clickable"),i},"insertNode"),EDt=me(t=>{var e=kDt[t.id],r=(M.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")});function _Dt(t,e,r=!1){let n=t,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 t=fE(n?.styles??[]),l=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:t.labelStyle,shape:s,labelText:n.label,rx:a,ry:a,class:i,style:t.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 SDt(t,e,r){var n;"group"!==(e=_Dt(e,0,!1)).type&&(n=Ir(),n=(t=await TDt(t,e,{config:n})).node().getBBox(),(e=r.getBlock(e.id)).size={width:n.width,height:n.height,x:0,y:0,node:t},r.setBlock(e),t.remove())}async function ADt(t,e,r){var n=_Dt(e,0,!0);"space"!==r.getBlock(n.id).type&&(r=Ir(),await TDt(t,n,{config:r}),e.intersect=n?.intersect,EDt(n))}async function LDt(t,e,r,n){for(var i of e)await n(t,i,r),i.children&&await LDt(t,i.children,r,n)}async function NDt(t,e,r){await LDt(t,e,r,SDt)}async function IDt(t,e,r){await LDt(t,e,r,ADt)}async function RDt(t,e,r,n,i){var a,s,o,l,c=new FW({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 e)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}],mMt(t,{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 uMt(t,{...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"}),dMt({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var MDt,DDt,ODt,PDt=t(()=>{zW(),Nn(),xMt(),CDt(),ZE(),me(_Dt,"getNodeFromBlock"),me(SDt,"calculateBlockSize"),me(ADt,"insertBlockPositioned"),me(LDt,"performOperations"),me(NDt,"calculateBlockSizes"),me(IDt,"insertBlocks"),me(RDt,"insertEdges")}),BDt=t(()=>{Q3(),Nn(),jRt(),e(),eh(),QRt(),PDt(),MDt=me(function(t,e){return e.db.getClasses()},"getClasses"),DDt=me(async function(t,e,r,n){let{securityLevel:i,block:a}=Ir(),s=n.db,o;"sandbox"===i&&(o=H("#i"+e));var l=H("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===i?l.select(`[id="${e}"]`):H(`[id="${e}"]`),n=(GRt(l,["point","circle","cross"],n.type,e),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await NDt(u,n,s),XRt(s));await IDt(u,n,s),await RDt(u,h,c,s,e),d&&(n=d,u=Math.max(1,Math.round(n.width/n.height*.125)),h=n.height+u+10,c=n.width+10,e=a.useMaxWidth,Vc(l,h,c,!!e),M.debug("Here Bounds",d,n),l.attr("viewBox",`${n.x-5} ${n.y-5} ${n.width+10} `+(n.height+10)))},"draw"),ODt={draw:DDt,getClasses:MDt}}),FDt={};oPt(FDt,{diagram:()=>$Dt});var $Dt,zDt,GDt,UDt,qDt,jDt,WDt,YDt,HDt,VDt,XDt,KDt,ZDt,QDt,JDt,tOt,eOt,rOt,nOt,iOt=t(()=>{QIt(),URt(),qRt(),BDt(),$Dt={parser:KIt,db:_Rt,renderer:ODt,styles:LRt}}),aOt=t(()=>{zDt={L:"left",R:"right",T:"top",B:"bottom"},GDt={L:me(t=>t+`,${t/2} 0,${t} 0,0`,"L"),R:me(t=>`0,${t/2} ${t},0 ${t},`+t,"R"),T:me(t=>`0,0 ${t},0 ${t/2},`+t,"T"),B:me(t=>t/2+`,0 ${t},${t} 0,`+t,"B")},UDt={L:me((t,e)=>t-e+2,"L"),R:me((t,e)=>t-2,"R"),T:me((t,e)=>t-e+2,"T"),B:me((t,e)=>t-2,"B")},qDt=me(function(t){return WDt(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),jDt=me(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),WDt=me(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),YDt=me(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),HDt=me(function(t,e){var r=WDt(t)&&YDt(e),t=YDt(t)&&WDt(e);return r||t},"isArchitectureDirectionXY"),VDt=me(function(t){var e=t[0],t=t[1],r=WDt(e)&&YDt(t),e=YDt(e)&&WDt(t);return r||e},"isArchitecturePairXY"),XDt=me(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),KDt=me(function(t,e){return XDt(t=""+t+e)?t:void 0},"getArchitectureDirectionPair"),ZDt=me(function([t,e],r){var n=r[0],r=r[1];return WDt(n)?YDt(r)?[t+("L"===n?-1:1),e+("T"===r?1:-1)]:[t+("L"===n?-1:1),e]:WDt(r)?[t+("L"===r?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),QDt=me(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),JDt=me(function(t,e){return HDt(t,e)?"bend":WDt(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),tOt=me(function(t){return"service"===t.type},"isArchitectureService"),eOt=me(function(t){return"junction"===t.type},"isArchitectureJunction"),rOt=me(t=>t.data(),"edgeData"),nOt=me(t=>t.data(),"nodeData")});function sOt(t){return TOt()[t]}var oOt,lOt,cOt,hOt,uOt,dOt,pOt,gOt,fOt,mOt,yOt,vOt,xOt,bOt,wOt,kOt,TOt,EOt,COt,_Ot,SOt,AOt,LOt,NOt,IOt,ROt,MOt,DOt,OOt=t(()=>{An(),Nn(),$pt(),fu(),aOt(),ZE(),oOt=yr.architecture,lOt=new Ppt(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:oOt,dataStructures:void 0,elements:{}})),cOt=me(()=>{lOt.reset(),lh()},"clear"),hOt=me(function({id:t,icon:e,in:r,title:n,iconText:i}){if(void 0!==lOt.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another `+lOt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===lOt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===lOt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent is not a group`)}lOt.records.registeredIds[t]="node",lOt.records.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}},"addService"),uOt=me(()=>Object.values(lOt.records.nodes).filter(tOt),"getServices"),dOt=me(function({id:t,in:e}){lOt.records.registeredIds[t]="node",lOt.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),pOt=me(()=>Object.values(lOt.records.nodes).filter(eOt),"getJunctions"),gOt=me(()=>Object.values(lOt.records.nodes),"getNodes"),fOt=me(t=>lOt.records.nodes[t],"getNode"),mOt=me(function({id:t,icon:e,in:r,title:n}){if(void 0!==lOt.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another `+lOt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===lOt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===lOt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent is not a group`)}lOt.records.registeredIds[t]="group",lOt.records.groups[t]={id:t,icon:e,title:n,in:r}},"addGroup"),yOt=me(()=>Object.values(lOt.records.groups),"getGroups"),vOt=me(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!jDt(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+r);if(!jDt(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+n);if(void 0===lOt.records.nodes[t]&&void 0===lOt.records.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===lOt.records.nodes[e]&&void 0===lOt.records.groups[t])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);var c=lOt.records.nodes[t].in,h=lOt.records.nodes[e].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);lOt.records.edges.push({lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:o,title:l}),lOt.records.nodes[t]&&lOt.records.nodes[e]&&(lOt.records.nodes[t].edges.push(lOt.records.edges[lOt.records.edges.length-1]),lOt.records.nodes[e].edges.push(lOt.records.edges[lOt.records.edges.length-1]))},"addEdge"),xOt=me(()=>lOt.records.edges,"getEdges"),bOt=me(()=>{if(void 0===lOt.records.dataStructures){let s={},o=Object.entries(lOt.records.nodes).reduce((t,[a,e])=>(t[a]=e.edges.reduce((t,e)=>{var r,n=fOt(e.lhsId)?.in,i=fOt(e.rhsId)?.in;return n&&i&&n!==i&&"bend"!==(r=JDt(e.lhsDir,e.rhsDir))&&(s[n]??={},s[n][i]=r,s[i]??={},s[i][n]=r),e.lhsId===a?(i=KDt(e.lhsDir,e.rhsDir))&&(t[i]=e.rhsId):(n=KDt(e.rhsDir,e.lhsDir))&&(t[n]=e.lhsId),t},{}),t),{}),r=Object.keys(o)[0],l={[r]:1},c=Object.keys(o).reduce((t,e)=>e===r?t:{...t,[e]:1},{}),t=me(t=>{let i={[t]:[0,0]},a=[t];for(;0{l[e]||(i[e]=ZDt([r,n],t),a.push(e))})}}return i},"BFS"),e=[t(r)];for(;0{lOt.records.elements[t]=e},"setElementForId"),kOt=me(t=>lOt.records.elements[t],"getElementById"),TOt=me(()=>bE({...oOt,...Ir().architecture}),"getConfig"),EOt={clear:cOt,setDiagramTitle:ph,getDiagramTitle:gh,setAccTitle:ch,getAccTitle:hh,setAccDescription:uh,getAccDescription:dh,getConfig:TOt,addService:hOt,getServices:uOt,addJunction:dOt,getJunctions:pOt,getNodes:gOt,getNode:fOt,addGroup:mOt,getGroups:yOt,addEdge:vOt,getEdges:xOt,setElementForId:wOt,getElementById:kOt,getDataStructures:bOt},me(sOt,"getConfigField")}),POt=t(()=>{Mpt(),e(),Bpt(),OOt(),COt=me((t,e)=>{Dpt(t,e),t.groups.map(e.addGroup),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(e.addEdge)},"populateDb"),_Ot={parse:me(async t=>{t=await Lpt("architecture",t),M.debug(t),COt(t,EOt)},"parse")}}),BOt=t(()=>{SOt=me(t=>` .edge { stroke-width: ${t.archEdgeWidth}; stroke: ${t.archEdgeColor}; @@ -2548,17 +2577,17 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l display: -webkit-box; -webkit-box-orient: vertical; } -`,"getStyles"),LOt=AOt}),$Ot=iPt((r,i)=>{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function i(){}me(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_HALF_SIZE=(i.SIMPLE_NODE_SIZE=40)/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.INITIAL_WORLD_BOUNDARY=(i.WORLD_BOUNDARY=1e6)/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,t.exports=i},function(t,e,r){var i,n=r(2),a=r(8),s=r(9);function o(t,e,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(i in me(o,"LEdge"),o.prototype=Object.create(n.prototype),n)o[i]=n[i];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),i=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==i)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[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)},t.exports=o},function(t,e,r){function i(t){this.vGraphObject=t}me(i,"LGraphObject"),t.exports=i},function(t,e,r){var i,n=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(5);function h(t,e,r,i){n.call(this,i=null==r&&null==i?e:i),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=i,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(i in me(h,"LNode"),h.prototype=Object.create(n.prototype),n)h[i]=n[i];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},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(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],i=this;return i.edges.forEach(function(t){if(t.target==e){if(t.source!=i)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],i=this;return i.edges.forEach(function(t){if(t.source!=i&&t.target!=i)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;rt?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(t+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(e+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>e?(this.rect.y-=(this.labelHeight-e)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(e+this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);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()},t.exports=h},function(t,e,r){var i,n=r(0);function a(){}for(i in me(a,"FDLayoutConstants"),n)a[i]=n[i];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT=3*(a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=a},function(t,e,r){function i(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}me(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(t){this.x=t},i.prototype.setY=function(t){this.y=t},i.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=i},function(t,e,r){var i,n=r(2),d=r(10),a=r(0),s=r(7),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(t,e,r){n.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(i in me(u,"LGraph"),u.prototype=Object.create(n.prototype),n)u[i]=n[i];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,r){if(null==e&&null==r){var i=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,n.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function i(t){c=r(6),this.layout=t,this.graphs=[],this.edges=[]}me(i,"LGraphManager"),i.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},i.prototype.add=function(t,e,r,i,n){if(null==r&&null==i&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-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 t,e=this.getAllEdges(),r=0;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{for(var e=[];0{for(var e=[];0{for(var e=[];0=this.s[u+1]);){var M=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=M,uMath.abs(e)?(r=e/t,Math.abs(t)*Math.sqrt(1+r*r)):0!=e?(r=t/e,Math.abs(e)*Math.sqrt(1+r*r)):0},t.exports=At},function(t,e,r){var i,n;function a(t,e){for(var r=0;r{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e($Ot()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e($Ot()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(e){return i={45:(t,e,r)=>{var i={};i.layoutBase=r(551),i.CoSEConstants=r(806),i.CoSEEdge=r(767),i.CoSEGraph=r(880),i.CoSEGraphManager=r(578),i.CoSELayout=r(765),i.CoSENode=r(991),i.ConstraintHandler=r(902),t.exports=i},806:(t,e,r)=>{var i,n=r(551).FDLayoutConstants;function a(){}for(i in me(a,"CoSEConstants"),n)a[i]=n[i];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,t.exports=a},767:(t,e,r)=>{var i,n=r(551).FDLayoutEdge;function a(t,e,r){n.call(this,t,e,r)}for(i in me(a,"CoSEEdge"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},880:(t,e,r)=>{var i,n=r(551).LGraph;function a(t,e,r){n.call(this,t,e,r)}for(i in me(a,"CoSEGraph"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},578:(t,e,r)=>{var i,n=r(551).LGraphManager;function a(t){n.call(this,t)}for(i in me(a,"CoSEGraphManager"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},765:(t,e,r)=>{var i,n=r(551).FDLayout,a=r(578),s=r(880),h=r(991),o=r(767),f=r(806),l=r(902),m=r(551).FDLayoutConstants,u=r(551).LayoutConstants,d=r(551).Point,p=r(551).PointD,c=r(551).DimensionD,g=r(551).Layout,y=r(551).Integer,v=r(551).IGeometry,x=r(551).LGraph,b=r(551).Transform,w=r(551).LinkedList;function k(){n.call(this),this.toBeTiled={},this.constraints={}}for(i in me(k,"CoSELayout"),k.prototype=Object.create(n.prototype),n)k[i]=n[i];k.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t},k.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},k.prototype.newNode=function(t){return new h(this.graphManager,t)},k.prototype.newEdge=function(t){return new o(null,null,t)},k.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(f.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=f.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=f.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},k.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},k.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},k.prototype.classicLayout=function(){var t,e,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(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(t=this.getFlatForest()).length?this.positionNodesRadially(t):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),0=2*t.length/3;i--)e=Math.floor(Math.random()*(i+1)),r=t[i],t[i]=t[e],t[e]=r;return t},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(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.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(e)||(s.nodesInRelativeHorizontal.push(e),s.nodeToRelativeConstraintMapHorizontal.set(e,[]),s.dummyToNodeForVerticalAlignment.has(e)?s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(e)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(e).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(r).push({right:e,gap:t.gap}),s.nodeToRelativeConstraintMapHorizontal.get(e).push({left:r,gap:t.gap})):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,s.nodesInRelativeVertical.includes(e)||(s.nodesInRelativeVertical.push(e),s.nodeToRelativeConstraintMapVertical.set(e,[]),s.dummyToNodeForHorizontalAlignment.has(e)?s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(e)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(e).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(e).push({bottom:r,gap:t.gap}),s.nodeToRelativeConstraintMapVertical.get(r).push({top:e,gap:t.gap}))})):(a=new Map,o=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.right,a.has(r)?a.get(r).push(e):a.set(r,[e]),a.has(e)?a.get(e).push(r):a.set(e,[r])):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,o.has(e)?o.get(e).push(r):o.set(e,[r]),o.has(r)?o.get(r).push(e):o.set(r,[e]))}),c=(l=me(function(i,n){var a=[],s=[],o=new w,l=new Set,c=0;return i.forEach(function(t,e){if(!l.has(e)){for(a[c]=[],s[c]=!1,o.push(r=e),l.add(r),a[c].push(r);0!=o.length;){var r=o.shift();n.has(r)&&(s[c]=!0),i.get(r).forEach(function(t){l.has(t)||(o.push(t),l.add(t),a[c].push(t))})}c++}}),{components:a,isFixed:s}},"constructComponents"))(a,s.fixedNodesOnHorizontal),this.componentsOnHorizontal=c.components,this.fixedComponentsOnHorizontal=c.isFixed,c=l(o,s.fixedNodesOnVertical),this.componentsOnVertical=c.components,this.fixedComponentsOnVertical=c.isFixed)}},k.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){(t=n.idToNodeMap.get(t.nodeId)).displacementX=0,t.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,e=0;ei&&(i=Math.floor(s.y)),a=Math.floor(s.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-s.x/2,u.WORLD_CENTER_Y-s.y/2))},k.radialLayout=function(t,e,r){var i=Math.max(this.maxDiagonalInTree(t),f.DEFAULT_RADIAL_SEPARATION),e=(k.branchRadialLayout(e,null,0,359,0,i),x.calculateBounds(t)),n=new b;n.setDeviceOrgX(e.getMinX()),n.setDeviceOrgY(e.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;at?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,e.paddingLeft,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)}},k.prototype.repopulateZeroDegreeMembers=function(){var i=this,n=this.tiledZeroDegreePack;Object.keys(n).forEach(function(t){var e=i.idToDummyNode[t],r=e.paddingLeft;i.adjustLocations(n[t],e.rect.x,e.rect.y,r,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)})},k.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var r=t.getNodes(),i=0;ih&&(h=d.rect.height)}r+=h+t.verticalPadding}},k.prototype.tileCompoundMembers=function(i,n){var a=this;this.tiledMemberPack=[],Object.keys(i).forEach(function(t){var e,r=n[t];a.tiledMemberPack[t]=a.tileNodes(i[t],r.paddingLeft+r.paddingRight),r.rect.width=a.tiledMemberPack[t].width,r.rect.height=a.tiledMemberPack[t].height,r.setCenter(a.tiledMemberPack[t].centerX,a.tiledMemberPack[t].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(t=r.rect.width,e=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(t+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>t?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.tileNodes=function(t,e){var r=this.tileNodesByFavoringDim(t,e,!0),t=this.tileNodesByFavoringDim(t,e,!1),e=this.getOrgRatio(r);return this.getOrgRatio(t)l&&(l=t.getWidth())}),s/a),c=o/a,c=Math.pow(i-n,2)+4*(t+n)*(c+i)*a,a=(n-i+Math.sqrt(c))/(2*(t+n));return e?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((i=r*(t+n)-n)t.rowHeight[r]&&(n=t.rowHeight[r],t.rowHeight[r]=i,n=t.rowHeight[r]-n),t.height+=n,t.rows[r].push(e)},k.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,i=0;ir&&(e=i,r=t.rowWidth[i]);return e},k.prototype.canAddHorizontal=function(t,e,r){var i,n,a;return t.idealRowWidth?(n=t.rows.length-1,t.rowWidth[n]+e+t.horizontalPadding<=t.idealRowWidth):(n=this.getShortestRowIndex(t))<0||(a=t.rowWidth[n])+t.horizontalPadding+e<=t.width||(i=0,t.rowHeight[n]a&&e!=r){i.splice(-1,1),t.rows[r].push(n),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=i[o].height);0{var i,n=r(551).FDLayoutNode,a=r(551).IMath;function s(t,e,r,i){n.call(this,t,e,r,i)}for(i in me(s,"CoSENode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0{function Pt(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);eX&&(X=m[w].length,K=w);X{t.exports=e}},n={},me(r,"__webpack_require__"),r(45);function r(t){var e=n[t];return void 0===e&&(e=n[t]={exports:{}},i[t](e,e.exports,r)),e.exports}var i,n})}),GOt=iPt((r,i)=>{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e(zOt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeFcose=e(zOt()):t.cytoscapeFcose=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(e){return i={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var t=arguments.length,e=Array(1{me(C,"sliceIterator");var i=r(140).layoutBase.LinkedList;function C(t,e){var r=[],i=!0,n=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(i=(s=o.next()).done)&&(r.push(s.value),!e||r.length!==e);i=!0);}catch(t){n=!0,a=t}finally{try{!i&&o.return&&o.return()}finally{if(n)throw a}}return r}t.exports=r={getTopMostNodes:function(t){for(var i={},e=0;e{if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return C(t,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],x=y[1],b=e.cy.getElementById(v);b&&(d=b.boundingBox(),p=n.xCoords[x]-d.w/2,g=n.xCoords[x]+d.w/2,f=n.yCoords[x]-d.h/2,m=n.yCoords[x]+d.h/2,p{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=me(function(c,t){var e=c.cy,r=(n=c.eles).nodes(),i=n.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=t.nodeIndexes,p=t.xCoords,g=t.yCoords),me(function(t){return"function"==typeof t},"isFn")),m=me(function(t,e){return h(t)?t(e):t},"optFn"),y=v.calcParentsWithoutChildren(e,n),t=me(function t(e,r,i,n){for(var a=r.length,s=0;s{function i(t,e){for(var r=0;r{var G=r(548),U=r(140).layoutBase.Matrix,q=r(140).layoutBase.SVD,r=me(function(t){var n=t.cy,a=t.eles,e=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=t.piTol,i=t.samplingType,T=t.nodeSeparation,d=void 0,P=me(function(){for(var t=0,e=!1;t{var i=r(212),r=me(function(t){t&&t("layout","fcose",i)},"register");typeof cytoscape<"u"&&r(cytoscape),t.exports=r},140:t=>{t.exports=e}},n={},me(r,"__webpack_require__"),r(579);function r(t){var e=n[t];return void 0===e&&(e=n[t]={exports:{}},i[t](e,e.exports,r)),e.exports}var i,n})}),UOt=t(()=>{qt(),NOt=me(t=>`${t}`,"wrapIcon"),IOt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:NOt('')},server:{body:NOt('')},disk:{body:NOt('')},internet:{body:NOt('')},cloud:{body:NOt('')},unknown:Rt,blank:{body:NOt("")}}}}),qOt=t(()=>{qt(),fu(),W9(),POt(),UOt(),oOt(),ROt=me(async function(w,t){let k=lOt("padding"),e=lOt("iconSize"),T=e/2,E=e/6,C=E/2;await Promise.all(t.edges().map(async t=>{let{source:e,sourceDir:r,sourceArrow:i,sourceGroup:n,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=nOt(t),{x:h,y:u}=t[0].sourceEndpoint(),{x:d,y:p}=t[0].midpoint(),{x:g,y:f}=t[0].targetEndpoint(),m=k+4;var y,v,x,b;n&&(HDt(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(HDt(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),n||"junction"!==COt.getNode(e)?.type||(HDt(r)?h+="L"===r?T:-T:u+="T"===r?T:-T),l||"junction"!==COt.getNode(a)?.type||(HDt(s)?g+="L"===s?T:-T:f+="T"===s?T:-T),t[0]._private.rscratch&&((t=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge"),i&&(b=HDt(r)?jDt[r](h,E):h-C,y=VDt(r)?jDt[r](u,E):u-C,t.insert("polygon").attr("points",qDt[r](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),o&&(b=HDt(s)?jDt[s](g,E):g-C,y=VDt(s)?jDt[s](f,E):f-C,t.insert("polygon").attr("points",qDt[s](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=XDt(r,s)?"XY":HDt(r)?"X":"Y")?Math.abs(h-g):"Y"==x?Math.abs(u-f)/1.5:Math.abs(h-g)/2,b=t.append("g"),await j9(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=QDt(r,s))&&KDt(y)&&(t=b.node().getBoundingClientRect(),[y,v]=tOt(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",` +`,"getStyles"),AOt=SOt}),FOt=rPt((r,n)=>{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}me(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,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),s=r(9);function o(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in me(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(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[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)},t.exports=o},function(t,e,r){function n(t){this.vGraphObject=t}me(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(5);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(n in me(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(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},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(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.target==e){if(t.source!=n)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.source!=n&&t.target!=n)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;rt?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(t+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(e+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>e?(this.rect.y-=(this.labelHeight-e)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(e+this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);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()},t.exports=h},function(t,e,r){var n,i=r(0);function a(){}for(n in me(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,t.exports=a},function(t,e,r){function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}me(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,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(t,e,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=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in me(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(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,i.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function n(t){c=r(6),this.layout=t,this.graphs=[],this.edges=[]}me(n,"LGraphManager"),n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},n.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-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 t,e=this.getAllEdges(),r=0;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{for(var e=[];0{for(var e=[];0{for(var e=[];0=this.s[u+1]);){var M=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=M,uMath.abs(e)?(r=e/t,Math.abs(t)*Math.sqrt(1+r*r)):0!=e?(r=t/e,Math.abs(e)*Math.sqrt(1+r*r)):0},t.exports=At},function(t,e,r){var n,i;function a(t,e){for(var r=0;r{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(FOt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(FOt()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(e){return n={45:(t,e,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),t.exports=n},806:(t,e,r)=>{var n,i=r(551).FDLayoutConstants;function a(){}for(n in me(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,t.exports=a},767:(t,e,r)=>{var n,i=r(551).FDLayoutEdge;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},880:(t,e,r)=>{var n,i=r(551).LGraph;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},578:(t,e,r)=>{var n,i=r(551).LGraphManager;function a(t){i.call(this,t)}for(n in me(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},765:(t,e,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 me(k,"CoSELayout"),k.prototype=Object.create(i.prototype),i)k[n]=i[n];k.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t},k.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},k.prototype.newNode=function(t){return new h(this.graphManager,t)},k.prototype.newEdge=function(t){return new o(null,null,t)},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 t,e,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(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(t=this.getFlatForest()).length?this.positionNodesRadially(t):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),0=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),r=t[n],t[n]=t[e],t[e]=r;return t},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(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.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(e)||(s.nodesInRelativeHorizontal.push(e),s.nodeToRelativeConstraintMapHorizontal.set(e,[]),s.dummyToNodeForVerticalAlignment.has(e)?s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(e)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(e).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(r).push({right:e,gap:t.gap}),s.nodeToRelativeConstraintMapHorizontal.get(e).push({left:r,gap:t.gap})):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,s.nodesInRelativeVertical.includes(e)||(s.nodesInRelativeVertical.push(e),s.nodeToRelativeConstraintMapVertical.set(e,[]),s.dummyToNodeForHorizontalAlignment.has(e)?s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(e)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(e).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(e).push({bottom:r,gap:t.gap}),s.nodeToRelativeConstraintMapVertical.get(r).push({top:e,gap:t.gap}))})):(a=new Map,o=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.right,a.has(r)?a.get(r).push(e):a.set(r,[e]),a.has(e)?a.get(e).push(r):a.set(e,[r])):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,o.has(e)?o.get(e).push(r):o.set(e,[r]),o.has(r)?o.get(r).push(e):o.set(r,[e]))}),c=(l=me(function(n,i){var a=[],s=[],o=new w,l=new Set,c=0;return n.forEach(function(t,e){if(!l.has(e)){for(a[c]=[],s[c]=!1,o.push(r=e),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(t){l.has(t)||(o.push(t),l.add(t),a[c].push(t))})}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(t){(t=i.idToNodeMap.get(t.nodeId)).displacementX=0,t.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,e=0;en&&(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(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),f.DEFAULT_RADIAL_SEPARATION),e=(k.branchRadialLayout(e,null,0,359,0,n),x.calculateBounds(t)),i=new b;i.setDeviceOrgX(e.getMinX()),i.setDeviceOrgY(e.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;at?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,e.paddingLeft,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)}},k.prototype.repopulateZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(t){var e=n.idToDummyNode[t],r=e.paddingLeft;n.adjustLocations(i[t],e.rect.x,e.rect.y,r,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)})},k.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var r=t.getNodes(),n=0;nh&&(h=d.rect.height)}r+=h+t.verticalPadding}},k.prototype.tileCompoundMembers=function(n,i){var a=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(t){var e,r=i[t];a.tiledMemberPack[t]=a.tileNodes(n[t],r.paddingLeft+r.paddingRight),r.rect.width=a.tiledMemberPack[t].width,r.rect.height=a.tiledMemberPack[t].height,r.setCenter(a.tiledMemberPack[t].centerX,a.tiledMemberPack[t].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(t=r.rect.width,e=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(t+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>t?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.tileNodes=function(t,e){var r=this.tileNodesByFavoringDim(t,e,!0),t=this.tileNodesByFavoringDim(t,e,!1),e=this.getOrgRatio(r);return this.getOrgRatio(t)l&&(l=t.getWidth())}),s/a),c=o/a,c=Math.pow(n-i,2)+4*(t+i)*(c+n)*a,a=(i-n+Math.sqrt(c))/(2*(t+i));return e?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((n=r*(t+i)-i)t.rowHeight[r]&&(i=t.rowHeight[r],t.rowHeight[r]=n,i=t.rowHeight[r]-i),t.height+=i,t.rows[r].push(e)},k.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;nr&&(e=n,r=t.rowWidth[n]);return e},k.prototype.canAddHorizontal=function(t,e,r){var n,i,a;return t.idealRowWidth?(i=t.rows.length-1,t.rowWidth[i]+e+t.horizontalPadding<=t.idealRowWidth):(i=this.getShortestRowIndex(t))<0||(a=t.rowWidth[i])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[i]a&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=n[o].height);0{var n,i=r(551).FDLayoutNode,a=r(551).IMath;function s(t,e,r,n){i.call(this,t,e,r,n)}for(n in me(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0{function Pt(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);eX&&(X=m[w].length,K=w);X{t.exports=e}},i={},me(r,"__webpack_require__"),r(45);function r(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},n[t](e,e.exports,r)),e.exports}var n,i})}),zOt=rPt((r,n)=>{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e($Ot()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeFcose=e($Ot()):t.cytoscapeFcose=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(e){return n={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var t=arguments.length,e=Array(1{me(C,"sliceIterator");var n=r(140).layoutBase.LinkedList;function C(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}t.exports=r={getTopMostNodes:function(t){for(var n={},e=0;e{if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return C(t,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],x=y[1],b=e.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{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=me(function(c,t){var e=c.cy,r=(i=c.eles).nodes(),n=i.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=t.nodeIndexes,p=t.xCoords,g=t.yCoords),me(function(t){return"function"==typeof t},"isFn")),m=me(function(t,e){return h(t)?t(e):t},"optFn"),y=v.calcParentsWithoutChildren(e,i),t=me(function t(e,r,n,i){for(var a=r.length,s=0;s{function n(t,e){for(var r=0;r{var G=r(548),U=r(140).layoutBase.Matrix,q=r(140).layoutBase.SVD,r=me(function(t){var i=t.cy,a=t.eles,e=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=t.piTol,n=t.samplingType,T=t.nodeSeparation,d=void 0,P=me(function(){for(var t=0,e=!1;t{var n=r(212),r=me(function(t){t&&t("layout","fcose",n)},"register");typeof cytoscape<"u"&&r(cytoscape),t.exports=r},140:t=>{t.exports=e}},i={},me(r,"__webpack_require__"),r(579);function r(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},n[t](e,e.exports,r)),e.exports}var n,i})}),GOt=t(()=>{jt(),LOt=me(t=>`${t}`,"wrapIcon"),NOt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:LOt('')},server:{body:LOt('')},disk:{body:LOt('')},internet:{body:LOt('')},cloud:{body:LOt('')},unknown:Rt,blank:{body:LOt("")}}}}),UOt=t(()=>{jt(),mu(),Y9(),OOt(),GOt(),aOt(),IOt=me(async function(w,t){let k=TOt().padding,e=TOt().iconSize,T=e/2,E=e/6,C=E/2;await Promise.all(t.edges().map(async t=>{let{source:e,sourceDir:r,sourceArrow:n,sourceGroup:i,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=rOt(t),{x:h,y:u}=t[0].sourceEndpoint(),{x:d,y:p}=t[0].midpoint(),{x:g,y:f}=t[0].targetEndpoint(),m=k+4;var y,v,x,b;i&&(WDt(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(WDt(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),i||"junction"!==EOt.getNode(e)?.type||(WDt(r)?h+="L"===r?T:-T:u+="T"===r?T:-T),l||"junction"!==EOt.getNode(a)?.type||(WDt(s)?g+="L"===s?T:-T:f+="T"===s?T:-T),t[0]._private.rscratch&&((t=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge"),n&&(b=WDt(r)?UDt[r](h,E):h-C,y=YDt(r)?UDt[r](u,E):u-C,t.insert("polygon").attr("points",GDt[r](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),o&&(b=WDt(s)?UDt[s](g,E):g-C,y=YDt(s)?UDt[s](f,E):f-C,t.insert("polygon").attr("points",GDt[s](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=HDt(r,s)?"XY":WDt(r)?"X":"Y")?Math.abs(h-g):"Y"==x?Math.abs(u-f)/1.5:Math.abs(h-g)/2,b=t.append("g"),await W9(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=KDt(r,s))&&VDt(y)&&(t=b.node().getBoundingClientRect(),[y,v]=QDt(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",` translate(${d}, ${p-t.height/2}) translate(${y*x.width/2}, ${v*x.height/2}) rotate(${-1*y*v*45}, 0, ${t.height/2}) - `)))}))},"drawEdges"),MOt=me(async function(l,t){let c=.75*lOt("padding"),h=lOt("fontSize"),u=lOt("iconSize")/2;await Promise.all(t.nodes().map(async i=>{var n=aOt(i);if("group"===n.type){var{h:i,w:a,x1:s,y1:o}=i.boundingBox();l.append("rect").attr("x",s+u).attr("y",o+u).attr("width",a).attr("height",i).attr("class","node-bkg");let t=l.append("g"),e=s,r=o;n.icon&&((i=t.append("g")).html(`${await Bt(n.icon,{height:c,width:c,fallbackPrefix:IOt.prefix})}`),i.attr("transform","translate("+(e+u+1)+", "+(r+u+1)+")"),e+=c,r+=h/2-1-2),n.label&&(s=t.append("g"),await j9(s,n.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("+(e+u+4)+", "+(r+u+2)+")"))}}))},"drawGroups"),DOt=me(async function(t,e,r){for(var i of r){var n=e.append("g"),a=lOt("iconSize"),s=(i.title&&(s=n.append("g"),await j9(s,i.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+")")),n.append("g")),{width:o,height:l}=(i.icon?s.html(`${await Bt(i.icon,{height:a,width:a,fallbackPrefix:IOt.prefix})}`):i.iconText?(s.html(`${await Bt("blank",{height:a,width:a,fallbackPrefix:IOt.prefix})}`),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(i.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-"+i.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`),n.attr("class","architecture-service"),n._groups[0][0].getBBox());i.width=o,i.height=l,t.setElementForId(i.id,n)}return 0},"drawServices"),OOt=me(function(n,a,t){t.forEach(t=>{var e=a.append("g"),r=lOt("iconSize"),{width:r,height:i}=(e.append("g").append("rect").attr("id","node-"+t.id).attr("fill-opacity","0").attr("width",r).attr("height",r),e.attr("class","architecture-junction"),e._groups[0][0].getBBox());e.width=r,e.height=i,n.setElementForId(t.id,e)})},"drawJunctions")});function jOt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:lOt("iconSize"),height:lOt("iconSize")},classes:"node-service"})})}function WOt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:lOt("iconSize"),height:lOt("iconSize")},classes:"node-junction"})})}function YOt(r,t){t.nodes().map(t=>{var e=aOt(t);"group"!==e.type&&(e.x=t.position().x,e.y=t.position().y,r.getElementById(e.id).attr("transform","translate("+(e.x||0)+","+(e.y||0)+")"))})}function HOt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function VOt(t,h){t.forEach(t=>{var{lhsId:e,rhsId:r,lhsInto:i,lhsGroup:n,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:c}=t,t=XDt(t.lhsDir,t.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:e+"-"+r,label:c,source:e,sourceDir:s,sourceArrow:i,sourceGroup:n,sourceEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%",target:r,targetDir:o,targetArrow:a,targetGroup:l,targetEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%"},classes:t})})}function XOt(s,t,u){let e=me((t,h)=>Object.entries(t).reduce((r,[i,t])=>{let n=0,a=Object.entries(t);if(1===a.length)r[i]=a[0][1];else for(let e=0;e{let n={},a={};return Object.entries(t).forEach(([t,[e,r]])=>{var i=s.getNode(t)?.in??"default";n[r]??={},n[r][i]??=[],n[r][i].push(t),a[e]??={},a[e][i]??=[],a[e][i].push(t)}),{horiz:Object.values(e(n,"horizontal")).filter(t=>11[[...t,...r],[...e,...i]],[[],[]]);return{horizontal:i,vertical:n}}function KOt(t){let l=[],c=me(t=>t[0]+","+t[1],"posToStr"),h=me(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{let a=Object.fromEntries(Object.entries(t).map(([t,e])=>[c(e),t])),s=[c([0,0])],o={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0{var e=c([i[0]+e[0],i[1]+e[1]]),r=a[e];r&&!o[e]&&(s.push(e),l.push({[UDt[t]]:r,[UDt[WDt(t)]]:n,gap:1.5*lOt("iconSize")}))})}}}}),l}function ZOt(n,a,l,c,h,{spatialMaps:u,groupAlignments:d}){return new Promise(e=>{let t=j("body").append("div").attr("id","cy").attr("style","display:none"),s=h9t({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":lOt("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:lOt("padding")+"px"}}]}),r=(t.remove(),HOt(l,s),jOt(n,s),WOt(a,s),VOt(c,s),XOt(h,u,d)),i=KOt(u),o=s.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){var[t,e]=t.connectedNodes();return(t=aOt(t).parent)===aOt(e).parent?1.5*lOt("iconSize"):.5*lOt("iconSize")},edgeElasticity(t){var[t,e]=t.connectedNodes();return(t=aOt(t).parent)===aOt(e).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:i});o.one("layoutstop",()=>{function t(t,e,r,i){var{x:t,y:n}=t,{x:e,y:a}=e,s=(i-n+(t-r)*(n-a)/(t-e))/Math.sqrt(1+Math.pow((n-a)/(t-e),2)),o=Math.sqrt(Math.pow(i-n,2)+Math.pow(r-t,2)-Math.pow(s,2));o/=Math.sqrt(Math.pow(e-t,2)+Math.pow(a-n,2));let l=(e-t)*(i-n)-(a-n)*(r-t);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let c=(e-t)*(r-t)+(a-n)*(i-n);switch(!0){case 0<=c:c=1;break;case c<0:c=-1}return{distances:Math.abs(s)*l,weights:o*=c}}me(t,"getSegmentWeights"),s.startBatch();for(var e of Object.values(s.edges())){var r,i,n,a;e.data?.()&&({x:n,y:i}=e.source().position(),{x:a,y:r}=e.target().position(),n!==a)&&i!==r&&(n=e.sourceEndpoint(),a=e.targetEndpoint(),i=nOt(e).sourceDir,[r,i]=VDt(i)?[n.x,a.y]:[a.x,n.y],{weights:n,distances:a}=t(n,a,r,i),e.style("segment-distances",a),e.style("segment-weights",n))}s.endBatch(),o.run()}),o.run(),s.ready(t=>{M.info("Ready",t),e(s)})})}var QOt,JOt,tPt=t(()=>{qt(),u9t(),QOt=tt(GOt(),1),Z3(),e(),tmt(),th(),POt(),UOt(),oOt(),qOt(),Ot([{name:IOt.prefix,icons:IOt}]),h9t.use(QOt.default),me(jOt,"addServices"),me(WOt,"addJunctions"),me(YOt,"positionNodes"),me(HOt,"addGroups"),me(VOt,"addEdges"),me(XOt,"getAlignments"),me(KOt,"getRelativeConstraints"),me(ZOt,"layoutArchitecture"),QOt=me(async(t,e,r,i)=>{var n=(i=i.db).getServices(),a=i.getJunctions(),s=i.getGroups(),o=i.getEdges(),l=i.getDataStructures(),c=(e=Hft(e)).append("g"),h=(c.attr("class","architecture-edges"),(u=e.append("g")).attr("class","architecture-services"),e.append("g")),u=(h.attr("class","architecture-groups"),await DOt(i,u,n),OOt(i,u,a),await ZOt(n,a,s,o,i,l));await ROt(c,u),await MOt(h,u),YOt(i,u),Vc(void 0,e,lOt("padding"),lOt("useMaxWidth"))},"draw"),JOt={draw:QOt}}),ePt={};lPt(ePt,{diagram:()=>rPt});var rPt,iPt,nPt=t(()=>{BOt(),POt(),FOt(),tPt(),rPt={parser:SOt,db:COt,renderer:JOt,styles:LOt}}),aPt=(lPt(iPt={},{default:()=>mFt}),qt(),Fr(),Gr(),{id:"c4",detector:me(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:me(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(TC(),wC))).diagram}),"loader")}),sPt={id:"flowchart",detector:me((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:me(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(ZX(),YX))).diagram}),"loader")},oPt="flowchart-v2",t=me((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),lPt=me(async()=>{var t=(await Promise.resolve().then(()=>(ZX(),YX))).diagram;return{id:oPt,diagram:t}},"loader"),cPt={id:oPt,detector:t,loader:lPt},hPt={id:"er",detector:me(t=>/^\s*erDiagram/.test(t),"detector"),loader:me(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(cK(),oK))).diagram}),"loader")},uPt={id:"gitGraph",detector:me(t=>/^\s*gitGraph/.test(t),"detector"),loader:me(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(n1t(),t1t))).diagram}),"loader")},dPt={id:"gantt",detector:me(t=>/^\s*gantt/.test(t),"detector"),loader:me(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(Kft(),zft))).diagram}),"loader")},pPt={id:"info",detector:me(t=>/^\s*info/.test(t),"detector"),loader:me(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(kmt(),rmt))).diagram}),"loader")},gPt={id:"pie",detector:me(t=>/^\s*pie/.test(t),"detector"),loader:me(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(Mmt(),Smt))).diagram}),"loader")},fPt="quadrantChart",t=me(t=>/^\s*quadrantChart/.test(t),"detector"),lPt=me(async()=>{var t=(await Promise.resolve().then(()=>(gyt(),hyt))).diagram;return{id:fPt,diagram:t}},"loader"),mPt={id:fPt,detector:t,loader:lPt},yPt={id:"xychart",detector:me(t=>/^\s*xychart-beta/.test(t),"detector"),loader:me(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(N2t(),T2t))).diagram}),"loader")},vPt="requirement",t=me(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),lPt=me(async()=>{var t=(await Promise.resolve().then(()=>(Evt(),B2t))).diagram;return{id:vPt,diagram:t}},"loader"),xPt={id:vPt,detector:t,loader:lPt},bPt={id:"sequence",detector:me(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:me(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(gxt(),Qvt))).diagram}),"loader")},wPt={id:"class",detector:me((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:me(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(kxt(),bxt))).diagram}),"loader")},kPt="classDiagram",t=me((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),lPt=me(async()=>{var t=(await Promise.resolve().then(()=>(cbt(),Txt))).diagram;return{id:kPt,diagram:t}},"loader"),TPt={id:kPt,detector:t,loader:lPt},EPt={id:"state",detector:me((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:me(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>(p4t(),u4t))).diagram}),"loader")},CPt="stateDiagram",t=me((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&"dagre-wrapper"===e?.state?.defaultRenderer),"detector"),lPt=me(async()=>{var t=(await Promise.resolve().then(()=>(Y4t(),g4t))).diagram;return{id:CPt,diagram:t}},"loader"),_Pt={id:CPt,detector:t,loader:lPt},SPt={id:"journey",detector:me(t=>/^\s*journey/.test(t),"detector"),loader:me(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(p5t(),c5t))).diagram}),"loader")},APt=(e(),tmt(),th(),t={draw:me((t,e,r)=>{M.debug(`rendering svg for syntax error -`);var i=(e=Hft(e)).append("g");e.attr("viewBox","0 0 2412 512"),Hc(e,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r)},"draw")}),LPt={db:{},renderer:t,parser:{parse:me(()=>{},"parse")}},NPt="flowchart-elk",lPt=me((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),t=me(async()=>{var t=(await Promise.resolve().then(()=>(ZX(),YX))).diagram;return{id:NPt,diagram:t}},"loader"),IPt={id:NPt,detector:lPt,loader:t},RPt={id:"timeline",detector:me(t=>/^\s*timeline/.test(t),"detector"),loader:me(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(C3t(),s3t))).diagram}),"loader")},MPt={id:"mindmap",detector:me(t=>/^\s*mindmap/.test(t),"detector"),loader:me(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(hLt(),F9t))).diagram}),"loader")},DPt={id:"kanban",detector:me(t=>/^\s*kanban/.test(t),"detector"),loader:me(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(ILt(),fLt))).diagram}),"loader")},OPt={id:"sankey",detector:me(t=>/^\s*sankey-beta/.test(t),"detector"),loader:me(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(cIt(),jNt))).diagram}),"loader")},PPt={id:"packet",detector:me(t=>/^\s*packet-beta/.test(t),"detector"),loader:me(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(RIt(),gIt))).diagram}),"loader")},BPt={id:"radar",detector:me(t=>/^\s*radar-beta/.test(t),"detector"),loader:me(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>(JIt(),XIt))).diagram}),"loader")},FPt={id:"block",detector:me(t=>/^\s*block-beta/.test(t),"detector"),loader:me(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(sOt(),zDt))).diagram}),"loader")},$Pt="architecture",lPt=me(t=>/^\s*architecture/.test(t),"detector"),t=me(async()=>{var t=(await Promise.resolve().then(()=>(nPt(),ePt))).diagram;return{id:$Pt,diagram:t}},"loader"),zPt={id:$Pt,detector:lPt,loader:t},GPt=(Gr(),fu(),!1),UPt=me(()=>{GPt||(GPt=!0,kh("error",LPt,t=>"error"===t.toLowerCase().trim()),kh("---",{db:{clear:me(()=>{},"clear")},styles:{},renderer:{draw:me(()=>{},"draw")},parser:{parse:me(()=>{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:me(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Zt(aPt,DPt,TPt,wPt,hPt,dPt,pPt,gPt,xPt,bPt,IPt,cPt,sPt,MPt,RPt,uPt,_Pt,EPt,SPt,mPt,OPt,PPt,yPt,FPt,zPt,BPt))},"addDiagrams"),qPt=(e(),Gr(),fu(),me(async()=>{M.debug("Loading registered diagrams");var t=(await Promise.allSettled(Object.entries(Xt).map(async([t,{detector:e,loader:r}])=>{if(r)try{Th(t)}catch{try{var{diagram:i,id:n}=await r();kh(n,i,e)}catch(e){throw M.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Xt[t],e}}}))).filter(t=>"rejected"===t.status);if(0{MBt.forEach(t=>{t()}),MBt=[]},"attachFunctions"),OBt=(e(),me(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function PBt(t){var e,r,i=t.match(Wt);return i?(r={},(e="object"!=typeof(e=NA(i[1],{schema:LA})??{})||Array.isArray(e)?{}:e).displayMode&&(r.displayMode=e.displayMode.toString()),e.title&&(r.title=e.title.toString()),e.config&&(r.config=e.config),{text:t.slice(i[0].length),metadata:r}):{text:t,metadata:{}}}$r(),IA(),me(PBt,"extractFrontMatter"),KE();var BBt=me(t=>t.replace(/\r\n?/g,` -`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),FBt=me(t=>{var{text:t,metadata:e}=PBt(t),{displayMode:e,title:r,config:i={}}=e;return e&&(i.gantt||(i.gantt={}),i.gantt.displayMode=e),{title:r,config:i,text:t}},"processFrontmatter"),$Bt=me(t=>{var e=YE.detectInit(t)??{},r=YE.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:SE(t),directive:e}},"processDirectives");function zBt(t){var e=BBt(t),e=FBt(e),r=$Bt(e.text),i=xE(e.config,r.directive);return{code:t=OBt(r.text),title:e.title,config:i}}function GBt(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}me(zBt,"preprocessDiagram"),eh(),Ei(),KE(),me(GBt,"toBase64");var UBt=["foreignobject"],qBt=["dominant-baseline"];function jBt(t){return t=zBt(t),Mr(),Rr(t.config??{}),t}async function WBt(t,e){UPt();try{var{code:r,config:i}=jBt(t);return{diagramType:(await eFt(r)).type,config:i}}catch(t){if(e?.suppressErrors)return!1;throw t}}me(jBt,"processAndSetConfigs"),me(WBt,"parse");var YBt=me((t,e,r=[])=>` -.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),HBt=me((e,r=new Map)=>{let i="";if(void 0!==e.themeCSS&&(i+=` -`+e.themeCSS),void 0!==e.fontFamily&&(i+=` -:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(i+=` -:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),r instanceof Map){let t=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(e=>{aq(e.styles)||t.forEach(t=>{i+=YBt(e.id,t,e.styles)}),aq(e.textStyles)||(i+=YBt(e.id,"tspan",(e?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return i},"createCssStyles"),VBt=me((t,e,r,i)=>(r=HBt(t,r),ABt(TBt(i+`{${Qc(e,r,t.themeVariables)}}`),LBt)),"createUserStyles"),XBt=me((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(i=VE(i)).replace(/
/g,"
")},"cleanUpSvgCode"),KBt=me((t="",e)=>``,"putIntoIFrame"),ZBt=me((t,e,r,i,n)=>{var a=t.append("div"),r=(a.attr("id",r),i&&a.attr("style",i),a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return n&&r.attr("xmlns:xlink",n),r.append("g"),t},"appendDivSvgG");function QBt(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}me(QBt,"sandboxedIframe");var JBt=me((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),lPt=me(async function(t,e,r){UPt();var i=jBt(e),n=(e=i.code,Nr());M.debug(n),e.length>(n?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+t,s="i"+t,o="#"+s,l="d"+t,c="#"+l,h=me(()=>{var t=j(d?o:c).node();t&&"remove"in t&&t.remove()},"removeTempElements"),u=j("body"),d="sandbox"===n.securityLevel,p="loose"===n.securityLevel,g=n.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=QBt(j(r),s),(u=j(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=j(r),ZBt(u,t,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(JBt(document,t,l,s),d?(y=QBt(j("body"),s),(u=j(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=j("body"),ZBt(u,t,l));let f,m;try{f=await RBt.fromText(e,{title:i.title})}catch(r){if(n.suppressErrorRendering)throw h(),r;f=await RBt.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(i=r.firstChild).firstChild,v=f.renderer.getClasses?.(e,f),v=VBt(n,y,v,a),x=document.createElement("style");x.innerHTML=v,i.insertBefore(x,r);try{await f.renderer.draw(e,t,qft.version,f)}catch(r){throw n.suppressErrorRendering?h():APt.draw(e,t,qft.version),r}rFt(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=u.select(c).node().innerHTML;if(M.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),b=XBt(b,d,Mc(n.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=KBt(b,v)):p||(b=Rn.sanitize(b,{ADD_TAGS:UBt,ADD_ATTR:qBt,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),DBt(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function tFt(t={}){(t=ie({},t))?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),_r(t),t?.theme&&t.theme in ur?t.themeVariables=ur[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ur.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?Cr(t):Ar(),T(t.logLevel),UPt()}me(tFt,"initialize");var eFt=me((t,e={})=>(t=zBt(t).code,RBt.fromText(t,e)),"getDiagramFromText");function rFt(t,e,r,i){NBt(e,t),IBt(e,r,i,e.attr("id"))}me(rFt,"addA11yInfo");var iFt=Object.freeze({render:lPt,parse:WBt,getDiagramFromText:eFt,initialize:tFt,getConfig:Nr,setConfig:Lr,getSiteConfig:Ar,updateSiteConfig:Sr,reset:me(()=>{Mr()},"reset"),globalReset:me(()=>{Mr(xr)},"globalReset"),defaultConfig:xr}),nFt=(T(Nr().logLevel),Mr(Nr()),zX(),KE(),me((t,e,r)=>{M.warn(t),vE(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError")),aFt=me(async function(e={querySelector:".mermaid"}){try{await sFt(e)}catch(t){if(vE(t)&&M.error(t.str),fFt.parseError&&fFt.parseError(t),!e.suppressErrors)throw M.error("Use the suppressErrors option to suppress these errors"),t}},"run"),sFt=me(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var i=iFt.getConfig();M.debug(`${t?"":"No "}Callback function found`);let n;if(r)n=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(e)}M.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(M.debug("Start On Load: "+i?.startOnLoad),iFt.updateSiteConfig({startOnLoad:i?.startOnLoad}));var a,s=new YE.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),o=[];for(a of Array.from(n))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=jt(YE.entityDecode(c)).trim().replace(//gi,"
"),YE.detectInit(c));h&&M.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await gFt(l,c,a);a.innerHTML=u,t&&await t(l),d&&d(a)}catch(t){nFt(t,o,fFt.parseError)}}if(0{UPt(),Zt(...t),!1===e&&await qPt()},"registerExternalDiagrams"),lFt=me(function(){fFt.startOnLoad&&iFt.getConfig().startOnLoad&&fFt.run().catch(t=>M.error("Mermaid failed to initialize",t))},"contentLoaded"),cFt=(typeof document<"u"&&window.addEventListener("load",lFt,!1),me(function(t){fFt.parseError=t},"setParseErrorHandler")),hFt=[],uFt=!1,dFt=me(async()=>{if(!uFt){for(uFt=!0;0new Promise((i,n)=>{var t=me(()=>new Promise((e,r)=>{iFt.parse(a,s).then(t=>{e(t),i(t)},t=>{M.error("Error parsing",t),fFt.parseError?.(t),r(t),n(t)})}),"performCall");hFt.push(t),dFt().catch(n)}),"parse"),gFt=me((a,s,o)=>new Promise((i,n)=>{var t=me(()=>new Promise((e,r)=>{iFt.render(a,s,o).then(t=>{e(t),i(t)},t=>{M.error("Error parsing",t),fFt.parseError?.(t),r(t),n(t)})}),"performCall");hFt.push(t),dFt().catch(n)}),"render"),fFt={startOnLoad:!0,mermaidAPI:iFt,parse:pFt,render:gFt,init:t,run:aFt,registerExternalDiagrams:lPt,registerLayoutLoaders:TX,initialize:oFt,parseError:void 0,contentLoaded:lFt,setParseErrorHandler:cFt,detectType:Kt,registerIconPacks:Ot},mFt=fFt,pFt=iPt;return Y(z({},"__esModule",{value:!0}),pFt)})();globalThis.mermaid=globalThis.__esbuild_esm_mermaid.default; +`,"putIntoIFrame"),KBt=me((t,e,r,n,i)=>{var a=t.append("div"),r=(a.attr("id",r),n&&a.attr("style",n),a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return i&&r.attr("xmlns:xlink",i),r.append("g"),t},"appendDivSvgG");function ZBt(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}me(ZBt,"sandboxedIframe");var QBt=me((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),oPt=me(async function(t,e,r){GPt();var n=qBt(e),i=(e=n.code,Ir());M.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+t,s="i"+t,o="#"+s,l="d"+t,c="#"+l,h=me(()=>{var t=H(d?o:c).node();t&&"remove"in t&&t.remove()},"removeTempElements"),u=H("body"),d="sandbox"===i.securityLevel,p="loose"===i.securityLevel,g=i.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=ZBt(H(r),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H(r),KBt(u,t,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(QBt(document,t,l,s),d?(y=ZBt(H("body"),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H("body"),KBt(u,t,l));let f,m;try{f=await IBt.fromText(e,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await IBt.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(n=r.firstChild).firstChild,v=f.renderer.getClasses?.(e,f),v=HBt(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(e,t,jft.version,f)}catch(r){throw i.suppressErrorRendering?h():SPt.draw(e,t,jft.version),r}eFt(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${t}"]`).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=VBt(b,d,Dc(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=XBt(b,v)):p||(b=Mi.sanitize(b,{ADD_TAGS:GBt,ADD_ATTR:UBt,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),MBt(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function JBt(t={}){(t=ie({},t))?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Sr(t),t?.theme&&t.theme in dr?t.themeVariables=dr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=dr.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?_r(t):Lr(),T(t.logLevel),GPt()}me(JBt,"initialize");var tFt=me((t,e={})=>(t=$Bt(t).code,IBt.fromText(t,e)),"getDiagramFromText");function eFt(t,e,r,n){LBt(e,t),NBt(e,r,n,e.attr("id"))}me(eFt,"addA11yInfo");var rFt=Object.freeze({render:oPt,parse:jBt,getDiagramFromText:tFt,initialize:JBt,getConfig:Ir,setConfig:Nr,getSiteConfig:Lr,updateSiteConfig:Ar,reset:me(()=>{Dr()},"reset"),globalReset:me(()=>{Dr(br)},"globalReset"),defaultConfig:br}),nFt=(T(Ir().logLevel),Dr(Ir()),UX(),ZE(),me((t,e,r)=>{M.warn(t),xE(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError")),iFt=me(async function(e={querySelector:".mermaid"}){try{await aFt(e)}catch(t){if(xE(t)&&M.error(t.str),gFt.parseError&&gFt.parseError(t),!e.suppressErrors)throw M.error("Use the suppressErrors option to suppress these errors"),t}},"run"),aFt=me(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var n=rFt.getConfig();M.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}M.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(M.debug("Start On Load: "+n?.startOnLoad),rFt.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,s=new HE.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=Wt(HE.entityDecode(c)).trim().replace(//gi,"
"),HE.detectInit(c));h&&M.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await pFt(l,c,a);a.innerHTML=u,t&&await t(l),d&&d(a)}catch(t){nFt(t,o,gFt.parseError)}}if(0{GPt(),Qt(...t),!1===e&&await UPt()},"registerExternalDiagrams"),oFt=me(function(){gFt.startOnLoad&&rFt.getConfig().startOnLoad&&gFt.run().catch(t=>M.error("Mermaid failed to initialize",t))},"contentLoaded"),lFt=(typeof document<"u"&&window.addEventListener("load",oFt,!1),me(function(t){gFt.parseError=t},"setParseErrorHandler")),cFt=[],hFt=!1,uFt=me(async()=>{if(!hFt){for(hFt=!0;0new Promise((n,i)=>{var t=me(()=>new Promise((e,r)=>{rFt.parse(a,s).then(t=>{e(t),n(t)},t=>{M.error("Error parsing",t),gFt.parseError?.(t),r(t),i(t)})}),"performCall");cFt.push(t),uFt().catch(i)}),"parse"),pFt=me((a,s,o)=>new Promise((n,i)=>{var t=me(()=>new Promise((e,r)=>{rFt.render(a,s,o).then(t=>{e(t),n(t)},t=>{M.error("Error parsing",t),gFt.parseError?.(t),r(t),i(t)})}),"performCall");cFt.push(t),uFt().catch(i)}),"render"),gFt={startOnLoad:!0,mermaidAPI:rFt,parse:dFt,render:pFt,init:t,run:iFt,registerExternalDiagrams:oPt,registerLayoutLoaders:EX,initialize:sFt,parseError:void 0,contentLoaded:oFt,setParseErrorHandler:lFt,detectType:Zt,registerIconPacks:Ot},fFt=gFt,dFt=rPt;return W(z({},"__esModule",{value:!0}),dFt)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default;