blog-admin/public/mermaid.min.js

2152 lines
2.2 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters

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

"use strict";var __esbuild_esm_mermaid=(()=>{var B1e=Object.create;var T1=Object.defineProperty;var F1e=Object.getOwnPropertyDescriptor;var z1e=Object.getOwnPropertyNames;var $1e=Object.getPrototypeOf,G1e=Object.prototype.hasOwnProperty;var s=(t,e)=>T1(t,"name",{value:e,configurable:!0});var _=(t,e)=>()=>(t&&(e=t(t=0)),e);var is=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ur=(t,e)=>{for(var r in e)T1(t,r,{get:e[r],enumerable:!0})},ob=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of z1e(e))!G1e.call(t,i)&&i!==r&&T1(t,i,{get:()=>e[i],enumerable:!(n=F1e(e,i))||n.enumerable});return t},lr=(t,e,r)=>(ob(t,e,"default"),r&&ob(r,e,"default")),ka=(t,e,r)=>(r=t!=null?B1e($1e(t)):{},ob(e||!t||!t.__esModule?T1(r,"default",{value:t,enumerable:!0}):r,t)),V1e=t=>ob(T1({},"__esModule",{value:!0}),t);function lb(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(l,u){var h=u.match(/\n([\t ]+|(?!\s).)/g);return h?l.concat(h.map(function(f){var d,p;return(p=(d=f.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):l},[]);if(i.length){var a=new RegExp(`
[ ]{`+Math.min.apply(Math,i)+"}","g");n=n.map(function(l){return l.replace(a,`
`)})}n[0]=n[0].replace(/^\r?\n/,"");var o=n[0];return e.forEach(function(l,u){var h=o.match(/(?:^|\n)( *)$/),f=h?h[1]:"",d=l;typeof l=="string"&&l.includes(`
`)&&(d=String(l).split(`
`).map(function(p,m){return m===0?p:""+f+p}).join(`
`)),o+=d+n[u+1]}),o}var Y7=_(()=>{"use strict";s(lb,"dedent")});var cb=is((X7,j7)=>{"use strict";(function(t,e){typeof X7=="object"&&typeof j7<"u"?j7.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(X7,function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",o="hour",l="day",u="week",h="month",f="quarter",d="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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:s(function(L){var P=["th","st","nd","rd"],M=L%100;return"["+L+(P[(M-20)%10]||P[M]||P[0])+"]"},"ordinal")},x=s(function(L,P,M){var F=String(L);return!F||F.length>=P?L:""+Array(P+1-F.length).join(M)+L},"m"),b={s:x,z:s(function(L){var P=-L.utcOffset(),M=Math.abs(P),F=Math.floor(M/60),I=M%60;return(P<=0?"+":"-")+x(F,2,"0")+":"+x(I,2,"0")},"z"),m:s(function L(P,M){if(P.date()<M.date())return-L(M,P);var F=12*(M.year()-P.year())+(M.month()-P.month()),I=P.clone().add(F,h),O=M-I<0,z=P.clone().add(F+(O?-1:1),h);return+(-(F+(M-I)/(O?I-z:z-I))||0)},"t"),a:s(function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},"a"),p:s(function(L){return{M:h,y:d,w:u,d:l,D:p,h:o,m:a,s:i,ms:n,Q:f}[L]||String(L||"").toLowerCase().replace(/s$/,"")},"p"),u:s(function(L){return L===void 0},"u")},k="en",A={};A[k]=v;var w="$isDayjsObject",T=s(function(L){return L instanceof R||!(!L||!L[w])},"S"),C=s(function L(P,M,F){var I;if(!P)return k;if(typeof P=="string"){var O=P.toLowerCase();A[O]&&(I=O),M&&(A[O]=M,I=O);var z=P.split("-");if(!I&&z.length>1)return L(z[0])}else{var N=P.name;A[N]=P,I=N}return!F&&I&&(k=I),I||!F&&k},"t"),E=s(function(L,P){if(T(L))return L.clone();var M=typeof P=="object"?P:{};return M.date=L,M.args=arguments,new R(M)},"O"),S=b;S.l=C,S.i=T,S.w=function(L,P){return E(L,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var R=function(){function L(M){this.$L=C(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[w]=!0}s(L,"M");var P=L.prototype;return P.parse=function(M){this.$d=function(F){var I=F.date,O=F.utc;if(I===null)return new Date(NaN);if(S.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var z=I.match(g);if(z){var N=z[2]-1||0,U=(z[7]||"0").substring(0,3);return O?new Date(Date.UTC(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)):new Date(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)}}return new Date(I)}(M),this.init()},P.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},P.$utils=function(){return S},P.isValid=function(){return this.$d.toString()!==m},P.isSame=function(M,F){var I=E(M);return this.startOf(F)<=I&&I<=this.endOf(F)},P.isAfter=function(M,F){return E(M)<this.startOf(F)},P.isBefore=function(M,F){return this.endOf(F)<E(M)},P.$g=function(M,F,I){return S.u(M)?this[F]:this.set(I,M)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(M,F){var I=this,O=!!S.u(F)||F,z=S.p(M),N=s(function(fe,ne){var H=S.w(I.$u?Date.UTC(I.$y,ne,fe):new Date(I.$y,ne,fe),I);return O?H:H.endOf(l)},"l"),U=s(function(fe,ne){return S.w(I.toDate()[fe].apply(I.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(ne)),I)},"$"),$=this.$W,W=this.$M,ee=this.$D,te="set"+(this.$u?"UTC":"");switch(z){case d:return O?N(1,0):N(31,11);case h:return O?N(1,W):N(0,W+1);case u:var ce=this.$locale().weekStart||0,Z=($<ce?$+7:$)-ce;return N(O?ee-Z:ee+(6-Z),W);case l:case p:return U(te+"Hours",0);case o:return U(te+"Minutes",1);case a:return U(te+"Seconds",2);case i:return U(te+"Milliseconds",3);default:return this.clone()}},P.endOf=function(M){return this.startOf(M,!1)},P.$set=function(M,F){var I,O=S.p(M),z="set"+(this.$u?"UTC":""),N=(I={},I[l]=z+"Date",I[p]=z+"Date",I[h]=z+"Month",I[d]=z+"FullYear",I[o]=z+"Hours",I[a]=z+"Minutes",I[i]=z+"Seconds",I[n]=z+"Milliseconds",I)[O],U=O===l?this.$D+(F-this.$W):F;if(O===h||O===d){var $=this.clone().set(p,1);$.$d[N](U),$.init(),this.$d=$.set(p,Math.min(this.$D,$.daysInMonth())).$d}else N&&this.$d[N](U);return this.init(),this},P.set=function(M,F){return this.clone().$set(M,F)},P.get=function(M){return this[S.p(M)]()},P.add=function(M,F){var I,O=this;M=Number(M);var z=S.p(F),N=s(function(W){var ee=E(O);return S.w(ee.date(ee.date()+Math.round(W*M)),O)},"y");if(z===h)return this.set(h,this.$M+M);if(z===d)return this.set(d,this.$y+M);if(z===l)return N(1);if(z===u)return N(7);var U=(I={},I[a]=e,I[o]=r,I[i]=t,I)[z]||1,$=this.$d.getTime()+M*U;return S.w($,this)},P.subtract=function(M,F){return this.add(-1*M,F)},P.format=function(M){var F=this,I=this.$locale();if(!this.isValid())return I.invalidDate||m;var O=M||"YYYY-MM-DDTHH:mm:ssZ",z=S.z(this),N=this.$H,U=this.$m,$=this.$M,W=I.weekdays,ee=I.months,te=I.meridiem,ce=s(function(ne,H,Q,K){return ne&&(ne[H]||ne(F,O))||Q[H].slice(0,K)},"h"),Z=s(function(ne){return S.s(N%12||12,ne,"0")},"d"),fe=te||function(ne,H,Q){var K=ne<12?"AM":"PM";return Q?K.toLowerCase():K};return O.replace(y,function(ne,H){return H||function(Q){switch(Q){case"YY":return String(F.$y).slice(-2);case"YYYY":return S.s(F.$y,4,"0");case"M":return $+1;case"MM":return S.s($+1,2,"0");case"MMM":return ce(I.monthsShort,$,ee,3);case"MMMM":return ce(ee,$);case"D":return F.$D;case"DD":return S.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return ce(I.weekdaysMin,F.$W,W,2);case"ddd":return ce(I.weekdaysShort,F.$W,W,3);case"dddd":return W[F.$W];case"H":return String(N);case"HH":return S.s(N,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return fe(N,U,!0);case"A":return fe(N,U,!1);case"m":return String(U);case"mm":return S.s(U,2,"0");case"s":return String(F.$s);case"ss":return S.s(F.$s,2,"0");case"SSS":return S.s(F.$ms,3,"0");case"Z":return z}return null}(ne)||z.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(M,F,I){var O,z=this,N=S.p(F),U=E(M),$=(U.utcOffset()-this.utcOffset())*e,W=this-U,ee=s(function(){return S.m(z,U)},"D");switch(N){case d:O=ee()/12;break;case h:O=ee();break;case f:O=ee()/3;break;case u:O=(W-$)/6048e5;break;case l:O=(W-$)/864e5;break;case o:O=W/r;break;case a:O=W/e;break;case i:O=W/t;break;default:O=W}return I?O:S.a(O)},P.daysInMonth=function(){return this.endOf(h).$D},P.$locale=function(){return A[this.$L]},P.locale=function(M,F){if(!M)return this.$L;var I=this.clone(),O=C(M,F,!0);return O&&(I.$L=O),I},P.clone=function(){return S.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},L}(),D=R.prototype;return E.prototype=D,[["$ms",n],["$s",i],["$m",a],["$H",o],["$W",l],["$M",h],["$y",d],["$D",p]].forEach(function(L){D[L[1]]=function(P){return this.$g(P,L[0],L[1])}}),E.extend=function(L,P){return L.$i||(L(P,R,E),L.$i=!0),E},E.locale=C,E.isDayjs=T,E.unix=function(L){return E(1e3*L)},E.en=A[k],E.Ls=A,E.p={},E})});var LB,Uc,V,E1,fo,it=_(()=>{"use strict";LB=ka(cb(),1),Uc={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},V={trace:s((...t)=>{},"trace"),debug:s((...t)=>{},"debug"),info:s((...t)=>{},"info"),warn:s((...t)=>{},"warn"),error:s((...t)=>{},"error"),fatal:s((...t)=>{},"fatal")},E1=s(function(t="fatal"){let e=Uc.fatal;typeof t=="string"?t.toLowerCase()in Uc&&(e=Uc[t]):typeof t=="number"&&(e=t),V.trace=()=>{},V.debug=()=>{},V.info=()=>{},V.warn=()=>{},V.error=()=>{},V.fatal=()=>{},e<=Uc.fatal&&(V.fatal=console.error?console.error.bind(console,fo("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",fo("FATAL"))),e<=Uc.error&&(V.error=console.error?console.error.bind(console,fo("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",fo("ERROR"))),e<=Uc.warn&&(V.warn=console.warn?console.warn.bind(console,fo("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",fo("WARN"))),e<=Uc.info&&(V.info=console.info?console.info.bind(console,fo("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",fo("INFO"))),e<=Uc.debug&&(V.debug=console.debug?console.debug.bind(console,fo("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",fo("DEBUG"))),e<=Uc.trace&&(V.trace=console.debug?console.debug.bind(console,fo("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",fo("TRACE")))},"setLogLevel"),fo=s(t=>`%c${(0,LB.default)().format("ss.SSS")} : ${t} : `,"format")});var ub,Df,DB,hb=_(()=>{"use strict";ub=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Df=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,DB=/\s*%%.*\n/gm});var W0,K7=_(()=>{"use strict";W0=class extends Error{static{s(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}}});var Rf,H0,fb,Q7,RB,Mf=_(()=>{"use strict";it();hb();K7();Rf={},H0=s(function(t,e){t=t.replace(ub,"").replace(Df,"").replace(DB,`
`);for(let[r,{detector:n}]of Object.entries(Rf))if(n(t,e))return r;throw new W0(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),fb=s((...t)=>{for(let{id:e,detector:r,loader:n}of t)Q7(e,r,n)},"registerLazyLoadedDiagrams"),Q7=s((t,e,r)=>{Rf[t]&&V.warn(`Detector with key ${t} already exists. Overwriting.`),Rf[t]={detector:e,loader:r},V.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),RB=s(t=>Rf[t].loader,"getDiagramLoader")});var C1,MB,Z7=_(()=>{"use strict";C1=function(){var t=s(function(_e,he,q,se){for(q=q||{},se=_e.length;se--;q[_e[se]]=he);return q},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],o=[1,63],l=[1,64],u=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],m=[1,29],g=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],k=[1,35],A=[1,36],w=[1,37],T=[1,38],C=[1,39],E=[1,40],S=[1,41],R=[1,42],D=[1,43],L=[1,44],P=[1,45],M=[1,46],F=[1,47],I=[1,48],O=[1,50],z=[1,51],N=[1,52],U=[1,53],$=[1,54],W=[1,55],ee=[1,56],te=[1,57],ce=[1,58],Z=[1,59],fe=[1,60],ne=[14,42],H=[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],Q=[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],K=[1,82],re=[1,83],ie=[1,84],ye=[1,85],j=[12,14,42],De=[12,14,33,42],oe=[12,14,33,42,76,77,79,80],Re=[12,33],Pe=[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],Se={trace:s(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:s(function(he,q,se,ue,X,ae,pe){var de=ae.length-1;switch(X){case 3:ue.setDirection("TB");break;case 4:ue.setDirection("BT");break;case 5:ue.setDirection("RL");break;case 6:ue.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:ue.setC4Type(ae[de-3]);break;case 19:ue.setTitle(ae[de].substring(6)),this.$=ae[de].substring(6);break;case 20:ue.setAccDescription(ae[de].substring(15)),this.$=ae[de].substring(15);break;case 21:this.$=ae[de].trim(),ue.setTitle(this.$);break;case 22:case 23:this.$=ae[de].trim(),ue.setAccDescription(this.$);break;case 28:ae[de].splice(2,0,"ENTERPRISE"),ue.addPersonOrSystemBoundary(...ae[de]),this.$=ae[de];break;case 29:ae[de].splice(2,0,"SYSTEM"),ue.addPersonOrSystemBoundary(...ae[de]),this.$=ae[de];break;case 30:ue.addPersonOrSystemBoundary(...ae[de]),this.$=ae[de];break;case 31:ae[de].splice(2,0,"CONTAINER"),ue.addContainerBoundary(...ae[de]),this.$=ae[de];break;case 32:ue.addDeploymentNode("node",...ae[de]),this.$=ae[de];break;case 33:ue.addDeploymentNode("nodeL",...ae[de]),this.$=ae[de];break;case 34:ue.addDeploymentNode("nodeR",...ae[de]),this.$=ae[de];break;case 35:ue.popBoundaryParseStack();break;case 39:ue.addPersonOrSystem("person",...ae[de]),this.$=ae[de];break;case 40:ue.addPersonOrSystem("external_person",...ae[de]),this.$=ae[de];break;case 41:ue.addPersonOrSystem("system",...ae[de]),this.$=ae[de];break;case 42:ue.addPersonOrSystem("system_db",...ae[de]),this.$=ae[de];break;case 43:ue.addPersonOrSystem("system_queue",...ae[de]),this.$=ae[de];break;case 44:ue.addPersonOrSystem("external_system",...ae[de]),this.$=ae[de];break;case 45:ue.addPersonOrSystem("external_system_db",...ae[de]),this.$=ae[de];break;case 46:ue.addPersonOrSystem("external_system_queue",...ae[de]),this.$=ae[de];break;case 47:ue.addContainer("container",...ae[de]),this.$=ae[de];break;case 48:ue.addContainer("container_db",...ae[de]),this.$=ae[de];break;case 49:ue.addContainer("container_queue",...ae[de]),this.$=ae[de];break;case 50:ue.addContainer("external_container",...ae[de]),this.$=ae[de];break;case 51:ue.addContainer("external_container_db",...ae[de]),this.$=ae[de];break;case 52:ue.addContainer("external_container_queue",...ae[de]),this.$=ae[de];break;case 53:ue.addComponent("component",...ae[de]),this.$=ae[de];break;case 54:ue.addComponent("component_db",...ae[de]),this.$=ae[de];break;case 55:ue.addComponent("component_queue",...ae[de]),this.$=ae[de];break;case 56:ue.addComponent("external_component",...ae[de]),this.$=ae[de];break;case 57:ue.addComponent("external_component_db",...ae[de]),this.$=ae[de];break;case 58:ue.addComponent("external_component_queue",...ae[de]),this.$=ae[de];break;case 60:ue.addRel("rel",...ae[de]),this.$=ae[de];break;case 61:ue.addRel("birel",...ae[de]),this.$=ae[de];break;case 62:ue.addRel("rel_u",...ae[de]),this.$=ae[de];break;case 63:ue.addRel("rel_d",...ae[de]),this.$=ae[de];break;case 64:ue.addRel("rel_l",...ae[de]),this.$=ae[de];break;case 65:ue.addRel("rel_r",...ae[de]),this.$=ae[de];break;case 66:ue.addRel("rel_b",...ae[de]),this.$=ae[de];break;case 67:ae[de].splice(0,1),ue.addRel("rel",...ae[de]),this.$=ae[de];break;case 68:ue.updateElStyle("update_el_style",...ae[de]),this.$=ae[de];break;case 69:ue.updateRelStyle("update_rel_style",...ae[de]),this.$=ae[de];break;case 70:ue.updateLayoutConfig("update_layout_config",...ae[de]),this.$=ae[de];break;case 71:this.$=[ae[de]];break;case 72:ae[de].unshift(ae[de-1]),this.$=ae[de];break;case 73:case 75:this.$=ae[de].trim();break;case 74:let Ie={};Ie[ae[de-1].trim()]=ae[de].trim(),this.$=Ie;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:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{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:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{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:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{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:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{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:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{14:[1,74]},t(ne,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:u,38:h,39:f,40:d,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe}),t(ne,[2,14]),t(H,[2,16],{12:[1,76]}),t(ne,[2,36],{12:[1,77]}),t(Q,[2,19]),t(Q,[2,20]),{25:[1,78]},{27:[1,79]},t(Q,[2,23]),{35:80,75:81,76:K,77:re,79:ie,80:ye},{35:86,75:81,76:K,77:re,79:ie,80:ye},{35:87,75:81,76:K,77:re,79:ie,80:ye},{35:88,75:81,76:K,77:re,79:ie,80:ye},{35:89,75:81,76:K,77:re,79:ie,80:ye},{35:90,75:81,76:K,77:re,79:ie,80:ye},{35:91,75:81,76:K,77:re,79:ie,80:ye},{35:92,75:81,76:K,77:re,79:ie,80:ye},{35:93,75:81,76:K,77:re,79:ie,80:ye},{35:94,75:81,76:K,77:re,79:ie,80:ye},{35:95,75:81,76:K,77:re,79:ie,80:ye},{35:96,75:81,76:K,77:re,79:ie,80:ye},{35:97,75:81,76:K,77:re,79:ie,80:ye},{35:98,75:81,76:K,77:re,79:ie,80:ye},{35:99,75:81,76:K,77:re,79:ie,80:ye},{35:100,75:81,76:K,77:re,79:ie,80:ye},{35:101,75:81,76:K,77:re,79:ie,80:ye},{35:102,75:81,76:K,77:re,79:ie,80:ye},{35:103,75:81,76:K,77:re,79:ie,80:ye},{35:104,75:81,76:K,77:re,79:ie,80:ye},t(j,[2,59]),{35:105,75:81,76:K,77:re,79:ie,80:ye},{35:106,75:81,76:K,77:re,79:ie,80:ye},{35:107,75:81,76:K,77:re,79:ie,80:ye},{35:108,75:81,76:K,77:re,79:ie,80:ye},{35:109,75:81,76:K,77:re,79:ie,80:ye},{35:110,75:81,76:K,77:re,79:ie,80:ye},{35:111,75:81,76:K,77:re,79:ie,80:ye},{35:112,75:81,76:K,77:re,79:ie,80:ye},{35:113,75:81,76:K,77:re,79:ie,80:ye},{35:114,75:81,76:K,77:re,79:ie,80:ye},{35:115,75:81,76:K,77:re,79:ie,80:ye},{20:116,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:re,79:ie,80:ye},{35:120,75:81,76:K,77:re,79:ie,80:ye},{35:121,75:81,76:K,77:re,79:ie,80:ye},{35:122,75:81,76:K,77:re,79:ie,80:ye},{35:123,75:81,76:K,77:re,79:ie,80:ye},{35:124,75:81,76:K,77:re,79:ie,80:ye},{35:125,75:81,76:K,77:re,79:ie,80:ye},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ne,[2,15]),t(H,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(ne,[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:o,36:l,37:u,38:h,39:f,40:d,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe}),t(Q,[2,21]),t(Q,[2,22]),t(j,[2,39]),t(De,[2,71],{75:81,35:132,76:K,77:re,79:ie,80:ye}),t(oe,[2,73]),{78:[1,133]},t(oe,[2,75]),t(oe,[2,76]),t(j,[2,40]),t(j,[2,41]),t(j,[2,42]),t(j,[2,43]),t(j,[2,44]),t(j,[2,45]),t(j,[2,46]),t(j,[2,47]),t(j,[2,48]),t(j,[2,49]),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]),t(j,[2,57]),t(j,[2,58]),t(j,[2,60]),t(j,[2,61]),t(j,[2,62]),t(j,[2,63]),t(j,[2,64]),t(j,[2,65]),t(j,[2,66]),t(j,[2,67]),t(j,[2,68]),t(j,[2,69]),t(j,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(Re,[2,28]),t(Re,[2,29]),t(Re,[2,30]),t(Re,[2,31]),t(Re,[2,32]),t(Re,[2,33]),t(Re,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(H,[2,18]),t(ne,[2,38]),t(De,[2,72]),t(oe,[2,74]),t(j,[2,24]),t(j,[2,35]),t(Pe,[2,25]),t(Pe,[2,26],{12:[1,138]}),t(Pe,[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:s(function(he,q){if(q.recoverable)this.trace(he);else{var se=new Error(he);throw se.hash=q,se}},"parseError"),parse:s(function(he){var q=this,se=[0],ue=[],X=[null],ae=[],pe=this.table,de="",Ie=0,Ne=0,Be=0,ze=2,qe=1,Fe=ae.slice.call(arguments,1),we=Object.create(this.lexer),Je={yy:{}};for(var We in this.yy)Object.prototype.hasOwnProperty.call(this.yy,We)&&(Je.yy[We]=this.yy[We]);we.setInput(he,Je.yy),Je.yy.lexer=we,Je.yy.parser=this,typeof we.yylloc>"u"&&(we.yylloc={});var or=we.yylloc;ae.push(or);var Cr=we.options&&we.options.ranges;typeof Je.yy.parseError=="function"?this.parseError=Je.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ut(Bt){se.length=se.length-2*Bt,X.length=X.length-Bt,ae.length=ae.length-Bt}s(Ut,"popStack");function ar(){var Bt;return Bt=ue.pop()||we.lex()||qe,typeof Bt!="number"&&(Bt instanceof Array&&(ue=Bt,Bt=ue.pop()),Bt=q.symbols_[Bt]||Bt),Bt}s(ar,"lex");for(var ut,Rt,Qe,Dt,qt,yt,Et={},pt,Wt,ot,fr;;){if(Qe=se[se.length-1],this.defaultActions[Qe]?Dt=this.defaultActions[Qe]:((ut===null||typeof ut>"u")&&(ut=ar()),Dt=pe[Qe]&&pe[Qe][ut]),typeof Dt>"u"||!Dt.length||!Dt[0]){var vt="";fr=[];for(pt in pe[Qe])this.terminals_[pt]&&pt>ze&&fr.push("'"+this.terminals_[pt]+"'");we.showPosition?vt="Parse error on line "+(Ie+1)+`:
`+we.showPosition()+`
Expecting `+fr.join(", ")+", got '"+(this.terminals_[ut]||ut)+"'":vt="Parse error on line "+(Ie+1)+": Unexpected "+(ut==qe?"end of input":"'"+(this.terminals_[ut]||ut)+"'"),this.parseError(vt,{text:we.match,token:this.terminals_[ut]||ut,line:we.yylineno,loc:or,expected:fr})}if(Dt[0]instanceof Array&&Dt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Qe+", token: "+ut);switch(Dt[0]){case 1:se.push(ut),X.push(we.yytext),ae.push(we.yylloc),se.push(Dt[1]),ut=null,Rt?(ut=Rt,Rt=null):(Ne=we.yyleng,de=we.yytext,Ie=we.yylineno,or=we.yylloc,Be>0&&Be--);break;case 2:if(Wt=this.productions_[Dt[1]][1],Et.$=X[X.length-Wt],Et._$={first_line:ae[ae.length-(Wt||1)].first_line,last_line:ae[ae.length-1].last_line,first_column:ae[ae.length-(Wt||1)].first_column,last_column:ae[ae.length-1].last_column},Cr&&(Et._$.range=[ae[ae.length-(Wt||1)].range[0],ae[ae.length-1].range[1]]),yt=this.performAction.apply(Et,[de,Ne,Ie,Je.yy,Dt[1],X,ae].concat(Fe)),typeof yt<"u")return yt;Wt&&(se=se.slice(0,-1*Wt*2),X=X.slice(0,-1*Wt),ae=ae.slice(0,-1*Wt)),se.push(this.productions_[Dt[1]][0]),X.push(Et.$),ae.push(Et._$),ot=pe[se[se.length-2]][se[se.length-1]],se.push(ot);break;case 3:return!0}}return!0},"parse")},Ue=function(){var _e={EOF:1,parseError:s(function(q,se){if(this.yy.parser)this.yy.parser.parseError(q,se);else throw new Error(q)},"parseError"),setInput:s(function(he,q){return this.yy=q||this.yy||{},this._input=he,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:s(function(){var he=this._input[0];this.yytext+=he,this.yyleng++,this.offset++,this.match+=he,this.matched+=he;var q=he.match(/(?:\r\n?|\n).*/g);return q?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),he},"input"),unput:s(function(he){var q=he.length,se=he.split(/(?:\r\n?|\n)/g);this._input=he+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-q),this.offset-=q;var ue=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),se.length-1&&(this.yylineno-=se.length-1);var X=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:se?(se.length===ue.length?this.yylloc.first_column:0)+ue[ue.length-se.length].length-se[0].length:this.yylloc.first_column-q},this.options.ranges&&(this.yylloc.range=[X[0],X[0]+this.yyleng-q]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(he){this.unput(this.match.slice(he))},"less"),pastInput:s(function(){var he=this.matched.substr(0,this.matched.length-this.match.length);return(he.length>20?"...":"")+he.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var he=this.match;return he.length<20&&(he+=this._input.substr(0,20-he.length)),(he.substr(0,20)+(he.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var he=this.pastInput(),q=new Array(he.length+1).join("-");return he+this.upcomingInput()+`
`+q+"^"},"showPosition"),test_match:s(function(he,q){var se,ue,X;if(this.options.backtrack_lexer&&(X={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&&(X.yylloc.range=this.yylloc.range.slice(0))),ue=he[0].match(/(?:\r\n?|\n).*/g),ue&&(this.yylineno+=ue.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ue?ue[ue.length-1].length-ue[ue.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+he[0].length},this.yytext+=he[0],this.match+=he[0],this.matches=he,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(he[0].length),this.matched+=he[0],se=this.performAction.call(this,this.yy,this,q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),se)return se;if(this._backtrack){for(var ae in X)this[ae]=X[ae];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var he,q,se,ue;this._more||(this.yytext="",this.match="");for(var X=this._currentRules(),ae=0;ae<X.length;ae++)if(se=this._input.match(this.rules[X[ae]]),se&&(!q||se[0].length>q[0].length)){if(q=se,ue=ae,this.options.backtrack_lexer){if(he=this.test_match(se,X[ae]),he!==!1)return he;if(this._backtrack){q=!1;continue}else return!1}else if(!this.options.flex)break}return q?(he=this.test_match(q,X[ue]),he!==!1?he:!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:s(function(){var q=this.next();return q||this.lex()},"lex"),begin:s(function(q){this.conditionStack.push(q)},"begin"),popState:s(function(){var q=this.conditionStack.length-1;return q>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(q){return q=this.conditionStack.length-1-Math.abs(q||0),q>=0?this.conditionStack[q]:"INITIAL"},"topState"),pushState:s(function(q){this.begin(q)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(q,se,ue,X){var ae=X;switch(ue){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 _e}();Se.lexer=Ue;function Oe(){this.yy={}}return s(Oe,"Parser"),Oe.prototype=Se,Se.Parser=Oe,new Oe}();C1.parser=C1;MB=C1});var J7,An,Y0=_(()=>{"use strict";J7=s((t,e,{depth:r=2,clobber:n=!1}={})=>{let i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>J7(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]=J7(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),An=J7});var db,IB,NB=_(()=>{"use strict";db={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:s(t=>t>=255?255:t<0?0:t,"r"),g:s(t=>t>=255?255:t<0?0:t,"g"),b:s(t=>t>=255?255:t<0?0:t,"b"),h:s(t=>t%360,"h"),s:s(t=>t>=100?100:t<0?0:t,"s"),l:s(t=>t>=100?100:t<0?0:t,"l"),a:s(t=>t>=1?1:t<0?0:t,"a")},toLinear:s(t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},"toLinear"),hue2rgb:s((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),"hue2rgb"),hsl2rgb:s(({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 db.hue2rgb(a,i,t+.3333333333333333)*255;case"g":return db.hue2rgb(a,i,t)*255;case"b":return db.hue2rgb(a,i,t-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:s(({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),o=(i+a)/2;if(n==="l")return o*100;if(i===a)return 0;let l=i-a,u=o>.5?l/(2-i-a):l/(i+a);if(n==="s")return u*100;switch(i){case t:return((e-r)/l+(e<r?6:0))*60;case e:return((r-t)/l+2)*60;case r:return((t-e)/l+4)*60;default:return-1}},"rgb2hsl")},IB=db});var U1e,OB,PB=_(()=>{"use strict";U1e={clamp:s((t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),"clamp"),round:s(t=>Math.round(t*1e10)/1e10,"round")},OB=U1e});var q1e,BB,FB=_(()=>{"use strict";q1e={dec2hex:s(t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`},"dec2hex")},BB=q1e});var W1e,Ct,Ol=_(()=>{"use strict";NB();PB();FB();W1e={channel:IB,lang:OB,unit:BB},Ct=W1e});var qc,ki,S1=_(()=>{"use strict";Ol();qc={};for(let t=0;t<=255;t++)qc[t]=Ct.unit.dec2hex(t);ki={ALL:0,RGB:1,HSL:2}});var eE,zB,$B=_(()=>{"use strict";S1();eE=class{static{s(this,"Type")}constructor(){this.type=ki.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=ki.ALL}is(e){return this.type===e}},zB=eE});var tE,GB,VB=_(()=>{"use strict";Ol();$B();S1();tE=class{static{s(this,"Channels")}constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new zB}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=ki.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=Ct.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Ct.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Ct.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=Ct.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Ct.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Ct.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(ki.HSL)&&r!==void 0?r:(this._ensureHSL(),Ct.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(ki.HSL)&&r!==void 0?r:(this._ensureHSL(),Ct.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(ki.HSL)&&r!==void 0?r:(this._ensureHSL(),Ct.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(ki.RGB)&&r!==void 0?r:(this._ensureRGB(),Ct.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(ki.RGB)&&r!==void 0?r:(this._ensureRGB(),Ct.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(ki.RGB)&&r!==void 0?r:(this._ensureRGB(),Ct.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(ki.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(ki.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(ki.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(ki.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(ki.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(ki.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},GB=tE});var H1e,th,_1=_(()=>{"use strict";VB();H1e=new GB({r:0,g:0,b:0,a:0},"transparent"),th=H1e});var UB,If,rE=_(()=>{"use strict";_1();S1();UB={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:s(t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(UB.re);if(!e)return;let r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,o=i>4,l=o?1:17,u=o?8:4,h=a?0:-1,f=o?255:15;return th.set({r:(n>>u*(h+3)&f)*l,g:(n>>u*(h+2)&f)*l,b:(n>>u*(h+1)&f)*l,a:a?(n&f)*l/255:1},t)},"parse"),stringify:s(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)]}`},"stringify")},If=UB});var pb,A1,qB=_(()=>{"use strict";Ol();_1();pb={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:s(t=>{let e=t.match(pb.hueRe);if(e){let[,r,n]=e;switch(n){case"grad":return Ct.channel.clamp.h(parseFloat(r)*.9);case"rad":return Ct.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Ct.channel.clamp.h(parseFloat(r)*360)}}return Ct.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:s(t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(pb.re);if(!r)return;let[,n,i,a,o,l]=r;return th.set({h:pb._hue2deg(n),s:Ct.channel.clamp.s(parseFloat(i)),l:Ct.channel.clamp.l(parseFloat(a)),a:o?Ct.channel.clamp.a(l?parseFloat(o)/100:parseFloat(o)):1},t)},"parse"),stringify:s(t=>{let{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${Ct.lang.round(e)}, ${Ct.lang.round(r)}%, ${Ct.lang.round(n)}%, ${i})`:`hsl(${Ct.lang.round(e)}, ${Ct.lang.round(r)}%, ${Ct.lang.round(n)}%)`},"stringify")},A1=pb});var mb,nE,WB=_(()=>{"use strict";rE();mb={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:s(t=>{t=t.toLowerCase();let e=mb.colors[t];if(e)return If.parse(e)},"parse"),stringify:s(t=>{let e=If.stringify(t);for(let r in mb.colors)if(mb.colors[r]===e)return r},"stringify")},nE=mb});var HB,L1,YB=_(()=>{"use strict";Ol();_1();HB={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:s(t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(HB.re);if(!r)return;let[,n,i,a,o,l,u,h,f]=r;return th.set({r:Ct.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:Ct.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Ct.channel.clamp.b(u?parseFloat(l)*2.55:parseFloat(l)),a:h?Ct.channel.clamp.a(f?parseFloat(h)/100:parseFloat(h)):1},t)},"parse"),stringify:s(t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${Ct.lang.round(e)}, ${Ct.lang.round(r)}, ${Ct.lang.round(n)}, ${Ct.lang.round(i)})`:`rgb(${Ct.lang.round(e)}, ${Ct.lang.round(r)}, ${Ct.lang.round(n)})`},"stringify")},L1=HB});var Y1e,wi,Wc=_(()=>{"use strict";rE();qB();WB();YB();S1();Y1e={format:{keyword:nE,hex:If,rgb:L1,rgba:L1,hsl:A1,hsla:A1},parse:s(t=>{if(typeof t!="string")return t;let e=If.parse(t)||L1.parse(t)||A1.parse(t)||nE.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:s(t=>!t.changed&&t.color?t.color:t.type.is(ki.HSL)||t.data.r===void 0?A1.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?L1.stringify(t):If.stringify(t),"stringify")},wi=Y1e});var X1e,gb,iE=_(()=>{"use strict";Ol();Wc();X1e=s((t,e)=>{let r=wi.parse(t);for(let n in e)r[n]=Ct.channel.clamp[n](e[n]);return wi.stringify(r)},"change"),gb=X1e});var j1e,Fs,aE=_(()=>{"use strict";Ol();_1();Wc();iE();j1e=s((t,e,r=0,n=1)=>{if(typeof t!="number")return gb(t,{a:e});let i=th.set({r:Ct.channel.clamp.r(t),g:Ct.channel.clamp.g(e),b:Ct.channel.clamp.b(r),a:Ct.channel.clamp.a(n)});return wi.stringify(i)},"rgba"),Fs=j1e});var K1e,D1,XB=_(()=>{"use strict";Ol();Wc();K1e=s((t,e)=>Ct.lang.round(wi.parse(t)[e]),"channel"),D1=K1e});var Q1e,jB,KB=_(()=>{"use strict";Ol();Wc();Q1e=s(t=>{let{r:e,g:r,b:n}=wi.parse(t),i=.2126*Ct.channel.toLinear(e)+.7152*Ct.channel.toLinear(r)+.0722*Ct.channel.toLinear(n);return Ct.lang.round(i)},"luminance"),jB=Q1e});var Z1e,QB,ZB=_(()=>{"use strict";KB();Z1e=s(t=>jB(t)>=.5,"isLight"),QB=Z1e});var J1e,Fa,JB=_(()=>{"use strict";ZB();J1e=s(t=>!QB(t),"isDark"),Fa=J1e});var eye,yb,sE=_(()=>{"use strict";Ol();Wc();eye=s((t,e,r)=>{let n=wi.parse(t),i=n[e],a=Ct.channel.clamp[e](i+r);return i!==a&&(n[e]=a),wi.stringify(n)},"adjustChannel"),yb=eye});var tye,ht,eF=_(()=>{"use strict";sE();tye=s((t,e)=>yb(t,"l",e),"lighten"),ht=tye});var rye,mt,tF=_(()=>{"use strict";sE();rye=s((t,e)=>yb(t,"l",-e),"darken"),mt=rye});var nye,Ce,rF=_(()=>{"use strict";Wc();iE();nye=s((t,e)=>{let r=wi.parse(t),n={};for(let i in e)e[i]&&(n[i]=r[i]+e[i]);return gb(t,n)},"adjust"),Ce=nye});var iye,nF,iF=_(()=>{"use strict";Wc();aE();iye=s((t,e,r=50)=>{let{r:n,g:i,b:a,a:o}=wi.parse(t),{r:l,g:u,b:h,a:f}=wi.parse(e),d=r/100,p=d*2-1,m=o-f,y=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,v=1-y,x=n*y+l*v,b=i*y+u*v,k=a*y+h*v,A=o*d+f*(1-d);return Fs(x,b,k,A)},"mix"),nF=iye});var aye,et,aF=_(()=>{"use strict";Wc();iF();aye=s((t,e=100)=>{let r=wi.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,nF(r,t,e)},"invert"),et=aye});var sF=_(()=>{"use strict";aE();XB();JB();eF();tF();rF();aF()});var Ho=_(()=>{"use strict";sF()});var rh,nh,R1=_(()=>{"use strict";rh="#ffffff",nh="#f2f2f2"});var ui,X0=_(()=>{"use strict";Ho();ui=s((t,e)=>e?Ce(t,{s:-40,l:10}):Ce(t,{s:-40,l:-10}),"mkBorder")});var oE,lF,cF=_(()=>{"use strict";Ho();R1();X0();oE=class{static{s(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||Ce(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ce(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ui(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ui(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ui(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ui(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||et(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||et(this.tertiaryColor),this.lineColor=this.lineColor||et(this.background),this.arrowheadColor=this.arrowheadColor||et(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?mt(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||mt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||et(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||ht(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.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||Ce(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ce(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ce(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ce(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ce(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ce(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ce(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ce(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ce(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=mt(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=mt(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||et(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||ht(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||mt(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||Ce(this.mainBkg,{h:180,s:-15,l:e*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||Ce(this.mainBkg,{h:180,s:-15,l:e*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Ce(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ce(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ce(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ce(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ce(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ce(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Ce(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ce(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ce(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ce(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ce(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ce(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ce(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ce(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ce(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ce(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ce(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ce(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ce(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ce(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ce(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fa(this.quadrant1Fill)?ht(this.quadrant1Fill):mt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?mt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Ce(this.primaryColor,{h:-30}),this.git4=this.git4||Ce(this.primaryColor,{h:-60}),this.git5=this.git5||Ce(this.primaryColor,{h:-90}),this.git6=this.git6||Ce(this.primaryColor,{h:60}),this.git7=this.git7||Ce(this.primaryColor,{h:120}),this.darkMode?(this.git0=ht(this.git0,25),this.git1=ht(this.git1,25),this.git2=ht(this.git2,25),this.git3=ht(this.git3,25),this.git4=ht(this.git4,25),this.git5=ht(this.git5,25),this.git6=ht(this.git6,25),this.git7=ht(this.git7,25)):(this.git0=mt(this.git0,25),this.git1=mt(this.git1,25),this.git2=mt(this.git2,25),this.git3=mt(this.git3,25),this.git4=mt(this.git4,25),this.git5=mt(this.git5,25),this.git6=mt(this.git6,25),this.git7=mt(this.git7,25)),this.gitInv0=this.gitInv0||et(this.git0),this.gitInv1=this.gitInv1||et(this.git1),this.gitInv2=this.gitInv2||et(this.git2),this.gitInv3=this.gitInv3||et(this.git3),this.gitInv4=this.gitInv4||et(this.git4),this.gitInv5=this.gitInv5||et(this.git5),this.gitInv6=this.gitInv6||et(this.git6),this.gitInv7=this.gitInv7||et(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nh}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},lF=s(t=>{let e=new oE;return e.calculate(t),e},"getThemeVariables")});var lE,uF,hF=_(()=>{"use strict";Ho();X0();lE=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ht(this.primaryColor,16),this.tertiaryColor=Ce(this.primaryColor,{h:-160}),this.primaryBorderColor=et(this.background),this.secondaryBorderColor=ui(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ui(this.tertiaryColor,this.darkMode),this.primaryTextColor=et(this.primaryColor),this.secondaryTextColor=et(this.secondaryColor),this.tertiaryTextColor=et(this.tertiaryColor),this.lineColor=et(this.background),this.textColor=et(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ht(et("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Fs(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=mt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=mt(this.sectionBkgColor,10),this.taskBorderColor=Fs(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Fs(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=ht(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=ht(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=ht(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.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=Ce(this.primaryColor,{h:64}),this.fillType3=Ce(this.secondaryColor,{h:64}),this.fillType4=Ce(this.primaryColor,{h:-64}),this.fillType5=Ce(this.secondaryColor,{h:-64}),this.fillType6=Ce(this.primaryColor,{h:128}),this.fillType7=Ce(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||Ce(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ce(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ce(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ce(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ce(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ce(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ce(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ce(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ce(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||et(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||ht(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ce(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ce(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ce(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ce(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ce(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ce(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ce(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ce(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fa(this.quadrant1Fill)?ht(this.quadrant1Fill):mt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?mt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ht(this.secondaryColor,20),this.git1=ht(this.pie2||this.secondaryColor,20),this.git2=ht(this.pie3||this.tertiaryColor,20),this.git3=ht(this.pie4||Ce(this.primaryColor,{h:-30}),20),this.git4=ht(this.pie5||Ce(this.primaryColor,{h:-60}),20),this.git5=ht(this.pie6||Ce(this.primaryColor,{h:-90}),10),this.git6=ht(this.pie7||Ce(this.primaryColor,{h:60}),10),this.git7=ht(this.pie8||Ce(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||et(this.git0),this.gitInv1=this.gitInv1||et(this.git1),this.gitInv2=this.gitInv2||et(this.git2),this.gitInv3=this.gitInv3||et(this.git3),this.gitInv4=this.gitInv4||et(this.git4),this.gitInv5=this.gitInv5||et(this.git5),this.gitInv6=this.gitInv6||et(this.git6),this.gitInv7=this.gitInv7||et(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||et(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||et(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ht(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ht(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},uF=s(t=>{let e=new lE;return e.calculate(t),e},"getThemeVariables")});var cE,j0,vb=_(()=>{"use strict";Ho();X0();R1();cE=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Ce(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Ce(this.primaryColor,{h:-160}),this.primaryBorderColor=ui(this.primaryColor,this.darkMode),this.secondaryBorderColor=ui(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ui(this.tertiaryColor,this.darkMode),this.primaryTextColor=et(this.primaryColor),this.secondaryTextColor=et(this.secondaryColor),this.tertiaryTextColor=et(this.tertiaryColor),this.lineColor=et(this.background),this.textColor=et(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Fs(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.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||Ce(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ce(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ce(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ce(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ce(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ce(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ce(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ce(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ce(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||mt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||mt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=mt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||mt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Ce(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ce(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ce(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||et(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||et(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=ht(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Ce(this.primaryColor,{h:64}),this.fillType3=Ce(this.secondaryColor,{h:64}),this.fillType4=Ce(this.primaryColor,{h:-64}),this.fillType5=Ce(this.secondaryColor,{h:-64}),this.fillType6=Ce(this.primaryColor,{h:128}),this.fillType7=Ce(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Ce(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Ce(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ce(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ce(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Ce(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Ce(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Ce(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Ce(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Ce(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Ce(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ce(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ce(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ce(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ce(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ce(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ce(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fa(this.quadrant1Fill)?ht(this.quadrant1Fill):mt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Ce(this.primaryColor,{h:-30}),this.git4=this.git4||Ce(this.primaryColor,{h:-60}),this.git5=this.git5||Ce(this.primaryColor,{h:-90}),this.git6=this.git6||Ce(this.primaryColor,{h:60}),this.git7=this.git7||Ce(this.primaryColor,{h:120}),this.darkMode?(this.git0=ht(this.git0,25),this.git1=ht(this.git1,25),this.git2=ht(this.git2,25),this.git3=ht(this.git3,25),this.git4=ht(this.git4,25),this.git5=ht(this.git5,25),this.git6=ht(this.git6,25),this.git7=ht(this.git7,25)):(this.git0=mt(this.git0,25),this.git1=mt(this.git1,25),this.git2=mt(this.git2,25),this.git3=mt(this.git3,25),this.git4=mt(this.git4,25),this.git5=mt(this.git5,25),this.git6=mt(this.git6,25),this.git7=mt(this.git7,25)),this.gitInv0=this.gitInv0||mt(et(this.git0),25),this.gitInv1=this.gitInv1||et(this.git1),this.gitInv2=this.gitInv2||et(this.git2),this.gitInv3=this.gitInv3||et(this.git3),this.gitInv4=this.gitInv4||et(this.git4),this.gitInv5=this.gitInv5||et(this.git5),this.gitInv6=this.gitInv6||et(this.git6),this.gitInv7=this.gitInv7||et(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||et(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||et(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nh}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},j0=s(t=>{let e=new cE;return e.calculate(t),e},"getThemeVariables")});var uE,fF,dF=_(()=>{"use strict";Ho();R1();X0();uE=class{static{s(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=ht("#cde498",10),this.primaryBorderColor=ui(this.primaryColor,this.darkMode),this.secondaryBorderColor=ui(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ui(this.tertiaryColor,this.darkMode),this.primaryTextColor=et(this.primaryColor),this.secondaryTextColor=et(this.secondaryColor),this.tertiaryTextColor=et(this.primaryColor),this.lineColor=et(this.background),this.textColor=et(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=mt(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||Ce(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ce(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ce(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ce(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ce(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ce(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ce(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ce(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ce(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||mt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||mt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=mt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||mt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Ce(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ce(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ce(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Ce(this.primaryColor,{h:64}),this.fillType3=Ce(this.secondaryColor,{h:64}),this.fillType4=Ce(this.primaryColor,{h:-64}),this.fillType5=Ce(this.secondaryColor,{h:-64}),this.fillType6=Ce(this.primaryColor,{h:128}),this.fillType7=Ce(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Ce(this.primaryColor,{l:-30}),this.pie5=this.pie5||Ce(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ce(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Ce(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ce(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ce(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ce(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Ce(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Ce(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ce(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ce(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ce(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ce(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ce(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ce(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fa(this.quadrant1Fill)?ht(this.quadrant1Fill):mt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Ce(this.primaryColor,{h:-30}),this.git4=this.git4||Ce(this.primaryColor,{h:-60}),this.git5=this.git5||Ce(this.primaryColor,{h:-90}),this.git6=this.git6||Ce(this.primaryColor,{h:60}),this.git7=this.git7||Ce(this.primaryColor,{h:120}),this.darkMode?(this.git0=ht(this.git0,25),this.git1=ht(this.git1,25),this.git2=ht(this.git2,25),this.git3=ht(this.git3,25),this.git4=ht(this.git4,25),this.git5=ht(this.git5,25),this.git6=ht(this.git6,25),this.git7=ht(this.git7,25)):(this.git0=mt(this.git0,25),this.git1=mt(this.git1,25),this.git2=mt(this.git2,25),this.git3=mt(this.git3,25),this.git4=mt(this.git4,25),this.git5=mt(this.git5,25),this.git6=mt(this.git6,25),this.git7=mt(this.git7,25)),this.gitInv0=this.gitInv0||et(this.git0),this.gitInv1=this.gitInv1||et(this.git1),this.gitInv2=this.gitInv2||et(this.git2),this.gitInv3=this.gitInv3||et(this.git3),this.gitInv4=this.gitInv4||et(this.git4),this.gitInv5=this.gitInv5||et(this.git5),this.gitInv6=this.gitInv6||et(this.git6),this.gitInv7=this.gitInv7||et(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||et(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||et(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nh}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},fF=s(t=>{let e=new uE;return e.calculate(t),e},"getThemeVariables")});var hE,pF,mF=_(()=>{"use strict";Ho();X0();R1();hE=class{static{s(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=ht(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Ce(this.primaryColor,{h:-160}),this.primaryBorderColor=ui(this.primaryColor,this.darkMode),this.secondaryBorderColor=ui(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ui(this.tertiaryColor,this.darkMode),this.primaryTextColor=et(this.primaryColor),this.secondaryTextColor=et(this.secondaryColor),this.tertiaryTextColor=et(this.tertiaryColor),this.lineColor=et(this.background),this.textColor=et(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=ht(this.contrast,55),this.border2=this.contrast,this.actorBorder=ht(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||et(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||ht(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||mt(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ce(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ce(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=ht(this.contrast,30),this.sectionBkgColor2=ht(this.contrast,30),this.taskBorderColor=mt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=ht(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=mt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Ce(this.primaryColor,{h:64}),this.fillType3=Ce(this.secondaryColor,{h:64}),this.fillType4=Ce(this.primaryColor,{h:-64}),this.fillType5=Ce(this.secondaryColor,{h:-64}),this.fillType6=Ce(this.primaryColor,{h:128}),this.fillType7=Ce(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ce(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ce(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ce(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ce(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ce(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ce(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fa(this.quadrant1Fill)?ht(this.quadrant1Fill):mt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=mt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Ce(this.primaryColor,{h:-30}),this.git4=this.pie5||Ce(this.primaryColor,{h:-60}),this.git5=this.pie6||Ce(this.primaryColor,{h:-90}),this.git6=this.pie7||Ce(this.primaryColor,{h:60}),this.git7=this.pie8||Ce(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||et(this.git0),this.gitInv1=this.gitInv1||et(this.git1),this.gitInv2=this.gitInv2||et(this.git2),this.gitInv3=this.gitInv3||et(this.git3),this.gitInv4=this.gitInv4||et(this.git4),this.gitInv5=this.gitInv5||et(this.git5),this.gitInv6=this.gitInv6||et(this.git6),this.gitInv7=this.gitInv7||et(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nh}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},pF=s(t=>{let e=new hE;return e.calculate(t),e},"getThemeVariables")});var po,xb=_(()=>{"use strict";cF();hF();vb();dF();mF();po={base:{getThemeVariables:lF},dark:{getThemeVariables:uF},default:{getThemeVariables:j0},forest:{getThemeVariables:fF},neutral:{getThemeVariables:pF}}});var Hc,gF=_(()=>{"use strict";Hc={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},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,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},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},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}});var yF,vF,xF,dr,Pl=_(()=>{"use strict";xb();gF();yF={...Hc,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"SIMPLE"},themeCSS:void 0,themeVariables:po.default.getThemeVariables(),sequence:{...Hc.sequence,messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:s(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:s(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},gantt:{...Hc.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Hc.c4,useWidth:void 0,personFont:s(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:s(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:s(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:s(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:s(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:s(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:s(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:s(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:s(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:s(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:s(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:s(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:s(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:s(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:s(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:s(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:s(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:s(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:s(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:s(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:s(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Hc.pie,useWidth:984},xyChart:{...Hc.xyChart,useWidth:void 0},requirement:{...Hc.requirement,useWidth:void 0},packet:{...Hc.packet}},vF=s((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...vF(t[n],"")]:[...r,e+n],[]),"keyify"),xF=new Set(vF(yF,"")),dr=yF});var K0,sye,fE=_(()=>{"use strict";Pl();it();K0=s(t=>{if(V.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>K0(e));return}for(let e of Object.keys(t)){if(V.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!xF.has(e)||t[e]==null){V.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){V.debug("sanitizing object",e),K0(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)e.includes(n)&&(V.debug("sanitizing css option",e),t[e]=sye(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]="")}V.debug("After sanitization",t)}},"sanitizeDirective"),sye=s(t=>{let e=0,r=0;for(let n of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss")});var ih,as,kF,Q0,M1,bb,dE,wF,TF,pE,kb,_r,EF,CF,I1,oye,bF,lye,SF,zs=_(()=>{"use strict";Y0();it();xb();Pl();fE();ih=Object.freeze(dr),as=An({},ih),Q0=[],M1=An({},ih),bb=s((t,e)=>{let r=An({},t),n={};for(let i of e)EF(i),n=An(n,i);if(r=An(r,n),n.theme&&n.theme in po){let i=An({},kF),a=An(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in po&&(r.themeVariables=po[r.theme].getThemeVariables(a))}return M1=r,SF(M1),M1},"updateCurrentConfig"),dE=s(t=>(as=An({},ih),as=An(as,t),t.theme&&po[t.theme]&&(as.themeVariables=po[t.theme].getThemeVariables(t.themeVariables)),bb(as,Q0),as),"setSiteConfig"),wF=s(t=>{kF=An({},t)},"saveConfigFromInitialize"),TF=s(t=>(as=An(as,t),bb(as,Q0),as),"updateSiteConfig"),pE=s(()=>An({},as),"getSiteConfig"),kb=s(t=>(SF(t),An(M1,t),_r()),"setConfig"),_r=s(()=>An({},M1),"getConfig"),EF=s(t=>{t&&(["secure",...as.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(V.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"&&EF(t[e])}))},"sanitize"),CF=s(t=>{K0(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Q0.push(t),bb(as,Q0)},"addDirective"),I1=s((t=as)=>{Q0=[],bb(t,Q0)},"reset"),oye={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},bF={},lye=s(t=>{bF[t]||(V.warn(oye[t]),bF[t]=!0)},"issueWarning"),SF=s(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&lye("LAZY_LOAD_DEPRECATED")},"checkConfig")});var yE=is((mE,gE)=>{"use strict";(function(t,e){typeof mE=="object"&&typeof gE<"u"?gE.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.DOMPurify=e())})(mE,function(){"use strict";let{entries:t,setPrototypeOf:e,isFrozen:r,getPrototypeOf:n,getOwnPropertyDescriptor:i}=Object,{freeze:a,seal:o,create:l}=Object,{apply:u,construct:h}=typeof Reflect<"u"&&Reflect;a||(a=s(function(Se){return Se},"freeze")),o||(o=s(function(Se){return Se},"seal")),u||(u=s(function(Se,Ue,Oe){return Se.apply(Ue,Oe)},"apply")),h||(h=s(function(Se,Ue){return new Se(...Ue)},"construct"));let f=T(Array.prototype.forEach),d=T(Array.prototype.pop),p=T(Array.prototype.push),m=T(String.prototype.toLowerCase),g=T(String.prototype.toString),y=T(String.prototype.match),v=T(String.prototype.replace),x=T(String.prototype.indexOf),b=T(String.prototype.trim),k=T(Object.prototype.hasOwnProperty),A=T(RegExp.prototype.test),w=C(TypeError);function T(Pe){return function(Se){for(var Ue=arguments.length,Oe=new Array(Ue>1?Ue-1:0),_e=1;_e<Ue;_e++)Oe[_e-1]=arguments[_e];return u(Pe,Se,Oe)}}s(T,"unapply");function C(Pe){return function(){for(var Se=arguments.length,Ue=new Array(Se),Oe=0;Oe<Se;Oe++)Ue[Oe]=arguments[Oe];return h(Pe,Ue)}}s(C,"unconstruct");function E(Pe,Se){let Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;e&&e(Pe,null);let Oe=Se.length;for(;Oe--;){let _e=Se[Oe];if(typeof _e=="string"){let he=Ue(_e);he!==_e&&(r(Se)||(Se[Oe]=he),_e=he)}Pe[_e]=!0}return Pe}s(E,"addToSet");function S(Pe){for(let Se=0;Se<Pe.length;Se++)k(Pe,Se)||(Pe[Se]=null);return Pe}s(S,"cleanArray");function R(Pe){let Se=l(null);for(let[Ue,Oe]of t(Pe))k(Pe,Ue)&&(Array.isArray(Oe)?Se[Ue]=S(Oe):Oe&&typeof Oe=="object"&&Oe.constructor===Object?Se[Ue]=R(Oe):Se[Ue]=Oe);return Se}s(R,"clone");function D(Pe,Se){for(;Pe!==null;){let Oe=i(Pe,Se);if(Oe){if(Oe.get)return T(Oe.get);if(typeof Oe.value=="function")return T(Oe.value)}Pe=n(Pe)}function Ue(){return null}return s(Ue,"fallbackValue"),Ue}s(D,"lookupGetter");let L=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),P=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),M=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),F=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),O=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),z=a(["#text"]),N=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),W=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ee=o(/\{\{[\w\W]*|[\w\W]*\}\}/gm),te=o(/<%[\w\W]*|[\w\W]*%>/gm),ce=o(/\${[\w\W]*}/gm),Z=o(/^data-[\-\w.\u00B7-\uFFFF]/),fe=o(/^aria-[\-\w]+$/),ne=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=o(/^(?:\w+script|data):/i),Q=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=o(/^html$/i),re=o(/^[a-z][.\w]*(-[.\w]+)+$/i);var ie=Object.freeze({__proto__:null,MUSTACHE_EXPR:ee,ERB_EXPR:te,TMPLIT_EXPR:ce,DATA_ATTR:Z,ARIA_ATTR:fe,IS_ALLOWED_URI:ne,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:Q,DOCTYPE_NAME:K,CUSTOM_ELEMENT:re});let ye={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},j=s(function(){return typeof window>"u"?null:window},"getGlobal"),De=s(function(Se,Ue){if(typeof Se!="object"||typeof Se.createPolicy!="function")return null;let Oe=null,_e="data-tt-policy-suffix";Ue&&Ue.hasAttribute(_e)&&(Oe=Ue.getAttribute(_e));let he="dompurify"+(Oe?"#"+Oe:"");try{return Se.createPolicy(he,{createHTML(q){return q},createScriptURL(q){return q}})}catch{return console.warn("TrustedTypes policy "+he+" could not be created."),null}},"_createTrustedTypesPolicy");function oe(){let Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:j(),Se=s(St=>oe(St),"DOMPurify");if(Se.version="3.1.6",Se.removed=[],!Pe||!Pe.document||Pe.document.nodeType!==ye.document)return Se.isSupported=!1,Se;let{document:Ue}=Pe,Oe=Ue,_e=Oe.currentScript,{DocumentFragment:he,HTMLTemplateElement:q,Node:se,Element:ue,NodeFilter:X,NamedNodeMap:ae=Pe.NamedNodeMap||Pe.MozNamedAttrMap,HTMLFormElement:pe,DOMParser:de,trustedTypes:Ie}=Pe,Ne=ue.prototype,Be=D(Ne,"cloneNode"),ze=D(Ne,"remove"),qe=D(Ne,"nextSibling"),Fe=D(Ne,"childNodes"),we=D(Ne,"parentNode");if(typeof q=="function"){let St=Ue.createElement("template");St.content&&St.content.ownerDocument&&(Ue=St.content.ownerDocument)}let Je,We="",{implementation:or,createNodeIterator:Cr,createDocumentFragment:Ut,getElementsByTagName:ar}=Ue,{importNode:ut}=Oe,Rt={};Se.isSupported=typeof t=="function"&&typeof we=="function"&&or&&or.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Qe,ERB_EXPR:Dt,TMPLIT_EXPR:qt,DATA_ATTR:yt,ARIA_ATTR:Et,IS_SCRIPT_OR_DATA:pt,ATTR_WHITESPACE:Wt,CUSTOM_ELEMENT:ot}=ie,{IS_ALLOWED_URI:fr}=ie,vt=null,Bt=E({},[...L,...P,...M,...I,...z]),Sr=null,zi=E({},[...N,...U,...$,...W]),rr=Object.seal(l(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}})),Vn=null,Tn=null,Ki=!0,ci=!0,Pa=!1,En=!0,ti=!1,co=!0,uo=!1,Rl=!1,ts=!1,at=!1,xt=!1,Ft=!1,Ke=!0,Zt=!1,me="user-content-",Fc=!0,xe=!1,xi={},zc=null,g1=E({},["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"]),ib=null,y1=E({},["audio","video","img","source","image","track"]),v1=null,ri=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ho="http://www.w3.org/1998/Math/MathML",Zu="http://www.w3.org/2000/svg",Ps="http://www.w3.org/1999/xhtml",Ju=Ps,ab=!1,x1=null,Qi=E({},[ho,Zu,Ps],g),$c=null,Gc=["application/xhtml+xml","text/html"],rs="text/html",bi=null,Ml=null,eh=Ue.createElement("form"),Af=s(function(Te){return Te instanceof RegExp||Te instanceof Function},"isRegexOrFunction"),Bs=s(function(){let Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ml&&Ml===Te)){if((!Te||typeof Te!="object")&&(Te={}),Te=R(Te),$c=Gc.indexOf(Te.PARSER_MEDIA_TYPE)===-1?rs:Te.PARSER_MEDIA_TYPE,bi=$c==="application/xhtml+xml"?g:m,vt=k(Te,"ALLOWED_TAGS")?E({},Te.ALLOWED_TAGS,bi):Bt,Sr=k(Te,"ALLOWED_ATTR")?E({},Te.ALLOWED_ATTR,bi):zi,x1=k(Te,"ALLOWED_NAMESPACES")?E({},Te.ALLOWED_NAMESPACES,g):Qi,v1=k(Te,"ADD_URI_SAFE_ATTR")?E(R(ri),Te.ADD_URI_SAFE_ATTR,bi):ri,ib=k(Te,"ADD_DATA_URI_TAGS")?E(R(y1),Te.ADD_DATA_URI_TAGS,bi):y1,zc=k(Te,"FORBID_CONTENTS")?E({},Te.FORBID_CONTENTS,bi):g1,Vn=k(Te,"FORBID_TAGS")?E({},Te.FORBID_TAGS,bi):{},Tn=k(Te,"FORBID_ATTR")?E({},Te.FORBID_ATTR,bi):{},xi=k(Te,"USE_PROFILES")?Te.USE_PROFILES:!1,Ki=Te.ALLOW_ARIA_ATTR!==!1,ci=Te.ALLOW_DATA_ATTR!==!1,Pa=Te.ALLOW_UNKNOWN_PROTOCOLS||!1,En=Te.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ti=Te.SAFE_FOR_TEMPLATES||!1,co=Te.SAFE_FOR_XML!==!1,uo=Te.WHOLE_DOCUMENT||!1,at=Te.RETURN_DOM||!1,xt=Te.RETURN_DOM_FRAGMENT||!1,Ft=Te.RETURN_TRUSTED_TYPE||!1,ts=Te.FORCE_BODY||!1,Ke=Te.SANITIZE_DOM!==!1,Zt=Te.SANITIZE_NAMED_PROPS||!1,Fc=Te.KEEP_CONTENT!==!1,xe=Te.IN_PLACE||!1,fr=Te.ALLOWED_URI_REGEXP||ne,Ju=Te.NAMESPACE||Ps,rr=Te.CUSTOM_ELEMENT_HANDLING||{},Te.CUSTOM_ELEMENT_HANDLING&&Af(Te.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(rr.tagNameCheck=Te.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Te.CUSTOM_ELEMENT_HANDLING&&Af(Te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(rr.attributeNameCheck=Te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Te.CUSTOM_ELEMENT_HANDLING&&typeof Te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(rr.allowCustomizedBuiltInElements=Te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ti&&(ci=!1),xt&&(at=!0),xi&&(vt=E({},z),Sr=[],xi.html===!0&&(E(vt,L),E(Sr,N)),xi.svg===!0&&(E(vt,P),E(Sr,U),E(Sr,W)),xi.svgFilters===!0&&(E(vt,M),E(Sr,U),E(Sr,W)),xi.mathMl===!0&&(E(vt,I),E(Sr,$),E(Sr,W))),Te.ADD_TAGS&&(vt===Bt&&(vt=R(vt)),E(vt,Te.ADD_TAGS,bi)),Te.ADD_ATTR&&(Sr===zi&&(Sr=R(Sr)),E(Sr,Te.ADD_ATTR,bi)),Te.ADD_URI_SAFE_ATTR&&E(v1,Te.ADD_URI_SAFE_ATTR,bi),Te.FORBID_CONTENTS&&(zc===g1&&(zc=R(zc)),E(zc,Te.FORBID_CONTENTS,bi)),Fc&&(vt["#text"]=!0),uo&&E(vt,["html","head","body"]),vt.table&&(E(vt,["tbody"]),delete Vn.tbody),Te.TRUSTED_TYPES_POLICY){if(typeof Te.TRUSTED_TYPES_POLICY.createHTML!="function")throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Te.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Je=Te.TRUSTED_TYPES_POLICY,We=Je.createHTML("")}else Je===void 0&&(Je=De(Ie,_e)),Je!==null&&typeof We=="string"&&(We=Je.createHTML(""));a&&a(Te),Ml=Te}},"_parseConfig"),b1=E({},["mi","mo","mn","ms","mtext"]),Lf=E({},["foreignobject","annotation-xml"]),k1=E({},["title","style","font","a","script"]),xa=E({},[...P,...M,...F]),vB=E({},[...I,...O]),O1e=s(function(Te){let Ze=we(Te);(!Ze||!Ze.tagName)&&(Ze={namespaceURI:Ju,tagName:"template"});let bt=m(Te.tagName),fn=m(Ze.tagName);return x1[Te.namespaceURI]?Te.namespaceURI===Zu?Ze.namespaceURI===Ps?bt==="svg":Ze.namespaceURI===ho?bt==="svg"&&(fn==="annotation-xml"||b1[fn]):!!xa[bt]:Te.namespaceURI===ho?Ze.namespaceURI===Ps?bt==="math":Ze.namespaceURI===Zu?bt==="math"&&Lf[fn]:!!vB[bt]:Te.namespaceURI===Ps?Ze.namespaceURI===Zu&&!Lf[fn]||Ze.namespaceURI===ho&&!b1[fn]?!1:!vB[bt]&&(k1[bt]||!xa[bt]):!!($c==="application/xhtml+xml"&&x1[Te.namespaceURI]):!1},"_checkValidNamespace"),Il=s(function(Te){p(Se.removed,{element:Te});try{we(Te).removeChild(Te)}catch{ze(Te)}},"_forceRemove"),sb=s(function(Te,Ze){try{p(Se.removed,{attribute:Ze.getAttributeNode(Te),from:Ze})}catch{p(Se.removed,{attribute:null,from:Ze})}if(Ze.removeAttribute(Te),Te==="is"&&!Sr[Te])if(at||xt)try{Il(Ze)}catch{}else try{Ze.setAttribute(Te,"")}catch{}},"_removeAttribute"),xB=s(function(Te){let Ze=null,bt=null;if(ts)Te="<remove></remove>"+Te;else{let Zi=y(Te,/^[\r\n\t ]+/);bt=Zi&&Zi[0]}$c==="application/xhtml+xml"&&Ju===Ps&&(Te='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Te+"</body></html>");let fn=Je?Je.createHTML(Te):Te;if(Ju===Ps)try{Ze=new de().parseFromString(fn,$c)}catch{}if(!Ze||!Ze.documentElement){Ze=or.createDocument(Ju,"template",null);try{Ze.documentElement.innerHTML=ab?We:fn}catch{}}let ba=Ze.body||Ze.documentElement;return Te&&bt&&ba.insertBefore(Ue.createTextNode(bt),ba.childNodes[0]||null),Ju===Ps?ar.call(Ze,uo?"html":"body")[0]:uo?Ze.documentElement:ba},"_initDocument"),bB=s(function(Te){return Cr.call(Te.ownerDocument||Te,Te,X.SHOW_ELEMENT|X.SHOW_COMMENT|X.SHOW_TEXT|X.SHOW_PROCESSING_INSTRUCTION|X.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),kB=s(function(Te){return Te instanceof pe&&(typeof Te.nodeName!="string"||typeof Te.textContent!="string"||typeof Te.removeChild!="function"||!(Te.attributes instanceof ae)||typeof Te.removeAttribute!="function"||typeof Te.setAttribute!="function"||typeof Te.namespaceURI!="string"||typeof Te.insertBefore!="function"||typeof Te.hasChildNodes!="function")},"_isClobbered"),wB=s(function(Te){return typeof se=="function"&&Te instanceof se},"_isNode"),Vc=s(function(Te,Ze,bt){Rt[Te]&&f(Rt[Te],fn=>{fn.call(Se,Ze,bt,Ml)})},"_executeHook"),TB=s(function(Te){let Ze=null;if(Vc("beforeSanitizeElements",Te,null),kB(Te))return Il(Te),!0;let bt=bi(Te.nodeName);if(Vc("uponSanitizeElement",Te,{tagName:bt,allowedTags:vt}),Te.hasChildNodes()&&!wB(Te.firstElementChild)&&A(/<[/\w]/g,Te.innerHTML)&&A(/<[/\w]/g,Te.textContent)||Te.nodeType===ye.progressingInstruction||co&&Te.nodeType===ye.comment&&A(/<[/\w]/g,Te.data))return Il(Te),!0;if(!vt[bt]||Vn[bt]){if(!Vn[bt]&&CB(bt)&&(rr.tagNameCheck instanceof RegExp&&A(rr.tagNameCheck,bt)||rr.tagNameCheck instanceof Function&&rr.tagNameCheck(bt)))return!1;if(Fc&&!zc[bt]){let fn=we(Te)||Te.parentNode,ba=Fe(Te)||Te.childNodes;if(ba&&fn){let Zi=ba.length;for(let ns=Zi-1;ns>=0;--ns){let Nl=Be(ba[ns],!0);Nl.__removalCount=(Te.__removalCount||0)+1,fn.insertBefore(Nl,qe(Te))}}}return Il(Te),!0}return Te instanceof ue&&!O1e(Te)||(bt==="noscript"||bt==="noembed"||bt==="noframes")&&A(/<\/no(script|embed|frames)/i,Te.innerHTML)?(Il(Te),!0):(ti&&Te.nodeType===ye.text&&(Ze=Te.textContent,f([Qe,Dt,qt],fn=>{Ze=v(Ze,fn," ")}),Te.textContent!==Ze&&(p(Se.removed,{element:Te.cloneNode()}),Te.textContent=Ze)),Vc("afterSanitizeElements",Te,null),!1)},"_sanitizeElements"),EB=s(function(Te,Ze,bt){if(Ke&&(Ze==="id"||Ze==="name")&&(bt in Ue||bt in eh))return!1;if(!(ci&&!Tn[Ze]&&A(yt,Ze))){if(!(Ki&&A(Et,Ze))){if(!Sr[Ze]||Tn[Ze]){if(!(CB(Te)&&(rr.tagNameCheck instanceof RegExp&&A(rr.tagNameCheck,Te)||rr.tagNameCheck instanceof Function&&rr.tagNameCheck(Te))&&(rr.attributeNameCheck instanceof RegExp&&A(rr.attributeNameCheck,Ze)||rr.attributeNameCheck instanceof Function&&rr.attributeNameCheck(Ze))||Ze==="is"&&rr.allowCustomizedBuiltInElements&&(rr.tagNameCheck instanceof RegExp&&A(rr.tagNameCheck,bt)||rr.tagNameCheck instanceof Function&&rr.tagNameCheck(bt))))return!1}else if(!v1[Ze]){if(!A(fr,v(bt,Wt,""))){if(!((Ze==="src"||Ze==="xlink:href"||Ze==="href")&&Te!=="script"&&x(bt,"data:")===0&&ib[Te])){if(!(Pa&&!A(pt,v(bt,Wt,"")))){if(bt)return!1}}}}}}return!0},"_isValidAttribute"),CB=s(function(Te){return Te!=="annotation-xml"&&y(Te,ot)},"_isBasicCustomElement"),SB=s(function(Te){Vc("beforeSanitizeAttributes",Te,null);let{attributes:Ze}=Te;if(!Ze)return;let bt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Sr},fn=Ze.length;for(;fn--;){let ba=Ze[fn],{name:Zi,namespaceURI:ns,value:Nl}=ba,w1=bi(Zi),Ba=Zi==="value"?Nl:b(Nl);if(bt.attrName=w1,bt.attrValue=Ba,bt.keepAttr=!0,bt.forceKeepAttr=void 0,Vc("uponSanitizeAttribute",Te,bt),Ba=bt.attrValue,co&&A(/((--!?|])>)|<\/(style|title)/i,Ba)){sb(Zi,Te);continue}if(bt.forceKeepAttr||(sb(Zi,Te),!bt.keepAttr))continue;if(!En&&A(/\/>/i,Ba)){sb(Zi,Te);continue}ti&&f([Qe,Dt,qt],AB=>{Ba=v(Ba,AB," ")});let _B=bi(Te.nodeName);if(EB(_B,w1,Ba)){if(Zt&&(w1==="id"||w1==="name")&&(sb(Zi,Te),Ba=me+Ba),Je&&typeof Ie=="object"&&typeof Ie.getAttributeType=="function"&&!ns)switch(Ie.getAttributeType(_B,w1)){case"TrustedHTML":{Ba=Je.createHTML(Ba);break}case"TrustedScriptURL":{Ba=Je.createScriptURL(Ba);break}}try{ns?Te.setAttributeNS(ns,Zi,Ba):Te.setAttribute(Zi,Ba),kB(Te)?Il(Te):d(Se.removed)}catch{}}}Vc("afterSanitizeAttributes",Te,null)},"_sanitizeAttributes"),P1e=s(function St(Te){let Ze=null,bt=bB(Te);for(Vc("beforeSanitizeShadowDOM",Te,null);Ze=bt.nextNode();)Vc("uponSanitizeShadowNode",Ze,null),!TB(Ze)&&(Ze.content instanceof he&&St(Ze.content),SB(Ze));Vc("afterSanitizeShadowDOM",Te,null)},"_sanitizeShadowDOM");return Se.sanitize=function(St){let Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ze=null,bt=null,fn=null,ba=null;if(ab=!St,ab&&(St="<!-->"),typeof St!="string"&&!wB(St))if(typeof St.toString=="function"){if(St=St.toString(),typeof St!="string")throw w("dirty is not a string, aborting")}else throw w("toString is not a function");if(!Se.isSupported)return St;if(Rl||Bs(Te),Se.removed=[],typeof St=="string"&&(xe=!1),xe){if(St.nodeName){let Nl=bi(St.nodeName);if(!vt[Nl]||Vn[Nl])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(St instanceof se)Ze=xB("<!---->"),bt=Ze.ownerDocument.importNode(St,!0),bt.nodeType===ye.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?Ze=bt:Ze.appendChild(bt);else{if(!at&&!ti&&!uo&&St.indexOf("<")===-1)return Je&&Ft?Je.createHTML(St):St;if(Ze=xB(St),!Ze)return at?null:Ft?We:""}Ze&&ts&&Il(Ze.firstChild);let Zi=bB(xe?St:Ze);for(;fn=Zi.nextNode();)TB(fn)||(fn.content instanceof he&&P1e(fn.content),SB(fn));if(xe)return St;if(at){if(xt)for(ba=Ut.call(Ze.ownerDocument);Ze.firstChild;)ba.appendChild(Ze.firstChild);else ba=Ze;return(Sr.shadowroot||Sr.shadowrootmode)&&(ba=ut.call(Oe,ba,!0)),ba}let ns=uo?Ze.outerHTML:Ze.innerHTML;return uo&&vt["!doctype"]&&Ze.ownerDocument&&Ze.ownerDocument.doctype&&Ze.ownerDocument.doctype.name&&A(K,Ze.ownerDocument.doctype.name)&&(ns="<!DOCTYPE "+Ze.ownerDocument.doctype.name+`>
`+ns),ti&&f([Qe,Dt,qt],Nl=>{ns=v(ns,Nl," ")}),Je&&Ft?Je.createHTML(ns):ns},Se.setConfig=function(){let St=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Bs(St),Rl=!0},Se.clearConfig=function(){Ml=null,Rl=!1},Se.isValidAttribute=function(St,Te,Ze){Ml||Bs({});let bt=bi(St),fn=bi(Te);return EB(bt,fn,Ze)},Se.addHook=function(St,Te){typeof Te=="function"&&(Rt[St]=Rt[St]||[],p(Rt[St],Te))},Se.removeHook=function(St){if(Rt[St])return d(Rt[St])},Se.removeHooks=function(St){Rt[St]&&(Rt[St]=[])},Se.removeAllHooks=function(){Rt={}},Se}s(oe,"createDOMPurify");var Re=oe();return Re})});var Jz={};ur(Jz,{default:()=>r2e});function mye(t){return String(t).replace(pye,e=>dye[e])}function xye(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 Sye(t){for(var e=0;e<DE.length;e++)for(var r=DE[e],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(t>=i[0]&&t<=i[1])return r.name}return null}function az(t){for(var e=0;e<Nb.length;e+=2)if(t>=Nb[e]&&t<=Nb[e+1])return!0;return!1}function Bye(t,e){zl[t]=e}function UE(t,e,r){if(!zl[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=zl[e][n];if(!i&&t[0]in AF&&(n=AF[t[0]].charCodeAt(0),i=zl[e][n]),!i&&r==="text"&&az(n)&&(i=zl[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function Fye(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!vE[e]){var r=vE[e]={cssEmPerMu:wb.quad[e]/18};for(var n in wb)wb.hasOwnProperty(n)&&(r[n]=wb[n][e])}return vE[e]}function RF(t){if(t instanceof ls)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function Vye(t){if(t instanceof Bf)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}function B(t,e,r,n,i,a){dn[t][i]={font:e,group:r,replace:n},a&&n&&(dn[t][n]=dn[t][i])}function st(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,l={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},u=0;u<r.length;++u)mz[r[u]]=l;e&&(a&&(Fb[e]=a),o&&(zb[e]=o))}function Ff(t){var{type:e,htmlBuilder:r,mathmlBuilder:n}=t;st({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}function Lb(t,e){var r=Qc(["base"],t,e),n=Qc(["strut"]);return n.style.height=tt(r.height+r.depth),r.depth&&(n.style.verticalAlign=tt(-r.depth)),r.children.unshift(n),r}function OE(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=Ti(t,e,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],o=[],l=0;l<n.length;l++)if(o.push(n[l]),n[l].hasClass("mbin")||n[l].hasClass("mrel")||n[l].hasClass("allowbreak")){for(var u=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,o.push(n[l]),n[l].hasClass("nobreak")&&(u=!0);u||(a.push(Lb(o,e)),o=[])}else n[l].hasClass("newline")&&(o.pop(),o.length>0&&(a.push(Lb(o,e)),o=[]),a.push(n[l]));o.length>0&&a.push(Lb(o,e));var h;r?(h=Lb(Ti(r,e,!0)),h.classes=["tag"],a.push(h)):i&&a.push(i);var f=Qc(["katex-html"],a);if(f.setAttribute("aria-hidden","true"),h){var d=h.children[0];d.style.height=tt(f.height+f.depth),f.depth&&(d.style.verticalAlign=tt(-f.depth))}return f}function yz(t){return new Pf(t)}function PF(t,e,r,n,i){var a=cs(t,r),o;a.length===1&&a[0]instanceof os&&Mt.contains(["mrow","mtable"],a[0].type)?o=a[0]:o=new Xe.MathNode("mrow",a);var l=new Xe.MathNode("annotation",[new Xe.TextNode(e)]);l.setAttribute("encoding","application/x-tex");var u=new Xe.MathNode("semantics",[o,l]),h=new Xe.MathNode("math",[u]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&h.setAttribute("display","block");var f=i?"katex":"katex-mathml";return Ae.makeSpan([f],[h])}function Jt(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 YE(t){var e=Wb(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 Wb(t){return t&&(t.type==="atom"||qye.hasOwnProperty(t.type))?t:null}function kz(t,e){var r=Ti(t.body,e,!0);return bve([t.mclass],r,e)}function wz(t,e){var r,n=cs(t.body,e);return t.mclass==="minner"?r=new Xe.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new Xe.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new Xe.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 Tve(t,e,r){var n=kve[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"},o=r.callFunction("\\Big",[a],[]),l=r.callFunction("\\\\cdright",[e[1]],[]),u={type:"ordgroup",mode:"math",body:[i,o,l]};return r.callFunction("\\\\cdparent",[u],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var h={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[h],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Eve(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 je("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],a=0;a<e.length;a++){for(var o=e[a],l=BF(),u=0;u<o.length;u++)if(!FF(o[u]))l.body.push(o[u]);else{n.push(l),u+=1;var h=YE(o[u]).text,f=new Array(2);if(f[0]={type:"ordgroup",mode:"math",body:[]},f[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(h)>-1))if("<>AV".indexOf(h)>-1)for(var d=0;d<2;d++){for(var p=!0,m=u+1;m<o.length;m++){if(wve(o[m],h)){p=!1,u=m;break}if(FF(o[m]))throw new je("Missing a "+h+" character to complete a CD arrow.",o[m]);f[d].body.push(o[m])}if(p)throw new je("Missing a "+h+" character to complete a CD arrow.",o[u])}else throw new je('Expected one of "<>AV=|." after @',o[u]);var g=Tve(h,f,t),y={type:"styling",body:[g],mode:"math",style:"display"};n.push(y),l=BF()}a%2===0?n.push(l):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 Yb(t,e){var r=Wb(t);if(r&&Mt.contains(Bve,r.text))return r;throw r?new je("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new je("Invalid delimiter type '"+t.type+"'",t)}function $F(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function Gl(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,l={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},u=0;u<r.length;++u)Oz[r[u]]=l;a&&(Fb[e]=a),o&&(zb[e]=o)}function J(t,e){Pz[t]=e}function GF(t){var e=[];t.consumeSpaces();var r=t.fetch().text;for(r==="\\relax"&&(t.consume(),t.consumeSpaces(),r=t.fetch().text);r==="\\hline"||r==="\\hdashline";)t.consume(),e.push(r==="\\hdashline"),t.consumeSpaces(),r=t.fetch().text;return e}function ZE(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function ch(t,e,r){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:o,colSeparationType:l,autoTag:u,singleRow:h,emptySingleRow:f,maxNumCols:d,leqno:p}=e;if(t.gullet.beginGroup(),h||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){var m=t.gullet.expandMacroAsText("\\arraystretch");if(m==null)o=1;else if(o=parseFloat(m),!o||o<0)throw new je("Invalid \\arraystretch: "+m)}t.gullet.beginGroup();var g=[],y=[g],v=[],x=[],b=u!=null?[]:void 0;function k(){u&&t.gullet.macros.set("\\@eqnsw","1",!0)}s(k,"beginRow");function A(){b&&(t.gullet.macros.get("\\df@tag")?(b.push(t.subparse([new go("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):b.push(!!u&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(s(A,"endRow"),k(),x.push(GF(t));;){var w=t.parseExpression(!1,h?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),w={type:"ordgroup",mode:t.mode,body:w},r&&(w={type:"styling",mode:t.mode,style:r,body:[w]}),g.push(w);var T=t.fetch().text;if(T==="&"){if(d&&g.length===d){if(h||l)throw new je("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(T==="\\end"){A(),g.length===1&&w.type==="styling"&&w.body[0].body.length===0&&(y.length>1||!f)&&y.pop(),x.length<y.length+1&&x.push([]);break}else if(T==="\\\\"){t.consume();var C=void 0;t.gullet.future().text!==" "&&(C=t.parseSizeGroup(!0)),v.push(C?C.value:null),A(),x.push(GF(t)),g=[],y.push(g),k()}else throw new je("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:i,arraystretch:o,body:y,cols:a,rowGaps:v,hskipBeforeAndAfter:n,hLinesBeforeRow:x,colSeparationType:l,tags:b,leqno:p}}function JE(t){return t.slice(0,1)==="d"?"display":"text"}function Wz(t,e,r){for(var n=Ti(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var o=n[a].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[a].classes,e.sizingClasses(r)):n[a].classes[o+1]==="reset-size"+e.size&&(n[a].classes[o+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return Ae.makeFragment(n)}var $s,go,je,cye,uye,hye,fye,dye,pye,iz,gye,yye,vye,Mt,Ib,F1,Bl,VE,Ob,ep,jc,z1,mo,tp,za,Fl,bye,kye,wye,Tye,Eye,Cye,Nt,DE,Nb,J0,_ye,Aye,Lye,Dye,Rye,Mye,Iye,Nye,Oye,_F,Pye,Pf,zl,wb,AF,vE,zye,LF,DF,Pb,RE,$ye,sz,Bn,tt,oh,oz,lz,cz,Bf,$1,ME,Gye,ls,Xo,$l,G1,Uye,qye,dn,G,Ye,Y,ge,Ln,lt,$a,rp,It,hi,Gs,Ub,ve,Jc,ke,uz,MF,xE,Tb,IF,bE,Eb,Bb,N1,Cb,$t,On,wa,Yc,ah,IE,O1,Sb,_b,NF,Wye,qb,Yo,Hye,Yye,Xye,jye,Kye,qE,ss,hz,Qye,Zye,fz,Jye,eve,tve,rve,Ab,dz,pz,nve,Ae,Pn,Nf,Xc,ive,ave,mz,Fb,zb,$b,ni,Qc,sve,ove,lve,cve,Ti,OF,gz,uve,NE,V1,vr,os,Of,PE,Xe,yo,WE,HE,cs,lh,nn,vz,xz,hve,fve,dve,pve,mve,gve,yve,vve,Zc,XE,bz,xve,Db,bve,Hb,kve,BF,FF,wve,Tz,Ez,BE,Cz,Cve,Sz,P1,jE,_z,Sve,_ve,Az,kE,wE,FE,Rb,Ave,Lve,Lz,TE,EE,CE,Dve,Dz,Rve,Rz,B1,Mve,Ive,Nve,Mz,Ove,Iz,Nz,Pve,Kc,zF,Bve,KE,QE,Oz,Pz,Xb,Vl,Fve,Ul,Bz,VF,Fz,zz,UF,$z,eC,tC,qF,WF,Gz,zve,SE,HF,Vz,Uz,np,U1,$ve,Gve,qz,Vve,YF,Uve,XF,qve,Hz,_E,AE,jF,KF,QF,Wve,ZF,JF,sh,Yz,Hve,Yve,Xve,jve,zE,Kve,Qve,Gb,$E,Zve,ez,rC,tz,nC,Xz,jz,Kz,GE,rz,Mb,LE,nz,Vb,iC,Qz,Jve,e2e,Zz,aC,t2e,r2e,e$=_(()=>{"use strict";$s=class t{static{s(this,"SourceLocation")}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}},go=class t{static{s(this,"Token")}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,$s.range(this,e))}},je=class t{static{s(this,"ParseError")}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,o=r&&r.loc;if(o&&o.start<=o.end){var l=o.lexer.input;i=o.start,a=o.end,i===l.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var u=l.slice(i,a).replace(/[^]/g,"$&\u0332"),h;i>15?h="\u2026"+l.slice(i-15,i):h=l.slice(0,i);var f;a+15<l.length?f=l.slice(a,a+15)+"\u2026":f=l.slice(a),n+=h+u+f}var d=new Error(n);return d.name="ParseError",d.__proto__=t.prototype,d.position=i,i!=null&&a!=null&&(d.length=a-i),d.rawMessage=e,d}};je.prototype.__proto__=Error.prototype;cye=s(function(e,r){return e.indexOf(r)!==-1},"contains"),uye=s(function(e,r){return e===void 0?r:e},"deflt"),hye=/([A-Z])/g,fye=s(function(e){return e.replace(hye,"-$1").toLowerCase()},"hyphenate"),dye={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},pye=/[&><"']/g;s(mye,"escape");iz=s(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},"getBaseElem"),gye=s(function(e){var r=iz(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},"isCharacterBox"),yye=s(function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},"assert"),vye=s(function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},"protocolFromUrl"),Mt={contains:cye,deflt:uye,escape:mye,hyphenate:fye,getBaseElem:iz,isCharacterBox:gye,protocolFromUrl:vye},Ib={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:s(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:s((t,e)=>(e.push(t),e),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:s(t=>Math.max(0,t),"processor"),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:s(t=>Math.max(0,t),"processor"),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:s(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand <n>",cliProcessor:s(t=>t==="Infinity"?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}};s(xye,"getDefaultValue");F1=class{static{s(this,"Settings")}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 Ib)if(Ib.hasOwnProperty(r)){var n=Ib[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:xye(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 je("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=Mt.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}},Bl=class{static{s(this,"Style")}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 Fl[bye[this.id]]}sub(){return Fl[kye[this.id]]}fracNum(){return Fl[wye[this.id]]}fracDen(){return Fl[Tye[this.id]]}cramp(){return Fl[Eye[this.id]]}text(){return Fl[Cye[this.id]]}isTight(){return this.size>=2}},VE=0,Ob=1,ep=2,jc=3,z1=4,mo=5,tp=6,za=7,Fl=[new Bl(VE,0,!1),new Bl(Ob,0,!0),new Bl(ep,1,!1),new Bl(jc,1,!0),new Bl(z1,2,!1),new Bl(mo,2,!0),new Bl(tp,3,!1),new Bl(za,3,!0)],bye=[z1,mo,z1,mo,tp,za,tp,za],kye=[mo,mo,mo,mo,za,za,za,za],wye=[ep,jc,z1,mo,tp,za,tp,za],Tye=[jc,jc,mo,mo,za,za,za,za],Eye=[Ob,Ob,jc,jc,mo,mo,za,za],Cye=[VE,Ob,ep,jc,ep,jc,ep,jc],Nt={DISPLAY:Fl[VE],TEXT:Fl[ep],SCRIPT:Fl[z1],SCRIPTSCRIPT:Fl[tp]},DE=[{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]]}];s(Sye,"scriptFromCodepoint");Nb=[];DE.forEach(t=>t.blocks.forEach(e=>Nb.push(...e)));s(az,"supportedCodepoint");J0=80,_ye=s(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"},"sqrtMain"),Aye=s(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"},"sqrtSize1"),Lye=s(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"},"sqrtSize2"),Dye=s(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"},"sqrtSize3"),Rye=s(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"},"sqrtSize4"),Mye=s(function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),Iye=s(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"},"sqrtTall"),Nye=s(function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=_ye(r,J0);break;case"sqrtSize1":i=Aye(r,J0);break;case"sqrtSize2":i=Lye(r,J0);break;case"sqrtSize3":i=Dye(r,J0);break;case"sqrtSize4":i=Rye(r,J0);break;case"sqrtTall":i=Iye(r,J0,n)}return i},"sqrtPath"),Oye=s(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""}},"innerPath"),_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`},Pye=s(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.")}},"tallDelim"),Pf=class{static{s(this,"DocumentFragment")}constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Mt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){for(var e="",r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e}toText(){var e=s(r=>r.toText(),"toText");return this.children.map(e).join("")}},zl={"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]}},wb={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]},AF={\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"};s(Bye,"setFontMetrics");s(UE,"getCharacterMetrics");vE={};s(Fye,"getGlobalMetrics");zye=[[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]],LF=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],DF=s(function(e,r){return r.size<2?e:zye[e-1][r.size-1]},"sizeAtStyle"),Pb=class t{static{s(this,"Options")}constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||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=LF[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:DF(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:LF[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=DF(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=Fye(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Pb.BASESIZE=6;RE={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},$ye={ex:!0,em:!0,mu:!0},sz=s(function(e){return typeof e!="string"&&(e=e.unit),e in RE||e in $ye||e==="ex"},"validUnit"),Bn=s(function(e,r){var n;if(e.unit in RE)n=RE[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 je("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},"calculateSize"),tt=s(function(e){return+e.toFixed(4)+"em"},"makeEm"),oh=s(function(e){return e.filter(r=>r).join(" ")},"createClass"),oz=s(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)}},"initNode"),lz=s(function(e){var r=document.createElement(e);r.className=oh(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<this.children.length;a++)r.appendChild(this.children[a].toNode());return r},"toNode"),cz=s(function(e){var r="<"+e;this.classes.length&&(r+=' class="'+Mt.escape(oh(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Mt.hyphenate(i)+":"+this.style[i]+";");n&&(r+=' style="'+Mt.escape(n)+'"');for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&(r+=" "+a+'="'+Mt.escape(this.attributes[a])+'"');r+=">";for(var o=0;o<this.children.length;o++)r+=this.children[o].toMarkup();return r+="</"+e+">",r},"toMarkup"),Bf=class{static{s(this,"Span")}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,oz.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return Mt.contains(this.classes,e)}toNode(){return lz.call(this,"span")}toMarkup(){return cz.call(this,"span")}},$1=class{static{s(this,"Anchor")}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,oz.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return Mt.contains(this.classes,e)}toNode(){return lz.call(this,"a")}toMarkup(){return cz.call(this,"a")}},ME=class{static{s(this,"Img")}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 Mt.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='<img src="'+Mt.escape(this.src)+'"'+(' alt="'+Mt.escape(this.alt)+'"'),r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=Mt.hyphenate(n)+":"+this.style[n]+";");return r&&(e+=' style="'+Mt.escape(r)+'"'),e+="'/>",e}},Gye={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},ls=class{static{s(this,"SymbolNode")}constructor(e,r,n,i,a,o,l,u){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=r||0,this.depth=n||0,this.italic=i||0,this.skew=a||0,this.width=o||0,this.classes=l||[],this.style=u||{},this.maxFontSize=0;var h=Sye(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Gye[this.text])}hasClass(e){return Mt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=tt(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=oh(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="<span";this.classes.length&&(e=!0,r+=' class="',r+=Mt.escape(oh(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Mt.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+Mt.escape(n)+'"');var a=Mt.escape(this.text);return e?(r+=">",r+=a,r+="</span>",r):a}},Xo=class{static{s(this,"SvgNode")}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<this.children.length;i++)r.appendChild(this.children[i].toNode());return r}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="'+Mt.escape(this.attributes[r])+'"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}},$l=class{static{s(this,"PathNode")}constructor(e,r){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=r}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",_F[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+Mt.escape(this.alternate)+'"/>':'<path d="'+Mt.escape(_F[this.pathName])+'"/>'}},G1=class{static{s(this,"LineNode")}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="<line";for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="'+Mt.escape(this.attributes[r])+'"');return e+="/>",e}};s(RF,"assertSymbolDomNode");s(Vye,"assertSpan");Uye={bin:1,close:1,inner:1,open:1,punct:1,rel:1},qye={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},dn={math:{},text:{}};s(B,"defineSymbol");G="math",Ye="text",Y="main",ge="ams",Ln="accent-token",lt="bin",$a="close",rp="inner",It="mathord",hi="op-token",Gs="open",Ub="punct",ve="rel",Jc="spacing",ke="textord";B(G,Y,ve,"\u2261","\\equiv",!0);B(G,Y,ve,"\u227A","\\prec",!0);B(G,Y,ve,"\u227B","\\succ",!0);B(G,Y,ve,"\u223C","\\sim",!0);B(G,Y,ve,"\u22A5","\\perp");B(G,Y,ve,"\u2AAF","\\preceq",!0);B(G,Y,ve,"\u2AB0","\\succeq",!0);B(G,Y,ve,"\u2243","\\simeq",!0);B(G,Y,ve,"\u2223","\\mid",!0);B(G,Y,ve,"\u226A","\\ll",!0);B(G,Y,ve,"\u226B","\\gg",!0);B(G,Y,ve,"\u224D","\\asymp",!0);B(G,Y,ve,"\u2225","\\parallel");B(G,Y,ve,"\u22C8","\\bowtie",!0);B(G,Y,ve,"\u2323","\\smile",!0);B(G,Y,ve,"\u2291","\\sqsubseteq",!0);B(G,Y,ve,"\u2292","\\sqsupseteq",!0);B(G,Y,ve,"\u2250","\\doteq",!0);B(G,Y,ve,"\u2322","\\frown",!0);B(G,Y,ve,"\u220B","\\ni",!0);B(G,Y,ve,"\u221D","\\propto",!0);B(G,Y,ve,"\u22A2","\\vdash",!0);B(G,Y,ve,"\u22A3","\\dashv",!0);B(G,Y,ve,"\u220B","\\owns");B(G,Y,Ub,".","\\ldotp");B(G,Y,Ub,"\u22C5","\\cdotp");B(G,Y,ke,"#","\\#");B(Ye,Y,ke,"#","\\#");B(G,Y,ke,"&","\\&");B(Ye,Y,ke,"&","\\&");B(G,Y,ke,"\u2135","\\aleph",!0);B(G,Y,ke,"\u2200","\\forall",!0);B(G,Y,ke,"\u210F","\\hbar",!0);B(G,Y,ke,"\u2203","\\exists",!0);B(G,Y,ke,"\u2207","\\nabla",!0);B(G,Y,ke,"\u266D","\\flat",!0);B(G,Y,ke,"\u2113","\\ell",!0);B(G,Y,ke,"\u266E","\\natural",!0);B(G,Y,ke,"\u2663","\\clubsuit",!0);B(G,Y,ke,"\u2118","\\wp",!0);B(G,Y,ke,"\u266F","\\sharp",!0);B(G,Y,ke,"\u2662","\\diamondsuit",!0);B(G,Y,ke,"\u211C","\\Re",!0);B(G,Y,ke,"\u2661","\\heartsuit",!0);B(G,Y,ke,"\u2111","\\Im",!0);B(G,Y,ke,"\u2660","\\spadesuit",!0);B(G,Y,ke,"\xA7","\\S",!0);B(Ye,Y,ke,"\xA7","\\S");B(G,Y,ke,"\xB6","\\P",!0);B(Ye,Y,ke,"\xB6","\\P");B(G,Y,ke,"\u2020","\\dag");B(Ye,Y,ke,"\u2020","\\dag");B(Ye,Y,ke,"\u2020","\\textdagger");B(G,Y,ke,"\u2021","\\ddag");B(Ye,Y,ke,"\u2021","\\ddag");B(Ye,Y,ke,"\u2021","\\textdaggerdbl");B(G,Y,$a,"\u23B1","\\rmoustache",!0);B(G,Y,Gs,"\u23B0","\\lmoustache",!0);B(G,Y,$a,"\u27EF","\\rgroup",!0);B(G,Y,Gs,"\u27EE","\\lgroup",!0);B(G,Y,lt,"\u2213","\\mp",!0);B(G,Y,lt,"\u2296","\\ominus",!0);B(G,Y,lt,"\u228E","\\uplus",!0);B(G,Y,lt,"\u2293","\\sqcap",!0);B(G,Y,lt,"\u2217","\\ast");B(G,Y,lt,"\u2294","\\sqcup",!0);B(G,Y,lt,"\u25EF","\\bigcirc",!0);B(G,Y,lt,"\u2219","\\bullet",!0);B(G,Y,lt,"\u2021","\\ddagger");B(G,Y,lt,"\u2240","\\wr",!0);B(G,Y,lt,"\u2A3F","\\amalg");B(G,Y,lt,"&","\\And");B(G,Y,ve,"\u27F5","\\longleftarrow",!0);B(G,Y,ve,"\u21D0","\\Leftarrow",!0);B(G,Y,ve,"\u27F8","\\Longleftarrow",!0);B(G,Y,ve,"\u27F6","\\longrightarrow",!0);B(G,Y,ve,"\u21D2","\\Rightarrow",!0);B(G,Y,ve,"\u27F9","\\Longrightarrow",!0);B(G,Y,ve,"\u2194","\\leftrightarrow",!0);B(G,Y,ve,"\u27F7","\\longleftrightarrow",!0);B(G,Y,ve,"\u21D4","\\Leftrightarrow",!0);B(G,Y,ve,"\u27FA","\\Longleftrightarrow",!0);B(G,Y,ve,"\u21A6","\\mapsto",!0);B(G,Y,ve,"\u27FC","\\longmapsto",!0);B(G,Y,ve,"\u2197","\\nearrow",!0);B(G,Y,ve,"\u21A9","\\hookleftarrow",!0);B(G,Y,ve,"\u21AA","\\hookrightarrow",!0);B(G,Y,ve,"\u2198","\\searrow",!0);B(G,Y,ve,"\u21BC","\\leftharpoonup",!0);B(G,Y,ve,"\u21C0","\\rightharpoonup",!0);B(G,Y,ve,"\u2199","\\swarrow",!0);B(G,Y,ve,"\u21BD","\\leftharpoondown",!0);B(G,Y,ve,"\u21C1","\\rightharpoondown",!0);B(G,Y,ve,"\u2196","\\nwarrow",!0);B(G,Y,ve,"\u21CC","\\rightleftharpoons",!0);B(G,ge,ve,"\u226E","\\nless",!0);B(G,ge,ve,"\uE010","\\@nleqslant");B(G,ge,ve,"\uE011","\\@nleqq");B(G,ge,ve,"\u2A87","\\lneq",!0);B(G,ge,ve,"\u2268","\\lneqq",!0);B(G,ge,ve,"\uE00C","\\@lvertneqq");B(G,ge,ve,"\u22E6","\\lnsim",!0);B(G,ge,ve,"\u2A89","\\lnapprox",!0);B(G,ge,ve,"\u2280","\\nprec",!0);B(G,ge,ve,"\u22E0","\\npreceq",!0);B(G,ge,ve,"\u22E8","\\precnsim",!0);B(G,ge,ve,"\u2AB9","\\precnapprox",!0);B(G,ge,ve,"\u2241","\\nsim",!0);B(G,ge,ve,"\uE006","\\@nshortmid");B(G,ge,ve,"\u2224","\\nmid",!0);B(G,ge,ve,"\u22AC","\\nvdash",!0);B(G,ge,ve,"\u22AD","\\nvDash",!0);B(G,ge,ve,"\u22EA","\\ntriangleleft");B(G,ge,ve,"\u22EC","\\ntrianglelefteq",!0);B(G,ge,ve,"\u228A","\\subsetneq",!0);B(G,ge,ve,"\uE01A","\\@varsubsetneq");B(G,ge,ve,"\u2ACB","\\subsetneqq",!0);B(G,ge,ve,"\uE017","\\@varsubsetneqq");B(G,ge,ve,"\u226F","\\ngtr",!0);B(G,ge,ve,"\uE00F","\\@ngeqslant");B(G,ge,ve,"\uE00E","\\@ngeqq");B(G,ge,ve,"\u2A88","\\gneq",!0);B(G,ge,ve,"\u2269","\\gneqq",!0);B(G,ge,ve,"\uE00D","\\@gvertneqq");B(G,ge,ve,"\u22E7","\\gnsim",!0);B(G,ge,ve,"\u2A8A","\\gnapprox",!0);B(G,ge,ve,"\u2281","\\nsucc",!0);B(G,ge,ve,"\u22E1","\\nsucceq",!0);B(G,ge,ve,"\u22E9","\\succnsim",!0);B(G,ge,ve,"\u2ABA","\\succnapprox",!0);B(G,ge,ve,"\u2246","\\ncong",!0);B(G,ge,ve,"\uE007","\\@nshortparallel");B(G,ge,ve,"\u2226","\\nparallel",!0);B(G,ge,ve,"\u22AF","\\nVDash",!0);B(G,ge,ve,"\u22EB","\\ntriangleright");B(G,ge,ve,"\u22ED","\\ntrianglerighteq",!0);B(G,ge,ve,"\uE018","\\@nsupseteqq");B(G,ge,ve,"\u228B","\\supsetneq",!0);B(G,ge,ve,"\uE01B","\\@varsupsetneq");B(G,ge,ve,"\u2ACC","\\supsetneqq",!0);B(G,ge,ve,"\uE019","\\@varsupsetneqq");B(G,ge,ve,"\u22AE","\\nVdash",!0);B(G,ge,ve,"\u2AB5","\\precneqq",!0);B(G,ge,ve,"\u2AB6","\\succneqq",!0);B(G,ge,ve,"\uE016","\\@nsubseteqq");B(G,ge,lt,"\u22B4","\\unlhd");B(G,ge,lt,"\u22B5","\\unrhd");B(G,ge,ve,"\u219A","\\nleftarrow",!0);B(G,ge,ve,"\u219B","\\nrightarrow",!0);B(G,ge,ve,"\u21CD","\\nLeftarrow",!0);B(G,ge,ve,"\u21CF","\\nRightarrow",!0);B(G,ge,ve,"\u21AE","\\nleftrightarrow",!0);B(G,ge,ve,"\u21CE","\\nLeftrightarrow",!0);B(G,ge,ve,"\u25B3","\\vartriangle");B(G,ge,ke,"\u210F","\\hslash");B(G,ge,ke,"\u25BD","\\triangledown");B(G,ge,ke,"\u25CA","\\lozenge");B(G,ge,ke,"\u24C8","\\circledS");B(G,ge,ke,"\xAE","\\circledR");B(Ye,ge,ke,"\xAE","\\circledR");B(G,ge,ke,"\u2221","\\measuredangle",!0);B(G,ge,ke,"\u2204","\\nexists");B(G,ge,ke,"\u2127","\\mho");B(G,ge,ke,"\u2132","\\Finv",!0);B(G,ge,ke,"\u2141","\\Game",!0);B(G,ge,ke,"\u2035","\\backprime");B(G,ge,ke,"\u25B2","\\blacktriangle");B(G,ge,ke,"\u25BC","\\blacktriangledown");B(G,ge,ke,"\u25A0","\\blacksquare");B(G,ge,ke,"\u29EB","\\blacklozenge");B(G,ge,ke,"\u2605","\\bigstar");B(G,ge,ke,"\u2222","\\sphericalangle",!0);B(G,ge,ke,"\u2201","\\complement",!0);B(G,ge,ke,"\xF0","\\eth",!0);B(Ye,Y,ke,"\xF0","\xF0");B(G,ge,ke,"\u2571","\\diagup");B(G,ge,ke,"\u2572","\\diagdown");B(G,ge,ke,"\u25A1","\\square");B(G,ge,ke,"\u25A1","\\Box");B(G,ge,ke,"\u25CA","\\Diamond");B(G,ge,ke,"\xA5","\\yen",!0);B(Ye,ge,ke,"\xA5","\\yen",!0);B(G,ge,ke,"\u2713","\\checkmark",!0);B(Ye,ge,ke,"\u2713","\\checkmark");B(G,ge,ke,"\u2136","\\beth",!0);B(G,ge,ke,"\u2138","\\daleth",!0);B(G,ge,ke,"\u2137","\\gimel",!0);B(G,ge,ke,"\u03DD","\\digamma",!0);B(G,ge,ke,"\u03F0","\\varkappa");B(G,ge,Gs,"\u250C","\\@ulcorner",!0);B(G,ge,$a,"\u2510","\\@urcorner",!0);B(G,ge,Gs,"\u2514","\\@llcorner",!0);B(G,ge,$a,"\u2518","\\@lrcorner",!0);B(G,ge,ve,"\u2266","\\leqq",!0);B(G,ge,ve,"\u2A7D","\\leqslant",!0);B(G,ge,ve,"\u2A95","\\eqslantless",!0);B(G,ge,ve,"\u2272","\\lesssim",!0);B(G,ge,ve,"\u2A85","\\lessapprox",!0);B(G,ge,ve,"\u224A","\\approxeq",!0);B(G,ge,lt,"\u22D6","\\lessdot");B(G,ge,ve,"\u22D8","\\lll",!0);B(G,ge,ve,"\u2276","\\lessgtr",!0);B(G,ge,ve,"\u22DA","\\lesseqgtr",!0);B(G,ge,ve,"\u2A8B","\\lesseqqgtr",!0);B(G,ge,ve,"\u2251","\\doteqdot");B(G,ge,ve,"\u2253","\\risingdotseq",!0);B(G,ge,ve,"\u2252","\\fallingdotseq",!0);B(G,ge,ve,"\u223D","\\backsim",!0);B(G,ge,ve,"\u22CD","\\backsimeq",!0);B(G,ge,ve,"\u2AC5","\\subseteqq",!0);B(G,ge,ve,"\u22D0","\\Subset",!0);B(G,ge,ve,"\u228F","\\sqsubset",!0);B(G,ge,ve,"\u227C","\\preccurlyeq",!0);B(G,ge,ve,"\u22DE","\\curlyeqprec",!0);B(G,ge,ve,"\u227E","\\precsim",!0);B(G,ge,ve,"\u2AB7","\\precapprox",!0);B(G,ge,ve,"\u22B2","\\vartriangleleft");B(G,ge,ve,"\u22B4","\\trianglelefteq");B(G,ge,ve,"\u22A8","\\vDash",!0);B(G,ge,ve,"\u22AA","\\Vvdash",!0);B(G,ge,ve,"\u2323","\\smallsmile");B(G,ge,ve,"\u2322","\\smallfrown");B(G,ge,ve,"\u224F","\\bumpeq",!0);B(G,ge,ve,"\u224E","\\Bumpeq",!0);B(G,ge,ve,"\u2267","\\geqq",!0);B(G,ge,ve,"\u2A7E","\\geqslant",!0);B(G,ge,ve,"\u2A96","\\eqslantgtr",!0);B(G,ge,ve,"\u2273","\\gtrsim",!0);B(G,ge,ve,"\u2A86","\\gtrapprox",!0);B(G,ge,lt,"\u22D7","\\gtrdot");B(G,ge,ve,"\u22D9","\\ggg",!0);B(G,ge,ve,"\u2277","\\gtrless",!0);B(G,ge,ve,"\u22DB","\\gtreqless",!0);B(G,ge,ve,"\u2A8C","\\gtreqqless",!0);B(G,ge,ve,"\u2256","\\eqcirc",!0);B(G,ge,ve,"\u2257","\\circeq",!0);B(G,ge,ve,"\u225C","\\triangleq",!0);B(G,ge,ve,"\u223C","\\thicksim");B(G,ge,ve,"\u2248","\\thickapprox");B(G,ge,ve,"\u2AC6","\\supseteqq",!0);B(G,ge,ve,"\u22D1","\\Supset",!0);B(G,ge,ve,"\u2290","\\sqsupset",!0);B(G,ge,ve,"\u227D","\\succcurlyeq",!0);B(G,ge,ve,"\u22DF","\\curlyeqsucc",!0);B(G,ge,ve,"\u227F","\\succsim",!0);B(G,ge,ve,"\u2AB8","\\succapprox",!0);B(G,ge,ve,"\u22B3","\\vartriangleright");B(G,ge,ve,"\u22B5","\\trianglerighteq");B(G,ge,ve,"\u22A9","\\Vdash",!0);B(G,ge,ve,"\u2223","\\shortmid");B(G,ge,ve,"\u2225","\\shortparallel");B(G,ge,ve,"\u226C","\\between",!0);B(G,ge,ve,"\u22D4","\\pitchfork",!0);B(G,ge,ve,"\u221D","\\varpropto");B(G,ge,ve,"\u25C0","\\blacktriangleleft");B(G,ge,ve,"\u2234","\\therefore",!0);B(G,ge,ve,"\u220D","\\backepsilon");B(G,ge,ve,"\u25B6","\\blacktriangleright");B(G,ge,ve,"\u2235","\\because",!0);B(G,ge,ve,"\u22D8","\\llless");B(G,ge,ve,"\u22D9","\\gggtr");B(G,ge,lt,"\u22B2","\\lhd");B(G,ge,lt,"\u22B3","\\rhd");B(G,ge,ve,"\u2242","\\eqsim",!0);B(G,Y,ve,"\u22C8","\\Join");B(G,ge,ve,"\u2251","\\Doteq",!0);B(G,ge,lt,"\u2214","\\dotplus",!0);B(G,ge,lt,"\u2216","\\smallsetminus");B(G,ge,lt,"\u22D2","\\Cap",!0);B(G,ge,lt,"\u22D3","\\Cup",!0);B(G,ge,lt,"\u2A5E","\\doublebarwedge",!0);B(G,ge,lt,"\u229F","\\boxminus",!0);B(G,ge,lt,"\u229E","\\boxplus",!0);B(G,ge,lt,"\u22C7","\\divideontimes",!0);B(G,ge,lt,"\u22C9","\\ltimes",!0);B(G,ge,lt,"\u22CA","\\rtimes",!0);B(G,ge,lt,"\u22CB","\\leftthreetimes",!0);B(G,ge,lt,"\u22CC","\\rightthreetimes",!0);B(G,ge,lt,"\u22CF","\\curlywedge",!0);B(G,ge,lt,"\u22CE","\\curlyvee",!0);B(G,ge,lt,"\u229D","\\circleddash",!0);B(G,ge,lt,"\u229B","\\circledast",!0);B(G,ge,lt,"\u22C5","\\centerdot");B(G,ge,lt,"\u22BA","\\intercal",!0);B(G,ge,lt,"\u22D2","\\doublecap");B(G,ge,lt,"\u22D3","\\doublecup");B(G,ge,lt,"\u22A0","\\boxtimes",!0);B(G,ge,ve,"\u21E2","\\dashrightarrow",!0);B(G,ge,ve,"\u21E0","\\dashleftarrow",!0);B(G,ge,ve,"\u21C7","\\leftleftarrows",!0);B(G,ge,ve,"\u21C6","\\leftrightarrows",!0);B(G,ge,ve,"\u21DA","\\Lleftarrow",!0);B(G,ge,ve,"\u219E","\\twoheadleftarrow",!0);B(G,ge,ve,"\u21A2","\\leftarrowtail",!0);B(G,ge,ve,"\u21AB","\\looparrowleft",!0);B(G,ge,ve,"\u21CB","\\leftrightharpoons",!0);B(G,ge,ve,"\u21B6","\\curvearrowleft",!0);B(G,ge,ve,"\u21BA","\\circlearrowleft",!0);B(G,ge,ve,"\u21B0","\\Lsh",!0);B(G,ge,ve,"\u21C8","\\upuparrows",!0);B(G,ge,ve,"\u21BF","\\upharpoonleft",!0);B(G,ge,ve,"\u21C3","\\downharpoonleft",!0);B(G,Y,ve,"\u22B6","\\origof",!0);B(G,Y,ve,"\u22B7","\\imageof",!0);B(G,ge,ve,"\u22B8","\\multimap",!0);B(G,ge,ve,"\u21AD","\\leftrightsquigarrow",!0);B(G,ge,ve,"\u21C9","\\rightrightarrows",!0);B(G,ge,ve,"\u21C4","\\rightleftarrows",!0);B(G,ge,ve,"\u21A0","\\twoheadrightarrow",!0);B(G,ge,ve,"\u21A3","\\rightarrowtail",!0);B(G,ge,ve,"\u21AC","\\looparrowright",!0);B(G,ge,ve,"\u21B7","\\curvearrowright",!0);B(G,ge,ve,"\u21BB","\\circlearrowright",!0);B(G,ge,ve,"\u21B1","\\Rsh",!0);B(G,ge,ve,"\u21CA","\\downdownarrows",!0);B(G,ge,ve,"\u21BE","\\upharpoonright",!0);B(G,ge,ve,"\u21C2","\\downharpoonright",!0);B(G,ge,ve,"\u21DD","\\rightsquigarrow",!0);B(G,ge,ve,"\u21DD","\\leadsto");B(G,ge,ve,"\u21DB","\\Rrightarrow",!0);B(G,ge,ve,"\u21BE","\\restriction");B(G,Y,ke,"\u2018","`");B(G,Y,ke,"$","\\$");B(Ye,Y,ke,"$","\\$");B(Ye,Y,ke,"$","\\textdollar");B(G,Y,ke,"%","\\%");B(Ye,Y,ke,"%","\\%");B(G,Y,ke,"_","\\_");B(Ye,Y,ke,"_","\\_");B(Ye,Y,ke,"_","\\textunderscore");B(G,Y,ke,"\u2220","\\angle",!0);B(G,Y,ke,"\u221E","\\infty",!0);B(G,Y,ke,"\u2032","\\prime");B(G,Y,ke,"\u25B3","\\triangle");B(G,Y,ke,"\u0393","\\Gamma",!0);B(G,Y,ke,"\u0394","\\Delta",!0);B(G,Y,ke,"\u0398","\\Theta",!0);B(G,Y,ke,"\u039B","\\Lambda",!0);B(G,Y,ke,"\u039E","\\Xi",!0);B(G,Y,ke,"\u03A0","\\Pi",!0);B(G,Y,ke,"\u03A3","\\Sigma",!0);B(G,Y,ke,"\u03A5","\\Upsilon",!0);B(G,Y,ke,"\u03A6","\\Phi",!0);B(G,Y,ke,"\u03A8","\\Psi",!0);B(G,Y,ke,"\u03A9","\\Omega",!0);B(G,Y,ke,"A","\u0391");B(G,Y,ke,"B","\u0392");B(G,Y,ke,"E","\u0395");B(G,Y,ke,"Z","\u0396");B(G,Y,ke,"H","\u0397");B(G,Y,ke,"I","\u0399");B(G,Y,ke,"K","\u039A");B(G,Y,ke,"M","\u039C");B(G,Y,ke,"N","\u039D");B(G,Y,ke,"O","\u039F");B(G,Y,ke,"P","\u03A1");B(G,Y,ke,"T","\u03A4");B(G,Y,ke,"X","\u03A7");B(G,Y,ke,"\xAC","\\neg",!0);B(G,Y,ke,"\xAC","\\lnot");B(G,Y,ke,"\u22A4","\\top");B(G,Y,ke,"\u22A5","\\bot");B(G,Y,ke,"\u2205","\\emptyset");B(G,ge,ke,"\u2205","\\varnothing");B(G,Y,It,"\u03B1","\\alpha",!0);B(G,Y,It,"\u03B2","\\beta",!0);B(G,Y,It,"\u03B3","\\gamma",!0);B(G,Y,It,"\u03B4","\\delta",!0);B(G,Y,It,"\u03F5","\\epsilon",!0);B(G,Y,It,"\u03B6","\\zeta",!0);B(G,Y,It,"\u03B7","\\eta",!0);B(G,Y,It,"\u03B8","\\theta",!0);B(G,Y,It,"\u03B9","\\iota",!0);B(G,Y,It,"\u03BA","\\kappa",!0);B(G,Y,It,"\u03BB","\\lambda",!0);B(G,Y,It,"\u03BC","\\mu",!0);B(G,Y,It,"\u03BD","\\nu",!0);B(G,Y,It,"\u03BE","\\xi",!0);B(G,Y,It,"\u03BF","\\omicron",!0);B(G,Y,It,"\u03C0","\\pi",!0);B(G,Y,It,"\u03C1","\\rho",!0);B(G,Y,It,"\u03C3","\\sigma",!0);B(G,Y,It,"\u03C4","\\tau",!0);B(G,Y,It,"\u03C5","\\upsilon",!0);B(G,Y,It,"\u03D5","\\phi",!0);B(G,Y,It,"\u03C7","\\chi",!0);B(G,Y,It,"\u03C8","\\psi",!0);B(G,Y,It,"\u03C9","\\omega",!0);B(G,Y,It,"\u03B5","\\varepsilon",!0);B(G,Y,It,"\u03D1","\\vartheta",!0);B(G,Y,It,"\u03D6","\\varpi",!0);B(G,Y,It,"\u03F1","\\varrho",!0);B(G,Y,It,"\u03C2","\\varsigma",!0);B(G,Y,It,"\u03C6","\\varphi",!0);B(G,Y,lt,"\u2217","*",!0);B(G,Y,lt,"+","+");B(G,Y,lt,"\u2212","-",!0);B(G,Y,lt,"\u22C5","\\cdot",!0);B(G,Y,lt,"\u2218","\\circ",!0);B(G,Y,lt,"\xF7","\\div",!0);B(G,Y,lt,"\xB1","\\pm",!0);B(G,Y,lt,"\xD7","\\times",!0);B(G,Y,lt,"\u2229","\\cap",!0);B(G,Y,lt,"\u222A","\\cup",!0);B(G,Y,lt,"\u2216","\\setminus",!0);B(G,Y,lt,"\u2227","\\land");B(G,Y,lt,"\u2228","\\lor");B(G,Y,lt,"\u2227","\\wedge",!0);B(G,Y,lt,"\u2228","\\vee",!0);B(G,Y,ke,"\u221A","\\surd");B(G,Y,Gs,"\u27E8","\\langle",!0);B(G,Y,Gs,"\u2223","\\lvert");B(G,Y,Gs,"\u2225","\\lVert");B(G,Y,$a,"?","?");B(G,Y,$a,"!","!");B(G,Y,$a,"\u27E9","\\rangle",!0);B(G,Y,$a,"\u2223","\\rvert");B(G,Y,$a,"\u2225","\\rVert");B(G,Y,ve,"=","=");B(G,Y,ve,":",":");B(G,Y,ve,"\u2248","\\approx",!0);B(G,Y,ve,"\u2245","\\cong",!0);B(G,Y,ve,"\u2265","\\ge");B(G,Y,ve,"\u2265","\\geq",!0);B(G,Y,ve,"\u2190","\\gets");B(G,Y,ve,">","\\gt",!0);B(G,Y,ve,"\u2208","\\in",!0);B(G,Y,ve,"\uE020","\\@not");B(G,Y,ve,"\u2282","\\subset",!0);B(G,Y,ve,"\u2283","\\supset",!0);B(G,Y,ve,"\u2286","\\subseteq",!0);B(G,Y,ve,"\u2287","\\supseteq",!0);B(G,ge,ve,"\u2288","\\nsubseteq",!0);B(G,ge,ve,"\u2289","\\nsupseteq",!0);B(G,Y,ve,"\u22A8","\\models");B(G,Y,ve,"\u2190","\\leftarrow",!0);B(G,Y,ve,"\u2264","\\le");B(G,Y,ve,"\u2264","\\leq",!0);B(G,Y,ve,"<","\\lt",!0);B(G,Y,ve,"\u2192","\\rightarrow",!0);B(G,Y,ve,"\u2192","\\to");B(G,ge,ve,"\u2271","\\ngeq",!0);B(G,ge,ve,"\u2270","\\nleq",!0);B(G,Y,Jc,"\xA0","\\ ");B(G,Y,Jc,"\xA0","\\space");B(G,Y,Jc,"\xA0","\\nobreakspace");B(Ye,Y,Jc,"\xA0","\\ ");B(Ye,Y,Jc,"\xA0"," ");B(Ye,Y,Jc,"\xA0","\\space");B(Ye,Y,Jc,"\xA0","\\nobreakspace");B(G,Y,Jc,null,"\\nobreak");B(G,Y,Jc,null,"\\allowbreak");B(G,Y,Ub,",",",");B(G,Y,Ub,";",";");B(G,ge,lt,"\u22BC","\\barwedge",!0);B(G,ge,lt,"\u22BB","\\veebar",!0);B(G,Y,lt,"\u2299","\\odot",!0);B(G,Y,lt,"\u2295","\\oplus",!0);B(G,Y,lt,"\u2297","\\otimes",!0);B(G,Y,ke,"\u2202","\\partial",!0);B(G,Y,lt,"\u2298","\\oslash",!0);B(G,ge,lt,"\u229A","\\circledcirc",!0);B(G,ge,lt,"\u22A1","\\boxdot",!0);B(G,Y,lt,"\u25B3","\\bigtriangleup");B(G,Y,lt,"\u25BD","\\bigtriangledown");B(G,Y,lt,"\u2020","\\dagger");B(G,Y,lt,"\u22C4","\\diamond");B(G,Y,lt,"\u22C6","\\star");B(G,Y,lt,"\u25C3","\\triangleleft");B(G,Y,lt,"\u25B9","\\triangleright");B(G,Y,Gs,"{","\\{");B(Ye,Y,ke,"{","\\{");B(Ye,Y,ke,"{","\\textbraceleft");B(G,Y,$a,"}","\\}");B(Ye,Y,ke,"}","\\}");B(Ye,Y,ke,"}","\\textbraceright");B(G,Y,Gs,"{","\\lbrace");B(G,Y,$a,"}","\\rbrace");B(G,Y,Gs,"[","\\lbrack",!0);B(Ye,Y,ke,"[","\\lbrack",!0);B(G,Y,$a,"]","\\rbrack",!0);B(Ye,Y,ke,"]","\\rbrack",!0);B(G,Y,Gs,"(","\\lparen",!0);B(G,Y,$a,")","\\rparen",!0);B(Ye,Y,ke,"<","\\textless",!0);B(Ye,Y,ke,">","\\textgreater",!0);B(G,Y,Gs,"\u230A","\\lfloor",!0);B(G,Y,$a,"\u230B","\\rfloor",!0);B(G,Y,Gs,"\u2308","\\lceil",!0);B(G,Y,$a,"\u2309","\\rceil",!0);B(G,Y,ke,"\\","\\backslash");B(G,Y,ke,"\u2223","|");B(G,Y,ke,"\u2223","\\vert");B(Ye,Y,ke,"|","\\textbar",!0);B(G,Y,ke,"\u2225","\\|");B(G,Y,ke,"\u2225","\\Vert");B(Ye,Y,ke,"\u2225","\\textbardbl");B(Ye,Y,ke,"~","\\textasciitilde");B(Ye,Y,ke,"\\","\\textbackslash");B(Ye,Y,ke,"^","\\textasciicircum");B(G,Y,ve,"\u2191","\\uparrow",!0);B(G,Y,ve,"\u21D1","\\Uparrow",!0);B(G,Y,ve,"\u2193","\\downarrow",!0);B(G,Y,ve,"\u21D3","\\Downarrow",!0);B(G,Y,ve,"\u2195","\\updownarrow",!0);B(G,Y,ve,"\u21D5","\\Updownarrow",!0);B(G,Y,hi,"\u2210","\\coprod");B(G,Y,hi,"\u22C1","\\bigvee");B(G,Y,hi,"\u22C0","\\bigwedge");B(G,Y,hi,"\u2A04","\\biguplus");B(G,Y,hi,"\u22C2","\\bigcap");B(G,Y,hi,"\u22C3","\\bigcup");B(G,Y,hi,"\u222B","\\int");B(G,Y,hi,"\u222B","\\intop");B(G,Y,hi,"\u222C","\\iint");B(G,Y,hi,"\u222D","\\iiint");B(G,Y,hi,"\u220F","\\prod");B(G,Y,hi,"\u2211","\\sum");B(G,Y,hi,"\u2A02","\\bigotimes");B(G,Y,hi,"\u2A01","\\bigoplus");B(G,Y,hi,"\u2A00","\\bigodot");B(G,Y,hi,"\u222E","\\oint");B(G,Y,hi,"\u222F","\\oiint");B(G,Y,hi,"\u2230","\\oiiint");B(G,Y,hi,"\u2A06","\\bigsqcup");B(G,Y,hi,"\u222B","\\smallint");B(Ye,Y,rp,"\u2026","\\textellipsis");B(G,Y,rp,"\u2026","\\mathellipsis");B(Ye,Y,rp,"\u2026","\\ldots",!0);B(G,Y,rp,"\u2026","\\ldots",!0);B(G,Y,rp,"\u22EF","\\@cdots",!0);B(G,Y,rp,"\u22F1","\\ddots",!0);B(G,Y,ke,"\u22EE","\\varvdots");B(G,Y,Ln,"\u02CA","\\acute");B(G,Y,Ln,"\u02CB","\\grave");B(G,Y,Ln,"\xA8","\\ddot");B(G,Y,Ln,"~","\\tilde");B(G,Y,Ln,"\u02C9","\\bar");B(G,Y,Ln,"\u02D8","\\breve");B(G,Y,Ln,"\u02C7","\\check");B(G,Y,Ln,"^","\\hat");B(G,Y,Ln,"\u20D7","\\vec");B(G,Y,Ln,"\u02D9","\\dot");B(G,Y,Ln,"\u02DA","\\mathring");B(G,Y,It,"\uE131","\\@imath");B(G,Y,It,"\uE237","\\@jmath");B(G,Y,ke,"\u0131","\u0131");B(G,Y,ke,"\u0237","\u0237");B(Ye,Y,ke,"\u0131","\\i",!0);B(Ye,Y,ke,"\u0237","\\j",!0);B(Ye,Y,ke,"\xDF","\\ss",!0);B(Ye,Y,ke,"\xE6","\\ae",!0);B(Ye,Y,ke,"\u0153","\\oe",!0);B(Ye,Y,ke,"\xF8","\\o",!0);B(Ye,Y,ke,"\xC6","\\AE",!0);B(Ye,Y,ke,"\u0152","\\OE",!0);B(Ye,Y,ke,"\xD8","\\O",!0);B(Ye,Y,Ln,"\u02CA","\\'");B(Ye,Y,Ln,"\u02CB","\\`");B(Ye,Y,Ln,"\u02C6","\\^");B(Ye,Y,Ln,"\u02DC","\\~");B(Ye,Y,Ln,"\u02C9","\\=");B(Ye,Y,Ln,"\u02D8","\\u");B(Ye,Y,Ln,"\u02D9","\\.");B(Ye,Y,Ln,"\xB8","\\c");B(Ye,Y,Ln,"\u02DA","\\r");B(Ye,Y,Ln,"\u02C7","\\v");B(Ye,Y,Ln,"\xA8",'\\"');B(Ye,Y,Ln,"\u02DD","\\H");B(Ye,Y,Ln,"\u25EF","\\textcircled");uz={"--":!0,"---":!0,"``":!0,"''":!0};B(Ye,Y,ke,"\u2013","--",!0);B(Ye,Y,ke,"\u2013","\\textendash");B(Ye,Y,ke,"\u2014","---",!0);B(Ye,Y,ke,"\u2014","\\textemdash");B(Ye,Y,ke,"\u2018","`",!0);B(Ye,Y,ke,"\u2018","\\textquoteleft");B(Ye,Y,ke,"\u2019","'",!0);B(Ye,Y,ke,"\u2019","\\textquoteright");B(Ye,Y,ke,"\u201C","``",!0);B(Ye,Y,ke,"\u201C","\\textquotedblleft");B(Ye,Y,ke,"\u201D","''",!0);B(Ye,Y,ke,"\u201D","\\textquotedblright");B(G,Y,ke,"\xB0","\\degree",!0);B(Ye,Y,ke,"\xB0","\\degree");B(Ye,Y,ke,"\xB0","\\textdegree",!0);B(G,Y,ke,"\xA3","\\pounds");B(G,Y,ke,"\xA3","\\mathsterling",!0);B(Ye,Y,ke,"\xA3","\\pounds");B(Ye,Y,ke,"\xA3","\\textsterling",!0);B(G,ge,ke,"\u2720","\\maltese");B(Ye,ge,ke,"\u2720","\\maltese");MF='0123456789/@."';for(Tb=0;Tb<MF.length;Tb++)xE=MF.charAt(Tb),B(G,Y,ke,xE,xE);IF='0123456789!@*()-=+";:?/.,';for(Eb=0;Eb<IF.length;Eb++)bE=IF.charAt(Eb),B(Ye,Y,ke,bE,bE);Bb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(Cb=0;Cb<Bb.length;Cb++)N1=Bb.charAt(Cb),B(G,Y,It,N1,N1),B(Ye,Y,ke,N1,N1);B(G,ge,ke,"C","\u2102");B(Ye,ge,ke,"C","\u2102");B(G,ge,ke,"H","\u210D");B(Ye,ge,ke,"H","\u210D");B(G,ge,ke,"N","\u2115");B(Ye,ge,ke,"N","\u2115");B(G,ge,ke,"P","\u2119");B(Ye,ge,ke,"P","\u2119");B(G,ge,ke,"Q","\u211A");B(Ye,ge,ke,"Q","\u211A");B(G,ge,ke,"R","\u211D");B(Ye,ge,ke,"R","\u211D");B(G,ge,ke,"Z","\u2124");B(Ye,ge,ke,"Z","\u2124");B(G,Y,It,"h","\u210E");B(Ye,Y,It,"h","\u210E");$t="";for(wa=0;wa<Bb.length;wa++)On=Bb.charAt(wa),$t=String.fromCharCode(55349,56320+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t),$t=String.fromCharCode(55349,56372+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t),$t=String.fromCharCode(55349,56424+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t),$t=String.fromCharCode(55349,56580+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t),$t=String.fromCharCode(55349,56684+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t),$t=String.fromCharCode(55349,56736+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t),$t=String.fromCharCode(55349,56788+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t),$t=String.fromCharCode(55349,56840+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t),$t=String.fromCharCode(55349,56944+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t),wa<26&&($t=String.fromCharCode(55349,56632+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t),$t=String.fromCharCode(55349,56476+wa),B(G,Y,It,On,$t),B(Ye,Y,ke,On,$t));$t="\u{1D55C}";B(G,Y,It,"k",$t);B(Ye,Y,ke,"k",$t);for(ah=0;ah<10;ah++)Yc=ah.toString(),$t=String.fromCharCode(55349,57294+ah),B(G,Y,It,Yc,$t),B(Ye,Y,ke,Yc,$t),$t=String.fromCharCode(55349,57314+ah),B(G,Y,It,Yc,$t),B(Ye,Y,ke,Yc,$t),$t=String.fromCharCode(55349,57324+ah),B(G,Y,It,Yc,$t),B(Ye,Y,ke,Yc,$t),$t=String.fromCharCode(55349,57334+ah),B(G,Y,It,Yc,$t),B(Ye,Y,ke,Yc,$t);IE="\xD0\xDE\xFE";for(Sb=0;Sb<IE.length;Sb++)O1=IE.charAt(Sb),B(G,Y,It,O1,O1),B(Ye,Y,ke,O1,O1);_b=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],NF=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Wye=s(function(e,r){var n=e.charCodeAt(0),i=e.charCodeAt(1),a=(n-55296)*1024+(i-56320)+65536,o=r==="math"?0:1;if(119808<=a&&a<120484){var l=Math.floor((a-119808)/26);return[_b[l][2],_b[l][o]]}else if(120782<=a&&a<=120831){var u=Math.floor((a-120782)/10);return[NF[u][2],NF[u][o]]}else{if(a===120485||a===120486)return[_b[0][2],_b[0][o]];if(120486<a&&a<120782)return["",""];throw new je("Unsupported character: "+e)}},"wideCharacterFont"),qb=s(function(e,r,n){return dn[n][e]&&dn[n][e].replace&&(e=dn[n][e].replace),{value:e,metrics:UE(e,r,n)}},"lookupSymbol"),Yo=s(function(e,r,n,i,a){var o=qb(e,r,n),l=o.metrics;e=o.value;var u;if(l){var h=l.italic;(n==="text"||i&&i.font==="mathit")&&(h=0),u=new ls(e,l.height,l.depth,h,l.skew,l.width,a)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+e+"' in style '"+r+"' and mode '"+n+"'")),u=new ls(e,0,0,0,0,0,a);if(i){u.maxFontSize=i.sizeMultiplier,i.style.isTight()&&u.classes.push("mtight");var f=i.getColor();f&&(u.style.color=f)}return u},"makeSymbol"),Hye=s(function(e,r,n,i){return i===void 0&&(i=[]),n.font==="boldsymbol"&&qb(e,"Main-Bold",r).metrics?Yo(e,"Main-Bold",r,n,i.concat(["mathbf"])):e==="\\"||dn[r][e].font==="main"?Yo(e,"Main-Regular",r,n,i):Yo(e,"AMS-Regular",r,n,i.concat(["amsrm"]))},"mathsym"),Yye=s(function(e,r,n,i,a){return a!=="textord"&&qb(e,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},"boldsymbol"),Xye=s(function(e,r,n){var i=e.mode,a=e.text,o=["mord"],l=i==="math"||i==="text"&&r.font,u=l?r.font:r.fontFamily,h="",f="";if(a.charCodeAt(0)===55349&&([h,f]=Wye(a,i)),h.length>0)return Yo(a,h,i,r,o.concat(f));if(u){var d,p;if(u==="boldsymbol"){var m=Yye(a,i,r,o,n);d=m.fontName,p=[m.fontClass]}else l?(d=dz[u].fontName,p=[u]):(d=Ab(u,r.fontWeight,r.fontShape),p=[u,r.fontWeight,r.fontShape]);if(qb(a,d,i).metrics)return Yo(a,d,i,r,o.concat(p));if(uz.hasOwnProperty(a)&&d.slice(0,10)==="Typewriter"){for(var g=[],y=0;y<a.length;y++)g.push(Yo(a[y],d,i,r,o.concat(p)));return fz(g)}}if(n==="mathord")return Yo(a,"Math-Italic",i,r,o.concat(["mathnormal"]));if(n==="textord"){var v=dn[i][a]&&dn[i][a].font;if(v==="ams"){var x=Ab("amsrm",r.fontWeight,r.fontShape);return Yo(a,x,i,r,o.concat("amsrm",r.fontWeight,r.fontShape))}else if(v==="main"||!v){var b=Ab("textrm",r.fontWeight,r.fontShape);return Yo(a,b,i,r,o.concat(r.fontWeight,r.fontShape))}else{var k=Ab(v,r.fontWeight,r.fontShape);return Yo(a,k,i,r,o.concat(k,r.fontWeight,r.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},"makeOrd"),jye=s((t,e)=>{if(oh(t.classes)!==oh(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},"canCombine"),Kye=s(t=>{for(var e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof ls&&n instanceof ls&&jye(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t},"tryCombineChars"),qE=s(function(e){for(var r=0,n=0,i=0,a=0;a<e.children.length;a++){var o=e.children[a];o.height>r&&(r=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},"sizeElementFromChildren"),ss=s(function(e,r,n,i){var a=new Bf(e,r,n,i);return qE(a),a},"makeSpan"),hz=s((t,e,r,n)=>new Bf(t,e,r,n),"makeSvgSpan"),Qye=s(function(e,r,n){var i=ss([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=tt(i.height),i.maxFontSize=1,i},"makeLineSpan"),Zye=s(function(e,r,n,i){var a=new $1(e,r,n,i);return qE(a),a},"makeAnchor"),fz=s(function(e){var r=new Pf(e);return qE(r),r},"makeFragment"),Jye=s(function(e,r){return e instanceof Pf?ss([],[e],r):e},"wrapFragment"),eve=s(function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,o=1;o<r.length;o++){var l=-r[o].shift-a-r[o].elem.depth,u=l-(r[o-1].elem.height+r[o-1].elem.depth);a=a+l,n.push({type:"kern",size:u}),n.push(r[o])}return{children:n,depth:i}}var h;if(e.positionType==="top"){for(var f=e.positionData,d=0;d<e.children.length;d++){var p=e.children[d];f-=p.type==="kern"?p.size:p.elem.height+p.elem.depth}h=f}else if(e.positionType==="bottom")h=-e.positionData;else{var m=e.children[0];if(m.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")h=-m.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")h=-m.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:h}},"getVListChildrenAndDepth"),tve=s(function(e,r){for(var{children:n,depth:i}=eve(e),a=0,o=0;o<n.length;o++){var l=n[o];if(l.type==="elem"){var u=l.elem;a=Math.max(a,u.maxFontSize,u.height)}}a+=2;var h=ss(["pstrut"],[]);h.style.height=tt(a);for(var f=[],d=i,p=i,m=i,g=0;g<n.length;g++){var y=n[g];if(y.type==="kern")m+=y.size;else{var v=y.elem,x=y.wrapperClasses||[],b=y.wrapperStyle||{},k=ss(x,[h,v],void 0,b);k.style.top=tt(-a-m-v.depth),y.marginLeft&&(k.style.marginLeft=y.marginLeft),y.marginRight&&(k.style.marginRight=y.marginRight),f.push(k),m+=v.height+v.depth}d=Math.min(d,m),p=Math.max(p,m)}var A=ss(["vlist"],f);A.style.height=tt(p);var w;if(d<0){var T=ss([],[]),C=ss(["vlist"],[T]);C.style.height=tt(-d);var E=ss(["vlist-s"],[new ls("\u200B")]);w=[ss(["vlist-r"],[A,E]),ss(["vlist-r"],[C])]}else w=[ss(["vlist-r"],[A])];var S=ss(["vlist-t"],w);return w.length===2&&S.classes.push("vlist-t2"),S.height=p,S.depth=-d,S},"makeVList"),rve=s((t,e)=>{var r=ss(["mspace"],[],e),n=Bn(t,e);return r.style.marginRight=tt(n),r},"makeGlue"),Ab=s(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},"retrieveTextFontName"),dz={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},pz={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},nve=s(function(e,r){var[n,i,a]=pz[e],o=new $l(n),l=new Xo([o],{width:tt(i),height:tt(a),style:"width:"+tt(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),u=hz(["overlay"],[l],r);return u.height=a,u.style.height=tt(a),u.style.width=tt(i),u},"staticSvg"),Ae={fontMap:dz,makeSymbol:Yo,mathsym:Hye,makeSpan:ss,makeSvgSpan:hz,makeLineSpan:Qye,makeAnchor:Zye,makeFragment:fz,wrapFragment:Jye,makeVList:tve,makeOrd:Xye,makeGlue:rve,staticSvg:nve,svgData:pz,tryCombineChars:Kye},Pn={number:3,unit:"mu"},Nf={number:4,unit:"mu"},Xc={number:5,unit:"mu"},ive={mord:{mop:Pn,mbin:Nf,mrel:Xc,minner:Pn},mop:{mord:Pn,mop:Pn,mrel:Xc,minner:Pn},mbin:{mord:Nf,mop:Nf,mopen:Nf,minner:Nf},mrel:{mord:Xc,mop:Xc,mopen:Xc,minner:Xc},mopen:{},mclose:{mop:Pn,mbin:Nf,mrel:Xc,minner:Pn},mpunct:{mord:Pn,mop:Pn,mrel:Xc,mopen:Pn,mclose:Pn,mpunct:Pn,minner:Pn},minner:{mord:Pn,mop:Pn,mbin:Nf,mrel:Xc,mopen:Pn,mpunct:Pn,minner:Pn}},ave={mord:{mop:Pn},mop:{mord:Pn,mop:Pn},mbin:{},mrel:{},mopen:{},mclose:{mop:Pn},mpunct:{},minner:{mop:Pn}},mz={},Fb={},zb={};s(st,"defineFunction");s(Ff,"defineFunctionBuilders");$b=s(function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},"normalizeArgument"),ni=s(function(e){return e.type==="ordgroup"?e.body:[e]},"ordargument"),Qc=Ae.makeSpan,sve=["leftmost","mbin","mopen","mrel","mop","mpunct"],ove=["rightmost","mrel","mclose","mpunct"],lve={display:Nt.DISPLAY,text:Nt.TEXT,script:Nt.SCRIPT,scriptscript:Nt.SCRIPTSCRIPT},cve={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Ti=s(function(e,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],o=0;o<e.length;o++){var l=vr(e[o],r);if(l instanceof Pf){var u=l.children;a.push(...u)}else a.push(l)}if(Ae.tryCombineChars(a),!n)return a;var h=r;if(e.length===1){var f=e[0];f.type==="sizing"?h=r.havingSize(f.size):f.type==="styling"&&(h=r.havingStyle(lve[f.style]))}var d=Qc([i[0]||"leftmost"],[],r),p=Qc([i[1]||"rightmost"],[],r),m=n==="root";return OF(a,(g,y)=>{var v=y.classes[0],x=g.classes[0];v==="mbin"&&Mt.contains(ove,x)?y.classes[0]="mord":x==="mbin"&&Mt.contains(sve,v)&&(g.classes[0]="mord")},{node:d},p,m),OF(a,(g,y)=>{var v=NE(y),x=NE(g),b=v&&x?g.hasClass("mtight")?ave[v][x]:ive[v][x]:null;if(b)return Ae.makeGlue(b,h)},{node:d},p,m),a},"buildExpression"),OF=s(function t(e,r,n,i,a){i&&e.push(i);for(var o=0;o<e.length;o++){var l=e[o],u=gz(l);if(u){t(u.children,r,n,null,a);continue}var h=!l.hasClass("mspace");if(h){var f=r(l,n.node);f&&(n.insertAfter?n.insertAfter(f):(e.unshift(f),o++))}h?n.node=l:a&&l.hasClass("newline")&&(n.node=Qc(["leftmost"])),n.insertAfter=(d=>p=>{e.splice(d+1,0,p),o++})(o)}i&&e.pop()},"traverseNonSpaceNodes"),gz=s(function(e){return e instanceof Pf||e instanceof $1||e instanceof Bf&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),uve=s(function t(e,r){var n=gz(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},"getOutermostNode"),NE=s(function(e,r){return e?(r&&(e=uve(e,r)),cve[e.classes[0]]||null):null},"getTypeOfDomTree"),V1=s(function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Qc(r.concat(n))},"makeNullDelimiter"),vr=s(function(e,r,n){if(!e)return Qc();if(Fb[e.type]){var i=Fb[e.type](e,r);if(n&&r.size!==n.size){i=Qc(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new je("Got group of unknown type: '"+e.type+"'")},"buildGroup");s(Lb,"buildHTMLUnbreakable");s(OE,"buildHTML");s(yz,"newDocumentFragment");os=class{static{s(this,"MathNode")}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=oh(this.classes));for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="',e+=Mt.escape(this.attributes[r]),e+='"');this.classes.length>0&&(e+=' class ="'+Mt.escape(oh(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}},Of=class{static{s(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Mt.escape(this.toText())}toText(){return this.text}},PE=class{static{s(this,"SpaceNode")}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",tt(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+tt(this.width)+'"/>'}toText(){return this.character?this.character:" "}},Xe={MathNode:os,TextNode:Of,SpaceNode:PE,newDocumentFragment:yz},yo=s(function(e,r,n){return dn[r][e]&&dn[r][e].replace&&e.charCodeAt(0)!==55349&&!(uz.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=dn[r][e].replace),new Xe.TextNode(e)},"makeText"),WE=s(function(e){return e.length===1?e[0]:new Xe.MathNode("mrow",e)},"makeRow"),HE=s(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==="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(Mt.contains(["\\imath","\\jmath"],a))return null;dn[i][a]&&dn[i][a].replace&&(a=dn[i][a].replace);var o=Ae.fontMap[n].fontName;return UE(a,o,i)?Ae.fontMap[n].variant:null},"getVariant"),cs=s(function(e,r,n){if(e.length===1){var i=nn(e[0],r);return n&&i instanceof os&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],o,l=0;l<e.length;l++){var u=nn(e[l],r);if(u instanceof os&&o instanceof os){if(u.type==="mtext"&&o.type==="mtext"&&u.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...u.children);continue}else if(u.type==="mn"&&o.type==="mn"){o.children.push(...u.children);continue}else if(u.type==="mi"&&u.children.length===1&&o.type==="mn"){var h=u.children[0];if(h instanceof Of&&h.text==="."){o.children.push(...u.children);continue}}else if(o.type==="mi"&&o.children.length===1){var f=o.children[0];if(f instanceof Of&&f.text==="\u0338"&&(u.type==="mo"||u.type==="mi"||u.type==="mn")){var d=u.children[0];d instanceof Of&&d.text.length>0&&(d.text=d.text.slice(0,1)+"\u0338"+d.text.slice(1),a.pop())}}}a.push(u),o=u}return a},"buildExpression"),lh=s(function(e,r,n){return WE(cs(e,r,n))},"buildExpressionRow"),nn=s(function(e,r){if(!e)return new Xe.MathNode("mrow");if(zb[e.type]){var n=zb[e.type](e,r);return n}else throw new je("Got group of unknown type: '"+e.type+"'")},"buildGroup");s(PF,"buildMathML");vz=s(function(e){return new Pb({style:e.displayMode?Nt.DISPLAY:Nt.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},"optionsFromSettings"),xz=s(function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=Ae.makeSpan(n,[e])}return e},"displayWrap"),hve=s(function(e,r,n){var i=vz(n),a;if(n.output==="mathml")return PF(e,r,i,n.displayMode,!0);if(n.output==="html"){var o=OE(e,i);a=Ae.makeSpan(["katex"],[o])}else{var l=PF(e,r,i,n.displayMode,!1),u=OE(e,i);a=Ae.makeSpan(["katex"],[l,u])}return xz(a,n)},"buildTree"),fve=s(function(e,r,n){var i=vz(n),a=OE(e,i),o=Ae.makeSpan(["katex"],[a]);return xz(o,n)},"buildHTMLTree"),dve={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":"="},pve=s(function(e){var r=new Xe.MathNode("mo",[new Xe.TextNode(dve[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},"mathMLnode"),mve={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]},gve=s(function(e){return e.type==="ordgroup"?e.body.length:1},"groupLength"),yve=s(function(e,r){function n(){var l=4e5,u=e.label.slice(1);if(Mt.contains(["widehat","widecheck","widetilde","utilde"],u)){var h=e,f=gve(h.base),d,p,m;if(f>5)u==="widehat"||u==="widecheck"?(d=420,l=2364,m=.42,p=u+"4"):(d=312,l=2340,m=.34,p="tilde4");else{var g=[1,1,2,2,3,3][f];u==="widehat"||u==="widecheck"?(l=[0,1062,2364,2364,2364][g],d=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],p=u+g):(l=[0,600,1033,2339,2340][g],d=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],p="tilde"+g)}var y=new $l(p),v=new Xo([y],{width:"100%",height:tt(m),viewBox:"0 0 "+l+" "+d,preserveAspectRatio:"none"});return{span:Ae.makeSvgSpan([],[v],r),minWidth:0,height:m}}else{var x=[],b=mve[u],[k,A,w]=b,T=w/1e3,C=k.length,E,S;if(C===1){var R=b[3];E=["hide-tail"],S=[R]}else if(C===2)E=["halfarrow-left","halfarrow-right"],S=["xMinYMin","xMaxYMin"];else if(C===3)E=["brace-left","brace-center","brace-right"],S=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+C+" children.");for(var D=0;D<C;D++){var L=new $l(k[D]),P=new Xo([L],{width:"400em",height:tt(T),viewBox:"0 0 "+l+" "+w,preserveAspectRatio:S[D]+" slice"}),M=Ae.makeSvgSpan([E[D]],[P],r);if(C===1)return{span:M,minWidth:A,height:T};M.style.height=tt(T),x.push(M)}return{span:Ae.makeSpan(["stretchy"],x,r),minWidth:A,height:T}}}s(n,"buildSvgSpan_");var{span:i,minWidth:a,height:o}=n();return i.height=o,i.style.height=tt(o),a>0&&(i.style.minWidth=tt(a)),i},"svgSpan"),vve=s(function(e,r,n,i,a){var o,l=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(o=Ae.makeSpan(["stretchy",r],[],a),r==="fbox"){var u=a.color&&a.getColor();u&&(o.style.borderColor=u)}}else{var h=[];/^[bx]cancel$/.test(r)&&h.push(new G1({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&h.push(new G1({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var f=new Xo(h,{width:"100%",height:tt(l)});o=Ae.makeSvgSpan([],[f],a)}return o.height=l,o.style.height=tt(l),o},"encloseSpan"),Zc={encloseSpan:vve,mathMLnode:pve,svgSpan:yve};s(Jt,"assertNodeType");s(YE,"assertSymbolNodeType");s(Wb,"checkSymbolNodeType");XE=s((t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=Jt(t.base,"accent"),r=n.base,t.base=r,i=Vye(vr(t,e)),t.base=n):(n=Jt(t,"accent"),r=n.base);var a=vr(r,e.havingCrampedStyle()),o=n.isShifty&&Mt.isCharacterBox(r),l=0;if(o){var u=Mt.getBaseElem(r),h=vr(u,e.havingCrampedStyle());l=RF(h).skew}var f=n.label==="\\c",d=f?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=Zc.svgSpan(n,e),p=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+tt(2*l)+")",marginLeft:tt(2*l)}:void 0}]},e);else{var m,g;n.label==="\\vec"?(m=Ae.staticSvg("vec",e),g=Ae.svgData.vec[1]):(m=Ae.makeOrd({mode:n.mode,text:n.label},e,"textord"),m=RF(m),m.italic=0,g=m.width,f&&(d+=m.depth)),p=Ae.makeSpan(["accent-body"],[m]);var y=n.label==="\\textcircled";y&&(p.classes.push("accent-full"),d=a.height);var v=l;y||(v-=g/2),p.style.left=tt(v),n.label==="\\textcircled"&&(p.style.top=".2em"),p=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-d},{type:"elem",elem:p}]},e)}var x=Ae.makeSpan(["mord","accent"],[p],e);return i?(i.children[0]=x,i.height=Math.max(x.height,i.height),i.classes[0]="mord",i):x},"htmlBuilder$a"),bz=s((t,e)=>{var r=t.isStretchy?Zc.mathMLnode(t.label):new Xe.MathNode("mo",[yo(t.label,t.mode)]),n=new Xe.MathNode("mover",[nn(t.base,e),r]);return n.setAttribute("accent","true"),n},"mathmlBuilder$9"),xve=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));st({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:s((t,e)=>{var r=$b(e[0]),n=!xve.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}},"handler"),htmlBuilder:XE,mathmlBuilder:bz});st({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:s((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}},"handler"),htmlBuilder:XE,mathmlBuilder:bz});st({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},"handler"),htmlBuilder:s((t,e)=>{var r=vr(t.base,e),n=Zc.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,a=Ae.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return Ae.makeSpan(["mord","accentunder"],[a],e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=Zc.mathMLnode(t.label),n=new Xe.MathNode("munder",[nn(t.base,e),r]);return n.setAttribute("accentunder","true"),n},"mathmlBuilder")});Db=s(t=>{var e=new Xe.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e},"paddedNode");st({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=Ae.wrapFragment(vr(t.body,n,e),e),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var o;t.below&&(n=e.havingStyle(r.sub()),o=Ae.wrapFragment(vr(t.below,n,e),e),o.classes.push(a+"-arrow-pad"));var l=Zc.svgSpan(t,e),u=-e.fontMetrics().axisHeight+.5*l.height,h=-e.fontMetrics().axisHeight-.5*l.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(h-=i.depth);var f;if(o){var d=-e.fontMetrics().axisHeight+o.height+.5*l.height+.111;f=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:h},{type:"elem",elem:l,shift:u},{type:"elem",elem:o,shift:d}]},e)}else f=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:h},{type:"elem",elem:l,shift:u}]},e);return f.children[0].children[0].children[1].classes.push("svg-align"),Ae.makeSpan(["mrel","x-arrow"],[f],e)},mathmlBuilder(t,e){var r=Zc.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=Db(nn(t.body,e));if(t.below){var a=Db(nn(t.below,e));n=new Xe.MathNode("munderover",[r,a,i])}else n=new Xe.MathNode("mover",[r,i])}else if(t.below){var o=Db(nn(t.below,e));n=new Xe.MathNode("munder",[r,o])}else n=Db(),n=new Xe.MathNode("mover",[r,n]);return n}});bve=Ae.makeSpan;s(kz,"htmlBuilder$9");s(wz,"mathmlBuilder$8");st({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:ni(i),isCharacterBox:Mt.isCharacterBox(i)}},htmlBuilder:kz,mathmlBuilder:wz});Hb=s(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"},"binrelClass");st({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:Hb(e[0]),body:ni(e[1]),isCharacterBox:Mt.isCharacterBox(e[1])}}});st({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],a=e[0],o;n!=="\\stackrel"?o=Hb(i):o="mrel";var l={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:ni(i)},u={type:"supsub",mode:a.mode,base:l,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:o,body:[u],isCharacterBox:Mt.isCharacterBox(u)}},htmlBuilder:kz,mathmlBuilder:wz});st({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:Hb(e[0]),body:ni(e[0])}},htmlBuilder(t,e){var r=Ti(t.body,e,!0),n=Ae.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=cs(t.body,e),n=new Xe.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});kve={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},BF=s(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),FF=s(t=>t.type==="textord"&&t.text==="@","isStartOfArrow"),wve=s((t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e,"isLabelEnd");s(Tve,"cdArrow");s(Eve,"parseCD");st({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=Ae.wrapFragment(vr(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=tt(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new Xe.MathNode("mrow",[nn(t.label,e)]);return r=new Xe.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Xe.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});st({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=Ae.wrapFragment(vr(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new Xe.MathNode("mrow",[nn(t.fragment,e)])}});st({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=Jt(e[0],"ordgroup"),i=n.body,a="",o=0;o<i.length;o++){var l=Jt(i[o],"textord");a+=l.text}var u=parseInt(a),h;if(isNaN(u))throw new je("\\@char has non-numeric argument "+a);if(u<0||u>=1114111)throw new je("\\@char with invalid code point "+a);return u<=65535?h=String.fromCharCode(u):(u-=65536,h=String.fromCharCode((u>>10)+55296,(u&1023)+56320)),{type:"textord",mode:r.mode,text:h}}});Tz=s((t,e)=>{var r=Ti(t.body,e.withColor(t.color),!1);return Ae.makeFragment(r)},"htmlBuilder$8"),Ez=s((t,e)=>{var r=cs(t.body,e.withColor(t.color)),n=new Xe.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n},"mathmlBuilder$7");st({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=Jt(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:ni(i)}},htmlBuilder:Tz,mathmlBuilder:Ez});st({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=Jt(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:Tz,mathmlBuilder:Ez});st({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&&Jt(i,"size").value}},htmlBuilder(t,e){var r=Ae.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=tt(Bn(t.size,e)))),r},mathmlBuilder(t,e){var r=new Xe.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",tt(Bn(t.size,e)))),r}});BE={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Cz=s(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new je("Expected a control sequence",t);return e},"checkControlSequence"),Cve=s(t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},"getRHS"),Sz=s((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)},"letCommand");st({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(BE[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=BE[n.text]),Jt(e.parseFunction(),"internal");throw new je("Invalid token after macro prefix",n)}});st({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 je("Expected a control sequence",n);for(var a=0,o,l=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){o=e.gullet.future(),l[a].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new je('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new je('Argument number "'+n.text+'" out of order');a++,l.push([])}else{if(n.text==="EOF")throw new je("Expected a macro definition");l[a].push(n.text)}var{tokens:u}=e.gullet.consumeArg();return o&&u.unshift(o),(r==="\\edef"||r==="\\xdef")&&(u=e.gullet.expandTokens(u),u.reverse()),e.gullet.macros.set(i,{tokens:u,numArgs:a,delimiters:l},r===BE[r]),{type:"internal",mode:e.mode}}});st({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=Cz(e.gullet.popToken());e.gullet.consumeSpaces();var i=Cve(e);return Sz(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});st({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=Cz(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return Sz(e,n,a,r==="\\\\globalfuture"),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});P1=s(function(e,r,n){var i=dn.math[e]&&dn.math[e].replace,a=UE(i||e,r,n);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return a},"getMetrics"),jE=s(function(e,r,n,i){var a=n.havingBaseStyle(r),o=Ae.makeSpan(i.concat(a.sizingClasses(n)),[e],n),l=a.sizeMultiplier/n.sizeMultiplier;return o.height*=l,o.depth*=l,o.maxFontSize=a.sizeMultiplier,o},"styleWrap"),_z=s(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=tt(a),e.height-=a,e.depth+=a},"centerSpan"),Sve=s(function(e,r,n,i,a,o){var l=Ae.makeSymbol(e,"Main-Regular",a,i),u=jE(l,r,i,o);return n&&_z(u,i,r),u},"makeSmallDelim"),_ve=s(function(e,r,n,i){return Ae.makeSymbol(e,"Size"+r+"-Regular",n,i)},"mathrmSize"),Az=s(function(e,r,n,i,a,o){var l=_ve(e,r,a,i),u=jE(Ae.makeSpan(["delimsizing","size"+r],[l],i),Nt.TEXT,i,o);return n&&_z(u,i,Nt.TEXT),u},"makeLargeDelim"),kE=s(function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=Ae.makeSpan(["delimsizinginner",i],[Ae.makeSpan([],[Ae.makeSymbol(e,r,n)])]);return{type:"elem",elem:a}},"makeGlyphSpan"),wE=s(function(e,r,n){var i=zl["Size4-Regular"][e.charCodeAt(0)]?zl["Size4-Regular"][e.charCodeAt(0)][4]:zl["Size1-Regular"][e.charCodeAt(0)][4],a=new $l("inner",Oye(e,Math.round(1e3*r))),o=new Xo([a],{width:tt(i),height:tt(r),style:"width:"+tt(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),l=Ae.makeSvgSpan([],[o],n);return l.height=r,l.style.height=tt(r),l.style.width=tt(i),{type:"elem",elem:l}},"makeInner"),FE=.008,Rb={type:"kern",size:-1*FE},Ave=["|","\\lvert","\\rvert","\\vert"],Lve=["\\|","\\lVert","\\rVert","\\Vert"],Lz=s(function(e,r,n,i,a,o){var l,u,h,f,d="",p=0;l=h=f=e,u=null;var m="Size1-Regular";e==="\\uparrow"?h=f="\u23D0":e==="\\Uparrow"?h=f="\u2016":e==="\\downarrow"?l=h="\u23D0":e==="\\Downarrow"?l=h="\u2016":e==="\\updownarrow"?(l="\\uparrow",h="\u23D0",f="\\downarrow"):e==="\\Updownarrow"?(l="\\Uparrow",h="\u2016",f="\\Downarrow"):Mt.contains(Ave,e)?(h="\u2223",d="vert",p=333):Mt.contains(Lve,e)?(h="\u2225",d="doublevert",p=556):e==="["||e==="\\lbrack"?(l="\u23A1",h="\u23A2",f="\u23A3",m="Size4-Regular",d="lbrack",p=667):e==="]"||e==="\\rbrack"?(l="\u23A4",h="\u23A5",f="\u23A6",m="Size4-Regular",d="rbrack",p=667):e==="\\lfloor"||e==="\u230A"?(h=l="\u23A2",f="\u23A3",m="Size4-Regular",d="lfloor",p=667):e==="\\lceil"||e==="\u2308"?(l="\u23A1",h=f="\u23A2",m="Size4-Regular",d="lceil",p=667):e==="\\rfloor"||e==="\u230B"?(h=l="\u23A5",f="\u23A6",m="Size4-Regular",d="rfloor",p=667):e==="\\rceil"||e==="\u2309"?(l="\u23A4",h=f="\u23A5",m="Size4-Regular",d="rceil",p=667):e==="("||e==="\\lparen"?(l="\u239B",h="\u239C",f="\u239D",m="Size4-Regular",d="lparen",p=875):e===")"||e==="\\rparen"?(l="\u239E",h="\u239F",f="\u23A0",m="Size4-Regular",d="rparen",p=875):e==="\\{"||e==="\\lbrace"?(l="\u23A7",u="\u23A8",f="\u23A9",h="\u23AA",m="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(l="\u23AB",u="\u23AC",f="\u23AD",h="\u23AA",m="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(l="\u23A7",f="\u23A9",h="\u23AA",m="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(l="\u23AB",f="\u23AD",h="\u23AA",m="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(l="\u23A7",f="\u23AD",h="\u23AA",m="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(l="\u23AB",f="\u23A9",h="\u23AA",m="Size4-Regular");var g=P1(l,m,a),y=g.height+g.depth,v=P1(h,m,a),x=v.height+v.depth,b=P1(f,m,a),k=b.height+b.depth,A=0,w=1;if(u!==null){var T=P1(u,m,a);A=T.height+T.depth,w=2}var C=y+k+A,E=Math.max(0,Math.ceil((r-C)/(w*x))),S=C+E*w*x,R=i.fontMetrics().axisHeight;n&&(R*=i.sizeMultiplier);var D=S/2-R,L=[];if(d.length>0){var P=S-y-k,M=Math.round(S*1e3),F=Pye(d,Math.round(P*1e3)),I=new $l(d,F),O=(p/1e3).toFixed(3)+"em",z=(M/1e3).toFixed(3)+"em",N=new Xo([I],{width:O,height:z,viewBox:"0 0 "+p+" "+M}),U=Ae.makeSvgSpan([],[N],i);U.height=M/1e3,U.style.width=O,U.style.height=z,L.push({type:"elem",elem:U})}else{if(L.push(kE(f,m,a)),L.push(Rb),u===null){var $=S-y-k+2*FE;L.push(wE(h,$,i))}else{var W=(S-y-k-A)/2+2*FE;L.push(wE(h,W,i)),L.push(Rb),L.push(kE(u,m,a)),L.push(Rb),L.push(wE(h,W,i))}L.push(Rb),L.push(kE(l,m,a))}var ee=i.havingBaseStyle(Nt.TEXT),te=Ae.makeVList({positionType:"bottom",positionData:D,children:L},ee);return jE(Ae.makeSpan(["delimsizing","mult"],[te],ee),Nt.TEXT,i,o)},"makeStackedDelim"),TE=80,EE=.08,CE=s(function(e,r,n,i,a){var o=Nye(e,i,n),l=new $l(e,o),u=new Xo([l],{width:"400em",height:tt(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Ae.makeSvgSpan(["hide-tail"],[u],a)},"sqrtSvg"),Dve=s(function(e,r){var n=r.havingBaseSizing(),i=Iz("\\surd",e*n.sizeMultiplier,Mz,n),a=n.sizeMultiplier,o=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),l,u=0,h=0,f=0,d;return i.type==="small"?(f=1e3+1e3*o+TE,e<1?a=1:e<1.4&&(a=.7),u=(1+o+EE)/a,h=(1+o)/a,l=CE("sqrtMain",u,f,o,r),l.style.minWidth="0.853em",d=.833/a):i.type==="large"?(f=(1e3+TE)*B1[i.size],h=(B1[i.size]+o)/a,u=(B1[i.size]+o+EE)/a,l=CE("sqrtSize"+i.size,u,f,o,r),l.style.minWidth="1.02em",d=1/a):(u=e+o+EE,h=e+o,f=Math.floor(1e3*e+o)+TE,l=CE("sqrtTall",u,f,o,r),l.style.minWidth="0.742em",d=1.056),l.height=h,l.style.height=tt(u),{span:l,advanceWidth:d,ruleWidth:(r.fontMetrics().sqrtRuleThickness+o)*a}},"makeSqrtImage"),Dz=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Rve=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Rz=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],B1=[0,1.2,1.8,2.4,3],Mve=s(function(e,r,n,i,a){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Mt.contains(Dz,e)||Mt.contains(Rz,e))return Az(e,r,!1,n,i,a);if(Mt.contains(Rve,e))return Lz(e,B1[r],!1,n,i,a);throw new je("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),Ive=[{type:"small",style:Nt.SCRIPTSCRIPT},{type:"small",style:Nt.SCRIPT},{type:"small",style:Nt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Nve=[{type:"small",style:Nt.SCRIPTSCRIPT},{type:"small",style:Nt.SCRIPT},{type:"small",style:Nt.TEXT},{type:"stack"}],Mz=[{type:"small",style:Nt.SCRIPTSCRIPT},{type:"small",style:Nt.SCRIPT},{type:"small",style:Nt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ove=s(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.")},"delimTypeToFont"),Iz=s(function(e,r,n,i){for(var a=Math.min(2,3-i.style.size),o=a;o<n.length&&n[o].type!=="stack";o++){var l=P1(e,Ove(n[o]),"math"),u=l.height+l.depth;if(n[o].type==="small"){var h=i.havingBaseStyle(n[o].style);u*=h.sizeMultiplier}if(u>r)return n[o]}return n[n.length-1]},"traverseSequence"),Nz=s(function(e,r,n,i,a,o){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var l;Mt.contains(Rz,e)?l=Ive:Mt.contains(Dz,e)?l=Mz:l=Nve;var u=Iz(e,r,l,i);return u.type==="small"?Sve(e,u.style,n,i,a,o):u.type==="large"?Az(e,u.size,n,i,a,o):Lz(e,r,n,i,a,o)},"makeCustomSizedDelim"),Pve=s(function(e,r,n,i,a,o){var l=i.fontMetrics().axisHeight*i.sizeMultiplier,u=901,h=5/i.fontMetrics().ptPerEm,f=Math.max(r-l,n+l),d=Math.max(f/500*u,2*f-h);return Nz(e,d,!0,i,a,o)},"makeLeftRightDelim"),Kc={sqrtImage:Dve,sizedDelim:Mve,sizeToMaxHeight:B1,customSizedDelim:Nz,leftRightDelim:Pve},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}},Bve=["(","\\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","."];s(Yb,"checkDelimiter");st({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:s((t,e)=>{var r=Yb(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:zF[t.funcName].size,mclass:zF[t.funcName].mclass,delim:r.text}},"handler"),htmlBuilder:s((t,e)=>t.delim==="."?Ae.makeSpan([t.mclass]):Kc.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:s(t=>{var e=[];t.delim!=="."&&e.push(yo(t.delim,t.mode));var r=new Xe.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=tt(Kc.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r},"mathmlBuilder")});s($F,"assertParsed");st({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:s((t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new je("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Yb(e[0],t).text,color:r}},"handler")});st({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:s((t,e)=>{var r=Yb(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=Jt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},"handler"),htmlBuilder:s((t,e)=>{$F(t);for(var r=Ti(t.body,e,!0,["mopen","mclose"]),n=0,i=0,a=!1,o=0;o<r.length;o++)r[o].isMiddle?a=!0:(n=Math.max(r[o].height,n),i=Math.max(r[o].depth,i));n*=e.sizeMultiplier,i*=e.sizeMultiplier;var l;if(t.left==="."?l=V1(e,["mopen"]):l=Kc.leftRightDelim(t.left,n,i,e,t.mode,["mopen"]),r.unshift(l),a)for(var u=1;u<r.length;u++){var h=r[u],f=h.isMiddle;f&&(r[u]=Kc.leftRightDelim(f.delim,n,i,f.options,t.mode,[]))}var d;if(t.right===".")d=V1(e,["mclose"]);else{var p=t.rightColor?e.withColor(t.rightColor):e;d=Kc.leftRightDelim(t.right,n,i,p,t.mode,["mclose"])}return r.push(d),Ae.makeSpan(["minner"],r,e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{$F(t);var r=cs(t.body,e);if(t.left!=="."){var n=new Xe.MathNode("mo",[yo(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new Xe.MathNode("mo",[yo(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return WE(r)},"mathmlBuilder")});st({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:s((t,e)=>{var r=Yb(e[0],t);if(!t.parser.leftrightDepth)throw new je("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},"handler"),htmlBuilder:s((t,e)=>{var r;if(t.delim===".")r=V1(e,[]);else{r=Kc.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?yo("|","text"):yo(t.delim,t.mode),n=new Xe.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n},"mathmlBuilder")});KE=s((t,e)=>{var r=Ae.wrapFragment(vr(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,a,o=0,l=Mt.isCharacterBox(t.body);if(n==="sout")a=Ae.makeSpan(["stretchy","sout"]),a.height=e.fontMetrics().defaultRuleThickness/i,o=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var u=Bn({number:.6,unit:"pt"},e),h=Bn({number:.35,unit:"ex"},e),f=e.havingBaseSizing();i=i/f.sizeMultiplier;var d=r.height+r.depth+u+h;r.style.paddingLeft=tt(d/2+u);var p=Math.floor(1e3*d*i),m=Mye(p),g=new Xo([new $l("phase",m)],{width:"400em",height:tt(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});a=Ae.makeSvgSpan(["hide-tail"],[g],e),a.style.height=tt(d),o=r.depth+u+h}else{/cancel/.test(n)?l||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var y=0,v=0,x=0;/box/.test(n)?(x=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),y=e.fontMetrics().fboxsep+(n==="colorbox"?0:x),v=y):n==="angl"?(x=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),y=4*x,v=Math.max(0,.25-r.depth)):(y=l?.2:0,v=y),a=Zc.encloseSpan(r,n,y,v,e),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=tt(x)):n==="angl"&&x!==.049&&(a.style.borderTopWidth=tt(x),a.style.borderRightWidth=tt(x)),o=r.depth+v,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var b;if(t.backgroundColor)b=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:r,shift:0}]},e);else{var k=/cancel|phase/.test(n)?["svg-align"]:[];b=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:k}]},e)}return/cancel/.test(n)&&(b.height=r.height,b.depth=r.depth),/cancel/.test(n)&&!l?Ae.makeSpan(["mord","cancel-lap"],[b],e):Ae.makeSpan(["mord"],[b],e)},"htmlBuilder$7"),QE=s((t,e)=>{var r=0,n=new Xe.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[nn(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},"mathmlBuilder$6");st({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=Jt(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:KE,mathmlBuilder:QE});st({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=Jt(e[0],"color-token").color,o=Jt(e[1],"color-token").color,l=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:o,borderColor:a,body:l}},htmlBuilder:KE,mathmlBuilder:QE});st({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]}}});st({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:KE,mathmlBuilder:QE});st({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]}}});Oz={};s(Gl,"defineEnvironment");Pz={};s(J,"defineMacro");s(GF,"getHLines");Xb=s(t=>{var e=t.parser.settings;if(!e.displayMode)throw new je("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext");s(ZE,"getAutoTag");s(ch,"parseArray");s(JE,"dCellStyle");Vl=s(function(e,r){var n,i,a=e.body.length,o=e.hLinesBeforeRow,l=0,u=new Array(a),h=[],f=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),d=1/r.fontMetrics().ptPerEm,p=5*d;if(e.colSeparationType&&e.colSeparationType==="small"){var m=r.havingStyle(Nt.SCRIPT).sizeMultiplier;p=.2778*(m/r.sizeMultiplier)}var g=e.colSeparationType==="CD"?Bn({number:3,unit:"ex"},r):12*d,y=3*d,v=e.arraystretch*g,x=.7*v,b=.3*v,k=0;function A(Re){for(var Pe=0;Pe<Re.length;++Pe)Pe>0&&(k+=.25),h.push({pos:k,isDashed:Re[Pe]})}for(s(A,"setHLinePos"),A(o[0]),n=0;n<e.body.length;++n){var w=e.body[n],T=x,C=b;l<w.length&&(l=w.length);var E=new Array(w.length);for(i=0;i<w.length;++i){var S=vr(w[i],r);C<S.depth&&(C=S.depth),T<S.height&&(T=S.height),E[i]=S}var R=e.rowGaps[n],D=0;R&&(D=Bn(R,r),D>0&&(D+=b,C<D&&(C=D),D=0)),e.addJot&&(C+=y),E.height=T,E.depth=C,k+=T,E.pos=k,k+=C+D,u[n]=E,A(o[n+1])}var L=k/2+r.fontMetrics().axisHeight,P=e.cols||[],M=[],F,I,O=[];if(e.tags&&e.tags.some(Re=>Re))for(n=0;n<a;++n){var z=u[n],N=z.pos-L,U=e.tags[n],$=void 0;U===!0?$=Ae.makeSpan(["eqn-num"],[],r):U===!1?$=Ae.makeSpan([],[],r):$=Ae.makeSpan([],Ti(U,r,!0),r),$.depth=z.depth,$.height=z.height,O.push({type:"elem",elem:$,shift:N})}for(i=0,I=0;i<l||I<P.length;++i,++I){for(var W=P[I]||{},ee=!0;W.type==="separator";){if(ee||(F=Ae.makeSpan(["arraycolsep"],[]),F.style.width=tt(r.fontMetrics().doubleRuleSep),M.push(F)),W.separator==="|"||W.separator===":"){var te=W.separator==="|"?"solid":"dashed",ce=Ae.makeSpan(["vertical-separator"],[],r);ce.style.height=tt(k),ce.style.borderRightWidth=tt(f),ce.style.borderRightStyle=te,ce.style.margin="0 "+tt(-f/2);var Z=k-L;Z&&(ce.style.verticalAlign=tt(-Z)),M.push(ce)}else throw new je("Invalid separator type: "+W.separator);I++,W=P[I]||{},ee=!1}if(!(i>=l)){var fe=void 0;(i>0||e.hskipBeforeAndAfter)&&(fe=Mt.deflt(W.pregap,p),fe!==0&&(F=Ae.makeSpan(["arraycolsep"],[]),F.style.width=tt(fe),M.push(F)));var ne=[];for(n=0;n<a;++n){var H=u[n],Q=H[i];if(Q){var K=H.pos-L;Q.depth=H.depth,Q.height=H.height,ne.push({type:"elem",elem:Q,shift:K})}}ne=Ae.makeVList({positionType:"individualShift",children:ne},r),ne=Ae.makeSpan(["col-align-"+(W.align||"c")],[ne]),M.push(ne),(i<l-1||e.hskipBeforeAndAfter)&&(fe=Mt.deflt(W.postgap,p),fe!==0&&(F=Ae.makeSpan(["arraycolsep"],[]),F.style.width=tt(fe),M.push(F)))}}if(u=Ae.makeSpan(["mtable"],M),h.length>0){for(var re=Ae.makeLineSpan("hline",r,f),ie=Ae.makeLineSpan("hdashline",r,f),ye=[{type:"elem",elem:u,shift:0}];h.length>0;){var j=h.pop(),De=j.pos-L;j.isDashed?ye.push({type:"elem",elem:ie,shift:De}):ye.push({type:"elem",elem:re,shift:De})}u=Ae.makeVList({positionType:"individualShift",children:ye},r)}if(O.length===0)return Ae.makeSpan(["mord"],[u],r);var oe=Ae.makeVList({positionType:"individualShift",children:O},r);return oe=Ae.makeSpan(["tag"],[oe],r),Ae.makeFragment([u,oe])},"htmlBuilder"),Fve={c:"center ",l:"left ",r:"right "},Ul=s(function(e,r){for(var n=[],i=new Xe.MathNode("mtd",[],["mtr-glue"]),a=new Xe.MathNode("mtd",[],["mml-eqn-num"]),o=0;o<e.body.length;o++){for(var l=e.body[o],u=[],h=0;h<l.length;h++)u.push(new Xe.MathNode("mtd",[nn(l[h],r)]));e.tags&&e.tags[o]&&(u.unshift(i),u.push(i),e.leqno?u.unshift(a):u.push(a)),n.push(new Xe.MathNode("mtr",u))}var f=new Xe.MathNode("mtable",n),d=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);f.setAttribute("rowspacing",tt(d));var p="",m="";if(e.cols&&e.cols.length>0){var g=e.cols,y="",v=!1,x=0,b=g.length;g[0].type==="separator"&&(p+="top ",x=1),g[g.length-1].type==="separator"&&(p+="bottom ",b-=1);for(var k=x;k<b;k++)g[k].type==="align"?(m+=Fve[g[k].align],v&&(y+="none "),v=!0):g[k].type==="separator"&&v&&(y+=g[k].separator==="|"?"solid ":"dashed ",v=!1);f.setAttribute("columnalign",m.trim()),/[sd]/.test(y)&&f.setAttribute("columnlines",y.trim())}if(e.colSeparationType==="align"){for(var A=e.cols||[],w="",T=1;T<A.length;T++)w+=T%2?"0em ":"1em ";f.setAttribute("columnspacing",w.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?f.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?f.setAttribute("columnspacing","0.5em"):f.setAttribute("columnspacing","1em");var C="",E=e.hLinesBeforeRow;p+=E[0].length>0?"left ":"",p+=E[E.length-1].length>0?"right ":"";for(var S=1;S<E.length-1;S++)C+=E[S].length===0?"none ":E[S][0]?"dashed ":"solid ";return/[sd]/.test(C)&&f.setAttribute("rowlines",C.trim()),p!==""&&(f=new Xe.MathNode("menclose",[f]),f.setAttribute("notation",p.trim())),e.arraystretch&&e.arraystretch<1&&(f=new Xe.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},"mathmlBuilder"),Bz=s(function(e,r){e.envName.indexOf("ed")===-1&&Xb(e);var n=[],i=e.envName.indexOf("at")>-1?"alignat":"align",a=e.envName==="split",o=ch(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:ZE(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),l,u=0,h={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var f="",d=0;d<r[0].body.length;d++){var p=Jt(r[0].body[d],"textord");f+=p.text}l=Number(f),u=l*2}var m=!u;o.body.forEach(function(x){for(var b=1;b<x.length;b+=2){var k=Jt(x[b],"styling"),A=Jt(k.body[0],"ordgroup");A.body.unshift(h)}if(m)u<x.length&&(u=x.length);else{var w=x.length/2;if(l<w)throw new je("Too many math in a row: "+("expected "+l+", but got "+w),x[0])}});for(var g=0;g<u;++g){var y="r",v=0;g%2===1?y="l":g>0&&m&&(v=1),n[g]={type:"align",align:y,pregap:v,postgap:0}}return o.colSeparationType=m?"align":"alignat",o},"alignedHandler");Gl({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=Wb(e[0]),n=r?[e[0]]:Jt(e[0],"ordgroup").body,i=n.map(function(o){var l=YE(o),u=l.text;if("lcr".indexOf(u)!==-1)return{type:"align",align:u};if(u==="|")return{type:"separator",separator:"|"};if(u===":")return{type:"separator",separator:":"};throw new je("Unknown column alignment: "+u,o)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return ch(t.parser,a,JE(t.envName))},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({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 je("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=ch(t.parser,n,JE(t.envName)),o=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(o).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=ch(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=Wb(e[0]),n=r?[e[0]]:Jt(e[0],"ordgroup").body,i=n.map(function(o){var l=YE(o),u=l.text;if("lc".indexOf(u)!==-1)return{type:"align",align:u};throw new je("Unknown column alignment: "+u,o)});if(i.length>1)throw new je("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=ch(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new je("{subarray} can contain only one column");return a},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({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=ch(t.parser,e,JE(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:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Bz,htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){Mt.contains(["gather","gather*"],t.envName)&&Xb(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ZE(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return ch(t.parser,e,"display")},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Bz,htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Xb(t);var e={autoTag:ZE(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return ch(t.parser,e,"display")},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["CD"],props:{numArgs:0},handler(t){return Xb(t),Eve(t.parser)},htmlBuilder:Vl,mathmlBuilder:Ul});J("\\nonumber","\\gdef\\@eqnsw{0}");J("\\notag","\\nonumber");st({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new je(t.funcName+" valid only within array environment")}});VF=Oz;st({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 je("Invalid environment name",i);for(var a="",o=0;o<i.body.length;++o)a+=Jt(i.body[o],"textord").text;if(n==="\\begin"){if(!VF.hasOwnProperty(a))throw new je("No such environment: "+a,i);var l=VF[a],{args:u,optArgs:h}=r.parseArguments("\\begin{"+a+"}",l),f={mode:r.mode,envName:a,parser:r},d=l.handler(f,u,h);r.expect("\\end",!1);var p=r.nextToken,m=Jt(r.parseFunction(),"environment");if(m.name!==a)throw new je("Mismatch: \\begin{"+a+"} matched by \\end{"+m.name+"}",p);return d}return{type:"environment",mode:r.mode,name:a,nameGroup:i}}});Fz=s((t,e)=>{var r=t.font,n=e.withFont(r);return vr(t.body,n)},"htmlBuilder$5"),zz=s((t,e)=>{var r=t.font,n=e.withFont(r);return nn(t.body,n)},"mathmlBuilder$4"),UF={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};st({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=$b(e[0]),a=n;return a in UF&&(a=UF[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},"handler"),htmlBuilder:Fz,mathmlBuilder:zz});st({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:s((t,e)=>{var{parser:r}=t,n=e[0],i=Mt.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Hb(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}},"handler")});st({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:s((t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,o=r.parseExpression(!0,i),l="math"+n.slice(1);return{type:"font",mode:a,font:l,body:{type:"ordgroup",mode:r.mode,body:o}}},"handler"),htmlBuilder:Fz,mathmlBuilder:zz});$z=s((t,e)=>{var r=e;return t==="display"?r=r.id>=Nt.SCRIPT.id?r.text():Nt.DISPLAY:t==="text"&&r.size===Nt.DISPLAY.size?r=Nt.TEXT:t==="script"?r=Nt.SCRIPT:t==="scriptscript"&&(r=Nt.SCRIPTSCRIPT),r},"adjustStyle"),eC=s((t,e)=>{var r=$z(t.size,e.style),n=r.fracNum(),i=r.fracDen(),a;a=e.havingStyle(n);var o=vr(t.numer,a,e);if(t.continued){var l=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm;o.height=o.height<l?l:o.height,o.depth=o.depth<u?u:o.depth}a=e.havingStyle(i);var h=vr(t.denom,a,e),f,d,p;t.hasBarLine?(t.barSize?(d=Bn(t.barSize,e),f=Ae.makeLineSpan("frac-line",e,d)):f=Ae.makeLineSpan("frac-line",e),d=f.height,p=f.height):(f=null,d=0,p=e.fontMetrics().defaultRuleThickness);var m,g,y;r.size===Nt.DISPLAY.size||t.size==="display"?(m=e.fontMetrics().num1,d>0?g=3*p:g=7*p,y=e.fontMetrics().denom1):(d>0?(m=e.fontMetrics().num2,g=p):(m=e.fontMetrics().num3,g=3*p),y=e.fontMetrics().denom2);var v;if(f){var b=e.fontMetrics().axisHeight;m-o.depth-(b+.5*d)<g&&(m+=g-(m-o.depth-(b+.5*d))),b-.5*d-(h.height-y)<g&&(y+=g-(b-.5*d-(h.height-y)));var k=-(b-.5*d);v=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:y},{type:"elem",elem:f,shift:k},{type:"elem",elem:o,shift:-m}]},e)}else{var x=m-o.depth-(h.height-y);x<g&&(m+=.5*(g-x),y+=.5*(g-x)),v=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:y},{type:"elem",elem:o,shift:-m}]},e)}a=e.havingStyle(r),v.height*=a.sizeMultiplier/e.sizeMultiplier,v.depth*=a.sizeMultiplier/e.sizeMultiplier;var A;r.size===Nt.DISPLAY.size?A=e.fontMetrics().delim1:r.size===Nt.SCRIPTSCRIPT.size?A=e.havingStyle(Nt.SCRIPT).fontMetrics().delim2:A=e.fontMetrics().delim2;var w,T;return t.leftDelim==null?w=V1(e,["mopen"]):w=Kc.customSizedDelim(t.leftDelim,A,!0,e.havingStyle(r),t.mode,["mopen"]),t.continued?T=Ae.makeSpan([]):t.rightDelim==null?T=V1(e,["mclose"]):T=Kc.customSizedDelim(t.rightDelim,A,!0,e.havingStyle(r),t.mode,["mclose"]),Ae.makeSpan(["mord"].concat(a.sizingClasses(e)),[w,Ae.makeSpan(["mfrac"],[v]),T],e)},"htmlBuilder$4"),tC=s((t,e)=>{var r=new Xe.MathNode("mfrac",[nn(t.numer,e),nn(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=Bn(t.barSize,e);r.setAttribute("linethickness",tt(n))}var i=$z(t.size,e.style);if(i.size!==e.style.size){r=new Xe.MathNode("mstyle",[r]);var a=i.size===Nt.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var o=[];if(t.leftDelim!=null){var l=new Xe.MathNode("mo",[new Xe.TextNode(t.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}if(o.push(r),t.rightDelim!=null){var u=new Xe.MathNode("mo",[new Xe.TextNode(t.rightDelim.replace("\\",""))]);u.setAttribute("fence","true"),o.push(u)}return WE(o)}return r},"mathmlBuilder$3");st({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1],o,l=null,u=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,l="(",u=")";break;case"\\\\bracefrac":o=!1,l="\\{",u="\\}";break;case"\\\\brackfrac":o=!1,l="[",u="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:o,leftDelim:l,rightDelim:u,size:h,barSize:null}},"handler"),htmlBuilder:eC,mathmlBuilder:tC});st({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:s((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}},"handler")});st({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}}});qF=["display","text","script","scriptscript"],WF=s(function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r},"delimFromValue");st({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=$b(e[0]),o=a.type==="atom"&&a.family==="open"?WF(a.text):null,l=$b(e[1]),u=l.type==="atom"&&l.family==="close"?WF(l.text):null,h=Jt(e[2],"size"),f,d=null;h.isBlank?f=!0:(d=h.value,f=d.number>0);var p="auto",m=e[3];if(m.type==="ordgroup"){if(m.body.length>0){var g=Jt(m.body[0],"textord");p=qF[Number(g.text)]}}else m=Jt(m,"textord"),p=qF[Number(m.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:f,barSize:d,leftDelim:o,rightDelim:u,size:p}},htmlBuilder:eC,mathmlBuilder:tC});st({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:Jt(e[0],"size").value,token:i}}});st({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=yye(Jt(e[1],"infix").size),o=e[2],l=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:eC,mathmlBuilder:tC});Gz=s((t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?vr(t.sup,e.havingStyle(r.sup()),e):vr(t.sub,e.havingStyle(r.sub()),e),i=Jt(t.base,"horizBrace")):i=Jt(t,"horizBrace");var a=vr(i.base,e.havingBaseStyle(Nt.DISPLAY)),o=Zc.svgSpan(i,e),l;if(i.isOver?(l=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o}]},e),l.children[0].children[0].children[1].classes.push("svg-align")):(l=Ae.makeVList({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a}]},e),l.children[0].children[0].children[0].classes.push("svg-align")),n){var u=Ae.makeSpan(["mord",i.isOver?"mover":"munder"],[l],e);i.isOver?l=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.2},{type:"elem",elem:n}]},e):l=Ae.makeVList({positionType:"bottom",positionData:u.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:u}]},e)}return Ae.makeSpan(["mord",i.isOver?"mover":"munder"],[l],e)},"htmlBuilder$3"),zve=s((t,e)=>{var r=Zc.mathMLnode(t.label);return new Xe.MathNode(t.isOver?"mover":"munder",[nn(t.base,e),r])},"mathmlBuilder$2");st({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:Gz,mathmlBuilder:zve});st({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t,n=e[1],i=Jt(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:ni(n)}:r.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:s((t,e)=>{var r=Ti(t.body,e,!1);return Ae.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=lh(t.body,e);return r instanceof os||(r=new os("mrow",[r])),r.setAttribute("href",t.href),r},"mathmlBuilder")});st({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t,n=Jt(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<n.length;a++){var o=n[a];o==="~"&&(o="\\textasciitilde"),i.push({type:"textord",mode:"text",text:o})}var l={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:ni(l)}},"handler")});st({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:r}=t;return{type:"hbox",mode:r.mode,body:ni(e[0])}},htmlBuilder(t,e){var r=Ti(t.body,e,!1);return Ae.makeFragment(r)},mathmlBuilder(t,e){return new Xe.MathNode("mrow",cs(t.body,e))}});st({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:s((t,e)=>{var{parser:r,funcName:n,token:i}=t,a=Jt(e[0],"raw").string,o=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,u={};switch(n){case"\\htmlClass":u.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":u.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":u.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var h=a.split(","),f=0;f<h.length;f++){var d=h[f].split("=");if(d.length!==2)throw new je("Error parsing key-value for \\htmlData");u["data-"+d[0].trim()]=d[1].trim()}l={command:"\\htmlData",attributes:u};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(l)?{type:"html",mode:r.mode,attributes:u,body:ni(o)}:r.formatUnsupportedCmd(n)},"handler"),htmlBuilder:s((t,e)=>{var r=Ti(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=Ae.makeSpan(n,r,e);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},"htmlBuilder"),mathmlBuilder:s((t,e)=>lh(t.body,e),"mathmlBuilder")});st({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:ni(e[0]),mathml:ni(e[1])}},"handler"),htmlBuilder:s((t,e)=>{var r=Ti(t.html,e,!1);return Ae.makeFragment(r)},"htmlBuilder"),mathmlBuilder:s((t,e)=>lh(t.mathml,e),"mathmlBuilder")});SE=s(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 je("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!sz(n))throw new je("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n},"sizeData");st({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:s((t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(r[0])for(var u=Jt(r[0],"raw").string,h=u.split(","),f=0;f<h.length;f++){var d=h[f].split("=");if(d.length===2){var p=d[1].trim();switch(d[0].trim()){case"alt":l=p;break;case"width":i=SE(p);break;case"height":a=SE(p);break;case"totalheight":o=SE(p);break;default:throw new je("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var m=Jt(e[0],"url").url;return l===""&&(l=m,l=l.replace(/^.*[\\/]/,""),l=l.substring(0,l.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:m})?{type:"includegraphics",mode:n.mode,alt:l,width:i,height:a,totalheight:o,src:m}:n.formatUnsupportedCmd("\\includegraphics")},"handler"),htmlBuilder:s((t,e)=>{var r=Bn(t.height,e),n=0;t.totalheight.number>0&&(n=Bn(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=Bn(t.width,e));var a={height:tt(r+n)};i>0&&(a.width=tt(i)),n>0&&(a.verticalAlign=tt(-n));var o=new ME(t.src,t.alt,a);return o.height=r,o.depth=n,o},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=new Xe.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=Bn(t.height,e),i=0;if(t.totalheight.number>0&&(i=Bn(t.totalheight,e)-n,r.setAttribute("valign",tt(-i))),r.setAttribute("height",tt(n+i)),t.width.number>0){var a=Bn(t.width,e);r.setAttribute("width",tt(a))}return r.setAttribute("src",t.src),r},"mathmlBuilder")});st({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=Jt(e[0],"size");if(r.settings.strict){var a=n[1]==="m",o=i.value.unit==="mu";a?(o||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")):o&&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 Ae.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=Bn(t.dimension,e);return new Xe.SpaceNode(r)}});st({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},"handler"),htmlBuilder:s((t,e)=>{var r;t.alignment==="clap"?(r=Ae.makeSpan([],[vr(t.body,e)]),r=Ae.makeSpan(["inner"],[r],e)):r=Ae.makeSpan(["inner"],[vr(t.body,e)]);var n=Ae.makeSpan(["fix"],[]),i=Ae.makeSpan([t.alignment],[r,n],e),a=Ae.makeSpan(["strut"]);return a.style.height=tt(i.height+i.depth),i.depth&&(a.style.verticalAlign=tt(-i.depth)),i.children.unshift(a),i=Ae.makeSpan(["thinbox"],[i],e),Ae.makeSpan(["mord","vbox"],[i],e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=new Xe.MathNode("mpadded",[nn(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},"mathmlBuilder")});st({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==="\\("?"\\)":"$",o=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:o}}});st({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new je("Mismatched "+t.funcName)}});HF=s((t,e)=>{switch(e.style.size){case Nt.DISPLAY.size:return t.display;case Nt.TEXT.size:return t.text;case Nt.SCRIPT.size:return t.script;case Nt.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle");st({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:s((t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:ni(e[0]),text:ni(e[1]),script:ni(e[2]),scriptscript:ni(e[3])}},"handler"),htmlBuilder:s((t,e)=>{var r=HF(t,e),n=Ti(r,e,!1);return Ae.makeFragment(n)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=HF(t,e);return lh(r,e)},"mathmlBuilder")});Vz=s((t,e,r,n,i,a,o)=>{t=Ae.makeSpan([],[t]);var l=r&&Mt.isCharacterBox(r),u,h;if(e){var f=vr(e,n.havingStyle(i.sup()),n);h={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-f.depth)}}if(r){var d=vr(r,n.havingStyle(i.sub()),n);u={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-d.height)}}var p;if(h&&u){var m=n.fontMetrics().bigOpSpacing5+u.elem.height+u.elem.depth+u.kern+t.depth+o;p=Ae.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:tt(-a)},{type:"kern",size:u.kern},{type:"elem",elem:t},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:tt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(u){var g=t.height-o;p=Ae.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:tt(-a)},{type:"kern",size:u.kern},{type:"elem",elem:t}]},n)}else if(h){var y=t.depth+o;p=Ae.makeVList({positionType:"bottom",positionData:y,children:[{type:"elem",elem:t},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:tt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var v=[p];if(u&&a!==0&&!l){var x=Ae.makeSpan(["mspace"],[],n);x.style.marginRight=tt(a),v.unshift(x)}return Ae.makeSpan(["mop","op-limits"],v,n)},"assembleSupSub"),Uz=["\\smallint"],np=s((t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=Jt(t.base,"op"),i=!0):a=Jt(t,"op");var o=e.style,l=!1;o.size===Nt.DISPLAY.size&&a.symbol&&!Mt.contains(Uz,a.name)&&(l=!0);var u;if(a.symbol){var h=l?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),u=Ae.makeSymbol(a.name,h,"math",e,["mop","op-symbol",l?"large-op":"small-op"]),f.length>0){var d=u.italic,p=Ae.staticSvg(f+"Size"+(l?"2":"1"),e);u=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:u,shift:0},{type:"elem",elem:p,shift:l?.08:0}]},e),a.name="\\"+f,u.classes.unshift("mop"),u.italic=d}}else if(a.body){var m=Ti(a.body,e,!0);m.length===1&&m[0]instanceof ls?(u=m[0],u.classes[0]="mop"):u=Ae.makeSpan(["mop"],m,e)}else{for(var g=[],y=1;y<a.name.length;y++)g.push(Ae.mathsym(a.name[y],a.mode,e));u=Ae.makeSpan(["mop"],g,e)}var v=0,x=0;return(u instanceof ls||a.name==="\\oiint"||a.name==="\\oiiint")&&!a.suppressBaseShift&&(v=(u.height-u.depth)/2-e.fontMetrics().axisHeight,x=u.italic),i?Vz(u,r,n,e,o,x,v):(v&&(u.style.position="relative",u.style.top=tt(v)),u)},"htmlBuilder$2"),U1=s((t,e)=>{var r;if(t.symbol)r=new os("mo",[yo(t.name,t.mode)]),Mt.contains(Uz,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new os("mo",cs(t.body,e));else{r=new os("mi",[new Of(t.name.slice(1))]);var n=new os("mo",[yo("\u2061","text")]);t.parentIsSupSub?r=new os("mrow",[r,n]):r=yz([r,n])}return r},"mathmlBuilder$1"),$ve={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};st({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:s((t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=$ve[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},"handler"),htmlBuilder:np,mathmlBuilder:U1});st({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:s((t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ni(n)}},"handler"),htmlBuilder:np,mathmlBuilder:U1});Gve={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};st({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:U1});st({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:U1});st({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=Gve[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:np,mathmlBuilder:U1});qz=s((t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=Jt(t.base,"operatorname"),i=!0):a=Jt(t,"operatorname");var o;if(a.body.length>0){for(var l=a.body.map(d=>{var p=d.text;return typeof p=="string"?{type:"textord",mode:d.mode,text:p}:d}),u=Ti(l,e.withFont("mathrm"),!0),h=0;h<u.length;h++){var f=u[h];f instanceof ls&&(f.text=f.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Ae.makeSpan(["mop"],u,e)}else o=Ae.makeSpan(["mop"],[],e);return i?Vz(o,r,n,e,e.style,0,0):o},"htmlBuilder$1"),Vve=s((t,e)=>{for(var r=cs(t.body,e.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof Xe.SpaceNode))if(a instanceof Xe.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var o=a.children[0];a.children.length===1&&o instanceof Xe.TextNode?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var l=r.map(f=>f.toText()).join("");r=[new Xe.TextNode(l)]}var u=new Xe.MathNode("mi",r);u.setAttribute("mathvariant","normal");var h=new Xe.MathNode("mo",[yo("\u2061","text")]);return t.parentIsSupSub?new Xe.MathNode("mrow",[u,h]):Xe.newDocumentFragment([u,h])},"mathmlBuilder");st({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:ni(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:qz,mathmlBuilder:Vve});J("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Ff({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Ae.makeFragment(Ti(t.body,e,!1)):Ae.makeSpan(["mord"],Ti(t.body,e,!0),e)},mathmlBuilder(t,e){return lh(t.body,e,!0)}});st({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=vr(t.body,e.havingCrampedStyle()),n=Ae.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return Ae.makeSpan(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new Xe.MathNode("mo",[new Xe.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new Xe.MathNode("mover",[nn(t.body,e),r]);return n.setAttribute("accent","true"),n}});st({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:ni(n)}},"handler"),htmlBuilder:s((t,e)=>{var r=Ti(t.body,e.withPhantom(),!1);return Ae.makeFragment(r)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=cs(t.body,e);return new Xe.MathNode("mphantom",r)},"mathmlBuilder")});st({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},"handler"),htmlBuilder:s((t,e)=>{var r=Ae.makeSpan([],[vr(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),Ae.makeSpan(["mord"],[r],e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=cs(ni(t.body),e),n=new Xe.MathNode("mphantom",r),i=new Xe.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i},"mathmlBuilder")});st({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},"handler"),htmlBuilder:s((t,e)=>{var r=Ae.makeSpan(["inner"],[vr(t.body,e.withPhantom())]),n=Ae.makeSpan(["fix"],[]);return Ae.makeSpan(["mord","rlap"],[r,n],e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=cs(ni(t.body),e),n=new Xe.MathNode("mphantom",r),i=new Xe.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i},"mathmlBuilder")});st({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=Jt(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=vr(t.body,e),n=Bn(t.dy,e);return Ae.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new Xe.MathNode("mpadded",[nn(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});st({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});st({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=Jt(e[0],"size"),o=Jt(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&Jt(i,"size").value,width:a.value,height:o.value}},htmlBuilder(t,e){var r=Ae.makeSpan(["mord","rule"],[],e),n=Bn(t.width,e),i=Bn(t.height,e),a=t.shift?Bn(t.shift,e):0;return r.style.borderRightWidth=tt(n),r.style.borderTopWidth=tt(i),r.style.bottom=tt(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Bn(t.width,e),n=Bn(t.height,e),i=t.shift?Bn(t.shift,e):0,a=e.color&&e.getColor()||"black",o=new Xe.MathNode("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",tt(r)),o.setAttribute("height",tt(n));var l=new Xe.MathNode("mpadded",[o]);return i>=0?l.setAttribute("height",tt(i)):(l.setAttribute("height",tt(i)),l.setAttribute("depth",tt(-i))),l.setAttribute("voffset",tt(i)),l}});s(Wz,"sizingGroup");YF=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Uve=s((t,e)=>{var r=e.havingSize(t.size);return Wz(t.body,r,e)},"htmlBuilder");st({type:"sizing",names:YF,props:{numArgs:0,allowedInText:!0},handler:s((t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:YF.indexOf(n)+1,body:a}},"handler"),htmlBuilder:Uve,mathmlBuilder:s((t,e)=>{var r=e.havingSize(t.size),n=cs(t.body,r),i=new Xe.MathNode("mstyle",n);return i.setAttribute("mathsize",tt(r.sizeMultiplier)),i},"mathmlBuilder")});st({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:s((t,e,r)=>{var{parser:n}=t,i=!1,a=!1,o=r[0]&&Jt(r[0],"ordgroup");if(o)for(var l="",u=0;u<o.body.length;++u){var h=o.body[u];if(l=h.text,l==="t")i=!0;else if(l==="b")a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var f=e[0];return{type:"smash",mode:n.mode,body:f,smashHeight:i,smashDepth:a}},"handler"),htmlBuilder:s((t,e)=>{var r=Ae.makeSpan([],[vr(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(t.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;var a=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e);return Ae.makeSpan(["mord"],[a],e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=new Xe.MathNode("mpadded",[nn(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r},"mathmlBuilder")});st({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=vr(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=Ae.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,a=i;e.style.id<Nt.TEXT.id&&(a=e.fontMetrics().xHeight);var o=i+a/4,l=r.height+r.depth+o+i,{span:u,ruleWidth:h,advanceWidth:f}=Kc.sqrtImage(l,e),d=u.height-h;d>r.height+r.depth+o&&(o=(o+d-r.height-r.depth)/2);var p=u.height-r.height-o-h;r.style.paddingLeft=tt(f);var m=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:u},{type:"kern",size:h}]},e);if(t.index){var g=e.havingStyle(Nt.SCRIPTSCRIPT),y=vr(t.index,g,e),v=.6*(m.height-m.depth),x=Ae.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:y}]},e),b=Ae.makeSpan(["root"],[x]);return Ae.makeSpan(["mord","sqrt"],[b,m],e)}else return Ae.makeSpan(["mord","sqrt"],[m],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new Xe.MathNode("mroot",[nn(r,e),nn(n,e)]):new Xe.MathNode("msqrt",[nn(r,e)])}});XF={display:Nt.DISPLAY,text:Nt.TEXT,script:Nt.SCRIPT,scriptscript:Nt.SCRIPTSCRIPT};st({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),o=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:o,body:a}},htmlBuilder(t,e){var r=XF[t.style],n=e.havingStyle(r).withFont("");return Wz(t.body,n,e)},mathmlBuilder(t,e){var r=XF[t.style],n=e.havingStyle(r),i=cs(t.body,n),a=new Xe.MathNode("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=o[t.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a}});qve=s(function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===Nt.DISPLAY.size||n.alwaysHandleSupSub);return i?np:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===Nt.DISPLAY.size||n.limits);return a?qz:null}else{if(n.type==="accent")return Mt.isCharacterBox(n.base)?XE:null;if(n.type==="horizBrace"){var o=!e.sub;return o===n.isOver?Gz:null}else return null}else return null},"htmlBuilderDelegate");Ff({type:"supsub",htmlBuilder(t,e){var r=qve(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:a}=t,o=vr(n,e),l,u,h=e.fontMetrics(),f=0,d=0,p=n&&Mt.isCharacterBox(n);if(i){var m=e.havingStyle(e.style.sup());l=vr(i,m,e),p||(f=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/e.sizeMultiplier)}if(a){var g=e.havingStyle(e.style.sub());u=vr(a,g,e),p||(d=o.depth+g.fontMetrics().subDrop*g.sizeMultiplier/e.sizeMultiplier)}var y;e.style===Nt.DISPLAY?y=h.sup1:e.style.cramped?y=h.sup3:y=h.sup2;var v=e.sizeMultiplier,x=tt(.5/h.ptPerEm/v),b=null;if(u){var k=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(o instanceof ls||k)&&(b=tt(-o.italic))}var A;if(l&&u){f=Math.max(f,y,l.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var w=h.defaultRuleThickness,T=4*w;if(f-l.depth-(u.height-d)<T){d=T-(f-l.depth)+u.height;var C=.8*h.xHeight-(f-l.depth);C>0&&(f+=C,d-=C)}var E=[{type:"elem",elem:u,shift:d,marginRight:x,marginLeft:b},{type:"elem",elem:l,shift:-f,marginRight:x}];A=Ae.makeVList({positionType:"individualShift",children:E},e)}else if(u){d=Math.max(d,h.sub1,u.height-.8*h.xHeight);var S=[{type:"elem",elem:u,marginLeft:b,marginRight:x}];A=Ae.makeVList({positionType:"shift",positionData:d,children:S},e)}else if(l)f=Math.max(f,y,l.depth+.25*h.xHeight),A=Ae.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:l,marginRight:x}]},e);else throw new Error("supsub must have either sup or sub.");var R=NE(o,"right")||"mord";return Ae.makeSpan([R],[o,Ae.makeSpan(["msupsub"],[A])],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=[nn(t.base,e)];t.sub&&a.push(nn(t.sub,e)),t.sup&&a.push(nn(t.sup,e));var o;if(r)o=n?"mover":"munder";else if(t.sub)if(t.sup){var h=t.base;h&&h.type==="op"&&h.limits&&e.style===Nt.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(e.style===Nt.DISPLAY||h.limits)?o="munderover":o="msubsup"}else{var u=t.base;u&&u.type==="op"&&u.limits&&(e.style===Nt.DISPLAY||u.alwaysHandleSupSub)||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(u.limits||e.style===Nt.DISPLAY)?o="munder":o="msub"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===Nt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===Nt.DISPLAY)?o="mover":o="msup"}return new Xe.MathNode(o,a)}});Ff({type:"atom",htmlBuilder(t,e){return Ae.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new Xe.MathNode("mo",[yo(t.text,t.mode)]);if(t.family==="bin"){var n=HE(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}});Hz={mi:"italic",mn:"normal",mtext:"normal"};Ff({type:"mathord",htmlBuilder(t,e){return Ae.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new Xe.MathNode("mi",[yo(t.text,t.mode,e)]),n=HE(t,e)||"italic";return n!==Hz[r.type]&&r.setAttribute("mathvariant",n),r}});Ff({type:"textord",htmlBuilder(t,e){return Ae.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=yo(t.text,t.mode,e),n=HE(t,e)||"normal",i;return t.mode==="text"?i=new Xe.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new Xe.MathNode("mn",[r]):t.text==="\\prime"?i=new Xe.MathNode("mo",[r]):i=new Xe.MathNode("mi",[r]),n!==Hz[i.type]&&i.setAttribute("mathvariant",n),i}});_E={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},AE={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ff({type:"spacing",htmlBuilder(t,e){if(AE.hasOwnProperty(t.text)){var r=AE[t.text].className||"";if(t.mode==="text"){var n=Ae.makeOrd(t,e,"textord");return n.classes.push(r),n}else return Ae.makeSpan(["mspace",r],[Ae.mathsym(t.text,t.mode,e)],e)}else{if(_E.hasOwnProperty(t.text))return Ae.makeSpan(["mspace",_E[t.text]],[],e);throw new je('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(AE.hasOwnProperty(t.text))r=new Xe.MathNode("mtext",[new Xe.TextNode("\xA0")]);else{if(_E.hasOwnProperty(t.text))return new Xe.MathNode("mspace");throw new je('Unknown type of space "'+t.text+'"')}return r}});jF=s(()=>{var t=new Xe.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad");Ff({type:"tag",mathmlBuilder(t,e){var r=new Xe.MathNode("mtable",[new Xe.MathNode("mtr",[jF(),new Xe.MathNode("mtd",[lh(t.body,e)]),jF(),new Xe.MathNode("mtd",[lh(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});KF={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},QF={"\\textbf":"textbf","\\textmd":"textmd"},Wve={"\\textit":"textit","\\textup":"textup"},ZF=s((t,e)=>{var r=t.font;if(r){if(KF[r])return e.withTextFontFamily(KF[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(Wve[r])},"optionsWithFont");st({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:ni(i),font:n}},htmlBuilder(t,e){var r=ZF(t,e),n=Ti(t.body,r,!0);return Ae.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=ZF(t,e);return lh(t.body,r)}});st({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=vr(t.body,e),n=Ae.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Ae.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 Ae.makeSpan(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new Xe.MathNode("mo",[new Xe.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new Xe.MathNode("munder",[nn(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});st({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=vr(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return Ae.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new Xe.MathNode("mpadded",[nn(t.body,e)],["vcenter"])}});st({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new je("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=JF(t),n=[],i=e.havingStyle(e.style.text()),a=0;a<r.length;a++){var o=r[a];o==="~"&&(o="\\textasciitilde"),n.push(Ae.makeSymbol(o,"Typewriter-Regular",t.mode,i,["mord","texttt"]))}return Ae.makeSpan(["mord","text"].concat(i.sizingClasses(e)),Ae.tryCombineChars(n),i)},mathmlBuilder(t,e){var r=new Xe.TextNode(JF(t)),n=new Xe.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});JF=s(t=>t.body.replace(/ /g,t.star?"\u2423":"\xA0"),"makeVerb"),sh=mz,Yz=`[ \r
]`,Hve="\\\\[a-zA-Z@]+",Yve="\\\\[^\uD800-\uDFFF]",Xve="("+Hve+")"+Yz+"*",jve=`\\\\(
|[ \r ]+
?)[ \r ]*`,zE="[\u0300-\u036F]",Kve=new RegExp(zE+"+$"),Qve="("+Yz+"+)|"+(jve+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(zE+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(zE+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Xve)+("|"+Yve+")"),Gb=class{static{s(this,"Lexer")}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(Qve,"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 go("EOF",new $s(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new je("Unexpected character: '"+e[r]+"'",new go(e[r],new $s(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 go(i,new $s(this,r,this.tokenRegex.lastIndex))}},$E=class{static{s(this,"Namespace")}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 je("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;i<this.undefStack.length;i++)delete this.undefStack[i][e];this.undefStack.length>0&&(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}},Zve=Pz;J("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});J("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});J("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});J("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});J("\\@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}});J("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");J("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});ez={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};J("\\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 je("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=ez[e.text],n==null||n>=r)throw new je("Invalid base-"+r+" digit "+e.text);for(var i;(i=ez[t.future().text])!=null&&i<r;)n*=r,n+=i,t.popToken()}return"\\@char{"+n+"}"});rC=s((t,e,r)=>{var n=t.consumeArg().tokens;if(n.length!==1)throw new je("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!e)throw new je("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!r)throw new je("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(n=t.consumeArg().tokens,n.length===1&&n[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 je("Invalid number of arguments: "+l);o=parseInt(l),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:o}),""},"newcommand");J("\\newcommand",t=>rC(t,!1,!0));J("\\renewcommand",t=>rC(t,!0,!1));J("\\providecommand",t=>rC(t,!0,!0));J("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});J("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});J("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),sh[r],dn.math[r],dn.text[r]),""});J("\\bgroup","{");J("\\egroup","}");J("~","\\nobreakspace");J("\\lq","`");J("\\rq","'");J("\\aa","\\r a");J("\\AA","\\r A");J("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");J("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");J("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");J("\u212C","\\mathscr{B}");J("\u2130","\\mathscr{E}");J("\u2131","\\mathscr{F}");J("\u210B","\\mathscr{H}");J("\u2110","\\mathscr{I}");J("\u2112","\\mathscr{L}");J("\u2133","\\mathscr{M}");J("\u211B","\\mathscr{R}");J("\u212D","\\mathfrak{C}");J("\u210C","\\mathfrak{H}");J("\u2128","\\mathfrak{Z}");J("\\Bbbk","\\Bbb{k}");J("\xB7","\\cdotp");J("\\llap","\\mathllap{\\textrm{#1}}");J("\\rlap","\\mathrlap{\\textrm{#1}}");J("\\clap","\\mathclap{\\textrm{#1}}");J("\\mathstrut","\\vphantom{(}");J("\\underbar","\\underline{\\text{#1}}");J("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');J("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");J("\\ne","\\neq");J("\u2260","\\neq");J("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");J("\u2209","\\notin");J("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");J("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");J("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");J("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");J("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");J("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");J("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");J("\u27C2","\\perp");J("\u203C","\\mathclose{!\\mkern-0.8mu!}");J("\u220C","\\notni");J("\u231C","\\ulcorner");J("\u231D","\\urcorner");J("\u231E","\\llcorner");J("\u231F","\\lrcorner");J("\xA9","\\copyright");J("\xAE","\\textregistered");J("\uFE0F","\\textregistered");J("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');J("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');J("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');J("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');J("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");J("\u22EE","\\vdots");J("\\varGamma","\\mathit{\\Gamma}");J("\\varDelta","\\mathit{\\Delta}");J("\\varTheta","\\mathit{\\Theta}");J("\\varLambda","\\mathit{\\Lambda}");J("\\varXi","\\mathit{\\Xi}");J("\\varPi","\\mathit{\\Pi}");J("\\varSigma","\\mathit{\\Sigma}");J("\\varUpsilon","\\mathit{\\Upsilon}");J("\\varPhi","\\mathit{\\Phi}");J("\\varPsi","\\mathit{\\Psi}");J("\\varOmega","\\mathit{\\Omega}");J("\\substack","\\begin{subarray}{c}#1\\end{subarray}");J("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");J("\\boxed","\\fbox{$\\displaystyle{#1}$}");J("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");J("\\implies","\\DOTSB\\;\\Longrightarrow\\;");J("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");tz={",":"\\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"};J("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in tz?e=tz[r]:(r.slice(0,4)==="\\not"||r in dn.math&&Mt.contains(["bin","rel"],dn.math[r].group))&&(e="\\dotsb"),e});nC={")":!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};J("\\dotso",function(t){var e=t.future().text;return e in nC?"\\ldots\\,":"\\ldots"});J("\\dotsc",function(t){var e=t.future().text;return e in nC&&e!==","?"\\ldots\\,":"\\ldots"});J("\\cdots",function(t){var e=t.future().text;return e in nC?"\\@cdots\\,":"\\@cdots"});J("\\dotsb","\\cdots");J("\\dotsm","\\cdots");J("\\dotsi","\\!\\cdots");J("\\dotsx","\\ldots\\,");J("\\DOTSI","\\relax");J("\\DOTSB","\\relax");J("\\DOTSX","\\relax");J("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");J("\\,","\\tmspace+{3mu}{.1667em}");J("\\thinspace","\\,");J("\\>","\\mskip{4mu}");J("\\:","\\tmspace+{4mu}{.2222em}");J("\\medspace","\\:");J("\\;","\\tmspace+{5mu}{.2777em}");J("\\thickspace","\\;");J("\\!","\\tmspace-{3mu}{.1667em}");J("\\negthinspace","\\!");J("\\negmedspace","\\tmspace-{4mu}{.2222em}");J("\\negthickspace","\\tmspace-{5mu}{.277em}");J("\\enspace","\\kern.5em ");J("\\enskip","\\hskip.5em\\relax");J("\\quad","\\hskip1em\\relax");J("\\qquad","\\hskip2em\\relax");J("\\tag","\\@ifstar\\tag@literal\\tag@paren");J("\\tag@paren","\\tag@literal{({#1})}");J("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new je("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});J("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");J("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");J("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");J("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");J("\\newline","\\\\\\relax");J("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");Xz=tt(zl["Main-Regular"][84][1]-.7*zl["Main-Regular"][65][1]);J("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Xz+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");J("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Xz+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");J("\\hspace","\\@ifstar\\@hspacer\\@hspace");J("\\@hspace","\\hskip #1\\relax");J("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");J("\\ordinarycolon",":");J("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");J("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');J("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');J("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');J("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');J("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');J("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');J("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');J("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');J("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');J("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');J("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');J("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');J("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');J("\u2237","\\dblcolon");J("\u2239","\\eqcolon");J("\u2254","\\coloneqq");J("\u2255","\\eqqcolon");J("\u2A74","\\Coloneqq");J("\\ratio","\\vcentcolon");J("\\coloncolon","\\dblcolon");J("\\colonequals","\\coloneqq");J("\\coloncolonequals","\\Coloneqq");J("\\equalscolon","\\eqqcolon");J("\\equalscoloncolon","\\Eqqcolon");J("\\colonminus","\\coloneq");J("\\coloncolonminus","\\Coloneq");J("\\minuscolon","\\eqcolon");J("\\minuscoloncolon","\\Eqcolon");J("\\coloncolonapprox","\\Colonapprox");J("\\coloncolonsim","\\Colonsim");J("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");J("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");J("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");J("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");J("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");J("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");J("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");J("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");J("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");J("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");J("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");J("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");J("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");J("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");J("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");J("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");J("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");J("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");J("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");J("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");J("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");J("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");J("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");J("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");J("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");J("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");J("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");J("\\imath","\\html@mathml{\\@imath}{\u0131}");J("\\jmath","\\html@mathml{\\@jmath}{\u0237}");J("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");J("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");J("\u27E6","\\llbracket");J("\u27E7","\\rrbracket");J("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");J("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");J("\u2983","\\lBrace");J("\u2984","\\rBrace");J("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");J("\u29B5","\\minuso");J("\\darr","\\downarrow");J("\\dArr","\\Downarrow");J("\\Darr","\\Downarrow");J("\\lang","\\langle");J("\\rang","\\rangle");J("\\uarr","\\uparrow");J("\\uArr","\\Uparrow");J("\\Uarr","\\Uparrow");J("\\N","\\mathbb{N}");J("\\R","\\mathbb{R}");J("\\Z","\\mathbb{Z}");J("\\alef","\\aleph");J("\\alefsym","\\aleph");J("\\Alpha","\\mathrm{A}");J("\\Beta","\\mathrm{B}");J("\\bull","\\bullet");J("\\Chi","\\mathrm{X}");J("\\clubs","\\clubsuit");J("\\cnums","\\mathbb{C}");J("\\Complex","\\mathbb{C}");J("\\Dagger","\\ddagger");J("\\diamonds","\\diamondsuit");J("\\empty","\\emptyset");J("\\Epsilon","\\mathrm{E}");J("\\Eta","\\mathrm{H}");J("\\exist","\\exists");J("\\harr","\\leftrightarrow");J("\\hArr","\\Leftrightarrow");J("\\Harr","\\Leftrightarrow");J("\\hearts","\\heartsuit");J("\\image","\\Im");J("\\infin","\\infty");J("\\Iota","\\mathrm{I}");J("\\isin","\\in");J("\\Kappa","\\mathrm{K}");J("\\larr","\\leftarrow");J("\\lArr","\\Leftarrow");J("\\Larr","\\Leftarrow");J("\\lrarr","\\leftrightarrow");J("\\lrArr","\\Leftrightarrow");J("\\Lrarr","\\Leftrightarrow");J("\\Mu","\\mathrm{M}");J("\\natnums","\\mathbb{N}");J("\\Nu","\\mathrm{N}");J("\\Omicron","\\mathrm{O}");J("\\plusmn","\\pm");J("\\rarr","\\rightarrow");J("\\rArr","\\Rightarrow");J("\\Rarr","\\Rightarrow");J("\\real","\\Re");J("\\reals","\\mathbb{R}");J("\\Reals","\\mathbb{R}");J("\\Rho","\\mathrm{P}");J("\\sdot","\\cdot");J("\\sect","\\S");J("\\spades","\\spadesuit");J("\\sub","\\subset");J("\\sube","\\subseteq");J("\\supe","\\supseteq");J("\\Tau","\\mathrm{T}");J("\\thetasym","\\vartheta");J("\\weierp","\\wp");J("\\Zeta","\\mathrm{Z}");J("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");J("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");J("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");J("\\bra","\\mathinner{\\langle{#1}|}");J("\\ket","\\mathinner{|{#1}\\rangle}");J("\\braket","\\mathinner{\\langle{#1}\\rangle}");J("\\Bra","\\left\\langle#1\\right|");J("\\Ket","\\left|#1\\right\\rangle");jz=s(t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,o=e.macros.get("|"),l=e.macros.get("\\|");e.macros.beginGroup();var u=s(d=>p=>{t&&(p.macros.set("|",o),i.length&&p.macros.set("\\|",l));var m=d;if(!d&&i.length){var g=p.future();g.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?i:n,numArgs:0}},"midMacro");e.macros.set("|",u(!1)),i.length&&e.macros.set("\\|",u(!0));var h=e.consumeArg().tokens,f=e.expandTokens([...a,...h,...r]);return e.macros.endGroup(),{tokens:f.reverse(),numArgs:0}},"braketHelper");J("\\bra@ket",jz(!1));J("\\bra@set",jz(!0));J("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");J("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");J("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");J("\\angln","{\\angl n}");J("\\blue","\\textcolor{##6495ed}{#1}");J("\\orange","\\textcolor{##ffa500}{#1}");J("\\pink","\\textcolor{##ff00af}{#1}");J("\\red","\\textcolor{##df0030}{#1}");J("\\green","\\textcolor{##28ae7b}{#1}");J("\\gray","\\textcolor{gray}{#1}");J("\\purple","\\textcolor{##9d38bd}{#1}");J("\\blueA","\\textcolor{##ccfaff}{#1}");J("\\blueB","\\textcolor{##80f6ff}{#1}");J("\\blueC","\\textcolor{##63d9ea}{#1}");J("\\blueD","\\textcolor{##11accd}{#1}");J("\\blueE","\\textcolor{##0c7f99}{#1}");J("\\tealA","\\textcolor{##94fff5}{#1}");J("\\tealB","\\textcolor{##26edd5}{#1}");J("\\tealC","\\textcolor{##01d1c1}{#1}");J("\\tealD","\\textcolor{##01a995}{#1}");J("\\tealE","\\textcolor{##208170}{#1}");J("\\greenA","\\textcolor{##b6ffb0}{#1}");J("\\greenB","\\textcolor{##8af281}{#1}");J("\\greenC","\\textcolor{##74cf70}{#1}");J("\\greenD","\\textcolor{##1fab54}{#1}");J("\\greenE","\\textcolor{##0d923f}{#1}");J("\\goldA","\\textcolor{##ffd0a9}{#1}");J("\\goldB","\\textcolor{##ffbb71}{#1}");J("\\goldC","\\textcolor{##ff9c39}{#1}");J("\\goldD","\\textcolor{##e07d10}{#1}");J("\\goldE","\\textcolor{##a75a05}{#1}");J("\\redA","\\textcolor{##fca9a9}{#1}");J("\\redB","\\textcolor{##ff8482}{#1}");J("\\redC","\\textcolor{##f9685d}{#1}");J("\\redD","\\textcolor{##e84d39}{#1}");J("\\redE","\\textcolor{##bc2612}{#1}");J("\\maroonA","\\textcolor{##ffbde0}{#1}");J("\\maroonB","\\textcolor{##ff92c6}{#1}");J("\\maroonC","\\textcolor{##ed5fa6}{#1}");J("\\maroonD","\\textcolor{##ca337c}{#1}");J("\\maroonE","\\textcolor{##9e034e}{#1}");J("\\purpleA","\\textcolor{##ddd7ff}{#1}");J("\\purpleB","\\textcolor{##c6b9fc}{#1}");J("\\purpleC","\\textcolor{##aa87ff}{#1}");J("\\purpleD","\\textcolor{##7854ab}{#1}");J("\\purpleE","\\textcolor{##543b78}{#1}");J("\\mintA","\\textcolor{##f5f9e8}{#1}");J("\\mintB","\\textcolor{##edf2df}{#1}");J("\\mintC","\\textcolor{##e0e5cc}{#1}");J("\\grayA","\\textcolor{##f6f7f7}{#1}");J("\\grayB","\\textcolor{##f0f1f2}{#1}");J("\\grayC","\\textcolor{##e3e5e6}{#1}");J("\\grayD","\\textcolor{##d6d8da}{#1}");J("\\grayE","\\textcolor{##babec2}{#1}");J("\\grayF","\\textcolor{##888d93}{#1}");J("\\grayG","\\textcolor{##626569}{#1}");J("\\grayH","\\textcolor{##3b3e40}{#1}");J("\\grayI","\\textcolor{##21242c}{#1}");J("\\kaBlue","\\textcolor{##314453}{#1}");J("\\kaGreen","\\textcolor{##71B307}{#1}");Kz={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},GE=class{static{s(this,"MacroExpander")}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 $E(Zve,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Gb(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 go("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,o=0,l=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new je("Extra }",a)}else if(a.text==="EOF")throw new je("Unexpected end of input in a macro argument, expected '"+(e&&n?e[l]:"}")+"'",a);if(e&&n)if((o===0||o===1&&e[l]==="{")&&a.text===e[l]){if(++l,l===e.length){r.splice(-l,l);break}}else l=0}while(o!==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 je("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;i<n.length;i++){var a=this.popToken();if(n[i]!==a.text)throw new je("Use of the macro doesn't match its definition",a)}}for(var o=[],l=0;l<e;l++)o.push(this.consumeArg(r&&r[l+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new je("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 je("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var u=a[l];if(u.text==="#"){if(l===0)throw new je("Incomplete placeholder at end of macro body",u);if(u=a[--l],u.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(u.text))a.splice(l,2,...o[+u.text-1]);else throw new je("Not a valid argument number",u)}}}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 go(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 o=i.replace(/##/g,"");o.indexOf("#"+(a+1))!==-1;)++a;for(var l=new Gb(i,this.settings),u=[],h=l.lex();h.text!=="EOF";)u.push(h),h=l.lex();u.reverse();var f={tokens:u,numArgs:a};return f}return i}isDefined(e){return this.macros.has(e)||sh.hasOwnProperty(e)||dn.math.hasOwnProperty(e)||dn.text.hasOwnProperty(e)||Kz.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:sh.hasOwnProperty(e)&&!sh[e].primitive}},rz=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Mb=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"}),LE={"\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"}},nz={\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"},Vb=class t{static{s(this,"Parser")}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 GE(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 je("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 go("}")),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&&sh[i.text]&&sh[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<e.length;i++)if(e[i].type==="infix"){if(r!==-1)throw new je("only one infix operator per group",e[i].token);r=i,n=e[i].replaceWith}if(r!==-1&&n){var a,o,l=e.slice(0,r),u=e.slice(r+1);l.length===1&&l[0].type==="ordgroup"?a=l[0]:a={type:"ordgroup",mode:this.mode,body:l},u.length===1&&u[0].type==="ordgroup"?o=u[0]:o={type:"ordgroup",mode:this.mode,body:u};var h;return n==="\\\\abovefrac"?h=this.callFunction(n,[a,e[r],o],[]):h=this.callFunction(n,[a,o],[]),[h]}else return e}handleSupSubscript(e){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var i=this.parseGroup(e);if(!i)throw new je("Expected group after '"+n+"'",r);return i}formatUnsupportedCmd(e){for(var r=[],n=0;n<e.length;n++)r.push({type:"textord",mode:"text",text:e[n]});var i={type:"text",mode:this.mode,body:r},a={type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]};return a}parseAtom(e){var r=this.parseGroup("atom",e);if(this.mode==="text")return r;for(var n,i;;){this.consumeSpaces();var a=this.fetch();if(a.text==="\\limits"||a.text==="\\nolimits"){if(r&&r.type==="op"){var o=a.text==="\\limits";r.limits=o,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=a.text==="\\limits");else throw new je("Limit controls must follow a math operator",a);this.consume()}else if(a.text==="^"){if(n)throw new je("Double superscript",a);n=this.handleSupSubscript("superscript")}else if(a.text==="_"){if(i)throw new je("Double subscript",a);i=this.handleSupSubscript("subscript")}else if(a.text==="'"){if(n)throw new je("Double superscript",a);var l={type:"textord",mode:this.mode,text:"\\prime"},u=[l];for(this.consume();this.fetch().text==="'";)u.push(l),this.consume();this.fetch().text==="^"&&u.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:u}}else if(Mb[a.text]){var h=rz.test(a.text),f=[];for(f.push(new go(Mb[a.text])),this.consume();;){var d=this.fetch().text;if(!Mb[d]||rz.test(d)!==h)break;f.unshift(new go(Mb[d])),this.consume()}var p=this.subparse(f);h?i={type:"ordgroup",mode:"math",body:p}:n={type:"ordgroup",mode:"math",body:p}}else break}return n||i?{type:"supsub",mode:this.mode,base:r,sup:n,sub:i}:r}parseFunction(e,r){var n=this.fetch(),i=n.text,a=sh[i];if(!a)return null;if(this.consume(),r&&r!=="atom"&&!a.allowedInArgument)throw new je("Got function '"+i+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!a.allowedInText)throw new je("Can't use function '"+i+"' in text mode",n);if(this.mode==="math"&&a.allowedInMath===!1)throw new je("Can't use function '"+i+"' in math mode",n);var{args:o,optArgs:l}=this.parseArguments(i,a);return this.callFunction(i,o,l,n,e)}callFunction(e,r,n,i,a){var o={funcName:e,parser:this,token:i,breakOnTokenText:a},l=sh[e];if(l&&l.handler)return l.handler(o,r,n);throw new je("No function handler for "+e)}parseArguments(e,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<n;o++){var l=r.argTypes&&r.argTypes[o],u=o<r.numOptionalArgs;(r.primitive&&l==null||r.type==="sqrt"&&o===1&&a[0]==null)&&(l="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",l,u);if(u)a.push(h);else if(h!=null)i.push(h);else throw new je("Null argument, please report this as a bug")}return{args:i,optArgs:a}}parseGroupOfType(e,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var i=this.parseArgumentGroup(n,"text");return i!=null?{type:"styling",mode:i.mode,body:[i],style:"text"}:null}case"raw":{var a=this.parseStringGroup("raw",n);return a!=null?{type:"raw",mode:"text",string:a.text}:null}case"primitive":{if(n)throw new je("A primitive argument cannot be optional");var o=this.parseGroup(e);if(o==null)throw new je("Expected group as "+e,this.fetch());return o}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new je("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var i="",a;(a=this.fetch()).text!=="EOF";)i+=a.text,this.consume();return this.consume(),n.text=i,n}parseRegexGroup(e,r){for(var n=this.fetch(),i=n,a="",o;(o=this.fetch()).text!=="EOF"&&e.test(a+o.text);)i=o,a+=i.text,this.consume();if(a==="")throw new je("Invalid "+r+": '"+n.text+"'",n);return n.range(i,a)}parseColorGroup(e){var r=this.parseStringGroup("color",e);if(r==null)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new je("Invalid color: '"+r.text+"'",r);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(e){var r,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",e),!r)return null;!e&&r.text.length===0&&(r.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!i)throw new je("Invalid size: '"+r.text+"'",r);var a={number:+(i[1]+i[2]),unit:i[3]};if(!sz(a))throw new je("Invalid unit: '"+a.unit+"'",r);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,r){var n=this.gullet.scanArgument(e);if(n==null)return null;var i=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return r&&this.switchMode(i),o}parseGroup(e,r){var n=this.fetch(),i=n.text,a;if(i==="{"||i==="\\begingroup"){this.consume();var o=i==="{"?"}":"\\endgroup";this.gullet.beginGroup();var l=this.parseExpression(!1,o),u=this.fetch();this.expect(o),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:$s.range(n,u),body:l,semisimple:i==="\\begingroup"||void 0}}else if(a=this.parseFunction(r,e)||this.parseSymbol(),a==null&&i[0]==="\\"&&!Kz.hasOwnProperty(i)){if(this.settings.throwOnError)throw new je("Undefined control sequence: "+i,n);a=this.formatUnsupportedCmd(i),this.consume()}return a}formLigatures(e){for(var r=e.length-1,n=0;n<r;++n){var i=e[n],a=i.text;a==="-"&&e[n+1].text==="-"&&(n+1<r&&e[n+2].text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:$s.range(i,e[n+2]),text:"---"}),r-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:$s.range(i,e[n+1]),text:"--"}),r-=1)),(a==="'"||a==="`")&&e[n+1].text===a&&(e.splice(n,2,{type:"textord",mode:"text",loc:$s.range(i,e[n+1]),text:a+a}),r-=1)}}parseSymbol(){var e=this.fetch(),r=e.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),i=n.charAt(0)==="*";if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new je(`\\verb assertion failed --
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:i}}nz.hasOwnProperty(r[0])&&!dn[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',e),r=nz[r[0]]+r.slice(1));var a=Kve.exec(r);a&&(r=r.substring(0,a.index),r==="i"?r="\u0131":r==="j"&&(r="\u0237"));var o;if(dn[this.mode][r]){this.settings.strict&&this.mode==="math"&&IE.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var l=dn[this.mode][r].group,u=$s.range(e),h;if(Uye.hasOwnProperty(l)){var f=l;h={type:"atom",mode:this.mode,family:f,loc:u,text:r}}else h={type:l,mode:this.mode,loc:u,text:r};o=h}else if(r.charCodeAt(0)>=128)this.settings.strict&&(az(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)),o={type:"textord",mode:"text",loc:$s.range(e),text:r};else return null;if(this.consume(),a)for(var d=0;d<a[0].length;d++){var p=a[0][d];if(!LE[p])throw new je("Unknown accent ' "+p+"'",e);var m=LE[p][this.mode]||LE[p].text;if(!m)throw new je("Accent "+p+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:$s.range(e),label:m,isStretchy:!1,isShifty:!0,base:o}}return o}};Vb.endOfExpression=["}","\\endgroup","\\end","\\right","&"];iC=s(function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Vb(e,r);delete n.gullet.macros.current["\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new je("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new go("\\df@tag")])}]}return i},"parseTree"),Qz=s(function(e,r,n){r.textContent="";var i=aC(e,n).toNode();r.appendChild(i)},"render");typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Qz=s(function(){throw new je("KaTeX doesn't work in quirks mode.")},"render"));Jve=s(function(e,r){var n=aC(e,r).toMarkup();return n},"renderToString"),e2e=s(function(e,r){var n=new F1(r);return iC(e,n)},"generateParseTree"),Zz=s(function(e,r,n){if(n.throwOnError||!(e instanceof je))throw e;var i=Ae.makeSpan(["katex-error"],[new ls(r)]);return i.setAttribute("title",e.toString()),i.setAttribute("style","color:"+n.errorColor),i},"renderError"),aC=s(function(e,r){var n=new F1(r);try{var i=iC(e,n);return hve(i,e,n)}catch(a){return Zz(a,e,n)}},"renderToDomTree"),t2e=s(function(e,r){var n=new F1(r);try{var i=iC(e,n);return fve(i,e,n)}catch(a){return Zz(a,e,n)}},"renderToHTMLTree"),r2e={version:"0.16.11",render:Qz,renderToString:Jve,ParseError:je,SETTINGS_SCHEMA:Ib,__parse:e2e,__renderToDomTree:aC,__renderToHTMLTree:t2e,__setFontMetrics:Bye,__defineSymbol:B,__defineFunction:st,__defineMacro:J,__domTree:{Span:Bf,Anchor:$1,SymbolNode:ls,SvgNode:Xo,PathNode:$l,LineNode:G1}}});function a2e(){let t="data-temp-href-target";ip.default.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),ip.default.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 ip,zf,n2e,i2e,n$,t$,$r,s2e,o2e,l2e,c2e,i$,u2e,hr,h2e,f2e,uh,sC,d2e,p2e,r$,oC,Ei,$f,hh,$e,Qt=_(()=>{"use strict";ip=ka(yE(),1),zf=/<br\s*\/?>/gi,n2e=s(t=>t?i$(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),i2e=(()=>{let t=!1;return()=>{t||(a2e(),t=!0)}})();s(a2e,"setupDompurifyHooks");n$=s(t=>(i2e(),ip.default.sanitize(t)),"removeScript"),t$=s((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=n$(t):r!=="loose"&&(t=i$(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=c2e(t))}return t},"sanitizeMore"),$r=s((t,e)=>t&&(e.dompurifyConfig?t=ip.default.sanitize(t$(t,e),e.dompurifyConfig).toString():t=ip.default.sanitize(t$(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),s2e=s((t,e)=>typeof t=="string"?$r(t,e):t.flat().map(r=>$r(r,e)),"sanitizeTextOrArray"),o2e=s(t=>zf.test(t),"hasBreaks"),l2e=s(t=>t.split(zf),"splitBreaks"),c2e=s(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),i$=s(t=>t.replace(zf,"#br#"),"breakToPlaceholder"),u2e=s(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},"getUrl"),hr=s(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),h2e=s(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),f2e=s(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),uh=s(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let i=e[n];if(i===","&&n>0&&n+1<e.length){let a=e[n-1],o=e[n+1];d2e(a,o)&&(i=a+","+o,n++,r.pop())}r.push(p2e(i))}return r.join("")},"parseGenericTypes"),sC=s((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),d2e=s((t,e)=>{let r=sC(t,"~"),n=sC(e,"~");return r===1&&n===1},"shouldCombineSets"),p2e=s(t=>{let e=sC(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"),r$=s(()=>window.MathMLElement!==void 0,"isMathMLSupported"),oC=/\$\$(.*)\$\$/g,Ei=s(t=>(t.match(oC)?.length??0)>0,"hasKatex"),$f=s(async(t,e)=>{t=await hh(t,e);let r=document.createElement("div");r.innerHTML=t,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"),hh=s(async(t,e)=>{if(!Ei(t))return t;if(!(r$()||e.legacyMathML||e.forceLegacyMathML))return t.replace(oC,"MathML is unsupported in this environment.");let{default:r}=await Promise.resolve().then(()=>(e$(),Jz)),n=e.forceLegacyMathML||!r$()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(zf).map(i=>Ei(i)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${i}</div>`:`<div>${i}</div>`).join("").replace(oC,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},"renderKatex"),$e={getRows:n2e,sanitizeText:$r,sanitizeTextOrArray:s2e,hasBreaks:o2e,splitBreaks:l2e,lineBreakRegex:zf,removeScript:n$,getUrl:u2e,evaluate:hr,getMax:h2e,getMin:f2e}});var m2e,g2e,xr,ql,Un=_(()=>{"use strict";it();m2e=s(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),g2e=s(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"),xr=s(function(t,e,r,n){let i=g2e(e,r,n);m2e(t,i)},"configureSvgSize"),ql=s(function(t,e,r,n){let i=e.node().getBBox(),a=i.width,o=i.height;V.info(`SVG bounds: ${a}x${o}`,i);let l=0,u=0;V.info(`Graph bounds: ${l}x${u}`,t),l=a+r*2,u=o+r*2,V.info(`Calculated bounds: ${l}x${u}`),xr(e,u,l,n);let h=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox")});var jb,y2e,a$,s$,lC=_(()=>{"use strict";it();jb={},y2e=s((t,e,r)=>{let n="";return t in jb&&jb[t]?n=jb[t](r):V.warn(`No theme found for ${t}`),` & {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
/* 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"),a$=s((t,e)=>{e!==void 0&&(jb[t]=e)},"addStylesForDiagram"),s$=y2e});var q1={};ur(q1,{clear:()=>br,getAccDescription:()=>Ur,getAccTitle:()=>Gr,getDiagramTitle:()=>Qr,setAccDescription:()=>Vr,setAccTitle:()=>Ar,setDiagramTitle:()=>an});var cC,uC,hC,fC,br,Ar,Gr,Vr,Ur,an,Qr,Ci=_(()=>{"use strict";Qt();zs();cC="",uC="",hC="",fC=s(t=>$r(t,_r()),"sanitizeText"),br=s(()=>{cC="",hC="",uC=""},"clear"),Ar=s(t=>{cC=fC(t).replace(/^\s+/g,"")},"setAccTitle"),Gr=s(()=>cC,"getAccTitle"),Vr=s(t=>{hC=fC(t).replace(/\n\s+/g,`
`)},"setAccDescription"),Ur=s(()=>hC,"getAccDescription"),an=s(t=>{uC=fC(t)},"setDiagramTitle"),Qr=s(()=>uC,"getDiagramTitle")});var o$,v2e,le,pC,Qb,x2e,mC,b2e,Kb,Gf,W1,dC,gt=_(()=>{"use strict";Mf();it();zs();Qt();Un();lC();Ci();o$=V,v2e=E1,le=_r,pC=kb,Qb=ih,x2e=s(t=>$r(t,le()),"sanitizeText"),mC=ql,b2e=s(()=>q1,"getCommonDb"),Kb={},Gf=s((t,e,r)=>{Kb[t]&&o$.warn(`Diagram with id ${t} already registered. Overwriting.`),Kb[t]=e,r&&Q7(t,r),a$(t,e.styles),e.injectUtils?.(o$,v2e,le,x2e,mC,b2e(),()=>{})},"registerDiagram"),W1=s(t=>{if(t in Kb)return Kb[t];throw new dC(t)},"getDiagram"),dC=class extends Error{static{s(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}});var Ko,fh,Ga,jo,Wl,H1,gC,yC,Zb,Jb,l$,k2e,w2e,T2e,E2e,C2e,S2e,_2e,A2e,L2e,D2e,R2e,M2e,I2e,N2e,O2e,P2e,B2e,c$,F2e,z2e,u$,$2e,G2e,V2e,U2e,dh,q2e,W2e,H2e,Y2e,X2e,Y1,vC=_(()=>{"use strict";gt();Qt();Ci();Ko=[],fh=[""],Ga="global",jo="",Wl=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],H1=[],gC="",yC=!1,Zb=4,Jb=2,k2e=s(function(){return l$},"getC4Type"),w2e=s(function(t){l$=$r(t,le())},"setC4Type"),T2e=s(function(t,e,r,n,i,a,o,l,u){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let h={},f=H1.find(d=>d.from===e&&d.to===r);if(f?h=f:H1.push(h),h.type=t,h.from=e,h.to=r,h.label={text:n},i==null)h.techn={text:""};else if(typeof i=="object"){let[d,p]=Object.entries(i)[0];h[d]={text:p}}else h.techn={text:i};if(a==null)h.descr={text:""};else if(typeof a=="object"){let[d,p]=Object.entries(a)[0];h[d]={text:p}}else h.descr={text:a};if(typeof o=="object"){let[d,p]=Object.entries(o)[0];h[d]=p}else h.sprite=o;if(typeof l=="object"){let[d,p]=Object.entries(l)[0];h[d]=p}else h.tags=l;if(typeof u=="object"){let[d,p]=Object.entries(u)[0];h[d]=p}else h.link=u;h.wrap=dh()},"addRel"),E2e=s(function(t,e,r,n,i,a,o){if(e===null||r===null)return;let l={},u=Ko.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,Ko.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.descr={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.descr={text:n};if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]=f}else l.sprite=i;if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.tags=a;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.typeC4Shape={text:t},l.parentBoundary=Ga,l.wrap=dh()},"addPersonOrSystem"),C2e=s(function(t,e,r,n,i,a,o,l){if(e===null||r===null)return;let u={},h=Ko.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,Ko.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]=d}else u.sprite=a;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=dh(),u.typeC4Shape={text:t},u.parentBoundary=Ga},"addContainer"),S2e=s(function(t,e,r,n,i,a,o,l){if(e===null||r===null)return;let u={},h=Ko.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,Ko.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]=d}else u.sprite=a;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=dh(),u.typeC4Shape={text:t},u.parentBoundary=Ga},"addComponent"),_2e=s(function(t,e,r,n,i){if(t===null||e===null)return;let a={},o=Wl.find(l=>l.alias===t);if(o&&t===o.alias?a=o:(a.alias=t,Wl.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"system"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.link=i;a.parentBoundary=Ga,a.wrap=dh(),jo=Ga,Ga=t,fh.push(jo)},"addPersonOrSystemBoundary"),A2e=s(function(t,e,r,n,i){if(t===null||e===null)return;let a={},o=Wl.find(l=>l.alias===t);if(o&&t===o.alias?a=o:(a.alias=t,Wl.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"container"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.link=i;a.parentBoundary=Ga,a.wrap=dh(),jo=Ga,Ga=t,fh.push(jo)},"addContainerBoundary"),L2e=s(function(t,e,r,n,i,a,o,l){if(e===null||r===null)return;let u={},h=Wl.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,Wl.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.type={text:"node"};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.type={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};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.nodeType=t,u.parentBoundary=Ga,u.wrap=dh(),jo=Ga,Ga=e,fh.push(jo)},"addDeploymentNode"),D2e=s(function(){Ga=jo,fh.pop(),jo=fh.pop(),fh.push(jo)},"popBoundaryParseStack"),R2e=s(function(t,e,r,n,i,a,o,l,u,h,f){let d=Ko.find(p=>p.alias===e);if(!(d===void 0&&(d=Wl.find(p=>p.alias===e),d===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];d[p]=m}else d.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];d[p]=m}else d.fontColor=n;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];d[p]=m}else d.borderColor=i;if(a!=null)if(typeof a=="object"){let[p,m]=Object.entries(a)[0];d[p]=m}else d.shadowing=a;if(o!=null)if(typeof o=="object"){let[p,m]=Object.entries(o)[0];d[p]=m}else d.shape=o;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];d[p]=m}else d.sprite=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];d[p]=m}else d.techn=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];d[p]=m}else d.legendText=h;if(f!=null)if(typeof f=="object"){let[p,m]=Object.entries(f)[0];d[p]=m}else d.legendSprite=f}},"updateElStyle"),M2e=s(function(t,e,r,n,i,a,o){let l=H1.find(u=>u.from===e&&u.to===r);if(l!==void 0){if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];l[u]=h}else l.textColor=n;if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];l[u]=h}else l.lineColor=i;if(a!=null)if(typeof a=="object"){let[u,h]=Object.entries(a)[0];l[u]=parseInt(h)}else l.offsetX=parseInt(a);if(o!=null)if(typeof o=="object"){let[u,h]=Object.entries(o)[0];l[u]=parseInt(h)}else l.offsetY=parseInt(o)}},"updateRelStyle"),I2e=s(function(t,e,r){let n=Zb,i=Jb;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&&(Zb=n),i>=1&&(Jb=i)},"updateLayoutConfig"),N2e=s(function(){return Zb},"getC4ShapeInRow"),O2e=s(function(){return Jb},"getC4BoundaryInRow"),P2e=s(function(){return Ga},"getCurrentBoundaryParse"),B2e=s(function(){return jo},"getParentBoundaryParse"),c$=s(function(t){return t==null?Ko:Ko.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),F2e=s(function(t){return Ko.find(e=>e.alias===t)},"getC4Shape"),z2e=s(function(t){return Object.keys(c$(t))},"getC4ShapeKeys"),u$=s(function(t){return t==null?Wl:Wl.filter(e=>e.parentBoundary===t)},"getBoundaries"),$2e=u$,G2e=s(function(){return H1},"getRels"),V2e=s(function(){return gC},"getTitle"),U2e=s(function(t){yC=t},"setWrap"),dh=s(function(){return yC},"autoWrap"),q2e=s(function(){Ko=[],Wl=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],jo="",Ga="global",fh=[""],H1=[],fh=[""],gC="",yC=!1,Zb=4,Jb=2},"clear"),W2e={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},H2e={FILLED:0,OPEN:1},Y2e={LEFTOF:0,RIGHTOF:1,OVER:2},X2e=s(function(t){gC=$r(t,le())},"setTitle"),Y1={addPersonOrSystem:E2e,addPersonOrSystemBoundary:_2e,addContainer:C2e,addContainerBoundary:A2e,addComponent:S2e,addDeploymentNode:L2e,popBoundaryParseStack:D2e,addRel:T2e,updateElStyle:R2e,updateRelStyle:M2e,updateLayoutConfig:I2e,autoWrap:dh,setWrap:U2e,getC4ShapeArray:c$,getC4Shape:F2e,getC4ShapeKeys:z2e,getBoundaries:u$,getBoundarys:$2e,getCurrentBoundaryParse:P2e,getParentBoundaryParse:B2e,getRels:G2e,getTitle:V2e,getC4Type:k2e,getC4ShapeInRow:N2e,getC4BoundaryInRow:O2e,setAccTitle:Ar,getAccTitle:Gr,getAccDescription:Ur,setAccDescription:Vr,getConfig:s(()=>le().c4,"getConfig"),clear:q2e,LINETYPE:W2e,ARROWTYPE:H2e,PLACEMENT:Y2e,setTitle:X2e,setC4Type:w2e}});function Vf(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}var xC=_(()=>{"use strict";s(Vf,"ascending")});function bC(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}var h$=_(()=>{"use strict";s(bC,"descending")});function Uf(t){let e,r,n;t.length!==2?(e=Vf,r=s((l,u)=>Vf(t(l),u),"compare2"),n=s((l,u)=>t(l)-u,"delta")):(e=t===Vf||t===bC?t:j2e,r=t,n=t);function i(l,u,h=0,f=l.length){if(h<f){if(e(u,u)!==0)return f;do{let d=h+f>>>1;r(l[d],u)<0?h=d+1:f=d}while(h<f)}return h}s(i,"left");function a(l,u,h=0,f=l.length){if(h<f){if(e(u,u)!==0)return f;do{let d=h+f>>>1;r(l[d],u)<=0?h=d+1:f=d}while(h<f)}return h}s(a,"right");function o(l,u,h=0,f=l.length){let d=i(l,u,h,f-1);return d>h&&n(l[d-1],u)>-n(l[d],u)?d-1:d}return s(o,"center"),{left:i,center:o,right:a}}function j2e(){return 0}var kC=_(()=>{"use strict";xC();h$();s(Uf,"bisector");s(j2e,"zero")});function wC(t){return t===null?NaN:+t}var f$=_(()=>{"use strict";s(wC,"number")});var d$,p$,K2e,Q2e,TC,m$=_(()=>{"use strict";xC();kC();f$();d$=Uf(Vf),p$=d$.right,K2e=d$.left,Q2e=Uf(wC).center,TC=p$});function g$({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function Z2e({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function J2e({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function exe(t){return t!==null&&typeof t=="object"?t.valueOf():t}var ap,y$=_(()=>{"use strict";ap=class extends Map{static{s(this,"InternMap")}constructor(e,r=exe){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(g$(this,e))}has(e){return super.has(g$(this,e))}set(e,r){return super.set(Z2e(this,e),r)}delete(e){return super.delete(J2e(this,e))}};s(g$,"intern_get");s(Z2e,"intern_set");s(J2e,"intern_delete");s(exe,"keyof")});function e4(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=txe?10:a>=rxe?5:a>=nxe?2:1,l,u,h;return i<0?(h=Math.pow(10,-i)/o,l=Math.round(t*h),u=Math.round(e*h),l/h<t&&++l,u/h>e&&--u,h=-h):(h=Math.pow(10,i)*o,l=Math.round(t/h),u=Math.round(e/h),l*h<t&&++l,u*h>e&&--u),u<l&&.5<=r&&r<2?e4(t,e,r*2):[l,u,h]}function t4(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let n=e<t,[i,a,o]=n?e4(e,t,r):e4(t,e,r);if(!(a>=i))return[];let l=a-i+1,u=new Array(l);if(n)if(o<0)for(let h=0;h<l;++h)u[h]=(a-h)/-o;else for(let h=0;h<l;++h)u[h]=(a-h)*o;else if(o<0)for(let h=0;h<l;++h)u[h]=(i+h)/-o;else for(let h=0;h<l;++h)u[h]=(i+h)*o;return u}function X1(t,e,r){return e=+e,t=+t,r=+r,e4(t,e,r)[2]}function sp(t,e,r){e=+e,t=+t,r=+r;let n=e<t,i=n?X1(e,t,r):X1(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}var txe,rxe,nxe,v$=_(()=>{"use strict";txe=Math.sqrt(50),rxe=Math.sqrt(10),nxe=Math.sqrt(2);s(e4,"tickSpec");s(t4,"ticks");s(X1,"tickIncrement");s(sp,"tickStep")});function r4(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 x$=_(()=>{"use strict";s(r4,"max")});function n4(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 b$=_(()=>{"use strict";s(n4,"min")});function i4(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<i;)a[n]=t+n*r;return a}var k$=_(()=>{"use strict";s(i4,"range")});var ph=_(()=>{"use strict";m$();kC();x$();b$();k$();v$();y$()});function EC(t){return t}var w$=_(()=>{"use strict";s(EC,"default")});function ixe(t){return"translate("+t+",0)"}function axe(t){return"translate(0,"+t+")"}function sxe(t){return e=>+t(e)}function oxe(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function lxe(){return!this.__axis}function E$(t,e){var r=[],n=null,i=null,a=6,o=6,l=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=t===s4||t===a4?-1:1,f=t===a4||t===CC?"x":"y",d=t===s4||t===SC?ixe:axe;function p(m){var g=n??(e.ticks?e.ticks.apply(e,r):e.domain()),y=i??(e.tickFormat?e.tickFormat.apply(e,r):EC),v=Math.max(a,0)+l,x=e.range(),b=+x[0]+u,k=+x[x.length-1]+u,A=(e.bandwidth?oxe:sxe)(e.copy(),u),w=m.selection?m.selection():m,T=w.selectAll(".domain").data([null]),C=w.selectAll(".tick").data(g,e).order(),E=C.exit(),S=C.enter().append("g").attr("class","tick"),R=C.select("line"),D=C.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(S),R=R.merge(S.append("line").attr("stroke","currentColor").attr(f+"2",h*a)),D=D.merge(S.append("text").attr("fill","currentColor").attr(f,h*v).attr("dy",t===s4?"0em":t===SC?"0.71em":"0.32em")),m!==w&&(T=T.transition(m),C=C.transition(m),R=R.transition(m),D=D.transition(m),E=E.transition(m).attr("opacity",T$).attr("transform",function(L){return isFinite(L=A(L))?d(L+u):this.getAttribute("transform")}),S.attr("opacity",T$).attr("transform",function(L){var P=this.parentNode.__axis;return d((P&&isFinite(P=P(L))?P:A(L))+u)})),E.remove(),T.attr("d",t===a4||t===CC?o?"M"+h*o+","+b+"H"+u+"V"+k+"H"+h*o:"M"+u+","+b+"V"+k:o?"M"+b+","+h*o+"V"+u+"H"+k+"V"+h*o:"M"+b+","+u+"H"+k),C.attr("opacity",1).attr("transform",function(L){return d(A(L)+u)}),R.attr(f+"2",h*a),D.attr(f,h*v).text(y),w.filter(lxe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===CC?"start":t===a4?"end":"middle"),w.each(function(){this.__axis=A})}return s(p,"axis"),p.scale=function(m){return arguments.length?(e=m,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),p):r.slice()},p.tickValues=function(m){return arguments.length?(n=m==null?null:Array.from(m),p):n&&n.slice()},p.tickFormat=function(m){return arguments.length?(i=m,p):i},p.tickSize=function(m){return arguments.length?(a=o=+m,p):a},p.tickSizeInner=function(m){return arguments.length?(a=+m,p):a},p.tickSizeOuter=function(m){return arguments.length?(o=+m,p):o},p.tickPadding=function(m){return arguments.length?(l=+m,p):l},p.offset=function(m){return arguments.length?(u=+m,p):u},p}function _C(t){return E$(s4,t)}function AC(t){return E$(SC,t)}var s4,CC,SC,a4,T$,C$=_(()=>{"use strict";w$();s4=1,CC=2,SC=3,a4=4,T$=1e-6;s(ixe,"translateX");s(axe,"translateY");s(sxe,"number");s(oxe,"center");s(lxe,"entering");s(E$,"axis");s(_C,"axisTop");s(AC,"axisBottom")});var S$=_(()=>{"use strict";C$()});function A$(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new o4(r)}function o4(t){this._=t}function uxe(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=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 hxe(t,e){for(var r=0,n=t.length,i;r<n;++r)if((i=t[r]).name===e)return i.value}function _$(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=cxe,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var cxe,LC,L$=_(()=>{"use strict";cxe={value:s(()=>{},"value")};s(A$,"dispatch");s(o4,"Dispatch");s(uxe,"parseTypenames");o4.prototype=A$.prototype={constructor:o4,on:s(function(t,e){var r=this._,n=uxe(t+"",r),i,a=-1,o=n.length;if(arguments.length<2){for(;++a<o;)if((i=(t=n[a]).type)&&(i=hxe(r[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<o;)if(i=(t=n[a]).type)r[i]=_$(r[i],t.name,e);else if(e==null)for(i in r)r[i]=_$(r[i],t.name,null);return this},"on"),copy:s(function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new o4(t)},"copy"),call:s(function(t,e){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,a;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],n=0,i=a.length;n<i;++n)a[n].value.apply(e,r)},"call"),apply:s(function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)},"apply")};s(hxe,"get");s(_$,"set");LC=A$});var DC=_(()=>{"use strict";L$()});var l4,RC,MC=_(()=>{"use strict";l4="http://www.w3.org/1999/xhtml",RC={svg:"http://www.w3.org/2000/svg",xhtml:l4,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Hl(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),RC.hasOwnProperty(e)?{space:RC[e],local:t}:t}var c4=_(()=>{"use strict";MC();s(Hl,"default")});function fxe(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===l4&&e.documentElement.namespaceURI===l4?e.createElement(t):e.createElementNS(r,t)}}function dxe(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function j1(t){var e=Hl(t);return(e.local?dxe:fxe)(e)}var IC=_(()=>{"use strict";c4();MC();s(fxe,"creatorInherit");s(dxe,"creatorFixed");s(j1,"default")});function pxe(){}function mh(t){return t==null?pxe:function(){return this.querySelector(t)}}var u4=_(()=>{"use strict";s(pxe,"none");s(mh,"default")});function NC(t){typeof t!="function"&&(t=mh(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],o=a.length,l=n[i]=new Array(o),u,h,f=0;f<o;++f)(u=a[f])&&(h=t.call(u,u.__data__,f,a))&&("__data__"in u&&(h.__data__=u.__data__),l[f]=h);return new qn(n,this._parents)}var D$=_(()=>{"use strict";Qo();u4();s(NC,"default")});function OC(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}var R$=_(()=>{"use strict";s(OC,"array")});function mxe(){return[]}function op(t){return t==null?mxe:function(){return this.querySelectorAll(t)}}var PC=_(()=>{"use strict";s(mxe,"empty");s(op,"default")});function gxe(t){return function(){return OC(t.apply(this,arguments))}}function BC(t){typeof t=="function"?t=gxe(t):t=op(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a<r;++a)for(var o=e[a],l=o.length,u,h=0;h<l;++h)(u=o[h])&&(n.push(t.call(u,u.__data__,h,o)),i.push(u));return new qn(n,i)}var M$=_(()=>{"use strict";Qo();R$();PC();s(gxe,"arrayAll");s(BC,"default")});function lp(t){return function(){return this.matches(t)}}function h4(t){return function(e){return e.matches(t)}}var K1=_(()=>{"use strict";s(lp,"default");s(h4,"childMatcher")});function vxe(t){return function(){return yxe.call(this.children,t)}}function xxe(){return this.firstElementChild}function FC(t){return this.select(t==null?xxe:vxe(typeof t=="function"?t:h4(t)))}var yxe,I$=_(()=>{"use strict";K1();yxe=Array.prototype.find;s(vxe,"childFind");s(xxe,"childFirst");s(FC,"default")});function kxe(){return Array.from(this.children)}function wxe(t){return function(){return bxe.call(this.children,t)}}function zC(t){return this.selectAll(t==null?kxe:wxe(typeof t=="function"?t:h4(t)))}var bxe,N$=_(()=>{"use strict";K1();bxe=Array.prototype.filter;s(kxe,"children");s(wxe,"childrenFilter");s(zC,"default")});function $C(t){typeof t!="function"&&(t=lp(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],o=a.length,l=n[i]=[],u,h=0;h<o;++h)(u=a[h])&&t.call(u,u.__data__,h,a)&&l.push(u);return new qn(n,this._parents)}var O$=_(()=>{"use strict";Qo();K1();s($C,"default")});function Q1(t){return new Array(t.length)}var GC=_(()=>{"use strict";s(Q1,"default")});function VC(){return new qn(this._enter||this._groups.map(Q1),this._parents)}function Z1(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var UC=_(()=>{"use strict";GC();Qo();s(VC,"default");s(Z1,"EnterNode");Z1.prototype={constructor:Z1,appendChild:s(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:s(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:s(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:s(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")}});function qC(t){return function(){return t}}var P$=_(()=>{"use strict";s(qC,"default")});function Txe(t,e,r,n,i,a){for(var o=0,l,u=e.length,h=a.length;o<h;++o)(l=e[o])?(l.__data__=a[o],n[o]=l):r[o]=new Z1(t,a[o]);for(;o<u;++o)(l=e[o])&&(i[o]=l)}function Exe(t,e,r,n,i,a,o){var l,u,h=new Map,f=e.length,d=a.length,p=new Array(f),m;for(l=0;l<f;++l)(u=e[l])&&(p[l]=m=o.call(u,u.__data__,l,e)+"",h.has(m)?i[l]=u:h.set(m,u));for(l=0;l<d;++l)m=o.call(t,a[l],l,a)+"",(u=h.get(m))?(n[l]=u,u.__data__=a[l],h.delete(m)):r[l]=new Z1(t,a[l]);for(l=0;l<f;++l)(u=e[l])&&h.get(p[l])===u&&(i[l]=u)}function Cxe(t){return t.__data__}function WC(t,e){if(!arguments.length)return Array.from(this,Cxe);var r=e?Exe:Txe,n=this._parents,i=this._groups;typeof t!="function"&&(t=qC(t));for(var a=i.length,o=new Array(a),l=new Array(a),u=new Array(a),h=0;h<a;++h){var f=n[h],d=i[h],p=d.length,m=Sxe(t.call(f,f&&f.__data__,h,n)),g=m.length,y=l[h]=new Array(g),v=o[h]=new Array(g),x=u[h]=new Array(p);r(f,d,y,v,x,m,e);for(var b=0,k=0,A,w;b<g;++b)if(A=y[b]){for(b>=k&&(k=b+1);!(w=v[k])&&++k<g;);A._next=w||null}}return o=new qn(o,n),o._enter=l,o._exit=u,o}function Sxe(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var B$=_(()=>{"use strict";Qo();UC();P$();s(Txe,"bindIndex");s(Exe,"bindKey");s(Cxe,"datum");s(WC,"default");s(Sxe,"arraylike")});function HC(){return new qn(this._exit||this._groups.map(Q1),this._parents)}var F$=_(()=>{"use strict";GC();Qo();s(HC,"default")});function YC(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 z$=_(()=>{"use strict";s(YC,"default")});function XC(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,o=Math.min(i,a),l=new Array(i),u=0;u<o;++u)for(var h=r[u],f=n[u],d=h.length,p=l[u]=new Array(d),m,g=0;g<d;++g)(m=h[g]||f[g])&&(p[g]=m);for(;u<i;++u)l[u]=r[u];return new qn(l,this._parents)}var $$=_(()=>{"use strict";Qo();s(XC,"default")});function jC(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],i=n.length-1,a=n[i],o;--i>=0;)(o=n[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}var G$=_(()=>{"use strict";s(jC,"default")});function KC(t){t||(t=_xe);function e(d,p){return d&&p?t(d.__data__,p.__data__):!d-!p}s(e,"compareNode");for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a){for(var o=r[a],l=o.length,u=i[a]=new Array(l),h,f=0;f<l;++f)(h=o[f])&&(u[f]=h);u.sort(e)}return new qn(i,this._parents).order()}function _xe(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var V$=_(()=>{"use strict";Qo();s(KC,"default");s(_xe,"ascending")});function QC(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var U$=_(()=>{"use strict";s(QC,"default")});function ZC(){return Array.from(this)}var q$=_(()=>{"use strict";s(ZC,"default")});function JC(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length;i<a;++i){var o=n[i];if(o)return o}return null}var W$=_(()=>{"use strict";s(JC,"default")});function eS(){let t=0;for(let e of this)++t;return t}var H$=_(()=>{"use strict";s(eS,"default")});function tS(){return!this.node()}var Y$=_(()=>{"use strict";s(tS,"default")});function rS(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],a=0,o=i.length,l;a<o;++a)(l=i[a])&&t.call(l,l.__data__,a,i);return this}var X$=_(()=>{"use strict";s(rS,"default")});function Axe(t){return function(){this.removeAttribute(t)}}function Lxe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Dxe(t,e){return function(){this.setAttribute(t,e)}}function Rxe(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mxe(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function Ixe(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 nS(t,e){var r=Hl(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?Lxe:Axe:typeof e=="function"?r.local?Ixe:Mxe:r.local?Rxe:Dxe)(r,e))}var j$=_(()=>{"use strict";c4();s(Axe,"attrRemove");s(Lxe,"attrRemoveNS");s(Dxe,"attrConstant");s(Rxe,"attrConstantNS");s(Mxe,"attrFunction");s(Ixe,"attrFunctionNS");s(nS,"default")});function J1(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var iS=_(()=>{"use strict";s(J1,"default")});function Nxe(t){return function(){this.style.removeProperty(t)}}function Oxe(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Pxe(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function aS(t,e,r){return arguments.length>1?this.each((e==null?Nxe:typeof e=="function"?Pxe:Oxe)(t,e,r??"")):gh(this.node(),t)}function gh(t,e){return t.style.getPropertyValue(e)||J1(t).getComputedStyle(t,null).getPropertyValue(e)}var sS=_(()=>{"use strict";iS();s(Nxe,"styleRemove");s(Oxe,"styleConstant");s(Pxe,"styleFunction");s(aS,"default");s(gh,"styleValue")});function Bxe(t){return function(){delete this[t]}}function Fxe(t,e){return function(){this[t]=e}}function zxe(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function oS(t,e){return arguments.length>1?this.each((e==null?Bxe:typeof e=="function"?zxe:Fxe)(t,e)):this.node()[t]}var K$=_(()=>{"use strict";s(Bxe,"propertyRemove");s(Fxe,"propertyConstant");s(zxe,"propertyFunction");s(oS,"default")});function Q$(t){return t.trim().split(/^|\s+/)}function lS(t){return t.classList||new Z$(t)}function Z$(t){this._node=t,this._names=Q$(t.getAttribute("class")||"")}function J$(t,e){for(var r=lS(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function eG(t,e){for(var r=lS(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function $xe(t){return function(){J$(this,t)}}function Gxe(t){return function(){eG(this,t)}}function Vxe(t,e){return function(){(e.apply(this,arguments)?J$:eG)(this,t)}}function cS(t,e){var r=Q$(t+"");if(arguments.length<2){for(var n=lS(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof e=="function"?Vxe:e?$xe:Gxe)(r,e))}var tG=_(()=>{"use strict";s(Q$,"classArray");s(lS,"classList");s(Z$,"ClassList");Z$.prototype={add:s(function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:s(function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:s(function(t){return this._names.indexOf(t)>=0},"contains")};s(J$,"classedAdd");s(eG,"classedRemove");s($xe,"classedTrue");s(Gxe,"classedFalse");s(Vxe,"classedFunction");s(cS,"default")});function Uxe(){this.textContent=""}function qxe(t){return function(){this.textContent=t}}function Wxe(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function uS(t){return arguments.length?this.each(t==null?Uxe:(typeof t=="function"?Wxe:qxe)(t)):this.node().textContent}var rG=_(()=>{"use strict";s(Uxe,"textRemove");s(qxe,"textConstant");s(Wxe,"textFunction");s(uS,"default")});function Hxe(){this.innerHTML=""}function Yxe(t){return function(){this.innerHTML=t}}function Xxe(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function hS(t){return arguments.length?this.each(t==null?Hxe:(typeof t=="function"?Xxe:Yxe)(t)):this.node().innerHTML}var nG=_(()=>{"use strict";s(Hxe,"htmlRemove");s(Yxe,"htmlConstant");s(Xxe,"htmlFunction");s(hS,"default")});function jxe(){this.nextSibling&&this.parentNode.appendChild(this)}function fS(){return this.each(jxe)}var iG=_(()=>{"use strict";s(jxe,"raise");s(fS,"default")});function Kxe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dS(){return this.each(Kxe)}var aG=_(()=>{"use strict";s(Kxe,"lower");s(dS,"default")});function pS(t){var e=typeof t=="function"?t:j1(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var sG=_(()=>{"use strict";IC();s(pS,"default")});function Qxe(){return null}function mS(t,e){var r=typeof t=="function"?t:j1(t),n=e==null?Qxe:typeof e=="function"?e:mh(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var oG=_(()=>{"use strict";IC();u4();s(Qxe,"constantNull");s(mS,"default")});function Zxe(){var t=this.parentNode;t&&t.removeChild(this)}function gS(){return this.each(Zxe)}var lG=_(()=>{"use strict";s(Zxe,"remove");s(gS,"default")});function Jxe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ebe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function yS(t){return this.select(t?ebe:Jxe)}var cG=_(()=>{"use strict";s(Jxe,"selection_cloneShallow");s(ebe,"selection_cloneDeep");s(yS,"default")});function vS(t){return arguments.length?this.property("__data__",t):this.node().__data__}var uG=_(()=>{"use strict";s(vS,"default")});function tbe(t){return function(e){t.call(this,e,this.__data__)}}function rbe(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 nbe(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r<i;++r)a=e[r],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++n]=a;++n?e.length=n:delete this.__on}}}function ibe(t,e,r){return function(){var n=this.__on,i,a=tbe(e);if(n){for(var o=0,l=n.length;o<l;++o)if((i=n[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),i.value=e;return}}this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},n?n.push(i):this.__on=[i]}}function xS(t,e,r){var n=rbe(t+""),i,a=n.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,h=l.length,f;u<h;++u)for(i=0,f=l[u];i<a;++i)if((o=n[i]).type===f.type&&o.name===f.name)return f.value}return}for(l=e?ibe:nbe,i=0;i<a;++i)this.each(l(n[i],e,r));return this}var hG=_(()=>{"use strict";s(tbe,"contextListener");s(rbe,"parseTypenames");s(nbe,"onRemove");s(ibe,"onAdd");s(xS,"default")});function fG(t,e,r){var n=J1(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 abe(t,e){return function(){return fG(this,t,e)}}function sbe(t,e){return function(){return fG(this,t,e.apply(this,arguments))}}function bS(t,e){return this.each((typeof e=="function"?sbe:abe)(t,e))}var dG=_(()=>{"use strict";iS();s(fG,"dispatchEvent");s(abe,"dispatchConstant");s(sbe,"dispatchFunction");s(bS,"default")});function*kS(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length,o;i<a;++i)(o=n[i])&&(yield o)}var pG=_(()=>{"use strict";s(kS,"default")});function qn(t,e){this._groups=t,this._parents=e}function mG(){return new qn([[document.documentElement]],wS)}function obe(){return this}var wS,eu,Qo=_(()=>{"use strict";D$();M$();I$();N$();O$();B$();UC();F$();z$();$$();G$();V$();U$();q$();W$();H$();Y$();X$();j$();sS();K$();tG();rG();nG();iG();aG();sG();oG();lG();cG();uG();hG();dG();pG();wS=[null];s(qn,"Selection");s(mG,"selection");s(obe,"selection_selection");qn.prototype=mG.prototype={constructor:qn,select:NC,selectAll:BC,selectChild:FC,selectChildren:zC,filter:$C,data:WC,enter:VC,exit:HC,join:YC,merge:XC,selection:obe,order:jC,sort:KC,call:QC,nodes:ZC,node:JC,size:eS,empty:tS,each:rS,attr:nS,style:aS,property:oS,classed:cS,text:uS,html:hS,raise:fS,lower:dS,append:pS,insert:mS,remove:gS,clone:yS,datum:vS,on:xS,dispatch:bS,[Symbol.iterator]:kS};eu=mG});function Me(t){return typeof t=="string"?new qn([[document.querySelector(t)]],[document.documentElement]):new qn([[t]],wS)}var gG=_(()=>{"use strict";Qo();s(Me,"default")});var Zo=_(()=>{"use strict";K1();c4();gG();Qo();u4();PC();sS()});var yG=_(()=>{"use strict"});function yh(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function cp(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}var TS=_(()=>{"use strict";s(yh,"default");s(cp,"extend")});function vh(){}function xG(){return this.rgb().formatHex()}function mbe(){return this.rgb().formatHex8()}function gbe(){return SG(this).formatHsl()}function bG(){return this.rgb().formatRgb()}function el(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=lbe.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?kG(e):r===3?new Ji(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?f4(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?f4(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=cbe.exec(t))?new Ji(e[1],e[2],e[3],1):(e=ube.exec(t))?new Ji(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=hbe.exec(t))?f4(e[1],e[2],e[3],e[4]):(e=fbe.exec(t))?f4(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=dbe.exec(t))?EG(e[1],e[2]/100,e[3]/100,1):(e=pbe.exec(t))?EG(e[1],e[2]/100,e[3]/100,e[4]):vG.hasOwnProperty(t)?kG(vG[t]):t==="transparent"?new Ji(NaN,NaN,NaN,0):null}function kG(t){return new Ji(t>>16&255,t>>8&255,t&255,1)}function f4(t,e,r,n){return n<=0&&(t=e=r=NaN),new Ji(t,e,r,n)}function CS(t){return t instanceof vh||(t=el(t)),t?(t=t.rgb(),new Ji(t.r,t.g,t.b,t.opacity)):new Ji}function hp(t,e,r,n){return arguments.length===1?CS(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 wG(){return`#${qf(this.r)}${qf(this.g)}${qf(this.b)}`}function ybe(){return`#${qf(this.r)}${qf(this.g)}${qf(this.b)}${qf((isNaN(this.opacity)?1:this.opacity)*255)}`}function TG(){let t=m4(this.opacity);return`${t===1?"rgb(":"rgba("}${Wf(this.r)}, ${Wf(this.g)}, ${Wf(this.b)}${t===1?")":`, ${t})`}`}function m4(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Wf(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function qf(t){return t=Wf(t),(t<16?"0":"")+t.toString(16)}function EG(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Jo(t,e,r,n)}function SG(t){if(t instanceof Jo)return new Jo(t.h,t.s,t.l,t.opacity);if(t instanceof vh||(t=el(t)),!t)return new Jo;if(t instanceof Jo)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),o=NaN,l=a-i,u=(a+i)/2;return l?(e===a?o=(r-n)/l+(r<n)*6:r===a?o=(n-e)/l+2:o=(e-r)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new Jo(o,l,u,t.opacity)}function _G(t,e,r,n){return arguments.length===1?SG(t):new Jo(t,e,r,n??1)}function Jo(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function CG(t){return t=(t||0)%360,t<0?t+360:t}function d4(t){return Math.max(0,Math.min(1,t||0))}function ES(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 ey,p4,up,ty,Yl,lbe,cbe,ube,hbe,fbe,dbe,pbe,vG,SS=_(()=>{"use strict";TS();s(vh,"Color");ey=.7,p4=1/ey,up="\\s*([+-]?\\d+)\\s*",ty="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lbe=/^#([0-9a-f]{3,8})$/,cbe=new RegExp(`^rgb\\(${up},${up},${up}\\)$`),ube=new RegExp(`^rgb\\(${Yl},${Yl},${Yl}\\)$`),hbe=new RegExp(`^rgba\\(${up},${up},${up},${ty}\\)$`),fbe=new RegExp(`^rgba\\(${Yl},${Yl},${Yl},${ty}\\)$`),dbe=new RegExp(`^hsl\\(${ty},${Yl},${Yl}\\)$`),pbe=new RegExp(`^hsla\\(${ty},${Yl},${Yl},${ty}\\)$`),vG={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};yh(vh,el,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:xG,formatHex:xG,formatHex8:mbe,formatHsl:gbe,formatRgb:bG,toString:bG});s(xG,"color_formatHex");s(mbe,"color_formatHex8");s(gbe,"color_formatHsl");s(bG,"color_formatRgb");s(el,"color");s(kG,"rgbn");s(f4,"rgba");s(CS,"rgbConvert");s(hp,"rgb");s(Ji,"Rgb");yh(Ji,hp,cp(vh,{brighter(t){return t=t==null?p4:Math.pow(p4,t),new Ji(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ey:Math.pow(ey,t),new Ji(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ji(Wf(this.r),Wf(this.g),Wf(this.b),m4(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:wG,formatHex:wG,formatHex8:ybe,formatRgb:TG,toString:TG}));s(wG,"rgb_formatHex");s(ybe,"rgb_formatHex8");s(TG,"rgb_formatRgb");s(m4,"clampa");s(Wf,"clampi");s(qf,"hex");s(EG,"hsla");s(SG,"hslConvert");s(_G,"hsl");s(Jo,"Hsl");yh(Jo,_G,cp(vh,{brighter(t){return t=t==null?p4:Math.pow(p4,t),new Jo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ey:Math.pow(ey,t),new Jo(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(ES(t>=240?t-240:t+120,i,n),ES(t,i,n),ES(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Jo(CG(this.h),d4(this.s),d4(this.l),m4(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=m4(this.opacity);return`${t===1?"hsl(":"hsla("}${CG(this.h)}, ${d4(this.s)*100}%, ${d4(this.l)*100}%${t===1?")":`, ${t})`}`}}));s(CG,"clamph");s(d4,"clampt");s(ES,"hsl2rgb")});var AG,LG,DG=_(()=>{"use strict";AG=Math.PI/180,LG=180/Math.PI});function PG(t){if(t instanceof Xl)return new Xl(t.l,t.a,t.b,t.opacity);if(t instanceof tu)return BG(t);t instanceof Ji||(t=CS(t));var e=DS(t.r),r=DS(t.g),n=DS(t.b),i=_S((.2225045*e+.7168786*r+.0606169*n)/MG),a,o;return e===r&&r===n?a=o=i:(a=_S((.4360747*e+.3850649*r+.1430804*n)/RG),o=_S((.0139322*e+.0971045*r+.7141733*n)/IG)),new Xl(116*i-16,500*(a-i),200*(i-o),t.opacity)}function RS(t,e,r,n){return arguments.length===1?PG(t):new Xl(t,e,r,n??1)}function Xl(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function _S(t){return t>vbe?Math.pow(t,1/3):t/OG+NG}function AS(t){return t>fp?t*t*t:OG*(t-NG)}function LS(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function DS(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xbe(t){if(t instanceof tu)return new tu(t.h,t.c,t.l,t.opacity);if(t instanceof Xl||(t=PG(t)),t.a===0&&t.b===0)return new tu(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*LG;return new tu(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ry(t,e,r,n){return arguments.length===1?xbe(t):new tu(t,e,r,n??1)}function tu(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function BG(t){if(isNaN(t.h))return new Xl(t.l,0,0,t.opacity);var e=t.h*AG;return new Xl(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}var g4,RG,MG,IG,NG,fp,OG,vbe,FG=_(()=>{"use strict";TS();SS();DG();g4=18,RG=.96422,MG=1,IG=.82521,NG=4/29,fp=6/29,OG=3*fp*fp,vbe=fp*fp*fp;s(PG,"labConvert");s(RS,"lab");s(Xl,"Lab");yh(Xl,RS,cp(vh,{brighter(t){return new Xl(this.l+g4*(t??1),this.a,this.b,this.opacity)},darker(t){return new Xl(this.l-g4*(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=RG*AS(e),t=MG*AS(t),r=IG*AS(r),new Ji(LS(3.1338561*e-1.6168667*t-.4906146*r),LS(-.9787684*e+1.9161415*t+.033454*r),LS(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));s(_S,"xyz2lab");s(AS,"lab2xyz");s(LS,"lrgb2rgb");s(DS,"rgb2lrgb");s(xbe,"hclConvert");s(ry,"hcl");s(tu,"Hcl");s(BG,"hcl2lab");yh(tu,ry,cp(vh,{brighter(t){return new tu(this.h,this.c,this.l+g4*(t??1),this.opacity)},darker(t){return new tu(this.h,this.c,this.l-g4*(t??1),this.opacity)},rgb(){return BG(this).rgb()}}))});var dp=_(()=>{"use strict";SS();FG()});function MS(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function IS(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],o=n>0?t[n-1]:2*i-a,l=n<e-1?t[n+2]:2*a-i;return MS((r-n/e)*e,o,i,a,l)}}var NS=_(()=>{"use strict";s(MS,"basis");s(IS,"default")});function OS(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],o=t[(n+1)%e],l=t[(n+2)%e];return MS((r-n/e)*e,i,a,o,l)}}var zG=_(()=>{"use strict";NS();s(OS,"default")});var pp,PS=_(()=>{"use strict";pp=s(t=>()=>t,"default")});function $G(t,e){return function(r){return t+r*e}}function bbe(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 GG(t,e){var r=e-t;return r?$G(t,r>180||r<-180?r-360*Math.round(r/360):r):pp(isNaN(t)?e:t)}function VG(t){return(t=+t)==1?ru:function(e,r){return r-e?bbe(e,r,t):pp(isNaN(e)?r:e)}}function ru(t,e){var r=e-t;return r?$G(t,r):pp(isNaN(t)?e:t)}var BS=_(()=>{"use strict";PS();s($G,"linear");s(bbe,"exponential");s(GG,"hue");s(VG,"gamma");s(ru,"nogamma")});function UG(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),o,l;for(o=0;o<r;++o)l=hp(e[o]),n[o]=l.r||0,i[o]=l.g||0,a[o]=l.b||0;return n=t(n),i=t(i),a=t(a),l.opacity=1,function(u){return l.r=n(u),l.g=i(u),l.b=a(u),l+""}}}var Hf,kbe,wbe,FS=_(()=>{"use strict";dp();NS();zG();BS();Hf=s(function t(e){var r=VG(e);function n(i,a){var o=r((i=hp(i)).r,(a=hp(a)).r),l=r(i.g,a.g),u=r(i.b,a.b),h=ru(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=u(f),i.opacity=h(f),i+""}}return s(n,"rgb"),n.gamma=t,n},"rgbGamma")(1);s(UG,"rgbSpline");kbe=UG(IS),wbe=UG(OS)});function zS(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<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n}}function qG(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var WG=_(()=>{"use strict";s(zS,"default");s(qG,"isNumberArray")});function HG(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=xh(t[o],e[o]);for(;o<r;++o)a[o]=e[o];return function(l){for(o=0;o<n;++o)a[o]=i[o](l);return a}}var YG=_(()=>{"use strict";y4();s(HG,"genericArray")});function $S(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}var XG=_(()=>{"use strict";s($S,"default")});function $i(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ny=_(()=>{"use strict";s($i,"default")});function GS(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]=xh(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var jG=_(()=>{"use strict";y4();s(GS,"default")});function Tbe(t){return function(){return t}}function Ebe(t){return function(e){return t(e)+""}}function mp(t,e){var r=US.lastIndex=VS.lastIndex=0,n,i,a,o=-1,l=[],u=[];for(t=t+"",e=e+"";(n=US.exec(t))&&(i=VS.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:$i(n,i)})),r=VS.lastIndex;return r<e.length&&(a=e.slice(r),l[o]?l[o]+=a:l[++o]=a),l.length<2?u[0]?Ebe(u[0].x):Tbe(e):(e=u.length,function(h){for(var f=0,d;f<e;++f)l[(d=u[f]).i]=d.x(h);return l.join("")})}var US,VS,qS=_(()=>{"use strict";ny();US=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,VS=new RegExp(US.source,"g");s(Tbe,"zero");s(Ebe,"one");s(mp,"default")});function xh(t,e){var r=typeof e,n;return e==null||r==="boolean"?pp(e):(r==="number"?$i:r==="string"?(n=el(e))?(e=n,Hf):mp:e instanceof el?Hf:e instanceof Date?$S:qG(e)?zS:Array.isArray(e)?HG:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?GS:$i)(t,e)}var y4=_(()=>{"use strict";dp();FS();YG();XG();ny();jG();qS();PS();WG();s(xh,"default")});function v4(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var KG=_(()=>{"use strict";s(v4,"default")});function b4(t,e,r,n,i,a){var o,l,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*r+e*n)&&(r-=t*u,n-=e*u),(l=Math.sqrt(r*r+n*n))&&(r/=l,n/=l,u/=l),t*n<e*r&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*QG,skewX:Math.atan(u)*QG,scaleX:o,scaleY:l}}var QG,x4,ZG=_(()=>{"use strict";QG=180/Math.PI,x4={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};s(b4,"default")});function JG(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?x4:b4(e.a,e.b,e.c,e.d,e.e,e.f)}function eV(t){return t==null?x4:(k4||(k4=document.createElementNS("http://www.w3.org/2000/svg","g")),k4.setAttribute("transform",t),(t=k4.transform.baseVal.consolidate())?(t=t.matrix,b4(t.a,t.b,t.c,t.d,t.e,t.f)):x4)}var k4,tV=_(()=>{"use strict";ZG();s(JG,"parseCss");s(eV,"parseSvg")});function rV(t,e,r,n){function i(h){return h.length?h.pop()+" ":""}s(i,"pop");function a(h,f,d,p,m,g){if(h!==d||f!==p){var y=m.push("translate(",null,e,null,r);g.push({i:y-4,x:$i(h,d)},{i:y-2,x:$i(f,p)})}else(d||p)&&m.push("translate("+d+e+p+r)}s(a,"translate");function o(h,f,d,p){h!==f?(h-f>180?f+=360:f-h>180&&(h+=360),p.push({i:d.push(i(d)+"rotate(",null,n)-2,x:$i(h,f)})):f&&d.push(i(d)+"rotate("+f+n)}s(o,"rotate");function l(h,f,d,p){h!==f?p.push({i:d.push(i(d)+"skewX(",null,n)-2,x:$i(h,f)}):f&&d.push(i(d)+"skewX("+f+n)}s(l,"skewX");function u(h,f,d,p,m,g){if(h!==d||f!==p){var y=m.push(i(m)+"scale(",null,",",null,")");g.push({i:y-4,x:$i(h,d)},{i:y-2,x:$i(f,p)})}else(d!==1||p!==1)&&m.push(i(m)+"scale("+d+","+p+")")}return s(u,"scale"),function(h,f){var d=[],p=[];return h=t(h),f=t(f),a(h.translateX,h.translateY,f.translateX,f.translateY,d,p),o(h.rotate,f.rotate,d,p),l(h.skewX,f.skewX,d,p),u(h.scaleX,h.scaleY,f.scaleX,f.scaleY,d,p),h=f=null,function(m){for(var g=-1,y=p.length,v;++g<y;)d[(v=p[g]).i]=v.x(m);return d.join("")}}}var WS,HS,nV=_(()=>{"use strict";ny();tV();s(rV,"interpolateTransform");WS=rV(JG,"px, ","px)","deg)"),HS=rV(eV,", ",")",")")});function iV(t){return function(e,r){var n=t((e=ry(e)).h,(r=ry(r)).h),i=ru(e.c,r.c),a=ru(e.l,r.l),o=ru(e.opacity,r.opacity);return function(l){return e.h=n(l),e.c=i(l),e.l=a(l),e.opacity=o(l),e+""}}}var YS,Cbe,aV=_(()=>{"use strict";dp();BS();s(iV,"hcl");YS=iV(GG),Cbe=iV(ru)});var gp=_(()=>{"use strict";y4();ny();KG();qS();nV();FS();aV()});function cy(){return Yf||(lV(Sbe),Yf=oy.now()+E4)}function Sbe(){Yf=0}function ly(){this._call=this._time=this._next=null}function C4(t,e,r){var n=new ly;return n.restart(t,e,r),n}function cV(){cy(),++yp;for(var t=w4,e;t;)(e=Yf-t._time)>=0&&t._call.call(void 0,e),t=t._next;--yp}function sV(){Yf=(T4=oy.now())+E4,yp=ay=0;try{cV()}finally{yp=0,Abe(),Yf=0}}function _be(){var t=oy.now(),e=t-T4;e>oV&&(E4-=e,T4=t)}function Abe(){for(var t,e=w4,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:w4=r);sy=t,XS(n)}function XS(t){if(!yp){ay&&(ay=clearTimeout(ay));var e=t-Yf;e>24?(t<1/0&&(ay=setTimeout(sV,t-oy.now()-E4)),iy&&(iy=clearInterval(iy))):(iy||(T4=oy.now(),iy=setInterval(_be,oV)),yp=1,lV(sV))}}var yp,ay,iy,oV,w4,sy,T4,Yf,E4,oy,lV,jS=_(()=>{"use strict";yp=0,ay=0,iy=0,oV=1e3,T4=0,Yf=0,E4=0,oy=typeof performance=="object"&&performance.now?performance:Date,lV=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};s(cy,"now");s(Sbe,"clearNow");s(ly,"Timer");ly.prototype=C4.prototype={constructor:ly,restart:s(function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?cy():+r)+(e==null?0:+e),!this._next&&sy!==this&&(sy?sy._next=this:w4=this,sy=this),this._call=t,this._time=r,XS()},"restart"),stop:s(function(){this._call&&(this._call=null,this._time=1/0,XS())},"stop")};s(C4,"timer");s(cV,"timerFlush");s(sV,"wake");s(_be,"poke");s(Abe,"nap");s(XS,"sleep")});function uy(t,e,r){var n=new ly;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var uV=_(()=>{"use strict";jS();s(uy,"default")});var S4=_(()=>{"use strict";jS();uV()});function nu(t,e,r,n,i,a){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;Rbe(t,r,{name:e,index:n,group:i,on:Lbe,tween:Dbe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:dV})}function fy(t,e){var r=Si(t,e);if(r.state>dV)throw new Error("too late; already scheduled");return r}function ea(t,e){var r=Si(t,e);if(r.state>_4)throw new Error("too late; already running");return r}function Si(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Rbe(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=C4(a,0,r.time);function a(h){r.state=hV,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}s(a,"schedule");function o(h){var f,d,p,m;if(r.state!==hV)return u();for(f in n)if(m=n[f],m.name===r.name){if(m.state===_4)return uy(o);m.state===fV?(m.state=hy,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete n[f]):+f<e&&(m.state=hy,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete n[f])}if(uy(function(){r.state===_4&&(r.state=fV,r.timer.restart(l,r.delay,r.time),l(h))}),r.state=A4,r.on.call("start",t,t.__data__,r.index,r.group),r.state===A4){for(r.state=_4,i=new Array(p=r.tween.length),f=0,d=-1;f<p;++f)(m=r.tween[f].value.call(t,t.__data__,r.index,r.group))&&(i[++d]=m);i.length=d+1}}s(o,"start");function l(h){for(var f=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(u),r.state=L4,1),d=-1,p=i.length;++d<p;)i[d].call(t,f);r.state===L4&&(r.on.call("end",t,t.__data__,r.index,r.group),u())}s(l,"tick");function u(){r.state=hy,r.timer.stop(),delete n[e];for(var h in n)return;delete t.__transition}s(u,"stop")}var Lbe,Dbe,dV,hV,A4,_4,fV,L4,hy,us=_(()=>{"use strict";DC();S4();Lbe=LC("start","end","cancel","interrupt"),Dbe=[],dV=0,hV=1,A4=2,_4=3,fV=4,L4=5,hy=6;s(nu,"default");s(fy,"init");s(ea,"set");s(Si,"get");s(Rbe,"create")});function dy(t,e){var r=t.__transition,n,i,a=!0,o;if(r){e=e==null?null:e+"";for(o in r){if((n=r[o]).name!==e){a=!1;continue}i=n.state>A4&&n.state<L4,n.state=hy,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[o]}a&&delete t.__transition}}var pV=_(()=>{"use strict";us();s(dy,"default")});function KS(t){return this.each(function(){dy(this,t)})}var mV=_(()=>{"use strict";pV();s(KS,"default")});function Mbe(t,e){var r,n;return function(){var i=ea(this,t),a=i.tween;if(a!==r){n=r=a;for(var o=0,l=n.length;o<l;++o)if(n[o].name===e){n=n.slice(),n.splice(o,1);break}}i.tween=n}}function Ibe(t,e,r){var n,i;if(typeof r!="function")throw new Error;return function(){var a=ea(this,t),o=a.tween;if(o!==n){i=(n=o).slice();for(var l={name:e,value:r},u=0,h=i.length;u<h;++u)if(i[u].name===e){i[u]=l;break}u===h&&i.push(l)}a.tween=i}}function QS(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=Si(this.node(),r).tween,i=0,a=n.length,o;i<a;++i)if((o=n[i]).name===t)return o.value;return null}return this.each((e==null?Mbe:Ibe)(r,t,e))}function vp(t,e,r){var n=t._id;return t.each(function(){var i=ea(this,n);(i.value||(i.value={}))[e]=r.apply(this,arguments)}),function(i){return Si(i,n).value[e]}}var py=_(()=>{"use strict";us();s(Mbe,"tweenRemove");s(Ibe,"tweenFunction");s(QS,"default");s(vp,"tweenValue")});function my(t,e){var r;return(typeof e=="number"?$i:e instanceof el?Hf:(r=el(e))?(e=r,Hf):mp)(t,e)}var ZS=_(()=>{"use strict";dp();gp();s(my,"default")});function Nbe(t){return function(){this.removeAttribute(t)}}function Obe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pbe(t,e,r){var n,i=r+"",a;return function(){var o=this.getAttribute(t);return o===i?null:o===n?a:a=e(n=o,r)}}function Bbe(t,e,r){var n,i=r+"",a;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===n?a:a=e(n=o,r)}}function Fbe(t,e,r){var n,i,a;return function(){var o,l=r(this),u;return l==null?void this.removeAttribute(t):(o=this.getAttribute(t),u=l+"",o===u?null:o===n&&u===i?a:(i=u,a=e(n=o,l)))}}function zbe(t,e,r){var n,i,a;return function(){var o,l=r(this),u;return l==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),u=l+"",o===u?null:o===n&&u===i?a:(i=u,a=e(n=o,l)))}}function JS(t,e){var r=Hl(t),n=r==="transform"?HS:my;return this.attrTween(t,typeof e=="function"?(r.local?zbe:Fbe)(r,n,vp(this,"attr."+t,e)):e==null?(r.local?Obe:Nbe)(r):(r.local?Bbe:Pbe)(r,n,e))}var gV=_(()=>{"use strict";gp();Zo();py();ZS();s(Nbe,"attrRemove");s(Obe,"attrRemoveNS");s(Pbe,"attrConstant");s(Bbe,"attrConstantNS");s(Fbe,"attrFunction");s(zbe,"attrFunctionNS");s(JS,"default")});function $be(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function Gbe(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function Vbe(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&Gbe(t,a)),r}return s(i,"tween"),i._value=e,i}function Ube(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&$be(t,a)),r}return s(i,"tween"),i._value=e,i}function e8(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=Hl(t);return this.tween(r,(n.local?Vbe:Ube)(n,e))}var yV=_(()=>{"use strict";Zo();s($be,"attrInterpolate");s(Gbe,"attrInterpolateNS");s(Vbe,"attrTweenNS");s(Ube,"attrTween");s(e8,"default")});function qbe(t,e){return function(){fy(this,t).delay=+e.apply(this,arguments)}}function Wbe(t,e){return e=+e,function(){fy(this,t).delay=e}}function t8(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?qbe:Wbe)(e,t)):Si(this.node(),e).delay}var vV=_(()=>{"use strict";us();s(qbe,"delayFunction");s(Wbe,"delayConstant");s(t8,"default")});function Hbe(t,e){return function(){ea(this,t).duration=+e.apply(this,arguments)}}function Ybe(t,e){return e=+e,function(){ea(this,t).duration=e}}function r8(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Hbe:Ybe)(e,t)):Si(this.node(),e).duration}var xV=_(()=>{"use strict";us();s(Hbe,"durationFunction");s(Ybe,"durationConstant");s(r8,"default")});function Xbe(t,e){if(typeof e!="function")throw new Error;return function(){ea(this,t).ease=e}}function n8(t){var e=this._id;return arguments.length?this.each(Xbe(e,t)):Si(this.node(),e).ease}var bV=_(()=>{"use strict";us();s(Xbe,"easeConstant");s(n8,"default")});function jbe(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;ea(this,t).ease=r}}function i8(t){if(typeof t!="function")throw new Error;return this.each(jbe(this._id,t))}var kV=_(()=>{"use strict";us();s(jbe,"easeVarying");s(i8,"default")});function a8(t){typeof t!="function"&&(t=lp(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],o=a.length,l=n[i]=[],u,h=0;h<o;++h)(u=a[h])&&t.call(u,u.__data__,h,a)&&l.push(u);return new Va(n,this._parents,this._name,this._id)}var wV=_(()=>{"use strict";Zo();Xf();s(a8,"default")});function s8(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),o=new Array(n),l=0;l<a;++l)for(var u=e[l],h=r[l],f=u.length,d=o[l]=new Array(f),p,m=0;m<f;++m)(p=u[m]||h[m])&&(d[m]=p);for(;l<n;++l)o[l]=e[l];return new Va(o,this._parents,this._name,this._id)}var TV=_(()=>{"use strict";Xf();s(s8,"default")});function Kbe(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 Qbe(t,e,r){var n,i,a=Kbe(e)?fy:ea;return function(){var o=a(this,t),l=o.on;l!==n&&(i=(n=l).copy()).on(e,r),o.on=i}}function o8(t,e){var r=this._id;return arguments.length<2?Si(this.node(),r).on.on(t):this.each(Qbe(r,t,e))}var EV=_(()=>{"use strict";us();s(Kbe,"start");s(Qbe,"onFunction");s(o8,"default")});function Zbe(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function l8(){return this.on("end.remove",Zbe(this._id))}var CV=_(()=>{"use strict";s(Zbe,"removeFunction");s(l8,"default")});function c8(t){var e=this._name,r=this._id;typeof t!="function"&&(t=mh(t));for(var n=this._groups,i=n.length,a=new Array(i),o=0;o<i;++o)for(var l=n[o],u=l.length,h=a[o]=new Array(u),f,d,p=0;p<u;++p)(f=l[p])&&(d=t.call(f,f.__data__,p,l))&&("__data__"in f&&(d.__data__=f.__data__),h[p]=d,nu(h[p],e,r,p,h,Si(f,r)));return new Va(a,this._parents,e,r)}var SV=_(()=>{"use strict";Zo();Xf();us();s(c8,"default")});function u8(t){var e=this._name,r=this._id;typeof t!="function"&&(t=op(t));for(var n=this._groups,i=n.length,a=[],o=[],l=0;l<i;++l)for(var u=n[l],h=u.length,f,d=0;d<h;++d)if(f=u[d]){for(var p=t.call(f,f.__data__,d,u),m,g=Si(f,r),y=0,v=p.length;y<v;++y)(m=p[y])&&nu(m,e,r,y,p,g);a.push(p),o.push(f)}return new Va(a,o,e,r)}var _V=_(()=>{"use strict";Zo();Xf();us();s(u8,"default")});function h8(){return new Jbe(this._groups,this._parents)}var Jbe,AV=_(()=>{"use strict";Zo();Jbe=eu.prototype.constructor;s(h8,"default")});function e4e(t,e){var r,n,i;return function(){var a=gh(this,t),o=(this.style.removeProperty(t),gh(this,t));return a===o?null:a===r&&o===n?i:i=e(r=a,n=o)}}function LV(t){return function(){this.style.removeProperty(t)}}function t4e(t,e,r){var n,i=r+"",a;return function(){var o=gh(this,t);return o===i?null:o===n?a:a=e(n=o,r)}}function r4e(t,e,r){var n,i,a;return function(){var o=gh(this,t),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(t),gh(this,t))),o===u?null:o===n&&u===i?a:(i=u,a=e(n=o,l))}}function n4e(t,e){var r,n,i,a="style."+e,o="end."+a,l;return function(){var u=ea(this,t),h=u.on,f=u.value[a]==null?l||(l=LV(e)):void 0;(h!==r||i!==f)&&(n=(r=h).copy()).on(o,i=f),u.on=n}}function f8(t,e,r){var n=(t+="")=="transform"?WS:my;return e==null?this.styleTween(t,e4e(t,n)).on("end.style."+t,LV(t)):typeof e=="function"?this.styleTween(t,r4e(t,n,vp(this,"style."+t,e))).each(n4e(this._id,t)):this.styleTween(t,t4e(t,n,e),r).on("end.style."+t,null)}var DV=_(()=>{"use strict";gp();Zo();us();py();ZS();s(e4e,"styleNull");s(LV,"styleRemove");s(t4e,"styleConstant");s(r4e,"styleFunction");s(n4e,"styleMaybeRemove");s(f8,"default")});function i4e(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function a4e(t,e,r){var n,i;function a(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&i4e(t,o,r)),n}return s(a,"tween"),a._value=e,a}function d8(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,a4e(t,e,r??""))}var RV=_(()=>{"use strict";s(i4e,"styleInterpolate");s(a4e,"styleTween");s(d8,"default")});function s4e(t){return function(){this.textContent=t}}function o4e(t){return function(){var e=t(this);this.textContent=e??""}}function p8(t){return this.tween("text",typeof t=="function"?o4e(vp(this,"text",t)):s4e(t==null?"":t+""))}var MV=_(()=>{"use strict";py();s(s4e,"textConstant");s(o4e,"textFunction");s(p8,"default")});function l4e(t){return function(e){this.textContent=t.call(this,e)}}function c4e(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&l4e(i)),e}return s(n,"tween"),n._value=t,n}function m8(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,c4e(t))}var IV=_(()=>{"use strict";s(l4e,"textInterpolate");s(c4e,"textTween");s(m8,"default")});function g8(){for(var t=this._name,e=this._id,r=D4(),n=this._groups,i=n.length,a=0;a<i;++a)for(var o=n[a],l=o.length,u,h=0;h<l;++h)if(u=o[h]){var f=Si(u,e);nu(u,t,r,h,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Va(n,this._parents,t,r)}var NV=_(()=>{"use strict";Xf();us();s(g8,"default")});function y8(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,o){var l={value:o},u={value:s(function(){--i===0&&a()},"value")};r.each(function(){var h=ea(this,n),f=h.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),h.on=e}),i===0&&a()})}var OV=_(()=>{"use strict";us();s(y8,"default")});function Va(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function PV(t){return eu().transition(t)}function D4(){return++u4e}var u4e,iu,Xf=_(()=>{"use strict";Zo();gV();yV();vV();xV();bV();kV();wV();TV();EV();CV();SV();_V();AV();DV();RV();MV();IV();NV();py();OV();u4e=0;s(Va,"Transition");s(PV,"transition");s(D4,"newId");iu=eu.prototype;Va.prototype=PV.prototype={constructor:Va,select:c8,selectAll:u8,selectChild:iu.selectChild,selectChildren:iu.selectChildren,filter:a8,merge:s8,selection:h8,transition:g8,call:iu.call,nodes:iu.nodes,node:iu.node,size:iu.size,empty:iu.empty,each:iu.each,on:o8,attr:JS,attrTween:e8,style:f8,styleTween:d8,text:p8,textTween:m8,remove:l8,tween:QS,delay:t8,duration:r8,ease:n8,easeVarying:i8,end:y8,[Symbol.iterator]:iu[Symbol.iterator]}});function R4(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var BV=_(()=>{"use strict";s(R4,"cubicInOut")});var v8=_(()=>{"use strict";BV()});function f4e(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 x8(t){var e,r;t instanceof Va?(e=t._id,t=t._name):(e=D4(),(r=h4e).time=cy(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var o=n[a],l=o.length,u,h=0;h<l;++h)(u=o[h])&&nu(u,t,e,h,o,r||f4e(u,e));return new Va(n,this._parents,t,e)}var h4e,FV=_(()=>{"use strict";Xf();us();v8();S4();h4e={time:null,delay:0,duration:250,ease:R4};s(f4e,"inherit");s(x8,"default")});var zV=_(()=>{"use strict";Zo();mV();FV();eu.prototype.interrupt=KS;eu.prototype.transition=x8});var M4=_(()=>{"use strict";zV()});var $V=_(()=>{"use strict"});var GV=_(()=>{"use strict"});var VV=_(()=>{"use strict"});function UV(t){return[+t[0],+t[1]]}function d4e(t){return[UV(t[0]),UV(t[1])]}function b8(t){return{type:t}}var tft,rft,nft,ift,aft,sft,qV=_(()=>{"use strict";M4();$V();GV();VV();({abs:tft,max:rft,min:nft}=Math);s(UV,"number1");s(d4e,"number2");ift={name:"x",handles:["w","e"].map(b8),input:s(function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),output:s(function(t){return t&&[t[0][0],t[1][0]]},"output")},aft={name:"y",handles:["n","s"].map(b8),input:s(function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),output:s(function(t){return t&&[t[0][1],t[1][1]]},"output")},sft={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(b8),input:s(function(t){return t==null?null:d4e(t)},"input"),output:s(function(t){return t},"output")};s(b8,"type")});var WV=_(()=>{"use strict";qV()});function HV(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function m4e(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return HV;let r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}function YV(){return new Kf}var k8,w8,jf,p4e,Kf,XV=_(()=>{"use strict";k8=Math.PI,w8=2*k8,jf=1e-6,p4e=w8-jf;s(HV,"append");s(m4e,"appendRound");Kf=class{static{s(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?HV:m4e(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,o){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}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 o=this._x1,l=this._y1,u=n-e,h=i-r,f=o-e,d=l-r,p=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(p>jf)if(!(Math.abs(d*u-h*f)>jf)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let m=n-o,g=i-l,y=u*u+h*h,v=m*m+g*g,x=Math.sqrt(y),b=Math.sqrt(p),k=a*Math.tan((k8-Math.acos((y+p-v)/(2*x*b)))/2),A=k/b,w=k/x;Math.abs(A-1)>jf&&this._append`L${e+A*f},${r+A*d}`,this._append`A${a},${a},0,0,${+(d*m>f*g)},${this._x1=e+w*u},${this._y1=r+w*h}`}}arc(e,r,n,i,a,o){if(e=+e,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),h=e+l,f=r+u,d=1^o,p=o?i-a:a-i;this._x1===null?this._append`M${h},${f}`:(Math.abs(this._x1-h)>jf||Math.abs(this._y1-f)>jf)&&this._append`L${h},${f}`,n&&(p<0&&(p=p%w8+w8),p>p4e?this._append`A${n},${n},0,1,${d},${e-l},${r-u}A${n},${n},0,1,${d},${this._x1=h},${this._y1=f}`:p>jf&&this._append`A${n},${n},0,${+(p>=k8)},${d},${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._}};s(YV,"path");YV.prototype=Kf.prototype});var T8=_(()=>{"use strict";XV()});var jV=_(()=>{"use strict"});var KV=_(()=>{"use strict"});var QV=_(()=>{"use strict"});var ZV=_(()=>{"use strict"});var JV=_(()=>{"use strict"});var eU=_(()=>{"use strict"});var tU=_(()=>{"use strict"});function E8(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Qf(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 gy=_(()=>{"use strict";s(E8,"default");s(Qf,"formatDecimalParts")});function tl(t){return t=Qf(Math.abs(t)),t?t[1]:NaN}var yy=_(()=>{"use strict";gy();s(tl,"default")});function C8(t,e){return function(r,n){for(var i=r.length,a=[],o=0,l=t[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),a.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=t[o=(o+1)%t.length];return a.reverse().join(e)}}var rU=_(()=>{"use strict";s(C8,"default")});function S8(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var nU=_(()=>{"use strict";s(S8,"default")});function bh(t){if(!(e=g4e.exec(t)))throw new Error("invalid format: "+t);var e;return new I4({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 I4(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 g4e,_8=_(()=>{"use strict";g4e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;s(bh,"formatSpecifier");bh.prototype=I4.prototype;s(I4,"FormatSpecifier");I4.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 A8(t){e:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var iU=_(()=>{"use strict";s(A8,"default")});function D8(t,e){var r=Qf(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(L8=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Qf(t,Math.max(0,e+a-1))[0]}var L8,R8=_(()=>{"use strict";gy();s(D8,"default")});function N4(t,e){var r=Qf(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 aU=_(()=>{"use strict";gy();s(N4,"default")});var M8,sU=_(()=>{"use strict";gy();R8();aU();M8={"%":s((t,e)=>(t*100).toFixed(e),"%"),b:s(t=>Math.round(t).toString(2),"b"),c:s(t=>t+"","c"),d:E8,e:s((t,e)=>t.toExponential(e),"e"),f:s((t,e)=>t.toFixed(e),"f"),g:s((t,e)=>t.toPrecision(e),"g"),o:s(t=>Math.round(t).toString(8),"o"),p:s((t,e)=>N4(t*100,e),"p"),r:N4,s:D8,X:s(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:s(t=>Math.round(t).toString(16),"x")}});function O4(t){return t}var oU=_(()=>{"use strict";s(O4,"default")});function I8(t){var e=t.grouping===void 0||t.thousands===void 0?O4:C8(lU.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?O4:S8(lU.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function h(d){d=bh(d);var p=d.fill,m=d.align,g=d.sign,y=d.symbol,v=d.zero,x=d.width,b=d.comma,k=d.precision,A=d.trim,w=d.type;w==="n"?(b=!0,w="g"):M8[w]||(k===void 0&&(k=12),A=!0,w="g"),(v||p==="0"&&m==="=")&&(v=!0,p="0",m="=");var T=y==="$"?r:y==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",C=y==="$"?n:/[%p]/.test(w)?o:"",E=M8[w],S=/[defgprs%]/.test(w);k=k===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function R(D){var L=T,P=C,M,F,I;if(w==="c")P=E(D)+P,D="";else{D=+D;var O=D<0||1/D<0;if(D=isNaN(D)?u:E(Math.abs(D),k),A&&(D=A8(D)),O&&+D==0&&g!=="+"&&(O=!1),L=(O?g==="("?g:l:g==="-"||g==="("?"":g)+L,P=(w==="s"?cU[8+L8/3]:"")+P+(O&&g==="("?")":""),S){for(M=-1,F=D.length;++M<F;)if(I=D.charCodeAt(M),48>I||I>57){P=(I===46?i+D.slice(M+1):D.slice(M))+P,D=D.slice(0,M);break}}}b&&!v&&(D=e(D,1/0));var z=L.length+D.length+P.length,N=z<x?new Array(x-z+1).join(p):"";switch(b&&v&&(D=e(N+D,N.length?x-P.length:1/0),N=""),m){case"<":D=L+D+P+N;break;case"=":D=L+N+D+P;break;case"^":D=N.slice(0,z=N.length>>1)+L+D+P+N.slice(z);break;default:D=N+L+D+P;break}return a(D)}return s(R,"format"),R.toString=function(){return d+""},R}s(h,"newFormat");function f(d,p){var m=h((d=bh(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(tl(p)/3)))*3,y=Math.pow(10,-g),v=cU[8+g/3];return function(x){return m(y*x)+v}}return s(f,"formatPrefix"),{format:h,formatPrefix:f}}var lU,cU,uU=_(()=>{"use strict";yy();rU();nU();_8();iU();sU();R8();oU();lU=Array.prototype.map,cU=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];s(I8,"default")});function N8(t){return P4=I8(t),B4=P4.format,F4=P4.formatPrefix,P4}var P4,B4,F4,hU=_(()=>{"use strict";uU();N8({thousands:",",grouping:[3],currency:["$",""]});s(N8,"defaultLocale")});function z4(t){return Math.max(0,-tl(Math.abs(t)))}var fU=_(()=>{"use strict";yy();s(z4,"default")});function $4(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(tl(e)/3)))*3-tl(Math.abs(t)))}var dU=_(()=>{"use strict";yy();s($4,"default")});function G4(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,tl(e)-tl(t))+1}var pU=_(()=>{"use strict";yy();s(G4,"default")});var O8=_(()=>{"use strict";hU();_8();fU();dU();pU()});var mU=_(()=>{"use strict"});var gU=_(()=>{"use strict"});var yU=_(()=>{"use strict"});var vU=_(()=>{"use strict"});function kh(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var vy=_(()=>{"use strict";s(kh,"initRange")});function au(){var t=new ap,e=[],r=[],n=P8;function i(a){let o=t.get(a);if(o===void 0){if(n!==P8)return n;t.set(a,o=e.push(a)-1)}return r[o%r.length]}return s(i,"scale"),i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new ap;for(let o of a)t.has(o)||t.set(o,e.push(o)-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 au(e,r).unknown(n)},kh.apply(i,arguments),i}var P8,B8=_(()=>{"use strict";ph();vy();P8=Symbol("implicit");s(au,"ordinal")});function xp(){var t=au().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,o,l=!1,u=0,h=0,f=.5;delete t.unknown;function d(){var p=e().length,m=i<n,g=m?i:n,y=m?n:i;a=(y-g)/Math.max(1,p-u+h*2),l&&(a=Math.floor(a)),g+=(y-g-a*(p-u))*f,o=a*(1-u),l&&(g=Math.round(g),o=Math.round(o));var v=i4(p).map(function(x){return g+a*x});return r(m?v.reverse():v)}return s(d,"rescale"),t.domain=function(p){return arguments.length?(e(p),d()):e()},t.range=function(p){return arguments.length?([n,i]=p,n=+n,i=+i,d()):[n,i]},t.rangeRound=function(p){return[n,i]=p,n=+n,i=+i,l=!0,d()},t.bandwidth=function(){return o},t.step=function(){return a},t.round=function(p){return arguments.length?(l=!!p,d()):l},t.padding=function(p){return arguments.length?(u=Math.min(1,h=+p),d()):u},t.paddingInner=function(p){return arguments.length?(u=Math.min(1,p),d()):u},t.paddingOuter=function(p){return arguments.length?(h=+p,d()):h},t.align=function(p){return arguments.length?(f=Math.max(0,Math.min(1,p)),d()):f},t.copy=function(){return xp(e(),[n,i]).round(l).paddingInner(u).paddingOuter(h).align(f)},kh.apply(d(),arguments)}var xU=_(()=>{"use strict";ph();vy();B8();s(xp,"band")});function F8(t){return function(){return t}}var bU=_(()=>{"use strict";s(F8,"constants")});function z8(t){return+t}var kU=_(()=>{"use strict";s(z8,"number")});function bp(t){return t}function $8(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:F8(isNaN(e)?NaN:.5)}function y4e(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function v4e(t,e,r){var n=t[0],i=t[1],a=e[0],o=e[1];return i<n?(n=$8(i,n),a=r(o,a)):(n=$8(n,i),a=r(a,o)),function(l){return a(n(l))}}function x4e(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),o=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<n;)i[o]=$8(t[o],t[o+1]),a[o]=r(e[o],e[o+1]);return function(l){var u=TC(t,l,1,n)-1;return a[u](i[u](l))}}function V4(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function b4e(){var t=wU,e=wU,r=xh,n,i,a,o=bp,l,u,h;function f(){var p=Math.min(t.length,e.length);return o!==bp&&(o=y4e(t[0],t[p-1])),l=p>2?x4e:v4e,u=h=null,d}s(f,"rescale");function d(p){return p==null||isNaN(p=+p)?a:(u||(u=l(t.map(n),e,r)))(n(o(p)))}return s(d,"scale"),d.invert=function(p){return o(i((h||(h=l(e,t.map(n),$i)))(p)))},d.domain=function(p){return arguments.length?(t=Array.from(p,z8),f()):t.slice()},d.range=function(p){return arguments.length?(e=Array.from(p),f()):e.slice()},d.rangeRound=function(p){return e=Array.from(p),r=v4,f()},d.clamp=function(p){return arguments.length?(o=p?!0:bp,f()):o!==bp},d.interpolate=function(p){return arguments.length?(r=p,f()):r},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,m){return n=p,i=m,f()}}function xy(){return b4e()(bp,bp)}var wU,G8=_(()=>{"use strict";ph();gp();bU();kU();wU=[0,1];s(bp,"identity");s($8,"normalize");s(y4e,"clamper");s(v4e,"bimap");s(x4e,"polymap");s(V4,"copy");s(b4e,"transformer");s(xy,"continuous")});function V8(t,e,r,n){var i=sp(t,e,r),a;switch(n=bh(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=$4(i,o))&&(n.precision=a),F4(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=G4(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=z4(i))&&(n.precision=a-(n.type==="%")*2);break}}return B4(n)}var TU=_(()=>{"use strict";ph();O8();s(V8,"tickFormat")});function k4e(t){var e=t.domain;return t.ticks=function(r){var n=e();return t4(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return V8(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,o=n[i],l=n[a],u,h,f=10;for(l<o&&(h=o,o=l,l=h,h=i,i=a,a=h);f-- >0;){if(h=X1(o,l,r),h===u)return n[i]=o,n[a]=l,e(n);if(h>0)o=Math.floor(o/h)*h,l=Math.ceil(l/h)*h;else if(h<0)o=Math.ceil(o*h)/h,l=Math.floor(l*h)/h;else break;u=h}return t},t}function rl(){var t=xy();return t.copy=function(){return V4(t,rl())},kh.apply(t,arguments),k4e(t)}var EU=_(()=>{"use strict";ph();G8();vy();TU();s(k4e,"linearish");s(rl,"linear")});function U8(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),t[r]=e.floor(i),t[n]=e.ceil(a),t}var CU=_(()=>{"use strict";s(U8,"nice")});function sn(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return s(i,"interval"),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 o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(e(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{let u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return u;let h;do u.push(h=new Date(+a)),e(a,l),t(a);while(h<a&&a<o);return u},i.filter=a=>sn(o=>{if(o>=o)for(;t(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;e(o,-1),!a(o););else for(;--l>=0;)for(;e(o,1),!a(o););}),r&&(i.count=(a,o)=>(q8.setTime(+a),W8.setTime(+o),t(q8),t(W8),Math.floor(r(q8,W8))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}var q8,W8,su=_(()=>{"use strict";q8=new Date,W8=new Date;s(sn,"timeInterval")});var jl,SU,H8=_(()=>{"use strict";su();jl=sn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);jl.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?sn(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):jl);SU=jl.range});var Vs,_U,Y8=_(()=>{"use strict";su();Vs=sn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),_U=Vs.range});var ou,w4e,U4,T4e,X8=_(()=>{"use strict";su();ou=sn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),w4e=ou.range,U4=sn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),T4e=U4.range});var lu,E4e,q4,C4e,j8=_(()=>{"use strict";su();lu=sn(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()),E4e=lu.range,q4=sn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),C4e=q4.range});var vo,S4e,ky,_4e,W4,A4e,K8=_(()=>{"use strict";su();vo=sn(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),S4e=vo.range,ky=sn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),_4e=ky.range,W4=sn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),A4e=W4.range});function ed(t){return sn(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 td(t){return sn(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 nl,wh,H4,Y4,Ql,X4,j4,LU,L4e,D4e,R4e,M4e,I4e,N4e,rd,kp,DU,RU,Th,MU,IU,NU,O4e,P4e,B4e,F4e,z4e,$4e,Q8=_(()=>{"use strict";su();s(ed,"timeWeekday");nl=ed(0),wh=ed(1),H4=ed(2),Y4=ed(3),Ql=ed(4),X4=ed(5),j4=ed(6),LU=nl.range,L4e=wh.range,D4e=H4.range,R4e=Y4.range,M4e=Ql.range,I4e=X4.range,N4e=j4.range;s(td,"utcWeekday");rd=td(0),kp=td(1),DU=td(2),RU=td(3),Th=td(4),MU=td(5),IU=td(6),NU=rd.range,O4e=kp.range,P4e=DU.range,B4e=RU.range,F4e=Th.range,z4e=MU.range,$4e=IU.range});var cu,G4e,K4,V4e,Z8=_(()=>{"use strict";su();cu=sn(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()),G4e=cu.range,K4=sn(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()),V4e=K4.range});var Us,U4e,il,q4e,J8=_(()=>{"use strict";su();Us=sn(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());Us.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:sn(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)});U4e=Us.range,il=sn(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());il.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:sn(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)});q4e=il.range});function PU(t,e,r,n,i,a){let o=[[Vs,1,1e3],[Vs,5,5*1e3],[Vs,15,15*1e3],[Vs,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 l(h,f,d){let p=f<h;p&&([h,f]=[f,h]);let m=d&&typeof d.range=="function"?d:u(h,f,d),g=m?m.range(h,+f+1):[];return p?g.reverse():g}s(l,"ticks");function u(h,f,d){let p=Math.abs(f-h)/d,m=Uf(([,,v])=>v).right(o,p);if(m===o.length)return t.every(sp(h/31536e6,f/31536e6,d));if(m===0)return jl.every(Math.max(sp(h,f,d),1));let[g,y]=o[p/o[m-1][2]<o[m][2]/p?m-1:m];return g.every(y)}return s(u,"tickInterval"),[l,u]}var H4e,Y4e,e_,t_,BU=_(()=>{"use strict";ph();H8();Y8();X8();j8();K8();Q8();Z8();J8();s(PU,"ticker");[H4e,Y4e]=PU(il,K4,rd,W4,q4,U4),[e_,t_]=PU(Us,cu,nl,vo,lu,ou)});var Q4=_(()=>{"use strict";H8();Y8();X8();j8();K8();Q8();Z8();J8();BU()});function r_(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 n_(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 wy(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function i_(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,o=t.shortDays,l=t.months,u=t.shortMonths,h=Ty(i),f=Ey(i),d=Ty(a),p=Ey(a),m=Ty(o),g=Ey(o),y=Ty(l),v=Ey(l),x=Ty(u),b=Ey(u),k={a:O,A:z,b:N,B:U,c:null,d:UU,e:UU,f:g3e,g:S3e,G:A3e,H:d3e,I:p3e,j:m3e,L:XU,m:y3e,M:v3e,p:$,q:W,Q:HU,s:YU,S:x3e,u:b3e,U:k3e,V:w3e,w:T3e,W:E3e,x:null,X:null,y:C3e,Y:_3e,Z:L3e,"%":WU},A={a:ee,A:te,b:ce,B:Z,c:null,d:qU,e:qU,f:I3e,g:U3e,G:W3e,H:D3e,I:R3e,j:M3e,L:KU,m:N3e,M:O3e,p:fe,q:ne,Q:HU,s:YU,S:P3e,u:B3e,U:F3e,V:z3e,w:$3e,W:G3e,x:null,X:null,y:V3e,Y:q3e,Z:H3e,"%":WU},w={a:R,A:D,b:L,B:P,c:M,d:GU,e:GU,f:c3e,g:$U,G:zU,H:VU,I:VU,j:a3e,L:l3e,m:i3e,M:s3e,p:S,q:n3e,Q:h3e,s:f3e,S:o3e,u:Z4e,U:J4e,V:e3e,w:Q4e,W:t3e,x:F,X:I,y:$U,Y:zU,Z:r3e,"%":u3e};k.x=T(r,k),k.X=T(n,k),k.c=T(e,k),A.x=T(r,A),A.X=T(n,A),A.c=T(e,A);function T(H,Q){return function(K){var re=[],ie=-1,ye=0,j=H.length,De,oe,Re;for(K instanceof Date||(K=new Date(+K));++ie<j;)H.charCodeAt(ie)===37&&(re.push(H.slice(ye,ie)),(oe=FU[De=H.charAt(++ie)])!=null?De=H.charAt(++ie):oe=De==="e"?" ":"0",(Re=Q[De])&&(De=Re(K,oe)),re.push(De),ye=ie+1);return re.push(H.slice(ye,ie)),re.join("")}}s(T,"newFormat");function C(H,Q){return function(K){var re=wy(1900,void 0,1),ie=E(re,H,K+="",0),ye,j;if(ie!=K.length)return null;if("Q"in re)return new Date(re.Q);if("s"in re)return new Date(re.s*1e3+("L"in re?re.L:0));if(Q&&!("Z"in re)&&(re.Z=0),"p"in re&&(re.H=re.H%12+re.p*12),re.m===void 0&&(re.m="q"in re?re.q:0),"V"in re){if(re.V<1||re.V>53)return null;"w"in re||(re.w=1),"Z"in re?(ye=n_(wy(re.y,0,1)),j=ye.getUTCDay(),ye=j>4||j===0?kp.ceil(ye):kp(ye),ye=ky.offset(ye,(re.V-1)*7),re.y=ye.getUTCFullYear(),re.m=ye.getUTCMonth(),re.d=ye.getUTCDate()+(re.w+6)%7):(ye=r_(wy(re.y,0,1)),j=ye.getDay(),ye=j>4||j===0?wh.ceil(ye):wh(ye),ye=vo.offset(ye,(re.V-1)*7),re.y=ye.getFullYear(),re.m=ye.getMonth(),re.d=ye.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),j="Z"in re?n_(wy(re.y,0,1)).getUTCDay():r_(wy(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(j+5)%7:re.w+re.U*7-(j+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,n_(re)):r_(re)}}s(C,"newParse");function E(H,Q,K,re){for(var ie=0,ye=Q.length,j=K.length,De,oe;ie<ye;){if(re>=j)return-1;if(De=Q.charCodeAt(ie++),De===37){if(De=Q.charAt(ie++),oe=w[De in FU?Q.charAt(ie++):De],!oe||(re=oe(H,K,re))<0)return-1}else if(De!=K.charCodeAt(re++))return-1}return re}s(E,"parseSpecifier");function S(H,Q,K){var re=h.exec(Q.slice(K));return re?(H.p=f.get(re[0].toLowerCase()),K+re[0].length):-1}s(S,"parsePeriod");function R(H,Q,K){var re=m.exec(Q.slice(K));return re?(H.w=g.get(re[0].toLowerCase()),K+re[0].length):-1}s(R,"parseShortWeekday");function D(H,Q,K){var re=d.exec(Q.slice(K));return re?(H.w=p.get(re[0].toLowerCase()),K+re[0].length):-1}s(D,"parseWeekday");function L(H,Q,K){var re=x.exec(Q.slice(K));return re?(H.m=b.get(re[0].toLowerCase()),K+re[0].length):-1}s(L,"parseShortMonth");function P(H,Q,K){var re=y.exec(Q.slice(K));return re?(H.m=v.get(re[0].toLowerCase()),K+re[0].length):-1}s(P,"parseMonth");function M(H,Q,K){return E(H,e,Q,K)}s(M,"parseLocaleDateTime");function F(H,Q,K){return E(H,r,Q,K)}s(F,"parseLocaleDate");function I(H,Q,K){return E(H,n,Q,K)}s(I,"parseLocaleTime");function O(H){return o[H.getDay()]}s(O,"formatShortWeekday");function z(H){return a[H.getDay()]}s(z,"formatWeekday");function N(H){return u[H.getMonth()]}s(N,"formatShortMonth");function U(H){return l[H.getMonth()]}s(U,"formatMonth");function $(H){return i[+(H.getHours()>=12)]}s($,"formatPeriod");function W(H){return 1+~~(H.getMonth()/3)}s(W,"formatQuarter");function ee(H){return o[H.getUTCDay()]}s(ee,"formatUTCShortWeekday");function te(H){return a[H.getUTCDay()]}s(te,"formatUTCWeekday");function ce(H){return u[H.getUTCMonth()]}s(ce,"formatUTCShortMonth");function Z(H){return l[H.getUTCMonth()]}s(Z,"formatUTCMonth");function fe(H){return i[+(H.getUTCHours()>=12)]}s(fe,"formatUTCPeriod");function ne(H){return 1+~~(H.getUTCMonth()/3)}return s(ne,"formatUTCQuarter"),{format:s(function(H){var Q=T(H+="",k);return Q.toString=function(){return H},Q},"format"),parse:s(function(H){var Q=C(H+="",!1);return Q.toString=function(){return H},Q},"parse"),utcFormat:s(function(H){var Q=T(H+="",A);return Q.toString=function(){return H},Q},"utcFormat"),utcParse:s(function(H){var Q=C(H+="",!0);return Q.toString=function(){return H},Q},"utcParse")}}function Lr(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function K4e(t){return t.replace(j4e,"\\$&")}function Ty(t){return new RegExp("^(?:"+t.map(K4e).join("|")+")","i")}function Ey(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function Q4e(t,e,r){var n=Gi.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function Z4e(t,e,r){var n=Gi.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function J4e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function e3e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function t3e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function zU(t,e,r){var n=Gi.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function $U(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function r3e(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 n3e(t,e,r){var n=Gi.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function i3e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function GU(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function a3e(t,e,r){var n=Gi.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function VU(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function s3e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function o3e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function l3e(t,e,r){var n=Gi.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function c3e(t,e,r){var n=Gi.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function u3e(t,e,r){var n=X4e.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function h3e(t,e,r){var n=Gi.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function f3e(t,e,r){var n=Gi.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function UU(t,e){return Lr(t.getDate(),e,2)}function d3e(t,e){return Lr(t.getHours(),e,2)}function p3e(t,e){return Lr(t.getHours()%12||12,e,2)}function m3e(t,e){return Lr(1+vo.count(Us(t),t),e,3)}function XU(t,e){return Lr(t.getMilliseconds(),e,3)}function g3e(t,e){return XU(t,e)+"000"}function y3e(t,e){return Lr(t.getMonth()+1,e,2)}function v3e(t,e){return Lr(t.getMinutes(),e,2)}function x3e(t,e){return Lr(t.getSeconds(),e,2)}function b3e(t){var e=t.getDay();return e===0?7:e}function k3e(t,e){return Lr(nl.count(Us(t)-1,t),e,2)}function jU(t){var e=t.getDay();return e>=4||e===0?Ql(t):Ql.ceil(t)}function w3e(t,e){return t=jU(t),Lr(Ql.count(Us(t),t)+(Us(t).getDay()===4),e,2)}function T3e(t){return t.getDay()}function E3e(t,e){return Lr(wh.count(Us(t)-1,t),e,2)}function C3e(t,e){return Lr(t.getFullYear()%100,e,2)}function S3e(t,e){return t=jU(t),Lr(t.getFullYear()%100,e,2)}function _3e(t,e){return Lr(t.getFullYear()%1e4,e,4)}function A3e(t,e){var r=t.getDay();return t=r>=4||r===0?Ql(t):Ql.ceil(t),Lr(t.getFullYear()%1e4,e,4)}function L3e(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Lr(e/60|0,"0",2)+Lr(e%60,"0",2)}function qU(t,e){return Lr(t.getUTCDate(),e,2)}function D3e(t,e){return Lr(t.getUTCHours(),e,2)}function R3e(t,e){return Lr(t.getUTCHours()%12||12,e,2)}function M3e(t,e){return Lr(1+ky.count(il(t),t),e,3)}function KU(t,e){return Lr(t.getUTCMilliseconds(),e,3)}function I3e(t,e){return KU(t,e)+"000"}function N3e(t,e){return Lr(t.getUTCMonth()+1,e,2)}function O3e(t,e){return Lr(t.getUTCMinutes(),e,2)}function P3e(t,e){return Lr(t.getUTCSeconds(),e,2)}function B3e(t){var e=t.getUTCDay();return e===0?7:e}function F3e(t,e){return Lr(rd.count(il(t)-1,t),e,2)}function QU(t){var e=t.getUTCDay();return e>=4||e===0?Th(t):Th.ceil(t)}function z3e(t,e){return t=QU(t),Lr(Th.count(il(t),t)+(il(t).getUTCDay()===4),e,2)}function $3e(t){return t.getUTCDay()}function G3e(t,e){return Lr(kp.count(il(t)-1,t),e,2)}function V3e(t,e){return Lr(t.getUTCFullYear()%100,e,2)}function U3e(t,e){return t=QU(t),Lr(t.getUTCFullYear()%100,e,2)}function q3e(t,e){return Lr(t.getUTCFullYear()%1e4,e,4)}function W3e(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Th(t):Th.ceil(t),Lr(t.getUTCFullYear()%1e4,e,4)}function H3e(){return"+0000"}function WU(){return"%"}function HU(t){return+t}function YU(t){return Math.floor(+t/1e3)}var FU,Gi,X4e,j4e,ZU=_(()=>{"use strict";Q4();s(r_,"localDate");s(n_,"utcDate");s(wy,"newDate");s(i_,"formatLocale");FU={"-":"",_:" ",0:"0"},Gi=/^\s*\d+/,X4e=/^%/,j4e=/[\\^$*+?|[\]().{}]/g;s(Lr,"pad");s(K4e,"requote");s(Ty,"formatRe");s(Ey,"formatLookup");s(Q4e,"parseWeekdayNumberSunday");s(Z4e,"parseWeekdayNumberMonday");s(J4e,"parseWeekNumberSunday");s(e3e,"parseWeekNumberISO");s(t3e,"parseWeekNumberMonday");s(zU,"parseFullYear");s($U,"parseYear");s(r3e,"parseZone");s(n3e,"parseQuarter");s(i3e,"parseMonthNumber");s(GU,"parseDayOfMonth");s(a3e,"parseDayOfYear");s(VU,"parseHour24");s(s3e,"parseMinutes");s(o3e,"parseSeconds");s(l3e,"parseMilliseconds");s(c3e,"parseMicroseconds");s(u3e,"parseLiteralPercent");s(h3e,"parseUnixTimestamp");s(f3e,"parseUnixTimestampSeconds");s(UU,"formatDayOfMonth");s(d3e,"formatHour24");s(p3e,"formatHour12");s(m3e,"formatDayOfYear");s(XU,"formatMilliseconds");s(g3e,"formatMicroseconds");s(y3e,"formatMonthNumber");s(v3e,"formatMinutes");s(x3e,"formatSeconds");s(b3e,"formatWeekdayNumberMonday");s(k3e,"formatWeekNumberSunday");s(jU,"dISO");s(w3e,"formatWeekNumberISO");s(T3e,"formatWeekdayNumberSunday");s(E3e,"formatWeekNumberMonday");s(C3e,"formatYear");s(S3e,"formatYearISO");s(_3e,"formatFullYear");s(A3e,"formatFullYearISO");s(L3e,"formatZone");s(qU,"formatUTCDayOfMonth");s(D3e,"formatUTCHour24");s(R3e,"formatUTCHour12");s(M3e,"formatUTCDayOfYear");s(KU,"formatUTCMilliseconds");s(I3e,"formatUTCMicroseconds");s(N3e,"formatUTCMonthNumber");s(O3e,"formatUTCMinutes");s(P3e,"formatUTCSeconds");s(B3e,"formatUTCWeekdayNumberMonday");s(F3e,"formatUTCWeekNumberSunday");s(QU,"UTCdISO");s(z3e,"formatUTCWeekNumberISO");s($3e,"formatUTCWeekdayNumberSunday");s(G3e,"formatUTCWeekNumberMonday");s(V3e,"formatUTCYear");s(U3e,"formatUTCYearISO");s(q3e,"formatUTCFullYear");s(W3e,"formatUTCFullYearISO");s(H3e,"formatUTCZone");s(WU,"formatLiteralPercent");s(HU,"formatUnixTimestamp");s(YU,"formatUnixTimestampSeconds")});function a_(t){return wp=i_(t),nd=wp.format,JU=wp.parse,eq=wp.utcFormat,tq=wp.utcParse,wp}var wp,nd,JU,eq,tq,rq=_(()=>{"use strict";ZU();a_({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"]});s(a_,"defaultLocale")});var s_=_(()=>{"use strict";rq()});function Y3e(t){return new Date(t)}function X3e(t){return t instanceof Date?+t:+new Date(+t)}function nq(t,e,r,n,i,a,o,l,u,h){var f=xy(),d=f.invert,p=f.domain,m=h(".%L"),g=h(":%S"),y=h("%I:%M"),v=h("%I %p"),x=h("%a %d"),b=h("%b %d"),k=h("%B"),A=h("%Y");function w(T){return(u(T)<T?m:l(T)<T?g:o(T)<T?y:a(T)<T?v:n(T)<T?i(T)<T?x:b:r(T)<T?k:A)(T)}return s(w,"tickFormat"),f.invert=function(T){return new Date(d(T))},f.domain=function(T){return arguments.length?p(Array.from(T,X3e)):p().map(Y3e)},f.ticks=function(T){var C=p();return t(C[0],C[C.length-1],T??10)},f.tickFormat=function(T,C){return C==null?w:h(C)},f.nice=function(T){var C=p();return(!T||typeof T.range!="function")&&(T=e(C[0],C[C.length-1],T??10)),T?p(U8(C,T)):f},f.copy=function(){return V4(f,nq(t,e,r,n,i,a,o,l,u,h))},f}function Z4(){return kh.apply(nq(e_,t_,Us,cu,nl,vo,lu,ou,Vs,nd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var iq=_(()=>{"use strict";Q4();s_();G8();vy();CU();s(Y3e,"date");s(X3e,"number");s(nq,"calendar");s(Z4,"time")});var aq=_(()=>{"use strict";xU();EU();B8();iq()});function o_(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(n*6,++n*6);return r}var sq=_(()=>{"use strict";s(o_,"default")});var l_,oq=_(()=>{"use strict";sq();l_=o_("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var lq=_(()=>{"use strict";oq()});function Cn(t){return s(function(){return t},"constant")}var J4=_(()=>{"use strict";s(Cn,"default")});function uq(t){return t>1?0:t<-1?Tp:Math.acos(t)}function u_(t){return t>=1?Cy:t<=-1?-Cy:Math.asin(t)}var c_,ta,Eh,cq,e3,al,id,Vi,Tp,Cy,Ep,t3=_(()=>{"use strict";c_=Math.abs,ta=Math.atan2,Eh=Math.cos,cq=Math.max,e3=Math.min,al=Math.sin,id=Math.sqrt,Vi=1e-12,Tp=Math.PI,Cy=Tp/2,Ep=2*Tp;s(uq,"acos");s(u_,"asin")});function r3(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 Kf(e)}var h_=_(()=>{"use strict";T8();s(r3,"withPath")});function j3e(t){return t.innerRadius}function K3e(t){return t.outerRadius}function Q3e(t){return t.startAngle}function Z3e(t){return t.endAngle}function J3e(t){return t&&t.padAngle}function e5e(t,e,r,n,i,a,o,l){var u=r-t,h=n-e,f=o-i,d=l-a,p=d*u-f*h;if(!(p*p<Vi))return p=(f*(e-a)-d*(t-i))/p,[t+p*u,e+p*h]}function n3(t,e,r,n,i,a,o){var l=t-r,u=e-n,h=(o?a:-a)/id(l*l+u*u),f=h*u,d=-h*l,p=t+f,m=e+d,g=r+f,y=n+d,v=(p+g)/2,x=(m+y)/2,b=g-p,k=y-m,A=b*b+k*k,w=i-a,T=p*y-g*m,C=(k<0?-1:1)*id(cq(0,w*w*A-T*T)),E=(T*k-b*C)/A,S=(-T*b-k*C)/A,R=(T*k+b*C)/A,D=(-T*b+k*C)/A,L=E-v,P=S-x,M=R-v,F=D-x;return L*L+P*P>M*M+F*F&&(E=R,S=D),{cx:E,cy:S,x01:-f,y01:-d,x11:E*(i/w-1),y11:S*(i/w-1)}}function sl(){var t=j3e,e=K3e,r=Cn(0),n=null,i=Q3e,a=Z3e,o=J3e,l=null,u=r3(h);function h(){var f,d,p=+t.apply(this,arguments),m=+e.apply(this,arguments),g=i.apply(this,arguments)-Cy,y=a.apply(this,arguments)-Cy,v=c_(y-g),x=y>g;if(l||(l=f=u()),m<p&&(d=m,m=p,p=d),!(m>Vi))l.moveTo(0,0);else if(v>Ep-Vi)l.moveTo(m*Eh(g),m*al(g)),l.arc(0,0,m,g,y,!x),p>Vi&&(l.moveTo(p*Eh(y),p*al(y)),l.arc(0,0,p,y,g,x));else{var b=g,k=y,A=g,w=y,T=v,C=v,E=o.apply(this,arguments)/2,S=E>Vi&&(n?+n.apply(this,arguments):id(p*p+m*m)),R=e3(c_(m-p)/2,+r.apply(this,arguments)),D=R,L=R,P,M;if(S>Vi){var F=u_(S/p*al(E)),I=u_(S/m*al(E));(T-=F*2)>Vi?(F*=x?1:-1,A+=F,w-=F):(T=0,A=w=(g+y)/2),(C-=I*2)>Vi?(I*=x?1:-1,b+=I,k-=I):(C=0,b=k=(g+y)/2)}var O=m*Eh(b),z=m*al(b),N=p*Eh(w),U=p*al(w);if(R>Vi){var $=m*Eh(k),W=m*al(k),ee=p*Eh(A),te=p*al(A),ce;if(v<Tp)if(ce=e5e(O,z,ee,te,$,W,N,U)){var Z=O-ce[0],fe=z-ce[1],ne=$-ce[0],H=W-ce[1],Q=1/al(uq((Z*ne+fe*H)/(id(Z*Z+fe*fe)*id(ne*ne+H*H)))/2),K=id(ce[0]*ce[0]+ce[1]*ce[1]);D=e3(R,(p-K)/(Q-1)),L=e3(R,(m-K)/(Q+1))}else D=L=0}C>Vi?L>Vi?(P=n3(ee,te,O,z,m,L,x),M=n3($,W,N,U,m,L,x),l.moveTo(P.cx+P.x01,P.cy+P.y01),L<R?l.arc(P.cx,P.cy,L,ta(P.y01,P.x01),ta(M.y01,M.x01),!x):(l.arc(P.cx,P.cy,L,ta(P.y01,P.x01),ta(P.y11,P.x11),!x),l.arc(0,0,m,ta(P.cy+P.y11,P.cx+P.x11),ta(M.cy+M.y11,M.cx+M.x11),!x),l.arc(M.cx,M.cy,L,ta(M.y11,M.x11),ta(M.y01,M.x01),!x))):(l.moveTo(O,z),l.arc(0,0,m,b,k,!x)):l.moveTo(O,z),!(p>Vi)||!(T>Vi)?l.lineTo(N,U):D>Vi?(P=n3(N,U,$,W,p,-D,x),M=n3(O,z,ee,te,p,-D,x),l.lineTo(P.cx+P.x01,P.cy+P.y01),D<R?l.arc(P.cx,P.cy,D,ta(P.y01,P.x01),ta(M.y01,M.x01),!x):(l.arc(P.cx,P.cy,D,ta(P.y01,P.x01),ta(P.y11,P.x11),!x),l.arc(0,0,p,ta(P.cy+P.y11,P.cx+P.x11),ta(M.cy+M.y11,M.cx+M.x11),x),l.arc(M.cx,M.cy,D,ta(M.y11,M.x11),ta(M.y01,M.x01),!x))):l.arc(0,0,p,w,A,x)}if(l.closePath(),f)return l=null,f+""||null}return s(h,"arc"),h.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Tp/2;return[Eh(d)*f,al(d)*f]},h.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Cn(+f),h):t},h.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:Cn(+f),h):e},h.cornerRadius=function(f){return arguments.length?(r=typeof f=="function"?f:Cn(+f),h):r},h.padRadius=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Cn(+f),h):n},h.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:Cn(+f),h):i},h.endAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Cn(+f),h):a},h.padAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Cn(+f),h):o},h.context=function(f){return arguments.length?(l=f??null,h):l},h}var hq=_(()=>{"use strict";J4();t3();h_();s(j3e,"arcInnerRadius");s(K3e,"arcOuterRadius");s(Q3e,"arcStartAngle");s(Z3e,"arcEndAngle");s(J3e,"arcPadAngle");s(e5e,"intersect");s(n3,"cornerTangents");s(sl,"default")});function Sy(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var Opt,f_=_(()=>{"use strict";Opt=Array.prototype.slice;s(Sy,"default")});function fq(t){this._context=t}function uu(t){return new fq(t)}var d_=_(()=>{"use strict";s(fq,"Linear");fq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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}},"point")};s(uu,"default")});function dq(t){return t[0]}function pq(t){return t[1]}var mq=_(()=>{"use strict";s(dq,"x");s(pq,"y")});function ra(t,e){var r=Cn(!0),n=null,i=uu,a=null,o=r3(l);t=typeof t=="function"?t:t===void 0?dq:Cn(t),e=typeof e=="function"?e:e===void 0?pq:Cn(e);function l(u){var h,f=(u=Sy(u)).length,d,p=!1,m;for(n==null&&(a=i(m=o())),h=0;h<=f;++h)!(h<f&&r(d=u[h],h,u))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+t(d,h,u),+e(d,h,u));if(m)return a=null,m+""||null}return s(l,"line"),l.x=function(u){return arguments.length?(t=typeof u=="function"?u:Cn(+u),l):t},l.y=function(u){return arguments.length?(e=typeof u=="function"?u:Cn(+u),l):e},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Cn(!!u),l):r},l.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),l):i},l.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),l):n},l}var gq=_(()=>{"use strict";f_();J4();d_();h_();mq();s(ra,"default")});function p_(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}var yq=_(()=>{"use strict";s(p_,"default")});function m_(t){return t}var vq=_(()=>{"use strict";s(m_,"default")});function i3(){var t=m_,e=p_,r=null,n=Cn(0),i=Cn(Ep),a=Cn(0);function o(l){var u,h=(l=Sy(l)).length,f,d,p=0,m=new Array(h),g=new Array(h),y=+n.apply(this,arguments),v=Math.min(Ep,Math.max(-Ep,i.apply(this,arguments)-y)),x,b=Math.min(Math.abs(v)/h,a.apply(this,arguments)),k=b*(v<0?-1:1),A;for(u=0;u<h;++u)(A=g[m[u]=u]=+t(l[u],u,l))>0&&(p+=A);for(e!=null?m.sort(function(w,T){return e(g[w],g[T])}):r!=null&&m.sort(function(w,T){return r(l[w],l[T])}),u=0,d=p?(v-h*k)/p:0;u<h;++u,y=x)f=m[u],A=g[f],x=y+(A>0?A*d:0)+k,g[f]={data:l[f],index:u,value:A,startAngle:y,endAngle:x,padAngle:b};return g}return s(o,"pie"),o.value=function(l){return arguments.length?(t=typeof l=="function"?l:Cn(+l),o):t},o.sortValues=function(l){return arguments.length?(e=l,r=null,o):e},o.sort=function(l){return arguments.length?(r=l,e=null,o):r},o.startAngle=function(l){return arguments.length?(n=typeof l=="function"?l:Cn(+l),o):n},o.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Cn(+l),o):i},o.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Cn(+l),o):a},o}var xq=_(()=>{"use strict";f_();J4();yq();vq();t3();s(i3,"default")});function g_(t){return new a3(t,!0)}function y_(t){return new a3(t,!1)}var a3,bq=_(()=>{"use strict";a3=class{static{s(this,"Bump")}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}};s(g_,"bumpX");s(y_,"bumpY")});function qs(){}var _y=_(()=>{"use strict";s(qs,"default")});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 Ay(t){this._context=t}function hs(t){return new Ay(t)}var Ly=_(()=>{"use strict";s(Cp,"point");s(Ay,"Basis");Ay.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(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},"lineEnd"),point:s(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},"point")};s(hs,"default")});function kq(t){this._context=t}function s3(t){return new kq(t)}var wq=_(()=>{"use strict";_y();Ly();s(kq,"BasisClosed");kq.prototype={areaStart:qs,areaEnd:qs,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:s(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}}},"lineEnd"),point:s(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},"point")};s(s3,"default")});function Tq(t){this._context=t}function o3(t){return new Tq(t)}var Eq=_(()=>{"use strict";Ly();s(Tq,"BasisOpen");Tq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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},"point")};s(o3,"default")});function Cq(t,e){this._basis=new Ay(t),this._beta=e}var v_,Sq=_(()=>{"use strict";Ly();s(Cq,"Bundle");Cq.prototype={lineStart:s(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:s(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,o=e[r]-i,l=-1,u;++l<=r;)u=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+u*a),this._beta*e[l]+(1-this._beta)*(i+u*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:s(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};v_=s(function t(e){function r(n){return e===1?new Ay(n):new Cq(n,e)}return s(r,"bundle"),r.beta=function(n){return t(+n)},r},"custom")(.85)});function Sp(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 l3(t,e){this._context=t,this._k=(1-e)/6}var x_,Dy=_(()=>{"use strict";s(Sp,"point");s(l3,"Cardinal");l3.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Sp(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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:Sp(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},"point")};x_=s(function t(e){function r(n){return new l3(n,e)}return s(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0)});function c3(t,e){this._context=t,this._k=(1-e)/6}var b_,k_=_(()=>{"use strict";_y();Dy();s(c3,"CardinalClosed");c3.prototype={areaStart:qs,areaEnd:qs,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:s(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}}},"lineEnd"),point:s(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:Sp(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},"point")};b_=s(function t(e){function r(n){return new c3(n,e)}return s(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0)});function u3(t,e){this._context=t,this._k=(1-e)/6}var w_,T_=_(()=>{"use strict";Dy();s(u3,"CardinalOpen");u3.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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:Sp(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},"point")};w_=s(function t(e){function r(n){return new u3(n,e)}return s(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0)});function Ry(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Vi){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Vi){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/f,o=(o*h+t._y1*t._l23_2a-r*t._l12_2a)/f}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function _q(t,e){this._context=t,this._alpha=e}var E_,h3=_(()=>{"use strict";t3();Dy();s(Ry,"point");s(_q,"CatmullRom");_q.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(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},"lineEnd"),point:s(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:Ry(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},"point")};E_=s(function t(e){function r(n){return e?new _q(n,e):new l3(n,0)}return s(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5)});function Aq(t,e){this._context=t,this._alpha=e}var C_,Lq=_(()=>{"use strict";k_();_y();h3();s(Aq,"CatmullRomClosed");Aq.prototype={areaStart:qs,areaEnd:qs,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(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}}},"lineEnd"),point:s(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:Ry(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},"point")};C_=s(function t(e){function r(n){return e?new Aq(n,e):new c3(n,0)}return s(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5)});function Dq(t,e){this._context=t,this._alpha=e}var S_,Rq=_(()=>{"use strict";T_();h3();s(Dq,"CatmullRomOpen");Dq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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:Ry(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},"point")};S_=s(function t(e){function r(n){return e?new Dq(n,e):new u3(n,0)}return s(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5)});function Mq(t){this._context=t}function f3(t){return new Mq(t)}var Iq=_(()=>{"use strict";_y();s(Mq,"LinearClosed");Mq.prototype={areaStart:qs,areaEnd:qs,lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){this._point&&this._context.closePath()},"lineEnd"),point:s(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")};s(f3,"default")});function Nq(t){return t<0?-1:1}function Oq(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),l=(a*i+o*n)/(n+i);return(Nq(a)+Nq(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function Pq(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function __(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,l=(a-n)/3;t._context.bezierCurveTo(n+l,i+l*e,a-l,o-l*r,a,o)}function d3(t){this._context=t}function Bq(t){this._context=new Fq(t)}function Fq(t){this._context=t}function A_(t){return new d3(t)}function L_(t){return new Bq(t)}var zq=_(()=>{"use strict";s(Nq,"sign");s(Oq,"slope3");s(Pq,"slope2");s(__,"point");s(d3,"MonotoneX");d3.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:__(this,this._t0,Pq(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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,__(this,Pq(this,r=Oq(this,t,e)),r);break;default:__(this,this._t0,r=Oq(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")};s(Bq,"MonotoneY");(Bq.prototype=Object.create(d3.prototype)).point=function(t,e){d3.prototype.point.call(this,e,t)};s(Fq,"ReflectContext");Fq.prototype={moveTo:s(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:s(function(){this._context.closePath()},"closePath"),lineTo:s(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:s(function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)},"bezierCurveTo")};s(A_,"monotoneX");s(L_,"monotoneY")});function Gq(t){this._context=t}function $q(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function p3(t){return new Gq(t)}var Vq=_(()=>{"use strict";s(Gq,"Natural");Gq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:s(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=$q(t),i=$q(e),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[o],e[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:s(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};s($q,"controlPoints");s(p3,"default")});function m3(t,e){this._context=t,this._t=e}function g3(t){return new m3(t,.5)}function D_(t){return new m3(t,0)}function R_(t){return new m3(t,1)}var Uq=_(()=>{"use strict";s(m3,"Step");m3.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:s(function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:s(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},"point")};s(g3,"default");s(D_,"stepBefore");s(R_,"stepAfter")});var qq=_(()=>{"use strict";hq();gq();xq();wq();Eq();Ly();bq();Sq();k_();T_();Dy();Lq();Rq();h3();Iq();d_();zq();Vq();Uq()});var Wq=_(()=>{"use strict"});var Hq=_(()=>{"use strict"});function Ch(t,e,r){this.k=t,this.x=e,this.y=r}function I_(t){for(;!t.__zoom;)if(!(t=t.parentNode))return M_;return t.__zoom}var M_,N_=_(()=>{"use strict";s(Ch,"Transform");Ch.prototype={constructor:Ch,scale:s(function(t){return t===1?this:new Ch(this.k*t,this.x,this.y)},"scale"),translate:s(function(t,e){return t===0&e===0?this:new Ch(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:s(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:s(function(t){return t*this.k+this.x},"applyX"),applyY:s(function(t){return t*this.k+this.y},"applyY"),invert:s(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:s(function(t){return(t-this.x)/this.k},"invertX"),invertY:s(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:s(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:s(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:s(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")};M_=new Ch(1,0,0);I_.prototype=Ch.prototype;s(I_,"transform")});var Yq=_(()=>{"use strict"});var Xq=_(()=>{"use strict";M4();Wq();Hq();N_();Yq()});var jq=_(()=>{"use strict";Xq();N_()});var Xt=_(()=>{"use strict";ph();S$();WV();jV();dp();KV();QV();DC();yG();ZV();v8();JV();tU();O8();mU();gU();gp();T8();yU();eU();vU();aq();lq();Zo();qq();Q4();s_();S4();M4();jq()});var Kq=is(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.BLANK_URL=Ui.relativeFirstCharacters=Ui.whitespaceEscapeCharsRegex=Ui.urlSchemeRegex=Ui.ctrlCharactersRegex=Ui.htmlCtrlEntityRegex=Ui.htmlEntitiesRegex=Ui.invalidProtocolRegex=void 0;Ui.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Ui.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Ui.htmlCtrlEntityRegex=/&(newline|tab);/gi;Ui.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Ui.urlSchemeRegex=/^.+(:|&colon;)/gim;Ui.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Ui.relativeFirstCharacters=[".","/"];Ui.BLANK_URL="about:blank"});var _p=is(y3=>{"use strict";Object.defineProperty(y3,"__esModule",{value:!0});y3.sanitizeUrl=void 0;var Ta=Kq();function t5e(t){return Ta.relativeFirstCharacters.indexOf(t[0])>-1}s(t5e,"isRelativeUrlWithoutProtocol");function r5e(t){var e=t.replace(Ta.ctrlCharactersRegex,"");return e.replace(Ta.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}s(r5e,"decodeHtmlCharacters");function n5e(t){return URL.canParse(t)}s(n5e,"isValidUrl");function Qq(t){try{return decodeURIComponent(t)}catch{return t}}s(Qq,"decodeURI");function i5e(t){if(!t)return Ta.BLANK_URL;var e,r=Qq(t.trim());do r=r5e(r).replace(Ta.htmlCtrlEntityRegex,"").replace(Ta.ctrlCharactersRegex,"").replace(Ta.whitespaceEscapeCharsRegex,"").trim(),r=Qq(r),e=r.match(Ta.ctrlCharactersRegex)||r.match(Ta.htmlEntitiesRegex)||r.match(Ta.htmlCtrlEntityRegex)||r.match(Ta.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return Ta.BLANK_URL;if(t5e(n))return n;var i=n.trimStart(),a=i.match(Ta.urlSchemeRegex);if(!a)return n;var o=a[0].toLowerCase().trim();if(Ta.invalidProtocolRegex.test(o))return Ta.BLANK_URL;var l=i.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return l;if(o==="http:"||o==="https:"){if(!n5e(l))return Ta.BLANK_URL;var u=new URL(l);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return l}s(i5e,"sanitizeUrl");y3.sanitizeUrl=i5e});var O_,ad,v3,Zq,Jq,eW,ol,My,Iy=_(()=>{"use strict";O_=ka(_p(),1);Qt();ad=s((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"),v3=s((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"};ad(t,r).lower()},"drawBackgroundRect"),Zq=s((t,e)=>{let r=e.text.replace(zf," "),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"),Jq=s((t,e,r,n)=>{let i=t.append("image");i.attr("x",e),i.attr("y",r);let a=(0,O_.sanitizeUrl)(n);i.attr("xlink:href",a)},"drawImage"),eW=s((t,e,r,n)=>{let i=t.append("use");i.attr("x",e),i.attr("y",r);let a=(0,O_.sanitizeUrl)(n);i.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),ol=s(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),My=s(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")});var tW,P_,rW,a5e,s5e,o5e,l5e,c5e,u5e,h5e,f5e,d5e,p5e,m5e,g5e,hu,ll,nW=_(()=>{"use strict";Qt();Iy();tW=ka(_p(),1),P_=s(function(t,e){return ad(t,e)},"drawRect"),rW=s(function(t,e,r,n,i,a){let o=t.append("image");o.attr("width",e),o.attr("height",r),o.attr("x",n),o.attr("y",i);let l=a.startsWith("data:image/png;base64")?a:(0,tW.sanitizeUrl)(a);o.attr("xlink:href",l)},"drawImage"),a5e=s((t,e,r)=>{let n=t.append("g"),i=0;for(let a of e){let o=a.textColor?a.textColor:"#444444",l=a.lineColor?a.lineColor:"#444444",u=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,f="";if(i===0){let p=n.append("line");p.attr("x1",a.startPoint.x),p.attr("y1",a.startPoint.y),p.attr("x2",a.endPoint.x),p.attr("y2",a.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",l),p.style("fill","none"),a.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)"),i=-1}else{let p=n.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)")}let d=r.messageFont();hu(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:o},d),a.techn&&a.techn.text!==""&&(d=r.messageFont(),hu(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:o,"font-style":"italic"},d))}},"drawRels"),s5e=s(function(t,e,r){let n=t.append("g"),i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",o=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let u={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};P_(n,u);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=o,hu(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},h),e.type&&e.type.text!==""&&(h=r.boundaryFont(),h.fontColor=o,hu(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},h)),e.descr&&e.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=o,hu(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h))},"drawBoundary"),o5e=s(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",o="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":o="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":o="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 l=t.append("g");l.attr("class","person-man");let u=ol();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":u.x=e.x,u.y=e.y,u.fill=n,u.width=e.width,u.height=e.height,u.stroke=i,u.rx=2.5,u.ry=2.5,u.attrs={"stroke-width":.5},P_(l,u);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.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)),l.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":l.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)),l.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 h=g5e(r,e.typeC4Shape.text);switch(l.append("text").attr("fill",a).attr("font-family",h.fontFamily).attr("font-size",h.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":rW(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,o);break}let f=r[e.typeC4Shape.text+"Font"]();return f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=a,hu(r)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},f),f=r[e.typeC4Shape.text+"Font"](),f.fontColor=a,e.techn&&e.techn?.text!==""?hu(r)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},f):e.type&&e.type.text!==""&&hu(r)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},f),e.descr&&e.descr.text!==""&&(f=r.personFont(),f.fontColor=a,hu(r)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},f)),e.height},"drawC4Shape"),l5e=s(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"),c5e=s(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"),u5e=s(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"),h5e=s(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"),f5e=s(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"),d5e=s(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"),p5e=s(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"),m5e=s(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"),g5e=s((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),hu=function(){function t(i,a,o,l,u,h,f){let d=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(i);n(d,f)}s(t,"byText");function e(i,a,o,l,u,h,f,d){let{fontSize:p,fontFamily:m,fontWeight:g}=d,y=i.split($e.lineBreakRegex);for(let v=0;v<y.length;v++){let x=v*p-p*(y.length-1)/2,b=a.append("text").attr("x",o+u/2).attr("y",l).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",p).style("font-weight",g).style("font-family",m);b.append("tspan").attr("dy",x).text(y[v]).attr("alignment-baseline","mathematical"),n(b,f)}}s(e,"byTspan");function r(i,a,o,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",o).attr("y",l).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,o,l,u,h,f,d),n(g,f)}s(r,"byFo");function n(i,a){for(let o in a)a.hasOwnProperty(o)&&i.attr(o,a[o])}return s(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),ll={drawRect:P_,drawBoundary:s5e,drawC4Shape:o5e,drawRels:a5e,drawImage:rW,insertArrowHead:h5e,insertArrowEnd:f5e,insertArrowFilledHead:d5e,insertDynamicNumber:p5e,insertArrowCrossHead:m5e,insertDatabaseIcon:l5e,insertComputerIcon:c5e,insertClockIcon:u5e}});var y5e,b3,B_=_(()=>{"use strict";y5e=typeof global=="object"&&global&&global.Object===Object&&global,b3=y5e});var v5e,x5e,Wn,xo=_(()=>{"use strict";B_();v5e=typeof self=="object"&&self&&self.Object===Object&&self,x5e=b3||v5e||Function("return this")(),Wn=x5e});var b5e,qi,sd=_(()=>{"use strict";xo();b5e=Wn.Symbol,qi=b5e});function T5e(t){var e=k5e.call(t,Ny),r=t[Ny];try{t[Ny]=void 0;var n=!0}catch{}var i=w5e.call(t);return n&&(e?t[Ny]=r:delete t[Ny]),i}var iW,k5e,w5e,Ny,aW,sW=_(()=>{"use strict";sd();iW=Object.prototype,k5e=iW.hasOwnProperty,w5e=iW.toString,Ny=qi?qi.toStringTag:void 0;s(T5e,"getRawTag");aW=T5e});function S5e(t){return C5e.call(t)}var E5e,C5e,oW,lW=_(()=>{"use strict";E5e=Object.prototype,C5e=E5e.toString;s(S5e,"objectToString");oW=S5e});function L5e(t){return t==null?t===void 0?A5e:_5e:cW&&cW in Object(t)?aW(t):oW(t)}var _5e,A5e,cW,na,fu=_(()=>{"use strict";sd();sW();lW();_5e="[object Null]",A5e="[object Undefined]",cW=qi?qi.toStringTag:void 0;s(L5e,"baseGetTag");na=L5e});function D5e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var on,Ws=_(()=>{"use strict";s(D5e,"isObject");on=D5e});function O5e(t){if(!on(t))return!1;var e=na(t);return e==M5e||e==I5e||e==R5e||e==N5e}var R5e,M5e,I5e,N5e,fi,Oy=_(()=>{"use strict";fu();Ws();R5e="[object AsyncFunction]",M5e="[object Function]",I5e="[object GeneratorFunction]",N5e="[object Proxy]";s(O5e,"isFunction");fi=O5e});var P5e,k3,uW=_(()=>{"use strict";xo();P5e=Wn["__core-js_shared__"],k3=P5e});function B5e(t){return!!hW&&hW in t}var hW,fW,dW=_(()=>{"use strict";uW();hW=function(){var t=/[^.]+$/.exec(k3&&k3.keys&&k3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();s(B5e,"isMasked");fW=B5e});function $5e(t){if(t!=null){try{return z5e.call(t)}catch{}try{return t+""}catch{}}return""}var F5e,z5e,du,F_=_(()=>{"use strict";F5e=Function.prototype,z5e=F5e.toString;s($5e,"toSource");du=$5e});function X5e(t){if(!on(t)||fW(t))return!1;var e=fi(t)?Y5e:V5e;return e.test(du(t))}var G5e,V5e,U5e,q5e,W5e,H5e,Y5e,pW,mW=_(()=>{"use strict";Oy();dW();Ws();F_();G5e=/[\\^$.*+?()[\]{}|]/g,V5e=/^\[object .+?Constructor\]$/,U5e=Function.prototype,q5e=Object.prototype,W5e=U5e.toString,H5e=q5e.hasOwnProperty,Y5e=RegExp("^"+W5e.call(H5e).replace(G5e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");s(X5e,"baseIsNative");pW=X5e});function j5e(t,e){return t?.[e]}var gW,yW=_(()=>{"use strict";s(j5e,"getValue");gW=j5e});function K5e(t,e){var r=gW(t,e);return pW(r)?r:void 0}var fs,Sh=_(()=>{"use strict";mW();yW();s(K5e,"getNative");fs=K5e});var Q5e,pu,Py=_(()=>{"use strict";Sh();Q5e=fs(Object,"create"),pu=Q5e});function Z5e(){this.__data__=pu?pu(null):{},this.size=0}var vW,xW=_(()=>{"use strict";Py();s(Z5e,"hashClear");vW=Z5e});function J5e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var bW,kW=_(()=>{"use strict";s(J5e,"hashDelete");bW=J5e});function nke(t){var e=this.__data__;if(pu){var r=e[t];return r===eke?void 0:r}return rke.call(e,t)?e[t]:void 0}var eke,tke,rke,wW,TW=_(()=>{"use strict";Py();eke="__lodash_hash_undefined__",tke=Object.prototype,rke=tke.hasOwnProperty;s(nke,"hashGet");wW=nke});function ske(t){var e=this.__data__;return pu?e[t]!==void 0:ake.call(e,t)}var ike,ake,EW,CW=_(()=>{"use strict";Py();ike=Object.prototype,ake=ike.hasOwnProperty;s(ske,"hashHas");EW=ske});function lke(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=pu&&e===void 0?oke:e,this}var oke,SW,_W=_(()=>{"use strict";Py();oke="__lodash_hash_undefined__";s(lke,"hashSet");SW=lke});function Ap(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var z_,AW=_(()=>{"use strict";xW();kW();TW();CW();_W();s(Ap,"Hash");Ap.prototype.clear=vW;Ap.prototype.delete=bW;Ap.prototype.get=wW;Ap.prototype.has=EW;Ap.prototype.set=SW;z_=Ap});function cke(){this.__data__=[],this.size=0}var LW,DW=_(()=>{"use strict";s(cke,"listCacheClear");LW=cke});function uke(t,e){return t===e||t!==t&&e!==e}var bo,od=_(()=>{"use strict";s(uke,"eq");bo=uke});function hke(t,e){for(var r=t.length;r--;)if(bo(t[r][0],e))return r;return-1}var _h,By=_(()=>{"use strict";od();s(hke,"assocIndexOf");_h=hke});function pke(t){var e=this.__data__,r=_h(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():dke.call(e,r,1),--this.size,!0}var fke,dke,RW,MW=_(()=>{"use strict";By();fke=Array.prototype,dke=fke.splice;s(pke,"listCacheDelete");RW=pke});function mke(t){var e=this.__data__,r=_h(e,t);return r<0?void 0:e[r][1]}var IW,NW=_(()=>{"use strict";By();s(mke,"listCacheGet");IW=mke});function gke(t){return _h(this.__data__,t)>-1}var OW,PW=_(()=>{"use strict";By();s(gke,"listCacheHas");OW=gke});function yke(t,e){var r=this.__data__,n=_h(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var BW,FW=_(()=>{"use strict";By();s(yke,"listCacheSet");BW=yke});function Lp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var Ah,Fy=_(()=>{"use strict";DW();MW();NW();PW();FW();s(Lp,"ListCache");Lp.prototype.clear=LW;Lp.prototype.delete=RW;Lp.prototype.get=IW;Lp.prototype.has=OW;Lp.prototype.set=BW;Ah=Lp});var vke,Lh,w3=_(()=>{"use strict";Sh();xo();vke=fs(Wn,"Map"),Lh=vke});function xke(){this.size=0,this.__data__={hash:new z_,map:new(Lh||Ah),string:new z_}}var zW,$W=_(()=>{"use strict";AW();Fy();w3();s(xke,"mapCacheClear");zW=xke});function bke(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var GW,VW=_(()=>{"use strict";s(bke,"isKeyable");GW=bke});function kke(t,e){var r=t.__data__;return GW(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Dh,zy=_(()=>{"use strict";VW();s(kke,"getMapData");Dh=kke});function wke(t){var e=Dh(this,t).delete(t);return this.size-=e?1:0,e}var UW,qW=_(()=>{"use strict";zy();s(wke,"mapCacheDelete");UW=wke});function Tke(t){return Dh(this,t).get(t)}var WW,HW=_(()=>{"use strict";zy();s(Tke,"mapCacheGet");WW=Tke});function Eke(t){return Dh(this,t).has(t)}var YW,XW=_(()=>{"use strict";zy();s(Eke,"mapCacheHas");YW=Eke});function Cke(t,e){var r=Dh(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var jW,KW=_(()=>{"use strict";zy();s(Cke,"mapCacheSet");jW=Cke});function Dp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var ld,T3=_(()=>{"use strict";$W();qW();HW();XW();KW();s(Dp,"MapCache");Dp.prototype.clear=zW;Dp.prototype.delete=UW;Dp.prototype.get=WW;Dp.prototype.has=YW;Dp.prototype.set=jW;ld=Dp});function $_(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ske);var r=s(function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o},"memoized");return r.cache=new($_.Cache||ld),r}var Ske,Rp,G_=_(()=>{"use strict";T3();Ske="Expected a function";s($_,"memoize");$_.Cache=ld;Rp=$_});function _ke(){this.__data__=new Ah,this.size=0}var QW,ZW=_(()=>{"use strict";Fy();s(_ke,"stackClear");QW=_ke});function Ake(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var JW,eH=_(()=>{"use strict";s(Ake,"stackDelete");JW=Ake});function Lke(t){return this.__data__.get(t)}var tH,rH=_(()=>{"use strict";s(Lke,"stackGet");tH=Lke});function Dke(t){return this.__data__.has(t)}var nH,iH=_(()=>{"use strict";s(Dke,"stackHas");nH=Dke});function Mke(t,e){var r=this.__data__;if(r instanceof Ah){var n=r.__data__;if(!Lh||n.length<Rke-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ld(n)}return r.set(t,e),this.size=r.size,this}var Rke,aH,sH=_(()=>{"use strict";Fy();w3();T3();Rke=200;s(Mke,"stackSet");aH=Mke});function Mp(t){var e=this.__data__=new Ah(t);this.size=e.size}var Zl,$y=_(()=>{"use strict";Fy();ZW();eH();rH();iH();sH();s(Mp,"Stack");Mp.prototype.clear=QW;Mp.prototype.delete=JW;Mp.prototype.get=tH;Mp.prototype.has=nH;Mp.prototype.set=aH;Zl=Mp});var Ike,Ip,V_=_(()=>{"use strict";Sh();Ike=function(){try{var t=fs(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Ip=Ike});function Nke(t,e,r){e=="__proto__"&&Ip?Ip(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Jl,Np=_(()=>{"use strict";V_();s(Nke,"baseAssignValue");Jl=Nke});function Oke(t,e,r){(r!==void 0&&!bo(t[e],r)||r===void 0&&!(e in t))&&Jl(t,e,r)}var Gy,U_=_(()=>{"use strict";Np();od();s(Oke,"assignMergeValue");Gy=Oke});function Pke(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),l=o.length;l--;){var u=o[t?l:++i];if(r(a[u],u,a)===!1)break}return e}}var oH,lH=_(()=>{"use strict";s(Pke,"createBaseFor");oH=Pke});var Bke,Op,E3=_(()=>{"use strict";lH();Bke=oH(),Op=Bke});function zke(t,e){if(e)return t.slice();var r=t.length,n=hH?hH(r):new t.constructor(r);return t.copy(n),n}var fH,cH,Fke,uH,hH,C3,q_=_(()=>{"use strict";xo();fH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cH=fH&&typeof module=="object"&&module&&!module.nodeType&&module,Fke=cH&&cH.exports===fH,uH=Fke?Wn.Buffer:void 0,hH=uH?uH.allocUnsafe:void 0;s(zke,"cloneBuffer");C3=zke});var $ke,Pp,W_=_(()=>{"use strict";xo();$ke=Wn.Uint8Array,Pp=$ke});function Gke(t){var e=new t.constructor(t.byteLength);return new Pp(e).set(new Pp(t)),e}var Bp,S3=_(()=>{"use strict";W_();s(Gke,"cloneArrayBuffer");Bp=Gke});function Vke(t,e){var r=e?Bp(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var _3,H_=_(()=>{"use strict";S3();s(Vke,"cloneTypedArray");_3=Vke});function Uke(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var A3,Y_=_(()=>{"use strict";s(Uke,"copyArray");A3=Uke});var dH,qke,pH,mH=_(()=>{"use strict";Ws();dH=Object.create,qke=function(){function t(){}return s(t,"object"),function(e){if(!on(e))return{};if(dH)return dH(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),pH=qke});function Wke(t,e){return function(r){return t(e(r))}}var L3,X_=_(()=>{"use strict";s(Wke,"overArg");L3=Wke});var Hke,Fp,D3=_(()=>{"use strict";X_();Hke=L3(Object.getPrototypeOf,Object),Fp=Hke});function Xke(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Yke;return t===r}var Yke,ec,zp=_(()=>{"use strict";Yke=Object.prototype;s(Xke,"isPrototype");ec=Xke});function jke(t){return typeof t.constructor=="function"&&!ec(t)?pH(Fp(t)):{}}var R3,j_=_(()=>{"use strict";mH();D3();zp();s(jke,"initCloneObject");R3=jke});function Kke(t){return t!=null&&typeof t=="object"}var Fn,ko=_(()=>{"use strict";s(Kke,"isObjectLike");Fn=Kke});function Zke(t){return Fn(t)&&na(t)==Qke}var Qke,K_,gH=_(()=>{"use strict";fu();ko();Qke="[object Arguments]";s(Zke,"baseIsArguments");K_=Zke});var yH,Jke,e6e,t6e,cl,$p=_(()=>{"use strict";gH();ko();yH=Object.prototype,Jke=yH.hasOwnProperty,e6e=yH.propertyIsEnumerable,t6e=K_(function(){return arguments}())?K_:function(t){return Fn(t)&&Jke.call(t,"callee")&&!e6e.call(t,"callee")},cl=t6e});var r6e,ct,Dn=_(()=>{"use strict";r6e=Array.isArray,ct=r6e});function i6e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=n6e}var n6e,Gp,M3=_(()=>{"use strict";n6e=9007199254740991;s(i6e,"isLength");Gp=i6e});function a6e(t){return t!=null&&Gp(t.length)&&!fi(t)}var Hn,wo=_(()=>{"use strict";Oy();M3();s(a6e,"isArrayLike");Hn=a6e});function s6e(t){return Fn(t)&&Hn(t)}var cd,I3=_(()=>{"use strict";wo();ko();s(s6e,"isArrayLikeObject");cd=s6e});function o6e(){return!1}var vH,xH=_(()=>{"use strict";s(o6e,"stubFalse");vH=o6e});var wH,bH,l6e,kH,c6e,u6e,ul,Vp=_(()=>{"use strict";xo();xH();wH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bH=wH&&typeof module=="object"&&module&&!module.nodeType&&module,l6e=bH&&bH.exports===wH,kH=l6e?Wn.Buffer:void 0,c6e=kH?kH.isBuffer:void 0,u6e=c6e||vH,ul=u6e});function g6e(t){if(!Fn(t)||na(t)!=h6e)return!1;var e=Fp(t);if(e===null)return!0;var r=p6e.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&TH.call(r)==m6e}var h6e,f6e,d6e,TH,p6e,m6e,EH,CH=_(()=>{"use strict";fu();D3();ko();h6e="[object Object]",f6e=Function.prototype,d6e=Object.prototype,TH=f6e.toString,p6e=d6e.hasOwnProperty,m6e=TH.call(Object);s(g6e,"isPlainObject");EH=g6e});function G6e(t){return Fn(t)&&Gp(t.length)&&!!Sn[na(t)]}var y6e,v6e,x6e,b6e,k6e,w6e,T6e,E6e,C6e,S6e,_6e,A6e,L6e,D6e,R6e,M6e,I6e,N6e,O6e,P6e,B6e,F6e,z6e,$6e,Sn,SH,_H=_(()=>{"use strict";fu();M3();ko();y6e="[object Arguments]",v6e="[object Array]",x6e="[object Boolean]",b6e="[object Date]",k6e="[object Error]",w6e="[object Function]",T6e="[object Map]",E6e="[object Number]",C6e="[object Object]",S6e="[object RegExp]",_6e="[object Set]",A6e="[object String]",L6e="[object WeakMap]",D6e="[object ArrayBuffer]",R6e="[object DataView]",M6e="[object Float32Array]",I6e="[object Float64Array]",N6e="[object Int8Array]",O6e="[object Int16Array]",P6e="[object Int32Array]",B6e="[object Uint8Array]",F6e="[object Uint8ClampedArray]",z6e="[object Uint16Array]",$6e="[object Uint32Array]",Sn={};Sn[M6e]=Sn[I6e]=Sn[N6e]=Sn[O6e]=Sn[P6e]=Sn[B6e]=Sn[F6e]=Sn[z6e]=Sn[$6e]=!0;Sn[y6e]=Sn[v6e]=Sn[D6e]=Sn[x6e]=Sn[R6e]=Sn[b6e]=Sn[k6e]=Sn[w6e]=Sn[T6e]=Sn[E6e]=Sn[C6e]=Sn[S6e]=Sn[_6e]=Sn[A6e]=Sn[L6e]=!1;s(G6e,"baseIsTypedArray");SH=G6e});function V6e(t){return function(e){return t(e)}}var To,ud=_(()=>{"use strict";s(V6e,"baseUnary");To=V6e});var AH,Vy,U6e,Q_,q6e,Eo,Uy=_(()=>{"use strict";B_();AH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vy=AH&&typeof module=="object"&&module&&!module.nodeType&&module,U6e=Vy&&Vy.exports===AH,Q_=U6e&&b3.process,q6e=function(){try{var t=Vy&&Vy.require&&Vy.require("util").types;return t||Q_&&Q_.binding&&Q_.binding("util")}catch{}}(),Eo=q6e});var LH,W6e,Rh,qy=_(()=>{"use strict";_H();ud();Uy();LH=Eo&&Eo.isTypedArray,W6e=LH?To(LH):SH,Rh=W6e});function H6e(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Wy,Z_=_(()=>{"use strict";s(H6e,"safeGet");Wy=H6e});function j6e(t,e,r){var n=t[e];(!(X6e.call(t,e)&&bo(n,r))||r===void 0&&!(e in t))&&Jl(t,e,r)}var Y6e,X6e,tc,Up=_(()=>{"use strict";Np();od();Y6e=Object.prototype,X6e=Y6e.hasOwnProperty;s(j6e,"assignValue");tc=j6e});function K6e(t,e,r,n){var i=!r;r||(r={});for(var a=-1,o=e.length;++a<o;){var l=e[a],u=n?n(r[l],t[l],l,r,t):void 0;u===void 0&&(u=t[l]),i?Jl(r,l,u):tc(r,l,u)}return r}var Co,hd=_(()=>{"use strict";Up();Np();s(K6e,"copyObject");Co=K6e});function Q6e(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var DH,RH=_(()=>{"use strict";s(Q6e,"baseTimes");DH=Q6e});function ewe(t,e){var r=typeof t;return e=e??Z6e,!!e&&(r=="number"||r!="symbol"&&J6e.test(t))&&t>-1&&t%1==0&&t<e}var Z6e,J6e,Mh,Hy=_(()=>{"use strict";Z6e=9007199254740991,J6e=/^(?:0|[1-9]\d*)$/;s(ewe,"isIndex");Mh=ewe});function nwe(t,e){var r=ct(t),n=!r&&cl(t),i=!r&&!n&&ul(t),a=!r&&!n&&!i&&Rh(t),o=r||n||i||a,l=o?DH(t.length,String):[],u=l.length;for(var h in t)(e||rwe.call(t,h))&&!(o&&(h=="length"||i&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Mh(h,u)))&&l.push(h);return l}var twe,rwe,N3,J_=_(()=>{"use strict";RH();$p();Dn();Vp();Hy();qy();twe=Object.prototype,rwe=twe.hasOwnProperty;s(nwe,"arrayLikeKeys");N3=nwe});function iwe(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var MH,IH=_(()=>{"use strict";s(iwe,"nativeKeysIn");MH=iwe});function owe(t){if(!on(t))return MH(t);var e=ec(t),r=[];for(var n in t)n=="constructor"&&(e||!swe.call(t,n))||r.push(n);return r}var awe,swe,NH,OH=_(()=>{"use strict";Ws();zp();IH();awe=Object.prototype,swe=awe.hasOwnProperty;s(owe,"baseKeysIn");NH=owe});function lwe(t){return Hn(t)?N3(t,!0):NH(t)}var ds,Ih=_(()=>{"use strict";J_();OH();wo();s(lwe,"keysIn");ds=lwe});function cwe(t){return Co(t,ds(t))}var PH,BH=_(()=>{"use strict";hd();Ih();s(cwe,"toPlainObject");PH=cwe});function uwe(t,e,r,n,i,a,o){var l=Wy(t,r),u=Wy(e,r),h=o.get(u);if(h){Gy(t,r,h);return}var f=a?a(l,u,r+"",t,e,o):void 0,d=f===void 0;if(d){var p=ct(u),m=!p&&ul(u),g=!p&&!m&&Rh(u);f=u,p||m||g?ct(l)?f=l:cd(l)?f=A3(l):m?(d=!1,f=C3(u,!0)):g?(d=!1,f=_3(u,!0)):f=[]:EH(u)||cl(u)?(f=l,cl(l)?f=PH(l):(!on(l)||fi(l))&&(f=R3(u))):d=!1}d&&(o.set(u,f),i(f,u,n,a,o),o.delete(u)),Gy(t,r,f)}var FH,zH=_(()=>{"use strict";U_();q_();H_();Y_();j_();$p();Dn();I3();Vp();Oy();Ws();CH();qy();Z_();BH();s(uwe,"baseMergeDeep");FH=uwe});function $H(t,e,r,n,i){t!==e&&Op(e,function(a,o){if(i||(i=new Zl),on(a))FH(t,e,o,r,$H,n,i);else{var l=n?n(Wy(t,o),a,o+"",t,e,i):void 0;l===void 0&&(l=a),Gy(t,o,l)}},ds)}var GH,VH=_(()=>{"use strict";$y();U_();E3();zH();Ws();Ih();Z_();s($H,"baseMerge");GH=$H});function hwe(t){return t}var Wi,mu=_(()=>{"use strict";s(hwe,"identity");Wi=hwe});function fwe(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 UH,qH=_(()=>{"use strict";s(fwe,"apply");UH=fwe});function dwe(t,e,r){return e=WH(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=WH(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=n[i];return l[e]=r(o),UH(t,this,l)}}var WH,O3,eA=_(()=>{"use strict";qH();WH=Math.max;s(dwe,"overRest");O3=dwe});function pwe(t){return function(){return t}}var ps,tA=_(()=>{"use strict";s(pwe,"constant");ps=pwe});var mwe,HH,YH=_(()=>{"use strict";tA();V_();mu();mwe=Ip?function(t,e){return Ip(t,"toString",{configurable:!0,enumerable:!1,value:ps(e),writable:!0})}:Wi,HH=mwe});function xwe(t){var e=0,r=0;return function(){var n=vwe(),i=ywe-(n-r);if(r=n,i>0){if(++e>=gwe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var gwe,ywe,vwe,XH,jH=_(()=>{"use strict";gwe=800,ywe=16,vwe=Date.now;s(xwe,"shortOut");XH=xwe});var bwe,P3,rA=_(()=>{"use strict";YH();jH();bwe=XH(HH),P3=bwe});function kwe(t,e){return P3(O3(t,e,Wi),t+"")}var rc,qp=_(()=>{"use strict";mu();eA();rA();s(kwe,"baseRest");rc=kwe});function wwe(t,e,r){if(!on(r))return!1;var n=typeof e;return(n=="number"?Hn(r)&&Mh(e,r.length):n=="string"&&e in r)?bo(r[e],t):!1}var Hs,fd=_(()=>{"use strict";od();wo();Hy();Ws();s(wwe,"isIterateeCall");Hs=wwe});function Twe(t){return rc(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,o&&Hs(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var l=r[n];l&&t(e,l,n,a)}return e})}var B3,nA=_(()=>{"use strict";qp();fd();s(Twe,"createAssigner");B3=Twe});var Ewe,Nh,iA=_(()=>{"use strict";VH();nA();Ewe=B3(function(t,e,r){GH(t,e,r)}),Nh=Ewe});function Wp(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Cwe[r]??e}function Lwe(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,ZH.sanitizeUrl)(r):r}function tY(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Rwe(t){let e,r=0;t.forEach(i=>{r+=tY(i,e),e=i});let n=r/2;return oA(t,n)}function Mwe(t){return t.length===1?t[0]:Rwe(t)}function Nwe(t,e,r){let n=structuredClone(r);V.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();let i=25+t,a=oA(n,i),o=10+t*.5,l=Math.atan2(n[0].y-a.y,n[0].x-a.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(l+Math.PI)*o+(n[0].x+a.x)/2,u.y=-Math.cos(l+Math.PI)*o+(n[0].y+a.y)/2):e==="end_right"?(u.x=Math.sin(l-Math.PI)*o+(n[0].x+a.x)/2-5,u.y=-Math.cos(l-Math.PI)*o+(n[0].y+a.y)/2-5):e==="end_left"?(u.x=Math.sin(l)*o+(n[0].x+a.x)/2-5,u.y=-Math.cos(l)*o+(n[0].y+a.y)/2-5):(u.x=Math.sin(l)*o+(n[0].x+a.x)/2,u.y=-Math.cos(l)*o+(n[0].y+a.y)/2),u}function Hp(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 Owe(t){let e="",r="0123456789abcdef",n=r.length;for(let i=0;i<t;i++)e+=r.charAt(Math.floor(Math.random()*n));return e}function z3(t,e){return hA(t,e).height}function hl(t,e){return hA(t,e).width}function fA(t){return"str"in t}function ms(t,e){return Nh({},t,e)}var ZH,sA,Cwe,Swe,_we,JH,eY,Awe,Dwe,KH,oA,Iwe,QH,lA,cA,Pwe,Bwe,uA,Fwe,hA,aA,F3,zwe,$we,nc,dt,rY,Ys,$3,pr=_(()=>{"use strict";ZH=ka(_p(),1);Xt();Qt();fE();it();Mf();Y0();G_();iA();hb();sA="\u200B",Cwe={curveBasis:hs,curveBasisClosed:s3,curveBasisOpen:o3,curveBumpX:g_,curveBumpY:y_,curveBundle:v_,curveCardinalClosed:b_,curveCardinalOpen:w_,curveCardinal:x_,curveCatmullRomClosed:C_,curveCatmullRomOpen:S_,curveCatmullRom:E_,curveLinear:uu,curveLinearClosed:f3,curveMonotoneX:A_,curveMonotoneY:L_,curveNatural:p3,curveStep:g3,curveStepAfter:R_,curveStepBefore:D_},Swe=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_we=s(function(t,e){let r=JH(t,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let o=r.map(l=>l.args);K0(o),n=An(n,[...o])}else n=r.args;if(!n)return;let i=H0(t,e),a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),JH=s(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${Swe.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),V.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n,i=[];for(;(n=Df.exec(t))!==null;)if(n.index===Df.lastIndex&&Df.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){let a=n[1]?n[1]:n[2],o=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:o})}return i.length===0?{type:t,args:null}:i.length===1?i[0]:i}catch(r){return V.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),eY=s(function(t){return t.replace(Df,"")},"removeDirectives"),Awe=s(function(t,e){for(let[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");s(Wp,"interpolateToCurve");s(Lwe,"formatUrl");Dwe=s((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let o=0;o<n;o++)if(a=a[r[o]],!a){V.error(`Function name: ${t} not found in window`);return}a[i](...e)},"runFunc");s(tY,"distance");s(Rwe,"traverseEdge");s(Mwe,"calcLabelPosition");KH=s((t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),oA=s((t,e)=>{let r,n=e;for(let i of t){if(r){let a=tY(i,r);if(a<n)n-=a;else{let o=n/a;if(o<=0)return r;if(o>=1)return{x:i.x,y:i.y};if(o>0&&o<1)return{x:KH((1-o)*r.x+o*i.x,5),y:KH((1-o)*r.y+o*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Iwe=s((t,e,r)=>{V.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=oA(e,25),a=t?10:5,o=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(o)*a+(e[0].x+i.x)/2,l.y=-Math.cos(o)*a+(e[0].y+i.y)/2,l},"calcCardinalityPosition");s(Nwe,"calcTerminalLabelPosition");s(Hp,"getStylesFromArray");QH=0,lA=s(()=>(QH++,"id-"+Math.random().toString(36).substr(2,12)+"-"+QH),"generateId");s(Owe,"makeRandomHex");cA=s(t=>Owe(t.length),"random"),Pwe=s(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"),Bwe=s(function(t,e){let r=e.text.replace($e.lineBreakRegex," "),[,n]=nc(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"),uA=Rp((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),$e.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((o,l)=>{let u=hl(`${o} `,r),h=hl(a,r);if(u>e){let{hyphenatedStrings:p,remainingWord:m}=Fwe(o,e,"-",r);i.push(a,...p),a=m}else h+u>=e?(i.push(a),a=o):a=[a,o].filter(Boolean).join(" ");l+1===n.length&&i.push(a)}),i.filter(o=>o!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Fwe=Rp((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],o="";return i.forEach((l,u)=>{let h=`${o}${l}`;if(hl(h,n)>=e){let d=u+1,p=i.length===d,m=`${h}${r}`;a.push(p?h:m),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);s(z3,"calculateTextHeight");s(hl,"calculateTextWidth");hA=Rp((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=nc(r),o=["sans-serif",n],l=t.split($e.lineBreakRegex),u=[],h=Me("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let f=h.append("svg");for(let p of o){let m=0,g={width:0,height:0,lineHeight:0};for(let y of l){let v=Pwe();v.text=y||sA;let x=Bwe(f,v).style("font-size",a).style("font-weight",i).style("font-family",p),b=(x._groups||x)[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)),m=Math.round(b.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}u.push(g)}f.remove();let d=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),aA=class{constructor(e=!1,r){this.count=0;this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{s(this,"InitIDGenerator")}},zwe=s(function(t){return F3=F3||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),F3.innerHTML=t,unescape(F3.textContent)},"entityDecode");s(fA,"isDetailedError");$we=s((t,e,r,n)=>{if(!n)return;let i=t.node()?.getBBox();i&&t.append("text").text(n).attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),nc=s(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");s(ms,"cleanAndMerge");dt={assignWithDepth:An,wrapLabel:uA,calculateTextHeight:z3,calculateTextWidth:hl,calculateTextDimensions:hA,cleanAndMerge:ms,detectInit:_we,detectDirective:JH,isSubstringInArray:Awe,interpolateToCurve:Wp,calcLabelPosition:Mwe,calcCardinalityPosition:Iwe,calcTerminalLabelPosition:Nwe,formatUrl:Lwe,getStylesFromArray:Hp,generateId:lA,random:cA,runFunc:Dwe,entityDecode:zwe,insertTitle:$we,parseFontSize:nc,InitIDGenerator:aA},rY=s(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"),Ys=s(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),$3=s((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId")});function fl(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=uA(e[t].text,i,n),e[t].textLines=e[t].text.split($e.lineBreakRegex).length,e[t].width=i,e[t].height=z3(e[t].text,n);else{let a=e[t].text.split($e.lineBreakRegex);e[t].textLines=a.length;let o=0;e[t].height=0,e[t].width=0;for(let l of a)e[t].width=Math.max(hl(l,n),e[t].width),o=z3(l,n),e[t].height=e[t].height+o}}function oY(t,e,r,n,i){let a=new q3(i);a.data.widthLimit=r.data.widthLimit/Math.min(dA,n.length);for(let[o,l]of n.entries()){let u=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=u,u=l.image.Y+l.image.height);let h=l.wrap&&kt.wrap,f=G3(kt);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",fl("label",l,h,f,a.data.widthLimit),l.label.Y=u+8,u=l.label.Y+l.label.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let g=G3(kt);fl("type",l,h,g,a.data.widthLimit),l.type.Y=u+5,u=l.type.Y+l.type.height}if(l.descr&&l.descr.text!==""){let g=G3(kt);g.fontSize=g.fontSize-2,fl("descr",l,h,g,a.data.widthLimit),l.descr.Y=u+20,u=l.descr.Y+l.descr.height}if(o==0||o%dA===0){let g=r.data.startx+kt.diagramMarginX,y=r.data.stopy+kt.diagramMarginY+u;a.setData(g,g,y,y)}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+kt.diagramMarginX:a.data.startx,y=a.data.starty;a.setData(g,g,y,y)}a.name=l.alias;let d=i.db.getC4ShapeArray(l.alias),p=i.db.getC4ShapeKeys(l.alias);p.length>0&&sY(a,t,d,p),e=l.alias;let m=i.db.getBoundarys(e);m.length>0&&oY(t,e,a,m,i),l.alias!=="global"&&aY(t,l,a),r.data.stopy=Math.max(a.data.stopy+kt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+kt.c4ShapeMargin,r.data.stopx),V3=Math.max(V3,r.data.stopx),U3=Math.max(U3,r.data.stopy)}}var V3,U3,iY,dA,kt,q3,pA,Yy,G3,Gwe,aY,sY,gs,nY,Vwe,Uwe,qwe,mA,lY=_(()=>{"use strict";Xt();nW();it();Z7();Qt();vC();gt();Y0();pr();Un();V3=0,U3=0,iY=4,dA=2;C1.yy=Y1;kt={},q3=class{static{s(this,"Bounds")}constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,pA(e.db.getConfig())}setData(e,r,n,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(e,r,n,i){e[r]===void 0?e[r]=n:e[r]=i(n,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=r+e.width,i=this.nextData.starty+e.margin*2,a=i+e.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>iY)&&(r=this.nextData.startx+e.margin+kt.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=i+e.height,this.nextData.cnt=1),e.x=r,e.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},pA(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},pA=s(function(t){An(kt,t),t.fontFamily&&(kt.personFontFamily=kt.systemFontFamily=kt.messageFontFamily=t.fontFamily),t.fontSize&&(kt.personFontSize=kt.systemFontSize=kt.messageFontSize=t.fontSize),t.fontWeight&&(kt.personFontWeight=kt.systemFontWeight=kt.messageFontWeight=t.fontWeight)},"setConf"),Yy=s((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),G3=s(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),Gwe=s(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");s(fl,"calcC4ShapeTextWH");aY=s(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=kt.c4ShapeMargin-35;let n=e.wrap&&kt.wrap,i=G3(kt);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=hl(e.label.text,i);fl("label",e,n,i,a),ll.drawBoundary(t,e,kt)},"drawBoundary"),sY=s(function(t,e,r,n){let i=0;for(let a of n){i=0;let o=r[a],l=Yy(kt,o.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,o.typeC4Shape.width=hl("\xAB"+o.typeC4Shape.text+"\xBB",l),o.typeC4Shape.height=l.fontSize+2,o.typeC4Shape.Y=kt.c4ShapePadding,i=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height;break}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height);let u=o.wrap&&kt.wrap,h=kt.width-kt.c4ShapePadding*2,f=Yy(kt,o.typeC4Shape.text);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",fl("label",o,u,f,h),o.label.Y=i+8,i=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let m=Yy(kt,o.typeC4Shape.text);fl("type",o,u,m,h),o.type.Y=i+5,i=o.type.Y+o.type.height}else if(o.techn&&o.techn.text!==""){o.techn.text="["+o.techn.text+"]";let m=Yy(kt,o.techn.text);fl("techn",o,u,m,h),o.techn.Y=i+5,i=o.techn.Y+o.techn.height}let d=i,p=o.label.width;if(o.descr&&o.descr.text!==""){let m=Yy(kt,o.typeC4Shape.text);fl("descr",o,u,m,h),o.descr.Y=i+20,i=o.descr.Y+o.descr.height,p=Math.max(o.label.width,o.descr.width),d=i-o.descr.textLines*5}p=p+kt.c4ShapePadding,o.width=Math.max(o.width||kt.width,p,kt.width),o.height=Math.max(o.height||kt.height,d,kt.height),o.margin=o.margin||kt.c4ShapeMargin,t.insert(o),ll.drawC4Shape(e,o,kt)}t.bumpLastMargin(kt.c4ShapeMargin)},"drawC4ShapeArray"),gs=class{static{s(this,"Point")}constructor(e,r){this.x=e,this.y=r}},nY=s(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,o=r+t.width/2,l=n+t.height/2,u=Math.abs(r-i),h=Math.abs(n-a),f=h/u,d=t.height/t.width,p=null;return n==a&&r<i?p=new gs(r+t.width,l):n==a&&r>i?p=new gs(r,l):r==i&&n<a?p=new gs(o,n+t.height):r==i&&n>a&&(p=new gs(o,n)),r>i&&n<a?d>=f?p=new gs(r,l+f*t.width/2):p=new gs(o-u/h*t.height/2,n+t.height):r<i&&n<a?d>=f?p=new gs(r+t.width,l+f*t.width/2):p=new gs(o+u/h*t.height/2,n+t.height):r<i&&n>a?d>=f?p=new gs(r+t.width,l-f*t.width/2):p=new gs(o+t.height/2*u/h,n):r>i&&n>a&&(d>=f?p=new gs(r,l-t.width/2*f):p=new gs(o-t.height/2*u/h,n)),p},"getIntersectPoint"),Vwe=s(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=nY(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=nY(e,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),Uwe=s(function(t,e,r,n){let i=0;for(let a of e){i=i+1;let o=a.wrap&&kt.wrap,l=Gwe(kt);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let h=hl(a.label.text,l);fl("label",a,o,l,h),a.techn&&a.techn.text!==""&&(h=hl(a.techn.text,l),fl("techn",a,o,l,h)),a.descr&&a.descr.text!==""&&(h=hl(a.descr.text,l),fl("descr",a,o,l,h));let f=r(a.from),d=r(a.to),p=Vwe(f,d);a.startPoint=p.startPoint,a.endPoint=p.endPoint}ll.drawRels(t,e,kt)},"drawRels");s(oY,"drawInsideBoundary");qwe=s(function(t,e,r,n){kt=le().c4;let i=le().securityLevel,a;i==="sandbox"&&(a=Me("#i"+e));let o=i==="sandbox"?Me(a.nodes()[0].contentDocument.body):Me("body"),l=n.db;n.db.setWrap(kt.wrap),iY=l.getC4ShapeInRow(),dA=l.getC4BoundaryInRow(),V.debug(`C:${JSON.stringify(kt,null,2)}`);let u=i==="sandbox"?o.select(`[id="${e}"]`):Me(`[id="${e}"]`);ll.insertComputerIcon(u),ll.insertDatabaseIcon(u),ll.insertClockIcon(u);let h=new q3(n);h.setData(kt.diagramMarginX,kt.diagramMarginX,kt.diagramMarginY,kt.diagramMarginY),h.data.widthLimit=screen.availWidth,V3=kt.diagramMarginX,U3=kt.diagramMarginY;let f=n.db.getTitle(),d=n.db.getBoundarys("");oY(u,"",h,d,n),ll.insertArrowHead(u),ll.insertArrowEnd(u),ll.insertArrowCrossHead(u),ll.insertArrowFilledHead(u),Uwe(u,n.db.getRels(),n.db.getC4Shape,n),h.data.stopx=V3,h.data.stopy=U3;let p=h.data,g=p.stopy-p.starty+2*kt.diagramMarginY,v=p.stopx-p.startx+2*kt.diagramMarginX;f&&u.append("text").text(f).attr("x",(p.stopx-p.startx)/2-4*kt.diagramMarginX).attr("y",p.starty+kt.diagramMarginY),xr(u,g,v,kt.useMaxWidth);let x=f?60:0;u.attr("viewBox",p.startx-kt.diagramMarginX+" -"+(kt.diagramMarginY+x)+" "+v+" "+(g+x)),V.debug("models:",p)},"draw"),mA={drawPersonOrSystemArray:sY,drawBoundary:aY,setConf:pA,draw:qwe}});var Wwe,cY,uY=_(()=>{"use strict";Wwe=s(t=>`.person {
stroke: ${t.personBorder};
fill: ${t.personBkg};
}
`,"getStyles"),cY=Wwe});var hY={};ur(hY,{diagram:()=>Hwe});var Hwe,fY=_(()=>{"use strict";Z7();vC();lY();uY();Hwe={parser:MB,db:Y1,renderer:mA,styles:cY,init:s(({c4:t,wrap:e})=>{mA.setConf(t),Y1.setWrap(e)},"init")}});function yA(t){let e=[];for(let r of t){let n=jy.get(r);n?.styles&&(e=[...e,...n.styles??[]].map(i=>i.trim())),n?.textStyles&&(e=[...e,...n.textStyles??[]].map(i=>i.trim()))}return e}var Kwe,mY,Yp,Oh,ys,jy,gu,vA,xA,W3,gA,So,H3,Y3,X3,j3,Qwe,Zwe,Jwe,eTe,tTe,rTe,nTe,bA,iTe,aTe,sTe,gY,oTe,lTe,kA,yY,vY,cTe,xY,uTe,hTe,fTe,dTe,pTe,Xy,bY,kY,mTe,gTe,wY,yTe,vTe,xTe,bTe,kTe,TY,EY,wTe,TTe,ETe,CTe,STe,_Te,K3,wA=_(()=>{"use strict";Xt();pr();gt();Qt();it();Ci();Kwe="flowchart-",mY=0,Yp=le(),Oh=new Map,ys=[],jy=new Map,gu=[],vA=new Map,xA=new Map,W3=0,gA=!0,Y3=[],X3=s(t=>$e.sanitizeText(t,Yp),"sanitizeText"),j3=s(function(t){for(let e of Oh.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),Qwe=s(function(t,e,r,n,i,a,o={}){if(!t||t.trim().length===0)return;let l,u=Oh.get(t);u===void 0&&(u={id:t,labelType:"text",domId:Kwe+t+"-"+mY,styles:[],classes:[]},Oh.set(t,u)),mY++,e!==void 0?(Yp=le(),l=X3(e.text.trim()),u.labelType=e.type,l.startsWith('"')&&l.endsWith('"')&&(l=l.substring(1,l.length-1)),u.text=l):u.text===void 0&&(u.text=t),r!==void 0&&(u.type=r),n?.forEach(function(h){u.styles.push(h)}),i?.forEach(function(h){u.classes.push(h)}),a!==void 0&&(u.dir=a),u.props===void 0?u.props=o:o!==void 0&&Object.assign(u.props,o)},"addVertex"),Zwe=s(function(t,e,r){let a={start:t,end:e,type:void 0,text:"",labelType:"text"};V.info("abc78 Got edge...",a);let o=r.text;if(o!==void 0&&(a.text=X3(o.text.trim()),a.text.startsWith('"')&&a.text.endsWith('"')&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=o.type),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),ys.length<(Yp.maxEdges??500))V.info("Pushing edge..."),ys.push(a);else throw new Error(`Edge limit exceeded. ${ys.length} edges found, but the limit is ${Yp.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.`)},"addSingleLink"),Jwe=s(function(t,e,r){V.info("addLink",t,e,r);for(let n of t)for(let i of e)Zwe(n,i,r)},"addLink"),eTe=s(function(t,e){t.forEach(function(r){r==="default"?ys.defaultInterpolate=e:ys[r].interpolate=e})},"updateLinkInterpolate"),tTe=s(function(t,e){t.forEach(function(r){if(typeof r=="number"&&r>=ys.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${ys.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);r==="default"?ys.defaultStyle=e:(ys[r].style=e,(ys[r]?.style?.length??0)>0&&!ys[r]?.style?.some(n=>n?.startsWith("fill"))&&ys[r]?.style?.push("fill:none"))})},"updateLink"),rTe=s(function(t,e){t.split(",").forEach(function(r){let n=jy.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},jy.set(r,n)),e?.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)})})},"addClass"),nTe=s(function(t){So=t,/.*</.exec(So)&&(So="RL"),/.*\^/.exec(So)&&(So="BT"),/.*>/.exec(So)&&(So="LR"),/.*v/.exec(So)&&(So="TB"),So==="TD"&&(So="TB")},"setDirection"),bA=s(function(t,e){for(let r of t.split(",")){let n=Oh.get(r);n&&n.classes.push(e);let i=vA.get(r);i&&i.classes.push(e)}},"setClass"),iTe=s(function(t,e){if(e!==void 0){e=X3(e);for(let r of t.split(","))xA.set(H3==="gen-1"?j3(r):r,e)}},"setTooltip"),aTe=s(function(t,e,r){let n=j3(t);if(le().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<i.length;o++){let l=i[o].trim();l.startsWith('"')&&l.endsWith('"')&&(l=l.substr(1,l.length-2)),i[o]=l}}i.length===0&&i.push(t);let a=Oh.get(t);a&&(a.haveCallback=!0,Y3.push(function(){let o=document.querySelector(`[id="${n}"]`);o!==null&&o.addEventListener("click",function(){dt.runFunc(e,...i)},!1)}))},"setClickFun"),sTe=s(function(t,e,r){t.split(",").forEach(function(n){let i=Oh.get(n);i!==void 0&&(i.link=dt.formatUrl(e,Yp),i.linkTarget=r)}),bA(t,"clickable")},"setLink"),gY=s(function(t){return xA.get(t)},"getTooltip"),oTe=s(function(t,e,r){t.split(",").forEach(function(n){aTe(n,e,r)}),bA(t,"clickable")},"setClickEvent"),lTe=s(function(t){Y3.forEach(function(e){e(t)})},"bindFunctions"),kA=s(function(){return So.trim()},"getDirection"),yY=s(function(){return Oh},"getVertices"),vY=s(function(){return ys},"getEdges"),cTe=s(function(){return jy},"getClasses"),xY=s(function(t){let e=Me(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=Me("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Me(t).select("svg").selectAll("g.node").on("mouseover",function(){let i=Me(this);if(i.attr("title")===null)return;let o=this?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(i.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(/&lt;br\/&gt;/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),Me(this).classed("hover",!1)})},"setupToolTips");Y3.push(xY);uTe=s(function(t="gen-1"){Oh=new Map,jy=new Map,ys=[],Y3=[xY],gu=[],vA=new Map,W3=0,xA=new Map,gA=!0,H3=t,Yp=le(),br()},"clear"),hTe=s(t=>{H3=t||"gen-2"},"setGen"),fTe=s(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),dTe=s(function(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\s/.exec(r.text)&&(n=void 0);function a(h){let f={boolean:{},number:{},string:{}},d=[],p;return{nodeList:h.filter(function(g){let y=typeof g;return g.stmt&&g.stmt==="dir"?(p=g.value,!1):g.trim()===""?!1:y in f?f[y].hasOwnProperty(g)?!1:f[y][g]=!0:d.includes(g)?!1:d.push(g)}),dir:p}}s(a,"uniq");let{nodeList:o,dir:l}=a(e.flat());if(H3==="gen-1")for(let h=0;h<o.length;h++)o[h]=j3(o[h]);n=n??"subGraph"+W3,i=i||"",i=X3(i),W3=W3+1;let u={id:n,nodes:o,title:i.trim(),classes:[],dir:l,labelType:r.type};return V.info("Adding",u.id,u.nodes,u.dir),u.nodes=EY(u,gu).nodes,gu.push(u),vA.set(n,u),n},"addSubGraph"),pTe=s(function(t){for(let[e,r]of gu.entries())if(r.id===t)return e;return-1},"getPosForId"),Xy=-1,bY=[],kY=s(function(t,e){let r=gu[e].nodes;if(Xy=Xy+1,Xy>2e3)return{result:!1,count:0};if(bY[Xy]=e,gu[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n<r.length;){let a=pTe(r[n]);if(a>=0){let o=kY(t,a);if(o.result)return{result:!0,count:i+o.count};i=i+o.count}n=n+1}return{result:!1,count:i}},"indexNodes2"),mTe=s(function(t){return bY[t]},"getDepthFirstPos"),gTe=s(function(){Xy=-1,gu.length>0&&kY("none",gu.length-1)},"indexNodes"),wY=s(function(){return gu},"getSubGraphs"),yTe=s(()=>gA?(gA=!1,!0):!1,"firstGraph"),vTe=s(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}},"destructStartLink"),xTe=s((t,e)=>{let r=e.length,n=0;for(let i=0;i<r;++i)e[i]===t&&++n;return n},"countChar"),bTe=s(t=>{let e=t.trim(),r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":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 o=xTe(".",r);return o&&(i="dotted",a=o),{type:n,stroke:i,length:a}},"destructEndLink"),kTe=s((t,e)=>{let r=bTe(t),n;if(e){if(n=vTe(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},"destructLink"),TY=s((t,e)=>{for(let r of t)if(r.nodes.includes(e))return!0;return!1},"exists"),EY=s((t,e)=>{let r=[];return t.nodes.forEach((n,i)=>{TY(e,n)||r.push(t.nodes[i])}),{nodes:r}},"makeUniq"),wTe={firstGraph:yTe},TTe=s(t=>t.type==="square"?"squareRect":t.type==="round"?"roundedRect":t.type??"squareRect","getTypeFromVertex"),ETe=s((t,e)=>t.find(r=>r.id===e),"findNode"),CTe=s(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}},"destructEdgeType"),STe=s((t,e,r,n,i,a)=>{let o=r.get(t.id),l=n.get(t.id)??!1,u=ETe(e,t.id);u?(u.cssStyles=t.styles,u.cssCompiledStyles=yA(t.classes),u.cssClasses=t.classes.join(" ")):e.push({id:t.id,label:t.text,labelStyle:"",parentId:o,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:yA(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),shape:TTe(t),dir:t.dir,domId:t.domId,isGroup:l,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:gY(t.id)})},"addNodeFromVertex");s(yA,"getCompiledStyles");_Te=s(()=>{let t=le(),e=[],r=[],n=wY(),i=new Map,a=new Map;for(let u=n.length-1;u>=0;u--){let h=n[u];h.nodes.length>0&&a.set(h.id,!0);for(let f of h.nodes)i.set(f,h.id)}for(let u=n.length-1;u>=0;u--){let h=n[u];e.push({id:h.id,label:h.title,labelStyle:"",parentId:i.get(h.id),padding:8,cssCompiledStyles:yA(h.classes),cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir,isGroup:!0,look:t.look})}yY().forEach(u=>{STe(u,e,i,a,t,t.look||"classic")});let l=vY();return l.forEach((u,h)=>{let{arrowTypeStart:f,arrowTypeEnd:d}=CTe(u.type),p=[...l.defaultStyle??[]];u.style&&p.push(...u.style);let m={id:$3(u.start,u.end,{counter:h,prefix:"L"}),start:u.start,end:u.end,type:u.type??"normal",label:u.text,labelpos:"c",thickness:u.stroke,minlen:u.length,classes:u?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:u?.stroke==="invisible"?"none":f,arrowTypeEnd:u?.stroke==="invisible"?"none":d,arrowheadStyle:"fill: #333",labelStyle:p,style:p,pattern:u.stroke,look:t.look};r.push(m)}),{nodes:e,edges:r,other:{},config:t}},"getData"),K3={defaultConfig:s(()=>Qb.flowchart,"defaultConfig"),setAccTitle:Ar,getAccTitle:Gr,getAccDescription:Ur,getData:_Te,setAccDescription:Vr,addVertex:Qwe,lookUpDomId:j3,addLink:Jwe,updateLinkInterpolate:eTe,updateLink:tTe,addClass:rTe,setDirection:nTe,setClass:bA,setTooltip:iTe,getTooltip:gY,setClickEvent:oTe,setLink:sTe,bindFunctions:lTe,getDirection:kA,getVertices:yY,getEdges:vY,getClasses:cTe,clear:uTe,setGen:hTe,defaultStyle:fTe,addSubGraph:dTe,getDepthFirstPos:mTe,indexNodes:gTe,getSubGraphs:wY,destructLink:kTe,lex:wTe,exists:TY,makeUniq:EY,setDiagramTitle:an,getDiagramTitle:Qr}});var ATe,CY,SY=_(()=>{"use strict";ATe=s(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"),CY=s((t,e,r)=>{let n=ATe(t),i=2,a=e.height+2*r.padding,o=a/i,l=e.width+2*o+r.padding,u=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:o,y:0},{x:l/2,y:2*u},{x:l-o,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*u,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-o,y:-a},{x:l/2,y:-a-2*u},{x:o,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*u,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:o,y:0},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:o,y:-a},{x:l-o,y:-a},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-o},{x:l,y:-a+o},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-o},{x:0,y:-a+o},{x:l,y:-a}]:n.has("right")&&n.has("left")?[{x:o,y:0},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:l-o,y:-a+u},{x:o,y:-a+u},{x:o,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:o,y:-u},{x:o,y:-a+u},{x:0,y:-a+u},{x:l/2,y:-a},{x:l,y:-a+u},{x:l-o,y:-a+u},{x:l-o,y:-u},{x:l,y:-u}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-o},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-o},{x:l,y:-a}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:n.has("right")?[{x:o,y:-u},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:l-o,y:-a+u},{x:o,y:-a+u},{x:o,y:-a+u}]:n.has("left")?[{x:o,y:0},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:-a+u},{x:o,y:-a+u},{x:o,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:o,y:-u},{x:o,y:-a+u},{x:0,y:-a+u},{x:l/2,y:-a},{x:l,y:-a+u},{x:l-o,y:-a+u},{x:l-o,y:-u}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:o,y:-u},{x:o,y:-a+u},{x:l-o,y:-a+u},{x:l-o,y:-u},{x:l,y:-u}]:[{x:0,y:0}]},"getArrowPoints")});function CA(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function MY(t){pd=t}function Xs(t,e){if(e){if(IY.test(t))return t.replace(LTe,_Y)}else if(NY.test(t))return t.replace(DTe,_Y);return t}function ITe(t){return t.replace(MTe,(e,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}function en(t,e){let r=typeof t=="string"?t:t.source;e=e||"";let n={replace:s((i,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(NTe,"$1"),r=r.replace(i,o),n},"replace"),getRegex:s(()=>new RegExp(r,e),"getRegex")};return n}function AY(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function LY(t,e){let r=t.replace(/\|/g,(a,o,l)=>{let u=!1,h=o;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |"}),n=r.split(/ \|/),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function Ky(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n;){let a=t.charAt(n-i-1);if(a===e&&!r)i++;else if(a!==e&&r)i++;else break}return t.slice(0,n-i)}function OTe(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}function DY(t,e,r,n){let i=e.href,a=e.title?Xs(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){n.state.inLink=!0;let l={type:"link",raw:r,href:i,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}return{type:"image",raw:r,href:i,title:a,text:Xs(o)}}function PTe(t,e){let r=t.match(/^(\s+)(?:```)/);if(r===null)return e;let n=r[1];return e.split(`
`).map(i=>{let a=i.match(/^\s+/);if(a===null)return i;let[o]=a;return o.length>=n.length?i.slice(n.length):i}).join(`
`)}function qr(t,e){return dd.parse(t,e)}var pd,IY,LTe,NY,DTe,RTe,_Y,MTe,NTe,Zy,jp,BTe,FTe,zTe,ev,$Te,OY,PY,SA,GTe,_A,VTe,UTe,J3,AA,qTe,BY,WTe,LA,RY,HTe,YTe,FY,XTe,zY,jTe,tv,KTe,QTe,ZTe,JTe,e7e,t7e,r7e,n7e,i7e,Z3,a7e,$Y,GY,s7e,DA,o7e,TA,l7e,Q3,Qy,yu,Kp,Jy,vu,Xp,EA,dd,b3t,k3t,w3t,T3t,E3t,C3t,S3t,VY=_(()=>{"use strict";s(CA,"_getDefaults");pd=CA();s(MY,"changeDefaults");IY=/[&<>"']/,LTe=new RegExp(IY.source,"g"),NY=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,DTe=new RegExp(NY.source,"g"),RTe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_Y=s(t=>RTe[t],"getEscapeReplacement");s(Xs,"escape$1");MTe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;s(ITe,"unescape");NTe=/(^|[^\[])\^/g;s(en,"edit");s(AY,"cleanUrl");Zy={exec:s(()=>null,"exec")};s(LY,"splitCells");s(Ky,"rtrim");s(OTe,"findClosingBracket");s(DY,"outputLink");s(PTe,"indentCodeCompensation");jp=class{static{s(this,"_Tokenizer")}options;rules;lexer;constructor(e){this.options=e||pd}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ky(n,`
`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],i=PTe(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(/#$/.test(n)){let i=Ky(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Ky(r[0],`
`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=Ky(r[0],`
`).split(`
`),i="",a="",o=[];for(;n.length>0;){let l=!1,u=[],h;for(h=0;h<n.length;h++)if(/^ {0,3}>/.test(n[h]))u.push(n[h]),l=!0;else if(!l)u.push(n[h]);else break;n=n.slice(h);let f=u.join(`
`),d=f.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
$1`).replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}
${f}`:f,a=a?`${a}
${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=p,n.length===0)break;let m=o[o.length-1];if(m?.type==="code")break;if(m?.type==="blockquote"){let g=m,y=g.raw+`
`+n.join(`
`),v=this.blockquote(y);o[o.length-1]=v,i=i.substring(0,i.length-g.raw.length)+v.raw,a=a.substring(0,a.length-g.text.length)+v.text;break}else if(m?.type==="list"){let g=m,y=g.raw+`
`+n.join(`
`),v=this.list(y);o[o.length-1]=v,i=i.substring(0,i.length-m.raw.length)+v.raw,a=a.substring(0,a.length-g.raw.length)+v.raw,n=y.substring(o[o.length-1].raw.length).split(`
`);continue}}return{type:"blockquote",raw:i,tokens:o,text:a}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),l=!1;for(;e;){let u=!1,h="",f="";if(!(r=o.exec(e))||this.rules.block.hr.test(e))break;h=r[0],e=e.substring(h.length);let d=r[2].split(`
`,1)[0].replace(/^\t+/,x=>" ".repeat(3*x.length)),p=e.split(`
`,1)[0],m=!d.trim(),g=0;if(this.options.pedantic?(g=2,f=d.trimStart()):m?g=r[1].length+1:(g=r[2].search(/[^ ]/),g=g>4?1:g,f=d.slice(g),g+=r[1].length),m&&/^ *$/.test(p)&&(h+=p+`
`,e=e.substring(p.length+1),u=!0),!u){let x=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,g-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),k=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:\`\`\`|~~~)`),A=new RegExp(`^ {0,${Math.min(3,g-1)}}#`);for(;e;){let w=e.split(`
`,1)[0];if(p=w,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),k.test(p)||A.test(p)||x.test(p)||b.test(e))break;if(p.search(/[^ ]/)>=g||!p.trim())f+=`
`+p.slice(g);else{if(m||d.search(/[^ ]/)>=4||k.test(d)||A.test(d)||b.test(d))break;f+=`
`+p}!m&&!p.trim()&&(m=!0),h+=w+`
`,e=e.substring(w.length+1),d=p.slice(g)}}a.loose||(l?a.loose=!0:/\n *\n *$/.test(h)&&(l=!0));let y=null,v;this.options.gfm&&(y=/^\[[ xX]\] /.exec(f),y&&(v=y[0]!=="[ ] ",f=f.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:v,loose:!1,text:f,tokens:[]}),a.raw+=h}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let u=0;u<a.items.length;u++)if(this.lexer.state.top=!1,a.items[u].tokens=this.lexer.blockTokens(a.items[u].text,[]),!a.loose){let h=a.items[u].tokens.filter(d=>d.type==="space"),f=h.length>0&&h.some(d=>/\n.*\n/.test(d.raw));a.loose=f}if(a.loose)for(let u=0;u<a.items.length;u++)a.items[u].loose=!0;return a}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(/\s+/g," "),i=r[2]?r[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(e){let r=this.rules.block.table.exec(e);if(!r||!/[:|]/.test(r[2]))return;let n=LY(r[1]),i=r[2].replace(/^\||\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(`
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let l of i)/^ *-+: *$/.test(l)?o.align.push("right"):/^ *:-+: *$/.test(l)?o.align.push("center"):/^ *:-+ *$/.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<n.length;l++)o.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(LY(l,o.header.length).map((u,h)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[h]})));return o}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:Xs(r[1])}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&/^<a /i.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;let o=Ky(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=OTe(r[2],"()");if(o>-1){let u=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,u).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),DY(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(/\s+/g," "),a=r[i.toLowerCase()];if(!a){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return DY(n,a,n[0],this.lexer)}}emStrong(e,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let o=[...i[0]].length-1,l,u,h=o,f=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,r=r.slice(-1*e.length+o);(i=d.exec(r))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(u=[...l].length,i[3]||i[4]){h+=u;continue}else if((i[5]||i[6])&&o%3&&!((o+u)%3)){f+=u;continue}if(h-=u,h>0)continue;u=Math.min(u,u+h+f);let p=[...i[0]][0].length,m=e.slice(0,o+i.index+p+u);if(Math.min(o,u)%2){let y=m.slice(1,-1);return{type:"em",raw:m,text:y,tokens:this.lexer.inlineTokens(y)}}let g=m.slice(2,-2);return{type:"strong",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(/\n/g," "),i=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return i&&a&&(n=n.substring(1,n.length-1)),n=Xs(n,!0),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=Xs(r[1]),i="mailto:"+n):(n=Xs(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let n,i;if(r[2]==="@")n=Xs(r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=Xs(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=Xs(r[0]),{type:"text",raw:r[0],text:n}}}},BTe=/^(?: *(?:\n|$))+/,FTe=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,zTe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ev=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$Te=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,OY=/(?:[*+-]|\d{1,9}[.)])/,PY=en(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,OY).replace(/blockCode/g,/ {4}/).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/).getRegex(),SA=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,GTe=/^[^\n]+/,_A=/(?!\s*\])(?:\\.|[^\[\]\\])+/,VTe=en(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",_A).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),UTe=en(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,OY).getRegex(),J3="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",AA=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,qTe=en("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",AA).replace("tag",J3).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),BY=en(SA).replace("hr",ev).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",J3).getRegex(),WTe=en(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",BY).getRegex(),LA={blockquote:WTe,code:FTe,def:VTe,fences:zTe,heading:$Te,hr:ev,html:qTe,lheading:PY,list:UTe,newline:BTe,paragraph:BY,table:Zy,text:GTe},RY=en("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ev).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",J3).getRegex(),HTe={...LA,table:RY,paragraph:en(SA).replace("hr",ev).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",RY).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",J3).getRegex()},YTe={...LA,html:en(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",AA).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Zy,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:en(SA).replace("hr",ev).replace("heading",` *#{1,6} *[^
]`).replace("lheading",PY).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},FY=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,XTe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,zY=/^( {2,}|\\)\n(?!\s*$)/,jTe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tv="\\p{P}\\p{S}",KTe=en(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,tv).getRegex(),QTe=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,ZTe=en(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,tv).getRegex(),JTe=en("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,tv).getRegex(),e7e=en("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,tv).getRegex(),t7e=en(/\\([punct])/,"gu").replace(/punct/g,tv).getRegex(),r7e=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(),n7e=en(AA).replace("(?:-->|$)","-->").getRegex(),i7e=en("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",n7e).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z3=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,a7e=en(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Z3).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$Y=en(/^!?\[(label)\]\[(ref)\]/).replace("label",Z3).replace("ref",_A).getRegex(),GY=en(/^!?\[(ref)\](?:\[\])?/).replace("ref",_A).getRegex(),s7e=en("reflink|nolink(?!\\()","g").replace("reflink",$Y).replace("nolink",GY).getRegex(),DA={_backpedal:Zy,anyPunctuation:t7e,autolink:r7e,blockSkip:QTe,br:zY,code:XTe,del:Zy,emStrongLDelim:ZTe,emStrongRDelimAst:JTe,emStrongRDelimUnd:e7e,escape:FY,link:a7e,nolink:GY,punctuation:KTe,reflink:$Y,reflinkSearch:s7e,tag:i7e,text:jTe,url:Zy},o7e={...DA,link:en(/^!?\[(label)\]\((.*?)\)/).replace("label",Z3).getRegex(),reflink:en(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z3).getRegex()},TA={...DA,escape:en(FY).replace("])","~|])").getRegex(),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\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},l7e={...TA,br:en(zY).replace("{2,}","*").getRegex(),text:en(TA.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q3={normal:LA,gfm:HTe,pedantic:YTe},Qy={normal:DA,gfm:TA,breaks:l7e,pedantic:o7e},yu=class t{static{s(this,"_Lexer")}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 jp,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={block:Q3.normal,inline:Qy.normal};this.options.pedantic?(r.block=Q3.pedantic,r.inline=Qy.pedantic):this.options.gfm&&(r.block=Q3.gfm,this.options.breaks?r.inline=Qy.breaks:r.inline=Qy.gfm),this.tokenizer.rules=r}static get rules(){return{block:Q3,inline:Qy}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(l,u,h)=>u+" ".repeat(h.length));let i,a,o;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(i=l.call({lexer:this},e,r))?(e=e.substring(i.raw.length),r.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&r.length>0?r[r.length-1].raw+=`
`:r.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`
`+i.raw,a.text+=`
`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.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),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`
`+i.raw,a.text+=`
`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.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}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let l=1/0,u=e.slice(1),h;this.options.extensions.startBlock.forEach(f=>{h=f.call({lexer:this},u),typeof h=="number"&&h>=0&&(l=Math.min(l,h))}),l<1/0&&l>=0&&(o=e.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){a=r[r.length-1],n&&a?.type==="paragraph"?(a.raw+=`
`+i.raw,a.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i),n=o.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&a.type==="text"?(a.raw+=`
`+i.raw,a.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(e){let l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let n,i,a,o=e,l,u,h;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)f.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,l.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(u||(h=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(f=>(n=f.call({lexer:this},e,r))?(e=e.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(e,o,h)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),r.push(n);continue}if(a=e,this.options.extensions&&this.options.extensions.startInline){let f=1/0,d=e.slice(1),p;this.options.extensions.startInline.forEach(m=>{p=m.call({lexer:this},d),typeof p=="number"&&p>=0&&(f=Math.min(f,p))}),f<1/0&&f>=0&&(a=e.substring(0,f+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(h=n.raw.slice(-1)),u=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(e){let f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},Kp=class{static{s(this,"_Renderer")}options;parser;constructor(e){this.options=e||pd}space(e){return""}code({text:e,lang:r,escaped:n}){let i=(r||"").match(/^\S*/)?.[0],a=e.replace(/\n$/,"")+`
`;return i?'<pre><code class="language-'+Xs(i)+'">'+(n?a:Xs(a,!0))+`</code></pre>
`:"<pre><code>"+(n?a:Xs(a,!0))+`</code></pre>
`}blockquote({tokens:e}){return`<blockquote>
${this.parser.parse(e)}</blockquote>
`}html({text:e}){return e}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
`}hr(e){return`<hr>
`}list(e){let r=e.ordered,n=e.start,i="";for(let l=0;l<e.items.length;l++){let u=e.items[l];i+=this.listitem(u)}let a=r?"ol":"ul",o=r&&n!==1?' start="'+n+'"':"";return"<"+a+o+`>
`+i+"</"+a+`>
`}listitem(e){let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
`}table(e){let r="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<e.rows.length;a++){let o=e.rows[a];n="";for(let l=0;l<o.length;l++)n+=this.tablecell(o[l]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
<thead>
`+r+`</thead>
`+i+`</table>
`}tablerow({text:e}){return`<tr>
${e}</tr>
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),a=AY(e);if(a===null)return i;e=a;let o='<a href="'+e+'"';return r&&(o+=' title="'+r+'"'),o+=">"+i+"</a>",o}image({href:e,title:r,text:n}){let i=AY(e);if(i===null)return n;e=i;let a=`<img src="${e}" alt="${n}"`;return r&&(a+=` title="${r}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}},Jy=class{static{s(this,"_TextRenderer")}strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},vu=class t{static{s(this,"_Parser")}options;renderer;textRenderer;constructor(e){this.options=e||pd,this.options.renderer=this.options.renderer||new Kp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Jy}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(e,r=!0){let n="";for(let i=0;i<e.length;i++){let a=e[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){let l=a,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){n+=u||"";continue}}let o=a;switch(o.type){case"space":{n+=this.renderer.space(o);continue}case"hr":{n+=this.renderer.hr(o);continue}case"heading":{n+=this.renderer.heading(o);continue}case"code":{n+=this.renderer.code(o);continue}case"table":{n+=this.renderer.table(o);continue}case"blockquote":{n+=this.renderer.blockquote(o);continue}case"list":{n+=this.renderer.list(o);continue}case"html":{n+=this.renderer.html(o);continue}case"paragraph":{n+=this.renderer.paragraph(o);continue}case"text":{let l=o,u=this.renderer.text(l);for(;i+1<e.length&&e[i+1].type==="text";)l=e[++i],u+=`
`+this.renderer.text(l);r?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u}]}):n+=u;continue}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,r){r=r||this.renderer;let n="";for(let i=0;i<e.length;i++){let a=e[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=l||"";continue}}let o=a;switch(o.type){case"escape":{n+=r.text(o);break}case"html":{n+=r.html(o);break}case"link":{n+=r.link(o);break}case"image":{n+=r.image(o);break}case"strong":{n+=r.strong(o);break}case"em":{n+=r.em(o);break}case"codespan":{n+=r.codespan(o);break}case"br":{n+=r.br(o);break}case"del":{n+=r.del(o);break}case"text":{n+=r.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},Xp=class{static{s(this,"_Hooks")}options;constructor(e){this.options=e||pd}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}},EA=class{static{s(this,"Marked")}defaults=CA();options=this.setOptions;parse=this.#e(yu.lex,vu.parse);parseInline=this.#e(yu.lexInline,vu.parseInline);Parser=vu;Renderer=Kp;TextRenderer=Jy;Lexer=yu;Tokenizer=jp;Hooks=Xp;constructor(...e){this.use(...e)}walkTokens(e,r){let n=[];for(let i of e)switch(n=n.concat(r.call(this,i)),i.type){case"table":{let a=i;for(let o of a.header)n=n.concat(this.walkTokens(o.tokens,r));for(let o of a.rows)for(let l of o)n=n.concat(this.walkTokens(l.tokens,r));break}case"list":{let a=i;n=n.concat(this.walkTokens(a.items,r));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let l=a[o].flat(1/0);n=n.concat(this.walkTokens(l,r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...l){let u=a.renderer.apply(this,l);return u===!1&&(u=o.apply(this,l)),u}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new Kp(this.defaults);for(let o in n.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let l=o,u=n.renderer[l];n.useNewRenderer||(u=this.#t(u,l,a));let h=a[l];a[l]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=h.apply(a,f)),d||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new jp(this.defaults);for(let o in n.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let l=o,u=n.tokenizer[l],h=a[l];a[l]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=h.apply(a,f)),d}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Xp;for(let o in n.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(o==="options")continue;let l=o,u=n.hooks[l],h=a[l];Xp.passThroughHooks.has(o)?a[l]=f=>{if(this.defaults.async)return Promise.resolve(u.call(a,f)).then(p=>h.call(a,p));let d=u.call(a,f);return h.call(a,d)}:a[l]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=h.apply(a,f)),d}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,o=n.walkTokens;i.walkTokens=function(l){let u=[];return u.push(o.call(this,l)),a&&(u=u.concat(a.call(this,l))),u}}this.defaults={...this.defaults,...i}}),this}#t(e,r,n){switch(r){case"heading":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,n.parser.parseInline(i.tokens),i.depth,ITe(n.parser.parseInline(i.tokens,n.parser.textRenderer)))};case"code":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text,i.lang,!!i.escaped)};case"table":return function(i){if(!i.type||i.type!==r)return e.apply(this,arguments);let a="",o="";for(let u=0;u<i.header.length;u++)o+=this.tablecell({text:i.header[u].text,tokens:i.header[u].tokens,header:!0,align:i.align[u]});a+=this.tablerow({text:o});let l="";for(let u=0;u<i.rows.length;u++){let h=i.rows[u];o="";for(let f=0;f<h.length;f++)o+=this.tablecell({text:h[f].text,tokens:h[f].tokens,header:!1,align:i.align[f]});l+=this.tablerow({text:o})}return e.call(this,a,l)};case"blockquote":return function(i){if(!i.type||i.type!==r)return e.apply(this,arguments);let a=this.parser.parse(i.tokens);return e.call(this,a)};case"list":return function(i){if(!i.type||i.type!==r)return e.apply(this,arguments);let a=i.ordered,o=i.start,l=i.loose,u="";for(let h=0;h<i.items.length;h++){let f=i.items[h],d=f.checked,p=f.task,m="";if(f.task){let g=this.checkbox({checked:!!d});l?f.tokens.length>0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=g+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=g+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:g+" "}):m+=g+" "}m+=this.parser.parse(f.tokens,l),u+=this.listitem({type:"list_item",raw:m,text:m,task:p,checked:!!d,loose:l,tokens:f.tokens})}return e.call(this,u,a,o)};case"html":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text,i.block)};case"paragraph":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"escape":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)};case"link":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.href,i.title,this.parser.parseInline(i.tokens))};case"image":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.href,i.title,i.text)};case"strong":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"em":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"codespan":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)};case"del":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"text":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)}}return e}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return yu.lex(e,r??this.defaults)}parser(e,r){return vu.parse(e,r??this.defaults)}#e(e,r){return(n,i)=>{let a={...i},o={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);let l=this.#r(!!o.silent,!!o.async);if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(u=>e(u,o)).then(u=>o.hooks?o.hooks.processAllTokens(u):u).then(u=>o.walkTokens?Promise.all(this.walkTokens(u,o.walkTokens)).then(()=>u):u).then(u=>r(u,o)).then(u=>o.hooks?o.hooks.postprocess(u):u).catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let u=e(n,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let h=r(u,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(u){return l(u)}}}#r(e,r){return n=>{if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+Xs(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},dd=new EA;s(qr,"marked");qr.options=qr.setOptions=function(t){return dd.setOptions(t),qr.defaults=dd.defaults,MY(qr.defaults),qr};qr.getDefaults=CA;qr.defaults=pd;qr.use=function(...t){return dd.use(...t),qr.defaults=dd.defaults,MY(qr.defaults),qr};qr.walkTokens=function(t,e){return dd.walkTokens(t,e)};qr.parseInline=dd.parseInline;qr.Parser=vu;qr.parser=vu.parse;qr.Renderer=Kp;qr.TextRenderer=Jy;qr.Lexer=yu;qr.lexer=yu.lex;qr.Tokenizer=jp;qr.Hooks=Xp;qr.parse=qr;b3t=qr.options,k3t=qr.setOptions,w3t=qr.use,T3t=qr.walkTokens,E3t=qr.parseInline,C3t=vu.parse,S3t=yu.lex});function c7e(t,{markdownAutoWrap:e}){let n=t.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`),i=lb(n);return e===!1?i.replace(/ /g,"&nbsp;"):i}function UY(t,e={}){let r=c7e(t,e),n=qr.lexer(r),i=[[]],a=0;function o(l,u="normal"){l.type==="text"?l.text.split(`
`).forEach((f,d)=>{d!==0&&(a++,i.push([])),f.split(" ").forEach(p=>{p&&i[a].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{o(h,l.type)}):l.type==="html"&&i[a].push({content:l.text,type:"normal"})}return s(o,"processNode"),n.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{o(u)}):l.type==="html"&&i[a].push({content:l.text,type:"normal"})}),i}function qY(t,{markdownAutoWrap:e}={}){let r=qr.lexer(t);function n(i){return i.type==="text"?e===!1?i.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):i.text.replace(/\n */g,"<br/>"):i.type==="strong"?`<strong>${i.tokens?.map(n).join("")}</strong>`:i.type==="em"?`<em>${i.tokens?.map(n).join("")}</em>`:i.type==="paragraph"?`<p>${i.tokens?.map(n).join("")}</p>`:i.type==="space"?"":i.type==="html"?`${i.text}`:`Unsupported markdown: ${i.type}`}return s(n,"output"),r.map(n).join("")}var WY=_(()=>{"use strict";VY();Y7();s(c7e,"preprocessMarkdown");s(UY,"markdownToLines");s(qY,"markdownToHTML")});function u7e(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function h7e(t,e){let r=u7e(e.content);return HY(t,[],r,e.type)}function HY(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];let[i,...a]=r,o=[...e,i];return t([{content:o.join(""),type:n}])?HY(t,o,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function YY(t,e){if(t.some(({content:r})=>r.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return RA(t,e)}function RA(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"},o=[...n];if(i!==""&&o.push({content:i,type:"normal"}),o.push(a),e(o))return RA(t,e,r,o);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[l,u]=h7e(e,a);r.push([l]),u.content&&t.unshift(u)}return RA(t,e,r)}var XY=_(()=>{"use strict";s(u7e,"splitTextToChars");s(h7e,"splitWordToFitWidth");s(HY,"splitWordToFitWidthRecursion");s(YY,"splitLineToFitWidth");s(RA,"splitLineToFitWidthRecursion")});function jY(t,e){e&&t.attr("style",e)}async function f7e(t,e,r,n,i=!1){let a=t.append("foreignObject"),o=a.append("xhtml:div"),l=e.label;e.label&&Ei(e.label)&&(l=await hh(e.label.replace($e.lineBreakRegex,`
`),le()));let u=e.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),jY(h,e.labelStyle),h.attr("class",`${u} ${n}`),jY(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()),a.node()}function MA(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 d7e(t,e,r){let n=t.append("text"),i=MA(n,1,e);IA(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function KY(t,e,r){let n=t.append("text"),i=MA(n,1,e);IA(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function p7e(t,e,r,n=!1){let a=e.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1"),u=0;for(let h of r){let f=s(p=>d7e(a,1.1,p)<=t,"checkWidth"),d=f(h)?[h]:YY(h,f);for(let p of d){let m=MA(l,u,1.1);IA(m,p),u++}}if(n){let h=l.node().getBBox(),f=2;return o.attr("x",-f).attr("y",-f).attr("width",h.width+2*f).attr("height",h.height+2*f),a.node()}else return l.node()}function IA(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)})}function NA(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,e=>`<i class='${e.replace(":"," ")}'></i>`)}var vs,ic=_(()=>{"use strict";gt();Qt();Xt();it();WY();pr();XY();s(jY,"applyStyle");s(f7e,"addHtmlSpan");s(MA,"createTspan");s(d7e,"computeWidthOfText");s(KY,"computeDimensionOfText");s(p7e,"createFormattedText");s(IA,"updateTextContentAndStyles");s(NA,"replaceIconSubstring");vs=s(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:o=!0,width:l=200,addSvgBackground:u=!1}={},h)=>{if(V.info("XYZ createText",e,r,n,i,a,o,"addSvgBackground: ",u),a){let f=qY(e,h),d=NA(Ys(f)),p=e.replace(/\\\\/g,"\\"),m={isNode:o,label:Ei(e)?p:d,labelStyle:r.replace("fill:","color:")};return await f7e(t,m,l,i,u)}else{let f=e.replace(/<br\s*\/?>/g,"<br/>"),d=UY(f.replace("<br>","<br/>"),h),p=p7e(l,t,d,e?u:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Me(p).attr("style",m)}else{let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Me(p).select("rect").attr("style",m.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Me(p).select("text").attr("style",g)}return p}},"createText")});function QY(t,e){e&&t.attr("style",e)}function m7e(t){let e=Me(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),QY(a,t.labelStyle),a.attr("class",i),QY(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var g7e,Hi,rv=_(()=>{"use strict";Xt();it();gt();Qt();pr();ic();s(QY,"applyStyle");s(m7e,"addHtmlLabel");g7e=s((t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),hr(le().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),V.debug("vertexText"+i);let a={isNode:n,label:NA(Ys(i)),labelStyle:e.replace("fill:","color:")};return m7e(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let o=[];typeof i=="string"?o=i.split(/\\n|\n|<br\s*\/?>/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(),a.appendChild(u)}return a}},"createLabel"),Hi=g7e});function y7e(t,e){return t.intersect(e)}var ZY,JY=_(()=>{"use strict";s(y7e,"intersectNode");ZY=y7e});function v7e(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*o*o),h=Math.abs(e*r*o/u);n.x<i&&(h=-h);var f=Math.abs(e*r*l/u);return n.y<a&&(f=-f),{x:i+h,y:a+f}}var e5,OA=_(()=>{"use strict";s(v7e,"intersectEllipse");e5=v7e});function x7e(t,e,r){return e5(t,e,e,r)}var eX,tX=_(()=>{"use strict";OA();s(x7e,"intersectCircle");eX=x7e});function b7e(t,e,r,n){var i,a,o,l,u,h,f,d,p,m,g,y,v,x,b;if(i=e.y-t.y,o=t.x-e.x,u=e.x*t.y-t.x*e.y,p=i*r.x+o*r.y+u,m=i*n.x+o*n.y+u,!(p!==0&&m!==0&&rX(p,m))&&(a=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=a*t.x+l*t.y+h,d=a*e.x+l*e.y+h,!(f!==0&&d!==0&&rX(f,d))&&(g=i*l-a*o,g!==0)))return y=Math.abs(g/2),v=o*h-l*u,x=v<0?(v-y)/g:(v+y)/g,v=a*u-i*h,b=v<0?(v-y)/g:(v+y)/g,{x,y:b}}function rX(t,e){return t*e>0}var nX,iX=_(()=>{"use strict";s(b7e,"intersectLine");s(rX,"sameSign");nX=b7e});function k7e(t,e,r){var n=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(g){o=Math.min(o,g.x),l=Math.min(l,g.y)}):(o=Math.min(o,e.x),l=Math.min(l,e.y));for(var u=n-t.width/2-o,h=i-t.height/2-l,f=0;f<e.length;f++){var d=e[f],p=e[f<e.length-1?f+1:0],m=nX(t,r,{x:u+d.x,y:h+d.y},{x:u+p.x,y:h+p.y});m&&a.push(m)}return a.length?(a.length>1&&a.sort(function(g,y){var v=g.x-r.x,x=g.y-r.y,b=Math.sqrt(v*v+x*x),k=y.x-r.x,A=y.y-r.y,w=Math.sqrt(k*k+A*A);return b<w?-1:b===w?0:1}),a[0]):t}var aX,sX=_(()=>{"use strict";iX();aX=k7e;s(k7e,"intersectPolygon")});var w7e,md,PA=_(()=>{"use strict";w7e=s((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,o=t.width/2,l=t.height/2,u,h;return Math.abs(a)*o>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(o=-o),u=o,h=i===0?0:o*a/i),{x:r+u,y:n+h}},"intersectRect"),md=w7e});var pn,BA=_(()=>{"use strict";JY();tX();OA();sX();PA();pn={node:ZY,circle:eX,ellipse:e5,polygon:aX,rect:md}});function dl(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+")")}var di,mn,t5=_(()=>{"use strict";rv();ic();gt();Xt();Qt();pr();di=s(async(t,e,r,n)=>{let i=le(),a,o=e.useHtmlLabels||hr(i.flowchart.htmlLabels);r?a=r:a="node default";let l=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=l.insert("g").attr("class","label").attr("style",e.labelStyle),h;e.labelText===void 0?h="":h=typeof e.labelText=="string"?e.labelText:e.labelText[0];let f=u.node(),d;e.labelType==="markdown"?d=vs(u,$r(Ys(h),i),{useHtmlLabels:o,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):d=f.appendChild(Hi($r(Ys(h),i),e.labelStyle,!1,n));let p=d.getBBox(),m=e.padding/2;if(hr(i.flowchart.htmlLabels)){let g=d.children[0],y=Me(d),v=g.getElementsByTagName("img");if(v){let x=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...v].map(b=>new Promise(k=>{function A(){if(b.style.display="flex",b.style.flexDirection="column",x){let w=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,C=parseInt(w,10)*5+"px";b.style.minWidth=C,b.style.maxWidth=C}else b.style.width="100%";k(b)}s(A,"setupImage"),setTimeout(()=>{b.complete&&A()}),b.addEventListener("error",A),b.addEventListener("load",A)})))}p=g.getBoundingClientRect(),y.attr("width",p.width),y.attr("height",p.height)}return o?u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):u.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:l,bbox:p,halfPadding:m,label:u}},"labelHelper"),mn=s((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");s(dl,"insertPolygonShape")});var T7e,oX,lX=_(()=>{"use strict";t5();it();gt();BA();T7e=s(async(t,e)=>{e.useHtmlLabels||le().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:n,bbox:i,halfPadding:a}=await di(t,e,"node "+e.classes,!0);V.info("Classes = ",e.classes);let o=n.insert("rect",":first-child");return o.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),mn(e,o),e.intersect=function(l){return pn.rect(e,l)},n},"note"),oX=T7e});function FA(t,e,r,n){let i=[],a=s(l=>{i.push(l,0)},"addBorder"),o=s(l=>{i.push(0,l)},"skipBorder");e.includes("t")?(V.debug("add top border"),a(r)):o(r),e.includes("r")?(V.debug("add right border"),a(n)):o(n),e.includes("b")?(V.debug("add bottom border"),a(r)):o(r),e.includes("l")?(V.debug("add left border"),a(n)):o(n),t.attr("stroke-dasharray",i.join(" "))}var cX,js,uX,E7e,C7e,S7e,_7e,A7e,L7e,D7e,R7e,M7e,I7e,N7e,O7e,P7e,B7e,F7e,z7e,$7e,G7e,V7e,hX,U7e,q7e,fX,Qp,Zp,dX,pX,nv,r5=_(()=>{"use strict";Xt();gt();Qt();it();SY();rv();BA();lX();t5();cX=s(t=>t?" "+t:"","formatClass"),js=s((t,e)=>`${e||"node default"}${cX(t.classes)} ${cX(t.class)}`,"getClassesFromNode"),uX=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=i+a,l=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];V.info("Question main (Circle)");let u=dl(r,o,o,l);return u.attr("style",e.style),mn(e,u),e.intersect=function(h){return V.warn("Intersect called"),pn.polygon(e,l,h)},r},"question"),E7e=s((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(o){return o.x+","+o.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(o){return pn.circle(e,14,o)},r},"choice"),C7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=4,a=n.height+e.padding,o=a/i,l=n.width+2*o+e.padding,u=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}],h=dl(r,l,a,u);return h.attr("style",e.style),mn(e,h),e.intersect=function(f){return pn.polygon(e,u,f)},r},"hexagon"),S7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,void 0,!0),i=2,a=n.height+2*e.padding,o=a/i,l=n.width+2*o+e.padding,u=CY(e.directions,n,e),h=dl(r,l,a,u);return h.attr("style",e.style),mn(e,h),e.intersect=function(f){return pn.polygon(e,u,f)},r},"block_arrow"),_7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return dl(r,i,a,o).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(u){return pn.polygon(e,o,u)},r},"rect_left_inv_arrow"),A7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"lean_right"),L7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"lean_left"),D7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"trapezoid"),R7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"inv_trapezoid"),M7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{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}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"rect_right_inv_arrow"),I7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=i/2,o=a/(2.5+i/50),l=n.height+o+e.padding,u="M 0,"+o+" a "+a+","+o+" 0,0,0 "+i+" 0 a "+a+","+o+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+a+","+o+" 0,0,0 "+i+" 0 l 0,"+-l,h=r.attr("label-offset-y",o).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-i/2+","+-(l/2+o)+")");return mn(e,h),e.intersect=function(f){let d=pn.rect(e,f),p=d.x-e.x;if(a!=0&&(Math.abs(p)<e.width/2||Math.abs(p)==e.width/2&&Math.abs(d.y-e.y)>e.height/2-o)){let m=o*o*(1-p*p/(a*a));m!=0&&(m=Math.sqrt(m)),m=o-m,f.y-e.y>0&&(m=-m),d.y+=m}return d},r},"cylinder"),N7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await di(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),o=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,u=e.positioned?-o/2:-n.width/2-i,h=e.positioned?-l/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",u).attr("y",h).attr("width",o).attr("height",l),e.props){let f=new Set(Object.keys(e.props));e.props.borders&&(FA(a,e.props.borders,o,l),f.delete("borders")),f.forEach(d=>{V.warn(`Unknown node property ${d}`)})}return mn(e,a),e.intersect=function(f){return pn.rect(e,f)},r},"rect"),O7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await di(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),o=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,u=e.positioned?-o/2:-n.width/2-i,h=e.positioned?-l/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",u).attr("y",h).attr("width",o).attr("height",l),e.props){let f=new Set(Object.keys(e.props));e.props.borders&&(FA(a,e.props.borders,o,l),f.delete("borders")),f.forEach(d=>{V.warn(`Unknown node property ${d}`)})}return mn(e,a),e.intersect=function(f){return pn.rect(e,f)},r},"composite"),P7e=s(async(t,e)=>{let{shapeSvg:r}=await di(t,e,"label",!0);V.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 o=new Set(Object.keys(e.props));e.props.borders&&(FA(n,e.props.borders,i,a),o.delete("borders")),o.forEach(l=>{V.warn(`Unknown node property ${l}`)})}return mn(e,n),e.intersect=function(o){return pn.rect(e,o)},r},"labelRect");s(FA,"applyNodePropertyBorders");B7e=s((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"),o=n.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText,u="";typeof l=="object"?u=l[0]:u=l,V.info("Label text abc79",u,l,typeof l=="object");let h=o.node().appendChild(Hi(u,e.labelStyle,!0,!0)),f={width:0,height:0};if(hr(le().flowchart.htmlLabels)){let y=h.children[0],v=Me(h);f=y.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}V.info("Text 2",l);let d=l.slice(1,l.length),p=h.getBBox(),m=o.node().appendChild(Hi(d.join?d.join("<br/>"):d,e.labelStyle,!0,!0));if(hr(le().flowchart.htmlLabels)){let y=m.children[0],v=Me(m);f=y.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}let g=e.padding/2;return Me(m).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+g+5)+")"),Me(h).attr("transform","translate( "+(f.width<p.width?0:-(p.width-f.width)/2)+", 0)"),f=o.node().getBBox(),o.attr("transform","translate("+-f.width/2+", "+(-f.height/2-g+3)+")"),i.attr("class","outer title-state").attr("x",-f.width/2-g).attr("y",-f.height/2-g).attr("width",f.width+e.padding).attr("height",f.height+e.padding),a.attr("class","divider").attr("x1",-f.width/2-g).attr("x2",f.width/2+g).attr("y1",-f.height/2-g+p.height+g).attr("y2",-f.height/2-g+p.height+g),mn(e,i),e.intersect=function(y){return pn.rect(e,y)},n},"rectWithTitle"),F7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,o=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 mn(e,o),e.intersect=function(l){return pn.rect(e,l)},r},"stadium"),z7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await di(t,e,js(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),V.info("Circle main"),mn(e,a),e.intersect=function(o){return V.info("Circle intersect",e,n.width/2+i,o),pn.circle(e,n.width/2+i,o)},r},"circle"),$7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await di(t,e,js(e,void 0),!0),a=5,o=r.insert("g",":first-child"),l=o.insert("circle"),u=o.insert("circle");return o.attr("class",e.class),l.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),u.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),V.info("DoubleCircle main"),mn(e,l),e.intersect=function(h){return V.info("DoubleCircle intersect",e,n.width/2+i+a,h),pn.circle(e,n.width/2+i+a,h)},r},"doublecircle"),G7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{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}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"subroutine"),V7e=s((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),mn(e,n),e.intersect=function(i){return pn.circle(e,7,i)},r},"start"),hX=s((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 o=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return mn(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(l){return pn.rect(e,l)},n},"forkJoin"),U7e=s((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),mn(e,i),e.intersect=function(a){return pn.circle(e,7,a)},r},"end"),q7e=s((t,e)=>{let r=e.padding/2,n=4,i=8,a;e.classes?a="node "+e.classes:a="node default";let o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),l=o.insert("rect",":first-child"),u=o.insert("line"),h=o.insert("line"),f=0,d=n,p=o.insert("g").attr("class","label"),m=0,g=e.classData.annotations?.[0],y=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",v=p.node().appendChild(Hi(y,e.labelStyle,!0,!0)),x=v.getBBox();if(hr(le().flowchart.htmlLabels)){let E=v.children[0],S=Me(v);x=E.getBoundingClientRect(),S.attr("width",x.width),S.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+n,f+=x.width);let b=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(le().flowchart.htmlLabels?b+="&lt;"+e.classData.type+"&gt;":b+="<"+e.classData.type+">");let k=p.node().appendChild(Hi(b,e.labelStyle,!0,!0));Me(k).attr("class","classTitle");let A=k.getBBox();if(hr(le().flowchart.htmlLabels)){let E=k.children[0],S=Me(k);A=E.getBoundingClientRect(),S.attr("width",A.width),S.attr("height",A.height)}d+=A.height+n,A.width>f&&(f=A.width);let w=[];e.classData.members.forEach(E=>{let S=E.getDisplayDetails(),R=S.displayText;le().flowchart.htmlLabels&&(R=R.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let D=p.node().appendChild(Hi(R,S.cssStyle?S.cssStyle:e.labelStyle,!0,!0)),L=D.getBBox();if(hr(le().flowchart.htmlLabels)){let P=D.children[0],M=Me(D);L=P.getBoundingClientRect(),M.attr("width",L.width),M.attr("height",L.height)}L.width>f&&(f=L.width),d+=L.height+n,w.push(D)}),d+=i;let T=[];if(e.classData.methods.forEach(E=>{let S=E.getDisplayDetails(),R=S.displayText;le().flowchart.htmlLabels&&(R=R.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let D=p.node().appendChild(Hi(R,S.cssStyle?S.cssStyle:e.labelStyle,!0,!0)),L=D.getBBox();if(hr(le().flowchart.htmlLabels)){let P=D.children[0],M=Me(D);L=P.getBoundingClientRect(),M.attr("width",L.width),M.attr("height",L.height)}L.width>f&&(f=L.width),d+=L.height+n,T.push(D)}),d+=i,g){let E=(f-x.width)/2;Me(v).attr("transform","translate( "+(-1*f/2+E)+", "+-1*d/2+")"),m=x.height+n}let C=(f-A.width)/2;return Me(k).attr("transform","translate( "+(-1*f/2+C)+", "+(-1*d/2+m)+")"),m+=A.height+n,u.attr("class","divider").attr("x1",-f/2-r).attr("x2",f/2+r).attr("y1",-d/2-r+i+m).attr("y2",-d/2-r+i+m),m+=i,w.forEach(E=>{Me(E).attr("transform","translate( "+-f/2+", "+(-1*d/2+m+i/2)+")");let S=E?.getBBox();m+=(S?.height??0)+n}),m+=i,h.attr("class","divider").attr("x1",-f/2-r).attr("x2",f/2+r).attr("y1",-d/2-r+i+m).attr("y2",-d/2-r+i+m),m+=i,T.forEach(E=>{Me(E).attr("transform","translate( "+-f/2+", "+(-1*d/2+m)+")");let S=E?.getBBox();m+=(S?.height??0)+n}),l.attr("style",e.style).attr("class","outer title-state").attr("x",-f/2-r).attr("y",-(d/2)-r).attr("width",f+e.padding).attr("height",d+e.padding),mn(e,l),e.intersect=function(E){return pn.rect(e,E)},o},"class_box"),fX={rhombus:uX,composite:O7e,question:uX,rect:N7e,labelRect:P7e,rectWithTitle:B7e,choice:E7e,circle:z7e,doublecircle:$7e,stadium:F7e,hexagon:C7e,block_arrow:S7e,rect_left_inv_arrow:_7e,lean_right:A7e,lean_left:L7e,trapezoid:D7e,inv_trapezoid:R7e,rect_right_inv_arrow:M7e,cylinder:I7e,start:V7e,end:U7e,note:oX,subroutine:G7e,fork:hX,join:hX,class_box:q7e},Qp={},Zp=s(async(t,e,r)=>{let n,i;if(e.link){let a;le().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 fX[e.shape](n,e,r)}else i=await fX[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),Qp[e.id]=n,e.haveCallback&&Qp[e.id].attr("class",Qp[e.id].attr("class")+" clickable"),n},"insertNode"),dX=s((t,e)=>{Qp[e.id]=t},"setNodeElem"),pX=s(()=>{Qp={}},"clear"),nv=s(t=>{let e=Qp[t.id];V.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")});var n5,zA=_(()=>{"use strict";Xt();r5();n5=s((t,e)=>{let r;return e==="sandbox"&&(r=Me("#i"+t)),(e==="sandbox"?Me(r.nodes()[0].contentDocument.body):Me("body")).select(`[id="${t}"]`)},"getDiagramElement")});var Ks,gd=_(()=>{"use strict";Ks=s(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});function $A(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,o=Math.cos(a),l=Math.sin(a);for(let u of t){let[h,f]=u;u[0]=(h-n)*o-(f-i)*l+n,u[1]=(h-n)*l+(f-i)*o+i}}}function W7e(t,e){return t[0]===e[0]&&t[1]===e[1]}function H7e(t,e,r,n=1){let i=r,a=Math.max(e,.1),o=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,l=[0,0];if(i)for(let h of o)$A(h,l,i);let u=function(h,f,d){let p=[];for(let b of h){let k=[...b];W7e(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}let m=[];f=Math.max(f,.1);let g=[];for(let b of p)for(let k=0;k<b.length-1;k++){let A=b[k],w=b[k+1];if(A[1]!==w[1]){let T=Math.min(A[1],w[1]);g.push({ymin:T,ymax:Math.max(A[1],w[1]),x:T===A[1]?A[0]:w[0],islope:(w[0]-A[0])/(w[1]-A[1])})}}if(g.sort((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax)),!g.length)return m;let y=[],v=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>v);k++)b=k;g.splice(0,b+1).forEach(k=>{y.push({s:v,edge:k})})}if(y=y.filter(b=>!(b.edge.ymax<=v)),y.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(d!==1||x%f==0)&&y.length>1)for(let b=0;b<y.length;b+=2){let k=b+1;if(k>=y.length)break;let A=y[b].edge,w=y[k].edge;m.push([[Math.round(A.x),v],[Math.round(w.x),v]])}v+=d,y.forEach(b=>{b.edge.x=b.edge.x+d*b.edge.islope}),x++}return m}(o,a,n);if(i){for(let h of o)$A(h,l,-i);(function(h,f,d){let p=[];h.forEach(m=>p.push(...m)),$A(p,f,d)})(u,l,-i)}return u}function ov(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),H7e(t,i,n,a||1)}function f5(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 VA(t,e){return t.type===e}function r9(t){let e=[],r=function(o){let l=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:Y7e,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:GA,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return l[l.length]={type:mX,text:""},l}(t),n="BOD",i=0,a=r[i];for(;!VA(a,mX);){let o=0,l=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return r9("M0,0"+t);i++,o=i5[a.text],n=a.text}else VA(a,GA)?o=i5[n]:(i++,o=i5[a.text],n=a.text);if(!(i+o<r.length))throw new Error("Path data ended short");for(let u=i;u<i+o;u++){let h=r[u];if(!VA(h,GA))throw new Error("Param not a number: "+n+","+h.text);l[l.length]=+h.text}if(typeof i5[n]!="number")throw new Error("Bad segment: "+n);{let u={key:n,data:l};e.push(u),i+=o,a=r[i],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function TX(t){let e=0,r=0,n=0,i=0,a=[];for(let{key:o,data:l}of t)switch(o){case"M":a.push({key:"M",data:[...l]}),[e,r]=l,[n,i]=l;break;case"m":e+=l[0],r+=l[1],a.push({key:"M",data:[e,r]}),n=e,i=r;break;case"L":a.push({key:"L",data:[...l]}),[e,r]=l;break;case"l":e+=l[0],r+=l[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...l]}),e=l[4],r=l[5];break;case"c":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":a.push({key:"Q",data:[...l]}),e=l[2],r=l[3];break;case"q":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":a.push({key:"A",data:[...l]}),e=l[5],r=l[6];break;case"a":e+=l[5],r+=l[6],a.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],e,r]});break;case"H":a.push({key:"H",data:[...l]}),e=l[0];break;case"h":e+=l[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...l]}),e=l[2],r=l[3];break;case"s":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":a.push({key:"T",data:[...l]}),e=l[0],r=l[1];break;case"t":e+=l[0],r+=l[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 EX(t){let e=[],r="",n=0,i=0,a=0,o=0,l=0,u=0;for(let{key:h,data:f}of t){switch(h){case"M":e.push({key:"M",data:[...f]}),[n,i]=f,[a,o]=f;break;case"C":e.push({key:"C",data:[...f]}),n=f[4],i=f[5],l=f[2],u=f[3];break;case"L":e.push({key:"L",data:[...f]}),[n,i]=f;break;case"H":n=f[0],e.push({key:"L",data:[n,i]});break;case"V":i=f[0],e.push({key:"L",data:[n,i]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=n+(n-l),p=i+(i-u)):(d=n,p=i),e.push({key:"C",data:[d,p,...f]}),l=f[0],u=f[1],n=f[2],i=f[3];break}case"T":{let[d,p]=f,m=0,g=0;r==="Q"||r==="T"?(m=n+(n-l),g=i+(i-u)):(m=n,g=i);let y=n+2*(m-n)/3,v=i+2*(g-i)/3,x=d+2*(m-d)/3,b=p+2*(g-p)/3;e.push({key:"C",data:[y,v,x,b,d,p]}),l=m,u=g,n=d,i=p;break}case"Q":{let[d,p,m,g]=f,y=n+2*(d-n)/3,v=i+2*(p-i)/3,x=m+2*(d-m)/3,b=g+2*(p-g)/3;e.push({key:"C",data:[y,v,x,b,m,g]}),l=d,u=p,n=m,i=g;break}case"A":{let d=Math.abs(f[0]),p=Math.abs(f[1]),m=f[2],g=f[3],y=f[4],v=f[5],x=f[6];d===0||p===0?(e.push({key:"C",data:[n,i,v,x,v,x]}),n=v,i=x):(n!==v||i!==x)&&(CX(n,i,v,x,d,p,m,g,y).forEach(function(b){e.push({key:"C",data:b})}),n=v,i=x);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=o}r=h}return e}function iv(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function CX(t,e,r,n,i,a,o,l,u,h){let f=(d=o,Math.PI*d/180);var d;let p=[],m=0,g=0,y=0,v=0;if(h)[m,g,y,v]=h;else{[t,e]=iv(t,e,-f),[r,n]=iv(r,n,-f);let P=(t-r)/2,M=(e-n)/2,F=P*P/(i*i)+M*M/(a*a);F>1&&(F=Math.sqrt(F),i*=F,a*=F);let I=i*i,O=a*a,z=I*O-I*M*M-O*P*P,N=I*M*M+O*P*P,U=(l===u?-1:1)*Math.sqrt(Math.abs(z/N));y=U*i*M/a+(t+r)/2,v=U*-a*P/i+(e+n)/2,m=Math.asin(parseFloat(((e-v)/a).toFixed(9))),g=Math.asin(parseFloat(((n-v)/a).toFixed(9))),t<y&&(m=Math.PI-m),r<y&&(g=Math.PI-g),m<0&&(m=2*Math.PI+m),g<0&&(g=2*Math.PI+g),u&&m>g&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let x=g-m;if(Math.abs(x)>120*Math.PI/180){let P=g,M=r,F=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=CX(r=y+i*Math.cos(g),n=v+a*Math.sin(g),M,F,i,a,o,0,u,[g,P,y,v])}x=g-m;let b=Math.cos(m),k=Math.sin(m),A=Math.cos(g),w=Math.sin(g),T=Math.tan(x/4),C=4/3*i*T,E=4/3*a*T,S=[t,e],R=[t+C*k,e-E*b],D=[r+C*w,n-E*A],L=[r,n];if(R[0]=2*S[0]-R[0],R[1]=2*S[1]-R[1],h)return[R,D,L].concat(p);{p=[R,D,L].concat(p);let P=[];for(let M=0;M<p.length;M+=3){let F=iv(p[M][0],p[M][1],f),I=iv(p[M+1][0],p[M+1][1],f),O=iv(p[M+2][0],p[M+2][1],f);P.push([F[0],F[1],I[0],I[1],O[0],O[1]])}return P}}function SX(t,e,r,n,i){return{type:"path",ops:Ph(t,e,r,n,i)}}function o5(t,e,r){let n=(t||[]).length;if(n>2){let i=[];for(let a=0;a<n-1;a++)i.push(...Ph(t[a][0],t[a][1],t[a+1][0],t[a+1][1],r));return e&&i.push(...Ph(t[n-1][0],t[n-1][1],t[0][0],t[0][1],r)),{type:"path",ops:i}}return n===2?SX(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function j7e(t,e,r,n,i){return function(a,o){return o5(a,!0,o)}([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],i)}function gX(t,e){if(t.length){let r=typeof t[0][0]=="number"?[t]:t,n=a5(r[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:a5(r[0],1.5*(1+.22*e.roughness),xX(e));for(let a=1;a<r.length;a++){let o=r[a];if(o.length){let l=a5(o,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:a5(o,1.5*(1+.22*e.roughness),xX(e));for(let h of l)h.op!=="move"&&n.push(h);for(let h of u)h.op!=="move"&&i.push(h)}}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function _X(t,e,r){let n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/i,o=Math.abs(t/2),l=Math.abs(e/2),u=1-r.curveFitting;return o+=Ot(o*u,r),l+=Ot(l*u,r),{increment:a,rx:o,ry:l}}function QA(t,e,r,n){let[i,a]=bX(n.increment,t,e,n.rx,n.ry,1,n.increment*c5(.1,c5(.4,1,r),r),r),o=u5(i,null,r);if(!r.disableMultiStroke&&r.roughness!==0){let[l]=bX(n.increment,t,e,n.rx,n.ry,1.5,0,r),u=u5(l,null,r);o=o.concat(u)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function yX(t,e,r,n,i,a,o,l,u){let h=t,f=e,d=Math.abs(r/2),p=Math.abs(n/2);d+=Ot(.01*d,u),p+=Ot(.01*p,u);let m=i,g=a;for(;m<0;)m+=2*Math.PI,g+=2*Math.PI;g-m>2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,v=Math.min(y/2,(g-m)/2),x=kX(v,h,f,d,p,m,g,1,u);if(!u.disableMultiStroke){let b=kX(v,h,f,d,p,m,g,1.5,u);x.push(...b)}return o&&(l?x.push(...Ph(h,f,h+d*Math.cos(m),f+p*Math.sin(m),u),...Ph(h,f,h+d*Math.cos(g),f+p*Math.sin(g),u)):x.push({op:"lineTo",data:[h,f]},{op:"lineTo",data:[h+d*Math.cos(m),f+p*Math.sin(m)]})),{type:"path",ops:x}}function vX(t,e){let r=EX(TX(r9(t))),n=[],i=[0,0],a=[0,0];for(let{key:o,data:l}of r)switch(o){case"M":a=[l[0],l[1]],i=[l[0],l[1]];break;case"L":n.push(...Ph(a[0],a[1],l[0],l[1],e)),a=[l[0],l[1]];break;case"C":{let[u,h,f,d,p,m]=l;n.push(...K7e(u,h,f,d,p,m,a,e)),a=[p,m];break}case"Z":n.push(...Ph(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function UA(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]+Ot(i,e),n[0][1]+Ot(i,e)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[n[o][0]+Ot(i,e),n[o][1]+Ot(i,e)]})}}return{type:"fillPath",ops:r}}function Jp(t,e){return function(r,n){let i=r.fillStyle||"hachure";if(!xs[i])switch(i){case"zigzag":xs[i]||(xs[i]=new WA(n));break;case"cross-hatch":xs[i]||(xs[i]=new HA(n));break;case"dots":xs[i]||(xs[i]=new YA(n));break;case"dashed":xs[i]||(xs[i]=new XA(n));break;case"zigzag-line":xs[i]||(xs[i]=new jA(n));break;default:i="hachure",xs[i]||(xs[i]=new sv(n))}return xs[i]}(e,X7e).fillPolygons(t,e)}function xX(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function AX(t){return t.randomizer||(t.randomizer=new KA(t.seed||0)),t.randomizer.next()}function c5(t,e,r,n=1){return r.roughness*n*(AX(r)*(e-t)+t)}function Ot(t,e,r=1){return c5(-t,t,e,r)}function Ph(t,e,r,n,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,l=ZA(t,e,r,n,i,!0,!1);if(o)return l;let u=ZA(t,e,r,n,i,!0,!0);return l.concat(u)}function ZA(t,e,r,n,i,a,o){let l=Math.pow(t-r,2)+Math.pow(e-n,2),u=Math.sqrt(l),h=1;h=u<200?1:u>500?.4:-.0016668*u+1.233334;let f=i.maxRandomnessOffset||0;f*f*100>l&&(f=u/10);let d=f/2,p=.2+.2*AX(i),m=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;m=Ot(m,i,h),g=Ot(g,i,h);let y=[],v=s(()=>Ot(d,i,h),"M"),x=s(()=>Ot(f,i,h),"k"),b=i.preserveVertices;return a&&(o?y.push({op:"move",data:[t+(b?0:v()),e+(b?0:v())]}):y.push({op:"move",data:[t+(b?0:Ot(f,i,h)),e+(b?0:Ot(f,i,h))]})),o?y.push({op:"bcurveTo",data:[m+t+(r-t)*p+v(),g+e+(n-e)*p+v(),m+t+2*(r-t)*p+v(),g+e+2*(n-e)*p+v(),r+(b?0:v()),n+(b?0:v())]}):y.push({op:"bcurveTo",data:[m+t+(r-t)*p+x(),g+e+(n-e)*p+x(),m+t+2*(r-t)*p+x(),g+e+2*(n-e)*p+x(),r+(b?0:x()),n+(b?0:x())]}),y}function a5(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+Ot(e,r),t[0][1]+Ot(e,r)]),n.push([t[0][0]+Ot(e,r),t[0][1]+Ot(e,r)]);for(let i=1;i<t.length;i++)n.push([t[i][0]+Ot(e,r),t[i][1]+Ot(e,r)]),i===t.length-1&&n.push([t[i][0]+Ot(e,r),t[i][1]+Ot(e,r)]);return u5(n,null,r)}function u5(t,e,r){let n=t.length,i=[];if(n>3){let a=[],o=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let l=1;l+2<n;l++){let u=t[l];a[0]=[u[0],u[1]],a[1]=[u[0]+(o*t[l+1][0]-o*t[l-1][0])/6,u[1]+(o*t[l+1][1]-o*t[l-1][1])/6],a[2]=[t[l+1][0]+(o*t[l][0]-o*t[l+2][0])/6,t[l+1][1]+(o*t[l][1]-o*t[l+2][1])/6],a[3]=[t[l+1][0],t[l+1][1]],i.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let l=r.maxRandomnessOffset;i.push({op:"lineTo",data:[e[0]+Ot(l,r),e[1]+Ot(l,r)]})}}else n===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):n===2&&i.push(...ZA(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return i}function bX(t,e,r,n,i,a,o,l){let u=[],h=[];if(l.roughness===0){t/=4,h.push([e+n*Math.cos(-t),r+i*Math.sin(-t)]);for(let f=0;f<=2*Math.PI;f+=t){let d=[e+n*Math.cos(f),r+i*Math.sin(f)];u.push(d),h.push(d)}h.push([e+n*Math.cos(0),r+i*Math.sin(0)]),h.push([e+n*Math.cos(t),r+i*Math.sin(t)])}else{let f=Ot(.5,l)-Math.PI/2;h.push([Ot(a,l)+e+.9*n*Math.cos(f-t),Ot(a,l)+r+.9*i*Math.sin(f-t)]);let d=2*Math.PI+f-.01;for(let p=f;p<d;p+=t){let m=[Ot(a,l)+e+n*Math.cos(p),Ot(a,l)+r+i*Math.sin(p)];u.push(m),h.push(m)}h.push([Ot(a,l)+e+n*Math.cos(f+2*Math.PI+.5*o),Ot(a,l)+r+i*Math.sin(f+2*Math.PI+.5*o)]),h.push([Ot(a,l)+e+.98*n*Math.cos(f+o),Ot(a,l)+r+.98*i*Math.sin(f+o)]),h.push([Ot(a,l)+e+.9*n*Math.cos(f+.5*o),Ot(a,l)+r+.9*i*Math.sin(f+.5*o)])}return[h,u]}function kX(t,e,r,n,i,a,o,l,u){let h=a+Ot(.1,u),f=[];f.push([Ot(l,u)+e+.9*n*Math.cos(h-t),Ot(l,u)+r+.9*i*Math.sin(h-t)]);for(let d=h;d<=o;d+=t)f.push([Ot(l,u)+e+n*Math.cos(d),Ot(l,u)+r+i*Math.sin(d)]);return f.push([e+n*Math.cos(o),r+i*Math.sin(o)]),f.push([e+n*Math.cos(o),r+i*Math.sin(o)]),u5(f,null,u)}function K7e(t,e,r,n,i,a,o,l){let u=[],h=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3],f=[0,0],d=l.disableMultiStroke?1:2,p=l.preserveVertices;for(let m=0;m<d;m++)m===0?u.push({op:"move",data:[o[0],o[1]]}):u.push({op:"move",data:[o[0]+(p?0:Ot(h[0],l)),o[1]+(p?0:Ot(h[0],l))]}),f=p?[i,a]:[i+Ot(h[m],l),a+Ot(h[m],l)],u.push({op:"bcurveTo",data:[t+Ot(h[m],l),e+Ot(h[m],l),r+Ot(h[m],l),n+Ot(h[m],l),f[0],f[1]]});return u}function av(t){return[...t]}function wX(t,e=0){let r=t.length;if(r<3)throw new Error("A curve must have at least three points.");let n=[];if(r===3)n.push(av(t[0]),av(t[1]),av(t[2]),av(t[2]));else{let i=[];i.push(t[0],t[0]);for(let l=1;l<t.length;l++)i.push(t[l]),l===t.length-1&&i.push(t[l]);let a=[],o=1-e;n.push(av(i[0]));for(let l=1;l+2<i.length;l++){let u=i[l];a[0]=[u[0],u[1]],a[1]=[u[0]+(o*i[l+1][0]-o*i[l-1][0])/6,u[1]+(o*i[l+1][1]-o*i[l-1][1])/6],a[2]=[i[l+1][0]+(o*i[l][0]-o*i[l+2][0])/6,i[l+1][1]+(o*i[l][1]-o*i[l+2][1])/6],a[3]=[i[l+1][0],i[l+1][1]],n.push(a[1],a[2],a[3])}}return n}function l5(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function Q7e(t,e,r){let n=l5(e,r);if(n===0)return l5(t,e);let i=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/n;return i=Math.max(0,Math.min(1,i)),l5(t,yd(e,r,i))}function yd(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function JA(t,e,r,n){let i=n||[];if(function(l,u){let h=l[u+0],f=l[u+1],d=l[u+2],p=l[u+3],m=3*f[0]-2*h[0]-p[0];m*=m;let g=3*f[1]-2*h[1]-p[1];g*=g;let y=3*d[0]-2*p[0]-h[0];y*=y;let v=3*d[1]-2*p[1]-h[1];return v*=v,m<y&&(m=y),g<v&&(g=v),m+g}(t,e)<r){let l=t[e+0];i.length?(a=i[i.length-1],o=l,Math.sqrt(l5(a,o))>1&&i.push(l)):i.push(l),i.push(t[e+3])}else{let u=t[e+0],h=t[e+1],f=t[e+2],d=t[e+3],p=yd(u,h,.5),m=yd(h,f,.5),g=yd(f,d,.5),y=yd(p,m,.5),v=yd(m,g,.5),x=yd(y,v,.5);JA([u,p,y,x],0,r,i),JA([x,v,g,d],0,r,i)}var a,o;return i}function Z7e(t,e){return h5(t,0,t.length,e)}function h5(t,e,r,n,i){let a=i||[],o=t[e],l=t[r-1],u=0,h=1;for(let f=e+1;f<r-1;++f){let d=Q7e(t[f],o,l);d>u&&(u=d,h=f)}return Math.sqrt(u)>n?(h5(t,e,h+1,n,a),h5(t,h,r,n,a)):(a.length||a.push(o),a.push(l)),a}function qA(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a<i;a++)JA(t,3*a,e,n);return r&&r>0?h5(n,0,n.length,r):n}var sv,WA,HA,YA,XA,jA,xs,KA,Y7e,GA,mX,i5,X7e,Qs,em,e9,s5,t9,Ht,Yn=_(()=>{"use strict";s($A,"t");s(W7e,"e");s(H7e,"s");s(ov,"n");sv=class{static{s(this,"o")}constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=ov(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}};s(f5,"a");WA=class extends sv{static{s(this,"h")}fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=ov(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,o=[],l=.5*n*Math.cos(a),u=.5*n*Math.sin(a);for(let[h,f]of i)f5([h,f])&&o.push([[h[0]-l,h[1]+u],[...f]],[[h[0]+l,h[1]-u],[...f]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}},HA=class extends sv{static{s(this,"r")}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}},YA=class{static{s(this,"i")}constructor(e){this.helper=e}fillPolygons(e,r){let n=ov(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 o=i/4;for(let l of e){let u=f5(l),h=u/i,f=Math.ceil(h)-1,d=u-f*i,p=(l[0][0]+l[1][0])/2-i/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g<f;g++){let y=m+d+g*i,v=p-o+2*Math.random()*o,x=y-o+2*Math.random()*o,b=this.helper.ellipse(v,x,a,a,r);n.push(...b.ops)}}return{type:"fillSketch",ops:n}}},XA=class{static{s(this,"c")}constructor(e){this.helper=e}fillPolygons(e,r){let n=ov(e,r);return{type:"fillSketch",ops:this.dashedLine(n,r)}}dashedLine(e,r){let n=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,i=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return e.forEach(o=>{let l=f5(o),u=Math.floor(l/(n+i)),h=(l+i-u*(n+i))/2,f=o[0],d=o[1];f[0]>d[0]&&(f=o[1],d=o[0]);let p=Math.atan((d[1]-f[1])/(d[0]-f[0]));for(let m=0;m<u;m++){let g=m*(n+i),y=g+n,v=[f[0]+g*Math.cos(p)+h*Math.cos(p),f[1]+g*Math.sin(p)+h*Math.sin(p)],x=[f[0]+y*Math.cos(p)+h*Math.cos(p),f[1]+y*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(v[0],v[1],x[0],x[1],r))}}),a}},jA=class{static{s(this,"l")}constructor(e){this.helper=e}fillPolygons(e,r){let n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,i=r.zigzagOffset<0?n:r.zigzagOffset,a=ov(e,r=Object.assign({},r,{hachureGap:n+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,r)}}zigzagLines(e,r,n){let i=[];return e.forEach(a=>{let o=f5(a),l=Math.round(o/(2*r)),u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);let f=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let d=0;d<l;d++){let p=2*d*r,m=2*(d+1)*r,g=Math.sqrt(2*Math.pow(r,2)),y=[u[0]+p*Math.cos(f),u[1]+p*Math.sin(f)],v=[u[0]+m*Math.cos(f),u[1]+m*Math.sin(f)],x=[y[0]+g*Math.cos(f+Math.PI/4),y[1]+g*Math.sin(f+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],n),...this.helper.doubleLineOps(x[0],x[1],v[0],v[1],n))}}),i}},xs={},KA=class{static{s(this,"p")}constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},Y7e=0,GA=1,mX=2,i5={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};s(VA,"k");s(r9,"b");s(TX,"y");s(EX,"m");s(iv,"w");s(CX,"x");X7e={randOffset:s(function(t,e){return Ot(t,e)},"randOffset"),randOffsetWithRange:s(function(t,e,r){return c5(t,e,r)},"randOffsetWithRange"),ellipse:s(function(t,e,r,n,i){let a=_X(r,n,i);return QA(t,e,i,a).opset},"ellipse"),doubleLineOps:s(function(t,e,r,n,i){return Ph(t,e,r,n,i,!0)},"doubleLineOps")};s(SX,"v");s(o5,"S");s(j7e,"O");s(gX,"L");s(_X,"T");s(QA,"D");s(yX,"A");s(vX,"_");s(UA,"I");s(Jp,"C");s(xX,"z");s(AX,"W");s(c5,"E");s(Ot,"G");s(Ph,"$");s(ZA,"R");s(a5,"j");s(u5,"q");s(bX,"F");s(kX,"V");s(K7e,"Z");s(av,"Q");s(wX,"H");s(l5,"N");s(Q7e,"B");s(yd,"J");s(JA,"K");s(Z7e,"U");s(h5,"X");s(qA,"Y");Qs="none",em=class{static{s(this,"et")}constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,n){return{shape:e,sets:r||[],options:n||this.defaultOptions}}line(e,r,n,i,a){let o=this._o(a);return this._d("line",[SX(e,r,n,i,o)],o)}rectangle(e,r,n,i,a){let o=this._o(a),l=[],u=j7e(e,r,n,i,o);if(o.fill){let h=[[e,r],[e+n,r],[e+n,r+i],[e,r+i]];o.fillStyle==="solid"?l.push(UA([h],o)):l.push(Jp([h],o))}return o.stroke!==Qs&&l.push(u),this._d("rectangle",l,o)}ellipse(e,r,n,i,a){let o=this._o(a),l=[],u=_X(n,i,o),h=QA(e,r,o,u);if(o.fill)if(o.fillStyle==="solid"){let f=QA(e,r,o,u).opset;f.type="fillPath",l.push(f)}else l.push(Jp([h.estimatedPoints],o));return o.stroke!==Qs&&l.push(h.opset),this._d("ellipse",l,o)}circle(e,r,n,i){let a=this.ellipse(e,r,n,n,i);return a.shape="circle",a}linearPath(e,r){let n=this._o(r);return this._d("linearPath",[o5(e,!1,n)],n)}arc(e,r,n,i,a,o,l=!1,u){let h=this._o(u),f=[],d=yX(e,r,n,i,a,o,l,!0,h);if(l&&h.fill)if(h.fillStyle==="solid"){let p=Object.assign({},h);p.disableMultiStroke=!0;let m=yX(e,r,n,i,a,o,!0,!1,p);m.type="fillPath",f.push(m)}else f.push(function(p,m,g,y,v,x,b){let k=p,A=m,w=Math.abs(g/2),T=Math.abs(y/2);w+=Ot(.01*w,b),T+=Ot(.01*T,b);let C=v,E=x;for(;C<0;)C+=2*Math.PI,E+=2*Math.PI;E-C>2*Math.PI&&(C=0,E=2*Math.PI);let S=(E-C)/b.curveStepCount,R=[];for(let D=C;D<=E;D+=S)R.push([k+w*Math.cos(D),A+T*Math.sin(D)]);return R.push([k+w*Math.cos(E),A+T*Math.sin(E)]),R.push([k,A]),Jp([R],b)}(e,r,n,i,a,o,h));return h.stroke!==Qs&&f.push(d),this._d("arc",f,h)}curve(e,r){let n=this._o(r),i=[],a=gX(e,n);if(n.fill&&n.fill!==Qs)if(n.fillStyle==="solid"){let o=gX(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{let o=[],l=e;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?o.push(...h):h.length===3?o.push(...qA(wX([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):o.push(...qA(wX(h),10,(1+n.roughness)/2))}o.length&&i.push(Jp([o],n))}return n.stroke!==Qs&&i.push(a),this._d("curve",i,n)}polygon(e,r){let n=this._o(r),i=[],a=o5(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(UA([e],n)):i.push(Jp([e],n))),n.stroke!==Qs&&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!==Qs,o=n.stroke!==Qs,l=!!(n.simplification&&n.simplification<1),u=function(f,d,p){let m=EX(TX(r9(f))),g=[],y=[],v=[0,0],x=[],b=s(()=>{x.length>=4&&y.push(...qA(x,d)),x=[]},"i"),k=s(()=>{b(),y.length&&(g.push(y),y=[])},"c");for(let{key:w,data:T}of m)switch(w){case"M":k(),v=[T[0],T[1]],y.push(v);break;case"L":b(),y.push([T[0],T[1]]);break;case"C":if(!x.length){let C=y.length?y[y.length-1]:v;x.push([C[0],C[1]])}x.push([T[0],T[1]]),x.push([T[2],T[3]]),x.push([T[4],T[5]]);break;case"Z":b(),y.push([v[0],v[1]])}if(k(),!p)return g;let A=[];for(let w of g){let T=Z7e(w,p);T.length&&A.push(T)}return A}(e,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=vX(e,n);if(a)if(n.fillStyle==="solid")if(u.length===1){let f=vX(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else i.push(UA(u,n));else i.push(Jp(u,n));return o&&(l?u.forEach(f=>{i.push(o5(f,!1,n))}):i.push(h)),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(o=>+o.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 o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Qs};break;case"fillPath":o={d:this.opsToPath(a),stroke:Qs,strokeWidth:0,fill:n.fill||Qs};break;case"fillSketch":o=this.fillSketch(a,n)}o&&i.push(o)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Qs,strokeWidth:n,fill:Qs}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}},e9=class{static{s(this,"st")}constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new em(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(let o of r)switch(o.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,o,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let l=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,o,a,l),i.restore();break}case"fillSketch":this.fillSketch(i,o,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 o=typeof n=="number"&&n>=0?a.data.map(l=>+l.toFixed(n)):a.data;switch(a.op){case"move":e.moveTo(o[0],o[1]);break;case"bcurveTo":e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":e.lineTo(o[0],o[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 o=this.gen.line(e,r,n,i,a);return this.draw(o),o}rectangle(e,r,n,i,a){let o=this.gen.rectangle(e,r,n,i,a);return this.draw(o),o}ellipse(e,r,n,i,a){let o=this.gen.ellipse(e,r,n,i,a);return this.draw(o),o}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,o,l=!1,u){let h=this.gen.arc(e,r,n,i,a,o,l,u);return this.draw(h),h}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}},s5="http://www.w3.org/2000/svg",t9=class{static{s(this,"ot")}constructor(e,r){this.svg=e,this.gen=new em(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(s5,"g"),o=e.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(s5,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=i.createElementNS(s5,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(i,l,n)}u&&a.appendChild(u)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=e.createElementNS(s5,"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 o=this.gen.line(e,r,n,i,a);return this.draw(o)}rectangle(e,r,n,i,a){let o=this.gen.rectangle(e,r,n,i,a);return this.draw(o)}ellipse(e,r,n,i,a){let o=this.gen.ellipse(e,r,n,i,a);return this.draw(o)}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,o,l=!1,u){let h=this.gen.arc(e,r,n,i,a,o,l,u);return this.draw(h)}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)}},Ht={canvas:s((t,e)=>new e9(t,e),"canvas"),svg:s((t,e)=>new t9(t,e),"svg"),generator:s(t=>new em(t),"generator"),newSeed:s(()=>em.newSeed(),"newSeed")}});var J7e,vd,n9=_(()=>{"use strict";J7e=s((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,o=t.width/2,l=t.height/2,u,h;return Math.abs(a)*o>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(o=-o),u=o,h=i===0?0:o*a/i),{x:r+u,y:n+h}},"intersectRect"),vd=J7e});function eEe(t,e){e&&t.attr("style",e)}async function tEe(t){let e=Me(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;t.label&&Ei(t.label)&&(n=await hh(t.label.replace($e.lineBreakRegex,`
`),le()));let i=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+i+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+n+"</span>"),eEe(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var rEe,ac,d5=_(()=>{"use strict";Xt();it();gt();Qt();pr();s(eEe,"applyStyle");s(tEe,"addHtmlLabel");rEe=s(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),hr(le().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),V.info("vertexText"+i);let a={isNode:n,label:Ys(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>`<i class='${l.replace(":"," ")}'></i>`),labelStyle:e&&e.replace("fill:","color:")};return await tEe(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let o=[];typeof i=="string"?o=i.split(/\\n|\n|<br\s*\/?>/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(),a.appendChild(u)}return a}},"createLabel"),ac=rEe});var xu,lv=_(()=>{"use strict";xu=s((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")});var bu,LX,nEe,Dr,Rr,pi=_(()=>{"use strict";gt();bu=s(t=>{let{handDrawnSeed:e}=le();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),LX=s(t=>{let e=nEe([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),nEe=s(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),Dr=s(t=>{let{stylesArray:e}=LX(t),r=[],n=[],i=[],a=[];return e.forEach(o=>{let l=o[0];l==="color"||l==="font-size"||l==="font-family"||l==="font-weight"||l==="font-style"||l==="text-decoration"||l==="text-align"||l==="text-transform"||l==="line-height"||l==="letter-spacing"||l==="word-spacing"||l==="text-shadow"||l==="text-overflow"||l==="white-space"||l==="word-wrap"||l==="word-break"||l==="overflow-wrap"||l==="hyphens"?r.push(o.join(":")+" !important"):(n.push(o.join(":")+" !important"),l.includes("stroke")&&i.push(o.join(":")+" !important"),l==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),Rr=s((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=le(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:o}=LX(t);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,stroke:o.get("stroke")||i,seed:n,strokeWidth:1.3},e)},"userNodeOverrides")});var DX,iEe,aEe,sEe,oEe,lEe,RX,p5,MX,i9=_(()=>{"use strict";gt();Qt();it();gd();Xt();Yn();ic();n9();d5();lv();pi();DX=s(async(t,e)=>{V.info("Creating subgraph rect for ",e.id,e);let r=le(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:o}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=Dr(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=hr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await vs(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0}),y=g.getBBox();if(hr(r.flowchart.htmlLabels)){let C=g.children[0],E=Me(g);y=C.getBoundingClientRect(),E.attr("width",y.width),E.attr("height",y.height)}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,k=e.y-x/2;V.trace("Data ",e,JSON.stringify(e));let A;if(e.look==="handDrawn"){let C=Ht.svg(d),E=Rr(e,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),S=C.path(xu(b,k,v,x,0),E);A=d.insert(()=>(V.debug("Rough node insert CXC",S),S),":first-child"),A.select("path:nth-child(2)").attr("style",h.join(";")),A.select("path").attr("style",f.join(";").replace("fill","stroke"))}else A=d.insert("rect",":first-child"),A.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",k).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:w}=Ks(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),l){let C=m.select("span");C&&C.attr("style",l)}let T=A.node().getBBox();return e.offsetX=0,e.width=T.width,e.height=T.height,e.offsetY=y.height-e.padding/2,e.intersect=function(C){return vd(e,C)},{cluster:d,labelBBox:y}},"rect"),iEe=s((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 o=n.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(l){return vd(e,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),aEe=s(async(t,e)=>{let r=le(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=n,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),m=d.node().appendChild(await ac(e.label,e.labelStyle,void 0,!0)),g=m.getBBox();if(hr(r.flowchart.htmlLabels)){let S=m.children[0],R=Me(m);g=S.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}let y=0*e.padding,v=y/2,x=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+y;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+y,k=e.height+y-g.height-6,A=e.x-x/2,w=e.y-b/2;e.width=x;let T=e.y-e.height/2-v+g.height+2,C;if(e.look==="handDrawn"){let S=e.cssClasses.includes("statediagram-cluster-alt"),R=Ht.svg(h),D=e.rx||e.ry?R.path(xu(A,w,x,b,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):R.rectangle(A,w,x,b,{seed:i});C=h.insert(()=>D,":first-child");let L=R.rectangle(A,T,x,k,{fill:S?a:o,fillStyle:S?"hachure":"solid",stroke:u,seed:i});C=h.insert(()=>D,":first-child"),p=h.insert(()=>L)}else C=f.insert("rect",":first-child"),C.attr("class","outer").attr("x",A).attr("y",w).attr("width",x).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",A).attr("y",T).attr("width",x).attr("height",k);d.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(hr(r.flowchart.htmlLabels)?0:3)})`);let E=C.node().getBBox();return e.height=E.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(S){return vd(e,S)},{cluster:h,labelBBox:g}},"roundedWithTitle"),sEe=s((t,e)=>{let r=le(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=o.insert("g",":first-child"),u=0*e.padding,h=e.width+u;e.diff=-e.padding;let f=e.height+u,d=e.x-h/2,p=e.y-f/2;e.width=h;let m;if(e.look==="handDrawn"){let v=Ht.svg(o).rectangle(d,p,h,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});m=o.insert(()=>v,":first-child")}else m=l.insert("rect",":first-child"),m.attr("class","divider").attr("x",d).attr("y",p).attr("width",h).attr("height",f).attr("data-look",e.look);let g=m.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(y){return vd(e,y)},{cluster:o,labelBBox:{}}},"divider"),oEe=DX,lEe={rect:DX,squareRect:oEe,roundedWithTitle:aEe,noteGroup:iEe,divider:sEe},RX=new Map,p5=s(async(t,e)=>{let r=e.shape||"rect",n=await lEe[r](t,e);return RX.set(e.id,n),n},"insertCluster"),MX=s(()=>{RX=new Map},"clear")});function m5(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=g5(t),e=g5(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],o=i-r,l=a-n;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}var Bh,g5,y5,a9=_(()=>{"use strict";Bh={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};s(m5,"calculateDeltaAndAngle");g5=s(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),y5=s(t=>({x:s(function(e,r,n){let i=0;if(r===0&&Object.hasOwn(Bh,t.arrowTypeStart)){let{angle:a,deltaX:o}=m5(n[0],n[1]);i=Bh[t.arrowTypeStart]*Math.cos(a)*(o>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Bh,t.arrowTypeEnd)){let{angle:a,deltaX:o}=m5(n[n.length-1],n[n.length-2]);i=Bh[t.arrowTypeEnd]*Math.cos(a)*(o>=0?1:-1)}return g5(e).x+i},"x"),y:s(function(e,r,n){let i=0;if(r===0&&Object.hasOwn(Bh,t.arrowTypeStart)){let{angle:a,deltaY:o}=m5(n[0],n[1]);i=Bh[t.arrowTypeStart]*Math.abs(Math.sin(a))*(o>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Bh,t.arrowTypeEnd)){let{angle:a,deltaY:o}=m5(n[n.length-1],n[n.length-2]);i=Bh[t.arrowTypeEnd]*Math.abs(Math.sin(a))*(o>=0?1:-1)}return g5(e).y+i},"y")}),"getLineFunctionsWithOffset")});var NX,cEe,IX,OX=_(()=>{"use strict";it();NX=s((t,e,r,n,i)=>{e.arrowTypeStart&&IX(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&IX(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),cEe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},IX=s((t,e,r,n,i,a)=>{let o=cEe[r];if(!o){V.warn(`Unknown arrow type: ${r}`);return}let l=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${o}${l})`)},"addEdgeMarker")});function v5(t,e){le().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function fEe(t){let e=[],r=[];for(let n=1;n<t.length-1;n++){let i=t[n-1],a=t[n],o=t[n+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}var x5,ia,FX,cv,b5,k5,uEe,hEe,PX,BX,dEe,w5,s9=_(()=>{"use strict";gt();Qt();it();ic();pr();a9();gd();Xt();Yn();d5();OX();x5=new Map,ia=new Map,FX=s(()=>{x5.clear(),ia.clear()},"clear"),cv=s(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),b5=s(async(t,e)=>{let r=hr(le().flowchart.htmlLabels),n=await vs(t,e.label,{style:cv(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});V.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 o=n.getBBox();if(r){let u=n.children[0],h=Me(n);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),x5.set(e.id,i),e.width=o.width,e.height=o.height;let l;if(e.startLabelLeft){let u=await ac(e.startLabelLeft,cv(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+")"),ia.get(e.id)||ia.set(e.id,{}),ia.get(e.id).startLeft=h,v5(l,e.startLabelLeft)}if(e.startLabelRight){let u=await ac(e.startLabelRight,cv(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+")"),ia.get(e.id)||ia.set(e.id,{}),ia.get(e.id).startRight=h,v5(l,e.startLabelRight)}if(e.endLabelLeft){let u=await ac(e.endLabelLeft,cv(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),ia.get(e.id)||ia.set(e.id,{}),ia.get(e.id).endLeft=h,v5(l,e.endLabelLeft)}if(e.endLabelRight){let u=await ac(e.endLabelRight,cv(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),ia.get(e.id)||ia.set(e.id,{}),ia.get(e.id).endRight=h,v5(l,e.endLabelRight)}return n},"insertEdgeLabel");s(v5,"setTerminalWidth");k5=s((t,e)=>{V.debug("Moving label abc88 ",t.id,t.label,x5.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=le(),{subGraphTitleTotalMargin:i}=Ks(n);if(t.label){let a=x5.get(t.id),o=t.x,l=t.y;if(r){let u=dt.calcLabelPosition(r);V.debug("Moving label "+t.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+i/2})`)}if(t.startLabelLeft){let a=ia.get(t.id).startLeft,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.startLabelRight){let a=ia.get(t.id).startRight,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.endLabelLeft){let a=ia.get(t.id).endLeft,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.endLabelRight){let a=ia.get(t.id).endRight,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),uEe=s((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),o=t.width/2,l=t.height/2;return i>=o||a>=l},"outsideNode"),hEe=s((t,e,r)=>{V.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),o=t.width/2,l=r.x<e.x?o-a:o+a,u=t.height/2,h=Math.abs(e.y-r.y),f=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*o>Math.abs(n-e.x)*u){let d=r.y<e.y?e.y-u-i:i-u-e.y;l=f*d/h;let p={x:r.x<e.x?r.x+l:r.x-f+l,y:r.y<e.y?r.y+h-d:r.y-h+d};return l===0&&(p.x=e.x,p.y=e.y),f===0&&(p.x=e.x),h===0&&(p.y=e.y),V.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${f}, r ${l}`,p),p}else{r.x<e.x?l=e.x-o-n:l=n-o-e.x;let d=h*l/f,p=r.x<e.x?r.x+f-l:r.x-f+l,m=r.y<e.y?r.y+d:r.y-d;return V.debug(`sides calc abc89, Q ${h}, q ${d}, R ${f}, r ${l}`,{_x:p,_y:m}),l===0&&(p=e.x,m=e.y),f===0&&(p=e.x),h===0&&(m=e.y),{x:p,y:m}}},"intersection"),PX=s((t,e)=>{V.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(V.info("abc88 checking point",a,e),!uEe(e,a)&&!i){let o=hEe(e,n,a);V.debug("abc88 inside",a,n,o),V.debug("abc88 intersection",o,e);let l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?V.warn("abc88 no intersect",o,r):r.push(o),i=!0}else V.warn("abc88 outside",a,n),n=a,i||r.push(a)}),V.debug("returning points",r),r},"cutPathAtIntersect");s(fEe,"extractCornerPoints");BX=s(function(t,e,r){let n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),o=r/a;return{x:e.x-o*n,y:e.y-o*i}},"findAdjacentPoint"),dEe=s(function(t){let{cornerPointPositions:e}=fEe(t),r=[];for(let n=0;n<t.length;n++)if(e.includes(n)){let i=t[n-1],a=t[n+1],o=t[n],l=BX(i,o,5),u=BX(a,o,5),h=u.x-l.x,f=u.y-l.y;r.push(l);let d=Math.sqrt(2)*2,p={x:o.x,y:o.y};if(Math.abs(a.x-i.x)>10&&Math.abs(a.y-i.y)>=10){V.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let m=5;o.x===l.x?p={x:h<0?l.x-m+d:l.x+m-d,y:f<0?l.y-d:l.y+d}:p={x:h<0?l.x-d:l.x+d,y:f<0?l.y-m+d:l.y+m-d}}else V.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(p,u)}else r.push(t[n]);return r},"fixCorners"),w5=s(function(t,e,r,n,i,a,o){let{handDrawnSeed:l}=le(),u=e.points,h=!1,f=i;var d=a;d.intersect&&f.intersect&&(u=u.slice(1,e.points.length-1),u.unshift(f.intersect(u[0])),V.debug("Last point APA12",e.start,"-->",e.end,u[u.length-1],d,d.intersect(u[u.length-1])),u.push(d.intersect(u[u.length-1]))),e.toCluster&&(V.info("to cluster abc88",r.get(e.toCluster)),u=PX(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(V.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(u,null,2)),u=PX(u.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let p=u.filter(E=>!Number.isNaN(E.y));p=dEe(p);let m=p[p.length-1];if(p.length>1){m=p[p.length-1];let E=p[p.length-2],S=(m.x-E.x)/2,R=(m.y-E.y)/2,D={x:E.x+S,y:E.y+R};p.splice(-1,0,D)}let g=hs;e.curve&&(g=e.curve);let{x:y,y:v}=y5(e),x=ra().x(y).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 k,A=x(p),w=Array.isArray(e.style)?e.style:[e.style];if(e.look==="handDrawn"){let E=Ht.svg(t);Object.assign([],p);let S=E.path(A,{roughness:.3,seed:l});b+=" transition",k=Me(S).select("path").attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",w?w.reduce((D,L)=>D+";"+L,""):"");let R=k.attr("d");k.attr("d",R),t.node().appendChild(k.node())}else k=t.append("path").attr("d",A).attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",w?w.reduce((E,S)=>E+";"+S,""):"");let T="";(le().flowchart.arrowMarkerAbsolute||le().state.arrowMarkerAbsolute)&&(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,T=T.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),V.info("arrowTypeStart",e.arrowTypeStart),V.info("arrowTypeEnd",e.arrowTypeEnd),NX(k,e,T,o,n);let C={};return h&&(C.updatedPath=u),C.originalPath=e.points,C},"insertEdge")});var pEe,mEe,gEe,yEe,vEe,xEe,bEe,kEe,wEe,TEe,EEe,T5,o9=_(()=>{"use strict";it();pEe=s((t,e,r,n)=>{e.forEach(i=>{EEe[i](t,r,n)})},"insertMarkers"),mEe=s((t,e,r)=>{V.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"),gEe=s((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"),yEe=s((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"),vEe=s((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"),xEe=s((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"),bEe=s((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"),kEe=s((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"),wEe=s((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"),TEe=s((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"),EEe={extension:mEe,composition:gEe,aggregation:yEe,dependency:vEe,lollipop:xEe,point:bEe,circle:kEe,cross:wEe,barb:TEe},T5=pEe});var Mr,er,gn,Xn=_(()=>{"use strict";ic();gt();Xt();Qt();pr();Mr=s(async(t,e,r)=>{let n,i=e.useHtmlLabels||hr(le().flowchart.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",e.labelStyle),l;e.label===void 0?l="":l=typeof e.label=="string"?e.label:e.label[0];let u;u=await vs(o,$r(Ys(l),le()),{useHtmlLabels:i,width:e.width||le().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle});let h=u.getBBox(),f=e.padding/2;if(hr(le().flowchart.htmlLabels)){let d=u.children[0],p=Me(u),m=d.getElementsByTagName("img");if(m){let g=l.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=le().fontSize?le().fontSize:window.getComputedStyle(document.body).fontSize,A=parseInt(b,10)*5+"px";y.style.minWidth=A,y.style.maxWidth=A}else y.style.width="100%";v(y)}s(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}return i?o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):o.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:h,halfPadding:f,label:o}},"labelHelper"),er=s((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),gn=s((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses")});function CEe(t,e){return t.intersect(e)}var zX,$X=_(()=>{"use strict";s(CEe,"intersectNode");zX=CEe});function SEe(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*o*o),h=Math.abs(e*r*o/u);n.x<i&&(h=-h);var f=Math.abs(e*r*l/u);return n.y<a&&(f=-f),{x:i+h,y:a+f}}var E5,l9=_(()=>{"use strict";s(SEe,"intersectEllipse");E5=SEe});function _Ee(t,e,r){return E5(t,e,e,r)}var GX,VX=_(()=>{"use strict";l9();s(_Ee,"intersectCircle");GX=_Ee});function AEe(t,e,r,n){var i,a,o,l,u,h,f,d,p,m,g,y,v,x,b;if(i=e.y-t.y,o=t.x-e.x,u=e.x*t.y-t.x*e.y,p=i*r.x+o*r.y+u,m=i*n.x+o*n.y+u,!(p!==0&&m!==0&&UX(p,m))&&(a=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=a*t.x+l*t.y+h,d=a*e.x+l*e.y+h,!(f!==0&&d!==0&&UX(f,d))&&(g=i*l-a*o,g!==0)))return y=Math.abs(g/2),v=o*h-l*u,x=v<0?(v-y)/g:(v+y)/g,v=a*u-i*h,b=v<0?(v-y)/g:(v+y)/g,{x,y:b}}function UX(t,e){return t*e>0}var qX,WX=_(()=>{"use strict";s(AEe,"intersectLine");s(UX,"sameSign");qX=AEe});function LEe(t,e,r){let n=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(f){o=Math.min(o,f.x),l=Math.min(l,f.y)}):(o=Math.min(o,e.x),l=Math.min(l,e.y));let u=n-t.width/2-o,h=i-t.height/2-l;for(let f=0;f<e.length;f++){let d=e[f],p=e[f<e.length-1?f+1:0],m=qX(t,r,{x:u+d.x,y:h+d.y},{x:u+p.x,y:h+p.y});m&&a.push(m)}return a.length?(a.length>1&&a.sort(function(f,d){let p=f.x-r.x,m=f.y-r.y,g=Math.sqrt(p*p+m*m),y=d.x-r.x,v=d.y-r.y,x=Math.sqrt(y*y+v*v);return g<x?-1:g===x?0:1}),a[0]):t}var HX,YX=_(()=>{"use strict";WX();s(LEe,"intersectPolygon");HX=LEe});var tr,ii=_(()=>{"use strict";$X();VX();l9();YX();n9();tr={node:zX,circle:GX,ellipse:E5,polygon:HX,rect:vd}});var xd,uv=_(()=>{"use strict";Xn();ii();lv();pi();Yn();xd=s(async(t,e,r)=>{let{labelStyles:n,nodeStyles:i}=Dr(e);e.labelStyle=n;let{shapeSvg:a,bbox:o}=await Mr(t,e,gn(e)),l=Math.max(o.width+r.labelPaddingX*2,e?.width||0),u=Math.max(o.height+r.labelPaddingY*2,e?.height||0),h=-l/2,f=-u/2,d,{rx:p,ry:m}=e,{cssStyles:g}=e;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),e.look==="handDrawn"){let y=Ht.svg(a),v=Rr(e,{}),x=p||m?y.path(xu(h,f,l,u,p||0),v):y.rectangle(h,f,l,u,v);d=a.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",g)}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",i).attr("rx",p).attr("data-id","abc").attr("data-et","node").attr("ry",m).attr("x",h).attr("y",f).attr("width",l).attr("height",u);return er(e,d),e.intersect=function(y){return tr.rect(e,y)},a},"drawRect")});var XX,jX=_(()=>{"use strict";uv();XX=s(async(t,e)=>xd(t,e,{rx:5,ry:5,classes:"flowchart-node"}),"state")});var KX,QX=_(()=>{"use strict";uv();KX=s(async(t,e)=>{let r={rx:5,ry:5,classes:"",labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return xd(t,e,r)},"roundedRect")});var ZX,JX=_(()=>{"use strict";uv();ZX=s(async(t,e)=>{let r={rx:0,ry:0,classes:"",labelPaddingX:(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return xd(t,e,r)},"squareRect")});var ej,tj=_(()=>{"use strict";Xn();ii();Yn();pi();gt();ej=s((t,e)=>{let{themeVariables:r}=le(),{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if(e.look==="handDrawn"){let l=Ht.svg(i).circle(0,0,14,bu(n));a=i.insert(()=>l)}else a=i.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),er(e,a),e.intersect=function(o){return tr.circle(e,7,o)},i},"stateStart")});var rj,nj=_(()=>{"use strict";Xn();ii();Yn();pi();gt();rj=s((t,e)=>{let{themeVariables:r}=le(),{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a,o;if(e.look==="handDrawn"){let l=Ht.svg(i),u=l.circle(0,0,14,{...bu(n),roughness:.5}),h=l.circle(0,0,5,{...bu(n),fillStyle:"solid"});a=i.insert(()=>u),o=i.insert(()=>h)}else o=i.insert("circle",":first-child"),a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),o.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10);return er(e,a),e.intersect=function(l){return tr.circle(e,7,l)},i},"stateEnd")});var c9,ij=_(()=>{"use strict";Xn();ii();Yn();pi();gt();c9=s((t,e,r)=>{let{themeVariables:n}=le(),{lineColor:i}=n,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),o=70,l=10;r==="LR"&&(o=10,l=70);let u=-1*o/2,h=-1*l/2,f;if(e.look==="handDrawn"){let y=Ht.svg(a).rectangle(u,h,o,l,bu(i));f=a.insert(()=>y)}else f=a.append("rect").attr("x",u).attr("y",h).attr("width",o).attr("height",l).attr("class","fork-join");er(e,f);let d=0,p=0,m=10;return e.height&&(d=e.height),e.width&&(p=e.width),e.padding&&(m=e.padding),e.height=d+m/2,e.width=p+m/2,e.intersect=function(g){return tr.rect(e,g)},a},"forkJoin")});var aj,sj=_(()=>{"use strict";ii();Yn();pi();gt();aj=s((t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{themeVariables:i}=le(),{lineColor:a}=i,o=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),l=28,u=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],h;if(e.look==="handDrawn"){let f=Ht.svg(o),d=u.map(function(m){return[m.x,m.y]}),p=f.polygon(d,bu(a));h=o.insert(()=>p)}else h=o.insert("polygon",":first-child").attr("points",u.map(function(f){return f.x+","+f.y}).join(" "));return h.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28).attr("style",n),e.width=28,e.height=28,e.intersect=function(f){return tr.circle(e,14,f)},o},"choice")});var oj,lj=_(()=>{"use strict";it();Xn();ii();gt();Yn();oj=s(async(t,e)=>{let{themeVariables:r,handDrawnSeed:n}=le(),{noteBorderColor:i,noteBkgColor:a}=r;e.useHtmlLabels||(e.centerLabel=!0);let{shapeSvg:l,bbox:u}=await Mr(t,e,"node "+e.cssClasses);V.info("Classes = ",e.cssClasses);let{cssStyles:h}=e,f,d=u.width+e.padding,p=u.height+e.padding,m=-d/2,g=-p/2;if(e.look==="handDrawn"){let v=Ht.svg(l).rectangle(m,g,d,p,{roughness:.7,fill:a,fillWeight:3,seed:n,stroke:i});f=l.insert(()=>v,":first-child"),f.attr("class","basic label-container").attr("style",h)}else f=l.insert("rect",":first-child"),f.attr("rx",e.rx).attr("ry",e.ry).attr("x",m).attr("y",g).attr("width",d).attr("height",p);return er(e,f),e.intersect=function(y){return tr.rect(e,y)},l},"note")});var cj,uj=_(()=>{"use strict";Xn();ii();pi();Yn();lv();cj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.height+e.padding,l=a.width+o/4+e.padding,u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Ht.svg(i),d=Rr(e,{}),p=xu(-l/2,-o/2,l,o,o/2),m=f.path(p,d);u=i.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",h)}else u=i.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",o/2).attr("ry",o/2).attr("x",-l/2).attr("y",-o/2).attr("width",l).attr("height",o);return er(e,u),e.intersect=function(f){return tr.rect(e,f)},i},"stadium")});var hj,fj=_(()=>{"use strict";Xt();Qt();Xn();d5();ii();pi();Yn();gt();lv();it();hj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(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),o=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",n),u=e.description,h=e.label,f=l.node().appendChild(await ac(h,e.labelStyle,!0,!0)),d={width:0,height:0};if(hr(le()?.flowchart?.htmlLabels)){let E=f.children[0],S=Me(f);d=E.getBoundingClientRect(),S.attr("width",d.width),S.attr("height",d.height)}V.info("Text 2",u);let p=u||[],m=f.getBBox(),g=l.node().appendChild(await ac(p.join?p.join("<br/>"):p,e.labelStyle,!0,!0)),y=g.children[0],v=Me(g);d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height);let x=(e.padding||0)/2;Me(g).attr("transform","translate( "+(d.width>m.width?0:(m.width-d.width)/2)+", "+(m.height+x+5)+")"),Me(f).attr("transform","translate( "+(d.width<m.width?0:-(m.width-d.width)/2)+", 0)"),d=l.node().getBBox(),l.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");let b=d.width+(e.padding||0),k=d.height+(e.padding||0),A=-d.width/2-x,w=-d.height/2-x,T,C;if(e.look==="handDrawn"){let E=Ht.svg(a),S=Rr(e,{}),R=E.path(xu(A,w,b,k,e.rx||0),S),D=E.line(-d.width/2-x,-d.height/2-x+m.height+x,d.width/2+x,-d.height/2-x+m.height+x,S);C=a.insert(()=>(V.debug("Rough node insert CXC",R),D),":first-child"),T=a.insert(()=>(V.debug("Rough node insert CXC",R),R),":first-child")}else T=o.insert("rect",":first-child"),C=o.insert("line"),T.attr("class","outer title-state").attr("style",n).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),C.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+m.height+x).attr("y2",-d.height/2-x+m.height+x);return er(e,T),e.intersect=function(E){return tr.rect(e,E)},a},"rectWithTitle")});function Ea(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+")")}var ku=_(()=>{"use strict";s(Ea,"insertPolygonShape")});var dj,pj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();dj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=(e?.padding||0)/2,l=a.width+e.padding,u=a.height+e.padding,h=-a.width/2-o,f=-a.height/2-o,d=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(e.look==="handDrawn"){let p=Ht.svg(i),m=Rr(e,{}),g=p.rectangle(h-8,f,l+16,u,m),y=p.line(h,f,h,f+u,m),v=p.line(h+l,f,h+l,f+u,m);i.insert(()=>y,":first-child"),i.insert(()=>v,":first-child");let x=i.insert(()=>g,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",b),er(e,x)}else{let p=Ea(i,l,u,d);n&&p.attr("style",n),er(e,p)}return e.intersect=function(p){return tr.polygon(e,d,p)},i},"subroutine")});var DEe,REe,MEe,mj,gj=_(()=>{"use strict";Xn();ii();pi();Yn();DEe=s((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"),REe=s((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"),MEe=s((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=o/2,u=l/(2.5+o/50),h=a.height+u+e.padding,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Ht.svg(i),m=REe(0,0,o,h,l,u),g=MEe(0,u,o,h,l,u),y=p.path(m,Rr(e,{})),v=p.path(g,Rr(e,{fill:"none"}));f=i.insert(()=>v,":first-child"),f=i.insert(()=>y,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{let p=DEe(0,0,o,h,l,u);f=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",d).attr("style",n)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),er(e,f),e.intersect=function(p){let m=tr.rect(e,p),g=m.x-(e.x??0);if(l!=0&&(Math.abs(g)<(e.width??0)/2||Math.abs(g)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-u)){let y=u*u*(1-g*g/(l*l));y>0&&(y=Math.sqrt(y)),y=u-y,p.y-(e.y??0)>0&&(y=-y),m.y+=y}return m},i},"cylinder")});var yj,vj=_(()=>{"use strict";it();Xn();ii();pi();Yn();yj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:o}=await Mr(t,e,gn(e)),l=a.width/2+o,u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Ht.svg(i),d=Rr(e,{}),p=f.circle(0,0,l*2,d);u=i.insert(()=>p,":first-child"),u.attr("class","basic label-container").attr("style",h)}else u=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0);return er(e,u),e.intersect=function(f){return V.info("Circle intersect",e,l,f),tr.circle(e,l,f)},i},"circle")});var xj,bj=_(()=>{"use strict";it();Xn();ii();pi();Yn();xj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:o}=await Mr(t,e,gn(e)),u=a.width/2+o+5,h=a.width/2+o,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Ht.svg(i),m=Rr(e,{roughness:.2,strokeWidth:2.5}),g=Rr(e,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,m),v=p.circle(0,0,h*2,g);f=i.insert("g",":first-child"),f.attr("class",e.cssClasses).attr("style",d),f.node()?.appendChild(y),f.node()?.appendChild(v)}else{f=i.insert("g",":first-child");let p=f.insert("circle",":first-child"),m=f.insert("circle");f.attr("class","basic label-container").attr("style",n),p.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0)}return er(e,f),e.intersect=function(p){return V.info("DoubleCircle intersect",e,u,p),tr.circle(e,u,p)},i},"doublecircle")});var IEe,kj,wj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();IEe=s((t,e,r,n)=>[`M${t-n/2},${e}`,`L${t+r},${e}`,`L${t+r},${e-n}`,`L${t-n/2},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createPolygonPathD"),kj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=[{x:-l/2,y:0},{x:o,y:0},{x:o,y:-l},{x:-l/2,y:-l},{x:0,y:-l/2}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ht.svg(i),p=Rr(e,{}),m=IEe(0,0,o,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ea(i,o,l,u);return n&&h.attr("style",n),e.width=o+l,e.height=l,er(e,h),e.intersect=function(d){return tr.polygon(e,u,d)},i},"rect_left_inv_arrow")});var NEe,Tj,Ej=_(()=>{"use strict";it();Xn();ii();pi();Yn();ku();NEe=s((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"),Tj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=o+l,h=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Ht.svg(i),m=Rr(e,{}),g=NEe(0,0,u),y=p.path(g,m);f=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`),d&&f.attr("style",d)}else f=Ea(i,u,u,h);return n&&f.attr("style",n),er(e,f),e.intersect=function(p){return V.debug(`APA12 Intersect called SPLIT
point:`,p,`
node:
`,e,`
res:`,tr.polygon(e,h,p)),tr.polygon(e,h,p)},i},"question")});var OEe,Cj,Sj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();OEe=s((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD"),Cj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=4,l=a.height+e.padding,u=l/o,h=a.width+2*u+e.padding,f=[{x:u,y:0},{x:h-u,y:0},{x:h,y:-l/2},{x:h-u,y:-l},{x:u,y:-l},{x:0,y:-l/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=Ht.svg(i),g=Rr(e,{}),y=OEe(0,0,h,l,u),v=m.path(y,g);d=i.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${l/2})`),p&&d.attr("style",p)}else d=Ea(i,h,l,f);return n&&d.attr("style",n),e.width=h,e.height=l,er(e,d),e.intersect=function(m){return tr.polygon(e,f,m)},i},"hexagon")});var PEe,_j,Aj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();PEe=s((t,e,r,n)=>[`M${t-2*n/6},${e}`,`L${t+r-n/6},${e}`,`L${t+r+2*n/6},${e-n}`,`L${t+n/6},${e-n}`,"Z"].join(" "),"createLeanRightPathD"),_j=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=[{x:-2*l/6,y:0},{x:o-l/6,y:0},{x:o+2*l/6,y:-l},{x:l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ht.svg(i),p=Rr(e,{}),m=PEe(0,0,o,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ea(i,o,l,u);return n&&h.attr("style",n),e.width=o,e.height=l,er(e,h),e.intersect=function(d){return tr.polygon(e,u,d)},i},"lean_right")});var BEe,Lj,Dj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();BEe=s((t,e,r,n)=>[`M${t+2*n/6},${e}`,`L${t+r+n/6},${e}`,`L${t+r-2*n/6},${e-n}`,`L${t-n/6},${e-n}`,"Z"].join(" "),"createLeanLeftPathD"),Lj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=[{x:2*l/6,y:0},{x:o+l/6,y:0},{x:o-2*l/6,y:-l},{x:-l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ht.svg(i),p=Rr(e,{}),m=BEe(0,0,o,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ea(i,o,l,u);return n&&h.attr("style",n),e.width=o,e.height=l,er(e,h),e.intersect=function(d){return tr.polygon(e,u,d)},i},"lean_left")});var FEe,Rj,Mj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();FEe=s((t,e,r,n)=>[`M${t-2*n/6},${e}`,`L${t+r+2*n/6},${e}`,`L${t+r-n/6},${e-n}`,`L${t+n/6},${e-n}`,"Z"].join(" "),"createTrapezoidPathD"),Rj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=[{x:-2*l/6,y:0},{x:o+2*l/6,y:0},{x:o-l/6,y:-l},{x:l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ht.svg(i),p=Rr(e,{}),m=FEe(0,0,o,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ea(i,o,l,u);return n&&h.attr("style",n),e.width=o,e.height=l,er(e,h),e.intersect=function(d){return tr.polygon(e,u,d)},i},"trapezoid")});var zEe,Ij,Nj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();zEe=s((t,e,r,n)=>[`M${t+n/6},${e}`,`L${t+r-n/6},${e}`,`L${t+r+2*n/6},${e-n}`,`L${t-2*n/6},${e-n}`,"Z"].join(" "),"createInvertedTrapezoidPathD"),Ij=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=[{x:l/6,y:0},{x:o-l/6,y:0},{x:o+2*l/6,y:-l},{x:-2*l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ht.svg(i),p=Rr(e,{}),m=zEe(0,0,o,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ea(i,o,l,u);return n&&h.attr("style",n),e.width=o,e.height=l,er(e,h),e.intersect=function(d){return tr.polygon(e,u,d)},i},"inv_trapezoid")});var Oj,Pj=_(()=>{"use strict";uv();Xn();ii();Oj=s(async(t,e)=>{let{shapeSvg:r}=await Mr(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),er(e,n),e.intersect=function(o){return tr.rect(e,o)},r},"labelRect")});var Bj,tm,C5,Fj,zj,u9,h9=_(()=>{"use strict";it();jX();QX();JX();tj();nj();ij();sj();lj();uj();fj();gt();pj();gj();vj();bj();wj();Ej();Sj();Aj();Dj();Mj();Nj();Pj();Bj={state:XX,stateStart:ej,stateEnd:rj,fork:c9,join:c9,choice:aj,note:oj,roundedRect:KX,rectWithTitle:hj,squareRect:ZX,stadium:cj,subroutine:dj,cylinder:mj,circle:yj,doublecircle:xj,odd:kj,diamond:Tj,hexagon:Cj,lean_right:_j,lean_left:Lj,trapezoid:Rj,inv_trapezoid:Ij,labelRect:Oj},tm=new Map,C5=s(async(t,e,r)=>{let n,i;if(e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect"),e.link){let a;le().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 Bj[e.shape](n,e,r)}else i=await Bj[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),tm.set(e.id,n),e.haveCallback&&tm.get(e.id).attr("class",tm.get(e.id).attr("class")+" clickable"),n},"insertNode"),Fj=s((t,e)=>{tm.set(e.id,t)},"setNodeElem"),zj=s(()=>{tm.clear()},"clear"),u9=s(t=>{let e=tm.get(t.id);V.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")});var $j,Gj=_(()=>{"use strict";zs();Qt();it();i9();s9();o9();h9();Xn();pr();$j={common:$e,getConfig:_r,insertCluster:p5,insertEdge:w5,insertEdgeLabel:b5,insertMarkers:T5,insertNode:C5,interpolateToCurve:Wp,labelHelper:Mr,log:V,positionEdgeLabel:k5}});function GEe(t){return typeof t=="symbol"||Fn(t)&&na(t)==$Ee}var $Ee,Zs,bd=_(()=>{"use strict";fu();ko();$Ee="[object Symbol]";s(GEe,"isSymbol");Zs=GEe});function VEe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var bs,kd=_(()=>{"use strict";s(VEe,"arrayMap");bs=VEe});function qj(t){if(typeof t=="string")return t;if(ct(t))return bs(t,qj)+"";if(Zs(t))return Uj?Uj.call(t):"";var e=t+"";return e=="0"&&1/t==-UEe?"-0":e}var UEe,Vj,Uj,Wj,Hj=_(()=>{"use strict";sd();kd();Dn();bd();UEe=1/0,Vj=qi?qi.prototype:void 0,Uj=Vj?Vj.toString:void 0;s(qj,"baseToString");Wj=qj});function WEe(t){for(var e=t.length;e--&&qEe.test(t.charAt(e)););return e}var qEe,Yj,Xj=_(()=>{"use strict";qEe=/\s/;s(WEe,"trimmedEndIndex");Yj=WEe});function YEe(t){return t&&t.slice(0,Yj(t)+1).replace(HEe,"")}var HEe,jj,Kj=_(()=>{"use strict";Xj();HEe=/^\s+/;s(YEe,"baseTrim");jj=YEe});function ZEe(t){if(typeof t=="number")return t;if(Zs(t))return Qj;if(on(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=on(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=jj(t);var r=jEe.test(t);return r||KEe.test(t)?QEe(t.slice(2),r?2:8):XEe.test(t)?Qj:+t}var Qj,XEe,jEe,KEe,QEe,Zj,Jj=_(()=>{"use strict";Kj();Ws();bd();Qj=NaN,XEe=/^[-+]0x[0-9a-f]+$/i,jEe=/^0b[01]+$/i,KEe=/^0o[0-7]+$/i,QEe=parseInt;s(ZEe,"toNumber");Zj=ZEe});function eCe(t){if(!t)return t===0?t:0;if(t=Zj(t),t===eK||t===-eK){var e=t<0?-1:1;return e*JEe}return t===t?t:0}var eK,JEe,rm,f9=_(()=>{"use strict";Jj();eK=1/0,JEe=17976931348623157e292;s(eCe,"toFinite");rm=eCe});function tCe(t){var e=rm(t),r=e%1;return e===e?r?e-r:e:0}var sc,nm=_(()=>{"use strict";f9();s(tCe,"toInteger");sc=tCe});var rCe,S5,tK=_(()=>{"use strict";Sh();xo();rCe=fs(Wn,"WeakMap"),S5=rCe});function nCe(){}var zn,d9=_(()=>{"use strict";s(nCe,"noop");zn=nCe});function iCe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var _5,p9=_(()=>{"use strict";s(iCe,"arrayEach");_5=iCe});function aCe(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}var A5,m9=_(()=>{"use strict";s(aCe,"baseFindIndex");A5=aCe});function sCe(t){return t!==t}var rK,nK=_(()=>{"use strict";s(sCe,"baseIsNaN");rK=sCe});function oCe(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var iK,aK=_(()=>{"use strict";s(oCe,"strictIndexOf");iK=oCe});function lCe(t,e,r){return e===e?iK(t,e,r):A5(t,rK,r)}var im,L5=_(()=>{"use strict";m9();nK();aK();s(lCe,"baseIndexOf");im=lCe});function cCe(t,e){var r=t==null?0:t.length;return!!r&&im(t,e,0)>-1}var D5,g9=_(()=>{"use strict";L5();s(cCe,"arrayIncludes");D5=cCe});var uCe,sK,oK=_(()=>{"use strict";X_();uCe=L3(Object.keys,Object),sK=uCe});function dCe(t){if(!ec(t))return sK(t);var e=[];for(var r in Object(t))fCe.call(t,r)&&r!="constructor"&&e.push(r);return e}var hCe,fCe,am,R5=_(()=>{"use strict";zp();oK();hCe=Object.prototype,fCe=hCe.hasOwnProperty;s(dCe,"baseKeys");am=dCe});function pCe(t){return Hn(t)?N3(t):am(t)}var kr,oc=_(()=>{"use strict";J_();R5();wo();s(pCe,"keys");kr=pCe});var mCe,gCe,yCe,aa,lK=_(()=>{"use strict";Up();hd();nA();wo();zp();oc();mCe=Object.prototype,gCe=mCe.hasOwnProperty,yCe=B3(function(t,e){if(ec(e)||Hn(e)){Co(e,kr(e),t);return}for(var r in e)gCe.call(e,r)&&tc(t,r,e[r])}),aa=yCe});function bCe(t,e){if(ct(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Zs(t)?!0:xCe.test(t)||!vCe.test(t)||e!=null&&t in Object(e)}var vCe,xCe,sm,M5=_(()=>{"use strict";Dn();bd();vCe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xCe=/^\w*$/;s(bCe,"isKey");sm=bCe});function wCe(t){var e=Rp(t,function(n){return r.size===kCe&&r.clear(),n}),r=e.cache;return e}var kCe,cK,uK=_(()=>{"use strict";G_();kCe=500;s(wCe,"memoizeCapped");cK=wCe});var TCe,ECe,CCe,hK,fK=_(()=>{"use strict";uK();TCe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ECe=/\\(\\)?/g,CCe=cK(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(TCe,function(r,n,i,a){e.push(i?a.replace(ECe,"$1"):n||r)}),e}),hK=CCe});function SCe(t){return t==null?"":Wj(t)}var I5,y9=_(()=>{"use strict";Hj();s(SCe,"toString");I5=SCe});function _Ce(t,e){return ct(t)?t:sm(t,e)?[t]:hK(I5(t))}var Fh,hv=_(()=>{"use strict";Dn();M5();fK();y9();s(_Ce,"castPath");Fh=_Ce});function LCe(t){if(typeof t=="string"||Zs(t))return t;var e=t+"";return e=="0"&&1/t==-ACe?"-0":e}var ACe,lc,om=_(()=>{"use strict";bd();ACe=1/0;s(LCe,"toKey");lc=LCe});function DCe(t,e){e=Fh(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[lc(e[r++])];return r&&r==n?t:void 0}var zh,fv=_(()=>{"use strict";hv();om();s(DCe,"baseGet");zh=DCe});function RCe(t,e,r){var n=t==null?void 0:zh(t,e);return n===void 0?r:n}var dK,pK=_(()=>{"use strict";fv();s(RCe,"get");dK=RCe});function MCe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var lm,N5=_(()=>{"use strict";s(MCe,"arrayPush");lm=MCe});function ICe(t){return ct(t)||cl(t)||!!(mK&&t&&t[mK])}var mK,gK,yK=_(()=>{"use strict";sd();$p();Dn();mK=qi?qi.isConcatSpreadable:void 0;s(ICe,"isFlattenable");gK=ICe});function vK(t,e,r,n,i){var a=-1,o=t.length;for(r||(r=gK),i||(i=[]);++a<o;){var l=t[a];e>0&&r(l)?e>1?vK(l,e-1,r,n,i):lm(i,l):n||(i[i.length]=l)}return i}var cc,cm=_(()=>{"use strict";N5();yK();s(vK,"baseFlatten");cc=vK});function NCe(t){var e=t==null?0:t.length;return e?cc(t,1):[]}var Ir,O5=_(()=>{"use strict";cm();s(NCe,"flatten");Ir=NCe});function OCe(t){return P3(O3(t,void 0,Ir),t+"")}var xK,bK=_(()=>{"use strict";O5();eA();rA();s(OCe,"flatRest");xK=OCe});function PCe(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<i;)a[n]=t[n+e];return a}var P5,v9=_(()=>{"use strict";s(PCe,"baseSlice");P5=PCe});function WCe(t){return qCe.test(t)}var BCe,FCe,zCe,$Ce,GCe,VCe,UCe,qCe,kK,wK=_(()=>{"use strict";BCe="\\ud800-\\udfff",FCe="\\u0300-\\u036f",zCe="\\ufe20-\\ufe2f",$Ce="\\u20d0-\\u20ff",GCe=FCe+zCe+$Ce,VCe="\\ufe0e\\ufe0f",UCe="\\u200d",qCe=RegExp("["+UCe+BCe+GCe+VCe+"]");s(WCe,"hasUnicode");kK=WCe});function HCe(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r}var TK,EK=_(()=>{"use strict";s(HCe,"arrayReduce");TK=HCe});function YCe(t,e){return t&&Co(e,kr(e),t)}var CK,SK=_(()=>{"use strict";hd();oc();s(YCe,"baseAssign");CK=YCe});function XCe(t,e){return t&&Co(e,ds(e),t)}var _K,AK=_(()=>{"use strict";hd();Ih();s(XCe,"baseAssignIn");_K=XCe});function jCe(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}var um,B5=_(()=>{"use strict";s(jCe,"arrayFilter");um=jCe});function KCe(){return[]}var F5,x9=_(()=>{"use strict";s(KCe,"stubArray");F5=KCe});var QCe,ZCe,LK,JCe,hm,z5=_(()=>{"use strict";B5();x9();QCe=Object.prototype,ZCe=QCe.propertyIsEnumerable,LK=Object.getOwnPropertySymbols,JCe=LK?function(t){return t==null?[]:(t=Object(t),um(LK(t),function(e){return ZCe.call(t,e)}))}:F5,hm=JCe});function eSe(t,e){return Co(t,hm(t),e)}var DK,RK=_(()=>{"use strict";hd();z5();s(eSe,"copySymbols");DK=eSe});var tSe,rSe,$5,b9=_(()=>{"use strict";N5();D3();z5();x9();tSe=Object.getOwnPropertySymbols,rSe=tSe?function(t){for(var e=[];t;)lm(e,hm(t)),t=Fp(t);return e}:F5,$5=rSe});function nSe(t,e){return Co(t,$5(t),e)}var MK,IK=_(()=>{"use strict";hd();b9();s(nSe,"copySymbolsIn");MK=nSe});function iSe(t,e,r){var n=e(t);return ct(t)?n:lm(n,r(t))}var G5,k9=_(()=>{"use strict";N5();Dn();s(iSe,"baseGetAllKeys");G5=iSe});function aSe(t){return G5(t,kr,hm)}var dv,w9=_(()=>{"use strict";k9();z5();oc();s(aSe,"getAllKeys");dv=aSe});function sSe(t){return G5(t,ds,$5)}var V5,T9=_(()=>{"use strict";k9();b9();Ih();s(sSe,"getAllKeysIn");V5=sSe});var oSe,U5,NK=_(()=>{"use strict";Sh();xo();oSe=fs(Wn,"DataView"),U5=oSe});var lSe,q5,OK=_(()=>{"use strict";Sh();xo();lSe=fs(Wn,"Promise"),q5=lSe});var cSe,$h,E9=_(()=>{"use strict";Sh();xo();cSe=fs(Wn,"Set"),$h=cSe});var PK,uSe,BK,FK,zK,$K,hSe,fSe,dSe,pSe,mSe,wd,Js,Td=_(()=>{"use strict";NK();w3();OK();E9();tK();fu();F_();PK="[object Map]",uSe="[object Object]",BK="[object Promise]",FK="[object Set]",zK="[object WeakMap]",$K="[object DataView]",hSe=du(U5),fSe=du(Lh),dSe=du(q5),pSe=du($h),mSe=du(S5),wd=na;(U5&&wd(new U5(new ArrayBuffer(1)))!=$K||Lh&&wd(new Lh)!=PK||q5&&wd(q5.resolve())!=BK||$h&&wd(new $h)!=FK||S5&&wd(new S5)!=zK)&&(wd=s(function(t){var e=na(t),r=e==uSe?t.constructor:void 0,n=r?du(r):"";if(n)switch(n){case hSe:return $K;case fSe:return PK;case dSe:return BK;case pSe:return FK;case mSe:return zK}return e},"getTag"));Js=wd});function vSe(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&ySe.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var gSe,ySe,GK,VK=_(()=>{"use strict";gSe=Object.prototype,ySe=gSe.hasOwnProperty;s(vSe,"initCloneArray");GK=vSe});function xSe(t,e){var r=e?Bp(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var UK,qK=_(()=>{"use strict";S3();s(xSe,"cloneDataView");UK=xSe});function kSe(t){var e=new t.constructor(t.source,bSe.exec(t));return e.lastIndex=t.lastIndex,e}var bSe,WK,HK=_(()=>{"use strict";bSe=/\w*$/;s(kSe,"cloneRegExp");WK=kSe});function wSe(t){return XK?Object(XK.call(t)):{}}var YK,XK,jK,KK=_(()=>{"use strict";sd();YK=qi?qi.prototype:void 0,XK=YK?YK.valueOf:void 0;s(wSe,"cloneSymbol");jK=wSe});function VSe(t,e,r){var n=t.constructor;switch(e){case RSe:return Bp(t);case TSe:case ESe:return new n(+t);case MSe:return UK(t,r);case ISe:case NSe:case OSe:case PSe:case BSe:case FSe:case zSe:case $Se:case GSe:return _3(t,r);case CSe:return new n;case SSe:case LSe:return new n(t);case _Se:return WK(t);case ASe:return new n;case DSe:return jK(t)}}var TSe,ESe,CSe,SSe,_Se,ASe,LSe,DSe,RSe,MSe,ISe,NSe,OSe,PSe,BSe,FSe,zSe,$Se,GSe,QK,ZK=_(()=>{"use strict";S3();qK();HK();KK();H_();TSe="[object Boolean]",ESe="[object Date]",CSe="[object Map]",SSe="[object Number]",_Se="[object RegExp]",ASe="[object Set]",LSe="[object String]",DSe="[object Symbol]",RSe="[object ArrayBuffer]",MSe="[object DataView]",ISe="[object Float32Array]",NSe="[object Float64Array]",OSe="[object Int8Array]",PSe="[object Int16Array]",BSe="[object Int32Array]",FSe="[object Uint8Array]",zSe="[object Uint8ClampedArray]",$Se="[object Uint16Array]",GSe="[object Uint32Array]";s(VSe,"initCloneByTag");QK=VSe});function qSe(t){return Fn(t)&&Js(t)==USe}var USe,JK,eQ=_(()=>{"use strict";Td();ko();USe="[object Map]";s(qSe,"baseIsMap");JK=qSe});var tQ,WSe,rQ,nQ=_(()=>{"use strict";eQ();ud();Uy();tQ=Eo&&Eo.isMap,WSe=tQ?To(tQ):JK,rQ=WSe});function YSe(t){return Fn(t)&&Js(t)==HSe}var HSe,iQ,aQ=_(()=>{"use strict";Td();ko();HSe="[object Set]";s(YSe,"baseIsSet");iQ=YSe});var sQ,XSe,oQ,lQ=_(()=>{"use strict";aQ();ud();Uy();sQ=Eo&&Eo.isSet,XSe=sQ?To(sQ):iQ,oQ=XSe});function W5(t,e,r,n,i,a){var o,l=e&jSe,u=e&KSe,h=e&QSe;if(r&&(o=i?r(t,n,i,a):r(t)),o!==void 0)return o;if(!on(t))return t;var f=ct(t);if(f){if(o=GK(t),!l)return A3(t,o)}else{var d=Js(t),p=d==uQ||d==r8e;if(ul(t))return C3(t,l);if(d==hQ||d==cQ||p&&!i){if(o=u||p?{}:R3(t),!l)return u?MK(t,_K(o,t)):DK(t,CK(o,t))}else{if(!yn[d])return i?t:{};o=QK(t,d,l)}}a||(a=new Zl);var m=a.get(t);if(m)return m;a.set(t,o),oQ(t)?t.forEach(function(v){o.add(W5(v,e,r,v,t,a))}):rQ(t)&&t.forEach(function(v,x){o.set(x,W5(v,e,r,x,t,a))});var g=h?u?V5:dv:u?ds:kr,y=f?void 0:g(t);return _5(y||t,function(v,x){y&&(x=v,v=t[x]),tc(o,x,W5(v,e,r,x,t,a))}),o}var jSe,KSe,QSe,cQ,ZSe,JSe,e8e,t8e,uQ,r8e,n8e,i8e,hQ,a8e,s8e,o8e,l8e,c8e,u8e,h8e,f8e,d8e,p8e,m8e,g8e,y8e,v8e,x8e,b8e,yn,H5,C9=_(()=>{"use strict";$y();p9();Up();SK();AK();q_();Y_();RK();IK();w9();T9();Td();VK();ZK();j_();Dn();Vp();nQ();Ws();lQ();oc();Ih();jSe=1,KSe=2,QSe=4,cQ="[object Arguments]",ZSe="[object Array]",JSe="[object Boolean]",e8e="[object Date]",t8e="[object Error]",uQ="[object Function]",r8e="[object GeneratorFunction]",n8e="[object Map]",i8e="[object Number]",hQ="[object Object]",a8e="[object RegExp]",s8e="[object Set]",o8e="[object String]",l8e="[object Symbol]",c8e="[object WeakMap]",u8e="[object ArrayBuffer]",h8e="[object DataView]",f8e="[object Float32Array]",d8e="[object Float64Array]",p8e="[object Int8Array]",m8e="[object Int16Array]",g8e="[object Int32Array]",y8e="[object Uint8Array]",v8e="[object Uint8ClampedArray]",x8e="[object Uint16Array]",b8e="[object Uint32Array]",yn={};yn[cQ]=yn[ZSe]=yn[u8e]=yn[h8e]=yn[JSe]=yn[e8e]=yn[f8e]=yn[d8e]=yn[p8e]=yn[m8e]=yn[g8e]=yn[n8e]=yn[i8e]=yn[hQ]=yn[a8e]=yn[s8e]=yn[o8e]=yn[l8e]=yn[y8e]=yn[v8e]=yn[x8e]=yn[b8e]=!0;yn[t8e]=yn[uQ]=yn[c8e]=!1;s(W5,"baseClone");H5=W5});function w8e(t){return H5(t,k8e)}var k8e,Hr,S9=_(()=>{"use strict";C9();k8e=4;s(w8e,"clone");Hr=w8e});function C8e(t){return H5(t,T8e|E8e)}var T8e,E8e,_9,fQ=_(()=>{"use strict";C9();T8e=1,E8e=4;s(C8e,"cloneDeep");_9=C8e});function S8e(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e<r;){var a=t[e];a&&(i[n++]=a)}return i}var uc,dQ=_(()=>{"use strict";s(S8e,"compact");uc=S8e});function A8e(t){return this.__data__.set(t,_8e),this}var _8e,pQ,mQ=_(()=>{"use strict";_8e="__lodash_hash_undefined__";s(A8e,"setCacheAdd");pQ=A8e});function L8e(t){return this.__data__.has(t)}var gQ,yQ=_(()=>{"use strict";s(L8e,"setCacheHas");gQ=L8e});function Y5(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ld;++e<r;)this.add(t[e])}var fm,X5=_(()=>{"use strict";T3();mQ();yQ();s(Y5,"SetCache");Y5.prototype.add=Y5.prototype.push=pQ;Y5.prototype.has=gQ;fm=Y5});function D8e(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var j5,A9=_(()=>{"use strict";s(D8e,"arraySome");j5=D8e});function R8e(t,e){return t.has(e)}var dm,K5=_(()=>{"use strict";s(R8e,"cacheHas");dm=R8e});function N8e(t,e,r,n,i,a){var o=r&M8e,l=t.length,u=e.length;if(l!=u&&!(o&&u>l))return!1;var h=a.get(t),f=a.get(e);if(h&&f)return h==e&&f==t;var d=-1,p=!0,m=r&I8e?new fm:void 0;for(a.set(t,e),a.set(e,t);++d<l;){var g=t[d],y=e[d];if(n)var v=o?n(y,g,d,e,t,a):n(g,y,d,t,e,a);if(v!==void 0){if(v)continue;p=!1;break}if(m){if(!j5(e,function(x,b){if(!dm(m,b)&&(g===x||i(g,x,r,n,a)))return m.push(b)})){p=!1;break}}else if(!(g===y||i(g,y,r,n,a))){p=!1;break}}return a.delete(t),a.delete(e),p}var M8e,I8e,Q5,L9=_(()=>{"use strict";X5();A9();K5();M8e=1,I8e=2;s(N8e,"equalArrays");Q5=N8e});function O8e(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var vQ,xQ=_(()=>{"use strict";s(O8e,"mapToArray");vQ=O8e});function P8e(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var pm,Z5=_(()=>{"use strict";s(P8e,"setToArray");pm=P8e});function K8e(t,e,r,n,i,a,o){switch(r){case j8e:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case X8e:return!(t.byteLength!=e.byteLength||!a(new Pp(t),new Pp(e)));case z8e:case $8e:case U8e:return bo(+t,+e);case G8e:return t.name==e.name&&t.message==e.message;case q8e:case H8e:return t==e+"";case V8e:var l=vQ;case W8e:var u=n&B8e;if(l||(l=pm),t.size!=e.size&&!u)return!1;var h=o.get(t);if(h)return h==e;n|=F8e,o.set(t,e);var f=Q5(l(t),l(e),n,i,a,o);return o.delete(t),f;case Y8e:if(D9)return D9.call(t)==D9.call(e)}return!1}var B8e,F8e,z8e,$8e,G8e,V8e,U8e,q8e,W8e,H8e,Y8e,X8e,j8e,bQ,D9,kQ,wQ=_(()=>{"use strict";sd();W_();od();L9();xQ();Z5();B8e=1,F8e=2,z8e="[object Boolean]",$8e="[object Date]",G8e="[object Error]",V8e="[object Map]",U8e="[object Number]",q8e="[object RegExp]",W8e="[object Set]",H8e="[object String]",Y8e="[object Symbol]",X8e="[object ArrayBuffer]",j8e="[object DataView]",bQ=qi?qi.prototype:void 0,D9=bQ?bQ.valueOf:void 0;s(K8e,"equalByTag");kQ=K8e});function e_e(t,e,r,n,i,a){var o=r&Q8e,l=dv(t),u=l.length,h=dv(e),f=h.length;if(u!=f&&!o)return!1;for(var d=u;d--;){var p=l[d];if(!(o?p in e:J8e.call(e,p)))return!1}var m=a.get(t),g=a.get(e);if(m&&g)return m==e&&g==t;var y=!0;a.set(t,e),a.set(e,t);for(var v=o;++d<u;){p=l[d];var x=t[p],b=e[p];if(n)var k=o?n(b,x,p,e,t,a):n(x,b,p,t,e,a);if(!(k===void 0?x===b||i(x,b,r,n,a):k)){y=!1;break}v||(v=p=="constructor")}if(y&&!v){var A=t.constructor,w=e.constructor;A!=w&&"constructor"in t&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof w=="function"&&w instanceof w)&&(y=!1)}return a.delete(t),a.delete(e),y}var Q8e,Z8e,J8e,TQ,EQ=_(()=>{"use strict";w9();Q8e=1,Z8e=Object.prototype,J8e=Z8e.hasOwnProperty;s(e_e,"equalObjects");TQ=e_e});function n_e(t,e,r,n,i,a){var o=ct(t),l=ct(e),u=o?SQ:Js(t),h=l?SQ:Js(e);u=u==CQ?J5:u,h=h==CQ?J5:h;var f=u==J5,d=h==J5,p=u==h;if(p&&ul(t)){if(!ul(e))return!1;o=!0,f=!1}if(p&&!f)return a||(a=new Zl),o||Rh(t)?Q5(t,e,r,n,i,a):kQ(t,e,u,r,n,i,a);if(!(r&t_e)){var m=f&&_Q.call(t,"__wrapped__"),g=d&&_Q.call(e,"__wrapped__");if(m||g){var y=m?t.value():t,v=g?e.value():e;return a||(a=new Zl),i(y,v,r,n,a)}}return p?(a||(a=new Zl),TQ(t,e,r,n,i,a)):!1}var t_e,CQ,SQ,J5,r_e,_Q,AQ,LQ=_(()=>{"use strict";$y();L9();wQ();EQ();Td();Dn();Vp();qy();t_e=1,CQ="[object Arguments]",SQ="[object Array]",J5="[object Object]",r_e=Object.prototype,_Q=r_e.hasOwnProperty;s(n_e,"baseIsEqualDeep");AQ=n_e});function DQ(t,e,r,n,i){return t===e?!0:t==null||e==null||!Fn(t)&&!Fn(e)?t!==t&&e!==e:AQ(t,e,r,n,DQ,i)}var ek,R9=_(()=>{"use strict";LQ();ko();s(DQ,"baseIsEqual");ek=DQ});function s_e(t,e,r,n){var i=r.length,a=i,o=!n;if(t==null)return!a;for(t=Object(t);i--;){var l=r[i];if(o&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++i<a;){l=r[i];var u=l[0],h=t[u],f=l[1];if(o&&l[2]){if(h===void 0&&!(u in t))return!1}else{var d=new Zl;if(n)var p=n(h,f,u,t,e,d);if(!(p===void 0?ek(f,h,i_e|a_e,n,d):p))return!1}}return!0}var i_e,a_e,RQ,MQ=_(()=>{"use strict";$y();R9();i_e=1,a_e=2;s(s_e,"baseIsMatch");RQ=s_e});function o_e(t){return t===t&&!on(t)}var tk,M9=_(()=>{"use strict";Ws();s(o_e,"isStrictComparable");tk=o_e});function l_e(t){for(var e=kr(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,tk(i)]}return e}var IQ,NQ=_(()=>{"use strict";M9();oc();s(l_e,"getMatchData");IQ=l_e});function c_e(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var rk,I9=_(()=>{"use strict";s(c_e,"matchesStrictComparable");rk=c_e});function u_e(t){var e=IQ(t);return e.length==1&&e[0][2]?rk(e[0][0],e[0][1]):function(r){return r===t||RQ(r,t,e)}}var OQ,PQ=_(()=>{"use strict";MQ();NQ();I9();s(u_e,"baseMatches");OQ=u_e});function h_e(t,e){return t!=null&&e in Object(t)}var BQ,FQ=_(()=>{"use strict";s(h_e,"baseHasIn");BQ=h_e});function f_e(t,e,r){e=Fh(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var o=lc(e[n]);if(!(a=t!=null&&r(t,o)))break;t=t[o]}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&Gp(i)&&Mh(o,i)&&(ct(t)||cl(t)))}var nk,N9=_(()=>{"use strict";hv();$p();Dn();Hy();M3();om();s(f_e,"hasPath");nk=f_e});function d_e(t,e){return t!=null&&nk(t,e,BQ)}var ik,O9=_(()=>{"use strict";FQ();N9();s(d_e,"hasIn");ik=d_e});function g_e(t,e){return sm(t)&&tk(e)?rk(lc(t),e):function(r){var n=dK(r,t);return n===void 0&&n===e?ik(r,t):ek(e,n,p_e|m_e)}}var p_e,m_e,zQ,$Q=_(()=>{"use strict";R9();pK();O9();M5();M9();I9();om();p_e=1,m_e=2;s(g_e,"baseMatchesProperty");zQ=g_e});function y_e(t){return function(e){return e?.[t]}}var ak,P9=_(()=>{"use strict";s(y_e,"baseProperty");ak=y_e});function v_e(t){return function(e){return zh(e,t)}}var GQ,VQ=_(()=>{"use strict";fv();s(v_e,"basePropertyDeep");GQ=v_e});function x_e(t){return sm(t)?ak(lc(t)):GQ(t)}var UQ,qQ=_(()=>{"use strict";P9();VQ();M5();om();s(x_e,"property");UQ=x_e});function b_e(t){return typeof t=="function"?t:t==null?Wi:typeof t=="object"?ct(t)?zQ(t[0],t[1]):OQ(t):UQ(t)}var tn,Ua=_(()=>{"use strict";PQ();$Q();mu();Dn();qQ();s(b_e,"baseIteratee");tn=b_e});function k_e(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;){var o=t[i];e(n,o,r(o),t)}return n}var WQ,HQ=_(()=>{"use strict";s(k_e,"arrayAggregator");WQ=k_e});function w_e(t,e){return t&&Op(t,e,kr)}var mm,sk=_(()=>{"use strict";E3();oc();s(w_e,"baseForOwn");mm=w_e});function T_e(t,e){return function(r,n){if(r==null)return r;if(!Hn(r))return t(r,n);for(var i=r.length,a=e?i:-1,o=Object(r);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}var YQ,XQ=_(()=>{"use strict";wo();s(T_e,"createBaseEach");YQ=T_e});var E_e,ks,Gh=_(()=>{"use strict";sk();XQ();E_e=YQ(mm),ks=E_e});function C_e(t,e,r,n){return ks(t,function(i,a,o){e(n,i,r(i),o)}),n}var jQ,KQ=_(()=>{"use strict";Gh();s(C_e,"baseAggregator");jQ=C_e});function S_e(t,e){return function(r,n){var i=ct(r)?WQ:jQ,a=e?e():{};return i(r,t,tn(n,2),a)}}var QQ,ZQ=_(()=>{"use strict";HQ();KQ();Ua();Dn();s(S_e,"createAggregator");QQ=S_e});var __e,ok,JQ=_(()=>{"use strict";xo();__e=s(function(){return Wn.Date.now()},"now"),ok=__e});var eZ,A_e,L_e,Vh,tZ=_(()=>{"use strict";qp();od();fd();Ih();eZ=Object.prototype,A_e=eZ.hasOwnProperty,L_e=rc(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&Hs(e[0],e[1],i)&&(n=1);++r<n;)for(var a=e[r],o=ds(a),l=-1,u=o.length;++l<u;){var h=o[l],f=t[h];(f===void 0||bo(f,eZ[h])&&!A_e.call(t,h))&&(t[h]=a[h])}return t}),Vh=L_e});function D_e(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var lk,B9=_(()=>{"use strict";s(D_e,"arrayIncludesWith");lk=D_e});function M_e(t,e,r,n){var i=-1,a=D5,o=!0,l=t.length,u=[],h=e.length;if(!l)return u;r&&(e=bs(e,To(r))),n?(a=lk,o=!1):e.length>=R_e&&(a=dm,o=!1,e=new fm(e));e:for(;++i<l;){var f=t[i],d=r==null?f:r(f);if(f=n||f!==0?f:0,o&&d===d){for(var p=h;p--;)if(e[p]===d)continue e;u.push(f)}else a(e,d,n)||u.push(f)}return u}var R_e,rZ,nZ=_(()=>{"use strict";X5();g9();B9();kd();ud();K5();R_e=200;s(M_e,"baseDifference");rZ=M_e});var I_e,Uh,iZ=_(()=>{"use strict";nZ();cm();qp();I3();I_e=rc(function(t,e){return cd(t)?rZ(t,cc(e,1,cd,!0)):[]}),Uh=I_e});function N_e(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var sa,aZ=_(()=>{"use strict";s(N_e,"last");sa=N_e});function O_e(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:sc(e),P5(t,e<0?0:e,n)):[]}var ai,sZ=_(()=>{"use strict";v9();nm();s(O_e,"drop");ai=O_e});function P_e(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:sc(e),e=n-e,P5(t,0,e<0?0:e)):[]}var wu,oZ=_(()=>{"use strict";v9();nm();s(P_e,"dropRight");wu=P_e});function B_e(t){return typeof t=="function"?t:Wi}var gm,ck=_(()=>{"use strict";mu();s(B_e,"castFunction");gm=B_e});function F_e(t,e){var r=ct(t)?_5:ks;return r(t,gm(e))}var be,uk=_(()=>{"use strict";p9();Gh();ck();Dn();s(F_e,"forEach");be=F_e});var lZ=_(()=>{"use strict";uk()});function z_e(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var cZ,uZ=_(()=>{"use strict";s(z_e,"arrayEvery");cZ=z_e});function $_e(t,e){var r=!0;return ks(t,function(n,i,a){return r=!!e(n,i,a),r}),r}var hZ,fZ=_(()=>{"use strict";Gh();s($_e,"baseEvery");hZ=$_e});function G_e(t,e,r){var n=ct(t)?cZ:hZ;return r&&Hs(t,e,r)&&(e=void 0),n(t,tn(e,3))}var Ca,dZ=_(()=>{"use strict";uZ();fZ();Ua();Dn();fd();s(G_e,"every");Ca=G_e});function V_e(t,e){var r=[];return ks(t,function(n,i,a){e(n,i,a)&&r.push(n)}),r}var hk,F9=_(()=>{"use strict";Gh();s(V_e,"baseFilter");hk=V_e});function U_e(t,e){var r=ct(t)?um:hk;return r(t,tn(e,3))}var Nr,z9=_(()=>{"use strict";B5();F9();Ua();Dn();s(U_e,"filter");Nr=U_e});function q_e(t){return function(e,r,n){var i=Object(e);if(!Hn(e)){var a=tn(r,3);e=kr(e),r=s(function(l){return a(i[l],l,i)},"predicate")}var o=t(e,r,n);return o>-1?i[a?e[o]:o]:void 0}}var pZ,mZ=_(()=>{"use strict";Ua();wo();oc();s(q_e,"createFind");pZ=q_e});function H_e(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:sc(r);return i<0&&(i=W_e(n+i,0)),A5(t,tn(e,3),i)}var W_e,gZ,yZ=_(()=>{"use strict";m9();Ua();nm();W_e=Math.max;s(H_e,"findIndex");gZ=H_e});var Y_e,qa,vZ=_(()=>{"use strict";mZ();yZ();Y_e=pZ(gZ),qa=Y_e});function X_e(t){return t&&t.length?t[0]:void 0}var Yi,xZ=_(()=>{"use strict";s(X_e,"head");Yi=X_e});var bZ=_(()=>{"use strict";xZ()});function j_e(t,e){var r=-1,n=Hn(t)?Array(t.length):[];return ks(t,function(i,a,o){n[++r]=e(i,a,o)}),n}var fk,$9=_(()=>{"use strict";Gh();wo();s(j_e,"baseMap");fk=j_e});function K_e(t,e){var r=ct(t)?bs:fk;return r(t,tn(e,3))}var Ge,ym=_(()=>{"use strict";kd();Ua();$9();Dn();s(K_e,"map");Ge=K_e});function Q_e(t,e){return cc(Ge(t,e),1)}var oa,G9=_(()=>{"use strict";cm();ym();s(Q_e,"flatMap");oa=Q_e});function Z_e(t,e){return t==null?t:Op(t,gm(e),ds)}var V9,kZ=_(()=>{"use strict";E3();ck();Ih();s(Z_e,"forIn");V9=Z_e});function J_e(t,e){return t&&mm(t,gm(e))}var U9,wZ=_(()=>{"use strict";sk();ck();s(J_e,"forOwn");U9=J_e});var eAe,tAe,rAe,q9,TZ=_(()=>{"use strict";Np();ZQ();eAe=Object.prototype,tAe=eAe.hasOwnProperty,rAe=QQ(function(t,e,r){tAe.call(t,r)?t[r].push(e):Jl(t,r,[e])}),q9=rAe});function nAe(t,e){return t>e}var EZ,CZ=_(()=>{"use strict";s(nAe,"baseGt");EZ=nAe});function sAe(t,e){return t!=null&&aAe.call(t,e)}var iAe,aAe,SZ,_Z=_(()=>{"use strict";iAe=Object.prototype,aAe=iAe.hasOwnProperty;s(sAe,"baseHas");SZ=sAe});function oAe(t,e){return t!=null&&nk(t,e,SZ)}var Ve,AZ=_(()=>{"use strict";_Z();N9();s(oAe,"has");Ve=oAe});function cAe(t){return typeof t=="string"||!ct(t)&&Fn(t)&&na(t)==lAe}var lAe,si,dk=_(()=>{"use strict";fu();Dn();ko();lAe="[object String]";s(cAe,"isString");si=cAe});function uAe(t,e){return bs(e,function(r){return t[r]})}var LZ,DZ=_(()=>{"use strict";kd();s(uAe,"baseValues");LZ=uAe});function hAe(t){return t==null?[]:LZ(t,kr(t))}var nr,W9=_(()=>{"use strict";DZ();oc();s(hAe,"values");nr=hAe});function dAe(t,e,r,n){t=Hn(t)?t:nr(t),r=r&&!n?sc(r):0;var i=t.length;return r<0&&(r=fAe(i+r,0)),si(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&im(t,e,r)>-1}var fAe,Rn,RZ=_(()=>{"use strict";L5();wo();dk();nm();W9();fAe=Math.max;s(dAe,"includes");Rn=dAe});function mAe(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:sc(r);return i<0&&(i=pAe(n+i,0)),im(t,e,i)}var pAe,pk,MZ=_(()=>{"use strict";L5();nm();pAe=Math.max;s(mAe,"indexOf");pk=mAe});function bAe(t){if(t==null)return!0;if(Hn(t)&&(ct(t)||typeof t=="string"||typeof t.splice=="function"||ul(t)||Rh(t)||cl(t)))return!t.length;var e=Js(t);if(e==gAe||e==yAe)return!t.size;if(ec(t))return!am(t).length;for(var r in t)if(xAe.call(t,r))return!1;return!0}var gAe,yAe,vAe,xAe,Vt,mk=_(()=>{"use strict";R5();Td();$p();Dn();wo();Vp();zp();qy();gAe="[object Map]",yAe="[object Set]",vAe=Object.prototype,xAe=vAe.hasOwnProperty;s(bAe,"isEmpty");Vt=bAe});function wAe(t){return Fn(t)&&na(t)==kAe}var kAe,IZ,NZ=_(()=>{"use strict";fu();ko();kAe="[object RegExp]";s(wAe,"baseIsRegExp");IZ=wAe});var OZ,TAe,_o,PZ=_(()=>{"use strict";NZ();ud();Uy();OZ=Eo&&Eo.isRegExp,TAe=OZ?To(OZ):IZ,_o=TAe});function EAe(t){return t===void 0}var jt,BZ=_(()=>{"use strict";s(EAe,"isUndefined");jt=EAe});function CAe(t,e){return t<e}var gk,H9=_(()=>{"use strict";s(CAe,"baseLt");gk=CAe});function SAe(t,e){var r={};return e=tn(e,3),mm(t,function(n,i,a){Jl(r,i,e(n,i,a))}),r}var Ed,FZ=_(()=>{"use strict";Np();sk();Ua();s(SAe,"mapValues");Ed=SAe});function _Ae(t,e,r){for(var n=-1,i=t.length;++n<i;){var a=t[n],o=e(a);if(o!=null&&(l===void 0?o===o&&!Zs(o):r(o,l)))var l=o,u=a}return u}var vm,yk=_(()=>{"use strict";bd();s(_Ae,"baseExtremum");vm=_Ae});function AAe(t){return t&&t.length?vm(t,Wi,EZ):void 0}var ws,zZ=_(()=>{"use strict";yk();CZ();mu();s(AAe,"max");ws=AAe});function LAe(t){return t&&t.length?vm(t,Wi,gk):void 0}var pl,Y9=_(()=>{"use strict";yk();H9();mu();s(LAe,"min");pl=LAe});function DAe(t,e){return t&&t.length?vm(t,tn(e,2),gk):void 0}var Cd,$Z=_(()=>{"use strict";yk();Ua();H9();s(DAe,"minBy");Cd=DAe});function MAe(t){if(typeof t!="function")throw new TypeError(RAe);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 RAe,GZ,VZ=_(()=>{"use strict";RAe="Expected a function";s(MAe,"negate");GZ=MAe});function IAe(t,e,r,n){if(!on(t))return t;e=Fh(e,t);for(var i=-1,a=e.length,o=a-1,l=t;l!=null&&++i<a;){var u=lc(e[i]),h=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=o){var f=l[u];h=n?n(f,u,l):void 0,h===void 0&&(h=on(f)?f:Mh(e[i+1])?[]:{})}tc(l,u,h),l=l[u]}return t}var UZ,qZ=_(()=>{"use strict";Up();hv();Hy();Ws();om();s(IAe,"baseSet");UZ=IAe});function NAe(t,e,r){for(var n=-1,i=e.length,a={};++n<i;){var o=e[n],l=zh(t,o);r(l,o)&&UZ(a,Fh(o,t),l)}return a}var vk,X9=_(()=>{"use strict";fv();qZ();hv();s(NAe,"basePickBy");vk=NAe});function OAe(t,e){if(t==null)return{};var r=bs(V5(t),function(n){return[n]});return e=tn(e),vk(t,r,function(n,i){return e(n,i[0])})}var Ts,WZ=_(()=>{"use strict";kd();Ua();X9();T9();s(OAe,"pickBy");Ts=OAe});function PAe(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var HZ,YZ=_(()=>{"use strict";s(PAe,"baseSortBy");HZ=PAe});function BAe(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,a=Zs(t),o=e!==void 0,l=e===null,u=e===e,h=Zs(e);if(!l&&!h&&!a&&t>e||a&&o&&u&&!l&&!h||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!h&&t<e||h&&r&&i&&!n&&!a||l&&r&&i||!o&&i||!u)return-1}return 0}var XZ,jZ=_(()=>{"use strict";bd();s(BAe,"compareAscending");XZ=BAe});function FAe(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,o=i.length,l=r.length;++n<o;){var u=XZ(i[n],a[n]);if(u){if(n>=l)return u;var h=r[n];return u*(h=="desc"?-1:1)}}return t.index-e.index}var KZ,QZ=_(()=>{"use strict";jZ();s(FAe,"compareMultiple");KZ=FAe});function zAe(t,e,r){e.length?e=bs(e,function(a){return ct(a)?function(o){return zh(o,a.length===1?a[0]:a)}:a}):e=[Wi];var n=-1;e=bs(e,To(tn));var i=fk(t,function(a,o,l){var u=bs(e,function(h){return h(a)});return{criteria:u,index:++n,value:a}});return HZ(i,function(a,o){return KZ(a,o,r)})}var ZZ,JZ=_(()=>{"use strict";kd();fv();Ua();$9();YZ();ud();QZ();mu();Dn();s(zAe,"baseOrderBy");ZZ=zAe});var $Ae,eJ,tJ=_(()=>{"use strict";P9();$Ae=ak("length"),eJ=$Ae});function ZAe(t){for(var e=rJ.lastIndex=0;rJ.test(t);)++e;return e}var nJ,GAe,VAe,UAe,qAe,WAe,HAe,j9,K9,YAe,iJ,aJ,sJ,XAe,oJ,lJ,jAe,KAe,QAe,rJ,cJ,uJ=_(()=>{"use strict";nJ="\\ud800-\\udfff",GAe="\\u0300-\\u036f",VAe="\\ufe20-\\ufe2f",UAe="\\u20d0-\\u20ff",qAe=GAe+VAe+UAe,WAe="\\ufe0e\\ufe0f",HAe="["+nJ+"]",j9="["+qAe+"]",K9="\\ud83c[\\udffb-\\udfff]",YAe="(?:"+j9+"|"+K9+")",iJ="[^"+nJ+"]",aJ="(?:\\ud83c[\\udde6-\\uddff]){2}",sJ="[\\ud800-\\udbff][\\udc00-\\udfff]",XAe="\\u200d",oJ=YAe+"?",lJ="["+WAe+"]?",jAe="(?:"+XAe+"(?:"+[iJ,aJ,sJ].join("|")+")"+lJ+oJ+")*",KAe=lJ+oJ+jAe,QAe="(?:"+[iJ+j9+"?",j9,aJ,sJ,HAe].join("|")+")",rJ=RegExp(K9+"(?="+K9+")|"+QAe+KAe,"g");s(ZAe,"unicodeSize");cJ=ZAe});function JAe(t){return kK(t)?cJ(t):eJ(t)}var hJ,fJ=_(()=>{"use strict";tJ();wK();uJ();s(JAe,"stringSize");hJ=JAe});function e9e(t,e){return vk(t,e,function(r,n){return ik(t,n)})}var dJ,pJ=_(()=>{"use strict";X9();O9();s(e9e,"basePick");dJ=e9e});var t9e,Sd,mJ=_(()=>{"use strict";pJ();bK();t9e=xK(function(t,e){return t==null?{}:dJ(t,e)}),Sd=t9e});function i9e(t,e,r,n){for(var i=-1,a=n9e(r9e((e-t)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=t,t+=r;return o}var r9e,n9e,gJ,yJ=_(()=>{"use strict";r9e=Math.ceil,n9e=Math.max;s(i9e,"baseRange");gJ=i9e});function a9e(t){return function(e,r,n){return n&&typeof n!="number"&&Hs(e,r,n)&&(r=n=void 0),e=rm(e),r===void 0?(r=e,e=0):r=rm(r),n=n===void 0?e<r?1:-1:rm(n),gJ(e,r,n,t)}}var vJ,xJ=_(()=>{"use strict";yJ();fd();f9();s(a9e,"createRange");vJ=a9e});var s9e,Ao,bJ=_(()=>{"use strict";xJ();s9e=vJ(),Ao=s9e});function o9e(t,e,r,n,i){return i(t,function(a,o,l){r=n?(n=!1,a):e(r,a,o,l)}),r}var kJ,wJ=_(()=>{"use strict";s(o9e,"baseReduce");kJ=o9e});function l9e(t,e,r){var n=ct(t)?TK:kJ,i=arguments.length<3;return n(t,tn(e,4),r,i,ks)}var Or,Q9=_(()=>{"use strict";EK();Gh();Ua();wJ();Dn();s(l9e,"reduce");Or=l9e});function c9e(t,e){var r=ct(t)?um:hk;return r(t,GZ(tn(e,3)))}var qh,TJ=_(()=>{"use strict";B5();F9();Ua();Dn();VZ();s(c9e,"reject");qh=c9e});function f9e(t){if(t==null)return 0;if(Hn(t))return si(t)?hJ(t):t.length;var e=Js(t);return e==u9e||e==h9e?t.size:am(t).length}var u9e,h9e,Z9,EJ=_(()=>{"use strict";R5();Td();wo();dk();fJ();u9e="[object Map]",h9e="[object Set]";s(f9e,"size");Z9=f9e});function d9e(t,e){var r;return ks(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}var CJ,SJ=_(()=>{"use strict";Gh();s(d9e,"baseSome");CJ=d9e});function p9e(t,e,r){var n=ct(t)?j5:CJ;return r&&Hs(t,e,r)&&(e=void 0),n(t,tn(e,3))}var pv,_J=_(()=>{"use strict";A9();Ua();SJ();Dn();fd();s(p9e,"some");pv=p9e});var m9e,hc,AJ=_(()=>{"use strict";cm();JZ();qp();fd();m9e=rc(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Hs(t,e[0],e[1])?e=[]:r>2&&Hs(e[0],e[1],e[2])&&(e=[e[0]]),ZZ(t,cc(e,1),[])}),hc=m9e});var g9e,y9e,LJ,DJ=_(()=>{"use strict";E9();d9();Z5();g9e=1/0,y9e=$h&&1/pm(new $h([,-0]))[1]==g9e?function(t){return new $h(t)}:zn,LJ=y9e});function x9e(t,e,r){var n=-1,i=D5,a=t.length,o=!0,l=[],u=l;if(r)o=!1,i=lk;else if(a>=v9e){var h=e?null:LJ(t);if(h)return pm(h);o=!1,i=dm,u=new fm}else u=e?[]:l;e:for(;++n<a;){var f=t[n],d=e?e(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue e;e&&u.push(d),l.push(f)}else i(u,d,r)||(u!==l&&u.push(d),l.push(f))}return l}var v9e,xm,xk=_(()=>{"use strict";X5();g9();B9();K5();DJ();Z5();v9e=200;s(x9e,"baseUniq");xm=x9e});var b9e,J9,RJ=_(()=>{"use strict";cm();qp();xk();I3();b9e=rc(function(t){return xm(cc(t,1,cd,!0))}),J9=b9e});function k9e(t){return t&&t.length?xm(t):[]}var bm,MJ=_(()=>{"use strict";xk();s(k9e,"uniq");bm=k9e});function w9e(t,e){return t&&t.length?xm(t,tn(e,2)):[]}var IJ,NJ=_(()=>{"use strict";Ua();xk();s(w9e,"uniqBy");IJ=w9e});function E9e(t){var e=++T9e;return I5(t)+e}var T9e,_d,OJ=_(()=>{"use strict";y9();T9e=0;s(E9e,"uniqueId");_d=E9e});function C9e(t,e,r){for(var n=-1,i=t.length,a=e.length,o={};++n<i;){var l=n<a?e[n]:void 0;r(o,t[n],l)}return o}var PJ,BJ=_(()=>{"use strict";s(C9e,"baseZipObject");PJ=C9e});function S9e(t,e){return PJ(t||[],e||[],tc)}var bk,FJ=_(()=>{"use strict";Up();BJ();s(S9e,"zipObject");bk=S9e});var Tt=_(()=>{"use strict";lK();S9();fQ();dQ();tA();tZ();iZ();sZ();oZ();lZ();dZ();z9();vZ();bZ();G9();O5();uk();kZ();wZ();TZ();AZ();mu();RZ();MZ();Dn();mk();Oy();Ws();PZ();dk();BZ();oc();aZ();ym();FZ();zZ();iA();Y9();$Z();d9();JQ();mJ();WZ();bJ();Q9();TJ();EJ();_J();AJ();RJ();MJ();OJ();W9();FJ();});function $J(t,e){t[e]?t[e]++:t[e]=1}function GJ(t,e){--t[e]||delete t[e]}function mv(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}return i+zJ+a+zJ+(jt(n)?_9e:n)}function A9e(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}var l={v:i,w:a};return n&&(l.name=n),l}function eL(t,e){return mv(t,e.v,e.w,e.name)}var _9e,Ad,zJ,ir,kk=_(()=>{"use strict";Tt();_9e="\0",Ad="\0",zJ="",ir=class{static{s(this,"Graph")}constructor(e={}){this._isDirected=Ve(e,"directed")?e.directed:!0,this._isMultigraph=Ve(e,"multigraph")?e.multigraph:!1,this._isCompound=Ve(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ps(void 0),this._defaultEdgeLabelFn=ps(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Ad]={}),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 fi(e)||(e=ps(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return kr(this._nodes)}sources(){var e=this;return Nr(this.nodes(),function(r){return Vt(e._in[r])})}sinks(){var e=this;return Nr(this.nodes(),function(r){return Vt(e._out[r])})}setNodes(e,r){var n=arguments,i=this;return be(e,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return Ve(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]=Ad,this._children[e]={},this._children[Ad][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 Ve(this._nodes,e)}removeNode(e){var r=this;if(Ve(this._nodes,e)){var n=s(function(i){r.removeEdge(r._edgeObjs[i])},"removeEdge");delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],be(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),be(kr(this._in[e]),n),delete this._in[e],delete this._preds[e],be(kr(this._out[e]),n),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(jt(r))r=Ad;else{r+="";for(var n=r;!jt(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!==Ad)return r}}children(e){if(jt(e)&&(e=Ad),this._isCompound){var r=this._children[e];if(r)return kr(r)}else{if(e===Ad)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return kr(r)}successors(e){var r=this._sucs[e];if(r)return kr(r)}neighbors(e){var r=this.predecessors(e);if(r)return J9(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;be(this._nodes,function(o,l){e(l)&&r.setNode(l,o)}),be(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,n.edge(o))});var i={};function a(o){var l=n.parent(o);return l===void 0||r.hasNode(l)?(i[o]=l,l):l in i?i[l]:a(l)}return s(a,"findParent"),this._isCompound&&be(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(e){return fi(e)||(e=ps(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return nr(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return Or(e,function(a,o){return i.length>1?n.setEdge(a,o,r):n.setEdge(a,o),o}),this}setEdge(){var e,r,n,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,r=o.w,n=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,jt(n)||(n=""+n);var l=mv(this._isDirected,e,r,n);if(Ve(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!jt(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(e,r,n);var u=A9e(this._isDirected,e,r,n);return e=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,$J(this._preds[r],e),$J(this._sucs[e],r),this._in[r][l]=u,this._out[e][l]=u,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?eL(this._isDirected,arguments[0]):mv(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?eL(this._isDirected,arguments[0]):mv(this._isDirected,e,r,n);return Ve(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?eL(this._isDirected,arguments[0]):mv(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],GJ(this._preds[r],e),GJ(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=nr(n);return r?Nr(i,function(a){return a.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=nr(n);return r?Nr(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))}};ir.prototype._nodeCount=0;ir.prototype._edgeCount=0;s($J,"incrementOrInitEntry");s(GJ,"decrementOrRemoveEntry");s(mv,"edgeArgsToId");s(A9e,"edgeArgsToObj");s(eL,"edgeObjToId")});var la=_(()=>{"use strict";kk()});function VJ(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function L9e(t,e){if(t!=="_next"&&t!=="_prev")return e}var wk,UJ=_(()=>{"use strict";wk=class{static{s(this,"List")}constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return VJ(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&VJ(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,L9e)),n=n._prev;return"["+e.join(", ")+"]"}};s(VJ,"unlink");s(L9e,"filterOutLinks")});function qJ(t,e){if(t.nodeCount()<=1)return[];var r=M9e(t,e||D9e),n=R9e(r.graph,r.buckets,r.zeroIdx);return Ir(Ge(n,function(i){return t.outEdges(i.v,i.w)}))}function R9e(t,e,r){for(var n=[],i=e[e.length-1],a=e[0],o;t.nodeCount();){for(;o=a.dequeue();)tL(t,e,r,o);for(;o=i.dequeue();)tL(t,e,r,o);if(t.nodeCount()){for(var l=e.length-2;l>0;--l)if(o=e[l].dequeue(),o){n=n.concat(tL(t,e,r,o,!0));break}}}return n}function tL(t,e,r,n,i){var a=i?[]:void 0;return be(t.inEdges(n.v),function(o){var l=t.edge(o),u=t.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=l,rL(e,r,u)}),be(t.outEdges(n.v),function(o){var l=t.edge(o),u=o.w,h=t.node(u);h.in-=l,rL(e,r,h)}),t.removeNode(n.v),a}function M9e(t,e){var r=new ir,n=0,i=0;be(t.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),be(t.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=e(l),f=u+h;r.setEdge(l.v,l.w,f),i=Math.max(i,r.node(l.v).out+=h),n=Math.max(n,r.node(l.w).in+=h)});var a=Ao(i+n+3).map(function(){return new wk}),o=n+1;return be(r.nodes(),function(l){rL(a,o,r.node(l))}),{graph:r,buckets:a,zeroIdx:o}}function rL(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 D9e,WJ=_(()=>{"use strict";Tt();la();UJ();D9e=ps(1);s(qJ,"greedyFAS");s(R9e,"doGreedyFAS");s(tL,"removeNode");s(M9e,"buildState");s(rL,"assignBucket")});function HJ(t){var e=t.graph().acyclicer==="greedy"?qJ(t,r(t)):I9e(t);be(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,_d("rev"))});function r(n){return function(i){return n.edge(i).weight}}s(r,"weightFn")}function I9e(t){var e=[],r={},n={};function i(a){Ve(n,a)||(n[a]=!0,r[a]=!0,be(t.outEdges(a),function(o){Ve(r,o.w)?e.push(o):i(o.w)}),delete r[a])}return s(i,"dfs"),be(t.nodes(),i),e}function YJ(t){be(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 nL=_(()=>{"use strict";Tt();WJ();s(HJ,"run");s(I9e,"dfsFAS");s(YJ,"undo")});function fc(t,e,r,n){var i;do i=_d(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function jJ(t){var e=new ir().setGraph(t.graph());return be(t.nodes(),function(r){e.setNode(r,t.node(r))}),be(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 Tk(t){var e=new ir({multigraph:t.isMultigraph()}).setGraph(t.graph());return be(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),be(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function iL(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,o=t.width/2,l=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(a)*o>Math.abs(i)*l?(a<0&&(l=-l),u=l*i/a,h=l):(i<0&&(o=-o),u=o,h=o*a/i),{x:r+u,y:n+h}}function Wh(t){var e=Ge(Ao(sL(t)+1),function(){return[]});return be(t.nodes(),function(r){var n=t.node(r),i=n.rank;jt(i)||(e[i][n.order]=r)}),e}function KJ(t){var e=pl(Ge(t.nodes(),function(r){return t.node(r).rank}));be(t.nodes(),function(r){var n=t.node(r);Ve(n,"rank")&&(n.rank-=e)})}function QJ(t){var e=pl(Ge(t.nodes(),function(a){return t.node(a).rank})),r=[];be(t.nodes(),function(a){var o=t.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var n=0,i=t.graph().nodeRankFactor;be(r,function(a,o){jt(a)&&o%i!==0?--n:n&&be(a,function(l){t.node(l).rank+=n})})}function aL(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),fc(t,"border",i,e)}function sL(t){return ws(Ge(t.nodes(),function(e){var r=t.node(e).rank;if(!jt(r))return r}))}function ZJ(t,e){var r={lhs:[],rhs:[]};return be(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function JJ(t,e){var r=ok();try{return e()}finally{console.log(t+" time: "+(ok()-r)+"ms")}}function eee(t,e){return e()}var dc=_(()=>{"use strict";Tt();la();s(fc,"addDummyNode");s(jJ,"simplify");s(Tk,"asNonCompoundGraph");s(iL,"intersectRect");s(Wh,"buildLayerMatrix");s(KJ,"normalizeRanks");s(QJ,"removeEmptyRanks");s(aL,"addBorderNode");s(sL,"maxRank");s(ZJ,"partition");s(JJ,"time");s(eee,"notime")});function ree(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&&be(n,e),Ve(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)tee(t,"borderLeft","_bl",r,i,a),tee(t,"borderRight","_br",r,i,a)}}s(e,"dfs"),be(t.children(),e)}function tee(t,e,r,n,i,a){var o={width:0,height:0,rank:a,borderType:e},l=i[e][a-1],u=fc(t,"border",o,r);i[e][a]=u,t.setParent(u,n),l&&t.setEdge(l,u,{weight:1})}var nee=_(()=>{"use strict";Tt();dc();s(ree,"addBorderSegments");s(tee,"addBorderNode")});function aee(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&oee(t)}function see(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&N9e(t),(e==="lr"||e==="rl")&&(O9e(t),oee(t))}function oee(t){be(t.nodes(),function(e){iee(t.node(e))}),be(t.edges(),function(e){iee(t.edge(e))})}function iee(t){var e=t.width;t.width=t.height,t.height=e}function N9e(t){be(t.nodes(),function(e){oL(t.node(e))}),be(t.edges(),function(e){var r=t.edge(e);be(r.points,oL),Ve(r,"y")&&oL(r)})}function oL(t){t.y=-t.y}function O9e(t){be(t.nodes(),function(e){lL(t.node(e))}),be(t.edges(),function(e){var r=t.edge(e);be(r.points,lL),Ve(r,"x")&&lL(r)})}function lL(t){var e=t.x;t.x=t.y,t.y=e}var lee=_(()=>{"use strict";Tt();s(aee,"adjust");s(see,"undo");s(oee,"swapWidthHeight");s(iee,"swapWidthHeightOne");s(N9e,"reverseY");s(oL,"reverseYOne");s(O9e,"swapXY");s(lL,"swapXYOne")});function cee(t){t.graph().dummyChains=[],be(t.edges(),function(e){B9e(t,e)})}function B9e(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,o=e.name,l=t.edge(e),u=l.labelRank;if(a!==n+1){t.removeEdge(e);var h,f,d;for(d=0,++n;n<a;++d,++n)l.points=[],f={width:0,height:0,edgeLabel:l,edgeObj:e,rank:n},h=fc(t,"edge",f,"_d"),n===u&&(f.width=l.width,f.height=l.height,f.dummy="edge-label",f.labelpos=l.labelpos),t.setEdge(r,h,{weight:l.weight},o),d===0&&t.graph().dummyChains.push(h),r=h;t.setEdge(r,i,{weight:l.weight},o)}}function uee(t){be(t.graph().dummyChains,function(e){var r=t.node(e),n=r.edgeLabel,i;for(t.setEdge(r.edgeObj,n);r.dummy;)i=t.successors(e)[0],t.removeNode(e),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),e=i,r=t.node(e)})}var cL=_(()=>{"use strict";Tt();dc();s(cee,"run");s(B9e,"normalizeEdge");s(uee,"undo")});function gv(t){var e={};function r(n){var i=t.node(n);if(Ve(e,n))return i.rank;e[n]=!0;var a=pl(Ge(t.outEdges(n),function(o){return r(o.w)-t.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}s(r,"dfs"),be(t.sources(),r)}function Ld(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var Ek=_(()=>{"use strict";Tt();s(gv,"longestPath");s(Ld,"slack")});function Ck(t){var e=new ir({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;F9e(e,t)<n;)i=z9e(e,t),a=e.hasNode(i.v)?Ld(t,i):-Ld(t,i),$9e(e,t,a);return e}function F9e(t,e){function r(n){be(e.nodeEdges(n),function(i){var a=i.v,o=n===a?i.w:a;!t.hasNode(o)&&!Ld(e,i)&&(t.setNode(o,{}),t.setEdge(n,o,{}),r(o))})}return s(r,"dfs"),be(t.nodes(),r),t.nodeCount()}function z9e(t,e){return Cd(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return Ld(e,r)})}function $9e(t,e,r){be(t.nodes(),function(n){e.node(n).rank+=r})}var uL=_(()=>{"use strict";Tt();la();Ek();s(Ck,"feasibleTree");s(F9e,"tightTree");s(z9e,"findMinSlackEdge");s($9e,"shiftRanks")});var fee=_(()=>{"use strict"});var hL=_(()=>{"use strict"});var sPt,fL=_(()=>{"use strict";Tt();hL();sPt=ps(1)});var dee=_(()=>{"use strict";fL()});var dL=_(()=>{"use strict"});var pee=_(()=>{"use strict";dL()});var yPt,mee=_(()=>{"use strict";Tt();yPt=ps(1)});function pL(t){var e={},r={},n=[];function i(a){if(Ve(r,a))throw new yv;Ve(e,a)||(r[a]=!0,e[a]=!0,be(t.predecessors(a),i),delete r[a],n.push(a))}if(s(i,"visit"),be(t.sinks(),i),Z9(e)!==t.nodeCount())throw new yv;return n}function yv(){}var mL=_(()=>{"use strict";Tt();pL.CycleException=yv;s(pL,"topsort");s(yv,"CycleException");yv.prototype=new Error});var gee=_(()=>{"use strict";mL()});function Sk(t,e,r){ct(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return be(e,function(o){if(!t.hasNode(o))throw new Error("Graph does not have node: "+o);yee(t,o,r==="post",a,n,i)}),i}function yee(t,e,r,n,i,a){Ve(n,e)||(n[e]=!0,r||a.push(e),be(i(e),function(o){yee(t,o,r,n,i,a)}),r&&a.push(e))}var gL=_(()=>{"use strict";Tt();s(Sk,"dfs");s(yee,"doDfs")});function yL(t,e){return Sk(t,e,"post")}var vee=_(()=>{"use strict";gL();s(yL,"postorder")});function vL(t,e){return Sk(t,e,"pre")}var xee=_(()=>{"use strict";gL();s(vL,"preorder")});var bee=_(()=>{"use strict";hL();kk()});var kee=_(()=>{"use strict";fee();fL();dee();pee();mee();gee();vee();xee();bee();dL();mL()});function Yh(t){t=jJ(t),gv(t);var e=Ck(t);bL(e),xL(e,t);for(var r,n;r=Cee(e);)n=See(e,t,r),_ee(e,t,r,n)}function xL(t,e){var r=yL(t,t.nodes());r=r.slice(0,r.length-1),be(r,function(n){W9e(t,e,n)})}function W9e(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=Tee(t,e,r)}function Tee(t,e,r){var n=t.node(r),i=n.parent,a=!0,o=e.edge(r,i),l=0;return o||(a=!1,o=e.edge(i,r)),l=o.weight,be(e.nodeEdges(r),function(u){var h=u.v===r,f=h?u.w:u.v;if(f!==i){var d=h===a,p=e.edge(u).weight;if(l+=d?p:-p,Y9e(t,r,f)){var m=t.edge(r,f).cutvalue;l+=d?-m:m}}}),l}function bL(t,e){arguments.length<2&&(e=t.nodes()[0]),Eee(t,{},1,e)}function Eee(t,e,r,n,i){var a=r,o=t.node(n);return e[n]=!0,be(t.neighbors(n),function(l){Ve(e,l)||(r=Eee(t,e,r,l,n))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function Cee(t){return qa(t.edges(),function(e){return t.edge(e).cutvalue<0})}function See(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),o=t.node(i),l=a,u=!1;a.lim>o.lim&&(l=o,u=!0);var h=Nr(e.edges(),function(f){return u===wee(t,t.node(f.v),l)&&u!==wee(t,t.node(f.w),l)});return Cd(h,function(f){return Ld(e,f)})}function _ee(t,e,r,n){var i=r.v,a=r.w;t.removeEdge(i,a),t.setEdge(n.v,n.w,{}),bL(t),xL(t,e),H9e(t,e)}function H9e(t,e){var r=qa(t.nodes(),function(i){return!e.node(i).parent}),n=vL(t,r);n=n.slice(1),be(n,function(i){var a=t.node(i).parent,o=e.edge(i,a),l=!1;o||(o=e.edge(a,i),l=!0),e.node(i).rank=e.node(a).rank+(l?o.minlen:-o.minlen)})}function Y9e(t,e,r){return t.hasEdge(e,r)}function wee(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var Aee=_(()=>{"use strict";Tt();kee();dc();uL();Ek();Yh.initLowLimValues=bL;Yh.initCutValues=xL;Yh.calcCutValue=Tee;Yh.leaveEdge=Cee;Yh.enterEdge=See;Yh.exchangeEdges=_ee;s(Yh,"networkSimplex");s(xL,"initCutValues");s(W9e,"assignCutValue");s(Tee,"calcCutValue");s(bL,"initLowLimValues");s(Eee,"dfsAssignLowLim");s(Cee,"leaveEdge");s(See,"enterEdge");s(_ee,"exchangeEdges");s(H9e,"updateRanks");s(Y9e,"isTreeEdge");s(wee,"isDescendant")});function kL(t){switch(t.graph().ranker){case"network-simplex":Lee(t);break;case"tight-tree":j9e(t);break;case"longest-path":X9e(t);break;default:Lee(t)}}function j9e(t){gv(t),Ck(t)}function Lee(t){Yh(t)}var X9e,wL=_(()=>{"use strict";uL();Aee();Ek();s(kL,"rank");X9e=gv;s(j9e,"tightTreeRanker");s(Lee,"networkSimplexRanker")});function Dee(t){var e=fc(t,"root",{},"_root"),r=K9e(t),n=ws(nr(r))-1,i=2*n+1;t.graph().nestingRoot=e,be(t.edges(),function(o){t.edge(o).minlen*=i});var a=Q9e(t)+1;be(t.children(),function(o){Ree(t,e,i,a,n,r,o)}),t.graph().nodeRankFactor=i}function Ree(t,e,r,n,i,a,o){var l=t.children(o);if(!l.length){o!==e&&t.setEdge(e,o,{weight:0,minlen:r});return}var u=aL(t,"_bt"),h=aL(t,"_bb"),f=t.node(o);t.setParent(u,o),f.borderTop=u,t.setParent(h,o),f.borderBottom=h,be(l,function(d){Ree(t,e,r,n,i,a,d);var p=t.node(d),m=p.borderTop?p.borderTop:d,g=p.borderBottom?p.borderBottom:d,y=p.borderTop?n:2*n,v=m!==g?1:i-a[o]+1;t.setEdge(u,m,{weight:y,minlen:v,nestingEdge:!0}),t.setEdge(g,h,{weight:y,minlen:v,nestingEdge:!0})}),t.parent(o)||t.setEdge(e,u,{weight:0,minlen:i+a[o]})}function K9e(t){var e={};function r(n,i){var a=t.children(n);a&&a.length&&be(a,function(o){r(o,i+1)}),e[n]=i}return s(r,"dfs"),be(t.children(),function(n){r(n,1)}),e}function Q9e(t){return Or(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function Mee(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,be(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}var Iee=_(()=>{"use strict";Tt();dc();s(Dee,"run");s(Ree,"dfs");s(K9e,"treeDepths");s(Q9e,"sumWeights");s(Mee,"cleanup")});function Nee(t,e,r){var n={},i;be(r,function(a){for(var o=t.parent(a),l,u;o;){if(l=t.parent(o),l?(u=n[l],n[l]=o):(u=i,i=o),u&&u!==o){e.setEdge(u,o);return}o=l}})}var Oee=_(()=>{"use strict";Tt();s(Nee,"addSubgraphConstraints")});function Pee(t,e,r){var n=J9e(t),i=new ir({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return t.node(a)});return be(t.nodes(),function(a){var o=t.node(a),l=t.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,l||n),be(t[r](a),function(u){var h=u.v===a?u.w:u.v,f=i.edge(h,a),d=jt(f)?0:f.weight;i.setEdge(h,a,{weight:t.edge(u).weight+d})}),Ve(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),i}function J9e(t){for(var e;t.hasNode(e=_d("_root")););return e}var Bee=_(()=>{"use strict";Tt();la();s(Pee,"buildLayerGraph");s(J9e,"createRootNode")});function Fee(t,e){for(var r=0,n=1;n<e.length;++n)r+=eLe(t,e[n-1],e[n]);return r}function eLe(t,e,r){for(var n=bk(r,Ge(r,function(h,f){return f})),i=Ir(Ge(e,function(h){return hc(Ge(t.outEdges(h),function(f){return{pos:n[f.w],weight:t.edge(f).weight}}),"pos")})),a=1;a<r.length;)a<<=1;var o=2*a-1;a-=1;var l=Ge(new Array(o),function(){return 0}),u=0;return be(i.forEach(function(h){var f=h.pos+a;l[f]+=h.weight;for(var d=0;f>0;)f%2&&(d+=l[f+1]),f=f-1>>1,l[f]+=h.weight;u+=h.weight*d})),u}var zee=_(()=>{"use strict";Tt();s(Fee,"crossCount");s(eLe,"twoLayerCrossCount")});function $ee(t){var e={},r=Nr(t.nodes(),function(l){return!t.children(l).length}),n=ws(Ge(r,function(l){return t.node(l).rank})),i=Ge(Ao(n+1),function(){return[]});function a(l){if(!Ve(e,l)){e[l]=!0;var u=t.node(l);i[u.rank].push(l),be(t.successors(l),a)}}s(a,"dfs");var o=hc(r,function(l){return t.node(l).rank});return be(o,a),i}var Gee=_(()=>{"use strict";Tt();s($ee,"initOrder")});function Vee(t,e){return Ge(e,function(r){var n=t.inEdges(r);if(n.length){var i=Or(n,function(a,o){var l=t.edge(o),u=t.node(o.v);return{sum:a.sum+l.weight*u.order,weight:a.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var Uee=_(()=>{"use strict";Tt();s(Vee,"barycenter")});function qee(t,e){var r={};be(t,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};jt(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),be(e.edges(),function(i){var a=r[i.v],o=r[i.w];!jt(a)&&!jt(o)&&(o.indegree++,a.out.push(r[i.w]))});var n=Nr(r,function(i){return!i.indegree});return tLe(n)}function tLe(t){var e=[];function r(a){return function(o){o.merged||(jt(o.barycenter)||jt(a.barycenter)||o.barycenter>=a.barycenter)&&rLe(a,o)}}s(r,"handleIn");function n(a){return function(o){o.in.push(a),--o.indegree===0&&t.push(o)}}for(s(n,"handleOut");t.length;){var i=t.pop();e.push(i),be(i.in.reverse(),r(i)),be(i.out,n(i))}return Ge(Nr(e,function(a){return!a.merged}),function(a){return Sd(a,["vs","i","barycenter","weight"])})}function rLe(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 Wee=_(()=>{"use strict";Tt();s(qee,"resolveConflicts");s(tLe,"doResolveConflicts");s(rLe,"mergeEntries")});function Yee(t,e){var r=ZJ(t,function(f){return Ve(f,"barycenter")}),n=r.lhs,i=hc(r.rhs,function(f){return-f.i}),a=[],o=0,l=0,u=0;n.sort(nLe(!!e)),u=Hee(a,i,u),be(n,function(f){u+=f.vs.length,a.push(f.vs),o+=f.barycenter*f.weight,l+=f.weight,u=Hee(a,i,u)});var h={vs:Ir(a)};return l&&(h.barycenter=o/l,h.weight=l),h}function Hee(t,e,r){for(var n;e.length&&(n=sa(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function nLe(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}var Xee=_(()=>{"use strict";Tt();dc();s(Yee,"sort");s(Hee,"consumeUnsortable");s(nLe,"compareWithBias")});function TL(t,e,r,n){var i=t.children(e),a=t.node(e),o=a?a.borderLeft:void 0,l=a?a.borderRight:void 0,u={};o&&(i=Nr(i,function(g){return g!==o&&g!==l}));var h=Vee(t,i);be(h,function(g){if(t.children(g.v).length){var y=TL(t,g.v,r,n);u[g.v]=y,Ve(y,"barycenter")&&aLe(g,y)}});var f=qee(h,r);iLe(f,u);var d=Yee(f,n);if(o&&(d.vs=Ir([o,d.vs,l]),t.predecessors(o).length)){var p=t.node(t.predecessors(o)[0]),m=t.node(t.predecessors(l)[0]);Ve(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+p.order+m.order)/(d.weight+2),d.weight+=2}return d}function iLe(t,e){be(t,function(r){r.vs=Ir(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function aLe(t,e){jt(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 jee=_(()=>{"use strict";Tt();Uee();Wee();Xee();s(TL,"sortSubgraph");s(iLe,"expandSubgraphs");s(aLe,"mergeBarycenters")});function Zee(t){var e=sL(t),r=Kee(t,Ao(1,e+1),"inEdges"),n=Kee(t,Ao(e-1,-1,-1),"outEdges"),i=$ee(t);Qee(t,i);for(var a=Number.POSITIVE_INFINITY,o,l=0,u=0;u<4;++l,++u){sLe(l%2?r:n,l%4>=2),i=Wh(t);var h=Fee(t,i);h<a&&(u=0,o=_9(i),a=h)}Qee(t,o)}function Kee(t,e,r){return Ge(e,function(n){return Pee(t,n,r)})}function sLe(t,e){var r=new ir;be(t,function(n){var i=n.graph().root,a=TL(n,i,r,e);be(a.vs,function(o,l){n.node(o).order=l}),Nee(n,r,a.vs)})}function Qee(t,e){be(e,function(r){be(r,function(n,i){t.node(n).order=i})})}var Jee=_(()=>{"use strict";Tt();la();dc();Oee();Bee();zee();Gee();jee();s(Zee,"order");s(Kee,"buildLayerGraphs");s(sLe,"sweepLayerGraphs");s(Qee,"assignOrder")});function ete(t){var e=lLe(t);be(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=oLe(t,e,i.v,i.w),o=a.path,l=a.lca,u=0,h=o[u],f=!0;r!==i.w;){if(n=t.node(r),f){for(;(h=o[u])!==l&&t.node(h).maxRank<n.rank;)u++;h===l&&(f=!1)}if(!f){for(;u<o.length-1&&t.node(h=o[u+1]).minRank<=n.rank;)u++;h=o[u]}t.setParent(r,h),r=t.successors(r)[0]}})}function oLe(t,e,r,n){var i=[],a=[],o=Math.min(e[r].low,e[n].low),l=Math.max(e[r].lim,e[n].lim),u,h;u=r;do u=t.parent(u),i.push(u);while(u&&(e[u].low>o||l>e[u].lim));for(h=u,u=n;(u=t.parent(u))!==h;)a.push(u);return{path:i.concat(a.reverse()),lca:h}}function lLe(t){var e={},r=0;function n(i){var a=r;be(t.children(i),n),e[i]={low:a,lim:r++}}return s(n,"dfs"),be(t.children(),n),e}var tte=_(()=>{"use strict";Tt();s(ete,"parentDummyChains");s(oLe,"findPath");s(lLe,"postorder")});function cLe(t,e){var r={};function n(i,a){var o=0,l=0,u=i.length,h=sa(a);return be(a,function(f,d){var p=hLe(t,f),m=p?t.node(p).order:u;(p||f===h)&&(be(a.slice(l,d+1),function(g){be(t.predecessors(g),function(y){var v=t.node(y),x=v.order;(x<o||m<x)&&!(v.dummy&&t.node(g).dummy)&&rte(r,y,g)})}),l=d+1,o=m)}),a}return s(n,"visitLayer"),Or(e,n),r}function uLe(t,e){var r={};function n(a,o,l,u,h){var f;be(Ao(o,l),function(d){f=a[d],t.node(f).dummy&&be(t.predecessors(f),function(p){var m=t.node(p);m.dummy&&(m.order<u||m.order>h)&&rte(r,p,f)})})}s(n,"scan");function i(a,o){var l=-1,u,h=0;return be(o,function(f,d){if(t.node(f).dummy==="border"){var p=t.predecessors(f);p.length&&(u=t.node(p[0]).order,n(o,h,d,l,u),h=d,l=u)}n(o,h,o.length,u,a.length)}),o}return s(i,"visitLayer"),Or(e,i),r}function hLe(t,e){if(t.node(e).dummy)return qa(t.predecessors(e),function(r){return t.node(r).dummy})}function rte(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 fLe(t,e,r){if(e>r){var n=e;e=r,r=n}return Ve(t[e],r)}function dLe(t,e,r,n){var i={},a={},o={};return be(e,function(l){be(l,function(u,h){i[u]=u,a[u]=u,o[u]=h})}),be(e,function(l){var u=-1;be(l,function(h){var f=n(h);if(f.length){f=hc(f,function(y){return o[y]});for(var d=(f.length-1)/2,p=Math.floor(d),m=Math.ceil(d);p<=m;++p){var g=f[p];a[h]===h&&u<o[g]&&!fLe(r,h,g)&&(a[g]=h,a[h]=i[h]=i[g],u=o[g])}}})}),{root:i,align:a}}function pLe(t,e,r,n,i){var a={},o=mLe(t,e,r,i),l=i?"borderLeft":"borderRight";function u(d,p){for(var m=o.nodes(),g=m.pop(),y={};g;)y[g]?d(g):(y[g]=!0,m.push(g),m=m.concat(p(g))),g=m.pop()}s(u,"iterate");function h(d){a[d]=o.inEdges(d).reduce(function(p,m){return Math.max(p,a[m.v]+o.edge(m))},0)}s(h,"pass1");function f(d){var p=o.outEdges(d).reduce(function(g,y){return Math.min(g,a[y.w]-o.edge(y))},Number.POSITIVE_INFINITY),m=t.node(d);p!==Number.POSITIVE_INFINITY&&m.borderType!==l&&(a[d]=Math.max(a[d],p))}return s(f,"pass2"),u(h,o.predecessors.bind(o)),u(f,o.successors.bind(o)),be(n,function(d){a[d]=a[r[d]]}),a}function mLe(t,e,r,n){var i=new ir,a=t.graph(),o=xLe(a.nodesep,a.edgesep,n);return be(e,function(l){var u;be(l,function(h){var f=r[h];if(i.setNode(f),u){var d=r[u],p=i.edge(d,f);i.setEdge(d,f,Math.max(o(t,h,u),p||0))}u=h})}),i}function gLe(t,e){return Cd(nr(e),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return V9(r,function(a,o){var l=bLe(t,o)/2;n=Math.max(a+l,n),i=Math.min(a-l,i)}),n-i})}function yLe(t,e){var r=nr(e),n=pl(r),i=ws(r);be(["u","d"],function(a){be(["l","r"],function(o){var l=a+o,u=t[l],h;if(u!==e){var f=nr(u);h=o==="l"?n-pl(f):i-ws(f),h&&(t[l]=Ed(u,function(d){return d+h}))}})})}function vLe(t,e){return Ed(t.ul,function(r,n){if(e)return t[e.toLowerCase()][n];var i=hc(Ge(t,n));return(i[1]+i[2])/2})}function nte(t){var e=Wh(t),r=Nh(cLe(t,e),uLe(t,e)),n={},i;be(["u","d"],function(o){i=o==="u"?e:nr(e).reverse(),be(["l","r"],function(l){l==="r"&&(i=Ge(i,function(d){return nr(d).reverse()}));var u=(o==="u"?t.predecessors:t.successors).bind(t),h=dLe(t,i,r,u),f=pLe(t,i,h.root,h.align,l==="r");l==="r"&&(f=Ed(f,function(d){return-d})),n[o+l]=f})});var a=gLe(t,n);return yLe(n,a),vLe(n,t.graph().align)}function xLe(t,e,r){return function(n,i,a){var o=n.node(i),l=n.node(a),u=0,h;if(u+=o.width/2,Ve(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":h=-o.width/2;break;case"r":h=o.width/2;break}if(h&&(u+=r?h:-h),h=0,u+=(o.dummy?e:t)/2,u+=(l.dummy?e:t)/2,u+=l.width/2,Ve(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":h=l.width/2;break;case"r":h=-l.width/2;break}return h&&(u+=r?h:-h),h=0,u}}function bLe(t,e){return t.node(e).width}var ite=_(()=>{"use strict";Tt();la();dc();s(cLe,"findType1Conflicts");s(uLe,"findType2Conflicts");s(hLe,"findOtherInnerSegmentNode");s(rte,"addConflict");s(fLe,"hasConflict");s(dLe,"verticalAlignment");s(pLe,"horizontalCompaction");s(mLe,"buildBlockGraph");s(gLe,"findSmallestWidthAlignment");s(yLe,"alignCoordinates");s(vLe,"balance");s(nte,"positionX");s(xLe,"sep");s(bLe,"width")});function ate(t){t=Tk(t),kLe(t),U9(nte(t),function(e,r){t.node(r).x=e})}function kLe(t){var e=Wh(t),r=t.graph().ranksep,n=0;be(e,function(i){var a=ws(Ge(i,function(o){return t.node(o).height}));be(i,function(o){t.node(o).y=n+a/2}),n+=a+r})}var ste=_(()=>{"use strict";Tt();dc();ite();s(ate,"position");s(kLe,"positionY")});function eo(t,e){var r=e&&e.debugTiming?JJ:eee;r("layout",function(){var n=r(" buildLayoutGraph",function(){return MLe(t)});r(" runLayout",function(){wLe(n,r)}),r(" updateInputGraph",function(){TLe(t,n)})})}function wLe(t,e){e(" makeSpaceForEdgeLabels",function(){ILe(t)}),e(" removeSelfEdges",function(){VLe(t)}),e(" acyclic",function(){HJ(t)}),e(" nestingGraph.run",function(){Dee(t)}),e(" rank",function(){kL(Tk(t))}),e(" injectEdgeLabelProxies",function(){NLe(t)}),e(" removeEmptyRanks",function(){QJ(t)}),e(" nestingGraph.cleanup",function(){Mee(t)}),e(" normalizeRanks",function(){KJ(t)}),e(" assignRankMinMax",function(){OLe(t)}),e(" removeEdgeLabelProxies",function(){PLe(t)}),e(" normalize.run",function(){cee(t)}),e(" parentDummyChains",function(){ete(t)}),e(" addBorderSegments",function(){ree(t)}),e(" order",function(){Zee(t)}),e(" insertSelfEdges",function(){ULe(t)}),e(" adjustCoordinateSystem",function(){aee(t)}),e(" position",function(){ate(t)}),e(" positionSelfEdges",function(){qLe(t)}),e(" removeBorderNodes",function(){GLe(t)}),e(" normalize.undo",function(){uee(t)}),e(" fixupEdgeLabelCoords",function(){zLe(t)}),e(" undoCoordinateSystem",function(){see(t)}),e(" translateGraph",function(){BLe(t)}),e(" assignNodeIntersects",function(){FLe(t)}),e(" reversePoints",function(){$Le(t)}),e(" acyclic.undo",function(){YJ(t)})}function TLe(t,e){be(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))}),be(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Ve(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function MLe(t){var e=new ir({multigraph:!0,compound:!0}),r=CL(t.graph());return e.setGraph(Nh({},CLe,EL(r,ELe),Sd(r,SLe))),be(t.nodes(),function(n){var i=CL(t.node(n));e.setNode(n,Vh(EL(i,_Le),ALe)),e.setParent(n,t.parent(n))}),be(t.edges(),function(n){var i=CL(t.edge(n));e.setEdge(n,Nh({},DLe,EL(i,LLe),Sd(i,RLe)))}),e}function ILe(t){var e=t.graph();e.ranksep/=2,be(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 NLe(t){be(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};fc(t,"edge-proxy",a,"_ep")}})}function OLe(t){var e=0;be(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=ws(e,n.maxRank))}),t.graph().maxRank=e}function PLe(t){be(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function BLe(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),o=a.marginx||0,l=a.marginy||0;function u(h){var f=h.x,d=h.y,p=h.width,m=h.height;e=Math.min(e,f-p/2),r=Math.max(r,f+p/2),n=Math.min(n,d-m/2),i=Math.max(i,d+m/2)}s(u,"getExtremes"),be(t.nodes(),function(h){u(t.node(h))}),be(t.edges(),function(h){var f=t.edge(h);Ve(f,"x")&&u(f)}),e-=o,n-=l,be(t.nodes(),function(h){var f=t.node(h);f.x-=e,f.y-=n}),be(t.edges(),function(h){var f=t.edge(h);be(f.points,function(d){d.x-=e,d.y-=n}),Ve(f,"x")&&(f.x-=e),Ve(f,"y")&&(f.y-=n)}),a.width=r-e+o,a.height=i-n+l}function FLe(t){be(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=n),r.points.unshift(iL(n,a)),r.points.push(iL(i,o))})}function zLe(t){be(t.edges(),function(e){var r=t.edge(e);if(Ve(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 $Le(t){be(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function GLe(t){be(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(sa(r.borderLeft)),o=t.node(sa(r.borderRight));r.width=Math.abs(o.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}}),be(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function VLe(t){be(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 ULe(t){var e=Wh(t);be(e,function(r){var n=0;be(r,function(i,a){var o=t.node(i);o.order=a+n,be(o.selfEdges,function(l){fc(t,"selfedge",{width:l.label.width,height:l.label.height,rank:o.rank,order:a+ ++n,e:l.e,label:l.label},"_se")}),delete o.selfEdges})})}function qLe(t){be(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,o=r.x-i,l=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-l},{x:i+5*o/6,y:a-l},{x:i+o,y:a},{x:i+5*o/6,y:a+l},{x:i+2*o/3,y:a+l}],r.label.x=r.x,r.label.y=r.y}})}function EL(t,e){return Ed(Sd(t,e),Number)}function CL(t){var e={};return be(t,function(r,n){e[n.toLowerCase()]=r}),e}var ELe,CLe,SLe,_Le,ALe,LLe,DLe,RLe,ote=_(()=>{"use strict";Tt();la();nee();lee();nL();cL();wL();Iee();Jee();tte();ste();dc();s(eo,"layout");s(wLe,"runLayout");s(TLe,"updateInputGraph");ELe=["nodesep","edgesep","ranksep","marginx","marginy"],CLe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},SLe=["acyclicer","ranker","rankdir","align"],_Le=["width","height"],ALe={width:0,height:0},LLe=["minlen","weight","width","height","labeloffset"],DLe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},RLe=["labelpos"];s(MLe,"buildLayoutGraph");s(ILe,"makeSpaceForEdgeLabels");s(NLe,"injectEdgeLabelProxies");s(OLe,"assignRankMinMax");s(PLe,"removeEdgeLabelProxies");s(BLe,"translateGraph");s(FLe,"assignNodeIntersects");s(zLe,"fixupEdgeLabelCoords");s($Le,"reversePointsForReversedEdges");s(GLe,"removeBorderNodes");s(VLe,"removeSelfEdges");s(ULe,"insertSelfEdges");s(qLe,"positionSelfEdges");s(EL,"selectNumberAttrs");s(CL,"canonicalize")});var Dd=_(()=>{"use strict";nL();ote();cL();wL()});function Mn(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:WLe(t),edges:HLe(t)};return jt(t.graph())||(e.value=Hr(t.graph())),e}function WLe(t){return Ge(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return jt(r)||(i.value=r),jt(n)||(i.parent=n),i})}function HLe(t){return Ge(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return jt(e.name)||(n.name=e.name),jt(r)||(n.value=r),n})}var vv=_(()=>{"use strict";Tt();kk();s(Mn,"write");s(WLe,"writeNodes");s(HLe,"writeEdges")});var Yt,Rd,lte,cte,Lk,YLe,ute,hte,XLe,km,Ak,fte,dte,pte,mte,gte=_(()=>{"use strict";it();la();vv();Yt=new Map,Rd=new Map,lte=new Map,cte=s(()=>{Rd.clear(),lte.clear(),Yt.clear()},"clear"),Lk=s((t,e)=>{let r=Rd.get(e)||[];return V.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),YLe=s((t,e)=>{let r=Rd.get(e)||[];return V.info("Descendants of ",e," is ",r),V.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||Lk(t.v,e)||Lk(t.w,e)||r.includes(t.w):(V.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),ute=s((t,e,r,n)=>{V.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),V.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)ute(a,e,r,n);else{let o=e.node(a);V.info("cp ",a," to ",n," with parent ",t),r.setNode(a,o),n!==e.parent(a)&&(V.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(V.debug("Setting parent",a,t),r.setParent(a,t)):(V.info("In copy ",t,"root",n,"data",e.node(t),n),V.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let l=e.edges(a);V.debug("Copying Edges",l),l.forEach(u=>{V.info("Edge",u);let h=e.edge(u.v,u.w,u.name);V.info("Edge data",h,n);try{YLe(u,n)?(V.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),V.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):V.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",t)}catch(f){V.error(f)}})}V.debug("Removing node",a),e.removeNode(a)})},"copy"),hte=s((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)lte.set(i,t),n=[...n,...hte(i,e)];return n},"extractDescendants"),XLe=s((t,e,r)=>{let n=t.edges().filter(u=>u.v===e||u.w===e),i=t.edges().filter(u=>u.v===r||u.w===r),a=n.map(u=>({v:u.v===e?r:u.v,w:u.w===e?e:u.w})),o=i.map(u=>({v:u.v,w:u.w}));return a.filter(u=>o.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),km=s((t,e,r)=>{let n=e.children(t);if(V.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(let a of n){let o=km(a,e,r),l=XLe(e,r,o);if(o)if(l.length>0)i=o;else return o}return i},"findNonClusterChild"),Ak=s(t=>!Yt.has(t)||!Yt.get(t).externalConnections?t:Yt.has(t)?Yt.get(t).id:t,"getAnchorId"),fte=s((t,e)=>{if(!t||e>10){V.debug("Opting out, no graph ");return}else V.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(V.warn("Cluster identified",r," Replacement id in edges: ",km(r,t,r)),Rd.set(r,hte(r,t)),Yt.set(r,{id:km(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(V.debug("Cluster identified",r,Rd),i.forEach(a=>{let o=Lk(a.v,r),l=Lk(a.w,r);o^l&&(V.warn("Edge: ",a," leaves cluster ",r),V.warn("Descendants of XXX ",r,": ",Rd.get(r)),Yt.get(r).externalConnections=!0)})):V.debug("Not a cluster ",r,Rd)});for(let r of Yt.keys()){let n=Yt.get(r).id,i=t.parent(n);i!==r&&Yt.has(i)&&!Yt.get(i).externalConnections&&(Yt.get(r).id=i)}t.edges().forEach(function(r){let n=t.edge(r);V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(V.warn("Fix XXX",Yt,"ids:",r.v,r.w,"Translating: ",Yt.get(r.v)," --- ",Yt.get(r.w)),Yt.get(r.v)&&Yt.get(r.w)&&Yt.get(r.v)===Yt.get(r.w)){V.warn("Fixing and trying link to self - removing XXX",r.v,r.w,r.name),V.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Ak(r.v),a=Ak(r.w),t.removeEdge(r.v,r.w,r.name);let o=r.w+"---"+r.v+"---1",l=r.w+"---"+r.v+"---2";t.setNode(o,{domId:o,id:o,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setNode(l,{domId:l,id:l,labelStyle:"",padding:0,shape:"labelRect",style:"",width:10,height:10});let u=structuredClone(n),h=structuredClone(n),f=structuredClone(n);u.label="",u.arrowTypeEnd="none",u.id=r.name+"-cyclic-special-1",h.arrowTypeEnd="none",h.id=r.name+"-cyclic-special-mid",f.label="",u.fromCluster=r.v,f.toCluster=r.v,f.id=r.name+"-cyclic-special-2",t.setEdge(i,o,u,r.name+"-cyclic-special-0"),t.setEdge(o,l,h,r.name+"-cyclic-special-1"),t.setEdge(l,a,f,r.name+"-cyclic-special-2")}else if(Yt.get(r.v)||Yt.get(r.w)){if(V.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Ak(r.v),a=Ak(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let o=t.parent(i);Yt.get(o).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let o=t.parent(a);Yt.get(o).externalConnections=!0,n.toCluster=r.w}V.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),V.warn("Adjusted Graph",Mn(t)),dte(t,0),V.trace(Yt)},"adjustClustersAndEdges"),dte=s((t,e)=>{if(V.warn("extractor - ",e,Mn(t),t.children("D")),e>10){V.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){V.debug("Done, no node has children",t.nodes());return}V.debug("Nodes = ",r,e);for(let i of r)if(V.debug("Extracting node",i,Yt,Yt.has(i)&&!Yt.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!Yt.has(i))V.debug("Not a cluster",i,e);else if(!Yt.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){V.warn("Cluster without external connections, without a parent and with children",i,e);let o=t.graph().rankdir==="TB"?"LR":"TB";Yt.get(i)?.clusterData?.dir&&(o=Yt.get(i).clusterData.dir,V.warn("Fixing dir",Yt.get(i).clusterData.dir,o));let l=new ir({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});V.warn("Old graph before copy",Mn(t)),ute(i,t,l,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Yt.get(i).clusterData,label:Yt.get(i).label,graph:l}),V.warn("New graph after copy node: (",i,")",Mn(l)),V.debug("Old graph after copy",Mn(t))}else V.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Yt.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),V.debug(Yt);r=t.nodes(),V.warn("New list of nodes",r);for(let i of r){let a=t.node(i);V.warn(" Now next level",i,a),a.clusterNode&&dte(a.graph,e+1)}},"extractor"),pte=s((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{let i=t.children(n),a=pte(t,i);r=[...r,...a]}),r},"sorter"),mte=s(t=>pte(t,t.children()),"sortNodesByHierarchy")});var vte={};ur(vte,{render:()=>jLe});var yte,jLe,xte=_(()=>{"use strict";Dd();vv();la();o9();Xn();gte();h9();i9();s9();it();gd();gt();yte=s(async(t,e,r,n,i,a)=>{V.info("Graph in recursive render: XXX",Mn(e),i);let o=e.graph().rankdir;V.trace("Dir in recursive render - dir:",o);let l=t.insert("g").attr("class","root");e.nodes()?V.info("Recursive render XXX",e.nodes()):V.info("No nodes found for",e),e.edges().length>0&&V.info("Recursive edges",e.edge(e.edges()[0]));let u=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),f=l.insert("g").attr("class","edgeLabels"),d=l.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(y){let v=e.node(y);if(i!==void 0){let x=JSON.parse(JSON.stringify(i.clusterData));V.trace(`Setting data for parent cluster XXX
Node.id = `,y,`
data=`,x.height,`
Parent cluster`,i.height),e.setNode(i.id,x),e.parent(y)||(V.trace("Setting parent",y,i.id),e.setParent(y,i.id,x))}if(V.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),v?.clusterNode){V.info("Cluster identified XBX",y,v.width,e.node(y));let{ranksep:x,nodesep:b}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:x+25,nodesep:b});let k=await yte(d,v.graph,r,n,e.node(y),a),A=k.elem;er(v,A),v.diff=k.diff||0,V.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),Fj(A,v)}else e.children(y).length>0?(V.info("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",e),V.info(km(v.id,e)),Yt.set(v.id,{id:km(v.id,e),node:v})):(V.trace("Node - the non recursive path XAX",y,v.id,v),await C5(d,e.node(y),o))})),await s(async()=>{let y=e.edges().map(async function(v){let x=e.edge(v.v,v.w,v.name);V.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),V.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),V.info("Fix",Yt,"ids:",v.v,v.w,"Translating: ",Yt.get(v.v),Yt.get(v.w)),await b5(f,x)});await Promise.all(y)},"processEdges")(),V.info("Graph before layout:",JSON.stringify(Mn(e))),V.info("############################################# XXX"),V.info("### Layout ### XXX"),V.info("############################################# XXX"),eo(e),V.info("Graph after layout:",JSON.stringify(Mn(e)));let m=0,{subGraphTitleTotalMargin:g}=Ks(a);return await Promise.all(mte(e).map(async function(y){let v=e.node(y);if(V.info("Position XBX => "+y+": ("+v.x,","+v.y,") width: ",v.width," height: ",v.height),v?.clusterNode)v.y+=g,V.info("A tainted cluster node XBX1",y,v.id,v.width,v.height,v.x,v.y,e.parent(y)),Yt.get(v.id).node=v,u9(v);else if(e.children(y).length>0){V.info("A pure cluster node XBX1",y,v.id,v.x,v.y,v.width,v.height,e.parent(y)),v.height+=g,e.node(v.parentId);let x=v?.padding/2||0,b=v?.labelBBox?.height||0,k=b-x||0;V.debug("OffsetY",k,"labelHeight",b,"halfPadding",x),await p5(u,v),Yt.get(v.id).node=v}else{let x=e.node(v.parentId);v.y+=g/2,V.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",x,x?.offsetY,v),u9(v)}})),e.edges().forEach(function(y){let v=e.edge(y);V.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(v),v),v.points.forEach(A=>A.y+=g/2);let x=e.node(y.v);var b=e.node(y.w);let k=w5(h,v,Yt,r,x,b,n);k5(v,k)}),e.nodes().forEach(function(y){let v=e.node(y);V.info(y,v.type,v.diff),v.isGroup&&(m=v.diff)}),V.warn("Returning from recursive render XAX",l,m),{elem:l,diff:m}},"recursiveRender"),jLe=s(async(t,e)=>{let r=new ir({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");T5(n,t.markers,t.type,t.diagramId),zj(),FX(),MX(),cte(),t.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),V.debug("Edges:",t.edges),t.edges.forEach(a=>{r.setEdge(a.start,a.end,{...a},a.id)}),V.warn("Graph at first:",JSON.stringify(Mn(r))),fte(r),V.warn("Graph after:",JSON.stringify(Mn(r)));let i=le();await yte(n,r,t.type,t.diagramId,void 0,i)},"render")});var xv,SL,KLe,Dk,bte,Rk=_(()=>{"use strict";Gj();it();xv={},SL=s(t=>{for(let e of t)xv[e.name]=e},"registerLayoutLoaders"),KLe=s(()=>{SL([{name:"dagre",loader:s(async()=>await Promise.resolve().then(()=>(xte(),vte)),"loader")}])},"registerDefaultLayoutLoaders");KLe();Dk=s(async(t,e)=>{if(!(t.layoutAlgorithm in xv))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=xv[t.layoutAlgorithm];return(await r.loader()).render(t,e,$j,{algorithm:r.algorithm})},"render"),bte=s((t="",{fallback:e="dagre"}={})=>{if(t in xv)return t;if(e in xv)return V.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 Mk,QLe,ZLe,_L=_(()=>{"use strict";Un();it();Mk=s((t,e,r,n)=>{t.attr("class",r);let{width:i,height:a,x:o,y:l}=QLe(t,e);xr(t,a,i,n);let u=ZLe(o,l,i,a,e);t.attr("viewBox",u),V.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),QLe=s((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"),ZLe=s((t,e,r,n,i)=>`${t-i} ${e-i} ${r} ${n}`,"createViewBox")});var JLe,eDe,kte,wte=_(()=>{"use strict";Xt();gt();it();zA();Rk();_L();pr();wA();JLe=s(function(t,e){return e.db.getClasses()},"getClasses"),eDe=s(async function(t,e,r,n){V.info("REF0:"),V.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:o}=le(),l;i==="sandbox"&&(l=Me("#i"+e));let u=i==="sandbox"?l.nodes()[0].contentDocument:document;V.debug("Before getData: ");let h=n.db.getData();V.debug("Data: ",h);let f=n5(e,i),d=kA();h.type=n.type,h.layoutAlgorithm=bte(o),h.layoutAlgorithm==="dagre"&&o==="elk"&&V.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=a?.nodeSpacing||50,h.rankSpacing=a?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=e,V.debug("REF1:",h),await Dk(h,f);let p=h.config.flowchart?.diagramPadding??8;dt.insertTitle(f,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),Mk(f,p,"flowchart",a?.useMaxWidth||!1);for(let m of h.nodes){let g=Me(`#${e} [id="${m.id}"]`);if(!g||!m.link)continue;let y=u.createElementNS("http://www.w3.org/2000/svg","a");y.setAttributeNS("http://www.w3.org/2000/svg","class",m.cssClasses),y.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?y.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):m.linkTarget&&y.setAttributeNS("http://www.w3.org/2000/svg","target",m.linkTarget);let v=g.insert(function(){return y},":first-child"),x=g.select(".label-container");x&&v.append(function(){return x.node()});let b=g.select(".label");b&&v.append(function(){return b.node()})}},"draw"),kte={getClasses:JLe,draw:eDe}});var AL,Tte,Ete=_(()=>{"use strict";AL=function(){var t=s(function(ts,at,xt,Ft){for(xt=xt||{},Ft=ts.length;Ft--;xt[ts[Ft]]=at);return xt},"o"),e=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],a=[2,2],o=[1,13],l=[1,14],u=[1,15],h=[1,16],f=[1,23],d=[1,25],p=[1,26],m=[1,27],g=[1,49],y=[1,48],v=[1,29],x=[1,30],b=[1,31],k=[1,32],A=[1,33],w=[1,44],T=[1,46],C=[1,42],E=[1,47],S=[1,43],R=[1,50],D=[1,45],L=[1,51],P=[1,52],M=[1,34],F=[1,35],I=[1,36],O=[1,37],z=[1,57],N=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],U=[1,61],$=[1,60],W=[1,62],ee=[8,9,11,73,75],te=[1,88],ce=[1,93],Z=[1,92],fe=[1,89],ne=[1,85],H=[1,91],Q=[1,87],K=[1,94],re=[1,90],ie=[1,95],ye=[1,86],j=[8,9,10,11,73,75],De=[8,9,10,11,44,73,75],oe=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],Re=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],Pe=[42,58,86,99,102,103,106,108,111,112,113],Se=[1,121],Ue=[1,120],Oe=[1,128],_e=[1,142],he=[1,143],q=[1,144],se=[1,145],ue=[1,130],X=[1,132],ae=[1,136],pe=[1,137],de=[1,138],Ie=[1,139],Ne=[1,140],Be=[1,141],ze=[1,146],qe=[1,147],Fe=[1,126],we=[1,127],Je=[1,134],We=[1,129],or=[1,133],Cr=[1,131],Ut=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],ar=[1,149],ut=[8,9,11],Rt=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],Qe=[1,169],Dt=[1,165],qt=[1,166],yt=[1,170],Et=[1,167],pt=[1,168],Wt=[75,113,116],ot=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],fr=[10,103],vt=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],Bt=[1,235],Sr=[1,233],zi=[1,237],rr=[1,231],Vn=[1,232],Tn=[1,234],Ki=[1,236],ci=[1,238],Pa=[1,255],En=[8,9,11,103],ti=[8,9,10,11,58,81,102,103,106,107,108,109],co={trace:s(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,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$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",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"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],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,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],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:s(function(at,xt,Ft,Ke,Zt,me,Fc){var xe=me.length-1;switch(Zt){case 2:this.$=[];break;case 3:(!Array.isArray(me[xe])||me[xe].length>0)&&me[xe-1].push(me[xe]),this.$=me[xe-1];break;case 4:case 176:this.$=me[xe];break;case 11:Ke.setDirection("TB"),this.$="TB";break;case 12:Ke.setDirection(me[xe-1]),this.$=me[xe-1];break;case 27:this.$=me[xe-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=Ke.addSubGraph(me[xe-6],me[xe-1],me[xe-4]);break;case 34:this.$=Ke.addSubGraph(me[xe-3],me[xe-1],me[xe-3]);break;case 35:this.$=Ke.addSubGraph(void 0,me[xe-1],void 0);break;case 37:this.$=me[xe].trim(),Ke.setAccTitle(this.$);break;case 38:case 39:this.$=me[xe].trim(),Ke.setAccDescription(this.$);break;case 43:Ke.addLink(me[xe-2].stmt,me[xe],me[xe-1]),this.$={stmt:me[xe],nodes:me[xe].concat(me[xe-2].nodes)};break;case 44:Ke.addLink(me[xe-3].stmt,me[xe-1],me[xe-2]),this.$={stmt:me[xe-1],nodes:me[xe-1].concat(me[xe-3].nodes)};break;case 45:this.$={stmt:me[xe-1],nodes:me[xe-1]};break;case 46:this.$={stmt:me[xe],nodes:me[xe]};break;case 47:this.$=[me[xe]];break;case 48:this.$=me[xe-4].concat(me[xe]);break;case 49:this.$=me[xe];break;case 50:this.$=me[xe-2],Ke.setClass(me[xe-2],me[xe]);break;case 51:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"square");break;case 52:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"doublecircle");break;case 53:this.$=me[xe-5],Ke.addVertex(me[xe-5],me[xe-2],"circle");break;case 54:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"ellipse");break;case 55:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"stadium");break;case 56:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"subroutine");break;case 57:this.$=me[xe-7],Ke.addVertex(me[xe-7],me[xe-1],"rect",void 0,void 0,void 0,Object.fromEntries([[me[xe-5],me[xe-3]]]));break;case 58:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"cylinder");break;case 59:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"round");break;case 60:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"diamond");break;case 61:this.$=me[xe-5],Ke.addVertex(me[xe-5],me[xe-2],"hexagon");break;case 62:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"odd");break;case 63:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"trapezoid");break;case 64:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"inv_trapezoid");break;case 65:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"lean_right");break;case 66:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"lean_left");break;case 67:this.$=me[xe],Ke.addVertex(me[xe]);break;case 68:me[xe-1].text=me[xe],this.$=me[xe-1];break;case 69:case 70:me[xe-2].text=me[xe-1],this.$=me[xe-2];break;case 71:this.$=me[xe];break;case 72:var xi=Ke.destructLink(me[xe],me[xe-2]);this.$={type:xi.type,stroke:xi.stroke,length:xi.length,text:me[xe-1]};break;case 73:this.$={text:me[xe],type:"text"};break;case 74:this.$={text:me[xe-1].text+""+me[xe],type:me[xe-1].type};break;case 75:this.$={text:me[xe],type:"string"};break;case 76:this.$={text:me[xe],type:"markdown"};break;case 77:var xi=Ke.destructLink(me[xe]);this.$={type:xi.type,stroke:xi.stroke,length:xi.length};break;case 78:this.$=me[xe-1];break;case 79:this.$={text:me[xe],type:"text"};break;case 80:this.$={text:me[xe-1].text+""+me[xe],type:me[xe-1].type};break;case 81:this.$={text:me[xe],type:"string"};break;case 82:case 97:this.$={text:me[xe],type:"markdown"};break;case 94:this.$={text:me[xe],type:"text"};break;case 95:this.$={text:me[xe-1].text+""+me[xe],type:me[xe-1].type};break;case 96:this.$={text:me[xe],type:"text"};break;case 98:this.$=me[xe-4],Ke.addClass(me[xe-2],me[xe]);break;case 99:this.$=me[xe-4],Ke.setClass(me[xe-2],me[xe]);break;case 100:case 108:this.$=me[xe-1],Ke.setClickEvent(me[xe-1],me[xe]);break;case 101:case 109:this.$=me[xe-3],Ke.setClickEvent(me[xe-3],me[xe-2]),Ke.setTooltip(me[xe-3],me[xe]);break;case 102:this.$=me[xe-2],Ke.setClickEvent(me[xe-2],me[xe-1],me[xe]);break;case 103:this.$=me[xe-4],Ke.setClickEvent(me[xe-4],me[xe-3],me[xe-2]),Ke.setTooltip(me[xe-4],me[xe]);break;case 104:this.$=me[xe-2],Ke.setLink(me[xe-2],me[xe]);break;case 105:this.$=me[xe-4],Ke.setLink(me[xe-4],me[xe-2]),Ke.setTooltip(me[xe-4],me[xe]);break;case 106:this.$=me[xe-4],Ke.setLink(me[xe-4],me[xe-2],me[xe]);break;case 107:this.$=me[xe-6],Ke.setLink(me[xe-6],me[xe-4],me[xe]),Ke.setTooltip(me[xe-6],me[xe-2]);break;case 110:this.$=me[xe-1],Ke.setLink(me[xe-1],me[xe]);break;case 111:this.$=me[xe-3],Ke.setLink(me[xe-3],me[xe-2]),Ke.setTooltip(me[xe-3],me[xe]);break;case 112:this.$=me[xe-3],Ke.setLink(me[xe-3],me[xe-2],me[xe]);break;case 113:this.$=me[xe-5],Ke.setLink(me[xe-5],me[xe-4],me[xe]),Ke.setTooltip(me[xe-5],me[xe-2]);break;case 114:this.$=me[xe-4],Ke.addVertex(me[xe-2],void 0,void 0,me[xe]);break;case 115:this.$=me[xe-4],Ke.updateLink([me[xe-2]],me[xe]);break;case 116:this.$=me[xe-4],Ke.updateLink(me[xe-2],me[xe]);break;case 117:this.$=me[xe-8],Ke.updateLinkInterpolate([me[xe-6]],me[xe-2]),Ke.updateLink([me[xe-6]],me[xe]);break;case 118:this.$=me[xe-8],Ke.updateLinkInterpolate(me[xe-6],me[xe-2]),Ke.updateLink(me[xe-6],me[xe]);break;case 119:this.$=me[xe-6],Ke.updateLinkInterpolate([me[xe-4]],me[xe]);break;case 120:this.$=me[xe-6],Ke.updateLinkInterpolate(me[xe-4],me[xe]);break;case 121:case 123:this.$=[me[xe]];break;case 122:case 124:me[xe-2].push(me[xe]),this.$=me[xe-2];break;case 126:this.$=me[xe-1]+me[xe];break;case 174:this.$=me[xe];break;case 175:this.$=me[xe-1]+""+me[xe];break;case 177:this.$=me[xe-1]+""+me[xe];break;case 178:this.$={stmt:"dir",value:"TB"};break;case 179:this.$={stmt:"dir",value:"BT"};break;case 180:this.$={stmt:"dir",value:"RL"};break;case 181: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:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:k,85:A,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P,118:M,119:F,120:I,121:O},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:z,15:53,18:56},t(N,[2,3]),t(N,[2,4]),t(N,[2,5]),t(N,[2,6]),t(N,[2,7]),t(N,[2,8]),{8:U,9:$,11:W,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:U,9:$,11:W,21:66},{8:U,9:$,11:W,21:67},{8:U,9:$,11:W,21:68},{8:U,9:$,11:W,21:69},{8:U,9:$,11:W,21:70},{8:U,9:$,10:[1,71],11:W,21:72},t(N,[2,36]),{35:[1,73]},{37:[1,74]},t(N,[2,39]),t(ee,[2,46],{18:75,10:z}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:te,42:ce,58:Z,77:[1,83],86:fe,92:[1,80],94:[1,81],98:82,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye,117:84},t(N,[2,178]),t(N,[2,179]),t(N,[2,180]),t(N,[2,181]),t(j,[2,47]),t(j,[2,49],{44:[1,96]}),t(De,[2,67],{110:109,29:[1,97],42:g,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:y,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:w,99:T,102:C,103:E,106:S,108:R,111:D,112:L,113:P}),t(oe,[2,174]),t(oe,[2,135]),t(oe,[2,136]),t(oe,[2,137]),t(oe,[2,138]),t(oe,[2,139]),t(oe,[2,140]),t(oe,[2,141]),t(oe,[2,142]),t(oe,[2,143]),t(oe,[2,144]),t(oe,[2,145]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,110]},t(Re,[2,26],{18:111,10:z}),t(N,[2,27]),{40:112,41:38,42:g,43:39,45:40,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},t(N,[2,40]),t(N,[2,41]),t(N,[2,42]),t(Pe,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:Se,116:Ue},t([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),t(N,[2,28]),t(N,[2,29]),t(N,[2,30]),t(N,[2,31]),t(N,[2,32]),{10:Oe,12:_e,14:he,27:q,28:122,32:se,42:ue,58:X,73:ae,77:[1,124],78:[1,125],80:135,81:pe,82:de,83:Ie,84:Ne,85:Be,86:ze,87:qe,88:123,102:Fe,106:we,108:Je,111:We,112:or,113:Cr},t(Ut,a,{5:148}),t(N,[2,37]),t(N,[2,38]),t(ee,[2,45],{42:ar}),{42:g,45:150,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},{99:[1,151],100:152,102:[1,153]},{42:g,45:154,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},{42:g,45:155,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},t(ut,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},t(ut,[2,108],{117:160,10:[1,159],14:te,42:ce,58:Z,86:fe,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye}),t(ut,[2,110],{10:[1,161]}),t(Rt,[2,176]),t(Rt,[2,163]),t(Rt,[2,164]),t(Rt,[2,165]),t(Rt,[2,166]),t(Rt,[2,167]),t(Rt,[2,168]),t(Rt,[2,169]),t(Rt,[2,170]),t(Rt,[2,171]),t(Rt,[2,172]),t(Rt,[2,173]),{42:g,45:162,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},{30:163,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:171,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:173,48:[1,172],65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:174,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:175,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:176,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{106:[1,177]},{30:178,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:179,63:[1,180],65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:181,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:182,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:183,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},t(oe,[2,175]),t(i,[2,20]),t(Re,[2,25]),t(ee,[2,43],{18:184,10:z}),t(Pe,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{75:[1,188],76:189,113:Se,116:Ue},t(Wt,[2,73]),t(Wt,[2,75]),t(Wt,[2,76]),t(Wt,[2,161]),t(Wt,[2,162]),{8:U,9:$,10:Oe,11:W,12:_e,14:he,21:191,27:q,29:[1,190],32:se,42:ue,58:X,73:ae,80:135,81:pe,82:de,83:Ie,84:Ne,85:Be,86:ze,87:qe,88:192,102:Fe,106:we,108:Je,111:We,112:or,113:Cr},t(ot,[2,94]),t(ot,[2,96]),t(ot,[2,97]),t(ot,[2,150]),t(ot,[2,151]),t(ot,[2,152]),t(ot,[2,153]),t(ot,[2,154]),t(ot,[2,155]),t(ot,[2,156]),t(ot,[2,157]),t(ot,[2,158]),t(ot,[2,159]),t(ot,[2,160]),t(ot,[2,83]),t(ot,[2,84]),t(ot,[2,85]),t(ot,[2,86]),t(ot,[2,87]),t(ot,[2,88]),t(ot,[2,89]),t(ot,[2,90]),t(ot,[2,91]),t(ot,[2,92]),t(ot,[2,93]),{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,193],33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:k,85:A,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P,118:M,119:F,120:I,121:O},{10:z,18:194},{10:[1,195],42:g,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:109,111:D,112:L,113:P},{10:[1,196]},{10:[1,197],103:[1,198]},t(fr,[2,121]),{10:[1,199],42:g,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:109,111:D,112:L,113:P},{10:[1,200],42:g,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:109,111:D,112:L,113:P},{77:[1,201]},t(ut,[2,102],{10:[1,202]}),t(ut,[2,104],{10:[1,203]}),{77:[1,204]},t(Rt,[2,177]),{77:[1,205],95:[1,206]},t(j,[2,50],{110:109,42:g,58:y,86:w,99:T,102:C,103:E,106:S,108:R,111:D,112:L,113:P}),{31:[1,207],65:Qe,79:208,113:yt,114:Et,115:pt},t(vt,[2,79]),t(vt,[2,81]),t(vt,[2,82]),t(vt,[2,146]),t(vt,[2,147]),t(vt,[2,148]),t(vt,[2,149]),{47:[1,209],65:Qe,79:208,113:yt,114:Et,115:pt},{30:210,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{49:[1,211],65:Qe,79:208,113:yt,114:Et,115:pt},{51:[1,212],65:Qe,79:208,113:yt,114:Et,115:pt},{53:[1,213],65:Qe,79:208,113:yt,114:Et,115:pt},{55:[1,214],65:Qe,79:208,113:yt,114:Et,115:pt},{58:[1,215]},{62:[1,216],65:Qe,79:208,113:yt,114:Et,115:pt},{64:[1,217],65:Qe,79:208,113:yt,114:Et,115:pt},{30:218,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{31:[1,219],65:Qe,79:208,113:yt,114:Et,115:pt},{65:Qe,67:[1,220],69:[1,221],79:208,113:yt,114:Et,115:pt},{65:Qe,67:[1,223],69:[1,222],79:208,113:yt,114:Et,115:pt},t(ee,[2,44],{42:ar}),t(Pe,[2,70]),t(Pe,[2,69]),{60:[1,224],65:Qe,79:208,113:yt,114:Et,115:pt},t(Pe,[2,72]),t(Wt,[2,74]),{30:225,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},t(Ut,a,{5:226}),t(ot,[2,95]),t(N,[2,35]),{41:227,42:g,43:39,45:40,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},{10:Bt,58:Sr,81:zi,89:228,102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},{10:Bt,58:Sr,81:zi,89:239,101:[1,240],102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},{10:Bt,58:Sr,81:zi,89:241,101:[1,242],102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},{102:[1,243]},{10:Bt,58:Sr,81:zi,89:244,102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},{42:g,45:245,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},t(ut,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},t(ut,[2,109]),t(ut,[2,111],{10:[1,249]}),t(ut,[2,112]),t(De,[2,51]),t(vt,[2,80]),t(De,[2,52]),{49:[1,250],65:Qe,79:208,113:yt,114:Et,115:pt},t(De,[2,59]),t(De,[2,54]),t(De,[2,55]),t(De,[2,56]),{106:[1,251]},t(De,[2,58]),t(De,[2,60]),{64:[1,252],65:Qe,79:208,113:yt,114:Et,115:pt},t(De,[2,62]),t(De,[2,63]),t(De,[2,65]),t(De,[2,64]),t(De,[2,66]),t([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:Qe,79:208,113:yt,114:Et,115:pt},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,254],33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:k,85:A,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P,118:M,119:F,120:I,121:O},t(j,[2,48]),t(ut,[2,114],{103:Pa}),t(En,[2,123],{105:256,10:Bt,58:Sr,81:zi,102:rr,106:Vn,107:Tn,108:Ki,109:ci}),t(ti,[2,125]),t(ti,[2,127]),t(ti,[2,128]),t(ti,[2,129]),t(ti,[2,130]),t(ti,[2,131]),t(ti,[2,132]),t(ti,[2,133]),t(ti,[2,134]),t(ut,[2,115],{103:Pa}),{10:[1,257]},t(ut,[2,116],{103:Pa}),{10:[1,258]},t(fr,[2,122]),t(ut,[2,98],{103:Pa}),t(ut,[2,99],{110:109,42:g,58:y,86:w,99:T,102:C,103:E,106:S,108:R,111:D,112:L,113:P}),t(ut,[2,103]),t(ut,[2,105],{10:[1,259]}),t(ut,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:U,9:$,11:W,21:264},t(N,[2,34]),{10:Bt,58:Sr,81:zi,102:rr,104:265,105:230,106:Vn,107:Tn,108:Ki,109:ci},t(ti,[2,126]),{14:te,42:ce,58:Z,86:fe,98:266,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye,117:84},{14:te,42:ce,58:Z,86:fe,98:267,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye,117:84},{95:[1,268]},t(ut,[2,113]),t(De,[2,53]),{30:269,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},t(De,[2,61]),t(Ut,a,{5:270}),t(En,[2,124],{105:256,10:Bt,58:Sr,81:zi,102:rr,106:Vn,107:Tn,108:Ki,109:ci}),t(ut,[2,119],{117:160,10:[1,271],14:te,42:ce,58:Z,86:fe,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye}),t(ut,[2,120],{117:160,10:[1,272],14:te,42:ce,58:Z,86:fe,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye}),t(ut,[2,107]),{31:[1,273],65:Qe,79:208,113:yt,114:Et,115:pt},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,274],33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:k,85:A,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P,118:M,119:F,120:I,121:O},{10:Bt,58:Sr,81:zi,89:275,102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},{10:Bt,58:Sr,81:zi,89:276,102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},t(De,[2,57]),t(N,[2,33]),t(ut,[2,117],{103:Pa}),t(ut,[2,118],{103:Pa})],defaultActions:{},parseError:s(function(at,xt){if(xt.recoverable)this.trace(at);else{var Ft=new Error(at);throw Ft.hash=xt,Ft}},"parseError"),parse:s(function(at){var xt=this,Ft=[0],Ke=[],Zt=[null],me=[],Fc=this.table,xe="",xi=0,zc=0,g1=0,ib=2,y1=1,v1=me.slice.call(arguments,1),ri=Object.create(this.lexer),ho={yy:{}};for(var Zu in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Zu)&&(ho.yy[Zu]=this.yy[Zu]);ri.setInput(at,ho.yy),ho.yy.lexer=ri,ho.yy.parser=this,typeof ri.yylloc>"u"&&(ri.yylloc={});var Ps=ri.yylloc;me.push(Ps);var Ju=ri.options&&ri.options.ranges;typeof ho.yy.parseError=="function"?this.parseError=ho.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ab(xa){Ft.length=Ft.length-2*xa,Zt.length=Zt.length-xa,me.length=me.length-xa}s(ab,"popStack");function x1(){var xa;return xa=Ke.pop()||ri.lex()||y1,typeof xa!="number"&&(xa instanceof Array&&(Ke=xa,xa=Ke.pop()),xa=xt.symbols_[xa]||xa),xa}s(x1,"lex");for(var Qi,$c,Gc,rs,bi,Ml,eh={},Af,Bs,b1,Lf;;){if(Gc=Ft[Ft.length-1],this.defaultActions[Gc]?rs=this.defaultActions[Gc]:((Qi===null||typeof Qi>"u")&&(Qi=x1()),rs=Fc[Gc]&&Fc[Gc][Qi]),typeof rs>"u"||!rs.length||!rs[0]){var k1="";Lf=[];for(Af in Fc[Gc])this.terminals_[Af]&&Af>ib&&Lf.push("'"+this.terminals_[Af]+"'");ri.showPosition?k1="Parse error on line "+(xi+1)+`:
`+ri.showPosition()+`
Expecting `+Lf.join(", ")+", got '"+(this.terminals_[Qi]||Qi)+"'":k1="Parse error on line "+(xi+1)+": Unexpected "+(Qi==y1?"end of input":"'"+(this.terminals_[Qi]||Qi)+"'"),this.parseError(k1,{text:ri.match,token:this.terminals_[Qi]||Qi,line:ri.yylineno,loc:Ps,expected:Lf})}if(rs[0]instanceof Array&&rs.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Gc+", token: "+Qi);switch(rs[0]){case 1:Ft.push(Qi),Zt.push(ri.yytext),me.push(ri.yylloc),Ft.push(rs[1]),Qi=null,$c?(Qi=$c,$c=null):(zc=ri.yyleng,xe=ri.yytext,xi=ri.yylineno,Ps=ri.yylloc,g1>0&&g1--);break;case 2:if(Bs=this.productions_[rs[1]][1],eh.$=Zt[Zt.length-Bs],eh._$={first_line:me[me.length-(Bs||1)].first_line,last_line:me[me.length-1].last_line,first_column:me[me.length-(Bs||1)].first_column,last_column:me[me.length-1].last_column},Ju&&(eh._$.range=[me[me.length-(Bs||1)].range[0],me[me.length-1].range[1]]),Ml=this.performAction.apply(eh,[xe,zc,xi,ho.yy,rs[1],Zt,me].concat(v1)),typeof Ml<"u")return Ml;Bs&&(Ft=Ft.slice(0,-1*Bs*2),Zt=Zt.slice(0,-1*Bs),me=me.slice(0,-1*Bs)),Ft.push(this.productions_[rs[1]][0]),Zt.push(eh.$),me.push(eh._$),b1=Fc[Ft[Ft.length-2]][Ft[Ft.length-1]],Ft.push(b1);break;case 3:return!0}}return!0},"parse")},uo=function(){var ts={EOF:1,parseError:s(function(xt,Ft){if(this.yy.parser)this.yy.parser.parseError(xt,Ft);else throw new Error(xt)},"parseError"),setInput:s(function(at,xt){return this.yy=xt||this.yy||{},this._input=at,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:s(function(){var at=this._input[0];this.yytext+=at,this.yyleng++,this.offset++,this.match+=at,this.matched+=at;var xt=at.match(/(?:\r\n?|\n).*/g);return xt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),at},"input"),unput:s(function(at){var xt=at.length,Ft=at.split(/(?:\r\n?|\n)/g);this._input=at+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-xt),this.offset-=xt;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),Ft.length-1&&(this.yylineno-=Ft.length-1);var Zt=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:Ft?(Ft.length===Ke.length?this.yylloc.first_column:0)+Ke[Ke.length-Ft.length].length-Ft[0].length:this.yylloc.first_column-xt},this.options.ranges&&(this.yylloc.range=[Zt[0],Zt[0]+this.yyleng-xt]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(at){this.unput(this.match.slice(at))},"less"),pastInput:s(function(){var at=this.matched.substr(0,this.matched.length-this.match.length);return(at.length>20?"...":"")+at.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var at=this.match;return at.length<20&&(at+=this._input.substr(0,20-at.length)),(at.substr(0,20)+(at.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var at=this.pastInput(),xt=new Array(at.length+1).join("-");return at+this.upcomingInput()+`
`+xt+"^"},"showPosition"),test_match:s(function(at,xt){var Ft,Ke,Zt;if(this.options.backtrack_lexer&&(Zt={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&&(Zt.yylloc.range=this.yylloc.range.slice(0))),Ke=at[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+at[0].length},this.yytext+=at[0],this.match+=at[0],this.matches=at,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(at[0].length),this.matched+=at[0],Ft=this.performAction.call(this,this.yy,this,xt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ft)return Ft;if(this._backtrack){for(var me in Zt)this[me]=Zt[me];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var at,xt,Ft,Ke;this._more||(this.yytext="",this.match="");for(var Zt=this._currentRules(),me=0;me<Zt.length;me++)if(Ft=this._input.match(this.rules[Zt[me]]),Ft&&(!xt||Ft[0].length>xt[0].length)){if(xt=Ft,Ke=me,this.options.backtrack_lexer){if(at=this.test_match(Ft,Zt[me]),at!==!1)return at;if(this._backtrack){xt=!1;continue}else return!1}else if(!this.options.flex)break}return xt?(at=this.test_match(xt,Zt[Ke]),at!==!1?at:!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:s(function(){var xt=this.next();return xt||this.lex()},"lex"),begin:s(function(xt){this.conditionStack.push(xt)},"begin"),popState:s(function(){var xt=this.conditionStack.length-1;return xt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(xt){return xt=this.conditionStack.length-1-Math.abs(xt||0),xt>=0?this.conditionStack[xt]:"INITIAL"},"topState"),pushState:s(function(xt){this.begin(xt)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(xt,Ft,Ke,Zt){var me=Zt;switch(Ke){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:this.begin("callbackname");break;case 8:this.popState();break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 92;case 11:this.popState();break;case 12:return 93;case 13:return"MD_STR";case 14:this.popState();break;case 15:this.begin("md_string");break;case 16:return"STR";case 17:this.popState();break;case 18:this.pushState("string");break;case 19:return 81;case 20:return 99;case 21:return 82;case 22:return 101;case 23:return 83;case 24:return 84;case 25:return 94;case 26:this.begin("click");break;case 27:this.popState();break;case 28:return 85;case 29:return xt.lex.firstGraph()&&this.begin("dir"),12;break;case 30:return xt.lex.firstGraph()&&this.begin("dir"),12;break;case 31:return xt.lex.firstGraph()&&this.begin("dir"),12;break;case 32:return 27;case 33:return 32;case 34:return 95;case 35:return 95;case 36:return 95;case 37:return 95;case 38:return this.popState(),13;break;case 39:return this.popState(),14;break;case 40:return this.popState(),14;break;case 41:return this.popState(),14;break;case 42:return this.popState(),14;break;case 43:return this.popState(),14;break;case 44:return this.popState(),14;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 118;case 50:return 119;case 51:return 120;case 52:return 121;case 53:return 102;case 54:return 108;case 55:return 44;case 56:return 58;case 57:return 42;case 58:return 8;case 59:return 103;case 60:return 112;case 61:return this.popState(),75;break;case 62:return this.pushState("edgeText"),73;break;case 63:return 116;case 64:return this.popState(),75;break;case 65:return this.pushState("thickEdgeText"),73;break;case 66:return 116;case 67:return this.popState(),75;break;case 68:return this.pushState("dottedEdgeText"),73;break;case 69:return 116;case 70:return 75;case 71:return this.popState(),51;break;case 72:return"TEXT";case 73:return this.pushState("ellipseText"),50;break;case 74:return this.popState(),53;break;case 75:return this.pushState("text"),52;break;case 76:return this.popState(),55;break;case 77:return this.pushState("text"),54;break;case 78:return 56;case 79:return this.pushState("text"),65;break;case 80:return this.popState(),62;break;case 81:return this.pushState("text"),61;break;case 82:return this.popState(),47;break;case 83:return this.pushState("text"),46;break;case 84:return this.popState(),67;break;case 85:return this.popState(),69;break;case 86:return 114;case 87:return this.pushState("trapText"),66;break;case 88:return this.pushState("trapText"),68;break;case 89:return 115;case 90:return 65;case 91:return 87;case 92:return"SEP";case 93:return 86;case 94:return 112;case 95:return 108;case 96:return 42;case 97:return 106;case 98:return 111;case 99:return 113;case 100:return this.popState(),60;break;case 101:return this.pushState("text"),60;break;case 102:return this.popState(),49;break;case 103:return this.pushState("text"),48;break;case 104:return this.popState(),31;break;case 105:return this.pushState("text"),29;break;case 106:return this.popState(),64;break;case 107:return this.pushState("text"),63;break;case 108:return"TEXT";case 109:return"QUOTE";case 110:return 9;case 111:return 10;case 112: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]*)/,/^(?:[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:{callbackargs:{rules:[11,12,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},callbackname:{rules:[8,9,10,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},href:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},click:{rules:[15,18,27,28,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dottedEdgeText:{rules:[15,18,67,69,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},thickEdgeText:{rules:[15,18,64,66,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},edgeText:{rules:[15,18,61,63,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},trapText:{rules:[15,18,70,73,75,77,81,83,84,85,86,87,88,101,103,105,107],inclusive:!1},ellipseText:{rules:[15,18,70,71,72,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},text:{rules:[15,18,70,73,74,75,76,77,80,81,82,83,87,88,100,101,102,103,104,105,106,107,108],inclusive:!1},vertex:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dir:{rules:[15,18,38,39,40,41,42,43,44,45,46,47,48,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr_multiline:{rules:[5,6,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr:{rules:[3,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_title:{rules:[1,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},md_string:{rules:[13,14,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},string:{rules:[15,16,17,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},INITIAL:{rules:[0,2,4,7,15,18,19,20,21,22,23,24,25,26,29,30,31,32,33,34,35,36,37,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,67,68,70,73,75,77,78,79,81,83,87,88,89,90,91,92,93,94,95,96,97,98,99,101,103,105,107,109,110,111,112],inclusive:!0}}};return ts}();co.lexer=uo;function Rl(){this.yy={}}return s(Rl,"Parser"),Rl.prototype=co,co.Parser=Rl,new Rl}();AL.parser=AL;Tte=AL});var tDe,rDe,Cte,Ste=_(()=>{"use strict";Ho();tDe=s((t,e)=>{let r=D1,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return Fs(n,i,a,e)},"fade"),rDe=s(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 {
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;
}
.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};
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: ${tDe(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};
}
`,"getStyles"),Cte=rDe});var Ik={};ur(Ik,{diagram:()=>nDe});var nDe,Nk=_(()=>{"use strict";gt();wA();wte();Ete();Ste();nDe={parser:Tte,db:K3,renderer:kte,styles:Cte,init:s(t=>{t.flowchart||(t.flowchart={}),t.layout&&pC({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,pC({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),K3.clear(),K3.setGen("gen-2")},"init")}});var LL,Rte,Mte=_(()=>{"use strict";LL=function(){var t=s(function(E,S,R,D){for(R=R||{},D=E.length;D--;R[E[D]]=S);return R},"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],n=[1,11],i=[1,12],a=[1,13],o=[1,14],l=[1,15],u=[1,21],h=[1,22],f=[1,23],d=[1,24],p=[1,25],m=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],g=[1,34],y=[27,28,46,47],v=[41,42,43,44,45],x=[17,34],b=[1,54],k=[1,53],A=[17,34,36,38],w={trace:s(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,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:s(function(S,R,D,L,P,M,F){var I=M.length-1;switch(P){case 1:break;case 2:this.$=[];break;case 3:M[I-1].push(M[I]),this.$=M[I-1];break;case 4:case 5:this.$=M[I];break;case 6:case 7:this.$=[];break;case 8:L.addEntity(M[I-4]),L.addEntity(M[I-2]),L.addRelationship(M[I-4],M[I],M[I-2],M[I-3]);break;case 9:L.addEntity(M[I-3]),L.addAttributes(M[I-3],M[I-1]);break;case 10:L.addEntity(M[I-2]);break;case 11:L.addEntity(M[I]);break;case 12:L.addEntity(M[I-6],M[I-4]),L.addAttributes(M[I-6],M[I-1]);break;case 13:L.addEntity(M[I-5],M[I-3]);break;case 14:L.addEntity(M[I-3],M[I-1]);break;case 15:case 16:this.$=M[I].trim(),L.setAccTitle(this.$);break;case 17:case 18:this.$=M[I].trim(),L.setAccDescription(this.$);break;case 19:case 43:this.$=M[I];break;case 20:case 41:case 42:this.$=M[I].replace(/"/g,"");break;case 21:case 29:this.$=[M[I]];break;case 22:M[I].push(M[I-1]),this.$=M[I];break;case 23:this.$={attributeType:M[I-1],attributeName:M[I]};break;case 24:this.$={attributeType:M[I-2],attributeName:M[I-1],attributeKeyTypeList:M[I]};break;case 25:this.$={attributeType:M[I-2],attributeName:M[I-1],attributeComment:M[I]};break;case 26:this.$={attributeType:M[I-3],attributeName:M[I-2],attributeKeyTypeList:M[I-1],attributeComment:M[I]};break;case 27:case 28:case 31:this.$=M[I];break;case 30:M[I-2].push(M[I]),this.$=M[I-2];break;case 32:this.$=M[I].replace(/"/g,"");break;case 33:this.$={cardA:M[I],relType:M[I-1],cardB:M[I-2]};break;case 34:this.$=L.Cardinality.ZERO_OR_ONE;break;case 35:this.$=L.Cardinality.ZERO_OR_MORE;break;case 36:this.$=L.Cardinality.ONE_OR_MORE;break;case 37:this.$=L.Cardinality.ONLY_ONE;break;case 38:this.$=L.Cardinality.MD_PARENT;break;case 39:this.$=L.Identification.NON_IDENTIFYING;break;case 40:this.$=L.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,20:r,22:n,24:i,26:a,27:o,28:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:n,24:i,26:a,27:o,28:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:u,42:h,43:f,44:d,45:p}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(m,[2,19]),t(m,[2,20]),t(e,[2,4]),{11:29,27:o,28:l},{16:30,17:[1,31],29:32,30:33,34:g},{11:35,27:o,28:l},{40:36,46:[1,37],47:[1,38]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),t(y,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:g},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:u,42:h,43:f,44:d,45:p},t(v,[2,39]),t(v,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(x,[2,23],{32:50,33:51,35:52,37:b,38:k}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(x,[2,24],{33:56,36:[1,57],38:k}),t(x,[2,25]),t(A,[2,29]),t(x,[2,32]),t(A,[2,31]),{16:58,17:[1,59],29:32,30:33,34:g},t(x,[2,26]),{35:60,37:b},{17:[1,61]},t(e,[2,13]),t(A,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:s(function(S,R){if(R.recoverable)this.trace(S);else{var D=new Error(S);throw D.hash=R,D}},"parseError"),parse:s(function(S){var R=this,D=[0],L=[],P=[null],M=[],F=this.table,I="",O=0,z=0,N=0,U=2,$=1,W=M.slice.call(arguments,1),ee=Object.create(this.lexer),te={yy:{}};for(var ce in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ce)&&(te.yy[ce]=this.yy[ce]);ee.setInput(S,te.yy),te.yy.lexer=ee,te.yy.parser=this,typeof ee.yylloc>"u"&&(ee.yylloc={});var Z=ee.yylloc;M.push(Z);var fe=ee.options&&ee.options.ranges;typeof te.yy.parseError=="function"?this.parseError=te.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ne(Oe){D.length=D.length-2*Oe,P.length=P.length-Oe,M.length=M.length-Oe}s(ne,"popStack");function H(){var Oe;return Oe=L.pop()||ee.lex()||$,typeof Oe!="number"&&(Oe instanceof Array&&(L=Oe,Oe=L.pop()),Oe=R.symbols_[Oe]||Oe),Oe}s(H,"lex");for(var Q,K,re,ie,ye,j,De={},oe,Re,Pe,Se;;){if(re=D[D.length-1],this.defaultActions[re]?ie=this.defaultActions[re]:((Q===null||typeof Q>"u")&&(Q=H()),ie=F[re]&&F[re][Q]),typeof ie>"u"||!ie.length||!ie[0]){var Ue="";Se=[];for(oe in F[re])this.terminals_[oe]&&oe>U&&Se.push("'"+this.terminals_[oe]+"'");ee.showPosition?Ue="Parse error on line "+(O+1)+`:
`+ee.showPosition()+`
Expecting `+Se.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":Ue="Parse error on line "+(O+1)+": Unexpected "+(Q==$?"end of input":"'"+(this.terminals_[Q]||Q)+"'"),this.parseError(Ue,{text:ee.match,token:this.terminals_[Q]||Q,line:ee.yylineno,loc:Z,expected:Se})}if(ie[0]instanceof Array&&ie.length>1)throw new Error("Parse Error: multiple actions possible at state: "+re+", token: "+Q);switch(ie[0]){case 1:D.push(Q),P.push(ee.yytext),M.push(ee.yylloc),D.push(ie[1]),Q=null,K?(Q=K,K=null):(z=ee.yyleng,I=ee.yytext,O=ee.yylineno,Z=ee.yylloc,N>0&&N--);break;case 2:if(Re=this.productions_[ie[1]][1],De.$=P[P.length-Re],De._$={first_line:M[M.length-(Re||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(Re||1)].first_column,last_column:M[M.length-1].last_column},fe&&(De._$.range=[M[M.length-(Re||1)].range[0],M[M.length-1].range[1]]),j=this.performAction.apply(De,[I,z,O,te.yy,ie[1],P,M].concat(W)),typeof j<"u")return j;Re&&(D=D.slice(0,-1*Re*2),P=P.slice(0,-1*Re),M=M.slice(0,-1*Re)),D.push(this.productions_[ie[1]][0]),P.push(De.$),M.push(De._$),Pe=F[D[D.length-2]][D[D.length-1]],D.push(Pe);break;case 3:return!0}}return!0},"parse")},T=function(){var E={EOF:1,parseError:s(function(R,D){if(this.yy.parser)this.yy.parser.parseError(R,D);else throw new Error(R)},"parseError"),setInput:s(function(S,R){return this.yy=R||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:s(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var R=S.match(/(?:\r\n?|\n).*/g);return R?(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:s(function(S){var R=S.length,D=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-R),this.offset-=R;var L=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),D.length-1&&(this.yylineno-=D.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:D?(D.length===L.length?this.yylloc.first_column:0)+L[L.length-D.length].length-D[0].length:this.yylloc.first_column-R},this.options.ranges&&(this.yylloc.range=[P[0],P[0]+this.yyleng-R]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(S){this.unput(this.match.slice(S))},"less"),pastInput:s(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:s(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:s(function(){var S=this.pastInput(),R=new Array(S.length+1).join("-");return S+this.upcomingInput()+`
`+R+"^"},"showPosition"),test_match:s(function(S,R){var D,L,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))),L=S[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.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],D=this.performAction.call(this,this.yy,this,R,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),D)return D;if(this._backtrack){for(var M in P)this[M]=P[M];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,R,D,L;this._more||(this.yytext="",this.match="");for(var P=this._currentRules(),M=0;M<P.length;M++)if(D=this._input.match(this.rules[P[M]]),D&&(!R||D[0].length>R[0].length)){if(R=D,L=M,this.options.backtrack_lexer){if(S=this.test_match(D,P[M]),S!==!1)return S;if(this._backtrack){R=!1;continue}else return!1}else if(!this.options.flex)break}return R?(S=this.test_match(R,P[L]),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:s(function(){var R=this.next();return R||this.lex()},"lex"),begin:s(function(R){this.conditionStack.push(R)},"begin"),popState:s(function(){var R=this.conditionStack.length-1;return R>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(R){return R=this.conditionStack.length-1-Math.abs(R||0),R>=0?this.conditionStack[R]:"INITIAL"},"topState"),pushState:s(function(R){this.begin(R)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(R,D,L,P){var M=P;switch(L){case 0:return this.begin("acc_title"),22;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),24;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 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;break;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;break;case 22:return D.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return D.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/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,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,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],inclusive:!0}}};return E}();w.lexer=T;function C(){this.yy={}}return s(C,"Parser"),C.prototype=w,w.Parser=C,new C}();LL.parser=LL;Rte=LL});var Md,DL,uDe,hDe,Ite,fDe,dDe,pDe,mDe,gDe,Nte,Ote=_(()=>{"use strict";it();gt();Ci();Md=new Map,DL=[],uDe={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"},hDe={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},Ite=s(function(t,e=void 0){return Md.has(t)?!Md.get(t).alias&&e&&(Md.get(t).alias=e,V.info(`Add alias '${e}' to entity '${t}'`)):(Md.set(t,{attributes:[],alias:e}),V.info("Added new entity :",t)),Md.get(t)},"addEntity"),fDe=s(()=>Md,"getEntities"),dDe=s(function(t,e){let r=Ite(t),n;for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),V.debug("Added attribute ",e[n].attributeName)},"addAttributes"),pDe=s(function(t,e,r,n){let i={entityA:t,roleA:e,entityB:r,relSpec:n};DL.push(i),V.debug("Added new relationship :",i)},"addRelationship"),mDe=s(()=>DL,"getRelationships"),gDe=s(function(){Md=new Map,DL=[],br()},"clear"),Nte={Cardinality:uDe,Identification:hDe,getConfig:s(()=>le().er,"getConfig"),addEntity:Ite,addAttributes:dDe,getEntities:fDe,addRelationship:pDe,getRelationships:mDe,clear:gDe,setAccTitle:Ar,getAccTitle:Gr,setAccDescription:Vr,getAccDescription:Ur,setDiagramTitle:an,getDiagramTitle:Qr}});var ml,yDe,Lo,Pte=_(()=>{"use strict";ml={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},yDe=s(function(t,e){let r;t.append("defs").append("marker").attr("id",ml.MD_PARENT_START).attr("refX",0).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",ml.MD_PARENT_END).attr("refX",19).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"),t.append("defs").append("marker").attr("id",ml.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",ml.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",ml.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").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",ml.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),Lo={ERMarkers:ml,insertMarkers:yDe}});var Bte,Fte=_(()=>{"use strict";Bte=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function vDe(t){return typeof t=="string"&&Bte.test(t)}var zte,$te=_(()=>{"use strict";Fte();s(vDe,"validate");zte=vDe});function Gte(t,e=0){return ca[t[e+0]]+ca[t[e+1]]+ca[t[e+2]]+ca[t[e+3]]+"-"+ca[t[e+4]]+ca[t[e+5]]+"-"+ca[t[e+6]]+ca[t[e+7]]+"-"+ca[t[e+8]]+ca[t[e+9]]+"-"+ca[t[e+10]]+ca[t[e+11]]+ca[t[e+12]]+ca[t[e+13]]+ca[t[e+14]]+ca[t[e+15]]}var ca,Vte=_(()=>{"use strict";ca=[];for(let t=0;t<256;++t)ca.push((t+256).toString(16).slice(1));s(Gte,"unsafeStringify")});function xDe(t){if(!zte(t))throw TypeError("Invalid UUID");let e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}var Ute,qte=_(()=>{"use strict";$te();s(xDe,"parse");Ute=xDe});function bDe(t){t=unescape(encodeURIComponent(t));let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}function RL(t,e,r){function n(i,a,o,l){var u;if(typeof i=="string"&&(i=bDe(i)),typeof a=="string"&&(a=Ute(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let h=new Uint8Array(16+i.length);if(h.set(a),h.set(i,a.length),h=r(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,o){l=l||0;for(let f=0;f<16;++f)o[l+f]=h[f];return o}return Gte(h)}s(n,"generateUUID");try{n.name=t}catch{}return n.DNS=kDe,n.URL=wDe,n}var kDe,wDe,Wte=_(()=>{"use strict";Vte();qte();s(bDe,"stringToBytes");kDe="6ba7b810-9dad-11d1-80b4-00c04fd430c8",wDe="6ba7b811-9dad-11d1-80b4-00c04fd430c8";s(RL,"v35")});function TDe(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function ML(t,e){return t<<e|t>>>32-e}function EDe(t){let e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){let o=unescape(encodeURIComponent(t));t=[];for(let l=0;l<o.length;++l)t.push(o.charCodeAt(l))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);let n=t.length/4+2,i=Math.ceil(n/16),a=new Array(i);for(let o=0;o<i;++o){let l=new Uint32Array(16);for(let u=0;u<16;++u)l[u]=t[o*64+u*4]<<24|t[o*64+u*4+1]<<16|t[o*64+u*4+2]<<8|t[o*64+u*4+3];a[o]=l}a[i-1][14]=(t.length-1)*8/Math.pow(2,32),a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=(t.length-1)*8&4294967295;for(let o=0;o<i;++o){let l=new Uint32Array(80);for(let m=0;m<16;++m)l[m]=a[o][m];for(let m=16;m<80;++m)l[m]=ML(l[m-3]^l[m-8]^l[m-14]^l[m-16],1);let u=r[0],h=r[1],f=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let g=Math.floor(m/20),y=ML(u,5)+TDe(g,h,f,d)+p+e[g]+l[m]>>>0;p=d,d=f,f=ML(h,30)>>>0,h=u,u=y}r[0]=r[0]+u>>>0,r[1]=r[1]+h>>>0,r[2]=r[2]+f>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Hte,Yte=_(()=>{"use strict";s(TDe,"f");s(ML,"ROTL");s(EDe,"sha1");Hte=EDe});var CDe,IL,Xte=_(()=>{"use strict";Wte();Yte();CDe=RL("v5",80,Hte),IL=CDe});var jte=_(()=>{"use strict";Xte()});function ODe(t="",e=""){let r=t.replace(SDe,"");return`${Qte(e)}${Qte(r)}${IL(t,NDe)}`}function Qte(t=""){return t.length>0?`${t}-`:""}var SDe,_i,bv,_De,ADe,LDe,DDe,Zte,RDe,Kte,MDe,IDe,NDe,Jte,ere=_(()=>{"use strict";la();Xt();Dd();gt();it();pr();Pte();Un();Qt();jte();SDe=/[^\dA-Za-z](\W)*/g,_i={},bv=new Map,_De=s(function(t){let e=Object.keys(t);for(let r of e)_i[r]=t[r]},"setConf"),ADe=s((t,e,r)=>{let n=_i.entityPadding/3,i=_i.entityPadding/3,a=_i.fontSize*.85,o=e.node().getBBox(),l=[],u=!1,h=!1,f=0,d=0,p=0,m=0,g=o.height+n*2,y=1;r.forEach(k=>{k.attributeKeyTypeList!==void 0&&k.attributeKeyTypeList.length>0&&(u=!0),k.attributeComment!==void 0&&(h=!0)}),r.forEach(k=>{let A=`${e.node().id}-attr-${y}`,w=0,T=uh(k.attributeType),C=t.append("text").classed("er entityLabel",!0).attr("id",`${A}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",le().fontFamily).style("font-size",a+"px").text(T),E=t.append("text").classed("er entityLabel",!0).attr("id",`${A}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",le().fontFamily).style("font-size",a+"px").text(k.attributeName),S={};S.tn=C,S.nn=E;let R=C.node().getBBox(),D=E.node().getBBox();if(f=Math.max(f,R.width),d=Math.max(d,D.width),w=Math.max(R.height,D.height),u){let L=k.attributeKeyTypeList!==void 0?k.attributeKeyTypeList.join(","):"",P=t.append("text").classed("er entityLabel",!0).attr("id",`${A}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",le().fontFamily).style("font-size",a+"px").text(L);S.kn=P;let M=P.node().getBBox();p=Math.max(p,M.width),w=Math.max(w,M.height)}if(h){let L=t.append("text").classed("er entityLabel",!0).attr("id",`${A}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",le().fontFamily).style("font-size",a+"px").text(k.attributeComment||"");S.cn=L;let P=L.node().getBBox();m=Math.max(m,P.width),w=Math.max(w,P.height)}S.height=w,l.push(S),g+=w+n*2,y+=1});let v=4;u&&(v+=2),h&&(v+=2);let x=f+d+p+m,b={width:Math.max(_i.minEntityWidth,Math.max(o.width+_i.entityPadding*2,x+i*v)),height:r.length>0?g:Math.max(_i.minEntityHeight,o.height+_i.entityPadding*2)};if(r.length>0){let k=Math.max(0,(b.width-x-i*v)/(v/2));e.attr("transform","translate("+b.width/2+","+(n+o.height/2)+")");let A=o.height+n*2,w="attributeBoxOdd";l.forEach(T=>{let C=A+n+T.height/2;T.tn.attr("transform","translate("+i+","+C+")");let E=t.insert("rect","#"+T.tn.node().id).classed(`er ${w}`,!0).attr("x",0).attr("y",A).attr("width",f+i*2+k).attr("height",T.height+n*2),S=parseFloat(E.attr("x"))+parseFloat(E.attr("width"));T.nn.attr("transform","translate("+(S+i)+","+C+")");let R=t.insert("rect","#"+T.nn.node().id).classed(`er ${w}`,!0).attr("x",S).attr("y",A).attr("width",d+i*2+k).attr("height",T.height+n*2),D=parseFloat(R.attr("x"))+parseFloat(R.attr("width"));if(u){T.kn.attr("transform","translate("+(D+i)+","+C+")");let L=t.insert("rect","#"+T.kn.node().id).classed(`er ${w}`,!0).attr("x",D).attr("y",A).attr("width",p+i*2+k).attr("height",T.height+n*2);D=parseFloat(L.attr("x"))+parseFloat(L.attr("width"))}h&&(T.cn.attr("transform","translate("+(D+i)+","+C+")"),t.insert("rect","#"+T.cn.node().id).classed(`er ${w}`,"true").attr("x",D).attr("y",A).attr("width",m+i*2+k).attr("height",T.height+n*2)),A+=T.height+n*2,w=w==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else b.height=Math.max(_i.minEntityHeight,g),e.attr("transform","translate("+b.width/2+","+b.height/2+")");return b},"drawAttributes"),LDe=s(function(t,e,r){let n=[...e.keys()],i;return n.forEach(function(a){let o=ODe(a,"entity");bv.set(a,o);let l=t.append("g").attr("id",o);i=i===void 0?o:i;let u="text-"+o,h=l.append("text").classed("er entityLabel",!0).attr("id",u).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",le().fontFamily).style("font-size",_i.fontSize+"px").text(e.get(a).alias??a),{width:f,height:d}=ADe(l,h,e.get(a).attributes),m=l.insert("rect","#"+u).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",f).attr("height",d).node().getBBox();r.setNode(o,{width:m.width,height:m.height,shape:"rect",id:o})}),i},"drawEntities"),DDe=s(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},"adjustEntities"),Zte=s(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),RDe=s(function(t,e){return t.forEach(function(r){e.setEdge(bv.get(r.entityA),bv.get(r.entityB),{relationship:r},Zte(r))}),t},"addRelationships"),Kte=0,MDe=s(function(t,e,r,n,i){Kte++;let a=r.edge(bv.get(e.entityA),bv.get(e.entityB),Zte(e)),o=ra().x(function(g){return g.x}).y(function(g){return g.y}).curve(hs),l=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",o(a.points)).style("stroke",_i.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let u="";switch(_i.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+u+"#"+Lo.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+u+"#"+Lo.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+u+"#"+Lo.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+u+"#"+Lo.ERMarkers.ONLY_ONE_END+")");break;case i.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+u+"#"+Lo.ERMarkers.MD_PARENT_END+")");break}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+u+"#"+Lo.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+u+"#"+Lo.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+u+"#"+Lo.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+u+"#"+Lo.ERMarkers.ONLY_ONE_START+")");break;case i.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+u+"#"+Lo.ERMarkers.MD_PARENT_START+")");break}let h=l.node().getTotalLength(),f=l.node().getPointAtLength(h*.5),d="rel"+Kte,m=t.append("text").classed("er relationshipLabel",!0).attr("id",d).attr("x",f.x).attr("y",f.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",le().fontFamily).style("font-size",_i.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+d).classed("er relationshipLabelBox",!0).attr("x",f.x-m.width/2).attr("y",f.y-m.height/2).attr("width",m.width).attr("height",m.height)},"drawRelationshipFromLayout"),IDe=s(function(t,e,r,n){_i=le().er,V.info("Drawing ER diagram");let i=le().securityLevel,a;i==="sandbox"&&(a=Me("#i"+e));let l=(i==="sandbox"?Me(a.nodes()[0].contentDocument.body):Me("body")).select(`[id='${e}']`);Lo.insertMarkers(l,_i);let u;u=new ir({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:_i.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let h=LDe(l,n.db.getEntities(),u),f=RDe(n.db.getRelationships(),u);eo(u),DDe(l,u),f.forEach(function(y){MDe(l,y,u,h,n)});let d=_i.diagramPadding;dt.insertTitle(l,"entityTitleText",_i.titleTopMargin,n.db.getDiagramTitle());let p=l.node().getBBox(),m=p.width+d*2,g=p.height+d*2;xr(l,g,m,_i.useMaxWidth),l.attr("viewBox",`${p.x-d} ${p.y-d} ${m} ${g}`)},"draw"),NDe="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";s(ODe,"generateId");s(Qte,"strWithHyphen");Jte={setConf:_De,draw:IDe}});var PDe,tre,rre=_(()=>{"use strict";PDe=s(t=>`
.entityBox {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
.attributeBoxOdd {
fill: ${t.attributeBackgroundColorOdd};
stroke: ${t.nodeBorder};
}
.attributeBoxEven {
fill: ${t.attributeBackgroundColorEven};
stroke: ${t.nodeBorder};
}
.relationshipLabelBox {
fill: ${t.tertiaryColor};
opacity: 0.7;
background-color: ${t.tertiaryColor};
rect {
opacity: 0.5;
}
}
.relationshipLine {
stroke: ${t.lineColor};
}
.entityTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
#MD_PARENT_START {
fill: #f5f5f5 !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#MD_PARENT_END {
fill: #f5f5f5 !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
`,"getStyles"),tre=PDe});var nre={};ur(nre,{diagram:()=>BDe});var BDe,ire=_(()=>{"use strict";Mte();Ote();ere();rre();BDe={parser:Rte,db:Nte,renderer:Jte,styles:tre}});function $n(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function ua(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"}function NL(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Nd(t){return typeof t=="object"&&t!==null&&$n(t.container)&&ua(t.reference)&&typeof t.message=="string"}function to(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Xh(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function kv(t){return to(t)&&typeof t.fullText=="string"}var Id,Do=_(()=>{"use strict";s($n,"isAstNode");s(ua,"isReference");s(NL,"isAstNodeDescription");s(Nd,"isLinkingError");Id=class{static{s(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,r){return $n(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}}};s(to,"isCompositeCstNode");s(Xh,"isLeafCstNode");s(kv,"isRootCstNode")});function GDe(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Ok(t){return!!t&&typeof t[Symbol.iterator]=="function"}function Wr(...t){if(t.length===1){let e=t[0];if(e instanceof ro)return e;if(Ok(e))return new ro(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new ro(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:Wa)}return t.length>1?new ro(()=>({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<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){let r=t[e.collIndex++];Ok(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return Wa}):wv}var ro,wv,Wa,pc,wm,Es=_(()=>{"use strict";ro=class t{static{s(this,"StreamImpl")}constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){let e={state:this.startFn(),next:s(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),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){let r=e[Symbol.iterator]();return new t(()=>({first:this.startFn(),firstDone:!1}),n=>{let i;if(!n.firstDone){do if(i=this.nextFn(n.first),!i.done)return i;while(!i.done);n.firstDone=!0}do if(i=r.next(),!i.done)return i;while(!i.done);return Wa})}join(e=","){let r=this.iterator(),n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=GDe(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?Wa:{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 Wa})}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(Ok(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Wa})}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 o=n.iterator.next();if(o.done)n.iterator=void 0;else return o}let{done:i,value:a}=r.nextFn(n.this);if(!i)if(Ok(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Wa})}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<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new t(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Wa:this.nextFn(r.state)))}distinct(e){let r=new Set;return this.filter(n=>{let i=e?e(n):n;return r.has(i)?!1:(r.add(i),!0)})}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)})}};s(GDe,"toString");s(Ok,"isIterable");wv=new ro(()=>{},()=>Wa),Wa=Object.freeze({done:!0,value:void 0});s(Wr,"stream");pc=class extends ro{static{s(this,"TreeStreamImpl")}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 o=i.iterators[i.iterators.length-1].next();if(o.done)i.iterators.pop();else return i.iterators.push(r(o.value)[Symbol.iterator]()),o}return Wa})}iterator(){let e={state:this.startFn(),next:s(()=>this.nextFn(e.state),"next"),prune:s(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}};(function(t){function e(a){return a.reduce((o,l)=>o+l,0)}s(e,"sum"),t.sum=e;function r(a){return a.reduce((o,l)=>o*l,0)}s(r,"product"),t.product=r;function n(a){return a.reduce((o,l)=>Math.min(o,l))}s(n,"min"),t.min=n;function i(a){return a.reduce((o,l)=>Math.max(o,l))}s(i,"max"),t.max=i})(wm||(wm={}))});var Bk={};ur(Bk,{DefaultNameRegexp:()=>Pk,RangeComparison:()=>Eu,compareRange:()=>lre,findCommentNode:()=>FL,findDeclarationNodeAtOffset:()=>UDe,findLeafNodeAtOffset:()=>zL,findLeafNodeBeforeOffset:()=>cre,flattenCst:()=>VDe,getInteriorNodes:()=>HDe,getNextNode:()=>qDe,getPreviousNode:()=>hre,getStartlineNode:()=>WDe,inRange:()=>BL,isChildNode:()=>PL,isCommentNode:()=>OL,streamCst:()=>Od,toDocumentSegment:()=>Pd,tokenToRange:()=>Tm});function Od(t){return new pc(t,e=>to(e)?e.content:[],{includeRoot:!0})}function VDe(t){return Od(t).filter(Xh)}function PL(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Tm(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Pd(t){if(!t)return;let{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}function lre(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<t.start.character)return Eu.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>e.end.character)return Eu.After;let r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?Eu.Inside:r?Eu.OverlapBack:Eu.OverlapFront}function BL(t,e){return lre(t,e)>Eu.After}function UDe(t,e,r=Pk){if(t){if(e>0){let n=e-t.offset,i=t.text.charAt(n);r.test(i)||e--}return zL(t,e)}}function FL(t,e){if(t){let r=hre(t,!0);if(r&&OL(r,e))return r;if(kv(t)){let n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let a=t.content[i];if(OL(a,e))return a}}}}function OL(t,e){return Xh(t)&&e.includes(t.tokenType.name)}function zL(t,e){if(Xh(t))return t;if(to(t)){let r=ure(t,e,!1);if(r)return zL(r,e)}}function cre(t,e){if(Xh(t))return t;if(to(t)){let r=ure(t,e,!0);if(r)return cre(r,e)}}function ure(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){let o=Math.floor((n+i)/2),l=t.content[o];if(l.offset<=e&&l.end>e)return l;l.end<=e?(a=r?l:void 0,n=o+1):i=o-1}return a}function hre(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 qDe(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t),i=r.content.length-1;for(;n<i;){n++;let a=r.content[n];if(e||!a.hidden)return a}t=r}}function WDe(t){if(t.range.start.character===0)return t;let e=t.range.start.line,r=t,n;for(;t.container;){let i=t.container,a=n??i.content.indexOf(t);if(a===0?(t=i,n=void 0):(n=a-1,t=i.content[n]),t.range.start.line!==e)break;r=t}return r}function HDe(t,e){let r=YDe(t,e);return r?r.parent.content.slice(r.a+1,r.b):[]}function YDe(t,e){let r=ore(t),n=ore(e),i;for(let a=0;a<r.length&&a<n.length;a++){let o=r[a],l=n[a];if(o.parent===l.parent)i={parent:o.parent,a:o.index,b:l.index};else break}return i}function ore(t){let e=[];for(;t.container;){let r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r}return e.reverse()}var Eu,Pk,gl=_(()=>{"use strict";Do();Es();s(Od,"streamCst");s(VDe,"flattenCst");s(PL,"isChildNode");s(Tm,"tokenToRange");s(Pd,"toDocumentSegment");(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"})(Eu||(Eu={}));s(lre,"compareRange");s(BL,"inRange");Pk=/^[\w\p{L}]$/u;s(UDe,"findDeclarationNodeAtOffset");s(FL,"findCommentNode");s(OL,"isCommentNode");s(zL,"findLeafNodeAtOffset");s(cre,"findLeafNodeBeforeOffset");s(ure,"binarySearch");s(hre,"getPreviousNode");s(qDe,"getNextNode");s(WDe,"getStartlineNode");s(HDe,"getInteriorNodes");s(YDe,"getCommonParent");s(ore,"getParentChain")});function jh(t){throw new Error("Error! The input value was not handled.")}var Bd,Fk=_(()=>{"use strict";Bd=class extends Error{static{s(this,"ErrorWithLocation")}constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}};s(jh,"assertUnreachable")});var _v={};ur(_v,{AbstractElement:()=>GL,AbstractRule:()=>Tv,AbstractType:()=>Ev,Action:()=>mD,Alternatives:()=>gD,ArrayLiteral:()=>VL,ArrayType:()=>UL,Assignment:()=>yD,BooleanLiteral:()=>WL,CharacterRange:()=>vD,Condition:()=>zk,Conjunction:()=>YL,CrossReference:()=>bD,Disjunction:()=>jL,EndOfFile:()=>kD,Grammar:()=>QL,GrammarImport:()=>dre,Group:()=>TD,InferredType:()=>ZL,Interface:()=>JL,Keyword:()=>ED,LangiumGrammarAstReflection:()=>Em,LangiumGrammarTerminals:()=>XDe,NamedArgument:()=>pre,NegatedToken:()=>CD,Negation:()=>eD,NumberLiteral:()=>rD,Parameter:()=>nD,ParameterReference:()=>iD,ParserRule:()=>sD,ReferenceType:()=>oD,RegexToken:()=>_D,ReturnType:()=>mre,RuleCall:()=>LD,SimpleType:()=>uD,StringLiteral:()=>hD,TerminalAlternatives:()=>DD,TerminalGroup:()=>MD,TerminalRule:()=>Gk,TerminalRuleCall:()=>ND,Type:()=>fD,TypeAttribute:()=>gre,TypeDefinition:()=>$L,UnionType:()=>dD,UnorderedGroup:()=>OD,UntilToken:()=>PD,ValueLiteral:()=>$k,Wildcard:()=>FD,isAbstractElement:()=>Cv,isAbstractRule:()=>jDe,isAbstractType:()=>KDe,isAction:()=>Cu,isAlternatives:()=>Wk,isArrayLiteral:()=>tRe,isArrayType:()=>qL,isAssignment:()=>yl,isBooleanLiteral:()=>HL,isCharacterRange:()=>xD,isCondition:()=>QDe,isConjunction:()=>XL,isCrossReference:()=>Fd,isDisjunction:()=>KL,isEndOfFile:()=>wD,isFeatureName:()=>ZDe,isGrammar:()=>rRe,isGrammarImport:()=>nRe,isGroup:()=>Kh,isInferredType:()=>Vk,isInterface:()=>Uk,isKeyword:()=>Mo,isNamedArgument:()=>iRe,isNegatedToken:()=>SD,isNegation:()=>tD,isNumberLiteral:()=>aRe,isParameter:()=>sRe,isParameterReference:()=>aD,isParserRule:()=>Sa,isPrimitiveType:()=>fre,isReferenceType:()=>lD,isRegexToken:()=>AD,isReturnType:()=>cD,isRuleCall:()=>vl,isSimpleType:()=>qk,isStringLiteral:()=>oRe,isTerminalAlternatives:()=>RD,isTerminalGroup:()=>ID,isTerminalRule:()=>Ro,isTerminalRuleCall:()=>Hk,isType:()=>Sv,isTypeAttribute:()=>lRe,isTypeDefinition:()=>JDe,isUnionType:()=>pD,isUnorderedGroup:()=>Yk,isUntilToken:()=>BD,isValueLiteral:()=>eRe,isWildcard:()=>zD,reflection:()=>Gt});function jDe(t){return Gt.isInstance(t,Tv)}function KDe(t){return Gt.isInstance(t,Ev)}function QDe(t){return Gt.isInstance(t,zk)}function ZDe(t){return fre(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 fre(t){return t==="string"||t==="number"||t==="boolean"||t==="Date"||t==="bigint"}function JDe(t){return Gt.isInstance(t,$L)}function eRe(t){return Gt.isInstance(t,$k)}function Cv(t){return Gt.isInstance(t,GL)}function tRe(t){return Gt.isInstance(t,VL)}function qL(t){return Gt.isInstance(t,UL)}function HL(t){return Gt.isInstance(t,WL)}function XL(t){return Gt.isInstance(t,YL)}function KL(t){return Gt.isInstance(t,jL)}function rRe(t){return Gt.isInstance(t,QL)}function nRe(t){return Gt.isInstance(t,dre)}function Vk(t){return Gt.isInstance(t,ZL)}function Uk(t){return Gt.isInstance(t,JL)}function iRe(t){return Gt.isInstance(t,pre)}function tD(t){return Gt.isInstance(t,eD)}function aRe(t){return Gt.isInstance(t,rD)}function sRe(t){return Gt.isInstance(t,nD)}function aD(t){return Gt.isInstance(t,iD)}function Sa(t){return Gt.isInstance(t,sD)}function lD(t){return Gt.isInstance(t,oD)}function cD(t){return Gt.isInstance(t,mre)}function qk(t){return Gt.isInstance(t,uD)}function oRe(t){return Gt.isInstance(t,hD)}function Ro(t){return Gt.isInstance(t,Gk)}function Sv(t){return Gt.isInstance(t,fD)}function lRe(t){return Gt.isInstance(t,gre)}function pD(t){return Gt.isInstance(t,dD)}function Cu(t){return Gt.isInstance(t,mD)}function Wk(t){return Gt.isInstance(t,gD)}function yl(t){return Gt.isInstance(t,yD)}function xD(t){return Gt.isInstance(t,vD)}function Fd(t){return Gt.isInstance(t,bD)}function wD(t){return Gt.isInstance(t,kD)}function Kh(t){return Gt.isInstance(t,TD)}function Mo(t){return Gt.isInstance(t,ED)}function SD(t){return Gt.isInstance(t,CD)}function AD(t){return Gt.isInstance(t,_D)}function vl(t){return Gt.isInstance(t,LD)}function RD(t){return Gt.isInstance(t,DD)}function ID(t){return Gt.isInstance(t,MD)}function Hk(t){return Gt.isInstance(t,ND)}function Yk(t){return Gt.isInstance(t,OD)}function BD(t){return Gt.isInstance(t,PD)}function zD(t){return Gt.isInstance(t,FD)}var XDe,Tv,Ev,zk,$L,$k,GL,VL,UL,WL,YL,jL,QL,dre,ZL,JL,pre,eD,rD,nD,iD,sD,oD,mre,uD,hD,Gk,fD,gre,dD,mD,gD,yD,vD,bD,kD,TD,ED,CD,_D,LD,DD,MD,ND,OD,PD,FD,Em,Gt,mc=_(()=>{"use strict";Do();XDe={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]*/},Tv="AbstractRule";s(jDe,"isAbstractRule");Ev="AbstractType";s(KDe,"isAbstractType");zk="Condition";s(QDe,"isCondition");s(ZDe,"isFeatureName");s(fre,"isPrimitiveType");$L="TypeDefinition";s(JDe,"isTypeDefinition");$k="ValueLiteral";s(eRe,"isValueLiteral");GL="AbstractElement";s(Cv,"isAbstractElement");VL="ArrayLiteral";s(tRe,"isArrayLiteral");UL="ArrayType";s(qL,"isArrayType");WL="BooleanLiteral";s(HL,"isBooleanLiteral");YL="Conjunction";s(XL,"isConjunction");jL="Disjunction";s(KL,"isDisjunction");QL="Grammar";s(rRe,"isGrammar");dre="GrammarImport";s(nRe,"isGrammarImport");ZL="InferredType";s(Vk,"isInferredType");JL="Interface";s(Uk,"isInterface");pre="NamedArgument";s(iRe,"isNamedArgument");eD="Negation";s(tD,"isNegation");rD="NumberLiteral";s(aRe,"isNumberLiteral");nD="Parameter";s(sRe,"isParameter");iD="ParameterReference";s(aD,"isParameterReference");sD="ParserRule";s(Sa,"isParserRule");oD="ReferenceType";s(lD,"isReferenceType");mre="ReturnType";s(cD,"isReturnType");uD="SimpleType";s(qk,"isSimpleType");hD="StringLiteral";s(oRe,"isStringLiteral");Gk="TerminalRule";s(Ro,"isTerminalRule");fD="Type";s(Sv,"isType");gre="TypeAttribute";s(lRe,"isTypeAttribute");dD="UnionType";s(pD,"isUnionType");mD="Action";s(Cu,"isAction");gD="Alternatives";s(Wk,"isAlternatives");yD="Assignment";s(yl,"isAssignment");vD="CharacterRange";s(xD,"isCharacterRange");bD="CrossReference";s(Fd,"isCrossReference");kD="EndOfFile";s(wD,"isEndOfFile");TD="Group";s(Kh,"isGroup");ED="Keyword";s(Mo,"isKeyword");CD="NegatedToken";s(SD,"isNegatedToken");_D="RegexToken";s(AD,"isRegexToken");LD="RuleCall";s(vl,"isRuleCall");DD="TerminalAlternatives";s(RD,"isTerminalAlternatives");MD="TerminalGroup";s(ID,"isTerminalGroup");ND="TerminalRuleCall";s(Hk,"isTerminalRuleCall");OD="UnorderedGroup";s(Yk,"isUnorderedGroup");PD="UntilToken";s(BD,"isUntilToken");FD="Wildcard";s(zD,"isWildcard");Em=class extends Id{static{s(this,"LangiumGrammarAstReflection")}getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,r){switch(e){case mD:case gD:case yD:case vD:case bD:case kD:case TD:case ED:case CD:case _D:case LD:case DD:case MD:case ND:case OD:case PD:case FD:return this.isSubtype(GL,r);case VL:case rD:case hD:return this.isSubtype($k,r);case UL:case oD:case uD:case dD:return this.isSubtype($L,r);case WL:return this.isSubtype(zk,r)||this.isSubtype($k,r);case YL:case jL:case eD:case iD:return this.isSubtype(zk,r);case ZL:case JL:case fD:return this.isSubtype(Ev,r);case sD:return this.isSubtype(Tv,r)||this.isSubtype(Ev,r);case Gk:return this.isSubtype(Tv,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 Ev;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Tv;case"Grammar:usedGrammars":return QL;case"NamedArgument:parameter":case"ParameterReference:parameter":return nD;case"TerminalRuleCall:rule":return Gk;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",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"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",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"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},Gt=new Em});var jk={};ur(jk,{assignMandatoryProperties:()=>VD,copyAstNode:()=>GD,findLocalReferences:()=>uRe,findRootNode:()=>yre,getContainerOfType:()=>zd,getDocument:()=>Ai,hasContainerOfType:()=>cRe,linkContentToContainer:()=>Xk,streamAllContents:()=>gc,streamAst:()=>Io,streamContents:()=>Av,streamReferences:()=>Cm});function Xk(t){for(let[e,r]of Object.entries(t))e.startsWith("$")||(Array.isArray(r)?r.forEach((n,i)=>{$n(n)&&(n.$container=t,n.$containerProperty=e,n.$containerIndex=i)}):$n(r)&&(r.$container=t,r.$containerProperty=e))}function zd(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function cRe(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function Ai(t){let r=yre(t).$document;if(!r)throw new Error("AST node has no document.");return r}function yre(t){for(;t.$container;)t=t.$container;return t}function Av(t,e){if(!t)throw new Error("Node must be an AstNode.");let r=e?.range;return new ro(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){let i=n.keys[n.keyIndex];if(!i.startsWith("$")){let a=t[i];if($n(a)){if(n.keyIndex++,$D(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){let o=n.arrayIndex++,l=a[o];if($n(l)&&$D(l,r))return{done:!1,value:l}}n.arrayIndex=0}}n.keyIndex++}return Wa})}function gc(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new pc(t,r=>Av(r,e))}function Io(t,e){if(t){if(e?.range&&!$D(t,e.range))return new pc(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new pc(t,r=>Av(r,e),{includeRoot:!0})}function $D(t,e){var r;if(!e)return!0;let n=(r=t.$cstNode)===null||r===void 0?void 0:r.range;return n?BL(n,e):!1}function Cm(t){return new ro(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){let r=e.keys[e.keyIndex];if(!r.startsWith("$")){let n=t[r];if(ua(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){let i=e.arrayIndex++,a=n[i];if(ua(a))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Wa})}function uRe(t,e=Ai(t).parseResult.value){let r=[];return Io(e).forEach(n=>{Cm(n).forEach(i=>{i.reference.ref===t&&r.push(i.reference)})}),Wr(r)}function VD(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]=vre(i.defaultValue))}function vre(t){return Array.isArray(t)?[...t.map(vre)]:t}function GD(t,e){let r={$type:t.$type};for(let[n,i]of Object.entries(t))if(!n.startsWith("$"))if($n(i))r[n]=GD(i,e);else if(ua(i))r[n]=e(r,n,i.$refNode,i.$refText);else if(Array.isArray(i)){let a=[];for(let o of i)$n(o)?a.push(GD(o,e)):ua(o)?a.push(e(r,n,o.$refNode,o.$refText)):a.push(o);r[n]=a}else r[n]=i;return Xk(r),r}var Ha=_(()=>{"use strict";Do();Es();gl();s(Xk,"linkContentToContainer");s(zd,"getContainerOfType");s(cRe,"hasContainerOfType");s(Ai,"getDocument");s(yre,"findRootNode");s(Av,"streamContents");s(gc,"streamAllContents");s(Io,"streamAst");s($D,"isAstNodeInRange");s(Cm,"streamReferences");s(uRe,"findLocalReferences");s(VD,"assignMandatoryProperties");s(vre,"copyDefaultValue");s(GD,"copyAstNode")});function zt(t){return t.charCodeAt(0)}function Kk(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function Sm(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function $d(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Lv(){throw Error("Internal Error - Should never get here!")}function UD(t){return t.type==="Character"}var qD=_(()=>{"use strict";s(zt,"cc");s(Kk,"insertToSet");s(Sm,"addFlag");s($d,"ASSERT_EXISTS");s(Lv,"ASSERT_NEVER_REACH_HERE");s(UD,"isCharacter")});var Dv,Rv,WD,xre=_(()=>{"use strict";qD();Dv=[];for(let t=zt("0");t<=zt("9");t++)Dv.push(t);Rv=[zt("_")].concat(Dv);for(let t=zt("a");t<=zt("z");t++)Rv.push(t);for(let t=zt("A");t<=zt("Z");t++)Rv.push(t);WD=[zt(" "),zt("\f"),zt(`
`),zt("\r"),zt(" "),zt("\v"),zt(" "),zt("\xA0"),zt("\u1680"),zt("\u2000"),zt("\u2001"),zt("\u2002"),zt("\u2003"),zt("\u2004"),zt("\u2005"),zt("\u2006"),zt("\u2007"),zt("\u2008"),zt("\u2009"),zt("\u200A"),zt("\u2028"),zt("\u2029"),zt("\u202F"),zt("\u205F"),zt("\u3000"),zt("\uFEFF")]});var hRe,Qk,fRe,Gd,bre=_(()=>{"use strict";qD();xre();hRe=/[0-9a-fA-F]/,Qk=/[0-9]/,fRe=/[1-9]/,Gd=class{static{s(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");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":Sm(n,"global");break;case"i":Sm(n,"ignoreCase");break;case"m":Sm(n,"multiLine");break;case"u":Sm(n,"unicode");break;case"y":Sm(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}$d(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return Lv()}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;$d(r);break}if(!(e===!0&&r===void 0)&&$d(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()),$d(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Lv()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[zt(`
`),zt("\r"),zt("\u2028"),zt("\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=Dv;break;case"D":e=Dv,r=!0;break;case"s":e=WD;break;case"S":e=WD,r=!0;break;case"w":e=Rv;break;case"W":e=Rv,r=!0;break}return $d(e)?{type:"Set",value:e,complement:r}:Lv()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=zt("\f");break;case"n":e=zt(`
`);break;case"r":e=zt("\r");break;case"t":e=zt(" ");break;case"v":e=zt("\v");break}return $d(e)?{type:"Character",value:e}:Lv()}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:zt("\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:zt(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:zt(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(UD(n)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),o=a.type==="Character";if(UD(a)){if(a.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:a.value})}else Kk(n.value,e),e.push(zt("-")),Kk(a.value,e)}else Kk(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:r,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:zt("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(fRe.test(e)===!1)throw Error("Expecting a positive integer");for(;Qk.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Qk.test(e)===!1)throw Error("Expecting an integer");for(;Qk.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:zt(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return Qk.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let i=0;i<e;i++){let a=this.popChar();if(hRe.test(a)===!1)throw Error("Expecting a HexDecimal digits");r+=a}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}});var yc,kre=_(()=>{"use strict";yc=class{static{s(this,"BaseRegExpVisitor")}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 Mv=_(()=>{"use strict";bre();kre()});var Jk={};ur(Jk,{NEWLINE_REGEXP:()=>YD,escapeRegExp:()=>Ud,getCaseInsensitivePattern:()=>jD,getTerminalParts:()=>dRe,isMultilineComment:()=>XD,isWhitespace:()=>Zk,partialMatches:()=>KD,partialRegExp:()=>Tre});function dRe(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;let e=wre.pattern(t),r=[];for(let n of e.value.value)Vd.reset(t),Vd.visit(n),r.push({start:Vd.startRegexp,end:Vd.endRegex});return r}catch{return[]}}function XD(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Vd.reset(t),Vd.visit(wre.pattern(t)),Vd.multiline}catch{return!1}}function Zk(t){return(typeof t=="string"?new RegExp(t):t).test(" ")}function Ud(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jD(t){return Array.prototype.map.call(t,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:Ud(e)).join("")}function KD(t,e){let r=Tre(t),n=e.match(r);return!!n&&n[0].length>0}function Tre(t){typeof t=="string"&&(t=new RegExp(t));let e=t,r=t.source,n=0;function i(){let a="",o;function l(h){a+=r.substr(n,h),n+=h}s(l,"appendRaw");function u(h){a+="(?:"+r.substr(n,h)+"|$)",n+=h}for(s(u,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":u(3);break;case"x":u(4);break;case"u":e.unicode?r[n+2]==="{"?u(r.indexOf("}",n)-n+1):u(6):u(2);break;case"p":case"P":e.unicode?u(r.indexOf("}",n)-n+1):u(2);break;case"k":u(r.indexOf(">",n)-n+1);break;default:u(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=n,o=o.exec(r)||[],u(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":l(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o?l(o[0].length):u(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"!":o=n,n+=3,i(),a+=r.substr(o,n-o);break;case"<":switch(r[n+3]){case"=":case"!":o=n,n+=4,i(),a+=r.substr(o,n-o);break;default:l(r.indexOf(">",n)-n+1),a+=i()+"|$)";break}break}else l(1),a+=i()+"|$)";break;case")":return++n,a;default:u(1);break}return a}return s(i,"process"),new RegExp(i(),t.flags)}var YD,wre,HD,Vd,_m=_(()=>{"use strict";Mv();YD=/\r?\n/gm,wre=new Gd,HD=class extends yc{static{s(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let r=String.fromCharCode(e.value);if(!this.multiline&&r===`
`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=Ud(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)}},Vd=new HD;s(dRe,"getTerminalParts");s(XD,"isMultilineComment");s(Zk,"isWhitespace");s(Ud,"escapeRegExp");s(jD,"getCaseInsensitivePattern");s(KD,"partialMatches");s(Tre,"partialRegExp")});var t6={};ur(t6,{findAssignment:()=>aR,findNameAssignment:()=>e6,findNodeForKeyword:()=>nR,findNodeForProperty:()=>Nv,findNodesForKeyword:()=>pRe,findNodesForKeywordInternal:()=>iR,findNodesForProperty:()=>tR,getActionAtElement:()=>Are,getActionType:()=>Dre,getAllReachableRules:()=>Iv,getCrossReferenceTerminal:()=>JD,getEntryRule:()=>Ere,getExplicitRuleType:()=>sR,getHiddenRules:()=>Cre,getRuleType:()=>oR,getTypeName:()=>qd,isArrayCardinality:()=>gRe,isArrayOperator:()=>yRe,isCommentTerminal:()=>eR,isDataType:()=>vRe,isDataTypeRule:()=>Ov,isOptionalCardinality:()=>mRe,terminalRegex:()=>Am});function Ere(t){return t.rules.find(e=>Sa(e)&&e.entry)}function Cre(t){return t.rules.filter(e=>Ro(e)&&e.hidden)}function Iv(t,e){let r=new Set,n=Ere(t);if(!n)return new Set(t.rules);let i=[n].concat(Cre(t));for(let o of i)Sre(o,r,e);let a=new Set;for(let o of t.rules)(r.has(o.name)||Ro(o)&&o.hidden)&&a.add(o);return a}function Sre(t,e,r){e.add(t.name),gc(t).forEach(n=>{if(vl(n)||r&&Hk(n)){let i=n.rule.ref;i&&!e.has(i.name)&&Sre(i,e,r)}})}function JD(t){if(t.terminal)return t.terminal;if(t.type.ref){let e=e6(t.type.ref);return e?.terminal}}function eR(t){return t.hidden&&!Am(t).test(" ")}function tR(t,e){return!t||!e?[]:rR(t,e,t.astNode,!0)}function Nv(t,e,r){if(!t||!e)return;let n=rR(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 rR(t,e,r,n){if(!n){let i=zd(t.grammarSource,yl);if(i&&i.feature===e)return[t]}return to(t)&&t.astNode===r?t.content.flatMap(i=>rR(i,e,r,!1)):[]}function pRe(t,e){return t?iR(t,e,t?.astNode):[]}function nR(t,e,r){if(!t)return;let n=iR(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 iR(t,e,r){if(t.astNode!==r)return[];if(Mo(t.grammarSource)&&t.grammarSource.value===e)return[t];let n=Od(t).iterator(),i,a=[];do if(i=n.next(),!i.done){let o=i.value;o.astNode===r?Mo(o.grammarSource)&&o.grammarSource.value===e&&a.push(o):n.prune()}while(!i.done);return a}function aR(t){var e;let r=t.astNode;for(;r===((e=t.container)===null||e===void 0?void 0:e.astNode);){let n=zd(t.grammarSource,yl);if(n)return n;t=t.container}}function e6(t){let e=t;return Vk(e)&&(Cu(e.$container)?e=e.$container.$container:Sa(e.$container)?e=e.$container:jh(e.$container)),_re(t,e,new Map)}function _re(t,e,r){var n;function i(a,o){let l;return zd(a,yl)||(l=_re(o,o,r)),r.set(t,l),l}if(s(i,"go"),r.has(t))return r.get(t);r.set(t,void 0);for(let a of gc(e)){if(yl(a)&&a.feature.toLowerCase()==="name")return r.set(t,a),a;if(vl(a)&&Sa(a.rule.ref))return i(a,a.rule.ref);if(qk(a)&&(!((n=a.typeRef)===null||n===void 0)&&n.ref))return i(a,a.typeRef.ref)}}function Are(t){let e=t.$container;if(Kh(e)){let r=e.elements,n=r.indexOf(t);for(let i=n-1;i>=0;i--){let a=r[i];if(Cu(a))return a;{let o=gc(r[i]).find(Cu);if(o)return o}}}if(Cv(e))return Are(e)}function mRe(t,e){return t==="?"||t==="*"||Kh(e)&&!!e.guardCondition}function gRe(t){return t==="*"||t==="+"}function yRe(t){return t==="+="}function Ov(t){return Lre(t,new Set)}function Lre(t,e){if(e.has(t))return!0;e.add(t);for(let r of gc(t))if(vl(r)){if(!r.rule.ref||Sa(r.rule.ref)&&!Lre(r.rule.ref,e))return!1}else{if(yl(r))return!1;if(Cu(r))return!1}return!!t.definition}function vRe(t){return ZD(t.type,new Set)}function ZD(t,e){if(e.has(t))return!0;if(e.add(t),qL(t))return!1;if(lD(t))return!1;if(pD(t))return t.types.every(r=>ZD(r,e));if(qk(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 Sv(r)?ZD(r.type,e):!1}else return!1}else return!1}function sR(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(Sa(e))return e.name;if(Uk(e)||Sv(e))return e.name}}}function qd(t){var e;if(Sa(t))return Ov(t)?t.name:(e=sR(t))!==null&&e!==void 0?e:t.name;if(Uk(t)||Sv(t)||cD(t))return t.name;if(Cu(t)){let r=Dre(t);if(r)return r}else if(Vk(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function Dre(t){var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return qd(t.type.ref)}function oR(t){var e,r,n;return Ro(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":Ov(t)?t.name:(n=sR(t))!==null&&n!==void 0?n:t.name}function Am(t){let e={s:!1,i:!1,u:!1},r=Lm(t.definition,e),n=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}function Lm(t,e){if(RD(t))return xRe(t);if(ID(t))return bRe(t);if(xD(t))return TRe(t);if(Hk(t)){let r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return Su(Lm(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else{if(SD(t))return wRe(t);if(BD(t))return kRe(t);if(AD(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")),Su(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else{if(zD(t))return Su(lR,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t?.$type}`)}}}function xRe(t){return Su(t.elements.map(e=>Lm(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function bRe(t){return Su(t.elements.map(e=>Lm(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function kRe(t){return Su(`${lR}*?${Lm(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function wRe(t){return Su(`(?!${Lm(t.terminal)})${lR}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function TRe(t){return t.right?Su(`[${QD(t.left)}-${QD(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):Su(QD(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function QD(t){return Ud(t.value)}function Su(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 lR,xl=_(()=>{"use strict";Fk();mc();Do();Ha();gl();_m();s(Ere,"getEntryRule");s(Cre,"getHiddenRules");s(Iv,"getAllReachableRules");s(Sre,"ruleDfs");s(JD,"getCrossReferenceTerminal");s(eR,"isCommentTerminal");s(tR,"findNodesForProperty");s(Nv,"findNodeForProperty");s(rR,"findNodesForPropertyInternal");s(pRe,"findNodesForKeyword");s(nR,"findNodeForKeyword");s(iR,"findNodesForKeywordInternal");s(aR,"findAssignment");s(e6,"findNameAssignment");s(_re,"findNameAssignmentInternal");s(Are,"getActionAtElement");s(mRe,"isOptionalCardinality");s(gRe,"isArrayCardinality");s(yRe,"isArrayOperator");s(Ov,"isDataTypeRule");s(Lre,"isDataTypeRuleInternal");s(vRe,"isDataType");s(ZD,"isDataTypeInternal");s(sR,"getExplicitRuleType");s(qd,"getTypeName");s(Dre,"getActionType");s(oR,"getRuleType");s(Am,"terminalRegex");lR=/[\s\S]/.source;s(Lm,"abstractElementToRegex");s(xRe,"terminalAlternativesToRegex");s(bRe,"terminalGroupToRegex");s(kRe,"untilTokenToRegex");s(wRe,"negateTokenToRegex");s(TRe,"characterRangeToRegex");s(QD,"keywordToRegex");s(Su,"withCardinality")});function cR(t){let e=[],r=t.Grammar;for(let n of r.rules)Ro(n)&&eR(n)&&XD(Am(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:Pk}}var uR=_(()=>{"use strict";gl();xl();_m();mc();s(cR,"createGrammarConfig")});var hR=_(()=>{"use strict"});function Dm(t){console&&console.error&&console.error(`Error: ${t}`)}function Pv(t){console&&console.warn&&console.warn(`Warning: ${t}`)}var Rre=_(()=>{"use strict";s(Dm,"PRINT_ERROR");s(Pv,"PRINT_WARNING")});function Bv(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}var Mre=_(()=>{"use strict";s(Bv,"timer")});function Fv(t){function e(){}s(e,"FakeConstructor"),e.prototype=t;let r=new e;function n(){return typeof r.bar}return s(n,"fakeAccess"),n(),n(),t;(0,eval)(t)}var Ire=_(()=>{"use strict";s(Fv,"toFastProperties")});var Rm=_(()=>{"use strict";Rre();Mre();Ire()});function ERe(t){return CRe(t)?t.LABEL:t.name}function CRe(t){return si(t.LABEL)&&t.LABEL!==""}function r6(t){return Ge(t,Mm)}function Mm(t){function e(r){return Ge(r,Mm)}if(s(e,"convertDefinition"),t instanceof Yr){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return si(t.label)&&(r.label=t.label),r}else{if(t instanceof vn)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Xr)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof xn)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof bn)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Mm(new sr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ln)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Mm(new sr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof mr)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof cn)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof sr){let r={type:"Terminal",name:t.terminalType.name,label:ERe(t.terminalType),idx:t.idx};si(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=_o(n)?n.source:n),r}else{if(t instanceof Ya)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var no,Yr,Ya,vn,Xr,xn,bn,mr,ln,cn,sr,n6=_(()=>{"use strict";Tt();s(ERe,"tokenLabel");s(CRe,"hasTokenLabel");no=class{static{s(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),be(this.definition,r=>{r.accept(e)})}},Yr=class extends no{static{s(this,"NonTerminal")}constructor(e){super([]),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Ya=class extends no{static{s(this,"Rule")}constructor(e){super(e.definition),this.orgText="",aa(this,Ts(e,r=>r!==void 0))}},vn=class extends no{static{s(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,aa(this,Ts(e,r=>r!==void 0))}},Xr=class extends no{static{s(this,"Option")}constructor(e){super(e.definition),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}},xn=class extends no{static{s(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}},bn=class extends no{static{s(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}},mr=class extends no{static{s(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}},ln=class extends no{static{s(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}},cn=class extends no{static{s(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,aa(this,Ts(e,r=>r!==void 0))}},sr=class{static{s(this,"Terminal")}constructor(e){this.idx=1,aa(this,Ts(e,r=>r!==void 0))}accept(e){e.visit(this)}};s(r6,"serializeGrammar");s(Mm,"serializeProduction")});var Xa,Nre=_(()=>{"use strict";n6();Xa=class{static{s(this,"GAstVisitor")}visit(e){let r=e;switch(r.constructor){case Yr:return this.visitNonTerminal(r);case vn:return this.visitAlternative(r);case Xr:return this.visitOption(r);case xn:return this.visitRepetitionMandatory(r);case bn:return this.visitRepetitionMandatoryWithSeparator(r);case ln:return this.visitRepetitionWithSeparator(r);case mr:return this.visitRepetition(r);case cn:return this.visitAlternation(r);case sr:return this.visitTerminal(r);case Ya: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 fR(t){return t instanceof vn||t instanceof Xr||t instanceof mr||t instanceof xn||t instanceof bn||t instanceof ln||t instanceof sr||t instanceof Ya}function Wd(t,e=[]){return t instanceof Xr||t instanceof mr||t instanceof ln?!0:t instanceof cn?pv(t.definition,n=>Wd(n,e)):t instanceof Yr&&Rn(e,t)?!1:t instanceof no?(t instanceof Yr&&e.push(t),Ca(t.definition,n=>Wd(n,e))):!1}function dR(t){return t instanceof cn}function Cs(t){if(t instanceof Yr)return"SUBRULE";if(t instanceof Xr)return"OPTION";if(t instanceof cn)return"OR";if(t instanceof xn)return"AT_LEAST_ONE";if(t instanceof bn)return"AT_LEAST_ONE_SEP";if(t instanceof ln)return"MANY_SEP";if(t instanceof mr)return"MANY";if(t instanceof sr)return"CONSUME";throw Error("non exhaustive match")}var Ore=_(()=>{"use strict";Tt();n6();s(fR,"isSequenceProd");s(Wd,"isOptionalProd");s(dR,"isBranchingProd");s(Cs,"getProductionDslName")});var ja=_(()=>{"use strict";n6();Nre();Ore()});function Pre(t,e,r){return[new Xr({definition:[new sr({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var _u,i6=_(()=>{"use strict";Tt();ja();_u=class{static{s(this,"RestWalker")}walk(e,r=[]){be(e.definition,(n,i)=>{let a=ai(e.definition,i+1);if(n instanceof Yr)this.walkProdRef(n,a,r);else if(n instanceof sr)this.walkTerminal(n,a,r);else if(n instanceof vn)this.walkFlat(n,a,r);else if(n instanceof Xr)this.walkOption(n,a,r);else if(n instanceof xn)this.walkAtLeastOne(n,a,r);else if(n instanceof bn)this.walkAtLeastOneSep(n,a,r);else if(n instanceof ln)this.walkManySep(n,a,r);else if(n instanceof mr)this.walkMany(n,a,r);else if(n instanceof cn)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 Xr({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=Pre(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new Xr({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=Pre(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);be(e.definition,a=>{let o=new vn({definition:[a]});this.walk(o,i)})}};s(Pre,"restForRepetitionWithSeparator")});function Hd(t){if(t instanceof Yr)return Hd(t.referencedRule);if(t instanceof sr)return ARe(t);if(fR(t))return SRe(t);if(dR(t))return _Re(t);throw Error("non exhaustive match")}function SRe(t){let e=[],r=t.definition,n=0,i=r.length>n,a,o=!0;for(;i&&o;)a=r[n],o=Wd(a),e=e.concat(Hd(a)),n=n+1,i=r.length>n;return bm(e)}function _Re(t){let e=Ge(t.definition,r=>Hd(r));return bm(Ir(e))}function ARe(t){return[t.terminalType]}var pR=_(()=>{"use strict";Tt();ja();s(Hd,"first");s(SRe,"firstForSequence");s(_Re,"firstForBranching");s(ARe,"firstForTerminal")});var a6,mR=_(()=>{"use strict";a6="_~IN~_"});function Bre(t){let e={};return be(t,r=>{let n=new gR(r).startWalking();aa(e,n)}),e}function LRe(t,e){return t.name+e+a6}var gR,Fre=_(()=>{"use strict";i6();pR();Tt();mR();ja();gR=class extends _u{static{s(this,"ResyncFollowsWalker")}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=LRe(e.referencedRule,e.idx)+this.topProd.name,a=r.concat(n),o=new vn({definition:a}),l=Hd(o);this.follows[i]=l}};s(Bre,"computeAllProdsFollows");s(LRe,"buildBetweenProdsFollowPrefix")});function Im(t){let e=t.toString();if(s6.hasOwnProperty(e))return s6[e];{let r=DRe.pattern(e);return s6[e]=r,r}}function zre(){s6={}}var s6,DRe,o6=_(()=>{"use strict";Mv();s6={},DRe=new Gd;s(Im,"getRegExpAst");s(zre,"clearRegExpParserCache")});function Vre(t,e=!1){try{let r=Im(t);return yR(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Gre)e&&Pv(`${zv} 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.`),Dm(`${zv}
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 yR(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)yR(t.value[i],e,r);break;case"Alternative":let n=t.value;for(let i=0;i<n.length;i++){let a=n[i];switch(a.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let o=a;switch(o.type){case"Character":l6(o.value,e,r);break;case"Set":if(o.complement===!0)throw Error(Gre);be(o.value,u=>{if(typeof u=="number")l6(u,e,r);else{let h=u;if(r===!0)for(let f=h.from;f<=h.to;f++)l6(f,e,r);else{for(let f=h.from;f<=h.to&&f<Nm;f++)l6(f,e,r);if(h.to>=Nm){let f=h.from>=Nm?h.from:Nm,d=h.to,p=vc(f),m=vc(d);for(let g=p;g<=m;g++)e[g]=g}}}});break;case"Group":yR(o.value,e,r);break;default:throw Error("Non Exhaustive Match")}let l=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&vR(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return nr(e)}function l6(t,e,r){let n=vc(t);e[n]=n,r===!0&&RRe(t,e)}function RRe(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=vc(n.charCodeAt(0));e[i]=i}else{let i=r.toLowerCase();if(i!==r){let a=vc(i.charCodeAt(0));e[a]=a}}}function $re(t,e){return qa(t.value,r=>{if(typeof r=="number")return Rn(e,r);{let n=r;return qa(e,i=>n.from<=i&&i<=n.to)!==void 0}})}function vR(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?ct(t.value)?Ca(t.value,vR):vR(t.value):!1}function c6(t,e){if(e instanceof RegExp){let r=Im(e),n=new xR(t);return n.visit(r),n.found}else return qa(e,r=>Rn(t,r.charCodeAt(0)))!==void 0}var Gre,zv,xR,Ure=_(()=>{"use strict";Mv();Tt();Rm();o6();bR();Gre="Complement Sets are not supported for first char optimization",zv=`Unable to use "first char" lexer optimizations:
`;s(Vre,"getOptimizedStartCodesIndices");s(yR,"firstCharOptimizedIndices");s(l6,"addOptimizedIdxToResult");s(RRe,"handleIgnoreCase");s($re,"findCode");s(vR,"isWholeOptional");xR=class extends yc{static{s(this,"CharCodeFinder")}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){Rn(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?$re(e,this.targetCharCodes)===void 0&&(this.found=!0):$re(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};s(c6,"canMatchCharCode")});function Hre(t,e){e=Vh(e,{useSticky:wR,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
`],tracer:s((b,k)=>k(),"tracer")});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{jRe()});let n;r("Reject Lexer.NA",()=>{n=qh(t,b=>b[Yd]===jn.NA)});let i=!1,a;r("Transform Patterns",()=>{i=!1,a=Ge(n,b=>{let k=b[Yd];if(_o(k)){let A=k.source;return A.length===1&&A!=="^"&&A!=="$"&&A!=="."&&!k.ignoreCase?A:A.length===2&&A[0]==="\\"&&!Rn(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],A[1])?A[1]:e.useSticky?Wre(k):qre(k)}else{if(fi(k))return i=!0,{exec:k};if(typeof k=="object")return i=!0,k;if(typeof k=="string"){if(k.length===1)return k;{let A=k.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),w=new RegExp(A);return e.useSticky?Wre(w):qre(w)}}else throw Error("non exhaustive match")}})});let o,l,u,h,f;r("misc mapping",()=>{o=Ge(n,b=>b.tokenTypeIdx),l=Ge(n,b=>{let k=b.GROUP;if(k!==jn.SKIPPED){if(si(k))return k;if(jt(k))return!1;throw Error("non exhaustive match")}}),u=Ge(n,b=>{let k=b.LONGER_ALT;if(k)return ct(k)?Ge(k,w=>pk(n,w)):[pk(n,k)]}),h=Ge(n,b=>b.PUSH_MODE),f=Ge(n,b=>Ve(b,"POP_MODE"))});let d;r("Line Terminator Handling",()=>{let b=ene(e.lineTerminatorCharacters);d=Ge(n,k=>!1),e.positionTracking!=="onlyOffset"&&(d=Ge(n,k=>Ve(k,"LINE_BREAKS")?!!k.LINE_BREAKS:Jre(k,b)===!1&&c6(b,k.PATTERN)))});let p,m,g,y;r("Misc Mapping #2",()=>{p=Ge(n,Qre),m=Ge(a,YRe),g=Or(n,(b,k)=>{let A=k.GROUP;return si(A)&&A!==jn.SKIPPED&&(b[A]=[]),b},{}),y=Ge(a,(b,k)=>({pattern:a[k],longerAlt:u[k],canLineTerminator:d[k],isCustom:p[k],short:m[k],group:l[k],push:h[k],pop:f[k],tokenTypeIdx:o[k],tokenType:n[k]}))});let v=!0,x=[];return e.safeMode||r("First Char Optimization",()=>{x=Or(n,(b,k,A)=>{if(typeof k.PATTERN=="string"){let w=k.PATTERN.charCodeAt(0),T=vc(w);kR(b,T,y[A])}else if(ct(k.START_CHARS_HINT)){let w;be(k.START_CHARS_HINT,T=>{let C=typeof T=="string"?T.charCodeAt(0):T,E=vc(C);w!==E&&(w=E,kR(b,E,y[A]))})}else if(_o(k.PATTERN))if(k.PATTERN.unicode)v=!1,e.ensureOptimizations&&Dm(`${zv} Unable to analyze < ${k.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 w=Vre(k.PATTERN,e.ensureOptimizations);Vt(w)&&(v=!1),be(w,T=>{kR(b,T,y[A])})}else e.ensureOptimizations&&Dm(`${zv} TokenType: <${k.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
This will disable the lexer's first char optimizations.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),v=!1;return b},[])}),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:x,hasCustom:i,canBeOptimized:v}}function Yre(t,e){let r=[],n=IRe(t);r=r.concat(n.errors);let i=NRe(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(MRe(a)),r=r.concat(VRe(a)),r=r.concat(URe(a,e)),r=r.concat(qRe(a)),r}function MRe(t){let e=[],r=Nr(t,n=>_o(n[Yd]));return e=e.concat(PRe(r)),e=e.concat(zRe(r)),e=e.concat($Re(r)),e=e.concat(GRe(r)),e=e.concat(BRe(r)),e}function IRe(t){let e=Nr(t,i=>!Ve(i,Yd)),r=Ge(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:In.MISSING_PATTERN,tokenTypes:[i]})),n=Uh(t,e);return{errors:r,valid:n}}function NRe(t){let e=Nr(t,i=>{let a=i[Yd];return!_o(a)&&!fi(a)&&!Ve(a,"exec")&&!si(a)}),r=Ge(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:In.INVALID_PATTERN,tokenTypes:[i]})),n=Uh(t,e);return{errors:r,valid:n}}function PRe(t){class e extends yc{static{s(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}let r=Nr(t,i=>{let a=i.PATTERN;try{let o=Im(a),l=new e;return l.visit(o),l.found}catch{return ORe.test(a.source)}});return Ge(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:In.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function BRe(t){let e=Nr(t,n=>n.PATTERN.test(""));return Ge(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:In.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function zRe(t){class e extends yc{static{s(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}let r=Nr(t,i=>{let a=i.PATTERN;try{let o=Im(a),l=new e;return l.visit(o),l.found}catch{return FRe.test(a.source)}});return Ge(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:In.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function $Re(t){let e=Nr(t,n=>{let i=n[Yd];return i instanceof RegExp&&(i.multiline||i.global)});return Ge(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:In.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function GRe(t){let e=[],r=Ge(t,a=>Or(t,(o,l)=>(a.PATTERN.source===l.PATTERN.source&&!Rn(e,l)&&l.PATTERN!==jn.NA&&(e.push(l),o.push(l)),o),[]));r=uc(r);let n=Nr(r,a=>a.length>1);return Ge(n,a=>{let o=Ge(a,u=>u.name);return{message:`The same RegExp pattern ->${Yi(a).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:In.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}function VRe(t){let e=Nr(t,n=>{if(!Ve(n,"GROUP"))return!1;let i=n.GROUP;return i!==jn.SKIPPED&&i!==jn.NA&&!si(i)});return Ge(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:In.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function URe(t,e){let r=Nr(t,i=>i.PUSH_MODE!==void 0&&!Rn(e,i.PUSH_MODE));return Ge(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:In.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function qRe(t){let e=[],r=Or(t,(n,i,a)=>{let o=i.PATTERN;return o===jn.NA||(si(o)?n.push({str:o,idx:a,tokenType:i}):_o(o)&&HRe(o)&&n.push({str:o.source,idx:a,tokenType:i})),n},[]);return be(t,(n,i)=>{be(r,({str:a,idx:o,tokenType:l})=>{if(i<o&&WRe(a,n.PATTERN)){let u=`Token: ->${l.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:u,type:In.UNREACHABLE_PATTERN,tokenTypes:[n,l]})}})}),e}function WRe(t,e){if(_o(e)){let r=e.exec(t);return r!==null&&r.index===0}else{if(fi(e))return e(t,0,[],{});if(Ve(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function HRe(t){return qa([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}function qre(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Wre(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function Xre(t,e,r){let n=[];return Ve(t,Om)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Om+`> property in its definition
`,type:In.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Ve(t,u6)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+u6+`> property in its definition
`,type:In.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Ve(t,u6)&&Ve(t,Om)&&!Ve(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Om}: <${t.defaultMode}>which does not exist
`,type:In.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Ve(t,u6)&&be(t.modes,(i,a)=>{be(i,(o,l)=>{if(jt(o))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${l}>
`,type:In.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Ve(o,"LONGER_ALT")){let u=ct(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];be(u,h=>{!jt(h)&&!Rn(i,h)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${h.name}> on token <${o.name}> outside of mode <${a}>
`,type:In.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function jre(t,e,r){let n=[],i=!1,a=uc(Ir(nr(t.modes))),o=qh(a,u=>u[Yd]===jn.NA),l=ene(r);return e&&be(o,u=>{let h=Jre(u,l);if(h!==!1){let d={message:XRe(u,h),type:h.issue,tokenType:u};n.push(d)}else Ve(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):c6(l,u.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:In.NO_LINE_BREAKS_FLAGS}),n}function Kre(t){let e={},r=kr(t);return be(r,n=>{let i=t[n];if(ct(i))e[n]=[];else throw Error("non exhaustive match")}),e}function Qre(t){let e=t.PATTERN;if(_o(e))return!1;if(fi(e))return!0;if(Ve(e,"exec"))return!0;if(si(e))return!1;throw Error("non exhaustive match")}function YRe(t){return si(t)&&t.length===1?t.charCodeAt(0):!1}function Jre(t,e){if(Ve(t,"LINE_BREAKS"))return!1;if(_o(t.PATTERN)){try{c6(e,t.PATTERN)}catch(r){return{issue:In.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(si(t.PATTERN))return!1;if(Qre(t))return{issue:In.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function XRe(t,e){if(e.issue===In.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===In.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> 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 ene(t){return Ge(t,r=>si(r)?r.charCodeAt(0):r)}function kR(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function vc(t){return t<Nm?t:h6[t]}function jRe(){if(Vt(h6)){h6=new Array(65536);for(let t=0;t<65536;t++)h6[t]=t>255?255+~~(t/255):t}}var Yd,Om,u6,wR,ORe,FRe,Zre,Nm,h6,bR=_(()=>{"use strict";Mv();$v();Tt();Rm();Ure();o6();Yd="PATTERN",Om="defaultMode",u6="modes",wR=typeof new RegExp("(?:)").sticky=="boolean";s(Hre,"analyzeTokenTypes");s(Yre,"validatePatterns");s(MRe,"validateRegExpPattern");s(IRe,"findMissingPatterns");s(NRe,"findInvalidPatterns");ORe=/[^\\][$]/;s(PRe,"findEndOfInputAnchor");s(BRe,"findEmptyMatchRegExps");FRe=/[^\\[][\^]|^\^/;s(zRe,"findStartOfInputAnchor");s($Re,"findUnsupportedFlags");s(GRe,"findDuplicatePatterns");s(VRe,"findInvalidGroupType");s(URe,"findModesThatDoNotExist");s(qRe,"findUnreachablePatterns");s(WRe,"testTokenType");s(HRe,"noMetaChar");s(qre,"addStartOfInput");s(Wre,"addStickyFlag");s(Xre,"performRuntimeChecks");s(jre,"performWarningRuntimeChecks");s(Kre,"cloneEmptyGroups");s(Qre,"isCustomPattern");s(YRe,"isShortPattern");Zre={test:s(function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};s(Jre,"checkLineBreaksIssues");s(XRe,"buildLineBreakIssueMessage");s(ene,"getCharCodes");s(kR,"addToMapOfArrays");Nm=256,h6=[];s(vc,"charCodeToOptimizedIndex");s(jRe,"initCharCodeToOptimizedIndexMap")});function Au(t,e){let r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}function Pm(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}function Lu(t){let e=KRe(t);QRe(e),JRe(e),ZRe(e),be(e,r=>{r.isParent=r.categoryMatches.length>0})}function KRe(t){let e=Hr(t),r=t,n=!0;for(;n;){r=uc(Ir(Ge(r,a=>a.CATEGORIES)));let i=Uh(r,e);e=e.concat(i),Vt(i)?n=!1:r=i}return e}function QRe(t){be(t,e=>{TR(e)||(nne[tne]=e,e.tokenTypeIdx=tne++),rne(e)&&!ct(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),rne(e)||(e.CATEGORIES=[]),eMe(e)||(e.categoryMatches=[]),tMe(e)||(e.categoryMatchesMap={})})}function ZRe(t){be(t,e=>{e.categoryMatches=[],be(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(nne[n].tokenTypeIdx)})})}function JRe(t){be(t,e=>{ine([],e)})}function ine(t,e){be(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),be(e.CATEGORIES,r=>{let n=t.concat(e);Rn(n,r)||ine(n,r)})}function TR(t){return Ve(t,"tokenTypeIdx")}function rne(t){return Ve(t,"CATEGORIES")}function eMe(t){return Ve(t,"categoryMatches")}function tMe(t){return Ve(t,"categoryMatchesMap")}function ane(t){return Ve(t,"tokenTypeIdx")}var tne,nne,Xd=_(()=>{"use strict";Tt();s(Au,"tokenStructuredMatcher");s(Pm,"tokenStructuredMatcherNoCategories");tne=1,nne={};s(Lu,"augmentTokenTypes");s(KRe,"expandCategories");s(QRe,"assignTokenDefaultProps");s(ZRe,"assignCategoriesTokensProp");s(JRe,"assignCategoriesMapProp");s(ine,"singleAssignCategoriesToksMap");s(TR,"hasShortKeyProperty");s(rne,"hasCategoriesProperty");s(eMe,"hasExtendingTokensTypesProperty");s(tMe,"hasExtendingTokensTypesMapProperty");s(ane,"isTokenType")});var ER,CR=_(()=>{"use strict";ER={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 In,Gv,jn,$v=_(()=>{"use strict";bR();Tt();Rm();Xd();CR();o6();(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"})(In||(In={}));Gv={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:ER,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Gv);jn=class{static{s(this,"Lexer")}constructor(e,r=Gv){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 o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${o}--> <${i}>`);let{time:l,value:u}=Bv(a),h=l>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&h(`${o}<-- <${i}> time: ${l}ms`),this.traceInitIndent--,u}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=aa({},Gv,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===Gv.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Zre;else if(this.config.lineTerminatorCharacters===Gv.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(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),ct(e)?i={modes:{defaultMode:Hr(e)},defaultMode:Om}:(a=!1,i=Hr(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Xre(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(jre(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},be(i.modes,(l,u)=>{i.modes[u]=qh(l,h=>jt(h))});let o=kr(i.modes);if(be(i.modes,(l,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Yre(l,o))}),Vt(this.lexerDefinitionErrors)){Lu(l);let h;this.TRACE_INIT("analyzeTokenTypes",()=>{h=Hre(l,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=h.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=h.charCodeToPatternIdxToConfig,this.emptyGroups=aa({},this.emptyGroups,h.emptyGroups),this.hasCustom=h.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=h.canBeOptimized}})}),this.defaultMode=i.defaultMode,!Vt(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=Ge(this.lexerDefinitionErrors,h=>h.message).join(`-----------------------
`);throw new Error(`Errors detected in definition of Lexer:
`+u)}be(this.lexerDefinitionWarning,l=>{Pv(l.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(wR?(this.chopInput=Wi,this.match=this.matchWithTest):(this.updateLastIndex=zn,this.match=this.matchWithExec),a&&(this.handleModes=zn),this.trackStartLines===!1&&(this.computeNewColumn=Wi),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=zn),/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 <positionTracking> 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 l=Or(this.canModeBeOptimized,(u,h,f)=>(h===!1&&u.push(f),u),[]);if(r.ensureOptimizations&&!Vt(l))throw Error(`Lexer Modes: < ${l.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",()=>{zre()}),this.TRACE_INIT("toFastProperties",()=>{Fv(this)})})}tokenize(e,r=this.defaultMode){if(!Vt(this.lexerDefinitionErrors)){let i=Ge(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,o,l,u,h,f,d,p,m,g,y,v,x,b,k=e,A=k.length,w=0,T=0,C=this.hasCustom?0:Math.floor(e.length/10),E=new Array(C),S=[],R=this.trackStartLines?1:void 0,D=this.trackStartLines?1:void 0,L=Kre(this.emptyGroups),P=this.trackStartLines,M=this.config.lineTerminatorsPattern,F=0,I=[],O=[],z=[],N=[];Object.freeze(N);let U;function $(){return I}s($,"getPossiblePatternsSlow");function W(fe){let ne=vc(fe),H=O[ne];return H===void 0?N:H}s(W,"getPossiblePatternsOptimized");let ee=s(fe=>{if(z.length===1&&fe.tokenType.PUSH_MODE===void 0){let ne=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(fe);S.push({offset:fe.startOffset,line:fe.startLine,column:fe.startColumn,length:fe.image.length,message:ne})}else{z.pop();let ne=sa(z);I=this.patternIdxToConfig[ne],O=this.charCodeToPatternIdxToConfig[ne],F=I.length;let H=this.canModeBeOptimized[ne]&&this.config.safeMode===!1;O&&H?U=W:U=$}},"pop_mode");function te(fe){z.push(fe),O=this.charCodeToPatternIdxToConfig[fe],I=this.patternIdxToConfig[fe],F=I.length,F=I.length;let ne=this.canModeBeOptimized[fe]&&this.config.safeMode===!1;O&&ne?U=W:U=$}s(te,"push_mode"),te.call(this,r);let ce,Z=this.config.recoveryEnabled;for(;w<A;){u=null;let fe=k.charCodeAt(w),ne=U(fe),H=ne.length;for(n=0;n<H;n++){ce=ne[n];let Q=ce.pattern;h=null;let K=ce.short;if(K!==!1?fe===K&&(u=Q):ce.isCustom===!0?(b=Q.exec(k,w,E,L),b!==null?(u=b[0],b.payload!==void 0&&(h=b.payload)):u=null):(this.updateLastIndex(Q,w),u=this.match(Q,e,w)),u!==null){if(l=ce.longerAlt,l!==void 0){let re=l.length;for(a=0;a<re;a++){let ie=I[l[a]],ye=ie.pattern;if(f=null,ie.isCustom===!0?(b=ye.exec(k,w,E,L),b!==null?(o=b[0],b.payload!==void 0&&(f=b.payload)):o=null):(this.updateLastIndex(ye,w),o=this.match(ye,e,w)),o&&o.length>u.length){u=o,h=f,ce=ie;break}}}break}}if(u!==null){if(d=u.length,p=ce.group,p!==void 0&&(m=ce.tokenTypeIdx,g=this.createTokenInstance(u,w,m,ce.tokenType,R,D,d),this.handlePayload(g,h),p===!1?T=this.addToken(E,T,g):L[p].push(g)),e=this.chopInput(e,d),w=w+d,D=this.computeNewColumn(D,d),P===!0&&ce.canLineTerminator===!0){let Q=0,K,re;M.lastIndex=0;do K=M.test(u),K===!0&&(re=M.lastIndex-1,Q++);while(K===!0);Q!==0&&(R=R+Q,D=d-re,this.updateTokenEndLineColumnLocation(g,p,re,Q,R,D,d))}this.handleModes(ce,ee,te,g)}else{let Q=w,K=R,re=D,ie=Z===!1;for(;ie===!1&&w<A;)for(e=this.chopInput(e,1),w++,i=0;i<F;i++){let ye=I[i],j=ye.pattern,De=ye.short;if(De!==!1?k.charCodeAt(w)===De&&(ie=!0):ye.isCustom===!0?ie=j.exec(k,w,E,L)!==null:(this.updateLastIndex(j,w),ie=j.exec(e)!==null),ie===!0)break}if(y=w-Q,D=this.computeNewColumn(D,y),x=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(k,Q,y,K,re),S.push({offset:Q,line:K,column:re,length:y,message:x}),Z===!1)break}}return this.hasCustom||(E.length=T),{tokens:E,groups:L,errors:S}}handleModes(e,r,n,i){if(e.pop===!0){let a=e.push;r(i),a!==void 0&&n.call(this,a)}else e.push!==void 0&&n.call(this,e.push)}chopInput(e,r){return e.substring(r)}updateLastIndex(e,r){e.lastIndex=r}updateTokenEndLineColumnLocation(e,r,n,i,a,o,l){let u,h;r!==void 0&&(u=n===l-1,h=u?-1:0,i===1&&u===!0||(e.endLine=a+h,e.endColumn=o-1+-h))}computeNewColumn(e,r){return e+r}createOffsetOnlyToken(e,r,n,i){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(e,r,n,i,a,o){return{image:e,startOffset:r,startLine:a,startColumn:o,tokenTypeIdx:n,tokenType:i}}createFullToken(e,r,n,i,a,o,l){return{image:e,startOffset:r,endOffset:r+l-1,startLine:a,endLine:a,startColumn:o,endColumn:o+l-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(e,r,n){return e.push(n),r}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r)}matchWithTest(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null}matchWithExec(e,r){let n=e.exec(r);return n!==null?n[0]:null}};jn.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";jn.NA=/NOT_APPLICABLE/});function Du(t){return SR(t)?t.LABEL:t.name}function SR(t){return si(t.LABEL)&&t.LABEL!==""}function f6(t){return nMe(t)}function nMe(t){let e=t.pattern,r={};if(r.name=t.name,jt(e)||(r.PATTERN=e),Ve(t,rMe))throw`The parent property is no longer supported.
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Ve(t,sne)&&(r.CATEGORIES=t[sne]),Lu([r]),Ve(t,one)&&(r.LABEL=t[one]),Ve(t,lne)&&(r.GROUP=t[lne]),Ve(t,une)&&(r.POP_MODE=t[une]),Ve(t,cne)&&(r.PUSH_MODE=t[cne]),Ve(t,hne)&&(r.LONGER_ALT=t[hne]),Ve(t,fne)&&(r.LINE_BREAKS=t[fne]),Ve(t,dne)&&(r.START_CHARS_HINT=t[dne]),r}function jd(t,e,r,n,i,a,o,l){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:o,endColumn:l,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function Vv(t,e){return Au(t,e)}var rMe,sne,one,lne,cne,une,hne,fne,dne,io,Kd=_(()=>{"use strict";Tt();$v();Xd();s(Du,"tokenLabel");s(SR,"hasTokenLabel");rMe="parent",sne="categories",one="label",lne="group",cne="push_mode",une="pop_mode",hne="longer_alt",fne="line_breaks",dne="start_chars_hint";s(f6,"createToken");s(nMe,"createTokenInternal");io=f6({name:"EOF",pattern:jn.NA});Lu([io]);s(jd,"createTokenInstance");s(Vv,"tokenMatcher")});var Ru,pne,bl,Bm=_(()=>{"use strict";Kd();Tt();ja();Ru={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${SR(t)?`--> ${Du(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: ",l=`
but found: '`+Yi(e).image+"'";if(n)return a+n+l;{let u=Or(t,(p,m)=>p.concat(m),[]),h=Ge(u,p=>`[${Ge(p,m=>Du(m)).join(", ")}]`),d=`one of these possible Token sequences:
${Ge(h,(p,m)=>` ${m+1}. ${p}`).join(`
`)}`;return a+d+l}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){let i="Expecting: ",o=`
but found: '`+Yi(e).image+"'";if(r)return i+r+o;{let u=`expecting at least one iteration which starts with one of these possible Token sequences::
<${Ge(t,h=>`[${Ge(h,f=>Du(f)).join(",")}]`).join(" ,")}>`;return i+u+o}}};Object.freeze(Ru);pne={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
inside top level rule: ->`+t.name+"<-"}},bl={buildDuplicateFoundError(t,e){function r(f){return f instanceof sr?f.terminalType.name:f instanceof Yr?f.nonTerminalName:""}s(r,"getExtraProductionArgument");let n=t.name,i=Yi(e),a=i.idx,o=Cs(i),l=r(i),u=a>0,h=`->${o}${u?a:""}<- ${l?`with argument: ->${l}<-`:""}
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 h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,`
`),h},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=Ge(t.prefixPath,i=>Du(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
in <OR${r}> inside <${t.topLevelRule.name}> Rule,
<${e}> may appears as a prefix path in all these alternatives.
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
For Further details.`},buildAlternationAmbiguityError(t){let e=Ge(t.prefixPath,i=>Du(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${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},buildEmptyRepetitionError(t){let e=Cs(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 <OR${t.alternation.idx}> 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:
<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=Ge(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 Ya?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function mne(t,e){let r=new _R(t,e);return r.resolveRefs(),r.errors}var _R,gne=_(()=>{"use strict";Ss();Tt();ja();s(mne,"resolveGrammar");_R=class extends Xa{static{s(this,"GastRefResolverVisitor")}constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){be(nr(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:Li.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}});function g6(t,e,r=[]){r=Hr(r);let n=[],i=0;function a(l){return l.concat(ai(t,i+1))}s(a,"remainingPathWith");function o(l){let u=g6(a(l),e,r);return n.concat(u)}for(s(o,"getAlternativesForProd");r.length<e&&i<t.length;){let l=t[i];if(l instanceof vn)return o(l.definition);if(l instanceof Yr)return o(l.definition);if(l instanceof Xr)n=o(l.definition);else if(l instanceof xn){let u=l.definition.concat([new mr({definition:l.definition})]);return o(u)}else if(l instanceof bn){let u=[new vn({definition:l.definition}),new mr({definition:[new sr({terminalType:l.separator})].concat(l.definition)})];return o(u)}else if(l instanceof ln){let u=l.definition.concat([new mr({definition:[new sr({terminalType:l.separator})].concat(l.definition)})]);n=o(u)}else if(l instanceof mr){let u=l.definition.concat([new mr({definition:l.definition})]);n=o(u)}else{if(l instanceof cn)return be(l.definition,u=>{Vt(u.definition)===!1&&(n=o(u.definition))}),n;if(l instanceof sr)r.push(l.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:ai(t,i)}),n}function y6(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],o="EXIT_ALTERNATIVE",l=!1,u=e.length,h=u-n-1,f=[],d=[];for(d.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Vt(d);){let p=d.pop();if(p===o){l&&sa(d).idx<=h&&d.pop();continue}let m=p.def,g=p.idx,y=p.ruleStack,v=p.occurrenceStack;if(Vt(m))continue;let x=m[0];if(x===i){let b={idx:g,def:ai(m),ruleStack:wu(y),occurrenceStack:wu(v)};d.push(b)}else if(x instanceof sr)if(g<u-1){let b=g+1,k=e[b];if(r(k,x.terminalType)){let A={idx:b,def:ai(m),ruleStack:y,occurrenceStack:v};d.push(A)}}else if(g===u-1)f.push({nextTokenType:x.terminalType,nextTokenOccurrence:x.idx,ruleStack:y,occurrenceStack:v}),l=!0;else throw Error("non exhaustive match");else if(x instanceof Yr){let b=Hr(y);b.push(x.nonTerminalName);let k=Hr(v);k.push(x.idx);let A={idx:g,def:x.definition.concat(a,ai(m)),ruleStack:b,occurrenceStack:k};d.push(A)}else if(x instanceof Xr){let b={idx:g,def:ai(m),ruleStack:y,occurrenceStack:v};d.push(b),d.push(o);let k={idx:g,def:x.definition.concat(ai(m)),ruleStack:y,occurrenceStack:v};d.push(k)}else if(x instanceof xn){let b=new mr({definition:x.definition,idx:x.idx}),k=x.definition.concat([b],ai(m)),A={idx:g,def:k,ruleStack:y,occurrenceStack:v};d.push(A)}else if(x instanceof bn){let b=new sr({terminalType:x.separator}),k=new mr({definition:[b].concat(x.definition),idx:x.idx}),A=x.definition.concat([k],ai(m)),w={idx:g,def:A,ruleStack:y,occurrenceStack:v};d.push(w)}else if(x instanceof ln){let b={idx:g,def:ai(m),ruleStack:y,occurrenceStack:v};d.push(b),d.push(o);let k=new sr({terminalType:x.separator}),A=new mr({definition:[k].concat(x.definition),idx:x.idx}),w=x.definition.concat([A],ai(m)),T={idx:g,def:w,ruleStack:y,occurrenceStack:v};d.push(T)}else if(x instanceof mr){let b={idx:g,def:ai(m),ruleStack:y,occurrenceStack:v};d.push(b),d.push(o);let k=new mr({definition:x.definition,idx:x.idx}),A=x.definition.concat([k],ai(m)),w={idx:g,def:A,ruleStack:y,occurrenceStack:v};d.push(w)}else if(x instanceof cn)for(let b=x.definition.length-1;b>=0;b--){let k=x.definition[b],A={idx:g,def:k.definition.concat(ai(m)),ruleStack:y,occurrenceStack:v};d.push(A),d.push(o)}else if(x instanceof vn)d.push({idx:g,def:x.definition.concat(ai(m)),ruleStack:y,occurrenceStack:v});else if(x instanceof Ya)d.push(iMe(x,g,y,v));else throw Error("non exhaustive match")}return f}function iMe(t,e,r,n){let i=Hr(r);i.push(t.name);let a=Hr(n);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}var AR,d6,Fm,p6,Uv,m6,qv,Wv=_(()=>{"use strict";Tt();pR();i6();ja();AR=class extends _u{static{s(this,"AbstractNextPossibleTokensWalker")}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=Hr(this.path.ruleStack).reverse(),this.occurrenceStack=Hr(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(){Vt(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},d6=class extends AR{static{s(this,"NextAfterTokenWalker")}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 vn({definition:i});this.possibleTokTypes=Hd(a),this.found=!0}}},Fm=class extends _u{static{s(this,"AbstractNextTerminalAfterProductionWalker")}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}},p6=class extends Fm{static{s(this,"NextTerminalAfterManyWalker")}walkMany(e,r,n){if(e.idx===this.occurrence){let i=Yi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof sr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},Uv=class extends Fm{static{s(this,"NextTerminalAfterManySepWalker")}walkManySep(e,r,n){if(e.idx===this.occurrence){let i=Yi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof sr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},m6=class extends Fm{static{s(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=Yi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof sr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},qv=class extends Fm{static{s(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=Yi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof sr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}};s(g6,"possiblePathsFrom");s(y6,"nextPossibleTokensAfter");s(iMe,"expandTopLevelRule")});function Hv(t){if(t instanceof Xr||t==="Option")return Nn.OPTION;if(t instanceof mr||t==="Repetition")return Nn.REPETITION;if(t instanceof xn||t==="RepetitionMandatory")return Nn.REPETITION_MANDATORY;if(t instanceof bn||t==="RepetitionMandatoryWithSeparator")return Nn.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof ln||t==="RepetitionWithSeparator")return Nn.REPETITION_WITH_SEPARATOR;if(t instanceof cn||t==="Alternation")return Nn.ALTERNATION;throw Error("non exhaustive match")}function x6(t){let{occurrence:e,rule:r,prodType:n,maxLookahead:i}=t,a=Hv(n);return a===Nn.ALTERNATION?zm(e,r,i):$m(e,r,a,i)}function vne(t,e,r,n,i,a){let o=zm(t,e,r),l=Ene(o)?Pm:Au;return a(o,n,l,i)}function xne(t,e,r,n,i,a){let o=$m(t,e,i,r),l=Ene(o)?Pm:Au;return a(o[0],l,n)}function bne(t,e,r,n){let i=t.length,a=Ca(t,o=>Ca(o,l=>l.length===1));if(e)return function(o){let l=Ge(o,u=>u.GATE);for(let u=0;u<i;u++){let h=t[u],f=h.length,d=l[u];if(!(d!==void 0&&d.call(this)===!1))e:for(let p=0;p<f;p++){let m=h[p],g=m.length;for(let y=0;y<g;y++){let v=this.LA(y+1);if(r(v,m[y])===!1)continue e}return u}}};if(a&&!n){let o=Ge(t,u=>Ir(u)),l=Or(o,(u,h,f)=>(be(h,d=>{Ve(u,d.tokenTypeIdx)||(u[d.tokenTypeIdx]=f),be(d.categoryMatches,p=>{Ve(u,p)||(u[p]=f)})}),u),{});return function(){let u=this.LA(1);return l[u.tokenTypeIdx]}}else return function(){for(let o=0;o<i;o++){let l=t[o],u=l.length;e:for(let h=0;h<u;h++){let f=l[h],d=f.length;for(let p=0;p<d;p++){let m=this.LA(p+1);if(r(m,f[p])===!1)continue e}return o}}}}function kne(t,e,r){let n=Ca(t,a=>a.length===1),i=t.length;if(n&&!r){let a=Ir(t);if(a.length===1&&Vt(a[0].categoryMatches)){let l=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}else{let o=Or(a,(l,u,h)=>(l[u.tokenTypeIdx]=!0,be(u.categoryMatches,f=>{l[f]=!0}),l),[]);return function(){let l=this.LA(1);return o[l.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;a<i;a++){let o=t[a],l=o.length;for(let u=0;u<l;u++){let h=this.LA(u+1);if(e(h,o[u])===!1)continue e}return!0}return!1}}function yne(t){let e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}function LR(t){let e=[""];for(let r=0;r<t.length;r++){let n=t[r],i=[];for(let a=0;a<e.length;a++){let o=e[a];i.push(o+"_"+n.tokenTypeIdx);for(let l=0;l<n.categoryMatches.length;l++){let u="_"+n.categoryMatches[l];i.push(o+u)}}e=i}return e}function aMe(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;let i=t[n];for(let a=0;a<e.length;a++){let o=e[a];if(i[o]===!0)return!1}}return!0}function wne(t,e){let r=Ge(t,o=>g6([o],1)),n=yne(r.length),i=Ge(r,o=>{let l={};return be(o,u=>{let h=LR(u.partialPath);be(h,f=>{l[f]=!0})}),l}),a=r;for(let o=1;o<=e;o++){let l=a;a=yne(l.length);for(let u=0;u<l.length;u++){let h=l[u];for(let f=0;f<h.length;f++){let d=h[f].partialPath,p=h[f].suffixDef,m=LR(d);if(aMe(i,m,u)||Vt(p)||d.length===e){let y=n[u];if(b6(y,d)===!1){y.push(d);for(let v=0;v<m.length;v++){let x=m[v];i[u][x]=!0}}}else{let y=g6(p,o+1,d);a[u]=a[u].concat(y),be(y,v=>{let x=LR(v.partialPath);be(x,b=>{i[u][b]=!0})})}}}}return n}function zm(t,e,r,n){let i=new v6(t,Nn.ALTERNATION,n);return e.accept(i),wne(i.result,r)}function $m(t,e,r,n){let i=new v6(t,r);e.accept(i);let a=i.result,l=new DR(e,t,r).startWalking(),u=new vn({definition:a}),h=new vn({definition:l});return wne([u,h],n)}function b6(t,e){e:for(let r=0;r<t.length;r++){let n=t[r];if(n.length===e.length){for(let i=0;i<n.length;i++){let a=e[i],o=n[i];if((a===o||o.categoryMatchesMap[a.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function Tne(t,e){return t.length<e.length&&Ca(t,(r,n)=>{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function Ene(t){return Ca(t,e=>Ca(e,r=>Ca(r,n=>Vt(n.categoryMatches))))}var Nn,DR,v6,Gm=_(()=>{"use strict";Tt();Wv();i6();Xd();ja();(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"})(Nn||(Nn={}));s(Hv,"getProdType");s(x6,"getLookaheadPaths");s(vne,"buildLookaheadFuncForOr");s(xne,"buildLookaheadFuncForOptionalProd");s(bne,"buildAlternativesLookAheadFunc");s(kne,"buildSingleAlternativeLookaheadFunction");DR=class extends _u{static{s(this,"RestDefinitionFinderWalker")}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,Nn.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,Nn.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,Nn.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,Nn.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,Nn.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},v6=class extends Xa{static{s(this,"InsideDefinitionFinderVisitor")}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,Nn.OPTION)}visitRepetition(e){this.checkIsTarget(e,Nn.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Nn.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Nn.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Nn.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Nn.ALTERNATION)}};s(yne,"initializeArrayOfArrays");s(LR,"pathToHashKeys");s(aMe,"isUniquePrefixHash");s(wne,"lookAheadSequenceFromAlternatives");s(zm,"getLookaheadPathsForOr");s($m,"getLookaheadPathsForOptionalProd");s(b6,"containsPath");s(Tne,"isStrictPrefixOfPath");s(Ene,"areTokenCategoriesNotUsed")});function Cne(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return Ge(e,r=>Object.assign({type:Li.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Sne(t,e,r,n){let i=oa(t,u=>sMe(u,r)),a=fMe(t,e,r),o=oa(t,u=>cMe(u,r)),l=oa(t,u=>lMe(u,t,n,r));return i.concat(a,o,l)}function sMe(t,e){let r=new RR;t.accept(r);let n=r.allProductions,i=q9(n,oMe),a=Ts(i,l=>l.length>1);return Ge(nr(a),l=>{let u=Yi(l),h=e.buildDuplicateFoundError(t,l),f=Cs(u),d={message:h,type:Li.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:f,occurrence:u.idx},p=_ne(u);return p&&(d.parameter=p),d})}function oMe(t){return`${Cs(t)}_#_${t.idx}_#_${_ne(t)}`}function _ne(t){return t instanceof sr?t.terminalType.name:t instanceof Yr?t.nonTerminalName:""}function lMe(t,e,r,n){let i=[];if(Or(e,(o,l)=>l.name===t.name?o+1:o,0)>1){let o=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:o,type:Li.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function Ane(t,e,r){let n=[],i;return Rn(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:Li.INVALID_RULE_OVERRIDE,ruleName:t})),n}function IR(t,e,r,n=[]){let i=[],a=k6(e.definition);if(Vt(a))return[];{let o=t.name;Rn(a,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:Li.LEFT_RECURSION,ruleName:o});let u=Uh(a,n.concat([t])),h=oa(u,f=>{let d=Hr(n);return d.push(f),IR(t,f,r,d)});return i.concat(h)}}function k6(t){let e=[];if(Vt(t))return e;let r=Yi(t);if(r instanceof Yr)e.push(r.referencedRule);else if(r instanceof vn||r instanceof Xr||r instanceof xn||r instanceof bn||r instanceof ln||r instanceof mr)e=e.concat(k6(r.definition));else if(r instanceof cn)e=Ir(Ge(r.definition,a=>k6(a.definition)));else if(!(r instanceof sr))throw Error("non exhaustive match");let n=Wd(r),i=t.length>1;if(n&&i){let a=ai(t);return e.concat(k6(a))}else return e}function Lne(t,e){let r=new Yv;t.accept(r);let n=r.alternations;return oa(n,a=>{let o=wu(a.definition);return oa(o,(l,u)=>{let h=y6([l],[],Au,1);return Vt(h)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:a,emptyChoiceIdx:u}),type:Li.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:a.idx,alternative:u+1}]:[]})})}function Dne(t,e,r){let n=new Yv;t.accept(n);let i=n.alternations;return i=qh(i,o=>o.ignoreAmbiguities===!0),oa(i,o=>{let l=o.idx,u=o.maxLookahead||e,h=zm(l,t,u,o),f=uMe(h,o,t,r),d=hMe(h,o,t,r);return f.concat(d)})}function cMe(t,e){let r=new Yv;t.accept(r);let n=r.alternations;return oa(n,a=>a.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:a}),type:Li.TOO_MANY_ALTS,ruleName:t.name,occurrence:a.idx}]:[])}function Rne(t,e,r){let n=[];return be(t,i=>{let a=new MR;i.accept(a);let o=a.allProductions;be(o,l=>{let u=Hv(l),h=l.maxLookahead||e,f=l.idx,p=$m(f,i,u,h)[0];if(Vt(Ir(p))){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:l});n.push({message:m,type:Li.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function uMe(t,e,r,n){let i=[],a=Or(t,(l,u,h)=>(e.definition[h].ignoreAmbiguities===!0||be(u,f=>{let d=[h];be(t,(p,m)=>{h!==m&&b6(p,f)&&e.definition[m].ignoreAmbiguities!==!0&&d.push(m)}),d.length>1&&!b6(i,f)&&(i.push(f),l.push({alts:d,path:f}))}),l),[]);return Ge(a,l=>{let u=Ge(l.alts,f=>f+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:u,prefixPath:l.path}),type:Li.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:l.alts}})}function hMe(t,e,r,n){let i=Or(t,(o,l,u)=>{let h=Ge(l,f=>({idx:u,path:f}));return o.concat(h)},[]);return uc(oa(i,o=>{if(e.definition[o.idx].ignoreAmbiguities===!0)return[];let u=o.idx,h=o.path,f=Nr(i,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&Tne(p.path,h));return Ge(f,p=>{let m=[p.idx+1,u+1],g=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:m,prefixPath:p.path}),type:Li.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m}})}))}function fMe(t,e,r){let n=[],i=Ge(e,a=>a.name);return be(t,a=>{let o=a.name;if(Rn(i,o)){let l=r.buildNamespaceConflictError(a);n.push({message:l,type:Li.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}var RR,Yv,MR,Xv=_(()=>{"use strict";Tt();Ss();ja();Gm();Wv();Xd();s(Cne,"validateLookahead");s(Sne,"validateGrammar");s(sMe,"validateDuplicateProductions");s(oMe,"identifyProductionForDuplicates");s(_ne,"getExtraProductionArgument");RR=class extends Xa{static{s(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};s(lMe,"validateRuleDoesNotAlreadyExist");s(Ane,"validateRuleIsOverridden");s(IR,"validateNoLeftRecursion");s(k6,"getFirstNoneTerminal");Yv=class extends Xa{static{s(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};s(Lne,"validateEmptyOrAlternative");s(Dne,"validateAmbiguousAlternationAlternatives");MR=class extends Xa{static{s(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};s(cMe,"validateTooManyAlts");s(Rne,"validateSomeNonEmptyLookaheadPath");s(uMe,"checkAlternativesAmbiguities");s(hMe,"checkPrefixAlternativesAmbiguities");s(fMe,"checkTerminalAndNoneTerminalsNameSpace")});function Mne(t){let e=Vh(t,{errMsgProvider:pne}),r={};return be(t.rules,n=>{r[n.name]=n}),mne(r,e.errMsgProvider)}function Ine(t){return t=Vh(t,{errMsgProvider:bl}),Sne(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var Nne=_(()=>{"use strict";Tt();gne();Xv();Bm();s(Mne,"resolveGrammar");s(Ine,"validateGrammar")});function Qh(t){return Rn(zne,t.name)}var One,Pne,Bne,Fne,zne,Vm,Qd,jv,Kv,Qv,Um=_(()=>{"use strict";Tt();One="MismatchedTokenException",Pne="NoViableAltException",Bne="EarlyExitException",Fne="NotAllInputParsedException",zne=[One,Pne,Bne,Fne];Object.freeze(zne);s(Qh,"isRecognitionException");Vm=class extends Error{static{s(this,"RecognitionException")}constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Qd=class extends Vm{static{s(this,"MismatchedTokenException")}constructor(e,r,n){super(e,r),this.previousToken=n,this.name=One}},jv=class extends Vm{static{s(this,"NoViableAltException")}constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Pne}},Kv=class extends Vm{static{s(this,"NotAllInputParsedException")}constructor(e,r){super(e,r),this.name=Fne}},Qv=class extends Vm{static{s(this,"EarlyExitException")}constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Bne}}});function dMe(t,e,r,n,i,a,o){let l=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[l];if(u===void 0){let p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];u=new a(m,i).startWalking(),this.firstAfterRepMap[l]=u}let h=u.token,f=u.occurrence,d=u.isEndOfRule;this.RULE_STACK.length===1&&d&&h===void 0&&(h=io,f=1),!(h===void 0||f===void 0)&&this.shouldInRepetitionRecoveryBeTried(h,f,o)&&this.tryInRepetitionRecovery(t,e,r,h)}var NR,PR,OR,w6,BR=_(()=>{"use strict";Kd();Tt();Um();mR();Ss();NR={},PR="InRuleRecoveryException",OR=class extends Error{static{s(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=PR}},w6=class{static{s(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Ve(e,"recoveryEnabled")?e.recoveryEnabled:Ka.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=dMe)}getTokenToInsert(e){let r=jd(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(),o=this.exportLexerState(),l=[],u=!1,h=this.LA(1),f=this.LA(1),d=s(()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:h,previous:p,ruleName:this.getCurrRuleFullName()}),g=new Qd(m,h,this.LA(0));g.resyncedTokens=wu(l),this.SAVE_ERROR(g)},"generateErrorMessage");for(;!u;)if(this.tokenMatcher(f,i)){d();return}else if(n.call(this)){d(),e.apply(this,r);return}else this.tokenMatcher(f,a)?u=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,l));this.importLexerState(o)}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 OR("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Vt(r))return!1;let n=this.LA(1);return qa(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 Rn(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=qa(e,a=>Vv(r,a));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return NR;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 Ge(e,(n,i)=>i===0?NR:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=Ge(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return Ir(e)}getFollowSetFromFollowKey(e){if(e===NR)return[io];let r=e.ruleName+e.idxInCallingRule+a6+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,io)||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 wu(r)}attemptInRepetitionRecovery(e,r,n,i,a,o,l){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=Hr(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return Ge(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};s(dMe,"attemptInRepetitionRecovery")});function T6(t,e,r){return r|e|t}var E6=_(()=>{"use strict";s(T6,"getKeyForAutomaticLookahead")});var Mu,FR=_(()=>{"use strict";Tt();Bm();Ss();Xv();Gm();Mu=class{static{s(this,"LLkLookaheadStrategy")}constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:Ka.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(Vt(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 oa(e,r=>IR(r,r,bl))}validateEmptyOrAlternatives(e){return oa(e,r=>Lne(r,bl))}validateAmbiguousAlternationAlternatives(e,r){return oa(e,n=>Dne(n,r,bl))}validateSomeNonEmptyLookaheadPath(e,r){return Rne(e,r,bl)}buildLookaheadForAlternation(e){return vne(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,bne)}buildLookaheadForOptional(e){return xne(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Hv(e.prodType),kne)}}});function pMe(t){C6.reset(),t.accept(C6);let e=C6.dslMethods;return C6.reset(),e}var S6,zR,C6,$ne=_(()=>{"use strict";Tt();Ss();E6();ja();FR();S6=class{static{s(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=Ve(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ka.dynamicTokensEnabled,this.maxLookahead=Ve(e,"maxLookahead")?e.maxLookahead:Ka.maxLookahead,this.lookaheadStrategy=Ve(e,"lookaheadStrategy")?e.lookaheadStrategy:new Mu({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){be(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:a,repetitionMandatory:o,repetitionMandatoryWithSeparator:l,repetitionWithSeparator:u}=pMe(r);be(n,h=>{let f=h.idx===0?"":h.idx;this.TRACE_INIT(`${Cs(h)}${f}`,()=>{let d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:h.idx,rule:r,maxLookahead:h.maxLookahead||this.maxLookahead,hasPredicates:h.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=T6(this.fullRuleNameToShort[r.name],256,h.idx);this.setLaFuncCache(p,d)})}),be(i,h=>{this.computeLookaheadFunc(r,h.idx,768,"Repetition",h.maxLookahead,Cs(h))}),be(a,h=>{this.computeLookaheadFunc(r,h.idx,512,"Option",h.maxLookahead,Cs(h))}),be(o,h=>{this.computeLookaheadFunc(r,h.idx,1024,"RepetitionMandatory",h.maxLookahead,Cs(h))}),be(l,h=>{this.computeLookaheadFunc(r,h.idx,1536,"RepetitionMandatoryWithSeparator",h.maxLookahead,Cs(h))}),be(u,h=>{this.computeLookaheadFunc(r,h.idx,1280,"RepetitionWithSeparator",h.maxLookahead,Cs(h))})})})}computeLookaheadFunc(e,r,n,i,a,o){this.TRACE_INIT(`${o}${r===0?"":r}`,()=>{let l=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=T6(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(u,l)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return T6(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},zR=class extends Xa{static{s(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},C6=new zR;s(pMe,"collectMethods")});function VR(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function UR(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function Gne(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e)}function Vne(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r)}var Une=_(()=>{"use strict";s(VR,"setNodeLocationOnlyOffset");s(UR,"setNodeLocationFull");s(Gne,"addTerminalToCst");s(Vne,"addNoneTerminalToCst")});function qR(t,e){Object.defineProperty(t,mMe,{enumerable:!1,configurable:!0,writable:!1,value:e})}var mMe,qne=_(()=>{"use strict";mMe="name";s(qR,"defineNameProp")});function gMe(t,e){let r=kr(t),n=r.length;for(let i=0;i<n;i++){let a=r[i],o=t[a],l=o.length;for(let u=0;u<l;u++){let h=o[u];h.tokenTypeIdx===void 0&&this[h.name](h.children,e)}}}function Wne(t,e){let r=s(function(){},"derivedConstructor");qR(r,t+"BaseSemantics");let n={visit:s(function(i,a){if(ct(i)&&(i=i[0]),!jt(i))return this[i.name](i.children,a)},"visit"),validateVisitor:s(function(){let i=yMe(this,e);if(!Vt(i)){let a=Ge(i,o=>o.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
${a.join(`
`).replace(/\n/g,`
`)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function Hne(t,e,r){let n=s(function(){},"derivedConstructor");qR(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return be(e,a=>{i[a]=gMe}),n.prototype=i,n.prototype.constructor=n,n}function yMe(t,e){return vMe(t,e)}function vMe(t,e){let r=Nr(e,i=>fi(t[i])===!1),n=Ge(r,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:WR.MISSING_METHOD,methodName:i}));return uc(n)}var WR,Yne=_(()=>{"use strict";Tt();qne();s(gMe,"defaultVisit");s(Wne,"createBaseSemanticVisitorConstructor");s(Hne,"createBaseVisitorConstructorWithDefaults");(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(WR||(WR={}));s(yMe,"validateVisitor");s(vMe,"validateMissingCstMethods")});var D6,Xne=_(()=>{"use strict";Une();Tt();Yne();Ss();D6=class{static{s(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Ve(e,"nodeLocationTracking")?e.nodeLocationTracking:Ka.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=zn,this.cstFinallyStateUpdate=zn,this.cstPostTerminal=zn,this.cstPostNonTerminal=zn,this.cstPostRule=zn;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=UR,this.setNodeLocationFromNode=UR,this.cstPostRule=zn,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=zn,this.setNodeLocationFromNode=zn,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=VR,this.setNodeLocationFromNode=VR,this.cstPostRule=zn,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=zn,this.setNodeLocationFromNode=zn,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=zn,this.setNodeLocationFromNode=zn,this.cstPostRule=zn,this.setInitialNodeLocation=zn;else throw Error(`Invalid <nodeLocationTracking> 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];Gne(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];Vne(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(jt(this.baseCstVisitorConstructor)){let e=Wne(this.className,kr(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(jt(this.baseCstVisitorWithDefaultsConstructor)){let e=Hne(this.className,kr(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 R6,jne=_(()=>{"use strict";Ss();R6=class{static{s(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):qm}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?qm: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 M6,Kne=_(()=>{"use strict";Tt();Um();Ss();Bm();Xv();ja();M6=class{static{s(this,"RecognizerApi")}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=Wm){if(Rn(this.definedRulesNames,e)){let o={message:bl.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Li.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(o)}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i}OVERRIDE_RULE(e,r,n=Wm){let i=Ane(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(Qh(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return r6(nr(this.gastProductionsCache))}}});var I6,Qne=_(()=>{"use strict";Tt();E6();Um();Gm();Wv();Ss();BR();Kd();Xd();I6=class{static{s(this,"RecognizerEngine")}initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Pm,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Ve(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
For Further details.`);if(ct(e)){if(Vt(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(ct(e))this.tokensMap=Or(e,(a,o)=>(a[o.name]=o,a),{});else if(Ve(e,"modes")&&Ca(Ir(nr(e.modes)),ane)){let a=Ir(nr(e.modes)),o=bm(a);this.tokensMap=Or(o,(l,u)=>(l[u.name]=u,l),{})}else if(on(e))this.tokensMap=Hr(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=io;let n=Ve(e,"modes")?Ir(nr(e.modes)):nr(e),i=Ca(n,a=>Vt(a.categoryMatches));this.tokenMatcher=i?Pm:Au,Lu(nr(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=Ve(n,"resyncEnabled")?n.resyncEnabled:Wm.resyncEnabled,a=Ve(n,"recoveryValueFunc")?n.recoveryValueFunc:Wm.recoveryValueFunc,o=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=e,this.fullRuleNameToShort[e]=o;let l;return this.outputCst===!0?l=s(function(...f){try{this.ruleInvocationStateUpdate(o,e,this.subruleIdx),r.apply(this,f);let d=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(d),d}catch(d){return this.invokeRuleCatch(d,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):l=s(function(...f){try{return this.ruleInvocationStateUpdate(o,e,this.subruleIdx),r.apply(this,f)}catch(d){return this.invokeRuleCatch(d,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(l,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){let i=this.RULE_STACK.length===1,a=r&&!this.isBackTracking()&&this.recoveryEnabled;if(Qh(e)){let o=e;if(a){let l=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(l))if(o.resyncedTokens=this.reSyncTo(l),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(e);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,o.partialCstResult=u}throw o}}else{if(i)return this.moveToTerminatedState(),n(e);throw o}}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 o=e.GATE;if(o!==void 0){let l=i;i=s(()=>o.call(this)&&l.call(this),"lookAheadFunc")}}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 o=r.GATE;if(o!==void 0){let l=i;i=s(()=>o.call(this)&&l.call(this),"lookAheadFunc")}}else a=r;if(i.call(this)===!0){let o=this.doSingleRepetition(a);for(;i.call(this)===!0&&o===!0;)o=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(e,Nn.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,m6)}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 l=s(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,l,i,qv],l,1536,e,qv)}else throw this.raiseEarlyExitException(e,Nn.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 l=r.GATE;if(l!==void 0){let u=i;i=s(()=>l.call(this)&&u.call(this),"lookaheadFunction")}}else a=r;let o=!0;for(;i.call(this)===!0&&o===!0;)o=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,p6,o)}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 l=s(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,l,i,Uv],l,1280,e,Uv)}}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=ct(e)?e:e.DEF,o=this.getLaFuncFromCache(n).call(this,i);if(o!==void 0)return i[o].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 Kv(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 Qh(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 Qd(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===PR?n:a}}else throw n}saveRecogState(){let e=this.errors,r=Hr(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),io)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}});var N6,Zne=_(()=>{"use strict";Um();Tt();Gm();Ss();N6=class{static{s(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=Ve(e,"errorMessageProvider")?e.errorMessageProvider:Ka.errorMessageProvider}SAVE_ERROR(e){if(Qh(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Hr(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Hr(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],l=$m(e,a,r,this.maxLookahead)[0],u=[];for(let f=1;f<=this.maxLookahead;f++)u.push(this.LA(f));let h=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:l,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new Qv(h,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],a=zm(e,i,this.maxLookahead),o=[];for(let h=1;h<=this.maxLookahead;h++)o.push(this.LA(h));let l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:o,previous:l,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new jv(u,this.LA(1),l))}}});var O6,Jne=_(()=>{"use strict";Wv();Tt();O6=class{static{s(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(jt(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return y6([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let r=Yi(e.ruleStack),i=this.getGAstProductions()[r];return new d6(i,e).startWalking()}}});function Jv(t,e,r,n=!1){B6(r);let i=sa(this.recordingProdStack),a=fi(e)?e:e.DEF,o=new t({definition:[],idx:r});return n&&(o.separator=e.SEP),Ve(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),F6}function kMe(t,e){B6(e);let r=sa(this.recordingProdStack),n=ct(t)===!1,i=n===!1?t:t.DEF,a=new cn({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});Ve(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);let o=pv(i,l=>fi(l.GATE));return a.hasPredicates=o,r.definition.push(a),be(i,l=>{let u=new vn({definition:[]});a.definition.push(u),Ve(l,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:Ve(l,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),l.ALT.call(this),this.recordingProdStack.pop()}),F6}function rie(t){return t===0?"":`${t}`}function B6(t){if(t<0||t>tie){let e=new Error(`Invalid DSL Method idx value: <${t}>
Idx value must be a none negative value smaller than ${tie+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var F6,eie,tie,nie,iie,bMe,P6,aie=_(()=>{"use strict";Tt();ja();$v();Xd();Kd();Ss();E6();F6={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(F6);eie=!0,tie=Math.pow(2,8)-1,nie=f6({name:"RECORDING_PHASE_TOKEN",pattern:jn.NA});Lu([nie]);iie=jd(nie,`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(iie);bMe={name:`This CSTNode indicates the Parser is in Recording Phase
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},P6=class{static{s(this,"GastRecorder")}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 qm}topLevelRuleRecord(e,r){try{let n=new Ya({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 Jv.call(this,Xr,e,r)}atLeastOneInternalRecord(e,r){Jv.call(this,xn,r,e)}atLeastOneSepFirstInternalRecord(e,r){Jv.call(this,bn,r,e,eie)}manyInternalRecord(e,r){Jv.call(this,mr,r,e)}manySepFirstInternalRecord(e,r){Jv.call(this,ln,r,e,eie)}orInternalRecord(e,r){return kMe.call(this,e,r)}subruleInternalRecord(e,r,n){if(B6(r),!e||Ve(e,"ruleName")===!1){let l=new Error(`<SUBRULE${rie(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
inside top level rule: <${this.recordingProdStack[0].name}>`);throw l.KNOWN_RECORDER_ERROR=!0,l}let i=sa(this.recordingProdStack),a=e.ruleName,o=new Yr({idx:r,nonTerminalName:a,label:n?.LABEL,referencedRule:void 0});return i.definition.push(o),this.outputCst?bMe:F6}consumeInternalRecord(e,r,n){if(B6(r),!TR(e)){let o=new Error(`<CONSUME${rie(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let i=sa(this.recordingProdStack),a=new sr({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(a),iie}};s(Jv,"recordProd");s(kMe,"recordOrProd");s(rie,"getIdxSuffix");s(B6,"assertMethodIdxIsValid")});var z6,sie=_(()=>{"use strict";Tt();Rm();Ss();z6=class{static{s(this,"PerformanceTracer")}initPerformanceTracer(e){if(Ve(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=Ka.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:i,value:a}=Bv(r),o=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&o(`${n}<-- <${e}> time: ${i}ms`),this.traceInitIndent--,a}else return r()}}});function oie(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 lie=_(()=>{"use strict";s(oie,"applyMixins")});function $6(t=void 0){return function(){return t}}var qm,Ka,Wm,Li,e2,t2,Ss=_(()=>{"use strict";Tt();Rm();Fre();Kd();Bm();Nne();BR();$ne();Xne();jne();Kne();Qne();Zne();Jne();aie();sie();lie();Xv();qm=jd(io,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(qm);Ka=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ru,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Wm=Object.freeze({recoveryValueFunc:s(()=>{},"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"})(Li||(Li={}));s($6,"EMPTY_ALT");e2=class t{static{s(this,"Parser")}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",()=>{Fv(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),be(this.definedRulesNames,i=>{let o=this[i].originalGrammarAction,l;this.TRACE_INIT(`${i} Rule`,()=>{l=this.topLevelRuleRecord(i,o)}),this.gastProductionsCache[i]=l})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Mne({rules:nr(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Vt(n)&&this.skipValidations===!1){let i=Ine({rules:nr(this.gastProductionsCache),tokenTypes:nr(this.tokensMap),errMsgProvider:bl,grammarName:r}),a=Cne({lookaheadStrategy:this.lookaheadStrategy,rules:nr(this.gastProductionsCache),tokenTypes:nr(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,a)}}),Vt(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=Bre(nr(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:nr(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(nr(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Vt(this.definitionErrors))throw e=Ge(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),Ve(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
For further details.`);this.skipValidations=Ve(r,"skipValidations")?r.skipValidations:Ka.skipValidations}};e2.DEFER_DEFINITION_ERRORS_HANDLING=!1;oie(e2,[w6,S6,D6,R6,I6,M6,N6,O6,P6,z6]);t2=class extends e2{static{s(this,"EmbeddedActionsParser")}constructor(e,r=Ka){let n=Hr(r);n.outputCst=!1,super(e,n)}}});var cie=_(()=>{"use strict";ja()});var uie=_(()=>{"use strict"});var hie=_(()=>{"use strict";cie();uie()});var fie=_(()=>{"use strict";hR()});var Zd=_(()=>{"use strict";hR();Ss();$v();Kd();Gm();FR();Bm();Um();CR();ja();ja();hie();fie()});function Jd(t,e,r){return`${t.name}_${e}_${r}`}function gie(t){let e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};AMe(e,t);let r=t.length;for(let n=0;n<r;n++){let i=t[n],a=e0(e,i,i);a!==void 0&&zMe(e,i,a)}return e}function AMe(t,e){let r=e.length;for(let n=0;n<r;n++){let i=e[n],a=Xi(t,i,void 0,{type:TMe}),o=Xi(t,i,void 0,{type:Xm});a.stop=o,t.ruleToStartState.set(i,a),t.ruleToStopState.set(i,o)}}function yie(t,e,r){return r instanceof sr?YR(t,e,r.terminalType,r):r instanceof Yr?FMe(t,e,r):r instanceof cn?IMe(t,e,r):r instanceof Xr?NMe(t,e,r):r instanceof mr?LMe(t,e,r):r instanceof ln?DMe(t,e,r):r instanceof xn?RMe(t,e,r):r instanceof bn?MMe(t,e,r):e0(t,e,r)}function LMe(t,e,r){let n=Xi(t,e,r,{type:pie});Jh(t,n);let i=jm(t,e,n,r,e0(t,e,r));return xie(t,e,r,i)}function DMe(t,e,r){let n=Xi(t,e,r,{type:pie});Jh(t,n);let i=jm(t,e,n,r,e0(t,e,r)),a=YR(t,e,r.separator,r);return xie(t,e,r,i,a)}function RMe(t,e,r){let n=Xi(t,e,r,{type:die});Jh(t,n);let i=jm(t,e,n,r,e0(t,e,r));return vie(t,e,r,i)}function MMe(t,e,r){let n=Xi(t,e,r,{type:die});Jh(t,n);let i=jm(t,e,n,r,e0(t,e,r)),a=YR(t,e,r.separator,r);return vie(t,e,r,i,a)}function IMe(t,e,r){let n=Xi(t,e,r,{type:Zh});Jh(t,n);let i=Ge(r.definition,o=>yie(t,e,o));return jm(t,e,n,r,...i)}function NMe(t,e,r){let n=Xi(t,e,r,{type:Zh});Jh(t,n);let i=jm(t,e,n,r,e0(t,e,r));return OMe(t,e,r,i)}function e0(t,e,r){let n=Nr(Ge(r.definition,i=>yie(t,e,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:BMe(t,n)}function vie(t,e,r,n,i){let a=n.left,o=n.right,l=Xi(t,e,r,{type:_Me});Jh(t,l);let u=Xi(t,e,r,{type:mie});return a.loopback=l,u.loopback=l,t.decisionMap[Jd(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,mi(o,l),i===void 0?(mi(l,a),mi(l,u)):(mi(l,u),mi(l,i.left),mi(i.right,a)),{left:a,right:u}}function xie(t,e,r,n,i){let a=n.left,o=n.right,l=Xi(t,e,r,{type:SMe});Jh(t,l);let u=Xi(t,e,r,{type:mie}),h=Xi(t,e,r,{type:CMe});return l.loopback=h,u.loopback=h,mi(l,a),mi(l,u),mi(o,h),i!==void 0?(mi(h,u),mi(h,i.left),mi(i.right,a)):mi(h,l),t.decisionMap[Jd(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:u}}function OMe(t,e,r,n){let i=n.left,a=n.right;return mi(i,a),t.decisionMap[Jd(e,"Option",r.idx)]=i,n}function Jh(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function jm(t,e,r,n,...i){let a=Xi(t,e,n,{type:EMe,start:r});r.end=a;for(let l of i)l!==void 0?(mi(r,l.left),mi(l.right,a)):mi(r,a);let o={left:r,right:a};return t.decisionMap[Jd(e,PMe(n),n.idx)]=r,o}function PMe(t){if(t instanceof cn)return"Alternation";if(t instanceof Xr)return"Option";if(t instanceof mr)return"Repetition";if(t instanceof ln)return"RepetitionWithSeparator";if(t instanceof xn)return"RepetitionMandatory";if(t instanceof bn)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function BMe(t,e){let r=e.length;for(let a=0;a<r-1;a++){let o=e[a],l;o.left.transitions.length===1&&(l=o.left.transitions[0]);let u=l instanceof Ym,h=l,f=e[a+1].left;o.left.type===Zh&&o.right.type===Zh&&l!==void 0&&(u&&h.followState===o.right||l.target===o.right)?(u?h.followState=f:l.target=f,$Me(t,o.right)):mi(o.right,f)}let n=e[0],i=e[r-1];return{left:n.left,right:i.right}}function YR(t,e,r,n){let i=Xi(t,e,n,{type:Zh}),a=Xi(t,e,n,{type:Zh});return XR(i,new Hm(a,r)),{left:i,right:a}}function FMe(t,e,r){let n=r.referencedRule,i=t.ruleToStartState.get(n),a=Xi(t,e,r,{type:Zh}),o=Xi(t,e,r,{type:Zh}),l=new Ym(i,n,o);return XR(a,l),{left:a,right:o}}function zMe(t,e,r){let n=t.ruleToStartState.get(e);mi(n,r.left);let i=t.ruleToStopState.get(e);return mi(r.right,i),{left:n,right:i}}function mi(t,e){let r=new n2(e);XR(t,r)}function Xi(t,e,r,n){let i=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},n);return t.states.push(i),i}function XR(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function $Me(t,e){t.states.splice(t.states.indexOf(e),1)}var Zh,TMe,die,pie,Xm,EMe,CMe,SMe,_Me,mie,r2,Hm,n2,Ym,bie=_(()=>{"use strict";ym();z9();Zd();s(Jd,"buildATNKey");Zh=1,TMe=2,die=4,pie=5,Xm=7,EMe=8,CMe=9,SMe=10,_Me=11,mie=12,r2=class{static{s(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},Hm=class extends r2{static{s(this,"AtomTransition")}constructor(e,r){super(e),this.tokenType=r}},n2=class extends r2{static{s(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},Ym=class extends r2{static{s(this,"RuleTransition")}constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}};s(gie,"createATN");s(AMe,"createRuleStartAndStopATNStates");s(yie,"atom");s(LMe,"repetition");s(DMe,"repetitionSep");s(RMe,"repetitionMandatory");s(MMe,"repetitionMandatorySep");s(IMe,"alternation");s(NMe,"option");s(e0,"block");s(vie,"plus");s(xie,"star");s(OMe,"optional");s(Jh,"defineDecisionState");s(jm,"makeAlts");s(PMe,"getProdType");s(BMe,"makeBlock");s(YR,"tokenRef");s(FMe,"ruleRef");s(zMe,"buildRuleHandle");s(mi,"epsilon");s(Xi,"newState");s(XR,"addTransition");s($Me,"removeState")});function jR(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}var i2,Km,kie=_(()=>{"use strict";ym();i2={},Km=class{static{s(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let r=jR(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Ge(this.configs,e=>e.alt)}get key(){let e="";for(let r in this.map)e+=r+":";return e}};s(jR,"getATNConfigKey")});function GMe(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 Tie(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 o=[a.tokenTypeIdx].concat(a.categoryMatches);for(let l of o)if(r.has(l)){if(!i.has(l))return!1}else r.add(l),i.add(l)}}return!0}function VMe(t){let e=t.decisionStates.length,r=Array(e);for(let n=0;n<e;n++)r[n]=GMe(t.decisionStates[n],n);return r}function KR(t,e,r,n){let i=t[e](r),a=i.start;if(a===void 0){let l=JMe(i.atnStartState);a=Sie(i,Cie(l)),i.start=a}return UMe.apply(this,[i,a,r,n])}function UMe(t,e,r,n){let i=e,a=1,o=[],l=this.LA(a++);for(;;){let u=jMe(i,l);if(u===void 0&&(u=qMe.apply(this,[t,i,l,a,r,n])),u===i2)return XMe(o,i,l);if(u.isAcceptState===!0)return u.prediction;i=u,o.push(l),l=this.LA(a++)}}function qMe(t,e,r,n,i,a){let o=KMe(e.configs,r,i);if(o.size===0)return Eie(t,e,r,i2),i2;let l=Cie(o),u=ZMe(o,i);if(u!==void 0)l.isAcceptState=!0,l.prediction=u,l.configs.uniqueAlt=u;else if(nIe(o)){let h=pl(o.alts);l.isAcceptState=!0,l.prediction=h,l.configs.uniqueAlt=h,WMe.apply(this,[t,n,o.alts,a])}return l=Eie(t,e,r,l),l}function WMe(t,e,r,n){let i=[];for(let h=1;h<=e;h++)i.push(this.LA(h).tokenType);let a=t.atnStartState,o=a.rule,l=a.production,u=HMe({topLevelRule:o,ambiguityIndices:r,production:l,prefixPath:i});n(u)}function HMe(t){let e=Ge(t.prefixPath,i=>Du(i)).join(", "),r=t.production.idx===0?"":t.production.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${YMe(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 YMe(t){if(t instanceof Yr)return"SUBRULE";if(t instanceof Xr)return"OPTION";if(t instanceof cn)return"OR";if(t instanceof xn)return"AT_LEAST_ONE";if(t instanceof bn)return"AT_LEAST_ONE_SEP";if(t instanceof ln)return"MANY_SEP";if(t instanceof mr)return"MANY";if(t instanceof sr)return"CONSUME";throw Error("non exhaustive match")}function XMe(t,e,r){let n=oa(e.configs.elements,a=>a.state.transitions),i=IJ(n.filter(a=>a instanceof Hm).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:t}}function jMe(t,e){return t.edges[e.tokenTypeIdx]}function KMe(t,e,r){let n=new Km,i=[];for(let o of t.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===Xm){i.push(o);continue}let l=o.state.transitions.length;for(let u=0;u<l;u++){let h=o.state.transitions[u],f=QMe(h,e);f!==void 0&&n.add({state:f,alt:o.alt,stack:o.stack})}}let a;if(i.length===0&&n.size===1&&(a=n),a===void 0){a=new Km;for(let o of n.elements)V6(o,a)}if(i.length>0&&!tIe(a))for(let o of i)a.add(o);return a}function QMe(t,e){if(t instanceof Hm&&Vv(e,t.tokenType))return t.target}function ZMe(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 Cie(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function Eie(t,e,r,n){return n=Sie(t,n),e.edges[r.tokenTypeIdx]=n,n}function Sie(t,e){if(e===i2)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 JMe(t){let e=new Km,r=t.transitions.length;for(let n=0;n<r;n++){let a={state:t.transitions[n].target,alt:n,stack:[]};V6(a,e)}return e}function V6(t,e){let r=t.state;if(r.type===Xm){if(t.stack.length>0){let i=[...t.stack],o={state:i.pop(),alt:t.alt,stack:i};V6(o,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);let n=r.transitions.length;for(let i=0;i<n;i++){let a=r.transitions[i],o=eIe(t,a);o!==void 0&&V6(o,e)}}function eIe(t,e){if(e instanceof n2)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof Ym){let r=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:r}}}function tIe(t){for(let e of t.elements)if(e.state.type===Xm)return!0;return!1}function rIe(t){for(let e of t.elements)if(e.state.type!==Xm)return!1;return!0}function nIe(t){if(rIe(t))return!0;let e=iIe(t.elements);return aIe(e)&&!sIe(e)}function iIe(t){let e=new Map;for(let r of t){let n=jR(r,!1),i=e.get(n);i===void 0&&(i={},e.set(n,i)),i[r.alt]=!0}return e}function aIe(t){for(let e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}function sIe(t){for(let e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var G6,wie,a2,_ie=_(()=>{"use strict";Zd();bie();kie();Y9();G9();NJ();ym();O5();uk();mk();Q9();s(GMe,"createDFACache");G6=class{static{s(this,"PredicateSet")}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;n<r;n++)e+=this.predicates[n]===!0?"1":"0";return e}},wie=new G6,a2=class extends Mu{static{s(this,"LLStarLookaheadStrategy")}constructor(e){var r;super(),this.logging=(r=e?.logging)!==null&&r!==void 0?r:n=>console.log(n)}initialize(e){this.atn=gie(e.rules),this.dfas=VMe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:r,rule:n,hasPredicates:i,dynamicTokensEnabled:a}=e,o=this.dfas,l=this.logging,u=Jd(n,"Alternation",r),f=this.atn.decisionMap[u].decision,d=Ge(x6({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>Ge(p,m=>m[0]));if(Tie(d,!1)&&!a){let p=Or(d,(m,g,y)=>(be(g,v=>{v&&(m[v.tokenTypeIdx]=y,be(v.categoryMatches,x=>{m[x]=y}))}),m),{});return i?function(m){var g;let y=this.LA(1),v=p[y.tokenTypeIdx];if(m!==void 0&&v!==void 0){let x=(g=m[v])===null||g===void 0?void 0:g.GATE;if(x!==void 0&&x.call(this)===!1)return}return v}:function(){let m=this.LA(1);return p[m.tokenTypeIdx]}}else return i?function(p){let m=new G6,g=p===void 0?0:p.length;for(let v=0;v<g;v++){let x=p?.[v].GATE;m.set(v,x===void 0||x.call(this))}let y=KR.call(this,o,f,m,l);return typeof y=="number"?y:void 0}:function(){let p=KR.call(this,o,f,wie,l);return typeof p=="number"?p:void 0}}buildLookaheadForOptional(e){let{prodOccurrence:r,rule:n,prodType:i,dynamicTokensEnabled:a}=e,o=this.dfas,l=this.logging,u=Jd(n,i,r),f=this.atn.decisionMap[u].decision,d=Ge(x6({maxLookahead:1,occurrence:r,prodType:i,rule:n}),p=>Ge(p,m=>m[0]));if(Tie(d)&&d[0][0]&&!a){let p=d[0],m=Ir(p);if(m.length===1&&Vt(m[0].categoryMatches)){let y=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===y}}else{let g=Or(m,(y,v)=>(v!==void 0&&(y[v.tokenTypeIdx]=!0,be(v.categoryMatches,x=>{y[x]=!0})),y),{});return function(){let y=this.LA(1);return g[y.tokenTypeIdx]===!0}}}return function(){let p=KR.call(this,o,f,wie,l);return typeof p=="object"?!1:p===0}}};s(Tie,"isLL1Sequence");s(VMe,"initATNSimulator");s(KR,"adaptivePredict");s(UMe,"performLookahead");s(qMe,"computeLookaheadTarget");s(WMe,"reportLookaheadAmbiguity");s(HMe,"buildAmbiguityError");s(YMe,"getProductionDslName");s(XMe,"buildAdaptivePredictError");s(jMe,"getExistingTargetState");s(KMe,"computeReachSet");s(QMe,"getReachableTarget");s(ZMe,"getUniqueAlt");s(Cie,"newDFAState");s(Eie,"addDFAEdge");s(Sie,"addDFAState");s(JMe,"computeStartState");s(V6,"closure");s(eIe,"getEpsilonTarget");s(tIe,"hasConfigInRuleStopState");s(rIe,"allConfigsInRuleStopStates");s(nIe,"hasConflictTerminatingPrediction");s(iIe,"getConflictingAltSets");s(aIe,"hasConflictingAltSet");s(sIe,"hasStateAssociatedWithOneAlt")});var Aie=_(()=>{"use strict";_ie()});var Lie,QR,Die,U6,Pr,gr,q6,Rie,ZR,Mie,Iie,Nie,Oie,JR,Pie,Bie,Fie,W6,Qm,Zm,eM,Jm,zie,tM,rM,nM,iM,aM,$ie,Gie,sM,Vie,oM,s2,Uie,qie,Wie,Hie,Yie,Xie,jie,Kie,H6,Qie,Zie,Jie,eae,tae,rae,nae,iae,aae,sae,oae,Y6,lae,cae,uae,hae,fae,dae,pae,mae,gae,yae,vae,xae,bae,lM,cM,kae,wae,Tae,Eae,Cae,Sae,_ae,Aae,Lae,uM,Le,hM=_(()=>{"use strict";(function(t){function e(r){return typeof r=="string"}s(e,"is"),t.is=e})(Lie||(Lie={}));(function(t){function e(r){return typeof r=="string"}s(e,"is"),t.is=e})(QR||(QR={}));(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}s(e,"is"),t.is=e})(Die||(Die={}));(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}s(e,"is"),t.is=e})(U6||(U6={}));(function(t){function e(n,i){return n===Number.MAX_VALUE&&(n=U6.MAX_VALUE),i===Number.MAX_VALUE&&(i=U6.MAX_VALUE),{line:n,character:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Le.uinteger(i.line)&&Le.uinteger(i.character)}s(r,"is"),t.is=r})(Pr||(Pr={}));(function(t){function e(n,i,a,o){if(Le.uinteger(n)&&Le.uinteger(i)&&Le.uinteger(a)&&Le.uinteger(o))return{start:Pr.create(n,i),end:Pr.create(a,o)};if(Pr.is(n)&&Pr.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${a}, ${o}]`)}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Pr.is(i.start)&&Pr.is(i.end)}s(r,"is"),t.is=r})(gr||(gr={}));(function(t){function e(n,i){return{uri:n,range:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&gr.is(i.range)&&(Le.string(i.uri)||Le.undefined(i.uri))}s(r,"is"),t.is=r})(q6||(q6={}));(function(t){function e(n,i,a,o){return{targetUri:n,targetRange:i,targetSelectionRange:a,originSelectionRange:o}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&gr.is(i.targetRange)&&Le.string(i.targetUri)&&gr.is(i.targetSelectionRange)&&(gr.is(i.originSelectionRange)||Le.undefined(i.originSelectionRange))}s(r,"is"),t.is=r})(Rie||(Rie={}));(function(t){function e(n,i,a,o){return{red:n,green:i,blue:a,alpha:o}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Le.numberRange(i.red,0,1)&&Le.numberRange(i.green,0,1)&&Le.numberRange(i.blue,0,1)&&Le.numberRange(i.alpha,0,1)}s(r,"is"),t.is=r})(ZR||(ZR={}));(function(t){function e(n,i){return{range:n,color:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&gr.is(i.range)&&ZR.is(i.color)}s(r,"is"),t.is=r})(Mie||(Mie={}));(function(t){function e(n,i,a){return{label:n,textEdit:i,additionalTextEdits:a}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Le.string(i.label)&&(Le.undefined(i.textEdit)||Zm.is(i))&&(Le.undefined(i.additionalTextEdits)||Le.typedArray(i.additionalTextEdits,Zm.is))}s(r,"is"),t.is=r})(Iie||(Iie={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Nie||(Nie={}));(function(t){function e(n,i,a,o,l,u){let h={startLine:n,endLine:i};return Le.defined(a)&&(h.startCharacter=a),Le.defined(o)&&(h.endCharacter=o),Le.defined(l)&&(h.kind=l),Le.defined(u)&&(h.collapsedText=u),h}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Le.uinteger(i.startLine)&&Le.uinteger(i.startLine)&&(Le.undefined(i.startCharacter)||Le.uinteger(i.startCharacter))&&(Le.undefined(i.endCharacter)||Le.uinteger(i.endCharacter))&&(Le.undefined(i.kind)||Le.string(i.kind))}s(r,"is"),t.is=r})(Oie||(Oie={}));(function(t){function e(n,i){return{location:n,message:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&q6.is(i.location)&&Le.string(i.message)}s(r,"is"),t.is=r})(JR||(JR={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Pie||(Pie={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(Bie||(Bie={}));(function(t){function e(r){let n=r;return Le.objectLiteral(n)&&Le.string(n.href)}s(e,"is"),t.is=e})(Fie||(Fie={}));(function(t){function e(n,i,a,o,l,u){let h={range:n,message:i};return Le.defined(a)&&(h.severity=a),Le.defined(o)&&(h.code=o),Le.defined(l)&&(h.source=l),Le.defined(u)&&(h.relatedInformation=u),h}s(e,"create"),t.create=e;function r(n){var i;let a=n;return Le.defined(a)&&gr.is(a.range)&&Le.string(a.message)&&(Le.number(a.severity)||Le.undefined(a.severity))&&(Le.integer(a.code)||Le.string(a.code)||Le.undefined(a.code))&&(Le.undefined(a.codeDescription)||Le.string((i=a.codeDescription)===null||i===void 0?void 0:i.href))&&(Le.string(a.source)||Le.undefined(a.source))&&(Le.undefined(a.relatedInformation)||Le.typedArray(a.relatedInformation,JR.is))}s(r,"is"),t.is=r})(W6||(W6={}));(function(t){function e(n,i,...a){let o={title:n,command:i};return Le.defined(a)&&a.length>0&&(o.arguments=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.string(i.title)&&Le.string(i.command)}s(r,"is"),t.is=r})(Qm||(Qm={}));(function(t){function e(a,o){return{range:a,newText:o}}s(e,"replace"),t.replace=e;function r(a,o){return{range:{start:a,end:a},newText:o}}s(r,"insert"),t.insert=r;function n(a){return{range:a,newText:""}}s(n,"del"),t.del=n;function i(a){let o=a;return Le.objectLiteral(o)&&Le.string(o.newText)&&gr.is(o.range)}s(i,"is"),t.is=i})(Zm||(Zm={}));(function(t){function e(n,i,a){let o={label:n};return i!==void 0&&(o.needsConfirmation=i),a!==void 0&&(o.description=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Le.string(i.label)&&(Le.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(Le.string(i.description)||i.description===void 0)}s(r,"is"),t.is=r})(eM||(eM={}));(function(t){function e(r){let n=r;return Le.string(n)}s(e,"is"),t.is=e})(Jm||(Jm={}));(function(t){function e(a,o,l){return{range:a,newText:o,annotationId:l}}s(e,"replace"),t.replace=e;function r(a,o,l){return{range:{start:a,end:a},newText:o,annotationId:l}}s(r,"insert"),t.insert=r;function n(a,o){return{range:a,newText:"",annotationId:o}}s(n,"del"),t.del=n;function i(a){let o=a;return Zm.is(o)&&(eM.is(o.annotationId)||Jm.is(o.annotationId))}s(i,"is"),t.is=i})(zie||(zie={}));(function(t){function e(n,i){return{textDocument:n,edits:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&sM.is(i.textDocument)&&Array.isArray(i.edits)}s(r,"is"),t.is=r})(tM||(tM={}));(function(t){function e(n,i,a){let o={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return i&&i.kind==="create"&&Le.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||Le.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Le.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Jm.is(i.annotationId))}s(r,"is"),t.is=r})(rM||(rM={}));(function(t){function e(n,i,a,o){let l={kind:"rename",oldUri:n,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(l.options=a),o!==void 0&&(l.annotationId=o),l}s(e,"create"),t.create=e;function r(n){let i=n;return i&&i.kind==="rename"&&Le.string(i.oldUri)&&Le.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||Le.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Le.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Jm.is(i.annotationId))}s(r,"is"),t.is=r})(nM||(nM={}));(function(t){function e(n,i,a){let o={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return i&&i.kind==="delete"&&Le.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||Le.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||Le.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Jm.is(i.annotationId))}s(r,"is"),t.is=r})(iM||(iM={}));(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=>Le.string(i.kind)?rM.is(i)||nM.is(i)||iM.is(i):tM.is(i)))}s(e,"is"),t.is=e})(aM||(aM={}));(function(t){function e(n){return{uri:n}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.string(i.uri)}s(r,"is"),t.is=r})($ie||($ie={}));(function(t){function e(n,i){return{uri:n,version:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.string(i.uri)&&Le.integer(i.version)}s(r,"is"),t.is=r})(Gie||(Gie={}));(function(t){function e(n,i){return{uri:n,version:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.string(i.uri)&&(i.version===null||Le.integer(i.version))}s(r,"is"),t.is=r})(sM||(sM={}));(function(t){function e(n,i,a,o){return{uri:n,languageId:i,version:a,text:o}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.string(i.uri)&&Le.string(i.languageId)&&Le.integer(i.version)&&Le.string(i.text)}s(r,"is"),t.is=r})(Vie||(Vie={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}s(e,"is"),t.is=e})(oM||(oM={}));(function(t){function e(r){let n=r;return Le.objectLiteral(r)&&oM.is(n.kind)&&Le.string(n.value)}s(e,"is"),t.is=e})(s2||(s2={}));(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})(Uie||(Uie={}));(function(t){t.PlainText=1,t.Snippet=2})(qie||(qie={}));(function(t){t.Deprecated=1})(Wie||(Wie={}));(function(t){function e(n,i,a){return{newText:n,insert:i,replace:a}}s(e,"create"),t.create=e;function r(n){let i=n;return i&&Le.string(i.newText)&&gr.is(i.insert)&&gr.is(i.replace)}s(r,"is"),t.is=r})(Hie||(Hie={}));(function(t){t.asIs=1,t.adjustIndentation=2})(Yie||(Yie={}));(function(t){function e(r){let n=r;return n&&(Le.string(n.detail)||n.detail===void 0)&&(Le.string(n.description)||n.description===void 0)}s(e,"is"),t.is=e})(Xie||(Xie={}));(function(t){function e(r){return{label:r}}s(e,"create"),t.create=e})(jie||(jie={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}s(e,"create"),t.create=e})(Kie||(Kie={}));(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(e,"fromPlainText"),t.fromPlainText=e;function r(n){let i=n;return Le.string(i)||Le.objectLiteral(i)&&Le.string(i.language)&&Le.string(i.value)}s(r,"is"),t.is=r})(H6||(H6={}));(function(t){function e(r){let n=r;return!!n&&Le.objectLiteral(n)&&(s2.is(n.contents)||H6.is(n.contents)||Le.typedArray(n.contents,H6.is))&&(r.range===void 0||gr.is(r.range))}s(e,"is"),t.is=e})(Qie||(Qie={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}s(e,"create"),t.create=e})(Zie||(Zie={}));(function(t){function e(r,n,...i){let a={label:r};return Le.defined(n)&&(a.documentation=n),Le.defined(i)?a.parameters=i:a.parameters=[],a}s(e,"create"),t.create=e})(Jie||(Jie={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(eae||(eae={}));(function(t){function e(r,n){let i={range:r};return Le.number(n)&&(i.kind=n),i}s(e,"create"),t.create=e})(tae||(tae={}));(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})(rae||(rae={}));(function(t){t.Deprecated=1})(nae||(nae={}));(function(t){function e(r,n,i,a,o){let l={name:r,kind:n,location:{uri:a,range:i}};return o&&(l.containerName=o),l}s(e,"create"),t.create=e})(iae||(iae={}));(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}}}s(e,"create"),t.create=e})(aae||(aae={}));(function(t){function e(n,i,a,o,l,u){let h={name:n,detail:i,kind:a,range:o,selectionRange:l};return u!==void 0&&(h.children=u),h}s(e,"create"),t.create=e;function r(n){let i=n;return i&&Le.string(i.name)&&Le.number(i.kind)&&gr.is(i.range)&&gr.is(i.selectionRange)&&(i.detail===void 0||Le.string(i.detail))&&(i.deprecated===void 0||Le.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}s(r,"is"),t.is=r})(sae||(sae={}));(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"})(oae||(oae={}));(function(t){t.Invoked=1,t.Automatic=2})(Y6||(Y6={}));(function(t){function e(n,i,a){let o={diagnostics:n};return i!=null&&(o.only=i),a!=null&&(o.triggerKind=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.typedArray(i.diagnostics,W6.is)&&(i.only===void 0||Le.typedArray(i.only,Le.string))&&(i.triggerKind===void 0||i.triggerKind===Y6.Invoked||i.triggerKind===Y6.Automatic)}s(r,"is"),t.is=r})(lae||(lae={}));(function(t){function e(n,i,a){let o={title:n},l=!0;return typeof i=="string"?(l=!1,o.kind=i):Qm.is(i)?o.command=i:o.edit=i,l&&a!==void 0&&(o.kind=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return i&&Le.string(i.title)&&(i.diagnostics===void 0||Le.typedArray(i.diagnostics,W6.is))&&(i.kind===void 0||Le.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Qm.is(i.command))&&(i.isPreferred===void 0||Le.boolean(i.isPreferred))&&(i.edit===void 0||aM.is(i.edit))}s(r,"is"),t.is=r})(cae||(cae={}));(function(t){function e(n,i){let a={range:n};return Le.defined(i)&&(a.data=i),a}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&gr.is(i.range)&&(Le.undefined(i.command)||Qm.is(i.command))}s(r,"is"),t.is=r})(uae||(uae={}));(function(t){function e(n,i){return{tabSize:n,insertSpaces:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.uinteger(i.tabSize)&&Le.boolean(i.insertSpaces)}s(r,"is"),t.is=r})(hae||(hae={}));(function(t){function e(n,i,a){return{range:n,target:i,data:a}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&gr.is(i.range)&&(Le.undefined(i.target)||Le.string(i.target))}s(r,"is"),t.is=r})(fae||(fae={}));(function(t){function e(n,i){return{range:n,parent:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&gr.is(i.range)&&(i.parent===void 0||t.is(i.parent))}s(r,"is"),t.is=r})(dae||(dae={}));(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"})(pae||(pae={}));(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"})(mae||(mae={}));(function(t){function e(r){let n=r;return Le.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}s(e,"is"),t.is=e})(gae||(gae={}));(function(t){function e(n,i){return{range:n,text:i}}s(e,"create"),t.create=e;function r(n){let i=n;return i!=null&&gr.is(i.range)&&Le.string(i.text)}s(r,"is"),t.is=r})(yae||(yae={}));(function(t){function e(n,i,a){return{range:n,variableName:i,caseSensitiveLookup:a}}s(e,"create"),t.create=e;function r(n){let i=n;return i!=null&&gr.is(i.range)&&Le.boolean(i.caseSensitiveLookup)&&(Le.string(i.variableName)||i.variableName===void 0)}s(r,"is"),t.is=r})(vae||(vae={}));(function(t){function e(n,i){return{range:n,expression:i}}s(e,"create"),t.create=e;function r(n){let i=n;return i!=null&&gr.is(i.range)&&(Le.string(i.expression)||i.expression===void 0)}s(r,"is"),t.is=r})(xae||(xae={}));(function(t){function e(n,i){return{frameId:n,stoppedLocation:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&gr.is(n.stoppedLocation)}s(r,"is"),t.is=r})(bae||(bae={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}s(e,"is"),t.is=e})(lM||(lM={}));(function(t){function e(n){return{value:n}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&(i.tooltip===void 0||Le.string(i.tooltip)||s2.is(i.tooltip))&&(i.location===void 0||q6.is(i.location))&&(i.command===void 0||Qm.is(i.command))}s(r,"is"),t.is=r})(cM||(cM={}));(function(t){function e(n,i,a){let o={position:n,label:i};return a!==void 0&&(o.kind=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Pr.is(i.position)&&(Le.string(i.label)||Le.typedArray(i.label,cM.is))&&(i.kind===void 0||lM.is(i.kind))&&i.textEdits===void 0||Le.typedArray(i.textEdits,Zm.is)&&(i.tooltip===void 0||Le.string(i.tooltip)||s2.is(i.tooltip))&&(i.paddingLeft===void 0||Le.boolean(i.paddingLeft))&&(i.paddingRight===void 0||Le.boolean(i.paddingRight))}s(r,"is"),t.is=r})(kae||(kae={}));(function(t){function e(r){return{kind:"snippet",value:r}}s(e,"createSnippet"),t.createSnippet=e})(wae||(wae={}));(function(t){function e(r,n,i,a){return{insertText:r,filterText:n,range:i,command:a}}s(e,"create"),t.create=e})(Tae||(Tae={}));(function(t){function e(r){return{items:r}}s(e,"create"),t.create=e})(Eae||(Eae={}));(function(t){t.Invoked=0,t.Automatic=1})(Cae||(Cae={}));(function(t){function e(r,n){return{range:r,text:n}}s(e,"create"),t.create=e})(Sae||(Sae={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}s(e,"create"),t.create=e})(_ae||(_ae={}));(function(t){function e(r){let n=r;return Le.objectLiteral(n)&&QR.is(n.uri)&&Le.string(n.name)}s(e,"is"),t.is=e})(Aae||(Aae={}));(function(t){function e(a,o,l,u){return new uM(a,o,l,u)}s(e,"create"),t.create=e;function r(a){let o=a;return!!(Le.defined(o)&&Le.string(o.uri)&&(Le.undefined(o.languageId)||Le.string(o.languageId))&&Le.uinteger(o.lineCount)&&Le.func(o.getText)&&Le.func(o.positionAt)&&Le.func(o.offsetAt))}s(r,"is"),t.is=r;function n(a,o){let l=a.getText(),u=i(o,(f,d)=>{let p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p}),h=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],p=a.offsetAt(d.range.start),m=a.offsetAt(d.range.end);if(m<=h)l=l.substring(0,p)+d.newText+l.substring(m,l.length);else throw new Error("Overlapping edit");h=p}return l}s(n,"applyEdits"),t.applyEdits=n;function i(a,o){if(a.length<=1)return a;let l=a.length/2|0,u=a.slice(0,l),h=a.slice(l);i(u,o),i(h,o);let f=0,d=0,p=0;for(;f<u.length&&d<h.length;)o(u[f],h[d])<=0?a[p++]=u[f++]:a[p++]=h[d++];for(;f<u.length;)a[p++]=u[f++];for(;d<h.length;)a[p++]=h[d++];return a}s(i,"mergeSort")})(Lae||(Lae={}));uM=class{static{s(this,"FullTextDocument")}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){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,n=!0;for(let i=0;i<r.length;i++){n&&(e.push(i),n=!1);let a=r.charAt(i);n=a==="\r"||a===`
`,a==="\r"&&i+1<r.length&&r.charAt(i+1)===`
`&&i++}n&&r.length>0&&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 Pr.create(0,e);for(;n<i;){let o=Math.floor((n+i)/2);r[o]>e?i=o:n=o+1}let a=n-1;return Pr.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<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}};(function(t){let e=Object.prototype.toString;function r(m){return typeof m<"u"}s(r,"defined"),t.defined=r;function n(m){return typeof m>"u"}s(n,"undefined"),t.undefined=n;function i(m){return m===!0||m===!1}s(i,"boolean"),t.boolean=i;function a(m){return e.call(m)==="[object String]"}s(a,"string"),t.string=a;function o(m){return e.call(m)==="[object Number]"}s(o,"number"),t.number=o;function l(m,g,y){return e.call(m)==="[object Number]"&&g<=m&&m<=y}s(l,"numberRange"),t.numberRange=l;function u(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}s(u,"integer"),t.integer=u;function h(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}s(h,"uinteger"),t.uinteger=h;function f(m){return e.call(m)==="[object Function]"}s(f,"func"),t.func=f;function d(m){return m!==null&&typeof m=="object"}s(d,"objectLiteral"),t.objectLiteral=d;function p(m,g){return Array.isArray(m)&&m.every(g)}s(p,"typedArray"),t.typedArray=p})(Le||(Le={}))});var o2,l2,t0,r0,fM,eg,X6=_(()=>{"use strict";hM();Do();gl();o2=class{static{s(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(e){return this.rootNode=new eg(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let r=new r0;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){let n=new t0(e.startOffset,e.image.length,Tm(e),e.tokenType,!1);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)}}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)}addHiddenTokens(e){for(let r of e){let n=new t0(r.startOffset,r.image.length,Tm(r),r.tokenType,!0);n.root=this.rootNode,this.addHiddenToken(this.rootNode,n)}}addHiddenToken(e,r){let{offset:n,end:i}=r;for(let a=0;a<e.content.length;a++){let o=e.content[a],{offset:l,end:u}=o;if(to(o)&&n>l&&i<u){this.addHiddenToken(o,r);return}else if(i<=l){e.content.splice(a,0,r);return}}e.content.push(r)}},l2=class{static{s(this,"AbstractCstNode")}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)}},t0=class extends l2{static{s(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,r,n,i,a=!1){super(),this._hidden=a,this._offset=e,this._tokenType=i,this._length=r,this._range=n}},r0=class extends l2{static{s(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new fM(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<n.start.line?n.start:i.end}}return this._rangeCache}else return{start:Pr.create(0,0),end:Pr.create(0,0)}}get firstNonHiddenNode(){for(let e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){let r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},fM=class t extends Array{static{s(this,"CstNodeContainer")}constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(let r of e)r.container=this.parent}},eg=class extends r0{static{s(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}});function dM(t){return t.$type===j6}var j6,Dae,Rae,c2,u2,K6,tg,h2,oIe,pM,f2=_(()=>{"use strict";Zd();Aie();mc();xl();Ha();X6();j6=Symbol("Datatype");s(dM,"isDataTypeNode");Dae="\u200B",Rae=s(t=>t.endsWith(Dae)?t:t+Dae,"withRuleSuffix"),c2=class{static{s(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;let r=this.lexer.definition;this.wrapper=new pM(r,Object.assign(Object.assign({},e.parser.ParserConfig),{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)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},u2=class extends c2{static{s(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new o2,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=e.fragment?void 0:Ov(e)?j6:qd(e),i=this.wrapper.DEFINE_RULE(Rae(e.name),this.startImplementation(n,r).bind(this));return e.entry&&(this.mainRule=i),i}parse(e){this.nodeBuilder.buildRootNode(e);let r=this.lexer.tokenize(e);this.wrapper.input=r.tokens;let n=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(r.hidden),this.unorderedGroups.clear(),{value:n,lexerErrors:r.errors,parserErrors:this.wrapper.errors}}startImplementation(e,r){return n=>{if(!this.isRecording()){let a={$type:e};this.stack.push(a),e===j6&&(a.value="")}let i;try{i=r(n)}catch{i=void 0}return!this.isRecording()&&i===void 0&&(i=this.construct()),i}}consume(e,r,n){let i=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(i)){let a=this.nodeBuilder.buildLeafNode(i,n),{assignment:o,isCrossRef:l}=this.getAssignment(n),u=this.current;if(o){let h=Mo(n)?i.image:this.converter.convert(i.image,a);this.assign(o.operator,o.feature,h,a,l)}else if(dM(u)){let h=i.image;Mo(n)||(h=this.converter.convert(h,a).toString()),u.value+=h}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,i){let a;this.isRecording()||(a=this.nodeBuilder.buildCompositeNode(n));let o=this.wrapper.wrapSubrule(e,r,i);!this.isRecording()&&a&&a.length>0&&this.performSubruleAssignment(o,n,a)}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 o=this.current;if(dM(o))o.value+=e.toString();else if(typeof e=="object"&&e){let l=e.$type,u=this.assignWithoutOverride(e,o);l&&(u.$type=l);let h=u;this.stack.pop(),this.stack.push(h)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&r.feature&&r.operator){n=this.construct(!1);let a=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(a)}let i={$type:e};this.stack.pop(),this.stack.push(i),r.feature&&r.operator&&this.assign(r.operator,r.feature,n,n.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;let r=this.current;return Xk(r),this.nodeBuilder.construct(r),e&&this.stack.pop(),dM(r)?this.converter.convert(r.value,r.$cstNode):(VD(this.astReflection,r),r)}getAssignment(e){if(!this.assignmentMap.has(e)){let r=zd(e,yl);this.assignmentMap.set(e,{assignment:r,isCrossRef:r?Fd(r.terminal):!1})}return this.assignmentMap.get(e)}assign(e,r,n,i,a){let o=this.current,l;switch(a&&typeof n=="string"?l=this.linker.buildReference(o,r,i,n):l=n,e){case"=":{o[r]=l;break}case"?=":{o[r]=!0;break}case"+=":Array.isArray(o[r])||(o[r]=[]),o[r].push(l)}}assignWithoutOverride(e,r){for(let[n,i]of Object.entries(r)){let a=e[n];a===void 0?e[n]=i:Array.isArray(a)&&Array.isArray(i)&&(i.push(...a),e[n]=i)}return e}get definitionErrors(){return this.wrapper.definitionErrors}},K6=class{static{s(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return Ru.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Ru.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Ru.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Ru.buildEarlyExitMessage(e)}},tg=class extends K6{static{s(this,"LangiumParserErrorMessageProvider")}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}\`.`}},h2=class extends c2{static{s(this,"LangiumCompletionParser")}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);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(Rae(e.name),this.startImplementation(r).bind(this));return 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){this.before(n),this.wrapper.wrapSubrule(e,r,i),this.after(n)}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}},oIe={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new tg},pM=class extends t2{static{s(this,"ChevrotainWrapper")}constructor(e,r){let n=r&&"maxLookahead"in r;super(e,Object.assign(Object.assign(Object.assign({},oIe),{lookaheadStrategy:n?new Mu({maxLookahead:r.maxLookahead}):new a2}),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 Z6(t,e,r){return lIe({parser:e,tokens:r,rules:new Map,ruleNames:new Map},t),e}function lIe(t,e){let r=Iv(e,!1),n=Wr(e.rules).filter(Sa).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});a.rules.set(i.name,t.parser.rule(i,n0(a,i.definition)))}}function n0(t,e,r=!1){let n;if(Mo(e))n=mIe(t,e);else if(Cu(e))n=cIe(t,e);else if(yl(e))n=n0(t,e.terminal);else if(Fd(e))n=Mae(t,e);else if(vl(e))n=uIe(t,e);else if(Wk(e))n=fIe(t,e);else if(Yk(e))n=dIe(t,e);else if(Kh(e))n=pIe(t,e);else if(wD(e)){let i=t.consume++;n=s(()=>t.parser.consume(i,io,e),"method")}else throw new Bd(e.$cstNode,`Unexpected element type: ${e.$type}`);return Iae(t,r?void 0:Q6(e),n,e.cardinality)}function cIe(t,e){let r=qd(e);return()=>t.parser.action(r,e)}function uIe(t,e){let r=e.rule.ref;if(Sa(r)){let n=t.subrule++,i=e.arguments.length>0?hIe(r,e.arguments):()=>({});return a=>t.parser.subrule(n,Nae(t,r),e,i(a))}else if(Ro(r)){let n=t.consume++,i=mM(t,r.name);return()=>t.parser.consume(n,i,e)}else if(r)jh(r);else throw new Bd(e.$cstNode,`Undefined rule type: ${e.$type}`)}function hIe(t,e){let r=e.map(n=>Iu(n.value));return n=>{let i={};for(let a=0;a<r.length;a++){let o=t.parameters[a],l=r[a];i[o.name]=l(n)}return i}}function Iu(t){if(KL(t)){let e=Iu(t.left),r=Iu(t.right);return n=>e(n)||r(n)}else if(XL(t)){let e=Iu(t.left),r=Iu(t.right);return n=>e(n)&&r(n)}else if(tD(t)){let e=Iu(t.value);return r=>!e(r)}else if(aD(t)){let e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(HL(t)){let e=!!t.true;return()=>e}jh(t)}function fIe(t,e){if(e.elements.length===1)return n0(t,e.elements[0]);{let r=[];for(let i of e.elements){let a={ALT:n0(t,i,!0)},o=Q6(i);o&&(a.GATE=Iu(o)),r.push(a)}let n=t.or++;return i=>t.parser.alternatives(n,r.map(a=>{let o={ALT:s(()=>a.ALT(i),"ALT")},l=a.GATE;return l&&(o.GATE=()=>l(i)),o}))}}function dIe(t,e){if(e.elements.length===1)return n0(t,e.elements[0]);let r=[];for(let l of e.elements){let u={ALT:n0(t,l,!0)},h=Q6(l);h&&(u.GATE=Iu(h)),r.push(u)}let n=t.or++,i=s((l,u)=>{let h=u.getRuleStack().join("-");return`uGroup_${l}_${h}`},"idFunc"),a=s(l=>t.parser.alternatives(n,r.map((u,h)=>{let f={ALT:s(()=>!0,"ALT")},d=t.parser;f.ALT=()=>{if(u.ALT(l),!d.isRecording()){let m=i(n,d);d.unorderedGroups.get(m)||d.unorderedGroups.set(m,[]);let g=d.unorderedGroups.get(m);typeof g?.[h]>"u"&&(g[h]=!0)}};let p=u.GATE;return p?f.GATE=()=>p(l):f.GATE=()=>{let m=d.unorderedGroups.get(i(n,d));return!m?.[h]},f})),"alternatives"),o=Iae(t,Q6(e),a,"*");return l=>{o(l),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(n,t.parser))}}function pIe(t,e){let r=e.elements.map(n=>n0(t,n));return n=>r.forEach(i=>i(n))}function Q6(t){if(Kh(t))return t.guardCondition}function Mae(t,e,r=e.terminal){if(r)if(vl(r)&&Sa(r.rule.ref)){let n=t.subrule++;return i=>t.parser.subrule(n,Nae(t,r.rule.ref),e,i)}else if(vl(r)&&Ro(r.rule.ref)){let n=t.consume++,i=mM(t,r.rule.ref.name);return()=>t.parser.consume(n,i,e)}else if(Mo(r)){let n=t.consume++,i=mM(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=e6(e.type.ref),i=n?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+qd(e.type.ref));return Mae(t,e,i)}}function mIe(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 Iae(t,e,r,n){let i=e&&Iu(e);if(!n)if(i){let a=t.or++;return o=>t.parser.alternatives(a,[{ALT:s(()=>r(o),"ALT"),GATE:s(()=>i(o),"GATE")},{ALT:$6(),GATE:s(()=>!i(o),"GATE")}])}else return r;if(n==="*"){let a=t.many++;return o=>t.parser.many(a,{DEF:s(()=>r(o),"DEF"),GATE:i?()=>i(o):void 0})}else if(n==="+"){let a=t.many++;if(i){let o=t.or++;return l=>t.parser.alternatives(o,[{ALT:s(()=>t.parser.atLeastOne(a,{DEF:s(()=>r(l),"DEF")}),"ALT"),GATE:s(()=>i(l),"GATE")},{ALT:$6(),GATE:s(()=>!i(l),"GATE")}])}else return o=>t.parser.atLeastOne(a,{DEF:s(()=>r(o),"DEF")})}else if(n==="?"){let a=t.optional++;return o=>t.parser.optional(a,{DEF:s(()=>r(o),"DEF"),GATE:i?()=>i(o):void 0})}else jh(n)}function Nae(t,e){let r=gIe(t,e),n=t.rules.get(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function gIe(t,e){if(Sa(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,i=e.$type;for(;!Sa(n);)(Kh(n)||Wk(n)||Yk(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 mM(t,e){let r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}var gM=_(()=>{"use strict";Zd();mc();Fk();Es();xl();s(Z6,"createParser");s(lIe,"buildRules");s(n0,"buildElement");s(cIe,"buildAction");s(uIe,"buildRuleCall");s(hIe,"buildRuleCallPredicate");s(Iu,"buildPredicate");s(fIe,"buildAlternatives");s(dIe,"buildUnorderedGroup");s(pIe,"buildGroup");s(Q6,"getGuardCondition");s(Mae,"buildCrossReference");s(mIe,"buildKeyword");s(Iae,"wrap");s(Nae,"getRule");s(gIe,"getRuleName");s(mM,"getToken")});function yM(t){let e=t.Grammar,r=t.parser.Lexer,n=new h2(t);return Z6(e,n,r.definition),n.finalize(),n}var vM=_(()=>{"use strict";f2();gM();s(yM,"createCompletionParser")});function xM(t){let e=Oae(t);return e.finalize(),e}function Oae(t){let e=t.Grammar,r=t.parser.Lexer,n=new u2(t);return Z6(e,n,r.definition)}var bM=_(()=>{"use strict";f2();gM();s(xM,"createLangiumParser");s(Oae,"prepareLangiumParser")});var i0,kM=_(()=>{"use strict";Zd();mc();Ha();xl();_m();Es();i0=class{static{s(this,"DefaultTokenBuilder")}buildTokens(e,r){let n=Wr(Iv(e,!1)),i=this.buildTerminalTokens(n),a=this.buildKeywordTokens(n,i,r);return i.forEach(o=>{let l=o.PATTERN;typeof l=="object"&&l&&"test"in l&&Zk(l)?a.unshift(o):a.push(o)}),a}buildTerminalTokens(e){return e.filter(Ro).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){let r=Am(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,i={name:e.name,PATTERN:n,LINE_BREAKS:!0};return e.hidden&&(i.GROUP=Zk(r)?jn.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")?!0:!!(e.source.includes("?<=")||e.source.includes("?<!"))}regexPatternFunction(e){let r=new RegExp(e,e.flags+"y");return(n,i)=>(r.lastIndex=i,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(Sa).flatMap(i=>gc(i).filter(Mo)).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){return{name:e.value,PATTERN:this.buildKeywordPattern(e,n),LONGER_ALT:this.findLongerAlt(e,r)}}buildKeywordPattern(e,r){return r?new RegExp(jD(e.value)):e.value}findLongerAlt(e,r){return r.reduce((n,i)=>{let a=i?.PATTERN;return a?.source&&KD("^"+a.source+"$",e.value)&&n.push(i),n},[])}}});var a0,xc,wM=_(()=>{"use strict";mc();xl();a0=class{static{s(this,"DefaultValueConverter")}convert(e,r){let n=r.grammarSource;if(Fd(n)&&(n=JD(n)),vl(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 xc.convertInt(r);case"STRING":return xc.convertString(r);case"ID":return xc.convertID(r)}switch((i=oR(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return xc.convertNumber(r);case"boolean":return xc.convertBoolean(r);case"bigint":return xc.convertBigint(r);case"date":return xc.convertDate(r);default:return r}}};(function(t){function e(h){let f="";for(let d=1;d<h.length-1;d++){let p=h.charAt(d);if(p==="\\"){let m=h.charAt(++d);f+=r(m)}else f+=p}return f}s(e,"convertString"),t.convertString=e;function r(h){switch(h){case"b":return"\b";case"f":return"\f";case"n":return`
`;case"r":return"\r";case"t":return" ";case"v":return"\v";case"0":return"\0";default:return h}}s(r,"convertEscapeCharacter");function n(h){return h.charAt(0)==="^"?h.substring(1):h}s(n,"convertID"),t.convertID=n;function i(h){return parseInt(h)}s(i,"convertInt"),t.convertInt=i;function a(h){return BigInt(h)}s(a,"convertBigint"),t.convertBigint=a;function o(h){return new Date(h)}s(o,"convertDate"),t.convertDate=o;function l(h){return Number(h)}s(l,"convertNumber"),t.convertNumber=l;function u(h){return h.toLowerCase()==="true"}s(u,"convertBoolean"),t.convertBoolean=u})(xc||(xc={}))});var SM=is(CM=>{"use strict";Object.defineProperty(CM,"__esModule",{value:!0});var TM;function EM(){if(TM===void 0)throw new Error("No runtime abstraction layer installed");return TM}s(EM,"RAL");(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");TM=r}s(e,"install"),t.install=e})(EM||(EM={}));CM.default=EM});var Fae=is(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.stringArray=_a.array=_a.func=_a.error=_a.number=_a.string=_a.boolean=void 0;function yIe(t){return t===!0||t===!1}s(yIe,"boolean");_a.boolean=yIe;function Pae(t){return typeof t=="string"||t instanceof String}s(Pae,"string");_a.string=Pae;function vIe(t){return typeof t=="number"||t instanceof Number}s(vIe,"number");_a.number=vIe;function xIe(t){return t instanceof Error}s(xIe,"error");_a.error=xIe;function bIe(t){return typeof t=="function"}s(bIe,"func");_a.func=bIe;function Bae(t){return Array.isArray(t)}s(Bae,"array");_a.array=Bae;function kIe(t){return Bae(t)&&t.every(e=>Pae(e))}s(kIe,"stringArray");_a.stringArray=kIe});var AM=is(rg=>{"use strict";Object.defineProperty(rg,"__esModule",{value:!0});rg.Emitter=rg.Event=void 0;var wIe=SM(),zae;(function(t){let e={dispose(){}};t.None=function(){return e}})(zae||(rg.Event=zae={}));var _M=class{static{s(this,"CallbackList")}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:s(()=>this.remove(e,r),"dispose")})}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,a=this._callbacks.length;i<a;i++)if(this._callbacks[i]===e)if(this._contexts[i]===r){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else n=!0;if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let r=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,o=n.length;a<o;a++)try{r.push(n[a].apply(i[a],e))}catch(l){(0,wIe.default)().console.error(l)}return r}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},J6=class t{static{s(this,"Emitter")}constructor(e){this._options=e}get event(){return this._event||(this._event=(e,r,n)=>{this._callbacks||(this._callbacks=new _M),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let i={dispose:s(()=>{this._callbacks&&(this._callbacks.remove(e,r),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};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)}};rg.Emitter=J6;J6._noop=function(){}});var $ae=is(ng=>{"use strict";Object.defineProperty(ng,"__esModule",{value:!0});ng.CancellationTokenSource=ng.CancellationToken=void 0;var TIe=SM(),EIe=Fae(),LM=AM(),ew;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:LM.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:LM.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||EIe.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}s(e,"is"),t.is=e})(ew||(ng.CancellationToken=ew={}));var CIe=Object.freeze(function(t,e){let r=(0,TIe.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),tw=class{static{s(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?CIe:(this._emitter||(this._emitter=new LM.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},DM=class{static{s(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new tw),this._token}cancel(){this._token?this._token.cancel():this._token=ew.Cancelled}dispose(){this._token?this._token instanceof tw&&this._token.dispose():this._token=ew.None}};ng.CancellationTokenSource=DM});var cr={};var No=_(()=>{"use strict";lr(cr,ka($ae(),1))});function MM(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}function Vae(){return RM=Date.now(),new cr.CancellationTokenSource}function Uae(t){Gae=t}function ef(t){return t===bc}async function Di(t){if(t===cr.CancellationToken.None)return;let e=Date.now();if(e-RM>=Gae&&(RM=e,await MM()),t.isCancellationRequested)throw bc}var RM,Gae,bc,Qa,Oo=_(()=>{"use strict";No();s(MM,"delayNextTick");RM=0,Gae=10;s(Vae,"startCancelableOperation");s(Uae,"setInterruptionPeriod");bc=Symbol("OperationCancelled");s(ef,"isOperationCancelled");s(Di,"interruptAndCheck");Qa=class{static{s(this,"Deferred")}constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}}});function IM(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);IM(n,e),IM(i,e);let a=0,o=0,l=0;for(;a<n.length&&o<i.length;)e(n[a],i[o])<=0?t[l++]=n[a++]:t[l++]=i[o++];for(;a<n.length;)t[l++]=n[a++];for(;o<i.length;)t[l++]=i[o++];return t}function qae(t,e,r=0){let n=e?[r]:[];for(let i=0;i<t.length;i++){let a=t.charCodeAt(i);Wae(a)&&(a===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}function Wae(t){return t===13||t===10}function Hae(t){let e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function SIe(t){let e=Hae(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var rw,ig,Yae=_(()=>{"use strict";rw=class t{static{s(this,"FullTextDocument")}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=Hae(n.range),a=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,a)+n.text+this._content.substring(o,this._content.length);let l=Math.max(i.start.line,0),u=Math.max(i.end.line,0),h=this._lineOffsets,f=qae(n.text,!1,a);if(u-l===f.length)for(let p=0,m=f.length;p<m;p++)h[p+l+1]=f[p];else f.length<1e4?h.splice(l+1,u-l,...f):this._lineOffsets=h=h.slice(0,l+1).concat(f,h.slice(u+1));let d=n.text.length-(o-a);if(d!==0)for(let p=l+1+f.length,m=h.length;p<m;p++)h[p]=h[p]+d}else if(t.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=qae(this._content,!0)),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{line:0,character:e};for(;n<i;){let o=Math.floor((n+i)/2);r[o]>e?i=o:n=o+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+1<r.length?r[e.line+1]:this._content.length,a=Math.min(n+e.character,i);return this.ensureBeforeEOL(a,n)}ensureBeforeEOL(e,r){for(;e>r&&Wae(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,o,l){return new rw(i,a,o,l)}s(e,"create"),t.create=e;function r(i,a,o){if(i instanceof rw)return i.update(a,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}s(r,"update"),t.update=r;function n(i,a){let o=i.getText(),l=IM(a.map(SIe),(f,d)=>{let p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p}),u=0,h=[];for(let f of l){let d=i.offsetAt(f.range.start);if(d<u)throw new Error("Overlapping edit");d>u&&h.push(o.substring(u,d)),f.newText.length&&h.push(f.newText),u=i.offsetAt(f.range.end)}return h.push(o.substr(u)),h.join("")}s(n,"applyEdits"),t.applyEdits=n})(ig||(ig={}));s(IM,"mergeSort");s(qae,"computeLineOffsets");s(Wae,"isEOL");s(Hae,"getWellformedRange");s(SIe,"getWellformedEdit")});var Xae,_s,ag,NM=_(()=>{"use strict";(()=>{"use strict";var t={470:i=>{function a(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}s(a,"e");function o(u,h){for(var f,d="",p=0,m=-1,g=0,y=0;y<=u.length;++y){if(y<u.length)f=u.charCodeAt(y);else{if(f===47)break;f=47}if(f===47){if(!(m===y-1||g===1))if(m!==y-1&&g===2){if(d.length<2||p!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var v=d.lastIndexOf("/");if(v!==d.length-1){v===-1?(d="",p=0):p=(d=d.slice(0,v)).length-1-d.lastIndexOf("/"),m=y,g=0;continue}}else if(d.length===2||d.length===1){d="",p=0,m=y,g=0;continue}}h&&(d.length>0?d+="/..":d="..",p=2)}else d.length>0?d+="/"+u.slice(m+1,y):d=u.slice(m+1,y),p=y-m-1;m=y,g=0}else f===46&&g!==-1?++g:g=-1}return d}s(o,"r");var l={resolve:s(function(){for(var u,h="",f=!1,d=arguments.length-1;d>=-1&&!f;d--){var p;d>=0?p=arguments[d]:(u===void 0&&(u=process.cwd()),p=u),a(p),p.length!==0&&(h=p+"/"+h,f=p.charCodeAt(0)===47)}return h=o(h,!f),f?h.length>0?"/"+h:"/":h.length>0?h:"."},"resolve"),normalize:s(function(u){if(a(u),u.length===0)return".";var h=u.charCodeAt(0)===47,f=u.charCodeAt(u.length-1)===47;return(u=o(u,!h)).length!==0||h||(u="."),u.length>0&&f&&(u+="/"),h?"/"+u:u},"normalize"),isAbsolute:s(function(u){return a(u),u.length>0&&u.charCodeAt(0)===47},"isAbsolute"),join:s(function(){if(arguments.length===0)return".";for(var u,h=0;h<arguments.length;++h){var f=arguments[h];a(f),f.length>0&&(u===void 0?u=f:u+="/"+f)}return u===void 0?".":l.normalize(u)},"join"),relative:s(function(u,h){if(a(u),a(h),u===h||(u=l.resolve(u))===(h=l.resolve(h)))return"";for(var f=1;f<u.length&&u.charCodeAt(f)===47;++f);for(var d=u.length,p=d-f,m=1;m<h.length&&h.charCodeAt(m)===47;++m);for(var g=h.length-m,y=p<g?p:g,v=-1,x=0;x<=y;++x){if(x===y){if(g>y){if(h.charCodeAt(m+x)===47)return h.slice(m+x+1);if(x===0)return h.slice(m+x)}else p>y&&(u.charCodeAt(f+x)===47?v=x:x===0&&(v=0));break}var b=u.charCodeAt(f+x);if(b!==h.charCodeAt(m+x))break;b===47&&(v=x)}var k="";for(x=f+v+1;x<=d;++x)x!==d&&u.charCodeAt(x)!==47||(k.length===0?k+="..":k+="/..");return k.length>0?k+h.slice(m+v):(m+=v,h.charCodeAt(m)===47&&++m,h.slice(m))},"relative"),_makeLong:s(function(u){return u},"_makeLong"),dirname:s(function(u){if(a(u),u.length===0)return".";for(var h=u.charCodeAt(0),f=h===47,d=-1,p=!0,m=u.length-1;m>=1;--m)if((h=u.charCodeAt(m))===47){if(!p){d=m;break}}else p=!1;return d===-1?f?"/":".":f&&d===1?"//":u.slice(0,d)},"dirname"),basename:s(function(u,h){if(h!==void 0&&typeof h!="string")throw new TypeError('"ext" argument must be a string');a(u);var f,d=0,p=-1,m=!0;if(h!==void 0&&h.length>0&&h.length<=u.length){if(h.length===u.length&&h===u)return"";var g=h.length-1,y=-1;for(f=u.length-1;f>=0;--f){var v=u.charCodeAt(f);if(v===47){if(!m){d=f+1;break}}else y===-1&&(m=!1,y=f+1),g>=0&&(v===h.charCodeAt(g)?--g==-1&&(p=f):(g=-1,p=y))}return d===p?p=y:p===-1&&(p=u.length),u.slice(d,p)}for(f=u.length-1;f>=0;--f)if(u.charCodeAt(f)===47){if(!m){d=f+1;break}}else p===-1&&(m=!1,p=f+1);return p===-1?"":u.slice(d,p)},"basename"),extname:s(function(u){a(u);for(var h=-1,f=0,d=-1,p=!0,m=0,g=u.length-1;g>=0;--g){var y=u.charCodeAt(g);if(y!==47)d===-1&&(p=!1,d=g+1),y===46?h===-1?h=g:m!==1&&(m=1):h!==-1&&(m=-1);else if(!p){f=g+1;break}}return h===-1||d===-1||m===0||m===1&&h===d-1&&h===f+1?"":u.slice(h,d)},"extname"),format:s(function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(h,f){var d=f.dir||f.root,p=f.base||(f.name||"")+(f.ext||"");return d?d===f.root?d+p:d+"/"+p:p}(0,u)},"format"),parse:s(function(u){a(u);var h={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return h;var f,d=u.charCodeAt(0),p=d===47;p?(h.root="/",f=1):f=0;for(var m=-1,g=0,y=-1,v=!0,x=u.length-1,b=0;x>=f;--x)if((d=u.charCodeAt(x))!==47)y===-1&&(v=!1,y=x+1),d===46?m===-1?m=x:b!==1&&(b=1):m!==-1&&(b=-1);else if(!v){g=x+1;break}return m===-1||y===-1||b===0||b===1&&m===y-1&&m===g+1?y!==-1&&(h.base=h.name=g===0&&p?u.slice(1,y):u.slice(g,y)):(g===0&&p?(h.name=u.slice(1,m),h.base=u.slice(1,y)):(h.name=u.slice(g,m),h.base=u.slice(g,y)),h.ext=u.slice(m,y)),g>0?h.dir=u.slice(0,g-1):p&&(h.dir="/"),h},"parse"),sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l}},e={};function r(i){var a=e[i];if(a!==void 0)return a.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,r),o.exports}s(r,"r"),r.d=(i,a)=>{for(var o in a)r.o(a,o)&&!r.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:a[o]})},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:s(()=>p,"URI"),Utils:s(()=>R,"Utils")}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function u(D,L){if(!D.scheme&&L)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${D.authority}", path: "${D.path}", query: "${D.query}", fragment: "${D.fragment}"}`);if(D.scheme&&!a.test(D.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(D.path){if(D.authority){if(!o.test(D.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(l.test(D.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}s(u,"s");let h="",f="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static{s(this,"f")}static isUri(L){return L instanceof p||!!L&&typeof L.authority=="string"&&typeof L.fragment=="string"&&typeof L.path=="string"&&typeof L.query=="string"&&typeof L.scheme=="string"&&typeof L.fsPath=="string"&&typeof L.with=="function"&&typeof L.toString=="function"}scheme;authority;path;query;fragment;constructor(L,P,M,F,I,O=!1){typeof L=="object"?(this.scheme=L.scheme||h,this.authority=L.authority||h,this.path=L.path||h,this.query=L.query||h,this.fragment=L.fragment||h):(this.scheme=function(z,N){return z||N?z:"file"}(L,O),this.authority=P||h,this.path=function(z,N){switch(z){case"https":case"http":case"file":N?N[0]!==f&&(N=f+N):N=f}return N}(this.scheme,M||h),this.query=F||h,this.fragment=I||h,u(this,O))}get fsPath(){return b(this,!1)}with(L){if(!L)return this;let{scheme:P,authority:M,path:F,query:I,fragment:O}=L;return P===void 0?P=this.scheme:P===null&&(P=h),M===void 0?M=this.authority:M===null&&(M=h),F===void 0?F=this.path:F===null&&(F=h),I===void 0?I=this.query:I===null&&(I=h),O===void 0?O=this.fragment:O===null&&(O=h),P===this.scheme&&M===this.authority&&F===this.path&&I===this.query&&O===this.fragment?this:new g(P,M,F,I,O)}static parse(L,P=!1){let M=d.exec(L);return M?new g(M[2]||h,T(M[4]||h),T(M[5]||h),T(M[7]||h),T(M[9]||h),P):new g(h,h,h,h,h)}static file(L){let P=h;if(i&&(L=L.replace(/\\/g,f)),L[0]===f&&L[1]===f){let M=L.indexOf(f,2);M===-1?(P=L.substring(2),L=f):(P=L.substring(2,M),L=L.substring(M)||f)}return new g("file",P,L,h,h)}static from(L){let P=new g(L.scheme,L.authority,L.path,L.query,L.fragment);return u(P,!0),P}toString(L=!1){return k(this,L)}toJSON(){return this}static revive(L){if(L){if(L instanceof p)return L;{let P=new g(L);return P._formatted=L.external,P._fsPath=L._sep===m?L.fsPath:null,P}}return L}}let m=i?1:void 0;class g extends p{static{s(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(L=!1){return L?k(this,!0):(this._formatted||(this._formatted=k(this,!1)),this._formatted)}toJSON(){let L={$mid:1};return this._fsPath&&(L.fsPath=this._fsPath,L._sep=m),this._formatted&&(L.external=this._formatted),this.path&&(L.path=this.path),this.scheme&&(L.scheme=this.scheme),this.authority&&(L.authority=this.authority),this.query&&(L.query=this.query),this.fragment&&(L.fragment=this.fragment),L}}let y={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(D,L,P){let M,F=-1;for(let I=0;I<D.length;I++){let O=D.charCodeAt(I);if(O>=97&&O<=122||O>=65&&O<=90||O>=48&&O<=57||O===45||O===46||O===95||O===126||L&&O===47||P&&O===91||P&&O===93||P&&O===58)F!==-1&&(M+=encodeURIComponent(D.substring(F,I)),F=-1),M!==void 0&&(M+=D.charAt(I));else{M===void 0&&(M=D.substr(0,I));let z=y[O];z!==void 0?(F!==-1&&(M+=encodeURIComponent(D.substring(F,I)),F=-1),M+=z):F===-1&&(F=I)}}return F!==-1&&(M+=encodeURIComponent(D.substring(F))),M!==void 0?M:D}s(v,"d");function x(D){let L;for(let P=0;P<D.length;P++){let M=D.charCodeAt(P);M===35||M===63?(L===void 0&&(L=D.substr(0,P)),L+=y[M]):L!==void 0&&(L+=D[P])}return L!==void 0?L:D}s(x,"p");function b(D,L){let P;return P=D.authority&&D.path.length>1&&D.scheme==="file"?`//${D.authority}${D.path}`:D.path.charCodeAt(0)===47&&(D.path.charCodeAt(1)>=65&&D.path.charCodeAt(1)<=90||D.path.charCodeAt(1)>=97&&D.path.charCodeAt(1)<=122)&&D.path.charCodeAt(2)===58?L?D.path.substr(1):D.path[1].toLowerCase()+D.path.substr(2):D.path,i&&(P=P.replace(/\//g,"\\")),P}s(b,"m");function k(D,L){let P=L?x:v,M="",{scheme:F,authority:I,path:O,query:z,fragment:N}=D;if(F&&(M+=F,M+=":"),(I||F==="file")&&(M+=f,M+=f),I){let U=I.indexOf("@");if(U!==-1){let $=I.substr(0,U);I=I.substr(U+1),U=$.lastIndexOf(":"),U===-1?M+=P($,!1,!1):(M+=P($.substr(0,U),!1,!1),M+=":",M+=P($.substr(U+1),!1,!0)),M+="@"}I=I.toLowerCase(),U=I.lastIndexOf(":"),U===-1?M+=P(I,!1,!0):(M+=P(I.substr(0,U),!1,!0),M+=I.substr(U))}if(O){if(O.length>=3&&O.charCodeAt(0)===47&&O.charCodeAt(2)===58){let U=O.charCodeAt(1);U>=65&&U<=90&&(O=`/${String.fromCharCode(U+32)}:${O.substr(3)}`)}else if(O.length>=2&&O.charCodeAt(1)===58){let U=O.charCodeAt(0);U>=65&&U<=90&&(O=`${String.fromCharCode(U+32)}:${O.substr(2)}`)}M+=P(O,!0,!1)}return z&&(M+="?",M+=P(z,!1,!1)),N&&(M+="#",M+=L?N:v(N,!1,!1)),M}s(k,"y");function A(D){try{return decodeURIComponent(D)}catch{return D.length>3?D.substr(0,3)+A(D.substr(3)):D}}s(A,"v");let w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(D){return D.match(w)?D.replace(w,L=>A(L)):D}s(T,"C");var C=r(470);let E=C.posix||C,S="/";var R;(function(D){D.joinPath=function(L,...P){return L.with({path:E.join(L.path,...P)})},D.resolvePath=function(L,...P){let M=L.path,F=!1;M[0]!==S&&(M=S+M,F=!0);let I=E.resolve(M,...P);return F&&I[0]===S&&!L.authority&&(I=I.substring(1)),L.with({path:I})},D.dirname=function(L){if(L.path.length===0||L.path===S)return L;let P=E.dirname(L.path);return P.length===1&&P.charCodeAt(0)===46&&(P=""),L.with({path:P})},D.basename=function(L){return E.basename(L.path)},D.extname=function(L){return E.extname(L.path)}})(R||(R={}))})(),Xae=n})();({URI:_s,Utils:ag}=Xae)});var Za,kc=_(()=>{"use strict";NM();(function(t){t.basename=ag.basename,t.dirname=ag.dirname,t.extname=ag.extname,t.joinPath=ag.joinPath,t.resolvePath=ag.resolvePath;function e(n,i){return n?.toString()===i?.toString()}s(e,"equals"),t.equals=e;function r(n,i){let a=typeof n=="string"?n:n.path,o=typeof i=="string"?i:i.path,l=a.split("/").filter(p=>p.length>0),u=o.split("/").filter(p=>p.length>0),h=0;for(;h<l.length&&l[h]===u[h];h++);let f="../".repeat(l.length-h),d=u.slice(h).join("/");return f+d}s(r,"relative"),t.relative=r})(Za||(Za={}))});var un,d2,p2,sg=_(()=>{"use strict";Yae();sg();No();Es();kc();(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"})(un||(un={}));d2=class{static{s(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=cr.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??_s.parse(e.uri),n?this.createAsync(r,e,n):this.create(r,e)}fromString(e,r,n){return n?this.createAsync(r,e,n):this.create(r,e)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r){if(typeof r=="string"){let n=this.parse(e,r);return this.createLangiumDocument(n,e,void 0,r)}else if("$model"in r){let n={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let n=this.parse(e,r.getText());return this.createLangiumDocument(n,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:un.Parsed,references:[],textDocument:n};else{let o=this.createTextDocumentGetter(r,i);a={parseResult:e,uri:r,state:un.Parsed,references:[],get textDocument(){return o()}}}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,o=(i=this.textDocuments)===null||i===void 0?void 0:i.get(e.uri.toString()),l=o?o.getText():await this.fileSystemProvider.readFile(e.uri);if(o)Object.defineProperty(e,"textDocument",{value:o});else{let u=this.createTextDocumentGetter(e.uri,l);Object.defineProperty(e,"textDocument",{get:u})}return a!==l&&(e.parseResult=await this.parseAsync(e.uri,l,r),e.parseResult.value.$document=e),e.state=un.Parsed,e}parse(e,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r)}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=ig.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},p2=class{static{s(this,"DefaultLangiumDocuments")}constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return Wr(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&&(n.state=un.Changed,n.precomputedScopes=void 0,n.references=[],n.diagnostics=void 0),n}deleteDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=un.Changed,this.documentMap.delete(r)),n}}});var m2,OM=_(()=>{"use strict";No();Do();Ha();Oo();sg();m2=class{static{s(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,r=cr.CancellationToken.None){for(let n of Io(e.parseResult.value))await Di(r),Cm(n).forEach(i=>this.doLink(i,e))}doLink(e,r){let n=e.reference;if(n._ref===void 0)try{let i=this.getCandidate(e);if(Nd(i))n._ref=i;else if(n._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)){let a=this.loadAstNode(i);n._ref=a??this.createLinkingError(e,i)}}catch(i){n._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${n.$refText}': ${i}`})}r.references.push(n)}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,o={$refNode:n,$refText:i,get ref(){var l;if($n(this._ref))return this._ref;if(NL(this._nodeDescription)){let u=a.loadAstNode(this._nodeDescription);this._ref=u??a.createLinkingError({reference:o,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){let u=a.getLinkedNode({reference:o,container:e,property:r});if(u.error&&Ai(e).state<un.ComputedScopes)return;this._ref=(l=u.node)!==null&&l!==void 0?l:u.error,this._nodeDescription=u.descr}return $n(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Nd(this._ref)?this._ref:void 0}};return o}getLinkedNode(e){try{let r=this.getCandidate(e);if(Nd(r))return{error:r};let n=this.loadAstNode(r);return n?{node:n,descr:r}:{descr:r,error:this.createLinkingError(e,r)}}catch(r){return{error:Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${e.reference.$refText}': ${r}`})}}}loadAstNode(e){if(e.node)return e.node;let r=this.langiumDocuments().getDocument(e.documentUri);if(r)return this.astNodeLocator.getAstNode(r.parseResult.value,e.path)}createLinkingError(e,r){let n=Ai(e.container);n.state<un.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`);let i=this.reflection.getReferenceType(e);return Object.assign(Object.assign({},e),{message:`Could not resolve reference to ${i} named '${e.reference.$refText}'.`,targetDescription:r})}}});function jae(t){return typeof t.name=="string"}var g2,PM=_(()=>{"use strict";xl();s(jae,"isNamed");g2=class{static{s(this,"DefaultNameProvider")}getName(e){if(jae(e))return e.name}getNameNode(e){return Nv(e.$cstNode,"name")}}});var y2,BM=_(()=>{"use strict";xl();Do();Ha();gl();Es();kc();y2=class{static{s(this,"DefaultReferences")}constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){let r=aR(e),n=e.astNode;if(r&&n){let i=n[r.feature];if(ua(i))return i.ref;if(Array.isArray(i)){for(let a of i)if(ua(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||PL(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=>Za.equals(a.sourceUri,r.documentUri))),n.push(...i),Wr(n)}getReferenceToSelf(e){let r=this.nameProvider.getNameNode(e);if(r){let n=Ai(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:i,targetUri:n.uri,targetPath:i,segment:Pd(r),local:!0}}}}});var wc,s0,og=_(()=>{"use strict";Es();wc=class{static{s(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(let[r,n]of e)this.add(r,n)}get size(){return wm.sum(Wr(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 Wr(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return Wr(this.map.keys())}values(){return Wr(this.map.values()).flat()}entriesGroupedByKey(){return Wr(this.map.entries())}},s0=class{static{s(this,"BiMap")}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 v2,FM=_(()=>{"use strict";No();Ha();og();Oo();v2=class{static{s(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,r=cr.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,r)}async computeExportsForNode(e,r,n=Av,i=cr.CancellationToken.None){let a=[];this.exportNode(e,a,r);for(let o of n(e))await Di(i),this.exportNode(o,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=cr.CancellationToken.None){let n=e.parseResult.value,i=new wc;for(let a of gc(n))await Di(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 lg,x2,_Ie,zM=_(()=>{"use strict";Es();lg=class{static{s(this,"StreamScope")}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)}},x2=class{static{s(this,"MapScope")}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 o=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.set(o,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=Wr(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},_Ie={getElement(){},getAllElements(){return wv}}});var cg,b2,o0,nw,ug,iw=_(()=>{"use strict";cg=class{static{s(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},b2=class extends cg{static{s(this,"SimpleCache")}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()}},o0=class extends cg{static{s(this,"ContextCache")}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}},nw=class extends o0{static{s(this,"DocumentCache")}constructor(e){super(r=>r.toString()),this.onDispose(e.workspace.DocumentBuilder.onUpdate((r,n)=>{let i=r.concat(n);for(let a of i)this.clear(a)}))}},ug=class extends b2{static{s(this,"WorkspaceCache")}constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}});var k2,$M=_(()=>{"use strict";zM();Ha();Es();iw();k2=class{static{s(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new ug(e.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=Ai(e.container).precomputedScopes;if(i){let o=e.container;do{let l=i.get(o);l.length>0&&r.push(Wr(l).filter(u=>this.reflection.isSubtype(u.type,n))),o=o.$container}while(o)}let a=this.getGlobalScope(n,e);for(let o=r.length-1;o>=0;o--)a=this.createScope(r[o],a);return a}createScope(e,r,n){return new lg(Wr(e),r,n)}createScopeForNodes(e,r,n){let i=Wr(e).map(a=>{let o=this.nameProvider.getName(a);if(o)return this.descriptions.createDescription(a,o)}).nonNullable();return new lg(i,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new x2(this.indexManager.allElements(e)))}}});function GM(t){return typeof t.$comment=="string"}function Kae(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}var w2,aw=_(()=>{"use strict";NM();Do();Ha();xl();s(GM,"isAstNodeWithComment");s(Kae,"isIntermediateReference");w2=class{static{s(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r={}){let n=r?.replacer,i=s((o,l)=>this.replacer(o,l,r),"defaultReplacer"),a=n?(o,l)=>n(o,l,i):i;try{return this.currentDocument=Ai(e),JSON.stringify(e,a,r?.space)}finally{this.currentDocument=void 0}}deserialize(e,r={}){let n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:o,uriConverter:l}){var u,h,f,d;if(!this.ignoreProperties.has(e))if(ua(r)){let p=r.ref,m=n?r.$refText:void 0;if(p){let g=Ai(p),y="";this.currentDocument&&this.currentDocument!==g&&(l?y=l(g.uri,r):y=g.uri.toString());let v=this.astNodeLocator.getAstNodePath(p);return{$ref:`${y}#${v}`,$refText:m}}else return{$error:(h=(u=r.error)===null||u===void 0?void 0:u.message)!==null&&h!==void 0?h:"Could not resolve reference",$refText:m}}else if($n(r)){let p;if(a&&(p=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),(!e||r.$document)&&p?.$textRegion&&(p.$textRegion.documentURI=(f=this.currentDocument)===null||f===void 0?void 0:f.uri.toString())),i&&!e&&(p??(p=Object.assign({},r)),p.$sourceText=(d=r.$cstNode)===null||d===void 0?void 0:d.text),o){p??(p=Object.assign({},r));let m=this.commentProvider.getComment(r);m&&(p.$comment=m.replace(/\r/g,""))}return p??r}else return r}addAstNodeRegionWithAssignmentsTo(e){let r=s(n=>({offset:n.offset,end:n.end,length:n.length,range:n.range}),"createDocumentSegment");if(e.$cstNode){let n=e.$textRegion=r(e.$cstNode),i=n.assignments={};return Object.keys(e).filter(a=>!a.startsWith("$")).forEach(a=>{let o=tR(e.$cstNode,a).map(r);o.length!==0&&(i[a]=o)}),e}}linkNode(e,r,n,i,a,o){for(let[u,h]of Object.entries(e))if(Array.isArray(h))for(let f=0;f<h.length;f++){let d=h[f];Kae(d)?h[f]=this.reviveReference(e,u,r,d,n):$n(d)&&this.linkNode(d,r,n,e,u,f)}else Kae(h)?e[u]=this.reviveReference(e,u,r,h,n):$n(h)&&this.linkNode(h,r,n,e,u);let l=e;l.$container=i,l.$containerProperty=a,l.$containerIndex=o}reviveReference(e,r,n,i,a){let o=i.$refText,l=i.$error;if(i.$ref){let u=this.getRefNode(n,i.$ref,a.uriConverter);if($n(u))return o||(o=this.nameProvider.getName(u)),{$refText:o??"",ref:u};l=u}if(l){let u={$refText:o??""};return u.error={container:e,property:r,message:l,reference:u},u}else return}getRefNode(e,r,n){try{let i=r.indexOf("#");if(i===0){let u=this.astNodeLocator.getAstNode(e,r.substring(1));return u||"Could not resolve path: "+r}if(i<0){let u=n?n(r):_s.parse(r),h=this.langiumDocuments.getDocument(u);return h?h.parseResult.value:"Could not find document for URI: "+r}let a=n?n(r.substring(0,i)):_s.parse(r.substring(0,i)),o=this.langiumDocuments.getDocument(a);if(!o)return"Could not find document for URI: "+r;if(i===r.length-1)return o.parseResult.value;let l=this.astNodeLocator.getAstNode(o.parseResult.value,r.substring(i+1));return l||"Could not resolve URI: "+r}catch(i){return String(i)}}}});var T2,VM=_(()=>{"use strict";kc();T2=class{static{s(this,"DefaultServiceRegistry")}register(e){if(!this.singleton&&!this.map){this.singleton=e;return}if(!this.map&&(this.map={},this.singleton)){for(let r of this.singleton.LanguageMetaData.fileExtensions)this.map[r]=this.singleton;this.singleton=void 0}for(let r of e.LanguageMetaData.fileExtensions)this.map[r]!==void 0&&this.map[r]!==e&&console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to '${e.LanguageMetaData.languageId}'.`),this.map[r]=e}getServices(e){if(this.singleton!==void 0)return this.singleton;if(this.map===void 0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let r=Za.extname(e),n=this.map[r];if(!n)throw new Error(`The service registry contains no services for the extension '${r}'.`);return n}get all(){return this.singleton!==void 0?[this.singleton]:this.map!==void 0?Object.values(this.map):[]}}});function sw(t){return{code:t}}var hg,E2,C2=_(()=>{"use strict";og();Oo();Es();s(sw,"diagnosticData");(function(t){t.all=["fast","slow","built-in"]})(hg||(hg={}));E2=class{static{s(this,"ValidationRegistry")}constructor(e){this.entries=new wc,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 o=a;if(Array.isArray(o))for(let l of o){let u={check:this.wrapValidationException(l,r),category:n};this.addEntry(i,u)}else if(typeof o=="function"){let l={check:this.wrapValidationException(o,r),category:n};this.addEntry(i,l)}}}wrapValidationException(e,r){return async(n,i,a)=>{try{await e.call(r,n,i,a)}catch(o){if(ef(o))throw o;console.error("An error occurred during validation:",o);let l=o instanceof Error?o.message:String(o);o instanceof Error&&o.stack&&console.error(o.stack),i("error","An error occurred during validation: "+l,{node:n})}}}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=Wr(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(i=>r.includes(i.category))),n.map(i=>i.check)}}});function Qae(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=Nv(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=nR(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 ow(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)}}var S2,Nu,UM=_(()=>{"use strict";No();xl();Ha();gl();Oo();C2();S2=class{static{s(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,r={},n=cr.CancellationToken.None){let i=e.parseResult,a=[];if(await Di(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(i,a,r),r.stopAfterLexingErrors&&a.some(o=>{var l;return((l=o.data)===null||l===void 0?void 0:l.code)===Nu.LexingError})||(this.processParsingErrors(i,a,r),r.stopAfterParsingErrors&&a.some(o=>{var l;return((l=o.data)===null||l===void 0?void 0:l.code)===Nu.ParsingError}))||(this.processLinkingErrors(e,a,r),r.stopAfterLinkingErrors&&a.some(o=>{var l;return((l=o.data)===null||l===void 0?void 0:l.code)===Nu.LinkingError}))))return a;try{a.push(...await this.validateAst(i.value,r,n))}catch(o){if(ef(o))throw o;console.error("An error occurred during validation:",o)}return await Di(n),a}processLexingErrors(e,r,n){for(let i of e.lexerErrors){let a={severity:ow("error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:sw(Nu.LexingError),source:this.getSource()};r.push(a)}}processParsingErrors(e,r,n){for(let i of e.parserErrors){let a;if(isNaN(i.token.startOffset)){if("previousToken"in i){let o=i.previousToken;if(isNaN(o.startOffset)){let l={line:0,character:0};a={start:l,end:l}}else{let l={line:o.endLine-1,character:o.endColumn};a={start:l,end:l}}}}else a=Tm(i.token);if(a){let o={severity:ow("error"),range:a,message:i.message,data:sw(Nu.ParsingError),source:this.getSource()};r.push(o)}}}processLinkingErrors(e,r,n){for(let i of e.references){let a=i.error;if(a){let o={node:a.container,property:a.property,index:a.index,data:{code:Nu.LinkingError,containerType:a.container.$type,property:a.property,refText:a.reference.$refText}};r.push(this.toDiagnostic("error",a.message,o))}}}async validateAst(e,r,n=cr.CancellationToken.None){let i=[],a=s((o,l,u)=>{i.push(this.toDiagnostic(o,l,u))},"acceptor");return await Promise.all(Io(e).map(async o=>{await Di(n);let l=this.validationRegistry.getChecks(o.$type,r.categories);for(let u of l)await u(o,a,n)})),i}toDiagnostic(e,r,n){return{message:r,range:Qae(n),severity:ow(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};s(Qae,"getDiagnosticRange");s(ow,"toDiagnosticSeverity");(function(t){t.LexingError="lexing-error",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Nu||(Nu={}))});var _2,A2,qM=_(()=>{"use strict";No();Do();Ha();gl();Oo();kc();_2=class{static{s(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n=Ai(e)){r??(r=this.nameProvider.getName(e));let i=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${i} has no name.`);let a,o=s(()=>{var l;return a??(a=Pd((l=this.nameProvider.getNameNode(e))!==null&&l!==void 0?l:e.$cstNode))},"nameSegmentGetter");return{node:e,name:r,get nameSegment(){return o()},selectionSegment:Pd(e.$cstNode),type:e.$type,documentUri:n.uri,path:i}}},A2=class{static{s(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=cr.CancellationToken.None){let n=[],i=e.parseResult.value;for(let a of Io(i))await Di(r),Cm(a).filter(o=>!Nd(o)).forEach(o=>{let l=this.createDescription(o);l&&n.push(l)});return n}createDescription(e){let r=e.reference.$nodeDescription,n=e.reference.$refNode;if(!r||!n)return;let i=Ai(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:Pd(n),local:Za.equals(r.documentUri,i)}}}});var L2,WM=_(()=>{"use strict";L2=class{static{s(this,"DefaultAstNodeLocator")}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 o=a.indexOf(this.indexSeparator);if(o>0){let l=a.substring(0,o),u=parseInt(a.substring(o+1)),h=i[l];return h?.[u]}return i[a]},e)}}});var D2,HM=_(()=>{"use strict";Oo();D2=class{static{s(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new Qa,this.settings={},this.workspaceConfig=!1,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=>{this.updateSectionConfiguration(r,e.settings[r])})}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}`}}});var l0,YM=_(()=>{"use strict";(function(t){function e(r){return{dispose:s(async()=>await r(),"dispose")}}s(e,"create"),t.create=e})(l0||(l0={}))});var R2,XM=_(()=>{"use strict";No();YM();og();Oo();Es();C2();sg();R2=class{static{s(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new wc,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=un.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=cr.CancellationToken.None){var i,a;for(let o of e){let l=o.uri.toString();if(o.state===un.Validated){if(typeof r.validation=="boolean"&&r.validation)o.state=un.IndexedReferences,o.diagnostics=void 0,this.buildState.delete(l);else if(typeof r.validation=="object"){let u=this.buildState.get(l),h=(i=u?.result)===null||i===void 0?void 0:i.validationChecks;if(h){let d=((a=r.validation.categories)!==null&&a!==void 0?a:hg.all).filter(p=>!h.includes(p));d.length>0&&(this.buildState.set(l,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:d})},result:u.result}),o.state=un.IndexedReferences)}}}else this.buildState.delete(l)}this.currentState=un.Changed,await this.emitUpdate(e.map(o=>o.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=cr.CancellationToken.None){this.currentState=un.Changed;for(let o of r)this.langiumDocuments.deleteDocument(o),this.buildState.delete(o.toString()),this.indexManager.remove(o);for(let o of e){if(!this.langiumDocuments.invalidateDocument(o)){let u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o);u.state=un.Changed,this.langiumDocuments.addDocument(u)}this.buildState.delete(o.toString())}let i=Wr(e).concat(r).map(o=>o.toString()).toSet();this.langiumDocuments.all.filter(o=>!i.has(o.uri.toString())&&this.shouldRelink(o,i)).forEach(o=>{this.serviceRegistry.getServices(o.uri).references.Linker.unlink(o),o.state=Math.min(o.state,un.ComputedScopes),o.diagnostics=void 0}),await this.emitUpdate(e,r),await Di(n);let a=this.langiumDocuments.all.filter(o=>{var l;return o.state<un.Linked||!(!((l=this.buildState.get(o.uri.toString()))===null||l===void 0)&&l.completed)}).toArray();await this.buildDocuments(a,this.updateBuildOptions,n)}async emitUpdate(e,r){await Promise.all(this.updateListeners.map(n=>n(e,r)))}shouldRelink(e,r){return e.references.some(n=>n.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),l0.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,un.Parsed,n,a=>this.langiumDocumentFactory.update(a,n)),await this.runCancelable(e,un.IndexedContent,n,a=>this.indexManager.updateContent(a,n)),await this.runCancelable(e,un.ComputedScopes,n,async a=>{let o=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.precomputedScopes=await o.computeLocalScopes(a,n)}),await this.runCancelable(e,un.Linked,n,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,n)),await this.runCancelable(e,un.IndexedReferences,n,a=>this.indexManager.updateReferences(a,n));let i=e.filter(a=>this.shouldValidate(a));await this.runCancelable(i,un.Validated,n,a=>this.validate(a,n));for(let a of e){let o=this.buildState.get(a.uri.toString());o&&(o.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.state<r);for(let o of a)await Di(n),await i(o),o.state=r;await this.notifyBuildPhase(a,r,n),this.currentState=r}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),l0.create(()=>{this.buildPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let i;if(r&&"path"in r?i=r:n=r,n??(n=cr.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(bc):new Promise((a,o)=>{let l=this.onBuildPhase(e,()=>{if(l.dispose(),u.dispose(),i){let h=this.langiumDocuments.getDocument(i);a(h?.uri)}else a(void 0)}),u=n.onCancellationRequested(()=>{l.dispose(),u.dispose(),o(bc)})})}async notifyBuildPhase(e,r,n){if(e.length===0)return;let i=this.buildPhaseListeners.get(r);for(let a of i)await Di(n),await a(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,o=this.getBuildOptions(e).validation,l=typeof o=="object"?o:void 0,u=await a.validateDocument(e,l,r);e.diagnostics?e.diagnostics.push(...u):e.diagnostics=u;let h=this.buildState.get(e.uri.toString());if(h){(n=h.result)!==null&&n!==void 0||(h.result={});let f=(i=l?.categories)!==null&&i!==void 0?i:hg.all;h.result.validationChecks?h.result.validationChecks.push(...f):h.result.validationChecks=[...f]}}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 M2,jM=_(()=>{"use strict";Ha();iw();No();Es();kc();M2=class{static{s(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new o0,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){let n=Ai(e).uri,i=[];return this.referenceIndex.forEach(a=>{a.forEach(o=>{Za.equals(o.targetUri,n)&&o.targetPath===r&&i.push(o)})}),Wr(i)}allElements(e,r){let n=Wr(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(l=>this.astReflection.isSubtype(l.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=cr.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=cr.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 I2,KM=_(()=>{"use strict";No();Oo();kc();I2=class{static{s(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new Qa,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}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=cr.CancellationToken.None){let n=await this.performStartup(e);await Di(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){let r=this.serviceRegistry.all.flatMap(a=>a.LanguageMetaData.fileExtensions),n=[],i=s(a=>{n.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)},"collector");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 _s.parse(e.uri)}async traverseFolder(e,r,n,i){let a=await this.fileSystemProvider.readDirectory(r);await Promise.all(a.map(async o=>{if(this.includeEntry(e,o,n)){if(o.isDirectory)await this.traverseFolder(e,o.uri,n,i);else if(o.isFile){let l=await this.langiumDocuments.getOrCreateDocument(o.uri);i(l)}}}))}includeEntry(e,r,n){let i=Za.basename(r.uri);if(i.startsWith("."))return!1;if(r.isDirectory)return i!=="node_modules"&&i!=="out";if(r.isFile){let a=Za.extname(r.uri);return n.includes(a)}return!1}}});function Zae(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function ZM(t){return t&&"modes"in t&&"defaultMode"in t}function QM(t){return!Zae(t)&&!ZM(t)}var N2,JM=_(()=>{"use strict";Zd();N2=class{static{s(this,"DefaultLexer")}constructor(e){let r=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let n=QM(r)?Object.values(r):r;this.chevrotainLexer=new jn(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var r;let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:(r=n.groups.hidden)!==null&&r!==void 0?r:[]}}toTokenTypeDictionary(e){if(QM(e))return e;let r=ZM(e)?Object.values(e.modes).flat():e,n={};return r.forEach(i=>n[i.name]=i),n}};s(Zae,"isTokenTypeArray");s(ZM,"isIMultiModeLexerDefinition");s(QM,"isTokenTypeDictionary")});function rI(t,e,r){let n,i;typeof t=="string"?(i=e,n=r):(i=t.range.start,n=e),i||(i=Pr.create(0,0));let a=tse(t),o=iI(n),l=LIe({lines:a,position:i,options:o});return NIe({index:0,tokens:l,position:i})}function nI(t,e){let r=iI(e),n=tse(t);if(n.length===0)return!1;let i=n[0],a=n[n.length-1],o=r.start,l=r.end;return!!o?.exec(i)&&!!l?.exec(a)}function tse(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(YD)}function LIe(t){var e,r,n;let i=[],a=t.position.line,o=t.position.character;for(let l=0;l<t.lines.length;l++){let u=l===0,h=l===t.lines.length-1,f=t.lines[l],d=0;if(u&&t.options.start){let m=(e=t.options.start)===null||e===void 0?void 0:e.exec(f);m&&(d=m.index+m[0].length)}else{let m=(r=t.options.line)===null||r===void 0?void 0:r.exec(f);m&&(d=m.index+m[0].length)}if(h){let m=(n=t.options.end)===null||n===void 0?void 0:n.exec(f);m&&(f=f.substring(0,m.index))}if(f=f.substring(0,IIe(f)),tI(f,d)>=f.length){if(i.length>0){let m=Pr.create(a,o);i.push({type:"break",content:"",range:gr.create(m,m)})}}else{Jae.lastIndex=d;let m=Jae.exec(f);if(m){let g=m[0],y=m[1],v=Pr.create(a,o+d),x=Pr.create(a,o+d+g.length);i.push({type:"tag",content:y,range:gr.create(v,x)}),d+=g.length,d=tI(f,d)}if(d<f.length){let g=f.substring(d),y=Array.from(g.matchAll(AIe));i.push(...DIe(y,g,a,o+d))}}a++,o=0}return i.length>0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function DIe(t,e,r,n){let i=[];if(t.length===0){let a=Pr.create(r,n),o=Pr.create(r,n+e.length);i.push({type:"text",content:e,range:gr.create(a,o)})}else{let a=0;for(let l of t){let u=l.index,h=e.substring(a,u);h.length>0&&i.push({type:"text",content:e.substring(a,u),range:gr.create(Pr.create(r,a+n),Pr.create(r,u+n))});let f=h.length+1,d=l[1];if(i.push({type:"inline-tag",content:d,range:gr.create(Pr.create(r,a+f+n),Pr.create(r,a+f+d.length+n))}),f+=d.length,l.length===4){f+=l[2].length;let p=l[3];i.push({type:"text",content:p,range:gr.create(Pr.create(r,a+f+n),Pr.create(r,a+f+p.length+n))})}else i.push({type:"text",content:"",range:gr.create(Pr.create(r,a+f+n),Pr.create(r,a+f+n))});a=u+l[0].length}let o=e.substring(a);o.length>0&&i.push({type:"text",content:o,range:gr.create(Pr.create(r,a+n),Pr.create(r,a+n+o.length))})}return i}function tI(t,e){let r=t.substring(e).match(RIe);return r?e+r.index:t.length}function IIe(t){let e=t.match(MIe);if(e&&typeof e.index=="number")return e.index}function NIe(t){var e,r,n,i;let a=Pr.create(t.position.line,t.position.character);if(t.tokens.length===0)return new lw([],gr.create(a,a));let o=[];for(;t.index<t.tokens.length;){let h=OIe(t,o[o.length-1]);h&&o.push(h)}let l=(r=(e=o[0])===null||e===void 0?void 0:e.range.start)!==null&&r!==void 0?r:a,u=(i=(n=o[o.length-1])===null||n===void 0?void 0:n.range.end)!==null&&i!==void 0?i:a;return new lw(o,gr.create(l,u))}function OIe(t,e){let r=t.tokens[t.index];if(r.type==="tag")return nse(t,!1);if(r.type==="text"||r.type==="inline-tag")return rse(t);PIe(r,e),t.index++}function PIe(t,e){if(e){let r=new cw("",t.range);"inlines"in e?e.inlines.push(r):e.content.inlines.push(r)}}function rse(t){let e=t.tokens[t.index],r=e,n=e,i=[];for(;e&&e.type!=="break"&&e.type!=="tag";)i.push(BIe(t)),n=e,e=t.tokens[t.index];return new P2(i,gr.create(r.range.start,n.range.end))}function BIe(t){return t.tokens[t.index].type==="inline-tag"?nse(t,!0):ise(t)}function nse(t,e){let r=t.tokens[t.index++],n=r.content.substring(1),i=t.tokens[t.index];if(i?.type==="text")if(e){let a=ise(t);return new O2(n,new P2([a],a.range),e,gr.create(r.range.start,a.range.end))}else{let a=rse(t);return new O2(n,a,e,gr.create(r.range.start,a.range.end))}else{let a=r.range;return new O2(n,new P2([],a),e,a)}}function ise(t){let e=t.tokens[t.index++];return new cw(e.content,e.range)}function iI(t){if(!t)return iI({start:"/**",end:"*/",line:"*"});let{start:e,end:r,line:n}=t;return{start:eI(e,!0),end:eI(r,!1),line:eI(n,!0)}}function eI(t,e){if(typeof t=="string"||typeof t=="object"){let r=typeof t=="string"?Ud(t):t.source;return e?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}else return t}function FIe(t,e,r){var n,i;if(t==="linkplain"||t==="linkcode"||t==="link"){let a=e.indexOf(" "),o=e;if(a>0){let u=tI(e,a);o=e.substring(u),e=e.substring(0,a)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(o=`\`${o}\``),(i=(n=r.renderLink)===null||n===void 0?void 0:n.call(r,e,o))!==null&&i!==void 0?i:zIe(e,o)}}function zIe(t,e){try{return _s.parse(t,!0),`[${e}](${t})`}catch{return t}}function ese(t){return t.endsWith(`
`)?`
`:`
`}var Jae,AIe,RIe,MIe,lw,O2,P2,cw,aI=_(()=>{"use strict";hM();_m();kc();s(rI,"parseJSDoc");s(nI,"isJSDoc");s(tse,"getLines");Jae=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,AIe=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;s(LIe,"tokenize");s(DIe,"buildInlineTokens");RIe=/\S/,MIe=/\s*$/;s(tI,"skipWhitespace");s(IIe,"lastCharacter");s(NIe,"parseJSDocComment");s(OIe,"parseJSDocElement");s(PIe,"appendEmptyLine");s(rse,"parseJSDocText");s(BIe,"parseJSDocInline");s(nse,"parseJSDocTag");s(ise,"parseJSDocLine");s(iI,"normalizeOptions");s(eI,"normalizeOption");lw=class{static{s(this,"JSDocCommentImpl")}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+=ese(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+=ese(r)+i}return r.trim()}},O2=class{static{s(this,"JSDocTagImpl")}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=FIe(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}};s(FIe,"renderInlineTag");s(zIe,"renderLinkDefault");P2=class{static{s(this,"JSDocTextImpl")}constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;r<this.inlines.length;r++){let n=this.inlines[r],i=this.inlines[r+1];e+=n.toString(),i&&i.range.start.line>n.range.start.line&&(e+=`
`)}return e}toMarkdown(e){let r="";for(let n=0;n<this.inlines.length;n++){let i=this.inlines[n],a=this.inlines[n+1];r+=i.toMarkdown(e),a&&a.range.start.line>i.range.start.line&&(r+=`
`)}return r}},cw=class{static{s(this,"JSDocLineImpl")}constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}};s(ese,"fillNewlines")});var B2,sI=_(()=>{"use strict";Ha();aI();B2=class{static{s(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let r=this.commentProvider.getComment(e);if(r&&nI(r))return rI(r).toMarkdown({renderLink:s((i,a)=>this.documentationLinkRenderer(e,i,a),"renderLink"),renderTag:s(i=>this.documentationTagRenderer(e,i),"renderTag")})}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 o=a.nameSegment.range.start.line+1,l=a.nameSegment.range.start.character+1,u=a.documentUri.with({fragment:`L${o},${l}`});return`[${n}](${u.toString()})`}else return}documentationTagRenderer(e,r){}findNameInPrecomputedScopes(e,r){let i=Ai(e).precomputedScopes;if(!i)return;let a=e;do{let l=i.get(a).find(u=>u.name===r);if(l)return l;a=a.$container}while(a)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(i=>i.name===r)}}});var F2,oI=_(()=>{"use strict";aw();gl();F2=class{static{s(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return GM(e)?e.$comment:(r=FL(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||r===void 0?void 0:r.text}}});var Kn={};var lI=_(()=>{"use strict";lr(Kn,ka(AM(),1))});var z2,cI,uI,hI=_(()=>{"use strict";Oo();lI();z2=class{static{s(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}},cI=class{static{s(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let e=this.createWorker();e.onReady(()=>{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 Qa,a,o=r.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(l=>{let u=this.hydrator.hydrate(l);i.resolve(u)}).catch(l=>{i.reject(l)}).finally(()=>{o.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 Qa;return e.onCancellationRequested(()=>{let n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(bc)}),this.queue.push(r),r.promise}},uI=class{static{s(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,i){this.onReadyEmitter=new Kn.Emitter,this.deferred=new Qa,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,r(a=>{let o=a;this.deferred.resolve(o),this.unlock()}),n(a=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(bc),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 Qa,this.sendMessage(e),this.deferred.promise}}});var $2,fI=_(()=>{"use strict";No();Oo();$2=class{static{s(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new cr.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let r=new cr.CancellationTokenSource;return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n){let i=new Qa,a={action:r,deferred:i,cancellationToken:n??cr.CancellationToken.None};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){ef(a)?n.resolve(void 0):n.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}});var G2,dI=_(()=>{"use strict";X6();mc();Do();Ha();og();gl();G2=class{static{s(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new s0,this.tokenTypeIdMap=new s0,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map(r=>Object.assign({},r)),parserErrors:e.parserErrors.map(r=>Object.assign({},r)),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){let r=new Map,n=new Map;for(let i of Io(e))r.set(i,{});if(e.$cstNode)for(let i of Od(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 o=[];n[i]=o;for(let l of a)$n(l)?o.push(this.dehydrateAstNode(l,r)):ua(l)?o.push(this.dehydrateReference(l,r)):o.push(l)}else $n(a)?n[i]=this.dehydrateAstNode(a,r):ua(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 kv(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),to(e)?n.content=e.content.map(i=>this.dehydrateCstNode(i,r)):Xh(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,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){let r=new Map,n=new Map;for(let a of Io(e))r.set(a,{});let i;if(e.$cstNode)for(let a of Od(e.$cstNode)){let o;"fullText"in a?(o=new eg(a.fullText),i=o):"content"in a?o=new r0:"tokenType"in a&&(o=this.hydrateCstLeafNode(a)),o&&(n.set(a,o),o.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 o=[];n[i]=o;for(let l of a)$n(l)?o.push(this.setParent(this.hydrateAstNode(l,r),n)):ua(l)?o.push(this.hydrateReference(l,n,i,r)):o.push(l)}else $n(a)?n[i]=this.setParent(this.hydrateAstNode(a,r),n):ua(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),to(i))for(let a of e.content){let o=this.hydrateCstNode(a,r,n++);i.content.push(o)}return i}hydrateCstLeafNode(e){let r=this.getTokenType(e.tokenType),n=e.offset,i=e.length,a=e.startLine,o=e.startColumn,l=e.endLine,u=e.endColumn,h=e.hidden;return new t0(n,i,{start:{line:a,character:o},end:{line:l,character:u}},r,h)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap();let r=this.grammarElementIdMap.getKey(e);if(r)return r;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(let r of Io(this.grammar))Cv(r)&&this.grammarElementIdMap.set(r,e++)}}});function kl(t){return{documentation:{CommentProvider:s(e=>new F2(e),"CommentProvider"),DocumentationProvider:s(e=>new B2(e),"DocumentationProvider")},parser:{AsyncParser:s(e=>new z2(e),"AsyncParser"),GrammarConfig:s(e=>cR(e),"GrammarConfig"),LangiumParser:s(e=>xM(e),"LangiumParser"),CompletionParser:s(e=>yM(e),"CompletionParser"),ValueConverter:s(()=>new a0,"ValueConverter"),TokenBuilder:s(()=>new i0,"TokenBuilder"),Lexer:s(e=>new N2(e),"Lexer"),ParserErrorMessageProvider:s(()=>new tg,"ParserErrorMessageProvider")},workspace:{AstNodeLocator:s(()=>new L2,"AstNodeLocator"),AstNodeDescriptionProvider:s(e=>new _2(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:s(e=>new A2(e),"ReferenceDescriptionProvider")},references:{Linker:s(e=>new m2(e),"Linker"),NameProvider:s(()=>new g2,"NameProvider"),ScopeProvider:s(e=>new k2(e),"ScopeProvider"),ScopeComputation:s(e=>new v2(e),"ScopeComputation"),References:s(e=>new y2(e),"References")},serializer:{Hydrator:s(e=>new G2(e),"Hydrator"),JsonSerializer:s(e=>new w2(e),"JsonSerializer")},validation:{DocumentValidator:s(e=>new S2(e),"DocumentValidator"),ValidationRegistry:s(e=>new E2(e),"ValidationRegistry")},shared:s(()=>t.shared,"shared")}}function wl(t){return{ServiceRegistry:s(()=>new T2,"ServiceRegistry"),workspace:{LangiumDocuments:s(e=>new p2(e),"LangiumDocuments"),LangiumDocumentFactory:s(e=>new d2(e),"LangiumDocumentFactory"),DocumentBuilder:s(e=>new R2(e),"DocumentBuilder"),IndexManager:s(e=>new M2(e),"IndexManager"),WorkspaceManager:s(e=>new I2(e),"WorkspaceManager"),FileSystemProvider:s(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:s(()=>new $2,"WorkspaceLock"),ConfigurationProvider:s(e=>new D2(e),"ConfigurationProvider")}}}var pI=_(()=>{"use strict";uR();vM();bM();kM();wM();OM();PM();BM();FM();$M();aw();VM();UM();C2();qM();WM();HM();XM();sg();jM();KM();JM();sI();oI();f2();hI();fI();dI();s(kl,"createDefaultCoreModule");s(wl,"createDefaultSharedCoreModule")});function Aa(t,e,r,n,i,a,o,l,u){let h=[t,e,r,n,i,a,o,l,u].reduce(uw,{});return lse(h)}function ose(t){if(t&&t[gI])for(let e of Object.values(t))ose(e);return t}function lse(t,e){let r=new Proxy({},{deleteProperty:s(()=>!1,"deleteProperty"),get:s((n,i)=>sse(n,i,t,e||r),"get"),getOwnPropertyDescriptor:s((n,i)=>(sse(n,i,t,e||r),Object.getOwnPropertyDescriptor(n,i)),"getOwnPropertyDescriptor"),has:s((n,i)=>i in t,"has"),ownKeys:s(()=>[...Reflect.ownKeys(t),gI],"ownKeys")});return r[gI]=!0,r}function sse(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]===ase)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){let i=r[e];t[e]=ase;try{t[e]=typeof i=="function"?i(n):lse(i,n)}catch(a){throw t[e]=a instanceof Error?a:void 0,a}return t[e]}else return}function uw(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]=uw(i,n):t[r]=n}}return t}var mI,gI,ase,yI=_(()=>{"use strict";(function(t){t.merge=(e,r)=>uw(uw({},e),r)})(mI||(mI={}));s(Aa,"inject");gI=Symbol("isProxy");s(ose,"eagerLoad");s(lse,"_inject");ase=Symbol();s(sse,"_resolve");s(uw,"_merge")});var cse=_(()=>{"use strict"});var use=_(()=>{"use strict";oI();sI();aI()});var hse=_(()=>{"use strict"});var fse=_(()=>{"use strict";uR();hse()});var dse=_(()=>{"use strict"});var pse=_(()=>{"use strict";hI();vM();X6();bM();f2();JM();dse();kM();wM()});var mse=_(()=>{"use strict";OM();PM();BM();zM();FM();$M()});var gse=_(()=>{"use strict";dI();aw()});var hw,Tl,vI=_(()=>{"use strict";hw=class{static{s(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},Tl={fileSystemProvider:s(()=>new hw,"fileSystemProvider")}});function VIe(){let t=Aa(wl(Tl),GIe),e=Aa(kl({shared:t}),$Ie);return t.ServiceRegistry.register(e),e}function c0(t){var e;let r=VIe(),n=r.serializer.JsonSerializer.deserialize(t);return r.shared.workspace.LangiumDocumentFactory.fromModel(n,_s.parse(`memory://${(e=n.name)!==null&&e!==void 0?e:"grammar"}.langium`)),n}var $Ie,GIe,yse=_(()=>{"use strict";pI();yI();mc();vI();kc();$Ie={Grammar:s(()=>{},"Grammar"),LanguageMetaData:s(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},GIe={AstReflection:s(()=>new Em,"AstReflection")};s(VIe,"createMinimalGrammarServices");s(c0,"loadGrammarFromJson")});var wr={};ur(wr,{AstUtils:()=>jk,BiMap:()=>s0,Cancellation:()=>cr,ContextCache:()=>o0,CstUtils:()=>Bk,DONE_RESULT:()=>Wa,Deferred:()=>Qa,Disposable:()=>l0,DisposableCache:()=>cg,DocumentCache:()=>nw,EMPTY_STREAM:()=>wv,ErrorWithLocation:()=>Bd,GrammarUtils:()=>t6,MultiMap:()=>wc,OperationCancelled:()=>bc,Reduction:()=>wm,RegExpUtils:()=>Jk,SimpleCache:()=>b2,StreamImpl:()=>ro,TreeStreamImpl:()=>pc,URI:()=>_s,UriUtils:()=>Za,WorkspaceCache:()=>ug,assertUnreachable:()=>jh,delayNextTick:()=>MM,interruptAndCheck:()=>Di,isOperationCancelled:()=>ef,loadGrammarFromJson:()=>c0,setInterruptionPeriod:()=>Uae,startCancelableOperation:()=>Vae,stream:()=>Wr});var vse=_(()=>{"use strict";iw();lI();lr(wr,Kn);og();YM();Fk();yse();Oo();Es();kc();Ha();No();gl();xl();_m()});var xse=_(()=>{"use strict";UM();C2()});var bse=_(()=>{"use strict";qM();WM();HM();XM();sg();vI();jM();fI();KM()});var ha={};ur(ha,{AbstractAstReflection:()=>Id,AbstractCstNode:()=>l2,AbstractLangiumParser:()=>c2,AbstractParserErrorMessageProvider:()=>K6,AbstractThreadedAsyncParser:()=>cI,AstUtils:()=>jk,BiMap:()=>s0,Cancellation:()=>cr,CompositeCstNodeImpl:()=>r0,ContextCache:()=>o0,CstNodeBuilder:()=>o2,CstUtils:()=>Bk,DONE_RESULT:()=>Wa,DatatypeSymbol:()=>j6,DefaultAstNodeDescriptionProvider:()=>_2,DefaultAstNodeLocator:()=>L2,DefaultAsyncParser:()=>z2,DefaultCommentProvider:()=>F2,DefaultConfigurationProvider:()=>D2,DefaultDocumentBuilder:()=>R2,DefaultDocumentValidator:()=>S2,DefaultHydrator:()=>G2,DefaultIndexManager:()=>M2,DefaultJsonSerializer:()=>w2,DefaultLangiumDocumentFactory:()=>d2,DefaultLangiumDocuments:()=>p2,DefaultLexer:()=>N2,DefaultLinker:()=>m2,DefaultNameProvider:()=>g2,DefaultReferenceDescriptionProvider:()=>A2,DefaultReferences:()=>y2,DefaultScopeComputation:()=>v2,DefaultScopeProvider:()=>k2,DefaultServiceRegistry:()=>T2,DefaultTokenBuilder:()=>i0,DefaultValueConverter:()=>a0,DefaultWorkspaceLock:()=>$2,DefaultWorkspaceManager:()=>I2,Deferred:()=>Qa,Disposable:()=>l0,DisposableCache:()=>cg,DocumentCache:()=>nw,DocumentState:()=>un,DocumentValidator:()=>Nu,EMPTY_SCOPE:()=>_Ie,EMPTY_STREAM:()=>wv,EmptyFileSystem:()=>Tl,EmptyFileSystemProvider:()=>hw,ErrorWithLocation:()=>Bd,GrammarAST:()=>_v,GrammarUtils:()=>t6,JSDocDocumentationProvider:()=>B2,LangiumCompletionParser:()=>h2,LangiumParser:()=>u2,LangiumParserErrorMessageProvider:()=>tg,LeafCstNodeImpl:()=>t0,MapScope:()=>x2,Module:()=>mI,MultiMap:()=>wc,OperationCancelled:()=>bc,ParserWorker:()=>uI,Reduction:()=>wm,RegExpUtils:()=>Jk,RootCstNodeImpl:()=>eg,SimpleCache:()=>b2,StreamImpl:()=>ro,StreamScope:()=>lg,TextDocument:()=>ig,TreeStreamImpl:()=>pc,URI:()=>_s,UriUtils:()=>Za,ValidationCategory:()=>hg,ValidationRegistry:()=>E2,ValueConverter:()=>xc,WorkspaceCache:()=>ug,assertUnreachable:()=>jh,createCompletionParser:()=>yM,createDefaultCoreModule:()=>kl,createDefaultSharedCoreModule:()=>wl,createGrammarConfig:()=>cR,createLangiumParser:()=>xM,delayNextTick:()=>MM,diagnosticData:()=>sw,eagerLoad:()=>ose,getDiagnosticRange:()=>Qae,inject:()=>Aa,interruptAndCheck:()=>Di,isAstNode:()=>$n,isAstNodeDescription:()=>NL,isAstNodeWithComment:()=>GM,isCompositeCstNode:()=>to,isIMultiModeLexerDefinition:()=>ZM,isJSDoc:()=>nI,isLeafCstNode:()=>Xh,isLinkingError:()=>Nd,isNamed:()=>jae,isOperationCancelled:()=>ef,isReference:()=>ua,isRootCstNode:()=>kv,isTokenTypeArray:()=>Zae,isTokenTypeDictionary:()=>QM,loadGrammarFromJson:()=>c0,parseJSDoc:()=>rI,prepareLangiumParser:()=>Oae,setInterruptionPeriod:()=>Uae,startCancelableOperation:()=>Vae,stream:()=>Wr,toDiagnosticSeverity:()=>ow});var Ou=_(()=>{"use strict";pI();yI();VM();cse();Do();use();fse();pse();mse();gse();vse();lr(ha,wr);xse();bse();mc()});function Sse(t){return Tc.isInstance(t,xI)}function _se(t){return Tc.isInstance(t,bI)}function Ase(t){return Tc.isInstance(t,HIe)}function Lse(t){return Tc.isInstance(t,kI)}function Rse(t){return Tc.isInstance(t,Dse)}function Mse(t){return Tc.isInstance(t,wI)}function Nse(t){return Tc.isInstance(t,Ise)}function Pse(t){return Tc.isInstance(t,Ose)}function Fse(t){return Tc.isInstance(t,Bse)}function $se(t){return Tc.isInstance(t,zse)}var UIe,_t,Cse,xI,qIe,WIe,bI,HIe,kI,Dse,wI,Ise,Ose,Bse,zse,YIe,Gse,Tc,kse,XIe,wse,jIe,Tse,KIe,Ese,QIe,ZIe,JIe,eNe,tNe,Pu,TI,EI,CI,SI,rNe,nNe,iNe,aNe,fw,u0,Ec,sNe,Cc=_(()=>{"use strict";Ou();Ou();Ou();Ou();UIe=Object.defineProperty,_t=s((t,e)=>UIe(t,"name",{value:e,configurable:!0}),"__name"),Cse="Statement",xI="Branch";s(Sse,"isBranch");_t(Sse,"isBranch");qIe="Checkout",WIe="CherryPicking",bI="Commit";s(_se,"isCommit");_t(_se,"isCommit");HIe="Common";s(Ase,"isCommon");_t(Ase,"isCommon");kI="GitGraph";s(Lse,"isGitGraph");_t(Lse,"isGitGraph");Dse="Info";s(Rse,"isInfo");_t(Rse,"isInfo");wI="Merge";s(Mse,"isMerge");_t(Mse,"isMerge");Ise="Packet";s(Nse,"isPacket");_t(Nse,"isPacket");Ose="PacketBlock";s(Pse,"isPacketBlock");_t(Pse,"isPacketBlock");Bse="Pie";s(Fse,"isPie");_t(Fse,"isPie");zse="PieSection";s($se,"isPieSection");_t($se,"isPieSection");YIe="Direction",Gse=class extends Id{static{s(this,"MermaidAstReflection")}static{_t(this,"MermaidAstReflection")}getAllTypes(){return["Branch","Checkout","CherryPicking","Commit","Common","Direction","GitGraph","Info","Merge","Packet","PacketBlock","Pie","PieSection","Statement"]}computeIsSubtype(t,e){switch(t){case xI:case qIe:case WIe:case bI:case wI:return this.isSubtype(Cse,e);case YIe:return this.isSubtype(kI,e);default:return!1}}getReferenceType(t){let e=`${t.container.$type}:${t.property}`;switch(e){default:throw new Error(`${e} is not a valid reference id.`)}}getTypeMetaData(t){switch(t){case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},Tc=new Gse,XIe=_t(()=>kse??(kse=c0('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"InfoGrammar"),jIe=_t(()=>wse??(wse=c0(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),KIe=_t(()=>Tse??(Tse=c0('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"PieGrammar"),QIe=_t(()=>Ese??(Ese=c0(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),ZIe={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},JIe={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},eNe={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},tNe={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Pu={AstReflection:_t(()=>new Gse,"AstReflection")},TI={Grammar:_t(()=>XIe(),"Grammar"),LanguageMetaData:_t(()=>ZIe,"LanguageMetaData"),parser:{}},EI={Grammar:_t(()=>jIe(),"Grammar"),LanguageMetaData:_t(()=>JIe,"LanguageMetaData"),parser:{}},CI={Grammar:_t(()=>KIe(),"Grammar"),LanguageMetaData:_t(()=>eNe,"LanguageMetaData"),parser:{}},SI={Grammar:_t(()=>QIe(),"Grammar"),LanguageMetaData:_t(()=>tNe,"LanguageMetaData"),parser:{}},rNe=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,nNe=/accTitle[\t ]*:([^\n\r]*)/,iNe=/title([\t ][^\n\r]*|)/,aNe={ACC_DESCR:rNe,ACC_TITLE:nNe,TITLE:iNe},fw=class extends a0{static{s(this,"AbstractMermaidValueConverter")}static{_t(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=aNe[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,`
`)}}},u0=class extends fw{static{s(this,"CommonValueConverter")}static{_t(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},Ec=class extends i0{static{s(this,"AbstractMermaidTokenBuilder")}static{_t(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}},sNe=class extends Ec{static{s(this,"CommonTokenBuilder")}static{_t(this,"CommonTokenBuilder")}}});function pw(t=Tl){let e=Aa(wl(t),Pu),r=Aa(kl({shared:e}),SI,dw);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}var oNe,dw,_I=_(()=>{"use strict";Cc();Ou();oNe=class extends Ec{static{s(this,"GitGraphTokenBuilder")}static{_t(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},dw={parser:{TokenBuilder:_t(()=>new oNe,"TokenBuilder"),ValueConverter:_t(()=>new u0,"ValueConverter")}};s(pw,"createGitGraphServices");_t(pw,"createGitGraphServices")});function gw(t=Tl){let e=Aa(wl(t),Pu),r=Aa(kl({shared:e}),TI,mw);return e.ServiceRegistry.register(r),{shared:e,Info:r}}var lNe,mw,AI=_(()=>{"use strict";Cc();Ou();lNe=class extends Ec{static{s(this,"InfoTokenBuilder")}static{_t(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},mw={parser:{TokenBuilder:_t(()=>new lNe,"TokenBuilder"),ValueConverter:_t(()=>new u0,"ValueConverter")}};s(gw,"createInfoServices");_t(gw,"createInfoServices")});function vw(t=Tl){let e=Aa(wl(t),Pu),r=Aa(kl({shared:e}),EI,yw);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}var cNe,yw,LI=_(()=>{"use strict";Cc();Ou();cNe=class extends Ec{static{s(this,"PacketTokenBuilder")}static{_t(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},yw={parser:{TokenBuilder:_t(()=>new cNe,"TokenBuilder"),ValueConverter:_t(()=>new u0,"ValueConverter")}};s(vw,"createPacketServices");_t(vw,"createPacketServices")});function bw(t=Tl){let e=Aa(wl(t),Pu),r=Aa(kl({shared:e}),CI,xw);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}var uNe,hNe,xw,DI=_(()=>{"use strict";Cc();Ou();uNe=class extends Ec{static{s(this,"PieTokenBuilder")}static{_t(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},hNe=class extends fw{static{s(this,"PieValueConverter")}static{_t(this,"PieValueConverter")}runCustomConverter(t,e,r){if(t.name==="PIE_SECTION_LABEL")return e.replace(/"/g,"").trim()}},xw={parser:{TokenBuilder:_t(()=>new uNe,"TokenBuilder"),ValueConverter:_t(()=>new hNe,"ValueConverter")}};s(bw,"createPieServices");_t(bw,"createPieServices")});var Vse={};ur(Vse,{InfoModule:()=>mw,createInfoServices:()=>gw});var Use=_(()=>{"use strict";AI();Cc()});var qse={};ur(qse,{PacketModule:()=>yw,createPacketServices:()=>vw});var Wse=_(()=>{"use strict";LI();Cc()});var Hse={};ur(Hse,{PieModule:()=>xw,createPieServices:()=>bw});var Yse=_(()=>{"use strict";DI();Cc()});var Xse={};ur(Xse,{GitGraphModule:()=>dw,createGitGraphServices:()=>pw});var jse=_(()=>{"use strict";_I();Cc()});async function Bu(t,e){let r=fNe[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);fg[t]||await r();let i=fg[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new dNe(i);return i.value}var fg,fNe,dNe,V2=_(()=>{"use strict";_I();AI();LI();DI();Cc();fg={},fNe={info:_t(async()=>{let{createInfoServices:t}=await Promise.resolve().then(()=>(Use(),Vse)),e=t().Info.parser.LangiumParser;fg.info=e},"info"),packet:_t(async()=>{let{createPacketServices:t}=await Promise.resolve().then(()=>(Wse(),qse)),e=t().Packet.parser.LangiumParser;fg.packet=e},"packet"),pie:_t(async()=>{let{createPieServices:t}=await Promise.resolve().then(()=>(Yse(),Hse)),e=t().Pie.parser.LangiumParser;fg.pie=e},"pie"),gitGraph:_t(async()=>{let{createGitGraphServices:t}=await Promise.resolve().then(()=>(jse(),Xse)),e=t().GitGraph.parser.LangiumParser;fg.gitGraph=e},"gitGraph")};s(Bu,"parse");_t(Bu,"parse");dNe=class extends Error{static{s(this,"MermaidParseError")}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{_t(this,"MermaidParseError")}}});function dg(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var kw=_(()=>{"use strict";s(dg,"populateCommonDb")});var Br,ww=_(()=>{"use strict";Br={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}});var pg,RI=_(()=>{"use strict";pg=class{constructor(e){this.init=e;this.records=this.init()}static{s(this,"ImperativeState")}reset(){this.records=this.init()}}});function MI(){return cA({length:7})}function mNe(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 Kse(t,e,r){let n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}function Zse(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 nt.records.branches)nt.records.branches.get(i)===e.id&&n.push(i);if(V.debug(n.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){let i=nt.records.commits.get(e.parents[0]);Kse(t,e,i),e.parents[1]&&t.push(nt.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){let i=nt.records.commits.get(e.parents[0]);Kse(t,e,i)}}t=mNe(t,i=>i.id),Zse(t)}var pNe,h0,nt,gNe,yNe,vNe,xNe,bNe,kNe,wNe,Qse,TNe,ENe,CNe,SNe,_Ne,Jse,ANe,LNe,DNe,Tw,II=_(()=>{"use strict";it();pr();zs();Qt();Ci();ww();RI();Pl();pNe=dr.gitGraph,h0=s(()=>ms({...pNe,..._r().gitGraph}),"getConfig"),nt=new pg(()=>{let t=h0(),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:{}}});s(MI,"getID");s(mNe,"uniqBy");gNe=s(function(t){nt.records.direction=t},"setDirection"),yNe=s(function(t){V.debug("options str",t),t=t?.trim(),t=t||"{}";try{nt.records.options=JSON.parse(t)}catch(e){V.error("error while parsing gitGraph options",e.message)}},"setOptions"),vNe=s(function(){return nt.records.options},"getOptions"),xNe=s(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags;V.info("commit",e,r,n,i),V.debug("Entering commit:",e,r,n,i);let a=h0();r=$e.sanitizeText(r,a),e=$e.sanitizeText(e,a),i=i?.map(l=>$e.sanitizeText(l,a));let o={id:r||nt.records.seq+"-"+MI(),message:e,seq:nt.records.seq++,type:n??Br.NORMAL,tags:i??[],parents:nt.records.head==null?[]:[nt.records.head.id],branch:nt.records.currBranch};nt.records.head=o,V.info("main branch",a.mainBranchName),nt.records.commits.set(o.id,o),nt.records.branches.set(nt.records.currBranch,o.id),V.debug("in pushCommit "+o.id)},"commit"),bNe=s(function(t){let e=t.name,r=t.order;if(e=$e.sanitizeText(e,h0()),nt.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}")`);nt.records.branches.set(e,nt.records.head!=null?nt.records.head.id:null),nt.records.branchConfig.set(e,{name:e,order:r}),Qse(e),V.debug("in createBranch")},"branch"),kNe=s(t=>{let e=t.branch,r=t.id,n=t.type,i=t.tags,a=h0();e=$e.sanitizeText(e,a),r&&(r=$e.sanitizeText(r,a));let o=nt.records.branches.get(nt.records.currBranch),l=nt.records.branches.get(e),u=o?nt.records.commits.get(o):void 0,h=l?nt.records.commits.get(l):void 0;if(u&&h&&u.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(nt.records.currBranch===e){let p=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},p}if(u===void 0||!u){let p=new Error(`Incorrect usage of "merge". Current branch (${nt.records.currBranch})has no commits`);throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},p}if(!nt.records.branches.has(e)){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},p}if(h===void 0||!h){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},p}if(u===h){let p=new Error('Incorrect usage of "merge". Both branches have same head');throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},p}if(r&&nt.records.commits.has(r)){let p=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom Id");throw p.hash={text:`merge ${e} ${r} ${n} ${i?.join(" ")}`,token:`merge ${e} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},p}let f=l||"",d={id:r||`${nt.records.seq}-${MI()}`,message:`merged branch ${e} into ${nt.records.currBranch}`,seq:nt.records.seq++,parents:nt.records.head==null?[]:[nt.records.head.id,f],branch:nt.records.currBranch,type:Br.MERGE,customType:n,customId:!!r,tags:i??[]};nt.records.head=d,nt.records.commits.set(d.id,d),nt.records.branches.set(nt.records.currBranch,d.id),V.debug(nt.records.branches),V.debug("in mergeBranch")},"merge"),wNe=s(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent;V.debug("Entering cherryPick:",e,r,n);let a=h0();if(e=$e.sanitizeText(e,a),r=$e.sanitizeText(r,a),n=n?.map(u=>$e.sanitizeText(u,a)),i=$e.sanitizeText(i,a),!e||!nt.records.commits.has(e)){let u=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw u.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},u}let o=nt.records.commits.get(e);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(o.parents)&&o.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let l=o.branch;if(o.type===Br.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||!nt.records.commits.has(r)){if(l===nt.records.currBranch){let d=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d}let u=nt.records.branches.get(nt.records.currBranch);if(u===void 0||!u){let d=new Error(`Incorrect usage of "cherry-pick". Current branch (${nt.records.currBranch})has no commits`);throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d}let h=nt.records.commits.get(u);if(h===void 0||!h){let d=new Error(`Incorrect usage of "cherry-pick". Current branch (${nt.records.currBranch})has no commits`);throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d}let f={id:nt.records.seq+"-"+MI(),message:`cherry-picked ${o?.message} into ${nt.records.currBranch}`,seq:nt.records.seq++,parents:nt.records.head==null?[]:[nt.records.head.id,o.id],branch:nt.records.currBranch,type:Br.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${o.id}${o.type===Br.MERGE?`|parent:${i}`:""}`]};nt.records.head=f,nt.records.commits.set(f.id,f),nt.records.branches.set(nt.records.currBranch,f.id),V.debug(nt.records.branches),V.debug("in cherryPick")}},"cherryPick"),Qse=s(function(t){if(t=$e.sanitizeText(t,h0()),nt.records.branches.has(t)){nt.records.currBranch=t;let e=nt.records.branches.get(nt.records.currBranch);e===void 0||!e?nt.records.head=null:nt.records.head=nt.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");s(Kse,"upsert");s(Zse,"prettyPrintCommitHistory");TNe=s(function(){V.debug(nt.records.commits);let t=Jse()[0];Zse([t])},"prettyPrint"),ENe=s(function(){nt.reset(),br()},"clear"),CNe=s(function(){return[...nt.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"),SNe=s(function(){return nt.records.branches},"getBranches"),_Ne=s(function(){return nt.records.commits},"getCommits"),Jse=s(function(){let t=[...nt.records.commits.values()];return t.forEach(function(e){V.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},"getCommitsArray"),ANe=s(function(){return nt.records.currBranch},"getCurrentBranch"),LNe=s(function(){return nt.records.direction},"getDirection"),DNe=s(function(){return nt.records.head},"getHead"),Tw={commitType:Br,getConfig:h0,setDirection:gNe,setOptions:yNe,getOptions:vNe,commit:xNe,branch:bNe,merge:kNe,cherryPick:wNe,checkout:Qse,prettyPrint:TNe,clear:ENe,getBranchesAsObjArray:CNe,getBranches:SNe,getCommits:_Ne,getCommitsArray:Jse,getCurrentBranch:ANe,getDirection:LNe,getHead:DNe,setAccTitle:Ar,getAccTitle:Gr,getAccDescription:Ur,setAccDescription:Vr,setDiagramTitle:an,getDiagramTitle:Qr}});var RNe,MNe,INe,NNe,ONe,PNe,BNe,eoe,toe=_(()=>{"use strict";V2();it();kw();II();ww();RNe=s((t,e)=>{dg(t,e),t.dir&&e.setDirection(t.dir);for(let r of t.statements)MNe(r,e)},"populate"),MNe=s((t,e)=>{let n={Commit:s(i=>e.commit(INe(i)),"Commit"),Branch:s(i=>e.branch(NNe(i)),"Branch"),Merge:s(i=>e.merge(ONe(i)),"Merge"),Checkout:s(i=>e.checkout(PNe(i)),"Checkout"),CherryPicking:s(i=>e.cherryPick(BNe(i)),"CherryPicking")}[t.$type];n?n(t):V.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),INe=s(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?Br[t.type]:Br.NORMAL,tags:t.tags??void 0}),"parseCommit"),NNe=s(t=>({name:t.name,order:t.order??0}),"parseBranch"),ONe=s(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?Br[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),PNe=s(t=>t.branch,"parseCheckout"),BNe=s(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),eoe={parse:s(async t=>{let e=await Bu("gitGraph",t);V.debug(e),RNe(e,Tw)},"parse")}});var FNe,Po,rf,nf,Sc,Fu,f0,As,Ls,Ew,U2,Cw,tf,yr,zNe,noe,ioe,$Ne,GNe,VNe,UNe,qNe,WNe,HNe,YNe,XNe,jNe,KNe,QNe,roe,ZNe,q2,JNe,eOe,tOe,rOe,nOe,aoe,soe=_(()=>{"use strict";Xt();gt();it();pr();ww();FNe=le(),Po=FNe?.gitGraph,rf=10,nf=40,Sc=4,Fu=2,f0=8,As=new Map,Ls=new Map,Ew=30,U2=new Map,Cw=[],tf=0,yr="LR",zNe=s(()=>{As.clear(),Ls.clear(),U2.clear(),tf=0,Cw=[],yr="LR"},"clear"),noe=s(t=>{let e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/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"),ioe=s(t=>{let e,r,n;return yr==="BT"?(r=s((i,a)=>i<=a,"comparisonFunc"),n=1/0):(r=s((i,a)=>i>=a,"comparisonFunc"),n=0),t.forEach(i=>{let a=yr==="TB"||yr=="BT"?Ls.get(i)?.y:Ls.get(i)?.x;a!==void 0&&r(a,n)&&(e=i,n=a)}),e},"findClosestParent"),$Ne=s(t=>{let e="",r=1/0;return t.forEach(n=>{let i=Ls.get(n).y;i<=r&&(e=n,r=i)}),e||void 0},"findClosestParentBT"),GNe=s((t,e,r)=>{let n=r,i=r,a=[];t.forEach(o=>{let l=e.get(o);if(!l)throw new Error(`Commit not found for key ${o}`);l.parents.length?(n=UNe(l),i=Math.max(n,i)):a.push(l),qNe(l,n)}),n=i,a.forEach(o=>{WNe(o,n,r)}),t.forEach(o=>{let l=e.get(o);if(l?.parents.length){let u=$Ne(l.parents);n=Ls.get(u).y-nf,n<=i&&(i=n);let h=As.get(l.branch).pos,f=n-rf;Ls.set(l.id,{x:h,y:f})}})},"setParallelBTPos"),VNe=s(t=>{let e=ioe(t.parents.filter(n=>n!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);let r=Ls.get(e)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),UNe=s(t=>VNe(t)+nf,"calculateCommitPosition"),qNe=s((t,e)=>{let r=As.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);let n=r.pos,i=e+rf;return Ls.set(t.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),WNe=s((t,e,r)=>{let n=As.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);let i=e+r,a=n.pos;Ls.set(t.id,{x:a,y:i})},"setRootPosition"),HNe=s((t,e,r,n,i,a)=>{if(a===Br.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%f0} ${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%f0} ${n}-inner`);else if(a===Br.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 o=t.append("circle");if(o.attr("cx",r.x),o.attr("cy",r.y),o.attr("r",e.type===Br.MERGE?9:10),o.attr("class",`commit ${e.id} commit${i%f0}`),a===Br.MERGE){let l=t.append("circle");l.attr("cx",r.x),l.attr("cy",r.y),l.attr("r",6),l.attr("class",`commit ${n} ${e.id} commit${i%f0}`)}a===Br.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%f0}`)}},"drawCommitBullet"),YNe=s((t,e,r,n)=>{if(e.type!==Br.CHERRY_PICK&&(e.customId&&e.type===Br.MERGE||e.type!==Br.MERGE)&&Po?.showCommitLabel){let i=t.append("g"),a=i.insert("rect").attr("class","commit-label-bkg"),o=i.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),l=o.node()?.getBBox();if(l&&(a.attr("x",r.posWithOffset-l.width/2-Fu).attr("y",r.y+13.5).attr("width",l.width+2*Fu).attr("height",l.height+2*Fu),yr==="TB"||yr==="BT"?(a.attr("x",r.x-(l.width+4*Sc+5)).attr("y",r.y-12),o.attr("x",r.x-(l.width+4*Sc)).attr("y",r.y+l.height-12)):o.attr("x",r.posWithOffset-l.width/2),Po.rotateCommitLabel))if(yr==="TB"||yr==="BT")o.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let u=-7.5-(l.width+10)/25*9.5,h=10+l.width/25*8.5;i.attr("transform","translate("+u+", "+h+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),XNe=s((t,e,r,n)=>{if(e.tags.length>0){let i=0,a=0,o=0,l=[];for(let u of e.tags.reverse()){let h=t.insert("polygon"),f=t.append("circle"),d=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(u),p=d.node()?.getBBox();if(!p)throw new Error("Tag bbox not found");a=Math.max(a,p.width),o=Math.max(o,p.height),d.attr("x",r.posWithOffset-p.width/2),l.push({tag:d,hole:f,rect:h,yOffset:i}),i+=20}for(let{tag:u,hole:h,rect:f,yOffset:d}of l){let p=o/2,m=r.y-19.2-d;if(f.attr("class","tag-label-bkg").attr("points",`
${n-a/2-Sc/2},${m+Fu}
${n-a/2-Sc/2},${m-Fu}
${r.posWithOffset-a/2-Sc},${m-p-Fu}
${r.posWithOffset+a/2+Sc},${m-p-Fu}
${r.posWithOffset+a/2+Sc},${m+p+Fu}
${r.posWithOffset-a/2-Sc},${m+p+Fu}`),h.attr("cy",m).attr("cx",n-a/2+Sc/2).attr("r",1.5).attr("class","tag-hole"),yr==="TB"||yr==="BT"){let g=n+d;f.attr("class","tag-label-bkg").attr("points",`
${r.x},${g+2}
${r.x},${g-2}
${r.x+rf},${g-p-2}
${r.x+rf+a+4},${g-p-2}
${r.x+rf+a+4},${g+p+2}
${r.x+rf},${g+p+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),h.attr("cx",r.x+Sc/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),jNe=s(t=>{switch(t.customType??t.type){case Br.NORMAL:return"commit-normal";case Br.REVERSE:return"commit-reverse";case Br.HIGHLIGHT:return"commit-highlight";case Br.MERGE:return"commit-merge";case Br.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),KNe=s((t,e,r,n)=>{let i={x:0,y:0};if(t.parents.length>0){let a=ioe(t.parents);if(a){let o=n.get(a)??i;return e==="TB"?o.y+nf:e==="BT"?(n.get(t.id)??i).y-nf:o.x+nf}}else return e==="TB"?Ew:e==="BT"?(n.get(t.id)??i).y-nf:0;return 0},"calculatePosition"),QNe=s((t,e,r)=>{let n=yr==="BT"&&r?e:e+rf,i=yr==="TB"||yr==="BT"?n:As.get(t.branch)?.pos,a=yr==="TB"||yr==="BT"?As.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"),roe=s((t,e,r)=>{if(!Po)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=yr==="TB"||yr==="BT"?Ew:0,o=[...e.keys()],l=Po?.parallelCommits??!1,u=s((f,d)=>{let p=e.get(f)?.seq,m=e.get(d)?.seq;return p!==void 0&&m!==void 0?p-m:0},"sortKeys"),h=o.sort(u);yr==="BT"&&(l&&GNe(h,e,a),h=h.reverse()),h.forEach(f=>{let d=e.get(f);if(!d)throw new Error(`Commit not found for key ${f}`);l&&(a=KNe(d,yr,a,Ls));let p=QNe(d,a,l);if(r){let m=jNe(d),g=d.customType??d.type,y=As.get(d.branch)?.index??0;HNe(n,d,p,m,y,g),YNe(i,d,p,a),XNe(i,d,p,a)}yr==="TB"||yr==="BT"?Ls.set(d.id,{x:p.x,y:p.posWithOffset}):Ls.set(d.id,{x:p.posWithOffset,y:p.y}),a=yr==="BT"&&l?a+nf:a+nf+rf,a>tf&&(tf=a)})},"drawCommits"),ZNe=s((t,e,r,n,i)=>{let o=(yr==="TB"||yr==="BT"?r.x<n.x:r.y<n.y)?e.branch:t.branch,l=s(h=>h.branch===o,"isOnBranchToGetCurve"),u=s(h=>h.seq>t.seq&&h.seq<e.seq,"isBetweenCommits");return[...i.values()].some(h=>u(h)&&l(h))},"shouldRerouteArrow"),q2=s((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;if(r>5)return n;if(Cw.every(o=>Math.abs(o-n)>=10))return Cw.push(n),n;let a=Math.abs(t-e);return q2(t,e-a/5,r+1)},"findLane"),JNe=s((t,e,r,n)=>{let i=Ls.get(e.id),a=Ls.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 o=ZNe(e,r,i,a,n),l="",u="",h=0,f=0,d=As.get(r.branch)?.index;r.type===Br.MERGE&&e.id!==r.parents[0]&&(d=As.get(e.branch)?.index);let p;if(o){l="A 10 10, 0, 0, 0,",u="A 10 10, 0, 0, 1,",h=10,f=10;let m=i.y<a.y?q2(i.y,a.y):q2(a.y,i.y),g=i.x<a.x?q2(i.x,a.x):q2(a.x,i.x);yr==="TB"?i.x<a.x?p=`M ${i.x} ${i.y} L ${g-h} ${i.y} ${u} ${g} ${i.y+f} L ${g} ${a.y-h} ${l} ${g+f} ${a.y} L ${a.x} ${a.y}`:(d=As.get(e.branch)?.index,p=`M ${i.x} ${i.y} L ${g+h} ${i.y} ${l} ${g} ${i.y+f} L ${g} ${a.y-h} ${u} ${g-f} ${a.y} L ${a.x} ${a.y}`):yr==="BT"?i.x<a.x?p=`M ${i.x} ${i.y} L ${g-h} ${i.y} ${l} ${g} ${i.y-f} L ${g} ${a.y+h} ${u} ${g+f} ${a.y} L ${a.x} ${a.y}`:(d=As.get(e.branch)?.index,p=`M ${i.x} ${i.y} L ${g+h} ${i.y} ${u} ${g} ${i.y-f} L ${g} ${a.y+h} ${l} ${g-f} ${a.y} L ${a.x} ${a.y}`):i.y<a.y?p=`M ${i.x} ${i.y} L ${i.x} ${m-h} ${l} ${i.x+f} ${m} L ${a.x-h} ${m} ${u} ${a.x} ${m+f} L ${a.x} ${a.y}`:(d=As.get(e.branch)?.index,p=`M ${i.x} ${i.y} L ${i.x} ${m+h} ${u} ${i.x+f} ${m} L ${a.x-h} ${m} ${l} ${a.x} ${m-f} L ${a.x} ${a.y}`)}else l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,yr==="TB"?(i.x<a.x&&(r.type===Br.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${l} ${i.x+f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${u} ${a.x} ${i.y+f} L ${a.x} ${a.y}`),i.x>a.x&&(l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,r.type===Br.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${u} ${i.x-f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x+h} ${i.y} ${l} ${a.x} ${i.y+f} L ${a.x} ${a.y}`),i.x===a.x&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):yr==="BT"?(i.x<a.x&&(r.type===Br.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${u} ${i.x+f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`),i.x>a.x&&(l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,r.type===Br.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${l} ${i.x-f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`),i.x===a.x&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.y<a.y&&(r.type===Br.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${u} ${a.x} ${i.y+f} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${l} ${i.x+f} ${a.y} L ${a.x} ${a.y}`),i.y>a.y&&(r.type===Br.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${u} ${i.x+f} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(p===void 0)throw new Error("Line definition not found");t.append("path").attr("d",p).attr("class","arrow arrow"+d%f0)},"drawArrow"),eOe=s((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=>{JNe(r,e.get(a),i,e)})})},"drawArrows"),tOe=s((t,e)=>{let r=t.append("g");e.forEach((n,i)=>{let a=i%f0,o=As.get(n.name)?.pos;if(o===void 0)throw new Error(`Position not found for branch ${n.name}`);let l=r.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",tf),l.attr("y2",o),l.attr("class","branch branch"+a),yr==="TB"?(l.attr("y1",Ew),l.attr("x1",o),l.attr("y2",tf),l.attr("x2",o)):yr==="BT"&&(l.attr("y1",tf),l.attr("x1",o),l.attr("y2",Ew),l.attr("x2",o)),Cw.push(o);let u=n.name,h=noe(u),f=r.insert("rect"),p=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);p.node().appendChild(h);let m=h.getBBox();f.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(Po?.rotateCommitLabel===!0?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),p.attr("transform","translate("+(-m.width-14-(Po?.rotateCommitLabel===!0?30:0))+", "+(o-m.height/2-1)+")"),yr==="TB"?(f.attr("x",o-m.width/2-10).attr("y",0),p.attr("transform","translate("+(o-m.width/2-5)+", 0)")):yr==="BT"?(f.attr("x",o-m.width/2-10).attr("y",tf),p.attr("transform","translate("+(o-m.width/2-5)+", "+tf+")")):f.attr("transform","translate(-19, "+(o-m.height/2)+")")})},"drawBranches"),rOe=s(function(t,e,r,n,i){return As.set(t,{pos:e,index:r}),e+=50+(i?40:0)+(yr==="TB"||yr==="BT"?n.width/2:0),e},"setBranchPosition"),nOe=s(function(t,e,r,n){if(zNe(),V.debug("in gitgraph renderer",t+`
`,"id:",e,r),!Po)throw new Error("GitGraph config not found");let i=Po.rotateCommitLabel??!1,a=n.db;U2=a.getCommits();let o=a.getBranchesAsObjArray();yr=a.getDirection();let l=Me(`[id="${e}"]`),u=0;o.forEach((h,f)=>{let d=noe(h.name),p=l.append("g"),m=p.insert("g").attr("class","branchLabel"),g=m.insert("g").attr("class","label branch-label");g.node()?.appendChild(d);let y=d.getBBox();u=rOe(h.name,u,f,y,i),g.remove(),m.remove(),p.remove()}),roe(l,U2,!1),Po.showBranches&&tOe(l,o),eOe(l,U2),roe(l,U2,!0),dt.insertTitle(l,"gitTitleText",Po.titleTopMargin??0,a.getDiagramTitle()),mC(void 0,l,Po.diagramPadding,Po.useMaxWidth)},"draw"),aoe={draw:nOe}});var iOe,ooe,loe=_(()=>{"use strict";iOe=s(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"),ooe=iOe});var coe={};ur(coe,{diagram:()=>aOe});var aOe,uoe=_(()=>{"use strict";toe();II();soe();loe();aOe={parser:eoe,db:Tw,renderer:aoe,styles:ooe}});var NI,doe,poe=_(()=>{"use strict";NI=function(){var t=s(function(P,M,F,I){for(F=F||{},I=P.length;I--;F[P[I]]=M);return F},"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],o=[1,30],l=[1,31],u=[1,32],h=[1,33],f=[1,34],d=[1,9],p=[1,10],m=[1,11],g=[1,12],y=[1,13],v=[1,14],x=[1,15],b=[1,16],k=[1,19],A=[1,20],w=[1,21],T=[1,22],C=[1,23],E=[1,25],S=[1,35],R={trace:s(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:s(function(M,F,I,O,z,N,U){var $=N.length-1;switch(z){case 1:return N[$-1];case 2:this.$=[];break;case 3:N[$-1].push(N[$]),this.$=N[$-1];break;case 4:case 5:this.$=N[$];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(N[$].substr(11)),this.$=N[$].substr(11);break;case 18:O.enableInclusiveEndDates(),this.$=N[$].substr(18);break;case 19:O.TopAxis(),this.$=N[$].substr(8);break;case 20:O.setAxisFormat(N[$].substr(11)),this.$=N[$].substr(11);break;case 21:O.setTickInterval(N[$].substr(13)),this.$=N[$].substr(13);break;case 22:O.setExcludes(N[$].substr(9)),this.$=N[$].substr(9);break;case 23:O.setIncludes(N[$].substr(9)),this.$=N[$].substr(9);break;case 24:O.setTodayMarker(N[$].substr(12)),this.$=N[$].substr(12);break;case 27:O.setDiagramTitle(N[$].substr(6)),this.$=N[$].substr(6);break;case 28:this.$=N[$].trim(),O.setAccTitle(this.$);break;case 29:case 30:this.$=N[$].trim(),O.setAccDescription(this.$);break;case 31:O.addSection(N[$].substr(8)),this.$=N[$].substr(8);break;case 33:O.addTask(N[$-1],N[$]),this.$="task";break;case 34:this.$=N[$-1],O.setClickEvent(N[$-1],N[$],null);break;case 35:this.$=N[$-2],O.setClickEvent(N[$-2],N[$-1],N[$]);break;case 36:this.$=N[$-2],O.setClickEvent(N[$-2],N[$-1],null),O.setLink(N[$-2],N[$]);break;case 37:this.$=N[$-3],O.setClickEvent(N[$-3],N[$-2],N[$-1]),O.setLink(N[$-3],N[$]);break;case 38:this.$=N[$-2],O.setClickEvent(N[$-2],N[$],null),O.setLink(N[$-2],N[$-1]);break;case 39:this.$=N[$-3],O.setClickEvent(N[$-3],N[$-1],N[$]),O.setLink(N[$-3],N[$-2]);break;case 40:this.$=N[$-1],O.setLink(N[$-1],N[$]);break;case 41:case 47:this.$=N[$-1]+" "+N[$];break;case 42:case 43:case 45:this.$=N[$-2]+" "+N[$-1]+" "+N[$];break;case 44:case 46:this.$=N[$-3]+" "+N[$-2]+" "+N[$-1]+" "+N[$];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:o,17:l,18:u,19:18,20:h,21:f,22:d,23:p,24:m,25:g,26:y,27:v,28:x,29:b,30:k,31:A,33:w,35:T,36:C,37:24,38:E,40:S},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:a,16:o,17:l,18:u,19:18,20:h,21:f,22:d,23:p,24:m,25:g,26:y,27:v,28:x,29:b,30:k,31:A,33:w,35:T,36:C,37:24,38:E,40:S},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:s(function(M,F){if(F.recoverable)this.trace(M);else{var I=new Error(M);throw I.hash=F,I}},"parseError"),parse:s(function(M){var F=this,I=[0],O=[],z=[null],N=[],U=this.table,$="",W=0,ee=0,te=0,ce=2,Z=1,fe=N.slice.call(arguments,1),ne=Object.create(this.lexer),H={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(H.yy[Q]=this.yy[Q]);ne.setInput(M,H.yy),H.yy.lexer=ne,H.yy.parser=this,typeof ne.yylloc>"u"&&(ne.yylloc={});var K=ne.yylloc;N.push(K);var re=ne.options&&ne.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ie(ue){I.length=I.length-2*ue,z.length=z.length-ue,N.length=N.length-ue}s(ie,"popStack");function ye(){var ue;return ue=O.pop()||ne.lex()||Z,typeof ue!="number"&&(ue instanceof Array&&(O=ue,ue=O.pop()),ue=F.symbols_[ue]||ue),ue}s(ye,"lex");for(var j,De,oe,Re,Pe,Se,Ue={},Oe,_e,he,q;;){if(oe=I[I.length-1],this.defaultActions[oe]?Re=this.defaultActions[oe]:((j===null||typeof j>"u")&&(j=ye()),Re=U[oe]&&U[oe][j]),typeof Re>"u"||!Re.length||!Re[0]){var se="";q=[];for(Oe in U[oe])this.terminals_[Oe]&&Oe>ce&&q.push("'"+this.terminals_[Oe]+"'");ne.showPosition?se="Parse error on line "+(W+1)+`:
`+ne.showPosition()+`
Expecting `+q.join(", ")+", got '"+(this.terminals_[j]||j)+"'":se="Parse error on line "+(W+1)+": Unexpected "+(j==Z?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(se,{text:ne.match,token:this.terminals_[j]||j,line:ne.yylineno,loc:K,expected:q})}if(Re[0]instanceof Array&&Re.length>1)throw new Error("Parse Error: multiple actions possible at state: "+oe+", token: "+j);switch(Re[0]){case 1:I.push(j),z.push(ne.yytext),N.push(ne.yylloc),I.push(Re[1]),j=null,De?(j=De,De=null):(ee=ne.yyleng,$=ne.yytext,W=ne.yylineno,K=ne.yylloc,te>0&&te--);break;case 2:if(_e=this.productions_[Re[1]][1],Ue.$=z[z.length-_e],Ue._$={first_line:N[N.length-(_e||1)].first_line,last_line:N[N.length-1].last_line,first_column:N[N.length-(_e||1)].first_column,last_column:N[N.length-1].last_column},re&&(Ue._$.range=[N[N.length-(_e||1)].range[0],N[N.length-1].range[1]]),Se=this.performAction.apply(Ue,[$,ee,W,H.yy,Re[1],z,N].concat(fe)),typeof Se<"u")return Se;_e&&(I=I.slice(0,-1*_e*2),z=z.slice(0,-1*_e),N=N.slice(0,-1*_e)),I.push(this.productions_[Re[1]][0]),z.push(Ue.$),N.push(Ue._$),he=U[I[I.length-2]][I[I.length-1]],I.push(he);break;case 3:return!0}}return!0},"parse")},D=function(){var P={EOF:1,parseError:s(function(F,I){if(this.yy.parser)this.yy.parser.parseError(F,I);else throw new Error(F)},"parseError"),setInput:s(function(M,F){return this.yy=F||this.yy||{},this._input=M,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:s(function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var F=M.match(/(?:\r\n?|\n).*/g);return F?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M},"input"),unput:s(function(M){var F=M.length,I=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-F),this.offset-=F;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),I.length-1&&(this.yylineno-=I.length-1);var z=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:I?(I.length===O.length?this.yylloc.first_column:0)+O[O.length-I.length].length-I[0].length:this.yylloc.first_column-F},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-F]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(M){this.unput(this.match.slice(M))},"less"),pastInput:s(function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var M=this.pastInput(),F=new Array(M.length+1).join("-");return M+this.upcomingInput()+`
`+F+"^"},"showPosition"),test_match:s(function(M,F){var I,O,z;if(this.options.backtrack_lexer&&(z={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&&(z.yylloc.range=this.yylloc.range.slice(0))),O=M[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+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,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(M[0].length),this.matched+=M[0],I=this.performAction.call(this,this.yy,this,F,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),I)return I;if(this._backtrack){for(var N in z)this[N]=z[N];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,F,I,O;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),N=0;N<z.length;N++)if(I=this._input.match(this.rules[z[N]]),I&&(!F||I[0].length>F[0].length)){if(F=I,O=N,this.options.backtrack_lexer){if(M=this.test_match(I,z[N]),M!==!1)return M;if(this._backtrack){F=!1;continue}else return!1}else if(!this.options.flex)break}return F?(M=this.test_match(F,z[O]),M!==!1?M:!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:s(function(){var F=this.next();return F||this.lex()},"lex"),begin:s(function(F){this.conditionStack.push(F)},"begin"),popState:s(function(){var F=this.conditionStack.length-1;return F>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(F){return F=this.conditionStack.length-1-Math.abs(F||0),F>=0?this.conditionStack[F]:"INITIAL"},"topState"),pushState:s(function(F){this.begin(F)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(F,I,O,z){var N=z;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 P}();R.lexer=D;function L(){this.yy={}}return s(L,"Parser"),L.prototype=R,R.Parser=L,new L}();NI.parser=NI;doe=NI});var moe=is((OI,PI)=>{"use strict";(function(t,e){typeof OI=="object"&&typeof PI<"u"?PI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=e()})(OI,function(){"use strict";var t="day";return function(e,r,n){var i=s(function(l){return l.add(4-l.isoWeekday(),t)},"a"),a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(l){if(!this.$utils().u(l))return this.add(7*(l-this.isoWeek()),t);var u,h,f,d,p=i(this),m=(u=this.isoWeekYear(),h=this.$u,f=(h?n.utc:n)().year(u).startOf("year"),d=4-f.isoWeekday(),f.isoWeekday()>4&&(d+=7),f.add(d,t));return p.diff(m,"week")+1},a.isoWeekday=function(l){return this.$utils().u(l)?this.day()||7:this.day(this.day()%7?l:l-7)};var o=a.startOf;a.startOf=function(l,u){var h=this.$utils(),f=!!h.u(u)||u;return h.p(l)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):o.bind(this)(l,u)}}})});var goe=is((BI,FI)=>{"use strict";(function(t,e){typeof BI=="object"&&typeof FI<"u"?FI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(BI,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|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,n=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},o=s(function(m){return(m=+m)+(m>68?1900:2e3)},"s"),l=s(function(m){return function(g){this[m]=+g}},"a"),u=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var y=g.match(/([+-]|\d\d)/g),v=60*y[1]+(+y[2]||0);return v===0?0:y[0]==="+"?-v:v}(m)}],h=s(function(m){var g=a[m];return g&&(g.indexOf?g:g.s.concat(g.f))},"h"),f=s(function(m,g){var y,v=a.meridiem;if(v){for(var x=1;x<=24;x+=1)if(m.indexOf(v(x,0,g))>-1){y=x>12;break}}else y=m===(g?"pm":"PM");return y},"u"),d={A:[i,function(m){this.afternoon=f(m,!1)}],a:[i,function(m){this.afternoon=f(m,!0)}],S:[/\d/,function(m){this.milliseconds=100*+m}],SS:[r,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[r,l("day")],Do:[i,function(m){var g=a.ordinal,y=m.match(/\d+/);if(this.day=y[0],g)for(var v=1;v<=31;v+=1)g(v).replace(/\[|\]/g,"")===m&&(this.day=v)}],M:[n,l("month")],MM:[r,l("month")],MMM:[i,function(m){var g=h("months"),y=(h("monthsShort")||g.map(function(v){return v.slice(0,3)})).indexOf(m)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[i,function(m){var g=h("months").indexOf(m)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,l("year")],YY:[r,function(m){this.year=o(m)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function p(m){var g,y;g=m,y=a&&a.formats;for(var v=(m=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(C,E,S){var R=S&&S.toUpperCase();return E||y[S]||t[S]||y[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,L,P){return L||P.slice(1)})})).match(e),x=v.length,b=0;b<x;b+=1){var k=v[b],A=d[k],w=A&&A[0],T=A&&A[1];v[b]=T?{regex:w,parser:T}:k.replace(/^\[|\]$/g,"")}return function(C){for(var E={},S=0,R=0;S<x;S+=1){var D=v[S];if(typeof D=="string")R+=D.length;else{var L=D.regex,P=D.parser,M=C.slice(R),F=L.exec(M)[0];P.call(E,F),C=C.replace(F,"")}}return function(I){var O=I.afternoon;if(O!==void 0){var z=I.hours;O?z<12&&(I.hours+=12):z===12&&(I.hours=0),delete I.afternoon}}(E),E}}return s(p,"c"),function(m,g,y){y.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(o=m.parseTwoDigitYear);var v=g.prototype,x=v.parse;v.parse=function(b){var k=b.date,A=b.utc,w=b.args;this.$u=A;var T=w[1];if(typeof T=="string"){var C=w[2]===!0,E=w[3]===!0,S=C||E,R=w[2];E&&(R=w[2]),a=this.$locale(),!C&&R&&(a=y.Ls[R]),this.$d=function(M,F,I){try{if(["x","X"].indexOf(F)>-1)return new Date((F==="X"?1e3:1)*M);var O=p(F)(M),z=O.year,N=O.month,U=O.day,$=O.hours,W=O.minutes,ee=O.seconds,te=O.milliseconds,ce=O.zone,Z=new Date,fe=U||(z||N?1:Z.getDate()),ne=z||Z.getFullYear(),H=0;z&&!N||(H=N>0?N-1:Z.getMonth());var Q=$||0,K=W||0,re=ee||0,ie=te||0;return ce?new Date(Date.UTC(ne,H,fe,Q,K,re,ie+60*ce.offset*1e3)):I?new Date(Date.UTC(ne,H,fe,Q,K,re,ie)):new Date(ne,H,fe,Q,K,re,ie)}catch{return new Date("")}}(k,T,A),this.init(),R&&R!==!0&&(this.$L=this.locale(R).$L),S&&k!=this.format(T)&&(this.$d=new Date("")),a={}}else if(T instanceof Array)for(var D=T.length,L=1;L<=D;L+=1){w[1]=T[L-1];var P=y.apply(this,w);if(P.isValid()){this.$d=P.$d,this.$L=P.$L,this.init();break}L===D&&(this.$d=new Date(""))}else x.call(this,b)}}})});var yoe=is((zI,$I)=>{"use strict";(function(t,e){typeof zI=="object"&&typeof $I<"u"?$I.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e()})(zI,function(){"use strict";return function(t,e){var r=e.prototype,n=r.format;r.format=function(i){var a=this,o=this.$locale();if(!this.isValid())return n.bind(this)(i);var l=this.$utils(),u=(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(h){switch(h){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return o.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return o.ordinal(a.week(),"W");case"w":case"ww":return l.s(a.week(),h==="w"?1:2,"0");case"W":case"WW":return l.s(a.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return l.s(String(a.$H===0?24:a.$H),h==="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 h}});return n.bind(this)(u)}}})});function Ioe(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let a="^\\s*"+i+"\\s*$",o=new RegExp(a);t[0].match(o)&&(e[i]=!0,t.shift(1),n=!0)})}var boe,ao,koe,woe,Toe,voe,_c,qI,WI,HI,W2,H2,YI,XI,Aw,gg,jI,Eoe,KI,Y2,QI,ZI,Lw,GI,cOe,uOe,hOe,fOe,dOe,pOe,mOe,gOe,yOe,vOe,xOe,bOe,kOe,wOe,TOe,EOe,COe,SOe,_Oe,AOe,LOe,DOe,ROe,Coe,MOe,IOe,NOe,Soe,OOe,VI,_oe,Aoe,Sw,mg,POe,BOe,UI,_w,Ri,Loe,FOe,d0,zOe,xoe,$Oe,Doe,GOe,Roe,VOe,UOe,Moe,Noe=_(()=>{"use strict";boe=ka(_p(),1),ao=ka(cb(),1),koe=ka(moe(),1),woe=ka(goe(),1),Toe=ka(yoe(),1);it();gt();pr();Ci();ao.default.extend(koe.default);ao.default.extend(woe.default);ao.default.extend(Toe.default);voe={friday:5,saturday:6},_c="",qI="",HI="",W2=[],H2=[],YI=new Map,XI=[],Aw=[],gg="",jI="",Eoe=["active","done","crit","milestone"],KI=[],Y2=!1,QI=!1,ZI="sunday",Lw="saturday",GI=0,cOe=s(function(){XI=[],Aw=[],gg="",KI=[],Sw=0,UI=void 0,_w=void 0,Ri=[],_c="",qI="",jI="",WI=void 0,HI="",W2=[],H2=[],Y2=!1,QI=!1,GI=0,YI=new Map,br(),ZI="sunday",Lw="saturday"},"clear"),uOe=s(function(t){qI=t},"setAxisFormat"),hOe=s(function(){return qI},"getAxisFormat"),fOe=s(function(t){WI=t},"setTickInterval"),dOe=s(function(){return WI},"getTickInterval"),pOe=s(function(t){HI=t},"setTodayMarker"),mOe=s(function(){return HI},"getTodayMarker"),gOe=s(function(t){_c=t},"setDateFormat"),yOe=s(function(){Y2=!0},"enableInclusiveEndDates"),vOe=s(function(){return Y2},"endDatesAreInclusive"),xOe=s(function(){QI=!0},"enableTopAxis"),bOe=s(function(){return QI},"topAxisEnabled"),kOe=s(function(t){jI=t},"setDisplayMode"),wOe=s(function(){return jI},"getDisplayMode"),TOe=s(function(){return _c},"getDateFormat"),EOe=s(function(t){W2=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),COe=s(function(){return W2},"getIncludes"),SOe=s(function(t){H2=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),_Oe=s(function(){return H2},"getExcludes"),AOe=s(function(){return YI},"getLinks"),LOe=s(function(t){gg=t,XI.push(t)},"addSection"),DOe=s(function(){return XI},"getSections"),ROe=s(function(){let t=xoe(),e=10,r=0;for(;!t&&r<e;)t=xoe(),r++;return Aw=Ri,Aw},"getTasks"),Coe=s(function(t,e,r,n){return n.includes(t.format(e.trim()))?!1:r.includes("weekends")&&(t.isoWeekday()===voe[Lw]||t.isoWeekday()===voe[Lw]+1)||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(t.format(e.trim()))},"isInvalidDate"),MOe=s(function(t){ZI=t},"setWeekday"),IOe=s(function(){return ZI},"getWeekday"),NOe=s(function(t){Lw=t},"setWeekend"),Soe=s(function(t,e,r,n){if(!r.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=(0,ao.default)(t.startTime):i=(0,ao.default)(t.startTime,e,!0),i=i.add(1,"d");let a;t.endTime instanceof Date?a=(0,ao.default)(t.endTime):a=(0,ao.default)(t.endTime,e,!0);let[o,l]=OOe(i,a,e,r,n);t.endTime=o.toDate(),t.renderEndTime=l},"checkTaskDates"),OOe=s(function(t,e,r,n,i){let a=!1,o=null;for(;t<=e;)a||(o=e.toDate()),a=Coe(t,r,n,i),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,o]},"fixTaskDates"),VI=s(function(t,e,r){r=r.trim();let i=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(i!==null){let o=null;for(let u of i.groups.ids.split(" ")){let h=d0(u);h!==void 0&&(!o||h.endTime>o.endTime)&&(o=h)}if(o)return o.endTime;let l=new Date;return l.setHours(0,0,0,0),l}let a=(0,ao.default)(r,e.trim(),!0);if(a.isValid())return a.toDate();{V.debug("Invalid date:"+r),V.debug("With date format:"+e.trim());let o=new Date(r);if(o===void 0||isNaN(o.getTime())||o.getFullYear()<-1e4||o.getFullYear()>1e4)throw new Error("Invalid date:"+r);return o}},"getStartDate"),_oe=s(function(t){let e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),Aoe=s(function(t,e,r,n=!1){r=r.trim();let a=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(a!==null){let f=null;for(let p of a.groups.ids.split(" ")){let m=d0(p);m!==void 0&&(!f||m.startTime<f.startTime)&&(f=m)}if(f)return f.startTime;let d=new Date;return d.setHours(0,0,0,0),d}let o=(0,ao.default)(r,e.trim(),!0);if(o.isValid())return n&&(o=o.add(1,"d")),o.toDate();let l=(0,ao.default)(t),[u,h]=_oe(r);if(!Number.isNaN(u)){let f=l.add(u,h);f.isValid()&&(l=f)}return l.toDate()},"getEndDate"),Sw=0,mg=s(function(t){return t===void 0?(Sw=Sw+1,"task"+Sw):t},"parseId"),POe=s(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;let n=r.split(","),i={};Ioe(n,i,Eoe);for(let o=0;o<n.length;o++)n[o]=n[o].trim();let a="";switch(n.length){case 1:i.id=mg(),i.startTime=t.endTime,a=n[0];break;case 2:i.id=mg(),i.startTime=VI(void 0,_c,n[0]),a=n[1];break;case 3:i.id=mg(n[0]),i.startTime=VI(void 0,_c,n[1]),a=n[2];break;default:}return a&&(i.endTime=Aoe(i.startTime,_c,a,Y2),i.manualEndTime=(0,ao.default)(a,"YYYY-MM-DD",!0).isValid(),Soe(i,_c,H2,W2)),i},"compileData"),BOe=s(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;let n=r.split(","),i={};Ioe(n,i,Eoe);for(let a=0;a<n.length;a++)n[a]=n[a].trim();switch(n.length){case 1:i.id=mg(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:n[0]};break;case 2:i.id=mg(),i.startTime={type:"getStartDate",startData:n[0]},i.endTime={data:n[1]};break;case 3:i.id=mg(n[0]),i.startTime={type:"getStartDate",startData:n[1]},i.endTime={data:n[2]};break;default:}return i},"parseData"),Ri=[],Loe={},FOe=s(function(t,e){let r={section:gg,type:gg,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},n=BOe(_w,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=_w,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.order=GI,GI++;let i=Ri.push(r);_w=r.id,Loe[r.id]=i-1},"addTask"),d0=s(function(t){let e=Loe[t];return Ri[e]},"findTaskById"),zOe=s(function(t,e){let r={section:gg,type:gg,description:t,task:t,classes:[]},n=POe(UI,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,UI=r,Aw.push(r)},"addTaskOrg"),xoe=s(function(){let t=s(function(r){let n=Ri[r],i="";switch(Ri[r].raw.startTime.type){case"prevTaskEnd":{let a=d0(n.prevTaskId);n.startTime=a.endTime;break}case"getStartDate":i=VI(void 0,_c,Ri[r].raw.startTime.startData),i&&(Ri[r].startTime=i);break}return Ri[r].startTime&&(Ri[r].endTime=Aoe(Ri[r].startTime,_c,Ri[r].raw.endTime.data,Y2),Ri[r].endTime&&(Ri[r].processed=!0,Ri[r].manualEndTime=(0,ao.default)(Ri[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Soe(Ri[r],_c,H2,W2))),Ri[r].processed},"compileTask"),e=!0;for(let[r,n]of Ri.entries())t(r),e=e&&n.processed;return e},"compileTasks"),$Oe=s(function(t,e){let r=e;le().securityLevel!=="loose"&&(r=(0,boe.sanitizeUrl)(e)),t.split(",").forEach(function(n){d0(n)!==void 0&&(Roe(n,()=>{window.open(r,"_self")}),YI.set(n,r))}),Doe(t,"clickable")},"setLink"),Doe=s(function(t,e){t.split(",").forEach(function(r){let n=d0(r);n!==void 0&&n.classes.push(e)})},"setClass"),GOe=s(function(t,e,r){if(le().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a<n.length;a++){let o=n[a].trim();o.startsWith('"')&&o.endsWith('"')&&(o=o.substr(1,o.length-2)),n[a]=o}}n.length===0&&n.push(t),d0(t)!==void 0&&Roe(t,()=>{dt.runFunc(e,...n)})},"setClickFun"),Roe=s(function(t,e){KI.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"),VOe=s(function(t,e,r){t.split(",").forEach(function(n){GOe(n,e,r)}),Doe(t,"clickable")},"setClickEvent"),UOe=s(function(t){KI.forEach(function(e){e(t)})},"bindFunctions"),Moe={getConfig:s(()=>le().gantt,"getConfig"),clear:cOe,setDateFormat:gOe,getDateFormat:TOe,enableInclusiveEndDates:yOe,endDatesAreInclusive:vOe,enableTopAxis:xOe,topAxisEnabled:bOe,setAxisFormat:uOe,getAxisFormat:hOe,setTickInterval:fOe,getTickInterval:dOe,setTodayMarker:pOe,getTodayMarker:mOe,setAccTitle:Ar,getAccTitle:Gr,setDiagramTitle:an,getDiagramTitle:Qr,setDisplayMode:kOe,getDisplayMode:wOe,setAccDescription:Vr,getAccDescription:Ur,addSection:LOe,getSections:DOe,getTasks:ROe,addTask:FOe,findTaskById:d0,addTaskOrg:zOe,setIncludes:EOe,getIncludes:COe,setExcludes:SOe,getExcludes:_Oe,setClickEvent:VOe,setLink:$Oe,getLinks:AOe,bindFunctions:UOe,parseDuration:_oe,isInvalidDate:Coe,setWeekday:MOe,getWeekday:IOe,setWeekend:NOe};s(Ioe,"getTaskTags")});var Dw,qOe,Ooe,WOe,zu,HOe,Poe,Boe=_(()=>{"use strict";Dw=ka(cb(),1);it();Xt();Qt();gt();Un();qOe=s(function(){V.debug("Something is calling, setConf, remove the call")},"setConf"),Ooe={monday:wh,tuesday:H4,wednesday:Y4,thursday:Ql,friday:X4,saturday:j4,sunday:nl},WOe=s((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((a,o)=>a.startTime-o.startTime||a.order-o.order),i=0;for(let a of n)for(let o=0;o<r.length;o++)if(a.startTime>=r[o]){r[o]=a.endTime,a.order=o+e,o>i&&(i=o);break}return i},"getMaxIntersections"),HOe=s(function(t,e,r,n){let i=le().gantt,a=le().securityLevel,o;a==="sandbox"&&(o=Me("#i"+e));let l=a==="sandbox"?Me(o.nodes()[0].contentDocument.body):Me("body"),u=a==="sandbox"?o.nodes()[0].contentDocument:document,h=u.getElementById(e);zu=h.parentElement.offsetWidth,zu===void 0&&(zu=1200),i.useWidth!==void 0&&(zu=i.useWidth);let f=n.db.getTasks(),d=[];for(let E of f)d.push(E.type);d=C(d);let p={},m=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let E={};for(let R of f)E[R.section]===void 0?E[R.section]=[R]:E[R.section].push(R);let S=0;for(let R of Object.keys(E)){let D=WOe(E[R],S)+1;S+=D,m+=D*(i.barHeight+i.barGap),p[R]=D}}else{m+=f.length*(i.barHeight+i.barGap);for(let E of d)p[E]=f.filter(S=>S.type===E).length}h.setAttribute("viewBox","0 0 "+zu+" "+m);let g=l.select(`[id="${e}"]`),y=Z4().domain([n4(f,function(E){return E.startTime}),r4(f,function(E){return E.endTime})]).rangeRound([0,zu-i.leftPadding-i.rightPadding]);function v(E,S){let R=E.startTime,D=S.startTime,L=0;return R>D?L=1:R<D&&(L=-1),L}s(v,"taskCompare"),f.sort(v),x(f,zu,m),xr(g,m,zu,i.useMaxWidth),g.append("text").text(n.db.getDiagramTitle()).attr("x",zu/2).attr("y",i.titleTopMargin).attr("class","titleText");function x(E,S,R){let D=i.barHeight,L=D+i.barGap,P=i.topPadding,M=i.leftPadding,F=rl().domain([0,d.length]).range(["#00B9FA","#F95002"]).interpolate(YS);k(L,P,M,S,R,E,n.db.getExcludes(),n.db.getIncludes()),A(M,P,S,R),b(E,L,P,M,D,F,S,R),w(L,P,M,D,F),T(M,P,S,R)}s(x,"makeGantt");function b(E,S,R,D,L,P,M){let I=[...new Set(E.map(U=>U.order))].map(U=>E.find($=>$.order===U));g.append("g").selectAll("rect").data(I).enter().append("rect").attr("x",0).attr("y",function(U,$){return $=U.order,$*S+R-2}).attr("width",function(){return M-i.rightPadding/2}).attr("height",S).attr("class",function(U){for(let[$,W]of d.entries())if(U.type===W)return"section section"+$%i.numberSectionStyles;return"section section0"});let O=g.append("g").selectAll("rect").data(E).enter(),z=n.db.getLinks();if(O.append("rect").attr("id",function(U){return U.id}).attr("rx",3).attr("ry",3).attr("x",function(U){return U.milestone?y(U.startTime)+D+.5*(y(U.endTime)-y(U.startTime))-.5*L:y(U.startTime)+D}).attr("y",function(U,$){return $=U.order,$*S+R}).attr("width",function(U){return U.milestone?L:y(U.renderEndTime||U.endTime)-y(U.startTime)}).attr("height",L).attr("transform-origin",function(U,$){return $=U.order,(y(U.startTime)+D+.5*(y(U.endTime)-y(U.startTime))).toString()+"px "+($*S+R+.5*L).toString()+"px"}).attr("class",function(U){let $="task",W="";U.classes.length>0&&(W=U.classes.join(" "));let ee=0;for(let[ce,Z]of d.entries())U.type===Z&&(ee=ce%i.numberSectionStyles);let te="";return U.active?U.crit?te+=" activeCrit":te=" active":U.done?U.crit?te=" doneCrit":te=" done":U.crit&&(te+=" crit"),te.length===0&&(te=" task"),U.milestone&&(te=" milestone "+te),te+=ee,te+=" "+W,$+te}),O.append("text").attr("id",function(U){return U.id+"-text"}).text(function(U){return U.task}).attr("font-size",i.fontSize).attr("x",function(U){let $=y(U.startTime),W=y(U.renderEndTime||U.endTime);U.milestone&&($+=.5*(y(U.endTime)-y(U.startTime))-.5*L),U.milestone&&(W=$+L);let ee=this.getBBox().width;return ee>W-$?W+ee+1.5*i.leftPadding>M?$+D-5:W+D+5:(W-$)/2+$+D}).attr("y",function(U,$){return $=U.order,$*S+i.barHeight/2+(i.fontSize/2-2)+R}).attr("text-height",L).attr("class",function(U){let $=y(U.startTime),W=y(U.endTime);U.milestone&&(W=$+L);let ee=this.getBBox().width,te="";U.classes.length>0&&(te=U.classes.join(" "));let ce=0;for(let[fe,ne]of d.entries())U.type===ne&&(ce=fe%i.numberSectionStyles);let Z="";return U.active&&(U.crit?Z="activeCritText"+ce:Z="activeText"+ce),U.done?U.crit?Z=Z+" doneCritText"+ce:Z=Z+" doneText"+ce:U.crit&&(Z=Z+" critText"+ce),U.milestone&&(Z+=" milestoneText"),ee>W-$?W+ee+1.5*i.leftPadding>M?te+" taskTextOutsideLeft taskTextOutside"+ce+" "+Z:te+" taskTextOutsideRight taskTextOutside"+ce+" "+Z+" width-"+ee:te+" taskText taskText"+ce+" "+Z+" width-"+ee}),le().securityLevel==="sandbox"){let U;U=Me("#i"+e);let $=U.nodes()[0].contentDocument;O.filter(function(W){return z.has(W.id)}).each(function(W){var ee=$.querySelector("#"+W.id),te=$.querySelector("#"+W.id+"-text");let ce=ee.parentNode;var Z=$.createElement("a");Z.setAttribute("xlink:href",z.get(W.id)),Z.setAttribute("target","_top"),ce.appendChild(Z),Z.appendChild(ee),Z.appendChild(te)})}}s(b,"drawRects");function k(E,S,R,D,L,P,M,F){if(M.length===0&&F.length===0)return;let I,O;for(let{startTime:ee,endTime:te}of P)(I===void 0||ee<I)&&(I=ee),(O===void 0||te>O)&&(O=te);if(!I||!O)return;if((0,Dw.default)(O).diff((0,Dw.default)(I),"year")>5){V.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 z=n.db.getDateFormat(),N=[],U=null,$=(0,Dw.default)(I);for(;$.valueOf()<=O;)n.db.isInvalidDate($,z,M,F)?U?U.end=$:U={start:$,end:$}:U&&(N.push(U),U=null),$=$.add(1,"d");g.append("g").selectAll("rect").data(N).enter().append("rect").attr("id",function(ee){return"exclude-"+ee.start.format("YYYY-MM-DD")}).attr("x",function(ee){return y(ee.start)+R}).attr("y",i.gridLineStartPadding).attr("width",function(ee){let te=ee.end.add(1,"day");return y(te)-y(ee.start)}).attr("height",L-S-i.gridLineStartPadding).attr("transform-origin",function(ee,te){return(y(ee.start)+R+.5*(y(ee.end)-y(ee.start))).toString()+"px "+(te*E+.5*L).toString()+"px"}).attr("class","exclude-range")}s(k,"drawExcludeDays");function A(E,S,R,D){let L=AC(y).tickSize(-D+S+i.gridLineStartPadding).tickFormat(nd(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d")),M=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(M!==null){let F=M[1],I=M[2],O=n.db.getWeekday()||i.weekday;switch(I){case"millisecond":L.ticks(jl.every(F));break;case"second":L.ticks(Vs.every(F));break;case"minute":L.ticks(ou.every(F));break;case"hour":L.ticks(lu.every(F));break;case"day":L.ticks(vo.every(F));break;case"week":L.ticks(Ooe[O].every(F));break;case"month":L.ticks(cu.every(F));break}}if(g.append("g").attr("class","grid").attr("transform","translate("+E+", "+(D-50)+")").call(L).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 F=_C(y).tickSize(-D+S+i.gridLineStartPadding).tickFormat(nd(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(M!==null){let I=M[1],O=M[2],z=n.db.getWeekday()||i.weekday;switch(O){case"millisecond":F.ticks(jl.every(I));break;case"second":F.ticks(Vs.every(I));break;case"minute":F.ticks(ou.every(I));break;case"hour":F.ticks(lu.every(I));break;case"day":F.ticks(vo.every(I));break;case"week":F.ticks(Ooe[z].every(I));break;case"month":F.ticks(cu.every(I));break}}g.append("g").attr("class","grid").attr("transform","translate("+E+", "+S+")").call(F).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}s(A,"makeGrid");function w(E,S){let R=0,D=Object.keys(p).map(L=>[L,p[L]]);g.append("g").selectAll("text").data(D).enter().append(function(L){let P=L[0].split($e.lineBreakRegex),M=-(P.length-1)/2,F=u.createElementNS("http://www.w3.org/2000/svg","text");F.setAttribute("dy",M+"em");for(let[I,O]of P.entries()){let z=u.createElementNS("http://www.w3.org/2000/svg","tspan");z.setAttribute("alignment-baseline","central"),z.setAttribute("x","10"),I>0&&z.setAttribute("dy","1em"),z.textContent=O,F.appendChild(z)}return F}).attr("x",10).attr("y",function(L,P){if(P>0)for(let M=0;M<P;M++)return R+=D[P-1][1],L[1]*E/2+R*E+S;else return L[1]*E/2+S}).attr("font-size",i.sectionFontSize).attr("class",function(L){for(let[P,M]of d.entries())if(L[0]===M)return"sectionTitle sectionTitle"+P%i.numberSectionStyles;return"sectionTitle"})}s(w,"vertLabels");function T(E,S,R,D){let L=n.db.getTodayMarker();if(L==="off")return;let P=g.append("g").attr("class","today"),M=new Date,F=P.append("line");F.attr("x1",y(M)+E).attr("x2",y(M)+E).attr("y1",i.titleTopMargin).attr("y2",D-i.titleTopMargin).attr("class","today"),L!==""&&F.attr("style",L.replace(/,/g,";"))}s(T,"drawToday");function C(E){let S={},R=[];for(let D=0,L=E.length;D<L;++D)Object.prototype.hasOwnProperty.call(S,E[D])||(S[E[D]]=!0,R.push(E[D]));return R}s(C,"checkUnique")},"draw"),Poe={setConf:qOe,draw:HOe}});var YOe,Foe,zoe=_(()=>{"use strict";YOe=s(t=>`
.mermaid-main-font {
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.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: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
/* 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: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.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;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.titleColor||t.textColor};
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
`,"getStyles"),Foe=YOe});var $oe={};ur($oe,{diagram:()=>XOe});var XOe,Goe=_(()=>{"use strict";poe();Noe();Boe();zoe();XOe={parser:doe,db:Moe,renderer:Poe,styles:Foe}});var qoe,Woe=_(()=>{"use strict";V2();it();qoe={parse:s(async t=>{let e=await Bu("info",t);V.debug(e)},"parse")}});var X2,JI=_(()=>{X2="11.0.2"});var JOe,ePe,Hoe,Yoe=_(()=>{"use strict";JI();JOe={version:X2},ePe=s(()=>JOe.version,"getVersion"),Hoe={getVersion:ePe}});var Bo,p0=_(()=>{"use strict";Xt();gt();Bo=s(t=>{let{securityLevel:e}=le(),r=Me("body");if(e==="sandbox"){let a=Me(`#i${t}`).node()?.contentDocument??document;r=Me(a.body)}return r.select(`#${t}`)},"selectSvgElement")});var tPe,Xoe,joe=_(()=>{"use strict";it();p0();Un();tPe=s((t,e,r)=>{V.debug(`rendering info diagram
`+t);let n=Bo(e);xr(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"),Xoe={draw:tPe}});var Koe={};ur(Koe,{diagram:()=>rPe});var rPe,Qoe=_(()=>{"use strict";Woe();Yoe();joe();rPe={parser:qoe,db:Hoe,renderer:Xoe}});var ele,eN,Rw,tN,aPe,sPe,oPe,lPe,cPe,uPe,hPe,Mw,rN=_(()=>{"use strict";it();Ci();Pl();ele=dr.pie,eN={sections:new Map,showData:!1,config:ele},Rw=eN.sections,tN=eN.showData,aPe=structuredClone(ele),sPe=s(()=>structuredClone(aPe),"getConfig"),oPe=s(()=>{Rw=new Map,tN=eN.showData,br()},"clear"),lPe=s(({label:t,value:e})=>{Rw.has(t)||(Rw.set(t,e),V.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),cPe=s(()=>Rw,"getSections"),uPe=s(t=>{tN=t},"setShowData"),hPe=s(()=>tN,"getShowData"),Mw={getConfig:sPe,clear:oPe,setDiagramTitle:an,getDiagramTitle:Qr,setAccTitle:Ar,getAccTitle:Gr,setAccDescription:Vr,getAccDescription:Ur,addSection:lPe,getSections:cPe,setShowData:uPe,getShowData:hPe}});var fPe,tle,rle=_(()=>{"use strict";V2();it();kw();rN();fPe=s((t,e)=>{dg(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),tle={parse:s(async t=>{let e=await Bu("pie",t);V.debug(e),fPe(e,Mw)},"parse")}});var dPe,nle,ile=_(()=>{"use strict";dPe=s(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"),nle=dPe});var pPe,mPe,ale,sle=_(()=>{"use strict";Xt();gt();it();p0();Un();pr();pPe=s(t=>{let e=[...t.entries()].map(n=>({label:n[0],value:n[1]})).sort((n,i)=>i.value-n.value);return i3().value(n=>n.value)(e)},"createPieArcs"),mPe=s((t,e,r,n)=>{V.debug(`rendering pie chart
`+t);let i=n.db,a=le(),o=ms(i.getConfig(),a.pie),l=40,u=18,h=4,f=450,d=f,p=Bo(e),m=p.append("g");m.attr("transform","translate("+d/2+","+f/2+")");let{themeVariables:g}=a,[y]=nc(g.pieOuterStrokeWidth);y??=2;let v=o.textPosition,x=Math.min(d,f)/2-l,b=sl().innerRadius(0).outerRadius(x),k=sl().innerRadius(x*v).outerRadius(x*v);m.append("circle").attr("cx",0).attr("cy",0).attr("r",x+y/2).attr("class","pieOuterCircle");let A=i.getSections(),w=pPe(A),T=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],C=au(T);m.selectAll("mySlices").data(w).enter().append("path").attr("d",b).attr("fill",L=>C(L.data.label)).attr("class","pieCircle");let E=0;A.forEach(L=>{E+=L}),m.selectAll("mySlices").data(w).enter().append("text").text(L=>(L.data.value/E*100).toFixed(0)+"%").attr("transform",L=>"translate("+k.centroid(L)+")").style("text-anchor","middle").attr("class","slice"),m.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(f-50)/2).attr("class","pieTitleText");let S=m.selectAll(".legend").data(C.domain()).enter().append("g").attr("class","legend").attr("transform",(L,P)=>{let M=u+h,F=M*C.domain().length/2,I=12*u,O=P*M-F;return"translate("+I+","+O+")"});S.append("rect").attr("width",u).attr("height",u).style("fill",C).style("stroke",C),S.data(w).append("text").attr("x",u+h).attr("y",u-h).text(L=>{let{label:P,value:M}=L.data;return i.getShowData()?`${P} [${M}]`:P});let R=Math.max(...S.selectAll("text").nodes().map(L=>L?.getBoundingClientRect().width??0)),D=d+l+u+h+R;p.attr("viewBox",`0 0 ${D} ${f}`),xr(p,f,D,o.useMaxWidth)},"draw"),ale={draw:mPe}});var ole={};ur(ole,{diagram:()=>gPe});var gPe,lle=_(()=>{"use strict";rle();rN();ile();sle();gPe={parser:tle,db:Mw,renderer:ale,styles:nle}});var nN,hle,fle=_(()=>{"use strict";nN=function(){var t=s(function(Ie,Ne,Be,ze){for(Be=Be||{},ze=Ie.length;ze--;Be[Ie[ze]]=Ne);return Be},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[1,7],o=[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],l=[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],u=[55,56,57],h=[2,36],f=[1,37],d=[1,36],p=[1,38],m=[1,35],g=[1,43],y=[1,41],v=[1,14],x=[1,23],b=[1,18],k=[1,19],A=[1,20],w=[1,21],T=[1,22],C=[1,24],E=[1,25],S=[1,26],R=[1,27],D=[1,28],L=[1,29],P=[1,32],M=[1,33],F=[1,34],I=[1,39],O=[1,40],z=[1,42],N=[1,44],U=[1,62],$=[1,61],W=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,65],te=[1,66],ce=[1,67],Z=[1,68],fe=[1,69],ne=[1,70],H=[1,71],Q=[1,72],K=[1,73],re=[1,74],ie=[1,75],ye=[1,76],j=[4,5,6,7,8,9,10,11,12,13,14,15,18],De=[1,90],oe=[1,91],Re=[1,92],Pe=[1,99],Se=[1,93],Ue=[1,96],Oe=[1,94],_e=[1,95],he=[1,97],q=[1,98],se=[1,102],ue=[10,55,56,57],X=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ae={trace:s(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:s(function(Ne,Be,ze,qe,Fe,we,Je){var We=we.length-1;switch(Fe){case 23:this.$=we[We];break;case 24:this.$=we[We-1]+""+we[We];break;case 26:this.$=we[We-1]+we[We];break;case 27:this.$=[we[We].trim()];break;case 28:we[We-2].push(we[We].trim()),this.$=we[We-2];break;case 29:this.$=we[We-4],qe.addClass(we[We-2],we[We]);break;case 37:this.$=[];break;case 42:this.$=we[We].trim(),qe.setDiagramTitle(this.$);break;case 43:this.$=we[We].trim(),qe.setAccTitle(this.$);break;case 44:case 45:this.$=we[We].trim(),qe.setAccDescription(this.$);break;case 46:qe.addSection(we[We].substr(8)),this.$=we[We].substr(8);break;case 47:qe.addPoint(we[We-3],"",we[We-1],we[We],[]);break;case 48:qe.addPoint(we[We-4],we[We-3],we[We-1],we[We],[]);break;case 49:qe.addPoint(we[We-4],"",we[We-2],we[We-1],we[We]);break;case 50:qe.addPoint(we[We-5],we[We-4],we[We-2],we[We-1],we[We]);break;case 51:qe.setXAxisLeftText(we[We-2]),qe.setXAxisRightText(we[We]);break;case 52:we[We-1].text+=" \u27F6 ",qe.setXAxisLeftText(we[We-1]);break;case 53:qe.setXAxisLeftText(we[We]);break;case 54:qe.setYAxisBottomText(we[We-2]),qe.setYAxisTopText(we[We]);break;case 55:we[We-1].text+=" \u27F6 ",qe.setYAxisBottomText(we[We-1]);break;case 56:qe.setYAxisBottomText(we[We]);break;case 57:qe.setQuadrant1Text(we[We]);break;case 58:qe.setQuadrant2Text(we[We]);break;case 59:qe.setQuadrant3Text(we[We]);break;case 60:qe.setQuadrant4Text(we[We]);break;case 64:this.$={text:we[We],type:"text"};break;case 65:this.$={text:we[We-1].text+""+we[We],type:we[We-1].type};break;case 66:this.$={text:we[We],type:"text"};break;case 67:this.$={text:we[We],type:"markdown"};break;case 68:this.$=we[We];break;case 69:this.$=we[We-1]+""+we[We];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(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(u,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:f,5:d,10:p,12:m,13:g,14:y,18:v,25:x,35:b,37:k,39:A,41:w,42:T,48:C,50:E,51:S,52:R,53:D,54:L,60:P,61:M,63:F,64:I,65:O,66:z,67:N}),t(o,[2,34]),{27:45,55:n,56:i,57:a},t(u,[2,37]),t(u,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:f,5:d,10:p,12:m,13:g,14:y,18:v,25:x,35:b,37:k,39:A,41:w,42:T,48:C,50:E,51:S,52:R,53:D,54:L,60:P,61:M,63:F,64:I,65:O,66:z,67:N}),t(u,[2,39]),t(u,[2,40]),t(u,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(u,[2,45]),t(u,[2,46]),{18:[1,50]},{4:f,5:d,10:p,12:m,13:g,14:y,43:51,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,10:p,12:m,13:g,14:y,43:52,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,10:p,12:m,13:g,14:y,43:53,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,10:p,12:m,13:g,14:y,43:54,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,10:p,12:m,13:g,14:y,43:55,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,10:p,12:m,13:g,14:y,43:56,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,44:[1,57],47:[1,58],58:60,59:59,63:F,64:I,65:O,66:z,67:N},t(W,[2,64]),t(W,[2,66]),t(W,[2,67]),t(W,[2,70]),t(W,[2,71]),t(W,[2,72]),t(W,[2,73]),t(W,[2,74]),t(W,[2,75]),t(W,[2,76]),t(W,[2,77]),t(W,[2,78]),t(W,[2,79]),t(W,[2,80]),t(o,[2,35]),t(u,[2,38]),t(u,[2,42]),t(u,[2,43]),t(u,[2,44]),{3:64,4:ee,5:te,6:ce,7:Z,8:fe,9:ne,10:H,11:Q,12:K,13:re,14:ie,15:ye,21:63},t(u,[2,53],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,49:[1,77],63:F,64:I,65:O,66:z,67:N}),t(u,[2,56],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,49:[1,78],63:F,64:I,65:O,66:z,67:N}),t(u,[2,57],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),t(u,[2,58],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),t(u,[2,59],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),t(u,[2,60],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),{45:[1,79]},{44:[1,80]},t(W,[2,65]),t(W,[2,81]),t(W,[2,82]),t(W,[2,83]),{3:82,4:ee,5:te,6:ce,7:Z,8:fe,9:ne,10:H,11:Q,12:K,13:re,14:ie,15:ye,18:[1,81]},t(j,[2,23]),t(j,[2,1]),t(j,[2,2]),t(j,[2,3]),t(j,[2,4]),t(j,[2,5]),t(j,[2,6]),t(j,[2,7]),t(j,[2,8]),t(j,[2,9]),t(j,[2,10]),t(j,[2,11]),t(j,[2,12]),t(u,[2,52],{58:31,43:83,4:f,5:d,10:p,12:m,13:g,14:y,60:P,61:M,63:F,64:I,65:O,66:z,67:N}),t(u,[2,55],{58:31,43:84,4:f,5:d,10:p,12:m,13:g,14:y,60:P,61:M,63:F,64:I,65:O,66:z,67:N}),{46:[1,85]},{45:[1,86]},{4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,16:89,17:Oe,18:_e,19:he,20:q,22:88,23:87},t(j,[2,24]),t(u,[2,51],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),t(u,[2,54],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),t(u,[2,47],{22:88,16:89,23:100,4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,17:Oe,18:_e,19:he,20:q}),{46:[1,101]},t(u,[2,29],{10:se}),t(ue,[2,27],{16:103,4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,17:Oe,18:_e,19:he,20:q}),t(X,[2,25]),t(X,[2,13]),t(X,[2,14]),t(X,[2,15]),t(X,[2,16]),t(X,[2,17]),t(X,[2,18]),t(X,[2,19]),t(X,[2,20]),t(X,[2,21]),t(X,[2,22]),t(u,[2,49],{10:se}),t(u,[2,48],{22:88,16:89,23:104,4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,17:Oe,18:_e,19:he,20:q}),{4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,16:89,17:Oe,18:_e,19:he,20:q,22:105},t(X,[2,26]),t(u,[2,50],{10:se}),t(ue,[2,28],{16:103,4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,17:Oe,18:_e,19:he,20:q})],defaultActions:{8:[2,30],9:[2,31]},parseError:s(function(Ne,Be){if(Be.recoverable)this.trace(Ne);else{var ze=new Error(Ne);throw ze.hash=Be,ze}},"parseError"),parse:s(function(Ne){var Be=this,ze=[0],qe=[],Fe=[null],we=[],Je=this.table,We="",or=0,Cr=0,Ut=0,ar=2,ut=1,Rt=we.slice.call(arguments,1),Qe=Object.create(this.lexer),Dt={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(Dt.yy[qt]=this.yy[qt]);Qe.setInput(Ne,Dt.yy),Dt.yy.lexer=Qe,Dt.yy.parser=this,typeof Qe.yylloc>"u"&&(Qe.yylloc={});var yt=Qe.yylloc;we.push(yt);var Et=Qe.options&&Qe.options.ranges;typeof Dt.yy.parseError=="function"?this.parseError=Dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(En){ze.length=ze.length-2*En,Fe.length=Fe.length-En,we.length=we.length-En}s(pt,"popStack");function Wt(){var En;return En=qe.pop()||Qe.lex()||ut,typeof En!="number"&&(En instanceof Array&&(qe=En,En=qe.pop()),En=Be.symbols_[En]||En),En}s(Wt,"lex");for(var ot,fr,vt,Bt,Sr,zi,rr={},Vn,Tn,Ki,ci;;){if(vt=ze[ze.length-1],this.defaultActions[vt]?Bt=this.defaultActions[vt]:((ot===null||typeof ot>"u")&&(ot=Wt()),Bt=Je[vt]&&Je[vt][ot]),typeof Bt>"u"||!Bt.length||!Bt[0]){var Pa="";ci=[];for(Vn in Je[vt])this.terminals_[Vn]&&Vn>ar&&ci.push("'"+this.terminals_[Vn]+"'");Qe.showPosition?Pa="Parse error on line "+(or+1)+`:
`+Qe.showPosition()+`
Expecting `+ci.join(", ")+", got '"+(this.terminals_[ot]||ot)+"'":Pa="Parse error on line "+(or+1)+": Unexpected "+(ot==ut?"end of input":"'"+(this.terminals_[ot]||ot)+"'"),this.parseError(Pa,{text:Qe.match,token:this.terminals_[ot]||ot,line:Qe.yylineno,loc:yt,expected:ci})}if(Bt[0]instanceof Array&&Bt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+vt+", token: "+ot);switch(Bt[0]){case 1:ze.push(ot),Fe.push(Qe.yytext),we.push(Qe.yylloc),ze.push(Bt[1]),ot=null,fr?(ot=fr,fr=null):(Cr=Qe.yyleng,We=Qe.yytext,or=Qe.yylineno,yt=Qe.yylloc,Ut>0&&Ut--);break;case 2:if(Tn=this.productions_[Bt[1]][1],rr.$=Fe[Fe.length-Tn],rr._$={first_line:we[we.length-(Tn||1)].first_line,last_line:we[we.length-1].last_line,first_column:we[we.length-(Tn||1)].first_column,last_column:we[we.length-1].last_column},Et&&(rr._$.range=[we[we.length-(Tn||1)].range[0],we[we.length-1].range[1]]),zi=this.performAction.apply(rr,[We,Cr,or,Dt.yy,Bt[1],Fe,we].concat(Rt)),typeof zi<"u")return zi;Tn&&(ze=ze.slice(0,-1*Tn*2),Fe=Fe.slice(0,-1*Tn),we=we.slice(0,-1*Tn)),ze.push(this.productions_[Bt[1]][0]),Fe.push(rr.$),we.push(rr._$),Ki=Je[ze[ze.length-2]][ze[ze.length-1]],ze.push(Ki);break;case 3:return!0}}return!0},"parse")},pe=function(){var Ie={EOF:1,parseError:s(function(Be,ze){if(this.yy.parser)this.yy.parser.parseError(Be,ze);else throw new Error(Be)},"parseError"),setInput:s(function(Ne,Be){return this.yy=Be||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:s(function(){var Ne=this._input[0];this.yytext+=Ne,this.yyleng++,this.offset++,this.match+=Ne,this.matched+=Ne;var Be=Ne.match(/(?:\r\n?|\n).*/g);return Be?(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:s(function(Ne){var Be=Ne.length,ze=Ne.split(/(?:\r\n?|\n)/g);this._input=Ne+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Be),this.offset-=Be;var qe=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),ze.length-1&&(this.yylineno-=ze.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:ze?(ze.length===qe.length?this.yylloc.first_column:0)+qe[qe.length-ze.length].length-ze[0].length:this.yylloc.first_column-Be},this.options.ranges&&(this.yylloc.range=[Fe[0],Fe[0]+this.yyleng-Be]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(Ne){this.unput(this.match.slice(Ne))},"less"),pastInput:s(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:s(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:s(function(){var Ne=this.pastInput(),Be=new Array(Ne.length+1).join("-");return Ne+this.upcomingInput()+`
`+Be+"^"},"showPosition"),test_match:s(function(Ne,Be){var ze,qe,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))),qe=Ne[0].match(/(?:\r\n?|\n).*/g),qe&&(this.yylineno+=qe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:qe?qe[qe.length-1].length-qe[qe.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],ze=this.performAction.call(this,this.yy,this,Be,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ze)return ze;if(this._backtrack){for(var we in Fe)this[we]=Fe[we];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ne,Be,ze,qe;this._more||(this.yytext="",this.match="");for(var Fe=this._currentRules(),we=0;we<Fe.length;we++)if(ze=this._input.match(this.rules[Fe[we]]),ze&&(!Be||ze[0].length>Be[0].length)){if(Be=ze,qe=we,this.options.backtrack_lexer){if(Ne=this.test_match(ze,Fe[we]),Ne!==!1)return Ne;if(this._backtrack){Be=!1;continue}else return!1}else if(!this.options.flex)break}return Be?(Ne=this.test_match(Be,Fe[qe]),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:s(function(){var Be=this.next();return Be||this.lex()},"lex"),begin:s(function(Be){this.conditionStack.push(Be)},"begin"),popState:s(function(){var Be=this.conditionStack.length-1;return Be>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(Be){return Be=this.conditionStack.length-1-Math.abs(Be||0),Be>=0?this.conditionStack[Be]:"INITIAL"},"topState"),pushState:s(function(Be){this.begin(Be)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(Be,ze,qe,Fe){var we=Fe;switch(qe){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 Ie}();ae.lexer=pe;function de(){this.yy={}}return s(de,"Parser"),de.prototype=ae,ae.Parser=de,new de}();nN.parser=nN;hle=nN});var Ja,Iw,dle=_(()=>{"use strict";Xt();Pl();it();vb();Ja=j0(),Iw=class{constructor(){this.classes=new Map;this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{s(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:dr.quadrantChart?.chartWidth||500,chartWidth:dr.quadrantChart?.chartHeight||500,titlePadding:dr.quadrantChart?.titlePadding||10,titleFontSize:dr.quadrantChart?.titleFontSize||20,quadrantPadding:dr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:dr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:dr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:dr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:dr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:dr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:dr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:dr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:dr.quadrantChart?.pointLabelFontSize||12,pointRadius:dr.quadrantChart?.pointRadius||5,xAxisPosition:dr.quadrantChart?.xAxisPosition||"top",yAxisPosition:dr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:dr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:dr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Ja.quadrant1Fill,quadrant2Fill:Ja.quadrant2Fill,quadrant3Fill:Ja.quadrant3Fill,quadrant4Fill:Ja.quadrant4Fill,quadrant1TextFill:Ja.quadrant1TextFill,quadrant2TextFill:Ja.quadrant2TextFill,quadrant3TextFill:Ja.quadrant3TextFill,quadrant4TextFill:Ja.quadrant4TextFill,quadrantPointFill:Ja.quadrantPointFill,quadrantPointTextFill:Ja.quadrantPointTextFill,quadrantXAxisTextFill:Ja.quadrantXAxisTextFill,quadrantYAxisTextFill:Ja.quadrantYAxisTextFill,quadrantTitleFill:Ja.quadrantTitleFill,quadrantInternalBorderStrokeFill:Ja.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Ja.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,V.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,r){this.classes.set(e,r)}setConfig(e){V.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){V.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,r,n,i){let a=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,o={top:e==="top"&&r?a:0,bottom:e==="bottom"&&r?a:0},l=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,u={left:this.config.yAxisPosition==="left"&&n?l:0,right:this.config.yAxisPosition==="right"&&n?l:0},h=this.config.titleFontSize+this.config.titlePadding*2,f={top:i?h:0},d=this.config.quadrantPadding+u.left,p=this.config.quadrantPadding+o.top+f.top,m=this.config.chartWidth-this.config.quadrantPadding*2-u.left-u.right,g=this.config.chartHeight-this.config.quadrantPadding*2-o.top-o.bottom-f.top,y=m/2,v=g/2;return{xAxisSpace:o,yAxisSpace:u,titleSpace:f,quadrantSpace:{quadrantLeft:d,quadrantTop:p,quadrantWidth:m,quadrantHalfWidth:y,quadrantHeight:g,quadrantHalfHeight:v}}}getAxisLabels(e,r,n,i){let{quadrantSpace:a,titleSpace:o}=i,{quadrantHalfHeight:l,quadrantHeight:u,quadrantLeft:h,quadrantHalfWidth:f,quadrantTop:d,quadrantWidth:p}=a,m=!!this.data.xAxisRightText,g=!!this.data.yAxisTopText,y=[];return this.data.xAxisLeftText&&r&&y.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+(m?f/2:0),y:e==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+d+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&y.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+f+(m?f/2:0),y:e==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+d+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&y.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:d+u-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&y.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:d+l-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),y}getQuadrants(e){let{quadrantSpace:r}=e,{quadrantHalfHeight:n,quadrantLeft:i,quadrantHalfWidth:a,quadrantTop:o}=r,l=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+a,y:o,width:a,height:n,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:i,y:o,width:a,height:n,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:i,y:o+n,width:a,height:n,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:i+a,y:o+n,width:a,height:n,fill:this.themeConfig.quadrant4Fill}];for(let u of l)u.text.x=u.x+u.width/2,this.data.points.length===0?(u.text.y=u.y+u.height/2,u.text.horizontalPos="middle"):(u.text.y=u.y+this.config.quadrantTextTopPadding,u.text.horizontalPos="top");return l}getQuadrantPoints(e){let{quadrantSpace:r}=e,{quadrantHeight:n,quadrantLeft:i,quadrantTop:a,quadrantWidth:o}=r,l=rl().domain([0,1]).range([i,o+i]),u=rl().domain([0,1]).range([n+a,a]);return this.data.points.map(f=>{let d=this.classes.get(f.className);return d&&(f={...d,...f}),{x:l(f.x),y:u(f.y),fill:f.color??this.themeConfig.quadrantPointFill,radius:f.radius??this.config.pointRadius,text:{text:f.text,fill:this.themeConfig.quadrantPointTextFill,x:l(f.x),y:u(f.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:f.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:f.strokeWidth??"0px"}})}getBorders(e){let r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:i,quadrantHeight:a,quadrantLeft:o,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:h}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u,x2:o+h+r,y2:u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o+h,y1:u+r,x2:o+h,y2:u+a-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u+a,x2:o+h+r,y2:u+a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o,y1:u+r,x2:o,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+l,y1:u+r,x2:o+l,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+r,y1:u+i,x2:o+h-r,y2:u+i}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,i=this.data.points.length>0?"bottom":this.config.xAxisPosition,a=this.calculateSpace(i,e,r,n);return{points:this.getQuadrantPoints(a),quadrants:this.getQuadrants(a),axisLabels:this.getAxisLabels(i,e,r,a),borderLines:this.getBorders(a),title:this.getTitle(n)}}}});function iN(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function ple(t){return!/^\d+$/.test(t)}function mle(t){return!/^\d+px$/.test(t)}var m0,gle=_(()=>{"use strict";m0=class extends Error{static{s(this,"InvalidStyleError")}constructor(e,r,n){super(`value for ${e} ${r} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}};s(iN,"validateHexCode");s(ple,"validateNumber");s(mle,"validateSizeInPixels")});function $u(t){return $r(t.trim(),xPe)}function bPe(t){fa.setData({quadrant1Text:$u(t.text)})}function kPe(t){fa.setData({quadrant2Text:$u(t.text)})}function wPe(t){fa.setData({quadrant3Text:$u(t.text)})}function TPe(t){fa.setData({quadrant4Text:$u(t.text)})}function EPe(t){fa.setData({xAxisLeftText:$u(t.text)})}function CPe(t){fa.setData({xAxisRightText:$u(t.text)})}function SPe(t){fa.setData({yAxisTopText:$u(t.text)})}function _Pe(t){fa.setData({yAxisBottomText:$u(t.text)})}function aN(t){let e={};for(let r of t){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(ple(i))throw new m0(n,i,"number");e.radius=parseInt(i)}else if(n==="color"){if(iN(i))throw new m0(n,i,"hex code");e.color=i}else if(n==="stroke-color"){if(iN(i))throw new m0(n,i,"hex code");e.strokeColor=i}else if(n==="stroke-width"){if(mle(i))throw new m0(n,i,"number of pixels (eg. 10px)");e.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return e}function APe(t,e,r,n,i){let a=aN(i);fa.addPoints([{x:r,y:n,text:$u(t.text),className:e,...a}])}function LPe(t,e){fa.addClass(t,aN(e))}function DPe(t){fa.setConfig({chartWidth:t})}function RPe(t){fa.setConfig({chartHeight:t})}function MPe(){let t=le(),{themeVariables:e,quadrantChart:r}=t;return r&&fa.setConfig(r),fa.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}),fa.setData({titleText:Qr()}),fa.build()}var xPe,fa,IPe,yle,vle=_(()=>{"use strict";gt();Qt();Ci();dle();gle();xPe=le();s($u,"textSanitizer");fa=new Iw;s(bPe,"setQuadrant1Text");s(kPe,"setQuadrant2Text");s(wPe,"setQuadrant3Text");s(TPe,"setQuadrant4Text");s(EPe,"setXAxisLeftText");s(CPe,"setXAxisRightText");s(SPe,"setYAxisTopText");s(_Pe,"setYAxisBottomText");s(aN,"parseStyles");s(APe,"addPoint");s(LPe,"addClass");s(DPe,"setWidth");s(RPe,"setHeight");s(MPe,"getQuadrantData");IPe=s(function(){fa.clear(),br()},"clear"),yle={setWidth:DPe,setHeight:RPe,setQuadrant1Text:bPe,setQuadrant2Text:kPe,setQuadrant3Text:wPe,setQuadrant4Text:TPe,setXAxisLeftText:EPe,setXAxisRightText:CPe,setYAxisTopText:SPe,setYAxisBottomText:_Pe,parseStyles:aN,addPoint:APe,addClass:LPe,getQuadrantData:MPe,clear:IPe,setAccTitle:Ar,getAccTitle:Gr,setDiagramTitle:an,getDiagramTitle:Qr,getAccDescription:Ur,setAccDescription:Vr}});var NPe,xle,ble=_(()=>{"use strict";Xt();gt();it();Un();NPe=s((t,e,r,n)=>{function i(E){return E==="top"?"hanging":"middle"}s(i,"getDominantBaseLine");function a(E){return E==="left"?"start":"middle"}s(a,"getTextAnchor");function o(E){return`translate(${E.x}, ${E.y}) rotate(${E.rotation||0})`}s(o,"getTransformation");let l=le();V.debug(`Rendering quadrant chart
`+t);let u=l.securityLevel,h;u==="sandbox"&&(h=Me("#i"+e));let d=(u==="sandbox"?Me(h.nodes()[0].contentDocument.body):Me("body")).select(`[id="${e}"]`),p=d.append("g").attr("class","main"),m=l.quadrantChart?.chartWidth??500,g=l.quadrantChart?.chartHeight??500;xr(d,g,m,l.quadrantChart?.useMaxWidth??!0),d.attr("viewBox","0 0 "+m+" "+g),n.db.setHeight(g),n.db.setWidth(m);let y=n.db.getQuadrantData(),v=p.append("g").attr("class","quadrants"),x=p.append("g").attr("class","border"),b=p.append("g").attr("class","data-points"),k=p.append("g").attr("class","labels"),A=p.append("g").attr("class","title");y.title&&A.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",i(y.title.horizontalPos)).attr("text-anchor",a(y.title.verticalPos)).attr("transform",o(y.title)).text(y.title.text),y.borderLines&&x.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",E=>E.x1).attr("y1",E=>E.y1).attr("x2",E=>E.x2).attr("y2",E=>E.y2).style("stroke",E=>E.strokeFill).style("stroke-width",E=>E.strokeWidth);let w=v.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");w.append("rect").attr("x",E=>E.x).attr("y",E=>E.y).attr("width",E=>E.width).attr("height",E=>E.height).attr("fill",E=>E.fill),w.append("text").attr("x",0).attr("y",0).attr("fill",E=>E.text.fill).attr("font-size",E=>E.text.fontSize).attr("dominant-baseline",E=>i(E.text.horizontalPos)).attr("text-anchor",E=>a(E.text.verticalPos)).attr("transform",E=>o(E.text)).text(E=>E.text.text),k.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(E=>E.text).attr("fill",E=>E.fill).attr("font-size",E=>E.fontSize).attr("dominant-baseline",E=>i(E.horizontalPos)).attr("text-anchor",E=>a(E.verticalPos)).attr("transform",E=>o(E));let C=b.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");C.append("circle").attr("cx",E=>E.x).attr("cy",E=>E.y).attr("r",E=>E.radius).attr("fill",E=>E.fill).attr("stroke",E=>E.strokeColor).attr("stroke-width",E=>E.strokeWidth),C.append("text").attr("x",0).attr("y",0).text(E=>E.text.text).attr("fill",E=>E.text.fill).attr("font-size",E=>E.text.fontSize).attr("dominant-baseline",E=>i(E.text.horizontalPos)).attr("text-anchor",E=>a(E.text.verticalPos)).attr("transform",E=>o(E.text))},"draw"),xle={draw:NPe}});var kle={};ur(kle,{diagram:()=>OPe});var OPe,wle=_(()=>{"use strict";fle();vle();ble();OPe={parser:hle,db:yle,renderer:xle,styles:s(()=>"","styles")}});var sN,Cle,Sle=_(()=>{"use strict";sN=function(){var t=s(function(F,I,O,z){for(O=O||{},z=F.length;z--;O[F[z]]=I);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],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],u=[1,25],h=[1,26],f=[1,28],d=[1,29],p=[1,30],m=[1,31],g=[1,32],y=[1,33],v=[1,34],x=[1,35],b=[1,36],k=[1,37],A=[1,43],w=[1,42],T=[1,47],C=[1,50],E=[1,10,12,14,16,18,19,21,23,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[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],D=[1,64],L={trace:s(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:s(function(I,O,z,N,U,$,W){var ee=$.length-1;switch(U){case 5:N.setOrientation($[ee]);break;case 9:N.setDiagramTitle($[ee].text.trim());break;case 12:N.setLineData({text:"",type:"text"},$[ee]);break;case 13:N.setLineData($[ee-1],$[ee]);break;case 14:N.setBarData({text:"",type:"text"},$[ee]);break;case 15:N.setBarData($[ee-1],$[ee]);break;case 16:this.$=$[ee].trim(),N.setAccTitle(this.$);break;case 17:case 18:this.$=$[ee].trim(),N.setAccDescription(this.$);break;case 19:this.$=$[ee-1];break;case 20:this.$=[Number($[ee-2]),...$[ee]];break;case 21:this.$=[Number($[ee])];break;case 22:N.setXAxisTitle($[ee]);break;case 23:N.setXAxisTitle($[ee-1]);break;case 24:N.setXAxisTitle({type:"text",text:""});break;case 25:N.setXAxisBand($[ee]);break;case 26:N.setXAxisRangeData(Number($[ee-2]),Number($[ee]));break;case 27:this.$=$[ee-1];break;case 28:this.$=[$[ee-2],...$[ee]];break;case 29:this.$=[$[ee]];break;case 30:N.setYAxisTitle($[ee]);break;case 31:N.setYAxisTitle($[ee-1]);break;case 32:N.setYAxisTitle({type:"text",text:""});break;case 33:N.setYAxisRangeData(Number($[ee-2]),Number($[ee]));break;case 37:this.$={text:$[ee],type:"text"};break;case 38:this.$={text:$[ee],type:"text"};break;case 39:this.$={text:$[ee],type:"markdown"};break;case 40:this.$=$[ee];break;case 41:this.$=$[ee-1]+""+$[ee];break}},"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,34:i,35:a,36:o}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,34:i,35:a,36:o}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:i,35:a,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,34:i,35:a,36:o}),{1:[2,3]},t(l,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:o}),{11:23,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},{11:39,13:38,24:A,27:w,29:40,30:41,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},{11:45,15:44,27:T,33:46,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},{11:49,17:48,24:C,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},{11:52,17:51,24:C,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},{20:[1,53]},{22:[1,54]},t(E,[2,18]),{1:[2,2]},t(E,[2,8]),t(E,[2,9]),t(S,[2,37],{40:55,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k}),t(S,[2,38]),t(S,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(E,[2,10]),t(E,[2,22],{30:41,29:56,24:A,27:w}),t(E,[2,24]),t(E,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},t(E,[2,11]),t(E,[2,30],{33:60,27:T}),t(E,[2,32]),{31:[1,61]},t(E,[2,12]),{17:62,24:C},{25:63,27:D},t(E,[2,14]),{17:65,24:C},t(E,[2,16]),t(E,[2,17]),t(R,[2,41]),t(E,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(E,[2,31]),{27:[1,69]},t(E,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(E,[2,15]),t(E,[2,26]),t(E,[2,27]),{11:59,32:72,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},t(E,[2,33]),t(E,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:s(function(I,O){if(O.recoverable)this.trace(I);else{var z=new Error(I);throw z.hash=O,z}},"parseError"),parse:s(function(I){var O=this,z=[0],N=[],U=[null],$=[],W=this.table,ee="",te=0,ce=0,Z=0,fe=2,ne=1,H=$.slice.call(arguments,1),Q=Object.create(this.lexer),K={yy:{}};for(var re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,re)&&(K.yy[re]=this.yy[re]);Q.setInput(I,K.yy),K.yy.lexer=Q,K.yy.parser=this,typeof Q.yylloc>"u"&&(Q.yylloc={});var ie=Q.yylloc;$.push(ie);var ye=Q.options&&Q.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(ae){z.length=z.length-2*ae,U.length=U.length-ae,$.length=$.length-ae}s(j,"popStack");function De(){var ae;return ae=N.pop()||Q.lex()||ne,typeof ae!="number"&&(ae instanceof Array&&(N=ae,ae=N.pop()),ae=O.symbols_[ae]||ae),ae}s(De,"lex");for(var oe,Re,Pe,Se,Ue,Oe,_e={},he,q,se,ue;;){if(Pe=z[z.length-1],this.defaultActions[Pe]?Se=this.defaultActions[Pe]:((oe===null||typeof oe>"u")&&(oe=De()),Se=W[Pe]&&W[Pe][oe]),typeof Se>"u"||!Se.length||!Se[0]){var X="";ue=[];for(he in W[Pe])this.terminals_[he]&&he>fe&&ue.push("'"+this.terminals_[he]+"'");Q.showPosition?X="Parse error on line "+(te+1)+`:
`+Q.showPosition()+`
Expecting `+ue.join(", ")+", got '"+(this.terminals_[oe]||oe)+"'":X="Parse error on line "+(te+1)+": Unexpected "+(oe==ne?"end of input":"'"+(this.terminals_[oe]||oe)+"'"),this.parseError(X,{text:Q.match,token:this.terminals_[oe]||oe,line:Q.yylineno,loc:ie,expected:ue})}if(Se[0]instanceof Array&&Se.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Pe+", token: "+oe);switch(Se[0]){case 1:z.push(oe),U.push(Q.yytext),$.push(Q.yylloc),z.push(Se[1]),oe=null,Re?(oe=Re,Re=null):(ce=Q.yyleng,ee=Q.yytext,te=Q.yylineno,ie=Q.yylloc,Z>0&&Z--);break;case 2:if(q=this.productions_[Se[1]][1],_e.$=U[U.length-q],_e._$={first_line:$[$.length-(q||1)].first_line,last_line:$[$.length-1].last_line,first_column:$[$.length-(q||1)].first_column,last_column:$[$.length-1].last_column},ye&&(_e._$.range=[$[$.length-(q||1)].range[0],$[$.length-1].range[1]]),Oe=this.performAction.apply(_e,[ee,ce,te,K.yy,Se[1],U,$].concat(H)),typeof Oe<"u")return Oe;q&&(z=z.slice(0,-1*q*2),U=U.slice(0,-1*q),$=$.slice(0,-1*q)),z.push(this.productions_[Se[1]][0]),U.push(_e.$),$.push(_e._$),se=W[z[z.length-2]][z[z.length-1]],z.push(se);break;case 3:return!0}}return!0},"parse")},P=function(){var F={EOF:1,parseError:s(function(O,z){if(this.yy.parser)this.yy.parser.parseError(O,z);else throw new Error(O)},"parseError"),setInput:s(function(I,O){return this.yy=O||this.yy||{},this._input=I,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:s(function(){var I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var O=I.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),I},"input"),unput:s(function(I){var O=I.length,z=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;var N=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),z.length-1&&(this.yylineno-=z.length-1);var U=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:z?(z.length===N.length?this.yylloc.first_column:0)+N[N.length-z.length].length-z[0].length:this.yylloc.first_column-O},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-O]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(I){this.unput(this.match.slice(I))},"less"),pastInput:s(function(){var I=this.matched.substr(0,this.matched.length-this.match.length);return(I.length>20?"...":"")+I.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var I=this.match;return I.length<20&&(I+=this._input.substr(0,20-I.length)),(I.substr(0,20)+(I.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var I=this.pastInput(),O=new Array(I.length+1).join("-");return I+this.upcomingInput()+`
`+O+"^"},"showPosition"),test_match:s(function(I,O){var z,N,U;if(this.options.backtrack_lexer&&(U={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&&(U.yylloc.range=this.yylloc.range.slice(0))),N=I[0].match(/(?:\r\n?|\n).*/g),N&&(this.yylineno+=N.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:N?N[N.length-1].length-N[N.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+I[0].length},this.yytext+=I[0],this.match+=I[0],this.matches=I,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(I[0].length),this.matched+=I[0],z=this.performAction.call(this,this.yy,this,O,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var $ in U)this[$]=U[$];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var I,O,z,N;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),$=0;$<U.length;$++)if(z=this._input.match(this.rules[U[$]]),z&&(!O||z[0].length>O[0].length)){if(O=z,N=$,this.options.backtrack_lexer){if(I=this.test_match(z,U[$]),I!==!1)return I;if(this._backtrack){O=!1;continue}else return!1}else if(!this.options.flex)break}return O?(I=this.test_match(O,U[N]),I!==!1?I:!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:s(function(){var O=this.next();return O||this.lex()},"lex"),begin:s(function(O){this.conditionStack.push(O)},"begin"),popState:s(function(){var O=this.conditionStack.length-1;return O>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(O){return O=this.conditionStack.length-1-Math.abs(O||0),O>=0?this.conditionStack[O]:"INITIAL"},"topState"),pushState:s(function(O){this.begin(O)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(O,z,N,U){var $=U;switch(N){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 8;case 16:return this.pushState("axis_data"),"X_AXIS";break;case 17:return this.pushState("axis_data"),"Y_AXIS";break;case 18:return this.pushState("axis_band_data"),24;break;case 19:return 31;case 20:return this.pushState("data"),16;break;case 21:return this.pushState("data"),18;break;case 22:return this.pushState("data_inner"),24;break;case 23:return 27;case 24:return this.popState(),26;break;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return F}();L.lexer=P;function M(){this.yy={}}return s(M,"Parser"),M.prototype=L,L.Parser=M,new M}();sN.parser=sN;Cle=sN});function oN(t){return t.type==="bar"}function Nw(t){return t.type==="band"}function yg(t){return t.type==="linear"}var Ow=_(()=>{"use strict";s(oN,"isBarPlot");s(Nw,"isBandAxisData");s(yg,"isLinearAxisData")});var vg,lN=_(()=>{"use strict";ic();vg=class{constructor(e){this.parentGroup=e}static{s(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,r){if(!this.parentGroup)return{width:e.reduce((a,o)=>Math.max(o.length,a),0)*r,height:r};let n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r);for(let a of e){let o=KY(i,1,a),l=o?o.width:a.length*r,u=o?o.height:r;n.width=Math.max(n.width,l),n.height=Math.max(n.height,u)}return i.remove(),n}}});var xg,cN=_(()=>{"use strict";xg=class{constructor(e,r,n,i){this.axisConfig=e;this.title=r;this.textDimensionCalculator=n;this.axisThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0};this.axisPosition="left";this.showTitle=!1;this.showLabel=!1;this.showTick=!1;this.showAxisLine=!1;this.outerPadding=0;this.titleTextHeight=0;this.labelTextHeight=0;this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{s(this,"BaseAxis")}setRange(e){this.range=e,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let r=e.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*e.width;this.outerPadding=Math.min(n.width/2,i);let a=n.height+this.axisConfig.labelPadding*2;this.labelTextHeight=n.height,a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-r}calculateSpaceIfDrawnVertical(e){let r=e.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*e.height;this.outerPadding=Math.min(n.height/2,i);let a=n.width+this.axisConfig.labelPadding*2;a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=e.width-r,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(r=>({text:r.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(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${r},${this.getScaleValue(n)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.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"}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),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 r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r} L ${this.getScaleValue(n)},${r+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.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"}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),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 r=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${r+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.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"}]}),e}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():[]}}});var Pw,_le=_(()=>{"use strict";Xt();it();cN();Pw=class extends xg{static{s(this,"BandAxis")}constructor(e,r,n,i,a){super(e,i,a,r),this.categories=n,this.scale=xp().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=xp().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),V.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}}});var Bw,Ale=_(()=>{"use strict";Xt();cN();Bw=class extends xg{static{s(this,"LinearAxis")}constructor(e,r,n,i,a){super(e,i,a,r),this.domain=n,this.scale=rl().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition==="left"&&e.reverse(),this.scale=rl().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function uN(t,e,r,n){let i=new vg(n);return Nw(t)?new Pw(e,r,t.categories,t.title,i):new Bw(e,r,[t.min,t.max],t.title,i)}var Lle=_(()=>{"use strict";Ow();lN();_le();Ale();s(uN,"getAxis")});function Dle(t,e,r,n){let i=new vg(n);return new hN(i,t,e,r)}var hN,Rle=_(()=>{"use strict";lN();hN=class{constructor(e,r,n,i){this.textDimensionCalculator=e;this.chartConfig=r;this.chartData=n;this.chartThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{s(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(r.width,e.width),i=r.height+2*this.chartConfig.titlePadding;return r.width<=n&&r.height<=i&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=i,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};s(Dle,"getChartTitleComponent")});var Fw,Mle=_(()=>{"use strict";Xt();Fw=class{constructor(e,r,n,i,a){this.plotData=e;this.xAxis=r;this.yAxis=n;this.orientation=i;this.plotIndex=a}static{s(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),r;return this.orientation==="horizontal"?r=ra().y(n=>n[0]).x(n=>n[1])(e):r=ra().x(n=>n[0]).y(n=>n[1])(e),r?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}});var zw,Ile=_(()=>{"use strict";zw=class{constructor(e,r,n,i,a,o){this.barData=e;this.boundingRect=r;this.xAxis=n;this.yAxis=i;this.orientation=a;this.plotIndex=o}static{s(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),i=n/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(a=>({x:this.boundingRect.x,y:a[0]-i,height:n,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(a=>({x:a[0]-i,y:a[1],width:n,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function Nle(t,e,r){return new fN(t,e,r)}var fN,Ole=_(()=>{"use strict";Mle();Ile();fN=class{constructor(e,r,n){this.chartConfig=e;this.chartData=r;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0}}static{s(this,"BasePlot")}setAxes(e,r){this.xAxis=e,this.yAxis=r}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[r,n]of this.chartData.plots.entries())switch(n.type){case"line":{let i=new Fw(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...i.getDrawableElement())}break;case"bar":{let i=new zw(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...i.getDrawableElement())}break}return e}};s(Nle,"getPlotComponent")});var $w,Ple=_(()=>{"use strict";Lle();Rle();Ole();Ow();$w=class{constructor(e,r,n,i){this.chartConfig=e;this.chartData=r;this.componentStore={title:Dle(e,r,n,i),plot:Nle(e,r,n),xAxis:uN(r.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},i),yAxis:uN(r.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},i)}}static{s(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:a,height:o});e-=l.width,r-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),i=l.height,r-=l.height,this.componentStore.xAxis.setAxisPosition("bottom"),l=this.componentStore.xAxis.calculateSpace({width:e,height:r}),r-=l.height,this.componentStore.yAxis.setAxisPosition("left"),l=this.componentStore.yAxis.calculateSpace({width:e,height:r}),n=l.width,e-=l.width,e>0&&(a+=e,e=0),r>0&&(o+=r,r=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.xAxis.setRange([n,n+a]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:i+o}),this.componentStore.yAxis.setRange([i,i+o]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(u=>oN(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=0,o=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:o,height:l});e-=u.width,r-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=u.height,r-=u.height,this.componentStore.xAxis.setAxisPosition("left"),u=this.componentStore.xAxis.calculateSpace({width:e,height:r}),e-=u.width,i=u.width,this.componentStore.yAxis.setAxisPosition("top"),u=this.componentStore.yAxis.calculateSpace({width:e,height:r}),r-=u.height,a=n+u.height,e>0&&(o+=e,e=0),r>0&&(l+=r,r=0),this.componentStore.plot.calculateSpace({width:o,height:l}),this.componentStore.plot.setBoundingBoxXY({x:i,y:a}),this.componentStore.yAxis.setRange([i,i+o]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:n}),this.componentStore.xAxis.setRange([a,a+l]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(h=>oN(h))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let r of Object.values(this.componentStore))e.push(...r.getDrawableElements());return e}}});var Gw,Ble=_(()=>{"use strict";Ple();Gw=class{static{s(this,"XYChartBuilder")}static build(e,r,n,i){return new $w(e,r,n,i).getDrawableElement()}}});function zle(){let t=j0(),e=_r();return ms(t.xyChart,e.themeVariables.xyChart)}function $le(){let t=_r();return ms(dr.xyChart,t.xyChart)}function Gle(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function mN(t){let e=_r();return $r(t.trim(),e)}function zPe(t){Fle=t}function $Pe(t){t==="horizontal"?K2.chartOrientation="horizontal":K2.chartOrientation="vertical"}function GPe(t){Jr.xAxis.title=mN(t.text)}function Vle(t,e){Jr.xAxis={type:"linear",title:Jr.xAxis.title,min:t,max:e},Vw=!0}function VPe(t){Jr.xAxis={type:"band",title:Jr.xAxis.title,categories:t.map(e=>mN(e.text))},Vw=!0}function UPe(t){Jr.yAxis.title=mN(t.text)}function qPe(t,e){Jr.yAxis={type:"linear",title:Jr.yAxis.title,min:t,max:e},pN=!0}function WPe(t){let e=Math.min(...t),r=Math.max(...t),n=yg(Jr.yAxis)?Jr.yAxis.min:1/0,i=yg(Jr.yAxis)?Jr.yAxis.max:-1/0;Jr.yAxis={type:"linear",title:Jr.yAxis.title,min:Math.min(n,e),max:Math.max(i,r)}}function Ule(t){let e=[];if(t.length===0)return e;if(!Vw){let r=yg(Jr.xAxis)?Jr.xAxis.min:1/0,n=yg(Jr.xAxis)?Jr.xAxis.max:-1/0;Vle(Math.min(r,1),Math.max(n,t.length))}if(pN||WPe(t),Nw(Jr.xAxis)&&(e=Jr.xAxis.categories.map((r,n)=>[r,t[n]])),yg(Jr.xAxis)){let r=Jr.xAxis.min,n=Jr.xAxis.max,i=(n-r)/(t.length-1),a=[];for(let o=r;o<=n;o+=i)a.push(`${o}`);e=a.map((o,l)=>[o,t[l]])}return e}function qle(t){return dN[t===0?0:t%dN.length]}function HPe(t,e){let r=Ule(e);Jr.plots.push({type:"line",strokeFill:qle(j2),strokeWidth:2,data:r}),j2++}function YPe(t,e){let r=Ule(e);Jr.plots.push({type:"bar",fill:qle(j2),data:r}),j2++}function XPe(){if(Jr.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return Jr.title=Qr(),Gw.build(K2,Jr,Q2,Fle)}function jPe(){return Q2}function KPe(){return K2}var j2,Fle,K2,Q2,Jr,dN,Vw,pN,QPe,Wle,Hle=_(()=>{"use strict";zs();Pl();vb();pr();Qt();Ci();Ble();Ow();j2=0,K2=$le(),Q2=zle(),Jr=Gle(),dN=Q2.plotColorPalette.split(",").map(t=>t.trim()),Vw=!1,pN=!1;s(zle,"getChartDefaultThemeConfig");s($le,"getChartDefaultConfig");s(Gle,"getChartDefaultData");s(mN,"textSanitizer");s(zPe,"setTmpSVGG");s($Pe,"setOrientation");s(GPe,"setXAxisTitle");s(Vle,"setXAxisRangeData");s(VPe,"setXAxisBand");s(UPe,"setYAxisTitle");s(qPe,"setYAxisRangeData");s(WPe,"setYAxisRangeFromPlotData");s(Ule,"transformDataWithoutCategory");s(qle,"getPlotColorFromPalette");s(HPe,"setLineData");s(YPe,"setBarData");s(XPe,"getDrawableElem");s(jPe,"getChartThemeConfig");s(KPe,"getChartConfig");QPe=s(function(){br(),j2=0,K2=$le(),Jr=Gle(),Q2=zle(),dN=Q2.plotColorPalette.split(",").map(t=>t.trim()),Vw=!1,pN=!1},"clear"),Wle={getDrawableElem:XPe,clear:QPe,setAccTitle:Ar,getAccTitle:Gr,setDiagramTitle:an,getDiagramTitle:Qr,getAccDescription:Ur,setAccDescription:Vr,setOrientation:$Pe,setXAxisTitle:GPe,setXAxisRangeData:Vle,setXAxisBand:VPe,setYAxisTitle:UPe,setYAxisRangeData:qPe,setLineData:HPe,setBarData:YPe,setTmpSVGG:zPe,getChartThemeConfig:jPe,getChartConfig:KPe}});var ZPe,Yle,Xle=_(()=>{"use strict";it();p0();Un();ZPe=s((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),o=i.getChartConfig();function l(v){return v==="top"?"text-before-edge":"middle"}s(l,"getDominantBaseLine");function u(v){return v==="left"?"start":v==="right"?"end":"middle"}s(u,"getTextAnchor");function h(v){return`translate(${v.x}, ${v.y}) rotate(${v.rotation||0})`}s(h,"getTextTransformation"),V.debug(`Rendering xychart chart
`+t);let f=Bo(e),d=f.append("g").attr("class","main"),p=d.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");xr(f,o.height,o.width,!0),f.attr("viewBox",`0 0 ${o.width} ${o.height}`),p.attr("fill",a.backgroundColor),i.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));let m=i.getDrawableElem(),g={};function y(v){let x=d,b="";for(let[k]of v.entries()){let A=d;k>0&&g[b]&&(A=g[b]),b+=v[k],x=g[b],x||(x=g[b]=A.append("g").attr("class",v[k]))}return x}s(y,"getGroup");for(let v of m){if(v.data.length===0)continue;let x=y(v.groupTexts);switch(v.type){case"rect":x.selectAll("rect").data(v.data).enter().append("rect").attr("x",b=>b.x).attr("y",b=>b.y).attr("width",b=>b.width).attr("height",b=>b.height).attr("fill",b=>b.fill).attr("stroke",b=>b.strokeFill).attr("stroke-width",b=>b.strokeWidth);break;case"text":x.selectAll("text").data(v.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",b=>b.fill).attr("font-size",b=>b.fontSize).attr("dominant-baseline",b=>l(b.verticalPos)).attr("text-anchor",b=>u(b.horizontalPos)).attr("transform",b=>h(b)).text(b=>b.text);break;case"path":x.selectAll("path").data(v.data).enter().append("path").attr("d",b=>b.path).attr("fill",b=>b.fill?b.fill:"none").attr("stroke",b=>b.strokeFill).attr("stroke-width",b=>b.strokeWidth);break}}},"draw"),Yle={draw:ZPe}});var jle={};ur(jle,{diagram:()=>JPe});var JPe,Kle=_(()=>{"use strict";Sle();Hle();Xle();JPe={parser:Cle,db:Wle,renderer:Yle}});var gN,Jle,ece=_(()=>{"use strict";gN=function(){var t=s(function(ce,Z,fe,ne){for(fe=fe||{},ne=ce.length;ne--;fe[ce[ne]]=Z);return fe},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],o=[1,18],l=[2,7],u=[1,22],h=[1,23],f=[1,24],d=[1,25],p=[1,26],m=[1,27],g=[1,20],y=[1,28],v=[1,29],x=[62,63],b=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],k=[1,47],A=[1,48],w=[1,49],T=[1,50],C=[1,51],E=[1,52],S=[1,53],R=[53,54],D=[1,64],L=[1,60],P=[1,61],M=[1,62],F=[1,63],I=[1,65],O=[1,69],z=[1,70],N=[1,67],U=[1,68],$=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],W={trace:s(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,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$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",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"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],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:s(function(Z,fe,ne,H,Q,K,re){var ie=K.length-1;switch(Q){case 4:this.$=K[ie].trim(),H.setAccTitle(this.$);break;case 5:case 6:this.$=K[ie].trim(),H.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:H.addRequirement(K[ie-3],K[ie-4]);break;case 14:H.setNewReqId(K[ie-2]);break;case 15:H.setNewReqText(K[ie-2]);break;case 16:H.setNewReqRisk(K[ie-2]);break;case 17:H.setNewReqVerifyMethod(K[ie-2]);break;case 20:this.$=H.RequirementType.REQUIREMENT;break;case 21:this.$=H.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=H.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=H.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=H.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=H.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=H.RiskLevel.LOW_RISK;break;case 27:this.$=H.RiskLevel.MED_RISK;break;case 28:this.$=H.RiskLevel.HIGH_RISK;break;case 29:this.$=H.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=H.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=H.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=H.VerifyType.VERIFY_TEST;break;case 33:H.addElement(K[ie-3]);break;case 34:H.setNewElementType(K[ie-2]);break;case 35:H.setNewElementDocRef(K[ie-2]);break;case 38:H.addRelationship(K[ie-2],K[ie],K[ie-4]);break;case 39:H.addRelationship(K[ie-2],K[ie-4],K[ie]);break;case 40:this.$=H.Relationships.CONTAINS;break;case 41:this.$=H.Relationships.COPIES;break;case 42:this.$=H.Relationships.DERIVES;break;case 43:this.$=H.Relationships.SATISFIES;break;case 44:this.$=H.Relationships.VERIFIES;break;case 45:this.$=H.Relationships.REFINES;break;case 46:this.$=H.Relationships.TRACES;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:o,7:13,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:o,7:31,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},{4:17,5:o,7:32,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},{4:17,5:o,7:33,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},{4:17,5:o,7:34,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},{4:17,5:o,7:35,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},t(x,[2,20]),t(x,[2,21]),t(x,[2,22]),t(x,[2,23]),t(x,[2,24]),t(x,[2,25]),t(b,[2,49]),t(b,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:k,56:A,57:w,58:T,59:C,60:E,61:S},{52:54,55:k,56:A,57:w,58:T,59:C,60:E,61:S},{5:[1,55]},{5:[1,56]},{53:[1,57]},t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),{54:[1,58]},{5:D,20:59,21:L,24:P,26:M,28:F,30:I},{5:O,30:z,46:66,47:N,49:U},{23:71,62:y,63:v},{23:72,62:y,63:v},t($,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:D,20:77,21:L,24:P,26:M,28:F,30:I},t($,[2,19]),t($,[2,33]),{22:[1,78]},{22:[1,79]},{5:O,30:z,46:80,47:N,49:U},t($,[2,37]),t($,[2,38]),t($,[2,39]),{23:81,62:y,63:v},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},t($,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},t($,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:D,20:106,21:L,24:P,26:M,28:F,30:I},{5:D,20:107,21:L,24:P,26:M,28:F,30:I},{5:D,20:108,21:L,24:P,26:M,28:F,30:I},{5:D,20:109,21:L,24:P,26:M,28:F,30:I},{5:O,30:z,46:110,47:N,49:U},{5:O,30:z,46:111,47:N,49:U},t($,[2,14]),t($,[2,15]),t($,[2,16]),t($,[2,17]),t($,[2,34]),t($,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:s(function(Z,fe){if(fe.recoverable)this.trace(Z);else{var ne=new Error(Z);throw ne.hash=fe,ne}},"parseError"),parse:s(function(Z){var fe=this,ne=[0],H=[],Q=[null],K=[],re=this.table,ie="",ye=0,j=0,De=0,oe=2,Re=1,Pe=K.slice.call(arguments,1),Se=Object.create(this.lexer),Ue={yy:{}};for(var Oe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Oe)&&(Ue.yy[Oe]=this.yy[Oe]);Se.setInput(Z,Ue.yy),Ue.yy.lexer=Se,Ue.yy.parser=this,typeof Se.yylloc>"u"&&(Se.yylloc={});var _e=Se.yylloc;K.push(_e);var he=Se.options&&Se.options.ranges;typeof Ue.yy.parseError=="function"?this.parseError=Ue.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function q(Je){ne.length=ne.length-2*Je,Q.length=Q.length-Je,K.length=K.length-Je}s(q,"popStack");function se(){var Je;return Je=H.pop()||Se.lex()||Re,typeof Je!="number"&&(Je instanceof Array&&(H=Je,Je=H.pop()),Je=fe.symbols_[Je]||Je),Je}s(se,"lex");for(var ue,X,ae,pe,de,Ie,Ne={},Be,ze,qe,Fe;;){if(ae=ne[ne.length-1],this.defaultActions[ae]?pe=this.defaultActions[ae]:((ue===null||typeof ue>"u")&&(ue=se()),pe=re[ae]&&re[ae][ue]),typeof pe>"u"||!pe.length||!pe[0]){var we="";Fe=[];for(Be in re[ae])this.terminals_[Be]&&Be>oe&&Fe.push("'"+this.terminals_[Be]+"'");Se.showPosition?we="Parse error on line "+(ye+1)+`:
`+Se.showPosition()+`
Expecting `+Fe.join(", ")+", got '"+(this.terminals_[ue]||ue)+"'":we="Parse error on line "+(ye+1)+": Unexpected "+(ue==Re?"end of input":"'"+(this.terminals_[ue]||ue)+"'"),this.parseError(we,{text:Se.match,token:this.terminals_[ue]||ue,line:Se.yylineno,loc:_e,expected:Fe})}if(pe[0]instanceof Array&&pe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ae+", token: "+ue);switch(pe[0]){case 1:ne.push(ue),Q.push(Se.yytext),K.push(Se.yylloc),ne.push(pe[1]),ue=null,X?(ue=X,X=null):(j=Se.yyleng,ie=Se.yytext,ye=Se.yylineno,_e=Se.yylloc,De>0&&De--);break;case 2:if(ze=this.productions_[pe[1]][1],Ne.$=Q[Q.length-ze],Ne._$={first_line:K[K.length-(ze||1)].first_line,last_line:K[K.length-1].last_line,first_column:K[K.length-(ze||1)].first_column,last_column:K[K.length-1].last_column},he&&(Ne._$.range=[K[K.length-(ze||1)].range[0],K[K.length-1].range[1]]),Ie=this.performAction.apply(Ne,[ie,j,ye,Ue.yy,pe[1],Q,K].concat(Pe)),typeof Ie<"u")return Ie;ze&&(ne=ne.slice(0,-1*ze*2),Q=Q.slice(0,-1*ze),K=K.slice(0,-1*ze)),ne.push(this.productions_[pe[1]][0]),Q.push(Ne.$),K.push(Ne._$),qe=re[ne[ne.length-2]][ne[ne.length-1]],ne.push(qe);break;case 3:return!0}}return!0},"parse")},ee=function(){var ce={EOF:1,parseError:s(function(fe,ne){if(this.yy.parser)this.yy.parser.parseError(fe,ne);else throw new Error(fe)},"parseError"),setInput:s(function(Z,fe){return this.yy=fe||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:s(function(){var Z=this._input[0];this.yytext+=Z,this.yyleng++,this.offset++,this.match+=Z,this.matched+=Z;var fe=Z.match(/(?:\r\n?|\n).*/g);return fe?(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:s(function(Z){var fe=Z.length,ne=Z.split(/(?:\r\n?|\n)/g);this._input=Z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-fe),this.offset-=fe;var H=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 Q=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===H.length?this.yylloc.first_column:0)+H[H.length-ne.length].length-ne[0].length:this.yylloc.first_column-fe},this.options.ranges&&(this.yylloc.range=[Q[0],Q[0]+this.yyleng-fe]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(Z){this.unput(this.match.slice(Z))},"less"),pastInput:s(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:s(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:s(function(){var Z=this.pastInput(),fe=new Array(Z.length+1).join("-");return Z+this.upcomingInput()+`
`+fe+"^"},"showPosition"),test_match:s(function(Z,fe){var ne,H,Q;if(this.options.backtrack_lexer&&(Q={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&&(Q.yylloc.range=this.yylloc.range.slice(0))),H=Z[0].match(/(?:\r\n?|\n).*/g),H&&(this.yylineno+=H.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:H?H[H.length-1].length-H[H.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],ne=this.performAction.call(this,this.yy,this,fe,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ne)return ne;if(this._backtrack){for(var K in Q)this[K]=Q[K];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Z,fe,ne,H;this._more||(this.yytext="",this.match="");for(var Q=this._currentRules(),K=0;K<Q.length;K++)if(ne=this._input.match(this.rules[Q[K]]),ne&&(!fe||ne[0].length>fe[0].length)){if(fe=ne,H=K,this.options.backtrack_lexer){if(Z=this.test_match(ne,Q[K]),Z!==!1)return Z;if(this._backtrack){fe=!1;continue}else return!1}else if(!this.options.flex)break}return fe?(Z=this.test_match(fe,Q[H]),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:s(function(){var fe=this.next();return fe||this.lex()},"lex"),begin:s(function(fe){this.conditionStack.push(fe)},"begin"),popState:s(function(){var fe=this.conditionStack.length-1;return fe>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(fe){return fe=this.conditionStack.length-1-Math.abs(fe||0),fe>=0?this.conditionStack[fe]:"INITIAL"},"topState"),pushState:s(function(fe){this.begin(fe)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(fe,ne,H,Q){var K=Q;switch(H){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 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return ne.yytext=ne.yytext.trim(),62;break}},"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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/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,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],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,50],inclusive:!0}}};return ce}();W.lexer=ee;function te(){this.yy={}}return s(te,"Parser"),te.prototype=W,W.Parser=te,new te}();gN.parser=gN;Jle=gN});var yN,Ds,Z2,af,J2,nBe,iBe,aBe,sBe,oBe,lBe,cBe,uBe,hBe,fBe,dBe,pBe,mBe,gBe,yBe,vBe,xBe,tce,rce=_(()=>{"use strict";gt();it();Ci();yN=[],Ds={},Z2=new Map,af={},J2=new Map,nBe={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},iBe={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},aBe={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},sBe={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},oBe=s((t,e)=>(Z2.has(t)||Z2.set(t,{name:t,type:e,id:Ds.id,text:Ds.text,risk:Ds.risk,verifyMethod:Ds.verifyMethod}),Ds={},Z2.get(t)),"addRequirement"),lBe=s(()=>Z2,"getRequirements"),cBe=s(t=>{Ds!==void 0&&(Ds.id=t)},"setNewReqId"),uBe=s(t=>{Ds!==void 0&&(Ds.text=t)},"setNewReqText"),hBe=s(t=>{Ds!==void 0&&(Ds.risk=t)},"setNewReqRisk"),fBe=s(t=>{Ds!==void 0&&(Ds.verifyMethod=t)},"setNewReqVerifyMethod"),dBe=s(t=>(J2.has(t)||(J2.set(t,{name:t,type:af.type,docRef:af.docRef}),V.info("Added new requirement: ",t)),af={},J2.get(t)),"addElement"),pBe=s(()=>J2,"getElements"),mBe=s(t=>{af!==void 0&&(af.type=t)},"setNewElementType"),gBe=s(t=>{af!==void 0&&(af.docRef=t)},"setNewElementDocRef"),yBe=s((t,e,r)=>{yN.push({type:t,src:e,dst:r})},"addRelationship"),vBe=s(()=>yN,"getRelationships"),xBe=s(()=>{yN=[],Ds={},Z2=new Map,af={},J2=new Map,br()},"clear"),tce={RequirementType:nBe,RiskLevel:iBe,VerifyType:aBe,Relationships:sBe,getConfig:s(()=>le().req,"getConfig"),addRequirement:oBe,getRequirements:lBe,setNewReqId:cBe,setNewReqText:uBe,setNewReqRisk:hBe,setNewReqVerifyMethod:fBe,setAccTitle:Ar,getAccTitle:Gr,setAccDescription:Vr,getAccDescription:Ur,addElement:dBe,getElements:pBe,setNewElementType:mBe,setNewElementDocRef:gBe,addRelationship:yBe,getRelationships:vBe,clear:xBe}});var bBe,nce,ice=_(()=>{"use strict";bBe=s(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};
}
`,"getStyles"),nce=bBe});var vN,kBe,xN,ace=_(()=>{"use strict";vN={CONTAINS:"contains",ARROW:"arrow"},kBe=s((t,e)=>{let r=t.append("defs").append("marker").attr("id",vN.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",vN.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0
L${e.line_height},${e.line_height/2}
M${e.line_height},${e.line_height/2}
L0,${e.line_height}`).attr("stroke-width",1)},"insertLineEndings"),xN={ReqMarkers:vN,insertLineEndings:kBe}});var Qn,sce,oce,lce,cce,wBe,TBe,EBe,CBe,SBe,_Be,bg,ABe,uce,hce=_(()=>{"use strict";Xt();Dd();la();gt();it();Un();Qt();ace();Qn={},sce=0,oce=s((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Qn.rect_min_width+"px").attr("height",Qn.rect_min_height+"px"),"newRectNode"),lce=s((t,e,r)=>{let n=Qn.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",Qn.rect_padding).attr("dominant-baseline","hanging"),a=0;r.forEach(h=>{a==0?i.append("tspan").attr("text-anchor","middle").attr("x",Qn.rect_min_width/2).attr("dy",0).text(h):i.append("tspan").attr("text-anchor","middle").attr("x",Qn.rect_min_width/2).attr("dy",Qn.line_height*.75).text(h),a++});let o=1.5*Qn.rect_padding,l=a*Qn.line_height*.75,u=o+l;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Qn.rect_min_width).attr("y1",u).attr("y2",u),{titleNode:i,y:u}},"newTitleNode"),cce=s((t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Qn.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0,o=30,l=[];return r.forEach(u=>{let h=u.length;for(;h>o&&a<3;){let f=u.substring(0,o);u=u.substring(o,u.length),h=u.length,l[l.length]=f,a++}if(a==3){let f=l[l.length-1];l[l.length-1]=f.substring(0,f.length-4)+"..."}else l[l.length]=u;a=0}),l.forEach(u=>{i.append("tspan").attr("x",Qn.rect_padding).attr("dy",Qn.line_height).text(u)}),i},"newBodyNode"),wBe=s((t,e,r,n)=>{let i=e.node().getTotalLength(),a=e.node().getPointAtLength(i*.5),o="rel"+sce;sce++;let u=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-u.width/2).attr("y",a.y-u.height/2).attr("width",u.width).attr("height",u.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),TBe=s(function(t,e,r,n,i){let a=r.edge(bg(e.src),bg(e.dst)),o=ra().x(function(u){return u.x}).y(function(u){return u.y}),l=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",o(a.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?l.attr("marker-start","url("+$e.getUrl(Qn.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(l.attr("stroke-dasharray","10,7"),l.attr("marker-end","url("+$e.getUrl(Qn.arrowMarkerAbsolute)+"#"+xN.ReqMarkers.ARROW+"_line_ending)")),wBe(t,l,Qn,`<<${e.type}>>`)},"drawRelationshipFromLayout"),EBe=s((t,e,r)=>{t.forEach((n,i)=>{i=bg(i),V.info("Added new requirement: ",i);let a=r.append("g").attr("id",i),o="req-"+i,l=oce(a,o),u=[],h=lce(a,i+"_title",[`<<${n.type}>>`,`${n.name}`]);u.push(h.titleNode);let f=cce(a,i+"_body",[`Id: ${n.id}`,`Text: ${n.text}`,`Risk: ${n.risk}`,`Verification: ${n.verifyMethod}`],h.y);u.push(f);let d=l.node().getBBox();e.setNode(i,{width:d.width,height:d.height,shape:"rect",id:i})})},"drawReqs"),CBe=s((t,e,r)=>{t.forEach((n,i)=>{let a=bg(i),o=r.append("g").attr("id",a),l="element-"+a,u=oce(o,l),h=[],f=lce(o,l+"_title",["<<Element>>",`${i}`]);h.push(f.titleNode);let d=cce(o,l+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],f.y);h.push(d);let p=u.node().getBBox();e.setNode(a,{width:p.width,height:p.height,shape:"rect",id:a})})},"drawElements"),SBe=s((t,e)=>(t.forEach(function(r){let n=bg(r.src),i=bg(r.dst);e.setEdge(n,i,{relationship:r})}),t),"addRelationships"),_Be=s(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},"adjustEntities"),bg=s(t=>t.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),ABe=s((t,e,r,n)=>{Qn=le().requirement;let i=Qn.securityLevel,a;i==="sandbox"&&(a=Me("#i"+e));let l=(i==="sandbox"?Me(a.nodes()[0].contentDocument.body):Me("body")).select(`[id='${e}']`);xN.insertLineEndings(l,Qn);let u=new ir({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Qn.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}}),h=n.db.getRequirements(),f=n.db.getElements(),d=n.db.getRelationships();EBe(h,u,l),CBe(f,u,l),SBe(d,u),eo(u),_Be(l,u),d.forEach(function(v){TBe(l,v,u,e,n)});let p=Qn.rect_padding,m=l.node().getBBox(),g=m.width+p*2,y=m.height+p*2;xr(l,y,g,Qn.useMaxWidth),l.attr("viewBox",`${m.x-p} ${m.y-p} ${g} ${y}`)},"draw"),uce={draw:ABe}});var fce={};ur(fce,{diagram:()=>LBe});var LBe,dce=_(()=>{"use strict";ece();rce();ice();hce();LBe={parser:Jle,db:tce,renderer:uce,styles:nce}});var bN,gce,yce=_(()=>{"use strict";bN=function(){var t=s(function(H,Q,K,re){for(K=K||{},re=H.length;re--;K[H[re]]=Q);return K},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],o=[1,11],l=[1,13],u=[1,14],h=[1,16],f=[1,17],d=[1,18],p=[1,24],m=[1,25],g=[1,26],y=[1,27],v=[1,28],x=[1,29],b=[1,30],k=[1,31],A=[1,32],w=[1,33],T=[1,34],C=[1,35],E=[1,36],S=[1,37],R=[1,38],D=[1,39],L=[1,41],P=[1,42],M=[1,43],F=[1,44],I=[1,45],O=[1,46],z=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],N=[4,5,16,50,52,53],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],W=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],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,54,59,60,61,62,70],te=[68,69,70],ce=[1,122],Z={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:s(function(Q,K,re,ie,ye,j,De){var oe=j.length-1;switch(ye){case 3:return ie.apply(j[oe]),j[oe];break;case 4:case 9:this.$=[];break;case 5:case 10:j[oe-1].push(j[oe]),this.$=j[oe-1];break;case 6:case 7:case 11:case 12:this.$=j[oe];break;case 8:case 13:this.$=[];break;case 15:j[oe].type="createParticipant",this.$=j[oe];break;case 16:j[oe-1].unshift({type:"boxStart",boxData:ie.parseBoxData(j[oe-2])}),j[oe-1].push({type:"boxEnd",boxText:j[oe-2]}),this.$=j[oe-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(j[oe-2]),sequenceIndexStep:Number(j[oe-1]),sequenceVisible:!0,signalType:ie.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(j[oe-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:ie.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:ie.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:ie.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:ie.LINETYPE.ACTIVE_START,actor:j[oe-1].actor};break;case 23:this.$={type:"activeEnd",signalType:ie.LINETYPE.ACTIVE_END,actor:j[oe-1].actor};break;case 29:ie.setDiagramTitle(j[oe].substring(6)),this.$=j[oe].substring(6);break;case 30:ie.setDiagramTitle(j[oe].substring(7)),this.$=j[oe].substring(7);break;case 31:this.$=j[oe].trim(),ie.setAccTitle(this.$);break;case 32:case 33:this.$=j[oe].trim(),ie.setAccDescription(this.$);break;case 34:j[oe-1].unshift({type:"loopStart",loopText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.LOOP_START}),j[oe-1].push({type:"loopEnd",loopText:j[oe-2],signalType:ie.LINETYPE.LOOP_END}),this.$=j[oe-1];break;case 35:j[oe-1].unshift({type:"rectStart",color:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.RECT_START}),j[oe-1].push({type:"rectEnd",color:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.RECT_END}),this.$=j[oe-1];break;case 36:j[oe-1].unshift({type:"optStart",optText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.OPT_START}),j[oe-1].push({type:"optEnd",optText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.OPT_END}),this.$=j[oe-1];break;case 37:j[oe-1].unshift({type:"altStart",altText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.ALT_START}),j[oe-1].push({type:"altEnd",signalType:ie.LINETYPE.ALT_END}),this.$=j[oe-1];break;case 38:j[oe-1].unshift({type:"parStart",parText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.PAR_START}),j[oe-1].push({type:"parEnd",signalType:ie.LINETYPE.PAR_END}),this.$=j[oe-1];break;case 39:j[oe-1].unshift({type:"parStart",parText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.PAR_OVER_START}),j[oe-1].push({type:"parEnd",signalType:ie.LINETYPE.PAR_END}),this.$=j[oe-1];break;case 40:j[oe-1].unshift({type:"criticalStart",criticalText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.CRITICAL_START}),j[oe-1].push({type:"criticalEnd",signalType:ie.LINETYPE.CRITICAL_END}),this.$=j[oe-1];break;case 41:j[oe-1].unshift({type:"breakStart",breakText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.BREAK_START}),j[oe-1].push({type:"breakEnd",optText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.BREAK_END}),this.$=j[oe-1];break;case 43:this.$=j[oe-3].concat([{type:"option",optionText:ie.parseMessage(j[oe-1]),signalType:ie.LINETYPE.CRITICAL_OPTION},j[oe]]);break;case 45:this.$=j[oe-3].concat([{type:"and",parText:ie.parseMessage(j[oe-1]),signalType:ie.LINETYPE.PAR_AND},j[oe]]);break;case 47:this.$=j[oe-3].concat([{type:"else",altText:ie.parseMessage(j[oe-1]),signalType:ie.LINETYPE.ALT_ELSE},j[oe]]);break;case 48:j[oe-3].draw="participant",j[oe-3].type="addParticipant",j[oe-3].description=ie.parseMessage(j[oe-1]),this.$=j[oe-3];break;case 49:j[oe-1].draw="participant",j[oe-1].type="addParticipant",this.$=j[oe-1];break;case 50:j[oe-3].draw="actor",j[oe-3].type="addParticipant",j[oe-3].description=ie.parseMessage(j[oe-1]),this.$=j[oe-3];break;case 51:j[oe-1].draw="actor",j[oe-1].type="addParticipant",this.$=j[oe-1];break;case 52:j[oe-1].type="destroyParticipant",this.$=j[oe-1];break;case 53:this.$=[j[oe-1],{type:"addNote",placement:j[oe-2],actor:j[oe-1].actor,text:j[oe]}];break;case 54:j[oe-2]=[].concat(j[oe-1],j[oe-1]).slice(0,2),j[oe-2][0]=j[oe-2][0].actor,j[oe-2][1]=j[oe-2][1].actor,this.$=[j[oe-1],{type:"addNote",placement:ie.PLACEMENT.OVER,actor:j[oe-2].slice(0,2),text:j[oe]}];break;case 55:this.$=[j[oe-1],{type:"addLinks",actor:j[oe-1].actor,text:j[oe]}];break;case 56:this.$=[j[oe-1],{type:"addALink",actor:j[oe-1].actor,text:j[oe]}];break;case 57:this.$=[j[oe-1],{type:"addProperties",actor:j[oe-1].actor,text:j[oe]}];break;case 58:this.$=[j[oe-1],{type:"addDetails",actor:j[oe-1].actor,text:j[oe]}];break;case 61:this.$=[j[oe-2],j[oe]];break;case 62:this.$=j[oe];break;case 63:this.$=ie.PLACEMENT.LEFTOF;break;case 64:this.$=ie.PLACEMENT.RIGHTOF;break;case 65:this.$=[j[oe-4],j[oe-1],{type:"addMessage",from:j[oe-4].actor,to:j[oe-1].actor,signalType:j[oe-3],msg:j[oe],activate:!0},{type:"activeStart",signalType:ie.LINETYPE.ACTIVE_START,actor:j[oe-1].actor}];break;case 66:this.$=[j[oe-4],j[oe-1],{type:"addMessage",from:j[oe-4].actor,to:j[oe-1].actor,signalType:j[oe-3],msg:j[oe]},{type:"activeEnd",signalType:ie.LINETYPE.ACTIVE_END,actor:j[oe-4].actor}];break;case 67:this.$=[j[oe-3],j[oe-1],{type:"addMessage",from:j[oe-3].actor,to:j[oe-1].actor,signalType:j[oe-2],msg:j[oe]}];break;case 68:this.$={type:"addParticipant",actor:j[oe]};break;case 69:this.$=ie.LINETYPE.SOLID_OPEN;break;case 70:this.$=ie.LINETYPE.DOTTED_OPEN;break;case 71:this.$=ie.LINETYPE.SOLID;break;case 72:this.$=ie.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=ie.LINETYPE.DOTTED;break;case 74:this.$=ie.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=ie.LINETYPE.SOLID_CROSS;break;case 76:this.$=ie.LINETYPE.DOTTED_CROSS;break;case 77:this.$=ie.LINETYPE.SOLID_POINT;break;case 78:this.$=ie.LINETYPE.DOTTED_POINT;break;case 79:this.$=ie.parseMessage(j[oe].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,54,59,60,61,62,70],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,12:12,13:l,14:u,17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},t(z,[2,5]),{9:47,12:12,13:l,14:u,17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},t(z,[2,7]),t(z,[2,8]),t(z,[2,14]),{12:48,50:S,52:R,53:D},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:O},{22:55,70:O},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(z,[2,29]),t(z,[2,30]),{32:[1,61]},{34:[1,62]},t(z,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:O},{22:72,70:O},{22:73,70:O},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:O},{22:90,70:O},{22:91,70:O},{22:92,70:O},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(z,[2,6]),t(z,[2,15]),t(N,[2,9],{10:93}),t(z,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(z,[2,21]),{5:[1,97]},{5:[1,98]},t(z,[2,24]),t(z,[2,25]),t(z,[2,26]),t(z,[2,27]),t(z,[2,28]),t(z,[2,31]),t(z,[2,32]),t(U,i,{7:99}),t(U,i,{7:100}),t(U,i,{7:101}),t($,i,{40:102,7:103}),t(W,i,{42:104,7:105}),t(W,i,{7:105,42:106}),t(ee,i,{45:107,7:108}),t(U,i,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:O},t(te,[2,69]),t(te,[2,70]),t(te,[2,71]),t(te,[2,72]),t(te,[2,73]),t(te,[2,74]),t(te,[2,75]),t(te,[2,76]),t(te,[2,77]),t(te,[2,78]),{22:118,70:O},{22:120,58:119,70:O},{70:[2,63]},{70:[2,64]},{56:121,81:ce},{56:123,81:ce},{56:124,81:ce},{56:125,81:ce},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:S,52:R,53:D},{5:[1,131]},t(z,[2,19]),t(z,[2,20]),t(z,[2,22]),t(z,[2,23]),{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,132],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,133],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,134],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{16:[1,135]},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[2,46],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,49:[1,136],50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{16:[1,137]},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[2,44],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,48:[1,138],50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{16:[1,139]},{16:[1,140]},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[2,42],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,47:[1,141],50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,142],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{15:[1,143]},t(z,[2,49]),{15:[1,144]},t(z,[2,51]),t(z,[2,52]),{22:145,70:O},{22:146,70:O},{56:147,81:ce},{56:148,81:ce},{56:149,81:ce},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(z,[2,16]),t(N,[2,10]),{12:151,50:S,52:R,53:D},t(N,[2,12]),t(N,[2,13]),t(z,[2,18]),t(z,[2,34]),t(z,[2,35]),t(z,[2,36]),t(z,[2,37]),{15:[1,152]},t(z,[2,38]),{15:[1,153]},t(z,[2,39]),t(z,[2,40]),{15:[1,154]},t(z,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:ce},{56:158,81:ce},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:O},t(N,[2,11]),t($,i,{7:103,40:160}),t(W,i,{7:105,42:161}),t(ee,i,{7:108,45:162}),t(z,[2,48]),t(z,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:s(function(Q,K){if(K.recoverable)this.trace(Q);else{var re=new Error(Q);throw re.hash=K,re}},"parseError"),parse:s(function(Q){var K=this,re=[0],ie=[],ye=[null],j=[],De=this.table,oe="",Re=0,Pe=0,Se=0,Ue=2,Oe=1,_e=j.slice.call(arguments,1),he=Object.create(this.lexer),q={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(q.yy[se]=this.yy[se]);he.setInput(Q,q.yy),q.yy.lexer=he,q.yy.parser=this,typeof he.yylloc>"u"&&(he.yylloc={});var ue=he.yylloc;j.push(ue);var X=he.options&&he.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(Ut){re.length=re.length-2*Ut,ye.length=ye.length-Ut,j.length=j.length-Ut}s(ae,"popStack");function pe(){var Ut;return Ut=ie.pop()||he.lex()||Oe,typeof Ut!="number"&&(Ut instanceof Array&&(ie=Ut,Ut=ie.pop()),Ut=K.symbols_[Ut]||Ut),Ut}s(pe,"lex");for(var de,Ie,Ne,Be,ze,qe,Fe={},we,Je,We,or;;){if(Ne=re[re.length-1],this.defaultActions[Ne]?Be=this.defaultActions[Ne]:((de===null||typeof de>"u")&&(de=pe()),Be=De[Ne]&&De[Ne][de]),typeof Be>"u"||!Be.length||!Be[0]){var Cr="";or=[];for(we in De[Ne])this.terminals_[we]&&we>Ue&&or.push("'"+this.terminals_[we]+"'");he.showPosition?Cr="Parse error on line "+(Re+1)+`:
`+he.showPosition()+`
Expecting `+or.join(", ")+", got '"+(this.terminals_[de]||de)+"'":Cr="Parse error on line "+(Re+1)+": Unexpected "+(de==Oe?"end of input":"'"+(this.terminals_[de]||de)+"'"),this.parseError(Cr,{text:he.match,token:this.terminals_[de]||de,line:he.yylineno,loc:ue,expected:or})}if(Be[0]instanceof Array&&Be.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ne+", token: "+de);switch(Be[0]){case 1:re.push(de),ye.push(he.yytext),j.push(he.yylloc),re.push(Be[1]),de=null,Ie?(de=Ie,Ie=null):(Pe=he.yyleng,oe=he.yytext,Re=he.yylineno,ue=he.yylloc,Se>0&&Se--);break;case 2:if(Je=this.productions_[Be[1]][1],Fe.$=ye[ye.length-Je],Fe._$={first_line:j[j.length-(Je||1)].first_line,last_line:j[j.length-1].last_line,first_column:j[j.length-(Je||1)].first_column,last_column:j[j.length-1].last_column},X&&(Fe._$.range=[j[j.length-(Je||1)].range[0],j[j.length-1].range[1]]),qe=this.performAction.apply(Fe,[oe,Pe,Re,q.yy,Be[1],ye,j].concat(_e)),typeof qe<"u")return qe;Je&&(re=re.slice(0,-1*Je*2),ye=ye.slice(0,-1*Je),j=j.slice(0,-1*Je)),re.push(this.productions_[Be[1]][0]),ye.push(Fe.$),j.push(Fe._$),We=De[re[re.length-2]][re[re.length-1]],re.push(We);break;case 3:return!0}}return!0},"parse")},fe=function(){var H={EOF:1,parseError:s(function(K,re){if(this.yy.parser)this.yy.parser.parseError(K,re);else throw new Error(K)},"parseError"),setInput:s(function(Q,K){return this.yy=K||this.yy||{},this._input=Q,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:s(function(){var Q=this._input[0];this.yytext+=Q,this.yyleng++,this.offset++,this.match+=Q,this.matched+=Q;var K=Q.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),Q},"input"),unput:s(function(Q){var K=Q.length,re=Q.split(/(?:\r\n?|\n)/g);this._input=Q+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-K),this.offset-=K;var ie=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),re.length-1&&(this.yylineno-=re.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:re?(re.length===ie.length?this.yylloc.first_column:0)+ie[ie.length-re.length].length-re[0].length:this.yylloc.first_column-K},this.options.ranges&&(this.yylloc.range=[ye[0],ye[0]+this.yyleng-K]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(Q){this.unput(this.match.slice(Q))},"less"),pastInput:s(function(){var Q=this.matched.substr(0,this.matched.length-this.match.length);return(Q.length>20?"...":"")+Q.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Q=this.match;return Q.length<20&&(Q+=this._input.substr(0,20-Q.length)),(Q.substr(0,20)+(Q.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Q=this.pastInput(),K=new Array(Q.length+1).join("-");return Q+this.upcomingInput()+`
`+K+"^"},"showPosition"),test_match:s(function(Q,K){var re,ie,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))),ie=Q[0].match(/(?:\r\n?|\n).*/g),ie&&(this.yylineno+=ie.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ie?ie[ie.length-1].length-ie[ie.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Q[0].length},this.yytext+=Q[0],this.match+=Q[0],this.matches=Q,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(Q[0].length),this.matched+=Q[0],re=this.performAction.call(this,this.yy,this,K,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),re)return re;if(this._backtrack){for(var j in ye)this[j]=ye[j];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Q,K,re,ie;this._more||(this.yytext="",this.match="");for(var ye=this._currentRules(),j=0;j<ye.length;j++)if(re=this._input.match(this.rules[ye[j]]),re&&(!K||re[0].length>K[0].length)){if(K=re,ie=j,this.options.backtrack_lexer){if(Q=this.test_match(re,ye[j]),Q!==!1)return Q;if(this._backtrack){K=!1;continue}else return!1}else if(!this.options.flex)break}return K?(Q=this.test_match(K,ye[ie]),Q!==!1?Q:!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:s(function(){var K=this.next();return K||this.lex()},"lex"),begin:s(function(K){this.conditionStack.push(K)},"begin"),popState:s(function(){var K=this.conditionStack.length-1;return K>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(K){return K=this.conditionStack.length-1-Math.abs(K||0),K>=0?this.conditionStack[K]:"INITIAL"},"topState"),pushState:s(function(K){this.begin(K)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(K,re,ie,ye){var j=ye;switch(ie){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("LINE"),14;break;case 8:return this.begin("ID"),50;break;case 9:return this.begin("ID"),52;break;case 10:return 13;case 11:return this.begin("ID"),53;break;case 12:return re.yytext=re.yytext.trim(),this.begin("ALIAS"),70;break;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 14:return this.popState(),this.popState(),5;break;case 15:return this.begin("LINE"),36;break;case 16:return this.begin("LINE"),37;break;case 17:return this.begin("LINE"),38;break;case 18:return this.begin("LINE"),39;break;case 19:return this.begin("LINE"),49;break;case 20:return this.begin("LINE"),41;break;case 21:return this.begin("LINE"),43;break;case 22:return this.begin("LINE"),48;break;case 23:return this.begin("LINE"),44;break;case 24:return this.begin("LINE"),47;break;case 25:return this.begin("LINE"),46;break;case 26:return this.popState(),15;break;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;break;case 37:return this.begin("ID"),23;break;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;break;case 41:return this.popState(),"acc_title_value";break;case 42:return this.begin("acc_descr"),33;break;case 43:return this.popState(),"acc_descr_value";break;case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return re.yytext=re.yytext.trim(),70;break;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return H}();Z.lexer=fe;function ne(){this.yy={}}return s(ne,"Parser"),ne.prototype=Z,Z.Parser=ne,new ne}();bN.parser=bN;gce=bN});function wN(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}function wce(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}function eFe(){wt.records.currentBox=void 0}var wt,IBe,kN,NBe,OBe,oi,PBe,BBe,FBe,zBe,$Be,GBe,VBe,tx,UBe,qBe,WBe,HBe,YBe,vce,g0,XBe,jBe,KBe,ex,QBe,ZBe,xce,bce,JBe,kce,Tce,tFe,Ece,TN,Cce=_(()=>{"use strict";gt();it();RI();Qt();Ci();wt=new pg(()=>({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})),IBe=s(function(t){wt.records.boxes.push({name:t.text,wrap:t.wrap??g0(),fill:t.color,actorKeys:[]}),wt.records.currentBox=wt.records.boxes.slice(-1)[0]},"addBox"),kN=s(function(t,e,r,n){let i=wt.records.currentBox,a=wt.records.actors.get(t);if(a){if(wt.records.currentBox&&a.box&&wt.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${wt.records.currentBox.name}' at the same time.`);if(i=a.box?a.box:wt.records.currentBox,a.box=i,a&&e===a.name&&r==null)return}if(r?.text==null&&(r={text:e,type:n}),(n==null||r.text==null)&&(r={text:e,type:n}),wt.records.actors.set(t,{box:i,name:e,description:r.text,wrap:r.wrap??g0(),prevActor:wt.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),wt.records.prevActor){let o=wt.records.actors.get(wt.records.prevActor);o&&(o.nextActor=t)}wt.records.currentBox&&wt.records.currentBox.actorKeys.push(t),wt.records.prevActor=t},"addActor"),NBe=s(t=>{let e,r=0;if(!t)return 0;for(e=0;e<wt.records.messages.length;e++)wt.records.messages[e].type===ex.ACTIVE_START&&wt.records.messages[e].from===t&&r++,wt.records.messages[e].type===ex.ACTIVE_END&&wt.records.messages[e].from===t&&r--;return r},"activationCount"),OBe=s(function(t,e,r,n){wt.records.messages.push({from:t,to:e,message:r.text,wrap:r.wrap??g0(),answer:n})},"addMessage"),oi=s(function(t,e,r,n,i=!1){if(n===ex.ACTIVE_END&&NBe(t??"")<1){let o=new Error("Trying to inactivate an inactive participant ("+t+")");throw o.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},o}return wt.records.messages.push({from:t,to:e,message:r?.text??"",wrap:r?.wrap??g0(),type:n,activate:i}),!0},"addSignal"),PBe=s(function(){return wt.records.boxes.length>0},"hasAtLeastOneBox"),BBe=s(function(){return wt.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),FBe=s(function(){return wt.records.messages},"getMessages"),zBe=s(function(){return wt.records.boxes},"getBoxes"),$Be=s(function(){return wt.records.actors},"getActors"),GBe=s(function(){return wt.records.createdActors},"getCreatedActors"),VBe=s(function(){return wt.records.destroyedActors},"getDestroyedActors"),tx=s(function(t){return wt.records.actors.get(t)},"getActor"),UBe=s(function(){return[...wt.records.actors.keys()]},"getActorKeys"),qBe=s(function(){wt.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),WBe=s(function(){wt.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),HBe=s(()=>wt.records.sequenceNumbersEnabled,"showSequenceNumbers"),YBe=s(function(t){wt.records.wrapEnabled=t},"setWrap"),vce=s(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}},"extractWrap"),g0=s(()=>wt.records.wrapEnabled!==void 0?wt.records.wrapEnabled:le().sequence?.wrap??!1,"autoWrap"),XBe=s(function(){wt.reset(),br()},"clear"),jBe=s(function(t){let e=t.trim(),{wrap:r,cleanedText:n}=vce(e),i={text:n,wrap:r};return V.debug(`parseMessage: ${JSON.stringify(i)}`),i},"parseMessage"),KBe=s(function(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 o=new Option().style;o.color=r,o.color!==r&&(r="transparent",n=t.trim())}let{wrap:i,cleanedText:a}=vce(n);return{text:a?$r(a,le()):void 0,color:r,wrap:i}},"parseBoxData"),ex={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},QBe={FILLED:0,OPEN:1},ZBe={LEFTOF:0,RIGHTOF:1,OVER:2},xce=s(function(t,e,r){let n={actor:t,placement:e,message:r.text,wrap:r.wrap??g0()},i=[].concat(t,t);wt.records.notes.push(n),wt.records.messages.push({from:i[0],to:i[1],message:r.text,wrap:r.wrap??g0(),type:ex.NOTE,placement:e})},"addNote"),bce=s(function(t,e){let r=tx(t);try{let n=$r(e.text,le());n=n.replace(/&amp;/g,"&"),n=n.replace(/&equals;/g,"=");let i=JSON.parse(n);wN(r,i)}catch(n){V.error("error while parsing actor link text",n)}},"addLinks"),JBe=s(function(t,e){let r=tx(t);try{let n={},i=$r(e.text,le()),a=i.indexOf("@");i=i.replace(/&amp;/g,"&"),i=i.replace(/&equals;/g,"=");let o=i.slice(0,a-1).trim(),l=i.slice(a+1).trim();n[o]=l,wN(r,n)}catch(n){V.error("error while parsing actor link text",n)}},"addALink");s(wN,"insertLinks");kce=s(function(t,e){let r=tx(t);try{let n=$r(e.text,le()),i=JSON.parse(n);wce(r,i)}catch(n){V.error("error while parsing actor properties text",n)}},"addProperties");s(wce,"insertProperties");s(eFe,"boxEnd");Tce=s(function(t,e){let r=tx(t),n=document.getElementById(e.text);try{let i=n.innerHTML,a=JSON.parse(i);a.properties&&wce(r,a.properties),a.links&&wN(r,a.links)}catch(i){V.error("error while parsing actor details text",i)}},"addDetails"),tFe=s(function(t,e){if(t?.properties!==void 0)return t.properties[e]},"getActorProperty"),Ece=s(function(t){if(Array.isArray(t))t.forEach(function(e){Ece(e)});else switch(t.type){case"sequenceIndex":wt.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":kN(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(wt.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");wt.records.lastCreated=t.actor,kN(t.actor,t.actor,t.description,t.draw),wt.records.createdActors.set(t.actor,wt.records.messages.length);break;case"destroyParticipant":wt.records.lastDestroyed=t.actor,wt.records.destroyedActors.set(t.actor,wt.records.messages.length);break;case"activeStart":oi(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":oi(t.actor,void 0,void 0,t.signalType);break;case"addNote":xce(t.actor,t.placement,t.text);break;case"addLinks":bce(t.actor,t.text);break;case"addALink":JBe(t.actor,t.text);break;case"addProperties":kce(t.actor,t.text);break;case"addDetails":Tce(t.actor,t.text);break;case"addMessage":if(wt.records.lastCreated){if(t.to!==wt.records.lastCreated)throw new Error("The created participant "+wt.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");wt.records.lastCreated=void 0}else if(wt.records.lastDestroyed){if(t.to!==wt.records.lastDestroyed&&t.from!==wt.records.lastDestroyed)throw new Error("The destroyed participant "+wt.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");wt.records.lastDestroyed=void 0}oi(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":IBe(t.boxData);break;case"boxEnd":eFe();break;case"loopStart":oi(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":oi(void 0,void 0,void 0,t.signalType);break;case"rectStart":oi(void 0,void 0,t.color,t.signalType);break;case"rectEnd":oi(void 0,void 0,void 0,t.signalType);break;case"optStart":oi(void 0,void 0,t.optText,t.signalType);break;case"optEnd":oi(void 0,void 0,void 0,t.signalType);break;case"altStart":oi(void 0,void 0,t.altText,t.signalType);break;case"else":oi(void 0,void 0,t.altText,t.signalType);break;case"altEnd":oi(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":Ar(t.text);break;case"parStart":oi(void 0,void 0,t.parText,t.signalType);break;case"and":oi(void 0,void 0,t.parText,t.signalType);break;case"parEnd":oi(void 0,void 0,void 0,t.signalType);break;case"criticalStart":oi(void 0,void 0,t.criticalText,t.signalType);break;case"option":oi(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":oi(void 0,void 0,void 0,t.signalType);break;case"breakStart":oi(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":oi(void 0,void 0,void 0,t.signalType);break}},"apply"),TN={addActor:kN,addMessage:OBe,addSignal:oi,addLinks:bce,addDetails:Tce,addProperties:kce,autoWrap:g0,setWrap:YBe,enableSequenceNumbers:qBe,disableSequenceNumbers:WBe,showSequenceNumbers:HBe,getMessages:FBe,getActors:$Be,getCreatedActors:GBe,getDestroyedActors:VBe,getActor:tx,getActorKeys:UBe,getActorProperty:tFe,getAccTitle:Gr,getBoxes:zBe,getDiagramTitle:Qr,setDiagramTitle:an,getConfig:s(()=>le().sequence,"getConfig"),clear:XBe,parseMessage:jBe,parseBoxData:KBe,LINETYPE:ex,ARROWTYPE:QBe,PLACEMENT:ZBe,addNote:xce,setAccTitle:Ar,apply:Ece,setAccDescription:Vr,getAccDescription:Ur,hasAtLeastOneBox:PBe,hasAtLeastOneBoxWithTitle:BBe}});var rFe,Sce,_ce=_(()=>{"use strict";rFe=s(t=>`.actor {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
text.actor > tspan {
fill: ${t.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${t.actorLineColor};
}
.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"),Sce=rFe});var EN,sf,Lce,Dce,nFe,Ace,CN,iFe,aFe,rx,y0,Rce,Ac,SN,sFe,oFe,lFe,cFe,uFe,hFe,fFe,Mce,dFe,pFe,mFe,gFe,yFe,vFe,xFe,Ice,bFe,_N,kFe,Zn,Nce=_(()=>{"use strict";Qt();Iy();pr();EN=ka(_p(),1);zs();sf=18*2,Lce="actor-top",Dce="actor-bottom",nFe="actor-box",Ace="actor-man",CN=s(function(t,e){return ad(t,e)},"drawRect"),iFe=s(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,o=e.actorCnt,l=e.rectData;var u="none";i&&(u="block !important");let h=t.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var f="";l.class!==void 0&&(f=" "+l.class);let d=l.width>r?l.width:r,p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+f),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",d),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),a!=null){var m=20;for(let v in a){var g=h.append("a"),y=(0,EN.sanitizeUrl)(a[v]);g.attr("xlink:href",y),g.attr("target","_blank"),kFe(n)(v,g,l.x+10,l.height+m,d,20,{class:"actor"},n),m+=30}}return p.attr("height",m),{height:l.height+m,width:d}},"drawPopup"),aFe=s(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),rx=s(async function(t,e,r=null){let n=t.append("foreignObject"),i=await hh(e.text,_r()),o=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(o.height)).attr("width",Math.round(o.width)),e.class==="noteText"){let l=t.node().firstChild;l.setAttribute("height",o.height+2*e.textMargin);let u=l.getBBox();n.attr("x",Math.round(u.x+u.width/2-o.width/2)).attr("y",Math.round(u.y+u.height/2-o.height/2))}else if(r){let{startx:l,stopx:u,starty:h}=r;if(l>u){let f=l;l=u,u=f}n.attr("x",Math.round(l+Math.abs(l-u)/2-o.width/2)),e.class==="loopText"?n.attr("y",Math.round(h)):n.attr("y",Math.round(h-o.height))}return[n]},"drawKatex"),y0=s(function(t,e){let r=0,n=0,i=e.text.split($e.lineBreakRegex),[a,o]=nc(e.fontSize),l=[],u=0,h=s(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":h=s(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":h=s(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":h=s(()=>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[f,d]of i.entries()){e.textMargin!==void 0&&e.textMargin===0&&a!==void 0&&(u=f*a);let p=t.append("text");p.attr("x",e.x),p.attr("y",h()),e.anchor!==void 0&&p.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&p.style("font-family",e.fontFamily),o!==void 0&&p.style("font-size",o),e.fontWeight!==void 0&&p.style("font-weight",e.fontWeight),e.fill!==void 0&&p.attr("fill",e.fill),e.class!==void 0&&p.attr("class",e.class),e.dy!==void 0?p.attr("dy",e.dy):u!==0&&p.attr("dy",u);let m=d||sA;if(e.tspan){let g=p.append("tspan");g.attr("x",e.x),e.fill!==void 0&&g.attr("fill",e.fill),g.text(m)}else p.text(m);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(p._groups||p)[0][0].getBBox().height,r=n),l.push(p)}return l},"drawText"),Rce=s(function(t,e){function r(i,a,o,l,u){return i+","+a+" "+(i+o)+","+a+" "+(i+o)+","+(a+l-u)+" "+(i+o-u*1.2)+","+(a+l)+" "+i+","+(a+l)}s(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,y0(t,e),n},"drawLabel"),Ac=-1,SN=s((t,e,r,n)=>{t.select&&r.forEach(i=>{let a=e.get(i),o=t.select("#actor"+a.actorCnt);!n.mirrorActors&&a.stopy?o.attr("y2",a.stopy+a.height/2):n.mirrorActors&&o.attr("y2",a.stopy)})},"fixLifeLineHeights"),sFe=s(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,o=i+5,l=t.append("g").lower();var u=l;n||(Ac++,Object.keys(e.links||{}).length&&!r.forceMenus&&u.attr("onclick",aFe(`actor${Ac}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+Ac).attr("x1",a).attr("y1",o).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),u=l.append("g"),e.actorCnt=Ac,e.links!=null&&u.attr("id","root-"+Ac));let h=ol();var f="actor";e.properties?.class?f=e.properties.class:h.fill="#eaeaea",n?f+=` ${Dce}`:f+=` ${Lce}`,h.x=e.x,h.y=i,h.width=e.width,h.height=e.height,h.class=f,h.rx=3,h.ry=3,h.name=e.name;let d=CN(u,h);if(e.rectData=h,e.properties?.icon){let m=e.properties.icon.trim();m.charAt(0)==="@"?eW(u,h.x+h.width-20,h.y+10,m.substr(1)):Jq(u,h.x+h.width-20,h.y+10,m)}_N(r,Ei(e.description))(e.description,u,h.x,h.y,h.width,h.height,{class:`actor ${nFe}`},r);let p=e.height;if(d.node){let m=d.node().getBBox();e.height=m.height,p=m.height}return p},"drawActorTypeParticipant"),oFe=s(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,o=i+80,l=t.append("g").lower();n||(Ac++,l.append("line").attr("id","actor"+Ac).attr("x1",a).attr("y1",o).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=Ac);let u=t.append("g"),h=Ace;n?h+=` ${Dce}`:h+=` ${Lce}`,u.attr("class",h),u.attr("name",e.name);let f=ol();f.x=e.x,f.y=i,f.fill="#eaeaea",f.width=e.width,f.height=e.height,f.class="actor",f.rx=3,f.ry=3,u.append("line").attr("id","actor-man-torso"+Ac).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),u.append("line").attr("id","actor-man-arms"+Ac).attr("x1",a-sf/2).attr("y1",i+33).attr("x2",a+sf/2).attr("y2",i+33),u.append("line").attr("x1",a-sf/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),u.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+sf/2-2).attr("y2",i+60);let d=u.append("circle");d.attr("cx",e.x+e.width/2),d.attr("cy",i+10),d.attr("r",15),d.attr("width",e.width),d.attr("height",e.height);let p=u.node().getBBox();return e.height=p.height,_N(r,Ei(e.description))(e.description,u,f.x,f.y+35,f.width,f.height,{class:`actor ${Ace}`},r),e.height},"drawActorTypeActor"),lFe=s(async function(t,e,r,n){switch(e.type){case"actor":return await oFe(t,e,r,n);case"participant":return await sFe(t,e,r,n)}},"drawActor"),cFe=s(function(t,e,r){let i=t.append("g");Mce(i,e),e.name&&_N(r)(e.name,i,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),i.lower()},"drawBox"),uFe=s(function(t){return t.append("g")},"anchorElement"),hFe=s(function(t,e,r,n,i){let a=ol(),o=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,CN(o,a)},"drawActivation"),fFe=s(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:u,messageFontSize:h,messageFontWeight:f}=n,d=t.append("g"),p=s(function(y,v,x,b){return d.append("line").attr("x1",y).attr("y1",v).attr("x2",x).attr("y2",b).attr("class","loopLine")},"drawLoopLine");p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(y){p(e.startx,y.y,e.stopx,y.y).style("stroke-dasharray","3, 3")});let m=My();m.text=r,m.x=e.startx,m.y=e.starty,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=l||50,m.height=o||20,m.textMargin=a,m.class="labelText",Rce(d,m),m=Ice(),m.text=e.title,m.x=e.startx+l/2+(e.stopx-e.startx)/2,m.y=e.starty+i+a,m.anchor="middle",m.valign="middle",m.textMargin=a,m.class="loopText",m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=!0;let g=Ei(m.text)?await rx(d,m,e):y0(d,m);if(e.sectionTitles!==void 0){for(let[y,v]of Object.entries(e.sectionTitles))if(v.message){m.text=v.message,m.x=e.startx+(e.stopx-e.startx)/2,m.y=e.sections[y].y+i+a,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=e.wrap,Ei(m.text)?(e.starty=e.sections[y].y,await rx(d,m,e)):y0(d,m);let x=Math.round(g.map(b=>(b._groups||b)[0][0].getBBox().height).reduce((b,k)=>b+k));e.sections[y].height+=x-(i+a)}}return e.height=Math.round(e.stopy-e.starty),d},"drawLoop"),Mce=s(function(t,e){v3(t,e)},"drawBackgroundRect"),dFe=s(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"),pFe=s(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"),mFe=s(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"),gFe=s(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"),yFe=s(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"),vFe=s(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"),xFe=s(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"),Ice=s(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"),bFe=s(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),_N=function(){function t(a,o,l,u,h,f,d){let p=o.append("text").attr("x",l+h/2).attr("y",u+f/2+5).style("text-anchor","middle").text(a);i(p,d)}s(t,"byText");function e(a,o,l,u,h,f,d,p){let{actorFontSize:m,actorFontFamily:g,actorFontWeight:y}=p,[v,x]=nc(m),b=a.split($e.lineBreakRegex);for(let k=0;k<b.length;k++){let A=k*v-v*(b.length-1)/2,w=o.append("text").attr("x",l+h/2).attr("y",u).style("text-anchor","middle").style("font-size",x).style("font-weight",y).style("font-family",g);w.append("tspan").attr("x",l+h/2).attr("dy",A).text(b[k]),w.attr("y",u+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(w,d)}}s(e,"byTspan");function r(a,o,l,u,h,f,d,p){let m=o.append("switch"),y=m.append("foreignObject").attr("x",l).attr("y",u).attr("width",h).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(a),e(a,m,l,u,h,f,d,p),i(y,d)}s(r,"byFo");async function n(a,o,l,u,h,f,d,p){let m=await $f(a,_r()),g=o.append("switch"),v=g.append("foreignObject").attr("x",l+h/2-m.width/2).attr("y",u+f/2-m.height/2).attr("width",m.width).attr("height",m.height).append("xhtml:div").style("height","100%").style("width","100%");v.append("div").style("text-align","center").style("vertical-align","middle").html(await hh(a,_r())),e(a,g,l,u,h,f,d,p),i(v,d)}s(n,"byKatex");function i(a,o){for(let l in o)o.hasOwnProperty(l)&&a.attr(l,o[l])}return s(i,"_setTextAttrs"),function(a,o=!1){return o?n:a.textPlacement==="fo"?r:a.textPlacement==="old"?t:e}}(),kFe=function(){function t(i,a,o,l,u,h,f){let d=a.append("text").attr("x",o).attr("y",l).style("text-anchor","start").text(i);n(d,f)}s(t,"byText");function e(i,a,o,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:m,actorFontWeight:g}=d,y=i.split($e.lineBreakRegex);for(let v=0;v<y.length;v++){let x=v*p-p*(y.length-1)/2,b=a.append("text").attr("x",o).attr("y",l).style("text-anchor","start").style("font-size",p).style("font-weight",g).style("font-family",m);b.append("tspan").attr("x",o).attr("dy",x).text(y[v]),b.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,f)}}s(e,"byTspan");function r(i,a,o,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",o).attr("y",l).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,o,l,u,h,f,d),n(g,f)}s(r,"byFo");function n(i,a){for(let o in a)a.hasOwnProperty(o)&&i.attr(o,a[o])}return s(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),Zn={drawRect:CN,drawText:y0,drawLabel:Rce,drawActor:lFe,drawBox:cFe,drawPopup:iFe,anchorElement:uFe,drawActivation:hFe,drawLoop:fFe,drawBackgroundRect:Mce,insertArrowHead:gFe,insertArrowFilledHead:yFe,insertSequenceNumber:vFe,insertArrowCrossHead:xFe,insertDatabaseIcon:dFe,insertComputerIcon:pFe,insertClockIcon:mFe,getTextObj:Ice,getNoteRect:bFe,fixLifeLineHeights:SN,sanitizeUrl:EN.sanitizeUrl}});async function TFe(t,e){He.bumpVerticalPos(10);let{startx:r,stopx:n,message:i}=e,a=$e.splitBreaks(i).length,o=Ei(i),l=o?await $f(i,le()):dt.calculateTextDimensions(i,v0(Ee));if(!o){let d=l.height/a;e.height+=d,He.bumpVerticalPos(d)}let u,h=l.height-10,f=l.width;if(r===n){u=He.getVerticalPos()+h,Ee.rightAngles||(h+=Ee.boxMargin,u=He.getVerticalPos()+h),h+=30;let d=$e.getMax(f/2,Ee.width/2);He.insert(r-d,He.getVerticalPos()-10+h,n+d,He.getVerticalPos()+30+h)}else h+=Ee.boxMargin,u=He.getVerticalPos()+h,He.insert(r,u-10,n,u);return He.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,He.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),u}function Lc(t,e,r,n,i){He.bumpVerticalPos(r);let a=n;if(e.id&&e.message&&t[e.id]){let o=t[e.id].width,l=v0(Ee);e.message=dt.wrapLabel(`[${e.message}]`,o-2*Ee.wrapPadding,l),e.width=o,e.wrap=!0;let u=dt.calculateTextDimensions(e.message,l),h=$e.getMax(u.height,Ee.labelBoxHeight);a=n+h,V.debug(`${h} - ${e.message}`)}i(e),He.bumpVerticalPos(a)}function SFe(t,e,r,n,i,a,o){function l(h,f){h.x<i.get(t.from).x?(He.insert(e.stopx-f,e.starty,e.startx,e.stopy+h.height/2+Ee.noteMargin),e.stopx=e.stopx+f):(He.insert(e.startx,e.starty,e.stopx+f,e.stopy+h.height/2+Ee.noteMargin),e.stopx=e.stopx-f)}s(l,"receiverAdjustment");function u(h,f){h.x<i.get(t.to).x?(He.insert(e.startx-f,e.starty,e.stopx,e.stopy+h.height/2+Ee.noteMargin),e.startx=e.startx+f):(He.insert(e.stopx,e.starty,e.startx+f,e.stopy+h.height/2+Ee.noteMargin),e.startx=e.startx-f)}if(s(u,"senderAdjustment"),a.get(t.to)==n){let h=i.get(t.to),f=h.type=="actor"?sf/2+3:h.width/2+3;l(h,f),h.starty=r-h.height/2,He.bumpVerticalPos(h.height/2)}else if(o.get(t.from)==n){let h=i.get(t.from);if(Ee.mirrorActors){let f=h.type=="actor"?sf/2:h.width/2;u(h,f)}h.stopy=r-h.height/2,He.bumpVerticalPos(h.height/2)}else if(o.get(t.to)==n){let h=i.get(t.to);if(Ee.mirrorActors){let f=h.type=="actor"?sf/2+3:h.width/2+3;l(h,f)}h.stopy=r-h.height/2,He.bumpVerticalPos(h.height/2)}}async function AFe(t,e,r){let n={};for(let i of e)if(t.get(i.to)&&t.get(i.from)){let a=t.get(i.to);if(i.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)continue;let o=i.placement!==void 0,l=!o,u=o?kg(Ee):v0(Ee),h=i.wrap?dt.wrapLabel(i.message,Ee.width-2*Ee.wrapPadding,u):i.message,d=(Ei(h)?await $f(i.message,le()):dt.calculateTextDimensions(h,u)).width+2*Ee.wrapPadding;l&&i.from===a.nextActor?n[i.to]=$e.getMax(n[i.to]||0,d):l&&i.from===a.prevActor?n[i.from]=$e.getMax(n[i.from]||0,d):l&&i.from===i.to?(n[i.from]=$e.getMax(n[i.from]||0,d/2),n[i.to]=$e.getMax(n[i.to]||0,d/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=$e.getMax(n[i.from]||0,d):i.placement===r.db.PLACEMENT.LEFTOF?n[a.prevActor]=$e.getMax(n[a.prevActor]||0,d):i.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(n[a.prevActor]=$e.getMax(n[a.prevActor]||0,d/2)),a.nextActor&&(n[i.from]=$e.getMax(n[i.from]||0,d/2)))}return V.debug("maxMessageWidthPerActor:",n),n}async function DFe(t,e,r){let n=0;for(let a of t.keys()){let o=t.get(a);o.wrap&&(o.description=dt.wrapLabel(o.description,Ee.width-2*Ee.wrapPadding,AN(Ee)));let l=Ei(o.description)?await $f(o.description,le()):dt.calculateTextDimensions(o.description,AN(Ee));o.width=o.wrap?Ee.width:$e.getMax(Ee.width,l.width+2*Ee.wrapPadding),o.height=o.wrap?$e.getMax(l.height,Ee.height):Ee.height,n=$e.getMax(n,o.height)}for(let a in e){let o=t.get(a);if(!o)continue;let l=t.get(o.nextActor);if(!l){let d=e[a]+Ee.actorMargin-o.width/2;o.margin=$e.getMax(d,Ee.actorMargin);continue}let h=e[a]+Ee.actorMargin-o.width/2-l.width/2;o.margin=$e.getMax(h,Ee.actorMargin)}let i=0;return r.forEach(a=>{let o=v0(Ee),l=a.actorKeys.reduce((f,d)=>f+=t.get(d).width+(t.get(d).margin||0),0);l-=2*Ee.boxTextMargin,a.wrap&&(a.name=dt.wrapLabel(a.name,l-2*Ee.wrapPadding,o));let u=dt.calculateTextDimensions(a.name,o);i=$e.getMax(u.height,i);let h=$e.getMax(l,u.width+2*Ee.wrapPadding);if(a.margin=Ee.boxTextMargin,l<h){let f=(h-l)/2;a.margin+=f}}),r.forEach(a=>a.textMaxHeight=i),$e.getMax(n,Ee.height)}var Ee,He,wFe,v0,kg,AN,EFe,CFe,LN,Pce,Bce,Uw,Oce,_Fe,LFe,RFe,MFe,IFe,Fce,zce=_(()=>{"use strict";Xt();Nce();it();Qt();Iy();gt();Y0();pr();Un();Ee={},He={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:s(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.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:s(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:s(function(t){this.boxes.push(t)},"addBox"),addActor:s(function(t){this.actors.push(t)},"addActor"),addLoop:s(function(t){this.loops.push(t)},"addLoop"),addMessage:s(function(t){this.messages.push(t)},"addMessage"),addNote:s(function(t){this.notes.push(t)},"addNote"),lastActor:s(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:s(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:s(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:s(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:s(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,Bce(le())},"init"),updateVal:s(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:s(function(t,e,r,n){let i=this,a=0;function o(l){return s(function(h){a++;let f=i.sequenceItems.length-a+1;i.updateVal(h,"starty",e-f*Ee.boxMargin,Math.min),i.updateVal(h,"stopy",n+f*Ee.boxMargin,Math.max),i.updateVal(He.data,"startx",t-f*Ee.boxMargin,Math.min),i.updateVal(He.data,"stopx",r+f*Ee.boxMargin,Math.max),l!=="activation"&&(i.updateVal(h,"startx",t-f*Ee.boxMargin,Math.min),i.updateVal(h,"stopx",r+f*Ee.boxMargin,Math.max),i.updateVal(He.data,"starty",e-f*Ee.boxMargin,Math.min),i.updateVal(He.data,"stopy",n+f*Ee.boxMargin,Math.max))},"updateItemBounds")}s(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:s(function(t,e,r,n){let i=$e.getMin(t,r),a=$e.getMax(t,r),o=$e.getMin(e,n),l=$e.getMax(e,n);this.updateVal(He.data,"startx",i,Math.min),this.updateVal(He.data,"starty",o,Math.min),this.updateVal(He.data,"stopx",a,Math.max),this.updateVal(He.data,"stopy",l,Math.max),this.updateBounds(i,o,a,l)},"insert"),newActivation:s(function(t,e,r){let n=r.get(t.from),i=Uw(t.from).length||0,a=n.x+n.width/2+(i-1)*Ee.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Ee.activationWidth,stopy:void 0,actor:t.from,anchored:Zn.anchorElement(e)})},"newActivation"),endActivation:s(function(t){let e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:s(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:s(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:s(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:s(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:s(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:He.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:s(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:s(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=$e.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return{bounds:this.data,models:this.models}},"getBounds")},wFe=s(async function(t,e){He.bumpVerticalPos(Ee.boxMargin),e.height=Ee.boxMargin,e.starty=He.getVerticalPos();let r=ol();r.x=e.startx,r.y=e.starty,r.width=e.width||Ee.width,r.class="note";let n=t.append("g"),i=Zn.drawRect(n,r),a=My();a.x=e.startx,a.y=e.starty,a.width=r.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=Ee.noteFontFamily,a.fontSize=Ee.noteFontSize,a.fontWeight=Ee.noteFontWeight,a.anchor=Ee.noteAlign,a.textMargin=Ee.noteMargin,a.valign="center";let o=Ei(a.text)?await rx(n,a):y0(n,a),l=Math.round(o.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,h)=>u+h));i.attr("height",l+2*Ee.noteMargin),e.height+=l+2*Ee.noteMargin,He.bumpVerticalPos(l+2*Ee.noteMargin),e.stopy=e.starty+l+2*Ee.noteMargin,e.stopx=e.startx+r.width,He.insert(e.startx,e.starty,e.stopx,e.stopy),He.models.addNote(e)},"drawNote"),v0=s(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),kg=s(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),AN=s(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");s(TFe,"boundMessage");EFe=s(async function(t,e,r,n){let{startx:i,stopx:a,starty:o,message:l,type:u,sequenceIndex:h,sequenceVisible:f}=e,d=dt.calculateTextDimensions(l,v0(Ee)),p=My();p.x=i,p.y=o+10,p.width=a-i,p.class="messageText",p.dy="1em",p.text=l,p.fontFamily=Ee.messageFontFamily,p.fontSize=Ee.messageFontSize,p.fontWeight=Ee.messageFontWeight,p.anchor=Ee.messageAlign,p.valign="center",p.textMargin=Ee.wrapPadding,p.tspan=!1,Ei(p.text)?await rx(t,p,{startx:i,stopx:a,starty:r}):y0(t,p);let m=d.width,g;i===a?Ee.rightAngles?g=t.append("path").attr("d",`M ${i},${r} H ${i+$e.getMax(Ee.width/2,m/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)),u===n.db.LINETYPE.DOTTED||u===n.db.LINETYPE.DOTTED_CROSS||u===n.db.LINETYPE.DOTTED_POINT||u===n.db.LINETYPE.DOTTED_OPEN||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let y="";Ee.arrowMarkerAbsolute&&(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,y=y.replace(/\(/g,"\\("),y=y.replace(/\)/g,"\\)")),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(u===n.db.LINETYPE.SOLID||u===n.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+y+"#arrowhead)"),(u===n.db.LINETYPE.BIDIRECTIONAL_SOLID||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+y+"#arrowhead)"),g.attr("marker-end","url("+y+"#arrowhead)")),(u===n.db.LINETYPE.SOLID_POINT||u===n.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+y+"#filled-head)"),(u===n.db.LINETYPE.SOLID_CROSS||u===n.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+y+"#crosshead)"),(f||Ee.showSequenceNumbers)&&(g.attr("marker-start","url("+y+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},"drawMessage"),CFe=s(function(t,e,r,n,i,a,o){let l=0,u=0,h,f=0;for(let d of n){let p=e.get(d),m=p.box;h&&h!=m&&(o||He.models.addBox(h),u+=Ee.boxMargin+h.margin),m&&m!=h&&(o||(m.x=l+u,m.y=i),u+=m.margin),p.width=p.width||Ee.width,p.height=$e.getMax(p.height||Ee.height,Ee.height),p.margin=p.margin||Ee.actorMargin,f=$e.getMax(f,p.height),r.get(p.name)&&(u+=p.width/2),p.x=l+u,p.starty=He.getVerticalPos(),He.insert(p.x,i,p.x+p.width,p.height),l+=p.width+u,p.box&&(p.box.width=l+m.margin-p.box.x),u=p.margin,h=p.box,He.models.addActor(p)}h&&!o&&He.models.addBox(h),He.bumpVerticalPos(f)},"addActorRenderingData"),LN=s(async function(t,e,r,n){if(n){let i=0;He.bumpVerticalPos(Ee.boxMargin*2);for(let a of r){let o=e.get(a);o.stopy||(o.stopy=He.getVerticalPos());let l=await Zn.drawActor(t,o,Ee,!0);i=$e.getMax(i,l)}He.bumpVerticalPos(i+Ee.boxMargin)}else for(let i of r){let a=e.get(i);await Zn.drawActor(t,a,Ee,!1)}},"drawActors"),Pce=s(function(t,e,r,n){let i=0,a=0;for(let o of r){let l=e.get(o),u=LFe(l),h=Zn.drawPopup(t,l,u,Ee,Ee.forceMenus,n);h.height>i&&(i=h.height),h.width+l.x>a&&(a=h.width+l.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),Bce=s(function(t){An(Ee,t),t.fontFamily&&(Ee.actorFontFamily=Ee.noteFontFamily=Ee.messageFontFamily=t.fontFamily),t.fontSize&&(Ee.actorFontSize=Ee.noteFontSize=Ee.messageFontSize=t.fontSize),t.fontWeight&&(Ee.actorFontWeight=Ee.noteFontWeight=Ee.messageFontWeight=t.fontWeight)},"setConf"),Uw=s(function(t){return He.activations.filter(function(e){return e.actor===t})},"actorActivations"),Oce=s(function(t,e){let r=e.get(t),n=Uw(t),i=n.reduce(function(o,l){return $e.getMin(o,l.startx)},r.x+r.width/2-1),a=n.reduce(function(o,l){return $e.getMax(o,l.stopx)},r.x+r.width/2+1);return[i,a]},"activationBounds");s(Lc,"adjustLoopHeightForWrap");s(SFe,"adjustCreatedDestroyedData");_Fe=s(async function(t,e,r,n){let{securityLevel:i,sequence:a}=le();Ee=a;let o;i==="sandbox"&&(o=Me("#i"+e));let l=i==="sandbox"?Me(o.nodes()[0].contentDocument.body):Me("body"),u=i==="sandbox"?o.nodes()[0].contentDocument:document;He.init(),V.debug(n.db);let h=i==="sandbox"?l.select(`[id="${e}"]`):Me(`[id="${e}"]`),f=n.db.getActors(),d=n.db.getCreatedActors(),p=n.db.getDestroyedActors(),m=n.db.getBoxes(),g=n.db.getActorKeys(),y=n.db.getMessages(),v=n.db.getDiagramTitle(),x=n.db.hasAtLeastOneBox(),b=n.db.hasAtLeastOneBoxWithTitle(),k=await AFe(f,y,n);if(Ee.height=await DFe(f,k,m),Zn.insertComputerIcon(h),Zn.insertDatabaseIcon(h),Zn.insertClockIcon(h),x&&(He.bumpVerticalPos(Ee.boxMargin),b&&He.bumpVerticalPos(m[0].textMaxHeight)),Ee.hideUnusedParticipants===!0){let z=new Set;y.forEach(N=>{z.add(N.from),z.add(N.to)}),g=g.filter(N=>z.has(N))}CFe(h,f,d,g,0,y,!1);let A=await IFe(y,f,k,n);Zn.insertArrowHead(h),Zn.insertArrowCrossHead(h),Zn.insertArrowFilledHead(h),Zn.insertSequenceNumber(h);function w(z,N){let U=He.endActivation(z);U.starty+18>N&&(U.starty=N-6,N+=12),Zn.drawActivation(h,U,N,Ee,Uw(z.from).length),He.insert(U.startx,N-10,U.stopx,N)}s(w,"activeEnd");let T=1,C=1,E=[],S=[],R=0;for(let z of y){let N,U,$;switch(z.type){case n.db.LINETYPE.NOTE:He.resetVerticalPos(),U=z.noteModel,await wFe(h,U);break;case n.db.LINETYPE.ACTIVE_START:He.newActivation(z,h,f);break;case n.db.LINETYPE.ACTIVE_END:w(z,He.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W));break;case n.db.LINETYPE.LOOP_END:N=He.endLoop(),await Zn.drawLoop(h,N,"loop",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;case n.db.LINETYPE.RECT_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin,W=>He.newLoop(void 0,W.message));break;case n.db.LINETYPE.RECT_END:N=He.endLoop(),S.push(N),He.models.addLoop(N),He.bumpVerticalPos(N.stopy-He.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W));break;case n.db.LINETYPE.OPT_END:N=He.endLoop(),await Zn.drawLoop(h,N,"opt",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;case n.db.LINETYPE.ALT_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W));break;case n.db.LINETYPE.ALT_ELSE:Lc(A,z,Ee.boxMargin+Ee.boxTextMargin,Ee.boxMargin,W=>He.addSectionToLoop(W));break;case n.db.LINETYPE.ALT_END:N=He.endLoop(),await Zn.drawLoop(h,N,"alt",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W)),He.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Lc(A,z,Ee.boxMargin+Ee.boxTextMargin,Ee.boxMargin,W=>He.addSectionToLoop(W));break;case n.db.LINETYPE.PAR_END:N=He.endLoop(),await Zn.drawLoop(h,N,"par",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;case n.db.LINETYPE.AUTONUMBER:T=z.message.start||T,C=z.message.step||C,z.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W));break;case n.db.LINETYPE.CRITICAL_OPTION:Lc(A,z,Ee.boxMargin+Ee.boxTextMargin,Ee.boxMargin,W=>He.addSectionToLoop(W));break;case n.db.LINETYPE.CRITICAL_END:N=He.endLoop(),await Zn.drawLoop(h,N,"critical",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;case n.db.LINETYPE.BREAK_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W));break;case n.db.LINETYPE.BREAK_END:N=He.endLoop(),await Zn.drawLoop(h,N,"break",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;default:try{$=z.msgModel,$.starty=He.getVerticalPos(),$.sequenceIndex=T,$.sequenceVisible=n.db.showSequenceNumbers();let W=await TFe(h,$);SFe(z,$,W,R,f,d,p),E.push({messageModel:$,lineStartY:W}),He.models.addMessage($)}catch(W){V.error("error while drawing message",W)}}[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(z.type)&&(T=T+C),R++}V.debug("createdActors",d),V.debug("destroyedActors",p),await LN(h,f,g,!1);for(let z of E)await EFe(h,z.messageModel,z.lineStartY,n);Ee.mirrorActors&&await LN(h,f,g,!0),S.forEach(z=>Zn.drawBackgroundRect(h,z)),SN(h,f,g,Ee);for(let z of He.models.boxes)z.height=He.getVerticalPos()-z.y,He.insert(z.x,z.y,z.x+z.width,z.height),z.startx=z.x,z.starty=z.y,z.stopx=z.startx+z.width,z.stopy=z.starty+z.height,z.stroke="rgb(0,0,0, 0.5)",Zn.drawBox(h,z,Ee);x&&He.bumpVerticalPos(Ee.boxMargin);let D=Pce(h,f,g,u),{bounds:L}=He.getBounds();L.startx===void 0&&(L.startx=0),L.starty===void 0&&(L.starty=0),L.stopx===void 0&&(L.stopx=0),L.stopy===void 0&&(L.stopy=0);let P=L.stopy-L.starty;P<D.maxHeight&&(P=D.maxHeight);let M=P+2*Ee.diagramMarginY;Ee.mirrorActors&&(M=M-Ee.boxMargin+Ee.bottomMarginAdj);let F=L.stopx-L.startx;F<D.maxWidth&&(F=D.maxWidth);let I=F+2*Ee.diagramMarginX;v&&h.append("text").text(v).attr("x",(L.stopx-L.startx)/2-2*Ee.diagramMarginX).attr("y",-25),xr(h,M,I,Ee.useMaxWidth);let O=v?40:0;h.attr("viewBox",L.startx-Ee.diagramMarginX+" -"+(Ee.diagramMarginY+O)+" "+I+" "+(M+O)),V.debug("models:",He.models)},"draw");s(AFe,"getMaxMessageWidthPerActor");LFe=s(function(t){let e=0,r=AN(Ee);for(let n in t.links){let a=dt.calculateTextDimensions(n,r).width+2*Ee.wrapPadding+2*Ee.boxMargin;e<a&&(e=a)}return e},"getRequiredPopupWidth");s(DFe,"calculateActorMargins");RFe=s(async function(t,e,r){let n=e.get(t.from),i=e.get(t.to),a=n.x,o=i.x,l=t.wrap&&t.message,u=Ei(t.message)?await $f(t.message,le()):dt.calculateTextDimensions(l?dt.wrapLabel(t.message,Ee.width,kg(Ee)):t.message,kg(Ee)),h={width:l?Ee.width:$e.getMax(Ee.width,u.width+2*Ee.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(h.width=l?$e.getMax(Ee.width,u.width):$e.getMax(n.width/2+i.width/2,u.width+2*Ee.noteMargin),h.startx=a+(n.width+Ee.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(h.width=l?$e.getMax(Ee.width,u.width+2*Ee.noteMargin):$e.getMax(n.width/2+i.width/2,u.width+2*Ee.noteMargin),h.startx=a-h.width+(n.width-Ee.actorMargin)/2):t.to===t.from?(u=dt.calculateTextDimensions(l?dt.wrapLabel(t.message,$e.getMax(Ee.width,n.width),kg(Ee)):t.message,kg(Ee)),h.width=l?$e.getMax(Ee.width,n.width):$e.getMax(n.width,Ee.width,u.width+2*Ee.noteMargin),h.startx=a+(n.width-h.width)/2):(h.width=Math.abs(a+n.width/2-(o+i.width/2))+Ee.actorMargin,h.startx=a<o?a+n.width/2-Ee.actorMargin/2:o+i.width/2-Ee.actorMargin/2),l&&(h.message=dt.wrapLabel(t.message,h.width-2*Ee.wrapPadding,kg(Ee))),V.debug(`NM:[${h.startx},${h.stopx},${h.starty},${h.stopy}:${h.width},${h.height}=${t.message}]`),h},"buildNoteModel"),MFe=s(function(t,e,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};let[n,i]=Oce(t.from,e),[a,o]=Oce(t.to,e),l=n<=a,u=l?i:n,h=l?a:o,f=Math.abs(a-o)>2,d=s(y=>l?-y:y,"adjustValue");t.from===t.to?h=u:(t.activate&&!f&&(h+=d(Ee.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(h+=d(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(u-=d(3)));let p=[n,i,a,o],m=Math.abs(u-h);t.wrap&&t.message&&(t.message=dt.wrapLabel(t.message,$e.getMax(m+2*Ee.wrapPadding,Ee.width),v0(Ee)));let g=dt.calculateTextDimensions(t.message,v0(Ee));return{width:$e.getMax(t.wrap?0:g.width+2*Ee.wrapPadding,m+2*Ee.wrapPadding,Ee.width),height:0,startx:u,stopx:h,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)}},"buildMessageModel"),IFe=s(async function(t,e,r,n){let i={},a=[],o,l,u;for(let h of t){switch(h.id=dt.random({length:10}),h.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:h.id,msg:h.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:h.message&&(o=a.pop(),i[o.id]=o,i[h.id]=o,a.push(o));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:o=a.pop(),i[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:{let d=e.get(h.from?h.from:h.to.actor),p=Uw(h.from?h.from:h.to.actor).length,m=d.x+d.width/2+(p-1)*Ee.activationWidth/2,g={startx:m,stopx:m+Ee.activationWidth,actor:h.from,enabled:!0};He.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let d=He.activations.map(p=>p.actor).lastIndexOf(h.from);He.activations.splice(d,1).splice(0,1)}break}h.placement!==void 0?(l=await RFe(h,e,n),h.noteModel=l,a.forEach(d=>{o=d,o.from=$e.getMin(o.from,l.startx),o.to=$e.getMax(o.to,l.startx+l.width),o.width=$e.getMax(o.width,Math.abs(o.from-o.to))-Ee.labelBoxWidth})):(u=MFe(h,e,n),h.msgModel=u,u.startx&&u.stopx&&a.length>0&&a.forEach(d=>{if(o=d,u.startx===u.stopx){let p=e.get(h.from),m=e.get(h.to);o.from=$e.getMin(p.x-u.width/2,p.x-p.width/2,o.from),o.to=$e.getMax(m.x+u.width/2,m.x+p.width/2,o.to),o.width=$e.getMax(o.width,Math.abs(o.to-o.from))-Ee.labelBoxWidth}else o.from=$e.getMin(u.startx,o.from),o.to=$e.getMax(u.stopx,o.to),o.width=$e.getMax(o.width,u.width)-Ee.labelBoxWidth}))}return He.activations=[],V.debug("Loop type widths:",i),i},"calculateLoopBounds"),Fce={bounds:He,drawActors:LN,drawActorsPopup:Pce,setConf:Bce,draw:_Fe}});var $ce={};ur($ce,{diagram:()=>NFe});var NFe,Gce=_(()=>{"use strict";yce();Cce();_ce();zce();NFe={parser:gce,db:TN,renderer:Fce,styles:Sce,init:s(({wrap:t})=>{TN.setWrap(t)},"init")}});var DN,qw,RN=_(()=>{"use strict";DN=function(){var t=s(function(Oe,_e,he,q){for(he=he||{},q=Oe.length;q--;he[Oe[q]]=_e);return he},"o"),e=[1,17],r=[1,18],n=[1,19],i=[1,39],a=[1,40],o=[1,25],l=[1,23],u=[1,24],h=[1,31],f=[1,32],d=[1,33],p=[1,34],m=[1,35],g=[1,36],y=[1,26],v=[1,27],x=[1,28],b=[1,29],k=[1,43],A=[1,30],w=[1,42],T=[1,44],C=[1,41],E=[1,45],S=[1,9],R=[1,8,9],D=[1,56],L=[1,57],P=[1,58],M=[1,59],F=[1,60],I=[1,61],O=[1,62],z=[1,8,9,39],N=[1,74],U=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],$=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],W=[13,74,80,95,97,98],ee=[13,64,65,74,80,95,97,98],te=[13,59,60,61,62,63,74,80,95,97,98],ce=[1,93],Z=[1,110],fe=[1,108],ne=[1,102],H=[1,103],Q=[1,104],K=[1,105],re=[1,106],ie=[1,107],ye=[1,109],j=[1,8,9,37,39,42],De=[1,8,9,21],oe=[1,8,9,78],Re=[1,8,9,21,73,74,78,80,81,82,83,84,85],Pe={trace:s(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,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:s(function(_e,he,q,se,ue,X,ae){var pe=X.length-1;switch(ue){case 8:this.$=X[pe-1];break;case 9:case 11:case 12:this.$=X[pe];break;case 10:case 13:this.$=X[pe-1]+X[pe];break;case 14:case 15:this.$=X[pe-1]+"~"+X[pe]+"~";break;case 16:se.addRelation(X[pe]);break;case 17:X[pe-1].title=se.cleanupLabel(X[pe]),se.addRelation(X[pe-1]);break;case 27:this.$=X[pe].trim(),se.setAccTitle(this.$);break;case 28:case 29:this.$=X[pe].trim(),se.setAccDescription(this.$);break;case 30:se.addClassesToNamespace(X[pe-3],X[pe-1]);break;case 31:se.addClassesToNamespace(X[pe-4],X[pe-1]);break;case 32:this.$=X[pe],se.addNamespace(X[pe]);break;case 33:this.$=[X[pe]];break;case 34:this.$=[X[pe-1]];break;case 35:X[pe].unshift(X[pe-2]),this.$=X[pe];break;case 37:se.setCssClass(X[pe-2],X[pe]);break;case 38:se.addMembers(X[pe-3],X[pe-1]);break;case 39:se.setCssClass(X[pe-5],X[pe-3]),se.addMembers(X[pe-5],X[pe-1]);break;case 40:this.$=X[pe],se.addClass(X[pe]);break;case 41:this.$=X[pe-1],se.addClass(X[pe-1]),se.setClassLabel(X[pe-1],X[pe]);break;case 42:se.addAnnotation(X[pe],X[pe-2]);break;case 43:this.$=[X[pe]];break;case 44:X[pe].push(X[pe-1]),this.$=X[pe];break;case 45:break;case 46:se.addMember(X[pe-1],se.cleanupLabel(X[pe]));break;case 47:break;case 48:break;case 49:this.$={id1:X[pe-2],id2:X[pe],relation:X[pe-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:X[pe-3],id2:X[pe],relation:X[pe-1],relationTitle1:X[pe-2],relationTitle2:"none"};break;case 51:this.$={id1:X[pe-3],id2:X[pe],relation:X[pe-2],relationTitle1:"none",relationTitle2:X[pe-1]};break;case 52:this.$={id1:X[pe-4],id2:X[pe],relation:X[pe-2],relationTitle1:X[pe-3],relationTitle2:X[pe-1]};break;case 53:se.addNote(X[pe],X[pe-1]);break;case 54:se.addNote(X[pe]);break;case 55:se.setDirection("TB");break;case 56:se.setDirection("BT");break;case 57:se.setDirection("RL");break;case 58:se.setDirection("LR");break;case 59:this.$={type1:X[pe-2],type2:X[pe],lineType:X[pe-1]};break;case 60:this.$={type1:"none",type2:X[pe],lineType:X[pe-1]};break;case 61:this.$={type1:X[pe-1],type2:"none",lineType:X[pe]};break;case 62:this.$={type1:"none",type2:"none",lineType:X[pe]};break;case 63:this.$=se.relationType.AGGREGATION;break;case 64:this.$=se.relationType.EXTENSION;break;case 65:this.$=se.relationType.COMPOSITION;break;case 66:this.$=se.relationType.DEPENDENCY;break;case 67:this.$=se.relationType.LOLLIPOP;break;case 68:this.$=se.lineType.LINE;break;case 69:this.$=se.lineType.DOTTED_LINE;break;case 70:case 76:this.$=X[pe-2],se.setClickEvent(X[pe-1],X[pe]);break;case 71:case 77:this.$=X[pe-3],se.setClickEvent(X[pe-2],X[pe-1]),se.setTooltip(X[pe-2],X[pe]);break;case 72:this.$=X[pe-2],se.setLink(X[pe-1],X[pe]);break;case 73:this.$=X[pe-3],se.setLink(X[pe-2],X[pe-1],X[pe]);break;case 74:this.$=X[pe-3],se.setLink(X[pe-2],X[pe-1]),se.setTooltip(X[pe-2],X[pe]);break;case 75:this.$=X[pe-4],se.setLink(X[pe-3],X[pe-2],X[pe]),se.setTooltip(X[pe-3],X[pe-1]);break;case 78:this.$=X[pe-3],se.setClickEvent(X[pe-2],X[pe-1],X[pe]);break;case 79:this.$=X[pe-4],se.setClickEvent(X[pe-3],X[pe-2],X[pe-1]),se.setTooltip(X[pe-3],X[pe]);break;case 80:this.$=X[pe-3],se.setLink(X[pe-2],X[pe]);break;case 81:this.$=X[pe-4],se.setLink(X[pe-3],X[pe-1],X[pe]);break;case 82:this.$=X[pe-4],se.setLink(X[pe-3],X[pe-1]),se.setTooltip(X[pe-3],X[pe]);break;case 83:this.$=X[pe-5],se.setLink(X[pe-4],X[pe-2],X[pe]),se.setTooltip(X[pe-4],X[pe-1]);break;case 84:this.$=X[pe-2],se.setCssStyle(X[pe-1],X[pe]);break;case 85:se.setCssClass(X[pe-1],X[pe]);break;case 86:this.$=[X[pe]];break;case 87:X[pe-2].push(X[pe]),this.$=X[pe-2];break;case 89:this.$=X[pe-1]+X[pe];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:r,35:n,36:21,40:i,41:22,44:a,45:o,47:l,48:u,50:h,52:f,53:d,54:p,55:m,56:g,66:y,67:v,69:x,73:b,74:k,76:A,80:w,95:T,97:C,98:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(S,[2,5],{8:[1,46]}),{8:[1,47]},t(R,[2,16],{21:[1,48]}),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(R,[2,23]),t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),{32:[1,49]},{34:[1,50]},t(R,[2,29]),t(R,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:D,60:L,61:P,62:M,63:F,64:I,65:O}),{37:[1,63]},t(z,[2,36],{37:[1,65],42:[1,64]}),t(R,[2,47]),t(R,[2,48]),{16:66,74:k,80:w,95:T,97:C},{16:37,17:67,18:38,74:k,80:w,95:T,97:C,98:E},{16:37,17:68,18:38,74:k,80:w,95:T,97:C,98:E},{16:37,17:69,18:38,74:k,80:w,95:T,97:C,98:E},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:k,80:w,95:T,97:C,98:E},{13:N,51:73},t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(U,[2,11],{16:37,18:38,17:75,19:[1,76],74:k,80:w,95:T,97:C,98:E}),t(U,[2,12],{19:[1,77]}),{15:78,16:79,74:k,80:w,95:T,97:C},{16:37,17:80,18:38,74:k,80:w,95:T,97:C,98:E},t($,[2,112]),t($,[2,113]),t($,[2,114]),t($,[2,115]),t([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),t(S,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:e,33:r,35:n,40:i,44:a,45:o,47:l,48:u,50:h,52:f,53:d,54:p,55:m,56:g,66:y,67:v,69:x,73:b,74:k,76:A,80:w,95:T,97:C,98:E}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:r,35:n,36:21,40:i,41:22,44:a,45:o,47:l,48:u,50:h,52:f,53:d,54:p,55:m,56:g,66:y,67:v,69:x,73:b,74:k,76:A,80:w,95:T,97:C,98:E},t(R,[2,17]),t(R,[2,27]),t(R,[2,28]),{13:[1,84],16:37,17:83,18:38,74:k,80:w,95:T,97:C,98:E},{49:85,57:54,58:55,59:D,60:L,61:P,62:M,63:F,64:I,65:O},t(R,[2,46]),{58:86,64:I,65:O},t(W,[2,62],{57:87,59:D,60:L,61:P,62:M,63:F}),t(ee,[2,63]),t(ee,[2,64]),t(ee,[2,65]),t(ee,[2,66]),t(ee,[2,67]),t(te,[2,68]),t(te,[2,69]),{8:[1,89],23:90,38:88,41:22,44:a},{16:91,74:k,80:w,95:T,97:C},{43:92,47:ce},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:Z,73:fe,74:ne,75:99,77:100,79:101,80:H,81:Q,82:K,83:re,84:ie,85:ye},{74:[1,111]},{13:N,51:112},t(R,[2,54]),t(R,[2,117]),t(U,[2,13]),t(U,[2,14]),t(U,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:k,80:w,95:T,97:C},t(j,[2,40],{11:114,12:[1,115]}),t(S,[2,7]),{9:[1,116]},t(De,[2,49]),{16:37,17:117,18:38,74:k,80:w,95:T,97:C,98:E},{13:[1,119],16:37,17:118,18:38,74:k,80:w,95:T,97:C,98:E},t(W,[2,61],{57:120,59:D,60:L,61:P,62:M,63:F}),t(W,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:a},{8:[1,123],39:[2,33]},t(z,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:ce},{16:37,17:127,18:38,74:k,80:w,95:T,97:C,98:E},t(R,[2,70],{13:[1,128]}),t(R,[2,72],{13:[1,130],68:[1,129]}),t(R,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},t(R,[2,84],{78:[1,134]}),t(oe,[2,86],{79:135,21:Z,73:fe,74:ne,80:H,81:Q,82:K,83:re,84:ie,85:ye}),t(Re,[2,88]),t(Re,[2,90]),t(Re,[2,91]),t(Re,[2,92]),t(Re,[2,93]),t(Re,[2,94]),t(Re,[2,95]),t(Re,[2,96]),t(Re,[2,97]),t(Re,[2,98]),t(R,[2,85]),t(R,[2,53]),{37:[2,10]},t(j,[2,41]),{13:[1,136]},{1:[2,4]},t(De,[2,51]),t(De,[2,50]),{16:37,17:137,18:38,74:k,80:w,95:T,97:C,98:E},t(W,[2,59]),t(R,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:a},{43:140,47:ce},t(z,[2,38]),{39:[2,44]},t(R,[2,42]),t(R,[2,71]),t(R,[2,73]),t(R,[2,74],{68:[1,141]}),t(R,[2,77]),t(R,[2,78],{13:[1,142]}),t(R,[2,80],{13:[1,144],68:[1,143]}),{21:Z,73:fe,74:ne,77:145,79:101,80:H,81:Q,82:K,83:re,84:ie,85:ye},t(Re,[2,89]),{14:[1,146]},t(De,[2,52]),t(R,[2,31]),{39:[2,35]},{39:[1,147]},t(R,[2,75]),t(R,[2,79]),t(R,[2,81]),t(R,[2,82],{68:[1,148]}),t(oe,[2,87],{79:135,21:Z,73:fe,74:ne,80:H,81:Q,82:K,83:re,84:ie,85:ye}),t(j,[2,8]),t(z,[2,39]),t(R,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:s(function(_e,he){if(he.recoverable)this.trace(_e);else{var q=new Error(_e);throw q.hash=he,q}},"parseError"),parse:s(function(_e){var he=this,q=[0],se=[],ue=[null],X=[],ae=this.table,pe="",de=0,Ie=0,Ne=0,Be=2,ze=1,qe=X.slice.call(arguments,1),Fe=Object.create(this.lexer),we={yy:{}};for(var Je in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Je)&&(we.yy[Je]=this.yy[Je]);Fe.setInput(_e,we.yy),we.yy.lexer=Fe,we.yy.parser=this,typeof Fe.yylloc>"u"&&(Fe.yylloc={});var We=Fe.yylloc;X.push(We);var or=Fe.options&&Fe.options.ranges;typeof we.yy.parseError=="function"?this.parseError=we.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Cr(vt){q.length=q.length-2*vt,ue.length=ue.length-vt,X.length=X.length-vt}s(Cr,"popStack");function Ut(){var vt;return vt=se.pop()||Fe.lex()||ze,typeof vt!="number"&&(vt instanceof Array&&(se=vt,vt=se.pop()),vt=he.symbols_[vt]||vt),vt}s(Ut,"lex");for(var ar,ut,Rt,Qe,Dt,qt,yt={},Et,pt,Wt,ot;;){if(Rt=q[q.length-1],this.defaultActions[Rt]?Qe=this.defaultActions[Rt]:((ar===null||typeof ar>"u")&&(ar=Ut()),Qe=ae[Rt]&&ae[Rt][ar]),typeof Qe>"u"||!Qe.length||!Qe[0]){var fr="";ot=[];for(Et in ae[Rt])this.terminals_[Et]&&Et>Be&&ot.push("'"+this.terminals_[Et]+"'");Fe.showPosition?fr="Parse error on line "+(de+1)+`:
`+Fe.showPosition()+`
Expecting `+ot.join(", ")+", got '"+(this.terminals_[ar]||ar)+"'":fr="Parse error on line "+(de+1)+": Unexpected "+(ar==ze?"end of input":"'"+(this.terminals_[ar]||ar)+"'"),this.parseError(fr,{text:Fe.match,token:this.terminals_[ar]||ar,line:Fe.yylineno,loc:We,expected:ot})}if(Qe[0]instanceof Array&&Qe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Rt+", token: "+ar);switch(Qe[0]){case 1:q.push(ar),ue.push(Fe.yytext),X.push(Fe.yylloc),q.push(Qe[1]),ar=null,ut?(ar=ut,ut=null):(Ie=Fe.yyleng,pe=Fe.yytext,de=Fe.yylineno,We=Fe.yylloc,Ne>0&&Ne--);break;case 2:if(pt=this.productions_[Qe[1]][1],yt.$=ue[ue.length-pt],yt._$={first_line:X[X.length-(pt||1)].first_line,last_line:X[X.length-1].last_line,first_column:X[X.length-(pt||1)].first_column,last_column:X[X.length-1].last_column},or&&(yt._$.range=[X[X.length-(pt||1)].range[0],X[X.length-1].range[1]]),qt=this.performAction.apply(yt,[pe,Ie,de,we.yy,Qe[1],ue,X].concat(qe)),typeof qt<"u")return qt;pt&&(q=q.slice(0,-1*pt*2),ue=ue.slice(0,-1*pt),X=X.slice(0,-1*pt)),q.push(this.productions_[Qe[1]][0]),ue.push(yt.$),X.push(yt._$),Wt=ae[q[q.length-2]][q[q.length-1]],q.push(Wt);break;case 3:return!0}}return!0},"parse")},Se=function(){var Oe={EOF:1,parseError:s(function(he,q){if(this.yy.parser)this.yy.parser.parseError(he,q);else throw new Error(he)},"parseError"),setInput:s(function(_e,he){return this.yy=he||this.yy||{},this._input=_e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var _e=this._input[0];this.yytext+=_e,this.yyleng++,this.offset++,this.match+=_e,this.matched+=_e;var he=_e.match(/(?:\r\n?|\n).*/g);return he?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_e},"input"),unput:s(function(_e){var he=_e.length,q=_e.split(/(?:\r\n?|\n)/g);this._input=_e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-he),this.offset-=he;var se=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),q.length-1&&(this.yylineno-=q.length-1);var ue=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:q?(q.length===se.length?this.yylloc.first_column:0)+se[se.length-q.length].length-q[0].length:this.yylloc.first_column-he},this.options.ranges&&(this.yylloc.range=[ue[0],ue[0]+this.yyleng-he]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(_e){this.unput(this.match.slice(_e))},"less"),pastInput:s(function(){var _e=this.matched.substr(0,this.matched.length-this.match.length);return(_e.length>20?"...":"")+_e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var _e=this.match;return _e.length<20&&(_e+=this._input.substr(0,20-_e.length)),(_e.substr(0,20)+(_e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var _e=this.pastInput(),he=new Array(_e.length+1).join("-");return _e+this.upcomingInput()+`
`+he+"^"},"showPosition"),test_match:s(function(_e,he){var q,se,ue;if(this.options.backtrack_lexer&&(ue={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&&(ue.yylloc.range=this.yylloc.range.slice(0))),se=_e[0].match(/(?:\r\n?|\n).*/g),se&&(this.yylineno+=se.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:se?se[se.length-1].length-se[se.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_e[0].length},this.yytext+=_e[0],this.match+=_e[0],this.matches=_e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_e[0].length),this.matched+=_e[0],q=this.performAction.call(this,this.yy,this,he,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),q)return q;if(this._backtrack){for(var X in ue)this[X]=ue[X];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _e,he,q,se;this._more||(this.yytext="",this.match="");for(var ue=this._currentRules(),X=0;X<ue.length;X++)if(q=this._input.match(this.rules[ue[X]]),q&&(!he||q[0].length>he[0].length)){if(he=q,se=X,this.options.backtrack_lexer){if(_e=this.test_match(q,ue[X]),_e!==!1)return _e;if(this._backtrack){he=!1;continue}else return!1}else if(!this.options.flex)break}return he?(_e=this.test_match(he,ue[se]),_e!==!1?_e:!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:s(function(){var he=this.next();return he||this.lex()},"lex"),begin:s(function(he){this.conditionStack.push(he)},"begin"),popState:s(function(){var he=this.conditionStack.length-1;return he>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(he){return he=this.conditionStack.length-1-Math.abs(he||0),he>=0?this.conditionStack[he]:"INITIAL"},"topState"),pushState:s(function(he){this.begin(he)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(he,q,se,ue){var X=ue;switch(se){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:break;case 5:break;case 6:return this.begin("acc_title"),31;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),33;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 70;case 22:this.popState();break;case 23:return 71;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 73;case 28:return this.begin("namespace"),40;break;case 29:return this.popState(),8;break;case 30:break;case 31:return this.begin("namespace-body"),37;break;case 32:return this.popState(),39;break;case 33:return"EOF_IN_STRUCT";case 34:return 8;case 35:break;case 36:return"EDGE_STATE";case 37:return this.begin("class"),44;break;case 38:return this.popState(),8;break;case 39:break;case 40:return this.popState(),this.popState(),39;break;case 41:return this.begin("class-body"),37;break;case 42:return this.popState(),39;break;case 43:return"EOF_IN_STRUCT";case 44:return"EDGE_STATE";case 45:return"OPEN_IN_STRUCT";case 46:break;case 47:return"MEMBER";case 48:return 76;case 49:return 66;case 50:return 67;case 51:return 69;case 52:return 50;case 53:return 52;case 54:return 45;case 55:return 46;case 56:return 72;case 57:this.popState();break;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 60:this.popState();break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:return 68;case 64:return 68;case 65:return 68;case 66:return 68;case 67:return 60;case 68:return 60;case 69:return 62;case 70:return 62;case 71:return 61;case 72:return 59;case 73:return 63;case 74:return 64;case 75:return 65;case 76:return 21;case 77:return 42;case 78:return 95;case 79:return"DOT";case 80:return"PLUS";case 81:return 81;case 82:return 78;case 83:return 84;case 84:return 84;case 85:return 85;case 86:return"EQUALS";case 87:return"EQUALS";case 88:return 74;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 80;case 93:return 97;case 94:return 83;case 95:return 83;case 96: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)/,/^(?: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,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}};return Oe}();Pe.lexer=Se;function Ue(){this.yy={}}return s(Ue,"Parser"),Ue.prototype=Pe,Pe.Parser=Ue,new Ue}();DN.parser=DN;qw=DN});var qce,nx,Wce=_(()=>{"use strict";gt();Qt();qce=["#","+","~","-",""],nx=class{static{s(this,"ClassMember")}constructor(e,r){this.memberType=r,this.visibility="",this.classifier="";let n=$r(e,le());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+uh(this.id);this.memberType==="method"&&(e+=`(${uh(this.parameters.trim())})`,this.returnType&&(e+=" : "+uh(this.returnType))),e=e.trim();let r=this.parseClassifier();return{displayText:e,cssStyle:r}}parseMember(e){let r="";if(this.memberType==="method"){let i=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(i){let a=i[1]?i[1].trim():"";if(qce.includes(a)&&(this.visibility=a),this.id=i[2].trim(),this.parameters=i[3]?i[3].trim():"",r=i[4]?i[4].trim():"",this.returnType=i[5]?i[5].trim():"",r===""){let o=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(o)&&(r=o,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,i=e.substring(0,1),a=e.substring(n-1);qce.includes(i)&&(this.visibility=i),/[$*]/.exec(a)&&(r=a),this.id=e.substring(this.visibility===""?0:1,r===""?n:n-1)}this.classifier=r}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}});var Yw,IN,Mi,Ww,Hce,Gu,MN,ix,x0,b0,FFe,Hw,Yce,zFe,$Fe,GFe,VFe,UFe,qFe,WFe,Xce,HFe,YFe,XFe,NN,jFe,KFe,QFe,ZFe,JFe,eze,tze,rze,jce,ON,nze,ize,aze,sze,oze,lze,cze,wg,PN=_(()=>{"use strict";Xt();it();gt();Qt();pr();Ci();Wce();Yw="classId-",IN=[],Mi=new Map,Ww=[],Hce=0,Gu=new Map,MN=0,ix=[],x0=s(t=>$e.sanitizeText(t,le()),"sanitizeText"),b0=s(function(t){let e=$e.sanitizeText(t,le()),r="",n=e;if(e.indexOf("~")>0){let i=e.split("~");n=x0(i[0]),r=x0(i[1])}return{className:n,type:r}},"splitClassNameAndType"),FFe=s(function(t,e){let r=$e.sanitizeText(t,le());e&&(e=x0(e));let{className:n}=b0(r);Mi.get(n).label=e},"setClassLabel"),Hw=s(function(t){let e=$e.sanitizeText(t,le()),{className:r,type:n}=b0(e);if(Mi.has(r))return;let i=$e.sanitizeText(r,le());Mi.set(i,{id:i,type:n,label:i,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:Yw+i+"-"+Hce}),Hce++},"addClass"),Yce=s(function(t){let e=$e.sanitizeText(t,le());if(Mi.has(e))return Mi.get(e).domId;throw new Error("Class not found: "+e)},"lookUpDomId"),zFe=s(function(){IN=[],Mi=new Map,Ww=[],ix=[],ix.push(jce),Gu=new Map,MN=0,ON="TB",br()},"clear"),$Fe=s(function(t){return Mi.get(t)},"getClass"),GFe=s(function(){return Mi},"getClasses"),VFe=s(function(){return IN},"getRelations"),UFe=s(function(){return Ww},"getNotes"),qFe=s(function(t){V.debug("Adding relation: "+JSON.stringify(t)),Hw(t.id1),Hw(t.id2),t.id1=b0(t.id1).className,t.id2=b0(t.id2).className,t.relationTitle1=$e.sanitizeText(t.relationTitle1.trim(),le()),t.relationTitle2=$e.sanitizeText(t.relationTitle2.trim(),le()),IN.push(t)},"addRelation"),WFe=s(function(t,e){let r=b0(t).className;Mi.get(r).annotations.push(e)},"addAnnotation"),Xce=s(function(t,e){Hw(t);let r=b0(t).className,n=Mi.get(r);if(typeof e=="string"){let i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?n.annotations.push(x0(i.substring(2,i.length-2))):i.indexOf(")")>0?n.methods.push(new nx(i,"method")):i&&n.members.push(new nx(i,"attribute"))}},"addMember"),HFe=s(function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>Xce(t,r)))},"addMembers"),YFe=s(function(t,e){let r={id:`note${Ww.length}`,class:e,text:t};Ww.push(r)},"addNote"),XFe=s(function(t){return t.startsWith(":")&&(t=t.substring(1)),x0(t.trim())},"cleanupLabel"),NN=s(function(t,e){t.split(",").forEach(function(r){let n=r;/\d/.exec(r[0])&&(n=Yw+n);let i=Mi.get(n);i&&i.cssClasses.push(e)})},"setCssClass"),jFe=s(function(t,e){t.split(",").forEach(function(r){e!==void 0&&(Mi.get(r).tooltip=x0(e))})},"setTooltip"),KFe=s(function(t,e){return e&&Gu.has(e)?Gu.get(e).classes.get(t).tooltip:Mi.get(t).tooltip},"getTooltip"),QFe=s(function(t,e,r){let n=le();t.split(",").forEach(function(i){let a=i;/\d/.exec(i[0])&&(a=Yw+a);let o=Mi.get(a);o&&(o.link=dt.formatUrl(e,n),n.securityLevel==="sandbox"?o.linkTarget="_top":typeof r=="string"?o.linkTarget=x0(r):o.linkTarget="_blank")}),NN(t,"clickable")},"setLink"),ZFe=s(function(t,e,r){t.split(",").forEach(function(n){JFe(n,e,r),Mi.get(n).haveCallback=!0}),NN(t,"clickable")},"setClickEvent"),JFe=s(function(t,e,r){let n=$e.sanitizeText(t,le());if(le().securityLevel!=="loose"||e===void 0)return;let a=n;if(Mi.has(a)){let o=Yce(a),l=[];if(typeof r=="string"){l=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u<l.length;u++){let h=l[u].trim();h.startsWith('"')&&h.endsWith('"')&&(h=h.substr(1,h.length-2)),l[u]=h}}l.length===0&&l.push(o),ix.push(function(){let u=document.querySelector(`[id="${o}"]`);u!==null&&u.addEventListener("click",function(){dt.runFunc(e,...l)},!1)})}},"setClickFunc"),eze=s(function(t){ix.forEach(function(e){e(t)})},"bindFunctions"),tze={LINE:0,DOTTED_LINE:1},rze={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},jce=s(function(t){let e=Me(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=Me("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Me(t).select("svg").selectAll("g.node").on("mouseover",function(){let i=Me(this);if(i.attr("title")===null)return;let o=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(i.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(/&lt;br\/&gt;/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),Me(this).classed("hover",!1)})},"setupToolTips");ix.push(jce);ON="TB",nze=s(()=>ON,"getDirection"),ize=s(t=>{ON=t},"setDirection"),aze=s(function(t){Gu.has(t)||(Gu.set(t,{id:t,classes:new Map,children:{},domId:Yw+t+"-"+MN}),MN++)},"addNamespace"),sze=s(function(t){return Gu.get(t)},"getNamespace"),oze=s(function(){return Gu},"getNamespaces"),lze=s(function(t,e){if(Gu.has(t))for(let r of e){let{className:n}=b0(r);Mi.get(n).parent=t,Gu.get(t).classes.set(n,Mi.get(n))}},"addClassesToNamespace"),cze=s(function(t,e){let r=Mi.get(t);if(!(!e||!r))for(let n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)},"setCssStyle"),wg={setAccTitle:Ar,getAccTitle:Gr,getAccDescription:Ur,setAccDescription:Vr,getConfig:s(()=>le().class,"getConfig"),addClass:Hw,bindFunctions:eze,clear:zFe,getClass:$Fe,getClasses:GFe,getNotes:UFe,addAnnotation:WFe,addNote:YFe,getRelations:VFe,addRelation:qFe,getDirection:nze,setDirection:ize,addMember:Xce,addMembers:HFe,cleanupLabel:XFe,lineType:tze,relationType:rze,setClickEvent:ZFe,setCssClass:NN,setLink:QFe,getTooltip:KFe,setTooltip:jFe,lookUpDomId:Yce,setDiagramTitle:an,getDiagramTitle:Qr,setClassLabel:FFe,addNamespace:aze,addClassesToNamespace:lze,getNamespace:sze,getNamespaces:oze,setCssStyle:cze}});var uze,Xw,BN=_(()=>{"use strict";uze=s(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};
}
.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};
}
`,"getStyles"),Xw=uze});var Kce,hze,fze,Zce,dze,Qce,jw,Jce=_(()=>{"use strict";Xt();pr();it();Qt();Kce=0,hze=s(function(t,e,r,n,i){let a=s(function(b){switch(b){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.relationType.EXTENSION:return"extension";case i.db.relationType.COMPOSITION:return"composition";case i.db.relationType.DEPENDENCY:return"dependency";case i.db.relationType.LOLLIPOP:return"lollipop"}},"getRelationType");e.points=e.points.filter(b=>!Number.isNaN(b.y));let o=e.points,l=ra().x(function(b){return b.x}).y(function(b){return b.y}).curve(hs),u=t.append("path").attr("d",l(o)).attr("id","edge"+Kce).attr("class","relation"),h="";n.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),r.relation.lineType==1&&u.attr("class","relation dashed-line"),r.relation.lineType==10&&u.attr("class","relation dotted-line"),r.relation.type1!=="none"&&u.attr("marker-start","url("+h+"#"+a(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&u.attr("marker-end","url("+h+"#"+a(r.relation.type2)+"End)");let f,d,p=e.points.length,m=dt.calcLabelPosition(e.points);f=m.x,d=m.y;let g,y,v,x;if(p%2!==0&&p>1){let b=dt.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),k=dt.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[p-1]);V.debug("cardinality_1_point "+JSON.stringify(b)),V.debug("cardinality_2_point "+JSON.stringify(k)),g=b.x,y=b.y,v=k.x,x=k.y}if(r.title!==void 0){let b=t.append("g").attr("class","classLabel"),k=b.append("text").attr("class","label").attr("x",f).attr("y",d).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=k;let A=k.node().getBBox();b.insert("rect",":first-child").attr("class","box").attr("x",A.x-n.padding/2).attr("y",A.y-n.padding/2).attr("width",A.width+n.padding).attr("height",A.height+n.padding)}V.info("Rendering relation "+JSON.stringify(r)),r.relationTitle1!==void 0&&r.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",g).attr("y",y).attr("fill","black").attr("font-size","6").text(r.relationTitle1),r.relationTitle2!==void 0&&r.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",v).attr("y",x).attr("fill","black").attr("font-size","6").text(r.relationTitle2),Kce++},"drawEdge"),fze=s(function(t,e,r,n){V.debug("Rendering class ",e,r);let i=e.id,a={id:i,label:e.id,width:0,height:0},o=t.append("g").attr("id",n.db.lookUpDomId(i)).attr("class","classGroup"),l;e.link?l=o.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):l=o.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let u=!0;e.annotations.forEach(function(k){let A=l.append("tspan").text("\xAB"+k+"\xBB");u||A.attr("dy",r.textHeight),u=!1});let h=Zce(e),f=l.append("tspan").text(h).attr("class","title");u||f.attr("dy",r.textHeight);let d=l.node().getBBox().height,p,m,g;if(e.members.length>0){p=o.append("line").attr("x1",0).attr("y1",r.padding+d+r.dividerMargin/2).attr("y2",r.padding+d+r.dividerMargin/2);let k=o.append("text").attr("x",r.padding).attr("y",d+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");u=!0,e.members.forEach(function(A){Qce(k,A,u,r),u=!1}),m=k.node().getBBox()}if(e.methods.length>0){g=o.append("line").attr("x1",0).attr("y1",r.padding+d+r.dividerMargin+m.height).attr("y2",r.padding+d+r.dividerMargin+m.height);let k=o.append("text").attr("x",r.padding).attr("y",d+2*r.dividerMargin+m.height+r.textHeight).attr("fill","white").attr("class","classText");u=!0,e.methods.forEach(function(A){Qce(k,A,u,r),u=!1})}let y=o.node().getBBox();var v=" ";e.cssClasses.length>0&&(v=v+e.cssClasses.join(" "));let b=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",y.width+2*r.padding).attr("height",y.height+r.padding+.5*r.dividerMargin).attr("class",v).node().getBBox().width;return l.node().childNodes.forEach(function(k){k.setAttribute("x",(b-k.getBBox().width)/2)}),e.tooltip&&l.insert("title").text(e.tooltip),p&&p.attr("x2",b),g&&g.attr("x2",b),a.width=b,a.height=y.height+r.padding+.5*r.dividerMargin,a},"drawClass"),Zce=s(function(t){let e=t.id;return t.type&&(e+="<"+uh(t.type)+">"),e},"getClassTitleString"),dze=s(function(t,e,r,n){V.debug("Rendering note ",e,r);let i=e.id,a={id:i,text:e.text,width:0,height:0},o=t.append("g").attr("id",i).attr("class","classGroup"),l=o.append("text").attr("y",r.textHeight+r.padding).attr("x",0),u=JSON.parse(`"${e.text}"`).split(`
`);u.forEach(function(p){V.debug(`Adding line: ${p}`),l.append("tspan").text(p).attr("class","title").attr("dy",r.textHeight)});let h=o.node().getBBox(),d=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",h.width+2*r.padding).attr("height",h.height+u.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return l.node().childNodes.forEach(function(p){p.setAttribute("x",(d-p.getBBox().width)/2)}),a.width=d,a.height=h.height+u.length*r.textHeight+r.padding+.5*r.dividerMargin,a},"drawNote"),Qce=s(function(t,e,r,n){let{displayText:i,cssStyle:a}=e.getDisplayDetails(),o=t.append("tspan").attr("x",n.padding).text(i);a!==""&&o.attr("style",e.cssStyle),r||o.attr("dy",n.textHeight)},"addTspan"),jw={getClassTitleString:Zce,drawClass:fze,drawEdge:hze,drawNote:dze}});var Qw,Kw,ax,pze,mze,eue,tue=_(()=>{"use strict";Xt();Dd();la();it();Jce();Un();gt();Qw={},Kw=20,ax=s(function(t){let e=Object.entries(Qw).find(r=>r[1].label===t);if(e)return e[0]},"getGraphId"),pze=s(function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).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","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).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","compositionEnd").attr("refX",19).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"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).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","aggregationEnd").attr("refX",19).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"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).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","dependencyEnd").attr("refX",19).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")},"insertMarkers"),mze=s(function(t,e,r,n){let i=le().class;Qw={},V.info("Rendering diagram "+t);let a=le().securityLevel,o;a==="sandbox"&&(o=Me("#i"+e));let l=a==="sandbox"?Me(o.nodes()[0].contentDocument.body):Me("body"),u=l.select(`[id='${e}']`);pze(u);let h=new ir({multigraph:!0});h.setGraph({isMultiGraph:!0}),h.setDefaultEdgeLabel(function(){return{}});let f=n.db.getClasses(),d=[...f.keys()];for(let b of d){let k=f.get(b),A=jw.drawClass(u,k,i,n);Qw[A.id]=A,h.setNode(A.id,A),V.info("Org height: "+A.height)}n.db.getRelations().forEach(function(b){V.info("tjoho"+ax(b.id1)+ax(b.id2)+JSON.stringify(b)),h.setEdge(ax(b.id1),ax(b.id2),{relation:b},b.title||"DEFAULT")}),n.db.getNotes().forEach(function(b){V.debug(`Adding note: ${JSON.stringify(b)}`);let k=jw.drawNote(u,b,i,n);Qw[k.id]=k,h.setNode(k.id,k),b.class&&f.has(b.class)&&h.setEdge(b.id,ax(b.class),{relation:{id1:b.id,id2:b.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),eo(h),h.nodes().forEach(function(b){b!==void 0&&h.node(b)!==void 0&&(V.debug("Node "+b+": "+JSON.stringify(h.node(b))),l.select("#"+(n.db.lookUpDomId(b)||b)).attr("transform","translate("+(h.node(b).x-h.node(b).width/2)+","+(h.node(b).y-h.node(b).height/2)+" )"))}),h.edges().forEach(function(b){b!==void 0&&h.edge(b)!==void 0&&(V.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(h.edge(b))),jw.drawEdge(u,h.edge(b),h.edge(b).relation,i,n))});let g=u.node().getBBox(),y=g.width+Kw*2,v=g.height+Kw*2;xr(u,v,y,i.useMaxWidth);let x=`${g.x-Kw} ${g.y-Kw} ${y} ${v}`;V.debug(`viewBox ${x}`),u.attr("viewBox",x)},"draw"),eue={draw:mze}});var rue={};ur(rue,{diagram:()=>gze});var gze,nue=_(()=>{"use strict";RN();PN();BN();tue();gze={parser:qw,db:wg,renderer:eue,styles:Xw,init:s(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,wg.clear()},"init")}});var bze,kze,wze,Tze,Eze,Cze,Sze,_ze,Aze,Lze,Dze,Zw,FN=_(()=>{"use strict";it();bze=s((t,e,r,n)=>{e.forEach(i=>{Dze[i](t,r,n)})},"insertMarkers"),kze=s((t,e,r)=>{V.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"),wze=s((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"),Tze=s((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"),Eze=s((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"),Cze=s((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"),Sze=s((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"),_ze=s((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"),Aze=s((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"),Lze=s((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"),Dze={extension:kze,composition:wze,aggregation:Tze,dependency:Eze,lollipop:Cze,point:Sze,circle:_ze,cross:Aze,barb:Lze},Zw=bze});var Kt,El,sue,oue,eT,Rze,lue,cue,Tg,Jw,uue,hue,fue,due,pue=_(()=>{"use strict";it();vv();la();Kt={},El={},sue={},oue=s(()=>{El={},sue={},Kt={}},"clear"),eT=s((t,e)=>(V.trace("In isDescendant",e," ",t," = ",El[e].includes(t)),!!El[e].includes(t)),"isDescendant"),Rze=s((t,e)=>(V.info("Descendants of ",e," is ",El[e]),V.info("Edge is ",t),t.v===e||t.w===e?!1:El[e]?El[e].includes(t.v)||eT(t.v,e)||eT(t.w,e)||El[e].includes(t.w):(V.debug("Tilt, ",e,",not in descendants"),!1)),"edgeInCluster"),lue=s((t,e,r,n)=>{V.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),V.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)lue(a,e,r,n);else{let o=e.node(a);V.info("cp ",a," to ",n," with parent ",t),r.setNode(a,o),n!==e.parent(a)&&(V.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(V.debug("Setting parent",a,t),r.setParent(a,t)):(V.info("In copy ",t,"root",n,"data",e.node(t),n),V.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let l=e.edges(a);V.debug("Copying Edges",l),l.forEach(u=>{V.info("Edge",u);let h=e.edge(u.v,u.w,u.name);V.info("Edge data",h,n);try{Rze(u,n)?(V.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),V.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):V.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",t)}catch(f){V.error(f)}})}V.debug("Removing node",a),e.removeNode(a)})},"copy"),cue=s((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)sue[i]=t,n=[...n,...cue(i,e)];return n},"extractDescendants"),Tg=s((t,e)=>{V.trace("Searching",t);let r=e.children(t);if(V.trace("Searching children of id ",t,r),r.length<1)return V.trace("This is a valid node",t),t;for(let n of r){let i=Tg(n,e);if(i)return V.trace("Found replacement for",t," => ",i),i}},"findNonClusterChild"),Jw=s(t=>!Kt[t]||!Kt[t].externalConnections?t:Kt[t]?Kt[t].id:t,"getAnchorId"),uue=s((t,e)=>{if(!t||e>10){V.debug("Opting out, no graph ");return}else V.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(V.warn("Cluster identified",r," Replacement id in edges: ",Tg(r,t)),El[r]=cue(r,t),Kt[r]={id:Tg(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(V.debug("Cluster identified",r,El),i.forEach(a=>{if(a.v!==r&&a.w!==r){let o=eT(a.v,r),l=eT(a.w,r);o^l&&(V.warn("Edge: ",a," leaves cluster ",r),V.warn("Descendants of XXX ",r,": ",El[r]),Kt[r].externalConnections=!0)}})):V.debug("Not a cluster ",r,El)});for(let r of Object.keys(Kt)){let n=Kt[r].id,i=t.parent(n);i!==r&&Kt[i]&&!Kt[i].externalConnections&&(Kt[r].id=i)}t.edges().forEach(function(r){let n=t.edge(r);V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(V.warn("Fix XXX",Kt,"ids:",r.v,r.w,"Translating: ",Kt[r.v]," --- ",Kt[r.w]),Kt[r.v]&&Kt[r.w]&&Kt[r.v]===Kt[r.w]){V.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),V.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=Jw(r.v),a=Jw(r.w),t.removeEdge(r.v,r.w,r.name);let o=r.w+"---"+r.v;t.setNode(o,{domId:o,id:o,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});let l=structuredClone(n),u=structuredClone(n);l.label="",l.arrowTypeEnd="none",u.label="",l.fromCluster=r.v,u.toCluster=r.v,t.setEdge(i,o,l,r.name+"-cyclic-special"),t.setEdge(o,a,u,r.name+"-cyclic-special")}else if(Kt[r.v]||Kt[r.w]){if(V.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=Jw(r.v),a=Jw(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let o=t.parent(i);Kt[o].externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let o=t.parent(a);Kt[o].externalConnections=!0,n.toCluster=r.w}V.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),V.warn("Adjusted Graph",Mn(t)),hue(t,0),V.trace(Kt)},"adjustClustersAndEdges"),hue=s((t,e)=>{if(V.warn("extractor - ",e,Mn(t),t.children("D")),e>10){V.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){V.debug("Done, no node has children",t.nodes());return}V.debug("Nodes = ",r,e);for(let i of r)if(V.debug("Extracting node",i,Kt,Kt[i]&&!Kt[i].externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!Kt[i])V.debug("Not a cluster",i,e);else if(!Kt[i].externalConnections&&t.children(i)&&t.children(i).length>0){V.warn("Cluster without external connections, without a parent and with children",i,e);let o=t.graph().rankdir==="TB"?"LR":"TB";Kt[i]?.clusterData?.dir&&(o=Kt[i].clusterData.dir,V.warn("Fixing dir",Kt[i].clusterData.dir,o));let l=new ir({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});V.warn("Old graph before copy",Mn(t)),lue(i,t,l,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Kt[i].clusterData,labelText:Kt[i].labelText,graph:l}),V.warn("New graph after copy node: (",i,")",Mn(l)),V.debug("Old graph after copy",Mn(t))}else V.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Kt[i].externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),V.debug(Kt);r=t.nodes(),V.warn("New list of nodes",r);for(let i of r){let a=t.node(i);V.warn(" Now next level",i,a),a.clusterNode&&hue(a.graph,e+1)}},"extractor"),fue=s((t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(n=>{let i=t.children(n),a=fue(t,i);r=[...r,...a]}),r},"sorter"),due=s(t=>fue(t,t.children()),"sortNodesByHierarchy")});var Mze,Ize,Nze,Oze,Pze,mue,gue,yue,vue=_(()=>{"use strict";PA();it();rv();ic();Xt();gt();Qt();gd();Mze=s((t,e)=>{V.info("Creating subgraph rect for ",e.id,e);let r=le(),n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=n.insert("rect",":first-child"),a=hr(r.flowchart.htmlLabels),o=n.insert("g").attr("class","cluster-label"),l=e.labelType==="markdown"?vs(o,e.labelText,{style:e.labelStyle,useHtmlLabels:a},r):o.node().appendChild(Hi(e.labelText,e.labelStyle,void 0,!0)),u=l.getBBox();if(hr(r.flowchart.htmlLabels)){let g=l.children[0],y=Me(l);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}let h=0*e.padding,f=h/2,d=e.width<=u.width+h?u.width+h:e.width;e.width<=u.width+h?e.diff=(u.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,V.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-d/2).attr("y",e.y-e.height/2-f).attr("width",d).attr("height",e.height+h);let{subGraphTitleTopMargin:p}=Ks(r);a?o.attr("transform",`translate(${e.x-u.width/2}, ${e.y-e.height/2+p})`):o.attr("transform",`translate(${e.x}, ${e.y-e.height/2+p})`);let m=i.node().getBBox();return e.width=m.width,e.height=m.height,e.intersect=function(g){return md(e,g)},n},"rect"),Ize=s((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 o=n.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(l){return md(e,l)},r},"noteGroup"),Nze=s((t,e)=>{let r=le(),n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),a=n.insert("g").attr("class","cluster-label"),o=n.append("rect"),l=a.node().appendChild(Hi(e.labelText,e.labelStyle,void 0,!0)),u=l.getBBox();if(hr(r.flowchart.htmlLabels)){let g=l.children[0],y=Me(l);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}u=l.getBBox();let h=0*e.padding,f=h/2,d=e.width<=u.width+e.padding?u.width+e.padding:e.width;e.width<=u.width+e.padding?e.diff=(u.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f).attr("width",d+h).attr("height",e.height+h),o.attr("class","inner").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f+u.height-1).attr("width",d+h).attr("height",e.height+h-u.height-3);let{subGraphTitleTopMargin:p}=Ks(r);a.attr("transform",`translate(${e.x-u.width/2}, ${e.y-e.height/2-e.padding/3+(hr(r.flowchart.htmlLabels)?5:3)+p})`);let m=i.node().getBBox();return e.height=m.height,e.intersect=function(g){return md(e,g)},n},"roundedWithTitle"),Oze=s((t,e)=>{let r=t.insert("g").attr("class",e.classes).attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);let o=n.node().getBBox();return e.width=o.width,e.height=o.height,e.diff=-e.padding/2,e.intersect=function(l){return md(e,l)},r},"divider"),Pze={rect:Mze,roundedWithTitle:Nze,noteGroup:Ize,divider:Oze},mue={},gue=s((t,e)=>{V.trace("Inserting cluster");let r=e.shape||"rect";mue[e.id]=Pze[r](t,e)},"insertCluster"),yue=s(()=>{mue={}},"clear")});var bue,Bze,xue,kue=_(()=>{"use strict";it();bue=s((t,e,r,n,i)=>{e.arrowTypeStart&&xue(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&xue(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),Bze={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},xue=s((t,e,r,n,i,a)=>{let o=Bze[r];if(!o){V.warn(`Unknown arrow type: ${r}`);return}let l=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${o}${l})`)},"addEdgeMarker")});function tT(t,e){le().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}var rT,da,Tue,nT,iT,Fze,zze,wue,aT,zN=_(()=>{"use strict";it();rv();ic();Xt();gt();pr();Qt();a9();gd();kue();rT={},da={},Tue=s(()=>{rT={},da={}},"clear"),nT=s((t,e)=>{let r=le(),n=hr(r.flowchart.htmlLabels),i=e.labelType==="markdown"?vs(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):Hi(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label");o.node().appendChild(i);let l=i.getBBox();if(n){let h=i.children[0],f=Me(i);l=h.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),rT[e.id]=a,e.width=l.width,e.height=l.height;let u;if(e.startLabelLeft){let h=Hi(e.startLabelLeft,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),da[e.id]||(da[e.id]={}),da[e.id].startLeft=f,tT(u,e.startLabelLeft)}if(e.startLabelRight){let h=Hi(e.startLabelRight,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=f.node().appendChild(h),d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),da[e.id]||(da[e.id]={}),da[e.id].startRight=f,tT(u,e.startLabelRight)}if(e.endLabelLeft){let h=Hi(e.endLabelLeft,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),da[e.id]||(da[e.id]={}),da[e.id].endLeft=f,tT(u,e.endLabelLeft)}if(e.endLabelRight){let h=Hi(e.endLabelRight,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),da[e.id]||(da[e.id]={}),da[e.id].endRight=f,tT(u,e.endLabelRight)}return i},"insertEdgeLabel");s(tT,"setTerminalWidth");iT=s((t,e)=>{V.debug("Moving label abc88 ",t.id,t.label,rT[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=le(),{subGraphTitleTotalMargin:i}=Ks(n);if(t.label){let a=rT[t.id],o=t.x,l=t.y;if(r){let u=dt.calcLabelPosition(r);V.debug("Moving label "+t.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+i/2})`)}if(t.startLabelLeft){let a=da[t.id].startLeft,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.startLabelRight){let a=da[t.id].startRight,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.endLabelLeft){let a=da[t.id].endLeft,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.endLabelRight){let a=da[t.id].endRight,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),Fze=s((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),o=t.width/2,l=t.height/2;return i>=o||a>=l},"outsideNode"),zze=s((t,e,r)=>{V.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),o=t.width/2,l=r.x<e.x?o-a:o+a,u=t.height/2,h=Math.abs(e.y-r.y),f=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*o>Math.abs(n-e.x)*u){let d=r.y<e.y?e.y-u-i:i-u-e.y;l=f*d/h;let p={x:r.x<e.x?r.x+l:r.x-f+l,y:r.y<e.y?r.y+h-d:r.y-h+d};return l===0&&(p.x=e.x,p.y=e.y),f===0&&(p.x=e.x),h===0&&(p.y=e.y),V.debug(`abc89 topp/bott calc, Q ${h}, q ${d}, R ${f}, r ${l}`,p),p}else{r.x<e.x?l=e.x-o-n:l=n-o-e.x;let d=h*l/f,p=r.x<e.x?r.x+f-l:r.x-f+l,m=r.y<e.y?r.y+d:r.y-d;return V.debug(`sides calc abc89, Q ${h}, q ${d}, R ${f}, r ${l}`,{_x:p,_y:m}),l===0&&(p=e.x,m=e.y),f===0&&(p=e.x),h===0&&(m=e.y),{x:p,y:m}}},"intersection"),wue=s((t,e)=>{V.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(!Fze(e,a)&&!i){let o=zze(e,n,a),l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)||r.push(o),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),aT=s(function(t,e,r,n,i,a,o){let l=r.points;V.debug("abc88 InsertEdge: edge=",r,"e=",e);let u=!1,h=a.node(e.v);var f=a.node(e.w);f?.intersect&&h?.intersect&&(l=l.slice(1,r.points.length-1),l.unshift(h.intersect(l[0])),l.push(f.intersect(l[l.length-1]))),r.toCluster&&(V.debug("to cluster abc88",n[r.toCluster]),l=wue(r.points,n[r.toCluster].node),u=!0),r.fromCluster&&(V.debug("from cluster abc88",n[r.fromCluster]),l=wue(l.reverse(),n[r.fromCluster].node).reverse(),u=!0);let d=l.filter(A=>!Number.isNaN(A.y)),p=hs;r.curve&&(i==="graph"||i==="flowchart")&&(p=r.curve);let{x:m,y:g}=y5(r),y=ra().x(m).y(g).curve(p),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 x=t.append("path").attr("d",y(d)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style),b="";(le().flowchart.arrowMarkerAbsolute||le().state.arrowMarkerAbsolute)&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),bue(x,r,b,o,i);let k={};return u&&(k.updatedPath=l),k.originalPath=r.points,k},"insertEdge")});var Eue,Cue,Sue=_(()=>{"use strict";Dd();vv();FN();t5();pue();r5();vue();zN();it();gd();gt();Eue=s(async(t,e,r,n,i,a)=>{V.info("Graph in recursive render: XXX",Mn(e),i);let o=e.graph().rankdir;V.trace("Dir in recursive render - dir:",o);let l=t.insert("g").attr("class","root");e.nodes()?V.info("Recursive render XXX",e.nodes()):V.info("No nodes found for",e),e.edges().length>0&&V.trace("Recursive edges",e.edge(e.edges()[0]));let u=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),f=l.insert("g").attr("class","edgeLabels"),d=l.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(g){let y=e.node(g);if(i!==void 0){let v=JSON.parse(JSON.stringify(i.clusterData));V.info("Setting data for cluster XXX (",g,") ",v,i),e.setNode(i.id,v),e.parent(g)||(V.trace("Setting parent",g,i.id),e.setParent(g,i.id,v))}if(V.info("(Insert) Node XXX"+g+": "+JSON.stringify(e.node(g))),y?.clusterNode){V.info("Cluster identified",g,y.width,e.node(g));let{ranksep:v,nodesep:x}=e.graph();y.graph.setGraph({...y.graph.graph(),ranksep:v,nodesep:x});let b=await Eue(d,y.graph,r,n,e.node(g),a),k=b.elem;mn(y,k),y.diff=b.diff||0,V.info("Node bounds (abc123)",g,y,y.width,y.x,y.y),dX(k,y),V.warn("Recursive render complete ",k,y)}else e.children(g).length>0?(V.info("Cluster - the non recursive path XXX",g,y.id,y,e),V.info(Tg(y.id,e)),Kt[y.id]={id:Tg(y.id,e),node:y}):(V.info("Node - the non recursive path",g,y.id,y),await Zp(d,e.node(g),o))})),e.edges().forEach(async function(g){let y=e.edge(g.v,g.w,g.name);V.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g)),V.info("Edge "+g.v+" -> "+g.w+": ",g," ",JSON.stringify(e.edge(g))),V.info("Fix",Kt,"ids:",g.v,g.w,"Translating: ",Kt[g.v],Kt[g.w]),await nT(f,y)}),e.edges().forEach(function(g){V.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g))}),V.info("Graph before layout:",JSON.stringify(Mn(e))),V.info("#############################################"),V.info("### Layout ###"),V.info("#############################################"),V.info(e),eo(e),V.info("Graph after layout:",JSON.stringify(Mn(e)));let p=0,{subGraphTitleTotalMargin:m}=Ks(a);return due(e).forEach(function(g){let y=e.node(g);V.info("Position "+g+": "+JSON.stringify(e.node(g))),V.info("Position "+g+": ("+y.x,","+y.y,") width: ",y.width," height: ",y.height),y?.clusterNode?(y.y+=m,nv(y)):e.children(g).length>0?(y.height+=m,gue(u,y),Kt[y.id].node=y):(y.y+=m/2,nv(y))}),e.edges().forEach(function(g){let y=e.edge(g);V.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(y),y),y.points.forEach(x=>x.y+=m/2);let v=aT(h,g,y,Kt,r,e,n);iT(y,v)}),e.nodes().forEach(function(g){let y=e.node(g);V.info(g,y.type,y.diff),y.type==="group"&&(p=y.diff)}),{elem:l,diff:p}},"recursiveRender"),Cue=s(async(t,e,r,n,i)=>{Zw(t,r,n,i),pX(),Tue(),yue(),oue(),V.warn("Graph at first:",JSON.stringify(Mn(e))),uue(e),V.warn("Graph after:",JSON.stringify(Mn(e)));let a=le();await Eue(t,e,n,i,void 0,a)},"render")});function _ue(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}var GN,$N,$ze,Aue,Gze,Vze,Uze,qze,Lue,Due=_(()=>{"use strict";Xt();la();it();gt();Sue();pr();pr();Un();Qt();GN=s(t=>$e.sanitizeText(t,le()),"sanitizeText"),$N={dividerMargin:10,padding:5,textHeight:10,curve:void 0},$ze=s(function(t,e,r,n){V.info("keys:",[...t.keys()]),V.info(t),t.forEach(function(i){let o={shape:"rect",id:i.id,domId:i.domId,labelText:GN(i.id),labelStyle:"",style:"fill: none; stroke: black",padding:le().flowchart?.padding??le().class?.padding};e.setNode(i.id,o),Aue(i.classes,e,r,n,i.id),V.info("setNode",o)})},"addNamespaces"),Aue=s(function(t,e,r,n,i){V.info("keys:",[...t.keys()]),V.info(t),[...t.values()].filter(a=>a.parent===i).forEach(function(a){let o=a.cssClasses.join(" "),l=Hp(a.styles),u=a.label??a.id,h=0,d={labelStyle:l.labelStyle,shape:"class_box",labelText:GN(u),classData:a,rx:h,ry:h,class:o,style:l.style,id:a.id,domId:a.domId,tooltip:n.db.getTooltip(a.id,i)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:le().flowchart?.padding??le().class?.padding};e.setNode(a.id,d),i&&e.setParent(a.id,i),V.info("setNode",d)})},"addClasses"),Gze=s(function(t,e,r,n){V.info(t),t.forEach(function(i,a){let o=i,l="",u={labelStyle:"",style:""},h=o.text,f=0,p={labelStyle:u.labelStyle,shape:"note",labelText:GN(h),noteData:o,rx:f,ry:f,class:l,style:u.style,id:o.id,domId:o.id,tooltip:"",type:"note",padding:le().flowchart?.padding??le().class?.padding};if(e.setNode(o.id,p),V.info("setNode",p),!o.class||!n.has(o.class))return;let m=r+a,g={id:`edgeNote${m}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:Wp($N.curve,uu)};e.setEdge(o.id,o.class,g,m)})},"addNotes"),Vze=s(function(t,e){let r=le().flowchart,n=0;t.forEach(function(i){n++;let a={classes:"relation",pattern:i.relation.lineType==1?"dashed":"solid",id:$3(i.id1,i.id2,{prefix:"id",counter:n}),arrowhead:i.type==="arrow_open"?"none":"normal",startLabelRight:i.relationTitle1==="none"?"":i.relationTitle1,endLabelLeft:i.relationTitle2==="none"?"":i.relationTitle2,arrowTypeStart:_ue(i.relation.type1),arrowTypeEnd:_ue(i.relation.type2),style:"fill:none",labelStyle:"",curve:Wp(r?.curve,uu)};if(V.info(a,i),i.style!==void 0){let o=Hp(i.style);a.style=o.style,a.labelStyle=o.labelStyle}i.text=i.title,i.text===void 0?i.style!==void 0&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",le().flowchart?.htmlLabels??le().htmlLabels?(a.labelType="html",a.label='<span class="edgeLabel">'+i.text+"</span>"):(a.labelType="text",a.label=i.text.replace($e.lineBreakRegex,`
`),i.style===void 0&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:"))),e.setEdge(i.id1,i.id2,a,n)})},"addRelations"),Uze=s(function(t){$N={...$N,...t}},"setConf"),qze=s(async function(t,e,r,n){V.info("Drawing class - ",e);let i=le().flowchart??le().class,a=le().securityLevel;V.info("config:",i);let o=i?.nodeSpacing??50,l=i?.rankSpacing??50,u=new ir({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:o,ranksep:l,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),h=n.db.getNamespaces(),f=n.db.getClasses(),d=n.db.getRelations(),p=n.db.getNotes();V.info(d),$ze(h,u,e,n),Aue(f,u,e,n),Vze(d,u),Gze(p,u,d.length+1,f);let m;a==="sandbox"&&(m=Me("#i"+e));let g=a==="sandbox"?Me(m.nodes()[0].contentDocument.body):Me("body"),y=g.select(`[id="${e}"]`),v=g.select("#"+e+" g");if(await Cue(v,u,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),dt.insertTitle(y,"classTitleText",i?.titleTopMargin??5,n.db.getDiagramTitle()),ql(u,y,i?.diagramPadding,i?.useMaxWidth),!i?.htmlLabels){let x=a==="sandbox"?m.nodes()[0].contentDocument:document,b=x.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let k of b){let A=k.getBBox(),w=x.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("rx",0),w.setAttribute("ry",0),w.setAttribute("width",A.width),w.setAttribute("height",A.height),k.insertBefore(w,k.firstChild)}}},"draw");s(_ue,"getArrowMarker");Lue={setConf:Uze,draw:qze}});var Rue={};ur(Rue,{diagram:()=>Wze});var Wze,Mue=_(()=>{"use strict";RN();PN();BN();Due();Wze={parser:qw,db:wg,renderer:Lue,styles:Xw,init:s(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,wg.clear()},"init")}});var VN,sT,UN=_(()=>{"use strict";VN=function(){var t=s(function(z,N,U,$){for(U=U||{},$=z.length;$--;U[z[$]]=N);return U},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],o=[1,11],l=[1,16],u=[1,17],h=[1,18],f=[1,19],d=[1,32],p=[1,20],m=[1,21],g=[1,22],y=[1,23],v=[1,24],x=[1,26],b=[1,27],k=[1,28],A=[1,29],w=[1,30],T=[1,31],C=[1,34],E=[1,35],S=[1,36],R=[1,37],D=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],P=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],F={trace:s(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,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:s(function(N,U,$,W,ee,te,ce){var Z=te.length-1;switch(ee){case 3:return W.setRootDoc(te[Z]),te[Z];break;case 4:this.$=[];break;case 5:te[Z]!="nl"&&(te[Z-1].push(te[Z]),this.$=te[Z-1]);break;case 6:case 7:this.$=te[Z];break;case 8:this.$="nl";break;case 12:this.$=te[Z];break;case 13:let Q=te[Z-1];Q.description=W.trimColon(te[Z]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:te[Z-2],state2:te[Z]};break;case 15:let K=W.trimColon(te[Z]);this.$={stmt:"relation",state1:te[Z-3],state2:te[Z-1],description:K};break;case 19:this.$={stmt:"state",id:te[Z-3],type:"default",description:"",doc:te[Z-1]};break;case 20:var fe=te[Z],ne=te[Z-2].trim();if(te[Z].match(":")){var H=te[Z].split(":");fe=H[0],ne=[ne,H[1]]}this.$={stmt:"state",id:fe,type:"default",description:ne};break;case 21:this.$={stmt:"state",id:te[Z-3],type:"default",description:te[Z-5],doc:te[Z-1]};break;case 22:this.$={stmt:"state",id:te[Z],type:"fork"};break;case 23:this.$={stmt:"state",id:te[Z],type:"join"};break;case 24:this.$={stmt:"state",id:te[Z],type:"choice"};break;case 25:this.$={stmt:"state",id:W.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:te[Z-1].trim(),note:{position:te[Z-2].trim(),text:te[Z].trim()}};break;case 29:this.$=te[Z].trim(),W.setAccTitle(this.$);break;case 30:case 31:this.$=te[Z].trim(),W.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:te[Z-1].trim(),classes:te[Z].trim()};break;case 34:this.$={stmt:"style",id:te[Z-1].trim(),styleClass:te[Z].trim()};break;case 35:this.$={stmt:"applyClass",id:te[Z-1].trim(),styleClass:te[Z].trim()};break;case 36:W.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:W.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:W.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:W.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:te[Z].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:te[Z-2].trim(),classes:[te[Z].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:te[Z-2].trim(),classes:[te[Z].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,42,45,48,49,50,51,54],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:k,38:A,42:w,45:T,48:C,49:E,50:S,51:R,54:D},t(L,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:k,38:A,42:w,45:T,48:C,49:E,50:S,51:R,54:D},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,39],15:[1,40]}),t(L,[2,16]),{18:[1,41]},t(L,[2,18],{20:[1,42]}),{23:[1,43]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(L,[2,28]),{34:[1,48]},{36:[1,49]},t(L,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(P,[2,42],{55:[1,54]}),t(P,[2,43],{55:[1,55]}),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,6]),t(L,[2,13]),{13:56,24:d,54:D},t(L,[2,17]),t(M,i,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(L,[2,29]),t(L,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(L,[2,14],{14:[1,67]}),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,68],22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:k,38:A,42:w,45:T,48:C,49:E,50:S,51:R,54:D},t(L,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(L,[2,32]),t(L,[2,33]),t(L,[2,34]),t(L,[2,35]),t(P,[2,44]),t(P,[2,45]),t(L,[2,15]),t(L,[2,19]),t(M,i,{7:72}),t(L,[2,26]),t(L,[2,27]),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,73],22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:k,38:A,42:w,45:T,48:C,49:E,50:S,51:R,54:D},t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:s(function(N,U){if(U.recoverable)this.trace(N);else{var $=new Error(N);throw $.hash=U,$}},"parseError"),parse:s(function(N){var U=this,$=[0],W=[],ee=[null],te=[],ce=this.table,Z="",fe=0,ne=0,H=0,Q=2,K=1,re=te.slice.call(arguments,1),ie=Object.create(this.lexer),ye={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(ye.yy[j]=this.yy[j]);ie.setInput(N,ye.yy),ye.yy.lexer=ie,ye.yy.parser=this,typeof ie.yylloc>"u"&&(ie.yylloc={});var De=ie.yylloc;te.push(De);var oe=ie.options&&ie.options.ranges;typeof ye.yy.parseError=="function"?this.parseError=ye.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(Ie){$.length=$.length-2*Ie,ee.length=ee.length-Ie,te.length=te.length-Ie}s(Re,"popStack");function Pe(){var Ie;return Ie=W.pop()||ie.lex()||K,typeof Ie!="number"&&(Ie instanceof Array&&(W=Ie,Ie=W.pop()),Ie=U.symbols_[Ie]||Ie),Ie}s(Pe,"lex");for(var Se,Ue,Oe,_e,he,q,se={},ue,X,ae,pe;;){if(Oe=$[$.length-1],this.defaultActions[Oe]?_e=this.defaultActions[Oe]:((Se===null||typeof Se>"u")&&(Se=Pe()),_e=ce[Oe]&&ce[Oe][Se]),typeof _e>"u"||!_e.length||!_e[0]){var de="";pe=[];for(ue in ce[Oe])this.terminals_[ue]&&ue>Q&&pe.push("'"+this.terminals_[ue]+"'");ie.showPosition?de="Parse error on line "+(fe+1)+`:
`+ie.showPosition()+`
Expecting `+pe.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'":de="Parse error on line "+(fe+1)+": Unexpected "+(Se==K?"end of input":"'"+(this.terminals_[Se]||Se)+"'"),this.parseError(de,{text:ie.match,token:this.terminals_[Se]||Se,line:ie.yylineno,loc:De,expected:pe})}if(_e[0]instanceof Array&&_e.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Oe+", token: "+Se);switch(_e[0]){case 1:$.push(Se),ee.push(ie.yytext),te.push(ie.yylloc),$.push(_e[1]),Se=null,Ue?(Se=Ue,Ue=null):(ne=ie.yyleng,Z=ie.yytext,fe=ie.yylineno,De=ie.yylloc,H>0&&H--);break;case 2:if(X=this.productions_[_e[1]][1],se.$=ee[ee.length-X],se._$={first_line:te[te.length-(X||1)].first_line,last_line:te[te.length-1].last_line,first_column:te[te.length-(X||1)].first_column,last_column:te[te.length-1].last_column},oe&&(se._$.range=[te[te.length-(X||1)].range[0],te[te.length-1].range[1]]),q=this.performAction.apply(se,[Z,ne,fe,ye.yy,_e[1],ee,te].concat(re)),typeof q<"u")return q;X&&($=$.slice(0,-1*X*2),ee=ee.slice(0,-1*X),te=te.slice(0,-1*X)),$.push(this.productions_[_e[1]][0]),ee.push(se.$),te.push(se._$),ae=ce[$[$.length-2]][$[$.length-1]],$.push(ae);break;case 3:return!0}}return!0},"parse")},I=function(){var z={EOF:1,parseError:s(function(U,$){if(this.yy.parser)this.yy.parser.parseError(U,$);else throw new Error(U)},"parseError"),setInput:s(function(N,U){return this.yy=U||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:s(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var U=N.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),N},"input"),unput:s(function(N){var U=N.length,$=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-U),this.offset-=U;var W=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),$.length-1&&(this.yylineno-=$.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:$?($.length===W.length?this.yylloc.first_column:0)+W[W.length-$.length].length-$[0].length:this.yylloc.first_column-U},this.options.ranges&&(this.yylloc.range=[ee[0],ee[0]+this.yyleng-U]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(N){this.unput(this.match.slice(N))},"less"),pastInput:s(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:s(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:s(function(){var N=this.pastInput(),U=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
`+U+"^"},"showPosition"),test_match:s(function(N,U){var $,W,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))),W=N[0].match(/(?:\r\n?|\n).*/g),W&&(this.yylineno+=W.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:W?W[W.length-1].length-W[W.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],$=this.performAction.call(this,this.yy,this,U,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$)return $;if(this._backtrack){for(var te in ee)this[te]=ee[te];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,U,$,W;this._more||(this.yytext="",this.match="");for(var ee=this._currentRules(),te=0;te<ee.length;te++)if($=this._input.match(this.rules[ee[te]]),$&&(!U||$[0].length>U[0].length)){if(U=$,W=te,this.options.backtrack_lexer){if(N=this.test_match($,ee[te]),N!==!1)return N;if(this._backtrack){U=!1;continue}else return!1}else if(!this.options.flex)break}return U?(N=this.test_match(U,ee[W]),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:s(function(){var U=this.next();return U||this.lex()},"lex"),begin:s(function(U){this.conditionStack.push(U)},"begin"),popState:s(function(){var U=this.conditionStack.length-1;return U>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(U){return U=this.conditionStack.length-1-Math.abs(U||0),U>=0?this.conditionStack[U]:"INITIAL"},"topState"),pushState:s(function(U){this.begin(U)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(U,$,W,ee){var te=ee;switch(W){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;break;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;break;case 16:return this.popState(),"acc_title_value";break;case 17:return this.begin("acc_descr"),35;break;case 18:return this.popState(),"acc_descr_value";break;case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;break;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 24:return this.popState(),this.pushState("CLASSDEFID"),39;break;case 25:return this.popState(),40;break;case 26:return this.pushState("CLASS"),45;break;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;break;case 28:return this.popState(),47;break;case 29:return this.pushState("STYLE"),42;break;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;break;case 31:return this.popState(),44;break;case 32:return this.pushState("SCALE"),17;break;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),25;break;case 37:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),26;break;case 38:return this.popState(),$.yytext=$.yytext.slice(0,-10).trim(),27;break;case 39:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),$.yytext=$.yytext.slice(0,-10).trim(),27;break;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";break;case 48:return this.popState(),"ID";break;case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;break;case 54:break;case 55:return this.popState(),21;break;case 56:break;case 57:return this.begin("NOTE"),29;break;case 58:return this.popState(),this.pushState("NOTE_ID"),56;break;case 59:return this.popState(),this.pushState("NOTE_ID"),57;break;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";break;case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 66:return this.popState(),$.yytext=$.yytext.substr(2).trim(),31;break;case 67:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),31;break;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return $.yytext=$.yytext.trim(),14;break;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return z}();F.lexer=I;function O(){this.yy={}}return s(O,"Parser"),O.prototype=F,F.Parser=O,new O}();VN.parser=VN;sT=VN});var Oue,oT,Eg,sx,Pue,Bue,Fue,k0,lT,qN,WN,HN,YN,XN,cT,uT,zue,$ue,jN,KN,Gue,Vue,Cg,jze,Uue,QN,Kze,Qze,que,Wue,Zze,Hue,Jze,Yue,ZN,JN,Xue,hT,jue,eO,fT=_(()=>{"use strict";Oue="LR",oT="TB",Eg="state",sx="relation",Pue="classDef",Bue="style",Fue="applyClass",k0="default",lT="divider",qN="fill:none",WN="fill: #333",HN="c",YN="text",XN="normal",cT="rect",uT="rectWithTitle",zue="stateStart",$ue="stateEnd",jN="divider",KN="roundedWithTitle",Gue="note",Vue="noteGroup",Cg="statediagram",jze="state",Uue=`${Cg}-${jze}`,QN="transition",Kze="note",Qze="note-edge",que=`${QN} ${Qze}`,Wue=`${Cg}-${Kze}`,Zze="cluster",Hue=`${Cg}-${Zze}`,Jze="cluster-alt",Yue=`${Cg}-${Jze}`,ZN="parent",JN="note",Xue="state",hT="----",jue=`${hT}${JN}`,eO=`${hT}${ZN}`});function tO(t="",e=0,r="",n=hT){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${Xue}-${t}${i}-${e}`}function dT(t,e,r){if(!e.id||e.id==="</join></fork>"||e.id==="</choice>")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(i=>{if(r.get(i)){let a=r.get(i);e.cssCompiledStyles=[...e.cssCompiledStyles,...a.styles]}}));let n=t.find(i=>i.id===e.id);n?Object.assign(n,e):t.push(e)}function t$e(t){return t?.classes?.join(" ")??""}function r$e(t){return t?.styles??[]}var pT,of,e$e,Kue,Sg,Que,Zue=_(()=>{"use strict";gt();it();Qt();fT();pT=new Map,of=0;s(tO,"stateDomId");e$e=s((t,e,r,n,i,a,o,l)=>{V.trace("items",e),e.forEach(u=>{switch(u.stmt){case Eg:Sg(t,u,r,n,i,a,o,l);break;case k0:Sg(t,u,r,n,i,a,o,l);break;case sx:{Sg(t,u.state1,r,n,i,a,o,l),Sg(t,u.state2,r,n,i,a,o,l);let h={id:"edge"+of,start:u.state1.id,end:u.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:qN,labelStyle:"",label:$e.sanitizeText(u.description,le()),arrowheadStyle:WN,labelpos:HN,labelType:YN,thickness:XN,classes:QN,look:o};i.push(h),of++}break}})},"setupDoc"),Kue=s((t,e=oT)=>{let r=e;if(t.doc)for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");s(dT,"insertOrUpdateNode");s(t$e,"getClassesFromDbInfo");s(r$e,"getStylesFromDbInfo");Sg=s((t,e,r,n,i,a,o,l)=>{let u=e.id,h=r.get(u),f=t$e(h),d=r$e(h);if(V.info("dataFetcher parsedItem",e,h,d),u!=="root"){let p=cT;e.start===!0?p=zue:e.start===!1&&(p=$ue),e.type!==k0&&(p=e.type),pT.get(u)||pT.set(u,{id:u,shape:p,description:$e.sanitizeText(u,le()),cssClasses:`${f} ${Uue}`,cssStyles:d});let m=pT.get(u);e.description&&(Array.isArray(m.description)?(m.shape=uT,m.description.push(e.description)):m.description?.length>0?(m.shape=uT,m.description===u?m.description=[e.description]:m.description=[m.description,e.description]):(m.shape=cT,m.description=e.description),m.description=$e.sanitizeTextOrArray(m.description,le())),m.description?.length===1&&m.shape===uT&&(m.type==="group"?m.shape=KN:m.shape=cT),!m.type&&e.doc&&(V.info("Setting cluster for XCX",u,Kue(e)),m.type="group",m.isGroup=!0,m.dir=Kue(e),m.shape=e.type===lT?jN:KN,m.cssClasses=`${m.cssClasses} ${Hue} ${a?Yue:""}`);let g={labelStyle:"",shape:m.shape,label:m.description,cssClasses:m.cssClasses,cssCompiledStyles:[],cssStyles:m.cssStyles,id:u,dir:m.dir,domId:tO(u,of),type:m.type,isGroup:m.type==="group",padding:8,rx:10,ry:10,look:o};if(g.shape===jN&&(g.label=""),t&&t.id!=="root"&&(V.trace("Setting node ",u," to be child of its parent ",t.id),g.parentId=t.id),g.centerLabel=!0,e.note){let y={labelStyle:"",shape:Gue,label:e.note.text,cssClasses:Wue,cssStyles:[],cssCompilesStyles:[],id:u+jue+"-"+of,domId:tO(u,of,JN),type:m.type,isGroup:m.type==="group",padding:le().flowchart.padding,look:o,position:e.note.position},v=u+eO,x={labelStyle:"",shape:Vue,label:e.note.text,cssClasses:m.cssClasses,cssStyles:[],id:u+eO,domId:tO(u,of,ZN),type:"group",isGroup:!0,padding:16,look:o,position:e.note.position};of++,x.id=v,y.parentId=v,dT(n,x,l),dT(n,y,l),dT(n,g,l);let b=u,k=y.id;e.note.position==="left of"&&(b=y.id,k=u),i.push({id:b+"-"+k,start:b,end:k,arrowhead:"none",arrowTypeEnd:"",style:qN,labelStyle:"",classes:que,arrowheadStyle:WN,labelpos:HN,labelType:YN,thickness:XN,look:o})}else dT(n,g,l)}e.doc&&(V.trace("Adding nodes children "),e$e(e,e.doc,r,n,i,!a,o,l))},"dataFetcher"),Que=s(()=>{pT.clear(),of=0},"reset")});var rO,n$e,i$e,Jue,nO=_(()=>{"use strict";gt();it();zA();Rk();_L();pr();fT();rO=s((t,e=oT)=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),n$e=s(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),i$e=s(async function(t,e,r,n){V.info("REF0:"),V.info("Drawing state diagram (v2)",e);let{securityLevel:i,state:a,layout:o}=le();n.db.extract(n.db.getRootDocV2());let l=n.db.getData(),u=n5(e,i);l.type=n.type,l.layoutAlgorithm=o,l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,l.markers=["barb"],l.diagramId=e,await Dk(l,u);let h=8;dt.insertTitle(u,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Mk(u,h,Cg,a?.useMaxWidth??!0)},"draw"),Jue={getClasses:n$e,draw:i$e,getDir:rO}});function she(){return new Map}function iO(t=""){let e=t;return t===oO&&(ox++,e=`${nhe}${ox}`),e}function aO(t="",e=k0){return t===oO?nhe:e}function p$e(t=""){let e=t;return t===ihe&&(ox++,e=`${ahe}${ox}`),e}function m$e(t="",e=k0){return t===ihe?ahe:e}function g$e(t,e,r){let n=iO(t.id.trim()),i=aO(t.id.trim(),t.type),a=iO(e.id.trim()),o=aO(e.id.trim(),e.type);lf(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),lf(a,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),Rs.relations.push({id1:n,id2:a,relationTitle:$e.sanitizeText(r,le())})}var oO,nhe,ihe,ahe,ehe,the,a$e,s$e,yT,lO,ohe,vT,_g,lhe,xT,Rs,ox,rhe,o$e,l$e,mT,c$e,u$e,gT,cO,h$e,lf,che,w0,uhe,f$e,d$e,hhe,sO,y$e,v$e,fhe,x$e,uO,b$e,k$e,w$e,T$e,E$e,C$e,Fo,bT=_(()=>{"use strict";it();pr();Qt();gt();Ci();Zue();nO();fT();oO="[*]",nhe="start",ihe=oO,ahe="end",ehe="color",the="fill",a$e="bgFill",s$e=",";s(she,"newClassesList");yT=[],lO=[],ohe=Oue,vT=[],_g=she(),lhe=s(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),xT={root:lhe()},Rs=xT.root,ox=0,rhe=0,o$e={LINE:0,DOTTED_LINE:1},l$e={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},mT=s(t=>JSON.parse(JSON.stringify(t)),"clone"),c$e=s(t=>{V.info("Setting root doc",t),vT=t},"setRootDoc"),u$e=s(()=>vT,"getRootDoc"),gT=s((t,e,r)=>{if(e.stmt===sx)gT(t,e.state1,!0),gT(t,e.state2,!1);else if(e.stmt===Eg&&(e.id==="[*]"?(e.id=r?t.id+"_start":t.id+"_end",e.start=r):e.id=e.id.trim()),e.doc){let n=[],i=[],a;for(a=0;a<e.doc.length;a++)if(e.doc[a].type===lT){let o=mT(e.doc[a]);o.doc=mT(i),n.push(o),i=[]}else i.push(e.doc[a]);if(n.length>0&&i.length>0){let o={stmt:Eg,id:lA(),type:"divider",doc:mT(i)};n.push(mT(o)),e.doc=n}e.doc.forEach(o=>gT(e,o,!0))}},"docTranslator"),cO=s(()=>(gT({id:"root"},{id:"root",doc:vT},!0),{id:"root",doc:vT}),"getRootDocV2"),h$e=s(t=>{let e;t.doc?e=t.doc:e=t,V.info(e),che(!0),V.info("Extract initial document:",e),e.forEach(a=>{switch(V.warn("Statement",a.stmt),a.stmt){case Eg:lf(a.id.trim(),a.type,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles);break;case sx:hhe(a.state1,a.state2,a.description);break;case Pue:fhe(a.id.trim(),a.classes);break;case Bue:{let o=a.id.trim().split(","),l=a.styleClass.split(",");o.forEach(u=>{let h=w0(u);if(h===void 0){let f=u.trim();lf(f),h=w0(f)}h.styles=l.map(f=>f.replace(/;/g,"")?.trim())})}break;case Fue:uO(a.id.trim(),a.styleClass);break}});let r=uhe(),i=le().look;Que(),Sg(void 0,cO(),r,yT,lO,!0,i,_g),yT.forEach(a=>{if(Array.isArray(a.label)){if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+a.id+"]");a.label=a.label[0]}})},"extract"),lf=s(function(t,e=k0,r=null,n=null,i=null,a=null,o=null,l=null){let u=t?.trim();if(Rs.states.has(u)?(Rs.states.get(u).doc||(Rs.states.get(u).doc=r),Rs.states.get(u).type||(Rs.states.get(u).type=e)):(V.info("Adding state ",u,n),Rs.states.set(u,{id:u,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]})),n&&(V.info("Setting state description",u,n),typeof n=="string"&&sO(u,n.trim()),typeof n=="object"&&n.forEach(h=>sO(u,h.trim()))),i){let h=Rs.states.get(u);h.note=i,h.note.text=$e.sanitizeText(h.note.text,le())}a&&(V.info("Setting state classes",u,a),(typeof a=="string"?[a]:a).forEach(f=>uO(u,f.trim()))),o&&(V.info("Setting state styles",u,o),(typeof o=="string"?[o]:o).forEach(f=>b$e(u,f.trim()))),l&&(V.info("Setting state styles",u,o),(typeof l=="string"?[l]:l).forEach(f=>k$e(u,f.trim())))},"addState"),che=s(function(t){yT=[],lO=[],xT={root:lhe()},Rs=xT.root,ox=0,_g=she(),t||br()},"clear"),w0=s(function(t){return Rs.states.get(t)},"getState"),uhe=s(function(){return Rs.states},"getStates"),f$e=s(function(){V.info("Documents = ",xT)},"logDocuments"),d$e=s(function(){return Rs.relations},"getRelations");s(iO,"startIdIfNeeded");s(aO,"startTypeIfNeeded");s(p$e,"endIdIfNeeded");s(m$e,"endTypeIfNeeded");s(g$e,"addRelationObjs");hhe=s(function(t,e,r){if(typeof t=="object")g$e(t,e,r);else{let n=iO(t.trim()),i=aO(t),a=p$e(e.trim()),o=m$e(e);lf(n,i),lf(a,o),Rs.relations.push({id1:n,id2:a,title:$e.sanitizeText(r,le())})}},"addRelation"),sO=s(function(t,e){let r=Rs.states.get(t),n=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push($e.sanitizeText(n,le()))},"addDescription"),y$e=s(function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},"cleanupLabel"),v$e=s(()=>(rhe++,"divider-id-"+rhe),"getDividerId"),fhe=s(function(t,e=""){_g.has(t)||_g.set(t,{id:t,styles:[],textStyles:[]});let r=_g.get(t);e?.split(s$e).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(ehe).exec(n)){let o=i.replace(the,a$e).replace(ehe,the);r.textStyles.push(o)}r.styles.push(i)})},"addStyleClass"),x$e=s(function(){return _g},"getClasses"),uO=s(function(t,e){t.split(",").forEach(function(r){let n=w0(r);if(n===void 0){let i=r.trim();lf(i),n=w0(i)}n.classes.push(e)})},"setCssClass"),b$e=s(function(t,e){let r=w0(t);r!==void 0&&r.styles.push(e)},"setStyle"),k$e=s(function(t,e){let r=w0(t);r!==void 0&&r.textStyles.push(e)},"setTextStyle"),w$e=s(()=>ohe,"getDirection"),T$e=s(t=>{ohe=t},"setDirection"),E$e=s(t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),"trimColon"),C$e=s(()=>{let t=le();return{nodes:yT,edges:lO,other:{},config:t,direction:rO(cO())}},"getData"),Fo={getConfig:s(()=>le().state,"getConfig"),getData:C$e,addState:lf,clear:che,getState:w0,getStates:uhe,getRelations:d$e,getClasses:x$e,getDirection:w$e,addRelation:hhe,getDividerId:v$e,setDirection:T$e,cleanupLabel:y$e,lineType:o$e,relationType:l$e,logDocuments:f$e,getRootDoc:u$e,setRootDoc:c$e,getRootDocV2:cO,extract:h$e,trimColon:E$e,getAccTitle:Gr,setAccTitle:Ar,getAccDescription:Ur,setAccDescription:Vr,addStyleClass:fhe,setCssClass:uO,addDescription:sO,setDiagramTitle:an,getDiagramTitle:Qr}});var S$e,kT,hO=_(()=>{"use strict";S$e=s(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"),kT=S$e});var fO,_$e,A$e,dhe,L$e,phe,mhe=_(()=>{"use strict";fO={},_$e=s((t,e)=>{fO[t]=e},"set"),A$e=s(t=>fO[t],"get"),dhe=s(()=>Object.keys(fO),"keys"),L$e=s(()=>dhe().length,"size"),phe={get:A$e,set:_$e,keys:dhe,size:L$e}});var D$e,R$e,M$e,I$e,yhe,N$e,O$e,P$e,B$e,dO,ghe,vhe,xhe=_(()=>{"use strict";Xt();mhe();bT();pr();Qt();gt();it();D$e=s(t=>t.append("circle").attr("class","start-state").attr("r",le().state.sizeUnit).attr("cx",le().state.padding+le().state.sizeUnit).attr("cy",le().state.padding+le().state.sizeUnit),"drawStartState"),R$e=s(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",le().state.textHeight).attr("class","divider").attr("x2",le().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),M$e=s((t,e)=>{let r=t.append("text").attr("x",2*le().state.padding).attr("y",le().state.textHeight+2*le().state.padding).attr("font-size",le().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",le().state.padding).attr("y",le().state.padding).attr("width",n.width+2*le().state.padding).attr("height",n.height+2*le().state.padding).attr("rx",le().state.radius),r},"drawSimpleState"),I$e=s((t,e)=>{let r=s(function(p,m,g){let y=p.append("tspan").attr("x",2*le().state.padding).text(m);g||y.attr("dy",le().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*le().state.padding).attr("y",le().state.textHeight+1.3*le().state.padding).attr("font-size",le().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),a=i.height,o=t.append("text").attr("x",le().state.padding).attr("y",a+le().state.padding*.4+le().state.dividerMargin+le().state.textHeight).attr("class","state-description"),l=!0,u=!0;e.descriptions.forEach(function(p){l||(r(o,p,u),u=!1),l=!1});let h=t.append("line").attr("x1",le().state.padding).attr("y1",le().state.padding+a+le().state.dividerMargin/2).attr("y2",le().state.padding+a+le().state.dividerMargin/2).attr("class","descr-divider"),f=o.node().getBBox(),d=Math.max(f.width,i.width);return h.attr("x2",d+3*le().state.padding),t.insert("rect",":first-child").attr("x",le().state.padding).attr("y",le().state.padding).attr("width",d+2*le().state.padding).attr("height",f.height+a+2*le().state.padding).attr("rx",le().state.radius),t},"drawDescrState"),yhe=s((t,e,r)=>{let n=le().state.padding,i=2*le().state.padding,a=t.node().getBBox(),o=a.width,l=a.x,u=t.append("text").attr("x",0).attr("y",le().state.titleShift).attr("font-size",le().state.fontSize).attr("class","state-title").text(e.id),f=u.node().getBBox().width+i,d=Math.max(f,o);d===o&&(d=d+i);let p,m=t.node().getBBox();e.doc,p=l-n,f>o&&(p=(o-d)/2+n),Math.abs(l-m.x)<n&&f>o&&(p=l-(f-o)/2);let g=1-le().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",d).attr("height",m.height+le().state.textHeight+le().state.titleShift+1).attr("rx","0"),u.attr("x",p+n),f<=o&&u.attr("x",l+(d-i)/2-f/2+n),t.insert("rect",":first-child").attr("x",p).attr("y",le().state.titleShift-le().state.textHeight-le().state.padding).attr("width",d).attr("height",le().state.textHeight*3).attr("rx",le().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",le().state.titleShift-le().state.textHeight-le().state.padding).attr("width",d).attr("height",m.height+3+2*le().state.textHeight).attr("rx",le().state.radius),t},"addTitleAndBox"),N$e=s(t=>(t.append("circle").attr("class","end-state-outer").attr("r",le().state.sizeUnit+le().state.miniPadding).attr("cx",le().state.padding+le().state.sizeUnit+le().state.miniPadding).attr("cy",le().state.padding+le().state.sizeUnit+le().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",le().state.sizeUnit).attr("cx",le().state.padding+le().state.sizeUnit+2).attr("cy",le().state.padding+le().state.sizeUnit+2)),"drawEndState"),O$e=s((t,e)=>{let r=le().state.forkWidth,n=le().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",le().state.padding).attr("y",le().state.padding)},"drawForkJoinState"),P$e=s((t,e,r,n)=>{let i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");let l=o.split($e.lineBreakRegex),u=1.25*le().state.noteMargin;for(let h of l){let f=h.trim();if(f.length>0){let d=a.append("tspan");if(d.text(f),u===0){let p=d.node().getBBox();u+=p.height}i+=u,d.attr("x",e+le().state.noteMargin),d.attr("y",r+i+1.25*le().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),B$e=s((t,e)=>{e.attr("class","state-note");let r=e.append("rect").attr("x",0).attr("y",le().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=P$e(t,0,0,n);return r.attr("height",a+2*le().state.noteMargin),r.attr("width",i+le().state.noteMargin*2),r},"drawNote"),dO=s(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"&&D$e(i),e.type==="end"&&N$e(i),(e.type==="fork"||e.type==="join")&&O$e(i,e),e.type==="note"&&B$e(e.note.text,i),e.type==="divider"&&R$e(i),e.type==="default"&&e.descriptions.length===0&&M$e(i,e),e.type==="default"&&e.descriptions.length>0&&I$e(i,e);let a=i.node().getBBox();return n.width=a.width+2*le().state.padding,n.height=a.height+2*le().state.padding,phe.set(r,n),n},"drawState"),ghe=0,vhe=s(function(t,e,r){let n=s(function(u){switch(u){case Fo.relationType.AGGREGATION:return"aggregation";case Fo.relationType.EXTENSION:return"extension";case Fo.relationType.COMPOSITION:return"composition";case Fo.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(u=>!Number.isNaN(u.y));let i=e.points,a=ra().x(function(u){return u.x}).y(function(u){return u.y}).curve(hs),o=t.append("path").attr("d",a(i)).attr("id","edge"+ghe).attr("class","transition"),l="";if(le().state.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),o.attr("marker-end","url("+l+"#"+n(Fo.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let u=t.append("g").attr("class","stateLabel"),{x:h,y:f}=dt.calcLabelPosition(e.points),d=$e.getRows(r.title),p=0,m=[],g=0,y=0;for(let b=0;b<=d.length;b++){let k=u.append("text").attr("text-anchor","middle").text(d[b]).attr("x",h).attr("y",f+p),A=k.node().getBBox();g=Math.max(g,A.width),y=Math.min(y,A.x),V.info(A.x,h,f+p),p===0&&(p=k.node().getBBox().height,V.info("Title height",p,f)),m.push(k)}let v=p*d.length;if(d.length>1){let b=(d.length-1)*p*.5;m.forEach((k,A)=>k.attr("y",f+A*p-b)),v=p*d.length}let x=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",h-g/2-le().state.padding/2).attr("y",f-v/2-le().state.padding/2-3.5).attr("width",g+le().state.padding).attr("height",v+le().state.padding),V.info(x)}ghe++},"drawEdge")});var so,pO,F$e,z$e,$$e,G$e,bhe,khe,whe=_(()=>{"use strict";Xt();Dd();la();it();Qt();xhe();gt();Un();pO={},F$e=s(function(){},"setConf"),z$e=s(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"),$$e=s(function(t,e,r,n){so=le().state;let i=le().securityLevel,a;i==="sandbox"&&(a=Me("#i"+e));let o=i==="sandbox"?Me(a.nodes()[0].contentDocument.body):Me("body"),l=i==="sandbox"?a.nodes()[0].contentDocument:document;V.debug("Rendering diagram "+t);let u=o.select(`[id='${e}']`);z$e(u);let h=n.db.getRootDoc();bhe(h,u,void 0,!1,o,l,n);let f=so.padding,d=u.node().getBBox(),p=d.width+f*2,m=d.height+f*2,g=p*1.75;xr(u,m,g,so.useMaxWidth),u.attr("viewBox",`${d.x-so.padding} ${d.y-so.padding} `+p+" "+m)},"draw"),G$e=s(t=>t?t.length*so.fontSizeFactor:1,"getLabelWidth"),bhe=s((t,e,r,n,i,a,o)=>{let l=new ir({compound:!0,multigraph:!0}),u,h=!0;for(u=0;u<t.length;u++)if(t[u].stmt==="relation"){h=!1;break}r?l.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:so.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):l.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:so.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}}),o.db.extract(t);let f=o.db.getStates(),d=o.db.getRelations(),p=Object.keys(f),m=!0;for(let b of p){let k=f[b];r&&(k.parentId=r);let A;if(k.doc){let w=e.append("g").attr("id",k.id).attr("class","stateGroup");if(A=bhe(k.doc,w,k.id,!n,i,a,o),m){w=yhe(w,k,n);let T=w.node().getBBox();A.width=T.width,A.height=T.height+so.padding/2,pO[k.id]={y:so.compositTitleSize}}else{let T=w.node().getBBox();A.width=T.width,A.height=T.height}}else A=dO(e,k,l);if(k.note){let w={descriptions:[],id:k.id+"-note",note:k.note,type:"note"},T=dO(e,w,l);k.note.position==="left of"?(l.setNode(A.id+"-note",T),l.setNode(A.id,A)):(l.setNode(A.id,A),l.setNode(A.id+"-note",T)),l.setParent(A.id,A.id+"-group"),l.setParent(A.id+"-note",A.id+"-group")}else l.setNode(A.id,A)}V.debug("Count=",l.nodeCount(),l);let g=0;d.forEach(function(b){g++,V.debug("Setting edge",b),l.setEdge(b.id1,b.id2,{relation:b,width:G$e(b.title),height:so.labelHeight*$e.getRows(b.title).length,labelpos:"c"},"id"+g)}),eo(l),V.debug("Graph after layout",l.nodes());let y=e.node();l.nodes().forEach(function(b){b!==void 0&&l.node(b)!==void 0?(V.warn("Node "+b+": "+JSON.stringify(l.node(b))),i.select("#"+y.id+" #"+b).attr("transform","translate("+(l.node(b).x-l.node(b).width/2)+","+(l.node(b).y+(pO[b]?pO[b].y:0)-l.node(b).height/2)+" )"),i.select("#"+y.id+" #"+b).attr("data-x-shift",l.node(b).x-l.node(b).width/2),a.querySelectorAll("#"+y.id+" #"+b+" .divider").forEach(A=>{let w=A.parentElement,T=0,C=0;w&&(w.parentElement&&(T=w.parentElement.getBBox().width),C=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(C)&&(C=0)),A.setAttribute("x1",0-C+8),A.setAttribute("x2",T-C-8)})):V.debug("No Node "+b+": "+JSON.stringify(l.node(b)))});let v=y.getBBox();l.edges().forEach(function(b){b!==void 0&&l.edge(b)!==void 0&&(V.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(l.edge(b))),vhe(e,l.edge(b),l.edge(b).relation))}),v=y.getBBox();let x={id:r||"root",label:r||"root",width:0,height:0};return x.width=v.width+2*so.padding,x.height=v.height+2*so.padding,V.debug("Doc rendered",x,l),x},"renderDoc"),khe={setConf:F$e,draw:$$e}});var The={};ur(The,{diagram:()=>V$e});var V$e,Ehe=_(()=>{"use strict";UN();bT();hO();whe();V$e={parser:sT,db:Fo,renderer:khe,styles:kT,init:s(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Fo.clear()},"init")}});var _he={};ur(_he,{diagram:()=>H$e});var H$e,Ahe=_(()=>{"use strict";UN();bT();hO();nO();H$e={parser:sT,db:Fo,renderer:Jue,styles:kT,init:s(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Fo.clear()},"init")}});var mO,Rhe,Mhe=_(()=>{"use strict";mO=function(){var t=s(function(d,p,m,g){for(m=m||{},g=d.length;g--;m[d[g]]=p);return m},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],o=[1,13],l=[1,14],u={trace:s(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:s(function(p,m,g,y,v,x,b){var k=x.length-1;switch(v){case 1:return x[k-1];case 2:this.$=[];break;case 3:x[k-1].push(x[k]),this.$=x[k-1];break;case 4:case 5:this.$=x[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(x[k].substr(6)),this.$=x[k].substr(6);break;case 9:this.$=x[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=x[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(x[k].substr(8)),this.$=x[k].substr(8);break;case 13:y.addTask(x[k-1],x[k]),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:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:o,18:l},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:s(function(p,m){if(m.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=m,g}},"parseError"),parse:s(function(p){var m=this,g=[0],y=[],v=[null],x=[],b=this.table,k="",A=0,w=0,T=0,C=2,E=1,S=x.slice.call(arguments,1),R=Object.create(this.lexer),D={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(D.yy[L]=this.yy[L]);R.setInput(p,D.yy),D.yy.lexer=R,D.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var P=R.yylloc;x.push(P);var M=R.options&&R.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function F(H){g.length=g.length-2*H,v.length=v.length-H,x.length=x.length-H}s(F,"popStack");function I(){var H;return H=y.pop()||R.lex()||E,typeof H!="number"&&(H instanceof Array&&(y=H,H=y.pop()),H=m.symbols_[H]||H),H}s(I,"lex");for(var O,z,N,U,$,W,ee={},te,ce,Z,fe;;){if(N=g[g.length-1],this.defaultActions[N]?U=this.defaultActions[N]:((O===null||typeof O>"u")&&(O=I()),U=b[N]&&b[N][O]),typeof U>"u"||!U.length||!U[0]){var ne="";fe=[];for(te in b[N])this.terminals_[te]&&te>C&&fe.push("'"+this.terminals_[te]+"'");R.showPosition?ne="Parse error on line "+(A+1)+`:
`+R.showPosition()+`
Expecting `+fe.join(", ")+", got '"+(this.terminals_[O]||O)+"'":ne="Parse error on line "+(A+1)+": Unexpected "+(O==E?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(ne,{text:R.match,token:this.terminals_[O]||O,line:R.yylineno,loc:P,expected:fe})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+O);switch(U[0]){case 1:g.push(O),v.push(R.yytext),x.push(R.yylloc),g.push(U[1]),O=null,z?(O=z,z=null):(w=R.yyleng,k=R.yytext,A=R.yylineno,P=R.yylloc,T>0&&T--);break;case 2:if(ce=this.productions_[U[1]][1],ee.$=v[v.length-ce],ee._$={first_line:x[x.length-(ce||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(ce||1)].first_column,last_column:x[x.length-1].last_column},M&&(ee._$.range=[x[x.length-(ce||1)].range[0],x[x.length-1].range[1]]),W=this.performAction.apply(ee,[k,w,A,D.yy,U[1],v,x].concat(S)),typeof W<"u")return W;ce&&(g=g.slice(0,-1*ce*2),v=v.slice(0,-1*ce),x=x.slice(0,-1*ce)),g.push(this.productions_[U[1]][0]),v.push(ee.$),x.push(ee._$),Z=b[g[g.length-2]][g[g.length-1]],g.push(Z);break;case 3:return!0}}return!0},"parse")},h=function(){var d={EOF:1,parseError:s(function(m,g){if(this.yy.parser)this.yy.parser.parseError(m,g);else throw new Error(m)},"parseError"),setInput:s(function(p,m){return this.yy=m||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:s(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(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:s(function(p){var m=p.length,g=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var y=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===y.length?this.yylloc.first_column:0)+y[y.length-g.length].length-g[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(p){this.unput(this.match.slice(p))},"less"),pastInput:s(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:s(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:s(function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+`
`+m+"^"},"showPosition"),test_match:s(function(p,m){var g,y,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))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.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],g=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var x in v)this[x]=v[x];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,g,y;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),x=0;x<v.length;x++)if(g=this._input.match(this.rules[v[x]]),g&&(!m||g[0].length>m[0].length)){if(m=g,y=x,this.options.backtrack_lexer){if(p=this.test_match(g,v[x]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,v[y]),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:s(function(){var m=this.next();return m||this.lex()},"lex"),begin:s(function(m){this.conditionStack.push(m)},"begin"),popState:s(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:s(function(m){this.begin(m)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(m,g,y,v){var x=v;switch(y){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 d}();u.lexer=h;function f(){this.yy={}}return s(f,"Parser"),f.prototype=u,u.Parser=f,new f}();mO.parser=mO;Rhe=mO});var Ag,gO,lx,cx,K$e,Q$e,Z$e,J$e,eGe,tGe,rGe,Ihe,nGe,yO,Nhe=_(()=>{"use strict";gt();Ci();Ag="",gO=[],lx=[],cx=[],K$e=s(function(){gO.length=0,lx.length=0,Ag="",cx.length=0,br()},"clear"),Q$e=s(function(t){Ag=t,gO.push(t)},"addSection"),Z$e=s(function(){return gO},"getSections"),J$e=s(function(){let t=Ihe(),e=100,r=0;for(;!t&&r<e;)t=Ihe(),r++;return lx.push(...cx),lx},"getTasks"),eGe=s(function(){let t=[];return lx.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},"updateActors"),tGe=s(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(l=>l.trim()),o={section:Ag,type:Ag,people:a,task:t,score:n};cx.push(o)},"addTask"),rGe=s(function(t){let e={section:Ag,type:Ag,description:t,task:t,classes:[]};lx.push(e)},"addTaskOrg"),Ihe=s(function(){let t=s(function(r){return cx[r].processed},"compileTask"),e=!0;for(let[r,n]of cx.entries())t(r),e=e&&n.processed;return e},"compileTasks"),nGe=s(function(){return eGe()},"getActors"),yO={getConfig:s(()=>le().journey,"getConfig"),clear:K$e,setDiagramTitle:an,getDiagramTitle:Qr,setAccTitle:Ar,getAccTitle:Gr,setAccDescription:Vr,getAccDescription:Ur,addSection:Q$e,getSections:Z$e,getTasks:J$e,addTask:tGe,addTaskOrg:rGe,getActors:nGe}});var iGe,Ohe,Phe=_(()=>{"use strict";iGe=s(t=>`.label {
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
color: ${t.textColor};
}
.mouth {
stroke: #666;
}
line {
stroke: ${t.textColor}
}
.legend {
fill: ${t.textColor};
}
.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: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
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}`:""};
}
`,"getStyles"),Ohe=iGe});var vO,aGe,Fhe,zhe,sGe,oGe,Bhe,lGe,cGe,$he,uGe,Lg,Ghe=_(()=>{"use strict";Xt();Iy();vO=s(function(t,e){return ad(t,e)},"drawRect"),aGe=s(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(u){let h=sl().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(a,"smile");function o(u){let h=sl().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(o,"sad");function l(u){u.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 s(l,"ambivalent"),e.score>3?a(i):e.score<3?o(i):l(i),n},"drawFace"),Fhe=s(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"),zhe=s(function(t,e){return Zq(t,e)},"drawText"),sGe=s(function(t,e){function r(i,a,o,l,u){return i+","+a+" "+(i+o)+","+a+" "+(i+o)+","+(a+l-u)+" "+(i+o-u*1.2)+","+(a+l)+" "+i+","+(a+l)}s(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,zhe(t,e)},"drawLabel"),oGe=s(function(t,e,r){let n=t.append("g"),i=ol();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,vO(n,i),$he(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),Bhe=-1,lGe=s(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");Bhe++;let a=300+5*30;i.append("line").attr("id","task"+Bhe).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"),aGe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let o=ol();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,vO(i,o);let l=e.x+14;e.people.forEach(u=>{let h=e.actors[u].color,f={cx:l,cy:e.y,r:7,fill:h,stroke:"#000",title:u,pos:e.actors[u].position};Fhe(i,f),l+=10}),$he(r)(e.task,i,o.x,o.y,o.width,o.height,{class:"task"},r,e.colour)},"drawTask"),cGe=s(function(t,e){v3(t,e)},"drawBackgroundRect"),$he=function(){function t(i,a,o,l,u,h,f,d){let p=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(p,f)}s(t,"byText");function e(i,a,o,l,u,h,f,d,p){let{taskFontSize:m,taskFontFamily:g}=d,y=i.split(/<br\s*\/?>/gi);for(let v=0;v<y.length;v++){let x=v*m-m*(y.length-1)/2,b=a.append("text").attr("x",o+u/2).attr("y",l).attr("fill",p).style("text-anchor","middle").style("font-size",m).style("font-family",g);b.append("tspan").attr("x",o+u/2).attr("dy",x).text(y[v]),b.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,f)}}s(e,"byTspan");function r(i,a,o,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",o).attr("y",l).attr("width",u).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,o,l,u,h,f,d),n(g,f)}s(r,"byFo");function n(i,a){for(let o in a)o in a&&i.attr(o,a[o])}return s(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),uGe=s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),Lg={drawRect:vO,drawCircle:Fhe,drawSection:oGe,drawText:zhe,drawLabel:sGe,drawTask:lGe,drawBackgroundRect:cGe,initGraphics:uGe}});function fGe(t){let e=le().journey,r=60;Object.keys(Vu).forEach(n=>{let i=Vu[n].color,a={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:Vu[n].position};Lg.drawCircle(t,a);let o={x:40,y:r+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};Lg.drawText(t,o),r+=20})}var hGe,Vu,wT,T0,dGe,zo,xO,Vhe,pGe,bO,Uhe=_(()=>{"use strict";Xt();Ghe();gt();Un();hGe=s(function(t){Object.keys(t).forEach(function(r){wT[r]=t[r]})},"setConf"),Vu={};s(fGe,"drawActorLegend");wT=le().journey,T0=wT.leftMargin,dGe=s(function(t,e,r,n){let i=le().journey,a=le().securityLevel,o;a==="sandbox"&&(o=Me("#i"+e));let l=a==="sandbox"?Me(o.nodes()[0].contentDocument.body):Me("body");zo.init();let u=l.select("#"+e);Lg.initGraphics(u);let h=n.db.getTasks(),f=n.db.getDiagramTitle(),d=n.db.getActors();for(let x in Vu)delete Vu[x];let p=0;d.forEach(x=>{Vu[x]={color:i.actorColours[p%i.actorColours.length],position:p},p++}),fGe(u),zo.insert(0,0,T0,Object.keys(Vu).length*50),pGe(u,h,0);let m=zo.getBounds();f&&u.append("text").text(f).attr("x",T0).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);let g=m.stopy-m.starty+2*i.diagramMarginY,y=T0+m.stopx+2*i.diagramMarginX;xr(u,g,y,i.useMaxWidth),u.append("line").attr("x1",T0).attr("y1",i.height*4).attr("x2",y-T0-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let v=f?70:0;u.attr("viewBox",`${m.startx} -25 ${y} ${g+v}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",g+v+25)},"draw"),zo={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:s(function(t,e,r,n){let i=le().journey,a=this,o=0;function l(u){return s(function(f){o++;let d=a.sequenceItems.length-o+1;a.updateVal(f,"starty",e-d*i.boxMargin,Math.min),a.updateVal(f,"stopy",n+d*i.boxMargin,Math.max),a.updateVal(zo.data,"startx",t-d*i.boxMargin,Math.min),a.updateVal(zo.data,"stopx",r+d*i.boxMargin,Math.max),u!=="activation"&&(a.updateVal(f,"startx",t-d*i.boxMargin,Math.min),a.updateVal(f,"stopx",r+d*i.boxMargin,Math.max),a.updateVal(zo.data,"starty",e-d*i.boxMargin,Math.min),a.updateVal(zo.data,"stopy",n+d*i.boxMargin,Math.max))},"updateItemBounds")}s(l,"updateFn"),this.sequenceItems.forEach(l())},"updateBounds"),insert:s(function(t,e,r,n){let i=Math.min(t,r),a=Math.max(t,r),o=Math.min(e,n),l=Math.max(e,n);this.updateVal(zo.data,"startx",i,Math.min),this.updateVal(zo.data,"starty",o,Math.min),this.updateVal(zo.data,"stopx",a,Math.max),this.updateVal(zo.data,"stopy",l,Math.max),this.updateBounds(i,o,a,l)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},xO=wT.sectionFills,Vhe=wT.sectionColours,pGe=s(function(t,e,r){let n=le().journey,i="",a=n.height*2+n.diagramMarginY,o=r+a,l=0,u="#CCC",h="black",f=0;for(let[d,p]of e.entries()){if(i!==p.section){u=xO[l%xO.length],f=l%xO.length,h=Vhe[l%Vhe.length];let g=0,y=p.section;for(let x=d;x<e.length&&e[x].section==y;x++)g=g+1;let v={x:d*n.taskMargin+d*n.width+T0,y:50,text:p.section,fill:u,num:f,colour:h,taskCount:g};Lg.drawSection(t,v,n),i=p.section,l++}let m=p.people.reduce((g,y)=>(Vu[y]&&(g[y]=Vu[y]),g),{});p.x=d*n.taskMargin+d*n.width+T0,p.y=o,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=h,p.fill=u,p.num=f,p.actors=m,Lg.drawTask(t,p,n),zo.insert(p.x,p.y,p.x+p.width+n.taskMargin,300+5*30)}},"drawTasks"),bO={setConf:hGe,draw:dGe}});var qhe={};ur(qhe,{diagram:()=>mGe});var mGe,Whe=_(()=>{"use strict";Mhe();Nhe();Phe();Uhe();mGe={parser:Rhe,db:yO,renderer:bO,styles:Ohe,init:s(t=>{bO.setConf(t.journey),yO.clear()},"init")}});var wO,Zhe,Jhe=_(()=>{"use strict";wO=function(){var t=s(function(p,m,g,y){for(g=g||{},y=p.length;y--;g[p[y]]=m);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],o=[1,13],l=[1,16],u=[1,17],h={trace:s(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:s(function(m,g,y,v,x,b,k){var A=b.length-1;switch(x){case 1:return b[A-1];case 2:this.$=[];break;case 3:b[A-1].push(b[A]),this.$=b[A-1];break;case 4:case 5:this.$=b[A];break;case 6:case 7:this.$=[];break;case 8:v.getCommonDb().setDiagramTitle(b[A].substr(6)),this.$=b[A].substr(6);break;case 9:this.$=b[A].trim(),v.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=b[A].trim(),v.getCommonDb().setAccDescription(this.$);break;case 12:v.addSection(b[A].substr(8)),this.$=b[A].substr(8);break;case 15:v.addTask(b[A],0,""),this.$=b[A];break;case 16:v.addEvent(b[A].substr(2)),this.$=b[A];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:o,18:14,19:15,20:l,21:u},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:i,16:a,17:o,18:14,19:15,20:l,21:u},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:s(function(m,g){if(g.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=g,y}},"parseError"),parse:s(function(m){var g=this,y=[0],v=[],x=[null],b=[],k=this.table,A="",w=0,T=0,C=0,E=2,S=1,R=b.slice.call(arguments,1),D=Object.create(this.lexer),L={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(L.yy[P]=this.yy[P]);D.setInput(m,L.yy),L.yy.lexer=D,L.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var M=D.yylloc;b.push(M);var F=D.options&&D.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(Q){y.length=y.length-2*Q,x.length=x.length-Q,b.length=b.length-Q}s(I,"popStack");function O(){var Q;return Q=v.pop()||D.lex()||S,typeof Q!="number"&&(Q instanceof Array&&(v=Q,Q=v.pop()),Q=g.symbols_[Q]||Q),Q}s(O,"lex");for(var z,N,U,$,W,ee,te={},ce,Z,fe,ne;;){if(U=y[y.length-1],this.defaultActions[U]?$=this.defaultActions[U]:((z===null||typeof z>"u")&&(z=O()),$=k[U]&&k[U][z]),typeof $>"u"||!$.length||!$[0]){var H="";ne=[];for(ce in k[U])this.terminals_[ce]&&ce>E&&ne.push("'"+this.terminals_[ce]+"'");D.showPosition?H="Parse error on line "+(w+1)+`:
`+D.showPosition()+`
Expecting `+ne.join(", ")+", got '"+(this.terminals_[z]||z)+"'":H="Parse error on line "+(w+1)+": Unexpected "+(z==S?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(H,{text:D.match,token:this.terminals_[z]||z,line:D.yylineno,loc:M,expected:ne})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+z);switch($[0]){case 1:y.push(z),x.push(D.yytext),b.push(D.yylloc),y.push($[1]),z=null,N?(z=N,N=null):(T=D.yyleng,A=D.yytext,w=D.yylineno,M=D.yylloc,C>0&&C--);break;case 2:if(Z=this.productions_[$[1]][1],te.$=x[x.length-Z],te._$={first_line:b[b.length-(Z||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(Z||1)].first_column,last_column:b[b.length-1].last_column},F&&(te._$.range=[b[b.length-(Z||1)].range[0],b[b.length-1].range[1]]),ee=this.performAction.apply(te,[A,T,w,L.yy,$[1],x,b].concat(R)),typeof ee<"u")return ee;Z&&(y=y.slice(0,-1*Z*2),x=x.slice(0,-1*Z),b=b.slice(0,-1*Z)),y.push(this.productions_[$[1]][0]),x.push(te.$),b.push(te._$),fe=k[y[y.length-2]][y[y.length-1]],y.push(fe);break;case 3:return!0}}return!0},"parse")},f=function(){var p={EOF:1,parseError:s(function(g,y){if(this.yy.parser)this.yy.parser.parseError(g,y);else throw new Error(g)},"parseError"),setInput:s(function(m,g){return this.yy=g||this.yy||{},this._input=m,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:s(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var g=m.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),m},"input"),unput:s(function(m){var g=m.length,y=m.split(/(?:\r\n?|\n)/g);this._input=m+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),y.length-1&&(this.yylineno-=y.length-1);var x=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:y?(y.length===v.length?this.yylloc.first_column:0)+v[v.length-y.length].length-y[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(m){this.unput(this.match.slice(m))},"less"),pastInput:s(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var m=this.pastInput(),g=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
`+g+"^"},"showPosition"),test_match:s(function(m,g){var y,v,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),v=m[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+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,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(m[0].length),this.matched+=m[0],y=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var b in x)this[b]=x[b];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,g,y,v;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),b=0;b<x.length;b++)if(y=this._input.match(this.rules[x[b]]),y&&(!g||y[0].length>g[0].length)){if(g=y,v=b,this.options.backtrack_lexer){if(m=this.test_match(y,x[b]),m!==!1)return m;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(m=this.test_match(g,x[v]),m!==!1?m:!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:s(function(){var g=this.next();return g||this.lex()},"lex"),begin:s(function(g){this.conditionStack.push(g)},"begin"),popState:s(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:s(function(g){this.begin(g)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(g,y,v,x){var b=x;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]+)/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 p}();h.lexer=f;function d(){this.yy={}}return s(d,"Parser"),d.prototype=h,h.Parser=d,new d}();wO.parser=wO;Zhe=wO});var EO={};ur(EO,{addEvent:()=>lfe,addSection:()=>ife,addTask:()=>ofe,addTaskOrg:()=>cfe,clear:()=>nfe,default:()=>EGe,getCommonDb:()=>rfe,getSections:()=>afe,getTasks:()=>sfe});var Dg,tfe,TO,TT,Rg,rfe,nfe,ife,afe,sfe,ofe,lfe,cfe,efe,EGe,ufe=_(()=>{"use strict";Ci();Dg="",tfe=0,TO=[],TT=[],Rg=[],rfe=s(()=>q1,"getCommonDb"),nfe=s(function(){TO.length=0,TT.length=0,Dg="",Rg.length=0,br()},"clear"),ife=s(function(t){Dg=t,TO.push(t)},"addSection"),afe=s(function(){return TO},"getSections"),sfe=s(function(){let t=efe(),e=100,r=0;for(;!t&&r<e;)t=efe(),r++;return TT.push(...Rg),TT},"getTasks"),ofe=s(function(t,e,r){let n={id:tfe++,section:Dg,type:Dg,task:t,score:e||0,events:r?[r]:[]};Rg.push(n)},"addTask"),lfe=s(function(t){Rg.find(r=>r.id===tfe-1).events.push(t)},"addEvent"),cfe=s(function(t){let e={section:Dg,type:Dg,description:t,task:t,classes:[]};TT.push(e)},"addTaskOrg"),efe=s(function(){let t=s(function(r){return Rg[r].processed},"compileTask"),e=!0;for(let[r,n]of Rg.entries())t(r),e=e&&n.processed;return e},"compileTasks"),EGe={clear:nfe,getCommonDb:rfe,addSection:ife,getSections:afe,getTasks:sfe,addTask:ofe,addTaskOrg:cfe,addEvent:lfe}});function pfe(t,e){t.each(function(){var r=Me(this),n=r.text().split(/(\s+|<br>)/).reverse(),i,a=[],o=1.1,l=r.attr("y"),u=parseFloat(r.attr("dy")),h=r.text(null).append("tspan").attr("x",0).attr("y",l).attr("dy",u+"em");for(let f=0;f<n.length;f++)i=n[n.length-1-f],a.push(i),h.text(a.join(" ").trim()),(h.node().getComputedTextLength()>e||i==="<br>")&&(a.pop(),h.text(a.join(" ").trim()),i==="<br>"?a=[""]:a=[i],h=r.append("tspan").attr("x",0).attr("y",l).attr("dy",o+"em").text(i))})}var CGe,ET,SGe,_Ge,ffe,AGe,LGe,hfe,DGe,RGe,MGe,CO,dfe,IGe,NGe,OGe,PGe,cf,mfe=_(()=>{"use strict";Xt();CGe=12,ET=s(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"),SGe=s(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(u){let h=sl().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(a,"smile");function o(u){let h=sl().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(o,"sad");function l(u){u.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 s(l,"ambivalent"),e.score>3?a(i):e.score<3?o(i):l(i),n},"drawFace"),_Ge=s(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"),ffe=s(function(t,e){let r=e.text.replace(/<br\s*\/?>/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"),AGe=s(function(t,e){function r(i,a,o,l,u){return i+","+a+" "+(i+o)+","+a+" "+(i+o)+","+(a+l-u)+" "+(i+o-u*1.2)+","+(a+l)+" "+i+","+(a+l)}s(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,ffe(t,e)},"drawLabel"),LGe=s(function(t,e,r){let n=t.append("g"),i=CO();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,ET(n,i),dfe(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),hfe=-1,DGe=s(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");hfe++;let a=300+5*30;i.append("line").attr("id","task"+hfe).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"),SGe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let o=CO();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,ET(i,o),dfe(r)(e.task,i,o.x,o.y,o.width,o.height,{class:"task"},r,e.colour)},"drawTask"),RGe=s(function(t,e){ET(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),MGe=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),CO=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),dfe=function(){function t(i,a,o,l,u,h,f,d){let p=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(p,f)}s(t,"byText");function e(i,a,o,l,u,h,f,d,p){let{taskFontSize:m,taskFontFamily:g}=d,y=i.split(/<br\s*\/?>/gi);for(let v=0;v<y.length;v++){let x=v*m-m*(y.length-1)/2,b=a.append("text").attr("x",o+u/2).attr("y",l).attr("fill",p).style("text-anchor","middle").style("font-size",m).style("font-family",g);b.append("tspan").attr("x",o+u/2).attr("dy",x).text(y[v]),b.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,f)}}s(e,"byTspan");function r(i,a,o,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",o).attr("y",l).attr("width",u).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,o,l,u,h,f,d),n(g,f)}s(r,"byFo");function n(i,a){for(let o in a)o in a&&i.attr(o,a[o])}return s(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),IGe=s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");s(pfe,"wrap");NGe=s(function(t,e,r,n){let i=r%CGe-1,a=t.append("g");e.section=i,a.attr("class",(e.class?e.class+" ":"")+"timeline-node "+("section-"+i));let o=a.append("g"),l=a.append("g"),h=l.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pfe,e.width).node().getBBox(),f=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=h.height+f*1.1*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,l.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),PGe(o,e,i,n),e},"drawNode"),OGe=s(function(t,e,r){let n=t.append("g"),a=n.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pfe,e.width).node().getBBox(),o=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return n.remove(),a.height+o*1.1*.5+e.padding},"getVirtualNodeHeight"),PGe=s(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${-e.height+2*5} q0,-5 5,-5 h${e.width-2*5} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),cf={drawRect:ET,drawCircle:_Ge,drawSection:LGe,drawText:ffe,drawLabel:AGe,drawTask:DGe,drawBackgroundRect:RGe,getTextObj:MGe,getNoteRect:CO,initGraphics:IGe,drawNode:NGe,getVirtualNodeHeight:OGe}});var BGe,gfe,FGe,yfe,vfe=_(()=>{"use strict";Xt();mfe();it();gt();Un();BGe=s(function(t,e,r,n){let i=le(),a=i.leftMargin??50;V.debug("timeline",n.db);let o=i.securityLevel,l;o==="sandbox"&&(l=Me("#i"+e));let h=(o==="sandbox"?Me(l.nodes()[0].contentDocument.body):Me("body")).select("#"+e);h.append("g");let f=n.db.getTasks(),d=n.db.getCommonDb().getDiagramTitle();V.debug("task",f),cf.initGraphics(h);let p=n.db.getSections();V.debug("sections",p);let m=0,g=0,y=0,v=0,x=50+a,b=50;v=50;let k=0,A=!0;p.forEach(function(S){let R={number:k,descr:S,section:k,width:150,padding:20,maxHeight:m},D=cf.getVirtualNodeHeight(h,R,i);V.debug("sectionHeight before draw",D),m=Math.max(m,D+20)});let w=0,T=0;V.debug("tasks.length",f.length);for(let[S,R]of f.entries()){let D={number:S,descr:R,section:R.section,width:150,padding:20,maxHeight:g},L=cf.getVirtualNodeHeight(h,D,i);V.debug("taskHeight before draw",L),g=Math.max(g,L+20),w=Math.max(w,R.events.length);let P=0;for(let M of R.events){let F={descr:M,section:R.section,number:R.section,width:150,padding:20,maxHeight:50};P+=cf.getVirtualNodeHeight(h,F,i)}T=Math.max(T,P)}V.debug("maxSectionHeight before draw",m),V.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach(S=>{let R=f.filter(M=>M.section===S),D={number:k,descr:S,section:k,width:200*Math.max(R.length,1)-50,padding:20,maxHeight:m};V.debug("sectionNode",D);let L=h.append("g"),P=cf.drawNode(L,D,k,i);V.debug("sectionNode output",P),L.attr("transform",`translate(${x}, ${v})`),b+=m+50,R.length>0&&gfe(h,R,k,x,b,g,i,w,T,m,!1),x+=200*Math.max(R.length,1),b=v,k++}):(A=!1,gfe(h,f,k,x,b,g,i,w,T,m,!0));let C=h.node().getBBox();V.debug("bounds",C),d&&h.append("text").text(d).attr("x",C.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),y=A?m+g+150:g+100,h.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",y).attr("x2",C.width+3*a).attr("y2",y).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),ql(void 0,h,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),gfe=s(function(t,e,r,n,i,a,o,l,u,h,f){for(let d of e){let p={descr:d.task,section:r,number:r,width:150,padding:20,maxHeight:a};V.debug("taskNode",p);let m=t.append("g").attr("class","taskWrapper"),y=cf.drawNode(m,p,r,o).height;if(V.debug("taskHeight after draw",y),m.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,y),d.events){let v=t.append("g").attr("class","lineWrapper"),x=a;i+=100,x=x+FGe(t,d.events,r,n,i,o),i-=100,v.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+(f?a:h)+u+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n=n+200,f&&!o.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),FGe=s(function(t,e,r,n,i,a){let o=0,l=i;i=i+100;for(let u of e){let h={descr:u,section:r,number:r,width:150,padding:20,maxHeight:50};V.debug("eventNode",h);let f=t.append("g").attr("class","eventWrapper"),p=cf.drawNode(f,h,r,a).height;o=o+p,f.attr("transform",`translate(${n}, ${i})`),i=i+10+p}return i=l,o},"drawEvents"),yfe={setConf:s(()=>{},"setConf"),draw:BGe}});var zGe,$Ge,xfe,bfe=_(()=>{"use strict";Ho();zGe=s(t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],Fa(t["lineColor"+r])?t["lineColor"+r]=ht(t["lineColor"+r],20):t["lineColor"+r]=mt(t["lineColor"+r],20);for(let r=0;r<t.THEME_COLOR_LIMIT;r++){let n=""+(17-3*r);e+=`
.section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} path {
fill: ${t["cScale"+r]};
}
.section-${r-1} text {
fill: ${t["cScaleLabel"+r]};
}
.node-icon-${r-1} {
font-size: 40px;
color: ${t["cScaleLabel"+r]};
}
.section-edge-${r-1}{
stroke: ${t["cScale"+r]};
}
.edge-depth-${r-1}{
stroke-width: ${n};
}
.section-${r-1} line {
stroke: ${t["cScaleInv"+r]} ;
stroke-width: 3;
}
.lineWrapper line{
stroke: ${t["cScaleLabel"+r]} ;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return e},"genSections"),$Ge=s(t=>`
.edge {
stroke-width: 3;
}
${zGe(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"),xfe=$Ge});var kfe={};ur(kfe,{diagram:()=>GGe});var GGe,wfe=_(()=>{"use strict";Jhe();ufe();vfe();bfe();GGe={db:EO,renderer:yfe,parser:Zhe,styles:xfe}});var SO,Cfe,Sfe=_(()=>{"use strict";SO=function(){var t=s(function(A,w,T,C){for(T=T||{},C=A.length;C--;T[A[C]]=w);return T},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],o=[1,20],l=[1,19],u=[6,7,8],h=[1,26],f=[1,24],d=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],g=[1,33],y=[1,34],v=[1,6,7,11,13,15,16,19,22],x={trace:s(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:s(function(w,T,C,E,S,R,D){var L=R.length-1;switch(S){case 6:case 7:return E;case 8:E.getLogger().trace("Stop NL ");break;case 9:E.getLogger().trace("Stop EOF ");break;case 11:E.getLogger().trace("Stop NL2 ");break;case 12:E.getLogger().trace("Stop EOF2 ");break;case 15:E.getLogger().info("Node: ",R[L].id),E.addNode(R[L-1].length,R[L].id,R[L].descr,R[L].type);break;case 16:E.getLogger().trace("Icon: ",R[L]),E.decorateNode({icon:R[L]});break;case 17:case 21:E.decorateNode({class:R[L]});break;case 18:E.getLogger().trace("SPACELIST");break;case 19:E.getLogger().trace("Node: ",R[L].id),E.addNode(0,R[L].id,R[L].descr,R[L].type);break;case 20:E.decorateNode({icon:R[L]});break;case 25:E.getLogger().trace("node found ..",R[L-2]),this.$={id:R[L-1],descr:R[L-1],type:E.getType(R[L-2],R[L])};break;case 26:this.$={id:R[L],descr:R[L],type:E.nodeType.DEFAULT};break;case 27:E.getLogger().trace("node found ..",R[L-3]),this.$={id:R[L-3],descr:R[L-1],type:E.getType(R[L-2],R[L])};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:o,22:l},t(u,[2,3]),{1:[2,2]},t(u,[2,4]),t(u,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},{6:h,7:f,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:f,10:32,11:d},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},t(m,[2,14],{7:g,11:y}),t(v,[2,8]),t(v,[2,9]),t(v,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(m,[2,13],{7:g,11:y}),t(v,[2,11]),t(v,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:s(function(w,T){if(T.recoverable)this.trace(w);else{var C=new Error(w);throw C.hash=T,C}},"parseError"),parse:s(function(w){var T=this,C=[0],E=[],S=[null],R=[],D=this.table,L="",P=0,M=0,F=0,I=2,O=1,z=R.slice.call(arguments,1),N=Object.create(this.lexer),U={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(U.yy[$]=this.yy[$]);N.setInput(w,U.yy),U.yy.lexer=N,U.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var W=N.yylloc;R.push(W);var ee=N.options&&N.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function te(Re){C.length=C.length-2*Re,S.length=S.length-Re,R.length=R.length-Re}s(te,"popStack");function ce(){var Re;return Re=E.pop()||N.lex()||O,typeof Re!="number"&&(Re instanceof Array&&(E=Re,Re=E.pop()),Re=T.symbols_[Re]||Re),Re}s(ce,"lex");for(var Z,fe,ne,H,Q,K,re={},ie,ye,j,De;;){if(ne=C[C.length-1],this.defaultActions[ne]?H=this.defaultActions[ne]:((Z===null||typeof Z>"u")&&(Z=ce()),H=D[ne]&&D[ne][Z]),typeof H>"u"||!H.length||!H[0]){var oe="";De=[];for(ie in D[ne])this.terminals_[ie]&&ie>I&&De.push("'"+this.terminals_[ie]+"'");N.showPosition?oe="Parse error on line "+(P+1)+`:
`+N.showPosition()+`
Expecting `+De.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":oe="Parse error on line "+(P+1)+": Unexpected "+(Z==O?"end of input":"'"+(this.terminals_[Z]||Z)+"'"),this.parseError(oe,{text:N.match,token:this.terminals_[Z]||Z,line:N.yylineno,loc:W,expected:De})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ne+", token: "+Z);switch(H[0]){case 1:C.push(Z),S.push(N.yytext),R.push(N.yylloc),C.push(H[1]),Z=null,fe?(Z=fe,fe=null):(M=N.yyleng,L=N.yytext,P=N.yylineno,W=N.yylloc,F>0&&F--);break;case 2:if(ye=this.productions_[H[1]][1],re.$=S[S.length-ye],re._$={first_line:R[R.length-(ye||1)].first_line,last_line:R[R.length-1].last_line,first_column:R[R.length-(ye||1)].first_column,last_column:R[R.length-1].last_column},ee&&(re._$.range=[R[R.length-(ye||1)].range[0],R[R.length-1].range[1]]),K=this.performAction.apply(re,[L,M,P,U.yy,H[1],S,R].concat(z)),typeof K<"u")return K;ye&&(C=C.slice(0,-1*ye*2),S=S.slice(0,-1*ye),R=R.slice(0,-1*ye)),C.push(this.productions_[H[1]][0]),S.push(re.$),R.push(re._$),j=D[C[C.length-2]][C[C.length-1]],C.push(j);break;case 3:return!0}}return!0},"parse")},b=function(){var A={EOF:1,parseError:s(function(T,C){if(this.yy.parser)this.yy.parser.parseError(T,C);else throw new Error(T)},"parseError"),setInput:s(function(w,T){return this.yy=T||this.yy||{},this._input=w,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:s(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var T=w.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),w},"input"),unput:s(function(w){var T=w.length,C=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var E=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),C.length-1&&(this.yylineno-=C.length-1);var S=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:C?(C.length===E.length?this.yylloc.first_column:0)+E[E.length-C.length].length-C[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-T]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(w){this.unput(this.match.slice(w))},"less"),pastInput:s(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var w=this.pastInput(),T=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
`+T+"^"},"showPosition"),test_match:s(function(w,T){var C,E,S;if(this.options.backtrack_lexer&&(S={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&&(S.yylloc.range=this.yylloc.range.slice(0))),E=w[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,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(w[0].length),this.matched+=w[0],C=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var R in S)this[R]=S[R];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,T,C,E;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),R=0;R<S.length;R++)if(C=this._input.match(this.rules[S[R]]),C&&(!T||C[0].length>T[0].length)){if(T=C,E=R,this.options.backtrack_lexer){if(w=this.test_match(C,S[R]),w!==!1)return w;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(w=this.test_match(T,S[E]),w!==!1?w:!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:s(function(){var T=this.next();return T||this.lex()},"lex"),begin:s(function(T){this.conditionStack.push(T)},"begin"),popState:s(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:s(function(T){this.begin(T)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(T,C,E,S){var R=S;switch(E){case 0:return T.getLogger().trace("Found comment",C.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:T.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return T.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:T.getLogger().trace("end icon"),this.popState();break;case 10:return T.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return T.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return T.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return T.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:T.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return T.getLogger().trace("description:",C.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),T.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),T.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),T.getLogger().trace("node end ...",C.yytext),"NODE_DEND";break;case 30:return this.popState(),T.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),T.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),T.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),T.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),T.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return T.getLogger().trace("Long description:",C.yytext),20;break;case 36:return T.getLogger().trace("Long description:",C.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 A}();x.lexer=b;function k(){this.yy={}}return s(k,"Parser"),k.prototype=x,x.Parser=k,new k}();SO.parser=SO;Cfe=SO});var Cl,_fe,_O,WGe,HGe,YGe,XGe,Ii,jGe,KGe,QGe,ZGe,JGe,eVe,tVe,Afe,Lfe=_(()=>{"use strict";gt();Qt();it();Pl();Cl=[],_fe=0,_O={},WGe=s(()=>{Cl=[],_fe=0,_O={}},"clear"),HGe=s(function(t){for(let e=Cl.length-1;e>=0;e--)if(Cl[e].level<t)return Cl[e];return null},"getParent"),YGe=s(()=>Cl.length>0?Cl[0]:null,"getMindmap"),XGe=s((t,e,r,n)=>{V.info("addNode",t,e,r,n);let i=le(),a=i.mindmap?.padding??dr.mindmap.padding;switch(n){case Ii.ROUNDED_RECT:case Ii.RECT:case Ii.HEXAGON:a*=2}let o={id:_fe++,nodeId:$r(e,i),level:t,descr:$r(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??dr.mindmap.maxNodeWidth,padding:a},l=HGe(t);if(l)l.children.push(o),Cl.push(o);else if(Cl.length===0)Cl.push(o);else throw new Error('There can be only one root. No parent could be found for ("'+o.descr+'")')},"addNode"),Ii={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},jGe=s((t,e)=>{switch(V.debug("In get type",t,e),t){case"[":return Ii.RECT;case"(":return e===")"?Ii.ROUNDED_RECT:Ii.CLOUD;case"((":return Ii.CIRCLE;case")":return Ii.CLOUD;case"))":return Ii.BANG;case"{{":return Ii.HEXAGON;default:return Ii.DEFAULT}},"getType"),KGe=s((t,e)=>{_O[t]=e},"setElementForId"),QGe=s(t=>{if(!t)return;let e=le(),r=Cl[Cl.length-1];t.icon&&(r.icon=$r(t.icon,e)),t.class&&(r.class=$r(t.class,e))},"decorateNode"),ZGe=s(t=>{switch(t){case Ii.DEFAULT:return"no-border";case Ii.RECT:return"rect";case Ii.ROUNDED_RECT:return"rounded-rect";case Ii.CIRCLE:return"circle";case Ii.CLOUD:return"cloud";case Ii.BANG:return"bang";case Ii.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),JGe=s(()=>V,"getLogger"),eVe=s(t=>_O[t],"getElementById"),tVe={clear:WGe,addNode:XGe,getMindmap:YGe,nodeType:Ii,getType:jGe,setElementForId:KGe,decorateNode:QGe,type2Str:ZGe,getLogger:JGe,getElementById:eVe},Afe=tVe});function Pi(t){"@babel/helpers - typeof";return Pi=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},Pi(t)}function nP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dfe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function iP(t,e,r){return e&&Dfe(t.prototype,e),r&&Dfe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function qde(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sl(t,e){return rVe(t)||nVe(t,e)||Wde(t,e)||iVe()}function rVe(t){if(Array.isArray(t))return t}function nVe(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,o,l;try{for(r=r.call(t);!(i=(o=r.next()).done)&&(n.push(o.value),!(e&&n.length===e));i=!0);}catch(u){a=!0,l=u}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw l}}return n}}function Wde(t,e){if(t){if(typeof t=="string")return Rfe(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rfe(t,e)}}function Rfe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function iVe(){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 Hde(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Wde(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=s(function(){},"F");return{s:i,n:s(function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},"n"),e:s(function(u){throw u},"e"),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=!0,o=!1,l;return{s:s(function(){r=r.call(t)},"s"),n:s(function(){var u=r.next();return a=u.done,u},"n"),e:s(function(u){o=!0,l=u},"e"),f:s(function(){try{!a&&r.return!=null&&r.return()}finally{if(o)throw l}},"f")}}function AVe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function LVe(t,e){return e={exports:{}},t(e,e.exports),e.exports}function PVe(t){for(var e=t.length;e--&&OVe.test(t.charAt(e)););return e}function zVe(t){return t&&t.slice(0,BVe(t)+1).replace(FVe,"")}function qVe(t){var e=VVe.call(t,ux),r=t[ux];try{t[ux]=void 0;var n=!0}catch{}var i=UVe.call(t);return n&&(e?t[ux]=r:delete t[ux]),i}function XVe(t){return YVe.call(t)}function ZVe(t){return t==null?t===void 0?QVe:KVe:Nfe&&Nfe in Object(t)?WVe(t):jVe(t)}function JVe(t){return t!=null&&typeof t=="object"}function rUe(t){return typeof t=="symbol"||eUe(t)&&t0e(t)==tUe}function oUe(t){if(typeof t=="number")return t;if(Ox(t))return Ofe;if(R0(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=R0(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=$Ve(t);var r=iUe.test(t);return r||aUe.test(t)?sUe(t.slice(2),r?2:8):nUe.test(t)?Ofe:+t}function hUe(t,e,r){var n,i,a,o,l,u,h=0,f=!1,d=!1,p=!0;if(typeof t!="function")throw new TypeError(lUe);e=Pfe(e)||0,R0(r)&&(f=!!r.leading,d="maxWait"in r,a=d?cUe(Pfe(r.maxWait)||0,e):a,p="trailing"in r?!!r.trailing:p);function m(T){var C=n,E=i;return n=i=void 0,h=T,o=t.apply(E,C),o}s(m,"invokeFunc");function g(T){return h=T,l=setTimeout(x,e),f?m(T):o}s(g,"leadingEdge");function y(T){var C=T-u,E=T-h,S=e-C;return d?uUe(S,a-E):S}s(y,"remainingWait");function v(T){var C=T-u,E=T-h;return u===void 0||C>=e||C<0||d&&E>=a}s(v,"shouldInvoke");function x(){var T=AO();if(v(T))return b(T);l=setTimeout(x,y(T))}s(x,"timerExpired");function b(T){return l=void 0,p&&n?m(T):(n=i=void 0,o)}s(b,"trailingEdge");function k(){l!==void 0&&clearTimeout(l),h=0,n=u=i=l=void 0}s(k,"cancel");function A(){return l===void 0?o:b(AO())}s(A,"flush");function w(){var T=AO(),C=v(T);if(n=arguments,i=this,u=T,C){if(l===void 0)return g(u);if(d)return clearTimeout(l),l=setTimeout(x,e),m(u)}return l===void 0&&(l=setTimeout(x,e)),o}return s(w,"debounced"),w.cancel=k,w.flush=A,w}function l7(t,e,r,n,i,a){var o;return Gn(t)?o=t:o=Hg[t]||Hg.euclidean,e===0&&Gn(t)?o(i,a):o(e,r,n,i,a)}function nWe(t,e){if(c7(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Ox(t)?!0:rWe.test(t)||!tWe.test(t)||e!=null&&t in Object(e)}function cWe(t){if(!R0(t))return!1;var e=t0e(t);return e==sWe||e==oWe||e==aWe||e==lWe}function fWe(t){return!!rde&&rde in t}function gWe(t){if(t!=null){try{return mWe.call(t)}catch{}try{return t+""}catch{}}return""}function CWe(t){if(!R0(t)||dWe(t))return!1;var e=uWe(t)?EWe:xWe;return e.test(yWe(t))}function _We(t,e){return t?.[e]}function LWe(t,e){var r=AWe(t,e);return SWe(r)?r:void 0}function RWe(){this.__data__=Ax?Ax(null):{},this.size=0}function IWe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function FWe(t){var e=this.__data__;if(Ax){var r=e[t];return r===OWe?void 0:r}return BWe.call(e,t)?e[t]:void 0}function VWe(t){var e=this.__data__;return Ax?e[t]!==void 0:GWe.call(e,t)}function WWe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ax&&e===void 0?qWe:e,this}function Kg(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function YWe(){this.__data__=[],this.size=0}function jWe(t,e){return t===e||t!==t&&e!==e}function KWe(t,e){for(var r=t.length;r--;)if(S0e(t[r][0],e))return r;return-1}function JWe(t){var e=this.__data__,r=u7(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ZWe.call(e,r,1),--this.size,!0}function tHe(t){var e=this.__data__,r=u7(e,t);return r<0?void 0:e[r][1]}function nHe(t){return u7(this.__data__,t)>-1}function aHe(t,e){var r=this.__data__,n=u7(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Qg(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function uHe(){this.size=0,this.__data__={hash:new nde,map:new(cHe||oHe),string:new nde}}function fHe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function pHe(t,e){var r=t.__data__;return dHe(e)?r[typeof e=="string"?"string":"hash"]:r.map}function mHe(t){var e=h7(this,t).delete(t);return this.size-=e?1:0,e}function yHe(t){return h7(this,t).get(t)}function xHe(t){return h7(this,t).has(t)}function kHe(t,e){var r=h7(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function Zg(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function mP(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(THe);var r=s(function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o},"memoized");return r.cache=new(mP.Cache||_0e),r}function SHe(t){var e=EHe(t,function(n){return r.size===CHe&&r.clear(),n}),r=e.cache;return e}function RHe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function D0e(t){if(typeof t=="string")return t;if(c7(t))return L0e(t,D0e)+"";if(Ox(t))return ade?ade.call(t):"";var e=t+"";return e=="0"&&1/t==-MHe?"-0":e}function NHe(t){return t==null?"":IHe(t)}function OHe(t,e){return c7(t)?t:iWe(t,e)?[t]:A0e(R0e(t))}function BHe(t){if(typeof t=="string"||Ox(t))return t;var e=t+"";return e=="0"&&1/t==-PHe?"-0":e}function FHe(t,e){e=M0e(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[gP(e[r++])];return r&&r==n?t:void 0}function $He(t,e,r){var n=t==null?void 0:zHe(t,e);return n===void 0?r:n}function UHe(t,e,r){e=="__proto__"&&sde?sde(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function YHe(t,e,r){var n=t[e];(!(HHe.call(t,e)&&S0e(n,r))||r===void 0&&!(e in t))&&qHe(t,e,r)}function QHe(t,e){var r=typeof t;return e=e??jHe,!!e&&(r=="number"||r!="symbol"&&KHe.test(t))&&t>-1&&t%1==0&&t<e}function JHe(t,e,r,n){if(!R0(t))return t;e=M0e(e,t);for(var i=-1,a=e.length,o=a-1,l=t;l!=null&&++i<a;){var u=gP(e[i]),h=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=o){var f=l[u];h=n?n(f,u,l):void 0,h===void 0&&(h=R0(f)?f:ZHe(e[i+1])?[]:{})}XHe(l,u,h),l=l[u]}return t}function tYe(t,e,r){return t==null?t:eYe(t,e,r)}function nYe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function aYe(t){return c7(t)?L0e(t,gP):Ox(t)?[t]:iYe(A0e(R0e(t)))}function vP(t,e,r,n){for(var i=[],a=new Xg,o=t.cy(),l=o.hasCompoundNodes(),u=0;u<t.length;u++){var h=t[u];r?i.push(h):l&&n(i,a,h)}for(;i.length>0;){var f=i.shift();e(f),a.add(f.id()),l&&n(i,a,f)}return t}function N0e(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i<n.length;i++){var a=n[i];e.has(a.id())||t.push(a)}}function O0e(t,e,r){if(r.isChild()){var n=r._private.parent;e.has(n.id())||t.push(n)}}function EYe(t,e,r){O0e(t,e,r),N0e(t,e,r)}function NO(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var n=0,i=r[0],a=i._private.edges,o=0;o<a.length;o++){var l=a[o];!e&&l.isLoop()||(n+=t(i,l))}return n}else return}}function Ig(t,e){return function(r){for(var n,i=this.nodes(),a=0;a<i.length;a++){var o=i[a],l=o[t](r);l!==void 0&&(n===void 0||e(l,n))&&(n=l)}return n}}function dx(){return!1}function MT(){return!0}function d7(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UYe,e=arguments.length>1?arguments[1]:void 0,r=0;r<fde.length;r++){var n=fde[r];this[n]=t[n]||q0e[n]}this.context=e||this.context,this.listeners=[],this.emitting=0}function j0e(t,e,r){var n=r._private,i=n.styleCache=n.styleCache||[],a;return(a=i[t])!=null||(a=i[t]=e(r)),a}function p7(t,e){return t=M0(t),s(function(n){return j0e(t,e,n)},"cachedStyleFunction")}function m7(t,e){t=M0(t);var r=s(function(i){return e.call(i)},"selfFn");return s(function(){var i=this[0];if(i)return j0e(t,r,i)},"cachedPrototypeStyleFunction")}function PO(t,e){var r=t._private,n=r.data.parent?t.parents():null;if(n)for(var i=0;i<n.length;i++){var a=n[i];if(!e(a))return!1}return!0}function xP(t){var e=t.ok,r=t.edgeOkViaNode||t.ok,n=t.parentOk||t.ok;return function(){var i=this.cy();if(!i.styleEnabled())return!0;var a=this[0],o=i.hasCompoundNodes();if(a){var l=a._private;if(!e(a))return!1;if(a.isNode())return!o||PO(a,n);var u=l.source,h=l.target;return r(u)&&(!o||PO(u,r))&&(u===h||r(h)&&(!o||PO(h,r)))}}}function pde(t){return function(){var e=arguments,r=[];if(e.length===2){var n=e[0],i=e[1];this.on(t.event,n,i)}else if(e.length===1&&Gn(e[0])){var a=e[0];this.on(t.event,a)}else if(e.length===0||e.length===1&&hn(e[0])){for(var o=e.length===1?e[0]:null,l=0;l<this.length;l++){var u=this[l],h=!t.ableField||u._private[t.ableField],f=u._private[t.field]!=t.value;if(t.overrideAble){var d=t.overrideAble(u);if(d!==void 0&&(h=d,!d))return this}h&&(u._private[t.field]=t.value,f&&r.push(u))}var p=this.spawn(r);p.updateStyle(),p.emit(t.event),o&&p.emit(o)}return this}}function e1(t){mf[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var r=t.overrideField(e);if(r!==void 0)return r}return e._private[t.field]}},mf[t.on]=pde({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),mf[t.off]=pde({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}function vde(t){return s(function(r){for(var n=[],i=0;i<this.length;i++){var a=this[i],o=a._private[t.attr];o&&n.push(o)}return this.spawn(n,!0).filter(r)},"sourceImpl")}function xde(t){return s(function(r){var n=[],i=this._private.cy,a=t||{};At(r)&&(r=i.$(r));for(var o=0;o<r.length;o++)for(var l=r[o]._private.edges,u=0;u<l.length;u++){var h=l[u],f=h._private.data,d=this.hasElementWithId(f.source)&&r.hasElementWithId(f.target),p=r.hasElementWithId(f.source)&&this.hasElementWithId(f.target),m=d||p;m&&((a.thisIsSrc||a.thisIsTgt)&&(a.thisIsSrc&&!d||a.thisIsTgt&&!p)||n.push(h))}return this.spawn(n,!0)},"edgesWithImpl")}function bde(t){var e={codirected:!1};return t=Pt({},e,t),s(function(n){for(var i=[],a=this.edges(),o=t,l=0;l<a.length;l++)for(var u=a[l],h=u._private,f=h.source,d=f._private.data.id,p=h.data.target,m=f._private.edges,g=0;g<m.length;g++){var y=m[g],v=y._private.data,x=v.target,b=v.source,k=x===p&&b===d,A=d===x&&p===b;(o.codirected&&k||!o.codirected&&(k||A))&&i.push(y)}return this.spawn(i,!0).filter(n)},"parallelEdgesImpl")}function eXe(t,e,r,n){var i=4,a=.001,o=1e-7,l=10,u=11,h=1/(u-1),f=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var d=0;d<4;++d)if(typeof arguments[d]!="number"||isNaN(arguments[d])||!isFinite(arguments[d]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var p=f?new Float32Array(u):new Array(u);function m(R,D){return 1-3*D+3*R}s(m,"A");function g(R,D){return 3*D-6*R}s(g,"B");function y(R){return 3*R}s(y,"C");function v(R,D,L){return((m(D,L)*R+g(D,L))*R+y(D))*R}s(v,"calcBezier");function x(R,D,L){return 3*m(D,L)*R*R+2*g(D,L)*R+y(D)}s(x,"getSlope");function b(R,D){for(var L=0;L<i;++L){var P=x(D,t,r);if(P===0)return D;var M=v(D,t,r)-R;D-=M/P}return D}s(b,"newtonRaphsonIterate");function k(){for(var R=0;R<u;++R)p[R]=v(R*h,t,r)}s(k,"calcSampleValues");function A(R,D,L){var P,M,F=0;do M=D+(L-D)/2,P=v(M,t,r)-R,P>0?L=M:D=M;while(Math.abs(P)>o&&++F<l);return M}s(A,"binarySubdivide");function w(R){for(var D=0,L=1,P=u-1;L!==P&&p[L]<=R;++L)D+=h;--L;var M=(R-p[L])/(p[L+1]-p[L]),F=D+M*h,I=x(F,t,r);return I>=a?b(R,F):I===0?F:A(R,D,D+h)}s(w,"getTForX");var T=!1;function C(){T=!0,(t!==e||r!==n)&&k()}s(C,"precompute");var E=s(function(D){return T||C(),t===e&&r===n?D:D===0?0:D===1?1:v(w(D),e,n)},"f");E.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var S="generateBezier("+[t,e,r,n]+")";return E.toString=function(){return S},E}function kde(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 wde(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function Ng(t,e,r,n,i){var a=i!=null?i.type:null;r<0?r=0:r>1&&(r=1);var o=wde(t,i),l=wde(e,i);if(rt(o)&&rt(l))return kde(a,o,l,r,n);if(hn(o)&&hn(l)){for(var u=[],h=0;h<l.length;h++){var f=o[h],d=l[h];if(f!=null&&d!=null){var p=kde(a,f,d,r,n);u.push(p)}else u.push(d)}return u}}function rXe(t,e,r,n){var i=!n,a=t._private,o=e._private,l=o.easing,u=o.startTime,h=n?t:t.cy(),f=h.style();if(!o.easingImpl)if(l==null)o.easingImpl=GT.linear;else{var d;if(At(l)){var p=f.parse("transition-timing-function",l);d=p.value}else d=l;var m,g;At(d)?(m=d,g=[]):(m=d[1],g=d.slice(2).map(function(N){return+N})),g.length>0?(m==="spring"&&g.push(o.duration),o.easingImpl=GT[m].apply(null,g)):o.easingImpl=GT[m]}var y=o.easingImpl,v;if(o.duration===0?v=1:v=(r-u)/o.duration,o.applying&&(v=o.progress),v<0?v=0:v>1&&(v=1),o.delay==null){var x=o.startPosition,b=o.position;if(b&&i&&!t.locked()){var k={};px(x.x,b.x)&&(k.x=Ng(x.x,b.x,v,y)),px(x.y,b.y)&&(k.y=Ng(x.y,b.y,v,y)),t.position(k)}var A=o.startPan,w=o.pan,T=a.pan,C=w!=null&&n;C&&(px(A.x,w.x)&&(T.x=Ng(A.x,w.x,v,y)),px(A.y,w.y)&&(T.y=Ng(A.y,w.y,v,y)),t.emit("pan"));var E=o.startZoom,S=o.zoom,R=S!=null&&n;R&&(px(E,S)&&(a.zoom=Sx(a.minZoom,Ng(E,S,v,y),a.maxZoom)),t.emit("zoom")),(C||R)&&t.emit("viewport");var D=o.style;if(D&&D.length>0&&i){for(var L=0;L<D.length;L++){var P=D[L],M=P.name,F=P,I=o.startStyle[M],O=f.properties[I.name],z=Ng(I,F,v,y,O);f.overrideBypass(t,M,z)}t.emit("style")}}return o.progress=v,v}function px(t,e){return t==null||e==null?!1:rt(t)&&rt(e)?!0:!!(t&&e)}function nXe(t,e,r,n){var i=e._private;i.started=!0,i.startTime=r-i.progress*i.duration}function Tde(t,e){var r=e._private.aniEles,n=[];function i(f,d){var p=f._private,m=p.animation.current,g=p.animation.queue,y=!1;if(m.length===0){var v=g.shift();v&&m.push(v)}for(var x=s(function(T){for(var C=T.length-1;C>=0;C--){var E=T[C];E()}T.splice(0,T.length)},"callbacks"),b=m.length-1;b>=0;b--){var k=m[b],A=k._private;if(A.stopped){m.splice(b,1),A.hooked=!1,A.playing=!1,A.started=!1,x(A.frames);continue}!A.playing&&!A.applying||(A.playing&&A.applying&&(A.applying=!1),A.started||nXe(f,k,t),rXe(f,k,t,d),A.applying&&(A.applying=!1),x(A.frames),A.step!=null&&A.step(t),k.completed()&&(m.splice(b,1),A.hooked=!1,A.playing=!1,A.started=!1,x(A.completes)),y=!0)}return!d&&m.length===0&&g.length===0&&n.push(f),y}s(i,"stepOne");for(var a=!1,o=0;o<r.length;o++){var l=r[o],u=i(l);a=a||u}var h=i(e,!0);(a||h)&&(r.length>0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}function Q0e(t){this.options=Pt({},hXe,fXe,t)}function Z0e(t){this.options=Pt({},dXe,t)}function J0e(t){this.options=Pt({},pXe,t)}function v7(t){this.options=Pt({},mXe,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"),o=i.target().data("id"),l=e.some(function(h){return h.data("id")===a}),u=e.some(function(h){return h.data("id")===o});return!l||!u});this.options.eles=this.options.eles.not(n)}function tpe(t){this.options=Pt({},MXe,t)}function wP(t){this.options=Pt({},IXe,t)}function rpe(t){this.options=Pt({},NXe,t)}function npe(t){this.options=Pt({},OXe,t)}function ipe(t){this.options=t,this.notifications=0}function ope(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 EP(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}:(FXe(t,e,r,n,i),{cx:jO,cy:KO,radius:A0,startX:ape,startY:spe,stopX:QO,stopY:ZO,startAngle:Rc.ang+Math.PI/2*L0,endAngle:$o.ang-Math.PI/2*L0,counterClockwise:qT})}function lpe(t){var e=[];if(t!=null){for(var r=0;r<t.length;r+=2){var n=t[r],i=t[r+1];e.push({x:n,y:i})}return e}}function zXe(t,e,r){for(var n=s(function(h,f,d,p){return ji(h,f,d,p)},"qbezierAt$1"),i=e._private,a=i.rstyle.bezierPts,o=0;o<t.bezierProjPcts.length;o++){var l=t.bezierProjPcts[o];a.push({x:n(r[0],r[2],r[4],l),y:n(r[1],r[3],r[5],l)})}}function gje(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.lineTo(n.x,n.y)}}function yje(t,e,r){for(var n,i=0;i<e.length;i++){var a=e[i];i===0&&(n=a),t.lineTo(a.x,a.y)}t.quadraticCurveTo(r.x,r.y,n.x,n.y)}function $de(t,e,r){t.beginPath&&t.beginPath();for(var n=e,i=0;i<n.length;i++){var a=n[i];t.lineTo(a.x,a.y)}var o=r,l=r[0];t.moveTo(l.x,l.y);for(var i=1;i<o.length;i++){var a=o[i];t.lineTo(a.x,a.y)}t.closePath&&t.closePath()}function vje(t,e,r,n,i){t.beginPath&&t.beginPath(),t.arc(r,n,i,0,Math.PI*2,!1);var a=e,o=a[0];t.moveTo(o.x,o.y);for(var l=0;l<a.length;l++){var u=a[l];t.lineTo(u.x,u.y)}t.closePath&&t.closePath()}function xje(t,e,r,n){t.arc(e,r,n,0,Math.PI*2,!1)}function $O(t,e,r,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+a,r),t.lineTo(e+n-a,r),t.quadraticCurveTo(e+n,r,e+n,r+a),t.lineTo(e+n,r+i-a),t.quadraticCurveTo(e+n,r+i,e+n-a,r+i),t.lineTo(e+a,r+i),t.quadraticCurveTo(e,r+i,e,r+i-a),t.lineTo(e,r+a),t.quadraticCurveTo(e,r,e+a,r),t.closePath(),o?t.stroke():t.fill()}function Sje(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),i=new Uint8Array(n),a=0;a<r.length;a++)i[a]=r.charCodeAt(a);return new Blob([n],{type:e})}function Ude(t){var e=t.indexOf(",");return t.substr(e+1)}function kpe(t,e,r){var n=s(function(){return e.toDataURL(r,t.quality)},"getB64Uri");switch(t.output){case"blob-promise":return new jg(function(i,a){try{e.toBlob(function(o){o!=null?i(o):a(new Error("`canvas.toBlob()` sent a null value in its callback"))},r,t.quality)}catch(o){a(o)}});case"blob":return Sje(Ude(n()),r);case"base64":return Ude(n());case"base64uri":default:return n()}}function Tpe(t){var e=this,r=e.cy.window(),n=r.document;e.data={canvases:new Array(Fr.CANVAS_LAYERS),contexts:new Array(Fr.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Fr.CANVAS_LAYERS),bufferCanvases:new Array(Fr.BUFFER_COUNT),bufferContexts:new Array(Fr.CANVAS_LAYERS)};var i="-webkit-tap-highlight-color",a="rgba(0,0,0,0)";e.data.canvasContainer=n.createElement("div");var o=e.data.canvasContainer.style;e.data.canvasContainer.style[i]=a,o.position="relative",o.zIndex="0",o.overflow="hidden";var l=t.cy.container();l.appendChild(e.data.canvasContainer),l.style[i]=a;var u={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};pVe()&&(u["-ms-touch-action"]="none",u["touch-action"]="none");for(var h=0;h<Fr.CANVAS_LAYERS;h++){var f=e.data.canvases[h]=n.createElement("canvas");e.data.contexts[h]=f.getContext("2d"),Object.keys(u).forEach(function(ne){f.style[ne]=u[ne]}),f.style.position="absolute",f.setAttribute("data-id","layer"+h),f.style.zIndex=String(Fr.CANVAS_LAYERS-h),e.data.canvasContainer.appendChild(f),e.data.canvasNeedsRedraw[h]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[Fr.NODE].setAttribute("data-id","layer"+Fr.NODE+"-node"),e.data.canvases[Fr.SELECT_BOX].setAttribute("data-id","layer"+Fr.SELECT_BOX+"-selectbox"),e.data.canvases[Fr.DRAG].setAttribute("data-id","layer"+Fr.DRAG+"-drag");for(var h=0;h<Fr.BUFFER_COUNT;h++)e.data.bufferCanvases[h]=n.createElement("canvas"),e.data.bufferContexts[h]=e.data.bufferCanvases[h].getContext("2d"),e.data.bufferCanvases[h].style.position="absolute",e.data.bufferCanvases[h].setAttribute("data-id","buffer"+h),e.data.bufferCanvases[h].style.zIndex=String(-h-1),e.data.bufferCanvases[h].style.visibility="hidden";e.pathsEnabled=!0;var d=Is(),p=s(function(H){return{x:(H.x1+H.x2)/2,y:(H.y1+H.y2)/2}},"getBoxCenter"),m=s(function(H){return{x:-H.w/2,y:-H.h/2}},"getCenterOffset"),g=s(function(H){var Q=H[0]._private,K=Q.oldBackgroundTimestamp===Q.backgroundTimestamp;return!K},"backgroundTimestampHasChanged"),y=s(function(H){return H[0]._private.nodeKey},"getStyleKey"),v=s(function(H){return H[0]._private.labelStyleKey},"getLabelKey"),x=s(function(H){return H[0]._private.sourceLabelStyleKey},"getSourceLabelKey"),b=s(function(H){return H[0]._private.targetLabelStyleKey},"getTargetLabelKey"),k=s(function(H,Q,K,re,ie){return e.drawElement(H,Q,K,!1,!1,ie)},"drawElement"),A=s(function(H,Q,K,re,ie){return e.drawElementText(H,Q,K,re,"main",ie)},"drawLabel"),w=s(function(H,Q,K,re,ie){return e.drawElementText(H,Q,K,re,"source",ie)},"drawSourceLabel"),T=s(function(H,Q,K,re,ie){return e.drawElementText(H,Q,K,re,"target",ie)},"drawTargetLabel"),C=s(function(H){return H.boundingBox(),H[0]._private.bodyBounds},"getElementBox"),E=s(function(H){return H.boundingBox(),H[0]._private.labelBounds.main||d},"getLabelBox"),S=s(function(H){return H.boundingBox(),H[0]._private.labelBounds.source||d},"getSourceLabelBox"),R=s(function(H){return H.boundingBox(),H[0]._private.labelBounds.target||d},"getTargetLabelBox"),D=s(function(H,Q){return Q},"isLabelVisibleAtScale"),L=s(function(H){return p(C(H))},"getElementRotationPoint"),P=s(function(H,Q,K){var re=H?H+"-":"";return{x:Q.x+K.pstyle(re+"text-margin-x").pfValue,y:Q.y+K.pstyle(re+"text-margin-y").pfValue}},"addTextMargin"),M=s(function(H,Q,K){var re=H[0]._private.rscratch;return{x:re[Q],y:re[K]}},"getRsPt"),F=s(function(H){return P("",M(H,"labelX","labelY"),H)},"getLabelRotationPoint"),I=s(function(H){return P("source",M(H,"sourceLabelX","sourceLabelY"),H)},"getSourceLabelRotationPoint"),O=s(function(H){return P("target",M(H,"targetLabelX","targetLabelY"),H)},"getTargetLabelRotationPoint"),z=s(function(H){return m(C(H))},"getElementRotationOffset"),N=s(function(H){return m(S(H))},"getSourceLabelRotationOffset"),U=s(function(H){return m(R(H))},"getTargetLabelRotationOffset"),$=s(function(H){var Q=E(H),K=m(E(H));if(H.isNode()){switch(H.pstyle("text-halign").value){case"left":K.x=-Q.w;break;case"right":K.x=0;break}switch(H.pstyle("text-valign").value){case"top":K.y=-Q.h;break;case"bottom":K.y=0;break}}return K},"getLabelRotationOffset"),W=e.data.eleTxrCache=new xx(e,{getKey:y,doesEleInvalidateKey:g,drawElement:k,getBoundingBox:C,getRotationPoint:L,getRotationOffset:z,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),ee=e.data.lblTxrCache=new xx(e,{getKey:v,drawElement:A,getBoundingBox:E,getRotationPoint:F,getRotationOffset:$,isVisible:D}),te=e.data.slbTxrCache=new xx(e,{getKey:x,drawElement:w,getBoundingBox:S,getRotationPoint:I,getRotationOffset:N,isVisible:D}),ce=e.data.tlbTxrCache=new xx(e,{getKey:b,drawElement:T,getBoundingBox:R,getRotationPoint:O,getRotationOffset:U,isVisible:D}),Z=e.data.lyrTxrCache=new gpe(e);e.onUpdateEleCalcs(s(function(H,Q){W.invalidateElements(Q),ee.invalidateElements(Q),te.invalidateElements(Q),ce.invalidateElements(Q),Z.invalidateElements(Q);for(var K=0;K<Q.length;K++){var re=Q[K]._private;re.oldBackgroundTimestamp=re.backgroundTimestamp}},"invalidateTextureCaches"));var fe=s(function(H){for(var Q=0;Q<H.length;Q++)Z.enqueueElementRefinement(H[Q].ele)},"refineInLayers");W.onDequeue(fe),ee.onDequeue(fe),te.onDequeue(fe),ce.onDequeue(fe)}function Spe(t,e,r){var n=r,i=s(function(E){Kr("Can not register `"+e+"` for `"+t+"` since `"+E+"` already exists in the prototype and can not be overridden")},"overrideErr");if(t==="core"){if(Mx.prototype[e])return i(e);Mx.prototype[e]=r}else if(t==="collection"){if(ga.prototype[e])return i(e);ga.prototype[e]=r}else if(t==="layout"){for(var a=s(function(E){this.options=E,r.call(this,E),Er(this._private)||(this._private={}),this._private.cy=E.cy,this._private.listeners=[],this.createEmitter()},"Layout"),o=a.prototype=Object.create(r.prototype),l=[],u=0;u<l.length;u++){var h=l[u];o[h]=o[h]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var f=r.prototype.stop;o.stop=function(){var C=this.options;if(C&&C.animate){var E=this.animations;if(E)for(var S=0;S<E.length;S++)E[S].stop()}return f?f.call(this):this.emit("layoutstop"),this},o.destroy||(o.destroy=function(){return this}),o.cy=function(){return this._private.cy};var d=s(function(E){return E._private.cy},"getCy"),p={addEventFields:s(function(E,S){S.layout=E,S.cy=d(E),S.target=E},"addEventFields"),bubble:s(function(){return!0},"bubble"),parent:s(function(E){return d(E)},"parent")};Pt(o,{createEmitter:s(function(){return this._private.emitter=new d7(p,this),this},"createEmitter"),emitter:s(function(){return this._private.emitter},"emitter"),on:s(function(E,S){return this.emitter().on(E,S),this},"on"),one:s(function(E,S){return this.emitter().one(E,S),this},"one"),once:s(function(E,S){return this.emitter().one(E,S),this},"once"),removeListener:s(function(E,S){return this.emitter().removeListener(E,S),this},"removeListener"),removeAllListeners:s(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),emit:s(function(E,S){return this.emitter().emit(E,S),this},"emit")}),jr.eventAliasesOn(o),n=a}else if(t==="renderer"&&e!=="null"&&e!=="base"){var m=_pe("renderer","base"),g=m.prototype,y=r,v=r.prototype,x=s(function(){m.apply(this,arguments),y.apply(this,arguments)},"Renderer"),b=x.prototype;for(var k in g){var A=g[k],w=v[k]!=null;if(w)return i(k);b[k]=A}for(var T in v)b[T]=v[T];g.clientFunctions.forEach(function(C){b[C]=b[C]||function(){Jn("Renderer does not implement `renderer."+C+"()` on its prototype")}}),n=x}else if(t==="__proto__"||t==="constructor"||t==="prototype")return Jn(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return Zde({map:Epe,keys:[t,e],value:n})}function _pe(t,e){return Jde({map:Epe,keys:[t,e]})}function Rje(t,e,r,n,i){return Zde({map:Cpe,keys:[t,e,r,n],value:i})}function Mje(t,e,r,n){return Jde({map:Cpe,keys:[t,e,r,n]})}var Ni,Mfe,aVe,Yde,sVe,oVe,Ix,At,Gn,hn,Er,lVe,rt,cVe,HT,oo,Nx,Xde,aP,jde,uVe,gf,hVe,fVe,dVe,pVe,wx,sP,n7,Kde,Ife,Oi,mVe,gVe,yVe,vVe,xVe,bVe,Qde,kVe,Pt,wVe,TVe,EVe,CVe,SVe,_Ve,Zde,Jde,R0,mx,DVe,RVe,MVe,IVe,i7,NVe,AO,OVe,BVe,FVe,$Ve,GVe,qg,e0e,VVe,UVe,ux,WVe,HVe,YVe,jVe,KVe,QVe,Nfe,t0e,eUe,tUe,Ox,Ofe,nUe,iUe,aUe,sUe,Pfe,lUe,cUe,uUe,a7,LO,r0e,fUe,YT,qu,Bg,n0e,gx,i0e,Tx,Ex,dUe,uf,CT,pUe,M0,a0e,mUe,Bfe,gUe,yUe,oP,s0e,XT,Ffe,lP,Jn,o0e,Kr,vUe,Mc,xUe,l0e,bUe,c0e,ya,yf,cP,kUe,Al,ff,wUe,Ic,TUe,EUe,Xg,s7,zfe,Cx,CUe,Px,SUe,_Ue,AUe,LUe,DUe,RUe,MUe,IUe,NUe,OUe,PUe,DO,BUe,FUe,o7,u0e,Fg,zUe,$Ue,GUe,VUe,UUe,ST,uP,h0e,I0,S0,qUe,ji,$g,WUe,Sx,Is,HUe,YUe,XUe,f0e,jUe,BT,FT,$fe,hP,Wg,KUe,d0e,p0e,QUe,ZUe,JUe,eqe,tqe,rqe,Ms,Wu,nqe,jT,KT,iqe,D0,yx,RO,df,_x,aqe,_T,es,m0e,GO,N0,g0e,fP,sqe,VO,oqe,lqe,Gfe,Gg,Vfe,Vg,cqe,UO,uqe,hqe,fqe,dqe,y0e,pqe,mqe,gqe,yqe,vqe,xqe,bqe,Ufe,kqe,wqe,v0e,qfe,Wfe,Tqe,Eqe,hx,Hg,Cqe,dP,QT,MO,x0e,b0e,Sqe,_qe,Aqe,Hfe,Yfe,Lqe,Dqe,Rqe,Mqe,Iqe,Xfe,Nqe,Oqe,Pqe,Bqe,jfe,AT,Fqe,zqe,Kfe,$qe,Gqe,Vqe,Uqe,qqe,Wqe,Qfe,Hqe,Zfe,Yqe,Xqe,jqe,LT,Kqe,DT,Qqe,k0e,w0e,T0e,E0e,Hu,Jfe,C0e,ede,tde,Zqe,jg,qO,O0,Jqe,eWe,c7,tWe,rWe,iWe,aWe,sWe,oWe,lWe,uWe,hWe,IO,rde,dWe,pWe,mWe,yWe,vWe,xWe,bWe,kWe,wWe,TWe,EWe,SWe,AWe,pP,DWe,Ax,MWe,NWe,OWe,PWe,BWe,zWe,$We,GWe,UWe,qWe,HWe,nde,XWe,S0e,u7,QWe,ZWe,eHe,rHe,iHe,sHe,oHe,lHe,cHe,hHe,dHe,h7,gHe,vHe,bHe,wHe,_0e,THe,EHe,CHe,_He,AHe,LHe,DHe,A0e,L0e,MHe,ide,ade,IHe,R0e,M0e,PHe,gP,zHe,GHe,VHe,sde,qHe,WHe,HHe,XHe,jHe,KHe,ZHe,eYe,rYe,iYe,sYe,oYe,lYe,jr,cYe,zT,Tr,rn,ft,WO,uYe,hYe,fYe,Mg,hf,HO,dYe,pYe,mYe,gYe,yYe,I0e,vYe,xYe,yP,bYe,ei,_n,kYe,wYe,TYe,vf,xf,pf,Vo,Yg,Lx,P0e,CYe,f7,Ll,B0e,F0e,ode,SYe,Ug,kf,Go,_l,_0,fx,RT,OO,_Ye,AYe,z0e,$0e,lde,Dx,cde,ude,LYe,vx,Bx,G0e,DYe,RYe,MYe,IYe,NYe,OYe,PYe,BYe,FYe,hde,zYe,$Ye,GYe,V0e,U0e,VYe,q0e,fde,UYe,bf,W0e,dde,qYe,WYe,IT,H0e,Y0e,zr,HYe,X0e,ZT,YYe,XYe,$T,ma,Jg,jYe,KYe,QYe,ZYe,mf,Da,mde,gde,yde,ga,wn,JYe,tXe,kn,GT,iXe,aXe,NT,K0e,YO,VT,sXe,oXe,XO,UT,Ma,bx,lXe,Fx,bP,Nc,g7,kP,pa,y7,La,Ra,cXe,uXe,P0,Rx,Mx,JT,hXe,fXe,Og,Ede,dXe,pXe,BO,mXe,gXe,yXe,vXe,xXe,bXe,epe,kXe,wXe,TXe,Cde,EXe,CXe,e7,SXe,_Xe,AXe,LXe,DXe,RXe,Sde,MXe,IXe,NXe,OXe,PXe,_de,Ade,TP,F0,t7,jO,KO,Rc,$o,Lde,Dde,L0,qT,Uu,E0,A0,Dc,Pg,OT,ape,spe,QO,ZO,Rde,Mde,BXe,FXe,Ia,zx,CP,Oc,cpe,upe,$Xe,hpe,Ide,Nde,x7,b7,fpe,dpe,t1,Xu,$x,Ode,GXe,ppe,r1,FO,mpe,VXe,Pde,PT,WT,JO,UXe,qXe,WXe,HXe,YXe,XXe,jXe,KXe,QXe,ZXe,JXe,eje,tje,rje,zg,nje,xx,Bi,ije,kx,r7,aje,sje,oje,lje,cje,uje,hje,fje,Bde,dje,pje,gpe,va,Fde,mje,ype,zde,Pc,bje,kje,wje,Tje,Eje,zO,ju,vpe,SP,z0,n1,xpe,lo,Cje,wf,Gde,Vde,eP,tP,bpe,C0,Gx,wpe,_je,Fr,Aje,Lje,Dje,Epe,Cpe,rP,Ape,B0,Ije,Yu,Lpe=_(()=>{"use strict";s(Pi,"_typeof");s(nP,"_classCallCheck");s(Dfe,"_defineProperties");s(iP,"_createClass");s(qde,"_defineProperty$1");s(Sl,"_slicedToArray");s(rVe,"_arrayWithHoles");s(nVe,"_iterableToArrayLimit");s(Wde,"_unsupportedIterableToArray");s(Rfe,"_arrayLikeToArray");s(iVe,"_nonIterableRest");s(Hde,"_createForOfIteratorHelper");Ni=typeof window>"u"?null:window,Mfe=Ni?Ni.navigator:null;Ni&&Ni.document;aVe=Pi(""),Yde=Pi({}),sVe=Pi(function(){}),oVe=typeof HTMLElement>"u"?"undefined":Pi(HTMLElement),Ix=s(function(e){return e&&e.instanceString&&Gn(e.instanceString)?e.instanceString():null},"instanceStr"),At=s(function(e){return e!=null&&Pi(e)==aVe},"string"),Gn=s(function(e){return e!=null&&Pi(e)===sVe},"fn"),hn=s(function(e){return!oo(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},"array"),Er=s(function(e){return e!=null&&Pi(e)===Yde&&!hn(e)&&e.constructor===Object},"plainObject"),lVe=s(function(e){return e!=null&&Pi(e)===Yde},"object"),rt=s(function(e){return e!=null&&Pi(e)===Pi(1)&&!isNaN(e)},"number"),cVe=s(function(e){return rt(e)&&Math.floor(e)===e},"integer"),HT=s(function(e){if(oVe!=="undefined")return e!=null&&e instanceof HTMLElement},"htmlElement"),oo=s(function(e){return Nx(e)||Xde(e)},"elementOrCollection"),Nx=s(function(e){return Ix(e)==="collection"&&e._private.single},"element"),Xde=s(function(e){return Ix(e)==="collection"&&!e._private.single},"collection"),aP=s(function(e){return Ix(e)==="core"},"core"),jde=s(function(e){return Ix(e)==="stylesheet"},"stylesheet"),uVe=s(function(e){return Ix(e)==="event"},"event"),gf=s(function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},"emptyString"),hVe=s(function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},"domElement"),fVe=s(function(e){return Er(e)&&rt(e.x1)&&rt(e.x2)&&rt(e.y1)&&rt(e.y2)},"boundingBox"),dVe=s(function(e){return lVe(e)&&Gn(e.then)},"promise"),pVe=s(function(){return Mfe&&Mfe.userAgent.match(/msie|trident|edge/i)},"ms"),wx=s(function(e,r){r||(r=s(function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],o=0;o<arguments.length;o++)a.push(arguments[o]);return a.join("$")},"keyFn"));var n=s(function i(){var a=this,o=arguments,l,u=r.apply(a,o),h=i.cache;return(l=h[u])||(l=h[u]=e.apply(a,o)),l},"memoizedFn");return n.cache={},n},"memoize"),sP=wx(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),n7=wx(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),Kde=wx(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),Ife=s(function(e){return gf(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},"capitalize"),Oi="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",mVe="rgb[a]?\\(("+Oi+"[%]?)\\s*,\\s*("+Oi+"[%]?)\\s*,\\s*("+Oi+"[%]?)(?:\\s*,\\s*("+Oi+"))?\\)",gVe="rgb[a]?\\((?:"+Oi+"[%]?)\\s*,\\s*(?:"+Oi+"[%]?)\\s*,\\s*(?:"+Oi+"[%]?)(?:\\s*,\\s*(?:"+Oi+"))?\\)",yVe="hsl[a]?\\(("+Oi+")\\s*,\\s*("+Oi+"[%])\\s*,\\s*("+Oi+"[%])(?:\\s*,\\s*("+Oi+"))?\\)",vVe="hsl[a]?\\((?:"+Oi+")\\s*,\\s*(?:"+Oi+"[%])\\s*,\\s*(?:"+Oi+"[%])(?:\\s*,\\s*(?:"+Oi+"))?\\)",xVe="\\#[0-9a-fA-F]{3}",bVe="\\#[0-9a-fA-F]{6}",Qde=s(function(e,r){return e<r?-1:e>r?1:0},"ascending"),kVe=s(function(e,r){return-1*Qde(e,r)},"descending"),Pt=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var n=e[r];if(n!=null)for(var i=Object.keys(n),a=0;a<i.length;a++){var o=i[a];t[o]=n[o]}}return t},wVe=s(function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,n,i,a,o=16;return r?(n=parseInt(e[1]+e[1],o),i=parseInt(e[2]+e[2],o),a=parseInt(e[3]+e[3],o)):(n=parseInt(e[1]+e[2],o),i=parseInt(e[3]+e[4],o),a=parseInt(e[5]+e[6],o)),[n,i,a]}},"hex2tuple"),TVe=s(function(e){var r,n,i,a,o,l,u,h;function f(g,y,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?g+(y-g)*6*v:v<1/2?y:v<2/3?g+(y-g)*(2/3-v)*6:g}s(f,"hue2rgb");var d=new RegExp("^"+yVe+"$").exec(e);if(d){if(n=parseInt(d[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(d[2]),i<0||i>100||(i=i/100,a=parseFloat(d[3]),a<0||a>100)||(a=a/100,o=d[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(i===0)l=u=h=Math.round(a*255);else{var p=a<.5?a*(1+i):a+i-a*i,m=2*a-p;l=Math.round(255*f(m,p,n+1/3)),u=Math.round(255*f(m,p,n)),h=Math.round(255*f(m,p,n-1/3))}r=[l,u,h,o]}return r},"hsl2tuple"),EVe=s(function(e){var r,n=new RegExp("^"+mVe+"$").exec(e);if(n){r=[];for(var i=[],a=1;a<=3;a++){var o=n[a];if(o[o.length-1]==="%"&&(i[a]=!0),o=parseFloat(o),i[a]&&(o=o/100*255),o<0||o>255)return;r.push(Math.floor(o))}var l=i[1]||i[2]||i[3],u=i[1]&&i[2]&&i[3];if(l&&!u)return;var h=n[4];if(h!==void 0){if(h=parseFloat(h),h<0||h>1)return;r.push(h)}}return r},"rgb2tuple"),CVe=s(function(e){return _Ve[e.toLowerCase()]},"colorname2tuple"),SVe=s(function(e){return(hn(e)?e:null)||CVe(e)||wVe(e)||EVe(e)||TVe(e)},"color2tuple"),_Ve={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]},Zde=s(function(e){for(var r=e.map,n=e.keys,i=n.length,a=0;a<i;a++){var o=n[a];if(Er(o))throw Error("Tried to set map with object key");a<n.length-1?(r[o]==null&&(r[o]={}),r=r[o]):r[o]=e.value}},"setMap"),Jde=s(function(e){for(var r=e.map,n=e.keys,i=n.length,a=0;a<i;a++){var o=n[a];if(Er(o))throw Error("Tried to get map with object key");if(r=r[o],r==null)return r}return r},"getMap");s(AVe,"isObject");R0=AVe,mx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};s(LVe,"createCommonjsModule");DVe=typeof mx=="object"&&mx&&mx.Object===Object&&mx,RVe=DVe,MVe=typeof self=="object"&&self&&self.Object===Object&&self,IVe=RVe||MVe||Function("return this")(),i7=IVe,NVe=s(function(){return i7.Date.now()},"now"),AO=NVe,OVe=/\s/;s(PVe,"trimmedEndIndex");BVe=PVe,FVe=/^\s+/;s(zVe,"baseTrim");$Ve=zVe,GVe=i7.Symbol,qg=GVe,e0e=Object.prototype,VVe=e0e.hasOwnProperty,UVe=e0e.toString,ux=qg?qg.toStringTag:void 0;s(qVe,"getRawTag");WVe=qVe,HVe=Object.prototype,YVe=HVe.toString;s(XVe,"objectToString");jVe=XVe,KVe="[object Null]",QVe="[object Undefined]",Nfe=qg?qg.toStringTag:void 0;s(ZVe,"baseGetTag");t0e=ZVe;s(JVe,"isObjectLike");eUe=JVe,tUe="[object Symbol]";s(rUe,"isSymbol");Ox=rUe,Ofe=NaN,nUe=/^[-+]0x[0-9a-f]+$/i,iUe=/^0b[01]+$/i,aUe=/^0o[0-7]+$/i,sUe=parseInt;s(oUe,"toNumber");Pfe=oUe,lUe="Expected a function",cUe=Math.max,uUe=Math.min;s(hUe,"debounce");a7=hUe,LO=Ni?Ni.performance:null,r0e=LO&&LO.now?function(){return LO.now()}:function(){return Date.now()},fUe=function(){if(Ni){if(Ni.requestAnimationFrame)return function(t){Ni.requestAnimationFrame(t)};if(Ni.mozRequestAnimationFrame)return function(t){Ni.mozRequestAnimationFrame(t)};if(Ni.webkitRequestAnimationFrame)return function(t){Ni.webkitRequestAnimationFrame(t)};if(Ni.msRequestAnimationFrame)return function(t){Ni.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(r0e())},1e3/60)}}(),YT=s(function(e){return fUe(e)},"requestAnimationFrame"),qu=r0e,Bg=9261,n0e=65599,gx=5381,i0e=s(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Bg,n=r,i;i=e.next(),!i.done;)n=n*n0e+i.value|0;return n},"hashIterableInts"),Tx=s(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Bg;return r*n0e+e|0},"hashInt"),Ex=s(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gx;return(r<<5)+r+e|0},"hashIntAlt"),dUe=s(function(e,r){return e*2097152+r},"combineHashes"),uf=s(function(e){return e[0]*2097152+e[1]},"combineHashesArray"),CT=s(function(e,r){return[Tx(e[0],r[0]),Ex(e[1],r[1])]},"hashArrays"),pUe=s(function(e,r){var n={value:0,done:!1},i=0,a=e.length,o={next:s(function(){return i<a?n.value=e[i++]:n.done=!0,n},"next")};return i0e(o,r)},"hashIntsArray"),M0=s(function(e,r){var n={value:0,done:!1},i=0,a=e.length,o={next:s(function(){return i<a?n.value=e.charCodeAt(i++):n.done=!0,n},"next")};return i0e(o,r)},"hashString"),a0e=s(function(){return mUe(arguments)},"hashStrings"),mUe=s(function(e){for(var r,n=0;n<e.length;n++){var i=e[n];n===0?r=M0(i):r=M0(i,r)}return r},"hashStringsArray"),Bfe=!0,gUe=console.warn!=null,yUe=console.trace!=null,oP=Number.MAX_SAFE_INTEGER||9007199254740991,s0e=s(function(){return!0},"trueify"),XT=s(function(){return!1},"falsify"),Ffe=s(function(){return 0},"zeroify"),lP=s(function(){},"noop"),Jn=s(function(e){throw new Error(e)},"error"),o0e=s(function(e){if(e!==void 0)Bfe=!!e;else return Bfe},"warnings"),Kr=s(function(e){o0e()&&(gUe?console.warn(e):(console.log(e),yUe&&console.trace()))},"warn"),vUe=s(function(e){return Pt({},e)},"clone"),Mc=s(function(e){return e==null?e:hn(e)?e.slice():Er(e)?vUe(e):e},"copy"),xUe=s(function(e){return e.slice()},"copyArray"),l0e=s(function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},"uuid"),bUe={},c0e=s(function(){return bUe},"staticEmptyObject"),ya=s(function(e){var r=Object.keys(e);return function(n){for(var i={},a=0;a<r.length;a++){var o=r[a],l=n?.[o];i[o]=l===void 0?e[o]:l}return i}},"defaults"),yf=s(function(e,r,n){for(var i=e.length-1;i>=0&&!(e[i]===r&&(e.splice(i,1),n));i--);},"removeFromArray"),cP=s(function(e){e.splice(0,e.length)},"clearArray"),kUe=s(function(e,r){for(var n=0;n<r.length;n++){var i=r[n];e.push(i)}},"push"),Al=s(function(e,r,n){return n&&(r=Kde(n,r)),e[r]},"getPrefixedProperty"),ff=s(function(e,r,n,i){n&&(r=Kde(n,r)),e[r]=i},"setPrefixedProperty"),wUe=function(){function t(){nP(this,t),this._obj={}}return s(t,"ObjectMap"),iP(t,[{key:"set",value:s(function(r,n){return this._obj[r]=n,this},"set")},{key:"delete",value:s(function(r){return this._obj[r]=void 0,this},"_delete")},{key:"clear",value:s(function(){this._obj={}},"clear")},{key:"has",value:s(function(r){return this._obj[r]!==void 0},"has")},{key:"get",value:s(function(r){return this._obj[r]},"get")}]),t}(),Ic=typeof Map<"u"?Map:wUe,TUe="undefined",EUe=function(){function t(e){if(nP(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var n=0;n<r.length;n++)this.add(r[n])}}return s(t,"ObjectSet"),iP(t,[{key:"instanceString",value:s(function(){return"set"},"instanceString")},{key:"add",value:s(function(r){var n=this._obj;n[r]!==1&&(n[r]=1,this.size++)},"add")},{key:"delete",value:s(function(r){var n=this._obj;n[r]===1&&(n[r]=0,this.size--)},"_delete")},{key:"clear",value:s(function(){this._obj=Object.create(null)},"clear")},{key:"has",value:s(function(r){return this._obj[r]===1},"has")},{key:"toArray",value:s(function(){var r=this;return Object.keys(this._obj).filter(function(n){return r.has(n)})},"toArray")},{key:"forEach",value:s(function(r,n){return this.toArray().forEach(r,n)},"forEach")}]),t}(),Xg=(typeof Set>"u"?"undefined":Pi(Set))!==TUe?Set:EUe,s7=s(function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!aP(e)){Jn("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"){Jn("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 Xg,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 o=r.renderedPosition,l=e.pan(),u=e.zoom();a.position={x:(o.x-l.x)/u,y:(o.y-l.y)/u}}var h=[];hn(r.classes)?h=r.classes:At(r.classes)&&(h=r.classes.split(/\s+/));for(var f=0,d=h.length;f<d;f++){var p=h[f];!p||p===""||a.classes.add(p)}this.createEmitter();var m=r.style||r.css;m&&(Kr("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(m)),(n===void 0||n)&&this.restore()},"Element"),zfe=s(function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},s(function(n,i,a){var o;Er(n)&&!oo(n)&&(o=n,n=o.roots||o.root,i=o.visit,a=o.directed),a=arguments.length===2&&!Gn(i)?i:a,i=Gn(i)?i:function(){};for(var l=this._private.cy,u=n=At(n)?this.filter(n):n,h=[],f=[],d={},p={},m={},g=0,y,v=this.byGroup(),x=v.nodes,b=v.edges,k=0;k<u.length;k++){var A=u[k],w=A.id();A.isNode()&&(h.unshift(A),e.bfs&&(m[w]=!0,f.push(A)),p[w]=0)}for(var T=s(function(){var P=e.bfs?h.shift():h.pop(),M=P.id();if(e.dfs){if(m[M])return"continue";m[M]=!0,f.push(P)}var F=p[M],I=d[M],O=I!=null?I.source():null,z=I!=null?I.target():null,N=I==null?void 0:P.same(O)?z[0]:O[0],U=void 0;if(U=i(P,I,N,g++,F),U===!0)return y=P,"break";if(U===!1)return"break";for(var $=P.connectedEdges().filter(function(Z){return(!a||Z.source().same(P))&&b.has(Z)}),W=0;W<$.length;W++){var ee=$[W],te=ee.connectedNodes().filter(function(Z){return!Z.same(P)&&x.has(Z)}),ce=te.id();te.length!==0&&!m[ce]&&(te=te[0],h.push(te),e.bfs&&(m[ce]=!0,f.push(te)),d[ce]=ee,p[ce]=p[M]+1)}},"_loop");h.length!==0;){var C=T();if(C!=="continue"&&C==="break")break}for(var E=l.collection(),S=0;S<f.length;S++){var R=f[S],D=d[R.id()];D!=null&&E.push(D),E.push(R)}return{path:l.collection(E),found:l.collection(y)}},"searchFn")},"defineSearch"),Cx={breadthFirstSearch:zfe({bfs:!0}),depthFirstSearch:zfe({dfs:!0})};Cx.bfs=Cx.breadthFirstSearch;Cx.dfs=Cx.depthFirstSearch;CUe=LVe(function(t,e){(function(){var r,n,i,a,o,l,u,h,f,d,p,m,g,y,v;i=Math.floor,d=Math.min,n=s(function(x,b){return x<b?-1:x>b?1:0},"defaultCmp"),f=s(function(x,b,k,A,w){var T;if(k==null&&(k=0),w==null&&(w=n),k<0)throw new Error("lo must be non-negative");for(A==null&&(A=x.length);k<A;)T=i((k+A)/2),w(b,x[T])<0?A=T:k=T+1;return[].splice.apply(x,[k,k-k].concat(b)),b},"insort"),l=s(function(x,b,k){return k==null&&(k=n),x.push(b),y(x,0,x.length-1,k)},"heappush"),o=s(function(x,b){var k,A;return b==null&&(b=n),k=x.pop(),x.length?(A=x[0],x[0]=k,v(x,0,b)):A=k,A},"heappop"),h=s(function(x,b,k){var A;return k==null&&(k=n),A=x[0],x[0]=b,v(x,0,k),A},"heapreplace"),u=s(function(x,b,k){var A;return k==null&&(k=n),x.length&&k(x[0],b)<0&&(A=[x[0],b],b=A[0],x[0]=A[1],v(x,0,k)),b},"heappushpop"),a=s(function(x,b){var k,A,w,T,C,E;for(b==null&&(b=n),T=function(){E=[];for(var S=0,R=i(x.length/2);0<=R?S<R:S>R;0<=R?S++:S--)E.push(S);return E}.apply(this).reverse(),C=[],A=0,w=T.length;A<w;A++)k=T[A],C.push(v(x,k,b));return C},"heapify"),g=s(function(x,b,k){var A;if(k==null&&(k=n),A=x.indexOf(b),A!==-1)return y(x,0,A,k),v(x,A,k)},"updateItem"),p=s(function(x,b,k){var A,w,T,C,E;if(k==null&&(k=n),w=x.slice(0,b),!w.length)return w;for(a(w,k),E=x.slice(b),T=0,C=E.length;T<C;T++)A=E[T],u(w,A,k);return w.sort(k).reverse()},"nlargest"),m=s(function(x,b,k){var A,w,T,C,E,S,R,D,L;if(k==null&&(k=n),b*10<=x.length){if(T=x.slice(0,b).sort(k),!T.length)return T;for(w=T[T.length-1],R=x.slice(b),C=0,S=R.length;C<S;C++)A=R[C],k(A,w)<0&&(f(T,A,0,null,k),T.pop(),w=T[T.length-1]);return T}for(a(x,k),L=[],E=0,D=d(b,x.length);0<=D?E<D:E>D;0<=D?++E:--E)L.push(o(x,k));return L},"nsmallest"),y=s(function(x,b,k,A){var w,T,C;for(A==null&&(A=n),w=x[k];k>b;){if(C=k-1>>1,T=x[C],A(w,T)<0){x[k]=T,k=C;continue}break}return x[k]=w},"_siftdown"),v=s(function(x,b,k){var A,w,T,C,E;for(k==null&&(k=n),w=x.length,E=b,T=x[b],A=2*b+1;A<w;)C=A+1,C<w&&!(k(x[A],x[C])<0)&&(A=C),x[b]=x[A],b=A,A=2*b+1;return x[b]=T,y(x,E,b,k)},"_siftup"),r=function(){x.push=l,x.pop=o,x.replace=h,x.pushpop=u,x.heapify=a,x.updateItem=g,x.nlargest=p,x.nsmallest=m;function x(b){this.cmp=b??n,this.nodes=[]}return s(x,"Heap"),x.prototype.push=function(b){return l(this.nodes,b,this.cmp)},x.prototype.pop=function(){return o(this.nodes,this.cmp)},x.prototype.peek=function(){return this.nodes[0]},x.prototype.contains=function(b){return this.nodes.indexOf(b)!==-1},x.prototype.replace=function(b){return h(this.nodes,b,this.cmp)},x.prototype.pushpop=function(b){return u(this.nodes,b,this.cmp)},x.prototype.heapify=function(){return a(this.nodes,this.cmp)},x.prototype.updateItem=function(b){return g(this.nodes,b,this.cmp)},x.prototype.clear=function(){return this.nodes=[]},x.prototype.empty=function(){return this.nodes.length===0},x.prototype.size=function(){return this.nodes.length},x.prototype.clone=function(){var b;return b=new x,b.nodes=this.nodes.slice(0),b},x.prototype.toArray=function(){return this.nodes.slice(0)},x.prototype.insert=x.prototype.push,x.prototype.top=x.prototype.peek,x.prototype.front=x.prototype.peek,x.prototype.has=x.prototype.contains,x.prototype.copy=x.prototype.clone,x}(),function(x,b){return t.exports=b()}(this,function(){return r})}).call(mx)}),Px=CUe,SUe=ya({root:null,weight:s(function(e){return 1},"weight"),directed:!1}),_Ue={dijkstra:s(function(e){if(!Er(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var n=SUe(e),i=n.root,a=n.weight,o=n.directed,l=this,u=a,h=At(i)?this.filter(i)[0]:i[0],f={},d={},p={},m=this.byGroup(),g=m.nodes,y=m.edges;y.unmergeBy(function(F){return F.isLoop()});for(var v=s(function(I){return f[I.id()]},"getDist"),x=s(function(I,O){f[I.id()]=O,b.updateItem(I)},"setDist"),b=new Px(function(F,I){return v(F)-v(I)}),k=0;k<g.length;k++){var A=g[k];f[A.id()]=A.same(h)?0:1/0,b.push(A)}for(var w=s(function(I,O){for(var z=(o?I.edgesTo(O):I.edgesWith(O)).intersect(y),N=1/0,U,$=0;$<z.length;$++){var W=z[$],ee=u(W);(ee<N||!U)&&(N=ee,U=W)}return{edge:U,dist:N}},"distBetween");b.size()>0;){var T=b.pop(),C=v(T),E=T.id();if(p[E]=C,C!==1/0)for(var S=T.neighborhood().intersect(g),R=0;R<S.length;R++){var D=S[R],L=D.id(),P=w(T,D),M=C+P.dist;M<v(D)&&(x(D,M),d[L]={node:T,edge:P.edge})}}return{distanceTo:s(function(I){var O=At(I)?g.filter(I)[0]:I[0];return p[O.id()]},"distanceTo"),pathTo:s(function(I){var O=At(I)?g.filter(I)[0]:I[0],z=[],N=O,U=N.id();if(O.length>0)for(z.unshift(O);d[U];){var $=d[U];z.unshift($.edge),z.unshift($.node),N=$.node,U=N.id()}return l.spawn(z)},"pathTo")}},"dijkstra")},AUe={kruskal:s(function(e){e=e||function(k){return 1};for(var r=this.byGroup(),n=r.nodes,i=r.edges,a=n.length,o=new Array(a),l=n,u=s(function(A){for(var w=0;w<o.length;w++){var T=o[w];if(T.has(A))return w}},"findSetIndex"),h=0;h<a;h++)o[h]=this.spawn(n[h]);for(var f=i.sort(function(k,A){return e(k)-e(A)}),d=0;d<f.length;d++){var p=f[d],m=p.source()[0],g=p.target()[0],y=u(m),v=u(g),x=o[y],b=o[v];y!==v&&(l.merge(p),x.merge(b),o.splice(v,1))}return l},"kruskal")},LUe=ya({root:null,goal:null,weight:s(function(e){return 1},"weight"),heuristic:s(function(e){return 0},"heuristic"),directed:!1}),DUe={aStar:s(function(e){var r=this.cy(),n=LUe(e),i=n.root,a=n.goal,o=n.heuristic,l=n.directed,u=n.weight;i=r.collection(i)[0],a=r.collection(a)[0];var h=i.id(),f=a.id(),d={},p={},m={},g=new Px(function(U,$){return p[U.id()]-p[$.id()]}),y=new Xg,v={},x={},b=s(function($,W){g.push($),y.add(W)},"addToOpenSet"),k,A,w=s(function(){k=g.pop(),A=k.id(),y.delete(A)},"popFromOpenSet"),T=s(function($){return y.has($)},"isInOpenSet");b(i,h),d[h]=0,p[h]=o(i);for(var C=0;g.size()>0;){if(w(),C++,A===f){for(var E=[],S=a,R=f,D=x[R];E.unshift(S),D!=null&&E.unshift(D),S=v[R],S!=null;)R=S.id(),D=x[R];return{found:!0,distance:d[A],path:this.spawn(E),steps:C}}m[A]=!0;for(var L=k._private.edges,P=0;P<L.length;P++){var M=L[P];if(this.hasElementWithId(M.id())&&!(l&&M.data("source")!==A)){var F=M.source(),I=M.target(),O=F.id()!==A?F:I,z=O.id();if(this.hasElementWithId(z)&&!m[z]){var N=d[A]+u(M);if(!T(z)){d[z]=N,p[z]=N+o(O),b(O,z),v[z]=k,x[z]=M;continue}N<d[z]&&(d[z]=N,p[z]=N+o(O),v[z]=k,x[z]=M)}}}}return{found:!1,distance:void 0,path:void 0,steps:C}},"aStar")},RUe=ya({weight:s(function(e){return 1},"weight"),directed:!1}),MUe={floydWarshall:s(function(e){for(var r=this.cy(),n=RUe(e),i=n.weight,a=n.directed,o=i,l=this.byGroup(),u=l.nodes,h=l.edges,f=u.length,d=f*f,p=s(function(ee){return u.indexOf(ee)},"indexOf"),m=s(function(ee){return u[ee]},"atIndex"),g=new Array(d),y=0;y<d;y++){var v=y%f,x=(y-v)/f;x===v?g[y]=0:g[y]=1/0}for(var b=new Array(d),k=new Array(d),A=0;A<h.length;A++){var w=h[A],T=w.source()[0],C=w.target()[0];if(T!==C){var E=p(T),S=p(C),R=E*f+S,D=o(w);if(g[R]>D&&(g[R]=D,b[R]=S,k[R]=w),!a){var L=S*f+E;!a&&g[L]>D&&(g[L]=D,b[L]=E,k[L]=w)}}}for(var P=0;P<f;P++)for(var M=0;M<f;M++)for(var F=M*f+P,I=0;I<f;I++){var O=M*f+I,z=P*f+I;g[F]+g[z]<g[O]&&(g[O]=g[F]+g[z],b[O]=b[F])}var N=s(function(ee){return(At(ee)?r.filter(ee):ee)[0]},"getArgEle"),U=s(function(ee){return p(N(ee))},"indexOfArgEle"),$={distance:s(function(ee,te){var ce=U(ee),Z=U(te);return g[ce*f+Z]},"distance"),path:s(function(ee,te){var ce=U(ee),Z=U(te),fe=m(ce);if(ce===Z)return fe.collection();if(b[ce*f+Z]==null)return r.collection();var ne=r.collection(),H=ce,Q;for(ne.merge(fe);ce!==Z;)H=ce,ce=b[ce*f+Z],Q=k[H*f+ce],ne.merge(Q),ne.merge(m(ce));return ne},"path")};return $},"floydWarshall")},IUe=ya({weight:s(function(e){return 1},"weight"),directed:!1,root:null}),NUe={bellmanFord:s(function(e){var r=this,n=IUe(e),i=n.weight,a=n.directed,o=n.root,l=i,u=this,h=this.cy(),f=this.byGroup(),d=f.edges,p=f.nodes,m=p.length,g=new Ic,y=!1,v=[];o=h.collection(o)[0],d.unmergeBy(function(oe){return oe.isLoop()});for(var x=d.length,b=s(function(Re){var Pe=g.get(Re.id());return Pe||(Pe={},g.set(Re.id(),Pe)),Pe},"getInfo"),k=s(function(Re){return(At(Re)?h.$(Re):Re)[0]},"getNodeFromTo"),A=s(function(Re){return b(k(Re)).dist},"distanceTo"),w=s(function(Re){for(var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o,Se=k(Re),Ue=[],Oe=Se;;){if(Oe==null)return r.spawn();var _e=b(Oe),he=_e.edge,q=_e.pred;if(Ue.unshift(Oe[0]),Oe.same(Pe)&&Ue.length>0)break;he!=null&&Ue.unshift(he),Oe=q}return u.spawn(Ue)},"pathTo"),T=0;T<m;T++){var C=p[T],E=b(C);C.same(o)?E.dist=0:E.dist=1/0,E.pred=null,E.edge=null}for(var S=!1,R=s(function(Re,Pe,Se,Ue,Oe,_e){var he=Ue.dist+_e;he<Oe.dist&&!Se.same(Ue.edge)&&(Oe.dist=he,Oe.pred=Re,Oe.edge=Se,S=!0)},"checkForEdgeReplacement"),D=1;D<m;D++){S=!1;for(var L=0;L<x;L++){var P=d[L],M=P.source(),F=P.target(),I=l(P),O=b(M),z=b(F);R(M,F,P,O,z,I),a||R(F,M,P,z,O,I)}if(!S)break}if(S)for(var N=[],U=0;U<x;U++){var $=d[U],W=$.source(),ee=$.target(),te=l($),ce=b(W).dist,Z=b(ee).dist;if(ce+te<Z||!a&&Z+te<ce)if(y||(Kr("Graph contains a negative weight cycle for Bellman-Ford"),y=!0),e.findNegativeWeightCycles!==!1){var fe=[];ce+te<Z&&fe.push(W),!a&&Z+te<ce&&fe.push(ee);for(var ne=fe.length,H=0;H<ne;H++){var Q=fe[H],K=[Q];K.push(b(Q).edge);for(var re=b(Q).pred;K.indexOf(re)===-1;)K.push(re),K.push(b(re).edge),re=b(re).pred;K=K.slice(K.indexOf(re));for(var ie=K[0].id(),ye=0,j=2;j<K.length;j+=2)K[j].id()<ie&&(ie=K[j].id(),ye=j);K=K.slice(ye).concat(K.slice(0,ye)),K.push(K[0]);var De=K.map(function(oe){return oe.id()}).join(",");N.indexOf(De)===-1&&(v.push(u.spawn(K)),N.push(De))}}else break}return{distanceTo:A,pathTo:w,hasNegativeWeightCycle:y,negativeWeightCycles:v}},"bellmanFord")},OUe=Math.sqrt(2),PUe=s(function(e,r,n){n.length===0&&Jn("Karger-Stein must be run on a connected (sub)graph");for(var i=n[e],a=i[1],o=i[2],l=r[a],u=r[o],h=n,f=h.length-1;f>=0;f--){var d=h[f],p=d[1],m=d[2];(r[p]===l&&r[m]===u||r[p]===u&&r[m]===l)&&h.splice(f,1)}for(var g=0;g<h.length;g++){var y=h[g];y[1]===u?(h[g]=y.slice(),h[g][1]=l):y[2]===u&&(h[g]=y.slice(),h[g][2]=l)}for(var v=0;v<r.length;v++)r[v]===u&&(r[v]=l);return h},"collapse"),DO=s(function(e,r,n,i){for(;n>i;){var a=Math.floor(Math.random()*r.length);r=PUe(a,e,r),n--}return r},"contractUntil"),BUe={kargerStein:s(function(){var e=this,r=this.byGroup(),n=r.nodes,i=r.edges;i.unmergeBy(function(z){return z.isLoop()});var a=n.length,o=i.length,l=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),u=Math.floor(a/OUe);if(a<2){Jn("At least 2 nodes are required for Karger-Stein algorithm");return}for(var h=[],f=0;f<o;f++){var d=i[f];h.push([f,n.indexOf(d.source()),n.indexOf(d.target())])}for(var p=1/0,m=[],g=new Array(a),y=new Array(a),v=new Array(a),x=s(function(N,U){for(var $=0;$<a;$++)U[$]=N[$]},"copyNodesMap"),b=0;b<=l;b++){for(var k=0;k<a;k++)y[k]=k;var A=DO(y,h.slice(),a,u),w=A.slice();x(y,v);var T=DO(y,A,u,2),C=DO(v,w,u,2);T.length<=C.length&&T.length<p?(p=T.length,m=T,x(y,g)):C.length<=T.length&&C.length<p&&(p=C.length,m=C,x(v,g))}for(var E=this.spawn(m.map(function(z){return i[z[0]]})),S=this.spawn(),R=this.spawn(),D=g[0],L=0;L<g.length;L++){var P=g[L],M=n[L];P===D?S.merge(M):R.merge(M)}var F=s(function(N){var U=e.spawn();return N.forEach(function($){U.merge($),$.connectedEdges().forEach(function(W){e.contains(W)&&!E.contains(W)&&U.merge(W)})}),U},"constructComponent"),I=[F(S),F(R)],O={cut:E,components:I,partition1:S,partition2:R};return O},"kargerStein")},FUe=s(function(e){return{x:e.x,y:e.y}},"copyPosition"),o7=s(function(e,r,n){return{x:e.x*r+n.x,y:e.y*r+n.y}},"modelToRenderedPosition"),u0e=s(function(e,r,n){return{x:(e.x-n.x)/r,y:(e.y-n.y)/r}},"renderedToModelPosition"),Fg=s(function(e){return{x:e[0],y:e[1]}},"array2point"),zUe=s(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=1/0,a=r;a<n;a++){var o=e[a];isFinite(o)&&(i=Math.min(o,i))}return i},"min"),$Ue=s(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=-1/0,a=r;a<n;a++){var o=e[a];isFinite(o)&&(i=Math.max(o,i))}return i},"max"),GUe=s(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=0,a=0,o=r;o<n;o++){var l=e[o];isFinite(l)&&(i+=l,a++)}return i/a},"mean"),VUe=s(function(e){var r=arguments.length>1&&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,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?e=e.slice(r,n):(n<e.length&&e.splice(n,e.length-n),r>0&&e.splice(0,r));for(var l=0,u=e.length-1;u>=0;u--){var h=e[u];o?isFinite(h)||(e[u]=-1/0,l++):e.splice(u,1)}a&&e.sort(function(p,m){return p-m});var f=e.length,d=Math.floor(f/2);return f%2!==0?e[d+1+l]:(e[d-1+l]+e[d+l])/2},"median"),UUe=s(function(e){return Math.PI*e/180},"deg2rad"),ST=s(function(e,r){return Math.atan2(r,e)-Math.PI/2},"getAngleFromDisp"),uP=Math.log2||function(t){return Math.log(t)/Math.log(2)},h0e=s(function(e){return e>0?1:e<0?-1:0},"signum"),I0=s(function(e,r){return Math.sqrt(S0(e,r))},"dist"),S0=s(function(e,r){var n=r.x-e.x,i=r.y-e.y;return n*n+i*i},"sqdist"),qUe=s(function(e){for(var r=e.length,n=0,i=0;i<r;i++)n+=e[i];for(var a=0;a<r;a++)e[a]=e[a]/n;return e},"inPlaceSumNormalize"),ji=s(function(e,r,n,i){return(1-i)*(1-i)*e+2*(1-i)*i*r+i*i*n},"qbezierAt"),$g=s(function(e,r,n,i){return{x:ji(e.x,r.x,n.x,i),y:ji(e.y,r.y,n.y,i)}},"qbezierPtAt"),WUe=s(function(e,r,n,i){var a={x:r.x-e.x,y:r.y-e.y},o=I0(e,r),l={x:a.x/o,y:a.y/o};return n=n??0,i=i??n*o,{x:e.x+l.x*i,y:e.y+l.y*i}},"lineAt"),Sx=s(function(e,r,n){return Math.max(e,Math.min(n,r))},"bound"),Is=s(function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=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}}},"makeBoundingBox"),HUe=s(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),YUe=s(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},"clearBoundingBox"),XUe=s(function(e,r,n){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+n,y2:e.y2+n,w:e.w,h:e.h}},"shiftBoundingBox"),f0e=s(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},"updateBoundingBox"),jUe=s(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},"expandBoundingBoxByPoint"),BT=s(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},"expandBoundingBox"),FT=s(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,o;if(r.length===1)n=i=a=o=r[0];else if(r.length===2)n=a=r[0],o=i=r[1];else if(r.length===4){var l=Sl(r,4);n=l[0],i=l[1],a=l[2],o=l[3]}return e.x1-=o,e.x2+=i,e.y1-=n,e.y2+=a,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBoxSides"),$fe=s(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},"assignBoundingBox"),hP=s(function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},"boundingBoxesIntersect"),Wg=s(function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},"inBoundingBox"),KUe=s(function(e,r){return Wg(e,r.x,r.y)},"pointInBoundingBox"),d0e=s(function(e,r){return Wg(e,r.x1,r.y1)&&Wg(e,r.x2,r.y2)},"boundingBoxInBoundingBox"),p0e=s(function(e,r,n,i,a,o,l){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",h=u==="auto"?N0(a,o):u,f=a/2,d=o/2;h=Math.min(h,f,d);var p=h!==f,m=h!==d,g;if(p){var y=n-f+h-l,v=i-d-l,x=n+f-h+l,b=v;if(g=df(e,r,n,i,y,v,x,b,!1),g.length>0)return g}if(m){var k=n+f+l,A=i-d+h-l,w=k,T=i+d-h+l;if(g=df(e,r,n,i,k,A,w,T,!1),g.length>0)return g}if(p){var C=n-f+h-l,E=i+d+l,S=n+f-h+l,R=E;if(g=df(e,r,n,i,C,E,S,R,!1),g.length>0)return g}if(m){var D=n-f-l,L=i-d+h-l,P=D,M=i+d-h+l;if(g=df(e,r,n,i,D,L,P,M,!1),g.length>0)return g}var F;{var I=n-f+h,O=i-d+h;if(F=yx(e,r,n,i,I,O,h+l),F.length>0&&F[0]<=I&&F[1]<=O)return[F[0],F[1]]}{var z=n+f-h,N=i-d+h;if(F=yx(e,r,n,i,z,N,h+l),F.length>0&&F[0]>=z&&F[1]<=N)return[F[0],F[1]]}{var U=n+f-h,$=i+d-h;if(F=yx(e,r,n,i,U,$,h+l),F.length>0&&F[0]>=U&&F[1]>=$)return[F[0],F[1]]}{var W=n-f+h,ee=i+d-h;if(F=yx(e,r,n,i,W,ee,h+l),F.length>0&&F[0]<=W&&F[1]>=ee)return[F[0],F[1]]}return[]},"roundRectangleIntersectLine"),QUe=s(function(e,r,n,i,a,o,l){var u=l,h=Math.min(n,a),f=Math.max(n,a),d=Math.min(i,o),p=Math.max(i,o);return h-u<=e&&e<=f+u&&d-u<=r&&r<=p+u},"inLineVicinity"),ZUe=s(function(e,r,n,i,a,o,l,u,h){var f={x1:Math.min(n,l,a)-h,x2:Math.max(n,l,a)+h,y1:Math.min(i,u,o)-h,y2:Math.max(i,u,o)+h};return!(e<f.x1||e>f.x2||r<f.y1||r>f.y2)},"inBezierVicinity"),JUe=s(function(e,r,n,i){n-=i;var a=r*r-4*e*n;if(a<0)return[];var o=Math.sqrt(a),l=2*e,u=(-r+o)/l,h=(-r-o)/l;return[u,h]},"solveQuadratic"),eqe=s(function(e,r,n,i,a){var o=1e-5;e===0&&(e=o),r/=e,n/=e,i/=e;var l,u,h,f,d,p,m,g;if(u=(3*n-r*r)/9,h=-(27*i)+r*(9*n-2*(r*r)),h/=54,l=u*u*u+h*h,a[1]=0,m=r/3,l>0){d=h+Math.sqrt(l),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),p=h-Math.sqrt(l),p=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),a[0]=-m+d+p,m+=(d+p)/2,a[4]=a[2]=-m,m=Math.sqrt(3)*(-p+d)/2,a[3]=m,a[5]=-m;return}if(a[5]=a[3]=0,l===0){g=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),a[0]=-m+2*g,a[4]=a[2]=-(g+m);return}u=-u,f=u*u*u,f=Math.acos(h/Math.sqrt(f)),g=2*Math.sqrt(u),a[0]=-m+g*Math.cos(f/3),a[2]=-m+g*Math.cos((f+2*Math.PI)/3),a[4]=-m+g*Math.cos((f+4*Math.PI)/3)},"solveCubic"),tqe=s(function(e,r,n,i,a,o,l,u){var h=1*n*n-4*n*a+2*n*l+4*a*a-4*a*l+l*l+i*i-4*i*o+2*i*u+4*o*o-4*o*u+u*u,f=1*9*n*a-3*n*n-3*n*l-6*a*a+3*a*l+9*i*o-3*i*i-3*i*u-6*o*o+3*o*u,d=1*3*n*n-6*n*a+n*l-n*e+2*a*a+2*a*e-l*e+3*i*i-6*i*o+i*u-i*r+2*o*o+2*o*r-u*r,p=1*n*a-n*n+n*e-a*e+i*o-i*i+i*r-o*r,m=[];eqe(h,f,d,p,m);for(var g=1e-7,y=[],v=0;v<6;v+=2)Math.abs(m[v+1])<g&&m[v]>=0&&m[v]<=1&&y.push(m[v]);y.push(1),y.push(0);for(var x=-1,b,k,A,w=0;w<y.length;w++)b=Math.pow(1-y[w],2)*n+2*(1-y[w])*y[w]*a+y[w]*y[w]*l,k=Math.pow(1-y[w],2)*i+2*(1-y[w])*y[w]*o+y[w]*y[w]*u,A=Math.pow(b-e,2)+Math.pow(k-r,2),x>=0?A<x&&(x=A):x=A;return x},"sqdistToQuadraticBezier"),rqe=s(function(e,r,n,i,a,o){var l=[e-n,r-i],u=[a-n,o-i],h=u[0]*u[0]+u[1]*u[1],f=l[0]*l[0]+l[1]*l[1],d=l[0]*u[0]+l[1]*u[1],p=d*d/h;return d<0?f:p>h?(e-a)*(e-a)+(r-o)*(r-o):f-p},"sqdistToFiniteLine"),Ms=s(function(e,r,n){for(var i,a,o,l,u,h=0,f=0;f<n.length/2;f++)if(i=n[f*2],a=n[f*2+1],f+1<n.length/2?(o=n[(f+1)*2],l=n[(f+1)*2+1]):(o=n[(f+1-n.length/2)*2],l=n[(f+1-n.length/2)*2+1]),!(i==e&&o==e))if(i>=e&&e>=o||i<=e&&e<=o)u=(e-i)/(o-i)*(l-a)+a,u>r&&h++;else continue;return h%2!==0},"pointInsidePolygonPoints"),Wu=s(function(e,r,n,i,a,o,l,u,h){var f=new Array(n.length),d;u[0]!=null?(d=Math.atan(u[1]/u[0]),u[0]<0?d=d+Math.PI/2:d=-d-Math.PI/2):d=u;for(var p=Math.cos(-d),m=Math.sin(-d),g=0;g<f.length/2;g++)f[g*2]=o/2*(n[g*2]*p-n[g*2+1]*m),f[g*2+1]=l/2*(n[g*2+1]*p+n[g*2]*m),f[g*2]+=i,f[g*2+1]+=a;var y;if(h>0){var v=KT(f,-h);y=jT(v)}else y=f;return Ms(e,r,y)},"pointInsidePolygon"),nqe=s(function(e,r,n,i,a,o,l,u){for(var h=new Array(n.length*2),f=0;f<u.length;f++){var d=u[f];h[f*4+0]=d.startX,h[f*4+1]=d.startY,h[f*4+2]=d.stopX,h[f*4+3]=d.stopY;var p=Math.pow(d.cx-e,2)+Math.pow(d.cy-r,2);if(p<=Math.pow(d.radius,2))return!0}return Ms(e,r,h)},"pointInsideRoundPolygon"),jT=s(function(e){for(var r=new Array(e.length/2),n,i,a,o,l,u,h,f,d=0;d<e.length/4;d++){n=e[d*4],i=e[d*4+1],a=e[d*4+2],o=e[d*4+3],d<e.length/4-1?(l=e[(d+1)*4],u=e[(d+1)*4+1],h=e[(d+1)*4+2],f=e[(d+1)*4+3]):(l=e[0],u=e[1],h=e[2],f=e[3]);var p=df(n,i,a,o,l,u,h,f,!0);r[d*2]=p[0],r[d*2+1]=p[1]}return r},"joinLines"),KT=s(function(e,r){for(var n=new Array(e.length*2),i,a,o,l,u=0;u<e.length/2;u++){i=e[u*2],a=e[u*2+1],u<e.length/2-1?(o=e[(u+1)*2],l=e[(u+1)*2+1]):(o=e[0],l=e[1]);var h=l-a,f=-(o-i),d=Math.sqrt(h*h+f*f),p=h/d,m=f/d;n[u*4]=i+p*r,n[u*4+1]=a+m*r,n[u*4+2]=o+p*r,n[u*4+3]=l+m*r}return n},"expandPolygon"),iqe=s(function(e,r,n,i,a,o){var l=n-e,u=i-r;l/=a,u/=o;var h=Math.sqrt(l*l+u*u),f=h-1;if(f<0)return[];var d=f/h;return[(n-e)*d+e,(i-r)*d+r]},"intersectLineEllipse"),D0=s(function(e,r,n,i,a,o,l){return e-=a,r-=o,e/=n/2+l,r/=i/2+l,e*e+r*r<=1},"checkInEllipse"),yx=s(function(e,r,n,i,a,o,l){var u=[n-e,i-r],h=[e-a,r-o],f=u[0]*u[0]+u[1]*u[1],d=2*(h[0]*u[0]+h[1]*u[1]),p=h[0]*h[0]+h[1]*h[1]-l*l,m=d*d-4*f*p;if(m<0)return[];var g=(-d+Math.sqrt(m))/(2*f),y=(-d-Math.sqrt(m))/(2*f),v=Math.min(g,y),x=Math.max(g,y),b=[];if(v>=0&&v<=1&&b.push(v),x>=0&&x<=1&&b.push(x),b.length===0)return[];var k=b[0]*u[0]+e,A=b[0]*u[1]+r;if(b.length>1){if(b[0]==b[1])return[k,A];var w=b[1]*u[0]+e,T=b[1]*u[1]+r;return[k,A,w,T]}else return[k,A]},"intersectLineCircle"),RO=s(function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},"midOfThree"),df=s(function(e,r,n,i,a,o,l,u,h){var f=e-a,d=n-e,p=l-a,m=r-o,g=i-r,y=u-o,v=p*m-y*f,x=d*m-g*f,b=y*d-p*g;if(b!==0){var k=v/b,A=x/b,w=.001,T=0-w,C=1+w;return T<=k&&k<=C&&T<=A&&A<=C?[e+k*d,r+k*g]:h?[e+k*d,r+k*g]:[]}else return v===0||x===0?RO(e,n,l)===l?[l,u]:RO(e,n,a)===a?[a,o]:RO(a,l,n)===n?[n,i]:[]:[]},"finiteLinesIntersect"),_x=s(function(e,r,n,i,a,o,l,u){var h=[],f,d=new Array(n.length),p=!0;o==null&&(p=!1);var m;if(p){for(var g=0;g<d.length/2;g++)d[g*2]=n[g*2]*o+i,d[g*2+1]=n[g*2+1]*l+a;if(u>0){var y=KT(d,-u);m=jT(y)}else m=d}else m=n;for(var v,x,b,k,A=0;A<m.length/2;A++)v=m[A*2],x=m[A*2+1],A<m.length/2-1?(b=m[(A+1)*2],k=m[(A+1)*2+1]):(b=m[0],k=m[1]),f=df(e,r,i,a,v,x,b,k),f.length!==0&&h.push(f[0],f[1]);return h},"polygonIntersectLine"),aqe=s(function(e,r,n,i,a,o,l,u,h){var f=[],d,p=new Array(n.length*2);h.forEach(function(b,k){k===0?(p[p.length-2]=b.startX,p[p.length-1]=b.startY):(p[k*4-2]=b.startX,p[k*4-1]=b.startY),p[k*4]=b.stopX,p[k*4+1]=b.stopY,d=yx(e,r,i,a,b.cx,b.cy,b.radius),d.length!==0&&f.push(d[0],d[1])});for(var m=0;m<p.length/4;m++)d=df(e,r,i,a,p[m*4],p[m*4+1],p[m*4+2],p[m*4+3],!1),d.length!==0&&f.push(d[0],d[1]);if(f.length>2){for(var g=[f[0],f[1]],y=Math.pow(g[0]-e,2)+Math.pow(g[1]-r,2),v=1;v<f.length/2;v++){var x=Math.pow(f[v*2]-e,2)+Math.pow(f[v*2+1]-r,2);x<=y&&(g[0]=f[v*2],g[1]=f[v*2+1],y=x)}return g}return f},"roundPolygonIntersectLine"),_T=s(function(e,r,n){var i=[e[0]-r[0],e[1]-r[1]],a=Math.sqrt(i[0]*i[0]+i[1]*i[1]),o=(a-n)/a;return o<0&&(o=1e-5),[r[0]+o*i[0],r[1]+o*i[1]]},"shortenIntersection"),es=s(function(e,r){var n=GO(e,r);return n=m0e(n),n},"generateUnitNgonPointsFitToSquare"),m0e=s(function(e){for(var r,n,i=e.length/2,a=1/0,o=1/0,l=-1/0,u=-1/0,h=0;h<i;h++)r=e[2*h],n=e[2*h+1],a=Math.min(a,r),l=Math.max(l,r),o=Math.min(o,n),u=Math.max(u,n);for(var f=2/(l-a),d=2/(u-o),p=0;p<i;p++)r=e[2*p]=e[2*p]*f,n=e[2*p+1]=e[2*p+1]*d,a=Math.min(a,r),l=Math.max(l,r),o=Math.min(o,n),u=Math.max(u,n);if(o<-1)for(var m=0;m<i;m++)n=e[2*m+1]=e[2*m+1]+(-1-o);return e},"fitPolygonToSquare"),GO=s(function(e,r){var n=1/e*2*Math.PI,i=e%2===0?Math.PI/2+n/2:Math.PI/2;i+=r;for(var a=new Array(e*2),o,l=0;l<e;l++)o=l*n+i,a[2*l]=Math.cos(o),a[2*l+1]=Math.sin(-o);return a},"generateUnitNgonPoints"),N0=s(function(e,r){return Math.min(e/4,r/4,8)},"getRoundRectangleRadius"),g0e=s(function(e,r){return Math.min(e/10,r/10,8)},"getRoundPolygonRadius"),fP=s(function(){return 8},"getCutRectangleCornerLength"),sqe=s(function(e,r,n){return[e-2*r+n,2*(r-e),e]},"bezierPtsToQuadCoeff"),VO=s(function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),oqe=ya({dampingFactor:.8,precision:1e-6,iterations:200,weight:s(function(e){return 1},"weight")}),lqe={pageRank:s(function(e){for(var r=oqe(e),n=r.dampingFactor,i=r.precision,a=r.iterations,o=r.weight,l=this._private.cy,u=this.byGroup(),h=u.nodes,f=u.edges,d=h.length,p=d*d,m=f.length,g=new Array(p),y=new Array(d),v=(1-n)/d,x=0;x<d;x++){for(var b=0;b<d;b++){var k=x*d+b;g[k]=0}y[x]=0}for(var A=0;A<m;A++){var w=f[A],T=w.data("source"),C=w.data("target");if(T!==C){var E=h.indexOfId(T),S=h.indexOfId(C),R=o(w),D=S*d+E;g[D]+=R,y[E]+=R}}for(var L=1/d+v,P=0;P<d;P++)if(y[P]===0)for(var M=0;M<d;M++){var F=M*d+P;g[F]=L}else for(var I=0;I<d;I++){var O=I*d+P;g[O]=g[O]/y[P]+v}for(var z=new Array(d),N=new Array(d),U,$=0;$<d;$++)z[$]=1;for(var W=0;W<a;W++){for(var ee=0;ee<d;ee++)N[ee]=0;for(var te=0;te<d;te++)for(var ce=0;ce<d;ce++){var Z=te*d+ce;N[te]+=g[Z]*z[ce]}qUe(N),U=z,z=N,N=U;for(var fe=0,ne=0;ne<d;ne++){var H=U[ne]-z[ne];fe+=H*H}if(fe<i)break}var Q={rank:s(function(re){return re=l.collection(re)[0],z[h.indexOf(re)]},"rank")};return Q},"pageRank")},Gfe=ya({root:null,weight:s(function(e){return 1},"weight"),directed:!1,alpha:0}),Gg={degreeCentralityNormalized:s(function(e){e=Gfe(e);var r=this.cy(),n=this.nodes(),i=n.length;if(e.directed){for(var f={},d={},p=0,m=0,g=0;g<i;g++){var y=n[g],v=y.id();e.root=y;var x=this.degreeCentrality(e);p<x.indegree&&(p=x.indegree),m<x.outdegree&&(m=x.outdegree),f[v]=x.indegree,d[v]=x.outdegree}return{indegree:s(function(k){return p==0?0:(At(k)&&(k=r.filter(k)),f[k.id()]/p)},"indegree"),outdegree:s(function(k){return m===0?0:(At(k)&&(k=r.filter(k)),d[k.id()]/m)},"outdegree")}}else{for(var a={},o=0,l=0;l<i;l++){var u=n[l];e.root=u;var h=this.degreeCentrality(e);o<h.degree&&(o=h.degree),a[u.id()]=h.degree}return{degree:s(function(k){return o===0?0:(At(k)&&(k=r.filter(k)),a[k.id()]/o)},"degree")}}},"degreeCentralityNormalized"),degreeCentrality:s(function(e){e=Gfe(e);var r=this.cy(),n=this,i=e,a=i.root,o=i.weight,l=i.directed,u=i.alpha;if(a=r.collection(a)[0],l){for(var m=a.connectedEdges(),g=m.filter(function(T){return T.target().same(a)&&n.has(T)}),y=m.filter(function(T){return T.source().same(a)&&n.has(T)}),v=g.length,x=y.length,b=0,k=0,A=0;A<g.length;A++)b+=o(g[A]);for(var w=0;w<y.length;w++)k+=o(y[w]);return{indegree:Math.pow(v,1-u)*Math.pow(b,u),outdegree:Math.pow(x,1-u)*Math.pow(k,u)}}else{for(var h=a.connectedEdges().intersection(n),f=h.length,d=0,p=0;p<h.length;p++)d+=o(h[p]);return{degree:Math.pow(f,1-u)*Math.pow(d,u)}}},"degreeCentrality")};Gg.dc=Gg.degreeCentrality;Gg.dcn=Gg.degreeCentralityNormalised=Gg.degreeCentralityNormalized;Vfe=ya({harmonic:!0,weight:s(function(){return 1},"weight"),directed:!1,root:null}),Vg={closenessCentralityNormalized:s(function(e){for(var r=Vfe(e),n=r.harmonic,i=r.weight,a=r.directed,o=this.cy(),l={},u=0,h=this.nodes(),f=this.floydWarshall({weight:i,directed:a}),d=0;d<h.length;d++){for(var p=0,m=h[d],g=0;g<h.length;g++)if(d!==g){var y=f.distance(m,h[g]);n?p+=1/y:p+=y}n||(p=1/p),u<p&&(u=p),l[m.id()]=p}return{closeness:s(function(x){return u==0?0:(At(x)?x=o.filter(x)[0].id():x=x.id(),l[x]/u)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:s(function(e){var r=Vfe(e),n=r.root,i=r.weight,a=r.directed,o=r.harmonic;n=this.filter(n)[0];for(var l=this.dijkstra({root:n,weight:i,directed:a}),u=0,h=this.nodes(),f=0;f<h.length;f++){var d=h[f];if(!d.same(n)){var p=l.distanceTo(d);o?u+=1/p:u+=p}}return o?u:1/u},"closenessCentrality")};Vg.cc=Vg.closenessCentrality;Vg.ccn=Vg.closenessCentralityNormalised=Vg.closenessCentralityNormalized;cqe=ya({weight:null,directed:!1}),UO={betweennessCentrality:s(function(e){for(var r=cqe(e),n=r.directed,i=r.weight,a=i!=null,o=this.cy(),l=this.nodes(),u={},h={},f=0,d={set:s(function(k,A){h[k]=A,A>f&&(f=A)},"set"),get:s(function(k){return h[k]},"get")},p=0;p<l.length;p++){var m=l[p],g=m.id();n?u[g]=m.outgoers().nodes():u[g]=m.openNeighborhood().nodes(),d.set(g,0)}for(var y=s(function(k){for(var A=l[k].id(),w=[],T={},C={},E={},S=new Px(function(ce,Z){return E[ce]-E[Z]}),R=0;R<l.length;R++){var D=l[R].id();T[D]=[],C[D]=0,E[D]=1/0}for(C[A]=1,E[A]=0,S.push(A);!S.empty();){var L=S.pop();if(w.push(L),a)for(var P=0;P<u[L].length;P++){var M=u[L][P],F=o.getElementById(L),I=void 0;F.edgesTo(M).length>0?I=F.edgesTo(M)[0]:I=M.edgesTo(F)[0];var O=i(I);M=M.id(),E[M]>E[L]+O&&(E[M]=E[L]+O,S.nodes.indexOf(M)<0?S.push(M):S.updateItem(M),C[M]=0,T[M]=[]),E[M]==E[L]+O&&(C[M]=C[M]+C[L],T[M].push(L))}else for(var z=0;z<u[L].length;z++){var N=u[L][z].id();E[N]==1/0&&(S.push(N),E[N]=E[L]+1),E[N]==E[L]+1&&(C[N]=C[N]+C[L],T[N].push(L))}}for(var U={},$=0;$<l.length;$++)U[l[$].id()]=0;for(;w.length>0;){for(var W=w.pop(),ee=0;ee<T[W].length;ee++){var te=T[W][ee];U[te]=U[te]+C[te]/C[W]*(1+U[W])}W!=l[k].id()&&d.set(W,d.get(W)+U[W])}},"_loop"),v=0;v<l.length;v++)y(v);var x={betweenness:s(function(k){var A=o.collection(k).id();return d.get(A)},"betweenness"),betweennessNormalized:s(function(k){if(f==0)return 0;var A=o.collection(k).id();return d.get(A)/f},"betweennessNormalized")};return x.betweennessNormalised=x.betweennessNormalized,x},"betweennessCentrality")};UO.bc=UO.betweennessCentrality;uqe=ya({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),hqe=s(function(e){return uqe(e)},"setOptions"),fqe=s(function(e,r){for(var n=0,i=0;i<r.length;i++)n+=r[i](e);return n},"getSimilarity"),dqe=s(function(e,r,n){for(var i=0;i<r;i++)e[i*r+i]=n},"addLoops"),y0e=s(function(e,r){for(var n,i=0;i<r;i++){n=0;for(var a=0;a<r;a++)n+=e[a*r+i];for(var o=0;o<r;o++)e[o*r+i]=e[o*r+i]/n}},"normalize"),pqe=s(function(e,r,n){for(var i=new Array(n*n),a=0;a<n;a++){for(var o=0;o<n;o++)i[a*n+o]=0;for(var l=0;l<n;l++)for(var u=0;u<n;u++)i[a*n+u]+=e[a*n+l]*r[l*n+u]}return i},"mmult"),mqe=s(function(e,r,n){for(var i=e.slice(0),a=1;a<n;a++)e=pqe(e,i,r);return e},"expand"),gqe=s(function(e,r,n){for(var i=new Array(r*r),a=0;a<r*r;a++)i[a]=Math.pow(e[a],n);return y0e(i,r),i},"inflate"),yqe=s(function(e,r,n,i){for(var a=0;a<n;a++){var o=Math.round(e[a]*Math.pow(10,i))/Math.pow(10,i),l=Math.round(r[a]*Math.pow(10,i))/Math.pow(10,i);if(o!==l)return!1}return!0},"hasConverged"),vqe=s(function(e,r,n,i){for(var a=[],o=0;o<r;o++){for(var l=[],u=0;u<r;u++)Math.round(e[o*r+u]*1e3)/1e3>0&&l.push(n[u]);l.length!==0&&a.push(i.collection(l))}return a},"assign"),xqe=s(function(e,r){for(var n=0;n<e.length;n++)if(!r[n]||e[n].id()!==r[n].id())return!1;return!0},"isDuplicate"),bqe=s(function(e){for(var r=0;r<e.length;r++)for(var n=0;n<e.length;n++)r!=n&&xqe(e[r],e[n])&&e.splice(n,1);return e},"removeDuplicates"),Ufe=s(function(e){for(var r=this.nodes(),n=this.edges(),i=this.cy(),a=hqe(e),o={},l=0;l<r.length;l++)o[r[l].id()]=l;for(var u=r.length,h=u*u,f=new Array(h),d,p=0;p<h;p++)f[p]=0;for(var m=0;m<n.length;m++){var g=n[m],y=o[g.source().id()],v=o[g.target().id()],x=fqe(g,a.attributes);f[y*u+v]+=x,f[v*u+y]+=x}dqe(f,u,a.multFactor),y0e(f,u);for(var b=!0,k=0;b&&k<a.maxIterations;)b=!1,d=mqe(f,u,a.expandFactor),f=gqe(d,u,a.inflateFactor),yqe(f,d,h,4)||(b=!0),k++;var A=vqe(f,u,r,i);return A=bqe(A),A},"markovClustering"),kqe={markovClustering:Ufe,mcl:Ufe},wqe=s(function(e){return e},"identity"),v0e=s(function(e,r){return Math.abs(r-e)},"absDiff"),qfe=s(function(e,r,n){return e+v0e(r,n)},"addAbsDiff"),Wfe=s(function(e,r,n){return e+Math.pow(n-r,2)},"addSquaredDiff"),Tqe=s(function(e){return Math.sqrt(e)},"sqrt"),Eqe=s(function(e,r,n){return Math.max(e,v0e(r,n))},"maxAbsDiff"),hx=s(function(e,r,n,i,a){for(var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:wqe,l=i,u,h,f=0;f<e;f++)u=r(f),h=n(f),l=a(l,u,h);return o(l)},"getDistance"),Hg={euclidean:s(function(e,r,n){return e>=2?hx(e,r,n,0,Wfe,Tqe):hx(e,r,n,0,qfe)},"euclidean"),squaredEuclidean:s(function(e,r,n){return hx(e,r,n,0,Wfe)},"squaredEuclidean"),manhattan:s(function(e,r,n){return hx(e,r,n,0,qfe)},"manhattan"),max:s(function(e,r,n){return hx(e,r,n,-1/0,Eqe)},"max")};Hg["squared-euclidean"]=Hg.squaredEuclidean;Hg.squaredeuclidean=Hg.squaredEuclidean;s(l7,"clusteringDistance");Cqe=ya({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),dP=s(function(e){return Cqe(e)},"setOptions"),QT=s(function(e,r,n,i,a){var o=a!=="kMedoids",l=o?function(d){return n[d]}:function(d){return i[d](n)},u=s(function(p){return i[p](r)},"getQ"),h=n,f=r;return l7(e,i.length,l,u,h,f)},"getDist"),MO=s(function(e,r,n){for(var i=n.length,a=new Array(i),o=new Array(i),l=new Array(r),u=null,h=0;h<i;h++)a[h]=e.min(n[h]).value,o[h]=e.max(n[h]).value;for(var f=0;f<r;f++){u=[];for(var d=0;d<i;d++)u[d]=Math.random()*(o[d]-a[d])+a[d];l[f]=u}return l},"randomCentroids"),x0e=s(function(e,r,n,i,a){for(var o=1/0,l=0,u=0;u<r.length;u++){var h=QT(n,e,r[u],i,a);h<o&&(o=h,l=u)}return l},"classify"),b0e=s(function(e,r,n){for(var i=[],a=null,o=0;o<r.length;o++)a=r[o],n[a.id()]===e&&i.push(a);return i},"buildCluster"),Sqe=s(function(e,r,n){return Math.abs(r-e)<=n},"haveValuesConverged"),_qe=s(function(e,r,n){for(var i=0;i<e.length;i++)for(var a=0;a<e[i].length;a++){var o=Math.abs(e[i][a]-r[i][a]);if(o>n)return!1}return!0},"haveMatricesConverged"),Aqe=s(function(e,r,n){for(var i=0;i<n;i++)if(e===r[i])return!0;return!1},"seenBefore"),Hfe=s(function(e,r){var n=new Array(r);if(e.length<50)for(var i=0;i<r;i++){for(var a=e[Math.floor(Math.random()*e.length)];Aqe(a,n,i);)a=e[Math.floor(Math.random()*e.length)];n[i]=a}else for(var o=0;o<r;o++)n[o]=e[Math.floor(Math.random()*e.length)];return n},"randomMedoids"),Yfe=s(function(e,r,n){for(var i=0,a=0;a<r.length;a++)i+=QT("manhattan",r[a],e,n,"kMedoids");return i},"findCost"),Lqe=s(function(e){var r=this.cy(),n=this.nodes(),i=null,a=dP(e),o=new Array(a.k),l={},u;a.testMode?typeof a.testCentroids=="number"?(a.testCentroids,u=MO(n,a.k,a.attributes)):Pi(a.testCentroids)==="object"?u=a.testCentroids:u=MO(n,a.k,a.attributes):u=MO(n,a.k,a.attributes);for(var h=!0,f=0;h&&f<a.maxIterations;){for(var d=0;d<n.length;d++)i=n[d],l[i.id()]=x0e(i,u,a.distance,a.attributes,"kMeans");h=!1;for(var p=0;p<a.k;p++){var m=b0e(p,n,l);if(m.length!==0){for(var g=a.attributes.length,y=u[p],v=new Array(g),x=new Array(g),b=0;b<g;b++){x[b]=0;for(var k=0;k<m.length;k++)i=m[k],x[b]+=a.attributes[b](i);v[b]=x[b]/m.length,Sqe(v[b],y[b],a.sensitivityThreshold)||(h=!0)}u[p]=v,o[p]=r.collection(m)}}f++}return o},"kMeans"),Dqe=s(function(e){var r=this.cy(),n=this.nodes(),i=null,a=dP(e),o=new Array(a.k),l,u={},h,f=new Array(a.k);a.testMode?typeof a.testCentroids=="number"||(Pi(a.testCentroids)==="object"?l=a.testCentroids:l=Hfe(n,a.k)):l=Hfe(n,a.k);for(var d=!0,p=0;d&&p<a.maxIterations;){for(var m=0;m<n.length;m++)i=n[m],u[i.id()]=x0e(i,l,a.distance,a.attributes,"kMedoids");d=!1;for(var g=0;g<l.length;g++){var y=b0e(g,n,u);if(y.length!==0){f[g]=Yfe(l[g],y,a.attributes);for(var v=0;v<y.length;v++)h=Yfe(y[v],y,a.attributes),h<f[g]&&(f[g]=h,l[g]=y[v],d=!0);o[g]=r.collection(y)}}p++}return o},"kMedoids"),Rqe=s(function(e,r,n,i,a){for(var o,l,u=0;u<r.length;u++)for(var h=0;h<e.length;h++)i[u][h]=Math.pow(n[u][h],a.m);for(var f=0;f<e.length;f++)for(var d=0;d<a.attributes.length;d++){o=0,l=0;for(var p=0;p<r.length;p++)o+=i[p][f]*a.attributes[d](r[p]),l+=i[p][f];e[f][d]=o/l}},"updateCentroids"),Mqe=s(function(e,r,n,i,a){for(var o=0;o<e.length;o++)r[o]=e[o].slice();for(var l,u,h,f=2/(a.m-1),d=0;d<n.length;d++)for(var p=0;p<i.length;p++){l=0;for(var m=0;m<n.length;m++)u=QT(a.distance,i[p],n[d],a.attributes,"cmeans"),h=QT(a.distance,i[p],n[m],a.attributes,"cmeans"),l+=Math.pow(u/h,f);e[p][d]=1/l}},"updateMembership"),Iqe=s(function(e,r,n,i){for(var a=new Array(n.k),o=0;o<a.length;o++)a[o]=[];for(var l,u,h=0;h<r.length;h++){l=-1/0,u=-1;for(var f=0;f<r[0].length;f++)r[h][f]>l&&(l=r[h][f],u=f);a[u].push(e[h])}for(var d=0;d<a.length;d++)a[d]=i.collection(a[d]);return a},"assign"),Xfe=s(function(e){var r=this.cy(),n=this.nodes(),i=dP(e),a,o,l,u,h;u=new Array(n.length);for(var f=0;f<n.length;f++)u[f]=new Array(i.k);l=new Array(n.length);for(var d=0;d<n.length;d++)l[d]=new Array(i.k);for(var p=0;p<n.length;p++){for(var m=0,g=0;g<i.k;g++)l[p][g]=Math.random(),m+=l[p][g];for(var y=0;y<i.k;y++)l[p][y]=l[p][y]/m}o=new Array(i.k);for(var v=0;v<i.k;v++)o[v]=new Array(i.attributes.length);h=new Array(n.length);for(var x=0;x<n.length;x++)h[x]=new Array(i.k);for(var b=!0,k=0;b&&k<i.maxIterations;)b=!1,Rqe(o,n,l,h,i),Mqe(l,u,o,n,i),_qe(l,u,i.sensitivityThreshold)||(b=!0),k++;return a=Iqe(n,l,i,r),{clusters:a,degreeOfMembership:l}},"fuzzyCMeans"),Nqe={kMeans:Lqe,kMedoids:Dqe,fuzzyCMeans:Xfe,fcm:Xfe},Oqe=ya({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),Pqe={single:"min",complete:"max"},Bqe=s(function(e){var r=Oqe(e),n=Pqe[r.linkage];return n!=null&&(r.linkage=n),r},"setOptions"),jfe=s(function(e,r,n,i,a){for(var o=0,l=1/0,u,h=a.attributes,f=s(function(S,R){return l7(a.distance,h.length,function(D){return h[D](S)},function(D){return h[D](R)},S,R)},"getDist"),d=0;d<e.length;d++){var p=e[d].key,m=n[p][i[p]];m<l&&(o=p,l=m)}if(a.mode==="threshold"&&l>=a.threshold||a.mode==="dendrogram"&&e.length===1)return!1;var g=r[o],y=r[i[o]],v;a.mode==="dendrogram"?v={left:g,right:y,key:g.key}:v={value:g.value.concat(y.value),key:g.key},e[g.index]=v,e.splice(y.index,1),r[g.key]=v;for(var x=0;x<e.length;x++){var b=e[x];g.key===b.key?u=1/0:a.linkage==="min"?(u=n[g.key][b.key],n[g.key][b.key]>n[y.key][b.key]&&(u=n[y.key][b.key])):a.linkage==="max"?(u=n[g.key][b.key],n[g.key][b.key]<n[y.key][b.key]&&(u=n[y.key][b.key])):a.linkage==="mean"?u=(n[g.key][b.key]*g.size+n[y.key][b.key]*y.size)/(g.size+y.size):a.mode==="dendrogram"?u=f(b.value,g.value):u=f(b.value[0],g.value[0]),n[g.key][b.key]=n[b.key][g.key]=u}for(var k=0;k<e.length;k++){var A=e[k].key;if(i[A]===g.key||i[A]===y.key){for(var w=A,T=0;T<e.length;T++){var C=e[T].key;n[A][C]<n[A][w]&&(w=C)}i[A]=w}e[k].index=k}return g.key=y.key=g.index=y.index=null,!0},"mergeClosest"),AT=s(function t(e,r,n){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)))},"getAllChildren"),Fqe=s(function t(e,r){if(!e)return"";if(e.left&&e.right){var n=t(e.left,r),i=t(e.right,r),a=r.add({group:"nodes",data:{id:n+","+i}});return r.add({group:"edges",data:{source:n,target:a.id()}}),r.add({group:"edges",data:{source:i,target:a.id()}}),a.id()}else if(e.value)return e.value.id()},"buildDendrogram"),zqe=s(function t(e,r,n){if(!e)return[];var i=[],a=[],o=[];return r===0?(e.left&&AT(e.left,i),e.right&&AT(e.right,a),o=i.concat(a),[n.collection(o)]):r===1?e.value?[n.collection(e.value)]:(e.left&&AT(e.left,i),e.right&&AT(e.right,a),[n.collection(i),n.collection(a)]):e.value?[n.collection(e.value)]:(e.left&&(i=t(e.left,r-1,n)),e.right&&(a=t(e.right,r-1,n)),i.concat(a))},"buildClustersFromTree"),Kfe=s(function(e){for(var r=this.cy(),n=this.nodes(),i=Bqe(e),a=i.attributes,o=s(function(k,A){return l7(i.distance,a.length,function(w){return a[w](k)},function(w){return a[w](A)},k,A)},"getDist"),l=[],u=[],h=[],f=[],d=0;d<n.length;d++){var p={value:i.mode==="dendrogram"?n[d]:[n[d]],key:d,index:d};l[d]=p,f[d]=p,u[d]=[],h[d]=0}for(var m=0;m<l.length;m++)for(var g=0;g<=m;g++){var y=void 0;i.mode==="dendrogram"?y=m===g?1/0:o(l[m].value,l[g].value):y=m===g?1/0:o(l[m].value[0],l[g].value[0]),u[m][g]=y,u[g][m]=y,y<u[m][h[m]]&&(h[m]=g)}for(var v=jfe(l,f,u,h,i);v;)v=jfe(l,f,u,h,i);var x;return i.mode==="dendrogram"?(x=zqe(l[0],i.dendrogramDepth,r),i.addDendrogram&&Fqe(l[0],r)):(x=new Array(l.length),l.forEach(function(b,k){b.key=b.index=null,x[k]=r.collection(b.value)})),x},"hierarchicalClustering"),$qe={hierarchicalClustering:Kfe,hca:Kfe},Gqe=ya({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Vqe=s(function(e){var r=e.damping,n=e.preference;.5<=r&&r<1||Jn("Damping must range on [0.5, 1). Got: ".concat(r));var i=["median","mean","min","max"];return i.some(function(a){return a===n})||rt(n)||Jn("Preference must be one of [".concat(i.map(function(a){return"'".concat(a,"'")}).join(", "),"] or a number. Got: ").concat(n)),Gqe(e)},"setOptions"),Uqe=s(function(e,r,n,i){var a=s(function(l,u){return i[u](l)},"attr");return-l7(e,i.length,function(o){return a(r,o)},function(o){return a(n,o)},r,n)},"getSimilarity"),qqe=s(function(e,r){var n=null;return r==="median"?n=VUe(e):r==="mean"?n=GUe(e):r==="min"?n=zUe(e):r==="max"?n=$Ue(e):n=r,n},"getPreference"),Wqe=s(function(e,r,n){for(var i=[],a=0;a<e;a++)r[a*e+a]+n[a*e+a]>0&&i.push(a);return i},"findExemplars"),Qfe=s(function(e,r,n){for(var i=[],a=0;a<e;a++){for(var o=-1,l=-1/0,u=0;u<n.length;u++){var h=n[u];r[a*e+h]>l&&(o=h,l=r[a*e+h])}o>0&&i.push(o)}for(var f=0;f<n.length;f++)i[n[f]]=n[f];return i},"assignClusters"),Hqe=s(function(e,r,n){for(var i=Qfe(e,r,n),a=0;a<n.length;a++){for(var o=[],l=0;l<i.length;l++)i[l]===n[a]&&o.push(l);for(var u=-1,h=-1/0,f=0;f<o.length;f++){for(var d=0,p=0;p<o.length;p++)d+=r[o[p]*e+o[f]];d>h&&(u=f,h=d)}n[a]=o[u]}return i=Qfe(e,r,n),i},"assign"),Zfe=s(function(e){for(var r=this.cy(),n=this.nodes(),i=Vqe(e),a={},o=0;o<n.length;o++)a[n[o].id()]=o;var l,u,h,f,d,p;l=n.length,u=l*l,h=new Array(u);for(var m=0;m<u;m++)h[m]=-1/0;for(var g=0;g<l;g++)for(var y=0;y<l;y++)g!==y&&(h[g*l+y]=Uqe(i.distance,n[g],n[y],i.attributes));f=qqe(h,i.preference);for(var v=0;v<l;v++)h[v*l+v]=f;d=new Array(u);for(var x=0;x<u;x++)d[x]=0;p=new Array(u);for(var b=0;b<u;b++)p[b]=0;for(var k=new Array(l),A=new Array(l),w=new Array(l),T=0;T<l;T++)k[T]=0,A[T]=0,w[T]=0;for(var C=new Array(l*i.minIterations),E=0;E<C.length;E++)C[E]=0;var S;for(S=0;S<i.maxIterations;S++){for(var R=0;R<l;R++){for(var D=-1/0,L=-1/0,P=-1,M=0,F=0;F<l;F++)k[F]=d[R*l+F],M=p[R*l+F]+h[R*l+F],M>=D?(L=D,D=M,P=F):M>L&&(L=M);for(var I=0;I<l;I++)d[R*l+I]=(1-i.damping)*(h[R*l+I]-D)+i.damping*k[I];d[R*l+P]=(1-i.damping)*(h[R*l+P]-L)+i.damping*k[P]}for(var O=0;O<l;O++){for(var z=0,N=0;N<l;N++)k[N]=p[N*l+O],A[N]=Math.max(0,d[N*l+O]),z+=A[N];z-=A[O],A[O]=d[O*l+O],z+=A[O];for(var U=0;U<l;U++)p[U*l+O]=(1-i.damping)*Math.min(0,z-A[U])+i.damping*k[U];p[O*l+O]=(1-i.damping)*(z-A[O])+i.damping*k[O]}for(var $=0,W=0;W<l;W++){var ee=p[W*l+W]+d[W*l+W]>0?1:0;C[S%i.minIterations*l+W]=ee,$+=ee}if($>0&&(S>=i.minIterations-1||S==i.maxIterations-1)){for(var te=0,ce=0;ce<l;ce++){w[ce]=0;for(var Z=0;Z<i.minIterations;Z++)w[ce]+=C[Z*l+ce];(w[ce]===0||w[ce]===i.minIterations)&&te++}if(te===l)break}}for(var fe=Wqe(l,d,p),ne=Hqe(l,h,fe),H={},Q=0;Q<fe.length;Q++)H[fe[Q]]=[];for(var K=0;K<n.length;K++){var re=a[n[K].id()],ie=ne[re];ie!=null&&H[ie].push(n[K])}for(var ye=new Array(fe.length),j=0;j<fe.length;j++)ye[j]=r.collection(H[fe[j]]);return ye},"affinityPropagation"),Yqe={affinityPropagation:Zfe,ap:Zfe},Xqe=ya({root:void 0,directed:!1}),jqe={hierholzer:s(function(e){if(!Er(e)){var r=arguments;e={root:r[0],directed:r[1]}}var n=Xqe(e),i=n.root,a=n.directed,o=this,l=!1,u,h,f;i&&(f=At(i)?this.filter(i)[0].id():i[0].id());var d={},p={};a?o.forEach(function(b){var k=b.id();if(b.isNode()){var A=b.indegree(!0),w=b.outdegree(!0),T=A-w,C=w-A;T==1?u?l=!0:u=k:C==1?h?l=!0:h=k:(C>1||T>1)&&(l=!0),d[k]=[],b.outgoers().forEach(function(E){E.isEdge()&&d[k].push(E.id())})}else p[k]=[void 0,b.target().id()]}):o.forEach(function(b){var k=b.id();if(b.isNode()){var A=b.degree(!0);A%2&&(u?h?l=!0:h=k:u=k),d[k]=[],b.connectedEdges().forEach(function(w){return d[k].push(w.id())})}else p[k]=[b.source().id(),b.target().id()]});var m={found:!1,trail:void 0};if(l)return m;if(h&&u)if(a){if(f&&h!=f)return m;f=h}else{if(f&&h!=f&&u!=f)return m;f||(f=h)}else f||(f=o[0].id());var g=s(function(k){for(var A=k,w=[k],T,C,E;d[A].length;)T=d[A].shift(),C=p[T][0],E=p[T][1],A!=E?(d[E]=d[E].filter(function(S){return S!=T}),A=E):!a&&A!=C&&(d[C]=d[C].filter(function(S){return S!=T}),A=C),w.unshift(T),w.unshift(A);return w},"walk"),y=[],v=[];for(v=g(f);v.length!=1;)d[v[0]].length==0?(y.unshift(o.getElementById(v.shift())),y.unshift(o.getElementById(v.shift()))):v=g(v.shift()).concat(v);y.unshift(o.getElementById(v.shift()));for(var x in d)if(d[x].length)return m;return m.found=!0,m.trail=this.spawn(y,!0),m},"hierholzer")},LT=s(function(){var e=this,r={},n=0,i=0,a=[],o=[],l={},u=s(function(p,m){for(var g=o.length-1,y=[],v=e.spawn();o[g].x!=p||o[g].y!=m;)y.push(o.pop().edge),g--;y.push(o.pop().edge),y.forEach(function(x){var b=x.connectedNodes().intersection(e);v.merge(x),b.forEach(function(k){var A=k.id(),w=k.connectedEdges().intersection(e);v.merge(k),r[A].cutVertex?v.merge(w.filter(function(T){return T.isLoop()})):v.merge(w)})}),a.push(v)},"buildComponent"),h=s(function d(p,m,g){p===g&&(i+=1),r[m]={id:n,low:n++,cutVertex:!1};var y=e.getElementById(m).connectedEdges().intersection(e);if(y.size()===0)a.push(e.spawn(e.getElementById(m)));else{var v,x,b,k;y.forEach(function(A){v=A.source().id(),x=A.target().id(),b=v===m?x:v,b!==g&&(k=A.id(),l[k]||(l[k]=!0,o.push({x:m,y:b,edge:A})),b in r?r[m].low=Math.min(r[m].low,r[b].id):(d(p,b,m),r[m].low=Math.min(r[m].low,r[b].low),r[m].id<=r[b].low&&(r[m].cutVertex=!0,u(m,b))))})}},"biconnectedSearch");e.forEach(function(d){if(d.isNode()){var p=d.id();p in r||(i=0,h(p,p),r[p].cutVertex=i>1)}});var f=Object.keys(r).filter(function(d){return r[d].cutVertex}).map(function(d){return e.getElementById(d)});return{cut:e.spawn(f),components:a}},"hopcroftTarjanBiconnected"),Kqe={hopcroftTarjanBiconnected:LT,htbc:LT,htb:LT,hopcroftTarjanBiconnectedComponents:LT},DT=s(function(){var e=this,r={},n=0,i=[],a=[],o=e.spawn(e),l=s(function u(h){a.push(h),r[h]={index:n,low:n++,explored:!1};var f=e.getElementById(h).connectedEdges().intersection(e);if(f.forEach(function(y){var v=y.target().id();v!==h&&(v in r||u(v),r[v].explored||(r[h].low=Math.min(r[h].low,r[v].low)))}),r[h].index===r[h].low){for(var d=e.spawn();;){var p=a.pop();if(d.merge(e.getElementById(p)),r[p].low=r[h].index,r[p].explored=!0,p===h)break}var m=d.edgesWith(d),g=d.merge(m);i.push(g),o=o.difference(g)}},"stronglyConnectedSearch");return e.forEach(function(u){if(u.isNode()){var h=u.id();h in r||l(h)}}),{cut:o,components:i}},"tarjanStronglyConnected"),Qqe={tarjanStronglyConnected:DT,tsc:DT,tscc:DT,tarjanStronglyConnectedComponents:DT},k0e={};[Cx,_Ue,AUe,DUe,MUe,NUe,BUe,lqe,Gg,Vg,UO,kqe,Nqe,$qe,Yqe,jqe,Kqe,Qqe].forEach(function(t){Pt(k0e,t)});w0e=0,T0e=1,E0e=2,Hu=s(function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=w0e,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))},"api");Hu.prototype={fulfill:s(function(e){return Jfe(this,T0e,"fulfillValue",e)},"fulfill"),reject:s(function(e){return Jfe(this,E0e,"rejectReason",e)},"reject"),then:s(function(e,r){var n=this,i=new Hu;return n.onFulfilled.push(tde(e,i,"fulfill")),n.onRejected.push(tde(r,i,"reject")),C0e(n),i.proxy},"then")};Jfe=s(function(e,r,n,i){return e.state===w0e&&(e.state=r,e[n]=i,C0e(e)),e},"deliver"),C0e=s(function(e){e.state===T0e?ede(e,"onFulfilled",e.fulfillValue):e.state===E0e&&ede(e,"onRejected",e.rejectReason)},"execute"),ede=s(function(e,r,n){if(e[r].length!==0){var i=e[r];e[r]=[];var a=s(function(){for(var l=0;l<i.length;l++)i[l](n)},"func");typeof setImmediate=="function"?setImmediate(a):setTimeout(a,0)}},"execute_handlers"),tde=s(function(e,r,n){return function(i){if(typeof e!="function")r[n].call(r,i);else{var a;try{a=e(i)}catch(o){r.reject(o);return}Zqe(r,a)}}},"resolver"),Zqe=s(function t(e,r){if(e===r||e.proxy===r){e.reject(new TypeError("cannot resolve promise with itself"));return}var n;if(Pi(r)==="object"&&r!==null||typeof r=="function")try{n=r.then}catch(a){e.reject(a);return}if(typeof n=="function"){var i=!1;try{n.call(r,function(a){i||(i=!0,a===r?e.reject(new TypeError("circular thenable chain")):t(e,a))},function(a){i||(i=!0,e.reject(a))})}catch(a){i||e.reject(a)}return}e.fulfill(r)},"resolve");Hu.all=function(t){return new Hu(function(e,r){for(var n=new Array(t.length),i=0,a=s(function(u,h){n[u]=h,i++,i===t.length&&e(n)},"fulfill"),o=0;o<t.length;o++)(function(l){var u=t[l],h=u!=null&&u.then!=null;if(h)u.then(function(d){a(l,d)},function(d){r(d)});else{var f=u;a(l,f)}})(o)})};Hu.resolve=function(t){return new Hu(function(e,r){e(t)})};Hu.reject=function(t){return new Hu(function(e,r){r(t)})};jg=typeof Promise<"u"?Promise:Hu,qO=s(function(e,r,n){var i=aP(e),a=!i,o=this._private=Pt({duration:1e3},r,n);if(o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&Gn(o.complete)&&o.completes.push(o.complete),a){var l=e.position();o.startPosition=o.startPosition||{x:l.x,y:l.y},o.startStyle=o.startStyle||e.cy().style().getAnimationStartStyle(e,o.style)}if(i){var u=e.pan();o.startPan={x:u.x,y:u.y},o.startZoom=e.zoom()}this.length=1,this[0]=this},"Animation"),O0=qO.prototype;Pt(O0,{instanceString:s(function(){return"animation"},"instanceString"),hook:s(function(){var e=this._private;if(!e.hooked){var r,n=e.target._private.animation;e.queue?r=n.queue:r=n.current,r.push(this),oo(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},"hook"),play:s(function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},"play"),playing:s(function(){return this._private.playing},"playing"),apply:s(function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},"apply"),applying:s(function(){return this._private.applying},"applying"),pause:s(function(){var e=this._private;return e.playing=!1,e.started=!1,this},"pause"),stop:s(function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},"stop"),rewind:s(function(){return this.progress(0)},"rewind"),fastforward:s(function(){return this.progress(1)},"fastforward"),time:s(function(e){var r=this._private;return e===void 0?r.progress*r.duration:this.progress(e/r.duration)},"time"),progress:s(function(e){var r=this._private,n=r.playing;return e===void 0?r.progress:(n&&this.pause(),r.progress=e,r.started=!1,n&&this.play(),this)},"progress"),completed:s(function(){return this._private.progress===1},"completed"),reverse:s(function(){var e=this._private,r=e.playing;r&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=s(function(h,f){var d=e[h];d!=null&&(e[h]=e[f],e[f]=d)},"swap");if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var i=0;i<e.style.length;i++){var a=e.style[i],o=a.name,l=e.startStyle[o];e.startStyle[o]=a,e.style[i]=l}return r&&this.play(),this},"reverse"),promise:s(function(e){var r=this._private,n;switch(e){case"frame":n=r.frames;break;default:case"complete":case"completed":n=r.completes}return new jg(function(i,a){n.push(function(){i()})})},"promise")});O0.complete=O0.completed;O0.run=O0.play;O0.running=O0.playing;Jqe={animated:s(function(){return s(function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return!1;var o=i[0];if(o)return o._private.animation.current.length>0},"animatedImpl")},"animated"),clearQueue:s(function(){return s(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 o=0;o<i.length;o++){var l=i[o];l._private.animation.queue=[]}return this},"clearQueueImpl")},"clearQueue"),delay:s(function(){return s(function(r,n){var i=this._private.cy||this;return i.styleEnabled()?this.animate({delay:r,duration:r,complete:n}):this},"delayImpl")},"delay"),delayAnimation:s(function(){return s(function(r,n){var i=this._private.cy||this;return i.styleEnabled()?this.animation({delay:r,duration:r,complete:n}):this},"delayAnimationImpl")},"delayAnimation"),animation:s(function(){return s(function(r,n){var i=this,a=i.length!==void 0,o=a?i:[i],l=this._private.cy||this,u=!a,h=!u;if(!l.styleEnabled())return this;var f=l.style();r=Pt({},r,n);var d=Object.keys(r).length===0;if(d)return new qO(o[0],r);switch(r.duration===void 0&&(r.duration=400),r.duration){case"slow":r.duration=600;break;case"fast":r.duration=200;break}if(h&&(r.style=f.getPropsList(r.style||r.css),r.css=void 0),h&&r.renderedPosition!=null){var p=r.renderedPosition,m=l.pan(),g=l.zoom();r.position=u0e(p,g,m)}if(u&&r.panBy!=null){var y=r.panBy,v=l.pan();r.pan={x:v.x+y.x,y:v.y+y.y}}var x=r.center||r.centre;if(u&&x!=null){var b=l.getCenterPan(x.eles,r.zoom);b!=null&&(r.pan=b)}if(u&&r.fit!=null){var k=r.fit,A=l.getFitViewport(k.eles||k.boundingBox,k.padding);A!=null&&(r.pan=A.pan,r.zoom=A.zoom)}if(u&&Er(r.zoom)){var w=l.getZoomedViewport(r.zoom);w!=null?(w.zoomed&&(r.zoom=w.zoom),w.panned&&(r.pan=w.pan)):r.zoom=null}return new qO(o[0],r)},"animationImpl")},"animation"),animate:s(function(){return s(function(r,n){var i=this,a=i.length!==void 0,o=a?i:[i],l=this._private.cy||this;if(!l.styleEnabled())return this;n&&(r=Pt({},r,n));for(var u=0;u<o.length;u++){var h=o[u],f=h.animated()&&(r.queue===void 0||r.queue),d=h.animation(r,f?{queue:!0}:void 0);d.play()}return this},"animateImpl")},"animate"),stop:s(function(){return s(function(r,n){var i=this,a=i.length!==void 0,o=a?i:[i],l=this._private.cy||this;if(!l.styleEnabled())return this;for(var u=0;u<o.length;u++){for(var h=o[u],f=h._private,d=f.animation.current,p=0;p<d.length;p++){var m=d[p],g=m._private;n&&(g.duration=0)}r&&(f.animation.queue=[]),n||(f.animation.current=[])}return l.notify("draw"),this},"stopImpl")},"stop")},eWe=Array.isArray,c7=eWe,tWe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rWe=/^\w*$/;s(nWe,"isKey");iWe=nWe,aWe="[object AsyncFunction]",sWe="[object Function]",oWe="[object GeneratorFunction]",lWe="[object Proxy]";s(cWe,"isFunction");uWe=cWe,hWe=i7["__core-js_shared__"],IO=hWe,rde=function(){var t=/[^.]+$/.exec(IO&&IO.keys&&IO.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();s(fWe,"isMasked");dWe=fWe,pWe=Function.prototype,mWe=pWe.toString;s(gWe,"toSource");yWe=gWe,vWe=/[\\^$.*+?()[\]{}|]/g,xWe=/^\[object .+?Constructor\]$/,bWe=Function.prototype,kWe=Object.prototype,wWe=bWe.toString,TWe=kWe.hasOwnProperty,EWe=RegExp("^"+wWe.call(TWe).replace(vWe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");s(CWe,"baseIsNative");SWe=CWe;s(_We,"getValue$1");AWe=_We;s(LWe,"getNative");pP=LWe,DWe=pP(Object,"create"),Ax=DWe;s(RWe,"hashClear");MWe=RWe;s(IWe,"hashDelete");NWe=IWe,OWe="__lodash_hash_undefined__",PWe=Object.prototype,BWe=PWe.hasOwnProperty;s(FWe,"hashGet");zWe=FWe,$We=Object.prototype,GWe=$We.hasOwnProperty;s(VWe,"hashHas");UWe=VWe,qWe="__lodash_hash_undefined__";s(WWe,"hashSet");HWe=WWe;s(Kg,"Hash");Kg.prototype.clear=MWe;Kg.prototype.delete=NWe;Kg.prototype.get=zWe;Kg.prototype.has=UWe;Kg.prototype.set=HWe;nde=Kg;s(YWe,"listCacheClear");XWe=YWe;s(jWe,"eq");S0e=jWe;s(KWe,"assocIndexOf");u7=KWe,QWe=Array.prototype,ZWe=QWe.splice;s(JWe,"listCacheDelete");eHe=JWe;s(tHe,"listCacheGet");rHe=tHe;s(nHe,"listCacheHas");iHe=nHe;s(aHe,"listCacheSet");sHe=aHe;s(Qg,"ListCache");Qg.prototype.clear=XWe;Qg.prototype.delete=eHe;Qg.prototype.get=rHe;Qg.prototype.has=iHe;Qg.prototype.set=sHe;oHe=Qg,lHe=pP(i7,"Map"),cHe=lHe;s(uHe,"mapCacheClear");hHe=uHe;s(fHe,"isKeyable");dHe=fHe;s(pHe,"getMapData");h7=pHe;s(mHe,"mapCacheDelete");gHe=mHe;s(yHe,"mapCacheGet");vHe=yHe;s(xHe,"mapCacheHas");bHe=xHe;s(kHe,"mapCacheSet");wHe=kHe;s(Zg,"MapCache");Zg.prototype.clear=hHe;Zg.prototype.delete=gHe;Zg.prototype.get=vHe;Zg.prototype.has=bHe;Zg.prototype.set=wHe;_0e=Zg,THe="Expected a function";s(mP,"memoize");mP.Cache=_0e;EHe=mP,CHe=500;s(SHe,"memoizeCapped");_He=SHe,AHe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LHe=/\\(\\)?/g,DHe=_He(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(AHe,function(r,n,i,a){e.push(i?a.replace(LHe,"$1"):n||r)}),e}),A0e=DHe;s(RHe,"arrayMap");L0e=RHe,MHe=1/0,ide=qg?qg.prototype:void 0,ade=ide?ide.toString:void 0;s(D0e,"baseToString");IHe=D0e;s(NHe,"toString$1");R0e=NHe;s(OHe,"castPath");M0e=OHe,PHe=1/0;s(BHe,"toKey");gP=BHe;s(FHe,"baseGet");zHe=FHe;s($He,"get");GHe=$He,VHe=function(){try{var t=pP(Object,"defineProperty");return t({},"",{}),t}catch{}}(),sde=VHe;s(UHe,"baseAssignValue");qHe=UHe,WHe=Object.prototype,HHe=WHe.hasOwnProperty;s(YHe,"assignValue");XHe=YHe,jHe=9007199254740991,KHe=/^(?:0|[1-9]\d*)$/;s(QHe,"isIndex");ZHe=QHe;s(JHe,"baseSet");eYe=JHe;s(tYe,"set");rYe=tYe;s(nYe,"copyArray");iYe=nYe;s(aYe,"toPath");sYe=aYe,oYe={data:s(function(e){var r={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:s(function(i){},"beforeGet"),beforeSet:s(function(i,a){},"beforeSet"),onSet:s(function(i){},"onSet"),canSet:s(function(i){return!0},"canSet")};return e=Pt({},r,e),s(function(i,a){var o=e,l=this,u=l.length!==void 0,h=u?l:[l],f=u?l[0]:l;if(At(i)){var d=i.indexOf(".")!==-1,p=d&&sYe(i);if(o.allowGetting&&a===void 0){var m;return f&&(o.beforeGet(f),p&&f._private[o.field][i]===void 0?m=GHe(f._private[o.field],p):m=f._private[o.field][i]),m}else if(o.allowSetting&&a!==void 0){var g=!o.immutableKeys[i];if(g){var y=qde({},i,a);o.beforeSet(l,y);for(var v=0,x=h.length;v<x;v++){var b=h[v];o.canSet(b)&&(p&&f._private[o.field][i]===void 0?rYe(b._private[o.field],p,a):b._private[o.field][i]=a)}o.updateStyle&&l.updateStyle(),o.onSet(l),o.settingTriggersEvent&&l[o.triggerFnName](o.settingEvent)}}}else if(o.allowSetting&&Er(i)){var k=i,A,w,T=Object.keys(k);o.beforeSet(l,k);for(var C=0;C<T.length;C++){A=T[C],w=k[A];var E=!o.immutableKeys[A];if(E)for(var S=0;S<h.length;S++){var R=h[S];o.canSet(R)&&(R._private[o.field][A]=w)}}o.updateStyle&&l.updateStyle(),o.onSet(l),o.settingTriggersEvent&&l[o.triggerFnName](o.settingEvent)}else if(o.allowBinding&&Gn(i)){var D=i;l.on(o.bindingEvent,D)}else if(o.allowGetting&&i===void 0){var L;return f&&(o.beforeGet(f),L=f._private[o.field]),L}return l},"dataImpl")},"data"),removeData:s(function(e){var r={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=Pt({},r,e),s(function(i){var a=e,o=this,l=o.length!==void 0,u=l?o:[o];if(At(i)){for(var h=i.split(/\s+/),f=h.length,d=0;d<f;d++){var p=h[d];if(!gf(p)){var m=!a.immutableKeys[p];if(m)for(var g=0,y=u.length;g<y;g++)u[g]._private[a.field][p]=void 0}}a.triggerEvent&&o[a.triggerFnName](a.event)}else if(i===void 0){for(var v=0,x=u.length;v<x;v++)for(var b=u[v]._private[a.field],k=Object.keys(b),A=0;A<k.length;A++){var w=k[A],T=!a.immutableKeys[w];T&&(b[w]=void 0)}a.triggerEvent&&o[a.triggerFnName](a.event)}return o},"removeDataImpl")},"removeData")},lYe={eventAliasesOn:s(function(e){var r=e;r.addListener=r.listen=r.bind=r.on,r.unlisten=r.unbind=r.off=r.removeListener,r.trigger=r.emit,r.pon=r.promiseOn=function(n,i){var a=this,o=Array.prototype.slice.call(arguments,0);return new jg(function(l,u){var h=s(function(m){a.off.apply(a,d),l(m)},"callback"),f=o.concat([h]),d=f.concat([]);a.on.apply(a,f)})}},"eventAliasesOn")},jr={};[Jqe,oYe,lYe].forEach(function(t){Pt(jr,t)});cYe={animate:jr.animate(),animation:jr.animation(),animated:jr.animated(),clearQueue:jr.clearQueue(),delay:jr.delay(),delayAnimation:jr.delayAnimation(),stop:jr.stop()},zT={classes:s(function(e){var r=this;if(e===void 0){var n=[];return r[0]._private.classes.forEach(function(g){return n.push(g)}),n}else hn(e)||(e=(e||"").match(/\S+/g)||[]);for(var i=[],a=new Xg(e),o=0;o<r.length;o++){for(var l=r[o],u=l._private,h=u.classes,f=!1,d=0;d<e.length;d++){var p=e[d],m=h.has(p);if(!m){f=!0;break}}f||(f=h.size!==e.length),f&&(u.classes=a,i.push(l))}return i.length>0&&this.spawn(i).updateStyle().emit("class"),r},"classes"),addClass:s(function(e){return this.toggleClass(e,!0)},"addClass"),hasClass:s(function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},"hasClass"),toggleClass:s(function(e,r){hn(e)||(e=e.match(/\S+/g)||[]);for(var n=this,i=r===void 0,a=[],o=0,l=n.length;o<l;o++)for(var u=n[o],h=u._private.classes,f=!1,d=0;d<e.length;d++){var p=e[d],m=h.has(p),g=!1;r||i&&!m?(h.add(p),g=!0):(!r||i&&m)&&(h.delete(p),g=!0),!f&&g&&(a.push(u),f=!0)}return a.length>0&&this.spawn(a).updateStyle().emit("class"),n},"toggleClass"),removeClass:s(function(e){return this.toggleClass(e,!1)},"removeClass"),flashClass:s(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},"flashClass")};zT.className=zT.classNames=zT.classes;Tr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Oi,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Tr.variable="(?:[\\w-.]|(?:\\\\"+Tr.metaChar+"))+";Tr.className="(?:[\\w-]|(?:\\\\"+Tr.metaChar+"))+";Tr.value=Tr.string+"|"+Tr.number;Tr.id=Tr.variable;(function(){var t,e,r;for(t=Tr.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],Tr.comparatorOp+="|@"+e;for(t=Tr.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],!(e.indexOf("!")>=0)&&e!=="="&&(Tr.comparatorOp+="|\\!"+e)})();rn=s(function(){return{checks:[]}},"newQuery"),ft={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},WO=[{selector:":selected",matches:s(function(e){return e.selected()},"matches")},{selector:":unselected",matches:s(function(e){return!e.selected()},"matches")},{selector:":selectable",matches:s(function(e){return e.selectable()},"matches")},{selector:":unselectable",matches:s(function(e){return!e.selectable()},"matches")},{selector:":locked",matches:s(function(e){return e.locked()},"matches")},{selector:":unlocked",matches:s(function(e){return!e.locked()},"matches")},{selector:":visible",matches:s(function(e){return e.visible()},"matches")},{selector:":hidden",matches:s(function(e){return!e.visible()},"matches")},{selector:":transparent",matches:s(function(e){return e.transparent()},"matches")},{selector:":grabbed",matches:s(function(e){return e.grabbed()},"matches")},{selector:":free",matches:s(function(e){return!e.grabbed()},"matches")},{selector:":removed",matches:s(function(e){return e.removed()},"matches")},{selector:":inside",matches:s(function(e){return!e.removed()},"matches")},{selector:":grabbable",matches:s(function(e){return e.grabbable()},"matches")},{selector:":ungrabbable",matches:s(function(e){return!e.grabbable()},"matches")},{selector:":animated",matches:s(function(e){return e.animated()},"matches")},{selector:":unanimated",matches:s(function(e){return!e.animated()},"matches")},{selector:":parent",matches:s(function(e){return e.isParent()},"matches")},{selector:":childless",matches:s(function(e){return e.isChildless()},"matches")},{selector:":child",matches:s(function(e){return e.isChild()},"matches")},{selector:":orphan",matches:s(function(e){return e.isOrphan()},"matches")},{selector:":nonorphan",matches:s(function(e){return e.isChild()},"matches")},{selector:":compound",matches:s(function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()},"matches")},{selector:":loop",matches:s(function(e){return e.isLoop()},"matches")},{selector:":simple",matches:s(function(e){return e.isSimple()},"matches")},{selector:":active",matches:s(function(e){return e.active()},"matches")},{selector:":inactive",matches:s(function(e){return!e.active()},"matches")},{selector:":backgrounding",matches:s(function(e){return e.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:s(function(e){return!e.backgrounding()},"matches")}].sort(function(t,e){return kVe(t.selector,e.selector)}),uYe=function(){for(var t={},e,r=0;r<WO.length;r++)e=WO[r],t[e.selector]=e.matches;return t}(),hYe=s(function(e,r){return uYe[e](r)},"stateSelectorMatches"),fYe="("+WO.map(function(t){return t.selector}).join("|")+")",Mg=s(function(e){return e.replace(new RegExp("\\\\("+Tr.metaChar+")","g"),function(r,n){return n})},"cleanMetaChars"),hf=s(function(e,r,n){e[e.length-1]=n},"replaceLastQuery"),HO=[{name:"group",query:!0,regex:"("+Tr.group+")",populate:s(function(e,r,n){var i=Sl(n,1),a=i[0];r.checks.push({type:ft.GROUP,value:a==="*"?a:a+"s"})},"populate")},{name:"state",query:!0,regex:fYe,populate:s(function(e,r,n){var i=Sl(n,1),a=i[0];r.checks.push({type:ft.STATE,value:a})},"populate")},{name:"id",query:!0,regex:"\\#("+Tr.id+")",populate:s(function(e,r,n){var i=Sl(n,1),a=i[0];r.checks.push({type:ft.ID,value:Mg(a)})},"populate")},{name:"className",query:!0,regex:"\\.("+Tr.className+")",populate:s(function(e,r,n){var i=Sl(n,1),a=i[0];r.checks.push({type:ft.CLASS,value:Mg(a)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+Tr.variable+")\\s*\\]",populate:s(function(e,r,n){var i=Sl(n,1),a=i[0];r.checks.push({type:ft.DATA_EXIST,field:Mg(a)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Tr.variable+")\\s*("+Tr.comparatorOp+")\\s*("+Tr.value+")\\s*\\]",populate:s(function(e,r,n){var i=Sl(n,3),a=i[0],o=i[1],l=i[2],u=new RegExp("^"+Tr.string+"$").exec(l)!=null;u?l=l.substring(1,l.length-1):l=parseFloat(l),r.checks.push({type:ft.DATA_COMPARE,field:Mg(a),operator:o,value:l})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+Tr.boolOp+")\\s*("+Tr.variable+")\\s*\\]",populate:s(function(e,r,n){var i=Sl(n,2),a=i[0],o=i[1];r.checks.push({type:ft.DATA_BOOL,field:Mg(o),operator:a})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Tr.meta+")\\s*("+Tr.comparatorOp+")\\s*("+Tr.number+")\\s*\\]\\]",populate:s(function(e,r,n){var i=Sl(n,3),a=i[0],o=i[1],l=i[2];r.checks.push({type:ft.META_COMPARE,field:Mg(a),operator:o,value:parseFloat(l)})},"populate")},{name:"nextQuery",separator:!0,regex:Tr.separator,populate:s(function(e,r){var n=e.currentSubject,i=e.edgeCount,a=e.compoundCount,o=e[e.length-1];n!=null&&(o.subject=n,e.currentSubject=null),o.edgeCount=i,o.compoundCount=a,e.edgeCount=0,e.compoundCount=0;var l=e[e.length++]=rn();return l},"populate")},{name:"directedEdge",separator:!0,regex:Tr.directedEdge,populate:s(function(e,r){if(e.currentSubject==null){var n=rn(),i=r,a=rn();return n.checks.push({type:ft.DIRECTED_EDGE,source:i,target:a}),hf(e,r,n),e.edgeCount++,a}else{var o=rn(),l=r,u=rn();return o.checks.push({type:ft.NODE_SOURCE,source:l,target:u}),hf(e,r,o),e.edgeCount++,u}},"populate")},{name:"undirectedEdge",separator:!0,regex:Tr.undirectedEdge,populate:s(function(e,r){if(e.currentSubject==null){var n=rn(),i=r,a=rn();return n.checks.push({type:ft.UNDIRECTED_EDGE,nodes:[i,a]}),hf(e,r,n),e.edgeCount++,a}else{var o=rn(),l=r,u=rn();return o.checks.push({type:ft.NODE_NEIGHBOR,node:l,neighbor:u}),hf(e,r,o),u}},"populate")},{name:"child",separator:!0,regex:Tr.child,populate:s(function(e,r){if(e.currentSubject==null){var n=rn(),i=rn(),a=e[e.length-1];return n.checks.push({type:ft.CHILD,parent:a,child:i}),hf(e,r,n),e.compoundCount++,i}else if(e.currentSubject===r){var o=rn(),l=e[e.length-1],u=rn(),h=rn(),f=rn(),d=rn();return o.checks.push({type:ft.COMPOUND_SPLIT,left:l,right:u,subject:h}),h.checks=r.checks,r.checks=[{type:ft.TRUE}],d.checks.push({type:ft.TRUE}),u.checks.push({type:ft.PARENT,parent:d,child:f}),hf(e,l,o),e.currentSubject=h,e.compoundCount++,f}else{var p=rn(),m=rn(),g=[{type:ft.PARENT,parent:p,child:m}];return p.checks=r.checks,r.checks=g,e.compoundCount++,m}},"populate")},{name:"descendant",separator:!0,regex:Tr.descendant,populate:s(function(e,r){if(e.currentSubject==null){var n=rn(),i=rn(),a=e[e.length-1];return n.checks.push({type:ft.DESCENDANT,ancestor:a,descendant:i}),hf(e,r,n),e.compoundCount++,i}else if(e.currentSubject===r){var o=rn(),l=e[e.length-1],u=rn(),h=rn(),f=rn(),d=rn();return o.checks.push({type:ft.COMPOUND_SPLIT,left:l,right:u,subject:h}),h.checks=r.checks,r.checks=[{type:ft.TRUE}],d.checks.push({type:ft.TRUE}),u.checks.push({type:ft.ANCESTOR,ancestor:d,descendant:f}),hf(e,l,o),e.currentSubject=h,e.compoundCount++,f}else{var p=rn(),m=rn(),g=[{type:ft.ANCESTOR,ancestor:p,descendant:m}];return p.checks=r.checks,r.checks=g,e.compoundCount++,m}},"populate")},{name:"subject",modifier:!0,regex:Tr.subject,populate:s(function(e,r){if(e.currentSubject!=null&&e.currentSubject!==r)return Kr("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=r;var n=e[e.length-1],i=n.checks[0],a=i==null?null:i.type;a===ft.DIRECTED_EDGE?i.type=ft.NODE_TARGET:a===ft.UNDIRECTED_EDGE&&(i.type=ft.NODE_NEIGHBOR,i.node=i.nodes[1],i.neighbor=i.nodes[0],i.nodes=null)},"populate")}];HO.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});dYe=s(function(e){for(var r,n,i,a=0;a<HO.length;a++){var o=HO[a],l=o.name,u=e.match(o.regexObj);if(u!=null){n=u,r=o,i=l;var h=u[0];e=e.substring(h.length);break}}return{expr:r,match:n,name:i,remaining:e}},"consumeExpr"),pYe=s(function(e){var r=e.match(/^\s+/);if(r){var n=r[0];e=e.substring(n.length)}return e},"consumeWhitespace"),mYe=s(function(e){var r=this,n=r.inputText=e,i=r[0]=rn();for(r.length=1,n=pYe(n);;){var a=dYe(n);if(a.expr==null)return Kr("The selector `"+e+"`is invalid"),!1;var o=a.match.slice(1),l=a.expr.populate(r,i,o);if(l===!1)return!1;if(l!=null&&(i=l),n=a.remaining,n.match(/^\s*$/))break}var u=r[r.length-1];r.currentSubject!=null&&(u.subject=r.currentSubject),u.edgeCount=r.edgeCount,u.compoundCount=r.compoundCount;for(var h=0;h<r.length;h++){var f=r[h];if(f.compoundCount>0&&f.edgeCount>0)return Kr("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(f.edgeCount>1)return Kr("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;f.edgeCount===1&&Kr("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},"parse"),gYe=s(function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=s(function(f){return f??""},"clean"),r=s(function(f){return At(f)?'"'+f+'"':e(f)},"cleanVal"),n=s(function(f){return" "+f+" "},"space"),i=s(function(f,d){var p=f.type,m=f.value;switch(p){case ft.GROUP:{var g=e(m);return g.substring(0,g.length-1)}case ft.DATA_COMPARE:{var y=f.field,v=f.operator;return"["+y+n(e(v))+r(m)+"]"}case ft.DATA_BOOL:{var x=f.operator,b=f.field;return"["+e(x)+b+"]"}case ft.DATA_EXIST:{var k=f.field;return"["+k+"]"}case ft.META_COMPARE:{var A=f.operator,w=f.field;return"[["+w+n(e(A))+r(m)+"]]"}case ft.STATE:return m;case ft.ID:return"#"+m;case ft.CLASS:return"."+m;case ft.PARENT:case ft.CHILD:return a(f.parent,d)+n(">")+a(f.child,d);case ft.ANCESTOR:case ft.DESCENDANT:return a(f.ancestor,d)+" "+a(f.descendant,d);case ft.COMPOUND_SPLIT:{var T=a(f.left,d),C=a(f.subject,d),E=a(f.right,d);return T+(T.length>0?" ":"")+C+E}case ft.TRUE:return""}},"checkToString"),a=s(function(f,d){return f.checks.reduce(function(p,m,g){return p+(d===f&&g===0?"$":"")+i(m,d)},"")},"queryToString"),o="",l=0;l<this.length;l++){var u=this[l];o+=a(u,u.subject),this.length>1&&l<this.length-1&&(o+=", ")}return this.toStringCache=o,o},"toString"),yYe={parse:mYe,toString:gYe},I0e=s(function(e,r,n){var i,a=At(e),o=rt(e),l=At(n),u,h,f=!1,d=!1,p=!1;switch(r.indexOf("!")>=0&&(r=r.replace("!",""),d=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),f=!0),(a||l||f)&&(u=!a&&!o?"":""+e,h=""+n),f&&(e=u=u.toLowerCase(),n=h=h.toLowerCase()),r){case"*=":i=u.indexOf(h)>=0;break;case"$=":i=u.indexOf(h,u.length-h.length)>=0;break;case"^=":i=u.indexOf(h)===0;break;case"=":i=e===n;break;case">":p=!0,i=e>n;break;case">=":p=!0,i=e>=n;break;case"<":p=!0,i=e<n;break;case"<=":p=!0,i=e<=n;break;default:i=!1;break}return d&&(e!=null||!p)&&(i=!i),i},"valCmp"),vYe=s(function(e,r){switch(r){case"?":return!!e;case"!":return!e;case"^":return e===void 0}},"boolCmp"),xYe=s(function(e){return e!==void 0},"existCmp"),yP=s(function(e,r){return e.data(r)},"data"),bYe=s(function(e,r){return e[r]()},"meta"),ei=[],_n=s(function(e,r){return e.checks.every(function(n){return ei[n.type](n,r)})},"matches");ei[ft.GROUP]=function(t,e){var r=t.value;return r==="*"||r===e.group()};ei[ft.STATE]=function(t,e){var r=t.value;return hYe(r,e)};ei[ft.ID]=function(t,e){var r=t.value;return e.id()===r};ei[ft.CLASS]=function(t,e){var r=t.value;return e.hasClass(r)};ei[ft.META_COMPARE]=function(t,e){var r=t.field,n=t.operator,i=t.value;return I0e(bYe(e,r),n,i)};ei[ft.DATA_COMPARE]=function(t,e){var r=t.field,n=t.operator,i=t.value;return I0e(yP(e,r),n,i)};ei[ft.DATA_BOOL]=function(t,e){var r=t.field,n=t.operator;return vYe(yP(e,r),n)};ei[ft.DATA_EXIST]=function(t,e){var r=t.field;return t.operator,xYe(yP(e,r))};ei[ft.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],n=t.nodes[1],i=e.source(),a=e.target();return _n(r,i)&&_n(n,a)||_n(n,i)&&_n(r,a)};ei[ft.NODE_NEIGHBOR]=function(t,e){return _n(t.node,e)&&e.neighborhood().some(function(r){return r.isNode()&&_n(t.neighbor,r)})};ei[ft.DIRECTED_EDGE]=function(t,e){return _n(t.source,e.source())&&_n(t.target,e.target())};ei[ft.NODE_SOURCE]=function(t,e){return _n(t.source,e)&&e.outgoers().some(function(r){return r.isNode()&&_n(t.target,r)})};ei[ft.NODE_TARGET]=function(t,e){return _n(t.target,e)&&e.incomers().some(function(r){return r.isNode()&&_n(t.source,r)})};ei[ft.CHILD]=function(t,e){return _n(t.child,e)&&_n(t.parent,e.parent())};ei[ft.PARENT]=function(t,e){return _n(t.parent,e)&&e.children().some(function(r){return _n(t.child,r)})};ei[ft.DESCENDANT]=function(t,e){return _n(t.descendant,e)&&e.ancestors().some(function(r){return _n(t.ancestor,r)})};ei[ft.ANCESTOR]=function(t,e){return _n(t.ancestor,e)&&e.descendants().some(function(r){return _n(t.descendant,r)})};ei[ft.COMPOUND_SPLIT]=function(t,e){return _n(t.subject,e)&&_n(t.left,e)&&_n(t.right,e)};ei[ft.TRUE]=function(){return!0};ei[ft.COLLECTION]=function(t,e){var r=t.value;return r.has(e)};ei[ft.FILTER]=function(t,e){var r=t.value;return r(e)};kYe=s(function(e){var r=this;if(r.length===1&&r[0].checks.length===1&&r[0].checks[0].type===ft.ID)return e.getElementById(r[0].checks[0].value).collection();var n=s(function(a){for(var o=0;o<r.length;o++){var l=r[o];if(_n(l,a))return!0}return!1},"selectorFunction");return r.text()==null&&(n=s(function(){return!0},"selectorFunction")),e.filter(n)},"filter"),wYe=s(function(e){for(var r=this,n=0;n<r.length;n++){var i=r[n];if(_n(i,e))return!0}return!1},"matches"),TYe={matches:wYe,filter:kYe},vf=s(function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,e==null||At(e)&&e.match(/^\s*$/)||(oo(e)?this.addQuery({checks:[{type:ft.COLLECTION,value:e.collection()}]}):Gn(e)?this.addQuery({checks:[{type:ft.FILTER,value:e}]}):At(e)?this.parse(e)||(this.invalid=!0):Jn("A selector must be created from a string; found "))},"Selector"),xf=vf.prototype;[yYe,TYe].forEach(function(t){return Pt(xf,t)});xf.text=function(){return this.inputText};xf.size=function(){return this.length};xf.eq=function(t){return this[t]};xf.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()};xf.addQuery=function(t){this[this.length++]=t};xf.selector=xf.toString;pf={allAre:s(function(e){var r=new vf(e);return this.every(function(n){return r.matches(n)})},"allAre"),is:s(function(e){var r=new vf(e);return this.some(function(n){return r.matches(n)})},"is"),some:s(function(e,r){for(var n=0;n<this.length;n++){var i=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(i)return!0}return!1},"some"),every:s(function(e,r){for(var n=0;n<this.length;n++){var i=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(!i)return!1}return!0},"every"),same:s(function(e){if(this===e)return!0;e=this.cy().collection(e);var r=this.length,n=e.length;return r!==n?!1:r===1?this[0]===e[0]:this.every(function(i){return e.hasElementWithId(i.id())})},"same"),anySame:s(function(e){return e=this.cy().collection(e),this.some(function(r){return e.hasElementWithId(r.id())})},"anySame"),allAreNeighbors:s(function(e){e=this.cy().collection(e);var r=this.neighborhood();return e.every(function(n){return r.hasElementWithId(n.id())})},"allAreNeighbors"),contains:s(function(e){e=this.cy().collection(e);var r=this;return e.every(function(n){return r.hasElementWithId(n.id())})},"contains")};pf.allAreNeighbours=pf.allAreNeighbors;pf.has=pf.contains;pf.equal=pf.equals=pf.same;Vo=s(function(e,r){return s(function(i,a,o,l){var u=i,h=this,f;if(u==null?f="":oo(u)&&u.length===1&&(f=u.id()),h.length===1&&f){var d=h[0]._private,p=d.traversalCache=d.traversalCache||{},m=p[r]=p[r]||[],g=M0(f),y=m[g];return y||(m[g]=e.call(h,i,a,o,l))}else return e.call(h,i,a,o,l)},"traversalCache")},"cache"),Yg={parent:s(function(e){var r=[];if(this.length===1){var n=this[0]._private.parent;if(n)return n}for(var i=0;i<this.length;i++){var a=this[i],o=a._private.parent;o&&r.push(o)}return this.spawn(r,!0).filter(e)},"parent"),parents:s(function(e){for(var r=[],n=this.parent();n.nonempty();){for(var i=0;i<n.length;i++){var a=n[i];r.push(a)}n=n.parent()}return this.spawn(r,!0).filter(e)},"parents"),commonAncestors:s(function(e){for(var r,n=0;n<this.length;n++){var i=this[n],a=i.parents();r=r||a,r=r.intersect(a)}return r.filter(e)},"commonAncestors"),orphans:s(function(e){return this.stdFilter(function(r){return r.isOrphan()}).filter(e)},"orphans"),nonorphans:s(function(e){return this.stdFilter(function(r){return r.isChild()}).filter(e)},"nonorphans"),children:Vo(function(t){for(var e=[],r=0;r<this.length;r++)for(var n=this[r],i=n._private.children,a=0;a<i.length;a++)e.push(i[a]);return this.spawn(e,!0).filter(t)},"children"),siblings:s(function(e){return this.parent().children().not(this).filter(e)},"siblings"),isParent:s(function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length!==0},"isParent"),isChildless:s(function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length===0},"isChildless"),isChild:s(function(){var e=this[0];if(e)return e.isNode()&&e._private.parent!=null},"isChild"),isOrphan:s(function(){var e=this[0];if(e)return e.isNode()&&e._private.parent==null},"isOrphan"),descendants:s(function(e){var r=[];function n(i){for(var a=0;a<i.length;a++){var o=i[a];r.push(o),o.children().nonempty()&&n(o.children())}}return s(n,"add"),n(this.children()),this.spawn(r,!0).filter(e)},"descendants")};s(vP,"forEachCompound");s(N0e,"addChildren");Yg.forEachDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return vP(this,t,e,N0e)};s(O0e,"addParent");Yg.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return vP(this,t,e,O0e)};s(EYe,"addParentAndChildren");Yg.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return vP(this,t,e,EYe)};Yg.ancestors=Yg.parents;Lx=P0e={data:jr.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:jr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:jr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:jr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:jr.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:jr.removeData({field:"rscratch",triggerEvent:!1}),id:s(function(){var e=this[0];if(e)return e._private.data.id},"id")};Lx.attr=Lx.data;Lx.removeAttr=Lx.removeData;CYe=P0e,f7={};s(NO,"defineDegreeFunction");Pt(f7,{degree:NO(function(t,e){return e.source().same(e.target())?2:1}),indegree:NO(function(t,e){return e.target().same(t)?1:0}),outdegree:NO(function(t,e){return e.source().same(t)?1:0})});s(Ig,"defineDegreeBoundsFunction");Pt(f7,{minDegree:Ig("degree",function(t,e){return t<e}),maxDegree:Ig("degree",function(t,e){return t>e}),minIndegree:Ig("indegree",function(t,e){return t<e}),maxIndegree:Ig("indegree",function(t,e){return t>e}),minOutdegree:Ig("outdegree",function(t,e){return t<e}),maxOutdegree:Ig("outdegree",function(t,e){return t>e})});Pt(f7,{totalDegree:s(function(e){for(var r=0,n=this.nodes(),i=0;i<n.length;i++)r+=n[i].degree(e);return r},"totalDegree")});F0e=s(function(e,r,n){for(var i=0;i<e.length;i++){var a=e[i];if(!a.locked()){var o=a._private.position,l={x:r.x!=null?r.x-o.x:0,y:r.y!=null?r.y-o.y:0};a.isParent()&&!(l.x===0&&l.y===0)&&a.children().shift(l,n),a.dirtyBoundingBoxCache()}}},"beforePositionSet"),ode={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:s(function(e){e.updateCompoundBounds()},"beforeGet"),beforeSet:s(function(e,r){F0e(e,r,!1)},"beforeSet"),onSet:s(function(e){e.dirtyCompoundBoundsCache()},"onSet"),canSet:s(function(e){return!e.locked()},"canSet")};Ll=B0e={position:jr.data(ode),silentPosition:jr.data(Pt({},ode,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:s(function(e,r){F0e(e,r,!0)},"beforeSet"),onSet:s(function(e){e.dirtyCompoundBoundsCache()},"onSet")})),positions:s(function(e,r){if(Er(e))r?this.silentPosition(e):this.position(e);else if(Gn(e)){var n=e,i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var o=this[a],l=void 0;(l=n(o,a))&&(r?o.silentPosition(l):o.position(l))}i.endBatch()}return this},"positions"),silentPositions:s(function(e){return this.positions(e,!0)},"silentPositions"),shift:s(function(e,r,n){var i;if(Er(e)?(i={x:rt(e.x)?e.x:0,y:rt(e.y)?e.y:0},n=r):At(e)&&rt(r)&&(i={x:0,y:0},i[e]=r),i!=null){var a=this.cy();a.startBatch();for(var o=0;o<this.length;o++){var l=this[o];if(!(a.hasCompoundNodes()&&l.isChild()&&l.ancestors().anySame(this))){var u=l.position(),h={x:u.x+i.x,y:u.y+i.y};n?l.silentPosition(h):l.position(h)}}a.endBatch()}return this},"shift"),silentShift:s(function(e,r){return Er(e)?this.shift(e,!0):At(e)&&rt(r)&&this.shift(e,r,!0),this},"silentShift"),renderedPosition:s(function(e,r){var n=this[0],i=this.cy(),a=i.zoom(),o=i.pan(),l=Er(e)?e:void 0,u=l!==void 0||r!==void 0&&At(e);if(n&&n.isNode())if(u)for(var h=0;h<this.length;h++){var f=this[h];r!==void 0?f.position(e,(r-o[e])/a):l!==void 0&&f.position(u0e(l,a,o))}else{var d=n.position();return l=o7(d,a,o),e===void 0?l:l[e]}else if(!u)return;return this},"renderedPosition"),relativePosition:s(function(e,r){var n=this[0],i=this.cy(),a=Er(e)?e:void 0,o=a!==void 0||r!==void 0&&At(e),l=i.hasCompoundNodes();if(n&&n.isNode())if(o)for(var u=0;u<this.length;u++){var h=this[u],f=l?h.parent():null,d=f&&f.length>0,p=d;d&&(f=f[0]);var m=p?f.position():{x:0,y:0};r!==void 0?h.position(e,r+m[e]):a!==void 0&&h.position({x:a.x+m.x,y:a.y+m.y})}else{var g=n.position(),y=l?n.parent():null,v=y&&y.length>0,x=v;v&&(y=y[0]);var b=x?y.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(!o)return;return this},"relativePosition")};Ll.modelPosition=Ll.point=Ll.position;Ll.modelPositions=Ll.points=Ll.positions;Ll.renderedPoint=Ll.renderedPosition;Ll.relativePoint=Ll.relativePosition;SYe=B0e;Ug=kf={};kf.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),i=r.pan(),a=e.x1*n+i.x,o=e.x2*n+i.x,l=e.y1*n+i.y,u=e.y2*n+i.y;return{x1:a,x2:o,y1:l,y2:u,w:o-a,h:u-l}};kf.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)};kf.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(o){if(!o.isParent())return;var l=o._private,u=o.children(),h=o.pstyle("compound-sizing-wrt-labels").value==="include",f={width:{val:o.pstyle("min-width").pfValue,left:o.pstyle("min-width-bias-left"),right:o.pstyle("min-width-bias-right")},height:{val:o.pstyle("min-height").pfValue,top:o.pstyle("min-height-bias-top"),bottom:o.pstyle("min-height-bias-bottom")}},d=u.boundingBox({includeLabels:h,includeOverlays:!1,useCache:!1}),p=l.position;(d.w===0||d.h===0)&&(d={w:o.pstyle("width").pfValue,h:o.pstyle("height").pfValue},d.x1=p.x-d.w/2,d.x2=p.x+d.w/2,d.y1=p.y-d.h/2,d.y2=p.y+d.h/2);function m(S,R,D){var L=0,P=0,M=R+D;return S>0&&M>0&&(L=R/M*S,P=D/M*S),{biasDiff:L,biasComplementDiff:P}}s(m,"computeBiasValues");function g(S,R,D,L){if(D.units==="%")switch(L){case"width":return S>0?D.pfValue*S:0;case"height":return R>0?D.pfValue*R:0;case"average":return S>0&&R>0?D.pfValue*(S+R)/2:0;case"min":return S>0&&R>0?S>R?D.pfValue*R:D.pfValue*S:0;case"max":return S>0&&R>0?S>R?D.pfValue*S:D.pfValue*R:0;default:return 0}else return D.units==="px"?D.pfValue:0}s(g,"computePaddingValues");var y=f.width.left.value;f.width.left.units==="px"&&f.width.val>0&&(y=y*100/f.width.val);var v=f.width.right.value;f.width.right.units==="px"&&f.width.val>0&&(v=v*100/f.width.val);var x=f.height.top.value;f.height.top.units==="px"&&f.height.val>0&&(x=x*100/f.height.val);var b=f.height.bottom.value;f.height.bottom.units==="px"&&f.height.val>0&&(b=b*100/f.height.val);var k=m(f.width.val-d.w,y,v),A=k.biasDiff,w=k.biasComplementDiff,T=m(f.height.val-d.h,x,b),C=T.biasDiff,E=T.biasComplementDiff;l.autoPadding=g(d.w,d.h,o.pstyle("padding"),o.pstyle("padding-relative-to").value),l.autoWidth=Math.max(d.w,f.width.val),p.x=(-A+d.x1+d.x2+w)/2,l.autoHeight=Math.max(d.h,f.height.val),p.y=(-C+d.y1+d.y2+E)/2}s(r,"update");for(var n=0;n<this.length;n++){var i=this[n],a=i._private;(!a.compoundBoundsClean||t)&&(r(i),e.batching()||(a.compoundBoundsClean=!0))}return this};Go=s(function(e){return e===1/0||e===-1/0?0:e},"noninf"),_l=s(function(e,r,n,i,a){i-r===0||a-n===0||r==null||n==null||i==null||a==null||(e.x1=r<e.x1?r:e.x1,e.x2=i>e.x2?i:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=a>e.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},"updateBounds"),_0=s(function(e,r){return r==null?e:_l(e,r.x1,r.y1,r.x2,r.y2)},"updateBoundsFromBox"),fx=s(function(e,r,n){return Al(e,r,n)},"prefixedProperty"),RT=s(function(e,r,n){if(!r.cy().headless()){var i=r._private,a=i.rstyle,o=a.arrowWidth/2,l=r.pstyle(n+"-arrow-shape").value,u,h;if(l!=="none"){n==="source"?(u=a.srcX,h=a.srcY):n==="target"?(u=a.tgtX,h=a.tgtY):(u=a.midX,h=a.midY);var f=i.arrowBounds=i.arrowBounds||{},d=f[n]=f[n]||{};d.x1=u-o,d.y1=h-o,d.x2=u+o,d.y2=h+o,d.w=d.x2-d.x1,d.h=d.y2-d.y1,BT(d,1),_l(e,d.x1,d.y1,d.x2,d.y2)}}},"updateBoundsFromArrow"),OO=s(function(e,r,n){if(!r.cy().headless()){var i;n?i=n+"-":i="";var a=r._private,o=a.rstyle,l=r.pstyle(i+"label").strValue;if(l){var u=r.pstyle("text-halign"),h=r.pstyle("text-valign"),f=fx(o,"labelWidth",n),d=fx(o,"labelHeight",n),p=fx(o,"labelX",n),m=fx(o,"labelY",n),g=r.pstyle(i+"text-margin-x").pfValue,y=r.pstyle(i+"text-margin-y").pfValue,v=r.isEdge(),x=r.pstyle(i+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,k=r.pstyle("text-border-width").pfValue,A=k/2,w=r.pstyle("text-background-padding").pfValue,T=2,C=d,E=f,S=E/2,R=C/2,D,L,P,M;if(v)D=p-S,L=p+S,P=m-R,M=m+R;else{switch(u.value){case"left":D=p-E,L=p;break;case"center":D=p-S,L=p+S;break;case"right":D=p,L=p+E;break}switch(h.value){case"top":P=m-C,M=m;break;case"center":P=m-R,M=m+R;break;case"bottom":P=m,M=m+C;break}}D+=g-Math.max(b,A)-w-T,L+=g+Math.max(b,A)+w+T,P+=y-Math.max(b,A)-w-T,M+=y+Math.max(b,A)+w+T;var F=n||"main",I=a.labelBounds,O=I[F]=I[F]||{};O.x1=D,O.y1=P,O.x2=L,O.y2=M,O.w=L-D,O.h=M-P;var z=v&&x.strValue==="autorotate",N=x.pfValue!=null&&x.pfValue!==0;if(z||N){var U=z?fx(a.rstyle,"labelAngle",n):x.pfValue,$=Math.cos(U),W=Math.sin(U),ee=(D+L)/2,te=(P+M)/2;if(!v){switch(u.value){case"left":ee=L;break;case"right":ee=D;break}switch(h.value){case"top":te=M;break;case"bottom":te=P;break}}var ce=s(function(ie,ye){return ie=ie-ee,ye=ye-te,{x:ie*$-ye*W+ee,y:ie*W+ye*$+te}},"rotate"),Z=ce(D,P),fe=ce(D,M),ne=ce(L,P),H=ce(L,M);D=Math.min(Z.x,fe.x,ne.x,H.x),L=Math.max(Z.x,fe.x,ne.x,H.x),P=Math.min(Z.y,fe.y,ne.y,H.y),M=Math.max(Z.y,fe.y,ne.y,H.y)}var Q=F+"Rot",K=I[Q]=I[Q]||{};K.x1=D,K.y1=P,K.x2=L,K.y2=M,K.w=L-D,K.h=M-P,_l(e,D,P,L,M),_l(a.labelBounds.all,D,P,L,M)}return e}},"updateBoundsFromLabel"),_Ye=s(function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,i=r.pstyle("outline-width").value;if(n>0&&i>0){var a=r.pstyle("outline-offset").value,o=r.pstyle("shape").value,l=i+a,u=(e.w+l*2)/e.w,h=(e.h+l*2)/e.h,f=0,d=0;["diamond","pentagon","round-triangle"].includes(o)?(u=(e.w+l*2.4)/e.w,d=-l/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(o)?u=(e.w+l*2.4)/e.w:o==="star"?(u=(e.w+l*2.8)/e.w,h=(e.h+l*2.6)/e.h,d=-l/3.8):o==="triangle"?(u=(e.w+l*2.8)/e.w,h=(e.h+l*2.4)/e.h,d=-l/1.4):o==="vee"&&(u=(e.w+l*4.4)/e.w,h=(e.h+l*3.8)/e.h,d=-l*.5);var p=e.h*h-e.h,m=e.w*u-e.w;if(FT(e,[Math.ceil(p/2),Math.ceil(m/2)]),f!=0||d!==0){var g=XUe(e,f,d);f0e(e,g)}}}},"updateBoundsFromOutline"),AYe=s(function(e,r){var n=e._private.cy,i=n.styleEnabled(),a=n.headless(),o=Is(),l=e._private,u=e.isNode(),h=e.isEdge(),f,d,p,m,g,y,v=l.rstyle,x=u&&i?e.pstyle("bounds-expansion").pfValue:[0],b=s(function(De){return De.pstyle("display").value!=="none"},"isDisplayed"),k=!i||b(e)&&(!h||b(e.source())&&b(e.target()));if(k){var A=0,w=0;i&&r.includeOverlays&&(A=e.pstyle("overlay-opacity").value,A!==0&&(w=e.pstyle("overlay-padding").value));var T=0,C=0;i&&r.includeUnderlays&&(T=e.pstyle("underlay-opacity").value,T!==0&&(C=e.pstyle("underlay-padding").value));var E=Math.max(w,C),S=0,R=0;if(i&&(S=e.pstyle("width").pfValue,R=S/2),u&&r.includeNodes){var D=e.position();g=D.x,y=D.y;var L=e.outerWidth(),P=L/2,M=e.outerHeight(),F=M/2;f=g-P,d=g+P,p=y-F,m=y+F,_l(o,f,p,d,m),i&&r.includeOutlines&&_Ye(o,e)}else if(h&&r.includeEdges)if(i&&!a){var I=e.pstyle("curve-style").strValue;if(f=Math.min(v.srcX,v.midX,v.tgtX),d=Math.max(v.srcX,v.midX,v.tgtX),p=Math.min(v.srcY,v.midY,v.tgtY),m=Math.max(v.srcY,v.midY,v.tgtY),f-=R,d+=R,p-=R,m+=R,_l(o,f,p,d,m),I==="haystack"){var O=v.haystackPts;if(O&&O.length===2){if(f=O[0].x,p=O[0].y,d=O[1].x,m=O[1].y,f>d){var z=f;f=d,d=z}if(p>m){var N=p;p=m,m=N}_l(o,f-R,p-R,d+R,m+R)}}else if(I==="bezier"||I==="unbundled-bezier"||I.endsWith("segments")||I.endsWith("taxi")){var U;switch(I){case"bezier":case"unbundled-bezier":U=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":U=v.linePts;break}if(U!=null)for(var $=0;$<U.length;$++){var W=U[$];f=W.x-R,d=W.x+R,p=W.y-R,m=W.y+R,_l(o,f,p,d,m)}}}else{var ee=e.source(),te=ee.position(),ce=e.target(),Z=ce.position();if(f=te.x,d=Z.x,p=te.y,m=Z.y,f>d){var fe=f;f=d,d=fe}if(p>m){var ne=p;p=m,m=ne}f-=R,d+=R,p-=R,m+=R,_l(o,f,p,d,m)}if(i&&r.includeEdges&&h&&(RT(o,e,"mid-source"),RT(o,e,"mid-target"),RT(o,e,"source"),RT(o,e,"target")),i){var H=e.pstyle("ghost").value==="yes";if(H){var Q=e.pstyle("ghost-offset-x").pfValue,K=e.pstyle("ghost-offset-y").pfValue;_l(o,o.x1+Q,o.y1+K,o.x2+Q,o.y2+K)}}var re=l.bodyBounds=l.bodyBounds||{};$fe(re,o),FT(re,x),BT(re,1),i&&(f=o.x1,d=o.x2,p=o.y1,m=o.y2,_l(o,f-E,p-E,d+E,m+E));var ie=l.overlayBounds=l.overlayBounds||{};$fe(ie,o),FT(ie,x),BT(ie,1);var ye=l.labelBounds=l.labelBounds||{};ye.all!=null?YUe(ye.all):ye.all=Is(),i&&r.includeLabels&&(r.includeMainLabels&&OO(o,e,null),h&&(r.includeSourceLabels&&OO(o,e,"source"),r.includeTargetLabels&&OO(o,e,"target")))}return o.x1=Go(o.x1),o.y1=Go(o.y1),o.x2=Go(o.x2),o.y2=Go(o.y2),o.w=Go(o.x2-o.x1),o.h=Go(o.y2-o.y1),o.w>0&&o.h>0&&k&&(FT(o,x),BT(o,1)),o},"boundingBoxImpl"),z0e=s(function(e){var r=0,n=s(function(o){return(o?1:0)<<r++},"tf"),i=0;return i+=n(e.incudeNodes),i+=n(e.includeEdges),i+=n(e.includeLabels),i+=n(e.includeMainLabels),i+=n(e.includeSourceLabels),i+=n(e.includeTargetLabels),i+=n(e.includeOverlays),i+=n(e.includeOutlines),i},"getKey"),$0e=s(function(e){if(e.isEdge()){var r=e.source().position(),n=e.target().position(),i=s(function(o){return Math.round(o)},"r");return pUe([i(r.x),i(r.y),i(n.x),i(n.y)])}else return 0},"getBoundingBoxPosKey"),lde=s(function(e,r){var n=e._private,i,a=e.isEdge(),o=r==null?cde:z0e(r),l=o===cde,u=$0e(e),h=n.bbCachePosKey===u,f=r.useCache&&h,d=s(function(y){return y._private.bbCache==null||y._private.styleDirty},"isDirty"),p=!f||d(e)||a&&d(e.source())||d(e.target());if(p?(h||e.recalculateRenderedStyle(f),i=AYe(e,Dx),n.bbCache=i,n.bbCachePosKey=u):i=n.bbCache,!l){var m=e.isNode();i=Is(),(r.includeNodes&&m||r.includeEdges&&!m)&&(r.includeOverlays?_0(i,n.overlayBounds):_0(i,n.bodyBounds)),r.includeLabels&&(r.includeMainLabels&&(!a||r.includeSourceLabels&&r.includeTargetLabels)?_0(i,n.labelBounds.all):(r.includeMainLabels&&_0(i,n.labelBounds.mainRot),r.includeSourceLabels&&_0(i,n.labelBounds.sourceRot),r.includeTargetLabels&&_0(i,n.labelBounds.targetRot))),i.w=i.x2-i.x1,i.h=i.y2-i.y1}return i},"cachedBoundingBoxImpl"),Dx={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},cde=z0e(Dx),ude=ya(Dx);kf.boundingBox=function(t){var e;if(this.length===1&&this[0]._private.bbCache!=null&&!this[0]._private.styleDirty&&(t===void 0||t.useCache===void 0||t.useCache===!0))t===void 0?t=Dx:t=ude(t),e=lde(this[0],t);else{e=Is(),t=t||Dx;var r=ude(t),n=this,i=n.cy(),a=i.styleEnabled();if(a)for(var o=0;o<n.length;o++){var l=n[o],u=l._private,h=$0e(l),f=u.bbCachePosKey===h,d=r.useCache&&f&&!u.styleDirty;l.recalculateRenderedStyle(d)}this.updateCompoundBounds(!t.useCache);for(var p=0;p<n.length;p++){var m=n[p];_0(e,lde(m,r))}}return e.x1=Go(e.x1),e.y1=Go(e.y1),e.x2=Go(e.x2),e.y2=Go(e.y2),e.w=Go(e.x2-e.x1),e.h=Go(e.y2-e.y1),e};kf.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this};kf.boundingBoxAt=function(t){var e=this.nodes(),r=this.cy(),n=r.hasCompoundNodes(),i=r.collection();if(n&&(i=e.filter(function(h){return h.isParent()}),e=e.not(i)),Er(t)){var a=t;t=s(function(){return a},"fn")}var o=s(function(f,d){return f._private.bbAtOldPos=t(f,d)},"storeOldPos"),l=s(function(f){return f._private.bbAtOldPos},"getOldPos");r.startBatch(),e.forEach(o).silentPositions(t),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0));var u=HUe(this.boundingBox({useCache:!1}));return e.silentPositions(l),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0)),r.endBatch(),u};Ug.boundingbox=Ug.bb=Ug.boundingBox;Ug.renderedBoundingbox=Ug.renderedBoundingBox;LYe=kf;vx=Bx={};G0e=s(function(e){e.uppercaseName=Ife(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=Ife(e.outerName),vx[e.name]=s(function(){var n=this[0],i=n._private,a=i.cy,o=a._private.styleEnabled;if(n)if(o){if(n.isParent())return n.updateCompoundBounds(),i[e.autoName]||0;var l=n.pstyle(e.name);switch(l.strValue){case"label":return n.recalculateRenderedStyle(),i.rstyle[e.labelName]||0;default:return l.pfValue}}else return 1},"dimImpl"),vx["outer"+e.uppercaseName]=s(function(){var n=this[0],i=n._private,a=i.cy,o=a._private.styleEnabled;if(n)if(o){var l=n[e.name](),u=n.pstyle("border-width").pfValue,h=2*n.padding();return l+u+h}else return 1},"outerDimImpl"),vx["rendered"+e.uppercaseName]=s(function(){var n=this[0];if(n){var i=n[e.name]();return i*this.cy().zoom()}},"renderedDimImpl"),vx["rendered"+e.uppercaseOuterName]=s(function(){var n=this[0];if(n){var i=n[e.outerName]();return i*this.cy().zoom()}},"renderedOuterDimImpl")},"defineDimFns");G0e({name:"width"});G0e({name:"height"});Bx.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),e.autoPadding!==void 0?e.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue};Bx.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()};Bx.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};DYe=Bx,RYe=s(function(e,r){if(e.isEdge())return r(e)},"ifEdge"),MYe=s(function(e,r){if(e.isEdge()){var n=e.cy();return o7(r(e),n.zoom(),n.pan())}},"ifEdgeRenderedPosition"),IYe=s(function(e,r){if(e.isEdge()){var n=e.cy(),i=n.pan(),a=n.zoom();return r(e).map(function(o){return o7(o,a,i)})}},"ifEdgeRenderedPositions"),NYe=s(function(e){return e.renderer().getControlPoints(e)},"controlPoints"),OYe=s(function(e){return e.renderer().getSegmentPoints(e)},"segmentPoints"),PYe=s(function(e){return e.renderer().getSourceEndpoint(e)},"sourceEndpoint"),BYe=s(function(e){return e.renderer().getTargetEndpoint(e)},"targetEndpoint"),FYe=s(function(e){return e.renderer().getEdgeMidpoint(e)},"midpoint"),hde={controlPoints:{get:NYe,mult:!0},segmentPoints:{get:OYe,mult:!0},sourceEndpoint:{get:PYe},targetEndpoint:{get:BYe},midpoint:{get:FYe}},zYe=s(function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},"renderedName"),$Ye=Object.keys(hde).reduce(function(t,e){var r=hde[e],n=zYe(e);return t[e]=function(){return RYe(this,r.get)},r.mult?t[n]=function(){return IYe(this,r.get)}:t[n]=function(){return MYe(this,r.get)},t},{}),GYe=Pt({},SYe,LYe,DYe,$Ye);V0e=s(function(e,r){this.recycle(e,r)},"Event");s(dx,"returnFalse");s(MT,"returnTrue");V0e.prototype={instanceString:s(function(){return"event"},"instanceString"),recycle:s(function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=dx,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?MT:dx):e!=null&&e.type?r=e:this.type=e,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var n=this.position,i=this.cy.zoom(),a=this.cy.pan();this.renderedPosition={x:n.x*i+a.x,y:n.y*i+a.y}}this.timeStamp=e&&e.timeStamp||Date.now()},"recycle"),preventDefault:s(function(){this.isDefaultPrevented=MT;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},"preventDefault"),stopPropagation:s(function(){this.isPropagationStopped=MT;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},"stopPropagation"),stopImmediatePropagation:s(function(){this.isImmediatePropagationStopped=MT,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:dx,isPropagationStopped:dx,isImmediatePropagationStopped:dx};U0e=/^([^.]+)(\.(?:[^.]+))?$/,VYe=".*",q0e={qualifierCompare:s(function(e,r){return e===r},"qualifierCompare"),eventMatches:s(function(){return!0},"eventMatches"),addEventFields:s(function(){},"addEventFields"),callbackContext:s(function(e){return e},"callbackContext"),beforeEmit:s(function(){},"beforeEmit"),afterEmit:s(function(){},"afterEmit"),bubble:s(function(){return!1},"bubble"),parent:s(function(){return null},"parent"),context:null},fde=Object.keys(q0e),UYe={};s(d7,"Emitter");bf=d7.prototype,W0e=s(function(e,r,n,i,a,o,l){Gn(i)&&(a=i,i=null),l&&(o==null?o=l:o=Pt({},o,l));for(var u=hn(n)?n:n.split(/\s+/),h=0;h<u.length;h++){var f=u[h];if(!gf(f)){var d=f.match(U0e);if(d){var p=d[1],m=d[2]?d[2]:null,g=r(e,f,p,m,i,a,o);if(g===!1)break}}}},"forEachEvent"),dde=s(function(e,r){return e.addEventFields(e.context,r),new V0e(r.type,r)},"makeEventObj"),qYe=s(function(e,r,n){if(uVe(n)){r(e,n);return}else if(Er(n)){r(e,dde(e,n));return}for(var i=hn(n)?n:n.split(/\s+/),a=0;a<i.length;a++){var o=i[a];if(!gf(o)){var l=o.match(U0e);if(l){var u=l[1],h=l[2]?l[2]:null,f=dde(e,{type:u,namespace:h,target:e.context});r(e,f)}}}},"forEachEventObj");bf.on=bf.addListener=function(t,e,r,n,i){return W0e(this,function(a,o,l,u,h,f,d){Gn(f)&&a.listeners.push({event:o,callback:f,type:l,namespace:u,qualifier:h,conf:d})},t,e,r,n,i),this};bf.one=function(t,e,r,n){return this.on(t,e,r,n,{one:!0})};bf.removeListener=bf.off=function(t,e,r,n){var i=this;this.emitting!==0&&(this.listeners=xUe(this.listeners));for(var a=this.listeners,o=s(function(h){var f=a[h];W0e(i,function(d,p,m,g,y,v){if((f.type===m||t==="*")&&(!g&&f.namespace!==".*"||f.namespace===g)&&(!y||d.qualifierCompare(f.qualifier,y))&&(!v||f.callback===v))return a.splice(h,1),!1},t,e,r,n)},"_loop"),l=a.length-1;l>=0;l--)o(l);return this};bf.removeAllListeners=function(){return this.removeListener("*")};bf.emit=bf.trigger=function(t,e,r){var n=this.listeners,i=n.length;return this.emitting++,hn(e)||(e=[e]),qYe(this,function(a,o){r!=null&&(n=[{event:o.event,type:o.type,namespace:o.namespace,callback:r}],i=n.length);for(var l=s(function(f){var d=n[f];if(d.type===o.type&&(!d.namespace||d.namespace===o.namespace||d.namespace===VYe)&&a.eventMatches(a.context,d,o)){var p=[o];e!=null&&kUe(p,e),a.beforeEmit(a.context,d,o),d.conf&&d.conf.one&&(a.listeners=a.listeners.filter(function(y){return y!==d}));var m=a.callbackContext(a.context,d,o),g=d.callback.apply(m,p);a.afterEmit(a.context,d,o),g===!1&&(o.stopPropagation(),o.preventDefault())}},"_loop2"),u=0;u<i;u++)l(u);a.bubble(a.context)&&!o.isPropagationStopped()&&a.parent(a.context).emit(o,e)},t),this.emitting--,this};WYe={qualifierCompare:s(function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},"qualifierCompare"),eventMatches:s(function(e,r,n){var i=r.qualifier;return i!=null?e!==n.target&&Nx(n.target)&&i.matches(n.target):!0},"eventMatches"),addEventFields:s(function(e,r){r.cy=e.cy(),r.target=e},"addEventFields"),callbackContext:s(function(e,r,n){return r.qualifier!=null?n.target:e},"callbackContext"),beforeEmit:s(function(e,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},"beforeEmit"),bubble:s(function(){return!0},"bubble"),parent:s(function(e){return e.isChild()?e.parent():e.cy()},"parent")},IT=s(function(e){return At(e)?new vf(e):e},"argSelector"),H0e={createEmitter:s(function(){for(var e=0;e<this.length;e++){var r=this[e],n=r._private;n.emitter||(n.emitter=new d7(WYe,r))}return this},"createEmitter"),emitter:s(function(){return this._private.emitter},"emitter"),on:s(function(e,r,n){for(var i=IT(r),a=0;a<this.length;a++){var o=this[a];o.emitter().on(e,i,n)}return this},"on"),removeListener:s(function(e,r,n){for(var i=IT(r),a=0;a<this.length;a++){var o=this[a];o.emitter().removeListener(e,i,n)}return this},"removeListener"),removeAllListeners:s(function(){for(var e=0;e<this.length;e++){var r=this[e];r.emitter().removeAllListeners()}return this},"removeAllListeners"),one:s(function(e,r,n){for(var i=IT(r),a=0;a<this.length;a++){var o=this[a];o.emitter().one(e,i,n)}return this},"one"),once:s(function(e,r,n){for(var i=IT(r),a=0;a<this.length;a++){var o=this[a];o.emitter().on(e,i,n,{once:!0,onceCollection:this})}},"once"),emit:s(function(e,r){for(var n=0;n<this.length;n++){var i=this[n];i.emitter().emit(e,r)}return this},"emit"),emitAndNotify:s(function(e,r){if(this.length!==0)return this.cy().notify(e,this),this.emit(e,r),this},"emitAndNotify")};jr.eventAliasesOn(H0e);Y0e={nodes:s(function(e){return this.filter(function(r){return r.isNode()}).filter(e)},"nodes"),edges:s(function(e){return this.filter(function(r){return r.isEdge()}).filter(e)},"edges"),byGroup:s(function(){for(var e=this.spawn(),r=this.spawn(),n=0;n<this.length;n++){var i=this[n];i.isNode()?e.push(i):r.push(i)}return{nodes:e,edges:r}},"byGroup"),filter:s(function(e,r){if(e===void 0)return this;if(At(e)||oo(e))return new vf(e).filter(this);if(Gn(e)){for(var n=this.spawn(),i=this,a=0;a<i.length;a++){var o=i[a],l=r?e.apply(r,[o,a,i]):e(o,a,i);l&&n.push(o)}return n}return this.spawn()},"filter"),not:s(function(e){if(e){At(e)&&(e=this.filter(e));for(var r=this.spawn(),n=0;n<this.length;n++){var i=this[n],a=e.has(i);a||r.push(i)}return r}else return this},"not"),absoluteComplement:s(function(){var e=this.cy();return e.mutableElements().not(this)},"absoluteComplement"),intersect:s(function(e){if(At(e)){var r=e;return this.filter(r)}for(var n=this.spawn(),i=this,a=e,o=this.length<e.length,l=o?i:a,u=o?a:i,h=0;h<l.length;h++){var f=l[h];u.has(f)&&n.push(f)}return n},"intersect"),xor:s(function(e){var r=this._private.cy;At(e)&&(e=r.$(e));var n=this.spawn(),i=this,a=e,o=s(function(u,h){for(var f=0;f<u.length;f++){var d=u[f],p=d._private.data.id,m=h.hasElementWithId(p);m||n.push(d)}},"add");return o(i,a),o(a,i),n},"xor"),diff:s(function(e){var r=this._private.cy;At(e)&&(e=r.$(e));var n=this.spawn(),i=this.spawn(),a=this.spawn(),o=this,l=e,u=s(function(f,d,p){for(var m=0;m<f.length;m++){var g=f[m],y=g._private.data.id,v=d.hasElementWithId(y);v?a.merge(g):p.push(g)}},"add");return u(o,l,n),u(l,o,i),{left:n,right:i,both:a}},"diff"),add:s(function(e){var r=this._private.cy;if(!e)return this;if(At(e)){var n=e;e=r.mutableElements().filter(n)}for(var i=this.spawnSelf(),a=0;a<e.length;a++){var o=e[a],l=!this.has(o);l&&i.push(o)}return i},"add"),merge:s(function(e){var r=this._private,n=r.cy;if(!e)return this;if(e&&At(e)){var i=e;e=n.mutableElements().filter(i)}for(var a=r.map,o=0;o<e.length;o++){var l=e[o],u=l._private.data.id,h=!a.has(u);if(h){var f=this.length++;this[f]=l,a.set(u,{ele:l,index:f})}}return this},"merge"),unmergeAt:s(function(e){var r=this[e],n=r.id(),i=this._private,a=i.map;this[e]=void 0,a.delete(n);var o=e===this.length-1;if(this.length>1&&!o){var l=this.length-1,u=this[l],h=u._private.data.id;this[l]=void 0,this[e]=u,a.set(h,{ele:u,index:e})}return this.length--,this},"unmergeAt"),unmergeOne:s(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 o=a.index;return this.unmergeAt(o),this},"unmergeOne"),unmerge:s(function(e){var r=this._private.cy;if(!e)return this;if(e&&At(e)){var n=e;e=r.mutableElements().filter(n)}for(var i=0;i<e.length;i++)this.unmergeOne(e[i]);return this},"unmerge"),unmergeBy:s(function(e){for(var r=this.length-1;r>=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},"unmergeBy"),map:s(function(e,r){for(var n=[],i=this,a=0;a<i.length;a++){var o=i[a],l=r?e.apply(r,[o,a,i]):e(o,a,i);n.push(l)}return n},"map"),reduce:s(function(e,r){for(var n=r,i=this,a=0;a<i.length;a++)n=e(n,i[a],a,i);return n},"reduce"),max:s(function(e,r){for(var n=-1/0,i,a=this,o=0;o<a.length;o++){var l=a[o],u=r?e.apply(r,[l,o,a]):e(l,o,a);u>n&&(n=u,i=l)}return{value:n,ele:i}},"max"),min:s(function(e,r){for(var n=1/0,i,a=this,o=0;o<a.length;o++){var l=a[o],u=r?e.apply(r,[l,o,a]):e(l,o,a);u<n&&(n=u,i=l)}return{value:n,ele:i}},"min")},zr=Y0e;zr.u=zr["|"]=zr["+"]=zr.union=zr.or=zr.add;zr["\\"]=zr["!"]=zr["-"]=zr.difference=zr.relativeComplement=zr.subtract=zr.not;zr.n=zr["&"]=zr["."]=zr.and=zr.intersection=zr.intersect;zr["^"]=zr["(+)"]=zr["(-)"]=zr.symmetricDifference=zr.symdiff=zr.xor;zr.fnFilter=zr.filterFn=zr.stdFilter=zr.filter;zr.complement=zr.abscomp=zr.absoluteComplement;HYe={isNode:s(function(){return this.group()==="nodes"},"isNode"),isEdge:s(function(){return this.group()==="edges"},"isEdge"),isLoop:s(function(){return this.isEdge()&&this.source()[0]===this.target()[0]},"isLoop"),isSimple:s(function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},"isSimple"),group:s(function(){var e=this[0];if(e)return e._private.group},"group")},X0e=s(function(e,r){var n=e.cy(),i=n.hasCompoundNodes();function a(f){var d=f.pstyle("z-compound-depth");return d.value==="auto"?i?f.zDepth():0:d.value==="bottom"?-1:d.value==="top"?oP:0}s(a,"getDepth");var o=a(e)-a(r);if(o!==0)return o;function l(f){var d=f.pstyle("z-index-compare");return d.value==="auto"&&f.isNode()?1:0}s(l,"getEleDepth");var u=l(e)-l(r);if(u!==0)return u;var h=e.pstyle("z-index").value-r.pstyle("z-index").value;return h!==0?h:e.poolIndex()-r.poolIndex()},"zIndexSort"),ZT={forEach:s(function(e,r){if(Gn(e))for(var n=this.length,i=0;i<n;i++){var a=this[i],o=r?e.apply(r,[a,i,this]):e(a,i,this);if(o===!1)break}return this},"forEach"),toArray:s(function(){for(var e=[],r=0;r<this.length;r++)e.push(this[r]);return e},"toArray"),slice:s(function(e,r){var n=[],i=this.length;r==null&&(r=i),e==null&&(e=0),e<0&&(e=i+e),r<0&&(r=i+r);for(var a=e;a>=0&&a<r&&a<i;a++)n.push(this[a]);return this.spawn(n)},"slice"),size:s(function(){return this.length},"size"),eq:s(function(e){return this[e]||this.spawn()},"eq"),first:s(function(){return this[0]||this.spawn()},"first"),last:s(function(){return this[this.length-1]||this.spawn()},"last"),empty:s(function(){return this.length===0},"empty"),nonempty:s(function(){return!this.empty()},"nonempty"),sort:s(function(e){if(!Gn(e))return this;var r=this.toArray().sort(e);return this.spawn(r)},"sort"),sortByZIndex:s(function(){return this.sort(X0e)},"sortByZIndex"),zDepth:s(function(){var e=this[0];if(e){var r=e._private,n=r.group;if(n==="nodes"){var i=r.data.parent?e.parents().size():0;return e.isParent()?i:oP-1}else{var a=r.source,o=r.target,l=a.zDepth(),u=o.zDepth();return Math.max(l,u,0)}}},"zDepth")};ZT.each=ZT.forEach;YYe=s(function(){var e="undefined",r=(typeof Symbol>"u"?"undefined":Pi(Symbol))!=e&&Pi(Symbol.iterator)!=e;r&&(ZT[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,o=this.length;return qde({next:s(function(){return a<o?i.value=n[a++]:(i.value=void 0,i.done=!0),i},"next")},Symbol.iterator,function(){return this})})},"defineSymbolIterator");YYe();XYe=ya({nodeDimensionsIncludeLabels:!1}),$T={layoutDimensions:s(function(e){e=XYe(e);var r;if(!this.takesUpSpace())r={w:0,h:0};else if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();r={w:n.w,h:n.h}}else r={w:this.outerWidth(),h:this.outerHeight()};return(r.w===0||r.h===0)&&(r.w=r.h=1),r},"layoutDimensions"),layoutPositions:s(function(e,r,n){var i=this.nodes().filter(function(w){return!w.isParent()}),a=this.cy(),o=r.eles,l=s(function(T){return T.id()},"getMemoizeKey"),u=wx(n,l);e.emit({type:"layoutstart",layout:e}),e.animations=[];var h=s(function(T,C,E){var S={x:C.x1+C.w/2,y:C.y1+C.h/2},R={x:(E.x-S.x)*T,y:(E.y-S.y)*T};return{x:S.x+R.x,y:S.y+R.y}},"calculateSpacing"),f=r.spacingFactor&&r.spacingFactor!==1,d=s(function(){if(!f)return null;for(var T=Is(),C=0;C<i.length;C++){var E=i[C],S=u(E,C);jUe(T,S.x,S.y)}return T},"spacingBb"),p=d(),m=wx(function(w,T){var C=u(w,T);if(f){var E=Math.abs(r.spacingFactor);C=h(E,p,C)}return r.transform!=null&&(C=r.transform(w,C)),C},l);if(r.animate){for(var g=0;g<i.length;g++){var y=i[g],v=m(y,g),x=r.animateFilter==null||r.animateFilter(y,g);if(x){var b=y.animation({position:v,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(b)}else y.position(v)}if(r.fit){var k=a.animation({fit:{boundingBox:o.boundingBoxAt(m),padding:r.padding},duration:r.animationDuration,easing:r.animationEasing});e.animations.push(k)}else if(r.zoom!==void 0&&r.pan!==void 0){var A=a.animation({zoom:r.zoom,pan:r.pan,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(A)}e.animations.forEach(function(w){return w.play()}),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),jg.all(e.animations.map(function(w){return w.promise()})).then(function(){e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e})})}else i.positions(m),r.fit&&a.fit(r.eles,r.padding),r.zoom!=null&&a.zoom(r.zoom),r.pan&&a.pan(r.pan),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e});return this},"layoutPositions"),layout:s(function(e){var r=this.cy();return r.makeLayout(Pt({},e,{eles:this}))},"layout")};$T.createLayout=$T.makeLayout=$T.layout;s(j0e,"styleCache");s(p7,"cacheStyleFunction");s(m7,"cachePrototypeStyleFunction");ma={recalculateRenderedStyle:s(function(e){var r=this.cy(),n=r.renderer(),i=r.styleEnabled();return n&&i&&n.recalculateRenderedStyle(this,e),this},"recalculateRenderedStyle"),dirtyStyleCache:s(function(){var e=this.cy(),r=s(function(a){return a._private.styleCache=null},"dirty");if(e.hasCompoundNodes()){var n;n=this.spawnSelf().merge(this.descendants()).merge(this.parents()),n.merge(n.connectedEdges()),n.forEach(r)}else this.forEach(function(i){r(i),i.connectedEdges().forEach(r)});return this},"dirtyStyleCache"),updateStyle:s(function(e){var r=this._private.cy;if(!r.styleEnabled())return this;if(r.batching()){var n=r._private.batchStyleEles;return n.merge(this),this}var i=r.hasCompoundNodes(),a=this;e=!!(e||e===void 0),i&&(a=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var o=a;return e?o.emitAndNotify("style"):o.emit("style"),a.forEach(function(l){return l._private.styleDirty=!0}),this},"updateStyle"),cleanStyle:s(function(){var e=this.cy();if(e.styleEnabled())for(var r=0;r<this.length;r++){var n=this[r];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n))}},"cleanStyle"),parsedStyle:s(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){this.cleanStyle();var a=n._private.style[e];return a??(r?i.style().getDefaultProperty(e):null)}},"parsedStyle"),numericStyle:s(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}},"numericStyle"),numericStyleUnits:s(function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},"numericStyleUnits"),renderedStyle:s(function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},"renderedStyle"),style:s(function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(Er(e)){var o=e;a.applyBypass(this,o,i),this.emitAndNotify("style")}else if(At(e))if(r===void 0){var l=this[0];return l?a.getStylePropertyValue(l,e):void 0}else a.applyBypass(this,e,r,i),this.emitAndNotify("style");else if(e===void 0){var u=this[0];return u?a.getRawStyle(u):void 0}return this},"style"),removeStyle:s(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 o=0;o<a.length;o++){var l=a[o];i.removeAllBypasses(l,n)}else{e=e.split(/\s+/);for(var u=0;u<a.length;u++){var h=a[u];i.removeBypasses(h,e,n)}}return this.emitAndNotify("style"),this},"removeStyle"),show:s(function(){return this.css("display","element"),this},"show"),hide:s(function(){return this.css("display","none"),this},"hide"),effectiveOpacity:s(function(){var e=this.cy();if(!e.styleEnabled())return 1;var r=e.hasCompoundNodes(),n=this[0];if(n){var i=n._private,a=n.pstyle("opacity").value;if(!r)return a;var o=i.data.parent?n.parents():null;if(o)for(var l=0;l<o.length;l++){var u=o[l],h=u.pstyle("opacity").value;a=h*a}return a}},"effectiveOpacity"),transparent:s(function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0],n=r.cy().hasCompoundNodes();if(r)return n?r.effectiveOpacity()===0:r.pstyle("opacity").value===0},"transparent"),backgrounding:s(function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0];return!!r._private.backgrounding},"backgrounding")};s(PO,"checkCompound");s(xP,"defineDerivedStateFunction");Jg=p7("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0)});ma.takesUpSpace=m7("takesUpSpace",xP({ok:Jg}));jYe=p7("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&Jg(t)}),KYe=p7("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&Jg(t)});ma.interactive=m7("interactive",xP({ok:jYe,parentOk:KYe,edgeOkViaNode:Jg}));ma.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};QYe=p7("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&Jg(t)}),ZYe=Jg;ma.visible=m7("visible",xP({ok:QYe,edgeOkViaNode:ZYe}));ma.hidden=function(){var t=this[0];if(t)return!t.visible()};ma.isBundledBezier=m7("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1});ma.bypass=ma.css=ma.style;ma.renderedCss=ma.renderedStyle;ma.removeBypass=ma.removeCss=ma.removeStyle;ma.pstyle=ma.parsedStyle;mf={};s(pde,"defineSwitchFunction");s(e1,"defineSwitchSet");e1({field:"locked",overrideField:s(function(e){return e.cy().autolock()?!0:void 0},"overrideField"),on:"lock",off:"unlock"});e1({field:"grabbable",overrideField:s(function(e){return e.cy().autoungrabify()||e.pannable()?!1:void 0},"overrideField"),on:"grabify",off:"ungrabify"});e1({field:"selected",ableField:"selectable",overrideAble:s(function(e){return e.cy().autounselectify()?!1:void 0},"overrideAble"),on:"select",off:"unselect"});e1({field:"selectable",overrideField:s(function(e){return e.cy().autounselectify()?!1:void 0},"overrideField"),on:"selectify",off:"unselectify"});mf.deselect=mf.unselect;mf.grabbed=function(){var t=this[0];if(t)return t._private.grabbed};e1({field:"active",on:"activate",off:"unactivate"});e1({field:"pannable",on:"panify",off:"unpanify"});mf.inactive=function(){var t=this[0];if(t)return!t._private.active};Da={},mde=s(function(e){return s(function(n){for(var i=this,a=[],o=0;o<i.length;o++){var l=i[o];if(l.isNode()){for(var u=!1,h=l.connectedEdges(),f=0;f<h.length;f++){var d=h[f],p=d.source(),m=d.target();if(e.noIncomingEdges&&m===l&&p!==l||e.noOutgoingEdges&&p===l&&m!==l){u=!0;break}}u||a.push(l)}}return this.spawn(a,!0).filter(n)},"dagExtremityImpl")},"defineDagExtremity"),gde=s(function(e){return function(r){for(var n=this,i=[],a=0;a<n.length;a++){var o=n[a];if(o.isNode())for(var l=o.connectedEdges(),u=0;u<l.length;u++){var h=l[u],f=h.source(),d=h.target();e.outgoing&&f===o?(i.push(h),i.push(d)):e.incoming&&d===o&&(i.push(h),i.push(f))}}return this.spawn(i,!0).filter(r)}},"defineDagOneHop"),yde=s(function(e){return function(r){for(var n=this,i=[],a={};;){var o=e.outgoing?n.outgoers():n.incomers();if(o.length===0)break;for(var l=!1,u=0;u<o.length;u++){var h=o[u],f=h.id();a[f]||(a[f]=!0,i.push(h),l=!0)}if(!l)break;n=o}return this.spawn(i,!0).filter(r)}},"defineDagAllHops");Da.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null};Pt(Da,{roots:mde({noIncomingEdges:!0}),leaves:mde({noOutgoingEdges:!0}),outgoers:Vo(gde({outgoing:!0}),"outgoers"),successors:yde({outgoing:!0}),incomers:Vo(gde({incoming:!0}),"incomers"),predecessors:yde({incoming:!0})});Pt(Da,{neighborhood:Vo(function(t){for(var e=[],r=this.nodes(),n=0;n<r.length;n++)for(var i=r[n],a=i.connectedEdges(),o=0;o<a.length;o++){var l=a[o],u=l.source(),h=l.target(),f=i===u?h:u;f.length>0&&e.push(f[0]),e.push(l[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:s(function(e){return this.neighborhood().add(this).filter(e)},"closedNeighborhood"),openNeighborhood:s(function(e){return this.neighborhood(e)},"openNeighborhood")});Da.neighbourhood=Da.neighborhood;Da.closedNeighbourhood=Da.closedNeighborhood;Da.openNeighbourhood=Da.openNeighborhood;Pt(Da,{source:Vo(s(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"sourceImpl"),"source"),target:Vo(s(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"targetImpl"),"target"),sources:vde({attr:"source"}),targets:vde({attr:"target"})});s(vde,"defineSourceFunction");Pt(Da,{edgesWith:Vo(xde(),"edgesWith"),edgesTo:Vo(xde({thisIsSrc:!0}),"edgesTo")});s(xde,"defineEdgesWithFunction");Pt(Da,{connectedEdges:Vo(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var i=r[n];if(i.isNode())for(var a=i._private.edges,o=0;o<a.length;o++){var l=a[o];e.push(l)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:Vo(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var i=r[n];i.isEdge()&&(e.push(i.source()[0]),e.push(i.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:Vo(bde(),"parallelEdges"),codirectedEdges:Vo(bde({codirected:!0}),"codirectedEdges")});s(bde,"defineParallelEdgesFunction");Pt(Da,{components:s(function(e){var r=this,n=r.cy(),i=n.collection(),a=e==null?r.nodes():e.nodes(),o=[];e!=null&&a.empty()&&(a=e.sources());var l=s(function(f,d){i.merge(f),a.unmerge(f),d.merge(f)},"visitInComponent");if(a.empty())return r.spawn();var u=s(function(){var f=n.collection();o.push(f);var d=a[0];l(d,f),r.bfs({directed:!1,roots:d,visit:s(function(m){return l(m,f)},"visit")}),f.forEach(function(p){p.connectedEdges().forEach(function(m){r.has(m)&&f.has(m.source())&&f.has(m.target())&&f.merge(m)})})},"_loop");do u();while(a.length>0);return o},"components"),component:s(function(){var e=this[0];return e.cy().mutableElements().components(e)[0]},"component")});Da.componentsOf=Da.components;ga=s(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){Jn("A collection must have a reference to the core");return}var a=new Ic,o=!1;if(!r)r=[];else if(r.length>0&&Er(r[0])&&!Nx(r[0])){o=!0;for(var l=[],u=new Xg,h=0,f=r.length;h<f;h++){var d=r[h];d.data==null&&(d.data={});var p=d.data;if(p.id==null)p.id=l0e();else if(e.hasElementWithId(p.id)||u.has(p.id))continue;var m=new s7(e,d,!1);l.push(m),u.add(p.id)}r=l}this.length=0;for(var g=0,y=r.length;g<y;g++){var v=r[g][0];if(v!=null){var x=v._private.data.id;(!n||!a.has(x))&&(n&&a.set(x,{index:this.length,ele:v}),this[this.length]=v,this.length++)}}this._private={eles:this,cy:e,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(b){this.lazyMap=b},rebuildMap:s(function(){for(var k=this.lazyMap=new Ic,A=this.eles,w=0;w<A.length;w++){var T=A[w];k.set(T.id(),{index:w,ele:T})}},"rebuildMap")},n&&(this._private.map=a),o&&!i&&this.restore()},"Collection"),wn=s7.prototype=ga.prototype=Object.create(Array.prototype);wn.instanceString=function(){return"collection"};wn.spawn=function(t,e){return new ga(this.cy(),t,e)};wn.spawnSelf=function(){return this.spawn(this)};wn.cy=function(){return this._private.cy};wn.renderer=function(){return this._private.cy.renderer()};wn.element=function(){return this[0]};wn.collection=function(){return Xde(this)?this:new ga(this._private.cy,[this])};wn.unique=function(){return new ga(this._private.cy,this,!0)};wn.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)};wn.getElementById=function(t){t=""+t;var e=this._private.cy,r=this._private.map.get(t);return r?r.ele:new ga(e)};wn.$id=wn.getElementById;wn.poolIndex=function(){var t=this._private.cy,e=t._private.elements,r=this[0]._private.data.id;return e._private.map.get(r).index};wn.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index};wn.indexOfId=function(t){return t=""+t,this._private.map.get(t).index};wn.json=function(t){var e=this.element(),r=this.cy();if(e==null&&t)return this;if(e!=null){var n=e._private;if(Er(t)){if(r.startBatch(),t.data){e.data(t.data);var i=n.data;if(e.isEdge()){var a=!1,o={},l=t.data.source,u=t.data.target;l!=null&&l!=i.source&&(o.source=""+l,a=!0),u!=null&&u!=i.target&&(o.target=""+u,a=!0),a&&(e=e.move(o))}else{var h="parent"in t.data,f=t.data.parent;h&&(f!=null||i.parent!=null)&&f!=i.parent&&(f===void 0&&(f=null),f!=null&&(f=""+f),e=e.move({parent:f}))}}t.position&&e.position(t.position);var d=s(function(y,v,x){var b=t[y];b!=null&&b!==n[y]&&(b?e[v]():e[x]())},"checkSwitch");return d("removed","remove","restore"),d("selected","select","unselect"),d("selectable","selectify","unselectify"),d("locked","lock","unlock"),d("grabbable","grabify","ungrabify"),d("pannable","panify","unpanify"),t.classes!=null&&e.classes(t.classes),r.endBatch(),this}else if(t===void 0){var p={data:Mc(n.data),position:Mc(n.position),group:n.group,removed:n.removed,selected:n.selected,selectable:n.selectable,locked:n.locked,grabbable:n.grabbable,pannable:n.pannable,classes:null};p.classes="";var m=0;return n.classes.forEach(function(g){return p.classes+=m++===0?g:" "+g}),p}}};wn.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e],n=r.json();t.push(n)}return t};wn.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var n=this[r],i=n.json(),a=new s7(t,i,!1);e.push(a)}return new ga(t,e)};wn.copy=wn.clone;wn.restore=function(){for(var t=arguments.length>0&&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=[],o=[],l,u=0,h=r.length;u<h;u++){var f=r[u];e&&!f.removed()||(f.isNode()?a.push(f):o.push(f))}l=a.concat(o);var d,p=s(function(){l.splice(d,1),d--},"removeFromElements");for(d=0;d<l.length;d++){var m=l[d],g=m._private,y=g.data;if(m.clearTraversalCache(),!(!e&&!g.removed)){if(y.id===void 0)y.id=l0e();else if(rt(y.id))y.id=""+y.id;else if(gf(y.id)||!At(y.id)){Jn("Can not create element with invalid string ID `"+y.id+"`"),p();continue}else if(n.hasElementWithId(y.id)){Jn("Can not create second element with ID `"+y.id+"`"),p();continue}}var v=y.id;if(m.isNode()){var x=g.position;x.x==null&&(x.x=0),x.y==null&&(x.y=0)}if(m.isEdge()){for(var b=m,k=["source","target"],A=k.length,w=!1,T=0;T<A;T++){var C=k[T],E=y[C];rt(E)&&(E=y[C]=""+y[C]),E==null||E===""?(Jn("Can not create edge `"+v+"` with unspecified "+C),w=!0):n.hasElementWithId(E)||(Jn("Can not create edge `"+v+"` with nonexistant "+C+" `"+E+"`"),w=!0)}if(w){p();continue}var S=n.getElementById(y.source),R=n.getElementById(y.target);S.same(R)?S._private.edges.push(b):(S._private.edges.push(b),R._private.edges.push(b)),b._private.source=S,b._private.target=R}g.map=new Ic,g.map.set(v,{ele:m,index:0}),g.removed=!1,e&&n.addToPool(m)}for(var D=0;D<a.length;D++){var L=a[D],P=L._private.data;rt(P.parent)&&(P.parent=""+P.parent);var M=P.parent,F=M!=null;if(F||L._private.parent){var I=L._private.parent?n.collection().merge(L._private.parent):n.getElementById(M);if(I.empty())P.parent=void 0;else if(I[0].removed())Kr("Node added with missing parent, reference to parent removed"),P.parent=void 0,L._private.parent=null;else{for(var O=!1,z=I;!z.empty();){if(L.same(z)){O=!0,P.parent=void 0;break}z=z.parent()}O||(I[0]._private.children.push(L),L._private.parent=I[0],i.hasCompoundNodes=!0)}}}if(l.length>0){for(var N=l.length===r.length?r:new ga(n,l),U=0;U<N.length;U++){var $=N[U];$.isNode()||($.parallelEdges().clearTraversalCache(),$.source().clearTraversalCache(),$.target().clearTraversalCache())}var W;i.hasCompoundNodes?W=n.collection().merge(N).merge(N.connectedNodes()).merge(N.parent()):W=N,W.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?N.emitAndNotify("add"):e&&N.emit("add")}return r};wn.removed=function(){var t=this[0];return t&&t._private.removed};wn.inside=function(){var t=this[0];return t&&!t._private.removed};wn.remove=function(){var t=arguments.length>0&&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 o(M){for(var F=M._private.edges,I=0;I<F.length;I++)u(F[I])}s(o,"addConnectedEdges");function l(M){for(var F=M._private.children,I=0;I<F.length;I++)u(F[I])}s(l,"addChildren");function u(M){var F=i[M.id()];e&&M.removed()||F||(i[M.id()]=!0,M.isNode()?(n.push(M),o(M),l(M)):n.unshift(M))}s(u,"add");for(var h=0,f=r.length;h<f;h++){var d=r[h];u(d)}function p(M,F){var I=M._private.edges;yf(I,F),M.clearTraversalCache()}s(p,"removeEdgeRef");function m(M){M.clearTraversalCache()}s(m,"removeParallelRef");var g=[];g.ids={};function y(M,F){F=F[0],M=M[0];var I=M._private.children,O=M.id();yf(I,F),F._private.parent=null,g.ids[O]||(g.ids[O]=!0,g.push(M))}s(y,"removeChildRef"),r.dirtyCompoundBoundsCache(),e&&a.removeFromPool(n);for(var v=0;v<n.length;v++){var x=n[v];if(x.isEdge()){var b=x.source()[0],k=x.target()[0];p(b,x),p(k,x);for(var A=x.parallelEdges(),w=0;w<A.length;w++){var T=A[w];m(T),T.isBundledBezier()&&T.dirtyBoundingBoxCache()}}else{var C=x.parent();C.length!==0&&y(C,x)}e&&(x._private.removed=!0)}var E=a._private.elements;a._private.hasCompoundNodes=!1;for(var S=0;S<E.length;S++){var R=E[S];if(R.isParent()){a._private.hasCompoundNodes=!0;break}}var D=new ga(this.cy(),n);D.size()>0&&(t?D.emitAndNotify("remove"):e&&D.emit("remove"));for(var L=0;L<g.length;L++){var P=g[L];(!e||!P.removed())&&P.updateStyle()}return D};wn.move=function(t){var e=this._private.cy,r=this,n=!1,i=!1,a=s(function(g){return g==null?g:""+g},"toString");if(t.source!==void 0||t.target!==void 0){var o=a(t.source),l=a(t.target),u=o!=null&&e.hasElementWithId(o),h=l!=null&&e.hasElementWithId(l);(u||h)&&(e.batch(function(){r.remove(n,i),r.emitAndNotify("moveout");for(var m=0;m<r.length;m++){var g=r[m],y=g._private.data;g.isEdge()&&(u&&(y.source=o),h&&(y.target=l))}r.restore(n,i)}),r.emitAndNotify("move"))}else if(t.parent!==void 0){var f=a(t.parent),d=f===null||e.hasElementWithId(f);if(d){var p=f===null?void 0:f;e.batch(function(){var m=r.remove(n,i);m.emitAndNotify("moveout");for(var g=0;g<r.length;g++){var y=r[g],v=y._private.data;y.isNode()&&(v.parent=p)}m.restore(n,i)}),r.emitAndNotify("move")}}return this};[k0e,cYe,zT,pf,Yg,CYe,f7,GYe,H0e,Y0e,HYe,ZT,$T,ma,mf,Da].forEach(function(t){Pt(wn,t)});JYe={add:s(function(e){var r,n=this;if(oo(e)){var i=e;if(i._private.cy===n)r=i.restore();else{for(var a=[],o=0;o<i.length;o++){var l=i[o];a.push(l.json())}r=new ga(n,a)}}else if(hn(e)){var u=e;r=new ga(n,u)}else if(Er(e)&&(hn(e.nodes)||hn(e.edges))){for(var h=e,f=[],d=["nodes","edges"],p=0,m=d.length;p<m;p++){var g=d[p],y=h[g];if(hn(y))for(var v=0,x=y.length;v<x;v++){var b=Pt({group:g},y[v]);f.push(b)}}r=new ga(n,f)}else{var k=e;r=new s7(n,k).collection()}return r},"add"),remove:s(function(e){if(!oo(e)){if(At(e)){var r=e;e=this.$(r)}}return e.remove()},"remove")};s(eXe,"generateCubicBezier");tXe=function(){function t(n){return-n.tension*n.x-n.friction*n.v}s(t,"springAccelerationForState");function e(n,i,a){var o={x:n.x+a.dx*i,v:n.v+a.dv*i,tension:n.tension,friction:n.friction};return{dx:o.v,dv:t(o)}}s(e,"springEvaluateStateWithDerivative");function r(n,i){var a={dx:n.v,dv:t(n)},o=e(n,i*.5,a),l=e(n,i*.5,o),u=e(n,i,l),h=1/6*(a.dx+2*(o.dx+l.dx)+u.dx),f=1/6*(a.dv+2*(o.dv+l.dv)+u.dv);return n.x=n.x+h*i,n.v=n.v+f*i,n}return s(r,"springIntegrateState"),s(function n(i,a,o){var l={x:-1,v:0,tension:null,friction:null},u=[0],h=0,f=1/1e4,d=16/1e3,p,m,g;for(i=parseFloat(i)||500,a=parseFloat(a)||20,o=o||null,l.tension=i,l.friction=a,p=o!==null,p?(h=n(i,a),m=h/o*d):m=d;g=r(g||l,m),u.push(1+g.x),h+=16,Math.abs(g.x)>f&&Math.abs(g.v)>f;);return p?function(y){return u[y*(u.length-1)|0]}:h},"springRK4Factory")}(),kn=s(function(e,r,n,i){var a=eXe(e,r,n,i);return function(o,l,u){return o+(l-o)*a(u)}},"cubicBezier"),GT={linear:s(function(e,r,n){return e+(r-e)*n},"linear"),ease:kn(.25,.1,.25,1),"ease-in":kn(.42,0,1,1),"ease-out":kn(0,0,.58,1),"ease-in-out":kn(.42,0,.58,1),"ease-in-sine":kn(.47,0,.745,.715),"ease-out-sine":kn(.39,.575,.565,1),"ease-in-out-sine":kn(.445,.05,.55,.95),"ease-in-quad":kn(.55,.085,.68,.53),"ease-out-quad":kn(.25,.46,.45,.94),"ease-in-out-quad":kn(.455,.03,.515,.955),"ease-in-cubic":kn(.55,.055,.675,.19),"ease-out-cubic":kn(.215,.61,.355,1),"ease-in-out-cubic":kn(.645,.045,.355,1),"ease-in-quart":kn(.895,.03,.685,.22),"ease-out-quart":kn(.165,.84,.44,1),"ease-in-out-quart":kn(.77,0,.175,1),"ease-in-quint":kn(.755,.05,.855,.06),"ease-out-quint":kn(.23,1,.32,1),"ease-in-out-quint":kn(.86,0,.07,1),"ease-in-expo":kn(.95,.05,.795,.035),"ease-out-expo":kn(.19,1,.22,1),"ease-in-out-expo":kn(1,0,0,1),"ease-in-circ":kn(.6,.04,.98,.335),"ease-out-circ":kn(.075,.82,.165,1),"ease-in-out-circ":kn(.785,.135,.15,.86),spring:s(function(e,r,n){if(n===0)return GT.linear;var i=tXe(e,r,n);return function(a,o,l){return a+(o-a)*i(l)}},"spring"),"cubic-bezier":kn};s(kde,"getEasedValue");s(wde,"getValue");s(Ng,"ease");s(rXe,"step$1");s(px,"valid");s(nXe,"startAnimation");s(Tde,"stepAll");iXe={animate:jr.animate(),animation:jr.animation(),animated:jr.animated(),clearQueue:jr.clearQueue(),delay:jr.delay(),delayAnimation:jr.delayAnimation(),stop:jr.stop(),addToAnimationPool:s(function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},"addToAnimationPool"),stopAnimationLoop:s(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:s(function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&YT(s(function(a){Tde(a,e),r()},"animationStep"))}s(r,"headlessStep");var n=e.renderer();n&&n.beforeRender?n.beforeRender(s(function(a,o){Tde(o,e)},"rendererAnimationStep"),n.beforeRenderPriorities.animations):r()},"startAnimationLoop")},aXe={qualifierCompare:s(function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},"qualifierCompare"),eventMatches:s(function(e,r,n){var i=r.qualifier;return i!=null?e!==n.target&&Nx(n.target)&&i.matches(n.target):!0},"eventMatches"),addEventFields:s(function(e,r){r.cy=e,r.target=e},"addEventFields"),callbackContext:s(function(e,r,n){return r.qualifier!=null?n.target:e},"callbackContext")},NT=s(function(e){return At(e)?new vf(e):e},"argSelector"),K0e={createEmitter:s(function(){var e=this._private;return e.emitter||(e.emitter=new d7(aXe,this)),this},"createEmitter"),emitter:s(function(){return this._private.emitter},"emitter"),on:s(function(e,r,n){return this.emitter().on(e,NT(r),n),this},"on"),removeListener:s(function(e,r,n){return this.emitter().removeListener(e,NT(r),n),this},"removeListener"),removeAllListeners:s(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:s(function(e,r,n){return this.emitter().one(e,NT(r),n),this},"one"),once:s(function(e,r,n){return this.emitter().one(e,NT(r),n),this},"once"),emit:s(function(e,r){return this.emitter().emit(e,r),this},"emit"),emitAndNotify:s(function(e,r){return this.emit(e),this.notify(e,r),this},"emitAndNotify")};jr.eventAliasesOn(K0e);YO={png:s(function(e){var r=this._private.renderer;return e=e||{},r.png(e)},"png"),jpg:s(function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)},"jpg")};YO.jpeg=YO.jpg;VT={layout:s(function(e){var r=this;if(e==null){Jn("Layout options must be specified to make a layout");return}if(e.name==null){Jn("A `name` must be specified to make a layout");return}var n=e.name,i=r.extension("layout",n);if(i==null){Jn("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;At(e.eles)?a=r.$(e.eles):a=e.eles!=null?e.eles:r.$();var o=new i(Pt({},e,{cy:r,eles:a}));return o},"layout")};VT.createLayout=VT.makeLayout=VT.layout;sXe={notify:s(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)}},"notify"),notifications:s(function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},"notifications"),noNotifications:s(function(e){this.notifications(!1),e(),this.notifications(!0)},"noNotifications"),batching:s(function(){return this._private.batchCount>0},"batching"),startBatch:s(function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},"startBatch"),endBatch:s(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},"endBatch"),batch:s(function(e){return this.startBatch(),e(),this.endBatch(),this},"batch"),batchData:s(function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),i=0;i<n.length;i++){var a=n[i],o=e[a],l=r.getElementById(a);l.data(o)}})},"batchData")},oXe=ya({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),XO={renderTo:s(function(e,r,n,i){var a=this._private.renderer;return a.renderTo(e,r,n,i),this},"renderTo"),renderer:s(function(){return this._private.renderer},"renderer"),forceRender:s(function(){return this.notify("draw"),this},"forceRender"),resize:s(function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},"resize"),initRenderer:s(function(e){var r=this,n=r.extension("renderer",e.name);if(n==null){Jn("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}e.wheelSensitivity!==void 0&&Kr("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var i=oXe(e);i.cy=r,r._private.renderer=new n(i),this.notify("init")},"initRenderer"),destroyRenderer:s(function(){var e=this;e.notify("destroy");var r=e.container();if(r)for(r._cyreg=null;r.childNodes.length>0;)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=[]})},"destroyRenderer"),onRender:s(function(e){return this.on("render",e)},"onRender"),offRender:s(function(e){return this.off("render",e)},"offRender")};XO.invalidateDimensions=XO.resize;UT={collection:s(function(e,r){return At(e)?this.$(e):oo(e)?e.collection():hn(e)?(r||(r={}),new ga(this,e,r.unique,r.removed)):new ga(this)},"collection"),nodes:s(function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},"nodes"),edges:s(function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},"edges"),$:s(function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},"$"),mutableElements:s(function(){return this._private.elements},"mutableElements")};UT.elements=UT.filter=UT.$;Ma={},bx="t",lXe="f";Ma.apply=function(t){for(var e=this,r=e._private,n=r.cy,i=n.collection(),a=0;a<t.length;a++){var o=t[a],l=e.getContextMeta(o);if(!l.empty){var u=e.getContextStyle(l),h=e.applyContextStyle(l,u,o);o._private.appliedInitStyle?e.updateTransitions(o,h.diffProps):o._private.appliedInitStyle=!0;var f=e.updateStyleHints(o);f&&i.push(o)}}return i};Ma.getPropertiesDiff=function(t,e){var r=this,n=r._private.propDiffs=r._private.propDiffs||{},i=t+"-"+e,a=n[i];if(a)return a;for(var o=[],l={},u=0;u<r.length;u++){var h=r[u],f=t[u]===bx,d=e[u]===bx,p=f!==d,m=h.mappedProperties.length>0;if(p||d&&m){var g=void 0;p&&m||p?g=h.properties:m&&(g=h.mappedProperties);for(var y=0;y<g.length;y++){for(var v=g[y],x=v.name,b=!1,k=u+1;k<r.length;k++){var A=r[k],w=e[k]===bx;if(w&&(b=A.properties[v.name]!=null,b))break}!l[x]&&!b&&(l[x]=!0,o.push(x))}}}return n[i]=o,o};Ma.getContextMeta=function(t){for(var e=this,r="",n,i=t._private.styleCxtKey||"",a=0;a<e.length;a++){var o=e[a],l=o.selector&&o.selector.matches(t);l?r+=bx:r+=lXe}return n=e.getPropertiesDiff(i,r),t._private.styleCxtKey=r,{key:r,diffPropNames:n,empty:n.length===0}};Ma.getContextStyle=function(t){var e=t.key,r=this,n=this._private.contextStyles=this._private.contextStyles||{};if(n[e])return n[e];for(var i={_private:{key:e}},a=0;a<r.length;a++){var o=r[a],l=e[a]===bx;if(l)for(var u=0;u<o.properties.length;u++){var h=o.properties[u];i[h.name]=h}}return n[e]=i,i};Ma.applyContextStyle=function(t,e,r){for(var n=this,i=t.diffPropNames,a={},o=n.types,l=0;l<i.length;l++){var u=i[l],h=e[u],f=r.pstyle(u);if(!h)if(f)f.bypass?h={name:u,deleteBypassed:!0}:h={name:u,delete:!0};else continue;if(f!==h){if(h.mapped===o.fn&&f!=null&&f.mapping!=null&&f.mapping.value===h.value){var d=f.mapping,p=d.fnValue=h.value(r);if(p===d.prevFnValue)continue}var m=a[u]={prev:f};n.applyParsedProperty(r,h),m.next=r.pstyle(u),m.next&&m.next.bypass&&(m.next=m.next.bypassed)}}return{diffProps:a}};Ma.updateStyleHints=function(t){var e=t._private,r=this,n=r.propertyGroupNames,i=r.propertyGroupKeys,a=s(function(K,re,ie){return r.getPropertiesHash(K,re,ie)},"propHash"),o=e.styleKey;if(t.removed())return!1;var l=e.group==="nodes",u=t._private.style;n=Object.keys(u);for(var h=0;h<i.length;h++){var f=i[h];e.styleKeys[f]=[Bg,gx]}for(var d=s(function(K,re){return e.styleKeys[re][0]=Tx(K,e.styleKeys[re][0])},"updateGrKey1"),p=s(function(K,re){return e.styleKeys[re][1]=Ex(K,e.styleKeys[re][1])},"updateGrKey2"),m=s(function(K,re){d(K,re),p(K,re)},"updateGrKey"),g=s(function(K,re){for(var ie=0;ie<K.length;ie++){var ye=K.charCodeAt(ie);d(ye,re),p(ye,re)}},"updateGrKeyWStr"),y=2e9,v=s(function(K){return-128<K&&K<128&&Math.floor(K)!==K?y-(K*1024|0):K},"cleanNum"),x=0;x<n.length;x++){var b=n[x],k=u[b];if(k!=null){var A=this.properties[b],w=A.type,T=A.groupKey,C=void 0;A.hashOverride!=null?C=A.hashOverride(t,k):k.pfValue!=null&&(C=k.pfValue);var E=A.enums==null?k.value:null,S=C!=null,R=E!=null,D=S||R,L=k.units;if(w.number&&D&&!w.multiple){var P=S?C:E;m(v(P),T),!S&&L!=null&&g(L,T)}else g(k.strValue,T)}}for(var M=[Bg,gx],F=0;F<i.length;F++){var I=i[F],O=e.styleKeys[I];M[0]=Tx(O[0],M[0]),M[1]=Ex(O[1],M[1])}e.styleKey=dUe(M[0],M[1]);var z=e.styleKeys;e.labelDimsKey=uf(z.labelDimensions);var N=a(t,["label"],z.labelDimensions);if(e.labelKey=uf(N),e.labelStyleKey=uf(CT(z.commonLabel,N)),!l){var U=a(t,["source-label"],z.labelDimensions);e.sourceLabelKey=uf(U),e.sourceLabelStyleKey=uf(CT(z.commonLabel,U));var $=a(t,["target-label"],z.labelDimensions);e.targetLabelKey=uf($),e.targetLabelStyleKey=uf(CT(z.commonLabel,$))}if(l){var W=e.styleKeys,ee=W.nodeBody,te=W.nodeBorder,ce=W.nodeOutline,Z=W.backgroundImage,fe=W.compound,ne=W.pie,H=[ee,te,ce,Z,fe,ne].filter(function(Q){return Q!=null}).reduce(CT,[Bg,gx]);e.nodeKey=uf(H),e.hasPie=ne!=null&&ne[0]!==Bg&&ne[1]!==gx}return o!==e.styleKey};Ma.clearStyleHints=function(t){var e=t._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null};Ma.applyParsedProperty=function(t,e){var r=this,n=e,i=t._private.style,a,o=r.types,l=r.properties[n.name].type,u=n.bypass,h=i[n.name],f=h&&h.bypass,d=t._private,p="mapping",m=s(function(ee){return ee==null?null:ee.pfValue!=null?ee.pfValue:ee.value},"getVal"),g=s(function(){var ee=m(h),te=m(n);r.checkTriggers(t,n.name,ee,te)},"checkTriggers");if(e.name==="curve-style"&&t.isEdge()&&(e.value!=="bezier"&&t.isLoop()||e.value==="haystack"&&(t.source().isParent()||t.target().isParent()))&&(n=e=this.parse(e.name,"bezier",u)),n.delete)return i[n.name]=void 0,g(),!0;if(n.deleteBypassed)return h?h.bypass?(h.bypassed=void 0,g(),!0):!1:(g(),!0);if(n.deleteBypass)return h?h.bypass?(i[n.name]=h.bypassed,g(),!0):!1:(g(),!0);var y=s(function(){Kr("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+n.name+"` with data field `"+n.field+"`); try a `["+n.field+"]` selector to limit scope to elements with `"+n.field+"` defined")},"printMappingErr");switch(n.mapped){case o.mapData:{for(var v=n.field.split("."),x=d.data,b=0;b<v.length&&x;b++){var k=v[b];x=x[k]}if(x==null)return y(),!1;var A;if(rt(x)){var w=n.fieldMax-n.fieldMin;w===0?A=0:A=(x-n.fieldMin)/w}else return Kr("Do not use continuous mappers without specifying numeric data (i.e. `"+n.field+": "+x+"` for `"+t.id()+"` is non-numeric)"),!1;if(A<0?A=0:A>1&&(A=1),l.color){var T=n.valueMin[0],C=n.valueMax[0],E=n.valueMin[1],S=n.valueMax[1],R=n.valueMin[2],D=n.valueMax[2],L=n.valueMin[3]==null?1:n.valueMin[3],P=n.valueMax[3]==null?1:n.valueMax[3],M=[Math.round(T+(C-T)*A),Math.round(E+(S-E)*A),Math.round(R+(D-R)*A),Math.round(L+(P-L)*A)];a={bypass:n.bypass,name:n.name,value:M,strValue:"rgb("+M[0]+", "+M[1]+", "+M[2]+")"}}else if(l.number){var F=n.valueMin+(n.valueMax-n.valueMin)*A;a=this.parse(n.name,F,n.bypass,p)}else return!1;if(!a)return y(),!1;a.mapping=n,n=a;break}case o.data:{for(var I=n.field.split("."),O=d.data,z=0;z<I.length&&O;z++){var N=I[z];O=O[N]}if(O!=null&&(a=this.parse(n.name,O,n.bypass,p)),!a)return y(),!1;a.mapping=n,n=a;break}case o.fn:{var U=n.value,$=n.fnValue!=null?n.fnValue:U(t);if(n.prevFnValue=$,$==null)return Kr("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+t.id()+"` is null)"),!1;if(a=this.parse(n.name,$,n.bypass,p),!a)return Kr("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+t.id()+"` is invalid)"),!1;a.mapping=Mc(n),n=a;break}case void 0:break;default:return!1}return u?(f?n.bypassed=h.bypassed:n.bypassed=h,i[n.name]=n):f?h.bypassed=n:i[n.name]=n,g(),!0};Ma.cleanElements=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),!e)n._private.style={};else for(var i=n._private.style,a=Object.keys(i),o=0;o<a.length;o++){var l=a[o],u=i[l];u!=null&&(u.bypass?u.bypassed=null:i[l]=null)}}};Ma.update=function(){var t=this._private.cy,e=t.mutableElements();e.updateStyle()};Ma.updateTransitions=function(t,e){var r=this,n=t._private,i=t.pstyle("transition-property").value,a=t.pstyle("transition-duration").pfValue,o=t.pstyle("transition-delay").pfValue;if(i.length>0&&a>0){for(var l={},u=!1,h=0;h<i.length;h++){var f=i[h],d=t.pstyle(f),p=e[f];if(p){var m=p.prev,g=m,y=p.next!=null?p.next:d,v=!1,x=void 0,b=1e-6;g&&(rt(g.pfValue)&&rt(y.pfValue)?(v=y.pfValue-g.pfValue,x=g.pfValue+b*v):rt(g.value)&&rt(y.value)?(v=y.value-g.value,x=g.value+b*v):hn(g.value)&&hn(y.value)&&(v=g.value[0]!==y.value[0]||g.value[1]!==y.value[1]||g.value[2]!==y.value[2],x=g.strValue),v&&(l[f]=y.strValue,this.applyBypass(t,f,x),u=!0))}}if(!u)return;n.transitioning=!0,new jg(function(k){o>0?t.delayAnimation(o).play().promise().then(k):k()}).then(function(){return t.animation({style:l,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)};Ma.checkTrigger=function(t,e,r,n,i,a){var o=this.properties[e],l=i(o);l!=null&&l(r,n)&&a(o)};Ma.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)})};Ma.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBounds},function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),i.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(r==="bezier"||n==="bezier")&&t.parallelEdges().forEach(function(a){a.isBundledBezier()&&a.dirtyBoundingBoxCache()}),i.triggersBoundsOfConnectedEdges&&e==="display"&&(r==="none"||n==="none")&&t.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};Ma.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n)};Fx={};Fx.applyBypass=function(t,e,r,n){var i=this,a=[],o=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var l=0;l<i.properties.length;l++){var u=i.properties[l],h=u.name,f=this.parse(h,r,!0);f&&a.push(f)}}else if(At(e)){var d=this.parse(e,r,!0);d&&a.push(d)}else if(Er(e)){var p=e;n=r;for(var m=Object.keys(p),g=0;g<m.length;g++){var y=m[g],v=p[y];if(v===void 0&&(v=p[n7(y)]),v!==void 0){var x=this.parse(y,v,!0);x&&a.push(x)}}}else return!1;if(a.length===0)return!1;for(var b=!1,k=0;k<t.length;k++){for(var A=t[k],w={},T=void 0,C=0;C<a.length;C++){var E=a[C];if(n){var S=A.pstyle(E.name);T=w[E.name]={prev:S}}b=this.applyParsedProperty(A,Mc(E))||b,n&&(T.next=A.pstyle(E.name))}b&&this.updateStyleHints(A),n&&this.updateTransitions(A,w,o)}return b};Fx.overrideBypass=function(t,e,r){e=sP(e);for(var n=0;n<t.length;n++){var i=t[n],a=i._private.style[e],o=this.properties[e].type,l=o.color,u=o.mutiple,h=a?a.pfValue!=null?a.pfValue:a.value:null;!a||!a.bypass?this.applyBypass(i,e,r):(a.value=r,a.pfValue!=null&&(a.pfValue=r),l?a.strValue="rgb("+r.join(",")+")":u?a.strValue=r.join(" "):a.strValue=""+r,this.updateStyleHints(i)),this.checkTriggers(i,e,h,r)}};Fx.removeAllBypasses=function(t,e){return this.removeBypasses(t,this.propertyNames,e)};Fx.removeBypasses=function(t,e,r){for(var n=!0,i=0;i<t.length;i++){for(var a=t[i],o={},l=0;l<e.length;l++){var u=e[l],h=this.properties[u],f=a.pstyle(h.name);if(!(!f||!f.bypass)){var d="",p=this.parse(u,d,!0),m=o[h.name]={prev:f};this.applyParsedProperty(a,p),m.next=a.pstyle(h.name)}}this.updateStyleHints(a),r&&this.updateTransitions(a,o,n)}};bP={};bP.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1};bP.containerCss=function(t){var e=this._private.cy,r=e.container(),n=e.window();if(n&&r&&n.getComputedStyle)return n.getComputedStyle(r).getPropertyValue(t)};Nc={};Nc.getRenderedStyle=function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)};Nc.getRawStyle=function(t,e){var r=this;if(t=t[0],t){for(var n={},i=0;i<r.properties.length;i++){var a=r.properties[i],o=r.getStylePropertyValue(t,a.name,e);o!=null&&(n[a.name]=o,n[n7(a.name)]=o)}return n}};Nc.getIndexedStyle=function(t,e,r,n){var i=t.pstyle(e)[r][n];return i??t.cy().style().getDefaultProperty(e)[r][0]};Nc.getStylePropertyValue=function(t,e,r){var n=this;if(t=t[0],t){var i=n.properties[e];i.alias&&(i=i.pointsTo);var a=i.type,o=t.pstyle(i.name);if(o){var l=o.value,u=o.units,h=o.strValue;if(r&&a.number&&l!=null&&rt(l)){var f=t.cy().zoom(),d=s(function(v){return v*f},"getRenderedValue"),p=s(function(v,x){return d(v)+x},"getValueStringWithUnits"),m=hn(l),g=m?u.every(function(y){return y!=null}):u!=null;return g?m?l.map(function(y,v){return p(y,u[v])}).join(" "):p(l,u):m?l.map(function(y){return At(y)?y:""+d(y)}).join(" "):""+d(l)}else if(h!=null)return h}return null}};Nc.getAnimationStartStyle=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n],a=i.name,o=t.pstyle(a);o!==void 0&&(Er(o)?o=this.parse(a,o.strValue):o=this.parse(a,o)),o&&(r[a]=o)}return r};Nc.getPropsList=function(t){var e=this,r=[],n=t,i=e.properties;if(n)for(var a=Object.keys(n),o=0;o<a.length;o++){var l=a[o],u=n[l],h=i[l]||i[sP(l)],f=this.parse(h.name,u);f&&r.push(f)}return r};Nc.getNonDefaultPropertiesHash=function(t,e,r){var n=r.slice(),i,a,o,l,u,h;for(u=0;u<e.length;u++)if(i=e[u],a=t.pstyle(i,!1),a!=null)if(a.pfValue!=null)n[0]=Tx(l,n[0]),n[1]=Ex(l,n[1]);else for(o=a.strValue,h=0;h<o.length;h++)l=o.charCodeAt(h),n[0]=Tx(l,n[0]),n[1]=Ex(l,n[1]);return n};Nc.getPropertiesHash=Nc.getNonDefaultPropertiesHash;g7={};g7.appendFromJson=function(t){for(var e=this,r=0;r<t.length;r++){var n=t[r],i=n.selector,a=n.style||n.css,o=Object.keys(a);e.selector(i);for(var l=0;l<o.length;l++){var u=o[l],h=a[u];e.css(u,h)}}return e};g7.fromJson=function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e};g7.json=function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],n=r.selector,i=r.properties,a={},o=0;o<i.length;o++){var l=i[o];a[l.name]=l.strValue}t.push({selector:n?n.toString():"core",style:a})}return t};kP={};kP.appendFromString=function(t){var e=this,r=this,n=""+t,i,a,o;n=n.replace(/[/][*](\s|.)+?[*][/]/g,"");function l(){n.length>i.length?n=n.substr(i.length):n=""}s(l,"removeSelAndBlockFromRemaining");function u(){a.length>o.length?a=a.substr(o.length):a=""}for(s(u,"removePropAndValFromRem");;){var h=n.match(/^\s*$/);if(h)break;var f=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!f){Kr("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=f[0];var d=f[1];if(d!=="core"){var p=new vf(d);if(p.invalid){Kr("Skipping parsing of block: Invalid selector found in string stylesheet: "+d),l();continue}}var m=f[2],g=!1;a=m;for(var y=[];;){var v=a.match(/^\s*$/);if(v)break;var x=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!x){Kr("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+m),g=!0;break}o=x[0];var b=x[1],k=x[2],A=e.properties[b];if(!A){Kr("Skipping property: Invalid property name in: "+o),u();continue}var w=r.parse(b,k);if(!w){Kr("Skipping property: Invalid property definition in: "+o),u();continue}y.push({name:b,val:k}),u()}if(g){l();break}r.selector(d);for(var T=0;T<y.length;T++){var C=y[T];r.css(C.name,C.val)}l()}return r};kP.fromString=function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e};pa={};(function(){var t=Oi,e=gVe,r=vVe,n=xVe,i=bVe,a=s(function(H){return"^"+H+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},"data"),o=s(function(H){var Q=t+"|\\w+|"+e+"|"+r+"|"+n+"|"+i;return"^"+H+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+Q+")\\s*\\,\\s*("+Q+")\\)$"},"mapData"),l=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];pa.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:a("data")},layoutData:{mapping:!0,regex:a("layoutData")},scratch:{mapping:!0,regex:a("scratch")},mapData:{mapping:!0,regex:o("mapData")},mapLayoutData:{mapping:!0,regex:o("mapLayoutData")},mapScratch:{mapping:!0,regex:o("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:l,singleRegexMatchValue:!0},urls:{regexes:l,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:s(function(H,Q){switch(H.length){case 2:return Q[0]!=="deg"&&Q[0]!=="rad"&&Q[1]!=="deg"&&Q[1]!=="rad";case 1:return At(H[0])||Q[0]==="deg"||Q[0]==="rad";default:return!1}},"validate")},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:s(function(H){var Q=H.length;return Q===1||Q===2||Q===4},"validate")}};var u={zeroNonZero:s(function(H,Q){return(H==null||Q==null)&&H!==Q||H==0&&Q!=0?!0:H!=0&&Q==0},"zeroNonZero"),any:s(function(H,Q){return H!=Q},"any"),emptyNonEmpty:s(function(H,Q){var K=gf(H),re=gf(Q);return K&&!re||!K&&re},"emptyNonEmpty")},h=pa.types,f=[{name:"label",type:h.text,triggersBounds:u.any,triggersZOrder:u.emptyNonEmpty},{name:"text-rotation",type:h.textRotation,triggersBounds:u.any},{name:"text-margin-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"text-margin-y",type:h.bidirectionalSize,triggersBounds:u.any}],d=[{name:"source-label",type:h.text,triggersBounds:u.any},{name:"source-text-rotation",type:h.textRotation,triggersBounds:u.any},{name:"source-text-margin-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"source-text-margin-y",type:h.bidirectionalSize,triggersBounds:u.any},{name:"source-text-offset",type:h.size,triggersBounds:u.any}],p=[{name:"target-label",type:h.text,triggersBounds:u.any},{name:"target-text-rotation",type:h.textRotation,triggersBounds:u.any},{name:"target-text-margin-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"target-text-margin-y",type:h.bidirectionalSize,triggersBounds:u.any},{name:"target-text-offset",type:h.size,triggersBounds:u.any}],m=[{name:"font-family",type:h.fontFamily,triggersBounds:u.any},{name:"font-style",type:h.fontStyle,triggersBounds:u.any},{name:"font-weight",type:h.fontWeight,triggersBounds:u.any},{name:"font-size",type:h.size,triggersBounds:u.any},{name:"text-transform",type:h.textTransform,triggersBounds:u.any},{name:"text-wrap",type:h.textWrap,triggersBounds:u.any},{name:"text-overflow-wrap",type:h.textOverflowWrap,triggersBounds:u.any},{name:"text-max-width",type:h.size,triggersBounds:u.any},{name:"text-outline-width",type:h.size,triggersBounds:u.any},{name:"line-height",type:h.positiveNumber,triggersBounds:u.any}],g=[{name:"text-valign",type:h.valign,triggersBounds:u.any},{name:"text-halign",type:h.halign,triggersBounds:u.any},{name:"color",type:h.color},{name:"text-outline-color",type:h.color},{name:"text-outline-opacity",type:h.zeroOneNumber},{name:"text-background-color",type:h.color},{name:"text-background-opacity",type:h.zeroOneNumber},{name:"text-background-padding",type:h.size,triggersBounds:u.any},{name:"text-border-opacity",type:h.zeroOneNumber},{name:"text-border-color",type:h.color},{name:"text-border-width",type:h.size,triggersBounds:u.any},{name:"text-border-style",type:h.borderStyle,triggersBounds:u.any},{name:"text-background-shape",type:h.textBackgroundShape,triggersBounds:u.any},{name:"text-justification",type:h.justification}],y=[{name:"events",type:h.bool,triggersZOrder:u.any},{name:"text-events",type:h.bool,triggersZOrder:u.any}],v=[{name:"display",type:h.display,triggersZOrder:u.any,triggersBounds:u.any,triggersBoundsOfConnectedEdges:!0},{name:"visibility",type:h.visibility,triggersZOrder:u.any},{name:"opacity",type:h.zeroOneNumber,triggersZOrder:u.zeroNonZero},{name:"text-opacity",type:h.zeroOneNumber},{name:"min-zoomed-font-size",type:h.size},{name:"z-compound-depth",type:h.zCompoundDepth,triggersZOrder:u.any},{name:"z-index-compare",type:h.zIndexCompare,triggersZOrder:u.any},{name:"z-index",type:h.number,triggersZOrder:u.any}],x=[{name:"overlay-padding",type:h.size,triggersBounds:u.any},{name:"overlay-color",type:h.color},{name:"overlay-opacity",type:h.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"overlay-shape",type:h.overlayShape,triggersBounds:u.any},{name:"overlay-corner-radius",type:h.cornerRadius}],b=[{name:"underlay-padding",type:h.size,triggersBounds:u.any},{name:"underlay-color",type:h.color},{name:"underlay-opacity",type:h.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"underlay-shape",type:h.overlayShape,triggersBounds:u.any},{name:"underlay-corner-radius",type:h.cornerRadius}],k=[{name:"transition-property",type:h.propList},{name:"transition-duration",type:h.time},{name:"transition-delay",type:h.time},{name:"transition-timing-function",type:h.easing}],A=s(function(H,Q){return Q.value==="label"?-H.poolIndex():Q.pfValue},"nodeSizeHashOverride"),w=[{name:"height",type:h.nodeSize,triggersBounds:u.any,hashOverride:A},{name:"width",type:h.nodeSize,triggersBounds:u.any,hashOverride:A},{name:"shape",type:h.nodeShape,triggersBounds:u.any},{name:"shape-polygon-points",type:h.polygonPointList,triggersBounds:u.any},{name:"corner-radius",type:h.cornerRadius},{name:"background-color",type:h.color},{name:"background-fill",type:h.fill},{name:"background-opacity",type:h.zeroOneNumber},{name:"background-blacken",type:h.nOneOneNumber},{name:"background-gradient-stop-colors",type:h.colors},{name:"background-gradient-stop-positions",type:h.percentages},{name:"background-gradient-direction",type:h.gradientDirection},{name:"padding",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"padding-relative-to",type:h.paddingRelativeTo,triggersBounds:u.any},{name:"bounds-expansion",type:h.boundsExpansion,triggersBounds:u.any}],T=[{name:"border-color",type:h.color},{name:"border-opacity",type:h.zeroOneNumber},{name:"border-width",type:h.size,triggersBounds:u.any},{name:"border-style",type:h.borderStyle},{name:"border-cap",type:h.lineCap},{name:"border-join",type:h.lineJoin},{name:"border-dash-pattern",type:h.numbers},{name:"border-dash-offset",type:h.number},{name:"border-position",type:h.linePosition}],C=[{name:"outline-color",type:h.color},{name:"outline-opacity",type:h.zeroOneNumber},{name:"outline-width",type:h.size,triggersBounds:u.any},{name:"outline-style",type:h.borderStyle},{name:"outline-offset",type:h.size,triggersBounds:u.any}],E=[{name:"background-image",type:h.urls},{name:"background-image-crossorigin",type:h.bgCrossOrigin},{name:"background-image-opacity",type:h.zeroOneNumbers},{name:"background-image-containment",type:h.bgContainment},{name:"background-image-smoothing",type:h.bools},{name:"background-position-x",type:h.bgPos},{name:"background-position-y",type:h.bgPos},{name:"background-width-relative-to",type:h.bgRelativeTo},{name:"background-height-relative-to",type:h.bgRelativeTo},{name:"background-repeat",type:h.bgRepeat},{name:"background-fit",type:h.bgFit},{name:"background-clip",type:h.bgClip},{name:"background-width",type:h.bgWH},{name:"background-height",type:h.bgWH},{name:"background-offset-x",type:h.bgPos},{name:"background-offset-y",type:h.bgPos}],S=[{name:"position",type:h.position,triggersBounds:u.any},{name:"compound-sizing-wrt-labels",type:h.compoundIncludeLabels,triggersBounds:u.any},{name:"min-width",type:h.size,triggersBounds:u.any},{name:"min-width-bias-left",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"min-width-bias-right",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"min-height",type:h.size,triggersBounds:u.any},{name:"min-height-bias-top",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"min-height-bias-bottom",type:h.sizeMaybePercent,triggersBounds:u.any}],R=[{name:"line-style",type:h.lineStyle},{name:"line-color",type:h.color},{name:"line-fill",type:h.fill},{name:"line-cap",type:h.lineCap},{name:"line-opacity",type:h.zeroOneNumber},{name:"line-dash-pattern",type:h.numbers},{name:"line-dash-offset",type:h.number},{name:"line-outline-width",type:h.size},{name:"line-outline-color",type:h.color},{name:"line-gradient-stop-colors",type:h.colors},{name:"line-gradient-stop-positions",type:h.percentages},{name:"curve-style",type:h.curveStyle,triggersBounds:u.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:h.zeroOneNumber,triggersBounds:u.any},{name:"source-endpoint",type:h.edgeEndpoint,triggersBounds:u.any},{name:"target-endpoint",type:h.edgeEndpoint,triggersBounds:u.any},{name:"control-point-step-size",type:h.size,triggersBounds:u.any},{name:"control-point-distances",type:h.bidirectionalSizes,triggersBounds:u.any},{name:"control-point-weights",type:h.numbers,triggersBounds:u.any},{name:"segment-distances",type:h.bidirectionalSizes,triggersBounds:u.any},{name:"segment-weights",type:h.numbers,triggersBounds:u.any},{name:"segment-radii",type:h.numbers,triggersBounds:u.any},{name:"radius-type",type:h.radiusType,triggersBounds:u.any},{name:"taxi-turn",type:h.bidirectionalSizeMaybePercent,triggersBounds:u.any},{name:"taxi-turn-min-distance",type:h.size,triggersBounds:u.any},{name:"taxi-direction",type:h.axisDirection,triggersBounds:u.any},{name:"taxi-radius",type:h.number,triggersBounds:u.any},{name:"edge-distances",type:h.edgeDistances,triggersBounds:u.any},{name:"arrow-scale",type:h.positiveNumber,triggersBounds:u.any},{name:"loop-direction",type:h.angle,triggersBounds:u.any},{name:"loop-sweep",type:h.angle,triggersBounds:u.any},{name:"source-distance-from-node",type:h.size,triggersBounds:u.any},{name:"target-distance-from-node",type:h.size,triggersBounds:u.any}],D=[{name:"ghost",type:h.bool,triggersBounds:u.any},{name:"ghost-offset-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"ghost-offset-y",type:h.bidirectionalSize,triggersBounds:u.any},{name:"ghost-opacity",type:h.zeroOneNumber}],L=[{name:"selection-box-color",type:h.color},{name:"selection-box-opacity",type:h.zeroOneNumber},{name:"selection-box-border-color",type:h.color},{name:"selection-box-border-width",type:h.size},{name:"active-bg-color",type:h.color},{name:"active-bg-opacity",type:h.zeroOneNumber},{name:"active-bg-size",type:h.size},{name:"outside-texture-bg-color",type:h.color},{name:"outside-texture-bg-opacity",type:h.zeroOneNumber}],P=[];pa.pieBackgroundN=16,P.push({name:"pie-size",type:h.sizeMaybePercent});for(var M=1;M<=pa.pieBackgroundN;M++)P.push({name:"pie-"+M+"-background-color",type:h.color}),P.push({name:"pie-"+M+"-background-size",type:h.percent}),P.push({name:"pie-"+M+"-background-opacity",type:h.zeroOneNumber});var F=[],I=pa.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:h.arrowShape,triggersBounds:u.any},{name:"arrow-color",type:h.color},{name:"arrow-fill",type:h.arrowFill},{name:"arrow-width",type:h.arrowWidth}].forEach(function(ne){I.forEach(function(H){var Q=H+"-"+ne.name,K=ne.type,re=ne.triggersBounds;F.push({name:Q,type:K,triggersBounds:re})})},{});var O=pa.properties=[].concat(y,k,v,x,b,D,g,m,f,d,p,w,T,C,E,P,S,R,F,L),z=pa.propertyGroups={behavior:y,transition:k,visibility:v,overlay:x,underlay:b,ghost:D,commonLabel:g,labelDimensions:m,mainLabel:f,sourceLabel:d,targetLabel:p,nodeBody:w,nodeBorder:T,nodeOutline:C,backgroundImage:E,pie:P,compound:S,edgeLine:R,edgeArrow:F,core:L},N=pa.propertyGroupNames={},U=pa.propertyGroupKeys=Object.keys(z);U.forEach(function(ne){N[ne]=z[ne].map(function(H){return H.name}),z[ne].forEach(function(H){return H.groupKey=ne})});var $=pa.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];pa.propertyNames=O.map(function(ne){return ne.name});for(var W=0;W<O.length;W++){var ee=O[W];O[ee.name]=ee}for(var te=0;te<$.length;te++){var ce=$[te],Z=O[ce.pointsTo],fe={name:ce.name,alias:!0,pointsTo:Z};O.push(fe),O[ce.name]=fe}})();pa.getDefaultProperty=function(t){return this.getDefaultProperties()[t]};pa.getDefaultProperties=function(){var t=this._private;if(t.defaultProperties!=null)return t.defaultProperties;for(var e=Pt({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(u,h){for(var f=1;f<=pa.pieBackgroundN;f++){var d=h.name.replace("{{i}}",f),p=h.value;u[d]=p}return u},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(u,h){return pa.arrowPrefixes.forEach(function(f){var d=f+"-"+h.name,p=h.value;u[d]=p}),u},{})),r={},n=0;n<this.properties.length;n++){var i=this.properties[n];if(!i.pointsTo){var a=i.name,o=e[a],l=this.parse(a,o);r[a]=l}}return t.defaultProperties=r,t.defaultProperties};pa.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};y7={};y7.parse=function(t,e,r,n){var i=this;if(Gn(e))return i.parseImplWarn(t,e,r,n);var a=n==="mapping"||n===!0||n===!1||n==null?"dontcare":n,o=r?"t":"f",l=""+e,u=a0e(t,l,o,a),h=i.propCache=i.propCache||[],f;return(f=h[u])||(f=h[u]=i.parseImplWarn(t,e,r,n)),(r||n==="mapping")&&(f=Mc(f),f&&(f.value=Mc(f.value))),f};y7.parseImplWarn=function(t,e,r,n){var i=this.parseImpl(t,e,r,n);return!i&&e!=null&&Kr("The style property `".concat(t,": ").concat(e,"` is invalid")),i&&(i.name==="width"||i.name==="height")&&e==="label"&&Kr("The style value of `label` is deprecated for `"+i.name+"`"),i};y7.parseImpl=function(t,e,r,n){var i=this;t=sP(t);var a=i.properties[t],o=e,l=i.types;if(!a||e===void 0)return null;a.alias&&(a=a.pointsTo,t=a.name);var u=At(e);u&&(e=e.trim());var h=a.type;if(!h)return null;if(r&&(e===""||e===null))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(Gn(e))return{name:t,value:e,strValue:"fn",mapped:l.fn,bypass:r};var f,d;if(!(!u||n||e.length<7||e[1]!=="a")){if(e.length>=7&&e[0]==="d"&&(f=new RegExp(l.data.regex).exec(e))){if(r)return!1;var p=l.data;return{name:t,value:f,strValue:""+e,mapped:p,field:f[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(d=new RegExp(l.mapData.regex).exec(e))){if(r||h.multiple)return!1;var m=l.mapData;if(!(h.color||h.number))return!1;var g=this.parse(t,d[4]);if(!g||g.mapped)return!1;var y=this.parse(t,d[5]);if(!y||y.mapped)return!1;if(g.pfValue===y.pfValue||g.strValue===y.strValue)return Kr("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+g.strValue+"`"),this.parse(t,g.strValue);if(h.color){var v=g.value,x=y.value,b=v[0]===x[0]&&v[1]===x[1]&&v[2]===x[2]&&(v[3]===x[3]||(v[3]==null||v[3]===1)&&(x[3]==null||x[3]===1));if(b)return!1}return{name:t,value:d,strValue:""+e,mapped:m,field:d[1],fieldMin:parseFloat(d[2]),fieldMax:parseFloat(d[3]),valueMin:g.value,valueMax:y.value,bypass:r}}}if(h.multiple&&n!=="multiple"){var k;if(u?k=e.split(/\s+/):hn(e)?k=e:k=[e],h.evenMultiple&&k.length%2!==0)return null;for(var A=[],w=[],T=[],C="",E=!1,S=0;S<k.length;S++){var R=i.parse(t,k[S],r,"multiple");E=E||At(R.value),A.push(R.value),T.push(R.pfValue!=null?R.pfValue:R.value),w.push(R.units),C+=(S>0?" ":"")+R.strValue}return h.validate&&!h.validate(A,w)?null:h.singleEnum&&E?A.length===1&&At(A[0])?{name:t,value:A[0],strValue:A[0],bypass:r}:null:{name:t,value:A,pfValue:T,strValue:C,bypass:r,units:w}}var D=s(function(){for(var H=0;H<h.enums.length;H++){var Q=h.enums[H];if(Q===e)return{name:t,value:e,strValue:""+e,bypass:r}}return null},"checkEnums");if(h.number){var L,P="px";if(h.units&&(L=h.units),h.implicitUnits&&(P=h.implicitUnits),!h.unitless)if(u){var M="px|em"+(h.allowPercent?"|\\%":"");L&&(M=L);var F=e.match("^("+Oi+")("+M+")?$");F&&(e=F[1],L=F[2]||P)}else(!L||h.implicitUnits)&&(L=P);if(e=parseFloat(e),isNaN(e)&&h.enums===void 0)return null;if(isNaN(e)&&h.enums!==void 0)return e=o,D();if(h.integer&&!cVe(e)||h.min!==void 0&&(e<h.min||h.strictMin&&e===h.min)||h.max!==void 0&&(e>h.max||h.strictMax&&e===h.max))return null;var I={name:t,value:e,strValue:""+e+(L||""),units:L,bypass:r};return h.unitless||L!=="px"&&L!=="em"?I.pfValue=e:I.pfValue=L==="px"||!L?e:this.getEmSizeInPixels()*e,(L==="ms"||L==="s")&&(I.pfValue=L==="ms"?e:1e3*e),(L==="deg"||L==="rad")&&(I.pfValue=L==="rad"?e:UUe(e)),L==="%"&&(I.pfValue=e/100),I}else if(h.propList){var O=[],z=""+e;if(z!=="none"){for(var N=z.split(/\s*,\s*|\s+/),U=0;U<N.length;U++){var $=N[U].trim();i.properties[$]?O.push($):Kr("`"+$+"` is not a valid property name")}if(O.length===0)return null}return{name:t,value:O,strValue:O.length===0?"none":O.join(" "),bypass:r}}else if(h.color){var W=SVe(e);return W?{name:t,value:W,pfValue:W,strValue:"rgb("+W[0]+","+W[1]+","+W[2]+")",bypass:r}:null}else if(h.regex||h.regexes){if(h.enums){var ee=D();if(ee)return ee}for(var te=h.regexes?h.regexes:[h.regex],ce=0;ce<te.length;ce++){var Z=new RegExp(te[ce]),fe=Z.exec(e);if(fe)return{name:t,value:h.singleRegexMatchValue?fe[1]:fe,strValue:""+e,bypass:r}}return null}else return h.string?{name:t,value:""+e,strValue:""+e,bypass:r}:h.enums?D():null};La=s(function t(e){if(!(this instanceof t))return new t(e);if(!aP(e)){Jn("A style must have a core reference");return}this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()},"Style"),Ra=La.prototype;Ra.instanceString=function(){return"style"};Ra.clear=function(){for(var t=this._private,e=t.cy,r=e.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(r,!0),r.forEach(function(i){var a=i[0]._private;a.styleDirty=!0,a.appliedInitStyle=!1}),this};Ra.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this};Ra.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)};Ra.selector=function(t){var e=t==="core"?null:new vf(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this};Ra.css=function(){var t=this,e=arguments;if(e.length===1)for(var r=e[0],n=0;n<t.properties.length;n++){var i=t.properties[n],a=r[i.name];a===void 0&&(a=r[n7(i.name)]),a!==void 0&&this.cssRule(i.name,a)}else e.length===2&&this.cssRule(e[0],e[1]);return this};Ra.style=Ra.css;Ra.cssRule=function(t,e){var r=this.parse(t,e);if(r){var n=this.length-1;this[n].properties.push(r),this[n].properties[r.name]=r,r.name.match(/pie-(\d+)-background-size/)&&r.value&&(this._private.hasPie=!0),r.mapped&&this[n].mappedProperties.push(r);var i=!this[n].selector;i&&(this._private.coreStyle[r.name]=r)}return this};Ra.append=function(t){return jde(t)?t.appendToStyle(this):hn(t)?this.appendFromJson(t):At(t)&&this.appendFromString(t),this};La.fromJson=function(t,e){var r=new La(t);return r.fromJson(e),r};La.fromString=function(t,e){return new La(t).fromString(e)};[Ma,Fx,bP,Nc,g7,kP,pa,y7].forEach(function(t){Pt(Ra,t)});La.types=Ra.types;La.properties=Ra.properties;La.propertyGroups=Ra.propertyGroups;La.propertyGroupNames=Ra.propertyGroupNames;La.propertyGroupKeys=Ra.propertyGroupKeys;cXe={style:s(function(e){if(e){var r=this.setStyle(e);r.update()}return this._private.style},"style"),setStyle:s(function(e){var r=this._private;return jde(e)?r.style=e.generateStyle(this):hn(e)?r.style=La.fromJson(this,e):At(e)?r.style=La.fromString(this,e):r.style=La(this),r.style},"setStyle"),updateStyle:s(function(){this.mutableElements().updateStyle()},"updateStyle")},uXe="single",P0={autolock:s(function(e){if(e!==void 0)this._private.autolock=!!e;else return this._private.autolock;return this},"autolock"),autoungrabify:s(function(e){if(e!==void 0)this._private.autoungrabify=!!e;else return this._private.autoungrabify;return this},"autoungrabify"),autounselectify:s(function(e){if(e!==void 0)this._private.autounselectify=!!e;else return this._private.autounselectify;return this},"autounselectify"),selectionType:s(function(e){var r=this._private;if(r.selectionType==null&&(r.selectionType=uXe),e!==void 0)(e==="additive"||e==="single")&&(r.selectionType=e);else return r.selectionType;return this},"selectionType"),panningEnabled:s(function(e){if(e!==void 0)this._private.panningEnabled=!!e;else return this._private.panningEnabled;return this},"panningEnabled"),userPanningEnabled:s(function(e){if(e!==void 0)this._private.userPanningEnabled=!!e;else return this._private.userPanningEnabled;return this},"userPanningEnabled"),zoomingEnabled:s(function(e){if(e!==void 0)this._private.zoomingEnabled=!!e;else return this._private.zoomingEnabled;return this},"zoomingEnabled"),userZoomingEnabled:s(function(e){if(e!==void 0)this._private.userZoomingEnabled=!!e;else return this._private.userZoomingEnabled;return this},"userZoomingEnabled"),boxSelectionEnabled:s(function(e){if(e!==void 0)this._private.boxSelectionEnabled=!!e;else return this._private.boxSelectionEnabled;return this},"boxSelectionEnabled"),pan:s(function(){var e=arguments,r=this._private.pan,n,i,a,o,l;switch(e.length){case 0:return r;case 1:if(At(e[0]))return n=e[0],r[n];if(Er(e[0])){if(!this._private.panningEnabled)return this;a=e[0],o=a.x,l=a.y,rt(o)&&(r.x=o),rt(l)&&(r.y=l),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;n=e[0],i=e[1],(n==="x"||n==="y")&&rt(i)&&(r[n]=i),this.emit("pan viewport");break}return this.notify("viewport"),this},"pan"),panBy:s(function(e,r){var n=arguments,i=this._private.pan,a,o,l,u,h;if(!this._private.panningEnabled)return this;switch(n.length){case 1:Er(e)&&(l=n[0],u=l.x,h=l.y,rt(u)&&(i.x+=u),rt(h)&&(i.y+=h),this.emit("pan viewport"));break;case 2:a=e,o=r,(a==="x"||a==="y")&&rt(o)&&(i[a]+=o),this.emit("pan viewport");break}return this.notify("viewport"),this},"panBy"),fit:s(function(e,r){var n=this.getFitViewport(e,r);if(n){var i=this._private;i.zoom=n.zoom,i.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},"fit"),getFitViewport:s(function(e,r){if(rt(e)&&r===void 0&&(r=e,e=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var n;if(At(e)){var i=e;e=this.$(i)}else if(fVe(e)){var a=e;n={x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},n.w=n.x2-n.x1,n.h=n.y2-n.y1}else oo(e)||(e=this.mutableElements());if(!(oo(e)&&e.empty())){n=n||e.boundingBox();var o=this.width(),l=this.height(),u;if(r=rt(r)?r:0,!isNaN(o)&&!isNaN(l)&&o>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){u=Math.min((o-2*r)/n.w,(l-2*r)/n.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u<this._private.minZoom?this._private.minZoom:u;var h={x:(o-u*(n.x1+n.x2))/2,y:(l-u*(n.y1+n.y2))/2};return{zoom:u,pan:h}}}}},"getFitViewport"),zoomRange:s(function(e,r){var n=this._private;if(r==null){var i=e;e=i.min,r=i.max}return rt(e)&&rt(r)&&e<=r?(n.minZoom=e,n.maxZoom=r):rt(e)&&r===void 0&&e<=n.maxZoom?n.minZoom=e:rt(r)&&e===void 0&&r>=n.minZoom&&(n.maxZoom=r),this},"zoomRange"),minZoom:s(function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},"minZoom"),maxZoom:s(function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},"maxZoom"),getZoomedViewport:s(function(e){var r=this._private,n=r.pan,i=r.zoom,a,o,l=!1;if(r.zoomingEnabled||(l=!0),rt(e)?o=e:Er(e)&&(o=e.level,e.position!=null?a=o7(e.position,i,n):e.renderedPosition!=null&&(a=e.renderedPosition),a!=null&&!r.panningEnabled&&(l=!0)),o=o>r.maxZoom?r.maxZoom:o,o=o<r.minZoom?r.minZoom:o,l||!rt(o)||o===i||a!=null&&(!rt(a.x)||!rt(a.y)))return null;if(a!=null){var u=n,h=i,f=o,d={x:-f/h*(a.x-u.x)+a.x,y:-f/h*(a.y-u.y)+a.y};return{zoomed:!0,panned:!0,zoom:f,pan:d}}else return{zoomed:!0,panned:!1,zoom:o,pan:n}},"getZoomedViewport"),zoom:s(function(e){if(e===void 0)return this._private.zoom;var r=this.getZoomedViewport(e),n=this._private;return r==null||!r.zoomed?this:(n.zoom=r.zoom,r.panned&&(n.pan.x=r.pan.x,n.pan.y=r.pan.y),this.emit("zoom"+(r.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},"zoom"),viewport:s(function(e){var r=this._private,n=!0,i=!0,a=[],o=!1,l=!1;if(!e)return this;if(rt(e.zoom)||(n=!1),Er(e.pan)||(i=!1),!n&&!i)return this;if(n){var u=e.zoom;u<r.minZoom||u>r.maxZoom||!r.zoomingEnabled?o=!0:(r.zoom=u,a.push("zoom"))}if(i&&(!o||!e.cancelOnFailedZoom)&&r.panningEnabled){var h=e.pan;rt(h.x)&&(r.pan.x=h.x,l=!1),rt(h.y)&&(r.pan.y=h.y,l=!1),l||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},"viewport"),center:s(function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:s(function(e,r){if(this._private.panningEnabled){if(At(e)){var n=e;e=this.mutableElements().filter(n)}else oo(e)||(e=this.mutableElements());if(e.length!==0){var i=e.boundingBox(),a=this.width(),o=this.height();r=r===void 0?this._private.zoom:r;var l={x:(a-r*(i.x1+i.x2))/2,y:(o-r*(i.y1+i.y2))/2};return l}}},"getCenterPan"),reset:s(function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},"reset"),invalidateSize:s(function(){this._private.sizeCache=null},"invalidateSize"),size:s(function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?function(){var i=n.window().getComputedStyle(r),a=s(function(l){return parseFloat(i.getPropertyValue(l))},"val");return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")}}():{width:1,height:1})},"size"),width:s(function(){return this.size().width},"width"),height:s(function(){return this.size().height},"height"),extent:s(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},"extent"),renderedExtent:s(function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},"renderedExtent"),multiClickDebounceTime:s(function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this},"multiClickDebounceTime")};P0.centre=P0.center;P0.autolockNodes=P0.autolock;P0.autoungrabifyNodes=P0.autoungrabify;Rx={data:jr.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:jr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:jr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:jr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Rx.attr=Rx.data;Rx.removeAttr=Rx.removeData;Mx=s(function(e){var r=this;e=Pt({},e);var n=e.container;n&&!HT(n)&&HT(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 o=Ni!==void 0&&n!==void 0&&!e.headless,l=e;l.layout=Pt({name:o?"grid":"null"},l.layout),l.renderer=Pt({name:o?"canvas":"null"},l.renderer);var u=s(function(g,y,v){return y!==void 0?y:v!==void 0?v:g},"defVal"),h=this._private={container:n,ready:!1,options:l,elements:new ga(this),listeners:[],aniEles:new ga(this),data:l.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,l.zoomingEnabled),userZoomingEnabled:u(!0,l.userZoomingEnabled),panningEnabled:u(!0,l.panningEnabled),userPanningEnabled:u(!0,l.userPanningEnabled),boxSelectionEnabled:u(!0,l.boxSelectionEnabled),autolock:u(!1,l.autolock,l.autolockNodes),autoungrabify:u(!1,l.autoungrabify,l.autoungrabifyNodes),autounselectify:u(!1,l.autounselectify),styleEnabled:l.styleEnabled===void 0?o:l.styleEnabled,zoom:rt(l.zoom)?l.zoom:1,pan:{x:Er(l.pan)&&rt(l.pan.x)?l.pan.x:0,y:Er(l.pan)&&rt(l.pan.y)?l.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,l.multiClickDebounceTime)};this.createEmitter(),this.selectionType(l.selectionType),this.zoomRange({min:l.minZoom,max:l.maxZoom});var f=s(function(g,y){var v=g.some(dVe);if(v)return jg.all(g).then(y);y(g)},"loadExtData");h.styleEnabled&&r.setStyle([]);var d=Pt({},l,l.renderer);r.initRenderer(d);var p=s(function(g,y,v){r.notifications(!1);var x=r.mutableElements();x.length>0&&x.remove(),g!=null&&(Er(g)||hn(g))&&r.add(g),r.one("layoutready",function(k){r.notifications(!0),r.emit(k),r.one("load",y),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",v),r.emit("done")});var b=Pt({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run()},"setElesAndLayout");f([l.style,l.elements],function(m){var g=m[0],y=m[1];h.styleEnabled&&r.style().append(g),p(y,function(){r.startAnimationLoop(),h.ready=!0,Gn(l.ready)&&r.on("ready",l.ready);for(var v=0;v<a.length;v++){var x=a[v];r.on("ready",x)}i&&(i.readies=[]),r.emit("ready")},l.done)})},"Core"),JT=Mx.prototype;Pt(JT,{instanceString:s(function(){return"core"},"instanceString"),isReady:s(function(){return this._private.ready},"isReady"),destroyed:s(function(){return this._private.destroyed},"destroyed"),ready:s(function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},"ready"),destroy:s(function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},"destroy"),hasElementWithId:s(function(e){return this._private.elements.hasElementWithId(e)},"hasElementWithId"),getElementById:s(function(e){return this._private.elements.getElementById(e)},"getElementById"),hasCompoundNodes:s(function(){return this._private.hasCompoundNodes},"hasCompoundNodes"),headless:s(function(){return this._private.renderer.isHeadless()},"headless"),styleEnabled:s(function(){return this._private.styleEnabled},"styleEnabled"),addToPool:s(function(e){return this._private.elements.merge(e),this},"addToPool"),removeFromPool:s(function(e){return this._private.elements.unmerge(e),this},"removeFromPool"),container:s(function(){return this._private.container||null},"container"),window:s(function(){var e=this._private.container;if(e==null)return Ni;var r=this._private.container.ownerDocument;return r===void 0||r==null?Ni:r.defaultView||Ni},"window"),mount:s(function(e){if(e!=null){var r=this,n=r._private,i=n.options;return!HT(e)&&HT(e[0])&&(e=e[0]),r.stopAnimationLoop(),r.destroyRenderer(),n.container=e,n.styleEnabled=!0,r.invalidateSize(),r.initRenderer(Pt({},i,i.renderer,{name:i.renderer.name==="null"?"canvas":i.renderer.name})),r.startAnimationLoop(),r.style(i.style),r.emit("mount"),r}},"mount"),unmount:s(function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},"unmount"),options:s(function(){return Mc(this._private.options)},"options"),json:s(function(e){var r=this,n=r._private,i=r.mutableElements(),a=s(function(A){return r.getElementById(A.id())},"getFreshRef");if(Er(e)){if(r.startBatch(),e.elements){var o={},l=s(function(A,w){for(var T=[],C=[],E=0;E<A.length;E++){var S=A[E];if(!S.data.id){Kr("cy.json() cannot handle elements without an ID attribute");continue}var R=""+S.data.id,D=r.getElementById(R);o[R]=!0,D.length!==0?C.push({ele:D,json:S}):(w&&(S.group=w),T.push(S))}r.add(T);for(var L=0;L<C.length;L++){var P=C[L],M=P.ele,F=P.json;M.json(F)}},"updateEles");if(hn(e.elements))l(e.elements);else for(var u=["nodes","edges"],h=0;h<u.length;h++){var f=u[h],d=e.elements[f];hn(d)&&l(d,f)}var p=r.collection();i.filter(function(k){return!o[k.id()]}).forEach(function(k){k.isParent()?p.merge(k):k.remove()}),p.forEach(function(k){return k.children().move({parent:null})}),p.forEach(function(k){return a(k).remove()})}e.style&&r.style(e.style),e.zoom!=null&&e.zoom!==n.zoom&&r.zoom(e.zoom),e.pan&&(e.pan.x!==n.pan.x||e.pan.y!==n.pan.y)&&r.pan(e.pan),e.data&&r.data(e.data);for(var m=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],g=0;g<m.length;g++){var y=m[g];e[y]!=null&&r[y](e[y])}return r.endBatch(),this}else{var v=!!e,x={};v?x.elements=this.elements().map(function(k){return k.json()}):(x.elements={},i.forEach(function(k){var A=k.group();x.elements[A]||(x.elements[A]=[]),x.elements[A].push(k.json())})),this._private.styleEnabled&&(x.style=r.style().json()),x.data=Mc(r.data());var b=n.options;return x.zoomingEnabled=n.zoomingEnabled,x.userZoomingEnabled=n.userZoomingEnabled,x.zoom=n.zoom,x.minZoom=n.minZoom,x.maxZoom=n.maxZoom,x.panningEnabled=n.panningEnabled,x.userPanningEnabled=n.userPanningEnabled,x.pan=Mc(n.pan),x.boxSelectionEnabled=n.boxSelectionEnabled,x.renderer=Mc(b.renderer),x.hideEdgesOnViewport=b.hideEdgesOnViewport,x.textureOnViewport=b.textureOnViewport,x.wheelSensitivity=b.wheelSensitivity,x.motionBlur=b.motionBlur,x.multiClickDebounceTime=b.multiClickDebounceTime,x}},"json")});JT.$id=JT.getElementById;[JYe,iXe,K0e,YO,VT,sXe,XO,UT,cXe,P0,Rx].forEach(function(t){Pt(JT,t)});hXe={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:s(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(e,r){return r},"transform")},fXe={maximal:!1,acyclic:!1},Og=s(function(e){return e.scratch("breadthfirst")},"getInfo"),Ede=s(function(e,r){return e.scratch("breadthfirst",r)},"setInfo");s(Q0e,"BreadthFirstLayout");Q0e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().filter(function(ye){return!ye.isParent()}),a=n,o=e.directed,l=e.acyclic||e.maximal||e.maximalAdjustments>0,u=Is(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),h;if(oo(e.roots))h=e.roots;else if(hn(e.roots)){for(var f=[],d=0;d<e.roots.length;d++){var p=e.roots[d],m=r.getElementById(p);f.push(m)}h=r.collection(f)}else if(At(e.roots))h=r.$(e.roots);else if(o)h=i.roots();else{var g=n.components();h=r.collection();for(var y=s(function(j){var De=g[j],oe=De.maxDegree(!1),Re=De.filter(function(Pe){return Pe.degree(!1)===oe});h=h.add(Re)},"_loop"),v=0;v<g.length;v++)y(v)}var x=[],b={},k=s(function(j,De){x[De]==null&&(x[De]=[]);var oe=x[De].length;x[De].push(j),Ede(j,{index:oe,depth:De})},"addToDepth"),A=s(function(j,De){var oe=Og(j),Re=oe.depth,Pe=oe.index;x[Re][Pe]=null,k(j,De)},"changeDepth");a.bfs({roots:h,directed:e.directed,visit:s(function(j,De,oe,Re,Pe){var Se=j[0],Ue=Se.id();k(Se,Pe),b[Ue]=!0},"visit")});for(var w=[],T=0;T<i.length;T++){var C=i[T];b[C.id()]||w.push(C)}var E=s(function(j){for(var De=x[j],oe=0;oe<De.length;oe++){var Re=De[oe];if(Re==null){De.splice(oe,1),oe--;continue}Ede(Re,{depth:j,index:oe})}},"assignDepthsAt"),S=s(function(){for(var j=0;j<x.length;j++)E(j)},"assignDepths"),R=s(function(j,De){for(var oe=Og(j),Re=j.incomers().filter(function(q){return q.isNode()&&n.has(q)}),Pe=-1,Se=j.id(),Ue=0;Ue<Re.length;Ue++){var Oe=Re[Ue],_e=Og(Oe);Pe=Math.max(Pe,_e.depth)}if(oe.depth<=Pe){if(!e.acyclic&&De[Se])return null;var he=Pe+1;return A(j,he),De[Se]=he,!0}return!1},"adjustMaximally");if(o&&l){var D=[],L={},P=s(function(j){return D.push(j)},"enqueue"),M=s(function(){return D.shift()},"dequeue");for(i.forEach(function(ye){return D.push(ye)});D.length>0;){var F=M(),I=R(F,L);if(I)F.outgoers().filter(function(ye){return ye.isNode()&&n.has(ye)}).forEach(P);else if(I===null){Kr("Detected double maximal shift for node `"+F.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}S();var O=0;if(e.avoidOverlap)for(var z=0;z<i.length;z++){var N=i[z],U=N.layoutDimensions(e),$=U.w,W=U.h;O=Math.max(O,$,W)}var ee={},te=s(function(j){if(ee[j.id()])return ee[j.id()];for(var De=Og(j).depth,oe=j.neighborhood(),Re=0,Pe=0,Se=0;Se<oe.length;Se++){var Ue=oe[Se];if(!(Ue.isEdge()||Ue.isParent()||!i.has(Ue))){var Oe=Og(Ue);if(Oe!=null){var _e=Oe.index,he=Oe.depth;if(!(_e==null||he==null)){var q=x[he].length;he<De&&(Re+=_e/q,Pe++)}}}}return Pe=Math.max(1,Pe),Re=Re/Pe,Pe===0&&(Re=0),ee[j.id()]=Re,Re},"getWeightedPercent"),ce=s(function(j,De){var oe=te(j),Re=te(De),Pe=oe-Re;return Pe===0?Qde(j.id(),De.id()):Pe},"sortFn");e.depthSort!==void 0&&(ce=e.depthSort);for(var Z=0;Z<x.length;Z++)x[Z].sort(ce),E(Z);for(var fe=[],ne=0;ne<w.length;ne++)fe.push(w[ne]);x.unshift(fe),S();for(var H=0,Q=0;Q<x.length;Q++)H=Math.max(x[Q].length,H);var K={x:u.x1+u.w/2,y:u.x1+u.h/2},re=x.reduce(function(ye,j){return Math.max(ye,j.length)},0),ie=s(function(j){var De=Og(j),oe=De.depth,Re=De.index,Pe=x[oe].length,Se=Math.max(u.w/((e.grid?re:Pe)+1),O),Ue=Math.max(u.h/(x.length+1),O),Oe=Math.min(u.w/2/x.length,u.h/2/x.length);if(Oe=Math.max(Oe,O),e.circle){var he=Oe*oe+Oe-(x.length>0&&x[0].length<=3?Oe/2:0),q=2*Math.PI/x[oe].length*Re;return oe===0&&x[0].length===1&&(he=1),{x:K.x+he*Math.cos(q),y:K.y+he*Math.sin(q)}}else{var _e={x:K.x+(Re+1-(Pe+1)/2)*Se,y:(oe+1)*Ue};return _e}},"getPosition");return n.nodes().layoutPositions(this,e,ie),this};dXe={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:s(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(e,r){return r},"transform")};s(Z0e,"CircleLayout");Z0e.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 o=Is(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l={x:o.x1+o.w/2,y:o.y1+o.h/2},u=e.sweep===void 0?2*Math.PI-2*Math.PI/a.length:e.sweep,h=u/Math.max(1,a.length-1),f,d=0,p=0;p<a.length;p++){var m=a[p],g=m.layoutDimensions(e),y=g.w,v=g.h;d=Math.max(d,y,v)}if(rt(e.radius)?f=e.radius:a.length<=1?f=0:f=Math.min(o.h,o.w)/2-d,a.length>1&&e.avoidOverlap){d*=1.75;var x=Math.cos(h)-Math.cos(0),b=Math.sin(h)-Math.sin(0),k=Math.sqrt(d*d/(x*x+b*b));f=Math.max(k,f)}var A=s(function(T,C){var E=e.startAngle+C*h*(i?1:-1),S=f*Math.cos(E),R=f*Math.sin(E),D={x:l.x+S,y:l.y+R};return D},"getPos");return n.nodes().layoutPositions(this,e,A),this};pXe={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:s(function(e){return e.degree()},"concentric"),levelWidth:s(function(e){return e.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:s(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(e,r){return r},"transform")};s(J0e,"ConcentricLayout");J0e.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"),o=Is(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l={x:o.x1+o.w/2,y:o.y1+o.h/2},u=[],h=0,f=0;f<a.length;f++){var d=a[f],p=void 0;p=e.concentric(d),u.push({value:p,node:d}),d._private.scratch.concentric=p}a.updateStyle();for(var m=0;m<a.length;m++){var g=a[m],y=g.layoutDimensions(e);h=Math.max(h,y.w,y.h)}u.sort(function(ye,j){return j.value-ye.value});for(var v=e.levelWidth(a),x=[[]],b=x[0],k=0;k<u.length;k++){var A=u[k];if(b.length>0){var w=Math.abs(b[0].value-A.value);w>=v&&(b=[],x.push(b))}b.push(A)}var T=h+e.minNodeSpacing;if(!e.avoidOverlap){var C=x.length>0&&x[0].length>1,E=Math.min(o.w,o.h)/2-T,S=E/(x.length+C?1:0);T=Math.min(T,S)}for(var R=0,D=0;D<x.length;D++){var L=x[D],P=e.sweep===void 0?2*Math.PI-2*Math.PI/L.length:e.sweep,M=L.dTheta=P/Math.max(1,L.length-1);if(L.length>1&&e.avoidOverlap){var F=Math.cos(M)-Math.cos(0),I=Math.sin(M)-Math.sin(0),O=Math.sqrt(T*T/(F*F+I*I));R=Math.max(O,R)}L.r=R,R+=T}if(e.equidistant){for(var z=0,N=0,U=0;U<x.length;U++){var $=x[U],W=$.r-N;z=Math.max(z,W)}N=0;for(var ee=0;ee<x.length;ee++){var te=x[ee];ee===0&&(N=te.r),te.r=N,N+=z}}for(var ce={},Z=0;Z<x.length;Z++)for(var fe=x[Z],ne=fe.dTheta,H=fe.r,Q=0;Q<fe.length;Q++){var K=fe[Q],re=e.startAngle+(r?1:-1)*ne*Q,ie={x:l.x+H*Math.cos(re),y:l.y+H*Math.sin(re)};ce[K.node.id()]=ie}return i.nodes().layoutPositions(this,e,function(ye){var j=ye.id();return ce[j]}),this};mXe={ready:s(function(){},"ready"),stop:s(function(){},"stop"),animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:s(function(e,r){return!0},"animateFilter"),animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:s(function(e){return 2048},"nodeRepulsion"),nodeOverlap:4,idealEdgeLength:s(function(e){return 32},"idealEdgeLength"),edgeElasticity:s(function(e){return 32},"edgeElasticity"),nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};s(v7,"CoseLayout");v7.prototype.run=function(){var t=this.options,e=t.cy,r=this;r.stopped=!1,(t.animate===!0||t.animate===!1)&&r.emit({type:"layoutstart",layout:r}),t.debug===!0?BO=!0:BO=!1;var n=gXe(e,r,t);BO&&xXe(n),t.randomize&&bXe(n);var i=qu(),a=s(function(){kXe(n,e,t),t.fit===!0&&e.fit(t.padding)},"refresh"),o=s(function(p){return!(r.stopped||p>=t.numIter||(wXe(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature<t.minTemp))},"mainLoop"),l=s(function(){if(t.animate===!0||t.animate===!1)a(),r.one("layoutstop",t.stop),r.emit({type:"layoutstop",layout:r});else{var p=t.eles.nodes(),m=epe(n,t,p);p.layoutPositions(r,t,m)}},"done"),u=0,h=!0;if(t.animate===!0){var f=s(function d(){for(var p=0;h&&p<t.refresh;)h=o(u),u++,p++;if(!h)Sde(n,t),l();else{var m=qu();m-i>=t.animationThreshold&&a(),YT(d)}},"frame");f()}else{for(;h;)h=o(u),u++;Sde(n,t),l()}return this};v7.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};v7.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};gXe=s(function(e,r,n){for(var i=n.eles.edges(),a=n.eles.nodes(),o=Is(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),l={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},u=n.eles.components(),h={},f=0;f<u.length;f++)for(var d=u[f],p=0;p<d.length;p++){var m=d[p];h[m.id()]=f}for(var f=0;f<l.nodeSize;f++){var g=a[f],y=g.layoutDimensions(n),v={};v.isLocked=g.locked(),v.id=g.data("id"),v.parentId=g.data("parent"),v.cmptId=h[g.id()],v.children=[],v.positionX=g.position("x"),v.positionY=g.position("y"),v.offsetX=0,v.offsetY=0,v.height=y.w,v.width=y.h,v.maxX=v.positionX+v.width/2,v.minX=v.positionX-v.width/2,v.maxY=v.positionY+v.height/2,v.minY=v.positionY-v.height/2,v.padLeft=parseFloat(g.style("padding")),v.padRight=parseFloat(g.style("padding")),v.padTop=parseFloat(g.style("padding")),v.padBottom=parseFloat(g.style("padding")),v.nodeRepulsion=Gn(n.nodeRepulsion)?n.nodeRepulsion(g):n.nodeRepulsion,l.layoutNodes.push(v),l.idToIndex[v.id]=f}for(var x=[],b=0,k=-1,A=[],f=0;f<l.nodeSize;f++){var g=l.layoutNodes[f],w=g.parentId;w!=null?l.layoutNodes[l.idToIndex[w]].children.push(g.id):(x[++k]=g.id,A.push(g.id))}for(l.graphSet.push(A);b<=k;){var T=x[b++],C=l.idToIndex[T],m=l.layoutNodes[C],E=m.children;if(E.length>0){l.graphSet.push(E);for(var f=0;f<E.length;f++)x[++k]=E[f]}}for(var f=0;f<l.graphSet.length;f++)for(var S=l.graphSet[f],p=0;p<S.length;p++){var R=l.idToIndex[S[p]];l.indexToGraph[R]=f}for(var f=0;f<l.edgeSize;f++){var D=i[f],L={};L.id=D.data("id"),L.sourceId=D.data("source"),L.targetId=D.data("target");var P=Gn(n.idealEdgeLength)?n.idealEdgeLength(D):n.idealEdgeLength,M=Gn(n.edgeElasticity)?n.edgeElasticity(D):n.edgeElasticity,F=l.idToIndex[L.sourceId],I=l.idToIndex[L.targetId],O=l.indexToGraph[F],z=l.indexToGraph[I];if(O!=z){for(var N=yXe(L.sourceId,L.targetId,l),U=l.graphSet[N],$=0,v=l.layoutNodes[F];U.indexOf(v.id)===-1;)v=l.layoutNodes[l.idToIndex[v.parentId]],$++;for(v=l.layoutNodes[I];U.indexOf(v.id)===-1;)v=l.layoutNodes[l.idToIndex[v.parentId]],$++;P*=$*n.nestingFactor}L.idealLength=P,L.elasticity=M,l.layoutEdges.push(L)}return l},"createLayoutInfo"),yXe=s(function(e,r,n){var i=vXe(e,r,0,n);return 2>i.count?0:i.graph},"findLCA"),vXe=s(function t(e,r,n,i){var a=i.graphSet[n];if(-1<a.indexOf(e)&&-1<a.indexOf(r))return{count:2,graph:n};for(var o=0,l=0;l<a.length;l++){var u=a[l],h=i.idToIndex[u],f=i.layoutNodes[h].children;if(f.length!==0){var d=i.indexToGraph[i.idToIndex[f[0]]],p=t(e,r,d,i);if(p.count!==0)if(p.count===1){if(o++,o===2)break}else return p}}return{count:o,graph:n}},"findLCA_aux"),bXe=s(function(e,r){for(var n=e.clientWidth,i=e.clientHeight,a=0;a<e.nodeSize;a++){var o=e.layoutNodes[a];o.children.length===0&&!o.isLocked&&(o.positionX=Math.random()*n,o.positionY=Math.random()*i)}},"randomizePositions"),epe=s(function(e,r,n){var i=e.boundingBox,a={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return r.boundingBox&&(n.forEach(function(o){var l=e.layoutNodes[e.idToIndex[o.data("id")]];a.x1=Math.min(a.x1,l.positionX),a.x2=Math.max(a.x2,l.positionX),a.y1=Math.min(a.y1,l.positionY),a.y2=Math.max(a.y2,l.positionY)}),a.w=a.x2-a.x1,a.h=a.y2-a.y1),function(o,l){var u=e.layoutNodes[e.idToIndex[o.data("id")]];if(r.boundingBox){var h=(u.positionX-a.x1)/a.w,f=(u.positionY-a.y1)/a.h;return{x:i.x1+h*i.w,y:i.y1+f*i.h}}else return{x:u.positionX,y:u.positionY}}},"getScaleInBoundsFn"),kXe=s(function(e,r,n){var i=n.layout,a=n.eles.nodes(),o=epe(e,n,a);a.positions(o),e.ready!==!0&&(e.ready=!0,i.one("layoutready",n.ready),i.emit({type:"layoutready",layout:this}))},"refreshPositions"),wXe=s(function(e,r,n){TXe(e,r),SXe(e),_Xe(e,r),AXe(e),LXe(e)},"step"),TXe=s(function(e,r){for(var n=0;n<e.graphSet.length;n++)for(var i=e.graphSet[n],a=i.length,o=0;o<a;o++)for(var l=e.layoutNodes[e.idToIndex[i[o]]],u=o+1;u<a;u++){var h=e.layoutNodes[e.idToIndex[i[u]]];EXe(l,h,e,r)}},"calculateNodeForces"),Cde=s(function(e){return-e+2*e*Math.random()},"randomDistance"),EXe=s(function(e,r,n,i){var a=e.cmptId,o=r.cmptId;if(!(a!==o&&!n.isCompound)){var l=r.positionX-e.positionX,u=r.positionY-e.positionY,h=1;l===0&&u===0&&(l=Cde(h),u=Cde(h));var f=CXe(e,r,l,u);if(f>0)var d=i.nodeOverlap*f,p=Math.sqrt(l*l+u*u),m=d*l/p,g=d*u/p;else var y=e7(e,l,u),v=e7(r,-1*l,-1*u),x=v.x-y.x,b=v.y-y.y,k=x*x+b*b,p=Math.sqrt(k),d=(e.nodeRepulsion+r.nodeRepulsion)/k,m=d*x/p,g=d*b/p;e.isLocked||(e.offsetX-=m,e.offsetY-=g),r.isLocked||(r.offsetX+=m,r.offsetY+=g)}},"nodeRepulsion"),CXe=s(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 o=e.maxY-r.minY;else var o=r.maxY-e.minY;return a>=0&&o>=0?Math.sqrt(a*a+o*o):0},"nodesOverlap"),e7=s(function(e,r,n){var i=e.positionX,a=e.positionY,o=e.height||1,l=e.width||1,u=n/r,h=o/l,f={};return r===0&&0<n||r===0&&0>n?(f.x=i,f.y=a+o/2,f):0<r&&-1*h<=u&&u<=h?(f.x=i+l/2,f.y=a+l*n/2/r,f):0>r&&-1*h<=u&&u<=h?(f.x=i-l/2,f.y=a-l*n/2/r,f):0<n&&(u<=-1*h||u>=h)?(f.x=i+o*r/2/n,f.y=a+o/2,f):(0>n&&(u<=-1*h||u>=h)&&(f.x=i-o*r/2/n,f.y=a-o/2),f)},"findClippingPoint"),SXe=s(function(e,r){for(var n=0;n<e.edgeSize;n++){var i=e.layoutEdges[n],a=e.idToIndex[i.sourceId],o=e.layoutNodes[a],l=e.idToIndex[i.targetId],u=e.layoutNodes[l],h=u.positionX-o.positionX,f=u.positionY-o.positionY;if(!(h===0&&f===0)){var d=e7(o,h,f),p=e7(u,-1*h,-1*f),m=p.x-d.x,g=p.y-d.y,y=Math.sqrt(m*m+g*g),v=Math.pow(i.idealLength-y,2)/i.elasticity;if(y!==0)var x=v*m/y,b=v*g/y;else var x=0,b=0;o.isLocked||(o.offsetX+=x,o.offsetY+=b),u.isLocked||(u.offsetX-=x,u.offsetY-=b)}}},"calculateEdgeForces"),_Xe=s(function(e,r){if(r.gravity!==0)for(var n=1,i=0;i<e.graphSet.length;i++){var a=e.graphSet[i],o=a.length;if(i===0)var l=e.clientHeight/2,u=e.clientWidth/2;else var h=e.layoutNodes[e.idToIndex[a[0]]],f=e.layoutNodes[e.idToIndex[h.parentId]],l=f.positionX,u=f.positionY;for(var d=0;d<o;d++){var p=e.layoutNodes[e.idToIndex[a[d]]];if(!p.isLocked){var m=l-p.positionX,g=u-p.positionY,y=Math.sqrt(m*m+g*g);if(y>n){var v=r.gravity*m/y,x=r.gravity*g/y;p.offsetX+=v,p.offsetY+=x}}}}},"calculateGravityForces"),AXe=s(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 o=n[i++],l=e.idToIndex[o],u=e.layoutNodes[l],h=u.children;if(0<h.length&&!u.isLocked){for(var f=u.offsetX,d=u.offsetY,p=0;p<h.length;p++){var m=e.layoutNodes[e.idToIndex[h[p]]];m.offsetX+=f,m.offsetY+=d,n[++a]=h[p]}u.offsetX=0,u.offsetY=0}}},"propagateForces"),LXe=s(function(e,r){for(var n=0;n<e.nodeSize;n++){var i=e.layoutNodes[n];0<i.children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0)}for(var n=0;n<e.nodeSize;n++){var i=e.layoutNodes[n];if(!(0<i.children.length||i.isLocked)){var a=DXe(i.offsetX,i.offsetY,e.temperature);i.positionX+=a.x,i.positionY+=a.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,RXe(i,e)}}for(var n=0;n<e.nodeSize;n++){var i=e.layoutNodes[n];0<i.children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)}},"updatePositions"),DXe=s(function(e,r,n){var i=Math.sqrt(e*e+r*r);if(i>n)var a={x:n*e/i,y:n*r/i};else var a={x:e,y:r};return a},"limitForce"),RXe=s(function t(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.padLeft<i.minX)&&(i.minX=e.minX-i.padLeft,a=!0),(i.maxY==null||e.maxY+i.padBottom>i.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(i.minY==null||e.minY-i.padTop<i.minY)&&(i.minY=e.minY-i.padTop,a=!0),a)return t(i,r)}},"updateAncestryBoundaries"),Sde=s(function(e,r){for(var n=e.layoutNodes,i=[],a=0;a<n.length;a++){var o=n[a],l=o.cmptId,u=i[l]=i[l]||[];u.push(o)}for(var h=0,a=0;a<i.length;a++){var f=i[a];if(f){f.x1=1/0,f.x2=-1/0,f.y1=1/0,f.y2=-1/0;for(var d=0;d<f.length;d++){var p=f[d];f.x1=Math.min(f.x1,p.positionX-p.width/2),f.x2=Math.max(f.x2,p.positionX+p.width/2),f.y1=Math.min(f.y1,p.positionY-p.height/2),f.y2=Math.max(f.y2,p.positionY+p.height/2)}f.w=f.x2-f.x1,f.h=f.y2-f.y1,h+=f.w*f.h}}i.sort(function(b,k){return k.w*k.h-b.w*b.h});for(var m=0,g=0,y=0,v=0,x=Math.sqrt(h)*e.clientWidth/e.clientHeight,a=0;a<i.length;a++){var f=i[a];if(f){for(var d=0;d<f.length;d++){var p=f[d];p.isLocked||(p.positionX+=m-f.x1,p.positionY+=g-f.y1)}m+=f.w+r.componentSpacing,y+=f.w+r.componentSpacing,v=Math.max(v,f.h),y>x&&(g+=v+r.componentSpacing,m=0,y=0,v=0)}}},"separateComponents"),MXe={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:s(function(e){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:s(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(e,r){return r},"transform")};s(tpe,"GridLayout");tpe.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=Is(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(ee){return{x:a.x1,y:a.y1}});else{var o=i.size(),l=Math.sqrt(o*a.h/a.w),u=Math.round(l),h=Math.round(a.w/a.h*l),f=s(function(te){if(te==null)return Math.min(u,h);var ce=Math.min(u,h);ce==u?u=te:h=te},"small"),d=s(function(te){if(te==null)return Math.max(u,h);var ce=Math.max(u,h);ce==u?u=te:h=te},"large"),p=e.rows,m=e.cols!=null?e.cols:e.columns;if(p!=null&&m!=null)u=p,h=m;else if(p!=null&&m==null)u=p,h=Math.ceil(o/u);else if(p==null&&m!=null)h=m,u=Math.ceil(o/h);else if(h*u>o){var g=f(),y=d();(g-1)*y>=o?f(g-1):(y-1)*g>=o&&d(y-1)}else for(;h*u<o;){var v=f(),x=d();(x+1)*v>=o?d(x+1):f(v+1)}var b=a.w/h,k=a.h/u;if(e.condense&&(b=0,k=0),e.avoidOverlap)for(var A=0;A<i.length;A++){var w=i[A],T=w._private.position;(T.x==null||T.y==null)&&(T.x=0,T.y=0);var C=w.layoutDimensions(e),E=e.avoidOverlapPadding,S=C.w+E,R=C.h+E;b=Math.max(b,S),k=Math.max(k,R)}for(var D={},L=s(function(te,ce){return!!D["c-"+te+"-"+ce]},"used"),P=s(function(te,ce){D["c-"+te+"-"+ce]=!0},"use"),M=0,F=0,I=s(function(){F++,F>=h&&(F=0,M++)},"moveToNextCell"),O={},z=0;z<i.length;z++){var N=i[z],U=e.position(N);if(U&&(U.row!==void 0||U.col!==void 0)){var $={row:U.row,col:U.col};if($.col===void 0)for($.col=0;L($.row,$.col);)$.col++;else if($.row===void 0)for($.row=0;L($.row,$.col);)$.row++;O[N.id()]=$,P($.row,$.col)}}var W=s(function(te,ce){var Z,fe;if(te.locked()||te.isParent())return!1;var ne=O[te.id()];if(ne)Z=ne.col*b+b/2+a.x1,fe=ne.row*k+k/2+a.y1;else{for(;L(M,F);)I();Z=F*b+b/2+a.x1,fe=M*k+k/2+a.y1,P(M,F),I()}return{x:Z,y:fe}},"getPos");i.layoutPositions(this,e,W)}return this};IXe={ready:s(function(){},"ready"),stop:s(function(){},"stop")};s(wP,"NullLayout");wP.prototype.run=function(){var t=this.options,e=t.eles,r=this;return t.cy,r.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),r.one("layoutready",t.ready),r.emit("layoutready"),r.one("layoutstop",t.stop),r.emit("layoutstop"),this};wP.prototype.stop=function(){return this};NXe={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:s(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(e,r){return r},"transform")};s(rpe,"PresetLayout");rpe.prototype.run=function(){var t=this.options,e=t.eles,r=e.nodes(),n=Gn(t.positions);function i(a){if(t.positions==null)return FUe(a.position());if(n)return t.positions(a);var o=t.positions[a._private.data.id];return o??null}return s(i,"getPosition"),r.layoutPositions(this,t,function(a,o){var l=i(a);return a.locked()||l==null?!1:l}),this};OXe={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:s(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(e,r){return r},"transform")};s(npe,"RandomLayout");npe.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=Is(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),i=s(function(o,l){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}},"getPos");return r.nodes().layoutPositions(this,t,i),this};PXe=[{name:"breadthfirst",impl:Q0e},{name:"circle",impl:Z0e},{name:"concentric",impl:J0e},{name:"cose",impl:v7},{name:"grid",impl:tpe},{name:"null",impl:wP},{name:"preset",impl:rpe},{name:"random",impl:npe}];s(ipe,"NullRenderer");_de=s(function(){},"noop"),Ade=s(function(){throw new Error("A headless instance can not render images")},"throwImgErr");ipe.prototype={recalculateRenderedStyle:_de,notify:s(function(){this.notifications++},"notify"),init:_de,isHeadless:s(function(){return!0},"isHeadless"),png:Ade,jpg:Ade};TP={};TP.arrowShapeWidth=.3;TP.registerArrowShapes=function(){var t=this.arrowShapes={},e=this,r=s(function(h,f,d,p,m,g,y){var v=m.x-d/2-y,x=m.x+d/2+y,b=m.y-d/2-y,k=m.y+d/2+y,A=v<=h&&h<=x&&b<=f&&f<=k;return A},"bbCollide"),n=s(function(h,f,d,p,m){var g=h*Math.cos(p)-f*Math.sin(p),y=h*Math.sin(p)+f*Math.cos(p),v=g*d,x=y*d,b=v+m.x,k=x+m.y;return{x:b,y:k}},"transform"),i=s(function(h,f,d,p){for(var m=[],g=0;g<h.length;g+=2){var y=h[g],v=h[g+1];m.push(n(y,v,f,d,p))}return m},"transformPoints"),a=s(function(h){for(var f=[],d=0;d<h.length;d++){var p=h[d];f.push(p.x,p.y)}return f},"pointsToArr"),o=s(function(h){return h.pstyle("width").pfValue*h.pstyle("arrow-scale").pfValue*2},"standardGap"),l=s(function(h,f){At(f)&&(f=t[f]),t[h]=Pt({name:h,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:s(function(p,m,g,y,v,x){var b=a(i(this.points,g+2*x,y,v)),k=Ms(p,m,b);return k},"collide"),roughCollide:r,draw:s(function(p,m,g,y){var v=i(this.points,m,g,y);e.arrowShapeImpl("polygon")(p,v)},"draw"),spacing:s(function(p){return 0},"spacing"),gap:o},f)},"defineArrowShape");l("none",{collide:XT,roughCollide:XT,draw:lP,spacing:Ffe,gap:Ffe}),l("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),l("arrow","triangle"),l("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:r,draw:s(function(h,f,d,p,m){var g=i(this.points,f,d,p),y=this.controlPoint,v=n(y[0],y[1],f,d,p);e.arrowShapeImpl(this.name)(h,g,v)},"draw"),gap:s(function(h){return o(h)*.8},"gap")}),l("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:s(function(h,f,d,p,m,g,y){var v=a(i(this.points,d+2*y,p,m)),x=a(i(this.pointsTee,d+2*y,p,m)),b=Ms(h,f,v)||Ms(h,f,x);return b},"collide"),draw:s(function(h,f,d,p,m){var g=i(this.points,f,d,p),y=i(this.pointsTee,f,d,p);e.arrowShapeImpl(this.name)(h,g,y)},"draw")}),l("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:s(function(h,f,d,p,m,g,y){var v=m,x=Math.pow(v.x-h,2)+Math.pow(v.y-f,2)<=Math.pow((d+2*y)*this.radius,2),b=a(i(this.points,d+2*y,p,m));return Ms(h,f,b)||x},"collide"),draw:s(function(h,f,d,p,m){var g=i(this.pointsTr,f,d,p);e.arrowShapeImpl(this.name)(h,g,p.x,p.y,this.radius*f)},"draw"),spacing:s(function(h){return e.getArrowWidth(h.pstyle("width").pfValue,h.pstyle("arrow-scale").value)*this.radius},"spacing")}),l("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:s(function(h,f){var d=this.baseCrossLinePts.slice(),p=f/h,m=3,g=5;return d[m]=d[m]-p,d[g]=d[g]-p,d},"crossLinePts"),collide:s(function(h,f,d,p,m,g,y){var v=a(i(this.points,d+2*y,p,m)),x=a(i(this.crossLinePts(d,g),d+2*y,p,m)),b=Ms(h,f,v)||Ms(h,f,x);return b},"collide"),draw:s(function(h,f,d,p,m){var g=i(this.points,f,d,p),y=i(this.crossLinePts(f,m),f,d,p);e.arrowShapeImpl(this.name)(h,g,y)},"draw")}),l("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:s(function(h){return o(h)*.525},"gap")}),l("circle",{radius:.15,collide:s(function(h,f,d,p,m,g,y){var v=m,x=Math.pow(v.x-h,2)+Math.pow(v.y-f,2)<=Math.pow((d+2*y)*this.radius,2);return x},"collide"),draw:s(function(h,f,d,p,m){e.arrowShapeImpl(this.name)(h,p.x,p.y,this.radius*f)},"draw"),spacing:s(function(h){return e.getArrowWidth(h.pstyle("width").pfValue,h.pstyle("arrow-scale").value)*this.radius},"spacing")}),l("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:s(function(h){return 1},"spacing"),gap:s(function(h){return 1},"gap")}),l("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),l("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:s(function(h){return h.pstyle("width").pfValue*h.pstyle("arrow-scale").value},"gap")}),l("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:s(function(h){return .95*h.pstyle("width").pfValue*h.pstyle("arrow-scale").value},"gap")})};F0={};F0.projectIntoViewport=function(t,e){var r=this.cy,n=this.findContainerClientCoords(),i=n[0],a=n[1],o=n[4],l=r.pan(),u=r.zoom(),h=((t-i)/o-l.x)/u,f=((e-a)/o-l.y)/u;return[h,f]};F0.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),r=this.cy.window().getComputedStyle(t),n=s(function(x){return parseFloat(r.getPropertyValue(x))},"styleValue"),i={left:n("padding-left"),right:n("padding-right"),top:n("padding-top"),bottom:n("padding-bottom")},a={left:n("border-left-width"),right:n("border-right-width"),top:n("border-top-width"),bottom:n("border-bottom-width")},o=t.clientWidth,l=t.clientHeight,u=i.left+i.right,h=i.top+i.bottom,f=a.left+a.right,d=e.width/(o+f),p=o-u,m=l-h,g=e.left+i.left+a.left,y=e.top+i.top+a.top;return this.containerBB=[g,y,p,m,d]};F0.invalidateContainerClientCoordsCache=function(){this.containerBB=null};F0.findNearestElement=function(t,e,r,n){return this.findNearestElements(t,e,r,n)[0]};F0.findNearestElements=function(t,e,r,n){var i=this,a=this,o=a.getCachedZSortedEles(),l=[],u=a.cy.zoom(),h=a.cy.hasCompoundNodes(),f=(n?24:8)/u,d=(n?8:2)/u,p=(n?8:2)/u,m=1/0,g,y;r&&(o=o.interactive);function v(C,E){if(C.isNode()){if(y)return;y=C,l.push(C)}if(C.isEdge()&&(E==null||E<m))if(g){if(g.pstyle("z-compound-depth").value===C.pstyle("z-compound-depth").value&&g.pstyle("z-compound-depth").value===C.pstyle("z-compound-depth").value){for(var S=0;S<l.length;S++)if(l[S].isEdge()){l[S]=C,g=C,m=E??m;break}}}else l.push(C),g=C,m=E??m}s(v,"addEle");function x(C){var E=C.outerWidth()+2*d,S=C.outerHeight()+2*d,R=E/2,D=S/2,L=C.position(),P=C.pstyle("corner-radius").value==="auto"?"auto":C.pstyle("corner-radius").pfValue,M=C._private.rscratch;if(L.x-R<=t&&t<=L.x+R&&L.y-D<=e&&e<=L.y+D){var F=a.nodeShapes[i.getNodeShape(C)];if(F.checkPoint(t,e,0,E,S,L.x,L.y,P,M))return v(C,0),!0}}s(x,"checkNode");function b(C){var E=C._private,S=E.rscratch,R=C.pstyle("width").pfValue,D=C.pstyle("arrow-scale").value,L=R/2+f,P=L*L,M=L*2,z=E.source,N=E.target,F;if(S.edgeType==="segments"||S.edgeType==="straight"||S.edgeType==="haystack"){for(var I=S.allpts,O=0;O+3<I.length;O+=2)if(QUe(t,e,I[O],I[O+1],I[O+2],I[O+3],M)&&P>(F=rqe(t,e,I[O],I[O+1],I[O+2],I[O+3])))return v(C,F),!0}else if(S.edgeType==="bezier"||S.edgeType==="multibezier"||S.edgeType==="self"||S.edgeType==="compound"){for(var I=S.allpts,O=0;O+5<S.allpts.length;O+=4)if(ZUe(t,e,I[O],I[O+1],I[O+2],I[O+3],I[O+4],I[O+5],M)&&P>(F=tqe(t,e,I[O],I[O+1],I[O+2],I[O+3],I[O+4],I[O+5])))return v(C,F),!0}for(var z=z||E.source,N=N||E.target,U=i.getArrowWidth(R,D),$=[{name:"source",x:S.arrowStartX,y:S.arrowStartY,angle:S.srcArrowAngle},{name:"target",x:S.arrowEndX,y:S.arrowEndY,angle:S.tgtArrowAngle},{name:"mid-source",x:S.midX,y:S.midY,angle:S.midsrcArrowAngle},{name:"mid-target",x:S.midX,y:S.midY,angle:S.midtgtArrowAngle}],O=0;O<$.length;O++){var W=$[O],ee=a.arrowShapes[C.pstyle(W.name+"-arrow-shape").value],te=C.pstyle("width").pfValue;if(ee.roughCollide(t,e,U,W.angle,{x:W.x,y:W.y},te,f)&&ee.collide(t,e,U,W.angle,{x:W.x,y:W.y},te,f))return v(C),!0}h&&l.length>0&&(x(z),x(N))}s(b,"checkEdge");function k(C,E,S){return Al(C,E,S)}s(k,"preprop");function A(C,E){var S=C._private,R=p,D;E?D=E+"-":D="",C.boundingBox();var L=S.labelBounds[E||"main"],P=C.pstyle(D+"label").value,M=C.pstyle("text-events").strValue==="yes";if(!(!M||!P)){var F=k(S.rscratch,"labelX",E),I=k(S.rscratch,"labelY",E),O=k(S.rscratch,"labelAngle",E),z=C.pstyle(D+"text-margin-x").pfValue,N=C.pstyle(D+"text-margin-y").pfValue,U=L.x1-R-z,$=L.x2+R-z,W=L.y1-R-N,ee=L.y2+R-N;if(O){var te=Math.cos(O),ce=Math.sin(O),Z=s(function(ie,ye){return ie=ie-F,ye=ye-I,{x:ie*te-ye*ce+F,y:ie*ce+ye*te+I}},"rotate"),fe=Z(U,W),ne=Z(U,ee),H=Z($,W),Q=Z($,ee),K=[fe.x+z,fe.y+N,H.x+z,H.y+N,Q.x+z,Q.y+N,ne.x+z,ne.y+N];if(Ms(t,e,K))return v(C),!0}else if(Wg(L,t,e))return v(C),!0}}s(A,"checkLabel");for(var w=o.length-1;w>=0;w--){var T=o[w];T.isNode()?x(T)||A(T):b(T)||A(T)||A(T,"source")||A(T,"target")}return l};F0.getAllInBox=function(t,e,r,n){var i=this.getCachedZSortedEles().interactive,a=[],o=Math.min(t,r),l=Math.max(t,r),u=Math.min(e,n),h=Math.max(e,n);t=o,r=l,e=u,n=h;for(var f=Is({x1:t,y1:e,x2:r,y2:n}),d=0;d<i.length;d++){var p=i[d];if(p.isNode()){var m=p,g=m.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});hP(f,g)&&!d0e(g,f)&&a.push(m)}else{var y=p,v=y._private,x=v.rscratch;if(x.startX!=null&&x.startY!=null&&!Wg(f,x.startX,x.startY)||x.endX!=null&&x.endY!=null&&!Wg(f,x.endX,x.endY))continue;if(x.edgeType==="bezier"||x.edgeType==="multibezier"||x.edgeType==="self"||x.edgeType==="compound"||x.edgeType==="segments"||x.edgeType==="haystack"){for(var b=v.rstyle.bezierPts||v.rstyle.linePts||v.rstyle.haystackPts,k=!0,A=0;A<b.length;A++)if(!KUe(f,b[A])){k=!1;break}k&&a.push(y)}else(x.edgeType==="haystack"||x.edgeType==="straight")&&a.push(y)}}return a};t7={};t7.calculateArrowAngles=function(t){var e=t._private.rscratch,r=e.edgeType==="haystack",n=e.edgeType==="bezier",i=e.edgeType==="multibezier",a=e.edgeType==="segments",o=e.edgeType==="compound",l=e.edgeType==="self",u,h,f,d,p,m,x,b;if(r?(f=e.haystackPts[0],d=e.haystackPts[1],p=e.haystackPts[2],m=e.haystackPts[3]):(f=e.arrowStartX,d=e.arrowStartY,p=e.arrowEndX,m=e.arrowEndY),x=e.midX,b=e.midY,a)u=f-e.segpts[0],h=d-e.segpts[1];else if(i||o||l||n){var g=e.allpts,y=ji(g[0],g[2],g[4],.1),v=ji(g[1],g[3],g[5],.1);u=f-y,h=d-v}else u=f-x,h=d-b;e.srcArrowAngle=ST(u,h);var x=e.midX,b=e.midY;if(r&&(x=(f+p)/2,b=(d+m)/2),u=p-f,h=m-d,a){var g=e.allpts;if(g.length/2%2===0){var k=g.length/2,A=k-2;u=g[k]-g[A],h=g[k+1]-g[A+1]}else if(e.isRound)u=e.midVector[1],h=-e.midVector[0];else{var k=g.length/2-1,A=k-2;u=g[k]-g[A],h=g[k+1]-g[A+1]}}else if(i||o||l){var g=e.allpts,w=e.ctrlpts,T,C,E,S;if(w.length/2%2===0){var R=g.length/2-1,D=R+2,L=D+2;T=ji(g[R],g[D],g[L],0),C=ji(g[R+1],g[D+1],g[L+1],0),E=ji(g[R],g[D],g[L],1e-4),S=ji(g[R+1],g[D+1],g[L+1],1e-4)}else{var D=g.length/2-1,R=D-2,L=D+2;T=ji(g[R],g[D],g[L],.4999),C=ji(g[R+1],g[D+1],g[L+1],.4999),E=ji(g[R],g[D],g[L],.5),S=ji(g[R+1],g[D+1],g[L+1],.5)}u=E-T,h=S-C}if(e.midtgtArrowAngle=ST(u,h),e.midDispX=u,e.midDispY=h,u*=-1,h*=-1,a){var g=e.allpts;if(g.length/2%2!==0){if(!e.isRound){var k=g.length/2-1,P=k+2;u=-(g[P]-g[k]),h=-(g[P+1]-g[k+1])}}}if(e.midsrcArrowAngle=ST(u,h),a)u=p-e.segpts[e.segpts.length-2],h=m-e.segpts[e.segpts.length-1];else if(i||o||l||n){var g=e.allpts,M=g.length,y=ji(g[M-6],g[M-4],g[M-2],.9),v=ji(g[M-5],g[M-3],g[M-1],.9);u=p-y,h=m-v}else u=p-x,h=m-b;e.tgtArrowAngle=ST(u,h)};t7.getArrowWidth=t7.getArrowHeight=function(t,e){var r=this.arrowWidthCache=this.arrowWidthCache||{},n=r[t+", "+e];return n||(n=Math.max(Math.pow(t*13.37,.9),29)*e,r[t+", "+e]=n,n)};Rc={},$o={},Mde=s(function(e,r,n){n.x=r.x-e.x,n.y=r.y-e.y,n.len=Math.sqrt(n.x*n.x+n.y*n.y),n.nx=n.x/n.len,n.ny=n.y/n.len,n.ang=Math.atan2(n.ny,n.nx)},"asVec"),BXe=s(function(e,r){r.x=e.x*-1,r.y=e.y*-1,r.nx=e.nx*-1,r.ny=e.ny*-1,r.ang=e.ang>0?-(Math.PI-e.ang):Math.PI+e.ang},"invertVec"),FXe=s(function(e,r,n,i,a){if(e!==Rde?Mde(r,e,Rc):BXe($o,Rc),Mde(r,n,$o),Lde=Rc.nx*$o.ny-Rc.ny*$o.nx,Dde=Rc.nx*$o.nx-Rc.ny*-$o.ny,Uu=Math.asin(Math.max(-1,Math.min(1,Lde))),Math.abs(Uu)<1e-6){jO=r.x,KO=r.y,A0=Pg=0;return}L0=1,qT=!1,Dde<0?Uu<0?Uu=Math.PI+Uu:(Uu=Math.PI-Uu,L0=-1,qT=!0):Uu>0&&(L0=-1,qT=!0),r.radius!==void 0?Pg=r.radius:Pg=i,E0=Uu/2,OT=Math.min(Rc.len/2,$o.len/2),a?(Dc=Math.abs(Math.cos(E0)*Pg/Math.sin(E0)),Dc>OT?(Dc=OT,A0=Math.abs(Dc*Math.sin(E0)/Math.cos(E0))):A0=Pg):(Dc=Math.min(OT,Pg),A0=Math.abs(Dc*Math.sin(E0)/Math.cos(E0))),QO=r.x+$o.nx*Dc,ZO=r.y+$o.ny*Dc,jO=QO-$o.ny*A0*L0,KO=ZO+$o.nx*A0*L0,ape=r.x+Rc.nx*Dc,spe=r.y+Rc.ny*Dc,Rde=r},"calcCornerArc");s(ope,"drawPreparedRoundCorner");s(EP,"getRoundCorner");Ia={};Ia.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,i=e.vectorNormInverse,a,o=t.pstyle("source-endpoint"),l=t.pstyle("target-endpoint"),u=o.units!=null&&l.units!=null,h=s(function(w,T,C,E){var S=E-T,R=C-w,D=Math.sqrt(R*R+S*S);return{x:-S/D,y:R/D}},"recalcVectorNormInverse"),f=t.pstyle("edge-distances").value;switch(f){case"node-position":a=r;break;case"intersection":a=n;break;case"endpoints":{if(u){var d=this.manualEndptToPx(t.source()[0],o),p=Sl(d,2),m=p[0],g=p[1],y=this.manualEndptToPx(t.target()[0],l),v=Sl(y,2),x=v[0],b=v[1],k={x1:m,y1:g,x2:x,y2:b};i=h(m,g,x,b),a=k}else Kr("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}};Ia.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r._private,i=n.rscratch;if(!i.haystack){var a=Math.random()*2*Math.PI;i.source={x:Math.cos(a),y:Math.sin(a)},a=Math.random()*2*Math.PI,i.target={x:Math.cos(a),y:Math.sin(a)}}var o=n.source,l=n.target,u=o.position(),h=l.position(),f=o.width(),d=l.width(),p=o.height(),m=l.height(),g=r.pstyle("haystack-radius").value,y=g/2;i.haystackPts=i.allpts=[i.source.x*f*y+u.x,i.source.y*p*y+u.y,i.target.x*d*y+h.x,i.target.y*m*y+h.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType="haystack",i.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}};Ia.findSegmentsPoints=function(t,e){var r=t._private.rscratch,n=t.pstyle("segment-weights"),i=t.pstyle("segment-distances"),a=t.pstyle("segment-radii"),o=t.pstyle("radius-type"),l=Math.min(n.pfValue.length,i.pfValue.length),u=a.pfValue[a.pfValue.length-1],h=o.pfValue[o.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var f=0;f<l;f++){var d=n.pfValue[f],p=i.pfValue[f],m=1-d,g=d,y=this.findMidptPtsEtc(t,e),v=y.midptPts,x=y.vectorNormInverse,b={x:v.x1*m+v.x2*g,y:v.y1*m+v.y2*g};r.segpts.push(b.x+x.x*p,b.y+x.y*p),r.radii.push(a.pfValue[f]!==void 0?a.pfValue[f]:u),r.isArcRadius.push((o.pfValue[f]!==void 0?o.pfValue[f]:h)==="arc-radius")}};Ia.findLoopPoints=function(t,e,r,n){var i=t._private.rscratch,a=e.dirCounts,o=e.srcPos,l=t.pstyle("control-point-distances"),u=l?l.pfValue[0]:void 0,h=t.pstyle("loop-direction").pfValue,f=t.pstyle("loop-sweep").pfValue,d=t.pstyle("control-point-step-size").pfValue;i.edgeType="self";var p=r,m=d;n&&(p=0,m=u);var g=h-Math.PI/2,y=g-f/2,v=g+f/2,x=h+"_"+f;p=a[x]===void 0?a[x]=0:++a[x],i.ctrlpts=[o.x+Math.cos(y)*1.4*m*(p/3+1),o.y+Math.sin(y)*1.4*m*(p/3+1),o.x+Math.cos(v)*1.4*m*(p/3+1),o.y+Math.sin(v)*1.4*m*(p/3+1)]};Ia.findCompoundLoopPoints=function(t,e,r,n){var i=t._private.rscratch;i.edgeType="compound";var a=e.srcPos,o=e.tgtPos,l=e.srcW,u=e.srcH,h=e.tgtW,f=e.tgtH,d=t.pstyle("control-point-step-size").pfValue,p=t.pstyle("control-point-distances"),m=p?p.pfValue[0]:void 0,g=r,y=d;n&&(g=0,y=m);var v=50,x={x:a.x-l/2,y:a.y-u/2},b={x:o.x-h/2,y:o.y-f/2},k={x:Math.min(x.x,b.x),y:Math.min(x.y,b.y)},A=.5,w=Math.max(A,Math.log(l*.01)),T=Math.max(A,Math.log(h*.01));i.ctrlpts=[k.x,k.y-(1+Math.pow(v,1.12)/100)*y*(g/3+1)*w,k.x-(1+Math.pow(v,1.12)/100)*y*(g/3+1)*T,k.y]};Ia.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"};Ia.findBezierPoints=function(t,e,r,n,i){var a=t._private.rscratch,o=t.pstyle("control-point-step-size").pfValue,l=t.pstyle("control-point-distances"),u=t.pstyle("control-point-weights"),h=l&&u?Math.min(l.value.length,u.value.length):1,f=l?l.pfValue[0]:void 0,d=u.value[0],p=n;a.edgeType=p?"multibezier":"bezier",a.ctrlpts=[];for(var m=0;m<h;m++){var g=(.5-e.eles.length/2+r)*o*(i?-1:1),y=void 0,v=h0e(g);p&&(f=l?l.pfValue[m]:o,d=u.value[m]),n?y=f:y=f!==void 0?v*f:void 0;var x=y!==void 0?y:g,b=1-d,k=d,A=this.findMidptPtsEtc(t,e),w=A.midptPts,T=A.vectorNormInverse,C={x:w.x1*b+w.x2*k,y:w.y1*b+w.y2*k};a.ctrlpts.push(C.x+T.x*x,C.y+T.y*x)}};Ia.findTaxiPoints=function(t,e){var r=t._private.rscratch;r.edgeType="segments";var n="vertical",i="horizontal",a="leftward",o="rightward",l="downward",u="upward",h="auto",f=e.posPts,d=e.srcW,p=e.srcH,m=e.tgtW,g=e.tgtH,y=t.pstyle("edge-distances").value,v=y!=="node-position",x=t.pstyle("taxi-direction").value,b=x,k=t.pstyle("taxi-turn"),A=k.units==="%",w=k.pfValue,T=w<0,C=t.pstyle("taxi-turn-min-distance").pfValue,E=v?(d+m)/2:0,S=v?(p+g)/2:0,R=f.x2-f.x1,D=f.y2-f.y1,L=s(function(Ne,Be){return Ne>0?Math.max(Ne-Be,0):Math.min(Ne+Be,0)},"subDWH"),P=L(R,E),M=L(D,S),F=!1;b===h?x=Math.abs(P)>Math.abs(M)?i:n:b===u||b===l?(x=n,F=!0):(b===a||b===o)&&(x=i,F=!0);var I=x===n,O=I?M:P,z=I?D:R,N=h0e(z),U=!1;!(F&&(A||T))&&(b===l&&z<0||b===u&&z>0||b===a&&z>0||b===o&&z<0)&&(N*=-1,O=N*Math.abs(O),U=!0);var $;if(A){var W=w<0?1+w:w;$=W*O}else{var ee=w<0?O:0;$=ee+w*N}var te=s(function(Ne){return Math.abs(Ne)<C||Math.abs(Ne)>=Math.abs(O)},"getIsTooClose"),ce=te($),Z=te(Math.abs(O)-Math.abs($)),fe=ce||Z;if(fe&&!U)if(I){var ne=Math.abs(z)<=p/2,H=Math.abs(R)<=m/2;if(ne){var Q=(f.x1+f.x2)/2,K=f.y1,re=f.y2;r.segpts=[Q,K,Q,re]}else if(H){var ie=(f.y1+f.y2)/2,ye=f.x1,j=f.x2;r.segpts=[ye,ie,j,ie]}else r.segpts=[f.x1,f.y2]}else{var De=Math.abs(z)<=d/2,oe=Math.abs(D)<=g/2;if(De){var Re=(f.y1+f.y2)/2,Pe=f.x1,Se=f.x2;r.segpts=[Pe,Re,Se,Re]}else if(oe){var Ue=(f.x1+f.x2)/2,Oe=f.y1,_e=f.y2;r.segpts=[Ue,Oe,Ue,_e]}else r.segpts=[f.x2,f.y1]}else if(I){var he=f.y1+$+(v?p/2*N:0),q=f.x1,se=f.x2;r.segpts=[q,he,se,he]}else{var ue=f.x1+$+(v?d/2*N:0),X=f.y1,ae=f.y2;r.segpts=[ue,X,ue,ae]}if(r.isRound){var pe=t.pstyle("taxi-radius").value,de=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(pe),r.isArcRadius=new Array(r.segpts.length/2).fill(de)}};Ia.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,i=e.tgtPos,a=e.srcW,o=e.srcH,l=e.tgtW,u=e.tgtH,h=e.srcShape,f=e.tgtShape,d=e.srcCornerRadius,p=e.tgtCornerRadius,m=e.srcRs,g=e.tgtRs,y=!rt(r.startX)||!rt(r.startY),v=!rt(r.arrowStartX)||!rt(r.arrowStartY),x=!rt(r.endX)||!rt(r.endY),b=!rt(r.arrowEndX)||!rt(r.arrowEndY),k=3,A=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,w=k*A,T=I0({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),C=T<w,E=I0({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.endX,y:r.endY}),S=E<w,R=!1;if(y||v||C){R=!0;var D={x:r.ctrlpts[0]-n.x,y:r.ctrlpts[1]-n.y},L=Math.sqrt(D.x*D.x+D.y*D.y),P={x:D.x/L,y:D.y/L},M=Math.max(a,o),F={x:r.ctrlpts[0]+P.x*2*M,y:r.ctrlpts[1]+P.y*2*M},I=h.intersectLine(n.x,n.y,a,o,F.x,F.y,0,d,m);C?(r.ctrlpts[0]=r.ctrlpts[0]+P.x*(w-T),r.ctrlpts[1]=r.ctrlpts[1]+P.y*(w-T)):(r.ctrlpts[0]=I[0]+P.x*w,r.ctrlpts[1]=I[1]+P.y*w)}if(x||b||S){R=!0;var O={x:r.ctrlpts[0]-i.x,y:r.ctrlpts[1]-i.y},z=Math.sqrt(O.x*O.x+O.y*O.y),N={x:O.x/z,y:O.y/z},U=Math.max(a,o),$={x:r.ctrlpts[0]+N.x*2*U,y:r.ctrlpts[1]+N.y*2*U},W=f.intersectLine(i.x,i.y,l,u,$.x,$.y,0,p,g);S?(r.ctrlpts[0]=r.ctrlpts[0]+N.x*(w-E),r.ctrlpts[1]=r.ctrlpts[1]+N.y*(w-E)):(r.ctrlpts[0]=W[0]+N.x*w,r.ctrlpts[1]=W[1]+N.y*w)}R&&this.findEndpoints(t)}};Ia.storeAllpts=function(t){var e=t._private.rscratch;if(e.edgeType==="multibezier"||e.edgeType==="bezier"||e.edgeType==="self"||e.edgeType==="compound"){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var r=0;r+1<e.ctrlpts.length;r+=2)e.allpts.push(e.ctrlpts[r],e.ctrlpts[r+1]),r+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[r]+e.ctrlpts[r+2])/2,(e.ctrlpts[r+1]+e.ctrlpts[r+3])/2);e.allpts.push(e.endX,e.endY);var n,i;e.ctrlpts.length/2%2===0?(n=e.allpts.length/2-1,e.midX=e.allpts[n],e.midY=e.allpts[n+1]):(n=e.allpts.length/2-3,i=.5,e.midX=ji(e.allpts[n],e.allpts[n+2],e.allpts[n+4],i),e.midY=ji(e.allpts[n+1],e.allpts[n+3],e.allpts[n+5],i))}else if(e.edgeType==="straight")e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if(e.edgeType==="segments"){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var a=2;a+3<e.allpts.length;a+=2){var o=e.radii[a/2-1],l=e.isArcRadius[a/2-1];e.roundCorners.push(EP({x:e.allpts[a-2],y:e.allpts[a-1]},{x:e.allpts[a],y:e.allpts[a+1],radius:o},{x:e.allpts[a+2],y:e.allpts[a+3]},o,l))}}if(e.segpts.length%4===0){var u=e.segpts.length/2,h=u-2;e.midX=(e.segpts[h]+e.segpts[u])/2,e.midY=(e.segpts[h+1]+e.segpts[u+1])/2}else{var f=e.segpts.length/2-1;if(!e.isRound)e.midX=e.segpts[f],e.midY=e.segpts[f+1];else{var d={x:e.segpts[f],y:e.segpts[f+1]},p=e.roundCorners[f/2],m=[d.x-p.cx,d.y-p.cy],g=p.radius/Math.sqrt(Math.pow(m[0],2)+Math.pow(m[1],2));m=m.map(function(y){return y*g}),e.midX=p.cx+m[0],e.midY=p.cy+m[1],e.midVector=m}}}};Ia.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||rt(e.startX)&&rt(e.startY)&&rt(e.endX)&&rt(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,Kr("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))};Ia.findEdgeControlPoints=function(t){var e=this;if(!(!t||t.length===0)){for(var r=this,n=r.cy,i=n.hasCompoundNodes(),a={map:new Ic,get:s(function(C){var E=this.map.get(C[0]);return E!=null?E.get(C[1]):null},"get"),set:s(function(C,E){var S=this.map.get(C[0]);S==null&&(S=new Ic,this.map.set(C[0],S)),S.set(C[1],E)},"set")},o=[],l=[],u=0;u<t.length;u++){var h=t[u],f=h._private,d=h.pstyle("curve-style").value;if(!(h.removed()||!h.takesUpSpace())){if(d==="haystack"){l.push(h);continue}var p=d==="unbundled-bezier"||d.endsWith("segments")||d==="straight"||d==="straight-triangle"||d.endsWith("taxi"),m=d==="unbundled-bezier"||d==="bezier",g=f.source,y=f.target,v=g.poolIndex(),x=y.poolIndex(),b=[v,x].sort(),k=a.get(b);k==null&&(k={eles:[]},a.set(b,k),o.push(b)),k.eles.push(h),p&&(k.hasUnbundled=!0),m&&(k.hasBezier=!0)}}for(var A=s(function(C){var E=o[C],S=a.get(E),R=void 0;if(!S.hasUnbundled){var D=S.eles[0].parallelEdges().filter(function(ue){return ue.isBundledBezier()});cP(S.eles),D.forEach(function(ue){return S.eles.push(ue)}),S.eles.sort(function(ue,X){return ue.poolIndex()-X.poolIndex()})}var L=S.eles[0],P=L.source(),M=L.target();if(P.poolIndex()>M.poolIndex()){var F=P;P=M,M=F}var I=S.srcPos=P.position(),O=S.tgtPos=M.position(),z=S.srcW=P.outerWidth(),N=S.srcH=P.outerHeight(),U=S.tgtW=M.outerWidth(),$=S.tgtH=M.outerHeight(),W=S.srcShape=r.nodeShapes[e.getNodeShape(P)],ee=S.tgtShape=r.nodeShapes[e.getNodeShape(M)],te=S.srcCornerRadius=P.pstyle("corner-radius").value==="auto"?"auto":P.pstyle("corner-radius").pfValue,ce=S.tgtCornerRadius=M.pstyle("corner-radius").value==="auto"?"auto":M.pstyle("corner-radius").pfValue,Z=S.tgtRs=M._private.rscratch,fe=S.srcRs=P._private.rscratch;S.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var ne=0;ne<S.eles.length;ne++){var H=S.eles[ne],Q=H[0]._private.rscratch,K=H.pstyle("curve-style").value,re=K==="unbundled-bezier"||K.endsWith("segments")||K.endsWith("taxi"),ie=!P.same(H.source());if(!S.calculatedIntersection&&P!==M&&(S.hasBezier||S.hasUnbundled)){S.calculatedIntersection=!0;var ye=W.intersectLine(I.x,I.y,z,N,O.x,O.y,0,te,fe),j=S.srcIntn=ye,De=ee.intersectLine(O.x,O.y,U,$,I.x,I.y,0,ce,Z),oe=S.tgtIntn=De,Re=S.intersectionPts={x1:ye[0],x2:De[0],y1:ye[1],y2:De[1]},Pe=S.posPts={x1:I.x,x2:O.x,y1:I.y,y2:O.y},Se=De[1]-ye[1],Ue=De[0]-ye[0],Oe=Math.sqrt(Ue*Ue+Se*Se),_e=S.vector={x:Ue,y:Se},he=S.vectorNorm={x:_e.x/Oe,y:_e.y/Oe},q={x:-he.y,y:he.x};S.nodesOverlap=!rt(Oe)||ee.checkPoint(ye[0],ye[1],0,U,$,O.x,O.y,ce,Z)||W.checkPoint(De[0],De[1],0,z,N,I.x,I.y,te,fe),S.vectorNormInverse=q,R={nodesOverlap:S.nodesOverlap,dirCounts:S.dirCounts,calculatedIntersection:!0,hasBezier:S.hasBezier,hasUnbundled:S.hasUnbundled,eles:S.eles,srcPos:O,tgtPos:I,srcW:U,srcH:$,tgtW:z,tgtH:N,srcIntn:oe,tgtIntn:j,srcShape:ee,tgtShape:W,posPts:{x1:Pe.x2,y1:Pe.y2,x2:Pe.x1,y2:Pe.y1},intersectionPts:{x1:Re.x2,y1:Re.y2,x2:Re.x1,y2:Re.y1},vector:{x:-_e.x,y:-_e.y},vectorNorm:{x:-he.x,y:-he.y},vectorNormInverse:{x:-q.x,y:-q.y}}}var se=ie?R:S;Q.nodesOverlap=se.nodesOverlap,Q.srcIntn=se.srcIntn,Q.tgtIntn=se.tgtIntn,Q.isRound=K.startsWith("round"),i&&(P.isParent()||P.isChild()||M.isParent()||M.isChild())&&(P.parents().anySame(M)||M.parents().anySame(P)||P.same(M)&&P.isParent())?e.findCompoundLoopPoints(H,se,ne,re):P===M?e.findLoopPoints(H,se,ne,re):K.endsWith("segments")?e.findSegmentsPoints(H,se):K.endsWith("taxi")?e.findTaxiPoints(H,se):K==="straight"||!re&&S.eles.length%2===1&&ne===Math.floor(S.eles.length/2)?e.findStraightEdgePoints(H):e.findBezierPoints(H,se,ne,re,ie),e.findEndpoints(H),e.tryToCorrectInvalidPoints(H,se),e.checkForInvalidEdgeWarning(H),e.storeAllpts(H),e.storeEdgeProjections(H),e.calculateArrowAngles(H),e.recalculateEdgeLabelProjections(H),e.calculateLabelAngles(H)}},"_loop"),w=0;w<o.length;w++)A(w);this.findHaystackPoints(l)}};s(lpe,"getPts");Ia.getSegmentPoints=function(t){var e=t[0]._private.rscratch,r=e.edgeType;if(r==="segments")return this.recalculateRenderedStyle(t),lpe(e.segpts)};Ia.getControlPoints=function(t){var e=t[0]._private.rscratch,r=e.edgeType;if(r==="bezier"||r==="multibezier"||r==="self"||r==="compound")return this.recalculateRenderedStyle(t),lpe(e.ctrlpts)};Ia.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};zx={};zx.manualEndptToPx=function(t,e){var r=this,n=t.position(),i=t.outerWidth(),a=t.outerHeight(),o=t._private.rscratch;if(e.value.length===2){var l=[e.pfValue[0],e.pfValue[1]];return e.units[0]==="%"&&(l[0]=l[0]*i),e.units[1]==="%"&&(l[1]=l[1]*a),l[0]+=n.x,l[1]+=n.y,l}else{var u=e.pfValue[0];u=-Math.PI/2+u;var h=2*Math.max(i,a),f=[n.x+Math.cos(u)*h,n.y+Math.sin(u)*h];return r.nodeShapes[this.getNodeShape(t)].intersectLine(n.x,n.y,i,a,f[0],f[1],0,t.pstyle("corner-radius").value==="auto"?"auto":t.pstyle("corner-radius").pfValue,o)}};zx.findEndpoints=function(t){var e=this,r,n=t.source()[0],i=t.target()[0],a=n.position(),o=i.position(),l=t.pstyle("target-arrow-shape").value,u=t.pstyle("source-arrow-shape").value,h=t.pstyle("target-distance-from-node").pfValue,f=t.pstyle("source-distance-from-node").pfValue,d=n._private.rscratch,p=i._private.rscratch,m=t.pstyle("curve-style").value,g=t._private.rscratch,y=g.edgeType,v=m==="taxi",x=y==="self"||y==="compound",b=y==="bezier"||y==="multibezier"||x,k=y!=="bezier",A=y==="straight"||y==="segments",w=y==="segments",T=b||k||A,C=x||v,E=t.pstyle("source-endpoint"),S=C?"outside-to-node":E.value,R=n.pstyle("corner-radius").value==="auto"?"auto":n.pstyle("corner-radius").pfValue,D=t.pstyle("target-endpoint"),L=C?"outside-to-node":D.value,P=i.pstyle("corner-radius").value==="auto"?"auto":i.pstyle("corner-radius").pfValue;g.srcManEndpt=E,g.tgtManEndpt=D;var M,F,I,O;if(b){var z=[g.ctrlpts[0],g.ctrlpts[1]],N=k?[g.ctrlpts[g.ctrlpts.length-2],g.ctrlpts[g.ctrlpts.length-1]]:z;M=N,F=z}else if(A){var U=w?g.segpts.slice(0,2):[o.x,o.y],$=w?g.segpts.slice(g.segpts.length-2):[a.x,a.y];M=$,F=U}if(L==="inside-to-node")r=[o.x,o.y];else if(D.units)r=this.manualEndptToPx(i,D);else if(L==="outside-to-line")r=g.tgtIntn;else if(L==="outside-to-node"||L==="outside-to-node-or-label"?I=M:(L==="outside-to-line"||L==="outside-to-line-or-label")&&(I=[a.x,a.y]),r=e.nodeShapes[this.getNodeShape(i)].intersectLine(o.x,o.y,i.outerWidth(),i.outerHeight(),I[0],I[1],0,P,p),L==="outside-to-node-or-label"||L==="outside-to-line-or-label"){var W=i._private.rscratch,ee=W.labelWidth,te=W.labelHeight,ce=W.labelX,Z=W.labelY,fe=ee/2,ne=te/2,H=i.pstyle("text-valign").value;H==="top"?Z-=ne:H==="bottom"&&(Z+=ne);var Q=i.pstyle("text-halign").value;Q==="left"?ce-=fe:Q==="right"&&(ce+=fe);var K=_x(I[0],I[1],[ce-fe,Z-ne,ce+fe,Z-ne,ce+fe,Z+ne,ce-fe,Z+ne],o.x,o.y);if(K.length>0){var re=a,ie=S0(re,Fg(r)),ye=S0(re,Fg(K)),j=ie;if(ye<ie&&(r=K,j=ye),K.length>2){var De=S0(re,{x:K[2],y:K[3]});De<j&&(r=[K[2],K[3]])}}}var oe=_T(r,M,e.arrowShapes[l].spacing(t)+h),Re=_T(r,M,e.arrowShapes[l].gap(t)+h);if(g.endX=Re[0],g.endY=Re[1],g.arrowEndX=oe[0],g.arrowEndY=oe[1],S==="inside-to-node")r=[a.x,a.y];else if(E.units)r=this.manualEndptToPx(n,E);else if(S==="outside-to-line")r=g.srcIntn;else if(S==="outside-to-node"||S==="outside-to-node-or-label"?O=F:(S==="outside-to-line"||S==="outside-to-line-or-label")&&(O=[o.x,o.y]),r=e.nodeShapes[this.getNodeShape(n)].intersectLine(a.x,a.y,n.outerWidth(),n.outerHeight(),O[0],O[1],0,R,d),S==="outside-to-node-or-label"||S==="outside-to-line-or-label"){var Pe=n._private.rscratch,Se=Pe.labelWidth,Ue=Pe.labelHeight,Oe=Pe.labelX,_e=Pe.labelY,he=Se/2,q=Ue/2,se=n.pstyle("text-valign").value;se==="top"?_e-=q:se==="bottom"&&(_e+=q);var ue=n.pstyle("text-halign").value;ue==="left"?Oe-=he:ue==="right"&&(Oe+=he);var X=_x(O[0],O[1],[Oe-he,_e-q,Oe+he,_e-q,Oe+he,_e+q,Oe-he,_e+q],a.x,a.y);if(X.length>0){var ae=o,pe=S0(ae,Fg(r)),de=S0(ae,Fg(X)),Ie=pe;if(de<pe&&(r=[X[0],X[1]],Ie=de),X.length>2){var Ne=S0(ae,{x:X[2],y:X[3]});Ne<Ie&&(r=[X[2],X[3]])}}}var Be=_T(r,F,e.arrowShapes[u].spacing(t)+f),ze=_T(r,F,e.arrowShapes[u].gap(t)+f);g.startX=ze[0],g.startY=ze[1],g.arrowStartX=Be[0],g.arrowStartY=Be[1],T&&(!rt(g.startX)||!rt(g.startY)||!rt(g.endX)||!rt(g.endY)?g.badLine=!0:g.badLine=!1)};zx.getSourceEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[0],y:e.haystackPts[1]};default:return{x:e.arrowStartX,y:e.arrowStartY}}};zx.getTargetEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[2],y:e.haystackPts[3]};default:return{x:e.arrowEndX,y:e.arrowEndY}}};CP={};s(zXe,"pushBezierPts");CP.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,n=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,n==="multibezier"||n==="bezier"||n==="self"||n==="compound"){e.rstyle.bezierPts=[];for(var i=0;i+5<r.allpts.length;i+=4)zXe(this,t,r.allpts.slice(i,i+6))}else if(n==="segments")for(var a=e.rstyle.linePts=[],i=0;i+1<r.allpts.length;i+=2)a.push({x:r.allpts[i],y:r.allpts[i+1]});else if(n==="haystack"){var o=r.haystackPts;e.rstyle.haystackPts=[{x:o[0],y:o[1]},{x:o[2],y:o[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth};CP.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};Oc={};Oc.recalculateNodeLabelProjection=function(t){var e=t.pstyle("label").strValue;if(!gf(e)){var r,n,i=t._private,a=t.width(),o=t.height(),l=t.padding(),u=t.position(),h=t.pstyle("text-halign").strValue,f=t.pstyle("text-valign").strValue,d=i.rscratch,p=i.rstyle;switch(h){case"left":r=u.x-a/2-l;break;case"right":r=u.x+a/2+l;break;default:r=u.x}switch(f){case"top":n=u.y-o/2-l;break;case"bottom":n=u.y+o/2+l;break;default:n=u.y}d.labelX=r,d.labelY=n,p.labelX=r,p.labelY=n,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}};cpe=s(function(e,r){var n=Math.atan(r/e);return e===0&&n<0&&(n=n*-1),n},"lineAngleFromDelta"),upe=s(function(e,r){var n=r.x-e.x,i=r.y-e.y;return cpe(n,i)},"lineAngle"),$Xe=s(function(e,r,n,i){var a=Sx(0,i-.001,1),o=Sx(0,i+.001,1),l=$g(e,r,n,a),u=$g(e,r,n,o);return upe(l,u)},"bezierAngle");Oc.recalculateEdgeLabelProjections=function(t){var e,r=t._private,n=r.rscratch,i=this,a={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(a.mid||a.source||a.target){e={x:n.midX,y:n.midY};var o=s(function(d,p,m){ff(r.rscratch,d,p,m),ff(r.rstyle,d,p,m)},"setRs");o("labelX",null,e.x),o("labelY",null,e.y);var l=cpe(n.midDispX,n.midDispY);o("labelAutoAngle",null,l);var u=s(function f(){if(f.cache)return f.cache;for(var d=[],p=0;p+5<n.allpts.length;p+=4){var m={x:n.allpts[p],y:n.allpts[p+1]},g={x:n.allpts[p+2],y:n.allpts[p+3]},y={x:n.allpts[p+4],y:n.allpts[p+5]};d.push({p0:m,p1:g,p2:y,startDist:0,length:0,segments:[]})}var v=r.rstyle.bezierPts,x=i.bezierProjPcts.length;function b(C,E,S,R,D){var L=I0(E,S),P=C.segments[C.segments.length-1],M={p0:E,p1:S,t0:R,t1:D,startDist:P?P.startDist+P.length:0,length:L};C.segments.push(M),C.length+=L}s(b,"addSegment");for(var k=0;k<d.length;k++){var A=d[k],w=d[k-1];w&&(A.startDist=w.startDist+w.length),b(A,A.p0,v[k*x],0,i.bezierProjPcts[0]);for(var T=0;T<x-1;T++)b(A,v[k*x+T],v[k*x+T+1],i.bezierProjPcts[T],i.bezierProjPcts[T+1]);b(A,v[k*x+x-1],A.p2,i.bezierProjPcts[x-1],1)}return f.cache=d},"createControlPointInfo"),h=s(function(d){var p,m=d==="source";if(a[d]){var g=t.pstyle(d+"-text-offset").pfValue;switch(n.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var y=u(),v,x=0,b=0,k=0;k<y.length;k++){for(var A=y[m?k:y.length-1-k],w=0;w<A.segments.length;w++){var T=A.segments[m?w:A.segments.length-1-w],C=k===y.length-1&&w===A.segments.length-1;if(x=b,b+=T.length,b>=g||C){v={cp:A,segment:T};break}}if(v)break}var E=v.cp,S=v.segment,R=(g-x)/S.length,D=S.t1-S.t0,L=m?S.t0+D*R:S.t1-D*R;L=Sx(0,L,1),e=$g(E.p0,E.p1,E.p2,L),p=$Xe(E.p0,E.p1,E.p2,L);break}case"straight":case"segments":case"haystack":{for(var P=0,M,F,I,O,z=n.allpts.length,N=0;N+3<z&&(m?(I={x:n.allpts[N],y:n.allpts[N+1]},O={x:n.allpts[N+2],y:n.allpts[N+3]}):(I={x:n.allpts[z-2-N],y:n.allpts[z-1-N]},O={x:n.allpts[z-4-N],y:n.allpts[z-3-N]}),M=I0(I,O),F=P,P+=M,!(P>=g));N+=2);var U=g-F,$=U/M;$=Sx(0,$,1),e=WUe(I,O,$),p=upe(I,O);break}}o("labelX",d,e.x),o("labelY",d,e.y),o("labelAutoAngle",d,p)}},"calculateEndProjection");h("source"),h("target"),this.applyLabelDimensions(t)}};Oc.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};Oc.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),i=this.calculateLabelDimensions(t,n),a=t.pstyle("line-height").pfValue,o=t.pstyle("text-wrap").strValue,l=Al(r.rscratch,"labelWrapCachedLines",e)||[],u=o!=="wrap"?1:Math.max(l.length,1),h=i.height/u,f=h*a,d=i.width,p=i.height+(u-1)*(a-1)*h;ff(r.rstyle,"labelWidth",e,d),ff(r.rscratch,"labelWidth",e,d),ff(r.rstyle,"labelHeight",e,p),ff(r.rscratch,"labelHeight",e,p),ff(r.rscratch,"labelLineHeight",e,f)};Oc.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",i=t.pstyle(n+"label").strValue,a=t.pstyle("text-transform").value,o=s(function(ee,te){return te?(ff(r.rscratch,ee,e,te),te):Al(r.rscratch,ee,e)},"rscratch");if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var l=t.pstyle("text-wrap").value;if(l==="wrap"){var u=o("labelKey");if(u!=null&&o("labelWrapKey")===u)return o("labelWrapCachedText");for(var h="\u200B",f=i.split(`
`),d=t.pstyle("text-max-width").pfValue,p=t.pstyle("text-overflow-wrap").value,m=p==="anywhere",g=[],y=/[\s\u200b]+|$/g,v=0;v<f.length;v++){var x=f[v],b=this.calculateLabelDimensions(t,x),k=b.width;if(m){var A=x.split("").join(h);x=A}if(k>d){var w=x.matchAll(y),T="",C=0,E=Hde(w),S;try{for(E.s();!(S=E.n()).done;){var R=S.value,D=R[0],L=x.substring(C,R.index);C=R.index+D.length;var P=T.length===0?L:T+L+D,M=this.calculateLabelDimensions(t,P),F=M.width;F<=d?T+=L+D:(T&&g.push(T),T=L+D)}}catch(W){E.e(W)}finally{E.f()}T.match(/^[\s\u200b]+$/)||g.push(T)}else g.push(x)}o("labelWrapCachedLines",g),i=o("labelWrapCachedText",g.join(`
`)),o("labelWrapKey",u)}else if(l==="ellipsis"){var I=t.pstyle("text-max-width").pfValue,O="",z="\u2026",N=!1;if(this.calculateLabelDimensions(t,i).width<I)return i;for(var U=0;U<i.length;U++){var $=this.calculateLabelDimensions(t,O+i[U]+z).width;if($>I)break;O+=i[U],U===i.length-1&&(N=!0)}return N||(O+=z),O}return i};Oc.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};Oc.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),i=n.document,a=M0(e,t._private.labelDimsKey),o=r.labelDimCache||(r.labelDimCache=[]),l=o[a];if(l!=null)return l;var u=0,h=t.pstyle("font-style").strValue,f=t.pstyle("font-size").pfValue,d=t.pstyle("font-family").strValue,p=t.pstyle("font-weight").strValue,m=this.labelCalcCanvas,g=this.labelCalcCanvasContext;if(!m){m=this.labelCalcCanvas=i.createElement("canvas"),g=this.labelCalcCanvasContext=m.getContext("2d");var y=m.style;y.position="absolute",y.left="-9999px",y.top="-9999px",y.zIndex="-1",y.visibility="hidden",y.pointerEvents="none"}g.font="".concat(h," ").concat(p," ").concat(f,"px ").concat(d);for(var v=0,x=0,b=e.split(`
`),k=0;k<b.length;k++){var A=b[k],w=g.measureText(A),T=Math.ceil(w.width),C=f;v=Math.max(T,v),x+=C}return v+=u,x+=u,o[a]={width:v,height:x}};Oc.calculateLabelAngle=function(t,e){var r=t._private,n=r.rscratch,i=t.isEdge(),a=e?e+"-":"",o=t.pstyle(a+"text-rotation"),l=o.strValue;return l==="none"?0:i&&l==="autorotate"?n.labelAutoAngle:l==="autorotate"?0:o.pfValue};Oc.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),n=t._private,i=n.rscratch;i.labelAngle=e.calculateLabelAngle(t),r&&(i.sourceLabelAngle=e.calculateLabelAngle(t,"source"),i.targetLabelAngle=e.calculateLabelAngle(t,"target"))};hpe={},Ide=28,Nde=!1;hpe.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<Ide||t.height()<Ide))return Nde||(Kr("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Nde=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var n=t.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(n).name}return r};x7={};x7.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,n=s(function(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),l)for(var u=0;u<o.length;u++){var h=o[u],f=h._private,d=f.rstyle;d.clean=!1,d.cleanConnected=!1}},"enqueue");r.binder(t).on("bounds.* dirty.*",s(function(o){var l=o.target;n(l)},"onDirtyBounds")).on("style.* background.*",s(function(o){var l=o.target;n(l,!1)},"onDirtyStyle"));var i=s(function(o){if(o){var l=r.onUpdateEleCalcsFns;e.cleanStyle();for(var u=0;u<e.length;u++){var h=e[u],f=h._private.rstyle;h.isNode()&&!f.cleanConnected&&(n(h.connectedEdges()),f.cleanConnected=!0)}if(l)for(var d=0;d<l.length;d++){var p=l[d];p(o,e)}r.recalculateRenderedStyle(e),e=t.collection()}},"updateEleCalcs");r.flushRenderedStyleQueue=function(){i(!0)},r.beforeRender(i,r.beforeRenderPriorities.eleCalcs)};x7.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)};x7.recalculateRenderedStyle=function(t,e){var r=s(function(A){return A._private.rstyle.cleanConnected},"isCleanConnected"),n=[],i=[];if(!this.destroyed){e===void 0&&(e=!0);for(var a=0;a<t.length;a++){var o=t[a],l=o._private,u=l.rstyle;o.isEdge()&&(!r(o.source())||!r(o.target()))&&(u.clean=!1),!(e&&u.clean||o.removed())&&o.pstyle("display").value!=="none"&&(l.group==="nodes"?i.push(o):n.push(o),u.clean=!0)}for(var h=0;h<i.length;h++){var f=i[h],d=f._private,p=d.rstyle,m=f.position();this.recalculateNodeLabelProjection(f),p.nodeX=m.x,p.nodeY=m.y,p.nodeW=f.pstyle("width").pfValue,p.nodeH=f.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var g=0;g<n.length;g++){var y=n[g],v=y._private,x=v.rstyle,b=v.rscratch;x.srcX=b.arrowStartX,x.srcY=b.arrowStartY,x.tgtX=b.arrowEndX,x.tgtY=b.arrowEndY,x.midX=b.midX,x.midY=b.midY,x.labelAngle=b.labelAngle,x.sourceLabelAngle=b.sourceLabelAngle,x.targetLabelAngle=b.targetLabelAngle}}};b7={};b7.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=t[r],i=n._private.rscratch;n.grabbed()&&!n.isParent()?e.push(n):i.inDragLayer?t.drag.push(n):t.nondrag.push(n)}for(var r=0;r<e.length;r++){var n=e[r];t.drag.push(n)}}};b7.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};b7.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(X0e),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};fpe={};[F0,t7,Ia,zx,CP,Oc,hpe,x7,b7].forEach(function(t){Pt(fpe,t)});dpe={};dpe.getCachedImage=function(t,e,r){var n=this,i=n.imageCache=n.imageCache||{},a=i[t];if(a)return a.image.complete||a.image.addEventListener("load",r),a.image;a=i[t]=i[t]||{};var o=a.image=new Image;o.addEventListener("load",r),o.addEventListener("error",function(){o.error=!0});var l="data:",u=t.substring(0,l.length).toLowerCase()===l;return u||(e=e==="null"?null:e,o.crossOrigin=e),o.src=t,o};t1={};t1.registerBinding=function(t,e,r,n){var i=Array.prototype.slice.apply(arguments,[1]),a=this.binder(t);return a.on.apply(a,i)};t1.binder=function(t){var e=this,r=e.cy.window(),n=t===r||t===r.document||t===r.document.body||hVe(t);if(e.supportsPassiveEvents==null){var i=!1;try{var a=Object.defineProperty({},"passive",{get:s(function(){return i=!0,!0},"get")});r.addEventListener("test",null,a)}catch{}e.supportsPassiveEvents=i}var o=s(function(u,h,f){var d=Array.prototype.slice.call(arguments);return n&&e.supportsPassiveEvents&&(d[2]={capture:f??!1,passive:!1,once:!1}),e.bindings.push({target:t,args:d}),(t.addEventListener||t.on).apply(t,d),this},"on");return{on:o,addEventListener:o,addListener:o,bind:o}};t1.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()};t1.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()};t1.load=function(){var t=this,e=t.cy.window(),r=s(function(q){return q.selected()},"isSelected"),n=s(function(q,se,ue,X){q==null&&(q=t.cy);for(var ae=0;ae<se.length;ae++){var pe=se[ae];q.emit({originalEvent:ue,type:pe,position:X})}},"triggerEvents"),i=s(function(q){return q.shiftKey||q.metaKey||q.ctrlKey},"isMultSelKeyDown"),a=s(function(q,se){var ue=!0;if(t.cy.hasCompoundNodes()&&q&&q.pannable())for(var X=0;se&&X<se.length;X++){var q=se[X];if(q.isNode()&&q.isParent()&&!q.pannable()){ue=!1;break}}else ue=!0;return ue},"allowPanningPassthrough"),o=s(function(q){q[0]._private.grabbed=!0},"setGrabbed"),l=s(function(q){q[0]._private.grabbed=!1},"setFreed"),u=s(function(q){q[0]._private.rscratch.inDragLayer=!0},"setInDragLayer"),h=s(function(q){q[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),f=s(function(q){q[0]._private.rscratch.isGrabTarget=!0},"setGrabTarget"),d=s(function(q){q[0]._private.rscratch.isGrabTarget=!1},"removeGrabTarget"),p=s(function(q,se){var ue=se.addToList,X=ue.has(q);!X&&q.grabbable()&&!q.locked()&&(ue.merge(q),o(q))},"addToDragList"),m=s(function(q,se){if(q.cy().hasCompoundNodes()&&!(se.inDragLayer==null&&se.addToList==null)){var ue=q.descendants();se.inDragLayer&&(ue.forEach(u),ue.connectedEdges().forEach(u)),se.addToList&&p(ue,se)}},"addDescendantsToDrag"),g=s(function(q,se){se=se||{};var ue=q.cy().hasCompoundNodes();se.inDragLayer&&(q.forEach(u),q.neighborhood().stdFilter(function(X){return!ue||X.isEdge()}).forEach(u)),se.addToList&&q.forEach(function(X){p(X,se)}),m(q,se),x(q,{inDragLayer:se.inDragLayer}),t.updateCachedGrabbedEles()},"addNodesToDrag"),y=g,v=s(function(q){q&&(t.getCachedZSortedEles().forEach(function(se){l(se),h(se),d(se)}),t.updateCachedGrabbedEles())},"freeDraggedElements"),x=s(function(q,se){if(!(se.inDragLayer==null&&se.addToList==null)&&q.cy().hasCompoundNodes()){var ue=q.ancestors().orphans();if(!ue.same(q)){var X=ue.descendants().spawnSelf().merge(ue).unmerge(q).unmerge(q.descendants()),ae=X.connectedEdges();se.inDragLayer&&(ae.forEach(u),X.forEach(u)),se.addToList&&X.forEach(function(pe){p(pe,se)})}}},"updateAncestorsInDragLayer"),b=s(function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},"blurActiveDomElement"),k=typeof MutationObserver<"u",A=typeof ResizeObserver<"u";k?(t.removeObserver=new MutationObserver(function(he){for(var q=0;q<he.length;q++){var se=he[q],ue=se.removedNodes;if(ue)for(var X=0;X<ue.length;X++){var ae=ue[X];if(ae===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(he){t.destroy()});var w=a7(function(){t.cy.resize()},100);k&&(t.styleObserver=new MutationObserver(w),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(e,"resize",w),A&&(t.resizeObserver=new ResizeObserver(w),t.resizeObserver.observe(t.container));var T=s(function(q,se){for(;q!=null;)se(q),q=q.parentNode},"forEachUp"),C=s(function(){t.invalidateContainerClientCoordsCache()},"invalidateCoords");T(t.container,function(he){t.registerBinding(he,"transitionend",C),t.registerBinding(he,"animationend",C),t.registerBinding(he,"scroll",C)}),t.registerBinding(t.container,"contextmenu",function(he){he.preventDefault()});var E=s(function(){return t.selection[4]!==0},"inBoxSelection"),S=s(function(q){for(var se=t.findContainerClientCoords(),ue=se[0],X=se[1],ae=se[2],pe=se[3],de=q.touches?q.touches:[q],Ie=!1,Ne=0;Ne<de.length;Ne++){var Be=de[Ne];if(ue<=Be.clientX&&Be.clientX<=ue+ae&&X<=Be.clientY&&Be.clientY<=X+pe){Ie=!0;break}}if(!Ie)return!1;for(var ze=t.container,qe=q.target,Fe=qe.parentNode,we=!1;Fe;){if(Fe===ze){we=!0;break}Fe=Fe.parentNode}return!!we},"eventInContainer");t.registerBinding(t.container,"mousedown",s(function(q){if(S(q)&&!(t.hoverData.which===1&&q.which!==1)){q.preventDefault(),b(),t.hoverData.capture=!0,t.hoverData.which=q.which;var se=t.cy,ue=[q.clientX,q.clientY],X=t.projectIntoViewport(ue[0],ue[1]),ae=t.selection,pe=t.findNearestElements(X[0],X[1],!0,!1),de=pe[0],Ie=t.dragData.possibleDragElements;t.hoverData.mdownPos=X,t.hoverData.mdownGPos=ue;var Ne=s(function(){t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var Je=t.hoverData.down;Je?Je.emit({originalEvent:q,type:"taphold",position:{x:X[0],y:X[1]}}):se.emit({originalEvent:q,type:"taphold",position:{x:X[0],y:X[1]}})}},t.tapholdDuration)},"checkForTaphold");if(q.which==3){t.hoverData.cxtStarted=!0;var Be={originalEvent:q,type:"cxttapstart",position:{x:X[0],y:X[1]}};de?(de.activate(),de.emit(Be),t.hoverData.down=de):se.emit(Be),t.hoverData.downTime=new Date().getTime(),t.hoverData.cxtDragged=!1}else if(q.which==1){de&&de.activate();{if(de!=null&&t.nodeIsGrabbable(de)){var ze=s(function(Je){return{originalEvent:q,type:Je,position:{x:X[0],y:X[1]}}},"makeEvent"),qe=s(function(Je){Je.emit(ze("grab"))},"triggerGrab");if(f(de),!de.selected())Ie=t.dragData.possibleDragElements=se.collection(),y(de,{addToList:Ie}),de.emit(ze("grabon")).emit(ze("grab"));else{Ie=t.dragData.possibleDragElements=se.collection();var Fe=se.$(function(we){return we.isNode()&&we.selected()&&t.nodeIsGrabbable(we)});g(Fe,{addToList:Ie}),de.emit(ze("grabon")),Fe.forEach(qe)}t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=de,t.hoverData.downs=pe,t.hoverData.downTime=new Date().getTime()}n(de,["mousedown","tapstart","vmousedown"],q,{x:X[0],y:X[1]}),de==null?(ae[4]=1,t.data.bgActivePosistion={x:X[0],y:X[1]},t.redrawHint("select",!0),t.redraw()):de.pannable()&&(ae[4]=1),Ne()}ae[0]=ae[2]=X[0],ae[1]=ae[3]=X[1]}},"mousedownHandler"),!1),t.registerBinding(e,"mousemove",s(function(q){var se=t.hoverData.capture;if(!(!se&&!S(q))){var ue=!1,X=t.cy,ae=X.zoom(),pe=[q.clientX,q.clientY],de=t.projectIntoViewport(pe[0],pe[1]),Ie=t.hoverData.mdownPos,Ne=t.hoverData.mdownGPos,Be=t.selection,ze=null;!t.hoverData.draggingEles&&!t.hoverData.dragging&&!t.hoverData.selecting&&(ze=t.findNearestElement(de[0],de[1],!0,!1));var qe=t.hoverData.last,Fe=t.hoverData.down,we=[de[0]-Be[2],de[1]-Be[3]],Je=t.dragData.possibleDragElements,We;if(Ne){var or=pe[0]-Ne[0],Cr=or*or,Ut=pe[1]-Ne[1],ar=Ut*Ut,ut=Cr+ar;t.hoverData.isOverThresholdDrag=We=ut>=t.desktopTapThreshold2}var Rt=i(q);We&&(t.hoverData.tapholdCancelled=!0);var Qe=s(function(){var Bt=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Bt.length===0?(Bt.push(we[0]),Bt.push(we[1])):(Bt[0]+=we[0],Bt[1]+=we[1])},"updateDragDelta");ue=!0,n(ze,["mousemove","vmousemove","tapdrag"],q,{x:de[0],y:de[1]});var Dt=s(function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||X.emit({originalEvent:q,type:"boxstart",position:{x:de[0],y:de[1]}}),Be[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()},"goIntoBoxMode");if(t.hoverData.which===3){if(We){var qt={originalEvent:q,type:"cxtdrag",position:{x:de[0],y:de[1]}};Fe?Fe.emit(qt):X.emit(qt),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||ze!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:q,type:"cxtdragout",position:{x:de[0],y:de[1]}}),t.hoverData.cxtOver=ze,ze&&ze.emit({originalEvent:q,type:"cxtdragover",position:{x:de[0],y:de[1]}}))}}else if(t.hoverData.dragging){if(ue=!0,X.panningEnabled()&&X.userPanningEnabled()){var yt;if(t.hoverData.justStartedPan){var Et=t.hoverData.mdownPos;yt={x:(de[0]-Et[0])*ae,y:(de[1]-Et[1])*ae},t.hoverData.justStartedPan=!1}else yt={x:we[0]*ae,y:we[1]*ae};X.panBy(yt),X.emit("dragpan"),t.hoverData.dragged=!0}de=t.projectIntoViewport(q.clientX,q.clientY)}else if(Be[4]==1&&(Fe==null||Fe.pannable())){if(We){if(!t.hoverData.dragging&&X.boxSelectionEnabled()&&(Rt||!X.panningEnabled()||!X.userPanningEnabled()))Dt();else if(!t.hoverData.selecting&&X.panningEnabled()&&X.userPanningEnabled()){var pt=a(Fe,t.hoverData.downs);pt&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Be[4]=0,t.data.bgActivePosistion=Fg(Ie),t.redrawHint("select",!0),t.redraw())}Fe&&Fe.pannable()&&Fe.active()&&Fe.unactivate()}}else{if(Fe&&Fe.pannable()&&Fe.active()&&Fe.unactivate(),(!Fe||!Fe.grabbed())&&ze!=qe&&(qe&&n(qe,["mouseout","tapdragout"],q,{x:de[0],y:de[1]}),ze&&n(ze,["mouseover","tapdragover"],q,{x:de[0],y:de[1]}),t.hoverData.last=ze),Fe)if(We){if(X.boxSelectionEnabled()&&Rt)Fe&&Fe.grabbed()&&(v(Je),Fe.emit("freeon"),Je.emit("free"),t.dragData.didDrag&&(Fe.emit("dragfreeon"),Je.emit("dragfree"))),Dt();else if(Fe&&Fe.grabbed()&&t.nodeIsDraggable(Fe)){var Wt=!t.dragData.didDrag;Wt&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||g(Je,{inDragLayer:!0});var ot={x:0,y:0};if(rt(we[0])&&rt(we[1])&&(ot.x+=we[0],ot.y+=we[1],Wt)){var fr=t.hoverData.dragDelta;fr&&rt(fr[0])&&rt(fr[1])&&(ot.x+=fr[0],ot.y+=fr[1])}t.hoverData.draggingEles=!0,Je.silentShift(ot).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else Qe();ue=!0}if(Be[2]=de[0],Be[3]=de[1],ue)return q.stopPropagation&&q.stopPropagation(),q.preventDefault&&q.preventDefault(),!1}},"mousemoveHandler"),!1);var R,D,L;t.registerBinding(e,"mouseup",s(function(q){if(!(t.hoverData.which===1&&q.which!==1&&t.hoverData.capture)){var se=t.hoverData.capture;if(se){t.hoverData.capture=!1;var ue=t.cy,X=t.projectIntoViewport(q.clientX,q.clientY),ae=t.selection,pe=t.findNearestElement(X[0],X[1],!0,!1),de=t.dragData.possibleDragElements,Ie=t.hoverData.down,Ne=i(q);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,Ie&&Ie.unactivate(),t.hoverData.which===3){var Be={originalEvent:q,type:"cxttapend",position:{x:X[0],y:X[1]}};if(Ie?Ie.emit(Be):ue.emit(Be),!t.hoverData.cxtDragged){var ze={originalEvent:q,type:"cxttap",position:{x:X[0],y:X[1]}};Ie?Ie.emit(ze):ue.emit(ze)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(n(pe,["mouseup","tapend","vmouseup"],q,{x:X[0],y:X[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(n(Ie,["click","tap","vclick"],q,{x:X[0],y:X[1]}),D=!1,q.timeStamp-L<=ue.multiClickDebounceTime()?(R&&clearTimeout(R),D=!0,L=null,n(Ie,["dblclick","dbltap","vdblclick"],q,{x:X[0],y:X[1]})):(R=setTimeout(function(){D||n(Ie,["oneclick","onetap","voneclick"],q,{x:X[0],y:X[1]})},ue.multiClickDebounceTime()),L=q.timeStamp)),Ie==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!i(q)&&(ue.$(r).unselect(["tapunselect"]),de.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=de=ue.collection()),pe==Ie&&!t.dragData.didDrag&&!t.hoverData.selecting&&pe!=null&&pe._private.selectable&&(t.hoverData.dragging||(ue.selectionType()==="additive"||Ne?pe.selected()?pe.unselect(["tapunselect"]):pe.select(["tapselect"]):Ne||(ue.$(r).unmerge(pe).unselect(["tapunselect"]),pe.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var qe=ue.collection(t.getAllInBox(ae[0],ae[1],ae[2],ae[3]));t.redrawHint("select",!0),qe.length>0&&t.redrawHint("eles",!0),ue.emit({type:"boxend",originalEvent:q,position:{x:X[0],y:X[1]}});var Fe=s(function(We){return We.selectable()&&!We.selected()},"eleWouldBeSelected");ue.selectionType()==="additive"||Ne||ue.$(r).unmerge(qe).unselect(),qe.emit("box").stdFilter(Fe).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!ae[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var we=Ie&&Ie.grabbed();v(de),we&&(Ie.emit("freeon"),de.emit("free"),t.dragData.didDrag&&(Ie.emit("dragfreeon"),de.emit("dragfree")))}}ae[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}}},"mouseupHandler"),!1);var P=s(function(q){if(!t.scrollingPage){var se=t.cy,ue=se.zoom(),X=se.pan(),ae=t.projectIntoViewport(q.clientX,q.clientY),pe=[ae[0]*ue+X.x,ae[1]*ue+X.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||E()){q.preventDefault();return}if(se.panningEnabled()&&se.userPanningEnabled()&&se.zoomingEnabled()&&se.userZoomingEnabled()){q.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var de;q.deltaY!=null?de=q.deltaY/-250:q.wheelDeltaY!=null?de=q.wheelDeltaY/1e3:de=q.wheelDelta/1e3,de=de*t.wheelSensitivity;var Ie=q.deltaMode===1;Ie&&(de*=33);var Ne=se.zoom()*Math.pow(10,de);q.type==="gesturechange"&&(Ne=t.gestureStartZoom*q.scale),se.zoom({level:Ne,renderedPosition:{x:pe[0],y:pe[1]}}),se.emit(q.type==="gesturechange"?"pinchzoom":"scrollzoom")}}},"wheelHandler");t.registerBinding(t.container,"wheel",P,!0),t.registerBinding(e,"scroll",s(function(q){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},"scrollHandler"),!0),t.registerBinding(t.container,"gesturestart",s(function(q){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||q.preventDefault()},"gestureStartHandler"),!0),t.registerBinding(t.container,"gesturechange",function(he){t.hasTouchStarted||P(he)},!0),t.registerBinding(t.container,"mouseout",s(function(q){var se=t.projectIntoViewport(q.clientX,q.clientY);t.cy.emit({originalEvent:q,type:"mouseout",position:{x:se[0],y:se[1]}})},"mouseOutHandler"),!1),t.registerBinding(t.container,"mouseover",s(function(q){var se=t.projectIntoViewport(q.clientX,q.clientY);t.cy.emit({originalEvent:q,type:"mouseover",position:{x:se[0],y:se[1]}})},"mouseOverHandler"),!1);var M,F,I,O,z,N,U,$,W,ee,te,ce,Z,fe=s(function(q,se,ue,X){return Math.sqrt((ue-q)*(ue-q)+(X-se)*(X-se))},"distance"),ne=s(function(q,se,ue,X){return(ue-q)*(ue-q)+(X-se)*(X-se)},"distanceSq"),H;t.registerBinding(t.container,"touchstart",H=s(function(q){if(t.hasTouchStarted=!0,!!S(q)){b(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var se=t.cy,ue=t.touchData.now,X=t.touchData.earlier;if(q.touches[0]){var ae=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);ue[0]=ae[0],ue[1]=ae[1]}if(q.touches[1]){var ae=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);ue[2]=ae[0],ue[3]=ae[1]}if(q.touches[2]){var ae=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);ue[4]=ae[0],ue[5]=ae[1]}if(q.touches[1]){t.touchData.singleTouchMoved=!0,v(t.dragData.touchDragEles);var pe=t.findContainerClientCoords();W=pe[0],ee=pe[1],te=pe[2],ce=pe[3],M=q.touches[0].clientX-W,F=q.touches[0].clientY-ee,I=q.touches[1].clientX-W,O=q.touches[1].clientY-ee,Z=0<=M&&M<=te&&0<=I&&I<=te&&0<=F&&F<=ce&&0<=O&&O<=ce;var de=se.pan(),Ie=se.zoom();z=fe(M,F,I,O),N=ne(M,F,I,O),U=[(M+I)/2,(F+O)/2],$=[(U[0]-de.x)/Ie,(U[1]-de.y)/Ie];var Ne=200,Be=Ne*Ne;if(N<Be&&!q.touches[2]){var ze=t.findNearestElement(ue[0],ue[1],!0,!0),qe=t.findNearestElement(ue[2],ue[3],!0,!0);ze&&ze.isNode()?(ze.activate().emit({originalEvent:q,type:"cxttapstart",position:{x:ue[0],y:ue[1]}}),t.touchData.start=ze):qe&&qe.isNode()?(qe.activate().emit({originalEvent:q,type:"cxttapstart",position:{x:ue[0],y:ue[1]}}),t.touchData.start=qe):se.emit({originalEvent:q,type:"cxttapstart",position:{x:ue[0],y:ue[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return}}if(q.touches[2])se.boxSelectionEnabled()&&q.preventDefault();else if(!q.touches[1]){if(q.touches[0]){var Fe=t.findNearestElements(ue[0],ue[1],!0,!0),we=Fe[0];if(we!=null&&(we.activate(),t.touchData.start=we,t.touchData.starts=Fe,t.nodeIsGrabbable(we))){var Je=t.dragData.touchDragEles=se.collection(),We=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),we.selected()?(We=se.$(function(ut){return ut.selected()&&t.nodeIsGrabbable(ut)}),g(We,{addToList:Je})):y(we,{addToList:Je}),f(we);var or=s(function(Rt){return{originalEvent:q,type:Rt,position:{x:ue[0],y:ue[1]}}},"makeEvent");we.emit(or("grabon")),We?We.forEach(function(ut){ut.emit(or("grab"))}):we.emit(or("grab"))}n(we,["touchstart","tapstart","vmousedown"],q,{x:ue[0],y:ue[1]}),we==null&&(t.data.bgActivePosistion={x:ae[0],y:ae[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&n(t.touchData.start,["taphold"],q,{x:ue[0],y:ue[1]})},t.tapholdDuration)}}if(q.touches.length>=1){for(var Cr=t.touchData.startPosition=[null,null,null,null,null,null],Ut=0;Ut<ue.length;Ut++)Cr[Ut]=X[Ut]=ue[Ut];var ar=q.touches[0];t.touchData.startGPosition=[ar.clientX,ar.clientY]}}},"touchstartHandler"),!1);var Q;t.registerBinding(e,"touchmove",Q=s(function(q){var se=t.touchData.capture;if(!(!se&&!S(q))){var ue=t.selection,X=t.cy,ae=t.touchData.now,pe=t.touchData.earlier,de=X.zoom();if(q.touches[0]){var Ie=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);ae[0]=Ie[0],ae[1]=Ie[1]}if(q.touches[1]){var Ie=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);ae[2]=Ie[0],ae[3]=Ie[1]}if(q.touches[2]){var Ie=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);ae[4]=Ie[0],ae[5]=Ie[1]}var Ne=t.touchData.startGPosition,Be;if(se&&q.touches[0]&&Ne){for(var ze=[],qe=0;qe<ae.length;qe++)ze[qe]=ae[qe]-pe[qe];var Fe=q.touches[0].clientX-Ne[0],we=Fe*Fe,Je=q.touches[0].clientY-Ne[1],We=Je*Je,or=we+We;Be=or>=t.touchTapThreshold2}if(se&&t.touchData.cxt){q.preventDefault();var Cr=q.touches[0].clientX-W,Ut=q.touches[0].clientY-ee,ar=q.touches[1].clientX-W,ut=q.touches[1].clientY-ee,Rt=ne(Cr,Ut,ar,ut),Qe=Rt/N,Dt=150,qt=Dt*Dt,yt=1.5,Et=yt*yt;if(Qe>=Et||Rt>=qt){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var pt={originalEvent:q,type:"cxttapend",position:{x:ae[0],y:ae[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(pt),t.touchData.start=null):X.emit(pt)}}if(se&&t.touchData.cxt){var pt={originalEvent:q,type:"cxtdrag",position:{x:ae[0],y:ae[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(pt):X.emit(pt),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var Wt=t.findNearestElement(ae[0],ae[1],!0,!0);(!t.touchData.cxtOver||Wt!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:q,type:"cxtdragout",position:{x:ae[0],y:ae[1]}}),t.touchData.cxtOver=Wt,Wt&&Wt.emit({originalEvent:q,type:"cxtdragover",position:{x:ae[0],y:ae[1]}}))}else if(se&&q.touches[2]&&X.boxSelectionEnabled())q.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||X.emit({originalEvent:q,type:"boxstart",position:{x:ae[0],y:ae[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,ue[4]=1,!ue||ue.length===0||ue[0]===void 0?(ue[0]=(ae[0]+ae[2]+ae[4])/3,ue[1]=(ae[1]+ae[3]+ae[5])/3,ue[2]=(ae[0]+ae[2]+ae[4])/3+1,ue[3]=(ae[1]+ae[3]+ae[5])/3+1):(ue[2]=(ae[0]+ae[2]+ae[4])/3,ue[3]=(ae[1]+ae[3]+ae[5])/3),t.redrawHint("select",!0),t.redraw();else if(se&&q.touches[1]&&!t.touchData.didSelect&&X.zoomingEnabled()&&X.panningEnabled()&&X.userZoomingEnabled()&&X.userPanningEnabled()){q.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var ot=t.dragData.touchDragEles;if(ot){t.redrawHint("drag",!0);for(var fr=0;fr<ot.length;fr++){var vt=ot[fr]._private;vt.grabbed=!1,vt.rscratch.inDragLayer=!1}}var Bt=t.touchData.start,Cr=q.touches[0].clientX-W,Ut=q.touches[0].clientY-ee,ar=q.touches[1].clientX-W,ut=q.touches[1].clientY-ee,Sr=fe(Cr,Ut,ar,ut),zi=Sr/z;if(Z){var rr=Cr-M,Vn=Ut-F,Tn=ar-I,Ki=ut-O,ci=(rr+Tn)/2,Pa=(Vn+Ki)/2,En=X.zoom(),ti=En*zi,co=X.pan(),uo=$[0]*En+co.x,Rl=$[1]*En+co.y,ts={x:-ti/En*(uo-co.x-ci)+uo,y:-ti/En*(Rl-co.y-Pa)+Rl};if(Bt&&Bt.active()){var ot=t.dragData.touchDragEles;v(ot),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Bt.unactivate().emit("freeon"),ot.emit("free"),t.dragData.didDrag&&(Bt.emit("dragfreeon"),ot.emit("dragfree"))}X.viewport({zoom:ti,pan:ts,cancelOnFailedZoom:!0}),X.emit("pinchzoom"),z=Sr,M=Cr,F=Ut,I=ar,O=ut,t.pinching=!0}if(q.touches[0]){var Ie=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);ae[0]=Ie[0],ae[1]=Ie[1]}if(q.touches[1]){var Ie=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);ae[2]=Ie[0],ae[3]=Ie[1]}if(q.touches[2]){var Ie=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);ae[4]=Ie[0],ae[5]=Ie[1]}}else if(q.touches[0]&&!t.touchData.didSelect){var at=t.touchData.start,xt=t.touchData.last,Wt;if(!t.hoverData.draggingEles&&!t.swipePanning&&(Wt=t.findNearestElement(ae[0],ae[1],!0,!0)),se&&at!=null&&q.preventDefault(),se&&at!=null&&t.nodeIsDraggable(at))if(Be){var ot=t.dragData.touchDragEles,Ft=!t.dragData.didDrag;Ft&&g(ot,{inDragLayer:!0}),t.dragData.didDrag=!0;var Ke={x:0,y:0};if(rt(ze[0])&&rt(ze[1])&&(Ke.x+=ze[0],Ke.y+=ze[1],Ft)){t.redrawHint("eles",!0);var Zt=t.touchData.dragDelta;Zt&&rt(Zt[0])&&rt(Zt[1])&&(Ke.x+=Zt[0],Ke.y+=Zt[1])}t.hoverData.draggingEles=!0,ot.silentShift(Ke).emit("position drag"),t.redrawHint("drag",!0),t.touchData.startPosition[0]==pe[0]&&t.touchData.startPosition[1]==pe[1]&&t.redrawHint("eles",!0),t.redraw()}else{var Zt=t.touchData.dragDelta=t.touchData.dragDelta||[];Zt.length===0?(Zt.push(ze[0]),Zt.push(ze[1])):(Zt[0]+=ze[0],Zt[1]+=ze[1])}if(n(at||Wt,["touchmove","tapdrag","vmousemove"],q,{x:ae[0],y:ae[1]}),(!at||!at.grabbed())&&Wt!=xt&&(xt&&xt.emit({originalEvent:q,type:"tapdragout",position:{x:ae[0],y:ae[1]}}),Wt&&Wt.emit({originalEvent:q,type:"tapdragover",position:{x:ae[0],y:ae[1]}})),t.touchData.last=Wt,se)for(var fr=0;fr<ae.length;fr++)ae[fr]&&t.touchData.startPosition[fr]&&Be&&(t.touchData.singleTouchMoved=!0);if(se&&(at==null||at.pannable())&&X.panningEnabled()&&X.userPanningEnabled()){var me=a(at,t.touchData.starts);me&&(q.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=Fg(t.touchData.startPosition)),t.swipePanning?(X.panBy({x:ze[0]*de,y:ze[1]*de}),X.emit("dragpan")):Be&&(t.swipePanning=!0,X.panBy({x:Fe*de,y:Je*de}),X.emit("dragpan"),at&&(at.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));var Ie=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);ae[0]=Ie[0],ae[1]=Ie[1]}}for(var qe=0;qe<ae.length;qe++)pe[qe]=ae[qe];se&&q.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},"touchmoveHandler"),!1);var K;t.registerBinding(e,"touchcancel",K=s(function(q){var se=t.touchData.start;t.touchData.capture=!1,se&&se.unactivate()},"touchcancelHandler"));var re,ie,ye,j;if(t.registerBinding(e,"touchend",re=s(function(q){var se=t.touchData.start,ue=t.touchData.capture;if(ue)q.touches.length===0&&(t.touchData.capture=!1),q.preventDefault();else return;var X=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var ae=t.cy,pe=ae.zoom(),de=t.touchData.now,Ie=t.touchData.earlier;if(q.touches[0]){var Ne=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);de[0]=Ne[0],de[1]=Ne[1]}if(q.touches[1]){var Ne=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);de[2]=Ne[0],de[3]=Ne[1]}if(q.touches[2]){var Ne=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);de[4]=Ne[0],de[5]=Ne[1]}se&&se.unactivate();var Be;if(t.touchData.cxt){if(Be={originalEvent:q,type:"cxttapend",position:{x:de[0],y:de[1]}},se?se.emit(Be):ae.emit(Be),!t.touchData.cxtDragged){var ze={originalEvent:q,type:"cxttap",position:{x:de[0],y:de[1]}};se?se.emit(ze):ae.emit(ze)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!q.touches[2]&&ae.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var qe=ae.collection(t.getAllInBox(X[0],X[1],X[2],X[3]));X[0]=void 0,X[1]=void 0,X[2]=void 0,X[3]=void 0,X[4]=0,t.redrawHint("select",!0),ae.emit({type:"boxend",originalEvent:q,position:{x:de[0],y:de[1]}});var Fe=s(function(qt){return qt.selectable()&&!qt.selected()},"eleWouldBeSelected");qe.emit("box").stdFilter(Fe).select().emit("boxselect"),qe.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(se?.unactivate(),q.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!q.touches[1]){if(!q.touches[0]){if(!q.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var we=t.dragData.touchDragEles;if(se!=null){var Je=se._private.grabbed;v(we),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Je&&(se.emit("freeon"),we.emit("free"),t.dragData.didDrag&&(se.emit("dragfreeon"),we.emit("dragfree"))),n(se,["touchend","tapend","vmouseup","tapdragout"],q,{x:de[0],y:de[1]}),se.unactivate(),t.touchData.start=null}else{var We=t.findNearestElement(de[0],de[1],!0,!0);n(We,["touchend","tapend","vmouseup","tapdragout"],q,{x:de[0],y:de[1]})}var or=t.touchData.startPosition[0]-de[0],Cr=or*or,Ut=t.touchData.startPosition[1]-de[1],ar=Ut*Ut,ut=Cr+ar,Rt=ut*pe*pe;t.touchData.singleTouchMoved||(se||ae.$(":selected").unselect(["tapunselect"]),n(se,["tap","vclick"],q,{x:de[0],y:de[1]}),ie=!1,q.timeStamp-j<=ae.multiClickDebounceTime()?(ye&&clearTimeout(ye),ie=!0,j=null,n(se,["dbltap","vdblclick"],q,{x:de[0],y:de[1]})):(ye=setTimeout(function(){ie||n(se,["onetap","voneclick"],q,{x:de[0],y:de[1]})},ae.multiClickDebounceTime()),j=q.timeStamp)),se!=null&&!t.dragData.didDrag&&se._private.selectable&&Rt<t.touchTapThreshold2&&!t.pinching&&(ae.selectionType()==="single"?(ae.$(r).unmerge(se).unselect(["tapunselect"]),se.select(["tapselect"])):se.selected()?se.unselect(["tapunselect"]):se.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}}}for(var Qe=0;Qe<de.length;Qe++)Ie[Qe]=de[Qe];t.dragData.didDrag=!1,q.touches.length===0&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),q.touches.length<2&&(q.touches.length===1&&(t.touchData.startGPosition=[q.touches[0].clientX,q.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())},"touchendHandler"),!1),typeof TouchEvent>"u"){var De=[],oe=s(function(q){return{clientX:q.clientX,clientY:q.clientY,force:1,identifier:q.pointerId,pageX:q.pageX,pageY:q.pageY,radiusX:q.width/2,radiusY:q.height/2,screenX:q.screenX,screenY:q.screenY,target:q.target}},"makeTouch"),Re=s(function(q){return{event:q,touch:oe(q)}},"makePointer"),Pe=s(function(q){De.push(Re(q))},"addPointer"),Se=s(function(q){for(var se=0;se<De.length;se++){var ue=De[se];if(ue.event.pointerId===q.pointerId){De.splice(se,1);return}}},"removePointer"),Ue=s(function(q){var se=De.filter(function(ue){return ue.event.pointerId===q.pointerId})[0];se.event=q,se.touch=oe(q)},"updatePointer"),Oe=s(function(q){q.touches=De.map(function(se){return se.touch})},"addTouchesToEvent"),_e=s(function(q){return q.pointerType==="mouse"||q.pointerType===4},"pointerIsMouse");t.registerBinding(t.container,"pointerdown",function(he){_e(he)||(he.preventDefault(),Pe(he),Oe(he),H(he))}),t.registerBinding(t.container,"pointerup",function(he){_e(he)||(Se(he),Oe(he),re(he))}),t.registerBinding(t.container,"pointercancel",function(he){_e(he)||(Se(he),Oe(he),K(he))}),t.registerBinding(t.container,"pointermove",function(he){_e(he)||(he.preventDefault(),Ue(he),Oe(he),Q(he))})}};Xu={};Xu.generatePolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:s(function(n,i,a,o,l,u){this.renderer.nodeShapeImpl("polygon",n,i,a,o,l,this.points)},"draw"),intersectLine:s(function(n,i,a,o,l,u,h,f){return _x(l,u,this.points,n,i,a/2,o/2,h)},"intersectLine"),checkPoint:s(function(n,i,a,o,l,u,h,f){return Wu(n,i,this.points,u,h,o,l,[0,-1],a)},"checkPoint")}};Xu.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:s(function(e,r,n,i,a,o){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a)},"draw"),intersectLine:s(function(e,r,n,i,a,o,l,u){return iqe(a,o,e,r,n/2+l,i/2+l)},"intersectLine"),checkPoint:s(function(e,r,n,i,a,o,l,u){return D0(e,r,i,a,o,l,n)},"checkPoint")}};Xu.generateRoundPolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,getOrCreateCorners:s(function(n,i,a,o,l,u,h){if(u[h]!==void 0&&u[h+"-cx"]===n&&u[h+"-cy"]===i)return u[h];u[h]=new Array(e.length/2),u[h+"-cx"]=n,u[h+"-cy"]=i;var f=a/2,d=o/2;l=l==="auto"?g0e(a,o):l;for(var p=new Array(e.length/2),m=0;m<e.length/2;m++)p[m]={x:n+f*e[m*2],y:i+d*e[m*2+1]};var g,y,v,x,b=p.length;for(y=p[b-1],g=0;g<b;g++)v=p[g%b],x=p[(g+1)%b],u[h][g]=EP(y,v,x,l),y=v,v=x;return u[h]},"getOrCreateCorners"),draw:s(function(n,i,a,o,l,u,h){this.renderer.nodeShapeImpl("round-polygon",n,i,a,o,l,this.points,this.getOrCreateCorners(i,a,o,l,u,h,"drawCorners"))},"draw"),intersectLine:s(function(n,i,a,o,l,u,h,f,d){return aqe(l,u,this.points,n,i,a,o,h,this.getOrCreateCorners(n,i,a,o,f,d,"corners"))},"intersectLine"),checkPoint:s(function(n,i,a,o,l,u,h,f,d){return nqe(n,i,this.points,u,h,o,l,this.getOrCreateCorners(u,h,o,l,f,d,"corners"))},"checkPoint")}};Xu.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:es(4,0),draw:s(function(e,r,n,i,a,o){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a,this.points,o)},"draw"),intersectLine:s(function(e,r,n,i,a,o,l,u){return p0e(a,o,e,r,n,i,l,u)},"intersectLine"),checkPoint:s(function(e,r,n,i,a,o,l,u){var h=i/2,f=a/2;u=u==="auto"?N0(i,a):u,u=Math.min(h,f,u);var d=u*2;return!!(Wu(e,r,this.points,o,l,i,a-d,[0,-1],n)||Wu(e,r,this.points,o,l,i-d,a,[0,-1],n)||D0(e,r,d,d,o-h+u,l-f+u,n)||D0(e,r,d,d,o+h-u,l-f+u,n)||D0(e,r,d,d,o+h-u,l+f-u,n)||D0(e,r,d,d,o-h+u,l+f-u,n))},"checkPoint")}};Xu.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:fP(),points:es(4,0),draw:s(function(e,r,n,i,a,o){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a,null,o)},"draw"),generateCutTrianglePts:s(function(e,r,n,i,a){var o=a==="auto"?this.cornerLength:a,l=r/2,u=e/2,h=n-u,f=n+u,d=i-l,p=i+l;return{topLeft:[h,d+o,h+o,d,h+o,d+o],topRight:[f-o,d,f,d+o,f-o,d+o],bottomRight:[f,p-o,f-o,p,f-o,p-o],bottomLeft:[h+o,p,h,p-o,h+o,p-o]}},"generateCutTrianglePts"),intersectLine:s(function(e,r,n,i,a,o,l,u){var h=this.generateCutTrianglePts(n+2*l,i+2*l,e,r,u),f=[].concat.apply([],[h.topLeft.splice(0,4),h.topRight.splice(0,4),h.bottomRight.splice(0,4),h.bottomLeft.splice(0,4)]);return _x(a,o,f,e,r)},"intersectLine"),checkPoint:s(function(e,r,n,i,a,o,l,u){var h=u==="auto"?this.cornerLength:u;if(Wu(e,r,this.points,o,l,i,a-2*h,[0,-1],n)||Wu(e,r,this.points,o,l,i-2*h,a,[0,-1],n))return!0;var f=this.generateCutTrianglePts(i,a,o,l);return Ms(e,r,f.topLeft)||Ms(e,r,f.topRight)||Ms(e,r,f.bottomRight)||Ms(e,r,f.bottomLeft)},"checkPoint")}};Xu.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:es(4,0),draw:s(function(e,r,n,i,a,o){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a)},"draw"),intersectLine:s(function(e,r,n,i,a,o,l,u){var h=.15,f=.5,d=.85,p=this.generateBarrelBezierPts(n+2*l,i+2*l,e,r),m=s(function(v){var x=$g({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},h),b=$g({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},f),k=$g({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},d);return[v[0],v[1],x.x,x.y,b.x,b.y,k.x,k.y,v[4],v[5]]},"approximateBarrelCurvePts"),g=[].concat(m(p.topLeft),m(p.topRight),m(p.bottomRight),m(p.bottomLeft));return _x(a,o,g,e,r)},"intersectLine"),generateBarrelBezierPts:s(function(e,r,n,i){var a=r/2,o=e/2,l=n-o,u=n+o,h=i-a,f=i+a,d=VO(e,r),p=d.heightOffset,m=d.widthOffset,g=d.ctrlPtOffsetPct*e,y={topLeft:[l,h+p,l+g,h,l+m,h],topRight:[u-m,h,u-g,h,u,h+p],bottomRight:[u,f-p,u-g,f,u-m,f],bottomLeft:[l+m,f,l+g,f,l,f-p]};return y.topLeft.isTop=!0,y.topRight.isTop=!0,y.bottomLeft.isBottom=!0,y.bottomRight.isBottom=!0,y},"generateBarrelBezierPts"),checkPoint:s(function(e,r,n,i,a,o,l,u){var h=VO(i,a),f=h.heightOffset,d=h.widthOffset;if(Wu(e,r,this.points,o,l,i,a-2*f,[0,-1],n)||Wu(e,r,this.points,o,l,i-2*d,a,[0,-1],n))return!0;for(var p=this.generateBarrelBezierPts(i,a,o,l),m=s(function(E,S,R){var D=R[4],L=R[2],P=R[0],M=R[5],F=R[1],I=Math.min(D,P),O=Math.max(D,P),z=Math.min(M,F),N=Math.max(M,F);if(I<=E&&E<=O&&z<=S&&S<=N){var U=sqe(D,L,P),$=JUe(U[0],U[1],U[2],E),W=$.filter(function(ee){return 0<=ee&&ee<=1});if(W.length>0)return W[0]}return null},"getCurveT"),g=Object.keys(p),y=0;y<g.length;y++){var v=g[y],x=p[v],b=m(e,r,x);if(b!=null){var k=x[5],A=x[3],w=x[1],T=ji(k,A,w,b);if(x.isTop&&T<=r||x.isBottom&&r<=T)return!0}}return!1},"checkPoint")}};Xu.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:es(4,0),draw:s(function(e,r,n,i,a,o){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a,this.points,o)},"draw"),intersectLine:s(function(e,r,n,i,a,o,l,u){var h=e-(n/2+l),f=r-(i/2+l),d=f,p=e+(n/2+l),m=df(a,o,e,r,h,f,p,d,!1);return m.length>0?m:p0e(a,o,e,r,n,i,l,u)},"intersectLine"),checkPoint:s(function(e,r,n,i,a,o,l,u){u=u==="auto"?N0(i,a):u;var h=2*u;if(Wu(e,r,this.points,o,l,i,a-h,[0,-1],n)||Wu(e,r,this.points,o,l,i-h,a,[0,-1],n))return!0;var f=i/2+2*n,d=a/2+2*n,p=[o-f,l-d,o-f,l,o+f,l,o+f,l-d];return!!(Ms(e,r,p)||D0(e,r,h,h,o+i/2-u,l+a/2-u,n)||D0(e,r,h,h,o-i/2+u,l+a/2-u,n))},"checkPoint")}};Xu.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=GO(5,0),a=GO(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var l=0;l<a.length/2;l++)a[l*2]*=o,a[l*2+1]*=o;for(var l=0;l<20/4;l++)n[l*4]=i[l*2],n[l*4+1]=i[l*2+1],n[l*4+2]=a[l*2],n[l*4+3]=a[l*2+1]}n=m0e(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);{var u=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",u),this.generateRoundPolygon("round-tag",u)}t.makePolygon=function(h){var f=h.join("$"),d="polygon-"+f,p;return(p=this[d])?p:e.generatePolygon(d,h)}};$x={};$x.timeToRender=function(){return this.redrawTotalTime/this.redrawCount};$x.redraw=function(t){t=t||c0e();var e=this;e.averageRedrawTime===void 0&&(e.averageRedrawTime=0),e.lastRedrawTime===void 0&&(e.lastRedrawTime=0),e.lastDrawTime===void 0&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t};$x.beforeRender=function(t,e){if(!this.destroyed){e==null&&Jn("Priority is not optional for beforeRender");var r=this.beforeRenderCallbacks;r.push({fn:t,priority:e}),r.sort(function(n,i){return i.priority-n.priority})}};Ode=s(function(e,r,n){for(var i=e.beforeRenderCallbacks,a=0;a<i.length;a++)i[a].fn(r,n)},"beforeRenderCallbacks");$x.startRenderLoop=function(){var t=this,e=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var r=s(function n(i){if(!t.destroyed){if(!e.batching())if(t.requestedFrame&&!t.skipFrame){Ode(t,!0,i);var a=qu();t.render(t.renderOptions);var o=t.lastDrawTime=qu();t.averageRedrawTime===void 0&&(t.averageRedrawTime=o-a),t.redrawCount===void 0&&(t.redrawCount=0),t.redrawCount++,t.redrawTotalTime===void 0&&(t.redrawTotalTime=0);var l=o-a;t.redrawTotalTime+=l,t.lastRedrawTime=l,t.averageRedrawTime=t.averageRedrawTime/2+l/2,t.requestedFrame=!1}else Ode(t,!1,i);t.skipFrame=!1,YT(n)}},"renderFn");YT(r)}};GXe=s(function(e){this.init(e)},"BaseRenderer"),ppe=GXe,r1=ppe.prototype;r1.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"];r1.init=function(t){var e=this;e.options=t,e.cy=t.cy;var r=e.container=t.cy.container(),n=e.cy.window();if(n){var i=n.document,a=i.head,o="__________cytoscape_stylesheet",l="__________cytoscape_container",u=i.getElementById(o)!=null;if(r.className.indexOf(l)<0&&(r.className=(r.className||"")+" "+l),!u){var h=i.createElement("style");h.id=o,h.textContent="."+l+" { position: relative; }",a.insertBefore(h,a.children[0])}var f=n.getComputedStyle(r),d=f.getPropertyValue("position");d==="static"&&Kr("A Cytoscape container has style position:static and so can not use UI extensions properly")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=rt(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()};r1.notify=function(t,e){var r=this,n=r.cy;if(!this.destroyed){if(t==="init"){r.load();return}if(t==="destroy"){r.destroy();return}(t==="add"||t==="remove"||t==="move"&&n.hasCompoundNodes()||t==="load"||t==="zorder"||t==="mount")&&r.invalidateCachedZSortedEles(),t==="viewport"&&r.redrawHint("select",!0),(t==="load"||t==="resize"||t==="mount")&&(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}};r1.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],n=r,i=n.target;(i.off||i.removeEventListener).apply(i,n.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch{}};r1.isHeadless=function(){return!1};[TP,fpe,dpe,t1,Xu,$x].forEach(function(t){Pt(r1,t)});FO=1e3/60,mpe={setupDequeueing:s(function(e){return s(function(){var n=this,i=this.renderer;if(!n.dequeueingSetup){n.dequeueingSetup=!0;var a=a7(function(){i.redrawHint("eles",!0),i.redrawHint("drag",!0),i.redraw()},e.deqRedrawThreshold),o=s(function(h,f){var d=qu(),p=i.averageRedrawTime,m=i.lastRedrawTime,g=[],y=i.cy.extent(),v=i.getPixelRatio();for(h||i.flushRenderedStyleQueue();;){var x=qu(),b=x-d,k=x-f;if(m<FO){var A=FO-(h?p:0);if(k>=e.deqFastCost*A)break}else if(h){if(b>=e.deqCost*m||b>=e.deqAvgCost*p)break}else if(k>=e.deqNoDrawCost*FO)break;var w=e.deq(n,v,y);if(w.length>0)for(var T=0;T<w.length;T++)g.push(w[T]);else break}g.length>0&&(e.onDeqd(n,g),!h&&e.shouldRedraw(n,g,v,y)&&a())},"dequeue"),l=e.priority||lP;i.beforeRender(o,l(n))}},"setupDequeueingImpl")},"setupDequeueing")},VXe=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:XT;nP(this,t),this.idsByKey=new Ic,this.keyForId=new Ic,this.cachesByLvl=new Ic,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return s(t,"ElementTextureCacheLookup"),iP(t,[{key:"getIdsFor",value:s(function(r){r==null&&Jn("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(r);return i||(i=new Xg,n.set(r,i)),i},"getIdsFor")},{key:"addIdForKey",value:s(function(r,n){r!=null&&this.getIdsFor(r).add(n)},"addIdForKey")},{key:"deleteIdForKey",value:s(function(r,n){r!=null&&this.getIdsFor(r).delete(n)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:s(function(r){return r==null?0:this.getIdsFor(r).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:s(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)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:s(function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:s(function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);return i!==a},"keyHasChangedFor")},{key:"isInvalid",value:s(function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)},"isInvalid")},{key:"getCachesAt",value:s(function(r){var n=this.cachesByLvl,i=this.lvls,a=n.get(r);return a||(a=new Ic,n.set(r,a),i.push(r)),a},"getCachesAt")},{key:"getCache",value:s(function(r,n){return this.getCachesAt(n).get(r)},"getCache")},{key:"get",value:s(function(r,n){var i=this.getKey(r),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(r),a},"get")},{key:"getForCachedKey",value:s(function(r,n){var i=this.keyForId.get(r.id()),a=this.getCache(i,n);return a},"getForCachedKey")},{key:"hasCache",value:s(function(r,n){return this.getCachesAt(n).has(r)},"hasCache")},{key:"has",value:s(function(r,n){var i=this.getKey(r);return this.hasCache(i,n)},"has")},{key:"setCache",value:s(function(r,n,i){i.key=r,this.getCachesAt(n).set(r,i)},"setCache")},{key:"set",value:s(function(r,n,i){var a=this.getKey(r);this.setCache(a,n,i),this.updateKeyMappingFor(r)},"set")},{key:"deleteCache",value:s(function(r,n){this.getCachesAt(n).delete(r)},"deleteCache")},{key:"delete",value:s(function(r,n){var i=this.getKey(r);this.deleteCache(i,n)},"_delete")},{key:"invalidateKey",value:s(function(r){var n=this;this.lvls.forEach(function(i){return n.deleteCache(r,i)})},"invalidateKey")},{key:"invalidate",value:s(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},"invalidate")}]),t}(),Pde=25,PT=50,WT=-4,JO=3,UXe=7.99,qXe=8,WXe=1024,HXe=1024,YXe=1024,XXe=.2,jXe=.8,KXe=10,QXe=.15,ZXe=.1,JXe=.9,eje=.9,tje=100,rje=1,zg={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},nje=ya({getKey:null,doesEleInvalidateKey:XT,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:s0e,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),xx=s(function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var i=nje(r);Pt(n,i),n.lookup=new VXe(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},"ElementTextureCache"),Bi=xx.prototype;Bi.reasons=zg;Bi.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};Bi.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n};Bi.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new Px(function(r,n){return n.reqs-r.reqs});return e};Bi.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};Bi.getElement=function(t,e,r,n,i){var a=this,o=this.renderer,l=o.cy.zoom(),u=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(uP(l*r))),n<WT)n=WT;else if(l>=UXe||n>JO)return null;var h=Math.pow(2,n),f=e.h*h,d=e.w*h,p=o.eleTextBiggerThanMin(t,h);if(!this.isVisible(t,p))return null;var m=u.get(t,n);if(m&&m.invalidated&&(m.invalidated=!1,m.texture.invalidatedWidth-=m.width),m)return m;var g;if(f<=Pde?g=Pde:f<=PT?g=PT:g=Math.ceil(f/PT)*PT,f>YXe||d>HXe)return null;var y=a.getTextureQueue(g),v=y[y.length-2],x=s(function(){return a.recycleTexture(g,d)||a.addTexture(g,d)},"addNewTxr");v||(v=y[y.length-1]),v||(v=x()),v.width-v.usedWidth<d&&(v=x());for(var b=s(function(I){return I&&I.scaledLabelShown===p},"scalableFrom"),k=i&&i===zg.dequeue,A=i&&i===zg.highQuality,w=i&&i===zg.downscale,T,C=n+1;C<=JO;C++){var E=u.get(t,C);if(E){T=E;break}}var S=T&&T.level===n+1?T:null,R=s(function(){v.context.drawImage(S.texture.canvas,S.x,0,S.width,S.height,v.usedWidth,0,d,f)},"downscale");if(v.context.setTransform(1,0,0,1,0,0),v.context.clearRect(v.usedWidth,0,d,g),b(S))R();else if(b(T))if(A){for(var D=T.level;D>n;D--)S=a.getElement(t,e,r,D,zg.downscale);R()}else return a.queueElement(t,T.level-1),T;else{var L;if(!k&&!A&&!w)for(var P=n-1;P>=WT;P--){var M=u.get(t,P);if(M){L=M;break}}if(b(L))return a.queueElement(t,n),L;v.context.translate(v.usedWidth,0),v.context.scale(h,h),this.drawElement(v.context,t,e,p,!1),v.context.scale(1/h,1/h),v.context.translate(-v.usedWidth,0)}return m={x:v.usedWidth,texture:v,level:n,scale:h,width:d,height:f,scaledLabelShown:p},v.usedWidth+=Math.ceil(d+qXe),v.eleCaches.push(m),u.set(t,n,m),a.checkTextureFullness(v),m};Bi.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])};Bi.invalidateElement=function(t){var e=this,r=e.lookup,n=[],i=r.isInvalid(t);if(i){for(var a=WT;a<=JO;a++){var o=r.getForCachedKey(t,a);o&&n.push(o)}var l=r.invalidate(t);if(l)for(var u=0;u<n.length;u++){var h=n[u],f=h.texture;f.invalidatedWidth+=h.width,h.invalidated=!0,e.checkTextureUtility(f)}e.removeFromQueue(t)}};Bi.checkTextureUtility=function(t){t.invalidatedWidth>=XXe*t.width&&this.retireTexture(t)};Bi.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>jXe&&t.fullnessChecks>=KXe?yf(r,t):t.fullnessChecks++};Bi.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),i=this.lookup;yf(n,t),t.retired=!0;for(var a=t.eleCaches,o=0;o<a.length;o++){var l=a[o];i.deleteCache(l.key,l.level)}cP(a);var u=e.getRetiredTextureQueue(r);u.push(t)};Bi.addTexture=function(t,e){var r=this,n=r.getTextureQueue(t),i={};return n.push(i),i.eleCaches=[],i.height=t,i.width=Math.max(WXe,e),i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,i.canvas=r.renderer.makeOffscreenCanvas(i.width,i.height),i.context=i.canvas.getContext("2d"),i};Bi.recycleTexture=function(t,e){for(var r=this,n=r.getTextureQueue(t),i=r.getRetiredTextureQueue(t),a=0;a<i.length;a++){var o=i[a];if(o.width>=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,cP(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),yf(i,o),n.push(o),o}};Bi.queueElement=function(t,e){var r=this,n=r.getElementQueue(),i=r.getElementKeyToQueue(),a=this.getKey(t),o=i[a];if(o)o.level=Math.max(o.level,e),o.eles.merge(t),o.reqs++,n.updateItem(o);else{var l={eles:t.spawn().merge(t),level:e,reqs:1,key:a};n.push(l),i[a]=l}};Bi.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,o=0;o<rje&&r.size()>0;o++){var l=r.pop(),u=l.key,h=l.eles[0],f=a.hasCache(h,l.level);if(n[u]=null,f)continue;i.push(l);var d=e.getBoundingBox(h);e.getElement(h,d,t,l.level,zg.dequeue)}return i};Bi.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=oP,r.updateItem(a),r.pop(),n[i]=null):a.eles.unmerge(t))};Bi.onDequeue=function(t){this.onDequeues.push(t)};Bi.offDequeue=function(t){yf(this.onDequeues,t)};Bi.setupDequeueing=mpe.setupDequeueing({deqRedrawThreshold:tje,deqCost:QXe,deqAvgCost:ZXe,deqNoDrawCost:JXe,deqFastCost:eje,deq:s(function(e,r,n){return e.dequeue(r,n)},"deq"),onDeqd:s(function(e,r){for(var n=0;n<e.onDequeues.length;n++){var i=e.onDequeues[n];i(r)}},"onDeqd"),shouldRedraw:s(function(e,r,n,i){for(var a=0;a<r.length;a++)for(var o=r[a].eles,l=0;l<o.length;l++){var u=o[l].boundingBox();if(hP(u,i))return!0}return!1},"shouldRedraw"),priority:s(function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq},"priority")});ije=1,kx=-4,r7=2,aje=3.99,sje=50,oje=50,lje=.15,cje=.1,uje=.9,hje=.9,fje=1,Bde=250,dje=4e3*4e3,pje=!0,gpe=s(function(e){var r=this,n=r.renderer=e,i=n.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=qu()-2*Bde,r.skipping=!1,r.eleTxrDeqs=i.collection(),r.scheduleElementRefinement=a7(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},oje),n.beforeRender(function(o,l){l-r.lastInvalidationTime<=Bde?r.skipping=!0:r.skipping=!1},n.beforeRenderPriorities.lyrTxrSkip);var a=s(function(l,u){return u.reqs-l.reqs},"qSort");r.layersQueue=new Px(a),r.setupDequeueing()},"LayeredTextureCache"),va=gpe.prototype,Fde=0,mje=Math.pow(2,53)-1;va.makeLayer=function(t,e){var r=Math.pow(2,e),n=Math.ceil(t.w*r),i=Math.ceil(t.h*r),a=this.renderer.makeOffscreenCanvas(n,i),o={id:Fde=++Fde%mje,bb:t,level:e,width:n,height:i,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0},l=o.context,u=-o.bb.x1,h=-o.bb.y1;return l.scale(r,r),l.translate(u,h),o};va.getLayers=function(t,e,r){var n=this,i=n.renderer,a=i.cy,o=a.zoom(),l=n.firstGet;if(n.firstGet=!1,r==null){if(r=Math.ceil(uP(o*e)),r<kx)r=kx;else if(o>=aje||r>r7)return null}n.validateLayersElesOrdering(r,t);var u=n.layersByLevel,h=Math.pow(2,r),f=u[r]=u[r]||[],d,p=n.levelIsComplete(r,t),m,g=s(function(){var R=s(function(F){if(n.validateLayersElesOrdering(F,t),n.levelIsComplete(F,t))return m=u[F],!0},"canUseAsTmpLvl"),D=s(function(F){if(!m)for(var I=r+F;kx<=I&&I<=r7&&!R(I);I+=F);},"checkLvls");D(1),D(-1);for(var L=f.length-1;L>=0;L--){var P=f[L];P.invalid&&yf(f,P)}},"checkTempLevels");if(!p)g();else return f;var y=s(function(){if(!d){d=Is();for(var R=0;R<t.length;R++)f0e(d,t[R].boundingBox())}return d},"getBb"),v=s(function(R){R=R||{};var D=R.after;y();var L=d.w*h*(d.h*h);if(L>dje)return null;var P=n.makeLayer(d,r);if(D!=null){var M=f.indexOf(D)+1;f.splice(M,0,P)}else(R.insert===void 0||R.insert)&&f.unshift(P);return P},"makeLayer");if(n.skipping&&!l)return null;for(var x=null,b=t.length/ije,k=!l,A=0;A<t.length;A++){var w=t[A],T=w._private.rscratch,C=T.imgLayerCaches=T.imgLayerCaches||{},E=C[r];if(E){x=E;continue}if((!x||x.eles.length>=b||!d0e(x.bb,w.boundingBox()))&&(x=v({insert:!0,after:x}),!x))return null;m||k?n.queueLayer(x,w):n.drawEleInLayer(x,w,r,e),x.eles.push(w),C[r]=x}return m||(k?null:f)};va.getEleLevelForLayerLevel=function(t,e){return t};va.drawEleInLayer=function(t,e,r,n){var i=this,a=this.renderer,o=t.context,l=e.boundingBox();l.w===0||l.h===0||!e.visible()||(r=i.getEleLevelForLayerLevel(r,n),a.setImgSmoothing(o,!1),a.drawCachedElement(o,e,null,null,r,pje),a.setImgSmoothing(o,!0))};va.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var i=0,a=0;a<n.length;a++){var o=n[a];if(o.reqs>0||o.invalid)return!1;i+=o.eles.length}return i===e.length};va.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=-1,o=0;o<e.length;o++)if(i.eles[0]===e[o]){a=o;break}if(a<0){this.invalidateLayer(i);continue}for(var l=a,o=0;o<i.eles.length;o++)if(i.eles[o]!==e[l+o]){this.invalidateLayer(i);break}}};va.updateElementsInLayers=function(t,e){for(var r=this,n=Nx(t[0]),i=0;i<t.length;i++)for(var a=n?null:t[i],o=n?t[i]:t[i].ele,l=o._private.rscratch,u=l.imgLayerCaches=l.imgLayerCaches||{},h=kx;h<=r7;h++){var f=u[h];f&&(a&&r.getEleLevelForLayerLevel(f.level)!==a.level||e(f,o,a))}};va.haveLayers=function(){for(var t=this,e=!1,r=kx;r<=r7;r++){var n=t.layersByLevel[r];if(n&&n.length>0){e=!0;break}}return e};va.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=qu(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,s(function(n,i,a){e.invalidateLayer(n)},"invalAssocLayers")))};va.invalidateLayer=function(t){if(this.lastInvalidationTime=qu(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];yf(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i<r.length;i++){var a=r[i]._private.rscratch.imgLayerCaches;a&&(a[e]=null)}}};va.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,s(function(n,i,a){var o=n.replacement;if(o||(o=n.replacement=e.makeLayer(n.bb,n.level),o.replaces=n,o.eles=n.eles),!o.reqs)for(var l=0;l<o.eles.length;l++)e.queueLayer(o,o.eles[l])},"refineEachEle"))};va.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()};va.queueLayer=function(t,e){var r=this,n=r.layersQueue,i=t.elesQueue,a=i.hasId=i.hasId||{};if(!t.replacement){if(e){if(a[e.id()])return;i.push(e),a[e.id()]=!0}t.reqs?(t.reqs++,n.updateItem(t)):(t.reqs=1,n.push(t))}};va.dequeue=function(t){for(var e=this,r=e.layersQueue,n=[],i=0;i<fje&&r.size()!==0;){var a=r.peek();if(a.replacement){r.pop();continue}if(a.replaces&&a!==a.replaces.replacement){r.pop();continue}if(a.invalid){r.pop();continue}var o=a.elesQueue.shift();o&&(e.drawEleInLayer(a,o,a.level,t),i++),n.length===0&&n.push(!0),a.elesQueue.length===0&&(r.pop(),a.reqs=0,a.replaces&&e.applyLayerReplacement(a),e.requestRedraw())}return n};va.applyLayerReplacement=function(t){var e=this,r=e.layersByLevel[t.level],n=t.replaces,i=r.indexOf(n);if(!(i<0||n.invalid)){r[i]=t;for(var a=0;a<t.eles.length;a++){var o=t.eles[a]._private,l=o.imgLayerCaches=o.imgLayerCaches||{};l&&(l[t.level]=t)}e.requestRedraw()}};va.requestRedraw=a7(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100);va.setupDequeueing=mpe.setupDequeueing({deqRedrawThreshold:sje,deqCost:lje,deqAvgCost:cje,deqNoDrawCost:uje,deqFastCost:hje,deq:s(function(e,r){return e.dequeue(r)},"deq"),onDeqd:lP,shouldRedraw:s0e,priority:s(function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")});ype={};s(gje,"polygon");s(yje,"triangleBackcurve");s($de,"triangleTee");s(vje,"circleTriangle");s(xje,"circle");ype.arrowShapeImpl=function(t){return(zde||(zde={polygon:gje,"triangle-backcurve":yje,"triangle-tee":$de,"circle-triangle":vje,"triangle-cross":$de,circle:xje}))[t]};Pc={};Pc.drawElement=function(t,e,r,n,i,a){var o=this;e.isNode()?o.drawNode(t,e,r,n,i,a):o.drawEdge(t,e,r,n,i,a)};Pc.drawElementOverlay=function(t,e){var r=this;e.isNode()?r.drawNodeOverlay(t,e):r.drawEdgeOverlay(t,e)};Pc.drawElementUnderlay=function(t,e){var r=this;e.isNode()?r.drawNodeUnderlay(t,e):r.drawEdgeUnderlay(t,e)};Pc.drawCachedElementPortion=function(t,e,r,n,i,a,o,l){var u=this,h=r.getBoundingBox(e);if(!(h.w===0||h.h===0)){var f=r.getElement(e,h,n,i,a);if(f!=null){var d=l(u,e);if(d===0)return;var p=o(u,e),m=h.x1,g=h.y1,y=h.w,v=h.h,x,b,k,A,w;if(p!==0){var T=r.getRotationPoint(e);k=T.x,A=T.y,t.translate(k,A),t.rotate(p),w=u.getImgSmoothing(t),w||u.setImgSmoothing(t,!0);var C=r.getRotationOffset(e);x=C.x,b=C.y}else x=m,b=g;var E;d!==1&&(E=t.globalAlpha,t.globalAlpha=E*d),t.drawImage(f.texture.canvas,f.x,0,f.width,f.height,x,b,y,v),d!==1&&(t.globalAlpha=E),p!==0&&(t.rotate(-p),t.translate(-k,-A),w||u.setImgSmoothing(t,!1))}else r.drawElement(t,e)}};bje=s(function(){return 0},"getZeroRotation"),kje=s(function(e,r){return e.getTextAngle(r,null)},"getLabelRotation"),wje=s(function(e,r){return e.getTextAngle(r,"source")},"getSourceLabelRotation"),Tje=s(function(e,r){return e.getTextAngle(r,"target")},"getTargetLabelRotation"),Eje=s(function(e,r){return r.effectiveOpacity()},"getOpacity"),zO=s(function(e,r){return r.pstyle("text-opacity").pfValue*r.effectiveOpacity()},"getTextOpacity");Pc.drawCachedElement=function(t,e,r,n,i,a){var o=this,l=o.data,u=l.eleTxrCache,h=l.lblTxrCache,f=l.slbTxrCache,d=l.tlbTxrCache,p=e.boundingBox(),m=a===!0?u.reasons.highQuality:null;if(!(p.w===0||p.h===0||!e.visible())&&(!n||hP(p,n))){var g=e.isEdge(),y=e.element()._private.rscratch.badLine;o.drawElementUnderlay(t,e),o.drawCachedElementPortion(t,e,u,r,i,m,bje,Eje),(!g||!y)&&o.drawCachedElementPortion(t,e,h,r,i,m,kje,zO),g&&!y&&(o.drawCachedElementPortion(t,e,f,r,i,m,wje,zO),o.drawCachedElementPortion(t,e,d,r,i,m,Tje,zO)),o.drawElementOverlay(t,e)}};Pc.drawElements=function(t,e){for(var r=this,n=0;n<e.length;n++){var i=e[n];r.drawElement(t,i)}};Pc.drawCachedElements=function(t,e,r,n){for(var i=this,a=0;a<e.length;a++){var o=e[a];i.drawCachedElement(t,o,r,n)}};Pc.drawCachedNodes=function(t,e,r,n){for(var i=this,a=0;a<e.length;a++){var o=e[a];o.isNode()&&i.drawCachedElement(t,o,r,n)}};Pc.drawLayeredElements=function(t,e,r,n){var i=this,a=i.data.lyrTxrCache.getLayers(e,r);if(a)for(var o=0;o<a.length;o++){var l=a[o],u=l.bb;u.w===0||u.h===0||t.drawImage(l.canvas,u.x1,u.y1,u.w,u.h)}else i.drawCachedElements(t,e,r,n)};ju={};ju.drawEdge=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,o=this,l=e._private.rscratch;if(!(a&&!e.visible())&&!(l.badLine||l.allpts==null||isNaN(l.allpts[0]))){var u;r&&(u=r,t.translate(-u.x1,-u.y1));var h=a?e.pstyle("opacity").value:1,f=a?e.pstyle("line-opacity").value:1,d=e.pstyle("curve-style").value,p=e.pstyle("line-style").value,m=e.pstyle("width").pfValue,g=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,v=e.pstyle("line-outline-color").value,x=h*f,b=h*f,k=s(function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;d==="straight-triangle"?(o.eleStrokeStyle(t,e,F),o.drawEdgeTrianglePath(e,t,l.allpts)):(t.lineWidth=m,t.lineCap=g,o.eleStrokeStyle(t,e,F),o.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")},"drawLine"),A=s(function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;if(t.lineWidth=m+y,t.lineCap=g,y>0)o.colorStrokeStyle(t,v[0],v[1],v[2],F);else{t.lineCap="butt";return}d==="straight-triangle"?o.drawEdgeTrianglePath(e,t,l.allpts):(o.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")},"drawLineOutline"),w=s(function(){i&&o.drawEdgeOverlay(t,e)},"drawOverlay"),T=s(function(){i&&o.drawEdgeUnderlay(t,e)},"drawUnderlay"),C=s(function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;o.drawArrowheads(t,e,F)},"drawArrows"),E=s(function(){o.drawElementText(t,e,null,n)},"drawText");t.lineJoin="round";var S=e.pstyle("ghost").value==="yes";if(S){var R=e.pstyle("ghost-offset-x").pfValue,D=e.pstyle("ghost-offset-y").pfValue,L=e.pstyle("ghost-opacity").value,P=x*L;t.translate(R,D),k(P),C(P),t.translate(-R,-D)}else A();T(),k(),C(),w(),E(),r&&t.translate(u.x1,u.y1)}};vpe=s(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,o=a.usePaths(),l=n._private.rscratch,u=n.pstyle("".concat(e,"-padding")).pfValue,h=2*u,f=n.pstyle("".concat(e,"-color")).value;r.lineWidth=h,l.edgeType==="self"&&!o?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,f[0],f[1],f[2],i),a.drawEdgePath(n,r,l.allpts,"solid")}}}},"drawEdgeOverlayUnderlay");ju.drawEdgeOverlay=vpe("overlay");ju.drawEdgeUnderlay=vpe("underlay");ju.drawEdgePath=function(t,e,r,n){var i=t._private.rscratch,a=e,o,l=!1,u=this.usePaths(),h=t.pstyle("line-dash-pattern").pfValue,f=t.pstyle("line-dash-offset").pfValue;if(u){var d=r.join("$"),p=i.pathCacheKey&&i.pathCacheKey===d;p?(o=e=i.pathCache,l=!0):(o=e=new Path2D,i.pathCacheKey=d,i.pathCache=o)}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(h),a.lineDashOffset=f;break;case"solid":a.setLineDash([]);break}if(!l&&!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 m=2;m+3<r.length;m+=4)e.quadraticCurveTo(r[m],r[m+1],r[m+2],r[m+3]);break;case"straight":case"haystack":for(var g=2;g+1<r.length;g+=2)e.lineTo(r[g],r[g+1]);break;case"segments":if(i.isRound){var y=Hde(i.roundCorners),v;try{for(y.s();!(v=y.n()).done;){var x=v.value;ope(e,x)}}catch(k){y.e(k)}finally{y.f()}e.lineTo(r[r.length-2],r[r.length-1])}else for(var b=2;b+1<r.length;b+=2)e.lineTo(r[b],r[b+1]);break}e=a,u?e.stroke(o):e.stroke(),e.setLineDash&&e.setLineDash([])};ju.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var n=t.pstyle("width").pfValue,i=0;i+1<r.length;i+=2){var a=[r[i+2]-r[i],r[i+3]-r[i+1]],o=Math.sqrt(a[0]*a[0]+a[1]*a[1]),l=[a[1]/o,-a[0]/o],u=[l[0]*n/2,l[1]*n/2];e.beginPath(),e.moveTo(r[i]-u[0],r[i+1]-u[1]),e.lineTo(r[i]+u[0],r[i+1]+u[1]),e.lineTo(r[i+2],r[i+3]),e.closePath(),e.fill()}};ju.drawArrowheads=function(t,e,r){var n=e._private.rscratch,i=n.edgeType==="haystack";i||this.drawArrowhead(t,e,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),i||this.drawArrowhead(t,e,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)};ju.drawArrowhead=function(t,e,r,n,i,a,o){if(!(isNaN(n)||n==null||isNaN(i)||i==null||isNaN(a)||a==null)){var l=this,u=e.pstyle(r+"-arrow-shape").value;if(u!=="none"){var h=e.pstyle(r+"-arrow-fill").value==="hollow"?"both":"filled",f=e.pstyle(r+"-arrow-fill").value,d=e.pstyle("width").pfValue,p=e.pstyle(r+"-arrow-width"),m=p.value==="match-line"?d:p.pfValue;p.units==="%"&&(m*=d);var g=e.pstyle("opacity").value;o===void 0&&(o=g);var y=t.globalCompositeOperation;(o!==1||f==="hollow")&&(t.globalCompositeOperation="destination-out",l.colorFillStyle(t,255,255,255,1),l.colorStrokeStyle(t,255,255,255,1),l.drawArrowShape(e,t,h,d,u,m,n,i,a),t.globalCompositeOperation=y);var v=e.pstyle(r+"-arrow-color").value;l.colorFillStyle(t,v[0],v[1],v[2],o),l.colorStrokeStyle(t,v[0],v[1],v[2],o),l.drawArrowShape(e,t,f,d,u,m,n,i,a)}}};ju.drawArrowShape=function(t,e,r,n,i,a,o,l,u){var h=this,f=this.usePaths()&&i!=="triangle-cross",d=!1,p,m=e,g={x:o,y:l},y=t.pstyle("arrow-scale").value,v=this.getArrowWidth(n,y),x=h.arrowShapes[i];if(f){var b=h.arrowPathCache=h.arrowPathCache||[],k=M0(i),A=b[k];A!=null?(p=e=A,d=!0):(p=e=new Path2D,b[k]=p)}d||(e.beginPath&&e.beginPath(),f?x.draw(e,1,0,{x:0,y:0},1):x.draw(e,v,u,g,n),e.closePath&&e.closePath()),e=m,f&&(e.translate(o,l),e.rotate(u),e.scale(v,v)),(r==="filled"||r==="both")&&(f?e.fill(p):e.fill()),(r==="hollow"||r==="both")&&(e.lineWidth=a/(f?v:1),e.lineJoin="miter",f?e.stroke(p):e.stroke()),f&&(e.scale(1/v,1/v),e.rotate(-u),e.translate(-o,-l))};SP={};SP.safeDrawImage=function(t,e,r,n,i,a,o,l,u,h){if(!(i<=0||a<=0||u<=0||h<=0))try{t.drawImage(e,r,n,i,a,o,l,u,h)}catch(f){Kr(f)}};SP.drawInscribedImage=function(t,e,r,n,i){var a=this,o=r.position(),l=o.x,u=o.y,h=r.cy().style(),f=h.getIndexedStyle.bind(h),d=f(r,"background-fit","value",n),p=f(r,"background-repeat","value",n),m=r.width(),g=r.height(),y=r.padding()*2,v=m+(f(r,"background-width-relative-to","value",n)==="inner"?0:y),x=g+(f(r,"background-height-relative-to","value",n)==="inner"?0:y),b=r._private.rscratch,k=f(r,"background-clip","value",n),A=k==="node",w=f(r,"background-image-opacity","value",n)*i,T=f(r,"background-image-smoothing","value",n),C=r.pstyle("corner-radius").value;C!=="auto"&&(C=r.pstyle("corner-radius").pfValue);var E=e.width||e.cachedW,S=e.height||e.cachedH;(E==null||S==null)&&(document.body.appendChild(e),E=e.cachedW=e.width||e.offsetWidth,S=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var R=E,D=S;if(f(r,"background-width","value",n)!=="auto"&&(f(r,"background-width","units",n)==="%"?R=f(r,"background-width","pfValue",n)*v:R=f(r,"background-width","pfValue",n)),f(r,"background-height","value",n)!=="auto"&&(f(r,"background-height","units",n)==="%"?D=f(r,"background-height","pfValue",n)*x:D=f(r,"background-height","pfValue",n)),!(R===0||D===0)){if(d==="contain"){var L=Math.min(v/R,x/D);R*=L,D*=L}else if(d==="cover"){var L=Math.max(v/R,x/D);R*=L,D*=L}var P=l-v/2,M=f(r,"background-position-x","units",n),F=f(r,"background-position-x","pfValue",n);M==="%"?P+=(v-R)*F:P+=F;var I=f(r,"background-offset-x","units",n),O=f(r,"background-offset-x","pfValue",n);I==="%"?P+=(v-R)*O:P+=O;var z=u-x/2,N=f(r,"background-position-y","units",n),U=f(r,"background-position-y","pfValue",n);N==="%"?z+=(x-D)*U:z+=U;var $=f(r,"background-offset-y","units",n),W=f(r,"background-offset-y","pfValue",n);$==="%"?z+=(x-D)*W:z+=W,b.pathCache&&(P-=l,z-=u,l=0,u=0);var ee=t.globalAlpha;t.globalAlpha=w;var te=a.getImgSmoothing(t),ce=!1;if(T==="no"&&te?(a.setImgSmoothing(t,!1),ce=!0):T==="yes"&&!te&&(a.setImgSmoothing(t,!0),ce=!0),p==="no-repeat")A&&(t.save(),b.pathCache?t.clip(b.pathCache):(a.nodeShapes[a.getNodeShape(r)].draw(t,l,u,v,x,C,b),t.clip())),a.safeDrawImage(t,e,0,0,E,S,P,z,R,D),A&&t.restore();else{var Z=t.createPattern(e,p);t.fillStyle=Z,a.nodeShapes[a.getNodeShape(r)].draw(t,l,u,v,x,C,b),t.translate(P,z),t.fill(),t.translate(-P,-z)}t.globalAlpha=ee,ce&&a.setImgSmoothing(t,te)}};z0={};z0.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),n=this.getPixelRatio(),i=Math.ceil(uP(r*n));e=Math.pow(2,i)}var a=t.pstyle("font-size").pfValue*e,o=t.pstyle("min-zoomed-font-size").pfValue;return!(a<o)};z0.drawElementText=function(t,e,r,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(n==null){if(a&&!o.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var l=e.pstyle("label");if(!l||!l.value)return;var u=o.getLabelJustification(e);t.textAlign=u,t.textBaseline="bottom"}else{var h=e.element()._private.rscratch.badLine,f=e.pstyle("label"),d=e.pstyle("source-label"),p=e.pstyle("target-label");if(h||(!f||!f.value)&&(!d||!d.value)&&(!p||!p.value))return;t.textAlign="center",t.textBaseline="bottom"}var m=!r,g;r&&(g=r,t.translate(-g.x1,-g.y1)),i==null?(o.drawText(t,e,null,m,a),e.isEdge()&&(o.drawText(t,e,"source",m,a),o.drawText(t,e,"target",m,a))):o.drawText(t,e,i,m,a),r&&t.translate(g.x1,g.y1)};z0.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if(e=this.fontCaches[r],e.context===t)return e;return e={context:t},this.fontCaches.push(e),e};z0.setupTextStyle=function(t,e){var r=arguments.length>2&&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,o=e.pstyle("font-weight").strValue,l=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*l,h=e.pstyle("color").value,f=e.pstyle("text-outline-color").value;t.font=n+" "+o+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,h[0],h[1],h[2],l),this.colorStrokeStyle(t,f[0],f[1],f[2],u)};s($O,"roundRect");z0.getTextAngle=function(t,e){var r,n=t._private,i=n.rscratch,a=e?e+"-":"",o=t.pstyle(a+"text-rotation"),l=Al(i,"labelAngle",e);return o.strValue==="autorotate"?r=t.isEdge()?l:0:o.strValue==="none"?r=0:r=o.pfValue,r};z0.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,o=a.rscratch,l=i?e.effectiveOpacity():1;if(!(i&&(l===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var u=Al(o,"labelX",r),h=Al(o,"labelY",r),f,d,p=this.getLabelText(e,r);if(p!=null&&p!==""&&!isNaN(u)&&!isNaN(h)){this.setupTextStyle(t,e,i);var m=r?r+"-":"",g=Al(o,"labelWidth",r),y=Al(o,"labelHeight",r),v=e.pstyle(m+"text-margin-x").pfValue,x=e.pstyle(m+"text-margin-y").pfValue,b=e.isEdge(),k=e.pstyle("text-halign").value,A=e.pstyle("text-valign").value;b&&(k="center",A="center"),u+=v,h+=x;var w;switch(n?w=this.getTextAngle(e,r):w=0,w!==0&&(f=u,d=h,t.translate(f,d),t.rotate(w),u=0,h=0),A){case"top":break;case"center":h+=y/2;break;case"bottom":h+=y;break}var T=e.pstyle("text-background-opacity").value,C=e.pstyle("text-border-opacity").value,E=e.pstyle("text-border-width").pfValue,S=e.pstyle("text-background-padding").pfValue,R=e.pstyle("text-background-shape").strValue,D=R.indexOf("round")===0,L=2;if(T>0||E>0&&C>0){var P=u-S;switch(k){case"left":P-=g;break;case"center":P-=g/2;break}var M=h-y-S,F=g+2*S,I=y+2*S;if(T>0){var O=t.fillStyle,z=e.pstyle("text-background-color").value;t.fillStyle="rgba("+z[0]+","+z[1]+","+z[2]+","+T*l+")",D?$O(t,P,M,F,I,L):t.fillRect(P,M,F,I),t.fillStyle=O}if(E>0&&C>0){var N=t.strokeStyle,U=t.lineWidth,$=e.pstyle("text-border-color").value,W=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+$[0]+","+$[1]+","+$[2]+","+C*l+")",t.lineWidth=E,t.setLineDash)switch(W){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=E/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(D?$O(t,P,M,F,I,L,"stroke"):t.strokeRect(P,M,F,I),W==="double"){var ee=E/2;D?$O(t,P+ee,M+ee,F-ee*2,I-ee*2,L,"stroke"):t.strokeRect(P+ee,M+ee,F-ee*2,I-ee*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=U,t.strokeStyle=N}}var te=2*e.pstyle("text-outline-width").pfValue;if(te>0&&(t.lineWidth=te),e.pstyle("text-wrap").value==="wrap"){var ce=Al(o,"labelWrapCachedLines",r),Z=Al(o,"labelLineHeight",r),fe=g/2,ne=this.getLabelJustification(e);switch(ne==="auto"||(k==="left"?ne==="left"?u+=-g:ne==="center"&&(u+=-fe):k==="center"?ne==="left"?u+=-fe:ne==="right"&&(u+=fe):k==="right"&&(ne==="center"?u+=fe:ne==="right"&&(u+=g))),A){case"top":h-=(ce.length-1)*Z;break;case"center":case"bottom":h-=(ce.length-1)*Z;break}for(var H=0;H<ce.length;H++)te>0&&t.strokeText(ce[H],u,h),t.fillText(ce[H],u,h),h+=Z}else te>0&&t.strokeText(p,u,h),t.fillText(p,u,h);w!==0&&(t.rotate(-w),t.translate(-f,-d))}}};n1={};n1.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,o=this,l,u,h=e._private,f=h.rscratch,d=e.position();if(!(!rt(d.x)||!rt(d.y))&&!(a&&!e.visible())){var p=a?e.effectiveOpacity():1,m=o.usePaths(),g,y=!1,v=e.padding();l=e.width()+2*v,u=e.height()+2*v;var x;r&&(x=r,t.translate(-x.x1,-x.y1));for(var b=e.pstyle("background-image"),k=b.value,A=new Array(k.length),w=new Array(k.length),T=0,C=0;C<k.length;C++){var E=k[C],S=A[C]=E!=null&&E!=="none";if(S){var R=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",C);T++,w[C]=o.getCachedImage(E,R,function(){h.backgroundTimestamp=Date.now(),e.emitAndNotify("background")})}}var D=e.pstyle("background-blacken").value,L=e.pstyle("border-width").pfValue,P=e.pstyle("background-opacity").value*p,M=e.pstyle("border-color").value,F=e.pstyle("border-style").value,I=e.pstyle("border-join").value,O=e.pstyle("border-cap").value,z=e.pstyle("border-position").value,N=e.pstyle("border-dash-pattern").pfValue,U=e.pstyle("border-dash-offset").pfValue,$=e.pstyle("border-opacity").value*p,W=e.pstyle("outline-width").pfValue,ee=e.pstyle("outline-color").value,te=e.pstyle("outline-style").value,ce=e.pstyle("outline-opacity").value*p,Z=e.pstyle("outline-offset").value,fe=e.pstyle("corner-radius").value;fe!=="auto"&&(fe=e.pstyle("corner-radius").pfValue);var ne=s(function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:P;o.eleFillStyle(t,e,pe)},"setupShapeColor"),H=s(function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$;o.colorStrokeStyle(t,M[0],M[1],M[2],pe)},"setupBorderColor"),Q=s(function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ce;o.colorStrokeStyle(t,ee[0],ee[1],ee[2],pe)},"setupOutlineColor"),K=s(function(pe,de,Ie,Ne){var Be=o.nodePathCache=o.nodePathCache||[],ze=a0e(Ie==="polygon"?Ie+","+Ne.join(","):Ie,""+de,""+pe,""+fe),qe=Be[ze],Fe,we=!1;return qe!=null?(Fe=qe,we=!0,f.pathCache=Fe):(Fe=new Path2D,Be[ze]=f.pathCache=Fe),{path:Fe,cacheHit:we}},"getPath"),re=e.pstyle("shape").strValue,ie=e.pstyle("shape-polygon-points").pfValue;if(m){t.translate(d.x,d.y);var ye=K(l,u,re,ie);g=ye.path,y=ye.cacheHit}var j=s(function(){if(!y){var pe=d;m&&(pe={x:0,y:0}),o.nodeShapes[o.getNodeShape(e)].draw(g||t,pe.x,pe.y,l,u,fe,f)}m?t.fill(g):t.fill()},"drawShape"),De=s(function(){for(var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Ie=h.backgrounding,Ne=0,Be=0;Be<w.length;Be++){var ze=e.cy().style().getIndexedStyle(e,"background-image-containment","value",Be);if(de&&ze==="over"||!de&&ze==="inside"){Ne++;continue}A[Be]&&w[Be].complete&&!w[Be].error&&(Ne++,o.drawInscribedImage(t,w[Be],e,Be,pe))}h.backgrounding=Ne!==T,Ie!==h.backgrounding&&e.updateStyle(!1)},"drawImages"),oe=s(function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;o.hasPie(e)&&(o.drawPie(t,e,de),pe&&(m||o.nodeShapes[o.getNodeShape(e)].draw(t,d.x,d.y,l,u,fe,f)))},"drawPie"),Re=s(function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,de=(D>0?D:-D)*pe,Ie=D>0?0:255;D!==0&&(o.colorFillStyle(t,Ie,Ie,Ie,de),m?t.fill(g):t.fill())},"darken"),Pe=s(function(){if(L>0){if(t.lineWidth=L,t.lineCap=O,t.lineJoin=I,t.setLineDash)switch(F){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(N),t.lineDashOffset=U;break;case"solid":case"double":t.setLineDash([]);break}if(z!=="center"){if(t.save(),t.lineWidth*=2,z==="inside")m?t.clip(g):t.clip();else{var pe=new Path2D;pe.rect(-l/2-L,-u/2-L,l+2*L,u+2*L),pe.addPath(g),t.clip(pe,"evenodd")}m?t.stroke(g):t.stroke(),t.restore()}else m?t.stroke(g):t.stroke();if(F==="double"){t.lineWidth=L/3;var de=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",m?t.stroke(g):t.stroke(),t.globalCompositeOperation=de}t.setLineDash&&t.setLineDash([])}},"drawBorder"),Se=s(function(){if(W>0){if(t.lineWidth=W,t.lineCap="butt",t.setLineDash)switch(te){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var pe=d;m&&(pe={x:0,y:0});var de=o.getNodeShape(e),Ie=L;z==="inside"&&(Ie=0),z==="outside"&&(Ie*=2);var Ne=(l+Ie+(W+Z))/l,Be=(u+Ie+(W+Z))/u,ze=l*Ne,qe=u*Be,Fe=o.nodeShapes[de].points,we;if(m){var Je=K(ze,qe,de,Fe);we=Je.path}if(de==="ellipse")o.drawEllipsePath(we||t,pe.x,pe.y,ze,qe);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(de)){var We=0,or=0,Cr=0;de==="round-diamond"?We=(Ie+Z+W)*1.4:de==="round-heptagon"?(We=(Ie+Z+W)*1.075,Cr=-(Ie/2+Z+W)/35):de==="round-hexagon"?We=(Ie+Z+W)*1.12:de==="round-pentagon"?(We=(Ie+Z+W)*1.13,Cr=-(Ie/2+Z+W)/15):de==="round-tag"?(We=(Ie+Z+W)*1.12,or=(Ie/2+W+Z)*.07):de==="round-triangle"&&(We=(Ie+Z+W)*(Math.PI/2),Cr=-(Ie+Z/2+W)/Math.PI),We!==0&&(Ne=(l+We)/l,ze=l*Ne,["round-hexagon","round-tag"].includes(de)||(Be=(u+We)/u,qe=u*Be)),fe=fe==="auto"?g0e(ze,qe):fe;for(var Ut=ze/2,ar=qe/2,ut=fe+(Ie+W+Z)/2,Rt=new Array(Fe.length/2),Qe=new Array(Fe.length/2),Dt=0;Dt<Fe.length/2;Dt++)Rt[Dt]={x:pe.x+or+Ut*Fe[Dt*2],y:pe.y+Cr+ar*Fe[Dt*2+1]};var qt,yt,Et,pt,Wt=Rt.length;for(yt=Rt[Wt-1],qt=0;qt<Wt;qt++)Et=Rt[qt%Wt],pt=Rt[(qt+1)%Wt],Qe[qt]=EP(yt,Et,pt,ut),yt=Et,Et=pt;o.drawRoundPolygonPath(we||t,pe.x+or,pe.y+Cr,l*Ne,u*Be,Fe,Qe)}else if(["roundrectangle","round-rectangle"].includes(de))fe=fe==="auto"?N0(ze,qe):fe,o.drawRoundRectanglePath(we||t,pe.x,pe.y,ze,qe,fe+(Ie+W+Z)/2);else if(["cutrectangle","cut-rectangle"].includes(de))fe=fe==="auto"?fP():fe,o.drawCutRectanglePath(we||t,pe.x,pe.y,ze,qe,null,fe+(Ie+W+Z)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(de))fe=fe==="auto"?N0(ze,qe):fe,o.drawBottomRoundRectanglePath(we||t,pe.x,pe.y,ze,qe,fe+(Ie+W+Z)/2);else if(de==="barrel")o.drawBarrelPath(we||t,pe.x,pe.y,ze,qe);else if(de.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(de)){var ot=(Ie+W+Z)/l;Fe=jT(KT(Fe,ot)),o.drawPolygonPath(we||t,pe.x,pe.y,l,u,Fe)}else{var fr=(Ie+W+Z)/l;Fe=jT(KT(Fe,-fr)),o.drawPolygonPath(we||t,pe.x,pe.y,l,u,Fe)}if(m?t.stroke(we):t.stroke(),te==="double"){t.lineWidth=Ie/3;var vt=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",m?t.stroke(we):t.stroke(),t.globalCompositeOperation=vt}t.setLineDash&&t.setLineDash([])}},"drawOutline"),Ue=s(function(){i&&o.drawNodeOverlay(t,e,d,l,u)},"drawOverlay"),Oe=s(function(){i&&o.drawNodeUnderlay(t,e,d,l,u)},"drawUnderlay"),_e=s(function(){o.drawElementText(t,e,null,n)},"drawText"),he=e.pstyle("ghost").value==="yes";if(he){var q=e.pstyle("ghost-offset-x").pfValue,se=e.pstyle("ghost-offset-y").pfValue,ue=e.pstyle("ghost-opacity").value,X=ue*p;t.translate(q,se),Q(),Se(),ne(ue*P),j(),De(X,!0),H(ue*$),Pe(),oe(D!==0||L!==0),De(X,!1),Re(X),t.translate(-q,-se)}m&&t.translate(-d.x,-d.y),Oe(),m&&t.translate(d.x,d.y),Q(),Se(),ne(),j(),De(p,!0),H(),Pe(),oe(D!==0||L!==0),De(p,!1),Re(),m&&t.translate(-d.x,-d.y),_e(),Ue(),r&&t.translate(x.x1,x.y1)}};xpe=s(function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n,i,a,o){var l=this;if(n.visible()){var u=n.pstyle("".concat(e,"-padding")).pfValue,h=n.pstyle("".concat(e,"-opacity")).value,f=n.pstyle("".concat(e,"-color")).value,d=n.pstyle("".concat(e,"-shape")).value,p=n.pstyle("".concat(e,"-corner-radius")).value;if(h>0){if(i=i||n.position(),a==null||o==null){var m=n.padding();a=n.width()+2*m,o=n.height()+2*m}l.colorFillStyle(r,f[0],f[1],f[2],h),l.nodeShapes[d].draw(r,i.x,i.y,a+u*2,o+u*2,p),r.fill()}}}},"drawNodeOverlayUnderlay");n1.drawNodeOverlay=xpe("overlay");n1.drawNodeUnderlay=xpe("underlay");n1.hasPie=function(t){return t=t[0],t._private.hasPie};n1.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),o=n.x,l=n.y,u=e.width(),h=e.height(),f=Math.min(u,h)/2,d=0,p=this.usePaths();p&&(o=0,l=0),a.units==="%"?f=f*a.pfValue:a.pfValue!==void 0&&(f=a.pfValue/2);for(var m=1;m<=i.pieBackgroundN;m++){var g=e.pstyle("pie-"+m+"-background-size").value,y=e.pstyle("pie-"+m+"-background-color").value,v=e.pstyle("pie-"+m+"-background-opacity").value*r,x=g/100;x+d>1&&(x=1-d);var b=1.5*Math.PI+2*Math.PI*d,k=2*Math.PI*x,A=b+k;g===0||d>=1||d+x>1||(t.beginPath(),t.moveTo(o,l),t.arc(o,l,f,b,A),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],v),t.fill(),d+=x)}};lo={},Cje=100;lo.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};lo.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,i=0;i<e.length;i++)if(n=e[i],n.context===t){r=!1;break}return r&&(n={context:t},e.push(n)),n};lo.createGradientStyleFor=function(t,e,r,n,i){var a,o=this.usePaths(),l=r.pstyle(e+"-gradient-stop-colors").value,u=r.pstyle(e+"-gradient-stop-positions").pfValue;if(n==="radial-gradient")if(r.isEdge()){var h=r.sourceEndpoint(),f=r.targetEndpoint(),d=r.midpoint(),p=I0(h,d),m=I0(f,d);a=t.createRadialGradient(d.x,d.y,0,d.x,d.y,Math.max(p,m))}else{var g=o?{x:0,y:0}:r.position(),y=r.paddedWidth(),v=r.paddedHeight();a=t.createRadialGradient(g.x,g.y,0,g.x,g.y,Math.max(y,v))}else if(r.isEdge()){var x=r.sourceEndpoint(),b=r.targetEndpoint();a=t.createLinearGradient(x.x,x.y,b.x,b.y)}else{var k=o?{x:0,y:0}:r.position(),A=r.paddedWidth(),w=r.paddedHeight(),T=A/2,C=w/2,E=r.pstyle("background-gradient-direction").value;switch(E){case"to-bottom":a=t.createLinearGradient(k.x,k.y-C,k.x,k.y+C);break;case"to-top":a=t.createLinearGradient(k.x,k.y+C,k.x,k.y-C);break;case"to-left":a=t.createLinearGradient(k.x+T,k.y,k.x-T,k.y);break;case"to-right":a=t.createLinearGradient(k.x-T,k.y,k.x+T,k.y);break;case"to-bottom-right":case"to-right-bottom":a=t.createLinearGradient(k.x-T,k.y-C,k.x+T,k.y+C);break;case"to-top-right":case"to-right-top":a=t.createLinearGradient(k.x-T,k.y+C,k.x+T,k.y-C);break;case"to-bottom-left":case"to-left-bottom":a=t.createLinearGradient(k.x+T,k.y-C,k.x-T,k.y+C);break;case"to-top-left":case"to-left-top":a=t.createLinearGradient(k.x+T,k.y+C,k.x-T,k.y-C);break}}if(!a)return null;for(var S=u.length===l.length,R=l.length,D=0;D<R;D++)a.addColorStop(S?u[D]:D/(R-1),"rgba("+l[D][0]+","+l[D][1]+","+l[D][2]+","+i+")");return a};lo.gradientFillStyle=function(t,e,r,n){var i=this.createGradientStyleFor(t,"background",e,r,n);if(!i)return null;t.fillStyle=i};lo.colorFillStyle=function(t,e,r,n,i){t.fillStyle="rgba("+e+","+r+","+n+","+i+")"};lo.eleFillStyle=function(t,e,r){var n=e.pstyle("background-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientFillStyle(t,e,n,r);else{var i=e.pstyle("background-color").value;this.colorFillStyle(t,i[0],i[1],i[2],r)}};lo.gradientStrokeStyle=function(t,e,r,n){var i=this.createGradientStyleFor(t,"line",e,r,n);if(!i)return null;t.strokeStyle=i};lo.colorStrokeStyle=function(t,e,r,n,i){t.strokeStyle="rgba("+e+","+r+","+n+","+i+")"};lo.eleStrokeStyle=function(t,e,r){var n=e.pstyle("line-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientStrokeStyle(t,e,n,r);else{var i=e.pstyle("line-color").value;this.colorStrokeStyle(t,i[0],i[1],i[2],r)}};lo.matchCanvasSize=function(t){var e=this,r=e.data,n=e.findContainerClientCoords(),i=n[2],a=n[3],o=e.getPixelRatio(),l=e.motionBlurPxRatio;(t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]||t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG])&&(o=l);var u=i*o,h=a*o,f;if(!(u===e.canvasWidth&&h===e.canvasHeight)){e.fontCaches=null;var d=r.canvasContainer;d.style.width=i+"px",d.style.height=a+"px";for(var p=0;p<e.CANVAS_LAYERS;p++)f=r.canvases[p],f.width=u,f.height=h,f.style.width=i+"px",f.style.height=a+"px";for(var p=0;p<e.BUFFER_COUNT;p++)f=r.bufferCanvases[p],f.width=u,f.height=h,f.style.width=i+"px",f.style.height=a+"px";e.textureMult=1,o<=1&&(f=r.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,f.width=u*e.textureMult,f.height=h*e.textureMult),e.canvasWidth=u,e.canvasHeight=h}};lo.renderTo=function(t,e,r,n){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})};lo.render=function(t){t=t||c0e();var e=t.forcedContext,r=t.drawAllLayers,n=t.drawOnlyNodeLayer,i=t.forcedZoom,a=t.forcedPan,o=this,l=t.forcedPxRatio===void 0?this.getPixelRatio():t.forcedPxRatio,u=o.cy,h=o.data,f=h.canvasNeedsRedraw,d=o.textureOnViewport&&!e&&(o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming),p=t.motionBlur!==void 0?t.motionBlur:o.motionBlur,m=o.motionBlurPxRatio,g=u.hasCompoundNodes(),y=o.hoverData.draggingEles,v=!!(o.hoverData.selecting||o.touchData.selecting);p=p&&!e&&o.motionBlurEnabled&&!v;var x=p;e||(o.prevPxRatio!==l&&(o.invalidateContainerClientCoordsCache(),o.matchCanvasSize(o.container),o.redrawHint("eles",!0),o.redrawHint("drag",!0)),o.prevPxRatio=l),!e&&o.motionBlurTimeout&&clearTimeout(o.motionBlurTimeout),p&&(o.mbFrames==null&&(o.mbFrames=0),o.mbFrames++,o.mbFrames<3&&(x=!1),o.mbFrames>o.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!d&&(f[o.NODE]=!0,f[o.SELECT_BOX]=!0);var b=u.style(),k=u.zoom(),A=i!==void 0?i:k,w=u.pan(),T={x:w.x,y:w.y},C={zoom:k,pan:{x:w.x,y:w.y}},E=o.prevViewport,S=E===void 0||C.zoom!==E.zoom||C.pan.x!==E.pan.x||C.pan.y!==E.pan.y;!S&&!(y&&!g)&&(o.motionBlurPxRatio=1),a&&(T=a),A*=l,T.x*=l,T.y*=l;var R=o.getCachedZSortedEles();function D(ye,j,De,oe,Re){var Pe=ye.globalCompositeOperation;ye.globalCompositeOperation="destination-out",o.colorFillStyle(ye,255,255,255,o.motionBlurTransparency),ye.fillRect(j,De,oe,Re),ye.globalCompositeOperation=Pe}s(D,"mbclear");function L(ye,j){var De,oe,Re,Pe;!o.clearingMotionBlur&&(ye===h.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]||ye===h.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG])?(De={x:w.x*m,y:w.y*m},oe=k*m,Re=o.canvasWidth*m,Pe=o.canvasHeight*m):(De=T,oe=A,Re=o.canvasWidth,Pe=o.canvasHeight),ye.setTransform(1,0,0,1,0,0),j==="motionBlur"?D(ye,0,0,Re,Pe):!e&&(j===void 0||j)&&ye.clearRect(0,0,Re,Pe),r||(ye.translate(De.x,De.y),ye.scale(oe,oe)),a&&ye.translate(a.x,a.y),i&&ye.scale(i,i)}if(s(L,"setContextTransform"),d||(o.textureDrawLastFrame=!1),d){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=u.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var P=o.data.bufferContexts[o.TEXTURE_BUFFER];P.setTransform(1,0,0,1,0,0),P.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:P,drawOnlyNodeLayer:!0,forcedPxRatio:l*o.textureMult});var C=o.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:o.canvasWidth,height:o.canvasHeight};C.mpan={x:(0-C.pan.x)/C.zoom,y:(0-C.pan.y)/C.zoom}}f[o.DRAG]=!1,f[o.NODE]=!1;var M=h.contexts[o.NODE],F=o.textureCache.texture,C=o.textureCache.viewport;M.setTransform(1,0,0,1,0,0),p?D(M,0,0,C.width,C.height):M.clearRect(0,0,C.width,C.height);var I=b.core("outside-texture-bg-color").value,O=b.core("outside-texture-bg-opacity").value;o.colorFillStyle(M,I[0],I[1],I[2],O),M.fillRect(0,0,C.width,C.height);var k=u.zoom();L(M,!1),M.clearRect(C.mpan.x,C.mpan.y,C.width/C.zoom/l,C.height/C.zoom/l),M.drawImage(F,C.mpan.x,C.mpan.y,C.width/C.zoom/l,C.height/C.zoom/l)}else o.textureOnViewport&&!e&&(o.textureCache=null);var z=u.extent(),N=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),U=o.hideEdgesOnViewport&&N,$=[];if($[o.NODE]=!f[o.NODE]&&p&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,$[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),$[o.DRAG]=!f[o.DRAG]&&p&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,$[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),f[o.NODE]||r||n||$[o.NODE]){var W=p&&!$[o.NODE]&&m!==1,M=e||(W?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:h.contexts[o.NODE]),ee=p&&!W?"motionBlur":void 0;L(M,ee),U?o.drawCachedNodes(M,R.nondrag,l,z):o.drawLayeredElements(M,R.nondrag,l,z),o.debug&&o.drawDebugPoints(M,R.nondrag),!r&&!p&&(f[o.NODE]=!1)}if(!n&&(f[o.DRAG]||r||$[o.DRAG])){var W=p&&!$[o.DRAG]&&m!==1,M=e||(W?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:h.contexts[o.DRAG]);L(M,p&&!W?"motionBlur":void 0),U?o.drawCachedNodes(M,R.drag,l,z):o.drawCachedElements(M,R.drag,l,z),o.debug&&o.drawDebugPoints(M,R.drag),!r&&!p&&(f[o.DRAG]=!1)}if(o.showFps||!n&&f[o.SELECT_BOX]&&!r){var M=e||h.contexts[o.SELECT_BOX];if(L(M),o.selection[4]==1&&(o.hoverData.selecting||o.touchData.selecting)){var k=o.cy.zoom(),te=b.core("selection-box-border-width").value/k;M.lineWidth=te,M.fillStyle="rgba("+b.core("selection-box-color").value[0]+","+b.core("selection-box-color").value[1]+","+b.core("selection-box-color").value[2]+","+b.core("selection-box-opacity").value+")",M.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),te>0&&(M.strokeStyle="rgba("+b.core("selection-box-border-color").value[0]+","+b.core("selection-box-border-color").value[1]+","+b.core("selection-box-border-color").value[2]+","+b.core("selection-box-opacity").value+")",M.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(h.bgActivePosistion&&!o.hoverData.selecting){var k=o.cy.zoom(),ce=h.bgActivePosistion;M.fillStyle="rgba("+b.core("active-bg-color").value[0]+","+b.core("active-bg-color").value[1]+","+b.core("active-bg-color").value[2]+","+b.core("active-bg-opacity").value+")",M.beginPath(),M.arc(ce.x,ce.y,b.core("active-bg-size").pfValue/k,0,2*Math.PI),M.fill()}var Z=o.lastRedrawTime;if(o.showFps&&Z){Z=Math.round(Z);var fe=Math.round(1e3/Z);M.setTransform(1,0,0,1,0,0),M.fillStyle="rgba(255, 0, 0, 0.75)",M.strokeStyle="rgba(255, 0, 0, 0.75)",M.lineWidth=1,M.fillText("1 frame = "+Z+" ms = "+fe+" fps",0,20);var ne=60;M.strokeRect(0,30,250,20),M.fillRect(0,30,250*Math.min(fe/ne,1),20)}r||(f[o.SELECT_BOX]=!1)}if(p&&m!==1){var H=h.contexts[o.NODE],Q=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],K=h.contexts[o.DRAG],re=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],ie=s(function(j,De,oe){j.setTransform(1,0,0,1,0,0),oe||!x?j.clearRect(0,0,o.canvasWidth,o.canvasHeight):D(j,0,0,o.canvasWidth,o.canvasHeight);var Re=m;j.drawImage(De,0,0,o.canvasWidth*Re,o.canvasHeight*Re,0,0,o.canvasWidth,o.canvasHeight)},"drawMotionBlur");(f[o.NODE]||$[o.NODE])&&(ie(H,Q,$[o.NODE]),f[o.NODE]=!1),(f[o.DRAG]||$[o.DRAG])&&(ie(K,re,$[o.DRAG]),f[o.DRAG]=!1)}o.prevViewport=C,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),p&&(o.motionBlurTimeout=setTimeout(function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!d,o.mbFrames=0,f[o.NODE]=!0,f[o.DRAG]=!0,o.redraw()},Cje)),e||u.emit("render")};wf={};wf.drawPolygonPath=function(t,e,r,n,i,a){var o=n/2,l=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+o*a[0],r+l*a[1]);for(var u=1;u<a.length/2;u++)t.lineTo(e+o*a[u*2],r+l*a[u*2+1]);t.closePath()};wf.drawRoundPolygonPath=function(t,e,r,n,i,a,o){o.forEach(function(l){return ope(t,l)}),t.closePath()};wf.drawRoundRectanglePath=function(t,e,r,n,i,a){var o=n/2,l=i/2,u=a==="auto"?N0(n,i):Math.min(a,l,o);t.beginPath&&t.beginPath(),t.moveTo(e,r-l),t.arcTo(e+o,r-l,e+o,r,u),t.arcTo(e+o,r+l,e,r+l,u),t.arcTo(e-o,r+l,e-o,r,u),t.arcTo(e-o,r-l,e,r-l,u),t.lineTo(e,r-l),t.closePath()};wf.drawBottomRoundRectanglePath=function(t,e,r,n,i,a){var o=n/2,l=i/2,u=a==="auto"?N0(n,i):a;t.beginPath&&t.beginPath(),t.moveTo(e,r-l),t.lineTo(e+o,r-l),t.lineTo(e+o,r),t.arcTo(e+o,r+l,e,r+l,u),t.arcTo(e-o,r+l,e-o,r,u),t.lineTo(e-o,r-l),t.lineTo(e,r-l),t.closePath()};wf.drawCutRectanglePath=function(t,e,r,n,i,a,o){var l=n/2,u=i/2,h=o==="auto"?fP():o;t.beginPath&&t.beginPath(),t.moveTo(e-l+h,r-u),t.lineTo(e+l-h,r-u),t.lineTo(e+l,r-u+h),t.lineTo(e+l,r+u-h),t.lineTo(e+l-h,r+u),t.lineTo(e-l+h,r+u),t.lineTo(e-l,r+u-h),t.lineTo(e-l,r-u+h),t.closePath()};wf.drawBarrelPath=function(t,e,r,n,i){var a=n/2,o=i/2,l=e-a,u=e+a,h=r-o,f=r+o,d=VO(n,i),p=d.widthOffset,m=d.heightOffset,g=d.ctrlPtOffsetPct*p;t.beginPath&&t.beginPath(),t.moveTo(l,h+m),t.lineTo(l,f-m),t.quadraticCurveTo(l+g,f,l+p,f),t.lineTo(u-p,f),t.quadraticCurveTo(u-g,f,u,f-m),t.lineTo(u,h+m),t.quadraticCurveTo(u-g,h,u-p,h),t.lineTo(l+p,h),t.quadraticCurveTo(l+g,h,l,h+m),t.closePath()};Gde=Math.sin(0),Vde=Math.cos(0),eP={},tP={},bpe=Math.PI/40;for(C0=0*Math.PI;C0<2*Math.PI;C0+=bpe)eP[C0]=Math.sin(C0),tP[C0]=Math.cos(C0);wf.drawEllipsePath=function(t,e,r,n,i){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,n/2,i/2,0,0,2*Math.PI);else for(var a,o,l=n/2,u=i/2,h=0*Math.PI;h<2*Math.PI;h+=bpe)a=e-l*eP[h]*Gde+l*tP[h]*Vde,o=r+u*tP[h]*Gde+u*eP[h]*Vde,h===0?t.moveTo(a,o):t.lineTo(a,o);t.closePath()};Gx={};Gx.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]};Gx.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements(),n=r.boundingBox(),i=this.findContainerClientCoords(),a=t.full?Math.ceil(n.w):i[2],o=t.full?Math.ceil(n.h):i[3],l=rt(t.maxWidth)||rt(t.maxHeight),u=this.getPixelRatio(),h=1;if(t.scale!==void 0)a*=t.scale,o*=t.scale,h=t.scale;else if(l){var f=1/0,d=1/0;rt(t.maxWidth)&&(f=h*t.maxWidth/a),rt(t.maxHeight)&&(d=h*t.maxHeight/o),h=Math.min(f,d),a*=h,o*=h}l||(a*=u,o*=u,h*=u);var p=document.createElement("canvas");p.width=a,p.height=o,p.style.width=a+"px",p.style.height=o+"px";var m=p.getContext("2d");if(a>0&&o>0){m.clearRect(0,0,a,o),m.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(t.full)m.translate(-n.x1*h,-n.y1*h),m.scale(h,h),this.drawElements(m,g),m.scale(1/h,1/h),m.translate(n.x1*h,n.y1*h);else{var y=e.pan(),v={x:y.x*h,y:y.y*h};h*=e.zoom(),m.translate(v.x,v.y),m.scale(h,h),this.drawElements(m,g),m.scale(1/h,1/h),m.translate(-v.x,-v.y)}t.bg&&(m.globalCompositeOperation="destination-over",m.fillStyle=t.bg,m.rect(0,0,a,o),m.fill())}return p};s(Sje,"b64ToBlob");s(Ude,"b64UriToB64");s(kpe,"output");Gx.png=function(t){return kpe(t,this.bufferCanvasImage(t),"image/png")};Gx.jpg=function(t){return kpe(t,this.bufferCanvasImage(t),"image/jpeg")};wpe={};wpe.nodeShapeImpl=function(t,e,r,n,i,a,o,l){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,o);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,o,l);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,l);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,o,l);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,l);case"barrel":return this.drawBarrelPath(e,r,n,i,a)}};_je=Tpe,Fr=Tpe.prototype;Fr.CANVAS_LAYERS=3;Fr.SELECT_BOX=0;Fr.DRAG=1;Fr.NODE=2;Fr.BUFFER_COUNT=3;Fr.TEXTURE_BUFFER=0;Fr.MOTIONBLUR_BUFFER_NODE=1;Fr.MOTIONBLUR_BUFFER_DRAG=2;s(Tpe,"CanvasRenderer");Fr.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Fr.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Fr.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Fr.SELECT_BOX]=e;break}};Aje=typeof Path2D<"u";Fr.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};Fr.usePaths=function(){return Aje&&this.pathsEnabled};Fr.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};Fr.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};Fr.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":Pi(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};[ype,Pc,ju,SP,z0,n1,lo,wf,Gx,wpe].forEach(function(t){Pt(Fr,t)});Lje=[{name:"null",impl:ipe},{name:"base",impl:ppe},{name:"canvas",impl:_je}],Dje=[{type:"layout",extensions:PXe},{type:"renderer",extensions:Lje}],Epe={},Cpe={};s(Spe,"setExtension");s(_pe,"getExtension");s(Rje,"setModule");s(Mje,"getModule");rP=s(function(){if(arguments.length===2)return _pe.apply(null,arguments);if(arguments.length===3)return Spe.apply(null,arguments);if(arguments.length===4)return Mje.apply(null,arguments);if(arguments.length===5)return Rje.apply(null,arguments);Jn("Invalid extension access syntax")},"extension");Mx.prototype.extension=rP;Dje.forEach(function(t){t.extensions.forEach(function(e){Spe(t.type,e.name,e.impl)})});Ape=s(function t(){if(!(this instanceof t))return new t;this.length=0},"Stylesheet"),B0=Ape.prototype;B0.instanceString=function(){return"stylesheet"};B0.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};B0.css=function(t,e){var r=this.length-1;if(At(t))this[r].properties.push({name:t,value:e});else if(Er(t))for(var n=t,i=Object.keys(n),a=0;a<i.length;a++){var o=i[a],l=n[o];if(l!=null){var u=La.properties[o]||La.properties[n7(o)];if(u!=null){var h=u.name,f=l;this[r].properties.push({name:h,value:f})}}}return this};B0.style=B0.css;B0.generateStyle=function(t){var e=new La(t);return this.appendToStyle(e)};B0.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],n=r.selector,i=r.properties;t.selector(n);for(var a=0;a<i.length;a++){var o=i[a];t.css(o.name,o.value)}}return t};Ije="3.30.1",Yu=s(function(e){if(e===void 0&&(e={}),Er(e))return new Mx(e);if(At(e))return rP.apply(rP,arguments)},"cytoscape");Yu.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(Yu),t.apply(null,e),this};Yu.warnings=function(t){return o0e(t)};Yu.version=Ije;Yu.stylesheet=Yu.Stylesheet=Ape});var AP=is((Vx,_P)=>{"use strict";s(function(e,r){typeof Vx=="object"&&typeof _P=="object"?_P.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Vx=="object"?Vx.layoutBase=r():e.layoutBase=r()},"webpackUniversalModuleDefinition")(Vx,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 s(r,"__webpack_require__"),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?s(function(){return n.default},"getDefault"):s(function(){return n},"getModuleExports");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(){}s(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_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 o(u,h,f){n.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=u,this.target=h}s(o,"LEdge"),o.prototype=Object.create(n.prototype);for(var l in n)o[l]=n[l];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(u,h){for(var f=this.getOtherEnd(u),d=h.getGraphManager().getRoot();;){if(f.getOwner()==h)return f;if(f.getOwner()==d)break;f=f.getOwner().getParent()}return null},o.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[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))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=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=o},function(t,e,r){"use strict";function n(i){this.vGraphObject=i}s(n,"LGraphObject"),t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),o=r(0),l=r(16),u=r(4);function h(d,p,m,g){m==null&&g==null&&(g=p),n.call(this,g),d.graphManager!=null&&(d=d.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=d,m!=null&&p!=null?this.rect=new a(p.x,p.y,m.width,m.height):this.rect=new a}s(h,"LNode"),h.prototype=Object.create(n.prototype);for(var f in n)h[f]=n[f];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(d){this.rect.width=d},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(d){this.rect.height=d},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(d,p){this.rect.x=d.x,this.rect.y=d.y,this.rect.width=p.width,this.rect.height=p.height},h.prototype.setCenter=function(d,p){this.rect.x=d-this.rect.width/2,this.rect.y=p-this.rect.height/2},h.prototype.setLocation=function(d,p){this.rect.x=d,this.rect.y=p},h.prototype.moveBy=function(d,p){this.rect.x+=d,this.rect.y+=p},h.prototype.getEdgeListToNode=function(d){var p=[],m,g=this;return g.edges.forEach(function(y){if(y.target==d){if(y.source!=g)throw"Incorrect edge source!";p.push(y)}}),p},h.prototype.getEdgesBetween=function(d){var p=[],m,g=this;return g.edges.forEach(function(y){if(!(y.source==g||y.target==g))throw"Incorrect edge source and/or target";(y.target==d||y.source==d)&&p.push(y)}),p},h.prototype.getNeighborsList=function(){var d=new Set,p=this;return p.edges.forEach(function(m){if(m.source==p)d.add(m.target);else{if(m.target!=p)throw"Incorrect incidency!";d.add(m.source)}}),d},h.prototype.withChildren=function(){var d=new Set,p,m;if(d.add(this),this.child!=null)for(var g=this.child.getNodes(),y=0;y<g.length;y++)p=g[y],m=p.withChildren(),m.forEach(function(v){d.add(v)});return d},h.prototype.getNoOfChildren=function(){var d=0,p;if(this.child==null)d=1;else for(var m=this.child.getNodes(),g=0;g<m.length;g++)p=m[g],d+=p.getNoOfChildren();return d==0&&(d=1),d},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var d,p,m=-o.INITIAL_WORLD_BOUNDARY,g=o.INITIAL_WORLD_BOUNDARY;d=o.WORLD_CENTER_X+l.nextDouble()*(g-m)+m;var y=-o.INITIAL_WORLD_BOUNDARY,v=o.INITIAL_WORLD_BOUNDARY;p=o.WORLD_CENTER_Y+l.nextDouble()*(v-y)+y,this.rect.x=d,this.rect.y=p},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var d=this.getChild();if(d.updateBounds(!0),this.rect.x=d.getLeft(),this.rect.y=d.getTop(),this.setWidth(d.getRight()-d.getLeft()),this.setHeight(d.getBottom()-d.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var p=d.getRight()-d.getLeft(),m=d.getBottom()-d.getTop();this.labelWidth>p&&(this.rect.x-=(this.labelWidth-p)/2,this.setWidth(this.labelWidth)),this.labelHeight>m&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-m)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-m),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(d){var p=this.rect.x;p>o.WORLD_BOUNDARY?p=o.WORLD_BOUNDARY:p<-o.WORLD_BOUNDARY&&(p=-o.WORLD_BOUNDARY);var m=this.rect.y;m>o.WORLD_BOUNDARY?m=o.WORLD_BOUNDARY:m<-o.WORLD_BOUNDARY&&(m=-o.WORLD_BOUNDARY);var g=new u(p,m),y=d.inverseTransformPoint(g);this.setLocation(y.x,y.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=h},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)}s(n,"PointD"),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),o=r(6),l=r(3),u=r(1),h=r(13),f=r(12),d=r(11);function p(g,y,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,y!=null&&y instanceof o?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}s(p,"LGraph"),p.prototype=Object.create(n.prototype);for(var m in n)p[m]=n[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(g,y,v){if(y==null&&v==null){var x=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x}else{var b=g;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(y.owner==v.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=v.owner?null:(b.source=y,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),y.edges.push(b),v!=y&&v.edges.push(b),b)}},p.prototype.remove=function(g){var y=g;if(g instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),x,b=v.length,k=0;k<b;k++)x=v[k],x.isInterGraph?this.graphManager.remove(x):x.source.owner.remove(x);var A=this.nodes.indexOf(y);if(A==-1)throw"Node not in owner node list!";this.nodes.splice(A,1)}else if(g instanceof u){var x=g;if(x==null)throw"Edge is null!";if(!(x.source!=null&&x.target!=null))throw"Source and/or target is null!";if(!(x.source.owner!=null&&x.target.owner!=null&&x.source.owner==this&&x.target.owner==this))throw"Source and/or target owner is invalid!";var w=x.source.edges.indexOf(x),T=x.target.edges.indexOf(x);if(!(w>-1&&T>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(w,1),x.target!=x.source&&x.target.edges.splice(T,1);var A=x.source.owner.getEdges().indexOf(x);if(A==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(A,1)}},p.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,y=i.MAX_VALUE,v,x,b,k=this.getNodes(),A=k.length,w=0;w<A;w++){var T=k[w];v=T.getTop(),x=T.getLeft(),g>v&&(g=v),y>x&&(y=x)}return g==i.MAX_VALUE?null:(k[0].getParent().paddingLeft!=null?b=k[0].getParent().paddingLeft:b=this.margin,this.left=y-b,this.top=g-b,new f(this.left,this.top))},p.prototype.updateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,k,A,w,T,C,E=this.nodes,S=E.length,R=0;R<S;R++){var D=E[R];g&&D.child!=null&&D.updateBounds(),k=D.getLeft(),A=D.getRight(),w=D.getTop(),T=D.getBottom(),y>k&&(y=k),v<A&&(v=A),x>w&&(x=w),b<T&&(b=T)}var L=new h(y,x,v-y,b-x);y==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?C=E[0].getParent().paddingLeft:C=this.margin,this.left=L.x-C,this.right=L.x+L.width+C,this.top=L.y-C,this.bottom=L.y+L.height+C},p.calculateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,k,A,w,T,C=g.length,E=0;E<C;E++){var S=g[E];k=S.getLeft(),A=S.getRight(),w=S.getTop(),T=S.getBottom(),y>k&&(y=k),v<A&&(v=A),x>w&&(x=w),b<T&&(b=T)}var R=new h(y,x,v-y,b-x);return R},p.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},p.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},p.prototype.calcEstimatedSize=function(){for(var g=0,y=this.nodes,v=y.length,x=0;x<v;x++){var b=y[x];g+=b.calcEstimatedSize()}return g==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=g/Math.sqrt(this.nodes.length),this.estimatedSize},p.prototype.updateConnected=function(){var g=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new d,v=new Set,x=this.nodes[0],b,k,A=x.withChildren();for(A.forEach(function(R){y.push(R),v.add(R)});y.length!==0;){x=y.shift(),b=x.getEdges();for(var w=b.length,T=0;T<w;T++){var C=b[T];if(k=C.getOtherEndInGraph(x,this),k!=null&&!v.has(k)){var E=k.withChildren();E.forEach(function(R){y.push(R),v.add(R)})}}}if(this.isConnected=!1,v.size>=this.nodes.length){var S=0;v.forEach(function(R){R.owner==g&&S++}),S==this.nodes.length&&(this.isConnected=!0)}},t.exports=p},function(t,e,r){"use strict";var n,i=r(1);function a(o){n=r(5),this.layout=o,this.graphs=[],this.edges=[]}s(a,"LGraphManager"),a.prototype.addRoot=function(){var o=this.layout.newGraph(),l=this.layout.newNode(null),u=this.add(o,l);return this.setRootGraph(u),this.rootGraph},a.prototype.add=function(o,l,u,h,f){if(u==null&&h==null&&f==null){if(o==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(o)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(o),o.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return o.parent=l,l.child=o,o}else{f=u,h=l,u=o;var d=h.getOwner(),p=f.getOwner();if(!(d!=null&&d.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(p!=null&&p.getGraphManager()==this))throw"Target not in this graph mgr!";if(d==p)return u.isInterGraph=!1,d.add(u,h,f);if(u.isInterGraph=!0,u.source=h,u.target=f,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},a.prototype.remove=function(o){if(o instanceof n){var l=o;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(l.getEdges());for(var h,f=u.length,d=0;d<f;d++)h=u[d],l.remove(h);var p=[];p=p.concat(l.getNodes());var m;f=p.length;for(var d=0;d<f;d++)m=p[d],l.remove(m);l==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(l);this.graphs.splice(g,1),l.parent=null}else if(o instanceof i){if(h=o,h==null)throw"Edge is null!";if(!h.isInterGraph)throw"Not an inter-graph edge!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.edges.indexOf(h)!=-1&&h.target.edges.indexOf(h)!=-1))throw"Source and/or target doesn't know this edge!";var g=h.source.edges.indexOf(h);if(h.source.edges.splice(g,1),g=h.target.edges.indexOf(h),h.target.edges.splice(g,1),!(h.source.owner!=null&&h.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(h.source.owner.getGraphManager().edges.indexOf(h)==-1)throw"Not in owner graph manager's edge list!";var g=h.source.owner.getGraphManager().edges.indexOf(h);h.source.owner.getGraphManager().edges.splice(g,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var o=[],l=this.getGraphs(),u=l.length,h=0;h<u;h++)o=o.concat(l[h].getNodes());this.allNodes=o}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){for(var o=[],l=this.getGraphs(),u=l.length,h=0;h<l.length;h++)o=o.concat(l[h].getEdges());o=o.concat(this.edges),this.allEdges=o}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(o){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=o},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(o){if(o.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=o,o.parent==null&&(o.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(o,l){if(!(o!=null&&l!=null))throw"assert failed";if(o==l)return!0;var u=o.getOwner(),h;do{if(h=u.getParent(),h==null)break;if(h==l)return!0;if(u=h.getOwner(),u==null)break}while(!0);u=l.getOwner();do{if(h=u.getParent(),h==null)break;if(h==o)return!0;if(u=h.getOwner(),u==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var o,l,u,h,f,d=this.getAllEdges(),p=d.length,m=0;m<p;m++){if(o=d[m],l=o.source,u=o.target,o.lca=null,o.sourceInLca=l,o.targetInLca=u,l==u){o.lca=l.getOwner();continue}for(h=l.getOwner();o.lca==null;){for(o.targetInLca=u,f=u.getOwner();o.lca==null;){if(f==h){o.lca=f;break}if(f==this.rootGraph)break;if(o.lca!=null)throw"assert failed";o.targetInLca=f.getParent(),f=o.targetInLca.getOwner()}if(h==this.rootGraph)break;o.lca==null&&(o.sourceInLca=h.getParent(),h=o.sourceInLca.getOwner())}if(o.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(o,l){if(o==l)return o.getOwner();var u=o.getOwner();do{if(u==null)break;var h=l.getOwner();do{if(h==null)break;if(h==u)return h;h=h.getParent().getOwner()}while(!0);u=u.getParent().getOwner()}while(!0);return u},a.prototype.calcInclusionTreeDepths=function(o,l){o==null&&l==null&&(o=this.rootGraph,l=1);for(var u,h=o.getNodes(),f=h.length,d=0;d<f;d++)u=h[d],u.inclusionTreeDepth=l,u.child!=null&&this.calcInclusionTreeDepths(u.child,l+1)},a.prototype.includesInvalidEdge=function(){for(var o,l=this.edges.length,u=0;u<l;u++)if(o=this.edges[u],this.isOneAncestorOfOther(o.source,o.target))return!0;return!1},t.exports=a},function(t,e,r){"use strict";var n=r(0);function i(){}s(i,"FDLayoutConstants");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";var n=r(12);function i(){}s(i,"IGeometry"),i.calcSeparationAmount=function(a,o,l,u){if(!a.intersects(o))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(a,o,h),l[0]=Math.min(a.getRight(),o.getRight())-Math.max(a.x,o.x),l[1]=Math.min(a.getBottom(),o.getBottom())-Math.max(a.y,o.y),a.getX()<=o.getX()&&a.getRight()>=o.getRight()?l[0]+=Math.min(o.getX()-a.getX(),a.getRight()-o.getRight()):o.getX()<=a.getX()&&o.getRight()>=a.getRight()&&(l[0]+=Math.min(a.getX()-o.getX(),o.getRight()-a.getRight())),a.getY()<=o.getY()&&a.getBottom()>=o.getBottom()?l[1]+=Math.min(o.getY()-a.getY(),a.getBottom()-o.getBottom()):o.getY()<=a.getY()&&o.getBottom()>=a.getBottom()&&(l[1]+=Math.min(a.getY()-o.getY(),o.getBottom()-a.getBottom()));var f=Math.abs((o.getCenterY()-a.getCenterY())/(o.getCenterX()-a.getCenterX()));o.getCenterY()===a.getCenterY()&&o.getCenterX()===a.getCenterX()&&(f=1);var d=f*l[0],p=l[1]/f;l[0]<p?p=l[0]:d=l[1],l[0]=-1*h[0]*(p/2+u),l[1]=-1*h[1]*(d/2+u)},i.decideDirectionsForOverlappingNodes=function(a,o,l){a.getCenterX()<o.getCenterX()?l[0]=-1:l[0]=1,a.getCenterY()<o.getCenterY()?l[1]=-1:l[1]=1},i.getIntersection2=function(a,o,l){var u=a.getCenterX(),h=a.getCenterY(),f=o.getCenterX(),d=o.getCenterY();if(a.intersects(o))return l[0]=u,l[1]=h,l[2]=f,l[3]=d,!0;var p=a.getX(),m=a.getY(),g=a.getRight(),y=a.getX(),v=a.getBottom(),x=a.getRight(),b=a.getWidthHalf(),k=a.getHeightHalf(),A=o.getX(),w=o.getY(),T=o.getRight(),C=o.getX(),E=o.getBottom(),S=o.getRight(),R=o.getWidthHalf(),D=o.getHeightHalf(),L=!1,P=!1;if(u===f){if(h>d)return l[0]=u,l[1]=m,l[2]=f,l[3]=E,!1;if(h<d)return l[0]=u,l[1]=v,l[2]=f,l[3]=w,!1}else if(h===d){if(u>f)return l[0]=p,l[1]=h,l[2]=T,l[3]=d,!1;if(u<f)return l[0]=g,l[1]=h,l[2]=A,l[3]=d,!1}else{var M=a.height/a.width,F=o.height/o.width,I=(d-h)/(f-u),O=void 0,z=void 0,N=void 0,U=void 0,$=void 0,W=void 0;if(-M===I?u>f?(l[0]=y,l[1]=v,L=!0):(l[0]=g,l[1]=m,L=!0):M===I&&(u>f?(l[0]=p,l[1]=m,L=!0):(l[0]=x,l[1]=v,L=!0)),-F===I?f>u?(l[2]=C,l[3]=E,P=!0):(l[2]=T,l[3]=w,P=!0):F===I&&(f>u?(l[2]=A,l[3]=w,P=!0):(l[2]=S,l[3]=E,P=!0)),L&&P)return!1;if(u>f?h>d?(O=this.getCardinalDirection(M,I,4),z=this.getCardinalDirection(F,I,2)):(O=this.getCardinalDirection(-M,I,3),z=this.getCardinalDirection(-F,I,1)):h>d?(O=this.getCardinalDirection(-M,I,1),z=this.getCardinalDirection(-F,I,3)):(O=this.getCardinalDirection(M,I,2),z=this.getCardinalDirection(F,I,4)),!L)switch(O){case 1:U=m,N=u+-k/I,l[0]=N,l[1]=U;break;case 2:N=x,U=h+b*I,l[0]=N,l[1]=U;break;case 3:U=v,N=u+k/I,l[0]=N,l[1]=U;break;case 4:N=y,U=h+-b*I,l[0]=N,l[1]=U;break}if(!P)switch(z){case 1:W=w,$=f+-D/I,l[2]=$,l[3]=W;break;case 2:$=S,W=d+R*I,l[2]=$,l[3]=W;break;case 3:W=E,$=f+D/I,l[2]=$,l[3]=W;break;case 4:$=C,W=d+-R*I,l[2]=$,l[3]=W;break}}return!1},i.getCardinalDirection=function(a,o,l){return a>o?l:1+l%4},i.getIntersection=function(a,o,l,u){if(u==null)return this.getIntersection2(a,o,l);var h=a.x,f=a.y,d=o.x,p=o.y,m=l.x,g=l.y,y=u.x,v=u.y,x=void 0,b=void 0,k=void 0,A=void 0,w=void 0,T=void 0,C=void 0,E=void 0,S=void 0;return k=p-f,w=h-d,C=d*f-h*p,A=v-g,T=m-y,E=y*g-m*v,S=k*T-A*w,S===0?null:(x=(w*E-T*C)/S,b=(A*C-k*E)/S,new n(x,b))},i.angleOfVector=function(a,o,l,u){var h=void 0;return a!==l?(h=Math.atan((u-o)/(l-a)),l<a?h+=Math.PI:u<o&&(h+=this.TWO_PI)):u<o?h=this.ONE_AND_HALF_PI:h=this.HALF_PI,h},i.doIntersect=function(a,o,l,u){var h=a.x,f=a.y,d=o.x,p=o.y,m=l.x,g=l.y,y=u.x,v=u.y,x=(d-h)*(v-g)-(y-m)*(p-f);if(x===0)return!1;var b=((v-g)*(y-h)+(m-y)*(v-f))/x,k=((f-p)*(y-h)+(d-h)*(v-f))/x;return 0<b&&b<1&&0<k&&k<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,r){"use strict";function n(){}s(n,"IMath"),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(){}s(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function h(f,d){for(var p=0;p<d.length;p++){var m=d[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(f,m.key,m)}}return s(h,"defineProperties"),function(f,d,p){return d&&h(f.prototype,d),p&&h(f,p),f}}();function i(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}s(i,"_classCallCheck");var a=s(function(f){return{value:f,next:null,prev:null}},"nodeFrom"),o=s(function(f,d,p,m){return f!==null?f.next=d:m.head=d,p!==null?p.prev=d:m.tail=d,d.prev=f,d.next=p,m.length++,d},"add"),l=s(function(f,d){var p=f.prev,m=f.next;return p!==null?p.next=m:d.head=m,m!==null?m.prev=p:d.tail=p,f.prev=f.next=null,d.length--,f},"_remove"),u=function(){function h(f){var d=this;i(this,h),this.length=0,this.head=null,this.tail=null,f?.forEach(function(p){return d.push(p)})}return s(h,"LinkedList"),n(h,[{key:"size",value:s(function(){return this.length},"size")},{key:"insertBefore",value:s(function(d,p){return o(p.prev,a(d),p,this)},"insertBefore")},{key:"insertAfter",value:s(function(d,p){return o(p,a(d),p.next,this)},"insertAfter")},{key:"insertNodeBefore",value:s(function(d,p){return o(p.prev,d,p,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:s(function(d,p){return o(p,d,p.next,this)},"insertNodeAfter")},{key:"push",value:s(function(d){return o(this.tail,a(d),null,this)},"push")},{key:"unshift",value:s(function(d){return o(null,a(d),this.head,this)},"unshift")},{key:"remove",value:s(function(d){return l(d,this)},"remove")},{key:"pop",value:s(function(){return l(this.tail,this).value},"pop")},{key:"popNode",value:s(function(){return l(this.tail,this)},"popNode")},{key:"shift",value:s(function(){return l(this.head,this).value},"shift")},{key:"shiftNode",value:s(function(){return l(this.head,this)},"shiftNode")},{key:"get_object_at",value:s(function(d){if(d<=this.length()){for(var p=1,m=this.head;p<d;)m=m.next,p++;return m.value}},"get_object_at")},{key:"set_object_at",value:s(function(d,p){if(d<=this.length()){for(var m=1,g=this.head;m<d;)g=g.next,m++;g.value=p}},"set_object_at")}]),h}();t.exports=u},function(t,e,r){"use strict";function n(i,a,o){this.x=null,this.y=null,i==null&&a==null&&o==null?(this.x=0,this.y=0):typeof i=="number"&&typeof a=="number"&&o==null?(this.x=i,this.y=a):i.constructor.name=="Point"&&a==null&&o==null&&(o=i,this.x=o.x,this.y=o.y)}s(n,"Point"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(i,a,o){i.constructor.name=="Point"&&a==null&&o==null?(o=i,this.setLocation(o.x,o.y)):typeof i=="number"&&typeof a=="number"&&o==null&&(parseInt(i)==i&&parseInt(a)==a?this.move(i,a):(this.x=Math.floor(i+.5),this.y=Math.floor(a+.5)))},n.prototype.move=function(i,a){this.x=i,this.y=a},n.prototype.translate=function(i,a){this.x+=i,this.y+=a},n.prototype.equals=function(i){if(i.constructor.name=="Point"){var a=i;return this.x==a.x&&this.y==a.y}return this==i},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,r){"use strict";function n(i,a,o,l){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&a!=null&&o!=null&&l!=null&&(this.x=i,this.y=a,this.width=o,this.height=l)}s(n,"RectangleD"),n.prototype.getX=function(){return this.x},n.prototype.setX=function(i){this.x=i},n.prototype.getY=function(){return this.y},n.prototype.setY=function(i){this.y=i},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,r){"use strict";var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function i(){}s(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(a){return i.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=i.getString(),i.lastID++),a.uniqueID)},i.getString=function(a){return a==null&&(a=i.lastID),"Object#"+a},i.isPrimitive=function(a){var o=typeof a>"u"?"undefined":n(a);return a==null||o!="object"&&o!="function"},t.exports=i},function(t,e,r){"use strict";function n(m){if(Array.isArray(m)){for(var g=0,y=Array(m.length);g<m.length;g++)y[g]=m[g];return y}else return Array.from(m)}s(n,"_toConsumableArray");var i=r(0),a=r(6),o=r(3),l=r(1),u=r(5),h=r(4),f=r(17),d=r(27);function p(m){d.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,m!=null&&(this.isRemoteUse=m)}s(p,"Layout"),p.RANDOM_SEED=1,p.prototype=Object.create(d.prototype),p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},p.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},p.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},p.prototype.newGraphManager=function(){var m=new a(this);return this.graphManager=m,m},p.prototype.newGraph=function(m){return new u(null,this.graphManager,m)},p.prototype.newNode=function(m){return new o(this.graphManager,m)},p.prototype.newEdge=function(m){return new l(null,null,m)},p.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},p.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var m;return this.checkLayoutSuccess()?m=!1:m=this.layout(),i.ANIMATE==="during"?!1:(m&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,m)},p.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},p.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var m,g=this.graphManager.getAllEdges(),y=0;y<g.length;y++)m=g[y];for(var v,x=this.graphManager.getRoot().getNodes(),y=0;y<x.length;y++)v=x[y];this.update(this.graphManager.getRoot())}},p.prototype.update=function(m){if(m==null)this.update2();else if(m instanceof o){var g=m;if(g.getChild()!=null)for(var y=g.getChild().getNodes(),v=0;v<y.length;v++)update(y[v]);if(g.vGraphObject!=null){var x=g.vGraphObject;x.update(g)}}else if(m instanceof l){var b=m;if(b.vGraphObject!=null){var k=b.vGraphObject;k.update(b)}}else if(m instanceof u){var A=m;if(A.vGraphObject!=null){var w=A.vGraphObject;w.update(A)}}},p.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},p.prototype.transform=function(m){if(m==null)this.transform(new h(0,0));else{var g=new f,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){g.setWorldOrgX(m.x),g.setWorldOrgY(m.y),g.setDeviceOrgX(y.x),g.setDeviceOrgY(y.y);for(var v=this.getAllNodes(),x,b=0;b<v.length;b++)x=v[b],x.transform(g)}}},p.prototype.positionNodesRandomly=function(m){if(m==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,y,v=m.getNodes(),x=0;x<v.length;x++)g=v[x],y=g.getChild(),y==null||y.getNodes().length==0?g.scatter():(this.positionNodesRandomly(y),g.updateBounds())},p.prototype.getFlatForest=function(){for(var m=[],g=!0,y=this.graphManager.getRoot().getNodes(),v=!0,x=0;x<y.length;x++)y[x].getChild()!=null&&(v=!1);if(!v)return m;var b=new Set,k=[],A=new Map,w=[];for(w=w.concat(y);w.length>0&&g;){for(k.push(w[0]);k.length>0&&g;){var T=k[0];k.splice(0,1),b.add(T);for(var C=T.getEdges(),x=0;x<C.length;x++){var E=C[x].getOtherEnd(T);if(A.get(T)!=E)if(!b.has(E))k.push(E),A.set(E,T);else{g=!1;break}}}if(!g)m=[];else{var S=[].concat(n(b));m.push(S);for(var x=0;x<S.length;x++){var R=S[x],D=w.indexOf(R);D>-1&&w.splice(D,1)}b=new Set,A=new Map}}return m},p.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],y=m.source,v=this.graphManager.calcLowestCommonAncestor(m.source,m.target),x=0;x<m.bendpoints.length;x++){var b=this.newNode(null);b.setRect(new Point(0,0),new Dimension(1,1)),v.add(b);var k=this.newEdge(null);this.graphManager.add(k,y,b),g.add(b),y=b}var k=this.newEdge(null);return this.graphManager.add(k,y,m.target),this.edgeToDummyNodes.set(m,g),m.isInterGraph()?this.graphManager.remove(m):v.remove(m),g},p.prototype.createBendpointsFromDummyNodes=function(){var m=[];m=m.concat(this.graphManager.getAllEdges()),m=[].concat(n(this.edgeToDummyNodes.keys())).concat(m);for(var g=0;g<m.length;g++){var y=m[g];if(y.bendpoints.length>0){for(var v=this.edgeToDummyNodes.get(y),x=0;x<v.length;x++){var b=v[x],k=new h(b.getCenterX(),b.getCenterY()),A=y.bendpoints.get(x);A.x=k.x,A.y=k.y,b.getOwner().remove(b)}this.graphManager.add(y,y.source,y.target)}}},p.transform=function(m,g,y,v){if(y!=null&&v!=null){var x=g;if(m<=50){var b=g/y;x-=(g-b)/50*(50-m)}else{var k=g*v;x+=(k-g)/50*(m-50)}return x}else{var A,w;return m<=50?(A=9*g/500,w=g/10):(A=9*g/50,w=-8*g),A*m+w}},p.findCenterOfTree=function(m){var g=[];g=g.concat(m);var y=[],v=new Map,x=!1,b=null;(g.length==1||g.length==2)&&(x=!0,b=g[0]);for(var k=0;k<g.length;k++){var A=g[k],w=A.getNeighborsList().size;v.set(A,A.getNeighborsList().size),w==1&&y.push(A)}var T=[];for(T=T.concat(y);!x;){var C=[];C=C.concat(T),T=[];for(var k=0;k<g.length;k++){var A=g[k],E=g.indexOf(A);E>=0&&g.splice(E,1);var S=A.getNeighborsList();S.forEach(function(L){if(y.indexOf(L)<0){var P=v.get(L),M=P-1;M==1&&T.push(L),v.set(L,M)}})}y=y.concat(T),(g.length==1||g.length==2)&&(x=!0,b=g[0])}return b},p.prototype.setGraphManager=function(m){this.graphManager=m},t.exports=p},function(t,e,r){"use strict";function n(){}s(n,"RandomSeed"),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,o){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s(i,"Transform"),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 o=0,l=this.lworldExtX;return l!=0&&(o=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/l),o},i.prototype.transformY=function(a){var o=0,l=this.lworldExtY;return l!=0&&(o=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/l),o},i.prototype.inverseTransformX=function(a){var o=0,l=this.ldeviceExtX;return l!=0&&(o=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/l),o},i.prototype.inverseTransformY=function(a){var o=0,l=this.ldeviceExtY;return l!=0&&(o=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/l),o},i.prototype.inverseTransformPoint=function(a){var o=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return o},t.exports=i},function(t,e,r){"use strict";function n(d){if(Array.isArray(d)){for(var p=0,m=Array(d.length);p<d.length;p++)m[p]=d[p];return m}else return Array.from(d)}s(n,"_toConsumableArray");var i=r(15),a=r(7),o=r(0),l=r(8),u=r(9);function h(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}s(h,"FDLayout"),h.prototype=Object.create(i.prototype);for(var f in i)h[f]=i[f];h.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var d,p,m,g,y,v,x=this.getGraphManager().getAllEdges(),b=0;b<x.length;b++)d=x[b],d.idealLength=this.idealEdgeLength,d.isInterGraph&&(m=d.getSource(),g=d.getTarget(),y=d.getSourceInLca().getEstimatedSize(),v=d.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(d.idealLength+=y+v-2*o.SIMPLE_NODE_SIZE),p=d.getLca().getInclusionTreeDepth(),d.idealLength+=a.DEFAULT_EDGE_LENGTH*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(m.getInclusionTreeDepth()+g.getInclusionTreeDepth()-2*p))},h.prototype.initSpringEmbedder=function(){var d=this.getAllNodes().length;this.incremental?(d>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(d-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):(d>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(d-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()},h.prototype.calcSpringForces=function(){for(var d=this.getAllEdges(),p,m=0;m<d.length;m++)p=d[m],this.calcSpringForce(p,p.idealLength)},h.prototype.calcRepulsionForces=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m,g,y,v,x=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&d&&this.updateGrid(),b=new Set,m=0;m<x.length;m++)y=x[m],this.calculateRepulsionForceOfANode(y,b,d,p),b.add(y);else for(m=0;m<x.length;m++)for(y=x[m],g=m+1;g<x.length;g++)v=x[g],y.getOwner()==v.getOwner()&&this.calcRepulsionForce(y,v)},h.prototype.calcGravitationalForces=function(){for(var d,p=this.getAllNodesToApplyGravitation(),m=0;m<p.length;m++)d=p[m],this.calcGravitationalForce(d)},h.prototype.moveNodes=function(){for(var d=this.getAllNodes(),p,m=0;m<d.length;m++)p=d[m],p.move()},h.prototype.calcSpringForce=function(d,p){var m=d.getSource(),g=d.getTarget(),y,v,x,b;if(this.uniformLeafNodeSizes&&m.getChild()==null&&g.getChild()==null)d.updateLengthSimple();else if(d.updateLength(),d.isOverlapingSourceAndTarget)return;y=d.getLength(),y!=0&&(v=this.springConstant*(y-p),x=v*(d.lengthX/y),b=v*(d.lengthY/y),m.springForceX+=x,m.springForceY+=b,g.springForceX-=x,g.springForceY-=b)},h.prototype.calcRepulsionForce=function(d,p){var m=d.getRect(),g=p.getRect(),y=new Array(2),v=new Array(4),x,b,k,A,w,T,C;if(m.intersects(g)){l.calcSeparationAmount(m,g,y,a.DEFAULT_EDGE_LENGTH/2),T=2*y[0],C=2*y[1];var E=d.noOfChildren*p.noOfChildren/(d.noOfChildren+p.noOfChildren);d.repulsionForceX-=E*T,d.repulsionForceY-=E*C,p.repulsionForceX+=E*T,p.repulsionForceY+=E*C}else this.uniformLeafNodeSizes&&d.getChild()==null&&p.getChild()==null?(x=g.getCenterX()-m.getCenterX(),b=g.getCenterY()-m.getCenterY()):(l.getIntersection(m,g,v),x=v[2]-v[0],b=v[3]-v[1]),Math.abs(x)<a.MIN_REPULSION_DIST&&(x=u.sign(x)*a.MIN_REPULSION_DIST),Math.abs(b)<a.MIN_REPULSION_DIST&&(b=u.sign(b)*a.MIN_REPULSION_DIST),k=x*x+b*b,A=Math.sqrt(k),w=this.repulsionConstant*d.noOfChildren*p.noOfChildren/k,T=w*x/A,C=w*b/A,d.repulsionForceX-=T,d.repulsionForceY-=C,p.repulsionForceX+=T,p.repulsionForceY+=C},h.prototype.calcGravitationalForce=function(d){var p,m,g,y,v,x,b,k;p=d.getOwner(),m=(p.getRight()+p.getLeft())/2,g=(p.getTop()+p.getBottom())/2,y=d.getCenterX()-m,v=d.getCenterY()-g,x=Math.abs(y)+d.getWidth()/2,b=Math.abs(v)+d.getHeight()/2,d.getOwner()==this.graphManager.getRoot()?(k=p.getEstimatedSize()*this.gravityRangeFactor,(x>k||b>k)&&(d.gravitationForceX=-this.gravityConstant*y,d.gravitationForceY=-this.gravityConstant*v)):(k=p.getEstimatedSize()*this.compoundGravityRangeFactor,(x>k||b>k)&&(d.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,d.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},h.prototype.isConverged=function(){var d,p=!1;return this.totalIterations>this.maxIterations/3&&(p=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),d=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,d||p},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var d,p=this.graphManager.getAllNodes(),m=0;m<p.length;m++)d=p[m],d.noOfChildren=d.getNoOfChildren()},h.prototype.calcGrid=function(d){var p=0,m=0;p=parseInt(Math.ceil((d.getRight()-d.getLeft())/this.repulsionRange)),m=parseInt(Math.ceil((d.getBottom()-d.getTop())/this.repulsionRange));for(var g=new Array(p),y=0;y<p;y++)g[y]=new Array(m);for(var y=0;y<p;y++)for(var v=0;v<m;v++)g[y][v]=new Array;return g},h.prototype.addNodeToGrid=function(d,p,m){var g=0,y=0,v=0,x=0;g=parseInt(Math.floor((d.getRect().x-p)/this.repulsionRange)),y=parseInt(Math.floor((d.getRect().width+d.getRect().x-p)/this.repulsionRange)),v=parseInt(Math.floor((d.getRect().y-m)/this.repulsionRange)),x=parseInt(Math.floor((d.getRect().height+d.getRect().y-m)/this.repulsionRange));for(var b=g;b<=y;b++)for(var k=v;k<=x;k++)this.grid[b][k].push(d),d.setGridCoordinates(g,y,v,x)},h.prototype.updateGrid=function(){var d,p,m=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),d=0;d<m.length;d++)p=m[d],this.addNodeToGrid(p,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},h.prototype.calculateRepulsionForceOfANode=function(d,p,m,g){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&m||g){var y=new Set;d.surrounding=new Array;for(var v,x=this.grid,b=d.startX-1;b<d.finishX+2;b++)for(var k=d.startY-1;k<d.finishY+2;k++)if(!(b<0||k<0||b>=x.length||k>=x[0].length)){for(var A=0;A<x[b][k].length;A++)if(v=x[b][k][A],!(d.getOwner()!=v.getOwner()||d==v)&&!p.has(v)&&!y.has(v)){var w=Math.abs(d.getCenterX()-v.getCenterX())-(d.getWidth()/2+v.getWidth()/2),T=Math.abs(d.getCenterY()-v.getCenterY())-(d.getHeight()/2+v.getHeight()/2);w<=this.repulsionRange&&T<=this.repulsionRange&&y.add(v)}}d.surrounding=[].concat(n(y))}for(b=0;b<d.surrounding.length;b++)this.calcRepulsionForce(d,d.surrounding[b])},h.prototype.calcRepulsionRange=function(){return 0},t.exports=h},function(t,e,r){"use strict";var n=r(1),i=r(7);function a(l,u,h){n.call(this,l,u,h),this.idealLength=i.DEFAULT_EDGE_LENGTH}s(a,"FDLayoutEdge"),a.prototype=Object.create(n.prototype);for(var o in n)a[o]=n[o];t.exports=a},function(t,e,r){"use strict";var n=r(3);function i(o,l,u,h){n.call(this,o,l,u,h),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}s(i,"FDLayoutNode"),i.prototype=Object.create(n.prototype);for(var a in n)i[a]=n[a];i.prototype.setGridCoordinates=function(o,l,u,h){this.startX=o,this.finishX=l,this.startY=u,this.finishY=h},t.exports=i},function(t,e,r){"use strict";function n(i,a){this.width=0,this.height=0,i!==null&&a!==null&&(this.height=a,this.width=i)}s(n,"DimensionD"),n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},t.exports=n},function(t,e,r){"use strict";var n=r(14);function i(){this.map={},this.keys=[]}s(i,"HashMap"),i.prototype.put=function(a,o){var l=n.createID(a);this.contains(l)||(this.map[l]=o,this.keys.push(a))},i.prototype.contains=function(a){var o=n.createID(a);return this.map[a]!=null},i.prototype.get=function(a){var o=n.createID(a);return this.map[o]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,r){"use strict";var n=r(14);function i(){this.set={}}s(i,"HashSet"),i.prototype.add=function(a){var o=n.createID(a);this.contains(o)||(this.set[o]=a)},i.prototype.remove=function(a){delete this.set[n.createID(a)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(a){return this.set[n.createID(a)]==a},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(a){for(var o=Object.keys(this.set),l=o.length,u=0;u<l;u++)a.push(this.set[o[u]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(a){for(var o=a.length,l=0;l<o;l++){var u=a[l];this.add(u)}},t.exports=i},function(t,e,r){"use strict";var n=function(){function l(u,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(u,d.key,d)}}return s(l,"defineProperties"),function(u,h,f){return h&&l(u.prototype,h),f&&l(u,f),u}}();function i(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}s(i,"_classCallCheck");var a=r(11),o=function(){function l(u,h){i(this,l),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var f=void 0;u instanceof a?f=u.size():f=u.length,this._quicksort(u,0,f-1)}return s(l,"Quicksort"),n(l,[{key:"_quicksort",value:s(function(h,f,d){if(f<d){var p=this._partition(h,f,d);this._quicksort(h,f,p),this._quicksort(h,p+1,d)}},"_quicksort")},{key:"_partition",value:s(function(h,f,d){for(var p=this._get(h,f),m=f,g=d;;){for(;this.compareFunction(p,this._get(h,g));)g--;for(;this.compareFunction(this._get(h,m),p);)m++;if(m<g)this._swap(h,m,g),m++,g--;else return g}},"_partition")},{key:"_get",value:s(function(h,f){return h instanceof a?h.get_object_at(f):h[f]},"_get")},{key:"_set",value:s(function(h,f,d){h instanceof a?h.set_object_at(f,d):h[f]=d},"_set")},{key:"_swap",value:s(function(h,f,d){var p=this._get(h,f);this._set(h,f,this._get(h,d)),this._set(h,d,p)},"_swap")},{key:"_defaultCompareFunction",value:s(function(h,f){return f>h},"_defaultCompareFunction")}]),l}();t.exports=o},function(t,e,r){"use strict";var n=function(){function o(l,u){for(var h=0;h<u.length;h++){var f=u[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f)}}return s(o,"defineProperties"),function(l,u,h){return u&&o(l.prototype,u),h&&o(l,h),l}}();function i(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")}s(i,"_classCallCheck");var a=function(){function o(l,u){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,o),this.sequence1=l,this.sequence2=u,this.match_score=h,this.mismatch_penalty=f,this.gap_penalty=d,this.iMax=l.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.grid[p]=new Array(this.jMax);for(var m=0;m<this.jMax;m++)this.grid[p][m]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.tracebackGrid[g][y]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return s(o,"NeedlemanWunsch"),n(o,[{key:"getScore",value:s(function(){return this.score},"getScore")},{key:"getAlignments",value:s(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:s(function(){for(var u=1;u<this.jMax;u++)this.grid[0][u]=this.grid[0][u-1]+this.gap_penalty,this.tracebackGrid[0][u]=[!1,!1,!0];for(var h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var f=1;f<this.iMax;f++)for(var d=1;d<this.jMax;d++){var p=void 0;this.sequence1[f-1]===this.sequence2[d-1]?p=this.grid[f-1][d-1]+this.match_score:p=this.grid[f-1][d-1]+this.mismatch_penalty;var m=this.grid[f-1][d]+this.gap_penalty,g=this.grid[f][d-1]+this.gap_penalty,y=[p,m,g],v=this.arrayAllMaxIndexes(y);this.grid[f][d]=y[v[0]],this.tracebackGrid[f][d]=[v.includes(0),v.includes(1),v.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:s(function(){var u=[];for(u.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});u[0];){var h=u[0],f=this.tracebackGrid[h.pos[0]][h.pos[1]];f[0]&&u.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),f[1]&&u.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),f[2]&&u.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),u.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:s(function(u,h){for(var f=[],d=-1;(d=u.indexOf(h,d+1))!==-1;)f.push(d);return f},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:s(function(u){return this.getAllIndexes(u,Math.max.apply(null,u))},"arrayAllMaxIndexes")}]),o}();t.exports=a},function(t,e,r){"use strict";var n=s(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(7),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(4),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(24),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(5),n.LEdge=r(1),n.LGraphManager=r(6),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(25),t.exports=n},function(t,e,r){"use strict";function n(){this.listeners=[]}s(n,"Emitter");var i=n.prototype;i.addListener=function(a,o){this.listeners.push({event:a,callback:o})},i.removeListener=function(a,o){for(var l=this.listeners.length;l>=0;l--){var u=this.listeners[l];u.event===a&&u.callback===o&&this.listeners.splice(l,1)}},i.emit=function(a,o){for(var l=0;l<this.listeners.length;l++){var u=this.listeners[l];a===u.event&&u.callback(o)}},t.exports=n}])})});var DP=is((Ux,LP)=>{"use strict";s(function(e,r){typeof Ux=="object"&&typeof LP=="object"?LP.exports=r(AP()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof Ux=="object"?Ux.coseBase=r(AP()):e.coseBase=r(e.layoutBase)},"webpackUniversalModuleDefinition")(Ux,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 s(n,"__webpack_require__"),n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,o){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:o})},n.n=function(i){var a=i&&i.__esModule?s(function(){return i.default},"getDefault"):s(function(){return i},"getModuleExports");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(){}s(a,"CoSEConstants");for(var o in i)a[o]=i[o];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(l,u,h){i.call(this,l,u,h)}s(a,"CoSEEdge"),a.prototype=Object.create(i.prototype);for(var o in i)a[o]=i[o];e.exports=a},function(e,r,n){"use strict";var i=n(0).LGraph;function a(l,u,h){i.call(this,l,u,h)}s(a,"CoSEGraph"),a.prototype=Object.create(i.prototype);for(var o in i)a[o]=i[o];e.exports=a},function(e,r,n){"use strict";var i=n(0).LGraphManager;function a(l){i.call(this,l)}s(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype);for(var o in i)a[o]=i[o];e.exports=a},function(e,r,n){"use strict";var i=n(0).FDLayoutNode,a=n(0).IMath;function o(u,h,f,d){i.call(this,u,h,f,d)}s(o,"CoSENode"),o.prototype=Object.create(i.prototype);for(var l in i)o[l]=i[l];o.prototype.move=function(){var u=this.graphManager.getLayout();this.displacementX=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.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),u.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},o.prototype.propogateDisplacementToChildren=function(u,h){for(var f=this.getChild().getNodes(),d,p=0;p<f.length;p++)d=f[p],d.getChild()==null?(d.moveBy(u,h),d.displacementX+=u,d.displacementY+=h):d.propogateDisplacementToChildren(u,h)},o.prototype.setPred1=function(u){this.pred1=u},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(u){this.next=u},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(u){this.processed=u},o.prototype.isProcessed=function(){return processed},e.exports=o},function(e,r,n){"use strict";var i=n(0).FDLayout,a=n(4),o=n(3),l=n(5),u=n(2),h=n(1),f=n(0).FDLayoutConstants,d=n(0).LayoutConstants,p=n(0).Point,m=n(0).PointD,g=n(0).Layout,y=n(0).Integer,v=n(0).IGeometry,x=n(0).LGraph,b=n(0).Transform;function k(){i.call(this),this.toBeTiled={}}s(k,"CoSELayout"),k.prototype=Object.create(i.prototype);for(var A in i)k[A]=i[A];k.prototype.newGraphManager=function(){var w=new a(this);return this.graphManager=w,w},k.prototype.newGraph=function(w){return new o(null,this.graphManager,w)},k.prototype.newNode=function(w){return new l(this.graphManager,w)},k.prototype.newEdge=function(w){return new u(null,null,w)},k.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=f.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=f.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=f.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},k.prototype.layout=function(){var w=d.DEFAULT_CREATE_BENDS_AS_NEEDED;return w&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},k.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(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var T=new Set(this.getAllNodes()),C=this.nodesWithGravity.filter(function(R){return T.has(R)});this.graphManager.setAllNodesToApplyGravitation(C)}}else{var w=this.getFlatForest();if(w.length>0)this.positionNodesRadially(w);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var T=new Set(this.getAllNodes()),C=this.nodesWithGravity.filter(function(E){return T.has(E)});this.graphManager.setAllNodesToApplyGravitation(C),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},k.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%f.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 w=new Set(this.getAllNodes()),T=this.nodesWithGravity.filter(function(S){return w.has(S)});this.graphManager.setAllNodesToApplyGravitation(T),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=f.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=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var C=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(C,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},k.prototype.getPositionsData=function(){for(var w=this.graphManager.getAllNodes(),T={},C=0;C<w.length;C++){var E=w[C].rect,S=w[C].id;T[S]={id:S,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return T},k.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var w=!1;if(f.ANIMATE==="during")this.emit("layoutstarted");else{for(;!w;)w=this.tick();this.graphManager.updateBounds()}},k.prototype.calculateNodesToApplyGravitationTo=function(){var w=[],T,C=this.graphManager.getGraphs(),E=C.length,S;for(S=0;S<E;S++)T=C[S],T.updateConnected(),T.isConnected||(w=w.concat(T.getNodes()));return w},k.prototype.createBendpoints=function(){var w=[];w=w.concat(this.graphManager.getAllEdges());var T=new Set,C;for(C=0;C<w.length;C++){var E=w[C];if(!T.has(E)){var S=E.getSource(),R=E.getTarget();if(S==R)E.getBendpoints().push(new m),E.getBendpoints().push(new m),this.createDummyNodesForBendpoints(E),T.add(E);else{var D=[];if(D=D.concat(S.getEdgeListToNode(R)),D=D.concat(R.getEdgeListToNode(S)),!T.has(D[0])){if(D.length>1){var L;for(L=0;L<D.length;L++){var P=D[L];P.getBendpoints().push(new m),this.createDummyNodesForBendpoints(P)}}D.forEach(function(M){T.add(M)})}}}if(T.size==w.length)break}},k.prototype.positionNodesRadially=function(w){for(var T=new p(0,0),C=Math.ceil(Math.sqrt(w.length)),E=0,S=0,R=0,D=new m(0,0),L=0;L<w.length;L++){L%C==0&&(R=0,S=E,L!=0&&(S+=h.DEFAULT_COMPONENT_SEPERATION),E=0);var P=w[L],M=g.findCenterOfTree(P);T.x=R,T.y=S,D=k.radialLayout(P,M,T),D.y>E&&(E=Math.floor(D.y)),R=Math.floor(D.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(d.WORLD_CENTER_X-D.x/2,d.WORLD_CENTER_Y-D.y/2))},k.radialLayout=function(w,T,C){var E=Math.max(this.maxDiagonalInTree(w),h.DEFAULT_RADIAL_SEPARATION);k.branchRadialLayout(T,null,0,359,0,E);var S=x.calculateBounds(w),R=new b;R.setDeviceOrgX(S.getMinX()),R.setDeviceOrgY(S.getMinY()),R.setWorldOrgX(C.x),R.setWorldOrgY(C.y);for(var D=0;D<w.length;D++){var L=w[D];L.transform(R)}var P=new m(S.getMaxX(),S.getMaxY());return R.inverseTransformPoint(P)},k.branchRadialLayout=function(w,T,C,E,S,R){var D=(E-C+1)/2;D<0&&(D+=180);var L=(D+C)%360,P=L*v.TWO_PI/360,M=Math.cos(P),F=S*Math.cos(P),I=S*Math.sin(P);w.setCenter(F,I);var O=[];O=O.concat(w.getEdges());var z=O.length;T!=null&&z--;for(var N=0,U=O.length,$,W=w.getEdgesBetween(T);W.length>1;){var ee=W[0];W.splice(0,1);var te=O.indexOf(ee);te>=0&&O.splice(te,1),U--,z--}T!=null?$=(O.indexOf(W[0])+1)%U:$=0;for(var ce=Math.abs(E-C)/z,Z=$;N!=z;Z=++Z%U){var fe=O[Z].getOtherEnd(w);if(fe!=T){var ne=(C+N*ce)%360,H=(ne+ce)%360;k.branchRadialLayout(fe,w,ne,H,S+R,R),N++}}},k.maxDiagonalInTree=function(w){for(var T=y.MIN_VALUE,C=0;C<w.length;C++){var E=w[C],S=E.getDiagonal();S>T&&(T=S)}return T},k.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},k.prototype.groupZeroDegreeMembers=function(){var w=this,T={};this.memberGroups={},this.idToDummyNode={};for(var C=[],E=this.graphManager.getAllNodes(),S=0;S<E.length;S++){var R=E[S],D=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(D.id==null||!this.getToBeTiled(D))&&C.push(R)}for(var S=0;S<C.length;S++){var R=C[S],L=R.getParent().id;typeof T[L]>"u"&&(T[L]=[]),T[L]=T[L].concat(R)}Object.keys(T).forEach(function(P){if(T[P].length>1){var M="DummyCompound_"+P;w.memberGroups[M]=T[P];var F=T[P][0].getParent(),I=new l(w.graphManager);I.id=M,I.paddingLeft=F.paddingLeft||0,I.paddingRight=F.paddingRight||0,I.paddingBottom=F.paddingBottom||0,I.paddingTop=F.paddingTop||0,w.idToDummyNode[M]=I;var O=w.getGraphManager().add(w.newGraph(),I),z=F.getChild();z.add(I);for(var N=0;N<T[P].length;N++){var U=T[P][N];z.remove(U),O.add(U)}}})},k.prototype.clearCompounds=function(){var w={},T={};this.performDFSOnCompounds();for(var C=0;C<this.compoundOrder.length;C++)T[this.compoundOrder[C].id]=this.compoundOrder[C],w[this.compoundOrder[C].id]=[].concat(this.compoundOrder[C].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[C].getChild()),this.compoundOrder[C].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(w,T)},k.prototype.clearZeroDegreeMembers=function(){var w=this,T=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(C){var E=w.idToDummyNode[C];T[C]=w.tileNodes(w.memberGroups[C],E.paddingLeft+E.paddingRight),E.rect.width=T[C].width,E.rect.height=T[C].height})},k.prototype.repopulateCompounds=function(){for(var w=this.compoundOrder.length-1;w>=0;w--){var T=this.compoundOrder[w],C=T.id,E=T.paddingLeft,S=T.paddingTop;this.adjustLocations(this.tiledMemberPack[C],T.rect.x,T.rect.y,E,S)}},k.prototype.repopulateZeroDegreeMembers=function(){var w=this,T=this.tiledZeroDegreePack;Object.keys(T).forEach(function(C){var E=w.idToDummyNode[C],S=E.paddingLeft,R=E.paddingTop;w.adjustLocations(T[C],E.rect.x,E.rect.y,S,R)})},k.prototype.getToBeTiled=function(w){var T=w.id;if(this.toBeTiled[T]!=null)return this.toBeTiled[T];var C=w.getChild();if(C==null)return this.toBeTiled[T]=!1,!1;for(var E=C.getNodes(),S=0;S<E.length;S++){var R=E[S];if(this.getNodeDegree(R)>0)return this.toBeTiled[T]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[T]=!1,!1}return this.toBeTiled[T]=!0,!0},k.prototype.getNodeDegree=function(w){for(var T=w.id,C=w.getEdges(),E=0,S=0;S<C.length;S++){var R=C[S];R.getSource().id!==R.getTarget().id&&(E=E+1)}return E},k.prototype.getNodeDegreeWithChildren=function(w){var T=this.getNodeDegree(w);if(w.getChild()==null)return T;for(var C=w.getChild().getNodes(),E=0;E<C.length;E++){var S=C[E];T+=this.getNodeDegreeWithChildren(S)}return T},k.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},k.prototype.fillCompexOrderByDFS=function(w){for(var T=0;T<w.length;T++){var C=w[T];C.getChild()!=null&&this.fillCompexOrderByDFS(C.getChild().getNodes()),this.getToBeTiled(C)&&this.compoundOrder.push(C)}},k.prototype.adjustLocations=function(w,T,C,E,S){T+=E,C+=S;for(var R=T,D=0;D<w.rows.length;D++){var L=w.rows[D];T=R;for(var P=0,M=0;M<L.length;M++){var F=L[M];F.rect.x=T,F.rect.y=C,T+=F.rect.width+w.horizontalPadding,F.rect.height>P&&(P=F.rect.height)}C+=P+w.verticalPadding}},k.prototype.tileCompoundMembers=function(w,T){var C=this;this.tiledMemberPack=[],Object.keys(w).forEach(function(E){var S=T[E];C.tiledMemberPack[E]=C.tileNodes(w[E],S.paddingLeft+S.paddingRight),S.rect.width=C.tiledMemberPack[E].width,S.rect.height=C.tiledMemberPack[E].height})},k.prototype.tileNodes=function(w,T){var C=h.TILING_PADDING_VERTICAL,E=h.TILING_PADDING_HORIZONTAL,S={rows:[],rowWidth:[],rowHeight:[],width:0,height:T,verticalPadding:C,horizontalPadding:E};w.sort(function(L,P){return L.rect.width*L.rect.height>P.rect.width*P.rect.height?-1:L.rect.width*L.rect.height<P.rect.width*P.rect.height?1:0});for(var R=0;R<w.length;R++){var D=w[R];S.rows.length==0?this.insertNodeToRow(S,D,0,T):this.canAddHorizontal(S,D.rect.width,D.rect.height)?this.insertNodeToRow(S,D,this.getShortestRowIndex(S),T):this.insertNodeToRow(S,D,S.rows.length,T),this.shiftToLastRow(S)}return S},k.prototype.insertNodeToRow=function(w,T,C,E){var S=E;if(C==w.rows.length){var R=[];w.rows.push(R),w.rowWidth.push(S),w.rowHeight.push(0)}var D=w.rowWidth[C]+T.rect.width;w.rows[C].length>0&&(D+=w.horizontalPadding),w.rowWidth[C]=D,w.width<D&&(w.width=D);var L=T.rect.height;C>0&&(L+=w.verticalPadding);var P=0;L>w.rowHeight[C]&&(P=w.rowHeight[C],w.rowHeight[C]=L,P=w.rowHeight[C]-P),w.height+=P,w.rows[C].push(T)},k.prototype.getShortestRowIndex=function(w){for(var T=-1,C=Number.MAX_VALUE,E=0;E<w.rows.length;E++)w.rowWidth[E]<C&&(T=E,C=w.rowWidth[E]);return T},k.prototype.getLongestRowIndex=function(w){for(var T=-1,C=Number.MIN_VALUE,E=0;E<w.rows.length;E++)w.rowWidth[E]>C&&(T=E,C=w.rowWidth[E]);return T},k.prototype.canAddHorizontal=function(w,T,C){var E=this.getShortestRowIndex(w);if(E<0)return!0;var S=w.rowWidth[E];if(S+w.horizontalPadding+T<=w.width)return!0;var R=0;w.rowHeight[E]<C&&E>0&&(R=C+w.verticalPadding-w.rowHeight[E]);var D;w.width-S>=T+w.horizontalPadding?D=(w.height+R)/(S+T+w.horizontalPadding):D=(w.height+R)/w.width,R=C+w.verticalPadding;var L;return w.width<T?L=(w.height+R)/T:L=(w.height+R)/w.width,L<1&&(L=1/L),D<1&&(D=1/D),D<L},k.prototype.shiftToLastRow=function(w){var T=this.getLongestRowIndex(w),C=w.rowWidth.length-1,E=w.rows[T],S=E[E.length-1],R=S.width+w.horizontalPadding;if(w.width-w.rowWidth[C]>R&&T!=C){E.splice(-1,1),w.rows[C].push(S),w.rowWidth[T]=w.rowWidth[T]-R,w.rowWidth[C]=w.rowWidth[C]+R,w.width=w.rowWidth[instance.getLongestRowIndex(w)];for(var D=Number.MIN_VALUE,L=0;L<E.length;L++)E[L].height>D&&(D=E[L].height);T>0&&(D+=w.verticalPadding);var P=w.rowHeight[T]+w.rowHeight[C];w.rowHeight[T]=D,w.rowHeight[C]<S.height+w.verticalPadding&&(w.rowHeight[C]=S.height+w.verticalPadding);var M=w.rowHeight[T]+w.rowHeight[C];w.height+=M-P,this.shiftToLastRow(w)}},k.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},k.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},k.prototype.reduceTrees=function(){for(var w=[],T=!0,C;T;){var E=this.graphManager.getAllNodes(),S=[];T=!1;for(var R=0;R<E.length;R++)C=E[R],C.getEdges().length==1&&!C.getEdges()[0].isInterGraph&&C.getChild()==null&&(S.push([C,C.getEdges()[0],C.getOwner()]),T=!0);if(T==!0){for(var D=[],L=0;L<S.length;L++)S[L][0].getEdges().length==1&&(D.push(S[L]),S[L][0].getOwner().remove(S[L][0]));w.push(D),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=w},k.prototype.growTree=function(w){for(var T=w.length,C=w[T-1],E,S=0;S<C.length;S++)E=C[S],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);w.splice(w.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},k.prototype.findPlaceforPrunedNode=function(w){var T,C,E=w[0];E==w[1].source?C=w[1].target:C=w[1].source;var S=C.startX,R=C.finishX,D=C.startY,L=C.finishY,P=0,M=0,F=0,I=0,O=[P,F,M,I];if(D>0)for(var z=S;z<=R;z++)O[0]+=this.grid[z][D-1].length+this.grid[z][D].length-1;if(R<this.grid.length-1)for(var z=D;z<=L;z++)O[1]+=this.grid[R+1][z].length+this.grid[R][z].length-1;if(L<this.grid[0].length-1)for(var z=S;z<=R;z++)O[2]+=this.grid[z][L+1].length+this.grid[z][L].length-1;if(S>0)for(var z=D;z<=L;z++)O[3]+=this.grid[S-1][z].length+this.grid[S][z].length-1;for(var N=y.MAX_VALUE,U,$,W=0;W<O.length;W++)O[W]<N?(N=O[W],U=1,$=W):O[W]==N&&U++;if(U==3&&N==0)O[0]==0&&O[1]==0&&O[2]==0?T=1:O[0]==0&&O[1]==0&&O[3]==0?T=0:O[0]==0&&O[2]==0&&O[3]==0?T=3:O[1]==0&&O[2]==0&&O[3]==0&&(T=2);else if(U==2&&N==0){var ee=Math.floor(Math.random()*2);O[0]==0&&O[1]==0?ee==0?T=0:T=1:O[0]==0&&O[2]==0?ee==0?T=0:T=2:O[0]==0&&O[3]==0?ee==0?T=0:T=3:O[1]==0&&O[2]==0?ee==0?T=1:T=2:O[1]==0&&O[3]==0?ee==0?T=1:T=3:ee==0?T=2:T=3}else if(U==4&&N==0){var ee=Math.floor(Math.random()*4);T=ee}else T=$;T==0?E.setCenter(C.getCenterX(),C.getCenterY()-C.getHeight()/2-f.DEFAULT_EDGE_LENGTH-E.getHeight()/2):T==1?E.setCenter(C.getCenterX()+C.getWidth()/2+f.DEFAULT_EDGE_LENGTH+E.getWidth()/2,C.getCenterY()):T==2?E.setCenter(C.getCenterX(),C.getCenterY()+C.getHeight()/2+f.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(C.getCenterX()-C.getWidth()/2-f.DEFAULT_EDGE_LENGTH-E.getWidth()/2,C.getCenterY())},e.exports=k},function(e,r,n){"use strict";var i={};i.layoutBase=n(0),i.CoSEConstants=n(1),i.CoSEEdge=n(2),i.CoSEGraph=n(3),i.CoSEGraphManager=n(4),i.CoSELayout=n(6),i.CoSENode=n(5),e.exports=i}])})});var Dpe=is((qx,RP)=>{"use strict";s(function(e,r){typeof qx=="object"&&typeof RP=="object"?RP.exports=r(DP()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof qx=="object"?qx.cytoscapeCoseBilkent=r(DP()):e.cytoscapeCoseBilkent=r(e.coseBase)},"webpackUniversalModuleDefinition")(qx,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 s(n,"__webpack_require__"),n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,o){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:o})},n.n=function(i){var a=i&&i.__esModule?s(function(){return i.default},"getDefault"):s(function(){return i},"getModuleExports");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,o=n(0).CoSEConstants,l=n(0).CoSELayout,u=n(0).CoSENode,h=n(0).layoutBase.PointD,f=n(0).layoutBase.DimensionD,d={ready:s(function(){},"ready"),stop:s(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function p(v,x){var b={};for(var k in v)b[k]=v[k];for(var k in x)b[k]=x[k];return b}s(p,"extend");function m(v){this.options=p(d,v),g(this.options)}s(m,"_CoSELayout");var g=s(function(x){x.nodeRepulsion!=null&&(o.DEFAULT_REPULSION_STRENGTH=a.DEFAULT_REPULSION_STRENGTH=x.nodeRepulsion),x.idealEdgeLength!=null&&(o.DEFAULT_EDGE_LENGTH=a.DEFAULT_EDGE_LENGTH=x.idealEdgeLength),x.edgeElasticity!=null&&(o.DEFAULT_SPRING_STRENGTH=a.DEFAULT_SPRING_STRENGTH=x.edgeElasticity),x.nestingFactor!=null&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=x.nestingFactor),x.gravity!=null&&(o.DEFAULT_GRAVITY_STRENGTH=a.DEFAULT_GRAVITY_STRENGTH=x.gravity),x.numIter!=null&&(o.MAX_ITERATIONS=a.MAX_ITERATIONS=x.numIter),x.gravityRange!=null&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=a.DEFAULT_GRAVITY_RANGE_FACTOR=x.gravityRange),x.gravityCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=x.gravityCompound),x.gravityRangeCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=x.gravityRangeCompound),x.initialEnergyOnIncremental!=null&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.DEFAULT_COOLING_FACTOR_INCREMENTAL=x.initialEnergyOnIncremental),x.quality=="draft"?i.QUALITY=0:x.quality=="proof"?i.QUALITY=2:i.QUALITY=1,o.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=x.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!x.randomize,o.ANIMATE=a.ANIMATE=i.ANIMATE=x.animate,o.TILE=x.tile,o.TILING_PADDING_VERTICAL=typeof x.tilingPaddingVertical=="function"?x.tilingPaddingVertical.call():x.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL=typeof x.tilingPaddingHorizontal=="function"?x.tilingPaddingHorizontal.call():x.tilingPaddingHorizontal},"getUserOptions");m.prototype.run=function(){var v,x,b=this.options,k=this.idToLNode={},A=this.layout=new l,w=this;w.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var T=A.newGraphManager();this.gm=T;var C=this.options.eles.nodes(),E=this.options.eles.edges();this.root=T.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(C),A);for(var S=0;S<E.length;S++){var R=E[S],D=this.idToLNode[R.data("source")],L=this.idToLNode[R.data("target")];if(D!==L&&D.getEdgesBetween(L).length==0){var P=T.add(A.newEdge(),D,L);P.id=R.id()}}var M=s(function(O,z){typeof O=="number"&&(O=z);var N=O.data("id"),U=w.idToLNode[N];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},"getPositions"),F=s(function I(){for(var O=s(function(){b.fit&&b.cy.fit(b.eles,b.padding),v||(v=!0,w.cy.one("layoutready",b.ready),w.cy.trigger({type:"layoutready",layout:w}))},"afterReposition"),z=w.options.refresh,N,U=0;U<z&&!N;U++)N=w.stopped||w.layout.tick();if(N){A.checkLayoutSuccess()&&!A.isSubLayout&&A.doPostLayout(),A.tilingPostLayout&&A.tilingPostLayout(),A.isLayoutFinished=!0,w.options.eles.nodes().positions(M),O(),w.cy.one("layoutstop",w.options.stop),w.cy.trigger({type:"layoutstop",layout:w}),x&&cancelAnimationFrame(x),v=!1;return}var $=w.layout.getPositionsData();b.eles.nodes().positions(function(W,ee){if(typeof W=="number"&&(W=ee),!W.isParent()){for(var te=W.id(),ce=$[te],Z=W;ce==null&&(ce=$[Z.data("parent")]||$["DummyCompound_"+Z.data("parent")],$[te]=ce,Z=Z.parent()[0],Z!=null););return ce!=null?{x:ce.x,y:ce.y}:{x:W.position("x"),y:W.position("y")}}}),O(),x=requestAnimationFrame(I)},"iterateAnimated");return A.addListener("layoutstarted",function(){w.options.animate==="during"&&(x=requestAnimationFrame(F))}),A.runLayout(),this.options.animate!=="during"&&(w.options.eles.nodes().not(":parent").layoutPositions(w,w.options,M),v=!1),this},m.prototype.getTopMostNodes=function(v){for(var x={},b=0;b<v.length;b++)x[v[b].id()]=!0;var k=v.filter(function(A,w){typeof A=="number"&&(A=w);for(var T=A.parent()[0];T!=null;){if(x[T.id()])return!1;T=T.parent()[0]}return!0});return k},m.prototype.processChildrenList=function(v,x,b){for(var k=x.length,A=0;A<k;A++){var w=x[A],T=w.children(),C,E=w.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(w.outerWidth()!=null&&w.outerHeight()!=null?C=v.add(new u(b.graphManager,new h(w.position("x")-E.w/2,w.position("y")-E.h/2),new f(parseFloat(E.w),parseFloat(E.h)))):C=v.add(new u(this.graphManager)),C.id=w.data("id"),C.paddingLeft=parseInt(w.css("padding")),C.paddingTop=parseInt(w.css("padding")),C.paddingRight=parseInt(w.css("padding")),C.paddingBottom=parseInt(w.css("padding")),this.options.nodeDimensionsIncludeLabels&&w.isParent()){var S=w.boundingBox({includeLabels:!0,includeNodes:!1}).w,R=w.boundingBox({includeLabels:!0,includeNodes:!1}).h,D=w.css("text-halign");C.labelWidth=S,C.labelHeight=R,C.labelPos=D}if(this.idToLNode[w.data("id")]=C,isNaN(C.rect.x)&&(C.rect.x=0),isNaN(C.rect.y)&&(C.rect.y=0),T!=null&&T.length>0){var L;L=b.getGraphManager().add(b.newGraph(),C),this.processChildrenList(L,T,b)}}},m.prototype.stop=function(){return this.stopped=!0,this};var y=s(function(x){x("layout","cose-bilkent",m)},"register");typeof cytoscape<"u"&&y(cytoscape),e.exports=y}])})});function $je(t,e,r,n,i){return t.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("transform","translate("+(i.width-e)/2+", "+r+")")}var Nje,Oje,Pje,Bje,Fje,zje,Gje,Vje,Rpe,Mpe,Ipe=_(()=>{"use strict";ic();pr();Nje=12,Oje=s(function(t,e,r,n){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${-r.height+2*5} q0,-5 5,-5 h${r.width-2*5} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),Pje=s(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),Bje=s(function(t,e,r){let n=r.width,i=r.height,a=.15*n,o=.25*n,l=.35*n,u=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${n*.25},${-1*n*.1}
a${l},${l} 1 0,1 ${n*.4},${-1*n*.1}
a${o},${o} 1 0,1 ${n*.35},${1*n*.2}
a${a},${a} 1 0,1 ${n*.15},${1*i*.35}
a${u},${u} 1 0,1 ${-1*n*.15},${1*i*.65}
a${o},${a} 1 0,1 ${-1*n*.25},${n*.15}
a${l},${l} 1 0,1 ${-1*n*.5},0
a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15}
a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35}
a${u},${u} 1 0,1 ${n*.1},${-1*i*.65}
H0 V0 Z`)},"cloudBkg"),Fje=s(function(t,e,r){let n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${n*.25},${-1*i*.1}
a${a},${a} 1 0,0 ${n*.25},0
a${a},${a} 1 0,0 ${n*.25},0
a${a},${a} 1 0,0 ${n*.25},${1*i*.1}
a${a},${a} 1 0,0 ${n*.15},${1*i*.33}
a${a*.8},${a*.8} 1 0,0 0,${1*i*.34}
a${a},${a} 1 0,0 ${-1*n*.15},${1*i*.33}
a${a},${a} 1 0,0 ${-1*n*.25},${i*.15}
a${a},${a} 1 0,0 ${-1*n*.25},0
a${a},${a} 1 0,0 ${-1*n*.25},0
a${a},${a} 1 0,0 ${-1*n*.25},${-1*i*.15}
a${a},${a} 1 0,0 ${-1*n*.1},${-1*i*.33}
a${a*.8},${a*.8} 1 0,0 0,${-1*i*.34}
a${a},${a} 1 0,0 ${n*.1},${-1*i*.33}
H0 V0 Z`)},"bangBkg"),zje=s(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg");s($je,"insertPolygonShape");Gje=s(function(t,e,r){let n=r.height,a=n/4,o=r.width-r.padding+2*a,l=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-n/2},{x:o-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}];$je(e,o,n,l,r)},"hexagonBkg"),Vje=s(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),Rpe=s(async function(t,e,r,n,i){let a=i.htmlLabels,o=n%(Nje-1),l=e.append("g");r.section=o;let u="section-"+o;o<0&&(u+=" section-root"),l.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+u);let h=l.append("g"),f=l.append("g"),d=r.descr.replace(/(<br\/*>)/g,`
`);await vs(f,d,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let p=f.node().getBBox(),[m]=nc(i.fontSize);if(r.height=p.height+m*1.1*.5+r.padding,r.width=p.width+2*r.padding,r.icon)if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,l.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+o+" "+r.icon),f.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let g=r.height;r.height=Math.max(g,60);let y=Math.abs(r.height-g);l.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+y/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+o+" "+r.icon),f.attr("transform","translate("+(25+r.width/2)+", "+(y/2+r.padding/2)+")")}else if(a){let g=(r.width-p.width)/2,y=(r.height-p.height)/2;f.attr("transform","translate("+g+", "+y+")")}else{let g=r.width/2,y=r.padding/2;f.attr("transform","translate("+g+", "+y+")")}switch(r.type){case t.nodeType.DEFAULT:Oje(t,h,r,o);break;case t.nodeType.ROUNDED_RECT:Vje(t,h,r,o);break;case t.nodeType.RECT:Pje(t,h,r,o);break;case t.nodeType.CIRCLE:h.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),zje(t,h,r,o);break;case t.nodeType.CLOUD:Bje(t,h,r,o);break;case t.nodeType.BANG:Fje(t,h,r,o);break;case t.nodeType.HEXAGON:Gje(t,h,r,o);break}return t.setElementForId(r.id,l),r.height},"drawNode"),Mpe=s(function(t,e){let r=t.getElementById(e.id),n=e.x||0,i=e.y||0;r.attr("transform","translate("+n+","+i+")")},"positionNode")});async function Ope(t,e,r,n,i){await Rpe(t,e,r,n,i),r.children&&await Promise.all(r.children.map((a,o)=>Ope(t,e,a,n<0?o:n,i)))}function Uje(t,e){e.edges().map((r,n)=>{let i=r.data();if(r[0]._private.bodyBounds){let a=r[0]._private.rscratch;V.trace("Edge: ",n,i),t.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}})}function Ppe(t,e,r,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(i=>{Ppe(i,e,r,n+1),e.add({group:"edges",data:{id:`${t.id}_${i.id}`,source:t.id,target:i.id,depth:n,section:i.section}})})}function qje(t,e){return new Promise(r=>{let n=Me("body").append("div").attr("id","cy").attr("style","display:none"),i=Yu({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),Ppe(t,i,e,0),i.nodes().forEach(function(a){a.layoutDimensions=()=>{let o=a.data();return{w:o.width,h:o.height}}}),i.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),i.ready(a=>{V.info("Ready",a),r(i)})})}function Wje(t,e){e.nodes().map((r,n)=>{let i=r.data();i.x=r.position().x,i.y=r.position().y,Mpe(t,i);let a=t.getElementById(i.nodeId);V.info("Id:",n,"Position: (",r.position().x,", ",r.position().y,")",i),a.attr("transform",`translate(${r.position().x-i.width/2}, ${r.position().y-i.height/2})`),a.attr("attr",`apa-${n})`)})}var Npe,Hje,Bpe,Fpe=_(()=>{"use strict";Lpe();Npe=ka(Dpe(),1);Xt();gt();it();p0();Un();Ipe();Pl();Yu.use(Npe.default);s(Ope,"drawNodes");s(Uje,"drawEdges");s(Ppe,"addNodes");s(qje,"layoutMindmap");s(Wje,"positionNodes");Hje=s(async(t,e,r,n)=>{V.debug(`Rendering mindmap diagram
`+t);let i=n.db,a=i.getMindmap();if(!a)return;let o=le();o.htmlLabels=!1;let l=Bo(e),u=l.append("g");u.attr("class","mindmap-edges");let h=l.append("g");h.attr("class","mindmap-nodes"),await Ope(i,h,a,-1,o);let f=await qje(a,o);Uje(u,f),Wje(i,f),ql(void 0,l,o.mindmap?.padding??dr.mindmap.padding,o.mindmap?.useMaxWidth??dr.mindmap.useMaxWidth)},"draw"),Bpe={draw:Hje}});var Yje,Xje,zpe,$pe=_(()=>{"use strict";Ho();Yje=s(t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],Fa(t["lineColor"+r])?t["lineColor"+r]=ht(t["lineColor"+r],20):t["lineColor"+r]=mt(t["lineColor"+r],20);for(let r=0;r<t.THEME_COLOR_LIMIT;r++){let n=""+(17-3*r);e+=`
.section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {
fill: ${t["cScale"+r]};
}
.section-${r-1} text {
fill: ${t["cScaleLabel"+r]};
}
.node-icon-${r-1} {
font-size: 40px;
color: ${t["cScaleLabel"+r]};
}
.section-edge-${r-1}{
stroke: ${t["cScale"+r]};
}
.edge-depth-${r-1}{
stroke-width: ${n};
}
.section-${r-1} line {
stroke: ${t["cScaleInv"+r]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return e},"genSections"),Xje=s(t=>`
.edge {
stroke-width: 3;
}
${Yje(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;
}
.mindmap-node-label {
dy: 1em;
alignment-baseline: middle;
text-anchor: middle;
dominant-baseline: middle;
text-align: center;
}
`,"getStyles"),zpe=Xje});var Gpe={};ur(Gpe,{diagram:()=>jje});var jje,Vpe=_(()=>{"use strict";Sfe();Lfe();Fpe();$pe();jje={db:Afe,renderer:Bpe,parser:Cfe,styles:zpe}});var MP,Wx,Wpe=_(()=>{"use strict";MP=function(){var t=s(function(l,u,h,f){for(h=h||{},f=l.length;f--;h[l[f]]=u);return h},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],i={trace:s(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:s(function(u,h,f,d,p,m,g){var y=m.length-1;switch(p){case 7:let v=d.findOrCreateNode(m[y-4].trim().replaceAll('""','"')),x=d.findOrCreateNode(m[y-2].trim().replaceAll('""','"')),b=parseFloat(m[y].trim());d.addLink(v,x,b);break;case 8:case 9:case 11:this.$=m[y];break;case 10:this.$=m[y-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:s(function(u,h){if(h.recoverable)this.trace(u);else{var f=new Error(u);throw f.hash=h,f}},"parseError"),parse:s(function(u){var h=this,f=[0],d=[],p=[null],m=[],g=this.table,y="",v=0,x=0,b=0,k=2,A=1,w=m.slice.call(arguments,1),T=Object.create(this.lexer),C={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(C.yy[E]=this.yy[E]);T.setInput(u,C.yy),C.yy.lexer=T,C.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var S=T.yylloc;m.push(S);var R=T.options&&T.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function D(ce){f.length=f.length-2*ce,p.length=p.length-ce,m.length=m.length-ce}s(D,"popStack");function L(){var ce;return ce=d.pop()||T.lex()||A,typeof ce!="number"&&(ce instanceof Array&&(d=ce,ce=d.pop()),ce=h.symbols_[ce]||ce),ce}s(L,"lex");for(var P,M,F,I,O,z,N={},U,$,W,ee;;){if(F=f[f.length-1],this.defaultActions[F]?I=this.defaultActions[F]:((P===null||typeof P>"u")&&(P=L()),I=g[F]&&g[F][P]),typeof I>"u"||!I.length||!I[0]){var te="";ee=[];for(U in g[F])this.terminals_[U]&&U>k&&ee.push("'"+this.terminals_[U]+"'");T.showPosition?te="Parse error on line "+(v+1)+`:
`+T.showPosition()+`
Expecting `+ee.join(", ")+", got '"+(this.terminals_[P]||P)+"'":te="Parse error on line "+(v+1)+": Unexpected "+(P==A?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(te,{text:T.match,token:this.terminals_[P]||P,line:T.yylineno,loc:S,expected:ee})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+P);switch(I[0]){case 1:f.push(P),p.push(T.yytext),m.push(T.yylloc),f.push(I[1]),P=null,M?(P=M,M=null):(x=T.yyleng,y=T.yytext,v=T.yylineno,S=T.yylloc,b>0&&b--);break;case 2:if($=this.productions_[I[1]][1],N.$=p[p.length-$],N._$={first_line:m[m.length-($||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-($||1)].first_column,last_column:m[m.length-1].last_column},R&&(N._$.range=[m[m.length-($||1)].range[0],m[m.length-1].range[1]]),z=this.performAction.apply(N,[y,x,v,C.yy,I[1],p,m].concat(w)),typeof z<"u")return z;$&&(f=f.slice(0,-1*$*2),p=p.slice(0,-1*$),m=m.slice(0,-1*$)),f.push(this.productions_[I[1]][0]),p.push(N.$),m.push(N._$),W=g[f[f.length-2]][f[f.length-1]],f.push(W);break;case 3:return!0}}return!0},"parse")},a=function(){var l={EOF:1,parseError:s(function(h,f){if(this.yy.parser)this.yy.parser.parseError(h,f);else throw new Error(h)},"parseError"),setInput:s(function(u,h){return this.yy=h||this.yy||{},this._input=u,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:s(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var h=u.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),u},"input"),unput:s(function(u){var h=u.length,f=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var d=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),f.length-1&&(this.yylineno-=f.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:f?(f.length===d.length?this.yylloc.first_column:0)+d[d.length-f.length].length-f[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(u){this.unput(this.match.slice(u))},"less"),pastInput:s(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var u=this.pastInput(),h=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
`+h+"^"},"showPosition"),test_match:s(function(u,h){var f,d,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))),d=u[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,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(u[0].length),this.matched+=u[0],f=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var m in p)this[m]=p[m];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,h,f,d;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),m=0;m<p.length;m++)if(f=this._input.match(this.rules[p[m]]),f&&(!h||f[0].length>h[0].length)){if(h=f,d=m,this.options.backtrack_lexer){if(u=this.test_match(f,p[m]),u!==!1)return u;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(u=this.test_match(h,p[d]),u!==!1?u:!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:s(function(){var h=this.next();return h||this.lex()},"lex"),begin:s(function(h){this.conditionStack.push(h)},"begin"),popState:s(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:s(function(h){this.begin(h)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(h,f,d,p){var m=p;switch(d){case 0:return this.pushState("csv"),4;break;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;break;case 5:return 20;case 6:return this.popState("escaped_text"),18;break;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return l}();i.lexer=a;function o(){this.yy={}}return s(o,"Parser"),o.prototype=i,i.Parser=o,new o}();MP.parser=MP;Wx=MP});var w7,T7,k7,Jje,IP,eKe,NP,tKe,rKe,nKe,iKe,Hpe,Ype=_(()=>{"use strict";gt();Qt();Ci();w7=[],T7=[],k7=new Map,Jje=s(()=>{w7=[],T7=[],k7=new Map,br()},"clear"),IP=class{constructor(e,r,n=0){this.source=e;this.target=r;this.value=n}static{s(this,"SankeyLink")}},eKe=s((t,e,r)=>{w7.push(new IP(t,e,r))},"addLink"),NP=class{constructor(e){this.ID=e}static{s(this,"SankeyNode")}},tKe=s(t=>{t=$e.sanitizeText(t,le());let e=k7.get(t);return e===void 0&&(e=new NP(t),k7.set(t,e),T7.push(e)),e},"findOrCreateNode"),rKe=s(()=>T7,"getNodes"),nKe=s(()=>w7,"getLinks"),iKe=s(()=>({nodes:T7.map(t=>({id:t.ID})),links:w7.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Hpe={nodesMap:k7,getConfig:s(()=>le().sankey,"getConfig"),getNodes:rKe,getLinks:nKe,getGraph:iKe,addLink:eKe,findOrCreateNode:tKe,getAccTitle:Gr,setAccTitle:Ar,getAccDescription:Ur,setAccDescription:Vr,getDiagramTitle:Qr,setDiagramTitle:an,clear:Jje}});function Hx(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 Xpe=_(()=>{"use strict";s(Hx,"max")});function i1(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 jpe=_(()=>{"use strict";s(i1,"min")});function a1(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 Kpe=_(()=>{"use strict";s(a1,"sum")});var OP=_(()=>{"use strict";Xpe();jpe();Kpe()});function aKe(t){return t.target.depth}function PP(t){return t.depth}function BP(t,e){return e-1-t.height}function Yx(t,e){return t.sourceLinks.length?t.depth:e-1}function FP(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?i1(t.sourceLinks,aKe)-1:0}var zP=_(()=>{"use strict";OP();s(aKe,"targetDepth");s(PP,"left");s(BP,"right");s(Yx,"justify");s(FP,"center")});function s1(t){return function(){return t}}var Qpe=_(()=>{"use strict";s(s1,"constant")});function Zpe(t,e){return E7(t.source,e.source)||t.index-e.index}function Jpe(t,e){return E7(t.target,e.target)||t.index-e.index}function E7(t,e){return t.y0-e.y0}function $P(t){return t.value}function sKe(t){return t.index}function oKe(t){return t.nodes}function lKe(t){return t.links}function eme(t,e){let r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function tme({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 C7(){let t=0,e=0,r=1,n=1,i=24,a=8,o,l=sKe,u=Yx,h,f,d=oKe,p=lKe,m=6;function g(){let F={nodes:d.apply(null,arguments),links:p.apply(null,arguments)};return y(F),v(F),x(F),b(F),w(F),tme(F),F}s(g,"sankey"),g.update=function(F){return tme(F),F},g.nodeId=function(F){return arguments.length?(l=typeof F=="function"?F:s1(F),g):l},g.nodeAlign=function(F){return arguments.length?(u=typeof F=="function"?F:s1(F),g):u},g.nodeSort=function(F){return arguments.length?(h=F,g):h},g.nodeWidth=function(F){return arguments.length?(i=+F,g):i},g.nodePadding=function(F){return arguments.length?(a=o=+F,g):a},g.nodes=function(F){return arguments.length?(d=typeof F=="function"?F:s1(F),g):d},g.links=function(F){return arguments.length?(p=typeof F=="function"?F:s1(F),g):p},g.linkSort=function(F){return arguments.length?(f=F,g):f},g.size=function(F){return arguments.length?(t=e=0,r=+F[0],n=+F[1],g):[r-t,n-e]},g.extent=function(F){return arguments.length?(t=+F[0][0],r=+F[1][0],e=+F[0][1],n=+F[1][1],g):[[t,e],[r,n]]},g.iterations=function(F){return arguments.length?(m=+F,g):m};function y({nodes:F,links:I}){for(let[z,N]of F.entries())N.index=z,N.sourceLinks=[],N.targetLinks=[];let O=new Map(F.map((z,N)=>[l(z,N,F),z]));for(let[z,N]of I.entries()){N.index=z;let{source:U,target:$}=N;typeof U!="object"&&(U=N.source=eme(O,U)),typeof $!="object"&&($=N.target=eme(O,$)),U.sourceLinks.push(N),$.targetLinks.push(N)}if(f!=null)for(let{sourceLinks:z,targetLinks:N}of F)z.sort(f),N.sort(f)}s(y,"computeNodeLinks");function v({nodes:F}){for(let I of F)I.value=I.fixedValue===void 0?Math.max(a1(I.sourceLinks,$P),a1(I.targetLinks,$P)):I.fixedValue}s(v,"computeNodeValues");function x({nodes:F}){let I=F.length,O=new Set(F),z=new Set,N=0;for(;O.size;){for(let U of O){U.depth=N;for(let{target:$}of U.sourceLinks)z.add($)}if(++N>I)throw new Error("circular link");O=z,z=new Set}}s(x,"computeNodeDepths");function b({nodes:F}){let I=F.length,O=new Set(F),z=new Set,N=0;for(;O.size;){for(let U of O){U.height=N;for(let{source:$}of U.targetLinks)z.add($)}if(++N>I)throw new Error("circular link");O=z,z=new Set}}s(b,"computeNodeHeights");function k({nodes:F}){let I=Hx(F,N=>N.depth)+1,O=(r-t-i)/(I-1),z=new Array(I);for(let N of F){let U=Math.max(0,Math.min(I-1,Math.floor(u.call(null,N,I))));N.layer=U,N.x0=t+U*O,N.x1=N.x0+i,z[U]?z[U].push(N):z[U]=[N]}if(h)for(let N of z)N.sort(h);return z}s(k,"computeNodeLayers");function A(F){let I=i1(F,O=>(n-e-(O.length-1)*o)/a1(O,$P));for(let O of F){let z=e;for(let N of O){N.y0=z,N.y1=z+N.value*I,z=N.y1+o;for(let U of N.sourceLinks)U.width=U.value*I}z=(n-z+o)/(O.length+1);for(let N=0;N<O.length;++N){let U=O[N];U.y0+=z*(N+1),U.y1+=z*(N+1)}L(O)}}s(A,"initializeNodeBreadths");function w(F){let I=k(F);o=Math.min(a,(n-e)/(Hx(I,O=>O.length)-1)),A(I);for(let O=0;O<m;++O){let z=Math.pow(.99,O),N=Math.max(1-z,(O+1)/m);C(I,z,N),T(I,z,N)}}s(w,"computeNodeBreadths");function T(F,I,O){for(let z=1,N=F.length;z<N;++z){let U=F[z];for(let $ of U){let W=0,ee=0;for(let{source:ce,value:Z}of $.targetLinks){let fe=Z*($.layer-ce.layer);W+=P(ce,$)*fe,ee+=fe}if(!(ee>0))continue;let te=(W/ee-$.y0)*I;$.y0+=te,$.y1+=te,D($)}h===void 0&&U.sort(E7),E(U,O)}}s(T,"relaxLeftToRight");function C(F,I,O){for(let z=F.length,N=z-2;N>=0;--N){let U=F[N];for(let $ of U){let W=0,ee=0;for(let{target:ce,value:Z}of $.sourceLinks){let fe=Z*(ce.layer-$.layer);W+=M($,ce)*fe,ee+=fe}if(!(ee>0))continue;let te=(W/ee-$.y0)*I;$.y0+=te,$.y1+=te,D($)}h===void 0&&U.sort(E7),E(U,O)}}s(C,"relaxRightToLeft");function E(F,I){let O=F.length>>1,z=F[O];R(F,z.y0-o,O-1,I),S(F,z.y1+o,O+1,I),R(F,n,F.length-1,I),S(F,e,0,I)}s(E,"resolveCollisions");function S(F,I,O,z){for(;O<F.length;++O){let N=F[O],U=(I-N.y0)*z;U>1e-6&&(N.y0+=U,N.y1+=U),I=N.y1+o}}s(S,"resolveCollisionsTopToBottom");function R(F,I,O,z){for(;O>=0;--O){let N=F[O],U=(N.y1-I)*z;U>1e-6&&(N.y0-=U,N.y1-=U),I=N.y0-o}}s(R,"resolveCollisionsBottomToTop");function D({sourceLinks:F,targetLinks:I}){if(f===void 0){for(let{source:{sourceLinks:O}}of I)O.sort(Jpe);for(let{target:{targetLinks:O}}of F)O.sort(Zpe)}}s(D,"reorderNodeLinks");function L(F){if(f===void 0)for(let{sourceLinks:I,targetLinks:O}of F)I.sort(Jpe),O.sort(Zpe)}s(L,"reorderLinks");function P(F,I){let O=F.y0-(F.sourceLinks.length-1)*o/2;for(let{target:z,width:N}of F.sourceLinks){if(z===I)break;O+=N+o}for(let{source:z,width:N}of I.targetLinks){if(z===F)break;O-=N}return O}s(P,"targetTop");function M(F,I){let O=I.y0-(I.targetLinks.length-1)*o/2;for(let{source:z,width:N}of I.targetLinks){if(z===F)break;O+=N+o}for(let{target:z,width:N}of F.sourceLinks){if(z===I)break;O-=N}return O}return s(M,"sourceTop"),g}var rme=_(()=>{"use strict";OP();zP();Qpe();s(Zpe,"ascendingSourceBreadth");s(Jpe,"ascendingTargetBreadth");s(E7,"ascendingBreadth");s($P,"value");s(sKe,"defaultId");s(oKe,"defaultNodes");s(lKe,"defaultLinks");s(eme,"find");s(tme,"computeLinkBreadths");s(C7,"Sankey")});function UP(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function nme(){return new UP}var GP,VP,$0,cKe,qP,ime=_(()=>{"use strict";GP=Math.PI,VP=2*GP,$0=1e-6,cKe=VP-$0;s(UP,"Path");s(nme,"path");UP.prototype=nme.prototype={constructor:UP,moveTo:s(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:s(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:s(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:s(function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:s(function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:s(function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,o=this._y1,l=r-t,u=n-e,h=a-t,f=o-e,d=h*h+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(d>$0)if(!(Math.abs(f*l-u*h)>$0)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var p=r-a,m=n-o,g=l*l+u*u,y=p*p+m*m,v=Math.sqrt(g),x=Math.sqrt(d),b=i*Math.tan((GP-Math.acos((g+d-y)/(2*v*x)))/2),k=b/x,A=b/v;Math.abs(k-1)>$0&&(this._+="L"+(t+k*h)+","+(e+k*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>h*m)+","+(this._x1=t+A*l)+","+(this._y1=e+A*u)}},"arcTo"),arc:s(function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var o=r*Math.cos(n),l=r*Math.sin(n),u=t+o,h=e+l,f=1^a,d=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+u+","+h:(Math.abs(this._x1-u)>$0||Math.abs(this._y1-h)>$0)&&(this._+="L"+u+","+h),r&&(d<0&&(d=d%VP+VP),d>cKe?this._+="A"+r+","+r+",0,1,"+f+","+(t-o)+","+(e-l)+"A"+r+","+r+",0,1,"+f+","+(this._x1=u)+","+(this._y1=h):d>$0&&(this._+="A"+r+","+r+",0,"+ +(d>=GP)+","+f+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},"arc"),rect:s(function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},"rect"),toString:s(function(){return this._},"toString")};qP=nme});var ame=_(()=>{"use strict";ime()});function S7(t){return s(function(){return t},"constant")}var sme=_(()=>{"use strict";s(S7,"default")});function ome(t){return t[0]}function lme(t){return t[1]}var cme=_(()=>{"use strict";s(ome,"x");s(lme,"y")});var ume,hme=_(()=>{"use strict";ume=Array.prototype.slice});function uKe(t){return t.source}function hKe(t){return t.target}function fKe(t){var e=uKe,r=hKe,n=ome,i=lme,a=null;function o(){var l,u=ume.call(arguments),h=e.apply(this,u),f=r.apply(this,u);if(a||(a=l=qP()),t(a,+n.apply(this,(u[0]=h,u)),+i.apply(this,u),+n.apply(this,(u[0]=f,u)),+i.apply(this,u)),l)return a=null,l+""||null}return s(o,"link"),o.source=function(l){return arguments.length?(e=l,o):e},o.target=function(l){return arguments.length?(r=l,o):r},o.x=function(l){return arguments.length?(n=typeof l=="function"?l:S7(+l),o):n},o.y=function(l){return arguments.length?(i=typeof l=="function"?l:S7(+l),o):i},o.context=function(l){return arguments.length?(a=l??null,o):a},o}function dKe(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function WP(){return fKe(dKe)}var fme=_(()=>{"use strict";ame();hme();sme();cme();s(uKe,"linkSource");s(hKe,"linkTarget");s(fKe,"link");s(dKe,"curveHorizontal");s(WP,"linkHorizontal")});var dme=_(()=>{"use strict";fme()});function pKe(t){return[t.source.x1,t.y0]}function mKe(t){return[t.target.x0,t.y1]}function _7(){return WP().source(pKe).target(mKe)}var pme=_(()=>{"use strict";dme();s(pKe,"horizontalSource");s(mKe,"horizontalTarget");s(_7,"default")});var mme=_(()=>{"use strict";rme();zP();pme()});var Xx,gme=_(()=>{"use strict";Xx=class t{static{s(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}}});var gKe,yKe,yme,vme=_(()=>{"use strict";gt();Xt();mme();Un();gme();gKe={left:PP,right:BP,center:FP,justify:Yx},yKe=s(function(t,e,r,n){let{securityLevel:i,sankey:a}=le(),o=Qb.sankey,l;i==="sandbox"&&(l=Me("#i"+e));let u=i==="sandbox"?Me(l.nodes()[0].contentDocument.body):Me("body"),h=i==="sandbox"?u.select(`[id="${e}"]`):Me(`[id="${e}"]`),f=a?.width??o.width,d=a?.height??o.width,p=a?.useMaxWidth??o.useMaxWidth,m=a?.nodeAlignment??o.nodeAlignment,g=a?.prefix??o.prefix,y=a?.suffix??o.suffix,v=a?.showValues??o.showValues,x=n.db.getGraph(),b=gKe[m];C7().nodeId(R=>R.id).nodeWidth(10).nodePadding(10+(v?15:0)).nodeAlign(b).extent([[0,0],[f,d]])(x);let w=au(l_);h.append("g").attr("class","nodes").selectAll(".node").data(x.nodes).join("g").attr("class","node").attr("id",R=>(R.uid=Xx.next("node-")).id).attr("transform",function(R){return"translate("+R.x0+","+R.y0+")"}).attr("x",R=>R.x0).attr("y",R=>R.y0).append("rect").attr("height",R=>R.y1-R.y0).attr("width",R=>R.x1-R.x0).attr("fill",R=>w(R.id));let T=s(({id:R,value:D})=>v?`${R}
${g}${Math.round(D*100)/100}${y}`:R,"getText");h.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(x.nodes).join("text").attr("x",R=>R.x0<f/2?R.x1+6:R.x0-6).attr("y",R=>(R.y1+R.y0)/2).attr("dy",`${v?"0":"0.35"}em`).attr("text-anchor",R=>R.x0<f/2?"start":"end").text(T);let C=h.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(x.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),E=a?.linkColor??"gradient";if(E==="gradient"){let R=C.append("linearGradient").attr("id",D=>(D.uid=Xx.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",D=>D.source.x1).attr("x2",D=>D.target.x0);R.append("stop").attr("offset","0%").attr("stop-color",D=>w(D.source.id)),R.append("stop").attr("offset","100%").attr("stop-color",D=>w(D.target.id))}let S;switch(E){case"gradient":S=s(R=>R.uid,"coloring");break;case"source":S=s(R=>w(R.source.id),"coloring");break;case"target":S=s(R=>w(R.target.id),"coloring");break;default:S=E}C.append("path").attr("d",_7()).attr("stroke",S).attr("stroke-width",R=>Math.max(1,R.width)),ql(void 0,h,0,p)},"draw"),yme={draw:yKe}});var xme,bme=_(()=>{"use strict";xme=s(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
`).trim(),"prepareTextForParsing")});var kme={};ur(kme,{diagram:()=>xKe});var vKe,xKe,wme=_(()=>{"use strict";Wpe();Ype();vme();bme();vKe=Wx.parse.bind(Wx);Wx.parse=t=>vKe(xme(t));xKe={parser:Wx,db:Hpe,renderer:yme}});var Cme,HP,TKe,EKe,CKe,SKe,_Ke,Tf,YP=_(()=>{"use strict";zs();Pl();pr();Ci();Cme={packet:[]},HP=structuredClone(Cme),TKe=dr.packet,EKe=s(()=>{let t=ms({...TKe,..._r().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),CKe=s(()=>HP.packet,"getPacket"),SKe=s(t=>{t.length>0&&HP.packet.push(t)},"pushWord"),_Ke=s(()=>{br(),HP=structuredClone(Cme)},"clear"),Tf={pushWord:SKe,getPacket:CKe,getConfig:EKe,clear:_Ke,setAccTitle:Ar,getAccTitle:Gr,setDiagramTitle:an,getDiagramTitle:Qr,getAccDescription:Ur,setAccDescription:Vr}});var AKe,LKe,DKe,Sme,_me=_(()=>{"use strict";V2();it();kw();YP();AKe=1e4,LKe=s(t=>{dg(t,Tf);let e=-1,r=[],n=1,{bitsPerRow:i}=Tf.getConfig();for(let{start:a,end:o,label:l}of t.blocks){if(o&&o<a)throw new Error(`Packet block ${a} - ${o} is invalid. End must be greater than start.`);if(a!==e+1)throw new Error(`Packet block ${a} - ${o??a} is not contiguous. It should start from ${e+1}.`);for(e=o??a,V.debug(`Packet block ${a} - ${e} with label ${l}`);r.length<=i+1&&Tf.getPacket().length<AKe;){let[u,h]=DKe({start:a,end:o,label:l},n,i);if(r.push(u),u.end+1===n*i&&(Tf.pushWord(r),r=[],n++),!h)break;({start:a,end:o,label:l}=h)}}Tf.pushWord(r)},"populate"),DKe=s((t,e,r)=>{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),Sme={parse:s(async t=>{let e=await Bu("packet",t);V.debug(e),LKe(e)},"parse")}});var RKe,MKe,Ame,Lme=_(()=>{"use strict";p0();Un();RKe=s((t,e,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:o,paddingY:l,bitWidth:u,bitsPerRow:h}=a,f=i.getPacket(),d=i.getDiagramTitle(),p=o+l,m=p*(f.length+1)-(d?0:o),g=u*h+2,y=Bo(e);y.attr("viewbox",`0 0 ${g} ${m}`),xr(y,m,g,a.useMaxWidth);for(let[v,x]of f.entries())MKe(y,x,v,a);y.append("text").text(d).attr("x",g/2).attr("y",m-p/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),MKe=s((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:l,showBits:u})=>{let h=t.append("g"),f=r*(n+a)+a;for(let d of e){let p=d.start%l*o+1,m=(d.end-d.start+1)*o-i;if(h.append("rect").attr("x",p).attr("y",f).attr("width",m).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",p+m/2).attr("y",f+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(d.label),!u)continue;let g=d.end===d.start,y=f-2;h.append("text").attr("x",p+(g?m/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(d.start),g||h.append("text").attr("x",p+m).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(d.end)}},"drawWord"),Ame={draw:RKe}});var IKe,Dme,Rme=_(()=>{"use strict";pr();IKe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},Dme=s(({packet:t}={})=>{let e=ms(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")});var Mme={};ur(Mme,{diagram:()=>NKe});var NKe,Ime=_(()=>{"use strict";YP();_me();Lme();Rme();NKe={parser:Sme,db:Tf,renderer:Ame,styles:Dme}});var XP,Pme,Bme=_(()=>{"use strict";XP=function(){var t=s(function(k,A,w,T){for(w=w||{},T=k.length;T--;w[k[T]]=A);return w},"o"),e=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],o=[1,16],l=[1,17],u=[1,18],h=[8,30],f=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],g=[8,15,16,21,27,28,29,30,31,32,40,44,47],y=[1,49],v={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:s(function(A,w,T,C,E,S,R){var D=S.length-1;switch(E){case 4:C.getLogger().debug("Rule: separator (NL) ");break;case 5:C.getLogger().debug("Rule: separator (Space) ");break;case 6:C.getLogger().debug("Rule: separator (EOF) ");break;case 7:C.getLogger().debug("Rule: hierarchy: ",S[D-1]),C.setHierarchy(S[D-1]);break;case 8:C.getLogger().debug("Stop NL ");break;case 9:C.getLogger().debug("Stop EOF ");break;case 10:C.getLogger().debug("Stop NL2 ");break;case 11:C.getLogger().debug("Stop EOF2 ");break;case 12:C.getLogger().debug("Rule: statement: ",S[D]),typeof S[D].length=="number"?this.$=S[D]:this.$=[S[D]];break;case 13:C.getLogger().debug("Rule: statement #2: ",S[D-1]),this.$=[S[D-1]].concat(S[D]);break;case 14:C.getLogger().debug("Rule: link: ",S[D],A),this.$={edgeTypeStr:S[D],label:""};break;case 15:C.getLogger().debug("Rule: LABEL link: ",S[D-3],S[D-1],S[D]),this.$={edgeTypeStr:S[D],label:S[D-1]};break;case 18:let L=parseInt(S[D]),P=C.generateId();this.$={id:P,type:"space",label:"",width:L,children:[]};break;case 23:C.getLogger().debug("Rule: (nodeStatement link node) ",S[D-2],S[D-1],S[D]," typestr: ",S[D-1].edgeTypeStr);let M=C.edgeStrToEdgeData(S[D-1].edgeTypeStr);this.$=[{id:S[D-2].id,label:S[D-2].label,type:S[D-2].type,directions:S[D-2].directions},{id:S[D-2].id+"-"+S[D].id,start:S[D-2].id,end:S[D].id,label:S[D-1].label,type:"edge",directions:S[D].directions,arrowTypeEnd:M,arrowTypeStart:"arrow_open"},{id:S[D].id,label:S[D].label,type:C.typeStr2Type(S[D].typeStr),directions:S[D].directions}];break;case 24:C.getLogger().debug("Rule: nodeStatement (abc88 node size) ",S[D-1],S[D]),this.$={id:S[D-1].id,label:S[D-1].label,type:C.typeStr2Type(S[D-1].typeStr),directions:S[D-1].directions,widthInColumns:parseInt(S[D],10)};break;case 25:C.getLogger().debug("Rule: nodeStatement (node) ",S[D]),this.$={id:S[D].id,label:S[D].label,type:C.typeStr2Type(S[D].typeStr),directions:S[D].directions,widthInColumns:1};break;case 26:C.getLogger().debug("APA123",this?this:"na"),C.getLogger().debug("COLUMNS: ",S[D]),this.$={type:"column-setting",columns:S[D]==="auto"?-1:parseInt(S[D])};break;case 27:C.getLogger().debug("Rule: id-block statement : ",S[D-2],S[D-1]);let F=C.generateId();this.$={...S[D-2],type:"composite",children:S[D-1]};break;case 28:C.getLogger().debug("Rule: blockStatement : ",S[D-2],S[D-1],S[D]);let I=C.generateId();this.$={id:I,type:"composite",label:"",children:S[D-1]};break;case 29:C.getLogger().debug("Rule: node (NODE_ID separator): ",S[D]),this.$={id:S[D]};break;case 30:C.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",S[D-1],S[D]),this.$={id:S[D-1],label:S[D].label,typeStr:S[D].typeStr,directions:S[D].directions};break;case 31:C.getLogger().debug("Rule: dirList: ",S[D]),this.$=[S[D]];break;case 32:C.getLogger().debug("Rule: dirList: ",S[D-1],S[D]),this.$=[S[D-1]].concat(S[D]);break;case 33:C.getLogger().debug("Rule: nodeShapeNLabel: ",S[D-2],S[D-1],S[D]),this.$={typeStr:S[D-2]+S[D],label:S[D-1]};break;case 34:C.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",S[D-3],S[D-2]," #3:",S[D-1],S[D]),this.$={typeStr:S[D-3]+S[D],label:S[D-2],directions:S[D-1]};break;case 35:case 36:this.$={type:"classDef",id:S[D-1].trim(),css:S[D].trim()};break;case 37:this.$={type:"applyClass",id:S[D-1].trim(),styleClass:S[D].trim()};break;case 38:this.$={type:"applyStyles",id:S[D-1].trim(),stylesStr:S[D].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:o,44:l,47:u},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:e,28:r,29:n,31:i,32:a,40:o,44:l,47:u}),t(f,[2,16],{14:22,15:d,16:p}),t(f,[2,17]),t(f,[2,18]),t(f,[2,19]),t(f,[2,20]),t(f,[2,21]),t(f,[2,22]),t(m,[2,25],{27:[1,25]}),t(f,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:o,44:l,47:u},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(g,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},t(m,[2,24]),{11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:o,44:l,47:u},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(f,[2,28]),t(f,[2,35]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{37:[1,47]},{34:48,35:y},{15:[1,50]},t(f,[2,27]),t(g,[2,33]),{39:[1,51]},{34:52,35:y,39:[2,31]},{32:[2,15]},t(g,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:s(function(A,w){if(w.recoverable)this.trace(A);else{var T=new Error(A);throw T.hash=w,T}},"parseError"),parse:s(function(A){var w=this,T=[0],C=[],E=[null],S=[],R=this.table,D="",L=0,P=0,M=0,F=2,I=1,O=S.slice.call(arguments,1),z=Object.create(this.lexer),N={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(N.yy[U]=this.yy[U]);z.setInput(A,N.yy),N.yy.lexer=z,N.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var $=z.yylloc;S.push($);var W=z.options&&z.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ee(oe){T.length=T.length-2*oe,E.length=E.length-oe,S.length=S.length-oe}s(ee,"popStack");function te(){var oe;return oe=C.pop()||z.lex()||I,typeof oe!="number"&&(oe instanceof Array&&(C=oe,oe=C.pop()),oe=w.symbols_[oe]||oe),oe}s(te,"lex");for(var ce,Z,fe,ne,H,Q,K={},re,ie,ye,j;;){if(fe=T[T.length-1],this.defaultActions[fe]?ne=this.defaultActions[fe]:((ce===null||typeof ce>"u")&&(ce=te()),ne=R[fe]&&R[fe][ce]),typeof ne>"u"||!ne.length||!ne[0]){var De="";j=[];for(re in R[fe])this.terminals_[re]&&re>F&&j.push("'"+this.terminals_[re]+"'");z.showPosition?De="Parse error on line "+(L+1)+`:
`+z.showPosition()+`
Expecting `+j.join(", ")+", got '"+(this.terminals_[ce]||ce)+"'":De="Parse error on line "+(L+1)+": Unexpected "+(ce==I?"end of input":"'"+(this.terminals_[ce]||ce)+"'"),this.parseError(De,{text:z.match,token:this.terminals_[ce]||ce,line:z.yylineno,loc:$,expected:j})}if(ne[0]instanceof Array&&ne.length>1)throw new Error("Parse Error: multiple actions possible at state: "+fe+", token: "+ce);switch(ne[0]){case 1:T.push(ce),E.push(z.yytext),S.push(z.yylloc),T.push(ne[1]),ce=null,Z?(ce=Z,Z=null):(P=z.yyleng,D=z.yytext,L=z.yylineno,$=z.yylloc,M>0&&M--);break;case 2:if(ie=this.productions_[ne[1]][1],K.$=E[E.length-ie],K._$={first_line:S[S.length-(ie||1)].first_line,last_line:S[S.length-1].last_line,first_column:S[S.length-(ie||1)].first_column,last_column:S[S.length-1].last_column},W&&(K._$.range=[S[S.length-(ie||1)].range[0],S[S.length-1].range[1]]),Q=this.performAction.apply(K,[D,P,L,N.yy,ne[1],E,S].concat(O)),typeof Q<"u")return Q;ie&&(T=T.slice(0,-1*ie*2),E=E.slice(0,-1*ie),S=S.slice(0,-1*ie)),T.push(this.productions_[ne[1]][0]),E.push(K.$),S.push(K._$),ye=R[T[T.length-2]][T[T.length-1]],T.push(ye);break;case 3:return!0}}return!0},"parse")},x=function(){var k={EOF:1,parseError:s(function(w,T){if(this.yy.parser)this.yy.parser.parseError(w,T);else throw new Error(w)},"parseError"),setInput:s(function(A,w){return this.yy=w||this.yy||{},this._input=A,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:s(function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var w=A.match(/(?:\r\n?|\n).*/g);return w?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),A},"input"),unput:s(function(A){var w=A.length,T=A.split(/(?:\r\n?|\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-w),this.offset-=w;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),T.length-1&&(this.yylineno-=T.length-1);var E=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:T?(T.length===C.length?this.yylloc.first_column:0)+C[C.length-T.length].length-T[0].length:this.yylloc.first_column-w},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-w]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(A){this.unput(this.match.slice(A))},"less"),pastInput:s(function(){var A=this.matched.substr(0,this.matched.length-this.match.length);return(A.length>20?"...":"")+A.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var A=this.match;return A.length<20&&(A+=this._input.substr(0,20-A.length)),(A.substr(0,20)+(A.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var A=this.pastInput(),w=new Array(A.length+1).join("-");return A+this.upcomingInput()+`
`+w+"^"},"showPosition"),test_match:s(function(A,w){var T,C,E;if(this.options.backtrack_lexer&&(E={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&&(E.yylloc.range=this.yylloc.range.slice(0))),C=A[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+A[0].length},this.yytext+=A[0],this.match+=A[0],this.matches=A,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(A[0].length),this.matched+=A[0],T=this.performAction.call(this,this.yy,this,w,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),T)return T;if(this._backtrack){for(var S in E)this[S]=E[S];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,w,T,C;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),S=0;S<E.length;S++)if(T=this._input.match(this.rules[E[S]]),T&&(!w||T[0].length>w[0].length)){if(w=T,C=S,this.options.backtrack_lexer){if(A=this.test_match(T,E[S]),A!==!1)return A;if(this._backtrack){w=!1;continue}else return!1}else if(!this.options.flex)break}return w?(A=this.test_match(w,E[C]),A!==!1?A:!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:s(function(){var w=this.next();return w||this.lex()},"lex"),begin:s(function(w){this.conditionStack.push(w)},"begin"),popState:s(function(){var w=this.conditionStack.length-1;return w>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(w){return w=this.conditionStack.length-1-Math.abs(w||0),w>=0?this.conditionStack[w]:"INITIAL"},"topState"),pushState:s(function(w){this.begin(w)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(w,T,C,E){var S=E;switch(C){case 0:return 10;case 1:return w.getLogger().debug("Found space-block"),31;break;case 2:return w.getLogger().debug("Found nl-block"),31;break;case 3:return w.getLogger().debug("Found space-block"),29;break;case 4:w.getLogger().debug(".",T.yytext);break;case 5:w.getLogger().debug("_",T.yytext);break;case 6:return 5;case 7:return T.yytext=-1,28;break;case 8:return T.yytext=T.yytext.replace(/columns\s+/,""),w.getLogger().debug("COLUMNS (LEX)",T.yytext),28;break;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:w.getLogger().debug("LEX: POPPING STR:",T.yytext),this.popState();break;case 14:return w.getLogger().debug("LEX: STR end:",T.yytext),"STR";break;case 15:return T.yytext=T.yytext.replace(/space\:/,""),w.getLogger().debug("SPACE NUM (LEX)",T.yytext),21;break;case 16:return T.yytext="1",w.getLogger().debug("COLUMNS (LEX)",T.yytext),21;break;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;break;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 22:return this.popState(),this.pushState("CLASSDEFID"),41;break;case 23:return this.popState(),42;break;case 24:return this.pushState("CLASS"),44;break;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;break;case 26:return this.popState(),46;break;case 27:return this.pushState("STYLE_STMNT"),47;break;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;break;case 29:return this.popState(),49;break;case 30:return this.pushState("acc_title"),"acc_title";break;case 31:return this.popState(),"acc_title_value";break;case 32:return this.pushState("acc_descr"),"acc_descr";break;case 33:return this.popState(),"acc_descr_value";break;case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 40:return this.popState(),w.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 41:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 43:return this.popState(),w.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 44:return this.popState(),w.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 45:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 46:return this.popState(),w.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 47:return this.popState(),w.getLogger().debug("Lex: ("),"NODE_DEND";break;case 48:return this.popState(),w.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 49:return this.popState(),w.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),w.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 51:return this.popState(),w.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 52:return this.popState(),w.getLogger().debug("Lex: )"),"NODE_DEND";break;case 53:return this.popState(),w.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 54:return this.popState(),w.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 55:return w.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;break;case 56:return w.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;break;case 57:return w.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;break;case 58:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 59:return w.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;break;case 60:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 61:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 62:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 63:return w.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;break;case 64:return w.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;break;case 65:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 66:return this.pushState("NODE"),36;break;case 67:return this.pushState("NODE"),36;break;case 68:return this.pushState("NODE"),36;break;case 69:return this.pushState("NODE"),36;break;case 70:return this.pushState("NODE"),36;break;case 71:return this.pushState("NODE"),36;break;case 72:return this.pushState("NODE"),36;break;case 73:return w.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;break;case 74:return this.pushState("BLOCK_ARROW"),w.getLogger().debug("LEX ARR START"),38;break;case 75:return w.getLogger().debug("Lex: NODE_ID",T.yytext),32;break;case 76:return w.getLogger().debug("Lex: EOF",T.yytext),8;break;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:w.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:w.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return w.getLogger().debug("LEX: NODE_DESCR:",T.yytext),"NODE_DESCR";break;case 84:w.getLogger().debug("LEX POPPING"),this.popState();break;case 85:w.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (right): dir:",T.yytext),"DIR";break;case 87:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (left):",T.yytext),"DIR";break;case 88:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (x):",T.yytext),"DIR";break;case 89:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (y):",T.yytext),"DIR";break;case 90:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (up):",T.yytext),"DIR";break;case 91:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (down):",T.yytext),"DIR";break;case 92:return T.yytext="]>",w.getLogger().debug("Lex (ARROW_DIR end):",T.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 93:return w.getLogger().debug("Lex: LINK","#"+T.yytext+"#"),15;break;case 94:return w.getLogger().debug("Lex: LINK",T.yytext),15;break;case 95:return w.getLogger().debug("Lex: LINK",T.yytext),15;break;case 96:return w.getLogger().debug("Lex: LINK",T.yytext),15;break;case 97:return w.getLogger().debug("Lex: START_LINK",T.yytext),this.pushState("LLABEL"),16;break;case 98:return w.getLogger().debug("Lex: START_LINK",T.yytext),this.pushState("LLABEL"),16;break;case 99:return w.getLogger().debug("Lex: START_LINK",T.yytext),this.pushState("LLABEL"),16;break;case 100:this.pushState("md_string");break;case 101:return w.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 102:return this.popState(),w.getLogger().debug("Lex: LINK","#"+T.yytext+"#"),15;break;case 103:return this.popState(),w.getLogger().debug("Lex: LINK",T.yytext),15;break;case 104:return this.popState(),w.getLogger().debug("Lex: LINK",T.yytext),15;break;case 105:return w.getLogger().debug("Lex: COLON",T.yytext),T.yytext=T.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return k}();v.lexer=x;function b(){this.yy={}}return s(b,"Parser"),b.prototype=v,v.Parser=b,new b}();XP.parser=XP;Pme=XP});function qKe(t){switch(V.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return V.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 WKe(t){switch(V.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}function HKe(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var Dl,KP,jP,Fme,zme,BKe,Gme,FKe,A7,zKe,$Ke,GKe,VKe,Vme,QP,jx,UKe,$me,YKe,XKe,jKe,KKe,QKe,ZKe,JKe,eQe,tQe,rQe,nQe,Ume,qme=_(()=>{"use strict";S9();zs();gt();it();Qt();Ci();Dl=new Map,KP=[],jP=new Map,Fme="color",zme="fill",BKe="bgFill",Gme=",",FKe=le(),A7=new Map,zKe=s(t=>$e.sanitizeText(t,FKe),"sanitizeText"),$Ke=s(function(t,e=""){let r=A7.get(t);r||(r={id:t,styles:[],textStyles:[]},A7.set(t,r)),e?.split(Gme).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Fme).exec(n)){let o=i.replace(zme,BKe).replace(Fme,zme);r.textStyles.push(o)}r.styles.push(i)})},"addStyleClass"),GKe=s(function(t,e=""){let r=Dl.get(t);e!=null&&(r.styles=e.split(Gme))},"addStyle2Node"),VKe=s(function(t,e){t.split(",").forEach(function(r){let n=Dl.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Dl.set(i,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),Vme=s((t,e)=>{let r=t.flat(),n=[];for(let i of r){if(i.label&&(i.label=zKe(i.label)),i.type==="classDef"){$Ke(i.id,i.css);continue}if(i.type==="applyClass"){VKe(i.id,i?.styleClass??"");continue}if(i.type==="applyStyles"){i?.stylesStr&&GKe(i.id,i?.stylesStr);continue}if(i.type==="column-setting")e.columns=i.columns??-1;else if(i.type==="edge"){let a=(jP.get(i.id)??0)+1;jP.set(i.id,a),i.id=a+"-"+i.id,KP.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);let a=Dl.get(i.id);if(a===void 0?Dl.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&Vme(i.children,i),i.type==="space"){let o=i.width??1;for(let l=0;l<o;l++){let u=Hr(i);u.id=u.id+"-"+l,Dl.set(u.id,u),n.push(u)}}else a===void 0&&n.push(i)}}e.children=n},"populateBlockDatabase"),QP=[],jx={id:"root",type:"composite",children:[],columns:-1},UKe=s(()=>{V.debug("Clear called"),br(),jx={id:"root",type:"composite",children:[],columns:-1},Dl=new Map([["root",jx]]),QP=[],A7=new Map,KP=[],jP=new Map},"clear");s(qKe,"typeStr2Type");s(WKe,"edgeTypeStr2Type");s(HKe,"edgeStrToEdgeData");$me=0,YKe=s(()=>($me++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$me),"generateId"),XKe=s(t=>{jx.children=t,Vme(t,jx),QP=jx.children},"setHierarchy"),jKe=s(t=>{let e=Dl.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),KKe=s(()=>[...Dl.values()],"getBlocksFlat"),QKe=s(()=>QP||[],"getBlocks"),ZKe=s(()=>KP,"getEdges"),JKe=s(t=>Dl.get(t),"getBlock"),eQe=s(t=>{Dl.set(t.id,t)},"setBlock"),tQe=s(()=>console,"getLogger"),rQe=s(function(){return A7},"getClasses"),nQe={getConfig:s(()=>_r().block,"getConfig"),typeStr2Type:qKe,edgeTypeStr2Type:WKe,edgeStrToEdgeData:HKe,getLogger:tQe,getBlocksFlat:KKe,getBlocks:QKe,getEdges:ZKe,setHierarchy:XKe,getBlock:JKe,setBlock:eQe,getColumns:jKe,getClasses:rQe,clear:UKe,generateId:YKe},Ume=nQe});var L7,iQe,Wme,Hme=_(()=>{"use strict";Ho();L7=s((t,e)=>{let r=D1,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return Fs(n,i,a,e)},"fade"),iQe=s(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: ${L7(t.edgeLabelBackground,.5)};
// background-color:
}
.node .cluster {
// fill: ${L7(t.mainBkg,.5)};
fill: ${L7(t.clusterBkg,.5)};
stroke: ${L7(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};
}
`,"getStyles"),Wme=iQe});function aQe(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 ZP(t,e,r=0,n=0){V.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"sieblingWidth",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 m of t.children)ZP(m,e);let o=sQe(t);i=o.width,a=o.height,V.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(let m of t.children)m.size&&(V.debug(`abc95 Setting size of children of ${t.id} id=${m.id} ${i} ${a} ${JSON.stringify(m.size)}`),m.size.width=i*(m.widthInColumns??1)+li*((m.widthInColumns??1)-1),m.size.height=a,m.size.x=0,m.size.y=0,V.debug(`abc95 updating size of ${t.id} children child:${m.id} maxWidth:${i} maxHeight:${a}`));for(let m of t.children)ZP(m,e,i,a);let l=t.columns??-1,u=0;for(let m of t.children)u+=m.widthInColumns??1;let h=t.children.length;l>0&&l<u&&(h=l);let f=Math.ceil(u/h),d=h*(i+li)+li,p=f*(a+li)+li;if(d<r){V.debug(`Detected to small siebling: abc95 ${t.id} sieblingWidth ${r} sieblingHeight ${n} width ${d}`),d=r,p=n;let m=(r-h*li-li)/h,g=(n-f*li-li)/f;V.debug("Size indata abc88",t.id,"childWidth",m,"maxWidth",i),V.debug("Size indata abc88",t.id,"childHeight",g,"maxHeight",a),V.debug("Size indata abc88 xSize",h,"padding",li);for(let y of t.children)y.size&&(y.size.width=m,y.size.height=g,y.size.x=0,y.size.y=0)}if(V.debug(`abc95 (finale calc) ${t.id} xSize ${h} ySize ${f} columns ${l}${t.children.length} width=${Math.max(d,t.size?.width||0)}`),d<(t?.size?.width||0)){d=t?.size?.width||0;let m=l>0?Math.min(t.children.length,l):t.children.length;if(m>0){let g=(d-m*li-li)/m;V.debug("abc95 (growing to fit) width",t.id,d,t.size?.width,g);for(let y of t.children)y.size&&(y.size.width=g)}}t.size={width:d,height:p,x:0,y:0}}V.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function Yme(t,e){V.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(V.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)*li;V.debug("widthOfChildren 88",i,"posX");let a=0;V.debug("abc91 block?.size?.x",t.id,t?.size?.x);let o=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-li,l=0;for(let u of t.children){let h=t;if(!u.size)continue;let{width:f,height:d}=u.size,{px:p,py:m}=aQe(r,a);if(m!=l&&(l=m,o=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-li,V.debug("New row in layout for block",t.id," and child ",u.id,l)),V.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${a} (px, py) ${p},${m} (${h?.size?.x},${h?.size?.y}) parent: ${h.id} width: ${f}${li}`),h.size){let g=f/2;u.size.x=o+li+g,V.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${o} new startingPosX${u.size.x} ${g} padding=${li} width=${f} halfWidth=${g} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(u?.widthInColumns??1)/2}`),o=u.size.x+g,u.size.y=h.size.y-h.size.height/2+m*(d+li)+d/2+li,V.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${o}${li}${g}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2${f*(u?.widthInColumns??1)/2}`)}u.children&&Yme(u,e),a+=u?.widthInColumns??1,V.debug("abc88 columnsPos",u,a)}}V.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function Xme(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:o,width:l,height:u}=t.size;a-l/2<e&&(e=a-l/2),o-u/2<r&&(r=o-u/2),a+l/2>n&&(n=a+l/2),o+u/2>i&&(i=o+u/2)}if(t.children)for(let a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=Xme(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function jme(t){let e=t.getBlock("root");if(!e)return;ZP(e,t,0,0),Yme(e,t),V.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:n,maxX:i,maxY:a}=Xme(e),o=a-n,l=i-r;return{x:r,y:n,width:l,height:o}}var li,sQe,Kme=_(()=>{"use strict";it();gt();li=le()?.block?.padding??8;s(aQe,"calculateBlockPosition");sQe=s(t=>{let e=0,r=0;for(let n of t.children){let{width:i,height:a,x:o,y:l}=n.size??{width:0,height:0,x:0,y:0};V.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",o,"y:",l,n.type),n.type!=="space"&&(i>e&&(e=i/(t.widthInColumns??1)),a>r&&(r=a))}return{width:e,height:r}},"getMaxChildSize");s(ZP,"setBlockSizes");s(Yme,"layoutBlocks");s(Xme,"findBounds");s(jme,"layout")});function Qme(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,o="",l;switch(n.type){case"round":a=5,o="rect";break;case"composite":a=0,o="composite",l=0;break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}let u=Hp(n?.styles??[]),h=n.label,f=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:u.labelStyle,shape:o,labelText:h,rx:a,ry:a,class:i,style:u.style,id:n.id,directions:n.directions,width:f.width,height:f.height,x:f.x,y:f.y,positioned:r,intersect:void 0,type:n.type,padding:l??_r()?.block?.padding??0}}async function oQe(t,e,r){let n=Qme(e,r,!1);if(n.type==="group")return;let i=await Zp(t,n),a=i.node().getBBox(),o=r.getBlock(n.id);o.size={width:a.width,height:a.height,x:0,y:0,node:i},r.setBlock(o),i.remove()}async function lQe(t,e,r){let n=Qme(e,r,!0);r.getBlock(n.id).type!=="space"&&(await Zp(t,n),e.intersect=n?.intersect,nv(n))}async function JP(t,e,r,n){for(let i of e)await n(t,i,r),i.children&&await JP(t,i.children,r,n)}async function Zme(t,e,r){await JP(t,e,r,oQe)}async function Jme(t,e,r){await JP(t,e,r,lQe)}async function ege(t,e,r,n,i){let a=new ir({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let o of r)o.size&&a.setNode(o.id,{width:o.size.width,height:o.size.height,intersect:o.intersect});for(let o of e)if(o.start&&o.end){let l=n.getBlock(o.start),u=n.getBlock(o.end);if(l?.size&&u?.size){let h=l.size,f=u.size,d=[{x:h.x,y:h.y},{x:h.x+(f.x-h.x)/2,y:h.y+(f.y-h.y)/2},{x:f.x,y:f.y}];aT(t,{v:o.start,w:o.end,name:o.id},{...o,arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:d,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),o.label&&(await nT(t,{...o,label:o.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:d,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),iT({...o,x:d[1].x,y:d[1].y},{originalPath:d}))}}}var tge=_(()=>{"use strict";la();zs();zN();r5();pr();s(Qme,"getNodeFromBlock");s(oQe,"calculateBlockSize");s(lQe,"insertBlockPositioned");s(JP,"performOperations");s(Zme,"calculateBlockSizes");s(Jme,"insertBlocks");s(ege,"insertEdges")});var cQe,uQe,rge,nge=_(()=>{"use strict";Xt();zs();FN();it();Un();Kme();tge();cQe=s(function(t,e){return e.db.getClasses()},"getClasses"),uQe=s(async function(t,e,r,n){let{securityLevel:i,block:a}=_r(),o=n.db,l;i==="sandbox"&&(l=Me("#i"+e));let u=i==="sandbox"?Me(l.nodes()[0].contentDocument.body):Me("body"),h=i==="sandbox"?u.select(`[id="${e}"]`):Me(`[id="${e}"]`);Zw(h,["point","circle","cross"],n.type,e);let d=o.getBlocks(),p=o.getBlocksFlat(),m=o.getEdges(),g=h.insert("g").attr("class","block");await Zme(g,d,o);let y=jme(o);if(await Jme(g,d,o),await ege(g,m,p,o,e),y){let v=y,x=Math.max(1,Math.round(.125*(v.width/v.height))),b=v.height+x+10,k=v.width+10,{useMaxWidth:A}=a;xr(h,b,k,!!A),V.debug("Here Bounds",y,v),h.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),rge={draw:uQe,getClasses:cQe}});var ige={};ur(ige,{diagram:()=>hQe});var hQe,age=_(()=>{"use strict";Bme();qme();Hme();nge();hQe={parser:Pme,db:Ume,renderer:rge,styles:Wme}});var bet={};ur(bet,{default:()=>xet});Y7();Mf();var dY="c4",Ywe=s(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),Xwe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(fY(),hY));return{id:dY,diagram:t}},"loader"),jwe={id:dY,detector:Ywe,loader:Xwe},pY=jwe;var _te="flowchart",iDe=s((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),aDe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Nk(),Ik));return{id:_te,diagram:t}},"loader"),sDe={id:_te,detector:iDe,loader:aDe},Ate=sDe;var Lte="flowchart-v2",oDe=s((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t),"detector"),lDe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Nk(),Ik));return{id:Lte,diagram:t}},"loader"),cDe={id:Lte,detector:oDe,loader:lDe},Dte=cDe;var are="er",FDe=s(t=>/^\s*erDiagram/.test(t),"detector"),zDe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ire(),nre));return{id:are,diagram:t}},"loader"),$De={id:are,detector:FDe,loader:zDe},sre=$De;var hoe="gitGraph",sOe=s(t=>/^\s*gitGraph/.test(t),"detector"),oOe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(uoe(),coe));return{id:hoe,diagram:t}},"loader"),lOe={id:hoe,detector:sOe,loader:oOe},foe=lOe;var Voe="gantt",jOe=s(t=>/^\s*gantt/.test(t),"detector"),KOe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Goe(),$oe));return{id:Voe,diagram:t}},"loader"),QOe={id:Voe,detector:jOe,loader:KOe},Uoe=QOe;var Zoe="info",nPe=s(t=>/^\s*info/.test(t),"detector"),iPe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Qoe(),Koe));return{id:Zoe,diagram:t}},"loader"),Joe={id:Zoe,detector:nPe,loader:iPe};var cle="pie",yPe=s(t=>/^\s*pie/.test(t),"detector"),vPe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(lle(),ole));return{id:cle,diagram:t}},"loader"),ule={id:cle,detector:yPe,loader:vPe};var Tle="quadrantChart",PPe=s(t=>/^\s*quadrantChart/.test(t),"detector"),BPe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(wle(),kle));return{id:Tle,diagram:t}},"loader"),FPe={id:Tle,detector:PPe,loader:BPe},Ele=FPe;var Qle="xychart",eBe=s(t=>/^\s*xychart-beta/.test(t),"detector"),tBe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Kle(),jle));return{id:Qle,diagram:t}},"loader"),rBe={id:Qle,detector:eBe,loader:tBe},Zle=rBe;var pce="requirement",DBe=s(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),RBe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(dce(),fce));return{id:pce,diagram:t}},"loader"),MBe={id:pce,detector:DBe,loader:RBe},mce=MBe;var Vce="sequence",OFe=s(t=>/^\s*sequenceDiagram/.test(t),"detector"),PFe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Gce(),$ce));return{id:Vce,diagram:t}},"loader"),BFe={id:Vce,detector:OFe,loader:PFe},Uce=BFe;var iue="class",yze=s((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),vze=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(nue(),rue));return{id:iue,diagram:t}},"loader"),xze={id:iue,detector:yze,loader:vze},aue=xze;var Iue="classDiagram",Hze=s((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),Yze=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Mue(),Rue));return{id:Iue,diagram:t}},"loader"),Xze={id:Iue,detector:Hze,loader:Yze},Nue=Xze;var Che="state",U$e=s((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),q$e=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ehe(),The));return{id:Che,diagram:t}},"loader"),W$e={id:Che,detector:U$e,loader:q$e},She=W$e;var Lhe="stateDiagram",Y$e=s((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),X$e=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ahe(),_he));return{id:Lhe,diagram:t}},"loader"),j$e={id:Lhe,detector:Y$e,loader:X$e},Dhe=j$e;var Hhe="journey",gGe=s(t=>/^\s*journey/.test(t),"detector"),yGe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Whe(),qhe));return{id:Hhe,diagram:t}},"loader"),vGe={id:Hhe,detector:gGe,loader:yGe},Yhe=vGe;it();p0();Un();var xGe=s((t,e,r)=>{V.debug(`rendering svg for syntax error
`);let n=Bo(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),xr(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"),kO={draw:xGe},Xhe=kO;var bGe={db:{},renderer:kO,parser:{parse:s(()=>{},"parse")}},jhe=bGe;var Khe="flowchart-elk",kGe=s((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),wGe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Nk(),Ik));return{id:Khe,diagram:t}},"loader"),TGe={id:Khe,detector:kGe,loader:wGe},Qhe=TGe;var Tfe="timeline",VGe=s(t=>/^\s*timeline/.test(t),"detector"),UGe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(wfe(),kfe));return{id:Tfe,diagram:t}},"loader"),qGe={id:Tfe,detector:VGe,loader:UGe},Efe=qGe;var Upe="mindmap",Kje=s(t=>/^\s*mindmap/.test(t),"detector"),Qje=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Vpe(),Gpe));return{id:Upe,diagram:t}},"loader"),Zje={id:Upe,detector:Kje,loader:Qje},qpe=Zje;var Tme="sankey",bKe=s(t=>/^\s*sankey-beta/.test(t),"detector"),kKe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(wme(),kme));return{id:Tme,diagram:t}},"loader"),wKe={id:Tme,detector:bKe,loader:kKe},Eme=wKe;var Nme="packet",OKe=s(t=>/^\s*packet-beta/.test(t),"detector"),PKe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ime(),Mme));return{id:Nme,diagram:t}},"loader"),Ome={id:Nme,detector:OKe,loader:PKe};var sge="block",fQe=s(t=>/^\s*block-beta/.test(t),"detector"),dQe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(age(),ige));return{id:sge,diagram:t}},"loader"),pQe={id:sge,detector:fQe,loader:dQe},oge=pQe;Mf();gt();var lge=!1,o1=s(()=>{lge||(lge=!0,Gf("error",jhe,t=>t.toLowerCase().trim()==="error"),Gf("---",{db:{clear:s(()=>{},"clear")},styles:{},renderer:{draw:s(()=>{},"draw")},parser:{parse:s(()=>{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:s(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),fb(pY,Nue,aue,sre,Uoe,Joe,ule,mce,Uce,Qhe,Dte,Ate,qpe,Efe,foe,Dhe,She,Yhe,Ele,Eme,Ome,Zle,oge))},"addDiagrams");it();Mf();gt();var cge=s(async()=>{V.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(Rf).map(async([r,{detector:n,loader:i}])=>{if(i)try{W1(r)}catch{try{let{diagram:a,id:o}=await i();Gf(o,a,n)}catch(a){throw V.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Rf[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){V.error(`Failed to load ${e.length} external diagrams`);for(let r of e)V.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");it();Xt();var D7="comm",R7="rule",M7="decl";var uge="@import";var hge="@keyframes";var fge="@layer";var eB=Math.abs,Kx=String.fromCharCode;function I7(t){return t.trim()}s(I7,"trim");function Qx(t,e,r){return t.replace(e,r)}s(Qx,"replace");function dge(t,e,r){return t.indexOf(e,r)}s(dge,"indexof");function G0(t,e){return t.charCodeAt(e)|0}s(G0,"charat");function V0(t,e,r){return t.slice(e,r)}s(V0,"substr");function Uo(t){return t.length}s(Uo,"strlen");function pge(t){return t.length}s(pge,"sizeof");function l1(t,e){return e.push(t),t}s(l1,"append");var N7=1,c1=1,mge=0,qo=0,gi=0,u1="";function O7(t,e,r,n,i,a,o,l){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:N7,column:c1,length:o,return:"",siblings:l}}s(O7,"node");function gge(){return gi}s(gge,"char");function yge(){return gi=qo>0?G0(u1,--qo):0,c1--,gi===10&&(c1=1,N7--),gi}s(yge,"prev");function Wo(){return gi=qo<mge?G0(u1,qo++):0,c1++,gi===10&&(c1=1,N7++),gi}s(Wo,"next");function Ef(){return G0(u1,qo)}s(Ef,"peek");function Zx(){return qo}s(Zx,"caret");function P7(t,e){return V0(u1,t,e)}s(P7,"slice");function tB(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}s(tB,"token");function vge(t){return N7=c1=1,mge=Uo(u1=t),qo=0,[]}s(vge,"alloc");function xge(t){return u1="",t}s(xge,"dealloc");function B7(t){return I7(P7(qo-1,rB(t===91?t+2:t===40?t+1:t)))}s(B7,"delimit");function bge(t){for(;(gi=Ef())&&gi<33;)Wo();return tB(t)>2||tB(gi)>3?"":" "}s(bge,"whitespace");function kge(t,e){for(;--e&&Wo()&&!(gi<48||gi>102||gi>57&&gi<65||gi>70&&gi<97););return P7(t,Zx()+(e<6&&Ef()==32&&Wo()==32))}s(kge,"escaping");function rB(t){for(;Wo();)switch(gi){case t:return qo;case 34:case 39:t!==34&&t!==39&&rB(gi);break;case 40:t===41&&rB(t);break;case 92:Wo();break}return qo}s(rB,"delimiter");function wge(t,e){for(;Wo()&&t+gi!==57;)if(t+gi===84&&Ef()===47)break;return"/*"+P7(e,qo-1)+"*"+Kx(t===47?t:Wo())}s(wge,"commenter");function Tge(t){for(;!tB(Ef());)Wo();return P7(t,qo)}s(Tge,"identifier");function Sge(t){return xge(F7("",null,null,null,[""],t=vge(t),0,[0],t))}s(Sge,"compile");function F7(t,e,r,n,i,a,o,l,u){for(var h=0,f=0,d=o,p=0,m=0,g=0,y=1,v=1,x=1,b=0,k="",A=i,w=a,T=n,C=k;v;)switch(g=b,b=Wo()){case 40:if(g!=108&&G0(C,d-1)==58){dge(C+=Qx(B7(b),"&","&\f"),"&\f",eB(h?l[h-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:C+=B7(b);break;case 9:case 10:case 13:case 32:C+=bge(g);break;case 92:C+=kge(Zx()-1,7);continue;case 47:switch(Ef()){case 42:case 47:l1(mQe(wge(Wo(),Zx()),e,r,u),u);break;default:C+="/"}break;case 123*y:l[h++]=Uo(C)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+f:x==-1&&(C=Qx(C,/\f/g,"")),m>0&&Uo(C)-d&&l1(m>32?Cge(C+";",n,r,d-1,u):Cge(Qx(C," ","")+";",n,r,d-2,u),u);break;case 59:C+=";";default:if(l1(T=Ege(C,e,r,h,f,i,l,k,A=[],w=[],d,a),a),b===123)if(f===0)F7(C,e,T,T,A,a,d,l,w);else switch(p===99&&G0(C,3)===110?100:p){case 100:case 108:case 109:case 115:F7(t,T,T,n&&l1(Ege(t,T,T,0,0,i,l,k,i,A=[],d,w),w),i,w,d,l,n?A:w);break;default:F7(C,T,T,T,[""],w,0,l,w)}}h=f=m=0,y=x=1,k=C="",d=o;break;case 58:d=1+Uo(C),m=g;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&yge()==125)continue}switch(C+=Kx(b),b*y){case 38:x=f>0?1:(C+="\f",-1);break;case 44:l[h++]=(Uo(C)-1)*x,x=1;break;case 64:Ef()===45&&(C+=B7(Wo())),p=Ef(),f=d=Uo(k=C+=Tge(Zx())),b++;break;case 45:g===45&&Uo(C)==2&&(y=0)}}return a}s(F7,"parse");function Ege(t,e,r,n,i,a,o,l,u,h,f,d){for(var p=i-1,m=i===0?a:[""],g=pge(m),y=0,v=0,x=0;y<n;++y)for(var b=0,k=V0(t,p+1,p=eB(v=o[y])),A=t;b<g;++b)(A=I7(v>0?m[b]+" "+k:Qx(k,/&\f/g,m[b])))&&(u[x++]=A);return O7(t,e,r,i===0?R7:l,u,h,f,d)}s(Ege,"ruleset");function mQe(t,e,r,n){return O7(t,e,r,D7,Kx(gge()),V0(t,2,-2),0,n)}s(mQe,"comment");function Cge(t,e,r,n,i){return O7(t,e,r,M7,V0(t,0,n),V0(t,n+1,-1),n,i)}s(Cge,"declaration");function z7(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}s(z7,"serialize");function _ge(t,e,r,n){switch(t.type){case fge:if(t.children.length)break;case uge:case M7:return t.return=t.return||t.value;case D7:return"";case hge:return t.return=t.value+"{"+z7(t.children,n)+"}";case R7:if(!Uo(t.value=t.props.join(",")))return""}return Uo(r=z7(t.children,n))?t.return=t.value+"{"+r+"}":""}s(_ge,"stringify");JI();zs();zs();gt();Mf();K7();pr();var h1=class t{constructor(e,r,n,i,a){this.type=e;this.text=r;this.db=n;this.parser=i;this.renderer=a}static{s(this,"Diagram")}static async fromText(e,r={}){let n=_r(),i=H0(e,n);e=rY(e)+`
`;try{W1(i)}catch{let h=RB(i);if(!h)throw new W0(`Diagram ${i} not found.`);let{id:f,diagram:d}=await h();Gf(f,d)}let{db:a,parser:o,renderer:l,init:u}=W1(i);return o.parser&&(o.parser.yy=a),a.clear?.(),u?.(n),r.title&&a.setDiagramTitle?.(r.title),await o.parse(e),new t(i,e,a,o,l)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}};var Age=[];var Lge=s(()=>{Age.forEach(t=>{t()}),Age=[]},"attachFunctions");it();lC();xb();var _1e=ka(yE(),1);Qt();mk();var gQe="graphics-document document";function Dge(t,e){t.attr("role",gQe),e!==""&&t.attr("aria-roledescription",e)}s(Dge,"setA11yDiagramInfo");function Rge(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)}}}s(Rge,"addSVGa11yTitleDescription");var Mge=s(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");hb();function Xge(t){return typeof t>"u"||t===null}s(Xge,"isNothing");function yQe(t){return typeof t=="object"&&t!==null}s(yQe,"isObject");function vQe(t){return Array.isArray(t)?t:Xge(t)?[]:[t]}s(vQe,"toArray");function xQe(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;r<n;r+=1)i=a[r],t[i]=e[i];return t}s(xQe,"extend");function bQe(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r}s(bQe,"repeat");function kQe(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}s(kQe,"isNegativeZero");var wQe=Xge,TQe=yQe,EQe=vQe,CQe=bQe,SQe=kQe,_Qe=xQe,Fi={isNothing:wQe,isObject:TQe,toArray:EQe,repeat:CQe,isNegativeZero:SQe,extend:_Qe};function jge(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
`+t.mark.snippet),n+" "+r):n}s(jge,"formatError");function eb(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=jge(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}s(eb,"YAMLException$1");eb.prototype=Object.create(Error.prototype);eb.prototype.constructor=eb;eb.prototype.toString=s(function(e){return this.name+": "+jge(this,e)},"toString");var Ns=eb;function nB(t,e,r,n,i){var a="",o="",l=Math.floor(i/2)-1;return n-e>l&&(a=" ... ",e=n-l+a.length),r-n>l&&(o=" ...",r=n+l-o.length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+o,pos:n-e+a.length}}s(nB,"getLine");function iB(t,e){return Fi.repeat(" ",e-t.length)+t}s(iB,"padStart");function AQe(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,o=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var l="",u,h,f=Math.min(t.line+e.linesAfter,i.length).toString().length,d=e.maxLength-(e.indent+f+3);for(u=1;u<=e.linesBefore&&!(o-u<0);u++)h=nB(t.buffer,n[o-u],i[o-u],t.position-(n[o]-n[o-u]),d),l=Fi.repeat(" ",e.indent)+iB((t.line-u+1).toString(),f)+" | "+h.str+`
`+l;for(h=nB(t.buffer,n[o],i[o],t.position,d),l+=Fi.repeat(" ",e.indent)+iB((t.line+1).toString(),f)+" | "+h.str+`
`,l+=Fi.repeat("-",e.indent+f+3+h.pos)+`^
`,u=1;u<=e.linesAfter&&!(o+u>=i.length);u++)h=nB(t.buffer,n[o+u],i[o+u],t.position-(n[o]-n[o+u]),d),l+=Fi.repeat(" ",e.indent)+iB((t.line+u+1).toString(),f)+" | "+h.str+`
`;return l.replace(/\n$/,"")}s(AQe,"makeSnippet");var LQe=AQe,DQe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],RQe=["scalar","sequence","mapping"];function MQe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}s(MQe,"compileStyleAliases");function IQe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(DQe.indexOf(r)===-1)throw new Ns('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=MQe(e.styleAliases||null),RQe.indexOf(this.kind)===-1)throw new Ns('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}s(IQe,"Type$1");var Na=IQe;function Ige(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,o){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=o)}),r[i]=n}),r}s(Ige,"compileList");function NQe(){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(s(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}s(NQe,"compileMap");function sB(t){return this.extend(t)}s(sB,"Schema$1");sB.prototype.extend=s(function(e){var r=[],n=[];if(e instanceof Na)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 Ns("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Na))throw new Ns("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Ns("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Ns("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 Na))throw new Ns("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(sB.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=Ige(i,"implicit"),i.compiledExplicit=Ige(i,"explicit"),i.compiledTypeMap=NQe(i.compiledImplicit,i.compiledExplicit),i},"extend");var OQe=sB,PQe=new Na("tag:yaml.org,2002:str",{kind:"scalar",construct:s(function(t){return t!==null?t:""},"construct")}),BQe=new Na("tag:yaml.org,2002:seq",{kind:"sequence",construct:s(function(t){return t!==null?t:[]},"construct")}),FQe=new Na("tag:yaml.org,2002:map",{kind:"mapping",construct:s(function(t){return t!==null?t:{}},"construct")}),zQe=new OQe({explicit:[PQe,BQe,FQe]});function $Qe(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}s($Qe,"resolveYamlNull");function GQe(){return null}s(GQe,"constructYamlNull");function VQe(t){return t===null}s(VQe,"isNull");var UQe=new Na("tag:yaml.org,2002:null",{kind:"scalar",resolve:$Qe,construct:GQe,predicate:VQe,represent:{canonical:s(function(){return"~"},"canonical"),lowercase:s(function(){return"null"},"lowercase"),uppercase:s(function(){return"NULL"},"uppercase"),camelcase:s(function(){return"Null"},"camelcase"),empty:s(function(){return""},"empty")},defaultStyle:"lowercase"});function qQe(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}s(qQe,"resolveYamlBoolean");function WQe(t){return t==="true"||t==="True"||t==="TRUE"}s(WQe,"constructYamlBoolean");function HQe(t){return Object.prototype.toString.call(t)==="[object Boolean]"}s(HQe,"isBoolean");var YQe=new Na("tag:yaml.org,2002:bool",{kind:"scalar",resolve:qQe,construct:WQe,predicate:HQe,represent:{lowercase:s(function(t){return t?"true":"false"},"lowercase"),uppercase:s(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:s(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function XQe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}s(XQe,"isHexCode");function jQe(t){return 48<=t&&t<=55}s(jQe,"isOctCode");function KQe(t){return 48<=t&&t<=57}s(KQe,"isDecCode");function QQe(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!XQe(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!jQe(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(!KQe(t.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}s(QQe,"resolveYamlInteger");function ZQe(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}s(ZQe,"constructYamlInteger");function JQe(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Fi.isNegativeZero(t)}s(JQe,"isInteger");var eZe=new Na("tag:yaml.org,2002:int",{kind:"scalar",resolve:QQe,construct:ZQe,predicate:JQe,represent:{binary:s(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:s(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:s(function(t){return t.toString(10)},"decimal"),hexadecimal:s(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"]}}),tZe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function rZe(t){return!(t===null||!tZe.test(t)||t[t.length-1]==="_")}s(rZe,"resolveYamlFloat");function nZe(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}s(nZe,"constructYamlFloat");var iZe=/^[-+]?[0-9]+e/;function aZe(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(Fi.isNegativeZero(t))return"-0.0";return r=t.toString(10),iZe.test(r)?r.replace("e",".e"):r}s(aZe,"representYamlFloat");function sZe(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Fi.isNegativeZero(t))}s(sZe,"isFloat");var oZe=new Na("tag:yaml.org,2002:float",{kind:"scalar",resolve:rZe,construct:nZe,predicate:sZe,represent:aZe,defaultStyle:"lowercase"}),Kge=zQe.extend({implicit:[UQe,YQe,eZe,oZe]}),lZe=Kge,Qge=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zge=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]))?))?$");function cZe(t){return t===null?!1:Qge.exec(t)!==null||Zge.exec(t)!==null}s(cZe,"resolveYamlTimestamp");function uZe(t){var e,r,n,i,a,o,l,u=0,h=null,f,d,p;if(e=Qge.exec(t),e===null&&(e=Zge.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],o=+e[5],l=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(f=+e[10],d=+(e[11]||0),h=(f*60+d)*6e4,e[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,n,i,a,o,l,u)),h&&p.setTime(p.getTime()-h),p}s(uZe,"constructYamlTimestamp");function hZe(t){return t.toISOString()}s(hZe,"representYamlTimestamp");var fZe=new Na("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:cZe,construct:uZe,instanceOf:Date,represent:hZe});function dZe(t){return t==="<<"||t===null}s(dZe,"resolveYamlMerge");var pZe=new Na("tag:yaml.org,2002:merge",{kind:"scalar",resolve:dZe}),hB=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function mZe(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=hB;for(r=0;r<i;r++)if(e=a.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}s(mZe,"resolveYamlBinary");function gZe(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=hB,o=0,l=[];for(e=0;e<i;e++)e%4===0&&e&&(l.push(o>>16&255),l.push(o>>8&255),l.push(o&255)),o=o<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(l.push(o>>16&255),l.push(o>>8&255),l.push(o&255)):r===18?(l.push(o>>10&255),l.push(o>>2&255)):r===12&&l.push(o>>4&255),new Uint8Array(l)}s(gZe,"constructYamlBinary");function yZe(t){var e="",r=0,n,i,a=t.length,o=hB;for(n=0;n<a;n++)n%3===0&&n&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):i===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):i===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}s(yZe,"representYamlBinary");function vZe(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}s(vZe,"isBinary");var xZe=new Na("tag:yaml.org,2002:binary",{kind:"scalar",resolve:mZe,construct:gZe,predicate:vZe,represent:yZe}),bZe=Object.prototype.hasOwnProperty,kZe=Object.prototype.toString;function wZe(t){if(t===null)return!0;var e=[],r,n,i,a,o,l=t;for(r=0,n=l.length;r<n;r+=1){if(i=l[r],o=!1,kZe.call(i)!=="[object Object]")return!1;for(a in i)if(bZe.call(i,a))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(a)===-1)e.push(a);else return!1}return!0}s(wZe,"resolveYamlOmap");function TZe(t){return t!==null?t:[]}s(TZe,"constructYamlOmap");var EZe=new Na("tag:yaml.org,2002:omap",{kind:"sequence",resolve:wZe,construct:TZe}),CZe=Object.prototype.toString;function SZe(t){if(t===null)return!0;var e,r,n,i,a,o=t;for(a=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(n=o[e],CZe.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;a[e]=[i[0],n[i[0]]]}return!0}s(SZe,"resolveYamlPairs");function _Ze(t){if(t===null)return[];var e,r,n,i,a,o=t;for(a=new Array(o.length),e=0,r=o.length;e<r;e+=1)n=o[e],i=Object.keys(n),a[e]=[i[0],n[i[0]]];return a}s(_Ze,"constructYamlPairs");var AZe=new Na("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:SZe,construct:_Ze}),LZe=Object.prototype.hasOwnProperty;function DZe(t){if(t===null)return!0;var e,r=t;for(e in r)if(LZe.call(r,e)&&r[e]!==null)return!1;return!0}s(DZe,"resolveYamlSet");function RZe(t){return t!==null?t:{}}s(RZe,"constructYamlSet");var MZe=new Na("tag:yaml.org,2002:set",{kind:"mapping",resolve:DZe,construct:RZe}),Jge=lZe.extend({implicit:[fZe,pZe],explicit:[xZe,EZe,AZe,MZe]}),Sf=Object.prototype.hasOwnProperty,$7=1,e1e=2,t1e=3,G7=4,aB=1,IZe=2,Nge=3,NZe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,OZe=/[\x85\u2028\u2029]/,PZe=/[,\[\]\{\}]/,r1e=/^(?:!|!!|![a-z\-]+!)$/i,n1e=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Oge(t){return Object.prototype.toString.call(t)}s(Oge,"_class");function Bc(t){return t===10||t===13}s(Bc,"is_EOL");function q0(t){return t===9||t===32}s(q0,"is_WHITE_SPACE");function Os(t){return t===9||t===32||t===10||t===13}s(Os,"is_WS_OR_EOL");function d1(t){return t===44||t===91||t===93||t===123||t===125}s(d1,"is_FLOW_INDICATOR");function BZe(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}s(BZe,"fromHexCode");function FZe(t){return t===120?2:t===117?4:t===85?8:0}s(FZe,"escapedHexLen");function zZe(t){return 48<=t&&t<=57?t-48:-1}s(zZe,"fromDecimalCode");function Pge(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}s(Pge,"simpleEscapeSequence");function $Ze(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}s($Ze,"charFromCodepoint");var i1e=new Array(256),a1e=new Array(256);for(U0=0;U0<256;U0++)i1e[U0]=Pge(U0)?1:0,a1e[U0]=Pge(U0);var U0;function GZe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Jge,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=[]}s(GZe,"State$1");function s1e(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=LQe(r),new Ns(e,r)}s(s1e,"generateError");function Lt(t,e){throw s1e(t,e)}s(Lt,"throwError");function V7(t,e){t.onWarning&&t.onWarning.call(null,s1e(t,e))}s(V7,"throwWarning");var Bge={YAML:s(function(e,r,n){var i,a,o;e.version!==null&&Lt(e,"duplication of %YAML directive"),n.length!==1&&Lt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Lt(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),o=parseInt(i[2],10),a!==1&&Lt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&V7(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:s(function(e,r,n){var i,a;n.length!==2&&Lt(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],r1e.test(i)||Lt(e,"ill-formed tag handle (first argument) of the TAG directive"),Sf.call(e.tagMap,i)&&Lt(e,'there is a previously declared suffix for "'+i+'" tag handle'),n1e.test(a)||Lt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Lt(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};function Cf(t,e,r,n){var i,a,o,l;if(e<r){if(l=t.input.slice(e,r),n)for(i=0,a=l.length;i<a;i+=1)o=l.charCodeAt(i),o===9||32<=o&&o<=1114111||Lt(t,"expected valid JSON character");else NZe.test(l)&&Lt(t,"the stream contains non-printable characters");t.result+=l}}s(Cf,"captureSegment");function Fge(t,e,r,n){var i,a,o,l;for(Fi.isObject(r)||Lt(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),o=0,l=i.length;o<l;o+=1)a=i[o],Sf.call(e,a)||(e[a]=r[a],n[a]=!0)}s(Fge,"mergeMappings");function p1(t,e,r,n,i,a,o,l,u){var h,f;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),h=0,f=i.length;h<f;h+=1)Array.isArray(i[h])&&Lt(t,"nested arrays are not supported inside keys"),typeof i=="object"&&Oge(i[h])==="[object Object]"&&(i[h]="[object Object]");if(typeof i=="object"&&Oge(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,f=a.length;h<f;h+=1)Fge(t,e,a[h],r);else Fge(t,e,a,r);else!t.json&&!Sf.call(r,i)&&Sf.call(e,i)&&(t.line=o||t.line,t.lineStart=l||t.lineStart,t.position=u||t.position,Lt(t,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[i]=a,delete r[i];return e}s(p1,"storeMappingPair");function fB(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Lt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}s(fB,"readLineBreak");function yi(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;q0(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(Bc(i))for(fB(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&V7(t,"deficient indentation"),n}s(yi,"skipSeparationSpace");function W7(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Os(r)))}s(W7,"testDocumentSeparator");function dB(t,e){e===1?t.result+=" ":e>1&&(t.result+=Fi.repeat(`
`,e-1))}s(dB,"writeFoldedLines");function VZe(t,e,r){var n,i,a,o,l,u,h,f,d=t.kind,p=t.result,m;if(m=t.input.charCodeAt(t.position),Os(m)||d1(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=t.input.charCodeAt(t.position+1),Os(i)||r&&d1(i)))return!1;for(t.kind="scalar",t.result="",a=o=t.position,l=!1;m!==0;){if(m===58){if(i=t.input.charCodeAt(t.position+1),Os(i)||r&&d1(i))break}else if(m===35){if(n=t.input.charCodeAt(t.position-1),Os(n))break}else{if(t.position===t.lineStart&&W7(t)||r&&d1(m))break;if(Bc(m))if(u=t.line,h=t.lineStart,f=t.lineIndent,yi(t,!1,-1),t.lineIndent>=e){l=!0,m=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=u,t.lineStart=h,t.lineIndent=f;break}}l&&(Cf(t,a,o,!1),dB(t,t.line-u),a=o=t.position,l=!1),q0(m)||(o=t.position+1),m=t.input.charCodeAt(++t.position)}return Cf(t,a,o,!1),t.result?!0:(t.kind=d,t.result=p,!1)}s(VZe,"readPlainScalar");function UZe(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(Cf(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 Bc(r)?(Cf(t,n,i,!0),dB(t,yi(t,!1,e)),n=i=t.position):t.position===t.lineStart&&W7(t)?Lt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Lt(t,"unexpected end of the stream within a single quoted scalar")}s(UZe,"readSingleQuotedScalar");function qZe(t,e){var r,n,i,a,o,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return Cf(t,r,t.position,!0),t.position++,!0;if(l===92){if(Cf(t,r,t.position,!0),l=t.input.charCodeAt(++t.position),Bc(l))yi(t,!1,e);else if(l<256&&i1e[l])t.result+=a1e[l],t.position++;else if((o=FZe(l))>0){for(i=o,a=0;i>0;i--)l=t.input.charCodeAt(++t.position),(o=BZe(l))>=0?a=(a<<4)+o:Lt(t,"expected hexadecimal character");t.result+=$Ze(a),t.position++}else Lt(t,"unknown escape sequence");r=n=t.position}else Bc(l)?(Cf(t,r,n,!0),dB(t,yi(t,!1,e)),r=n=t.position):t.position===t.lineStart&&W7(t)?Lt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Lt(t,"unexpected end of the stream within a double quoted scalar")}s(qZe,"readDoubleQuotedScalar");function WZe(t,e){var r=!0,n,i,a,o=t.tag,l,u=t.anchor,h,f,d,p,m,g=Object.create(null),y,v,x,b;if(b=t.input.charCodeAt(t.position),b===91)f=93,m=!1,l=[];else if(b===123)f=125,m=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),b=t.input.charCodeAt(++t.position);b!==0;){if(yi(t,!0,e),b=t.input.charCodeAt(t.position),b===f)return t.position++,t.tag=o,t.anchor=u,t.kind=m?"mapping":"sequence",t.result=l,!0;r?b===44&&Lt(t,"expected the node content, but found ','"):Lt(t,"missed comma between flow collection entries"),v=y=x=null,d=p=!1,b===63&&(h=t.input.charCodeAt(t.position+1),Os(h)&&(d=p=!0,t.position++,yi(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,m1(t,e,$7,!1,!0),v=t.tag,y=t.result,yi(t,!0,e),b=t.input.charCodeAt(t.position),(p||t.line===n)&&b===58&&(d=!0,b=t.input.charCodeAt(++t.position),yi(t,!0,e),m1(t,e,$7,!1,!0),x=t.result),m?p1(t,l,g,v,y,x,n,i,a):d?l.push(p1(t,null,g,v,y,x,n,i,a)):l.push(y),yi(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}Lt(t,"unexpected end of the stream within a flow collection")}s(WZe,"readFlowCollection");function HZe(t,e){var r,n,i=aB,a=!1,o=!1,l=e,u=0,h=!1,f,d;if(d=t.input.charCodeAt(t.position),d===124)n=!1;else if(d===62)n=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)aB===i?i=d===43?Nge:IZe:Lt(t,"repeat of a chomping mode identifier");else if((f=zZe(d))>=0)f===0?Lt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Lt(t,"repeat of an indentation width identifier"):(l=e+f-1,o=!0);else break;if(q0(d)){do d=t.input.charCodeAt(++t.position);while(q0(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!Bc(d)&&d!==0)}for(;d!==0;){for(fB(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!o||t.lineIndent<l)&&d===32;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>l&&(l=t.lineIndent),Bc(d)){u++;continue}if(t.lineIndent<l){i===Nge?t.result+=Fi.repeat(`
`,a?1+u:u):i===aB&&a&&(t.result+=`
`);break}for(n?q0(d)?(h=!0,t.result+=Fi.repeat(`
`,a?1+u:u)):h?(h=!1,t.result+=Fi.repeat(`
`,u+1)):u===0?a&&(t.result+=" "):t.result+=Fi.repeat(`
`,u):t.result+=Fi.repeat(`
`,a?1+u:u),a=!0,o=!0,u=0,r=t.position;!Bc(d)&&d!==0;)d=t.input.charCodeAt(++t.position);Cf(t,r,t.position,!1)}return!0}s(HZe,"readBlockScalar");function zge(t,e){var r,n=t.tag,i=t.anchor,a=[],o,l=!1,u;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),u=t.input.charCodeAt(t.position);u!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Lt(t,"tab characters must not be used in indentation")),!(u!==45||(o=t.input.charCodeAt(t.position+1),!Os(o))));){if(l=!0,t.position++,yi(t,!0,-1)&&t.lineIndent<=e){a.push(null),u=t.input.charCodeAt(t.position);continue}if(r=t.line,m1(t,e,t1e,!1,!0),a.push(t.result),yi(t,!0,-1),u=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&u!==0)Lt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return l?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=a,!0):!1}s(zge,"readBlockSequence");function YZe(t,e,r){var n,i,a,o,l,u,h=t.tag,f=t.anchor,d={},p=Object.create(null),m=null,g=null,y=null,v=!1,x=!1,b;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=d),b=t.input.charCodeAt(t.position);b!==0;){if(!v&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Lt(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),a=t.line,(b===63||b===58)&&Os(n))b===63?(v&&(p1(t,d,p,m,g,null,o,l,u),m=g=y=null),x=!0,v=!0,i=!0):v?(v=!1,i=!0):Lt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,b=n;else{if(o=t.line,l=t.lineStart,u=t.position,!m1(t,r,e1e,!1,!0))break;if(t.line===a){for(b=t.input.charCodeAt(t.position);q0(b);)b=t.input.charCodeAt(++t.position);if(b===58)b=t.input.charCodeAt(++t.position),Os(b)||Lt(t,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(p1(t,d,p,m,g,null,o,l,u),m=g=y=null),x=!0,v=!1,i=!1,m=t.tag,g=t.result;else if(x)Lt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=f,!0}else if(x)Lt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=f,!0}if((t.line===a||t.lineIndent>e)&&(v&&(o=t.line,l=t.lineStart,u=t.position),m1(t,e,G7,!0,i)&&(v?g=t.result:y=t.result),v||(p1(t,d,p,m,g,y,o,l,u),m=g=y=null),yi(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)Lt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return v&&p1(t,d,p,m,g,null,o,l,u),x&&(t.tag=h,t.anchor=f,t.kind="mapping",t.result=d),x}s(YZe,"readBlockMapping");function XZe(t){var e,r=!1,n=!1,i,a,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&Lt(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(n=!0,i="!!",o=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(a=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):Lt(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Os(o);)o===33&&(n?Lt(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),r1e.test(i)||Lt(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);a=t.input.slice(e,t.position),PZe.test(a)&&Lt(t,"tag suffix cannot contain flow indicator characters")}a&&!n1e.test(a)&&Lt(t,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{Lt(t,"tag name is malformed: "+a)}return r?t.tag=a:Sf.call(t.tagMap,i)?t.tag=t.tagMap[i]+a:i==="!"?t.tag="!"+a:i==="!!"?t.tag="tag:yaml.org,2002:"+a:Lt(t,'undeclared tag handle "'+i+'"'),!0}s(XZe,"readTagProperty");function jZe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Lt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Os(r)&&!d1(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Lt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}s(jZe,"readAnchorProperty");function KZe(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!Os(n)&&!d1(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Lt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Sf.call(t.anchorMap,r)||Lt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],yi(t,!0,-1),!0}s(KZe,"readAlias");function m1(t,e,r,n,i){var a,o,l,u=1,h=!1,f=!1,d,p,m,g,y,v;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=o=l=G7===r||t1e===r,n&&yi(t,!0,-1)&&(h=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),u===1)for(;XZe(t)||jZe(t);)yi(t,!0,-1)?(h=!0,l=a,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):l=!1;if(l&&(l=h||i),(u===1||G7===r)&&($7===r||e1e===r?y=e:y=e+1,v=t.position-t.lineStart,u===1?l&&(zge(t,v)||YZe(t,v,y))||WZe(t,y)?f=!0:(o&&HZe(t,y)||UZe(t,y)||qZe(t,y)?f=!0:KZe(t)?(f=!0,(t.tag!==null||t.anchor!==null)&&Lt(t,"alias node should not have any properties")):VZe(t,y,$7===r)&&(f=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):u===0&&(f=l&&zge(t,v))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Lt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),d=0,p=t.implicitTypes.length;d<p;d+=1)if(g=t.implicitTypes[d],g.resolve(t.result)){t.result=g.construct(t.result),t.tag=g.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Sf.call(t.typeMap[t.kind||"fallback"],t.tag))g=t.typeMap[t.kind||"fallback"][t.tag];else for(g=null,m=t.typeMap.multi[t.kind||"fallback"],d=0,p=m.length;d<p;d+=1)if(t.tag.slice(0,m[d].tag.length)===m[d].tag){g=m[d];break}g||Lt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&g.kind!==t.kind&&Lt(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)):Lt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||f}s(m1,"composeNode");function QZe(t){var e=t.position,r,n,i,a=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(yi(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(a=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!Os(o);)o=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Lt(t,"directive name must not be less than one character in length");o!==0;){for(;q0(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!Bc(o));break}if(Bc(o))break;for(r=t.position;o!==0&&!Os(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}o!==0&&fB(t),Sf.call(Bge,n)?Bge[n](t,n,i):V7(t,'unknown document directive "'+n+'"')}if(yi(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,yi(t,!0,-1)):a&&Lt(t,"directives end mark is expected"),m1(t,t.lineIndent-1,G7,!1,!0),yi(t,!0,-1),t.checkLineBreaks&&OZe.test(t.input.slice(e,t.position))&&V7(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&W7(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,yi(t,!0,-1));return}if(t.position<t.length-1)Lt(t,"end of the stream or a document separator is expected");else return}s(QZe,"readDocument");function o1e(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new GZe(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,Lt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)QZe(r);return r.documents}s(o1e,"loadDocuments");function ZZe(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=o1e(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;i<a;i+=1)e(n[i])}s(ZZe,"loadAll$1");function JZe(t,e){var r=o1e(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Ns("expected a single document in the stream, but found more")}}s(JZe,"load$1");var eJe=ZZe,tJe=JZe,l1e={loadAll:eJe,load:tJe},c1e=Object.prototype.toString,u1e=Object.prototype.hasOwnProperty,pB=65279,rJe=9,tb=10,nJe=13,iJe=32,aJe=33,sJe=34,oB=35,oJe=37,lJe=38,cJe=39,uJe=42,h1e=44,hJe=45,U7=58,fJe=61,dJe=62,pJe=63,mJe=64,f1e=91,d1e=93,gJe=96,p1e=123,yJe=124,m1e=125,Oa={};Oa[0]="\\0";Oa[7]="\\a";Oa[8]="\\b";Oa[9]="\\t";Oa[10]="\\n";Oa[11]="\\v";Oa[12]="\\f";Oa[13]="\\r";Oa[27]="\\e";Oa[34]='\\"';Oa[92]="\\\\";Oa[133]="\\N";Oa[160]="\\_";Oa[8232]="\\L";Oa[8233]="\\P";var vJe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],xJe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function bJe(t,e){var r,n,i,a,o,l,u;if(e===null)return{};for(r={},n=Object.keys(e),i=0,a=n.length;i<a;i+=1)o=n[i],l=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),u=t.compiledTypeMap.fallback[o],u&&u1e.call(u.styleAliases,l)&&(l=u.styleAliases[l]),r[o]=l;return r}s(bJe,"compileStyleMap");function kJe(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new Ns("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Fi.repeat("0",n-e.length)+e}s(kJe,"encodeHex");var wJe=1,rb=2;function TJe(t){this.schema=t.schema||Jge,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Fi.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=bJe(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?rb:wJe,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}s(TJe,"State");function $ge(t,e){for(var r=Fi.repeat(" ",e),n=0,i=-1,a="",o,l=t.length;n<l;)i=t.indexOf(`
`,n),i===-1?(o=t.slice(n),n=l):(o=t.slice(n,i+1),n=i+1),o.length&&o!==`
`&&(a+=r),a+=o;return a}s($ge,"indentString");function lB(t,e){return`
`+Fi.repeat(" ",t.indent*e)}s(lB,"generateNextLine");function EJe(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1}s(EJe,"testImplicitResolving");function q7(t){return t===iJe||t===rJe}s(q7,"isWhitespace");function nb(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==pB||65536<=t&&t<=1114111}s(nb,"isPrintable");function Gge(t){return nb(t)&&t!==pB&&t!==nJe&&t!==tb}s(Gge,"isNsCharOrWhitespace");function Vge(t,e,r){var n=Gge(t),i=n&&!q7(t);return(r?n:n&&t!==h1e&&t!==f1e&&t!==d1e&&t!==p1e&&t!==m1e)&&t!==oB&&!(e===U7&&!i)||Gge(e)&&!q7(e)&&t===oB||e===U7&&i}s(Vge,"isPlainSafe");function CJe(t){return nb(t)&&t!==pB&&!q7(t)&&t!==hJe&&t!==pJe&&t!==U7&&t!==h1e&&t!==f1e&&t!==d1e&&t!==p1e&&t!==m1e&&t!==oB&&t!==lJe&&t!==uJe&&t!==aJe&&t!==yJe&&t!==fJe&&t!==dJe&&t!==cJe&&t!==sJe&&t!==oJe&&t!==mJe&&t!==gJe}s(CJe,"isPlainSafeFirst");function SJe(t){return!q7(t)&&t!==U7}s(SJe,"isPlainSafeLast");function Jx(t,e){var r=t.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}s(Jx,"codePointAt");function g1e(t){var e=/^\n* /;return e.test(t)}s(g1e,"needIndentIndicator");var y1e=1,cB=2,v1e=3,x1e=4,f1=5;function _Je(t,e,r,n,i,a,o,l){var u,h=0,f=null,d=!1,p=!1,m=n!==-1,g=-1,y=CJe(Jx(t,0))&&SJe(Jx(t,t.length-1));if(e||o)for(u=0;u<t.length;h>=65536?u+=2:u++){if(h=Jx(t,u),!nb(h))return f1;y=y&&Vge(h,f,l),f=h}else{for(u=0;u<t.length;h>=65536?u+=2:u++){if(h=Jx(t,u),h===tb)d=!0,m&&(p=p||u-g-1>n&&t[g+1]!==" ",g=u);else if(!nb(h))return f1;y=y&&Vge(h,f,l),f=h}p=p||m&&u-g-1>n&&t[g+1]!==" "}return!d&&!p?y&&!o&&!i(t)?y1e:a===rb?f1:cB:r>9&&g1e(t)?f1:o?a===rb?f1:cB:p?x1e:v1e}s(_Je,"chooseScalarStyle");function AJe(t,e,r,n,i){t.dump=function(){if(e.length===0)return t.quotingType===rb?'""':"''";if(!t.noCompatMode&&(vJe.indexOf(e)!==-1||xJe.test(e)))return t.quotingType===rb?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=n||t.flowLevel>-1&&r>=t.flowLevel;function u(h){return EJe(t,h)}switch(s(u,"testAmbiguity"),_Je(e,l,t.indent,o,u,t.quotingType,t.forceQuotes&&!n,i)){case y1e:return e;case cB:return"'"+e.replace(/'/g,"''")+"'";case v1e:return"|"+Uge(e,t.indent)+qge($ge(e,a));case x1e:return">"+Uge(e,t.indent)+qge($ge(LJe(e,o),a));case f1:return'"'+DJe(e)+'"';default:throw new Ns("impossible error: invalid scalar style")}}()}s(AJe,"writeScalar");function Uge(t,e){var r=g1e(t)?String(e):"",n=t[t.length-1]===`
`,i=n&&(t[t.length-2]===`
`||t===`
`),a=i?"+":n?"":"-";return r+a+`
`}s(Uge,"blockHeader");function qge(t){return t[t.length-1]===`
`?t.slice(0,-1):t}s(qge,"dropEndingNewline");function LJe(t,e){for(var r=/(\n+)([^\n]*)/g,n=function(){var h=t.indexOf(`
`);return h=h!==-1?h:t.length,r.lastIndex=h,Wge(t.slice(0,h),e)}(),i=t[0]===`
`||t[0]===" ",a,o;o=r.exec(t);){var l=o[1],u=o[2];a=u[0]===" ",n+=l+(!i&&!a&&u!==""?`
`:"")+Wge(u,e),i=a}return n}s(LJe,"foldString");function Wge(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,a,o=0,l=0,u="";n=r.exec(t);)l=n.index,l-i>e&&(a=o>i?o:l,u+=`
`+t.slice(i,a),i=a+1),o=l;return u+=`
`,t.length-i>e&&o>i?u+=t.slice(i,o)+`
`+t.slice(o+1):u+=t.slice(i),u.slice(1)}s(Wge,"foldLine");function DJe(t){for(var e="",r=0,n,i=0;i<t.length;r>=65536?i+=2:i++)r=Jx(t,i),n=Oa[r],!n&&nb(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||kJe(r);return e}s(DJe,"escapeString");function RJe(t,e,r){var n="",i=t.tag,a,o,l;for(a=0,o=r.length;a<o;a+=1)l=r[a],t.replacer&&(l=t.replacer.call(r,String(a),l)),(Ku(t,e,l,!1,!1)||typeof l>"u"&&Ku(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}s(RJe,"writeFlowSequence");function Hge(t,e,r,n){var i="",a=t.tag,o,l,u;for(o=0,l=r.length;o<l;o+=1)u=r[o],t.replacer&&(u=t.replacer.call(r,String(o),u)),(Ku(t,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Ku(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=lB(t,e)),t.dump&&tb===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=a,t.dump=i||"[]"}s(Hge,"writeBlockSequence");function MJe(t,e,r){var n="",i=t.tag,a=Object.keys(r),o,l,u,h,f;for(o=0,l=a.length;o<l;o+=1)f="",n!==""&&(f+=", "),t.condenseFlow&&(f+='"'),u=a[o],h=r[u],t.replacer&&(h=t.replacer.call(r,u,h)),Ku(t,e,u,!1,!1)&&(t.dump.length>1024&&(f+="? "),f+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ku(t,e,h,!1,!1)&&(f+=t.dump,n+=f));t.tag=i,t.dump="{"+n+"}"}s(MJe,"writeFlowMapping");function IJe(t,e,r,n){var i="",a=t.tag,o=Object.keys(r),l,u,h,f,d,p;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new Ns("sortKeys must be a boolean or a function");for(l=0,u=o.length;l<u;l+=1)p="",(!n||i!=="")&&(p+=lB(t,e)),h=o[l],f=r[h],t.replacer&&(f=t.replacer.call(r,h,f)),Ku(t,e+1,h,!0,!0,!0)&&(d=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,d&&(t.dump&&tb===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,d&&(p+=lB(t,e)),Ku(t,e+1,f,!0,d)&&(t.dump&&tb===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,i+=p));t.tag=a,t.dump=i||"{}"}s(IJe,"writeBlockMapping");function Yge(t,e,r){var n,i,a,o,l,u;for(i=r?t.explicitTypes:t.implicitTypes,a=0,o=i.length;a<o;a+=1)if(l=i[a],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof e=="object"&&e instanceof l.instanceOf)&&(!l.predicate||l.predicate(e))){if(r?l.multi&&l.representName?t.tag=l.representName(e):t.tag=l.tag:t.tag="?",l.represent){if(u=t.styleMap[l.tag]||l.defaultStyle,c1e.call(l.represent)==="[object Function]")n=l.represent(e,u);else if(u1e.call(l.represent,u))n=l.represent[u](e,u);else throw new Ns("!<"+l.tag+'> tag resolver accepts not "'+u+'" style');t.dump=n}return!0}return!1}s(Yge,"detectType");function Ku(t,e,r,n,i,a,o){t.tag=null,t.dump=r,Yge(t,r,!1)||Yge(t,r,!0);var l=c1e.call(t.dump),u=n,h;n&&(n=t.flowLevel<0||t.flowLevel>e);var f=l==="[object Object]"||l==="[object Array]",d,p;if(f&&(d=t.duplicates.indexOf(r),p=d!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(i=!1),p&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(f&&p&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),l==="[object Object]")n&&Object.keys(t.dump).length!==0?(IJe(t,e,t.dump,i),p&&(t.dump="&ref_"+d+t.dump)):(MJe(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(l==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?Hge(t,e-1,t.dump,i):Hge(t,e,t.dump,i),p&&(t.dump="&ref_"+d+t.dump)):(RJe(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(l==="[object String]")t.tag!=="?"&&AJe(t,t.dump,e,a,u);else{if(l==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Ns("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump)}return!0}s(Ku,"writeNode");function NJe(t,e){var r=[],n=[],i,a;for(uB(t,r,n),i=0,a=n.length;i<a;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(a)}s(NJe,"getDuplicateReferences");function uB(t,e,r){var n,i,a;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)uB(t[i],e,r);else for(n=Object.keys(t),i=0,a=n.length;i<a;i+=1)uB(t[n[i]],e,r)}s(uB,"inspectNode");function OJe(t,e){e=e||{};var r=new TJe(e);r.noRefs||NJe(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ku(r,0,n,!0,!0)?r.dump+`
`:""}s(OJe,"dump$1");var PJe=OJe,BJe={dump:PJe};function mB(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}s(mB,"renamed");var b1e=Kge;var k1e=l1e.load,ghr=l1e.loadAll,yhr=BJe.dump;var vhr=mB("safeLoad","load"),xhr=mB("safeLoadAll","loadAll"),bhr=mB("safeDump","dump");function w1e(t){let e=t.match(ub);if(!e)return{text:t,metadata:{}};let r=k1e(e[1],{schema:b1e})??{};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}}s(w1e,"extractFrontMatter");pr();var zJe=s(t=>t.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),$Je=s(t=>{let{text:e,metadata:r}=w1e(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"),GJe=s(t=>{let e=dt.detectInit(t)??{},r=dt.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:eY(t),directive:e}},"processDirectives");function gB(t){let e=zJe(t),r=$Je(e),n=GJe(r.text),i=ms(r.config,n.directive);return t=Mge(n.text),{code:t,title:r.title,config:i}}s(gB,"preprocessDiagram");pr();function T1e(t){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}s(T1e,"toBase64");Y0();var VJe=5e4,UJe="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",qJe="sandbox",WJe="loose",HJe="http://www.w3.org/2000/svg",YJe="http://www.w3.org/1999/xlink",XJe="http://www.w3.org/1999/xhtml",jJe="100%",KJe="100%",QJe="border:0;margin:0;",ZJe="margin:0",JJe="allow-top-navigation-by-user-activation allow-popups",eet='The "iframe" tag is not supported by your browser.',tet=["foreignobject"],ret=["dominant-baseline"];function A1e(t){let e=gB(t);return I1(),CF(e.config??{}),e}s(A1e,"processAndSetConfigs");async function net(t,e){o1();try{let{code:r}=A1e(t);return{diagramType:(await L1e(r)).type}}catch(r){if(e?.suppressErrors)return!1;throw r}}s(net,"parse");var E1e=s((t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),iet=s((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 o=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(l=>{Vt(l.styles)||o.forEach(u=>{r+=E1e(l.id,u,l.styles)}),Vt(l.textStyles)||(r+=E1e(l.id,"tspan",(l?.textStyles||[]).map(u=>u.replace("color","fill"))))})}return r},"createCssStyles"),aet=s((t,e,r,n)=>{let i=iet(t,r),a=s$(e,i,t.themeVariables);return z7(Sge(`${n}{${a}}`),_ge)},"createUserStyles"),set=s((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Ys(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),oet=s((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":KJe,n=T1e(`<body style="${ZJe}">${t}</body>`);return`<iframe style="width:${jJe};height:${r};${QJe}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${JJe}">
${eet}
</iframe>`},"putIntoIFrame"),C1e=s((t,e,r,n,i)=>{let a=t.append("div");a.attr("id",r),n&&a.attr("style",n);let o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",HJe);return i&&o.attr("xmlns:xlink",i),o.append("g"),t},"appendDivSvgG");function S1e(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}s(S1e,"sandboxedIframe");var cet=s((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),uet=s(async function(t,e,r){o1();let n=A1e(e);e=n.code;let i=_r();V.debug(i),e.length>(i?.maxTextSize??VJe)&&(e=UJe);let a="#"+t,o="i"+t,l="#"+o,u="d"+t,h="#"+u,f=s(()=>{let P=Me(p?l:h).node();P&&"remove"in P&&P.remove()},"removeTempElements"),d=Me("body"),p=i.securityLevel===qJe,m=i.securityLevel===WJe,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let L=S1e(Me(r),o);d=Me(L.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=Me(r);C1e(d,t,u,`font-family: ${g}`,YJe)}else{if(cet(document,t,u,o),p){let L=S1e(Me("body"),o);d=Me(L.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=Me("body");C1e(d,t,u)}let y,v;try{y=await h1.fromText(e,{title:n.title})}catch(L){if(i.suppressErrorRendering)throw f(),L;y=await h1.fromText("error"),v=L}let x=d.select(h).node(),b=y.type,k=x.firstChild,A=k.firstChild,w=y.renderer.getClasses?.(e,y),T=aet(i,b,w,a),C=document.createElement("style");C.innerHTML=T,k.insertBefore(C,A);try{await y.renderer.draw(e,t,X2,y)}catch(L){throw i.suppressErrorRendering?f():Xhe.draw(e,t,X2),L}let E=d.select(`${h} svg`),S=y.db.getAccTitle?.(),R=y.db.getAccDescription?.();fet(b,E,S,R),d.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",XJe);let D=d.select(h).node().innerHTML;if(V.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),D=set(D,p,hr(i.arrowMarkerAbsolute)),p){let L=d.select(h+" svg").node();D=oet(D,L)}else m||(D=_1e.default.sanitize(D,{ADD_TAGS:tet,ADD_ATTR:ret}));if(Lge(),v)throw v;return f(),{diagramType:b,svg:D,bindFunctions:y.db.bindFunctions}},"render");function het(t={}){let e=An({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),wF(e),e?.theme&&e.theme in po?e.themeVariables=po[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=po.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?dE(e):pE();E1(r.logLevel),o1()}s(het,"initialize");var L1e=s((t,e={})=>{let{code:r}=gB(t);return h1.fromText(r,e)},"getDiagramFromText");function fet(t,e,r,n){Dge(e,t),Rge(e,r,n,e.attr("id"))}s(fet,"addA11yInfo");var _f=Object.freeze({render:uet,parse:net,getDiagramFromText:L1e,initialize:het,getConfig:_r,setConfig:kb,getSiteConfig:pE,updateSiteConfig:TF,reset:s(()=>{I1()},"reset"),globalReset:s(()=>{I1(ih)},"globalReset"),defaultConfig:ih});E1(_r().logLevel);I1(_r());Rk();pr();var det=s((t,e,r)=>{V.warn(t),fA(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"),D1e=s(async function(t={querySelector:".mermaid"}){try{await pet(t)}catch(e){if(fA(e)&&V.error(e.str),Qu.parseError&&Qu.parseError(e),!t.suppressErrors)throw V.error("Use the suppressErrors option to suppress these errors"),e}},"run"),pet=s(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let n=_f.getConfig();V.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");V.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(V.debug("Start On Load: "+n?.startOnLoad),_f.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new dt.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o,l=[];for(let u of Array.from(i)){V.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${a.next()}`;o=u.innerHTML,o=lb(dt.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");let f=dt.detectInit(o);f&&V.debug("Detected early reinit: ",f);try{let{svg:d,bindFunctions:p}=await N1e(h,o,u);u.innerHTML=d,t&&await t(h),p&&p(u)}catch(d){det(d,l,Qu.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),R1e=s(function(t){_f.initialize(t)},"initialize"),met=s(async function(t,e,r){V.warn("mermaid.init is deprecated. Please use run instead."),t&&R1e(t);let n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await D1e(n)},"init"),get=s(async(t,{lazyLoad:e=!0}={})=>{o1(),fb(...t),e===!1&&await cge()},"registerExternalDiagrams"),M1e=s(function(){if(Qu.startOnLoad){let{startOnLoad:t}=_f.getConfig();t&&Qu.run().catch(e=>V.error("Mermaid failed to initialize",e))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",M1e,!1)}var yet=s(function(t){Qu.parseError=t},"setParseErrorHandler"),H7=[],yB=!1,I1e=s(async()=>{if(!yB){for(yB=!0;H7.length>0;){let t=H7.shift();if(t)try{await t()}catch(e){V.error("Error executing queue",e)}}yB=!1}},"executeQueue"),vet=s(async(t,e)=>new Promise((r,n)=>{let i=s(()=>new Promise((a,o)=>{_f.parse(t,e).then(l=>{a(l),r(l)},l=>{V.error("Error parsing",l),Qu.parseError?.(l),o(l),n(l)})}),"performCall");H7.push(i),I1e().catch(n)}),"parse"),N1e=s((t,e,r)=>new Promise((n,i)=>{let a=s(()=>new Promise((o,l)=>{_f.render(t,e,r).then(u=>{o(u),n(u)},u=>{V.error("Error parsing",u),Qu.parseError?.(u),l(u),i(u)})}),"performCall");H7.push(a),I1e().catch(i)}),"render"),Qu={startOnLoad:!0,mermaidAPI:_f,parse:vet,render:N1e,init:met,run:D1e,registerExternalDiagrams:get,registerLayoutLoaders:SL,initialize:R1e,parseError:void 0,contentLoaded:M1e,setParseErrorHandler:yet,detectType:H0},xet=Qu;return V1e(bet);})();
/*! Check if previously processed */
/*!
* Wait for document loaded before starting the execution
*/
/*! Bundled license information:
dompurify/dist/purify.js:
(*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE *)
lodash-es/lodash.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* 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 *)
js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
*/
globalThis.mermaid = globalThis.__esbuild_esm_mermaid.default;