var i2e=Object.create;var QS=Object.defineProperty;var a2e=Object.getOwnPropertyDescriptor;var s2e=Object.getOwnPropertyNames;var o2e=Object.getPrototypeOf,l2e=Object.prototype.hasOwnProperty;var F=(t,e)=>()=>(t&&(e=t(t=0)),e);var ba=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hr=(t,e)=>{for(var r in e)QS(t,r,{get:e[r],enumerable:!0})},ZS=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of s2e(e))!l2e.call(t,i)&&i!==r&&QS(t,i,{get:()=>e[i],enumerable:!(n=a2e(e,i))||n.enumerable});return t},kr=(t,e,r)=>(ZS(t,e,"default"),r&&ZS(r,e,"default")),Fa=(t,e,r)=>(r=t!=null?i2e(o2e(t)):{},ZS(e||!t||!t.__esModule?QS(r,"default",{value:t,enumerable:!0}):r,t));var Y1,JS=F(()=>{Y1={name:"mermaid",version:"11.11.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":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^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",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.28.9","typedoc-plugin-markdown":"^4.8.0",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"}}});var i4=ba((eC,tC)=>{(function(t,e){typeof eC=="object"&&typeof tC<"u"?tC.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(eC,function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",s="hour",o="day",l="week",u="month",h="quarter",f="year",d="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,v={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:function(k){var L=["th","st","nd","rd"],_=k%100;return"["+k+(L[(_-20)%10]||L[_]||L[0])+"]"}},y=function(k,L,_){var D=String(k);return!D||D.length>=L?k:""+Array(L+1-D.length).join(_)+k},b={s:y,z:function(k){var L=-k.utcOffset(),_=Math.abs(L),D=Math.floor(_/60),N=_%60;return(L<=0?"+":"-")+y(D,2,"0")+":"+y(N,2,"0")},m:function k(L,_){if(L.date()<_.date())return-k(_,L);var D=12*(_.year()-L.year())+(_.month()-L.month()),N=L.clone().add(D,u),O=_-N<0,P=L.clone().add(D+(O?-1:1),u);return+(-(D+(_-N)/(O?N-P:P-N))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:u,y:f,w:l,d:o,D:d,h:s,m:a,s:i,ms:n,Q:h}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},w="en",S={};S[w]=v;var T="$isDayjsObject",E=function(k){return k instanceof M||!(!k||!k[T])},A=function k(L,_,D){var N;if(!L)return w;if(typeof L=="string"){var O=L.toLowerCase();S[O]&&(N=O),_&&(S[O]=_,N=O);var P=L.split("-");if(!N&&P.length>1)return k(P[0])}else{var B=L.name;S[B]=L,N=B}return!D&&N&&(w=N),N||!D&&w},C=function(k,L){if(E(k))return k.clone();var _=typeof L=="object"?L:{};return _.date=k,_.args=arguments,new M(_)},I=b;I.l=A,I.i=E,I.w=function(k,L){return C(k,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var M=function(){function k(_){this.$L=A(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[T]=!0}var L=k.prototype;return L.parse=function(_){this.$d=function(D){var N=D.date,O=D.utc;if(N===null)return new Date(NaN);if(I.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var P=N.match(g);if(P){var B=P[2]-1||0,G=(P[7]||"0").substring(0,3);return O?new Date(Date.UTC(P[1],B,P[3]||1,P[4]||0,P[5]||0,P[6]||0,G)):new Date(P[1],B,P[3]||1,P[4]||0,P[5]||0,P[6]||0,G)}}return new Date(N)}(_),this.init()},L.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},L.$utils=function(){return I},L.isValid=function(){return this.$d.toString()!==p},L.isSame=function(_,D){var N=C(_);return this.startOf(D)<=N&&N<=this.endOf(D)},L.isAfter=function(_,D){return C(_){zB=Fa(i4(),1),$B=Object.defineProperty,x=(t,e)=>$B(t,"name",{value:e,configurable:!0}),ah=(t,e)=>{for(var r in e)$B(t,r,{get:e[r],enumerable:!0})},Zc={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},J={trace:x((...t)=>{},"trace"),debug:x((...t)=>{},"debug"),info:x((...t)=>{},"info"),warn:x((...t)=>{},"warn"),error:x((...t)=>{},"error"),fatal:x((...t)=>{},"fatal")},X1=x(function(t="fatal"){let e=Zc.fatal;typeof t=="string"?t.toLowerCase()in Zc&&(e=Zc[t]):typeof t=="number"&&(e=t),J.trace=()=>{},J.debug=()=>{},J.info=()=>{},J.warn=()=>{},J.error=()=>{},J.fatal=()=>{},e<=Zc.fatal&&(J.fatal=console.error?console.error.bind(console,go("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",go("FATAL"))),e<=Zc.error&&(J.error=console.error?console.error.bind(console,go("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",go("ERROR"))),e<=Zc.warn&&(J.warn=console.warn?console.warn.bind(console,go("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",go("WARN"))),e<=Zc.info&&(J.info=console.info?console.info.bind(console,go("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",go("INFO"))),e<=Zc.debug&&(J.debug=console.debug?console.debug.bind(console,go("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",go("DEBUG"))),e<=Zc.trace&&(J.trace=console.debug?console.debug.bind(console,go("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",go("TRACE")))},"setLogLevel"),go=x(t=>`%c${(0,zB.default)().format("ss.SSS")} : ${t} : `,"format")});var a4,GB,VB=F(()=>{a4={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return a4.hue2rgb(a,i,t+.3333333333333333)*255;case"g":return a4.hue2rgb(a,i,t)*255;case"b":return a4.hue2rgb(a,i,t-.3333333333333333)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;let i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;let o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(e{c2e={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},UB=c2e});var u2e,WB,HB=F(()=>{u2e={dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},WB=u2e});var h2e,Vt,$l=F(()=>{VB();qB();HB();h2e={channel:GB,lang:UB,unit:WB},Vt=h2e});var Qc,wi,j1=F(()=>{$l();Qc={};for(let t=0;t<=255;t++)Qc[t]=Vt.unit.dec2hex(t);wi={ALL:0,RGB:1,HSL:2}});var rC,YB,XB=F(()=>{j1();rC=class{constructor(){this.type=wi.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=wi.ALL}is(e){return this.type===e}},YB=rC});var nC,jB,KB=F(()=>{$l();XB();j1();nC=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new YB}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=wi.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=Vt.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Vt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Vt.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=Vt.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Vt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Vt.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(wi.HSL)&&r!==void 0?r:(this._ensureHSL(),Vt.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(wi.HSL)&&r!==void 0?r:(this._ensureHSL(),Vt.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(wi.HSL)&&r!==void 0?r:(this._ensureHSL(),Vt.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(wi.RGB)&&r!==void 0?r:(this._ensureRGB(),Vt.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(wi.RGB)&&r!==void 0?r:(this._ensureRGB(),Vt.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(wi.RGB)&&r!==void 0?r:(this._ensureRGB(),Vt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(wi.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(wi.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(wi.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(wi.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(wi.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(wi.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},jB=nC});var f2e,sh,K1=F(()=>{KB();f2e=new jB({r:0,g:0,b:0,a:0},"transparent"),sh=f2e});var ZB,Yf,iC=F(()=>{K1();j1();ZB={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(ZB.re);if(!e)return;let r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,o=s?1:17,l=s?8:4,u=a?0:-1,h=s?255:15;return sh.set({r:(n>>l*(u+3)&h)*o,g:(n>>l*(u+2)&h)*o,b:(n>>l*(u+1)&h)*o,a:a?(n&h)*o/255:1},t)},stringify:t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`#${Qc[Math.round(e)]}${Qc[Math.round(r)]}${Qc[Math.round(n)]}${Qc[Math.round(i*255)]}`:`#${Qc[Math.round(e)]}${Qc[Math.round(r)]}${Qc[Math.round(n)]}`}},Yf=ZB});var s4,Z1,QB=F(()=>{$l();K1();s4={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:t=>{let e=t.match(s4.hueRe);if(e){let[,r,n]=e;switch(n){case"grad":return Vt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Vt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Vt.channel.clamp.h(parseFloat(r)*360)}}return Vt.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(s4.re);if(!r)return;let[,n,i,a,s,o]=r;return sh.set({h:s4._hue2deg(n),s:Vt.channel.clamp.s(parseFloat(i)),l:Vt.channel.clamp.l(parseFloat(a)),a:s?Vt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{let{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${Vt.lang.round(e)}, ${Vt.lang.round(r)}%, ${Vt.lang.round(n)}%, ${i})`:`hsl(${Vt.lang.round(e)}, ${Vt.lang.round(r)}%, ${Vt.lang.round(n)}%)`}},Z1=s4});var o4,aC,JB=F(()=>{iC();o4={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:t=>{t=t.toLowerCase();let e=o4.colors[t];if(e)return Yf.parse(e)},stringify:t=>{let e=Yf.stringify(t);for(let r in o4.colors)if(o4.colors[r]===e)return r}},aC=o4});var eF,Q1,tF=F(()=>{$l();K1();eF={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:t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(eF.re);if(!r)return;let[,n,i,a,s,o,l,u,h]=r;return sh.set({r:Vt.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:Vt.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:Vt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?Vt.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${Vt.lang.round(e)}, ${Vt.lang.round(r)}, ${Vt.lang.round(n)}, ${Vt.lang.round(i)})`:`rgb(${Vt.lang.round(e)}, ${Vt.lang.round(r)}, ${Vt.lang.round(n)})`}},Q1=eF});var d2e,Ti,Jc=F(()=>{iC();QB();JB();tF();j1();d2e={format:{keyword:aC,hex:Yf,rgb:Q1,rgba:Q1,hsl:Z1,hsla:Z1},parse:t=>{if(typeof t!="string")return t;let e=Yf.parse(t)||Q1.parse(t)||Z1.parse(t)||aC.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(wi.HSL)||t.data.r===void 0?Z1.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Q1.stringify(t):Yf.stringify(t)},Ti=d2e});var p2e,l4,sC=F(()=>{$l();Jc();p2e=(t,e)=>{let r=Ti.parse(t);for(let n in e)r[n]=Vt.channel.clamp[n](e[n]);return Ti.stringify(r)},l4=p2e});var g2e,$a,oC=F(()=>{$l();K1();Jc();sC();g2e=(t,e,r=0,n=1)=>{if(typeof t!="number")return l4(t,{a:e});let i=sh.set({r:Vt.channel.clamp.r(t),g:Vt.channel.clamp.g(e),b:Vt.channel.clamp.b(r),a:Vt.channel.clamp.a(n)});return Ti.stringify(i)},$a=g2e});var m2e,Xf,rF=F(()=>{$l();Jc();m2e=(t,e)=>Vt.lang.round(Ti.parse(t)[e]),Xf=m2e});var v2e,nF,iF=F(()=>{$l();Jc();v2e=t=>{let{r:e,g:r,b:n}=Ti.parse(t),i=.2126*Vt.channel.toLinear(e)+.7152*Vt.channel.toLinear(r)+.0722*Vt.channel.toLinear(n);return Vt.lang.round(i)},nF=v2e});var y2e,aF,sF=F(()=>{iF();y2e=t=>nF(t)>=.5,aF=y2e});var x2e,Xi,oF=F(()=>{sF();x2e=t=>!aF(t),Xi=x2e});var b2e,c4,lC=F(()=>{$l();Jc();b2e=(t,e,r)=>{let n=Ti.parse(t),i=n[e],a=Vt.channel.clamp[e](i+r);return i!==a&&(n[e]=a),Ti.stringify(n)},c4=b2e});var w2e,Et,lF=F(()=>{lC();w2e=(t,e)=>c4(t,"l",e),Et=w2e});var T2e,Rt,cF=F(()=>{lC();T2e=(t,e)=>c4(t,"l",-e),Rt=T2e});var k2e,Pe,uF=F(()=>{Jc();sC();k2e=(t,e)=>{let r=Ti.parse(t),n={};for(let i in e)e[i]&&(n[i]=r[i]+e[i]);return l4(t,n)},Pe=k2e});var E2e,hF,fF=F(()=>{Jc();oC();E2e=(t,e,r=50)=>{let{r:n,g:i,b:a,a:s}=Ti.parse(t),{r:o,g:l,b:u,a:h}=Ti.parse(e),f=r/100,d=f*2-1,p=s-h,m=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,v=1-m,y=n*m+o*v,b=i*m+l*v,w=a*m+u*v,S=s*f+h*(1-f);return $a(y,b,w,S)},hF=E2e});var S2e,vt,dF=F(()=>{Jc();fF();S2e=(t,e=100)=>{let r=Ti.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,hF(r,t,e)},vt=S2e});var pF=F(()=>{oC();rF();oF();lF();cF();uF();dF()});var qs=F(()=>{pF()});function Va(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:f4;gF&&gF(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){let a=r(i);a!==i&&(C2e(e)||(e[n]=a),i=a)}t[i]=!0}return t}function M2e(t){for(let e=0;e0&&arguments[0]!==void 0?arguments[0]:W2e(),e=xt=>AF(xt);if(e.version="3.2.7",e.removed=[],!t||!t.document||t.document.nodeType!==nv.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t,n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:p}=t,g=l.prototype,m=rv(g,"cloneNode"),v=rv(g,"remove"),y=rv(g,"nextSibling"),b=rv(g,"childNodes"),w=rv(g,"parentNode");if(typeof s=="function"){let xt=r.createElement("template");xt.content&&xt.content.ownerDocument&&(r=xt.content.ownerDocument)}let S,T="",{implementation:E,createNodeIterator:A,createDocumentFragment:C,getElementsByTagName:I}=r,{importNode:M}=n,R=TF();e.isSupported=typeof kF=="function"&&typeof w=="function"&&E&&E.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:k,ERB_EXPR:L,TMPLIT_EXPR:_,DATA_ATTR:D,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:B}=wF,{IS_ALLOWED_URI:G}=wF,$=null,U=Sr({},[...vF,...fC,...dC,...pC,...yF]),X=null,ee=Sr({},[...xF,...gC,...bF,...h4]),Y=Object.seal(EF(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}})),oe=null,Q=null,ue=!0,re=!0,te=!1,Z=!0,j=!1,ae=!0,K=!1,de=!1,ne=!1,be=!1,W=!1,Ve=!1,pe=!0,Be=!1,Ye="user-content-",qe=!0,Le=!1,Me={},Ne=null,Ce=Sr({},["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"]),Fe=null,fe=Sr({},["audio","video","img","source","image","track"]),ye=null,H=Sr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",z="http://www.w3.org/2000/svg",se="http://www.w3.org/1999/xhtml",le=se,ke=!1,ve=null,me=Sr({},[he,z,se],uC),Ie=Sr({},["mi","mo","mn","ms","mtext"]),_e=Sr({},["annotation-xml"]),ze=Sr({},["title","style","font","a","script"]),Xe=null,ft=["application/xhtml+xml","text/html"],We="text/html",Oe=null,Ke=null,Ue=r.createElement("form"),nt=function(Se){return Se instanceof RegExp||Se instanceof Function},Dt=function(){let Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ke&&Ke===Se)){if((!Se||typeof Se!="object")&&(Se={}),Se=eu(Se),Xe=ft.indexOf(Se.PARSER_MEDIA_TYPE)===-1?We:Se.PARSER_MEDIA_TYPE,Oe=Xe==="application/xhtml+xml"?uC:f4,$=nl(Se,"ALLOWED_TAGS")?Sr({},Se.ALLOWED_TAGS,Oe):U,X=nl(Se,"ALLOWED_ATTR")?Sr({},Se.ALLOWED_ATTR,Oe):ee,ve=nl(Se,"ALLOWED_NAMESPACES")?Sr({},Se.ALLOWED_NAMESPACES,uC):me,ye=nl(Se,"ADD_URI_SAFE_ATTR")?Sr(eu(H),Se.ADD_URI_SAFE_ATTR,Oe):H,Fe=nl(Se,"ADD_DATA_URI_TAGS")?Sr(eu(fe),Se.ADD_DATA_URI_TAGS,Oe):fe,Ne=nl(Se,"FORBID_CONTENTS")?Sr({},Se.FORBID_CONTENTS,Oe):Ce,oe=nl(Se,"FORBID_TAGS")?Sr({},Se.FORBID_TAGS,Oe):eu({}),Q=nl(Se,"FORBID_ATTR")?Sr({},Se.FORBID_ATTR,Oe):eu({}),Me=nl(Se,"USE_PROFILES")?Se.USE_PROFILES:!1,ue=Se.ALLOW_ARIA_ATTR!==!1,re=Se.ALLOW_DATA_ATTR!==!1,te=Se.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=Se.ALLOW_SELF_CLOSE_IN_ATTR!==!1,j=Se.SAFE_FOR_TEMPLATES||!1,ae=Se.SAFE_FOR_XML!==!1,K=Se.WHOLE_DOCUMENT||!1,be=Se.RETURN_DOM||!1,W=Se.RETURN_DOM_FRAGMENT||!1,Ve=Se.RETURN_TRUSTED_TYPE||!1,ne=Se.FORCE_BODY||!1,pe=Se.SANITIZE_DOM!==!1,Be=Se.SANITIZE_NAMED_PROPS||!1,qe=Se.KEEP_CONTENT!==!1,Le=Se.IN_PLACE||!1,G=Se.ALLOWED_URI_REGEXP||SF,le=Se.NAMESPACE||se,Ie=Se.MATHML_TEXT_INTEGRATION_POINTS||Ie,_e=Se.HTML_INTEGRATION_POINTS||_e,Y=Se.CUSTOM_ELEMENT_HANDLING||{},Se.CUSTOM_ELEMENT_HANDLING&&nt(Se.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Y.tagNameCheck=Se.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Se.CUSTOM_ELEMENT_HANDLING&&nt(Se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Y.attributeNameCheck=Se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Se.CUSTOM_ELEMENT_HANDLING&&typeof Se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Y.allowCustomizedBuiltInElements=Se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),j&&(re=!1),W&&(be=!0),Me&&($=Sr({},yF),X=[],Me.html===!0&&(Sr($,vF),Sr(X,xF)),Me.svg===!0&&(Sr($,fC),Sr(X,gC),Sr(X,h4)),Me.svgFilters===!0&&(Sr($,dC),Sr(X,gC),Sr(X,h4)),Me.mathMl===!0&&(Sr($,pC),Sr(X,bF),Sr(X,h4))),Se.ADD_TAGS&&($===U&&($=eu($)),Sr($,Se.ADD_TAGS,Oe)),Se.ADD_ATTR&&(X===ee&&(X=eu(X)),Sr(X,Se.ADD_ATTR,Oe)),Se.ADD_URI_SAFE_ATTR&&Sr(ye,Se.ADD_URI_SAFE_ATTR,Oe),Se.FORBID_CONTENTS&&(Ne===Ce&&(Ne=eu(Ne)),Sr(Ne,Se.FORBID_CONTENTS,Oe)),qe&&($["#text"]=!0),K&&Sr($,["html","head","body"]),$.table&&(Sr($,["tbody"]),delete oe.tbody),Se.TRUSTED_TYPES_POLICY){if(typeof Se.TRUSTED_TYPES_POLICY.createHTML!="function")throw tv('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Se.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw tv('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=Se.TRUSTED_TYPES_POLICY,T=S.createHTML("")}else S===void 0&&(S=H2e(p,i)),S!==null&&typeof T=="string"&&(T=S.createHTML(""));Ga&&Ga(Se),Ke=Se}},ut=Sr({},[...fC,...dC,...O2e]),kt=Sr({},[...pC,...P2e]),ot=function(Se){let tt=w(Se);(!tt||!tt.tagName)&&(tt={namespaceURI:le,tagName:"template"});let St=f4(Se.tagName),pr=f4(tt.tagName);return ve[Se.namespaceURI]?Se.namespaceURI===z?tt.namespaceURI===se?St==="svg":tt.namespaceURI===he?St==="svg"&&(pr==="annotation-xml"||Ie[pr]):!!ut[St]:Se.namespaceURI===he?tt.namespaceURI===se?St==="math":tt.namespaceURI===z?St==="math"&&_e[pr]:!!kt[St]:Se.namespaceURI===se?tt.namespaceURI===z&&!_e[pr]||tt.namespaceURI===he&&!Ie[pr]?!1:!kt[St]&&(ze[St]||!ut[St]):!!(Xe==="application/xhtml+xml"&&ve[Se.namespaceURI]):!1},Qe=function(Se){J1(e.removed,{element:Se});try{w(Se).removeChild(Se)}catch{v(Se)}},dt=function(Se,tt){try{J1(e.removed,{attribute:tt.getAttributeNode(Se),from:tt})}catch{J1(e.removed,{attribute:null,from:tt})}if(tt.removeAttribute(Se),Se==="is")if(be||W)try{Qe(tt)}catch{}else try{tt.setAttribute(Se,"")}catch{}},gt=function(Se){let tt=null,St=null;if(ne)Se=""+Se;else{let cn=hC(Se,/^[\r\n\t ]+/);St=cn&&cn[0]}Xe==="application/xhtml+xml"&&le===se&&(Se=''+Se+"");let pr=S?S.createHTML(Se):Se;if(le===se)try{tt=new d().parseFromString(pr,Xe)}catch{}if(!tt||!tt.documentElement){tt=E.createDocument(le,"template",null);try{tt.documentElement.innerHTML=ke?T:pr}catch{}}let vn=tt.body||tt.documentElement;return Se&&St&&vn.insertBefore(r.createTextNode(St),vn.childNodes[0]||null),le===se?I.call(tt,K?"html":"body")[0]:K?tt.documentElement:vn},ht=function(Se){return A.call(Se.ownerDocument||Se,Se,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},st=function(Se){return Se instanceof f&&(typeof Se.nodeName!="string"||typeof Se.textContent!="string"||typeof Se.removeChild!="function"||!(Se.attributes instanceof h)||typeof Se.removeAttribute!="function"||typeof Se.setAttribute!="function"||typeof Se.namespaceURI!="string"||typeof Se.insertBefore!="function"||typeof Se.hasChildNodes!="function")},Br=function(Se){return typeof o=="function"&&Se instanceof o};function wt(xt,Se,tt){u4(xt,St=>{St.call(e,Se,tt,Ke)})}let mn=function(Se){let tt=null;if(wt(R.beforeSanitizeElements,Se,null),st(Se))return Qe(Se),!0;let St=Oe(Se.nodeName);if(wt(R.uponSanitizeElement,Se,{tagName:St,allowedTags:$}),ae&&Se.hasChildNodes()&&!Br(Se.firstElementChild)&&za(/<[/\w!]/g,Se.innerHTML)&&za(/<[/\w!]/g,Se.textContent)||Se.nodeType===nv.progressingInstruction||ae&&Se.nodeType===nv.comment&&za(/<[/\w]/g,Se.data))return Qe(Se),!0;if(!$[St]||oe[St]){if(!oe[St]&&er(St)&&(Y.tagNameCheck instanceof RegExp&&za(Y.tagNameCheck,St)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(St)))return!1;if(qe&&!Ne[St]){let pr=w(Se)||Se.parentNode,vn=b(Se)||Se.childNodes;if(vn&&pr){let cn=vn.length;for(let Jr=cn-1;Jr>=0;--Jr){let Di=m(vn[Jr],!0);Di.__removalCount=(Se.__removalCount||0)+1,pr.insertBefore(Di,y(Se))}}}return Qe(Se),!0}return Se instanceof l&&!ot(Se)||(St==="noscript"||St==="noembed"||St==="noframes")&&za(/<\/no(script|embed|frames)/i,Se.innerHTML)?(Qe(Se),!0):(j&&Se.nodeType===nv.text&&(tt=Se.textContent,u4([k,L,_],pr=>{tt=ev(tt,pr," ")}),Se.textContent!==tt&&(J1(e.removed,{element:Se.cloneNode()}),Se.textContent=tt)),wt(R.afterSanitizeElements,Se,null),!1)},Ir=function(Se,tt,St){if(pe&&(tt==="id"||tt==="name")&&(St in r||St in Ue))return!1;if(!(re&&!Q[tt]&&za(D,tt))){if(!(ue&&za(N,tt))){if(!X[tt]||Q[tt]){if(!(er(Se)&&(Y.tagNameCheck instanceof RegExp&&za(Y.tagNameCheck,Se)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(Se))&&(Y.attributeNameCheck instanceof RegExp&&za(Y.attributeNameCheck,tt)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(tt,Se))||tt==="is"&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&za(Y.tagNameCheck,St)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(St))))return!1}else if(!ye[tt]){if(!za(G,ev(St,P,""))){if(!((tt==="src"||tt==="xlink:href"||tt==="href")&&Se!=="script"&&I2e(St,"data:")===0&&Fe[Se])){if(!(te&&!za(O,ev(St,P,"")))){if(St)return!1}}}}}}return!0},er=function(Se){return Se!=="annotation-xml"&&hC(Se,B)},Zt=function(Se){wt(R.beforeSanitizeAttributes,Se,null);let{attributes:tt}=Se;if(!tt||st(Se))return;let St={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0},pr=tt.length;for(;pr--;){let vn=tt[pr],{name:cn,namespaceURI:Jr,value:Di}=vn,vs=Oe(cn),Yi=Di,tr=cn==="value"?Yi:N2e(Yi);if(St.attrName=vs,St.attrValue=tr,St.keepAttr=!0,St.forceKeepAttr=void 0,wt(R.uponSanitizeAttribute,Se,St),tr=St.attrValue,Be&&(vs==="id"||vs==="name")&&(dt(cn,Se),tr=Ye+tr),ae&&za(/((--!?|])>)|<\/(style|title|textarea)/i,tr)){dt(cn,Se);continue}if(vs==="attributename"&&hC(tr,"href")){dt(cn,Se);continue}if(St.forceKeepAttr)continue;if(!St.keepAttr){dt(cn,Se);continue}if(!Z&&za(/\/>/i,tr)){dt(cn,Se);continue}j&&u4([k,L,_],mt=>{tr=ev(tr,mt," ")});let et=Oe(Se.nodeName);if(!Ir(et,vs,tr)){dt(cn,Se);continue}if(S&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Jr)switch(p.getAttributeType(et,vs)){case"TrustedHTML":{tr=S.createHTML(tr);break}case"TrustedScriptURL":{tr=S.createScriptURL(tr);break}}if(tr!==Yi)try{Jr?Se.setAttributeNS(Jr,cn,tr):Se.setAttribute(cn,tr),st(Se)?Qe(Se):mF(e.removed)}catch{dt(cn,Se)}}wt(R.afterSanitizeAttributes,Se,null)},wr=function xt(Se){let tt=null,St=ht(Se);for(wt(R.beforeSanitizeShadowDOM,Se,null);tt=St.nextNode();)wt(R.uponSanitizeShadowNode,tt,null),mn(tt),Zt(tt),tt.content instanceof a&&xt(tt.content);wt(R.afterSanitizeShadowDOM,Se,null)};return e.sanitize=function(xt){let Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tt=null,St=null,pr=null,vn=null;if(ke=!xt,ke&&(xt=""),typeof xt!="string"&&!Br(xt))if(typeof xt.toString=="function"){if(xt=xt.toString(),typeof xt!="string")throw tv("dirty is not a string, aborting")}else throw tv("toString is not a function");if(!e.isSupported)return xt;if(de||Dt(Se),e.removed=[],typeof xt=="string"&&(Le=!1),Le){if(xt.nodeName){let Di=Oe(xt.nodeName);if(!$[Di]||oe[Di])throw tv("root node is forbidden and cannot be sanitized in-place")}}else if(xt instanceof o)tt=gt(""),St=tt.ownerDocument.importNode(xt,!0),St.nodeType===nv.element&&St.nodeName==="BODY"||St.nodeName==="HTML"?tt=St:tt.appendChild(St);else{if(!be&&!j&&!K&&xt.indexOf("<")===-1)return S&&Ve?S.createHTML(xt):xt;if(tt=gt(xt),!tt)return be?null:Ve?T:""}tt&&ne&&Qe(tt.firstChild);let cn=ht(Le?xt:tt);for(;pr=cn.nextNode();)mn(pr),Zt(pr),pr.content instanceof a&&wr(pr.content);if(Le)return xt;if(be){if(W)for(vn=C.call(tt.ownerDocument);tt.firstChild;)vn.appendChild(tt.firstChild);else vn=tt;return(X.shadowroot||X.shadowrootmode)&&(vn=M.call(n,vn,!0)),vn}let Jr=K?tt.outerHTML:tt.innerHTML;return K&&$["!doctype"]&&tt.ownerDocument&&tt.ownerDocument.doctype&&tt.ownerDocument.doctype.name&&za(CF,tt.ownerDocument.doctype.name)&&(Jr=" `+Jr),j&&u4([k,L,_],Di=>{Jr=ev(Jr,Di," ")}),S&&Ve?S.createHTML(Jr):Jr},e.setConfig=function(){let xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Dt(xt),de=!0},e.clearConfig=function(){Ke=null,de=!1},e.isValidAttribute=function(xt,Se,tt){Ke||Dt({});let St=Oe(xt),pr=Oe(Se);return Ir(St,pr,tt)},e.addHook=function(xt,Se){typeof Se=="function"&&J1(R[xt],Se)},e.removeHook=function(xt,Se){if(Se!==void 0){let tt=L2e(R[xt],Se);return tt===-1?void 0:R2e(R[xt],tt,1)[0]}return mF(R[xt])},e.removeHooks=function(xt){R[xt]=[]},e.removeAllHooks=function(){R=TF()},e}var kF,gF,C2e,A2e,_2e,Ga,mo,EF,mC,vC,u4,L2e,mF,J1,R2e,f4,uC,hC,ev,I2e,N2e,nl,za,tv,vF,fC,dC,O2e,pC,P2e,yF,xF,gC,bF,h4,B2e,F2e,$2e,z2e,G2e,SF,V2e,U2e,CF,q2e,wF,nv,W2e,H2e,TF,oh,yC=F(()=>{({entries:kF,setPrototypeOf:gF,isFrozen:C2e,getPrototypeOf:A2e,getOwnPropertyDescriptor:_2e}=Object),{freeze:Ga,seal:mo,create:EF}=Object,{apply:mC,construct:vC}=typeof Reflect<"u"&&Reflect;Ga||(Ga=function(e){return e});mo||(mo=function(e){return e});mC||(mC=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a1?r-1:0),i=1;i/gm),$2e=mo(/\$\{[\w\W]*/gm),z2e=mo(/^data-[\-\w.\u00B7-\uFFFF]+$/),G2e=mo(/^aria-[\-\w]+$/),SF=mo(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V2e=mo(/^(?:\w+script|data):/i),U2e=mo(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),CF=mo(/^html$/i),q2e=mo(/^[a-z][.\w]*(-[.\w]+)+$/i),wF=Object.freeze({__proto__:null,ARIA_ATTR:G2e,ATTR_WHITESPACE:U2e,CUSTOM_ELEMENT:q2e,DATA_ATTR:z2e,DOCTYPE_NAME:CF,ERB_EXPR:F2e,IS_ALLOWED_URI:SF,IS_SCRIPT_OR_DATA:V2e,MUSTACHE_EXPR:B2e,TMPLIT_EXPR:$2e}),nv={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},W2e=function(){return typeof window>"u"?null:window},H2e=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},TF=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};oh=AF()});var az={};hr(az,{ParseError:()=>ct,SETTINGS_SCHEMA:()=>ov,__defineFunction:()=>Ct,__defineMacro:()=>ce,__defineSymbol:()=>V,__domTree:()=>iz,__parse:()=>ez,__renderToDomTree:()=>$4,__renderToHTMLTree:()=>rz,__setFontMetrics:()=>o$,default:()=>Bbe,render:()=>o7,renderToString:()=>J$,version:()=>nz});function J2e(t){return String(t).replace(Q2e,e=>Z2e[e])}function nxe(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function uxe(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}function s$(t){for(var e=0;e=E4[e]&&t<=E4[e+1])return!0;return!1}function o$(t,e){Vl[t]=e}function WC(t,e,r){if(!Vl[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=Vl[e][n];if(!i&&t[0]in LF&&(n=LF[t[0]].charCodeAt(0),i=Vl[e][n]),!i&&r==="text"&&s$(n)&&(i=Vl[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function wxe(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!xC[e]){var r=xC[e]={cssEmPerMu:d4.quad[e]/18};for(var n in d4)d4.hasOwnProperty(n)&&(r[n]=d4[n][e])}return xC[e]}function NF(t){if(t instanceof xs)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function Cxe(t){if(t instanceof Zf)return t;throw new Error("Expected span but got "+String(t)+".")}function V(t,e,r,n,i,a){Sn[t][i]={font:e,group:r,replace:n},a&&n&&(Sn[t][n]=Sn[t][i])}function Ct(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l0&&(a.push(b4(s,e)),s=[]),a.push(n[o]));s.length>0&&a.push(b4(s,e));var u;r?(u=b4(ki(r,e,!0)),u.classes=["tag"],a.push(u)):i&&a.push(i);var h=au(["katex-html"],a);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=yt(h.height+h.depth),h.depth&&(f.style.verticalAlign=yt(-h.depth))}return h}function x$(t){return new Kf(t)}function TC(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof yo&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof yo&&r.text===","}else return!1}function BF(t,e,r,n,i){var a=bs(t,r),s;a.length===1&&a[0]instanceof Ua&&Wt.contains(["mrow","mtable"],a[0].type)?s=a[0]:s=new lt.MathNode("mrow",a);var o=new lt.MathNode("annotation",[new lt.TextNode(e)]);o.setAttribute("encoding","application/x-tex");var l=new lt.MathNode("semantics",[s,o]),u=new lt.MathNode("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var h=i?"katex":"katex-mathml";return $e.makeSpan([h],[u])}function dr(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function jC(t){var e=O4(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function O4(t){return t&&(t.type==="atom"||_xe.hasOwnProperty(t.type))?t:null}function k$(t,e){var r=ki(t.body,e,!0);return ibe([t.mclass],r,e)}function E$(t,e){var r,n=bs(t.body,e);return t.mclass==="minner"?r=new lt.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new lt.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new lt.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function obe(t,e,r){var n=abe[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[e[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),o=r.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[i,s,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function lbe(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new ct("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],a=0;a-1))if("<>AV".indexOf(u)>-1)for(var f=0;f<2;f++){for(var d=!0,p=l+1;pAV=|." after @',s[l]);var g=obe(u,h,t),m={type:"styling",body:[g],mode:"math",style:"display"};n.push(m),o=FF()}a%2===0?n.push(o):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var v=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function B4(t,e){var r=O4(t);if(r&&Wt.contains(wbe,r.text))return r;throw r?new ct("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new ct("Invalid delimiter type '"+t.type+"'",t)}function GF(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function ql(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l1||!h)&&m.pop(),y.length{Ws=class t{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new t(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}},xo=class t{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new t(r,Ws.range(this,e))}},ct=class t{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,a,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;i=s.start,a=s.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,a).replace(/[^]/g,"$&\u0332"),u;i>15?u="\u2026"+o.slice(i-15,i):u=o.slice(0,i);var h;a+15":">","<":"<",'"':""","'":"'"},Q2e=/[&><"']/g;a$=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},exe=function(e){var r=a$(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},txe=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},rxe=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},Wt={contains:Y2e,deflt:X2e,escape:J2e,hyphenate:K2e,getBaseElem:a$,isCharacterBox:exe,protocolFromUrl:rxe},ov={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:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},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:t=>Math.max(0,t),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:t=>Math.max(0,t),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:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};cv=class{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in ov)if(ov.hasOwnProperty(r)){var n=ov[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:nxe(n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new ct("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=Wt.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}},zl=class{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return Gl[ixe[this.id]]}sub(){return Gl[axe[this.id]]}fracNum(){return Gl[sxe[this.id]]}fracDen(){return Gl[oxe[this.id]]}cramp(){return Gl[lxe[this.id]]}text(){return Gl[cxe[this.id]]}isTight(){return this.size>=2}},qC=0,S4=1,ep=2,nu=3,uv=4,vo=5,tp=6,qa=7,Gl=[new zl(qC,0,!1),new zl(S4,0,!0),new zl(ep,1,!1),new zl(nu,1,!0),new zl(uv,2,!1),new zl(vo,2,!0),new zl(tp,3,!1),new zl(qa,3,!0)],ixe=[uv,vo,uv,vo,tp,qa,tp,qa],axe=[vo,vo,vo,vo,qa,qa,qa,qa],sxe=[ep,nu,uv,vo,tp,qa,tp,qa],oxe=[nu,nu,vo,vo,qa,qa,qa,qa],lxe=[S4,S4,nu,nu,vo,vo,qa,qa],cxe=[qC,S4,ep,nu,ep,nu,ep,nu],Xt={DISPLAY:Gl[qC],TEXT:Gl[ep],SCRIPT:Gl[uv],SCRIPTSCRIPT:Gl[tp]},NC=[{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]]}];E4=[];NC.forEach(t=>t.blocks.forEach(e=>E4.push(...e)));J0=80,hxe=function(e,r){return"M95,"+(622+e+r)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 c69,-144,104.5,-217.7,106.5,-221 l`+e/2.075+" -"+e+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+e)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},fxe=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+e/2.084+" -"+e+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+e)+`H1012.3 s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},dxe=function(e,r){return"M983 "+(10+e+r)+` l`+e/3.13+" -"+e+` c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},pxe=function(e,r){return"M424,"+(2398+e+r)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+e)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+` h400000v`+(40+e)+"h-400000z"},gxe=function(e,r){return"M473,"+(2713+e+r)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},mxe=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},vxe=function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+` H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},yxe=function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=hxe(r,J0);break;case"sqrtSize1":i=fxe(r,J0);break;case"sqrtSize2":i=dxe(r,J0);break;case"sqrtSize3":i=pxe(r,J0);break;case"sqrtSize4":i=gxe(r,J0);break;case"sqrtTall":i=vxe(r,J0,n)}return i},xxe=function(e,r){switch(e){case"\u239C":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"\u2223":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"\u2225":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"\u239F":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"\u23A2":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"\u23A5":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"\u23AA":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"\u23D0":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"\u2016":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},_F={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 435 0h399565z`,leftgroupunder:`M400000 262 H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},bxe=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, -36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+` c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(r+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.")}},Kf=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Wt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(e).join("")}},Vl={"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]}},d4={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]},LF={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};xC={};Txe=[[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]],RF=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],IF=function(e,r){return r.size<2?e:Txe[e-1][r.size-1]},C4=class t{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||t.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=RF[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new t(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:IF(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:RF[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=IF(t.BASESIZE,e);return this.size===r&&this.textSize===t.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==t.BASESIZE?["sizing","reset-size"+this.size,"size"+t.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=wxe(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};C4.BASESIZE=6;DC={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},kxe={ex:!0,em:!0,mu:!0},l$=function(e){return typeof e!="string"&&(e=e.unit),e in DC||e in kxe||e==="ex"},Kn=function(e,r){var n;if(e.unit in DC)n=DC[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new ct("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},yt=function(e){return+e.toFixed(4)+"em"},uh=function(e){return e.filter(r=>r).join(" ")},c$=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},u$=function(e){var r=document.createElement(e);r.className=uh(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var a=0;a/=\x00-\x1f]/,h$=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+Wt.escape(uh(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Wt.hyphenate(i)+":"+this.style[i]+";");n&&(r+=' style="'+Wt.escape(n)+'"');for(var a in this.attributes)if(this.attributes.hasOwnProperty(a)){if(Exe.test(a))throw new ct("Invalid attribute name '"+a+"'");r+=" "+a+'="'+Wt.escape(this.attributes[a])+'"'}r+=">";for(var s=0;s",r},Zf=class{constructor(e,r,n,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,c$.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return Wt.contains(this.classes,e)}toNode(){return u$.call(this,"span")}toMarkup(){return h$.call(this,"span")}},hv=class{constructor(e,r,n,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,c$.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return Wt.contains(this.classes,e)}toNode(){return u$.call(this,"a")}toMarkup(){return h$.call(this,"a")}},MC=class{constructor(e,r,n){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=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Wt.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e=''+Wt.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=yt(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=uh(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Wt.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+Wt.escape(n)+'"');var a=Wt.escape(this.text);return e?(r+=">",r+=a,r+="",r):a}},al=class{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}},fv=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e="","\\gt",!0);V(q,ie,Ee,"\u2208","\\in",!0);V(q,ie,Ee,"\uE020","\\@not");V(q,ie,Ee,"\u2282","\\subset",!0);V(q,ie,Ee,"\u2283","\\supset",!0);V(q,ie,Ee,"\u2286","\\subseteq",!0);V(q,ie,Ee,"\u2287","\\supseteq",!0);V(q,Te,Ee,"\u2288","\\nsubseteq",!0);V(q,Te,Ee,"\u2289","\\nsupseteq",!0);V(q,ie,Ee,"\u22A8","\\models");V(q,ie,Ee,"\u2190","\\leftarrow",!0);V(q,ie,Ee,"\u2264","\\le");V(q,ie,Ee,"\u2264","\\leq",!0);V(q,ie,Ee,"<","\\lt",!0);V(q,ie,Ee,"\u2192","\\rightarrow",!0);V(q,ie,Ee,"\u2192","\\to");V(q,Te,Ee,"\u2271","\\ngeq",!0);V(q,Te,Ee,"\u2270","\\nleq",!0);V(q,ie,ou,"\xA0","\\ ");V(q,ie,ou,"\xA0","\\space");V(q,ie,ou,"\xA0","\\nobreakspace");V(it,ie,ou,"\xA0","\\ ");V(it,ie,ou,"\xA0"," ");V(it,ie,ou,"\xA0","\\space");V(it,ie,ou,"\xA0","\\nobreakspace");V(q,ie,ou,null,"\\nobreak");V(q,ie,ou,null,"\\allowbreak");V(q,ie,D4,",",",");V(q,ie,D4,";",";");V(q,Te,Lt,"\u22BC","\\barwedge",!0);V(q,Te,Lt,"\u22BB","\\veebar",!0);V(q,ie,Lt,"\u2299","\\odot",!0);V(q,ie,Lt,"\u2295","\\oplus",!0);V(q,ie,Lt,"\u2297","\\otimes",!0);V(q,ie,Re,"\u2202","\\partial",!0);V(q,ie,Lt,"\u2298","\\oslash",!0);V(q,Te,Lt,"\u229A","\\circledcirc",!0);V(q,Te,Lt,"\u22A1","\\boxdot",!0);V(q,ie,Lt,"\u25B3","\\bigtriangleup");V(q,ie,Lt,"\u25BD","\\bigtriangledown");V(q,ie,Lt,"\u2020","\\dagger");V(q,ie,Lt,"\u22C4","\\diamond");V(q,ie,Lt,"\u22C6","\\star");V(q,ie,Lt,"\u25C3","\\triangleleft");V(q,ie,Lt,"\u25B9","\\triangleright");V(q,ie,Hs,"{","\\{");V(it,ie,Re,"{","\\{");V(it,ie,Re,"{","\\textbraceleft");V(q,ie,Wa,"}","\\}");V(it,ie,Re,"}","\\}");V(it,ie,Re,"}","\\textbraceright");V(q,ie,Hs,"{","\\lbrace");V(q,ie,Wa,"}","\\rbrace");V(q,ie,Hs,"[","\\lbrack",!0);V(it,ie,Re,"[","\\lbrack",!0);V(q,ie,Wa,"]","\\rbrack",!0);V(it,ie,Re,"]","\\rbrack",!0);V(q,ie,Hs,"(","\\lparen",!0);V(q,ie,Wa,")","\\rparen",!0);V(it,ie,Re,"<","\\textless",!0);V(it,ie,Re,">","\\textgreater",!0);V(q,ie,Hs,"\u230A","\\lfloor",!0);V(q,ie,Wa,"\u230B","\\rfloor",!0);V(q,ie,Hs,"\u2308","\\lceil",!0);V(q,ie,Wa,"\u2309","\\rceil",!0);V(q,ie,Re,"\\","\\backslash");V(q,ie,Re,"\u2223","|");V(q,ie,Re,"\u2223","\\vert");V(it,ie,Re,"|","\\textbar",!0);V(q,ie,Re,"\u2225","\\|");V(q,ie,Re,"\u2225","\\Vert");V(it,ie,Re,"\u2225","\\textbardbl");V(it,ie,Re,"~","\\textasciitilde");V(it,ie,Re,"\\","\\textbackslash");V(it,ie,Re,"^","\\textasciicircum");V(q,ie,Ee,"\u2191","\\uparrow",!0);V(q,ie,Ee,"\u21D1","\\Uparrow",!0);V(q,ie,Ee,"\u2193","\\downarrow",!0);V(q,ie,Ee,"\u21D3","\\Downarrow",!0);V(q,ie,Ee,"\u2195","\\updownarrow",!0);V(q,ie,Ee,"\u21D5","\\Updownarrow",!0);V(q,ie,pi,"\u2210","\\coprod");V(q,ie,pi,"\u22C1","\\bigvee");V(q,ie,pi,"\u22C0","\\bigwedge");V(q,ie,pi,"\u2A04","\\biguplus");V(q,ie,pi,"\u22C2","\\bigcap");V(q,ie,pi,"\u22C3","\\bigcup");V(q,ie,pi,"\u222B","\\int");V(q,ie,pi,"\u222B","\\intop");V(q,ie,pi,"\u222C","\\iint");V(q,ie,pi,"\u222D","\\iiint");V(q,ie,pi,"\u220F","\\prod");V(q,ie,pi,"\u2211","\\sum");V(q,ie,pi,"\u2A02","\\bigotimes");V(q,ie,pi,"\u2A01","\\bigoplus");V(q,ie,pi,"\u2A00","\\bigodot");V(q,ie,pi,"\u222E","\\oint");V(q,ie,pi,"\u222F","\\oiint");V(q,ie,pi,"\u2230","\\oiiint");V(q,ie,pi,"\u2A06","\\bigsqcup");V(q,ie,pi,"\u222B","\\smallint");V(it,ie,rp,"\u2026","\\textellipsis");V(q,ie,rp,"\u2026","\\mathellipsis");V(it,ie,rp,"\u2026","\\ldots",!0);V(q,ie,rp,"\u2026","\\ldots",!0);V(q,ie,rp,"\u22EF","\\@cdots",!0);V(q,ie,rp,"\u22F1","\\ddots",!0);V(q,ie,Re,"\u22EE","\\varvdots");V(it,ie,Re,"\u22EE","\\varvdots");V(q,ie,Bn,"\u02CA","\\acute");V(q,ie,Bn,"\u02CB","\\grave");V(q,ie,Bn,"\xA8","\\ddot");V(q,ie,Bn,"~","\\tilde");V(q,ie,Bn,"\u02C9","\\bar");V(q,ie,Bn,"\u02D8","\\breve");V(q,ie,Bn,"\u02C7","\\check");V(q,ie,Bn,"^","\\hat");V(q,ie,Bn,"\u20D7","\\vec");V(q,ie,Bn,"\u02D9","\\dot");V(q,ie,Bn,"\u02DA","\\mathring");V(q,ie,Yt,"\uE131","\\@imath");V(q,ie,Yt,"\uE237","\\@jmath");V(q,ie,Re,"\u0131","\u0131");V(q,ie,Re,"\u0237","\u0237");V(it,ie,Re,"\u0131","\\i",!0);V(it,ie,Re,"\u0237","\\j",!0);V(it,ie,Re,"\xDF","\\ss",!0);V(it,ie,Re,"\xE6","\\ae",!0);V(it,ie,Re,"\u0153","\\oe",!0);V(it,ie,Re,"\xF8","\\o",!0);V(it,ie,Re,"\xC6","\\AE",!0);V(it,ie,Re,"\u0152","\\OE",!0);V(it,ie,Re,"\xD8","\\O",!0);V(it,ie,Bn,"\u02CA","\\'");V(it,ie,Bn,"\u02CB","\\`");V(it,ie,Bn,"\u02C6","\\^");V(it,ie,Bn,"\u02DC","\\~");V(it,ie,Bn,"\u02C9","\\=");V(it,ie,Bn,"\u02D8","\\u");V(it,ie,Bn,"\u02D9","\\.");V(it,ie,Bn,"\xB8","\\c");V(it,ie,Bn,"\u02DA","\\r");V(it,ie,Bn,"\u02C7","\\v");V(it,ie,Bn,"\xA8",'\\"');V(it,ie,Bn,"\u02DD","\\H");V(it,ie,Bn,"\u25EF","\\textcircled");f$={"--":!0,"---":!0,"``":!0,"''":!0};V(it,ie,Re,"\u2013","--",!0);V(it,ie,Re,"\u2013","\\textendash");V(it,ie,Re,"\u2014","---",!0);V(it,ie,Re,"\u2014","\\textemdash");V(it,ie,Re,"\u2018","`",!0);V(it,ie,Re,"\u2018","\\textquoteleft");V(it,ie,Re,"\u2019","'",!0);V(it,ie,Re,"\u2019","\\textquoteright");V(it,ie,Re,"\u201C","``",!0);V(it,ie,Re,"\u201C","\\textquotedblleft");V(it,ie,Re,"\u201D","''",!0);V(it,ie,Re,"\u201D","\\textquotedblright");V(q,ie,Re,"\xB0","\\degree",!0);V(it,ie,Re,"\xB0","\\degree");V(it,ie,Re,"\xB0","\\textdegree",!0);V(q,ie,Re,"\xA3","\\pounds");V(q,ie,Re,"\xA3","\\mathsterling",!0);V(it,ie,Re,"\xA3","\\pounds");V(it,ie,Re,"\xA3","\\textsterling",!0);V(q,Te,Re,"\u2720","\\maltese");V(it,Te,Re,"\u2720","\\maltese");DF='0123456789/@."';for(p4=0;p40)return il(a,u,i,r,s.concat(h));if(l){var f,d;if(l==="boldsymbol"){var p=Ixe(a,i,r,s,n);f=p.fontName,d=[p.fontClass]}else o?(f=g$[l].fontName,d=[l]):(f=x4(l,r.fontWeight,r.fontShape),d=[l,r.fontWeight,r.fontShape]);if(M4(a,f,i).metrics)return il(a,f,i,r,s.concat(d));if(f$.hasOwnProperty(a)&&f.slice(0,10)==="Typewriter"){for(var g=[],m=0;m{if(uh(t.classes)!==uh(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")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},Mxe=t=>{for(var e=0;er&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},ys=function(e,r,n,i){var a=new Zf(e,r,n,i);return HC(a),a},d$=(t,e,r,n)=>new Zf(t,e,r,n),Oxe=function(e,r,n){var i=ys([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=yt(i.height),i.maxFontSize=1,i},Pxe=function(e,r,n,i){var a=new hv(e,r,n,i);return HC(a),a},p$=function(e){var r=new Kf(e);return HC(r),r},Bxe=function(e,r){return e instanceof Kf?ys([],[e],r):e},Fxe=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,s=1;s{var r=ys(["mspace"],[],e),n=Kn(t,e);return r.style.marginRight=yt(n),r},x4=function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a},g$={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},m$={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Gxe=function(e,r){var[n,i,a]=m$[e],s=new Ul(n),o=new al([s],{width:yt(i),height:yt(a),style:"width:"+yt(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=d$(["overlay"],[o],r);return l.height=a,l.style.height=yt(a),l.style.width=yt(i),l},$e={fontMap:g$,makeSymbol:il,mathsym:Rxe,makeSpan:ys,makeSvgSpan:d$,makeLineSpan:Oxe,makeAnchor:Pxe,makeFragment:p$,wrapFragment:Bxe,makeVList:$xe,makeOrd:Nxe,makeGlue:zxe,staticSvg:Gxe,svgData:m$,tryCombineChars:Mxe},jn={number:3,unit:"mu"},jf={number:4,unit:"mu"},ru={number:5,unit:"mu"},Vxe={mord:{mop:jn,mbin:jf,mrel:ru,minner:jn},mop:{mord:jn,mop:jn,mrel:ru,minner:jn},mbin:{mord:jf,mop:jf,mopen:jf,minner:jf},mrel:{mord:ru,mop:ru,mopen:ru,minner:ru},mopen:{},mclose:{mop:jn,mbin:jf,mrel:ru,minner:jn},mpunct:{mord:jn,mop:jn,mrel:ru,mopen:jn,mclose:jn,mpunct:jn,minner:jn},minner:{mord:jn,mop:jn,mbin:jf,mrel:ru,mopen:jn,mpunct:jn,minner:jn}},Uxe={mord:{mop:jn},mop:{mord:jn,mop:jn},mbin:{},mrel:{},mopen:{},mclose:{mop:jn},mpunct:{},minner:{mop:jn}},v$={},_4={},L4={};R4=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},oi=function(e){return e.type==="ordgroup"?e.body:[e]},au=$e.makeSpan,qxe=["leftmost","mbin","mopen","mrel","mop","mpunct"],Wxe=["rightmost","mrel","mclose","mpunct"],Hxe={display:Xt.DISPLAY,text:Xt.TEXT,script:Xt.SCRIPT,scriptscript:Xt.SCRIPTSCRIPT},Yxe={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ki=function(e,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],s=0;s{var v=m.classes[0],y=g.classes[0];v==="mbin"&&Wt.contains(Wxe,y)?m.classes[0]="mord":y==="mbin"&&Wt.contains(qxe,v)&&(g.classes[0]="mord")},{node:f},d,p),PF(a,(g,m)=>{var v=PC(m),y=PC(g),b=v&&y?g.hasClass("mtight")?Uxe[v][y]:Vxe[v][y]:null;if(b)return $e.makeGlue(b,u)},{node:f},d,p),a},PF=function t(e,r,n,i,a){i&&e.push(i);for(var s=0;sd=>{e.splice(f+1,0,d),s++})(s)}i&&e.pop()},y$=function(e){return e instanceof Kf||e instanceof hv||e instanceof Zf&&e.hasClass("enclosing")?e:null},Xxe=function t(e,r){var n=y$(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left")}}return e},PC=function(e,r){return e?(r&&(e=Xxe(e,r)),Yxe[e.classes[0]]||null):null},dv=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return au(r.concat(n))},Fr=function(e,r,n){if(!e)return au();if(_4[e.type]){var i=_4[e.type](e,r);if(n&&r.size!==n.size){i=au(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new ct("Got group of unknown type: '"+e.type+"'")};Ua=class{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=uh(this.classes));for(var n=0;n0&&(e+=' class ="'+Wt.escape(uh(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}},yo=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Wt.escape(this.toText())}toText(){return this.text}},FC=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",yt(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},lt={MathNode:Ua,TextNode:yo,SpaceNode:FC,newDocumentFragment:x$},bo=function(e,r,n){return Sn[r][e]&&Sn[r][e].replace&&e.charCodeAt(0)!==55349&&!(f$.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Sn[r][e].replace),new lt.TextNode(e)},YC=function(e){return e.length===1?e[0]:new lt.MathNode("mrow",e)},XC=function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=e.text;if(Wt.contains(["\\imath","\\jmath"],a))return null;Sn[i][a]&&Sn[i][a].replace&&(a=Sn[i][a].replace);var s=$e.fontMap[n].fontName;return WC(a,s,i)?$e.fontMap[n].variant:null};bs=function(e,r,n){if(e.length===1){var i=yn(e[0],r);return n&&i instanceof Ua&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],s,o=0;o=1&&(s.type==="mn"||TC(s))){var u=l.children[0];u instanceof Ua&&u.type==="mn"&&(u.children=[...s.children,...u.children],a.pop())}else if(s.type==="mi"&&s.children.length===1){var h=s.children[0];if(h instanceof yo&&h.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof yo&&f.text.length>0&&(f.text=f.text.slice(0,1)+"\u0338"+f.text.slice(1),a.pop())}}}a.push(l),s=l}return a},hh=function(e,r,n){return YC(bs(e,r,n))},yn=function(e,r){if(!e)return new lt.MathNode("mrow");if(L4[e.type]){var n=L4[e.type](e,r);return n}else throw new ct("Got group of unknown type: '"+e.type+"'")};b$=function(e){return new C4({style:e.displayMode?Xt.DISPLAY:Xt.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},w$=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=$e.makeSpan(n,[e])}return e},jxe=function(e,r,n){var i=b$(n),a;if(n.output==="mathml")return BF(e,r,i,n.displayMode,!0);if(n.output==="html"){var s=BC(e,i);a=$e.makeSpan(["katex"],[s])}else{var o=BF(e,r,i,n.displayMode,!1),l=BC(e,i);a=$e.makeSpan(["katex"],[o,l])}return w$(a,n)},Kxe=function(e,r,n){var i=b$(n),a=BC(e,i),s=$e.makeSpan(["katex"],[a]);return w$(s,n)},Zxe={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Qxe=function(e){var r=new lt.MathNode("mo",[new lt.TextNode(Zxe[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},Jxe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},ebe=function(e){return e.type==="ordgroup"?e.body.length:1},tbe=function(e,r){function n(){var o=4e5,l=e.label.slice(1);if(Wt.contains(["widehat","widecheck","widetilde","utilde"],l)){var u=e,h=ebe(u.base),f,d,p;if(h>5)l==="widehat"||l==="widecheck"?(f=420,o=2364,p=.42,d=l+"4"):(f=312,o=2340,p=.34,d="tilde4");else{var g=[1,1,2,2,3,3][h];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][g],f=[0,239,300,360,420][g],p=[0,.24,.3,.3,.36,.42][g],d=l+g):(o=[0,600,1033,2339,2340][g],f=[0,260,286,306,312][g],p=[0,.26,.286,.3,.306,.34][g],d="tilde"+g)}var m=new Ul(d),v=new al([m],{width:"100%",height:yt(p),viewBox:"0 0 "+o+" "+f,preserveAspectRatio:"none"});return{span:$e.makeSvgSpan([],[v],r),minWidth:0,height:p}}else{var y=[],b=Jxe[l],[w,S,T]=b,E=T/1e3,A=w.length,C,I;if(A===1){var M=b[3];C=["hide-tail"],I=[M]}else if(A===2)C=["halfarrow-left","halfarrow-right"],I=["xMinYMin","xMaxYMin"];else if(A===3)C=["brace-left","brace-center","brace-right"],I=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support `+A+" children.");for(var R=0;R0&&(i.style.minWidth=yt(a)),i},rbe=function(e,r,n,i,a){var s,o=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=$e.makeSpan(["stretchy",r],[],a),r==="fbox"){var l=a.color&&a.getColor();l&&(s.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new fv({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new fv({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new al(u,{width:"100%",height:yt(o)});s=$e.makeSvgSpan([],[h],a)}return s.height=o,s.style.height=yt(o),s},su={encloseSpan:rbe,mathMLnode:Qxe,svgSpan:tbe};KC=(t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=dr(t.base,"accent"),r=n.base,t.base=r,i=Cxe(Fr(t,e)),t.base=n):(n=dr(t,"accent"),r=n.base);var a=Fr(r,e.havingCrampedStyle()),s=n.isShifty&&Wt.isCharacterBox(r),o=0;if(s){var l=Wt.getBaseElem(r),u=Fr(l,e.havingCrampedStyle());o=NF(u).skew}var h=n.label==="\\c",f=h?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight),d;if(n.isStretchy)d=su.svgSpan(n,e),d=$e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+yt(2*o)+")",marginLeft:yt(2*o)}:void 0}]},e);else{var p,g;n.label==="\\vec"?(p=$e.staticSvg("vec",e),g=$e.svgData.vec[1]):(p=$e.makeOrd({mode:n.mode,text:n.label},e,"textord"),p=NF(p),p.italic=0,g=p.width,h&&(f+=p.depth)),d=$e.makeSpan(["accent-body"],[p]);var m=n.label==="\\textcircled";m&&(d.classes.push("accent-full"),f=a.height);var v=o;m||(v-=g/2),d.style.left=yt(v),n.label==="\\textcircled"&&(d.style.top=".2em"),d=$e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:d}]},e)}var y=$e.makeSpan(["mord","accent"],[d],e);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},T$=(t,e)=>{var r=t.isStretchy?su.mathMLnode(t.label):new lt.MathNode("mo",[bo(t.label,t.mode)]),n=new lt.MathNode("mover",[yn(t.base,e),r]);return n.setAttribute("accent","true"),n},nbe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));Ct({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:(t,e)=>{var r=R4(e[0]),n=!nbe.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:KC,mathmlBuilder:T$});Ct({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:KC,mathmlBuilder:T$});Ct({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=Fr(t.base,e),n=su.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,a=$e.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return $e.makeSpan(["mord","accentunder"],[a],e)},mathmlBuilder:(t,e)=>{var r=su.mathMLnode(t.label),n=new lt.MathNode("munder",[yn(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});w4=t=>{var e=new lt.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};Ct({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:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=$e.wrapFragment(Fr(t.body,n,e),e),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;t.below&&(n=e.havingStyle(r.sub()),s=$e.wrapFragment(Fr(t.below,n,e),e),s.classes.push(a+"-arrow-pad"));var o=su.svgSpan(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,u=-e.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(u-=i.depth);var h;if(s){var f=-e.fontMetrics().axisHeight+s.height+.5*o.height+.111;h=$e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l},{type:"elem",elem:s,shift:f}]},e)}else h=$e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l}]},e);return h.children[0].children[0].children[1].classes.push("svg-align"),$e.makeSpan(["mrel","x-arrow"],[h],e)},mathmlBuilder(t,e){var r=su.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=w4(yn(t.body,e));if(t.below){var a=w4(yn(t.below,e));n=new lt.MathNode("munderover",[r,a,i])}else n=new lt.MathNode("mover",[r,i])}else if(t.below){var s=w4(yn(t.below,e));n=new lt.MathNode("munder",[r,s])}else n=w4(),n=new lt.MathNode("mover",[r,n]);return n}});ibe=$e.makeSpan;Ct({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:oi(i),isCharacterBox:Wt.isCharacterBox(i)}},htmlBuilder:k$,mathmlBuilder:E$});P4=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};Ct({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:P4(e[0]),body:oi(e[1]),isCharacterBox:Wt.isCharacterBox(e[1])}}});Ct({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],a=e[0],s;n!=="\\stackrel"?s=P4(i):s="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:oi(i)},l={type:"supsub",mode:a.mode,base:o,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[l],isCharacterBox:Wt.isCharacterBox(l)}},htmlBuilder:k$,mathmlBuilder:E$});Ct({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:P4(e[0]),body:oi(e[0])}},htmlBuilder(t,e){var r=ki(t.body,e,!0),n=$e.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=bs(t.body,e),n=new lt.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});abe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},FF=()=>({type:"styling",body:[],mode:"math",style:"display"}),$F=t=>t.type==="textord"&&t.text==="@",sbe=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;Ct({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=$e.wrapFragment(Fr(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=yt(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new lt.MathNode("mrow",[yn(t.label,e)]);return r=new lt.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new lt.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});Ct({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=$e.wrapFragment(Fr(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new lt.MathNode("mrow",[yn(t.fragment,e)])}});Ct({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=dr(e[0],"ordgroup"),i=n.body,a="",s=0;s=1114111)throw new ct("\\@char with invalid code point "+a);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});S$=(t,e)=>{var r=ki(t.body,e.withColor(t.color),!1);return $e.makeFragment(r)},C$=(t,e)=>{var r=bs(t.body,e.withColor(t.color)),n=new lt.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};Ct({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=dr(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:oi(i)}},htmlBuilder:S$,mathmlBuilder:C$});Ct({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=dr(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:S$,mathmlBuilder:C$});Ct({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&dr(i,"size").value}},htmlBuilder(t,e){var r=$e.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=yt(Kn(t.size,e)))),r},mathmlBuilder(t,e){var r=new lt.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",yt(Kn(t.size,e)))),r}});$C={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},A$=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new ct("Expected a control sequence",t);return e},cbe=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},_$=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};Ct({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if($C[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=$C[n.text]),dr(e.parseFunction(),"internal");throw new ct("Invalid token after macro prefix",n)}});Ct({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new ct("Expected a control sequence",n);for(var a=0,s,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),o[a].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new ct('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new ct('Argument number "'+n.text+'" out of order');a++,o.push([])}else{if(n.text==="EOF")throw new ct("Expected a macro definition");o[a].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return s&&l.unshift(s),(r==="\\edef"||r==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:o},r===$C[r]),{type:"internal",mode:e.mode}}});Ct({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=A$(e.gullet.popToken());e.gullet.consumeSpaces();var i=cbe(e);return _$(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});Ct({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=A$(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return _$(e,n,a,r==="\\\\globalfuture"),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});sv=function(e,r,n){var i=Sn.math[e]&&Sn.math[e].replace,a=WC(i||e,r,n);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return a},ZC=function(e,r,n,i){var a=n.havingBaseStyle(r),s=$e.makeSpan(i.concat(a.sizingClasses(n)),[e],n),o=a.sizeMultiplier/n.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=a.sizeMultiplier,s},L$=function(e,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=yt(a),e.height-=a,e.depth+=a},ube=function(e,r,n,i,a,s){var o=$e.makeSymbol(e,"Main-Regular",a,i),l=ZC(o,r,i,s);return n&&L$(l,i,r),l},hbe=function(e,r,n,i){return $e.makeSymbol(e,"Size"+r+"-Regular",n,i)},R$=function(e,r,n,i,a,s){var o=hbe(e,r,a,i),l=ZC($e.makeSpan(["delimsizing","size"+r],[o],i),Xt.TEXT,i,s);return n&&L$(l,i,Xt.TEXT),l},kC=function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=$e.makeSpan(["delimsizinginner",i],[$e.makeSpan([],[$e.makeSymbol(e,r,n)])]);return{type:"elem",elem:a}},EC=function(e,r,n){var i=Vl["Size4-Regular"][e.charCodeAt(0)]?Vl["Size4-Regular"][e.charCodeAt(0)][4]:Vl["Size1-Regular"][e.charCodeAt(0)][4],a=new Ul("inner",xxe(e,Math.round(1e3*r))),s=new al([a],{width:yt(i),height:yt(r),style:"width:"+yt(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=$e.makeSvgSpan([],[s],n);return o.height=r,o.style.height=yt(r),o.style.width=yt(i),{type:"elem",elem:o}},zC=.008,T4={type:"kern",size:-1*zC},fbe=["|","\\lvert","\\rvert","\\vert"],dbe=["\\|","\\lVert","\\rVert","\\Vert"],I$=function(e,r,n,i,a,s){var o,l,u,h,f="",d=0;o=u=h=e,l=null;var p="Size1-Regular";e==="\\uparrow"?u=h="\u23D0":e==="\\Uparrow"?u=h="\u2016":e==="\\downarrow"?o=u="\u23D0":e==="\\Downarrow"?o=u="\u2016":e==="\\updownarrow"?(o="\\uparrow",u="\u23D0",h="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",u="\u2016",h="\\Downarrow"):Wt.contains(fbe,e)?(u="\u2223",f="vert",d=333):Wt.contains(dbe,e)?(u="\u2225",f="doublevert",d=556):e==="["||e==="\\lbrack"?(o="\u23A1",u="\u23A2",h="\u23A3",p="Size4-Regular",f="lbrack",d=667):e==="]"||e==="\\rbrack"?(o="\u23A4",u="\u23A5",h="\u23A6",p="Size4-Regular",f="rbrack",d=667):e==="\\lfloor"||e==="\u230A"?(u=o="\u23A2",h="\u23A3",p="Size4-Regular",f="lfloor",d=667):e==="\\lceil"||e==="\u2308"?(o="\u23A1",u=h="\u23A2",p="Size4-Regular",f="lceil",d=667):e==="\\rfloor"||e==="\u230B"?(u=o="\u23A5",h="\u23A6",p="Size4-Regular",f="rfloor",d=667):e==="\\rceil"||e==="\u2309"?(o="\u23A4",u=h="\u23A5",p="Size4-Regular",f="rceil",d=667):e==="("||e==="\\lparen"?(o="\u239B",u="\u239C",h="\u239D",p="Size4-Regular",f="lparen",d=875):e===")"||e==="\\rparen"?(o="\u239E",u="\u239F",h="\u23A0",p="Size4-Regular",f="rparen",d=875):e==="\\{"||e==="\\lbrace"?(o="\u23A7",l="\u23A8",h="\u23A9",u="\u23AA",p="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="\u23AB",l="\u23AC",h="\u23AD",u="\u23AA",p="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(o="\u23A7",h="\u23A9",u="\u23AA",p="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(o="\u23AB",h="\u23AD",u="\u23AA",p="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(o="\u23A7",h="\u23AD",u="\u23AA",p="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(o="\u23AB",h="\u23A9",u="\u23AA",p="Size4-Regular");var g=sv(o,p,a),m=g.height+g.depth,v=sv(u,p,a),y=v.height+v.depth,b=sv(h,p,a),w=b.height+b.depth,S=0,T=1;if(l!==null){var E=sv(l,p,a);S=E.height+E.depth,T=2}var A=m+w+S,C=Math.max(0,Math.ceil((r-A)/(T*y))),I=A+C*T*y,M=i.fontMetrics().axisHeight;n&&(M*=i.sizeMultiplier);var R=I/2-M,k=[];if(f.length>0){var L=I-m-w,_=Math.round(I*1e3),D=bxe(f,Math.round(L*1e3)),N=new Ul(f,D),O=(d/1e3).toFixed(3)+"em",P=(_/1e3).toFixed(3)+"em",B=new al([N],{width:O,height:P,viewBox:"0 0 "+d+" "+_}),G=$e.makeSvgSpan([],[B],i);G.height=_/1e3,G.style.width=O,G.style.height=P,k.push({type:"elem",elem:G})}else{if(k.push(kC(h,p,a)),k.push(T4),l===null){var $=I-m-w+2*zC;k.push(EC(u,$,i))}else{var U=(I-m-w-S)/2+2*zC;k.push(EC(u,U,i)),k.push(T4),k.push(kC(l,p,a)),k.push(T4),k.push(EC(u,U,i))}k.push(T4),k.push(kC(o,p,a))}var X=i.havingBaseStyle(Xt.TEXT),ee=$e.makeVList({positionType:"bottom",positionData:R,children:k},X);return ZC($e.makeSpan(["delimsizing","mult"],[ee],X),Xt.TEXT,i,s)},SC=80,CC=.08,AC=function(e,r,n,i,a){var s=yxe(e,i,n),o=new Ul(e,s),l=new al([o],{width:"400em",height:yt(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return $e.makeSvgSpan(["hide-tail"],[l],a)},pbe=function(e,r){var n=r.havingBaseSizing(),i=O$("\\surd",e*n.sizeMultiplier,M$,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l=0,u=0,h=0,f;return i.type==="small"?(h=1e3+1e3*s+SC,e<1?a=1:e<1.4&&(a=.7),l=(1+s+CC)/a,u=(1+s)/a,o=AC("sqrtMain",l,h,s,r),o.style.minWidth="0.853em",f=.833/a):i.type==="large"?(h=(1e3+SC)*lv[i.size],u=(lv[i.size]+s)/a,l=(lv[i.size]+s+CC)/a,o=AC("sqrtSize"+i.size,l,h,s,r),o.style.minWidth="1.02em",f=1/a):(l=e+s+CC,u=e+s,h=Math.floor(1e3*e+s)+SC,o=AC("sqrtTall",l,h,s,r),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=yt(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},N$=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],gbe=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],D$=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],lv=[0,1.2,1.8,2.4,3],mbe=function(e,r,n,i,a){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Wt.contains(N$,e)||Wt.contains(D$,e))return R$(e,r,!1,n,i,a);if(Wt.contains(gbe,e))return I$(e,lv[r],!1,n,i,a);throw new ct("Illegal delimiter: '"+e+"'")},vbe=[{type:"small",style:Xt.SCRIPTSCRIPT},{type:"small",style:Xt.SCRIPT},{type:"small",style:Xt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ybe=[{type:"small",style:Xt.SCRIPTSCRIPT},{type:"small",style:Xt.SCRIPT},{type:"small",style:Xt.TEXT},{type:"stack"}],M$=[{type:"small",style:Xt.SCRIPTSCRIPT},{type:"small",style:Xt.SCRIPT},{type:"small",style:Xt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],xbe=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},O$=function(e,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;sr)return n[s]}return n[n.length-1]},P$=function(e,r,n,i,a,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var o;Wt.contains(D$,e)?o=vbe:Wt.contains(N$,e)?o=M$:o=ybe;var l=O$(e,r,o,i);return l.type==="small"?ube(e,l.style,n,i,a,s):l.type==="large"?R$(e,l.size,n,i,a,s):I$(e,r,n,i,a,s)},bbe=function(e,r,n,i,a,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,h=Math.max(r-o,n+o),f=Math.max(h/500*l,2*h-u);return P$(e,f,!0,i,a,s)},iu={sqrtImage:pbe,sizedDelim:mbe,sizeToMaxHeight:lv,customSizedDelim:P$,leftRightDelim:bbe},zF={"\\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}},wbe=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];Ct({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:(t,e)=>{var r=B4(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:zF[t.funcName].size,mclass:zF[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?$e.makeSpan([t.mclass]):iu.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(bo(t.delim,t.mode));var r=new lt.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=yt(iu.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});Ct({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new ct("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:B4(e[0],t).text,color:r}}});Ct({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=B4(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=dr(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,e)=>{GF(t);for(var r=ki(t.body,e,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s{GF(t);var r=bs(t.body,e);if(t.left!=="."){var n=new lt.MathNode("mo",[bo(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new lt.MathNode("mo",[bo(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return YC(r)}});Ct({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=B4(e[0],t);if(!t.parser.leftrightDepth)throw new ct("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if(t.delim===".")r=dv(e,[]);else{r=iu.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?bo("|","text"):bo(t.delim,t.mode),n=new lt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});QC=(t,e)=>{var r=$e.wrapFragment(Fr(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,a,s=0,o=Wt.isCharacterBox(t.body);if(n==="sout")a=$e.makeSpan(["stretchy","sout"]),a.height=e.fontMetrics().defaultRuleThickness/i,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=Kn({number:.6,unit:"pt"},e),u=Kn({number:.35,unit:"ex"},e),h=e.havingBaseSizing();i=i/h.sizeMultiplier;var f=r.height+r.depth+l+u;r.style.paddingLeft=yt(f/2+l);var d=Math.floor(1e3*f*i),p=mxe(d),g=new al([new Ul("phase",p)],{width:"400em",height:yt(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=$e.makeSvgSpan(["hide-tail"],[g],e),a.style.height=yt(f),s=r.depth+l+u}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var m=0,v=0,y=0;/box/.test(n)?(y=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),m=e.fontMetrics().fboxsep+(n==="colorbox"?0:y),v=m):n==="angl"?(y=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),m=4*y,v=Math.max(0,.25-r.depth)):(m=o?.2:0,v=m),a=su.encloseSpan(r,n,m,v,e),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=yt(y)):n==="angl"&&y!==.049&&(a.style.borderTopWidth=yt(y),a.style.borderRightWidth=yt(y)),s=r.depth+v,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var b;if(t.backgroundColor)b=$e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]},e);else{var w=/cancel|phase/.test(n)?["svg-align"]:[];b=$e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:w}]},e)}return/cancel/.test(n)&&(b.height=r.height,b.depth=r.depth),/cancel/.test(n)&&!o?$e.makeSpan(["mord","cancel-lap"],[b],e):$e.makeSpan(["mord"],[b],e)},JC=(t,e)=>{var r=0,n=new lt.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[yn(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};Ct({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=dr(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:QC,mathmlBuilder:JC});Ct({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=dr(e[0],"color-token").color,s=dr(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:QC,mathmlBuilder:JC});Ct({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});Ct({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:QC,mathmlBuilder:JC});Ct({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});B$={};F$={};F4=t=>{var e=t.parser.settings;if(!e.displayMode)throw new ct("{"+t.envName+"} can be used only in display mode.")};Wl=function(e,r){var n,i,a=e.body.length,s=e.hLinesBeforeRow,o=0,l=new Array(a),u=[],h=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,d=5*f;if(e.colSeparationType&&e.colSeparationType==="small"){var p=r.havingStyle(Xt.SCRIPT).sizeMultiplier;d=.2778*(p/r.sizeMultiplier)}var g=e.colSeparationType==="CD"?Kn({number:3,unit:"ex"},r):12*f,m=3*f,v=e.arraystretch*g,y=.7*v,b=.3*v,w=0;function S(W){for(var Ve=0;Ve0&&(w+=.25),u.push({pos:w,isDashed:W[Ve]})}for(S(s[0]),n=0;n0&&(R+=b,AW))for(n=0;n=o)){var Q=void 0;(i>0||e.hskipBeforeAndAfter)&&(Q=Wt.deflt(U.pregap,d),Q!==0&&(D=$e.makeSpan(["arraycolsep"],[]),D.style.width=yt(Q),_.push(D)));var ue=[];for(n=0;n0){for(var j=$e.makeLineSpan("hline",r,h),ae=$e.makeLineSpan("hdashline",r,h),K=[{type:"elem",elem:l,shift:0}];u.length>0;){var de=u.pop(),ne=de.pos-k;de.isDashed?K.push({type:"elem",elem:ae,shift:ne}):K.push({type:"elem",elem:j,shift:ne})}l=$e.makeVList({positionType:"individualShift",children:K},r)}if(O.length===0)return $e.makeSpan(["mord"],[l],r);var be=$e.makeVList({positionType:"individualShift",children:O},r);return be=$e.makeSpan(["tag"],[be],r),$e.makeFragment([l,be])},Tbe={c:"center ",l:"left ",r:"right "},Hl=function(e,r){for(var n=[],i=new lt.MathNode("mtd",[],["mtr-glue"]),a=new lt.MathNode("mtd",[],["mml-eqn-num"]),s=0;s0){var g=e.cols,m="",v=!1,y=0,b=g.length;g[0].type==="separator"&&(d+="top ",y=1),g[g.length-1].type==="separator"&&(d+="bottom ",b-=1);for(var w=y;w0?"left ":"",d+=C[C.length-1].length>0?"right ":"";for(var I=1;I-1?"alignat":"align",a=e.envName==="split",s=fh(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:e7(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),o,l=0,u={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var h="",f=0;f0&&p&&(v=1),n[g]={type:"align",align:m,pregap:v,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};ql({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=O4(e[0]),n=r?[e[0]]:dr(e[0],"ordgroup").body,i=n.map(function(s){var o=jC(s),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new ct("Unknown column alignment: "+l,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return fh(t.parser,a,t7(t.envName))},htmlBuilder:Wl,mathmlBuilder:Hl});ql({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new ct("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=fh(t.parser,n,t7(t.envName)),s=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:Wl,mathmlBuilder:Hl});ql({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=fh(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:Wl,mathmlBuilder:Hl});ql({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=O4(e[0]),n=r?[e[0]]:dr(e[0],"ordgroup").body,i=n.map(function(s){var o=jC(s),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new ct("Unknown column alignment: "+l,s)});if(i.length>1)throw new ct("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=fh(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new ct("{subarray} can contain only one column");return a},htmlBuilder:Wl,mathmlBuilder:Hl});ql({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=fh(t.parser,e,t7(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Wl,mathmlBuilder:Hl});ql({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:$$,htmlBuilder:Wl,mathmlBuilder:Hl});ql({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){Wt.contains(["gather","gather*"],t.envName)&&F4(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:e7(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return fh(t.parser,e,"display")},htmlBuilder:Wl,mathmlBuilder:Hl});ql({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:$$,htmlBuilder:Wl,mathmlBuilder:Hl});ql({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){F4(t);var e={autoTag:e7(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return fh(t.parser,e,"display")},htmlBuilder:Wl,mathmlBuilder:Hl});ql({type:"array",names:["CD"],props:{numArgs:0},handler(t){return F4(t),lbe(t.parser)},htmlBuilder:Wl,mathmlBuilder:Hl});ce("\\nonumber","\\gdef\\@eqnsw{0}");ce("\\notag","\\nonumber");Ct({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new ct(t.funcName+" valid only within array environment")}});UF=B$;Ct({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new ct("Invalid environment name",i);for(var a="",s=0;s{var r=t.font,n=e.withFont(r);return Fr(t.body,n)},G$=(t,e)=>{var r=t.font,n=e.withFont(r);return yn(t.body,n)},qF={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ct({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=R4(e[0]),a=n;return a in qF&&(a=qF[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:z$,mathmlBuilder:G$});Ct({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],i=Wt.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:P4(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});Ct({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,s=r.parseExpression(!0,i),o="math"+n.slice(1);return{type:"font",mode:a,font:o,body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:z$,mathmlBuilder:G$});V$=(t,e)=>{var r=e;return t==="display"?r=r.id>=Xt.SCRIPT.id?r.text():Xt.DISPLAY:t==="text"&&r.size===Xt.DISPLAY.size?r=Xt.TEXT:t==="script"?r=Xt.SCRIPT:t==="scriptscript"&&(r=Xt.SCRIPTSCRIPT),r},r7=(t,e)=>{var r=V$(t.size,e.style),n=r.fracNum(),i=r.fracDen(),a;a=e.havingStyle(n);var s=Fr(t.numer,a,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height0?g=3*d:g=7*d,m=e.fontMetrics().denom1):(f>0?(p=e.fontMetrics().num2,g=d):(p=e.fontMetrics().num3,g=3*d),m=e.fontMetrics().denom2);var v;if(h){var b=e.fontMetrics().axisHeight;p-s.depth-(b+.5*f){var r=new lt.MathNode("mfrac",[yn(t.numer,e),yn(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=Kn(t.barSize,e);r.setAttribute("linethickness",yt(n))}var i=V$(t.size,e.style);if(i.size!==e.style.size){r=new lt.MathNode("mstyle",[r]);var a=i.size===Xt.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var s=[];if(t.leftDelim!=null){var o=new lt.MathNode("mo",[new lt.TextNode(t.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(r),t.rightDelim!=null){var l=new lt.MathNode("mo",[new lt.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return YC(s)}return r};Ct({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1],s,o=null,l=null,u="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:s,leftDelim:o,rightDelim:l,size:u,barSize:null}},htmlBuilder:r7,mathmlBuilder:n7});Ct({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});Ct({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});WF=["display","text","script","scriptscript"],HF=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};Ct({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],a=R4(e[0]),s=a.type==="atom"&&a.family==="open"?HF(a.text):null,o=R4(e[1]),l=o.type==="atom"&&o.family==="close"?HF(o.text):null,u=dr(e[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var d="auto",p=e[3];if(p.type==="ordgroup"){if(p.body.length>0){var g=dr(p.body[0],"textord");d=WF[Number(g.text)]}}else p=dr(p,"textord"),d=WF[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:h,barSize:f,leftDelim:s,rightDelim:l,size:d}},htmlBuilder:r7,mathmlBuilder:n7});Ct({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:dr(e[0],"size").value,token:i}}});Ct({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=txe(dr(e[1],"infix").size),s=e[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:r7,mathmlBuilder:n7});U$=(t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?Fr(t.sup,e.havingStyle(r.sup()),e):Fr(t.sub,e.havingStyle(r.sub()),e),i=dr(t.base,"horizBrace")):i=dr(t,"horizBrace");var a=Fr(i.base,e.havingBaseStyle(Xt.DISPLAY)),s=su.svgSpan(i,e),o;if(i.isOver?(o=$e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},e),o.children[0].children[0].children[1].classes.push("svg-align")):(o=$e.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},e),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=$e.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e);i.isOver?o=$e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):o=$e.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return $e.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e)},kbe=(t,e)=>{var r=su.mathMLnode(t.label);return new lt.MathNode(t.isOver?"mover":"munder",[yn(t.base,e),r])};Ct({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:U$,mathmlBuilder:kbe});Ct({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=dr(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:oi(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=ki(t.body,e,!1);return $e.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=hh(t.body,e);return r instanceof Ua||(r=new Ua("mrow",[r])),r.setAttribute("href",t.href),r}});Ct({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=dr(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:r,funcName:n,token:i}=t,a=dr(e[0],"raw").string,s=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var u=a.split(","),h=0;h{var r=ki(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=$e.makeSpan(n,r,e);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,e)=>hh(t.body,e)});Ct({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:oi(e[0]),mathml:oi(e[1])}},htmlBuilder:(t,e)=>{var r=ki(t.html,e,!1);return $e.makeFragment(r)},mathmlBuilder:(t,e)=>hh(t.mathml,e)});_C=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new ct("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!l$(n))throw new ct("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Ct({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var l=dr(r[0],"raw").string,u=l.split(","),h=0;h{var r=Kn(t.height,e),n=0;t.totalheight.number>0&&(n=Kn(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=Kn(t.width,e));var a={height:yt(r+n)};i>0&&(a.width=yt(i)),n>0&&(a.verticalAlign=yt(-n));var s=new MC(t.src,t.alt,a);return s.height=r,s.depth=n,s},mathmlBuilder:(t,e)=>{var r=new lt.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=Kn(t.height,e),i=0;if(t.totalheight.number>0&&(i=Kn(t.totalheight,e)-n,r.setAttribute("valign",yt(-i))),r.setAttribute("height",yt(n+i)),t.width.number>0){var a=Kn(t.width,e);r.setAttribute("width",yt(a))}return r.setAttribute("src",t.src),r}});Ct({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=dr(e[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return $e.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=Kn(t.dimension,e);return new lt.SpaceNode(r)}});Ct({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=$e.makeSpan([],[Fr(t.body,e)]),r=$e.makeSpan(["inner"],[r],e)):r=$e.makeSpan(["inner"],[Fr(t.body,e)]);var n=$e.makeSpan(["fix"],[]),i=$e.makeSpan([t.alignment],[r,n],e),a=$e.makeSpan(["strut"]);return a.style.height=yt(i.height+i.depth),i.depth&&(a.style.verticalAlign=yt(-i.depth)),i.children.unshift(a),i=$e.makeSpan(["thinbox"],[i],e),$e.makeSpan(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new lt.MathNode("mpadded",[yn(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});Ct({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s}}});Ct({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new ct("Mismatched "+t.funcName)}});YF=(t,e)=>{switch(e.style.size){case Xt.DISPLAY.size:return t.display;case Xt.TEXT.size:return t.text;case Xt.SCRIPT.size:return t.script;case Xt.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};Ct({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:oi(e[0]),text:oi(e[1]),script:oi(e[2]),scriptscript:oi(e[3])}},htmlBuilder:(t,e)=>{var r=YF(t,e),n=ki(r,e,!1);return $e.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=YF(t,e);return hh(r,e)}});q$=(t,e,r,n,i,a,s)=>{t=$e.makeSpan([],[t]);var o=r&&Wt.isCharacterBox(r),l,u;if(e){var h=Fr(e,n.havingStyle(i.sup()),n);u={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-h.depth)}}if(r){var f=Fr(r,n.havingStyle(i.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var d;if(u&&l){var p=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s;d=$e.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:yt(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:yt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var g=t.height-s;d=$e.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:yt(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(u){var m=t.depth+s;d=$e.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:yt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var v=[d];if(l&&a!==0&&!o){var y=$e.makeSpan(["mspace"],[],n);y.style.marginRight=yt(a),v.unshift(y)}return $e.makeSpan(["mop","op-limits"],v,n)},W$=["\\smallint"],np=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=dr(t.base,"op"),i=!0):a=dr(t,"op");var s=e.style,o=!1;s.size===Xt.DISPLAY.size&&a.symbol&&!Wt.contains(W$,a.name)&&(o=!0);var l;if(a.symbol){var u=o?"Size2-Regular":"Size1-Regular",h="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(h=a.name.slice(1),a.name=h==="oiint"?"\\iint":"\\iiint"),l=$e.makeSymbol(a.name,u,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),h.length>0){var f=l.italic,d=$e.staticSvg(h+"Size"+(o?"2":"1"),e);l=$e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:o?.08:0}]},e),a.name="\\"+h,l.classes.unshift("mop"),l.italic=f}}else if(a.body){var p=ki(a.body,e,!0);p.length===1&&p[0]instanceof xs?(l=p[0],l.classes[0]="mop"):l=$e.makeSpan(["mop"],p,e)}else{for(var g=[],m=1;m{var r;if(t.symbol)r=new Ua("mo",[bo(t.name,t.mode)]),Wt.contains(W$,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new Ua("mo",bs(t.body,e));else{r=new Ua("mi",[new yo(t.name.slice(1))]);var n=new Ua("mo",[bo("\u2061","text")]);t.parentIsSupSub?r=new Ua("mrow",[r,n]):r=x$([r,n])}return r},Ebe={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Ct({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=Ebe[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:np,mathmlBuilder:pv});Ct({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:oi(n)}},htmlBuilder:np,mathmlBuilder:pv});Sbe={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Ct({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:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:np,mathmlBuilder:pv});Ct({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:np,mathmlBuilder:pv});Ct({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=Sbe[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:np,mathmlBuilder:pv});H$=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=dr(t.base,"operatorname"),i=!0):a=dr(t,"operatorname");var s;if(a.body.length>0){for(var o=a.body.map(f=>{var d=f.text;return typeof d=="string"?{type:"textord",mode:f.mode,text:d}:f}),l=ki(o,e.withFont("mathrm"),!0),u=0;u{for(var r=bs(t.body,e.withFont("mathrm")),n=!0,i=0;ih.toText()).join("");r=[new lt.TextNode(o)]}var l=new lt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var u=new lt.MathNode("mo",[bo("\u2061","text")]);return t.parentIsSupSub?new lt.MathNode("mrow",[l,u]):lt.newDocumentFragment([l,u])};Ct({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:oi(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:H$,mathmlBuilder:Cbe});ce("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Qf({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?$e.makeFragment(ki(t.body,e,!1)):$e.makeSpan(["mord"],ki(t.body,e,!0),e)},mathmlBuilder(t,e){return hh(t.body,e,!0)}});Ct({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Fr(t.body,e.havingCrampedStyle()),n=$e.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=$e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return $e.makeSpan(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new lt.MathNode("mo",[new lt.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new lt.MathNode("mover",[yn(t.body,e),r]);return n.setAttribute("accent","true"),n}});Ct({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:oi(n)}},htmlBuilder:(t,e)=>{var r=ki(t.body,e.withPhantom(),!1);return $e.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=bs(t.body,e);return new lt.MathNode("mphantom",r)}});Ct({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=$e.makeSpan([],[Fr(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=bs(oi(t.body),e),n=new lt.MathNode("mphantom",r),i=new lt.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});Ct({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=$e.makeSpan(["inner"],[Fr(t.body,e.withPhantom())]),n=$e.makeSpan(["fix"],[]);return $e.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=bs(oi(t.body),e),n=new lt.MathNode("mphantom",r),i=new lt.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});Ct({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=dr(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=Fr(t.body,e),n=Kn(t.dy,e);return $e.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new lt.MathNode("mpadded",[yn(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});Ct({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});Ct({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=dr(e[0],"size"),s=dr(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&dr(i,"size").value,width:a.value,height:s.value}},htmlBuilder(t,e){var r=$e.makeSpan(["mord","rule"],[],e),n=Kn(t.width,e),i=Kn(t.height,e),a=t.shift?Kn(t.shift,e):0;return r.style.borderRightWidth=yt(n),r.style.borderTopWidth=yt(i),r.style.bottom=yt(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Kn(t.width,e),n=Kn(t.height,e),i=t.shift?Kn(t.shift,e):0,a=e.color&&e.getColor()||"black",s=new lt.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",yt(r)),s.setAttribute("height",yt(n));var o=new lt.MathNode("mpadded",[s]);return i>=0?o.setAttribute("height",yt(i)):(o.setAttribute("height",yt(i)),o.setAttribute("depth",yt(-i))),o.setAttribute("voffset",yt(i)),o}});XF=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Abe=(t,e)=>{var r=e.havingSize(t.size);return Y$(t.body,r,e)};Ct({type:"sizing",names:XF,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:XF.indexOf(n)+1,body:a}},htmlBuilder:Abe,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=bs(t.body,r),i=new lt.MathNode("mstyle",n);return i.setAttribute("mathsize",yt(r.sizeMultiplier)),i}});Ct({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,a=!1,s=r[0]&&dr(r[0],"ordgroup");if(s)for(var o="",l=0;l{var r=$e.makeSpan([],[Fr(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new lt.MathNode("mpadded",[yn(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});Ct({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,e){var r=Fr(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=$e.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,a=i;e.style.idr.height+r.depth+s&&(s=(s+f-r.height-r.depth)/2);var d=l.height-r.height-s-u;r.style.paddingLeft=yt(h);var p=$e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:l},{type:"kern",size:u}]},e);if(t.index){var g=e.havingStyle(Xt.SCRIPTSCRIPT),m=Fr(t.index,g,e),v=.6*(p.height-p.depth),y=$e.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:m}]},e),b=$e.makeSpan(["root"],[y]);return $e.makeSpan(["mord","sqrt"],[b,p],e)}else return $e.makeSpan(["mord","sqrt"],[p],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new lt.MathNode("mroot",[yn(r,e),yn(n,e)]):new lt.MathNode("msqrt",[yn(r,e)])}});jF={display:Xt.DISPLAY,text:Xt.TEXT,script:Xt.SCRIPT,scriptscript:Xt.SCRIPTSCRIPT};Ct({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(t,e){var r=jF[t.style],n=e.havingStyle(r).withFont("");return Y$(t.body,n,e)},mathmlBuilder(t,e){var r=jF[t.style],n=e.havingStyle(r),i=bs(t.body,n),a=new lt.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[t.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});_be=function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===Xt.DISPLAY.size||n.alwaysHandleSupSub);return i?np:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===Xt.DISPLAY.size||n.limits);return a?H$:null}else{if(n.type==="accent")return Wt.isCharacterBox(n.base)?KC:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?U$:null}else return null}else return null};Qf({type:"supsub",htmlBuilder(t,e){var r=_be(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:a}=t,s=Fr(n,e),o,l,u=e.fontMetrics(),h=0,f=0,d=n&&Wt.isCharacterBox(n);if(i){var p=e.havingStyle(e.style.sup());o=Fr(i,p,e),d||(h=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/e.sizeMultiplier)}if(a){var g=e.havingStyle(e.style.sub());l=Fr(a,g,e),d||(f=s.depth+g.fontMetrics().subDrop*g.sizeMultiplier/e.sizeMultiplier)}var m;e.style===Xt.DISPLAY?m=u.sup1:e.style.cramped?m=u.sup3:m=u.sup2;var v=e.sizeMultiplier,y=yt(.5/u.ptPerEm/v),b=null;if(l){var w=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(s instanceof xs||w)&&(b=yt(-s.italic))}var S;if(o&&l){h=Math.max(h,m,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var T=u.defaultRuleThickness,E=4*T;if(h-o.depth-(l.height-f)0&&(h+=A,f-=A)}var C=[{type:"elem",elem:l,shift:f,marginRight:y,marginLeft:b},{type:"elem",elem:o,shift:-h,marginRight:y}];S=$e.makeVList({positionType:"individualShift",children:C},e)}else if(l){f=Math.max(f,u.sub1,l.height-.8*u.xHeight);var I=[{type:"elem",elem:l,marginLeft:b,marginRight:y}];S=$e.makeVList({positionType:"shift",positionData:f,children:I},e)}else if(o)h=Math.max(h,m,o.depth+.25*u.xHeight),S=$e.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:y}]},e);else throw new Error("supsub must have either sup or sub.");var M=PC(s,"right")||"mord";return $e.makeSpan([M],[s,$e.makeSpan(["msupsub"],[S])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[yn(t.base,e)];t.sub&&a.push(yn(t.sub,e)),t.sup&&a.push(yn(t.sup,e));var s;if(r)s=n?"mover":"munder";else if(t.sub)if(t.sup){var u=t.base;u&&u.type==="op"&&u.limits&&e.style===Xt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(e.style===Xt.DISPLAY||u.limits)?s="munderover":s="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===Xt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===Xt.DISPLAY)?s="munder":s="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===Xt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===Xt.DISPLAY)?s="mover":s="msup"}return new lt.MathNode(s,a)}});Qf({type:"atom",htmlBuilder(t,e){return $e.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new lt.MathNode("mo",[bo(t.text,t.mode)]);if(t.family==="bin"){var n=XC(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});X$={mi:"italic",mn:"normal",mtext:"normal"};Qf({type:"mathord",htmlBuilder(t,e){return $e.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new lt.MathNode("mi",[bo(t.text,t.mode,e)]),n=XC(t,e)||"italic";return n!==X$[r.type]&&r.setAttribute("mathvariant",n),r}});Qf({type:"textord",htmlBuilder(t,e){return $e.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=bo(t.text,t.mode,e),n=XC(t,e)||"normal",i;return t.mode==="text"?i=new lt.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new lt.MathNode("mn",[r]):t.text==="\\prime"?i=new lt.MathNode("mo",[r]):i=new lt.MathNode("mi",[r]),n!==X$[i.type]&&i.setAttribute("mathvariant",n),i}});LC={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},RC={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Qf({type:"spacing",htmlBuilder(t,e){if(RC.hasOwnProperty(t.text)){var r=RC[t.text].className||"";if(t.mode==="text"){var n=$e.makeOrd(t,e,"textord");return n.classes.push(r),n}else return $e.makeSpan(["mspace",r],[$e.mathsym(t.text,t.mode,e)],e)}else{if(LC.hasOwnProperty(t.text))return $e.makeSpan(["mspace",LC[t.text]],[],e);throw new ct('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(RC.hasOwnProperty(t.text))r=new lt.MathNode("mtext",[new lt.TextNode("\xA0")]);else{if(LC.hasOwnProperty(t.text))return new lt.MathNode("mspace");throw new ct('Unknown type of space "'+t.text+'"')}return r}});KF=()=>{var t=new lt.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};Qf({type:"tag",mathmlBuilder(t,e){var r=new lt.MathNode("mtable",[new lt.MathNode("mtr",[KF(),new lt.MathNode("mtd",[hh(t.body,e)]),KF(),new lt.MathNode("mtd",[hh(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});ZF={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},QF={"\\textbf":"textbf","\\textmd":"textmd"},Lbe={"\\textit":"textit","\\textup":"textup"},JF=(t,e)=>{var r=t.font;if(r){if(ZF[r])return e.withTextFontFamily(ZF[r]);if(QF[r])return e.withTextFontWeight(QF[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(Lbe[r])};Ct({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:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:oi(i),font:n}},htmlBuilder(t,e){var r=JF(t,e),n=ki(t.body,r,!0);return $e.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=JF(t,e);return hh(t.body,r)}});Ct({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Fr(t.body,e),n=$e.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=$e.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return $e.makeSpan(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new lt.MathNode("mo",[new lt.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new lt.MathNode("munder",[yn(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});Ct({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Fr(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return $e.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new lt.MathNode("mpadded",[yn(t.body,e)],["vcenter"])}});Ct({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new ct("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=e$(t),n=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"\u2423":"\xA0"),ch=v$,j$=`[ \r ]`,Rbe="\\\\[a-zA-Z@]+",Ibe="\\\\[^\uD800-\uDFFF]",Nbe="("+Rbe+")"+j$+"*",Dbe=`\\\\( |[ \r ]+ ?)[ \r ]*`,GC="[\u0300-\u036F]",Mbe=new RegExp(GC+"+$"),Obe="("+j$+"+)|"+(Dbe+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(GC+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(GC+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Nbe)+("|"+Ibe+")"),I4=class{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(Obe,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new xo("EOF",new Ws(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new ct("Unexpected character: '"+e[r]+"'",new xo(e[r],new Ws(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=e.indexOf(` `,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new xo(i,new Ws(this,r,this.tokenRegex.lastIndex))}},VC=class{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ct("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}},Pbe=F$;ce("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});ce("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});ce("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});ce("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});ce("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});ce("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ce("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});t$={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ce("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new ct("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=t$[e.text],n==null||n>=r)throw new ct("Invalid base-"+r+" digit "+e.text);for(var i;(i=t$[t.future().text])!=null&&i{var i=t.consumeArg().tokens;if(i.length!==1)throw new ct("\\newcommand's first argument must be a macro name");var a=i[0].text,s=t.isDefined(a);if(s&&!e)throw new ct("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!s&&!r)throw new ct("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var o=0;if(i=t.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",u=t.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new ct("Invalid number of arguments: "+l);o=parseInt(l),i=t.consumeArg().tokens}return s&&n||t.macros.set(a,{tokens:i,numArgs:o}),""};ce("\\newcommand",t=>i7(t,!1,!0,!1));ce("\\renewcommand",t=>i7(t,!0,!1,!1));ce("\\providecommand",t=>i7(t,!0,!0,!0));ce("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});ce("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});ce("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),ch[r],Sn.math[r],Sn.text[r]),""});ce("\\bgroup","{");ce("\\egroup","}");ce("~","\\nobreakspace");ce("\\lq","`");ce("\\rq","'");ce("\\aa","\\r a");ce("\\AA","\\r A");ce("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");ce("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ce("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");ce("\u212C","\\mathscr{B}");ce("\u2130","\\mathscr{E}");ce("\u2131","\\mathscr{F}");ce("\u210B","\\mathscr{H}");ce("\u2110","\\mathscr{I}");ce("\u2112","\\mathscr{L}");ce("\u2133","\\mathscr{M}");ce("\u211B","\\mathscr{R}");ce("\u212D","\\mathfrak{C}");ce("\u210C","\\mathfrak{H}");ce("\u2128","\\mathfrak{Z}");ce("\\Bbbk","\\Bbb{k}");ce("\xB7","\\cdotp");ce("\\llap","\\mathllap{\\textrm{#1}}");ce("\\rlap","\\mathrlap{\\textrm{#1}}");ce("\\clap","\\mathclap{\\textrm{#1}}");ce("\\mathstrut","\\vphantom{(}");ce("\\underbar","\\underline{\\text{#1}}");ce("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');ce("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");ce("\\ne","\\neq");ce("\u2260","\\neq");ce("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");ce("\u2209","\\notin");ce("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");ce("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");ce("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");ce("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");ce("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");ce("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");ce("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");ce("\u27C2","\\perp");ce("\u203C","\\mathclose{!\\mkern-0.8mu!}");ce("\u220C","\\notni");ce("\u231C","\\ulcorner");ce("\u231D","\\urcorner");ce("\u231E","\\llcorner");ce("\u231F","\\lrcorner");ce("\xA9","\\copyright");ce("\xAE","\\textregistered");ce("\uFE0F","\\textregistered");ce("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ce("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ce("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ce("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ce("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ce("\u22EE","\\vdots");ce("\\varGamma","\\mathit{\\Gamma}");ce("\\varDelta","\\mathit{\\Delta}");ce("\\varTheta","\\mathit{\\Theta}");ce("\\varLambda","\\mathit{\\Lambda}");ce("\\varXi","\\mathit{\\Xi}");ce("\\varPi","\\mathit{\\Pi}");ce("\\varSigma","\\mathit{\\Sigma}");ce("\\varUpsilon","\\mathit{\\Upsilon}");ce("\\varPhi","\\mathit{\\Phi}");ce("\\varPsi","\\mathit{\\Psi}");ce("\\varOmega","\\mathit{\\Omega}");ce("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ce("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ce("\\boxed","\\fbox{$\\displaystyle{#1}$}");ce("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ce("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ce("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ce("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ce("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");r$={",":"\\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"};ce("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in r$?e=r$[r]:(r.slice(0,4)==="\\not"||r in Sn.math&&Wt.contains(["bin","rel"],Sn.math[r].group))&&(e="\\dotsb"),e});a7={")":!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};ce("\\dotso",function(t){var e=t.future().text;return e in a7?"\\ldots\\,":"\\ldots"});ce("\\dotsc",function(t){var e=t.future().text;return e in a7&&e!==","?"\\ldots\\,":"\\ldots"});ce("\\cdots",function(t){var e=t.future().text;return e in a7?"\\@cdots\\,":"\\@cdots"});ce("\\dotsb","\\cdots");ce("\\dotsm","\\cdots");ce("\\dotsi","\\!\\cdots");ce("\\dotsx","\\ldots\\,");ce("\\DOTSI","\\relax");ce("\\DOTSB","\\relax");ce("\\DOTSX","\\relax");ce("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ce("\\,","\\tmspace+{3mu}{.1667em}");ce("\\thinspace","\\,");ce("\\>","\\mskip{4mu}");ce("\\:","\\tmspace+{4mu}{.2222em}");ce("\\medspace","\\:");ce("\\;","\\tmspace+{5mu}{.2777em}");ce("\\thickspace","\\;");ce("\\!","\\tmspace-{3mu}{.1667em}");ce("\\negthinspace","\\!");ce("\\negmedspace","\\tmspace-{4mu}{.2222em}");ce("\\negthickspace","\\tmspace-{5mu}{.277em}");ce("\\enspace","\\kern.5em ");ce("\\enskip","\\hskip.5em\\relax");ce("\\quad","\\hskip1em\\relax");ce("\\qquad","\\hskip2em\\relax");ce("\\tag","\\@ifstar\\tag@literal\\tag@paren");ce("\\tag@paren","\\tag@literal{({#1})}");ce("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new ct("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ce("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ce("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ce("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ce("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ce("\\newline","\\\\\\relax");ce("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");K$=yt(Vl["Main-Regular"][84][1]-.7*Vl["Main-Regular"][65][1]);ce("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+K$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ce("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+K$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ce("\\hspace","\\@ifstar\\@hspacer\\@hspace");ce("\\@hspace","\\hskip #1\\relax");ce("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ce("\\ordinarycolon",":");ce("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ce("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ce("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ce("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ce("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ce("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ce("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ce("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ce("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ce("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ce("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ce("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ce("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ce("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ce("\u2237","\\dblcolon");ce("\u2239","\\eqcolon");ce("\u2254","\\coloneqq");ce("\u2255","\\eqqcolon");ce("\u2A74","\\Coloneqq");ce("\\ratio","\\vcentcolon");ce("\\coloncolon","\\dblcolon");ce("\\colonequals","\\coloneqq");ce("\\coloncolonequals","\\Coloneqq");ce("\\equalscolon","\\eqqcolon");ce("\\equalscoloncolon","\\Eqqcolon");ce("\\colonminus","\\coloneq");ce("\\coloncolonminus","\\Coloneq");ce("\\minuscolon","\\eqcolon");ce("\\minuscoloncolon","\\Eqcolon");ce("\\coloncolonapprox","\\Colonapprox");ce("\\coloncolonsim","\\Colonsim");ce("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ce("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ce("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ce("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ce("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");ce("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ce("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ce("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ce("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ce("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ce("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ce("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ce("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ce("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");ce("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");ce("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");ce("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");ce("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");ce("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");ce("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");ce("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");ce("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");ce("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");ce("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");ce("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");ce("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");ce("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");ce("\\imath","\\html@mathml{\\@imath}{\u0131}");ce("\\jmath","\\html@mathml{\\@jmath}{\u0237}");ce("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");ce("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");ce("\u27E6","\\llbracket");ce("\u27E7","\\rrbracket");ce("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");ce("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");ce("\u2983","\\lBrace");ce("\u2984","\\rBrace");ce("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");ce("\u29B5","\\minuso");ce("\\darr","\\downarrow");ce("\\dArr","\\Downarrow");ce("\\Darr","\\Downarrow");ce("\\lang","\\langle");ce("\\rang","\\rangle");ce("\\uarr","\\uparrow");ce("\\uArr","\\Uparrow");ce("\\Uarr","\\Uparrow");ce("\\N","\\mathbb{N}");ce("\\R","\\mathbb{R}");ce("\\Z","\\mathbb{Z}");ce("\\alef","\\aleph");ce("\\alefsym","\\aleph");ce("\\Alpha","\\mathrm{A}");ce("\\Beta","\\mathrm{B}");ce("\\bull","\\bullet");ce("\\Chi","\\mathrm{X}");ce("\\clubs","\\clubsuit");ce("\\cnums","\\mathbb{C}");ce("\\Complex","\\mathbb{C}");ce("\\Dagger","\\ddagger");ce("\\diamonds","\\diamondsuit");ce("\\empty","\\emptyset");ce("\\Epsilon","\\mathrm{E}");ce("\\Eta","\\mathrm{H}");ce("\\exist","\\exists");ce("\\harr","\\leftrightarrow");ce("\\hArr","\\Leftrightarrow");ce("\\Harr","\\Leftrightarrow");ce("\\hearts","\\heartsuit");ce("\\image","\\Im");ce("\\infin","\\infty");ce("\\Iota","\\mathrm{I}");ce("\\isin","\\in");ce("\\Kappa","\\mathrm{K}");ce("\\larr","\\leftarrow");ce("\\lArr","\\Leftarrow");ce("\\Larr","\\Leftarrow");ce("\\lrarr","\\leftrightarrow");ce("\\lrArr","\\Leftrightarrow");ce("\\Lrarr","\\Leftrightarrow");ce("\\Mu","\\mathrm{M}");ce("\\natnums","\\mathbb{N}");ce("\\Nu","\\mathrm{N}");ce("\\Omicron","\\mathrm{O}");ce("\\plusmn","\\pm");ce("\\rarr","\\rightarrow");ce("\\rArr","\\Rightarrow");ce("\\Rarr","\\Rightarrow");ce("\\real","\\Re");ce("\\reals","\\mathbb{R}");ce("\\Reals","\\mathbb{R}");ce("\\Rho","\\mathrm{P}");ce("\\sdot","\\cdot");ce("\\sect","\\S");ce("\\spades","\\spadesuit");ce("\\sub","\\subset");ce("\\sube","\\subseteq");ce("\\supe","\\supseteq");ce("\\Tau","\\mathrm{T}");ce("\\thetasym","\\vartheta");ce("\\weierp","\\wp");ce("\\Zeta","\\mathrm{Z}");ce("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ce("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ce("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ce("\\bra","\\mathinner{\\langle{#1}|}");ce("\\ket","\\mathinner{|{#1}\\rangle}");ce("\\braket","\\mathinner{\\langle{#1}\\rangle}");ce("\\Bra","\\left\\langle#1\\right|");ce("\\Ket","\\left|#1\\right\\rangle");Z$=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=f=>d=>{t&&(d.macros.set("|",s),i.length&&d.macros.set("\\|",o));var p=f;if(!f&&i.length){var g=d.future();g.text==="|"&&(d.popToken(),p=!0)}return{tokens:p?i:n,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\|",l(!0));var u=e.consumeArg().tokens,h=e.expandTokens([...a,...u,...r]);return e.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ce("\\bra@ket",Z$(!1));ce("\\bra@set",Z$(!0));ce("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ce("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ce("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ce("\\angln","{\\angl n}");ce("\\blue","\\textcolor{##6495ed}{#1}");ce("\\orange","\\textcolor{##ffa500}{#1}");ce("\\pink","\\textcolor{##ff00af}{#1}");ce("\\red","\\textcolor{##df0030}{#1}");ce("\\green","\\textcolor{##28ae7b}{#1}");ce("\\gray","\\textcolor{gray}{#1}");ce("\\purple","\\textcolor{##9d38bd}{#1}");ce("\\blueA","\\textcolor{##ccfaff}{#1}");ce("\\blueB","\\textcolor{##80f6ff}{#1}");ce("\\blueC","\\textcolor{##63d9ea}{#1}");ce("\\blueD","\\textcolor{##11accd}{#1}");ce("\\blueE","\\textcolor{##0c7f99}{#1}");ce("\\tealA","\\textcolor{##94fff5}{#1}");ce("\\tealB","\\textcolor{##26edd5}{#1}");ce("\\tealC","\\textcolor{##01d1c1}{#1}");ce("\\tealD","\\textcolor{##01a995}{#1}");ce("\\tealE","\\textcolor{##208170}{#1}");ce("\\greenA","\\textcolor{##b6ffb0}{#1}");ce("\\greenB","\\textcolor{##8af281}{#1}");ce("\\greenC","\\textcolor{##74cf70}{#1}");ce("\\greenD","\\textcolor{##1fab54}{#1}");ce("\\greenE","\\textcolor{##0d923f}{#1}");ce("\\goldA","\\textcolor{##ffd0a9}{#1}");ce("\\goldB","\\textcolor{##ffbb71}{#1}");ce("\\goldC","\\textcolor{##ff9c39}{#1}");ce("\\goldD","\\textcolor{##e07d10}{#1}");ce("\\goldE","\\textcolor{##a75a05}{#1}");ce("\\redA","\\textcolor{##fca9a9}{#1}");ce("\\redB","\\textcolor{##ff8482}{#1}");ce("\\redC","\\textcolor{##f9685d}{#1}");ce("\\redD","\\textcolor{##e84d39}{#1}");ce("\\redE","\\textcolor{##bc2612}{#1}");ce("\\maroonA","\\textcolor{##ffbde0}{#1}");ce("\\maroonB","\\textcolor{##ff92c6}{#1}");ce("\\maroonC","\\textcolor{##ed5fa6}{#1}");ce("\\maroonD","\\textcolor{##ca337c}{#1}");ce("\\maroonE","\\textcolor{##9e034e}{#1}");ce("\\purpleA","\\textcolor{##ddd7ff}{#1}");ce("\\purpleB","\\textcolor{##c6b9fc}{#1}");ce("\\purpleC","\\textcolor{##aa87ff}{#1}");ce("\\purpleD","\\textcolor{##7854ab}{#1}");ce("\\purpleE","\\textcolor{##543b78}{#1}");ce("\\mintA","\\textcolor{##f5f9e8}{#1}");ce("\\mintB","\\textcolor{##edf2df}{#1}");ce("\\mintC","\\textcolor{##e0e5cc}{#1}");ce("\\grayA","\\textcolor{##f6f7f7}{#1}");ce("\\grayB","\\textcolor{##f0f1f2}{#1}");ce("\\grayC","\\textcolor{##e3e5e6}{#1}");ce("\\grayD","\\textcolor{##d6d8da}{#1}");ce("\\grayE","\\textcolor{##babec2}{#1}");ce("\\grayF","\\textcolor{##888d93}{#1}");ce("\\grayG","\\textcolor{##626569}{#1}");ce("\\grayH","\\textcolor{##3b3e40}{#1}");ce("\\grayI","\\textcolor{##21242c}{#1}");ce("\\kaBlue","\\textcolor{##314453}{#1}");ce("\\kaGreen","\\textcolor{##71B307}{#1}");Q$={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},UC=class{constructor(e,r,n){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=r,this.expansionCount=0,this.feed(e),this.macros=new VC(Pbe,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new I4(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new xo("EOF",n.loc)),this.pushTokens(i),r.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),a,s=0,o=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new ct("Extra }",a)}else if(a.text==="EOF")throw new ct("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",a);if(e&&n)if((s===0||s===1&&e[o]==="{")&&a.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(s!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new ct("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new ct("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new ct("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new ct("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...s[+l.text-1]);else throw new ct("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new xo(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var s=i.replace(/##/g,"");s.indexOf("#"+(a+1))!==-1;)++a;for(var o=new I4(i,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var h={tokens:l,numArgs:a};return h}return i}isDefined(e){return this.macros.has(e)||ch.hasOwnProperty(e)||Sn.math.hasOwnProperty(e)||Sn.text.hasOwnProperty(e)||Q$.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:ch.hasOwnProperty(e)&&!ch[e].primitive}},n$=/^[โ‚Šโ‚‹โ‚Œโ‚โ‚Žโ‚€โ‚โ‚‚โ‚ƒโ‚„โ‚…โ‚†โ‚‡โ‚ˆโ‚‰โ‚โ‚‘โ‚•แตขโฑผโ‚–โ‚—โ‚˜โ‚™โ‚’โ‚šแตฃโ‚›โ‚œแตคแตฅโ‚“แตฆแตงแตจแตฉแตช]/,k4=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),IC={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},i$={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},N4=class t{constructor(e,r){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 UC(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new ct("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new xo("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(t.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&ch[i.text]&&ch[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=Sn[this.mode][r].group,l=Ws.range(e),u;if(Axe.hasOwnProperty(o)){var h=o;u={type:"atom",mode:this.mode,family:h,loc:l,text:r}}else u={type:o,mode:this.mode,loc:l,text:r};s=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(s$(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Ws.range(e),text:r};else return null;if(this.consume(),a)for(var f=0;f{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),oh.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}var u7,ip,Fbe,h7,dh,vv,q4,hz,fz,l7,Nn,W4,H4,Ha,$be,zbe,Gbe,Vbe,Ube,ed,qbe,Wbe,Hbe,Ybe,Xl,Yl,dz,pz,Xbe,sr,mv,jbe,td,ws,V4,Jf,gv,Y4,gz,mz,vz,f7,d7,or,yz,xz,yv,Kbe,oz,Zbe,bz,wz,rd,Qbe,Jbe,kz,lz,ar,e4e,t4e,r4e,n4e,Ez,lu,$r,i4e,a4e,jl,c7,s4e,o4e,cz,z4,Dn,ap,l4e,ph,Je,c4e,u4e,un,cu,G4,h4e,f4e,Sz,X4,p7,g7,m7,v7,mr,Er,Cr,Ar,_r,Dr,Lr,uz,d4e,we,xv,j4,K4,y7,p4e,U4,bv,Z4,g4e,vr=F(()=>{rr();qs();qs();qs();qs();qs();qs();yC();u7=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ip=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Fbe=/\s*%%.*\n/gm,h7=class extends Error{static{x(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},dh={},vv=x(function(t,e){t=t.replace(u7,"").replace(ip,"").replace(Fbe,` `);for(let[r,{detector:n}]of Object.entries(dh))if(n(t,e))return r;throw new h7(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),q4=x((...t)=>{for(let{id:e,detector:r,loader:n}of t)hz(e,r,n)},"registerLazyLoadedDiagrams"),hz=x((t,e,r)=>{dh[t]&&J.warn(`Detector with key ${t} already exists. Overwriting.`),dh[t]={detector:e,loader:r},J.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),fz=x(t=>dh[t].loader,"getDiagramLoader"),l7=x((t,e,{depth:r=2,clobber:n=!1}={})=>{let i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>l7(t,a,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=l7(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),Nn=l7,W4="#ffffff",H4="#f2f2f2",Ha=x((t,e)=>e?Pe(t,{s:-40,l:10}):Pe(t,{s:-40,l:-10}),"mkBorder"),$be=class{static{x(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||Pe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Pe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ha(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ha(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ha(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ha(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||vt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||vt(this.tertiaryColor),this.lineColor=this.lineColor||vt(this.background),this.arrowheadColor=this.arrowheadColor||vt(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?Rt(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||Rt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||vt(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||Et(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||Rt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Rt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Et(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Et(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||Pe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Pe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Pe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Pe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Pe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Pe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Pe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Pe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Pe(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},zbe=x(t=>{let e=new $be;return e.calculate(t),e},"getThemeVariables"),Gbe=class{static{x(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Et(this.primaryColor,16),this.tertiaryColor=Pe(this.primaryColor,{h:-160}),this.primaryBorderColor=vt(this.background),this.secondaryBorderColor=Ha(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ha(this.tertiaryColor,this.darkMode),this.primaryTextColor=vt(this.primaryColor),this.secondaryTextColor=vt(this.secondaryColor),this.tertiaryTextColor=vt(this.tertiaryColor),this.lineColor=vt(this.background),this.textColor=vt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Et(vt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=$a(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=Rt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Rt(this.sectionBkgColor,10),this.taskBorderColor=$a(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=$a(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||Et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Rt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=Et(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=Et(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=Et(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=Pe(this.primaryColor,{h:64}),this.fillType3=Pe(this.secondaryColor,{h:64}),this.fillType4=Pe(this.primaryColor,{h:-64}),this.fillType5=Pe(this.secondaryColor,{h:-64}),this.fillType6=Pe(this.primaryColor,{h:128}),this.fillType7=Pe(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||Pe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Pe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Pe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Pe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Pe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Pe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Pe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Pe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Pe(this.primaryColor,{h:330});for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},Vbe=x(t=>{let e=new Gbe;return e.calculate(t),e},"getThemeVariables"),Ube=class{static{x(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Pe(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Pe(this.primaryColor,{h:-160}),this.primaryBorderColor=Ha(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ha(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ha(this.tertiaryColor,this.darkMode),this.primaryTextColor=vt(this.primaryColor),this.secondaryTextColor=vt(this.secondaryColor),this.tertiaryTextColor=vt(this.tertiaryColor),this.lineColor=vt(this.background),this.textColor=vt(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=$a(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||Pe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Pe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Pe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Pe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Pe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Pe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Pe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Pe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Pe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Rt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Rt(this.tertiaryColor,40);for(let t=0;t{this[r]==="calculated"&&(this[r]=void 0)}),typeof t!="object"){this.updateColors();return}let e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},ed=x(t=>{let e=new Ube;return e.calculate(t),e},"getThemeVariables"),qbe=class{static{x(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=Et("#cde498",10),this.primaryBorderColor=Ha(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ha(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ha(this.tertiaryColor,this.darkMode),this.primaryTextColor=vt(this.primaryColor),this.secondaryTextColor=vt(this.secondaryColor),this.tertiaryTextColor=vt(this.primaryColor),this.lineColor=vt(this.background),this.textColor=vt(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=Rt(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||Pe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Pe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Pe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Pe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Pe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Pe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Pe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Pe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Pe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Rt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Rt(this.tertiaryColor,40);for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},Wbe=x(t=>{let e=new qbe;return e.calculate(t),e},"getThemeVariables"),Hbe=class{static{x(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Et(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Pe(this.primaryColor,{h:-160}),this.primaryBorderColor=Ha(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ha(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ha(this.tertiaryColor,this.darkMode),this.primaryTextColor=vt(this.primaryColor),this.secondaryTextColor=vt(this.secondaryColor),this.tertiaryTextColor=vt(this.tertiaryColor),this.lineColor=vt(this.background),this.textColor=vt(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||Et(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=Et(this.contrast,55),this.border2=this.contrast,this.actorBorder=Et(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[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},Ybe=x(t=>{let e=new Hbe;return e.calculate(t),e},"getThemeVariables"),Xl={base:{getThemeVariables:zbe},dark:{getThemeVariables:Vbe},default:{getThemeVariables:ed},forest:{getThemeVariables:Wbe},neutral:{getThemeVariables:Ybe}},Yl={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,layoutAlgorithm:"cose-bilkent"},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},dz={...Yl,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Xl.default.getThemeVariables(),sequence:{...Yl.sequence,messageFont:x(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:x(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:x(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Yl.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Yl.c4,useWidth:void 0,personFont:x(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Yl.flowchart,inheritDir:!1},external_personFont:x(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:x(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:x(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:x(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:x(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:x(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:x(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:x(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:x(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:x(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:x(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:x(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:x(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:x(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:x(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:x(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:x(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:x(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:x(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:x(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:x(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Yl.pie,useWidth:984},xyChart:{...Yl.xyChart,useWidth:void 0},requirement:{...Yl.requirement,useWidth:void 0},packet:{...Yl.packet},radar:{...Yl.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},pz=x((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...pz(t[n],"")]:[...r,e+n],[]),"keyify"),Xbe=new Set(pz(dz,"")),sr=dz,mv=x(t=>{if(J.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>mv(e));return}for(let e of Object.keys(t)){if(J.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Xbe.has(e)||t[e]==null){J.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){J.debug("sanitizing object",e),mv(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)e.includes(n)&&(J.debug("sanitizing css option",e),t[e]=jbe(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}J.debug("After sanitization",t)}},"sanitizeDirective"),jbe=x(t=>{let e=0,r=0;for(let n of t){if(e{let r=Nn({},t),n={};for(let i of e)yz(i),n=Nn(n,i);if(r=Nn(r,n),n.theme&&n.theme in Xl){let i=Nn({},V4),a=Nn(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in Xl&&(r.themeVariables=Xl[r.theme].getThemeVariables(a))}return gv=r,bz(gv),gv},"updateCurrentConfig"),gz=x(t=>(ws=Nn({},td),ws=Nn(ws,t),t.theme&&Xl[t.theme]&&(ws.themeVariables=Xl[t.theme].getThemeVariables(t.themeVariables)),Y4(ws,Jf),ws),"setSiteConfig"),mz=x(t=>{V4=Nn({},t)},"saveConfigFromInitialize"),vz=x(t=>(ws=Nn(ws,t),Y4(ws,Jf),ws),"updateSiteConfig"),f7=x(()=>Nn({},ws),"getSiteConfig"),d7=x(t=>(bz(t),Nn(gv,t),or()),"setConfig"),or=x(()=>Nn({},gv),"getConfig"),yz=x(t=>{t&&(["secure",...ws.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(J.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&yz(t[e])}))},"sanitize"),xz=x(t=>{mv(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Jf.push(t),Y4(ws,Jf)},"addDirective"),yv=x((t=ws)=>{Jf=[],Y4(t,Jf)},"reset"),Kbe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},oz={},Zbe=x(t=>{oz[t]||(J.warn(Kbe[t]),oz[t]=!0)},"issueWarning"),bz=x(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Zbe("LAZY_LOAD_DEPRECATED")},"checkConfig"),wz=x(()=>{let t={};V4&&(t=Nn(t,V4));for(let e of Jf)t=Nn(t,e);return t},"getUserDefinedConfig"),rd=//gi,Qbe=x(t=>t?Ez(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Jbe=(()=>{let t=!1;return()=>{t||(Tz(),t=!0)}})();x(Tz,"setupDompurifyHooks");kz=x(t=>(Jbe(),oh.sanitize(t)),"removeScript"),lz=x((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=kz(t):r!=="loose"&&(t=Ez(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=n4e(t))}return t},"sanitizeMore"),ar=x((t,e)=>t&&(e.dompurifyConfig?t=oh.sanitize(lz(t,e),e.dompurifyConfig).toString():t=oh.sanitize(lz(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),e4e=x((t,e)=>typeof t=="string"?ar(t,e):t.flat().map(r=>ar(r,e)),"sanitizeTextOrArray"),t4e=x(t=>rd.test(t),"hasBreaks"),r4e=x(t=>t.split(rd),"splitBreaks"),n4e=x(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Ez=x(t=>t.replace(rd,"#br#"),"breakToPlaceholder"),lu=x(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),$r=x(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),i4e=x(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),a4e=x(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),jl=x(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,t.split(e).length-1),"countOccurrence"),s4e=x((t,e)=>{let r=c7(t,"~"),n=c7(e,"~");return r===1&&n===1},"shouldCombineSets"),o4e=x(t=>{let e=c7(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(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),cz=x(()=>window.MathMLElement!==void 0,"isMathMLSupported"),z4=/\$\$(.*)\$\$/g,Dn=x(t=>(t.match(z4)?.length??0)>0,"hasKatex"),ap=x(async(t,e)=>{let r=document.createElement("div");r.innerHTML=await ph(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),l4e=x(async(t,e)=>{if(!Dn(t))return t;if(!(cz()||e.legacyMathML||e.forceLegacyMathML))return t.replace(z4,"MathML is unsupported in this environment.");{let{default:r}=await Promise.resolve().then(()=>(sz(),az)),n=e.forceLegacyMathML||!cz()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(rd).map(i=>Dn(i)?`
${i}
`:`
${i}
`).join("").replace(z4,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))}return t.replace(z4,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),ph=x(async(t,e)=>ar(await l4e(t,e),e),"renderKatexSanitized"),Je={getRows:Qbe,sanitizeText:ar,sanitizeTextOrArray:e4e,hasBreaks:t4e,splitBreaks:r4e,lineBreakRegex:rd,removeScript:kz,getUrl:lu,evaluate:$r,getMax:i4e,getMin:a4e},c4e=x(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),u4e=x(function(t,e,r){let 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"),un=x(function(t,e,r,n){let i=u4e(e,r,n);c4e(t,i)},"configureSvgSize"),cu=x(function(t,e,r,n){let i=e.node().getBBox(),a=i.width,s=i.height;J.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;J.info(`Graph bounds: ${o}x${l}`,t),o=a+r*2,l=s+r*2,J.info(`Calculated bounds: ${o}x${l}`),un(e,l,o,n);let u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",u)},"setupGraphViewbox"),G4={},h4e=x((t,e,r)=>{let n="";return t in G4&&G4[t]?n=G4[t](r):J.warn(`No theme found for ${t}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } @keyframes edge-animation-frame { from { stroke-dashoffset: 0; } } @keyframes dash { to { stroke-dashoffset: 0; } } & .edge-animation-slow { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 50s linear infinite; stroke-linecap: round; } & .edge-animation-fast { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 20s linear infinite; stroke-linecap: round; } /* Classes common for multiple diagrams */ & .error-icon { fill: ${r.errorBkgColor}; } & .error-text { fill: ${r.errorTextColor}; stroke: ${r.errorTextColor}; } & .edge-thickness-normal { stroke-width: 1px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${r.lineColor}; stroke: ${r.lineColor}; } & .marker.cross { stroke: ${r.lineColor}; } & svg { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; } & p { margin: 0 } ${n} ${e} `},"getStyles"),f4e=x((t,e)=>{e!==void 0&&(G4[t]=e)},"addStylesForDiagram"),Sz=h4e,X4={};ah(X4,{clear:()=>mr,getAccDescription:()=>_r,getAccTitle:()=>Cr,getDiagramTitle:()=>Lr,setAccDescription:()=>Ar,setAccTitle:()=>Er,setDiagramTitle:()=>Dr});p7="",g7="",m7="",v7=x(t=>ar(t,or()),"sanitizeText"),mr=x(()=>{p7="",m7="",g7=""},"clear"),Er=x(t=>{p7=v7(t).replace(/^\s+/g,"")},"setAccTitle"),Cr=x(()=>p7,"getAccTitle"),Ar=x(t=>{m7=v7(t).replace(/\n\s+/g,` `)},"setAccDescription"),_r=x(()=>m7,"getAccDescription"),Dr=x(t=>{g7=v7(t)},"setDiagramTitle"),Lr=x(()=>g7,"getDiagramTitle"),uz=J,d4e=X1,we=or,xv=d7,j4=td,K4=x(t=>ar(t,we()),"sanitizeText"),y7=cu,p4e=x(()=>X4,"getCommonDb"),U4={},bv=x((t,e,r)=>{U4[t]&&uz.warn(`Diagram with id ${t} already registered. Overwriting.`),U4[t]=e,r&&hz(t,r),f4e(t,e.styles),e.injectUtils?.(uz,d4e,we,K4,y7,p4e(),()=>{})},"registerDiagram"),Z4=x(t=>{if(t in U4)return U4[t];throw new g4e(t)},"getDiagram"),g4e=class extends Error{static{x(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}});function nd(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}var x7=F(()=>{});function b7(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}var Cz=F(()=>{});function id(t){let e,r,n;t.length!==2?(e=nd,r=(o,l)=>nd(t(o),l),n=(o,l)=>t(o)-l):(e=t===nd||t===b7?t:m4e,r=t,n=t);function i(o,l,u=0,h=o.length){if(u>>1;r(o[f],l)<0?u=f+1:h=f}while(u>>1;r(o[f],l)<=0?u=f+1:h=f}while(uu&&n(o[f-1],l)>-n(o[f],l)?f-1:f}return{left:i,center:s,right:a}}function m4e(){return 0}var w7=F(()=>{x7();Cz()});function T7(t){return t===null?NaN:+t}var Az=F(()=>{});var _z,Lz,v4e,y4e,k7,Rz=F(()=>{x7();w7();Az();_z=id(nd),Lz=_z.right,v4e=_z.left,y4e=id(T7).center,k7=Lz});function Iz({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function x4e({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function b4e({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function w4e(t){return t!==null&&typeof t=="object"?t.valueOf():t}var sp,Nz=F(()=>{sp=class extends Map{constructor(e,r=w4e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[n,i]of e)this.set(n,i)}get(e){return super.get(Iz(this,e))}has(e){return super.has(Iz(this,e))}set(e,r){return super.set(x4e(this,e),r)}delete(e){return super.delete(b4e(this,e))}}});function Q4(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=T4e?10:a>=k4e?5:a>=E4e?2:1,o,l,u;return i<0?(u=Math.pow(10,-i)/s,o=Math.round(t*u),l=Math.round(e*u),o/ue&&--l,u=-u):(u=Math.pow(10,i)*s,o=Math.round(t/u),l=Math.round(e/u),o*ue&&--l),l0))return[];if(t===e)return[t];let n=e=i))return[];let o=a-i+1,l=new Array(o);if(n)if(s<0)for(let u=0;u{T4e=Math.sqrt(50),k4e=Math.sqrt(10),E4e=Math.sqrt(2)});function e3(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}var Mz=F(()=>{});function t3(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var Oz=F(()=>{});function r3(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=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n{});var gh=F(()=>{Rz();w7();Mz();Oz();Pz();Dz();Nz()});function Bz(t){return t}var Fz=F(()=>{});function S4e(t){return"translate("+t+",0)"}function C4e(t){return"translate(0,"+t+")"}function A4e(t){return e=>+t(e)}function _4e(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function L4e(){return!this.__axis}function zz(t,e){var r=[],n=null,i=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===i3||t===n3?-1:1,h=t===n3||t===E7?"x":"y",f=t===i3||t===S7?S4e:C4e;function d(p){var g=n??(e.ticks?e.ticks.apply(e,r):e.domain()),m=i??(e.tickFormat?e.tickFormat.apply(e,r):Bz),v=Math.max(a,0)+o,y=e.range(),b=+y[0]+l,w=+y[y.length-1]+l,S=(e.bandwidth?_4e:A4e)(e.copy(),l),T=p.selection?p.selection():p,E=T.selectAll(".domain").data([null]),A=T.selectAll(".tick").data(g,e).order(),C=A.exit(),I=A.enter().append("g").attr("class","tick"),M=A.select("line"),R=A.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(I),M=M.merge(I.append("line").attr("stroke","currentColor").attr(h+"2",u*a)),R=R.merge(I.append("text").attr("fill","currentColor").attr(h,u*v).attr("dy",t===i3?"0em":t===S7?"0.71em":"0.32em")),p!==T&&(E=E.transition(p),A=A.transition(p),M=M.transition(p),R=R.transition(p),C=C.transition(p).attr("opacity",$z).attr("transform",function(k){return isFinite(k=S(k))?f(k+l):this.getAttribute("transform")}),I.attr("opacity",$z).attr("transform",function(k){var L=this.parentNode.__axis;return f((L&&isFinite(L=L(k))?L:S(k))+l)})),C.remove(),E.attr("d",t===n3||t===E7?s?"M"+u*s+","+b+"H"+l+"V"+w+"H"+u*s:"M"+l+","+b+"V"+w:s?"M"+b+","+u*s+"V"+l+"H"+w+"V"+u*s:"M"+b+","+l+"H"+w),A.attr("opacity",1).attr("transform",function(k){return f(S(k)+l)}),M.attr(h+"2",u*a),R.attr(h,u*v).text(m),T.filter(L4e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===E7?"start":t===n3?"end":"middle"),T.each(function(){this.__axis=S})}return d.scale=function(p){return arguments.length?(e=p,d):e},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),d):r.slice()},d.tickValues=function(p){return arguments.length?(n=p==null?null:Array.from(p),d):n&&n.slice()},d.tickFormat=function(p){return arguments.length?(i=p,d):i},d.tickSize=function(p){return arguments.length?(a=s=+p,d):a},d.tickSizeInner=function(p){return arguments.length?(a=+p,d):a},d.tickSizeOuter=function(p){return arguments.length?(s=+p,d):s},d.tickPadding=function(p){return arguments.length?(o=+p,d):o},d.offset=function(p){return arguments.length?(l=+p,d):l},d}function C7(t){return zz(i3,t)}function A7(t){return zz(S7,t)}var i3,E7,S7,n3,$z,Gz=F(()=>{Fz();i3=1,E7=2,S7=3,n3=4,$z=1e-6});var Vz=F(()=>{Gz()});function qz(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function N4e(t,e){for(var r=0,n=t.length,i;r{R4e={value:()=>{}};a3.prototype=qz.prototype={constructor:a3,on:function(t,e){var r=this._,n=I4e(t+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n{Wz()});var s3,R7,I7=F(()=>{s3="http://www.w3.org/1999/xhtml",R7={svg:"http://www.w3.org/2000/svg",xhtml:s3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function uu(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),R7.hasOwnProperty(e)?{space:R7[e],local:t}:t}var o3=F(()=>{I7()});function D4e(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===s3&&e.documentElement.namespaceURI===s3?e.createElement(t):e.createElementNS(r,t)}}function M4e(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function l3(t){var e=uu(t);return(e.local?M4e:D4e)(e)}var N7=F(()=>{o3();I7()});function O4e(){}function ad(t){return t==null?O4e:function(){return this.querySelector(t)}}var c3=F(()=>{});function Hz(t){typeof t!="function"&&(t=ad(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{sl();c3()});function D7(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}var Xz=F(()=>{});function P4e(){return[]}function Tv(t){return t==null?P4e:function(){return this.querySelectorAll(t)}}var M7=F(()=>{});function B4e(t){return function(){return D7(t.apply(this,arguments))}}function jz(t){typeof t=="function"?t=B4e(t):t=Tv(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a{sl();Xz();M7()});function kv(t){return function(){return this.matches(t)}}function u3(t){return function(e){return e.matches(t)}}var Ev=F(()=>{});function $4e(t){return function(){return F4e.call(this.children,t)}}function z4e(){return this.firstElementChild}function Zz(t){return this.select(t==null?z4e:$4e(typeof t=="function"?t:u3(t)))}var F4e,Qz=F(()=>{Ev();F4e=Array.prototype.find});function V4e(){return Array.from(this.children)}function U4e(t){return function(){return G4e.call(this.children,t)}}function Jz(t){return this.selectAll(t==null?V4e:U4e(typeof t=="function"?t:u3(t)))}var G4e,eG=F(()=>{Ev();G4e=Array.prototype.filter});function tG(t){typeof t!="function"&&(t=kv(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{sl();Ev()});function h3(t){return new Array(t.length)}var O7=F(()=>{});function nG(){return new ri(this._enter||this._groups.map(h3),this._parents)}function Sv(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var P7=F(()=>{O7();sl();Sv.prototype={constructor:Sv,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}}});function iG(t){return function(){return t}}var aG=F(()=>{});function q4e(t,e,r,n,i,a){for(var s=0,o,l=e.length,u=a.length;s=w&&(w=b+1);!(T=v[w])&&++w{sl();P7();aG()});function lG(){return new ri(this._exit||this._groups.map(h3),this._parents)}var cG=F(()=>{O7();sl()});function uG(t,e,r){var n=this.enter(),i=this,a=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}var hG=F(()=>{});function fG(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,s=Math.min(i,a),o=new Array(i),l=0;l{sl()});function pG(){for(var t=this._groups,e=-1,r=t.length;++e=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}var gG=F(()=>{});function mG(t){t||(t=X4e);function e(f,d){return f&&d?t(f.__data__,d.__data__):!f-!d}for(var r=this._groups,n=r.length,i=new Array(n),a=0;ae?1:t>=e?0:NaN}var vG=F(()=>{sl()});function yG(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var xG=F(()=>{});function bG(){return Array.from(this)}var wG=F(()=>{});function TG(){for(var t=this._groups,e=0,r=t.length;e{});function EG(){let t=0;for(let e of this)++t;return t}var SG=F(()=>{});function CG(){return!this.node()}var AG=F(()=>{});function _G(t){for(var e=this._groups,r=0,n=e.length;r{});function j4e(t){return function(){this.removeAttribute(t)}}function K4e(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Z4e(t,e){return function(){this.setAttribute(t,e)}}function Q4e(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function J4e(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function e3e(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function RG(t,e){var r=uu(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?K4e:j4e:typeof e=="function"?r.local?e3e:J4e:r.local?Q4e:Z4e)(r,e))}var IG=F(()=>{o3()});function f3(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var B7=F(()=>{});function t3e(t){return function(){this.style.removeProperty(t)}}function r3e(t,e,r){return function(){this.style.setProperty(t,e,r)}}function n3e(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function NG(t,e,r){return arguments.length>1?this.each((e==null?t3e:typeof e=="function"?n3e:r3e)(t,e,r??"")):mh(this.node(),t)}function mh(t,e){return t.style.getPropertyValue(e)||f3(t).getComputedStyle(t,null).getPropertyValue(e)}var F7=F(()=>{B7()});function i3e(t){return function(){delete this[t]}}function a3e(t,e){return function(){this[t]=e}}function s3e(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function DG(t,e){return arguments.length>1?this.each((e==null?i3e:typeof e=="function"?s3e:a3e)(t,e)):this.node()[t]}var MG=F(()=>{});function OG(t){return t.trim().split(/^|\s+/)}function $7(t){return t.classList||new PG(t)}function PG(t){this._node=t,this._names=OG(t.getAttribute("class")||"")}function BG(t,e){for(var r=$7(t),n=-1,i=e.length;++n{PG.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}}});function u3e(){this.textContent=""}function h3e(t){return function(){this.textContent=t}}function f3e(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function GG(t){return arguments.length?this.each(t==null?u3e:(typeof t=="function"?f3e:h3e)(t)):this.node().textContent}var VG=F(()=>{});function d3e(){this.innerHTML=""}function p3e(t){return function(){this.innerHTML=t}}function g3e(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function UG(t){return arguments.length?this.each(t==null?d3e:(typeof t=="function"?g3e:p3e)(t)):this.node().innerHTML}var qG=F(()=>{});function m3e(){this.nextSibling&&this.parentNode.appendChild(this)}function WG(){return this.each(m3e)}var HG=F(()=>{});function v3e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function YG(){return this.each(v3e)}var XG=F(()=>{});function jG(t){var e=typeof t=="function"?t:l3(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var KG=F(()=>{N7()});function y3e(){return null}function ZG(t,e){var r=typeof t=="function"?t:l3(t),n=e==null?y3e:typeof e=="function"?e:ad(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var QG=F(()=>{N7();c3()});function x3e(){var t=this.parentNode;t&&t.removeChild(this)}function JG(){return this.each(x3e)}var eV=F(()=>{});function b3e(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function w3e(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tV(t){return this.select(t?w3e:b3e)}var rV=F(()=>{});function nV(t){return arguments.length?this.property("__data__",t):this.node().__data__}var iV=F(()=>{});function T3e(t){return function(e){t.call(this,e,this.__data__)}}function k3e(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function E3e(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r{});function oV(t,e,r){var n=f3(t),i=n.CustomEvent;typeof i=="function"?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 C3e(t,e){return function(){return oV(this,t,e)}}function A3e(t,e){return function(){return oV(this,t,e.apply(this,arguments))}}function lV(t,e){return this.each((typeof e=="function"?A3e:C3e)(t,e))}var cV=F(()=>{B7()});function*uV(){for(var t=this._groups,e=0,r=t.length;e{});function ri(t,e){this._groups=t,this._parents=e}function fV(){return new ri([[document.documentElement]],z7)}function _3e(){return this}var z7,hu,sl=F(()=>{Yz();Kz();Qz();eG();rG();oG();P7();cG();hG();dG();gG();vG();xG();wG();kG();SG();AG();LG();IG();F7();MG();zG();VG();qG();HG();XG();KG();QG();eV();rV();iV();sV();cV();hV();z7=[null];ri.prototype=fV.prototype={constructor:ri,select:Hz,selectAll:jz,selectChild:Zz,selectChildren:Jz,filter:tG,data:sG,enter:nG,exit:lG,join:uG,merge:fG,selection:_3e,order:pG,sort:mG,call:yG,nodes:bG,node:TG,size:EG,empty:CG,each:_G,attr:RG,style:NG,property:DG,classed:$G,text:GG,html:UG,raise:WG,lower:YG,append:jG,insert:ZG,remove:JG,clone:tV,datum:nV,on:aV,dispatch:lV,[Symbol.iterator]:uV};hu=fV});function He(t){return typeof t=="string"?new ri([[document.querySelector(t)]],[document.documentElement]):new ri([[t]],z7)}var dV=F(()=>{sl()});var ol=F(()=>{Ev();o3();dV();sl();c3();M7();F7()});var pV=F(()=>{});function sd(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function lp(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}var G7=F(()=>{});function vh(){}function mV(){return this.rgb().formatHex()}function P3e(){return this.rgb().formatHex8()}function B3e(){return kV(this).formatHsl()}function vV(){return this.rgb().formatRgb()}function cl(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=L3e.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?yV(e):r===3?new ji(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?d3(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?d3(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=R3e.exec(t))?new ji(e[1],e[2],e[3],1):(e=I3e.exec(t))?new ji(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=N3e.exec(t))?d3(e[1],e[2],e[3],e[4]):(e=D3e.exec(t))?d3(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=M3e.exec(t))?wV(e[1],e[2]/100,e[3]/100,1):(e=O3e.exec(t))?wV(e[1],e[2]/100,e[3]/100,e[4]):gV.hasOwnProperty(t)?yV(gV[t]):t==="transparent"?new ji(NaN,NaN,NaN,0):null}function yV(t){return new ji(t>>16&255,t>>8&255,t&255,1)}function d3(t,e,r,n){return n<=0&&(t=e=r=NaN),new ji(t,e,r,n)}function U7(t){return t instanceof vh||(t=cl(t)),t?(t=t.rgb(),new ji(t.r,t.g,t.b,t.opacity)):new ji}function up(t,e,r,n){return arguments.length===1?U7(t):new ji(t,e,r,n??1)}function ji(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function xV(){return`#${od(this.r)}${od(this.g)}${od(this.b)}`}function F3e(){return`#${od(this.r)}${od(this.g)}${od(this.b)}${od((isNaN(this.opacity)?1:this.opacity)*255)}`}function bV(){let t=m3(this.opacity);return`${t===1?"rgb(":"rgba("}${ld(this.r)}, ${ld(this.g)}, ${ld(this.b)}${t===1?")":`, ${t})`}`}function m3(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ld(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function od(t){return t=ld(t),(t<16?"0":"")+t.toString(16)}function wV(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new ll(t,e,r,n)}function kV(t){if(t instanceof ll)return new ll(t.h,t.s,t.l,t.opacity);if(t instanceof vh||(t=cl(t)),!t)return new ll;if(t instanceof ll)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(e===a?s=(r-n)/o+(r0&&l<1?0:s,new ll(s,o,l,t.opacity)}function EV(t,e,r,n){return arguments.length===1?kV(t):new ll(t,e,r,n??1)}function ll(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function TV(t){return t=(t||0)%360,t<0?t+360:t}function p3(t){return Math.max(0,Math.min(1,t||0))}function V7(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var Cv,g3,cp,Av,Kl,L3e,R3e,I3e,N3e,D3e,M3e,O3e,gV,q7=F(()=>{G7();Cv=.7,g3=1/Cv,cp="\\s*([+-]?\\d+)\\s*",Av="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",L3e=/^#([0-9a-f]{3,8})$/,R3e=new RegExp(`^rgb\\(${cp},${cp},${cp}\\)$`),I3e=new RegExp(`^rgb\\(${Kl},${Kl},${Kl}\\)$`),N3e=new RegExp(`^rgba\\(${cp},${cp},${cp},${Av}\\)$`),D3e=new RegExp(`^rgba\\(${Kl},${Kl},${Kl},${Av}\\)$`),M3e=new RegExp(`^hsl\\(${Av},${Kl},${Kl}\\)$`),O3e=new RegExp(`^hsla\\(${Av},${Kl},${Kl},${Av}\\)$`),gV={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};sd(vh,cl,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:mV,formatHex:mV,formatHex8:P3e,formatHsl:B3e,formatRgb:vV,toString:vV});sd(ji,up,lp(vh,{brighter(t){return t=t==null?g3:Math.pow(g3,t),new ji(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Cv:Math.pow(Cv,t),new ji(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ji(ld(this.r),ld(this.g),ld(this.b),m3(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:xV,formatHex:xV,formatHex8:F3e,formatRgb:bV,toString:bV}));sd(ll,EV,lp(vh,{brighter(t){return t=t==null?g3:Math.pow(g3,t),new ll(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Cv:Math.pow(Cv,t),new ll(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new ji(V7(t>=240?t-240:t+120,i,n),V7(t,i,n),V7(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new ll(TV(this.h),p3(this.s),p3(this.l),m3(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=m3(this.opacity);return`${t===1?"hsl(":"hsla("}${TV(this.h)}, ${p3(this.s)*100}%, ${p3(this.l)*100}%${t===1?")":`, ${t})`}`}}))});var SV,CV,AV=F(()=>{SV=Math.PI/180,CV=180/Math.PI});function DV(t){if(t instanceof Zl)return new Zl(t.l,t.a,t.b,t.opacity);if(t instanceof fu)return MV(t);t instanceof ji||(t=U7(t));var e=X7(t.r),r=X7(t.g),n=X7(t.b),i=W7((.2225045*e+.7168786*r+.0606169*n)/LV),a,s;return e===r&&r===n?a=s=i:(a=W7((.4360747*e+.3850649*r+.1430804*n)/_V),s=W7((.0139322*e+.0971045*r+.7141733*n)/RV)),new Zl(116*i-16,500*(a-i),200*(i-s),t.opacity)}function j7(t,e,r,n){return arguments.length===1?DV(t):new Zl(t,e,r,n??1)}function Zl(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function W7(t){return t>$3e?Math.pow(t,1/3):t/NV+IV}function H7(t){return t>hp?t*t*t:NV*(t-IV)}function Y7(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function X7(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function z3e(t){if(t instanceof fu)return new fu(t.h,t.c,t.l,t.opacity);if(t instanceof Zl||(t=DV(t)),t.a===0&&t.b===0)return new fu(NaN,0{G7();q7();AV();v3=18,_V=.96422,LV=1,RV=.82521,IV=4/29,hp=6/29,NV=3*hp*hp,$3e=hp*hp*hp;sd(Zl,j7,lp(vh,{brighter(t){return new Zl(this.l+v3*(t??1),this.a,this.b,this.opacity)},darker(t){return new Zl(this.l-v3*(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 e=_V*H7(e),t=LV*H7(t),r=RV*H7(r),new ji(Y7(3.1338561*e-1.6168667*t-.4906146*r),Y7(-.9787684*e+1.9161415*t+.033454*r),Y7(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));sd(fu,_v,lp(vh,{brighter(t){return new fu(this.h,this.c,this.l+v3*(t??1),this.opacity)},darker(t){return new fu(this.h,this.c,this.l-v3*(t??1),this.opacity)},rgb(){return MV(this).rgb()}}))});var fp=F(()=>{q7();OV()});function K7(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 PV(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],s=n>0?t[n-1]:2*i-a,o=n{});function BV(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],a=t[n%e],s=t[(n+1)%e],o=t[(n+2)%e];return K7((r-n/e)*e,i,a,s,o)}}var FV=F(()=>{Z7()});var dp,Q7=F(()=>{dp=t=>()=>t});function $V(t,e){return function(r){return t+r*e}}function G3e(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function zV(t,e){var r=e-t;return r?$V(t,r>180||r<-180?r-360*Math.round(r/360):r):dp(isNaN(t)?e:t)}function GV(t){return(t=+t)==1?du:function(e,r){return r-e?G3e(e,r,t):dp(isNaN(e)?r:e)}}function du(t,e){var r=e-t;return r?$V(t,r):dp(isNaN(t)?e:t)}var J7=F(()=>{Q7()});function VV(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),s,o;for(s=0;s{fp();Z7();FV();J7();cd=function t(e){var r=GV(e);function n(i,a){var s=r((i=up(i)).r,(a=up(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),u=du(i.opacity,a.opacity);return function(h){return i.r=s(h),i.g=o(h),i.b=l(h),i.opacity=u(h),i+""}}return n.gamma=t,n}(1);V3e=VV(PV),U3e=VV(BV)});function UV(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i{});function HV(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s{y3()});function XV(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}var jV=F(()=>{});function Ki(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var Lv=F(()=>{});function KV(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=ud(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var ZV=F(()=>{y3()});function q3e(t){return function(){return t}}function W3e(t){return function(e){return t(e)+""}}function Rv(t,e){var r=rA.lastIndex=tA.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(t=t+"",e=e+"";(n=rA.exec(t))&&(i=tA.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:Ki(n,i)})),r=tA.lastIndex;return r{Lv();rA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tA=new RegExp(rA.source,"g")});function ud(t,e){var r=typeof e,n;return e==null||r==="boolean"?dp(e):(r==="number"?Ki:r==="string"?(n=cl(e))?(e=n,cd):Rv:e instanceof cl?cd:e instanceof Date?XV:qV(e)?UV:Array.isArray(e)?HV:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?KV:Ki)(t,e)}var y3=F(()=>{fp();eA();YV();jV();Lv();ZV();nA();Q7();WV()});function iA(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var QV=F(()=>{});function aA(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{JV=180/Math.PI,x3={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function tU(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?x3:aA(e.a,e.b,e.c,e.d,e.e,e.f)}function rU(t){return t==null?x3:(b3||(b3=document.createElementNS("http://www.w3.org/2000/svg","g")),b3.setAttribute("transform",t),(t=b3.transform.baseVal.consolidate())?(t=t.matrix,aA(t.a,t.b,t.c,t.d,t.e,t.f)):x3)}var b3,nU=F(()=>{eU()});function iU(t,e,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,h,f,d,p,g){if(u!==f||h!==d){var m=p.push("translate(",null,e,null,r);g.push({i:m-4,x:Ki(u,f)},{i:m-2,x:Ki(h,d)})}else(f||d)&&p.push("translate("+f+e+d+r)}function s(u,h,f,d){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),d.push({i:f.push(i(f)+"rotate(",null,n)-2,x:Ki(u,h)})):h&&f.push(i(f)+"rotate("+h+n)}function o(u,h,f,d){u!==h?d.push({i:f.push(i(f)+"skewX(",null,n)-2,x:Ki(u,h)}):h&&f.push(i(f)+"skewX("+h+n)}function l(u,h,f,d,p,g){if(u!==f||h!==d){var m=p.push(i(p)+"scale(",null,",",null,")");g.push({i:m-4,x:Ki(u,f)},{i:m-2,x:Ki(h,d)})}else(f!==1||d!==1)&&p.push(i(p)+"scale("+f+","+d+")")}return function(u,h){var f=[],d=[];return u=t(u),h=t(h),a(u.translateX,u.translateY,h.translateX,h.translateY,f,d),s(u.rotate,h.rotate,f,d),o(u.skewX,h.skewX,f,d),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,d),u=h=null,function(p){for(var g=-1,m=d.length,v;++g{Lv();nU();sA=iU(tU,"px, ","px)","deg)"),oA=iU(rU,", ",")",")")});function sU(t){return function(e,r){var n=t((e=_v(e)).h,(r=_v(r)).h),i=du(e.c,r.c),a=du(e.l,r.l),s=du(e.opacity,r.opacity);return function(o){return e.h=n(o),e.c=i(o),e.l=a(o),e.opacity=s(o),e+""}}}var lA,H3e,oU=F(()=>{fp();J7();lA=sU(zV),H3e=sU(du)});var pp=F(()=>{y3();Lv();QV();nA();aU();eA();oU()});function Pv(){return hd||(uU(Y3e),hd=Mv.now()+k3)}function Y3e(){hd=0}function Ov(){this._call=this._time=this._next=null}function E3(t,e,r){var n=new Ov;return n.restart(t,e,r),n}function hU(){Pv(),++gp;for(var t=w3,e;t;)(e=hd-t._time)>=0&&t._call.call(void 0,e),t=t._next;--gp}function lU(){hd=(T3=Mv.now())+k3,gp=Nv=0;try{hU()}finally{gp=0,j3e(),hd=0}}function X3e(){var t=Mv.now(),e=t-T3;e>cU&&(k3-=e,T3=t)}function j3e(){for(var t,e=w3,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:w3=r);Dv=t,cA(n)}function cA(t){if(!gp){Nv&&(Nv=clearTimeout(Nv));var e=t-hd;e>24?(t<1/0&&(Nv=setTimeout(lU,t-Mv.now()-k3)),Iv&&(Iv=clearInterval(Iv))):(Iv||(T3=Mv.now(),Iv=setInterval(X3e,cU)),gp=1,uU(lU))}}var gp,Nv,Iv,cU,w3,Dv,T3,hd,k3,Mv,uU,uA=F(()=>{gp=0,Nv=0,Iv=0,cU=1e3,T3=0,hd=0,k3=0,Mv=typeof performance=="object"&&performance.now?performance:Date,uU=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};Ov.prototype=E3.prototype={constructor:Ov,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?Pv():+r)+(e==null?0:+e),!this._next&&Dv!==this&&(Dv?Dv._next=this:w3=this,Dv=this),this._call=t,this._time=r,cA()},stop:function(){this._call&&(this._call=null,this._time=1/0,cA())}}});function S3(t,e,r){var n=new Ov;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var fU=F(()=>{uA()});var C3=F(()=>{uA();fU()});function yh(t,e,r,n,i,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;Q3e(t,r,{name:e,index:n,group:i,on:K3e,tween:Z3e,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:gU})}function Fv(t,e){var r=Ei(t,e);if(r.state>gU)throw new Error("too late; already scheduled");return r}function Zi(t,e){var r=Ei(t,e);if(r.state>A3)throw new Error("too late; already running");return r}function Ei(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Q3e(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=E3(a,0,r.time);function a(u){r.state=dU,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var h,f,d,p;if(r.state!==dU)return l();for(h in n)if(p=n[h],p.name===r.name){if(p.state===A3)return S3(s);p.state===pU?(p.state=Bv,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete n[h]):+h{L7();C3();K3e=_7("start","end","cancel","interrupt"),Z3e=[],gU=0,dU=1,_3=2,A3=3,pU=4,L3=5,Bv=6});function R3(t,e){var r=t.__transition,n,i,a=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((n=r[s]).name!==e){a=!1;continue}i=n.state>_3&&n.state{Ts()});function vU(t){return this.each(function(){R3(this,t)})}var yU=F(()=>{mU()});function J3e(t,e){var r,n;return function(){var i=Zi(this,t),a=i.tween;if(a!==r){n=r=a;for(var s=0,o=n.length;s{Ts()});function I3(t,e){var r;return(typeof e=="number"?Ki:e instanceof cl?cd:(r=cl(e))?(e=r,cd):Rv)(t,e)}var hA=F(()=>{fp();pp()});function t5e(t){return function(){this.removeAttribute(t)}}function r5e(t){return function(){this.removeAttributeNS(t.space,t.local)}}function n5e(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttribute(t);return s===i?null:s===n?a:a=e(n=s,r)}}function i5e(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===n?a:a=e(n=s,r)}}function a5e(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function s5e(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function bU(t,e){var r=uu(t),n=r==="transform"?oA:I3;return this.attrTween(t,typeof e=="function"?(r.local?s5e:a5e)(r,n,mp(this,"attr."+t,e)):e==null?(r.local?r5e:t5e)(r):(r.local?i5e:n5e)(r,n,e))}var wU=F(()=>{pp();ol();$v();hA()});function o5e(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function l5e(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function c5e(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&l5e(t,a)),r}return i._value=e,i}function u5e(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&o5e(t,a)),r}return i._value=e,i}function TU(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=uu(t);return this.tween(r,(n.local?c5e:u5e)(n,e))}var kU=F(()=>{ol()});function h5e(t,e){return function(){Fv(this,t).delay=+e.apply(this,arguments)}}function f5e(t,e){return e=+e,function(){Fv(this,t).delay=e}}function EU(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?h5e:f5e)(e,t)):Ei(this.node(),e).delay}var SU=F(()=>{Ts()});function d5e(t,e){return function(){Zi(this,t).duration=+e.apply(this,arguments)}}function p5e(t,e){return e=+e,function(){Zi(this,t).duration=e}}function CU(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?d5e:p5e)(e,t)):Ei(this.node(),e).duration}var AU=F(()=>{Ts()});function g5e(t,e){if(typeof e!="function")throw new Error;return function(){Zi(this,t).ease=e}}function _U(t){var e=this._id;return arguments.length?this.each(g5e(e,t)):Ei(this.node(),e).ease}var LU=F(()=>{Ts()});function m5e(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Zi(this,t).ease=r}}function RU(t){if(typeof t!="function")throw new Error;return this.each(m5e(this._id,t))}var IU=F(()=>{Ts()});function NU(t){typeof t!="function"&&(t=kv(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{ol();fd()});function MU(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,a=Math.min(n,i),s=new Array(n),o=0;o{fd()});function v5e(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function y5e(t,e,r){var n,i,a=v5e(e)?Fv:Zi;return function(){var s=a(this,t),o=s.on;o!==n&&(i=(n=o).copy()).on(e,r),s.on=i}}function PU(t,e){var r=this._id;return arguments.length<2?Ei(this.node(),r).on.on(t):this.each(y5e(r,t,e))}var BU=F(()=>{Ts()});function x5e(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function FU(){return this.on("end.remove",x5e(this._id))}var $U=F(()=>{});function zU(t){var e=this._name,r=this._id;typeof t!="function"&&(t=ad(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s{ol();fd();Ts()});function VU(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Tv(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o{ol();fd();Ts()});function qU(){return new b5e(this._groups,this._parents)}var b5e,WU=F(()=>{ol();b5e=hu.prototype.constructor});function w5e(t,e){var r,n,i;return function(){var a=mh(this,t),s=(this.style.removeProperty(t),mh(this,t));return a===s?null:a===r&&s===n?i:i=e(r=a,n=s)}}function HU(t){return function(){this.style.removeProperty(t)}}function T5e(t,e,r){var n,i=r+"",a;return function(){var s=mh(this,t);return s===i?null:s===n?a:a=e(n=s,r)}}function k5e(t,e,r){var n,i,a;return function(){var s=mh(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),mh(this,t))),s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o))}}function E5e(t,e){var r,n,i,a="style."+e,s="end."+a,o;return function(){var l=Zi(this,t),u=l.on,h=l.value[a]==null?o||(o=HU(e)):void 0;(u!==r||i!==h)&&(n=(r=u).copy()).on(s,i=h),l.on=n}}function YU(t,e,r){var n=(t+="")=="transform"?sA:I3;return e==null?this.styleTween(t,w5e(t,n)).on("end.style."+t,HU(t)):typeof e=="function"?this.styleTween(t,k5e(t,n,mp(this,"style."+t,e))).each(E5e(this._id,t)):this.styleTween(t,T5e(t,n,e),r).on("end.style."+t,null)}var XU=F(()=>{pp();ol();Ts();$v();hA()});function S5e(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function C5e(t,e,r){var n,i;function a(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&S5e(t,s,r)),n}return a._value=e,a}function jU(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,C5e(t,e,r??""))}var KU=F(()=>{});function A5e(t){return function(){this.textContent=t}}function _5e(t){return function(){var e=t(this);this.textContent=e??""}}function ZU(t){return this.tween("text",typeof t=="function"?_5e(mp(this,"text",t)):A5e(t==null?"":t+""))}var QU=F(()=>{$v()});function L5e(t){return function(e){this.textContent=t.call(this,e)}}function R5e(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&L5e(i)),e}return n._value=t,n}function JU(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,R5e(t))}var eq=F(()=>{});function tq(){for(var t=this._name,e=this._id,r=N3(),n=this._groups,i=n.length,a=0;a{fd();Ts()});function nq(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};r.each(function(){var u=Zi(this,n),h=u.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),i===0&&a()})}var iq=F(()=>{Ts()});function Ya(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function aq(t){return hu().transition(t)}function N3(){return++I5e}var I5e,pu,fd=F(()=>{ol();wU();kU();SU();AU();LU();IU();DU();OU();BU();$U();GU();UU();WU();XU();KU();QU();eq();rq();$v();iq();I5e=0;pu=hu.prototype;Ya.prototype=aq.prototype={constructor:Ya,select:zU,selectAll:VU,selectChild:pu.selectChild,selectChildren:pu.selectChildren,filter:NU,merge:MU,selection:qU,transition:tq,call:pu.call,nodes:pu.nodes,node:pu.node,size:pu.size,empty:pu.empty,each:pu.each,on:PU,attr:bU,attrTween:TU,style:YU,styleTween:jU,text:ZU,textTween:JU,remove:FU,tween:xU,delay:EU,duration:CU,ease:_U,easeVarying:RU,end:nq,[Symbol.iterator]:pu[Symbol.iterator]}});function D3(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var sq=F(()=>{});var fA=F(()=>{sq()});function D5e(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 oq(t){var e,r;t instanceof Ya?(e=t._id,t=t._name):(e=N3(),(r=N5e).time=Pv(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,a=0;a{fd();Ts();fA();C3();N5e={time:null,delay:0,duration:250,ease:D3}});var cq=F(()=>{ol();yU();lq();hu.prototype.interrupt=vU;hu.prototype.transition=oq});var M3=F(()=>{cq()});var uq=F(()=>{});var hq=F(()=>{});var fq=F(()=>{});function dq(t){return[+t[0],+t[1]]}function M5e(t){return[dq(t[0]),dq(t[1])]}function dA(t){return{type:t}}var nct,ict,act,sct,oct,lct,pq=F(()=>{M3();uq();hq();fq();({abs:nct,max:ict,min:act}=Math);sct={name:"x",handles:["w","e"].map(dA),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},oct={name:"y",handles:["n","s"].map(dA),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},lct={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(dA),input:function(t){return t==null?null:M5e(t)},output:function(t){return t}}});var gq=F(()=>{pq()});function mq(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return mq;let r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i{pA=Math.PI,gA=2*pA,dd=1e-6,O5e=gA-dd;pd=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?mq:P5e(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=n-e,u=i-r,h=s-e,f=o-r,d=h*h+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(d>dd)if(!(Math.abs(f*l-u*h)>dd)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let p=n-s,g=i-o,m=l*l+u*u,v=p*p+g*g,y=Math.sqrt(m),b=Math.sqrt(d),w=a*Math.tan((pA-Math.acos((m+d-v)/(2*y*b)))/2),S=w/b,T=w/y;Math.abs(S-1)>dd&&this._append`L${e+S*h},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*p>h*g)},${this._x1=e+T*l},${this._y1=r+T*u}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),l=n*Math.sin(i),u=e+o,h=r+l,f=1^s,d=s?i-a:a-i;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>dd||Math.abs(this._y1-h)>dd)&&this._append`L${u},${h}`,n&&(d<0&&(d=d%gA+gA),d>O5e?this._append`A${n},${n},0,1,${f},${e-o},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=h}`:d>dd&&this._append`A${n},${n},0,${+(d>=pA)},${f},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};vq.prototype=pd.prototype});var mA=F(()=>{yq()});var xq=F(()=>{});var bq=F(()=>{});var wq=F(()=>{});var Tq=F(()=>{});var kq=F(()=>{});var Eq=F(()=>{});var Sq=F(()=>{});function Cq(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function gd(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}var zv=F(()=>{});function Ql(t){return t=gd(Math.abs(t)),t?t[1]:NaN}var Gv=F(()=>{zv()});function Aq(t,e){return function(r,n){for(var i=r.length,a=[],s=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=t[s=(s+1)%t.length];return a.reverse().join(e)}}var _q=F(()=>{});function Lq(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var Rq=F(()=>{});function xh(t){if(!(e=B5e.exec(t)))throw new Error("invalid format: "+t);var e;return new O3({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]})}function O3(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}var B5e,vA=F(()=>{B5e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;xh.prototype=O3.prototype;O3.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type}});function Iq(t){e:for(var e=t.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var Nq=F(()=>{});function Dq(t,e){var r=gd(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(yA=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+gd(t,Math.max(0,e+a-1))[0]}var yA,xA=F(()=>{zv()});function bA(t,e){var r=gd(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var Mq=F(()=>{zv()});var wA,Oq=F(()=>{zv();xA();Mq();wA={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Cq,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>bA(t*100,e),r:bA,s:Dq,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)}});function TA(t){return t}var Pq=F(()=>{});function $q(t){var e=t.grouping===void 0||t.thousands===void 0?TA:Aq(Bq.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?TA:Lq(Bq.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=xh(f);var d=f.fill,p=f.align,g=f.sign,m=f.symbol,v=f.zero,y=f.width,b=f.comma,w=f.precision,S=f.trim,T=f.type;T==="n"?(b=!0,T="g"):wA[T]||(w===void 0&&(w=12),S=!0,T="g"),(v||d==="0"&&p==="=")&&(v=!0,d="0",p="=");var E=m==="$"?r:m==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",A=m==="$"?n:/[%p]/.test(T)?s:"",C=wA[T],I=/[defgprs%]/.test(T);w=w===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(R){var k=E,L=A,_,D,N;if(T==="c")L=C(R)+L,R="";else{R=+R;var O=R<0||1/R<0;if(R=isNaN(R)?l:C(Math.abs(R),w),S&&(R=Iq(R)),O&&+R==0&&g!=="+"&&(O=!1),k=(O?g==="("?g:o:g==="-"||g==="("?"":g)+k,L=(T==="s"?Fq[8+yA/3]:"")+L+(O&&g==="("?")":""),I){for(_=-1,D=R.length;++_N||N>57){L=(N===46?i+R.slice(_+1):R.slice(_))+L,R=R.slice(0,_);break}}}b&&!v&&(R=e(R,1/0));var P=k.length+R.length+L.length,B=P>1)+k+R+L+B.slice(P);break;default:R=B+k+R+L;break}return a(R)}return M.toString=function(){return f+""},M}function h(f,d){var p=u((f=xh(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Ql(d)/3)))*3,m=Math.pow(10,-g),v=Fq[8+g/3];return function(y){return p(m*y)+v}}return{format:u,formatPrefix:h}}var Bq,Fq,zq=F(()=>{Gv();_q();Rq();vA();Nq();Oq();xA();Pq();Bq=Array.prototype.map,Fq=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function kA(t){return P3=$q(t),Jl=P3.format,B3=P3.formatPrefix,P3}var P3,Jl,B3,Gq=F(()=>{zq();kA({thousands:",",grouping:[3],currency:["$",""]})});function EA(t){return Math.max(0,-Ql(Math.abs(t)))}var Vq=F(()=>{Gv()});function SA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ql(e)/3)))*3-Ql(Math.abs(t)))}var Uq=F(()=>{Gv()});function CA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ql(e)-Ql(t))+1}var qq=F(()=>{Gv()});var AA=F(()=>{Gq();vA();Vq();Uq();qq()});var Wq=F(()=>{});function F5e(t){var e=0,r=t.children,n=r&&r.length;if(!n)e=1;else for(;--n>=0;)e+=r[n].value;t.value=e}function Hq(){return this.eachAfter(F5e)}var Yq=F(()=>{});function Xq(t,e){let r=-1;for(let n of this)t.call(e,n,++r,this);return this}var jq=F(()=>{});function Kq(t,e){for(var r=this,n=[r],i,a,s=-1;r=n.pop();)if(t.call(e,r,++s,this),i=r.children)for(a=i.length-1;a>=0;--a)n.push(i[a]);return this}var Zq=F(()=>{});function Qq(t,e){for(var r=this,n=[r],i=[],a,s,o,l=-1;r=n.pop();)if(i.push(r),a=r.children)for(s=0,o=a.length;s{});function eW(t,e){let r=-1;for(let n of this)if(t.call(e,n,++r,this))return n}var tW=F(()=>{});function rW(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r})}var nW=F(()=>{});function iW(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}var aW=F(()=>{});function sW(t){for(var e=this,r=$5e(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n}function $5e(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;for(t=r.pop(),e=n.pop();t===e;)i=t,t=r.pop(),e=n.pop();return i}var oW=F(()=>{});function lW(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}var cW=F(()=>{});function uW(){return Array.from(this)}var hW=F(()=>{});function fW(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}var dW=F(()=>{});function pW(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}var gW=F(()=>{});function*mW(){var t=this,e,r=[t],n,i,a;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,n=t.children)for(i=0,a=n.length;i{});function vp(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=V5e)):e===void 0&&(e=G5e);for(var r=new Vv(t),n,i=[r],a,s,o,l;n=i.pop();)if((s=e(n.data))&&(l=(s=Array.from(s)).length))for(n.children=s,o=l-1;o>=0;--o)i.push(a=s[o]=new Vv(s[o])),a.parent=n,a.depth=n.depth+1;return r.eachBefore(q5e)}function z5e(){return vp(this).eachBefore(U5e)}function G5e(t){return t.children}function V5e(t){return Array.isArray(t)?t[1]:null}function U5e(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function q5e(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Vv(t){this.data=t,this.depth=this.height=0,this.parent=null}var yW=F(()=>{Yq();jq();Zq();Jq();tW();nW();aW();oW();cW();hW();dW();gW();vW();Vv.prototype=vp.prototype={constructor:Vv,count:Hq,each:Xq,eachAfter:Qq,eachBefore:Kq,find:eW,sum:rW,sort:iW,path:sW,ancestors:lW,descendants:uW,leaves:fW,links:pW,copy:z5e,[Symbol.iterator]:mW}});function xW(t){if(typeof t!="function")throw new Error;return t}var bW=F(()=>{});function yp(){return 0}function xp(t){return function(){return t}}var wW=F(()=>{});function TW(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}var kW=F(()=>{});function EW(t,e,r,n,i){for(var a=t.children,s,o=-1,l=a.length,u=t.value&&(n-e)/t.value;++o{});function CW(t,e,r,n,i){for(var a=t.children,s,o=-1,l=a.length,u=t.value&&(i-r)/t.value;++o{});function H5e(t,e,r,n,i,a){for(var s=[],o=e.children,l,u,h=0,f=0,d=o.length,p,g,m=e.value,v,y,b,w,S,T,E;hb&&(b=u),E=v*v*T,w=Math.max(b/E,E/y),w>S){v-=u;break}S=w}s.push(l={value:v,dice:p{SW();AW();W5e=(1+Math.sqrt(5))/2;_W=function t(e){function r(n,i,a,s,o){H5e(e,n,i,a,s,o)}return r.ratio=function(n){return t((n=+n)>1?n:1)},r}(W5e)});function _A(){var t=_W,e=!1,r=1,n=1,i=[0],a=yp,s=yp,o=yp,l=yp,u=yp;function h(d){return d.x0=d.y0=0,d.x1=r,d.y1=n,d.eachBefore(f),i=[0],e&&d.eachBefore(TW),d}function f(d){var p=i[d.depth],g=d.x0+p,m=d.y0+p,v=d.x1-p,y=d.y1-p;v{kW();LW();bW();wW()});var IW=F(()=>{yW();RW()});var NW=F(()=>{});var DW=F(()=>{});function bh(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var Uv=F(()=>{});function Ys(){var t=new sp,e=[],r=[],n=LA;function i(a){let s=t.get(a);if(s===void 0){if(n!==LA)return n;t.set(a,s=e.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new sp;for(let s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Ys(e,r).unknown(n)},bh.apply(i,arguments),i}var LA,RA=F(()=>{gh();Uv();LA=Symbol("implicit")});function bp(){var t=Ys().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,o=!1,l=0,u=0,h=.5;delete t.unknown;function f(){var d=e().length,p=i{gh();Uv();RA()});function IA(t){return function(){return t}}var OW=F(()=>{});function NA(t){return+t}var PW=F(()=>{});function wp(t){return t}function DA(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:IA(isNaN(e)?NaN:.5)}function Y5e(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function X5e(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i2?j5e:X5e,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=o(t.map(n),e,r)))(n(s(d)))}return f.invert=function(d){return s(i((u||(u=o(e,t.map(n),Ki)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,NA),h()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),h()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=iA,h()},f.clamp=function(d){return arguments.length?(s=d?!0:wp,h()):s!==wp},f.interpolate=function(d){return arguments.length?(r=d,h()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,p){return n=d,i=p,h()}}function qv(){return K5e()(wp,wp)}var BW,MA=F(()=>{gh();pp();OW();PW();BW=[0,1]});function OA(t,e,r,n){var i=op(t,e,r),a;switch(n=xh(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=SA(i,s))&&(n.precision=a),B3(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=CA(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=EA(i))&&(n.precision=a-(n.type==="%")*2);break}}return Jl(n)}var FW=F(()=>{gh();AA()});function Z5e(t){var e=t.domain;return t.ticks=function(r){var n=e();return J4(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return OA(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],o=n[a],l,u,h=10;for(o0;){if(u=wv(s,o,r),u===l)return n[i]=s,n[a]=o,e(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function ul(){var t=qv();return t.copy=function(){return F3(t,ul())},bh.apply(t,arguments),Z5e(t)}var $W=F(()=>{gh();MA();Uv();FW()});function PA(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a{});function xn(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{let s=i(a),o=i.ceil(a);return a-s(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{let l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a0))return l;let u;do l.push(u=new Date(+a)),e(a,o),t(a);while(uxn(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!a(s););else for(;--o>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(BA.setTime(+a),FA.setTime(+s),t(BA),t(FA),Math.floor(r(BA,FA))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}var BA,FA,gu=F(()=>{BA=new Date,FA=new Date});var ec,GW,$A=F(()=>{gu();ec=xn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ec.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?xn(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):ec);GW=ec.range});var Xs,VW,zA=F(()=>{gu();Xs=xn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),VW=Xs.range});var mu,Q5e,$3,J5e,GA=F(()=>{gu();mu=xn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),Q5e=mu.range,$3=xn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),J5e=$3.range});var vu,ewe,z3,twe,VA=F(()=>{gu();vu=xn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),ewe=vu.range,z3=xn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),twe=z3.range});var wo,rwe,Hv,nwe,G3,iwe,UA=F(()=>{gu();wo=xn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),rwe=wo.range,Hv=xn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),nwe=Hv.range,G3=xn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),iwe=G3.range});function yd(t){return xn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}function xd(t){return xn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var hl,wh,V3,U3,rc,q3,W3,qW,awe,swe,owe,lwe,cwe,uwe,bd,Tp,WW,HW,Th,YW,XW,jW,hwe,fwe,dwe,pwe,gwe,mwe,qA=F(()=>{gu();hl=yd(0),wh=yd(1),V3=yd(2),U3=yd(3),rc=yd(4),q3=yd(5),W3=yd(6),qW=hl.range,awe=wh.range,swe=V3.range,owe=U3.range,lwe=rc.range,cwe=q3.range,uwe=W3.range;bd=xd(0),Tp=xd(1),WW=xd(2),HW=xd(3),Th=xd(4),YW=xd(5),XW=xd(6),jW=bd.range,hwe=Tp.range,fwe=WW.range,dwe=HW.range,pwe=Th.range,gwe=YW.range,mwe=XW.range});var yu,vwe,H3,ywe,WA=F(()=>{gu();yu=xn(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),vwe=yu.range,H3=xn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),ywe=H3.range});var js,xwe,fl,bwe,HA=F(()=>{gu();js=xn(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());js.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:xn(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});xwe=js.range,fl=xn(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());fl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:xn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});bwe=fl.range});function ZW(t,e,r,n,i,a){let s=[[Xs,1,1e3],[Xs,5,5*1e3],[Xs,15,15*1e3],[Xs,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function o(u,h,f){let d=hv).right(s,d);if(p===s.length)return t.every(op(u/31536e6,h/31536e6,f));if(p===0)return ec.every(Math.max(op(u,h,f),1));let[g,m]=s[d/s[p-1][2]{gh();$A();zA();GA();VA();UA();qA();WA();HA();[Twe,kwe]=ZW(fl,H3,bd,G3,z3,$3),[YA,XA]=ZW(js,yu,hl,wo,vu,mu)});var Y3=F(()=>{$A();zA();GA();VA();UA();qA();WA();HA();QW()});function jA(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function KA(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Yv(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function ZA(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,u=Xv(i),h=jv(i),f=Xv(a),d=jv(a),p=Xv(s),g=jv(s),m=Xv(o),v=jv(o),y=Xv(l),b=jv(l),w={a:O,A:P,b:B,B:G,c:null,d:iH,e:iH,f:Hwe,g:rTe,G:iTe,H:Uwe,I:qwe,j:Wwe,L:cH,m:Ywe,M:Xwe,p:$,q:U,Q:oH,s:lH,S:jwe,u:Kwe,U:Zwe,V:Qwe,w:Jwe,W:eTe,x:null,X:null,y:tTe,Y:nTe,Z:aTe,"%":sH},S={a:X,A:ee,b:Y,B:oe,c:null,d:aH,e:aH,f:cTe,g:xTe,G:wTe,H:sTe,I:oTe,j:lTe,L:hH,m:uTe,M:hTe,p:Q,q:ue,Q:oH,s:lH,S:fTe,u:dTe,U:pTe,V:gTe,w:mTe,W:vTe,x:null,X:null,y:yTe,Y:bTe,Z:TTe,"%":sH},T={a:M,A:R,b:k,B:L,c:_,d:rH,e:rH,f:$we,g:tH,G:eH,H:nH,I:nH,j:Owe,L:Fwe,m:Mwe,M:Pwe,p:I,q:Dwe,Q:Gwe,s:Vwe,S:Bwe,u:_we,U:Lwe,V:Rwe,w:Awe,W:Iwe,x:D,X:N,y:tH,Y:eH,Z:Nwe,"%":zwe};w.x=E(r,w),w.X=E(n,w),w.c=E(e,w),S.x=E(r,S),S.X=E(n,S),S.c=E(e,S);function E(re,te){return function(Z){var j=[],ae=-1,K=0,de=re.length,ne,be,W;for(Z instanceof Date||(Z=new Date(+Z));++ae53)return null;"w"in j||(j.w=1),"Z"in j?(K=KA(Yv(j.y,0,1)),de=K.getUTCDay(),K=de>4||de===0?Tp.ceil(K):Tp(K),K=Hv.offset(K,(j.V-1)*7),j.y=K.getUTCFullYear(),j.m=K.getUTCMonth(),j.d=K.getUTCDate()+(j.w+6)%7):(K=jA(Yv(j.y,0,1)),de=K.getDay(),K=de>4||de===0?wh.ceil(K):wh(K),K=wo.offset(K,(j.V-1)*7),j.y=K.getFullYear(),j.m=K.getMonth(),j.d=K.getDate()+(j.w+6)%7)}else("W"in j||"U"in j)&&("w"in j||(j.w="u"in j?j.u%7:"W"in j?1:0),de="Z"in j?KA(Yv(j.y,0,1)).getUTCDay():jA(Yv(j.y,0,1)).getDay(),j.m=0,j.d="W"in j?(j.w+6)%7+j.W*7-(de+5)%7:j.w+j.U*7-(de+6)%7);return"Z"in j?(j.H+=j.Z/100|0,j.M+=j.Z%100,KA(j)):jA(j)}}function C(re,te,Z,j){for(var ae=0,K=te.length,de=Z.length,ne,be;ae=de)return-1;if(ne=te.charCodeAt(ae++),ne===37){if(ne=te.charAt(ae++),be=T[ne in JW?te.charAt(ae++):ne],!be||(j=be(re,Z,j))<0)return-1}else if(ne!=Z.charCodeAt(j++))return-1}return j}function I(re,te,Z){var j=u.exec(te.slice(Z));return j?(re.p=h.get(j[0].toLowerCase()),Z+j[0].length):-1}function M(re,te,Z){var j=p.exec(te.slice(Z));return j?(re.w=g.get(j[0].toLowerCase()),Z+j[0].length):-1}function R(re,te,Z){var j=f.exec(te.slice(Z));return j?(re.w=d.get(j[0].toLowerCase()),Z+j[0].length):-1}function k(re,te,Z){var j=y.exec(te.slice(Z));return j?(re.m=b.get(j[0].toLowerCase()),Z+j[0].length):-1}function L(re,te,Z){var j=m.exec(te.slice(Z));return j?(re.m=v.get(j[0].toLowerCase()),Z+j[0].length):-1}function _(re,te,Z){return C(re,e,te,Z)}function D(re,te,Z){return C(re,r,te,Z)}function N(re,te,Z){return C(re,n,te,Z)}function O(re){return s[re.getDay()]}function P(re){return a[re.getDay()]}function B(re){return l[re.getMonth()]}function G(re){return o[re.getMonth()]}function $(re){return i[+(re.getHours()>=12)]}function U(re){return 1+~~(re.getMonth()/3)}function X(re){return s[re.getUTCDay()]}function ee(re){return a[re.getUTCDay()]}function Y(re){return l[re.getUTCMonth()]}function oe(re){return o[re.getUTCMonth()]}function Q(re){return i[+(re.getUTCHours()>=12)]}function ue(re){return 1+~~(re.getUTCMonth()/3)}return{format:function(re){var te=E(re+="",w);return te.toString=function(){return re},te},parse:function(re){var te=A(re+="",!1);return te.toString=function(){return re},te},utcFormat:function(re){var te=E(re+="",S);return te.toString=function(){return re},te},utcParse:function(re){var te=A(re+="",!0);return te.toString=function(){return re},te}}}function Wr(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a[e.toLowerCase(),r]))}function Awe(t,e,r){var n=Oi.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function _we(t,e,r){var n=Oi.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function Lwe(t,e,r){var n=Oi.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function Rwe(t,e,r){var n=Oi.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function Iwe(t,e,r){var n=Oi.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function eH(t,e,r){var n=Oi.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function tH(t,e,r){var n=Oi.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Nwe(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Dwe(t,e,r){var n=Oi.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function Mwe(t,e,r){var n=Oi.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function rH(t,e,r){var n=Oi.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Owe(t,e,r){var n=Oi.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function nH(t,e,r){var n=Oi.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function Pwe(t,e,r){var n=Oi.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Bwe(t,e,r){var n=Oi.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Fwe(t,e,r){var n=Oi.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function $we(t,e,r){var n=Oi.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function zwe(t,e,r){var n=Ewe.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Gwe(t,e,r){var n=Oi.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Vwe(t,e,r){var n=Oi.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function iH(t,e){return Wr(t.getDate(),e,2)}function Uwe(t,e){return Wr(t.getHours(),e,2)}function qwe(t,e){return Wr(t.getHours()%12||12,e,2)}function Wwe(t,e){return Wr(1+wo.count(js(t),t),e,3)}function cH(t,e){return Wr(t.getMilliseconds(),e,3)}function Hwe(t,e){return cH(t,e)+"000"}function Ywe(t,e){return Wr(t.getMonth()+1,e,2)}function Xwe(t,e){return Wr(t.getMinutes(),e,2)}function jwe(t,e){return Wr(t.getSeconds(),e,2)}function Kwe(t){var e=t.getDay();return e===0?7:e}function Zwe(t,e){return Wr(hl.count(js(t)-1,t),e,2)}function uH(t){var e=t.getDay();return e>=4||e===0?rc(t):rc.ceil(t)}function Qwe(t,e){return t=uH(t),Wr(rc.count(js(t),t)+(js(t).getDay()===4),e,2)}function Jwe(t){return t.getDay()}function eTe(t,e){return Wr(wh.count(js(t)-1,t),e,2)}function tTe(t,e){return Wr(t.getFullYear()%100,e,2)}function rTe(t,e){return t=uH(t),Wr(t.getFullYear()%100,e,2)}function nTe(t,e){return Wr(t.getFullYear()%1e4,e,4)}function iTe(t,e){var r=t.getDay();return t=r>=4||r===0?rc(t):rc.ceil(t),Wr(t.getFullYear()%1e4,e,4)}function aTe(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Wr(e/60|0,"0",2)+Wr(e%60,"0",2)}function aH(t,e){return Wr(t.getUTCDate(),e,2)}function sTe(t,e){return Wr(t.getUTCHours(),e,2)}function oTe(t,e){return Wr(t.getUTCHours()%12||12,e,2)}function lTe(t,e){return Wr(1+Hv.count(fl(t),t),e,3)}function hH(t,e){return Wr(t.getUTCMilliseconds(),e,3)}function cTe(t,e){return hH(t,e)+"000"}function uTe(t,e){return Wr(t.getUTCMonth()+1,e,2)}function hTe(t,e){return Wr(t.getUTCMinutes(),e,2)}function fTe(t,e){return Wr(t.getUTCSeconds(),e,2)}function dTe(t){var e=t.getUTCDay();return e===0?7:e}function pTe(t,e){return Wr(bd.count(fl(t)-1,t),e,2)}function fH(t){var e=t.getUTCDay();return e>=4||e===0?Th(t):Th.ceil(t)}function gTe(t,e){return t=fH(t),Wr(Th.count(fl(t),t)+(fl(t).getUTCDay()===4),e,2)}function mTe(t){return t.getUTCDay()}function vTe(t,e){return Wr(Tp.count(fl(t)-1,t),e,2)}function yTe(t,e){return Wr(t.getUTCFullYear()%100,e,2)}function xTe(t,e){return t=fH(t),Wr(t.getUTCFullYear()%100,e,2)}function bTe(t,e){return Wr(t.getUTCFullYear()%1e4,e,4)}function wTe(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Th(t):Th.ceil(t),Wr(t.getUTCFullYear()%1e4,e,4)}function TTe(){return"+0000"}function sH(){return"%"}function oH(t){return+t}function lH(t){return Math.floor(+t/1e3)}var JW,Oi,Ewe,Swe,dH=F(()=>{Y3();JW={"-":"",_:" ",0:"0"},Oi=/^\s*\d+/,Ewe=/^%/,Swe=/[\\^$*+?|[\]().{}]/g});function QA(t){return kp=ZA(t),wd=kp.format,pH=kp.parse,gH=kp.utcFormat,mH=kp.utcParse,kp}var kp,wd,pH,gH,mH,vH=F(()=>{dH();QA({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"]})});var JA=F(()=>{vH()});function kTe(t){return new Date(t)}function ETe(t){return t instanceof Date?+t:+new Date(+t)}function yH(t,e,r,n,i,a,s,o,l,u){var h=qv(),f=h.invert,d=h.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),v=u("%I %p"),y=u("%a %d"),b=u("%b %d"),w=u("%B"),S=u("%Y");function T(E){return(l(E){Y3();JA();MA();Uv();zW()});var bH=F(()=>{MW();$W();RA();xH()});function wH(t){for(var e=t.length/6|0,r=new Array(e),n=0;n{});var e8,kH=F(()=>{TH();e8=wH("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var EH=F(()=>{kH()});function Fn(t){return function(){return t}}var j3=F(()=>{});function CH(t){return t>1?0:t<-1?Ep:Math.acos(t)}function r8(t){return t>=1?Kv:t<=-1?-Kv:Math.asin(t)}var t8,Qi,kh,SH,K3,dl,Td,Pi,Ep,Kv,Sp,Z3=F(()=>{t8=Math.abs,Qi=Math.atan2,kh=Math.cos,SH=Math.max,K3=Math.min,dl=Math.sin,Td=Math.sqrt,Pi=1e-12,Ep=Math.PI,Kv=Ep/2,Sp=2*Ep});function Q3(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new pd(e)}var n8=F(()=>{mA()});function STe(t){return t.innerRadius}function CTe(t){return t.outerRadius}function ATe(t){return t.startAngle}function _Te(t){return t.endAngle}function LTe(t){return t&&t.padAngle}function RTe(t,e,r,n,i,a,s,o){var l=r-t,u=n-e,h=s-i,f=o-a,d=f*l-h*u;if(!(d*d_*_+D*D&&(C=M,I=R),{cx:C,cy:I,x01:-h,y01:-f,x11:C*(i/T-1),y11:I*(i/T-1)}}function nc(){var t=STe,e=CTe,r=Fn(0),n=null,i=ATe,a=_Te,s=LTe,o=null,l=Q3(u);function u(){var h,f,d=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-Kv,m=a.apply(this,arguments)-Kv,v=t8(m-g),y=m>g;if(o||(o=h=l()),pPi))o.moveTo(0,0);else if(v>Sp-Pi)o.moveTo(p*kh(g),p*dl(g)),o.arc(0,0,p,g,m,!y),d>Pi&&(o.moveTo(d*kh(m),d*dl(m)),o.arc(0,0,d,m,g,y));else{var b=g,w=m,S=g,T=m,E=v,A=v,C=s.apply(this,arguments)/2,I=C>Pi&&(n?+n.apply(this,arguments):Td(d*d+p*p)),M=K3(t8(p-d)/2,+r.apply(this,arguments)),R=M,k=M,L,_;if(I>Pi){var D=r8(I/d*dl(C)),N=r8(I/p*dl(C));(E-=D*2)>Pi?(D*=y?1:-1,S+=D,T-=D):(E=0,S=T=(g+m)/2),(A-=N*2)>Pi?(N*=y?1:-1,b+=N,w-=N):(A=0,b=w=(g+m)/2)}var O=p*kh(b),P=p*dl(b),B=d*kh(T),G=d*dl(T);if(M>Pi){var $=p*kh(w),U=p*dl(w),X=d*kh(S),ee=d*dl(S),Y;if(vPi?k>Pi?(L=J3(X,ee,O,P,p,k,y),_=J3($,U,B,G,p,k,y),o.moveTo(L.cx+L.x01,L.cy+L.y01),kPi)||!(E>Pi)?o.lineTo(B,G):R>Pi?(L=J3(B,G,$,U,d,-R,y),_=J3(O,P,X,ee,d,-R,y),o.lineTo(L.cx+L.x01,L.cy+L.y01),R{j3();Z3();n8()});function e5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var Vft,i8=F(()=>{Vft=Array.prototype.slice});function _H(t){this._context=t}function Eh(t){return new _H(t)}var a8=F(()=>{_H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point: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);break}}}});function LH(t){return t[0]}function RH(t){return t[1]}var IH=F(()=>{});function ic(t,e){var r=Fn(!0),n=null,i=Eh,a=null,s=Q3(o);t=typeof t=="function"?t:t===void 0?LH:Fn(t),e=typeof e=="function"?e:e===void 0?RH:Fn(e);function o(l){var u,h=(l=e5(l)).length,f,d=!1,p;for(n==null&&(a=i(p=s())),u=0;u<=h;++u)!(u{i8();j3();a8();n8();IH()});function DH(t,e){return et?1:e>=t?0:NaN}var MH=F(()=>{});function OH(t){return t}var PH=F(()=>{});function s8(){var t=OH,e=DH,r=null,n=Fn(0),i=Fn(Sp),a=Fn(0);function s(o){var l,u=(o=e5(o)).length,h,f,d=0,p=new Array(u),g=new Array(u),m=+n.apply(this,arguments),v=Math.min(Sp,Math.max(-Sp,i.apply(this,arguments)-m)),y,b=Math.min(Math.abs(v)/u,a.apply(this,arguments)),w=b*(v<0?-1:1),S;for(l=0;l0&&(d+=S);for(e!=null?p.sort(function(T,E){return e(g[T],g[E])}):r!=null&&p.sort(function(T,E){return r(o[T],o[E])}),l=0,f=d?(v-u*w)/d:0;l0?S*f:0)+w,g[h]={data:o[h],index:l,value:S,startAngle:m,endAngle:y,padAngle:b};return g}return s.value=function(o){return arguments.length?(t=typeof o=="function"?o:Fn(+o),s):t},s.sortValues=function(o){return arguments.length?(e=o,r=null,s):e},s.sort=function(o){return arguments.length?(r=o,e=null,s):r},s.startAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Fn(+o),s):n},s.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Fn(+o),s):i},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Fn(+o),s):a},s}var BH=F(()=>{i8();j3();MH();PH();Z3()});function Zv(t){return new t5(t,!0)}function Qv(t){return new t5(t,!1)}var t5,FH=F(()=>{t5=class{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}});function To(){}var Jv=F(()=>{});function Cp(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 ey(t){this._context=t}function pl(t){return new ey(t)}var ty=F(()=>{ey.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Cp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point: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:Cp(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function $H(t){this._context=t}function o8(t){return new $H(t)}var zH=F(()=>{Jv();ty();$H.prototype={areaStart:To,areaEnd:To,lineStart: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},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point: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:Cp(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function GH(t){this._context=t}function l8(t){return new GH(t)}var VH=F(()=>{ty();GH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point: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:Cp(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function UH(t,e){this._basis=new ey(t),this._beta=e}var c8,qH=F(()=>{ty();UH.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],i=e[0],a=t[r]-n,s=e[r]-i,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(n+l*a),this._beta*e[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};c8=function t(e){function r(n){return e===1?new ey(n):new UH(n,e)}return r.beta=function(n){return t(+n)},r}(.85)});function Ap(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function r5(t,e){this._context=t,this._k=(1-e)/6}var ry,ny=F(()=>{r5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ap(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point: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:Ap(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};ry=function t(e){function r(n){return new r5(n,e)}return r.tension=function(n){return t(+n)},r}(0)});function n5(t,e){this._context=t,this._k=(1-e)/6}var u8,h8=F(()=>{Jv();ny();n5.prototype={areaStart:To,areaEnd:To,lineStart: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},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point: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:Ap(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};u8=function t(e){function r(n){return new n5(n,e)}return r.tension=function(n){return t(+n)},r}(0)});function i5(t,e){this._context=t,this._k=(1-e)/6}var f8,d8=F(()=>{ny();i5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point: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:Ap(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};f8=function t(e){function r(n){return new i5(n,e)}return r.tension=function(n){return t(+n)},r}(0)});function iy(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>Pi){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Pi){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*u+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2)}function WH(t,e){this._context=t,this._alpha=e}var ay,a5=F(()=>{Z3();ny();WH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart: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},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}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;default:iy(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};ay=function t(e){function r(n){return e?new WH(n,e):new r5(n,0)}return r.alpha=function(n){return t(+n)},r}(.5)});function HH(t,e){this._context=t,this._alpha=e}var p8,YH=F(()=>{h8();Jv();a5();HH.prototype={areaStart:To,areaEnd:To,lineStart: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},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(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:iy(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};p8=function t(e){function r(n){return e?new HH(n,e):new n5(n,0)}return r.alpha=function(n){return t(+n)},r}(.5)});function XH(t,e){this._context=t,this._alpha=e}var g8,jH=F(()=>{d8();a5();XH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart: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},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:iy(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};g8=function t(e){function r(n){return e?new XH(n,e):new i5(n,0)}return r.alpha=function(n){return t(+n)},r}(.5)});function KH(t){this._context=t}function m8(t){return new KH(t)}var ZH=F(()=>{Jv();KH.prototype={areaStart:To,areaEnd:To,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}}});function QH(t){return t<0?-1:1}function JH(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(QH(a)+QH(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function eY(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function v8(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-n)/3;t._context.bezierCurveTo(n+o,i+o*e,a-o,s-o*r,a,s)}function s5(t){this._context=t}function tY(t){this._context=new rY(t)}function rY(t){this._context=t}function sy(t){return new s5(t)}function oy(t){return new tY(t)}var nY=F(()=>{s5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:v8(this,this._t0,eY(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(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,v8(this,eY(this,r=JH(this,t,e)),r);break;default:v8(this,this._t0,r=JH(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};(tY.prototype=Object.create(s5.prototype)).point=function(t,e){s5.prototype.point.call(this,e,t)};rY.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}}});function aY(t){this._context=t}function iY(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e{aY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd: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]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=iY(t),i=iY(e),a=0,s=1;s{o5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},point: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:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}}});var lY=F(()=>{AH();NH();BH();zH();VH();ty();FH();qH();h8();d8();ny();YH();jH();a5();ZH();a8();nY();sY();oY()});var cY=F(()=>{});var uY=F(()=>{});function Sh(t,e,r){this.k=t,this.x=e,this.y=r}function x8(t){for(;!t.__zoom;)if(!(t=t.parentNode))return y8;return t.__zoom}var y8,b8=F(()=>{Sh.prototype={constructor:Sh,scale:function(t){return t===1?this:new Sh(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Sh(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};y8=new Sh(1,0,0);x8.prototype=Sh.prototype});var hY=F(()=>{});var fY=F(()=>{M3();cY();uY();b8();hY()});var dY=F(()=>{fY();b8()});var cr=F(()=>{gh();Vz();gq();xq();fp();bq();wq();L7();pV();Tq();fA();kq();Sq();AA();Wq();IW();pp();mA();NW();Eq();DW();bH();EH();ol();lY();Y3();JA();C3();M3();dY()});var Bi,ac=F(()=>{vr();rr();cr();Bi=x(t=>{let{securityLevel:e}=we(),r=He("body");if(e==="sandbox"){let a=He(`#i${t}`).node()?.contentDocument??document;r=He(a.body)}return r.select(`#${t}`)},"selectSvgElement")});function B8(t){return typeof t>"u"||t===null}function mY(t){return typeof t=="object"&&t!==null}function vY(t){return Array.isArray(t)?t:B8(t)?[]:[t]}function yY(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;ro&&(a=" ... ",e=n-o+a.length),r-n>o&&(s=" ...",r=n+o-s.length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+s,pos:n-e+a.length}}function c5(t,e){return Si.repeat(" ",e-t.length)+t}function wY(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],a,s=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var o="",l,u,h=Math.min(t.line+e.linesAfter,i.length).toString().length,f=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(s-l<0);l++)u=l5(t.buffer,n[s-l],i[s-l],t.position-(n[s]-n[s-l]),f),o=Si.repeat(" ",e.indent)+c5((t.line-l+1).toString(),h)+" | "+u.str+` `+o;for(u=l5(t.buffer,n[s],i[s],t.position,f),o+=Si.repeat(" ",e.indent)+c5((t.line+1).toString(),h)+" | "+u.str+` `,o+=Si.repeat("-",e.indent+h+3+u.pos)+`^ `,l=1;l<=e.linesAfter&&!(s+l>=i.length);l++)u=l5(t.buffer,n[s+l],i[s+l],t.position-(n[s]-n[s+l]),f),o+=Si.repeat(" ",e.indent)+c5((t.line+l+1).toString(),h)+" | "+u.str+` `;return o.replace(/\n$/,"")}function TY(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function kY(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(FTe.indexOf(r)===-1)throw new ks('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=TY(e.styleAliases||null),$Te.indexOf(this.kind)===-1)throw new ks('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function T8(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=s)}),r[i]=n}),r}function EY(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(x(n,"collectType"),e=0,r=arguments.length;e=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}function $Y(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Si.isNegativeZero(t))return"-0.0";return r=t.toString(10),jTe.test(r)?r.replace("e",".e"):r}function zY(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Si.isNegativeZero(t))}function qY(t){return t===null?!1:VY.exec(t)!==null||UY.exec(t)!==null}function WY(t){var e,r,n,i,a,s,o,l=0,u=null,h,f,d;if(e=VY.exec(t),e===null&&(e=UY.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],f=+(e[11]||0),u=(h*60+f)*6e4,e[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,i,a,s,o,l)),u&&d.setTime(d.getTime()-u),d}function HY(t){return t.toISOString()}function YY(t){return t==="<<"||t===null}function XY(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=$8;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}function jY(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=$8,s=0,o=[];for(e=0;e>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}function KY(t){var e="",r=0,n,i,a=t.length,s=$8;for(n=0;n>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):i===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):i===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}function ZY(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function QY(t){if(t===null)return!0;var e=[],r,n,i,a,s,o=t;for(r=0,n=o.length;r>10)+55296,(t-65536&1023)+56320)}function gX(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||iX,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 z8(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=BTe(r),new ks(e,r)}function Ut(t,e){throw z8(t,e)}function fy(t,e){t.onWarning&&t.onWarning.call(null,z8(t,e))}function xu(t,e,r,n){var i,a,s,o;if(e1&&(t.result+=Si.repeat(` `,e-1))}function mX(t,e,r){var n,i,a,s,o,l,u,h,f=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),Xa(p)||Ed(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=t.input.charCodeAt(t.position+1),Xa(i)||r&&Ed(i)))return!1;for(t.kind="scalar",t.result="",a=s=t.position,o=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),Xa(i)||r&&Ed(i))break}else if(p===35){if(n=t.input.charCodeAt(t.position-1),Xa(n))break}else{if(t.position===t.lineStart&&my(t)||r&&Ed(p))break;if(gl(p))if(l=t.line,u=t.lineStart,h=t.lineIndent,li(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=l,t.lineStart=u,t.lineIndent=h;break}}o&&(xu(t,a,s,!1),v5(t,t.line-l),a=s=t.position,o=!1),Ch(p)||(s=t.position+1),p=t.input.charCodeAt(++t.position)}return xu(t,a,s,!1),t.result?!0:(t.kind=f,t.result=d,!1)}function vX(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(xu(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else gl(r)?(xu(t,n,i,!0),v5(t,li(t,!1,e)),n=i=t.position):t.position===t.lineStart&&my(t)?Ut(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Ut(t,"unexpected end of the stream within a single quoted scalar")}function yX(t,e){var r,n,i,a,s,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return xu(t,r,t.position,!0),t.position++,!0;if(o===92){if(xu(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),gl(o))li(t,!1,e);else if(o<256&&dX[o])t.result+=pX[o],t.position++;else if((s=uX(o))>0){for(i=s,a=0;i>0;i--)o=t.input.charCodeAt(++t.position),(s=cX(o))>=0?a=(a<<4)+s:Ut(t,"expected hexadecimal character");t.result+=fX(a),t.position++}else Ut(t,"unknown escape sequence");r=n=t.position}else gl(o)?(xu(t,r,n,!0),v5(t,li(t,!1,e)),r=n=t.position):t.position===t.lineStart&&my(t)?Ut(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Ut(t,"unexpected end of the stream within a double quoted scalar")}function xX(t,e){var r=!0,n,i,a,s=t.tag,o,l=t.anchor,u,h,f,d,p,g=Object.create(null),m,v,y,b;if(b=t.input.charCodeAt(t.position),b===91)h=93,p=!1,o=[];else if(b===123)h=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),b=t.input.charCodeAt(++t.position);b!==0;){if(li(t,!0,e),b=t.input.charCodeAt(t.position),b===h)return t.position++,t.tag=s,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;r?b===44&&Ut(t,"expected the node content, but found ','"):Ut(t,"missed comma between flow collection entries"),v=m=y=null,f=d=!1,b===63&&(u=t.input.charCodeAt(t.position+1),Xa(u)&&(f=d=!0,t.position++,li(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,Cd(t,e,h5,!1,!0),v=t.tag,m=t.result,li(t,!0,e),b=t.input.charCodeAt(t.position),(d||t.line===n)&&b===58&&(f=!0,b=t.input.charCodeAt(++t.position),li(t,!0,e),Cd(t,e,h5,!1,!0),y=t.result),p?Sd(t,o,g,v,m,y,n,i,a):f?o.push(Sd(t,null,g,v,m,y,n,i,a)):o.push(m),li(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}Ut(t,"unexpected end of the stream within a flow collection")}function bX(t,e){var r,n,i=w8,a=!1,s=!1,o=e,l=0,u=!1,h,f;if(f=t.input.charCodeAt(t.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)w8===i?i=f===43?pY:lke:Ut(t,"repeat of a chomping mode identifier");else if((h=hX(f))>=0)h===0?Ut(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Ut(t,"repeat of an indentation width identifier"):(o=e+h-1,s=!0);else break;if(Ch(f)){do f=t.input.charCodeAt(++t.position);while(Ch(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!gl(f)&&f!==0)}for(;f!==0;){for(m5(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!s||t.lineIndento&&(o=t.lineIndent),gl(f)){l++;continue}if(t.lineIndente)&&l!==0)Ut(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(v&&(s=t.line,o=t.lineStart,l=t.position),Cd(t,e,f5,!0,i)&&(v?g=t.result:m=t.result),v||(Sd(t,f,d,p,g,m,s,o,l),p=g=m=null),li(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)Ut(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),f=0,d=t.implicitTypes.length;f"),t.result!==null&&g.kind!==t.kind&&Ut(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Ut(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}function SX(t){var e=t.position,r,n,i,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(li(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!Xa(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Ut(t,"directive name must not be less than one character in length");s!==0;){for(;Ch(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!gl(s));break}if(gl(s))break;for(r=t.position;s!==0&&!Xa(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}s!==0&&m5(t),Ah.call(gY,n)?gY[n](t,n,i):fy(t,'unknown document directive "'+n+'"')}if(li(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,li(t,!0,-1)):a&&Ut(t,"directives end mark is expected"),Cd(t,t.lineIndent-1,f5,!1,!0),li(t,!0,-1),t.checkLineBreaks&&uke.test(t.input.slice(e,t.position))&&fy(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&my(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,li(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=G8(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;i=55296&&r<=56319&&e+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function U8(t){var e=/^\n* /;return e.test(t)}function WX(t,e,r,n,i,a,s,o){var l,u=0,h=null,f=!1,d=!1,p=n!==-1,g=-1,m=zX(Lp(t,0))&&GX(Lp(t,t.length-1));if(e||s)for(l=0;l=65536?l+=2:l++){if(u=Lp(t,l),!Ip(u))return _p;m=m&&R8(u,h,o),h=u}else{for(l=0;l=65536?l+=2:l++){if(u=Lp(t,l),u===dy)f=!0,p&&(d=d||l-g-1>n&&t[g+1]!==" ",g=l);else if(!Ip(u))return _p;m=m&&R8(u,h,o),h=u}d=d||p&&l-g-1>n&&t[g+1]!==" "}return!f&&!d?m&&!s&&!i(t)?VX:a===py?_p:I8:r>9&&U8(t)?_p:s?a===py?_p:I8:d?qX:UX}function HX(t,e,r,n,i){t.dump=function(){if(e.length===0)return t.quotingType===py?'""':"''";if(!t.noCompatMode&&(Rke.indexOf(e)!==-1||Ike.test(e)))return t.quotingType===py?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),o=n||t.flowLevel>-1&&r>=t.flowLevel;function l(u){return $X(t,u)}switch(x(l,"testAmbiguity"),WX(e,o,t.indent,s,l,t.quotingType,t.forceQuotes&&!n,i)){case VX:return e;case I8:return"'"+e.replace(/'/g,"''")+"'";case UX:return"|"+N8(e,t.indent)+D8(_8(e,a));case qX:return">"+N8(e,t.indent)+D8(_8(YX(e,s),a));case _p:return'"'+XX(e)+'"';default:throw new ks("impossible error: invalid scalar style")}}()}function N8(t,e){var r=U8(t)?String(e):"",n=t[t.length-1]===` `,i=n&&(t[t.length-2]===` `||t===` `),a=i?"+":n?"":"-";return r+a+` `}function D8(t){return t[t.length-1]===` `?t.slice(0,-1):t}function YX(t,e){for(var r=/(\n+)([^\n]*)/g,n=function(){var u=t.indexOf(` `);return u=u!==-1?u:t.length,r.lastIndex=u,M8(t.slice(0,u),e)}(),i=t[0]===` `||t[0]===" ",a,s;s=r.exec(t);){var o=s[1],l=s[2];a=l[0]===" ",n+=o+(!i&&!a&&l!==""?` `:"")+M8(l,e),i=a}return n}function M8(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,a,s=0,o=0,l="";n=r.exec(t);)o=n.index,o-i>e&&(a=s>i?s:o,l+=` `+t.slice(i,a),i=a+1),s=o;return l+=` `,t.length-i>e&&s>i?l+=t.slice(i,s)+` `+t.slice(s+1):l+=t.slice(i),l.slice(1)}function XX(t){for(var e="",r=0,n,i=0;i=65536?i+=2:i++)r=Lp(t,i),n=ka[r],!n&&Ip(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||BX(r);return e}function jX(t,e,r){var n="",i=t.tag,a,s,o;for(a=0,s=r.length;a"u"&&sc(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function O8(t,e,r,n){var i="",a=t.tag,s,o,l;for(s=0,o=r.length;s"u"&&sc(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=p5(t,e)),t.dump&&dy===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=a,t.dump=i||"[]"}function KX(t,e,r){var n="",i=t.tag,a=Object.keys(r),s,o,l,u,h;for(s=0,o=a.length;s1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),sc(t,e,u,!1,!1)&&(h+=t.dump,n+=h));t.tag=i,t.dump="{"+n+"}"}function ZX(t,e,r,n){var i="",a=t.tag,s=Object.keys(r),o,l,u,h,f,d;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new ks("sortKeys must be a boolean or a function");for(o=0,l=s.length;o1024,f&&(t.dump&&dy===t.dump.charCodeAt(0)?d+="?":d+="? "),d+=t.dump,f&&(d+=p5(t,e)),sc(t,e+1,h,!0,f)&&(t.dump&&dy===t.dump.charCodeAt(0)?d+=":":d+=": ",d+=t.dump,i+=d));t.tag=a,t.dump=i||"{}"}function P8(t,e,r){var n,i,a,s,o,l;for(i=r?t.explicitTypes:t.implicitTypes,a=0,s=i.length;a tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}function sc(t,e,r,n,i,a,s){t.tag=null,t.dump=r,P8(t,r,!1)||P8(t,r,!0);var o=LX.call(t.dump),l=n,u;n&&(n=t.flowLevel<0||t.flowLevel>e);var h=o==="[object Object]"||o==="[object Array]",f,d;if(h&&(f=t.duplicates.indexOf(r),d=f!==-1),(t.tag!==null&&t.tag!=="?"||d||t.indent!==2&&e>0)&&(i=!1),d&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(h&&d&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),o==="[object Object]")n&&Object.keys(t.dump).length!==0?(ZX(t,e,t.dump,i),d&&(t.dump="&ref_"+f+t.dump)):(KX(t,e,t.dump),d&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?O8(t,e-1,t.dump,i):O8(t,e,t.dump,i),d&&(t.dump="&ref_"+f+t.dump)):(jX(t,e,t.dump),d&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&HX(t,t.dump,e,a,l);else{if(o==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new ks("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(u=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",t.dump=u+" "+t.dump)}return!0}function QX(t,e){var r=[],n=[],i,a;for(g5(t,r,n),i=0,a=n.length;i{rr();x(B8,"isNothing");x(mY,"isObject");x(vY,"toArray");x(yY,"extend");x(xY,"repeat");x(bY,"isNegativeZero");ITe=B8,NTe=mY,DTe=vY,MTe=xY,OTe=bY,PTe=yY,Si={isNothing:ITe,isObject:NTe,toArray:DTe,repeat:MTe,isNegativeZero:OTe,extend:PTe};x(F8,"formatError");x(Rp,"YAMLException$1");Rp.prototype=Object.create(Error.prototype);Rp.prototype.constructor=Rp;Rp.prototype.toString=x(function(e){return this.name+": "+F8(this,e)},"toString");ks=Rp;x(l5,"getLine");x(c5,"padStart");x(wY,"makeSnippet");BTe=wY,FTe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],$Te=["scalar","sequence","mapping"];x(TY,"compileStyleAliases");x(kY,"Type$1");Ta=kY;x(T8,"compileList");x(EY,"compileMap");x(u5,"Schema$1");u5.prototype.extend=x(function(e){var r=[],n=[];if(e instanceof Ta)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new ks("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Ta))throw new ks("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new ks("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new ks("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof Ta))throw new ks("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(u5.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=T8(i,"implicit"),i.compiledExplicit=T8(i,"explicit"),i.compiledTypeMap=EY(i.compiledImplicit,i.compiledExplicit),i},"extend");zTe=u5,GTe=new Ta("tag:yaml.org,2002:str",{kind:"scalar",construct:x(function(t){return t!==null?t:""},"construct")}),VTe=new Ta("tag:yaml.org,2002:seq",{kind:"sequence",construct:x(function(t){return t!==null?t:[]},"construct")}),UTe=new Ta("tag:yaml.org,2002:map",{kind:"mapping",construct:x(function(t){return t!==null?t:{}},"construct")}),qTe=new zTe({explicit:[GTe,VTe,UTe]});x(SY,"resolveYamlNull");x(CY,"constructYamlNull");x(AY,"isNull");WTe=new Ta("tag:yaml.org,2002:null",{kind:"scalar",resolve:SY,construct:CY,predicate:AY,represent:{canonical:x(function(){return"~"},"canonical"),lowercase:x(function(){return"null"},"lowercase"),uppercase:x(function(){return"NULL"},"uppercase"),camelcase:x(function(){return"Null"},"camelcase"),empty:x(function(){return""},"empty")},defaultStyle:"lowercase"});x(_Y,"resolveYamlBoolean");x(LY,"constructYamlBoolean");x(RY,"isBoolean");HTe=new Ta("tag:yaml.org,2002:bool",{kind:"scalar",resolve:_Y,construct:LY,predicate:RY,represent:{lowercase:x(function(t){return t?"true":"false"},"lowercase"),uppercase:x(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:x(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});x(IY,"isHexCode");x(NY,"isOctCode");x(DY,"isDecCode");x(MY,"resolveYamlInteger");x(OY,"constructYamlInteger");x(PY,"isInteger");YTe=new Ta("tag:yaml.org,2002:int",{kind:"scalar",resolve:MY,construct:OY,predicate:PY,represent:{binary:x(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:x(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:x(function(t){return t.toString(10)},"decimal"),hexadecimal:x(function(t){return t>=0?"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"]}}),XTe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");x(BY,"resolveYamlFloat");x(FY,"constructYamlFloat");jTe=/^[-+]?[0-9]+e/;x($Y,"representYamlFloat");x(zY,"isFloat");KTe=new Ta("tag:yaml.org,2002:float",{kind:"scalar",resolve:BY,construct:FY,predicate:zY,represent:$Y,defaultStyle:"lowercase"}),GY=qTe.extend({implicit:[WTe,HTe,YTe,KTe]}),ZTe=GY,VY=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),UY=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]))?))?$");x(qY,"resolveYamlTimestamp");x(WY,"constructYamlTimestamp");x(HY,"representYamlTimestamp");QTe=new Ta("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:qY,construct:WY,instanceOf:Date,represent:HY});x(YY,"resolveYamlMerge");JTe=new Ta("tag:yaml.org,2002:merge",{kind:"scalar",resolve:YY}),$8=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;x(XY,"resolveYamlBinary");x(jY,"constructYamlBinary");x(KY,"representYamlBinary");x(ZY,"isBinary");eke=new Ta("tag:yaml.org,2002:binary",{kind:"scalar",resolve:XY,construct:jY,predicate:ZY,represent:KY}),tke=Object.prototype.hasOwnProperty,rke=Object.prototype.toString;x(QY,"resolveYamlOmap");x(JY,"constructYamlOmap");nke=new Ta("tag:yaml.org,2002:omap",{kind:"sequence",resolve:QY,construct:JY}),ike=Object.prototype.toString;x(eX,"resolveYamlPairs");x(tX,"constructYamlPairs");ake=new Ta("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:eX,construct:tX}),ske=Object.prototype.hasOwnProperty;x(rX,"resolveYamlSet");x(nX,"constructYamlSet");oke=new Ta("tag:yaml.org,2002:set",{kind:"mapping",resolve:rX,construct:nX}),iX=ZTe.extend({implicit:[QTe,JTe],explicit:[eke,nke,ake,oke]}),Ah=Object.prototype.hasOwnProperty,h5=1,aX=2,sX=3,f5=4,w8=1,lke=2,pY=3,cke=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uke=/[\x85\u2028\u2029]/,hke=/[,\[\]\{\}]/,oX=/^(?:!|!!|![a-z\-]+!)$/i,lX=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;x(k8,"_class");x(gl,"is_EOL");x(Ch,"is_WHITE_SPACE");x(Xa,"is_WS_OR_EOL");x(Ed,"is_FLOW_INDICATOR");x(cX,"fromHexCode");x(uX,"escapedHexLen");x(hX,"fromDecimalCode");x(E8,"simpleEscapeSequence");x(fX,"charFromCodepoint");dX=new Array(256),pX=new Array(256);for(kd=0;kd<256;kd++)dX[kd]=E8(kd)?1:0,pX[kd]=E8(kd);x(gX,"State$1");x(z8,"generateError");x(Ut,"throwError");x(fy,"throwWarning");gY={YAML:x(function(e,r,n){var i,a,s;e.version!==null&&Ut(e,"duplication of %YAML directive"),n.length!==1&&Ut(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Ut(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&Ut(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&fy(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:x(function(e,r,n){var i,a;n.length!==2&&Ut(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],oX.test(i)||Ut(e,"ill-formed tag handle (first argument) of the TAG directive"),Ah.call(e.tagMap,i)&&Ut(e,'there is a previously declared suffix for "'+i+'" tag handle'),lX.test(a)||Ut(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Ut(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};x(xu,"captureSegment");x(S8,"mergeMappings");x(Sd,"storeMappingPair");x(m5,"readLineBreak");x(li,"skipSeparationSpace");x(my,"testDocumentSeparator");x(v5,"writeFoldedLines");x(mX,"readPlainScalar");x(vX,"readSingleQuotedScalar");x(yX,"readDoubleQuotedScalar");x(xX,"readFlowCollection");x(bX,"readBlockScalar");x(C8,"readBlockSequence");x(wX,"readBlockMapping");x(TX,"readTagProperty");x(kX,"readAnchorProperty");x(EX,"readAlias");x(Cd,"composeNode");x(SX,"readDocument");x(G8,"loadDocuments");x(CX,"loadAll$1");x(AX,"load$1");fke=CX,dke=AX,_X={loadAll:fke,load:dke},LX=Object.prototype.toString,RX=Object.prototype.hasOwnProperty,V8=65279,pke=9,dy=10,gke=13,mke=32,vke=33,yke=34,A8=35,xke=37,bke=38,wke=39,Tke=42,IX=44,kke=45,d5=58,Eke=61,Ske=62,Cke=63,Ake=64,NX=91,DX=93,_ke=96,MX=123,Lke=124,OX=125,ka={};ka[0]="\\0";ka[7]="\\a";ka[8]="\\b";ka[9]="\\t";ka[10]="\\n";ka[11]="\\v";ka[12]="\\f";ka[13]="\\r";ka[27]="\\e";ka[34]='\\"';ka[92]="\\\\";ka[133]="\\N";ka[160]="\\_";ka[8232]="\\L";ka[8233]="\\P";Rke=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ike=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;x(PX,"compileStyleMap");x(BX,"encodeHex");Nke=1,py=2;x(FX,"State");x(_8,"indentString");x(p5,"generateNextLine");x($X,"testImplicitResolving");x(gy,"isWhitespace");x(Ip,"isPrintable");x(L8,"isNsCharOrWhitespace");x(R8,"isPlainSafe");x(zX,"isPlainSafeFirst");x(GX,"isPlainSafeLast");x(Lp,"codePointAt");x(U8,"needIndentIndicator");VX=1,I8=2,UX=3,qX=4,_p=5;x(WX,"chooseScalarStyle");x(HX,"writeScalar");x(N8,"blockHeader");x(D8,"dropEndingNewline");x(YX,"foldString");x(M8,"foldLine");x(XX,"escapeString");x(jX,"writeFlowSequence");x(O8,"writeBlockSequence");x(KX,"writeFlowMapping");x(ZX,"writeBlockMapping");x(P8,"detectType");x(sc,"writeNode");x(QX,"getDuplicateReferences");x(g5,"inspectNode");x(JX,"dump$1");Dke=JX,Mke={dump:Dke};x(y5,"renamed");_h=GY,Lh=_X.load,npt=_X.loadAll,ipt=Mke.dump,apt=y5("safeLoad","load"),spt=y5("safeLoadAll","loadAll"),opt=y5("safeDump","dump");});function yy(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=$n(t),e=$n(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,o=a-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}var ko,$n,x5,Ks=F(()=>{rr();ko={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};x(yy,"calculateDeltaAndAngle");$n=x(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),x5=x(t=>({x:x(function(e,r,n){let i=0,a=$n(n[0]).x<$n(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(ko,t.arrowTypeStart)){let{angle:p,deltaX:g}=yy(n[0],n[1]);i=ko[t.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(ko,t.arrowTypeEnd)){let{angle:p,deltaX:g}=yy(n[n.length-1],n[n.length-2]);i=ko[t.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}let s=Math.abs($n(e).x-$n(n[n.length-1]).x),o=Math.abs($n(e).y-$n(n[n.length-1]).y),l=Math.abs($n(e).x-$n(n[0]).x),u=Math.abs($n(e).y-$n(n[0]).y),h=ko[t.arrowTypeStart],f=ko[t.arrowTypeEnd],d=1;if(s0&&o0&&u=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(ko,t.arrowTypeEnd)){let{angle:p,deltaY:g}=yy(n[n.length-1],n[n.length-2]);i=ko[t.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}let s=Math.abs($n(e).y-$n(n[n.length-1]).y),o=Math.abs($n(e).x-$n(n[n.length-1]).x),l=Math.abs($n(e).y-$n(n[0]).y),u=Math.abs($n(e).x-$n(n[0]).x),h=ko[t.arrowTypeStart],f=ko[t.arrowTypeEnd],d=1;if(s0&&o0&&u{rr();bu=x(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});var ej,Ad,Oke,xy,_t,Ot,Pke,Ka=F(()=>{vr();rr();ej=x(t=>{let{handDrawnSeed:e}=we();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),Ad=x(t=>{let e=Oke([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),Oke=x(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),xy=x(t=>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","isLabelStyle"),_t=x(t=>{let{stylesArray:e}=Ad(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let o=s[0];xy(o)?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&i.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),Ot=x((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=we(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=Ad(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Pke(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),Pke=x(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let i=isNaN(e[0])?0:e[0];return[i,i]}let r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n]},"getStrokeDashArray")});var tj=ba(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.BLANK_URL=Fi.relativeFirstCharacters=Fi.whitespaceEscapeCharsRegex=Fi.urlSchemeRegex=Fi.ctrlCharactersRegex=Fi.htmlCtrlEntityRegex=Fi.htmlEntitiesRegex=Fi.invalidProtocolRegex=void 0;Fi.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Fi.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Fi.htmlCtrlEntityRegex=/&(newline|tab);/gi;Fi.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Fi.urlSchemeRegex=/^.+(:|:)/gim;Fi.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Fi.relativeFirstCharacters=[".","/"];Fi.BLANK_URL="about:blank"});var Np=ba(b5=>{"use strict";Object.defineProperty(b5,"__esModule",{value:!0});b5.sanitizeUrl=void 0;var Ea=tj();function Bke(t){return Ea.relativeFirstCharacters.indexOf(t[0])>-1}function Fke(t){var e=t.replace(Ea.ctrlCharactersRegex,"");return e.replace(Ea.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}function $ke(t){return URL.canParse(t)}function rj(t){try{return decodeURIComponent(t)}catch{return t}}function zke(t){if(!t)return Ea.BLANK_URL;var e,r=rj(t.trim());do r=Fke(r).replace(Ea.htmlCtrlEntityRegex,"").replace(Ea.ctrlCharactersRegex,"").replace(Ea.whitespaceEscapeCharsRegex,"").trim(),r=rj(r),e=r.match(Ea.ctrlCharactersRegex)||r.match(Ea.htmlEntitiesRegex)||r.match(Ea.htmlCtrlEntityRegex)||r.match(Ea.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return Ea.BLANK_URL;if(Bke(n))return n;var i=n.trimStart(),a=i.match(Ea.urlSchemeRegex);if(!a)return n;var s=a[0].toLowerCase().trim();if(Ea.invalidProtocolRegex.test(s))return Ea.BLANK_URL;var o=i.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return o;if(s==="http:"||s==="https:"){if(!$ke(o))return Ea.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}b5.sanitizeUrl=zke});var Gke,w5,q8=F(()=>{Gke=typeof global=="object"&&global&&global.Object===Object&&global,w5=Gke});var Vke,Uke,ni,Eo=F(()=>{q8();Vke=typeof self=="object"&&self&&self.Object===Object&&self,Uke=w5||Vke||Function("return this")(),ni=Uke});var qke,$i,_d=F(()=>{Eo();qke=ni.Symbol,$i=qke});function Yke(t){var e=Wke.call(t,by),r=t[by];try{t[by]=void 0;var n=!0}catch{}var i=Hke.call(t);return n&&(e?t[by]=r:delete t[by]),i}var nj,Wke,Hke,by,ij,aj=F(()=>{_d();nj=Object.prototype,Wke=nj.hasOwnProperty,Hke=nj.toString,by=$i?$i.toStringTag:void 0;ij=Yke});function Kke(t){return jke.call(t)}var Xke,jke,sj,oj=F(()=>{Xke=Object.prototype,jke=Xke.toString;sj=Kke});function Jke(t){return t==null?t===void 0?Qke:Zke:lj&&lj in Object(t)?ij(t):sj(t)}var Zke,Qke,lj,Ji,wu=F(()=>{_d();aj();oj();Zke="[object Null]",Qke="[object Undefined]",lj=$i?$i.toStringTag:void 0;Ji=Jke});function e6e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var bn,Zs=F(()=>{bn=e6e});function a6e(t){if(!bn(t))return!1;var e=Ji(t);return e==r6e||e==n6e||e==t6e||e==i6e}var t6e,r6e,n6e,i6e,gi,wy=F(()=>{wu();Zs();t6e="[object AsyncFunction]",r6e="[object Function]",n6e="[object GeneratorFunction]",i6e="[object Proxy]";gi=a6e});var s6e,T5,cj=F(()=>{Eo();s6e=ni["__core-js_shared__"],T5=s6e});function o6e(t){return!!uj&&uj in t}var uj,hj,fj=F(()=>{cj();uj=function(){var t=/[^.]+$/.exec(T5&&T5.keys&&T5.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();hj=o6e});function u6e(t){if(t!=null){try{return c6e.call(t)}catch{}try{return t+""}catch{}}return""}var l6e,c6e,Tu,W8=F(()=>{l6e=Function.prototype,c6e=l6e.toString;Tu=u6e});function y6e(t){if(!bn(t)||hj(t))return!1;var e=gi(t)?v6e:f6e;return e.test(Tu(t))}var h6e,f6e,d6e,p6e,g6e,m6e,v6e,dj,pj=F(()=>{wy();fj();Zs();W8();h6e=/[\\^$.*+?()[\]{}|]/g,f6e=/^\[object .+?Constructor\]$/,d6e=Function.prototype,p6e=Object.prototype,g6e=d6e.toString,m6e=p6e.hasOwnProperty,v6e=RegExp("^"+g6e.call(m6e).replace(h6e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");dj=y6e});function x6e(t,e){return t?.[e]}var gj,mj=F(()=>{gj=x6e});function b6e(t,e){var r=gj(t,e);return dj(r)?r:void 0}var Es,Rh=F(()=>{pj();mj();Es=b6e});var w6e,ku,Ty=F(()=>{Rh();w6e=Es(Object,"create"),ku=w6e});function T6e(){this.__data__=ku?ku(null):{},this.size=0}var vj,yj=F(()=>{Ty();vj=T6e});function k6e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var xj,bj=F(()=>{xj=k6e});function A6e(t){var e=this.__data__;if(ku){var r=e[t];return r===E6e?void 0:r}return C6e.call(e,t)?e[t]:void 0}var E6e,S6e,C6e,wj,Tj=F(()=>{Ty();E6e="__lodash_hash_undefined__",S6e=Object.prototype,C6e=S6e.hasOwnProperty;wj=A6e});function R6e(t){var e=this.__data__;return ku?e[t]!==void 0:L6e.call(e,t)}var _6e,L6e,kj,Ej=F(()=>{Ty();_6e=Object.prototype,L6e=_6e.hasOwnProperty;kj=R6e});function N6e(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ku&&e===void 0?I6e:e,this}var I6e,Sj,Cj=F(()=>{Ty();I6e="__lodash_hash_undefined__";Sj=N6e});function Dp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{yj();bj();Tj();Ej();Cj();Dp.prototype.clear=vj;Dp.prototype.delete=xj;Dp.prototype.get=wj;Dp.prototype.has=kj;Dp.prototype.set=Sj;H8=Dp});function D6e(){this.__data__=[],this.size=0}var _j,Lj=F(()=>{_j=D6e});function M6e(t,e){return t===e||t!==t&&e!==e}var So,Ld=F(()=>{So=M6e});function O6e(t,e){for(var r=t.length;r--;)if(So(t[r][0],e))return r;return-1}var Ih,ky=F(()=>{Ld();Ih=O6e});function F6e(t){var e=this.__data__,r=Ih(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():B6e.call(e,r,1),--this.size,!0}var P6e,B6e,Rj,Ij=F(()=>{ky();P6e=Array.prototype,B6e=P6e.splice;Rj=F6e});function $6e(t){var e=this.__data__,r=Ih(e,t);return r<0?void 0:e[r][1]}var Nj,Dj=F(()=>{ky();Nj=$6e});function z6e(t){return Ih(this.__data__,t)>-1}var Mj,Oj=F(()=>{ky();Mj=z6e});function G6e(t,e){var r=this.__data__,n=Ih(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Pj,Bj=F(()=>{ky();Pj=G6e});function Mp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{Lj();Ij();Dj();Oj();Bj();Mp.prototype.clear=_j;Mp.prototype.delete=Rj;Mp.prototype.get=Nj;Mp.prototype.has=Mj;Mp.prototype.set=Pj;Nh=Mp});var V6e,Dh,k5=F(()=>{Rh();Eo();V6e=Es(ni,"Map"),Dh=V6e});function U6e(){this.size=0,this.__data__={hash:new H8,map:new(Dh||Nh),string:new H8}}var Fj,$j=F(()=>{Aj();Ey();k5();Fj=U6e});function q6e(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var zj,Gj=F(()=>{zj=q6e});function W6e(t,e){var r=t.__data__;return zj(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Mh,Sy=F(()=>{Gj();Mh=W6e});function H6e(t){var e=Mh(this,t).delete(t);return this.size-=e?1:0,e}var Vj,Uj=F(()=>{Sy();Vj=H6e});function Y6e(t){return Mh(this,t).get(t)}var qj,Wj=F(()=>{Sy();qj=Y6e});function X6e(t){return Mh(this,t).has(t)}var Hj,Yj=F(()=>{Sy();Hj=X6e});function j6e(t,e){var r=Mh(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var Xj,jj=F(()=>{Sy();Xj=j6e});function Op(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{$j();Uj();Wj();Yj();jj();Op.prototype.clear=Fj;Op.prototype.delete=Vj;Op.prototype.get=qj;Op.prototype.has=Hj;Op.prototype.set=Xj;Rd=Op});function Y8(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(K6e);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(Y8.Cache||Rd),r}var K6e,Pp,X8=F(()=>{E5();K6e="Expected a function";Y8.Cache=Rd;Pp=Y8});function Z6e(){this.__data__=new Nh,this.size=0}var Kj,Zj=F(()=>{Ey();Kj=Z6e});function Q6e(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var Qj,Jj=F(()=>{Qj=Q6e});function J6e(t){return this.__data__.get(t)}var eK,tK=F(()=>{eK=J6e});function eEe(t){return this.__data__.has(t)}var rK,nK=F(()=>{rK=eEe});function rEe(t,e){var r=this.__data__;if(r instanceof Nh){var n=r.__data__;if(!Dh||n.length{Ey();k5();E5();tEe=200;iK=rEe});function Bp(t){var e=this.__data__=new Nh(t);this.size=e.size}var oc,Cy=F(()=>{Ey();Zj();Jj();tK();nK();aK();Bp.prototype.clear=Kj;Bp.prototype.delete=Qj;Bp.prototype.get=eK;Bp.prototype.has=rK;Bp.prototype.set=iK;oc=Bp});var nEe,Fp,j8=F(()=>{Rh();nEe=function(){try{var t=Es(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Fp=nEe});function iEe(t,e,r){e=="__proto__"&&Fp?Fp(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var lc,$p=F(()=>{j8();lc=iEe});function aEe(t,e,r){(r!==void 0&&!So(t[e],r)||r===void 0&&!(e in t))&&lc(t,e,r)}var Ay,K8=F(()=>{$p();Ld();Ay=aEe});function sEe(t){return function(e,r,n){for(var i=-1,a=Object(e),s=n(e),o=s.length;o--;){var l=s[t?o:++i];if(r(a[l],l,a)===!1)break}return e}}var sK,oK=F(()=>{sK=sEe});var oEe,zp,S5=F(()=>{oK();oEe=sK(),zp=oEe});function cEe(t,e){if(e)return t.slice();var r=t.length,n=uK?uK(r):new t.constructor(r);return t.copy(n),n}var hK,lK,lEe,cK,uK,C5,Z8=F(()=>{Eo();hK=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lK=hK&&typeof module=="object"&&module&&!module.nodeType&&module,lEe=lK&&lK.exports===hK,cK=lEe?ni.Buffer:void 0,uK=cK?cK.allocUnsafe:void 0;C5=cEe});var uEe,Gp,Q8=F(()=>{Eo();uEe=ni.Uint8Array,Gp=uEe});function hEe(t){var e=new t.constructor(t.byteLength);return new Gp(e).set(new Gp(t)),e}var Vp,A5=F(()=>{Q8();Vp=hEe});function fEe(t,e){var r=e?Vp(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var _5,J8=F(()=>{A5();_5=fEe});function dEe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r{L5=dEe});var fK,pEe,dK,pK=F(()=>{Zs();fK=Object.create,pEe=function(){function t(){}return function(e){if(!bn(e))return{};if(fK)return fK(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),dK=pEe});function gEe(t,e){return function(r){return t(e(r))}}var R5,t_=F(()=>{R5=gEe});var mEe,Up,I5=F(()=>{t_();mEe=R5(Object.getPrototypeOf,Object),Up=mEe});function yEe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||vEe;return t===r}var vEe,cc,qp=F(()=>{vEe=Object.prototype;cc=yEe});function xEe(t){return typeof t.constructor=="function"&&!cc(t)?dK(Up(t)):{}}var N5,r_=F(()=>{pK();I5();qp();N5=xEe});function bEe(t){return t!=null&&typeof t=="object"}var Zn,Co=F(()=>{Zn=bEe});function TEe(t){return Zn(t)&&Ji(t)==wEe}var wEe,n_,gK=F(()=>{wu();Co();wEe="[object Arguments]";n_=TEe});var mK,kEe,EEe,SEe,ml,Wp=F(()=>{gK();Co();mK=Object.prototype,kEe=mK.hasOwnProperty,EEe=mK.propertyIsEnumerable,SEe=n_(function(){return arguments}())?n_:function(t){return Zn(t)&&kEe.call(t,"callee")&&!EEe.call(t,"callee")},ml=SEe});var CEe,It,zn=F(()=>{CEe=Array.isArray,It=CEe});function _Ee(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=AEe}var AEe,Hp,D5=F(()=>{AEe=9007199254740991;Hp=_Ee});function LEe(t){return t!=null&&Hp(t.length)&&!gi(t)}var ii,Ao=F(()=>{wy();D5();ii=LEe});function REe(t){return Zn(t)&&ii(t)}var Id,M5=F(()=>{Ao();Co();Id=REe});function IEe(){return!1}var vK,yK=F(()=>{vK=IEe});var wK,xK,NEe,bK,DEe,MEe,vl,Yp=F(()=>{Eo();yK();wK=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xK=wK&&typeof module=="object"&&module&&!module.nodeType&&module,NEe=xK&&xK.exports===wK,bK=NEe?ni.Buffer:void 0,DEe=bK?bK.isBuffer:void 0,MEe=DEe||vK,vl=MEe});function zEe(t){if(!Zn(t)||Ji(t)!=OEe)return!1;var e=Up(t);if(e===null)return!0;var r=FEe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&TK.call(r)==$Ee}var OEe,PEe,BEe,TK,FEe,$Ee,kK,EK=F(()=>{wu();I5();Co();OEe="[object Object]",PEe=Function.prototype,BEe=Object.prototype,TK=PEe.toString,FEe=BEe.hasOwnProperty,$Ee=TK.call(Object);kK=zEe});function hSe(t){return Zn(t)&&Hp(t.length)&&!!Mn[Ji(t)]}var GEe,VEe,UEe,qEe,WEe,HEe,YEe,XEe,jEe,KEe,ZEe,QEe,JEe,eSe,tSe,rSe,nSe,iSe,aSe,sSe,oSe,lSe,cSe,uSe,Mn,SK,CK=F(()=>{wu();D5();Co();GEe="[object Arguments]",VEe="[object Array]",UEe="[object Boolean]",qEe="[object Date]",WEe="[object Error]",HEe="[object Function]",YEe="[object Map]",XEe="[object Number]",jEe="[object Object]",KEe="[object RegExp]",ZEe="[object Set]",QEe="[object String]",JEe="[object WeakMap]",eSe="[object ArrayBuffer]",tSe="[object DataView]",rSe="[object Float32Array]",nSe="[object Float64Array]",iSe="[object Int8Array]",aSe="[object Int16Array]",sSe="[object Int32Array]",oSe="[object Uint8Array]",lSe="[object Uint8ClampedArray]",cSe="[object Uint16Array]",uSe="[object Uint32Array]",Mn={};Mn[rSe]=Mn[nSe]=Mn[iSe]=Mn[aSe]=Mn[sSe]=Mn[oSe]=Mn[lSe]=Mn[cSe]=Mn[uSe]=!0;Mn[GEe]=Mn[VEe]=Mn[eSe]=Mn[UEe]=Mn[tSe]=Mn[qEe]=Mn[WEe]=Mn[HEe]=Mn[YEe]=Mn[XEe]=Mn[jEe]=Mn[KEe]=Mn[ZEe]=Mn[QEe]=Mn[JEe]=!1;SK=hSe});function fSe(t){return function(e){return t(e)}}var _o,Nd=F(()=>{_o=fSe});var AK,_y,dSe,i_,pSe,Lo,Ly=F(()=>{q8();AK=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_y=AK&&typeof module=="object"&&module&&!module.nodeType&&module,dSe=_y&&_y.exports===AK,i_=dSe&&w5.process,pSe=function(){try{var t=_y&&_y.require&&_y.require("util").types;return t||i_&&i_.binding&&i_.binding("util")}catch{}}(),Lo=pSe});var _K,gSe,Oh,Ry=F(()=>{CK();Nd();Ly();_K=Lo&&Lo.isTypedArray,gSe=_K?_o(_K):SK,Oh=gSe});function mSe(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Iy,a_=F(()=>{Iy=mSe});function xSe(t,e,r){var n=t[e];(!(ySe.call(t,e)&&So(n,r))||r===void 0&&!(e in t))&&lc(t,e,r)}var vSe,ySe,uc,Xp=F(()=>{$p();Ld();vSe=Object.prototype,ySe=vSe.hasOwnProperty;uc=xSe});function bSe(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a{Xp();$p();Ro=bSe});function wSe(t,e){for(var r=-1,n=Array(t);++r{LK=wSe});function ESe(t,e){var r=typeof t;return e=e??TSe,!!e&&(r=="number"||r!="symbol"&&kSe.test(t))&&t>-1&&t%1==0&&t{TSe=9007199254740991,kSe=/^(?:0|[1-9]\d*)$/;Ph=ESe});function ASe(t,e){var r=It(t),n=!r&&ml(t),i=!r&&!n&&vl(t),a=!r&&!n&&!i&&Oh(t),s=r||n||i||a,o=s?LK(t.length,String):[],l=o.length;for(var u in t)(e||CSe.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ph(u,l)))&&o.push(u);return o}var SSe,CSe,O5,s_=F(()=>{RK();Wp();zn();Yp();Ny();Ry();SSe=Object.prototype,CSe=SSe.hasOwnProperty;O5=ASe});function _Se(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var IK,NK=F(()=>{IK=_Se});function ISe(t){if(!bn(t))return IK(t);var e=cc(t),r=[];for(var n in t)n=="constructor"&&(e||!RSe.call(t,n))||r.push(n);return r}var LSe,RSe,DK,MK=F(()=>{Zs();qp();NK();LSe=Object.prototype,RSe=LSe.hasOwnProperty;DK=ISe});function NSe(t){return ii(t)?O5(t,!0):DK(t)}var Ss,Bh=F(()=>{s_();MK();Ao();Ss=NSe});function DSe(t){return Ro(t,Ss(t))}var OK,PK=F(()=>{Dd();Bh();OK=DSe});function MSe(t,e,r,n,i,a,s){var o=Iy(t,r),l=Iy(e,r),u=s.get(l);if(u){Ay(t,r,u);return}var h=a?a(o,l,r+"",t,e,s):void 0,f=h===void 0;if(f){var d=It(l),p=!d&&vl(l),g=!d&&!p&&Oh(l);h=l,d||p||g?It(o)?h=o:Id(o)?h=L5(o):p?(f=!1,h=C5(l,!0)):g?(f=!1,h=_5(l,!0)):h=[]:kK(l)||ml(l)?(h=o,ml(o)?h=OK(o):(!bn(o)||gi(o))&&(h=N5(l))):f=!1}f&&(s.set(l,h),i(h,l,n,a,s),s.delete(l)),Ay(t,r,h)}var BK,FK=F(()=>{K8();Z8();J8();e_();r_();Wp();zn();M5();Yp();wy();Zs();EK();Ry();a_();PK();BK=MSe});function $K(t,e,r,n,i){t!==e&&zp(e,function(a,s){if(i||(i=new oc),bn(a))BK(t,e,s,r,$K,n,i);else{var o=n?n(Iy(t,s),a,s+"",t,e,i):void 0;o===void 0&&(o=a),Ay(t,s,o)}},Ss)}var zK,GK=F(()=>{Cy();K8();S5();FK();Zs();Bh();a_();zK=$K});function OSe(t){return t}var zi,Eu=F(()=>{zi=OSe});function PSe(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 VK,UK=F(()=>{VK=PSe});function BSe(t,e,r){return e=qK(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=qK(n.length-e,0),s=Array(a);++i{UK();qK=Math.max;P5=BSe});function FSe(t){return function(){return t}}var Cs,l_=F(()=>{Cs=FSe});var $Se,WK,HK=F(()=>{l_();j8();Eu();$Se=Fp?function(t,e){return Fp(t,"toString",{configurable:!0,enumerable:!1,value:Cs(e),writable:!0})}:zi,WK=$Se});function USe(t){var e=0,r=0;return function(){var n=VSe(),i=GSe-(n-r);if(r=n,i>0){if(++e>=zSe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var zSe,GSe,VSe,YK,XK=F(()=>{zSe=800,GSe=16,VSe=Date.now;YK=USe});var qSe,B5,c_=F(()=>{HK();XK();qSe=YK(WK),B5=qSe});function WSe(t,e){return B5(P5(t,e,zi),t+"")}var hc,jp=F(()=>{Eu();o_();c_();hc=WSe});function HSe(t,e,r){if(!bn(r))return!1;var n=typeof e;return(n=="number"?ii(r)&&Ph(e,r.length):n=="string"&&e in r)?So(r[e],t):!1}var Qs,Md=F(()=>{Ld();Ao();Ny();Zs();Qs=HSe});function YSe(t){return hc(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&Qs(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n{jp();Md();F5=YSe});var XSe,Fh,h_=F(()=>{GK();u_();XSe=F5(function(t,e,r){zK(t,e,r)}),Fh=XSe});function z5(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return jSe[r]??e}function eZ(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,ZK.sanitizeUrl)(r):r}function d_(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function tZ(t){let e,r=0;t.forEach(i=>{r+=d_(i,e),e=i});let n=r/2;return p_(t,n)}function rZ(t){return t.length===1?t[0]:tZ(t)}function nZ(t,e,r){let n=structuredClone(r);J.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();let i=25+t,a=p_(n,i),s=10+t*.5,o=Math.atan2(n[0].y-a.y,n[0].x-a.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(n[0].y+a.y)/2):e==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(n[0].y+a.y)/2-5):e==="end_left"?(l.x=Math.sin(o)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2),l}function G5(t){let e="",r="";for(let n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function iZ(t){let e="",r="0123456789abcdef",n=r.length;for(let i=0;iMath.round(parseFloat(a)).toString());return i.includes(r.toString())||i.includes(n.toString())}var ZK,f_,jSe,KSe,ZSe,QK,JK,QSe,JSe,jK,p_,eCe,KK,g_,m_,tCe,rCe,v_,nCe,y_,iCe,$5,aCe,sCe,fc,zt,aZ,As,$h,hn=F(()=>{vr();rr();ZK=Fa(Np(),1);cr();X8();h_();f_="\u200B",jSe={curveBasis:pl,curveBasisClosed:o8,curveBasisOpen:l8,curveBumpX:Zv,curveBumpY:Qv,curveBundle:c8,curveCardinalClosed:u8,curveCardinalOpen:f8,curveCardinal:ry,curveCatmullRomClosed:p8,curveCatmullRomOpen:g8,curveCatmullRom:ay,curveLinear:Eh,curveLinearClosed:m8,curveMonotoneX:sy,curveMonotoneY:oy,curveNatural:ly,curveStep:cy,curveStepAfter:hy,curveStepBefore:uy},KSe=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ZSe=x(function(t,e){let r=QK(t,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let s=r.map(o=>o.args);mv(s),n=Nn(n,[...s])}else n=r.args;if(!n)return;let i=vv(t,e),a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),QK=x(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${KSe.source})(?=[}][%]{2}).* `,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),J.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n,i=[];for(;(n=ip.exec(t))!==null;)if(n.index===ip.lastIndex&&ip.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){let a=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:s})}return i.length===0?{type:t,args:null}:i.length===1?i[0]:i}catch(r){return J.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),JK=x(function(t){return t.replace(ip,"")},"removeDirectives"),QSe=x(function(t,e){for(let[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");x(z5,"interpolateToCurve");x(eZ,"formatUrl");JSe=x((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let s=0;s{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),p_=x((t,e)=>{let r,n=e;for(let i of t){if(r){let a=d_(i,r);if(a===0)return r;if(a=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:jK((1-s)*r.x+s*i.x,5),y:jK((1-s)*r.y+s*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),eCe=x((t,e,r)=>{J.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=p_(e,25),a=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(e[0].x+i.x)/2,o.y=-Math.cos(s)*a+(e[0].y+i.y)/2,o},"calcCardinalityPosition");x(nZ,"calcTerminalLabelPosition");x(G5,"getStylesFromArray");KK=0,g_=x(()=>(KK++,"id-"+Math.random().toString(36).substr(2,12)+"-"+KK),"generateId");x(iZ,"makeRandomHex");m_=x(t=>iZ(t.length),"random"),tCe=x(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"),rCe=x(function(t,e){let r=e.text.replace(Je.lineBreakRegex," "),[,n]=fc(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);let a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},"drawSimpleText"),v_=Pp((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),Je.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((s,o)=>{let l=ea(`${s} `,r),u=ea(a,r);if(l>e){let{hyphenatedStrings:d,remainingWord:p}=nCe(s,e,"-",r);i.push(a,...d),a=p}else u+l>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),nCe=Pp((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],s="";return i.forEach((o,l)=>{let u=`${s}${o}`;if(ea(u,n)>=e){let f=l+1,d=i.length===f,p=`${u}${r}`;a.push(d?u:p),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);x(Dy,"calculateTextHeight");x(ea,"calculateTextWidth");y_=Pp((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=fc(r),s=["sans-serif",n],o=t.split(Je.lineBreakRegex),l=[],u=He("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let h=u.append("svg");for(let d of s){let p=0,g={width:0,height:0,lineHeight:0};for(let m of o){let v=tCe();v.text=m||f_;let y=rCe(h,v).style("font-size",a).style("font-weight",i).style("font-family",d),b=(y._groups||y)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}h.remove();let f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),iCe=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{x(this,"InitIDGenerator")}},aCe=x(function(t){return $5=$5||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$5.innerHTML=t,unescape($5.textContent)},"entityDecode");x(V5,"isDetailedError");sCe=x((t,e,r,n)=>{if(!n)return;let i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),fc=x(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");x(Qn,"cleanAndMerge");zt={assignWithDepth:Nn,wrapLabel:v_,calculateTextHeight:Dy,calculateTextWidth:ea,calculateTextDimensions:y_,cleanAndMerge:Qn,detectInit:ZSe,detectDirective:QK,isSubstringInArray:QSe,interpolateToCurve:z5,calcLabelPosition:rZ,calcCardinalityPosition:eCe,calcTerminalLabelPosition:nZ,formatUrl:eZ,getStylesFromArray:G5,generateId:g_,random:m_,runFunc:JSe,entityDecode:aCe,insertTitle:sCe,isLabelCoordinateInPath:sZ,parseFontSize:fc,InitIDGenerator:iCe},aZ=x(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},"encodeEntities"),As=x(function(t){return t.replace(/๏ฌ‚ยฐยฐ/g,"&#").replace(/๏ฌ‚ยฐ/g,"&").replace(/ยถรŸ/g,";")},"decodeEntities"),$h=x((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");x(ta,"handleUndefinedAttr");x(sZ,"isLabelCoordinateInPath")});var oCe,Kp,x_,oZ,U5=F(()=>{oCe=Object.freeze({left:0,top:0,width:16,height:16}),Kp=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),x_=Object.freeze({...oCe,...Kp}),oZ=Object.freeze({...x_,body:"",hidden:!1})});var lCe,lZ,cZ=F(()=>{U5();lCe=Object.freeze({width:null,height:null}),lZ=Object.freeze({...lCe,...Kp})});var b_,q5,uZ=F(()=>{b_=(t,e,r,n="")=>{let i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let o=i.pop(),l=i.pop(),u={provider:i.length>0?i[0]:n,prefix:l,name:o};return e&&!q5(u)?null:u}let a=i[0],s=a.split("-");if(s.length>1){let o={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!q5(o)?null:o}if(r&&n===""){let o={provider:n,prefix:"",name:a};return e&&!q5(o,r)?null:o}return null},q5=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1});function hZ(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}var fZ=F(()=>{});function w_(t,e){let r=hZ(t,e);for(let n in oZ)n in Kp?n in t&&!(n in r)&&(r[n]=Kp[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}var dZ=F(()=>{U5();fZ()});function pZ(t,e){let r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);function a(s){if(r[s])return i[s]=[];if(!(s in i)){i[s]=null;let o=n[s]&&n[s].parent,l=o&&a(o);l&&(i[s]=[o].concat(l))}return i[s]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(a),i}var gZ=F(()=>{});function mZ(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function s(o){a=w_(n[o]||i[o],a)}return s(e),r.forEach(s),w_(t,a)}function T_(t,e){if(t.icons[e])return mZ(t,e,[]);let r=pZ(t,[e])[e];return r?mZ(t,e,r):null}var vZ=F(()=>{dZ();gZ()});function k_(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;let n=t.split(cCe);if(n===null||!n.length)return t;let i=[],a=n.shift(),s=uCe.test(a);for(;;){if(s){let o=parseFloat(a);isNaN(o)?i.push(a):i.push(Math.ceil(o*e*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");s=!s}}var cCe,uCe,yZ=F(()=>{cCe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uCe=/^-?[0-9.]*[0-9]+[0-9.]*$/g});function hCe(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;n>=0;){let i=t.indexOf(">",n),a=t.indexOf("",a);if(s===-1)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function fCe(t,e){return t?""+t+""+e:e}function xZ(t,e,r){let n=hCe(t);return fCe(n.defs,e+n.content+r)}var bZ=F(()=>{});function E_(t,e){let r={...x_,...t},n={...lZ,...e},i={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,n].forEach(m=>{let v=[],y=m.hFlip,b=m.vFlip,w=m.rotate;y?b?w+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):b&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=i.height/2+i.top,v.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:S=i.width/2+i.left,v.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(i.left!==i.top&&(S=i.left,i.left=i.top,i.top=S),i.width!==i.height&&(S=i.width,i.width=i.height,i.height=S)),v.length&&(a=xZ(a,'',""))});let s=n.width,o=n.height,l=i.width,u=i.height,h,f;s===null?(f=o===null?"1em":o==="auto"?u:o,h=k_(f,l/u)):(h=s==="auto"?l:s,f=o===null?k_(h,u/l):o==="auto"?u:o);let d={},p=(m,v)=>{dCe(v)||(d[m]=v.toString())};p("width",h),p("height",f);let g=[i.left,i.top,l,u];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}var dCe,wZ=F(()=>{U5();cZ();yZ();bZ();dCe=t=>t==="unset"||t==="undefined"||t==="none"});function S_(t,e=gCe){let r=[],n;for(;n=pCe.exec(t);)r.push(n[1]);if(!r.length)return t;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{let s=typeof e=="function"?e(a):e+(mCe++).toString(),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}var pCe,gCe,mCe,TZ=F(()=>{pCe=/\sid="(\S+)"/g,gCe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),mCe=0});function C_(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in e)r+=" "+n+'="'+e[n]+'"';return'"+t+""}var kZ=F(()=>{});var EZ=F(()=>{uZ();vZ();wZ();TZ();kZ()});function R_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function RZ(t){Pd=t}function en(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Za.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}function dc(t,e){if(e){if(Za.escapeTest.test(t))return t.replace(Za.escapeReplace,CZ)}else if(Za.escapeTestNoEncode.test(t))return t.replace(Za.escapeReplaceNoEncode,CZ);return t}function AZ(t){try{t=encodeURI(t).replace(Za.percentDecode,"%")}catch{return null}return t}function _Z(t,e){let r=t.replace(Za.findPipe,(a,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),n=r.split(Za.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length0?-2:-1}function LZ(t,e,r,n,i){let a=e.href,s=e.title||null,o=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function ZCe(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(` `).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(` `)}function Zr(t,e){return Od.parse(t,e)}var Pd,Py,Za,vCe,yCe,xCe,By,bCe,I_,IZ,NZ,wCe,N_,TCe,D_,kCe,ECe,K5,M_,SCe,DZ,CCe,O_,SZ,ACe,_Ce,LCe,RCe,MZ,ICe,Z5,P_,OZ,NCe,PZ,DCe,MCe,OCe,BZ,PCe,BCe,FZ,FCe,$Ce,zCe,GCe,VCe,UCe,qCe,Y5,WCe,$Z,zZ,HCe,B_,YCe,A_,XCe,W5,My,jCe,CZ,X5,Su,j5,F_,Cu,H5,QCe,Od,Dyt,Myt,Oyt,Pyt,Byt,Fyt,$yt,GZ=F(()=>{Pd=R_();Py={exec:()=>null};Za={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},vCe=/^(?:[ \t]*(?:\n|$))+/,yCe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xCe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,By=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,bCe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,I_=/(?:[*+-]|\d{1,9}[.)])/,IZ=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,NZ=en(IZ).replace(/bull/g,I_).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(),wCe=en(IZ).replace(/bull/g,I_).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(),N_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,TCe=/^[^\n]+/,D_=/(?!\s*\])(?:\\.|[^\[\]\\])+/,kCe=en(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",D_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ECe=en(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,I_).getRegex(),K5="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",M_=/|$))/,SCe=en("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",M_).replace("tag",K5).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),DZ=en(N_).replace("hr",By).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",K5).getRegex(),CCe=en(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",DZ).getRegex(),O_={blockquote:CCe,code:yCe,def:kCe,fences:xCe,heading:bCe,hr:By,html:SCe,lheading:NZ,list:ECe,newline:vCe,paragraph:DZ,table:Py,text:TCe},SZ=en("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",By).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",K5).getRegex(),ACe={...O_,lheading:wCe,table:SZ,paragraph:en(N_).replace("hr",By).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",SZ).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",K5).getRegex()},_Ce={...O_,html:en(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",M_).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:Py,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:en(N_).replace("hr",By).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",NZ).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},LCe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,RCe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,MZ=/^( {2,}|\\)\n(?!\s*$)/,ICe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,BZ=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,PCe=en(BZ,"u").replace(/punct/g,Z5).getRegex(),BCe=en(BZ,"u").replace(/punct/g,PZ).getRegex(),FZ="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",FCe=en(FZ,"gu").replace(/notPunctSpace/g,OZ).replace(/punctSpace/g,P_).replace(/punct/g,Z5).getRegex(),$Ce=en(FZ,"gu").replace(/notPunctSpace/g,MCe).replace(/punctSpace/g,DCe).replace(/punct/g,PZ).getRegex(),zCe=en("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,OZ).replace(/punctSpace/g,P_).replace(/punct/g,Z5).getRegex(),GCe=en(/\\(punct)/,"gu").replace(/punct/g,Z5).getRegex(),VCe=en(/^<(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(),UCe=en(M_).replace("(?:-->|$)","-->").getRegex(),qCe=en("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",UCe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Y5=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,WCe=en(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Y5).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$Z=en(/^!?\[(label)\]\[(ref)\]/).replace("label",Y5).replace("ref",D_).getRegex(),zZ=en(/^!?\[(ref)\](?:\[\])?/).replace("ref",D_).getRegex(),HCe=en("reflink|nolink(?!\\()","g").replace("reflink",$Z).replace("nolink",zZ).getRegex(),B_={_backpedal:Py,anyPunctuation:GCe,autolink:VCe,blockSkip:OCe,br:MZ,code:RCe,del:Py,emStrongLDelim:PCe,emStrongRDelimAst:FCe,emStrongRDelimUnd:zCe,escape:LCe,link:WCe,nolink:zZ,punctuation:NCe,reflink:$Z,reflinkSearch:HCe,tag:qCe,text:ICe,url:Py},YCe={...B_,link:en(/^!?\[(label)\]\((.*?)\)/).replace("label",Y5).getRegex(),reflink:en(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y5).getRegex()},A_={...B_,emStrongRDelimAst:$Ce,emStrongLDelim:BCe,url:en(/^((?: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]*?(?:(?=[\\":">",'"':""","'":"'"},CZ=t=>jCe[t];X5=class{options;rules;lexer;constructor(t){this.options=t||Pd}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Oy(r,` `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=ZCe(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=Oy(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Oy(e[0],` `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Oy(e[0],` `).split(` `),n="",i="",a=[];for(;r.length>0;){let s=!1,o=[],l;for(l=0;l1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let l=!1,u="",h="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;u=e[0],t=t.substring(u.length);let f=e[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),d=t.split(` `,1)[0],p=!f.trim(),g=0;if(this.options.pedantic?(g=2,h=f.trimStart()):p?g=e[1].length+1:(g=e[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,h=f.slice(g),g+=e[1].length),p&&this.rules.other.blankLine.test(d)&&(u+=d+` `,t=t.substring(d.length+1),l=!0),!l){let y=this.rules.other.nextBulletRegex(g),b=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),S=this.rules.other.headingBeginRegex(g),T=this.rules.other.htmlBeginRegex(g);for(;t;){let E=t.split(` `,1)[0],A;if(d=E,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),A=d):A=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||S.test(d)||T.test(d)||y.test(d)||b.test(d))break;if(A.search(this.rules.other.nonSpaceChar)>=g||!d.trim())h+=` `+A.slice(g);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||S.test(f)||b.test(f))break;h+=` `+d}!p&&!d.trim()&&(p=!0),u+=E+` `,t=t.substring(E.length+1),f=A.slice(g)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0));let m=null,v;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(v=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:u,task:!!m,checked:v,loose:!1,text:h,tokens:[]}),i.raw+=u}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;lf.type==="space"),h=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=h}if(i.loose)for(let l=0;l({text:o,tokens:this.lexer.inline(o),header:!1,align:a.align[l]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===` `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=Oy(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=KCe(e[2],"()");if(a===-2)return;if(a>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),LZ(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[n.toLowerCase()];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return LZ(r,i,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let a=[...n[0]].length-1,s,o,l=a,u=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*t.length+a);(n=h.exec(e))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){u+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+u);let f=[...n[0]][0].length,d=t.slice(0,a+n.index+f+o);if(Math.min(a,o)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,n;if(e[2]==="@")r=e[0],n="mailto:"+r;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);r=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},Su=class __{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Pd,this.options.tokenizer=this.options.tokenizer||new X5,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Za,block:W5.normal,inline:My.normal};this.options.pedantic?(r.block=W5.pedantic,r.inline=My.pedantic):this.options.gfm&&(r.block=W5.gfm,this.options.breaks?r.inline=My.breaks:r.inline=My.gfm),this.tokenizer.rules=r}static get rules(){return{block:W5,inline:My}}static lex(e,r){return new __(r).lex(e)}static lexInline(e,r){return new __(r).inlineTokens(e)}lex(e){e=e.replace(Za.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let r=0;r(i=s.call({lexer:this},e,r))?(e=e.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=` `:r.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=` `+i.raw,s.text+=` `+i.text,this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=` `+i.raw,s.text+=` `+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),r.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let s=1/0,o=e.slice(1),l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=e.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let s=r.at(-1);n&&s?.type==="paragraph"?(s.raw+=` `+i.raw,s.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=` `+i.raw,s.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let n=e,i=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)o.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,s="";for(;e;){a||(s=""),a=!1;let o;if(this.options.extensions?.inline?.some(u=>(o=u.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let u=r.at(-1);o.type==="text"&&u?.type==="text"?(u.raw+=o.raw,u.text+=o.text):r.push(o);continue}if(o=this.tokenizer.emStrong(e,n,s)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),r.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),r.push(o);continue}let l=e;if(this.options.extensions?.startInline){let u=1/0,h=e.slice(1),f;this.options.extensions.startInline.forEach(d=>{f=d.call({lexer:this},h),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(s=o.raw.slice(-1)),a=!0;let u=r.at(-1);u?.type==="text"?(u.raw+=o.raw,u.text+=o.text):r.push(o);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}},j5=class{options;parser;constructor(t){this.options=t||Pd}space(t){return""}code({text:t,lang:e,escaped:r}){let n=(e||"").match(Za.notSpaceStart)?.[0],i=t.replace(Za.endingNewline,"")+` `;return n?'
'+(r?i:dc(i,!0))+`
`:"
"+(r?i:dc(i,!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(t){let e=t.ordered,r=t.start,n="";for(let s=0;s `+n+" `}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+dc(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • `}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    `}table(t){let e="",r="";for(let i=0;i${n}`),` `+e+` `+n+`
    `}tablerow({text:t}){return` ${t} `}tablecell(t){let 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`${dc(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),i=AZ(t);if(i===null)return n;t=i;let a='
    ",a}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=AZ(t);if(i===null)return dc(r);t=i;let a=`${r}{let s=i[a].flat(1/0);r=r.concat(this.walkTokens(s,e))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=e.renderers[i.name];a?e.renderers[i.name]=function(...s){let o=i.renderer.apply(this,s);return o===!1&&(o=a.apply(this,s)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new j5(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,o=r.renderer[s],l=i[s];i[s]=(...u)=>{let h=o.apply(i,u);return h===!1&&(h=l.apply(i,u)),h||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new X5(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,o=r.tokenizer[s],l=i[s];i[s]=(...u)=>{let h=o.apply(i,u);return h===!1&&(h=l.apply(i,u)),h}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new H5;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,o=r.hooks[s],l=i[s];H5.passThroughHooks.has(a)?i[s]=u=>{if(this.defaults.async)return Promise.resolve(o.call(i,u)).then(f=>l.call(i,f));let h=o.call(i,u);return l.call(i,h)}:i[s]=(...u)=>{let h=o.apply(i,u);return h===!1&&(h=l.apply(i,u)),h}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let o=[];return o.push(a.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Su.lex(t,e??this.defaults)}parser(t,e){return Cu.parse(t,e??this.defaults)}parseMarkdown(t){return(r,n)=>{let i={...n},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);let o=a.hooks?a.hooks.provideLexer():t?Su.lex:Su.lexInline,l=a.hooks?a.hooks.provideParser():t?Cu.parse:Cu.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(u=>o(u,a)).then(u=>a.hooks?a.hooks.processAllTokens(u):u).then(u=>a.walkTokens?Promise.all(this.walkTokens(u,a.walkTokens)).then(()=>u):u).then(u=>l(u,a)).then(u=>a.hooks?a.hooks.postprocess(u):u).catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let u=o(r,a);a.hooks&&(u=a.hooks.processAllTokens(u)),a.walkTokens&&this.walkTokens(u,a.walkTokens);let h=l(u,a);return a.hooks&&(h=a.hooks.postprocess(h)),h}catch(u){return s(u)}}}onError(t,e){return r=>{if(r.message+=` Please report this to https://github.com/markedjs/marked.`,t){let n="

    An error occurred:

    "+dc(r.message+"",!0)+"
    ";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Od=new QCe;Zr.options=Zr.setOptions=function(t){return Od.setOptions(t),Zr.defaults=Od.defaults,RZ(Zr.defaults),Zr};Zr.getDefaults=R_;Zr.defaults=Pd;Zr.use=function(...t){return Od.use(...t),Zr.defaults=Od.defaults,RZ(Zr.defaults),Zr};Zr.walkTokens=function(t,e){return Od.walkTokens(t,e)};Zr.parseInline=Od.parseInline;Zr.Parser=Cu;Zr.parser=Cu.parse;Zr.Renderer=j5;Zr.TextRenderer=F_;Zr.Lexer=Su;Zr.lexer=Su.lex;Zr.Tokenizer=X5;Zr.Hooks=H5;Zr.parse=Zr;Dyt=Zr.options,Myt=Zr.setOptions,Oyt=Zr.use,Pyt=Zr.walkTokens,Byt=Zr.parseInline,Fyt=Cu.parse,$yt=Su.lex});function Q5(t){for(var e=[],r=1;r{});function qZ(t,{markdownAutoWrap:e}){let n=t.replace(//g,` `).replace(/\n{2,}/g,` `),i=Q5(n);return e===!1?i.replace(/ /g," "):i}function WZ(t,e={}){let r=qZ(t,e),n=Zr.lexer(r),i=[[]],a=0;function s(o,l="normal"){o.type==="text"?o.text.split(` `).forEach((h,f)=>{f!==0&&(a++,i.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&i[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(u=>{s(u,o.type)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}return x(s,"processNode"),n.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?i[a].push({content:o.text,type:"normal"}):i[a].push({content:o.raw,type:"normal"})}),i}function HZ(t,{markdownAutoWrap:e}={}){let r=Zr.lexer(t);function n(i){return i.type==="text"?e===!1?i.text.replace(/\n */g,"
    ").replace(/ /g," "):i.text.replace(/\n */g,"
    "):i.type==="strong"?`${i.tokens?.map(n).join("")}`:i.type==="em"?`${i.tokens?.map(n).join("")}`:i.type==="paragraph"?`

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

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(J.warn(`Unsupported markdown: ${i.type}`),i.raw)}return x(n,"output"),r.map(n).join("")}function YZ(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function XZ(t,e){let r=YZ(e.content);return U_(t,[],r,e.type)}function U_(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];let[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?U_(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function jZ(t,e){if(t.some(({content:r})=>r.includes(` `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return J5(t,e)}function J5(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());let a=t.shift()??{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),e(s))return J5(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[o,l]=XZ(e,a);r.push([o]),l.content&&t.unshift(l)}return J5(t,e,r)}function G_(t,e){e&&t.attr("style",e)}async function KZ(t,e,r,n,i=!1,a=or()){let s=t.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);let o=s.append("xhtml:div"),l=Dn(e.label)?await ph(e.label.replace(Je.lineBreakRegex,` `),a):ar(e.label,a),u=e.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),G_(h,e.labelStyle),h.attr("class",`${u} ${n}`),G_(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&o.attr("class","labelBkg");let f=o.node().getBoundingClientRect();return f.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),f=o.node().getBoundingClientRect()),s.node()}function tw(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 ZZ(t,e,r){let n=t.append("text"),i=tw(n,1,e);rw(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function q_(t,e,r){let n=t.append("text"),i=tw(n,1,e);rw(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function QZ(t,e,r,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1"),l=0;for(let u of r){let h=x(d=>ZZ(a,1.1,d)<=t,"checkWidth"),f=h(u)?[u]:jZ(u,h);for(let d of f){let p=tw(o,l,1.1);rw(p,d),l++}}if(n){let u=o.node().getBBox(),h=2;return s.attr("x",u.x-h).attr("y",u.y-h).attr("width",u.width+2*h).attr("height",u.height+2*h),a.node()}else return o.node()}function rw(t,e){t.text(""),e.forEach((r,n)=>{let i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}async function nw(t,e={}){let r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,s)=>(r.push((async()=>{let o=`${a}:${s}`;return await JCe(o)?await pc(o,void 0,{class:"label-icon"}):``})()),i));let n=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}var V_,z_,VZ,ew,UZ,JCe,pc,ra,na=F(()=>{hn();vr();rr();EZ();cr();GZ();$_();V_={body:'?',height:80,width:80},z_=new Map,VZ=new Map,ew=x(t=>{for(let e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(J.debug("Registering icon pack:",e.name),"loader"in e)VZ.set(e.name,e.loader);else if("icons"in e)z_.set(e.name,e.icons);else throw J.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),UZ=x(async(t,e)=>{let r=b_(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);let n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=z_.get(n);if(!i){let s=VZ.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await s(),prefix:n},z_.set(n,i)}catch(o){throw J.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=T_(i,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),JCe=x(async t=>{try{return await UZ(t),!0}catch{return!1}},"isIconAvailable"),pc=x(async(t,e,r)=>{let n;try{n=await UZ(t,e?.fallbackPrefix)}catch(s){J.error(s),n=V_}let i=E_(n,e),a=C_(S_(i.body),{...i.attributes,...r});return ar(a,or())},"getIconSVG");x(qZ,"preprocessMarkdown");x(WZ,"markdownToLines");x(HZ,"markdownToHTML");x(YZ,"splitTextToChars");x(XZ,"splitWordToFitWidth");x(U_,"splitWordToFitWidthRecursion");x(jZ,"splitLineToFitWidth");x(J5,"splitLineToFitWidthRecursion");x(G_,"applyStyle");x(KZ,"addHtmlSpan");x(tw,"createTspan");x(ZZ,"computeWidthOfText");x(q_,"computeDimensionOfText");x(QZ,"createFormattedText");x(rw,"updateTextContentAndStyles");x(nw,"replaceIconSubstring");ra=x(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},u)=>{if(J.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a){let h=HZ(e,u),f=await nw(As(h),u),d=e.replace(/\\\\/g,"\\"),p={isNode:s,label:Dn(e)?d:f,labelStyle:r.replace("fill:","color:")};return await KZ(t,p,o,i,l,u)}else{let h=e.replace(//g,"
    "),f=WZ(h.replace("
    ","
    "),u),d=QZ(o,t,f,e?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");He(d).attr("style",p)}else{let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");He(d).select("rect").attr("style",p.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");He(d).select("text").attr("style",g)}return d}},"createText")});function W_(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(let l of t){let[u,h]=l;l[0]=(u-n)*s-(h-i)*o+n,l[1]=(u-n)*o+(h-i)*s+i}}}function e7e(t,e){return t[0]===e[0]&&t[1]===e[1]}function t7e(t,e,r,n=1){let i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(i)for(let u of s)W_(u,o,i);let l=function(u,h,f){let d=[];for(let b of u){let w=[...b];e7e(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}let p=[];h=Math.max(h,.1);let g=[];for(let b of d)for(let w=0;wb.yminw.ymin?1:b.xw.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!g.length)return p;let m=[],v=g[0].ymin,y=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let w=0;wv);w++)b=w;g.splice(0,b+1).forEach(w=>{m.push({s:v,edge:w})})}if(m=m.filter(b=>!(b.edge.ymax<=v)),m.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(f!==1||y%h==0)&&m.length>1)for(let b=0;b=m.length)break;let S=m[b].edge,T=m[w].edge;p.push([[Math.round(S.x),v],[Math.round(T.x),v]])}v+=f,m.forEach(b=>{b.edge.x=b.edge.x+f*b.edge.islope}),y++}return p}(s,a,n);if(i){for(let u of s)W_(u,o,-i);(function(u,h,f){let d=[];u.forEach(p=>d.push(...p)),W_(d,h,f)})(l,o,-i)}return l}function Gy(t,e){var r;let n=e.hachureAngle+90,i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),t7e(t,i,n,a||1)}function fw(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}function Y_(t,e){return t.type===e}function o9(t){let e=[],r=function(s){let o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:r7e,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:H_,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:JZ,text:""},o}(t),n="BOD",i=0,a=r[i];for(;!Y_(a,JZ);){let s=0,o=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return o9("M0,0"+t);i++,s=iw[a.text],n=a.text}else Y_(a,H_)?s=iw[n]:(i++,s=iw[a.text],n=a.text);if(!(i+sh%2?u+r:u+e);a.push({key:"C",data:l}),e=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{let l=o.map((u,h)=>h%2?u+r:u+e);a.push({key:"Q",data:l}),e=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{let l=o.map((u,h)=>h%2?u+r:u+e);a.push({key:"S",data:l}),e=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function lQ(t){let e=[],r="",n=0,i=0,a=0,s=0,o=0,l=0;for(let{key:u,data:h}of t){switch(u){case"M":e.push({key:"M",data:[...h]}),[n,i]=h,[a,s]=h;break;case"C":e.push({key:"C",data:[...h]}),n=h[4],i=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[n,i]=h;break;case"H":n=h[0],e.push({key:"L",data:[n,i]});break;case"V":i=h[0],e.push({key:"L",data:[n,i]});break;case"S":{let f=0,d=0;r==="C"||r==="S"?(f=n+(n-o),d=i+(i-l)):(f=n,d=i),e.push({key:"C",data:[f,d,...h]}),o=h[0],l=h[1],n=h[2],i=h[3];break}case"T":{let[f,d]=h,p=0,g=0;r==="Q"||r==="T"?(p=n+(n-o),g=i+(i-l)):(p=n,g=i);let m=n+2*(p-n)/3,v=i+2*(g-i)/3,y=f+2*(p-f)/3,b=d+2*(g-d)/3;e.push({key:"C",data:[m,v,y,b,f,d]}),o=p,l=g,n=f,i=d;break}case"Q":{let[f,d,p,g]=h,m=n+2*(f-n)/3,v=i+2*(d-i)/3,y=p+2*(f-p)/3,b=g+2*(d-g)/3;e.push({key:"C",data:[m,v,y,b,p,g]}),o=f,l=d,n=p,i=g;break}case"A":{let f=Math.abs(h[0]),d=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],v=h[5],y=h[6];f===0||d===0?(e.push({key:"C",data:[n,i,v,y,v,y]}),n=v,i=y):(n!==v||i!==y)&&(cQ(n,i,v,y,f,d,p,g,m).forEach(function(b){e.push({key:"C",data:b})}),n=v,i=y);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=u}return e}function Fy(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function cQ(t,e,r,n,i,a,s,o,l,u){let h=(f=s,Math.PI*f/180);var f;let d=[],p=0,g=0,m=0,v=0;if(u)[p,g,m,v]=u;else{[t,e]=Fy(t,e,-h),[r,n]=Fy(r,n,-h);let L=(t-r)/2,_=(e-n)/2,D=L*L/(i*i)+_*_/(a*a);D>1&&(D=Math.sqrt(D),i*=D,a*=D);let N=i*i,O=a*a,P=N*O-N*_*_-O*L*L,B=N*_*_+O*L*L,G=(o===l?-1:1)*Math.sqrt(Math.abs(P/B));m=G*i*_/a+(t+r)/2,v=G*-a*L/i+(e+n)/2,p=Math.asin(parseFloat(((e-v)/a).toFixed(9))),g=Math.asin(parseFloat(((n-v)/a).toFixed(9))),tg&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let y=g-p;if(Math.abs(y)>120*Math.PI/180){let L=g,_=r,D=n;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=cQ(r=m+i*Math.cos(g),n=v+a*Math.sin(g),_,D,i,a,s,0,l,[g,L,m,v])}y=g-p;let b=Math.cos(p),w=Math.sin(p),S=Math.cos(g),T=Math.sin(g),E=Math.tan(y/4),A=4/3*i*E,C=4/3*a*E,I=[t,e],M=[t+A*w,e-C*b],R=[r+A*T,n-C*S],k=[r,n];if(M[0]=2*I[0]-M[0],M[1]=2*I[1]-M[1],u)return[M,R,k].concat(d);{d=[M,R,k].concat(d);let L=[];for(let _=0;_2){let i=[];for(let a=0;a2*Math.PI&&(p=0,g=2*Math.PI);let m=2*Math.PI/l.curveStepCount,v=Math.min(m/2,(g-p)/2),y=aQ(v,u,h,f,d,p,g,1,l);if(!l.disableMultiStroke){let b=aQ(v,u,h,f,d,p,g,1.5,l);y.push(...b)}return s&&(o?y.push(...zh(u,h,u+f*Math.cos(p),h+d*Math.sin(p),l),...zh(u,h,u+f*Math.cos(g),h+d*Math.sin(g),l)):y.push({op:"lineTo",data:[u,h]},{op:"lineTo",data:[u+f*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:y}}function rQ(t,e){let r=lQ(oQ(o9(t))),n=[],i=[0,0],a=[0,0];for(let{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(...zh(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{let[l,u,h,f,d,p]=o;n.push(...a7e(l,u,h,f,d,p,a,e)),a=[d,p];break}case"Z":n.push(...zh(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function X_(t,e){let r=[];for(let n of t)if(n.length){let i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+Qt(i,e),n[0][1]+Qt(i,e)]});for(let s=1;s500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);let f=h/2,d=.2+.2*fQ(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=Qt(p,i,u),g=Qt(g,i,u);let m=[],v=()=>Qt(f,i,u),y=()=>Qt(h,i,u),b=i.preserveVertices;return a&&(s?m.push({op:"move",data:[t+(b?0:v()),e+(b?0:v())]}):m.push({op:"move",data:[t+(b?0:Qt(h,i,u)),e+(b?0:Qt(h,i,u))]})),s?m.push({op:"bcurveTo",data:[p+t+(r-t)*d+v(),g+e+(n-e)*d+v(),p+t+2*(r-t)*d+v(),g+e+2*(n-e)*d+v(),r+(b?0:v()),n+(b?0:v())]}):m.push({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+(b?0:y()),n+(b?0:y())]}),m}function aw(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+Qt(e,r),t[0][1]+Qt(e,r)]),n.push([t[0][0]+Qt(e,r),t[0][1]+Qt(e,r)]);for(let i=1;i3){let a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+21&&i.push(o)):i.push(o),i.push(t[e+3])}else{let l=t[e+0],u=t[e+1],h=t[e+2],f=t[e+3],d=Bd(l,u,.5),p=Bd(u,h,.5),g=Bd(h,f,.5),m=Bd(d,p,.5),v=Bd(p,g,.5),y=Bd(m,v,.5);i9([l,d,m,y],0,r,i),i9([y,v,g,f],0,r,i)}var a,s;return i}function o7e(t,e){return hw(t,0,t.length,e)}function hw(t,e,r,n,i){let a=i||[],s=t[e],o=t[r-1],l=0,u=1;for(let h=e+1;hl&&(l=f,u=h)}return Math.sqrt(l)>n?(hw(t,e,u+1,n,a),hw(t,u,r,n,a)):(a.length||a.push(s),a.push(o)),a}function j_(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a0?hw(n,0,n.length,r):n}var zy,K_,Z_,Q_,J_,e9,_s,t9,r7e,H_,JZ,iw,n7e,Js,Qp,a9,sw,s9,je,Bt=F(()=>{zy=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=Gy(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){let n=[];for(let i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};K_=class extends zy{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=Gy(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*n*Math.cos(a),l=.5*n*Math.sin(a);for(let[u,h]of i)fw([u,h])&&s.push([[u[0]-o,u[1]+l],[...h]],[[u[0]+o,u[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},Z_=class extends zy{fillPolygons(e,r){let n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n}},Q_=class{constructor(e){this.helper=e}fillPolygons(e,r){let n=Gy(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let s=i/4;for(let o of e){let l=fw(o),u=l/i,h=Math.ceil(u)-1,f=l-h*i,d=(o[0][0]+o[1][0])/2-i/4,p=Math.min(o[0][1],o[1][1]);for(let g=0;g{let o=fw(s),l=Math.floor(o/(n+i)),u=(o+i-l*(n+i))/2,h=s[0],f=s[1];h[0]>f[0]&&(h=s[1],f=s[0]);let d=Math.atan((f[1]-h[1])/(f[0]-h[0]));for(let p=0;p{let s=fw(a),o=Math.round(s/(2*r)),l=a[0],u=a[1];l[0]>u[0]&&(l=a[1],u=a[0]);let h=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f2*Math.PI&&(A=0,C=2*Math.PI);let I=(C-A)/b.curveStepCount,M=[];for(let R=A;R<=C;R+=I)M.push([w+T*Math.cos(R),S+E*Math.sin(R)]);return M.push([w+T*Math.cos(C),S+E*Math.sin(C)]),M.push([w,S]),Zp([M],b)}(e,r,n,i,a,s,u));return u.stroke!==Js&&h.push(f),this._d("arc",h,u)}curve(e,r){let n=this._o(r),i=[],a=eQ(e,n);if(n.fill&&n.fill!==Js)if(n.fillStyle==="solid"){let s=eQ(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],o=e;if(o.length){let l=typeof o[0][0]=="number"?[o]:o;for(let u of l)u.length<3?s.push(...u):u.length===3?s.push(...j_(sQ([u[0],u[0],u[1],u[2]]),10,(1+n.roughness)/2)):s.push(...j_(sQ(u),10,(1+n.roughness)/2))}s.length&&i.push(Zp([s],n))}return n.stroke!==Js&&i.push(a),this._d("curve",i,n)}polygon(e,r){let n=this._o(r),i=[],a=ow(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(X_([e],n)):i.push(Zp([e],n))),n.stroke!==Js&&i.push(a),this._d("polygon",i,n)}path(e,r){let n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==Js,s=n.stroke!==Js,o=!!(n.simplification&&n.simplification<1),l=function(h,f,d){let p=lQ(oQ(o9(h))),g=[],m=[],v=[0,0],y=[],b=()=>{y.length>=4&&m.push(...j_(y,f)),y=[]},w=()=>{b(),m.length&&(g.push(m),m=[])};for(let{key:T,data:E}of p)switch(T){case"M":w(),v=[E[0],E[1]],m.push(v);break;case"L":b(),m.push([E[0],E[1]]);break;case"C":if(!y.length){let A=m.length?m[m.length-1]:v;y.push([A[0],A[1]])}y.push([E[0],E[1]]),y.push([E[2],E[3]]),y.push([E[4],E[5]]);break;case"Z":b(),m.push([v[0],v[1]])}if(w(),!d)return g;let S=[];for(let T of g){let E=o7e(T,d);E.length&&S.push(E)}return S}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),u=rQ(e,n);if(a)if(n.fillStyle==="solid")if(l.length===1){let h=rQ(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(X_(l,n));else i.push(Zp(l,n));return s&&(o?l.forEach(h=>{i.push(ow(h,!1,n))}):i.push(u)),this._d("path",i,n)}opsToPath(e,r){let n="";for(let i of e.ops){let a=typeof r=="number"&&r>=0?i.data.map(s=>+s.toFixed(r)):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(e){let r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(let a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Js};break;case"fillPath":s={d:this.opsToPath(a),stroke:Js,strokeWidth:0,fill:n.fill||Js};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Js,strokeWidth:n,fill:Js}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}},a9=class{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Qp(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,o),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(let a of r.ops){let s=typeof n=="number"&&n>=0?a.data.map(o=>+o.toFixed(n)):a.data;switch(a.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s),s}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s),s}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s),s}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a),a}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,a,s,o=!1,l){let u=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(u),u}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){let n=this.gen.path(e,r);return this.draw(n),n}},sw="http://www.w3.org/2000/svg",s9=class{constructor(e,r){this.svg=e,this.gen=new Qp(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(sw,"g"),s=e.options.fixedDecimalPlaceDigits;for(let o of r){let l=null;switch(o.type){case"path":l=i.createElementNS(sw,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",n.stroke),l.setAttribute("stroke-width",n.strokeWidth+""),l.setAttribute("fill","none"),n.strokeLineDash&&l.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(sw,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,o,n)}l&&a.appendChild(l)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=e.createElementNS(sw,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s)}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s)}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s)}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a)}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,a,s,o=!1,l){let u=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(u)}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n)}path(e,r){let n=this.gen.path(e,r);return this.draw(n)}},je={canvas:(t,e)=>new a9(t,e),svg:(t,e)=>new s9(t,e),generator:t=>new Qp(t),newSeed:()=>Qp.newSeed()}});function Rr(t){let e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}function Gh(t,e,r,n,i,a){let s=[],l=r-t,u=n-e,h=l/a,f=2*Math.PI/h,d=e+u/2;for(let p=0;p<=50;p++){let g=p/50,m=t+g*l,v=d+i*Math.sin(f*(m-t));s.push({x:m,y:v})}return s}function qy(t,e,r,n,i,a){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;f"+i+"";return r.html(ar(s,n)),dQ(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()}function yQ(t,e){return t.intersect(e)}function xQ(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x0}function kQ(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=n-t.width/2-s,u=i-t.height/2-o;for(let h=0;h1&&a.sort(function(h,f){let d=h.x-r.x,p=h.y-r.y,g=Math.sqrt(d*d+p*p),m=f.x-r.x,v=f.y-r.y,y=Math.sqrt(m*m+v*v);return gh,":first-child");return f.attr("class","anchor").attr("style",ta(o)),Pt(e,f),e.intersect=function(d){return J.info("Circle intersect",e,s,d),At.circle(e,s,d)},a}function u9(t,e,r,n,i,a,s){let l=(t+r)/2,u=(e+n)/2,h=Math.atan2(n-e,r-t),f=(r-t)/2,d=(n-e)/2,p=f/i,g=d/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-m**2),y=l+v*a*Math.sin(h)*(s?-1:1),b=u-v*i*Math.cos(h)*(s?-1:1),w=Math.atan2((e-b)/a,(t-y)/i),T=Math.atan2((n-b)/a,(r-y)/i)-w;s&&T<0&&(T+=2*Math.PI),!s&&T>0&&(T-=2*Math.PI);let E=[];for(let A=0;A<20;A++){let C=A/19,I=w+C*T,M=y+i*Math.cos(I),R=b+a*Math.sin(I);E.push({x:M,y:R})}return E}async function SQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=a.width+e.padding+20,o=a.height+e.padding,l=o/2,u=l/(2.5+o/50),{cssStyles:h}=e,f=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...u9(-s/2,-o/2,-s/2,o/2,u,l,!1),{x:s/2,y:o/2},...u9(s/2,o/2,s/2,-o/2,u,l,!0)],d=je.svg(i),p=Ot(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=Rr(f),m=d.path(g,p),v=i.insert(()=>m,":first-child");return v.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${u/2}, 0)`),Pt(e,v),e.intersect=function(y){return At.polygon(e,f,y)},i}function qh(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function CQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=a.height+e.padding,o=12,l=a.width+e.padding+o,u=0,h=l,f=-s,d=0,p=[{x:u+o,y:f},{x:h,y:f},{x:h,y:d},{x:u,y:d},{x:u,y:f+o},{x:u+o,y:f}],g,{cssStyles:m}=e;if(e.look==="handDrawn"){let v=je.svg(i),y=Ot(e,{}),b=Rr(p),w=v.path(b,y);g=i.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&g.attr("style",m)}else g=qh(i,l,s,p);return n&&g.attr("style",n),Pt(e,g),e.intersect=function(v){return At.polygon(e,p,v)},i}function AQ(t,e){let{nodeStyles:r}=_t(e);e.label="";let n=t.insert("g").attr("class",Ht(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,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=je.svg(n),l=Ot(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=Rr(s),h=o.path(u,l),f=n.insert(()=>h,":first-child");return i&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",i),r&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(d){return At.polygon(e,s,d)},n}async function h9(t,e,r){let{labelStyles:n,nodeStyles:i}=_t(e);e.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:o}=await jt(t,e,Ht(e)),l=r?.padding??o,u=s.width/2+l,h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=je.svg(a),p=Ot(e,{}),g=d.circle(0,0,u*2,p);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",ta(f))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0);return Pt(e,h),e.calcIntersect=function(d,p){let g=d.width/2;return At.circle(d,g,p)},e.intersect=function(d){return J.info("Circle intersect",e,u,d),At.circle(e,u,d)},a}function _Q(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,i={x:n/2*e,y:n/2*r},a={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},o={x:n/2*e,y:-(n/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y} M ${i.x},${i.y} L ${s.x},${s.y}`}function LQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",Ht(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,o=je.svg(i),l=Ot(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=o.circle(0,0,a*2,l),h=_Q(a),f=o.path(h,l),d=i.insert(()=>u,":first-child");return d.insert(()=>f),s&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Pt(e,d),e.intersect=function(p){return J.info("crossedCircle intersect",e,{radius:a,point:p}),At.circle(e,a,p)},i}function Au(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fw,":first-child").attr("stroke-opacity",0),S.insert(()=>y,":first-child"),S.attr("class","text"),h&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${u}, 0)`),s.attr("transform",`translate(${-o/2+u-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Pt(e,S),e.intersect=function(T){return At.polygon(e,d,T)},i}function _u(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fw,":first-child").attr("stroke-opacity",0),S.insert(()=>y,":first-child"),S.attr("class","text"),h&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${-u}, 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))})`),Pt(e,S),e.intersect=function(T){return At.polygon(e,d,T)},i}function ia(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fA,":first-child").attr("stroke-opacity",0),C.insert(()=>b,":first-child"),C.insert(()=>T,":first-child"),C.attr("class","text"),h&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${u-u/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))})`),Pt(e,C),e.intersect=function(I){return At.polygon(e,p,I)},i}async function DQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=80,o=20,l=Math.max(s,(a.width+(e.padding??0)*2)*1.25,e?.width??0),u=Math.max(o,a.height+(e.padding??0)*2,e?.height??0),h=u/2,{cssStyles:f}=e,d=je.svg(i),p=Ot(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=l,m=u,v=g-h,y=m/4,b=[{x:v,y:0},{x:y,y:0},{x:0,y:m/2},{x:y,y:m},{x:v,y:m},...qy(-v,-m/2,h,50,270,90)],w=Rr(b),S=d.path(w,p),T=i.insert(()=>S,":first-child");return T.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),T.attr("transform",`translate(${-l/2}, ${-u/2})`),Pt(e,T),e.intersect=function(E){return At.polygon(e,b,E)},i}async function MQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=Math.max(a.width+e.padding,e.width??0),l=o/2,u=l/(2.5+o/50),h=Math.max(a.height+u+e.padding,e.height??0),f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=je.svg(i),g=w7e(0,0,o,h,l,u),m=T7e(0,u,o,h,l,u),v=p.path(g,Ot(e,{})),y=p.path(m,Ot(e,{fill:"none"}));f=i.insert(()=>y,":first-child"),f=i.insert(()=>v,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{let p=b7e(0,0,o,h,l,u);f=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",ta(d)).attr("style",n)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),Pt(e,f),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(p){let g=At.rect(e,p),m=g.x-(e.x??0);if(l!=0&&(Math.abs(m)<(e.width??0)/2||Math.abs(m)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-u)){let v=u*u*(1-m*m/(l*l));v>0&&(v=Math.sqrt(v)),v=u-v,p.y-(e.y??0)>0&&(v=-v),g.y+=v}return g},i}async function OQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=a.width+e.padding,l=a.height+e.padding,u=l*.2,h=-o/2,f=-l/2-u/2,{cssStyles:d}=e,p=je.svg(i),g=Ot(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=[{x:h,y:f+u},{x:-h,y:f+u},{x:-h,y:-f},{x:h,y:-f},{x:h,y:f},{x:-h,y:f},{x:-h,y:f+u}],v=p.polygon(m.map(b=>[b.x,b.y]),g),y=i.insert(()=>v,":first-child");return y.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${h+(e.padding??0)/2-(a.x-(a.left??0))}, ${f+u+(e.padding??0)/2-(a.y-(a.top??0))})`),Pt(e,y),e.intersect=function(b){return At.rect(e,b)},i}async function PQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await jt(t,e,Ht(e)),l=a.width/2+s+5,u=a.width/2+s,h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=je.svg(i),p=Ot(e,{roughness:.2,strokeWidth:2.5}),g=Ot(e,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,p),v=d.circle(0,0,u*2,g);h=i.insert("g",":first-child"),h.attr("class",ta(e.cssClasses)).attr("style",ta(f)),h.node()?.appendChild(m),h.node()?.appendChild(v)}else{h=i.insert("g",":first-child");let d=h.insert("circle",":first-child"),p=h.insert("circle");h.attr("class","basic label-container").attr("style",n),d.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0)}return Pt(e,h),e.intersect=function(d){return J.info("DoubleCircle intersect",e,l,d),At.circle(e,l,d)},i}function BQ(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=_t(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",Ht(e)).attr("id",e.domId??e.id),s=7,{cssStyles:o}=e,l=je.svg(a),{nodeBorder:u}=r,h=Ot(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);let f=l.circle(0,0,s*2,h),d=a.insert(()=>f,":first-child");return d.selectAll("path").attr("style",`fill: ${u} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Pt(e,d),e.intersect=function(p){return J.info("filledCircle intersect",e,{radius:s,point:p}),At.circle(e,s,p)},a}async function FQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=a.width+(e.padding??0),l=o+a.height,u=o+a.height,h=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:f}=e,d=je.svg(i),p=Ot(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=Rr(h),m=d.path(g,p),v=i.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),e.width=o,e.height=l,Pt(e,v),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(y){return J.info("Triangle intersect",e,h,y),At.polygon(e,h,y)},i}function $Q(t,e,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:a}=_t(e);e.label="";let s=t.insert("g").attr("class",Ht(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,l=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);r==="LR"&&(l=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));let h=-1*l/2,f=-1*u/2,d=je.svg(s),p=Ot(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=d.rectangle(h,f,l,u,p),m=s.insert(()=>g,":first-child");o&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Pt(e,m);let v=n?.padding??0;return e.width&&e.height&&(e.width+=v/2||0,e.height+=v/2||0),e.intersect=function(y){return At.rect(e,y)},s}async function zQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let i=80,a=50,{shapeSvg:s,bbox:o}=await jt(t,e,Ht(e)),l=Math.max(i,o.width+(e.padding??0)*2,e?.width??0),u=Math.max(a,o.height+(e.padding??0)*2,e?.height??0),h=u/2,{cssStyles:f}=e,d=je.svg(s),p=Ot(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-l/2,y:-u/2},{x:l/2-h,y:-u/2},...qy(-l/2+h,0,h,50,90,270),{x:l/2-h,y:u/2},{x:-l/2,y:u/2}],m=Rr(g),v=d.path(m,p),y=s.insert(()=>v,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),Pt(e,y),e.intersect=function(b){return J.info("Pill intersect",e,{radius:h,point:b}),At.polygon(e,g,b)},s}async function GQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=a.height+(e.padding??0),o=a.width+(e.padding??0)*2.5,{cssStyles:l}=e,u=je.svg(i),h=Ot(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let f=o/2,d=f/6;f=f+d;let p=s/2,g=p/2,m=f-g,v=[{x:-m,y:-p},{x:0,y:-p},{x:m,y:-p},{x:f,y:0},{x:m,y:p},{x:0,y:p},{x:-m,y:p},{x:-f,y:0}],y=Rr(v),b=u.path(y,h),w=i.insert(()=>b,":first-child");return w.attr("class","basic label-container"),l&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",l),n&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",n),e.width=o,e.height=s,Pt(e,w),e.intersect=function(S){return At.polygon(e,v,S)},i}async function VQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.label="",e.labelStyle=r;let{shapeSvg:i}=await jt(t,e,Ht(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,l=je.svg(i),u=Ot(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],f=Rr(h),d=l.path(f,u),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container"),o&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",o),n&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),p.attr("transform",`translate(${-a/2}, ${-s/2})`),Pt(e,p),e.intersect=function(g){return J.info("Pill intersect",e,{points:h}),At.polygon(e,h,g)},i}async function UQ(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=_t(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await jt(t,e,"icon-shape default"),d=e.pos==="t",p=o,g=o,{nodeBorder:m}=r,{stylesMap:v}=Ad(e),y=-g/2,b=-p/2,w=e.label?8:0,S=je.svg(u),T=Ot(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let E=S.rectangle(y,b,g,p,T),A=Math.max(g,h.width),C=p+h.height+w,I=S.rectangle(-A/2,-C/2,A,C,{...T,fill:"transparent",stroke:"none"}),M=u.insert(()=>E,":first-child"),R=u.insert(()=>I);if(e.icon){let k=u.append("g");k.html(`${await pc(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let L=k.node().getBBox(),_=L.width,D=L.height,N=L.x,O=L.y;k.attr("transform",`translate(${-_/2-N},${d?h.height/2+w/2-D/2-O:-h.height/2-w/2-D/2-O})`),k.attr("style",`color: ${v.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-C/2:C/2-h.height})`),M.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Pt(e,R),e.intersect=function(k){if(J.info("iconSquare intersect",e,k),!e.label)return At.rect(e,k);let L=e.x??0,_=e.y??0,D=e.height??0,N=[];return d?N=[{x:L-h.width/2,y:_-D/2},{x:L+h.width/2,y:_-D/2},{x:L+h.width/2,y:_-D/2+h.height+w},{x:L+g/2,y:_-D/2+h.height+w},{x:L+g/2,y:_+D/2},{x:L-g/2,y:_+D/2},{x:L-g/2,y:_-D/2+h.height+w},{x:L-h.width/2,y:_-D/2+h.height+w}]:N=[{x:L-g/2,y:_-D/2},{x:L+g/2,y:_-D/2},{x:L+g/2,y:_-D/2+p},{x:L+h.width/2,y:_-D/2+p},{x:L+h.width/2/2,y:_+D/2},{x:L-h.width/2,y:_+D/2},{x:L-h.width/2,y:_-D/2+p},{x:L-g/2,y:_-D/2+p}],At.polygon(e,N,k)},u}async function qQ(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=_t(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await jt(t,e,"icon-shape default"),d=20,p=e.label?8:0,g=e.pos==="t",{nodeBorder:m,mainBkg:v}=r,{stylesMap:y}=Ad(e),b=je.svg(u),w=Ot(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let S=y.get("fill");w.stroke=S??v;let T=u.append("g");e.icon&&T.html(`${await pc(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let E=T.node().getBBox(),A=E.width,C=E.height,I=E.x,M=E.y,R=Math.max(A,C)*Math.SQRT2+d*2,k=b.circle(0,0,R,w),L=Math.max(R,h.width),_=R+h.height+p,D=b.rectangle(-L/2,-_/2,L,_,{...w,fill:"transparent",stroke:"none"}),N=u.insert(()=>k,":first-child"),O=u.insert(()=>D);return T.attr("transform",`translate(${-A/2-I},${g?h.height/2+p/2-C/2-M:-h.height/2-p/2-C/2-M})`),T.attr("style",`color: ${y.get("stroke")??m};`),f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-_/2:_/2-h.height})`),N.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),Pt(e,O),e.intersect=function(P){return J.info("iconSquare intersect",e,P),At.rect(e,P)},u}async function WQ(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=_t(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await jt(t,e,"icon-shape default"),p=e.pos==="t",g=o+f*2,m=o+f*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:b}=Ad(e),w=-m/2,S=-g/2,T=e.label?8:0,E=je.svg(u),A=Ot(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let C=b.get("fill");A.stroke=C??y;let I=E.path(Uh(w,S,m,g,5),A),M=Math.max(m,h.width),R=g+h.height+T,k=E.rectangle(-M/2,-R/2,M,R,{...A,fill:"transparent",stroke:"none"}),L=u.insert(()=>I,":first-child").attr("class","icon-shape2"),_=u.insert(()=>k);if(e.icon){let D=u.append("g");D.html(`${await pc(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let N=D.node().getBBox(),O=N.width,P=N.height,B=N.x,G=N.y;D.attr("transform",`translate(${-O/2-B},${p?h.height/2+T/2-P/2-G:-h.height/2-T/2-P/2-G})`),D.attr("style",`color: ${b.get("stroke")??v};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-R/2:R/2-h.height})`),L.attr("transform",`translate(0,${p?h.height/2+T/2:-h.height/2-T/2})`),Pt(e,_),e.intersect=function(D){if(J.info("iconSquare intersect",e,D),!e.label)return At.rect(e,D);let N=e.x??0,O=e.y??0,P=e.height??0,B=[];return p?B=[{x:N-h.width/2,y:O-P/2},{x:N+h.width/2,y:O-P/2},{x:N+h.width/2,y:O-P/2+h.height+T},{x:N+m/2,y:O-P/2+h.height+T},{x:N+m/2,y:O+P/2},{x:N-m/2,y:O+P/2},{x:N-m/2,y:O-P/2+h.height+T},{x:N-h.width/2,y:O-P/2+h.height+T}]:B=[{x:N-m/2,y:O-P/2},{x:N+m/2,y:O-P/2},{x:N+m/2,y:O-P/2+g},{x:N+h.width/2,y:O-P/2+g},{x:N+h.width/2/2,y:O+P/2},{x:N-h.width/2,y:O+P/2},{x:N-h.width/2,y:O-P/2+g},{x:N-m/2,y:O-P/2+g}],At.polygon(e,B,D)},u}async function HQ(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=_t(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await jt(t,e,"icon-shape default"),p=e.pos==="t",g=o+f*2,m=o+f*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:b}=Ad(e),w=-m/2,S=-g/2,T=e.label?8:0,E=je.svg(u),A=Ot(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let C=b.get("fill");A.stroke=C??y;let I=E.path(Uh(w,S,m,g,.1),A),M=Math.max(m,h.width),R=g+h.height+T,k=E.rectangle(-M/2,-R/2,M,R,{...A,fill:"transparent",stroke:"none"}),L=u.insert(()=>I,":first-child"),_=u.insert(()=>k);if(e.icon){let D=u.append("g");D.html(`${await pc(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let N=D.node().getBBox(),O=N.width,P=N.height,B=N.x,G=N.y;D.attr("transform",`translate(${-O/2-B},${p?h.height/2+T/2-P/2-G:-h.height/2-T/2-P/2-G})`),D.attr("style",`color: ${b.get("stroke")??v};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-R/2:R/2-h.height})`),L.attr("transform",`translate(0,${p?h.height/2+T/2:-h.height/2-T/2})`),Pt(e,_),e.intersect=function(D){if(J.info("iconSquare intersect",e,D),!e.label)return At.rect(e,D);let N=e.x??0,O=e.y??0,P=e.height??0,B=[];return p?B=[{x:N-h.width/2,y:O-P/2},{x:N+h.width/2,y:O-P/2},{x:N+h.width/2,y:O-P/2+h.height+T},{x:N+m/2,y:O-P/2+h.height+T},{x:N+m/2,y:O+P/2},{x:N-m/2,y:O+P/2},{x:N-m/2,y:O-P/2+h.height+T},{x:N-h.width/2,y:O-P/2+h.height+T}]:B=[{x:N-m/2,y:O-P/2},{x:N+m/2,y:O-P/2},{x:N+m/2,y:O-P/2+g},{x:N+h.width/2,y:O-P/2+g},{x:N+h.width/2/2,y:O+P/2},{x:N-h.width/2,y:O+P/2},{x:N-h.width/2,y:O-P/2+g},{x:N-m/2,y:O-P/2+g}],At.polygon(e,B,D)},u}async function YQ(t,e,{config:{flowchart:r}}){let n=new Image;n.src=e?.img??"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;let{labelStyles:s}=_t(e);e.labelStyle=s;let o=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let l=Math.max(e.label?o??0:0,e?.assetWidth??i),u=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,h=e.constraint==="on"?u/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(u,o??0);let{shapeSvg:f,bbox:d,label:p}=await jt(t,e,"image-shape default"),g=e.pos==="t",m=-u/2,v=-h/2,y=e.label?8:0,b=je.svg(f),w=Ot(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let S=b.rectangle(m,v,u,h,w),T=Math.max(u,d.width),E=h+d.height+y,A=b.rectangle(-T/2,-E/2,T,E,{...w,fill:"none",stroke:"none"}),C=f.insert(()=>S,":first-child"),I=f.insert(()=>A);if(e.img){let M=f.append("image");M.attr("href",e.img),M.attr("width",u),M.attr("height",h),M.attr("preserveAspectRatio","none"),M.attr("transform",`translate(${-u/2},${g?E/2-h:-E/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-y/2:h/2-d.height/2+y/2})`),C.attr("transform",`translate(0,${g?d.height/2+y/2:-d.height/2-y/2})`),Pt(e,I),e.intersect=function(M){if(J.info("iconSquare intersect",e,M),!e.label)return At.rect(e,M);let R=e.x??0,k=e.y??0,L=e.height??0,_=[];return g?_=[{x:R-d.width/2,y:k-L/2},{x:R+d.width/2,y:k-L/2},{x:R+d.width/2,y:k-L/2+d.height+y},{x:R+u/2,y:k-L/2+d.height+y},{x:R+u/2,y:k+L/2},{x:R-u/2,y:k+L/2},{x:R-u/2,y:k-L/2+d.height+y},{x:R-d.width/2,y:k-L/2+d.height+y}]:_=[{x:R-u/2,y:k-L/2},{x:R+u/2,y:k-L/2},{x:R+u/2,y:k-L/2+h},{x:R+d.width/2,y:k-L/2+h},{x:R+d.width/2/2,y:k+L/2},{x:R-d.width/2,y:k+L/2},{x:R-d.width/2,y:k-L/2+h},{x:R-u/2,y:k-L/2+h}],At.polygon(e,_,M)},f}async function XQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),o=Math.max(a.height+(e.padding??0)*2,e?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=je.svg(i),d=Ot(e,{}),p=Rr(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=qh(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Pt(e,u),e.intersect=function(f){return At.polygon(e,l,f)},i}async function dw(t,e,r){let{labelStyles:n,nodeStyles:i}=_t(e);e.labelStyle=n;let{shapeSvg:a,bbox:s}=await jt(t,e,Ht(e)),o=Math.max(s.width+r.labelPaddingX*2,e?.width||0),l=Math.max(s.height+r.labelPaddingY*2,e?.height||0),u=-o/2,h=-l/2,f,{rx:d,ry:p}=e,{cssStyles:g}=e;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),e.look==="handDrawn"){let m=je.svg(a),v=Ot(e,{}),y=d||p?m.path(Uh(u,h,o,l,d||0),v):m.rectangle(u,h,o,l,v);f=a.insert(()=>y,":first-child"),f.attr("class","basic label-container").attr("style",ta(g))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",i).attr("rx",ta(d)).attr("ry",ta(p)).attr("x",u).attr("y",h).attr("width",o).attr("height",l);return Pt(e,f),e.calcIntersect=function(m,v){return At.rect(m,v)},e.intersect=function(m){return At.rect(e,m)},a}async function jQ(t,e){let{shapeSvg:r,bbox:n,label:i}=await jt(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Pt(e,a),e.intersect=function(l){return At.rect(e,l)},r}async function KQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=je.svg(i),d=Ot(e,{}),p=Rr(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=qh(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Pt(e,u),e.intersect=function(f){return At.polygon(e,l,f)},i}async function ZQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=je.svg(i),d=Ot(e,{}),p=Rr(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=qh(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Pt(e,u),e.intersect=function(f){return At.polygon(e,l,f)},i}function QQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",Ht(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),l=7,u=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=je.svg(i),f=Ot(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=Rr(u),p=h.path(d,f),g=i.insert(()=>p,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${s/2},${-o})`),Pt(e,g),e.intersect=function(m){return J.info("lightningBolt intersect",e,m),At.polygon(e,u,m)},i}async function JQ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=Math.max(a.width+(e.padding??0),e.width??0),l=o/2,u=l/(2.5+o/50),h=Math.max(a.height+u+(e.padding??0),e.height??0),f=h*.1,d,{cssStyles:p}=e;if(e.look==="handDrawn"){let g=je.svg(i),m=E7e(0,0,o,h,l,u,f),v=S7e(0,u,o,h,l,u),y=Ot(e,{}),b=g.path(m,y),w=g.path(v,y);i.insert(()=>w,":first-child").attr("class","line"),d=i.insert(()=>b,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let g=k7e(0,0,o,h,l,u,f);d=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",ta(p)).attr("style",n)}return d.attr("label-offset-y",u),d.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),Pt(e,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+u-(a.y-(a.top??0))})`),e.intersect=function(g){let m=At.rect(e,g),v=m.x-(e.x??0);if(l!=0&&(Math.abs(v)<(e.width??0)/2||Math.abs(v)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-u)){let y=u*u*(1-v*v/(l*l));y>0&&(y=Math.sqrt(y)),y=u-y,g.y-(e.y??0)>0&&(y=-y),m.y+=y}return m},i}async function eJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=l+u,{cssStyles:f}=e,d=je.svg(i),p=Ot(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Gh(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,u,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=d.polygon(g.map(y=>[y.x,y.y]),p),v=i.insert(()=>m,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),Pt(e,v),e.intersect=function(y){return At.polygon(e,g,y)},i}async function tJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=5,h=-o/2,f=-l/2,{cssStyles:d}=e,p=je.svg(i),g=Ot(e,{}),m=[{x:h-u,y:f+u},{x:h-u,y:f+l+u},{x:h+o-u,y:f+l+u},{x:h+o-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f+l-u},{x:h+o+u,y:f+l-u},{x:h+o+u,y:f-u},{x:h+u,y:f-u},{x:h+u,y:f},{x:h,y:f},{x:h,y:f+u}],v=[{x:h,y:f+u},{x:h+o-u,y:f+u},{x:h+o-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f},{x:h,y:f}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=Rr(m),b=p.path(y,g),w=Rr(v),S=p.path(w,{...g,fill:"none"}),T=i.insert(()=>S,":first-child");return T.insert(()=>b,":first-child"),T.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)+u-(a.y-(a.top??0))})`),Pt(e,T),e.intersect=function(E){return At.polygon(e,m,E)},i}async function rJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=l+u,f=-o/2,d=-h/2,p=5,{cssStyles:g}=e,m=Gh(f-p,d+h+p,f+o-p,d+h+p,u,.8),v=m?.[m.length-1],y=[{x:f-p,y:d+p},{x:f-p,y:d+h+p},...m,{x:f+o-p,y:v.y-p},{x:f+o,y:v.y-p},{x:f+o,y:v.y-2*p},{x:f+o+p,y:v.y-2*p},{x:f+o+p,y:d-p},{x:f+p,y:d-p},{x:f+p,y:d},{x:f,y:d},{x:f,y:d+p}],b=[{x:f,y:d+p},{x:f+o-p,y:d+p},{x:f+o-p,y:v.y-p},{x:f+o,y:v.y-p},{x:f+o,y:d},{x:f,y:d}],w=je.svg(i),S=Ot(e,{});e.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let T=Rr(y),E=w.path(T,S),A=Rr(b),C=w.path(A,S),I=i.insert(()=>E,":first-child");return I.insert(()=>C),I.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&I.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&I.selectAll("path").attr("style",n),I.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-(a.width/2)-p-(a.x-(a.left??0))}, ${-(a.height/2)+p-u/2-(a.y-(a.top??0))})`),Pt(e,I),e.intersect=function(M){return At.polygon(e,y,M)},i}async function nJ(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=_t(e);e.labelStyle=n,e.useHtmlLabels||or().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:o,label:l}=await jt(t,e,Ht(e)),u=Math.max(o.width+(e.padding??0)*2,e?.width??0),h=Math.max(o.height+(e.padding??0)*2,e?.height??0),f=-u/2,d=-h/2,{cssStyles:p}=e,g=je.svg(s),m=Ot(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let v=g.rectangle(f,d,u,h,m),y=s.insert(()=>v,":first-child");return y.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",i),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Pt(e,y),e.intersect=function(b){return At.rect(e,b)},s}async function iJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=a.width+e.padding,o=a.height+e.padding,l=s+o,u=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=je.svg(i),g=Ot(e,{}),m=C7e(0,0,l),v=p.path(m,g);f=i.insert(()=>v,":first-child").attr("transform",`translate(${-l/2+u}, ${l/2})`),d&&f.attr("style",d)}else f=qh(i,l,l,h),f.attr("transform",`translate(${-l/2+u}, ${l/2})`);return n&&f.attr("style",n),Pt(e,f),e.calcIntersect=function(p,g){let m=p.width,v=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],y=At.polygon(p,v,g);return{x:y.x-.5,y:y.y-.5}},e.intersect=function(p){return this.calcIntersect(e,p)},i}async function aJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),u=-o/2,h=-l/2,f=h/2,d=[{x:u+f,y:h},{x:u,y:0},{x:u+f,y:-h},{x:-u,y:-h},{x:-u,y:h}],{cssStyles:p}=e,g=je.svg(i),m=Ot(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let v=Rr(d),y=g.path(v,m),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-f/2},0)`),s.attr("transform",`translate(${-f/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Pt(e,b),e.intersect=function(w){return At.polygon(e,d,w)},i}async function sJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",n),l=e.description,u=e.label,h=o.node().appendChild(await Vh(u,e.labelStyle,!0,!0)),f={width:0,height:0};if($r(we()?.flowchart?.htmlLabels)){let C=h.children[0],I=He(h);f=C.getBoundingClientRect(),I.attr("width",f.width),I.attr("height",f.height)}J.info("Text 2",l);let d=l||[],p=h.getBBox(),g=o.node().appendChild(await Vh(d.join?d.join("
    "):d,e.labelStyle,!0,!0)),m=g.children[0],v=He(g);f=m.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height);let y=(e.padding||0)/2;He(g).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+y+5)+")"),He(h).attr("transform","translate( "+(f.width(J.debug("Rough node insert CXC",M),R),":first-child"),E=a.insert(()=>(J.debug("Rough node insert CXC",M),M),":first-child")}else E=s.insert("rect",":first-child"),A=s.insert("line"),E.attr("class","outer title-state").attr("style",n).attr("x",-f.width/2-y).attr("y",-f.height/2-y).attr("width",f.width+(e.padding||0)).attr("height",f.height+(e.padding||0)),A.attr("class","divider").attr("x1",-f.width/2-y).attr("x2",f.width/2+y).attr("y1",-f.height/2-y+p.height+y).attr("y2",-f.height/2-y+p.height+y);return Pt(e,E),e.intersect=function(C){return At.rect(e,C)},a}function Vy(t,e,r,n,i,a,s){let l=(t+r)/2,u=(e+n)/2,h=Math.atan2(n-e,r-t),f=(r-t)/2,d=(n-e)/2,p=f/i,g=d/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-m**2),y=l+v*a*Math.sin(h)*(s?-1:1),b=u-v*i*Math.cos(h)*(s?-1:1),w=Math.atan2((e-b)/a,(t-y)/i),T=Math.atan2((n-b)/a,(r-y)/i)-w;s&&T<0&&(T+=2*Math.PI),!s&&T>0&&(T-=2*Math.PI);let E=[];for(let A=0;A<20;A++){let C=A/19,I=w+C*T,M=y+i*Math.cos(I),R=b+a*Math.sin(I);E.push({x:M,y:R})}return E}async function oJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=e?.padding??0,o=e?.padding??0,l=(e?.width?e?.width:a.width)+s*2,u=(e?.height?e?.height:a.height)+o*2,h=e.radius||5,f=e.taper||5,{cssStyles:d}=e,p=je.svg(i),g=Ot(e,{});e.stroke&&(g.stroke=e.stroke),e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=[{x:-l/2+f,y:-u/2},{x:l/2-f,y:-u/2},...Vy(l/2-f,-u/2,l/2,-u/2+f,h,h,!0),{x:l/2,y:-u/2+f},{x:l/2,y:u/2-f},...Vy(l/2,u/2-f,l/2-f,u/2,h,h,!0),{x:l/2-f,y:u/2},{x:-l/2+f,y:u/2},...Vy(-l/2+f,u/2,-l/2,u/2-f,h,h,!0),{x:-l/2,y:u/2-f},{x:-l/2,y:-u/2+f},...Vy(-l/2,-u/2+f,-l/2+f,-u/2,h,h,!0)],v=Rr(m),y=p.path(v,g),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),d&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),Pt(e,b),e.intersect=function(w){return At.polygon(e,m,w)},i}async function lJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=e?.padding??0,l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=-a.width/2-o,f=-a.height/2-o,{cssStyles:d}=e,p=je.svg(i),g=Ot(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=[{x:h,y:f},{x:h+l+8,y:f},{x:h+l+8,y:f+u},{x:h-8,y:f+u},{x:h-8,y:f},{x:h,y:f},{x:h,y:f+u}],v=p.polygon(m.map(b=>[b.x,b.y]),g),y=i.insert(()=>v,":first-child");return y.attr("class","basic label-container").attr("style",ta(d)),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),d&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-l/2+4+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-(a.y-(a.top??0))})`),Pt(e,y),e.intersect=function(b){return At.rect(e,b)},i}async function cJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=-o/2,h=-l/2,{cssStyles:f}=e,d=je.svg(i),p=Ot(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=[{x:u,y:h},{x:u,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h-l/2}],m=Rr(g),v=d.path(m,p),y=i.insert(()=>v,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),Pt(e,y),e.intersect=function(b){return At.polygon(e,g,b)},i}async function uJ(t,e){let r={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return dw(t,e,r)}async function hJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=a.height+e.padding,o=a.width+s/4+e.padding,l=s/2,{cssStyles:u}=e,h=je.svg(i),f=Ot(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=[{x:-o/2+l,y:-s/2},{x:o/2-l,y:-s/2},...qy(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},...qy(o/2-l,0,l,50,270,450)],p=Rr(d),g=h.path(p,f),m=i.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),u&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",u),n&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),Pt(e,m),e.intersect=function(v){return At.polygon(e,d,v)},i}async function fJ(t,e){return dw(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function dJ(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=_t(e);e.labelStyle=n;let{cssStyles:a}=e,{lineColor:s,stateBorder:o,nodeBorder:l}=r,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=je.svg(u),f=Ot(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=h.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),p=o??l,g=h.circle(0,0,5,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=u.insert(()=>d,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),i&&m.selectAll("path").attr("style",i),Pt(e,m),e.intersect=function(v){return At.circle(e,7,v)},u}function pJ(t,e,{config:{themeVariables:r}}){let{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if(e.look==="handDrawn"){let o=je.svg(i).circle(0,0,14,ej(n));a=i.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Pt(e,a),e.intersect=function(s){return At.circle(e,7,s)},i}async function gJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=(e?.padding||0)/2,o=a.width+e.padding,l=a.height+e.padding,u=-a.width/2-s,h=-a.height/2-s,f=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(e.look==="handDrawn"){let d=je.svg(i),p=Ot(e,{}),g=d.rectangle(u-8,h,o+16,l,p),m=d.line(u,h,u,h+l,p),v=d.line(u+o,h,u+o,h+l,p);i.insert(()=>m,":first-child"),i.insert(()=>v,":first-child");let y=i.insert(()=>g,":first-child"),{cssStyles:b}=e;y.attr("class","basic label-container").attr("style",ta(b)),Pt(e,y)}else{let d=qh(i,o,l,f);n&&d.attr("style",n),Pt(e,d)}return e.intersect=function(d){return At.polygon(e,f,d)},i}async function mJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),o=Math.max(a.height+(e.padding??0)*2,e?.height??0),l=-s/2,u=-o/2,h=.2*o,f=.2*o,{cssStyles:d}=e,p=je.svg(i),g=Ot(e,{}),m=[{x:l-h/2,y:u},{x:l+s+h/2,y:u},{x:l+s+h/2,y:u+o},{x:l-h/2,y:u+o}],v=[{x:l+s-h/2,y:u+o},{x:l+s+h/2,y:u+o},{x:l+s+h/2,y:u+o-f}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=Rr(m),b=p.path(y,g),w=Rr(v),S=p.path(w,{...g,fillStyle:"solid"}),T=i.insert(()=>S,":first-child");return T.insert(()=>b,":first-child"),T.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),Pt(e,T),e.intersect=function(E){return At.polygon(e,m,E)},i}async function vJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=.2*o,f=.2*l,d=l+u,{cssStyles:p}=e,g=je.svg(i),m=Ot(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let v=[{x:-o/2-o/2*.1,y:d/2},...Gh(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,u,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],y=-o/2+o/2*.1,b=-d/2-f*.4,w=[{x:y+o-h,y:(b+l)*1.4},{x:y+o,y:b+l-f},{x:y+o,y:(b+l)*.9},...Gh(y+o,(b+l)*1.3,y+o-h,(b+l)*1.5,-l*.03,.5)],S=Rr(v),T=g.path(S,m),E=Rr(w),A=g.path(E,{...m,fillStyle:"solid"}),C=i.insert(()=>A,":first-child");return C.insert(()=>T,":first-child"),C.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),Pt(e,C),e.intersect=function(I){return At.polygon(e,v,I)},i}async function yJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=Math.max(a.width+e.padding,e?.width||0),o=Math.max(a.height+e.padding,e?.height||0),l=-s/2,u=-o/2,h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",u).attr("width",s).attr("height",o),Pt(e,h),e.intersect=function(f){return At.rect(e,f)},i}async function xJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s,halfPadding:o}=await jt(t,e,Ht(e)),l=e.look==="neo"?o*2:o,u=a.height+l,h=u/2,f=h/(2.5+u/50),d=a.width+f+l,{cssStyles:p}=e,g;if(e.look==="handDrawn"){let m=je.svg(i),v=_7e(0,0,d,u,f,h),y=L7e(0,0,d,u,f,h),b=m.path(v,Ot(e,{})),w=m.path(y,Ot(e,{fill:"none"}));g=i.insert(()=>w,":first-child"),g=i.insert(()=>b,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{let m=A7e(0,0,d,u,f,h);g=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",ta(p)).attr("style",n),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",f),g.attr("transform",`translate(${-d/2}, ${u/2} )`),s.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Pt(e,g),e.intersect=function(m){let v=At.rect(e,m),y=v.y-(e.y??0);if(h!=0&&(Math.abs(y)<(e.height??0)/2||Math.abs(y)==(e.height??0)/2&&Math.abs(v.x-(e.x??0))>(e.width??0)/2-f)){let b=f*f*(1-y*y/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=f-b,m.x-(e.x??0)>0&&(b=-b),v.x+=b}return v},i}async function bJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=a.width+e.padding,o=a.height+e.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=je.svg(i),d=Ot(e,{}),p=Rr(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=qh(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Pt(e,u),e.intersect=function(f){return At.polygon(e,l,f)},i}async function wJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=60,o=20,l=Math.max(s,a.width+(e.padding??0)*2,e?.width??0),u=Math.max(o,a.height+(e.padding??0)*2,e?.height??0),{cssStyles:h}=e,f=je.svg(i),d=Ot(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],g=Rr(p),m=f.path(g,d),v=i.insert(()=>m,":first-child");return v.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),Pt(e,v),e.intersect=function(y){return At.polygon(e,p,y)},i}async function TJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=$r(we().flowchart?.htmlLabels),l=a.width+(e.padding??0),u=l+a.height,h=l+a.height,f=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-u}],{cssStyles:d}=e,p=je.svg(i),g=Ot(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=Rr(f),v=p.path(m,g),y=i.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),e.width=l,e.height=u,Pt(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${u/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(b){return J.info("Triangle intersect",e,f,b),At.polygon(e,f,b)},i}async function kJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/8,h=l+u,{cssStyles:f}=e,p=70-o,g=p>0?p/2:0,m=je.svg(i),v=Ot(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let y=[{x:-o/2-g,y:h/2},...Gh(-o/2-g,h/2,o/2+g,h/2,u,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],b=Rr(y),w=m.path(b,v),S=i.insert(()=>w,":first-child");return S.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u-(a.y-(a.top??0))})`),Pt(e,S),e.intersect=function(T){return At.polygon(e,y,T)},i}async function EJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await jt(t,e,Ht(e)),s=100,o=50,l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=l/u,f=l,d=u;f>d*h?d=f/h:f=d*h,f=Math.max(f,s),d=Math.max(d,o);let p=Math.min(d*.2,d/4),g=d+p*2,{cssStyles:m}=e,v=je.svg(i),y=Ot(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let b=[{x:-f/2,y:g/2},...Gh(-f/2,g/2,f/2,g/2,p,1),{x:f/2,y:-g/2},...Gh(f/2,-g/2,-f/2,-g/2,p,-1)],w=Rr(b),S=v.path(w,y),T=i.insert(()=>S,":first-child");return T.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),Pt(e,T),e.intersect=function(E){return At.polygon(e,b,E)},i}async function SJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await jt(t,e,Ht(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=5,h=-o/2,f=-l/2,{cssStyles:d}=e,p=je.svg(i),g=Ot(e,{}),m=[{x:h-u,y:f-u},{x:h-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f-u}],v=`M${h-u},${f-u} L${h+o},${f-u} L${h+o},${f+l} L${h-u},${f+l} L${h-u},${f-u} M${h-u},${f} L${h+o},${f} M${h},${f-u} L${h},${f+l}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=p.path(v,g),b=i.insert(()=>y,":first-child");return b.attr("transform",`translate(${u/2}, ${u/2})`),b.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+u/2-(a.x-(a.left??0))}, ${-(a.height/2)+u/2-(a.y-(a.top??0))})`),Pt(e,b),e.intersect=function(w){return At.polygon(e,m,w)},i}async function f9(t,e){let r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){let{themeVariables:U}=or(),{background:X}=U,ee={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${X}`]};await f9(t,ee)}let n=or();e.useHtmlLabels=n.htmlLabels;let i=n.er?.diagramPadding??10,a=n.er?.entityPadding??6,{cssStyles:s}=e,{labelStyles:o,nodeStyles:l}=_t(e);if(r.attributes.length===0&&e.label){let U={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5,classes:""};ea(e.label,n)+U.labelPaddingX*20){let U=f.width+i*2-(m+v+y+b);m+=U/T,v+=U/T,y>0&&(y+=U/T),b>0&&(b+=U/T)}let A=m+v+y+b,C=je.svg(h),I=Ot(e,{});e.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let M=0;g.length>0&&(M=g.reduce((U,X)=>U+(X?.rowHeight??0),0));let R=Math.max(E.width+i*2,e?.width||0,A),k=Math.max((M??0)+f.height,e?.height||0),L=-R/2,_=-k/2;h.selectAll("g:not(:first-child)").each((U,X,ee)=>{let Y=He(ee[X]),oe=Y.attr("transform"),Q=0,ue=0;if(oe){let te=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(oe);te&&(Q=parseFloat(te[1]),ue=parseFloat(te[2]),Y.attr("class").includes("attribute-name")?Q+=m:Y.attr("class").includes("attribute-keys")?Q+=m+v:Y.attr("class").includes("attribute-comment")&&(Q+=m+v+y))}Y.attr("transform",`translate(${L+i/2+Q}, ${ue+_+f.height+a/2})`)}),h.select(".name").attr("transform","translate("+-f.width/2+", "+(_+a/2)+")");let D=C.rectangle(L,_,R,k,I),N=h.insert(()=>D,":first-child").attr("style",s.join("")),{themeVariables:O}=or(),{rowEven:P,rowOdd:B,nodeBorder:G}=O;p.push(0);for(let[U,X]of g.entries()){let Y=(U+1)%2===0&&X.yOffset!==0,oe=C.rectangle(L,f.height+_+X?.yOffset,R,X?.rowHeight,{...I,fill:Y?P:B,stroke:G});h.insert(()=>oe,"g.label").attr("style",s.join("")).attr("class",`row-rect-${Y?"even":"odd"}`)}let $=C.line(L,f.height+_,R+L,f.height+_,I);h.insert(()=>$).attr("class","divider"),$=C.line(m+L,f.height+_,m+L,k+_,I),h.insert(()=>$).attr("class","divider"),w&&($=C.line(m+v+L,f.height+_,m+v+L,k+_,I),h.insert(()=>$).attr("class","divider")),S&&($=C.line(m+v+y+L,f.height+_,m+v+y+L,k+_,I),h.insert(()=>$).attr("class","divider"));for(let U of p)$=C.line(L,f.height+_+U,R+L,f.height+_+U,I),h.insert(()=>$).attr("class","divider");if(Pt(e,N),l&&e.look!=="handDrawn"){let X=l.split(";")?.filter(ee=>ee.includes("stroke"))?.map(ee=>`${ee}`).join("; ");h.selectAll("path").attr("style",X??""),h.selectAll(".row-rect-even path").attr("style",l)}return e.intersect=function(U){return At.rect(e,U)},h}async function Jp(t,e,r,n=0,i=0,a=[],s=""){let o=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",s);e!==jl(e)&&(e=jl(e),e=e.replaceAll("<","<").replaceAll(">",">"));let l=o.node().appendChild(await ra(o,e,{width:ea(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let u=l.getBBox();if($r(r.htmlLabels)){let h=l.children[0];h.style.textAlign="start";let f=He(l);u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}return u}async function CJ(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",Ht(e)).attr("id",e.domId||e.id),o=null,l=null,u=null,h=null,f=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let b=e.annotations[0];await Uy(o,{text:`\xAB${b}\xBB`},0),f=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await Uy(l,e,0,["font-weight: bolder"]);let g=l.node().getBBox();d=g.height,u=s.insert("g").attr("class","members-group text");let m=0;for(let b of e.members){let w=await Uy(u,b,m,[b.parseClassifier()]);m+=w+a}p=u.node().getBBox().height,p<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let v=0;for(let b of e.methods){let w=await Uy(h,b,v,[b.parseClassifier()]);v+=w+a}let y=s.node().getBBox();if(o!==null){let b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${f})`),y=s.node().getBBox(),u.attr("transform",`translate(0, ${f+d+i*2})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${f+d+(p?p+i*4:i*2)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function Uy(t,e,r,n=[]){let i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=or(),s="useHtmlLabels"in e?e.useHtmlLabels:$r(a.htmlLabels)??!0,o="";"text"in e?o=e.text:o=e.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Dn(o)&&(s=!0);let l=await ra(i,K4(As(o)),{width:ea(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),u,h=1;if(s){let f=l.children[0],d=He(l);h=f.innerHTML.split("
    ").length,f.innerHTML.includes("")&&(h+=f.innerHTML.split("").length-1);let p=f.getElementsByTagName("img");if(p){let g=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(v=>{function y(){if(m.style.display="flex",m.style.flexDirection="column",g){let b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,S=parseInt(b,10)*5+"px";m.style.minWidth=S,m.style.maxWidth=S}else m.style.width="100%";v(m)}x(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{n.includes("font-weight: bolder")&&He(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;let f=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(f.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),u=l.getBBox()}return i.attr("transform","translate(0,"+(-u.height/(2*h)+r)+")"),u.height}async function AJ(t,e){let r=we(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??$r(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:o,bbox:l}=await CJ(t,e,r,a,i),{labelStyles:u,nodeStyles:h}=_t(e);e.labelStyle=u,e.cssStyles=s.styles||"";let f=s.styles?.join(";")||h||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let d=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,p=je.svg(o),g=Ot(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=l.width,v=l.height;s.members.length===0&&s.methods.length===0?v+=i:s.members.length>0&&s.methods.length===0&&(v+=i*2);let y=-m/2,b=-v/2,w=p.rectangle(y-n,b-n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0),m+2*n,v+2*n+(d?n*2:s.members.length===0&&s.methods.length===0?-n:0),g),S=o.insert(()=>w,":first-child");S.attr("class","basic label-container");let T=S.node().getBBox();o.selectAll(".text").each((I,M,R)=>{let k=He(R[M]),L=k.attr("transform"),_=0;if(L){let P=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(L);P&&(_=parseFloat(P[2]))}let D=_+b+n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(D-=4);let N=y;(k.attr("class").includes("label-group")||k.attr("class").includes("annotation-group"))&&(N=-k.node()?.getBBox().width/2||0,o.selectAll("text").each(function(O,P,B){window.getComputedStyle(B[P]).textAnchor==="middle"&&(N=0)})),k.attr("transform",`translate(${N}, ${D})`)});let E=o.select(".annotation-group").node().getBBox().height-(d?n/2:0)||0,A=o.select(".label-group").node().getBBox().height-(d?n/2:0)||0,C=o.select(".members-group").node().getBBox().height-(d?n/2:0)||0;if(s.members.length>0||s.methods.length>0||d){let I=p.line(T.x,E+A+b+n,T.x+T.width,E+A+b+n,g);o.insert(()=>I).attr("class","divider").attr("style",f)}if(d||s.members.length>0||s.methods.length>0){let I=p.line(T.x,E+A+C+b+i*2+n,T.x+T.width,E+A+C+b+n+i*2,g);o.insert(()=>I).attr("class","divider").attr("style",f)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",f),S.select(":nth-child(2)").attr("style",f),o.selectAll(".divider").select("path").attr("style",f),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",f),!a){let I=RegExp(/color\s*:\s*([^;]*)/),M=I.exec(f);if(M){let R=M[0].replace("color","fill");o.selectAll("tspan").attr("style",R)}else if(u){let R=I.exec(u);if(R){let k=R[0].replace("color","fill");o.selectAll("tspan").attr("style",k)}}}return Pt(e,S),e.intersect=function(I){return At.rect(e,I)},o}async function _J(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let i=e,a=e,s=20,o=20,l="verifyMethod"in e,u=Ht(e),h=t.insert("g").attr("class",u).attr("id",e.domId??e.id),f;l?f=await gc(h,`<<${i.type}>>`,0,e.labelStyle):f=await gc(h,"<<Element>>",0,e.labelStyle);let d=f,p=await gc(h,i.name,d,e.labelStyle+"; font-weight: bold;");if(d+=p+o,l){let E=await gc(h,`${i.requirementId?`ID: ${i.requirementId}`:""}`,d,e.labelStyle);d+=E;let A=await gc(h,`${i.text?`Text: ${i.text}`:""}`,d,e.labelStyle);d+=A;let C=await gc(h,`${i.risk?`Risk: ${i.risk}`:""}`,d,e.labelStyle);d+=C,await gc(h,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,d,e.labelStyle)}else{let E=await gc(h,`${a.type?`Type: ${a.type}`:""}`,d,e.labelStyle);d+=E,await gc(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,d,e.labelStyle)}let g=(h.node()?.getBBox().width??200)+s,m=(h.node()?.getBBox().height??200)+s,v=-g/2,y=-m/2,b=je.svg(h),w=Ot(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let S=b.rectangle(v,y,g,m,w),T=h.insert(()=>S,":first-child");if(T.attr("class","basic label-container").attr("style",n),h.selectAll(".label").each((E,A,C)=>{let I=He(C[A]),M=I.attr("transform"),R=0,k=0;if(M){let N=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(M);N&&(R=parseFloat(N[1]),k=parseFloat(N[2]))}let L=k-m/2,_=v+s/2;(A===0||A===1)&&(_=R),I.attr("transform",`translate(${_}, ${L+s})`)}),d>f+p+o){let E=b.line(v,y+f+p+o,v+g,y+f+p+o,w);h.insert(()=>E).attr("style",n)}return Pt(e,T),e.intersect=function(E){return At.rect(e,E)},h}async function gc(t,e,r,n=""){if(e==="")return 0;let i=t.insert("g").attr("class","label").attr("style",n),a=we(),s=a.htmlLabels??!0,o=await ra(i,K4(As(e)),{width:ea(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),l;if(s){let u=o.children[0],h=He(o);l=u.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{let u=o.children[0];for(let h of u.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),n&&h.setAttribute("style",n);l=o.getBBox(),l.height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}async function LJ(t,e,{config:r}){let{labelStyles:n,nodeStyles:i}=_t(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:o,bbox:l,label:u}=await jt(t,e,Ht(e)),h=e.padding||10,f="",d;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let p={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},g,m;d?{label:g,bbox:m}=await l9(d,"ticket"in e&&e.ticket||"",p):{label:g,bbox:m}=await l9(o,"ticket"in e&&e.ticket||"",p);let{label:v,bbox:y}=await l9(o,"assigned"in e&&e.assigned||"",p);e.width=s;let b=10,w=e?.width||0,S=Math.max(m.height,y.height)/2,T=Math.max(l.height+b*2,e?.height||0)+S,E=-w/2,A=-T/2;u.attr("transform","translate("+(h-w/2)+", "+(-S-l.height/2)+")"),g.attr("transform","translate("+(h-w/2)+", "+(-S+l.height/2)+")"),v.attr("transform","translate("+(h+w/2-y.width-2*a)+", "+(-S+l.height/2)+")");let C,{rx:I,ry:M}=e,{cssStyles:R}=e;if(e.look==="handDrawn"){let k=je.svg(o),L=Ot(e,{}),_=I||M?k.path(Uh(E,A,w,T,I||0),L):k.rectangle(E,A,w,T,L);C=o.insert(()=>_,":first-child"),C.attr("class","basic label-container").attr("style",R||null)}else{C=o.insert("rect",":first-child"),C.attr("class","basic label-container __APA__").attr("style",i).attr("rx",I??5).attr("ry",M??5).attr("x",E).attr("y",A).attr("width",w).attr("height",T);let k="priority"in e&&e.priority;if(k){let L=o.append("line"),_=E+2,D=A+Math.floor((I??0)/2),N=A+T-Math.floor((I??0)/2);L.attr("x1",_).attr("y1",D).attr("x2",_).attr("y2",N).attr("stroke-width","4").attr("stroke",R7e(k))}}return Pt(e,C),e.height=T,e.intersect=function(k){return At.rect(e,k)},o}async function RJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await jt(t,e,Ht(e)),l=a.width+10*s,u=a.height+8*s,h=.15*l,{cssStyles:f}=e,d=a.width+20,p=a.height+20,g=Math.max(l,d),m=Math.max(u,p);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let v,y=`M0 0 a${h},${h} 1 0,0 ${g*.25},${-1*m*.1} a${h},${h} 1 0,0 ${g*.25},0 a${h},${h} 1 0,0 ${g*.25},0 a${h},${h} 1 0,0 ${g*.25},${m*.1} a${h},${h} 1 0,0 ${g*.15},${m*.33} a${h*.8},${h*.8} 1 0,0 0,${m*.34} a${h},${h} 1 0,0 ${-1*g*.15},${m*.33} a${h},${h} 1 0,0 ${-1*g*.25},${m*.15} a${h},${h} 1 0,0 ${-1*g*.25},0 a${h},${h} 1 0,0 ${-1*g*.25},0 a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15} a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33} a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34} a${h},${h} 1 0,0 ${g*.1},${-1*m*.33} H0 V0 Z`;if(e.look==="handDrawn"){let b=je.svg(i),w=Ot(e,{}),S=b.path(y,w);v=i.insert(()=>S,":first-child"),v.attr("class","basic label-container").attr("style",ta(f))}else v=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",y);return v.attr("transform",`translate(${-g/2}, ${-m/2})`),Pt(e,v),e.calcIntersect=function(b,w){return At.rect(b,w)},e.intersect=function(b){return J.info("Bang intersect",e,b),At.rect(e,b)},i}async function IJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await jt(t,e,Ht(e)),l=a.width+2*s,u=a.height+2*s,h=.15*l,f=.25*l,d=.35*l,p=.2*l,{cssStyles:g}=e,m,v=`M0 0 a${h},${h} 0 0,1 ${l*.25},${-1*l*.1} a${d},${d} 1 0,1 ${l*.4},${-1*l*.1} a${f},${f} 1 0,1 ${l*.35},${l*.2} a${h},${h} 1 0,1 ${l*.15},${u*.35} a${p},${p} 1 0,1 ${-1*l*.15},${u*.65} a${f},${h} 1 0,1 ${-1*l*.25},${l*.15} a${d},${d} 1 0,1 ${-1*l*.5},0 a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15} a${h},${h} 1 0,1 ${-1*l*.1},${-1*u*.35} a${p},${p} 1 0,1 ${l*.1},${-1*u*.65} H0 V0 Z`;if(e.look==="handDrawn"){let y=je.svg(i),b=Ot(e,{}),w=y.path(v,b);m=i.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",ta(g))}else m=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",v);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-u/2})`),Pt(e,m),e.calcIntersect=function(y,b){return At.rect(y,b)},e.intersect=function(y){return J.info("Cloud intersect",e,y),At.rect(e,y)},i}async function NJ(t,e){let{labelStyles:r,nodeStyles:n}=_t(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await jt(t,e,Ht(e)),l=a.width+8*s,u=a.height+2*s,h=5,f=` M${-l/2} ${u/2-h} v${-u+2*h} q0,-${h} ${h},-${h} h${l-2*h} q${h},0 ${h},${h} v${u-2*h} q0,${h} -${h},${h} h${-l+2*h} q-${h},0 -${h},-${h} Z `,d=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",f);return i.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",u/2).attr("x2",l/2).attr("y2",u/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>o.node()),Pt(e,d),e.calcIntersect=function(p,g){return At.rect(p,g)},e.intersect=function(p){return At.rect(e,p)},i}async function DJ(t,e){let r={padding:e.padding??0};return h9(t,e,r)}function d9(t){return t in MJ}async function Fd(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?MJ[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),pw.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var jt,l9,Pt,Ht,l7e,eg,c7e,Vh,Uh,gQ,u7e,h7e,f7e,d7e,p7e,g7e,mQ,tg,vQ,m7e,bQ,v7e,y7e,x7e,At,b7e,w7e,T7e,k7e,E7e,S7e,C7e,A7e,_7e,L7e,R7e,I7e,N7e,MJ,pw,OJ,PJ,Wy,Ls=F(()=>{ja();Ka();na();hn();vr();rr();cr();cr();Bt();cr();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();cr();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();Bt();cr();cr();Bt();cr();Bt();cr();Bt();Bt();Bt();jt=x(async(t,e,r)=>{let n,i=e.useHtmlLabels||$r(we()?.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",ta(e.labelStyle)),o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];let l=await ra(s,ar(As(o),we()),{useHtmlLabels:i,width:e.width||we().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),u=l.getBBox(),h=(e?.padding??0)/2;if(i){let f=l.children[0],d=He(l),p=f.getElementsByTagName("img");if(p){let g=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(v=>{function y(){if(m.style.display="flex",m.style.flexDirection="column",g){let b=we().fontSize?we().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[S=sr.fontSize]=fc(b),T=S*w+"px";m.style.minWidth=T,m.style.maxWidth=T}else m.style.width="100%";v(m)}x(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}return i?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:h,label:s}},"labelHelper"),l9=x(async(t,e,r)=>{let n=r.useHtmlLabels||$r(we()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await ra(i,ar(As(e),we()),{useHtmlLabels:n,width:r.width||we()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2;if($r(we()?.flowchart?.htmlLabels)){let l=a.children[0],u=He(a);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}return 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"),Pt=x((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),Ht=x((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");x(Rr,"createPathFromPoints");x(Gh,"generateFullSineWavePoints");x(qy,"generateCirclePoints");l7e=x((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),eg=l7e;x(dQ,"applyStyle");x(pQ,"addHtmlLabel");c7e=x(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),$r(we().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),J.info("vertexText"+i);let a={isNode:n,label:As(i).replace(/fa[blrs]?:fa-[\w-]+/g,o=>``),labelStyle:e&&e.replace("fill:","color:")};return await pQ(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(let o of s){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Vh=c7e,Uh=x((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"),gQ=x(async(t,e)=>{J.info("Creating subgraph rect for ",e.id,e);let r=we(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=_t(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=$r(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),g=await ra(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0}),m=g.getBBox();if($r(r.flowchart.htmlLabels)){let A=g.children[0],C=He(g);m=A.getBoundingClientRect(),C.attr("width",m.width),C.attr("height",m.height)}let v=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let y=e.height,b=e.x-v/2,w=e.y-y/2;J.trace("Data ",e,JSON.stringify(e));let S;if(e.look==="handDrawn"){let A=je.svg(f),C=Ot(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),I=A.path(Uh(b,w,v,y,0),C);S=f.insert(()=>(J.debug("Rough node insert CXC",I),I),":first-child"),S.select("path:nth-child(2)").attr("style",u.join(";")),S.select("path").attr("style",h.join(";").replace("fill","stroke"))}else S=f.insert("rect",":first-child"),S.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",v).attr("height",y);let{subGraphTitleTopMargin:T}=bu(r);if(p.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+T})`),o){let A=p.select("span");A&&A.attr("style",o)}let E=S.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=m.height-e.padding/2,e.intersect=function(A){return eg(e,A)},{cluster:f,labelBBox:m}},"rect"),u7e=x((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return eg(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),h7e=x(async(t,e)=>{let r=we(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=f.node().appendChild(await Vh(e.label,e.labelStyle,void 0,!0)),g=p.getBBox();if($r(r.flowchart.htmlLabels)){let I=p.children[0],M=He(p);g=I.getBoundingClientRect(),M.attr("width",g.width),M.attr("height",g.height)}let m=0*e.padding,v=m/2,y=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+m;e.width<=g.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+m,w=e.height+m-g.height-6,S=e.x-y/2,T=e.y-b/2;e.width=y;let E=e.y-e.height/2-v+g.height+2,A;if(e.look==="handDrawn"){let I=e.cssClasses.includes("statediagram-cluster-alt"),M=je.svg(u),R=e.rx||e.ry?M.path(Uh(S,T,y,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):M.rectangle(S,T,y,b,{seed:i});A=u.insert(()=>R,":first-child");let k=M.rectangle(S,E,y,w,{fill:I?a:s,fillStyle:I?"hachure":"solid",stroke:l,seed:i});A=u.insert(()=>R,":first-child"),d=u.insert(()=>k)}else A=h.insert("rect",":first-child"),A.attr("class","outer").attr("x",S).attr("y",T).attr("width",y).attr("height",b).attr("data-look",e.look),d.attr("class","inner").attr("x",S).attr("y",E).attr("width",y).attr("height",w);f.attr("transform",`translate(${e.x-g.width/2}, ${T+1-($r(r.flowchart.htmlLabels)?0:3)})`);let C=A.node().getBBox();return e.height=C.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(I){return eg(e,I)},{cluster:u,labelBBox:g}},"roundedWithTitle"),f7e=x(async(t,e)=>{J.info("Creating subgraph rect for ",e.id,e);let r=we(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=_t(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=$r(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),g=await ra(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width}),m=g.getBBox();if($r(r.flowchart.htmlLabels)){let A=g.children[0],C=He(g);m=A.getBoundingClientRect(),C.attr("width",m.width),C.attr("height",m.height)}let v=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let y=e.height,b=e.x-v/2,w=e.y-y/2;J.trace("Data ",e,JSON.stringify(e));let S;if(e.look==="handDrawn"){let A=je.svg(f),C=Ot(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),I=A.path(Uh(b,w,v,y,e.rx),C);S=f.insert(()=>(J.debug("Rough node insert CXC",I),I),":first-child"),S.select("path:nth-child(2)").attr("style",u.join(";")),S.select("path").attr("style",h.join(";").replace("fill","stroke"))}else S=f.insert("rect",":first-child"),S.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",v).attr("height",y);let{subGraphTitleTopMargin:T}=bu(r);if(p.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+T})`),o){let A=p.select("span");A&&A.attr("style",o)}let E=S.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=m.height-e.padding/2,e.intersect=function(A){return eg(e,A)},{cluster:f,labelBBox:m}},"kanbanSection"),d7e=x((t,e)=>{let r=we(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),l=0*e.padding,u=e.width+l;e.diff=-e.padding;let h=e.height+l,f=e.x-u/2,d=e.y-h/2;e.width=u;let p;if(e.look==="handDrawn"){let v=je.svg(s).rectangle(f,d,u,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});p=s.insert(()=>v,":first-child")}else p=o.insert("rect",":first-child"),p.attr("class","divider").attr("x",f).attr("y",d).attr("width",u).attr("height",h).attr("data-look",e.look);let g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(m){return eg(e,m)},{cluster:s,labelBBox:{}}},"divider"),p7e=gQ,g7e={rect:gQ,squareRect:p7e,roundedWithTitle:h7e,noteGroup:u7e,divider:d7e,kanbanSection:f7e},mQ=new Map,tg=x(async(t,e)=>{let r=e.shape||"rect",n=await g7e[r](t,e);return mQ.set(e.id,n),n},"insertCluster"),vQ=x(()=>{mQ=new Map},"clear");x(yQ,"intersectNode");m7e=yQ;x(xQ,"intersectEllipse");bQ=xQ;x(wQ,"intersectCircle");v7e=wQ;x(TQ,"intersectLine");x(c9,"sameSign");y7e=TQ;x(kQ,"intersectPolygon");x7e=kQ,At={node:m7e,circle:v7e,ellipse:bQ,polygon:x7e,rect:eg};x(EQ,"anchor");x(u9,"generateArcPoints");x(SQ,"bowTieRect");x(qh,"insertPolygonShape");x(CQ,"card");x(AQ,"choice");x(h9,"circle");x(_Q,"createLine");x(LQ,"crossedCircle");x(Au,"generateCirclePoints");x(RQ,"curlyBraceLeft");x(_u,"generateCirclePoints");x(IQ,"curlyBraceRight");x(ia,"generateCirclePoints");x(NQ,"curlyBraces");x(DQ,"curvedTrapezoid");b7e=x((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"),w7e=x((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"),T7e=x((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");x(MQ,"cylinder");x(OQ,"dividedRectangle");x(PQ,"doublecircle");x(BQ,"filledCircle");x(FQ,"flippedTriangle");x($Q,"forkJoin");x(zQ,"halfRoundedRectangle");x(GQ,"hexagon");x(VQ,"hourglass");x(UQ,"icon");x(qQ,"iconCircle");x(WQ,"iconRounded");x(HQ,"iconSquare");x(YQ,"imageSquare");x(XQ,"inv_trapezoid");x(dw,"drawRect");x(jQ,"labelRect");x(KQ,"lean_left");x(ZQ,"lean_right");x(QQ,"lightningBolt");k7e=x((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"),E7e=x((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"),S7e=x((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");x(JQ,"linedCylinder");x(eJ,"linedWaveEdgedRect");x(tJ,"multiRect");x(rJ,"multiWaveEdgedRectangle");x(nJ,"note");C7e=x((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");x(iJ,"question");x(aJ,"rect_left_inv_arrow");x(sJ,"rectWithTitle");x(Vy,"generateArcPoints");x(oJ,"roundedRect");x(lJ,"shadedProcess");x(cJ,"slopedRect");x(uJ,"squareRect");x(hJ,"stadium");x(fJ,"state");x(dJ,"stateEnd");x(pJ,"stateStart");x(gJ,"subroutine");x(mJ,"taggedRect");x(vJ,"taggedWaveEdgedRectangle");x(yJ,"text");A7e=x((t,e,r,n,i,a)=>`M${t},${e} a${i},${a} 0,0,1 0,${-n} l${r},0 a${i},${a} 0,0,1 0,${n} M${r},${-n} a${i},${a} 0,0,0 0,${n} l${-r},0`,"createCylinderPathD"),_7e=x((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"),L7e=x((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");x(xJ,"tiltedCylinder");x(bJ,"trapezoid");x(wJ,"trapezoidalPentagon");x(TJ,"triangle");x(kJ,"waveEdgedRectangle");x(EJ,"waveRectangle");x(SJ,"windowPane");x(f9,"erBox");x(Jp,"addText");x(CJ,"textHelper");x(Uy,"addText");x(AJ,"classBox");x(_J,"requirementBox");x(gc,"addText");R7e=x(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");x(LJ,"kanbanItem");x(RJ,"bang");x(IJ,"cloud");x(NJ,"defaultMindmapNode");x(DJ,"mindmapCircle");I7e=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:uJ},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:oJ},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:hJ},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:gJ},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:MQ},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:h9},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:RJ},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:IJ},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:iJ},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:GQ},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:ZQ},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:KQ},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:bJ},{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:XQ},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:PQ},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:yJ},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:CQ},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:lJ},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:pJ},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:dJ},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:$Q},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:VQ},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:RQ},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:IQ},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:NQ},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:QQ},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:kJ},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:zQ},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:xJ},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:JQ},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:DQ},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:OQ},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:TJ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:SJ},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:BQ},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:wJ},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:FQ},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:cJ},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:rJ},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tJ},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:SQ},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:LQ},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:vJ},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:mJ},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:EJ},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:aJ},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:eJ}],N7e=x(()=>{let e=[...Object.entries({state:fJ,choice:AQ,note:nJ,rectWithTitle:sJ,labelRect:jQ,iconSquare:HQ,iconCircle:qQ,icon:UQ,iconRounded:WQ,imageSquare:YQ,anchor:EQ,kanbanItem:LJ,mindmapCircle:DJ,defaultMindmapNode:NJ,classBox:AJ,erBox:f9,requirementBox:_J}),...I7e.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),MJ=N7e();x(d9,"isValidShape");pw=new Map;x(Fd,"insertNode");OJ=x((t,e)=>{pw.set(e.id,t)},"setNodeElem"),PJ=x(()=>{pw.clear()},"clear"),Wy=x(t=>{let e=pw.get(t.id);J.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});function Yy(t,e){we().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function GJ(t){let e=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}var D7e,M7e,BJ,gw,aa,zJ,Hy,mw,vw,O7e,P7e,FJ,$J,B7e,yw,F7e,$7e,z7e,G7e,V7e,U7e,q7e,W7e,H7e,Y7e,X7e,j7e,K7e,Z7e,Q7e,J7e,eAe,xw,Io=F(()=>{Ks();Ls();ja();Ka();na();hn();vr();rr();cr();Bt();D7e=x((t,e,r,n,i,a)=>{e.arrowTypeStart&&BJ(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&BJ(t,"end",e.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),M7e={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}},BJ=x((t,e,r,n,i,a,s)=>{let o=M7e[r];if(!o){J.warn(`Unknown arrow type: ${r}`);return}let l=o.type,h=`${i}_${a}-${l}${e==="start"?"Start":"End"}`;if(s&&s.trim()!==""){let f=s.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${f}`;if(!document.getElementById(d)){let p=document.getElementById(h);if(p){let g=p.cloneNode(!0);g.id=d,g.querySelectorAll("path, circle, line").forEach(v=>{v.setAttribute("stroke",s),o.fill&&v.setAttribute("fill",s)}),p.parentNode?.appendChild(g)}}t.attr(`marker-${e}`,`url(${n}#${d})`)}else t.attr(`marker-${e}`,`url(${n}#${h})`)},"addEdgeMarker"),gw=new Map,aa=new Map,zJ=x(()=>{gw.clear(),aa.clear()},"clear"),Hy=x(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),mw=x(async(t,e)=>{let r=$r(we().flowchart.htmlLabels),n=await ra(t,e.label,{style:Hy(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});J.info("abc82",e,e.labelType);let i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);let s=n.getBBox();if(r){let l=n.children[0],u=He(n);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),gw.set(e.id,i),e.width=s.width,e.height=s.height;let o;if(e.startLabelLeft){let l=await Vh(e.startLabelLeft,Hy(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),aa.get(e.id)||aa.set(e.id,{}),aa.get(e.id).startLeft=u,Yy(o,e.startLabelLeft)}if(e.startLabelRight){let l=await Vh(e.startLabelRight,Hy(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=u.node().appendChild(l),h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),aa.get(e.id)||aa.set(e.id,{}),aa.get(e.id).startRight=u,Yy(o,e.startLabelRight)}if(e.endLabelLeft){let l=await Vh(e.endLabelLeft,Hy(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.node().appendChild(l),aa.get(e.id)||aa.set(e.id,{}),aa.get(e.id).endLeft=u,Yy(o,e.endLabelLeft)}if(e.endLabelRight){let l=await Vh(e.endLabelRight,Hy(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.node().appendChild(l),aa.get(e.id)||aa.set(e.id,{}),aa.get(e.id).endRight=u,Yy(o,e.endLabelRight)}return n},"insertEdgeLabel");x(Yy,"setTerminalWidth");vw=x((t,e)=>{J.debug("Moving label abc88 ",t.id,t.label,gw.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=we(),{subGraphTitleTotalMargin:i}=bu(n);if(t.label){let a=gw.get(t.id),s=t.x,o=t.y;if(r){let l=zt.calcLabelPosition(r);J.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){let a=aa.get(t.id).startLeft,s=t.x,o=t.y;if(r){let l=zt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let a=aa.get(t.id).startRight,s=t.x,o=t.y;if(r){let l=zt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let a=aa.get(t.id).endLeft,s=t.x,o=t.y;if(r){let l=zt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let a=aa.get(t.id).endRight,s=t.x,o=t.y;if(r){let l=zt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),O7e=x((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),P7e=x((t,e,r)=>{J.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,o=r.xMath.abs(n-e.x)*l){let f=r.y{J.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(J.info("abc88 checking point",a,e),!O7e(e,a)&&!i){let s=P7e(e,n,a);J.debug("abc88 inside",a,n,s),J.debug("abc88 intersection",s,e);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?J.warn("abc88 no intersect",s,r):r.push(s),i=!0}else J.warn("abc88 outside",a,n),n=a,i||r.push(a)}),J.debug("returning points",r),r},"cutPathAtIntersect");x(GJ,"extractCornerPoints");$J=x(function(t,e,r){let n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:e.x-s*n,y:e.y-s*i}},"findAdjacentPoint"),B7e=x(function(t){let{cornerPointPositions:e}=GJ(t),r=[];for(let n=0;n10&&Math.abs(a.y-i.y)>=10){J.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let p=5;s.x===o.x?d={x:u<0?o.x-p+f:o.x+p-f,y:h<0?o.y-f:o.y+f}:d={x:u<0?o.x-f:o.x+f,y:h<0?o.y-p+f:o.y+p-f}}else J.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(d,l)}else r.push(t[n]);return r},"fixCorners"),yw=x(function(t,e,r,n,i,a,s){let{handDrawnSeed:o}=we(),l=e.points,u=!1,h=i;var f=a;let d=[];for(let R in e.cssCompiledStyles)xy(R)||d.push(e.cssCompiledStyles[R]);f.intersect&&h.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(h.intersect(l[0])),J.debug("Last point APA12",e.start,"-->",e.end,l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1]))),e.toCluster&&(J.info("to cluster abc88",r.get(e.toCluster)),l=FJ(e.points,r.get(e.toCluster).node),u=!0),e.fromCluster&&(J.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=FJ(l.reverse(),r.get(e.fromCluster).node).reverse(),u=!0);let p=l.filter(R=>!Number.isNaN(R.y));p=B7e(p);let g=pl;switch(g=Eh,e.curve){case"linear":g=Eh;break;case"basis":g=pl;break;case"cardinal":g=ry;break;case"bumpX":g=Zv;break;case"bumpY":g=Qv;break;case"catmullRom":g=ay;break;case"monotoneX":g=sy;break;case"monotoneY":g=oy;break;case"natural":g=ly;break;case"step":g=cy;break;case"stepAfter":g=hy;break;case"stepBefore":g=uy;break;default:g=pl}let{x:m,y:v}=x5(e),y=ic().x(m).y(v).curve(g),b;switch(e.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(e.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let w,S=y(p),T=Array.isArray(e.style)?e.style:e.style?[e.style]:[],E=T.find(R=>R?.startsWith("stroke:"));if(e.look==="handDrawn"){let R=je.svg(t);Object.assign([],p);let k=R.path(S,{roughness:.3,seed:o});b+=" transition",w=He(k).select("path").attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",T?T.reduce((_,D)=>_+";"+D,""):"");let L=w.attr("d");w.attr("d",L),t.node().appendChild(w.node())}else{let R=d.join(";"),k=T?T.reduce((D,N)=>D+N+";",""):"",L="";e.animate&&(L=" edge-animation-fast"),e.animation&&(L=" edge-animation-"+e.animation);let _=R?R+";"+k+";":k;w=t.append("path").attr("d",S).attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")+(L??"")).attr("style",_),E=_.match(/stroke:([^;]+)/)?.[1]}let A="";(we().flowchart.arrowMarkerAbsolute||we().state.arrowMarkerAbsolute)&&(A=lu(!0)),J.info("arrowTypeStart",e.arrowTypeStart),J.info("arrowTypeEnd",e.arrowTypeEnd),D7e(w,e,A,s,n,E);let C=Math.floor(l.length/2),I=l[C];zt.isLabelCoordinateInPath(I,w.attr("d"))||(u=!0);let M={};return u&&(M.updatedPath=l),M.originalPath=e.points,M},"insertEdge"),F7e=x((t,e,r,n)=>{e.forEach(i=>{eAe[i](t,r,n)})},"insertMarkers"),$7e=x((t,e,r)=>{J.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"),z7e=x((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"),G7e=x((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"),V7e=x((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"),U7e=x((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"),q7e=x((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"),W7e=x((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"),H7e=x((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"),Y7e=x((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"),X7e=x((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"),j7e=x((t,e,r)=>{let 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");let 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");i.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"),K7e=x((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"),Z7e=x((t,e,r)=>{let 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");let 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");i.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"),Q7e=x((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"),J7e=x((t,e,r)=>{let n=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");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),eAe={extension:$7e,composition:z7e,aggregation:G7e,dependency:V7e,lollipop:U7e,point:q7e,circle:W7e,cross:H7e,barb:Y7e,only_one:X7e,zero_or_one:j7e,one_or_more:K7e,zero_or_more:Z7e,requirement_arrow:Q7e,requirement_contains:J7e},xw=F7e});function rAe(t){return typeof t=="symbol"||Zn(t)&&Ji(t)==tAe}var tAe,eo,$d=F(()=>{wu();Co();tAe="[object Symbol]";eo=rAe});function nAe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{Rs=nAe});function qJ(t){if(typeof t=="string")return t;if(It(t))return Rs(t,qJ)+"";if(eo(t))return UJ?UJ.call(t):"";var e=t+"";return e=="0"&&1/t==-iAe?"-0":e}var iAe,VJ,UJ,WJ,HJ=F(()=>{_d();zd();zn();$d();iAe=1/0,VJ=$i?$i.prototype:void 0,UJ=VJ?VJ.toString:void 0;WJ=qJ});function sAe(t){for(var e=t.length;e--&&aAe.test(t.charAt(e)););return e}var aAe,YJ,XJ=F(()=>{aAe=/\s/;YJ=sAe});function lAe(t){return t&&t.slice(0,YJ(t)+1).replace(oAe,"")}var oAe,jJ,KJ=F(()=>{XJ();oAe=/^\s+/;jJ=lAe});function dAe(t){if(typeof t=="number")return t;if(eo(t))return ZJ;if(bn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=bn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=jJ(t);var r=uAe.test(t);return r||hAe.test(t)?fAe(t.slice(2),r?2:8):cAe.test(t)?ZJ:+t}var ZJ,cAe,uAe,hAe,fAe,QJ,JJ=F(()=>{KJ();Zs();$d();ZJ=NaN,cAe=/^[-+]0x[0-9a-f]+$/i,uAe=/^0b[01]+$/i,hAe=/^0o[0-7]+$/i,fAe=parseInt;QJ=dAe});function gAe(t){if(!t)return t===0?t:0;if(t=QJ(t),t===eee||t===-eee){var e=t<0?-1:1;return e*pAe}return t===t?t:0}var eee,pAe,rg,p9=F(()=>{JJ();eee=1/0,pAe=17976931348623157e292;rg=gAe});function mAe(t){var e=rg(t),r=e%1;return e===e?r?e-r:e:0}var mc,ng=F(()=>{p9();mc=mAe});var vAe,bw,tee=F(()=>{Rh();Eo();vAe=Es(ni,"WeakMap"),bw=vAe});function yAe(){}var Jn,g9=F(()=>{Jn=yAe});function xAe(t,e){for(var r=-1,n=t==null?0:t.length;++r{ww=xAe});function bAe(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{Tw=bAe});function wAe(t){return t!==t}var ree,nee=F(()=>{ree=wAe});function TAe(t,e,r){for(var n=r-1,i=t.length;++n{iee=TAe});function kAe(t,e,r){return e===e?iee(t,e,r):Tw(t,ree,r)}var ig,kw=F(()=>{v9();nee();aee();ig=kAe});function EAe(t,e){var r=t==null?0:t.length;return!!r&&ig(t,e,0)>-1}var Ew,y9=F(()=>{kw();Ew=EAe});var SAe,see,oee=F(()=>{t_();SAe=R5(Object.keys,Object),see=SAe});function _Ae(t){if(!cc(t))return see(t);var e=[];for(var r in Object(t))AAe.call(t,r)&&r!="constructor"&&e.push(r);return e}var CAe,AAe,ag,Sw=F(()=>{qp();oee();CAe=Object.prototype,AAe=CAe.hasOwnProperty;ag=_Ae});function LAe(t){return ii(t)?O5(t):ag(t)}var zr,vc=F(()=>{s_();Sw();Ao();zr=LAe});var RAe,IAe,NAe,sa,lee=F(()=>{Xp();Dd();u_();Ao();qp();vc();RAe=Object.prototype,IAe=RAe.hasOwnProperty,NAe=F5(function(t,e){if(cc(e)||ii(e)){Ro(e,zr(e),t);return}for(var r in e)IAe.call(e,r)&&uc(t,r,e[r])}),sa=NAe});function OAe(t,e){if(It(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||eo(t)?!0:MAe.test(t)||!DAe.test(t)||e!=null&&t in Object(e)}var DAe,MAe,sg,Cw=F(()=>{zn();$d();DAe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,MAe=/^\w*$/;sg=OAe});function BAe(t){var e=Pp(t,function(n){return r.size===PAe&&r.clear(),n}),r=e.cache;return e}var PAe,cee,uee=F(()=>{X8();PAe=500;cee=BAe});var FAe,$Ae,zAe,hee,fee=F(()=>{uee();FAe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$Ae=/\\(\\)?/g,zAe=cee(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(FAe,function(r,n,i,a){e.push(i?a.replace($Ae,"$1"):n||r)}),e}),hee=zAe});function GAe(t){return t==null?"":WJ(t)}var Aw,x9=F(()=>{HJ();Aw=GAe});function VAe(t,e){return It(t)?t:sg(t,e)?[t]:hee(Aw(t))}var Wh,Xy=F(()=>{zn();Cw();fee();x9();Wh=VAe});function qAe(t){if(typeof t=="string"||eo(t))return t;var e=t+"";return e=="0"&&1/t==-UAe?"-0":e}var UAe,yc,og=F(()=>{$d();UAe=1/0;yc=qAe});function WAe(t,e){e=Wh(e,t);for(var r=0,n=e.length;t!=null&&r{Xy();og();Hh=WAe});function HAe(t,e,r){var n=t==null?void 0:Hh(t,e);return n===void 0?r:n}var dee,pee=F(()=>{jy();dee=HAe});function YAe(t,e){for(var r=-1,n=e.length,i=t.length;++r{lg=YAe});function XAe(t){return It(t)||ml(t)||!!(gee&&t&&t[gee])}var gee,mee,vee=F(()=>{_d();Wp();zn();gee=$i?$i.isConcatSpreadable:void 0;mee=XAe});function yee(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=mee),i||(i=[]);++a0&&r(o)?e>1?yee(o,e-1,r,n,i):lg(i,o):n||(i[i.length]=o)}return i}var xc,cg=F(()=>{_w();vee();xc=yee});function jAe(t){var e=t==null?0:t.length;return e?xc(t,1):[]}var Hr,Lw=F(()=>{cg();Hr=jAe});function KAe(t){return B5(P5(t,void 0,Hr),t+"")}var xee,bee=F(()=>{Lw();o_();c_();xee=KAe});function ZAe(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n{Rw=ZAe});function s8e(t){return a8e.test(t)}var QAe,JAe,e8e,t8e,r8e,n8e,i8e,a8e,wee,Tee=F(()=>{QAe="\\ud800-\\udfff",JAe="\\u0300-\\u036f",e8e="\\ufe20-\\ufe2f",t8e="\\u20d0-\\u20ff",r8e=JAe+e8e+t8e,n8e="\\ufe0e\\ufe0f",i8e="\\u200d",a8e=RegExp("["+i8e+QAe+r8e+n8e+"]");wee=s8e});function o8e(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i{kee=o8e});function l8e(t,e){return t&&Ro(e,zr(e),t)}var See,Cee=F(()=>{Dd();vc();See=l8e});function c8e(t,e){return t&&Ro(e,Ss(e),t)}var Aee,_ee=F(()=>{Dd();Bh();Aee=c8e});function u8e(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r{ug=u8e});function h8e(){return[]}var Nw,w9=F(()=>{Nw=h8e});var f8e,d8e,Lee,p8e,hg,Dw=F(()=>{Iw();w9();f8e=Object.prototype,d8e=f8e.propertyIsEnumerable,Lee=Object.getOwnPropertySymbols,p8e=Lee?function(t){return t==null?[]:(t=Object(t),ug(Lee(t),function(e){return d8e.call(t,e)}))}:Nw,hg=p8e});function g8e(t,e){return Ro(t,hg(t),e)}var Ree,Iee=F(()=>{Dd();Dw();Ree=g8e});var m8e,v8e,Mw,T9=F(()=>{_w();I5();Dw();w9();m8e=Object.getOwnPropertySymbols,v8e=m8e?function(t){for(var e=[];t;)lg(e,hg(t)),t=Up(t);return e}:Nw,Mw=v8e});function y8e(t,e){return Ro(t,Mw(t),e)}var Nee,Dee=F(()=>{Dd();T9();Nee=y8e});function x8e(t,e,r){var n=e(t);return It(t)?n:lg(n,r(t))}var Ow,k9=F(()=>{_w();zn();Ow=x8e});function b8e(t){return Ow(t,zr,hg)}var Ky,E9=F(()=>{k9();Dw();vc();Ky=b8e});function w8e(t){return Ow(t,Ss,Mw)}var Pw,S9=F(()=>{k9();T9();Bh();Pw=w8e});var T8e,Bw,Mee=F(()=>{Rh();Eo();T8e=Es(ni,"DataView"),Bw=T8e});var k8e,Fw,Oee=F(()=>{Rh();Eo();k8e=Es(ni,"Promise"),Fw=k8e});var E8e,Yh,C9=F(()=>{Rh();Eo();E8e=Es(ni,"Set"),Yh=E8e});var Pee,S8e,Bee,Fee,$ee,zee,C8e,A8e,_8e,L8e,R8e,Gd,to,Vd=F(()=>{Mee();k5();Oee();C9();tee();wu();W8();Pee="[object Map]",S8e="[object Object]",Bee="[object Promise]",Fee="[object Set]",$ee="[object WeakMap]",zee="[object DataView]",C8e=Tu(Bw),A8e=Tu(Dh),_8e=Tu(Fw),L8e=Tu(Yh),R8e=Tu(bw),Gd=Ji;(Bw&&Gd(new Bw(new ArrayBuffer(1)))!=zee||Dh&&Gd(new Dh)!=Pee||Fw&&Gd(Fw.resolve())!=Bee||Yh&&Gd(new Yh)!=Fee||bw&&Gd(new bw)!=$ee)&&(Gd=function(t){var e=Ji(t),r=e==S8e?t.constructor:void 0,n=r?Tu(r):"";if(n)switch(n){case C8e:return zee;case A8e:return Pee;case _8e:return Bee;case L8e:return Fee;case R8e:return $ee}return e});to=Gd});function D8e(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&N8e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var I8e,N8e,Gee,Vee=F(()=>{I8e=Object.prototype,N8e=I8e.hasOwnProperty;Gee=D8e});function M8e(t,e){var r=e?Vp(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Uee,qee=F(()=>{A5();Uee=M8e});function P8e(t){var e=new t.constructor(t.source,O8e.exec(t));return e.lastIndex=t.lastIndex,e}var O8e,Wee,Hee=F(()=>{O8e=/\w*$/;Wee=P8e});function B8e(t){return Xee?Object(Xee.call(t)):{}}var Yee,Xee,jee,Kee=F(()=>{_d();Yee=$i?$i.prototype:void 0,Xee=Yee?Yee.valueOf:void 0;jee=B8e});function n_e(t,e,r){var n=t.constructor;switch(e){case H8e:return Vp(t);case F8e:case $8e:return new n(+t);case Y8e:return Uee(t,r);case X8e:case j8e:case K8e:case Z8e:case Q8e:case J8e:case e_e:case t_e:case r_e:return _5(t,r);case z8e:return new n;case G8e:case q8e:return new n(t);case V8e:return Wee(t);case U8e:return new n;case W8e:return jee(t)}}var F8e,$8e,z8e,G8e,V8e,U8e,q8e,W8e,H8e,Y8e,X8e,j8e,K8e,Z8e,Q8e,J8e,e_e,t_e,r_e,Zee,Qee=F(()=>{A5();qee();Hee();Kee();J8();F8e="[object Boolean]",$8e="[object Date]",z8e="[object Map]",G8e="[object Number]",V8e="[object RegExp]",U8e="[object Set]",q8e="[object String]",W8e="[object Symbol]",H8e="[object ArrayBuffer]",Y8e="[object DataView]",X8e="[object Float32Array]",j8e="[object Float64Array]",K8e="[object Int8Array]",Z8e="[object Int16Array]",Q8e="[object Int32Array]",J8e="[object Uint8Array]",e_e="[object Uint8ClampedArray]",t_e="[object Uint16Array]",r_e="[object Uint32Array]";Zee=n_e});function a_e(t){return Zn(t)&&to(t)==i_e}var i_e,Jee,ete=F(()=>{Vd();Co();i_e="[object Map]";Jee=a_e});var tte,s_e,rte,nte=F(()=>{ete();Nd();Ly();tte=Lo&&Lo.isMap,s_e=tte?_o(tte):Jee,rte=s_e});function l_e(t){return Zn(t)&&to(t)==o_e}var o_e,ite,ate=F(()=>{Vd();Co();o_e="[object Set]";ite=l_e});var ste,c_e,ote,lte=F(()=>{ate();Nd();Ly();ste=Lo&&Lo.isSet,c_e=ste?_o(ste):ite,ote=c_e});function $w(t,e,r,n,i,a){var s,o=e&u_e,l=e&h_e,u=e&f_e;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!bn(t))return t;var h=It(t);if(h){if(s=Gee(t),!o)return L5(t,s)}else{var f=to(t),d=f==ute||f==v_e;if(vl(t))return C5(t,o);if(f==hte||f==cte||d&&!i){if(s=l||d?{}:N5(t),!o)return l?Nee(t,Aee(s,t)):Ree(t,See(s,t))}else{if(!Cn[f])return i?t:{};s=Zee(t,f,o)}}a||(a=new oc);var p=a.get(t);if(p)return p;a.set(t,s),ote(t)?t.forEach(function(v){s.add($w(v,e,r,v,t,a))}):rte(t)&&t.forEach(function(v,y){s.set(y,$w(v,e,r,y,t,a))});var g=u?l?Pw:Ky:l?Ss:zr,m=h?void 0:g(t);return ww(m||t,function(v,y){m&&(y=v,v=t[y]),uc(s,y,$w(v,e,r,y,t,a))}),s}var u_e,h_e,f_e,cte,d_e,p_e,g_e,m_e,ute,v_e,y_e,x_e,hte,b_e,w_e,T_e,k_e,E_e,S_e,C_e,A_e,__e,L_e,R_e,I_e,N_e,D_e,M_e,O_e,Cn,zw,A9=F(()=>{Cy();m9();Xp();Cee();_ee();Z8();e_();Iee();Dee();E9();S9();Vd();Vee();Qee();r_();zn();Yp();nte();Zs();lte();vc();Bh();u_e=1,h_e=2,f_e=4,cte="[object Arguments]",d_e="[object Array]",p_e="[object Boolean]",g_e="[object Date]",m_e="[object Error]",ute="[object Function]",v_e="[object GeneratorFunction]",y_e="[object Map]",x_e="[object Number]",hte="[object Object]",b_e="[object RegExp]",w_e="[object Set]",T_e="[object String]",k_e="[object Symbol]",E_e="[object WeakMap]",S_e="[object ArrayBuffer]",C_e="[object DataView]",A_e="[object Float32Array]",__e="[object Float64Array]",L_e="[object Int8Array]",R_e="[object Int16Array]",I_e="[object Int32Array]",N_e="[object Uint8Array]",D_e="[object Uint8ClampedArray]",M_e="[object Uint16Array]",O_e="[object Uint32Array]",Cn={};Cn[cte]=Cn[d_e]=Cn[S_e]=Cn[C_e]=Cn[p_e]=Cn[g_e]=Cn[A_e]=Cn[__e]=Cn[L_e]=Cn[R_e]=Cn[I_e]=Cn[y_e]=Cn[x_e]=Cn[hte]=Cn[b_e]=Cn[w_e]=Cn[T_e]=Cn[k_e]=Cn[N_e]=Cn[D_e]=Cn[M_e]=Cn[O_e]=!0;Cn[m_e]=Cn[ute]=Cn[E_e]=!1;zw=$w});function B_e(t){return zw(t,P_e)}var P_e,tn,_9=F(()=>{A9();P_e=4;tn=B_e});function z_e(t){return zw(t,F_e|$_e)}var F_e,$_e,L9,fte=F(()=>{A9();F_e=1,$_e=4;L9=z_e});function G_e(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e{bc=G_e});function U_e(t){return this.__data__.set(t,V_e),this}var V_e,pte,gte=F(()=>{V_e="__lodash_hash_undefined__";pte=U_e});function q_e(t){return this.__data__.has(t)}var mte,vte=F(()=>{mte=q_e});function Gw(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Rd;++e{E5();gte();vte();Gw.prototype.add=Gw.prototype.push=pte;Gw.prototype.has=mte;fg=Gw});function W_e(t,e){for(var r=-1,n=t==null?0:t.length;++r{Uw=W_e});function H_e(t,e){return t.has(e)}var dg,qw=F(()=>{dg=H_e});function j_e(t,e,r,n,i,a){var s=r&Y_e,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var u=a.get(t),h=a.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=r&X_e?new fg:void 0;for(a.set(t,e),a.set(e,t);++f{Vw();R9();qw();Y_e=1,X_e=2;Ww=j_e});function K_e(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var yte,xte=F(()=>{yte=K_e});function Z_e(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var pg,Hw=F(()=>{pg=Z_e});function h9e(t,e,r,n,i,a,s){switch(r){case u9e:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case c9e:return!(t.byteLength!=e.byteLength||!a(new Gp(t),new Gp(e)));case e9e:case t9e:case i9e:return So(+t,+e);case r9e:return t.name==e.name&&t.message==e.message;case a9e:case o9e:return t==e+"";case n9e:var o=yte;case s9e:var l=n&Q_e;if(o||(o=pg),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;n|=J_e,s.set(t,e);var h=Ww(o(t),o(e),n,i,a,s);return s.delete(t),h;case l9e:if(N9)return N9.call(t)==N9.call(e)}return!1}var Q_e,J_e,e9e,t9e,r9e,n9e,i9e,a9e,s9e,o9e,l9e,c9e,u9e,bte,N9,wte,Tte=F(()=>{_d();Q8();Ld();I9();xte();Hw();Q_e=1,J_e=2,e9e="[object Boolean]",t9e="[object Date]",r9e="[object Error]",n9e="[object Map]",i9e="[object Number]",a9e="[object RegExp]",s9e="[object Set]",o9e="[object String]",l9e="[object Symbol]",c9e="[object ArrayBuffer]",u9e="[object DataView]",bte=$i?$i.prototype:void 0,N9=bte?bte.valueOf:void 0;wte=h9e});function g9e(t,e,r,n,i,a){var s=r&f9e,o=Ky(t),l=o.length,u=Ky(e),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in e:p9e.call(e,d)))return!1}var p=a.get(t),g=a.get(e);if(p&&g)return p==e&&g==t;var m=!0;a.set(t,e),a.set(e,t);for(var v=s;++f{E9();f9e=1,d9e=Object.prototype,p9e=d9e.hasOwnProperty;kte=g9e});function y9e(t,e,r,n,i,a){var s=It(t),o=It(e),l=s?Cte:to(t),u=o?Cte:to(e);l=l==Ste?Yw:l,u=u==Ste?Yw:u;var h=l==Yw,f=u==Yw,d=l==u;if(d&&vl(t)){if(!vl(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new oc),s||Oh(t)?Ww(t,e,r,n,i,a):wte(t,e,l,r,n,i,a);if(!(r&m9e)){var p=h&&Ate.call(t,"__wrapped__"),g=f&&Ate.call(e,"__wrapped__");if(p||g){var m=p?t.value():t,v=g?e.value():e;return a||(a=new oc),i(m,v,r,n,a)}}return d?(a||(a=new oc),kte(t,e,r,n,i,a)):!1}var m9e,Ste,Cte,Yw,v9e,Ate,_te,Lte=F(()=>{Cy();I9();Tte();Ete();Vd();zn();Yp();Ry();m9e=1,Ste="[object Arguments]",Cte="[object Array]",Yw="[object Object]",v9e=Object.prototype,Ate=v9e.hasOwnProperty;_te=y9e});function Rte(t,e,r,n,i){return t===e?!0:t==null||e==null||!Zn(t)&&!Zn(e)?t!==t&&e!==e:_te(t,e,r,n,Rte,i)}var Xw,D9=F(()=>{Lte();Co();Xw=Rte});function w9e(t,e,r,n){var i=r.length,a=i,s=!n;if(t==null)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{Cy();D9();x9e=1,b9e=2;Ite=w9e});function T9e(t){return t===t&&!bn(t)}var jw,M9=F(()=>{Zs();jw=T9e});function k9e(t){for(var e=zr(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,jw(i)]}return e}var Dte,Mte=F(()=>{M9();vc();Dte=k9e});function E9e(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var Kw,O9=F(()=>{Kw=E9e});function S9e(t){var e=Dte(t);return e.length==1&&e[0][2]?Kw(e[0][0],e[0][1]):function(r){return r===t||Ite(r,t,e)}}var Ote,Pte=F(()=>{Nte();Mte();O9();Ote=S9e});function C9e(t,e){return t!=null&&e in Object(t)}var Bte,Fte=F(()=>{Bte=C9e});function A9e(t,e,r){e=Wh(e,t);for(var n=-1,i=e.length,a=!1;++n{Xy();Wp();zn();Ny();D5();og();Zw=A9e});function _9e(t,e){return t!=null&&Zw(t,e,Bte)}var Qw,B9=F(()=>{Fte();P9();Qw=_9e});function I9e(t,e){return sg(t)&&jw(e)?Kw(yc(t),e):function(r){var n=dee(r,t);return n===void 0&&n===e?Qw(r,t):Xw(e,n,L9e|R9e)}}var L9e,R9e,$te,zte=F(()=>{D9();pee();B9();Cw();M9();O9();og();L9e=1,R9e=2;$te=I9e});function N9e(t){return function(e){return e?.[t]}}var Jw,F9=F(()=>{Jw=N9e});function D9e(t){return function(e){return Hh(e,t)}}var Gte,Vte=F(()=>{jy();Gte=D9e});function M9e(t){return sg(t)?Jw(yc(t)):Gte(t)}var Ute,qte=F(()=>{F9();Vte();Cw();og();Ute=M9e});function O9e(t){return typeof t=="function"?t:t==null?zi:typeof t=="object"?It(t)?$te(t[0],t[1]):Ote(t):Ute(t)}var pn,Qa=F(()=>{Pte();zte();Eu();zn();qte();pn=O9e});function P9e(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i{Wte=P9e});function B9e(t,e){return t&&zp(t,e,zr)}var gg,eT=F(()=>{S5();vc();gg=B9e});function F9e(t,e){return function(r,n){if(r==null)return r;if(!ii(r))return t(r,n);for(var i=r.length,a=e?i:-1,s=Object(r);(e?a--:++a{Ao();Yte=F9e});var $9e,Is,Xh=F(()=>{eT();Xte();$9e=Yte(gg),Is=$9e});function z9e(t,e,r,n){return Is(t,function(i,a,s){e(n,i,r(i),s)}),n}var jte,Kte=F(()=>{Xh();jte=z9e});function G9e(t,e){return function(r,n){var i=It(r)?Wte:jte,a=e?e():{};return i(r,t,pn(n,2),a)}}var Zte,Qte=F(()=>{Hte();Kte();Qa();zn();Zte=G9e});var V9e,tT,Jte=F(()=>{Eo();V9e=function(){return ni.Date.now()},tT=V9e});var ere,U9e,q9e,jh,tre=F(()=>{jp();Ld();Md();Bh();ere=Object.prototype,U9e=ere.hasOwnProperty,q9e=hc(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&Qs(e[0],e[1],i)&&(n=1);++r{rT=W9e});function Y9e(t,e,r,n){var i=-1,a=Ew,s=!0,o=t.length,l=[],u=e.length;if(!o)return l;r&&(e=Rs(e,_o(r))),n?(a=rT,s=!1):e.length>=H9e&&(a=dg,s=!1,e=new fg(e));e:for(;++i{Vw();y9();$9();zd();Nd();qw();H9e=200;rre=Y9e});var X9e,Kh,ire=F(()=>{nre();cg();jp();M5();X9e=hc(function(t,e){return Id(t)?rre(t,xc(e,1,Id,!0)):[]}),Kh=X9e});function j9e(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var oa,are=F(()=>{oa=j9e});function K9e(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:mc(e),Rw(t,e<0?0:e,n)):[]}var ci,sre=F(()=>{b9();ng();ci=K9e});function Z9e(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:mc(e),e=n-e,Rw(t,0,e<0?0:e)):[]}var Lu,ore=F(()=>{b9();ng();Lu=Z9e});function Q9e(t){return typeof t=="function"?t:zi}var mg,nT=F(()=>{Eu();mg=Q9e});function J9e(t,e){var r=It(t)?ww:Is;return r(t,mg(e))}var Ae,iT=F(()=>{m9();Xh();nT();zn();Ae=J9e});var lre=F(()=>{iT()});function eLe(t,e){for(var r=-1,n=t==null?0:t.length;++r{cre=eLe});function tLe(t,e){var r=!0;return Is(t,function(n,i,a){return r=!!e(n,i,a),r}),r}var hre,fre=F(()=>{Xh();hre=tLe});function rLe(t,e,r){var n=It(t)?cre:hre;return r&&Qs(t,e,r)&&(e=void 0),n(t,pn(e,3))}var Sa,dre=F(()=>{ure();fre();Qa();zn();Md();Sa=rLe});function nLe(t,e){var r=[];return Is(t,function(n,i,a){e(n,i,a)&&r.push(n)}),r}var aT,z9=F(()=>{Xh();aT=nLe});function iLe(t,e){var r=It(t)?ug:aT;return r(t,pn(e,3))}var Yr,G9=F(()=>{Iw();z9();Qa();zn();Yr=iLe});function aLe(t){return function(e,r,n){var i=Object(e);if(!ii(e)){var a=pn(r,3);e=zr(e),r=function(o){return a(i[o],o,i)}}var s=t(e,r,n);return s>-1?i[a?e[s]:s]:void 0}}var pre,gre=F(()=>{Qa();Ao();vc();pre=aLe});function oLe(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:mc(r);return i<0&&(i=sLe(n+i,0)),Tw(t,pn(e,3),i)}var sLe,mre,vre=F(()=>{v9();Qa();ng();sLe=Math.max;mre=oLe});var lLe,Ja,yre=F(()=>{gre();vre();lLe=pre(mre),Ja=lLe});function cLe(t){return t&&t.length?t[0]:void 0}var Gi,xre=F(()=>{Gi=cLe});var bre=F(()=>{xre()});function uLe(t,e){var r=-1,n=ii(t)?Array(t.length):[];return Is(t,function(i,a,s){n[++r]=e(i,a,s)}),n}var sT,V9=F(()=>{Xh();Ao();sT=uLe});function hLe(t,e){var r=It(t)?Rs:sT;return r(t,pn(e,3))}var Ze,vg=F(()=>{zd();Qa();V9();zn();Ze=hLe});function fLe(t,e){return xc(Ze(t,e),1)}var la,U9=F(()=>{cg();vg();la=fLe});function dLe(t,e){return t==null?t:zp(t,mg(e),Ss)}var q9,wre=F(()=>{S5();nT();Bh();q9=dLe});function pLe(t,e){return t&&gg(t,mg(e))}var W9,Tre=F(()=>{eT();nT();W9=pLe});var gLe,mLe,vLe,H9,kre=F(()=>{$p();Qte();gLe=Object.prototype,mLe=gLe.hasOwnProperty,vLe=Zte(function(t,e,r){mLe.call(t,r)?t[r].push(e):lc(t,r,[e])}),H9=vLe});function yLe(t,e){return t>e}var Ere,Sre=F(()=>{Ere=yLe});function wLe(t,e){return t!=null&&bLe.call(t,e)}var xLe,bLe,Cre,Are=F(()=>{xLe=Object.prototype,bLe=xLe.hasOwnProperty;Cre=wLe});function TLe(t,e){return t!=null&&Zw(t,e,Cre)}var Nt,_re=F(()=>{Are();P9();Nt=TLe});function ELe(t){return typeof t=="string"||!It(t)&&Zn(t)&&Ji(t)==kLe}var kLe,ui,oT=F(()=>{wu();zn();Co();kLe="[object String]";ui=ELe});function SLe(t,e){return Rs(e,function(r){return t[r]})}var Lre,Rre=F(()=>{zd();Lre=SLe});function CLe(t){return t==null?[]:Lre(t,zr(t))}var gr,Y9=F(()=>{Rre();vc();gr=CLe});function _Le(t,e,r,n){t=ii(t)?t:gr(t),r=r&&!n?mc(r):0;var i=t.length;return r<0&&(r=ALe(i+r,0)),ui(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&ig(t,e,r)>-1}var ALe,Gn,Ire=F(()=>{kw();Ao();oT();ng();Y9();ALe=Math.max;Gn=_Le});function RLe(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:mc(r);return i<0&&(i=LLe(n+i,0)),ig(t,e,i)}var LLe,lT,Nre=F(()=>{kw();ng();LLe=Math.max;lT=RLe});function OLe(t){if(t==null)return!0;if(ii(t)&&(It(t)||typeof t=="string"||typeof t.splice=="function"||vl(t)||Oh(t)||ml(t)))return!t.length;var e=to(t);if(e==ILe||e==NLe)return!t.size;if(cc(t))return!ag(t).length;for(var r in t)if(MLe.call(t,r))return!1;return!0}var ILe,NLe,DLe,MLe,lr,cT=F(()=>{Sw();Vd();Wp();zn();Ao();Yp();qp();Ry();ILe="[object Map]",NLe="[object Set]",DLe=Object.prototype,MLe=DLe.hasOwnProperty;lr=OLe});function BLe(t){return Zn(t)&&Ji(t)==PLe}var PLe,Dre,Mre=F(()=>{wu();Co();PLe="[object RegExp]";Dre=BLe});var Ore,FLe,No,Pre=F(()=>{Mre();Nd();Ly();Ore=Lo&&Lo.isRegExp,FLe=Ore?_o(Ore):Dre,No=FLe});function $Le(t){return t===void 0}var ur,Bre=F(()=>{ur=$Le});function zLe(t,e){return t{uT=zLe});function GLe(t,e){var r={};return e=pn(e,3),gg(t,function(n,i,a){lc(r,i,e(n,i,a))}),r}var Ud,Fre=F(()=>{$p();eT();Qa();Ud=GLe});function VLe(t,e,r){for(var n=-1,i=t.length;++n{$d();yg=VLe});function ULe(t){return t&&t.length?yg(t,zi,Ere):void 0}var Ns,$re=F(()=>{hT();Sre();Eu();Ns=ULe});function qLe(t){return t&&t.length?yg(t,zi,uT):void 0}var yl,j9=F(()=>{hT();X9();Eu();yl=qLe});function WLe(t,e){return t&&t.length?yg(t,pn(e,2),uT):void 0}var qd,zre=F(()=>{hT();Qa();X9();qd=WLe});function YLe(t){if(typeof t!="function")throw new TypeError(HLe);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var HLe,Gre,Vre=F(()=>{HLe="Expected a function";Gre=YLe});function XLe(t,e,r,n){if(!bn(t))return t;e=Wh(e,t);for(var i=-1,a=e.length,s=a-1,o=t;o!=null&&++i{Xp();Xy();Ny();Zs();og();Ure=XLe});function jLe(t,e,r){for(var n=-1,i=e.length,a={};++n{jy();qre();Xy();fT=jLe});function KLe(t,e){if(t==null)return{};var r=Rs(Pw(t),function(n){return[n]});return e=pn(e),fT(t,r,function(n,i){return e(n,i[0])})}var Ds,Wre=F(()=>{zd();Qa();K9();S9();Ds=KLe});function ZLe(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var Hre,Yre=F(()=>{Hre=ZLe});function QLe(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,a=eo(t),s=e!==void 0,o=e===null,l=e===e,u=eo(e);if(!o&&!u&&!a&&t>e||a&&s&&l&&!o&&!u||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&t{$d();Xre=QLe});function JLe(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,o=r.length;++n=o)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return t.index-e.index}var Kre,Zre=F(()=>{jre();Kre=JLe});function eRe(t,e,r){e.length?e=Rs(e,function(a){return It(a)?function(s){return Hh(s,a.length===1?a[0]:a)}:a}):e=[zi];var n=-1;e=Rs(e,_o(pn));var i=sT(t,function(a,s,o){var l=Rs(e,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return Hre(i,function(a,s){return Kre(a,s,r)})}var Qre,Jre=F(()=>{zd();jy();Qa();V9();Yre();Nd();Zre();Eu();zn();Qre=eRe});var tRe,ene,tne=F(()=>{F9();tRe=Jw("length"),ene=tRe});function dRe(t){for(var e=rne.lastIndex=0;rne.test(t);)++e;return e}var nne,rRe,nRe,iRe,aRe,sRe,oRe,Z9,Q9,lRe,ine,ane,sne,cRe,one,lne,uRe,hRe,fRe,rne,cne,une=F(()=>{nne="\\ud800-\\udfff",rRe="\\u0300-\\u036f",nRe="\\ufe20-\\ufe2f",iRe="\\u20d0-\\u20ff",aRe=rRe+nRe+iRe,sRe="\\ufe0e\\ufe0f",oRe="["+nne+"]",Z9="["+aRe+"]",Q9="\\ud83c[\\udffb-\\udfff]",lRe="(?:"+Z9+"|"+Q9+")",ine="[^"+nne+"]",ane="(?:\\ud83c[\\udde6-\\uddff]){2}",sne="[\\ud800-\\udbff][\\udc00-\\udfff]",cRe="\\u200d",one=lRe+"?",lne="["+sRe+"]?",uRe="(?:"+cRe+"(?:"+[ine,ane,sne].join("|")+")"+lne+one+")*",hRe=lne+one+uRe,fRe="(?:"+[ine+Z9+"?",Z9,ane,sne,oRe].join("|")+")",rne=RegExp(Q9+"(?="+Q9+")|"+fRe+hRe,"g");cne=dRe});function pRe(t){return wee(t)?cne(t):ene(t)}var hne,fne=F(()=>{tne();Tee();une();hne=pRe});function gRe(t,e){return fT(t,e,function(r,n){return Qw(t,n)})}var dne,pne=F(()=>{K9();B9();dne=gRe});var mRe,Wd,gne=F(()=>{pne();bee();mRe=xee(function(t,e){return t==null?{}:dne(t,e)}),Wd=mRe});function xRe(t,e,r,n){for(var i=-1,a=yRe(vRe((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var vRe,yRe,mne,vne=F(()=>{vRe=Math.ceil,yRe=Math.max;mne=xRe});function bRe(t){return function(e,r,n){return n&&typeof n!="number"&&Qs(e,r,n)&&(r=n=void 0),e=rg(e),r===void 0?(r=e,e=0):r=rg(r),n=n===void 0?e{vne();Md();p9();yne=bRe});var wRe,Do,bne=F(()=>{xne();wRe=yne(),Do=wRe});function TRe(t,e,r,n,i){return i(t,function(a,s,o){r=n?(n=!1,a):e(r,a,s,o)}),r}var wne,Tne=F(()=>{wne=TRe});function kRe(t,e,r){var n=It(t)?kee:wne,i=arguments.length<3;return n(t,pn(e,4),r,i,Is)}var Xr,J9=F(()=>{Eee();Xh();Qa();Tne();zn();Xr=kRe});function ERe(t,e){var r=It(t)?ug:aT;return r(t,Gre(pn(e,3)))}var Zh,kne=F(()=>{Iw();z9();Qa();zn();Vre();Zh=ERe});function ARe(t){if(t==null)return 0;if(ii(t))return ui(t)?hne(t):t.length;var e=to(t);return e==SRe||e==CRe?t.size:ag(t).length}var SRe,CRe,eL,Ene=F(()=>{Sw();Vd();Ao();oT();fne();SRe="[object Map]",CRe="[object Set]";eL=ARe});function _Re(t,e){var r;return Is(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}var Sne,Cne=F(()=>{Xh();Sne=_Re});function LRe(t,e,r){var n=It(t)?Uw:Sne;return r&&Qs(t,e,r)&&(e=void 0),n(t,pn(e,3))}var Zy,Ane=F(()=>{R9();Qa();Cne();zn();Md();Zy=LRe});var RRe,wc,_ne=F(()=>{cg();Jre();jp();Md();RRe=hc(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Qs(t,e[0],e[1])?e=[]:r>2&&Qs(e[0],e[1],e[2])&&(e=[e[0]]),Qre(t,xc(e,1),[])}),wc=RRe});var IRe,NRe,Lne,Rne=F(()=>{C9();g9();Hw();IRe=1/0,NRe=Yh&&1/pg(new Yh([,-0]))[1]==IRe?function(t){return new Yh(t)}:Jn,Lne=NRe});function MRe(t,e,r){var n=-1,i=Ew,a=t.length,s=!0,o=[],l=o;if(r)s=!1,i=rT;else if(a>=DRe){var u=e?null:Lne(t);if(u)return pg(u);s=!1,i=dg,l=new fg}else l=e?[]:o;e:for(;++n{Vw();y9();$9();qw();Rne();Hw();DRe=200;xg=MRe});var ORe,tL,Ine=F(()=>{cg();jp();dT();M5();ORe=hc(function(t){return xg(xc(t,1,Id,!0))}),tL=ORe});function PRe(t){return t&&t.length?xg(t):[]}var bg,Nne=F(()=>{dT();bg=PRe});function BRe(t,e){return t&&t.length?xg(t,pn(e,2)):[]}var Dne,Mne=F(()=>{Qa();dT();Dne=BRe});function $Re(t){var e=++FRe;return Aw(t)+e}var FRe,Hd,One=F(()=>{x9();FRe=0;Hd=$Re});function zRe(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n{Pne=zRe});function GRe(t,e){return Pne(t||[],e||[],uc)}var pT,Fne=F(()=>{Xp();Bne();pT=GRe});var $t=F(()=>{lee();_9();fte();dte();l_();tre();ire();sre();ore();lre();dre();G9();yre();bre();U9();Lw();iT();wre();Tre();kre();_re();Eu();Ire();Nre();zn();cT();wy();Zs();Pre();oT();Bre();vc();are();vg();Fre();$re();h_();j9();zre();g9();Jte();gne();Wre();bne();J9();kne();Ene();Ane();_ne();Ine();Nne();One();Y9();Fne();});function zne(t,e){t[e]?t[e]++:t[e]=1}function Gne(t,e){--t[e]||delete t[e]}function Qy(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+$ne+a+$ne+(ur(n)?VRe:n)}function URe(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}var o={v:i,w:a};return n&&(o.name=n),o}function rL(t,e){return Qy(t,e.v,e.w,e.name)}var VRe,Yd,$ne,rn,gT=F(()=>{$t();VRe="\0",Yd="\0",$ne="",rn=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Cs(void 0),this._defaultEdgeLabelFn=Cs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Yd]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return gi(e)||(e=Cs(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return zr(this._nodes)}sources(){var e=this;return Yr(this.nodes(),function(r){return lr(e._in[r])})}sinks(){var e=this;return Yr(this.nodes(),function(r){return lr(e._out[r])})}setNodes(e,r){var n=arguments,i=this;return Ae(e,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Yd,this._children[e]={},this._children[Yd][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Ae(this.children(e),n=>{this.setParent(n)}),delete this._children[e]),Ae(zr(this._in[e]),r),delete this._in[e],delete this._preds[e],Ae(zr(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ur(r))r=Yd;else{r+="";for(var n=r;!ur(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==Yd)return r}}children(e){if(ur(e)&&(e=Yd),this._isCompound){var r=this._children[e];if(r)return zr(r)}else{if(e===Yd)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return zr(r)}successors(e){var r=this._sucs[e];if(r)return zr(r)}neighbors(e){var r=this.predecessors(e);if(r)return tL(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;Ae(this._nodes,function(s,o){e(o)&&r.setNode(o,s)}),Ae(this._edgeObjs,function(s){r.hasNode(s.v)&&r.hasNode(s.w)&&r.setEdge(s,n.edge(s))});var i={};function a(s){var o=n.parent(s);return o===void 0||r.hasNode(o)?(i[s]=o,o):o in i?i[o]:a(o)}return this._isCompound&&Ae(r.nodes(),function(s){r.setParent(s,a(s))}),r}setDefaultEdgeLabel(e){return gi(e)||(e=Cs(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return gr(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return Xr(e,function(a,s){return i.length>1?n.setEdge(a,s,r):n.setEdge(a,s),s}),this}setEdge(){var e,r,n,i,a=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,r=s.w,n=s.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=s,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,ur(n)||(n=""+n);var o=Qy(this._isDirected,e,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return a&&(this._edgeLabels[o]=i),this;if(!ur(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=a?i:this._defaultEdgeLabelFn(e,r,n);var l=URe(this._isDirected,e,r,n);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,zne(this._preds[r],e),zne(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?rL(this._isDirected,arguments[0]):Qy(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?rL(this._isDirected,arguments[0]):Qy(this._isDirected,e,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?rL(this._isDirected,arguments[0]):Qy(this._isDirected,e,r,n),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Gne(this._preds[r],e),Gne(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var i=gr(n);return r?Yr(i,function(a){return a.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=gr(n);return r?Yr(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}};rn.prototype._nodeCount=0;rn.prototype._edgeCount=0});var Mo=F(()=>{gT()});function Vne(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function qRe(t,e){if(t!=="_next"&&t!=="_prev")return e}var vT,Une=F(()=>{vT=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return Vne(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&Vne(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,qRe)),n=n._prev;return"["+e.join(", ")+"]"}}});function qne(t,e){if(t.nodeCount()<=1)return[];var r=YRe(t,e||WRe),n=HRe(r.graph,r.buckets,r.zeroIdx);return Hr(Ze(n,function(i){return t.outEdges(i.v,i.w)}))}function HRe(t,e,r){for(var n=[],i=e[e.length-1],a=e[0],s;t.nodeCount();){for(;s=a.dequeue();)nL(t,e,r,s);for(;s=i.dequeue();)nL(t,e,r,s);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(s=e[o].dequeue(),s){n=n.concat(nL(t,e,r,s,!0));break}}}return n}function nL(t,e,r,n,i){var a=i?[]:void 0;return Ae(t.inEdges(n.v),function(s){var o=t.edge(s),l=t.node(s.v);i&&a.push({v:s.v,w:s.w}),l.out-=o,iL(e,r,l)}),Ae(t.outEdges(n.v),function(s){var o=t.edge(s),l=s.w,u=t.node(l);u.in-=o,iL(e,r,u)}),t.removeNode(n.v),a}function YRe(t,e){var r=new rn,n=0,i=0;Ae(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),Ae(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=e(o),h=l+u;r.setEdge(o.v,o.w,h),i=Math.max(i,r.node(o.v).out+=u),n=Math.max(n,r.node(o.w).in+=u)});var a=Do(i+n+3).map(function(){return new vT}),s=n+1;return Ae(r.nodes(),function(o){iL(a,s,r.node(o))}),{graph:r,buckets:a,zeroIdx:s}}function iL(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}var WRe,Wne=F(()=>{$t();Mo();Une();WRe=Cs(1)});function Hne(t){var e=t.graph().acyclicer==="greedy"?qne(t,r(t)):XRe(t);Ae(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,Hd("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function XRe(t){var e=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,Ae(t.outEdges(a),function(s){Object.prototype.hasOwnProperty.call(r,s.w)?e.push(s):i(s.w)}),delete r[a])}return Ae(t.nodes(),i),e}function Yne(t){Ae(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}var aL=F(()=>{$t();Wne()});function Tc(t,e,r,n){var i;do i=Hd(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function jne(t){var e=new rn().setGraph(t.graph());return Ae(t.nodes(),function(r){e.setNode(r,t.node(r))}),Ae(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function yT(t){var e=new rn({multigraph:t.isMultigraph()}).setGraph(t.graph());return Ae(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),Ae(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function sL(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=o*i/a,u=o):(i<0&&(s=-s),l=s,u=s*a/i),{x:r+l,y:n+u}}function Qh(t){var e=Ze(Do(lL(t)+1),function(){return[]});return Ae(t.nodes(),function(r){var n=t.node(r),i=n.rank;ur(i)||(e[i][n.order]=r)}),e}function Kne(t){var e=yl(Ze(t.nodes(),function(r){return t.node(r).rank}));Ae(t.nodes(),function(r){var n=t.node(r);Nt(n,"rank")&&(n.rank-=e)})}function Zne(t){var e=yl(Ze(t.nodes(),function(a){return t.node(a).rank})),r=[];Ae(t.nodes(),function(a){var s=t.node(a).rank-e;r[s]||(r[s]=[]),r[s].push(a)});var n=0,i=t.graph().nodeRankFactor;Ae(r,function(a,s){ur(a)&&s%i!==0?--n:n&&Ae(a,function(o){t.node(o).rank+=n})})}function oL(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),Tc(t,"border",i,e)}function lL(t){return Ns(Ze(t.nodes(),function(e){var r=t.node(e).rank;if(!ur(r))return r}))}function Qne(t,e){var r={lhs:[],rhs:[]};return Ae(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function Jne(t,e){var r=tT();try{return e()}finally{console.log(t+" time: "+(tT()-r)+"ms")}}function eie(t,e){return e()}var kc=F(()=>{$t();Mo()});function rie(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&&Ae(n,e),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,s=i.maxRank+1;a{$t();kc()});function aie(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&oie(t)}function sie(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&jRe(t),(e==="lr"||e==="rl")&&(KRe(t),oie(t))}function oie(t){Ae(t.nodes(),function(e){iie(t.node(e))}),Ae(t.edges(),function(e){iie(t.edge(e))})}function iie(t){var e=t.width;t.width=t.height,t.height=e}function jRe(t){Ae(t.nodes(),function(e){cL(t.node(e))}),Ae(t.edges(),function(e){var r=t.edge(e);Ae(r.points,cL),Object.prototype.hasOwnProperty.call(r,"y")&&cL(r)})}function cL(t){t.y=-t.y}function KRe(t){Ae(t.nodes(),function(e){uL(t.node(e))}),Ae(t.edges(),function(e){var r=t.edge(e);Ae(r.points,uL),Object.prototype.hasOwnProperty.call(r,"x")&&uL(r)})}function uL(t){var e=t.x;t.x=t.y,t.y=e}var lie=F(()=>{$t()});function cie(t){t.graph().dummyChains=[],Ae(t.edges(),function(e){QRe(t,e)})}function QRe(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 u=void 0,h,f;for(f=0,++n;n{$t();kc()});function Jy(t){var e={};function r(n){var i=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return i.rank;e[n]=!0;var a=yl(Ze(t.outEdges(n),function(s){return r(s.w)-t.edge(s).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}Ae(t.sources(),r)}function Xd(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var xT=F(()=>{$t()});function bT(t){var e=new rn({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;JRe(e,t){$t();Mo();xT()});var fie=F(()=>{});var dL=F(()=>{});var t7t,pL=F(()=>{$t();dL();t7t=Cs(1)});var die=F(()=>{pL()});var gL=F(()=>{});var pie=F(()=>{gL()});var l7t,gie=F(()=>{$t();l7t=Cs(1)});function mL(t){var e={},r={},n=[];function i(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new e2;Object.prototype.hasOwnProperty.call(e,a)||(r[a]=!0,e[a]=!0,Ae(t.predecessors(a),i),delete r[a],n.push(a))}if(Ae(t.sinks(),i),eL(e)!==t.nodeCount())throw new e2;return n}function e2(){}var vL=F(()=>{$t();mL.CycleException=e2;e2.prototype=new Error});var mie=F(()=>{vL()});function wT(t,e,r){It(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return Ae(e,function(s){if(!t.hasNode(s))throw new Error("Graph does not have node: "+s);vie(t,s,r==="post",a,n,i)}),i}function vie(t,e,r,n,i,a){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||a.push(e),Ae(i(e),function(s){vie(t,s,r,n,i,a)}),r&&a.push(e))}var yL=F(()=>{$t()});function xL(t,e){return wT(t,e,"post")}var yie=F(()=>{yL()});function bL(t,e){return wT(t,e,"pre")}var xie=F(()=>{yL()});var bie=F(()=>{dL();gT()});var wie=F(()=>{fie();pL();die();pie();gie();mie();yie();xie();bie();gL();vL()});function ef(t){t=jne(t),Jy(t);var e=bT(t);TL(e),wL(e,t);for(var r,n;r=Sie(e);)n=Cie(e,t,r),Aie(e,t,r,n)}function wL(t,e){var r=xL(t,t.nodes());r=r.slice(0,r.length-1),Ae(r,function(n){sIe(t,e,n)})}function sIe(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=kie(t,e,r)}function kie(t,e,r){var n=t.node(r),i=n.parent,a=!0,s=e.edge(r,i),o=0;return s||(a=!1,s=e.edge(i,r)),o=s.weight,Ae(e.nodeEdges(r),function(l){var u=l.v===r,h=u?l.w:l.v;if(h!==i){var f=u===a,d=e.edge(l).weight;if(o+=f?d:-d,lIe(t,r,h)){var p=t.edge(r,h).cutvalue;o+=f?-p:p}}}),o}function TL(t,e){arguments.length<2&&(e=t.nodes()[0]),Eie(t,{},1,e)}function Eie(t,e,r,n,i){var a=r,s=t.node(n);return e[n]=!0,Ae(t.neighbors(n),function(o){Object.prototype.hasOwnProperty.call(e,o)||(r=Eie(t,e,r,o,n))}),s.low=a,s.lim=r++,i?s.parent=i:delete s.parent,r}function Sie(t){return Ja(t.edges(),function(e){return t.edge(e).cutvalue<0})}function Cie(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),s=t.node(i),o=a,l=!1;a.lim>s.lim&&(o=s,l=!0);var u=Yr(e.edges(),function(h){return l===Tie(t,t.node(h.v),o)&&l!==Tie(t,t.node(h.w),o)});return qd(u,function(h){return Xd(e,h)})}function Aie(t,e,r,n){var i=r.v,a=r.w;t.removeEdge(i,a),t.setEdge(n.v,n.w,{}),TL(t),wL(t,e),oIe(t,e)}function oIe(t,e){var r=Ja(t.nodes(),function(i){return!e.node(i).parent}),n=bL(t,r);n=n.slice(1),Ae(n,function(i){var a=t.node(i).parent,s=e.edge(i,a),o=!1;s||(s=e.edge(a,i),o=!0),e.node(i).rank=e.node(a).rank+(o?s.minlen:-s.minlen)})}function lIe(t,e,r){return t.hasEdge(e,r)}function Tie(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var _ie=F(()=>{$t();wie();kc();fL();xT();ef.initLowLimValues=TL;ef.initCutValues=wL;ef.calcCutValue=kie;ef.leaveEdge=Sie;ef.enterEdge=Cie;ef.exchangeEdges=Aie});function kL(t){switch(t.graph().ranker){case"network-simplex":Lie(t);break;case"tight-tree":uIe(t);break;case"longest-path":cIe(t);break;default:Lie(t)}}function uIe(t){Jy(t),bT(t)}function Lie(t){ef(t)}var cIe,EL=F(()=>{fL();_ie();xT();cIe=Jy});function Rie(t){var e=Tc(t,"root",{},"_root"),r=hIe(t),n=Ns(gr(r))-1,i=2*n+1;t.graph().nestingRoot=e,Ae(t.edges(),function(s){t.edge(s).minlen*=i});var a=fIe(t)+1;Ae(t.children(),function(s){Iie(t,e,i,a,n,r,s)}),t.graph().nodeRankFactor=i}function Iie(t,e,r,n,i,a,s){var o=t.children(s);if(!o.length){s!==e&&t.setEdge(e,s,{weight:0,minlen:r});return}var l=oL(t,"_bt"),u=oL(t,"_bb"),h=t.node(s);t.setParent(l,s),h.borderTop=l,t.setParent(u,s),h.borderBottom=u,Ae(o,function(f){Iie(t,e,r,n,i,a,f);var d=t.node(f),p=d.borderTop?d.borderTop:f,g=d.borderBottom?d.borderBottom:f,m=d.borderTop?n:2*n,v=p!==g?1:i-a[s]+1;t.setEdge(l,p,{weight:m,minlen:v,nestingEdge:!0}),t.setEdge(g,u,{weight:m,minlen:v,nestingEdge:!0})}),t.parent(s)||t.setEdge(e,l,{weight:0,minlen:i+a[s]})}function hIe(t){var e={};function r(n,i){var a=t.children(n);a&&a.length&&Ae(a,function(s){r(s,i+1)}),e[n]=i}return Ae(t.children(),function(n){r(n,1)}),e}function fIe(t){return Xr(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function Nie(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,Ae(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}var Die=F(()=>{$t();kc()});function Mie(t,e,r){var n={},i;Ae(r,function(a){for(var s=t.parent(a),o,l;s;){if(o=t.parent(s),o?(l=n[o],n[o]=s):(l=i,i=s),l&&l!==s){e.setEdge(l,s);return}s=o}})}var Oie=F(()=>{$t()});function Pie(t,e,r){var n=pIe(t),i=new rn({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return t.node(a)});return Ae(t.nodes(),function(a){var s=t.node(a),o=t.parent(a);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(i.setNode(a),i.setParent(a,o||n),Ae(t[r](a),function(l){var u=l.v===a?l.w:l.v,h=i.edge(u,a),f=ur(h)?0:h.weight;i.setEdge(u,a,{weight:t.edge(l).weight+f})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&i.setNode(a,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))}),i}function pIe(t){for(var e;t.hasNode(e=Hd("_root")););return e}var Bie=F(()=>{$t();Mo()});function Fie(t,e){for(var r=0,n=1;n0;)h%2&&(f+=o[h+1]),h=h-1>>1,o[h]+=u.weight;l+=u.weight*f})),l}var $ie=F(()=>{$t()});function zie(t){var e={},r=Yr(t.nodes(),function(o){return!t.children(o).length}),n=Ns(Ze(r,function(o){return t.node(o).rank})),i=Ze(Do(n+1),function(){return[]});function a(o){if(!Nt(e,o)){e[o]=!0;var l=t.node(o);i[l.rank].push(o),Ae(t.successors(o),a)}}var s=wc(r,function(o){return t.node(o).rank});return Ae(s,a),i}var Gie=F(()=>{$t()});function Vie(t,e){return Ze(e,function(r){var n=t.inEdges(r);if(n.length){var i=Xr(n,function(a,s){var o=t.edge(s),l=t.node(s.v);return{sum:a.sum+o.weight*l.order,weight:a.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var Uie=F(()=>{$t()});function qie(t,e){var r={};Ae(t,function(i,a){var s=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};ur(i.barycenter)||(s.barycenter=i.barycenter,s.weight=i.weight)}),Ae(e.edges(),function(i){var a=r[i.v],s=r[i.w];!ur(a)&&!ur(s)&&(s.indegree++,a.out.push(r[i.w]))});var n=Yr(r,function(i){return!i.indegree});return mIe(n)}function mIe(t){var e=[];function r(a){return function(s){s.merged||(ur(s.barycenter)||ur(a.barycenter)||s.barycenter>=a.barycenter)&&vIe(a,s)}}function n(a){return function(s){s.in.push(a),--s.indegree===0&&t.push(s)}}for(;t.length;){var i=t.pop();e.push(i),Ae(i.in.reverse(),r(i)),Ae(i.out,n(i))}return Ze(Yr(e,function(a){return!a.merged}),function(a){return Wd(a,["vs","i","barycenter","weight"])})}function vIe(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 Wie=F(()=>{$t()});function Yie(t,e){var r=Qne(t,function(h){return Object.prototype.hasOwnProperty.call(h,"barycenter")}),n=r.lhs,i=wc(r.rhs,function(h){return-h.i}),a=[],s=0,o=0,l=0;n.sort(yIe(!!e)),l=Hie(a,i,l),Ae(n,function(h){l+=h.vs.length,a.push(h.vs),s+=h.barycenter*h.weight,o+=h.weight,l=Hie(a,i,l)});var u={vs:Hr(a)};return o&&(u.barycenter=s/o,u.weight=o),u}function Hie(t,e,r){for(var n;e.length&&(n=oa(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function yIe(t){return function(e,r){return e.barycenterr.barycenter?1:t?r.i-e.i:e.i-r.i}}var Xie=F(()=>{$t();kc()});function SL(t,e,r,n){var i=t.children(e),a=t.node(e),s=a?a.borderLeft:void 0,o=a?a.borderRight:void 0,l={};s&&(i=Yr(i,function(g){return g!==s&&g!==o}));var u=Vie(t,i);Ae(u,function(g){if(t.children(g.v).length){var m=SL(t,g.v,r,n);l[g.v]=m,Object.prototype.hasOwnProperty.call(m,"barycenter")&&bIe(g,m)}});var h=qie(u,r);xIe(h,l);var f=Yie(h,n);if(s&&(f.vs=Hr([s,f.vs,o]),t.predecessors(s).length)){var d=t.node(t.predecessors(s)[0]),p=t.node(t.predecessors(o)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f}function xIe(t,e){Ae(t,function(r){r.vs=Hr(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function bIe(t,e){ur(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 jie=F(()=>{$t();Uie();Wie();Xie()});function Qie(t){var e=lL(t),r=Kie(t,Do(1,e+1),"inEdges"),n=Kie(t,Do(e-1,-1,-1),"outEdges"),i=zie(t);Zie(t,i);for(var a=Number.POSITIVE_INFINITY,s,o=0,l=0;l<4;++o,++l){wIe(o%2?r:n,o%4>=2),i=Qh(t);var u=Fie(t,i);u{$t();Mo();kc();Oie();Bie();$ie();Gie();jie()});function eae(t){var e=kIe(t);Ae(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=TIe(t,e,i.v,i.w),s=a.path,o=a.lca,l=0,u=s[l],h=!0;r!==i.w;){if(n=t.node(r),h){for(;(u=s[l])!==o&&t.node(u).maxRanks||o>e[l].lim));for(u=l,l=n;(l=t.parent(l))!==u;)a.push(l);return{path:i.concat(a.reverse()),lca:u}}function kIe(t){var e={},r=0;function n(i){var a=r;Ae(t.children(i),n),e[i]={low:a,lim:r++}}return Ae(t.children(),n),e}var tae=F(()=>{$t()});function EIe(t,e){var r={};function n(i,a){var s=0,o=0,l=i.length,u=oa(a);return Ae(a,function(h,f){var d=CIe(t,h),p=d?t.node(d).order:l;(d||h===u)&&(Ae(a.slice(o,f+1),function(g){Ae(t.predecessors(g),function(m){var v=t.node(m),y=v.order;(yu)&&rae(r,d,h)})})}function i(a,s){var o=-1,l,u=0;return Ae(s,function(h,f){if(t.node(h).dummy==="border"){var d=t.predecessors(h);d.length&&(l=t.node(d[0]).order,n(s,u,f,o,l),u=f,o=l)}n(s,u,s.length,l,a.length)}),s}return Xr(e,i),r}function CIe(t,e){if(t.node(e).dummy)return Ja(t.predecessors(e),function(r){return t.node(r).dummy})}function rae(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function AIe(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function _Ie(t,e,r,n){var i={},a={},s={};return Ae(e,function(o){Ae(o,function(l,u){i[l]=l,a[l]=l,s[l]=u})}),Ae(e,function(o){var l=-1;Ae(o,function(u){var h=n(u);if(h.length){h=wc(h,function(m){return s[m]});for(var f=(h.length-1)/2,d=Math.floor(f),p=Math.ceil(f);d<=p;++d){var g=h[d];a[u]===u&&l{$t();Mo();kc()});function aae(t){t=yT(t),PIe(t),W9(nae(t),function(e,r){t.node(r).x=e})}function PIe(t){var e=Qh(t),r=t.graph().ranksep,n=0;Ae(e,function(i){var a=Ns(Ze(i,function(s){return t.node(s).height}));Ae(i,function(s){t.node(s).y=n+a/2}),n+=a+r})}var sae=F(()=>{$t();kc();iae()});function t2(t,e){var r=e&&e.debugTiming?Jne:eie;r("layout",()=>{var n=r(" buildLayoutGraph",()=>YIe(t));r(" runLayout",()=>BIe(n,r)),r(" updateInputGraph",()=>FIe(t,n))})}function BIe(t,e){e(" makeSpaceForEdgeLabels",()=>XIe(t)),e(" removeSelfEdges",()=>nNe(t)),e(" acyclic",()=>Hne(t)),e(" nestingGraph.run",()=>Rie(t)),e(" rank",()=>kL(yT(t))),e(" injectEdgeLabelProxies",()=>jIe(t)),e(" removeEmptyRanks",()=>Zne(t)),e(" nestingGraph.cleanup",()=>Nie(t)),e(" normalizeRanks",()=>Kne(t)),e(" assignRankMinMax",()=>KIe(t)),e(" removeEdgeLabelProxies",()=>ZIe(t)),e(" normalize.run",()=>cie(t)),e(" parentDummyChains",()=>eae(t)),e(" addBorderSegments",()=>rie(t)),e(" order",()=>Qie(t)),e(" insertSelfEdges",()=>iNe(t)),e(" adjustCoordinateSystem",()=>aie(t)),e(" position",()=>aae(t)),e(" positionSelfEdges",()=>aNe(t)),e(" removeBorderNodes",()=>rNe(t)),e(" normalize.undo",()=>uie(t)),e(" fixupEdgeLabelCoords",()=>eNe(t)),e(" undoCoordinateSystem",()=>sie(t)),e(" translateGraph",()=>QIe(t)),e(" assignNodeIntersects",()=>JIe(t)),e(" reversePoints",()=>tNe(t)),e(" acyclic.undo",()=>Yne(t))}function FIe(t,e){Ae(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),Ae(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function YIe(t){var e=new rn({multigraph:!0,compound:!0}),r=AL(t.graph());return e.setGraph(Fh({},zIe,CL(r,$Ie),Wd(r,GIe))),Ae(t.nodes(),function(n){var i=AL(t.node(n));e.setNode(n,jh(CL(i,VIe),UIe)),e.setParent(n,t.parent(n))}),Ae(t.edges(),function(n){var i=AL(t.edge(n));e.setEdge(n,Fh({},WIe,CL(i,qIe),Wd(i,HIe)))}),e}function XIe(t){var e=t.graph();e.ranksep/=2,Ae(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function jIe(t){Ae(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e};Tc(t,"edge-proxy",a,"_ep")}})}function KIe(t){var e=0;Ae(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=Ns(e,n.maxRank))}),t.graph().maxRank=e}function ZIe(t){Ae(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function QIe(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),s=a.marginx||0,o=a.marginy||0;function l(u){var h=u.x,f=u.y,d=u.width,p=u.height;e=Math.min(e,h-d/2),r=Math.max(r,h+d/2),n=Math.min(n,f-p/2),i=Math.max(i,f+p/2)}Ae(t.nodes(),function(u){l(t.node(u))}),Ae(t.edges(),function(u){var h=t.edge(u);Object.prototype.hasOwnProperty.call(h,"x")&&l(h)}),e-=s,n-=o,Ae(t.nodes(),function(u){var h=t.node(u);h.x-=e,h.y-=n}),Ae(t.edges(),function(u){var h=t.edge(u);Ae(h.points,function(f){f.x-=e,f.y-=n}),Object.prototype.hasOwnProperty.call(h,"x")&&(h.x-=e),Object.prototype.hasOwnProperty.call(h,"y")&&(h.y-=n)}),a.width=r-e+s,a.height=i-n+o}function JIe(t){Ae(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=i,s=n),r.points.unshift(sL(n,a)),r.points.push(sL(i,s))})}function eNe(t){Ae(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function tNe(t){Ae(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function rNe(t){Ae(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(oa(r.borderLeft)),s=t.node(oa(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),Ae(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function nNe(t){Ae(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function iNe(t){var e=Qh(t);Ae(e,function(r){var n=0;Ae(r,function(i,a){var s=t.node(i);s.order=a+n,Ae(s.selfEdges,function(o){Tc(t,"selfedge",{width:o.label.width,height:o.label.height,rank:s.rank,order:a+ ++n,e:o.e,label:o.label},"_se")}),delete s.selfEdges})})}function aNe(t){Ae(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,s=r.x-i,o=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{x:i+s,y:a},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],r.label.x=r.x,r.label.y=r.y}})}function CL(t,e){return Ud(Wd(t,e),Number)}function AL(t){var e={};return Ae(t,function(r,n){e[n.toLowerCase()]=r}),e}var $Ie,zIe,GIe,VIe,UIe,qIe,WIe,HIe,oae=F(()=>{$t();Mo();nie();lie();aL();hL();EL();Die();Jie();tae();sae();kc();$Ie=["nodesep","edgesep","ranksep","marginx","marginy"],zIe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},GIe=["acyclicer","ranker","rankdir","align"],VIe=["width","height"],UIe={width:0,height:0},qIe=["minlen","weight","width","height","labeloffset"],WIe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},HIe=["labelpos"]});var _L=F(()=>{aL();oae();hL();EL()});function Oo(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:sNe(t),edges:oNe(t)};return ur(t.graph())||(e.value=tn(t.graph())),e}function sNe(t){return Ze(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return ur(r)||(i.value=r),ur(n)||(i.parent=n),i})}function oNe(t){return Ze(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return ur(e.name)||(n.name=e.name),ur(r)||(n.value=r),n})}var LL=F(()=>{$t();gT()});var mae={};hr(mae,{render:()=>dNe});var yr,jd,uae,lNe,TT,cNe,hae,fae,uNe,r2,cae,hNe,dae,pae,fNe,gae,dNe,vae=F(()=>{Io();Ks();Ls();ja();Ka();na();hn();vr();rr();_L();LL();Mo();Mo();LL();yr=new Map,jd=new Map,uae=new Map,lNe=x(()=>{jd.clear(),uae.clear(),yr.clear()},"clear"),TT=x((t,e)=>{let r=jd.get(e)||[];return J.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),cNe=x((t,e)=>{let r=jd.get(e)||[];return J.info("Descendants of ",e," is ",r),J.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||TT(t.v,e)||TT(t.w,e)||r.includes(t.w):(J.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),hae=x((t,e,r,n)=>{J.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),J.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)hae(a,e,r,n);else{let s=e.node(a);J.info("cp ",a," to ",n," with parent ",t),r.setNode(a,s),n!==e.parent(a)&&(J.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(J.debug("Setting parent",a,t),r.setParent(a,t)):(J.info("In copy ",t,"root",n,"data",e.node(t),n),J.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let o=e.edges(a);J.debug("Copying Edges",o),o.forEach(l=>{J.info("Edge",l);let u=e.edge(l.v,l.w,l.name);J.info("Edge data",u,n);try{cNe(l,n)?(J.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),J.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):J.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(h){J.error(h)}})}J.debug("Removing node",a),e.removeNode(a)})},"copy"),fae=x((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)uae.set(i,t),n=[...n,...fae(i,e)];return n},"extractDescendants"),uNe=x((t,e,r)=>{let n=t.edges().filter(l=>l.v===e||l.w===e),i=t.edges().filter(l=>l.v===r||l.w===r),a=n.map(l=>({v:l.v===e?r:l.v,w:l.w===e?e:l.w})),s=i.map(l=>({v:l.v,w:l.w}));return a.filter(l=>s.some(u=>l.v===u.v&&l.w===u.w))},"findCommonEdges"),r2=x((t,e,r)=>{let n=e.children(t);if(J.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(let a of n){let s=r2(a,e,r),o=uNe(e,r,s);if(s)if(o.length>0)i=s;else return s}return i},"findNonClusterChild"),cae=x(t=>!yr.has(t)||!yr.get(t).externalConnections?t:yr.has(t)?yr.get(t).id:t,"getAnchorId"),hNe=x((t,e)=>{if(!t||e>10){J.debug("Opting out, no graph ");return}else J.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(J.warn("Cluster identified",r," Replacement id in edges: ",r2(r,t,r)),jd.set(r,fae(r,t)),yr.set(r,{id:r2(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(J.debug("Cluster identified",r,jd),i.forEach(a=>{let s=TT(a.v,r),o=TT(a.w,r);s^o&&(J.warn("Edge: ",a," leaves cluster ",r),J.warn("Descendants of XXX ",r,": ",jd.get(r)),yr.get(r).externalConnections=!0)})):J.debug("Not a cluster ",r,jd)});for(let r of yr.keys()){let n=yr.get(r).id,i=t.parent(n);i!==r&&yr.has(i)&&!yr.get(i).externalConnections&&(yr.get(r).id=i)}t.edges().forEach(function(r){let n=t.edge(r);J.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),J.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(J.warn("Fix XXX",yr,"ids:",r.v,r.w,"Translating: ",yr.get(r.v)," --- ",yr.get(r.w)),yr.get(r.v)||yr.get(r.w)){if(J.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=cae(r.v),a=cae(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let s=t.parent(i);yr.get(s).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let s=t.parent(a);yr.get(s).externalConnections=!0,n.toCluster=r.w}J.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),J.warn("Adjusted Graph",Oo(t)),dae(t,0),J.trace(yr)},"adjustClustersAndEdges"),dae=x((t,e)=>{if(J.warn("extractor - ",e,Oo(t),t.children("D")),e>10){J.error("Bailing out");return}let r=t.nodes(),n=!1;for(let i of r){let a=t.children(i);n=n||a.length>0}if(!n){J.debug("Done, no node has children",t.nodes());return}J.debug("Nodes = ",r,e);for(let i of r)if(J.debug("Extracting node",i,yr,yr.has(i)&&!yr.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!yr.has(i))J.debug("Not a cluster",i,e);else if(!yr.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){J.warn("Cluster without external connections, without a parent and with children",i,e);let s=t.graph().rankdir==="TB"?"LR":"TB";yr.get(i)?.clusterData?.dir&&(s=yr.get(i).clusterData.dir,J.warn("Fixing dir",yr.get(i).clusterData.dir,s));let o=new rn({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});J.warn("Old graph before copy",Oo(t)),hae(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:yr.get(i).clusterData,label:yr.get(i).label,graph:o}),J.warn("New graph after copy node: (",i,")",Oo(o)),J.debug("Old graph after copy",Oo(t))}else J.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!yr.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),J.debug(yr);r=t.nodes(),J.warn("New list of nodes",r);for(let i of r){let a=t.node(i);J.warn(" Now next level",i,a),a?.clusterNode&&dae(a.graph,e+1)}},"extractor"),pae=x((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{let i=t.children(n),a=pae(t,i);r=[...r,...a]}),r},"sorter"),fNe=x(t=>pae(t,t.children()),"sortNodesByHierarchy"),gae=x(async(t,e,r,n,i,a)=>{J.warn("Graph in recursive render:XAX",Oo(e),i);let s=e.graph().rankdir;J.trace("Dir in recursive render - dir:",s);let o=t.insert("g").attr("class","root");e.nodes()?J.info("Recursive render XXX",e.nodes()):J.info("No nodes found for",e),e.edges().length>0&&J.info("Recursive edges",e.edge(e.edges()[0]));let l=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),h=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(m){let v=e.node(m);if(i!==void 0){let y=JSON.parse(JSON.stringify(i.clusterData));J.trace(`Setting data for parent cluster XXX Node.id = `,m,` data=`,y.height,` Parent cluster`,i.height),e.setNode(i.id,y),e.parent(m)||(J.trace("Setting parent",m,i.id),e.setParent(m,i.id,y))}if(J.info("(Insert) Node XXX"+m+": "+JSON.stringify(e.node(m))),v?.clusterNode){J.info("Cluster identified XBX",m,v.width,e.node(m));let{ranksep:y,nodesep:b}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:y+25,nodesep:b});let w=await gae(f,v.graph,r,n,e.node(m),a),S=w.elem;Pt(v,S),v.diff=w.diff||0,J.info("New compound node after recursive render XAX",m,"width",v.width,"height",v.height),OJ(S,v)}else e.children(m).length>0?(J.trace("Cluster - the non recursive path XBX",m,v.id,v,v.width,"Graph:",e),J.trace(r2(v.id,e)),yr.set(v.id,{id:r2(v.id,e),node:v})):(J.trace("Node - the non recursive path XAX",m,f,e.node(m),s),await Fd(f,e.node(m),{config:a,dir:s}))})),await x(async()=>{let m=e.edges().map(async function(v){let y=e.edge(v.v,v.w,v.name);J.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),J.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),J.info("Fix",yr,"ids:",v.v,v.w,"Translating: ",yr.get(v.v),yr.get(v.w)),await mw(h,y)});await Promise.all(m)},"processEdges")(),J.info("Graph before layout:",JSON.stringify(Oo(e))),J.info("############################################# XXX"),J.info("### Layout ### XXX"),J.info("############################################# XXX"),t2(e),J.info("Graph after layout:",JSON.stringify(Oo(e)));let p=0,{subGraphTitleTotalMargin:g}=bu(a);return await Promise.all(fNe(e).map(async function(m){let v=e.node(m);if(J.info("Position XBX => "+m+": ("+v.x,","+v.y,") width: ",v.width," height: ",v.height),v?.clusterNode)v.y+=g,J.info("A tainted cluster node XBX1",m,v.id,v.width,v.height,v.x,v.y,e.parent(m)),yr.get(v.id).node=v,Wy(v);else if(e.children(m).length>0){J.info("A pure cluster node XBX1",m,v.id,v.x,v.y,v.width,v.height,e.parent(m)),v.height+=g,e.node(v.parentId);let y=v?.padding/2||0,b=v?.labelBBox?.height||0,w=b-y||0;J.debug("OffsetY",w,"labelHeight",b,"halfPadding",y),await tg(l,v),yr.get(v.id).node=v}else{let y=e.node(v.parentId);v.y+=g/2,J.info("A regular node XBX1 - using the padding",v.id,"parent",v.parentId,v.width,v.height,v.x,v.y,"offsetY",v.offsetY,"parent",y,y?.offsetY,v),Wy(v)}})),e.edges().forEach(function(m){let v=e.edge(m);J.info("Edge "+m.v+" -> "+m.w+": "+JSON.stringify(v),v),v.points.forEach(S=>S.y+=g/2);let y=e.node(m.v);var b=e.node(m.w);let w=yw(u,v,yr,r,y,b,n);vw(v,w)}),e.nodes().forEach(function(m){let v=e.node(m);J.info(m,v.type,v.diff),v.isGroup&&(p=v.diff)}),J.warn("Returning from recursive render XAX",o,p),{elem:o,diff:p}},"recursiveRender"),dNe=x(async(t,e)=>{let r=new rn({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{}}),n=e.select("g");xw(n,t.markers,t.type,t.diagramId),PJ(),zJ(),vQ(),lNe(),t.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),J.debug("Edges:",t.edges),t.edges.forEach(a=>{if(a.start===a.end){let s=a.start,o=s+"---"+s+"---1",l=s+"---"+s+"---2",u=r.node(s);r.setNode(o,{domId:o,id:o,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(o,u.parentId),r.setNode(l,{domId:l,id:l,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(l,u.parentId);let h=structuredClone(a),f=structuredClone(a),d=structuredClone(a);h.label="",h.arrowTypeEnd="none",h.id=s+"-cyclic-special-1",f.arrowTypeStart="none",f.arrowTypeEnd="none",f.id=s+"-cyclic-special-mid",d.label="",u.isGroup&&(h.fromCluster=s,d.toCluster=s),d.id=s+"-cyclic-special-2",d.arrowTypeStart="none",r.setEdge(s,o,h,s+"-cyclic-special-0"),r.setEdge(o,l,f,s+"-cyclic-special-1"),r.setEdge(l,s,d,s+"-cyct.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return s=l.done,l},e:function(l){o=!0,a=l},f:function(){try{s||r.return==null||r.return()}finally{if(o)throw a}}}}function Hoe(t,e,r){return(e=Yoe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vNe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function yNe(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(h){u=!0,i=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function xNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yi(t,e){return pNe(t)||yNe(t,e)||CI(t,e)||xNe()}function YT(t){return gNe(t)||vNe(t)||CI(t)||bNe()}function wNe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Yoe(t){var e=wNe(t,"string");return typeof e=="symbol"?e:e+""}function _i(t){"@babel/helpers - typeof";return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_i(t)}function CI(t,e){if(t){if(typeof t=="string")return sI(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sI(t,e):void 0}}function _2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function L2(){if(bae)return RL;bae=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return RL=t,RL}function qNe(){if(wae)return IL;wae=1;var t=typeof kT=="object"&&kT&&kT.Object===Object&&kT;return IL=t,IL}function lk(){if(Tae)return NL;Tae=1;var t=qNe(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return NL=r,NL}function WNe(){if(kae)return DL;kae=1;var t=lk(),e=function(){return t.Date.now()};return DL=e,DL}function HNe(){if(Eae)return ML;Eae=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return ML=e,ML}function YNe(){if(Sae)return OL;Sae=1;var t=HNe(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return OL=r,OL}function LI(){if(Cae)return PL;Cae=1;var t=lk(),e=t.Symbol;return PL=e,PL}function XNe(){if(Aae)return BL;Aae=1;var t=LI(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function a(s){var o=r.call(s,i),l=s[i];try{s[i]=void 0;var u=!0}catch{}var h=n.call(s);return u&&(o?s[i]=l:delete s[i]),h}return BL=a,BL}function jNe(){if(_ae)return FL;_ae=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return FL=r,FL}function rle(){if(Lae)return $L;Lae=1;var t=LI(),e=XNe(),r=jNe(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(o){return o==null?o===void 0?i:n:a&&a in Object(o)?e(o):r(o)}return $L=s,$L}function KNe(){if(Rae)return zL;Rae=1;function t(e){return e!=null&&typeof e=="object"}return zL=t,zL}function R2(){if(Iae)return GL;Iae=1;var t=rle(),e=KNe(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return GL=n,GL}function ZNe(){if(Nae)return VL;Nae=1;var t=YNe(),e=L2(),r=R2(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(r(u))return n;if(e(u)){var h=typeof u.valueOf=="function"?u.valueOf():u;u=e(h)?h+"":h}if(typeof u!="string")return u===0?u:+u;u=t(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):i.test(u)?n:+u}return VL=l,VL}function QNe(){if(Dae)return UL;Dae=1;var t=L2(),e=WNe(),r=ZNe(),n="Expected a function",i=Math.max,a=Math.min;function s(o,l,u){var h,f,d,p,g,m,v=0,y=!1,b=!1,w=!0;if(typeof o!="function")throw new TypeError(n);l=r(l)||0,t(u)&&(y=!!u.leading,b="maxWait"in u,d=b?i(r(u.maxWait)||0,l):d,w="trailing"in u?!!u.trailing:w);function S(L){var _=h,D=f;return h=f=void 0,v=L,p=o.apply(D,_),p}function T(L){return v=L,g=setTimeout(C,l),y?S(L):p}function E(L){var _=L-m,D=L-v,N=l-_;return b?a(N,d-D):N}function A(L){var _=L-m,D=L-v;return m===void 0||_>=l||_<0||b&&D>=d}function C(){var L=e();if(A(L))return I(L);g=setTimeout(C,E(L))}function I(L){return g=void 0,w&&h?S(L):(h=f=void 0,p)}function M(){g!==void 0&&clearTimeout(g),v=0,h=m=f=g=void 0}function R(){return g===void 0?p:I(e())}function k(){var L=e(),_=A(L);if(h=arguments,f=this,m=L,_){if(g===void 0)return T(m);if(b)return clearTimeout(g),g=setTimeout(C,l),S(m)}return g===void 0&&(g=setTimeout(C,l)),p}return k.cancel=M,k.flush=R,k}return UL=s,UL}function nDe(t,e,r,n,i){var a=i*Math.PI/180,s=Math.cos(a)*(t-r)-Math.sin(a)*(e-n)+r,o=Math.sin(a)*(t-r)+Math.cos(a)*(e-n)+n;return{x:s,y:o}}function aDe(t,e,r){if(r===0)return t;var n=(e.x1+e.x2)/2,i=(e.y1+e.y2)/2,a=e.w/e.h,s=1/a,o=nDe(t.x,t.y,n,i,r),l=iDe(o.x,o.y,n,i,a,s);return{x:l.x,y:l.y}}function mDe(){return Fae||(Fae=1,function(t,e){(function(){var r,n,i,a,s,o,l,u,h,f,d,p,g,m,v;i=Math.floor,f=Math.min,n=function(y,b){return yb?1:0},h=function(y,b,w,S,T){var E;if(w==null&&(w=0),T==null&&(T=n),w<0)throw new Error("lo must be non-negative");for(S==null&&(S=y.length);wM;0<=M?I++:I--)C.push(I);return C}.apply(this).reverse(),A=[],S=0,T=E.length;SR;0<=R?++C:--C)k.push(s(y,w));return k},m=function(y,b,w,S){var T,E,A;for(S==null&&(S=n),T=y[w];w>b;){if(A=w-1>>1,E=y[A],S(T,E)<0){y[w]=E,w=A;continue}break}return y[w]=T},v=function(y,b,w){var S,T,E,A,C;for(w==null&&(w=n),T=y.length,C=b,E=y[b],S=2*b+1;S-1}return yR=e,yR}function cOe(){if(Sse)return xR;Sse=1;var t=pk();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return xR=e,xR}function uOe(){if(Cse)return bR;Cse=1;var t=aOe(),e=sOe(),r=oOe(),n=lOe(),i=cOe();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&n%1==0&&n0;){var h=i.shift();e(h),a.add(h.id()),o&&n(i,a,h)}return t}function Dle(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i0&&arguments[0]!==void 0?arguments[0]:bPe,e=arguments.length>1?arguments[1]:void 0,r=0;r0?k=_:R=_;while(Math.abs(L)>s&&++D=a?b(M,D):N===0?D:S(M,R,R+u)}var E=!1;function A(){E=!0,(t!==e||r!==n)&&w()}var C=function(R){return E||A(),t===e&&r===n?R:R===0?0:R===1?1:v(T(R),e,n)};C.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var I="generateBezier("+[t,e,r,n]+")";return C.toString=function(){return I},C}function goe(t,e,r,n,i){if(n===1||e===r)return r;var a=i(e,r,n);return t==null||((t.roundValue||t.color)&&(a=Math.round(a)),t.min!==void 0&&(a=Math.max(a,t.min)),t.max!==void 0&&(a=Math.min(a,t.max))),a}function moe(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function kg(t,e,r,n,i){var a=i!=null?i.type:null;r<0?r=0:r>1&&(r=1);var s=moe(t,i),o=moe(e,i);if(bt(s)&&bt(o))return goe(a,s,o,r,n);if(wn(s)&&wn(o)){for(var l=[],u=0;u0?(p==="spring"&&g.push(s.duration),s.easingImpl=GT[p].apply(null,g)):s.easingImpl=GT[p]}var m=s.easingImpl,v;if(s.duration===0?v=1:v=(r-l)/s.duration,s.applying&&(v=s.progress),v<0?v=0:v>1&&(v=1),s.delay==null){var y=s.startPosition,b=s.position;if(b&&i&&!t.locked()){var w={};s2(y.x,b.x)&&(w.x=kg(y.x,b.x,v,m)),s2(y.y,b.y)&&(w.y=kg(y.y,b.y,v,m)),t.position(w)}var S=s.startPan,T=s.pan,E=a.pan,A=T!=null&&n;A&&(s2(S.x,T.x)&&(E.x=kg(S.x,T.x,v,m)),s2(S.y,T.y)&&(E.y=kg(S.y,T.y,v,m)),t.emit("pan"));var C=s.startZoom,I=s.zoom,M=I!=null&&n;M&&(s2(C,I)&&(a.zoom=x2(a.minZoom,kg(C,I,v,m),a.maxZoom)),t.emit("zoom")),(A||M)&&t.emit("viewport");var R=s.style;if(R&&R.length>0&&i){for(var k=0;k=0;A--){var C=E[A];C()}E.splice(0,E.length)},b=p.length-1;b>=0;b--){var w=p[b],S=w._private;if(S.stopped){p.splice(b,1),S.hooked=!1,S.playing=!1,S.started=!1,y(S.frames);continue}!S.playing&&!S.applying||(S.playing&&S.applying&&(S.applying=!1),S.started||MPe(h,w,t),DPe(h,w,t,f),S.applying&&(S.applying=!1),y(S.frames),S.step!=null&&S.step(t),w.completed()&&(p.splice(b,1),S.hooked=!1,S.playing=!1,S.started=!1,y(S.completes)),m=!0)}return!f&&p.length===0&&g.length===0&&n.push(h),m}for(var a=!1,s=0;s0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}function Zle(t){this.options=Kt({},VPe,UPe,t)}function Qle(t){this.options=Kt({},qPe,t)}function Jle(t){this.options=Kt({},WPe,t)}function Tk(t){this.options=Kt({},HPe,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(i){var a=i.source().data("id"),s=i.target().data("id"),o=e.some(function(u){return u.data("id")===a}),l=e.some(function(u){return u.data("id")===s});return!o||!l});this.options.eles=this.options.eles.not(n)}function nce(t){this.options=Kt({},oBe,t)}function WI(t){this.options=Kt({},lBe,t)}function ice(t){this.options=Kt({},cBe,t)}function ace(t){this.options=Kt({},uBe,t)}function sce(t){this.options=t,this.notifications=0}function cce(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function YI(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(dBe(t,e,r,n,i),{cx:vI,cy:yI,radius:e0,startX:oce,startY:lce,stopX:xI,stopY:bI,startAngle:Cc.ang+Math.PI/2*r0,endAngle:Po.ang-Math.PI/2*r0,counterClockwise:qT})}function uce(t){var e=[];if(t!=null){for(var r=0;r5&&arguments[5]!==void 0?arguments[5]:5,s=Math.min(a,n/2,i/2);t.beginPath(),t.moveTo(e+s,r),t.lineTo(e+n-s,r),t.quadraticCurveTo(e+n,r,e+n,r+s),t.lineTo(e+n,r+i-s),t.quadraticCurveTo(e+n,r+i,e+n-s,r+i),t.lineTo(e+s,r+i),t.quadraticCurveTo(e,r+i,e,r+i-s),t.lineTo(e,r+s),t.quadraticCurveTo(e,r,e+s,r),t.closePath()}function Boe(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(n));return n}function rFe(t,e,r){var n=Boe(t,t.VERTEX_SHADER,e),i=Boe(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,n),t.attachShader(a,i),t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS))throw new Error("Could not initialize shaders");return a}function nFe(t,e,r){r===void 0&&(r=e);var n=t.makeOffscreenCanvas(e,r),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function KI(t){var e=t.pixelRatio,r=t.cy.zoom(),n=t.cy.pan();return{zoom:r*e,pan:{x:n.x*e,y:n.y*e}}}function iFe(t){var e=t.pixelRatio,r=t.cy.zoom();return r*e}function aFe(t,e,r,n,i){var a=n*r+e.x,s=i*r+e.y;return s=Math.round(t.canvasHeight-s),[a,s]}function sFe(t){return t.pstyle("background-fill").value!=="solid"||t.pstyle("background-image").strValue!=="none"?!1:t.pstyle("border-width").value===0||t.pstyle("border-opacity").value===0?!0:t.pstyle("border-style").value==="solid"}function oFe(t,e){if(t.length!==e.length)return!1;for(var r=0;r>0&255)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}function lFe(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function cFe(t,e){var r=t.createTexture();return r.buffer=function(n){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function kce(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 Ece(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function uFe(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 hFe(t,e,r,n){var i=kce(t,e),a=yi(i,2),s=a[0],o=a[1],l=Ece(t,o,n),u=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,l,t.STATIC_DRAW),o===t.FLOAT?t.vertexAttribPointer(r,s,o,!1,0,0):o===t.INT&&t.vertexAttribIPointer(r,s,o,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),u}function Sc(t,e,r,n){var i=kce(t,r),a=yi(i,3),s=a[0],o=a[1],l=a[2],u=Ece(t,o,e*s),h=s*l,f=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,f),t.bufferData(t.ARRAY_BUFFER,e*h,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),o===t.FLOAT?t.vertexAttribPointer(n,s,o,!1,h,0):o===t.INT&&t.vertexAttribIPointer(n,s,o,h,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var d=new Array(e),p=0;pyce?(_Fe(t),e.call(t,a)):(LFe(t),_ce(t,a,g2.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(a){r.call(t,a),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(a,s,o,l){return OFe(t,a,s)};{var n=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){n.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var i=t.notify;t.notify=function(a,s){i.call(t,a,s),a==="viewport"||a==="bounds"?t.pickingFrameBuffer.needsDraw=!0:a==="background"&&t.drawing.invalidate(s,{type:"node-body"})}}}function _Fe(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function LFe(t){var e=function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.canvasWidth,t.canvasHeight),n.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function RFe(t){var e=t.canvasWidth,r=t.canvasHeight,n=KI(t),i=n.pan,a=n.zoom,s=eI();HT(s,s,[i.x,i.y]),TI(s,s,[a,a]);var o=eI();gFe(o,e,r);var l=eI();return pFe(l,o,s),l}function Ace(t,e){var r=t.canvasWidth,n=t.canvasHeight,i=KI(t),a=i.pan,s=i.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,n),e.translate(a.x,a.y),e.scale(s,s)}function IFe(t,e){t.drawSelectionRectangle(e,function(r){return Ace(t,r)})}function NFe(t){var e=t.data.contexts[t.NODE];e.save(),Ace(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function DFe(t){var e=function(i,a,s){for(var o=i.atlasManager.getAtlasCollection(a),l=t.data.contexts[t.NODE],u=o.atlases,h=0;h=0&&S.add(A)}return S}function OFe(t,e,r){var n=MFe(t,e,r),i=t.getCachedZSortedEles(),a,s,o=Ps(n),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,h=i[u];if(!a&&h.isNode()&&(a=h),!s&&h.isEdge()&&(s=h),a&&s)break}}catch(f){o.e(f)}finally{o.f()}return[a,s].filter(Boolean)}function aI(t,e,r){var n=t.drawing;e+=1,r.isNode()?(n.drawNode(r,e,"node-underlay"),n.drawNode(r,e,"node-body"),n.drawTexture(r,e,"label"),n.drawNode(r,e,"node-overlay")):(n.drawEdgeLine(r,e),n.drawEdgeArrow(r,e,"source"),n.drawEdgeArrow(r,e,"target"),n.drawTexture(r,e,"label"),n.drawTexture(r,e,"edge-source-label"),n.drawTexture(r,e,"edge-target-label"))}function _ce(t,e,r){var n;t.webglDebug&&(n=performance.now());var i=t.drawing,a=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&IFe(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var s=t.data.contexts[t.WEBGL];r.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=RFe(t),l=t.getCachedZSortedEles();if(a=l.length,i.startFrame(o,r),r.screen){for(var u=0;u{Ci=typeof window>"u"?null:window,yae=Ci?Ci.navigator:null;Ci&&Ci.document;TNe=_i(""),Xoe=_i({}),kNe=_i(function(){}),ENe=typeof HTMLElement>"u"?"undefined":_i(HTMLElement),C2=function(e){return e&&e.instanceString&&ei(e.instanceString)?e.instanceString():null},qt=function(e){return e!=null&&_i(e)==TNe},ei=function(e){return e!=null&&_i(e)===kNe},wn=function(e){return!ro(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Vr=function(e){return e!=null&&_i(e)===Xoe&&!wn(e)&&e.constructor===Object},SNe=function(e){return e!=null&&_i(e)===Xoe},bt=function(e){return e!=null&&_i(e)===_i(1)&&!isNaN(e)},CNe=function(e){return bt(e)&&Math.floor(e)===e},XT=function(e){if(ENe!=="undefined")return e!=null&&e instanceof HTMLElement},ro=function(e){return A2(e)||joe(e)},A2=function(e){return C2(e)==="collection"&&e._private.single},joe=function(e){return C2(e)==="collection"&&!e._private.single},AI=function(e){return C2(e)==="core"},Koe=function(e){return C2(e)==="stylesheet"},ANe=function(e){return C2(e)==="event"},uf=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},_Ne=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},LNe=function(e){return Vr(e)&&bt(e.x1)&&bt(e.x2)&&bt(e.y1)&&bt(e.y2)},RNe=function(e){return SNe(e)&&ei(e.then)},INe=function(){return yae&&yae.userAgent.match(/msie|trident|edge/i)},Pg=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],s=0;sr?1:0},FNe=function(e,r){return-1*Qoe(e,r)},Kt=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(v-=1),v<1/6?g+(m-g)*6*v:v<1/2?m:v<2/3?g+(m-g)*(2/3-v)*6:g}var f=new RegExp("^"+MNe+"$").exec(e);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(f[2]),i<0||i>100||(i=i/100,a=parseFloat(f[3]),a<0||a>100)||(a=a/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(i===0)o=l=u=Math.round(a*255);else{var d=a<.5?a*(1+i):a+i-a*i,p=2*a-d;o=Math.round(255*h(p,d,n+1/3)),l=Math.round(255*h(p,d,n)),u=Math.round(255*h(p,d,n-1/3))}r=[o,l,u,s]}return r},GNe=function(e){var r,n=new RegExp("^"+NNe+"$").exec(e);if(n){r=[];for(var i=[],a=1;a<=3;a++){var s=n[a];if(s[s.length-1]==="%"&&(i[a]=!0),s=parseFloat(s),i[a]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=i[1]||i[2]||i[3],l=i[1]&&i[2]&&i[3];if(o&&!l)return;var u=n[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},VNe=function(e){return UNe[e.toLowerCase()]},Joe=function(e){return(wn(e)?e:null)||VNe(e)||$Ne(e)||GNe(e)||zNe(e)},UNe={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},ele=function(e){for(var r=e.map,n=e.keys,i=n.length,a=0;a1&&arguments[1]!==void 0?arguments[1]:t0,n=r,i;i=e.next(),!i.done;)n=n*ile+i.value|0;return n},m2=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t0;return r*ile+e|0},v2=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_g;return(r<<5)+r+e|0},tDe=function(e,r){return e*2097152+r},tf=function(e){return e[0]*2097152+e[1]},ET=function(e,r){return[m2(e[0],r[0]),v2(e[1],r[1])]},Mae=function(e,r){var n={value:0,done:!1},i=0,a=e.length,s={next:function(){return i=0;i--)e[i]===r&&e.splice(i,1)},NI=function(e){e.splice(0,e.length)},hDe=function(e,r){for(var n=0;n"u"?"undefined":_i(Set))!==dDe?Set:pDe,ck=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!AI(e)){Vn("An element must have a core reference and parameters set");return}var i=r.group;if(i==null&&(r.data&&r.data.source!=null&&r.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){Vn("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return}this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?i==="edges":!!r.pannable,active:!1,classes:new $g,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();a.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];wn(r.classes)?u=r.classes:qt(r.classes)&&(u=r.classes.split(/\s+/));for(var h=0,f=u.length;h0;){var E=b.pop(),A=v(E),C=E.id();if(d[C]=A,A!==1/0)for(var I=E.neighborhood().intersect(g),M=0;M0)for(P.unshift(O);f[G];){var $=f[G];P.unshift($.edge),P.unshift($.node),B=$.node,G=B.id()}return o.spawn(P)}}}},wDe={kruskal:function(e){e=e||function(w){return 1};for(var r=this.byGroup(),n=r.nodes,i=r.edges,a=n.length,s=new Array(a),o=n,l=function(S){for(var T=0;T0;){if(T(),A++,S===h){for(var C=[],I=a,M=h,R=y[M];C.unshift(I),R!=null&&C.unshift(R),I=v[M],I!=null;)M=I.id(),R=y[M];return{found:!0,distance:f[S],path:this.spawn(C),steps:A}}p[S]=!0;for(var k=w._private.edges,L=0;LR&&(g[M]=R,b[M]=I,w[M]=T),!a){var k=I*h+C;!a&&g[k]>R&&(g[k]=R,b[k]=C,w[k]=T)}}}for(var L=0;L1&&arguments[1]!==void 0?arguments[1]:s,pe=w(W),Be=[],Ye=pe;;){if(Ye==null)return r.spawn();var qe=b(Ye),Le=qe.edge,Me=qe.pred;if(Be.unshift(Ye[0]),Ye.same(Ve)&&Be.length>0)break;Le!=null&&Be.unshift(Le),Ye=Me}return l.spawn(Be)},E=0;E=0;h--){var f=u[h],d=f[1],p=f[2];(r[d]===o&&r[p]===l||r[d]===l&&r[p]===o)&&u.splice(h,1)}for(var g=0;gi;){var a=Math.floor(Math.random()*r.length);r=LDe(a,e,r),n--}return r},RDe={kargerStein:function(){var e=this,r=this.byGroup(),n=r.nodes,i=r.edges;i.unmergeBy(function(P){return P.isLoop()});var a=n.length,s=i.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),l=Math.floor(a/_De);if(a<2){Vn("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],h=0;h1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=-1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=0,a=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?e=e.slice(r,n):(n0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}a&&e.sort(function(d,p){return d-p});var h=e.length,f=Math.floor(h/2);return h%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},PDe=function(e){return Math.PI*e/180},ST=function(e,r){return Math.atan2(r,e)-Math.PI/2},DI=Math.log2||function(t){return Math.log(t)/Math.log(2)},MI=function(e){return e>0?1:e<0?-1:0},a0=function(e,r){return Math.sqrt(Jd(e,r))},Jd=function(e,r){var n=r.x-e.x,i=r.y-e.y;return n*n+i*i},BDe=function(e){for(var r=e.length,n=0,i=0;i=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},$De=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},zDe=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},GDe=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},fle=function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},BT=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},FT=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,s;if(r.length===1)n=i=a=s=r[0];else if(r.length===2)n=a=r[0],s=i=r[1];else if(r.length===4){var o=yi(r,4);n=o[0],i=o[1],a=o[2],s=o[3]}return e.x1-=s,e.x2+=i,e.y1-=n,e.y2+=a,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},zae=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},OI=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},sf=function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},Gae=function(e,r){return sf(e,r.x,r.y)},dle=function(e,r){return sf(e,r.x1,r.y1)&&sf(e,r.x2,r.y2)},VDe=(YL=Math.hypot)!==null&&YL!==void 0?YL:function(t,e){return Math.sqrt(t*t+e*e)};ple=function(e,r,n,i,a,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?ff(a,s):l,h=a/2,f=s/2;u=Math.min(u,h,f);var d=u!==h,p=u!==f,g;if(d){var m=n-h+u-o,v=i-f-o,y=n+h-u+o,b=v;if(g=of(e,r,n,i,m,v,y,b,!1),g.length>0)return g}if(p){var w=n+h+o,S=i-f+u-o,T=w,E=i+f-u+o;if(g=of(e,r,n,i,w,S,T,E,!1),g.length>0)return g}if(d){var A=n-h+u-o,C=i+f+o,I=n+h-u+o,M=C;if(g=of(e,r,n,i,A,C,I,M,!1),g.length>0)return g}if(p){var R=n-h-o,k=i-f+u-o,L=R,_=i+f-u+o;if(g=of(e,r,n,i,R,k,L,_,!1),g.length>0)return g}var D;{var N=n-h+u,O=i-f+u;if(D=u2(e,r,n,i,N,O,u+o),D.length>0&&D[0]<=N&&D[1]<=O)return[D[0],D[1]]}{var P=n+h-u,B=i-f+u;if(D=u2(e,r,n,i,P,B,u+o),D.length>0&&D[0]>=P&&D[1]<=B)return[D[0],D[1]]}{var G=n+h-u,$=i+f-u;if(D=u2(e,r,n,i,G,$,u+o),D.length>0&&D[0]>=G&&D[1]>=$)return[D[0],D[1]]}{var U=n-h+u,X=i+f-u;if(D=u2(e,r,n,i,U,X,u+o),D.length>0&&D[0]<=U&&D[1]>=X)return[D[0],D[1]]}return[]},WDe=function(e,r,n,i,a,s,o){var l=o,u=Math.min(n,a),h=Math.max(n,a),f=Math.min(i,s),d=Math.max(i,s);return u-l<=e&&e<=h+l&&f-l<=r&&r<=d+l},HDe=function(e,r,n,i,a,s,o,l,u){var h={x1:Math.min(n,o,a)-u,x2:Math.max(n,o,a)+u,y1:Math.min(i,l,s)-u,y2:Math.max(i,l,s)+u};return!(eh.x2||rh.y2)},YDe=function(e,r,n,i){n-=i;var a=r*r-4*e*n;if(a<0)return[];var s=Math.sqrt(a),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},XDe=function(e,r,n,i,a){var s=1e-5;e===0&&(e=s),r/=e,n/=e,i/=e;var o,l,u,h,f,d,p,g;if(l=(3*n-r*r)/9,u=-(27*i)+r*(9*n-2*(r*r)),u/=54,o=l*l*l+u*u,a[1]=0,p=r/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),d=u-Math.sqrt(o),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),a[0]=-p+f+d,p+=(f+d)/2,a[4]=a[2]=-p,p=Math.sqrt(3)*(-d+f)/2,a[3]=p,a[5]=-p;return}if(a[5]=a[3]=0,o===0){g=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),a[0]=-p+2*g,a[4]=a[2]=-(g+p);return}l=-l,h=l*l*l,h=Math.acos(u/Math.sqrt(h)),g=2*Math.sqrt(l),a[0]=-p+g*Math.cos(h/3),a[2]=-p+g*Math.cos((h+2*Math.PI)/3),a[4]=-p+g*Math.cos((h+4*Math.PI)/3)},jDe=function(e,r,n,i,a,s,o,l){var u=1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+i*i-4*i*s+2*i*l+4*s*s-4*s*l+l*l,h=1*9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*i*s-3*i*i-3*i*l-6*s*s+3*s*l,f=1*3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*i*i-6*i*s+i*l-i*r+2*s*s+2*s*r-l*r,d=1*n*a-n*n+n*e-a*e+i*s-i*i+i*r-s*r,p=[];XDe(u,h,f,d,p);for(var g=1e-7,m=[],v=0;v<6;v+=2)Math.abs(p[v+1])=0&&p[v]<=1&&m.push(p[v]);m.push(1),m.push(0);for(var y=-1,b,w,S,T=0;T=0?Su?(e-a)*(e-a)+(r-s)*(r-s):h-d},Os=function(e,r,n){for(var i,a,s,o,l,u=0,h=0;h=e&&e>=s||i<=e&&e<=s)l=(e-i)/(s-i)*(o-a)+a,l>r&&u++;else continue;return u%2!==0},Mu=function(e,r,n,i,a,s,o,l,u){var h=new Array(n.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var d=Math.cos(-f),p=Math.sin(-f),g=0;g0){var v=QT(h,-u);m=ZT(v)}else m=h;return Os(e,r,m)},ZDe=function(e,r,n,i,a,s,o,l){for(var u=new Array(n.length*2),h=0;h=0&&v<=1&&b.push(v),y>=0&&y<=1&&b.push(y),b.length===0)return[];var w=b[0]*l[0]+e,S=b[0]*l[1]+r;if(b.length>1){if(b[0]==b[1])return[w,S];var T=b[1]*l[0]+e,E=b[1]*l[1]+r;return[w,S,T,E]}else return[w,S]},XL=function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},of=function(e,r,n,i,a,s,o,l,u){var h=e-a,f=n-e,d=o-a,p=r-s,g=i-r,m=l-s,v=d*p-m*h,y=f*p-g*h,b=m*f-d*g;if(b!==0){var w=v/b,S=y/b,T=.001,E=0-T,A=1+T;return E<=w&&w<=A&&E<=S&&S<=A?[e+w*f,r+w*g]:u?[e+w*f,r+w*g]:[]}else return v===0||y===0?XL(e,n,o)===o?[o,l]:XL(e,n,a)===a?[a,s]:XL(a,o,n)===n?[n,i]:[]:[]},JDe=function(e,r,n,i,a){var s=[],o=i/2,l=a/2,u=r,h=n;s.push({x:u+o*e[0],y:h+l*e[1]});for(var f=1;f0){var m=QT(f,-l);p=ZT(m)}else p=f}else p=n;for(var v,y,b,w,S=0;S2){for(var g=[h[0],h[1]],m=Math.pow(g[0]-e,2)+Math.pow(g[1]-r,2),v=1;vh&&(h=S)},get:function(w){return u[w]}},d=0;d0?D=_.edgesTo(L)[0]:D=L.edgesTo(_)[0];var N=i(D);L=L.id(),A[L]>A[R]+N&&(A[L]=A[R]+N,C.nodes.indexOf(L)<0?C.push(L):C.updateItem(L),E[L]=0,T[L]=[]),A[L]==A[R]+N&&(E[L]=E[L]+E[R],T[L].push(R))}else for(var O=0;O0;){for(var $=S.pop(),U=0;U0&&o.push(n[l]);o.length!==0&&a.push(i.collection(o))}return a},pMe=function(e,r){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:vMe,o=i,l,u,h=0;h=2?n2(e,r,n,0,Hae,yMe):n2(e,r,n,0,Wae)},squaredEuclidean:function(e,r,n){return n2(e,r,n,0,Hae)},manhattan:function(e,r,n){return n2(e,r,n,0,Wae)},max:function(e,r,n){return n2(e,r,n,-1/0,xMe)}};Bg["squared-euclidean"]=Bg.squaredEuclidean;Bg.squaredeuclidean=Bg.squaredEuclidean;bMe=ha({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),BI=function(e){return bMe(e)},JT=function(e,r,n,i,a){var s=a!=="kMedoids",o=s?function(f){return n[f]}:function(f){return i[f](n)},l=function(d){return i[d](r)},u=n,h=r;return hk(e,i.length,o,l,u,h)},KL=function(e,r,n){for(var i=n.length,a=new Array(i),s=new Array(i),o=new Array(r),l=null,u=0;un)return!1}return!0},kMe=function(e,r,n){for(var i=0;io&&(o=r[u][h],l=h);a[l].push(e[u])}for(var f=0;f=a.threshold||a.mode==="dendrogram"&&e.length===1)return!1;var g=r[s],m=r[i[s]],v;a.mode==="dendrogram"?v={left:g,right:m,key:g.key}:v={value:g.value.concat(m.value),key:g.key},e[g.index]=v,e.splice(m.index,1),r[g.key]=v;for(var y=0;yn[m.key][b.key]&&(l=n[m.key][b.key])):a.linkage==="max"?(l=n[g.key][b.key],n[g.key][b.key]0&&i.push(a);return i},Qae=function(e,r,n){for(var i=[],a=0;ao&&(s=u,o=r[a*e+u])}s>0&&i.push(s)}for(var h=0;hu&&(l=h,u=f)}n[a]=s[l]}return i=Qae(e,r,n),i},Jae=function(e){for(var r=this.cy(),n=this.nodes(),i=OMe(e),a={},s=0;s=R?(k=R,R=_,L=D):_>k&&(k=_);for(var N=0;N0?1:0;A[I%i.minIterations*o+U]=X,$+=X}if($>0&&(I>=i.minIterations-1||I==i.maxIterations-1)){for(var ee=0,Y=0;Y1||E>1)&&(o=!0),f[w]=[],b.outgoers().forEach(function(C){C.isEdge()&&f[w].push(C.id())})}else d[w]=[void 0,b.target().id()]}):s.forEach(function(b){var w=b.id();if(b.isNode()){var S=b.degree(!0);S%2&&(l?u?o=!0:u=w:l=w),f[w]=[],b.connectedEdges().forEach(function(T){return f[w].push(T.id())})}else d[w]=[b.source().id(),b.target().id()]});var p={found:!1,trail:void 0};if(o)return p;if(u&&l)if(a){if(h&&u!=h)return p;h=u}else{if(h&&u!=h&&l!=h)return p;h||(h=u)}else h||(h=s[0].id());var g=function(w){for(var S=w,T=[w],E,A,C;f[S].length;)E=f[S].shift(),A=d[E][0],C=d[E][1],S!=C?(f[C]=f[C].filter(function(I){return I!=E}),S=C):!a&&S!=A&&(f[A]=f[A].filter(function(I){return I!=E}),S=A),T.unshift(E),T.unshift(S);return T},m=[],v=[];for(v=g(h);v.length!=1;)f[v[0]].length==0?(m.unshift(s.getElementById(v.shift())),m.unshift(s.getElementById(v.shift()))):v=g(v.shift()).concat(v);m.unshift(s.getElementById(v.shift()));for(var y in f)if(f[y].length)return p;return p.found=!0,p.trail=this.spawn(m,!0),p}},AT=function(){var e=this,r={},n=0,i=0,a=[],s=[],o={},l=function(d,p){for(var g=s.length-1,m=[],v=e.spawn();s[g].x!=d||s[g].y!=p;)m.push(s.pop().edge),g--;m.push(s.pop().edge),m.forEach(function(y){var b=y.connectedNodes().intersection(e);v.merge(y),b.forEach(function(w){var S=w.id(),T=w.connectedEdges().intersection(e);v.merge(w),r[S].cutVertex?v.merge(T.filter(function(E){return E.isLoop()})):v.merge(T)})}),a.push(v)},u=function(d,p,g){d===g&&(i+=1),r[p]={id:n,low:n++,cutVertex:!1};var m=e.getElementById(p).connectedEdges().intersection(e);if(m.size()===0)a.push(e.spawn(e.getElementById(p)));else{var v,y,b,w;m.forEach(function(S){v=S.source().id(),y=S.target().id(),b=v===p?y:v,b!==g&&(w=S.id(),o[w]||(o[w]=!0,s.push({x:p,y:b,edge:S})),b in r?r[p].low=Math.min(r[p].low,r[b].id):(u(d,b,p),r[p].low=Math.min(r[p].low,r[b].low),r[p].id<=r[b].low&&(r[p].cutVertex=!0,l(p,b))))})}};e.forEach(function(f){if(f.isNode()){var d=f.id();d in r||(i=0,u(d,d),r[d].cutVertex=i>1)}});var h=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(h),components:a}},UMe={hopcroftTarjanBiconnected:AT,htbc:AT,htb:AT,hopcroftTarjanBiconnectedComponents:AT},_T=function(){var e=this,r={},n=0,i=[],a=[],s=e.spawn(e),o=function(u){a.push(u),r[u]={index:n,low:n++,explored:!1};var h=e.getElementById(u).connectedEdges().intersection(e);if(h.forEach(function(m){var v=m.target().id();v!==u&&(v in r||o(v),r[v].explored||(r[u].low=Math.min(r[u].low,r[v].low)))}),r[u].index===r[u].low){for(var f=e.spawn();;){var d=a.pop();if(f.merge(e.getElementById(d)),r[d].low=r[u].index,r[d].explored=!0,d===u)break}var p=f.edgesWith(f),g=f.merge(p);i.push(g),s=s.difference(g)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:i}},qMe={tarjanStronglyConnected:_T,tsc:_T,tscc:_T,tarjanStronglyConnectedComponents:_T},wle={};[y2,bDe,wDe,kDe,SDe,ADe,RDe,nMe,Dg,Mg,cI,mMe,LMe,DMe,zMe,VMe,UMe,qMe].forEach(function(t){Kt(wle,t)});Tle=0,kle=1,Ele=2,wl=function(e){if(!(this instanceof wl))return new wl(e);this.id="Thenable/1.0.7",this.state=Tle,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};wl.prototype={fulfill:function(e){return ese(this,kle,"fulfillValue",e)},reject:function(e){return ese(this,Ele,"rejectReason",e)},then:function(e,r){var n=this,i=new wl;return n.onFulfilled.push(rse(e,i,"fulfill")),n.onRejected.push(rse(r,i,"reject")),Sle(n),i.proxy}};ese=function(e,r,n,i){return e.state===Tle&&(e.state=r,e[n]=i,Sle(e)),e},Sle=function(e){e.state===kle?tse(e,"onFulfilled",e.fulfillValue):e.state===Ele&&tse(e,"onRejected",e.rejectReason)},tse=function(e,r,n){if(e[r].length!==0){var i=e[r];e[r]=[];var a=function(){for(var o=0;o0}},clearQueue:function(){return function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var s=0;s0&&this.spawn(i).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){wn(e)||(e=e.match(/\S+/g)||[]);for(var n=this,i=r===void 0,a=[],s=0,o=n.length;s0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},r),n}};$T.className=$T.classNames=$T.classes;Gr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Ai,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Gr.variable="(?:[\\w-.]|(?:\\\\"+Gr.metaChar+"))+";Gr.className="(?:[\\w-]|(?:\\\\"+Gr.metaChar+"))+";Gr.value=Gr.string+"|"+Gr.number;Gr.id=Gr.variable;(function(){var t,e,r;for(t=Gr.comparatorOp.split("|"),r=0;r=0)&&e!=="="&&(Gr.comparatorOp+="|\\!"+e)})();gn=function(){return{checks:[]}},Mt={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},dI=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return FNe(t.selector,e.selector)}),GOe=function(){for(var t={},e,r=0;r0&&h.edgeCount>0)return an("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(h.edgeCount>1)return an("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;h.edgeCount===1&&an("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},YOe=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(h){return h??""},r=function(h){return qt(h)?'"'+h+'"':e(h)},n=function(h){return" "+h+" "},i=function(h,f){var d=h.type,p=h.value;switch(d){case Mt.GROUP:{var g=e(p);return g.substring(0,g.length-1)}case Mt.DATA_COMPARE:{var m=h.field,v=h.operator;return"["+m+n(e(v))+r(p)+"]"}case Mt.DATA_BOOL:{var y=h.operator,b=h.field;return"["+e(y)+b+"]"}case Mt.DATA_EXIST:{var w=h.field;return"["+w+"]"}case Mt.META_COMPARE:{var S=h.operator,T=h.field;return"[["+T+n(e(S))+r(p)+"]]"}case Mt.STATE:return p;case Mt.ID:return"#"+p;case Mt.CLASS:return"."+p;case Mt.PARENT:case Mt.CHILD:return a(h.parent,f)+n(">")+a(h.child,f);case Mt.ANCESTOR:case Mt.DESCENDANT:return a(h.ancestor,f)+" "+a(h.descendant,f);case Mt.COMPOUND_SPLIT:{var E=a(h.left,f),A=a(h.subject,f),C=a(h.right,f);return E+(E.length>0?" ":"")+A+C}case Mt.TRUE:return""}},a=function(h,f){return h.checks.reduce(function(d,p,g){return d+(f===h&&g===0?"$":"")+i(p,f)},"")},s="",o=0;o1&&o=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),h=!0),(a||o||h)&&(l=!a&&!s?"":""+e,u=""+n),h&&(e=l=l.toLowerCase(),n=u=u.toLowerCase()),r){case"*=":i=l.indexOf(u)>=0;break;case"$=":i=l.indexOf(u,l.length-u.length)>=0;break;case"^=":i=l.indexOf(u)===0;break;case"=":i=e===n;break;case">":d=!0,i=e>n;break;case">=":d=!0,i=e>=n;break;case"<":d=!0,i=e1&&arguments[1]!==void 0?arguments[1]:!0;return GI(this,t,e,Dle)};Fg.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return GI(this,t,e,Mle)};Fg.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return GI(this,t,e,tPe)};Fg.ancestors=Fg.parents;w2=Ole={data:nn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:nn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:nn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:nn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:nn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:nn.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};w2.attr=w2.data;w2.removeAttr=w2.removeData;rPe=Ole,mk={};Kt(mk,{degree:XR(function(t,e){return e.source().same(e.target())?2:1}),indegree:XR(function(t,e){return e.target().same(t)?1:0}),outdegree:XR(function(t,e){return e.source().same(t)?1:0})});Kt(mk,{minDegree:Tg("degree",function(t,e){return te}),minIndegree:Tg("indegree",function(t,e){return te}),minOutdegree:Tg("outdegree",function(t,e){return te})});Kt(mk,{totalDegree:function(e){for(var r=0,n=this.nodes(),i=0;i0,d=f;f&&(h=h[0]);var p=d?h.position():{x:0,y:0};r!==void 0?u.position(e,r+p[e]):a!==void 0&&u.position({x:a.x+p.x,y:a.y+p.y})}else{var g=n.position(),m=o?n.parent():null,v=m&&m.length>0,y=v;v&&(m=m[0]);var b=y?m.position():{x:0,y:0};return a={x:g.x-b.x,y:g.y-b.y},e===void 0?a:a[e]}else if(!s)return;return this}};bl.modelPosition=bl.point=bl.position;bl.modelPositions=bl.points=bl.positions;bl.renderedPoint=bl.renderedPosition;bl.relativePoint=bl.relativePosition;nPe=Ple;Og=yf={};yf.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),i=r.pan(),a=e.x1*n+i.x,s=e.x2*n+i.x,o=e.y1*n+i.y,l=e.y2*n+i.y;return{x1:a,x2:s,y1:o,y2:l,w:s-a,h:l-o}};yf.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};yf.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",h={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),d=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=d.x-f.w/2,f.x2=d.x+f.w/2,f.y1=d.y-f.h/2,f.y2=d.y+f.h/2);function p(I,M,R){var k=0,L=0,_=M+R;return I>0&&_>0&&(k=M/_*I,L=R/_*I),{biasDiff:k,biasComplementDiff:L}}function g(I,M,R,k){if(R.units==="%")switch(k){case"width":return I>0?R.pfValue*I:0;case"height":return M>0?R.pfValue*M:0;case"average":return I>0&&M>0?R.pfValue*(I+M)/2:0;case"min":return I>0&&M>0?I>M?R.pfValue*M:R.pfValue*I:0;case"max":return I>0&&M>0?I>M?R.pfValue*I:R.pfValue*M:0;default:return 0}else return R.units==="px"?R.pfValue:0}var m=h.width.left.value;h.width.left.units==="px"&&h.width.val>0&&(m=m*100/h.width.val);var v=h.width.right.value;h.width.right.units==="px"&&h.width.val>0&&(v=v*100/h.width.val);var y=h.height.top.value;h.height.top.units==="px"&&h.height.val>0&&(y=y*100/h.height.val);var b=h.height.bottom.value;h.height.bottom.units==="px"&&h.height.val>0&&(b=b*100/h.height.val);var w=p(h.width.val-f.w,m,v),S=w.biasDiff,T=w.biasComplementDiff,E=p(h.height.val-f.h,y,b),A=E.biasDiff,C=E.biasComplementDiff;o.autoPadding=g(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,h.width.val),d.x=(-S+f.x1+f.x2+T)/2,o.autoHeight=Math.max(f.h,h.height.val),d.y=(-A+f.y1+f.y2+C)/2}for(var n=0;ne.x2?i:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},nf=function(e,r){return r==null?e:xl(e,r.x1,r.y1,r.x2,r.y2)},i2=function(e,r,n){return Ms(e,r,n)},LT=function(e,r,n){if(!r.cy().headless()){var i=r._private,a=i.rstyle,s=a.arrowWidth/2,o=r.pstyle(n+"-arrow-shape").value,l,u;if(o!=="none"){n==="source"?(l=a.srcX,u=a.srcY):n==="target"?(l=a.tgtX,u=a.tgtY):(l=a.midX,u=a.midY);var h=i.arrowBounds=i.arrowBounds||{},f=h[n]=h[n]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,BT(f,1),xl(e,f.x1,f.y1,f.x2,f.y2)}}},jR=function(e,r,n){if(!r.cy().headless()){var i;n?i=n+"-":i="";var a=r._private,s=a.rstyle,o=r.pstyle(i+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),h=i2(s,"labelWidth",n),f=i2(s,"labelHeight",n),d=i2(s,"labelX",n),p=i2(s,"labelY",n),g=r.pstyle(i+"text-margin-x").pfValue,m=r.pstyle(i+"text-margin-y").pfValue,v=r.isEdge(),y=r.pstyle(i+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,w=r.pstyle("text-border-width").pfValue,S=w/2,T=r.pstyle("text-background-padding").pfValue,E=2,A=f,C=h,I=C/2,M=A/2,R,k,L,_;if(v)R=d-I,k=d+I,L=p-M,_=p+M;else{switch(l.value){case"left":R=d-C,k=d;break;case"center":R=d-I,k=d+I;break;case"right":R=d,k=d+C;break}switch(u.value){case"top":L=p-A,_=p;break;case"center":L=p-M,_=p+M;break;case"bottom":L=p,_=p+A;break}}var D=g-Math.max(b,S)-T-E,N=g+Math.max(b,S)+T+E,O=m-Math.max(b,S)-T-E,P=m+Math.max(b,S)+T+E;R+=D,k+=N,L+=O,_+=P;var B=n||"main",G=a.labelBounds,$=G[B]=G[B]||{};$.x1=R,$.y1=L,$.x2=k,$.y2=_,$.w=k-R,$.h=_-L,$.leftPad=D,$.rightPad=N,$.topPad=O,$.botPad=P;var U=v&&y.strValue==="autorotate",X=y.pfValue!=null&&y.pfValue!==0;if(U||X){var ee=U?i2(a.rstyle,"labelAngle",n):y.pfValue,Y=Math.cos(ee),oe=Math.sin(ee),Q=(R+k)/2,ue=(L+_)/2;if(!v){switch(l.value){case"left":Q=k;break;case"right":Q=R;break}switch(u.value){case"top":ue=_;break;case"bottom":ue=L;break}}var re=function(be,W){return be=be-Q,W=W-ue,{x:be*Y-W*oe+Q,y:be*oe+W*Y+ue}},te=re(R,L),Z=re(R,_),j=re(k,L),ae=re(k,_);R=Math.min(te.x,Z.x,j.x,ae.x),k=Math.max(te.x,Z.x,j.x,ae.x),L=Math.min(te.y,Z.y,j.y,ae.y),_=Math.max(te.y,Z.y,j.y,ae.y)}var K=B+"Rot",de=G[K]=G[K]||{};de.x1=R,de.y1=L,de.x2=k,de.y2=_,de.w=k-R,de.h=_-L,xl(e,R,L,k,_),xl(a.labelBounds.all,R,L,k,_)}return e}},toe=function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,i=r.pstyle("outline-width").value,a=r.pstyle("outline-offset").value,s=i+a;Fle(e,r,n,s,"outside",s/2)}},Fle=function(e,r,n,i,a,s){if(!(n===0||i<=0||a==="inside")){var o=r.cy(),l=r.pstyle("shape").value,u=o.renderer().nodeShapes[l],h=r.position(),f=h.x,d=h.y,p=r.width(),g=r.height();if(u.hasMiterBounds){a==="center"&&(i/=2);var m=u.miterBounds(f,d,p,g,i);nf(e,m)}else s!=null&&s>0&&FT(e,[s,s,s,s])}},iPe=function(e,r){if(!r.cy().headless()){var n=r.pstyle("border-opacity").value,i=r.pstyle("border-width").pfValue,a=r.pstyle("border-position").value;Fle(e,r,n,i,a)}},aPe=function(e,r){var n=e._private.cy,i=n.styleEnabled(),a=n.headless(),s=ts(),o=e._private,l=e.isNode(),u=e.isEdge(),h,f,d,p,g,m,v=o.rstyle,y=l&&i?e.pstyle("bounds-expansion").pfValue:[0],b=function(ne){return ne.pstyle("display").value!=="none"},w=!i||b(e)&&(!u||b(e.source())&&b(e.target()));if(w){var S=0,T=0;i&&r.includeOverlays&&(S=e.pstyle("overlay-opacity").value,S!==0&&(T=e.pstyle("overlay-padding").value));var E=0,A=0;i&&r.includeUnderlays&&(E=e.pstyle("underlay-opacity").value,E!==0&&(A=e.pstyle("underlay-padding").value));var C=Math.max(T,A),I=0,M=0;if(i&&(I=e.pstyle("width").pfValue,M=I/2),l&&r.includeNodes){var R=e.position();g=R.x,m=R.y;var k=e.outerWidth(),L=k/2,_=e.outerHeight(),D=_/2;h=g-L,f=g+L,d=m-D,p=m+D,xl(s,h,d,f,p),i&&toe(s,e),i&&r.includeOutlines&&!a&&toe(s,e),i&&iPe(s,e)}else if(u&&r.includeEdges)if(i&&!a){var N=e.pstyle("curve-style").strValue;if(h=Math.min(v.srcX,v.midX,v.tgtX),f=Math.max(v.srcX,v.midX,v.tgtX),d=Math.min(v.srcY,v.midY,v.tgtY),p=Math.max(v.srcY,v.midY,v.tgtY),h-=M,f+=M,d-=M,p+=M,xl(s,h,d,f,p),N==="haystack"){var O=v.haystackPts;if(O&&O.length===2){if(h=O[0].x,d=O[0].y,f=O[1].x,p=O[1].y,h>f){var P=h;h=f,f=P}if(d>p){var B=d;d=p,p=B}xl(s,h-M,d-M,f+M,p+M)}}else if(N==="bezier"||N==="unbundled-bezier"||af(N,"segments")||af(N,"taxi")){var G;switch(N){case"bezier":case"unbundled-bezier":G=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":G=v.linePts;break}if(G!=null)for(var $=0;$f){var Q=h;h=f,f=Q}if(d>p){var ue=d;d=p,p=ue}h-=M,f+=M,d-=M,p+=M,xl(s,h,d,f,p)}if(i&&r.includeEdges&&u&&(LT(s,e,"mid-source"),LT(s,e,"mid-target"),LT(s,e,"source"),LT(s,e,"target")),i){var re=e.pstyle("ghost").value==="yes";if(re){var te=e.pstyle("ghost-offset-x").pfValue,Z=e.pstyle("ghost-offset-y").pfValue;xl(s,s.x1+te,s.y1+Z,s.x2+te,s.y2+Z)}}var j=o.bodyBounds=o.bodyBounds||{};zae(j,s),FT(j,y),BT(j,1),i&&(h=s.x1,f=s.x2,d=s.y1,p=s.y2,xl(s,h-C,d-C,f+C,p+C));var ae=o.overlayBounds=o.overlayBounds||{};zae(ae,s),FT(ae,y),BT(ae,1);var K=o.labelBounds=o.labelBounds||{};K.all!=null?zDe(K.all):K.all=ts(),i&&r.includeLabels&&(r.includeMainLabels&&jR(s,e,null),u&&(r.includeSourceLabels&&jR(s,e,"source"),r.includeTargetLabels&&jR(s,e,"target")))}return s.x1=Bo(s.x1),s.y1=Bo(s.y1),s.x2=Bo(s.x2),s.y2=Bo(s.y2),s.w=Bo(s.x2-s.x1),s.h=Bo(s.y2-s.y1),s.w>0&&s.h>0&&w&&(FT(s,y),BT(s,1)),s},$le=function(e){var r=0,n=function(s){return(s?1:0)<=0;o--)s(o);return this};gf.removeAllListeners=function(){return this.removeListener("*")};gf.emit=gf.trigger=function(t,e,r){var n=this.listeners,i=n.length;return this.emitting++,wn(e)||(e=[e]),wPe(this,function(a,s){r!=null&&(n=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],i=n.length);for(var o=function(){var h=n[l];if(h.type===s.type&&(!h.namespace||h.namespace===s.namespace||h.namespace===xPe)&&a.eventMatches(a.context,h,s)){var f=[s];e!=null&&hDe(f,e),a.beforeEmit(a.context,h,s),h.conf&&h.conf.one&&(a.listeners=a.listeners.filter(function(g){return g!==h}));var d=a.callbackContext(a.context,h,s),p=h.callback.apply(d,f);a.afterEmit(a.context,h,s),p===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,a.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,n=e._private.data.id,i=r.map,a=i.get(n);if(!a)return this;var s=a.index;return this.unmergeAt(s),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&qt(e)){var n=e;e=r.mutableElements().filter(n)}for(var i=0;i=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},map:function(e,r){for(var n=[],i=this,a=0;an&&(n=l,i=o)}return{value:n,ele:i}},min:function(e,r){for(var n=1/0,i,a=this,s=0;s=0&&a"u"?"undefined":_i(Symbol))!=e&&_i(Symbol.iterator)!=e;r&&(ek[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,s=this.length;return Hoe({next:function(){return a1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,i.style().apply(n));var a=n._private.style[e];return a??(r?i.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},style:function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(Vr(e)){var s=e;a.applyBypass(this,s,i),this.emitAndNotify("style")}else if(qt(e))if(r===void 0){var o=this[0];return o?a.getStylePropertyValue(o,e):void 0}else a.applyBypass(this,e,r,i),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?a.getRawStyle(l):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,i=r.style(),a=this;if(e===void 0)for(var s=0;s0&&e.push(h[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});Ca.neighbourhood=Ca.neighborhood;Ca.closedNeighbourhood=Ca.closedNeighborhood;Ca.openNeighbourhood=Ca.openNeighborhood;Kt(Ca,{source:Fo(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"source"),target:Fo(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"target"),sources:foe({attr:"source"}),targets:foe({attr:"target"})});Kt(Ca,{edgesWith:Fo(doe(),"edgesWith"),edgesTo:Fo(doe({thisIsSrc:!0}),"edgesTo")});Kt(Ca,{connectedEdges:Fo(function(t){for(var e=[],r=this,n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});Ca.componentsOf=Ca.components;ua=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Vn("A collection must have a reference to the core");return}var a=new Nu,s=!1;if(!r)r=[];else if(r.length>0&&Vr(r[0])&&!A2(r[0])){s=!0;for(var o=[],l=new $g,u=0,h=r.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),i=n._private,a=[],s=[],o,l=0,u=r.length;l0){for(var B=o.length===r.length?r:new ua(n,o),G=0;G0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],i={},a=r._private.cy;function s(_){for(var D=_._private.edges,N=0;N0&&(t?R.emitAndNotify("remove"):e&&R.emit("remove"));for(var k=0;kh&&Math.abs(g.v)>h;);return d?function(m){return l[m*(l.length-1)|0]}:u}}(),An=function(e,r,n,i){var a=IPe(e,r,n,i);return function(s,o,l){return s+(o-s)*a(l)}},GT={linear:function(e,r,n){return e+(r-e)*n},ease:An(.25,.1,.25,1),"ease-in":An(.42,0,1,1),"ease-out":An(0,0,.58,1),"ease-in-out":An(.42,0,.58,1),"ease-in-sine":An(.47,0,.745,.715),"ease-out-sine":An(.39,.575,.565,1),"ease-in-out-sine":An(.445,.05,.55,.95),"ease-in-quad":An(.55,.085,.68,.53),"ease-out-quad":An(.25,.46,.45,.94),"ease-in-out-quad":An(.455,.03,.515,.955),"ease-in-cubic":An(.55,.055,.675,.19),"ease-out-cubic":An(.215,.61,.355,1),"ease-in-out-cubic":An(.645,.045,.355,1),"ease-in-quart":An(.895,.03,.685,.22),"ease-out-quart":An(.165,.84,.44,1),"ease-in-out-quart":An(.77,0,.175,1),"ease-in-quint":An(.755,.05,.855,.06),"ease-out-quint":An(.23,1,.32,1),"ease-in-out-quint":An(.86,0,.07,1),"ease-in-expo":An(.95,.05,.795,.035),"ease-out-expo":An(.19,1,.22,1),"ease-in-out-expo":An(1,0,0,1),"ease-in-circ":An(.6,.04,.98,.335),"ease-out-circ":An(.075,.82,.165,1),"ease-in-out-circ":An(.785,.135,.15,.86),spring:function(e,r,n){if(n===0)return GT.linear;var i=NPe(e,r,n);return function(a,s,o){return a+(s-a)*i(o)}},"cubic-bezier":An};OPe={animate:nn.animate(),animation:nn.animation(),animated:nn.animated(),clearQueue:nn.clearQueue(),delay:nn.delay(),delayAnimation:nn.delayAnimation(),stop:nn.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&jT(function(a){voe(a,e),r()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(a,s){voe(s,e)},n.beforeRenderPriorities.animations):r()}},PPe={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var i=r.qualifier;return i!=null?e!==n.target&&A2(n.target)&&i.matches(n.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e}},NT=function(e){return qt(e)?new df(e):e},Kle={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new vk(PPe,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,n){return this.emitter().on(e,NT(r),n),this},removeListener:function(e,r,n){return this.emitter().removeListener(e,NT(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,n){return this.emitter().one(e,NT(r),n),this},once:function(e,r,n){return this.emitter().one(e,NT(r),n),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};nn.eventAliasesOn(Kle);gI={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};gI.jpeg=gI.jpg;VT={layout:function(e){var r=this;if(e==null){Vn("Layout options must be specified to make a layout");return}if(e.name==null){Vn("A `name` must be specified to make a layout");return}var n=e.name,i=r.extension("layout",n);if(i==null){Vn("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;qt(e.eles)?a=r.$(e.eles):a=e.eles!=null?e.eles:r.$();var s=new i(Kt({},e,{cy:r,eles:a}));return s}};VT.createLayout=VT.makeLayout=VT.layout;BPe={notify:function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&i.merge(r);return}if(n.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var i=e.batchNotifications[n];i.empty()?r.notify(n):r.notify(n,i)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),i=0;i0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};mI.invalidateDimensions=mI.resize;UT={collection:function(e,r){return qt(e)?this.$(e):ro(e)?e.collection():wn(e)?(r||(r={}),new ua(this,e,r.unique,r.removed)):new ua(this)},nodes:function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};UT.elements=UT.filter=UT.$;qi={},d2="t",$Pe="f";qi.apply=function(t){for(var e=this,r=e._private,n=r.cy,i=n.collection(),a=0;a0;if(d||f&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var m=0;m1&&(S=1),o.color){var E=n.valueMin[0],A=n.valueMax[0],C=n.valueMin[1],I=n.valueMax[1],M=n.valueMin[2],R=n.valueMax[2],k=n.valueMin[3]==null?1:n.valueMin[3],L=n.valueMax[3]==null?1:n.valueMax[3],_=[Math.round(E+(A-E)*S),Math.round(C+(I-C)*S),Math.round(M+(R-M)*S),Math.round(k+(L-k)*S)];a={bypass:n.bypass,name:n.name,value:_,strValue:"rgb("+_[0]+", "+_[1]+", "+_[2]+")"}}else if(o.number){var D=n.valueMin+(n.valueMax-n.valueMin)*S;a=this.parse(n.name,D,n.bypass,d)}else return!1;if(!a)return m(),!1;a.mapping=n,n=a;break}case s.data:{for(var N=n.field.split("."),O=f.data,P=0;P0&&a>0){for(var o={},l=!1,u=0;u0?t.delayAnimation(s).play().promise().then(w):w()}).then(function(){return t.animation({style:o,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1)};qi.checkTrigger=function(t,e,r,n,i,a){var s=this.properties[e],o=i(s);t.removed()||o!=null&&o(r,n,t)&&a(s)};qi.checkZOrderTrigger=function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,function(a){return a.triggersZOrder},function(){i._private.cy.notify("zorder",t)})};qi.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBounds},function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})};qi.checkConnectedEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBoundsOfConnectedEdges},function(i){t.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};qi.checkParallelEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBoundsOfParallelEdges},function(i){t.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};qi.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n),this.checkConnectedEdgesBoundsTrigger(t,e,r,n),this.checkParallelEdgesBoundsTrigger(t,e,r,n)};M2={};M2.applyBypass=function(t,e,r,n){var i=this,a=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var o=0;oi.length?n=n.substr(i.length):n=""}function l(){a.length>s.length?a=a.substr(s.length):a=""}for(;;){var u=n.match(/^\s*$/);if(u)break;var h=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!h){an("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=h[0];var f=h[1];if(f!=="core"){var d=new df(f);if(d.invalid){an("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var p=h[2],g=!1;a=p;for(var m=[];;){var v=a.match(/^\s*$/);if(v)break;var y=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!y){an("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+p),g=!0;break}s=y[0];var b=y[1],w=y[2],S=e.properties[b];if(!S){an("Skipping property: Invalid property name in: "+s),l();continue}var T=r.parse(b,w);if(!T){an("Skipping property: Invalid property definition in: "+s),l();continue}m.push({name:b,val:w}),l()}if(g){o();break}r.selector(f);for(var E=0;E=7&&e[0]==="d"&&(h=new RegExp(o.data.regex).exec(e))){if(r)return!1;var d=o.data;return{name:t,value:h,strValue:""+e,mapped:d,field:h[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(r||u.multiple)return!1;var p=o.mapData;if(!(u.color||u.number))return!1;var g=this.parse(t,f[4]);if(!g||g.mapped)return!1;var m=this.parse(t,f[5]);if(!m||m.mapped)return!1;if(g.pfValue===m.pfValue||g.strValue===m.strValue)return an("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+g.strValue+"`"),this.parse(t,g.strValue);if(u.color){var v=g.value,y=m.value,b=v[0]===y[0]&&v[1]===y[1]&&v[2]===y[2]&&(v[3]===y[3]||(v[3]==null||v[3]===1)&&(y[3]==null||y[3]===1));if(b)return!1}return{name:t,value:f,strValue:""+e,mapped:p,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:g.value,valueMax:m.value,bypass:r}}}if(u.multiple&&n!=="multiple"){var w;if(l?w=e.split(/\s+/):wn(e)?w=e:w=[e],u.evenMultiple&&w.length%2!==0)return null;for(var S=[],T=[],E=[],A="",C=!1,I=0;I0?" ":"")+M.strValue}return u.validate&&!u.validate(S,T)?null:u.singleEnum&&C?S.length===1&&qt(S[0])?{name:t,value:S[0],strValue:S[0],bypass:r}:null:{name:t,value:S,pfValue:E,strValue:A,bypass:r,units:T}}var R=function(){for(var re=0;reu.max||u.strictMax&&e===u.max))return null;var N={name:t,value:e,strValue:""+e+(k||""),units:k,bypass:r};return u.unitless||k!=="px"&&k!=="em"?N.pfValue=e:N.pfValue=k==="px"||!k?e:this.getEmSizeInPixels()*e,(k==="ms"||k==="s")&&(N.pfValue=k==="ms"?e:1e3*e),(k==="deg"||k==="rad")&&(N.pfValue=k==="rad"?e:PDe(e)),k==="%"&&(N.pfValue=e/100),N}else if(u.propList){var O=[],P=""+e;if(P!=="none"){for(var B=P.split(/\s*,\s*|\s+/),G=0;G0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){l=Math.min((s-2*r)/n.w,(o-2*r)/n.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=n.minZoom&&(n.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,n=r.pan,i=r.zoom,a,s,o=!1;if(r.zoomingEnabled||(o=!0),bt(e)?s=e:Vr(e)&&(s=e.level,e.position!=null?a=uk(e.position,i,n):e.renderedPosition!=null&&(a=e.renderedPosition),a!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=sr.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,a.push("zoom"))}if(i&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var u=e.pan;bt(u.x)&&(r.pan.x=u.x,o=!1),bt(u.y)&&(r.pan.y=u.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(qt(e)){var n=e;e=this.mutableElements().filter(n)}else ro(e)||(e=this.mutableElements());if(e.length!==0){var i=e.boundingBox(),a=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(a-r*(i.x1+i.x2))/2,y:(s-r*(i.y1+i.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?function(){var i=n.window().getComputedStyle(r),a=function(o){return parseFloat(i.getPropertyValue(o))};return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),i={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};o0.centre=o0.center;o0.autolockNodes=o0.autolock;o0.autoungrabifyNodes=o0.autoungrabify;k2={data:nn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:nn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:nn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:nn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};k2.attr=k2.data;k2.removeAttr=k2.removeData;E2=function(e){var r=this;e=Kt({},e);var n=e.container;n&&!XT(n)&&XT(n[0])&&(n=n[0]);var i=n?n._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=r;var s=Ci!==void 0&&n!==void 0&&!e.headless,o=e;o.layout=Kt({name:s?"grid":"null"},o.layout),o.renderer=Kt({name:s?"canvas":"null"},o.renderer);var l=function(g,m,v){return m!==void 0?m:v!==void 0?v:g},u=this._private={container:n,ready:!1,options:o,elements:new ua(this),listeners:[],aniEles:new ua(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:bt(o.zoom)?o.zoom:1,pan:{x:Vr(o.pan)&&bt(o.pan.x)?o.pan.x:0,y:Vr(o.pan)&&bt(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var h=function(g,m){var v=g.some(RNe);if(v)return zg.all(g).then(m);m(g)};u.styleEnabled&&r.setStyle([]);var f=Kt({},o,o.renderer);r.initRenderer(f);var d=function(g,m,v){r.notifications(!1);var y=r.mutableElements();y.length>0&&y.remove(),g!=null&&(Vr(g)||wn(g))&&r.add(g),r.one("layoutready",function(w){r.notifications(!0),r.emit(w),r.one("load",m),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",v),r.emit("done")});var b=Kt({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run()};h([o.style,o.elements],function(p){var g=p[0],m=p[1];u.styleEnabled&&r.style().append(g),d(m,function(){r.startAnimationLoop(),u.ready=!0,ei(o.ready)&&r.on("ready",o.ready);for(var v=0;v0,o=!!t.boundingBox,l=ts(o?t.boundingBox:structuredClone(e.extent())),u;if(ro(t.roots))u=t.roots;else if(wn(t.roots)){for(var h=[],f=0;f0;){var _=L(),D=I(_,R);if(D)_.outgoers().filter(function(Ve){return Ve.isNode()&&r.has(Ve)}).forEach(k);else if(D===null){an("Detected double maximal shift for node `"+_.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var N=0;if(t.avoidOverlap)for(var O=0;O0&&y[0].length<=3?Le/2:0),Ne=2*Math.PI/y[Ye].length*qe;return Ye===0&&y[0].length===1&&(Me=1),{x:j.x+Me*Math.cos(Ne),y:j.y+Me*Math.sin(Ne)}}else{var Ce=y[Ye].length,Fe=Math.max(Ce===1?0:o?(l.w-t.padding*2-ae.w)/((t.grid?de:Ce)-1):(l.w-t.padding*2-ae.w)/((t.grid?de:Ce)+1),N),fe={x:j.x+(qe+1-(Ce+1)/2)*Fe,y:j.y+(Ye+1-(Y+1)/2)*K};return fe}},be={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(be).indexOf(t.direction)===-1&&Vn("Invalid direction '".concat(t.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(be).join(", ")));var W=function(pe){return aDe(ne(pe),l,be[t.direction])};return r.nodes().layoutPositions(this,t,W),this};qPe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};Qle.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var s=ts(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/a.length:e.sweep,u=l/Math.max(1,a.length-1),h,f=0,d=0;d1&&e.avoidOverlap){f*=1.75;var y=Math.cos(u)-Math.cos(0),b=Math.sin(u)-Math.sin(0),w=Math.sqrt(f*f/(y*y+b*b));h=Math.max(w,h)}var S=function(E,A){var C=e.startAngle+A*u*(i?1:-1),I=h*Math.cos(C),M=h*Math.sin(C),R={x:o.x+I,y:o.y+M};return R};return n.nodes().layoutPositions(this,e,S),this};WPe={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};Jle.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,i=e.eles,a=i.nodes().not(":parent"),s=ts(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,h=0;h0){var T=Math.abs(b[0].value-S.value);T>=v&&(b=[],y.push(b))}b.push(S)}var E=u+e.minNodeSpacing;if(!e.avoidOverlap){var A=y.length>0&&y[0].length>1,C=Math.min(s.w,s.h)/2-E,I=C/(y.length+A?1:0);E=Math.min(E,I)}for(var M=0,R=0;R1&&e.avoidOverlap){var D=Math.cos(_)-Math.cos(0),N=Math.sin(_)-Math.sin(0),O=Math.sqrt(E*E/(D*D+N*N));M=Math.max(O,M)}k.r=M,M+=E}if(e.equidistant){for(var P=0,B=0,G=0;G=t.numIter||(QPe(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature=t.animationThreshold&&a(),jT(h)}};h()}else{for(;u;)u=s(l),l++;boe(n,t),o()}return this};Tk.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};Tk.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};YPe=function(e,r,n){for(var i=n.eles.edges(),a=n.eles.nodes(),s=ts(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=n.eles.components(),u={},h=0;h0){o.graphSet.push(C);for(var h=0;hi.count?0:i.graph},ece=function(e,r,n,i){var a=i.graphSet[n];if(-10)var f=i.nodeOverlap*h,d=Math.sqrt(o*o+l*l),p=f*o/d,g=f*l/d;else var m=rk(e,o,l),v=rk(r,-1*o,-1*l),y=v.x-m.x,b=v.y-m.y,w=y*y+b*b,d=Math.sqrt(w),f=(e.nodeRepulsion+r.nodeRepulsion)/w,p=f*y/d,g=f*b/d;e.isLocked||(e.offsetX-=p,e.offsetY-=g),r.isLocked||(r.offsetX+=p,r.offsetY+=g)}},tBe=function(e,r,n,i){if(n>0)var a=e.maxX-r.minX;else var a=r.maxX-e.minX;if(i>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return a>=0&&s>=0?Math.sqrt(a*a+s*s):0},rk=function(e,r,n){var i=e.positionX,a=e.positionY,s=e.height||1,o=e.width||1,l=n/r,u=s/o,h={};return r===0&&0n?(h.x=i,h.y=a+s/2,h):0r&&-1*u<=l&&l<=u?(h.x=i-o/2,h.y=a-o*n/2/r,h):0=u)?(h.x=i+s*r/2/n,h.y=a+s/2,h):(0>n&&(l<=-1*u||l>=u)&&(h.x=i-s*r/2/n,h.y=a-s/2),h)},rBe=function(e,r){for(var n=0;nn){var v=r.gravity*p/m,y=r.gravity*g/m;d.offsetX+=v,d.offsetY+=y}}}}},iBe=function(e,r){var n=[],i=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;i<=a;){var s=n[i++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0n)var a={x:n*e/i,y:n*r/i};else var a={x:e,y:r};return a},rce=function(e,r){var n=e.parentId;if(n!=null){var i=r.layoutNodes[r.idToIndex[n]],a=!1;if((i.maxX==null||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,a=!0),(i.minX==null||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(i.minY==null||e.minY-i.padTopy&&(g+=v+r.componentSpacing,p=0,m=0,v=0)}}},oBe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};nce.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=ts(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)n.nodes().layoutPositions(this,e,function(X){return{x:a.x1,y:a.y1}});else{var s=i.size(),o=Math.sqrt(s*a.h/a.w),l=Math.round(o),u=Math.round(a.w/a.h*o),h=function(ee){if(ee==null)return Math.min(l,u);var Y=Math.min(l,u);Y==l?l=ee:u=ee},f=function(ee){if(ee==null)return Math.max(l,u);var Y=Math.max(l,u);Y==l?l=ee:u=ee},d=e.rows,p=e.cols!=null?e.cols:e.columns;if(d!=null&&p!=null)l=d,u=p;else if(d!=null&&p==null)l=d,u=Math.ceil(s/l);else if(d==null&&p!=null)u=p,l=Math.ceil(s/u);else if(u*l>s){var g=h(),m=f();(g-1)*m>=s?h(g-1):(m-1)*g>=s&&f(m-1)}else for(;u*l=s?f(y+1):h(v+1)}var b=a.w/u,w=a.h/l;if(e.condense&&(b=0,w=0),e.avoidOverlap)for(var S=0;S=u&&(D=0,_++)},O={},P=0;P(D=KDe(t,e,N[O],N[O+1],N[O+2],N[O+3])))return v(A,D),!0}else if(I.edgeType==="bezier"||I.edgeType==="multibezier"||I.edgeType==="self"||I.edgeType==="compound"){for(var N=I.allpts,O=0;O+5(D=jDe(t,e,N[O],N[O+1],N[O+2],N[O+3],N[O+4],N[O+5])))return v(A,D),!0}for(var P=P||C.source,B=B||C.target,G=i.getArrowWidth(M,R),$=[{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}],O=0;O<$.length;O++){var U=$[O],X=a.arrowShapes[A.pstyle(U.name+"-arrow-shape").value],ee=A.pstyle("width").pfValue;if(X.roughCollide(t,e,G,U.angle,{x:U.x,y:U.y},ee,h)&&X.collide(t,e,G,U.angle,{x:U.x,y:U.y},ee,h))return v(A),!0}u&&o.length>0&&(y(P),y(B))}function w(A,C,I){return Ms(A,C,I)}function S(A,C){var I=A._private,M=d,R;C?R=C+"-":R="",A.boundingBox();var k=I.labelBounds[C||"main"],L=A.pstyle(R+"label").value,_=A.pstyle("text-events").strValue==="yes";if(!(!_||!L)){var D=w(I.rscratch,"labelX",C),N=w(I.rscratch,"labelY",C),O=w(I.rscratch,"labelAngle",C),P=A.pstyle(R+"text-margin-x").pfValue,B=A.pstyle(R+"text-margin-y").pfValue,G=k.x1-M-P,$=k.x2+M-P,U=k.y1-M-B,X=k.y2+M-B;if(O){var ee=Math.cos(O),Y=Math.sin(O),oe=function(ae,K){return ae=ae-D,K=K-N,{x:ae*ee-K*Y+D,y:ae*Y+K*ee+N}},Q=oe(G,U),ue=oe(G,X),re=oe($,U),te=oe($,X),Z=[Q.x+P,Q.y+B,re.x+P,re.y+B,te.x+P,te.y+B,ue.x+P,ue.y+B];if(Os(t,e,Z))return v(A),!0}else if(sf(k,t,e))return v(A),!0}}for(var T=s.length-1;T>=0;T--){var E=s[T];E.isNode()?y(E)||S(E):b(E)||S(E)||S(E,"source")||S(E,"target")}return o};c0.getAllInBox=function(t,e,r,n){var i=this.getCachedZSortedEles().interactive,a=this.cy.zoom(),s=2/a,o=[],l=Math.min(t,r),u=Math.max(t,r),h=Math.min(e,n),f=Math.max(e,n);t=l,r=u,e=h,n=f;var d=ts({x1:t,y1:e,x2:r,y2:n}),p=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],g=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function m(ae,K,de){return Ms(ae,K,de)}function v(ae,K){var de=ae._private,ne=s,be="";ae.boundingBox();var W=de.labelBounds.main;if(!W)return null;var Ve=m(de.rscratch,"labelX",K),pe=m(de.rscratch,"labelY",K),Be=m(de.rscratch,"labelAngle",K),Ye=ae.pstyle(be+"text-margin-x").pfValue,qe=ae.pstyle(be+"text-margin-y").pfValue,Le=W.x1-ne-Ye,Me=W.x2+ne-Ye,Ne=W.y1-ne-qe,Ce=W.y2+ne-qe;if(Be){var Fe=Math.cos(Be),fe=Math.sin(Be),ye=function(he,z){return he=he-Ve,z=z-pe,{x:he*Fe-z*fe+Ve,y:he*fe+z*Fe+pe}};return[ye(Le,Ne),ye(Me,Ne),ye(Me,Ce),ye(Le,Ce)]}else return[{x:Le,y:Ne},{x:Me,y:Ne},{x:Me,y:Ce},{x:Le,y:Ce}]}function y(ae,K,de,ne){function be(W,Ve,pe){return(pe.y-W.y)*(Ve.x-W.x)>(Ve.y-W.y)*(pe.x-W.x)}return be(ae,de,ne)!==be(K,de,ne)&&be(ae,K,de)!==be(ae,K,ne)}for(var b=0;b0?-(Math.PI-e.ang):Math.PI+e.ang},dBe=function(e,r,n,i,a){if(e!==Soe?Coe(r,e,Cc):fBe(Po,Cc),Coe(r,n,Po),koe=Cc.nx*Po.ny-Cc.ny*Po.nx,Eoe=Cc.nx*Po.nx-Cc.ny*-Po.ny,Ru=Math.asin(Math.max(-1,Math.min(1,koe))),Math.abs(Ru)<1e-6){vI=r.x,yI=r.y,e0=Sg=0;return}r0=1,qT=!1,Eoe<0?Ru<0?Ru=Math.PI+Ru:(Ru=Math.PI-Ru,r0=-1,qT=!0):Ru>0&&(r0=-1,qT=!0),r.radius!==void 0?Sg=r.radius:Sg=i,Kd=Ru/2,DT=Math.min(Cc.len/2,Po.len/2),a?(Ec=Math.abs(Math.cos(Kd)*Sg/Math.sin(Kd)),Ec>DT?(Ec=DT,e0=Math.abs(Ec*Math.sin(Kd)/Math.cos(Kd))):e0=Sg):(Ec=Math.min(DT,Sg),e0=Math.abs(Ec*Math.sin(Kd)/Math.cos(Kd))),xI=r.x+Po.nx*Ec,bI=r.y+Po.ny*Ec,vI=xI-Po.ny*e0*r0,yI=bI+Po.nx*e0*r0,oce=r.x+Cc.nx*Ec,lce=r.y+Cc.ny*Ec,Soe=r};S2=.01,pBe=Math.sqrt(2*S2),_a={};_a.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,i=e.vectorNormInverse,a,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(T,E,A,C){var I=C-E,M=A-T,R=Math.sqrt(M*M+I*I);return{x:-I/R,y:M/R}},h=t.pstyle("edge-distances").value;switch(h){case"node-position":a=r;break;case"intersection":a=n;break;case"endpoints":{if(l){var f=this.manualEndptToPx(t.source()[0],s),d=yi(f,2),p=d[0],g=d[1],m=this.manualEndptToPx(t.target()[0],o),v=yi(m,2),y=v[0],b=v[1],w={x1:p,y1:g,x2:y,y2:b};i=u(p,g,y,b),a=w}else an("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=n;break}}return{midptPts:a,vectorNormInverse:i}};_a.findHaystackPoints=function(t){for(var e=0;e0?Math.max(z-se,0):Math.min(z+se,0)},L=k(M,C),_=k(R,I),D=!1;b===u?y=Math.abs(L)>Math.abs(_)?i:n:b===l||b===o?(y=n,D=!0):(b===a||b===s)&&(y=i,D=!0);var N=y===n,O=N?_:L,P=N?R:M,B=MI(P),G=!1;!(D&&(S||E))&&(b===o&&P<0||b===l&&P>0||b===a&&P>0||b===s&&P<0)&&(B*=-1,O=B*Math.abs(O),G=!0);var $;if(S){var U=T<0?1+T:T;$=U*O}else{var X=T<0?O:0;$=X+T*B}var ee=function(z){return Math.abs(z)=Math.abs(O)},Y=ee($),oe=ee(Math.abs(O)-Math.abs($)),Q=Y||oe;if(Q&&!G)if(N){var ue=Math.abs(P)<=d/2,re=Math.abs(M)<=p/2;if(ue){var te=(h.x1+h.x2)/2,Z=h.y1,j=h.y2;r.segpts=[te,Z,te,j]}else if(re){var ae=(h.y1+h.y2)/2,K=h.x1,de=h.x2;r.segpts=[K,ae,de,ae]}else r.segpts=[h.x1,h.y2]}else{var ne=Math.abs(P)<=f/2,be=Math.abs(R)<=g/2;if(ne){var W=(h.y1+h.y2)/2,Ve=h.x1,pe=h.x2;r.segpts=[Ve,W,pe,W]}else if(be){var Be=(h.x1+h.x2)/2,Ye=h.y1,qe=h.y2;r.segpts=[Be,Ye,Be,qe]}else r.segpts=[h.x2,h.y1]}else if(N){var Le=h.y1+$+(v?d/2*B:0),Me=h.x1,Ne=h.x2;r.segpts=[Me,Le,Ne,Le]}else{var Ce=h.x1+$+(v?f/2*B:0),Fe=h.y1,fe=h.y2;r.segpts=[Ce,Fe,Ce,fe]}if(r.isRound){var ye=t.pstyle("taxi-radius").value,H=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(ye),r.isArcRadius=new Array(r.segpts.length/2).fill(H)}};_a.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,i=e.tgtPos,a=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,h=e.tgtShape,f=e.srcCornerRadius,d=e.tgtCornerRadius,p=e.srcRs,g=e.tgtRs,m=!bt(r.startX)||!bt(r.startY),v=!bt(r.arrowStartX)||!bt(r.arrowStartY),y=!bt(r.endX)||!bt(r.endY),b=!bt(r.arrowEndX)||!bt(r.arrowEndY),w=3,S=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,T=w*S,E=a0({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),A=EP.poolIndex()){var B=O;O=P,P=B}var G=L.srcPos=O.position(),$=L.tgtPos=P.position(),U=L.srcW=O.outerWidth(),X=L.srcH=O.outerHeight(),ee=L.tgtW=P.outerWidth(),Y=L.tgtH=P.outerHeight(),oe=L.srcShape=r.nodeShapes[e.getNodeShape(O)],Q=L.tgtShape=r.nodeShapes[e.getNodeShape(P)],ue=L.srcCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,re=L.tgtCornerRadius=P.pstyle("corner-radius").value==="auto"?"auto":P.pstyle("corner-radius").pfValue,te=L.tgtRs=P._private.rscratch,Z=L.srcRs=O._private.rscratch;L.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var j=0;j=pBe||(Ne=Math.sqrt(Math.max(Me*Me,S2)+Math.max(Le*Le,S2)));var Ce=L.vector={x:Me,y:Le},Fe=L.vectorNorm={x:Ce.x/Ne,y:Ce.y/Ne},fe={x:-Fe.y,y:Fe.x};L.nodesOverlap=!bt(Ne)||Q.checkPoint(W[0],W[1],0,ee,Y,$.x,$.y,re,te)||oe.checkPoint(pe[0],pe[1],0,U,X,G.x,G.y,ue,Z),L.vectorNormInverse=fe,_={nodesOverlap:L.nodesOverlap,dirCounts:L.dirCounts,calculatedIntersection:!0,hasBezier:L.hasBezier,hasUnbundled:L.hasUnbundled,eles:L.eles,srcPos:$,srcRs:te,tgtPos:G,tgtRs:Z,srcW:ee,srcH:Y,tgtW:U,tgtH:X,srcIntn:Be,tgtIntn:Ve,srcShape:Q,tgtShape:oe,posPts:{x1:qe.x2,y1:qe.y2,x2:qe.x1,y2:qe.y1},intersectionPts:{x1:Ye.x2,y1:Ye.y2,x2:Ye.x1,y2:Ye.y1},vector:{x:-Ce.x,y:-Ce.y},vectorNorm:{x:-Fe.x,y:-Fe.y},vectorNormInverse:{x:-fe.x,y:-fe.y}}}var ye=be?_:L;K.nodesOverlap=ye.nodesOverlap,K.srcIntn=ye.srcIntn,K.tgtIntn=ye.tgtIntn,K.isRound=de.startsWith("round"),i&&(O.isParent()||O.isChild()||P.isParent()||P.isChild())&&(O.parents().anySame(P)||P.parents().anySame(O)||O.same(P)&&O.isParent())?e.findCompoundLoopPoints(ae,ye,j,ne):O===P?e.findLoopPoints(ae,ye,j,ne):de.endsWith("segments")?e.findSegmentsPoints(ae,ye):de.endsWith("taxi")?e.findTaxiPoints(ae,ye):de==="straight"||!ne&&L.eles.length%2===1&&j===Math.floor(L.eles.length/2)?e.findStraightEdgePoints(ae):e.findBezierPoints(ae,ye,j,ne,be),e.findEndpoints(ae),e.tryToCorrectInvalidPoints(ae,ye),e.checkForInvalidEdgeWarning(ae),e.storeAllpts(ae),e.storeEdgeProjections(ae),e.calculateArrowAngles(ae),e.recalculateEdgeLabelProjections(ae),e.calculateLabelAngles(ae)}},A=0;A0){var W=u,Ve=Jd(W,Lg(s)),pe=Jd(W,Lg(be)),Be=Ve;if(pe2){var Ye=Jd(W,{x:be[2],y:be[3]});Ye0){var le=h,ke=Jd(le,Lg(s)),ve=Jd(le,Lg(se)),me=ke;if(ve2){var Ie=Jd(le,{x:se[2],y:se[3]});Ie=g||A){v={cp:S,segment:E};break}}if(v)break}var C=v.cp,I=v.segment,M=(g-y)/I.length,R=I.t1-I.t0,k=p?I.t0+R*M:I.t1-R*M;k=x2(0,k,1),e=Ng(C.p0,C.p1,C.p2,k),d=mBe(C.p0,C.p1,C.p2,k);break}case"straight":case"segments":case"haystack":{for(var L=0,_,D,N,O,P=n.allpts.length,B=0;B+3=g));B+=2);var G=g-D,$=G/_;$=x2(0,$,1),e=FDe(N,O,$),d=fce(N,O);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,d)}};u("source"),u("target"),this.applyLabelDimensions(t)}};Lc.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};Lc.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),i=i0(n,t._private.labelDimsKey);if(Ms(r.rscratch,"prefixedLabelDimsKey",e)!==i){Iu(r.rscratch,"prefixedLabelDimsKey",e,i);var a=this.calculateLabelDimensions(t,n),s=t.pstyle("line-height").pfValue,o=t.pstyle("text-wrap").strValue,l=Ms(r.rscratch,"labelWrapCachedLines",e)||[],u=o!=="wrap"?1:Math.max(l.length,1),h=a.height/u,f=h*s,d=a.width,p=a.height+(u-1)*(s-1)*h;Iu(r.rstyle,"labelWidth",e,d),Iu(r.rscratch,"labelWidth",e,d),Iu(r.rstyle,"labelHeight",e,p),Iu(r.rscratch,"labelHeight",e,p),Iu(r.rscratch,"labelLineHeight",e,f)}};Lc.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",i=t.pstyle(n+"label").strValue,a=t.pstyle("text-transform").value,s=function(X,ee){return ee?(Iu(r.rscratch,X,e,ee),ee):Ms(r.rscratch,X,e)};if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var o=t.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="\u200B",h=i.split(` `),f=t.pstyle("text-max-width").pfValue,d=t.pstyle("text-overflow-wrap").value,p=d==="anywhere",g=[],m=/[\s\u200b]+|$/g,v=0;vf){var T=y.matchAll(m),E="",A=0,C=Ps(T),I;try{for(C.s();!(I=C.n()).done;){var M=I.value,R=M[0],k=y.substring(A,M.index);A=M.index+R.length;var L=E.length===0?k:E+k+R,_=this.calculateLabelDimensions(t,L),D=_.width;D<=f?E+=k+R:(E&&g.push(E),E=k+R)}}catch(U){C.e(U)}finally{C.f()}E.match(/^[\s\u200b]+$/)||g.push(E)}else g.push(y)}s("labelWrapCachedLines",g),i=s("labelWrapCachedText",g.join(` `)),s("labelWrapKey",l)}else if(o==="ellipsis"){var N=t.pstyle("text-max-width").pfValue,O="",P="\u2026",B=!1;if(this.calculateLabelDimensions(t,i).widthN)break;O+=i[G],G===i.length-1&&(B=!0)}return B||(O+=P),O}return i};Lc.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Lc.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),i=n.document,a=0,s=t.pstyle("font-style").strValue,o=t.pstyle("font-size").pfValue,l=t.pstyle("font-family").strValue,u=t.pstyle("font-weight").strValue,h=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=i.createElement("canvas"),f=this.labelCalcCanvasContext=h.getContext("2d");var d=h.style;d.position="absolute",d.left="-9999px",d.top="-9999px",d.zIndex="-1",d.visibility="hidden",d.pointerEvents="none"}f.font="".concat(s," ").concat(u," ").concat(o,"px ").concat(l);for(var p=0,g=0,m=e.split(` `),v=0;v1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=t.desktopTapThreshold2}var dt=a(z);nt&&(t.hoverData.tapholdCancelled=!0);var gt=function(){var Se=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Se.length===0?(Se.push(Ke[0]),Se.push(Ke[1])):(Se[0]+=Ke[0],Se[1]+=Ke[1])};le=!0,i(ft,["mousemove","vmousemove","tapdrag"],z,{x:Ie[0],y:Ie[1]});var ht=function(Se){return{originalEvent:z,type:Se,position:{x:Ie[0],y:Ie[1]}}},st=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||ke.emit(ht("boxstart")),Xe[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(nt){var Br=ht("cxtdrag");Oe?Oe.emit(Br):ke.emit(Br),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||ft!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(ht("cxtdragout")),t.hoverData.cxtOver=ft,ft&&ft.emit(ht("cxtdragover")))}}else if(t.hoverData.dragging){if(le=!0,ke.panningEnabled()&&ke.userPanningEnabled()){var wt;if(t.hoverData.justStartedPan){var mn=t.hoverData.mdownPos;wt={x:(Ie[0]-mn[0])*ve,y:(Ie[1]-mn[1])*ve},t.hoverData.justStartedPan=!1}else wt={x:Ke[0]*ve,y:Ke[1]*ve};ke.panBy(wt),ke.emit(ht("dragpan")),t.hoverData.dragged=!0}Ie=t.projectIntoViewport(z.clientX,z.clientY)}else if(Xe[4]==1&&(Oe==null||Oe.pannable())){if(nt){if(!t.hoverData.dragging&&ke.boxSelectionEnabled()&&(dt||!ke.panningEnabled()||!ke.userPanningEnabled()))st();else if(!t.hoverData.selecting&&ke.panningEnabled()&&ke.userPanningEnabled()){var Ir=s(Oe,t.hoverData.downs);Ir&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Xe[4]=0,t.data.bgActivePosistion=Lg(_e),t.redrawHint("select",!0),t.redraw())}Oe&&Oe.pannable()&&Oe.active()&&Oe.unactivate()}}else{if(Oe&&Oe.pannable()&&Oe.active()&&Oe.unactivate(),(!Oe||!Oe.grabbed())&&ft!=We&&(We&&i(We,["mouseout","tapdragout"],z,{x:Ie[0],y:Ie[1]}),ft&&i(ft,["mouseover","tapdragover"],z,{x:Ie[0],y:Ie[1]}),t.hoverData.last=ft),Oe)if(nt){if(ke.boxSelectionEnabled()&&dt)Oe&&Oe.grabbed()&&(y(Ue),Oe.emit(ht("freeon")),Ue.emit(ht("free")),t.dragData.didDrag&&(Oe.emit(ht("dragfreeon")),Ue.emit(ht("dragfree")))),st();else if(Oe&&Oe.grabbed()&&t.nodeIsDraggable(Oe)){var er=!t.dragData.didDrag;er&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||m(Ue,{inDragLayer:!0});var Zt={x:0,y:0};if(bt(Ke[0])&&bt(Ke[1])&&(Zt.x+=Ke[0],Zt.y+=Ke[1],er)){var wr=t.hoverData.dragDelta;wr&&bt(wr[0])&&bt(wr[1])&&(Zt.x+=wr[0],Zt.y+=wr[1])}t.hoverData.draggingEles=!0,Ue.silentShift(Zt).emit(ht("position")).emit(ht("drag")),t.redrawHint("drag",!0),t.redraw()}}else gt();le=!0}if(Xe[2]=Ie[0],Xe[3]=Ie[1],le)return z.stopPropagation&&z.stopPropagation(),z.preventDefault&&z.preventDefault(),!1}},!1);var k,L,_;t.registerBinding(e,"mouseup",function(z){if(!(t.hoverData.which===1&&z.which!==1&&t.hoverData.capture)){var se=t.hoverData.capture;if(se){t.hoverData.capture=!1;var le=t.cy,ke=t.projectIntoViewport(z.clientX,z.clientY),ve=t.selection,me=t.findNearestElement(ke[0],ke[1],!0,!1),Ie=t.dragData.possibleDragElements,_e=t.hoverData.down,ze=a(z);t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,_e&&_e.unactivate();var Xe=function(Dt){return{originalEvent:z,type:Dt,position:{x:ke[0],y:ke[1]}}};if(t.hoverData.which===3){var ft=Xe("cxttapend");if(_e?_e.emit(ft):le.emit(ft),!t.hoverData.cxtDragged){var We=Xe("cxttap");_e?_e.emit(We):le.emit(We)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(i(me,["mouseup","tapend","vmouseup"],z,{x:ke[0],y:ke[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(i(_e,["click","tap","vclick"],z,{x:ke[0],y:ke[1]}),L=!1,z.timeStamp-_<=le.multiClickDebounceTime()?(k&&clearTimeout(k),L=!0,_=null,i(_e,["dblclick","dbltap","vdblclick"],z,{x:ke[0],y:ke[1]})):(k=setTimeout(function(){L||i(_e,["oneclick","onetap","voneclick"],z,{x:ke[0],y:ke[1]})},le.multiClickDebounceTime()),_=z.timeStamp)),_e==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!a(z)&&(le.$(r).unselect(["tapunselect"]),Ie.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=Ie=le.collection()),me==_e&&!t.dragData.didDrag&&!t.hoverData.selecting&&me!=null&&me._private.selectable&&(t.hoverData.dragging||(le.selectionType()==="additive"||ze?me.selected()?me.unselect(["tapunselect"]):me.select(["tapselect"]):ze||(le.$(r).unmerge(me).unselect(["tapunselect"]),me.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Oe=le.collection(t.getAllInBox(ve[0],ve[1],ve[2],ve[3]));t.redrawHint("select",!0),Oe.length>0&&t.redrawHint("eles",!0),le.emit(Xe("boxend"));var Ke=function(Dt){return Dt.selectable()&&!Dt.selected()};le.selectionType()==="additive"||ze||le.$(r).unmerge(Oe).unselect(),Oe.emit(Xe("box")).stdFilter(Ke).select().emit(Xe("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!ve[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var Ue=_e&&_e.grabbed();y(Ie),Ue&&(_e.emit(Xe("freeon")),Ie.emit(Xe("free")),t.dragData.didDrag&&(_e.emit(Xe("dragfreeon")),Ie.emit(Xe("dragfree"))))}}ve[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var D=[],N=4,O,P=1e5,B=function(z,se){for(var le=0;le=N){var ke=D;if(O=B(ke,5),!O){var ve=Math.abs(ke[0]);O=G(ke)&&ve>5}if(O)for(var me=0;me5&&(le=MI(le)*5),We=le/-250,O&&(We/=P,We*=3),We=We*t.wheelSensitivity;var Oe=z.deltaMode===1;Oe&&(We*=33);var Ke=Ie.zoom()*Math.pow(10,We);z.type==="gesturechange"&&(Ke=t.gestureStartZoom*z.scale),Ie.zoom({level:Ke,renderedPosition:{x:ft[0],y:ft[1]}}),Ie.emit({type:z.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:z,position:{x:Xe[0],y:Xe[1]}})}}}};t.registerBinding(t.container,"wheel",$,!0),t.registerBinding(e,"scroll",function(z){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(z){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||z.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(he){t.hasTouchStarted||$(he)},!0),t.registerBinding(t.container,"mouseout",function(z){var se=t.projectIntoViewport(z.clientX,z.clientY);t.cy.emit({originalEvent:z,type:"mouseout",position:{x:se[0],y:se[1]}})},!1),t.registerBinding(t.container,"mouseover",function(z){var se=t.projectIntoViewport(z.clientX,z.clientY);t.cy.emit({originalEvent:z,type:"mouseover",position:{x:se[0],y:se[1]}})},!1);var U,X,ee,Y,oe,Q,ue,re,te,Z,j,ae,K,de=function(z,se,le,ke){return Math.sqrt((le-z)*(le-z)+(ke-se)*(ke-se))},ne=function(z,se,le,ke){return(le-z)*(le-z)+(ke-se)*(ke-se)},be;t.registerBinding(t.container,"touchstart",be=function(z){if(t.hasTouchStarted=!0,!!M(z)){w(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var se=t.cy,le=t.touchData.now,ke=t.touchData.earlier;if(z.touches[0]){var ve=t.projectIntoViewport(z.touches[0].clientX,z.touches[0].clientY);le[0]=ve[0],le[1]=ve[1]}if(z.touches[1]){var ve=t.projectIntoViewport(z.touches[1].clientX,z.touches[1].clientY);le[2]=ve[0],le[3]=ve[1]}if(z.touches[2]){var ve=t.projectIntoViewport(z.touches[2].clientX,z.touches[2].clientY);le[4]=ve[0],le[5]=ve[1]}var me=function(dt){return{originalEvent:z,type:dt,position:{x:le[0],y:le[1]}}};if(z.touches[1]){t.touchData.singleTouchMoved=!0,y(t.dragData.touchDragEles);var Ie=t.findContainerClientCoords();te=Ie[0],Z=Ie[1],j=Ie[2],ae=Ie[3],U=z.touches[0].clientX-te,X=z.touches[0].clientY-Z,ee=z.touches[1].clientX-te,Y=z.touches[1].clientY-Z,K=0<=U&&U<=j&&0<=ee&&ee<=j&&0<=X&&X<=ae&&0<=Y&&Y<=ae;var _e=se.pan(),ze=se.zoom();oe=de(U,X,ee,Y),Q=ne(U,X,ee,Y),ue=[(U+ee)/2,(X+Y)/2],re=[(ue[0]-_e.x)/ze,(ue[1]-_e.y)/ze];var Xe=200,ft=Xe*Xe;if(Q=1){for(var ut=t.touchData.startPosition=[null,null,null,null,null,null],kt=0;kt=t.touchTapThreshold2}if(se&&t.touchData.cxt){z.preventDefault();var kt=z.touches[0].clientX-te,ot=z.touches[0].clientY-Z,Qe=z.touches[1].clientX-te,dt=z.touches[1].clientY-Z,gt=ne(kt,ot,Qe,dt),ht=gt/Q,st=150,Br=st*st,wt=1.5,mn=wt*wt;if(ht>=mn||gt>=Br){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Ir=ze("cxttapend");t.touchData.start?(t.touchData.start.unactivate().emit(Ir),t.touchData.start=null):ke.emit(Ir)}}if(se&&t.touchData.cxt){var Ir=ze("cxtdrag");t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(Ir):ke.emit(Ir),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var er=t.findNearestElement(ve[0],ve[1],!0,!0);(!t.touchData.cxtOver||er!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit(ze("cxtdragout")),t.touchData.cxtOver=er,er&&er.emit(ze("cxtdragover")))}else if(se&&z.touches[2]&&ke.boxSelectionEnabled())z.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||ke.emit(ze("boxstart")),t.touchData.selecting=!0,t.touchData.didSelect=!0,le[4]=1,!le||le.length===0||le[0]===void 0?(le[0]=(ve[0]+ve[2]+ve[4])/3,le[1]=(ve[1]+ve[3]+ve[5])/3,le[2]=(ve[0]+ve[2]+ve[4])/3+1,le[3]=(ve[1]+ve[3]+ve[5])/3+1):(le[2]=(ve[0]+ve[2]+ve[4])/3,le[3]=(ve[1]+ve[3]+ve[5])/3),t.redrawHint("select",!0),t.redraw();else if(se&&z.touches[1]&&!t.touchData.didSelect&&ke.zoomingEnabled()&&ke.panningEnabled()&&ke.userZoomingEnabled()&&ke.userPanningEnabled()){z.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Zt=t.dragData.touchDragEles;if(Zt){t.redrawHint("drag",!0);for(var wr=0;wr0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var Ve;t.registerBinding(e,"touchcancel",Ve=function(z){var se=t.touchData.start;t.touchData.capture=!1,se&&se.unactivate()});var pe,Be,Ye,qe;if(t.registerBinding(e,"touchend",pe=function(z){var se=t.touchData.start,le=t.touchData.capture;if(le)z.touches.length===0&&(t.touchData.capture=!1),z.preventDefault();else return;var ke=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var ve=t.cy,me=ve.zoom(),Ie=t.touchData.now,_e=t.touchData.earlier;if(z.touches[0]){var ze=t.projectIntoViewport(z.touches[0].clientX,z.touches[0].clientY);Ie[0]=ze[0],Ie[1]=ze[1]}if(z.touches[1]){var ze=t.projectIntoViewport(z.touches[1].clientX,z.touches[1].clientY);Ie[2]=ze[0],Ie[3]=ze[1]}if(z.touches[2]){var ze=t.projectIntoViewport(z.touches[2].clientX,z.touches[2].clientY);Ie[4]=ze[0],Ie[5]=ze[1]}var Xe=function(Br){return{originalEvent:z,type:Br,position:{x:Ie[0],y:Ie[1]}}};se&&se.unactivate();var ft;if(t.touchData.cxt){if(ft=Xe("cxttapend"),se?se.emit(ft):ve.emit(ft),!t.touchData.cxtDragged){var We=Xe("cxttap");se?se.emit(We):ve.emit(We)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!z.touches[2]&&ve.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var Oe=ve.collection(t.getAllInBox(ke[0],ke[1],ke[2],ke[3]));ke[0]=void 0,ke[1]=void 0,ke[2]=void 0,ke[3]=void 0,ke[4]=0,t.redrawHint("select",!0),ve.emit(Xe("boxend"));var Ke=function(Br){return Br.selectable()&&!Br.selected()};Oe.emit(Xe("box")).stdFilter(Ke).select().emit(Xe("boxselect")),Oe.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(se?.unactivate(),z.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!z.touches[1]){if(!z.touches[0]){if(!z.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Ue=t.dragData.touchDragEles;if(se!=null){var nt=se._private.grabbed;y(Ue),t.redrawHint("drag",!0),t.redrawHint("eles",!0),nt&&(se.emit(Xe("freeon")),Ue.emit(Xe("free")),t.dragData.didDrag&&(se.emit(Xe("dragfreeon")),Ue.emit(Xe("dragfree")))),i(se,["touchend","tapend","vmouseup","tapdragout"],z,{x:Ie[0],y:Ie[1]}),se.unactivate(),t.touchData.start=null}else{var Dt=t.findNearestElement(Ie[0],Ie[1],!0,!0);i(Dt,["touchend","tapend","vmouseup","tapdragout"],z,{x:Ie[0],y:Ie[1]})}var ut=t.touchData.startPosition[0]-Ie[0],kt=ut*ut,ot=t.touchData.startPosition[1]-Ie[1],Qe=ot*ot,dt=kt+Qe,gt=dt*me*me;t.touchData.singleTouchMoved||(se||ve.$(":selected").unselect(["tapunselect"]),i(se,["tap","vclick"],z,{x:Ie[0],y:Ie[1]}),Be=!1,z.timeStamp-qe<=ve.multiClickDebounceTime()?(Ye&&clearTimeout(Ye),Be=!0,qe=null,i(se,["dbltap","vdblclick"],z,{x:Ie[0],y:Ie[1]})):(Ye=setTimeout(function(){Be||i(se,["onetap","voneclick"],z,{x:Ie[0],y:Ie[1]})},ve.multiClickDebounceTime()),qe=z.timeStamp)),se!=null&&!t.dragData.didDrag&&se._private.selectable&>"u"){var Le=[],Me=function(z){return{clientX:z.clientX,clientY:z.clientY,force:1,identifier:z.pointerId,pageX:z.pageX,pageY:z.pageY,radiusX:z.width/2,radiusY:z.height/2,screenX:z.screenX,screenY:z.screenY,target:z.target}},Ne=function(z){return{event:z,touch:Me(z)}},Ce=function(z){Le.push(Ne(z))},Fe=function(z){for(var se=0;se0)return U[0]}return null},g=Object.keys(d),m=0;m0?p:ple(a,s,e,r,n,i,o,l)},checkPoint:function(e,r,n,i,a,s,o,l){l=l==="auto"?ff(i,a):l;var u=2*l;if(Mu(e,r,this.points,s,o,i,a-u,[0,-1],n)||Mu(e,r,this.points,s,o,i-u,a,[0,-1],n))return!0;var h=i/2+2*n,f=a/2+2*n,d=[s-h,o-f,s-h,o,s+h,o,s+h,o-f];return!!(Os(e,r,d)||n0(e,r,u,u,s+i/2-l,o+a/2-l,n)||n0(e,r,u,u,s-i/2+l,o+a/2-l,n))}}};Ou.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",es(3,0)),this.generateRoundPolygon("round-triangle",es(3,0)),this.generatePolygon("rectangle",es(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",es(5,0)),this.generateRoundPolygon("round-pentagon",es(5,0)),this.generatePolygon("hexagon",es(6,0)),this.generateRoundPolygon("round-hexagon",es(6,0)),this.generatePolygon("heptagon",es(7,0)),this.generateRoundPolygon("round-heptagon",es(7,0)),this.generatePolygon("octagon",es(8,0)),this.generateRoundPolygon("round-octagon",es(8,0));var n=new Array(20);{var i=oI(5,0),a=oI(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*S)break}else if(u){if(b>=e.deqCost*p||b>=e.deqAvgCost*d)break}else if(w>=e.deqNoDrawCost*QR)break;var T=e.deq(n,v,m);if(T.length>0)for(var E=0;E0&&(e.onDeqd(n,g),!u&&e.shouldRedraw(n,g,v,m)&&a())},o=e.priority||II;i.beforeRender(s,o(n))}}}},yBe=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:KT;mf(this,t),this.idsByKey=new Nu,this.keyForId=new Nu,this.cachesByLvl=new Nu,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return vf(t,[{key:"getIdsFor",value:function(r){r==null&&Vn("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(r);return i||(i=new $g,n.set(r,i)),i}},{key:"addIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).add(n)}},{key:"deleteIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).delete(n)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);this.deleteIdForKey(i,n),this.addIdForKey(a,n),this.keyForId.set(n,a)}},{key:"deleteKeyMappingFor",value:function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);return i!==a}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var n=this.cachesByLvl,i=this.lvls,a=n.get(r);return a||(a=new Nu,n.set(r,a),i.push(r)),a}},{key:"getCache",value:function(r,n){return this.getCachesAt(n).get(r)}},{key:"get",value:function(r,n){var i=this.getKey(r),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(r),a}},{key:"getForCachedKey",value:function(r,n){var i=this.keyForId.get(r.id()),a=this.getCache(i,n);return a}},{key:"hasCache",value:function(r,n){return this.getCachesAt(n).has(r)}},{key:"has",value:function(r,n){var i=this.getKey(r);return this.hasCache(i,n)}},{key:"setCache",value:function(r,n,i){i.key=r,this.getCachesAt(n).set(r,i)}},{key:"set",value:function(r,n,i){var a=this.getKey(r);this.setCache(a,n,i),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,n){this.getCachesAt(n).delete(r)}},{key:"delete",value:function(r,n){var i=this.getKey(r);this.deleteCache(i,n)}},{key:"invalidateKey",value:function(r){var n=this;this.lvls.forEach(function(i){return n.deleteCache(r,i)})}},{key:"invalidate",value:function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(r);var a=this.doesEleInvalidateKey(r);return a&&this.invalidateKey(i),a||this.getNumberOfIdsForKey(i)===0}}])}(),Roe=25,MT=50,WT=-4,wI=3,yce=7.99,xBe=8,bBe=1024,wBe=1024,TBe=1024,kBe=.2,EBe=.8,SBe=10,CBe=.15,ABe=.1,_Be=.9,LBe=.9,RBe=100,IBe=1,Ig={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},NBe=ha({getKey:null,doesEleInvalidateKey:KT,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ole,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),f2=function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var i=NBe(r);Kt(n,i),n.lookup=new yBe(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},Li=f2.prototype;Li.reasons=Ig;Li.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};Li.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n};Li.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new N2(function(r,n){return n.reqs-r.reqs});return e};Li.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};Li.getElement=function(t,e,r,n,i){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(DI(o*r))),n=yce||n>wI)return null;var u=Math.pow(2,n),h=e.h*u,f=e.w*u,d=s.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,d))return null;var p=l.get(t,n);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;var g;if(h<=Roe?g=Roe:h<=MT?g=MT:g=Math.ceil(h/MT)*MT,h>TBe||f>wBe)return null;var m=a.getTextureQueue(g),v=m[m.length-2],y=function(){return a.recycleTexture(g,f)||a.addTexture(g,f)};v||(v=m[m.length-1]),v||(v=y()),v.width-v.usedWidthn;R--)I=a.getElement(t,e,r,R,Ig.downscale);M()}else return a.queueElement(t,E.level-1),E;else{var k;if(!w&&!S&&!T)for(var L=n-1;L>=WT;L--){var _=l.get(t,L);if(_){k=_;break}}if(b(k))return a.queueElement(t,n),k;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,t,e,d,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return p={x:v.usedWidth,texture:v,level:n,scale:u,width:f,height:h,scaledLabelShown:d},v.usedWidth+=Math.ceil(f+xBe),v.eleCaches.push(p),l.set(t,n,p),a.checkTextureFullness(v),p};Li.invalidateElements=function(t){for(var e=0;e=kBe*t.width&&this.retireTexture(t)};Li.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>EBe&&t.fullnessChecks>=SBe?hf(r,t):t.fullnessChecks++};Li.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),i=this.lookup;hf(n,t),t.retired=!0;for(var a=t.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,NI(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),hf(i,s),n.push(s),s}};Li.queueElement=function(t,e){var r=this,n=r.getElementQueue(),i=r.getElementKeyToQueue(),a=this.getKey(t),s=i[a];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,n.updateItem(s);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:a};n.push(o),i[a]=o}};Li.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,s=0;s0;s++){var o=r.pop(),l=o.key,u=o.eles[0],h=a.hasCache(u,o.level);if(n[l]=null,h)continue;i.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,t,o.level,Ig.dequeue)}return i};Li.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=this.getKey(t),a=n[i];a!=null&&(a.eles.length===1?(a.reqs=RI,r.updateItem(a),r.pop(),n[i]=null):a.eles.unmerge(t))};Li.onDequeue=function(t){this.onDequeues.push(t)};Li.offDequeue=function(t){hf(this.onDequeues,t)};Li.setupDequeueing=vce.setupDequeueing({deqRedrawThreshold:RBe,deqCost:CBe,deqAvgCost:ABe,deqNoDrawCost:_Be,deqFastCost:LBe,deq:function(e,r,n){return e.dequeue(r,n)},onDeqd:function(e,r){for(var n=0;n=MBe||r>ik)return null}n.validateLayersElesOrdering(r,t);var l=n.layersByLevel,u=Math.pow(2,r),h=l[r]=l[r]||[],f,d=n.levelIsComplete(r,t),p,g=function(){var M=function(D){if(n.validateLayersElesOrdering(D,t),n.levelIsComplete(D,t))return p=l[D],!0},R=function(D){if(!p)for(var N=r+D;p2<=N&&N<=ik&&!M(N);N+=D);};R(1),R(-1);for(var k=h.length-1;k>=0;k--){var L=h[k];L.invalid&&hf(h,L)}};if(!d)g();else return h;var m=function(){if(!f){f=ts();for(var M=0;MNoe||L>Noe)return null;var _=k*L;if(_>VBe)return null;var D=n.makeLayer(f,r);if(R!=null){var N=h.indexOf(R)+1;h.splice(N,0,D)}else(M.insert===void 0||M.insert)&&h.unshift(D);return D};if(n.skipping&&!o)return null;for(var y=null,b=t.length/DBe,w=!o,S=0;S=b||!dle(y.bb,T.boundingBox()))&&(y=v({insert:!0,after:y}),!y))return null;p||w?n.queueLayer(y,T):n.drawEleInLayer(y,T,r,e),y.eles.push(T),A[r]=y}return p||(w?null:h)};fa.getEleLevelForLayerLevel=function(t,e){return t};fa.drawEleInLayer=function(t,e,r,n){var i=this,a=this.renderer,s=t.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(r=i.getEleLevelForLayerLevel(r,n),a.setImgSmoothing(s,!1),a.drawCachedElement(s,e,null,null,r,UBe),a.setImgSmoothing(s,!0))};fa.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var i=0,a=0;a0||s.invalid)return!1;i+=s.eles.length}return i===e.length};fa.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n0){e=!0;break}}return e};fa.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=Du(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(n,i,a){e.invalidateLayer(n)}))};fa.invalidateLayer=function(t){if(this.lastInvalidationTime=Du(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];hf(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(a&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=a?e.pstyle("opacity").value:1,h=a?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,g=e.pstyle("line-cap").value,m=e.pstyle("line-outline-width").value,v=e.pstyle("line-outline-color").value,y=u*h,b=u*h,w=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;f==="straight-triangle"?(s.eleStrokeStyle(t,e,D),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=p,t.lineCap=g,s.eleStrokeStyle(t,e,D),s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},S=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;if(t.lineWidth=p+m,t.lineCap=g,m>0)s.colorStrokeStyle(t,v[0],v[1],v[2],D);else{t.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},T=function(){i&&s.drawEdgeOverlay(t,e)},E=function(){i&&s.drawEdgeUnderlay(t,e)},A=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;s.drawArrowheads(t,e,D)},C=function(){s.drawElementText(t,e,null,n)};t.lineJoin="round";var I=e.pstyle("ghost").value==="yes";if(I){var M=e.pstyle("ghost-offset-x").pfValue,R=e.pstyle("ghost-offset-y").pfValue,k=e.pstyle("ghost-opacity").value,L=y*k;t.translate(M,R),w(L),A(L),t.translate(-M,-R)}else S();E(),w(),A(),T(),C(),r&&t.translate(l.x1,l.y1)}};wce=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var i=n.pstyle("".concat(e,"-opacity")).value;if(i!==0){var a=this,s=a.usePaths(),o=n._private.rscratch,l=n.pstyle("".concat(e,"-padding")).pfValue,u=2*l,h=n.pstyle("".concat(e,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,h[0],h[1],h[2],i),a.drawEdgePath(n,r,o.allpts,"solid")}}}};Pu.drawEdgeOverlay=wce("overlay");Pu.drawEdgeUnderlay=wce("underlay");Pu.drawEdgePath=function(t,e,r,n){var i=t._private.rscratch,a=e,s,o=!1,l=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,h=t.pstyle("line-dash-offset").pfValue;if(l){var f=r.join("$"),d=i.pathCacheKey&&i.pathCacheKey===f;d?(s=e=i.pathCache,o=!0):(s=e=new Path2D,i.pathCacheKey=f,i.pathCache=s)}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=h;break;case"solid":a.setLineDash([]);break}if(!o&&!i.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(n==null){if(a&&!s.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,h=e.pstyle("label"),f=e.pstyle("source-label"),d=e.pstyle("target-label");if(u||(!h||!h.value)&&(!f||!f.value)&&(!d||!d.value))return;t.textAlign="center",t.textBaseline="bottom"}var p=!r,g;r&&(g=r,t.translate(-g.x1,-g.y1)),i==null?(s.drawText(t,e,null,p,a),e.isEdge()&&(s.drawText(t,e,"source",p,a),s.drawText(t,e,"target",p,a))):s.drawText(t,e,i,p,a),r&&t.translate(g.x1,g.y1)};u0.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,h=e.pstyle("text-outline-color").value;t.font=n+" "+s+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],o),this.colorStrokeStyle(t,h[0],h[1],h[2],l)};u0.getTextAngle=function(t,e){var r,n=t._private,i=n.rscratch,a=e?e+"-":"",s=t.pstyle(a+"text-rotation");if(s.strValue==="autorotate"){var o=Ms(i,"labelAngle",e);r=t.isEdge()?o:0}else s.strValue==="none"?r=0:r=s.pfValue;return r};u0.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=e._private,s=a.rscratch,o=i?e.effectiveOpacity():1;if(!(i&&(o===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=Ms(s,"labelX",r),u=Ms(s,"labelY",r),h,f,d=this.getLabelText(e,r);if(d!=null&&d!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(t,e,i);var p=r?r+"-":"",g=Ms(s,"labelWidth",r),m=Ms(s,"labelHeight",r),v=e.pstyle(p+"text-margin-x").pfValue,y=e.pstyle(p+"text-margin-y").pfValue,b=e.isEdge(),w=e.pstyle("text-halign").value,S=e.pstyle("text-valign").value;b&&(w="center",S="center"),l+=v,u+=y;var T;switch(n?T=this.getTextAngle(e,r):T=0,T!==0&&(h=l,f=u,t.translate(h,f),t.rotate(T),l=0,u=0),S){case"top":break;case"center":u+=m/2;break;case"bottom":u+=m;break}var E=e.pstyle("text-background-opacity").value,A=e.pstyle("text-border-opacity").value,C=e.pstyle("text-border-width").pfValue,I=e.pstyle("text-background-padding").pfValue,M=e.pstyle("text-background-shape").strValue,R=M==="round-rectangle"||M==="roundrectangle",k=M==="circle",L=2;if(E>0||C>0&&A>0){var _=t.fillStyle,D=t.strokeStyle,N=t.lineWidth,O=e.pstyle("text-background-color").value,P=e.pstyle("text-border-color").value,B=e.pstyle("text-border-style").value,G=E>0,$=C>0&&A>0,U=l-I;switch(w){case"left":U-=g;break;case"center":U-=g/2;break}var X=u-m-I,ee=g+2*I,Y=m+2*I;if(G&&(t.fillStyle="rgba(".concat(O[0],",").concat(O[1],",").concat(O[2],",").concat(E*o,")")),$&&(t.strokeStyle="rgba(".concat(P[0],",").concat(P[1],",").concat(P[2],",").concat(A*o,")"),t.lineWidth=C,t.setLineDash))switch(B){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=C/4,t.setLineDash([]);break;case"solid":default:t.setLineDash([]);break}if(R?(t.beginPath(),Poe(t,U,X,ee,Y,L)):k?(t.beginPath(),eFe(t,U,X,ee,Y)):(t.beginPath(),t.rect(U,X,ee,Y)),G&&t.fill(),$&&t.stroke(),$&&B==="double"){var oe=C/2;t.beginPath(),R?Poe(t,U+oe,X+oe,ee-2*oe,Y-2*oe,L):t.rect(U+oe,X+oe,ee-2*oe,Y-2*oe),t.stroke()}t.fillStyle=_,t.strokeStyle=D,t.lineWidth=N,t.setLineDash&&t.setLineDash([])}var Q=2*e.pstyle("text-outline-width").pfValue;if(Q>0&&(t.lineWidth=Q),e.pstyle("text-wrap").value==="wrap"){var ue=Ms(s,"labelWrapCachedLines",r),re=Ms(s,"labelLineHeight",r),te=g/2,Z=this.getLabelJustification(e);switch(Z==="auto"||(w==="left"?Z==="left"?l+=-g:Z==="center"&&(l+=-te):w==="center"?Z==="left"?l+=-te:Z==="right"&&(l+=te):w==="right"&&(Z==="center"?l+=te:Z==="right"&&(l+=g))),S){case"top":u-=(ue.length-1)*re;break;case"center":case"bottom":u-=(ue.length-1)*re;break}for(var j=0;j0&&t.strokeText(ue[j],l,u),t.fillText(ue[j],l,u),u+=re}else Q>0&&t.strokeText(d,l,u),t.fillText(d,l,u);T!==0&&(t.rotate(-T),t.translate(-h,-f))}}};xf={};xf.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,h=u.rscratch,f=e.position();if(!(!bt(f.x)||!bt(f.y))&&!(a&&!e.visible())){var d=a?e.effectiveOpacity():1,p=s.usePaths(),g,m=!1,v=e.padding();o=e.width()+2*v,l=e.height()+2*v;var y;r&&(y=r,t.translate(-y.x1,-y.y1));for(var b=e.pstyle("background-image"),w=b.value,S=new Array(w.length),T=new Array(w.length),E=0,A=0;A0&&arguments[0]!==void 0?arguments[0]:L;s.eleFillStyle(t,e,H)},re=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$;s.colorStrokeStyle(t,_[0],_[1],_[2],H)},te=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Y;s.colorStrokeStyle(t,X[0],X[1],X[2],H)},Z=function(H,he,z,se){var le=s.nodePathCache=s.nodePathCache||[],ke=sle(z==="polygon"?z+","+se.join(","):z,""+he,""+H,""+Q),ve=le[ke],me,Ie=!1;return ve!=null?(me=ve,Ie=!0,h.pathCache=me):(me=new Path2D,le[ke]=h.pathCache=me),{path:me,cacheHit:Ie}},j=e.pstyle("shape").strValue,ae=e.pstyle("shape-polygon-points").pfValue;if(p){t.translate(f.x,f.y);var K=Z(o,l,j,ae);g=K.path,m=K.cacheHit}var de=function(){if(!m){var H=f;p&&(H={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(g||t,H.x,H.y,o,l,Q,h)}p?t.fill(g):t.fill()},ne=function(){for(var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,z=u.backgrounding,se=0,le=0;le0&&arguments[0]!==void 0?arguments[0]:!1,he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasPie(e)&&(s.drawPie(t,e,he),H&&(p||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,Q,h)))},W=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasStripe(e)&&(t.save(),p?t.clip(h.pathCache):(s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,Q,h),t.clip()),s.drawStripe(t,e,he),t.restore(),H&&(p||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,Q,h)))},Ve=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,he=(R>0?R:-R)*H,z=R>0?0:255;R!==0&&(s.colorFillStyle(t,z,z,z,he),p?t.fill(g):t.fill())},pe=function(){if(k>0){if(t.lineWidth=k,t.lineCap=O,t.lineJoin=N,t.setLineDash)switch(D){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(B),t.lineDashOffset=G;break;case"solid":case"double":t.setLineDash([]);break}if(P!=="center"){if(t.save(),t.lineWidth*=2,P==="inside")p?t.clip(g):t.clip();else{var H=new Path2D;H.rect(-o/2-k,-l/2-k,o+2*k,l+2*k),H.addPath(g),t.clip(H,"evenodd")}p?t.stroke(g):t.stroke(),t.restore()}else p?t.stroke(g):t.stroke();if(D==="double"){t.lineWidth=k/3;var he=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(g):t.stroke(),t.globalCompositeOperation=he}t.setLineDash&&t.setLineDash([])}},Be=function(){if(U>0){if(t.lineWidth=U,t.lineCap="butt",t.setLineDash)switch(ee){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var H=f;p&&(H={x:0,y:0});var he=s.getNodeShape(e),z=k;P==="inside"&&(z=0),P==="outside"&&(z*=2);var se=(o+z+(U+oe))/o,le=(l+z+(U+oe))/l,ke=o*se,ve=l*le,me=s.nodeShapes[he].points,Ie;if(p){var _e=Z(ke,ve,he,me);Ie=_e.path}if(he==="ellipse")s.drawEllipsePath(Ie||t,H.x,H.y,ke,ve);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(he)){var ze=0,Xe=0,ft=0;he==="round-diamond"?ze=(z+oe+U)*1.4:he==="round-heptagon"?(ze=(z+oe+U)*1.075,ft=-(z/2+oe+U)/35):he==="round-hexagon"?ze=(z+oe+U)*1.12:he==="round-pentagon"?(ze=(z+oe+U)*1.13,ft=-(z/2+oe+U)/15):he==="round-tag"?(ze=(z+oe+U)*1.12,Xe=(z/2+U+oe)*.07):he==="round-triangle"&&(ze=(z+oe+U)*(Math.PI/2),ft=-(z+oe/2+U)/Math.PI),ze!==0&&(se=(o+ze)/o,ke=o*se,["round-hexagon","round-tag"].includes(he)||(le=(l+ze)/l,ve=l*le)),Q=Q==="auto"?mle(ke,ve):Q;for(var We=ke/2,Oe=ve/2,Ke=Q+(z+U+oe)/2,Ue=new Array(me.length/2),nt=new Array(me.length/2),Dt=0;Dt0){if(i=i||n.position(),a==null||s==null){var p=n.padding();a=n.width()+2*p,s=n.height()+2*p}o.colorFillStyle(r,h[0],h[1],h[2],u),o.nodeShapes[f].draw(r,i.x,i.y,a+l*2,s+l*2,d),r.fill()}}}};xf.drawNodeOverlay=Tce("overlay");xf.drawNodeUnderlay=Tce("underlay");xf.hasPie=function(t){return t=t[0],t._private.hasPie};xf.hasStripe=function(t){return t=t[0],t._private.hasStripe};xf.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),s=e.pstyle("pie-hole"),o=e.pstyle("pie-start-angle").pfValue,l=n.x,u=n.y,h=e.width(),f=e.height(),d=Math.min(h,f)/2,p,g=0,m=this.usePaths();if(m&&(l=0,u=0),a.units==="%"?d=d*a.pfValue:a.pfValue!==void 0&&(d=a.pfValue/2),s.units==="%"?p=d*s.pfValue:s.pfValue!==void 0&&(p=s.pfValue/2),!(p>=d))for(var v=1;v<=i.pieBackgroundN;v++){var y=e.pstyle("pie-"+v+"-background-size").value,b=e.pstyle("pie-"+v+"-background-color").value,w=e.pstyle("pie-"+v+"-background-opacity").value*r,S=y/100;S+g>1&&(S=1-g);var T=1.5*Math.PI+2*Math.PI*g;T+=o;var E=2*Math.PI*S,A=T+E;y===0||g>=1||g+S>1||(p===0?(t.beginPath(),t.moveTo(l,u),t.arc(l,u,d,T,A),t.closePath()):(t.beginPath(),t.arc(l,u,d,T,A),t.arc(l,u,p,A,T,!0),t.closePath()),this.colorFillStyle(t,b[0],b[1],b[2],w),t.fill(),g+=S)}};xf.drawStripe=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=n.x,s=n.y,o=e.width(),l=e.height(),u=0,h=this.usePaths();t.save();var f=e.pstyle("stripe-direction").value,d=e.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":t.rotate(-Math.PI/2);break}var p=o,g=l;d.units==="%"?(p=p*d.pfValue,g=g*d.pfValue):d.pfValue!==void 0&&(p=d.pfValue,g=d.pfValue),h&&(a=0,s=0),s-=p/2,a-=g/2;for(var m=1;m<=i.stripeBackgroundN;m++){var v=e.pstyle("stripe-"+m+"-background-size").value,y=e.pstyle("stripe-"+m+"-background-color").value,b=e.pstyle("stripe-"+m+"-background-opacity").value*r,w=v/100;w+u>1&&(w=1-u),!(v===0||u>=1||u+w>1)&&(t.beginPath(),t.rect(a,s+g*u,p,g*w),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],b),t.fill(),u+=w)}t.restore()};rs={},tFe=100;rs.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};rs.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,i=0;ie.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(h[e.NODE]=!0,h[e.SELECT_BOX]=!0);var b=r.style(),w=r.zoom(),S=s!==void 0?s:w,T=r.pan(),E={x:T.x,y:T.y},A={zoom:w,pan:{x:T.x,y:T.y}},C=e.prevViewport,I=C===void 0||A.zoom!==C.zoom||A.pan.x!==C.pan.x||A.pan.y!==C.pan.y;!I&&!(m&&!g)&&(e.motionBlurPxRatio=1),o&&(E=o),S*=l,E.x*=l,E.y*=l;var M=e.getCachedZSortedEles();function R(re,te,Z,j,ae){var K=re.globalCompositeOperation;re.globalCompositeOperation="destination-out",e.colorFillStyle(re,255,255,255,e.motionBlurTransparency),re.fillRect(te,Z,j,ae),re.globalCompositeOperation=K}function k(re,te){var Z,j,ae,K;!e.clearingMotionBlur&&(re===u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||re===u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(Z={x:T.x*p,y:T.y*p},j=w*p,ae=e.canvasWidth*p,K=e.canvasHeight*p):(Z=E,j=S,ae=e.canvasWidth,K=e.canvasHeight),re.setTransform(1,0,0,1,0,0),te==="motionBlur"?R(re,0,0,ae,K):!n&&(te===void 0||te)&&re.clearRect(0,0,ae,K),i||(re.translate(Z.x,Z.y),re.scale(j,j)),o&&re.translate(o.x,o.y),s&&re.scale(s,s)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var L=e.data.bufferContexts[e.TEXTURE_BUFFER];L.setTransform(1,0,0,1,0,0),L.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:L,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult});var A=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight};A.mpan={x:(0-A.pan.x)/A.zoom,y:(0-A.pan.y)/A.zoom}}h[e.DRAG]=!1,h[e.NODE]=!1;var _=u.contexts[e.NODE],D=e.textureCache.texture,A=e.textureCache.viewport;_.setTransform(1,0,0,1,0,0),d?R(_,0,0,A.width,A.height):_.clearRect(0,0,A.width,A.height);var N=b.core("outside-texture-bg-color").value,O=b.core("outside-texture-bg-opacity").value;e.colorFillStyle(_,N[0],N[1],N[2],O),_.fillRect(0,0,A.width,A.height);var w=r.zoom();k(_,!1),_.clearRect(A.mpan.x,A.mpan.y,A.width/A.zoom/l,A.height/A.zoom/l),_.drawImage(D,A.mpan.x,A.mpan.y,A.width/A.zoom/l,A.height/A.zoom/l)}else e.textureOnViewport&&!n&&(e.textureCache=null);var P=r.extent(),B=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),G=e.hideEdgesOnViewport&&B,$=[];if($[e.NODE]=!h[e.NODE]&&d&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,$[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),$[e.DRAG]=!h[e.DRAG]&&d&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,$[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),h[e.NODE]||i||a||$[e.NODE]){var U=d&&!$[e.NODE]&&p!==1,_=n||(U?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),X=d&&!U?"motionBlur":void 0;k(_,X),G?e.drawCachedNodes(_,M.nondrag,l,P):e.drawLayeredElements(_,M.nondrag,l,P),e.debug&&e.drawDebugPoints(_,M.nondrag),!i&&!d&&(h[e.NODE]=!1)}if(!a&&(h[e.DRAG]||i||$[e.DRAG])){var U=d&&!$[e.DRAG]&&p!==1,_=n||(U?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]);k(_,d&&!U?"motionBlur":void 0),G?e.drawCachedNodes(_,M.drag,l,P):e.drawCachedElements(_,M.drag,l,P),e.debug&&e.drawDebugPoints(_,M.drag),!i&&!d&&(h[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,k),d&&p!==1){var ee=u.contexts[e.NODE],Y=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],oe=u.contexts[e.DRAG],Q=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],ue=function(te,Z,j){te.setTransform(1,0,0,1,0,0),j||!y?te.clearRect(0,0,e.canvasWidth,e.canvasHeight):R(te,0,0,e.canvasWidth,e.canvasHeight);var ae=p;te.drawImage(Z,0,0,e.canvasWidth*ae,e.canvasHeight*ae,0,0,e.canvasWidth,e.canvasHeight)};(h[e.NODE]||$[e.NODE])&&(ue(ee,Y,$[e.NODE]),h[e.NODE]=!1),(h[e.DRAG]||$[e.DRAG])&&(ue(oe,Q,$[e.DRAG]),h[e.DRAG]=!1)}e.prevViewport=A,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),d&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,h[e.NODE]=!0,h[e.DRAG]=!0,e.redraw()},tFe)),n||r.emit("render")};rs.drawSelectionRectangle=function(t,e){var r=this,n=r.cy,i=r.data,a=n.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=i.canvasNeedsRedraw,u=t.forcedContext;if(r.showFps||!s&&l[r.SELECT_BOX]&&!o){var h=u||i.contexts[r.SELECT_BOX];if(e(h),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var f=r.cy.zoom(),d=a.core("selection-box-border-width").value/f;h.lineWidth=d,h.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",h.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),d>0&&(h.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",h.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(i.bgActivePosistion&&!r.hoverData.selecting){var f=r.cy.zoom(),p=i.bgActivePosistion;h.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",h.beginPath(),h.arc(p.x,p.y,a.core("active-bg-size").pfValue/f,0,2*Math.PI),h.fill()}var g=r.lastRedrawTime;if(r.showFps&&g){g=Math.round(g);var m=Math.round(1e3/g),v="1 frame = "+g+" ms = "+m+" fps";if(h.setTransform(1,0,0,1,0,0),h.fillStyle="rgba(255, 0, 0, 0.75)",h.strokeStyle="rgba(255, 0, 0, 0.75)",h.font="30px Arial",!o2){var y=h.measureText(v);o2=y.actualBoundingBoxAscent}h.fillText(v,0,o2);var b=60;h.strokeRect(0,o2+10,250,20),h.fillRect(0,o2+10,250*Math.min(m/b,1),20)}o||(l[r.SELECT_BOX]=!1)}};Foe=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});mFe=function(){function t(e,r,n,i){mf(this,t),this.debugID=Math.floor(Math.random()*1e4),this.r=e,this.texSize=r,this.texRows=n,this.texHeight=Math.floor(r/n),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(e,r,r),this.scratch=i(e,r,this.texHeight,"scratch")}return vf(t,[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(r){var n=r.w,i=r.h,a=this.texHeight,s=this.texSize,o=a/i,l=n*o,u=i*o;return l>s&&(o=s/n,l=n*o,u=i*o),{scale:o,texW:l,texH:u}}},{key:"draw",value:function(r,n,i){var a=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,l=this.texHeight,u=this.getScale(n),h=u.scale,f=u.texW,d=u.texH,p=function(w,S){if(i&&S){var T=S.context,E=w.x,A=w.row,C=E,I=l*A;T.save(),T.translate(C,I),T.scale(h,h),i(T,n),T.restore()}},g=[null,null],m=function(){p(a.freePointer,a.canvas),g[0]={x:a.freePointer.x,y:a.freePointer.row*l,w:f,h:d},g[1]={x:a.freePointer.x+f,y:a.freePointer.row*l,w:0,h:d},a.freePointer.x+=f,a.freePointer.x==s&&(a.freePointer.x=0,a.freePointer.row++)},v=function(){var w=a.scratch,S=a.canvas;w.clear(),p({x:0,row:0},w);var T=s-a.freePointer.x,E=f-T,A=l;{var C=a.freePointer.x,I=a.freePointer.row*l,M=T;S.context.drawImage(w,0,0,M,A,C,I,M,A),g[0]={x:C,y:I,w:M,h:d}}{var R=T,k=(a.freePointer.row+1)*l,L=E;S&&S.context.drawImage(w,R,0,L,A,0,k,L,A),g[1]={x:0,y:k,w:L,h:d}}a.freePointer.x=E,a.freePointer.row++},y=function(){a.freePointer.x=0,a.freePointer.row++};if(this.freePointer.x+f<=s)m();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(y(),m()):this.enableWrapping?v():(y(),m())}return this.keyToLocation.set(r,g),this.needsBuffer=!0,g}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var n=this.texSize,i=this.texRows,a=this.getScale(r),s=a.texW;return this.freePointer.x+s>n?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},a=i.forceRedraw,s=a===void 0?!1:a,o=i.filterEle,l=o===void 0?function(){return!0}:o,u=i.filterType,h=u===void 0?function(){return!0}:u,f=!1,d=!1,p=Ps(r),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;if(l(m)){var v=Ps(this.renderTypes.values()),y;try{var b=function(){var S=y.value,T=S.type;if(h(T)){var E=n.collections.get(S.collection),A=S.getKey(m),C=Array.isArray(A)?A:[A];if(s)C.forEach(function(k){return E.markKeyForGC(k)}),d=!0;else{var I=S.getID?S.getID(m):m.id(),M=n._key(T,I),R=n.typeAndIdToKey.get(M);R!==void 0&&!oFe(C,R)&&(f=!0,n.typeAndIdToKey.delete(M),R.forEach(function(k){return E.markKeyForGC(k)}))}}};for(v.s();!(y=v.n()).done;)b()}catch(w){v.e(w)}finally{v.f()}}}}catch(w){p.e(w)}finally{p.f()}return d&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var r=Ps(this.collections.values()),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.gc()}}catch(a){r.e(a)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,n,i,a){var s=this.renderTypes.get(n),o=this.collections.get(s.collection),l=!1,u=o.draw(a,i,function(d){s.drawClipped?(d.save(),d.beginPath(),d.rect(0,0,i.w,i.h),d.clip(),s.drawElement(d,r,i,!0,!0),d.restore()):s.drawElement(d,r,i,!0,!0),l=!0});if(l){var h=s.getID?s.getID(r):r.id(),f=this._key(n,h);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(a):this.typeAndIdToKey.set(f,[a])}return u}},{key:"getAtlasInfo",value:function(r,n){var i=this,a=this.renderTypes.get(n),s=a.getKey(r),o=Array.isArray(s)?s:[s];return o.map(function(l){var u=a.getBoundingBox(r,l),h=i.getOrCreateAtlas(r,n,u,l),f=h.getOffsets(l),d=yi(f,2),p=d[0],g=d[1];return{atlas:h,tex:p,tex1:p,tex2:g,bb:u}})}},{key:"getDebugInfo",value:function(){var r=[],n=Ps(this.collections),i;try{for(n.s();!(i=n.n()).done;){var a=yi(i.value,2),s=a[0],o=a[1],l=o.getCounts(),u=l.keyCount,h=l.atlasCount;r.push({type:s,keyCount:u,atlasCount:h})}}catch(f){n.e(f)}finally{n.f()}return r}}])}(),bFe=function(){function t(e){mf(this,t),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return vf(t,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,n){return n})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(r):!0}},{key:"getAtlasIndexForBatch",value:function(r){var n=this.batchAtlases.indexOf(r);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(r),n=this.batchAtlases.length-1}return n}}])}(),wFe=` float circleSD(vec2 p, float r) { return distance(vec2(0), p) - r; // signed distance } `,TFe=` float rectangleSD(vec2 p, vec2 b) { vec2 d = abs(p)-b; return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); } `,kFe=` float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; cr.x = (p.y > 0.0) ? cr.x : cr.y; vec2 q = abs(p) - b + cr.x; return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; } `,EFe=` float ellipseSD(vec2 p, vec2 ab) { p = abs( p ); // symmetry // find root with Newton solver vec2 q = ab*(p-ab); float w = (q.x1.0) ? d : -d; } `,g2={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},ak={IGNORE:1,USE_BB:2},tI=0,Goe=1,Voe=2,rI=3,Ag=4,OT=5,l2=6,c2=7,SFe=function(){function t(e,r,n){mf(this,t),this.r=e,this.gl=r,this.maxInstances=n.webglBatchSize,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,this.debug=n.webglDebug,this.batchDebugInfo=[],n.enableWrapping=!0,n.createTextureCanvas=nFe,this.atlasManager=new xFe(e,n),this.batchManager=new bFe(n),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(g2.SCREEN),this.pickingProgram=this._createShaderProgram(g2.PICKING),this.vao=this._createVAO()}return vf(t,[{key:"addAtlasCollection",value:function(r,n){this.atlasManager.addAtlasCollection(r,n)}},{key:"addTextureAtlasRenderType",value:function(r,n){this.atlasManager.addRenderType(r,n)}},{key:"addSimpleShapeRenderType",value:function(r,n){this.simpleShapeOptions.set(r,n)}},{key:"invalidate",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.type,a=this.atlasManager;return i?a.invalidate(r,{filterType:function(o){return o===i},forceRedraw:!0}):a.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(r){var n=this.gl,i=`#version 300 es precision highp float; uniform mat3 uPanZoomMatrix; uniform int uAtlasSize; // instanced in vec2 aPosition; // a vertex from the unit square in mat3 aTransform; // used to transform verticies, eg into a bounding box in int aVertType; // the type of thing we are rendering // the z-index that is output when using picking mode in vec4 aIndex; // For textures in int aAtlasId; // which shader unit/atlas to use in vec4 aTex; // x/y/w/h of texture in atlas // for edges in vec4 aPointAPointB; in vec4 aPointCPointD; in vec2 aLineWidth; // also used for node border width // simple shapes in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left] in vec4 aColor; // also used for edges in vec4 aBorderColor; // aLineWidth is used for border width // output values passed to the fragment shader out vec2 vTexCoord; out vec4 vColor; out vec2 vPosition; // flat values are not interpolated flat out int vAtlasId; flat out int vVertType; flat out vec2 vTopRight; flat out vec2 vBotLeft; flat out vec4 vCornerRadius; flat out vec4 vBorderColor; flat out vec2 vBorderWidth; flat out vec4 vIndex; void main(void) { int vid = gl_VertexID; vec2 position = aPosition; // TODO make this a vec3, simplifies some code below if(aVertType == `.concat(tI,`) { float texX = aTex.x; // texture coordinates float texY = aTex.y; float texW = aTex.z; float texH = aTex.w; if(vid == 1 || vid == 2 || vid == 4) { texX += texW; } if(vid == 2 || vid == 4 || vid == 5) { texY += texH; } float d = float(uAtlasSize); vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); } else if(aVertType == `).concat(Ag," || aVertType == ").concat(c2,` || aVertType == `).concat(OT," || aVertType == ").concat(l2,`) { // simple shapes // the bounding box is needed by the fragment shader vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated // calculations are done in the fragment shader, just pass these along vColor = aColor; vCornerRadius = aCornerRadius; vBorderColor = aBorderColor; vBorderWidth = aLineWidth; gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); } else if(aVertType == `).concat(Goe,`) { vec2 source = aPointAPointB.xy; vec2 target = aPointAPointB.zw; // adjust the geometry so that the line is centered on the edge position.y = position.y - 0.5; // stretch the unit square into a long skinny rectangle vec2 xBasis = target - source; vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y; gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); vColor = aColor; } else if(aVertType == `).concat(Voe,`) { vec2 pointA = aPointAPointB.xy; vec2 pointB = aPointAPointB.zw; vec2 pointC = aPointCPointD.xy; vec2 pointD = aPointCPointD.zw; // adjust the geometry so that the line is centered on the edge position.y = position.y - 0.5; vec2 p0, p1, p2, pos; if(position.x == 0.0) { // The left side of the unit square p0 = pointA; p1 = pointB; p2 = pointC; pos = position; } else { // The right side of the unit square, use same approach but flip the geometry upside down p0 = pointD; p1 = pointC; p2 = pointB; pos = vec2(0.0, -position.y); } vec2 p01 = p1 - p0; vec2 p12 = p2 - p1; vec2 p21 = p1 - p2; // Find the normal vector. vec2 tangent = normalize(normalize(p12) + normalize(p01)); vec2 normal = vec2(-tangent.y, tangent.x); // Find the vector perpendicular to p0 -> p1. vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); // Determine the bend direction. float sigma = sign(dot(p01 + p21, normal)); float width = aLineWidth[0]; if(sign(pos.y) == -sigma) { // This is an intersecting vertex. Adjust the position so that there's no overlap. vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); } else { // This is a non-intersecting vertex. Treat it like a mitre join. vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); } vColor = aColor; } else if(aVertType == `).concat(rI,` && vid < 3) { // massage the first triangle into an edge arrow if(vid == 0) position = vec2(-0.15, -0.3); if(vid == 1) position = vec2( 0.0, 0.0); if(vid == 2) position = vec2( 0.15, -0.3); gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); vColor = aColor; } else { gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space } vAtlasId = aAtlasId; vVertType = aVertType; vIndex = aIndex; } `),a=this.batchManager.getIndexArray(),s=`#version 300 es precision highp float; // declare texture unit for each texture atlas in the batch `.concat(a.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join(` `),` uniform vec4 uBGColor; uniform float uZoom; in vec2 vTexCoord; in vec4 vColor; in vec2 vPosition; // model coordinates flat in int vAtlasId; flat in vec4 vIndex; flat in int vVertType; flat in vec2 vTopRight; flat in vec2 vBotLeft; flat in vec4 vCornerRadius; flat in vec4 vBorderColor; flat in vec2 vBorderWidth; out vec4 outColor; `).concat(wFe,` `).concat(TFe,` `).concat(kFe,` `).concat(EFe,` vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha return vec4( top.rgb + (bot.rgb * (1.0 - top.a)), top.a + (bot.a * (1.0 - top.a)) ); } vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance // scale to the zoom level so that borders don't look blurry when zoomed in // note 1.5 is an aribitrary value chosen because it looks good return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); } void main(void) { if(vVertType == `).concat(tI,`) { // look up the texel from the texture unit `).concat(a.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(` else `),` } else if(vVertType == `).concat(rI,`) { // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; outColor = blend(vColor, uBGColor); outColor.a = 1.0; // make opaque, masks out line under arrow } else if(vVertType == `).concat(Ag,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done } else if(vVertType == `).concat(Ag," || vVertType == ").concat(c2,` || vVertType == `).concat(OT," || vVertType == ").concat(l2,`) { // use SDF float outerBorder = vBorderWidth[0]; float innerBorder = vBorderWidth[1]; float borderPadding = outerBorder * 2.0; float w = vTopRight.x - vBotLeft.x - borderPadding; float h = vTopRight.y - vBotLeft.y - borderPadding; vec2 b = vec2(w/2.0, h/2.0); // half width, half height vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center float d; // signed distance if(vVertType == `).concat(Ag,`) { d = rectangleSD(p, b); } else if(vVertType == `).concat(c2,` && w == h) { d = circleSD(p, b.x); // faster than ellipse } else if(vVertType == `).concat(c2,`) { d = ellipseSD(p, b); } else { d = roundRectangleSD(p, b, vCornerRadius.wzyx); } // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box if(d > 0.0) { if(d > outerBorder) { discard; } else { outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); } } else { if(d > innerBorder) { vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; vec4 innerBorderColor = blend(vBorderColor, vColor); outColor = distInterp(innerBorderColor, outerColor, d); } else { vec4 outerColor; if(innerBorder == 0.0 && outerBorder == 0.0) { outerColor = vec4(0); } else if(innerBorder == 0.0) { outerColor = vBorderColor; } else { outerColor = blend(vBorderColor, vColor); } outColor = distInterp(vColor, outerColor, d - innerBorder); } } } else { outColor = vColor; } `).concat(r.picking?`if(outColor.a == 0.0) discard; else outColor = vIndex;`:"",` } `),o=rFe(n,i,s);o.aPosition=n.getAttribLocation(o,"aPosition"),o.aIndex=n.getAttribLocation(o,"aIndex"),o.aVertType=n.getAttribLocation(o,"aVertType"),o.aTransform=n.getAttribLocation(o,"aTransform"),o.aAtlasId=n.getAttribLocation(o,"aAtlasId"),o.aTex=n.getAttribLocation(o,"aTex"),o.aPointAPointB=n.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=n.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=n.getAttribLocation(o,"aLineWidth"),o.aColor=n.getAttribLocation(o,"aColor"),o.aCornerRadius=n.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=n.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=n.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=n.getUniformLocation(o,"uAtlasSize"),o.uBGColor=n.getUniformLocation(o,"uBGColor"),o.uZoom=n.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:g2.SCREEN;this.panZoomMatrix=r,this.renderTarget=n,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(r,n){return r.visible()?n&&n.isVisible?n.isVisible(r):!0:!1}},{key:"drawTexture",value:function(r,n,i){var a=this.atlasManager,s=this.batchManager,o=a.getRenderTypeOpts(i);if(this._isVisible(r,o)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&o.getTexPickingMode){var l=o.getTexPickingMode(r);if(l===ak.IGNORE)return;if(l==ak.USE_BB){this.drawPickingRectangle(r,n,i);return}}var u=a.getAtlasInfo(r,i),h=Ps(u),f;try{for(h.s();!(f=h.n()).done;){var d=f.value,p=d.atlas,g=d.tex1,m=d.tex2;s.canAddToCurrentBatch(p)||this.endBatch();for(var v=s.getAtlasIndexForBatch(p),y=0,b=[[g,!0],[m,!1]];y=this.maxInstances&&this.endBatch()}}}}catch(R){h.e(R)}finally{h.f()}}}},{key:"setTransformMatrix",value:function(r,n,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(i.shapeProps&&i.shapeProps.padding&&(o=r.pstyle(i.shapeProps.padding).pfValue),a){var l=a.bb,u=a.tex1,h=a.tex2,f=u.w/(u.w+h.w);s||(f=1-f);var d=this._getAdjustedBB(l,o,s,f);this._applyTransformMatrix(n,d,i,r)}else{var p=i.getBoundingBox(r),g=this._getAdjustedBB(p,o,!0,1);this._applyTransformMatrix(n,g,i,r)}}},{key:"_applyTransformMatrix",value:function(r,n,i,a){var s,o;$oe(r);var l=i.getRotation?i.getRotation(a):0;if(l!==0){var u=i.getRotationPoint(a),h=u.x,f=u.y;HT(r,r,[h,f]),zoe(r,r,l);var d=i.getRotationOffset(a);s=d.x+(n.xOffset||0),o=d.y+(n.yOffset||0)}else s=n.x1,o=n.y1;HT(r,r,[s,o]),TI(r,r,[n.w,n.h])}},{key:"_getAdjustedBB",value:function(r,n,i,a){var s=r.x1,o=r.y1,l=r.w,u=r.h,h=r.yOffset;n&&(s-=n,o-=n,l+=2*n,u+=2*n);var f=0,d=l*a;return i&&a<1?l=d:!i&&a<1&&(f=l-d,s+=f,l=d),{x1:s,y1:o,w:l,h:u,xOffset:f,yOffset:h}}},{key:"drawPickingRectangle",value:function(r,n,i){var a=this.atlasManager.getRenderTypeOpts(i),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=Ag;var o=this.indexBuffer.getView(s);Cg(n,o);var l=this.colorBuffer.getView(s);Zd([0,0,0],1,l);var u=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(r,u,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,n,i){var a=this.simpleShapeOptions.get(i);if(this._isVisible(r,a)){var s=a.shapeProps,o=this._getVertTypeForShape(r,s.shape);if(o===void 0||a.isSimple&&!a.isSimple(r)){this.drawTexture(r,n,i);return}var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=o,o===OT||o===l2){var u=a.getBoundingBox(r),h=this._getCornerRadius(r,s.radius,u),f=this.cornerRadiusBuffer.getView(l);f[0]=h,f[1]=h,f[2]=h,f[3]=h,o===l2&&(f[0]=0,f[2]=0)}var d=this.indexBuffer.getView(l);Cg(n,d);var p=r.pstyle(s.color).value,g=r.pstyle(s.opacity).value,m=this.colorBuffer.getView(l);Zd(p,g,m);var v=this.lineWidthBuffer.getView(l);if(v[0]=0,v[1]=0,s.border){var y=r.pstyle("border-width").value;if(y>0){var b=r.pstyle("border-color").value,w=r.pstyle("border-opacity").value,S=this.borderColorBuffer.getView(l);Zd(b,w,S);var T=r.pstyle("border-position").value;if(T==="inside")v[0]=0,v[1]=-y;else if(T==="outside")v[0]=y,v[1]=0;else{var E=y/2;v[0]=E,v[1]=-E}}}var A=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(r,A,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(r,n){var i=r.pstyle(n).value;switch(i){case"rectangle":return Ag;case"ellipse":return c2;case"roundrectangle":case"round-rectangle":return OT;case"bottom-round-rectangle":return l2;default:return}}},{key:"_getCornerRadius",value:function(r,n,i){var a=i.w,s=i.h;if(r.pstyle(n).value==="auto")return ff(a,s);var o=r.pstyle(n).pfValue,l=a/2,u=s/2;return Math.min(o,u,l)}},{key:"drawEdgeArrow",value:function(r,n,i){if(r.visible()){var a=r._private.rscratch,s,o,l;if(i==="source"?(s=a.arrowStartX,o=a.arrowStartY,l=a.srcArrowAngle):(s=a.arrowEndX,o=a.arrowEndY,l=a.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=r.pstyle(i+"-arrow-shape").value;if(u!=="none"){var h=r.pstyle(i+"-arrow-color").value,f=r.pstyle("opacity").value,d=r.pstyle("line-opacity").value,p=f*d,g=r.pstyle("width").pfValue,m=r.pstyle("arrow-scale").value,v=this.r.getArrowWidth(g,m),y=this.instanceCount,b=this.transformBuffer.getMatrixView(y);$oe(b),HT(b,b,[s,o]),TI(b,b,[v,v]),zoe(b,b,l),this.vertTypeBuffer.getView(y)[0]=rI;var w=this.indexBuffer.getView(y);Cg(n,w);var S=this.colorBuffer.getView(y);Zd(h,p,S),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,n){if(r.visible()){var i=this._getEdgePoints(r);if(i){var a=r.pstyle("opacity").value,s=r.pstyle("line-opacity").value,o=r.pstyle("width").pfValue,l=r.pstyle("line-color").value,u=a*s;if(i.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),i.length==4){var h=this.instanceCount;this.vertTypeBuffer.getView(h)[0]=Goe;var f=this.indexBuffer.getView(h);Cg(n,f);var d=this.colorBuffer.getView(h);Zd(l,u,d);var p=this.lineWidthBuffer.getView(h);p[0]=o;var g=this.pointAPointBBuffer.getView(h);g[0]=i[0],g[1]=i[1],g[2]=i[2],g[3]=i[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var m=0;m=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(r){var n=r._private.rscratch;return!(n.badLine||n.allpts==null||isNaN(n.allpts[0]))}},{key:"_getEdgePoints",value:function(r){var n=r._private.rscratch;if(this._isValidEdge(r)){var i=n.allpts;if(i.length==4)return i;var a=this._getNumSegments(r);return this._getCurveSegmentPoints(i,a)}}},{key:"_getNumSegments",value:function(r){var n=15;return Math.min(Math.max(n,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(r,n){if(r.length==4)return r;for(var i=Array((n+1)*2),a=0;a<=n;a++)if(a==0)i[0]=r[0],i[1]=r[1];else if(a==n)i[a*2]=r[r.length-2],i[a*2+1]=r[r.length-1];else{var s=a/n;this._setCurvePoint(r,s,i,a*2)}return i}},{key:"_setCurvePoint",value:function(r,n,i,a){if(r.length<=2)i[a]=r[0],i[a+1]=r[1];else{for(var s=Array(r.length-2),o=0;o0}},o=function(f){var d=f.pstyle("text-events").strValue==="yes";return d?ak.USE_BB:ak.IGNORE},l=function(f){var d=f.position(),p=d.x,g=d.y,m=f.outerWidth(),v=f.outerHeight();return{w:m,h:v,x1:p-m/2,y1:g-v/2}};r.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:l,isSimple:sFe,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:l,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:l,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:nI(e.getLabelKey,null),getBoundingBox:iI(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:i(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:nI(e.getSourceLabelKey,"source"),getBoundingBox:iI(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:i("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:a("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:nI(e.getTargetLabelKey,"target"),getBoundingBox:iI(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:i("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:a("target-label")});var u=I2(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(h,f){var d=!1;f&&f.length>0&&(d|=r.drawing.invalidate(f)),d&&u()}),AFe(r)};nI=function(e,r){return function(n){var i=e(n),a=Cce(n,r);return a.length>1?a.map(function(s,o){return"".concat(i,"_").concat(o)}):i}},iI=function(e,r){return function(n,i){var a=e(n);if(typeof i=="string"){var s=i.indexOf("_");if(s>0){var o=Number(i.substring(s+1)),l=Cce(n,r),u=a.h/l.length,h=u*o,f=a.y1+h;return{x1:a.x1,w:a.w,y1:f,h:u,yOffset:h}}}return a}};bf={};bf.drawPolygonPath=function(t,e,r,n,i,a){var s=n/2,o=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*a[0],r+o*a[1]);for(var l=1;l0&&s>0){p.clearRect(0,0,a,s),p.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(t.full)p.translate(-n.x1*u,-n.y1*u),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(n.x1*u,n.y1*u);else{var m=e.pan(),v={x:m.x*u,y:m.y*u};u*=e.zoom(),p.translate(v.x,v.y),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(-v.x,-v.y)}t.bg&&(p.globalCompositeOperation="destination-over",p.fillStyle=t.bg,p.rect(0,0,a,s),p.fill())}return d};B2.png=function(t){return Rce(t,this.bufferCanvasImage(t),"image/png")};B2.jpg=function(t){return Rce(t,this.bufferCanvasImage(t),"image/jpeg")};Ice={};Ice.nodeShapeImpl=function(t,e,r,n,i,a,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,o);case"barrel":return this.drawBarrelPath(e,r,n,i,a)}};BFe=Nce,xr=Nce.prototype;xr.CANVAS_LAYERS=3;xr.SELECT_BOX=0;xr.DRAG=1;xr.NODE=2;xr.WEBGL=3;xr.CANVAS_TYPES=["2d","2d","2d","webgl2"];xr.BUFFER_COUNT=3;xr.TEXTURE_BUFFER=0;xr.MOTIONBLUR_BUFFER_NODE=1;xr.MOTIONBLUR_BUFFER_DRAG=2;xr.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[xr.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[xr.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[xr.SELECT_BOX]=e;break;case"gc":r.data.gc=!0;break}};FFe=typeof Path2D<"u";xr.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};xr.usePaths=function(){return FFe&&this.pathsEnabled};xr.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};xr.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};xr.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":_i(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),i=n.document;r=i.createElement("canvas"),r.width=t,r.height=e}return r};[bce,Rc,Pu,jI,u0,xf,rs,Sce,bf,B2,Ice].forEach(function(t){Kt(xr,t)});$Fe=[{name:"null",impl:sce},{name:"base",impl:mce},{name:"canvas",impl:BFe}],zFe=[{type:"layout",extensions:hBe},{type:"renderer",extensions:$Fe}],Dce={},Mce={};SI=function(){if(arguments.length===2)return Pce.apply(null,arguments);if(arguments.length===3)return Oce.apply(null,arguments);if(arguments.length===4)return VFe.apply(null,arguments);if(arguments.length===5)return GFe.apply(null,arguments);Vn("Invalid extension access syntax")};E2.prototype.extension=SI;zFe.forEach(function(t){t.extensions.forEach(function(e){Oce(t.type,e.name,e.impl)})});sk=function(){if(!(this instanceof sk))return new sk;this.length=0},l0=sk.prototype;l0.instanceString=function(){return"stylesheet"};l0.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};l0.css=function(t,e){var r=this.length-1;if(qt(t))this[r].properties.push({name:t,value:e});else if(Vr(t))for(var n=t,i=Object.keys(n),a=0;a{(function(e,r){typeof F2=="object"&&typeof QI=="object"?QI.exports=r():typeof define=="function"&&define.amd?define([],r):typeof F2=="object"?F2.layoutBase=r():e.layoutBase=r()})(F2,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=26)}([function(t,e,r){"use strict";function n(){}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_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";function n(i){this.vGraphObject=i}t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(4);function u(f,d,p,g){p==null&&g==null&&(g=d),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;md&&(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)),this.labelHeight>p&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-p)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-p),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u},function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(6),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,v){n.call(this,v),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,v){if(m==null&&v==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var b=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(m.owner==v.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=v.owner?null:(b.source=m,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),m.edges.push(b),v!=m&&v.edges.push(b),b)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=m.edges.slice(),y,b=v.length,w=0;w-1&&E>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(T,1),y.target!=y.source&&y.target.edges.splice(E,1);var S=y.source.owner.getEdges().indexOf(y);if(S==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(S,1)}},d.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,m=i.MAX_VALUE,v,y,b,w=this.getNodes(),S=w.length,T=0;Tv&&(g=v),m>y&&(m=y)}return g==i.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?b=w[0].getParent().paddingLeft:b=this.margin,this.left=m-b,this.top=g-b,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=i.MAX_VALUE,v=-i.MAX_VALUE,y=i.MAX_VALUE,b=-i.MAX_VALUE,w,S,T,E,A,C=this.nodes,I=C.length,M=0;Mw&&(m=w),vT&&(y=T),bw&&(m=w),vT&&(y=T),b=this.nodes.length){var I=0;v.forEach(function(M){M.owner==g&&I++}),I==this.nodes.length&&(this.isConnected=!0)}},t.exports=d},function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(5),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=C,!1;if(uh)return o[0]=d,o[1]=u,o[2]=E,o[3]=f,!1;if(lh?(o[0]=m,o[1]=v,k=!0):(o[0]=g,o[1]=p,k=!0):_===N&&(l>h?(o[0]=d,o[1]=p,k=!0):(o[0]=y,o[1]=v,k=!0)),-D===N?h>l?(o[2]=A,o[3]=C,L=!0):(o[2]=E,o[3]=T,L=!0):D===N&&(h>l?(o[2]=S,o[3]=T,L=!0):(o[2]=I,o[3]=C,L=!0)),k&&L)return!1;if(l>h?u>f?(O=this.getCardinalDirection(_,N,4),P=this.getCardinalDirection(D,N,2)):(O=this.getCardinalDirection(-_,N,3),P=this.getCardinalDirection(-D,N,1)):u>f?(O=this.getCardinalDirection(-_,N,1),P=this.getCardinalDirection(-D,N,3)):(O=this.getCardinalDirection(_,N,2),P=this.getCardinalDirection(D,N,4)),!k)switch(O){case 1:G=p,B=l+-w/N,o[0]=B,o[1]=G;break;case 2:B=y,G=u+b*N,o[0]=B,o[1]=G;break;case 3:G=v,B=l+w/N,o[0]=B,o[1]=G;break;case 4:B=m,G=u+-b*N,o[0]=B,o[1]=G;break}if(!L)switch(P){case 1:U=T,$=h+-R/N,o[2]=$,o[3]=U;break;case 2:$=I,U=f+M*N,o[2]=$,o[3]=U;break;case 3:U=C,$=h+R/N,o[2]=$,o[3]=U;break;case 4:$=A,U=f+-M*N,o[2]=$,o[3]=U;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,v=l.y,y=void 0,b=void 0,w=void 0,S=void 0,T=void 0,E=void 0,A=void 0,C=void 0,I=void 0;return w=d-h,T=u-f,A=f*h-u*d,S=v-g,E=p-m,C=m*g-p*v,I=w*E-S*T,I===0?null:(y=(T*C-E*A)/I,b=(S*A-w*C)/I,new n(y,b))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n},function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function u(h,f){for(var d=0;d"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},t.exports=i},function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g0&&g;){for(w.push(T[0]);w.length>0&&g;){var E=w[0];w.splice(0,1),b.add(E);for(var A=E.getEdges(),y=0;y-1&&T.splice(R,1)}b=new Set,S=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,v=this.graphManager.calcLowestCommonAncestor(p.source,p.target),y=0;y0){for(var v=this.edgeToDummyNodes.get(m),y=0;y=0&&g.splice(C,1);var I=S.getNeighborsList();I.forEach(function(k){if(m.indexOf(k)<0){var L=v.get(k),_=L-1;_==1&&E.push(k),v.set(k,_)}})}m=m.concat(E),(g.length==1||g.length==2)&&(y=!0,b=g[0])}return b},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d},function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(4);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},t.exports=i},function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,v,y=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,p=0;pw||b>w)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*v)):(w=d.getEstimatedSize()*this.compoundGravityRangeFactor,(y>w||b>w)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=y.length||w>=y[0].length)){for(var S=0;Su}}]),o}();t.exports=s},function(t,e,r){"use strict";var n=function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o{(function(e,r){typeof $2=="object"&&typeof eN=="object"?eN.exports=r(JI()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof $2=="object"?$2.coseBase=r(JI()):e.coseBase=r(e.layoutBase)})($2,function(t){return function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=7)}([function(e,r){e.exports=t},function(e,r,n){"use strict";var i=n(0).FDLayoutConstants;function a(){}for(var s in i)a[s]=i[s];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a},function(e,r,n){"use strict";var i=n(0).FDLayoutEdge;function a(o,l,u){i.call(this,o,l,u)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a},function(e,r,n){"use strict";var i=n(0).LGraph;function a(o,l,u){i.call(this,o,l,u)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a},function(e,r,n){"use strict";var i=n(0).LGraphManager;function a(o){i.call(this,o)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a},function(e,r,n){"use strict";var i=n(0).FDLayoutNode,a=n(0).IMath;function s(l,u,h,f){i.call(this,l,u,h,f)}s.prototype=Object.create(i.prototype);for(var o in i)s[o]=i[o];s.prototype.move=function(){var l=this.graphManager.getLayout();this.displacementX=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementX=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementY=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),l.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(l,u){for(var h=this.getChild().getNodes(),f,d=0;d0)this.positionNodesRadially(T);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(C){return E.has(C)});this.graphManager.setAllNodesToApplyGravitation(A),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},w.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var T=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(I){return T.has(I)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var A=!this.isTreeGrowing&&!this.isGrowthFinished,C=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(A,C),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},w.prototype.getPositionsData=function(){for(var T=this.graphManager.getAllNodes(),E={},A=0;A1){var k;for(k=0;kC&&(C=Math.floor(R.y)),M=Math.floor(R.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(f.WORLD_CENTER_X-R.x/2,f.WORLD_CENTER_Y-R.y/2))},w.radialLayout=function(T,E,A){var C=Math.max(this.maxDiagonalInTree(T),u.DEFAULT_RADIAL_SEPARATION);w.branchRadialLayout(E,null,0,359,0,C);var I=y.calculateBounds(T),M=new b;M.setDeviceOrgX(I.getMinX()),M.setDeviceOrgY(I.getMinY()),M.setWorldOrgX(A.x),M.setWorldOrgY(A.y);for(var R=0;R1;){var X=U[0];U.splice(0,1);var ee=O.indexOf(X);ee>=0&&O.splice(ee,1),G--,P--}E!=null?$=(O.indexOf(U[0])+1)%G:$=0;for(var Y=Math.abs(C-A)/P,oe=$;B!=P;oe=++oe%G){var Q=O[oe].getOtherEnd(T);if(Q!=E){var ue=(A+B*Y)%360,re=(ue+Y)%360;w.branchRadialLayout(Q,T,ue,re,I+M,M),B++}}},w.maxDiagonalInTree=function(T){for(var E=m.MIN_VALUE,A=0;AE&&(E=I)}return E},w.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},w.prototype.groupZeroDegreeMembers=function(){var T=this,E={};this.memberGroups={},this.idToDummyNode={};for(var A=[],C=this.graphManager.getAllNodes(),I=0;I"u"&&(E[k]=[]),E[k]=E[k].concat(M)}Object.keys(E).forEach(function(L){if(E[L].length>1){var _="DummyCompound_"+L;T.memberGroups[_]=E[L];var D=E[L][0].getParent(),N=new o(T.graphManager);N.id=_,N.paddingLeft=D.paddingLeft||0,N.paddingRight=D.paddingRight||0,N.paddingBottom=D.paddingBottom||0,N.paddingTop=D.paddingTop||0,T.idToDummyNode[_]=N;var O=T.getGraphManager().add(T.newGraph(),N),P=D.getChild();P.add(N);for(var B=0;B=0;T--){var E=this.compoundOrder[T],A=E.id,C=E.paddingLeft,I=E.paddingTop;this.adjustLocations(this.tiledMemberPack[A],E.rect.x,E.rect.y,C,I)}},w.prototype.repopulateZeroDegreeMembers=function(){var T=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(A){var C=T.idToDummyNode[A],I=C.paddingLeft,M=C.paddingTop;T.adjustLocations(E[A],C.rect.x,C.rect.y,I,M)})},w.prototype.getToBeTiled=function(T){var E=T.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var A=T.getChild();if(A==null)return this.toBeTiled[E]=!1,!1;for(var C=A.getNodes(),I=0;I0)return this.toBeTiled[E]=!1,!1;if(M.getChild()==null){this.toBeTiled[M.id]=!1;continue}if(!this.getToBeTiled(M))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},w.prototype.getNodeDegree=function(T){for(var E=T.id,A=T.getEdges(),C=0,I=0;IL&&(L=D.rect.height)}A+=L+T.verticalPadding}},w.prototype.tileCompoundMembers=function(T,E){var A=this;this.tiledMemberPack=[],Object.keys(T).forEach(function(C){var I=E[C];A.tiledMemberPack[C]=A.tileNodes(T[C],I.paddingLeft+I.paddingRight),I.rect.width=A.tiledMemberPack[C].width,I.rect.height=A.tiledMemberPack[C].height})},w.prototype.tileNodes=function(T,E){var A=u.TILING_PADDING_VERTICAL,C=u.TILING_PADDING_HORIZONTAL,I={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:A,horizontalPadding:C};T.sort(function(k,L){return k.rect.width*k.rect.height>L.rect.width*L.rect.height?-1:k.rect.width*k.rect.height0&&(R+=T.horizontalPadding),T.rowWidth[A]=R,T.width0&&(k+=T.verticalPadding);var L=0;k>T.rowHeight[A]&&(L=T.rowHeight[A],T.rowHeight[A]=k,L=T.rowHeight[A]-L),T.height+=L,T.rows[A].push(E)},w.prototype.getShortestRowIndex=function(T){for(var E=-1,A=Number.MAX_VALUE,C=0;CA&&(E=C,A=T.rowWidth[C]);return E},w.prototype.canAddHorizontal=function(T,E,A){var C=this.getShortestRowIndex(T);if(C<0)return!0;var I=T.rowWidth[C];if(I+T.horizontalPadding+E<=T.width)return!0;var M=0;T.rowHeight[C]0&&(M=A+T.verticalPadding-T.rowHeight[C]);var R;T.width-I>=E+T.horizontalPadding?R=(T.height+M)/(I+E+T.horizontalPadding):R=(T.height+M)/T.width,M=A+T.verticalPadding;var k;return T.widthM&&E!=A){C.splice(-1,1),T.rows[A].push(I),T.rowWidth[E]=T.rowWidth[E]-M,T.rowWidth[A]=T.rowWidth[A]+M,T.width=T.rowWidth[instance.getLongestRowIndex(T)];for(var R=Number.MIN_VALUE,k=0;kR&&(R=C[k].height);E>0&&(R+=T.verticalPadding);var L=T.rowHeight[E]+T.rowHeight[A];T.rowHeight[E]=R,T.rowHeight[A]0)for(var P=I;P<=M;P++)O[0]+=this.grid[P][R-1].length+this.grid[P][R].length-1;if(M0)for(var P=R;P<=k;P++)O[3]+=this.grid[I-1][P].length+this.grid[I][P].length-1;for(var B=m.MAX_VALUE,G,$,U=0;U{(function(e,r){typeof z2=="object"&&typeof rN=="object"?rN.exports=r(tN()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof z2=="object"?z2.cytoscapeCoseBilkent=r(tN()):e.cytoscapeCoseBilkent=r(e.coseBase)})(z2,function(t){return function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=1)}([function(e,r){e.exports=t},function(e,r,n){"use strict";var i=n(0).layoutBase.LayoutConstants,a=n(0).layoutBase.FDLayoutConstants,s=n(0).CoSEConstants,o=n(0).CoSELayout,l=n(0).CoSENode,u=n(0).layoutBase.PointD,h=n(0).layoutBase.DimensionD,f={ready:function(){},stop:function(){},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 d(v,y){var b={};for(var w in v)b[w]=v[w];for(var w in y)b[w]=y[w];return b}function p(v){this.options=d(f,v),g(this.options)}var g=function(y){y.nodeRepulsion!=null&&(s.DEFAULT_REPULSION_STRENGTH=a.DEFAULT_REPULSION_STRENGTH=y.nodeRepulsion),y.idealEdgeLength!=null&&(s.DEFAULT_EDGE_LENGTH=a.DEFAULT_EDGE_LENGTH=y.idealEdgeLength),y.edgeElasticity!=null&&(s.DEFAULT_SPRING_STRENGTH=a.DEFAULT_SPRING_STRENGTH=y.edgeElasticity),y.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=y.nestingFactor),y.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=a.DEFAULT_GRAVITY_STRENGTH=y.gravity),y.numIter!=null&&(s.MAX_ITERATIONS=a.MAX_ITERATIONS=y.numIter),y.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=a.DEFAULT_GRAVITY_RANGE_FACTOR=y.gravityRange),y.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=y.gravityCompound),y.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=y.gravityRangeCompound),y.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.DEFAULT_COOLING_FACTOR_INCREMENTAL=y.initialEnergyOnIncremental),y.quality=="draft"?i.QUALITY=0:y.quality=="proof"?i.QUALITY=2:i.QUALITY=1,s.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=y.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!y.randomize,s.ANIMATE=a.ANIMATE=i.ANIMATE=y.animate,s.TILE=y.tile,s.TILING_PADDING_VERTICAL=typeof y.tilingPaddingVertical=="function"?y.tilingPaddingVertical.call():y.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof y.tilingPaddingHorizontal=="function"?y.tilingPaddingHorizontal.call():y.tilingPaddingHorizontal};p.prototype.run=function(){var v,y,b=this.options,w=this.idToLNode={},S=this.layout=new o,T=this;T.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var E=S.newGraphManager();this.gm=E;var A=this.options.eles.nodes(),C=this.options.eles.edges();this.root=E.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(A),S);for(var I=0;I0){var k;k=b.getGraphManager().add(b.newGraph(),A),this.processChildrenList(k,E,b)}}},p.prototype.stop=function(){return this.stopped=!0,this};var m=function(y){y("layout","cose-bilkent",p)};typeof cytoscape<"u"&&m(cytoscape),e.exports=m}])})});var Hce={};hr(Hce,{render:()=>WFe});function $ce(t,e){t.forEach(r=>{let n={id:r.id,labelText:r.label,height:r.height,width:r.width,padding:r.padding??0};Object.keys(r).forEach(i=>{["id","label","height","width","padding","x","y"].includes(i)||(n[i]=r[i])}),e.add({group:"nodes",data:n,position:{x:r.x??0,y:r.y??0}})})}function zce(t,e){t.forEach(r=>{let n={id:r.id,source:r.start,target:r.end};Object.keys(r).forEach(i=>{["id","start","end"].includes(i)||(n[i]=r[i])}),e.add({group:"edges",data:n})})}function Gce(t){return new Promise(e=>{let r=He("body").append("div").attr("id","cy").attr("style","display:none"),n=$o({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),$ce(t.nodes,n),zce(t.edges,n),n.nodes().forEach(function(a){a.layoutDimensions=()=>{let s=a.data();return{w:s.width,h:s.height}}});let i={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(i).run(),n.ready(a=>{J.info("Cytoscape ready",a),e(n)})})}function Vce(t){return t.nodes().map(e=>{let r=e.data(),n=e.position(),i={id:r.id,x:n.x,y:n.y};return Object.keys(r).forEach(a=>{a!=="id"&&(i[a]=r[a])}),i})}function Uce(t){return t.edges().map(e=>{let r=e.data(),n=e._private.rscratch,i={id:r.id,source:r.source,target:r.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(r).forEach(a=>{["id","source","target"].includes(a)||(i[a]=r[a])}),i})}async function qce(t,e){J.debug("Starting cose-bilkent layout algorithm");try{Wce(t);let r=await Gce(t),n=Vce(r),i=Uce(r);return J.debug(`Layout completed: ${n.length} nodes, ${i.length} edges`),{nodes:n,edges:i}}catch(r){throw J.error("Error in cose-bilkent layout algorithm:",r),r}}function Wce(t){if(!t)throw new Error("Layout data is required");if(!t.config)throw new Error("Configuration is required in layout data");if(!t.rootNode)throw new Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw new Error("Edges array is required in layout data");return!0}var Fce,qFe,WFe,Yce=F(()=>{rr();ZI();Fce=Fa(Bce(),1);cr();$o.use(Fce.default);x($ce,"addNodes");x(zce,"addEdges");x(Gce,"createCytoscapeInstance");x(Vce,"extractPositionedNodes");x(Uce,"extractPositionedEdges");x(qce,"executeCoseBilkentLayout");x(Wce,"validateLayoutData");qFe=x(async(t,e,{insertCluster:r,insertEdge:n,insertEdgeLabel:i,insertMarkers:a,insertNode:s,log:o,positionEdgeLabel:l},{algorithm:u})=>{let h={},f={},d=e.select("g");a(d,t.markers,t.type,t.diagramId);let p=d.insert("g").attr("class","subgraphs"),g=d.insert("g").attr("class","edgePaths"),m=d.insert("g").attr("class","edgeLabels"),v=d.insert("g").attr("class","nodes");o.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(t.nodes.map(async w=>{if(w.isGroup){let S={...w};f[w.id]=S,h[w.id]=S,await r(p,w)}else{let S={...w};h[w.id]=S;let T=await s(v,w,{config:t.config,dir:t.direction||"TB"}),E=T.node().getBBox();S.width=E.width,S.height=E.height,S.domId=T,o.debug(`Node ${w.id} dimensions: ${E.width}x${E.height}`)}})),o.debug("Running cose-bilkent layout algorithm");let y={...t,nodes:t.nodes.map(w=>{let S=h[w.id];return{...w,width:S.width,height:S.height}})},b=await qce(y,t.config);o.debug("Positioning nodes based on layout results"),b.nodes.forEach(w=>{let S=h[w.id];S?.domId&&(S.domId.attr("transform",`translate(${w.x}, ${w.y})`),S.x=w.x,S.y=w.y,o.debug(`Positioned node ${S.id} at center (${w.x}, ${w.y})`))}),b.edges.forEach(w=>{let S=t.edges.find(T=>T.id===w.id);S&&(S.points=[{x:w.startX,y:w.startY},{x:w.midX,y:w.midY},{x:w.endX,y:w.endY}])}),o.debug("Inserting and positioning edges"),await Promise.all(t.edges.map(async w=>{let S=await i(m,w),T=h[w.start??""],E=h[w.end??""];if(T&&E){let A=b.edges.find(C=>C.id===w.id);if(A){o.debug("APA01 positionedEdge",A);let C={...w},I=n(g,C,f,t.type,T,E,t.diagramId);l(C,I)}else{let C={...w,points:[{x:T.x||0,y:T.y||0},{x:E.x||0,y:E.y||0}]},I=n(g,C,f,t.type,T,E,t.diagramId);l(C,I)}}})),o.debug("Cose-bilkent rendering completed")},"render"),WFe=qFe});var HFe,G2,nN,YFe,zo,Ic,Go=F(()=>{Io();Ls();hn();vr();rr();HFe={common:Je,getConfig:or,insertCluster:tg,insertEdge:yw,insertEdgeLabel:mw,insertMarkers:xw,insertNode:Fd,interpolateToCurve:z5,labelHelper:jt,log:J,positionEdgeLabel:vw},G2={},nN=x(t=>{for(let e of t)G2[e.name]=e},"registerLayoutLoaders"),YFe=x(()=>{nN([{name:"dagre",loader:x(async()=>await Promise.resolve().then(()=>(vae(),mae)),"loader")},{name:"cose-bilkent",loader:x(async()=>await Promise.resolve().then(()=>(Yce(),Hce)),"loader")}])},"registerDefaultLayoutLoaders");YFe();zo=x(async(t,e)=>{if(!(t.layoutAlgorithm in G2))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=G2[t.layoutAlgorithm];return(await r.loader()).render(t,e,HFe,{algorithm:r.algorithm})},"render"),Ic=x((t="",{fallback:e="dagre"}={})=>{if(t in G2)return t;if(e in G2)return J.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")});var sN,h0,Ok,due,Pk,Bk,La,Fk,$k=F(()=>{vr();rr();sN=Fa(Np(),1),h0=x((t,e)=>{let 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),e.attrs!==void 0)for(let n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),Ok=x((t,e)=>{let r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};h0(t,r).lower()},"drawBackgroundRect"),due=x((t,e)=>{let r=e.text.replace(rd," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),Pk=x((t,e,r,n)=>{let i=t.append("image");i.attr("x",e),i.attr("y",r);let a=(0,sN.sanitizeUrl)(n);i.attr("xlink:href",a)},"drawImage"),Bk=x((t,e,r,n)=>{let i=t.append("use");i.attr("x",e),i.attr("y",r);let a=(0,sN.sanitizeUrl)(n);i.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),La=x(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Fk=x(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")});var Sue={};hr(Sue,{diagram:()=>V$e});function Wo(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=v_(e[t].text,i,n),e[t].textLines=e[t].text.split(Je.lineBreakRegex).length,e[t].width=i,e[t].height=Dy(e[t].text,n);else{let a=e[t].text.split(Je.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(let o of a)e[t].width=Math.max(ea(o,n),e[t].width),s=Dy(o,n),e[t].height=e[t].height+s}}function dN(t,e,r,n,i){let a=new Tue(i);a.data.widthLimit=r.data.widthLimit/Math.min(lN,n.length);for(let[s,o]of n.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&Ft.wrap,h=zk(Ft);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",Wo("label",o,u,h,a.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let g=zk(Ft);Wo("type",o,u,g,a.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let g=zk(Ft);g.fontSize=g.fontSize-2,Wo("descr",o,u,g,a.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(s==0||s%lN===0){let g=r.data.startx+Ft.diagramMarginX,m=r.data.stopy+Ft.diagramMarginY+l;a.setData(g,g,m,m)}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+Ft.diagramMarginX:a.data.startx,m=a.data.starty;a.setData(g,g,m,m)}a.name=o.alias;let f=i.db.getC4ShapeArray(o.alias),d=i.db.getC4ShapeKeys(o.alias);d.length>0&&Eue(a,t,f,d),e=o.alias;let p=i.db.getBoundaries(e);p.length>0&&dN(t,e,a,p,i),o.alias!=="global"&&kue(t,o,a),r.data.stopy=Math.max(a.data.stopy+Ft.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+Ft.c4ShapeMargin,r.data.stopx),qk=Math.max(qk,r.data.stopx),Wk=Math.max(Wk,r.data.stopy)}}var xue,Gk,jFe,kl,kf,ns,Tl,Dc,H2,uN,hN,Vk,Uk,mue,KFe,ZFe,QFe,JFe,e$e,t$e,r$e,n$e,i$e,a$e,s$e,o$e,l$e,c$e,u$e,h$e,f$e,vue,d$e,p$e,yue,g$e,m$e,v$e,y$e,Ef,x$e,b$e,w$e,T$e,k$e,oN,fN,bue,E$e,S$e,C$e,A$e,_$e,L$e,R$e,I$e,N$e,D$e,M$e,O$e,Fu,Nc,qk,Wk,wue,lN,Ft,Tue,cN,W2,zk,P$e,kue,Eue,qo,pue,B$e,F$e,$$e,gue,z$e,G$e,V$e,Cue=F(()=>{$k();hn();vr();rr();cr();xue=Fa(Np(),1),Gk=function(){var t=x(function(qe,Le,Me,Ne){for(Me=Me||{},Ne=qe.length;Ne--;Me[qe[Ne]]=Le);return Me},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],s=[1,63],o=[1,64],l=[1,65],u=[1,66],h=[1,67],f=[1,68],d=[1,69],p=[1,29],g=[1,30],m=[1,31],v=[1,32],y=[1,33],b=[1,34],w=[1,35],S=[1,36],T=[1,37],E=[1,38],A=[1,39],C=[1,40],I=[1,41],M=[1,42],R=[1,43],k=[1,44],L=[1,45],_=[1,46],D=[1,47],N=[1,48],O=[1,50],P=[1,51],B=[1,52],G=[1,53],$=[1,54],U=[1,55],X=[1,56],ee=[1,57],Y=[1,58],oe=[1,59],Q=[1,60],ue=[14,42],re=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],te=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Z=[1,82],j=[1,83],ae=[1,84],K=[1,85],de=[12,14,42],ne=[12,14,33,42],be=[12,14,33,42,76,77,79,80],W=[12,33],Ve=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],pe={trace:x(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:x(function(Le,Me,Ne,Ce,Fe,fe,ye){var H=fe.length-1;switch(Fe){case 3:Ce.setDirection("TB");break;case 4:Ce.setDirection("BT");break;case 5:Ce.setDirection("RL");break;case 6:Ce.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:Ce.setC4Type(fe[H-3]);break;case 19:Ce.setTitle(fe[H].substring(6)),this.$=fe[H].substring(6);break;case 20:Ce.setAccDescription(fe[H].substring(15)),this.$=fe[H].substring(15);break;case 21:this.$=fe[H].trim(),Ce.setTitle(this.$);break;case 22:case 23:this.$=fe[H].trim(),Ce.setAccDescription(this.$);break;case 28:fe[H].splice(2,0,"ENTERPRISE"),Ce.addPersonOrSystemBoundary(...fe[H]),this.$=fe[H];break;case 29:fe[H].splice(2,0,"SYSTEM"),Ce.addPersonOrSystemBoundary(...fe[H]),this.$=fe[H];break;case 30:Ce.addPersonOrSystemBoundary(...fe[H]),this.$=fe[H];break;case 31:fe[H].splice(2,0,"CONTAINER"),Ce.addContainerBoundary(...fe[H]),this.$=fe[H];break;case 32:Ce.addDeploymentNode("node",...fe[H]),this.$=fe[H];break;case 33:Ce.addDeploymentNode("nodeL",...fe[H]),this.$=fe[H];break;case 34:Ce.addDeploymentNode("nodeR",...fe[H]),this.$=fe[H];break;case 35:Ce.popBoundaryParseStack();break;case 39:Ce.addPersonOrSystem("person",...fe[H]),this.$=fe[H];break;case 40:Ce.addPersonOrSystem("external_person",...fe[H]),this.$=fe[H];break;case 41:Ce.addPersonOrSystem("system",...fe[H]),this.$=fe[H];break;case 42:Ce.addPersonOrSystem("system_db",...fe[H]),this.$=fe[H];break;case 43:Ce.addPersonOrSystem("system_queue",...fe[H]),this.$=fe[H];break;case 44:Ce.addPersonOrSystem("external_system",...fe[H]),this.$=fe[H];break;case 45:Ce.addPersonOrSystem("external_system_db",...fe[H]),this.$=fe[H];break;case 46:Ce.addPersonOrSystem("external_system_queue",...fe[H]),this.$=fe[H];break;case 47:Ce.addContainer("container",...fe[H]),this.$=fe[H];break;case 48:Ce.addContainer("container_db",...fe[H]),this.$=fe[H];break;case 49:Ce.addContainer("container_queue",...fe[H]),this.$=fe[H];break;case 50:Ce.addContainer("external_container",...fe[H]),this.$=fe[H];break;case 51:Ce.addContainer("external_container_db",...fe[H]),this.$=fe[H];break;case 52:Ce.addContainer("external_container_queue",...fe[H]),this.$=fe[H];break;case 53:Ce.addComponent("component",...fe[H]),this.$=fe[H];break;case 54:Ce.addComponent("component_db",...fe[H]),this.$=fe[H];break;case 55:Ce.addComponent("component_queue",...fe[H]),this.$=fe[H];break;case 56:Ce.addComponent("external_component",...fe[H]),this.$=fe[H];break;case 57:Ce.addComponent("external_component_db",...fe[H]),this.$=fe[H];break;case 58:Ce.addComponent("external_component_queue",...fe[H]),this.$=fe[H];break;case 60:Ce.addRel("rel",...fe[H]),this.$=fe[H];break;case 61:Ce.addRel("birel",...fe[H]),this.$=fe[H];break;case 62:Ce.addRel("rel_u",...fe[H]),this.$=fe[H];break;case 63:Ce.addRel("rel_d",...fe[H]),this.$=fe[H];break;case 64:Ce.addRel("rel_l",...fe[H]),this.$=fe[H];break;case 65:Ce.addRel("rel_r",...fe[H]),this.$=fe[H];break;case 66:Ce.addRel("rel_b",...fe[H]),this.$=fe[H];break;case 67:fe[H].splice(0,1),Ce.addRel("rel",...fe[H]),this.$=fe[H];break;case 68:Ce.updateElStyle("update_el_style",...fe[H]),this.$=fe[H];break;case 69:Ce.updateRelStyle("update_rel_style",...fe[H]),this.$=fe[H];break;case 70:Ce.updateLayoutConfig("update_layout_config",...fe[H]),this.$=fe[H];break;case 71:this.$=[fe[H]];break;case 72:fe[H].unshift(fe[H-1]),this.$=fe[H];break;case 73:case 75:this.$=fe[H].trim();break;case 74:let he={};he[fe[H-1].trim()]=fe[H].trim(),this.$=he;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:b,50:w,51:S,52:T,53:E,54:A,55:C,56:I,57:M,58:R,59:k,60:L,61:_,62:D,63:N,64:O,65:P,66:B,67:G,68:$,69:U,70:X,71:ee,72:Y,73:oe,74:Q},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:b,50:w,51:S,52:T,53:E,54:A,55:C,56:I,57:M,58:R,59:k,60:L,61:_,62:D,63:N,64:O,65:P,66:B,67:G,68:$,69:U,70:X,71:ee,72:Y,73:oe,74:Q},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:b,50:w,51:S,52:T,53:E,54:A,55:C,56:I,57:M,58:R,59:k,60:L,61:_,62:D,63:N,64:O,65:P,66:B,67:G,68:$,69:U,70:X,71:ee,72:Y,73:oe,74:Q},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:b,50:w,51:S,52:T,53:E,54:A,55:C,56:I,57:M,58:R,59:k,60:L,61:_,62:D,63:N,64:O,65:P,66:B,67:G,68:$,69:U,70:X,71:ee,72:Y,73:oe,74:Q},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:b,50:w,51:S,52:T,53:E,54:A,55:C,56:I,57:M,58:R,59:k,60:L,61:_,62:D,63:N,64:O,65:P,66:B,67:G,68:$,69:U,70:X,71:ee,72:Y,73:oe,74:Q},{14:[1,74]},t(ue,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:g,46:m,47:v,48:y,49:b,50:w,51:S,52:T,53:E,54:A,55:C,56:I,57:M,58:R,59:k,60:L,61:_,62:D,63:N,64:O,65:P,66:B,67:G,68:$,69:U,70:X,71:ee,72:Y,73:oe,74:Q}),t(ue,[2,14]),t(re,[2,16],{12:[1,76]}),t(ue,[2,36],{12:[1,77]}),t(te,[2,19]),t(te,[2,20]),{25:[1,78]},{27:[1,79]},t(te,[2,23]),{35:80,75:81,76:Z,77:j,79:ae,80:K},{35:86,75:81,76:Z,77:j,79:ae,80:K},{35:87,75:81,76:Z,77:j,79:ae,80:K},{35:88,75:81,76:Z,77:j,79:ae,80:K},{35:89,75:81,76:Z,77:j,79:ae,80:K},{35:90,75:81,76:Z,77:j,79:ae,80:K},{35:91,75:81,76:Z,77:j,79:ae,80:K},{35:92,75:81,76:Z,77:j,79:ae,80:K},{35:93,75:81,76:Z,77:j,79:ae,80:K},{35:94,75:81,76:Z,77:j,79:ae,80:K},{35:95,75:81,76:Z,77:j,79:ae,80:K},{35:96,75:81,76:Z,77:j,79:ae,80:K},{35:97,75:81,76:Z,77:j,79:ae,80:K},{35:98,75:81,76:Z,77:j,79:ae,80:K},{35:99,75:81,76:Z,77:j,79:ae,80:K},{35:100,75:81,76:Z,77:j,79:ae,80:K},{35:101,75:81,76:Z,77:j,79:ae,80:K},{35:102,75:81,76:Z,77:j,79:ae,80:K},{35:103,75:81,76:Z,77:j,79:ae,80:K},{35:104,75:81,76:Z,77:j,79:ae,80:K},t(de,[2,59]),{35:105,75:81,76:Z,77:j,79:ae,80:K},{35:106,75:81,76:Z,77:j,79:ae,80:K},{35:107,75:81,76:Z,77:j,79:ae,80:K},{35:108,75:81,76:Z,77:j,79:ae,80:K},{35:109,75:81,76:Z,77:j,79:ae,80:K},{35:110,75:81,76:Z,77:j,79:ae,80:K},{35:111,75:81,76:Z,77:j,79:ae,80:K},{35:112,75:81,76:Z,77:j,79:ae,80:K},{35:113,75:81,76:Z,77:j,79:ae,80:K},{35:114,75:81,76:Z,77:j,79:ae,80:K},{35:115,75:81,76:Z,77:j,79:ae,80:K},{20:116,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:v,48:y,49:b,50:w,51:S,52:T,53:E,54:A,55:C,56:I,57:M,58:R,59:k,60:L,61:_,62:D,63:N,64:O,65:P,66:B,67:G,68:$,69:U,70:X,71:ee,72:Y,73:oe,74:Q},{12:[1,118],33:[1,117]},{35:119,75:81,76:Z,77:j,79:ae,80:K},{35:120,75:81,76:Z,77:j,79:ae,80:K},{35:121,75:81,76:Z,77:j,79:ae,80:K},{35:122,75:81,76:Z,77:j,79:ae,80:K},{35:123,75:81,76:Z,77:j,79:ae,80:K},{35:124,75:81,76:Z,77:j,79:ae,80:K},{35:125,75:81,76:Z,77:j,79:ae,80:K},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ue,[2,15]),t(re,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(ue,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:i,28:a,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:g,46:m,47:v,48:y,49:b,50:w,51:S,52:T,53:E,54:A,55:C,56:I,57:M,58:R,59:k,60:L,61:_,62:D,63:N,64:O,65:P,66:B,67:G,68:$,69:U,70:X,71:ee,72:Y,73:oe,74:Q}),t(te,[2,21]),t(te,[2,22]),t(de,[2,39]),t(ne,[2,71],{75:81,35:132,76:Z,77:j,79:ae,80:K}),t(be,[2,73]),{78:[1,133]},t(be,[2,75]),t(be,[2,76]),t(de,[2,40]),t(de,[2,41]),t(de,[2,42]),t(de,[2,43]),t(de,[2,44]),t(de,[2,45]),t(de,[2,46]),t(de,[2,47]),t(de,[2,48]),t(de,[2,49]),t(de,[2,50]),t(de,[2,51]),t(de,[2,52]),t(de,[2,53]),t(de,[2,54]),t(de,[2,55]),t(de,[2,56]),t(de,[2,57]),t(de,[2,58]),t(de,[2,60]),t(de,[2,61]),t(de,[2,62]),t(de,[2,63]),t(de,[2,64]),t(de,[2,65]),t(de,[2,66]),t(de,[2,67]),t(de,[2,68]),t(de,[2,69]),t(de,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(W,[2,28]),t(W,[2,29]),t(W,[2,30]),t(W,[2,31]),t(W,[2,32]),t(W,[2,33]),t(W,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(re,[2,18]),t(ue,[2,38]),t(ne,[2,72]),t(be,[2,74]),t(de,[2,24]),t(de,[2,35]),t(Ve,[2,25]),t(Ve,[2,26],{12:[1,138]}),t(Ve,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:x(function(Le,Me){if(Me.recoverable)this.trace(Le);else{var Ne=new Error(Le);throw Ne.hash=Me,Ne}},"parseError"),parse:x(function(Le){var Me=this,Ne=[0],Ce=[],Fe=[null],fe=[],ye=this.table,H="",he=0,z=0,se=0,le=2,ke=1,ve=fe.slice.call(arguments,1),me=Object.create(this.lexer),Ie={yy:{}};for(var _e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_e)&&(Ie.yy[_e]=this.yy[_e]);me.setInput(Le,Ie.yy),Ie.yy.lexer=me,Ie.yy.parser=this,typeof me.yylloc>"u"&&(me.yylloc={});var ze=me.yylloc;fe.push(ze);var Xe=me.options&&me.options.ranges;typeof Ie.yy.parseError=="function"?this.parseError=Ie.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(st){Ne.length=Ne.length-2*st,Fe.length=Fe.length-st,fe.length=fe.length-st}x(ft,"popStack");function We(){var st;return st=Ce.pop()||me.lex()||ke,typeof st!="number"&&(st instanceof Array&&(Ce=st,st=Ce.pop()),st=Me.symbols_[st]||st),st}x(We,"lex");for(var Oe,Ke,Ue,nt,Dt,ut,kt={},ot,Qe,dt,gt;;){if(Ue=Ne[Ne.length-1],this.defaultActions[Ue]?nt=this.defaultActions[Ue]:((Oe===null||typeof Oe>"u")&&(Oe=We()),nt=ye[Ue]&&ye[Ue][Oe]),typeof nt>"u"||!nt.length||!nt[0]){var ht="";gt=[];for(ot in ye[Ue])this.terminals_[ot]&&ot>le&>.push("'"+this.terminals_[ot]+"'");me.showPosition?ht="Parse error on line "+(he+1)+`: `+me.showPosition()+` Expecting `+gt.join(", ")+", got '"+(this.terminals_[Oe]||Oe)+"'":ht="Parse error on line "+(he+1)+": Unexpected "+(Oe==ke?"end of input":"'"+(this.terminals_[Oe]||Oe)+"'"),this.parseError(ht,{text:me.match,token:this.terminals_[Oe]||Oe,line:me.yylineno,loc:ze,expected:gt})}if(nt[0]instanceof Array&&nt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ue+", token: "+Oe);switch(nt[0]){case 1:Ne.push(Oe),Fe.push(me.yytext),fe.push(me.yylloc),Ne.push(nt[1]),Oe=null,Ke?(Oe=Ke,Ke=null):(z=me.yyleng,H=me.yytext,he=me.yylineno,ze=me.yylloc,se>0&&se--);break;case 2:if(Qe=this.productions_[nt[1]][1],kt.$=Fe[Fe.length-Qe],kt._$={first_line:fe[fe.length-(Qe||1)].first_line,last_line:fe[fe.length-1].last_line,first_column:fe[fe.length-(Qe||1)].first_column,last_column:fe[fe.length-1].last_column},Xe&&(kt._$.range=[fe[fe.length-(Qe||1)].range[0],fe[fe.length-1].range[1]]),ut=this.performAction.apply(kt,[H,z,he,Ie.yy,nt[1],Fe,fe].concat(ve)),typeof ut<"u")return ut;Qe&&(Ne=Ne.slice(0,-1*Qe*2),Fe=Fe.slice(0,-1*Qe),fe=fe.slice(0,-1*Qe)),Ne.push(this.productions_[nt[1]][0]),Fe.push(kt.$),fe.push(kt._$),dt=ye[Ne[Ne.length-2]][Ne[Ne.length-1]],Ne.push(dt);break;case 3:return!0}}return!0},"parse")},Be=function(){var qe={EOF:1,parseError:x(function(Me,Ne){if(this.yy.parser)this.yy.parser.parseError(Me,Ne);else throw new Error(Me)},"parseError"),setInput:x(function(Le,Me){return this.yy=Me||this.yy||{},this._input=Le,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var Le=this._input[0];this.yytext+=Le,this.yyleng++,this.offset++,this.match+=Le,this.matched+=Le;var Me=Le.match(/(?:\r\n?|\n).*/g);return Me?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Le},"input"),unput:x(function(Le){var Me=Le.length,Ne=Le.split(/(?:\r\n?|\n)/g);this._input=Le+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Me),this.offset-=Me;var Ce=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ne.length-1&&(this.yylineno-=Ne.length-1);var Fe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ne?(Ne.length===Ce.length?this.yylloc.first_column:0)+Ce[Ce.length-Ne.length].length-Ne[0].length:this.yylloc.first_column-Me},this.options.ranges&&(this.yylloc.range=[Fe[0],Fe[0]+this.yyleng-Me]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(Le){this.unput(this.match.slice(Le))},"less"),pastInput:x(function(){var Le=this.matched.substr(0,this.matched.length-this.match.length);return(Le.length>20?"...":"")+Le.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var Le=this.match;return Le.length<20&&(Le+=this._input.substr(0,20-Le.length)),(Le.substr(0,20)+(Le.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var Le=this.pastInput(),Me=new Array(Le.length+1).join("-");return Le+this.upcomingInput()+` `+Me+"^"},"showPosition"),test_match:x(function(Le,Me){var Ne,Ce,Fe;if(this.options.backtrack_lexer&&(Fe={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&&(Fe.yylloc.range=this.yylloc.range.slice(0))),Ce=Le[0].match(/(?:\r\n?|\n).*/g),Ce&&(this.yylineno+=Ce.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ce?Ce[Ce.length-1].length-Ce[Ce.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Le[0].length},this.yytext+=Le[0],this.match+=Le[0],this.matches=Le,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(Le[0].length),this.matched+=Le[0],Ne=this.performAction.call(this,this.yy,this,Me,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ne)return Ne;if(this._backtrack){for(var fe in Fe)this[fe]=Fe[fe];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Le,Me,Ne,Ce;this._more||(this.yytext="",this.match="");for(var Fe=this._currentRules(),fe=0;feMe[0].length)){if(Me=Ne,Ce=fe,this.options.backtrack_lexer){if(Le=this.test_match(Ne,Fe[fe]),Le!==!1)return Le;if(this._backtrack){Me=!1;continue}else return!1}else if(!this.options.flex)break}return Me?(Le=this.test_match(Me,Fe[Ce]),Le!==!1?Le:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var Me=this.next();return Me||this.lex()},"lex"),begin:x(function(Me){this.conditionStack.push(Me)},"begin"),popState:x(function(){var Me=this.conditionStack.length-1;return Me>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(Me){return Me=this.conditionStack.length-1-Math.abs(Me||0),Me>=0?this.conditionStack[Me]:"INITIAL"},"topState"),pushState:x(function(Me){this.begin(Me)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(Me,Ne,Ce,Fe){var fe=Fe;switch(Ce){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return qe}();pe.lexer=Be;function Ye(){this.yy={}}return x(Ye,"Parser"),Ye.prototype=pe,pe.Parser=Ye,new Ye}();Gk.parser=Gk;jFe=Gk,kl=[],kf=[""],ns="global",Tl="",Dc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],H2=[],uN="",hN=!1,Vk=4,Uk=2,KFe=x(function(){return mue},"getC4Type"),ZFe=x(function(t){mue=ar(t,we())},"setC4Type"),QFe=x(function(t,e,r,n,i,a,s,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let u={},h=H2.find(f=>f.from===e&&f.to===r);if(h?u=h:H2.push(u),u.type=t,u.from=e,u.to=r,u.label={text:n},i==null)u.techn={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.techn={text:i};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]={text:d}}else u.descr={text:a};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.sprite=s;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=Ef()},"addRel"),JFe=x(function(t,e,r,n,i,a,s){if(e===null||r===null)return;let o={},l=kl.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,kl.push(o)),r==null?o.label={text:""}:o.label={text:r},n==null)o.descr={text:""};else if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]={text:h}}else o.descr={text:n};if(typeof i=="object"){let[u,h]=Object.entries(i)[0];o[u]=h}else o.sprite=i;if(typeof a=="object"){let[u,h]=Object.entries(a)[0];o[u]=h}else o.tags=a;if(typeof s=="object"){let[u,h]=Object.entries(s)[0];o[u]=h}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=ns,o.wrap=Ef()},"addPersonOrSystem"),e$e=x(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=kl.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,kl.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.sprite=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=Ef(),l.typeC4Shape={text:t},l.parentBoundary=ns},"addContainer"),t$e=x(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=kl.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,kl.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.sprite=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=Ef(),l.typeC4Shape={text:t},l.parentBoundary=ns},"addComponent"),r$e=x(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=Dc.find(o=>o.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,Dc.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.link=i;a.parentBoundary=ns,a.wrap=Ef(),Tl=ns,ns=t,kf.push(Tl)},"addPersonOrSystemBoundary"),n$e=x(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=Dc.find(o=>o.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,Dc.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.link=i;a.parentBoundary=ns,a.wrap=Ef(),Tl=ns,ns=t,kf.push(Tl)},"addContainerBoundary"),i$e=x(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=Dc.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,Dc.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.type={text:"node"};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.type={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.nodeType=t,l.parentBoundary=ns,l.wrap=Ef(),Tl=ns,ns=e,kf.push(Tl)},"addDeploymentNode"),a$e=x(function(){ns=Tl,kf.pop(),Tl=kf.pop(),kf.push(Tl)},"popBoundaryParseStack"),s$e=x(function(t,e,r,n,i,a,s,o,l,u,h){let f=kl.find(d=>d.alias===e);if(!(f===void 0&&(f=Dc.find(d=>d.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[d,p]=Object.entries(r)[0];f[d]=p}else f.bgColor=r;if(n!=null)if(typeof n=="object"){let[d,p]=Object.entries(n)[0];f[d]=p}else f.fontColor=n;if(i!=null)if(typeof i=="object"){let[d,p]=Object.entries(i)[0];f[d]=p}else f.borderColor=i;if(a!=null)if(typeof a=="object"){let[d,p]=Object.entries(a)[0];f[d]=p}else f.shadowing=a;if(s!=null)if(typeof s=="object"){let[d,p]=Object.entries(s)[0];f[d]=p}else f.shape=s;if(o!=null)if(typeof o=="object"){let[d,p]=Object.entries(o)[0];f[d]=p}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[d,p]=Object.entries(l)[0];f[d]=p}else f.techn=l;if(u!=null)if(typeof u=="object"){let[d,p]=Object.entries(u)[0];f[d]=p}else f.legendText=u;if(h!=null)if(typeof h=="object"){let[d,p]=Object.entries(h)[0];f[d]=p}else f.legendSprite=h}},"updateElStyle"),o$e=x(function(t,e,r,n,i,a,s){let o=H2.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.textColor=n;if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.lineColor=i;if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(s)}},"updateRelStyle"),l$e=x(function(t,e,r){let n=Vk,i=Uk;if(typeof e=="object"){let a=Object.values(e)[0];n=parseInt(a)}else n=parseInt(e);if(typeof r=="object"){let a=Object.values(r)[0];i=parseInt(a)}else i=parseInt(r);n>=1&&(Vk=n),i>=1&&(Uk=i)},"updateLayoutConfig"),c$e=x(function(){return Vk},"getC4ShapeInRow"),u$e=x(function(){return Uk},"getC4BoundaryInRow"),h$e=x(function(){return ns},"getCurrentBoundaryParse"),f$e=x(function(){return Tl},"getParentBoundaryParse"),vue=x(function(t){return t==null?kl:kl.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),d$e=x(function(t){return kl.find(e=>e.alias===t)},"getC4Shape"),p$e=x(function(t){return Object.keys(vue(t))},"getC4ShapeKeys"),yue=x(function(t){return t==null?Dc:Dc.filter(e=>e.parentBoundary===t)},"getBoundaries"),g$e=yue,m$e=x(function(){return H2},"getRels"),v$e=x(function(){return uN},"getTitle"),y$e=x(function(t){hN=t},"setWrap"),Ef=x(function(){return hN},"autoWrap"),x$e=x(function(){kl=[],Dc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Tl="",ns="global",kf=[""],H2=[],kf=[""],uN="",hN=!1,Vk=4,Uk=2},"clear"),b$e={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},w$e={FILLED:0,OPEN:1},T$e={LEFTOF:0,RIGHTOF:1,OVER:2},k$e=x(function(t){uN=ar(t,we())},"setTitle"),oN={addPersonOrSystem:JFe,addPersonOrSystemBoundary:r$e,addContainer:e$e,addContainerBoundary:n$e,addComponent:t$e,addDeploymentNode:i$e,popBoundaryParseStack:a$e,addRel:QFe,updateElStyle:s$e,updateRelStyle:o$e,updateLayoutConfig:l$e,autoWrap:Ef,setWrap:y$e,getC4ShapeArray:vue,getC4Shape:d$e,getC4ShapeKeys:p$e,getBoundaries:yue,getBoundarys:g$e,getCurrentBoundaryParse:h$e,getParentBoundaryParse:f$e,getRels:m$e,getTitle:v$e,getC4Type:KFe,getC4ShapeInRow:c$e,getC4BoundaryInRow:u$e,setAccTitle:Er,getAccTitle:Cr,getAccDescription:_r,setAccDescription:Ar,getConfig:x(()=>we().c4,"getConfig"),clear:x$e,LINETYPE:b$e,ARROWTYPE:w$e,PLACEMENT:T$e,setTitle:k$e,setC4Type:ZFe},fN=x(function(t,e){return h0(t,e)},"drawRect"),bue=x(function(t,e,r,n,i,a){let s=t.append("image");s.attr("width",e),s.attr("height",r),s.attr("x",n),s.attr("y",i);let o=a.startsWith("data:image/png;base64")?a:(0,xue.sanitizeUrl)(a);s.attr("xlink:href",o)},"drawImage"),E$e=x((t,e,r)=>{let n=t.append("g"),i=0;for(let a of e){let s=a.textColor?a.textColor:"#444444",o=a.lineColor?a.lineColor:"#444444",l=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,h="";if(i===0){let d=n.append("line");d.attr("x1",a.startPoint.x),d.attr("y1",a.startPoint.y),d.attr("x2",a.endPoint.x),d.attr("y2",a.endPoint.y),d.attr("stroke-width","1"),d.attr("stroke",o),d.style("fill","none"),a.type!=="rel_b"&&d.attr("marker-end","url("+h+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&d.attr("marker-start","url("+h+"#arrowend)"),i=-1}else{let d=n.append("path");d.attr("fill","none").attr("stroke-width","1").attr("stroke",o).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)),a.type!=="rel_b"&&d.attr("marker-end","url("+h+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&d.attr("marker-start","url("+h+"#arrowend)")}let f=r.messageFont();Fu(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+l,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:s},f),a.techn&&a.techn.text!==""&&(f=r.messageFont(),Fu(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+l,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:s,"font-style":"italic"},f))}},"drawRels"),S$e=x(function(t,e,r){let n=t.append("g"),i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};fN(n,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,Fu(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},u),e.type&&e.type.text!==""&&(u=r.boundaryFont(),u.fontColor=s,Fu(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},u)),e.descr&&e.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=s,Fu(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},u))},"drawBoundary"),C$e=x(function(t,e,r){let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],a=e.fontColor?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=";break}let o=t.append("g");o.attr("class","person-man");let l=La();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},fN(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));break}let u=O$e(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",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":bue(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s);break}let h=r[e.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,Fu(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},h),h=r[e.typeC4Shape.text+"Font"](),h.fontColor=a,e.techn&&e.techn?.text!==""?Fu(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},h):e.type&&e.type.text!==""&&Fu(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},h),e.descr&&e.descr.text!==""&&(h=r.personFont(),h.fontColor=a,Fu(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},h)),e.height},"drawC4Shape"),A$e=x(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"),_$e=x(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"),L$e=x(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"),R$e=x(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"),I$e=x(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"),N$e=x(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"),D$e=x(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"),M$e=x(function(t){let r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),O$e=x((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),Fu=function(){function t(i,a,s,o,l,u,h){let f=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(i);n(f,h)}x(t,"byText");function e(i,a,s,o,l,u,h,f){let{fontSize:d,fontFamily:p,fontWeight:g}=f,m=i.split(Je.lineBreakRegex);for(let v=0;v=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>wue)&&(e=this.nextData.startx+t.margin+Ft.nextLinePaddingX,n=this.nextData.stopy+t.margin*2,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},cN(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},cN=x(function(t){Nn(Ft,t),t.fontFamily&&(Ft.personFontFamily=Ft.systemFontFamily=Ft.messageFontFamily=t.fontFamily),t.fontSize&&(Ft.personFontSize=Ft.systemFontSize=Ft.messageFontSize=t.fontSize),t.fontWeight&&(Ft.personFontWeight=Ft.systemFontWeight=Ft.messageFontWeight=t.fontWeight)},"setConf"),W2=x((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),zk=x(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),P$e=x(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");x(Wo,"calcC4ShapeTextWH");kue=x(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=Ft.c4ShapeMargin-35;let n=e.wrap&&Ft.wrap,i=zk(Ft);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=ea(e.label.text,i);Wo("label",e,n,i,a),Nc.drawBoundary(t,e,Ft)},"drawBoundary"),Eue=x(function(t,e,r,n){let i=0;for(let a of n){i=0;let s=r[a],o=W2(Ft,s.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,s.typeC4Shape.width=ea("\xAB"+s.typeC4Shape.text+"\xBB",o),s.typeC4Shape.height=o.fontSize+2,s.typeC4Shape.Y=Ft.c4ShapePadding,i=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height);let l=s.wrap&&Ft.wrap,u=Ft.width-Ft.c4ShapePadding*2,h=W2(Ft,s.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",Wo("label",s,l,h,u),s.label.Y=i+8,i=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let p=W2(Ft,s.typeC4Shape.text);Wo("type",s,l,p,u),s.type.Y=i+5,i=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let p=W2(Ft,s.techn.text);Wo("techn",s,l,p,u),s.techn.Y=i+5,i=s.techn.Y+s.techn.height}let f=i,d=s.label.width;if(s.descr&&s.descr.text!==""){let p=W2(Ft,s.typeC4Shape.text);Wo("descr",s,l,p,u),s.descr.Y=i+20,i=s.descr.Y+s.descr.height,d=Math.max(s.label.width,s.descr.width),f=i-s.descr.textLines*5}d=d+Ft.c4ShapePadding,s.width=Math.max(s.width||Ft.width,d,Ft.width),s.height=Math.max(s.height||Ft.height,f,Ft.height),s.margin=s.margin||Ft.c4ShapeMargin,t.insert(s),Nc.drawC4Shape(e,s,Ft)}t.bumpLastMargin(Ft.c4ShapeMargin)},"drawC4ShapeArray"),qo=class{static{x(this,"Point")}constructor(t,e){this.x=t,this.y=e}},pue=x(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),u=Math.abs(n-a),h=u/l,f=t.height/t.width,d=null;return n==a&&ri?d=new qo(r,o):r==i&&na&&(d=new qo(s,n)),r>i&&n=h?d=new qo(r,o+h*t.width/2):d=new qo(s-l/u*t.height/2,n+t.height):r=h?d=new qo(r+t.width,o+h*t.width/2):d=new qo(s+l/u*t.height/2,n+t.height):ra?f>=h?d=new qo(r+t.width,o-h*t.width/2):d=new qo(s+t.height/2*l/u,n):r>i&&n>a&&(f>=h?d=new qo(r,o-t.width/2*h):d=new qo(s-t.height/2*l/u,n)),d},"getIntersectPoint"),B$e=x(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=pue(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=pue(e,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),F$e=x(function(t,e,r,n){let i=0;for(let a of e){i=i+1;let s=a.wrap&&Ft.wrap,o=P$e(Ft);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let u=ea(a.label.text,o);Wo("label",a,s,o,u),a.techn&&a.techn.text!==""&&(u=ea(a.techn.text,o),Wo("techn",a,s,o,u)),a.descr&&a.descr.text!==""&&(u=ea(a.descr.text,o),Wo("descr",a,s,o,u));let h=r(a.from),f=r(a.to),d=B$e(h,f);a.startPoint=d.startPoint,a.endPoint=d.endPoint}Nc.drawRels(t,e,Ft)},"drawRels");x(dN,"drawInsideBoundary");$$e=x(function(t,e,r,n){Ft=we().c4;let i=we().securityLevel,a;i==="sandbox"&&(a=He("#i"+e));let s=i==="sandbox"?He(a.nodes()[0].contentDocument.body):He("body"),o=n.db;n.db.setWrap(Ft.wrap),wue=o.getC4ShapeInRow(),lN=o.getC4BoundaryInRow(),J.debug(`C:${JSON.stringify(Ft,null,2)}`);let l=i==="sandbox"?s.select(`[id="${e}"]`):He(`[id="${e}"]`);Nc.insertComputerIcon(l),Nc.insertDatabaseIcon(l),Nc.insertClockIcon(l);let u=new Tue(n);u.setData(Ft.diagramMarginX,Ft.diagramMarginX,Ft.diagramMarginY,Ft.diagramMarginY),u.data.widthLimit=screen.availWidth,qk=Ft.diagramMarginX,Wk=Ft.diagramMarginY;let h=n.db.getTitle(),f=n.db.getBoundaries("");dN(l,"",u,f,n),Nc.insertArrowHead(l),Nc.insertArrowEnd(l),Nc.insertArrowCrossHead(l),Nc.insertArrowFilledHead(l),F$e(l,n.db.getRels(),n.db.getC4Shape,n),u.data.stopx=qk,u.data.stopy=Wk;let d=u.data,g=d.stopy-d.starty+2*Ft.diagramMarginY,v=d.stopx-d.startx+2*Ft.diagramMarginX;h&&l.append("text").text(h).attr("x",(d.stopx-d.startx)/2-4*Ft.diagramMarginX).attr("y",d.starty+Ft.diagramMarginY),un(l,g,v,Ft.useMaxWidth);let y=h?60:0;l.attr("viewBox",d.startx-Ft.diagramMarginX+" -"+(Ft.diagramMarginY+y)+" "+v+" "+(g+y)),J.debug("models:",d)},"draw"),gue={drawPersonOrSystemArray:Eue,drawBoundary:kue,setConf:cN,draw:$$e},z$e=x(t=>`.person { stroke: ${t.personBorder}; fill: ${t.personBkg}; } `,"getStyles"),G$e=z$e,V$e={parser:jFe,db:oN,renderer:gue,styles:G$e,init:x(({c4:t,wrap:e})=>{gue.setConf(t),oN.setWrap(e)},"init")}});var Mc,Sf=F(()=>{rr();Mc=x(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; height: 1em; overflow: visible; vertical-align: -0.125em; } .node .label-icon path { fill: currentColor; stroke: revert; stroke-width: revert; } `,"getIconStyles")});var Ho,El=F(()=>{rr();cr();Ho=x((t,e)=>{let r;return e==="sandbox"&&(r=He("#i"+t)),(e==="sandbox"?He(r.nodes()[0].contentDocument.body):He("body")).select(`[id="${t}"]`)},"getDiagramElement")});var Bs,U$e,q$e,Yo=F(()=>{vr();rr();Bs=x((t,e,r,n)=>{t.attr("class",r);let{width:i,height:a,x:s,y:o}=U$e(t,e);un(t,a,i,n);let l=q$e(s,o,i,a,e);t.attr("viewBox",l),J.debug(`viewBox configured: ${l} with padding: ${e}`)},"setupViewPortForSVG"),U$e=x((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+e*2,height:r.height+e*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),q$e=x((t,e,r,n,i)=>`${t-i} ${e-i} ${r} ${n}`,"createViewBox")});var Hk={};hr(Hk,{diagram:()=>eze});var W$e,H$e,Y$e,X$e,j$e,pN,Aue,_ue,K$e,Z$e,Q$e,J$e,eze,Yk=F(()=>{Sf();vy();El();Yo();Go();Io();Ks();Ls();ja();Ka();na();hn();vr();rr();cr();cr();qs();W$e="flowchart-",H$e=class{constructor(){this.vertexCounter=0,this.config=we(),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=Er,this.setAccDescription=Ar,this.setDiagramTitle=Dr,this.getAccTitle=Cr,this.getAccDescription=_r,this.getDiagramTitle=Lr,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{x(this,"FlowDB")}sanitizeText(t){return Je.sanitizeText(t,this.config)}lookUpDomId(t){for(let e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(t,e,r,n,i,a,s={},o){if(!t||t.trim().length===0)return;let l;if(o!==void 0){let d;o.includes(` `)?d=o+` `:d=`{ `+o+` }`,l=Lh(d,{schema:_h})}let u=this.edges.find(d=>d.id===t);if(u){let d=l;d?.animate!==void 0&&(u.animate=d.animate),d?.animation!==void 0&&(u.animation=d.animation),d?.curve!==void 0&&(u.interpolate=d.curve);return}let h,f=this.vertices.get(t);if(f===void 0&&(f={id:t,labelType:"text",domId:W$e+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,f)),this.vertexCounter++,e!==void 0?(this.config=we(),h=this.sanitizeText(e.text.trim()),f.labelType=e.type,h.startsWith('"')&&h.endsWith('"')&&(h=h.substring(1,h.length-1)),f.text=h):f.text===void 0&&(f.text=t),r!==void 0&&(f.type=r),n?.forEach(d=>{f.styles.push(d)}),i?.forEach(d=>{f.classes.push(d)}),a!==void 0&&(f.dir=a),f.props===void 0?f.props=s:s!==void 0&&Object.assign(f.props,s),l!==void 0){if(l.shape){if(l.shape!==l.shape.toLowerCase()||l.shape.includes("_"))throw new Error(`No such shape: ${l.shape}. Shape names should be lowercase.`);if(!d9(l.shape))throw new Error(`No such shape: ${l.shape}.`);f.type=l?.shape}l?.label&&(f.text=l?.label),l?.icon&&(f.icon=l?.icon,!l.label?.trim()&&f.text===t&&(f.text="")),l?.form&&(f.form=l?.form),l?.pos&&(f.pos=l?.pos),l?.img&&(f.img=l?.img,!l.label?.trim()&&f.text===t&&(f.text="")),l?.constraint&&(f.constraint=l.constraint),l.w&&(f.assetWidth=Number(l.w)),l.h&&(f.assetHeight=Number(l.h))}}addSingleLink(t,e,r,n){let s={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};J.info("abc78 Got edge...",s);let o=r.text;if(o!==void 0&&(s.text=this.sanitizeText(o.text.trim()),s.text.startsWith('"')&&s.text.endsWith('"')&&(s.text=s.text.substring(1,s.text.length-1)),s.labelType=o.type),r!==void 0&&(s.type=r.type,s.stroke=r.stroke,s.length=r.length>10?10:r.length),n&&!this.edges.some(l=>l.id===n))s.id=n,s.isUserDefinedId=!0;else{let l=this.edges.filter(u=>u.start===s.start&&u.end===s.end);l.length===0?s.id=$h(s.start,s.end,{counter:0,prefix:"L"}):s.id=$h(s.start,s.end,{counter:l.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))J.info("Pushing edge..."),this.edges.push(s);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. Initialize mermaid with maxEdges set to a higher number to allow more edges. You cannot set this config via configuration inside the diagram as it is a secure config. You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t=="object"&&"id"in t&&typeof t.id=="string"}addLink(t,e,r){let n=this.isLinkData(r)?r.id.replace("@",""):void 0;J.info("addLink",t,e,n);for(let i of t)for(let a of e){let 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(r=>{r==="default"?this.edges.defaultInterpolate=e:this.edges[r].interpolate=e})}updateLink(t,e){t.forEach(r=>{if(typeof r=="number"&&r>=this.edges.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);r==="default"?this.edges.defaultStyle=e:(this.edges[r].style=e,(this.edges[r]?.style?.length??0)>0&&!this.edges[r]?.style?.some(n=>n?.startsWith("fill"))&&this.edges[r]?.style?.push("fill:none"))})}addClass(t,e){let r=e.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/ยงยงยง/g,",").split(";");t.split(",").forEach(n=>{let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r?.forEach(a=>{if(/color/.exec(a)){let s=a.replace("fill","bgFill");i.textStyles.push(s)}i.styles.push(a)})})}setDirection(t){this.direction=t.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(t,e){for(let r of t.split(",")){let n=this.vertices.get(r);n&&n.classes.push(e);let i=this.edges.find(s=>s.id===r);i&&i.classes.push(e);let a=this.subGraphLookup.get(r);a&&a.classes.push(e)}}setTooltip(t,e){if(e!==void 0){e=this.sanitizeText(e);for(let r of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(r):r,e)}}setClickFun(t,e,r){let n=this.lookUpDomId(t);if(we().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s{let s=document.querySelector(`[id="${n}"]`);s!==null&&s.addEventListener("click",()=>{zt.runFunc(e,...i)},!1)}))}setLink(t,e,r){t.split(",").forEach(n=>{let i=this.vertices.get(n);i!==void 0&&(i.link=zt.formatUrl(e,this.config),i.linkTarget=r)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,r){t.split(",").forEach(n=>{this.setClickFun(n,e,r)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let e=He(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=He("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),He(t).select("svg").selectAll("g.node").on("mouseover",i=>{let a=He(i.currentTarget);if(a.attr("title")===null)return;let o=i.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(a.attr("title")).style("left",window.scrollX+o.left+(o.right-o.left)/2+"px").style("top",window.scrollY+o.bottom+"px"),e.html(e.html().replace(/<br\/>/g,"
    ")),a.classed("hover",!0)}).on("mouseout",i=>{e.transition().duration(500).style("opacity",0),He(i.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=we(),mr()}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);let s=x(f=>{let d={boolean:{},number:{},string:{}},p=[],g;return{nodeList:f.filter(function(v){let y=typeof v;return v.stmt&&v.stmt==="dir"?(g=v.value,!1):v.trim()===""?!1:y in d?d[y].hasOwnProperty(v)?!1:d[y][v]=!0:p.includes(v)?!1:p.push(v)}),dir:g}},"uniq")(e.flat()),o=s.nodeList,l=s.dir,u=we().flowchart??{};if(l=l??(u.inheritDir?this.getDirection()??we().direction??void 0:void 0),this.version==="gen-1")for(let f=0;f2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n=0){let s=this.indexNodes2(t,a);if(s.result)return{result:!0,count:i+s.count};i=i+s.count}n=n+1}return{result:!1,count:i}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(t){let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}}countChar(t,e){let r=e.length,n=0;for(let i=0;i":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));break}let i="normal",a=r.length-1;r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible");let s=this.countChar(".",r);return s&&(i="dotted",a=s),{type:n,stroke:i,length:a}}destructLink(t,e){let r=this.destructEndLink(t),n;if(e){if(n=this.destructStartLink(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=r.length,n}return r}exists(t,e){for(let r of t)if(r.nodes.includes(e))return!0;return!1}makeUniq(t,e){let r=[];return t.nodes.forEach((n,i)=>{this.exists(e,n)||r.push(t.nodes[i])}),{nodes:r}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return t.form==="circle"?"iconCircle":t.form==="square"?"iconSquare":t.form==="rounded"?"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(r=>r.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;break}return{arrowTypeStart:e,arrowTypeEnd:r}}addNodeFromVertex(t,e,r,n,i,a){let s=r.get(t.id),o=n.get(t.id)??!1,l=this.findNode(e,t.id);if(l)l.cssStyles=t.styles,l.cssCompiledStyles=this.getCompiledStyles(t.classes),l.cssClasses=t.classes.join(" ");else{let u={id:t.id,label:t.text,labelStyle:"",parentId:s,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};o?e.push({...u,isGroup:!0,shape:"rect"}):e.push({...u,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let e=[];for(let r of t){let n=this.classes.get(r);n?.styles&&(e=[...e,...n.styles??[]].map(i=>i.trim())),n?.textStyles&&(e=[...e,...n.textStyles??[]].map(i=>i.trim()))}return e}getData(){let t=we(),e=[],r=[],n=this.getSubGraphs(),i=new Map,a=new Map;for(let l=n.length-1;l>=0;l--){let u=n[l];u.nodes.length>0&&a.set(u.id,!0);for(let h of u.nodes)i.set(h,u.id)}for(let l=n.length-1;l>=0;l--){let u=n[l];e.push({id:u.id,label:u.title,labelStyle:"",parentId:i.get(u.id),padding:8,cssCompiledStyles:this.getCompiledStyles(u.classes),cssClasses:u.classes.join(" "),shape:"rect",dir:u.dir,isGroup:!0,look:t.look})}this.getVertices().forEach(l=>{this.addNodeFromVertex(l,e,i,a,t,t.look||"classic")});let o=this.getEdges();return o.forEach((l,u)=>{let{arrowTypeStart:h,arrowTypeEnd:f}=this.destructEdgeType(l.type),d=[...o.defaultStyle??[]];l.style&&d.push(...l.style);let p={id:$h(l.start,l.end,{counter:u,prefix:"L"},l.id),isUserDefinedId:l.isUserDefinedId,start:l.start,end:l.end,type:l.type??"normal",label:l.text,labelpos:"c",thickness:l.stroke,minlen:l.length,classes:l?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:l?.stroke==="invisible"||l?.type==="arrow_open"?"none":h,arrowTypeEnd:l?.stroke==="invisible"||l?.type==="arrow_open"?"none":f,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(l.classes),labelStyle:d,style:d,pattern:l.stroke,look:t.look,animate:l.animate,animation:l.animation,curve:l.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};r.push(p)}),{nodes:e,edges:r,other:{},config:t}}defaultConfig(){return j4.flowchart}},Y$e=x(function(t,e){return e.db.getClasses()},"getClasses"),X$e=x(async function(t,e,r,n){J.info("REF0:"),J.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=we(),o;i==="sandbox"&&(o=He("#i"+e));let l=i==="sandbox"?o.nodes()[0].contentDocument:document;J.debug("Before getData: ");let u=n.db.getData();J.debug("Data: ",u);let h=Ho(e,i),f=n.db.getDirection();u.type=n.type,u.layoutAlgorithm=Ic(s),u.layoutAlgorithm==="dagre"&&s==="elk"&&J.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."),u.direction=f,u.nodeSpacing=a?.nodeSpacing||50,u.rankSpacing=a?.rankSpacing||50,u.markers=["point","circle","cross"],u.diagramId=e,J.debug("REF1:",u),await zo(u,h);let d=u.config.flowchart?.diagramPadding??8;zt.insertTitle(h,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),Bs(h,d,"flowchart",a?.useMaxWidth||!1);for(let p of u.nodes){let g=He(`#${e} [id="${p.id}"]`);if(!g||!p.link)continue;let m=l.createElementNS("http://www.w3.org/2000/svg","a");m.setAttributeNS("http://www.w3.org/2000/svg","class",p.cssClasses),m.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?m.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):p.linkTarget&&m.setAttributeNS("http://www.w3.org/2000/svg","target",p.linkTarget);let v=g.insert(function(){return m},":first-child"),y=g.select(".label-container");y&&v.append(function(){return y.node()});let b=g.select(".label");b&&v.append(function(){return b.node()})}},"draw"),j$e={getClasses:Y$e,draw:X$e},pN=function(){var t=x(function(tr,et,mt,Gt){for(mt=mt||{},Gt=tr.length;Gt--;mt[tr[Gt]]=et);return mt},"o"),e=[1,4],r=[1,3],n=[1,5],i=[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],a=[2,2],s=[1,13],o=[1,14],l=[1,15],u=[1,16],h=[1,23],f=[1,25],d=[1,26],p=[1,27],g=[1,49],m=[1,48],v=[1,29],y=[1,30],b=[1,31],w=[1,32],S=[1,33],T=[1,44],E=[1,46],A=[1,42],C=[1,47],I=[1,43],M=[1,50],R=[1,45],k=[1,51],L=[1,52],_=[1,34],D=[1,35],N=[1,36],O=[1,37],P=[1,57],B=[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],G=[1,61],$=[1,60],U=[1,62],X=[8,9,11,75,77,78],ee=[1,78],Y=[1,91],oe=[1,96],Q=[1,95],ue=[1,92],re=[1,88],te=[1,94],Z=[1,90],j=[1,97],ae=[1,93],K=[1,98],de=[1,89],ne=[8,9,10,11,40,75,77,78],be=[8,9,10,11,40,46,75,77,78],W=[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],Ve=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],pe=[44,60,89,102,105,106,109,111,114,115,116],Be=[1,121],Ye=[1,122],qe=[1,124],Le=[1,123],Me=[44,60,62,74,89,102,105,106,109,111,114,115,116],Ne=[1,133],Ce=[1,147],Fe=[1,148],fe=[1,149],ye=[1,150],H=[1,135],he=[1,137],z=[1,141],se=[1,142],le=[1,143],ke=[1,144],ve=[1,145],me=[1,146],Ie=[1,151],_e=[1,152],ze=[1,131],Xe=[1,132],ft=[1,139],We=[1,134],Oe=[1,138],Ke=[1,136],Ue=[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],nt=[1,154],Dt=[1,156],ut=[8,9,11],kt=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],ot=[1,176],Qe=[1,172],dt=[1,173],gt=[1,177],ht=[1,174],st=[1,175],Br=[77,116,119],wt=[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],mn=[10,106],Ir=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],er=[1,247],Zt=[1,245],wr=[1,249],xt=[1,243],Se=[1,244],tt=[1,246],St=[1,248],pr=[1,250],vn=[1,268],cn=[8,9,11,106],Jr=[8,9,10,11,60,84,105,106,109,110,111,112],Di={trace:x(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:x(function(et,mt,Gt,at,Tr,ge,Fl){var xe=ge.length-1;switch(Tr){case 2:this.$=[];break;case 3:(!Array.isArray(ge[xe])||ge[xe].length>0)&&ge[xe-1].push(ge[xe]),this.$=ge[xe-1];break;case 4:case 183:this.$=ge[xe];break;case 11:at.setDirection("TB"),this.$="TB";break;case 12:at.setDirection(ge[xe-1]),this.$=ge[xe-1];break;case 27:this.$=ge[xe-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=at.addSubGraph(ge[xe-6],ge[xe-1],ge[xe-4]);break;case 34:this.$=at.addSubGraph(ge[xe-3],ge[xe-1],ge[xe-3]);break;case 35:this.$=at.addSubGraph(void 0,ge[xe-1],void 0);break;case 37:this.$=ge[xe].trim(),at.setAccTitle(this.$);break;case 38:case 39:this.$=ge[xe].trim(),at.setAccDescription(this.$);break;case 43:this.$=ge[xe-1]+ge[xe];break;case 44:this.$=ge[xe];break;case 45:at.addVertex(ge[xe-1][ge[xe-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,ge[xe]),at.addLink(ge[xe-3].stmt,ge[xe-1],ge[xe-2]),this.$={stmt:ge[xe-1],nodes:ge[xe-1].concat(ge[xe-3].nodes)};break;case 46:at.addLink(ge[xe-2].stmt,ge[xe],ge[xe-1]),this.$={stmt:ge[xe],nodes:ge[xe].concat(ge[xe-2].nodes)};break;case 47:at.addLink(ge[xe-3].stmt,ge[xe-1],ge[xe-2]),this.$={stmt:ge[xe-1],nodes:ge[xe-1].concat(ge[xe-3].nodes)};break;case 48:this.$={stmt:ge[xe-1],nodes:ge[xe-1]};break;case 49:at.addVertex(ge[xe-1][ge[xe-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,ge[xe]),this.$={stmt:ge[xe-1],nodes:ge[xe-1],shapeData:ge[xe]};break;case 50:this.$={stmt:ge[xe],nodes:ge[xe]};break;case 51:this.$=[ge[xe]];break;case 52:at.addVertex(ge[xe-5][ge[xe-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,ge[xe-4]),this.$=ge[xe-5].concat(ge[xe]);break;case 53:this.$=ge[xe-4].concat(ge[xe]);break;case 54:this.$=ge[xe];break;case 55:this.$=ge[xe-2],at.setClass(ge[xe-2],ge[xe]);break;case 56:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"square");break;case 57:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"doublecircle");break;case 58:this.$=ge[xe-5],at.addVertex(ge[xe-5],ge[xe-2],"circle");break;case 59:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"ellipse");break;case 60:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"stadium");break;case 61:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"subroutine");break;case 62:this.$=ge[xe-7],at.addVertex(ge[xe-7],ge[xe-1],"rect",void 0,void 0,void 0,Object.fromEntries([[ge[xe-5],ge[xe-3]]]));break;case 63:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"cylinder");break;case 64:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"round");break;case 65:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"diamond");break;case 66:this.$=ge[xe-5],at.addVertex(ge[xe-5],ge[xe-2],"hexagon");break;case 67:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"odd");break;case 68:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"trapezoid");break;case 69:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"inv_trapezoid");break;case 70:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"lean_right");break;case 71:this.$=ge[xe-3],at.addVertex(ge[xe-3],ge[xe-1],"lean_left");break;case 72:this.$=ge[xe],at.addVertex(ge[xe]);break;case 73:ge[xe-1].text=ge[xe],this.$=ge[xe-1];break;case 74:case 75:ge[xe-2].text=ge[xe-1],this.$=ge[xe-2];break;case 76:this.$=ge[xe];break;case 77:var qr=at.destructLink(ge[xe],ge[xe-2]);this.$={type:qr.type,stroke:qr.stroke,length:qr.length,text:ge[xe-1]};break;case 78:var qr=at.destructLink(ge[xe],ge[xe-2]);this.$={type:qr.type,stroke:qr.stroke,length:qr.length,text:ge[xe-1],id:ge[xe-3]};break;case 79:this.$={text:ge[xe],type:"text"};break;case 80:this.$={text:ge[xe-1].text+""+ge[xe],type:ge[xe-1].type};break;case 81:this.$={text:ge[xe],type:"string"};break;case 82:this.$={text:ge[xe],type:"markdown"};break;case 83:var qr=at.destructLink(ge[xe]);this.$={type:qr.type,stroke:qr.stroke,length:qr.length};break;case 84:var qr=at.destructLink(ge[xe]);this.$={type:qr.type,stroke:qr.stroke,length:qr.length,id:ge[xe-1]};break;case 85:this.$=ge[xe-1];break;case 86:this.$={text:ge[xe],type:"text"};break;case 87:this.$={text:ge[xe-1].text+""+ge[xe],type:ge[xe-1].type};break;case 88:this.$={text:ge[xe],type:"string"};break;case 89:case 104:this.$={text:ge[xe],type:"markdown"};break;case 101:this.$={text:ge[xe],type:"text"};break;case 102:this.$={text:ge[xe-1].text+""+ge[xe],type:ge[xe-1].type};break;case 103:this.$={text:ge[xe],type:"text"};break;case 105:this.$=ge[xe-4],at.addClass(ge[xe-2],ge[xe]);break;case 106:this.$=ge[xe-4],at.setClass(ge[xe-2],ge[xe]);break;case 107:case 115:this.$=ge[xe-1],at.setClickEvent(ge[xe-1],ge[xe]);break;case 108:case 116:this.$=ge[xe-3],at.setClickEvent(ge[xe-3],ge[xe-2]),at.setTooltip(ge[xe-3],ge[xe]);break;case 109:this.$=ge[xe-2],at.setClickEvent(ge[xe-2],ge[xe-1],ge[xe]);break;case 110:this.$=ge[xe-4],at.setClickEvent(ge[xe-4],ge[xe-3],ge[xe-2]),at.setTooltip(ge[xe-4],ge[xe]);break;case 111:this.$=ge[xe-2],at.setLink(ge[xe-2],ge[xe]);break;case 112:this.$=ge[xe-4],at.setLink(ge[xe-4],ge[xe-2]),at.setTooltip(ge[xe-4],ge[xe]);break;case 113:this.$=ge[xe-4],at.setLink(ge[xe-4],ge[xe-2],ge[xe]);break;case 114:this.$=ge[xe-6],at.setLink(ge[xe-6],ge[xe-4],ge[xe]),at.setTooltip(ge[xe-6],ge[xe-2]);break;case 117:this.$=ge[xe-1],at.setLink(ge[xe-1],ge[xe]);break;case 118:this.$=ge[xe-3],at.setLink(ge[xe-3],ge[xe-2]),at.setTooltip(ge[xe-3],ge[xe]);break;case 119:this.$=ge[xe-3],at.setLink(ge[xe-3],ge[xe-2],ge[xe]);break;case 120:this.$=ge[xe-5],at.setLink(ge[xe-5],ge[xe-4],ge[xe]),at.setTooltip(ge[xe-5],ge[xe-2]);break;case 121:this.$=ge[xe-4],at.addVertex(ge[xe-2],void 0,void 0,ge[xe]);break;case 122:this.$=ge[xe-4],at.updateLink([ge[xe-2]],ge[xe]);break;case 123:this.$=ge[xe-4],at.updateLink(ge[xe-2],ge[xe]);break;case 124:this.$=ge[xe-8],at.updateLinkInterpolate([ge[xe-6]],ge[xe-2]),at.updateLink([ge[xe-6]],ge[xe]);break;case 125:this.$=ge[xe-8],at.updateLinkInterpolate(ge[xe-6],ge[xe-2]),at.updateLink(ge[xe-6],ge[xe]);break;case 126:this.$=ge[xe-6],at.updateLinkInterpolate([ge[xe-4]],ge[xe]);break;case 127:this.$=ge[xe-6],at.updateLinkInterpolate(ge[xe-4],ge[xe]);break;case 128:case 130:this.$=[ge[xe]];break;case 129:case 131:ge[xe-2].push(ge[xe]),this.$=ge[xe-2];break;case 133:this.$=ge[xe-1]+ge[xe];break;case 181:this.$=ge[xe];break;case 182:this.$=ge[xe-1]+""+ge[xe];break;case 184:this.$=ge[xe-1]+""+ge[xe];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,84:v,85:y,86:b,87:w,88:S,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L,121:_,122:D,123:N,124:O},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:P,15:53,18:56},t(B,[2,3]),t(B,[2,4]),t(B,[2,5]),t(B,[2,6]),t(B,[2,7]),t(B,[2,8]),{8:G,9:$,11:U,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:G,9:$,11:U,21:67},{8:G,9:$,11:U,21:68},{8:G,9:$,11:U,21:69},{8:G,9:$,11:U,21:70},{8:G,9:$,11:U,21:71},{8:G,9:$,10:[1,72],11:U,21:73},t(B,[2,36]),{35:[1,74]},{37:[1,75]},t(B,[2,39]),t(X,[2,50],{18:76,39:77,10:P,40:ee}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:Y,44:oe,60:Q,80:[1,86],89:ue,95:[1,83],97:[1,84],101:85,105:re,106:te,109:Z,111:j,114:ae,115:K,116:de,120:87},t(B,[2,185]),t(B,[2,186]),t(B,[2,187]),t(B,[2,188]),t(ne,[2,51]),t(ne,[2,54],{46:[1,99]}),t(be,[2,72],{113:112,29:[1,100],44:g,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:m,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:T,102:E,105:A,106:C,109:I,111:M,114:R,115:k,116:L}),t(W,[2,181]),t(W,[2,142]),t(W,[2,143]),t(W,[2,144]),t(W,[2,145]),t(W,[2,146]),t(W,[2,147]),t(W,[2,148]),t(W,[2,149]),t(W,[2,150]),t(W,[2,151]),t(W,[2,152]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,113]},t(Ve,[2,26],{18:114,10:P}),t(B,[2,27]),{42:115,43:38,44:g,45:39,47:40,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L},t(B,[2,40]),t(B,[2,41]),t(B,[2,42]),t(pe,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:Be,81:Ye,116:qe,119:Le},{75:[1,125],77:[1,126]},t(Me,[2,83]),t(B,[2,28]),t(B,[2,29]),t(B,[2,30]),t(B,[2,31]),t(B,[2,32]),{10:Ne,12:Ce,14:Fe,27:fe,28:127,32:ye,44:H,60:he,75:z,80:[1,129],81:[1,130],83:140,84:se,85:le,86:ke,87:ve,88:me,89:Ie,90:_e,91:128,105:ze,109:Xe,111:ft,114:We,115:Oe,116:Ke},t(Ue,a,{5:153}),t(B,[2,37]),t(B,[2,38]),t(X,[2,48],{44:nt}),t(X,[2,49],{18:155,10:P,40:Dt}),t(ne,[2,44]),{44:g,47:157,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L},{102:[1,158],103:159,105:[1,160]},{44:g,47:161,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L},{44:g,47:162,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L},t(ut,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},t(ut,[2,115],{120:167,10:[1,166],14:Y,44:oe,60:Q,89:ue,105:re,106:te,109:Z,111:j,114:ae,115:K,116:de}),t(ut,[2,117],{10:[1,168]}),t(kt,[2,183]),t(kt,[2,170]),t(kt,[2,171]),t(kt,[2,172]),t(kt,[2,173]),t(kt,[2,174]),t(kt,[2,175]),t(kt,[2,176]),t(kt,[2,177]),t(kt,[2,178]),t(kt,[2,179]),t(kt,[2,180]),{44:g,47:169,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L},{30:170,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{30:178,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{30:180,50:[1,179],67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{30:181,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{30:182,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{30:183,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{109:[1,184]},{30:185,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{30:186,65:[1,187],67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{30:188,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{30:189,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{30:190,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},t(W,[2,182]),t(i,[2,20]),t(Ve,[2,25]),t(X,[2,46],{39:191,18:192,10:P,40:ee}),t(pe,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{77:[1,196],79:197,116:qe,119:Le},t(Br,[2,79]),t(Br,[2,81]),t(Br,[2,82]),t(Br,[2,168]),t(Br,[2,169]),{76:198,79:120,80:Be,81:Ye,116:qe,119:Le},t(Me,[2,84]),{8:G,9:$,10:Ne,11:U,12:Ce,14:Fe,21:200,27:fe,29:[1,199],32:ye,44:H,60:he,75:z,83:140,84:se,85:le,86:ke,87:ve,88:me,89:Ie,90:_e,91:201,105:ze,109:Xe,111:ft,114:We,115:Oe,116:Ke},t(wt,[2,101]),t(wt,[2,103]),t(wt,[2,104]),t(wt,[2,157]),t(wt,[2,158]),t(wt,[2,159]),t(wt,[2,160]),t(wt,[2,161]),t(wt,[2,162]),t(wt,[2,163]),t(wt,[2,164]),t(wt,[2,165]),t(wt,[2,166]),t(wt,[2,167]),t(wt,[2,90]),t(wt,[2,91]),t(wt,[2,92]),t(wt,[2,93]),t(wt,[2,94]),t(wt,[2,95]),t(wt,[2,96]),t(wt,[2,97]),t(wt,[2,98]),t(wt,[2,99]),t(wt,[2,100]),{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,202],33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,84:v,85:y,86:b,87:w,88:S,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L,121:_,122:D,123:N,124:O},{10:P,18:203},{44:[1,204]},t(ne,[2,43]),{10:[1,205],44:g,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:112,114:R,115:k,116:L},{10:[1,206]},{10:[1,207],106:[1,208]},t(mn,[2,128]),{10:[1,209],44:g,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:112,114:R,115:k,116:L},{10:[1,210],44:g,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:112,114:R,115:k,116:L},{80:[1,211]},t(ut,[2,109],{10:[1,212]}),t(ut,[2,111],{10:[1,213]}),{80:[1,214]},t(kt,[2,184]),{80:[1,215],98:[1,216]},t(ne,[2,55],{113:112,44:g,60:m,89:T,102:E,105:A,106:C,109:I,111:M,114:R,115:k,116:L}),{31:[1,217],67:ot,82:218,116:gt,117:ht,118:st},t(Ir,[2,86]),t(Ir,[2,88]),t(Ir,[2,89]),t(Ir,[2,153]),t(Ir,[2,154]),t(Ir,[2,155]),t(Ir,[2,156]),{49:[1,219],67:ot,82:218,116:gt,117:ht,118:st},{30:220,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{51:[1,221],67:ot,82:218,116:gt,117:ht,118:st},{53:[1,222],67:ot,82:218,116:gt,117:ht,118:st},{55:[1,223],67:ot,82:218,116:gt,117:ht,118:st},{57:[1,224],67:ot,82:218,116:gt,117:ht,118:st},{60:[1,225]},{64:[1,226],67:ot,82:218,116:gt,117:ht,118:st},{66:[1,227],67:ot,82:218,116:gt,117:ht,118:st},{30:228,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},{31:[1,229],67:ot,82:218,116:gt,117:ht,118:st},{67:ot,69:[1,230],71:[1,231],82:218,116:gt,117:ht,118:st},{67:ot,69:[1,233],71:[1,232],82:218,116:gt,117:ht,118:st},t(X,[2,45],{18:155,10:P,40:Dt}),t(X,[2,47],{44:nt}),t(pe,[2,75]),t(pe,[2,74]),{62:[1,234],67:ot,82:218,116:gt,117:ht,118:st},t(pe,[2,77]),t(Br,[2,80]),{77:[1,235],79:197,116:qe,119:Le},{30:236,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},t(Ue,a,{5:237}),t(wt,[2,102]),t(B,[2,35]),{43:238,44:g,45:39,47:40,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L},{10:P,18:239},{10:er,60:Zt,84:wr,92:240,105:xt,107:241,108:242,109:Se,110:tt,111:St,112:pr},{10:er,60:Zt,84:wr,92:251,104:[1,252],105:xt,107:241,108:242,109:Se,110:tt,111:St,112:pr},{10:er,60:Zt,84:wr,92:253,104:[1,254],105:xt,107:241,108:242,109:Se,110:tt,111:St,112:pr},{105:[1,255]},{10:er,60:Zt,84:wr,92:256,105:xt,107:241,108:242,109:Se,110:tt,111:St,112:pr},{44:g,47:257,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L},t(ut,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},t(ut,[2,116]),t(ut,[2,118],{10:[1,261]}),t(ut,[2,119]),t(be,[2,56]),t(Ir,[2,87]),t(be,[2,57]),{51:[1,262],67:ot,82:218,116:gt,117:ht,118:st},t(be,[2,64]),t(be,[2,59]),t(be,[2,60]),t(be,[2,61]),{109:[1,263]},t(be,[2,63]),t(be,[2,65]),{66:[1,264],67:ot,82:218,116:gt,117:ht,118:st},t(be,[2,67]),t(be,[2,68]),t(be,[2,70]),t(be,[2,69]),t(be,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(pe,[2,78]),{31:[1,265],67:ot,82:218,116:gt,117:ht,118:st},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,266],33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,84:v,85:y,86:b,87:w,88:S,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L,121:_,122:D,123:N,124:O},t(ne,[2,53]),{43:267,44:g,45:39,47:40,60:m,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L},t(ut,[2,121],{106:vn}),t(cn,[2,130],{108:269,10:er,60:Zt,84:wr,105:xt,109:Se,110:tt,111:St,112:pr}),t(Jr,[2,132]),t(Jr,[2,134]),t(Jr,[2,135]),t(Jr,[2,136]),t(Jr,[2,137]),t(Jr,[2,138]),t(Jr,[2,139]),t(Jr,[2,140]),t(Jr,[2,141]),t(ut,[2,122],{106:vn}),{10:[1,270]},t(ut,[2,123],{106:vn}),{10:[1,271]},t(mn,[2,129]),t(ut,[2,105],{106:vn}),t(ut,[2,106],{113:112,44:g,60:m,89:T,102:E,105:A,106:C,109:I,111:M,114:R,115:k,116:L}),t(ut,[2,110]),t(ut,[2,112],{10:[1,272]}),t(ut,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:G,9:$,11:U,21:277},t(B,[2,34]),t(ne,[2,52]),{10:er,60:Zt,84:wr,105:xt,107:278,108:242,109:Se,110:tt,111:St,112:pr},t(Jr,[2,133]),{14:Y,44:oe,60:Q,89:ue,101:279,105:re,106:te,109:Z,111:j,114:ae,115:K,116:de,120:87},{14:Y,44:oe,60:Q,89:ue,101:280,105:re,106:te,109:Z,111:j,114:ae,115:K,116:de,120:87},{98:[1,281]},t(ut,[2,120]),t(be,[2,58]),{30:282,67:ot,80:Qe,81:dt,82:171,116:gt,117:ht,118:st},t(be,[2,66]),t(Ue,a,{5:283}),t(cn,[2,131],{108:269,10:er,60:Zt,84:wr,105:xt,109:Se,110:tt,111:St,112:pr}),t(ut,[2,126],{120:167,10:[1,284],14:Y,44:oe,60:Q,89:ue,105:re,106:te,109:Z,111:j,114:ae,115:K,116:de}),t(ut,[2,127],{120:167,10:[1,285],14:Y,44:oe,60:Q,89:ue,105:re,106:te,109:Z,111:j,114:ae,115:K,116:de}),t(ut,[2,114]),{31:[1,286],67:ot,82:218,116:gt,117:ht,118:st},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,287],33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,84:v,85:y,86:b,87:w,88:S,89:T,102:E,105:A,106:C,109:I,111:M,113:41,114:R,115:k,116:L,121:_,122:D,123:N,124:O},{10:er,60:Zt,84:wr,92:288,105:xt,107:241,108:242,109:Se,110:tt,111:St,112:pr},{10:er,60:Zt,84:wr,92:289,105:xt,107:241,108:242,109:Se,110:tt,111:St,112:pr},t(be,[2,62]),t(B,[2,33]),t(ut,[2,124],{106:vn}),t(ut,[2,125],{106:vn})],defaultActions:{},parseError:x(function(et,mt){if(mt.recoverable)this.trace(et);else{var Gt=new Error(et);throw Gt.hash=mt,Gt}},"parseError"),parse:x(function(et){var mt=this,Gt=[0],at=[],Tr=[null],ge=[],Fl=this.table,xe="",qr=0,t4=0,qS=0,WS=2,PB=1,t2e=ge.slice.call(arguments,1),Mi=Object.create(this.lexer),Wf={yy:{}};for(var HS in this.yy)Object.prototype.hasOwnProperty.call(this.yy,HS)&&(Wf.yy[HS]=this.yy[HS]);Mi.setInput(et,Wf.yy),Wf.yy.lexer=Mi,Wf.yy.parser=this,typeof Mi.yylloc>"u"&&(Mi.yylloc={});var YS=Mi.yylloc;ge.push(YS);var r2e=Mi.options&&Mi.options.ranges;typeof Wf.yy.parseError=="function"?this.parseError=Wf.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function n2e(Us){Gt.length=Gt.length-2*Us,Tr.length=Tr.length-Us,ge.length=ge.length-Us}x(n2e,"popStack");function BB(){var Us;return Us=at.pop()||Mi.lex()||PB,typeof Us!="number"&&(Us instanceof Array&&(at=Us,Us=at.pop()),Us=mt.symbols_[Us]||Us),Us}x(BB,"lex");for(var Ba,XS,Hf,po,htt,jS,Q0={},r4,Kc,FB,n4;;){if(Hf=Gt[Gt.length-1],this.defaultActions[Hf]?po=this.defaultActions[Hf]:((Ba===null||typeof Ba>"u")&&(Ba=BB()),po=Fl[Hf]&&Fl[Hf][Ba]),typeof po>"u"||!po.length||!po[0]){var KS="";n4=[];for(r4 in Fl[Hf])this.terminals_[r4]&&r4>WS&&n4.push("'"+this.terminals_[r4]+"'");Mi.showPosition?KS="Parse error on line "+(qr+1)+`: `+Mi.showPosition()+` Expecting `+n4.join(", ")+", got '"+(this.terminals_[Ba]||Ba)+"'":KS="Parse error on line "+(qr+1)+": Unexpected "+(Ba==PB?"end of input":"'"+(this.terminals_[Ba]||Ba)+"'"),this.parseError(KS,{text:Mi.match,token:this.terminals_[Ba]||Ba,line:Mi.yylineno,loc:YS,expected:n4})}if(po[0]instanceof Array&&po.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Hf+", token: "+Ba);switch(po[0]){case 1:Gt.push(Ba),Tr.push(Mi.yytext),ge.push(Mi.yylloc),Gt.push(po[1]),Ba=null,XS?(Ba=XS,XS=null):(t4=Mi.yyleng,xe=Mi.yytext,qr=Mi.yylineno,YS=Mi.yylloc,qS>0&&qS--);break;case 2:if(Kc=this.productions_[po[1]][1],Q0.$=Tr[Tr.length-Kc],Q0._$={first_line:ge[ge.length-(Kc||1)].first_line,last_line:ge[ge.length-1].last_line,first_column:ge[ge.length-(Kc||1)].first_column,last_column:ge[ge.length-1].last_column},r2e&&(Q0._$.range=[ge[ge.length-(Kc||1)].range[0],ge[ge.length-1].range[1]]),jS=this.performAction.apply(Q0,[xe,t4,qr,Wf.yy,po[1],Tr,ge].concat(t2e)),typeof jS<"u")return jS;Kc&&(Gt=Gt.slice(0,-1*Kc*2),Tr=Tr.slice(0,-1*Kc),ge=ge.slice(0,-1*Kc)),Gt.push(this.productions_[po[1]][0]),Tr.push(Q0.$),ge.push(Q0._$),FB=Fl[Gt[Gt.length-2]][Gt[Gt.length-1]],Gt.push(FB);break;case 3:return!0}}return!0},"parse")},vs=function(){var tr={EOF:1,parseError:x(function(mt,Gt){if(this.yy.parser)this.yy.parser.parseError(mt,Gt);else throw new Error(mt)},"parseError"),setInput:x(function(et,mt){return this.yy=mt||this.yy||{},this._input=et,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var et=this._input[0];this.yytext+=et,this.yyleng++,this.offset++,this.match+=et,this.matched+=et;var mt=et.match(/(?:\r\n?|\n).*/g);return mt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),et},"input"),unput:x(function(et){var mt=et.length,Gt=et.split(/(?:\r\n?|\n)/g);this._input=et+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-mt),this.offset-=mt;var at=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Gt.length-1&&(this.yylineno-=Gt.length-1);var Tr=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Gt?(Gt.length===at.length?this.yylloc.first_column:0)+at[at.length-Gt.length].length-Gt[0].length:this.yylloc.first_column-mt},this.options.ranges&&(this.yylloc.range=[Tr[0],Tr[0]+this.yyleng-mt]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(et){this.unput(this.match.slice(et))},"less"),pastInput:x(function(){var et=this.matched.substr(0,this.matched.length-this.match.length);return(et.length>20?"...":"")+et.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var et=this.match;return et.length<20&&(et+=this._input.substr(0,20-et.length)),(et.substr(0,20)+(et.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var et=this.pastInput(),mt=new Array(et.length+1).join("-");return et+this.upcomingInput()+` `+mt+"^"},"showPosition"),test_match:x(function(et,mt){var Gt,at,Tr;if(this.options.backtrack_lexer&&(Tr={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&&(Tr.yylloc.range=this.yylloc.range.slice(0))),at=et[0].match(/(?:\r\n?|\n).*/g),at&&(this.yylineno+=at.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:at?at[at.length-1].length-at[at.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+et[0].length},this.yytext+=et[0],this.match+=et[0],this.matches=et,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(et[0].length),this.matched+=et[0],Gt=this.performAction.call(this,this.yy,this,mt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Gt)return Gt;if(this._backtrack){for(var ge in Tr)this[ge]=Tr[ge];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var et,mt,Gt,at;this._more||(this.yytext="",this.match="");for(var Tr=this._currentRules(),ge=0;gemt[0].length)){if(mt=Gt,at=ge,this.options.backtrack_lexer){if(et=this.test_match(Gt,Tr[ge]),et!==!1)return et;if(this._backtrack){mt=!1;continue}else return!1}else if(!this.options.flex)break}return mt?(et=this.test_match(mt,Tr[at]),et!==!1?et:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var mt=this.next();return mt||this.lex()},"lex"),begin:x(function(mt){this.conditionStack.push(mt)},"begin"),popState:x(function(){var mt=this.conditionStack.length-1;return mt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(mt){return mt=this.conditionStack.length-1-Math.abs(mt||0),mt>=0?this.conditionStack[mt]:"INITIAL"},"topState"),pushState:x(function(mt){this.begin(mt)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(mt,Gt,at,Tr){var ge=Tr;switch(at){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),Gt.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let Fl=/\n\s*/g;return Gt.yytext=Gt.yytext.replace(Fl,"
    "),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return mt.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return mt.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return mt.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;break;case 45:return this.popState(),14;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;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;break;case 69:return this.pushState("edgeText"),75;break;case 70:return 119;case 71:return this.popState(),77;break;case 72:return this.pushState("thickEdgeText"),75;break;case 73:return 119;case 74:return this.popState(),77;break;case 75:return this.pushState("dottedEdgeText"),75;break;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;break;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;break;case 81:return this.popState(),55;break;case 82:return this.pushState("text"),54;break;case 83:return this.popState(),57;break;case 84:return this.pushState("text"),56;break;case 85:return 58;case 86:return this.pushState("text"),67;break;case 87:return this.popState(),64;break;case 88:return this.pushState("text"),63;break;case 89:return this.popState(),49;break;case 90:return this.pushState("text"),48;break;case 91:return this.popState(),69;break;case 92:return this.popState(),71;break;case 93:return 117;case 94:return this.pushState("trapText"),68;break;case 95:return this.pushState("trapText"),70;break;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;break;case 108:return this.pushState("text"),62;break;case 109:return this.popState(),51;break;case 110:return this.pushState("text"),50;break;case 111:return this.popState(),31;break;case 112:return this.pushState("text"),29;break;case 113:return this.popState(),66;break;case 114:return this.pushState("text"),65;break;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}}};return tr}();Di.lexer=vs;function Yi(){this.yy={}}return x(Yi,"Parser"),Yi.prototype=Di,Di.Parser=Yi,new Yi}();pN.parser=pN;Aue=pN,_ue=Object.assign({},Aue);_ue.parse=t=>{let e=t.replace(/}\s*\n/g,`} `);return Aue.parse(e)};K$e=_ue,Z$e=x((t,e)=>{let r=Xf,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return $a(n,i,a,e)},"fade"),Q$e=x(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } .cluster-label text { fill: ${t.titleColor}; } .cluster-label span { color: ${t.titleColor}; } .cluster-label span p { background-color: transparent; } .label text,span { fill: ${t.nodeTextColor||t.textColor}; color: ${t.nodeTextColor||t.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: 1px; } .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { text-anchor: middle; } // .flowchart-label .text-outer-tspan { // text-anchor: middle; // } // .flowchart-label .text-inner-tspan { // text-anchor: start; // } .node .katex path { fill: #000; stroke: #000; stroke-width: 1px; } .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { text-align: center; } .node.clickable { cursor: pointer; } .root .anchor path { fill: ${t.lineColor} !important; stroke-width: 0; stroke: ${t.lineColor}; } .arrowheadPath { fill: ${t.arrowheadColor}; } .edgePath .path { stroke: ${t.lineColor}; stroke-width: 2.0px; } .flowchart-link { stroke: ${t.lineColor}; fill: none; } .edgeLabel { background-color: ${t.edgeLabelBackground}; p { background-color: ${t.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${t.edgeLabelBackground}; fill: ${t.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${Z$e(t.edgeLabelBackground,.5)}; // background-color: } .cluster rect { fill: ${t.clusterBkg}; stroke: ${t.clusterBorder}; stroke-width: 1px; } .cluster text { fill: ${t.titleColor}; } .cluster span { color: ${t.titleColor}; } /* .cluster div { color: ${t.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${t.fontFamily}; font-size: 12px; background: ${t.tertiaryColor}; border: 1px solid ${t.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } rect.text { fill: none; stroke-width: 0; } .icon-shape, .image-shape { background-color: ${t.edgeLabelBackground}; p { background-color: ${t.edgeLabelBackground}; padding: 2px; } rect { opacity: 0.5; background-color: ${t.edgeLabelBackground}; fill: ${t.edgeLabelBackground}; } text-align: center; } ${Mc()} `,"getStyles"),J$e=Q$e,eze={parser:K$e,get db(){return new H$e},renderer:j$e,styles:J$e,init:x(t=>{t.flowchart||(t.flowchart={}),t.layout&&xv({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,xv({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}});var Rue={};hr(Rue,{diagram:()=>oze});var gN,tze,rze,Lue,nze,ize,aze,sze,oze,Iue=F(()=>{El();Yo();Go();Io();Ks();Ls();ja();Ka();na();hn();vr();rr();cr();qs();gN=function(){var t=x(function(j,ae,K,de){for(K=K||{},de=j.length;de--;K[j[de]]=ae);return K},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],r=[1,10],n=[1,11],i=[1,12],a=[1,13],s=[1,20],o=[1,21],l=[1,22],u=[1,23],h=[1,24],f=[1,19],d=[1,25],p=[1,26],g=[1,18],m=[1,33],v=[1,34],y=[1,35],b=[1,36],w=[1,37],S=[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],T=[1,42],E=[1,43],A=[1,52],C=[40,50,68,69],I=[1,63],M=[1,61],R=[1,58],k=[1,62],L=[1,64],_=[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],D=[63,64,65,66,67],N=[1,81],O=[1,80],P=[1,78],B=[1,79],G=[6,10,42,47],$=[6,10,13,41,42,47,48,49],U=[1,89],X=[1,88],ee=[1,87],Y=[19,56],oe=[1,98],Q=[1,97],ue=[19,56,58,60],re={trace:x(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:x(function(ae,K,de,ne,be,W,Ve){var pe=W.length-1;switch(be){case 1:break;case 2:this.$=[];break;case 3:W[pe-1].push(W[pe]),this.$=W[pe-1];break;case 4:case 5:this.$=W[pe];break;case 6:case 7:this.$=[];break;case 8:ne.addEntity(W[pe-4]),ne.addEntity(W[pe-2]),ne.addRelationship(W[pe-4],W[pe],W[pe-2],W[pe-3]);break;case 9:ne.addEntity(W[pe-8]),ne.addEntity(W[pe-4]),ne.addRelationship(W[pe-8],W[pe],W[pe-4],W[pe-5]),ne.setClass([W[pe-8]],W[pe-6]),ne.setClass([W[pe-4]],W[pe-2]);break;case 10:ne.addEntity(W[pe-6]),ne.addEntity(W[pe-2]),ne.addRelationship(W[pe-6],W[pe],W[pe-2],W[pe-3]),ne.setClass([W[pe-6]],W[pe-4]);break;case 11:ne.addEntity(W[pe-6]),ne.addEntity(W[pe-4]),ne.addRelationship(W[pe-6],W[pe],W[pe-4],W[pe-5]),ne.setClass([W[pe-4]],W[pe-2]);break;case 12:ne.addEntity(W[pe-3]),ne.addAttributes(W[pe-3],W[pe-1]);break;case 13:ne.addEntity(W[pe-5]),ne.addAttributes(W[pe-5],W[pe-1]),ne.setClass([W[pe-5]],W[pe-3]);break;case 14:ne.addEntity(W[pe-2]);break;case 15:ne.addEntity(W[pe-4]),ne.setClass([W[pe-4]],W[pe-2]);break;case 16:ne.addEntity(W[pe]);break;case 17:ne.addEntity(W[pe-2]),ne.setClass([W[pe-2]],W[pe]);break;case 18:ne.addEntity(W[pe-6],W[pe-4]),ne.addAttributes(W[pe-6],W[pe-1]);break;case 19:ne.addEntity(W[pe-8],W[pe-6]),ne.addAttributes(W[pe-8],W[pe-1]),ne.setClass([W[pe-8]],W[pe-3]);break;case 20:ne.addEntity(W[pe-5],W[pe-3]);break;case 21:ne.addEntity(W[pe-7],W[pe-5]),ne.setClass([W[pe-7]],W[pe-2]);break;case 22:ne.addEntity(W[pe-3],W[pe-1]);break;case 23:ne.addEntity(W[pe-5],W[pe-3]),ne.setClass([W[pe-5]],W[pe]);break;case 24:case 25:this.$=W[pe].trim(),ne.setAccTitle(this.$);break;case 26:case 27:this.$=W[pe].trim(),ne.setAccDescription(this.$);break;case 32:ne.setDirection("TB");break;case 33:ne.setDirection("BT");break;case 34:ne.setDirection("RL");break;case 35:ne.setDirection("LR");break;case 36:this.$=W[pe-3],ne.addClass(W[pe-2],W[pe-1]);break;case 37:case 38:case 56:case 64:this.$=[W[pe]];break;case 39:case 40:this.$=W[pe-2].concat([W[pe]]);break;case 41:this.$=W[pe-2],ne.setClass(W[pe-1],W[pe]);break;case 42:this.$=W[pe-3],ne.addCssStyles(W[pe-2],W[pe-1]);break;case 43:this.$=[W[pe]];break;case 44:W[pe-2].push(W[pe]),this.$=W[pe-2];break;case 46:this.$=W[pe-1]+W[pe];break;case 54:case 76:case 77:this.$=W[pe].replace(/"/g,"");break;case 55:case 78:this.$=W[pe];break;case 57:W[pe].push(W[pe-1]),this.$=W[pe];break;case 58:this.$={type:W[pe-1],name:W[pe]};break;case 59:this.$={type:W[pe-2],name:W[pe-1],keys:W[pe]};break;case 60:this.$={type:W[pe-2],name:W[pe-1],comment:W[pe]};break;case 61:this.$={type:W[pe-3],name:W[pe-2],keys:W[pe-1],comment:W[pe]};break;case 62:case 63:case 66:this.$=W[pe];break;case 65:W[pe-2].push(W[pe]),this.$=W[pe-2];break;case 67:this.$=W[pe].replace(/"/g,"");break;case 68:this.$={cardA:W[pe],relType:W[pe-1],cardB:W[pe-2]};break;case 69:this.$=ne.Cardinality.ZERO_OR_ONE;break;case 70:this.$=ne.Cardinality.ZERO_OR_MORE;break;case 71:this.$=ne.Cardinality.ONE_OR_MORE;break;case 72:this.$=ne.Cardinality.ONLY_ONE;break;case 73:this.$=ne.Cardinality.MD_PARENT;break;case 74:this.$=ne.Identification.NON_IDENTIFYING;break;case 75:this.$=ne.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:n,26:i,28:a,29:14,30:15,31:16,32:17,33:s,34:o,35:l,36:u,37:h,40:f,43:d,44:p,50:g},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:r,24:n,26:i,28:a,29:14,30:15,31:16,32:17,33:s,34:o,35:l,36:u,37:h,40:f,43:d,44:p,50:g},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:m,64:v,65:y,66:b,67:w}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(S,[2,54]),t(S,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:T,41:E},{16:44,40:T,41:E},{16:45,40:T,41:E},t(e,[2,4]),{11:46,40:f,50:g},{16:47,40:T,41:E},{18:48,19:[1,49],51:50,52:51,56:A},{11:53,40:f,50:g},{62:54,68:[1,55],69:[1,56]},t(C,[2,69]),t(C,[2,70]),t(C,[2,71]),t(C,[2,72]),t(C,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:I,38:57,41:M,42:R,45:59,46:60,48:k,49:L},t(_,[2,37]),t(_,[2,38]),{16:65,40:T,41:E,42:R},{13:I,38:66,41:M,42:R,45:59,46:60,48:k,49:L},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:R,63:m,64:v,65:y,66:b,67:w}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:A},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:m,64:v,65:y,66:b,67:w},t(D,[2,74]),t(D,[2,75]),{6:N,10:O,39:77,42:P,47:B},{40:[1,82],41:[1,83]},t(G,[2,43],{46:84,13:I,41:M,48:k,49:L}),t($,[2,45]),t($,[2,50]),t($,[2,51]),t($,[2,52]),t($,[2,53]),t(e,[2,41],{42:R}),{6:N,10:O,39:85,42:P,47:B},{14:86,40:U,50:X,70:ee},{16:90,40:T,41:E},{11:91,40:f,50:g},{18:92,19:[1,93],51:50,52:51,56:A},t(e,[2,12]),{19:[2,57]},t(Y,[2,58],{54:94,55:95,57:96,59:oe,60:Q}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:I,41:M,45:101,46:60,48:k,49:L},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(_,[2,39]),t(_,[2,40]),t($,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:R},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(Y,[2,59],{55:106,58:[1,107],60:Q}),t(Y,[2,60]),t(ue,[2,64]),t(Y,[2,67]),t(ue,[2,66]),{18:108,19:[1,109],51:50,52:51,56:A},{16:110,40:T,41:E},t(G,[2,44],{46:84,13:I,41:M,48:k,49:L}),{14:111,40:U,50:X,70:ee},{16:112,40:T,41:E},{14:113,40:U,50:X,70:ee},t(e,[2,13]),t(Y,[2,61]),{57:114,59:oe},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:R}),t(e,[2,11]),{13:[1,117],42:R},t(e,[2,10]),t(ue,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:A},{14:120,40:U,50:X,70:ee},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:x(function(ae,K){if(K.recoverable)this.trace(ae);else{var de=new Error(ae);throw de.hash=K,de}},"parseError"),parse:x(function(ae){var K=this,de=[0],ne=[],be=[null],W=[],Ve=this.table,pe="",Be=0,Ye=0,qe=0,Le=2,Me=1,Ne=W.slice.call(arguments,1),Ce=Object.create(this.lexer),Fe={yy:{}};for(var fe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,fe)&&(Fe.yy[fe]=this.yy[fe]);Ce.setInput(ae,Fe.yy),Fe.yy.lexer=Ce,Fe.yy.parser=this,typeof Ce.yylloc>"u"&&(Ce.yylloc={});var ye=Ce.yylloc;W.push(ye);var H=Ce.options&&Ce.options.ranges;typeof Fe.yy.parseError=="function"?this.parseError=Fe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(Ke){de.length=de.length-2*Ke,be.length=be.length-Ke,W.length=W.length-Ke}x(he,"popStack");function z(){var Ke;return Ke=ne.pop()||Ce.lex()||Me,typeof Ke!="number"&&(Ke instanceof Array&&(ne=Ke,Ke=ne.pop()),Ke=K.symbols_[Ke]||Ke),Ke}x(z,"lex");for(var se,le,ke,ve,me,Ie,_e={},ze,Xe,ft,We;;){if(ke=de[de.length-1],this.defaultActions[ke]?ve=this.defaultActions[ke]:((se===null||typeof se>"u")&&(se=z()),ve=Ve[ke]&&Ve[ke][se]),typeof ve>"u"||!ve.length||!ve[0]){var Oe="";We=[];for(ze in Ve[ke])this.terminals_[ze]&&ze>Le&&We.push("'"+this.terminals_[ze]+"'");Ce.showPosition?Oe="Parse error on line "+(Be+1)+`: `+Ce.showPosition()+` Expecting `+We.join(", ")+", got '"+(this.terminals_[se]||se)+"'":Oe="Parse error on line "+(Be+1)+": Unexpected "+(se==Me?"end of input":"'"+(this.terminals_[se]||se)+"'"),this.parseError(Oe,{text:Ce.match,token:this.terminals_[se]||se,line:Ce.yylineno,loc:ye,expected:We})}if(ve[0]instanceof Array&&ve.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ke+", token: "+se);switch(ve[0]){case 1:de.push(se),be.push(Ce.yytext),W.push(Ce.yylloc),de.push(ve[1]),se=null,le?(se=le,le=null):(Ye=Ce.yyleng,pe=Ce.yytext,Be=Ce.yylineno,ye=Ce.yylloc,qe>0&&qe--);break;case 2:if(Xe=this.productions_[ve[1]][1],_e.$=be[be.length-Xe],_e._$={first_line:W[W.length-(Xe||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(Xe||1)].first_column,last_column:W[W.length-1].last_column},H&&(_e._$.range=[W[W.length-(Xe||1)].range[0],W[W.length-1].range[1]]),Ie=this.performAction.apply(_e,[pe,Ye,Be,Fe.yy,ve[1],be,W].concat(Ne)),typeof Ie<"u")return Ie;Xe&&(de=de.slice(0,-1*Xe*2),be=be.slice(0,-1*Xe),W=W.slice(0,-1*Xe)),de.push(this.productions_[ve[1]][0]),be.push(_e.$),W.push(_e._$),ft=Ve[de[de.length-2]][de[de.length-1]],de.push(ft);break;case 3:return!0}}return!0},"parse")},te=function(){var j={EOF:1,parseError:x(function(K,de){if(this.yy.parser)this.yy.parser.parseError(K,de);else throw new Error(K)},"parseError"),setInput:x(function(ae,K){return this.yy=K||this.yy||{},this._input=ae,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var ae=this._input[0];this.yytext+=ae,this.yyleng++,this.offset++,this.match+=ae,this.matched+=ae;var K=ae.match(/(?:\r\n?|\n).*/g);return K?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ae},"input"),unput:x(function(ae){var K=ae.length,de=ae.split(/(?:\r\n?|\n)/g);this._input=ae+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-K),this.offset-=K;var ne=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),de.length-1&&(this.yylineno-=de.length-1);var be=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:de?(de.length===ne.length?this.yylloc.first_column:0)+ne[ne.length-de.length].length-de[0].length:this.yylloc.first_column-K},this.options.ranges&&(this.yylloc.range=[be[0],be[0]+this.yyleng-K]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(ae){this.unput(this.match.slice(ae))},"less"),pastInput:x(function(){var ae=this.matched.substr(0,this.matched.length-this.match.length);return(ae.length>20?"...":"")+ae.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var ae=this.match;return ae.length<20&&(ae+=this._input.substr(0,20-ae.length)),(ae.substr(0,20)+(ae.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var ae=this.pastInput(),K=new Array(ae.length+1).join("-");return ae+this.upcomingInput()+` `+K+"^"},"showPosition"),test_match:x(function(ae,K){var de,ne,be;if(this.options.backtrack_lexer&&(be={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&&(be.yylloc.range=this.yylloc.range.slice(0))),ne=ae[0].match(/(?:\r\n?|\n).*/g),ne&&(this.yylineno+=ne.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ne?ne[ne.length-1].length-ne[ne.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ae[0].length},this.yytext+=ae[0],this.match+=ae[0],this.matches=ae,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(ae[0].length),this.matched+=ae[0],de=this.performAction.call(this,this.yy,this,K,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),de)return de;if(this._backtrack){for(var W in be)this[W]=be[W];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ae,K,de,ne;this._more||(this.yytext="",this.match="");for(var be=this._currentRules(),W=0;WK[0].length)){if(K=de,ne=W,this.options.backtrack_lexer){if(ae=this.test_match(de,be[W]),ae!==!1)return ae;if(this._backtrack){K=!1;continue}else return!1}else if(!this.options.flex)break}return K?(ae=this.test_match(K,be[ne]),ae!==!1?ae:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var K=this.next();return K||this.lex()},"lex"),begin:x(function(K){this.conditionStack.push(K)},"begin"),popState:x(function(){var K=this.conditionStack.length-1;return K>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(K){return K=this.conditionStack.length-1-Math.abs(K||0),K>=0?this.conditionStack[K]:"INITIAL"},"topState"),pushState:x(function(K){this.begin(K)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(K,de,ne,be){var W=be;switch(ne){case 0:return this.begin("acc_title"),24;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),26;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;break;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:return 56;case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;break;case 30:return de.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;break;case 34:return this.popState(),10;break;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;break;case 40:return 43;case 41:return 63;case 42:return 65;case 43:return 65;case 44:return 65;case 45:return 63;case 46:return 63;case 47:return 64;case 48:return 64;case 49:return 64;case 50:return 64;case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:return 66;case 56:return 66;case 57:return 66;case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:return 69;case 65:return 69;case 66:return 68;case 67:return 68;case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return de.yytext[0];case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};return j}();re.lexer=te;function Z(){this.yy={}}return x(Z,"Parser"),Z.prototype=re,re.Parser=Z,new Z}();gN.parser=gN;tze=gN,rze=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Er,this.getAccTitle=Cr,this.setAccDescription=Ar,this.getAccDescription=_r,this.setDiagramTitle=Dr,this.getDiagramTitle=Lr,this.getConfig=x(()=>we().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{x(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,J.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:we().look??"default",cssClasses:"default",cssStyles:[]}),J.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;n>=0;n--)e[n].keys||(e[n].keys=[]),e[n].comment||(e[n].comment=""),r.attributes.push(e[n]),J.debug("Added attribute ",e[n].name)}addRelationship(t,e,r,n){let i=this.entities.get(t),a=this.entities.get(r);if(!i||!a)return;let s={entityA:i.id,roleA:e,entityB:a.id,relSpec:n};this.relationships.push(s),J.debug("Added new relationship :",s)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(let r of t){let n=this.classes.get(r);n?.styles&&(e=[...e,...n.styles??[]].map(i=>i.trim())),n?.textStyles&&(e=[...e,...n.textStyles??[]].map(i=>i.trim()))}return e}addCssStyles(t,e){for(let r of t){let n=this.entities.get(r);if(!e||!n)return;for(let i of e)n.cssStyles.push(i)}}addClass(t,e){t.forEach(r=>{let n=this.classes.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},this.classes.set(r,n)),e&&e.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)})})}setClass(t,e){for(let r of t){let n=this.entities.get(r);if(n)for(let i of e)n.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],mr()}getData(){let t=[],e=[],r=we();for(let i of this.entities.keys()){let a=this.entities.get(i);a&&(a.cssCompiledStyles=this.getCompiledStyles(a.cssClasses.split(" ")),t.push(a))}let n=0;for(let i of this.relationships){let a={id:$h(i.entityA,i.entityB,{prefix:"id",counter:n++}),type:"normal",curve:"basis",start:i.entityA,end:i.entityB,label:i.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:i.relSpec.cardB.toLowerCase(),arrowTypeEnd:i.relSpec.cardA.toLowerCase(),pattern:i.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:r.look};e.push(a)}return{nodes:t,edges:e,other:{},config:r,direction:"TB"}}},Lue={};ah(Lue,{draw:()=>nze});nze=x(async function(t,e,r,n){J.info("REF0:"),J.info("Drawing er diagram (unified)",e);let{securityLevel:i,er:a,layout:s}=we(),o=n.db.getData(),l=Ho(e,i);o.type=n.type,o.layoutAlgorithm=Ic(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 zo(o,l),o.layoutAlgorithm==="elk"&&l.select(".edges").lower();let u=l.selectAll('[id*="-background"]');Array.from(u).length>0&&u.each(function(){let f=He(this),p=f.attr("id").replace("-background",""),g=l.select(`#${CSS.escape(p)}`);if(!g.empty()){let m=g.attr("transform");f.attr("transform",m)}});let h=8;zt.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Bs(l,h,"erDiagram",a?.useMaxWidth??!0)},"draw"),ize=x((t,e)=>{let r=Xf,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return $a(n,i,a,e)},"fade"),aze=x(t=>` .entityBox { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; } .relationshipLabelBox { fill: ${t.tertiaryColor}; opacity: 0.7; background-color: ${t.tertiaryColor}; rect { opacity: 0.5; } } .labelBkg { background-color: ${ize(t.tertiaryColor,.5)}; } .edgeLabel .label { fill: ${t.nodeBorder}; font-size: 14px; } .label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } .edge-pattern-dashed { stroke-dasharray: 8,8; } .node rect, .node circle, .node ellipse, .node polygon { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: 1px; } .relationshipLine { stroke: ${t.lineColor}; stroke-width: 1; fill: none; } .marker { fill: none !important; stroke: ${t.lineColor} !important; stroke-width: 1; } `,"getStyles"),sze=aze,oze={parser:tze,get db(){return new rze},renderer:Lue,styles:sze}});function io(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var f0=F(()=>{rr();x(io,"populateCommonDb")});var Xk,mN=F(()=>{rr();Xk=class{constructor(t){this.init=t,this.records=this.init()}static{x(this,"ImperativeState")}reset(){this.records=this.init()}}});function ti(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function da(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"}function vN(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function p0(t){return typeof t=="object"&&t!==null&&ti(t.container)&&da(t.reference)&&typeof t.message=="string"}function Sl(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Cf(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Y2(t){return Sl(t)&&typeof t.fullText=="string"}var d0,Cl=F(()=>{d0=class{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,r){return ti(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});let i=n[r];if(i!==void 0)return i;{let a=this.computeIsSubtype(e,r);return n[r]=a,a}}getAllSubTypes(e){let r=this.allSubtypes[e];if(r)return r;{let n=this.getAllTypes(),i=[];for(let a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}});function lze(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function jk(t){return!!t&&typeof t[Symbol.iterator]=="function"}function Qr(...t){if(t.length===1){let e=t[0];if(e instanceof ao)return e;if(jk(e))return new ao(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new ao(()=>({index:0}),r=>r.index1?new ao(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){let r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex{ao=class t{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){let e=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){let n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new t(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Ra})}join(e=","){let r=this.iterator(),n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=lze(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){let n=this.iterator(),i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new t(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?Ra:{done:!1,value:e(i)}})}filter(e){return new t(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Ra})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){let n=this.iterator(),i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){let i=e.next();if(i.done)return n;let a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}let{done:n,value:i}=this.nextFn(r.this);if(!n){let a=e(i);if(jk(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Ra})}flat(e){if(e===void 0&&(e=1),e<=0)return this;let r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}let{done:i,value:a}=r.nextFn(n.this);if(!i)if(jk(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Ra})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new t(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Ra:this.nextFn(r.state)))}distinct(e){return new t(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Ra})}exclude(e,r){let n=new Set;for(let i of e){let a=r?r(i):i;n.add(a)}return this.filter(i=>{let a=r?r(i):i;return!n.has(a)})}};X2=new ao(()=>{},()=>Ra),Ra=Object.freeze({done:!0,value:void 0});Oc=class extends ao{constructor(e,r,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return Ra})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}};(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(jg||(jg={}))});var Zk={};hr(Zk,{DefaultNameRegexp:()=>Kk,RangeComparison:()=>Pc,compareRange:()=>Due,findCommentNode:()=>wN,findDeclarationNodeAtOffset:()=>uze,findLeafNodeAtOffset:()=>TN,findLeafNodeBeforeOffset:()=>Mue,flattenCst:()=>cze,getInteriorNodes:()=>dze,getNextNode:()=>hze,getPreviousNode:()=>Pue,getStartlineNode:()=>fze,inRange:()=>bN,isChildNode:()=>xN,isCommentNode:()=>yN,streamCst:()=>g0,toDocumentSegment:()=>m0,tokenToRange:()=>Kg});function g0(t){return new Oc(t,e=>Sl(e)?e.content:[],{includeRoot:!0})}function cze(t){return g0(t).filter(Cf)}function xN(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Kg(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function m0(t){if(!t)return;let{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}function Due(t,e){if(t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Pc.After;let r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.linePc.After}function uze(t,e,r=Kk){if(t){if(e>0){let n=e-t.offset,i=t.text.charAt(n);r.test(i)||e--}return TN(t,e)}}function wN(t,e){if(t){let r=Pue(t,!0);if(r&&yN(r,e))return r;if(Y2(t)){let n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let a=t.content[i];if(yN(a,e))return a}}}}function yN(t,e){return Cf(t)&&e.includes(t.tokenType.name)}function TN(t,e){if(Cf(t))return t;if(Sl(t)){let r=Oue(t,e,!1);if(r)return TN(r,e)}}function Mue(t,e){if(Cf(t))return t;if(Sl(t)){let r=Oue(t,e,!0);if(r)return Mue(r,e)}}function Oue(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){let 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 Pue(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t);for(;n>0;){n--;let i=r.content[n];if(e||!i.hidden)return i}t=r}}function hze(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t),i=r.content.length-1;for(;n{Cl();Fs();(function(t){t[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"})(Pc||(Pc={}));Kk=/^[\w\p{L}]$/u});function Bc(t){throw new Error("Error! The input value was not handled.")}var v0,Qk=F(()=>{v0=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}});var nx={};hr(nx,{AbstractElement:()=>Jg,AbstractRule:()=>Zg,AbstractType:()=>Qg,Action:()=>ym,Alternatives:()=>xm,ArrayLiteral:()=>em,ArrayType:()=>tm,Assignment:()=>bm,BooleanLiteral:()=>rm,CharacterRange:()=>wm,Condition:()=>j2,Conjunction:()=>nm,CrossReference:()=>Tm,Disjunction:()=>im,EndOfFile:()=>km,Grammar:()=>am,GrammarImport:()=>Z2,Group:()=>Em,InferredType:()=>sm,Interface:()=>om,Keyword:()=>Sm,LangiumGrammarAstReflection:()=>Om,LangiumGrammarTerminals:()=>gze,NamedArgument:()=>Q2,NegatedToken:()=>Cm,Negation:()=>lm,NumberLiteral:()=>cm,Parameter:()=>um,ParameterReference:()=>hm,ParserRule:()=>fm,ReferenceType:()=>dm,RegexToken:()=>Am,ReturnType:()=>J2,RuleCall:()=>_m,SimpleType:()=>pm,StringLiteral:()=>gm,TerminalAlternatives:()=>Lm,TerminalGroup:()=>Rm,TerminalRule:()=>y0,TerminalRuleCall:()=>Im,Type:()=>mm,TypeAttribute:()=>ex,TypeDefinition:()=>Jk,UnionType:()=>vm,UnorderedGroup:()=>Nm,UntilToken:()=>Dm,ValueLiteral:()=>K2,Wildcard:()=>Mm,isAbstractElement:()=>tx,isAbstractRule:()=>mze,isAbstractType:()=>vze,isAction:()=>$u,isAlternatives:()=>n6,isArrayLiteral:()=>Tze,isArrayType:()=>kN,isAssignment:()=>_l,isBooleanLiteral:()=>EN,isCharacterRange:()=>NN,isCondition:()=>yze,isConjunction:()=>SN,isCrossReference:()=>x0,isDisjunction:()=>CN,isEndOfFile:()=>DN,isFeatureName:()=>xze,isGrammar:()=>kze,isGrammarImport:()=>Eze,isGroup:()=>Af,isInferredType:()=>e6,isInterface:()=>t6,isKeyword:()=>Xo,isNamedArgument:()=>Sze,isNegatedToken:()=>MN,isNegation:()=>AN,isNumberLiteral:()=>Cze,isParameter:()=>Aze,isParameterReference:()=>_N,isParserRule:()=>Ia,isPrimitiveType:()=>Bue,isReferenceType:()=>LN,isRegexToken:()=>ON,isReturnType:()=>RN,isRuleCall:()=>Ll,isSimpleType:()=>r6,isStringLiteral:()=>_ze,isTerminalAlternatives:()=>PN,isTerminalGroup:()=>BN,isTerminalRule:()=>so,isTerminalRuleCall:()=>i6,isType:()=>rx,isTypeAttribute:()=>Lze,isTypeDefinition:()=>bze,isUnionType:()=>IN,isUnorderedGroup:()=>a6,isUntilToken:()=>FN,isValueLiteral:()=>wze,isWildcard:()=>$N,reflection:()=>ir});function mze(t){return ir.isInstance(t,Zg)}function vze(t){return ir.isInstance(t,Qg)}function yze(t){return ir.isInstance(t,j2)}function xze(t){return Bue(t)||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"||typeof t=="string"&&/\^?[_a-zA-Z][\w_]*/.test(t)}function Bue(t){return t==="string"||t==="number"||t==="boolean"||t==="Date"||t==="bigint"}function bze(t){return ir.isInstance(t,Jk)}function wze(t){return ir.isInstance(t,K2)}function tx(t){return ir.isInstance(t,Jg)}function Tze(t){return ir.isInstance(t,em)}function kN(t){return ir.isInstance(t,tm)}function EN(t){return ir.isInstance(t,rm)}function SN(t){return ir.isInstance(t,nm)}function CN(t){return ir.isInstance(t,im)}function kze(t){return ir.isInstance(t,am)}function Eze(t){return ir.isInstance(t,Z2)}function e6(t){return ir.isInstance(t,sm)}function t6(t){return ir.isInstance(t,om)}function Sze(t){return ir.isInstance(t,Q2)}function AN(t){return ir.isInstance(t,lm)}function Cze(t){return ir.isInstance(t,cm)}function Aze(t){return ir.isInstance(t,um)}function _N(t){return ir.isInstance(t,hm)}function Ia(t){return ir.isInstance(t,fm)}function LN(t){return ir.isInstance(t,dm)}function RN(t){return ir.isInstance(t,J2)}function r6(t){return ir.isInstance(t,pm)}function _ze(t){return ir.isInstance(t,gm)}function so(t){return ir.isInstance(t,y0)}function rx(t){return ir.isInstance(t,mm)}function Lze(t){return ir.isInstance(t,ex)}function IN(t){return ir.isInstance(t,vm)}function $u(t){return ir.isInstance(t,ym)}function n6(t){return ir.isInstance(t,xm)}function _l(t){return ir.isInstance(t,bm)}function NN(t){return ir.isInstance(t,wm)}function x0(t){return ir.isInstance(t,Tm)}function DN(t){return ir.isInstance(t,km)}function Af(t){return ir.isInstance(t,Em)}function Xo(t){return ir.isInstance(t,Sm)}function MN(t){return ir.isInstance(t,Cm)}function ON(t){return ir.isInstance(t,Am)}function Ll(t){return ir.isInstance(t,_m)}function PN(t){return ir.isInstance(t,Lm)}function BN(t){return ir.isInstance(t,Rm)}function i6(t){return ir.isInstance(t,Im)}function a6(t){return ir.isInstance(t,Nm)}function FN(t){return ir.isInstance(t,Dm)}function $N(t){return ir.isInstance(t,Mm)}var gze,Zg,Qg,j2,Jk,K2,Jg,em,tm,rm,nm,im,am,Z2,sm,om,Q2,lm,cm,um,hm,fm,dm,J2,pm,gm,y0,mm,ex,vm,ym,xm,bm,wm,Tm,km,Em,Sm,Cm,Am,_m,Lm,Rm,Im,Nm,Dm,Mm,Om,ir,Fc=F(()=>{Cl();gze={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]*/},Zg="AbstractRule";Qg="AbstractType";j2="Condition";Jk="TypeDefinition";K2="ValueLiteral";Jg="AbstractElement";em="ArrayLiteral";tm="ArrayType";rm="BooleanLiteral";nm="Conjunction";im="Disjunction";am="Grammar";Z2="GrammarImport";sm="InferredType";om="Interface";Q2="NamedArgument";lm="Negation";cm="NumberLiteral";um="Parameter";hm="ParameterReference";fm="ParserRule";dm="ReferenceType";J2="ReturnType";pm="SimpleType";gm="StringLiteral";y0="TerminalRule";mm="Type";ex="TypeAttribute";vm="UnionType";ym="Action";xm="Alternatives";bm="Assignment";wm="CharacterRange";Tm="CrossReference";km="EndOfFile";Em="Group";Sm="Keyword";Cm="NegatedToken";Am="RegexToken";_m="RuleCall";Lm="TerminalAlternatives";Rm="TerminalGroup";Im="TerminalRuleCall";Nm="UnorderedGroup";Dm="UntilToken";Mm="Wildcard";Om=class extends d0{getAllTypes(){return[Jg,Zg,Qg,ym,xm,em,tm,bm,rm,wm,j2,nm,Tm,im,km,am,Z2,Em,sm,om,Sm,Q2,Cm,lm,cm,um,hm,fm,dm,Am,J2,_m,pm,gm,Lm,Rm,y0,Im,mm,ex,Jk,vm,Nm,Dm,K2,Mm]}computeIsSubtype(e,r){switch(e){case ym:case xm:case bm:case wm:case Tm:case km:case Em:case Sm:case Cm:case Am:case _m:case Lm:case Rm:case Im:case Nm:case Dm:case Mm:return this.isSubtype(Jg,r);case em:case cm:case gm:return this.isSubtype(K2,r);case tm:case dm:case pm:case vm:return this.isSubtype(Jk,r);case rm:return this.isSubtype(j2,r)||this.isSubtype(K2,r);case nm:case im:case lm:case hm:return this.isSubtype(j2,r);case sm:case om:case mm:return this.isSubtype(Qg,r);case fm:return this.isSubtype(Zg,r)||this.isSubtype(Qg,r);case y0:return this.isSubtype(Zg,r);default:return!1}}getReferenceType(e){let r=`${e.container.$type}:${e.property}`;switch(r){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return Qg;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Zg;case"Grammar:usedGrammars":return am;case"NamedArgument:parameter":case"ParameterReference:parameter":return um;case"TerminalRuleCall:rule":return y0;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case Jg:return{name:Jg,properties:[{name:"cardinality"},{name:"lookahead"}]};case em:return{name:em,properties:[{name:"elements",defaultValue:[]}]};case tm:return{name:tm,properties:[{name:"elementType"}]};case rm:return{name:rm,properties:[{name:"true",defaultValue:!1}]};case nm:return{name:nm,properties:[{name:"left"},{name:"right"}]};case im:return{name:im,properties:[{name:"left"},{name:"right"}]};case am:return{name:am,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 Z2:return{name:Z2,properties:[{name:"path"}]};case sm:return{name:sm,properties:[{name:"name"}]};case om:return{name:om,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case Q2:return{name:Q2,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case lm:return{name:lm,properties:[{name:"value"}]};case cm:return{name:cm,properties:[{name:"value"}]};case um:return{name:um,properties:[{name:"name"}]};case hm:return{name:hm,properties:[{name:"parameter"}]};case fm:return{name:fm,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 dm:return{name:dm,properties:[{name:"referenceType"}]};case J2:return{name:J2,properties:[{name:"name"}]};case pm:return{name:pm,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case gm:return{name:gm,properties:[{name:"value"}]};case y0:return{name:y0,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case mm:return{name:mm,properties:[{name:"name"},{name:"type"}]};case ex:return{name:ex,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case vm:return{name:vm,properties:[{name:"types",defaultValue:[]}]};case ym:return{name:ym,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case xm:return{name:xm,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case bm:return{name:bm,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case wm:return{name:wm,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case Tm:return{name:Tm,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case km:return{name:km,properties:[{name:"cardinality"},{name:"lookahead"}]};case Em:return{name:Em,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case Sm:return{name:Sm,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case Cm:return{name:Cm,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case Am:return{name:Am,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case _m:return{name:_m,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case Lm:return{name:Lm,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Rm:return{name:Rm,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Im:return{name:Im,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case Nm:return{name:Nm,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Dm:return{name:Dm,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case Mm:return{name:Mm,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},ir=new Om});var o6={};hr(o6,{assignMandatoryProperties:()=>VN,copyAstNode:()=>GN,findLocalReferences:()=>Ize,findRootNode:()=>ix,getContainerOfType:()=>b0,getDocument:()=>Na,hasContainerOfType:()=>Rze,linkContentToContainer:()=>s6,streamAllContents:()=>$c,streamAst:()=>jo,streamContents:()=>ax,streamReferences:()=>Pm});function s6(t){for(let[e,r]of Object.entries(t))e.startsWith("$")||(Array.isArray(r)?r.forEach((n,i)=>{ti(n)&&(n.$container=t,n.$containerProperty=e,n.$containerIndex=i)}):ti(r)&&(r.$container=t,r.$containerProperty=e))}function b0(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function Rze(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function Na(t){let r=ix(t).$document;if(!r)throw new Error("AST node has no document.");return r}function ix(t){for(;t.$container;)t=t.$container;return t}function ax(t,e){if(!t)throw new Error("Node must be an AstNode.");let r=e?.range;return new ao(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexax(r,e))}function jo(t,e){if(t){if(e?.range&&!zN(t,e.range))return new Oc(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new Oc(t,r=>ax(r,e),{includeRoot:!0})}function zN(t,e){var r;if(!e)return!0;let n=(r=t.$cstNode)===null||r===void 0?void 0:r.range;return n?bN(n,e):!1}function Pm(t){return new ao(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex{Pm(n).forEach(i=>{i.reference.ref===t&&r.push(i.reference)})}),Qr(r)}function VN(t,e){let r=t.getTypeMetaData(e.$type),n=e;for(let i of r.properties)i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=Fue(i.defaultValue))}function Fue(t){return Array.isArray(t)?[...t.map(Fue)]:t}function GN(t,e){let r={$type:t.$type};for(let[n,i]of Object.entries(t))if(!n.startsWith("$"))if(ti(i))r[n]=GN(i,e);else if(da(i))r[n]=e(r,n,i.$refNode,i.$refText);else if(Array.isArray(i)){let a=[];for(let s of i)ti(s)?a.push(GN(s,e)):da(s)?a.push(e(r,n,s.$refNode,s.$refText)):a.push(s);r[n]=a}else r[n]=i;return s6(r),r}var is=F(()=>{Cl();Fs();Al()});function Jt(t){return t.charCodeAt(0)}function l6(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function Bm(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function w0(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function sx(){throw Error("Internal Error - Should never get here!")}function UN(t){return t.type==="Character"}var qN=F(()=>{});var ox,lx,WN,$ue=F(()=>{qN();ox=[];for(let t=Jt("0");t<=Jt("9");t++)ox.push(t);lx=[Jt("_")].concat(ox);for(let t=Jt("a");t<=Jt("z");t++)lx.push(t);for(let t=Jt("A");t<=Jt("Z");t++)lx.push(t);WN=[Jt(" "),Jt("\f"),Jt(` `),Jt("\r"),Jt(" "),Jt("\v"),Jt(" "),Jt("\xA0"),Jt("\u1680"),Jt("\u2000"),Jt("\u2001"),Jt("\u2002"),Jt("\u2003"),Jt("\u2004"),Jt("\u2005"),Jt("\u2006"),Jt("\u2007"),Jt("\u2008"),Jt("\u2009"),Jt("\u200A"),Jt("\u2028"),Jt("\u2029"),Jt("\u202F"),Jt("\u205F"),Jt("\u3000"),Jt("\uFEFF")]});var Nze,c6,Dze,T0,zue=F(()=>{qN();$ue();Nze=/[0-9a-fA-F]/,c6=/[0-9]/,Dze=/[1-9]/,T0=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Bm(n,"global");break;case"i":Bm(n,"ignoreCase");break;case"m":Bm(n,"multiLine");break;case"u":Bm(n,"unicode");break;case"y":Bm(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}w0(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return sx()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;w0(r);break}if(!(e===!0&&r===void 0)&&w0(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),w0(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):sx()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Jt(` `),Jt("\r"),Jt("\u2028"),Jt("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=ox;break;case"D":e=ox,r=!0;break;case"s":e=WN;break;case"S":e=WN,r=!0;break;case"w":e=lx;break;case"W":e=lx,r=!0;break}return w0(e)?{type:"Set",value:e,complement:r}:sx()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Jt("\f");break;case"n":e=Jt(` `);break;case"r":e=Jt("\r");break;case"t":e=Jt(" ");break;case"v":e=Jt("\v");break}return w0(e)?{type:"Character",value:e}:sx()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Jt("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:Jt(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:Jt(e)}}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(UN(n)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),s=a.type==="Character";if(UN(a)){if(a.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}});var zc,Gue=F(()=>{zc=class{visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}});var cx=F(()=>{zue();Gue()});var u6={};hr(u6,{NEWLINE_REGEXP:()=>YN,escapeRegExp:()=>E0,getCaseInsensitivePattern:()=>jN,getTerminalParts:()=>Mze,isMultilineComment:()=>XN,isWhitespace:()=>Fm,partialMatches:()=>KN,partialRegExp:()=>que,whitespaceCharacters:()=>Uue});function Mze(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;let e=Vue.pattern(t),r=[];for(let n of e.value.value)k0.reset(t),k0.visit(n),r.push({start:k0.startRegexp,end:k0.endRegex});return r}catch{return[]}}function XN(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),k0.reset(t),k0.visit(Vue.pattern(t)),k0.multiline}catch{return!1}}function Fm(t){let e=typeof t=="string"?new RegExp(t):t;return Uue.some(r=>e.test(r))}function E0(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jN(t){return Array.prototype.map.call(t,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:E0(e)).join("")}function KN(t,e){let r=que(t),n=e.match(r);return!!n&&n[0].length>0}function que(t){typeof t=="string"&&(t=new RegExp(t));let e=t,r=t.source,n=0;function i(){let a="",s;function o(u){a+=r.substr(n,u),n+=u}function l(u){a+="(?:"+r.substr(n,u)+"|$)",n+=u}for(;n",n)-n+1);break;default:l(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g,s.lastIndex=n,s=s.exec(r)||[],l(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":s=/\{\d+,?\d*\}/g,s.lastIndex=n,s=s.exec(r),s?o(s[0].length):l(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":s=n,n+=3,i(),a+=r.substr(s,n-s);break;case"<":switch(r[n+3]){case"=":case"!":s=n,n+=4,i(),a+=r.substr(s,n-s);break;default:o(r.indexOf(">",n)-n+1),a+=i()+"|$)";break}break}else o(1),a+=i()+"|$)";break;case")":return++n,a;default:l(1);break}return a}return new RegExp(i(),t.flags)}var YN,Vue,HN,k0,Uue,$m=F(()=>{cx();YN=/\r?\n/gm,Vue=new T0,HN=class extends zc{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let r=String.fromCharCode(e.value);if(!this.multiline&&r===` `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=E0(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){let r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!` `.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},k0=new HN;Uue=`\f \r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("")});var f6={};hr(f6,{findAssignment:()=>aD,findNameAssignment:()=>h6,findNodeForKeyword:()=>nD,findNodeForProperty:()=>hx,findNodesForKeyword:()=>Oze,findNodesForKeywordInternal:()=>iD,findNodesForProperty:()=>tD,getActionAtElement:()=>jue,getActionType:()=>Zue,getAllReachableRules:()=>ux,getCrossReferenceTerminal:()=>JN,getEntryRule:()=>Wue,getExplicitRuleType:()=>zm,getHiddenRules:()=>Hue,getRuleType:()=>sD,getRuleTypeName:()=>zze,getTypeName:()=>dx,isArrayCardinality:()=>Bze,isArrayOperator:()=>Fze,isCommentTerminal:()=>eD,isDataType:()=>$ze,isDataTypeRule:()=>fx,isOptionalCardinality:()=>Pze,terminalRegex:()=>Gm});function Wue(t){return t.rules.find(e=>Ia(e)&&e.entry)}function Hue(t){return t.rules.filter(e=>so(e)&&e.hidden)}function ux(t,e){let r=new Set,n=Wue(t);if(!n)return new Set(t.rules);let i=[n].concat(Hue(t));for(let s of i)Yue(s,r,e);let a=new Set;for(let s of t.rules)(r.has(s.name)||so(s)&&s.hidden)&&a.add(s);return a}function Yue(t,e,r){e.add(t.name),$c(t).forEach(n=>{if(Ll(n)||r&&i6(n)){let i=n.rule.ref;i&&!e.has(i.name)&&Yue(i,e,r)}})}function JN(t){if(t.terminal)return t.terminal;if(t.type.ref){let e=h6(t.type.ref);return e?.terminal}}function eD(t){return t.hidden&&!Fm(Gm(t))}function tD(t,e){return!t||!e?[]:rD(t,e,t.astNode,!0)}function hx(t,e,r){if(!t||!e)return;let n=rD(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function rD(t,e,r,n){if(!n){let i=b0(t.grammarSource,_l);if(i&&i.feature===e)return[t]}return Sl(t)&&t.astNode===r?t.content.flatMap(i=>rD(i,e,r,!1)):[]}function Oze(t,e){return t?iD(t,e,t?.astNode):[]}function nD(t,e,r){if(!t)return;let n=iD(t,e,t?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function iD(t,e,r){if(t.astNode!==r)return[];if(Xo(t.grammarSource)&&t.grammarSource.value===e)return[t];let n=g0(t).iterator(),i,a=[];do if(i=n.next(),!i.done){let s=i.value;s.astNode===r?Xo(s.grammarSource)&&s.grammarSource.value===e&&a.push(s):n.prune()}while(!i.done);return a}function aD(t){var e;let r=t.astNode;for(;r===((e=t.container)===null||e===void 0?void 0:e.astNode);){let n=b0(t.grammarSource,_l);if(n)return n;t=t.container}}function h6(t){let e=t;return e6(e)&&($u(e.$container)?e=e.$container.$container:Ia(e.$container)?e=e.$container:Bc(e.$container)),Xue(t,e,new Map)}function Xue(t,e,r){var n;function i(a,s){let o;return b0(a,_l)||(o=Xue(s,s,r)),r.set(t,o),o}if(r.has(t))return r.get(t);r.set(t,void 0);for(let a of $c(e)){if(_l(a)&&a.feature.toLowerCase()==="name")return r.set(t,a),a;if(Ll(a)&&Ia(a.rule.ref))return i(a,a.rule.ref);if(r6(a)&&(!((n=a.typeRef)===null||n===void 0)&&n.ref))return i(a,a.typeRef.ref)}}function jue(t){let e=t.$container;if(Af(e)){let r=e.elements,n=r.indexOf(t);for(let i=n-1;i>=0;i--){let a=r[i];if($u(a))return a;{let s=$c(r[i]).find($u);if(s)return s}}}if(tx(e))return jue(e)}function Pze(t,e){return t==="?"||t==="*"||Af(e)&&!!e.guardCondition}function Bze(t){return t==="*"||t==="+"}function Fze(t){return t==="+="}function fx(t){return Kue(t,new Set)}function Kue(t,e){if(e.has(t))return!0;e.add(t);for(let r of $c(t))if(Ll(r)){if(!r.rule.ref||Ia(r.rule.ref)&&!Kue(r.rule.ref,e))return!1}else{if(_l(r))return!1;if($u(r))return!1}return!!t.definition}function $ze(t){return QN(t.type,new Set)}function QN(t,e){if(e.has(t))return!0;if(e.add(t),kN(t))return!1;if(LN(t))return!1;if(IN(t))return t.types.every(r=>QN(r,e));if(r6(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){let r=t.typeRef.ref;return rx(r)?QN(r.type,e):!1}else return!1}else return!1}function zm(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){let e=t.returnType.ref;if(e){if(Ia(e))return e.name;if(t6(e)||rx(e))return e.name}}}function dx(t){var e;if(Ia(t))return fx(t)?t.name:(e=zm(t))!==null&&e!==void 0?e:t.name;if(t6(t)||rx(t)||RN(t))return t.name;if($u(t)){let r=Zue(t);if(r)return r}else if(e6(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function Zue(t){var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return dx(t.type.ref)}function zze(t){var e,r,n;return so(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":fx(t)?t.name:(n=zm(t))!==null&&n!==void 0?n:t.name}function sD(t){var e,r,n;return so(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":(n=zm(t))!==null&&n!==void 0?n:t.name}function Gm(t){let e={s:!1,i:!1,u:!1},r=Vm(t.definition,e),n=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}function Vm(t,e){if(PN(t))return Gze(t);if(BN(t))return Vze(t);if(NN(t))return Wze(t);if(i6(t)){let r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return zu(Vm(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else{if(MN(t))return qze(t);if(FN(t))return Uze(t);if(ON(t)){let r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),i=t.regex.substring(r+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),zu(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else{if($N(t))return zu(oD,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t?.$type}`)}}}function Gze(t){return zu(t.elements.map(e=>Vm(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function Vze(t){return zu(t.elements.map(e=>Vm(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function Uze(t){return zu(`${oD}*?${Vm(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function qze(t){return zu(`(?!${Vm(t.terminal)})${oD}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function Wze(t){return t.right?zu(`[${ZN(t.left)}-${ZN(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):zu(ZN(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function ZN(t){return E0(t.value)}function zu(t,e){var r;return(e.wrap!==!1||e.lookahead)&&(t=`(${(r=e.lookahead)!==null&&r!==void 0?r:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t}var oD,Rl=F(()=>{Qk();Fc();Cl();is();Al();$m();oD=/[\s\S]/.source});function lD(t){let e=[],r=t.Grammar;for(let n of r.rules)so(n)&&eD(n)&&XN(Gm(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:Kk}}var cD=F(()=>{Al();Rl();$m();Fc()});var uD=F(()=>{});function Um(t){console&&console.error&&console.error(`Error: ${t}`)}function px(t){console&&console.warn&&console.warn(`Warning: ${t}`)}var Que=F(()=>{});function gx(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}var Jue=F(()=>{});function mx(t){function e(){}e.prototype=t;let r=new e;function n(){return typeof r.bar}return n(),n(),t;(0,eval)(t)}var ehe=F(()=>{});var qm=F(()=>{Que();Jue();ehe()});function Hze(t){return Yze(t)?t.LABEL:t.name}function Yze(t){return ui(t.LABEL)&&t.LABEL!==""}function d6(t){return Ze(t,Wm)}function Wm(t){function e(r){return Ze(r,Wm)}if(t instanceof sn){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return ui(t.label)&&(r.label=t.label),r}else{if(t instanceof Ln)return{type:"Alternative",definition:e(t.definition)};if(t instanceof on)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Rn)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof In)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Wm(new br({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Tn)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Wm(new br({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Mr)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof kn)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof br){let r={type:"Terminal",name:t.terminalType.name,label:Hze(t.terminalType),idx:t.idx};ui(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=No(n)?n.source:n),r}else{if(t instanceof as)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var oo,sn,as,Ln,on,Rn,In,Mr,Tn,kn,br,p6=F(()=>{$t();oo=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),Ae(this.definition,r=>{r.accept(e)})}},sn=class extends oo{constructor(e){super([]),this.idx=1,sa(this,Ds(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},as=class extends oo{constructor(e){super(e.definition),this.orgText="",sa(this,Ds(e,r=>r!==void 0))}},Ln=class extends oo{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,sa(this,Ds(e,r=>r!==void 0))}},on=class extends oo{constructor(e){super(e.definition),this.idx=1,sa(this,Ds(e,r=>r!==void 0))}},Rn=class extends oo{constructor(e){super(e.definition),this.idx=1,sa(this,Ds(e,r=>r!==void 0))}},In=class extends oo{constructor(e){super(e.definition),this.idx=1,sa(this,Ds(e,r=>r!==void 0))}},Mr=class extends oo{constructor(e){super(e.definition),this.idx=1,sa(this,Ds(e,r=>r!==void 0))}},Tn=class extends oo{constructor(e){super(e.definition),this.idx=1,sa(this,Ds(e,r=>r!==void 0))}},kn=class extends oo{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,sa(this,Ds(e,r=>r!==void 0))}},br=class{constructor(e){this.idx=1,sa(this,Ds(e,r=>r!==void 0))}accept(e){e.visit(this)}}});var ss,the=F(()=>{p6();ss=class{visit(e){let r=e;switch(r.constructor){case sn:return this.visitNonTerminal(r);case Ln:return this.visitAlternative(r);case on:return this.visitOption(r);case Rn:return this.visitRepetitionMandatory(r);case In:return this.visitRepetitionMandatoryWithSeparator(r);case Tn:return this.visitRepetitionWithSeparator(r);case Mr:return this.visitRepetition(r);case kn:return this.visitAlternation(r);case br:return this.visitTerminal(r);case as:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}});function hD(t){return t instanceof Ln||t instanceof on||t instanceof Mr||t instanceof Rn||t instanceof In||t instanceof Tn||t instanceof br||t instanceof as}function S0(t,e=[]){return t instanceof on||t instanceof Mr||t instanceof Tn?!0:t instanceof kn?Zy(t.definition,n=>S0(n,e)):t instanceof sn&&Gn(e,t)?!1:t instanceof oo?(t instanceof sn&&e.push(t),Sa(t.definition,n=>S0(n,e))):!1}function fD(t){return t instanceof kn}function $s(t){if(t instanceof sn)return"SUBRULE";if(t instanceof on)return"OPTION";if(t instanceof kn)return"OR";if(t instanceof Rn)return"AT_LEAST_ONE";if(t instanceof In)return"AT_LEAST_ONE_SEP";if(t instanceof Tn)return"MANY_SEP";if(t instanceof Mr)return"MANY";if(t instanceof br)return"CONSUME";throw Error("non exhaustive match")}var rhe=F(()=>{$t();p6()});var os=F(()=>{p6();the();rhe()});function nhe(t,e,r){return[new on({definition:[new br({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var Gu,g6=F(()=>{$t();os();Gu=class{walk(e,r=[]){Ae(e.definition,(n,i)=>{let a=ci(e.definition,i+1);if(n instanceof sn)this.walkProdRef(n,a,r);else if(n instanceof br)this.walkTerminal(n,a,r);else if(n instanceof Ln)this.walkFlat(n,a,r);else if(n instanceof on)this.walkOption(n,a,r);else if(n instanceof Rn)this.walkAtLeastOne(n,a,r);else if(n instanceof In)this.walkAtLeastOneSep(n,a,r);else if(n instanceof Tn)this.walkManySep(n,a,r);else if(n instanceof Mr)this.walkMany(n,a,r);else if(n instanceof kn)this.walkOr(n,a,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i)}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i)}walkAtLeastOne(e,r,n){let i=[new on({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=nhe(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new on({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=nhe(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);Ae(e.definition,a=>{let s=new Ln({definition:[a]});this.walk(s,i)})}}});function C0(t){if(t instanceof sn)return C0(t.referencedRule);if(t instanceof br)return Kze(t);if(hD(t))return Xze(t);if(fD(t))return jze(t);throw Error("non exhaustive match")}function Xze(t){let e=[],r=t.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=S0(a),e=e.concat(C0(a)),n=n+1,i=r.length>n;return bg(e)}function jze(t){let e=Ze(t.definition,r=>C0(r));return bg(Hr(e))}function Kze(t){return[t.terminalType]}var dD=F(()=>{$t();os()});var m6,pD=F(()=>{m6="_~IN~_"});function ihe(t){let e={};return Ae(t,r=>{let n=new gD(r).startWalking();sa(e,n)}),e}function Zze(t,e){return t.name+e+m6}var gD,ahe=F(()=>{g6();dD();$t();pD();os();gD=class extends Gu{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=Zze(e.referencedRule,e.idx)+this.topProd.name,a=r.concat(n),s=new Ln({definition:a}),o=C0(s);this.follows[i]=o}}});function Hm(t){let e=t.toString();if(v6.hasOwnProperty(e))return v6[e];{let r=Qze.pattern(e);return v6[e]=r,r}}function she(){v6={}}var v6,Qze,y6=F(()=>{cx();v6={},Qze=new T0});function che(t,e=!1){try{let r=Hm(t);return mD(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===lhe)e&&px(`${vx} 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.`);else{let n="";e&&(n=` This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Um(`${vx} Failed parsing: < ${t.toString()} > Using the @chevrotain/regexp-to-ast library Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function mD(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i{if(typeof l=="number")x6(l,e,r);else{let u=l;if(r===!0)for(let h=u.from;h<=u.to;h++)x6(h,e,r);else{for(let h=u.from;h<=u.to&&h=Ym){let h=u.from>=Ym?u.from:Ym,f=u.to,d=Gc(h),p=Gc(f);for(let g=d;g<=p;g++)e[g]=g}}}});break;case"Group":mD(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}let o=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&vD(s)===!1||s.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return gr(e)}function x6(t,e,r){let n=Gc(t);e[n]=n,r===!0&&Jze(t,e)}function Jze(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=Gc(n.charCodeAt(0));e[i]=i}else{let i=r.toLowerCase();if(i!==r){let a=Gc(i.charCodeAt(0));e[a]=a}}}function ohe(t,e){return Ja(t.value,r=>{if(typeof r=="number")return Gn(e,r);{let n=r;return Ja(e,i=>n.from<=i&&i<=n.to)!==void 0}})}function vD(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?It(t.value)?Sa(t.value,vD):vD(t.value):!1}function b6(t,e){if(e instanceof RegExp){let r=Hm(e),n=new yD(t);return n.visit(r),n.found}else return Ja(e,r=>Gn(t,r.charCodeAt(0)))!==void 0}var lhe,vx,yD,uhe=F(()=>{cx();$t();qm();y6();xD();lhe="Complement Sets are not supported for first char optimization",vx=`Unable to use "first char" lexer optimizations: `;yD=class extends zc{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){Gn(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?ohe(e,this.targetCharCodes)===void 0&&(this.found=!0):ohe(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}});function dhe(t,e){e=jh(e,{useSticky:wD,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` `],tracer:(b,w)=>w()});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{vGe()});let n;r("Reject Lexer.NA",()=>{n=Zh(t,b=>b[A0]===qn.NA)});let i=!1,a;r("Transform Patterns",()=>{i=!1,a=Ze(n,b=>{let w=b[A0];if(No(w)){let S=w.source;return S.length===1&&S!=="^"&&S!=="$"&&S!=="."&&!w.ignoreCase?S:S.length===2&&S[0]==="\\"&&!Gn(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],S[1])?S[1]:e.useSticky?fhe(w):hhe(w)}else{if(gi(w))return i=!0,{exec:w};if(typeof w=="object")return i=!0,w;if(typeof w=="string"){if(w.length===1)return w;{let S=w.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),T=new RegExp(S);return e.useSticky?fhe(T):hhe(T)}}else throw Error("non exhaustive match")}})});let s,o,l,u,h;r("misc mapping",()=>{s=Ze(n,b=>b.tokenTypeIdx),o=Ze(n,b=>{let w=b.GROUP;if(w!==qn.SKIPPED){if(ui(w))return w;if(ur(w))return!1;throw Error("non exhaustive match")}}),l=Ze(n,b=>{let w=b.LONGER_ALT;if(w)return It(w)?Ze(w,T=>lT(n,T)):[lT(n,w)]}),u=Ze(n,b=>b.PUSH_MODE),h=Ze(n,b=>Nt(b,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let b=whe(e.lineTerminatorCharacters);f=Ze(n,w=>!1),e.positionTracking!=="onlyOffset"&&(f=Ze(n,w=>Nt(w,"LINE_BREAKS")?!!w.LINE_BREAKS:bhe(w,b)===!1&&b6(b,w.PATTERN)))});let d,p,g,m;r("Misc Mapping #2",()=>{d=Ze(n,yhe),p=Ze(a,gGe),g=Xr(n,(b,w)=>{let S=w.GROUP;return ui(S)&&S!==qn.SKIPPED&&(b[S]=[]),b},{}),m=Ze(a,(b,w)=>({pattern:a[w],longerAlt:l[w],canLineTerminator:f[w],isCustom:d[w],short:p[w],group:o[w],push:u[w],pop:h[w],tokenTypeIdx:s[w],tokenType:n[w]}))});let v=!0,y=[];return e.safeMode||r("First Char Optimization",()=>{y=Xr(n,(b,w,S)=>{if(typeof w.PATTERN=="string"){let T=w.PATTERN.charCodeAt(0),E=Gc(T);bD(b,E,m[S])}else if(It(w.START_CHARS_HINT)){let T;Ae(w.START_CHARS_HINT,E=>{let A=typeof E=="string"?E.charCodeAt(0):E,C=Gc(A);T!==C&&(T=C,bD(b,C,m[S]))})}else if(No(w.PATTERN))if(w.PATTERN.unicode)v=!1,e.ensureOptimizations&&Um(`${vx} Unable to analyze < ${w.PATTERN.toString()} > pattern. The regexp unicode flag is not currently supported by the regexp-to-ast library. This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let T=che(w.PATTERN,e.ensureOptimizations);lr(T)&&(v=!1),Ae(T,E=>{bD(b,E,m[S])})}else e.ensureOptimizations&&Um(`${vx} TokenType: <${w.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`),v=!1;return b},[])}),{emptyGroups:g,patternIdxToConfig:m,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:v}}function phe(t,e){let r=[],n=tGe(t);r=r.concat(n.errors);let i=rGe(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(eGe(a)),r=r.concat(uGe(a)),r=r.concat(hGe(a,e)),r=r.concat(fGe(a)),r}function eGe(t){let e=[],r=Yr(t,n=>No(n[A0]));return e=e.concat(iGe(r)),e=e.concat(oGe(r)),e=e.concat(lGe(r)),e=e.concat(cGe(r)),e=e.concat(aGe(r)),e}function tGe(t){let e=Yr(t,i=>!Nt(i,A0)),r=Ze(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Un.MISSING_PATTERN,tokenTypes:[i]})),n=Kh(t,e);return{errors:r,valid:n}}function rGe(t){let e=Yr(t,i=>{let a=i[A0];return!No(a)&&!gi(a)&&!Nt(a,"exec")&&!ui(a)}),r=Ze(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Un.INVALID_PATTERN,tokenTypes:[i]})),n=Kh(t,e);return{errors:r,valid:n}}function iGe(t){class e extends zc{constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}let r=Yr(t,i=>{let a=i.PATTERN;try{let s=Hm(a),o=new e;return o.visit(s),o.found}catch{return nGe.test(a.source)}});return Ze(r,i=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Un.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function aGe(t){let e=Yr(t,n=>n.PATTERN.test(""));return Ze(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Un.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function oGe(t){class e extends zc{constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}let r=Yr(t,i=>{let a=i.PATTERN;try{let s=Hm(a),o=new e;return o.visit(s),o.found}catch{return sGe.test(a.source)}});return Ze(r,i=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Un.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function lGe(t){let e=Yr(t,n=>{let i=n[A0];return i instanceof RegExp&&(i.multiline||i.global)});return Ze(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Un.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function cGe(t){let e=[],r=Ze(t,a=>Xr(t,(s,o)=>(a.PATTERN.source===o.PATTERN.source&&!Gn(e,o)&&o.PATTERN!==qn.NA&&(e.push(o),s.push(o)),s),[]));r=bc(r);let n=Yr(r,a=>a.length>1);return Ze(n,a=>{let s=Ze(a,l=>l.name);return{message:`The same RegExp pattern ->${Gi(a).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:Un.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}function uGe(t){let e=Yr(t,n=>{if(!Nt(n,"GROUP"))return!1;let i=n.GROUP;return i!==qn.SKIPPED&&i!==qn.NA&&!ui(i)});return Ze(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Un.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function hGe(t,e){let r=Yr(t,i=>i.PUSH_MODE!==void 0&&!Gn(e,i.PUSH_MODE));return Ze(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Un.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function fGe(t){let e=[],r=Xr(t,(n,i,a)=>{let s=i.PATTERN;return s===qn.NA||(ui(s)?n.push({str:s,idx:a,tokenType:i}):No(s)&&pGe(s)&&n.push({str:s.source,idx:a,tokenType:i})),n},[]);return Ae(t,(n,i)=>{Ae(r,({str:a,idx:s,tokenType:o})=>{if(i${o.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`;e.push({message:l,type:Un.UNREACHABLE_PATTERN,tokenTypes:[n,o]})}})}),e}function dGe(t,e){if(No(e)){let r=e.exec(t);return r!==null&&r.index===0}else{if(gi(e))return e(t,0,[],{});if(Nt(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function pGe(t){return Ja([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}function hhe(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function fhe(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function ghe(t,e,r){let n=[];return Nt(t,Xm)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Xm+`> property in its definition `,type:Un.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Nt(t,w6)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+w6+`> property in its definition `,type:Un.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Nt(t,w6)&&Nt(t,Xm)&&!Nt(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Xm}: <${t.defaultMode}>which does not exist `,type:Un.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Nt(t,w6)&&Ae(t.modes,(i,a)=>{Ae(i,(s,o)=>{if(ur(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${o}> `,type:Un.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Nt(s,"LONGER_ALT")){let l=It(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];Ae(l,u=>{!ur(u)&&!Gn(i,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${s.name}> outside of mode <${a}> `,type:Un.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function mhe(t,e,r){let n=[],i=!1,a=bc(Hr(gr(t.modes))),s=Zh(a,l=>l[A0]===qn.NA),o=whe(r);return e&&Ae(s,l=>{let u=bhe(l,o);if(u!==!1){let f={message:mGe(l,u),type:u.issue,tokenType:l};n.push(f)}else Nt(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(i=!0):b6(o,l.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:Un.NO_LINE_BREAKS_FLAGS}),n}function vhe(t){let e={},r=zr(t);return Ae(r,n=>{let i=t[n];if(It(i))e[n]=[];else throw Error("non exhaustive match")}),e}function yhe(t){let e=t.PATTERN;if(No(e))return!1;if(gi(e))return!0;if(Nt(e,"exec"))return!0;if(ui(e))return!1;throw Error("non exhaustive match")}function gGe(t){return ui(t)&&t.length===1?t.charCodeAt(0):!1}function bhe(t,e){if(Nt(t,"LINE_BREAKS"))return!1;if(No(t.PATTERN)){try{b6(e,t.PATTERN)}catch(r){return{issue:Un.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(ui(t.PATTERN))return!1;if(yhe(t))return{issue:Un.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function mGe(t,e){if(e.issue===Un.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===Un.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 whe(t){return Ze(t,r=>ui(r)?r.charCodeAt(0):r)}function bD(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function Gc(t){return t255?255+~~(t/255):t}}var A0,Xm,w6,wD,nGe,sGe,xhe,Ym,T6,xD=F(()=>{cx();yx();$t();qm();uhe();y6();A0="PATTERN",Xm="defaultMode",w6="modes",wD=typeof new RegExp("(?:)").sticky=="boolean";nGe=/[^\\][$]/;sGe=/[^\\[][\^]|^\^/;xhe={test:function(t){let e=t.length;for(let r=this.lastIndex;r{r.isParent=r.categoryMatches.length>0})}function yGe(t){let e=tn(t),r=t,n=!0;for(;n;){r=bc(Hr(Ze(r,a=>a.CATEGORIES)));let i=Kh(r,e);e=e.concat(i),lr(i)?n=!1:r=i}return e}function xGe(t){Ae(t,e=>{TD(e)||(Ehe[The]=e,e.tokenTypeIdx=The++),khe(e)&&!It(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),khe(e)||(e.CATEGORIES=[]),TGe(e)||(e.categoryMatches=[]),kGe(e)||(e.categoryMatchesMap={})})}function bGe(t){Ae(t,e=>{e.categoryMatches=[],Ae(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(Ehe[n].tokenTypeIdx)})})}function wGe(t){Ae(t,e=>{She([],e)})}function She(t,e){Ae(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),Ae(e.CATEGORIES,r=>{let n=t.concat(e);Gn(n,r)||She(n,r)})}function TD(t){return Nt(t,"tokenTypeIdx")}function khe(t){return Nt(t,"CATEGORIES")}function TGe(t){return Nt(t,"categoryMatches")}function kGe(t){return Nt(t,"categoryMatchesMap")}function Che(t){return Nt(t,"tokenTypeIdx")}var The,Ehe,_0=F(()=>{$t();The=1,Ehe={}});var Km,kD=F(()=>{Km={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.`}}});var Un,xx,qn,yx=F(()=>{xD();$t();qm();_0();kD();y6();(function(t){t[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"})(Un||(Un={}));xx={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Km,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(xx);qn=class{constructor(e,r=xx){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);let{time:o,value:l}=gx(a),u=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,l}else return a()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. a boolean 2nd argument is no longer supported`);this.config=sa({},xx,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===xx.lineTerminatorsPattern)this.config.lineTerminatorsPattern=xhe;else if(this.config.lineTerminatorCharacters===xx.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(r.safeMode&&r.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),It(e)?i={modes:{defaultMode:tn(e)},defaultMode:Xm}:(a=!1,i=tn(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ghe(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(mhe(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},Ae(i.modes,(o,l)=>{i.modes[l]=Zh(o,u=>ur(u))});let s=zr(i.modes);if(Ae(i.modes,(o,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(phe(o,s))}),lr(this.lexerDefinitionErrors)){Uu(o);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=dhe(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=u.charCodeToPatternIdxToConfig,this.emptyGroups=sa({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=i.defaultMode,!lr(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let l=Ze(this.lexerDefinitionErrors,u=>u.message).join(`----------------------- `);throw new Error(`Errors detected in definition of Lexer: `+l)}Ae(this.lexerDefinitionWarning,o=>{px(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(wD?(this.chopInput=zi,this.match=this.matchWithTest):(this.updateLastIndex=Jn,this.match=this.matchWithExec),a&&(this.handleModes=Jn),this.trackStartLines===!1&&(this.computeNewColumn=zi),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Jn),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let o=Xr(this.canModeBeOptimized,(l,u,h)=>(u===!1&&l.push(h),l),[]);if(r.ensureOptimizations&&!lr(o))throw Error(`Lexer Modes: < ${o.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",()=>{she()}),this.TRACE_INIT("toFastProperties",()=>{mx(this)})})}tokenize(e,r=this.defaultMode){if(!lr(this.lexerDefinitionErrors)){let i=Ze(this.lexerDefinitionErrors,a=>a.message).join(`----------------------- `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: `+i)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,i,a,s,o,l,u,h,f,d,p,g,m,v,y,b,w=e,S=w.length,T=0,E=0,A=this.hasCustom?0:Math.floor(e.length/10),C=new Array(A),I=[],M=this.trackStartLines?1:void 0,R=this.trackStartLines?1:void 0,k=vhe(this.emptyGroups),L=this.trackStartLines,_=this.config.lineTerminatorsPattern,D=0,N=[],O=[],P=[],B=[];Object.freeze(B);let G;function $(){return N}function U(Q){let ue=Gc(Q),re=O[ue];return re===void 0?B:re}let X=Q=>{if(P.length===1&&Q.tokenType.PUSH_MODE===void 0){let ue=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Q);I.push({offset:Q.startOffset,line:Q.startLine,column:Q.startColumn,length:Q.image.length,message:ue})}else{P.pop();let ue=oa(P);N=this.patternIdxToConfig[ue],O=this.charCodeToPatternIdxToConfig[ue],D=N.length;let re=this.canModeBeOptimized[ue]&&this.config.safeMode===!1;O&&re?G=U:G=$}};function ee(Q){P.push(Q),O=this.charCodeToPatternIdxToConfig[Q],N=this.patternIdxToConfig[Q],D=N.length,D=N.length;let ue=this.canModeBeOptimized[Q]&&this.config.safeMode===!1;O&&ue?G=U:G=$}ee.call(this,r);let Y,oe=this.config.recoveryEnabled;for(;Tl.length){l=s,u=h,Y=ae;break}}}break}}if(l!==null){if(f=l.length,d=Y.group,d!==void 0&&(p=Y.tokenTypeIdx,g=this.createTokenInstance(l,T,p,Y.tokenType,M,R,f),this.handlePayload(g,u),d===!1?E=this.addToken(C,E,g):k[d].push(g)),e=this.chopInput(e,f),T=T+f,R=this.computeNewColumn(R,f),L===!0&&Y.canLineTerminator===!0){let te=0,Z,j;_.lastIndex=0;do Z=_.test(l),Z===!0&&(j=_.lastIndex-1,te++);while(Z===!0);te!==0&&(M=M+te,R=f-j,this.updateTokenEndLineColumnLocation(g,d,j,te,M,R,f))}this.handleModes(Y,X,ee,g)}else{let te=T,Z=M,j=R,ae=oe===!1;for(;ae===!1&&T{$t();yx();_0();EGe="parent",Ahe="categories",_he="label",Lhe="group",Rhe="push_mode",Ihe="pop_mode",Nhe="longer_alt",Dhe="line_breaks",Mhe="start_chars_hint";lo=_f({name:"EOF",pattern:qn.NA});Uu([lo])});var Hu,Ohe,Il,Zm=F(()=>{L0();$t();os();Hu={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${ED(t)?`--> ${qu(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){let a="Expecting: ",o=` but found: '`+Gi(e).image+"'";if(n)return a+n+o;{let l=Xr(t,(d,p)=>d.concat(p),[]),u=Ze(l,d=>`[${Ze(d,p=>qu(p)).join(", ")}]`),f=`one of these possible Token sequences: ${Ze(u,(d,p)=>` ${p+1}. ${d}`).join(` `)}`;return a+f+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){let i="Expecting: ",s=` but found: '`+Gi(e).image+"'";if(r)return i+r+s;{let l=`expecting at least one iteration which starts with one of these possible Token sequences:: <${Ze(t,u=>`[${Ze(u,h=>qu(h)).join(",")}]`).join(" ,")}>`;return i+l+s}}};Object.freeze(Hu);Ohe={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- inside top level rule: ->`+t.name+"<-"}},Il={buildDuplicateFoundError(t,e){function r(h){return h instanceof br?h.terminalType.name:h instanceof sn?h.nonTerminalName:""}let n=t.name,i=Gi(e),a=i.idx,s=$s(i),o=r(i),l=a>0,u=`->${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 u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,` `),u},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){let e=Ze(t.prefixPath,i=>qu(i)).join(", "),r=t.alternation.idx===0?"":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){let e=Ze(t.prefixPath,i=>qu(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`,n},buildEmptyRepetitionError(t){let e=$s(t.repetition);return t.repetition.idx!==0&&(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. has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=Ze(t.leftRecursionPath,a=>a.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar. rule: <${e}> can be invoked from itself (directly or indirectly) without consuming any Tokens. The grammar path that causes this is: ${n} 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){let e;return t.topLevelRule instanceof as?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function Phe(t,e){let r=new SD(t,e);return r.resolveRefs(),r.errors}var SD,Bhe=F(()=>{zs();$t();os();SD=class extends ss{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){Ae(gr(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:Ri.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}});function C6(t,e,r=[]){r=tn(r);let n=[],i=0;function a(o){return o.concat(ci(t,i+1))}function s(o){let l=C6(a(o),e,r);return n.concat(l)}for(;r.length{lr(l.definition)===!1&&(n=s(l.definition))}),n;if(o instanceof br)r.push(o.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:ci(t,i)}),n}function A6(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=e.length,u=l-n-1,h=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!lr(f);){let d=f.pop();if(d===s){o&&oa(f).idx<=u&&f.pop();continue}let p=d.def,g=d.idx,m=d.ruleStack,v=d.occurrenceStack;if(lr(p))continue;let y=p[0];if(y===i){let b={idx:g,def:ci(p),ruleStack:Lu(m),occurrenceStack:Lu(v)};f.push(b)}else if(y instanceof br)if(g=0;b--){let w=y.definition[b],S={idx:g,def:w.definition.concat(ci(p)),ruleStack:m,occurrenceStack:v};f.push(S),f.push(s)}else if(y instanceof Ln)f.push({idx:g,def:y.definition.concat(ci(p)),ruleStack:m,occurrenceStack:v});else if(y instanceof as)f.push(CGe(y,g,m,v));else throw Error("non exhaustive match")}return h}function CGe(t,e,r,n){let i=tn(r);i.push(t.name);let a=tn(n);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}var CD,k6,Qm,E6,wx,S6,Tx,kx=F(()=>{$t();dD();g6();os();CD=class extends Gu{constructor(e,r){super(),this.topProd=e,this.path=r,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=tn(this.path.ruleStack).reverse(),this.occurrenceStack=tn(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){lr(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},k6=class extends CD{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),a=new Ln({definition:i});this.possibleTokTypes=C0(a),this.found=!0}}},Qm=class extends Gu{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},E6=class extends Qm{walkMany(e,r,n){if(e.idx===this.occurrence){let i=Gi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof br&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},wx=class extends Qm{walkManySep(e,r,n){if(e.idx===this.occurrence){let i=Gi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof br&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},S6=class extends Qm{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=Gi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof br&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},Tx=class extends Qm{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=Gi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof br&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}}});function Ex(t){if(t instanceof on||t==="Option")return Wn.OPTION;if(t instanceof Mr||t==="Repetition")return Wn.REPETITION;if(t instanceof Rn||t==="RepetitionMandatory")return Wn.REPETITION_MANDATORY;if(t instanceof In||t==="RepetitionMandatoryWithSeparator")return Wn.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Tn||t==="RepetitionWithSeparator")return Wn.REPETITION_WITH_SEPARATOR;if(t instanceof kn||t==="Alternation")return Wn.ALTERNATION;throw Error("non exhaustive match")}function L6(t){let{occurrence:e,rule:r,prodType:n,maxLookahead:i}=t,a=Ex(n);return a===Wn.ALTERNATION?Jm(e,r,i):e1(e,r,a,i)}function $he(t,e,r,n,i,a){let s=Jm(t,e,r),o=Whe(s)?jm:Vu;return a(s,n,o,i)}function zhe(t,e,r,n,i,a){let s=e1(t,e,i,r),o=Whe(s)?jm:Vu;return a(s[0],o,n)}function Ghe(t,e,r,n){let i=t.length,a=Sa(t,s=>Sa(s,o=>o.length===1));if(e)return function(s){let o=Ze(s,l=>l.GATE);for(let l=0;lHr(l)),o=Xr(s,(l,u,h)=>(Ae(u,f=>{Nt(l,f.tokenTypeIdx)||(l[f.tokenTypeIdx]=h),Ae(f.categoryMatches,d=>{Nt(l,d)||(l[d]=h)})}),l),{});return function(){let l=this.LA(1);return o[l.tokenTypeIdx]}}else return function(){for(let s=0;sa.length===1),i=t.length;if(n&&!r){let a=Hr(t);if(a.length===1&&lr(a[0].categoryMatches)){let o=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{let s=Xr(a,(o,l,u)=>(o[l.tokenTypeIdx]=!0,Ae(l.categoryMatches,h=>{o[h]=!0}),o),[]);return function(){let o=this.LA(1);return s[o.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;aC6([s],1)),n=Fhe(r.length),i=Ze(r,s=>{let o={};return Ae(s,l=>{let u=AD(l.partialPath);Ae(u,h=>{o[h]=!0})}),o}),a=r;for(let s=1;s<=e;s++){let o=a;a=Fhe(o.length);for(let l=0;l{let y=AD(v.partialPath);Ae(y,b=>{i[l][b]=!0})})}}}}return n}function Jm(t,e,r,n){let i=new _6(t,Wn.ALTERNATION,n);return e.accept(i),Uhe(i.result,r)}function e1(t,e,r,n){let i=new _6(t,r);e.accept(i);let a=i.result,o=new _D(e,t,r).startWalking(),l=new Ln({definition:a}),u=new Ln({definition:o});return Uhe([l,u],n)}function R6(t,e){e:for(let r=0;r{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function Whe(t){return Sa(t,e=>Sa(e,r=>Sa(r,n=>lr(n.categoryMatches))))}var Wn,_D,_6,t1=F(()=>{$t();kx();g6();_0();os();(function(t){t[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"})(Wn||(Wn={}));_D=class extends Gu{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,Wn.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,Wn.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,Wn.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,Wn.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,Wn.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},_6=class extends ss{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Wn.OPTION)}visitRepetition(e){this.checkIsTarget(e,Wn.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Wn.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Wn.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Wn.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Wn.ALTERNATION)}}});function Hhe(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return Ze(e,r=>Object.assign({type:Ri.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Yhe(t,e,r,n){let i=la(t,l=>_Ge(l,r)),a=MGe(t,e,r),s=la(t,l=>IGe(l,r)),o=la(t,l=>RGe(l,t,n,r));return i.concat(a,s,o)}function _Ge(t,e){let r=new LD;t.accept(r);let n=r.allProductions,i=H9(n,LGe),a=Ds(i,o=>o.length>1);return Ze(gr(a),o=>{let l=Gi(o),u=e.buildDuplicateFoundError(t,o),h=$s(l),f={message:u,type:Ri.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:h,occurrence:l.idx},d=Xhe(l);return d&&(f.parameter=d),f})}function LGe(t){return`${$s(t)}_#_${t.idx}_#_${Xhe(t)}`}function Xhe(t){return t instanceof br?t.terminalType.name:t instanceof sn?t.nonTerminalName:""}function RGe(t,e,r,n){let i=[];if(Xr(e,(s,o)=>o.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:s,type:Ri.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function jhe(t,e,r){let n=[],i;return Gn(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Ri.INVALID_RULE_OVERRIDE,ruleName:t})),n}function ID(t,e,r,n=[]){let i=[],a=I6(e.definition);if(lr(a))return[];{let s=t.name;Gn(a,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:Ri.LEFT_RECURSION,ruleName:s});let l=Kh(a,n.concat([t])),u=la(l,h=>{let f=tn(n);return f.push(h),ID(t,h,r,f)});return i.concat(u)}}function I6(t){let e=[];if(lr(t))return e;let r=Gi(t);if(r instanceof sn)e.push(r.referencedRule);else if(r instanceof Ln||r instanceof on||r instanceof Rn||r instanceof In||r instanceof Tn||r instanceof Mr)e=e.concat(I6(r.definition));else if(r instanceof kn)e=Hr(Ze(r.definition,a=>I6(a.definition)));else if(!(r instanceof br))throw Error("non exhaustive match");let n=S0(r),i=t.length>1;if(n&&i){let a=ci(t);return e.concat(I6(a))}else return e}function Khe(t,e){let r=new Sx;t.accept(r);let n=r.alternations;return la(n,a=>{let s=Lu(a.definition);return la(s,(o,l)=>{let u=A6([o],[],Vu,1);return lr(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:a,emptyChoiceIdx:l}),type:Ri.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:a.idx,alternative:l+1}]:[]})})}function Zhe(t,e,r){let n=new Sx;t.accept(n);let i=n.alternations;return i=Zh(i,s=>s.ignoreAmbiguities===!0),la(i,s=>{let o=s.idx,l=s.maxLookahead||e,u=Jm(o,t,l,s),h=NGe(u,s,t,r),f=DGe(u,s,t,r);return h.concat(f)})}function IGe(t,e){let r=new Sx;t.accept(r);let n=r.alternations;return la(n,a=>a.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:a}),type:Ri.TOO_MANY_ALTS,ruleName:t.name,occurrence:a.idx}]:[])}function Qhe(t,e,r){let n=[];return Ae(t,i=>{let a=new RD;i.accept(a);let s=a.allProductions;Ae(s,o=>{let l=Ex(o),u=o.maxLookahead||e,h=o.idx,d=e1(h,i,l,u)[0];if(lr(Hr(d))){let p=r.buildEmptyRepetitionError({topLevelRule:i,repetition:o});n.push({message:p,type:Ri.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function NGe(t,e,r,n){let i=[],a=Xr(t,(o,l,u)=>(e.definition[u].ignoreAmbiguities===!0||Ae(l,h=>{let f=[u];Ae(t,(d,p)=>{u!==p&&R6(d,h)&&e.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!R6(i,h)&&(i.push(h),o.push({alts:f,path:h}))}),o),[]);return Ze(a,o=>{let l=Ze(o.alts,h=>h+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:l,prefixPath:o.path}),type:Ri.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:o.alts}})}function DGe(t,e,r,n){let i=Xr(t,(s,o,l)=>{let u=Ze(o,h=>({idx:l,path:h}));return s.concat(u)},[]);return bc(la(i,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let l=s.idx,u=s.path,h=Yr(i,d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx{let p=[d.idx+1,l+1],g=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:p,prefixPath:d.path}),type:Ri.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:p}})}))}function MGe(t,e,r){let n=[],i=Ze(e,a=>a.name);return Ae(t,a=>{let s=a.name;if(Gn(i,s)){let o=r.buildNamespaceConflictError(a);n.push({message:o,type:Ri.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}var LD,Sx,RD,Cx=F(()=>{$t();zs();os();t1();kx();_0();LD=class extends ss{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};Sx=class extends ss{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};RD=class extends ss{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}});function Jhe(t){let e=jh(t,{errMsgProvider:Ohe}),r={};return Ae(t.rules,n=>{r[n.name]=n}),Phe(r,e.errMsgProvider)}function efe(t){return t=jh(t,{errMsgProvider:Il}),Yhe(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var tfe=F(()=>{$t();Bhe();Cx();Zm()});function Lf(t){return Gn(sfe,t.name)}var rfe,nfe,ife,afe,sfe,r1,R0,Ax,_x,Lx,n1=F(()=>{$t();rfe="MismatchedTokenException",nfe="NoViableAltException",ife="EarlyExitException",afe="NotAllInputParsedException",sfe=[rfe,nfe,ife,afe];Object.freeze(sfe);r1=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},R0=class extends r1{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=rfe}},Ax=class extends r1{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=nfe}},_x=class extends r1{constructor(e,r){super(e,r),this.name=afe}},Lx=class extends r1{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=ife}}});function OGe(t,e,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o];if(l===void 0){let d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];l=new a(p,i).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,h=l.occurrence,f=l.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=lo,h=1),!(u===void 0||h===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,h,s)&&this.tryInRepetitionRecovery(t,e,r,u)}var ND,MD,DD,N6,OD=F(()=>{L0();$t();n1();pD();zs();ND={},MD="InRuleRecoveryException",DD=class extends Error{constructor(e){super(e),this.name=MD}},N6=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Nt(e,"recoveryEnabled")?e.recoveryEnabled:ls.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=OGe)}getTokenToInsert(e){let r=Wu(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,i){let a=this.findReSyncTokenType(),s=this.exportLexerState(),o=[],l=!1,u=this.LA(1),h=this.LA(1),f=()=>{let d=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:u,previous:d,ruleName:this.getCurrRuleFullName()}),g=new R0(p,u,this.LA(0));g.resyncedTokens=Lu(o),this.SAVE_ERROR(g)};for(;!l;)if(this.tokenMatcher(h,i)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(h,a)?l=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,o));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new DD("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||lr(r))return!1;let n=this.LA(1);return Ja(r,a=>this.tokenMatcher(n,a))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return Gn(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=Ja(e,a=>bx(r,a));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return ND;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return Ze(e,(n,i)=>i===0?ND:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=Ze(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return Hr(e)}getFollowSetFromFollowKey(e){if(e===ND)return[lo];let r=e.ruleName+e.idxInCallingRule+m6+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,lo)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return Lu(r)}attemptInRepetitionRecovery(e,r,n,i,a,s,o){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=tn(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return Ze(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}});function D6(t,e,r){return r|e|t}var M6=F(()=>{});var Yu,PD=F(()=>{$t();Zm();zs();Cx();t1();Yu=class{constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:ls.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(lr(r)){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...a]}return r}validateNoLeftRecursion(e){return la(e,r=>ID(r,r,Il))}validateEmptyOrAlternatives(e){return la(e,r=>Khe(r,Il))}validateAmbiguousAlternationAlternatives(e,r){return la(e,n=>Zhe(n,r,Il))}validateSomeNonEmptyLookaheadPath(e,r){return Qhe(e,r,Il)}buildLookaheadForAlternation(e){return $he(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Ghe)}buildLookaheadForOptional(e){return zhe(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Ex(e.prodType),Vhe)}}});function PGe(t){O6.reset(),t.accept(O6);let e=O6.dslMethods;return O6.reset(),e}var P6,BD,O6,ofe=F(()=>{$t();zs();M6();os();PD();P6=class{initLooksAhead(e){this.dynamicTokensEnabled=Nt(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:ls.dynamicTokensEnabled,this.maxLookahead=Nt(e,"maxLookahead")?e.maxLookahead:ls.maxLookahead,this.lookaheadStrategy=Nt(e,"lookaheadStrategy")?e.lookaheadStrategy:new Yu({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){Ae(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=PGe(r);Ae(n,u=>{let h=u.idx===0?"":u.idx;this.TRACE_INIT(`${$s(u)}${h}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:r,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=D6(this.fullRuleNameToShort[r.name],256,u.idx);this.setLaFuncCache(d,f)})}),Ae(i,u=>{this.computeLookaheadFunc(r,u.idx,768,"Repetition",u.maxLookahead,$s(u))}),Ae(a,u=>{this.computeLookaheadFunc(r,u.idx,512,"Option",u.maxLookahead,$s(u))}),Ae(s,u=>{this.computeLookaheadFunc(r,u.idx,1024,"RepetitionMandatory",u.maxLookahead,$s(u))}),Ae(o,u=>{this.computeLookaheadFunc(r,u.idx,1536,"RepetitionMandatoryWithSeparator",u.maxLookahead,$s(u))}),Ae(l,u=>{this.computeLookaheadFunc(r,u.idx,1280,"RepetitionWithSeparator",u.maxLookahead,$s(u))})})})}computeLookaheadFunc(e,r,n,i,a,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),l=D6(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return D6(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},BD=class extends ss{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},O6=new BD});function zD(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{});function VD(t,e){Object.defineProperty(t,BGe,{enumerable:!1,configurable:!0,writable:!1,value:e})}var BGe,hfe=F(()=>{BGe="name"});function FGe(t,e){let r=zr(t),n=r.length;for(let i=0;is.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: ${a.join(` `).replace(/\n/g,` `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function dfe(t,e,r){let n=function(){};VD(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return Ae(e,a=>{i[a]=FGe}),n.prototype=i,n.prototype.constructor=n,n}function $Ge(t,e){return zGe(t,e)}function zGe(t,e){let r=Yr(e,i=>gi(t[i])===!1),n=Ze(r,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:UD.MISSING_METHOD,methodName:i}));return bc(n)}var UD,pfe=F(()=>{$t();hfe();(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(UD||(UD={}))});var z6,gfe=F(()=>{ufe();$t();pfe();zs();z6=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Nt(e,"nodeLocationTracking")?e.nodeLocationTracking:ls.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Jn,this.cstFinallyStateUpdate=Jn,this.cstPostTerminal=Jn,this.cstPostNonTerminal=Jn,this.cstPostRule=Jn;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=GD,this.setNodeLocationFromNode=GD,this.cstPostRule=Jn,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Jn,this.setNodeLocationFromNode=Jn,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=zD,this.setNodeLocationFromNode=zD,this.cstPostRule=Jn,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Jn,this.setNodeLocationFromNode=Jn,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Jn,this.setNodeLocationFromNode=Jn,this.cstPostRule=Jn,this.setInitialNodeLocation=Jn;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];lfe(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];cfe(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(ur(this.baseCstVisitorConstructor)){let e=ffe(this.className,zr(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(ur(this.baseCstVisitorWithDefaultsConstructor)){let e=dfe(this.className,zr(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}});var G6,mfe=F(()=>{zs();G6=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):i1}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?i1:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}});var V6,vfe=F(()=>{$t();n1();zs();Zm();Cx();os();V6=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=a1){if(Gn(this.definedRulesNames,e)){let s={message:Il.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Ri.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i}OVERRIDE_RULE(e,r,n=a1){let i=jhe(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let a=this.defineRule(e,r,n);return this[e]=a,a}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,r),!0}catch(i){if(Lf(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return d6(gr(this.gastProductionsCache))}}});var U6,yfe=F(()=>{$t();M6();n1();t1();kx();zs();OD();L0();_0();U6=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=jm,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Nt(r,"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(It(e)){if(lr(e))throw Error(`A Token Vocabulary cannot be empty. Note that the first argument for the parser constructor is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 For Further details.`)}if(It(e))this.tokensMap=Xr(e,(a,s)=>(a[s.name]=s,a),{});else if(Nt(e,"modes")&&Sa(Hr(gr(e.modes)),Che)){let a=Hr(gr(e.modes)),s=bg(a);this.tokensMap=Xr(s,(o,l)=>(o[l.name]=l,o),{})}else if(bn(e))this.tokensMap=tn(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=lo;let n=Nt(e,"modes")?Hr(gr(e.modes)):gr(e),i=Sa(n,a=>lr(a.categoryMatches));this.tokenMatcher=i?jm:Vu,Uu(gr(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=Nt(n,"resyncEnabled")?n.resyncEnabled:a1.resyncEnabled,a=Nt(n,"recoveryValueFunc")?n.recoveryValueFunc:a1.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let o;return this.outputCst===!0?o=function(...h){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,h);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,i,a)}finally{this.ruleFinallyStateUpdate()}}:o=function(...h){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,h)}catch(f){return this.invokeRuleCatch(f,i,a)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){let i=this.RULE_STACK.length===1,a=r&&!this.isBackTracking()&&this.recoveryEnabled;if(Lf(e)){let s=e;if(a){let o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return n(e);else{if(this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,s.partialCstResult=l}throw s}}else{if(i)return this.moveToTerminatedState(),n(e);throw s}}else throw e}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof e!="function"){a=e.DEF;let s=e.GATE;if(s!==void 0){let o=i;i=()=>s.call(this)&&o.call(this)}}else a=e;if(i.call(this)===!0)return a.call(this)}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let s=r.GATE;if(s!==void 0){let o=i;i=()=>s.call(this)&&o.call(this)}}else a=r;if(i.call(this)===!0){let s=this.doSingleRepetition(a);for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(e,Wn.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,S6)}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let o=()=>this.tokenMatcher(this.LA(1),a);for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,i,Tx],o,1536,e,Tx)}else throw this.raiseEarlyExitException(e,Wn.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let o=r.GATE;if(o!==void 0){let l=i;i=()=>o.call(this)&&l.call(this)}}else a=r;let s=!0;for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,E6,s)}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let o=()=>this.tokenMatcher(this.LA(1),a);for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,i,wx],o,1280,e,wx)}}repetitionSepSecondInternal(e,r,n,i,a){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,i,a],n,1536,e,a)}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),i=It(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(s!==void 0)return i[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new _x(r,e))}}subruleInternal(e,r,n){let i;try{let a=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=e.apply(this,a),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i}catch(a){throw this.subruleInternalError(a,n,e.ruleName)}}subruleInternalError(e,r,n){throw Lf(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let i;try{let a=this.LA(1);this.tokenMatcher(a,e)===!0?(this.consumeToken(),i=a):this.consumeInternalError(e,a,n)}catch(a){i=this.consumeInternalRecovery(e,r,a)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i}consumeInternalError(e,r,n){let i,a=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new R0(i,r,a))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i)}catch(a){throw a.name===MD?n:a}}else throw n}saveRecogState(){let e=this.errors,r=tn(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),lo)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}});var q6,xfe=F(()=>{n1();$t();t1();zs();q6=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Nt(e,"errorMessageProvider")?e.errorMessageProvider:ls.errorMessageProvider}SAVE_ERROR(e){if(Lf(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:tn(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return tn(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],o=e1(e,a,r,this.maxLookahead)[0],l=[];for(let h=1;h<=this.maxLookahead;h++)l.push(this.LA(h));let u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new Lx(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],a=Jm(e,i,this.maxLookahead),s=[];for(let u=1;u<=this.maxLookahead;u++)s.push(this.LA(u));let o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:s,previous:o,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Ax(l,this.LA(1),o))}}});var W6,bfe=F(()=>{kx();$t();W6=class{initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(ur(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return A6([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let r=Gi(e.ruleStack),i=this.getGAstProductions()[r];return new k6(i,e).startWalking()}}});function Ix(t,e,r,n=!1){Y6(r);let i=oa(this.recordingProdStack),a=gi(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),Nt(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),X6}function UGe(t,e){Y6(e);let r=oa(this.recordingProdStack),n=It(t)===!1,i=n===!1?t:t.DEF,a=new kn({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});Nt(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);let s=Zy(i,o=>gi(o.GATE));return a.hasPredicates=s,r.definition.push(a),Ae(i,o=>{let l=new Ln({definition:[]});a.definition.push(l),Nt(o,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:Nt(o,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),o.ALT.call(this),this.recordingProdStack.pop()}),X6}function kfe(t){return t===0?"":`${t}`}function Y6(t){if(t<0||t>Tfe){let e=new Error(`Invalid DSL Method idx value: <${t}> Idx value must be a none negative value smaller than ${Tfe+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var X6,wfe,Tfe,Efe,Sfe,VGe,H6,Cfe=F(()=>{$t();os();yx();_0();L0();zs();M6();X6={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(X6);wfe=!0,Tfe=Math.pow(2,8)-1,Efe=_f({name:"RECORDING_PHASE_TOKEN",pattern:qn.NA});Uu([Efe]);Sfe=Wu(Efe,`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(Sfe);VGe={name:`This CSTNode indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},H6=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,e,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,e,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return i1}topLevelRuleRecord(e,r){try{let n=new as({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.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 n}throw n}}optionInternalRecord(e,r){return Ix.call(this,on,e,r)}atLeastOneInternalRecord(e,r){Ix.call(this,Rn,r,e)}atLeastOneSepFirstInternalRecord(e,r){Ix.call(this,In,r,e,wfe)}manyInternalRecord(e,r){Ix.call(this,Mr,r,e)}manySepFirstInternalRecord(e,r){Ix.call(this,Tn,r,e,wfe)}orInternalRecord(e,r){return UGe.call(this,e,r)}subruleInternalRecord(e,r,n){if(Y6(r),!e||Nt(e,"ruleName")===!1){let o=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let i=oa(this.recordingProdStack),a=e.ruleName,s=new sn({idx:r,nonTerminalName:a,label:n?.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?VGe:X6}consumeInternalRecord(e,r,n){if(Y6(r),!TD(e)){let s=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=oa(this.recordingProdStack),a=new br({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(a),Sfe}}});var j6,Afe=F(()=>{$t();qm();zs();j6=class{initPerformanceTracer(e){if(Nt(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=ls.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);let{time:i,value:a}=gx(r),s=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,a}else return r()}}});function _fe(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let a=Object.getOwnPropertyDescriptor(n,i);a&&(a.get||a.set)?Object.defineProperty(t.prototype,i,a):t.prototype[i]=r.prototype[i]})})}var Lfe=F(()=>{});function K6(t=void 0){return function(){return t}}var i1,ls,a1,Ri,Nx,Dx,zs=F(()=>{$t();qm();ahe();L0();Zm();tfe();OD();ofe();gfe();mfe();vfe();yfe();xfe();bfe();Cfe();Afe();Lfe();Cx();i1=Wu(lo,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(i1);ls=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Hu,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),a1=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});(function(t){t[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"})(Ri||(Ri={}));Nx=class t{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{mx(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),Ae(this.definedRulesNames,i=>{let s=this[i].originalGrammarAction,o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,s)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Jhe({rules:gr(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(lr(n)&&this.skipValidations===!1){let i=efe({rules:gr(this.gastProductionsCache),tokenTypes:gr(this.tokensMap),errMsgProvider:Il,grammarName:r}),a=Hhe({lookaheadStrategy:this.lookaheadStrategy,rules:gr(this.gastProductionsCache),tokenTypes:gr(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,a)}}),lr(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=ihe(gr(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,a;(a=(i=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(i,{rules:gr(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(gr(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!lr(this.definitionErrors))throw e=Ze(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: ${e.join(` ------------------------------- `)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),Nt(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES For further details.`);this.skipValidations=Nt(r,"skipValidations")?r.skipValidations:ls.skipValidations}};Nx.DEFER_DEFINITION_ERRORS_HANDLING=!1;_fe(Nx,[N6,P6,z6,G6,U6,V6,q6,W6,H6,j6]);Dx=class extends Nx{constructor(e,r=ls){let n=tn(r);n.outputCst=!1,super(e,n)}}});var Rfe=F(()=>{os()});var Ife=F(()=>{});var Nfe=F(()=>{Rfe();Ife()});var Dfe=F(()=>{uD()});var Rf=F(()=>{uD();zs();yx();L0();t1();PD();Zm();n1();kD();os();os();Nfe();Dfe()});function I0(t,e,r){return`${t.name}_${e}_${r}`}function Bfe(t){let e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};KGe(e,t);let r=t.length;for(let n=0;nFfe(t,e,s));return c1(t,e,n,r,...i)}function rVe(t,e,r){let n=Wi(t,e,r,{type:If});Nf(t,n);let i=c1(t,e,n,r,N0(t,e,r));return nVe(t,e,r,i)}function N0(t,e,r){let n=Yr(Ze(r.definition,i=>Ffe(t,e,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:aVe(t,n)}function $fe(t,e,r,n,i){let a=n.left,s=n.right,o=Wi(t,e,r,{type:jGe});Nf(t,o);let l=Wi(t,e,r,{type:Pfe});return a.loopback=o,l.loopback=o,t.decisionMap[I0(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,bi(s,o),i===void 0?(bi(o,a),bi(o,l)):(bi(o,l),bi(o,i.left),bi(i.right,a)),{left:a,right:l}}function zfe(t,e,r,n,i){let a=n.left,s=n.right,o=Wi(t,e,r,{type:XGe});Nf(t,o);let l=Wi(t,e,r,{type:Pfe}),u=Wi(t,e,r,{type:YGe});return o.loopback=u,l.loopback=u,bi(o,a),bi(o,l),bi(s,u),i!==void 0?(bi(u,l),bi(u,i.left),bi(i.right,a)):bi(u,o),t.decisionMap[I0(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function nVe(t,e,r,n){let i=n.left,a=n.right;return bi(i,a),t.decisionMap[I0(e,"Option",r.idx)]=i,n}function Nf(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function c1(t,e,r,n,...i){let a=Wi(t,e,n,{type:HGe,start:r});r.end=a;for(let o of i)o!==void 0?(bi(r,o.left),bi(o.right,a)):bi(r,a);let s={left:r,right:a};return t.decisionMap[I0(e,iVe(n),n.idx)]=r,s}function iVe(t){if(t instanceof kn)return"Alternation";if(t instanceof on)return"Option";if(t instanceof Mr)return"Repetition";if(t instanceof Tn)return"RepetitionWithSeparator";if(t instanceof Rn)return"RepetitionMandatory";if(t instanceof In)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function aVe(t,e){let r=e.length;for(let a=0;a{vg();G9();Rf();If=1,WGe=2,Mfe=4,Ofe=5,l1=7,HGe=8,YGe=9,XGe=10,jGe=11,Pfe=12,Mx=class{constructor(e){this.target=e}isEpsilon(){return!1}},s1=class extends Mx{constructor(e,r){super(e),this.tokenType=r}},Ox=class extends Mx{constructor(e){super(e)}isEpsilon(){return!0}},o1=class extends Mx{constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}}});function YD(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}var Px,u1,Vfe=F(()=>{vg();Px={},u1=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let r=YD(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Ze(this.configs,e=>e.alt)}get key(){let e="";for(let r in this.map)e+=r+":";return e}}});function cVe(t,e){let r={};return n=>{let i=n.toString(),a=r[i];return a!==void 0||(a={atnStartState:t,decision:e,states:{}},r[i]=a),a}}function qfe(t,e=!0){let r=new Set;for(let n of t){let i=new Set;for(let a of n){if(a===void 0){if(e)break;return!1}let s=[a.tokenTypeIdx].concat(a.categoryMatches);for(let o of s)if(r.has(o)){if(!i.has(o))return!1}else r.add(o),i.add(o)}}return!0}function uVe(t){let e=t.decisionStates.length,r=Array(e);for(let n=0;nqu(i)).join(", "),r=t.production.idx===0?"":t.production.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${gVe(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`,n}function gVe(t){if(t instanceof sn)return"SUBRULE";if(t instanceof on)return"OPTION";if(t instanceof kn)return"OR";if(t instanceof Rn)return"AT_LEAST_ONE";if(t instanceof In)return"AT_LEAST_ONE_SEP";if(t instanceof Tn)return"MANY_SEP";if(t instanceof Mr)return"MANY";if(t instanceof br)return"CONSUME";throw Error("non exhaustive match")}function mVe(t,e,r){let n=la(e.configs.elements,a=>a.state.transitions),i=Dne(n.filter(a=>a instanceof s1).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:t}}function vVe(t,e){return t.edges[e.tokenTypeIdx]}function yVe(t,e,r){let n=new u1,i=[];for(let s of t.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===l1){i.push(s);continue}let o=s.state.transitions.length;for(let l=0;l0&&!kVe(a))for(let s of i)a.add(s);return a}function xVe(t,e){if(t instanceof s1&&bx(e,t.tokenType))return t.target}function bVe(t,e){let r;for(let n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function Hfe(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function Wfe(t,e,r,n){return n=Yfe(t,n),e.edges[r.tokenTypeIdx]=n,n}function Yfe(t,e){if(e===Px)return e;let r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}function wVe(t){let e=new u1,r=t.transitions.length;for(let n=0;n0){let i=[...t.stack],s={state:i.pop(),alt:t.alt,stack:i};Q6(s,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);let n=r.transitions.length;for(let i=0;i1)return!0;return!1}function _Ve(t){for(let e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var Z6,Ufe,Bx,Xfe=F(()=>{Rf();Gfe();Vfe();j9();U9();Mne();vg();Lw();iT();cT();J9();Z6=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="",r=this.predicates.length;for(let n=0;nconsole.log(n)}initialize(e){this.atn=Bfe(e.rules),this.dfas=uVe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:r,rule:n,hasPredicates:i,dynamicTokensEnabled:a}=e,s=this.dfas,o=this.logging,l=I0(n,"Alternation",r),h=this.atn.decisionMap[l].decision,f=Ze(L6({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),d=>Ze(d,p=>p[0]));if(qfe(f,!1)&&!a){let d=Xr(f,(p,g,m)=>(Ae(g,v=>{v&&(p[v.tokenTypeIdx]=m,Ae(v.categoryMatches,y=>{p[y]=m}))}),p),{});return i?function(p){var g;let m=this.LA(1),v=d[m.tokenTypeIdx];if(p!==void 0&&v!==void 0){let y=(g=p[v])===null||g===void 0?void 0:g.GATE;if(y!==void 0&&y.call(this)===!1)return}return v}:function(){let p=this.LA(1);return d[p.tokenTypeIdx]}}else return i?function(d){let p=new Z6,g=d===void 0?0:d.length;for(let v=0;vZe(d,p=>p[0]));if(qfe(f)&&f[0][0]&&!a){let d=f[0],p=Hr(d);if(p.length===1&&lr(p[0].categoryMatches)){let m=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===m}}else{let g=Xr(p,(m,v)=>(v!==void 0&&(m[v.tokenTypeIdx]=!0,Ae(v.categoryMatches,y=>{m[y]=!0})),m),{});return function(){let m=this.LA(1);return g[m.tokenTypeIdx]===!0}}}return function(){let d=XD.call(this,s,h,Ufe,o);return typeof d=="object"?!1:d===0}}}});var jfe=F(()=>{Xfe()});var Kfe,jD,Zfe,J6,Kr,Or,eE,Qfe,KD,Jfe,ede,tde,rde,ZD,nde,ide,ade,tE,h1,f1,QD,d1,sde,JD,eM,tM,rM,nM,ode,lde,iM,cde,aM,Fx,ude,hde,fde,dde,pde,gde,mde,vde,rE,yde,xde,bde,wde,Tde,kde,Ede,Sde,Cde,Ade,_de,nE,Lde,Rde,Ide,Nde,Dde,Mde,Ode,Pde,Bde,Fde,$de,zde,Gde,sM,oM,Vde,Ude,qde,Wde,Hde,Yde,Xde,jde,Kde,lM,Ge,cM=F(()=>{"use strict";(function(t){function e(r){return typeof r=="string"}t.is=e})(Kfe||(Kfe={}));(function(t){function e(r){return typeof r=="string"}t.is=e})(jD||(jD={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(Zfe||(Zfe={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(J6||(J6={}));(function(t){function e(n,i){return n===Number.MAX_VALUE&&(n=J6.MAX_VALUE),i===Number.MAX_VALUE&&(i=J6.MAX_VALUE),{line:n,character:i}}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Ge.uinteger(i.line)&&Ge.uinteger(i.character)}t.is=r})(Kr||(Kr={}));(function(t){function e(n,i,a,s){if(Ge.uinteger(n)&&Ge.uinteger(i)&&Ge.uinteger(a)&&Ge.uinteger(s))return{start:Kr.create(n,i),end:Kr.create(a,s)};if(Kr.is(n)&&Kr.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${a}, ${s}]`)}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Kr.is(i.start)&&Kr.is(i.end)}t.is=r})(Or||(Or={}));(function(t){function e(n,i){return{uri:n,range:i}}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Or.is(i.range)&&(Ge.string(i.uri)||Ge.undefined(i.uri))}t.is=r})(eE||(eE={}));(function(t){function e(n,i,a,s){return{targetUri:n,targetRange:i,targetSelectionRange:a,originSelectionRange:s}}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Or.is(i.targetRange)&&Ge.string(i.targetUri)&&Or.is(i.targetSelectionRange)&&(Or.is(i.originSelectionRange)||Ge.undefined(i.originSelectionRange))}t.is=r})(Qfe||(Qfe={}));(function(t){function e(n,i,a,s){return{red:n,green:i,blue:a,alpha:s}}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Ge.numberRange(i.red,0,1)&&Ge.numberRange(i.green,0,1)&&Ge.numberRange(i.blue,0,1)&&Ge.numberRange(i.alpha,0,1)}t.is=r})(KD||(KD={}));(function(t){function e(n,i){return{range:n,color:i}}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Or.is(i.range)&&KD.is(i.color)}t.is=r})(Jfe||(Jfe={}));(function(t){function e(n,i,a){return{label:n,textEdit:i,additionalTextEdits:a}}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Ge.string(i.label)&&(Ge.undefined(i.textEdit)||f1.is(i))&&(Ge.undefined(i.additionalTextEdits)||Ge.typedArray(i.additionalTextEdits,f1.is))}t.is=r})(ede||(ede={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(tde||(tde={}));(function(t){function e(n,i,a,s,o,l){let u={startLine:n,endLine:i};return Ge.defined(a)&&(u.startCharacter=a),Ge.defined(s)&&(u.endCharacter=s),Ge.defined(o)&&(u.kind=o),Ge.defined(l)&&(u.collapsedText=l),u}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Ge.uinteger(i.startLine)&&Ge.uinteger(i.startLine)&&(Ge.undefined(i.startCharacter)||Ge.uinteger(i.startCharacter))&&(Ge.undefined(i.endCharacter)||Ge.uinteger(i.endCharacter))&&(Ge.undefined(i.kind)||Ge.string(i.kind))}t.is=r})(rde||(rde={}));(function(t){function e(n,i){return{location:n,message:i}}t.create=e;function r(n){let i=n;return Ge.defined(i)&&eE.is(i.location)&&Ge.string(i.message)}t.is=r})(ZD||(ZD={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(nde||(nde={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(ide||(ide={}));(function(t){function e(r){let n=r;return Ge.objectLiteral(n)&&Ge.string(n.href)}t.is=e})(ade||(ade={}));(function(t){function e(n,i,a,s,o,l){let u={range:n,message:i};return Ge.defined(a)&&(u.severity=a),Ge.defined(s)&&(u.code=s),Ge.defined(o)&&(u.source=o),Ge.defined(l)&&(u.relatedInformation=l),u}t.create=e;function r(n){var i;let a=n;return Ge.defined(a)&&Or.is(a.range)&&Ge.string(a.message)&&(Ge.number(a.severity)||Ge.undefined(a.severity))&&(Ge.integer(a.code)||Ge.string(a.code)||Ge.undefined(a.code))&&(Ge.undefined(a.codeDescription)||Ge.string((i=a.codeDescription)===null||i===void 0?void 0:i.href))&&(Ge.string(a.source)||Ge.undefined(a.source))&&(Ge.undefined(a.relatedInformation)||Ge.typedArray(a.relatedInformation,ZD.is))}t.is=r})(tE||(tE={}));(function(t){function e(n,i,...a){let s={title:n,command:i};return Ge.defined(a)&&a.length>0&&(s.arguments=a),s}t.create=e;function r(n){let i=n;return Ge.defined(i)&&Ge.string(i.title)&&Ge.string(i.command)}t.is=r})(h1||(h1={}));(function(t){function e(a,s){return{range:a,newText:s}}t.replace=e;function r(a,s){return{range:{start:a,end:a},newText:s}}t.insert=r;function n(a){return{range:a,newText:""}}t.del=n;function i(a){let s=a;return Ge.objectLiteral(s)&&Ge.string(s.newText)&&Or.is(s.range)}t.is=i})(f1||(f1={}));(function(t){function e(n,i,a){let s={label:n};return i!==void 0&&(s.needsConfirmation=i),a!==void 0&&(s.description=a),s}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Ge.string(i.label)&&(Ge.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(Ge.string(i.description)||i.description===void 0)}t.is=r})(QD||(QD={}));(function(t){function e(r){let n=r;return Ge.string(n)}t.is=e})(d1||(d1={}));(function(t){function e(a,s,o){return{range:a,newText:s,annotationId:o}}t.replace=e;function r(a,s,o){return{range:{start:a,end:a},newText:s,annotationId:o}}t.insert=r;function n(a,s){return{range:a,newText:"",annotationId:s}}t.del=n;function i(a){let s=a;return f1.is(s)&&(QD.is(s.annotationId)||d1.is(s.annotationId))}t.is=i})(sde||(sde={}));(function(t){function e(n,i){return{textDocument:n,edits:i}}t.create=e;function r(n){let i=n;return Ge.defined(i)&&iM.is(i.textDocument)&&Array.isArray(i.edits)}t.is=r})(JD||(JD={}));(function(t){function e(n,i,a){let s={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s}t.create=e;function r(n){let i=n;return i&&i.kind==="create"&&Ge.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||Ge.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Ge.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||d1.is(i.annotationId))}t.is=r})(eM||(eM={}));(function(t){function e(n,i,a,s){let o={kind:"rename",oldUri:n,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}t.create=e;function r(n){let i=n;return i&&i.kind==="rename"&&Ge.string(i.oldUri)&&Ge.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||Ge.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Ge.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||d1.is(i.annotationId))}t.is=r})(tM||(tM={}));(function(t){function e(n,i,a){let s={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s}t.create=e;function r(n){let i=n;return i&&i.kind==="delete"&&Ge.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||Ge.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||Ge.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||d1.is(i.annotationId))}t.is=r})(rM||(rM={}));(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>Ge.string(i.kind)?eM.is(i)||tM.is(i)||rM.is(i):JD.is(i)))}t.is=e})(nM||(nM={}));(function(t){function e(n){return{uri:n}}t.create=e;function r(n){let i=n;return Ge.defined(i)&&Ge.string(i.uri)}t.is=r})(ode||(ode={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return Ge.defined(i)&&Ge.string(i.uri)&&Ge.integer(i.version)}t.is=r})(lde||(lde={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return Ge.defined(i)&&Ge.string(i.uri)&&(i.version===null||Ge.integer(i.version))}t.is=r})(iM||(iM={}));(function(t){function e(n,i,a,s){return{uri:n,languageId:i,version:a,text:s}}t.create=e;function r(n){let i=n;return Ge.defined(i)&&Ge.string(i.uri)&&Ge.string(i.languageId)&&Ge.integer(i.version)&&Ge.string(i.text)}t.is=r})(cde||(cde={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}t.is=e})(aM||(aM={}));(function(t){function e(r){let n=r;return Ge.objectLiteral(r)&&aM.is(n.kind)&&Ge.string(n.value)}t.is=e})(Fx||(Fx={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(ude||(ude={}));(function(t){t.PlainText=1,t.Snippet=2})(hde||(hde={}));(function(t){t.Deprecated=1})(fde||(fde={}));(function(t){function e(n,i,a){return{newText:n,insert:i,replace:a}}t.create=e;function r(n){let i=n;return i&&Ge.string(i.newText)&&Or.is(i.insert)&&Or.is(i.replace)}t.is=r})(dde||(dde={}));(function(t){t.asIs=1,t.adjustIndentation=2})(pde||(pde={}));(function(t){function e(r){let n=r;return n&&(Ge.string(n.detail)||n.detail===void 0)&&(Ge.string(n.description)||n.description===void 0)}t.is=e})(gde||(gde={}));(function(t){function e(r){return{label:r}}t.create=e})(mde||(mde={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}t.create=e})(vde||(vde={}));(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function r(n){let i=n;return Ge.string(i)||Ge.objectLiteral(i)&&Ge.string(i.language)&&Ge.string(i.value)}t.is=r})(rE||(rE={}));(function(t){function e(r){let n=r;return!!n&&Ge.objectLiteral(n)&&(Fx.is(n.contents)||rE.is(n.contents)||Ge.typedArray(n.contents,rE.is))&&(r.range===void 0||Or.is(r.range))}t.is=e})(yde||(yde={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}t.create=e})(xde||(xde={}));(function(t){function e(r,n,...i){let a={label:r};return Ge.defined(n)&&(a.documentation=n),Ge.defined(i)?a.parameters=i:a.parameters=[],a}t.create=e})(bde||(bde={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(wde||(wde={}));(function(t){function e(r,n){let i={range:r};return Ge.number(n)&&(i.kind=n),i}t.create=e})(Tde||(Tde={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(kde||(kde={}));(function(t){t.Deprecated=1})(Ede||(Ede={}));(function(t){function e(r,n,i,a,s){let o={name:r,kind:n,location:{uri:a,range:i}};return s&&(o.containerName=s),o}t.create=e})(Sde||(Sde={}));(function(t){function e(r,n,i,a){return a!==void 0?{name:r,kind:n,location:{uri:i,range:a}}:{name:r,kind:n,location:{uri:i}}}t.create=e})(Cde||(Cde={}));(function(t){function e(n,i,a,s,o,l){let u={name:n,detail:i,kind:a,range:s,selectionRange:o};return l!==void 0&&(u.children=l),u}t.create=e;function r(n){let i=n;return i&&Ge.string(i.name)&&Ge.number(i.kind)&&Or.is(i.range)&&Or.is(i.selectionRange)&&(i.detail===void 0||Ge.string(i.detail))&&(i.deprecated===void 0||Ge.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=r})(Ade||(Ade={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(_de||(_de={}));(function(t){t.Invoked=1,t.Automatic=2})(nE||(nE={}));(function(t){function e(n,i,a){let s={diagnostics:n};return i!=null&&(s.only=i),a!=null&&(s.triggerKind=a),s}t.create=e;function r(n){let i=n;return Ge.defined(i)&&Ge.typedArray(i.diagnostics,tE.is)&&(i.only===void 0||Ge.typedArray(i.only,Ge.string))&&(i.triggerKind===void 0||i.triggerKind===nE.Invoked||i.triggerKind===nE.Automatic)}t.is=r})(Lde||(Lde={}));(function(t){function e(n,i,a){let s={title:n},o=!0;return typeof i=="string"?(o=!1,s.kind=i):h1.is(i)?s.command=i:s.edit=i,o&&a!==void 0&&(s.kind=a),s}t.create=e;function r(n){let i=n;return i&&Ge.string(i.title)&&(i.diagnostics===void 0||Ge.typedArray(i.diagnostics,tE.is))&&(i.kind===void 0||Ge.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||h1.is(i.command))&&(i.isPreferred===void 0||Ge.boolean(i.isPreferred))&&(i.edit===void 0||nM.is(i.edit))}t.is=r})(Rde||(Rde={}));(function(t){function e(n,i){let a={range:n};return Ge.defined(i)&&(a.data=i),a}t.create=e;function r(n){let i=n;return Ge.defined(i)&&Or.is(i.range)&&(Ge.undefined(i.command)||h1.is(i.command))}t.is=r})(Ide||(Ide={}));(function(t){function e(n,i){return{tabSize:n,insertSpaces:i}}t.create=e;function r(n){let i=n;return Ge.defined(i)&&Ge.uinteger(i.tabSize)&&Ge.boolean(i.insertSpaces)}t.is=r})(Nde||(Nde={}));(function(t){function e(n,i,a){return{range:n,target:i,data:a}}t.create=e;function r(n){let i=n;return Ge.defined(i)&&Or.is(i.range)&&(Ge.undefined(i.target)||Ge.string(i.target))}t.is=r})(Dde||(Dde={}));(function(t){function e(n,i){return{range:n,parent:i}}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Or.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=r})(Mde||(Mde={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(Ode||(Ode={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(Pde||(Pde={}));(function(t){function e(r){let n=r;return Ge.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}t.is=e})(Bde||(Bde={}));(function(t){function e(n,i){return{range:n,text:i}}t.create=e;function r(n){let i=n;return i!=null&&Or.is(i.range)&&Ge.string(i.text)}t.is=r})(Fde||(Fde={}));(function(t){function e(n,i,a){return{range:n,variableName:i,caseSensitiveLookup:a}}t.create=e;function r(n){let i=n;return i!=null&&Or.is(i.range)&&Ge.boolean(i.caseSensitiveLookup)&&(Ge.string(i.variableName)||i.variableName===void 0)}t.is=r})($de||($de={}));(function(t){function e(n,i){return{range:n,expression:i}}t.create=e;function r(n){let i=n;return i!=null&&Or.is(i.range)&&(Ge.string(i.expression)||i.expression===void 0)}t.is=r})(zde||(zde={}));(function(t){function e(n,i){return{frameId:n,stoppedLocation:i}}t.create=e;function r(n){let i=n;return Ge.defined(i)&&Or.is(n.stoppedLocation)}t.is=r})(Gde||(Gde={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}t.is=e})(sM||(sM={}));(function(t){function e(n){return{value:n}}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&(i.tooltip===void 0||Ge.string(i.tooltip)||Fx.is(i.tooltip))&&(i.location===void 0||eE.is(i.location))&&(i.command===void 0||h1.is(i.command))}t.is=r})(oM||(oM={}));(function(t){function e(n,i,a){let s={position:n,label:i};return a!==void 0&&(s.kind=a),s}t.create=e;function r(n){let i=n;return Ge.objectLiteral(i)&&Kr.is(i.position)&&(Ge.string(i.label)||Ge.typedArray(i.label,oM.is))&&(i.kind===void 0||sM.is(i.kind))&&i.textEdits===void 0||Ge.typedArray(i.textEdits,f1.is)&&(i.tooltip===void 0||Ge.string(i.tooltip)||Fx.is(i.tooltip))&&(i.paddingLeft===void 0||Ge.boolean(i.paddingLeft))&&(i.paddingRight===void 0||Ge.boolean(i.paddingRight))}t.is=r})(Vde||(Vde={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e})(Ude||(Ude={}));(function(t){function e(r,n,i,a){return{insertText:r,filterText:n,range:i,command:a}}t.create=e})(qde||(qde={}));(function(t){function e(r){return{items:r}}t.create=e})(Wde||(Wde={}));(function(t){t.Invoked=0,t.Automatic=1})(Hde||(Hde={}));(function(t){function e(r,n){return{range:r,text:n}}t.create=e})(Yde||(Yde={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}t.create=e})(Xde||(Xde={}));(function(t){function e(r){let n=r;return Ge.objectLiteral(n)&&jD.is(n.uri)&&Ge.string(n.name)}t.is=e})(jde||(jde={}));(function(t){function e(a,s,o,l){return new lM(a,s,o,l)}t.create=e;function r(a){let s=a;return!!(Ge.defined(s)&&Ge.string(s.uri)&&(Ge.undefined(s.languageId)||Ge.string(s.languageId))&&Ge.uinteger(s.lineCount)&&Ge.func(s.getText)&&Ge.func(s.positionAt)&&Ge.func(s.offsetAt))}t.is=r;function n(a,s){let o=a.getText(),l=i(s,(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=o.length;for(let h=l.length-1;h>=0;h--){let f=l[h],d=a.offsetAt(f.range.start),p=a.offsetAt(f.range.end);if(p<=u)o=o.substring(0,d)+f.newText+o.substring(p,o.length);else throw new Error("Overlapping edit");u=d}return o}t.applyEdits=n;function i(a,s){if(a.length<=1)return a;let o=a.length/2|0,l=a.slice(0,o),u=a.slice(o);i(l,s),i(u,s);let h=0,f=0,d=0;for(;h0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return Kr.create(0,e);for(;ne?i=s:n=s+1}let a=n-1;return Kr.create(a,e-r[a])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],i=e.line+1"u"}t.undefined=n;function i(p){return p===!0||p===!1}t.boolean=i;function a(p){return e.call(p)==="[object String]"}t.string=a;function s(p){return e.call(p)==="[object Number]"}t.number=s;function o(p,g,m){return e.call(p)==="[object Number]"&&g<=p&&p<=m}t.numberRange=o;function l(p){return e.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}t.integer=l;function u(p){return e.call(p)==="[object Number]"&&0<=p&&p<=2147483647}t.uinteger=u;function h(p){return e.call(p)==="[object Function]"}t.func=h;function f(p){return p!==null&&typeof p=="object"}t.objectLiteral=f;function d(p,g){return Array.isArray(p)&&p.every(g)}t.typedArray=d})(Ge||(Ge={}))});var $x,zx,D0,M0,uM,p1,iE=F(()=>{cM();Al();$x=class{constructor(){this.nodeStack=[]}get current(){var e;return(e=this.nodeStack[this.nodeStack.length-1])!==null&&e!==void 0?e:this.rootNode}buildRootNode(e){return this.rootNode=new p1(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let r=new M0;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){let n=new D0(e.startOffset,e.image.length,Kg(e),e.tokenType,!r);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let r=e.container;if(r){let n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}addHiddenNodes(e){let r=[];for(let a of e){let s=new D0(a.startOffset,a.image.length,Kg(a),a.tokenType,!0);s.root=this.rootNode,r.push(s)}let n=this.current,i=!1;if(n.content.length>0){n.content.push(...r);return}for(;n.container;){let a=n.container.content.indexOf(n);if(a>0){n.container.content.splice(a,0,...r),i=!0;break}n=n.container}i||this.rootNode.content.unshift(...r)}construct(e){let r=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=r;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},zx=class{get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var e,r;let n=typeof((e=this._astNode)===null||e===void 0?void 0:e.$type)=="string"?this._astNode:(r=this.container)===null||r===void 0?void 0:r.astNode;if(!n)throw new Error("This node has no associated AST element");return n}set astNode(e){this._astNode=e}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},D0=class extends zx{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,r,n,i,a=!1){super(),this._hidden=a,this._offset=e,this._tokenType=i,this._length=r,this._range=n}},M0=class extends zx{constructor(){super(...arguments),this.content=new uM(this)}get children(){return this.content}get offset(){var e,r;return(r=(e=this.firstNonHiddenNode)===null||e===void 0?void 0:e.offset)!==null&&r!==void 0?r:0}get length(){return this.end-this.offset}get end(){var e,r;return(r=(e=this.lastNonHiddenNode)===null||e===void 0?void 0:e.end)!==null&&r!==void 0?r:0}get range(){let e=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(e&&r){if(this._rangeCache===void 0){let{range:n}=e,{range:i}=r;this._rangeCache={start:n.start,end:i.end.line=0;e--){let r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},uM=class t extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(let r of e)r.container=this.parent}},p1=class extends M0{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}});function hM(t){return t.$type===aE}var aE,Zde,Qde,Gx,Vx,sE,g1,Ux,LVe,fM,qx=F(()=>{Rf();jfe();Fc();Rl();is();iE();aE=Symbol("Datatype");Zde="\u200B",Qde=t=>t.endsWith(Zde)?t:t+Zde,Gx=class{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";this.wrapper=new fM(r,Object.assign(Object.assign({},e.parser.ParserConfig),{skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Vx=class extends Gx{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new $x,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,r){let n=this.computeRuleType(e),i=this.wrapper.DEFINE_RULE(Qde(e.name),this.startImplementation(n,r).bind(this));return this.allRules.set(e.name,i),e.entry&&(this.mainRule=i),i}computeRuleType(e){if(!e.fragment){if(fx(e))return aE;{let r=zm(e);return r??e.name}}}parse(e,r={}){this.nodeBuilder.buildRootNode(e);let n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;let i=r.rule?this.allRules.get(r.rule):this.mainRule;if(!i)throw new Error(r.rule?`No rule found with name '${r.rule}'`:"No main rule available.");let a=i.call(this.wrapper,{});return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:a,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}startImplementation(e,r){return n=>{let i=!this.isRecording()&&e!==void 0;if(i){let s={$type:e};this.stack.push(s),e===aE&&(s.value="")}let a;try{a=r(n)}catch{a=void 0}return a===void 0&&i&&(a=this.construct()),a}}extractHiddenTokens(e){let r=this.lexerResult.hidden;if(!r.length)return[];let n=e.startOffset;for(let i=0;in)return r.splice(0,i);return r.splice(0,r.length)}consume(e,r,n){let i=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(i)){let a=this.extractHiddenTokens(i);this.nodeBuilder.addHiddenNodes(a);let s=this.nodeBuilder.buildLeafNode(i,n),{assignment:o,isCrossRef:l}=this.getAssignment(n),u=this.current;if(o){let h=Xo(n)?i.image:this.converter.convert(i.image,s);this.assign(o.operator,o.feature,h,s,l)}else if(hM(u)){let h=i.image;Xo(n)||(h=this.converter.convert(h,s).toString()),u.value+=h}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,i,a){let s;!this.isRecording()&&!n&&(s=this.nodeBuilder.buildCompositeNode(i));let o=this.wrapper.wrapSubrule(e,r,a);!this.isRecording()&&s&&s.length>0&&this.performSubruleAssignment(o,i,s)}performSubruleAssignment(e,r,n){let{assignment:i,isCrossRef:a}=this.getAssignment(r);if(i)this.assign(i.operator,i.feature,e,n,a);else if(!i){let s=this.current;if(hM(s))s.value+=e.toString();else if(typeof e=="object"&&e){let l=this.assignWithoutOverride(e,s);this.stack.pop(),this.stack.push(l)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(r.feature&&r.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(n.$cstNode);let a={$type:e};this.stack.push(a),this.assign(r.operator,r.feature,n,n.$cstNode,!1)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.current;return s6(e),this.nodeBuilder.construct(e),this.stack.pop(),hM(e)?this.converter.convert(e.value,e.$cstNode):(VN(this.astReflection,e),e)}getAssignment(e){if(!this.assignmentMap.has(e)){let r=b0(e,_l);this.assignmentMap.set(e,{assignment:r,isCrossRef:r?x0(r.terminal):!1})}return this.assignmentMap.get(e)}assign(e,r,n,i,a){let s=this.current,o;switch(a&&typeof n=="string"?o=this.linker.buildReference(s,r,i,n):o=n,e){case"=":{s[r]=o;break}case"?=":{s[r]=!0;break}case"+=":Array.isArray(s[r])||(s[r]=[]),s[r].push(o)}}assignWithoutOverride(e,r){for(let[i,a]of Object.entries(r)){let s=e[i];s===void 0?e[i]=a:Array.isArray(s)&&Array.isArray(a)&&(a.push(...s),e[i]=a)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},sE=class{buildMismatchTokenMessage(e){return Hu.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Hu.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Hu.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Hu.buildEarlyExitMessage(e)}},g1=class extends sE{buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},Ux=class extends Gx{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let r=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,r){let n=this.wrapper.DEFINE_RULE(Qde(e.name),this.startImplementation(r).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return r=>{let n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,i,a){this.before(i),this.wrapper.wrapSubrule(e,r,a),this.after(i)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},LVe={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new g1},fM=class extends Dx{constructor(e,r){let n=r&&"maxLookahead"in r;super(e,Object.assign(Object.assign(Object.assign({},LVe),{lookaheadStrategy:n?new Yu({maxLookahead:r.maxLookahead}):new Bx({logging:r.skipValidations?()=>{}:void 0})}),r))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r){return this.RULE(e,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}}});function Wx(t,e,r){return RVe({parser:e,tokens:r,ruleNames:new Map},t),e}function RVe(t,e){let r=ux(e,!1),n=Qr(e.rules).filter(Ia).filter(i=>r.has(i));for(let i of n){let a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(i,O0(a,i.definition))}}function O0(t,e,r=!1){let n;if(Xo(e))n=BVe(t,e);else if($u(e))n=IVe(t,e);else if(_l(e))n=O0(t,e.terminal);else if(x0(e))n=Jde(t,e);else if(Ll(e))n=NVe(t,e);else if(n6(e))n=MVe(t,e);else if(a6(e))n=OVe(t,e);else if(Af(e))n=PVe(t,e);else if(DN(e)){let i=t.consume++;n=()=>t.parser.consume(i,lo,e)}else throw new v0(e.$cstNode,`Unexpected element type: ${e.$type}`);return e0e(t,r?void 0:oE(e),n,e.cardinality)}function IVe(t,e){let r=dx(e);return()=>t.parser.action(r,e)}function NVe(t,e){let r=e.rule.ref;if(Ia(r)){let n=t.subrule++,i=r.fragment,a=e.arguments.length>0?DVe(r,e.arguments):()=>({});return s=>t.parser.subrule(n,t0e(t,r),i,e,a(s))}else if(so(r)){let n=t.consume++,i=dM(t,r.name);return()=>t.parser.consume(n,i,e)}else if(r)Bc(r);else throw new v0(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}function DVe(t,e){let r=e.map(n=>Xu(n.value));return n=>{let i={};for(let a=0;ae(n)||r(n)}else if(SN(t)){let e=Xu(t.left),r=Xu(t.right);return n=>e(n)&&r(n)}else if(AN(t)){let e=Xu(t.value);return r=>!e(r)}else if(_N(t)){let e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(EN(t)){let e=!!t.true;return()=>e}Bc(t)}function MVe(t,e){if(e.elements.length===1)return O0(t,e.elements[0]);{let r=[];for(let i of e.elements){let a={ALT:O0(t,i,!0)},s=oE(i);s&&(a.GATE=Xu(s)),r.push(a)}let n=t.or++;return i=>t.parser.alternatives(n,r.map(a=>{let s={ALT:()=>a.ALT(i)},o=a.GATE;return o&&(s.GATE=()=>o(i)),s}))}}function OVe(t,e){if(e.elements.length===1)return O0(t,e.elements[0]);let r=[];for(let o of e.elements){let l={ALT:O0(t,o,!0)},u=oE(o);u&&(l.GATE=Xu(u)),r.push(l)}let n=t.or++,i=(o,l)=>{let u=l.getRuleStack().join("-");return`uGroup_${o}_${u}`},a=o=>t.parser.alternatives(n,r.map((l,u)=>{let h={ALT:()=>!0},f=t.parser;h.ALT=()=>{if(l.ALT(o),!f.isRecording()){let p=i(n,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);let g=f.unorderedGroups.get(p);typeof g?.[u]>"u"&&(g[u]=!0)}};let d=l.GATE;return d?h.GATE=()=>d(o):h.GATE=()=>{let p=f.unorderedGroups.get(i(n,f));return!p?.[u]},h})),s=e0e(t,oE(e),a,"*");return o=>{s(o),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(n,t.parser))}}function PVe(t,e){let r=e.elements.map(n=>O0(t,n));return n=>r.forEach(i=>i(n))}function oE(t){if(Af(t))return t.guardCondition}function Jde(t,e,r=e.terminal){if(r)if(Ll(r)&&Ia(r.rule.ref)){let n=r.rule.ref,i=t.subrule++;return a=>t.parser.subrule(i,t0e(t,n),!1,e,a)}else if(Ll(r)&&so(r.rule.ref)){let n=t.consume++,i=dM(t,r.rule.ref.name);return()=>t.parser.consume(n,i,e)}else if(Xo(r)){let n=t.consume++,i=dM(t,r.value);return()=>t.parser.consume(n,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);let n=h6(e.type.ref),i=n?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+dx(e.type.ref));return Jde(t,e,i)}}function BVe(t,e){let r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}function e0e(t,e,r,n){let i=e&&Xu(e);if(!n)if(i){let a=t.or++;return s=>t.parser.alternatives(a,[{ALT:()=>r(s),GATE:()=>i(s)},{ALT:K6(),GATE:()=>!i(s)}])}else return r;if(n==="*"){let a=t.many++;return s=>t.parser.many(a,{DEF:()=>r(s),GATE:i?()=>i(s):void 0})}else if(n==="+"){let a=t.many++;if(i){let s=t.or++;return o=>t.parser.alternatives(s,[{ALT:()=>t.parser.atLeastOne(a,{DEF:()=>r(o)}),GATE:()=>i(o)},{ALT:K6(),GATE:()=>!i(o)}])}else return s=>t.parser.atLeastOne(a,{DEF:()=>r(s)})}else if(n==="?"){let a=t.optional++;return s=>t.parser.optional(a,{DEF:()=>r(s),GATE:i?()=>i(s):void 0})}else Bc(n)}function t0e(t,e){let r=FVe(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function FVe(t,e){if(Ia(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,i=e.$type;for(;!Ia(n);)(Af(n)||n6(n)||a6(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,t.ruleNames.set(e,i),i}}function dM(t,e){let r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}var lE=F(()=>{Rf();Fc();Qk();Fs();Rl()});function pM(t){let e=t.Grammar,r=t.parser.Lexer,n=new Ux(t);return Wx(e,n,r.definition),n.finalize(),n}var gM=F(()=>{qx();lE()});function mM(t){let e=r0e(t);return e.finalize(),e}function r0e(t){let e=t.Grammar,r=t.parser.Lexer,n=new Vx(t);return Wx(e,n,r.definition)}var vM=F(()=>{qx();lE()});var ju,cE=F(()=>{Rf();Fc();is();Rl();$m();Fs();ju=class{constructor(){this.diagnostics=[]}buildTokens(e,r){let n=Qr(ux(e,!1)),i=this.buildTerminalTokens(n),a=this.buildKeywordTokens(n,i,r);return i.forEach(s=>{let o=s.PATTERN;typeof o=="object"&&o&&"test"in o&&Fm(o)?a.unshift(s):a.push(s)}),a}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(so).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){let r=Gm(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,i={name:e.name,PATTERN:n};return typeof n=="function"&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=Fm(r)?qn.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")||e.flags.includes("s")?!0:!!(e.source.includes("?<=")||e.source.includes("?(r.lastIndex=i,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(Ia).flatMap(i=>$c(i).filter(Xo)).distinct(i=>i.value).toArray().sort((i,a)=>a.value.length-i.value.length).map(i=>this.buildKeywordToken(i,r,!!n?.caseInsensitive))}buildKeywordToken(e,r,n){let i=this.buildKeywordPattern(e,n),a={name:e.value,PATTERN:i,LONGER_ALT:this.findLongerAlt(e,r)};return typeof i=="function"&&(a.LINE_BREAKS=!0),a}buildKeywordPattern(e,r){return r?new RegExp(jN(e.value)):e.value}findLongerAlt(e,r){return r.reduce((n,i)=>{let a=i?.PATTERN;return a?.source&&KN("^"+a.source+"$",e.value)&&n.push(i),n},[])}}});var P0,Vc,yM=F(()=>{Fc();Rl();P0=class{convert(e,r){let n=r.grammarSource;if(x0(n)&&(n=JN(n)),Ll(n)){let i=n.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,r)}return e}runConverter(e,r,n){var i;switch(e.name.toUpperCase()){case"INT":return Vc.convertInt(r);case"STRING":return Vc.convertString(r);case"ID":return Vc.convertID(r)}switch((i=sD(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return Vc.convertNumber(r);case"boolean":return Vc.convertBoolean(r);case"bigint":return Vc.convertBigint(r);case"date":return Vc.convertDate(r);default:return r}}};(function(t){function e(u){let h="";for(let f=1;f{"use strict";Object.defineProperty(wM,"__esModule",{value:!0});var xM;function bM(){if(xM===void 0)throw new Error("No runtime abstraction layer installed");return xM}(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");xM=r}t.install=e})(bM||(bM={}));wM.default=bM});var a0e=ba(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.stringArray=Da.array=Da.func=Da.error=Da.number=Da.string=Da.boolean=void 0;function $Ve(t){return t===!0||t===!1}Da.boolean=$Ve;function n0e(t){return typeof t=="string"||t instanceof String}Da.string=n0e;function zVe(t){return typeof t=="number"||t instanceof Number}Da.number=zVe;function GVe(t){return t instanceof Error}Da.error=GVe;function VVe(t){return typeof t=="function"}Da.func=VVe;function i0e(t){return Array.isArray(t)}Da.array=i0e;function UVe(t){return i0e(t)&&t.every(e=>n0e(e))}Da.stringArray=UVe});var EM=ba(m1=>{"use strict";Object.defineProperty(m1,"__esModule",{value:!0});m1.Emitter=m1.Event=void 0;var qVe=TM(),s0e;(function(t){let e={dispose(){}};t.None=function(){return e}})(s0e||(m1.Event=s0e={}));var kM=class{add(e,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,r)})}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,a=this._callbacks.length;i{this._callbacks||(this._callbacks=new kM),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,r),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};m1.Emitter=uE;uE._noop=function(){}});var o0e=ba(v1=>{"use strict";Object.defineProperty(v1,"__esModule",{value:!0});v1.CancellationTokenSource=v1.CancellationToken=void 0;var WVe=TM(),HVe=a0e(),SM=EM(),hE;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:SM.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:SM.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||HVe.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}t.is=e})(hE||(v1.CancellationToken=hE={}));var YVe=Object.freeze(function(t,e){let r=(0,WVe.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),fE=class{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?YVe:(this._emitter||(this._emitter=new SM.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},CM=class{get token(){return this._token||(this._token=new fE),this._token}cancel(){this._token?this._token.cancel():this._token=hE.Cancelled}dispose(){this._token?this._token instanceof fE&&this._token.dispose():this._token=hE.None}};v1.CancellationTokenSource=CM});var fr={};var Ko=F(()=>{kr(fr,Fa(o0e(),1))});function AM(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}function pE(){return dE=performance.now(),new fr.CancellationTokenSource}function c0e(t){l0e=t}function qc(t){return t===Uc}async function hi(t){if(t===fr.CancellationToken.None)return;let e=performance.now();if(e-dE>=l0e&&(dE=e,await AM(),dE=performance.now()),t.isCancellationRequested)throw Uc}var dE,l0e,Uc,cs,Zo=F(()=>{Ko();dE=0,l0e=10;Uc=Symbol("OperationCancelled");cs=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}}});function _M(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);_M(n,e),_M(i,e);let a=0,s=0,o=0;for(;ar.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function XVe(t){let e=f0e(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var gE,y1,d0e=F(()=>{"use strict";gE=class t{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(let n of e)if(t.isIncremental(n)){let i=f0e(n.range),a=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,a)+n.text+this._content.substring(s,this._content.length);let o=Math.max(i.start.line,0),l=Math.max(i.end.line,0),u=this._lineOffsets,h=u0e(n.text,!1,a);if(l-o===h.length)for(let d=0,p=h.length;de?i=s:n=s+1}let a=n-1;return e=this.ensureBeforeEOL(e,r[a]),{line:a,character:e-r[a]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let i=e.line+1r&&h0e(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(i,a,s,o){return new gE(i,a,s,o)}t.create=e;function r(i,a,s){if(i instanceof gE)return i.update(a,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=r;function n(i,a){let s=i.getText(),o=_M(a.map(XVe),(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=0,u=[];for(let h of o){let f=i.offsetAt(h.range.start);if(fl&&u.push(s.substring(l,f)),h.newText.length&&u.push(h.newText),l=i.offsetAt(h.range.end)}return u.push(s.substr(l)),u.join("")}t.applyEdits=n})(y1||(y1={}))});var p0e,us,x1,LM=F(()=>{(()=>{"use strict";var t={470:i=>{function a(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function s(l,u){for(var h,f="",d=0,p=-1,g=0,m=0;m<=l.length;++m){if(m2){var v=f.lastIndexOf("/");if(v!==f.length-1){v===-1?(f="",d=0):d=(f=f.slice(0,v)).length-1-f.lastIndexOf("/"),p=m,g=0;continue}}else if(f.length===2||f.length===1){f="",d=0,p=m,g=0;continue}}u&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+l.slice(p+1,m):f=l.slice(p+1,m),d=m-p-1;p=m,g=0}else h===46&&g!==-1?++g:g=-1}return f}var o={resolve:function(){for(var l,u="",h=!1,f=arguments.length-1;f>=-1&&!h;f--){var d;f>=0?d=arguments[f]:(l===void 0&&(l=process.cwd()),d=l),a(d),d.length!==0&&(u=d+"/"+u,h=d.charCodeAt(0)===47)}return u=s(u,!h),h?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(l){if(a(l),l.length===0)return".";var u=l.charCodeAt(0)===47,h=l.charCodeAt(l.length-1)===47;return(l=s(l,!u)).length!==0||u||(l="."),l.length>0&&h&&(l+="/"),u?"/"+l:l},isAbsolute:function(l){return a(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,u=0;u0&&(l===void 0?l=h:l+="/"+h)}return l===void 0?".":o.normalize(l)},relative:function(l,u){if(a(l),a(u),l===u||(l=o.resolve(l))===(u=o.resolve(u)))return"";for(var h=1;hm){if(u.charCodeAt(p+y)===47)return u.slice(p+y+1);if(y===0)return u.slice(p+y)}else d>m&&(l.charCodeAt(h+y)===47?v=y:y===0&&(v=0));break}var b=l.charCodeAt(h+y);if(b!==u.charCodeAt(p+y))break;b===47&&(v=y)}var w="";for(y=h+v+1;y<=f;++y)y!==f&&l.charCodeAt(y)!==47||(w.length===0?w+="..":w+="/..");return w.length>0?w+u.slice(p+v):(p+=v,u.charCodeAt(p)===47&&++p,u.slice(p))},_makeLong:function(l){return l},dirname:function(l){if(a(l),l.length===0)return".";for(var u=l.charCodeAt(0),h=u===47,f=-1,d=!0,p=l.length-1;p>=1;--p)if((u=l.charCodeAt(p))===47){if(!d){f=p;break}}else d=!1;return f===-1?h?"/":".":h&&f===1?"//":l.slice(0,f)},basename:function(l,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');a(l);var h,f=0,d=-1,p=!0;if(u!==void 0&&u.length>0&&u.length<=l.length){if(u.length===l.length&&u===l)return"";var g=u.length-1,m=-1;for(h=l.length-1;h>=0;--h){var v=l.charCodeAt(h);if(v===47){if(!p){f=h+1;break}}else m===-1&&(p=!1,m=h+1),g>=0&&(v===u.charCodeAt(g)?--g==-1&&(d=h):(g=-1,d=m))}return f===d?d=m:d===-1&&(d=l.length),l.slice(f,d)}for(h=l.length-1;h>=0;--h)if(l.charCodeAt(h)===47){if(!p){f=h+1;break}}else d===-1&&(p=!1,d=h+1);return d===-1?"":l.slice(f,d)},extname:function(l){a(l);for(var u=-1,h=0,f=-1,d=!0,p=0,g=l.length-1;g>=0;--g){var m=l.charCodeAt(g);if(m!==47)f===-1&&(d=!1,f=g+1),m===46?u===-1?u=g:p!==1&&(p=1):u!==-1&&(p=-1);else if(!d){h=g+1;break}}return u===-1||f===-1||p===0||p===1&&u===f-1&&u===h+1?"":l.slice(u,f)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return function(u,h){var f=h.dir||h.root,d=h.base||(h.name||"")+(h.ext||"");return f?f===h.root?f+d:f+"/"+d:d}(0,l)},parse:function(l){a(l);var u={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return u;var h,f=l.charCodeAt(0),d=f===47;d?(u.root="/",h=1):h=0;for(var p=-1,g=0,m=-1,v=!0,y=l.length-1,b=0;y>=h;--y)if((f=l.charCodeAt(y))!==47)m===-1&&(v=!1,m=y+1),f===46?p===-1?p=y:b!==1&&(b=1):p!==-1&&(b=-1);else if(!v){g=y+1;break}return p===-1||m===-1||b===0||b===1&&p===m-1&&p===g+1?m!==-1&&(u.base=u.name=g===0&&d?l.slice(1,m):l.slice(g,m)):(g===0&&d?(u.name=l.slice(1,p),u.base=l.slice(1,m)):(u.name=l.slice(g,p),u.base=l.slice(g,m)),u.ext=l.slice(p,m)),g>0?u.dir=l.slice(0,g-1):d&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function r(i){var a=e[i];if(a!==void 0)return a.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,r),s.exports}r.d=(i,a)=>{for(var s in a)r.o(a,s)&&!r.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:a[s]})},r.o=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),r.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var n={};(()=>{let i;r.r(n),r.d(n,{URI:()=>d,Utils:()=>M}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function l(R,k){if(!R.scheme&&k)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${R.authority}", path: "${R.path}", query: "${R.query}", fragment: "${R.fragment}"}`);if(R.scheme&&!a.test(R.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(R.path){if(R.authority){if(!s.test(R.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(o.test(R.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let u="",h="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(k){return k instanceof d||!!k&&typeof k.authority=="string"&&typeof k.fragment=="string"&&typeof k.path=="string"&&typeof k.query=="string"&&typeof k.scheme=="string"&&typeof k.fsPath=="string"&&typeof k.with=="function"&&typeof k.toString=="function"}scheme;authority;path;query;fragment;constructor(k,L,_,D,N,O=!1){typeof k=="object"?(this.scheme=k.scheme||u,this.authority=k.authority||u,this.path=k.path||u,this.query=k.query||u,this.fragment=k.fragment||u):(this.scheme=function(P,B){return P||B?P:"file"}(k,O),this.authority=L||u,this.path=function(P,B){switch(P){case"https":case"http":case"file":B?B[0]!==h&&(B=h+B):B=h}return B}(this.scheme,_||u),this.query=D||u,this.fragment=N||u,l(this,O))}get fsPath(){return b(this,!1)}with(k){if(!k)return this;let{scheme:L,authority:_,path:D,query:N,fragment:O}=k;return L===void 0?L=this.scheme:L===null&&(L=u),_===void 0?_=this.authority:_===null&&(_=u),D===void 0?D=this.path:D===null&&(D=u),N===void 0?N=this.query:N===null&&(N=u),O===void 0?O=this.fragment:O===null&&(O=u),L===this.scheme&&_===this.authority&&D===this.path&&N===this.query&&O===this.fragment?this:new g(L,_,D,N,O)}static parse(k,L=!1){let _=f.exec(k);return _?new g(_[2]||u,E(_[4]||u),E(_[5]||u),E(_[7]||u),E(_[9]||u),L):new g(u,u,u,u,u)}static file(k){let L=u;if(i&&(k=k.replace(/\\/g,h)),k[0]===h&&k[1]===h){let _=k.indexOf(h,2);_===-1?(L=k.substring(2),k=h):(L=k.substring(2,_),k=k.substring(_)||h)}return new g("file",L,k,u,u)}static from(k){let L=new g(k.scheme,k.authority,k.path,k.query,k.fragment);return l(L,!0),L}toString(k=!1){return w(this,k)}toJSON(){return this}static revive(k){if(k){if(k instanceof d)return k;{let L=new g(k);return L._formatted=k.external,L._fsPath=k._sep===p?k.fsPath:null,L}}return k}}let p=i?1:void 0;class g extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(k=!1){return k?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){let k={$mid:1};return this._fsPath&&(k.fsPath=this._fsPath,k._sep=p),this._formatted&&(k.external=this._formatted),this.path&&(k.path=this.path),this.scheme&&(k.scheme=this.scheme),this.authority&&(k.authority=this.authority),this.query&&(k.query=this.query),this.fragment&&(k.fragment=this.fragment),k}}let m={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 v(R,k,L){let _,D=-1;for(let N=0;N=97&&O<=122||O>=65&&O<=90||O>=48&&O<=57||O===45||O===46||O===95||O===126||k&&O===47||L&&O===91||L&&O===93||L&&O===58)D!==-1&&(_+=encodeURIComponent(R.substring(D,N)),D=-1),_!==void 0&&(_+=R.charAt(N));else{_===void 0&&(_=R.substr(0,N));let P=m[O];P!==void 0?(D!==-1&&(_+=encodeURIComponent(R.substring(D,N)),D=-1),_+=P):D===-1&&(D=N)}}return D!==-1&&(_+=encodeURIComponent(R.substring(D))),_!==void 0?_:R}function y(R){let k;for(let L=0;L1&&R.scheme==="file"?`//${R.authority}${R.path}`:R.path.charCodeAt(0)===47&&(R.path.charCodeAt(1)>=65&&R.path.charCodeAt(1)<=90||R.path.charCodeAt(1)>=97&&R.path.charCodeAt(1)<=122)&&R.path.charCodeAt(2)===58?k?R.path.substr(1):R.path[1].toLowerCase()+R.path.substr(2):R.path,i&&(L=L.replace(/\//g,"\\")),L}function w(R,k){let L=k?y:v,_="",{scheme:D,authority:N,path:O,query:P,fragment:B}=R;if(D&&(_+=D,_+=":"),(N||D==="file")&&(_+=h,_+=h),N){let G=N.indexOf("@");if(G!==-1){let $=N.substr(0,G);N=N.substr(G+1),G=$.lastIndexOf(":"),G===-1?_+=L($,!1,!1):(_+=L($.substr(0,G),!1,!1),_+=":",_+=L($.substr(G+1),!1,!0)),_+="@"}N=N.toLowerCase(),G=N.lastIndexOf(":"),G===-1?_+=L(N,!1,!0):(_+=L(N.substr(0,G),!1,!0),_+=N.substr(G))}if(O){if(O.length>=3&&O.charCodeAt(0)===47&&O.charCodeAt(2)===58){let G=O.charCodeAt(1);G>=65&&G<=90&&(O=`/${String.fromCharCode(G+32)}:${O.substr(3)}`)}else if(O.length>=2&&O.charCodeAt(1)===58){let G=O.charCodeAt(0);G>=65&&G<=90&&(O=`${String.fromCharCode(G+32)}:${O.substr(2)}`)}_+=L(O,!0,!1)}return P&&(_+="?",_+=L(P,!1,!1)),B&&(_+="#",_+=k?B:v(B,!1,!1)),_}function S(R){try{return decodeURIComponent(R)}catch{return R.length>3?R.substr(0,3)+S(R.substr(3)):R}}let T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function E(R){return R.match(T)?R.replace(T,k=>S(k)):R}var A=r(470);let C=A.posix||A,I="/";var M;(function(R){R.joinPath=function(k,...L){return k.with({path:C.join(k.path,...L)})},R.resolvePath=function(k,...L){let _=k.path,D=!1;_[0]!==I&&(_=I+_,D=!0);let N=C.resolve(_,...L);return D&&N[0]===I&&!k.authority&&(N=N.substring(1)),k.with({path:N})},R.dirname=function(k){if(k.path.length===0||k.path===I)return k;let L=C.dirname(k.path);return L.length===1&&L.charCodeAt(0)===46&&(L=""),k.with({path:L})},R.basename=function(k){return C.basename(k.path)},R.extname=function(k){return C.extname(k.path)}})(M||(M={}))})(),p0e=n})();({URI:us,Utils:x1}=p0e)});var hs,Wc=F(()=>{LM();(function(t){t.basename=x1.basename,t.dirname=x1.dirname,t.extname=x1.extname,t.joinPath=x1.joinPath,t.resolvePath=x1.resolvePath;function e(i,a){return i?.toString()===a?.toString()}t.equals=e;function r(i,a){let s=typeof i=="string"?i:i.path,o=typeof a=="string"?a:a.path,l=s.split("/").filter(p=>p.length>0),u=o.split("/").filter(p=>p.length>0),h=0;for(;h{d0e();b1();Ko();Fs();Wc();(function(t){t[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"})(En||(En={}));Hx=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=fr.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??us.parse(e.uri),fr.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromString(e,r,n){return fr.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r,n){if(typeof r=="string"){let i=this.parse(e,r,n);return this.createLangiumDocument(i,e,void 0,r)}else if("$model"in r){let i={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(i,e)}else{let i=this.parse(e,r.getText(),n);return this.createLangiumDocument(i,e,r)}}async createAsync(e,r,n){if(typeof r=="string"){let i=await this.parseAsync(e,r,n);return this.createLangiumDocument(i,e,void 0,r)}else{let i=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(i,e,r)}}createLangiumDocument(e,r,n,i){let a;if(n)a={parseResult:e,uri:r,state:En.Parsed,references:[],textDocument:n};else{let s=this.createTextDocumentGetter(r,i);a={parseResult:e,uri:r,state:En.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=a,a}async update(e,r){var n,i;let a=(n=e.parseResult.value.$cstNode)===null||n===void 0?void 0:n.root.fullText,s=(i=this.textDocuments)===null||i===void 0?void 0:i.get(e.uri.toString()),o=s?s.getText():await this.fileSystemProvider.readFile(e.uri);if(s)Object.defineProperty(e,"textDocument",{value:s});else{let l=this.createTextDocumentGetter(e.uri,o);Object.defineProperty(e,"textDocument",{get:l})}return a!==o&&(e.parseResult=await this.parseAsync(e.uri,o,r),e.parseResult.value.$document=e),e.state=En.Parsed,e}parse(e,r,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r,n)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){let n=this.serviceRegistry,i;return()=>i??(i=y1.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},Yx=class{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.serviceRegistry=e.ServiceRegistry}get all(){return Qr(this.documentMap.values())}addDocument(e){let r=e.uri.toString();if(this.documentMap.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentMap.set(r,e)}getDocument(e){let r=e.toString();return this.documentMap.get(r)}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(i=>(this.addDocument(i),i));{let i=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(this.serviceRegistry.getServices(e).references.Linker.unlink(n),n.state=En.Changed,n.precomputedScopes=void 0,n.diagnostics=void 0),n}deleteDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=En.Changed,this.documentMap.delete(r)),n}}});var RM,Xx,IM=F(()=>{Ko();Cl();is();Zo();b1();RM=Symbol("ref_resolving"),Xx=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,r=fr.CancellationToken.None){for(let n of jo(e.parseResult.value))await hi(r),Pm(n).forEach(i=>this.doLink(i,e))}doLink(e,r){var n;let i=e.reference;if(i._ref===void 0){i._ref=RM;try{let a=this.getCandidate(e);if(p0(a))i._ref=a;else if(i._nodeDescription=a,this.langiumDocuments().hasDocument(a.documentUri)){let s=this.loadAstNode(a);i._ref=s??this.createLinkingError(e,a)}else i._ref=void 0}catch(a){console.error(`An error occurred while resolving reference to '${i.$refText}':`,a);let s=(n=a.message)!==null&&n!==void 0?n:String(a);i._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${i.$refText}': ${s}`})}r.references.push(i)}}unlink(e){for(let r of e.references)delete r._ref,delete r._nodeDescription;e.references=[]}getCandidate(e){let n=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return n??this.createLinkingError(e)}buildReference(e,r,n,i){let a=this,s={$refNode:n,$refText:i,get ref(){var o;if(ti(this._ref))return this._ref;if(vN(this._nodeDescription)){let l=a.loadAstNode(this._nodeDescription);this._ref=l??a.createLinkingError({reference:s,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=RM;let l=ix(e).$document,u=a.getLinkedNode({reference:s,container:e,property:r});if(u.error&&l&&l.state{Rl();jx=class{getName(e){if(g0e(e))return e.name}getNameNode(e){return hx(e.$cstNode,"name")}}});var Kx,DM=F(()=>{Rl();Cl();is();Al();Fs();Wc();Kx=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){let r=aD(e),n=e.astNode;if(r&&n){let i=n[r.feature];if(da(i))return i.ref;if(Array.isArray(i)){for(let a of i)if(da(a)&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return a.ref}}if(n){let i=this.nameProvider.getNameNode(n);if(i&&(i===e||xN(e,i)))return n}}}findDeclarationNode(e){let r=this.findDeclaration(e);if(r?.$cstNode){let n=this.nameProvider.getNameNode(r);return n??r.$cstNode}}findReferences(e,r){let n=[];if(r.includeDeclaration){let a=this.getReferenceToSelf(e);a&&n.push(a)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(i=i.filter(a=>hs.equals(a.sourceUri,r.documentUri))),n.push(...i),Qr(n)}getReferenceToSelf(e){let r=this.nameProvider.getNameNode(e);if(r){let n=Na(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:i,targetUri:n.uri,targetPath:i,segment:m0(r),local:!0}}}}});var Nl,B0,w1=F(()=>{Fs();Nl=class{constructor(e){if(this.map=new Map,e)for(let[r,n]of e)this.add(r,n)}get size(){return jg.sum(Qr(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let i=n.indexOf(r);if(i>=0)return n.length===1?this.map.delete(e):n.splice(i,1),!0}return!1}}get(e){var r;return(r=this.map.get(e))!==null&&r!==void 0?r:[]}has(e,r){if(r===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(i=>e(i,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Qr(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return Qr(this.map.keys())}values(){return Qr(this.map.values()).flat()}entriesGroupedByKey(){return Qr(this.map.entries())}},B0=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}}});var Zx,MM=F(()=>{Ko();is();w1();Zo();Zx=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,r=fr.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,r)}async computeExportsForNode(e,r,n=ax,i=fr.CancellationToken.None){let a=[];this.exportNode(e,a,r);for(let s of n(e))await hi(i),this.exportNode(s,a,r);return a}exportNode(e,r,n){let i=this.nameProvider.getName(e);i&&r.push(this.descriptions.createDescription(e,i,n))}async computeLocalScopes(e,r=fr.CancellationToken.None){let n=e.parseResult.value,i=new Nl;for(let a of $c(n))await hi(r),this.processNode(a,e,i);return i}processNode(e,r,n){let i=e.$container;if(i){let a=this.nameProvider.getName(e);a&&n.add(i,this.descriptions.createDescription(e,a,r))}}}});var T1,Qx,jVe,OM=F(()=>{Fs();T1=class{constructor(e,r,n){var i;this.elements=e,this.outerScope=r,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===e.toLowerCase()):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}},Qx=class{constructor(e,r,n){var i;this.elements=new Map,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1;for(let a of e){let s=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.set(s,a)}this.outerScope=r}getElement(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=Qr(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},jVe={getElement(){},getAllElements(){return X2}}});var k1,Jx,F0,mE,E1,vE=F(()=>{k1=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},Jx=class extends k1{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){let n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},F0=class extends k1{constructor(e){super(),this.cache=new Map,this.converter=e??(r=>r)}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();let i=this.cacheForContext(e);if(i.has(r))return i.get(r);if(n){let a=n();return i.set(r,a),a}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){let r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){let r=this.converter(e),n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},mE=class extends F0{constructor(e,r){super(n=>n.toString()),r?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(r,n=>{this.clear(n.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{for(let a of i)this.clear(a)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{let a=n.concat(i);for(let s of a)this.clear(s)}))}},E1=class extends Jx{constructor(e,r){super(),r?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{i.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}});var eb,PM=F(()=>{OM();is();Fs();vE();eb=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new E1(e.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=Na(e.container).precomputedScopes;if(i){let s=e.container;do{let o=i.get(s);o.length>0&&r.push(Qr(o).filter(l=>this.reflection.isSubtype(l.type,n))),s=s.$container}while(s)}let a=this.getGlobalScope(n,e);for(let s=r.length-1;s>=0;s--)a=this.createScope(r[s],a);return a}createScope(e,r,n){return new T1(Qr(e),r,n)}createScopeForNodes(e,r,n){let i=Qr(e).map(a=>{let s=this.nameProvider.getName(a);if(s)return this.descriptions.createDescription(a,s)}).nonNullable();return new T1(i,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new Qx(this.indexManager.allElements(e)))}}});function BM(t){return typeof t.$comment=="string"}function m0e(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}var tb,yE=F(()=>{LM();Cl();is();Rl();tb=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r){let n=r??{},i=r?.replacer,a=(o,l)=>this.replacer(o,l,n),s=i?(o,l)=>i(o,l,a):a;try{return this.currentDocument=Na(e),JSON.stringify(e,s,r?.space)}finally{this.currentDocument=void 0}}deserialize(e,r){let n=r??{},i=JSON.parse(e);return this.linkNode(i,i,n),i}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){var l,u,h,f;if(!this.ignoreProperties.has(e))if(da(r)){let d=r.ref,p=n?r.$refText:void 0;if(d){let g=Na(d),m="";this.currentDocument&&this.currentDocument!==g&&(o?m=o(g.uri,r):m=g.uri.toString());let v=this.astNodeLocator.getAstNodePath(d);return{$ref:`${m}#${v}`,$refText:p}}else return{$error:(u=(l=r.error)===null||l===void 0?void 0:l.message)!==null&&u!==void 0?u:"Could not resolve reference",$refText:p}}else if(ti(r)){let d;if(a&&(d=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),(!e||r.$document)&&d?.$textRegion&&(d.$textRegion.documentURI=(h=this.currentDocument)===null||h===void 0?void 0:h.uri.toString())),i&&!e&&(d??(d=Object.assign({},r)),d.$sourceText=(f=r.$cstNode)===null||f===void 0?void 0:f.text),s){d??(d=Object.assign({},r));let p=this.commentProvider.getComment(r);p&&(d.$comment=p.replace(/\r/g,""))}return d??r}else return r}addAstNodeRegionWithAssignmentsTo(e){let r=n=>({offset:n.offset,end:n.end,length:n.length,range:n.range});if(e.$cstNode){let n=e.$textRegion=r(e.$cstNode),i=n.assignments={};return Object.keys(e).filter(a=>!a.startsWith("$")).forEach(a=>{let s=tD(e.$cstNode,a).map(r);s.length!==0&&(i[a]=s)}),e}}linkNode(e,r,n,i,a,s){for(let[l,u]of Object.entries(e))if(Array.isArray(u))for(let h=0;h{Wc();rb=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){let r=e.LanguageMetaData;for(let n of r.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(n,e);this.languageIdMap.set(r.languageId,e),this.languageIdMap.size===1?this.singleton=e:this.singleton=void 0}getServices(e){var r,n;if(this.singleton!==void 0)return this.singleton;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let i=(n=(r=this.textDocuments)===null||r===void 0?void 0:r.get(e))===null||n===void 0?void 0:n.languageId;if(i!==void 0){let o=this.languageIdMap.get(i);if(o)return o}let a=hs.extname(e),s=this.fileExtensionMap.get(a);if(!s)throw i?new Error(`The service registry contains no services for the extension '${a}' for language '${i}'.`):new Error(`The service registry contains no services for the extension '${a}'.`);return s}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function $0(t){return{code:t}}var S1,nb,ib=F(()=>{co();w1();Zo();Fs();(function(t){t.all=["fast","slow","built-in"]})(S1||(S1={}));nb=class{constructor(e){this.entries=new Nl,this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(let[i,a]of Object.entries(e)){let s=a;if(Array.isArray(s))for(let o of s){let l={check:this.wrapValidationException(o,r),category:n};this.addEntry(i,l)}else if(typeof s=="function"){let o={check:this.wrapValidationException(s,r),category:n};this.addEntry(i,o)}else Bc(s)}}wrapValidationException(e,r){return async(n,i,a)=>{await this.handleException(()=>e.call(r,n,i,a),"An error occurred during validation",i,n)}}async handleException(e,r,n,i){try{await e()}catch(a){if(qc(a))throw a;console.error(`${r}:`,a),a instanceof Error&&a.stack&&console.error(a.stack);let s=a instanceof Error?a.message:String(a);n("error",`${r}: ${s}`,{node:i})}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=Qr(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(i=>r.includes(i.category))),n.map(i=>i.check)}registerBeforeDocument(e,r=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",r))}registerAfterDocument(e,r=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",r))}wrapPreparationException(e,r,n){return async(i,a,s,o)=>{await this.handleException(()=>e.call(n,i,a,s,o),r,a,i)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function v0e(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=hx(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=nD(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function xE(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 y0e(t){switch(t){case"error":return $0(Qo.LexingError);case"warning":return $0(Qo.LexingWarning);case"info":return $0(Qo.LexingInfo);case"hint":return $0(Qo.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var ab,Qo,$M=F(()=>{Ko();Rl();is();Al();Zo();ib();ab=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,r={},n=fr.CancellationToken.None){let i=e.parseResult,a=[];if(await hi(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(i,a,r),r.stopAfterLexingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Qo.LexingError})||(this.processParsingErrors(i,a,r),r.stopAfterParsingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Qo.ParsingError}))||(this.processLinkingErrors(e,a,r),r.stopAfterLinkingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Qo.LinkingError}))))return a;try{a.push(...await this.validateAst(i.value,r,n))}catch(s){if(qc(s))throw s;console.error("An error occurred during validation:",s)}return await hi(n),a}processLexingErrors(e,r,n){var i,a,s;let o=[...e.lexerErrors,...(a=(i=e.lexerReport)===null||i===void 0?void 0:i.diagnostics)!==null&&a!==void 0?a:[]];for(let l of o){let u=(s=l.severity)!==null&&s!==void 0?s:"error",h={severity:xE(u),range:{start:{line:l.line-1,character:l.column-1},end:{line:l.line-1,character:l.column+l.length-1}},message:l.message,data:y0e(u),source:this.getSource()};r.push(h)}}processParsingErrors(e,r,n){for(let i of e.parserErrors){let a;if(isNaN(i.token.startOffset)){if("previousToken"in i){let s=i.previousToken;if(isNaN(s.startOffset)){let o={line:0,character:0};a={start:o,end:o}}else{let o={line:s.endLine-1,character:s.endColumn};a={start:o,end:o}}}}else a=Kg(i.token);if(a){let s={severity:xE("error"),range:a,message:i.message,data:$0(Qo.ParsingError),source:this.getSource()};r.push(s)}}}processLinkingErrors(e,r,n){for(let i of e.references){let a=i.error;if(a){let s={node:a.container,property:a.property,index:a.index,data:{code:Qo.LinkingError,containerType:a.container.$type,property:a.property,refText:a.reference.$refText}};r.push(this.toDiagnostic("error",a.message,s))}}}async validateAst(e,r,n=fr.CancellationToken.None){let i=[],a=(s,o,l)=>{i.push(this.toDiagnostic(s,o,l))};return await this.validateAstBefore(e,r,a,n),await this.validateAstNodes(e,r,a,n),await this.validateAstAfter(e,r,a,n),i}async validateAstBefore(e,r,n,i=fr.CancellationToken.None){var a;let s=this.validationRegistry.checksBefore;for(let o of s)await hi(i),await o(e,n,(a=r.categories)!==null&&a!==void 0?a:[],i)}async validateAstNodes(e,r,n,i=fr.CancellationToken.None){await Promise.all(jo(e).map(async a=>{await hi(i);let s=this.validationRegistry.getChecks(a.$type,r.categories);for(let o of s)await o(a,n,i)}))}async validateAstAfter(e,r,n,i=fr.CancellationToken.None){var a;let s=this.validationRegistry.checksAfter;for(let o of s)await hi(i),await o(e,n,(a=r.categories)!==null&&a!==void 0?a:[],i)}toDiagnostic(e,r,n){return{message:r,range:v0e(n),severity:xE(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Qo||(Qo={}))});var sb,ob,zM=F(()=>{Ko();Cl();is();Al();Zo();Wc();sb=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n){let i=n??Na(e);r??(r=this.nameProvider.getName(e));let a=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${a} has no name.`);let s,o=()=>{var l;return s??(s=m0((l=this.nameProvider.getNameNode(e))!==null&&l!==void 0?l:e.$cstNode))};return{node:e,name:r,get nameSegment(){return o()},selectionSegment:m0(e.$cstNode),type:e.$type,documentUri:i.uri,path:a}}},ob=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=fr.CancellationToken.None){let n=[],i=e.parseResult.value;for(let a of jo(i))await hi(r),Pm(a).filter(s=>!p0(s)).forEach(s=>{let o=this.createDescription(s);o&&n.push(o)});return n}createDescription(e){let r=e.reference.$nodeDescription,n=e.reference.$refNode;if(!r||!n)return;let i=Na(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:m0(n),local:hs.equals(r.documentUri,i)}}}});var lb,GM=F(()=>{lb=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((i,a)=>{if(!i||a.length===0)return i;let s=a.indexOf(this.indexSeparator);if(s>0){let o=a.substring(0,s),l=parseInt(a.substring(s+1)),u=i[o];return u?.[l]}return i[a]},e)}}});var Hn={};var bE=F(()=>{kr(Hn,Fa(EM(),1))});var cb,VM=F(()=>{bE();Zo();cb=class{constructor(e){this._ready=new cs,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new Hn.Emitter,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var r,n;this.workspaceConfig=(n=(r=e.capabilities.workspace)===null||r===void 0?void 0:r.configuration)!==null&&n!==void 0?n:!1}async initialized(e){if(this.workspaceConfig){if(e.register){let r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let r=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((i,a)=>{this.updateSectionConfiguration(i.section,n[a])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(r=>{let n=e.settings[r];this.updateSectionConfiguration(r,n),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:n})})}updateSectionConfiguration(e,r){this.settings[e]=r}async getConfiguration(e,r){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}});var Df,UM=F(()=>{(function(t){function e(r){return{dispose:async()=>await r()}}t.create=e})(Df||(Df={}))});var ub,qM=F(()=>{Ko();UM();w1();Zo();Fs();ib();b1();ub=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Nl,this.documentPhaseListeners=new Nl,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=En.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=fr.CancellationToken.None){var i,a;for(let s of e){let o=s.uri.toString();if(s.state===En.Validated){if(typeof r.validation=="boolean"&&r.validation)s.state=En.IndexedReferences,s.diagnostics=void 0,this.buildState.delete(o);else if(typeof r.validation=="object"){let l=this.buildState.get(o),u=(i=l?.result)===null||i===void 0?void 0:i.validationChecks;if(u){let f=((a=r.validation.categories)!==null&&a!==void 0?a:S1.all).filter(d=>!u.includes(d));f.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:f})},result:l.result}),s.state=En.IndexedReferences)}}}else this.buildState.delete(o)}this.currentState=En.Changed,await this.emitUpdate(e.map(s=>s.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=fr.CancellationToken.None){this.currentState=En.Changed;for(let s of r)this.langiumDocuments.deleteDocument(s),this.buildState.delete(s.toString()),this.indexManager.remove(s);for(let s of e){if(!this.langiumDocuments.invalidateDocument(s)){let l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},s);l.state=En.Changed,this.langiumDocuments.addDocument(l)}this.buildState.delete(s.toString())}let i=Qr(e).concat(r).map(s=>s.toString()).toSet();this.langiumDocuments.all.filter(s=>!i.has(s.uri.toString())&&this.shouldRelink(s,i)).forEach(s=>{this.serviceRegistry.getServices(s.uri).references.Linker.unlink(s),s.state=Math.min(s.state,En.ComputedScopes),s.diagnostics=void 0}),await this.emitUpdate(e,r),await hi(n);let a=this.sortDocuments(this.langiumDocuments.all.filter(s=>{var o;return s.staten(e,r)))}sortDocuments(e){let r=0,n=e.length-1;for(;r=0&&!this.hasTextDocument(e[n]);)n--;rn.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),Df.create(()=>{let r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,En.Parsed,n,a=>this.langiumDocumentFactory.update(a,n)),await this.runCancelable(e,En.IndexedContent,n,a=>this.indexManager.updateContent(a,n)),await this.runCancelable(e,En.ComputedScopes,n,async a=>{let s=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.precomputedScopes=await s.computeLocalScopes(a,n)}),await this.runCancelable(e,En.Linked,n,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,n)),await this.runCancelable(e,En.IndexedReferences,n,a=>this.indexManager.updateReferences(a,n));let i=e.filter(a=>this.shouldValidate(a));await this.runCancelable(i,En.Validated,n,a=>this.validate(a,n));for(let a of e){let s=this.buildState.get(a.uri.toString());s&&(s.completed=!0)}}prepareBuild(e,r){for(let n of e){let i=n.uri.toString(),a=this.buildState.get(i);(!a||a.completed)&&this.buildState.set(i,{completed:!1,options:r,result:a?.result})}}async runCancelable(e,r,n,i){let a=e.filter(o=>o.stateo.state===r);await this.notifyBuildPhase(s,r,n),this.currentState=r}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),Df.create(()=>{this.buildPhaseListeners.delete(e,r)})}onDocumentPhase(e,r){return this.documentPhaseListeners.add(e,r),Df.create(()=>{this.documentPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let i;if(r&&"path"in r?i=r:n=r,n??(n=fr.CancellationToken.None),i){let a=this.langiumDocuments.getDocument(i);if(a&&a.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(Uc):new Promise((a,s)=>{let o=this.onBuildPhase(e,()=>{if(o.dispose(),l.dispose(),i){let u=this.langiumDocuments.getDocument(i);a(u?.uri)}else a(void 0)}),l=n.onCancellationRequested(()=>{o.dispose(),l.dispose(),s(Uc)})})}async notifyDocumentPhase(e,r,n){let a=this.documentPhaseListeners.get(r).slice();for(let s of a)try{await s(e,n)}catch(o){if(!qc(o))throw o}}async notifyBuildPhase(e,r,n){if(e.length===0)return;let a=this.buildPhaseListeners.get(r).slice();for(let s of a)await hi(n),await s(e,n)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,r){var n,i;let a=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,s=this.getBuildOptions(e).validation,o=typeof s=="object"?s:void 0,l=await a.validateDocument(e,o,r);e.diagnostics?e.diagnostics.push(...l):e.diagnostics=l;let u=this.buildState.get(e.uri.toString());if(u){(n=u.result)!==null&&n!==void 0||(u.result={});let h=(i=o?.categories)!==null&&i!==void 0?i:S1.all;u.result.validationChecks?u.result.validationChecks.push(...h):u.result.validationChecks=[...h]}}getBuildOptions(e){var r,n;return(n=(r=this.buildState.get(e.uri.toString()))===null||r===void 0?void 0:r.options)!==null&&n!==void 0?n:{}}}});var hb,WM=F(()=>{is();vE();Ko();Fs();Wc();hb=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new F0,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){let n=Na(e).uri,i=[];return this.referenceIndex.forEach(a=>{a.forEach(s=>{hs.equals(s.targetUri,n)&&s.targetPath===r&&i.push(s)})}),Qr(i)}allElements(e,r){let n=Qr(this.symbolIndex.keys());return r&&(n=n.filter(i=>!r||r.has(i))),n.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,r){var n;return r?this.symbolByTypeIndex.get(e,r,()=>{var a;return((a=this.symbolIndex.get(e))!==null&&a!==void 0?a:[]).filter(o=>this.astReflection.isSubtype(o.type,r))}):(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[]}remove(e){let r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r),this.referenceIndex.delete(r)}async updateContent(e,r=fr.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,r),a=e.uri.toString();this.symbolIndex.set(a,i),this.symbolByTypeIndex.clear(a)}async updateReferences(e,r=fr.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,r){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(i=>!i.local&&r.has(i.targetUri.toString())):!1}}});var fb,HM=F(()=>{Ko();Zo();Wc();fb=class{constructor(e){this.initialBuildOptions={},this._ready=new cs,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){var r;this.folders=(r=e.workspaceFolders)!==null&&r!==void 0?r:void 0}initialized(e){return this.mutex.write(r=>{var n;return this.initializeWorkspace((n=this.folders)!==null&&n!==void 0?n:[],r)})}async initializeWorkspace(e,r=fr.CancellationToken.None){let n=await this.performStartup(e);await hi(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){let r=this.serviceRegistry.all.flatMap(a=>a.LanguageMetaData.fileExtensions),n=[],i=a=>{n.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)};return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(a=>[a,this.getRootFolder(a)]).map(async a=>this.traverseFolder(...a,r,i))),this._ready.resolve(),n}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return us.parse(e.uri)}async traverseFolder(e,r,n,i){let a=await this.fileSystemProvider.readDirectory(r);await Promise.all(a.map(async s=>{if(this.includeEntry(e,s,n)){if(s.isDirectory)await this.traverseFolder(e,s.uri,n,i);else if(s.isFile){let o=await this.langiumDocuments.getOrCreateDocument(s.uri);i(o)}}}))}includeEntry(e,r,n){let i=hs.basename(r.uri);if(i.startsWith("."))return!1;if(r.isDirectory)return i!=="node_modules"&&i!=="out";if(r.isFile){let a=hs.extname(r.uri);return n.includes(a)}return!1}}});function TE(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function XM(t){return t&&"modes"in t&&"defaultMode"in t}function YM(t){return!TE(t)&&!XM(t)}var db,wE,z0,kE=F(()=>{Rf();db=class{buildUnexpectedCharactersMessage(e,r,n,i,a){return Km.buildUnexpectedCharactersMessage(e,r,n,i,a)}buildUnableToPopLexerModeMessage(e){return Km.buildUnableToPopLexerModeMessage(e)}},wE={mode:"full"},z0=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let r=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let n=YM(r)?Object.values(r):r,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new qn(n,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,r=wE){var n,i,a;let s=this.chevrotainLexer.tokenize(e);return{tokens:s.tokens,errors:s.errors,hidden:(n=s.groups.hidden)!==null&&n!==void 0?n:[],report:(a=(i=this.tokenBuilder).flushLexingReport)===null||a===void 0?void 0:a.call(i,e)}}toTokenTypeDictionary(e){if(YM(e))return e;let r=XM(e)?Object.values(e.modes).flat():e,n={};return r.forEach(i=>n[i.name]=i),n}}});function ZM(t,e,r){let n,i;typeof t=="string"?(i=e,n=r):(i=t.range.start,n=e),i||(i=Kr.create(0,0));let a=w0e(t),s=JM(n),o=ZVe({lines:a,position:i,options:s});return rUe({index:0,tokens:o,position:i})}function QM(t,e){let r=JM(e),n=w0e(t);if(n.length===0)return!1;let i=n[0],a=n[n.length-1],s=r.start,o=r.end;return!!s?.exec(i)&&!!o?.exec(a)}function w0e(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(YN)}function ZVe(t){var e,r,n;let i=[],a=t.position.line,s=t.position.character;for(let o=0;o=h.length){if(i.length>0){let p=Kr.create(a,s);i.push({type:"break",content:"",range:Or.create(p,p)})}}else{x0e.lastIndex=f;let p=x0e.exec(h);if(p){let g=p[0],m=p[1],v=Kr.create(a,s+f),y=Kr.create(a,s+f+g.length);i.push({type:"tag",content:m,range:Or.create(v,y)}),f+=g.length,f=KM(h,f)}if(f0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function QVe(t,e,r,n){let i=[];if(t.length===0){let a=Kr.create(r,n),s=Kr.create(r,n+e.length);i.push({type:"text",content:e,range:Or.create(a,s)})}else{let a=0;for(let o of t){let l=o.index,u=e.substring(a,l);u.length>0&&i.push({type:"text",content:e.substring(a,l),range:Or.create(Kr.create(r,a+n),Kr.create(r,l+n))});let h=u.length+1,f=o[1];if(i.push({type:"inline-tag",content:f,range:Or.create(Kr.create(r,a+h+n),Kr.create(r,a+h+f.length+n))}),h+=f.length,o.length===4){h+=o[2].length;let d=o[3];i.push({type:"text",content:d,range:Or.create(Kr.create(r,a+h+n),Kr.create(r,a+h+d.length+n))})}else i.push({type:"text",content:"",range:Or.create(Kr.create(r,a+h+n),Kr.create(r,a+h+n))});a=l+o[0].length}let s=e.substring(a);s.length>0&&i.push({type:"text",content:s,range:Or.create(Kr.create(r,a+n),Kr.create(r,a+n+s.length))})}return i}function KM(t,e){let r=t.substring(e).match(JVe);return r?e+r.index:t.length}function tUe(t){let e=t.match(eUe);if(e&&typeof e.index=="number")return e.index}function rUe(t){var e,r,n,i;let a=Kr.create(t.position.line,t.position.character);if(t.tokens.length===0)return new EE([],Or.create(a,a));let s=[];for(;t.index0){let l=KM(e,a);s=e.substring(l),e=e.substring(0,a)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(s=`\`${s}\``),(i=(n=r.renderLink)===null||n===void 0?void 0:n.call(r,e,s))!==null&&i!==void 0?i:oUe(e,s)}}function oUe(t,e){try{return us.parse(t,!0),`[${e}](${t})`}catch{return t}}function b0e(t){return t.endsWith(` `)?` `:` `}var x0e,KVe,JVe,eUe,EE,pb,gb,SE,eO=F(()=>{cM();$m();Wc();x0e=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,KVe=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;JVe=/\S/,eUe=/\s*$/;EE=class{constructor(e,r){this.elements=e,this.range=r}getTag(e){return this.getAllTags().find(r=>r.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let r of this.elements)if(e.length===0)e=r.toString();else{let n=r.toString();e+=b0e(e)+n}return e.trim()}toMarkdown(e){let r="";for(let n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{let i=n.toMarkdown(e);r+=b0e(r)+i}return r.trim()}},pb=class{constructor(e,r,n,i){this.name=e,this.content=r,this.inline=n,this.range=i}toString(){let e=`@${this.name}`,r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e} ${r}`),this.inline?`{${e}}`:e}toMarkdown(e){var r,n;return(n=(r=e?.renderTag)===null||r===void 0?void 0:r.call(e,this))!==null&&n!==void 0?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){let r=this.content.toMarkdown(e);if(this.inline){let a=sUe(this.name,r,e??{});if(typeof a=="string")return a}let n="";e?.tag==="italic"||e?.tag===void 0?n="*":e?.tag==="bold"?n="**":e?.tag==="bold-italic"&&(n="***");let i=`${n}@${this.name}${n}`;return this.content.inlines.length===1?i=`${i} \u2014 ${r}`:this.content.inlines.length>1&&(i=`${i} ${r}`),this.inline?`{${i}}`:i}};gb=class{constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;rn.range.start.line&&(e+=` `)}return e}toMarkdown(e){let r="";for(let n=0;ni.range.start.line&&(r+=` `)}return r}},SE=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}}});var mb,tO=F(()=>{is();eO();mb=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let r=this.commentProvider.getComment(e);if(r&&QM(r))return ZM(r).toMarkdown({renderLink:(i,a)=>this.documentationLinkRenderer(e,i,a),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,r,n){var i;let a=(i=this.findNameInPrecomputedScopes(e,r))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,r);if(a&&a.nameSegment){let s=a.nameSegment.range.start.line+1,o=a.nameSegment.range.start.character+1,l=a.documentUri.with({fragment:`L${s},${o}`});return`[${n}](${l.toString()})`}else return}documentationTagRenderer(e,r){}findNameInPrecomputedScopes(e,r){let i=Na(e).precomputedScopes;if(!i)return;let a=e;do{let o=i.get(a).find(l=>l.name===r);if(o)return o;a=a.$container}while(a)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(i=>i.name===r)}}});var vb,rO=F(()=>{yE();Al();vb=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return BM(e)?e.$comment:(r=wN(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||r===void 0?void 0:r.text}}});var yb,nO,iO,aO=F(()=>{Zo();bE();yb=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,r){return Promise.resolve(this.syncParser.parse(e))}},nO=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}async parse(e,r){let n=await this.acquireParserWorker(r),i=new cs,a,s=r.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(o=>{let l=this.hydrator.hydrate(o);i.resolve(l)}).catch(o=>{i.reject(o)}).finally(()=>{s.dispose(),clearTimeout(a)}),i.promise}terminateWorker(e){e.terminate();let r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(e){this.initializeWorkers();for(let n of this.workerPool)if(n.ready)return n.lock(),n;let r=new cs;return e.onCancellationRequested(()=>{let n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(Uc)}),this.queue.push(r),r.promise}},iO=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,i){this.onReadyEmitter=new Hn.Emitter,this.deferred=new cs,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,r(a=>{let s=a;this.deferred.resolve(s),this.unlock()}),n(a=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(Uc),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new cs,this.sendMessage(e),this.deferred.promise}}});var xb,sO=F(()=>{Ko();Zo();xb=class{constructor(){this.previousTokenSource=new fr.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let r=pE();return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n=fr.CancellationToken.None){let i=new cs,a={action:r,deferred:i,cancellationToken:n};return e.push(a),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:i})=>{try{let a=await Promise.resolve().then(()=>r(i));n.resolve(a)}catch(a){qc(a)?n.resolve(void 0):n.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}});var bb,oO=F(()=>{iE();Fc();Cl();is();w1();Al();bb=class{constructor(e){this.grammarElementIdMap=new B0,this.tokenTypeIdMap=new B0,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(r=>Object.assign(Object.assign({},r),{message:r.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let r=new Map,n=new Map;for(let i of jo(e))r.set(i,{});if(e.$cstNode)for(let i of g0(e.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let s=[];n[i]=s;for(let o of a)ti(o)?s.push(this.dehydrateAstNode(o,r)):da(o)?s.push(this.dehydrateReference(o,r)):s.push(o)}else ti(a)?n[i]=this.dehydrateAstNode(a,r):da(a)?n[i]=this.dehydrateReference(a,r):a!==void 0&&(n[i]=a);return n}dehydrateReference(e,r){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){let n=r.cstNodes.get(e);return Y2(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),Sl(e)?n.content=e.content.map(i=>this.dehydrateCstNode(i,r)):Cf(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){let r=new Map,n=new Map;for(let a of jo(e))r.set(a,{});let i;if(e.$cstNode)for(let a of g0(e.$cstNode)){let s;"fullText"in a?(s=new p1(a.fullText),i=s):"content"in a?s=new M0:"tokenType"in a&&(s=this.hydrateCstLeafNode(a)),s&&(n.set(a,s),s.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let s=[];n[i]=s;for(let o of a)ti(o)?s.push(this.setParent(this.hydrateAstNode(o,r),n)):da(o)?s.push(this.hydrateReference(o,n,i,r)):s.push(o)}else ti(a)?n[i]=this.setParent(this.hydrateAstNode(a,r),n):da(a)?n[i]=this.hydrateReference(a,n,i,r):a!==void 0&&(n[i]=a);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,i){return this.linker.buildReference(r,n,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){let i=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=r.astNodes.get(e.astNode),Sl(i))for(let a of e.content){let s=this.hydrateCstNode(a,r,n++);i.content.push(s)}return i}hydrateCstLeafNode(e){let r=this.getTokenType(e.tokenType),n=e.offset,i=e.length,a=e.startLine,s=e.startColumn,o=e.endLine,l=e.endColumn,u=e.hidden;return new D0(n,i,{start:{line:a,character:s},end:{line:o,character:l}},r,u)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let r of jo(this.grammar))tx(r)&&this.grammarElementIdMap.set(r,e++)}}});function pa(t){return{documentation:{CommentProvider:e=>new vb(e),DocumentationProvider:e=>new mb(e)},parser:{AsyncParser:e=>new yb(e),GrammarConfig:e=>lD(e),LangiumParser:e=>mM(e),CompletionParser:e=>pM(e),ValueConverter:()=>new P0,TokenBuilder:()=>new ju,Lexer:e=>new z0(e),ParserErrorMessageProvider:()=>new g1,LexerErrorMessageProvider:()=>new db},workspace:{AstNodeLocator:()=>new lb,AstNodeDescriptionProvider:e=>new sb(e),ReferenceDescriptionProvider:e=>new ob(e)},references:{Linker:e=>new Xx(e),NameProvider:()=>new jx,ScopeProvider:e=>new eb(e),ScopeComputation:e=>new Zx(e),References:e=>new Kx(e)},serializer:{Hydrator:e=>new bb(e),JsonSerializer:e=>new tb(e)},validation:{DocumentValidator:e=>new ab(e),ValidationRegistry:e=>new nb(e)},shared:()=>t.shared}}function ga(t){return{ServiceRegistry:e=>new rb(e),workspace:{LangiumDocuments:e=>new Yx(e),LangiumDocumentFactory:e=>new Hx(e),DocumentBuilder:e=>new ub(e),IndexManager:e=>new hb(e),WorkspaceManager:e=>new fb(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new xb,ConfigurationProvider:e=>new cb(e)}}}var lO=F(()=>{cD();gM();vM();cE();yM();IM();NM();DM();MM();PM();yE();FM();$M();ib();zM();GM();VM();qM();b1();WM();HM();kE();tO();rO();qx();aO();sO();oO()});function Pn(t,e,r,n,i,a,s,o,l){let u=[t,e,r,n,i,a,s,o,l].reduce(CE,{});return L0e(u)}function _0e(t){if(t&&t[A0e])for(let e of Object.values(t))_0e(e);return t}function L0e(t,e){let r=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(n,i)=>i===A0e?!0:C0e(n,i,t,e||r),getOwnPropertyDescriptor:(n,i)=>(C0e(n,i,t,e||r),Object.getOwnPropertyDescriptor(n,i)),has:(n,i)=>i in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return r}function C0e(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]===S0e)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){let i=r[e];t[e]=S0e;try{t[e]=typeof i=="function"?i(n):L0e(i,n)}catch(a){throw t[e]=a instanceof Error?a:void 0,a}return t[e]}else return}function CE(t,e){if(e){for(let[r,n]of Object.entries(e))if(n!==void 0){let i=t[r];i!==null&&n!==null&&typeof i=="object"&&typeof n=="object"?t[r]=CE(i,n):t[r]=n}}return t}var cO,A0e,S0e,uO=F(()=>{(function(t){t.merge=(e,r)=>CE(CE({},e),r)})(cO||(cO={}));A0e=Symbol("isProxy");S0e=Symbol()});var R0e=F(()=>{});var I0e=F(()=>{rO();tO();eO()});var N0e=F(()=>{});var D0e=F(()=>{cD();N0e()});var hO,G0,AE,fO,M0e=F(()=>{Rf();cE();kE();hO={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(function(t){t.REGULAR="indentation-sensitive",t.IGNORE_INDENTATION="ignore-indentation"})(G0||(G0={}));AE=class extends ju{constructor(e=hO){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},hO),e),this.indentTokenType=_f({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=_f({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,r){let n=super.buildTokens(e,r);if(!TE(n))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:a,whitespaceTokenName:s,ignoreIndentationDelimiters:o}=this.options,l,u,h,f=[];for(let d of n){for(let[p,g]of o)d.name===p?d.PUSH_MODE=G0.IGNORE_INDENTATION:d.name===g&&(d.POP_MODE=!0);d.name===a?l=d:d.name===i?u=d:d.name===s?h=d:f.push(d)}if(!l||!u||!h)throw new Error("Some indentation/whitespace tokens not found!");return o.length>0?{modes:{[G0.REGULAR]:[l,u,...f,h],[G0.IGNORE_INDENTATION]:[...f,h]},defaultMode:G0.REGULAR}:[l,u,h,...f]}flushLexingReport(e){let r=super.flushLexingReport(e);return Object.assign(Object.assign({},r),{remainingDedents:this.flushRemainingDedents(e)})}isStartOfLine(e,r){return r===0||`\r `.includes(e[r-1])}matchWhitespace(e,r,n,i){var a;this.whitespaceRegExp.lastIndex=r;let s=this.whitespaceRegExp.exec(e);return{currIndentLevel:(a=s?.[0].length)!==null&&a!==void 0?a:0,prevIndentLevel:this.indentationStack.at(-1),match:s}}createIndentationTokenInstance(e,r,n,i){let a=this.getLineNumber(r,i);return Wu(e,n,i,i+n.length,a,a,1,n.length)}getLineNumber(e,r){return e.substring(0,r).split(/\r\n|\r|\n/).length}indentMatcher(e,r,n,i){if(!this.isStartOfLine(e,r))return null;let{currIndentLevel:a,prevIndentLevel:s,match:o}=this.matchWhitespace(e,r,n,i);return a<=s?null:(this.indentationStack.push(a),o)}dedentMatcher(e,r,n,i){var a,s,o,l;if(!this.isStartOfLine(e,r))return null;let{currIndentLevel:u,prevIndentLevel:h,match:f}=this.matchWhitespace(e,r,n,i);if(u>=h)return null;let d=this.indentationStack.lastIndexOf(u);if(d===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${u} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:(s=(a=f?.[0])===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,line:this.getLineNumber(e,r),column:1}),null;let p=this.indentationStack.length-d-1,g=(l=(o=e.substring(0,r).match(/[\r\n]+$/))===null||o===void 0?void 0:o[0].length)!==null&&l!==void 0?l:1;for(let m=0;m1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],r}},fO=class extends z0{constructor(e){if(super(e),e.parser.TokenBuilder instanceof AE)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,r=wE){let n=super.tokenize(e),i=n.report;r?.mode==="full"&&n.tokens.push(...i.remainingDedents),i.remainingDedents=[];let{indentTokenType:a,dedentTokenType:s}=this.indentationTokenBuilder,o=a.tokenTypeIdx,l=s.tokenTypeIdx,u=[],h=n.tokens.length-1;for(let f=0;f=0&&u.push(n.tokens[h]),n.tokens=u,n}}});var O0e=F(()=>{});var P0e=F(()=>{aO();gM();iE();M0e();vM();qx();kE();lE();O0e();cE();yM()});var B0e=F(()=>{IM();NM();DM();OM();MM();PM()});var F0e=F(()=>{oO();yE()});var _E,ma,dO=F(()=>{_E=class{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},ma={fileSystemProvider:()=>new _E}});function uUe(){let t=Pn(ga(ma),cUe),e=Pn(pa({shared:t}),lUe);return t.ServiceRegistry.register(e),e}function Hc(t){var e;let r=uUe(),n=r.serializer.JsonSerializer.deserialize(t);return r.shared.workspace.LangiumDocumentFactory.fromModel(n,us.parse(`memory://${(e=n.name)!==null&&e!==void 0?e:"grammar"}.langium`)),n}var lUe,cUe,$0e=F(()=>{lO();uO();Fc();dO();Wc();lUe={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},cUe={AstReflection:()=>new Om}});var Ur={};hr(Ur,{AstUtils:()=>o6,BiMap:()=>B0,Cancellation:()=>fr,ContextCache:()=>F0,CstUtils:()=>Zk,DONE_RESULT:()=>Ra,Deferred:()=>cs,Disposable:()=>Df,DisposableCache:()=>k1,DocumentCache:()=>mE,EMPTY_STREAM:()=>X2,ErrorWithLocation:()=>v0,GrammarUtils:()=>f6,MultiMap:()=>Nl,OperationCancelled:()=>Uc,Reduction:()=>jg,RegExpUtils:()=>u6,SimpleCache:()=>Jx,StreamImpl:()=>ao,TreeStreamImpl:()=>Oc,URI:()=>us,UriUtils:()=>hs,WorkspaceCache:()=>E1,assertUnreachable:()=>Bc,delayNextTick:()=>AM,interruptAndCheck:()=>hi,isOperationCancelled:()=>qc,loadGrammarFromJson:()=>Hc,setInterruptionPeriod:()=>c0e,startCancelableOperation:()=>pE,stream:()=>Qr});var z0e=F(()=>{vE();bE();kr(Ur,Hn);w1();UM();Qk();$0e();Zo();Fs();Wc();is();Ko();Al();Rl();$m()});var G0e=F(()=>{$M();ib()});var V0e=F(()=>{zM();GM();VM();qM();b1();dO();WM();sO();HM()});var va={};hr(va,{AbstractAstReflection:()=>d0,AbstractCstNode:()=>zx,AbstractLangiumParser:()=>Gx,AbstractParserErrorMessageProvider:()=>sE,AbstractThreadedAsyncParser:()=>nO,AstUtils:()=>o6,BiMap:()=>B0,Cancellation:()=>fr,CompositeCstNodeImpl:()=>M0,ContextCache:()=>F0,CstNodeBuilder:()=>$x,CstUtils:()=>Zk,DEFAULT_TOKENIZE_OPTIONS:()=>wE,DONE_RESULT:()=>Ra,DatatypeSymbol:()=>aE,DefaultAstNodeDescriptionProvider:()=>sb,DefaultAstNodeLocator:()=>lb,DefaultAsyncParser:()=>yb,DefaultCommentProvider:()=>vb,DefaultConfigurationProvider:()=>cb,DefaultDocumentBuilder:()=>ub,DefaultDocumentValidator:()=>ab,DefaultHydrator:()=>bb,DefaultIndexManager:()=>hb,DefaultJsonSerializer:()=>tb,DefaultLangiumDocumentFactory:()=>Hx,DefaultLangiumDocuments:()=>Yx,DefaultLexer:()=>z0,DefaultLexerErrorMessageProvider:()=>db,DefaultLinker:()=>Xx,DefaultNameProvider:()=>jx,DefaultReferenceDescriptionProvider:()=>ob,DefaultReferences:()=>Kx,DefaultScopeComputation:()=>Zx,DefaultScopeProvider:()=>eb,DefaultServiceRegistry:()=>rb,DefaultTokenBuilder:()=>ju,DefaultValueConverter:()=>P0,DefaultWorkspaceLock:()=>xb,DefaultWorkspaceManager:()=>fb,Deferred:()=>cs,Disposable:()=>Df,DisposableCache:()=>k1,DocumentCache:()=>mE,DocumentState:()=>En,DocumentValidator:()=>Qo,EMPTY_SCOPE:()=>jVe,EMPTY_STREAM:()=>X2,EmptyFileSystem:()=>ma,EmptyFileSystemProvider:()=>_E,ErrorWithLocation:()=>v0,GrammarAST:()=>nx,GrammarUtils:()=>f6,IndentationAwareLexer:()=>fO,IndentationAwareTokenBuilder:()=>AE,JSDocDocumentationProvider:()=>mb,LangiumCompletionParser:()=>Ux,LangiumParser:()=>Vx,LangiumParserErrorMessageProvider:()=>g1,LeafCstNodeImpl:()=>D0,LexingMode:()=>G0,MapScope:()=>Qx,Module:()=>cO,MultiMap:()=>Nl,OperationCancelled:()=>Uc,ParserWorker:()=>iO,Reduction:()=>jg,RegExpUtils:()=>u6,RootCstNodeImpl:()=>p1,SimpleCache:()=>Jx,StreamImpl:()=>ao,StreamScope:()=>T1,TextDocument:()=>y1,TreeStreamImpl:()=>Oc,URI:()=>us,UriUtils:()=>hs,ValidationCategory:()=>S1,ValidationRegistry:()=>nb,ValueConverter:()=>Vc,WorkspaceCache:()=>E1,assertUnreachable:()=>Bc,createCompletionParser:()=>pM,createDefaultCoreModule:()=>pa,createDefaultSharedCoreModule:()=>ga,createGrammarConfig:()=>lD,createLangiumParser:()=>mM,createParser:()=>Wx,delayNextTick:()=>AM,diagnosticData:()=>$0,eagerLoad:()=>_0e,getDiagnosticRange:()=>v0e,indentationBuilderDefaultOptions:()=>hO,inject:()=>Pn,interruptAndCheck:()=>hi,isAstNode:()=>ti,isAstNodeDescription:()=>vN,isAstNodeWithComment:()=>BM,isCompositeCstNode:()=>Sl,isIMultiModeLexerDefinition:()=>XM,isJSDoc:()=>QM,isLeafCstNode:()=>Cf,isLinkingError:()=>p0,isNamed:()=>g0e,isOperationCancelled:()=>qc,isReference:()=>da,isRootCstNode:()=>Y2,isTokenTypeArray:()=>TE,isTokenTypeDictionary:()=>YM,loadGrammarFromJson:()=>Hc,parseJSDoc:()=>ZM,prepareLangiumParser:()=>r0e,setInterruptionPeriod:()=>c0e,startCancelableOperation:()=>pE,stream:()=>Qr,toDiagnosticData:()=>y0e,toDiagnosticSeverity:()=>xE});var co=F(()=>{lO();uO();FM();R0e();Cl();I0e();D0e();P0e();B0e();F0e();z0e();kr(va,Ur);G0e();V0e();Fc()});function K0e(t){return Dl.isInstance(t,wb)}function Z0e(t){return Dl.isInstance(t,C1)}function Q0e(t){return Dl.isInstance(t,A1)}function J0e(t){return Dl.isInstance(t,_1)}function epe(t){return Dl.isInstance(t,Tb)}function tpe(t){return Dl.isInstance(t,L1)}function rpe(t){return Dl.isInstance(t,kb)}function npe(t){return Dl.isInstance(t,Eb)}function ipe(t){return Dl.isInstance(t,Sb)}function ape(t){return Dl.isInstance(t,Cb)}function spe(t){return Dl.isInstance(t,Ab)}var hUe,pt,kO,wb,LE,C1,RE,IE,pO,A1,gO,mO,vO,_1,yO,Tb,NE,xO,L1,bO,kb,Eb,Sb,Cb,PE,wO,Ab,TO,DE,ME,OE,ope,Dl,U0e,fUe,q0e,dUe,W0e,pUe,H0e,gUe,Y0e,mUe,X0e,vUe,j0e,yUe,xUe,bUe,wUe,TUe,kUe,EUe,SUe,fs,EO,SO,CO,AO,_O,LO,RO,CUe,AUe,_Ue,LUe,Mf,Ku,Ma,RUe,Oa=F(()=>{co();co();co();co();hUe=Object.defineProperty,pt=(t,e)=>hUe(t,"name",{value:e,configurable:!0}),kO="Statement",wb="Architecture";pt(K0e,"isArchitecture");LE="Axis",C1="Branch";pt(Z0e,"isBranch");RE="Checkout",IE="CherryPicking",pO="ClassDefStatement",A1="Commit";pt(Q0e,"isCommit");gO="Curve",mO="Edge",vO="Entry",_1="GitGraph";pt(J0e,"isGitGraph");yO="Group",Tb="Info";pt(epe,"isInfo");NE="Item",xO="Junction",L1="Merge";pt(tpe,"isMerge");bO="Option",kb="Packet";pt(rpe,"isPacket");Eb="PacketBlock";pt(npe,"isPacketBlock");Sb="Pie";pt(ipe,"isPie");Cb="PieSection";pt(ape,"isPieSection");PE="Radar",wO="Service",Ab="Treemap";pt(spe,"isTreemap");TO="TreemapRow",DE="Direction",ME="Leaf",OE="Section",ope=class extends d0{static{pt(this,"MermaidAstReflection")}getAllTypes(){return[wb,LE,C1,RE,IE,pO,A1,gO,DE,mO,vO,_1,yO,Tb,NE,xO,ME,L1,bO,kb,Eb,Sb,Cb,PE,OE,wO,kO,Ab,TO]}computeIsSubtype(t,e){switch(t){case C1:case RE:case IE:case A1:case L1:return this.isSubtype(kO,e);case DE:return this.isSubtype(_1,e);case ME:case OE:return this.isSubtype(NE,e);default:return!1}}getReferenceType(t){let e=`${t.container.$type}:${t.property}`;switch(e){case"Entry:axis":return LE;default:throw new Error(`${e} is not a valid reference id.`)}}getTypeMetaData(t){switch(t){case wb:return{name:wb,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case LE:return{name:LE,properties:[{name:"label"},{name:"name"}]};case C1:return{name:C1,properties:[{name:"name"},{name:"order"}]};case RE:return{name:RE,properties:[{name:"branch"}]};case IE:return{name:IE,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case pO:return{name:pO,properties:[{name:"className"},{name:"styleText"}]};case A1:return{name:A1,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case gO:return{name:gO,properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case mO:return{name:mO,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 vO:return{name:vO,properties:[{name:"axis"},{name:"value"}]};case _1:return{name:_1,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case yO:return{name:yO,properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case Tb:return{name:Tb,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case NE:return{name:NE,properties:[{name:"classSelector"},{name:"name"}]};case xO:return{name:xO,properties:[{name:"id"},{name:"in"}]};case L1:return{name:L1,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case bO:return{name:bO,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case kb:return{name:kb,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case Eb:return{name:Eb,properties:[{name:"bits"},{name:"end"},{name:"label"},{name:"start"}]};case Sb:return{name:Sb,properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case Cb:return{name:Cb,properties:[{name:"label"},{name:"value"}]};case PE:return{name:PE,properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case wO:return{name:wO,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case Ab:return{name:Ab,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"},{name:"TreemapRows",defaultValue:[]}]};case TO:return{name:TO,properties:[{name:"indent"},{name:"item"}]};case DE:return{name:DE,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};case ME:return{name:ME,properties:[{name:"classSelector"},{name:"name"},{name:"value"}]};case OE:return{name:OE,properties:[{name:"classSelector"},{name:"name"}]};default:return{name:t,properties:[]}}}},Dl=new ope,fUe=pt(()=>U0e??(U0e=Hc(`{"$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"),dUe=pt(()=>q0e??(q0e=Hc(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),pUe=pt(()=>W0e??(W0e=Hc(`{"$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"),gUe=pt(()=>H0e??(H0e=Hc(`{"$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"),mUe=pt(()=>Y0e??(Y0e=Hc(`{"$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"),vUe=pt(()=>X0e??(X0e=Hc(`{"$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"),yUe=pt(()=>j0e??(j0e=Hc(`{"$type":"Grammar","isDeclared":true,"name":"Treemap","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","}},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`)),"TreemapGrammar"),xUe={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},bUe={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},wUe={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},TUe={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},kUe={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},EUe={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},SUe={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},fs={AstReflection:pt(()=>new ope,"AstReflection")},EO={Grammar:pt(()=>fUe(),"Grammar"),LanguageMetaData:pt(()=>xUe,"LanguageMetaData"),parser:{}},SO={Grammar:pt(()=>dUe(),"Grammar"),LanguageMetaData:pt(()=>bUe,"LanguageMetaData"),parser:{}},CO={Grammar:pt(()=>pUe(),"Grammar"),LanguageMetaData:pt(()=>wUe,"LanguageMetaData"),parser:{}},AO={Grammar:pt(()=>gUe(),"Grammar"),LanguageMetaData:pt(()=>TUe,"LanguageMetaData"),parser:{}},_O={Grammar:pt(()=>mUe(),"Grammar"),LanguageMetaData:pt(()=>kUe,"LanguageMetaData"),parser:{}},LO={Grammar:pt(()=>vUe(),"Grammar"),LanguageMetaData:pt(()=>EUe,"LanguageMetaData"),parser:{}},RO={Grammar:pt(()=>yUe(),"Grammar"),LanguageMetaData:pt(()=>SUe,"LanguageMetaData"),parser:{}},CUe=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,AUe=/accTitle[\t ]*:([^\n\r]*)/,_Ue=/title([\t ][^\n\r]*|)/,LUe={ACC_DESCR:CUe,ACC_TITLE:AUe,TITLE:_Ue},Mf=class extends P0{static{pt(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){let n=this.runCommonConverter(t,e,r);return n===void 0&&(n=this.runCustomConverter(t,e,r)),n===void 0?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){let n=LUe[t.name];if(n===void 0)return;let i=n.exec(e);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` `)}}},Ku=class extends Mf{static{pt(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},Ma=class extends ju{static{pt(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){let n=super.buildKeywordTokens(t,e,r);return n.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},RUe=class extends Ma{static{pt(this,"CommonTokenBuilder")}}});function FE(t=ma){let e=Pn(ga(t),fs),r=Pn(pa({shared:e}),_O,BE);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}var IUe,BE,IO=F(()=>{Oa();co();IUe=class extends Ma{static{pt(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},BE={parser:{TokenBuilder:pt(()=>new IUe,"TokenBuilder"),ValueConverter:pt(()=>new Ku,"ValueConverter")}};pt(FE,"createGitGraphServices")});function zE(t=ma){let e=Pn(ga(t),fs),r=Pn(pa({shared:e}),EO,$E);return e.ServiceRegistry.register(r),{shared:e,Info:r}}var NUe,$E,NO=F(()=>{Oa();co();NUe=class extends Ma{static{pt(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},$E={parser:{TokenBuilder:pt(()=>new NUe,"TokenBuilder"),ValueConverter:pt(()=>new Ku,"ValueConverter")}};pt(zE,"createInfoServices")});function VE(t=ma){let e=Pn(ga(t),fs),r=Pn(pa({shared:e}),SO,GE);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}var DUe,GE,DO=F(()=>{Oa();co();DUe=class extends Ma{static{pt(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},GE={parser:{TokenBuilder:pt(()=>new DUe,"TokenBuilder"),ValueConverter:pt(()=>new Ku,"ValueConverter")}};pt(VE,"createPacketServices")});function qE(t=ma){let e=Pn(ga(t),fs),r=Pn(pa({shared:e}),CO,UE);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}var MUe,OUe,UE,MO=F(()=>{Oa();co();MUe=class extends Ma{static{pt(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},OUe=class extends Mf{static{pt(this,"PieValueConverter")}runCustomConverter(t,e,r){if(t.name==="PIE_SECTION_LABEL")return e.replace(/"/g,"").trim()}},UE={parser:{TokenBuilder:pt(()=>new MUe,"TokenBuilder"),ValueConverter:pt(()=>new OUe,"ValueConverter")}};pt(qE,"createPieServices")});function HE(t=ma){let e=Pn(ga(t),fs),r=Pn(pa({shared:e}),AO,WE);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}var PUe,BUe,WE,OO=F(()=>{Oa();co();PUe=class extends Ma{static{pt(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},BUe=class extends Mf{static{pt(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){if(t.name==="ARCH_ICON")return e.replace(/[()]/g,"").trim();if(t.name==="ARCH_TEXT_ICON")return e.replace(/["()]/g,"");if(t.name==="ARCH_TITLE")return e.replace(/[[\]]/g,"").trim()}},WE={parser:{TokenBuilder:pt(()=>new PUe,"TokenBuilder"),ValueConverter:pt(()=>new BUe,"ValueConverter")}};pt(HE,"createArchitectureServices")});function XE(t=ma){let e=Pn(ga(t),fs),r=Pn(pa({shared:e}),LO,YE);return e.ServiceRegistry.register(r),{shared:e,Radar:r}}var FUe,YE,PO=F(()=>{Oa();co();FUe=class extends Ma{static{pt(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},YE={parser:{TokenBuilder:pt(()=>new FUe,"TokenBuilder"),ValueConverter:pt(()=>new Ku,"ValueConverter")}};pt(XE,"createRadarServices")});function lpe(t){let e=t.validation.TreemapValidator,r=t.validation.ValidationRegistry;if(r){let n={Treemap:e.checkSingleRoot.bind(e)};r.register(n,e)}}function KE(t=ma){let e=Pn(ga(t),fs),r=Pn(pa({shared:e}),RO,jE);return e.ServiceRegistry.register(r),lpe(r),{shared:e,Treemap:r}}var $Ue,zUe,GUe,VUe,jE,BO=F(()=>{Oa();co();$Ue=class extends Ma{static{pt(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},zUe=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,GUe=class extends Mf{static{pt(this,"TreemapValueConverter")}runCustomConverter(t,e,r){if(t.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(t.name==="SEPARATOR")return e.substring(1,e.length-1);if(t.name==="STRING2")return e.substring(1,e.length-1);if(t.name==="INDENTATION")return e.length;if(t.name==="ClassDef"){if(typeof e!="string")return e;let n=zUe.exec(e);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}}};pt(lpe,"registerValidationChecks");VUe=class{static{pt(this,"TreemapValidator")}checkSingleRoot(t,e){let r;for(let n of t.TreemapRows)n.item&&(r===void 0&&n.indent===void 0?r=0:n.indent===void 0?e("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}):r!==void 0&&r>=parseInt(n.indent,10)&&e("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},jE={parser:{TokenBuilder:pt(()=>new $Ue,"TokenBuilder"),ValueConverter:pt(()=>new GUe,"ValueConverter")},validation:{TreemapValidator:pt(()=>new VUe,"TreemapValidator")}};pt(KE,"createTreemapServices")});var cpe={};hr(cpe,{InfoModule:()=>$E,createInfoServices:()=>zE});var upe=F(()=>{NO();Oa()});var hpe={};hr(hpe,{PacketModule:()=>GE,createPacketServices:()=>VE});var fpe=F(()=>{DO();Oa()});var dpe={};hr(dpe,{PieModule:()=>UE,createPieServices:()=>qE});var ppe=F(()=>{MO();Oa()});var gpe={};hr(gpe,{ArchitectureModule:()=>WE,createArchitectureServices:()=>HE});var mpe=F(()=>{OO();Oa()});var vpe={};hr(vpe,{GitGraphModule:()=>BE,createGitGraphServices:()=>FE});var ype=F(()=>{IO();Oa()});var xpe={};hr(xpe,{RadarModule:()=>YE,createRadarServices:()=>XE});var bpe=F(()=>{PO();Oa()});var wpe={};hr(wpe,{TreemapModule:()=>jE,createTreemapServices:()=>KE});var Tpe=F(()=>{BO();Oa()});async function ds(t,e){let r=UUe[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);Zu[t]||await r();let i=Zu[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new qUe(i);return i.value}var Zu,UUe,qUe,Of=F(()=>{IO();NO();DO();MO();OO();PO();BO();Oa();Zu={},UUe={info:pt(async()=>{let{createInfoServices:t}=await Promise.resolve().then(()=>(upe(),cpe)),e=t().Info.parser.LangiumParser;Zu.info=e},"info"),packet:pt(async()=>{let{createPacketServices:t}=await Promise.resolve().then(()=>(fpe(),hpe)),e=t().Packet.parser.LangiumParser;Zu.packet=e},"packet"),pie:pt(async()=>{let{createPieServices:t}=await Promise.resolve().then(()=>(ppe(),dpe)),e=t().Pie.parser.LangiumParser;Zu.pie=e},"pie"),architecture:pt(async()=>{let{createArchitectureServices:t}=await Promise.resolve().then(()=>(mpe(),gpe)),e=t().Architecture.parser.LangiumParser;Zu.architecture=e},"architecture"),gitGraph:pt(async()=>{let{createGitGraphServices:t}=await Promise.resolve().then(()=>(ype(),vpe)),e=t().GitGraph.parser.LangiumParser;Zu.gitGraph=e},"gitGraph"),radar:pt(async()=>{let{createRadarServices:t}=await Promise.resolve().then(()=>(bpe(),xpe)),e=t().Radar.parser.LangiumParser;Zu.radar=e},"radar"),treemap:pt(async()=>{let{createTreemapServices:t}=await Promise.resolve().then(()=>(Tpe(),wpe)),e=t().Treemap.parser.LangiumParser;Zu.treemap=e},"treemap")};pt(ds,"parse");qUe=class extends Error{constructor(t){let e=t.lexerErrors.map(n=>n.message).join(` `),r=t.parserErrors.map(n=>n.message).join(` `);super(`Parsing failed: ${e} ${r}`),this.result=t}static{pt(this,"MermaidParseError")}}});var Rpe={};hr(Rpe,{diagram:()=>Fqe});function JE(){return m_({length:7})}function Epe(t,e){let r=Object.create(null);return t.reduce((n,i)=>{let a=e(i);return r[a]||(r[a]=!0,n.push(i)),n},[])}function FO(t,e,r){let n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}function $O(t){let e=t.reduce((i,a)=>i.seq>a.seq?i:a,t[0]),r="";t.forEach(function(i){i===e?r+=" *":r+=" |"});let n=[r,e.id,e.seq];for(let i in Tt.records.branches)Tt.records.branches.get(i)===e.id&&n.push(i);if(J.debug(n.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){let i=Tt.records.commits.get(e.parents[0]);FO(t,e,i),e.parents[1]&&t.push(Tt.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){let i=Tt.records.commits.get(e.parents[0]);FO(t,e,i)}}t=Epe(t,i=>i.id),$O(t)}var dn,WUe,U0,Tt,HUe,YUe,XUe,jUe,KUe,ZUe,QUe,Spe,JUe,eqe,tqe,rqe,nqe,Cpe,iqe,aqe,sqe,Ape,oqe,lqe,cqe,uqe,hqe,fqe,dqe,pqe,gqe,Jo,Bf,Ff,Yc,Qu,V0,Gs,Vs,ZE,_b,QE,Pf,Pr,mqe,_pe,Lpe,vqe,yqe,xqe,bqe,wqe,Tqe,kqe,Eqe,Sqe,Cqe,Aqe,_qe,kpe,Lqe,Lb,Rqe,Iqe,Nqe,Dqe,Mqe,Oqe,Pqe,Bqe,Fqe,Ipe=F(()=>{f0();mN();hn();vr();rr();Of();cr();dn={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},WUe=sr.gitGraph,U0=x(()=>Qn({...WUe,...or().gitGraph}),"getConfig"),Tt=new Xk(()=>{let t=U0(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});x(JE,"getID");x(Epe,"uniqBy");HUe=x(function(t){Tt.records.direction=t},"setDirection"),YUe=x(function(t){J.debug("options str",t),t=t?.trim(),t=t||"{}";try{Tt.records.options=JSON.parse(t)}catch(e){J.error("error while parsing gitGraph options",e.message)}},"setOptions"),XUe=x(function(){return Tt.records.options},"getOptions"),jUe=x(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags;J.info("commit",e,r,n,i),J.debug("Entering commit:",e,r,n,i);let a=U0();r=Je.sanitizeText(r,a),e=Je.sanitizeText(e,a),i=i?.map(o=>Je.sanitizeText(o,a));let s={id:r||Tt.records.seq+"-"+JE(),message:e,seq:Tt.records.seq++,type:n??dn.NORMAL,tags:i??[],parents:Tt.records.head==null?[]:[Tt.records.head.id],branch:Tt.records.currBranch};Tt.records.head=s,J.info("main branch",a.mainBranchName),Tt.records.commits.has(s.id)&&J.warn(`Commit ID ${s.id} already exists`),Tt.records.commits.set(s.id,s),Tt.records.branches.set(Tt.records.currBranch,s.id),J.debug("in pushCommit "+s.id)},"commit"),KUe=x(function(t){let e=t.name,r=t.order;if(e=Je.sanitizeText(e,U0()),Tt.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}")`);Tt.records.branches.set(e,Tt.records.head!=null?Tt.records.head.id:null),Tt.records.branchConfig.set(e,{name:e,order:r}),Spe(e),J.debug("in createBranch")},"branch"),ZUe=x(t=>{let e=t.branch,r=t.id,n=t.type,i=t.tags,a=U0();e=Je.sanitizeText(e,a),r&&(r=Je.sanitizeText(r,a));let s=Tt.records.branches.get(Tt.records.currBranch),o=Tt.records.branches.get(e),l=s?Tt.records.commits.get(s):void 0,u=o?Tt.records.commits.get(o):void 0;if(l&&u&&l.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(Tt.records.currBranch===e){let d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(l===void 0||!l){let d=new Error(`Incorrect usage of "merge". Current branch (${Tt.records.currBranch})has no commits`);throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},d}if(!Tt.records.branches.has(e)){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},d}if(u===void 0||!u){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},d}if(l===u){let d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(r&&Tt.records.commits.has(r)){let d=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw d.hash={text:`merge ${e} ${r} ${n} ${i?.join(" ")}`,token:`merge ${e} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},d}let h=o||"",f={id:r||`${Tt.records.seq}-${JE()}`,message:`merged branch ${e} into ${Tt.records.currBranch}`,seq:Tt.records.seq++,parents:Tt.records.head==null?[]:[Tt.records.head.id,h],branch:Tt.records.currBranch,type:dn.MERGE,customType:n,customId:!!r,tags:i??[]};Tt.records.head=f,Tt.records.commits.set(f.id,f),Tt.records.branches.set(Tt.records.currBranch,f.id),J.debug(Tt.records.branches),J.debug("in mergeBranch")},"merge"),QUe=x(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent;J.debug("Entering cherryPick:",e,r,n);let a=U0();if(e=Je.sanitizeText(e,a),r=Je.sanitizeText(r,a),n=n?.map(l=>Je.sanitizeText(l,a)),i=Je.sanitizeText(i,a),!e||!Tt.records.commits.has(e)){let l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},l}let s=Tt.records.commits.get(e);if(s===void 0||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(s.parents)&&s.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===dn.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||!Tt.records.commits.has(r)){if(o===Tt.records.currBranch){let f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let l=Tt.records.branches.get(Tt.records.currBranch);if(l===void 0||!l){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Tt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let u=Tt.records.commits.get(l);if(u===void 0||!u){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Tt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let h={id:Tt.records.seq+"-"+JE(),message:`cherry-picked ${s?.message} into ${Tt.records.currBranch}`,seq:Tt.records.seq++,parents:Tt.records.head==null?[]:[Tt.records.head.id,s.id],branch:Tt.records.currBranch,type:dn.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===dn.MERGE?`|parent:${i}`:""}`]};Tt.records.head=h,Tt.records.commits.set(h.id,h),Tt.records.branches.set(Tt.records.currBranch,h.id),J.debug(Tt.records.branches),J.debug("in cherryPick")}},"cherryPick"),Spe=x(function(t){if(t=Je.sanitizeText(t,U0()),Tt.records.branches.has(t)){Tt.records.currBranch=t;let e=Tt.records.branches.get(Tt.records.currBranch);e===void 0||!e?Tt.records.head=null:Tt.records.head=Tt.records.commits.get(e)??null}else{let e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");x(FO,"upsert");x($O,"prettyPrintCommitHistory");JUe=x(function(){J.debug(Tt.records.commits);let t=Cpe()[0];$O([t])},"prettyPrint"),eqe=x(function(){Tt.reset(),mr()},"clear"),tqe=x(function(){return[...Tt.records.branchConfig.values()].map((e,r)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${r}`)}).sort((e,r)=>(e.order??0)-(r.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),rqe=x(function(){return Tt.records.branches},"getBranches"),nqe=x(function(){return Tt.records.commits},"getCommits"),Cpe=x(function(){let t=[...Tt.records.commits.values()];return t.forEach(function(e){J.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},"getCommitsArray"),iqe=x(function(){return Tt.records.currBranch},"getCurrentBranch"),aqe=x(function(){return Tt.records.direction},"getDirection"),sqe=x(function(){return Tt.records.head},"getHead"),Ape={commitType:dn,getConfig:U0,setDirection:HUe,setOptions:YUe,getOptions:XUe,commit:jUe,branch:KUe,merge:ZUe,cherryPick:QUe,checkout:Spe,prettyPrint:JUe,clear:eqe,getBranchesAsObjArray:tqe,getBranches:rqe,getCommits:nqe,getCommitsArray:Cpe,getCurrentBranch:iqe,getDirection:aqe,getHead:sqe,setAccTitle:Er,getAccTitle:Cr,getAccDescription:_r,setAccDescription:Ar,setDiagramTitle:Dr,getDiagramTitle:Lr},oqe=x((t,e)=>{io(t,e),t.dir&&e.setDirection(t.dir);for(let r of t.statements)lqe(r,e)},"populate"),lqe=x((t,e)=>{let n={Commit:x(i=>e.commit(cqe(i)),"Commit"),Branch:x(i=>e.branch(uqe(i)),"Branch"),Merge:x(i=>e.merge(hqe(i)),"Merge"),Checkout:x(i=>e.checkout(fqe(i)),"Checkout"),CherryPicking:x(i=>e.cherryPick(dqe(i)),"CherryPicking")}[t.$type];n?n(t):J.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),cqe=x(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?dn[t.type]:dn.NORMAL,tags:t.tags??void 0}),"parseCommit"),uqe=x(t=>({name:t.name,order:t.order??0}),"parseBranch"),hqe=x(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?dn[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),fqe=x(t=>t.branch,"parseCheckout"),dqe=x(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),pqe={parse:x(async t=>{let e=await ds("gitGraph",t);J.debug(e),oqe(e,Ape)},"parse")},gqe=we(),Jo=gqe?.gitGraph,Bf=10,Ff=40,Yc=4,Qu=2,V0=8,Gs=new Map,Vs=new Map,ZE=30,_b=new Map,QE=[],Pf=0,Pr="LR",mqe=x(()=>{Gs.clear(),Vs.clear(),_b.clear(),Pf=0,QE=[],Pr="LR"},"clear"),_pe=x(t=>{let e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),e.appendChild(i)}),e},"drawText"),Lpe=x(t=>{let e,r,n;return Pr==="BT"?(r=x((i,a)=>i<=a,"comparisonFunc"),n=1/0):(r=x((i,a)=>i>=a,"comparisonFunc"),n=0),t.forEach(i=>{let a=Pr==="TB"||Pr=="BT"?Vs.get(i)?.y:Vs.get(i)?.x;a!==void 0&&r(a,n)&&(e=i,n=a)}),e},"findClosestParent"),vqe=x(t=>{let e="",r=1/0;return t.forEach(n=>{let i=Vs.get(n).y;i<=r&&(e=n,r=i)}),e||void 0},"findClosestParentBT"),yqe=x((t,e,r)=>{let n=r,i=r,a=[];t.forEach(s=>{let o=e.get(s);if(!o)throw new Error(`Commit not found for key ${s}`);o.parents.length?(n=bqe(o),i=Math.max(n,i)):a.push(o),wqe(o,n)}),n=i,a.forEach(s=>{Tqe(s,n,r)}),t.forEach(s=>{let o=e.get(s);if(o?.parents.length){let l=vqe(o.parents);n=Vs.get(l).y-Ff,n<=i&&(i=n);let u=Gs.get(o.branch).pos,h=n-Bf;Vs.set(o.id,{x:u,y:h})}})},"setParallelBTPos"),xqe=x(t=>{let e=Lpe(t.parents.filter(n=>n!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);let r=Vs.get(e)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),bqe=x(t=>xqe(t)+Ff,"calculateCommitPosition"),wqe=x((t,e)=>{let r=Gs.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);let n=r.pos,i=e+Bf;return Vs.set(t.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),Tqe=x((t,e,r)=>{let n=Gs.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);let i=e+r,a=n.pos;Vs.set(t.id,{x:a,y:i})},"setRootPosition"),kqe=x((t,e,r,n,i,a)=>{if(a===dn.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%V0} ${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%V0} ${n}-inner`);else if(a===dn.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}`);else{let s=t.append("circle");if(s.attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===dn.MERGE?9:10),s.attr("class",`commit ${e.id} commit${i%V0}`),a===dn.MERGE){let o=t.append("circle");o.attr("cx",r.x),o.attr("cy",r.y),o.attr("r",6),o.attr("class",`commit ${n} ${e.id} commit${i%V0}`)}a===dn.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%V0}`)}},"drawCommitBullet"),Eqe=x((t,e,r,n)=>{if(e.type!==dn.CHERRY_PICK&&(e.customId&&e.type===dn.MERGE||e.type!==dn.MERGE)&&Jo?.showCommitLabel){let i=t.append("g"),a=i.insert("rect").attr("class","commit-label-bkg"),s=i.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),o=s.node()?.getBBox();if(o&&(a.attr("x",r.posWithOffset-o.width/2-Qu).attr("y",r.y+13.5).attr("width",o.width+2*Qu).attr("height",o.height+2*Qu),Pr==="TB"||Pr==="BT"?(a.attr("x",r.x-(o.width+4*Yc+5)).attr("y",r.y-12),s.attr("x",r.x-(o.width+4*Yc)).attr("y",r.y+o.height-12)):s.attr("x",r.posWithOffset-o.width/2),Jo.rotateCommitLabel))if(Pr==="TB"||Pr==="BT")s.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let l=-7.5-(o.width+10)/25*9.5,u=10+o.width/25*8.5;i.attr("transform","translate("+l+", "+u+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),Sqe=x((t,e,r,n)=>{if(e.tags.length>0){let i=0,a=0,s=0,o=[];for(let l of e.tags.reverse()){let u=t.insert("polygon"),h=t.append("circle"),f=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(l),d=f.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),s=Math.max(s,d.height),f.attr("x",r.posWithOffset-d.width/2),o.push({tag:f,hole:h,rect:u,yOffset:i}),i+=20}for(let{tag:l,hole:u,rect:h,yOffset:f}of o){let d=s/2,p=r.y-19.2-f;if(h.attr("class","tag-label-bkg").attr("points",` ${n-a/2-Yc/2},${p+Qu} ${n-a/2-Yc/2},${p-Qu} ${r.posWithOffset-a/2-Yc},${p-d-Qu} ${r.posWithOffset+a/2+Yc},${p-d-Qu} ${r.posWithOffset+a/2+Yc},${p+d+Qu} ${r.posWithOffset-a/2-Yc},${p+d+Qu}`),u.attr("cy",p).attr("cx",n-a/2+Yc/2).attr("r",1.5).attr("class","tag-hole"),Pr==="TB"||Pr==="BT"){let g=n+f;h.attr("class","tag-label-bkg").attr("points",` ${r.x},${g+2} ${r.x},${g-2} ${r.x+Bf},${g-d-2} ${r.x+Bf+a+4},${g-d-2} ${r.x+Bf+a+4},${g+d+2} ${r.x+Bf},${g+d+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("cx",r.x+Yc/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),l.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),Cqe=x(t=>{switch(t.customType??t.type){case dn.NORMAL:return"commit-normal";case dn.REVERSE:return"commit-reverse";case dn.HIGHLIGHT:return"commit-highlight";case dn.MERGE:return"commit-merge";case dn.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Aqe=x((t,e,r,n)=>{let i={x:0,y:0};if(t.parents.length>0){let a=Lpe(t.parents);if(a){let s=n.get(a)??i;return e==="TB"?s.y+Ff:e==="BT"?(n.get(t.id)??i).y-Ff:s.x+Ff}}else return e==="TB"?ZE:e==="BT"?(n.get(t.id)??i).y-Ff:0;return 0},"calculatePosition"),_qe=x((t,e,r)=>{let n=Pr==="BT"&&r?e:e+Bf,i=Pr==="TB"||Pr==="BT"?n:Gs.get(t.branch)?.pos,a=Pr==="TB"||Pr==="BT"?Gs.get(t.branch)?.pos:n;if(a===void 0||i===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:i,posWithOffset:n}},"getCommitPosition"),kpe=x((t,e,r)=>{if(!Jo)throw new Error("GitGraph config not found");let n=t.append("g").attr("class","commit-bullets"),i=t.append("g").attr("class","commit-labels"),a=Pr==="TB"||Pr==="BT"?ZE:0,s=[...e.keys()],o=Jo?.parallelCommits??!1,l=x((h,f)=>{let d=e.get(h)?.seq,p=e.get(f)?.seq;return d!==void 0&&p!==void 0?d-p:0},"sortKeys"),u=s.sort(l);Pr==="BT"&&(o&&yqe(u,e,a),u=u.reverse()),u.forEach(h=>{let f=e.get(h);if(!f)throw new Error(`Commit not found for key ${h}`);o&&(a=Aqe(f,Pr,a,Vs));let d=_qe(f,a,o);if(r){let p=Cqe(f),g=f.customType??f.type,m=Gs.get(f.branch)?.index??0;kqe(n,f,d,p,m,g),Eqe(i,f,d,a),Sqe(i,f,d,a)}Pr==="TB"||Pr==="BT"?Vs.set(f.id,{x:d.x,y:d.posWithOffset}):Vs.set(f.id,{x:d.posWithOffset,y:d.y}),a=Pr==="BT"&&o?a+Ff:a+Ff+Bf,a>Pf&&(Pf=a)})},"drawCommits"),Lqe=x((t,e,r,n,i)=>{let s=(Pr==="TB"||Pr==="BT"?r.xu.branch===s,"isOnBranchToGetCurve"),l=x(u=>u.seq>t.seq&&u.seql(u)&&o(u))},"shouldRerouteArrow"),Lb=x((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;if(r>5)return n;if(QE.every(s=>Math.abs(s-n)>=10))return QE.push(n),n;let a=Math.abs(t-e);return Lb(t,e-a/5,r+1)},"findLane"),Rqe=x((t,e,r,n)=>{let i=Vs.get(e.id),a=Vs.get(r.id);if(i===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);let s=Lqe(e,r,i,a,n),o="",l="",u=0,h=0,f=Gs.get(r.branch)?.index;r.type===dn.MERGE&&e.id!==r.parents[0]&&(f=Gs.get(e.branch)?.index);let d;if(s){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,h=10;let p=i.ya.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,r.type===dn.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${l} ${i.x-h} ${a.y} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${a.x+u} ${i.y} ${o} ${a.x} ${i.y+h} L ${a.x} ${a.y}`),i.x===a.x&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):Pr==="BT"?(i.xa.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,r.type===dn.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${o} ${i.x-h} ${a.y} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`),i.x===a.x&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.ya.y&&(r.type===dn.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${l} ${i.x+h} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+f%V0)},"drawArrow"),Iqe=x((t,e)=>{let r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(n=>{let i=e.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(a=>{Rqe(r,e.get(a),i,e)})})},"drawArrows"),Nqe=x((t,e)=>{let r=t.append("g");e.forEach((n,i)=>{let a=i%V0,s=Gs.get(n.name)?.pos;if(s===void 0)throw new Error(`Position not found for branch ${n.name}`);let o=r.append("line");o.attr("x1",0),o.attr("y1",s),o.attr("x2",Pf),o.attr("y2",s),o.attr("class","branch branch"+a),Pr==="TB"?(o.attr("y1",ZE),o.attr("x1",s),o.attr("y2",Pf),o.attr("x2",s)):Pr==="BT"&&(o.attr("y1",Pf),o.attr("x1",s),o.attr("y2",ZE),o.attr("x2",s)),QE.push(s);let l=n.name,u=_pe(l),h=r.insert("rect"),d=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);d.node().appendChild(u);let p=u.getBBox();h.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-p.width-4-(Jo?.rotateCommitLabel===!0?30:0)).attr("y",-p.height/2+8).attr("width",p.width+18).attr("height",p.height+4),d.attr("transform","translate("+(-p.width-14-(Jo?.rotateCommitLabel===!0?30:0))+", "+(s-p.height/2-1)+")"),Pr==="TB"?(h.attr("x",s-p.width/2-10).attr("y",0),d.attr("transform","translate("+(s-p.width/2-5)+", 0)")):Pr==="BT"?(h.attr("x",s-p.width/2-10).attr("y",Pf),d.attr("transform","translate("+(s-p.width/2-5)+", "+Pf+")")):h.attr("transform","translate(-19, "+(s-p.height/2)+")")})},"drawBranches"),Dqe=x(function(t,e,r,n,i){return Gs.set(t,{pos:e,index:r}),e+=50+(i?40:0)+(Pr==="TB"||Pr==="BT"?n.width/2:0),e},"setBranchPosition"),Mqe=x(function(t,e,r,n){if(mqe(),J.debug("in gitgraph renderer",t+` `,"id:",e,r),!Jo)throw new Error("GitGraph config not found");let i=Jo.rotateCommitLabel??!1,a=n.db;_b=a.getCommits();let s=a.getBranchesAsObjArray();Pr=a.getDirection();let o=He(`[id="${e}"]`),l=0;s.forEach((u,h)=>{let f=_pe(u.name),d=o.append("g"),p=d.insert("g").attr("class","branchLabel"),g=p.insert("g").attr("class","label branch-label");g.node()?.appendChild(f);let m=f.getBBox();l=Dqe(u.name,l,h,m,i),g.remove(),p.remove(),d.remove()}),kpe(o,_b,!1),Jo.showBranches&&Nqe(o,s),Iqe(o,_b),kpe(o,_b,!0),zt.insertTitle(o,"gitTitleText",Jo.titleTopMargin??0,a.getDiagramTitle()),y7(void 0,o,Jo.diagramPadding,Jo.useMaxWidth)},"draw"),Oqe={draw:Mqe},Pqe=x(t=>` .commit-id, .commit-msg, .branch-label { fill: lightgrey; color: lightgrey; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); } ${[0,1,2,3,4,5,6,7].map(e=>` .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; } .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; } .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; } .label${e} { fill: ${t["git"+e]}; } .arrow${e} { stroke: ${t["git"+e]}; } `).join(` `)} .branch { stroke-width: 1; stroke: ${t.lineColor}; stroke-dasharray: 2; } .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } .tag-hole { fill: ${t.textColor}; } .commit-merge { stroke: ${t.primaryColor}; fill: ${t.primaryColor}; } .commit-reverse { stroke: ${t.primaryColor}; fill: ${t.primaryColor}; stroke-width: 3; } .commit-highlight-outer { } .commit-highlight-inner { stroke: ${t.primaryColor}; fill: ${t.primaryColor}; } .arrow { stroke-width: 8; stroke-linecap: round; fill: none} .gitTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } `,"getStyles"),Bqe=Pqe,Fqe={parser:pqe,db:Ape,renderer:Oqe,styles:Bqe}});var Npe=ba((zO,GO)=>{(function(t,e){typeof zO=="object"&&typeof GO<"u"?GO.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=e()})(zO,function(){"use strict";var t="day";return function(e,r,n){var i=function(o){return o.add(4-o.isoWeekday(),t)},a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(o){if(!this.$utils().u(o))return this.add(7*(o-this.isoWeek()),t);var l,u,h,f,d=i(this),p=(l=this.isoWeekYear(),u=this.$u,h=(u?n.utc:n)().year(l).startOf("year"),f=4-h.isoWeekday(),h.isoWeekday()>4&&(f+=7),h.add(f,t));return d.diff(p,"week")+1},a.isoWeekday=function(o){return this.$utils().u(o)?this.day()||7:this.day(this.day()%7?o:o-7)};var s=a.startOf;a.startOf=function(o,l){var u=this.$utils(),h=!!u.u(l)||l;return u.p(o)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(o,l)}}})});var Dpe=ba((VO,UO)=>{(function(t,e){typeof VO=="object"&&typeof UO<"u"?UO.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(VO,function(){"use strict";var t={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"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},o=function(g){return(g=+g)+(g>68?1900:2e3)},l=function(g){return function(m){this[g]=+m}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(m){if(!m||m==="Z")return 0;var v=m.match(/([+-]|\d\d)/g),y=60*v[1]+(+v[2]||0);return y===0?0:v[0]==="+"?-y:y}(g)}],h=function(g){var m=s[g];return m&&(m.indexOf?m:m.s.concat(m.f))},f=function(g,m){var v,y=s.meridiem;if(y){for(var b=1;b<=24;b+=1)if(g.indexOf(y(b,0,m))>-1){v=b>12;break}}else v=g===(m?"pm":"PM");return v},d={A:[a,function(g){this.afternoon=f(g,!1)}],a:[a,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[n,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[n,l("day")],Do:[a,function(g){var m=s.ordinal,v=g.match(/\d+/);if(this.day=v[0],m)for(var y=1;y<=31;y+=1)m(y).replace(/\[|\]/g,"")===g&&(this.day=y)}],w:[i,l("week")],ww:[n,l("week")],M:[i,l("month")],MM:[n,l("month")],MMM:[a,function(g){var m=h("months"),v=(h("monthsShort")||m.map(function(y){return y.slice(0,3)})).indexOf(g)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[a,function(g){var m=h("months").indexOf(g)+1;if(m<1)throw new Error;this.month=m%12||m}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(g){this.year=o(g)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function p(g){var m,v;m=g,v=s&&s.formats;for(var y=(g=m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(C,I,M){var R=M&&M.toUpperCase();return I||v[M]||t[M]||v[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,L,_){return L||_.slice(1)})})).match(e),b=y.length,w=0;w-1)return new Date((N==="X"?1e3:1)*D);var B=p(N)(D),G=B.year,$=B.month,U=B.day,X=B.hours,ee=B.minutes,Y=B.seconds,oe=B.milliseconds,Q=B.zone,ue=B.week,re=new Date,te=U||(G||$?1:re.getDate()),Z=G||re.getFullYear(),j=0;G&&!$||(j=$>0?$-1:re.getMonth());var ae,K=X||0,de=ee||0,ne=Y||0,be=oe||0;return Q?new Date(Date.UTC(Z,j,te,K,de,ne,be+60*Q.offset*1e3)):O?new Date(Date.UTC(Z,j,te,K,de,ne,be)):(ae=new Date(Z,j,te,K,de,ne,be),ue&&(ae=P(ae).week(ue).toDate()),ae)}catch{return new Date("")}}(S,A,T,v),this.init(),R&&R!==!0&&(this.$L=this.locale(R).$L),M&&S!=this.format(A)&&(this.$d=new Date("")),s={}}else if(A instanceof Array)for(var k=A.length,L=1;L<=k;L+=1){E[1]=A[L-1];var _=v.apply(this,E);if(_.isValid()){this.$d=_.$d,this.$L=_.$L,this.init();break}L===k&&(this.$d=new Date(""))}else b.call(this,w)}}})});var Mpe=ba((qO,WO)=>{(function(t,e){typeof qO=="object"&&typeof WO<"u"?WO.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e()})(qO,function(){"use strict";return function(t,e){var r=e.prototype,n=r.format;r.format=function(i){var a=this,s=this.$locale();if(!this.isValid())return n.bind(this)(i);var o=this.$utils(),l=(i||"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(u){switch(u){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return s.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return s.ordinal(a.week(),"W");case"w":case"ww":return o.s(a.week(),u==="w"?1:2,"0");case"W":case"WW":return o.s(a.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return o.s(String(a.$H===0?24:a.$H),u==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return u}});return n.bind(this)(l)}}})});var Kpe={};hr(Kpe,{diagram:()=>_We});function aP(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let a="^\\s*"+i+"\\s*$",s=new RegExp(a);t[0].match(s)&&(e[i]=!0,t.shift(1),n=!0)})}var Fpe,uo,$pe,zpe,Gpe,rS,HO,$qe,Ope,Xc,KO,ZO,QO,Rb,Ib,JO,eP,nS,I1,tP,Vpe,rP,Nb,nP,iP,iS,YO,zqe,Gqe,Vqe,Uqe,qqe,Wqe,Hqe,Yqe,Xqe,jqe,Kqe,Zqe,Qqe,Jqe,eWe,tWe,rWe,nWe,iWe,aWe,sWe,oWe,lWe,Upe,cWe,uWe,hWe,qpe,fWe,XO,Wpe,Hpe,eS,R1,dWe,pWe,jO,tS,Ii,Ype,gWe,q0,mWe,Ppe,vWe,Xpe,yWe,jpe,xWe,bWe,wWe,TWe,Bpe,kWe,Ju,EWe,SWe,CWe,AWe,_We,Zpe=F(()=>{hn();vr();rr();Fpe=Fa(Np(),1),uo=Fa(i4(),1),$pe=Fa(Npe(),1),zpe=Fa(Dpe(),1),Gpe=Fa(Mpe(),1),rS=Fa(i4(),1);cr();HO=function(){var t=x(function(L,_,D,N){for(D=D||{},N=L.length;N--;D[L[N]]=_);return D},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],a=[1,29],s=[1,30],o=[1,31],l=[1,32],u=[1,33],h=[1,34],f=[1,9],d=[1,10],p=[1,11],g=[1,12],m=[1,13],v=[1,14],y=[1,15],b=[1,16],w=[1,19],S=[1,20],T=[1,21],E=[1,22],A=[1,23],C=[1,25],I=[1,35],M={trace:x(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:x(function(_,D,N,O,P,B,G){var $=B.length-1;switch(P){case 1:return B[$-1];case 2:this.$=[];break;case 3:B[$-1].push(B[$]),this.$=B[$-1];break;case 4:case 5:this.$=B[$];break;case 6:case 7:this.$=[];break;case 8:O.setWeekday("monday");break;case 9:O.setWeekday("tuesday");break;case 10:O.setWeekday("wednesday");break;case 11:O.setWeekday("thursday");break;case 12:O.setWeekday("friday");break;case 13:O.setWeekday("saturday");break;case 14:O.setWeekday("sunday");break;case 15:O.setWeekend("friday");break;case 16:O.setWeekend("saturday");break;case 17:O.setDateFormat(B[$].substr(11)),this.$=B[$].substr(11);break;case 18:O.enableInclusiveEndDates(),this.$=B[$].substr(18);break;case 19:O.TopAxis(),this.$=B[$].substr(8);break;case 20:O.setAxisFormat(B[$].substr(11)),this.$=B[$].substr(11);break;case 21:O.setTickInterval(B[$].substr(13)),this.$=B[$].substr(13);break;case 22:O.setExcludes(B[$].substr(9)),this.$=B[$].substr(9);break;case 23:O.setIncludes(B[$].substr(9)),this.$=B[$].substr(9);break;case 24:O.setTodayMarker(B[$].substr(12)),this.$=B[$].substr(12);break;case 27:O.setDiagramTitle(B[$].substr(6)),this.$=B[$].substr(6);break;case 28:this.$=B[$].trim(),O.setAccTitle(this.$);break;case 29:case 30:this.$=B[$].trim(),O.setAccDescription(this.$);break;case 31:O.addSection(B[$].substr(8)),this.$=B[$].substr(8);break;case 33:O.addTask(B[$-1],B[$]),this.$="task";break;case 34:this.$=B[$-1],O.setClickEvent(B[$-1],B[$],null);break;case 35:this.$=B[$-2],O.setClickEvent(B[$-2],B[$-1],B[$]);break;case 36:this.$=B[$-2],O.setClickEvent(B[$-2],B[$-1],null),O.setLink(B[$-2],B[$]);break;case 37:this.$=B[$-3],O.setClickEvent(B[$-3],B[$-2],B[$-1]),O.setLink(B[$-3],B[$]);break;case 38:this.$=B[$-2],O.setClickEvent(B[$-2],B[$],null),O.setLink(B[$-2],B[$-1]);break;case 39:this.$=B[$-3],O.setClickEvent(B[$-3],B[$-1],B[$]),O.setLink(B[$-3],B[$-2]);break;case 40:this.$=B[$-1],O.setLink(B[$-1],B[$]);break;case 41:case 47:this.$=B[$-1]+" "+B[$];break;case 42:case 43:case 45:this.$=B[$-2]+" "+B[$-1]+" "+B[$];break;case 44:case 46:this.$=B[$-3]+" "+B[$-2]+" "+B[$-1]+" "+B[$];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:g,26:m,27:v,28:y,29:b,30:w,31:S,33:T,35:E,36:A,37:24,38:C,40:I},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:g,26:m,27:v,28:y,29:b,30:w,31:S,33:T,35:E,36:A,37:24,38:C,40:I},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:x(function(_,D){if(D.recoverable)this.trace(_);else{var N=new Error(_);throw N.hash=D,N}},"parseError"),parse:x(function(_){var D=this,N=[0],O=[],P=[null],B=[],G=this.table,$="",U=0,X=0,ee=0,Y=2,oe=1,Q=B.slice.call(arguments,1),ue=Object.create(this.lexer),re={yy:{}};for(var te in this.yy)Object.prototype.hasOwnProperty.call(this.yy,te)&&(re.yy[te]=this.yy[te]);ue.setInput(_,re.yy),re.yy.lexer=ue,re.yy.parser=this,typeof ue.yylloc>"u"&&(ue.yylloc={});var Z=ue.yylloc;B.push(Z);var j=ue.options&&ue.options.ranges;typeof re.yy.parseError=="function"?this.parseError=re.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(Ce){N.length=N.length-2*Ce,P.length=P.length-Ce,B.length=B.length-Ce}x(ae,"popStack");function K(){var Ce;return Ce=O.pop()||ue.lex()||oe,typeof Ce!="number"&&(Ce instanceof Array&&(O=Ce,Ce=O.pop()),Ce=D.symbols_[Ce]||Ce),Ce}x(K,"lex");for(var de,ne,be,W,Ve,pe,Be={},Ye,qe,Le,Me;;){if(be=N[N.length-1],this.defaultActions[be]?W=this.defaultActions[be]:((de===null||typeof de>"u")&&(de=K()),W=G[be]&&G[be][de]),typeof W>"u"||!W.length||!W[0]){var Ne="";Me=[];for(Ye in G[be])this.terminals_[Ye]&&Ye>Y&&Me.push("'"+this.terminals_[Ye]+"'");ue.showPosition?Ne="Parse error on line "+(U+1)+`: `+ue.showPosition()+` Expecting `+Me.join(", ")+", got '"+(this.terminals_[de]||de)+"'":Ne="Parse error on line "+(U+1)+": Unexpected "+(de==oe?"end of input":"'"+(this.terminals_[de]||de)+"'"),this.parseError(Ne,{text:ue.match,token:this.terminals_[de]||de,line:ue.yylineno,loc:Z,expected:Me})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+be+", token: "+de);switch(W[0]){case 1:N.push(de),P.push(ue.yytext),B.push(ue.yylloc),N.push(W[1]),de=null,ne?(de=ne,ne=null):(X=ue.yyleng,$=ue.yytext,U=ue.yylineno,Z=ue.yylloc,ee>0&&ee--);break;case 2:if(qe=this.productions_[W[1]][1],Be.$=P[P.length-qe],Be._$={first_line:B[B.length-(qe||1)].first_line,last_line:B[B.length-1].last_line,first_column:B[B.length-(qe||1)].first_column,last_column:B[B.length-1].last_column},j&&(Be._$.range=[B[B.length-(qe||1)].range[0],B[B.length-1].range[1]]),pe=this.performAction.apply(Be,[$,X,U,re.yy,W[1],P,B].concat(Q)),typeof pe<"u")return pe;qe&&(N=N.slice(0,-1*qe*2),P=P.slice(0,-1*qe),B=B.slice(0,-1*qe)),N.push(this.productions_[W[1]][0]),P.push(Be.$),B.push(Be._$),Le=G[N[N.length-2]][N[N.length-1]],N.push(Le);break;case 3:return!0}}return!0},"parse")},R=function(){var L={EOF:1,parseError:x(function(D,N){if(this.yy.parser)this.yy.parser.parseError(D,N);else throw new Error(D)},"parseError"),setInput:x(function(_,D){return this.yy=D||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var D=_.match(/(?:\r\n?|\n).*/g);return D?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},"input"),unput:x(function(_){var D=_.length,N=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var O=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),N.length-1&&(this.yylineno-=N.length-1);var P=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:N?(N.length===O.length?this.yylloc.first_column:0)+O[O.length-N.length].length-N[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[P[0],P[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(_){this.unput(this.match.slice(_))},"less"),pastInput:x(function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var _=this.pastInput(),D=new Array(_.length+1).join("-");return _+this.upcomingInput()+` `+D+"^"},"showPosition"),test_match:x(function(_,D){var N,O,P;if(this.options.backtrack_lexer&&(P={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&&(P.yylloc.range=this.yylloc.range.slice(0))),O=_[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_[0].length),this.matched+=_[0],N=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var B in P)this[B]=P[B];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,D,N,O;this._more||(this.yytext="",this.match="");for(var P=this._currentRules(),B=0;BD[0].length)){if(D=N,O=B,this.options.backtrack_lexer){if(_=this.test_match(N,P[B]),_!==!1)return _;if(this._backtrack){D=!1;continue}else return!1}else if(!this.options.flex)break}return D?(_=this.test_match(D,P[O]),_!==!1?_:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var D=this.next();return D||this.lex()},"lex"),begin:x(function(D){this.conditionStack.push(D)},"begin"),popState:x(function(){var D=this.conditionStack.length-1;return D>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(D){return D=this.conditionStack.length-1-Math.abs(D||0),D>=0?this.conditionStack[D]:"INITIAL"},"topState"),pushState:x(function(D){this.begin(D)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(D,N,O,P){var B=P;switch(O){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return L}();M.lexer=R;function k(){this.yy={}}return x(k,"Parser"),k.prototype=M,M.Parser=k,new k}();HO.parser=HO;$qe=HO;uo.default.extend($pe.default);uo.default.extend(zpe.default);uo.default.extend(Gpe.default);Ope={friday:5,saturday:6},Xc="",KO="",ZO=void 0,QO="",Rb=[],Ib=[],JO=new Map,eP=[],nS=[],I1="",tP="",Vpe=["active","done","crit","milestone","vert"],rP=[],Nb=!1,nP=!1,iP="sunday",iS="saturday",YO=0,zqe=x(function(){eP=[],nS=[],I1="",rP=[],eS=0,jO=void 0,tS=void 0,Ii=[],Xc="",KO="",tP="",ZO=void 0,QO="",Rb=[],Ib=[],Nb=!1,nP=!1,YO=0,JO=new Map,mr(),iP="sunday",iS="saturday"},"clear"),Gqe=x(function(t){KO=t},"setAxisFormat"),Vqe=x(function(){return KO},"getAxisFormat"),Uqe=x(function(t){ZO=t},"setTickInterval"),qqe=x(function(){return ZO},"getTickInterval"),Wqe=x(function(t){QO=t},"setTodayMarker"),Hqe=x(function(){return QO},"getTodayMarker"),Yqe=x(function(t){Xc=t},"setDateFormat"),Xqe=x(function(){Nb=!0},"enableInclusiveEndDates"),jqe=x(function(){return Nb},"endDatesAreInclusive"),Kqe=x(function(){nP=!0},"enableTopAxis"),Zqe=x(function(){return nP},"topAxisEnabled"),Qqe=x(function(t){tP=t},"setDisplayMode"),Jqe=x(function(){return tP},"getDisplayMode"),eWe=x(function(){return Xc},"getDateFormat"),tWe=x(function(t){Rb=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),rWe=x(function(){return Rb},"getIncludes"),nWe=x(function(t){Ib=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),iWe=x(function(){return Ib},"getExcludes"),aWe=x(function(){return JO},"getLinks"),sWe=x(function(t){I1=t,eP.push(t)},"addSection"),oWe=x(function(){return eP},"getSections"),lWe=x(function(){let t=Ppe(),e=10,r=0;for(;!t&&r[\d\w- ]+)/.exec(r);if(i!==null){let s=null;for(let l of i.groups.ids.split(" ")){let u=q0(l);u!==void 0&&(!s||u.endTime>s.endTime)&&(s=u)}if(s)return s.endTime;let o=new Date;return o.setHours(0,0,0,0),o}let a=(0,uo.default)(r,e.trim(),!0);if(a.isValid())return a.toDate();{J.debug("Invalid date:"+r),J.debug("With date format:"+e.trim());let s=new Date(r);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+r);return s}},"getStartDate"),Wpe=x(function(t){let e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),Hpe=x(function(t,e,r,n=!1){r=r.trim();let a=/^until\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let h=null;for(let d of a.groups.ids.split(" ")){let p=q0(d);p!==void 0&&(!h||p.startTime{window.open(r,"_self")}),JO.set(n,r))}),Xpe(t,"clickable")},"setLink"),Xpe=x(function(t,e){t.split(",").forEach(function(r){let n=q0(r);n!==void 0&&n.classes.push(e)})},"setClass"),yWe=x(function(t,e,r){if(we().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{zt.runFunc(e,...n)})},"setClickFun"),jpe=x(function(t,e){rP.push(function(){let r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){let r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},"pushFun"),xWe=x(function(t,e,r){t.split(",").forEach(function(n){yWe(n,e,r)}),Xpe(t,"clickable")},"setClickEvent"),bWe=x(function(t){rP.forEach(function(e){e(t)})},"bindFunctions"),wWe={getConfig:x(()=>we().gantt,"getConfig"),clear:zqe,setDateFormat:Yqe,getDateFormat:eWe,enableInclusiveEndDates:Xqe,endDatesAreInclusive:jqe,enableTopAxis:Kqe,topAxisEnabled:Zqe,setAxisFormat:Gqe,getAxisFormat:Vqe,setTickInterval:Uqe,getTickInterval:qqe,setTodayMarker:Wqe,getTodayMarker:Hqe,setAccTitle:Er,getAccTitle:Cr,setDiagramTitle:Dr,getDiagramTitle:Lr,setDisplayMode:Qqe,getDisplayMode:Jqe,setAccDescription:Ar,getAccDescription:_r,addSection:sWe,getSections:oWe,getTasks:lWe,addTask:gWe,findTaskById:q0,addTaskOrg:mWe,setIncludes:tWe,getIncludes:rWe,setExcludes:nWe,getExcludes:iWe,setClickEvent:xWe,setLink:vWe,getLinks:aWe,bindFunctions:bWe,parseDuration:Wpe,isInvalidDate:Upe,setWeekday:cWe,getWeekday:uWe,setWeekend:hWe};x(aP,"getTaskTags");TWe=x(function(){J.debug("Something is calling, setConf, remove the call")},"setConf"),Bpe={monday:wh,tuesday:V3,wednesday:U3,thursday:rc,friday:q3,saturday:W3,sunday:hl},kWe=x((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),i=0;for(let a of n)for(let s=0;s=r[s]){r[s]=a.endTime,a.order=s+e,s>i&&(i=s);break}return i},"getMaxIntersections"),EWe=x(function(t,e,r,n){let i=we().gantt,a=we().securityLevel,s;a==="sandbox"&&(s=He("#i"+e));let o=a==="sandbox"?He(s.nodes()[0].contentDocument.body):He("body"),l=a==="sandbox"?s.nodes()[0].contentDocument:document,u=l.getElementById(e);Ju=u.parentElement.offsetWidth,Ju===void 0&&(Ju=1200),i.useWidth!==void 0&&(Ju=i.useWidth);let h=n.db.getTasks(),f=[];for(let C of h)f.push(C.type);f=A(f);let d={},p=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let C={};for(let M of h)C[M.section]===void 0?C[M.section]=[M]:C[M.section].push(M);let I=0;for(let M of Object.keys(C)){let R=kWe(C[M],I)+1;I+=R,p+=R*(i.barHeight+i.barGap),d[M]=R}}else{p+=h.length*(i.barHeight+i.barGap);for(let C of f)d[C]=h.filter(I=>I.type===C).length}u.setAttribute("viewBox","0 0 "+Ju+" "+p);let g=o.select(`[id="${e}"]`),m=X3().domain([t3(h,function(C){return C.startTime}),e3(h,function(C){return C.endTime})]).rangeRound([0,Ju-i.leftPadding-i.rightPadding]);function v(C,I){let M=C.startTime,R=I.startTime,k=0;return M>R?k=1:MG.vert===$.vert?0:G.vert?1:-1);let N=[...new Set(C.map(G=>G.order))].map(G=>C.find($=>$.order===G));g.append("g").selectAll("rect").data(N).enter().append("rect").attr("x",0).attr("y",function(G,$){return $=G.order,$*I+M-2}).attr("width",function(){return _-i.rightPadding/2}).attr("height",I).attr("class",function(G){for(let[$,U]of f.entries())if(G.type===U)return"section section"+$%i.numberSectionStyles;return"section section0"}).enter();let O=g.append("g").selectAll("rect").data(C).enter(),P=n.db.getLinks();if(O.append("rect").attr("id",function(G){return G.id}).attr("rx",3).attr("ry",3).attr("x",function(G){return G.milestone?m(G.startTime)+R+.5*(m(G.endTime)-m(G.startTime))-.5*k:m(G.startTime)+R}).attr("y",function(G,$){return $=G.order,G.vert?i.gridLineStartPadding:$*I+M}).attr("width",function(G){return G.milestone?k:G.vert?.08*k:m(G.renderEndTime||G.endTime)-m(G.startTime)}).attr("height",function(G){return G.vert?h.length*(i.barHeight+i.barGap)+i.barHeight*2:k}).attr("transform-origin",function(G,$){return $=G.order,(m(G.startTime)+R+.5*(m(G.endTime)-m(G.startTime))).toString()+"px "+($*I+M+.5*k).toString()+"px"}).attr("class",function(G){let $="task",U="";G.classes.length>0&&(U=G.classes.join(" "));let X=0;for(let[Y,oe]of f.entries())G.type===oe&&(X=Y%i.numberSectionStyles);let ee="";return G.active?G.crit?ee+=" activeCrit":ee=" active":G.done?G.crit?ee=" doneCrit":ee=" done":G.crit&&(ee+=" crit"),ee.length===0&&(ee=" task"),G.milestone&&(ee=" milestone "+ee),G.vert&&(ee=" vert "+ee),ee+=X,ee+=" "+U,$+ee}),O.append("text").attr("id",function(G){return G.id+"-text"}).text(function(G){return G.task}).attr("font-size",i.fontSize).attr("x",function(G){let $=m(G.startTime),U=m(G.renderEndTime||G.endTime);if(G.milestone&&($+=.5*(m(G.endTime)-m(G.startTime))-.5*k,U=$+k),G.vert)return m(G.startTime)+R;let X=this.getBBox().width;return X>U-$?U+X+1.5*i.leftPadding>_?$+R-5:U+R+5:(U-$)/2+$+R}).attr("y",function(G,$){return G.vert?i.gridLineStartPadding+h.length*(i.barHeight+i.barGap)+60:($=G.order,$*I+i.barHeight/2+(i.fontSize/2-2)+M)}).attr("text-height",k).attr("class",function(G){let $=m(G.startTime),U=m(G.endTime);G.milestone&&(U=$+k);let X=this.getBBox().width,ee="";G.classes.length>0&&(ee=G.classes.join(" "));let Y=0;for(let[Q,ue]of f.entries())G.type===ue&&(Y=Q%i.numberSectionStyles);let oe="";return G.active&&(G.crit?oe="activeCritText"+Y:oe="activeText"+Y),G.done?G.crit?oe=oe+" doneCritText"+Y:oe=oe+" doneText"+Y:G.crit&&(oe=oe+" critText"+Y),G.milestone&&(oe+=" milestoneText"),G.vert&&(oe+=" vertText"),X>U-$?U+X+1.5*i.leftPadding>_?ee+" taskTextOutsideLeft taskTextOutside"+Y+" "+oe:ee+" taskTextOutsideRight taskTextOutside"+Y+" "+oe+" width-"+X:ee+" taskText taskText"+Y+" "+oe+" width-"+X}),we().securityLevel==="sandbox"){let G;G=He("#i"+e);let $=G.nodes()[0].contentDocument;O.filter(function(U){return P.has(U.id)}).each(function(U){var X=$.querySelector("#"+U.id),ee=$.querySelector("#"+U.id+"-text");let Y=X.parentNode;var oe=$.createElement("a");oe.setAttribute("xlink:href",P.get(U.id)),oe.setAttribute("target","_top"),Y.appendChild(oe),oe.appendChild(X),oe.appendChild(ee)})}}x(b,"drawRects");function w(C,I,M,R,k,L,_,D){if(_.length===0&&D.length===0)return;let N,O;for(let{startTime:X,endTime:ee}of L)(N===void 0||XO)&&(O=ee);if(!N||!O)return;if((0,rS.default)(O).diff((0,rS.default)(N),"year")>5){J.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let P=n.db.getDateFormat(),B=[],G=null,$=(0,rS.default)(N);for(;$.valueOf()<=O;)n.db.isInvalidDate($,P,_,D)?G?G.end=$:G={start:$,end:$}:G&&(B.push(G),G=null),$=$.add(1,"d");g.append("g").selectAll("rect").data(B).enter().append("rect").attr("id",X=>"exclude-"+X.start.format("YYYY-MM-DD")).attr("x",X=>m(X.start.startOf("day"))+M).attr("y",i.gridLineStartPadding).attr("width",X=>m(X.end.endOf("day"))-m(X.start.startOf("day"))).attr("height",k-I-i.gridLineStartPadding).attr("transform-origin",function(X,ee){return(m(X.start)+M+.5*(m(X.end)-m(X.start))).toString()+"px "+(ee*C+.5*k).toString()+"px"}).attr("class","exclude-range")}x(w,"drawExcludeDays");function S(C,I,M,R){let k=n.db.getDateFormat(),L=n.db.getAxisFormat(),_;L?_=L:k==="D"?_="%d":_=i.axisFormat??"%Y-%m-%d";let D=A7(m).tickSize(-R+I+i.gridLineStartPadding).tickFormat(wd(_)),O=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(O!==null){let P=O[1],B=O[2],G=n.db.getWeekday()||i.weekday;switch(B){case"millisecond":D.ticks(ec.every(P));break;case"second":D.ticks(Xs.every(P));break;case"minute":D.ticks(mu.every(P));break;case"hour":D.ticks(vu.every(P));break;case"day":D.ticks(wo.every(P));break;case"week":D.ticks(Bpe[G].every(P));break;case"month":D.ticks(yu.every(P));break}}if(g.append("g").attr("class","grid").attr("transform","translate("+C+", "+(R-50)+")").call(D).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let P=C7(m).tickSize(-R+I+i.gridLineStartPadding).tickFormat(wd(_));if(O!==null){let B=O[1],G=O[2],$=n.db.getWeekday()||i.weekday;switch(G){case"millisecond":P.ticks(ec.every(B));break;case"second":P.ticks(Xs.every(B));break;case"minute":P.ticks(mu.every(B));break;case"hour":P.ticks(vu.every(B));break;case"day":P.ticks(wo.every(B));break;case"week":P.ticks(Bpe[$].every(B));break;case"month":P.ticks(yu.every(B));break}}g.append("g").attr("class","grid").attr("transform","translate("+C+", "+I+")").call(P).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}x(S,"makeGrid");function T(C,I){let M=0,R=Object.keys(d).map(k=>[k,d[k]]);g.append("g").selectAll("text").data(R).enter().append(function(k){let L=k[0].split(Je.lineBreakRegex),_=-(L.length-1)/2,D=l.createElementNS("http://www.w3.org/2000/svg","text");D.setAttribute("dy",_+"em");for(let[N,O]of L.entries()){let P=l.createElementNS("http://www.w3.org/2000/svg","tspan");P.setAttribute("alignment-baseline","central"),P.setAttribute("x","10"),N>0&&P.setAttribute("dy","1em"),P.textContent=O,D.appendChild(P)}return D}).attr("x",10).attr("y",function(k,L){if(L>0)for(let _=0;_` .mermaid-main-font { font-family: ${t.fontFamily}; } .exclude-range { fill: ${t.excludeBkgColor}; } .section { stroke: none; opacity: 0.2; } .section0 { fill: ${t.sectionBkgColor}; } .section2 { fill: ${t.sectionBkgColor2}; } .section1, .section3 { fill: ${t.altSectionBkgColor}; opacity: 0.2; } .sectionTitle0 { fill: ${t.titleColor}; } .sectionTitle1 { fill: ${t.titleColor}; } .sectionTitle2 { fill: ${t.titleColor}; } .sectionTitle3 { fill: ${t.titleColor}; } .sectionTitle { text-anchor: start; font-family: ${t.fontFamily}; } /* Grid and axis */ .grid .tick { stroke: ${t.gridColor}; opacity: 0.8; shape-rendering: crispEdges; } .grid .tick text { font-family: ${t.fontFamily}; fill: ${t.textColor}; } .grid path { stroke-width: 0; } /* Today line */ .today { fill: none; stroke: ${t.todayLineColor}; stroke-width: 2px; } /* Task styling */ /* Default task */ .task { stroke-width: 2; } .taskText { text-anchor: middle; font-family: ${t.fontFamily}; } .taskTextOutsideRight { fill: ${t.taskTextDarkColor}; text-anchor: start; font-family: ${t.fontFamily}; } .taskTextOutsideLeft { fill: ${t.taskTextDarkColor}; text-anchor: end; } /* Special case clickable */ .task.clickable { cursor: pointer; } .taskText.clickable { cursor: pointer; fill: ${t.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideLeft.clickable { cursor: pointer; fill: ${t.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideRight.clickable { cursor: pointer; fill: ${t.taskTextClickableColor} !important; font-weight: bold; } /* Specific task settings for the sections*/ .taskText0, .taskText1, .taskText2, .taskText3 { fill: ${t.taskTextColor}; } .task0, .task1, .task2, .task3 { fill: ${t.taskBkgColor}; stroke: ${t.taskBorderColor}; } .taskTextOutside0, .taskTextOutside2 { fill: ${t.taskTextOutsideColor}; } .taskTextOutside1, .taskTextOutside3 { fill: ${t.taskTextOutsideColor}; } /* Active task */ .active0, .active1, .active2, .active3 { fill: ${t.activeTaskBkgColor}; stroke: ${t.activeTaskBorderColor}; } .activeText0, .activeText1, .activeText2, .activeText3 { fill: ${t.taskTextDarkColor} !important; } /* Completed task */ .done0, .done1, .done2, .done3 { stroke: ${t.doneTaskBorderColor}; fill: ${t.doneTaskBkgColor}; stroke-width: 2; } .doneText0, .doneText1, .doneText2, .doneText3 { fill: ${t.taskTextDarkColor} !important; } /* Tasks on the critical line */ .crit0, .crit1, .crit2, .crit3 { stroke: ${t.critBorderColor}; fill: ${t.critBkgColor}; stroke-width: 2; } .activeCrit0, .activeCrit1, .activeCrit2, .activeCrit3 { stroke: ${t.critBorderColor}; fill: ${t.activeTaskBkgColor}; stroke-width: 2; } .doneCrit0, .doneCrit1, .doneCrit2, .doneCrit3 { stroke: ${t.critBorderColor}; fill: ${t.doneTaskBkgColor}; stroke-width: 2; cursor: pointer; shape-rendering: crispEdges; } .milestone { transform: rotate(45deg) scale(0.8,0.8); } .milestoneText { font-style: italic; } .doneCritText0, .doneCritText1, .doneCritText2, .doneCritText3 { fill: ${t.taskTextDarkColor} !important; } .vert { stroke: ${t.vertLineColor}; } .vertText { font-size: 15px; text-anchor: middle; fill: ${t.vertLineColor} !important; } .activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3 { fill: ${t.taskTextDarkColor} !important; } .titleText { text-anchor: middle; font-size: 18px; fill: ${t.titleColor||t.textColor}; font-family: ${t.fontFamily}; } `,"getStyles"),AWe=CWe,_We={parser:$qe,db:wWe,renderer:SWe,styles:AWe}});var Qpe={};hr(Qpe,{diagram:()=>OWe});var LWe,RWe,IWe,NWe,DWe,MWe,OWe,Jpe=F(()=>{JS();ac();vr();rr();Of();LWe={parse:x(async t=>{let e=await ds("info",t);J.debug(e)},"parse")},RWe={version:Y1.version+""},IWe=x(()=>RWe.version,"getVersion"),NWe={getVersion:IWe},DWe=x((t,e,r)=>{J.debug(`rendering info diagram `+t);let n=Bi(e);un(n,100,400,!0),n.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"),MWe={draw:DWe},OWe={parser:LWe,db:NWe,renderer:MWe}});var rge={};hr(rge,{diagram:()=>KWe});var ege,sP,aS,oP,PWe,BWe,FWe,$We,zWe,GWe,VWe,tge,UWe,qWe,WWe,HWe,YWe,XWe,jWe,KWe,nge=F(()=>{ac();f0();hn();vr();rr();Of();cr();ege=sr.pie,sP={sections:new Map,showData:!1,config:ege},aS=sP.sections,oP=sP.showData,PWe=structuredClone(ege),BWe=x(()=>structuredClone(PWe),"getConfig"),FWe=x(()=>{aS=new Map,oP=sP.showData,mr()},"clear"),$We=x(({label:t,value:e})=>{if(e<0)throw new Error(`"${t}" has invalid value: ${e}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);aS.has(t)||(aS.set(t,e),J.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),zWe=x(()=>aS,"getSections"),GWe=x(t=>{oP=t},"setShowData"),VWe=x(()=>oP,"getShowData"),tge={getConfig:BWe,clear:FWe,setDiagramTitle:Dr,getDiagramTitle:Lr,setAccTitle:Er,getAccTitle:Cr,setAccDescription:Ar,getAccDescription:_r,addSection:$We,getSections:zWe,setShowData:GWe,getShowData:VWe},UWe=x((t,e)=>{io(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),qWe={parse:x(async t=>{let e=await ds("pie",t);J.debug(e),UWe(e,tge)},"parse")},WWe=x(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; opacity : ${t.pieOpacity}; } .pieOuterCircle{ stroke: ${t.pieOuterStrokeColor}; stroke-width: ${t.pieOuterStrokeWidth}; fill: none; } .pieTitleText { text-anchor: middle; font-size: ${t.pieTitleTextSize}; fill: ${t.pieTitleTextColor}; font-family: ${t.fontFamily}; } .slice { font-family: ${t.fontFamily}; fill: ${t.pieSectionTextColor}; font-size:${t.pieSectionTextSize}; // fill: white; } .legend text { fill: ${t.pieLegendTextColor}; font-family: ${t.fontFamily}; font-size: ${t.pieLegendTextSize}; } `,"getStyles"),HWe=WWe,YWe=x(t=>{let e=[...t.values()].reduce((i,a)=>i+a,0),r=[...t.entries()].map(([i,a])=>({label:i,value:a})).filter(i=>i.value/e*100>=1).sort((i,a)=>a.value-i.value);return s8().value(i=>i.value)(r)},"createPieArcs"),XWe=x((t,e,r,n)=>{J.debug(`rendering pie chart `+t);let i=n.db,a=we(),s=Qn(i.getConfig(),a.pie),o=40,l=18,u=4,h=450,f=h,d=Bi(e),p=d.append("g");p.attr("transform","translate("+f/2+","+h/2+")");let{themeVariables:g}=a,[m]=fc(g.pieOuterStrokeWidth);m??=2;let v=s.textPosition,y=Math.min(f,h)/2-o,b=nc().innerRadius(0).outerRadius(y),w=nc().innerRadius(y*v).outerRadius(y*v);p.append("circle").attr("cx",0).attr("cy",0).attr("r",y+m/2).attr("class","pieOuterCircle");let S=i.getSections(),T=YWe(S),E=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],A=0;S.forEach(_=>{A+=_});let C=T.filter(_=>(_.data.value/A*100).toFixed(0)!=="0"),I=Ys(E);p.selectAll("mySlices").data(C).enter().append("path").attr("d",b).attr("fill",_=>I(_.data.label)).attr("class","pieCircle"),p.selectAll("mySlices").data(C).enter().append("text").text(_=>(_.data.value/A*100).toFixed(0)+"%").attr("transform",_=>"translate("+w.centroid(_)+")").style("text-anchor","middle").attr("class","slice"),p.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(h-50)/2).attr("class","pieTitleText");let M=[...S.entries()].map(([_,D])=>({label:_,value:D})),R=p.selectAll(".legend").data(M).enter().append("g").attr("class","legend").attr("transform",(_,D)=>{let N=l+u,O=N*M.length/2,P=12*l,B=D*N-O;return"translate("+P+","+B+")"});R.append("rect").attr("width",l).attr("height",l).style("fill",_=>I(_.label)).style("stroke",_=>I(_.label)),R.append("text").attr("x",l+u).attr("y",l-u).text(_=>i.getShowData()?`${_.label} [${_.value}]`:_.label);let k=Math.max(...R.selectAll("text").nodes().map(_=>_?.getBoundingClientRect().width??0)),L=f+o+l+u+k;d.attr("viewBox",`0 0 ${L} ${h}`),un(d,h,L,s.useMaxWidth)},"draw"),jWe={draw:XWe},KWe={parser:qWe,db:tge,renderer:jWe,styles:HWe}});var xge={};hr(xge,{diagram:()=>iHe});function cP(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function ige(t){return!/^\d+$/.test(t)}function age(t){return!/^\d+px$/.test(t)}function jc(t){return ar(t.trim(),JWe)}function sge(t){ya.setData({quadrant1Text:jc(t.text)})}function oge(t){ya.setData({quadrant2Text:jc(t.text)})}function lge(t){ya.setData({quadrant3Text:jc(t.text)})}function cge(t){ya.setData({quadrant4Text:jc(t.text)})}function uge(t){ya.setData({xAxisLeftText:jc(t.text)})}function hge(t){ya.setData({xAxisRightText:jc(t.text)})}function fge(t){ya.setData({yAxisTopText:jc(t.text)})}function dge(t){ya.setData({yAxisBottomText:jc(t.text)})}function oS(t){let e={};for(let r of t){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(ige(i))throw new sS(n,i,"number");e.radius=parseInt(i)}else if(n==="color"){if(cP(i))throw new sS(n,i,"hex code");e.color=i}else if(n==="stroke-color"){if(cP(i))throw new sS(n,i,"hex code");e.strokeColor=i}else if(n==="stroke-width"){if(age(i))throw new sS(n,i,"number of pixels (eg. 10px)");e.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return e}function pge(t,e,r,n,i){let a=oS(i);ya.addPoints([{x:r,y:n,text:jc(t.text),className:e,...a}])}function gge(t,e){ya.addClass(t,oS(e))}function mge(t){ya.setConfig({chartWidth:t})}function vge(t){ya.setConfig({chartHeight:t})}function yge(){let t=we(),{themeVariables:e,quadrantChart:r}=t;return r&&ya.setConfig(r),ya.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),ya.setData({titleText:Lr()}),ya.build()}var lP,ZWe,ps,QWe,sS,JWe,ya,eHe,tHe,rHe,nHe,iHe,bge=F(()=>{vr();rr();cr();cr();lP=function(){var t=x(function(he,z,se,le){for(se=se||{},le=he.length;le--;se[he[le]]=z);return se},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[1,7],s=[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],o=[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],l=[55,56,57],u=[2,36],h=[1,37],f=[1,36],d=[1,38],p=[1,35],g=[1,43],m=[1,41],v=[1,14],y=[1,23],b=[1,18],w=[1,19],S=[1,20],T=[1,21],E=[1,22],A=[1,24],C=[1,25],I=[1,26],M=[1,27],R=[1,28],k=[1,29],L=[1,32],_=[1,33],D=[1,34],N=[1,39],O=[1,40],P=[1,42],B=[1,44],G=[1,62],$=[1,61],U=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],X=[1,65],ee=[1,66],Y=[1,67],oe=[1,68],Q=[1,69],ue=[1,70],re=[1,71],te=[1,72],Z=[1,73],j=[1,74],ae=[1,75],K=[1,76],de=[4,5,6,7,8,9,10,11,12,13,14,15,18],ne=[1,90],be=[1,91],W=[1,92],Ve=[1,99],pe=[1,93],Be=[1,96],Ye=[1,94],qe=[1,95],Le=[1,97],Me=[1,98],Ne=[1,102],Ce=[10,55,56,57],Fe=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],fe={trace:x(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:x(function(z,se,le,ke,ve,me,Ie){var _e=me.length-1;switch(ve){case 23:this.$=me[_e];break;case 24:this.$=me[_e-1]+""+me[_e];break;case 26:this.$=me[_e-1]+me[_e];break;case 27:this.$=[me[_e].trim()];break;case 28:me[_e-2].push(me[_e].trim()),this.$=me[_e-2];break;case 29:this.$=me[_e-4],ke.addClass(me[_e-2],me[_e]);break;case 37:this.$=[];break;case 42:this.$=me[_e].trim(),ke.setDiagramTitle(this.$);break;case 43:this.$=me[_e].trim(),ke.setAccTitle(this.$);break;case 44:case 45:this.$=me[_e].trim(),ke.setAccDescription(this.$);break;case 46:ke.addSection(me[_e].substr(8)),this.$=me[_e].substr(8);break;case 47:ke.addPoint(me[_e-3],"",me[_e-1],me[_e],[]);break;case 48:ke.addPoint(me[_e-4],me[_e-3],me[_e-1],me[_e],[]);break;case 49:ke.addPoint(me[_e-4],"",me[_e-2],me[_e-1],me[_e]);break;case 50:ke.addPoint(me[_e-5],me[_e-4],me[_e-2],me[_e-1],me[_e]);break;case 51:ke.setXAxisLeftText(me[_e-2]),ke.setXAxisRightText(me[_e]);break;case 52:me[_e-1].text+=" \u27F6 ",ke.setXAxisLeftText(me[_e-1]);break;case 53:ke.setXAxisLeftText(me[_e]);break;case 54:ke.setYAxisBottomText(me[_e-2]),ke.setYAxisTopText(me[_e]);break;case 55:me[_e-1].text+=" \u27F6 ",ke.setYAxisBottomText(me[_e-1]);break;case 56:ke.setYAxisBottomText(me[_e]);break;case 57:ke.setQuadrant1Text(me[_e]);break;case 58:ke.setQuadrant2Text(me[_e]);break;case 59:ke.setQuadrant3Text(me[_e]);break;case 60:ke.setQuadrant4Text(me[_e]);break;case 64:this.$={text:me[_e],type:"text"};break;case 65:this.$={text:me[_e-1].text+""+me[_e],type:me[_e-1].type};break;case 66:this.$={text:me[_e],type:"text"};break;case 67:this.$={text:me[_e],type:"markdown"};break;case 68:this.$=me[_e];break;case 69:this.$=me[_e-1]+""+me[_e];break}},"anonymous"),table:[{18:e,26:1,27:2,28:r,55:n,56:i,57:a},{1:[3]},{18:e,26:8,27:2,28:r,55:n,56:i,57:a},{18:e,26:9,27:2,28:r,55:n,56:i,57:a},t(s,[2,33],{29:10}),t(o,[2,61]),t(o,[2,62]),t(o,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:h,5:f,10:d,12:p,13:g,14:m,18:v,25:y,35:b,37:w,39:S,41:T,42:E,48:A,50:C,51:I,52:M,53:R,54:k,60:L,61:_,63:D,64:N,65:O,66:P,67:B}),t(s,[2,34]),{27:45,55:n,56:i,57:a},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:h,5:f,10:d,12:p,13:g,14:m,18:v,25:y,35:b,37:w,39:S,41:T,42:E,48:A,50:C,51:I,52:M,53:R,54:k,60:L,61:_,63:D,64:N,65:O,66:P,67:B}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(l,[2,45]),t(l,[2,46]),{18:[1,50]},{4:h,5:f,10:d,12:p,13:g,14:m,43:51,58:31,60:L,61:_,63:D,64:N,65:O,66:P,67:B},{4:h,5:f,10:d,12:p,13:g,14:m,43:52,58:31,60:L,61:_,63:D,64:N,65:O,66:P,67:B},{4:h,5:f,10:d,12:p,13:g,14:m,43:53,58:31,60:L,61:_,63:D,64:N,65:O,66:P,67:B},{4:h,5:f,10:d,12:p,13:g,14:m,43:54,58:31,60:L,61:_,63:D,64:N,65:O,66:P,67:B},{4:h,5:f,10:d,12:p,13:g,14:m,43:55,58:31,60:L,61:_,63:D,64:N,65:O,66:P,67:B},{4:h,5:f,10:d,12:p,13:g,14:m,43:56,58:31,60:L,61:_,63:D,64:N,65:O,66:P,67:B},{4:h,5:f,8:G,10:d,12:p,13:g,14:m,18:$,44:[1,57],47:[1,58],58:60,59:59,63:D,64:N,65:O,66:P,67:B},t(U,[2,64]),t(U,[2,66]),t(U,[2,67]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(U,[2,79]),t(U,[2,80]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:64,4:X,5:ee,6:Y,7:oe,8:Q,9:ue,10:re,11:te,12:Z,13:j,14:ae,15:K,21:63},t(l,[2,53],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:g,14:m,18:$,49:[1,77],63:D,64:N,65:O,66:P,67:B}),t(l,[2,56],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:g,14:m,18:$,49:[1,78],63:D,64:N,65:O,66:P,67:B}),t(l,[2,57],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:g,14:m,18:$,63:D,64:N,65:O,66:P,67:B}),t(l,[2,58],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:g,14:m,18:$,63:D,64:N,65:O,66:P,67:B}),t(l,[2,59],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:g,14:m,18:$,63:D,64:N,65:O,66:P,67:B}),t(l,[2,60],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:g,14:m,18:$,63:D,64:N,65:O,66:P,67:B}),{45:[1,79]},{44:[1,80]},t(U,[2,65]),t(U,[2,81]),t(U,[2,82]),t(U,[2,83]),{3:82,4:X,5:ee,6:Y,7:oe,8:Q,9:ue,10:re,11:te,12:Z,13:j,14:ae,15:K,18:[1,81]},t(de,[2,23]),t(de,[2,1]),t(de,[2,2]),t(de,[2,3]),t(de,[2,4]),t(de,[2,5]),t(de,[2,6]),t(de,[2,7]),t(de,[2,8]),t(de,[2,9]),t(de,[2,10]),t(de,[2,11]),t(de,[2,12]),t(l,[2,52],{58:31,43:83,4:h,5:f,10:d,12:p,13:g,14:m,60:L,61:_,63:D,64:N,65:O,66:P,67:B}),t(l,[2,55],{58:31,43:84,4:h,5:f,10:d,12:p,13:g,14:m,60:L,61:_,63:D,64:N,65:O,66:P,67:B}),{46:[1,85]},{45:[1,86]},{4:ne,5:be,6:W,8:Ve,11:pe,13:Be,16:89,17:Ye,18:qe,19:Le,20:Me,22:88,23:87},t(de,[2,24]),t(l,[2,51],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:g,14:m,18:$,63:D,64:N,65:O,66:P,67:B}),t(l,[2,54],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:g,14:m,18:$,63:D,64:N,65:O,66:P,67:B}),t(l,[2,47],{22:88,16:89,23:100,4:ne,5:be,6:W,8:Ve,11:pe,13:Be,17:Ye,18:qe,19:Le,20:Me}),{46:[1,101]},t(l,[2,29],{10:Ne}),t(Ce,[2,27],{16:103,4:ne,5:be,6:W,8:Ve,11:pe,13:Be,17:Ye,18:qe,19:Le,20:Me}),t(Fe,[2,25]),t(Fe,[2,13]),t(Fe,[2,14]),t(Fe,[2,15]),t(Fe,[2,16]),t(Fe,[2,17]),t(Fe,[2,18]),t(Fe,[2,19]),t(Fe,[2,20]),t(Fe,[2,21]),t(Fe,[2,22]),t(l,[2,49],{10:Ne}),t(l,[2,48],{22:88,16:89,23:104,4:ne,5:be,6:W,8:Ve,11:pe,13:Be,17:Ye,18:qe,19:Le,20:Me}),{4:ne,5:be,6:W,8:Ve,11:pe,13:Be,16:89,17:Ye,18:qe,19:Le,20:Me,22:105},t(Fe,[2,26]),t(l,[2,50],{10:Ne}),t(Ce,[2,28],{16:103,4:ne,5:be,6:W,8:Ve,11:pe,13:Be,17:Ye,18:qe,19:Le,20:Me})],defaultActions:{8:[2,30],9:[2,31]},parseError:x(function(z,se){if(se.recoverable)this.trace(z);else{var le=new Error(z);throw le.hash=se,le}},"parseError"),parse:x(function(z){var se=this,le=[0],ke=[],ve=[null],me=[],Ie=this.table,_e="",ze=0,Xe=0,ft=0,We=2,Oe=1,Ke=me.slice.call(arguments,1),Ue=Object.create(this.lexer),nt={yy:{}};for(var Dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Dt)&&(nt.yy[Dt]=this.yy[Dt]);Ue.setInput(z,nt.yy),nt.yy.lexer=Ue,nt.yy.parser=this,typeof Ue.yylloc>"u"&&(Ue.yylloc={});var ut=Ue.yylloc;me.push(ut);var kt=Ue.options&&Ue.options.ranges;typeof nt.yy.parseError=="function"?this.parseError=nt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ot(Se){le.length=le.length-2*Se,ve.length=ve.length-Se,me.length=me.length-Se}x(ot,"popStack");function Qe(){var Se;return Se=ke.pop()||Ue.lex()||Oe,typeof Se!="number"&&(Se instanceof Array&&(ke=Se,Se=ke.pop()),Se=se.symbols_[Se]||Se),Se}x(Qe,"lex");for(var dt,gt,ht,st,Br,wt,mn={},Ir,er,Zt,wr;;){if(ht=le[le.length-1],this.defaultActions[ht]?st=this.defaultActions[ht]:((dt===null||typeof dt>"u")&&(dt=Qe()),st=Ie[ht]&&Ie[ht][dt]),typeof st>"u"||!st.length||!st[0]){var xt="";wr=[];for(Ir in Ie[ht])this.terminals_[Ir]&&Ir>We&&wr.push("'"+this.terminals_[Ir]+"'");Ue.showPosition?xt="Parse error on line "+(ze+1)+`: `+Ue.showPosition()+` Expecting `+wr.join(", ")+", got '"+(this.terminals_[dt]||dt)+"'":xt="Parse error on line "+(ze+1)+": Unexpected "+(dt==Oe?"end of input":"'"+(this.terminals_[dt]||dt)+"'"),this.parseError(xt,{text:Ue.match,token:this.terminals_[dt]||dt,line:Ue.yylineno,loc:ut,expected:wr})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ht+", token: "+dt);switch(st[0]){case 1:le.push(dt),ve.push(Ue.yytext),me.push(Ue.yylloc),le.push(st[1]),dt=null,gt?(dt=gt,gt=null):(Xe=Ue.yyleng,_e=Ue.yytext,ze=Ue.yylineno,ut=Ue.yylloc,ft>0&&ft--);break;case 2:if(er=this.productions_[st[1]][1],mn.$=ve[ve.length-er],mn._$={first_line:me[me.length-(er||1)].first_line,last_line:me[me.length-1].last_line,first_column:me[me.length-(er||1)].first_column,last_column:me[me.length-1].last_column},kt&&(mn._$.range=[me[me.length-(er||1)].range[0],me[me.length-1].range[1]]),wt=this.performAction.apply(mn,[_e,Xe,ze,nt.yy,st[1],ve,me].concat(Ke)),typeof wt<"u")return wt;er&&(le=le.slice(0,-1*er*2),ve=ve.slice(0,-1*er),me=me.slice(0,-1*er)),le.push(this.productions_[st[1]][0]),ve.push(mn.$),me.push(mn._$),Zt=Ie[le[le.length-2]][le[le.length-1]],le.push(Zt);break;case 3:return!0}}return!0},"parse")},ye=function(){var he={EOF:1,parseError:x(function(se,le){if(this.yy.parser)this.yy.parser.parseError(se,le);else throw new Error(se)},"parseError"),setInput:x(function(z,se){return this.yy=se||this.yy||{},this._input=z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var z=this._input[0];this.yytext+=z,this.yyleng++,this.offset++,this.match+=z,this.matched+=z;var se=z.match(/(?:\r\n?|\n).*/g);return se?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),z},"input"),unput:x(function(z){var se=z.length,le=z.split(/(?:\r\n?|\n)/g);this._input=z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-se),this.offset-=se;var ke=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),le.length-1&&(this.yylineno-=le.length-1);var ve=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:le?(le.length===ke.length?this.yylloc.first_column:0)+ke[ke.length-le.length].length-le[0].length:this.yylloc.first_column-se},this.options.ranges&&(this.yylloc.range=[ve[0],ve[0]+this.yyleng-se]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(z){this.unput(this.match.slice(z))},"less"),pastInput:x(function(){var z=this.matched.substr(0,this.matched.length-this.match.length);return(z.length>20?"...":"")+z.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var z=this.match;return z.length<20&&(z+=this._input.substr(0,20-z.length)),(z.substr(0,20)+(z.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var z=this.pastInput(),se=new Array(z.length+1).join("-");return z+this.upcomingInput()+` `+se+"^"},"showPosition"),test_match:x(function(z,se){var le,ke,ve;if(this.options.backtrack_lexer&&(ve={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&&(ve.yylloc.range=this.yylloc.range.slice(0))),ke=z[0].match(/(?:\r\n?|\n).*/g),ke&&(this.yylineno+=ke.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ke?ke[ke.length-1].length-ke[ke.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+z[0].length},this.yytext+=z[0],this.match+=z[0],this.matches=z,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(z[0].length),this.matched+=z[0],le=this.performAction.call(this,this.yy,this,se,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),le)return le;if(this._backtrack){for(var me in ve)this[me]=ve[me];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var z,se,le,ke;this._more||(this.yytext="",this.match="");for(var ve=this._currentRules(),me=0;mese[0].length)){if(se=le,ke=me,this.options.backtrack_lexer){if(z=this.test_match(le,ve[me]),z!==!1)return z;if(this._backtrack){se=!1;continue}else return!1}else if(!this.options.flex)break}return se?(z=this.test_match(se,ve[ke]),z!==!1?z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var se=this.next();return se||this.lex()},"lex"),begin:x(function(se){this.conditionStack.push(se)},"begin"),popState:x(function(){var se=this.conditionStack.length-1;return se>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(se){return se=this.conditionStack.length-1-Math.abs(se||0),se>=0?this.conditionStack[se]:"INITIAL"},"topState"),pushState:x(function(se){this.begin(se)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(se,le,ke,ve){var me=ve;switch(ke){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return he}();fe.lexer=ye;function H(){this.yy={}}return x(H,"Parser"),H.prototype=fe,fe.Parser=H,new H}();lP.parser=lP;ZWe=lP,ps=ed(),QWe=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{x(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:sr.quadrantChart?.chartWidth||500,chartWidth:sr.quadrantChart?.chartHeight||500,titlePadding:sr.quadrantChart?.titlePadding||10,titleFontSize:sr.quadrantChart?.titleFontSize||20,quadrantPadding:sr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:sr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:sr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:sr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:sr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:sr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:sr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:sr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:sr.quadrantChart?.pointLabelFontSize||12,pointRadius:sr.quadrantChart?.pointRadius||5,xAxisPosition:sr.quadrantChart?.xAxisPosition||"top",yAxisPosition:sr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:sr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:sr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:ps.quadrant1Fill,quadrant2Fill:ps.quadrant2Fill,quadrant3Fill:ps.quadrant3Fill,quadrant4Fill:ps.quadrant4Fill,quadrant1TextFill:ps.quadrant1TextFill,quadrant2TextFill:ps.quadrant2TextFill,quadrant3TextFill:ps.quadrant3TextFill,quadrant4TextFill:ps.quadrant4TextFill,quadrantPointFill:ps.quadrantPointFill,quadrantPointTextFill:ps.quadrantPointTextFill,quadrantXAxisTextFill:ps.quadrantXAxisTextFill,quadrantYAxisTextFill:ps.quadrantYAxisTextFill,quadrantTitleFill:ps.quadrantTitleFill,quadrantInternalBorderStrokeFill:ps.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:ps.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,J.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){J.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){J.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,n){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:t==="top"&&e?i:0,bottom:t==="bottom"&&e?i:0},s=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,o={left:this.config.yAxisPosition==="left"&&r?s:0,right:this.config.yAxisPosition==="right"&&r?s:0},l=this.config.titleFontSize+this.config.titlePadding*2,u={top:n?l:0},h=this.config.quadrantPadding+o.left,f=this.config.quadrantPadding+a.top+u.top,d=this.config.chartWidth-this.config.quadrantPadding*2-o.left-o.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-u.top,g=d/2,m=p/2;return{xAxisSpace:a,yAxisSpace:o,titleSpace:u,quadrantSpace:{quadrantLeft:h,quadrantTop:f,quadrantWidth:d,quadrantHalfWidth:g,quadrantHeight:p,quadrantHalfHeight:m}}}getAxisLabels(t,e,r,n){let{quadrantSpace:i,titleSpace:a}=n,{quadrantHalfHeight:s,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:u,quadrantTop:h,quadrantWidth:f}=i,d=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(d?u/2:0),y:t==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+u+(d?u/2:0),y:t==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:h+o-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:h+s-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){let{quadrantSpace:e}=t,{quadrantHalfHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a}=e,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a,width:i,height:r,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a,width:i,height:r,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant4Fill}];for(let o of s)o.text.x=o.x+o.width/2,this.data.points.length===0?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return s}getQuadrantPoints(t){let{quadrantSpace:e}=t,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:a}=e,s=ul().domain([0,1]).range([n,a+n]),o=ul().domain([0,1]).range([r+i,i]);return this.data.points.map(u=>{let h=this.classes.get(u.className);return h&&(u={...h,...u}),{x:s(u.x),y:o(u.y),fill:u.color??this.themeConfig.quadrantPointFill,radius:u.radius??this.config.pointRadius,text:{text:u.text,fill:this.themeConfig.quadrantPointTextFill,x:s(u.x),y:o(u.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:u.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:u.strokeWidth??"0px"}})}getBorders(t){let e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:r}=t,{quadrantHalfHeight:n,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:s,quadrantTop:o,quadrantWidth:l}=r;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o,x2:a+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:o+e,x2:a+l,y2:o+i-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o+i,x2:a+l+e,y2:o+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:o+e,x2:a,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+s,y1:o+e,x2:a+s,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+e,y1:o+n,x2:a+l-e,y2:o+n}]}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(){let 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=this.data.points.length>0?"bottom":this.config.xAxisPosition,i=this.calculateSpace(n,t,e,r);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(n,t,e,i),borderLines:this.getBorders(i),title:this.getTitle(r)}}},sS=class extends Error{static{x(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid ${r}`),this.name="InvalidStyleError"}};x(cP,"validateHexCode");x(ige,"validateNumber");x(age,"validateSizeInPixels");JWe=we();x(jc,"textSanitizer");ya=new QWe;x(sge,"setQuadrant1Text");x(oge,"setQuadrant2Text");x(lge,"setQuadrant3Text");x(cge,"setQuadrant4Text");x(uge,"setXAxisLeftText");x(hge,"setXAxisRightText");x(fge,"setYAxisTopText");x(dge,"setYAxisBottomText");x(oS,"parseStyles");x(pge,"addPoint");x(gge,"addClass");x(mge,"setWidth");x(vge,"setHeight");x(yge,"getQuadrantData");eHe=x(function(){ya.clear(),mr()},"clear"),tHe={setWidth:mge,setHeight:vge,setQuadrant1Text:sge,setQuadrant2Text:oge,setQuadrant3Text:lge,setQuadrant4Text:cge,setXAxisLeftText:uge,setXAxisRightText:hge,setYAxisTopText:fge,setYAxisBottomText:dge,parseStyles:oS,addPoint:pge,addClass:gge,getQuadrantData:yge,clear:eHe,setAccTitle:Er,getAccTitle:Cr,setDiagramTitle:Dr,getDiagramTitle:Lr,getAccDescription:_r,setAccDescription:Ar},rHe=x((t,e,r,n)=>{function i(C){return C==="top"?"hanging":"middle"}x(i,"getDominantBaseLine");function a(C){return C==="left"?"start":"middle"}x(a,"getTextAnchor");function s(C){return`translate(${C.x}, ${C.y}) rotate(${C.rotation||0})`}x(s,"getTransformation");let o=we();J.debug(`Rendering quadrant chart `+t);let l=o.securityLevel,u;l==="sandbox"&&(u=He("#i"+e));let f=(l==="sandbox"?He(u.nodes()[0].contentDocument.body):He("body")).select(`[id="${e}"]`),d=f.append("g").attr("class","main"),p=o.quadrantChart?.chartWidth??500,g=o.quadrantChart?.chartHeight??500;un(f,g,p,o.quadrantChart?.useMaxWidth??!0),f.attr("viewBox","0 0 "+p+" "+g),n.db.setHeight(g),n.db.setWidth(p);let m=n.db.getQuadrantData(),v=d.append("g").attr("class","quadrants"),y=d.append("g").attr("class","border"),b=d.append("g").attr("class","data-points"),w=d.append("g").attr("class","labels"),S=d.append("g").attr("class","title");m.title&&S.append("text").attr("x",0).attr("y",0).attr("fill",m.title.fill).attr("font-size",m.title.fontSize).attr("dominant-baseline",i(m.title.horizontalPos)).attr("text-anchor",a(m.title.verticalPos)).attr("transform",s(m.title)).text(m.title.text),m.borderLines&&y.selectAll("line").data(m.borderLines).enter().append("line").attr("x1",C=>C.x1).attr("y1",C=>C.y1).attr("x2",C=>C.x2).attr("y2",C=>C.y2).style("stroke",C=>C.strokeFill).style("stroke-width",C=>C.strokeWidth);let T=v.selectAll("g.quadrant").data(m.quadrants).enter().append("g").attr("class","quadrant");T.append("rect").attr("x",C=>C.x).attr("y",C=>C.y).attr("width",C=>C.width).attr("height",C=>C.height).attr("fill",C=>C.fill),T.append("text").attr("x",0).attr("y",0).attr("fill",C=>C.text.fill).attr("font-size",C=>C.text.fontSize).attr("dominant-baseline",C=>i(C.text.horizontalPos)).attr("text-anchor",C=>a(C.text.verticalPos)).attr("transform",C=>s(C.text)).text(C=>C.text.text),w.selectAll("g.label").data(m.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(C=>C.text).attr("fill",C=>C.fill).attr("font-size",C=>C.fontSize).attr("dominant-baseline",C=>i(C.horizontalPos)).attr("text-anchor",C=>a(C.verticalPos)).attr("transform",C=>s(C));let A=b.selectAll("g.data-point").data(m.points).enter().append("g").attr("class","data-point");A.append("circle").attr("cx",C=>C.x).attr("cy",C=>C.y).attr("r",C=>C.radius).attr("fill",C=>C.fill).attr("stroke",C=>C.strokeColor).attr("stroke-width",C=>C.strokeWidth),A.append("text").attr("x",0).attr("y",0).text(C=>C.text.text).attr("fill",C=>C.text.fill).attr("font-size",C=>C.text.fontSize).attr("dominant-baseline",C=>i(C.text.horizontalPos)).attr("text-anchor",C=>a(C.text.verticalPos)).attr("transform",C=>s(C.text))},"draw"),nHe={draw:rHe},iHe={parser:ZWe,db:tHe,renderer:nHe,styles:x(()=>"","styles")}});var Gge={};hr(Gge,{diagram:()=>yHe});function hP(t){return t.type==="bar"}function pP(t){return t.type==="band"}function N1(t){return t.type==="linear"}function fP(t,e,r,n){let i=new kge(n);return pP(t)?new sHe(e,r,t.categories,t.title,i):new oHe(e,r,[t.min,t.max],t.title,i)}function Sge(t,e,r,n){let i=new kge(n);return new lHe(i,t,e,r)}function Cge(t,e,r){return new hHe(t,e,r)}function mP(){let t=ed(),e=or();return Qn(t.xyChart,e.themeVariables.xyChart)}function vP(){let t=or();return Qn(sr.xyChart,t.xyChart)}function yP(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function cS(t){let e=or();return ar(t.trim(),e)}function _ge(t){Age=t}function Lge(t){t==="horizontal"?Mb.chartOrientation="horizontal":Mb.chartOrientation="vertical"}function Rge(t){ln.xAxis.title=cS(t.text)}function xP(t,e){ln.xAxis={type:"linear",title:ln.xAxis.title,min:t,max:e},lS=!0}function Ige(t){ln.xAxis={type:"band",title:ln.xAxis.title,categories:t.map(e=>cS(e.text))},lS=!0}function Nge(t){ln.yAxis.title=cS(t.text)}function Dge(t,e){ln.yAxis={type:"linear",title:ln.yAxis.title,min:t,max:e},gP=!0}function Mge(t){let e=Math.min(...t),r=Math.max(...t),n=N1(ln.yAxis)?ln.yAxis.min:1/0,i=N1(ln.yAxis)?ln.yAxis.max:-1/0;ln.yAxis={type:"linear",title:ln.yAxis.title,min:Math.min(n,e),max:Math.max(i,r)}}function bP(t){let e=[];if(t.length===0)return e;if(!lS){let r=N1(ln.xAxis)?ln.xAxis.min:1/0,n=N1(ln.xAxis)?ln.xAxis.max:-1/0;xP(Math.min(r,1),Math.max(n,t.length))}if(gP||Mge(t),pP(ln.xAxis)&&(e=ln.xAxis.categories.map((r,n)=>[r,t[n]])),N1(ln.xAxis)){let r=ln.xAxis.min,n=ln.xAxis.max,i=(n-r)/(t.length-1),a=[];for(let s=r;s<=n;s+=i)a.push(`${s}`);e=a.map((s,o)=>[s,t[o]])}return e}function wP(t){return dP[t===0?0:t%dP.length]}function Oge(t,e){let r=bP(e);ln.plots.push({type:"line",strokeFill:wP(Db),strokeWidth:2,data:r}),Db++}function Pge(t,e){let r=bP(e);ln.plots.push({type:"bar",fill:wP(Db),data:r}),Db++}function Bge(){if(ln.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return ln.title=Lr(),dHe.build(Mb,ln,Ob,Age)}function Fge(){return Ob}function $ge(){return Mb}function zge(){return ln}var uP,aHe,kge,wge,Tge,Ege,sHe,oHe,lHe,cHe,uHe,hHe,fHe,dHe,Db,Age,Mb,Ob,ln,dP,lS,gP,pHe,gHe,mHe,vHe,yHe,Vge=F(()=>{ac();na();hn();vr();rr();cr();cr();cr();uP=function(){var t=x(function(D,N,O,P){for(O=O||{},P=D.length;P--;O[D[P]]=N);return O},"o"),e=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],a=[1,6],s=[1,7],o=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],u=[1,26],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[1,32],m=[1,33],v=[1,34],y=[1,35],b=[1,36],w=[1,37],S=[1,43],T=[1,42],E=[1,47],A=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],I=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],M=[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],R=[1,64],k={trace:x(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:x(function(N,O,P,B,G,$,U){var X=$.length-1;switch(G){case 5:B.setOrientation($[X]);break;case 9:B.setDiagramTitle($[X].text.trim());break;case 12:B.setLineData({text:"",type:"text"},$[X]);break;case 13:B.setLineData($[X-1],$[X]);break;case 14:B.setBarData({text:"",type:"text"},$[X]);break;case 15:B.setBarData($[X-1],$[X]);break;case 16:this.$=$[X].trim(),B.setAccTitle(this.$);break;case 17:case 18:this.$=$[X].trim(),B.setAccDescription(this.$);break;case 19:this.$=$[X-1];break;case 20:this.$=[Number($[X-2]),...$[X]];break;case 21:this.$=[Number($[X])];break;case 22:B.setXAxisTitle($[X]);break;case 23:B.setXAxisTitle($[X-1]);break;case 24:B.setXAxisTitle({type:"text",text:""});break;case 25:B.setXAxisBand($[X]);break;case 26:B.setXAxisRangeData(Number($[X-2]),Number($[X]));break;case 27:this.$=$[X-1];break;case 28:this.$=[$[X-2],...$[X]];break;case 29:this.$=[$[X]];break;case 30:B.setYAxisTitle($[X]);break;case 31:B.setYAxisTitle($[X-1]);break;case 32:B.setYAxisTitle({type:"text",text:""});break;case 33:B.setYAxisRangeData(Number($[X-2]),Number($[X]));break;case 37:this.$={text:$[X],type:"text"};break;case 38:this.$={text:$[X],type:"text"};break;case 39:this.$={text:$[X],type:"markdown"};break;case 40:this.$=$[X];break;case 41:this.$=$[X-1]+""+$[X];break}},"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,34:i,35:a,36:s}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,34:i,35:a,36:s}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:i,35:a,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(o,[2,34]),t(o,[2,35]),t(o,[2,36]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,34:i,35:a,36:s}),{1:[2,3]},t(o,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:s}),{11:23,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:b,50:w},{11:39,13:38,24:S,27:T,29:40,30:41,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:b,50:w},{11:45,15:44,27:E,33:46,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:b,50:w},{11:49,17:48,24:A,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:b,50:w},{11:52,17:51,24:A,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:b,50:w},{20:[1,53]},{22:[1,54]},t(C,[2,18]),{1:[2,2]},t(C,[2,8]),t(C,[2,9]),t(I,[2,37],{40:55,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:b,50:w}),t(I,[2,38]),t(I,[2,39]),t(M,[2,40]),t(M,[2,42]),t(M,[2,43]),t(M,[2,44]),t(M,[2,45]),t(M,[2,46]),t(M,[2,47]),t(M,[2,48]),t(M,[2,49]),t(M,[2,50]),t(M,[2,51]),t(C,[2,10]),t(C,[2,22],{30:41,29:56,24:S,27:T}),t(C,[2,24]),t(C,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:b,50:w},t(C,[2,11]),t(C,[2,30],{33:60,27:E}),t(C,[2,32]),{31:[1,61]},t(C,[2,12]),{17:62,24:A},{25:63,27:R},t(C,[2,14]),{17:65,24:A},t(C,[2,16]),t(C,[2,17]),t(M,[2,41]),t(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(C,[2,31]),{27:[1,69]},t(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(C,[2,15]),t(C,[2,26]),t(C,[2,27]),{11:59,32:72,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:v,48:y,49:b,50:w},t(C,[2,33]),t(C,[2,19]),{25:73,27:R},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:x(function(N,O){if(O.recoverable)this.trace(N);else{var P=new Error(N);throw P.hash=O,P}},"parseError"),parse:x(function(N){var O=this,P=[0],B=[],G=[null],$=[],U=this.table,X="",ee=0,Y=0,oe=0,Q=2,ue=1,re=$.slice.call(arguments,1),te=Object.create(this.lexer),Z={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(Z.yy[j]=this.yy[j]);te.setInput(N,Z.yy),Z.yy.lexer=te,Z.yy.parser=this,typeof te.yylloc>"u"&&(te.yylloc={});var ae=te.yylloc;$.push(ae);var K=te.options&&te.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function de(fe){P.length=P.length-2*fe,G.length=G.length-fe,$.length=$.length-fe}x(de,"popStack");function ne(){var fe;return fe=B.pop()||te.lex()||ue,typeof fe!="number"&&(fe instanceof Array&&(B=fe,fe=B.pop()),fe=O.symbols_[fe]||fe),fe}x(ne,"lex");for(var be,W,Ve,pe,Be,Ye,qe={},Le,Me,Ne,Ce;;){if(Ve=P[P.length-1],this.defaultActions[Ve]?pe=this.defaultActions[Ve]:((be===null||typeof be>"u")&&(be=ne()),pe=U[Ve]&&U[Ve][be]),typeof pe>"u"||!pe.length||!pe[0]){var Fe="";Ce=[];for(Le in U[Ve])this.terminals_[Le]&&Le>Q&&Ce.push("'"+this.terminals_[Le]+"'");te.showPosition?Fe="Parse error on line "+(ee+1)+`: `+te.showPosition()+` Expecting `+Ce.join(", ")+", got '"+(this.terminals_[be]||be)+"'":Fe="Parse error on line "+(ee+1)+": Unexpected "+(be==ue?"end of input":"'"+(this.terminals_[be]||be)+"'"),this.parseError(Fe,{text:te.match,token:this.terminals_[be]||be,line:te.yylineno,loc:ae,expected:Ce})}if(pe[0]instanceof Array&&pe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ve+", token: "+be);switch(pe[0]){case 1:P.push(be),G.push(te.yytext),$.push(te.yylloc),P.push(pe[1]),be=null,W?(be=W,W=null):(Y=te.yyleng,X=te.yytext,ee=te.yylineno,ae=te.yylloc,oe>0&&oe--);break;case 2:if(Me=this.productions_[pe[1]][1],qe.$=G[G.length-Me],qe._$={first_line:$[$.length-(Me||1)].first_line,last_line:$[$.length-1].last_line,first_column:$[$.length-(Me||1)].first_column,last_column:$[$.length-1].last_column},K&&(qe._$.range=[$[$.length-(Me||1)].range[0],$[$.length-1].range[1]]),Ye=this.performAction.apply(qe,[X,Y,ee,Z.yy,pe[1],G,$].concat(re)),typeof Ye<"u")return Ye;Me&&(P=P.slice(0,-1*Me*2),G=G.slice(0,-1*Me),$=$.slice(0,-1*Me)),P.push(this.productions_[pe[1]][0]),G.push(qe.$),$.push(qe._$),Ne=U[P[P.length-2]][P[P.length-1]],P.push(Ne);break;case 3:return!0}}return!0},"parse")},L=function(){var D={EOF:1,parseError:x(function(O,P){if(this.yy.parser)this.yy.parser.parseError(O,P);else throw new Error(O)},"parseError"),setInput:x(function(N,O){return this.yy=O||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var O=N.match(/(?:\r\n?|\n).*/g);return O?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:x(function(N){var O=N.length,P=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;var B=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),P.length-1&&(this.yylineno-=P.length-1);var G=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:P?(P.length===B.length?this.yylloc.first_column:0)+B[B.length-P.length].length-P[0].length:this.yylloc.first_column-O},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-O]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(N){this.unput(this.match.slice(N))},"less"),pastInput:x(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var N=this.pastInput(),O=new Array(N.length+1).join("-");return N+this.upcomingInput()+` `+O+"^"},"showPosition"),test_match:x(function(N,O){var P,B,G;if(this.options.backtrack_lexer&&(G={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&&(G.yylloc.range=this.yylloc.range.slice(0))),B=N[0].match(/(?:\r\n?|\n).*/g),B&&(this.yylineno+=B.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:B?B[B.length-1].length-B[B.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,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(N[0].length),this.matched+=N[0],P=this.performAction.call(this,this.yy,this,O,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),P)return P;if(this._backtrack){for(var $ in G)this[$]=G[$];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,O,P,B;this._more||(this.yytext="",this.match="");for(var G=this._currentRules(),$=0;$O[0].length)){if(O=P,B=$,this.options.backtrack_lexer){if(N=this.test_match(P,G[$]),N!==!1)return N;if(this._backtrack){O=!1;continue}else return!1}else if(!this.options.flex)break}return O?(N=this.test_match(O,G[B]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var O=this.next();return O||this.lex()},"lex"),begin:x(function(O){this.conditionStack.push(O)},"begin"),popState:x(function(){var O=this.conditionStack.length-1;return O>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(O){return O=this.conditionStack.length-1-Math.abs(O||0),O>=0?this.conditionStack[O]:"INITIAL"},"topState"),pushState:x(function(O){this.begin(O)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(O,P,B,G){var $=G;switch(B){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 31;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 27;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return D}();k.lexer=L;function _(){this.yy={}}return x(_,"Parser"),_.prototype=k,k.Parser=_,new _}();uP.parser=uP;aHe=uP;x(hP,"isBarPlot");x(pP,"isBandAxisData");x(N1,"isLinearAxisData");kge=class{constructor(t){this.parentGroup=t}static{x(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((i,a)=>Math.max(a.length,i),0)*e,height:e};let r={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(let i of t){let a=q_(n,1,i),s=a?a.width:i.length*e,o=a?a.height:e;r.width=Math.max(r.width,s),r.height=Math.max(r.height,o)}return n.remove(),r}},wge=.7,Tge=.2,Ege=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{x(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?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(){let 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(){wge*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(wge*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),n=Tge*t.width;this.outerPadding=Math.min(r.width/2,n);let i=r.height+this.axisConfig.labelPadding*2;this.labelTextHeight=r.height,i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=r.height+this.axisConfig.titlePadding*2;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;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),n=Tge*t.height;this.outerPadding=Math.min(r.height/2,n);let i=r.width+this.axisConfig.labelPadding*2;i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=r.height+this.axisConfig.titlePadding*2;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 this.axisPosition==="left"||this.axisPosition==="right"?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(){let t=[];if(this.showAxisLine){let e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${e},${this.getScaleValue(r)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(r)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${e} L ${this.getScaleValue(r)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(r)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.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"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},sHe=class extends Ege{static{x(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=bp().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=bp().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),J.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},oHe=class extends Ege{static{x(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=ul().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=ul().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};x(fP,"getAxis");lHe=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{x(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),r=Math.max(e.width,t.width),n=e.height+2*this.chartConfig.titlePadding;return e.width<=r&&e.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=r,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let 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}};x(Sge,"getChartTitleComponent");cHe=class{constructor(t,e,r,n,i){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{x(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map(r=>[this.xAxis.getScaleValue(r[0]),this.yAxis.getScaleValue(r[1])]),e;return this.orientation==="horizontal"?e=ic().y(r=>r[0]).x(r=>r[1])(t):e=ic().x(r=>r[0]).y(r=>r[1])(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},uHe=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{x(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),r=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=r/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(i=>({x:this.boundingRect.x,y:i[0]-n,height:r,width:i[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(i=>({x:i[0]-n,y:i[1],width:r,height:this.boundingRect.y+this.boundingRect.height-i[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},hHe=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{x(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");let t=[];for(let[e,r]of this.chartData.plots.entries())switch(r.type){case"line":{let n=new cHe(r,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break;case"bar":{let n=new uHe(r,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break}return t}};x(Cge,"getPlotComponent");fHe=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:Sge(t,e,r,n),plot:Cge(t,e,r),xAxis:fP(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:fP(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{x(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r=0,n=0,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,e-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),n=s.height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),s=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=s.height,this.componentStore.yAxis.setAxisPosition("left"),s=this.componentStore.yAxis.calculateSpace({width:t,height:e}),r=s.width,t-=s.width,t>0&&(i+=t,t=0),e>0&&(a+=e,e=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([r,r+i]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:n+a}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(o=>hP(o))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r=0,n=0,i=0,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,e-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),r=o.height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=o.width,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=o.height,i=r+o.height,t>0&&(a+=t,t=0),e>0&&(s+=e,e=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(l=>hP(l))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},dHe=class{static{x(this,"XYChartBuilder")}static build(t,e,r,n){return new fHe(t,e,r,n).getDrawableElement()}},Db=0,Mb=vP(),Ob=mP(),ln=yP(),dP=Ob.plotColorPalette.split(",").map(t=>t.trim()),lS=!1,gP=!1;x(mP,"getChartDefaultThemeConfig");x(vP,"getChartDefaultConfig");x(yP,"getChartDefaultData");x(cS,"textSanitizer");x(_ge,"setTmpSVGG");x(Lge,"setOrientation");x(Rge,"setXAxisTitle");x(xP,"setXAxisRangeData");x(Ige,"setXAxisBand");x(Nge,"setYAxisTitle");x(Dge,"setYAxisRangeData");x(Mge,"setYAxisRangeFromPlotData");x(bP,"transformDataWithoutCategory");x(wP,"getPlotColorFromPalette");x(Oge,"setLineData");x(Pge,"setBarData");x(Bge,"getDrawableElem");x(Fge,"getChartThemeConfig");x($ge,"getChartConfig");x(zge,"getXYChartData");pHe=x(function(){mr(),Db=0,Mb=vP(),ln=yP(),Ob=mP(),dP=Ob.plotColorPalette.split(",").map(t=>t.trim()),lS=!1,gP=!1},"clear"),gHe={getDrawableElem:Bge,clear:pHe,setAccTitle:Er,getAccTitle:Cr,setDiagramTitle:Dr,getDiagramTitle:Lr,getAccDescription:_r,setAccDescription:Ar,setOrientation:Lge,setXAxisTitle:Rge,setXAxisRangeData:xP,setXAxisBand:Ige,setYAxisTitle:Nge,setYAxisRangeData:Dge,setLineData:Oge,setBarData:Pge,setTmpSVGG:_ge,getChartThemeConfig:Fge,getChartConfig:$ge,getXYChartData:zge},mHe=x((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig(),o=i.getXYChartData().plots[0].data.map(w=>w[1]);function l(w){return w==="top"?"text-before-edge":"middle"}x(l,"getDominantBaseLine");function u(w){return w==="left"?"start":w==="right"?"end":"middle"}x(u,"getTextAnchor");function h(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}x(h,"getTextTransformation"),J.debug(`Rendering xychart chart `+t);let f=Bi(e),d=f.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");un(f,s.height,s.width,!0),f.attr("viewBox",`0 0 ${s.width} ${s.height}`),p.attr("fill",a.backgroundColor),i.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));let g=i.getDrawableElem(),m={};function v(w){let S=d,T="";for(let[E]of w.entries()){let A=d;E>0&&m[T]&&(A=m[T]),T+=w[E],S=m[T],S||(S=m[T]=A.append("g").attr("class",w[E]))}return S}x(v,"getGroup");for(let w of g){if(w.data.length===0)continue;let S=v(w.groupTexts);switch(w.type){case"rect":if(S.selectAll("rect").data(w.data).enter().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).attr("stroke",T=>T.strokeFill).attr("stroke-width",T=>T.strokeWidth),s.showDataLabel)if(s.chartOrientation==="horizontal"){let T=function(M,R){let{data:k,label:L}=M;return R*L.length*E<=k.width-10};var y=T;x(T,"fitsHorizontally");let E=.7,A=w.data.map((M,R)=>({data:M,label:o[R].toString()})).filter(M=>M.data.width>0&&M.data.height>0),C=A.map(M=>{let{data:R}=M,k=R.height*.7;for(;!T(M,k)&&k>0;)k-=1;return k}),I=Math.floor(Math.min(...C));S.selectAll("text").data(A).enter().append("text").attr("x",M=>M.data.x+M.data.width-10).attr("y",M=>M.data.y+M.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${I}px`).text(M=>M.label)}else{let T=function(M,R,k){let{data:L,label:_}=M,N=R*_.length*.7,O=L.x+L.width/2,P=O-N/2,B=O+N/2,G=P>=L.x&&B<=L.x+L.width,$=L.y+k+R<=L.y+L.height;return G&&$};var b=T;x(T,"fitsInBar");let E=10,A=w.data.map((M,R)=>({data:M,label:o[R].toString()})).filter(M=>M.data.width>0&&M.data.height>0),C=A.map(M=>{let{data:R,label:k}=M,L=R.width/(k.length*.7);for(;!T(M,L,E)&&L>0;)L-=1;return L}),I=Math.floor(Math.min(...C));S.selectAll("text").data(A).enter().append("text").attr("x",M=>M.data.x+M.data.width/2).attr("y",M=>M.data.y+E).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${I}px`).text(M=>M.label)}break;case"text":S.selectAll("text").data(w.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=>u(T.horizontalPos)).attr("transform",T=>h(T)).text(T=>T.text);break;case"path":S.selectAll("path").data(w.data).enter().append("path").attr("d",T=>T.path).attr("fill",T=>T.fill?T.fill:"none").attr("stroke",T=>T.strokeFill).attr("stroke-width",T=>T.strokeWidth);break}}},"draw"),vHe={draw:mHe},yHe={parser:aHe,db:gHe,renderer:vHe}});var qge={};hr(qge,{diagram:()=>EHe});var TP,xHe,bHe,wHe,THe,Uge,kHe,EHe,Wge=F(()=>{El();Yo();Go();Io();Ks();Ls();ja();Ka();na();hn();vr();rr();TP=function(){var t=x(function(fe,ye,H,he){for(H=H||{},he=fe.length;he--;H[fe[he]]=ye);return H},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],o=[2,7],l=[1,26],u=[1,27],h=[1,28],f=[1,29],d=[1,33],p=[1,34],g=[1,35],m=[1,36],v=[1,37],y=[1,38],b=[1,24],w=[1,31],S=[1,32],T=[1,30],E=[1,39],A=[1,40],C=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],I=[1,61],M=[89,90],R=[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],k=[27,29],L=[1,70],_=[1,71],D=[1,72],N=[1,73],O=[1,74],P=[1,75],B=[1,76],G=[1,83],$=[1,80],U=[1,84],X=[1,85],ee=[1,86],Y=[1,87],oe=[1,88],Q=[1,89],ue=[1,90],re=[1,91],te=[1,92],Z=[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],j=[63,64],ae=[1,101],K=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],de=[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],ne=[1,110],be=[1,106],W=[1,107],Ve=[1,108],pe=[1,109],Be=[1,111],Ye=[1,116],qe=[1,117],Le=[1,114],Me=[1,115],Ne={trace:x(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:x(function(ye,H,he,z,se,le,ke){var ve=le.length-1;switch(se){case 4:this.$=le[ve].trim(),z.setAccTitle(this.$);break;case 5:case 6:this.$=le[ve].trim(),z.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:z.setDirection("TB");break;case 18:z.setDirection("BT");break;case 19:z.setDirection("RL");break;case 20:z.setDirection("LR");break;case 21:z.addRequirement(le[ve-3],le[ve-4]);break;case 22:z.addRequirement(le[ve-5],le[ve-6]),z.setClass([le[ve-5]],le[ve-3]);break;case 23:z.setNewReqId(le[ve-2]);break;case 24:z.setNewReqText(le[ve-2]);break;case 25:z.setNewReqRisk(le[ve-2]);break;case 26:z.setNewReqVerifyMethod(le[ve-2]);break;case 29:this.$=z.RequirementType.REQUIREMENT;break;case 30:this.$=z.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=z.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=z.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=z.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=z.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=z.RiskLevel.LOW_RISK;break;case 36:this.$=z.RiskLevel.MED_RISK;break;case 37:this.$=z.RiskLevel.HIGH_RISK;break;case 38:this.$=z.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=z.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=z.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=z.VerifyType.VERIFY_TEST;break;case 42:z.addElement(le[ve-3]);break;case 43:z.addElement(le[ve-5]),z.setClass([le[ve-5]],le[ve-3]);break;case 44:z.setNewElementType(le[ve-2]);break;case 45:z.setNewElementDocRef(le[ve-2]);break;case 48:z.addRelationship(le[ve-2],le[ve],le[ve-4]);break;case 49:z.addRelationship(le[ve-2],le[ve-4],le[ve]);break;case 50:this.$=z.Relationships.CONTAINS;break;case 51:this.$=z.Relationships.COPIES;break;case 52:this.$=z.Relationships.DERIVES;break;case 53:this.$=z.Relationships.SATISFIES;break;case 54:this.$=z.Relationships.VERIFIES;break;case 55:this.$=z.Relationships.REFINES;break;case 56:this.$=z.Relationships.TRACES;break;case 57:this.$=le[ve-2],z.defineClass(le[ve-1],le[ve]);break;case 58:z.setClass(le[ve-1],le[ve]);break;case 59:z.setClass([le[ve-2]],le[ve]);break;case 60:case 62:this.$=[le[ve]];break;case 61:case 63:this.$=le[ve-2].concat([le[ve]]);break;case 64:this.$=le[ve-2],z.setCssStyle(le[ve-1],le[ve]);break;case 65:this.$=[le[ve]];break;case 66:le[ve-2].push(le[ve]),this.$=le[ve-2];break;case 68:this.$=le[ve-1]+le[ve];break}},"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(a,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:i},{1:[2,2]},{4:17,5:s,7:13,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:v,46:y,54:b,72:w,74:S,77:T,89:E,90:A},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:v,46:y,54:b,72:w,74:S,77:T,89:E,90:A},{4:17,5:s,7:43,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:v,46:y,54:b,72:w,74:S,77:T,89:E,90:A},{4:17,5:s,7:44,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:v,46:y,54:b,72:w,74:S,77:T,89:E,90:A},{4:17,5:s,7:45,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:v,46:y,54:b,72:w,74:S,77:T,89:E,90:A},{4:17,5:s,7:46,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:v,46:y,54:b,72:w,74:S,77:T,89:E,90:A},{4:17,5:s,7:47,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:v,46:y,54:b,72:w,74:S,77:T,89:E,90:A},{4:17,5:s,7:48,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:v,46:y,54:b,72:w,74:S,77:T,89:E,90:A},{4:17,5:s,7:49,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:v,46:y,54:b,72:w,74:S,77:T,89:E,90:A},{4:17,5:s,7:50,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:v,46:y,54:b,72:w,74:S,77:T,89:E,90:A},{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(C,[2,17]),t(C,[2,18]),t(C,[2,19]),t(C,[2,20]),{30:60,33:62,75:I,89:E,90:A},{30:63,33:62,75:I,89:E,90:A},{30:64,33:62,75:I,89:E,90:A},t(M,[2,29]),t(M,[2,30]),t(M,[2,31]),t(M,[2,32]),t(M,[2,33]),t(M,[2,34]),t(R,[2,81]),t(R,[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(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:L,66:_,67:D,68:N,69:O,70:P,71:B},{62:77,65:L,66:_,67:D,68:N,69:O,70:P,71:B},{30:78,33:62,75:I,89:E,90:A},{73:79,75:G,76:$,78:81,79:82,80:U,81:X,82:ee,83:Y,84:oe,85:Q,86:ue,87:re,88:te},t(Z,[2,60]),t(Z,[2,62]),{73:93,75:G,76:$,78:81,79:82,80:U,81:X,82:ee,83:Y,84:oe,85:Q,86:ue,87:re,88:te},{30:94,33:62,75:I,76:$,89:E,90:A},{5:[1,95]},{30:96,33:62,75:I,89:E,90:A},{5:[1,97]},{30:98,33:62,75:I,89:E,90:A},{63:[1,99]},t(j,[2,50]),t(j,[2,51]),t(j,[2,52]),t(j,[2,53]),t(j,[2,54]),t(j,[2,55]),t(j,[2,56]),{64:[1,100]},t(C,[2,59],{76:$}),t(C,[2,64],{76:ae}),{33:103,75:[1,102],89:E,90:A},t(K,[2,65],{79:104,75:G,80:U,81:X,82:ee,83:Y,84:oe,85:Q,86:ue,87:re,88:te}),t(de,[2,67]),t(de,[2,69]),t(de,[2,70]),t(de,[2,71]),t(de,[2,72]),t(de,[2,73]),t(de,[2,74]),t(de,[2,75]),t(de,[2,76]),t(de,[2,77]),t(de,[2,78]),t(C,[2,57],{76:ae}),t(C,[2,58],{76:$}),{5:ne,28:105,31:be,34:W,36:Ve,38:pe,40:Be},{27:[1,112],76:$},{5:Ye,40:qe,56:113,57:Le,59:Me},{27:[1,118],76:$},{33:119,89:E,90:A},{33:120,89:E,90:A},{75:G,78:121,79:82,80:U,81:X,82:ee,83:Y,84:oe,85:Q,86:ue,87:re,88:te},t(Z,[2,61]),t(Z,[2,63]),t(de,[2,68]),t(C,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:ne,28:126,31:be,34:W,36:Ve,38:pe,40:Be},t(C,[2,28]),{5:[1,127]},t(C,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ye,40:qe,56:130,57:Le,59:Me},t(C,[2,47]),{5:[1,131]},t(C,[2,48]),t(C,[2,49]),t(K,[2,66],{79:104,75:G,80:U,81:X,82:ee,83:Y,84:oe,85:Q,86:ue,87:re,88:te}),{33:132,89:E,90:A},{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(C,[2,27]),{5:ne,28:145,31:be,34:W,36:Ve,38:pe,40:Be},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(C,[2,46]),{5:Ye,40:qe,56:152,57:Le,59:Me},{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(C,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(C,[2,43]),{5:ne,28:159,31:be,34:W,36:Ve,38:pe,40:Be},{5:ne,28:160,31:be,34:W,36:Ve,38:pe,40:Be},{5:ne,28:161,31:be,34:W,36:Ve,38:pe,40:Be},{5:ne,28:162,31:be,34:W,36:Ve,38:pe,40:Be},{5:Ye,40:qe,56:163,57:Le,59:Me},{5:Ye,40:qe,56:164,57:Le,59:Me},t(C,[2,23]),t(C,[2,24]),t(C,[2,25]),t(C,[2,26]),t(C,[2,44]),t(C,[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:x(function(ye,H){if(H.recoverable)this.trace(ye);else{var he=new Error(ye);throw he.hash=H,he}},"parseError"),parse:x(function(ye){var H=this,he=[0],z=[],se=[null],le=[],ke=this.table,ve="",me=0,Ie=0,_e=0,ze=2,Xe=1,ft=le.slice.call(arguments,1),We=Object.create(this.lexer),Oe={yy:{}};for(var Ke in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ke)&&(Oe.yy[Ke]=this.yy[Ke]);We.setInput(ye,Oe.yy),Oe.yy.lexer=We,Oe.yy.parser=this,typeof We.yylloc>"u"&&(We.yylloc={});var Ue=We.yylloc;le.push(Ue);var nt=We.options&&We.options.ranges;typeof Oe.yy.parseError=="function"?this.parseError=Oe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Dt(Zt){he.length=he.length-2*Zt,se.length=se.length-Zt,le.length=le.length-Zt}x(Dt,"popStack");function ut(){var Zt;return Zt=z.pop()||We.lex()||Xe,typeof Zt!="number"&&(Zt instanceof Array&&(z=Zt,Zt=z.pop()),Zt=H.symbols_[Zt]||Zt),Zt}x(ut,"lex");for(var kt,ot,Qe,dt,gt,ht,st={},Br,wt,mn,Ir;;){if(Qe=he[he.length-1],this.defaultActions[Qe]?dt=this.defaultActions[Qe]:((kt===null||typeof kt>"u")&&(kt=ut()),dt=ke[Qe]&&ke[Qe][kt]),typeof dt>"u"||!dt.length||!dt[0]){var er="";Ir=[];for(Br in ke[Qe])this.terminals_[Br]&&Br>ze&&Ir.push("'"+this.terminals_[Br]+"'");We.showPosition?er="Parse error on line "+(me+1)+`: `+We.showPosition()+` Expecting `+Ir.join(", ")+", got '"+(this.terminals_[kt]||kt)+"'":er="Parse error on line "+(me+1)+": Unexpected "+(kt==Xe?"end of input":"'"+(this.terminals_[kt]||kt)+"'"),this.parseError(er,{text:We.match,token:this.terminals_[kt]||kt,line:We.yylineno,loc:Ue,expected:Ir})}if(dt[0]instanceof Array&&dt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Qe+", token: "+kt);switch(dt[0]){case 1:he.push(kt),se.push(We.yytext),le.push(We.yylloc),he.push(dt[1]),kt=null,ot?(kt=ot,ot=null):(Ie=We.yyleng,ve=We.yytext,me=We.yylineno,Ue=We.yylloc,_e>0&&_e--);break;case 2:if(wt=this.productions_[dt[1]][1],st.$=se[se.length-wt],st._$={first_line:le[le.length-(wt||1)].first_line,last_line:le[le.length-1].last_line,first_column:le[le.length-(wt||1)].first_column,last_column:le[le.length-1].last_column},nt&&(st._$.range=[le[le.length-(wt||1)].range[0],le[le.length-1].range[1]]),ht=this.performAction.apply(st,[ve,Ie,me,Oe.yy,dt[1],se,le].concat(ft)),typeof ht<"u")return ht;wt&&(he=he.slice(0,-1*wt*2),se=se.slice(0,-1*wt),le=le.slice(0,-1*wt)),he.push(this.productions_[dt[1]][0]),se.push(st.$),le.push(st._$),mn=ke[he[he.length-2]][he[he.length-1]],he.push(mn);break;case 3:return!0}}return!0},"parse")},Ce=function(){var fe={EOF:1,parseError:x(function(H,he){if(this.yy.parser)this.yy.parser.parseError(H,he);else throw new Error(H)},"parseError"),setInput:x(function(ye,H){return this.yy=H||this.yy||{},this._input=ye,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var ye=this._input[0];this.yytext+=ye,this.yyleng++,this.offset++,this.match+=ye,this.matched+=ye;var H=ye.match(/(?:\r\n?|\n).*/g);return H?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ye},"input"),unput:x(function(ye){var H=ye.length,he=ye.split(/(?:\r\n?|\n)/g);this._input=ye+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-H),this.offset-=H;var z=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),he.length-1&&(this.yylineno-=he.length-1);var se=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:he?(he.length===z.length?this.yylloc.first_column:0)+z[z.length-he.length].length-he[0].length:this.yylloc.first_column-H},this.options.ranges&&(this.yylloc.range=[se[0],se[0]+this.yyleng-H]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(ye){this.unput(this.match.slice(ye))},"less"),pastInput:x(function(){var ye=this.matched.substr(0,this.matched.length-this.match.length);return(ye.length>20?"...":"")+ye.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var ye=this.match;return ye.length<20&&(ye+=this._input.substr(0,20-ye.length)),(ye.substr(0,20)+(ye.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var ye=this.pastInput(),H=new Array(ye.length+1).join("-");return ye+this.upcomingInput()+` `+H+"^"},"showPosition"),test_match:x(function(ye,H){var he,z,se;if(this.options.backtrack_lexer&&(se={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&&(se.yylloc.range=this.yylloc.range.slice(0))),z=ye[0].match(/(?:\r\n?|\n).*/g),z&&(this.yylineno+=z.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:z?z[z.length-1].length-z[z.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ye[0].length},this.yytext+=ye[0],this.match+=ye[0],this.matches=ye,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(ye[0].length),this.matched+=ye[0],he=this.performAction.call(this,this.yy,this,H,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),he)return he;if(this._backtrack){for(var le in se)this[le]=se[le];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ye,H,he,z;this._more||(this.yytext="",this.match="");for(var se=this._currentRules(),le=0;leH[0].length)){if(H=he,z=le,this.options.backtrack_lexer){if(ye=this.test_match(he,se[le]),ye!==!1)return ye;if(this._backtrack){H=!1;continue}else return!1}else if(!this.options.flex)break}return H?(ye=this.test_match(H,se[z]),ye!==!1?ye:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var H=this.next();return H||this.lex()},"lex"),begin:x(function(H){this.conditionStack.push(H)},"begin"),popState:x(function(){var H=this.conditionStack.length-1;return H>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(H){return H=this.conditionStack.length-1-Math.abs(H||0),H>=0?this.conditionStack[H]:"INITIAL"},"topState"),pushState:x(function(H){this.begin(H)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(H,he,z,se){var le=se;switch(z){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return he.yytext=he.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return fe}();Ne.lexer=Ce;function Fe(){this.yy={}}return x(Fe,"Parser"),Fe.prototype=Ne,Ne.Parser=Fe,new Fe}();TP.parser=TP;xHe=TP,bHe=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=Er,this.getAccTitle=Cr,this.setAccDescription=Ar,this.getAccDescription=_r,this.setDiagramTitle=Dr,this.getDiagramTitle=Lr,this.getConfig=x(()=>we().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{x(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){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=t)}setNewReqText(t){this.latestRequirement!==void 0&&(this.latestRequirement.text=t)}setNewReqRisk(t){this.latestRequirement!==void 0&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){this.latestRequirement!==void 0&&(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"]}),J.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){this.latestElement!==void 0&&(this.latestElement.type=t)}setNewElementDocRef(t){this.latestElement!==void 0&&(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,mr()}setCssStyle(t,e){for(let r of t){let n=this.requirements.get(r)??this.elements.get(r);if(!e||!n)return;for(let i of e)i.includes(",")?n.cssStyles.push(...i.split(",")):n.cssStyles.push(i)}}setClass(t,e){for(let r of t){let n=this.requirements.get(r)??this.elements.get(r);if(n)for(let i of e){n.classes.push(i);let a=this.classes.get(i)?.styles;a&&n.cssStyles.push(...a)}}}defineClass(t,e){for(let r of t){let n=this.classes.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},this.classes.set(r,n)),e&&e.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)}),this.requirements.forEach(i=>{i.classes.includes(r)&&i.cssStyles.push(...e.flatMap(a=>a.split(",")))}),this.elements.forEach(i=>{i.classes.includes(r)&&i.cssStyles.push(...e.flatMap(a=>a.split(",")))})}}getClasses(){return this.classes}getData(){let t=we(),e=[],r=[];for(let n of this.requirements.values()){let i=n;i.id=n.name,i.cssStyles=n.cssStyles,i.cssClasses=n.classes.join(" "),i.shape="requirementBox",i.look=t.look,e.push(i)}for(let n of this.elements.values()){let i=n;i.shape="requirementBox",i.look=t.look,i.id=n.name,i.cssStyles=n.cssStyles,i.cssClasses=n.classes.join(" "),e.push(i)}for(let n of this.relations){let i=0,a=n.type===this.Relationships.CONTAINS,s={id:`${n.src}-${n.dst}-${i}`,start:this.requirements.get(n.src)?.name??this.elements.get(n.src)?.name,end:this.requirements.get(n.dst)?.name??this.elements.get(n.dst)?.name,label:`<<${n.type}>>`,classes:"relationshipLine",style:["fill:none",a?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:a?"normal":"dashed",arrowTypeStart:a?"requirement_contains":"",arrowTypeEnd:a?"":"requirement_arrow",look:t.look};r.push(s),i++}return{nodes:e,edges:r,other:{},config:t,direction:this.getDirection()}}},wHe=x(t=>` marker { fill: ${t.relationColor}; stroke: ${t.relationColor}; } marker.cross { stroke: ${t.lineColor}; } svg { font-family: ${t.fontFamily}; font-size: ${t.fontSize}; } .reqBox { fill: ${t.requirementBackground}; fill-opacity: 1.0; stroke: ${t.requirementBorderColor}; stroke-width: ${t.requirementBorderSize}; } .reqTitle, .reqLabel{ fill: ${t.requirementTextColor}; } .reqLabelBox { fill: ${t.relationLabelBackground}; fill-opacity: 1.0; } .req-title-line { stroke: ${t.requirementBorderColor}; stroke-width: ${t.requirementBorderSize}; } .relationshipLine { stroke: ${t.relationColor}; stroke-width: 1; } .relationshipLabel { fill: ${t.relationLabelColor}; } .divider { stroke: ${t.nodeBorder}; stroke-width: 1; } .label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } .label text,span { fill: ${t.nodeTextColor||t.textColor}; color: ${t.nodeTextColor||t.textColor}; } .labelBkg { background-color: ${t.edgeLabelBackground}; } `,"getStyles"),THe=wHe,Uge={};ah(Uge,{draw:()=>kHe});kHe=x(async function(t,e,r,n){J.info("REF0:"),J.info("Drawing requirement diagram (unified)",e);let{securityLevel:i,state:a,layout:s}=we(),o=n.db.getData(),l=Ho(e,i);o.type=n.type,o.layoutAlgorithm=Ic(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=e,await zo(o,l);let u=8;zt.insertTitle(l,"requirementDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Bs(l,u,"requirementDiagram",a?.useMaxWidth??!0)},"draw"),EHe={parser:xHe,get db(){return new bHe},renderer:Uge,styles:THe}});var nme={};hr(nme,{diagram:()=>uYe});async function Zge(t,e){rt.bumpVerticalPos(10);let{startx:r,stopx:n,message:i}=e,a=Je.splitBreaks(i).length,s=Dn(i),o=s?await ap(i,we()):zt.calculateTextDimensions(i,H0(De));if(!s){let f=o.height/a;e.height+=f,rt.bumpVerticalPos(f)}let l,u=o.height-10,h=o.width;if(r===n){l=rt.getVerticalPos()+u,De.rightAngles||(u+=De.boxMargin,l=rt.getVerticalPos()+u),u+=30;let f=Je.getMax(h/2,De.width/2);rt.insert(r-f,rt.getVerticalPos()-10+u,n+f,rt.getVerticalPos()+30+u)}else u+=De.boxMargin,l=rt.getVerticalPos()+u,rt.insert(r,l-10,n,l);return rt.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,rt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}function Ml(t,e,r,n,i){rt.bumpVerticalPos(r);let a=n;if(e.id&&e.message&&t[e.id]){let s=t[e.id].width,o=H0(De);e.message=zt.wrapLabel(`[${e.message}]`,s-2*De.wrapPadding,o),e.width=s,e.wrap=!0;let l=zt.calculateTextDimensions(e.message,o),u=Je.getMax(l.height,De.labelBoxHeight);a=n+u,J.debug(`${u} - ${e.message}`)}i(e),rt.bumpVerticalPos(a)}function eme(t,e,r,n,i,a,s){function o(h,f){h.x{let s=H0(De),o=a.actorKeys.reduce((f,d)=>f+=t.get(d).width+(t.get(d).margin||0),0),l=De.boxMargin*8;o+=l,o-=2*De.boxTextMargin,a.wrap&&(a.name=zt.wrapLabel(a.name,o-2*De.wrapPadding,s));let u=zt.calculateTextDimensions(a.name,s);i=Je.getMax(u.height,i);let h=Je.getMax(o,u.width+2*De.wrapPadding);if(a.margin=De.boxTextMargin,oa.textMaxHeight=i),Je.getMax(n,De.height)}var CP,kP,SHe,CHe,AHe,_He,uS,LHe,RHe,IHe,W0,zf,Gf,fS,$f,Pb,NHe,dS,hS,M1,Yge,Nr,Xge,DHe,MHe,OHe,PHe,BHe,FHe,$He,zHe,GHe,VHe,UHe,qHe,WHe,jge,HHe,YHe,XHe,jHe,KHe,ZHe,QHe,Kge,JHe,eh,eYe,fi,De,rt,tYe,H0,D1,EP,rYe,nYe,SP,Qge,Jge,pS,Hge,iYe,aYe,sYe,oYe,lYe,cYe,uYe,ime=F(()=>{$k();vy();mN();hn();vr();rr();cr();CP=Fa(Np(),1),kP=function(){var t=x(function(te,Z,j,ae){for(j=j||{},ae=te.length;ae--;j[te[ae]]=Z);return j},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,13],l=[1,14],u=[1,16],h=[1,17],f=[1,18],d=[1,24],p=[1,25],g=[1,26],m=[1,27],v=[1,28],y=[1,29],b=[1,30],w=[1,31],S=[1,32],T=[1,33],E=[1,34],A=[1,35],C=[1,36],I=[1,37],M=[1,38],R=[1,39],k=[1,41],L=[1,42],_=[1,43],D=[1,44],N=[1,45],O=[1,46],P=[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,55,60,61,62,63,71],B=[2,71],G=[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,55,60,61,62,63,71],U=[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,55,60,61,62,63,71],X=[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,55,60,61,62,63,71],ee=[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,55,60,61,62,63,71],Y=[69,70,71],oe=[1,127],Q={trace:x(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,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$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",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"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],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:x(function(Z,j,ae,K,de,ne,be){var W=ne.length-1;switch(de){case 3:return K.apply(ne[W]),ne[W];break;case 4:case 9:this.$=[];break;case 5:case 10:ne[W-1].push(ne[W]),this.$=ne[W-1];break;case 6:case 7:case 11:case 12:this.$=ne[W];break;case 8:case 13:this.$=[];break;case 15:ne[W].type="createParticipant",this.$=ne[W];break;case 16:ne[W-1].unshift({type:"boxStart",boxData:K.parseBoxData(ne[W-2])}),ne[W-1].push({type:"boxEnd",boxText:ne[W-2]}),this.$=ne[W-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(ne[W-2]),sequenceIndexStep:Number(ne[W-1]),sequenceVisible:!0,signalType:K.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(ne[W-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:K.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:K.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:K.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:K.LINETYPE.ACTIVE_START,actor:ne[W-1].actor};break;case 23:this.$={type:"activeEnd",signalType:K.LINETYPE.ACTIVE_END,actor:ne[W-1].actor};break;case 29:K.setDiagramTitle(ne[W].substring(6)),this.$=ne[W].substring(6);break;case 30:K.setDiagramTitle(ne[W].substring(7)),this.$=ne[W].substring(7);break;case 31:this.$=ne[W].trim(),K.setAccTitle(this.$);break;case 32:case 33:this.$=ne[W].trim(),K.setAccDescription(this.$);break;case 34:ne[W-1].unshift({type:"loopStart",loopText:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.LOOP_START}),ne[W-1].push({type:"loopEnd",loopText:ne[W-2],signalType:K.LINETYPE.LOOP_END}),this.$=ne[W-1];break;case 35:ne[W-1].unshift({type:"rectStart",color:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.RECT_START}),ne[W-1].push({type:"rectEnd",color:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.RECT_END}),this.$=ne[W-1];break;case 36:ne[W-1].unshift({type:"optStart",optText:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.OPT_START}),ne[W-1].push({type:"optEnd",optText:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.OPT_END}),this.$=ne[W-1];break;case 37:ne[W-1].unshift({type:"altStart",altText:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.ALT_START}),ne[W-1].push({type:"altEnd",signalType:K.LINETYPE.ALT_END}),this.$=ne[W-1];break;case 38:ne[W-1].unshift({type:"parStart",parText:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.PAR_START}),ne[W-1].push({type:"parEnd",signalType:K.LINETYPE.PAR_END}),this.$=ne[W-1];break;case 39:ne[W-1].unshift({type:"parStart",parText:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.PAR_OVER_START}),ne[W-1].push({type:"parEnd",signalType:K.LINETYPE.PAR_END}),this.$=ne[W-1];break;case 40:ne[W-1].unshift({type:"criticalStart",criticalText:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.CRITICAL_START}),ne[W-1].push({type:"criticalEnd",signalType:K.LINETYPE.CRITICAL_END}),this.$=ne[W-1];break;case 41:ne[W-1].unshift({type:"breakStart",breakText:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.BREAK_START}),ne[W-1].push({type:"breakEnd",optText:K.parseMessage(ne[W-2]),signalType:K.LINETYPE.BREAK_END}),this.$=ne[W-1];break;case 43:this.$=ne[W-3].concat([{type:"option",optionText:K.parseMessage(ne[W-1]),signalType:K.LINETYPE.CRITICAL_OPTION},ne[W]]);break;case 45:this.$=ne[W-3].concat([{type:"and",parText:K.parseMessage(ne[W-1]),signalType:K.LINETYPE.PAR_AND},ne[W]]);break;case 47:this.$=ne[W-3].concat([{type:"else",altText:K.parseMessage(ne[W-1]),signalType:K.LINETYPE.ALT_ELSE},ne[W]]);break;case 48:ne[W-3].draw="participant",ne[W-3].type="addParticipant",ne[W-3].description=K.parseMessage(ne[W-1]),this.$=ne[W-3];break;case 49:ne[W-1].draw="participant",ne[W-1].type="addParticipant",this.$=ne[W-1];break;case 50:ne[W-3].draw="actor",ne[W-3].type="addParticipant",ne[W-3].description=K.parseMessage(ne[W-1]),this.$=ne[W-3];break;case 51:ne[W-1].draw="actor",ne[W-1].type="addParticipant",this.$=ne[W-1];break;case 52:ne[W-1].type="destroyParticipant",this.$=ne[W-1];break;case 53:ne[W-1].draw="participant",ne[W-1].type="addParticipant",this.$=ne[W-1];break;case 54:this.$=[ne[W-1],{type:"addNote",placement:ne[W-2],actor:ne[W-1].actor,text:ne[W]}];break;case 55:ne[W-2]=[].concat(ne[W-1],ne[W-1]).slice(0,2),ne[W-2][0]=ne[W-2][0].actor,ne[W-2][1]=ne[W-2][1].actor,this.$=[ne[W-1],{type:"addNote",placement:K.PLACEMENT.OVER,actor:ne[W-2].slice(0,2),text:ne[W]}];break;case 56:this.$=[ne[W-1],{type:"addLinks",actor:ne[W-1].actor,text:ne[W]}];break;case 57:this.$=[ne[W-1],{type:"addALink",actor:ne[W-1].actor,text:ne[W]}];break;case 58:this.$=[ne[W-1],{type:"addProperties",actor:ne[W-1].actor,text:ne[W]}];break;case 59:this.$=[ne[W-1],{type:"addDetails",actor:ne[W-1].actor,text:ne[W]}];break;case 62:this.$=[ne[W-2],ne[W]];break;case 63:this.$=ne[W];break;case 64:this.$=K.PLACEMENT.LEFTOF;break;case 65:this.$=K.PLACEMENT.RIGHTOF;break;case 66:this.$=[ne[W-4],ne[W-1],{type:"addMessage",from:ne[W-4].actor,to:ne[W-1].actor,signalType:ne[W-3],msg:ne[W],activate:!0},{type:"activeStart",signalType:K.LINETYPE.ACTIVE_START,actor:ne[W-1].actor}];break;case 67:this.$=[ne[W-4],ne[W-1],{type:"addMessage",from:ne[W-4].actor,to:ne[W-1].actor,signalType:ne[W-3],msg:ne[W]},{type:"activeEnd",signalType:K.LINETYPE.ACTIVE_END,actor:ne[W-4].actor}];break;case 68:this.$=[ne[W-3],ne[W-1],{type:"addMessage",from:ne[W-3].actor,to:ne[W-1].actor,signalType:ne[W-2],msg:ne[W]}];break;case 69:this.$={type:"addParticipant",actor:ne[W-1],config:ne[W]};break;case 70:this.$=ne[W-1].trim();break;case 71:this.$={type:"addParticipant",actor:ne[W]};break;case 72:this.$=K.LINETYPE.SOLID_OPEN;break;case 73:this.$=K.LINETYPE.DOTTED_OPEN;break;case 74:this.$=K.LINETYPE.SOLID;break;case 75:this.$=K.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=K.LINETYPE.DOTTED;break;case 77:this.$=K.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=K.LINETYPE.SOLID_CROSS;break;case 79:this.$=K.LINETYPE.DOTTED_CROSS;break;case 80:this.$=K.LINETYPE.SOLID_POINT;break;case 81:this.$=K.LINETYPE.DOTTED_POINT;break;case 82:this.$=K.parseMessage(ne[W].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},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,55,60,61,62,63,71],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,12:12,13:o,14:l,17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:b,38:w,39:S,41:T,43:E,44:A,46:C,50:I,52:M,53:R,55:k,60:L,61:_,62:D,63:N,71:O},t(P,[2,5]),{9:47,12:12,13:o,14:l,17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:b,38:w,39:S,41:T,43:E,44:A,46:C,50:I,52:M,53:R,55:k,60:L,61:_,62:D,63:N,71:O},t(P,[2,7]),t(P,[2,8]),t(P,[2,14]),{12:48,50:I,52:M,53:R},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:O},{22:55,71:O},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(P,[2,29]),t(P,[2,30]),{32:[1,61]},{34:[1,62]},t(P,[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,54:72,71:[1,73]},{22:74,71:O},{22:75,71:O},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:O},{22:92,71:O},{22:93,71:O},{22:94,71:O},t([5,51,65,76,77,78,79,80,81,82,83,84,85,86],B),t(P,[2,6]),t(P,[2,15]),t(G,[2,9],{10:95}),t(P,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},t(P,[2,21]),{5:[1,99]},{5:[1,100]},t(P,[2,24]),t(P,[2,25]),t(P,[2,26]),t(P,[2,27]),t(P,[2,28]),t(P,[2,31]),t(P,[2,32]),t($,i,{7:101}),t($,i,{7:102}),t($,i,{7:103}),t(U,i,{40:104,7:105}),t(X,i,{42:106,7:107}),t(X,i,{7:107,42:108}),t(ee,i,{45:109,7:110}),t($,i,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},t([5,51],B,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:O},t(Y,[2,72]),t(Y,[2,73]),t(Y,[2,74]),t(Y,[2,75]),t(Y,[2,76]),t(Y,[2,77]),t(Y,[2,78]),t(Y,[2,79]),t(Y,[2,80]),t(Y,[2,81]),{22:123,71:O},{22:125,59:124,71:O},{71:[2,64]},{71:[2,65]},{57:126,86:oe},{57:128,86:oe},{57:129,86:oe},{57:130,86:oe},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:I,52:M,53:R},{5:[1,136]},t(P,[2,19]),t(P,[2,20]),t(P,[2,22]),t(P,[2,23]),{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,137],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:b,38:w,39:S,41:T,43:E,44:A,46:C,50:I,52:M,53:R,55:k,60:L,61:_,62:D,63:N,71:O},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,138],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:b,38:w,39:S,41:T,43:E,44:A,46:C,50:I,52:M,53:R,55:k,60:L,61:_,62:D,63:N,71:O},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,139],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:b,38:w,39:S,41:T,43:E,44:A,46:C,50:I,52:M,53:R,55:k,60:L,61:_,62:D,63:N,71:O},{16:[1,140]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,46],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:b,38:w,39:S,41:T,43:E,44:A,46:C,49:[1,141],50:I,52:M,53:R,55:k,60:L,61:_,62:D,63:N,71:O},{16:[1,142]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,44],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:b,38:w,39:S,41:T,43:E,44:A,46:C,48:[1,143],50:I,52:M,53:R,55:k,60:L,61:_,62:D,63:N,71:O},{16:[1,144]},{16:[1,145]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,42],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:b,38:w,39:S,41:T,43:E,44:A,46:C,47:[1,146],50:I,52:M,53:R,55:k,60:L,61:_,62:D,63:N,71:O},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,147],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:v,36:y,37:b,38:w,39:S,41:T,43:E,44:A,46:C,50:I,52:M,53:R,55:k,60:L,61:_,62:D,63:N,71:O},{15:[1,148]},t(P,[2,49]),t(P,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},t(P,[2,51]),t(P,[2,52]),{22:151,71:O},{22:152,71:O},{57:153,86:oe},{57:154,86:oe},{57:155,86:oe},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},t(P,[2,16]),t(G,[2,10]),{12:157,50:I,52:M,53:R},t(G,[2,12]),t(G,[2,13]),t(P,[2,18]),t(P,[2,34]),t(P,[2,35]),t(P,[2,36]),t(P,[2,37]),{15:[1,158]},t(P,[2,38]),{15:[1,159]},t(P,[2,39]),t(P,[2,40]),{15:[1,160]},t(P,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:oe},{57:165,86:oe},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:O},t(G,[2,11]),t(U,i,{7:105,40:167}),t(X,i,{7:107,42:168}),t(ee,i,{7:110,45:169}),t(P,[2,48]),{5:[2,70]},t(P,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:x(function(Z,j){if(j.recoverable)this.trace(Z);else{var ae=new Error(Z);throw ae.hash=j,ae}},"parseError"),parse:x(function(Z){var j=this,ae=[0],K=[],de=[null],ne=[],be=this.table,W="",Ve=0,pe=0,Be=0,Ye=2,qe=1,Le=ne.slice.call(arguments,1),Me=Object.create(this.lexer),Ne={yy:{}};for(var Ce in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ce)&&(Ne.yy[Ce]=this.yy[Ce]);Me.setInput(Z,Ne.yy),Ne.yy.lexer=Me,Ne.yy.parser=this,typeof Me.yylloc>"u"&&(Me.yylloc={});var Fe=Me.yylloc;ne.push(Fe);var fe=Me.options&&Me.options.ranges;typeof Ne.yy.parseError=="function"?this.parseError=Ne.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ye(We){ae.length=ae.length-2*We,de.length=de.length-We,ne.length=ne.length-We}x(ye,"popStack");function H(){var We;return We=K.pop()||Me.lex()||qe,typeof We!="number"&&(We instanceof Array&&(K=We,We=K.pop()),We=j.symbols_[We]||We),We}x(H,"lex");for(var he,z,se,le,ke,ve,me={},Ie,_e,ze,Xe;;){if(se=ae[ae.length-1],this.defaultActions[se]?le=this.defaultActions[se]:((he===null||typeof he>"u")&&(he=H()),le=be[se]&&be[se][he]),typeof le>"u"||!le.length||!le[0]){var ft="";Xe=[];for(Ie in be[se])this.terminals_[Ie]&&Ie>Ye&&Xe.push("'"+this.terminals_[Ie]+"'");Me.showPosition?ft="Parse error on line "+(Ve+1)+`: `+Me.showPosition()+` Expecting `+Xe.join(", ")+", got '"+(this.terminals_[he]||he)+"'":ft="Parse error on line "+(Ve+1)+": Unexpected "+(he==qe?"end of input":"'"+(this.terminals_[he]||he)+"'"),this.parseError(ft,{text:Me.match,token:this.terminals_[he]||he,line:Me.yylineno,loc:Fe,expected:Xe})}if(le[0]instanceof Array&&le.length>1)throw new Error("Parse Error: multiple actions possible at state: "+se+", token: "+he);switch(le[0]){case 1:ae.push(he),de.push(Me.yytext),ne.push(Me.yylloc),ae.push(le[1]),he=null,z?(he=z,z=null):(pe=Me.yyleng,W=Me.yytext,Ve=Me.yylineno,Fe=Me.yylloc,Be>0&&Be--);break;case 2:if(_e=this.productions_[le[1]][1],me.$=de[de.length-_e],me._$={first_line:ne[ne.length-(_e||1)].first_line,last_line:ne[ne.length-1].last_line,first_column:ne[ne.length-(_e||1)].first_column,last_column:ne[ne.length-1].last_column},fe&&(me._$.range=[ne[ne.length-(_e||1)].range[0],ne[ne.length-1].range[1]]),ve=this.performAction.apply(me,[W,pe,Ve,Ne.yy,le[1],de,ne].concat(Le)),typeof ve<"u")return ve;_e&&(ae=ae.slice(0,-1*_e*2),de=de.slice(0,-1*_e),ne=ne.slice(0,-1*_e)),ae.push(this.productions_[le[1]][0]),de.push(me.$),ne.push(me._$),ze=be[ae[ae.length-2]][ae[ae.length-1]],ae.push(ze);break;case 3:return!0}}return!0},"parse")},ue=function(){var te={EOF:1,parseError:x(function(j,ae){if(this.yy.parser)this.yy.parser.parseError(j,ae);else throw new Error(j)},"parseError"),setInput:x(function(Z,j){return this.yy=j||this.yy||{},this._input=Z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var Z=this._input[0];this.yytext+=Z,this.yyleng++,this.offset++,this.match+=Z,this.matched+=Z;var j=Z.match(/(?:\r\n?|\n).*/g);return j?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Z},"input"),unput:x(function(Z){var j=Z.length,ae=Z.split(/(?:\r\n?|\n)/g);this._input=Z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-j),this.offset-=j;var K=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ae.length-1&&(this.yylineno-=ae.length-1);var de=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ae?(ae.length===K.length?this.yylloc.first_column:0)+K[K.length-ae.length].length-ae[0].length:this.yylloc.first_column-j},this.options.ranges&&(this.yylloc.range=[de[0],de[0]+this.yyleng-j]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(Z){this.unput(this.match.slice(Z))},"less"),pastInput:x(function(){var Z=this.matched.substr(0,this.matched.length-this.match.length);return(Z.length>20?"...":"")+Z.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var Z=this.match;return Z.length<20&&(Z+=this._input.substr(0,20-Z.length)),(Z.substr(0,20)+(Z.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var Z=this.pastInput(),j=new Array(Z.length+1).join("-");return Z+this.upcomingInput()+` `+j+"^"},"showPosition"),test_match:x(function(Z,j){var ae,K,de;if(this.options.backtrack_lexer&&(de={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&&(de.yylloc.range=this.yylloc.range.slice(0))),K=Z[0].match(/(?:\r\n?|\n).*/g),K&&(this.yylineno+=K.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:K?K[K.length-1].length-K[K.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Z[0].length},this.yytext+=Z[0],this.match+=Z[0],this.matches=Z,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(Z[0].length),this.matched+=Z[0],ae=this.performAction.call(this,this.yy,this,j,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ae)return ae;if(this._backtrack){for(var ne in de)this[ne]=de[ne];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Z,j,ae,K;this._more||(this.yytext="",this.match="");for(var de=this._currentRules(),ne=0;nej[0].length)){if(j=ae,K=ne,this.options.backtrack_lexer){if(Z=this.test_match(ae,de[ne]),Z!==!1)return Z;if(this._backtrack){j=!1;continue}else return!1}else if(!this.options.flex)break}return j?(Z=this.test_match(j,de[K]),Z!==!1?Z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var j=this.next();return j||this.lex()},"lex"),begin:x(function(j){this.conditionStack.push(j)},"begin"),popState:x(function(){var j=this.conditionStack.length-1;return j>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(j){return j=this.conditionStack.length-1-Math.abs(j||0),j>=0?this.conditionStack[j]:"INITIAL"},"topState"),pushState:x(function(j){this.begin(j)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(j,ae,K,de){var ne=de;switch(K){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;break;case 8:return 74;case 9:return this.popState(),this.popState(),75;break;case 10:return ae.yytext=ae.yytext.trim(),71;break;case 11:return ae.yytext=ae.yytext.trim(),this.begin("ALIAS"),71;break;case 12:return this.begin("LINE"),14;break;case 13:return this.begin("ID"),50;break;case 14:return this.begin("ID"),52;break;case 15:return 13;case 16:return this.begin("ID"),53;break;case 17:return ae.yytext=ae.yytext.trim(),this.begin("ALIAS"),71;break;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 19:return this.popState(),this.popState(),5;break;case 20:return this.begin("LINE"),36;break;case 21:return this.begin("LINE"),37;break;case 22:return this.begin("LINE"),38;break;case 23:return this.begin("LINE"),39;break;case 24:return this.begin("LINE"),49;break;case 25:return this.begin("LINE"),41;break;case 26:return this.begin("LINE"),43;break;case 27:return this.begin("LINE"),48;break;case 28:return this.begin("LINE"),44;break;case 29:return this.begin("LINE"),47;break;case 30:return this.begin("LINE"),46;break;case 31:return this.popState(),15;break;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;break;case 42:return this.begin("ID"),23;break;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;break;case 46:return this.popState(),"acc_title_value";break;case 47:return this.begin("acc_descr"),33;break;case 48:return this.popState(),"acc_descr_value";break;case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 56:return 5;case 57:return ae.yytext=ae.yytext.trim(),71;break;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:return 86;case 69:return 86;case 70:return 69;case 71:return 70;case 72:return 5;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}};return te}();Q.lexer=ue;function re(){this.yy={}}return x(re,"Parser"),re.prototype=Q,Q.Parser=re,new re}();kP.parser=kP;SHe=kP,CHe={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},AHe={FILLED:0,OPEN:1},_He={LEFTOF:0,RIGHTOF:1,OVER:2},uS={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},LHe=class{constructor(){this.state=new Xk(()=>({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=Er,this.setAccDescription=Ar,this.setDiagramTitle=Dr,this.getAccTitle=Cr,this.getAccDescription=_r,this.getDiagramTitle=Lr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(we().wrap),this.LINETYPE=CHe,this.ARROWTYPE=AHe,this.PLACEMENT=_He}static{x(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,i){let a=this.state.records.currentBox,s;if(i!==void 0){let l;i.includes(` `)?l=i+` `:l=`{ `+i+` }`,s=Lh(l,{schema:_h})}n=s?.type??n;let o=this.state.records.actors.get(t);if(o){if(this.state.records.currentBox&&o.box&&this.state.records.currentBox!==o.box)throw new Error(`A same participant should only be defined in one Box: ${o.name} can't be in '${o.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=o.box?o.box:this.state.records.currentBox,o.box=a,o&&e===o.name&&r==null)return}if(r?.text==null&&(r={text:e,type:n}),(n==null||r.text==null)&&(r={text:e,type:n}),this.state.records.actors.set(t,{box:a,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){let l=this.state.records.actors.get(this.state.records.prevActor);l&&(l.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'"]},s}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 this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.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(t===void 0)return{};t=t.trim();let e=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(e===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:we().sequence?.wrap??!1}clear(){this.state.reset(),mr()}parseMessage(t){let e=t.trim(),{wrap:r,cleanedText:n}=this.extractWrap(e),i={text:n,wrap:r};return J.debug(`parseMessage: ${JSON.stringify(i)}`),i}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;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",n=t.trim());else{let s=new Option().style;s.color=r,s.color!==r&&(r="transparent",n=t.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(n);return{text:a?ar(a,we()):void 0,color:r,wrap:i}}addNote(t,e,r){let n={actor:t,placement:e,message:r.text,wrap:r.wrap??this.autoWrap()},i=[].concat(t,t);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){let r=this.getActor(t);try{let n=ar(e.text,we());n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");let i=JSON.parse(n);this.insertLinks(r,i)}catch(n){J.error("error while parsing actor link text",n)}}addALink(t,e){let r=this.getActor(t);try{let n={},i=ar(e.text,we()),a=i.indexOf("@");i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let s=i.slice(0,a-1).trim(),o=i.slice(a+1).trim();n[s]=o,this.insertLinks(r,n)}catch(n){J.error("error while parsing actor link text",n)}}insertLinks(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}addProperties(t,e){let r=this.getActor(t);try{let n=ar(e.text,we()),i=JSON.parse(n);this.insertProperties(r,i)}catch(n){J.error("error while parsing actor properties text",n)}}insertProperties(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){let r=this.getActor(t),n=document.getElementById(e.text);try{let i=n.innerHTML,a=JSON.parse(i);a.properties&&this.insertProperties(r,a.properties),a.links&&this.insertLinks(r,a.links)}catch(i){J.error("error while parsing actor details text",i)}}getActorProperty(t,e){if(t?.properties!==void 0)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(e=>{this.apply(e)});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,t.config);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,t.config),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":this.addSignal(t.actor,void 0,void 0,t.signalType);break;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":this.addSignal(void 0,void 0,t.altText,t.signalType);break;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":Er(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;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);break}}getConfig(){return we().sequence}},RHe=x(t=>`.actor { stroke: ${t.actorBorder}; fill: ${t.actorBkg}; } text.actor > tspan { fill: ${t.actorTextColor}; stroke: none; } .actor-line { stroke: ${t.actorLineColor}; } .innerArc { stroke-width: 1.5; stroke-dasharray: none; } .messageLine0 { stroke-width: 1.5; stroke-dasharray: none; stroke: ${t.signalColor}; } .messageLine1 { stroke-width: 1.5; stroke-dasharray: 2, 2; stroke: ${t.signalColor}; } #arrowhead path { fill: ${t.signalColor}; stroke: ${t.signalColor}; } .sequenceNumber { fill: ${t.sequenceNumberColor}; } #sequencenumber { fill: ${t.signalColor}; } #crosshead path { fill: ${t.signalColor}; stroke: ${t.signalColor}; } .messageText { fill: ${t.signalTextColor}; stroke: none; } .labelBox { stroke: ${t.labelBoxBorderColor}; fill: ${t.labelBoxBkgColor}; } .labelText, .labelText > tspan { fill: ${t.labelTextColor}; stroke: none; } .loopText, .loopText > tspan { fill: ${t.loopTextColor}; stroke: none; } .loopLine { stroke-width: 2px; stroke-dasharray: 2, 2; stroke: ${t.labelBoxBorderColor}; fill: ${t.labelBoxBorderColor}; } .note { //stroke: #decc93; stroke: ${t.noteBorderColor}; fill: ${t.noteBkgColor}; } .noteText, .noteText > tspan { fill: ${t.noteTextColor}; stroke: none; } .activation0 { fill: ${t.activationBkgColor}; stroke: ${t.activationBorderColor}; } .activation1 { fill: ${t.activationBkgColor}; stroke: ${t.activationBorderColor}; } .activation2 { fill: ${t.activationBkgColor}; stroke: ${t.activationBorderColor}; } .actorPopupMenu { position: absolute; } .actorPopupMenuPanel { position: absolute; fill: ${t.actorBkg}; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); } .actor-man line { stroke: ${t.actorBorder}; fill: ${t.actorBkg}; } .actor-man circle, line { stroke: ${t.actorBorder}; fill: ${t.actorBkg}; stroke-width: 2px; } `,"getStyles"),IHe=RHe,W0=18*2,zf="actor-top",Gf="actor-bottom",fS="actor-box",$f="actor-man",Pb=x(function(t,e){return h0(t,e)},"drawRect"),NHe=x(function(t,e,r,n,i){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let a=e.links,s=e.actorCnt,o=e.rectData;var l="none";i&&(l="block !important");let u=t.append("g");u.attr("id","actor"+s+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l);var h="";o.class!==void 0&&(h=" "+o.class);let f=o.width>r?o.width:r,d=u.append("rect");if(d.attr("class","actorPopupMenuPanel"+h),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",f),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),a!=null){var p=20;for(let v in a){var g=u.append("a"),m=(0,CP.sanitizeUrl)(a[v]);g.attr("xlink:href",m),g.attr("target","_blank"),eYe(n)(v,g,o.x+10,o.height+p,f,20,{class:"actor"},n),p+=30}}return d.attr("height",p),{height:o.height+p,width:f}},"drawPopup"),dS=x(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),hS=x(async function(t,e,r=null){let n=t.append("foreignObject"),i=await ph(e.text,or()),s=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),e.class==="noteText"){let o=t.node().firstChild;o.setAttribute("height",s.height+2*e.textMargin);let l=o.getBBox();n.attr("x",Math.round(l.x+l.width/2-s.width/2)).attr("y",Math.round(l.y+l.height/2-s.height/2))}else if(r){let{startx:o,stopx:l,starty:u}=r;if(o>l){let h=o;o=l,l=h}n.attr("x",Math.round(o+Math.abs(o-l)/2-s.width/2)),e.class==="loopText"?n.attr("y",Math.round(u)):n.attr("y",Math.round(u-s.height))}return[n]},"drawKatex"),M1=x(function(t,e){let r=0,n=0,i=e.text.split(Je.lineBreakRegex),[a,s]=fc(e.fontSize),o=[],l=0,u=x(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":u=x(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":u=x(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":u=x(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)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";break}for(let[h,f]of i.entries()){e.textMargin!==void 0&&e.textMargin===0&&a!==void 0&&(l=h*a);let d=t.append("text");d.attr("x",e.x),d.attr("y",u()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),s!==void 0&&d.style("font-size",s),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):l!==0&&d.attr("dy",l);let p=f||f_;if(e.tspan){let g=d.append("tspan");g.attr("x",e.x),e.fill!==void 0&&g.attr("fill",e.fill),g.text(p)}else d.text(p);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(d._groups||d)[0][0].getBBox().height,r=n),o.push(d)}return o},"drawText"),Yge=x(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}x(r,"genPoints");let n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,M1(t,e),n},"drawLabel"),Nr=-1,Xge=x((t,e,r,n)=>{t.select&&r.forEach(i=>{let a=e.get(i),s=t.select("#actor"+a.actorCnt);!n.mirrorActors&&a.stopy?s.attr("y2",a.stopy+a.height/2):n.mirrorActors&&s.attr("y2",a.stopy)})},"fixLifeLineHeights"),DHe=x(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t.append("g").lower();var l=o;n||(Nr++,Object.keys(e.links||{}).length&&!r.forceMenus&&l.attr("onclick",dS(`actor${Nr}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+Nr).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),l=o.append("g"),e.actorCnt=Nr,e.links!=null&&l.attr("id","root-"+Nr));let u=La();var h="actor";e.properties?.class?h=e.properties.class:u.fill="#eaeaea",n?h+=` ${Gf}`:h+=` ${zf}`,u.x=e.x,u.y=i,u.width=e.width,u.height=e.height,u.class=h,u.rx=3,u.ry=3,u.name=e.name;let f=Pb(l,u);if(e.rectData=u,e.properties?.icon){let p=e.properties.icon.trim();p.charAt(0)==="@"?Bk(l,u.x+u.width-20,u.y+10,p.substr(1)):Pk(l,u.x+u.width-20,u.y+10,p)}eh(r,Dn(e.description))(e.description,l,u.x,u.y,u.width,u.height,{class:`actor ${fS}`},r);let d=e.height;if(f.node){let p=f.node().getBBox();e.height=p.height,d=p.height}return d},"drawActorTypeParticipant"),MHe=x(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t.append("g").lower();var l=o;n||(Nr++,Object.keys(e.links||{}).length&&!r.forceMenus&&l.attr("onclick",dS(`actor${Nr}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+Nr).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),l=o.append("g"),e.actorCnt=Nr,e.links!=null&&l.attr("id","root-"+Nr));let u=La();var h="actor";e.properties?.class?h=e.properties.class:u.fill="#eaeaea",n?h+=` ${Gf}`:h+=` ${zf}`,u.x=e.x,u.y=i,u.width=e.width,u.height=e.height,u.class=h,u.name=e.name;let f=6,d={...u,x:u.x+-f,y:u.y+ +f,class:"actor"},p=Pb(l,u);if(Pb(l,d),e.rectData=u,e.properties?.icon){let m=e.properties.icon.trim();m.charAt(0)==="@"?Bk(l,u.x+u.width-20,u.y+10,m.substr(1)):Pk(l,u.x+u.width-20,u.y+10,m)}eh(r,Dn(e.description))(e.description,l,u.x-f,u.y+f,u.width,u.height,{class:`actor ${fS}`},r);let g=e.height;if(p.node){let m=p.node().getBBox();e.height=m.height,g=m.height}return g},"drawActorTypeCollections"),OHe=x(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t.append("g").lower(),l=o;n||(Nr++,Object.keys(e.links||{}).length&&!r.forceMenus&&l.attr("onclick",dS(`actor${Nr}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+Nr).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),l=o.append("g"),e.actorCnt=Nr,e.links!=null&&l.attr("id","root-"+Nr));let u=La(),h="actor";e.properties?.class?h=e.properties.class:u.fill="#eaeaea",n?h+=` ${Gf}`:h+=` ${zf}`,u.x=e.x,u.y=i,u.width=e.width,u.height=e.height,u.class=h,u.name=e.name;let f=u.height/2,d=f/(2.5+u.height/50),p=l.append("g"),g=l.append("g");if(p.append("path").attr("d",`M ${u.x},${u.y+f} a ${d},${f} 0 0 0 0,${u.height} h ${u.width-2*d} a ${d},${f} 0 0 0 0,-${u.height} Z `).attr("class",h),g.append("path").attr("d",`M ${u.x},${u.y+f} a ${d},${f} 0 0 0 0,${u.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",h),p.attr("transform",`translate(${d}, ${-(u.height/2)})`),g.attr("transform",`translate(${u.width-d}, ${-u.height/2})`),e.rectData=u,e.properties?.icon){let y=e.properties.icon.trim(),b=u.x+u.width-20,w=u.y+10;y.charAt(0)==="@"?Bk(l,b,w,y.substr(1)):Pk(l,b,w,y)}eh(r,Dn(e.description))(e.description,l,u.x,u.y,u.width,u.height,{class:`actor ${fS}`},r);let m=e.height,v=p.select("path:last-child");if(v.node()){let y=v.node().getBBox();e.height=y.height,m=y.height}return m},"drawActorTypeQueue"),PHe=x(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+75,o=t.append("g").lower();n||(Nr++,o.append("line").attr("id","actor"+Nr).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=Nr);let l=t.append("g"),u=$f;n?u+=` ${Gf}`:u+=` ${zf}`,l.attr("class",u),l.attr("name",e.name);let h=La();h.x=e.x,h.y=i,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor";let f=e.x+e.width/2,d=i+30,p=18;l.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),l.append("circle").attr("cx",f).attr("cy",d).attr("r",p).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),l.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${f}, ${d-p})`);let g=l.node().getBBox();return e.height=g.height+2*(r?.sequence?.labelBoxHeight??0),eh(r,Dn(e.description))(e.description,l,h.x,h.y+p+(n?5:10),h.width,h.height,{class:`actor ${$f}`},r),e.height},"drawActorTypeControl"),BHe=x(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+75,o=t.append("g").lower(),l=t.append("g"),u=$f;n?u+=` ${Gf}`:u+=` ${zf}`,l.attr("class",u),l.attr("name",e.name);let h=La();h.x=e.x,h.y=i,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor";let f=e.x+e.width/2,d=i+(n?10:25),p=18;l.append("circle").attr("cx",f).attr("cy",d).attr("r",p).attr("width",e.width).attr("height",e.height),l.append("line").attr("x1",f-p).attr("x2",f+p).attr("y1",d+p).attr("y2",d+p).attr("stroke","#333").attr("stroke-width",2);let g=l.node().getBBox();return e.height=g.height+(r?.sequence?.labelBoxHeight??0),n||(Nr++,o.append("line").attr("id","actor"+Nr).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=Nr),eh(r,Dn(e.description))(e.description,l,h.x,h.y+(n?(d-i+p-5)/2:(d+p-i)/2),h.width,h.height,{class:`actor ${$f}`},r),n?l.attr("transform",`translate(0, ${p/2})`):l.attr("transform",`translate(0, ${p/2})`),e.height},"drawActorTypeEntity"),FHe=x(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height+2*r.boxTextMargin,o=t.append("g").lower(),l=o;n||(Nr++,Object.keys(e.links||{}).length&&!r.forceMenus&&l.attr("onclick",dS(`actor${Nr}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+Nr).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),l=o.append("g"),e.actorCnt=Nr,e.links!=null&&l.attr("id","root-"+Nr));let u=La(),h="actor";e.properties?.class?h=e.properties.class:u.fill="#eaeaea",n?h+=` ${Gf}`:h+=` ${zf}`,u.x=e.x,u.y=i,u.width=e.width,u.height=e.height,u.class=h,u.name=e.name,u.x=e.x,u.y=i;let f=u.width/4,d=u.width/4,p=f/2,g=p/(2.5+f/50),m=l.append("g"),v=` M ${u.x},${u.y+g} a ${p},${g} 0 0 0 ${f},0 a ${p},${g} 0 0 0 -${f},0 l 0,${d-2*g} a ${p},${g} 0 0 0 ${f},0 l 0,-${d-2*g} `;m.append("path").attr("d",v).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",h),n?m.attr("transform",`translate(${f*1.5}, ${u.height/4-2*g})`):m.attr("transform",`translate(${f*1.5}, ${(u.height+g)/4})`),e.rectData=u,eh(r,Dn(e.description))(e.description,l,u.x,u.y+(n?(u.height+d)/4:(u.height+g)/2),u.width,u.height,{class:`actor ${fS}`},r);let y=m.select("path:last-child");if(y.node()){let b=y.node().getBBox();e.height=b.height+(r.sequence.labelBoxHeight??0)}return e.height},"drawActorTypeDatabase"),$He=x(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=30,l=t.append("g").lower();n||(Nr++,l.append("line").attr("id","actor"+Nr).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=Nr);let u=t.append("g"),h=$f;n?h+=` ${Gf}`:h+=` ${zf}`,u.attr("class",h),u.attr("name",e.name);let f=La();f.x=e.x,f.y=i,f.fill="#eaeaea",f.width=e.width,f.height=e.height,f.class="actor",u.append("line").attr("id","actor-man-torso"+Nr).attr("x1",e.x+e.width/2-o*2.5).attr("y1",i+10).attr("x2",e.x+e.width/2-15).attr("y2",i+10),u.append("line").attr("id","actor-man-arms"+Nr).attr("x1",e.x+e.width/2-o*2.5).attr("y1",i+0).attr("x2",e.x+e.width/2-o*2.5).attr("y2",i+20),u.append("circle").attr("cx",e.x+e.width/2).attr("cy",i+10).attr("r",o);let d=u.node().getBBox();return e.height=d.height+(r.sequence.labelBoxHeight??0),eh(r,Dn(e.description))(e.description,u,f.x,f.y+(n?o/2-4:o/2+3),f.width,f.height,{class:`actor ${$f}`},r),n?u.attr("transform",`translate(0,${o/2+7})`):u.attr("transform",`translate(0,${o/2+7})`),e.height},"drawActorTypeBoundary"),zHe=x(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower();n||(Nr++,o.append("line").attr("id","actor"+Nr).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=Nr);let l=t.append("g"),u=$f;n?u+=` ${Gf}`:u+=` ${zf}`,l.attr("class",u),l.attr("name",e.name);let h=La();h.x=e.x,h.y=i,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor",h.rx=3,h.ry=3,l.append("line").attr("id","actor-man-torso"+Nr).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+Nr).attr("x1",a-W0/2).attr("y1",i+33).attr("x2",a+W0/2).attr("y2",i+33),l.append("line").attr("x1",a-W0/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+W0/2-2).attr("y2",i+60);let f=l.append("circle");f.attr("cx",e.x+e.width/2),f.attr("cy",i+10),f.attr("r",15),f.attr("width",e.width),f.attr("height",e.height);let d=l.node().getBBox();return e.height=d.height,eh(r,Dn(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:`actor ${$f}`},r),e.height},"drawActorTypeActor"),GHe=x(async function(t,e,r,n){switch(e.type){case"actor":return await zHe(t,e,r,n);case"participant":return await DHe(t,e,r,n);case"boundary":return await $He(t,e,r,n);case"control":return await PHe(t,e,r,n);case"entity":return await BHe(t,e,r,n);case"database":return await FHe(t,e,r,n);case"collections":return await MHe(t,e,r,n);case"queue":return await OHe(t,e,r,n)}},"drawActor"),VHe=x(function(t,e,r){let i=t.append("g");jge(i,e),e.name&&eh(r)(e.name,i,e.x,e.y+r.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),i.lower()},"drawBox"),UHe=x(function(t){return t.append("g")},"anchorElement"),qHe=x(function(t,e,r,n,i){let a=La(),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,Pb(s,a)},"drawActivation"),WHe=x(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:u,messageFontWeight:h}=n,f=t.append("g"),d=x(function(m,v,y,b){return f.append("line").attr("x1",m).attr("y1",v).attr("x2",y).attr("y2",b).attr("class","loopLine")},"drawLoopLine");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),e.sections!==void 0&&e.sections.forEach(function(m){d(e.startx,m.y,e.stopx,m.y).style("stroke-dasharray","3, 3")});let p=Fk();p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=u,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",Yge(f,p),p=Kge(),p.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=u,p.fontWeight=h,p.wrap=!0;let g=Dn(p.text)?await hS(f,p,e):M1(f,p);if(e.sectionTitles!==void 0){for(let[m,v]of Object.entries(e.sectionTitles))if(v.message){p.text=v.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[m].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=e.wrap,Dn(p.text)?(e.starty=e.sections[m].y,await hS(f,p,e)):M1(f,p);let y=Math.round(g.map(b=>(b._groups||b)[0][0].getBBox().height).reduce((b,w)=>b+w));e.sections[m].height+=y-(i+a)}}return e.height=Math.round(e.stopy-e.starty),f},"drawLoop"),jge=x(function(t,e){Ok(t,e)},"drawBackgroundRect"),HHe=x(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"),YHe=x(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"),XHe=x(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"),jHe=x(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"),KHe=x(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"),ZHe=x(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"),QHe=x(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"),Kge=x(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"),JHe=x(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),eh=function(){function t(a,s,o,l,u,h,f){let d=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(a);i(d,f)}x(t,"byText");function e(a,s,o,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:g,actorFontWeight:m}=d,[v,y]=fc(p),b=a.split(Je.lineBreakRegex);for(let w=0;wt.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:x(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:x(function(t){this.boxes.push(t)},"addBox"),addActor:x(function(t){this.actors.push(t)},"addActor"),addLoop:x(function(t){this.loops.push(t)},"addLoop"),addMessage:x(function(t){this.messages.push(t)},"addMessage"),addNote:x(function(t){this.notes.push(t)},"addNote"),lastActor:x(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:x(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:x(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:x(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:x(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,Jge(we())},"init"),updateVal:x(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:x(function(t,e,r,n){let i=this,a=0;function s(o){return x(function(u){a++;let h=i.sequenceItems.length-a+1;i.updateVal(u,"starty",e-h*De.boxMargin,Math.min),i.updateVal(u,"stopy",n+h*De.boxMargin,Math.max),i.updateVal(rt.data,"startx",t-h*De.boxMargin,Math.min),i.updateVal(rt.data,"stopx",r+h*De.boxMargin,Math.max),o!=="activation"&&(i.updateVal(u,"startx",t-h*De.boxMargin,Math.min),i.updateVal(u,"stopx",r+h*De.boxMargin,Math.max),i.updateVal(rt.data,"starty",e-h*De.boxMargin,Math.min),i.updateVal(rt.data,"stopy",n+h*De.boxMargin,Math.max))},"updateItemBounds")}x(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:x(function(t,e,r,n){let i=Je.getMin(t,r),a=Je.getMax(t,r),s=Je.getMin(e,n),o=Je.getMax(e,n);this.updateVal(rt.data,"startx",i,Math.min),this.updateVal(rt.data,"starty",s,Math.min),this.updateVal(rt.data,"stopx",a,Math.max),this.updateVal(rt.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),newActivation:x(function(t,e,r){let n=r.get(t.from),i=pS(t.from).length||0,a=n.x+n.width/2+(i-1)*De.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+De.activationWidth,stopy:void 0,actor:t.from,anchored:fi.anchorElement(e)})},"newActivation"),endActivation:x(function(t){let e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:x(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:x(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:x(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:x(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:x(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:rt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:x(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:x(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:x(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=Je.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:x(function(){return this.verticalPos},"getVerticalPos"),getBounds:x(function(){return{bounds:this.data,models:this.models}},"getBounds")},tYe=x(async function(t,e){rt.bumpVerticalPos(De.boxMargin),e.height=De.boxMargin,e.starty=rt.getVerticalPos();let r=La();r.x=e.startx,r.y=e.starty,r.width=e.width||De.width,r.class="note";let n=t.append("g"),i=fi.drawRect(n,r),a=Fk();a.x=e.startx,a.y=e.starty,a.width=r.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=De.noteFontFamily,a.fontSize=De.noteFontSize,a.fontWeight=De.noteFontWeight,a.anchor=De.noteAlign,a.textMargin=De.noteMargin,a.valign="center";let s=Dn(a.text)?await hS(n,a):M1(n,a),o=Math.round(s.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,u)=>l+u));i.attr("height",o+2*De.noteMargin),e.height+=o+2*De.noteMargin,rt.bumpVerticalPos(o+2*De.noteMargin),e.stopy=e.starty+o+2*De.noteMargin,e.stopx=e.startx+r.width,rt.insert(e.startx,e.starty,e.stopx,e.stopy),rt.models.addNote(e)},"drawNote"),H0=x(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),D1=x(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),EP=x(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");x(Zge,"boundMessage");rYe=x(async function(t,e,r,n){let{startx:i,stopx:a,starty:s,message:o,type:l,sequenceIndex:u,sequenceVisible:h}=e,f=zt.calculateTextDimensions(o,H0(De)),d=Fk();d.x=i,d.y=s+10,d.width=a-i,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=De.messageFontFamily,d.fontSize=De.messageFontSize,d.fontWeight=De.messageFontWeight,d.anchor=De.messageAlign,d.valign="center",d.textMargin=De.wrapPadding,d.tspan=!1,Dn(d.text)?await hS(t,d,{startx:i,stopx:a,starty:r}):M1(t,d);let p=f.width,g;i===a?De.rightAngles?g=t.append("path").attr("d",`M ${i},${r} H ${i+Je.getMax(De.width/2,p/2)} V ${r+25} H ${i}`):g=t.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(g=t.append("line"),g.attr("x1",i),g.attr("y1",r),g.attr("x2",a),g.attr("y2",r)),l===n.db.LINETYPE.DOTTED||l===n.db.LINETYPE.DOTTED_CROSS||l===n.db.LINETYPE.DOTTED_POINT||l===n.db.LINETYPE.DOTTED_OPEN||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let m="";De.arrowMarkerAbsolute&&(m=lu(!0)),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(l===n.db.LINETYPE.SOLID||l===n.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+m+"#arrowhead)"),(l===n.db.LINETYPE.BIDIRECTIONAL_SOLID||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+m+"#arrowhead)"),g.attr("marker-end","url("+m+"#arrowhead)")),(l===n.db.LINETYPE.SOLID_POINT||l===n.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+m+"#filled-head)"),(l===n.db.LINETYPE.SOLID_CROSS||l===n.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+m+"#crosshead)"),(h||De.showSequenceNumbers)&&((l===n.db.LINETYPE.BIDIRECTIONAL_SOLID||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(ii&&(i=u.height),u.width+o.x>a&&(a=u.width+o.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),Jge=x(function(t){Nn(De,t),t.fontFamily&&(De.actorFontFamily=De.noteFontFamily=De.messageFontFamily=t.fontFamily),t.fontSize&&(De.actorFontSize=De.noteFontSize=De.messageFontSize=t.fontSize),t.fontWeight&&(De.actorFontWeight=De.noteFontWeight=De.messageFontWeight=t.fontWeight)},"setConf"),pS=x(function(t){return rt.activations.filter(function(e){return e.actor===t})},"actorActivations"),Hge=x(function(t,e){let r=e.get(t),n=pS(t),i=n.reduce(function(s,o){return Je.getMin(s,o.startx)},r.x+r.width/2-1),a=n.reduce(function(s,o){return Je.getMax(s,o.stopx)},r.x+r.width/2+1);return[i,a]},"activationBounds");x(Ml,"adjustLoopHeightForWrap");x(eme,"adjustCreatedDestroyedData");iYe=x(async function(t,e,r,n){let{securityLevel:i,sequence:a}=we();De=a;let s;i==="sandbox"&&(s=He("#i"+e));let o=i==="sandbox"?He(s.nodes()[0].contentDocument.body):He("body"),l=i==="sandbox"?s.nodes()[0].contentDocument:document;rt.init(),J.debug(n.db);let u=i==="sandbox"?o.select(`[id="${e}"]`):He(`[id="${e}"]`),h=n.db.getActors(),f=n.db.getCreatedActors(),d=n.db.getDestroyedActors(),p=n.db.getBoxes(),g=n.db.getActorKeys(),m=n.db.getMessages(),v=n.db.getDiagramTitle(),y=n.db.hasAtLeastOneBox(),b=n.db.hasAtLeastOneBoxWithTitle(),w=await tme(h,m,n);if(De.height=await rme(h,w,p),fi.insertComputerIcon(u),fi.insertDatabaseIcon(u),fi.insertClockIcon(u),y&&(rt.bumpVerticalPos(De.boxMargin),b&&rt.bumpVerticalPos(p[0].textMaxHeight)),De.hideUnusedParticipants===!0){let P=new Set;m.forEach(B=>{P.add(B.from),P.add(B.to)}),g=g.filter(B=>P.has(B))}nYe(u,h,f,g,0,m,!1);let S=await lYe(m,h,w,n);fi.insertArrowHead(u),fi.insertArrowCrossHead(u),fi.insertArrowFilledHead(u),fi.insertSequenceNumber(u);function T(P,B){let G=rt.endActivation(P);G.starty+18>B&&(G.starty=B-6,B+=12),fi.drawActivation(u,G,B,De,pS(P.from).length),rt.insert(G.startx,B-10,G.stopx,B)}x(T,"activeEnd");let E=1,A=1,C=[],I=[],M=0;for(let P of m){let B,G,$;switch(P.type){case n.db.LINETYPE.NOTE:rt.resetVerticalPos(),G=P.noteModel,await tYe(u,G);break;case n.db.LINETYPE.ACTIVE_START:rt.newActivation(P,u,h);break;case n.db.LINETYPE.ACTIVE_END:T(P,rt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Ml(S,P,De.boxMargin,De.boxMargin+De.boxTextMargin,U=>rt.newLoop(U));break;case n.db.LINETYPE.LOOP_END:B=rt.endLoop(),await fi.drawLoop(u,B,"loop",De),rt.bumpVerticalPos(B.stopy-rt.getVerticalPos()),rt.models.addLoop(B);break;case n.db.LINETYPE.RECT_START:Ml(S,P,De.boxMargin,De.boxMargin,U=>rt.newLoop(void 0,U.message));break;case n.db.LINETYPE.RECT_END:B=rt.endLoop(),I.push(B),rt.models.addLoop(B),rt.bumpVerticalPos(B.stopy-rt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Ml(S,P,De.boxMargin,De.boxMargin+De.boxTextMargin,U=>rt.newLoop(U));break;case n.db.LINETYPE.OPT_END:B=rt.endLoop(),await fi.drawLoop(u,B,"opt",De),rt.bumpVerticalPos(B.stopy-rt.getVerticalPos()),rt.models.addLoop(B);break;case n.db.LINETYPE.ALT_START:Ml(S,P,De.boxMargin,De.boxMargin+De.boxTextMargin,U=>rt.newLoop(U));break;case n.db.LINETYPE.ALT_ELSE:Ml(S,P,De.boxMargin+De.boxTextMargin,De.boxMargin,U=>rt.addSectionToLoop(U));break;case n.db.LINETYPE.ALT_END:B=rt.endLoop(),await fi.drawLoop(u,B,"alt",De),rt.bumpVerticalPos(B.stopy-rt.getVerticalPos()),rt.models.addLoop(B);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Ml(S,P,De.boxMargin,De.boxMargin+De.boxTextMargin,U=>rt.newLoop(U)),rt.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Ml(S,P,De.boxMargin+De.boxTextMargin,De.boxMargin,U=>rt.addSectionToLoop(U));break;case n.db.LINETYPE.PAR_END:B=rt.endLoop(),await fi.drawLoop(u,B,"par",De),rt.bumpVerticalPos(B.stopy-rt.getVerticalPos()),rt.models.addLoop(B);break;case n.db.LINETYPE.AUTONUMBER:E=P.message.start||E,A=P.message.step||A,P.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Ml(S,P,De.boxMargin,De.boxMargin+De.boxTextMargin,U=>rt.newLoop(U));break;case n.db.LINETYPE.CRITICAL_OPTION:Ml(S,P,De.boxMargin+De.boxTextMargin,De.boxMargin,U=>rt.addSectionToLoop(U));break;case n.db.LINETYPE.CRITICAL_END:B=rt.endLoop(),await fi.drawLoop(u,B,"critical",De),rt.bumpVerticalPos(B.stopy-rt.getVerticalPos()),rt.models.addLoop(B);break;case n.db.LINETYPE.BREAK_START:Ml(S,P,De.boxMargin,De.boxMargin+De.boxTextMargin,U=>rt.newLoop(U));break;case n.db.LINETYPE.BREAK_END:B=rt.endLoop(),await fi.drawLoop(u,B,"break",De),rt.bumpVerticalPos(B.stopy-rt.getVerticalPos()),rt.models.addLoop(B);break;default:try{$=P.msgModel,$.starty=rt.getVerticalPos(),$.sequenceIndex=E,$.sequenceVisible=n.db.showSequenceNumbers();let U=await Zge(u,$);eme(P,$,U,M,h,f,d),C.push({messageModel:$,lineStartY:U}),rt.models.addMessage($)}catch(U){J.error("error while drawing message",U)}}[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(P.type)&&(E=E+A),M++}J.debug("createdActors",f),J.debug("destroyedActors",d),await SP(u,h,g,!1);for(let P of C)await rYe(u,P.messageModel,P.lineStartY,n);De.mirrorActors&&await SP(u,h,g,!0),I.forEach(P=>fi.drawBackgroundRect(u,P)),Xge(u,h,g,De);for(let P of rt.models.boxes){P.height=rt.getVerticalPos()-P.y,rt.insert(P.x,P.y,P.x+P.width,P.height);let B=De.boxMargin*2;P.startx=P.x-B,P.starty=P.y-B*.25,P.stopx=P.startx+P.width+2*B,P.stopy=P.starty+P.height+B*.75,P.stroke="rgb(0,0,0, 0.5)",fi.drawBox(u,P,De)}y&&rt.bumpVerticalPos(De.boxMargin);let R=Qge(u,h,g,l),{bounds:k}=rt.getBounds();k.startx===void 0&&(k.startx=0),k.starty===void 0&&(k.starty=0),k.stopx===void 0&&(k.stopx=0),k.stopy===void 0&&(k.stopy=0);let L=k.stopy-k.starty;L2,f=x(m=>o?-m:m,"adjustValue");t.from===t.to?u=l:(t.activate&&!h&&(u+=f(De.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(u+=f(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=f(3)));let d=[n,i,a,s],p=Math.abs(l-u);t.wrap&&t.message&&(t.message=zt.wrapLabel(t.message,Je.getMax(p+2*De.wrapPadding,De.width),H0(De)));let g=zt.calculateTextDimensions(t.message,H0(De));return{width:Je.getMax(t.wrap?0:g.width+2*De.wrapPadding,p+2*De.wrapPadding,De.width),height:0,startx:l,stopx:u,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,d),toBounds:Math.max.apply(null,d)}},"buildMessageModel"),lYe=x(async function(t,e,r,n){let i={},a=[],s,o,l;for(let u of t){switch(u.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:a.push({id:u.id,msg:u.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:u.message&&(s=a.pop(),i[s.id]=s,i[u.id]=s,a.push(s));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:s=a.pop(),i[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{let f=e.get(u.from?u.from:u.to.actor),d=pS(u.from?u.from:u.to.actor).length,p=f.x+f.width/2+(d-1)*De.activationWidth/2,g={startx:p,stopx:p+De.activationWidth,actor:u.from,enabled:!0};rt.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let f=rt.activations.map(d=>d.actor).lastIndexOf(u.from);rt.activations.splice(f,1).splice(0,1)}break}u.placement!==void 0?(o=await sYe(u,e,n),u.noteModel=o,a.forEach(f=>{s=f,s.from=Je.getMin(s.from,o.startx),s.to=Je.getMax(s.to,o.startx+o.width),s.width=Je.getMax(s.width,Math.abs(s.from-s.to))-De.labelBoxWidth})):(l=oYe(u,e,n),u.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach(f=>{if(s=f,l.startx===l.stopx){let d=e.get(u.from),p=e.get(u.to);s.from=Je.getMin(d.x-l.width/2,d.x-d.width/2,s.from),s.to=Je.getMax(p.x+l.width/2,p.x+d.width/2,s.to),s.width=Je.getMax(s.width,Math.abs(s.to-s.from))-De.labelBoxWidth}else s.from=Je.getMin(l.startx,s.from),s.to=Je.getMax(l.stopx,s.to),s.width=Je.getMax(s.width,l.width)-De.labelBoxWidth}))}return rt.activations=[],J.debug("Loop type widths:",i),i},"calculateLoopBounds"),cYe={bounds:rt,drawActors:SP,drawActorsPopup:Qge,setConf:Jge,draw:iYe},uYe={parser:SHe,get db(){return new LHe},renderer:cYe,styles:IHe,init:x(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,xv({sequence:{wrap:t.wrap}}))},"init")}});var AP,mS,ame,sme,gS,ome,Y0,vS,hYe,yS,fYe,dYe,pYe,xS,_P=F(()=>{Sf();El();Yo();Go();hn();vr();rr();cr();AP=function(){var t=x(function(Me,Ne,Ce,Fe){for(Ce=Ce||{},Fe=Me.length;Fe--;Ce[Me[Fe]]=Ne);return Ce},"o"),e=[1,18],r=[1,19],n=[1,20],i=[1,41],a=[1,42],s=[1,26],o=[1,24],l=[1,25],u=[1,32],h=[1,33],f=[1,34],d=[1,45],p=[1,35],g=[1,36],m=[1,37],v=[1,38],y=[1,27],b=[1,28],w=[1,29],S=[1,30],T=[1,31],E=[1,44],A=[1,46],C=[1,43],I=[1,47],M=[1,9],R=[1,8,9],k=[1,58],L=[1,59],_=[1,60],D=[1,61],N=[1,62],O=[1,63],P=[1,64],B=[1,8,9,41],G=[1,76],$=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],U=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],X=[13,60,86,100,102,103],ee=[13,60,73,74,86,100,102,103],Y=[13,60,68,69,70,71,72,86,100,102,103],oe=[1,100],Q=[1,117],ue=[1,113],re=[1,109],te=[1,115],Z=[1,110],j=[1,111],ae=[1,112],K=[1,114],de=[1,116],ne=[22,48,60,61,82,86,87,88,89,90],be=[1,8,9,39,41,44],W=[1,8,9,22],Ve=[1,145],pe=[1,8,9,61],Be=[1,8,9,22,48,60,61,82,86,87,88,89,90],Ye={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:x(function(Ne,Ce,Fe,fe,ye,H,he){var z=H.length-1;switch(ye){case 8:this.$=H[z-1];break;case 9:case 10:case 13:case 15:this.$=H[z];break;case 11:case 14:this.$=H[z-2]+"."+H[z];break;case 12:case 16:this.$=H[z-1]+H[z];break;case 17:case 18:this.$=H[z-1]+"~"+H[z]+"~";break;case 19:fe.addRelation(H[z]);break;case 20:H[z-1].title=fe.cleanupLabel(H[z]),fe.addRelation(H[z-1]);break;case 31:this.$=H[z].trim(),fe.setAccTitle(this.$);break;case 32:case 33:this.$=H[z].trim(),fe.setAccDescription(this.$);break;case 34:fe.addClassesToNamespace(H[z-3],H[z-1]);break;case 35:fe.addClassesToNamespace(H[z-4],H[z-1]);break;case 36:this.$=H[z],fe.addNamespace(H[z]);break;case 37:this.$=[H[z]];break;case 38:this.$=[H[z-1]];break;case 39:H[z].unshift(H[z-2]),this.$=H[z];break;case 41:fe.setCssClass(H[z-2],H[z]);break;case 42:fe.addMembers(H[z-3],H[z-1]);break;case 44:fe.setCssClass(H[z-5],H[z-3]),fe.addMembers(H[z-5],H[z-1]);break;case 45:this.$=H[z],fe.addClass(H[z]);break;case 46:this.$=H[z-1],fe.addClass(H[z-1]),fe.setClassLabel(H[z-1],H[z]);break;case 50:fe.addAnnotation(H[z],H[z-2]);break;case 51:case 64:this.$=[H[z]];break;case 52:H[z].push(H[z-1]),this.$=H[z];break;case 53:break;case 54:fe.addMember(H[z-1],fe.cleanupLabel(H[z]));break;case 55:break;case 56:break;case 57:this.$={id1:H[z-2],id2:H[z],relation:H[z-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:H[z-3],id2:H[z],relation:H[z-1],relationTitle1:H[z-2],relationTitle2:"none"};break;case 59:this.$={id1:H[z-3],id2:H[z],relation:H[z-2],relationTitle1:"none",relationTitle2:H[z-1]};break;case 60:this.$={id1:H[z-4],id2:H[z],relation:H[z-2],relationTitle1:H[z-3],relationTitle2:H[z-1]};break;case 61:fe.addNote(H[z],H[z-1]);break;case 62:fe.addNote(H[z]);break;case 63:this.$=H[z-2],fe.defineClass(H[z-1],H[z]);break;case 65:this.$=H[z-2].concat([H[z]]);break;case 66:fe.setDirection("TB");break;case 67:fe.setDirection("BT");break;case 68:fe.setDirection("RL");break;case 69:fe.setDirection("LR");break;case 70:this.$={type1:H[z-2],type2:H[z],lineType:H[z-1]};break;case 71:this.$={type1:"none",type2:H[z],lineType:H[z-1]};break;case 72:this.$={type1:H[z-1],type2:"none",lineType:H[z]};break;case 73:this.$={type1:"none",type2:"none",lineType:H[z]};break;case 74:this.$=fe.relationType.AGGREGATION;break;case 75:this.$=fe.relationType.EXTENSION;break;case 76:this.$=fe.relationType.COMPOSITION;break;case 77:this.$=fe.relationType.DEPENDENCY;break;case 78:this.$=fe.relationType.LOLLIPOP;break;case 79:this.$=fe.lineType.LINE;break;case 80:this.$=fe.lineType.DOTTED_LINE;break;case 81:case 87:this.$=H[z-2],fe.setClickEvent(H[z-1],H[z]);break;case 82:case 88:this.$=H[z-3],fe.setClickEvent(H[z-2],H[z-1]),fe.setTooltip(H[z-2],H[z]);break;case 83:this.$=H[z-2],fe.setLink(H[z-1],H[z]);break;case 84:this.$=H[z-3],fe.setLink(H[z-2],H[z-1],H[z]);break;case 85:this.$=H[z-3],fe.setLink(H[z-2],H[z-1]),fe.setTooltip(H[z-2],H[z]);break;case 86:this.$=H[z-4],fe.setLink(H[z-3],H[z-2],H[z]),fe.setTooltip(H[z-3],H[z-1]);break;case 89:this.$=H[z-3],fe.setClickEvent(H[z-2],H[z-1],H[z]);break;case 90:this.$=H[z-4],fe.setClickEvent(H[z-3],H[z-2],H[z-1]),fe.setTooltip(H[z-3],H[z]);break;case 91:this.$=H[z-3],fe.setLink(H[z-2],H[z]);break;case 92:this.$=H[z-4],fe.setLink(H[z-3],H[z-1],H[z]);break;case 93:this.$=H[z-4],fe.setLink(H[z-3],H[z-1]),fe.setTooltip(H[z-3],H[z]);break;case 94:this.$=H[z-5],fe.setLink(H[z-4],H[z-2],H[z]),fe.setTooltip(H[z-4],H[z-1]);break;case 95:this.$=H[z-2],fe.setCssStyle(H[z-1],H[z]);break;case 96:fe.setCssClass(H[z-1],H[z]);break;case 97:this.$=[H[z]];break;case 98:H[z-2].push(H[z]),this.$=H[z-2];break;case 100:this.$=H[z-1]+H[z];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,49:s,51:o,52:l,54:u,56:h,57:f,60:d,62:p,63:g,64:m,65:v,75:y,76:b,78:w,82:S,83:T,86:E,100:A,102:C,103:I},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(M,[2,5],{8:[1,48]}),{8:[1,49]},t(R,[2,19],{22:[1,50]}),t(R,[2,21]),t(R,[2,22]),t(R,[2,23]),t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,29]),t(R,[2,30]),{34:[1,51]},{36:[1,52]},t(R,[2,33]),t(R,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:L,70:_,71:D,72:N,73:O,74:P}),{39:[1,65]},t(B,[2,40],{39:[1,67],44:[1,66]}),t(R,[2,55]),t(R,[2,56]),{16:68,60:d,86:E,100:A,102:C},{16:39,17:40,19:69,60:d,86:E,100:A,102:C,103:I},{16:39,17:40,19:70,60:d,86:E,100:A,102:C,103:I},{16:39,17:40,19:71,60:d,86:E,100:A,102:C,103:I},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:d,86:E,100:A,102:C,103:I},{13:G,55:75},{58:77,60:[1,78]},t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t($,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:d,86:E,100:A,102:C,103:I}),t($,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:d,86:E,100:A,102:C,103:I},{16:39,17:40,19:86,60:d,86:E,100:A,102:C,103:I},t(U,[2,123]),t(U,[2,124]),t(U,[2,125]),t(U,[2,126]),t([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),t(M,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:e,35:r,37:n,42:i,46:a,49:s,51:o,52:l,54:u,56:h,57:f,60:d,62:p,63:g,64:m,65:v,75:y,76:b,78:w,82:S,83:T,86:E,100:A,102:C,103:I}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,49:s,51:o,52:l,54:u,56:h,57:f,60:d,62:p,63:g,64:m,65:v,75:y,76:b,78:w,82:S,83:T,86:E,100:A,102:C,103:I},t(R,[2,20]),t(R,[2,31]),t(R,[2,32]),{13:[1,90],16:39,17:40,19:89,60:d,86:E,100:A,102:C,103:I},{53:91,66:56,67:57,68:k,69:L,70:_,71:D,72:N,73:O,74:P},t(R,[2,54]),{67:92,73:O,74:P},t(X,[2,73],{66:93,68:k,69:L,70:_,71:D,72:N}),t(ee,[2,74]),t(ee,[2,75]),t(ee,[2,76]),t(ee,[2,77]),t(ee,[2,78]),t(Y,[2,79]),t(Y,[2,80]),{8:[1,95],24:96,40:94,43:23,46:a},{16:97,60:d,86:E,100:A,102:C},{41:[1,99],45:98,51:oe},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:Q,48:ue,59:106,60:re,82:te,84:107,85:108,86:Z,87:j,88:ae,89:K,90:de},{60:[1,118]},{13:G,55:119},t(R,[2,62]),t(R,[2,128]),{22:Q,48:ue,59:120,60:re,61:[1,121],82:te,84:107,85:108,86:Z,87:j,88:ae,89:K,90:de},t(ne,[2,64]),{16:39,17:40,19:122,60:d,86:E,100:A,102:C,103:I},t($,[2,16]),t($,[2,17]),t($,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:d,86:E,100:A,102:C,103:I},{39:[2,10]},t(be,[2,45],{11:125,12:[1,126]}),t(M,[2,7]),{9:[1,127]},t(W,[2,57]),{16:39,17:40,19:128,60:d,86:E,100:A,102:C,103:I},{13:[1,130],16:39,17:40,19:129,60:d,86:E,100:A,102:C,103:I},t(X,[2,72],{66:131,68:k,69:L,70:_,71:D,72:N}),t(X,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:a},{8:[1,134],41:[2,37]},t(B,[2,41],{39:[1,135]}),{41:[1,136]},t(B,[2,43]),{41:[2,51],45:137,51:oe},{16:39,17:40,19:138,60:d,86:E,100:A,102:C,103:I},t(R,[2,81],{13:[1,139]}),t(R,[2,83],{13:[1,141],77:[1,140]}),t(R,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},t(R,[2,95],{61:Ve}),t(pe,[2,97],{85:146,22:Q,48:ue,60:re,82:te,86:Z,87:j,88:ae,89:K,90:de}),t(Be,[2,99]),t(Be,[2,101]),t(Be,[2,102]),t(Be,[2,103]),t(Be,[2,104]),t(Be,[2,105]),t(Be,[2,106]),t(Be,[2,107]),t(Be,[2,108]),t(Be,[2,109]),t(R,[2,96]),t(R,[2,61]),t(R,[2,63],{61:Ve}),{60:[1,147]},t($,[2,14]),{15:148,16:84,17:85,60:d,86:E,100:A,102:C,103:I},{39:[2,12]},t(be,[2,46]),{13:[1,149]},{1:[2,4]},t(W,[2,59]),t(W,[2,58]),{16:39,17:40,19:150,60:d,86:E,100:A,102:C,103:I},t(X,[2,70]),t(R,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:a},{45:153,51:oe},t(B,[2,42]),{41:[2,52]},t(R,[2,50]),t(R,[2,82]),t(R,[2,84]),t(R,[2,85],{77:[1,154]}),t(R,[2,88]),t(R,[2,89],{13:[1,155]}),t(R,[2,91],{13:[1,157],77:[1,156]}),{22:Q,48:ue,60:re,82:te,84:158,85:108,86:Z,87:j,88:ae,89:K,90:de},t(Be,[2,100]),t(ne,[2,65]),{39:[2,11]},{14:[1,159]},t(W,[2,60]),t(R,[2,35]),{41:[2,39]},{41:[1,160]},t(R,[2,86]),t(R,[2,90]),t(R,[2,92]),t(R,[2,93],{77:[1,161]}),t(pe,[2,98],{85:146,22:Q,48:ue,60:re,82:te,86:Z,87:j,88:ae,89:K,90:de}),t(be,[2,8]),t(B,[2,44]),t(R,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:x(function(Ne,Ce){if(Ce.recoverable)this.trace(Ne);else{var Fe=new Error(Ne);throw Fe.hash=Ce,Fe}},"parseError"),parse:x(function(Ne){var Ce=this,Fe=[0],fe=[],ye=[null],H=[],he=this.table,z="",se=0,le=0,ke=0,ve=2,me=1,Ie=H.slice.call(arguments,1),_e=Object.create(this.lexer),ze={yy:{}};for(var Xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xe)&&(ze.yy[Xe]=this.yy[Xe]);_e.setInput(Ne,ze.yy),ze.yy.lexer=_e,ze.yy.parser=this,typeof _e.yylloc>"u"&&(_e.yylloc={});var ft=_e.yylloc;H.push(ft);var We=_e.options&&_e.options.ranges;typeof ze.yy.parseError=="function"?this.parseError=ze.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Oe(wt){Fe.length=Fe.length-2*wt,ye.length=ye.length-wt,H.length=H.length-wt}x(Oe,"popStack");function Ke(){var wt;return wt=fe.pop()||_e.lex()||me,typeof wt!="number"&&(wt instanceof Array&&(fe=wt,wt=fe.pop()),wt=Ce.symbols_[wt]||wt),wt}x(Ke,"lex");for(var Ue,nt,Dt,ut,kt,ot,Qe={},dt,gt,ht,st;;){if(Dt=Fe[Fe.length-1],this.defaultActions[Dt]?ut=this.defaultActions[Dt]:((Ue===null||typeof Ue>"u")&&(Ue=Ke()),ut=he[Dt]&&he[Dt][Ue]),typeof ut>"u"||!ut.length||!ut[0]){var Br="";st=[];for(dt in he[Dt])this.terminals_[dt]&&dt>ve&&st.push("'"+this.terminals_[dt]+"'");_e.showPosition?Br="Parse error on line "+(se+1)+`: `+_e.showPosition()+` Expecting `+st.join(", ")+", got '"+(this.terminals_[Ue]||Ue)+"'":Br="Parse error on line "+(se+1)+": Unexpected "+(Ue==me?"end of input":"'"+(this.terminals_[Ue]||Ue)+"'"),this.parseError(Br,{text:_e.match,token:this.terminals_[Ue]||Ue,line:_e.yylineno,loc:ft,expected:st})}if(ut[0]instanceof Array&&ut.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Dt+", token: "+Ue);switch(ut[0]){case 1:Fe.push(Ue),ye.push(_e.yytext),H.push(_e.yylloc),Fe.push(ut[1]),Ue=null,nt?(Ue=nt,nt=null):(le=_e.yyleng,z=_e.yytext,se=_e.yylineno,ft=_e.yylloc,ke>0&&ke--);break;case 2:if(gt=this.productions_[ut[1]][1],Qe.$=ye[ye.length-gt],Qe._$={first_line:H[H.length-(gt||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(gt||1)].first_column,last_column:H[H.length-1].last_column},We&&(Qe._$.range=[H[H.length-(gt||1)].range[0],H[H.length-1].range[1]]),ot=this.performAction.apply(Qe,[z,le,se,ze.yy,ut[1],ye,H].concat(Ie)),typeof ot<"u")return ot;gt&&(Fe=Fe.slice(0,-1*gt*2),ye=ye.slice(0,-1*gt),H=H.slice(0,-1*gt)),Fe.push(this.productions_[ut[1]][0]),ye.push(Qe.$),H.push(Qe._$),ht=he[Fe[Fe.length-2]][Fe[Fe.length-1]],Fe.push(ht);break;case 3:return!0}}return!0},"parse")},qe=function(){var Me={EOF:1,parseError:x(function(Ce,Fe){if(this.yy.parser)this.yy.parser.parseError(Ce,Fe);else throw new Error(Ce)},"parseError"),setInput:x(function(Ne,Ce){return this.yy=Ce||this.yy||{},this._input=Ne,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var Ne=this._input[0];this.yytext+=Ne,this.yyleng++,this.offset++,this.match+=Ne,this.matched+=Ne;var Ce=Ne.match(/(?:\r\n?|\n).*/g);return Ce?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ne},"input"),unput:x(function(Ne){var Ce=Ne.length,Fe=Ne.split(/(?:\r\n?|\n)/g);this._input=Ne+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ce),this.offset-=Ce;var fe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Fe.length-1&&(this.yylineno-=Fe.length-1);var ye=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Fe?(Fe.length===fe.length?this.yylloc.first_column:0)+fe[fe.length-Fe.length].length-Fe[0].length:this.yylloc.first_column-Ce},this.options.ranges&&(this.yylloc.range=[ye[0],ye[0]+this.yyleng-Ce]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(Ne){this.unput(this.match.slice(Ne))},"less"),pastInput:x(function(){var Ne=this.matched.substr(0,this.matched.length-this.match.length);return(Ne.length>20?"...":"")+Ne.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var Ne=this.match;return Ne.length<20&&(Ne+=this._input.substr(0,20-Ne.length)),(Ne.substr(0,20)+(Ne.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var Ne=this.pastInput(),Ce=new Array(Ne.length+1).join("-");return Ne+this.upcomingInput()+` `+Ce+"^"},"showPosition"),test_match:x(function(Ne,Ce){var Fe,fe,ye;if(this.options.backtrack_lexer&&(ye={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&&(ye.yylloc.range=this.yylloc.range.slice(0))),fe=Ne[0].match(/(?:\r\n?|\n).*/g),fe&&(this.yylineno+=fe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:fe?fe[fe.length-1].length-fe[fe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ne[0].length},this.yytext+=Ne[0],this.match+=Ne[0],this.matches=Ne,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Ne[0].length),this.matched+=Ne[0],Fe=this.performAction.call(this,this.yy,this,Ce,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Fe)return Fe;if(this._backtrack){for(var H in ye)this[H]=ye[H];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ne,Ce,Fe,fe;this._more||(this.yytext="",this.match="");for(var ye=this._currentRules(),H=0;HCe[0].length)){if(Ce=Fe,fe=H,this.options.backtrack_lexer){if(Ne=this.test_match(Fe,ye[H]),Ne!==!1)return Ne;if(this._backtrack){Ce=!1;continue}else return!1}else if(!this.options.flex)break}return Ce?(Ne=this.test_match(Ce,ye[fe]),Ne!==!1?Ne:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var Ce=this.next();return Ce||this.lex()},"lex"),begin:x(function(Ce){this.conditionStack.push(Ce)},"begin"),popState:x(function(){var Ce=this.conditionStack.length-1;return Ce>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(Ce){return Ce=this.conditionStack.length-1-Math.abs(Ce||0),Ce>=0?this.conditionStack[Ce]:"INITIAL"},"topState"),pushState:x(function(Ce){this.begin(Ce)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(Ce,Fe,fe,ye){var H=ye;switch(fe){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:return this.popState(),41;break;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;break;case 39:return this.popState(),8;break;case 40:break;case 41:return this.popState(),this.popState(),41;break;case 42:return this.begin("class-body"),39;break;case 43:return this.popState(),41;break;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 77;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 69;case 69:return 69;case 70:return 71;case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:return 89;case 85:return 89;case 86:return 90;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:return 48;case 96:return 48;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return Me}();Ye.lexer=qe;function Le(){this.yy={}}return x(Le,"Parser"),Le.prototype=Ye,Ye.Parser=Le,new Le}();AP.parser=AP;mS=AP,ame=["#","+","~","-",""],sme=class{static{x(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";let r=ar(t,we());this.parseMember(r)}getDisplayDetails(){let t=this.visibility+jl(this.id);this.memberType==="method"&&(t+=`(${jl(this.parameters.trim())})`,this.returnType&&(t+=" : "+jl(this.returnType))),t=t.trim();let e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";if(this.memberType==="method"){let i=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(i){let a=i[1]?i[1].trim():"";if(ame.includes(a)&&(this.visibility=a),this.id=i[2],this.parameters=i[3]?i[3].trim():"",e=i[4]?i[4].trim():"",this.returnType=i[5]?i[5].trim():"",e===""){let s=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(s)&&(e=s,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=t.length,i=t.substring(0,1),a=t.substring(n-1);ame.includes(i)&&(this.visibility=i),/[$*]/.exec(a)&&(e=a),this.id=t.substring(this.visibility===""?0:1,e===""?n:n-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let r=`${this.visibility?"\\"+this.visibility:""}${jl(this.id)}${this.memberType==="method"?`(${jl(this.parameters)})${this.returnType?" : "+jl(this.returnType):""}`:""}`;this.text=r.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},gS="classId-",ome=0,Y0=x(t=>Je.sanitizeText(t,we()),"sanitizeText"),vS=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=x(t=>{let e=He(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=He("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),He(t).select("svg").selectAll("g.node").on("mouseover",i=>{let a=He(i.currentTarget);if(a.attr("title")===null)return;let o=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(a.attr("title")).style("left",window.scrollX+o.left+(o.right-o.left)/2+"px").style("top",window.scrollY+o.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"
    ")),a.classed("hover",!0)}).on("mouseout",i=>{e.transition().duration(500).style("opacity",0),He(i.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=Er,this.getAccTitle=Cr,this.setAccDescription=Ar,this.getAccDescription=_r,this.setDiagramTitle=Dr,this.getDiagramTitle=Lr,this.getConfig=x(()=>we().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{x(this,"ClassDB")}splitClassNameAndType(t){let e=Je.sanitizeText(t,we()),r="",n=e;if(e.indexOf("~")>0){let i=e.split("~");n=Y0(i[0]),r=Y0(i[1])}return{className:n,type:r}}setClassLabel(t,e){let r=Je.sanitizeText(t,we());e&&(e=Y0(e));let{className:n}=this.splitClassNameAndType(r);this.classes.get(n).label=e,this.classes.get(n).text=`${e}${this.classes.get(n).type?`<${this.classes.get(n).type}>`:""}`}addClass(t){let e=Je.sanitizeText(t,we()),{className:r,type:n}=this.splitClassNameAndType(e);if(this.classes.has(r))return;let i=Je.sanitizeText(r,we());this.classes.set(i,{id:i,type:n,label:i,text:`${i}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:gS+i+"-"+ome}),ome++}addInterface(t,e){let r={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(r)}lookUpDomId(t){let e=Je.sanitizeText(t,we());if(this.classes.has(e))return this.classes.get(e).domId;throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",mr()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){J.debug("Adding relation: "+JSON.stringify(t));let 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)?(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1=`interface${this.interfaces.length-1}`):t.relation.type2===this.relationType.LOLLIPOP&&!e.includes(t.relation.type1)?(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2=`interface${this.interfaces.length-1}`):(this.addClass(t.id1),this.addClass(t.id2)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=Je.sanitizeText(t.relationTitle1.trim(),we()),t.relationTitle2=Je.sanitizeText(t.relationTitle2.trim(),we()),this.relations.push(t)}addAnnotation(t,e){let r=this.splitClassNameAndType(t).className;this.classes.get(r).annotations.push(e)}addMember(t,e){this.addClass(t);let r=this.splitClassNameAndType(t).className,n=this.classes.get(r);if(typeof e=="string"){let i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?n.annotations.push(Y0(i.substring(2,i.length-2))):i.indexOf(")")>0?n.methods.push(new sme(i,"method")):i&&n.members.push(new sme(i,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>this.addMember(t,r)))}addNote(t,e){let r={id:`note${this.notes.length}`,class:e,text:t};this.notes.push(r)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),Y0(t.trim())}setCssClass(t,e){t.split(",").forEach(r=>{let n=r;/\d/.exec(r[0])&&(n=gS+n);let i=this.classes.get(n);i&&(i.cssClasses+=" "+e)})}defineClass(t,e){for(let r of t){let n=this.styleClasses.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},this.styleClasses.set(r,n)),e&&e.forEach(i=>{if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)}),this.classes.forEach(i=>{i.cssClasses.includes(r)&&i.styles.push(...e.flatMap(a=>a.split(",")))})}}setTooltip(t,e){t.split(",").forEach(r=>{e!==void 0&&(this.classes.get(r).tooltip=Y0(e))})}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,r){let n=we();t.split(",").forEach(i=>{let a=i;/\d/.exec(i[0])&&(a=gS+a);let s=this.classes.get(a);s&&(s.link=zt.formatUrl(e,n),n.securityLevel==="sandbox"?s.linkTarget="_top":typeof r=="string"?s.linkTarget=Y0(r):s.linkTarget="_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,r){t.split(",").forEach(n=>{this.setClickFunc(n,e,r),this.classes.get(n).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,e,r){let n=Je.sanitizeText(t,we());if(we().securityLevel!=="loose"||e===void 0)return;let a=n;if(this.classes.has(a)){let s=this.lookUpDomId(a),o=[];if(typeof r=="string"){o=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l{let l=document.querySelector(`[id="${s}"]`);l!==null&&l.addEventListener("click",()=>{zt.runFunc(e,...o)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}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:gS+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(let r of e){let{className:n}=this.splitClassNameAndType(r);this.classes.get(n).parent=t,this.namespaces.get(t).classes.set(n,this.classes.get(n))}}setCssStyle(t,e){let r=this.classes.get(t);if(!(!e||!r))for(let 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(){let t=[],e=[],r=we();for(let i of this.namespaces.keys()){let a=this.namespaces.get(i);if(a){let s={id:a.id,label:a.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:r.look};t.push(s)}}for(let i of this.classes.keys()){let a=this.classes.get(i);if(a){let s=a;s.parentId=a.parent,s.look=r.look,t.push(s)}}let n=0;for(let i of this.notes){n++;let a={id:i.id,label:i.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look};t.push(a);let s=this.classes.get(i.class)?.id??"";if(s){let o={id:`edgeNote${n}`,start:i.id,end:s,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};e.push(o)}}for(let i of this.interfaces){let a={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};t.push(a)}n=0;for(let i of this.relations){n++;let a={id:$h(i.id1,i.id2,{prefix:"id",counter:n}),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:i.relationTitle1==="none"?"":i.relationTitle1,endLabelLeft:i.relationTitle2==="none"?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:i.relation.lineType==1?"dashed":"solid",look:r.look};e.push(a)}return{nodes:t,edges:e,other:{},config:r,direction:this.getDirection()}}},hYe=x(t=>`g.classGroup text { fill: ${t.nodeBorder||t.classText}; stroke: none; font-family: ${t.fontFamily}; font-size: 10px; .title { font-weight: bolder; } } .nodeLabel, .edgeLabel { color: ${t.classText}; } .edgeLabel .label rect { fill: ${t.mainBkg}; } .label text { fill: ${t.classText}; } .labelBkg { background: ${t.mainBkg}; } .edgeLabel .label span { background: ${t.mainBkg}; } .classTitle { font-weight: bolder; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: 1px; } .divider { stroke: ${t.nodeBorder}; stroke-width: 1; } g.clickable { cursor: pointer; } g.classGroup rect { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; } g.classGroup line { stroke: ${t.nodeBorder}; stroke-width: 1; } .classLabel .box { stroke: none; stroke-width: 0; fill: ${t.mainBkg}; opacity: 0.5; } .classLabel .label { fill: ${t.nodeBorder}; font-size: 10px; } .relation { stroke: ${t.lineColor}; stroke-width: 1; fill: none; } .dashed-line{ stroke-dasharray: 3; } .dotted-line{ stroke-dasharray: 1 2; } #compositionStart, .composition { fill: ${t.lineColor} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #compositionEnd, .composition { fill: ${t.lineColor} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #dependencyStart, .dependency { fill: ${t.lineColor} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #dependencyStart, .dependency { fill: ${t.lineColor} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #extensionStart, .extension { fill: transparent !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #extensionEnd, .extension { fill: transparent !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #aggregationStart, .aggregation { fill: transparent !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #aggregationEnd, .aggregation { fill: transparent !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #lollipopStart, .lollipop { fill: ${t.mainBkg} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } #lollipopEnd, .lollipop { fill: ${t.mainBkg} !important; stroke: ${t.lineColor} !important; stroke-width: 1; } .edgeTerminals { font-size: 11px; line-height: initial; } .classTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } ${Mc()} `,"getStyles"),yS=hYe,fYe=x((t,e="TB")=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),dYe=x(function(t,e){return e.db.getClasses()},"getClasses"),pYe=x(async function(t,e,r,n){J.info("REF0:"),J.info("Drawing class diagram (v3)",e);let{securityLevel:i,state:a,layout:s}=we(),o=n.db.getData(),l=Ho(e,i);o.type=n.type,o.layoutAlgorithm=Ic(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await zo(o,l);let u=8;zt.insertTitle(l,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Bs(l,u,"classDiagram",a?.useMaxWidth??!0)},"draw"),xS={getClasses:dYe,draw:pYe,getDir:fYe}});var lme={};hr(lme,{diagram:()=>gYe});var gYe,cme=F(()=>{_P();Sf();El();Yo();Go();Io();Ks();Ls();ja();Ka();na();hn();vr();rr();gYe={parser:mS,get db(){return new vS},renderer:xS,styles:yS,init:x(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});var ume={};hr(ume,{diagram:()=>mYe});var mYe,hme=F(()=>{_P();Sf();El();Yo();Go();Io();Ks();Ls();ja();Ka();na();hn();vr();rr();mYe={parser:mS,get db(){return new vS},renderer:xS,styles:yS,init:x(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});function TS(t="",e=0,r="",n=DP){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${OYe}-${t}${i}-${e}`}function Bb(t,e,r){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(i=>{let a=r.get(i);a&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...a.styles])}));let n=t.find(i=>i.id===e.id);n?Object.assign(n,e):t.push(e)}function Ime(t){return t?.classes?.join(" ")??""}function Nme(t){return t?.styles??[]}var IP,kS,vYe,xme,fme,P1,O1,NP,yYe,xYe,bYe,$b,bme,wme,Tme,kme,Eme,Sme,LP,RP,wYe,TYe,dme,pme,kYe,EYe,zb,SYe,CYe,Cme,AYe,_Ye,LYe,RYe,IYe,NYe,DYe,MYe,Ame,_me,OYe,DP,PYe,gme,Lme,BYe,FYe,Rme,wS,Vf,$Ye,mme,Fb,zYe,gs,vme,yme,bS,th,GYe,ES,MP=F(()=>{El();Yo();Go();hn();vr();rr();IP=function(){var t=x(function(B,G,$,U){for($=$||{},U=B.length;U--;$[B[U]]=G);return $},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,16],l=[1,17],u=[1,18],h=[1,19],f=[1,33],d=[1,20],p=[1,21],g=[1,22],m=[1,23],v=[1,24],y=[1,26],b=[1,27],w=[1,28],S=[1,29],T=[1,30],E=[1,31],A=[1,32],C=[1,35],I=[1,36],M=[1,37],R=[1,38],k=[1,34],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],_=[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],D=[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],N={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:x(function(G,$,U,X,ee,Y,oe){var Q=Y.length-1;switch(ee){case 3:return X.setRootDoc(Y[Q]),Y[Q];break;case 4:this.$=[];break;case 5:Y[Q]!="nl"&&(Y[Q-1].push(Y[Q]),this.$=Y[Q-1]);break;case 6:case 7:this.$=Y[Q];break;case 8:this.$="nl";break;case 12:this.$=Y[Q];break;case 13:let Z=Y[Q-1];Z.description=X.trimColon(Y[Q]),this.$=Z;break;case 14:this.$={stmt:"relation",state1:Y[Q-2],state2:Y[Q]};break;case 15:let j=X.trimColon(Y[Q]);this.$={stmt:"relation",state1:Y[Q-3],state2:Y[Q-1],description:j};break;case 19:this.$={stmt:"state",id:Y[Q-3],type:"default",description:"",doc:Y[Q-1]};break;case 20:var ue=Y[Q],re=Y[Q-2].trim();if(Y[Q].match(":")){var te=Y[Q].split(":");ue=te[0],re=[re,te[1]]}this.$={stmt:"state",id:ue,type:"default",description:re};break;case 21:this.$={stmt:"state",id:Y[Q-3],type:"default",description:Y[Q-5],doc:Y[Q-1]};break;case 22:this.$={stmt:"state",id:Y[Q],type:"fork"};break;case 23:this.$={stmt:"state",id:Y[Q],type:"join"};break;case 24:this.$={stmt:"state",id:Y[Q],type:"choice"};break;case 25:this.$={stmt:"state",id:X.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:Y[Q-1].trim(),note:{position:Y[Q-2].trim(),text:Y[Q].trim()}};break;case 29:this.$=Y[Q].trim(),X.setAccTitle(this.$);break;case 30:case 31:this.$=Y[Q].trim(),X.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:Y[Q-3],url:Y[Q-2],tooltip:Y[Q-1]};break;case 33:this.$={stmt:"click",id:Y[Q-3],url:Y[Q-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:Y[Q-1].trim(),classes:Y[Q].trim()};break;case 36:this.$={stmt:"style",id:Y[Q-1].trim(),styleClass:Y[Q].trim()};break;case 37:this.$={stmt:"applyClass",id:Y[Q-1].trim(),styleClass:Y[Q].trim()};break;case 38:X.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:X.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:X.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:X.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:Y[Q].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:Y[Q-2].trim(),classes:[Y[Q].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:Y[Q-2].trim(),classes:[Y[Q].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:g,28:m,29:v,32:25,33:y,35:b,37:w,38:S,41:T,45:E,48:A,51:C,52:I,53:M,54:R,57:k},t(L,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:g,28:m,29:v,32:25,33:y,35:b,37:w,38:S,41:T,45:E,48:A,51:C,52:I,53:M,54:R,57:k},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,40],15:[1,41]}),t(L,[2,16]),{18:[1,42]},t(L,[2,18],{20:[1,43]}),{23:[1,44]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(L,[2,28]),{34:[1,49]},{36:[1,50]},t(L,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(_,[2,44],{58:[1,56]}),t(_,[2,45],{58:[1,57]}),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),t(L,[2,41]),t(L,[2,6]),t(L,[2,13]),{13:58,24:f,57:k},t(L,[2,17]),t(D,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(L,[2,29]),t(L,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(L,[2,14],{14:[1,71]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,72],22:h,24:f,25:d,26:p,27:g,28:m,29:v,32:25,33:y,35:b,37:w,38:S,41:T,45:E,48:A,51:C,52:I,53:M,54:R,57:k},t(L,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(L,[2,34]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(_,[2,46]),t(_,[2,47]),t(L,[2,15]),t(L,[2,19]),t(D,i,{7:78}),t(L,[2,26]),t(L,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,81],22:h,24:f,25:d,26:p,27:g,28:m,29:v,32:25,33:y,35:b,37:w,38:S,41:T,45:E,48:A,51:C,52:I,53:M,54:R,57:k},t(L,[2,32]),t(L,[2,33]),t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:x(function(G,$){if($.recoverable)this.trace(G);else{var U=new Error(G);throw U.hash=$,U}},"parseError"),parse:x(function(G){var $=this,U=[0],X=[],ee=[null],Y=[],oe=this.table,Q="",ue=0,re=0,te=0,Z=2,j=1,ae=Y.slice.call(arguments,1),K=Object.create(this.lexer),de={yy:{}};for(var ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ne)&&(de.yy[ne]=this.yy[ne]);K.setInput(G,de.yy),de.yy.lexer=K,de.yy.parser=this,typeof K.yylloc>"u"&&(K.yylloc={});var be=K.yylloc;Y.push(be);var W=K.options&&K.options.ranges;typeof de.yy.parseError=="function"?this.parseError=de.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ve(z){U.length=U.length-2*z,ee.length=ee.length-z,Y.length=Y.length-z}x(Ve,"popStack");function pe(){var z;return z=X.pop()||K.lex()||j,typeof z!="number"&&(z instanceof Array&&(X=z,z=X.pop()),z=$.symbols_[z]||z),z}x(pe,"lex");for(var Be,Ye,qe,Le,Me,Ne,Ce={},Fe,fe,ye,H;;){if(qe=U[U.length-1],this.defaultActions[qe]?Le=this.defaultActions[qe]:((Be===null||typeof Be>"u")&&(Be=pe()),Le=oe[qe]&&oe[qe][Be]),typeof Le>"u"||!Le.length||!Le[0]){var he="";H=[];for(Fe in oe[qe])this.terminals_[Fe]&&Fe>Z&&H.push("'"+this.terminals_[Fe]+"'");K.showPosition?he="Parse error on line "+(ue+1)+`: `+K.showPosition()+` Expecting `+H.join(", ")+", got '"+(this.terminals_[Be]||Be)+"'":he="Parse error on line "+(ue+1)+": Unexpected "+(Be==j?"end of input":"'"+(this.terminals_[Be]||Be)+"'"),this.parseError(he,{text:K.match,token:this.terminals_[Be]||Be,line:K.yylineno,loc:be,expected:H})}if(Le[0]instanceof Array&&Le.length>1)throw new Error("Parse Error: multiple actions possible at state: "+qe+", token: "+Be);switch(Le[0]){case 1:U.push(Be),ee.push(K.yytext),Y.push(K.yylloc),U.push(Le[1]),Be=null,Ye?(Be=Ye,Ye=null):(re=K.yyleng,Q=K.yytext,ue=K.yylineno,be=K.yylloc,te>0&&te--);break;case 2:if(fe=this.productions_[Le[1]][1],Ce.$=ee[ee.length-fe],Ce._$={first_line:Y[Y.length-(fe||1)].first_line,last_line:Y[Y.length-1].last_line,first_column:Y[Y.length-(fe||1)].first_column,last_column:Y[Y.length-1].last_column},W&&(Ce._$.range=[Y[Y.length-(fe||1)].range[0],Y[Y.length-1].range[1]]),Ne=this.performAction.apply(Ce,[Q,re,ue,de.yy,Le[1],ee,Y].concat(ae)),typeof Ne<"u")return Ne;fe&&(U=U.slice(0,-1*fe*2),ee=ee.slice(0,-1*fe),Y=Y.slice(0,-1*fe)),U.push(this.productions_[Le[1]][0]),ee.push(Ce.$),Y.push(Ce._$),ye=oe[U[U.length-2]][U[U.length-1]],U.push(ye);break;case 3:return!0}}return!0},"parse")},O=function(){var B={EOF:1,parseError:x(function($,U){if(this.yy.parser)this.yy.parser.parseError($,U);else throw new Error($)},"parseError"),setInput:x(function(G,$){return this.yy=$||this.yy||{},this._input=G,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var G=this._input[0];this.yytext+=G,this.yyleng++,this.offset++,this.match+=G,this.matched+=G;var $=G.match(/(?:\r\n?|\n).*/g);return $?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),G},"input"),unput:x(function(G){var $=G.length,U=G.split(/(?:\r\n?|\n)/g);this._input=G+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$),this.offset-=$;var X=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),U.length-1&&(this.yylineno-=U.length-1);var ee=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:U?(U.length===X.length?this.yylloc.first_column:0)+X[X.length-U.length].length-U[0].length:this.yylloc.first_column-$},this.options.ranges&&(this.yylloc.range=[ee[0],ee[0]+this.yyleng-$]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(G){this.unput(this.match.slice(G))},"less"),pastInput:x(function(){var G=this.matched.substr(0,this.matched.length-this.match.length);return(G.length>20?"...":"")+G.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var G=this.match;return G.length<20&&(G+=this._input.substr(0,20-G.length)),(G.substr(0,20)+(G.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var G=this.pastInput(),$=new Array(G.length+1).join("-");return G+this.upcomingInput()+` `+$+"^"},"showPosition"),test_match:x(function(G,$){var U,X,ee;if(this.options.backtrack_lexer&&(ee={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&&(ee.yylloc.range=this.yylloc.range.slice(0))),X=G[0].match(/(?:\r\n?|\n).*/g),X&&(this.yylineno+=X.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:X?X[X.length-1].length-X[X.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+G[0].length},this.yytext+=G[0],this.match+=G[0],this.matches=G,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(G[0].length),this.matched+=G[0],U=this.performAction.call(this,this.yy,this,$,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),U)return U;if(this._backtrack){for(var Y in ee)this[Y]=ee[Y];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var G,$,U,X;this._more||(this.yytext="",this.match="");for(var ee=this._currentRules(),Y=0;Y$[0].length)){if($=U,X=Y,this.options.backtrack_lexer){if(G=this.test_match(U,ee[Y]),G!==!1)return G;if(this._backtrack){$=!1;continue}else return!1}else if(!this.options.flex)break}return $?(G=this.test_match($,ee[X]),G!==!1?G:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var $=this.next();return $||this.lex()},"lex"),begin:x(function($){this.conditionStack.push($)},"begin"),popState:x(function(){var $=this.conditionStack.length-1;return $>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function($){return $=this.conditionStack.length-1-Math.abs($||0),$>=0?this.conditionStack[$]:"INITIAL"},"topState"),pushState:x(function($){this.begin($)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function($,U,X,ee){var Y=ee;switch(X){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState("SCALE"),17;break;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;break;case 19:return this.popState(),"acc_title_value";break;case 20:return this.begin("acc_descr"),35;break;case 21:return this.popState(),"acc_descr_value";break;case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;break;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 27:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 28:return this.popState(),43;break;case 29:return this.pushState("CLASS"),48;break;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 31:return this.popState(),50;break;case 32:return this.pushState("STYLE"),45;break;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 34:return this.popState(),47;break;case 35:return this.pushState("SCALE"),17;break;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),U.yytext=U.yytext.slice(0,-10).trim(),27;break;case 42:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),25;break;case 43:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),26;break;case 44:return this.popState(),U.yytext=U.yytext.slice(0,-10).trim(),27;break;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";break;case 51:return this.popState(),"ID";break;case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;break;case 57:break;case 58:return this.popState(),21;break;case 59:break;case 60:return this.begin("NOTE"),29;break;case 61:return this.popState(),this.pushState("NOTE_ID"),59;break;case 62:return this.popState(),this.pushState("NOTE_ID"),60;break;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";break;case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 69:return this.popState(),U.yytext=U.yytext.substr(2).trim(),31;break;case 70:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),31;break;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return U.yytext=U.yytext.trim(),14;break;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/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}}};return B}();N.lexer=O;function P(){this.yy={}}return x(P,"Parser"),P.prototype=N,N.Parser=P,new P}();IP.parser=IP;kS=IP,vYe="TB",xme="TB",fme="dir",P1="state",O1="root",NP="relation",yYe="classDef",xYe="style",bYe="applyClass",$b="default",bme="divider",wme="fill:none",Tme="fill: #333",kme="c",Eme="text",Sme="normal",LP="rect",RP="rectWithTitle",wYe="stateStart",TYe="stateEnd",dme="divider",pme="roundedWithTitle",kYe="note",EYe="noteGroup",zb="statediagram",SYe="state",CYe=`${zb}-${SYe}`,Cme="transition",AYe="note",_Ye="note-edge",LYe=`${Cme} ${_Ye}`,RYe=`${zb}-${AYe}`,IYe="cluster",NYe=`${zb}-${IYe}`,DYe="cluster-alt",MYe=`${zb}-${DYe}`,Ame="parent",_me="note",OYe="state",DP="----",PYe=`${DP}${_me}`,gme=`${DP}${Ame}`,Lme=x((t,e=xme)=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),BYe=x(function(t,e){return e.db.getClasses()},"getClasses"),FYe=x(async function(t,e,r,n){J.info("REF0:"),J.info("Drawing state diagram (v2)",e);let{securityLevel:i,state:a,layout:s}=we();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=Ho(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 zo(o,l);let u=8;try{(typeof n.db.getLinks=="function"?n.db.getLinks():new Map).forEach((f,d)=>{let p=typeof d=="string"?d:typeof d?.id=="string"?d.id:"";if(!p){J.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(d));return}let g=l.node()?.querySelectorAll("g"),m;if(g?.forEach(w=>{w.textContent?.trim()===p&&(m=w)}),!m){J.warn("\u26A0\uFE0F Could not find node matching text:",p);return}let v=m.parentNode;if(!v){J.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",p);return}let y=document.createElementNS("http://www.w3.org/2000/svg","a"),b=f.url.replace(/^"+|"+$/g,"");if(y.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",b),y.setAttribute("target","_blank"),f.tooltip){let w=f.tooltip.replace(/^"+|"+$/g,"");y.setAttribute("title",w)}v.replaceChild(y,m),y.appendChild(m),J.info("\u{1F517} Wrapped node in
    tag for:",p,f.url)})}catch(h){J.error("\u274C Error injecting clickable links:",h)}zt.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Bs(l,u,zb,a?.useMaxWidth??!0)},"draw"),Rme={getClasses:BYe,draw:FYe,getDir:Lme},wS=new Map,Vf=0;x(TS,"stateDomId");$Ye=x((t,e,r,n,i,a,s,o)=>{J.trace("items",e),e.forEach(l=>{switch(l.stmt){case P1:Fb(t,l,r,n,i,a,s,o);break;case $b:Fb(t,l,r,n,i,a,s,o);break;case NP:{Fb(t,l.state1,r,n,i,a,s,o),Fb(t,l.state2,r,n,i,a,s,o);let u={id:"edge"+Vf,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:wme,labelStyle:"",label:Je.sanitizeText(l.description??"",we()),arrowheadStyle:Tme,labelpos:kme,labelType:Eme,thickness:Sme,classes:Cme,look:s};i.push(u),Vf++}break}})},"setupDoc"),mme=x((t,e=xme)=>{let r=e;if(t.doc)for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");x(Bb,"insertOrUpdateNode");x(Ime,"getClassesFromDbInfo");x(Nme,"getStylesFromDbInfo");Fb=x((t,e,r,n,i,a,s,o)=>{let l=e.id,u=r.get(l),h=Ime(u),f=Nme(u),d=we();if(J.info("dataFetcher parsedItem",e,u,f),l!=="root"){let p=LP;e.start===!0?p=wYe:e.start===!1&&(p=TYe),e.type!==$b&&(p=e.type),wS.get(l)||wS.set(l,{id:l,shape:p,description:Je.sanitizeText(l,d),cssClasses:`${h} ${CYe}`,cssStyles:f});let g=wS.get(l);e.description&&(Array.isArray(g.description)?(g.shape=RP,g.description.push(e.description)):g.description?.length&&g.description.length>0?(g.shape=RP,g.description===l?g.description=[e.description]:g.description=[g.description,e.description]):(g.shape=LP,g.description=e.description),g.description=Je.sanitizeTextOrArray(g.description,d)),g.description?.length===1&&g.shape===RP&&(g.type==="group"?g.shape=pme:g.shape=LP),!g.type&&e.doc&&(J.info("Setting cluster for XCX",l,mme(e)),g.type="group",g.isGroup=!0,g.dir=mme(e),g.shape=e.type===bme?dme:pme,g.cssClasses=`${g.cssClasses} ${NYe} ${a?MYe:""}`);let m={labelStyle:"",shape:g.shape,label:g.description,cssClasses:g.cssClasses,cssCompiledStyles:[],cssStyles:g.cssStyles,id:l,dir:g.dir,domId:TS(l,Vf),type:g.type,isGroup:g.type==="group",padding:8,rx:10,ry:10,look:s};if(m.shape===dme&&(m.label=""),t&&t.id!=="root"&&(J.trace("Setting node ",l," to be child of its parent ",t.id),m.parentId=t.id),m.centerLabel=!0,e.note){let v={labelStyle:"",shape:kYe,label:e.note.text,cssClasses:RYe,cssStyles:[],cssCompiledStyles:[],id:l+PYe+"-"+Vf,domId:TS(l,Vf,_me),type:g.type,isGroup:g.type==="group",padding:d.flowchart?.padding,look:s,position:e.note.position},y=l+gme,b={labelStyle:"",shape:EYe,label:e.note.text,cssClasses:g.cssClasses,cssStyles:[],id:l+gme,domId:TS(l,Vf,Ame),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};Vf++,b.id=y,v.parentId=y,Bb(n,b,o),Bb(n,v,o),Bb(n,m,o);let w=l,S=v.id;e.note.position==="left of"&&(w=v.id,S=l),i.push({id:w+"-"+S,start:w,end:S,arrowhead:"none",arrowTypeEnd:"",style:wme,labelStyle:"",classes:LYe,arrowheadStyle:Tme,labelpos:kme,labelType:Eme,thickness:Sme,look:s})}else Bb(n,m,o)}e.doc&&(J.trace("Adding nodes children "),$Ye(e,e.doc,r,n,i,!a,s,o))},"dataFetcher"),zYe=x(()=>{wS.clear(),Vf=0},"reset"),gs={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},vme=x(()=>new Map,"newClassesList"),yme=x(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),bS=x(t=>JSON.parse(JSON.stringify(t)),"clone"),th=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=vme(),this.documents={root:yme()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=Cr,this.setAccTitle=Er,this.getAccDescription=_r,this.setAccDescription=Ar,this.setDiagramTitle=Dr,this.getDiagramTitle=Lr,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{x(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let n of Array.isArray(t)?t:t.doc)switch(n.stmt){case P1:this.addState(n.id.trim(),n.type,n.doc,n.description,n.note);break;case NP:this.addRelation(n.state1,n.state2,n.description);break;case yYe:this.addStyleClass(n.id.trim(),n.classes);break;case xYe:this.handleStyleDef(n);break;case bYe:this.setCssClass(n.id.trim(),n.styleClass);break;case"click":this.addLink(n.id,n.url,n.tooltip);break}let e=this.getStates(),r=we();zYe(),Fb(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,r.look,this.classes);for(let n of this.nodes)if(Array.isArray(n.label)){if(n.description=n.label.slice(1),n.isGroup&&n.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${n.id}]`);n.label=n.label[0]}}handleStyleDef(t){let e=t.id.trim().split(","),r=t.styleClass.split(",");for(let n of e){let i=this.getState(n);if(!i){let a=n.trim();this.addState(a),i=this.getState(a)}i&&(i.styles=r.map(a=>a.replace(/;/g,"")?.trim()))}}setRootDoc(t){J.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,r){if(e.stmt===NP){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===P1&&(e.id===gs.START_NODE?(e.id=t.id+(r?"_start":"_end"),e.start=r):e.id=e.id.trim()),e.stmt!==O1&&e.stmt!==P1||!e.doc)return;let n=[],i=[];for(let a of e.doc)if(a.type===bme){let s=bS(a);s.doc=bS(i),n.push(s),i=[]}else i.push(a);if(n.length>0&&i.length>0){let a={stmt:P1,id:g_(),type:"divider",doc:bS(i)};n.push(bS(a)),e.doc=n}e.doc.forEach(a=>this.docTranslator(e,a,!0))}getRootDocV2(){return this.docTranslator({id:O1,stmt:O1},{id:O1,stmt:O1,doc:this.rootDoc},!0),{id:O1,doc:this.rootDoc}}addState(t,e=$b,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))J.info("Adding state ",l,n),this.currentDocument.states.set(l,{stmt:P1,id:l,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]});else{let u=this.currentDocument.states.get(l);if(!u)throw new Error(`State not found: ${l}`);u.doc||(u.doc=r),u.type||(u.type=e)}if(n&&(J.info("Setting state description",l,n),(Array.isArray(n)?n:[n]).forEach(h=>this.addDescription(l,h.trim()))),i){let u=this.currentDocument.states.get(l);if(!u)throw new Error(`State not found: ${l}`);u.note=i,u.note.text=Je.sanitizeText(u.note.text,we())}a&&(J.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(h=>this.setCssClass(l,h.trim()))),s&&(J.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(h=>this.setStyle(l,h.trim()))),o&&(J.info("Setting state styles",l,s),(Array.isArray(o)?o:[o]).forEach(h=>this.setTextStyle(l,h.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:yme()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=vme(),t||(this.links=new Map,mr())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){J.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,r){this.links.set(t,{url:e,tooltip:r}),J.warn("Adding link",t,e,r)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===gs.START_NODE?(this.startEndCount++,`${gs.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=$b){return t===gs.START_NODE?gs.START_TYPE:e}endIdIfNeeded(t=""){return t===gs.END_NODE?(this.startEndCount++,`${gs.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=$b){return t===gs.END_NODE?gs.END_TYPE:e}addRelationObjs(t,e,r=""){let 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:Je.sanitizeText(r,we())})}addRelation(t,e,r){if(typeof t=="object"&&typeof e=="object")this.addRelationObjs(t,e,r);else if(typeof t=="string"&&typeof e=="string"){let n=this.startIdIfNeeded(t.trim()),i=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),s=this.endTypeIfNeeded(e);this.addState(n,i),this.addState(a,s),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:r?Je.sanitizeText(r,we()):void 0})}}addDescription(t,e){let r=this.currentDocument.states.get(t),n=e.startsWith(":")?e.replace(":","").trim():e;r?.descriptions?.push(Je.sanitizeText(n,we()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():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(gs.STYLECLASS_SEP).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(gs.COLOR_KEYWORD).exec(n)){let s=i.replace(gs.FILL_KEYWORD,gs.BG_FILL).replace(gs.COLOR_KEYWORD,gs.FILL_KEYWORD);r.textStyles.push(s)}r.styles.push(i)})}getClasses(){return this.classes}setCssClass(t,e){t.split(",").forEach(r=>{let n=this.getState(r);if(!n){let i=r.trim();this.addState(i),n=this.getState(i)}n?.classes?.push(e)})}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===fme)}getDirection(){return this.getDirectionStatement()?.value??vYe}setDirection(t){let e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:fme,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=we();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Lme(this.getRootDocV2())}}getConfig(){return we().state}},GYe=x(t=>` defs #statediagram-barbEnd { fill: ${t.transitionColor}; stroke: ${t.transitionColor}; } g.stateGroup text { fill: ${t.nodeBorder}; stroke: none; font-size: 10px; } g.stateGroup text { fill: ${t.textColor}; stroke: none; font-size: 10px; } g.stateGroup .state-title { font-weight: bolder; fill: ${t.stateLabelColor}; } g.stateGroup rect { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; } g.stateGroup line { stroke: ${t.lineColor}; stroke-width: 1; } .transition { stroke: ${t.transitionColor}; stroke-width: 1; fill: none; } .stateGroup .composit { fill: ${t.background}; border-bottom: 1px } .stateGroup .alt-composit { fill: #e0e0e0; border-bottom: 1px } .state-note { stroke: ${t.noteBorderColor}; fill: ${t.noteBkgColor}; text { fill: ${t.noteTextColor}; stroke: none; font-size: 10px; } } .stateLabel .box { stroke: none; stroke-width: 0; fill: ${t.mainBkg}; opacity: 0.5; } .edgeLabel .label rect { fill: ${t.labelBackgroundColor}; opacity: 0.5; } .edgeLabel { background-color: ${t.edgeLabelBackground}; p { background-color: ${t.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${t.edgeLabelBackground}; fill: ${t.edgeLabelBackground}; } text-align: center; } .edgeLabel .label text { fill: ${t.transitionLabelColor||t.tertiaryTextColor}; } .label div .edgeLabel { color: ${t.transitionLabelColor||t.tertiaryTextColor}; } .stateLabel text { fill: ${t.stateLabelColor}; font-size: 10px; font-weight: bold; } .node circle.state-start { fill: ${t.specialStateColor}; stroke: ${t.specialStateColor}; } .node .fork-join { fill: ${t.specialStateColor}; stroke: ${t.specialStateColor}; } .node circle.state-end { fill: ${t.innerEndBackground}; stroke: ${t.background}; stroke-width: 1.5 } .end-state-inner { fill: ${t.compositeBackground||t.background}; // stroke: ${t.background}; stroke-width: 1.5 } .node rect { fill: ${t.stateBkg||t.mainBkg}; stroke: ${t.stateBorder||t.nodeBorder}; stroke-width: 1px; } .node polygon { fill: ${t.mainBkg}; stroke: ${t.stateBorder||t.nodeBorder};; stroke-width: 1px; } #statediagram-barbEnd { fill: ${t.lineColor}; } .statediagram-cluster rect { fill: ${t.compositeTitleBackground}; stroke: ${t.stateBorder||t.nodeBorder}; stroke-width: 1px; } .cluster-label, .nodeLabel { color: ${t.stateLabelColor}; // line-height: 1; } .statediagram-cluster rect.outer { rx: 5px; ry: 5px; } .statediagram-state .divider { stroke: ${t.stateBorder||t.nodeBorder}; } .statediagram-state .title-state { rx: 5px; ry: 5px; } .statediagram-cluster.statediagram-cluster .inner { fill: ${t.compositeBackground||t.background}; } .statediagram-cluster.statediagram-cluster-alt .inner { fill: ${t.altBackground?t.altBackground:"#efefef"}; } .statediagram-cluster .inner { rx:0; ry:0; } .statediagram-state rect.basic { rx: 5px; ry: 5px; } .statediagram-state rect.divider { stroke-dasharray: 10,10; fill: ${t.altBackground?t.altBackground:"#efefef"}; } .note-edge { stroke-dasharray: 5; } .statediagram-note rect { fill: ${t.noteBkgColor}; stroke: ${t.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note rect { fill: ${t.noteBkgColor}; stroke: ${t.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note text { fill: ${t.noteTextColor}; } .statediagram-note .nodeLabel { color: ${t.noteTextColor}; } .statediagram .edgeLabel { color: red; // ${t.noteTextColor}; } #dependencyStart, #dependencyEnd { fill: ${t.lineColor}; stroke: ${t.lineColor}; stroke-width: 1; } .statediagramTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } `,"getStyles"),ES=GYe});var Pme={};hr(Pme,{diagram:()=>nXe});var VYe,UYe,qYe,WYe,HYe,YYe,XYe,jYe,KYe,Dme,Mme,ZYe,ho,OP,QYe,JYe,eXe,tXe,Ome,rXe,nXe,Bme=F(()=>{MP();El();Yo();Go();Io();Ks();Ls();ja();Ka();na();hn();vr();rr();cr();_L();Mo();cr();VYe=x(t=>t.append("circle").attr("class","start-state").attr("r",we().state.sizeUnit).attr("cx",we().state.padding+we().state.sizeUnit).attr("cy",we().state.padding+we().state.sizeUnit),"drawStartState"),UYe=x(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",we().state.textHeight).attr("class","divider").attr("x2",we().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),qYe=x((t,e)=>{let r=t.append("text").attr("x",2*we().state.padding).attr("y",we().state.textHeight+2*we().state.padding).attr("font-size",we().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",we().state.padding).attr("y",we().state.padding).attr("width",n.width+2*we().state.padding).attr("height",n.height+2*we().state.padding).attr("rx",we().state.radius),r},"drawSimpleState"),WYe=x((t,e)=>{let r=x(function(d,p,g){let m=d.append("tspan").attr("x",2*we().state.padding).text(p);g||m.attr("dy",we().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*we().state.padding).attr("y",we().state.textHeight+1.3*we().state.padding).attr("font-size",we().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),a=i.height,s=t.append("text").attr("x",we().state.padding).attr("y",a+we().state.padding*.4+we().state.dividerMargin+we().state.textHeight).attr("class","state-description"),o=!0,l=!0;e.descriptions.forEach(function(d){o||(r(s,d,l),l=!1),o=!1});let u=t.append("line").attr("x1",we().state.padding).attr("y1",we().state.padding+a+we().state.dividerMargin/2).attr("y2",we().state.padding+a+we().state.dividerMargin/2).attr("class","descr-divider"),h=s.node().getBBox(),f=Math.max(h.width,i.width);return u.attr("x2",f+3*we().state.padding),t.insert("rect",":first-child").attr("x",we().state.padding).attr("y",we().state.padding).attr("width",f+2*we().state.padding).attr("height",h.height+a+2*we().state.padding).attr("rx",we().state.radius),t},"drawDescrState"),HYe=x((t,e,r)=>{let n=we().state.padding,i=2*we().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",we().state.titleShift).attr("font-size",we().state.fontSize).attr("class","state-title").text(e.id),h=l.node().getBBox().width+i,f=Math.max(h,s);f===s&&(f=f+i);let d,p=t.node().getBBox();e.doc,d=o-n,h>s&&(d=(s-f)/2+n),Math.abs(o-p.x)s&&(d=o-(h-s)/2);let g=1-we().state.textHeight;return t.insert("rect",":first-child").attr("x",d).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",p.height+we().state.textHeight+we().state.titleShift+1).attr("rx","0"),l.attr("x",d+n),h<=s&&l.attr("x",o+(f-i)/2-h/2+n),t.insert("rect",":first-child").attr("x",d).attr("y",we().state.titleShift-we().state.textHeight-we().state.padding).attr("width",f).attr("height",we().state.textHeight*3).attr("rx",we().state.radius),t.insert("rect",":first-child").attr("x",d).attr("y",we().state.titleShift-we().state.textHeight-we().state.padding).attr("width",f).attr("height",p.height+3+2*we().state.textHeight).attr("rx",we().state.radius),t},"addTitleAndBox"),YYe=x(t=>(t.append("circle").attr("class","end-state-outer").attr("r",we().state.sizeUnit+we().state.miniPadding).attr("cx",we().state.padding+we().state.sizeUnit+we().state.miniPadding).attr("cy",we().state.padding+we().state.sizeUnit+we().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",we().state.sizeUnit).attr("cx",we().state.padding+we().state.sizeUnit+2).attr("cy",we().state.padding+we().state.sizeUnit+2)),"drawEndState"),XYe=x((t,e)=>{let r=we().state.forkWidth,n=we().state.forkHeight;if(e.parentId){let i=r;r=n,n=i}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",we().state.padding).attr("y",we().state.padding)},"drawForkJoinState"),jYe=x((t,e,r,n)=>{let i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=t.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");let o=s.split(Je.lineBreakRegex),l=1.25*we().state.noteMargin;for(let u of o){let h=u.trim();if(h.length>0){let f=a.append("tspan");if(f.text(h),l===0){let d=f.node().getBBox();l+=d.height}i+=l,f.attr("x",e+we().state.noteMargin),f.attr("y",r+i+1.25*we().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),KYe=x((t,e)=>{e.attr("class","state-note");let r=e.append("rect").attr("x",0).attr("y",we().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=jYe(t,0,0,n);return r.attr("height",a+2*we().state.noteMargin),r.attr("width",i+we().state.noteMargin*2),r},"drawNote"),Dme=x(function(t,e){let r=e.id,n={id:r,label:e.id,width:0,height:0},i=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&VYe(i),e.type==="end"&&YYe(i),(e.type==="fork"||e.type==="join")&&XYe(i,e),e.type==="note"&&KYe(e.note.text,i),e.type==="divider"&&UYe(i),e.type==="default"&&e.descriptions.length===0&&qYe(i,e),e.type==="default"&&e.descriptions.length>0&&WYe(i,e);let a=i.node().getBBox();return n.width=a.width+2*we().state.padding,n.height=a.height+2*we().state.padding,n},"drawState"),Mme=0,ZYe=x(function(t,e,r){let n=x(function(l){switch(l){case th.relationType.AGGREGATION:return"aggregation";case th.relationType.EXTENSION:return"extension";case th.relationType.COMPOSITION:return"composition";case th.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(l=>!Number.isNaN(l.y));let i=e.points,a=ic().x(function(l){return l.x}).y(function(l){return l.y}).curve(pl),s=t.append("path").attr("d",a(i)).attr("id","edge"+Mme).attr("class","transition"),o="";if(we().state.arrowMarkerAbsolute&&(o=lu(!0)),s.attr("marker-end","url("+o+"#"+n(th.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let l=t.append("g").attr("class","stateLabel"),{x:u,y:h}=zt.calcLabelPosition(e.points),f=Je.getRows(r.title),d=0,p=[],g=0,m=0;for(let b=0;b<=f.length;b++){let w=l.append("text").attr("text-anchor","middle").text(f[b]).attr("x",u).attr("y",h+d),S=w.node().getBBox();g=Math.max(g,S.width),m=Math.min(m,S.x),J.info(S.x,u,h+d),d===0&&(d=w.node().getBBox().height,J.info("Title height",d,h)),p.push(w)}let v=d*f.length;if(f.length>1){let b=(f.length-1)*d*.5;p.forEach((w,S)=>w.attr("y",h+S*d-b)),v=d*f.length}let y=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-g/2-we().state.padding/2).attr("y",h-v/2-we().state.padding/2-3.5).attr("width",g+we().state.padding).attr("height",v+we().state.padding),J.info(y)}Mme++},"drawEdge"),OP={},QYe=x(function(){},"setConf"),JYe=x(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"),eXe=x(function(t,e,r,n){ho=we().state;let i=we().securityLevel,a;i==="sandbox"&&(a=He("#i"+e));let s=i==="sandbox"?He(a.nodes()[0].contentDocument.body):He("body"),o=i==="sandbox"?a.nodes()[0].contentDocument:document;J.debug("Rendering diagram "+t);let l=s.select(`[id='${e}']`);JYe(l);let u=n.db.getRootDoc();Ome(u,l,void 0,!1,s,o,n);let h=ho.padding,f=l.node().getBBox(),d=f.width+h*2,p=f.height+h*2,g=d*1.75;un(l,p,g,ho.useMaxWidth),l.attr("viewBox",`${f.x-ho.padding} ${f.y-ho.padding} `+d+" "+p)},"draw"),tXe=x(t=>t?t.length*ho.fontSizeFactor:1,"getLabelWidth"),Ome=x((t,e,r,n,i,a,s)=>{let o=new rn({compound:!0,multigraph:!0}),l,u=!0;for(l=0;l{let T=S.parentElement,E=0,A=0;T&&(T.parentElement&&(E=T.parentElement.getBBox().width),A=parseInt(T.getAttribute("data-x-shift"),10),Number.isNaN(A)&&(A=0)),S.setAttribute("x1",0-A+8),S.setAttribute("x2",E-A-8)})):J.debug("No Node "+b+": "+JSON.stringify(o.node(b)))});let v=m.getBBox();o.edges().forEach(function(b){b!==void 0&&o.edge(b)!==void 0&&(J.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(o.edge(b))),ZYe(e,o.edge(b),o.edge(b).relation))}),v=m.getBBox();let y={id:r||"root",label:r||"root",width:0,height:0};return y.width=v.width+2*ho.padding,y.height=v.height+2*ho.padding,J.debug("Doc rendered",y,o),y},"renderDoc"),rXe={setConf:QYe,draw:eXe},nXe={parser:kS,get db(){return new th(1)},renderer:rXe,styles:ES,init:x(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});var Fme={};hr(Fme,{diagram:()=>iXe});var iXe,$me=F(()=>{MP();El();Yo();Go();Io();Ks();Ls();ja();Ka();na();hn();vr();rr();iXe={parser:kS,get db(){return new th(2)},renderer:Rme,styles:ES,init:x(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});var jme={};hr(jme,{diagram:()=>SXe});function Xme(t){let e=we().journey,r=e.maxLabelWidth;SS=0;let n=60;Object.keys(rh).forEach(i=>{let a=rh[i].color,s={cx:20,cy:n,r:7,fill:a,stroke:"#000",pos:rh[i].position};Ub.drawCircle(t,s);let o=t.append("text").attr("visibility","hidden").text(i),l=o.node().getBoundingClientRect().width;o.remove();let u=[];if(l<=r)u=[i];else{let h=i.split(" "),f="";o=t.append("text").attr("visibility","hidden"),h.forEach(d=>{let p=f?`${f} ${d}`:d;if(o.text(p),o.node().getBoundingClientRect().width>r){if(f&&u.push(f),f=d,o.text(d),o.node().getBoundingClientRect().width>r){let m="";for(let v of d)m+=v,o.text(m+"-"),o.node().getBoundingClientRect().width>r&&(u.push(m.slice(0,-1)+"-"),m=v);f=m}}else f=p}),f&&u.push(f),o.remove()}u.forEach((h,f)=>{let d={x:40,y:n+7+f*20,fill:"#666",text:h,textMargin:e.boxTextMargin??5},g=Ub.drawText(t,d).node().getBoundingClientRect().width;g>SS&&g>e.leftMargin-g&&(SS=g)}),n+=Math.max(20,u.length*20)})}var BP,aXe,B1,FP,Gb,Vb,sXe,oXe,lXe,cXe,uXe,hXe,fXe,zme,dXe,Gme,pXe,gXe,$P,mXe,Wme,Hme,vXe,yXe,Vme,xXe,bXe,Yme,wXe,Ub,TXe,rh,SS,Ol,Uf,kXe,el,PP,Ume,EXe,qme,SXe,Kme=F(()=>{$k();Sf();vr();rr();cr();cr();BP=function(){var t=x(function(f,d,p,g){for(p=p||{},g=f.length;g--;p[f[g]]=d);return p},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,14],l={trace:x(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:x(function(d,p,g,m,v,y,b){var w=y.length-1;switch(v){case 1:return y[w-1];case 2:this.$=[];break;case 3:y[w-1].push(y[w]),this.$=y[w-1];break;case 4:case 5:this.$=y[w];break;case 6:case 7:this.$=[];break;case 8:m.setDiagramTitle(y[w].substr(6)),this.$=y[w].substr(6);break;case 9:this.$=y[w].trim(),m.setAccTitle(this.$);break;case 10:case 11:this.$=y[w].trim(),m.setAccDescription(this.$);break;case 12:m.addSection(y[w].substr(8)),this.$=y[w].substr(8);break;case 13:m.addTask(y[w-1],y[w]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:s,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:x(function(d,p){if(p.recoverable)this.trace(d);else{var g=new Error(d);throw g.hash=p,g}},"parseError"),parse:x(function(d){var p=this,g=[0],m=[],v=[null],y=[],b=this.table,w="",S=0,T=0,E=0,A=2,C=1,I=y.slice.call(arguments,1),M=Object.create(this.lexer),R={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(R.yy[k]=this.yy[k]);M.setInput(d,R.yy),R.yy.lexer=M,R.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var L=M.yylloc;y.push(L);var _=M.options&&M.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function D(re){g.length=g.length-2*re,v.length=v.length-re,y.length=y.length-re}x(D,"popStack");function N(){var re;return re=m.pop()||M.lex()||C,typeof re!="number"&&(re instanceof Array&&(m=re,re=m.pop()),re=p.symbols_[re]||re),re}x(N,"lex");for(var O,P,B,G,$,U,X={},ee,Y,oe,Q;;){if(B=g[g.length-1],this.defaultActions[B]?G=this.defaultActions[B]:((O===null||typeof O>"u")&&(O=N()),G=b[B]&&b[B][O]),typeof G>"u"||!G.length||!G[0]){var ue="";Q=[];for(ee in b[B])this.terminals_[ee]&&ee>A&&Q.push("'"+this.terminals_[ee]+"'");M.showPosition?ue="Parse error on line "+(S+1)+`: `+M.showPosition()+` Expecting `+Q.join(", ")+", got '"+(this.terminals_[O]||O)+"'":ue="Parse error on line "+(S+1)+": Unexpected "+(O==C?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(ue,{text:M.match,token:this.terminals_[O]||O,line:M.yylineno,loc:L,expected:Q})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+O);switch(G[0]){case 1:g.push(O),v.push(M.yytext),y.push(M.yylloc),g.push(G[1]),O=null,P?(O=P,P=null):(T=M.yyleng,w=M.yytext,S=M.yylineno,L=M.yylloc,E>0&&E--);break;case 2:if(Y=this.productions_[G[1]][1],X.$=v[v.length-Y],X._$={first_line:y[y.length-(Y||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(Y||1)].first_column,last_column:y[y.length-1].last_column},_&&(X._$.range=[y[y.length-(Y||1)].range[0],y[y.length-1].range[1]]),U=this.performAction.apply(X,[w,T,S,R.yy,G[1],v,y].concat(I)),typeof U<"u")return U;Y&&(g=g.slice(0,-1*Y*2),v=v.slice(0,-1*Y),y=y.slice(0,-1*Y)),g.push(this.productions_[G[1]][0]),v.push(X.$),y.push(X._$),oe=b[g[g.length-2]][g[g.length-1]],g.push(oe);break;case 3:return!0}}return!0},"parse")},u=function(){var f={EOF:1,parseError:x(function(p,g){if(this.yy.parser)this.yy.parser.parseError(p,g);else throw new Error(p)},"parseError"),setInput:x(function(d,p){return this.yy=p||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var p=d.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:x(function(d){var p=d.length,g=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===m.length?this.yylloc.first_column:0)+m[m.length-g.length].length-g[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(d){this.unput(this.match.slice(d))},"less"),pastInput:x(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var d=this.pastInput(),p=new Array(d.length+1).join("-");return d+this.upcomingInput()+` `+p+"^"},"showPosition"),test_match:x(function(d,p){var g,m,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),m=d[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,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(d[0].length),this.matched+=d[0],g=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var y in v)this[y]=v[y];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,p,g,m;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),y=0;yp[0].length)){if(p=g,m=y,this.options.backtrack_lexer){if(d=this.test_match(g,v[y]),d!==!1)return d;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(d=this.test_match(p,v[m]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var p=this.next();return p||this.lex()},"lex"),begin:x(function(p){this.conditionStack.push(p)},"begin"),popState:x(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:x(function(p){this.begin(p)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(p,g,m,v){var y=v;switch(m){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return f}();l.lexer=u;function h(){this.yy={}}return x(h,"Parser"),h.prototype=l,l.Parser=h,new h}();BP.parser=BP;aXe=BP,B1="",FP=[],Gb=[],Vb=[],sXe=x(function(){FP.length=0,Gb.length=0,B1="",Vb.length=0,mr()},"clear"),oXe=x(function(t){B1=t,FP.push(t)},"addSection"),lXe=x(function(){return FP},"getSections"),cXe=x(function(){let t=zme(),e=100,r=0;for(;!t&&r{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},"updateActors"),hXe=x(function(t,e){let r=e.substr(1).split(":"),n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));let a=i.map(o=>o.trim()),s={section:B1,type:B1,people:a,task:t,score:n};Vb.push(s)},"addTask"),fXe=x(function(t){let e={section:B1,type:B1,description:t,task:t,classes:[]};Gb.push(e)},"addTaskOrg"),zme=x(function(){let t=x(function(r){return Vb[r].processed},"compileTask"),e=!0;for(let[r,n]of Vb.entries())t(r),e=e&&n.processed;return e},"compileTasks"),dXe=x(function(){return uXe()},"getActors"),Gme={getConfig:x(()=>we().journey,"getConfig"),clear:sXe,setDiagramTitle:Dr,getDiagramTitle:Lr,setAccTitle:Er,getAccTitle:Cr,setAccDescription:Ar,getAccDescription:_r,addSection:oXe,getSections:lXe,getTasks:cXe,addTask:hXe,addTaskOrg:fXe,getActors:dXe},pXe=x(t=>`.label { font-family: ${t.fontFamily}; color: ${t.textColor}; } .mouth { stroke: #666; } line { stroke: ${t.textColor} } .legend { fill: ${t.textColor}; font-family: ${t.fontFamily}; } .label text { fill: #333; } .label { color: ${t.textColor} } .face { ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"}; stroke: #999; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: 1px; } .node .label { text-align: center; } .node.clickable { cursor: pointer; } .arrowheadPath { fill: ${t.arrowheadColor}; } .edgePath .path { stroke: ${t.lineColor}; stroke-width: 1.5px; } .flowchart-link { stroke: ${t.lineColor}; fill: none; } .edgeLabel { background-color: ${t.edgeLabelBackground}; rect { opacity: 0.5; } text-align: center; } .cluster rect { } .cluster text { fill: ${t.titleColor}; } div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${t.fontFamily}; font-size: 12px; background: ${t.tertiaryColor}; border: 1px solid ${t.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .task-type-0, .section-type-0 { ${t.fillType0?`fill: ${t.fillType0}`:""}; } .task-type-1, .section-type-1 { ${t.fillType0?`fill: ${t.fillType1}`:""}; } .task-type-2, .section-type-2 { ${t.fillType0?`fill: ${t.fillType2}`:""}; } .task-type-3, .section-type-3 { ${t.fillType0?`fill: ${t.fillType3}`:""}; } .task-type-4, .section-type-4 { ${t.fillType0?`fill: ${t.fillType4}`:""}; } .task-type-5, .section-type-5 { ${t.fillType0?`fill: ${t.fillType5}`:""}; } .task-type-6, .section-type-6 { ${t.fillType0?`fill: ${t.fillType6}`:""}; } .task-type-7, .section-type-7 { ${t.fillType0?`fill: ${t.fillType7}`:""}; } .actor-0 { ${t.actor0?`fill: ${t.actor0}`:""}; } .actor-1 { ${t.actor1?`fill: ${t.actor1}`:""}; } .actor-2 { ${t.actor2?`fill: ${t.actor2}`:""}; } .actor-3 { ${t.actor3?`fill: ${t.actor3}`:""}; } .actor-4 { ${t.actor4?`fill: ${t.actor4}`:""}; } .actor-5 { ${t.actor5?`fill: ${t.actor5}`:""}; } ${Mc()} `,"getStyles"),gXe=pXe,$P=x(function(t,e){return h0(t,e)},"drawRect"),mXe=x(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=nc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}x(a,"smile");function s(l){let u=nc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}x(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return x(o,"ambivalent"),e.score>3?a(i):e.score<3?s(i):o(i),n},"drawFace"),Wme=x(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),Hme=x(function(t,e){return due(t,e)},"drawText"),vXe=x(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}x(r,"genPoints");let 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,Hme(t,e)},"drawLabel"),yXe=x(function(t,e,r){let n=t.append("g"),i=La();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,$P(n,i),Yme(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),Vme=-1,xXe=x(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");Vme++;let a=300+5*30;i.append("line").attr("id","task"+Vme).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),mXe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=La();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,$P(i,s);let o=e.x+14;e.people.forEach(l=>{let u=e.actors[l].color,h={cx:o,cy:e.y,r:7,fill:u,stroke:"#000",title:l,pos:e.actors[l].position};Wme(i,h),o+=10}),Yme(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),bXe=x(function(t,e){Ok(t,e)},"drawBackgroundRect"),Yme=function(){function t(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}x(t,"byText");function e(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=i.split(//gi);for(let v=0;v{rh[S]={color:Ol.actorColours[m%Ol.actorColours.length],position:m},m++}),Xme(f),Uf=Ol.leftMargin+SS,el.insert(0,0,Uf,Object.keys(rh).length*50),EXe(f,d,0);let v=el.getBounds();p&&f.append("text").text(p).attr("x",Uf).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o);let y=v.stopy-v.starty+2*Ol.diagramMarginY,b=Uf+v.stopx+2*Ol.diagramMarginX;un(f,y,b,Ol.useMaxWidth),f.append("line").attr("x1",Uf).attr("y1",Ol.height*4).attr("x2",b-Uf-4).attr("y2",Ol.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let w=p?70:0;f.attr("viewBox",`${v.startx} -25 ${b} ${y+w}`),f.attr("preserveAspectRatio","xMinYMin meet"),f.attr("height",y+w+25)},"draw"),el={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:x(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:x(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:x(function(t,e,r,n){let i=we().journey,a=this,s=0;function o(l){return x(function(h){s++;let f=a.sequenceItems.length-s+1;a.updateVal(h,"starty",e-f*i.boxMargin,Math.min),a.updateVal(h,"stopy",n+f*i.boxMargin,Math.max),a.updateVal(el.data,"startx",t-f*i.boxMargin,Math.min),a.updateVal(el.data,"stopx",r+f*i.boxMargin,Math.max),l!=="activation"&&(a.updateVal(h,"startx",t-f*i.boxMargin,Math.min),a.updateVal(h,"stopx",r+f*i.boxMargin,Math.max),a.updateVal(el.data,"starty",e-f*i.boxMargin,Math.min),a.updateVal(el.data,"stopy",n+f*i.boxMargin,Math.max))},"updateItemBounds")}x(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:x(function(t,e,r,n){let i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(el.data,"startx",i,Math.min),this.updateVal(el.data,"starty",s,Math.min),this.updateVal(el.data,"stopx",a,Math.max),this.updateVal(el.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),bumpVerticalPos:x(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:x(function(){return this.verticalPos},"getVerticalPos"),getBounds:x(function(){return this.data},"getBounds")},PP=Ol.sectionFills,Ume=Ol.sectionColours,EXe=x(function(t,e,r){let n=we().journey,i="",a=n.height*2+n.diagramMarginY,s=r+a,o=0,l="#CCC",u="black",h=0;for(let[f,d]of e.entries()){if(i!==d.section){l=PP[o%PP.length],h=o%PP.length,u=Ume[o%Ume.length];let g=0,m=d.section;for(let y=f;y(rh[m]&&(g[m]=rh[m]),g),{});d.x=f*n.taskMargin+f*n.width+Uf,d.y=s,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=u,d.fill=l,d.num=h,d.actors=p,Ub.drawTask(t,d,n),el.insert(d.x,d.y,d.x+d.width+n.taskMargin,300+5*30)}},"drawTasks"),qme={setConf:TXe,draw:kXe},SXe={parser:aXe,db:Gme,renderer:qme,styles:gXe,init:x(t=>{qme.setConf(t.journey),Gme.clear()},"init")}});var f1e={};hr(f1e,{diagram:()=>HXe});function UP(t,e){t.each(function(){var r=He(this),n=r.text().split(/(\s+|
    )/).reverse(),i,a=[],s=1.1,o=r.attr("y"),l=parseFloat(r.attr("dy")),u=r.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",l+"em");for(let h=0;he||i==="
    ")&&(a.pop(),u.text(a.join(" ").trim()),i==="
    "?a=[""]:a=[i],u=r.append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em").text(i))})}var zP,CXe,e1e,F1,t1e,GP,CS,$1,r1e,n1e,i1e,a1e,s1e,o1e,l1e,c1e,Zme,AXe,_Xe,AS,LXe,RXe,u1e,IXe,NXe,Qme,DXe,MXe,OXe,VP,h1e,PXe,BXe,FXe,$Xe,X0,zXe,Jme,GXe,VXe,UXe,qXe,WXe,HXe,d1e=F(()=>{vr();rr();cr();cr();qs();zP=function(){var t=x(function(d,p,g,m){for(g=g||{},m=d.length;m--;g[d[m]]=p);return g},"o"),e=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,16],l=[1,17],u={trace:x(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:x(function(p,g,m,v,y,b,w){var S=b.length-1;switch(y){case 1:return b[S-1];case 2:this.$=[];break;case 3:b[S-1].push(b[S]),this.$=b[S-1];break;case 4:case 5:this.$=b[S];break;case 6:case 7:this.$=[];break;case 8:v.getCommonDb().setDiagramTitle(b[S].substr(6)),this.$=b[S].substr(6);break;case 9:this.$=b[S].trim(),v.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=b[S].trim(),v.getCommonDb().setAccDescription(this.$);break;case 12:v.addSection(b[S].substr(8)),this.$=b[S].substr(8);break;case 15:v.addTask(b[S],0,""),this.$=b[S];break;case 16:v.addEvent(b[S].substr(2)),this.$=b[S];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:o,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:o,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:x(function(p,g){if(g.recoverable)this.trace(p);else{var m=new Error(p);throw m.hash=g,m}},"parseError"),parse:x(function(p){var g=this,m=[0],v=[],y=[null],b=[],w=this.table,S="",T=0,E=0,A=0,C=2,I=1,M=b.slice.call(arguments,1),R=Object.create(this.lexer),k={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(k.yy[L]=this.yy[L]);R.setInput(p,k.yy),k.yy.lexer=R,k.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var _=R.yylloc;b.push(_);var D=R.options&&R.options.ranges;typeof k.yy.parseError=="function"?this.parseError=k.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(te){m.length=m.length-2*te,y.length=y.length-te,b.length=b.length-te}x(N,"popStack");function O(){var te;return te=v.pop()||R.lex()||I,typeof te!="number"&&(te instanceof Array&&(v=te,te=v.pop()),te=g.symbols_[te]||te),te}x(O,"lex");for(var P,B,G,$,U,X,ee={},Y,oe,Q,ue;;){if(G=m[m.length-1],this.defaultActions[G]?$=this.defaultActions[G]:((P===null||typeof P>"u")&&(P=O()),$=w[G]&&w[G][P]),typeof $>"u"||!$.length||!$[0]){var re="";ue=[];for(Y in w[G])this.terminals_[Y]&&Y>C&&ue.push("'"+this.terminals_[Y]+"'");R.showPosition?re="Parse error on line "+(T+1)+`: `+R.showPosition()+` Expecting `+ue.join(", ")+", got '"+(this.terminals_[P]||P)+"'":re="Parse error on line "+(T+1)+": Unexpected "+(P==I?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(re,{text:R.match,token:this.terminals_[P]||P,line:R.yylineno,loc:_,expected:ue})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+P);switch($[0]){case 1:m.push(P),y.push(R.yytext),b.push(R.yylloc),m.push($[1]),P=null,B?(P=B,B=null):(E=R.yyleng,S=R.yytext,T=R.yylineno,_=R.yylloc,A>0&&A--);break;case 2:if(oe=this.productions_[$[1]][1],ee.$=y[y.length-oe],ee._$={first_line:b[b.length-(oe||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(oe||1)].first_column,last_column:b[b.length-1].last_column},D&&(ee._$.range=[b[b.length-(oe||1)].range[0],b[b.length-1].range[1]]),X=this.performAction.apply(ee,[S,E,T,k.yy,$[1],y,b].concat(M)),typeof X<"u")return X;oe&&(m=m.slice(0,-1*oe*2),y=y.slice(0,-1*oe),b=b.slice(0,-1*oe)),m.push(this.productions_[$[1]][0]),y.push(ee.$),b.push(ee._$),Q=w[m[m.length-2]][m[m.length-1]],m.push(Q);break;case 3:return!0}}return!0},"parse")},h=function(){var d={EOF:1,parseError:x(function(g,m){if(this.yy.parser)this.yy.parser.parseError(g,m);else throw new Error(g)},"parseError"),setInput:x(function(p,g){return this.yy=g||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var g=p.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:x(function(p){var g=p.length,m=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===v.length?this.yylloc.first_column:0)+v[v.length-m.length].length-m[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(p){this.unput(this.match.slice(p))},"less"),pastInput:x(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var p=this.pastInput(),g=new Array(p.length+1).join("-");return p+this.upcomingInput()+` `+g+"^"},"showPosition"),test_match:x(function(p,g){var m,v,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),v=p[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],m=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var b in y)this[b]=y[b];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,g,m,v;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),b=0;bg[0].length)){if(g=m,v=b,this.options.backtrack_lexer){if(p=this.test_match(m,y[b]),p!==!1)return p;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(p=this.test_match(g,y[v]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var g=this.next();return g||this.lex()},"lex"),begin:x(function(g){this.conditionStack.push(g)},"begin"),popState:x(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:x(function(g){this.begin(g)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(g,m,v,y){var b=y;switch(v){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return d}();u.lexer=h;function f(){this.yy={}}return x(f,"Parser"),f.prototype=u,u.Parser=f,new f}();zP.parser=zP;CXe=zP,e1e={};ah(e1e,{addEvent:()=>l1e,addSection:()=>i1e,addTask:()=>o1e,addTaskOrg:()=>c1e,clear:()=>n1e,default:()=>AXe,getCommonDb:()=>r1e,getSections:()=>a1e,getTasks:()=>s1e});F1="",t1e=0,GP=[],CS=[],$1=[],r1e=x(()=>X4,"getCommonDb"),n1e=x(function(){GP.length=0,CS.length=0,F1="",$1.length=0,mr()},"clear"),i1e=x(function(t){F1=t,GP.push(t)},"addSection"),a1e=x(function(){return GP},"getSections"),s1e=x(function(){let t=Zme(),e=100,r=0;for(;!t&&rr.id===t1e-1).events.push(t)},"addEvent"),c1e=x(function(t){let e={section:F1,type:F1,description:t,task:t,classes:[]};CS.push(e)},"addTaskOrg"),Zme=x(function(){let t=x(function(r){return $1[r].processed},"compileTask"),e=!0;for(let[r,n]of $1.entries())t(r),e=e&&n.processed;return e},"compileTasks"),AXe={clear:n1e,getCommonDb:r1e,addSection:i1e,getSections:a1e,getTasks:s1e,addTask:o1e,addTaskOrg:c1e,addEvent:l1e},_Xe=12,AS=x(function(t,e){let r=t.append("rect");return 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),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},"drawRect"),LXe=x(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=nc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}x(a,"smile");function s(l){let u=nc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}x(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return x(o,"ambivalent"),e.score>3?a(i):e.score<3?s(i):o(i),n},"drawFace"),RXe=x(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),u1e=x(function(t,e){let r=e.text.replace(//gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),IXe=x(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}x(r,"genPoints");let 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,u1e(t,e)},"drawLabel"),NXe=x(function(t,e,r){let n=t.append("g"),i=VP();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,AS(n,i),h1e(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),Qme=-1,DXe=x(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");Qme++;let a=300+5*30;i.append("line").attr("id","task"+Qme).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),LXe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=VP();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,AS(i,s),h1e(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),MXe=x(function(t,e){AS(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),OXe=x(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),VP=x(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),h1e=function(){function t(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}x(t,"byText");function e(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=i.split(//gi);for(let v=0;v0&&(L+=(M.events.length-1)*10),E=Math.max(E,L)}J.debug("maxSectionHeight before draw",p),J.debug("maxTaskHeight before draw",g),d&&d.length>0?d.forEach(I=>{let M=h.filter(_=>_.section===I),R={number:w,descr:I,section:w,width:200*Math.max(M.length,1)-50,padding:20,maxHeight:p};J.debug("sectionNode",R);let k=u.append("g"),L=X0.drawNode(k,R,w,i);J.debug("sectionNode output",L),k.attr("transform",`translate(${y}, ${v})`),b+=p+50,M.length>0&&Jme(u,M,w,y,b,g,i,T,E,p,!1),y+=200*Math.max(M.length,1),b=v,w++}):(S=!1,Jme(u,h,w,y,b,g,i,T,E,p,!0));let A=u.node().getBBox();J.debug("bounds",A),f&&u.append("text").text(f).attr("x",A.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),m=S?p+g+150:g+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",m).attr("x2",A.width+3*a).attr("y2",m).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),cu(void 0,u,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),Jme=x(function(t,e,r,n,i,a,s,o,l,u,h){for(let f of e){let d={descr:f.task,section:r,number:r,width:150,padding:20,maxHeight:a};J.debug("taskNode",d);let p=t.append("g").attr("class","taskWrapper"),m=X0.drawNode(p,d,r,s).height;if(J.debug("taskHeight after draw",m),p.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,m),f.events){let v=t.append("g").attr("class","lineWrapper"),y=a;i+=100,y=y+GXe(t,f.events,r,n,i,s),i-=100,v.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n=n+200,h&&!s.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),GXe=x(function(t,e,r,n,i,a){let s=0,o=i;i=i+100;for(let l of e){let u={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50};J.debug("eventNode",u);let h=t.append("g").attr("class","eventWrapper"),d=X0.drawNode(h,u,r,a).height;s=s+d,h.attr("transform",`translate(${n}, ${i})`),i=i+10+d}return i=o,s},"drawEvents"),VXe={setConf:x(()=>{},"setConf"),draw:zXe},UXe=x(t=>{let e="";for(let r=0;r` .edge { stroke-width: 3; } ${UXe(t)} .section-root rect, .section-root path, .section-root circle { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .eventWrapper { filter: brightness(120%); } `,"getStyles"),WXe=qXe,HXe={db:e1e,renderer:VXe,parser:CXe,styles:WXe}});function p1e(t,e=0){return(xa[t[e+0]]+xa[t[e+1]]+xa[t[e+2]]+xa[t[e+3]]+"-"+xa[t[e+4]]+xa[t[e+5]]+"-"+xa[t[e+6]]+xa[t[e+7]]+"-"+xa[t[e+8]]+xa[t[e+9]]+"-"+xa[t[e+10]]+xa[t[e+11]]+xa[t[e+12]]+xa[t[e+13]]+xa[t[e+14]]+xa[t[e+15]]).toLowerCase()}var xa,g1e=F(()=>{xa=[];for(let t=0;t<256;++t)xa.push((t+256).toString(16).slice(1))});function WP(){if(!qP){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");qP=crypto.getRandomValues.bind(crypto)}return qP(YXe)}var qP,YXe,m1e=F(()=>{YXe=new Uint8Array(16)});var XXe,HP,v1e=F(()=>{XXe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),HP={randomUUID:XXe}});function jXe(t,e,r){if(HP.randomUUID&&!e&&!t)return HP.randomUUID();t=t||{};let n=t.random??t.rng?.()??WP();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)e[r+i]=n[i];return e}return p1e(n)}var YP,y1e=F(()=>{v1e();m1e();g1e();YP=jXe});var x1e=F(()=>{y1e()});var b1e={};hr(b1e,{diagram:()=>nje});var XP,KXe,nh,ZXe,QXe,JXe,eje,tje,rje,nje,w1e=F(()=>{El();Yo();Go();Io();Ks();Ls();ja();Ka();na();hn();vr();rr();x1e();qs();XP=function(){var t=x(function(S,T,E,A){for(E=E||{},A=S.length;A--;E[S[A]]=T);return E},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],g=[1,33],m=[1,34],v=[1,6,7,11,13,15,16,19,22],y={trace:x(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:x(function(T,E,A,C,I,M,R){var k=M.length-1;switch(I){case 6:case 7:return C;case 8:C.getLogger().trace("Stop NL ");break;case 9:C.getLogger().trace("Stop EOF ");break;case 11:C.getLogger().trace("Stop NL2 ");break;case 12:C.getLogger().trace("Stop EOF2 ");break;case 15:C.getLogger().info("Node: ",M[k].id),C.addNode(M[k-1].length,M[k].id,M[k].descr,M[k].type);break;case 16:C.getLogger().trace("Icon: ",M[k]),C.decorateNode({icon:M[k]});break;case 17:case 21:C.decorateNode({class:M[k]});break;case 18:C.getLogger().trace("SPACELIST");break;case 19:C.getLogger().trace("Node: ",M[k].id),C.addNode(0,M[k].id,M[k].descr,M[k].type);break;case 20:C.decorateNode({icon:M[k]});break;case 25:C.getLogger().trace("node found ..",M[k-2]),this.$={id:M[k-1],descr:M[k-1],type:C.getType(M[k-2],M[k])};break;case 26:this.$={id:M[k],descr:M[k],type:C.nodeType.DEFAULT};break;case 27:C.getLogger().trace("node found ..",M[k-3]),this.$={id:M[k-3],descr:M[k-1],type:C.getType(M[k-2],M[k])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:u,7:h,10:23,11:f},t(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:o}),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,23]),t(d,[2,24]),t(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:h,10:32,11:f},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},t(p,[2,14],{7:g,11:m}),t(v,[2,8]),t(v,[2,9]),t(v,[2,10]),t(d,[2,15]),t(d,[2,16]),t(d,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:g,11:m}),t(v,[2,11]),t(v,[2,12]),{21:[1,37]},t(d,[2,25]),t(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(T,E){if(E.recoverable)this.trace(T);else{var A=new Error(T);throw A.hash=E,A}},"parseError"),parse:x(function(T){var E=this,A=[0],C=[],I=[null],M=[],R=this.table,k="",L=0,_=0,D=0,N=2,O=1,P=M.slice.call(arguments,1),B=Object.create(this.lexer),G={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(G.yy[$]=this.yy[$]);B.setInput(T,G.yy),G.yy.lexer=B,G.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var U=B.yylloc;M.push(U);var X=B.options&&B.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ee(W){A.length=A.length-2*W,I.length=I.length-W,M.length=M.length-W}x(ee,"popStack");function Y(){var W;return W=C.pop()||B.lex()||O,typeof W!="number"&&(W instanceof Array&&(C=W,W=C.pop()),W=E.symbols_[W]||W),W}x(Y,"lex");for(var oe,Q,ue,re,te,Z,j={},ae,K,de,ne;;){if(ue=A[A.length-1],this.defaultActions[ue]?re=this.defaultActions[ue]:((oe===null||typeof oe>"u")&&(oe=Y()),re=R[ue]&&R[ue][oe]),typeof re>"u"||!re.length||!re[0]){var be="";ne=[];for(ae in R[ue])this.terminals_[ae]&&ae>N&&ne.push("'"+this.terminals_[ae]+"'");B.showPosition?be="Parse error on line "+(L+1)+`: `+B.showPosition()+` Expecting `+ne.join(", ")+", got '"+(this.terminals_[oe]||oe)+"'":be="Parse error on line "+(L+1)+": Unexpected "+(oe==O?"end of input":"'"+(this.terminals_[oe]||oe)+"'"),this.parseError(be,{text:B.match,token:this.terminals_[oe]||oe,line:B.yylineno,loc:U,expected:ne})}if(re[0]instanceof Array&&re.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ue+", token: "+oe);switch(re[0]){case 1:A.push(oe),I.push(B.yytext),M.push(B.yylloc),A.push(re[1]),oe=null,Q?(oe=Q,Q=null):(_=B.yyleng,k=B.yytext,L=B.yylineno,U=B.yylloc,D>0&&D--);break;case 2:if(K=this.productions_[re[1]][1],j.$=I[I.length-K],j._$={first_line:M[M.length-(K||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(K||1)].first_column,last_column:M[M.length-1].last_column},X&&(j._$.range=[M[M.length-(K||1)].range[0],M[M.length-1].range[1]]),Z=this.performAction.apply(j,[k,_,L,G.yy,re[1],I,M].concat(P)),typeof Z<"u")return Z;K&&(A=A.slice(0,-1*K*2),I=I.slice(0,-1*K),M=M.slice(0,-1*K)),A.push(this.productions_[re[1]][0]),I.push(j.$),M.push(j._$),de=R[A[A.length-2]][A[A.length-1]],A.push(de);break;case 3:return!0}}return!0},"parse")},b=function(){var S={EOF:1,parseError:x(function(E,A){if(this.yy.parser)this.yy.parser.parseError(E,A);else throw new Error(E)},"parseError"),setInput:x(function(T,E){return this.yy=E||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var E=T.match(/(?:\r\n?|\n).*/g);return E?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},"input"),unput:x(function(T){var E=T.length,A=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-E),this.offset-=E;var C=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===C.length?this.yylloc.first_column:0)+C[C.length-A.length].length-A[0].length:this.yylloc.first_column-E},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-E]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(T){this.unput(this.match.slice(T))},"less"),pastInput:x(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var T=this.pastInput(),E=new Array(T.length+1).join("-");return T+this.upcomingInput()+` `+E+"^"},"showPosition"),test_match:x(function(T,E){var A,C,I;if(this.options.backtrack_lexer&&(I={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(I.yylloc.range=this.yylloc.range.slice(0))),C=T[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(T[0].length),this.matched+=T[0],A=this.performAction.call(this,this.yy,this,E,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var M in I)this[M]=I[M];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,E,A,C;this._more||(this.yytext="",this.match="");for(var I=this._currentRules(),M=0;ME[0].length)){if(E=A,C=M,this.options.backtrack_lexer){if(T=this.test_match(A,I[M]),T!==!1)return T;if(this._backtrack){E=!1;continue}else return!1}else if(!this.options.flex)break}return E?(T=this.test_match(E,I[C]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var E=this.next();return E||this.lex()},"lex"),begin:x(function(E){this.conditionStack.push(E)},"begin"),popState:x(function(){var E=this.conditionStack.length-1;return E>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(E){return E=this.conditionStack.length-1-Math.abs(E||0),E>=0?this.conditionStack[E]:"INITIAL"},"topState"),pushState:x(function(E){this.begin(E)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(E,A,C,I){var M=I;switch(C){case 0:return E.getLogger().trace("Found comment",A.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:E.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return E.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:E.getLogger().trace("end icon"),this.popState();break;case 10:return E.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return E.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return E.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return E.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:E.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return E.getLogger().trace("description:",A.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),E.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),E.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),E.getLogger().trace("node end ...",A.yytext),"NODE_DEND";break;case 30:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),E.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),E.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return E.getLogger().trace("Long description:",A.yytext),20;break;case 36:return E.getLogger().trace("Long description:",A.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return S}();y.lexer=b;function w(){this.yy={}}return x(w,"Parser"),w.prototype=y,y.Parser=w,new w}();XP.parser=XP;KXe=XP,nh={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ZXe=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=nh,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{x(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={}}getParent(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level0?this.nodes[0]:null}addNode(t,e,r,n){J.info("addNode",t,e,r,n);let i=we(),a=i.mindmap?.padding??sr.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:a*=2;break}let s={id:this.count++,nodeId:ar(e,i),level:t,descr:ar(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??sr.mindmap.maxNodeWidth,padding:a},o=this.getParent(t);if(o)o.children.push(s),this.nodes.push(s);else if(this.nodes.length===0)this.nodes.push(s);else throw new Error(`There can be only one root. No parent could be found for ("${s.descr}")`)}getType(t,e){switch(J.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return e===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;let e=we(),r=this.nodes[this.nodes.length-1];t.icon&&(r.icon=ar(t.icon,e)),t.class&&(r.class=ar(t.class,e))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,e){if(t.level===0?t.section=void 0:t.section=e,t.children)for(let[r,n]of t.children.entries()){let i=t.level===0?r:e;this.assignSections(n,i)}}flattenNodes(t,e){let r=["mindmap-node"];t.level===0?r.push("section-root","section--1"):t.section!==void 0&&r.push(`section-${t.section}`),t.class&&r.push(t.class);let n=r.join(" "),i=x(s=>{switch(s){case nh.CIRCLE:return"mindmapCircle";case nh.RECT:return"rect";case nh.ROUNDED_RECT:return"rounded";case nh.CLOUD:return"cloud";case nh.BANG:return"bang";case nh.HEXAGON:return"hexagon";case nh.DEFAULT:return"defaultMindmapNode";case nh.NO_BORDER:default:return"rect"}},"getShapeFromType"),a={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,isGroup:!1,shape:i(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:n,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(a),t.children)for(let s of t.children)this.flattenNodes(s,e)}generateEdges(t,e){if(t.children)for(let r of t.children){let n="edge";r.section!==void 0&&(n+=` section-edge-${r.section}`);let i=t.level+1;n+=` edge-depth-${i}`;let a={id:`edge_${t.id}_${r.id}`,start:t.id.toString(),end:r.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:n,depth:t.level,section:r.section};e.push(a),this.generateEdges(r,e)}}getData(){let t=this.getMindmap(),e=we(),n=wz().layout!==void 0,i=e;if(n||(i.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:i};J.debug("getData: mindmapRoot",t,e),this.assignSections(t);let a=[],s=[];this.flattenNodes(t,a),this.generateEdges(t,s),J.debug(`getData: processed ${a.length} nodes and ${s.length} edges`);let o=new Map;for(let l of a)o.set(l.id,{shape:l.shape,width:l.width,height:l.height,padding:l.padding});return{nodes:a,edges:s,config:i,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:"mindmap",diagramId:"mindmap-"+YP()}}getLogger(){return J}},QXe=x(async(t,e,r,n)=>{J.debug(`Rendering mindmap diagram `+t);let i=n.db,a=i.getData(),s=Ho(e,a.config.securityLevel);a.type=n.type,a.layoutAlgorithm=Ic(a.config.layout,{fallback:"cose-bilkent"}),a.diagramId=e,i.getMindmap()&&(a.nodes.forEach(l=>{l.shape==="rounded"?(l.radius=15,l.taper=15,l.stroke="none",l.width=0,l.padding=15):l.shape==="circle"?l.padding=10:l.shape==="rect"&&(l.width=0,l.padding=10)}),await zo(a,s),Bs(s,a.config.mindmap?.padding??sr.mindmap.padding,"mindmapDiagram",a.config.mindmap?.useMaxWidth??sr.mindmap.useMaxWidth))},"draw"),JXe={draw:QXe},eje=x(t=>{let e="";for(let r=0;r` .edge { stroke-width: 3; } ${eje(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .section-root span { color: ${t.gitBranchLabel0}; } .section-2 span { color: ${t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .mindmap-node-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } `,"getStyles"),rje=tje,nje={get db(){return new ZXe},renderer:JXe,parser:KXe,styles:rje}});var k1e={};hr(k1e,{diagram:()=>Tje});var jP,ije,tl,ZP,KP,QP,aje,sje,T1e,oje,lje,Ni,cje,uje,hje,fje,dje,pje,gje,mje,vje,yje,xje,bje,wje,Tje,E1e=F(()=>{ac();Sf();vy();Ls();ja();Ka();na();hn();vr();rr();qs();jP=function(){var t=x(function(A,C,I,M){for(I=I||{},M=A.length;M--;I[A[M]]=C);return I},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,31],g=[6,7,11,24],m=[1,6,13,16,17,20,23],v=[1,35],y=[1,36],b=[1,6,7,11,13,16,17,20,23],w=[1,38],S={trace:x(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:x(function(C,I,M,R,k,L,_){var D=L.length-1;switch(k){case 6:case 7:return R;case 8:R.getLogger().trace("Stop NL ");break;case 9:R.getLogger().trace("Stop EOF ");break;case 11:R.getLogger().trace("Stop NL2 ");break;case 12:R.getLogger().trace("Stop EOF2 ");break;case 15:R.getLogger().info("Node: ",L[D-1].id),R.addNode(L[D-2].length,L[D-1].id,L[D-1].descr,L[D-1].type,L[D]);break;case 16:R.getLogger().info("Node: ",L[D].id),R.addNode(L[D-1].length,L[D].id,L[D].descr,L[D].type);break;case 17:R.getLogger().trace("Icon: ",L[D]),R.decorateNode({icon:L[D]});break;case 18:case 23:R.decorateNode({class:L[D]});break;case 19:R.getLogger().trace("SPACELIST");break;case 20:R.getLogger().trace("Node: ",L[D-1].id),R.addNode(0,L[D-1].id,L[D-1].descr,L[D-1].type,L[D]);break;case 21:R.getLogger().trace("Node: ",L[D].id),R.addNode(0,L[D].id,L[D].descr,L[D].type);break;case 22:R.decorateNode({icon:L[D]});break;case 27:R.getLogger().trace("node found ..",L[D-2]),this.$={id:L[D-1],descr:L[D-1],type:R.getType(L[D-2],L[D])};break;case 28:this.$={id:L[D],descr:L[D],type:0};break;case 29:R.getLogger().trace("node found ..",L[D-3]),this.$={id:L[D-3],descr:L[D-1],type:R.getType(L[D-2],L[D])};break;case 30:this.$=L[D-1]+L[D];break;case 31:this.$=L[D];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:r,9:22,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:u,7:h,10:23,11:f},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(g,[2,25]),t(g,[2,26]),t(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:h,10:34,11:f},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(m,[2,14],{7:v,11:y}),t(b,[2,8]),t(b,[2,9]),t(b,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:w}),t(g,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:v,11:y}),t(b,[2,11]),t(b,[2,12]),t(d,[2,15],{24:w}),t(g,[2,30]),{22:[1,41]},t(g,[2,27]),t(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(C,I){if(I.recoverable)this.trace(C);else{var M=new Error(C);throw M.hash=I,M}},"parseError"),parse:x(function(C){var I=this,M=[0],R=[],k=[null],L=[],_=this.table,D="",N=0,O=0,P=0,B=2,G=1,$=L.slice.call(arguments,1),U=Object.create(this.lexer),X={yy:{}};for(var ee in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ee)&&(X.yy[ee]=this.yy[ee]);U.setInput(C,X.yy),X.yy.lexer=U,X.yy.parser=this,typeof U.yylloc>"u"&&(U.yylloc={});var Y=U.yylloc;L.push(Y);var oe=U.options&&U.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Q(Be){M.length=M.length-2*Be,k.length=k.length-Be,L.length=L.length-Be}x(Q,"popStack");function ue(){var Be;return Be=R.pop()||U.lex()||G,typeof Be!="number"&&(Be instanceof Array&&(R=Be,Be=R.pop()),Be=I.symbols_[Be]||Be),Be}x(ue,"lex");for(var re,te,Z,j,ae,K,de={},ne,be,W,Ve;;){if(Z=M[M.length-1],this.defaultActions[Z]?j=this.defaultActions[Z]:((re===null||typeof re>"u")&&(re=ue()),j=_[Z]&&_[Z][re]),typeof j>"u"||!j.length||!j[0]){var pe="";Ve=[];for(ne in _[Z])this.terminals_[ne]&&ne>B&&Ve.push("'"+this.terminals_[ne]+"'");U.showPosition?pe="Parse error on line "+(N+1)+`: `+U.showPosition()+` Expecting `+Ve.join(", ")+", got '"+(this.terminals_[re]||re)+"'":pe="Parse error on line "+(N+1)+": Unexpected "+(re==G?"end of input":"'"+(this.terminals_[re]||re)+"'"),this.parseError(pe,{text:U.match,token:this.terminals_[re]||re,line:U.yylineno,loc:Y,expected:Ve})}if(j[0]instanceof Array&&j.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+re);switch(j[0]){case 1:M.push(re),k.push(U.yytext),L.push(U.yylloc),M.push(j[1]),re=null,te?(re=te,te=null):(O=U.yyleng,D=U.yytext,N=U.yylineno,Y=U.yylloc,P>0&&P--);break;case 2:if(be=this.productions_[j[1]][1],de.$=k[k.length-be],de._$={first_line:L[L.length-(be||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(be||1)].first_column,last_column:L[L.length-1].last_column},oe&&(de._$.range=[L[L.length-(be||1)].range[0],L[L.length-1].range[1]]),K=this.performAction.apply(de,[D,O,N,X.yy,j[1],k,L].concat($)),typeof K<"u")return K;be&&(M=M.slice(0,-1*be*2),k=k.slice(0,-1*be),L=L.slice(0,-1*be)),M.push(this.productions_[j[1]][0]),k.push(de.$),L.push(de._$),W=_[M[M.length-2]][M[M.length-1]],M.push(W);break;case 3:return!0}}return!0},"parse")},T=function(){var A={EOF:1,parseError:x(function(I,M){if(this.yy.parser)this.yy.parser.parseError(I,M);else throw new Error(I)},"parseError"),setInput:x(function(C,I){return this.yy=I||this.yy||{},this._input=C,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var I=C.match(/(?:\r\n?|\n).*/g);return I?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),C},"input"),unput:x(function(C){var I=C.length,M=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var R=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),M.length-1&&(this.yylineno-=M.length-1);var k=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:M?(M.length===R.length?this.yylloc.first_column:0)+R[R.length-M.length].length-M[0].length:this.yylloc.first_column-I},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-I]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(C){this.unput(this.match.slice(C))},"less"),pastInput:x(function(){var C=this.matched.substr(0,this.matched.length-this.match.length);return(C.length>20?"...":"")+C.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var C=this.match;return C.length<20&&(C+=this._input.substr(0,20-C.length)),(C.substr(0,20)+(C.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var C=this.pastInput(),I=new Array(C.length+1).join("-");return C+this.upcomingInput()+` `+I+"^"},"showPosition"),test_match:x(function(C,I){var M,R,k;if(this.options.backtrack_lexer&&(k={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&&(k.yylloc.range=this.yylloc.range.slice(0))),R=C[0].match(/(?:\r\n?|\n).*/g),R&&(this.yylineno+=R.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:R?R[R.length-1].length-R[R.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+C[0].length},this.yytext+=C[0],this.match+=C[0],this.matches=C,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(C[0].length),this.matched+=C[0],M=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var L in k)this[L]=k[L];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,I,M,R;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),L=0;LI[0].length)){if(I=M,R=L,this.options.backtrack_lexer){if(C=this.test_match(M,k[L]),C!==!1)return C;if(this._backtrack){I=!1;continue}else return!1}else if(!this.options.flex)break}return I?(C=this.test_match(I,k[R]),C!==!1?C:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var I=this.next();return I||this.lex()},"lex"),begin:x(function(I){this.conditionStack.push(I)},"begin"),popState:x(function(){var I=this.conditionStack.length-1;return I>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(I){return I=this.conditionStack.length-1-Math.abs(I||0),I>=0?this.conditionStack[I]:"INITIAL"},"topState"),pushState:x(function(I){this.begin(I)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(I,M,R,k){var L=k;switch(R){case 0:return this.pushState("shapeData"),M.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let _=/\n\s*/g;return M.yytext=M.yytext.replace(_,"
    "),24;break;case 4:return 24;case 5:this.popState();break;case 6:return I.getLogger().trace("Found comment",M.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:I.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return I.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:I.getLogger().trace("end icon"),this.popState();break;case 16:return I.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return I.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return I.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return I.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;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:I.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return I.getLogger().trace("description:",M.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),I.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),I.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),I.getLogger().trace("node end ...",M.yytext),"NODE_DEND";break;case 36:return this.popState(),I.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),I.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),I.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),I.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),I.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return I.getLogger().trace("Long description:",M.yytext),21;break;case 42:return I.getLogger().trace("Long description:",M.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return A}();S.lexer=T;function E(){this.yy={}}return x(E,"Parser"),E.prototype=S,S.Parser=E,new E}();jP.parser=jP;ije=jP,tl=[],ZP=[],KP=0,QP={},aje=x(()=>{tl=[],ZP=[],KP=0,QP={}},"clear"),sje=x(t=>{if(tl.length===0)return null;let e=tl[0].level,r=null;for(let n=tl.length-1;n>=0;n--)if(tl[n].level===e&&!r&&(r=tl[n]),tl[n].levelo.parentId===i.id);for(let o of s){let l={id:o.id,parentId:i.id,label:ar(o.label??"",n),isGroup:!1,ticket:o?.ticket,priority:o?.priority,assigned:o?.assigned,icon:o?.icon,shape:"kanbanItem",level:o.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(l)}}return{nodes:e,edges:t,other:{},config:we()}},"getData"),lje=x((t,e,r,n,i)=>{let a=we(),s=a.mindmap?.padding??sr.mindmap.padding;switch(n){case Ni.ROUNDED_RECT:case Ni.RECT:case Ni.HEXAGON:s*=2}let o={id:ar(e,a)||"kbn"+KP++,level:t,label:ar(r,a),width:a.mindmap?.maxNodeWidth??sr.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(i!==void 0){let u;i.includes(` `)?u=i+` `:u=`{ `+i+` }`;let h=Lh(u,{schema:_h});if(h.shape&&(h.shape!==h.shape.toLowerCase()||h.shape.includes("_")))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);h?.shape&&h.shape==="kanbanItem"&&(o.shape=h?.shape),h?.label&&(o.label=h?.label),h?.icon&&(o.icon=h?.icon.toString()),h?.assigned&&(o.assigned=h?.assigned.toString()),h?.ticket&&(o.ticket=h?.ticket.toString()),h?.priority&&(o.priority=h?.priority)}let l=sje(t);l?o.parentId=l.id||"kbn"+KP++:ZP.push(o),tl.push(o)},"addNode"),Ni={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},cje=x((t,e)=>{switch(J.debug("In get type",t,e),t){case"[":return Ni.RECT;case"(":return e===")"?Ni.ROUNDED_RECT:Ni.CLOUD;case"((":return Ni.CIRCLE;case")":return Ni.CLOUD;case"))":return Ni.BANG;case"{{":return Ni.HEXAGON;default:return Ni.DEFAULT}},"getType"),uje=x((t,e)=>{QP[t]=e},"setElementForId"),hje=x(t=>{if(!t)return;let e=we(),r=tl[tl.length-1];t.icon&&(r.icon=ar(t.icon,e)),t.class&&(r.cssClasses=ar(t.class,e))},"decorateNode"),fje=x(t=>{switch(t){case Ni.DEFAULT:return"no-border";case Ni.RECT:return"rect";case Ni.ROUNDED_RECT:return"rounded-rect";case Ni.CIRCLE:return"circle";case Ni.CLOUD:return"cloud";case Ni.BANG:return"bang";case Ni.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),dje=x(()=>J,"getLogger"),pje=x(t=>QP[t],"getElementById"),gje={clear:aje,addNode:lje,getSections:T1e,getData:oje,nodeType:Ni,getType:cje,setElementForId:uje,decorateNode:hje,type2Str:fje,getLogger:dje,getElementById:pje},mje=gje,vje=x(async(t,e,r,n)=>{J.debug(`Rendering kanban diagram `+t);let a=n.db.getData(),s=we();s.htmlLabels=!1;let o=Bi(e),l=o.append("g");l.attr("class","sections");let u=o.append("g");u.attr("class","items");let h=a.nodes.filter(v=>v.isGroup),f=0,d=10,p=[],g=25;for(let v of h){let y=s?.kanban?.sectionWidth||200;f=f+1,v.x=y*f+(f-1)*d/2,v.width=y,v.y=0,v.height=y*3,v.rx=5,v.ry=5,v.cssClasses=v.cssClasses+" section-"+f;let b=await tg(l,v);g=Math.max(g,b?.labelBBox?.height),p.push(b)}let m=0;for(let v of h){let y=p[m];m=m+1;let b=s?.kanban?.sectionWidth||200,w=-b*3/2+g,S=w,T=a.nodes.filter(C=>C.parentId===v.id);for(let C of T){if(C.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");C.x=v.x,C.width=b-1.5*d;let M=(await Fd(u,C,{config:s})).node().getBBox();C.y=S+M.height/2,await Wy(C),S=C.y+M.height/2+d/2}let E=y.cluster.select("rect"),A=Math.max(S-w+3*d,50)+(g-25);E.attr("height",A)}cu(void 0,o,s.mindmap?.padding??sr.kanban.padding,s.mindmap?.useMaxWidth??sr.kanban.useMaxWidth)},"draw"),yje={draw:vje},xje=x(t=>{let e="";for(let n=0;nt.darkMode?Rt(n,i):Et(n,i),"adjuster");for(let n=0;n` .edge { stroke-width: 3; } ${xje(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .cluster-label, .label { color: ${t.textColor}; fill: ${t.textColor}; } .kanban-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } ${Mc()} `,"getStyles"),wje=bje,Tje={db:mje,renderer:yje,parser:ije,styles:wje}});function qb(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}var S1e=F(()=>{});function z1(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var C1e=F(()=>{});function G1(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i)}return r}var A1e=F(()=>{});var JP=F(()=>{S1e();C1e();A1e()});function kje(t){return t.target.depth}function eB(t){return t.depth}function tB(t,e){return e-1-t.height}function Wb(t,e){return t.sourceLinks.length?t.depth:e-1}function rB(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?z1(t.sourceLinks,kje)-1:0}var nB=F(()=>{JP()});function V1(t){return function(){return t}}var _1e=F(()=>{});function L1e(t,e){return _S(t.source,e.source)||t.index-e.index}function R1e(t,e){return _S(t.target,e.target)||t.index-e.index}function _S(t,e){return t.y0-e.y0}function iB(t){return t.value}function Eje(t){return t.index}function Sje(t){return t.nodes}function Cje(t){return t.links}function I1e(t,e){let r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function N1e({nodes:t}){for(let e of t){let r=e.y0,n=r;for(let i of e.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of e.targetLinks)i.y1=n+i.width/2,n+=i.width}}function LS(){let t=0,e=0,r=1,n=1,i=24,a=8,s,o=Eje,l=Wb,u,h,f=Sje,d=Cje,p=6;function g(){let D={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return m(D),v(D),y(D),b(D),T(D),N1e(D),D}g.update=function(D){return N1e(D),D},g.nodeId=function(D){return arguments.length?(o=typeof D=="function"?D:V1(D),g):o},g.nodeAlign=function(D){return arguments.length?(l=typeof D=="function"?D:V1(D),g):l},g.nodeSort=function(D){return arguments.length?(u=D,g):u},g.nodeWidth=function(D){return arguments.length?(i=+D,g):i},g.nodePadding=function(D){return arguments.length?(a=s=+D,g):a},g.nodes=function(D){return arguments.length?(f=typeof D=="function"?D:V1(D),g):f},g.links=function(D){return arguments.length?(d=typeof D=="function"?D:V1(D),g):d},g.linkSort=function(D){return arguments.length?(h=D,g):h},g.size=function(D){return arguments.length?(t=e=0,r=+D[0],n=+D[1],g):[r-t,n-e]},g.extent=function(D){return arguments.length?(t=+D[0][0],r=+D[1][0],e=+D[0][1],n=+D[1][1],g):[[t,e],[r,n]]},g.iterations=function(D){return arguments.length?(p=+D,g):p};function m({nodes:D,links:N}){for(let[P,B]of D.entries())B.index=P,B.sourceLinks=[],B.targetLinks=[];let O=new Map(D.map((P,B)=>[o(P,B,D),P]));for(let[P,B]of N.entries()){B.index=P;let{source:G,target:$}=B;typeof G!="object"&&(G=B.source=I1e(O,G)),typeof $!="object"&&($=B.target=I1e(O,$)),G.sourceLinks.push(B),$.targetLinks.push(B)}if(h!=null)for(let{sourceLinks:P,targetLinks:B}of D)P.sort(h),B.sort(h)}function v({nodes:D}){for(let N of D)N.value=N.fixedValue===void 0?Math.max(G1(N.sourceLinks,iB),G1(N.targetLinks,iB)):N.fixedValue}function y({nodes:D}){let N=D.length,O=new Set(D),P=new Set,B=0;for(;O.size;){for(let G of O){G.depth=B;for(let{target:$}of G.sourceLinks)P.add($)}if(++B>N)throw new Error("circular link");O=P,P=new Set}}function b({nodes:D}){let N=D.length,O=new Set(D),P=new Set,B=0;for(;O.size;){for(let G of O){G.height=B;for(let{source:$}of G.targetLinks)P.add($)}if(++B>N)throw new Error("circular link");O=P,P=new Set}}function w({nodes:D}){let N=qb(D,B=>B.depth)+1,O=(r-t-i)/(N-1),P=new Array(N);for(let B of D){let G=Math.max(0,Math.min(N-1,Math.floor(l.call(null,B,N))));B.layer=G,B.x0=t+G*O,B.x1=B.x0+i,P[G]?P[G].push(B):P[G]=[B]}if(u)for(let B of P)B.sort(u);return P}function S(D){let N=z1(D,O=>(n-e-(O.length-1)*s)/G1(O,iB));for(let O of D){let P=e;for(let B of O){B.y0=P,B.y1=P+B.value*N,P=B.y1+s;for(let G of B.sourceLinks)G.width=G.value*N}P=(n-P+s)/(O.length+1);for(let B=0;BO.length)-1)),S(N);for(let O=0;O0))continue;let ee=(U/X-$.y0)*N;$.y0+=ee,$.y1+=ee,R($)}u===void 0&&G.sort(_S),C(G,O)}}function A(D,N,O){for(let P=D.length,B=P-2;B>=0;--B){let G=D[B];for(let $ of G){let U=0,X=0;for(let{target:Y,value:oe}of $.sourceLinks){let Q=oe*(Y.layer-$.layer);U+=_($,Y)*Q,X+=Q}if(!(X>0))continue;let ee=(U/X-$.y0)*N;$.y0+=ee,$.y1+=ee,R($)}u===void 0&&G.sort(_S),C(G,O)}}function C(D,N){let O=D.length>>1,P=D[O];M(D,P.y0-s,O-1,N),I(D,P.y1+s,O+1,N),M(D,n,D.length-1,N),I(D,e,0,N)}function I(D,N,O,P){for(;O1e-6&&(B.y0+=G,B.y1+=G),N=B.y1+s}}function M(D,N,O,P){for(;O>=0;--O){let B=D[O],G=(B.y1-N)*P;G>1e-6&&(B.y0-=G,B.y1-=G),N=B.y0-s}}function R({sourceLinks:D,targetLinks:N}){if(h===void 0){for(let{source:{sourceLinks:O}}of N)O.sort(R1e);for(let{target:{targetLinks:O}}of D)O.sort(L1e)}}function k(D){if(h===void 0)for(let{sourceLinks:N,targetLinks:O}of D)N.sort(R1e),O.sort(L1e)}function L(D,N){let O=D.y0-(D.sourceLinks.length-1)*s/2;for(let{target:P,width:B}of D.sourceLinks){if(P===N)break;O+=B+s}for(let{source:P,width:B}of N.targetLinks){if(P===D)break;O-=B}return O}function _(D,N){let O=N.y0-(N.targetLinks.length-1)*s/2;for(let{source:P,width:B}of N.targetLinks){if(P===D)break;O+=B+s}for(let{target:P,width:B}of D.sourceLinks){if(P===N)break;O-=B}return O}return g}var D1e=F(()=>{JP();nB();_1e()});function oB(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function M1e(){return new oB}var aB,sB,j0,Aje,lB,O1e=F(()=>{aB=Math.PI,sB=2*aB,j0=1e-6,Aje=sB-j0;oB.prototype=M1e.prototype={constructor:oB,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,s=this._y1,o=r-t,l=n-e,u=a-t,h=s-e,f=u*u+h*h;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>j0)if(!(Math.abs(h*o-l*u)>j0)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var d=r-a,p=n-s,g=o*o+l*l,m=d*d+p*p,v=Math.sqrt(g),y=Math.sqrt(f),b=i*Math.tan((aB-Math.acos((g+f-m)/(2*v*y)))/2),w=b/y,S=b/v;Math.abs(w-1)>j0&&(this._+="L"+(t+w*u)+","+(e+w*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>u*p)+","+(this._x1=t+S*o)+","+(this._y1=e+S*l)}},arc:function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var s=r*Math.cos(n),o=r*Math.sin(n),l=t+s,u=e+o,h=1^a,f=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>j0||Math.abs(this._y1-u)>j0)&&(this._+="L"+l+","+u),r&&(f<0&&(f=f%sB+sB),f>Aje?this._+="A"+r+","+r+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):f>j0&&(this._+="A"+r+","+r+",0,"+ +(f>=aB)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};lB=M1e});var P1e=F(()=>{O1e()});function cB(t){return function(){return t}}var B1e=F(()=>{});function F1e(t){return t[0]}function $1e(t){return t[1]}var z1e=F(()=>{});var G1e,V1e=F(()=>{G1e=Array.prototype.slice});function _je(t){return t.source}function Lje(t){return t.target}function Rje(t){var e=_je,r=Lje,n=F1e,i=$1e,a=null;function s(){var o,l=G1e.call(arguments),u=e.apply(this,l),h=r.apply(this,l);if(a||(a=o=lB()),t(a,+n.apply(this,(l[0]=u,l)),+i.apply(this,l),+n.apply(this,(l[0]=h,l)),+i.apply(this,l)),o)return a=null,o+""||null}return s.source=function(o){return arguments.length?(e=o,s):e},s.target=function(o){return arguments.length?(r=o,s):r},s.x=function(o){return arguments.length?(n=typeof o=="function"?o:cB(+o),s):n},s.y=function(o){return arguments.length?(i=typeof o=="function"?o:cB(+o),s):i},s.context=function(o){return arguments.length?(a=o??null,s):a},s}function Ije(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function uB(){return Rje(Ije)}var U1e=F(()=>{P1e();V1e();B1e();z1e()});var q1e=F(()=>{U1e()});function Nje(t){return[t.source.x1,t.y0]}function Dje(t){return[t.target.x0,t.y1]}function hB(){return uB().source(Nje).target(Dje)}var W1e=F(()=>{q1e()});var H1e=F(()=>{D1e();nB();W1e()});var X1e={};hr(X1e,{diagram:()=>Kje});var fB,RS,NS,DS,IS,Mje,Oje,Pje,Bje,Fje,$je,zje,Gje,Vje,Y1e,Uje,qje,Wje,Hje,Yje,Xje,jje,Kje,j1e=F(()=>{vr();rr();cr();H1e();fB=function(){var t=x(function(o,l,u,h){for(u=u||{},h=o.length;h--;u[o[h]]=l);return u},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],i={trace:x(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:x(function(l,u,h,f,d,p,g){var m=p.length-1;switch(d){case 7:let v=f.findOrCreateNode(p[m-4].trim().replaceAll('""','"')),y=f.findOrCreateNode(p[m-2].trim().replaceAll('""','"')),b=parseFloat(p[m].trim());f.addLink(v,y,b);break;case 8:case 9:case 11:this.$=p[m];break;case 10:this.$=p[m-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:x(function(l,u){if(u.recoverable)this.trace(l);else{var h=new Error(l);throw h.hash=u,h}},"parseError"),parse:x(function(l){var u=this,h=[0],f=[],d=[null],p=[],g=this.table,m="",v=0,y=0,b=0,w=2,S=1,T=p.slice.call(arguments,1),E=Object.create(this.lexer),A={yy:{}};for(var C in this.yy)Object.prototype.hasOwnProperty.call(this.yy,C)&&(A.yy[C]=this.yy[C]);E.setInput(l,A.yy),A.yy.lexer=E,A.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var I=E.yylloc;p.push(I);var M=E.options&&E.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(Y){h.length=h.length-2*Y,d.length=d.length-Y,p.length=p.length-Y}x(R,"popStack");function k(){var Y;return Y=f.pop()||E.lex()||S,typeof Y!="number"&&(Y instanceof Array&&(f=Y,Y=f.pop()),Y=u.symbols_[Y]||Y),Y}x(k,"lex");for(var L,_,D,N,O,P,B={},G,$,U,X;;){if(D=h[h.length-1],this.defaultActions[D]?N=this.defaultActions[D]:((L===null||typeof L>"u")&&(L=k()),N=g[D]&&g[D][L]),typeof N>"u"||!N.length||!N[0]){var ee="";X=[];for(G in g[D])this.terminals_[G]&&G>w&&X.push("'"+this.terminals_[G]+"'");E.showPosition?ee="Parse error on line "+(v+1)+`: `+E.showPosition()+` Expecting `+X.join(", ")+", got '"+(this.terminals_[L]||L)+"'":ee="Parse error on line "+(v+1)+": Unexpected "+(L==S?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(ee,{text:E.match,token:this.terminals_[L]||L,line:E.yylineno,loc:I,expected:X})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+L);switch(N[0]){case 1:h.push(L),d.push(E.yytext),p.push(E.yylloc),h.push(N[1]),L=null,_?(L=_,_=null):(y=E.yyleng,m=E.yytext,v=E.yylineno,I=E.yylloc,b>0&&b--);break;case 2:if($=this.productions_[N[1]][1],B.$=d[d.length-$],B._$={first_line:p[p.length-($||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-($||1)].first_column,last_column:p[p.length-1].last_column},M&&(B._$.range=[p[p.length-($||1)].range[0],p[p.length-1].range[1]]),P=this.performAction.apply(B,[m,y,v,A.yy,N[1],d,p].concat(T)),typeof P<"u")return P;$&&(h=h.slice(0,-1*$*2),d=d.slice(0,-1*$),p=p.slice(0,-1*$)),h.push(this.productions_[N[1]][0]),d.push(B.$),p.push(B._$),U=g[h[h.length-2]][h[h.length-1]],h.push(U);break;case 3:return!0}}return!0},"parse")},a=function(){var o={EOF:1,parseError:x(function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw new Error(u)},"parseError"),setInput:x(function(l,u){return this.yy=u||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:x(function(l){var u=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===f.length?this.yylloc.first_column:0)+f[f.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(l){this.unput(this.match.slice(l))},"less"),pastInput:x(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+` `+u+"^"},"showPosition"),test_match:x(function(l,u){var h,f,d;if(this.options.backtrack_lexer&&(d={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&&(d.yylloc.range=this.yylloc.range.slice(0))),f=l[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var p in d)this[p]=d[p];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,h,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),p=0;pu[0].length)){if(u=h,f=p,this.options.backtrack_lexer){if(l=this.test_match(h,d[p]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,d[f]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var u=this.next();return u||this.lex()},"lex"),begin:x(function(u){this.conditionStack.push(u)},"begin"),popState:x(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:x(function(u){this.begin(u)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(u,h,f,d){var p=d;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return o}();i.lexer=a;function s(){this.yy={}}return x(s,"Parser"),s.prototype=i,i.Parser=s,new s}();fB.parser=fB;RS=fB,NS=[],DS=[],IS=new Map,Mje=x(()=>{NS=[],DS=[],IS=new Map,mr()},"clear"),Oje=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{x(this,"SankeyLink")}},Pje=x((t,e,r)=>{NS.push(new Oje(t,e,r))},"addLink"),Bje=class{constructor(t){this.ID=t}static{x(this,"SankeyNode")}},Fje=x(t=>{t=Je.sanitizeText(t,we());let e=IS.get(t);return e===void 0&&(e=new Bje(t),IS.set(t,e),DS.push(e)),e},"findOrCreateNode"),$je=x(()=>DS,"getNodes"),zje=x(()=>NS,"getLinks"),Gje=x(()=>({nodes:DS.map(t=>({id:t.ID})),links:NS.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Vje={nodesMap:IS,getConfig:x(()=>we().sankey,"getConfig"),getNodes:$je,getLinks:zje,getGraph:Gje,addLink:Pje,findOrCreateNode:Fje,getAccTitle:Cr,setAccTitle:Er,getAccDescription:_r,setAccDescription:Ar,getDiagramTitle:Lr,setDiagramTitle:Dr,clear:Mje},Y1e=class dB{static{x(this,"Uid")}static{this.count=0}static next(e){return new dB(e+ ++dB.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},Uje={left:eB,right:tB,center:rB,justify:Wb},qje=x(function(t,e,r,n){let{securityLevel:i,sankey:a}=we(),s=j4.sankey,o;i==="sandbox"&&(o=He("#i"+e));let l=i==="sandbox"?He(o.nodes()[0].contentDocument.body):He("body"),u=i==="sandbox"?l.select(`[id="${e}"]`):He(`[id="${e}"]`),h=a?.width??s.width,f=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,m=a?.suffix??s.suffix,v=a?.showValues??s.showValues,y=n.db.getGraph(),b=Uje[p];LS().nodeId(M=>M.id).nodeWidth(10).nodePadding(10+(v?15:0)).nodeAlign(b).extent([[0,0],[h,f]])(y);let T=Ys(e8);u.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",M=>(M.uid=Y1e.next("node-")).id).attr("transform",function(M){return"translate("+M.x0+","+M.y0+")"}).attr("x",M=>M.x0).attr("y",M=>M.y0).append("rect").attr("height",M=>M.y1-M.y0).attr("width",M=>M.x1-M.x0).attr("fill",M=>T(M.id));let E=x(({id:M,value:R})=>v?`${M} ${g}${Math.round(R*100)/100}${m}`:M,"getText");u.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",M=>M.x0(M.y1+M.y0)/2).attr("dy",`${v?"0":"0.35"}em`).attr("text-anchor",M=>M.x0(R.uid=Y1e.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",R=>R.source.x1).attr("x2",R=>R.target.x0);M.append("stop").attr("offset","0%").attr("stop-color",R=>T(R.source.id)),M.append("stop").attr("offset","100%").attr("stop-color",R=>T(R.target.id))}let I;switch(C){case"gradient":I=x(M=>M.uid,"coloring");break;case"source":I=x(M=>T(M.source.id),"coloring");break;case"target":I=x(M=>T(M.target.id),"coloring");break;default:I=C}A.append("path").attr("d",hB()).attr("stroke",I).attr("stroke-width",M=>Math.max(1,M.width)),cu(void 0,u,0,d)},"draw"),Wje={draw:qje},Hje=x(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` `).trim(),"prepareTextForParsing"),Yje=x(t=>`.label { font-family: ${t.fontFamily}; }`,"getStyles"),Xje=Yje,jje=RS.parse.bind(RS);RS.parse=t=>jje(Hje(t));Kje={styles:Xje,parser:RS,db:Vje,renderer:Wje}});var Q1e={};hr(Q1e,{diagram:()=>sKe});var Zje,K1e,Qje,Jje,eKe,Z1e,tKe,rKe,nKe,iKe,aKe,sKe,J1e=F(()=>{ac();f0();hn();vr();rr();Of();Zje=sr.packet,K1e=class{constructor(){this.packet=[],this.setAccTitle=Er,this.getAccTitle=Cr,this.setDiagramTitle=Dr,this.getDiagramTitle=Lr,this.getAccDescription=_r,this.setAccDescription=Ar}static{x(this,"PacketDB")}getConfig(){let t=Qn({...Zje,...or().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){mr(),this.packet=[]}},Qje=1e4,Jje=x((t,e)=>{io(t,e);let r=-1,n=[],i=1,{bitsPerRow:a}=e.getConfig();for(let{start:s,end:o,bits:l,label:u}of t.blocks){if(s!==void 0&&o!==void 0&&o{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];let n=e*r-1,i=e*r;return[{start:t.start,end:n,label:t.label,bits:n-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),Z1e={parser:{yy:void 0},parse:x(async t=>{let e=await ds("packet",t),r=Z1e.parser?.yy;if(!(r instanceof K1e))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");J.debug(e),Jje(e,r)},"parse")},tKe=x((t,e,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:s,paddingY:o,bitWidth:l,bitsPerRow:u}=a,h=i.getPacket(),f=i.getDiagramTitle(),d=s+o,p=d*(h.length+1)-(f?0:s),g=l*u+2,m=Bi(e);m.attr("viewbox",`0 0 ${g} ${p}`),un(m,p,g,a.useMaxWidth);for(let[v,y]of h.entries())rKe(m,y,v,a);m.append("text").text(f).attr("x",g/2).attr("y",p-d/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),rKe=x((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{let u=t.append("g"),h=r*(n+a)+a;for(let f of e){let d=f.start%o*s+1,p=(f.end-f.start+1)*s-i;if(u.append("rect").attr("x",d).attr("y",h).attr("width",p).attr("height",n).attr("class","packetBlock"),u.append("text").attr("x",d+p/2).attr("y",h+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!l)continue;let g=f.end===f.start,m=h-2;u.append("text").attr("x",d+(g?p/2:0)).attr("y",m).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(f.start),g||u.append("text").attr("x",d+p).attr("y",m).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),nKe={draw:tKe},iKe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},aKe=x(({packet:t}={})=>{let e=Qn(iKe,t);return` .packetByte { font-size: ${e.byteFontSize}; } .packetByte.start { fill: ${e.startByteColor}; } .packetByte.end { fill: ${e.endByteColor}; } .packetLabel { fill: ${e.labelColor}; font-size: ${e.labelFontSize}; } .packetTitle { fill: ${e.titleColor}; font-size: ${e.titleFontSize}; } .packetBlock { stroke: ${e.blockStrokeColor}; stroke-width: ${e.blockStrokeWidth}; fill: ${e.blockFillColor}; } `},"styles"),sKe={parser:Z1e,get db(){return new K1e},renderer:nKe,styles:aKe}});var sve={};hr(sve,{diagram:()=>CKe});function rve(t,e,r,n,i,a,s){let o=e.length,l=Math.min(s.width,s.height)/2;r.forEach((u,h)=>{if(u.entries.length!==o)return;let f=u.entries.map((d,p)=>{let g=2*Math.PI*p/o-Math.PI/2,m=nve(d,n,i,l),v=m*Math.cos(g),y=m*Math.sin(g);return{x:v,y}});a==="circle"?t.append("path").attr("d",ive(f,s.curveTension)).attr("class",`radarCurve-${h}`):a==="polygon"&&t.append("polygon").attr("points",f.map(d=>`${d.x},${d.y}`).join(" ")).attr("class",`radarCurve-${h}`)})}function nve(t,e,r,n){let i=Math.min(Math.max(t,e),r);return n*(i-e)/(r-e)}function ive(t,e){let r=t.length,n=`M${t[0].x},${t[0].y}`;for(let i=0;i{let u=t.append("g").attr("transform",`translate(${i}, ${a+l*s})`);u.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${l}`),u.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}var U1,eve,K0,oKe,lKe,tve,cKe,uKe,hKe,fKe,dKe,pKe,gKe,Hb,mKe,vKe,yKe,xKe,bKe,wKe,TKe,kKe,EKe,SKe,CKe,ove=F(()=>{ac();f0();hn();vr();rr();Of();U1={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},eve={axes:[],curves:[],options:U1},K0=structuredClone(eve),oKe=sr.radar,lKe=x(()=>Qn({...oKe,...or().radar}),"getConfig"),tve=x(()=>K0.axes,"getAxes"),cKe=x(()=>K0.curves,"getCurves"),uKe=x(()=>K0.options,"getOptions"),hKe=x(t=>{K0.axes=t.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),fKe=x(t=>{K0.curves=t.map(e=>({name:e.name,label:e.label??e.name,entries:dKe(e.entries)}))},"setCurves"),dKe=x(t=>{if(t[0].axis==null)return t.map(r=>r.value);let e=tve();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(r=>{let n=t.find(i=>i.axis?.$refText===r.name);if(n===void 0)throw new Error("Missing entry for axis "+r.label);return n.value})},"computeCurveEntries"),pKe=x(t=>{let e=t.reduce((r,n)=>(r[n.name]=n,r),{});K0.options={showLegend:e.showLegend?.value??U1.showLegend,ticks:e.ticks?.value??U1.ticks,max:e.max?.value??U1.max,min:e.min?.value??U1.min,graticule:e.graticule?.value??U1.graticule}},"setOptions"),gKe=x(()=>{mr(),K0=structuredClone(eve)},"clear"),Hb={getAxes:tve,getCurves:cKe,getOptions:uKe,setAxes:hKe,setCurves:fKe,setOptions:pKe,getConfig:lKe,clear:gKe,setAccTitle:Er,getAccTitle:Cr,setDiagramTitle:Dr,getDiagramTitle:Lr,getAccDescription:_r,setAccDescription:Ar},mKe=x(t=>{io(t,Hb);let{axes:e,curves:r,options:n}=t;Hb.setAxes(e),Hb.setCurves(r),Hb.setOptions(n)},"populate"),vKe={parse:x(async t=>{let e=await ds("radar",t);J.debug(e),mKe(e)},"parse")},yKe=x((t,e,r,n)=>{let i=n.db,a=i.getAxes(),s=i.getCurves(),o=i.getOptions(),l=i.getConfig(),u=i.getDiagramTitle(),h=Bi(e),f=xKe(h,l),d=o.max??Math.max(...s.map(m=>Math.max(...m.entries))),p=o.min,g=Math.min(l.width,l.height)/2;bKe(f,a,g,o.ticks,o.graticule),wKe(f,a,g,l),rve(f,a,s,p,d,o.graticule,l),ave(f,s,o.showLegend,l),f.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-l.height/2-l.marginTop)},"draw"),xKe=x((t,e)=>{let r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,i={x:e.marginLeft+e.width/2,y: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.x}, ${i.y})`)},"drawFrame"),bKe=x((t,e,r,n,i)=>{if(i==="circle")for(let a=0;a{let f=2*h*Math.PI/a-Math.PI/2,d=o*Math.cos(f),p=o*Math.sin(f);return`${d},${p}`}).join(" ");t.append("polygon").attr("points",l).attr("class","radarGraticule")}}},"drawGraticule"),wKe=x((t,e,r,n)=>{let i=e.length;for(let a=0;a{let r="";for(let n=0;n{let e=ed(),r=or(),n=Qn(e,r.themeVariables),i=Qn(n.radar,t);return{themeVariables:n,radarOptions:i}},"buildRadarStyleOptions"),SKe=x(({radar:t}={})=>{let{themeVariables:e,radarOptions:r}=EKe(t);return` .radarTitle { font-size: ${e.fontSize}; color: ${e.titleColor}; dominant-baseline: hanging; text-anchor: middle; } .radarAxisLine { stroke: ${r.axisColor}; stroke-width: ${r.axisStrokeWidth}; } .radarAxisLabel { dominant-baseline: middle; text-anchor: middle; font-size: ${r.axisLabelFontSize}px; color: ${r.axisColor}; } .radarGraticule { fill: ${r.graticuleColor}; fill-opacity: ${r.graticuleOpacity}; stroke: ${r.graticuleColor}; stroke-width: ${r.graticuleStrokeWidth}; } .radarLegendText { text-anchor: start; font-size: ${r.legendFontSize}px; dominant-baseline: hanging; } ${kKe(e,r)} `},"styles"),CKe={parser:vKe,db:Hb,renderer:TKe,styles:SKe}});var Bve={};hr(Bve,{diagram:()=>ZZe});function xve(t){switch(J.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return J.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 bve(t){switch(J.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}function wve(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function Tve(t,e){if(t===0||!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);if(t<0)return{px:e,py:0};if(t===1)return{px:0,py:e};let r=e%t,n=Math.floor(e/t);return{px:r,py:n}}function BS(t,e,r=0,n=0){J.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(let p of t.children)BS(p,e);let s=oZe(t);i=s.width,a=s.height,J.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(let p of t.children)p.size&&(J.debug(`abc95 Setting size of children of ${t.id} id=${p.id} ${i} ${a} ${JSON.stringify(p.size)}`),p.size.width=i*(p.widthInColumns??1)+di*((p.widthInColumns??1)-1),p.size.height=a,p.size.x=0,p.size.y=0,J.debug(`abc95 updating size of ${t.id} children child:${p.id} maxWidth:${i} maxHeight:${a}`));for(let p of t.children)BS(p,e,i,a);let o=t.columns??-1,l=0;for(let p of t.children)l+=p.widthInColumns??1;let u=t.children.length;o>0&&o0?Math.min(t.children.length,o):t.children.length;if(p>0){let g=(f-p*di-di)/p;J.debug("abc95 (growing to fit) width",t.id,f,t.size?.width,g);for(let m of t.children)m.size&&(m.size.width=g)}}t.size={width:f,height:d,x:0,y:0}}J.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function wB(t,e){J.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(J.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){let n=t?.children[0]?.size?.width??0,i=t.children.length*n+(t.children.length-1)*di;J.debug("widthOfChildren 88",i,"posX");let a=0;J.debug("abc91 block?.size?.x",t.id,t?.size?.x);let s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-di,o=0;for(let l of t.children){let u=t;if(!l.size)continue;let{width:h,height:f}=l.size,{px:d,py:p}=Tve(r,a);if(p!=o&&(o=p,s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-di,J.debug("New row in layout for block",t.id," and child ",l.id,o)),J.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${a} (px, py) ${d},${p} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${h}${di}`),u.size){let m=h/2;l.size.x=s+di+m,J.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${s} new startingPosX${l.size.x} ${m} padding=${di} width=${h} halfWidth=${m} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${h*(l?.widthInColumns??1)/2}`),s=l.size.x+m,l.size.y=u.size.y-u.size.height/2+p*(f+di)+f/2+di,J.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${s}${di}${m}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${h*(l?.widthInColumns??1)/2}`)}l.children&&wB(l,e);let g=l?.widthInColumns??1;r>0&&(g=Math.min(g,r-a%r)),a+=g,J.debug("abc88 columnsPos",l,a)}}J.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function TB(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:a,y:s,width:o,height:l}=t.size;a-o/2n&&(n=a+o/2),s+l/2>i&&(i=s+l/2)}if(t.children)for(let a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=TB(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function kve(t){let e=t.getBlock("root");if(!e)return;BS(e,t,0,0),wB(e,t),J.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:n,maxX:i,maxY:a}=TB(e),s=a-n,o=i-r;return{x:r,y:n,width:o,height:s}}function mB(t,e){e&&t.attr("style",e)}function Eve(t,e){let r=He(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=r.append("xhtml:div"),i=t.label,a=t.isNode?"nodeLabel":"edgeLabel",s=n.append("span");return s.html(ar(i,e)),mB(s,t.labelStyle),s.attr("class",a),mB(n,t.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}function Yb(t,e){we().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function Sve(t,e){return t.intersect(e)}function Cve(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x0}function Rve(t,e,r){var n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(g){s=Math.min(s,g.x),o=Math.min(o,g.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=n-t.width/2-s,u=i-t.height/2-o,h=0;h1&&a.sort(function(g,m){var v=g.x-r.x,y=g.y-r.y,b=Math.sqrt(v*v+y*y),w=m.x-r.x,S=m.y-r.y,T=Math.sqrt(w*w+S*S);return b{i.push(o,0)},"addBorder"),s=x(o=>{i.push(0,o)},"skipBorder");e.includes("t")?(J.debug("add top border"),a(r)):s(r),e.includes("r")?(J.debug("add right border"),a(n)):s(n),e.includes("b")?(J.debug("add bottom border"),a(r)):s(r),e.includes("l")?(J.debug("add left border"),a(n)):s(n),t.attr("stroke-dasharray",i.join(" "))}function kB(t,e,r=!1){let n=t,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let a=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"}let l=G5(n?.styles??[]),u=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:a,ry:a,class:i,style:l.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:o??or()?.block?.padding??0}}async function Nve(t,e,r){let n=kB(e,r,!1);if(n.type==="group")return;let i=or(),a=await Ive(t,n,{config:i}),s=a.node().getBBox(),o=r.getBlock(n.id);o.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(o),a.remove()}async function Dve(t,e,r){let n=kB(e,r,!0);if(r.getBlock(n.id).type!=="space"){let a=or();await Ive(t,n,{config:a}),e.intersect=n?.intersect,YZe(n)}}async function $S(t,e,r,n){for(let i of e)await n(t,i,r),i.children&&await $S(t,i.children,r,n)}async function Mve(t,e,r){await $S(t,e,r,Nve)}async function Ove(t,e,r){await $S(t,e,r,Dve)}async function Pve(t,e,r,n,i){let a=new rn({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of e)if(s.start&&s.end){let o=n.getBlock(s.start),l=n.getBlock(s.end);if(o?.size&&l?.size){let u=o.size,h=l.size,f=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}];gZe(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await hZe(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),fZe({...s,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var pB,AKe,Pl,xB,gB,lve,cve,_Ke,vve,LKe,PS,RKe,IKe,NKe,DKe,yve,bB,Xb,MKe,uve,OKe,PKe,BKe,FKe,$Ke,zKe,GKe,VKe,UKe,qKe,WKe,HKe,MS,YKe,XKe,jKe,KKe,ZKe,QKe,JKe,eZe,tZe,rZe,nZe,iZe,aZe,sZe,di,oZe,lZe,rl,cZe,uZe,hve,vB,Pa,hZe,fZe,dZe,pZe,fve,gZe,mZe,vZe,yZe,Ave,xZe,bZe,wZe,TZe,kZe,Yn,Hi,si,EZe,SZe,dve,fo,pve,CZe,AZe,_Ze,LZe,RZe,IZe,NZe,DZe,MZe,OZe,PZe,BZe,FZe,$Ze,zZe,GZe,VZe,UZe,qZe,gve,WZe,HZe,mve,OS,Ive,YZe,XZe,jZe,KZe,ZZe,Fve=F(()=>{Sf();Ks();ja();na();hn();vr();rr();_9();qs();cr();Mo();cr();cr();cr();cr();pB=function(){var t=x(function(w,S,T,E){for(T=T||{},E=w.length;E--;T[w[E]]=S);return T},"o"),e=[1,15],r=[1,7],n=[1,13],i=[1,14],a=[1,19],s=[1,16],o=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],f=[1,23],d=[1,24],p=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],v={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:x(function(S,T,E,A,C,I,M){var R=I.length-1;switch(C){case 4:A.getLogger().debug("Rule: separator (NL) ");break;case 5:A.getLogger().debug("Rule: separator (Space) ");break;case 6:A.getLogger().debug("Rule: separator (EOF) ");break;case 7:A.getLogger().debug("Rule: hierarchy: ",I[R-1]),A.setHierarchy(I[R-1]);break;case 8:A.getLogger().debug("Stop NL ");break;case 9:A.getLogger().debug("Stop EOF ");break;case 10:A.getLogger().debug("Stop NL2 ");break;case 11:A.getLogger().debug("Stop EOF2 ");break;case 12:A.getLogger().debug("Rule: statement: ",I[R]),typeof I[R].length=="number"?this.$=I[R]:this.$=[I[R]];break;case 13:A.getLogger().debug("Rule: statement #2: ",I[R-1]),this.$=[I[R-1]].concat(I[R]);break;case 14:A.getLogger().debug("Rule: link: ",I[R],S),this.$={edgeTypeStr:I[R],label:""};break;case 15:A.getLogger().debug("Rule: LABEL link: ",I[R-3],I[R-1],I[R]),this.$={edgeTypeStr:I[R],label:I[R-1]};break;case 18:let k=parseInt(I[R]),L=A.generateId();this.$={id:L,type:"space",label:"",width:k,children:[]};break;case 23:A.getLogger().debug("Rule: (nodeStatement link node) ",I[R-2],I[R-1],I[R]," typestr: ",I[R-1].edgeTypeStr);let _=A.edgeStrToEdgeData(I[R-1].edgeTypeStr);this.$=[{id:I[R-2].id,label:I[R-2].label,type:I[R-2].type,directions:I[R-2].directions},{id:I[R-2].id+"-"+I[R].id,start:I[R-2].id,end:I[R].id,label:I[R-1].label,type:"edge",directions:I[R].directions,arrowTypeEnd:_,arrowTypeStart:"arrow_open"},{id:I[R].id,label:I[R].label,type:A.typeStr2Type(I[R].typeStr),directions:I[R].directions}];break;case 24:A.getLogger().debug("Rule: nodeStatement (abc88 node size) ",I[R-1],I[R]),this.$={id:I[R-1].id,label:I[R-1].label,type:A.typeStr2Type(I[R-1].typeStr),directions:I[R-1].directions,widthInColumns:parseInt(I[R],10)};break;case 25:A.getLogger().debug("Rule: nodeStatement (node) ",I[R]),this.$={id:I[R].id,label:I[R].label,type:A.typeStr2Type(I[R].typeStr),directions:I[R].directions,widthInColumns:1};break;case 26:A.getLogger().debug("APA123",this?this:"na"),A.getLogger().debug("COLUMNS: ",I[R]),this.$={type:"column-setting",columns:I[R]==="auto"?-1:parseInt(I[R])};break;case 27:A.getLogger().debug("Rule: id-block statement : ",I[R-2],I[R-1]);let D=A.generateId();this.$={...I[R-2],type:"composite",children:I[R-1]};break;case 28:A.getLogger().debug("Rule: blockStatement : ",I[R-2],I[R-1],I[R]);let N=A.generateId();this.$={id:N,type:"composite",label:"",children:I[R-1]};break;case 29:A.getLogger().debug("Rule: node (NODE_ID separator): ",I[R]),this.$={id:I[R]};break;case 30:A.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",I[R-1],I[R]),this.$={id:I[R-1],label:I[R].label,typeStr:I[R].typeStr,directions:I[R].directions};break;case 31:A.getLogger().debug("Rule: dirList: ",I[R]),this.$=[I[R]];break;case 32:A.getLogger().debug("Rule: dirList: ",I[R-1],I[R]),this.$=[I[R-1]].concat(I[R]);break;case 33:A.getLogger().debug("Rule: nodeShapeNLabel: ",I[R-2],I[R-1],I[R]),this.$={typeStr:I[R-2]+I[R],label:I[R-1]};break;case 34:A.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",I[R-3],I[R-2]," #3:",I[R-1],I[R]),this.$={typeStr:I[R-3]+I[R],label:I[R-2],directions:I[R-1]};break;case 35:case 36:this.$={type:"classDef",id:I[R-1].trim(),css:I[R].trim()};break;case 37:this.$={type:"applyClass",id:I[R-1].trim(),styleClass:I[R].trim()};break;case 38:this.$={type:"applyStyles",id:I[R-1].trim(),stylesStr:I[R].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,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,39:s,43:o,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:n,29:i,31:a,39:s,43:o,46:l}),t(h,[2,16],{14:22,15:f,16:d}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(p,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:a},{10:e,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,39:s,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},t(p,[2,24]),{10:e,11:37,13:4,14:22,15:f,16:d,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(p,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},t(h,[2,27]),t(g,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},t(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:x(function(S,T){if(T.recoverable)this.trace(S);else{var E=new Error(S);throw E.hash=T,E}},"parseError"),parse:x(function(S){var T=this,E=[0],A=[],C=[null],I=[],M=this.table,R="",k=0,L=0,_=0,D=2,N=1,O=I.slice.call(arguments,1),P=Object.create(this.lexer),B={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(B.yy[G]=this.yy[G]);P.setInput(S,B.yy),B.yy.lexer=P,B.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var $=P.yylloc;I.push($);var U=P.options&&P.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(be){E.length=E.length-2*be,C.length=C.length-be,I.length=I.length-be}x(X,"popStack");function ee(){var be;return be=A.pop()||P.lex()||N,typeof be!="number"&&(be instanceof Array&&(A=be,be=A.pop()),be=T.symbols_[be]||be),be}x(ee,"lex");for(var Y,oe,Q,ue,re,te,Z={},j,ae,K,de;;){if(Q=E[E.length-1],this.defaultActions[Q]?ue=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=ee()),ue=M[Q]&&M[Q][Y]),typeof ue>"u"||!ue.length||!ue[0]){var ne="";de=[];for(j in M[Q])this.terminals_[j]&&j>D&&de.push("'"+this.terminals_[j]+"'");P.showPosition?ne="Parse error on line "+(k+1)+`: `+P.showPosition()+` Expecting `+de.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ne="Parse error on line "+(k+1)+": Unexpected "+(Y==N?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(ne,{text:P.match,token:this.terminals_[Y]||Y,line:P.yylineno,loc:$,expected:de})}if(ue[0]instanceof Array&&ue.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+Y);switch(ue[0]){case 1:E.push(Y),C.push(P.yytext),I.push(P.yylloc),E.push(ue[1]),Y=null,oe?(Y=oe,oe=null):(L=P.yyleng,R=P.yytext,k=P.yylineno,$=P.yylloc,_>0&&_--);break;case 2:if(ae=this.productions_[ue[1]][1],Z.$=C[C.length-ae],Z._$={first_line:I[I.length-(ae||1)].first_line,last_line:I[I.length-1].last_line,first_column:I[I.length-(ae||1)].first_column,last_column:I[I.length-1].last_column},U&&(Z._$.range=[I[I.length-(ae||1)].range[0],I[I.length-1].range[1]]),te=this.performAction.apply(Z,[R,L,k,B.yy,ue[1],C,I].concat(O)),typeof te<"u")return te;ae&&(E=E.slice(0,-1*ae*2),C=C.slice(0,-1*ae),I=I.slice(0,-1*ae)),E.push(this.productions_[ue[1]][0]),C.push(Z.$),I.push(Z._$),K=M[E[E.length-2]][E[E.length-1]],E.push(K);break;case 3:return!0}}return!0},"parse")},y=function(){var w={EOF:1,parseError:x(function(T,E){if(this.yy.parser)this.yy.parser.parseError(T,E);else throw new Error(T)},"parseError"),setInput:x(function(S,T){return this.yy=T||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var T=S.match(/(?:\r\n?|\n).*/g);return T?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},"input"),unput:x(function(S){var T=S.length,E=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var A=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===A.length?this.yylloc.first_column:0)+A[A.length-E.length].length-E[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-T]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(S){this.unput(this.match.slice(S))},"less"),pastInput:x(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var S=this.pastInput(),T=new Array(S.length+1).join("-");return S+this.upcomingInput()+` `+T+"^"},"showPosition"),test_match:x(function(S,T){var E,A,C;if(this.options.backtrack_lexer&&(C={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&&(C.yylloc.range=this.yylloc.range.slice(0))),A=S[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,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(S[0].length),this.matched+=S[0],E=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var I in C)this[I]=C[I];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,T,E,A;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),I=0;IT[0].length)){if(T=E,A=I,this.options.backtrack_lexer){if(S=this.test_match(E,C[I]),S!==!1)return S;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(S=this.test_match(T,C[A]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var T=this.next();return T||this.lex()},"lex"),begin:x(function(T){this.conditionStack.push(T)},"begin"),popState:x(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:x(function(T){this.begin(T)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(T,E,A,C){var I=C;switch(A){case 0:return T.getLogger().debug("Found block-beta"),10;break;case 1:return T.getLogger().debug("Found id-block"),29;break;case 2:return T.getLogger().debug("Found block"),10;break;case 3:T.getLogger().debug(".",E.yytext);break;case 4:T.getLogger().debug("_",E.yytext);break;case 5:return 5;case 6:return E.yytext=-1,28;break;case 7:return E.yytext=E.yytext.replace(/columns\s+/,""),T.getLogger().debug("COLUMNS (LEX)",E.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:T.getLogger().debug("LEX: POPPING STR:",E.yytext),this.popState();break;case 13:return T.getLogger().debug("LEX: STR end:",E.yytext),"STR";break;case 14:return E.yytext=E.yytext.replace(/space\:/,""),T.getLogger().debug("SPACE NUM (LEX)",E.yytext),21;break;case 15:return E.yytext="1",T.getLogger().debug("COLUMNS (LEX)",E.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),T.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),T.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),T.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),T.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),T.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),T.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),T.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),T.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),T.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),T.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),T.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),T.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return T.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return T.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return T.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return T.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return T.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return T.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return T.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),T.getLogger().debug("LEX ARR START"),37;break;case 74:return T.getLogger().debug("Lex: NODE_ID",E.yytext),31;break;case 75:return T.getLogger().debug("Lex: EOF",E.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:T.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:T.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return T.getLogger().debug("LEX: NODE_DESCR:",E.yytext),"NODE_DESCR";break;case 83:T.getLogger().debug("LEX POPPING"),this.popState();break;case 84:T.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (right): dir:",E.yytext),"DIR";break;case 86:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (left):",E.yytext),"DIR";break;case 87:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (x):",E.yytext),"DIR";break;case 88:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (y):",E.yytext),"DIR";break;case 89:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (up):",E.yytext),"DIR";break;case 90:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (down):",E.yytext),"DIR";break;case 91:return E.yytext="]>",T.getLogger().debug("Lex (ARROW_DIR end):",E.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return T.getLogger().debug("Lex: LINK","#"+E.yytext+"#"),15;break;case 93:return T.getLogger().debug("Lex: LINK",E.yytext),15;break;case 94:return T.getLogger().debug("Lex: LINK",E.yytext),15;break;case 95:return T.getLogger().debug("Lex: LINK",E.yytext),15;break;case 96:return T.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 97:return T.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 98:return T.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return T.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),T.getLogger().debug("Lex: LINK","#"+E.yytext+"#"),15;break;case 102:return this.popState(),T.getLogger().debug("Lex: LINK",E.yytext),15;break;case 103:return this.popState(),T.getLogger().debug("Lex: LINK",E.yytext),15;break;case 104:return T.getLogger().debug("Lex: COLON",E.yytext),E.yytext=E.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return w}();v.lexer=y;function b(){this.yy={}}return x(b,"Parser"),b.prototype=v,v.Parser=b,new b}();pB.parser=pB;AKe=pB,Pl=new Map,xB=[],gB=new Map,lve="color",cve="fill",_Ke="bgFill",vve=",",LKe=we(),PS=new Map,RKe=x(t=>Je.sanitizeText(t,LKe),"sanitizeText"),IKe=x(function(t,e=""){let r=PS.get(t);r||(r={id:t,styles:[],textStyles:[]},PS.set(t,r)),e?.split(vve).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(lve).exec(n)){let s=i.replace(cve,_Ke).replace(lve,cve);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),NKe=x(function(t,e=""){let r=Pl.get(t);e!=null&&(r.styles=e.split(vve))},"addStyle2Node"),DKe=x(function(t,e){t.split(",").forEach(function(r){let n=Pl.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Pl.set(i,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),yve=x((t,e)=>{let r=t.flat(),n=[],a=r.find(s=>s?.type==="column-setting")?.columns??-1;for(let s of r){if(typeof a=="number"&&a>0&&s.type!=="column-setting"&&typeof s.widthInColumns=="number"&&s.widthInColumns>a&&J.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${a}`),s.label&&(s.label=RKe(s.label)),s.type==="classDef"){IKe(s.id,s.css);continue}if(s.type==="applyClass"){DKe(s.id,s?.styleClass??"");continue}if(s.type==="applyStyles"){s?.stylesStr&&NKe(s.id,s?.stylesStr);continue}if(s.type==="column-setting")e.columns=s.columns??-1;else if(s.type==="edge"){let o=(gB.get(s.id)??0)+1;gB.set(s.id,o),s.id=o+"-"+s.id,xB.push(s)}else{s.label||(s.type==="composite"?s.label="":s.label=s.id);let o=Pl.get(s.id);if(o===void 0?Pl.set(s.id,s):(s.type!=="na"&&(o.type=s.type),s.label!==s.id&&(o.label=s.label)),s.children&&yve(s.children,s),s.type==="space"){let l=s.width??1;for(let u=0;u{J.debug("Clear called"),mr(),Xb={id:"root",type:"composite",children:[],columns:-1},Pl=new Map([["root",Xb]]),bB=[],PS=new Map,xB=[],gB=new Map},"clear");x(xve,"typeStr2Type");x(bve,"edgeTypeStr2Type");x(wve,"edgeStrToEdgeData");uve=0,OKe=x(()=>(uve++,"id-"+Math.random().toString(36).substr(2,12)+"-"+uve),"generateId"),PKe=x(t=>{Xb.children=t,yve(t,Xb),bB=Xb.children},"setHierarchy"),BKe=x(t=>{let e=Pl.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),FKe=x(()=>[...Pl.values()],"getBlocksFlat"),$Ke=x(()=>bB||[],"getBlocks"),zKe=x(()=>xB,"getEdges"),GKe=x(t=>Pl.get(t),"getBlock"),VKe=x(t=>{Pl.set(t.id,t)},"setBlock"),UKe=x(()=>J,"getLogger"),qKe=x(function(){return PS},"getClasses"),WKe={getConfig:x(()=>or().block,"getConfig"),typeStr2Type:xve,edgeTypeStr2Type:bve,edgeStrToEdgeData:wve,getLogger:UKe,getBlocksFlat:FKe,getBlocks:$Ke,getEdges:zKe,setHierarchy:PKe,getBlock:GKe,setBlock:VKe,getColumns:BKe,getClasses:qKe,clear:MKe,generateId:OKe},HKe=WKe,MS=x((t,e)=>{let r=Xf,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return $a(n,i,a,e)},"fade"),YKe=x(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } .cluster-label text { fill: ${t.titleColor}; } .cluster-label span,p { color: ${t.titleColor}; } .label text,span,p { fill: ${t.nodeTextColor||t.textColor}; color: ${t.nodeTextColor||t.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: 1px; } .flowchart-label text { text-anchor: middle; } // .flowchart-label .text-outer-tspan { // text-anchor: middle; // } // .flowchart-label .text-inner-tspan { // text-anchor: start; // } .node .label { text-align: center; } .node.clickable { cursor: pointer; } .arrowheadPath { fill: ${t.arrowheadColor}; } .edgePath .path { stroke: ${t.lineColor}; stroke-width: 2.0px; } .flowchart-link { stroke: ${t.lineColor}; fill: none; } .edgeLabel { background-color: ${t.edgeLabelBackground}; rect { opacity: 0.5; background-color: ${t.edgeLabelBackground}; fill: ${t.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${MS(t.edgeLabelBackground,.5)}; // background-color: } .node .cluster { // fill: ${MS(t.mainBkg,.5)}; fill: ${MS(t.clusterBkg,.5)}; stroke: ${MS(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; } .cluster text { fill: ${t.titleColor}; } .cluster span,p { color: ${t.titleColor}; } /* .cluster div { color: ${t.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${t.fontFamily}; font-size: 12px; background: ${t.tertiaryColor}; border: 1px solid ${t.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } ${Mc()} `,"getStyles"),XKe=YKe,jKe=x((t,e,r,n)=>{e.forEach(i=>{aZe[i](t,r,n)})},"insertMarkers"),KKe=x((t,e,r)=>{J.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"),ZKe=x((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"),QKe=x((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"),JKe=x((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"),eZe=x((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"),tZe=x((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"),rZe=x((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"),nZe=x((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"),iZe=x((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"),aZe={extension:KKe,composition:ZKe,aggregation:QKe,dependency:JKe,lollipop:eZe,point:tZe,circle:rZe,cross:nZe,barb:iZe},sZe=jKe,di=we()?.block?.padding??8;x(Tve,"calculateBlockPosition");oZe=x(t=>{let e=0,r=0;for(let n of t.children){let{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};J.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),n.type!=="space"&&(i>e&&(e=i/(t.widthInColumns??1)),a>r&&(r=a))}return{width:e,height:r}},"getMaxChildSize");x(BS,"setBlockSizes");x(wB,"layoutBlocks");x(TB,"findBounds");x(kve,"layout");x(mB,"applyStyle");x(Eve,"addHtmlLabel");lZe=x(async(t,e,r,n)=>{let i=t||"";typeof i=="object"&&(i=i[0]);let a=we();if($r(a.flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),J.debug("vertexText"+i);let s=await nw(As(i)),o={isNode:n,label:s,labelStyle:e.replace("fill:","color:")};return Eve(o,a)}else{let s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));let o=[];typeof i=="string"?o=i.split(/\\n|\n|/gi):Array.isArray(i)?o=i:o=[];for(let l of o){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),s.appendChild(u)}return s}},"createLabel"),rl=lZe,cZe=x((t,e,r,n,i)=>{e.arrowTypeStart&&hve(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&hve(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),uZe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},hve=x((t,e,r,n,i,a)=>{let s=uZe[r];if(!s){J.warn(`Unknown arrow type: ${r}`);return}let o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${o})`)},"addEdgeMarker"),vB={},Pa={},hZe=x(async(t,e)=>{let r=we(),n=$r(r.flowchart.htmlLabels),i=e.labelType==="markdown"?ra(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):await rl(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();if(n){let u=i.children[0],h=He(i);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),vB[e.id]=a,e.width=o.width,e.height=o.height;let l;if(e.startLabelLeft){let u=await rl(e.startLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Pa[e.id]||(Pa[e.id]={}),Pa[e.id].startLeft=h,Yb(l,e.startLabelLeft)}if(e.startLabelRight){let u=await rl(e.startLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Pa[e.id]||(Pa[e.id]={}),Pa[e.id].startRight=h,Yb(l,e.startLabelRight)}if(e.endLabelLeft){let u=await rl(e.endLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),Pa[e.id]||(Pa[e.id]={}),Pa[e.id].endLeft=h,Yb(l,e.endLabelLeft)}if(e.endLabelRight){let u=await rl(e.endLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),Pa[e.id]||(Pa[e.id]={}),Pa[e.id].endRight=h,Yb(l,e.endLabelRight)}return i},"insertEdgeLabel");x(Yb,"setTerminalWidth");fZe=x((t,e)=>{J.debug("Moving label abc88 ",t.id,t.label,vB[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=we(),{subGraphTitleTotalMargin:i}=bu(n);if(t.label){let a=vB[t.id],s=t.x,o=t.y;if(r){let l=zt.calcLabelPosition(r);J.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){let a=Pa[t.id].startLeft,s=t.x,o=t.y;if(r){let l=zt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let a=Pa[t.id].startRight,s=t.x,o=t.y;if(r){let l=zt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let a=Pa[t.id].endLeft,s=t.x,o=t.y;if(r){let l=zt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let a=Pa[t.id].endRight,s=t.x,o=t.y;if(r){let l=zt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),dZe=x((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),pZe=x((t,e,r)=>{J.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,o=r.xMath.abs(n-e.x)*l){let f=r.y{J.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(!dZe(e,a)&&!i){let s=pZe(e,n,a),o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),gZe=x(function(t,e,r,n,i,a,s){let o=r.points;J.debug("abc88 InsertEdge: edge=",r,"e=",e);let l=!1,u=a.node(e.v);var h=a.node(e.w);h?.intersect&&u?.intersect&&(o=o.slice(1,r.points.length-1),o.unshift(u.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(J.debug("to cluster abc88",n[r.toCluster]),o=fve(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(J.debug("from cluster abc88",n[r.fromCluster]),o=fve(o.reverse(),n[r.fromCluster].node).reverse(),l=!0);let f=o.filter(S=>!Number.isNaN(S.y)),d=pl;r.curve&&(i==="graph"||i==="flowchart")&&(d=r.curve);let{x:p,y:g}=x5(r),m=ic().x(p).y(g).curve(d),v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}let y=t.append("path").attr("d",m(f)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style),b="";(we().flowchart.arrowMarkerAbsolute||we().state.arrowMarkerAbsolute)&&(b=lu(!0)),cZe(y,r,b,s,i);let w={};return l&&(w.updatedPath=o),w.originalPath=r.points,w},"insertEdge"),mZe=x(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r);break}return e},"expandAndDeduplicateDirections"),vZe=x((t,e,r)=>{let n=mZe(t),i=2,a=e.height+2*r.padding,s=a/i,o=e.width+2*s+r.padding,l=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:o/2,y:2*l},{x:o-s,y:0},{x:o,y:0},{x:o,y:-a/3},{x:o+2*l,y:-a/2},{x:o,y:-2*a/3},{x:o,y:-a},{x:o-s,y:-a},{x:o/2,y:-a-2*l},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*l,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:o-s,y:-a},{x:o,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:o,y:-s},{x:o,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:o,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:o,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-a+l},{x:0,y:-a+l},{x:o/2,y:-a},{x:o,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l},{x:o,y:-l}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:o,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:o,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:o,y:0},{x:0,y:-s},{x:o,y:-a}]:n.has("left")&&n.has("down")?[{x:o,y:0},{x:0,y:0},{x:o,y:-a}]:n.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a+l}]:n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-l},{x:s,y:-a+l},{x:0,y:-a+l},{x:o/2,y:-a},{x:o,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l}]:n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l},{x:o,y:-l}]:[{x:0,y:0}]},"getArrowPoints");x(Sve,"intersectNode");yZe=Sve;x(Cve,"intersectEllipse");Ave=Cve;x(_ve,"intersectCircle");xZe=_ve;x(Lve,"intersectLine");x(yB,"sameSign");bZe=Lve,wZe=Rve;x(Rve,"intersectPolygon");TZe=x((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),kZe=TZe,Yn={node:yZe,circle:xZe,ellipse:Ave,polygon:wZe,rect:kZe},Hi=x(async(t,e,r,n)=>{let i=we(),a,s=e.useHtmlLabels||$r(i.flowchart.htmlLabels);r?a=r:a="node default";let o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),u;e.labelText===void 0?u="":u=typeof e.labelText=="string"?e.labelText:e.labelText[0];let h=l.node(),f;e.labelType==="markdown"?f=ra(l,ar(As(u),i),{useHtmlLabels:s,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):f=h.appendChild(await rl(ar(As(u),i),e.labelStyle,!1,n));let d=f.getBBox(),p=e.padding/2;if($r(i.flowchart.htmlLabels)){let g=f.children[0],m=He(f),v=g.getElementsByTagName("img");if(v){let y=u.replace(/]*>/g,"").trim()==="";await Promise.all([...v].map(b=>new Promise(w=>{function S(){if(b.style.display="flex",b.style.flexDirection="column",y){let T=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,A=parseInt(T,10)*5+"px";b.style.minWidth=A,b.style.maxWidth=A}else b.style.width="100%";w(b)}x(S,"setupImage"),setTimeout(()=>{b.complete&&S()}),b.addEventListener("error",S),b.addEventListener("load",S)})))}d=g.getBoundingClientRect(),m.attr("width",d.width),m.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"),si=x((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");x(Bl,"insertPolygonShape");EZe=x(async(t,e)=>{e.useHtmlLabels||we().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:n,bbox:i,halfPadding:a}=await Hi(t,e,"node "+e.classes,!0);J.info("Classes = ",e.classes);let s=n.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),si(e,s),e.intersect=function(o){return Yn.rect(e,o)},n},"note"),SZe=EZe,dve=x(t=>t?" "+t:"","formatClass"),fo=x((t,e)=>`${e||"node default"}${dve(t.classes)} ${dve(t.class)}`,"getClassesFromNode"),pve=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(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}];J.info("Question main (Circle)");let l=Bl(r,s,s,o);return l.attr("style",e.style),si(e,l),e.intersect=function(u){return J.warn("Intersect called"),Yn.polygon(e,o,u)},r},"question"),CZe=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(s){return Yn.circle(e,14,s)},r},"choice"),AZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(e,void 0),!0),i=4,a=n.height+e.padding,s=a/i,o=n.width+2*s+e.padding,l=[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],u=Bl(r,o,a,l);return u.attr("style",e.style),si(e,u),e.intersect=function(h){return Yn.polygon(e,l,h)},r},"hexagon"),_Ze=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,void 0,!0),i=2,a=n.height+2*e.padding,s=a/i,o=n.width+2*s+e.padding,l=vZe(e.directions,n,e),u=Bl(r,o,a,l);return u.attr("style",e.style),si(e,u),e.intersect=function(h){return Yn.polygon(e,l,h)},r},"block_arrow"),LZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(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 Bl(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(l){return Yn.polygon(e,s,l)},r},"rect_left_inv_arrow"),RZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(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=Bl(r,i,a,s);return o.attr("style",e.style),si(e,o),e.intersect=function(l){return Yn.polygon(e,s,l)},r},"lean_right"),IZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(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=Bl(r,i,a,s);return o.attr("style",e.style),si(e,o),e.intersect=function(l){return Yn.polygon(e,s,l)},r},"lean_left"),NZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(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=Bl(r,i,a,s);return o.attr("style",e.style),si(e,o),e.intersect=function(l){return Yn.polygon(e,s,l)},r},"trapezoid"),DZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(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=Bl(r,i,a,s);return o.attr("style",e.style),si(e,o),e.intersect=function(l){return Yn.polygon(e,s,l)},r},"inv_trapezoid"),MZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(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=Bl(r,i,a,s);return o.attr("style",e.style),si(e,o),e.intersect=function(l){return Yn.polygon(e,s,l)},r},"rect_right_inv_arrow"),OZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(e,void 0),!0),i=n.width+e.padding,a=i/2,s=a/(2.5+i/50),o=n.height+s+e.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,u=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return si(e,u),e.intersect=function(h){let f=Yn.rect(e,h),d=f.x-e.x;if(a!=0&&(Math.abs(d)e.height/2-s)){let p=s*s*(1-d*d/(a*a));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-e.y>0&&(p=-p),f.y+=p}return f},r},"cylinder"),PZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Hi(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,u=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(FS(a,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{J.warn(`Unknown node property ${f}`)})}return si(e,a),e.intersect=function(h){return Yn.rect(e,h)},r},"rect"),BZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Hi(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,u=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(FS(a,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{J.warn(`Unknown node property ${f}`)})}return si(e,a),e.intersect=function(h){return Yn.rect(e,h)},r},"composite"),FZe=x(async(t,e)=>{let{shapeSvg:r}=await Hi(t,e,"label",!0);J.trace("Classes = ",e.class);let n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),e.props){let s=new Set(Object.keys(e.props));e.props.borders&&(FS(n,e.props.borders,i,a),s.delete("borders")),s.forEach(o=>{J.warn(`Unknown node property ${o}`)})}return si(e,n),e.intersect=function(s){return Yn.rect(e,s)},r},"labelRect");x(FS,"applyNodePropertyBorders");$Ze=x(async(t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";let n=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="";typeof o=="object"?l=o[0]:l=o,J.info("Label text abc79",l,o,typeof o=="object");let u=s.node().appendChild(await rl(l,e.labelStyle,!0,!0)),h={width:0,height:0};if($r(we().flowchart.htmlLabels)){let m=u.children[0],v=He(u);h=m.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}J.info("Text 2",o);let f=o.slice(1,o.length),d=u.getBBox(),p=s.node().appendChild(await rl(f.join?f.join("
    "):f,e.labelStyle,!0,!0));if($r(we().flowchart.htmlLabels)){let m=p.children[0],v=He(p);h=m.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}let g=e.padding/2;return He(p).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+g+5)+")"),He(u).attr("transform","translate( "+(h.width{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return si(e,s),e.intersect=function(o){return Yn.rect(e,o)},r},"stadium"),GZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Hi(t,e,fo(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),J.info("Circle main"),si(e,a),e.intersect=function(s){return J.info("Circle intersect",e,n.width/2+i,s),Yn.circle(e,n.width/2+i,s)},r},"circle"),VZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Hi(t,e,fo(e,void 0),!0),a=5,s=r.insert("g",":first-child"),o=s.insert("circle"),l=s.insert("circle");return s.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+a).attr("width",n.width+e.padding+a*2).attr("height",n.height+e.padding+a*2),l.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),J.info("DoubleCircle main"),si(e,o),e.intersect=function(u){return J.info("DoubleCircle intersect",e,n.width/2+i+a,u),Yn.circle(e,n.width/2+i+a,u)},r},"doublecircle"),UZe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Hi(t,e,fo(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=Bl(r,i,a,s);return o.attr("style",e.style),si(e,o),e.intersect=function(l){return Yn.polygon(e,s,l)},r},"subroutine"),qZe=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),si(e,n),e.intersect=function(i){return Yn.circle(e,7,i)},r},"start"),gve=x((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;r==="LR"&&(i=10,a=70);let s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return si(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return Yn.rect(e,o)},n},"forkJoin"),WZe=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),si(e,i),e.intersect=function(a){return Yn.circle(e,7,a)},r},"end"),HZe=x(async(t,e)=>{let r=e.padding/2,n=4,i=8,a;e.classes?a="node "+e.classes:a="node default";let s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),o=s.insert("rect",":first-child"),l=s.insert("line"),u=s.insert("line"),h=0,f=n,d=s.insert("g").attr("class","label"),p=0,g=e.classData.annotations?.[0],m=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",v=d.node().appendChild(await rl(m,e.labelStyle,!0,!0)),y=v.getBBox();if($r(we().flowchart.htmlLabels)){let C=v.children[0],I=He(v);y=C.getBoundingClientRect(),I.attr("width",y.width),I.attr("height",y.height)}e.classData.annotations[0]&&(f+=y.height+n,h+=y.width);let b=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(we().flowchart.htmlLabels?b+="<"+e.classData.type+">":b+="<"+e.classData.type+">");let w=d.node().appendChild(await rl(b,e.labelStyle,!0,!0));He(w).attr("class","classTitle");let S=w.getBBox();if($r(we().flowchart.htmlLabels)){let C=w.children[0],I=He(w);S=C.getBoundingClientRect(),I.attr("width",S.width),I.attr("height",S.height)}f+=S.height+n,S.width>h&&(h=S.width);let T=[];e.classData.members.forEach(async C=>{let I=C.getDisplayDetails(),M=I.displayText;we().flowchart.htmlLabels&&(M=M.replace(//g,">"));let R=d.node().appendChild(await rl(M,I.cssStyle?I.cssStyle:e.labelStyle,!0,!0)),k=R.getBBox();if($r(we().flowchart.htmlLabels)){let L=R.children[0],_=He(R);k=L.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}k.width>h&&(h=k.width),f+=k.height+n,T.push(R)}),f+=i;let E=[];if(e.classData.methods.forEach(async C=>{let I=C.getDisplayDetails(),M=I.displayText;we().flowchart.htmlLabels&&(M=M.replace(//g,">"));let R=d.node().appendChild(await rl(M,I.cssStyle?I.cssStyle:e.labelStyle,!0,!0)),k=R.getBBox();if($r(we().flowchart.htmlLabels)){let L=R.children[0],_=He(R);k=L.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}k.width>h&&(h=k.width),f+=k.height+n,E.push(R)}),f+=i,g){let C=(h-y.width)/2;He(v).attr("transform","translate( "+(-1*h/2+C)+", "+-1*f/2+")"),p=y.height+n}let A=(h-S.width)/2;return He(w).attr("transform","translate( "+(-1*h/2+A)+", "+(-1*f/2+p)+")"),p+=S.height+n,l.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+i+p).attr("y2",-f/2-r+i+p),p+=i,T.forEach(C=>{He(C).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+i/2)+")");let I=C?.getBBox();p+=(I?.height??0)+n}),p+=i,u.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+i+p).attr("y2",-f/2-r+i+p),p+=i,E.forEach(C=>{He(C).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");let I=C?.getBBox();p+=(I?.height??0)+n}),o.attr("style",e.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(f/2)-r).attr("width",h+e.padding).attr("height",f+e.padding),si(e,o),e.intersect=function(C){return Yn.rect(e,C)},s},"class_box"),mve={rhombus:pve,composite:BZe,question:pve,rect:PZe,labelRect:FZe,rectWithTitle:$Ze,choice:CZe,circle:GZe,doublecircle:VZe,stadium:zZe,hexagon:AZe,block_arrow:_Ze,rect_left_inv_arrow:LZe,lean_right:RZe,lean_left:IZe,trapezoid:NZe,inv_trapezoid:DZe,rect_right_inv_arrow:MZe,cylinder:OZe,start:qZe,end:WZe,note:SZe,subroutine:UZe,fork:gve,join:gve,class_box:HZe},OS={},Ive=x(async(t,e,r)=>{let n,i;if(e.link){let a;we().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await mve[e.shape](n,e,r)}else i=await mve[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),OS[e.id]=n,e.haveCallback&&OS[e.id].attr("class",OS[e.id].attr("class")+" clickable"),n},"insertNode"),YZe=x(t=>{let e=OS[t.id];J.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode");x(kB,"getNodeFromBlock");x(Nve,"calculateBlockSize");x(Dve,"insertBlockPositioned");x($S,"performOperations");x(Mve,"calculateBlockSizes");x(Ove,"insertBlocks");x(Pve,"insertEdges");XZe=x(function(t,e){return e.db.getClasses()},"getClasses"),jZe=x(async function(t,e,r,n){let{securityLevel:i,block:a}=or(),s=n.db,o;i==="sandbox"&&(o=He("#i"+e));let l=i==="sandbox"?He(o.nodes()[0].contentDocument.body):He("body"),u=i==="sandbox"?l.select(`[id="${e}"]`):He(`[id="${e}"]`);sZe(u,["point","circle","cross"],n.type,e);let f=s.getBlocks(),d=s.getBlocksFlat(),p=s.getEdges(),g=u.insert("g").attr("class","block");await Mve(g,f,s);let m=kve(s);if(await Ove(g,f,s),await Pve(g,p,d,s,e),m){let v=m,y=Math.max(1,Math.round(.125*(v.width/v.height))),b=v.height+y+10,w=v.width+10,{useMaxWidth:S}=a;un(u,b,w,!!S),J.debug("Here Bounds",m,v),u.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),KZe={draw:jZe,getClasses:XZe},ZZe={parser:AKe,db:HKe,renderer:KZe,styles:XKe}});var SB=ba((jb,EB)=>{(function(e,r){typeof jb=="object"&&typeof EB=="object"?EB.exports=r():typeof define=="function"&&define.amd?define([],r):typeof jb=="object"?jb.layoutBase=r():e.layoutBase=r()})(jb,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=28)}([function(t,e,r){"use strict";function n(){}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_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";function n(i){this.vGraphObject=i}t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(5);function u(f,d,p,g){p==null&&g==null&&(g=d),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;md?(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(d+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(p+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>p?(this.rect.y-=(this.labelHeight-p)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(p+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u},function(t,e,r){"use strict";var n=r(0);function i(){}for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(7),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,v){n.call(this,v),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,v){if(m==null&&v==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var b=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(m.owner==v.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=v.owner?null:(b.source=m,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),m.edges.push(b),v!=m&&v.edges.push(b),b)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=m.edges.slice(),y,b=v.length,w=0;w-1&&E>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(T,1),y.target!=y.source&&y.target.edges.splice(E,1);var S=y.source.owner.getEdges().indexOf(y);if(S==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(S,1)}},d.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,m=i.MAX_VALUE,v,y,b,w=this.getNodes(),S=w.length,T=0;Tv&&(g=v),m>y&&(m=y)}return g==i.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?b=w[0].getParent().paddingLeft:b=this.margin,this.left=m-b,this.top=g-b,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=i.MAX_VALUE,v=-i.MAX_VALUE,y=i.MAX_VALUE,b=-i.MAX_VALUE,w,S,T,E,A,C=this.nodes,I=C.length,M=0;Mw&&(m=w),vT&&(y=T),bw&&(m=w),vT&&(y=T),b=this.nodes.length){var I=0;v.forEach(function(M){M.owner==g&&I++}),I==this.nodes.length&&(this.isConnected=!0)}},t.exports=d},function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(6),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=C,!1;if(uh)return o[0]=d,o[1]=u,o[2]=E,o[3]=f,!1;if(lh?(o[0]=m,o[1]=v,k=!0):(o[0]=g,o[1]=p,k=!0):_===N&&(l>h?(o[0]=d,o[1]=p,k=!0):(o[0]=y,o[1]=v,k=!0)),-D===N?h>l?(o[2]=A,o[3]=C,L=!0):(o[2]=E,o[3]=T,L=!0):D===N&&(h>l?(o[2]=S,o[3]=T,L=!0):(o[2]=I,o[3]=C,L=!0)),k&&L)return!1;if(l>h?u>f?(O=this.getCardinalDirection(_,N,4),P=this.getCardinalDirection(D,N,2)):(O=this.getCardinalDirection(-_,N,3),P=this.getCardinalDirection(-D,N,1)):u>f?(O=this.getCardinalDirection(-_,N,1),P=this.getCardinalDirection(-D,N,3)):(O=this.getCardinalDirection(_,N,2),P=this.getCardinalDirection(D,N,4)),!k)switch(O){case 1:G=p,B=l+-w/N,o[0]=B,o[1]=G;break;case 2:B=y,G=u+b*N,o[0]=B,o[1]=G;break;case 3:G=v,B=l+w/N,o[0]=B,o[1]=G;break;case 4:B=m,G=u+-b*N,o[0]=B,o[1]=G;break}if(!L)switch(P){case 1:U=T,$=h+-R/N,o[2]=$,o[3]=U;break;case 2:$=I,U=f+M*N,o[2]=$,o[3]=U;break;case 3:U=C,$=h+R/N,o[2]=$,o[3]=U;break;case 4:$=A,U=f+-M*N,o[2]=$,o[3]=U;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,v=l.y,y=void 0,b=void 0,w=void 0,S=void 0,T=void 0,E=void 0,A=void 0,C=void 0,I=void 0;return w=d-h,T=u-f,A=f*h-u*d,S=v-g,E=p-m,C=m*g-p*v,I=w*E-S*T,I===0?null:(y=(T*C-E*A)/I,b=(S*A-w*C)/I,new n(y,b))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o=0){var v=(-p+Math.sqrt(p*p-4*d*g))/(2*d),y=(-p-Math.sqrt(p*p-4*d*g))/(2*d),b=null;return v>=0&&v<=1?[v]:y>=0&&y<=1?[y]:b}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,r){"use strict";function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n},function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function u(h,f){for(var d=0;d"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},t.exports=i},function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g0&&g;){for(w.push(T[0]);w.length>0&&g;){var E=w[0];w.splice(0,1),b.add(E);for(var A=E.getEdges(),y=0;y-1&&T.splice(R,1)}b=new Set,S=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,v=this.graphManager.calcLowestCommonAncestor(p.source,p.target),y=0;y0){for(var v=this.edgeToDummyNodes.get(m),y=0;y=0&&g.splice(C,1);var I=S.getNeighborsList();I.forEach(function(k){if(m.indexOf(k)<0){var L=v.get(k),_=L-1;_==1&&E.push(k),v.set(k,_)}})}m=m.concat(E),(g.length==1||g.length==2)&&(y=!0,b=g[0])}return b},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d},function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(5);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},t.exports=i},function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,v,y=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,p=0;pw||b>w)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*v)):(w=d.getEstimatedSize()*this.compoundGravityRangeFactor,(y>w||b>w)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=y.length||w>=y[0].length)){for(var S=0;Su}}]),o}();t.exports=s},function(t,e,r){"use strict";function n(){}n.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=function(ot){for(var Qe=[];ot-- >0;)Qe.push(0);return Qe}(Math.min(this.m+1,this.n)),this.U=function(ot){var Qe=function dt(gt){if(gt.length==0)return 0;for(var ht=[],st=0;st0;)Qe.push(0);return Qe}(this.n),o=function(ot){for(var Qe=[];ot-- >0;)Qe.push(0);return Qe}(this.m),l=!0,u=!0,h=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),d=0;d=0;N--)if(this.s[N]!==0){for(var O=N+1;O=0;ee--){if(function(ot,Qe){return ot&&Qe}(ee0;){var K=void 0,de=void 0;for(K=L-2;K>=-1&&K!==-1;K--)if(Math.abs(s[K])<=ae+j*(Math.abs(this.s[K])+Math.abs(this.s[K+1]))){s[K]=0;break}if(K===L-2)de=4;else{var ne=void 0;for(ne=L-1;ne>=K&&ne!==K;ne--){var be=(ne!==L?Math.abs(s[ne]):0)+(ne!==K+1?Math.abs(s[ne-1]):0);if(Math.abs(this.s[ne])<=ae+j*be){this.s[ne]=0;break}}ne===K?de=3:ne===L-1?de=1:(de=2,K=ne)}switch(K++,de){case 1:{var W=s[L-2];s[L-2]=0;for(var Ve=L-2;Ve>=K;Ve--){var pe=n.hypot(this.s[Ve],W),Be=this.s[Ve]/pe,Ye=W/pe;if(this.s[Ve]=pe,Ve!==K&&(W=-Ye*s[Ve-1],s[Ve-1]=Be*s[Ve-1]),u)for(var qe=0;qe=this.s[K+1]);){var nt=this.s[K];if(this.s[K]=this.s[K+1],this.s[K+1]=nt,u&&KMath.abs(a)?(s=a/i,s=Math.abs(i)*Math.sqrt(1+s*s)):a!=0?(s=i/a,s=Math.abs(a)*Math.sqrt(1+s*s)):s=0,s},t.exports=n},function(t,e,r){"use strict";var n=function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o{(function(e,r){typeof Kb=="object"&&typeof CB=="object"?CB.exports=r(SB()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof Kb=="object"?Kb.coseBase=r(SB()):e.coseBase=r(e.layoutBase)})(Kb,function(t){return(()=>{"use strict";var e={45:(a,s,o)=>{var l={};l.layoutBase=o(551),l.CoSEConstants=o(806),l.CoSEEdge=o(767),l.CoSEGraph=o(880),l.CoSEGraphManager=o(578),l.CoSELayout=o(765),l.CoSENode=o(991),l.ConstraintHandler=o(902),a.exports=l},806:(a,s,o)=>{var l=o(551).FDLayoutConstants;function u(){}for(var h in l)u[h]=l[h];u.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,u.DEFAULT_COMPONENT_SEPERATION=60,u.TILE=!0,u.TILING_PADDING_VERTICAL=10,u.TILING_PADDING_HORIZONTAL=10,u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0,u.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,u.TREE_REDUCTION_ON_INCREMENTAL=!0,u.PURE_INCREMENTAL=u.DEFAULT_INCREMENTAL,a.exports=u},767:(a,s,o)=>{var l=o(551).FDLayoutEdge;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u},880:(a,s,o)=>{var l=o(551).LGraph;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u},578:(a,s,o)=>{var l=o(551).LGraphManager;function u(f){l.call(this,f)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u},765:(a,s,o)=>{var l=o(551).FDLayout,u=o(578),h=o(880),f=o(991),d=o(767),p=o(806),g=o(902),m=o(551).FDLayoutConstants,v=o(551).LayoutConstants,y=o(551).Point,b=o(551).PointD,w=o(551).DimensionD,S=o(551).Layout,T=o(551).Integer,E=o(551).IGeometry,A=o(551).LGraph,C=o(551).Transform,I=o(551).LinkedList;function M(){l.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(l.prototype);for(var R in l)M[R]=l[R];M.prototype.newGraphManager=function(){var k=new u(this);return this.graphManager=k,k},M.prototype.newGraph=function(k){return new h(null,this.graphManager,k)},M.prototype.newNode=function(k){return new f(this.graphManager,k)},M.prototype.newEdge=function(k){return new d(null,null,k)},M.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.isSubLayout||(p.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=p.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)},M.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var k=v.DEFAULT_CREATE_BENDS_AS_NEEDED;return k&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(p.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var L=new Set(this.getAllNodes()),_=this.nodesWithGravity.filter(function(O){return L.has(O)});this.graphManager.setAllNodesToApplyGravitation(_)}}else{var k=this.getFlatForest();if(k.length>0)this.positionNodesRadially(k);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var L=new Set(this.getAllNodes()),_=this.nodesWithGravity.filter(function(D){return L.has(D)});this.graphManager.setAllNodesToApplyGravitation(_),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),p.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%m.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var k=new Set(this.getAllNodes()),L=this.nodesWithGravity.filter(function(N){return k.has(N)});this.graphManager.setAllNodesToApplyGravitation(L),this.graphManager.updateBounds(),this.updateGrid(),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var _=!this.isTreeGrowing&&!this.isGrowthFinished,D=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(_,D),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var k=this.graphManager.getAllNodes(),L={},_=0;_0&&this.updateDisplacements();for(var _=0;_0&&(D.fixedNodeWeight=O)}}if(this.constraints.relativePlacementConstraint){var P=new Map,B=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(Q){k.fixedNodesOnHorizontal.add(Q),k.fixedNodesOnVertical.add(Q)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var G=this.constraints.alignmentConstraint.vertical,_=0;_=2*Q.length/3;te--)ue=Math.floor(Math.random()*(te+1)),re=Q[te],Q[te]=Q[ue],Q[ue]=re;return Q},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(Q){if(Q.left){var ue=P.has(Q.left)?P.get(Q.left):Q.left,re=P.has(Q.right)?P.get(Q.right):Q.right;k.nodesInRelativeHorizontal.includes(ue)||(k.nodesInRelativeHorizontal.push(ue),k.nodeToRelativeConstraintMapHorizontal.set(ue,[]),k.dummyToNodeForVerticalAlignment.has(ue)?k.nodeToTempPositionMapHorizontal.set(ue,k.idToNodeMap.get(k.dummyToNodeForVerticalAlignment.get(ue)[0]).getCenterX()):k.nodeToTempPositionMapHorizontal.set(ue,k.idToNodeMap.get(ue).getCenterX())),k.nodesInRelativeHorizontal.includes(re)||(k.nodesInRelativeHorizontal.push(re),k.nodeToRelativeConstraintMapHorizontal.set(re,[]),k.dummyToNodeForVerticalAlignment.has(re)?k.nodeToTempPositionMapHorizontal.set(re,k.idToNodeMap.get(k.dummyToNodeForVerticalAlignment.get(re)[0]).getCenterX()):k.nodeToTempPositionMapHorizontal.set(re,k.idToNodeMap.get(re).getCenterX())),k.nodeToRelativeConstraintMapHorizontal.get(ue).push({right:re,gap:Q.gap}),k.nodeToRelativeConstraintMapHorizontal.get(re).push({left:ue,gap:Q.gap})}else{var te=B.has(Q.top)?B.get(Q.top):Q.top,Z=B.has(Q.bottom)?B.get(Q.bottom):Q.bottom;k.nodesInRelativeVertical.includes(te)||(k.nodesInRelativeVertical.push(te),k.nodeToRelativeConstraintMapVertical.set(te,[]),k.dummyToNodeForHorizontalAlignment.has(te)?k.nodeToTempPositionMapVertical.set(te,k.idToNodeMap.get(k.dummyToNodeForHorizontalAlignment.get(te)[0]).getCenterY()):k.nodeToTempPositionMapVertical.set(te,k.idToNodeMap.get(te).getCenterY())),k.nodesInRelativeVertical.includes(Z)||(k.nodesInRelativeVertical.push(Z),k.nodeToRelativeConstraintMapVertical.set(Z,[]),k.dummyToNodeForHorizontalAlignment.has(Z)?k.nodeToTempPositionMapVertical.set(Z,k.idToNodeMap.get(k.dummyToNodeForHorizontalAlignment.get(Z)[0]).getCenterY()):k.nodeToTempPositionMapVertical.set(Z,k.idToNodeMap.get(Z).getCenterY())),k.nodeToRelativeConstraintMapVertical.get(te).push({bottom:Z,gap:Q.gap}),k.nodeToRelativeConstraintMapVertical.get(Z).push({top:te,gap:Q.gap})}});else{var U=new Map,X=new Map;this.constraints.relativePlacementConstraint.forEach(function(Q){if(Q.left){var ue=P.has(Q.left)?P.get(Q.left):Q.left,re=P.has(Q.right)?P.get(Q.right):Q.right;U.has(ue)?U.get(ue).push(re):U.set(ue,[re]),U.has(re)?U.get(re).push(ue):U.set(re,[ue])}else{var te=B.has(Q.top)?B.get(Q.top):Q.top,Z=B.has(Q.bottom)?B.get(Q.bottom):Q.bottom;X.has(te)?X.get(te).push(Z):X.set(te,[Z]),X.has(Z)?X.get(Z).push(te):X.set(Z,[te])}});var ee=function(ue,re){var te=[],Z=[],j=new I,ae=new Set,K=0;return ue.forEach(function(de,ne){if(!ae.has(ne)){te[K]=[],Z[K]=!1;var be=ne;for(j.push(be),ae.add(be),te[K].push(be);j.length!=0;){be=j.shift(),re.has(be)&&(Z[K]=!0);var W=ue.get(be);W.forEach(function(Ve){ae.has(Ve)||(j.push(Ve),ae.add(Ve),te[K].push(Ve))})}K++}}),{components:te,isFixed:Z}},Y=ee(U,k.fixedNodesOnHorizontal);this.componentsOnHorizontal=Y.components,this.fixedComponentsOnHorizontal=Y.isFixed;var oe=ee(X,k.fixedNodesOnVertical);this.componentsOnVertical=oe.components,this.fixedComponentsOnVertical=oe.isFixed}}},M.prototype.updateDisplacements=function(){var k=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(oe){var Q=k.idToNodeMap.get(oe.nodeId);Q.displacementX=0,Q.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var L=this.constraints.alignmentConstraint.vertical,_=0;_1){var B;for(B=0;BD&&(D=Math.floor(P.y)),O=Math.floor(P.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new b(v.WORLD_CENTER_X-P.x/2,v.WORLD_CENTER_Y-P.y/2))},M.radialLayout=function(k,L,_){var D=Math.max(this.maxDiagonalInTree(k),p.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(L,null,0,359,0,D);var N=A.calculateBounds(k),O=new C;O.setDeviceOrgX(N.getMinX()),O.setDeviceOrgY(N.getMinY()),O.setWorldOrgX(_.x),O.setWorldOrgY(_.y);for(var P=0;P1;){var te=re[0];re.splice(0,1);var Z=ee.indexOf(te);Z>=0&&ee.splice(Z,1),Q--,Y--}L!=null?ue=(ee.indexOf(re[0])+1)%Q:ue=0;for(var j=Math.abs(D-_)/Y,ae=ue;oe!=Y;ae=++ae%Q){var K=ee[ae].getOtherEnd(k);if(K!=L){var de=(_+oe*j)%360,ne=(de+j)%360;M.branchRadialLayout(K,k,de,ne,N+O,O),oe++}}},M.maxDiagonalInTree=function(k){for(var L=T.MIN_VALUE,_=0;_L&&(L=N)}return L},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var k=this,L={};this.memberGroups={},this.idToDummyNode={};for(var _=[],D=this.graphManager.getAllNodes(),N=0;N"u"&&(L[B]=[]),L[B]=L[B].concat(O)}Object.keys(L).forEach(function(G){if(L[G].length>1){var $="DummyCompound_"+G;k.memberGroups[$]=L[G];var U=L[G][0].getParent(),X=new f(k.graphManager);X.id=$,X.paddingLeft=U.paddingLeft||0,X.paddingRight=U.paddingRight||0,X.paddingBottom=U.paddingBottom||0,X.paddingTop=U.paddingTop||0,k.idToDummyNode[$]=X;var ee=k.getGraphManager().add(k.newGraph(),X),Y=U.getChild();Y.add(X);for(var oe=0;oeN?(D.rect.x-=(D.labelWidth-N)/2,D.setWidth(D.labelWidth),D.labelMarginLeft=(D.labelWidth-N)/2):D.labelPosHorizontal=="right"&&D.setWidth(N+D.labelWidth)),D.labelHeight&&(D.labelPosVertical=="top"?(D.rect.y-=D.labelHeight,D.setHeight(O+D.labelHeight),D.labelMarginTop=D.labelHeight):D.labelPosVertical=="center"&&D.labelHeight>O?(D.rect.y-=(D.labelHeight-O)/2,D.setHeight(D.labelHeight),D.labelMarginTop=(D.labelHeight-O)/2):D.labelPosVertical=="bottom"&&D.setHeight(O+D.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var k=this.compoundOrder.length-1;k>=0;k--){var L=this.compoundOrder[k],_=L.id,D=L.paddingLeft,N=L.paddingTop,O=L.labelMarginLeft,P=L.labelMarginTop;this.adjustLocations(this.tiledMemberPack[_],L.rect.x,L.rect.y,D,N,O,P)}},M.prototype.repopulateZeroDegreeMembers=function(){var k=this,L=this.tiledZeroDegreePack;Object.keys(L).forEach(function(_){var D=k.idToDummyNode[_],N=D.paddingLeft,O=D.paddingTop,P=D.labelMarginLeft,B=D.labelMarginTop;k.adjustLocations(L[_],D.rect.x,D.rect.y,N,O,P,B)})},M.prototype.getToBeTiled=function(k){var L=k.id;if(this.toBeTiled[L]!=null)return this.toBeTiled[L];var _=k.getChild();if(_==null)return this.toBeTiled[L]=!1,!1;for(var D=_.getNodes(),N=0;N0)return this.toBeTiled[L]=!1,!1;if(O.getChild()==null){this.toBeTiled[O.id]=!1;continue}if(!this.getToBeTiled(O))return this.toBeTiled[L]=!1,!1}return this.toBeTiled[L]=!0,!0},M.prototype.getNodeDegree=function(k){for(var L=k.id,_=k.getEdges(),D=0,N=0;N<_.length;N++){var O=_[N];O.getSource().id!==O.getTarget().id&&(D=D+1)}return D},M.prototype.getNodeDegreeWithChildren=function(k){var L=this.getNodeDegree(k);if(k.getChild()==null)return L;for(var _=k.getChild().getNodes(),D=0;D<_.length;D++){var N=_[D];L+=this.getNodeDegreeWithChildren(N)}return L},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(k){for(var L=0;LU&&(U=ee.rect.height)}_+=U+k.verticalPadding}},M.prototype.tileCompoundMembers=function(k,L){var _=this;this.tiledMemberPack=[],Object.keys(k).forEach(function(D){var N=L[D];if(_.tiledMemberPack[D]=_.tileNodes(k[D],N.paddingLeft+N.paddingRight),N.rect.width=_.tiledMemberPack[D].width,N.rect.height=_.tiledMemberPack[D].height,N.setCenter(_.tiledMemberPack[D].centerX,_.tiledMemberPack[D].centerY),N.labelMarginLeft=0,N.labelMarginTop=0,p.NODE_DIMENSIONS_INCLUDE_LABELS){var O=N.rect.width,P=N.rect.height;N.labelWidth&&(N.labelPosHorizontal=="left"?(N.rect.x-=N.labelWidth,N.setWidth(O+N.labelWidth),N.labelMarginLeft=N.labelWidth):N.labelPosHorizontal=="center"&&N.labelWidth>O?(N.rect.x-=(N.labelWidth-O)/2,N.setWidth(N.labelWidth),N.labelMarginLeft=(N.labelWidth-O)/2):N.labelPosHorizontal=="right"&&N.setWidth(O+N.labelWidth)),N.labelHeight&&(N.labelPosVertical=="top"?(N.rect.y-=N.labelHeight,N.setHeight(P+N.labelHeight),N.labelMarginTop=N.labelHeight):N.labelPosVertical=="center"&&N.labelHeight>P?(N.rect.y-=(N.labelHeight-P)/2,N.setHeight(N.labelHeight),N.labelMarginTop=(N.labelHeight-P)/2):N.labelPosVertical=="bottom"&&N.setHeight(P+N.labelHeight))}})},M.prototype.tileNodes=function(k,L){var _=this.tileNodesByFavoringDim(k,L,!0),D=this.tileNodesByFavoringDim(k,L,!1),N=this.getOrgRatio(_),O=this.getOrgRatio(D),P;return OB&&(B=oe.getWidth())});var G=O/N,$=P/N,U=Math.pow(_-D,2)+4*(G+D)*($+_)*N,X=(D-_+Math.sqrt(U))/(2*(G+D)),ee;L?(ee=Math.ceil(X),ee==X&&ee++):ee=Math.floor(X);var Y=ee*(G+D)-D;return B>Y&&(Y=B),Y+=D*2,Y},M.prototype.tileNodesByFavoringDim=function(k,L,_){var D=p.TILING_PADDING_VERTICAL,N=p.TILING_PADDING_HORIZONTAL,O=p.TILING_COMPARE_BY,P={rows:[],rowWidth:[],rowHeight:[],width:0,height:L,verticalPadding:D,horizontalPadding:N,centerX:0,centerY:0};O&&(P.idealRowWidth=this.calcIdealRowWidth(k,_));var B=function(Q){return Q.rect.width*Q.rect.height},G=function(Q,ue){return B(ue)-B(Q)};k.sort(function(oe,Q){var ue=G;return P.idealRowWidth?(ue=O,ue(oe.id,Q.id)):ue(oe,Q)});for(var $=0,U=0,X=0;X0&&(P+=k.horizontalPadding),k.rowWidth[_]=P,k.width0&&(B+=k.verticalPadding);var G=0;B>k.rowHeight[_]&&(G=k.rowHeight[_],k.rowHeight[_]=B,G=k.rowHeight[_]-G),k.height+=G,k.rows[_].push(L)},M.prototype.getShortestRowIndex=function(k){for(var L=-1,_=Number.MAX_VALUE,D=0;D_&&(L=D,_=k.rowWidth[D]);return L},M.prototype.canAddHorizontal=function(k,L,_){if(k.idealRowWidth){var D=k.rows.length-1,N=k.rowWidth[D];return N+L+k.horizontalPadding<=k.idealRowWidth}var O=this.getShortestRowIndex(k);if(O<0)return!0;var P=k.rowWidth[O];if(P+k.horizontalPadding+L<=k.width)return!0;var B=0;k.rowHeight[O]<_&&O>0&&(B=_+k.verticalPadding-k.rowHeight[O]);var G;k.width-P>=L+k.horizontalPadding?G=(k.height+B)/(P+L+k.horizontalPadding):G=(k.height+B)/k.width,B=_+k.verticalPadding;var $;return k.widthO&&L!=_){D.splice(-1,1),k.rows[_].push(N),k.rowWidth[L]=k.rowWidth[L]-O,k.rowWidth[_]=k.rowWidth[_]+O,k.width=k.rowWidth[instance.getLongestRowIndex(k)];for(var P=Number.MIN_VALUE,B=0;BP&&(P=D[B].height);L>0&&(P+=k.verticalPadding);var G=k.rowHeight[L]+k.rowHeight[_];k.rowHeight[L]=P,k.rowHeight[_]0)for(var Y=N;Y<=O;Y++)ee[0]+=this.grid[Y][P-1].length+this.grid[Y][P].length-1;if(O0)for(var Y=P;Y<=B;Y++)ee[3]+=this.grid[N-1][Y].length+this.grid[N][Y].length-1;for(var oe=T.MAX_VALUE,Q,ue,re=0;re{var l=o(551).FDLayoutNode,u=o(551).IMath;function h(d,p,g,m){l.call(this,d,p,g,m)}h.prototype=Object.create(l.prototype);for(var f in l)h[f]=l[f];h.prototype.calculateDisplacement=function(){var d=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},h.prototype.propogateDisplacementToChildren=function(d,p){for(var g=this.getChild().getNodes(),m,v=0;v{function l(g){if(Array.isArray(g)){for(var m=0,v=Array(g.length);m0){var Ke=0;Oe.forEach(function(nt){he=="horizontal"?(me.set(nt,y.has(nt)?b[y.get(nt)]:se.get(nt)),Ke+=me.get(nt)):(me.set(nt,y.has(nt)?w[y.get(nt)]:se.get(nt)),Ke+=me.get(nt))}),Ke=Ke/Oe.length,We.forEach(function(nt){z.has(nt)||me.set(nt,Ke)})}else{var Ue=0;We.forEach(function(nt){he=="horizontal"?Ue+=y.has(nt)?b[y.get(nt)]:se.get(nt):Ue+=y.has(nt)?w[y.get(nt)]:se.get(nt)}),Ue=Ue/We.length,We.forEach(function(nt){me.set(nt,Ue)})}});for(var ze=function(){var Oe=_e.shift(),Ke=H.get(Oe);Ke.forEach(function(Ue){if(me.get(Ue.id)nt&&(nt=ht),stDt&&(Dt=st)}}catch(xt){kt=!0,ot=xt}finally{try{!ut&&Qe.return&&Qe.return()}finally{if(kt)throw ot}}var Br=(Ke+nt)/2-(Ue+Dt)/2,wt=!0,mn=!1,Ir=void 0;try{for(var er=We[Symbol.iterator](),Zt;!(wt=(Zt=er.next()).done);wt=!0){var wr=Zt.value;me.set(wr,me.get(wr)+Br)}}catch(xt){mn=!0,Ir=xt}finally{try{!wt&&er.return&&er.return()}finally{if(mn)throw Ir}}})}return me},R=function(H){var he=0,z=0,se=0,le=0;if(H.forEach(function(Ie){Ie.left?b[y.get(Ie.left)]-b[y.get(Ie.right)]>=0?he++:z++:w[y.get(Ie.top)]-w[y.get(Ie.bottom)]>=0?se++:le++}),he>z&&se>le)for(var ke=0;kez)for(var ve=0;vele)for(var me=0;me1)m.fixedNodeConstraint.forEach(function(ye,H){D[H]=[ye.position.x,ye.position.y],N[H]=[b[y.get(ye.nodeId)],w[y.get(ye.nodeId)]]}),O=!0;else if(m.alignmentConstraint)(function(){var ye=0;if(m.alignmentConstraint.vertical){for(var H=m.alignmentConstraint.vertical,he=function(me){var Ie=new Set;H[me].forEach(function(Xe){Ie.add(Xe)});var _e=new Set([].concat(l(Ie)).filter(function(Xe){return B.has(Xe)})),ze=void 0;_e.size>0?ze=b[y.get(_e.values().next().value)]:ze=I(Ie).x,H[me].forEach(function(Xe){D[ye]=[ze,w[y.get(Xe)]],N[ye]=[b[y.get(Xe)],w[y.get(Xe)]],ye++})},z=0;z0?ze=b[y.get(_e.values().next().value)]:ze=I(Ie).y,se[me].forEach(function(Xe){D[ye]=[b[y.get(Xe)],ze],N[ye]=[b[y.get(Xe)],w[y.get(Xe)]],ye++})},ke=0;keX&&(X=U[Y].length,ee=Y);if(X<$.size/2)R(m.relativePlacementConstraint),O=!1,P=!1;else{var oe=new Map,Q=new Map,ue=[];U[ee].forEach(function(ye){G.get(ye).forEach(function(H){H.direction=="horizontal"?(oe.has(ye)?oe.get(ye).push(H):oe.set(ye,[H]),oe.has(H.id)||oe.set(H.id,[]),ue.push({left:ye,right:H.id})):(Q.has(ye)?Q.get(ye).push(H):Q.set(ye,[H]),Q.has(H.id)||Q.set(H.id,[]),ue.push({top:ye,bottom:H.id}))})}),R(ue),P=!1;var re=M(oe,"horizontal"),te=M(Q,"vertical");U[ee].forEach(function(ye,H){N[H]=[b[y.get(ye)],w[y.get(ye)]],D[H]=[],re.has(ye)?D[H][0]=re.get(ye):D[H][0]=b[y.get(ye)],te.has(ye)?D[H][1]=te.get(ye):D[H][1]=w[y.get(ye)]}),O=!0}}if(O){for(var Z=void 0,j=f.transpose(D),ae=f.transpose(N),K=0;K0){var Be={x:0,y:0};m.fixedNodeConstraint.forEach(function(ye,H){var he={x:b[y.get(ye.nodeId)],y:w[y.get(ye.nodeId)]},z=ye.position,se=C(z,he);Be.x+=se.x,Be.y+=se.y}),Be.x/=m.fixedNodeConstraint.length,Be.y/=m.fixedNodeConstraint.length,b.forEach(function(ye,H){b[H]+=Be.x}),w.forEach(function(ye,H){w[H]+=Be.y}),m.fixedNodeConstraint.forEach(function(ye){b[y.get(ye.nodeId)]=ye.position.x,w[y.get(ye.nodeId)]=ye.position.y})}if(m.alignmentConstraint){if(m.alignmentConstraint.vertical)for(var Ye=m.alignmentConstraint.vertical,qe=function(H){var he=new Set;Ye[H].forEach(function(le){he.add(le)});var z=new Set([].concat(l(he)).filter(function(le){return B.has(le)})),se=void 0;z.size>0?se=b[y.get(z.values().next().value)]:se=I(he).x,he.forEach(function(le){B.has(le)||(b[y.get(le)]=se)})},Le=0;Le0?se=w[y.get(z.values().next().value)]:se=I(he).y,he.forEach(function(le){B.has(le)||(w[y.get(le)]=se)})},Ce=0;Ce{a.exports=t}},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var i=n(45);return i})()})});var $ve=ba((Zb,_B)=>{(function(e,r){typeof Zb=="object"&&typeof _B=="object"?_B.exports=r(AB()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof Zb=="object"?Zb.cytoscapeFcose=r(AB()):e.cytoscapeFcose=r(e.coseBase)})(Zb,function(t){return(()=>{"use strict";var e={658:a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(s){for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u{var l=function(){function f(d,p){var g=[],m=!0,v=!1,y=void 0;try{for(var b=d[Symbol.iterator](),w;!(m=(w=b.next()).done)&&(g.push(w.value),!(p&&g.length===p));m=!0);}catch(S){v=!0,y=S}finally{try{!m&&b.return&&b.return()}finally{if(v)throw y}}return g}return function(d,p){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return f(d,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=o(140).layoutBase.LinkedList,h={};h.getTopMostNodes=function(f){for(var d={},p=0;p0&&O.merge($)});for(var P=0;P1){w=y[0],S=w.connectedEdges().length,y.forEach(function(N){N.connectedEdges().length0&&g.set("dummy"+(g.size+1),A),C},h.relocateComponent=function(f,d,p){if(!p.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,v=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(p.quality=="draft"){var b=!0,w=!1,S=void 0;try{for(var T=d.nodeIndexes[Symbol.iterator](),E;!(b=(E=T.next()).done);b=!0){var A=E.value,C=l(A,2),I=C[0],M=C[1],R=p.cy.getElementById(I);if(R){var k=R.boundingBox(),L=d.xCoords[M]-k.w/2,_=d.xCoords[M]+k.w/2,D=d.yCoords[M]-k.h/2,N=d.yCoords[M]+k.h/2;Lm&&(m=_),Dy&&(y=N)}}}catch($){w=!0,S=$}finally{try{!b&&T.return&&T.return()}finally{if(w)throw S}}var O=f.x-(m+g)/2,P=f.y-(y+v)/2;d.xCoords=d.xCoords.map(function($){return $+O}),d.yCoords=d.yCoords.map(function($){return $+P})}else{Object.keys(d).forEach(function($){var U=d[$],X=U.getRect().x,ee=U.getRect().x+U.getRect().width,Y=U.getRect().y,oe=U.getRect().y+U.getRect().height;Xm&&(m=ee),Yy&&(y=oe)});var B=f.x-(m+g)/2,G=f.y-(y+v)/2;Object.keys(d).forEach(function($){var U=d[$];U.setCenter(U.getCenterX()+B,U.getCenterY()+G)})}}},h.calcBoundingBox=function(f,d,p,g){for(var m=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,w=void 0,S=void 0,T=void 0,E=void 0,A=f.descendants().not(":parent"),C=A.length,I=0;Iw&&(m=w),vT&&(y=T),b{var l=o(548),u=o(140).CoSELayout,h=o(140).CoSENode,f=o(140).layoutBase.PointD,d=o(140).layoutBase.DimensionD,p=o(140).layoutBase.LayoutConstants,g=o(140).layoutBase.FDLayoutConstants,m=o(140).CoSEConstants,v=function(b,w){var S=b.cy,T=b.eles,E=T.nodes(),A=T.edges(),C=void 0,I=void 0,M=void 0,R={};b.randomize&&(C=w.nodeIndexes,I=w.xCoords,M=w.yCoords);var k=function($){return typeof $=="function"},L=function($,U){return k($)?$(U):$},_=l.calcParentsWithoutChildren(S,T),D=function G($,U,X,ee){for(var Y=U.length,oe=0;oe0){var j=void 0;j=X.getGraphManager().add(X.newGraph(),re),G(j,ue,X,ee)}}},N=function($,U,X){for(var ee=0,Y=0,oe=0;oe0?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=ee/Y:k(b.idealEdgeLength)?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=b.idealEdgeLength,m.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,m.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},O=function($,U){U.fixedNodeConstraint&&($.constraints.fixedNodeConstraint=U.fixedNodeConstraint),U.alignmentConstraint&&($.constraints.alignmentConstraint=U.alignmentConstraint),U.relativePlacementConstraint&&($.constraints.relativePlacementConstraint=U.relativePlacementConstraint)};b.nestingFactor!=null&&(m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=b.nestingFactor),b.gravity!=null&&(m.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=b.gravity),b.numIter!=null&&(m.MAX_ITERATIONS=g.MAX_ITERATIONS=b.numIter),b.gravityRange!=null&&(m.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=b.gravityRange),b.gravityCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=b.gravityCompound),b.gravityRangeCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=b.gravityRangeCompound),b.initialEnergyOnIncremental!=null&&(m.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=b.initialEnergyOnIncremental),b.tilingCompareBy!=null&&(m.TILING_COMPARE_BY=b.tilingCompareBy),b.quality=="proof"?p.QUALITY=2:p.QUALITY=0,m.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=p.NODE_DIMENSIONS_INCLUDE_LABELS=b.nodeDimensionsIncludeLabels,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!b.randomize,m.ANIMATE=g.ANIMATE=p.ANIMATE=b.animate,m.TILE=b.tile,m.TILING_PADDING_VERTICAL=typeof b.tilingPaddingVertical=="function"?b.tilingPaddingVertical.call():b.tilingPaddingVertical,m.TILING_PADDING_HORIZONTAL=typeof b.tilingPaddingHorizontal=="function"?b.tilingPaddingHorizontal.call():b.tilingPaddingHorizontal,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!0,m.PURE_INCREMENTAL=!b.randomize,p.DEFAULT_UNIFORM_LEAF_NODE_SIZES=b.uniformNodeDimensions,b.step=="transformed"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!1),b.step=="enforced"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!1),b.step=="cose"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!0),b.step=="all"&&(b.randomize?m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!0),b.fixedNodeConstraint||b.alignmentConstraint||b.relativePlacementConstraint?m.TREE_REDUCTION_ON_INCREMENTAL=!1:m.TREE_REDUCTION_ON_INCREMENTAL=!0;var P=new u,B=P.newGraphManager();return D(B.addRoot(),l.getTopMostNodes(E),P,b),N(P,B,A),O(P,b),P.runLayout(),R};a.exports={coseLayout:v}},212:(a,s,o)=>{var l=function(){function b(w,S){for(var T=0;T0)if(N){var B=f.getTopMostNodes(T.eles.nodes());if(k=f.connectComponents(E,T.eles,B),k.forEach(function(be){var W=be.boundingBox();L.push({x:W.x1+W.w/2,y:W.y1+W.h/2})}),T.randomize&&k.forEach(function(be){T.eles=be,C.push(p(T))}),T.quality=="default"||T.quality=="proof"){var G=E.collection();if(T.tile){var $=new Map,U=[],X=[],ee=0,Y={nodeIndexes:$,xCoords:U,yCoords:X},oe=[];if(k.forEach(function(be,W){be.edges().length==0&&(be.nodes().forEach(function(Ve,pe){G.merge(be.nodes()[pe]),Ve.isParent()||(Y.nodeIndexes.set(be.nodes()[pe].id(),ee++),Y.xCoords.push(be.nodes()[0].position().x),Y.yCoords.push(be.nodes()[0].position().y))}),oe.push(W))}),G.length>1){var Q=G.boundingBox();L.push({x:Q.x1+Q.w/2,y:Q.y1+Q.h/2}),k.push(G),C.push(Y);for(var ue=oe.length-1;ue>=0;ue--)k.splice(oe[ue],1),C.splice(oe[ue],1),L.splice(oe[ue],1)}}k.forEach(function(be,W){T.eles=be,R.push(m(T,C[W])),f.relocateComponent(L[W],R[W],T)})}else k.forEach(function(be,W){f.relocateComponent(L[W],C[W],T)});var re=new Set;if(k.length>1){var te=[],Z=A.filter(function(be){return be.css("display")=="none"});k.forEach(function(be,W){var Ve=void 0;if(T.quality=="draft"&&(Ve=C[W].nodeIndexes),be.nodes().not(Z).length>0){var pe={};pe.edges=[],pe.nodes=[];var Be=void 0;be.nodes().not(Z).forEach(function(Ye){if(T.quality=="draft")if(!Ye.isParent())Be=Ve.get(Ye.id()),pe.nodes.push({x:C[W].xCoords[Be]-Ye.boundingbox().w/2,y:C[W].yCoords[Be]-Ye.boundingbox().h/2,width:Ye.boundingbox().w,height:Ye.boundingbox().h});else{var qe=f.calcBoundingBox(Ye,C[W].xCoords,C[W].yCoords,Ve);pe.nodes.push({x:qe.topLeftX,y:qe.topLeftY,width:qe.width,height:qe.height})}else R[W][Ye.id()]&&pe.nodes.push({x:R[W][Ye.id()].getLeft(),y:R[W][Ye.id()].getTop(),width:R[W][Ye.id()].getWidth(),height:R[W][Ye.id()].getHeight()})}),be.edges().forEach(function(Ye){var qe=Ye.source(),Le=Ye.target();if(qe.css("display")!="none"&&Le.css("display")!="none")if(T.quality=="draft"){var Me=Ve.get(qe.id()),Ne=Ve.get(Le.id()),Ce=[],Fe=[];if(qe.isParent()){var fe=f.calcBoundingBox(qe,C[W].xCoords,C[W].yCoords,Ve);Ce.push(fe.topLeftX+fe.width/2),Ce.push(fe.topLeftY+fe.height/2)}else Ce.push(C[W].xCoords[Me]),Ce.push(C[W].yCoords[Me]);if(Le.isParent()){var ye=f.calcBoundingBox(Le,C[W].xCoords,C[W].yCoords,Ve);Fe.push(ye.topLeftX+ye.width/2),Fe.push(ye.topLeftY+ye.height/2)}else Fe.push(C[W].xCoords[Ne]),Fe.push(C[W].yCoords[Ne]);pe.edges.push({startX:Ce[0],startY:Ce[1],endX:Fe[0],endY:Fe[1]})}else R[W][qe.id()]&&R[W][Le.id()]&&pe.edges.push({startX:R[W][qe.id()].getCenterX(),startY:R[W][qe.id()].getCenterY(),endX:R[W][Le.id()].getCenterX(),endY:R[W][Le.id()].getCenterY()})}),pe.nodes.length>0&&(te.push(pe),re.add(W))}});var j=D.packComponents(te,T.randomize).shifts;if(T.quality=="draft")C.forEach(function(be,W){var Ve=be.xCoords.map(function(Be){return Be+j[W].dx}),pe=be.yCoords.map(function(Be){return Be+j[W].dy});be.xCoords=Ve,be.yCoords=pe});else{var ae=0;re.forEach(function(be){Object.keys(R[be]).forEach(function(W){var Ve=R[be][W];Ve.setCenter(Ve.getCenterX()+j[ae].dx,Ve.getCenterY()+j[ae].dy)}),ae++})}}}else{var O=T.eles.boundingBox();if(L.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),T.randomize){var P=p(T);C.push(P)}T.quality=="default"||T.quality=="proof"?(R.push(m(T,C[0])),f.relocateComponent(L[0],R[0],T)):f.relocateComponent(L[0],C[0],T)}var K=function(W,Ve){if(T.quality=="default"||T.quality=="proof"){typeof W=="number"&&(W=Ve);var pe=void 0,Be=void 0,Ye=W.data("id");return R.forEach(function(Le){Ye in Le&&(pe={x:Le[Ye].getRect().getCenterX(),y:Le[Ye].getRect().getCenterY()},Be=Le[Ye])}),T.nodeDimensionsIncludeLabels&&(Be.labelWidth&&(Be.labelPosHorizontal=="left"?pe.x+=Be.labelWidth/2:Be.labelPosHorizontal=="right"&&(pe.x-=Be.labelWidth/2)),Be.labelHeight&&(Be.labelPosVertical=="top"?pe.y+=Be.labelHeight/2:Be.labelPosVertical=="bottom"&&(pe.y-=Be.labelHeight/2))),pe==null&&(pe={x:W.position("x"),y:W.position("y")}),{x:pe.x,y:pe.y}}else{var qe=void 0;return C.forEach(function(Le){var Me=Le.nodeIndexes.get(W.id());Me!=null&&(qe={x:Le.xCoords[Me],y:Le.yCoords[Me]})}),qe==null&&(qe={x:W.position("x"),y:W.position("y")}),{x:qe.x,y:qe.y}}};if(T.quality=="default"||T.quality=="proof"||T.randomize){var de=f.calcParentsWithoutChildren(E,A),ne=A.filter(function(be){return be.css("display")=="none"});T.eles=A.not(ne),A.nodes().not(":parent").not(ne).layoutPositions(S,T,K),de.length>0&&de.forEach(function(be){be.position(K(be))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),b}();a.exports=y},657:(a,s,o)=>{var l=o(548),u=o(140).layoutBase.Matrix,h=o(140).layoutBase.SVD,f=function(p){var g=p.cy,m=p.eles,v=m.nodes(),y=m.nodes(":parent"),b=new Map,w=new Map,S=new Map,T=[],E=[],A=[],C=[],I=[],M=[],R=[],k=[],L=void 0,_=void 0,D=1e8,N=1e-9,O=p.piTol,P=p.samplingType,B=p.nodeSeparation,G=void 0,$=function(){for(var he=0,z=0,se=!1;z=ke;){me=le[ke++];for(var We=T[me],Oe=0;Oeze&&(ze=I[Ue],Xe=Ue)}return Xe},X=function(he){var z=void 0;if(he){z=Math.floor(Math.random()*_),L=z;for(var le=0;le<_;le++)I[le]=D;for(var ke=0;ke=1)break;ze=_e}for(var We=0;We<_;We++)ke[We]=se[We];for(Ie=0,ze=N;;){Ie++;for(var Oe=0;Oe<_;Oe++)ve[Oe]=le[Oe];if(ve=u.minusOp(ve,u.multCons(ke,u.dotProduct(ke,ve))),le=u.multGamma(u.multL(u.multGamma(ve),M,k)),z=u.dotProduct(ve,le),le=u.normalize(le),_e=u.dotProduct(ve,le),Xe=Math.abs(_e/ze),Xe<=1+O&&Xe>=1)break;ze=_e}for(var Ke=0;Ke<_;Ke++)ve[Ke]=le[Ke];E=u.multCons(ke,Math.sqrt(Math.abs(he))),A=u.multCons(ve,Math.sqrt(Math.abs(z)))};l.connectComponents(g,m,l.getTopMostNodes(v),b),y.forEach(function(H){l.connectComponents(g,m,l.getTopMostNodes(H.descendants().intersection(m)),b)});for(var oe=0,Q=0;Q0&&(z.isParent()?T[he].push(S.get(z.id())):T[he].push(z.id()))})});var de=function(he){var z=w.get(he),se=void 0;b.get(he).forEach(function(le){g.getElementById(le).isParent()?se=S.get(le):se=le,T[z].push(se),T[w.get(se)].push(he)})},ne=!0,be=!1,W=void 0;try{for(var Ve=b.keys()[Symbol.iterator](),pe;!(ne=(pe=Ve.next()).done);ne=!0){var Be=pe.value;de(Be)}}catch(H){be=!0,W=H}finally{try{!ne&&Ve.return&&Ve.return()}finally{if(be)throw W}}_=w.size;var Ye=void 0;if(_>2){G=_{var l=o(212),u=function(f){f&&f("layout","fcose",l)};typeof cytoscape<"u"&&u(cytoscape),a.exports=u},140:a=>{a.exports=t}},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var i=n(579);return i})()})});var tye={};hr(tye,{diagram:()=>mQe});function Yve(t,e,r){t.forEach(n=>{e.add({group:"nodes",data:{type:"service",id:n.id,icon:n.icon,label:n.title,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function Xve(t,e,r){t.forEach(n=>{e.add({group:"nodes",data:{type:"junction",id:n.id,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function jve(t,e){e.nodes().map(r=>{let n=W1(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}function Kve(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}function Zve(t,e){t.forEach(r=>{let{lhsId:n,rhsId:i,lhsInto:a,lhsGroup:s,rhsInto:o,lhsDir:l,rhsDir:u,rhsGroup:h,title:f}=r,d=RB(r.lhsDir,r.rhsDir)?"segments":"straight",p={id:`${n}-${i}`,label:f,source:n,sourceDir:l,sourceArrow:a,sourceGroup:s,sourceEndpoint:l==="L"?"0 50%":l==="R"?"100% 50%":l==="T"?"50% 0":"50% 100%",target:i,targetDir:u,targetArrow:o,targetGroup:h,targetEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%"};e.add({group:"edges",data:p,classes:d})})}function Qve(t,e,r){let n=x((o,l)=>Object.entries(o).reduce((u,[h,f])=>{let d=0,p=Object.entries(f);if(p.length===1)return u[h]=p[0][1],u;for(let g=0;g{let l={},u={};return Object.entries(o).forEach(([h,[f,d]])=>{let p=t.getNode(h)?.in??"default";l[d]??={},l[d][p]??=[],l[d][p].push(h),u[f]??={},u[f][p]??=[],u[f][p].push(h)}),{horiz:Object.values(n(l,"horizontal")).filter(h=>h.length>1),vert:Object.values(n(u,"vertical")).filter(h=>h.length>1)}}),[a,s]=i.reduce(([o,l],{horiz:u,vert:h})=>[[...o,...u],[...l,...h]],[[],[]]);return{horizontal:a,vertical:s}}function Jve(t,e){let r=[],n=x(a=>`${a[0]},${a[1]}`,"posToStr"),i=x(a=>a.split(",").map(s=>parseInt(s)),"strToPos");return t.forEach(a=>{let s=Object.fromEntries(Object.entries(a).map(([h,f])=>[n(f),h])),o=[n([0,0])],l={},u={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;o.length>0;){let h=o.shift();if(h){l[h]=1;let f=s[h];if(f){let d=i(h);Object.entries(u).forEach(([p,g])=>{let m=n([d[0]+g[0],d[1]+g[1]]),v=s[m];v&&!l[m]&&(o.push(m),r.push({[zve[p]]:v,[zve[QZe(p)]]:f,gap:1.5*e.getConfigField("iconSize")}))})}}}}),r}function eye(t,e,r,n,i,{spatialMaps:a,groupAlignments:s}){return new Promise(o=>{let l=He("body").append("div").attr("id","cy").attr("style","display:none"),u=$o({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":`${i.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${i.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});l.remove(),Kve(r,u),Yve(t,u,i),Xve(e,u,i),Zve(n,u);let h=Qve(i,a,s),f=Jve(a,i),d=u.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(p){let[g,m]=p.connectedNodes(),{parent:v}=W1(g),{parent:y}=W1(m);return v===y?1.5*i.getConfigField("iconSize"):.5*i.getConfigField("iconSize")},edgeElasticity(p){let[g,m]=p.connectedNodes(),{parent:v}=W1(g),{parent:y}=W1(m);return v===y?.45:.001},alignmentConstraint:h,relativePlacementConstraint:f});d.one("layoutstop",()=>{function p(g,m,v,y){let b,w,{x:S,y:T}=g,{x:E,y:A}=m;w=(y-T+(S-v)*(T-A)/(S-E))/Math.sqrt(1+Math.pow((T-A)/(S-E),2)),b=Math.sqrt(Math.pow(y-T,2)+Math.pow(v-S,2)-Math.pow(w,2));let C=Math.sqrt(Math.pow(E-S,2)+Math.pow(A-T,2));b=b/C;let I=(E-S)*(y-T)-(A-T)*(v-S);switch(!0){case I>=0:I=1;break;case I<0:I=-1;break}let M=(E-S)*(v-S)+(A-T)*(y-T);switch(!0){case M>=0:M=1;break;case M<0:M=-1;break}return w=Math.abs(w)*I,b=b*M,{distances:w,weights:b}}x(p,"getSegmentWeights"),u.startBatch();for(let g of Object.values(u.edges()))if(g.data?.()){let{x:m,y:v}=g.source().position(),{x:y,y:b}=g.target().position();if(m!==y&&v!==b){let w=g.sourceEndpoint(),S=g.targetEndpoint(),{sourceDir:T}=Uve(g),[E,A]=qf(T)?[w.x,S.y]:[S.x,w.y],{weights:C,distances:I}=p(w,S,E,A);g.style("segment-distances",I),g.style("segment-weights",C)}}u.endBatch(),d.run()}),d.run(),u.ready(p=>{J.info("Ready",p),o(u)})})}var Hve,zve,Gve,zS,QZe,Vve,ms,qf,RB,JZe,eQe,LB,tQe,rQe,nQe,iQe,aQe,Uve,W1,sQe,qve,oQe,Wve,lQe,cQe,q1,Qb,uQe,hQe,fQe,dQe,pQe,gQe,mQe,rye=F(()=>{ac();na();f0();hn();vr();rr();Of();ZI();Hve=Fa($ve(),1);cr();zve={L:"left",R:"right",T:"top",B:"bottom"},Gve={L:x(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:x(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:x(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:x(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},zS={L:x((t,e)=>t-e+2,"L"),R:x((t,e)=>t-2,"R"),T:x((t,e)=>t-e+2,"T"),B:x((t,e)=>t-2,"B")},QZe=x(function(t){return ms(t)?t==="L"?"R":"L":t==="T"?"B":"T"},"getOppositeArchitectureDirection"),Vve=x(function(t){let e=t;return e==="L"||e==="R"||e==="T"||e==="B"},"isArchitectureDirection"),ms=x(function(t){let e=t;return e==="L"||e==="R"},"isArchitectureDirectionX"),qf=x(function(t){let e=t;return e==="T"||e==="B"},"isArchitectureDirectionY"),RB=x(function(t,e){let r=ms(t)&&qf(e),n=qf(t)&&ms(e);return r||n},"isArchitectureDirectionXY"),JZe=x(function(t){let e=t[0],r=t[1],n=ms(e)&&qf(r),i=qf(e)&&ms(r);return n||i},"isArchitecturePairXY"),eQe=x(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),LB=x(function(t,e){let r=`${t}${e}`;return eQe(r)?r:void 0},"getArchitectureDirectionPair"),tQe=x(function([t,e],r){let n=r[0],i=r[1];return ms(n)?qf(i)?[t+(n==="L"?-1:1),e+(i==="T"?1:-1)]:[t+(n==="L"?-1:1),e]:ms(i)?[t+(i==="L"?1:-1),e+(n==="T"?1:-1)]:[t,e+(n==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),rQe=x(function(t){return t==="LT"||t==="TL"?[1,1]:t==="BL"||t==="LB"?[1,-1]:t==="BR"||t==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),nQe=x(function(t,e){return RB(t,e)?"bend":ms(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),iQe=x(function(t){return t.type==="service"},"isArchitectureService"),aQe=x(function(t){return t.type==="junction"},"isArchitectureJunction"),Uve=x(t=>t.data(),"edgeData"),W1=x(t=>t.data(),"nodeData"),sQe=sr.architecture,qve=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=Er,this.getAccTitle=Cr,this.setDiagramTitle=Dr,this.getDiagramTitle=Lr,this.getAccDescription=_r,this.setAccDescription=Ar,this.clear()}static{x(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},mr()}addService({id:t,icon:e,in:r,title:n,iconText:i}){if(this.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(this.registeredIds[r]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[r]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(iQe)}addJunction({id:t,in:e}){this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(aQe)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:r,title:n}){if(this.registeredIds?.[t]!==void 0)throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(this.registeredIds?.[r]===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[r]==="node")throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:n,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!Vve(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(r)}`);if(!Vve(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(n)}`);if(this.nodes[t]===void 0&&this.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[e]===void 0&&this.groups[e]===void 0)throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);let u=this.nodes[t].in,h=this.nodes[e].in;if(s&&u&&h&&u==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&&u&&h&&u==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.`);let f={lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:o,title:l};this.edges.push(f),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let t={},e=Object.entries(this.nodes).reduce((o,[l,u])=>(o[l]=u.edges.reduce((h,f)=>{let d=this.getNode(f.lhsId)?.in,p=this.getNode(f.rhsId)?.in;if(d&&p&&d!==p){let g=nQe(f.lhsDir,f.rhsDir);g!=="bend"&&(t[d]??={},t[d][p]=g,t[p]??={},t[p][d]=g)}if(f.lhsId===l){let g=LB(f.lhsDir,f.rhsDir);g&&(h[g]=f.rhsId)}else{let g=LB(f.rhsDir,f.lhsDir);g&&(h[g]=f.lhsId)}return h},{}),o),{}),r=Object.keys(e)[0],n={[r]:1},i=Object.keys(e).reduce((o,l)=>l===r?o:{...o,[l]:1},{}),a=x(o=>{let l={[o]:[0,0]},u=[o];for(;u.length>0;){let h=u.shift();if(h){n[h]=1,delete i[h];let f=e[h],[d,p]=l[h];Object.entries(f).forEach(([g,m])=>{n[m]||(l[m]=tQe([d,p],g),u.push(m))})}}return l},"BFS"),s=[a(r)];for(;Object.keys(i).length>0;)s.push(a(Object.keys(i)[0]));this.dataStructures={adjList:e,spatialMaps:s,groupAlignments:t}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return Qn({...sQe,...or().architecture})}getConfigField(t){return this.getConfig()[t]}},oQe=x((t,e)=>{io(t,e),t.groups.map(r=>e.addGroup(r)),t.services.map(r=>e.addService({...r,type:"service"})),t.junctions.map(r=>e.addJunction({...r,type:"junction"})),t.edges.map(r=>e.addEdge(r))},"populateDb"),Wve={parser:{yy:void 0},parse:x(async t=>{let e=await ds("architecture",t);J.debug(e);let r=Wve.parser?.yy;if(!(r instanceof qve))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");oQe(e,r)},"parse")},lQe=x(t=>` .edge { stroke-width: ${t.archEdgeWidth}; stroke: ${t.archEdgeColor}; fill: none; } .arrow { fill: ${t.archEdgeArrowColor}; } .node-bkg { fill: none; stroke: ${t.archGroupBorderColor}; stroke-width: ${t.archGroupBorderWidth}; stroke-dasharray: 8; } .node-icon-text { display: flex; align-items: center; } .node-icon-text > div { color: #fff; margin: 1px; height: fit-content; text-align: center; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; } `,"getStyles"),cQe=lQe,q1=x(t=>`${t}`,"wrapIcon"),Qb={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:q1('')},server:{body:q1('')},disk:{body:q1('')},internet:{body:q1('')},cloud:{body:q1('')},unknown:V_,blank:{body:q1("")}}},uQe=x(async function(t,e,r){let n=r.getConfigField("padding"),i=r.getConfigField("iconSize"),a=i/2,s=i/6,o=s/2;await Promise.all(e.edges().map(async l=>{let{source:u,sourceDir:h,sourceArrow:f,sourceGroup:d,target:p,targetDir:g,targetArrow:m,targetGroup:v,label:y}=Uve(l),{x:b,y:w}=l[0].sourceEndpoint(),{x:S,y:T}=l[0].midpoint(),{x:E,y:A}=l[0].targetEndpoint(),C=n+4;if(d&&(ms(h)?b+=h==="L"?-C:C:w+=h==="T"?-C:C+18),v&&(ms(g)?E+=g==="L"?-C:C:A+=g==="T"?-C:C+18),!d&&r.getNode(u)?.type==="junction"&&(ms(h)?b+=h==="L"?a:-a:w+=h==="T"?a:-a),!v&&r.getNode(p)?.type==="junction"&&(ms(g)?E+=g==="L"?a:-a:A+=g==="T"?a:-a),l[0]._private.rscratch){let I=t.insert("g");if(I.insert("path").attr("d",`M ${b},${w} L ${S},${T} L${E},${A} `).attr("class","edge"),f){let M=ms(h)?zS[h](b,s):b-o,R=qf(h)?zS[h](w,s):w-o;I.insert("polygon").attr("points",Gve[h](s)).attr("transform",`translate(${M},${R})`).attr("class","arrow")}if(m){let M=ms(g)?zS[g](E,s):E-o,R=qf(g)?zS[g](A,s):A-o;I.insert("polygon").attr("points",Gve[g](s)).attr("transform",`translate(${M},${R})`).attr("class","arrow")}if(y){let M=RB(h,g)?"XY":ms(h)?"X":"Y",R=0;M==="X"?R=Math.abs(b-E):M==="Y"?R=Math.abs(w-A)/1.5:R=Math.abs(b-E)/2;let k=I.append("g");if(await ra(k,y,{useHtmlLabels:!1,width:R,classes:"architecture-service-label"},we()),k.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),M==="X")k.attr("transform","translate("+S+", "+T+")");else if(M==="Y")k.attr("transform","translate("+S+", "+T+") rotate(-90)");else if(M==="XY"){let L=LB(h,g);if(L&&JZe(L)){let _=k.node().getBoundingClientRect(),[D,N]=rQe(L);k.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*D*N*45})`);let O=k.node().getBoundingClientRect();k.attr("transform",` translate(${S}, ${T-_.height/2}) translate(${D*O.width/2}, ${N*O.height/2}) rotate(${-1*D*N*45}, 0, ${_.height/2}) `)}}}}}))},"drawEdges"),hQe=x(async function(t,e,r){let i=r.getConfigField("padding")*.75,a=r.getConfigField("fontSize"),o=r.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async l=>{let u=W1(l);if(u.type==="group"){let{h,w:f,x1:d,y1:p}=l.boundingBox();t.append("rect").attr("x",d+o).attr("y",p+o).attr("width",f).attr("height",h).attr("class","node-bkg");let g=t.append("g"),m=d,v=p;if(u.icon){let y=g.append("g");y.html(`${await pc(u.icon,{height:i,width:i,fallbackPrefix:Qb.prefix})}`),y.attr("transform","translate("+(m+o+1)+", "+(v+o+1)+")"),m+=i,v+=a/2-1-2}if(u.label){let y=g.append("g");await ra(y,u.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},we()),y.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),y.attr("transform","translate("+(m+o+4)+", "+(v+o+2)+")")}}}))},"drawGroups"),fQe=x(async function(t,e,r){let n=we();for(let i of r){let a=e.append("g"),s=t.getConfigField("iconSize");if(i.title){let h=a.append("g");await ra(h,i.title,{useHtmlLabels:!1,width:s*1.5,classes:"architecture-service-label"},n),h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),h.attr("transform","translate("+s/2+", "+s+")")}let o=a.append("g");if(i.icon)o.html(`${await pc(i.icon,{height:s,width:s,fallbackPrefix:Qb.prefix})}`);else if(i.iconText){o.html(`${await pc("blank",{height:s,width:s,fallbackPrefix:Qb.prefix})}`);let d=o.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html(ar(i.iconText,n)),p=parseInt(window.getComputedStyle(d.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;d.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/p)};`)}else o.append("path").attr("class","node-bkg").attr("id","node-"+i.id).attr("d",`M0 ${s} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 Z`);a.attr("class","architecture-service");let{width:l,height:u}=a._groups[0][0].getBBox();i.width=l,i.height=u,t.setElementForId(i.id,a)}return 0},"drawServices"),dQe=x(function(t,e,r){r.forEach(n=>{let i=e.append("g"),a=t.getConfigField("iconSize");i.append("g").append("rect").attr("id","node-"+n.id).attr("fill-opacity","0").attr("width",a).attr("height",a),i.attr("class","architecture-junction");let{width:o,height:l}=i._groups[0][0].getBBox();i.width=o,i.height=l,t.setElementForId(n.id,i)})},"drawJunctions");ew([{name:Qb.prefix,icons:Qb}]);$o.use(Hve.default);x(Yve,"addServices");x(Xve,"addJunctions");x(jve,"positionNodes");x(Kve,"addGroups");x(Zve,"addEdges");x(Qve,"getAlignments");x(Jve,"getRelativeConstraints");x(eye,"layoutArchitecture");pQe=x(async(t,e,r,n)=>{let i=n.db,a=i.getServices(),s=i.getJunctions(),o=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),h=Bi(e),f=h.append("g");f.attr("class","architecture-edges");let d=h.append("g");d.attr("class","architecture-services");let p=h.append("g");p.attr("class","architecture-groups"),await fQe(i,d,a),dQe(i,d,s);let g=await eye(a,s,o,l,i,u);await uQe(f,g,i),await hQe(p,g,i),jve(i,g),cu(void 0,h,i.getConfigField("padding"),i.getConfigField("useMaxWidth"))},"draw"),gQe={draw:pQe},mQe={parser:Wve,get db(){return new qve},renderer:gQe,styles:cQe}});var sye={};hr(sye,{diagram:()=>CQe});function iye(t){if(!t.length)return[];let e=[],r=[];return t.forEach(n=>{let i={name:n.name,children:n.type==="Leaf"?void 0:[]};for(i.classSelector=n?.classSelector,n?.cssCompiledStyles&&(i.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(i.value=n.value);r.length>0&&r[r.length-1].level>=n.level;)r.pop();if(r.length===0)e.push(i);else{let a=r[r.length-1].node;a.children?a.children.push(i):a.children=[i]}n.type!=="Leaf"&&r.push({node:i,level:n.level})}),e}var nye,vQe,yQe,aye,xQe,H1,Jb,bQe,wQe,TQe,kQe,EQe,SQe,CQe,oye=F(()=>{ac();Yo();Ka();f0();hn();vr();rr();Of();cr();nye=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Er,this.getAccTitle=Cr,this.setDiagramTitle=Dr,this.getDiagramTitle=Lr,this.getAccDescription=_r,this.setAccDescription=Ar}static{x(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let t=sr,e=or();return Qn({...t.treemap,...e.treemap??{}})}addNode(t,e){this.nodes.push(t),this.levels.set(t,e),e===0&&(this.outerNodes.push(t),this.root??=t)}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,e){let r=this.classes.get(t)??{id:t,styles:[],textStyles:[]},n=e.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/ยงยงยง/g,",").split(";");n&&n.forEach(i=>{xy(i)&&(r?.textStyles?r.textStyles.push(i):r.textStyles=[i]),r?.styles?r.styles.push(i):r.styles=[i]}),this.classes.set(t,r)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){mr(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};x(iye,"buildHierarchy");vQe=x((t,e)=>{io(t,e);let r=[];for(let a of t.TreemapRows??[])a.$type==="ClassDefStatement"&&e.addClass(a.className??"",a.styleText??"");for(let a of t.TreemapRows??[]){let s=a.item;if(!s)continue;let o=a.indent?parseInt(a.indent):0,l=yQe(s),u=s.classSelector?e.getStylesForClass(s.classSelector):[],h=u.length>0?u.join(";"):void 0,f={level:o,name:l,type:s.$type,value:s.value,classSelector:s.classSelector,cssCompiledStyles:h};r.push(f)}let n=iye(r),i=x((a,s)=>{for(let o of a)e.addNode(o,s),o.children&&o.children.length>0&&i(o.children,s+1)},"addNodesRecursively");i(n,0)},"populate"),yQe=x(t=>t.name?String(t.name):"","getItemName"),aye={parser:{yy:void 0},parse:x(async t=>{try{let r=await ds("treemap",t);J.debug("Treemap AST:",r);let n=aye.parser?.yy;if(!(n instanceof nye))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");vQe(r,n)}catch(e){throw J.error("Error parsing treemap:",e),e}},"parse")},xQe=10,H1=10,Jb=25,bQe=x((t,e,r,n)=>{let i=n.db,a=i.getConfig(),s=a.padding??xQe,o=i.getDiagramTitle(),l=i.getRoot(),{themeVariables:u}=or();if(!l)return;let h=o?30:0,f=Bi(e),d=a.nodeWidth?a.nodeWidth*H1:960,p=a.nodeHeight?a.nodeHeight*H1:500,g=d,m=p+h;f.attr("viewBox",`0 0 ${g} ${m}`),un(f,m,g,a.useMaxWidth);let v;try{let _=a.valueFormat||",";if(_==="$0,0")v=x(D=>"$"+Jl(",")(D),"valueFormat");else if(_.startsWith("$")&&_.includes(",")){let D=/\.\d+/.exec(_),N=D?D[0]:"";v=x(O=>"$"+Jl(","+N)(O),"valueFormat")}else if(_.startsWith("$")){let D=_.substring(1);v=x(N=>"$"+Jl(D||"")(N),"valueFormat")}else v=Jl(_)}catch(_){J.error("Error creating format function:",_),v=Jl(",")}let y=Ys().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),b=Ys().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),w=Ys().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);o&&f.append("text").attr("x",g/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(o);let S=f.append("g").attr("transform",`translate(0, ${h})`).attr("class","treemapContainer"),T=vp(l).sum(_=>_.value??0).sort((_,D)=>(D.value??0)-(_.value??0)),A=_A().size([d,p]).paddingTop(_=>_.children&&_.children.length>0?Jb+H1:0).paddingInner(s).paddingLeft(_=>_.children&&_.children.length>0?H1:0).paddingRight(_=>_.children&&_.children.length>0?H1:0).paddingBottom(_=>_.children&&_.children.length>0?H1:0).round(!0)(T),C=A.descendants().filter(_=>_.children&&_.children.length>0),I=S.selectAll(".treemapSection").data(C).enter().append("g").attr("class","treemapSection").attr("transform",_=>`translate(${_.x0},${_.y0})`);I.append("rect").attr("width",_=>_.x1-_.x0).attr("height",Jb).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",_=>_.depth===0?"display: none;":""),I.append("clipPath").attr("id",(_,D)=>`clip-section-${e}-${D}`).append("rect").attr("width",_=>Math.max(0,_.x1-_.x0-12)).attr("height",Jb),I.append("rect").attr("width",_=>_.x1-_.x0).attr("height",_=>_.y1-_.y0).attr("class",(_,D)=>`treemapSection section${D}`).attr("fill",_=>y(_.data.name)).attr("fill-opacity",.6).attr("stroke",_=>b(_.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",_=>{if(_.depth===0)return"display: none;";let D=_t({cssCompiledStyles:_.data.cssCompiledStyles});return D.nodeStyles+";"+D.borderStyles.join(";")}),I.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",Jb/2).attr("dominant-baseline","middle").text(_=>_.depth===0?"":_.data.name).attr("font-weight","bold").attr("style",_=>{if(_.depth===0)return"display: none;";let D="dominant-baseline: middle; font-size: 12px; fill:"+w(_.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",N=_t({cssCompiledStyles:_.data.cssCompiledStyles});return D+N.labelStyles.replace("color:","fill:")}).each(function(_){if(_.depth===0)return;let D=He(this),N=_.data.name;D.text(N);let O=_.x1-_.x0,P=6,B;a.showValues!==!1&&_.value?B=O-10-30-10-P:B=O-P-6;let $=Math.max(15,B),U=D.node();if(U.getComputedTextLength()>$){let ee="...",Y=N;for(;Y.length>0;){if(Y=N.substring(0,Y.length-1),Y.length===0){D.text(ee),U.getComputedTextLength()>$&&D.text("");break}if(D.text(Y+ee),U.getComputedTextLength()<=$)break}}}),a.showValues!==!1&&I.append("text").attr("class","treemapSectionValue").attr("x",_=>_.x1-_.x0-10).attr("y",Jb/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(_=>_.value?v(_.value):"").attr("font-style","italic").attr("style",_=>{if(_.depth===0)return"display: none;";let D="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+w(_.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",N=_t({cssCompiledStyles:_.data.cssCompiledStyles});return D+N.labelStyles.replace("color:","fill:")});let M=A.leaves(),R=S.selectAll(".treemapLeafGroup").data(M).enter().append("g").attr("class",(_,D)=>`treemapNode treemapLeafGroup leaf${D}${_.data.classSelector?` ${_.data.classSelector}`:""}x`).attr("transform",_=>`translate(${_.x0},${_.y0})`);R.append("rect").attr("width",_=>_.x1-_.x0).attr("height",_=>_.y1-_.y0).attr("class","treemapLeaf").attr("fill",_=>_.parent?y(_.parent.data.name):y(_.data.name)).attr("style",_=>_t({cssCompiledStyles:_.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",_=>_.parent?y(_.parent.data.name):y(_.data.name)).attr("stroke-width",3),R.append("clipPath").attr("id",(_,D)=>`clip-${e}-${D}`).append("rect").attr("width",_=>Math.max(0,_.x1-_.x0-4)).attr("height",_=>Math.max(0,_.y1-_.y0-4)),R.append("text").attr("class","treemapLabel").attr("x",_=>(_.x1-_.x0)/2).attr("y",_=>(_.y1-_.y0)/2).attr("style",_=>{let D="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+w(_.data.name)+";",N=_t({cssCompiledStyles:_.data.cssCompiledStyles});return D+N.labelStyles.replace("color:","fill:")}).attr("clip-path",(_,D)=>`url(#clip-${e}-${D})`).text(_=>_.data.name).each(function(_){let D=He(this),N=_.x1-_.x0,O=_.y1-_.y0,P=D.node(),B=4,G=N-2*B,$=O-2*B;if(G<10||$<10){D.style("display","none");return}let U=parseInt(D.style("font-size"),10),X=8,ee=28,Y=.6,oe=6,Q=2;for(;P.getComputedTextLength()>G&&U>X;)U--,D.style("font-size",`${U}px`);let ue=Math.max(oe,Math.min(ee,Math.round(U*Y))),re=U+Q+ue;for(;re>$&&U>X&&(U--,ue=Math.max(oe,Math.min(ee,Math.round(U*Y))),!(ue$;D.style("font-size",`${U}px`),(P.getComputedTextLength()>G||U(D.x1-D.x0)/2).attr("y",function(D){return(D.y1-D.y0)/2}).attr("style",D=>{let N="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+w(D.data.name)+";",O=_t({cssCompiledStyles:D.data.cssCompiledStyles});return N+O.labelStyles.replace("color:","fill:")}).attr("clip-path",(D,N)=>`url(#clip-${e}-${N})`).text(D=>D.value?v(D.value):"").each(function(D){let N=He(this),O=this.parentNode;if(!O){N.style("display","none");return}let P=He(O).select(".treemapLabel");if(P.empty()||P.style("display")==="none"){N.style("display","none");return}let B=parseFloat(P.style("font-size")),G=28,$=.6,U=6,X=2,ee=Math.max(U,Math.min(G,Math.round(B*$)));N.style("font-size",`${ee}px`);let oe=(D.y1-D.y0)/2+B/2+X;N.attr("y",oe);let Q=D.x1-D.x0,te=D.y1-D.y0-4,Z=Q-2*4;N.node().getComputedTextLength()>Z||oe+ee>te||ee{let e=Qn(kQe,t);return` .treemapNode.section { stroke: ${e.sectionStrokeColor}; stroke-width: ${e.sectionStrokeWidth}; fill: ${e.sectionFillColor}; } .treemapNode.leaf { stroke: ${e.leafStrokeColor}; stroke-width: ${e.leafStrokeWidth}; fill: ${e.leafFillColor}; } .treemapLabel { fill: ${e.labelColor}; font-size: ${e.labelFontSize}; } .treemapValue { fill: ${e.valueColor}; font-size: ${e.valueFontSize}; } .treemapTitle { fill: ${e.titleColor}; font-size: ${e.titleFontSize}; } `},"getStyles"),SQe=EQe,CQe={parser:aye,get db(){return new nye},renderer:TQe,styles:SQe}});JS();ac();vy();Go();Io();Ks();Ls();ja();Ka();na();hn();vr();rr();$_();cr();var Sk="comm",Ck="rule",Ak="decl";var Xce="@import";var jce="@namespace",Kce="@keyframes";var Zce="@layer";var iN=Math.abs,V2=String.fromCharCode;function _k(t){return t.trim()}function U2(t,e,r){return t.replace(e,r)}function Qce(t,e,r){return t.indexOf(e,r)}function wf(t,e){return t.charCodeAt(e)|0}function Tf(t,e,r){return t.slice(e,r)}function no(t){return t.length}function Jce(t){return t.length}function Wg(t,e){return e.push(t),t}var Lk=1,Hg=1,eue=0,Vo=0,xi=0,Xg="";function Rk(t,e,r,n,i,a,s,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:Lk,column:Hg,length:s,return:"",siblings:o}}function tue(){return xi}function rue(){return xi=Vo>0?wf(Xg,--Vo):0,Hg--,xi===10&&(Hg=1,Lk--),xi}function Uo(){return xi=Vo2||Yg(xi)>3?"":" "}function sue(t,e){for(;--e&&Uo()&&!(xi<48||xi>102||xi>57&&xi<65||xi>70&&xi<97););return Ik(t,q2()+(e<6&&Bu()==32&&Uo()==32))}function aN(t){for(;Uo();)switch(xi){case t:return Vo;case 34:case 39:t!==34&&t!==39&&aN(xi);break;case 40:t===41&&aN(t);break;case 92:Uo();break}return Vo}function oue(t,e){for(;Uo()&&t+xi!==57;)if(t+xi===84&&Bu()===47)break;return"/*"+Ik(e,Vo-1)+"*"+V2(t===47?t:Uo())}function lue(t){for(;!Yg(Bu());)Uo();return Ik(t,Vo)}function hue(t){return iue(Dk("",null,null,null,[""],t=nue(t),0,[0],t))}function Dk(t,e,r,n,i,a,s,o,l){for(var u=0,h=0,f=s,d=0,p=0,g=0,m=1,v=1,y=1,b=0,w="",S=i,T=a,E=n,A=w;v;)switch(g=b,b=Uo()){case 40:if(g!=108&&wf(A,f-1)==58){Qce(A+=U2(Nk(b),"&","&\f"),"&\f",iN(u?o[u-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:A+=Nk(b);break;case 9:case 10:case 13:case 32:A+=aue(g);break;case 92:A+=sue(q2()-1,7);continue;case 47:switch(Bu()){case 42:case 47:Wg(XFe(oue(Uo(),q2()),e,r,l),l),(Yg(g||1)==5||Yg(Bu()||1)==5)&&no(A)&&Tf(A,-1,void 0)!==" "&&(A+=" ");break;default:A+="/"}break;case 123*m:o[u++]=no(A)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+h:y==-1&&(A=U2(A,/\f/g,"")),p>0&&(no(A)-f||m===0&&g===47)&&Wg(p>32?uue(A+";",n,r,f-1,l):uue(U2(A," ","")+";",n,r,f-2,l),l);break;case 59:A+=";";default:if(Wg(E=cue(A,e,r,u,h,i,o,w,S=[],T=[],f,a),a),b===123)if(h===0)Dk(A,e,E,E,S,a,f,o,T);else{switch(d){case 99:if(wf(A,3)===110)break;case 108:if(wf(A,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Dk(t,E,E,n&&Wg(cue(t,E,E,0,0,i,o,w,i,S=[],f,T),T),i,T,f,o,n?S:T):Dk(A,E,E,E,[""],T,0,o,T)}}u=h=p=0,m=y=1,w=A="",f=s;break;case 58:f=1+no(A),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&rue()==125)continue}switch(A+=V2(b),b*m){case 38:y=h>0?1:(A+="\f",-1);break;case 44:o[u++]=(no(A)-1)*y,y=1;break;case 64:Bu()===45&&(A+=Nk(Uo())),d=Bu(),h=f=no(w=A+=lue(q2())),b++;break;case 45:g===45&&no(A)==2&&(m=0)}}return a}function cue(t,e,r,n,i,a,s,o,l,u,h,f){for(var d=i-1,p=i===0?a:[""],g=Jce(p),m=0,v=0,y=0;m0?p[b]+" "+w:U2(w,/&\f/g,p[b])))&&(l[y++]=S);return Rk(t,e,r,i===0?Ck:o,l,u,h,f)}function XFe(t,e,r,n){return Rk(t,e,r,Sk,V2(tue()),Tf(t,2,-2),0,n)}function uue(t,e,r,n,i){return Rk(t,e,r,Ak,Tf(t,0,n),Tf(t,n+1,-1),n,i)}function Mk(t,e){for(var r="",n=0;n/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),_Qe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Cue(),Sue));return{id:fye,diagram:t}},"loader"),LQe={id:fye,detector:AQe,loader:_Qe},RQe=LQe,dye="flowchart",IQe=x((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),NQe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Yk(),Hk));return{id:dye,diagram:t}},"loader"),DQe={id:dye,detector:IQe,loader:NQe},MQe=DQe,pye="flowchart-v2",OQe=x((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),PQe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Yk(),Hk));return{id:pye,diagram:t}},"loader"),BQe={id:pye,detector:OQe,loader:PQe},FQe=BQe,gye="er",$Qe=x(t=>/^\s*erDiagram/.test(t),"detector"),zQe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Iue(),Rue));return{id:gye,diagram:t}},"loader"),GQe={id:gye,detector:$Qe,loader:zQe},VQe=GQe,mye="gitGraph",UQe=x(t=>/^\s*gitGraph/.test(t),"detector"),qQe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ipe(),Rpe));return{id:mye,diagram:t}},"loader"),WQe={id:mye,detector:UQe,loader:qQe},HQe=WQe,vye="gantt",YQe=x(t=>/^\s*gantt/.test(t),"detector"),XQe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Zpe(),Kpe));return{id:vye,diagram:t}},"loader"),jQe={id:vye,detector:YQe,loader:XQe},KQe=jQe,yye="info",ZQe=x(t=>/^\s*info/.test(t),"detector"),QQe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Jpe(),Qpe));return{id:yye,diagram:t}},"loader"),JQe={id:yye,detector:ZQe,loader:QQe},xye="pie",eJe=x(t=>/^\s*pie/.test(t),"detector"),tJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(nge(),rge));return{id:xye,diagram:t}},"loader"),rJe={id:xye,detector:eJe,loader:tJe},bye="quadrantChart",nJe=x(t=>/^\s*quadrantChart/.test(t),"detector"),iJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(bge(),xge));return{id:bye,diagram:t}},"loader"),aJe={id:bye,detector:nJe,loader:iJe},sJe=aJe,wye="xychart",oJe=x(t=>/^\s*xychart(-beta)?/.test(t),"detector"),lJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Vge(),Gge));return{id:wye,diagram:t}},"loader"),cJe={id:wye,detector:oJe,loader:lJe},uJe=cJe,Tye="requirement",hJe=x(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),fJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Wge(),qge));return{id:Tye,diagram:t}},"loader"),dJe={id:Tye,detector:hJe,loader:fJe},pJe=dJe,kye="sequence",gJe=x(t=>/^\s*sequenceDiagram/.test(t),"detector"),mJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ime(),nme));return{id:kye,diagram:t}},"loader"),vJe={id:kye,detector:gJe,loader:mJe},yJe=vJe,Eye="class",xJe=x((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),bJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(cme(),lme));return{id:Eye,diagram:t}},"loader"),wJe={id:Eye,detector:xJe,loader:bJe},TJe=wJe,Sye="classDiagram",kJe=x((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),EJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(hme(),ume));return{id:Sye,diagram:t}},"loader"),SJe={id:Sye,detector:kJe,loader:EJe},CJe=SJe,Cye="state",AJe=x((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),_Je=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Bme(),Pme));return{id:Cye,diagram:t}},"loader"),LJe={id:Cye,detector:AJe,loader:_Je},RJe=LJe,Aye="stateDiagram",IJe=x((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),NJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>($me(),Fme));return{id:Aye,diagram:t}},"loader"),DJe={id:Aye,detector:IJe,loader:NJe},MJe=DJe,_ye="journey",OJe=x(t=>/^\s*journey/.test(t),"detector"),PJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Kme(),jme));return{id:_ye,diagram:t}},"loader"),BJe={id:_ye,detector:OJe,loader:PJe},FJe=BJe,$Je=x((t,e,r)=>{J.debug(`rendering svg for syntax error `);let n=Bi(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),un(n,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"),Lye={draw:$Je},zJe=Lye,GJe={db:{},renderer:Lye,parser:{parse:x(()=>{},"parse")}},VJe=GJe,Rye="flowchart-elk",UJe=x((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),qJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Yk(),Hk));return{id:Rye,diagram:t}},"loader"),WJe={id:Rye,detector:UJe,loader:qJe},HJe=WJe,Iye="timeline",YJe=x(t=>/^\s*timeline/.test(t),"detector"),XJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(d1e(),f1e));return{id:Iye,diagram:t}},"loader"),jJe={id:Iye,detector:YJe,loader:XJe},KJe=jJe,Nye="mindmap",ZJe=x(t=>/^\s*mindmap/.test(t),"detector"),QJe=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(w1e(),b1e));return{id:Nye,diagram:t}},"loader"),JJe={id:Nye,detector:ZJe,loader:QJe},eet=JJe,Dye="kanban",tet=x(t=>/^\s*kanban/.test(t),"detector"),ret=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(E1e(),k1e));return{id:Dye,diagram:t}},"loader"),net={id:Dye,detector:tet,loader:ret},iet=net,Mye="sankey",aet=x(t=>/^\s*sankey(-beta)?/.test(t),"detector"),set=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(j1e(),X1e));return{id:Mye,diagram:t}},"loader"),oet={id:Mye,detector:aet,loader:set},cet=oet,Oye="packet",uet=x(t=>/^\s*packet(-beta)?/.test(t),"detector"),het=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(J1e(),Q1e));return{id:Oye,diagram:t}},"loader"),fet={id:Oye,detector:uet,loader:het},Pye="radar",det=x(t=>/^\s*radar-beta/.test(t),"detector"),pet=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ove(),sve));return{id:Pye,diagram:t}},"loader"),get={id:Pye,detector:det,loader:pet},Bye="block",met=x(t=>/^\s*block(-beta)?/.test(t),"detector"),vet=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Fve(),Bve));return{id:Bye,diagram:t}},"loader"),yet={id:Bye,detector:met,loader:vet},xet=yet,Fye="architecture",bet=x(t=>/^\s*architecture/.test(t),"detector"),wet=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(rye(),tye));return{id:Fye,diagram:t}},"loader"),Tet={id:Fye,detector:bet,loader:wet},ket=Tet,$ye="treemap",Eet=x(t=>/^\s*treemap/.test(t),"detector"),Cet=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(oye(),sye));return{id:$ye,diagram:t}},"loader"),Aet={id:$ye,detector:Eet,loader:Cet},lye=!1,VS=x(()=>{lye||(lye=!0,bv("error",VJe,t=>t.toLowerCase().trim()==="error"),bv("---",{db:{clear:x(()=>{},"clear")},styles:{},renderer:{draw:x(()=>{},"draw")},parser:{parse:x(()=>{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:x(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),q4(HJe,eet,ket),q4(RQe,iet,CJe,TJe,VQe,KQe,JQe,rJe,pJe,yJe,FQe,MQe,KJe,HQe,MJe,RJe,FJe,sJe,cet,fet,uJe,xet,get,Aet))},"addDiagrams"),_et=x(async()=>{J.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(dh).map(async([r,{detector:n,loader:i}])=>{if(i)try{Z4(r)}catch{try{let{diagram:a,id:s}=await i();bv(s,a,n)}catch(a){throw J.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete dh[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){J.error(`Failed to load ${e.length} external diagrams`);for(let r of e)J.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),Let="graphics-document document";function zye(t,e){t.attr("role",Let),e!==""&&t.attr("aria-roledescription",e)}x(zye,"setA11yDiagramInfo");function Gye(t,e,r,n){if(t.insert!==void 0){if(r){let i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){let i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}x(Gye,"addSVGa11yTitleDescription");var NB=class Vye{constructor(e,r,n,i,a){this.type=e,this.text=r,this.db=n,this.parser=i,this.renderer=a}static{x(this,"Diagram")}static async fromText(e,r={}){let n=or(),i=vv(e,n);e=aZ(e)+` `;try{Z4(i)}catch{let u=fz(i);if(!u)throw new h7(`Diagram ${i} not found.`);let{id:h,diagram:f}=await u();bv(h,f)}let{db:a,parser:s,renderer:o,init:l}=Z4(i);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new Vye(i,e,a,s,o)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},cye=[],Ret=x(()=>{cye.forEach(t=>{t()}),cye=[]},"attachFunctions"),Iet=x(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Uye(t){let e=t.match(u7);if(!e)return{text:t,metadata:{}};let r=Lh(e[1],{schema:_h})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}x(Uye,"extractFrontMatter");var Net=x(t=>t.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Det=x(t=>{let{text:e,metadata:r}=Uye(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}},"processFrontmatter"),Met=x(t=>{let e=zt.detectInit(t)??{},r=zt.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:JK(t),directive:e}},"processDirectives");function MB(t){let e=Net(t),r=Det(e),n=Met(r.text),i=Qn(r.config,n.directive);return t=Iet(n.text),{code:t,title:r.title,config:i}}x(MB,"preprocessDiagram");function qye(t){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}x(qye,"toBase64");var Oet=5e4,Pet="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Bet="sandbox",Fet="loose",$et="http://www.w3.org/2000/svg",zet="http://www.w3.org/1999/xlink",Get="http://www.w3.org/1999/xhtml",Vet="100%",Uet="100%",qet="border:0;margin:0;",Wet="margin:0",Het="allow-top-navigation-by-user-activation allow-popups",Yet='The "iframe" tag is not supported by your browser.',Xet=["foreignobject"],jet=["dominant-baseline"];function OB(t){let e=MB(t);return yv(),xz(e.config??{}),e}x(OB,"processAndSetConfigs");async function Wye(t,e){VS();try{let{code:r,config:n}=OB(t);return{diagramType:(await Yye(r)).type,config:n}}catch(r){if(e?.suppressErrors)return!1;throw r}}x(Wye,"parse");var uye=x((t,e,r=[])=>` .${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Ket=x((t,e=new Map)=>{let r="";if(t.themeCSS!==void 0&&(r+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(r+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=` :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let s=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(o=>{lr(o.styles)||s.forEach(l=>{r+=uye(o.id,l,o.styles)}),lr(o.textStyles)||(r+=uye(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),Zet=x((t,e,r,n)=>{let i=Ket(t,r),a=Sz(e,i,t.themeVariables);return Mk(hue(`${n}{${a}}`),fue)},"createUserStyles"),Qet=x((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=As(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),Jet=x((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":Uet,n=qye(`${t}`);return``},"putIntoIFrame"),hye=x((t,e,r,n,i)=>{let a=t.append("div");a.attr("id",r),n&&a.attr("style",n);let s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",$et);return i&&s.attr("xmlns:xlink",i),s.append("g"),t},"appendDivSvgG");function DB(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}x(DB,"sandboxedIframe");var ett=x((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),ttt=x(async function(t,e,r){VS();let n=OB(e);e=n.code;let i=or();J.debug(i),e.length>(i?.maxTextSize??Oet)&&(e=Pet);let a="#"+t,s="i"+t,o="#"+s,l="d"+t,u="#"+l,h=x(()=>{let L=He(d?o:u).node();L&&"remove"in L&&L.remove()},"removeTempElements"),f=He("body"),d=i.securityLevel===Bet,p=i.securityLevel===Fet,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){let k=DB(He(r),s);f=He(k.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=He(r);hye(f,t,l,`font-family: ${g}`,zet)}else{if(ett(document,t,l,s),d){let k=DB(He("body"),s);f=He(k.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=He("body");hye(f,t,l)}let m,v;try{m=await NB.fromText(e,{title:n.title})}catch(k){if(i.suppressErrorRendering)throw h(),k;m=await NB.fromText("error"),v=k}let y=f.select(u).node(),b=m.type,w=y.firstChild,S=w.firstChild,T=m.renderer.getClasses?.(e,m),E=Zet(i,b,T,a),A=document.createElement("style");A.innerHTML=E,w.insertBefore(A,S);try{await m.renderer.draw(e,t,Y1.version,m)}catch(k){throw i.suppressErrorRendering?h():zJe.draw(e,t,Y1.version),k}let C=f.select(`${u} svg`),I=m.db.getAccTitle?.(),M=m.db.getAccDescription?.();Xye(b,C,I,M),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Get);let R=f.select(u).node().innerHTML;if(J.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),R=Qet(R,d,$r(i.arrowMarkerAbsolute)),d){let k=f.select(u+" svg").node();R=Jet(R,k)}else p||(R=oh.sanitize(R,{ADD_TAGS:Xet,ADD_ATTR:jet,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Ret(),v)throw v;return h(),{diagramType:b,svg:R,bindFunctions:m.db.bindFunctions}},"render");function Hye(t={}){let e=Nn({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),mz(e),e?.theme&&e.theme in Xl?e.themeVariables=Xl[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Xl.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?gz(e):f7();X1(r.logLevel),VS()}x(Hye,"initialize");var Yye=x((t,e={})=>{let{code:r}=MB(t);return NB.fromText(r,e)},"getDiagramFromText");function Xye(t,e,r,n){zye(e,t),Gye(e,r,n,e.attr("id"))}x(Xye,"addA11yInfo");var Z0=Object.freeze({render:ttt,parse:Wye,getDiagramFromText:Yye,initialize:Hye,getConfig:or,setConfig:d7,getSiteConfig:f7,updateSiteConfig:vz,reset:x(()=>{yv()},"reset"),globalReset:x(()=>{yv(td)},"globalReset"),defaultConfig:td});X1(or().logLevel);yv(or());var rtt=x((t,e,r)=>{J.warn(t),V5(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"),jye=x(async function(t={querySelector:".mermaid"}){try{await ntt(t)}catch(e){if(V5(e)&&J.error(e.str),ih.parseError&&ih.parseError(e),!t.suppressErrors)throw J.error("Use the suppressErrors option to suppress these errors"),e}},"run"),ntt=x(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let n=Z0.getConfig();J.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");J.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(J.debug("Start On Load: "+n?.startOnLoad),Z0.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new zt.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s,o=[];for(let l of Array.from(i)){if(J.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let u=`mermaid-${a.next()}`;s=l.innerHTML,s=Q5(zt.entityDecode(s)).trim().replace(//gi,"
    ");let h=zt.detectInit(s);h&&J.debug("Detected early reinit: ",h);try{let{svg:f,bindFunctions:d}=await Jye(u,s,l);l.innerHTML=f,t&&await t(u),d&&d(l)}catch(f){rtt(f,o,ih.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Kye=x(function(t){Z0.initialize(t)},"initialize"),itt=x(async function(t,e,r){J.warn("mermaid.init is deprecated. Please use run instead."),t&&Kye(t);let n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await jye(n)},"init"),att=x(async(t,{lazyLoad:e=!0}={})=>{VS(),q4(...t),e===!1&&await _et()},"registerExternalDiagrams"),Zye=x(function(){if(ih.startOnLoad){let{startOnLoad:t}=Z0.getConfig();t&&ih.run().catch(e=>J.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Zye,!1);var stt=x(function(t){ih.parseError=t},"setParseErrorHandler"),GS=[],IB=!1,Qye=x(async()=>{if(!IB){for(IB=!0;GS.length>0;){let t=GS.shift();if(t)try{await t()}catch(e){J.error("Error executing queue",e)}}IB=!1}},"executeQueue"),ott=x(async(t,e)=>new Promise((r,n)=>{let i=x(()=>new Promise((a,s)=>{Z0.parse(t,e).then(o=>{a(o),r(o)},o=>{J.error("Error parsing",o),ih.parseError?.(o),s(o),n(o)})}),"performCall");GS.push(i),Qye().catch(n)}),"parse"),Jye=x((t,e,r)=>new Promise((n,i)=>{let a=x(()=>new Promise((s,o)=>{Z0.render(t,e,r).then(l=>{s(l),n(l)},l=>{J.error("Error parsing",l),ih.parseError?.(l),o(l),i(l)})}),"performCall");GS.push(a),Qye().catch(i)}),"render"),ltt=x(()=>Object.keys(dh).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),ih={startOnLoad:!0,mermaidAPI:Z0,parse:ott,render:Jye,init:itt,run:jye,registerExternalDiagrams:att,registerLayoutLoaders:nN,initialize:Kye,parseError:void 0,contentLoaded:Zye,setParseErrorHandler:stt,detectType:vv,registerIconPacks:ew,getRegisteredDiagramsMetadata:ltt},US=ih;function e2e(){return document.body.classList.contains("vscode-dark")||document.body.classList.contains("vscode-high-contrast")?"dark":"default"}var e4;function ctt(){let t=document.querySelector(".mermaid");if(!t)return;let e=e2e();e4={diagramText:t.textContent??"",theme:e};let r={startOnLoad:!0,theme:e};US.initialize(r)}function utt(){let t=e2e();if(e4?.theme===t)return;let e=document.querySelector(".mermaid");!e||!(e instanceof HTMLElement)||(e4={diagramText:e4?.diagramText??"",theme:t},e.textContent=e4?.diagramText??"",delete e.dataset.processed,US.initialize({theme:t}),US.run({nodes:[e]}))}new MutationObserver(()=>{utt()}).observe(document.body,{attributes:!0,attributeFilter:["class"]});ctt(); /*! Bundled license information: dompurify/dist/purify.es.mjs: (*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE *) mermaid/dist/chunks/mermaid.core/chunk-ZPAFE4SF.mjs: (*! Bundled license information: js-yaml/dist/js-yaml.mjs: (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) *) lodash-es/lodash.js: (** * @license * Lodash (Custom Build) * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) cytoscape/dist/cytoscape.esm.mjs: (*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) Licensed under The MIT License (http://opensource.org/licenses/MIT) *) (*! Event object based on jQuery events, MIT license https://jquery.org/license/ https://tldrlegal.com/license/mit-license https://github.com/jquery/jquery/blob/master/src/event.js *) (*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License *) (*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License *) mermaid/dist/mermaid.core.mjs: (*! Check if previously processed *) (*! * Wait for document loaded before starting the execution *) */