Lines Matching refs:className

825 `,B9=18*2,vqt="actor-top",yqt="actor-bottom",Fbt=function(i,a){return LY(i,a)},FQe=function(i,a,f,g,w){if(a.links===void 0||a.links===null||Object.keys(a.links).length===0)return{height:0,width:0};const v=a.links,b=a.actorCnt,E=a.rectData;var S="none";w&&(S="block !important");const _=i.append("g");_.attr("id","actor"+b+"_popup"),_.attr("class","actorPopupMenu"),_.attr("display",S);var M="";E.class!==void 0&&(M=" "+E.class);let F=E.width>f?E.width:f;const R=_.append("rect");if(R.attr("class","actorPopupMenuPanel"+M),R.attr("x",E.x),R.attr("y",E.height),R.attr("fill",E.fill),R.attr("stroke",E.stroke),R.attr("width",F),R.attr("height",E.height),R.attr("rx",E.rx),R.attr("ry",E.ry),v!=null){var B=20;for(let nt in v){var z=_.append("a"),Y=h8(v[nt]);z.attr("xlink:href",Y),z.attr("target","_blank"),ZQe(g)(nt,z,E.x+10,E.height+B,F,20,{class:"actor"},g),B+=30}}return R.attr("height",B),{height:E.height+B,width:F}},BQe=function(i){return"var pu = document.getElementById('"+i+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},DD=function(i,a){let f=0,g=0;const w=a.text.split(ei.lineBreakRegex),[v,b]=k9(a.fontSize);let E=[],S=0,_=()=>a.y;if(a.valign!==void 0&&a.textMargin!==void 0&&a.textMargin>0)switch(a.valign){case"top":case"start":_=()=>Math.round(a.y+a.textMargin);break;case"middle":case"center":_=()=>Math.round(a.y+(f+g+a.textMargin)/2);break;case"bottom":case"end":_=()=>Math.round(a.y+(f+g+2*a.textMargin)-a.textMargin);break}if(a.anchor!==void 0&&a.textMargin!==void 0&&a.width!==void 0)switch(a.anchor){case"left":case"start":a.x=Math.round(a.x+a.textMargin),a.anchor="start",a.dominantBaseline="middle",a.alignmentBaseline="middle";break;case"middle":case"center":a.x=Math.round(a.x+a.width/2),a.anchor="middle",a.dominantBaseline="middle",a.alignmentBaseline="middle";break;case"right":case"end":a.x=Math.round(a.x+a.width-a.textMargin),a.anchor="end",a.dominantBaseline="middle",a.alignmentBaseline="middle";break}for(let[M,F]of w.entries()){a.textMargin!==void 0&&a.textMargin===0&&v!==void 0&&(S=M*v);const R=i.append("text");R.attr("x",a.x),R.attr("y",_()),a.anchor!==void 0&&R.attr("text-anchor",a.anchor).attr("dominant-baseline",a.dominantBaseline).attr("alignment-baseline",a.alignmentBaseline),a.fontFamily!==void 0&&R.style("font-family",a.fontFamily),b!==void 0&&R.style("font-size",b),a.fontWeight!==void 0&&R.style("font-weight",a.fontWeight),a.fill!==void 0&&R.attr("fill",a.fill),a.class!==void 0&&R.attr("class",a.class),a.dy!==void 0?R.attr("dy",a.dy):S!==0&&R.attr("dy",S);const B=F||kFt;if(a.tspan){const z=R.append("tspan");z.attr("x",a.x),a.fill!==void 0&&z.attr("fill",a.fill),z.text(B)}else R.text(B);a.valign!==void 0&&a.textMargin!==void 0&&a.textMargin>0&&(g+=(R._groups||R)[0][0].getBBox().height,f=g),E.push(R)}return E},xqt=function(i,a){function f(w,v,b,E,S){return w+","+v+" "+(w+b)+","+v+" "+(w+b)+","+(v+E-S)+" "+(w+b-S*1.2)+","+(v+E)+" "+w+","+(v+E)}const g=i.append("polygon");return g.attr("points",f(a.x,a.y,a.width,a.height,7)),g.attr("class","labelBox"),a.y=a.y+a.height/2,DD(i,a),g};let f4=-1;const kqt=(i,a,f,g)=>{i.select&&f.forEach(w=>{const v=a[w],b=i.select("#actor"+v.actorCnt);!g.mirrorActors&&v.stopy?b.attr("y2",v.stopy+v.height/2):g.mirrorActors&&b.attr("y2",v.stopy)})},RQe=function(i,a,f,g){const w=g?a.stopy:a.starty,v=a.x+a.width/2,b=w+5,E=i.append("g").lower();var S=E;g||(f4++,Object.keys(a.links||{}).length&&!f.forceMenus&&S.attr("onclick",BQe(`actor${f4}_popup`)).attr("cursor","pointer"),S.append("line").attr("id","actor"+f4).attr("x1",v).attr("y1",b).attr("x2",v).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),S=E.append("g"),a.actorCnt=f4,a.links!=null&&S.attr("id","root-"+f4));const _=_9();var M="actor";a.properties!=null&&a.properties.class?M=a.properties.class:_.fill="#eaeaea",g?M+=` ${yqt}`:M+=` ${vqt}`,_.x=a.x,_.y=w,_.width=a.width,_.height=a.height,_.class=M,_.rx=3,_.ry=3;const F=Fbt(S,_);if(a.rectData=_,a.properties!=null&&a.properties.icon){const B=a.properties.icon.trim();B.charAt(0)==="@"?KRe(S,_.x+_.width-20,_.y+10,B.substr(1)):GRe(S,_.x+_.width-20,_.y+10,B)}Bbt(f)(a.description,S,_.x,_.y,_.width,_.height,{class:"actor"},f);let R=a.height;if(F.node){const B=F.node().getBBox();a.height=B.height,R=B.height}return R},jQe=function(i,a,f,g){const w=g?a.stopy:a.starty,v=a.x+a.width/2,b=w+80;i.lower(),g||(f4++,i.append("line").attr("id","actor"+f4).attr("x1",v).attr("y1",b).attr("x2",v).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),a.actorCnt=f4);const E=i.append("g");let S="actor-man";g?S+=` ${yqt}`:S+=` ${vqt}`,E.attr("class",S);const _=_9();_.x=a.x,_.y=w,_.fill="#eaeaea",_.width=a.width,_.height=a.height,_.class="actor",_.rx=3,_.ry=3,E.append("line").attr("id","actor-man-torso"+f4).attr("x1",v).attr("y1",w+25).attr("x2",v).attr("y2",w+45),E.append("line").attr("id","actor-man-arms"+f4).attr("x1",v-B9/2).attr("y1",w+33).attr("x2",v+B9/2).attr("y2",w+33),E.append("line").attr("x1",v-B9/2).attr("y1",w+60).attr("x2",v).attr("y2",w+45),E.append("line").attr("x1",v).attr("y1",w+45).attr("x2",v+B9/2-2).attr("y2",w+60);const M=E.append("circle");M.attr("cx",a.x+a.width/2),M.attr("cy",w+10),M.attr("r",15),M.attr("width",a.width),M.attr("height",a.height);const F=E.node().getBBox();return a.height=F.height,Bbt(f)(a.description,E,_.x,_.y+35,_.width,_.height,{class:"actor"},f),a.height},$Qe=function(i,a,f,g){switch(a.type){case"actor":return jQe(i,a,f,g);case"participant":return RQe(i,a,f,g)}},zQe=function(i,a,f){const w=i.append("g");Eqt(w,a),a.name&&Bbt(f)(a.name,w,a.x,a.y+(a.textMaxHeight||0)/2,a.width,0,{class:"text"},f),w.lower()},qQe=function(i){return i.append("g")},HQe=function(i,a,f,g,w){const v=_9(),b=a.anchored;v.x=a.startx,v.y=a.starty,v.class="activation"+w%3,v.width=a.stopx-a.startx,v.height=f-a.starty,Fbt(b,v)},VQe=function(i,a,f,g){const{boxMargin:w,boxTextMargin:v,labelBoxHeight:b,labelBoxWidth:E,messageFontFamily:S,messageFontSize:_,messageFontWeight:M}=g,F=i.append("g"),R=function(Y,nt,ot,ft){return F.append("line").attr("x1",Y).attr("y1",nt).attr("x2",ot).attr("y2",ft).attr("class","loopLine")};R(a.startx,a.starty,a.stopx,a.starty),R(a.stopx,a.starty,a.stopx,a.stopy),R(a.startx,a.stopy,a.stopx,a.stopy),R(a.startx,a.starty,a.startx,a.stopy),a.sections!==void 0&&a.sections.forEach(function(Y){R(a.startx,Y.y,a.stopx,Y.y).style("stroke-dasharray","3, 3")});let B=tpt();B.text=f,B.x=a.startx,B.y=a.starty,B.fontFamily=S,B.fontSize=_,B.fontWeight=M,B.anchor="middle",B.valign="middle",B.tspan=!1,B.width=E||50,B.height=b||20,B.textMargin=v,B.class="labelText",xqt(F,B),B=Tqt(),B.text=a.title,B.x=a.startx+E/2+(a.stopx-a.startx)/2,B.y=a.starty+w+v,B.anchor="middle",B.valign="middle",B.textMargin=v,B.class="loopText",B.fontFamily=S,B.fontSize=_,B.fontWeight=M,B.wrap=!0;let z=DD(F,B);return a.sectionTitles!==void 0&&a.sectionTitles.forEach(function(Y,nt){if(Y.message){B.text=Y.message,B.x=a.startx+(a.stopx-a.startx)/2,B.y=a.sections[nt].y+w+v,B.class="loopText",B.anchor="middle",B.valign="middle",B.tspan=!1,B.fontFamily=S,B.fontSize=_,B.fontWeight=M,B.wrap=a.wrap,z=DD(F,B);let ot=Math.round(z.map(ft=>(ft._groups||ft)[0][0].getBBox().height).reduce((ft,wt)=>ft+wt));a.sections[nt].height+=ot-(w+v)}}),a.height=Math.round(a.stopy-a.starty),F},Eqt=function(i,a){sRt(i,a)},UQe=function(i){i.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")},GQe=function(i){i.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")},KQe=function(i){i.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")},WQe=function(i){i.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").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},YQe=function(i){i.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")},XQe=function(i){i.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)},QQe=function(i){i.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")},Tqt=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}},JQe=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Bbt=function(){function i(w,v,b,E,S,_,M){const F=v.append("text").attr("x",b+S/2).attr("y",E+_/2+5).style("text-anchor","middle").text(w);g(F,M)}function a(w,v,b,E,S,_,M,F){const{actorFontSize:R,actorFontFamily:B,actorFontWeight:z}=F,[Y,nt]=k9(R),ot=w.split(ei.lineBreakRegex);for(let ft=0;ft<ot.length;ft++){const wt=ft*Y-Y*(ot.length-1)/2,mt=v.append("text").attr("x",b+S/2).attr("y",E).style("text-anchor","middle").style("font-size",nt).style("font-weight",z).style("font-family",B);mt.append("tspan").attr("x",b+S/2).attr("dy",wt).text(ot[ft]),mt.attr("y",E+_/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(mt,M)}}function f(w,v,b,E,S,_,M,F){const R=v.append("switch"),z=R.append("foreignObject").attr("x",b).attr("y",E).attr("width",S).attr("height",_).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");z.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(w),a(w,R,b,E,S,_,M,F),g(z,M)}function g(w,v){for(const b in v)v.hasOwnProperty(b)&&w.attr(b,v[b])}return function(w){return w.textPlacement==="fo"?f:w.textPlacement==="old"?i:a}}(),ZQe=function(){function i(w,v,b,E,S,_,M){const F=v.append("text").attr("x",b).attr("y",E).style("text-anchor","start").text(w);g(F,M)}function a(w,v,b,E,S,_,M,F){const{actorFontSize:R,actorFontFamily:B,actorFontWeight:z}=F,Y=w.split(ei.lineBreakRegex);for(let nt=0;nt<Y.length;nt++){const ot=nt*R-R*(Y.length-1)/2,ft=v.append("text").attr("x",b).attr("y",E).style("text-anchor","start").style("font-size",R).style("font-weight",z).style("font-family",B);ft.append("tspan").attr("x",b).attr("dy",ot).text(Y[nt]),ft.attr("y",E+_/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(ft,M)}}function f(w,v,b,E,S,_,M,F){const R=v.append("switch"),z=R.append("foreignObject").attr("x",b).attr("y",E).attr("width",S).attr("height",_).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");z.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(w),a(w,R,b,E,S,_,M,F),g(z,M)}function g(w,v){for(const b in v)v.hasOwnProperty(b)&&w.attr(b,v[b])}return function(w){return w.textPlacement==="fo"?f:w.textPlacement==="old"?i:a}}(),_f={drawRect:Fbt,drawText:DD,drawLabel:xqt,drawActor:$Qe,drawBox:zQe,drawPopup:FQe,anchorElement:qQe,drawActivation:HQe,drawLoop:VQe,drawBackgroundRect:Eqt,insertArrowHead:WQe,insertArrowFilledHead:YQe,insertSequenceNumber:XQe,insertArrowCrossHead:QQe,insertDatabaseIcon:UQe,insertComputerIcon:GQe,insertClockIcon:KQe,getTextObj:Tqt,getNoteRect:JQe,fixLifeLineHeights:kqt,sanitizeUrl:h8};let bn={};const Wr={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(i=>i.height||0))+(this.loops.length===0?0:this.loops.map(i=>i.height||0).reduce((i,a)=>i+a))+(this.messages.length===0?0:this.messages.map(i=>i.height||0).reduce((i,a)=>i+a))+(this.notes.length===0?0:this.notes.map(i=>i.height||0).reduce((i,a)=>i+a))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(i){this.boxes.push(i)},addActor:function(i){this.actors.push(i)},addLoop:function(i){this.loops.push(i)},addMessage:function(i){this.messages.push(i)},addNote:function(i){this.notes.push(i)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init: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,Sqt(Re())},updateVal:function(i,a,f,g){i[a]===void 0?i[a]=f:i[a]=g(f,i[a])},updateBounds:function(i,a,f,g){const w=this;let v=0;function b(E){return function(_){v++;const M=w.sequenceItems.length-v+1;w.updateVal(_,"starty",a-M*bn.boxMargin,Math.min),w.updateVal(_,"stopy",g+M*bn.boxMargin,Math.max),w.updateVal(Wr.data,"startx",i-M*bn.boxMargin,Math.min),w.updateVal(Wr.data,"stopx",f+M*bn.boxMargin,Math.max),E!=="activation"&&(w.updateVal(_,"startx",i-M*bn.boxMargin,Math.min),w.updateVal(_,"stopx",f+M*bn.boxMargin,Math.max),w.updateVal(Wr.data,"starty",a-M*bn.boxMargin,Math.min),w.updateVal(Wr.data,"stopy",g+M*bn.boxMargin,Math.max))}}this.sequenceItems.forEach(b()),this.activations.forEach(b("activation"))},insert:function(i,a,f,g){const w=ei.getMin(i,f),v=ei.getMax(i,f),b=ei.getMin(a,g),E=ei.getMax(a,g);this.updateVal(Wr.data,"startx",w,Math.min),this.updateVal(Wr.data,"starty",b,Math.min),this.updateVal(Wr.data,"stopx",v,Math.max),this.updateVal(Wr.data,"stopy",E,Math.max),this.updateBounds(w,b,v,E)},newActivation:function(i,a,f){const g=f[i.from.actor],w=bX(i.from.actor).length||0,v=g.x+g.width/2+(w-1)*bn.activationWidth/2;this.activations.push({startx:v,starty:this.verticalPos+2,stopx:v+bn.activationWidth,stopy:void 0,actor:i.from.actor,anchored:_f.anchorElement(a)})},endActivation:function(i){const a=this.activations.map(function(f){return f.actor}).lastIndexOf(i.from.actor);return this.activations.splice(a,1)[0]},createLoop:function(i={message:void 0,wrap:!1,width:void 0},a){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:i.message,wrap:i.wrap,width:i.width,height:0,fill:a}},newLoop:function(i={message:void 0,wrap:!1,width:void 0},a){this.sequenceItems.push(this.createLoop(i,a))},endLoop:function(){return this.sequenceItems.pop()},isLoopOverlap:function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},addSectionToLoop:function(i){const a=this.sequenceItems.pop();a.sections=a.sections||[],a.sectionTitles=a.sectionTitles||[],a.sections.push({y:Wr.getVerticalPos(),height:0}),a.sectionTitles.push(i),this.sequenceItems.push(a)},saveVerticalPos:function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},resetVerticalPos:function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},bumpVerticalPos:function(i){this.verticalPos=this.verticalPos+i,this.data.stopy=ei.getMax(this.data.stopy,this.verticalPos)},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},tJe=function(i,a){Wr.bumpVerticalPos(bn.boxMargin),a.height=bn.boxMargin,a.starty=Wr.getVerticalPos();const f=_9();f.x=a.startx,f.y=a.starty,f.width=a.width||bn.width,f.class="note";const g=i.append("g"),w=_f.drawRect(g,f),v=tpt();v.x=a.startx,v.y=a.starty,v.width=f.width,v.dy="1em",v.text=a.message,v.class="noteText",v.fontFamily=bn.noteFontFamily,v.fontSize=bn.noteFontSize,v.fontWeight=bn.noteFontWeight,v.anchor=bn.noteAlign,v.textMargin=bn.noteMargin,v.valign="center";const b=DD(g,v),E=Math.round(b.map(S=>(S._groups||S)[0][0].getBBox().height).reduce((S,_)=>S+_));w.attr("height",E+2*bn.noteMargin),a.height+=E+2*bn.noteMargin,Wr.bumpVerticalPos(E+2*bn.noteMargin),a.stopy=a.starty+E+2*bn.noteMargin,a.stopx=a.startx+f.width,Wr.insert(a.startx,a.starty,a.stopx,a.stopy),Wr.models.addNote(a)},R9=i=>({fontFamily:i.messageFontFamily,fontSize:i.messageFontSize,fontWeight:i.messageFontWeight}),MD=i=>({fontFamily:i.noteFontFamily,fontSize:i.noteFontSize,fontWeight:i.noteFontWeight}),Rbt=i=>({fontFamily:i.actorFontFamily,fontSize:i.actorFontSize,fontWeight:i.actorFontWeight});function eJe(i,a){Wr.bumpVerticalPos(10);const{startx:f,stopx:g,message:w}=a,v=ei.splitBreaks(w).length,b=uo.calculateTextDimensions(w,R9(bn)),E=b.height/v;a.height+=E,Wr.bumpVerticalPos(E);let S,_=b.height-10;const M=b.width;if(f===g){S=Wr.getVerticalPos()+_,bn.rightAngles||(_+=bn.boxMargin,S=Wr.getVerticalPos()+_),_+=30;const F=ei.getMax(M/2,bn.width/2);Wr.insert(f-F,Wr.getVerticalPos()-10+_,g+F,Wr.getVerticalPos()+30+_)}else _+=bn.boxMargin,S=Wr.getVerticalPos()+_,Wr.insert(f,S-10,g,S);return Wr.bumpVerticalPos(_),a.height+=_,a.stopy=a.starty+a.height,Wr.insert(a.fromBounds,a.starty,a.toBounds,a.stopy),S}const nJe=function(i,a,f,g){const{startx:w,stopx:v,starty:b,message:E,type:S,sequenceIndex:_,sequenceVisible:M}=a,F=uo.calculateTextDimensions(E,R9(bn)),R=tpt();R.x=w,R.y=b+10,R.width=v-w,R.class="messageText",R.dy="1em",R.text=E,R.fontFamily=bn.messageFontFamily,R.fontSize=bn.messageFontSize,R.fontWeight=bn.messageFontWeight,R.anchor=bn.messageAlign,R.valign="center",R.textMargin=bn.wrapPadding,R.tspan=!1,DD(i,R);const B=F.width;let z;w===v?bn.rightAngles?z=i.append("path").attr("d",`M  ${w},${f} H ${w+ei.getMax(bn.width/2,B/2)} V ${f+25} H ${w}`):z=i.append("path").attr("d","M "+w+","+f+" C "+(w+60)+","+(f-10)+" "+(w+60)+","+(f+30)+" "+w+","+(f+20)):(z=i.append("line"),z.attr("x1",w),z.attr("y1",f),z.attr("x2",v),z.attr("y2",f)),S===g.db.LINETYPE.DOTTED||S===g.db.LINETYPE.DOTTED_CROSS||S===g.db.LINETYPE.DOTTED_POINT||S===g.db.LINETYPE.DOTTED_OPEN?(z.style("stroke-dasharray","3, 3"),z.attr("class","messageLine1")):z.attr("class","messageLine0");let Y="";bn.arrowMarkerAbsolute&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\("),Y=Y.replace(/\)/g,"\\)")),z.attr("stroke-width",2),z.attr("stroke","none"),z.style("fill","none"),(S===g.db.LINETYPE.SOLID||S===g.db.LINETYPE.DOTTED)&&z.attr("marker-end","url("+Y+"#arrowhead)"),(S===g.db.LINETYPE.SOLID_POINT||S===g.db.LINETYPE.DOTTED_POINT)&&z.attr("marker-end","url("+Y+"#filled-head)"),(S===g.db.LINETYPE.SOLID_CROSS||S===g.db.LINETYPE.DOTTED_CROSS)&&z.attr("marker-end","url("+Y+"#crosshead)"),(M||bn.showSequenceNumbers)&&(z.attr("marker-start","url("+Y+"#sequencenumber)"),i.append("text").attr("x",w).attr("y",f+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(_))},rJe=function(i,a,f,g,w,v,b){let E=0,S=0,_,M=0;for(const F of g){const R=a[F],B=R.box;_&&_!=B&&(b||Wr.models.addBox(_),S+=bn.boxMargin+_.margin),B&&B!=_&&(b||(B.x=E+S,B.y=w),S+=B.margin),R.width=R.width||bn.width,R.height=ei.getMax(R.height||bn.height,bn.height),R.margin=R.margin||bn.actorMargin,M=ei.getMax(M,R.height),f[R.name]&&(S+=R.width/2),R.x=E+S,R.starty=Wr.getVerticalPos(),Wr.insert(R.x,w,R.x+R.width,R.height),E+=R.width+S,R.box&&(R.box.width=E+B.margin-R.box.x),S=R.margin,_=R.box,Wr.models.addActor(R)}_&&!b&&Wr.models.addBox(_),Wr.bumpVerticalPos(M)},jbt=function(i,a,f,g){if(g){let w=0;Wr.bumpVerticalPos(bn.boxMargin*2);for(const v of f){const b=a[v];b.stopy||(b.stopy=Wr.getVerticalPos());const E=_f.drawActor(i,b,bn,!0);w=ei.getMax(w,E)}Wr.bumpVerticalPos(w+bn.boxMargin)}else for(const w of f){const v=a[w];_f.drawActor(i,v,bn,!1)}},Cqt=function(i,a,f,g){let w=0,v=0;for(const b of f){const E=a[b],S=oJe(E),_=_f.drawPopup(i,E,S,bn,bn.forceMenus,g);_.height>w&&(w=_.height),_.width+E.x>v&&(v=_.width+E.x)}return{maxHeight:w,maxWidth:v}},Sqt=function(i){Ld(bn,i),i.fontFamily&&(bn.actorFontFamily=bn.noteFontFamily=bn.messageFontFamily=i.fontFamily),i.fontSize&&(bn.actorFontSize=bn.noteFontSize=bn.messageFontSize=i.fontSize),i.fontWeight&&(bn.actorFontWeight=bn.noteFontWeight=bn.messageFontWeight=i.fontWeight)},bX=function(i){return Wr.activations.filter(function(a){return a.actor===i})},_qt=function(i,a){const f=a[i],g=bX(i),w=g.reduce(function(b,E){return ei.getMin(b,E.startx)},f.x+f.width/2-1),v=g.reduce(function(b,E){return ei.getMax(b,E.stopx)},f.x+f.width/2+1);return[w,v]};function d4(i,a,f,g,w){Wr.bumpVerticalPos(f);let v=g;if(a.id&&a.message&&i[a.id]){const b=i[a.id].width,E=R9(bn);a.message=uo.wrapLabel(`[${a.message}]`,b-2*bn.wrapPadding,E),a.width=b,a.wrap=!0;const S=uo.calculateTextDimensions(a.message,E),_=ei.getMax(S.height,bn.labelBoxHeight);v=g+_,Kt.debug(`${_} - ${a.message}`)}w(a),Wr.bumpVerticalPos(v)}function iJe(i,a,f,g,w,v,b){function E(_,M){_.x<w[i.from].x?(Wr.insert(a.stopx-M,a.starty,a.startx,a.stopy+_.height/2+bn.noteMargin),a.stopx=a.stopx+M):(Wr.insert(a.startx,a.starty,a.stopx+M,a.stopy+_.height/2+bn.noteMargin),a.stopx=a.stopx-M)}function S(_,M){_.x<w[i.to].x?(Wr.insert(a.startx-M,a.starty,a.stopx,a.stopy+_.height/2+bn.noteMargin),a.startx=a.startx+M):(Wr.insert(a.stopx,a.starty,a.startx+M,a.stopy+_.height/2+bn.noteMargin),a.startx=a.startx-M)}if(v[i.to]==g){const _=w[i.to],M=_.type=="actor"?B9/2+3:_.width/2+3;E(_,M),_.starty=f-_.height/2,Wr.bumpVerticalPos(_.height/2)}else if(b[i.from]==g){const _=w[i.from];if(bn.mirrorActors){const M=_.type=="actor"?B9/2:_.width/2;S(_,M)}_.stopy=f-_.height/2,Wr.bumpVerticalPos(_.height/2)}else if(b[i.to]==g){const _=w[i.to];if(bn.mirrorActors){const M=_.type=="actor"?B9/2+3:_.width/2+3;E(_,M)}_.stopy=f-_.height/2,Wr.bumpVerticalPos(_.height/2)}}const sJe=function(i,a,f,g){const{securityLevel:w,sequence:v}=Re();bn=v;let b;w==="sandbox"&&(b=Tr("#i"+a));const E=Tr(w==="sandbox"?b.nodes()[0].contentDocument.body:"body"),S=w==="sandbox"?b.nodes()[0].contentDocument:document;Wr.init(),Kt.debug(g.db);const _=w==="sandbox"?E.select(`[id="${a}"]`):Tr(`[id="${a}"]`),M=g.db.getActors(),F=g.db.getCreatedActors(),R=g.db.getDestroyedActors(),B=g.db.getBoxes();let z=g.db.getActorKeys();const Y=g.db.getMessages(),nt=g.db.getDiagramTitle(),ot=g.db.hasAtLeastOneBox(),ft=g.db.hasAtLeastOneBoxWithTitle(),wt=aJe(M,Y,g);if(bn.height=cJe(M,wt,B),_f.insertComputerIcon(_),_f.insertDatabaseIcon(_),_f.insertClockIcon(_),ot&&(Wr.bumpVerticalPos(bn.boxMargin),ft&&Wr.bumpVerticalPos(B[0].textMaxHeight)),bn.hideUnusedParticipants===!0){const xt=new Set;Y.forEach(Ft=>{xt.add(Ft.from),xt.add(Ft.to)}),z=z.filter(Ft=>xt.has(Ft))}rJe(_,M,F,z,0,Y,!1);const mt=hJe(Y,M,wt,g);_f.insertArrowHead(_),_f.insertArrowCrossHead(_),_f.insertArrowFilledHead(_),_f.insertSequenceNumber(_);function ct(xt,Ft){const Ct=Wr.endActivation(xt);Ct.starty+18>Ft&&(Ct.starty=Ft-6,Ft+=12),_f.drawActivation(_,Ct,Ft,bn,bX(xt.from.actor).length),Wr.insert(Ct.startx,Ft-10,Ct.stopx,Ft)}let rt=1,it=1;const gt=[],Q=[];Y.forEach(function(xt,Ft){let Ct,kt,Gt;switch(xt.type){case g.db.LINETYPE.NOTE:Wr.resetVerticalPos(),kt=xt.noteModel,tJe(_,kt);break;case g.db.LINETYPE.ACTIVE_START:Wr.newActivation(xt,_,M);break;case g.db.LINETYPE.ACTIVE_END:ct(xt,Wr.getVerticalPos());break;case g.db.LINETYPE.LOOP_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe));break;case g.db.LINETYPE.LOOP_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"loop",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;case g.db.LINETYPE.RECT_START:d4(mt,xt,bn.boxMargin,bn.boxMargin,Fe=>Wr.newLoop(void 0,Fe.message));break;case g.db.LINETYPE.RECT_END:Ct=Wr.endLoop(),Q.push(Ct),Wr.models.addLoop(Ct),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos());break;case g.db.LINETYPE.OPT_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe));break;case g.db.LINETYPE.OPT_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"opt",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;case g.db.LINETYPE.ALT_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe));break;case g.db.LINETYPE.ALT_ELSE:d4(mt,xt,bn.boxMargin+bn.boxTextMargin,bn.boxMargin,Fe=>Wr.addSectionToLoop(Fe));break;case g.db.LINETYPE.ALT_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"alt",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;case g.db.LINETYPE.PAR_START:case g.db.LINETYPE.PAR_OVER_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe)),Wr.saveVerticalPos();break;case g.db.LINETYPE.PAR_AND:d4(mt,xt,bn.boxMargin+bn.boxTextMargin,bn.boxMargin,Fe=>Wr.addSectionToLoop(Fe));break;case g.db.LINETYPE.PAR_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"par",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;case g.db.LINETYPE.AUTONUMBER:rt=xt.message.start||rt,it=xt.message.step||it,xt.message.visible?g.db.enableSequenceNumbers():g.db.disableSequenceNumbers();break;case g.db.LINETYPE.CRITICAL_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe));break;case g.db.LINETYPE.CRITICAL_OPTION:d4(mt,xt,bn.boxMargin+bn.boxTextMargin,bn.boxMargin,Fe=>Wr.addSectionToLoop(Fe));break;case g.db.LINETYPE.CRITICAL_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"critical",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;case g.db.LINETYPE.BREAK_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe));break;case g.db.LINETYPE.BREAK_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"break",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;default:try{Gt=xt.msgModel,Gt.starty=Wr.getVerticalPos(),Gt.sequenceIndex=rt,Gt.sequenceVisible=g.db.showSequenceNumbers();const Fe=eJe(_,Gt);iJe(xt,Gt,Fe,Ft,M,F,R),gt.push({messageModel:Gt,lineStartY:Fe}),Wr.models.addMessage(Gt)}catch(Fe){Kt.error("error while drawing message",Fe)}}[g.db.LINETYPE.SOLID_OPEN,g.db.LINETYPE.DOTTED_OPEN,g.db.LINETYPE.SOLID,g.db.LINETYPE.DOTTED,g.db.LINETYPE.SOLID_CROSS,g.db.LINETYPE.DOTTED_CROSS,g.db.LINETYPE.SOLID_POINT,g.db.LINETYPE.DOTTED_POINT].includes(xt.type)&&(rt=rt+it)}),Kt.debug("createdActors",F),Kt.debug("destroyedActors",R),jbt(_,M,z,!1),gt.forEach(xt=>nJe(_,xt.messageModel,xt.lineStartY,g)),bn.mirrorActors&&jbt(_,M,z,!0),Q.forEach(xt=>_f.drawBackgroundRect(_,xt)),kqt(_,M,z,bn),Wr.models.boxes.forEach(function(xt){xt.height=Wr.getVerticalPos()-xt.y,Wr.insert(xt.x,xt.y,xt.x+xt.width,xt.height),xt.startx=xt.x,xt.starty=xt.y,xt.stopx=xt.startx+xt.width,xt.stopy=xt.starty+xt.height,xt.stroke="rgb(0,0,0, 0.5)",_f.drawBox(_,xt,bn)}),ot&&Wr.bumpVerticalPos(bn.boxMargin);const dt=Cqt(_,M,z,S),{bounds:K}=Wr.getBounds();let yt=K.stopy-K.starty;yt<dt.maxHeight&&(yt=dt.maxHeight);let V=yt+2*bn.diagramMarginY;bn.mirrorActors&&(V=V-bn.boxMargin+bn.bottomMarginAdj);let Ot=K.stopx-K.startx;Ot<dt.maxWidth&&(Ot=dt.maxWidth);const It=Ot+2*bn.diagramMarginX;nt&&_.append("text").text(nt).attr("x",(K.stopx-K.startx)/2-2*bn.diagramMarginX).attr("y",-25),sg(_,V,It,bn.useMaxWidth);const jt=nt?40:0;_.attr("viewBox",K.startx-bn.diagramMarginX+" -"+(bn.diagramMarginY+jt)+" "+It+" "+(V+jt)),Kt.debug("models:",Wr.models)};function aJe(i,a,f){const g={};return a.forEach(function(w){if(i[w.to]&&i[w.from]){const v=i[w.to];if(w.placement===f.db.PLACEMENT.LEFTOF&&!v.prevActor||w.placement===f.db.PLACEMENT.RIGHTOF&&!v.nextActor)return;const b=w.placement!==void 0,E=!b,S=b?MD(bn):R9(bn),_=w.wrap?uo.wrapLabel(w.message,bn.width-2*bn.wrapPadding,S):w.message,F=uo.calculateTextDimensions(_,S).width+2*bn.wrapPadding;E&&w.from===v.nextActor?g[w.to]=ei.getMax(g[w.to]||0,F):E&&w.from===v.prevActor?g[w.from]=ei.getMax(g[w.from]||0,F):E&&w.from===w.to?(g[w.from]=ei.getMax(g[w.from]||0,F/2),g[w.to]=ei.getMax(g[w.to]||0,F/2)):w.placement===f.db.PLACEMENT.RIGHTOF?g[w.from]=ei.getMax(g[w.from]||0,F):w.placement===f.db.PLACEMENT.LEFTOF?g[v.prevActor]=ei.getMax(g[v.prevActor]||0,F):w.placement===f.db.PLACEMENT.OVER&&(v.prevActor&&(g[v.prevActor]=ei.getMax(g[v.prevActor]||0,F/2)),v.nextActor&&(g[w.from]=ei.getMax(g[w.from]||0,F/2)))}}),Kt.debug("maxMessageWidthPerActor:",g),g}const oJe=function(i){let a=0;const f=Rbt(bn);for(const g in i.links){const v=uo.calculateTextDimensions(g,f).width+2*bn.wrapPadding+2*bn.boxMargin;a<v&&(a=v)}return a};function cJe(i,a,f){let g=0;Object.keys(i).forEach(v=>{const b=i[v];b.wrap&&(b.description=uo.wrapLabel(b.description,bn.width-2*bn.wrapPadding,Rbt(bn)));const E=uo.calculateTextDimensions(b.description,Rbt(bn));b.width=b.wrap?bn.width:ei.getMax(bn.width,E.width+2*bn.wrapPadding),b.height=b.wrap?ei.getMax(E.height,bn.height):bn.height,g=ei.getMax(g,b.height)});for(const v in a){const b=i[v];if(!b)continue;const E=i[b.nextActor];if(!E){const F=a[v]+bn.actorMargin-b.width/2;b.margin=ei.getMax(F,bn.actorMargin);continue}const _=a[v]+bn.actorMargin-b.width/2-E.width/2;b.margin=ei.getMax(_,bn.actorMargin)}let w=0;return f.forEach(v=>{const b=R9(bn);let E=v.actorKeys.reduce((M,F)=>M+=i[F].width+(i[F].margin||0),0);E-=2*bn.boxTextMargin,v.wrap&&(v.name=uo.wrapLabel(v.name,E-2*bn.wrapPadding,b));const S=uo.calculateTextDimensions(v.name,b);w=ei.getMax(S.height,w);const _=ei.getMax(E,S.width+2*bn.wrapPadding);if(v.margin=bn.boxTextMargin,E<_){const M=(_-E)/2;v.margin+=M}}),f.forEach(v=>v.textMaxHeight=w),ei.getMax(g,bn.height)}const uJe=function(i,a,f){const g=a[i.from].x,w=a[i.to].x,v=i.wrap&&i.message;let b=uo.calculateTextDimensions(v?uo.wrapLabel(i.message,bn.width,MD(bn)):i.message,MD(bn));const E={width:v?bn.width:ei.getMax(bn.width,b.width+2*bn.noteMargin),height:0,startx:a[i.from].x,stopx:0,starty:0,stopy:0,message:i.message};return i.placement===f.db.PLACEMENT.RIGHTOF?(E.width=v?ei.getMax(bn.width,b.width):ei.getMax(a[i.from].width/2+a[i.to].width/2,b.width+2*bn.noteMargin),E.startx=g+(a[i.from].width+bn.actorMargin)/2):i.placement===f.db.PLACEMENT.LEFTOF?(E.width=v?ei.getMax(bn.width,b.width+2*bn.noteMargin):ei.getMax(a[i.from].width/2+a[i.to].width/2,b.width+2*bn.noteMargin),E.startx=g-E.width+(a[i.from].width-bn.actorMargin)/2):i.to===i.from?(b=uo.calculateTextDimensions(v?uo.wrapLabel(i.message,ei.getMax(bn.width,a[i.from].width),MD(bn)):i.message,MD(bn)),E.width=v?ei.getMax(bn.width,a[i.from].width):ei.getMax(a[i.from].width,bn.width,b.width+2*bn.noteMargin),E.startx=g+(a[i.from].width-E.width)/2):(E.width=Math.abs(g+a[i.from].width/2-(w+a[i.to].width/2))+bn.actorMargin,E.startx=g<w?g+a[i.from].width/2-bn.actorMargin/2:w+a[i.to].width/2-bn.actorMargin/2),v&&(E.message=uo.wrapLabel(i.message,E.width-2*bn.wrapPadding,MD(bn))),Kt.debug(`NM:[${E.startx},${E.stopx},${E.starty},${E.stopy}:${E.width},${E.height}=${i.message}]`),E},lJe=function(i,a,f){if(![f.db.LINETYPE.SOLID_OPEN,f.db.LINETYPE.DOTTED_OPEN,f.db.LINETYPE.SOLID,f.db.LINETYPE.DOTTED,f.db.LINETYPE.SOLID_CROSS,f.db.LINETYPE.DOTTED_CROSS,f.db.LINETYPE.SOLID_POINT,f.db.LINETYPE.DOTTED_POINT].includes(i.type))return{};const[g,w]=_qt(i.from,a),[v,b]=_qt(i.to,a),E=g<=v,S=E?w:g;let _=E?v:b;const M=Math.abs(v-b)>2,F=Y=>E?-Y:Y;i.from===i.to?_=S:(i.activate&&!M&&(_+=F(bn.activationWidth/2-1)),[f.db.LINETYPE.SOLID_OPEN,f.db.LINETYPE.DOTTED_OPEN].includes(i.type)||(_+=F(3)));const R=[g,w,v,b],B=Math.abs(S-_);i.wrap&&i.message&&(i.message=uo.wrapLabel(i.message,ei.getMax(B+2*bn.wrapPadding,bn.width),R9(bn)));const z=uo.calculateTextDimensions(i.message,R9(bn));return{width:ei.getMax(i.wrap?0:z.width+2*bn.wrapPadding,B+2*bn.wrapPadding,bn.width),height:0,startx:S,stopx:_,starty:0,stopy:0,message:i.message,type:i.type,wrap:i.wrap,fromBounds:Math.min.apply(null,R),toBounds:Math.max.apply(null,R)}},hJe=function(i,a,f,g){const w={},v=[];let b,E,S;return i.forEach(function(_){switch(_.id=uo.random({length:10}),_.type){case g.db.LINETYPE.LOOP_START:case g.db.LINETYPE.ALT_START:case g.db.LINETYPE.OPT_START:case g.db.LINETYPE.PAR_START:case g.db.LINETYPE.PAR_OVER_START:case g.db.LINETYPE.CRITICAL_START:case g.db.LINETYPE.BREAK_START:v.push({id:_.id,msg:_.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case g.db.LINETYPE.ALT_ELSE:case g.db.LINETYPE.PAR_AND:case g.db.LINETYPE.CRITICAL_OPTION:_.message&&(b=v.pop(),w[b.id]=b,w[_.id]=b,v.push(b));break;case g.db.LINETYPE.LOOP_END:case g.db.LINETYPE.ALT_END:case g.db.LINETYPE.OPT_END:case g.db.LINETYPE.PAR_END:case g.db.LINETYPE.CRITICAL_END:case g.db.LINETYPE.BREAK_END:b=v.pop(),w[b.id]=b;break;case g.db.LINETYPE.ACTIVE_START:{const F=a[_.from?_.from.actor:_.to.actor],R=bX(_.from?_.from.actor:_.to.actor).length,B=F.x+F.width/2+(R-1)*bn.activationWidth/2,z={startx:B,stopx:B+bn.activationWidth,actor:_.from.actor,enabled:!0};Wr.activations.push(z)}break;case g.db.LINETYPE.ACTIVE_END:{const F=Wr.activations.map(R=>R.actor).lastIndexOf(_.from.actor);delete Wr.activations.splice(F,1)[0]}break}_.placement!==void 0?(E=uJe(_,a,g),_.noteModel=E,v.forEach(F=>{b=F,b.from=ei.getMin(b.from,E.startx),b.to=ei.getMax(b.to,E.startx+E.width),b.width=ei.getMax(b.width,Math.abs(b.from-b.to))-bn.labelBoxWidth})):(S=lJe(_,a,g),_.msgModel=S,S.startx&&S.stopx&&v.length>0&&v.forEach(F=>{if(b=F,S.startx===S.stopx){const R=a[_.from],B=a[_.to];b.from=ei.getMin(R.x-S.width/2,R.x-R.width/2,b.from),b.to=ei.getMax(B.x+S.width/2,B.x+R.width/2,b.to),b.width=ei.getMax(b.width,Math.abs(b.to-b.from))-bn.labelBoxWidth}else b.from=ei.getMin(S.startx,b.from),b.to=ei.getMax(S.stopx,b.to),b.width=ei.getMax(b.width,S.width)-bn.labelBoxWidth}))}),Wr.activations=[],Kt.debug("Loop type widths:",w),w},fJe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:lQe,db:mqt,renderer:{bounds:Wr,drawActors:jbt,drawActorsPopup:Cqt,setConf:Sqt,draw:sJe},styles:PQe,init:({wrap:i})=>{mqt.setWrap(i)}}},Symbol.toStringTag,{value:"Module"}));var $bt=function(){var i=function(za,br,An,Nn){for(An=An||{},Nn=za.length;Nn--;An[za[Nn]]=br);return An},a=[1,17],f=[1,18],g=[1,19],w=[1,39],v=[1,40],b=[1,25],E=[1,23],S=[1,24],_=[1,31],M=[1,32],F=[1,33],R=[1,34],B=[1,35],z=[1,36],Y=[1,26],nt=[1,27],ot=[1,28],ft=[1,29],wt=[1,43],mt=[1,30],ct=[1,42],rt=[1,44],it=[1,41],gt=[1,45],Q=[1,9],dt=[1,8,9],K=[1,56],yt=[1,57],V=[1,58],Ot=[1,59],It=[1,60],jt=[1,61],xt=[1,62],Ft=[1,8,9,39],Ct=[1,74],kt=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],Gt=[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],Fe=[13,74,80,95,97,98],Mt=[13,64,65,74,80,95,97,98],pn=[13,59,60,61,62,63,74,80,95,97,98],Ae=[1,93],ye=[1,110],tn=[1,108],sn=[1,102],be=[1,103],Ne=[1,104],Xt=[1,105],_e=[1,106],xe=[1,107],Mn=[1,109],ce=[1,8,9,37,39,42],Br=[1,8,9,21],we=[1,8,9,78],Fi=[1,8,9,21,73,74,78,80,81,82,83,84,85],mi={trace:function(){},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:function(br,An,Nn,Bn,ke,pe,Je){var an=pe.length-1;switch(ke){case 8:this.$=pe[an-1];break;case 9:case 11:case 12:this.$=pe[an];break;case 10:case 13:this.$=pe[an-1]+pe[an];break;case 14:case 15:this.$=pe[an-1]+"~"+pe[an]+"~";break;case 16:Bn.addRelation(pe[an]);break;case 17:pe[an-1].title=Bn.cleanupLabel(pe[an]),Bn.addRelation(pe[an-1]);break;case 27:this.$=pe[an].trim(),Bn.setAccTitle(this.$);break;case 28:case 29:this.$=pe[an].trim(),Bn.setAccDescription(this.$);break;case 30:Bn.addClassesToNamespace(pe[an-3],pe[an-1]);break;case 31:Bn.addClassesToNamespace(pe[an-4],pe[an-1]);break;case 32:this.$=pe[an],Bn.addNamespace(pe[an]);break;case 33:this.$=[pe[an]];break;case 34:this.$=[pe[an-1]];break;case 35:pe[an].unshift(pe[an-2]),this.$=pe[an];break;case 37:Bn.setCssClass(pe[an-2],pe[an]);break;case 38:Bn.addMembers(pe[an-3],pe[an-1]);break;case 39:Bn.setCssClass(pe[an-5],pe[an-3]),Bn.addMembers(pe[an-5],pe[an-1]);break;case 40:this.$=pe[an],Bn.addClass(pe[an]);break;case 41:this.$=pe[an-1],Bn.addClass(pe[an-1]),Bn.setClassLabel(pe[an-1],pe[an]);break;case 42:Bn.addAnnotation(pe[an],pe[an-2]);break;case 43:this.$=[pe[an]];break;case 44:pe[an].push(pe[an-1]),this.$=pe[an];break;case 45:break;case 46:Bn.addMember(pe[an-1],Bn.cleanupLabel(pe[an]));break;case 47:break;case 48:break;case 49:this.$={id1:pe[an-2],id2:pe[an],relation:pe[an-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:pe[an-3],id2:pe[an],relation:pe[an-1],relationTitle1:pe[an-2],relationTitle2:"none"};break;case 51:this.$={id1:pe[an-3],id2:pe[an],relation:pe[an-2],relationTitle1:"none",relationTitle2:pe[an-1]};break;case 52:this.$={id1:pe[an-4],id2:pe[an],relation:pe[an-2],relationTitle1:pe[an-3],relationTitle2:pe[an-1]};break;case 53:Bn.addNote(pe[an],pe[an-1]);break;case 54:Bn.addNote(pe[an]);break;case 55:Bn.setDirection("TB");break;case 56:Bn.setDirection("BT");break;case 57:Bn.setDirection("RL");break;case 58:Bn.setDirection("LR");break;case 59:this.$={type1:pe[an-2],type2:pe[an],lineType:pe[an-1]};break;case 60:this.$={type1:"none",type2:pe[an],lineType:pe[an-1]};break;case 61:this.$={type1:pe[an-1],type2:"none",lineType:pe[an]};break;case 62:this.$={type1:"none",type2:"none",lineType:pe[an]};break;case 63:this.$=Bn.relationType.AGGREGATION;break;case 64:this.$=Bn.relationType.EXTENSION;break;case 65:this.$=Bn.relationType.COMPOSITION;break;case 66:this.$=Bn.relationType.DEPENDENCY;break;case 67:this.$=Bn.relationType.LOLLIPOP;break;case 68:this.$=Bn.lineType.LINE;break;case 69:this.$=Bn.lineType.DOTTED_LINE;break;case 70:case 76:this.$=pe[an-2],Bn.setClickEvent(pe[an-1],pe[an]);break;case 71:case 77:this.$=pe[an-3],Bn.setClickEvent(pe[an-2],pe[an-1]),Bn.setTooltip(pe[an-2],pe[an]);break;case 72:this.$=pe[an-2],Bn.setLink(pe[an-1],pe[an]);break;case 73:this.$=pe[an-3],Bn.setLink(pe[an-2],pe[an-1],pe[an]);break;case 74:this.$=pe[an-3],Bn.setLink(pe[an-2],pe[an-1]),Bn.setTooltip(pe[an-2],pe[an]);break;case 75:this.$=pe[an-4],Bn.setLink(pe[an-3],pe[an-2],pe[an]),Bn.setTooltip(pe[an-3],pe[an-1]);break;case 78:this.$=pe[an-3],Bn.setClickEvent(pe[an-2],pe[an-1],pe[an]);break;case 79:this.$=pe[an-4],Bn.setClickEvent(pe[an-3],pe[an-2],pe[an-1]),Bn.setTooltip(pe[an-3],pe[an]);break;case 80:this.$=pe[an-3],Bn.setLink(pe[an-2],pe[an]);break;case 81:this.$=pe[an-4],Bn.setLink(pe[an-3],pe[an-1],pe[an]);break;case 82:this.$=pe[an-4],Bn.setLink(pe[an-3],pe[an-1]),Bn.setTooltip(pe[an-3],pe[an]);break;case 83:this.$=pe[an-5],Bn.setLink(pe[an-4],pe[an-2],pe[an]),Bn.setTooltip(pe[an-4],pe[an-1]);break;case 84:this.$=pe[an-2],Bn.setCssStyle(pe[an-1],pe[an]);break;case 85:Bn.setCssClass(pe[an-1],pe[an]);break;case 86:this.$=[pe[an]];break;case 87:pe[an-2].push(pe[an]),this.$=pe[an-2];break;case 89:this.$=pe[an-1]+pe[an];break}},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:a,33:f,35:g,36:21,40:w,41:22,44:v,45:b,47:E,48:S,50:_,52:M,53:F,54:R,55:B,56:z,66:Y,67:nt,69:ot,73:ft,74:wt,76:mt,80:ct,95:rt,97:it,98:gt},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},i(Q,[2,5],{8:[1,46]}),{8:[1,47]},i(dt,[2,16],{21:[1,48]}),i(dt,[2,18]),i(dt,[2,19]),i(dt,[2,20]),i(dt,[2,21]),i(dt,[2,22]),i(dt,[2,23]),i(dt,[2,24]),i(dt,[2,25]),i(dt,[2,26]),{32:[1,49]},{34:[1,50]},i(dt,[2,29]),i(dt,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:K,60:yt,61:V,62:Ot,63:It,64:jt,65:xt}),{37:[1,63]},i(Ft,[2,36],{37:[1,65],42:[1,64]}),i(dt,[2,47]),i(dt,[2,48]),{16:66,74:wt,80:ct,95:rt,97:it},{16:37,17:67,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{16:37,17:68,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{16:37,17:69,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{13:Ct,51:73},i(dt,[2,55]),i(dt,[2,56]),i(dt,[2,57]),i(dt,[2,58]),i(kt,[2,11],{16:37,18:38,17:75,19:[1,76],74:wt,80:ct,95:rt,97:it,98:gt}),i(kt,[2,12],{19:[1,77]}),{15:78,16:79,74:wt,80:ct,95:rt,97:it},{16:37,17:80,18:38,74:wt,80:ct,95:rt,97:it,98:gt},i(Gt,[2,112]),i(Gt,[2,113]),i(Gt,[2,114]),i(Gt,[2,115]),i([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),i(Q,[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:a,33:f,35:g,40:w,44:v,45:b,47:E,48:S,50:_,52:M,53:F,54:R,55:B,56:z,66:Y,67:nt,69:ot,73:ft,74:wt,76:mt,80:ct,95:rt,97:it,98:gt}),{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:a,33:f,35:g,36:21,40:w,41:22,44:v,45:b,47:E,48:S,50:_,52:M,53:F,54:R,55:B,56:z,66:Y,67:nt,69:ot,73:ft,74:wt,76:mt,80:ct,95:rt,97:it,98:gt},i(dt,[2,17]),i(dt,[2,27]),i(dt,[2,28]),{13:[1,84],16:37,17:83,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{49:85,57:54,58:55,59:K,60:yt,61:V,62:Ot,63:It,64:jt,65:xt},i(dt,[2,46]),{58:86,64:jt,65:xt},i(Fe,[2,62],{57:87,59:K,60:yt,61:V,62:Ot,63:It}),i(Mt,[2,63]),i(Mt,[2,64]),i(Mt,[2,65]),i(Mt,[2,66]),i(Mt,[2,67]),i(pn,[2,68]),i(pn,[2,69]),{8:[1,89],23:90,38:88,41:22,44:v},{16:91,74:wt,80:ct,95:rt,97:it},{43:92,47:Ae},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:ye,73:tn,74:sn,75:99,77:100,79:101,80:be,81:Ne,82:Xt,83:_e,84:xe,85:Mn},{74:[1,111]},{13:Ct,51:112},i(dt,[2,54]),i(dt,[2,117]),i(kt,[2,13]),i(kt,[2,14]),i(kt,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:wt,80:ct,95:rt,97:it},i(ce,[2,40],{11:114,12:[1,115]}),i(Q,[2,7]),{9:[1,116]},i(Br,[2,49]),{16:37,17:117,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{13:[1,119],16:37,17:118,18:38,74:wt,80:ct,95:rt,97:it,98:gt},i(Fe,[2,61],{57:120,59:K,60:yt,61:V,62:Ot,63:It}),i(Fe,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:v},{8:[1,123],39:[2,33]},i(Ft,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:Ae},{16:37,17:127,18:38,74:wt,80:ct,95:rt,97:it,98:gt},i(dt,[2,70],{13:[1,128]}),i(dt,[2,72],{13:[1,130],68:[1,129]}),i(dt,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},i(dt,[2,84],{78:[1,134]}),i(we,[2,86],{79:135,21:ye,73:tn,74:sn,80:be,81:Ne,82:Xt,83:_e,84:xe,85:Mn}),i(Fi,[2,88]),i(Fi,[2,90]),i(Fi,[2,91]),i(Fi,[2,92]),i(Fi,[2,93]),i(Fi,[2,94]),i(Fi,[2,95]),i(Fi,[2,96]),i(Fi,[2,97]),i(Fi,[2,98]),i(dt,[2,85]),i(dt,[2,53]),{37:[2,10]},i(ce,[2,41]),{13:[1,136]},{1:[2,4]},i(Br,[2,51]),i(Br,[2,50]),{16:37,17:137,18:38,74:wt,80:ct,95:rt,97:it,98:gt},i(Fe,[2,59]),i(dt,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:v},{43:140,47:Ae},i(Ft,[2,38]),{39:[2,44]},i(dt,[2,42]),i(dt,[2,71]),i(dt,[2,73]),i(dt,[2,74],{68:[1,141]}),i(dt,[2,77]),i(dt,[2,78],{13:[1,142]}),i(dt,[2,80],{13:[1,144],68:[1,143]}),{21:ye,73:tn,74:sn,77:145,79:101,80:be,81:Ne,82:Xt,83:_e,84:xe,85:Mn},i(Fi,[2,89]),{14:[1,146]},i(Br,[2,52]),i(dt,[2,31]),{39:[2,35]},{39:[1,147]},i(dt,[2,75]),i(dt,[2,79]),i(dt,[2,81]),i(dt,[2,82],{68:[1,148]}),i(we,[2,87],{79:135,21:ye,73:tn,74:sn,80:be,81:Ne,82:Xt,83:_e,84:xe,85:Mn}),i(ce,[2,8]),i(Ft,[2,39]),i(dt,[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:function(br,An){if(An.recoverable)this.trace(br);else{var Nn=new Error(br);throw Nn.hash=An,Nn}},parse:function(br){var An=this,Nn=[0],Bn=[],ke=[null],pe=[],Je=this.table,an="",xn=0,qa=0,xo=2,ko=1,va=pe.slice.call(arguments,1),Ha=Object.create(this.lexer),ds={yy:{}};for(var Fu in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Fu)&&(ds.yy[Fu]=this.yy[Fu]);Ha.setInput(br,ds.yy),ds.yy.lexer=Ha,ds.yy.parser=this,typeof Ha.yylloc>"u"&&(Ha.yylloc={});var Zs=Ha.yylloc;pe.push(Zs);var d1=Ha.options&&Ha.options.ranges;typeof ds.yy.parseError=="function"?this.parseError=ds.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I2(){var ea;return ea=Bn.pop()||Ha.lex()||ko,typeof ea!="number"&&(ea instanceof Array&&(Bn=ea,ea=Bn.pop()),ea=An.symbols_[ea]||ea),ea}for(var ll,Ic,wc,Ea,gu={},ta,fo,mc,ca;;){if(Ic=Nn[Nn.length-1],this.defaultActions[Ic]?wc=this.defaultActions[Ic]:((ll===null||typeof ll>"u")&&(ll=I2()),wc=Je[Ic]&&Je[Ic][ll]),typeof wc>"u"||!wc.length||!wc[0]){var ya="";ca=[];for(ta in Je[Ic])this.terminals_[ta]&&ta>xo&&ca.push("'"+this.terminals_[ta]+"'");Ha.showPosition?ya="Parse error on line "+(xn+1)+`:

830 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var An=this.next();return An||this.lex()},begin:function(An){this.conditionStack.push(An)},popState:function(){var An=this.conditionStack.length-1;return An>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(An){return An=this.conditionStack.length-1-Math.abs(An||0),An>=0?this.conditionStack[An]:"INITIAL"},pushState:function(An){this.begin(An)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(An,Nn,Bn,ke){switch(Bn){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;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),33;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15: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;case 29:return this.popState(),8;case 30:break;case 31:return this.begin("namespace-body"),37;case 32:return this.popState(),39;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;case 38:return this.popState(),8;case 39:break;case 40:return this.popState(),this.popState(),39;case 41:return this.begin("class-body"),37;case 42:return this.popState(),39;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}},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 za}();mi.lexer=ga;function Ss(){this.yy={}}return Ss.prototype=mi,mi.Parser=Ss,new Ss}();$bt.parser=$bt;const Aqt=$bt,Lqt=["#","+","~","-",""];class Dqt{constructor(a,f){this.memberType=f,this.visibility="",this.classifier="";const g=Ef(a,Re());this.parseMember(g)}getDisplayDetails(){let a=this.visibility+kF(this.id);this.memberType==="method"&&(a+=`(${kF(this.parameters.trim())})`,this.returnType&&(a+=" : "+kF(this.returnType))),a=a.trim();const f=this.parseClassifier();return{displayText:a,cssStyle:f}}parseMember(a){let f="";if(this.memberType==="method"){const g=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/,w=a.match(g);if(w){const v=w[1]?w[1].trim():"";if(Lqt.includes(v)&&(this.visibility=v),this.id=w[2].trim(),this.parameters=w[3]?w[3].trim():"",f=w[4]?w[4].trim():"",this.returnType=w[5]?w[5].trim():"",f===""){const b=this.returnType.substring(this.returnType.length-1);b.match(/[$*]/)&&(f=b,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const g=a.length,w=a.substring(0,1),v=a.substring(g-1);Lqt.includes(w)&&(this.visibility=w),v.match(/[$*]/)&&(f=v),this.id=a.substring(this.visibility===""?0:1,f===""?g:g-1)}this.classifier=f}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}const wX="classId-";let zbt=[],Jl={},mX=[],Mqt=0,A8={},qbt=0,mB=[];const j9=i=>ei.sanitizeText(i,Re()),$9=function(i){const a=ei.sanitizeText(i,Re());let f="",g=a;if(a.indexOf("~")>0){const w=a.split("~");g=j9(w[0]),f=j9(w[1])}return{className:g,type:f}},dJe=function(i,a){const f=ei.sanitizeText(i,Re());a&&(a=j9(a));const{className:g}=$9(f);Jl[g].label=a},vX=function(i){const a=ei.sanitizeText(i,Re()),{className:f,type:g}=$9(a);if(Object.hasOwn(Jl,f))return;const w=ei.sanitizeText(f,Re());Jl[w]={id:w,type:g,label:w,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:wX+w+"-"+Mqt},Mqt++},Iqt=function(i){const a=ei.sanitizeText(i,Re());if(a in Jl)return Jl[a].domId;throw new Error("Class not found: "+a)},gJe=function(){zbt=[],Jl={},mX=[],mB=[],mB.push(Nqt),A8={},qbt=0,ag()},pJe=function(i){return Jl[i]},bJe=function(){return Jl},wJe=function(){return zbt},mJe=function(){return mX},vJe=function(i){Kt.debug("Adding relation: "+JSON.stringify(i)),vX(i.id1),vX(i.id2),i.id1=$9(i.id1).className,i.id2=$9(i.id2).className,i.relationTitle1=ei.sanitizeText(i.relationTitle1.trim(),Re()),i.relationTitle2=ei.sanitizeText(i.relationTitle2.trim(),Re()),zbt.push(i)},yJe=function(i,a){const f=$9(i).className;Jl[f].annotations.push(a)},Oqt=function(i,a){vX(i);const f=$9(i).className,g=Jl[f];if(typeof a=="string"){const w=a.trim();w.startsWith("<<")&&w.endsWith(">>")?g.annotations.push(j9(w.substring(2,w.length-2))):w.indexOf(")")>0?g.methods.push(new Dqt(w,"method")):w&&g.members.push(new Dqt(w,"attribute"))}},xJe=function(i,a){Array.isArray(a)&&(a.reverse(),a.forEach(f=>Oqt(i,f)))},kJe=function(i,a){const f={id:`note${mX.length}`,class:a,text:i};mX.push(f)},EJe=function(i){return i.startsWith(":")&&(i=i.substring(1)),j9(i.trim())},Hbt=function(i,a){i.split(",").forEach(function(f){let g=f;f[0].match(/\d/)&&(g=wX+g),Jl[g]!==void 0&&Jl[g].cssClasses.push(a)})},TJe=function(i,a){i.split(",").forEach(function(f){a!==void 0&&(Jl[f].tooltip=j9(a))})},CJe=function(i,a){return a?A8[a].classes[i].tooltip:Jl[i].tooltip},SJe=function(i,a,f){const g=Re();i.split(",").forEach(function(w){let v=w;w[0].match(/\d/)&&(v=wX+v),Jl[v]!==void 0&&(Jl[v].link=uo.formatUrl(a,g),g.securityLevel==="sandbox"?Jl[v].linkTarget="_top":typeof f=="string"?Jl[v].linkTarget=j9(f):Jl[v].linkTarget="_blank")}),Hbt(i,"clickable")},_Je=function(i,a,f){i.split(",").forEach(function(g){AJe(g,a,f),Jl[g].haveCallback=!0}),Hbt(i,"clickable")},AJe=function(i,a,f){const g=ei.sanitizeText(i,Re());if(Re().securityLevel!=="loose"||a===void 0)return;const v=g;if(Jl[v]!==void 0){const b=Iqt(v);let E=[];if(typeof f=="string"){E=f.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let S=0;S<E.length;S++){let _=E[S].trim();_.charAt(0)==='"'&&_.charAt(_.length-1)==='"'&&(_=_.substr(1,_.length-2)),E[S]=_}}E.length===0&&E.push(b),mB.push(function(){const S=document.querySelector(`[id="${b}"]`);S!==null&&S.addEventListener("click",function(){uo.runFunc(a,...E)},!1)})}},LJe=function(i){mB.forEach(function(a){a(i)})},DJe={LINE:0,DOTTED_LINE:1},MJe={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},Nqt=function(i){let a=Tr(".mermaidTooltip");(a._groups||a)[0][0]===null&&(a=Tr("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Tr(i).select("svg").selectAll("g.node").on("mouseover",function(){const w=Tr(this);if(w.attr("title")===null)return;const b=this.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.text(w.attr("title")).style("left",window.scrollX+b.left+(b.right-b.left)/2+"px").style("top",window.scrollY+b.top-14+document.body.scrollTop+"px"),a.html(a.html().replace(/&lt;br\/&gt;/g,"<br/>")),w.classed("hover",!0)}).on("mouseout",function(){a.transition().duration(500).style("opacity",0),Tr(this).classed("hover",!1)})};mB.push(Nqt);let Pqt="TB";const yX={setAccTitle:og,getAccTitle:Xg,getAccDescription:Jg,setAccDescription:Qg,getConfig:()=>Re().class,addClass:vX,bindFunctions:LJe,clear:gJe,getClass:pJe,getClasses:bJe,getNotes:mJe,addAnnotation:yJe,addNote:kJe,getRelations:wJe,addRelation:vJe,getDirection:()=>Pqt,setDirection:i=>{Pqt=i},addMember:Oqt,addMembers:xJe,cleanupLabel:EJe,lineType:DJe,relationType:MJe,setClickEvent:_Je,setCssClass:Hbt,setLink:SJe,getTooltip:CJe,setTooltip:TJe,lookUpDomId:Iqt,setDiagramTitle:S2,getDiagramTitle:Zg,setClassLabel:dJe,addNamespace:function(i){A8[i]===void 0&&(A8[i]={id:i,classes:{},children:{},domId:wX+i+"-"+qbt},qbt++)},addClassesToNamespace:function(i,a){if(A8[i]!==void 0)for(const f of a){const{className:g}=$9(f);Jl[g].parent=i,A8[i].classes[g]=Jl[g]}},getNamespace:function(i){return A8[i]},getNamespaces:function(){return A8},setCssStyle:function(i,a){const f=Jl[i];if(!(!a||!f))for(const g of a)g.includes(",")?f.styles.push(...g.split(",")):f.styles.push(g)}},Fqt=i=>`g.classGroup text {
1538 */var oR=0,cR=1,uR=2,am=function y(p){if(!(this instanceof y))return new y(p);this.id="Thenable/1.0.7",this.state=oR,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof p=="function"&&p.call(this,this.fulfill.bind(this),this.reject.bind(this))};am.prototype={fulfill:function(p){return lR(this,cR,"fulfillValue",p)},reject:function(p){return lR(this,uR,"rejectReason",p)},then:function(p,x){var C=this,L=new am;return C.onFulfilled.push(dR(p,L,"fulfill")),C.onRejected.push(dR(x,L,"reject")),hR(C),L.proxy}};var lR=function(p,x,C,L){return p.state===oR&&(p.state=x,p[C]=L,hR(p)),p},hR=function(p){p.state===cR?fR(p,"onFulfilled",p.fulfillValue):p.state===uR&&fR(p,"onRejected",p.rejectReason)},fR=function(p,x,C){if(p[x].length!==0){var L=p[x];p[x]=[];var O=function(){for(var j=0;j<L.length;j++)L[j](C)};typeof setImmediate=="function"?setImmediate(O):setTimeout(O,0)}},dR=function(p,x,C){return function(L){if(typeof p!="function")x[C].call(x,L);else{var O;try{O=p(L)}catch(N){x.reject(N);return}mJ(x,O)}}},mJ=function y(p,x){if(p===x||p.proxy===x){p.reject(new TypeError("cannot resolve promise with itself"));return}var C;if(f(x)==="object"&&x!==null||typeof x=="function")try{C=x.then}catch(O){p.reject(O);return}if(typeof C=="function"){var L=!1;try{C.call(x,function(O){L||(L=!0,O===x?p.reject(new TypeError("circular thenable chain")):y(p,O))},function(O){L||(L=!0,p.reject(O))})}catch(O){L||p.reject(O)}return}p.fulfill(x)};am.all=function(y){return new am(function(p,x){for(var C=new Array(y.length),L=0,O=function(H,q){C[H]=q,L++,L===y.length&&p(C)},N=0;N<y.length;N++)(function(j){var H=y[j],q=H!=null&&H.then!=null;if(q)H.then(function(Z){O(j,Z)},function(Z){x(Z)});else{var W=H;O(j,W)}})(N)})},am.resolve=function(y){return new am(function(p,x){p(y)})},am.reject=function(y){return new am(function(p,x){x(y)})};var e6=typeof Promise<"u"?Promise:am,WD=function(p,x,C){var L=It(p),O=!L,N=this._private=we({duration:1e3},x,C);if(N.target=p,N.style=N.style||N.css,N.started=!1,N.playing=!1,N.hooked=!1,N.applying=!1,N.progress=0,N.completes=[],N.frames=[],N.complete&&ct(N.complete)&&N.completes.push(N.complete),O){var j=p.position();N.startPosition=N.startPosition||{x:j.x,y:j.y},N.startStyle=N.startStyle||p.cy().style().getAnimationStartStyle(p,N.style)}if(L){var H=p.pan();N.startPan={x:H.x,y:H.y},N.startZoom=p.zoom()}this.length=1,this[0]=this},y4=WD.prototype;we(y4,{instanceString:function(){return"animation"},hook:function(){var p=this._private;if(!p.hooked){var x,C=p.target._private.animation;p.queue?x=C.queue:x=C.current,x.push(this),yt(p.target)&&p.target.cy().addToAnimationPool(p.target),p.hooked=!0}return this},play:function(){var p=this._private;return p.progress===1&&(p.progress=0),p.playing=!0,p.started=!1,p.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var p=this._private;return p.applying=!0,p.started=!1,p.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var p=this._private;return p.playing=!1,p.started=!1,this},stop:function(){var p=this._private;return p.playing=!1,p.started=!1,p.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(p){var x=this._private;return p===void 0?x.progress*x.duration:this.progress(p/x.duration)},progress:function(p){var x=this._private,C=x.playing;return p===void 0?x.progress:(C&&this.pause(),x.progress=p,x.started=!1,C&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var p=this._private,x=p.playing;x&&this.pause(),p.progress=1-p.progress,p.started=!1;var C=function(q,W){var Z=p[q];Z!=null&&(p[q]=p[W],p[W]=Z)};if(C("zoom","startZoom"),C("pan","startPan"),C("position","startPosition"),p.style)for(var L=0;L<p.style.length;L++){var O=p.style[L],N=O.name,j=p.startStyle[N];p.startStyle[N]=O,p.style[L]=j}return x&&this.play(),this},promise:function(p){var x=this._private,C;switch(p){case"frame":C=x.frames;break;default:case"complete":case"completed":C=x.completes}return new e6(function(L,O){C.push(function(){L()})})}}),y4.complete=y4.completed,y4.run=y4.play,y4.running=y4.playing;var vJ={animated:function(){return function(){var x=this,C=x.length!==void 0,L=C?x:[x],O=this._private.cy||this;if(!O.styleEnabled())return!1;var N=L[0];if(N)return N._private.animation.current.length>0}},clearQueue:function(){return function(){var x=this,C=x.length!==void 0,L=C?x:[x],O=this._private.cy||this;if(!O.styleEnabled())return this;for(var N=0;N<L.length;N++){var j=L[N];j._private.animation.queue=[]}return this}},delay:function(){return function(x,C){var L=this._private.cy||this;return L.styleEnabled()?this.animate({delay:x,duration:x,complete:C}):this}},delayAnimation:function(){return function(x,C){var L=this._private.cy||this;return L.styleEnabled()?this.animation({delay:x,duration:x,complete:C}):this}},animation:function(){return function(x,C){var L=this,O=L.length!==void 0,N=O?L:[L],j=this._private.cy||this,H=!O,q=!H;if(!j.styleEnabled())return this;var W=j.style();x=we({},x,C);var Z=Object.keys(x).length===0;if(Z)return new WD(N[0],x);switch(x.duration===void 0&&(x.duration=400),x.duration){case"slow":x.duration=600;break;case"fast":x.duration=200;break}if(q&&(x.style=W.getPropsList(x.style||x.css),x.css=void 0),q&&x.renderedPosition!=null){var st=x.renderedPosition,bt=j.pan(),pt=j.zoom();x.position=PB(st,pt,bt)}if(H&&x.panBy!=null){var _t=x.panBy,St=j.pan();x.pan={x:St.x+_t.x,y:St.y+_t.y}}var Et=x.center||x.centre;if(H&&Et!=null){var Nt=j.getCenterPan(Et.eles,x.zoom);Nt!=null&&(x.pan=Nt)}if(H&&x.fit!=null){var Pt=x.fit,qt=j.getFitViewport(Pt.eles||Pt.boundingBox,Pt.padding);qt!=null&&(x.pan=qt.pan,x.zoom=qt.zoom)}if(H&&it(x.zoom)){var re=j.getZoomedViewport(x.zoom);re!=null?(re.zoomed&&(x.zoom=re.zoom),re.panned&&(x.pan=re.pan)):x.zoom=null}return new WD(N[0],x)}},animate:function(){return function(x,C){var L=this,O=L.length!==void 0,N=O?L:[L],j=this._private.cy||this;if(!j.styleEnabled())return this;C&&(x=we({},x,C));for(var H=0;H<N.length;H++){var q=N[H],W=q.animated()&&(x.queue===void 0||x.queue),Z=q.animation(x,W?{queue:!0}:void 0);Z.play()}return this}},stop:function(){return function(x,C){var L=this,O=L.length!==void 0,N=O?L:[L],j=this._private.cy||this;if(!j.styleEnabled())return this;for(var H=0;H<N.length;H++){for(var q=N[H],W=q._private,Z=W.animation.current,st=0;st<Z.length;st++){var bt=Z[st],pt=bt._private;C&&(pt.duration=0)}x&&(W.animation.queue=[]),C||(W.animation.current=[])}return j.notify("draw"),this}}},yJ=Array.isArray,aC=yJ,gR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xJ=/^\w*$/;function kJ(y,p){if(aC(y))return!1;var x=typeof y;return x=="number"||x=="symbol"||x=="boolean"||y==null||Nr(y)?!0:xJ.test(y)||!gR.test(y)||p!=null&&y in Object(p)}var EJ=kJ,TJ="[object AsyncFunction]",CJ="[object Function]",SJ="[object GeneratorFunction]",_J="[object Proxy]";function AJ(y){if(!ke(y))return!1;var p=Id(y);return p==CJ||p==SJ||p==TJ||p==_J}var LJ=AJ,DJ=ko["__core-js_shared__"],oC=DJ,pR=function(){var y=/[^.]+$/.exec(oC&&oC.keys&&oC.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}();function MJ(y){return!!pR&&pR in y}var IJ=MJ,OJ=Function.prototype,NJ=OJ.toString;function PJ(y){if(y!=null){try{return NJ.call(y)}catch{}try{return y+""}catch{}}return""}var bR=PJ,wR=/[\\^$.*+?()[\]{}|]/g,FJ=/^\[object .+?Constructor\]$/,mR=Function.prototype,vR=Object.prototype,BJ=mR.toString,RJ=vR.hasOwnProperty,jJ=RegExp("^"+BJ.call(RJ).replace(wR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $J(y){if(!ke(y)||IJ(y))return!1;var p=LJ(y)?jJ:FJ;return p.test(bR(y))}var zJ=$J;function qJ(y,p){return y==null?void 0:y[p]}var HJ=qJ;function VJ(y,p){var x=HJ(y,p);return zJ(x)?x:void 0}var YD=VJ,UJ=YD(Object,"create"),$8=UJ;function yR(){this.__data__=$8?$8(null):{},this.size=0}var GJ=yR;function KJ(y){var p=this.has(y)&&delete this.__data__[y];return this.size-=p?1:0,p}var WJ=KJ,YJ="__lodash_hash_undefined__",XJ=Object.prototype,QJ=XJ.hasOwnProperty;function JJ(y){var p=this.__data__;if($8){var x=p[y];return x===YJ?void 0:x}return QJ.call(p,y)?p[y]:void 0}var ZJ=JJ,tZ=Object.prototype,eZ=tZ.hasOwnProperty;function nZ(y){var p=this.__data__;return $8?p[y]!==void 0:eZ.call(p,y)}var rZ=nZ,iZ="__lodash_hash_undefined__";function sZ(y,p){var x=this.__data__;return this.size+=this.has(y)?0:1,x[y]=$8&&p===void 0?iZ:p,this}var aZ=sZ;function n6(y){var p=-1,x=y==null?0:y.length;for(this.clear();++p<x;){var C=y[p];this.set(C[0],C[1])}}n6.prototype.clear=GJ,n6.prototype.delete=WJ,n6.prototype.get=ZJ,n6.prototype.has=rZ,n6.prototype.set=aZ;var xR=n6;function oZ(){this.__data__=[],this.size=0}var cZ=oZ;function uZ(y,p){return y===p||y!==y&&p!==p}var kR=uZ;function lZ(y,p){for(var x=y.length;x--;)if(kR(y[x][0],p))return x;return-1}var cC=lZ,hZ=Array.prototype,fZ=hZ.splice;function dZ(y){var p=this.__data__,x=cC(p,y);if(x<0)return!1;var C=p.length-1;return x==C?p.pop():fZ.call(p,x,1),--this.size,!0}var gZ=dZ;function pZ(y){var p=this.__data__,x=cC(p,y);return x<0?void 0:p[x][1]}var bZ=pZ;function wZ(y){return cC(this.__data__,y)>-1}var mZ=wZ;function vZ(y,p){var x=this.__data__,C=cC(x,y);return C<0?(++this.size,x.push([y,p])):x[C][1]=p,this}var yZ=vZ;function r6(y){var p=-1,x=y==null?0:y.length;for(this.clear();++p<x;){var C=y[p];this.set(C[0],C[1])}}r6.prototype.clear=cZ,r6.prototype.delete=gZ,r6.prototype.get=bZ,r6.prototype.has=mZ,r6.prototype.set=yZ;var xZ=r6,kZ=YD(ko,"Map"),EZ=kZ;function TZ(){this.size=0,this.__data__={hash:new xR,map:new(EZ||xZ),string:new xR}}var CZ=TZ;function SZ(y){var p=typeof y;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?y!=="__proto__":y===null}var _Z=SZ;function AZ(y,p){var x=y.__data__;return _Z(p)?x[typeof p=="string"?"string":"hash"]:x.map}var uC=AZ;function LZ(y){var p=uC(this,y).delete(y);return this.size-=p?1:0,p}var DZ=LZ;function MZ(y){return uC(this,y).get(y)}var IZ=MZ;function OZ(y){return uC(this,y).has(y)}var NZ=OZ;function PZ(y,p){var x=uC(this,y),C=x.size;return x.set(y,p),this.size+=x.size==C?0:1,this}var FZ=PZ;function i6(y){var p=-1,x=y==null?0:y.length;for(this.clear();++p<x;){var C=y[p];this.set(C[0],C[1])}}i6.prototype.clear=CZ,i6.prototype.delete=DZ,i6.prototype.get=IZ,i6.prototype.has=NZ,i6.prototype.set=FZ;var ER=i6,BZ="Expected a function";function XD(y,p){if(typeof y!="function"||p!=null&&typeof p!="function")throw new TypeError(BZ);var x=function(){var C=arguments,L=p?p.apply(this,C):C[0],O=x.cache;if(O.has(L))return O.get(L);var N=y.apply(this,C);return x.cache=O.set(L,N)||O,N};return x.cache=new(XD.Cache||ER),x}XD.Cache=ER;var RZ=XD,jZ=500;function $Z(y){var p=RZ(y,function(C){return x.size===jZ&&x.clear(),C}),x=p.cache;return p}var zZ=$Z,qZ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HZ=/\\(\\)?/g,VZ=zZ(function(y){var p=[];return y.charCodeAt(0)===46&&p.push(""),y.replace(qZ,function(x,C,L,O){p.push(L?O.replace(HZ,"$1"):C||x)}),p}),TR=VZ;function UZ(y,p){for(var x=-1,C=y==null?0:y.length,L=Array(C);++x<C;)L[x]=p(y[x],x,y);return L}var CR=UZ,GZ=1/0,SR=wc?wc.prototype:void 0,_R=SR?SR.toString:void 0;function AR(y){if(typeof y=="string")return y;if(aC(y))return CR(y,AR)+"";if(Nr(y))return _R?_R.call(y):"";var p=y+"";return p=="0"&&1/y==-GZ?"-0":p}var KZ=AR;function WZ(y){return y==null?"":KZ(y)}var LR=WZ;function YZ(y,p){return aC(y)?y:EJ(y,p)?[y]:TR(LR(y))}var DR=YZ,XZ=1/0;function QZ(y){if(typeof y=="string"||Nr(y))return y;var p=y+"";return p=="0"&&1/y==-XZ?"-0":p}var QD=QZ;function JZ(y,p){p=DR(p,y);for(var x=0,C=p.length;y!=null&&x<C;)y=y[QD(p[x++])];return x&&x==C?y:void 0}var ZZ=JZ;function ttt(y,p,x){var C=y==null?void 0:ZZ(y,p);return C===void 0?x:C}var ett=ttt,ntt=function(){try{var y=YD(Object,"defineProperty");return y({},"",{}),y}catch{}}(),MR=ntt;function rtt(y,p,x){p=="__proto__"&&MR?MR(y,p,{configurable:!0,enumerable:!0,value:x,writable:!0}):y[p]=x}var itt=rtt,stt=Object.prototype,A2t=stt.hasOwnProperty;function att(y,p,x){var C=y[p];(!(A2t.call(y,p)&&kR(C,x))||x===void 0&&!(p in y))&&itt(y,p,x)}var ott=att,ctt=9007199254740991,utt=/^(?:0|[1-9]\d*)$/;function ltt(y,p){var x=typeof y;return p=p??ctt,!!p&&(x=="number"||x!="symbol"&&utt.test(y))&&y>-1&&y%1==0&&y<p}var htt=ltt;function ftt(y,p,x,C){if(!ke(y))return y;p=DR(p,y);for(var L=-1,O=p.length,N=O-1,j=y;j!=null&&++L<O;){var H=QD(p[L]),q=x;if(H==="__proto__"||H==="constructor"||H==="prototype")return y;if(L!=N){var W=j[H];q=C?C(W,H,j):void 0,q===void 0&&(q=ke(W)?W:htt(p[L+1])?[]:{})}ott(j,H,q),j=j[H]}return y}var dtt=ftt;function gtt(y,p,x){return y==null?y:dtt(y,p,x)}var ptt=gtt;function btt(y,p){var x=-1,C=y.length;for(p||(p=Array(C));++x<C;)p[x]=y[x];return p}var wtt=btt;function mtt(y){return aC(y)?CR(y,QD):Nr(y)?[y]:wtt(TR(LR(y)))}var vtt=mtt,ytt={data:function(p){var x={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(L){},beforeSet:function(L,O){},onSet:function(L){},canSet:function(L){return!0}};return p=we({},x,p),function(L,O){var N=p,j=this,H=j.length!==void 0,q=H?j:[j],W=H?j[0]:j;if(mt(L)){var Z=L.indexOf(".")!==-1,st=Z&&vtt(L);if(N.allowGetting&&O===void 0){var bt;return W&&(N.beforeGet(W),st&&W._private[N.field][L]===void 0?bt=ett(W._private[N.field],st):bt=W._private[N.field][L]),bt}else if(N.allowSetting&&O!==void 0){var pt=!N.immutableKeys[L];if(pt){var _t=b({},L,O);N.beforeSet(j,_t);for(var St=0,Et=q.length;St<Et;St++){var Nt=q[St];N.canSet(Nt)&&(st&&W._private[N.field][L]===void 0?ptt(Nt._private[N.field],st,O):Nt._private[N.field][L]=O)}N.updateStyle&&j.updateStyle(),N.onSet(j),N.settingTriggersEvent&&j[N.triggerFnName](N.settingEvent)}}}else if(N.allowSetting&&it(L)){var Pt=L,qt,re,ee=Object.keys(Pt);N.beforeSet(j,Pt);for(var Ut=0;Ut<ee.length;Ut++){qt=ee[Ut],re=Pt[qt];var de=!N.immutableKeys[qt];if(de)for(var Yt=0;Yt<q.length;Yt++){var Ee=q[Yt];N.canSet(Ee)&&(Ee._private[N.field][qt]=re)}}N.updateStyle&&j.updateStyle(),N.onSet(j),N.settingTriggersEvent&&j[N.triggerFnName](N.settingEvent)}else if(N.allowBinding&&ct(L)){var Te=L;j.on(N.bindingEvent,Te)}else if(N.allowGetting&&L===void 0){var ie;return W&&(N.beforeGet(W),ie=W._private[N.field]),ie}return j}},removeData:function(p){var x={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return p=we({},x,p),function(L){var O=p,N=this,j=N.length!==void 0,H=j?N:[N];if(mt(L)){for(var q=L.split(/\s+/),W=q.length,Z=0;Z<W;Z++){var st=q[Z];if(!Ft(st)){var bt=!O.immutableKeys[st];if(bt)for(var pt=0,_t=H.length;pt<_t;pt++)H[pt]._private[O.field][st]=void 0}}O.triggerEvent&&N[O.triggerFnName](O.event)}else if(L===void 0){for(var St=0,Et=H.length;St<Et;St++)for(var Nt=H[St]._private[O.field],Pt=Object.keys(Nt),qt=0;qt<Pt.length;qt++){var re=Pt[qt],ee=!O.immutableKeys[re];ee&&(Nt[re]=void 0)}O.triggerEvent&&N[O.triggerFnName](O.event)}return N}}},xtt={eventAliasesOn:function(p){var x=p;x.addListener=x.listen=x.bind=x.on,x.unlisten=x.unbind=x.off=x.removeListener,x.trigger=x.emit,x.pon=x.promiseOn=function(C,L){var O=this,N=Array.prototype.slice.call(arguments,0);return new e6(function(j,H){var q=function(bt){O.off.apply(O,Z),j(bt)},W=N.concat([q]),Z=W.concat([]);O.on.apply(O,W)})}}},Kc={};[vJ,ytt,xtt].forEach(function(y){we(Kc,y)});var ktt={animate:Kc.animate(),animation:Kc.animation(),animated:Kc.animated(),clearQueue:Kc.clearQueue(),delay:Kc.delay(),delayAnimation:Kc.delayAnimation(),stop:Kc.stop()},lC={classes:function(p){var x=this;if(p===void 0){var C=[];return x[0]._private.classes.forEach(function(pt){return C.push(pt)}),C}else rt(p)||(p=(p||"").match(/\S+/g)||[]);for(var L=[],O=new Wx(p),N=0;N<x.length;N++){for(var j=x[N],H=j._private,q=H.classes,W=!1,Z=0;Z<p.length;Z++){var st=p[Z],bt=q.has(st);if(!bt){W=!0;break}}W||(W=q.size!==p.length),W&&(H.classes=O,L.push(j))}return L.length>0&&this.spawn(L).updateStyle().emit("class"),x},addClass:function(p){return this.toggleClass(p,!0)},hasClass:function(p){var x=this[0];return x!=null&&x._private.classes.has(p)},toggleClass:function(p,x){rt(p)||(p=p.match(/\S+/g)||[]);for(var C=this,L=x===void 0,O=[],N=0,j=C.length;N<j;N++)for(var H=C[N],q=H._private.classes,W=!1,Z=0;Z<p.length;Z++){var st=p[Z],bt=q.has(st),pt=!1;x||L&&!bt?(q.add(st),pt=!0):(!x||L&&bt)&&(q.delete(st),pt=!0),!W&&pt&&(O.push(H),W=!0)}return O.length>0&&this.spawn(O).updateStyle().emit("class"),C},removeClass:function(p){return this.toggleClass(p,!1)},flashClass:function(p,x){var C=this;if(x==null)x=250;else if(x===0)return C;return C.addClass(p),setTimeout(function(){C.removeClass(p)},x),C}};lC.className=lC.classNames=lC.classes;var yc={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:sn,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};yc.variable="(?:[\\w-.]|(?:\\\\"+yc.metaChar+"))+",yc.className="(?:[\\w-]|(?:\\\\"+yc.metaChar+"))+",yc.value=yc.string+"|"+yc.number,yc.id=yc.variable,function(){var y,p,x;for(y=yc.comparatorOp.split("|"),x=0;x<y.length;x++)p=y[x],yc.comparatorOp+="|@"+p;for(y=yc.comparatorOp.split("|"),x=0;x<y.length;x++)p=y[x],!(p.indexOf("!")>=0)&&p!=="="&&(yc.comparatorOp+="|\\!"+p)}();var bu=function(){return{checks:[]}},Xi={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},JD=[{selector:":selected",matches:function(p){return p.selected()}},{selector:":unselected",matches:function(p){return!p.selected()}},{selector:":selectable",matches:function(p){return p.selectable()}},{selector:":unselectable",matches:function(p){return!p.selectable()}},{selector:":locked",matches:function(p){return p.locked()}},{selector:":unlocked",matches:function(p){return!p.locked()}},{selector:":visible",matches:function(p){return p.visible()}},{selector:":hidden",matches:function(p){return!p.visible()}},{selector:":transparent",matches:function(p){return p.transparent()}},{selector:":grabbed",matches:function(p){return p.grabbed()}},{selector:":free",matches:function(p){return!p.grabbed()}},{selector:":removed",matches:function(p){return p.removed()}},{selector:":inside",matches:function(p){return!p.removed()}},{selector:":grabbable",matches:function(p){return p.grabbable()}},{selector:":ungrabbable",matches:function(p){return!p.grabbable()}},{selector:":animated",matches:function(p){return p.animated()}},{selector:":unanimated",matches:function(p){return!p.animated()}},{selector:":parent",matches:function(p){return p.isParent()}},{selector:":childless",matches:function(p){return p.isChildless()}},{selector:":child",matches:function(p){return p.isChild()}},{selector:":orphan",matches:function(p){return p.isOrphan()}},{selector:":nonorphan",matches:function(p){return p.isChild()}},{selector:":compound",matches:function(p){return p.isNode()?p.isParent():p.source().isParent()||p.target().isParent()}},{selector:":loop",matches:function(p){return p.isLoop()}},{selector:":simple",matches:function(p){return p.isSimple()}},{selector:":active",matches:function(p){return p.active()}},{selector:":inactive",matches:function(p){return!p.active()}},{selector:":backgrounding",matches:function(p){return p.backgrounding()}},{selector:":nonbackgrounding",matches:function(p){return!p.backgrounding()}}].sort(function(y,p){return Br(y.selector,p.selector)}),Ett=function(){for(var y={},p,x=0;x<JD.length;x++)p=JD[x],y[p.selector]=p.matches;return y}(),Ttt=function(p,x){return Ett[p](x)},Ctt="("+JD.map(function(y){return y.selector}).join("|")+")",s6=function(p){return p.replace(new RegExp("\\\\("+yc.metaChar+")","g"),function(x,C){return C})},B2=function(p,x,C){p[p.length-1]=C},z8=[{name:"group",query:!0,regex:"("+yc.group+")",populate:function(p,x,C){var L=E(C,1),O=L[0];x.checks.push({type:Xi.GROUP,value:O==="*"?O:O+"s"})}},{name:"state",query:!0,regex:Ctt,populate:function(p,x,C){var L=E(C,1),O=L[0];x.checks.push({type:Xi.STATE,value:O})}},{name:"id",query:!0,regex:"\\#("+yc.id+")",populate:function(p,x,C){var L=E(C,1),O=L[0];x.checks.push({type:Xi.ID,value:s6(O)})}},{name:"className",query:!0,regex:"\\.("+yc.className+")",populate:function(p,x,C){var L=E(C,1),O=L[0];x.checks.push({type:Xi.CLASS,value:s6(O)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+yc.variable+")\\s*\\]",populate:function(p,x,C){var L=E(C,1),O=L[0];x.checks.push({type:Xi.DATA_EXIST,field:s6(O)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+yc.variable+")\\s*("+yc.comparatorOp+")\\s*("+yc.value+")\\s*\\]",populate:function(p,x,C){var L=E(C,3),O=L[0],N=L[1],j=L[2],H=new RegExp("^"+yc.string+"$").exec(j)!=null;H?j=j.substring(1,j.length-1):j=parseFloat(j),x.checks.push({type:Xi.DATA_COMPARE,field:s6(O),operator:N,value:j})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+yc.boolOp+")\\s*("+yc.variable+")\\s*\\]",populate:function(p,x,C){var L=E(C,2),O=L[0],N=L[1];x.checks.push({type:Xi.DATA_BOOL,field:s6(N),operator:O})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+yc.meta+")\\s*("+yc.comparatorOp+")\\s*("+yc.number+")\\s*\\]\\]",populate:function(p,x,C){var L=E(C,3),O=L[0],N=L[1],j=L[2];x.checks.push({type:Xi.META_COMPARE,field:s6(O),operator:N,value:parseFloat(j)})}},{name:"nextQuery",separator:!0,regex:yc.separator,populate:function(p,x){var C=p.currentSubject,L=p.edgeCount,O=p.compoundCount,N=p[p.length-1];C!=null&&(N.subject=C,p.currentSubject=null),N.edgeCount=L,N.compoundCount=O,p.edgeCount=0,p.compoundCount=0;var j=p[p.length++]=bu();return j}},{name:"directedEdge",separator:!0,regex:yc.directedEdge,populate:function(p,x){if(p.currentSubject==null){var C=bu(),L=x,O=bu();return C.checks.push({type:Xi.DIRECTED_EDGE,source:L,target:O}),B2(p,x,C),p.edgeCount++,O}else{var N=bu(),j=x,H=bu();return N.checks.push({type:Xi.NODE_SOURCE,source:j,target:H}),B2(p,x,N),p.edgeCount++,H}}},{name:"undirectedEdge",separator:!0,regex:yc.undirectedEdge,populate:function(p,x){if(p.currentSubject==null){var C=bu(),L=x,O=bu();return C.checks.push({type:Xi.UNDIRECTED_EDGE,nodes:[L,O]}),B2(p,x,C),p.edgeCount++,O}else{var N=bu(),j=x,H=bu();return N.checks.push({type:Xi.NODE_NEIGHBOR,node:j,neighbor:H}),B2(p,x,N),H}}},{name:"child",separator:!0,regex:yc.child,populate:function(p,x){if(p.currentSubject==null){var C=bu(),L=bu(),O=p[p.length-1];return C.checks.push({type:Xi.CHILD,parent:O,child:L}),B2(p,x,C),p.compoundCount++,L}else if(p.currentSubject===x){var N=bu(),j=p[p.length-1],H=bu(),q=bu(),W=bu(),Z=bu();return N.checks.push({type:Xi.COMPOUND_SPLIT,left:j,right:H,subject:q}),q.checks=x.checks,x.checks=[{type:Xi.TRUE}],Z.checks.push({type:Xi.TRUE}),H.checks.push({type:Xi.PARENT,parent:Z,child:W}),B2(p,j,N),p.currentSubject=q,p.compoundCount++,W}else{var st=bu(),bt=bu(),pt=[{type:Xi.PARENT,parent:st,child:bt}];return st.checks=x.checks,x.checks=pt,p.compoundCount++,bt}}},{name:"descendant",separator:!0,regex:yc.descendant,populate:function(p,x){if(p.currentSubject==null){var C=bu(),L=bu(),O=p[p.length-1];return C.checks.push({type:Xi.DESCENDANT,ancestor:O,descendant:L}),B2(p,x,C),p.compoundCount++,L}else if(p.currentSubject===x){var N=bu(),j=p[p.length-1],H=bu(),q=bu(),W=bu(),Z=bu();return N.checks.push({type:Xi.COMPOUND_SPLIT,left:j,right:H,subject:q}),q.checks=x.checks,x.checks=[{type:Xi.TRUE}],Z.checks.push({type:Xi.TRUE}),H.checks.push({type:Xi.ANCESTOR,ancestor:Z,descendant:W}),B2(p,j,N),p.currentSubject=q,p.compoundCount++,W}else{var st=bu(),bt=bu(),pt=[{type:Xi.ANCESTOR,ancestor:st,descendant:bt}];return st.checks=x.checks,x.checks=pt,p.compoundCount++,bt}}},{name:"subject",modifier:!0,regex:yc.subject,populate:function(p,x){if(p.currentSubject!=null&&p.currentSubject!==x)return Gc("Redefinition of subject in selector `"+p.toString()+"`"),!1;p.currentSubject=x;var C=p[p.length-1],L=C.checks[0],O=L==null?null:L.type;O===Xi.DIRECTED_EDGE?L.type=Xi.NODE_TARGET:O===Xi.UNDIRECTED_EDGE&&(L.type=Xi.NODE_NEIGHBOR,L.node=L.nodes[1],L.neighbor=L.nodes[0],L.nodes=null)}}];z8.forEach(function(y){return y.regexObj=new RegExp("^"+y.regex)});var Stt=function(p){for(var x,C,L,O=0;O<z8.length;O++){var N=z8[O],j=N.name,H=p.match(N.regexObj);if(H!=null){C=H,x=N,L=j;var q=H[0];p=p.substring(q.length);break}}return{expr:x,match:C,name:L,remaining:p}},ZD=function(p){var x=p.match(/^\s+/);if(x){var C=x[0];p=p.substring(C.length)}return p},_tt=function(p){var x=this,C=x.inputText=p,L=x[0]=bu();for(x.length=1,C=ZD(C);;){var O=Stt(C);if(O.expr==null)return Gc("The selector `"+p+"`is invalid"),!1;var N=O.match.slice(1),j=O.expr.populate(x,L,N);if(j===!1)return!1;if(j!=null&&(L=j),C=O.remaining,C.match(/^\s*$/))break}var H=x[x.length-1];x.currentSubject!=null&&(H.subject=x.currentSubject),H.edgeCount=x.edgeCount,H.compoundCount=x.compoundCount;for(var q=0;q<x.length;q++){var W=x[q];if(W.compoundCount>0&&W.edgeCount>0)return Gc("The selector `"+p+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(W.edgeCount>1)return Gc("The selector `"+p+"` is invalid because it uses multiple edge selectors"),!1;W.edgeCount===1&&Gc("The selector `"+p+"` 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},Att=function(){if(this.toStringCache!=null)return this.toStringCache;for(var p=function(W){return W??""},x=function(W){return mt(W)?'"'+W+'"':p(W)},C=function(W){return" "+W+" "},L=function(W,Z){var st=W.type,bt=W.value;switch(st){case Xi.GROUP:{var pt=p(bt);return pt.substring(0,pt.length-1)}case Xi.DATA_COMPARE:{var _t=W.field,St=W.operator;return"["+_t+C(p(St))+x(bt)+"]"}case Xi.DATA_BOOL:{var Et=W.operator,Nt=W.field;return"["+p(Et)+Nt+"]"}case Xi.DATA_EXIST:{var Pt=W.field;return"["+Pt+"]"}case Xi.META_COMPARE:{var qt=W.operator,re=W.field;return"[["+re+C(p(qt))+x(bt)+"]]"}case Xi.STATE:return bt;case Xi.ID:return"#"+bt;case Xi.CLASS:return"."+bt;case Xi.PARENT:case Xi.CHILD:return O(W.parent,Z)+C(">")+O(W.child,Z);case Xi.ANCESTOR:case Xi.DESCENDANT:return O(W.ancestor,Z)+" "+O(W.descendant,Z);case Xi.COMPOUND_SPLIT:{var ee=O(W.left,Z),Ut=O(W.subject,Z),de=O(W.right,Z);return ee+(ee.length>0?" ":"")+Ut+de}case Xi.TRUE:return""}},O=function(W,Z){return W.checks.reduce(function(st,bt,pt){return st+(Z===W&&pt===0?"$":"")+L(bt,Z)},"")},N="",j=0;j<this.length;j++){var H=this[j];N+=O(H,H.subject),this.length>1&&j<this.length-1&&(N+=", ")}return this.toStringCache=N,N},Ltt={parse:_tt,toString:Att},IR=function(p,x,C){var L,O=mt(p),N=Q(p),j=mt(C),H,q,W=!1,Z=!1,st=!1;switch(x.indexOf("!")>=0&&(x=x.replace("!",""),Z=!0),x.indexOf("@")>=0&&(x=x.replace("@",""),W=!0),(O||j||W)&&(H=!O&&!N?"":""+p,q=""+C),W&&(p=H=H.toLowerCase(),C=q=q.toLowerCase()),x){case"*=":L=H.indexOf(q)>=0;break;case"$=":L=H.indexOf(q,H.length-q.length)>=0;break;case"^=":L=H.indexOf(q)===0;break;case"=":L=p===C;break;case">":st=!0,L=p>C;break;case">=":st=!0,L=p>=C;break;case"<":st=!0,L=p<C;break;case"<=":st=!0,L=p<=C;break;default:L=!1;break}return Z&&(p!=null||!st)&&(L=!L),L},Dtt=function(p,x){switch(x){case"?":return!!p;case"!":return!p;case"^":return p===void 0}},Mtt=function(p){return p!==void 0},tM=function(p,x){return p.data(x)},Itt=function(p,x){return p[x]()},zl=[],Yu=function(p,x){return p.checks.every(function(C){return zl[C.type](C,x)})};zl[Xi.GROUP]=function(y,p){var x=y.value;return x==="*"||x===p.group()},zl[Xi.STATE]=function(y,p){var x=y.value;return Ttt(x,p)},zl[Xi.ID]=function(y,p){var x=y.value;return p.id()===x},zl[Xi.CLASS]=function(y,p){var x=y.value;return p.hasClass(x)},zl[Xi.META_COMPARE]=function(y,p){var x=y.field,C=y.operator,L=y.value;return IR(Itt(p,x),C,L)},zl[Xi.DATA_COMPARE]=function(y,p){var x=y.field,C=y.operator,L=y.value;return IR(tM(p,x),C,L)},zl[Xi.DATA_BOOL]=function(y,p){var x=y.field,C=y.operator;return Dtt(tM(p,x),C)},zl[Xi.DATA_EXIST]=function(y,p){var x=y.field;return y.operator,Mtt(tM(p,x))},zl[Xi.UNDIRECTED_EDGE]=function(y,p){var x=y.nodes[0],C=y.nodes[1],L=p.source(),O=p.target();return Yu(x,L)&&Yu(C,O)||Yu(C,L)&&Yu(x,O)},zl[Xi.NODE_NEIGHBOR]=function(y,p){return Yu(y.node,p)&&p.neighborhood().some(function(x){return x.isNode()&&Yu(y.neighbor,x)})},zl[Xi.DIRECTED_EDGE]=function(y,p){return Yu(y.source,p.source())&&Yu(y.target,p.target())},zl[Xi.NODE_SOURCE]=function(y,p){return Yu(y.source,p)&&p.outgoers().some(function(x){return x.isNode()&&Yu(y.target,x)})},zl[Xi.NODE_TARGET]=function(y,p){return Yu(y.target,p)&&p.incomers().some(function(x){return x.isNode()&&Yu(y.source,x)})},zl[Xi.CHILD]=function(y,p){return Yu(y.child,p)&&Yu(y.parent,p.parent())},zl[Xi.PARENT]=function(y,p){return Yu(y.parent,p)&&p.children().some(function(x){return Yu(y.child,x)})},zl[Xi.DESCENDANT]=function(y,p){return Yu(y.descendant,p)&&p.ancestors().some(function(x){return Yu(y.ancestor,x)})},zl[Xi.ANCESTOR]=function(y,p){return Yu(y.ancestor,p)&&p.descendants().some(function(x){return Yu(y.descendant,x)})},zl[Xi.COMPOUND_SPLIT]=function(y,p){return Yu(y.subject,p)&&Yu(y.left,p)&&Yu(y.right,p)},zl[Xi.TRUE]=function(){return!0},zl[Xi.COLLECTION]=function(y,p){var x=y.value;return x.has(p)},zl[Xi.FILTER]=function(y,p){var x=y.value;return x(p)};var OR=function(p){var x=this;if(x.length===1&&x[0].checks.length===1&&x[0].checks[0].type===Xi.ID)return p.getElementById(x[0].checks[0].value).collection();var C=function(O){for(var N=0;N<x.length;N++){var j=x[N];if(Yu(j,O))return!0}return!1};return x.text()==null&&(C=function(){return!0}),p.filter(C)},Ott=function(p){for(var x=this,C=0;C<x.length;C++){var L=x[C];if(Yu(L,p))return!0}return!1},Ntt={matches:Ott,filter:OR},ly=function(p){this.inputText=p,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,p==null||mt(p)&&p.match(/^\s*$/)||(yt(p)?this.addQuery({checks:[{type:Xi.COLLECTION,value:p.collection()}]}):ct(p)?this.addQuery({checks:[{type:Xi.FILTER,value:p}]}):mt(p)?this.parse(p)||(this.invalid=!0):$l("A selector must be created from a string; found "))},x4=ly.prototype;[Ltt,Ntt].forEach(function(y){return we(x4,y)}),x4.text=function(){return this.inputText},x4.size=function(){return this.length},x4.eq=function(y){return this[y]},x4.sameText=function(y){return!this.invalid&&!y.invalid&&this.text()===y.text()},x4.addQuery=function(y){this[this.length++]=y},x4.selector=x4.toString;var hy={allAre:function(p){var x=new ly(p);return this.every(function(C){return x.matches(C)})},is:function(p){var x=new ly(p);return this.some(function(C){return x.matches(C)})},some:function(p,x){for(var C=0;C<this.length;C++){var L=x?p.apply(x,[this[C],C,this]):p(this[C],C,this);if(L)return!0}return!1},every:function(p,x){for(var C=0;C<this.length;C++){var L=x?p.apply(x,[this[C],C,this]):p(this[C],C,this);if(!L)return!1}return!0},same:function(p){if(this===p)return!0;p=this.cy().collection(p);var x=this.length,C=p.length;return x!==C?!1:x===1?this[0]===p[0]:this.every(function(L){return p.hasElementWithId(L.id())})},anySame:function(p){return p=this.cy().collection(p),this.some(function(x){return p.hasElementWithId(x.id())})},allAreNeighbors:function(p){p=this.cy().collection(p);var x=this.neighborhood();return p.every(function(C){return x.hasElementWithId(C.id())})},contains:function(p){p=this.cy().collection(p);var x=this;return p.every(function(C){return x.hasElementWithId(C.id())})}};hy.allAreNeighbours=hy.allAreNeighbors,hy.has=hy.contains,hy.equal=hy.equals=hy.same;var ap=function(p,x){return function(L,O,N,j){var H=L,q=this,W;if(H==null?W="":yt(H)&&H.length===1&&(W=H.id()),q.length===1&&W){var Z=q[0]._private,st=Z.traversalCache=Z.traversalCache||{},bt=st[x]=st[x]||[],pt=Nd(W),_t=bt[pt];return _t||(bt[pt]=p.call(q,L,O,N,j))}else return p.call(q,L,O,N,j)}},a6={parent:function(p){var x=[];if(this.length===1){var C=this[0]._private.parent;if(C)return C}for(var L=0;L<this.length;L++){var O=this[L],N=O._private.parent;N&&x.push(N)}return this.spawn(x,!0).filter(p)},parents:function(p){for(var x=[],C=this.parent();C.nonempty();){for(var L=0;L<C.length;L++){var O=C[L];x.push(O)}C=C.parent()}return this.spawn(x,!0).filter(p)},commonAncestors:function(p){for(var x,C=0;C<this.length;C++){var L=this[C],O=L.parents();x=x||O,x=x.intersect(O)}return x.filter(p)},orphans:function(p){return this.stdFilter(function(x){return x.isOrphan()}).filter(p)},nonorphans:function(p){return this.stdFilter(function(x){return x.isChild()}).filter(p)},children:ap(function(y){for(var p=[],x=0;x<this.length;x++)for(var C=this[x],L=C._private.children,O=0;O<L.length;O++)p.push(L[O]);return this.spawn(p,!0).filter(y)},"children"),siblings:function(p){return this.parent().children().not(this).filter(p)},isParent:function(){var p=this[0];if(p)return p.isNode()&&p._private.children.length!==0},isChildless:function(){var p=this[0];if(p)return p.isNode()&&p._private.children.length===0},isChild:function(){var p=this[0];if(p)return p.isNode()&&p._private.parent!=null},isOrphan:function(){var p=this[0];if(p)return p.isNode()&&p._private.parent==null},descendants:function(p){var x=[];function C(L){for(var O=0;O<L.length;O++){var N=L[O];x.push(N),N.children().nonempty()&&C(N.children())}}return C(this.children()),this.spawn(x,!0).filter(p)}};function eM(y,p,x,C){for(var L=[],O=new Wx,N=y.cy(),j=N.hasCompoundNodes(),H=0;H<y.length;H++){var q=y[H];x?L.push(q):j&&C(L,O,q)}for(;L.length>0;){var W=L.shift();p(W),O.add(W.id()),j&&C(L,O,W)}return y}function NR(y,p,x){if(x.isParent())for(var C=x._private.children,L=0;L<C.length;L++){var O=C[L];p.has(O.id())||y.push(O)}}a6.forEachDown=function(y){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return eM(this,y,p,NR)};function PR(y,p,x){if(x.isChild()){var C=x._private.parent;p.has(C.id())||y.push(C)}}a6.forEachUp=function(y){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return eM(this,y,p,PR)};function Ptt(y,p,x){PR(y,p,x),NR(y,p,x)}a6.forEachUpAndDown=function(y){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return eM(this,y,p,Ptt)},a6.ancestors=a6.parents;var G1,FR;G1=FR={data:Kc.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:Kc.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Kc.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Kc.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Kc.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Kc.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var p=this[0];if(p)return p._private.data.id}},G1.attr=G1.data,G1.removeAttr=G1.removeData;var fy=FR,q8={};function nM(y){return function(p){var x=this;if(p===void 0&&(p=!0),x.length!==0)if(x.isNode()&&!x.removed()){for(var C=0,L=x[0],O=L._private.edges,N=0;N<O.length;N++){var j=O[N];!p&&j.isLoop()||(C+=y(L,j))}return C}else return}}we(q8,{degree:nM(function(y,p){return p.source().same(p.target())?2:1}),indegree:nM(function(y,p){return p.target().same(y)?1:0}),outdegree:nM(function(y,p){return p.source().same(y)?1:0})});function o6(y,p){return function(x){for(var C,L=this.nodes(),O=0;O<L.length;O++){var N=L[O],j=N[y](x);j!==void 0&&(C===void 0||p(j,C))&&(C=j)}return C}}we(q8,{minDegree:o6("degree",function(y,p){return y<p}),maxDegree:o6("degree",function(y,p){return y>p}),minIndegree:o6("indegree",function(y,p){return y<p}),maxIndegree:o6("indegree",function(y,p){return y>p}),minOutdegree:o6("outdegree",function(y,p){return y<p}),maxOutdegree:o6("outdegree",function(y,p){return y>p})}),we(q8,{totalDegree:function(p){for(var x=0,C=this.nodes(),L=0;L<C.length;L++)x+=C[L].degree(p);return x}});var db,BR,RR=function(p,x,C){for(var L=0;L<p.length;L++){var O=p[L];if(!O.locked()){var N=O._private.position,j={x:x.x!=null?x.x-N.x:0,y:x.y!=null?x.y-N.y:0};O.isParent()&&!(j.x===0&&j.y===0)&&O.children().shift(j,C),O.dirtyBoundingBoxCache()}}},jR={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(p){p.updateCompoundBounds()},beforeSet:function(p,x){RR(p,x,!1)},onSet:function(p){p.dirtyCompoundBoundsCache()},canSet:function(p){return!p.locked()}};db=BR={position:Kc.data(jR),silentPosition:Kc.data(we({},jR,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(p,x){RR(p,x,!0)},onSet:function(p){p.dirtyCompoundBoundsCache()}})),positions:function(p,x){if(it(p))x?this.silentPosition(p):this.position(p);else if(ct(p)){var C=p,L=this.cy();L.startBatch();for(var O=0;O<this.length;O++){var N=this[O],j=void 0;(j=C(N,O))&&(x?N.silentPosition(j):N.position(j))}L.endBatch()}return this},silentPositions:function(p){return this.positions(p,!0)},shift:function(p,x,C){var L;if(it(p)?(L={x:Q(p.x)?p.x:0,y:Q(p.y)?p.y:0},C=x):mt(p)&&Q(x)&&(L={x:0,y:0},L[p]=x),L!=null){var O=this.cy();O.startBatch();for(var N=0;N<this.length;N++){var j=this[N];if(!(O.hasCompoundNodes()&&j.isChild()&&j.ancestors().anySame(this))){var H=j.position(),q={x:H.x+L.x,y:H.y+L.y};C?j.silentPosition(q):j.position(q)}}O.endBatch()}return this},silentShift:function(p,x){return it(p)?this.shift(p,!0):mt(p)&&Q(x)&&this.shift(p,x,!0),this},renderedPosition:function(p,x){var C=this[0],L=this.cy(),O=L.zoom(),N=L.pan(),j=it(p)?p:void 0,H=j!==void 0||x!==void 0&&mt(p);if(C&&C.isNode())if(H)for(var q=0;q<this.length;q++){var W=this[q];x!==void 0?W.position(p,(x-N[p])/O):j!==void 0&&W.position(PB(j,O,N))}else{var Z=C.position();return j=W9(Z,O,N),p===void 0?j:j[p]}else if(!H)return;return this},relativePosition:function(p,x){var C=this[0],L=this.cy(),O=it(p)?p:void 0,N=O!==void 0||x!==void 0&&mt(p),j=L.hasCompoundNodes();if(C&&C.isNode())if(N)for(var H=0;H<this.length;H++){var q=this[H],W=j?q.parent():null,Z=W&&W.length>0,st=Z;Z&&(W=W[0]);var bt=st?W.position():{x:0,y:0};x!==void 0?q.position(p,x+bt[p]):O!==void 0&&q.position({x:O.x+bt.x,y:O.y+bt.y})}else{var pt=C.position(),_t=j?C.parent():null,St=_t&&_t.length>0,Et=St;St&&(_t=_t[0]);var Nt=Et?_t.position():{x:0,y:0};return O={x:pt.x-Nt.x,y:pt.y-Nt.y},p===void 0?O:O[p]}else if(!N)return;return this}},db.modelPosition=db.point=db.position,db.modelPositions=db.points=db.positions,db.renderedPoint=db.renderedPosition,db.relativePoint=db.relativePosition;var Ftt=BR,c6,dy;c6=dy={},dy.renderedBoundingBox=function(y){var p=this.boundingBox(y),x=this.cy(),C=x.zoom(),L=x.pan(),O=p.x1*C+L.x,N=p.x2*C+L.x,j=p.y1*C+L.y,H=p.y2*C+L.y;return{x1:O,x2:N,y1:j,y2:H,w:N-O,h:H-j}},dy.dirtyCompoundBoundsCache=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=this.cy();return!p.styleEnabled()||!p.hasCompoundNodes()?this:(this.forEachUp(function(x){if(x.isParent()){var C=x._private;C.compoundBoundsClean=!1,C.bbCache=null,y||x.emitAndNotify("bounds")}}),this)},dy.updateCompoundBounds=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=this.cy();if(!p.styleEnabled()||!p.hasCompoundNodes())return this;if(!y&&p.batching())return this;function x(N){if(!N.isParent())return;var j=N._private,H=N.children(),q=N.pstyle("compound-sizing-wrt-labels").value==="include",W={width:{val:N.pstyle("min-width").pfValue,left:N.pstyle("min-width-bias-left"),right:N.pstyle("min-width-bias-right")},height:{val:N.pstyle("min-height").pfValue,top:N.pstyle("min-height-bias-top"),bottom:N.pstyle("min-height-bias-bottom")}},Z=H.boundingBox({includeLabels:q,includeOverlays:!1,useCache:!1}),st=j.position;(Z.w===0||Z.h===0)&&(Z={w:N.pstyle("width").pfValue,h:N.pstyle("height").pfValue},Z.x1=st.x-Z.w/2,Z.x2=st.x+Z.w/2,Z.y1=st.y-Z.h/2,Z.y2=st.y+Z.h/2);function bt(Yt,Ee,Te){var ie=0,ze=0,me=Ee+Te;return Yt>0&&me>0&&(ie=Ee/me*Yt,ze=Te/me*Yt),{biasDiff:ie,biasComplementDiff:ze}}function pt(Yt,Ee,Te,ie){if(Te.units==="%")switch(ie){case"width":return Yt>0?Te.pfValue*Yt:0;case"height":return Ee>0?Te.pfValue*Ee:0;case"average":return Yt>0&&Ee>0?Te.pfValue*(Yt+Ee)/2:0;case"min":return Yt>0&&Ee>0?Yt>Ee?Te.pfValue*Ee:Te.pfValue*Yt:0;case"max":return Yt>0&&Ee>0?Yt>Ee?Te.pfValue*Yt:Te.pfValue*Ee:0;default:return 0}else return Te.units==="px"?Te.pfValue:0}var _t=W.width.left.value;W.width.left.units==="px"&&W.width.val>0&&(_t=_t*100/W.width.val);var St=W.width.right.value;W.width.right.units==="px"&&W.width.val>0&&(St=St*100/W.width.val);var Et=W.height.top.value;W.height.top.units==="px"&&W.height.val>0&&(Et=Et*100/W.height.val);var Nt=W.height.bottom.value;W.height.bottom.units==="px"&&W.height.val>0&&(Nt=Nt*100/W.height.val);var Pt=bt(W.width.val-Z.w,_t,St),qt=Pt.biasDiff,re=Pt.biasComplementDiff,ee=bt(W.height.val-Z.h,Et,Nt),Ut=ee.biasDiff,de=ee.biasComplementDiff;j.autoPadding=pt(Z.w,Z.h,N.pstyle("padding"),N.pstyle("padding-relative-to").value),j.autoWidth=Math.max(Z.w,W.width.val),st.x=(-qt+Z.x1+Z.x2+re)/2,j.autoHeight=Math.max(Z.h,W.height.val),st.y=(-Ut+Z.y1+Z.y2+de)/2}for(var C=0;C<this.length;C++){var L=this[C],O=L._private;(!O.compoundBoundsClean||y)&&(x(L),p.batching()||(O.compoundBoundsClean=!0))}return this};var op=function(p){return p===1/0||p===-1/0?0:p},gb=function(p,x,C,L,O){L-x===0||O-C===0||x==null||C==null||L==null||O==null||(p.x1=x<p.x1?x:p.x1,p.x2=L>p.x2?L:p.x2,p.y1=C<p.y1?C:p.y1,p.y2=O>p.y2?O:p.y2,p.w=p.x2-p.x1,p.h=p.y2-p.y1)},k4=function(p,x){return x==null?p:gb(p,x.x1,x.y1,x.x2,x.y2)},H8=function(p,x,C){return fb(p,x,C)},hC=function(p,x,C){if(!x.cy().headless()){var L=x._private,O=L.rstyle,N=O.arrowWidth/2,j=x.pstyle(C+"-arrow-shape").value,H,q;if(j!=="none"){C==="source"?(H=O.srcX,q=O.srcY):C==="target"?(H=O.tgtX,q=O.tgtY):(H=O.midX,q=O.midY);var W=L.arrowBounds=L.arrowBounds||{},Z=W[C]=W[C]||{};Z.x1=H-N,Z.y1=q-N,Z.x2=H+N,Z.y2=q+N,Z.w=Z.x2-Z.x1,Z.h=Z.y2-Z.y1,X9(Z,1),gb(p,Z.x1,Z.y1,Z.x2,Z.y2)}}},rM=function(p,x,C){if(!x.cy().headless()){var L;C?L=C+"-":L="";var O=x._private,N=O.rstyle,j=x.pstyle(L+"label").strValue;if(j){var H=x.pstyle("text-halign"),q=x.pstyle("text-valign"),W=H8(N,"labelWidth",C),Z=H8(N,"labelHeight",C),st=H8(N,"labelX",C),bt=H8(N,"labelY",C),pt=x.pstyle(L+"text-margin-x").pfValue,_t=x.pstyle(L+"text-margin-y").pfValue,St=x.isEdge(),Et=x.pstyle(L+"text-rotation"),Nt=x.pstyle("text-outline-width").pfValue,Pt=x.pstyle("text-border-width").pfValue,qt=Pt/2,re=x.pstyle("text-background-padding").pfValue,ee=2,Ut=Z,de=W,Yt=de/2,Ee=Ut/2,Te,ie,ze,me;if(St)Te=st-Yt,ie=st+Yt,ze=bt-Ee,me=bt+Ee;else{switch(H.value){case"left":Te=st-de,ie=st;break;case"center":Te=st-Yt,ie=st+Yt;break;case"right":Te=st,ie=st+de;break}switch(q.value){case"top":ze=bt-Ut,me=bt;break;case"center":ze=bt-Ee,me=bt+Ee;break;case"bottom":ze=bt,me=bt+Ut;break}}Te+=pt-Math.max(Nt,qt)-re-ee,ie+=pt+Math.max(Nt,qt)+re+ee,ze+=_t-Math.max(Nt,qt)-re-ee,me+=_t+Math.max(Nt,qt)+re+ee;var yn=C||"main",nn=O.labelBounds,qe=nn[yn]=nn[yn]||{};qe.x1=Te,qe.y1=ze,qe.x2=ie,qe.y2=me,qe.w=ie-Te,qe.h=me-ze;var Tn=St&&Et.strValue==="autorotate",Xn=Et.pfValue!=null&&Et.pfValue!==0;if(Tn||Xn){var lr=Tn?H8(O.rstyle,"labelAngle",C):Et.pfValue,Sn=Math.cos(lr),or=Math.sin(lr),pr=(Te+ie)/2,kr=(ze+me)/2;if(!St){switch(H.value){case"left":pr=ie;break;case"right":pr=Te;break}switch(q.value){case"top":kr=me;break;case"bottom":kr=ze;break}}var wr=function(na,vi){return na=na-pr,vi=vi-kr,{x:na*Sn-vi*or+pr,y:na*or+vi*Sn+kr}},Cr=wr(Te,ze),$n=wr(Te,me),cr=wr(ie,ze),mr=wr(ie,me);Te=Math.min(Cr.x,$n.x,cr.x,mr.x),ie=Math.max(Cr.x,$n.x,cr.x,mr.x),ze=Math.min(Cr.y,$n.y,cr.y,mr.y),me=Math.max(Cr.y,$n.y,cr.y,mr.y)}var Sr=yn+"Rot",gi=nn[Sr]=nn[Sr]||{};gi.x1=Te,gi.y1=ze,gi.x2=ie,gi.y2=me,gi.w=ie-Te,gi.h=me-ze,gb(p,Te,ze,ie,me),gb(O.labelBounds.all,Te,ze,ie,me)}return p}},Btt=function(p,x){if(!x.cy().headless()){var C=x.pstyle("outline-opacity").value,L=x.pstyle("outline-width").value;if(C>0&&L>0){var O=x.pstyle("outline-offset").value,N=x.pstyle("shape").value,j=L+O,H=(p.w+j*2)/p.w,q=(p.h+j*2)/p.h,W=0,Z=0;["diamond","pentagon","round-triangle"].includes(N)?(H=(p.w+j*2.4)/p.w,Z=-j/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(N)?H=(p.w+j*2.4)/p.w:N==="star"?(H=(p.w+j*2.8)/p.w,q=(p.h+j*2.6)/p.h,Z=-j/3.8):N==="triangle"?(H=(p.w+j*2.8)/p.w,q=(p.h+j*2.4)/p.h,Z=-j/1.4):N==="vee"&&(H=(p.w+j*4.4)/p.w,q=(p.h+j*3.8)/p.h,Z=-j*.5);var st=p.h*q-p.h,bt=p.w*H-p.w;if(Q9(p,[Math.ceil(st/2),Math.ceil(bt/2)]),W!=0||Z!==0){var pt=pQ(p,W,Z);BB(p,pt)}}}},Rtt=function(p,x){var C=p._private.cy,L=C.styleEnabled(),O=C.headless(),N=v0(),j=p._private,H=p.isNode(),q=p.isEdge(),W,Z,st,bt,pt,_t,St=j.rstyle,Et=H&&L?p.pstyle("bounds-expansion").pfValue:[0],Nt=function(Qi){return Qi.pstyle("display").value!=="none"},Pt=!L||Nt(p)&&(!q||Nt(p.source())&&Nt(p.target()));if(Pt){var qt=0,re=0;L&&x.includeOverlays&&(qt=p.pstyle("overlay-opacity").value,qt!==0&&(re=p.pstyle("overlay-padding").value));var ee=0,Ut=0;L&&x.includeUnderlays&&(ee=p.pstyle("underlay-opacity").value,ee!==0&&(Ut=p.pstyle("underlay-padding").value));var de=Math.max(re,Ut),Yt=0,Ee=0;if(L&&(Yt=p.pstyle("width").pfValue,Ee=Yt/2),H&&x.includeNodes){var Te=p.position();pt=Te.x,_t=Te.y;var ie=p.outerWidth(),ze=ie/2,me=p.outerHeight(),yn=me/2;W=pt-ze,Z=pt+ze,st=_t-yn,bt=_t+yn,gb(N,W,st,Z,bt),L&&x.includeOutlines&&Btt(N,p)}else if(q&&x.includeEdges)if(L&&!O){var nn=p.pstyle("curve-style").strValue;if(W=Math.min(St.srcX,St.midX,St.tgtX),Z=Math.max(St.srcX,St.midX,St.tgtX),st=Math.min(St.srcY,St.midY,St.tgtY),bt=Math.max(St.srcY,St.midY,St.tgtY),W-=Ee,Z+=Ee,st-=Ee,bt+=Ee,gb(N,W,st,Z,bt),nn==="haystack"){var qe=St.haystackPts;if(qe&&qe.length===2){if(W=qe[0].x,st=qe[0].y,Z=qe[1].x,bt=qe[1].y,W>Z){var Tn=W;W=Z,Z=Tn}if(st>bt){var Xn=st;st=bt,bt=Xn}gb(N,W-Ee,st-Ee,Z+Ee,bt+Ee)}}else if(nn==="bezier"||nn==="unbundled-bezier"||nn==="segments"||nn==="taxi"){var lr;switch(nn){case"bezier":case"unbundled-bezier":lr=St.bezierPts;break;case"segments":case"taxi":lr=St.linePts;break}if(lr!=null)for(var Sn=0;Sn<lr.length;Sn++){var or=lr[Sn];W=or.x-Ee,Z=or.x+Ee,st=or.y-Ee,bt=or.y+Ee,gb(N,W,st,Z,bt)}}}else{var pr=p.source(),kr=pr.position(),wr=p.target(),Cr=wr.position();if(W=kr.x,Z=Cr.x,st=kr.y,bt=Cr.y,W>Z){var $n=W;W=Z,Z=$n}if(st>bt){var cr=st;st=bt,bt=cr}W-=Ee,Z+=Ee,st-=Ee,bt+=Ee,gb(N,W,st,Z,bt)}if(L&&x.includeEdges&&q&&(hC(N,p,"mid-source"),hC(N,p,"mid-target"),hC(N,p,"source"),hC(N,p,"target")),L){var mr=p.pstyle("ghost").value==="yes";if(mr){var Sr=p.pstyle("ghost-offset-x").pfValue,gi=p.pstyle("ghost-offset-y").pfValue;gb(N,N.x1+Sr,N.y1+gi,N.x2+Sr,N.y2+gi)}}var ss=j.bodyBounds=j.bodyBounds||{};RB(ss,N),Q9(ss,Et),X9(ss,1),L&&(W=N.x1,Z=N.x2,st=N.y1,bt=N.y2,gb(N,W-de,st-de,Z+de,bt+de));var na=j.overlayBounds=j.overlayBounds||{};RB(na,N),Q9(na,Et),X9(na,1);var vi=j.labelBounds=j.labelBounds||{};vi.all!=null?gQ(vi.all):vi.all=v0(),L&&x.includeLabels&&(x.includeMainLabels&&rM(N,p,null),q&&(x.includeSourceLabels&&rM(N,p,"source"),x.includeTargetLabels&&rM(N,p,"target")))}return N.x1=op(N.x1),N.y1=op(N.y1),N.x2=op(N.x2),N.y2=op(N.y2),N.w=op(N.x2-N.x1),N.h=op(N.y2-N.y1),N.w>0&&N.h>0&&Pt&&(Q9(N,Et),X9(N,1)),N},$R=function(p){var x=0,C=function(N){return(N?1:0)<<x++},L=0;return L+=C(p.incudeNodes),L+=C(p.includeEdges),L+=C(p.includeLabels),L+=C(p.includeMainLabels),L+=C(p.includeSourceLabels),L+=C(p.includeTargetLabels),L+=C(p.includeOverlays),L+=C(p.includeOutlines),L},zR=function(p){if(p.isEdge()){var x=p.source().position(),C=p.target().position(),L=function(N){return Math.round(N)};return U1([L(x.x),L(x.y),L(C.x),L(C.y)])}else return 0},je=function(p,x){var C=p._private,L,O=p.isEdge(),N=x==null?qR:$R(x),j=N===qR,H=zR(p),q=C.bbCachePosKey===H,W=x.useCache&&q,Z=function(_t){return _t._private.bbCache==null||_t._private.styleDirty},st=!W||Z(p)||O&&Z(p.source())||Z(p.target());if(st?(q||p.recalculateRenderedStyle(W),L=Rtt(p,V8),C.bbCache=L,C.bbCachePosKey=H):L=C.bbCache,!j){var bt=p.isNode();L=v0(),(x.includeNodes&&bt||x.includeEdges&&!bt)&&(x.includeOverlays?k4(L,C.overlayBounds):k4(L,C.bodyBounds)),x.includeLabels&&(x.includeMainLabels&&(!O||x.includeSourceLabels&&x.includeTargetLabels)?k4(L,C.labelBounds.all):(x.includeMainLabels&&k4(L,C.labelBounds.mainRot),x.includeSourceLabels&&k4(L,C.labelBounds.sourceRot),x.includeTargetLabels&&k4(L,C.labelBounds.targetRot))),L.w=L.x2-L.x1,L.h=L.y2-L.y1}return L},V8={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},qR=$R(V8),HR=p1(V8);dy.boundingBox=function(y){var p;if(this.length===1&&this[0]._private.bbCache!=null&&!this[0]._private.styleDirty&&(y===void 0||y.useCache===void 0||y.useCache===!0))y===void 0?y=V8:y=HR(y),p=je(this[0],y);else{p=v0(),y=y||V8;var x=HR(y),C=this,L=C.cy(),O=L.styleEnabled();if(O)for(var N=0;N<C.length;N++){var j=C[N],H=j._private,q=zR(j),W=H.bbCachePosKey===q,Z=x.useCache&&W&&!H.styleDirty;j.recalculateRenderedStyle(Z)}this.updateCompoundBounds(!y.useCache);for(var st=0;st<C.length;st++){var bt=C[st];k4(p,je(bt,x))}}return p.x1=op(p.x1),p.y1=op(p.y1),p.x2=op(p.x2),p.y2=op(p.y2),p.w=op(p.x2-p.x1),p.h=op(p.y2-p.y1),p},dy.dirtyBoundingBoxCache=function(){for(var y=0;y<this.length;y++){var p=this[y]._private;p.bbCache=null,p.bbCachePosKey=null,p.bodyBounds=null,p.overlayBounds=null,p.labelBounds.all=null,p.labelBounds.source=null,p.labelBounds.target=null,p.labelBounds.main=null,p.labelBounds.sourceRot=null,p.labelBounds.targetRot=null,p.labelBounds.mainRot=null,p.arrowBounds.source=null,p.arrowBounds.target=null,p.arrowBounds["mid-source"]=null,p.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},dy.boundingBoxAt=function(y){var p=this.nodes(),x=this.cy(),C=x.hasCompoundNodes(),L=x.collection();if(C&&(L=p.filter(function(q){return q.isParent()}),p=p.not(L)),it(y)){var O=y;y=function(){return O}}var N=function(W,Z){return W._private.bbAtOldPos=y(W,Z)},j=function(W){return W._private.bbAtOldPos};x.startBatch(),p.forEach(N).silentPositions(y),C&&(L.dirtyCompoundBoundsCache(),L.dirtyBoundingBoxCache(),L.updateCompoundBounds(!0));var H=dQ(this.boundingBox({useCache:!1}));return p.silentPositions(j),C&&(L.dirtyCompoundBoundsCache(),L.dirtyBoundingBoxCache(),L.updateCompoundBounds(!0)),x.endBatch(),H},c6.boundingbox=c6.bb=c6.boundingBox,c6.renderedBoundingbox=c6.renderedBoundingBox;var jtt=dy,U8,G8;U8=G8={};var VR=function(p){p.uppercaseName=tn(p.name),p.autoName="auto"+p.uppercaseName,p.labelName="label"+p.uppercaseName,p.outerName="outer"+p.uppercaseName,p.uppercaseOuterName=tn(p.outerName),U8[p.name]=function(){var C=this[0],L=C._private,O=L.cy,N=O._private.styleEnabled;if(C)if(N){if(C.isParent())return C.updateCompoundBounds(),L[p.autoName]||0;var j=C.pstyle(p.name);switch(j.strValue){case"label":return C.recalculateRenderedStyle(),L.rstyle[p.labelName]||0;default:return j.pfValue}}else return 1},U8["outer"+p.uppercaseName]=function(){var C=this[0],L=C._private,O=L.cy,N=O._private.styleEnabled;if(C)if(N){var j=C[p.name](),H=C.pstyle("border-width").pfValue,q=2*C.padding();return j+H+q}else return 1},U8["rendered"+p.uppercaseName]=function(){var C=this[0];if(C){var L=C[p.name]();return L*this.cy().zoom()}},U8["rendered"+p.uppercaseOuterName]=function(){var C=this[0];if(C){var L=C[p.outerName]();return L*this.cy().zoom()}}};VR({name:"width"}),VR({name:"height"}),G8.padding=function(){var y=this[0],p=y._private;return y.isParent()?(y.updateCompoundBounds(),p.autoPadding!==void 0?p.autoPadding:y.pstyle("padding").pfValue):y.pstyle("padding").pfValue},G8.paddedHeight=function(){var y=this[0];return y.height()+2*y.padding()},G8.paddedWidth=function(){var y=this[0];return y.width()+2*y.padding()};var $tt=G8,ztt=function(p,x){if(p.isEdge())return x(p)},qtt=function(p,x){if(p.isEdge()){var C=p.cy();return W9(x(p),C.zoom(),C.pan())}},Htt=function(p,x){if(p.isEdge()){var C=p.cy(),L=C.pan(),O=C.zoom();return x(p).map(function(N){return W9(N,O,L)})}},Vtt=function(p){return p.renderer().getControlPoints(p)},Utt=function(p){return p.renderer().getSegmentPoints(p)},iM=function(p){return p.renderer().getSourceEndpoint(p)},Gtt=function(p){return p.renderer().getTargetEndpoint(p)},Ktt=function(p){return p.renderer().getEdgeMidpoint(p)},UR={controlPoints:{get:Vtt,mult:!0},segmentPoints:{get:Utt,mult:!0},sourceEndpoint:{get:iM},targetEndpoint:{get:Gtt},midpoint:{get:Ktt}},fC=function(p){return"rendered"+p[0].toUpperCase()+p.substr(1)},Wtt=Object.keys(UR).reduce(function(y,p){var x=UR[p],C=fC(p);return y[p]=function(){return ztt(this,x.get)},x.mult?y[C]=function(){return Htt(this,x.get)}:y[C]=function(){return qtt(this,x.get)},y},{}),sM=we({},Ftt,jtt,$tt,Wtt);/*!
1547 `),Et=0;Et<St.length;Et++){var Nt=St[Et],Pt=st.measureText(Nt),qt=Math.ceil(Pt.width),re=H;pt=Math.max(qt,pt),_t+=re}return pt+=N,_t+=N,L[C]={width:pt,height:_t}},j2.calculateLabelAngle=function(y,p){var x=y._private,C=x.rscratch,L=y.isEdge(),O=p?p+"-":"",N=y.pstyle(O+"text-rotation"),j=N.strValue;return j==="none"?0:L&&j==="autorotate"?C.labelAutoAngle:j==="autorotate"?0:N.pfValue},j2.calculateLabelAngles=function(y){var p=this,x=y.isEdge(),C=y._private,L=C.rscratch;L.labelAngle=p.calculateLabelAngle(y),x&&(L.sourceLabelAngle=p.calculateLabelAngle(y,"source"),L.targetLabelAngle=p.calculateLabelAngle(y,"target"))};var Tj={},Cj=28,Sj=!1;Tj.getNodeShape=function(y){var p=this,x=y.pstyle("shape").value;if(x==="cutrectangle"&&(y.width()<Cj||y.height()<Cj))return Sj||(Gc("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Sj=!0),"rectangle";if(y.isParent())return x==="rectangle"||x==="roundrectangle"||x==="round-rectangle"||x==="cutrectangle"||x==="cut-rectangle"||x==="barrel"?x:"rectangle";if(x==="polygon"){var C=y.pstyle("shape-polygon-points").value;return p.nodeShapes.makePolygon(C).name}return x};var MC={};MC.registerCalculationListeners=function(){var y=this.cy,p=y.collection(),x=this,C=function(N){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(p.merge(N),j)for(var H=0;H<N.length;H++){var q=N[H],W=q._private,Z=W.rstyle;Z.clean=!1,Z.cleanConnected=!1}};x.binder(y).on("bounds.* dirty.*",function(N){var j=N.target;C(j)}).on("style.* background.*",function(N){var j=N.target;C(j,!1)});var L=function(N){if(N){var j=x.onUpdateEleCalcsFns;p.cleanStyle();for(var H=0;H<p.length;H++){var q=p[H],W=q._private.rstyle;q.isNode()&&!W.cleanConnected&&(C(q.connectedEdges()),W.cleanConnected=!0)}if(j)for(var Z=0;Z<j.length;Z++){var st=j[Z];st(N,p)}x.recalculateRenderedStyle(p),p=y.collection()}};x.flushRenderedStyleQueue=function(){L(!0)},x.beforeRender(L,x.beforeRenderPriorities.eleCalcs)},MC.onUpdateEleCalcs=function(y){var p=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];p.push(y)},MC.recalculateRenderedStyle=function(y,p){var x=function(qt){return qt._private.rstyle.cleanConnected},C=[],L=[];if(!this.destroyed){p===void 0&&(p=!0);for(var O=0;O<y.length;O++){var N=y[O],j=N._private,H=j.rstyle;N.isEdge()&&(!x(N.source())||!x(N.target()))&&(H.clean=!1),!(p&&H.clean||N.removed())&&N.pstyle("display").value!=="none"&&(j.group==="nodes"?L.push(N):C.push(N),H.clean=!0)}for(var q=0;q<L.length;q++){var W=L[q],Z=W._private,st=Z.rstyle,bt=W.position();this.recalculateNodeLabelProjection(W),st.nodeX=bt.x,st.nodeY=bt.y,st.nodeW=W.pstyle("width").pfValue,st.nodeH=W.pstyle("height").pfValue}this.recalculateEdgeProjections(C);for(var pt=0;pt<C.length;pt++){var _t=C[pt],St=_t._private,Et=St.rstyle,Nt=St.rscratch;Et.srcX=Nt.arrowStartX,Et.srcY=Nt.arrowStartY,Et.tgtX=Nt.arrowEndX,Et.tgtY=Nt.arrowEndY,Et.midX=Nt.midX,Et.midY=Nt.midY,Et.labelAngle=Nt.labelAngle,Et.sourceLabelAngle=Nt.sourceLabelAngle,Et.targetLabelAngle=Nt.targetLabelAngle}}};var IC={};IC.updateCachedGrabbedEles=function(){var y=this.cachedZSortedEles;if(y){y.drag=[],y.nondrag=[];for(var p=[],x=0;x<y.length;x++){var C=y[x],L=C._private.rscratch;C.grabbed()&&!C.isParent()?p.push(C):L.inDragLayer?y.drag.push(C):y.nondrag.push(C)}for(var x=0;x<p.length;x++){var C=p[x];y.drag.push(C)}}},IC.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},IC.getCachedZSortedEles=function(y){if(y||!this.cachedZSortedEles){var p=this.cy.mutableElements().toArray();p.sort(cM),p.interactive=p.filter(function(x){return x.interactive()}),this.cachedZSortedEles=p,this.updateCachedGrabbedEles()}else p=this.cachedZSortedEles;return p};var _j={};[C4,LC,Q1,eE,mM,j2,Tj,MC,IC].forEach(function(y){we(_j,y)});var Aj={};Aj.getCachedImage=function(y,p,x){var C=this,L=C.imageCache=C.imageCache||{},O=L[y];if(O)return O.image.complete||O.image.addEventListener("load",x),O.image;O=L[y]=L[y]||{};var N=O.image=new Image;N.addEventListener("load",x),N.addEventListener("error",function(){N.error=!0});var j="data:",H=y.substring(0,j.length).toLowerCase()===j;return H||(p=p==="null"?null:p,N.crossOrigin=p),N.src=y,N};var d6={};d6.registerBinding=function(y,p,x,C){var L=Array.prototype.slice.apply(arguments,[1]),O=this.binder(y);return O.on.apply(O,L)},d6.binder=function(y){var p=this,x=p.cy.window(),C=y===x||y===x.document||y===x.document.body||Ct(y);if(p.supportsPassiveEvents==null){var L=!1;try{var O=Object.defineProperty({},"passive",{get:function(){return L=!0,!0}});x.addEventListener("test",null,O)}catch{}p.supportsPassiveEvents=L}var N=function(H,q,W){var Z=Array.prototype.slice.call(arguments);return C&&p.supportsPassiveEvents&&(Z[2]={capture:W??!1,passive:!1,once:!1}),p.bindings.push({target:y,args:Z}),(y.addEventListener||y.on).apply(y,Z),this};return{on:N,addEventListener:N,addListener:N,bind:N}},d6.nodeIsDraggable=function(y){return y&&y.isNode()&&!y.locked()&&y.grabbable()},d6.nodeIsGrabbable=function(y){return this.nodeIsDraggable(y)&&y.interactive()},d6.load=function(){var y=this,p=y.cy.window(),x=function(G){return G.selected()},C=function(G,Vn,gr,nr){G==null&&(G=y.cy);for(var Be=0;Be<Vn.length;Be++){var Ls=Vn[Be];G.emit({originalEvent:gr,type:Ls,position:nr})}},L=function(G){return G.shiftKey||G.metaKey||G.ctrlKey},O=function(G,Vn){var gr=!0;if(y.cy.hasCompoundNodes()&&G&&G.pannable())for(var nr=0;Vn&&nr<Vn.length;nr++){var G=Vn[nr];if(G.isNode()&&G.isParent()&&!G.pannable()){gr=!1;break}}else gr=!0;return gr},N=function(G){G[0]._private.grabbed=!0},j=function(G){G[0]._private.grabbed=!1},H=function(G){G[0]._private.rscratch.inDragLayer=!0},q=function(G){G[0]._private.rscratch.inDragLayer=!1},W=function(G){G[0]._private.rscratch.isGrabTarget=!0},Z=function(G){G[0]._private.rscratch.isGrabTarget=!1},st=function(G,Vn){var gr=Vn.addToList,nr=gr.has(G);!nr&&G.grabbable()&&!G.locked()&&(gr.merge(G),N(G))},bt=function(G,Vn){if(G.cy().hasCompoundNodes()&&!(Vn.inDragLayer==null&&Vn.addToList==null)){var gr=G.descendants();Vn.inDragLayer&&(gr.forEach(H),gr.connectedEdges().forEach(H)),Vn.addToList&&st(gr,Vn)}},pt=function(G,Vn){Vn=Vn||{};var gr=G.cy().hasCompoundNodes();Vn.inDragLayer&&(G.forEach(H),G.neighborhood().stdFilter(function(nr){return!gr||nr.isEdge()}).forEach(H)),Vn.addToList&&G.forEach(function(nr){st(nr,Vn)}),bt(G,Vn),Et(G,{inDragLayer:Vn.inDragLayer}),y.updateCachedGrabbedEles()},_t=pt,St=function(G){G&&(y.getCachedZSortedEles().forEach(function(Vn){j(Vn),q(Vn),Z(Vn)}),y.updateCachedGrabbedEles())},Et=function(G,Vn){if(!(Vn.inDragLayer==null&&Vn.addToList==null)&&G.cy().hasCompoundNodes()){var gr=G.ancestors().orphans();if(!gr.same(G)){var nr=gr.descendants().spawnSelf().merge(gr).unmerge(G).unmerge(G.descendants()),Be=nr.connectedEdges();Vn.inDragLayer&&(Be.forEach(H),nr.forEach(H)),Vn.addToList&&nr.forEach(function(Ls){st(Ls,Vn)})}}},Nt=function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},Pt=typeof MutationObserver<"u",qt=typeof ResizeObserver<"u";Pt?(y.removeObserver=new MutationObserver(function(Kn){for(var G=0;G<Kn.length;G++){var Vn=Kn[G],gr=Vn.removedNodes;if(gr)for(var nr=0;nr<gr.length;nr++){var Be=gr[nr];if(Be===y.container){y.destroy();break}}}}),y.container.parentNode&&y.removeObserver.observe(y.container.parentNode,{childList:!0})):y.registerBinding(y.container,"DOMNodeRemoved",function(Kn){y.destroy()});var re=pu(function(){y.cy.resize()},100);Pt&&(y.styleObserver=new MutationObserver(re),y.styleObserver.observe(y.container,{attributes:!0})),y.registerBinding(p,"resize",re),qt&&(y.resizeObserver=new ResizeObserver(re),y.resizeObserver.observe(y.container));var ee=function(G,Vn){for(;G!=null;)Vn(G),G=G.parentNode},Ut=function(){y.invalidateContainerClientCoordsCache()};ee(y.container,function(Kn){y.registerBinding(Kn,"transitionend",Ut),y.registerBinding(Kn,"animationend",Ut),y.registerBinding(Kn,"scroll",Ut)}),y.registerBinding(y.container,"contextmenu",function(Kn){Kn.preventDefault()});var de=function(){return y.selection[4]!==0},Yt=function(G){for(var Vn=y.findContainerClientCoords(),gr=Vn[0],nr=Vn[1],Be=Vn[2],Ls=Vn[3],hr=G.touches?G.touches:[G],us=!1,Ya=0;Ya<hr.length;Ya++){var kc=hr[Ya];if(gr<=kc.clientX&&kc.clientX<=gr+Be&&nr<=kc.clientY&&kc.clientY<=nr+Ls){us=!0;break}}if(!us)return!1;for(var Ca=y.container,oc=G.target,ra=oc.parentNode,no=!1;ra;){if(ra===Ca){no=!0;break}ra=ra.parentNode}return!!no};y.registerBinding(y.container,"mousedown",function(G){if(Yt(G)){G.preventDefault(),Nt(),y.hoverData.capture=!0,y.hoverData.which=G.which;var Vn=y.cy,gr=[G.clientX,G.clientY],nr=y.projectIntoViewport(gr[0],gr[1]),Be=y.selection,Ls=y.findNearestElements(nr[0],nr[1],!0,!1),hr=Ls[0],us=y.dragData.possibleDragElements;y.hoverData.mdownPos=nr,y.hoverData.mdownGPos=gr;var Ya=function(){y.hoverData.tapholdCancelled=!1,clearTimeout(y.hoverData.tapholdTimeout),y.hoverData.tapholdTimeout=setTimeout(function(){if(!y.hoverData.tapholdCancelled){var ql=y.hoverData.down;ql?ql.emit({originalEvent:G,type:"taphold",position:{x:nr[0],y:nr[1]}}):Vn.emit({originalEvent:G,type:"taphold",position:{x:nr[0],y:nr[1]}})}},y.tapholdDuration)};if(G.which==3){y.hoverData.cxtStarted=!0;var kc={originalEvent:G,type:"cxttapstart",position:{x:nr[0],y:nr[1]}};hr?(hr.activate(),hr.emit(kc),y.hoverData.down=hr):Vn.emit(kc),y.hoverData.downTime=new Date().getTime(),y.hoverData.cxtDragged=!1}else if(G.which==1){hr&&hr.activate();{if(hr!=null&&y.nodeIsGrabbable(hr)){var Ca=function(ql){return{originalEvent:G,type:ql,position:{x:nr[0],y:nr[1]}}},oc=function(ql){ql.emit(Ca("grab"))};if(W(hr),!hr.selected())us=y.dragData.possibleDragElements=Vn.collection(),_t(hr,{addToList:us}),hr.emit(Ca("grabon")).emit(Ca("grab"));else{us=y.dragData.possibleDragElements=Vn.collection();var ra=Vn.$(function(no){return no.isNode()&&no.selected()&&y.nodeIsGrabbable(no)});pt(ra,{addToList:us}),hr.emit(Ca("grabon")),ra.forEach(oc)}y.redrawHint("eles",!0),y.redrawHint("drag",!0)}y.hoverData.down=hr,y.hoverData.downs=Ls,y.hoverData.downTime=new Date().getTime()}C(hr,["mousedown","tapstart","vmousedown"],G,{x:nr[0],y:nr[1]}),hr==null?(Be[4]=1,y.data.bgActivePosistion={x:nr[0],y:nr[1]},y.redrawHint("select",!0),y.redraw()):hr.pannable()&&(Be[4]=1),Ya()}Be[0]=Be[2]=nr[0],Be[1]=Be[3]=nr[1]}},!1),y.registerBinding(p,"mousemove",function(G){var Vn=y.hoverData.capture;if(!(!Vn&&!Yt(G))){var gr=!1,nr=y.cy,Be=nr.zoom(),Ls=[G.clientX,G.clientY],hr=y.projectIntoViewport(Ls[0],Ls[1]),us=y.hoverData.mdownPos,Ya=y.hoverData.mdownGPos,kc=y.selection,Ca=null;!y.hoverData.draggingEles&&!y.hoverData.dragging&&!y.hoverData.selecting&&(Ca=y.findNearestElement(hr[0],hr[1],!0,!1));var oc=y.hoverData.last,ra=y.hoverData.down,no=[hr[0]-kc[2],hr[1]-kc[3]],ql=y.dragData.possibleDragElements,Sl;if(Ya){var mb=Ls[0]-Ya[0],vb=mb*mb,v1=Ls[1]-Ya[1],up=v1*v1,Bd=vb+up;y.hoverData.isOverThresholdDrag=Sl=Bd>=y.desktopTapThreshold2}var cm=L(G);Sl&&(y.hoverData.tapholdCancelled=!0);var py=function(){var $2=y.hoverData.dragDelta=y.hoverData.dragDelta||[];$2.length===0?($2.push(no[0]),$2.push(no[1])):($2[0]+=no[0],$2[1]+=no[1])};gr=!0,C(Ca,["mousemove","vmousemove","tapdrag"],G,{x:hr[0],y:hr[1]});var y6=function(){y.data.bgActivePosistion=void 0,y.hoverData.selecting||nr.emit({originalEvent:G,type:"boxstart",position:{x:hr[0],y:hr[1]}}),kc[4]=1,y.hoverData.selecting=!0,y.redrawHint("select",!0),y.redraw()};if(y.hoverData.which===3){if(Sl){var _4={originalEvent:G,type:"cxtdrag",position:{x:hr[0],y:hr[1]}};ra?ra.emit(_4):nr.emit(_4),y.hoverData.cxtDragged=!0,(!y.hoverData.cxtOver||Ca!==y.hoverData.cxtOver)&&(y.hoverData.cxtOver&&y.hoverData.cxtOver.emit({originalEvent:G,type:"cxtdragout",position:{x:hr[0],y:hr[1]}}),y.hoverData.cxtOver=Ca,Ca&&Ca.emit({originalEvent:G,type:"cxtdragover",position:{x:hr[0],y:hr[1]}}))}}else if(y.hoverData.dragging){if(gr=!0,nr.panningEnabled()&&nr.userPanningEnabled()){var x6;if(y.hoverData.justStartedPan){var BC=y.hoverData.mdownPos;x6={x:(hr[0]-BC[0])*Be,y:(hr[1]-BC[1])*Be},y.hoverData.justStartedPan=!1}else x6={x:no[0]*Be,y:no[1]*Be};nr.panBy(x6),nr.emit("dragpan"),y.hoverData.dragged=!0}hr=y.projectIntoViewport(G.clientX,G.clientY)}else if(kc[4]==1&&(ra==null||ra.pannable())){if(Sl){if(!y.hoverData.dragging&&nr.boxSelectionEnabled()&&(cm||!nr.panningEnabled()||!nr.userPanningEnabled()))y6();else if(!y.hoverData.selecting&&nr.panningEnabled()&&nr.userPanningEnabled()){var A4=O(ra,y.hoverData.downs);A4&&(y.hoverData.dragging=!0,y.hoverData.justStartedPan=!0,kc[4]=0,y.data.bgActivePosistion=Yx(us),y.redrawHint("select",!0),y.redraw())}ra&&ra.pannable()&&ra.active()&&ra.unactivate()}}else{if(ra&&ra.pannable()&&ra.active()&&ra.unactivate(),(!ra||!ra.grabbed())&&Ca!=oc&&(oc&&C(oc,["mouseout","tapdragout"],G,{x:hr[0],y:hr[1]}),Ca&&C(Ca,["mouseover","tapdragover"],G,{x:hr[0],y:hr[1]}),y.hoverData.last=Ca),ra)if(Sl){if(nr.boxSelectionEnabled()&&cm)ra&&ra.grabbed()&&(St(ql),ra.emit("freeon"),ql.emit("free"),y.dragData.didDrag&&(ra.emit("dragfreeon"),ql.emit("dragfree"))),y6();else if(ra&&ra.grabbed()&&y.nodeIsDraggable(ra)){var k0=!y.dragData.didDrag;k0&&y.redrawHint("eles",!0),y.dragData.didDrag=!0,y.hoverData.draggingEles||pt(ql,{inDragLayer:!0});var J1={x:0,y:0};if(Q(no[0])&&Q(no[1])&&(J1.x+=no[0],J1.y+=no[1],k0)){var E0=y.hoverData.dragDelta;E0&&Q(E0[0])&&Q(E0[1])&&(J1.x+=E0[0],J1.y+=E0[1])}y.hoverData.draggingEles=!0,ql.silentShift(J1).emit("position drag"),y.redrawHint("drag",!0),y.redraw()}}else py();gr=!0}if(kc[2]=hr[0],kc[3]=hr[1],gr)return G.stopPropagation&&G.stopPropagation(),G.preventDefault&&G.preventDefault(),!1}},!1);var Ee,Te,ie;y.registerBinding(p,"mouseup",function(G){var Vn=y.hoverData.capture;if(Vn){y.hoverData.capture=!1;var gr=y.cy,nr=y.projectIntoViewport(G.clientX,G.clientY),Be=y.selection,Ls=y.findNearestElement(nr[0],nr[1],!0,!1),hr=y.dragData.possibleDragElements,us=y.hoverData.down,Ya=L(G);if(y.data.bgActivePosistion&&(y.redrawHint("select",!0),y.redraw()),y.hoverData.tapholdCancelled=!0,y.data.bgActivePosistion=void 0,us&&us.unactivate(),y.hoverData.which===3){var kc={originalEvent:G,type:"cxttapend",position:{x:nr[0],y:nr[1]}};if(us?us.emit(kc):gr.emit(kc),!y.hoverData.cxtDragged){var Ca={originalEvent:G,type:"cxttap",position:{x:nr[0],y:nr[1]}};us?us.emit(Ca):gr.emit(Ca)}y.hoverData.cxtDragged=!1,y.hoverData.which=null}else if(y.hoverData.which===1){if(C(Ls,["mouseup","tapend","vmouseup"],G,{x:nr[0],y:nr[1]}),!y.dragData.didDrag&&!y.hoverData.dragged&&!y.hoverData.selecting&&!y.hoverData.isOverThresholdDrag&&(C(us,["click","tap","vclick"],G,{x:nr[0],y:nr[1]}),Te=!1,G.timeStamp-ie<=gr.multiClickDebounceTime()?(Ee&&clearTimeout(Ee),Te=!0,ie=null,C(us,["dblclick","dbltap","vdblclick"],G,{x:nr[0],y:nr[1]})):(Ee=setTimeout(function(){Te||C(us,["oneclick","onetap","voneclick"],G,{x:nr[0],y:nr[1]})},gr.multiClickDebounceTime()),ie=G.timeStamp)),us==null&&!y.dragData.didDrag&&!y.hoverData.selecting&&!y.hoverData.dragged&&!L(G)&&(gr.$(x).unselect(["tapunselect"]),hr.length>0&&y.redrawHint("eles",!0),y.dragData.possibleDragElements=hr=gr.collection()),Ls==us&&!y.dragData.didDrag&&!y.hoverData.selecting&&Ls!=null&&Ls._private.selectable&&(y.hoverData.dragging||(gr.selectionType()==="additive"||Ya?Ls.selected()?Ls.unselect(["tapunselect"]):Ls.select(["tapselect"]):Ya||(gr.$(x).unmerge(Ls).unselect(["tapunselect"]),Ls.select(["tapselect"]))),y.redrawHint("eles",!0)),y.hoverData.selecting){var oc=gr.collection(y.getAllInBox(Be[0],Be[1],Be[2],Be[3]));y.redrawHint("select",!0),oc.length>0&&y.redrawHint("eles",!0),gr.emit({type:"boxend",originalEvent:G,position:{x:nr[0],y:nr[1]}});var ra=function(Sl){return Sl.selectable()&&!Sl.selected()};gr.selectionType()==="additive"||Ya||gr.$(x).unmerge(oc).unselect(),oc.emit("box").stdFilter(ra).select().emit("boxselect"),y.redraw()}if(y.hoverData.dragging&&(y.hoverData.dragging=!1,y.redrawHint("select",!0),y.redrawHint("eles",!0),y.redraw()),!Be[4]){y.redrawHint("drag",!0),y.redrawHint("eles",!0);var no=us&&us.grabbed();St(hr),no&&(us.emit("freeon"),hr.emit("free"),y.dragData.didDrag&&(us.emit("dragfreeon"),hr.emit("dragfree")))}}Be[4]=0,y.hoverData.down=null,y.hoverData.cxtStarted=!1,y.hoverData.draggingEles=!1,y.hoverData.selecting=!1,y.hoverData.isOverThresholdDrag=!1,y.dragData.didDrag=!1,y.hoverData.dragged=!1,y.hoverData.dragDelta=[],y.hoverData.mdownPos=null,y.hoverData.mdownGPos=null}},!1);var ze=function(G){if(!y.scrollingPage){var Vn=y.cy,gr=Vn.zoom(),nr=Vn.pan(),Be=y.projectIntoViewport(G.clientX,G.clientY),Ls=[Be[0]*gr+nr.x,Be[1]*gr+nr.y];if(y.hoverData.draggingEles||y.hoverData.dragging||y.hoverData.cxtStarted||de()){G.preventDefault();return}if(Vn.panningEnabled()&&Vn.userPanningEnabled()&&Vn.zoomingEnabled()&&Vn.userZoomingEnabled()){G.preventDefault(),y.data.wheelZooming=!0,clearTimeout(y.data.wheelTimeout),y.data.wheelTimeout=setTimeout(function(){y.data.wheelZooming=!1,y.redrawHint("eles",!0),y.redraw()},150);var hr;G.deltaY!=null?hr=G.deltaY/-250:G.wheelDeltaY!=null?hr=G.wheelDeltaY/1e3:hr=G.wheelDelta/1e3,hr=hr*y.wheelSensitivity;var us=G.deltaMode===1;us&&(hr*=33);var Ya=Vn.zoom()*Math.pow(10,hr);G.type==="gesturechange"&&(Ya=y.gestureStartZoom*G.scale),Vn.zoom({level:Ya,renderedPosition:{x:Ls[0],y:Ls[1]}}),Vn.emit(G.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};y.registerBinding(y.container,"wheel",ze,!0),y.registerBinding(p,"scroll",function(G){y.scrollingPage=!0,clearTimeout(y.scrollingPageTimeout),y.scrollingPageTimeout=setTimeout(function(){y.scrollingPage=!1},250)},!0),y.registerBinding(y.container,"gesturestart",function(G){y.gestureStartZoom=y.cy.zoom(),y.hasTouchStarted||G.preventDefault()},!0),y.registerBinding(y.container,"gesturechange",function(Kn){y.hasTouchStarted||ze(Kn)},!0),y.registerBinding(y.container,"mouseout",function(G){var Vn=y.projectIntoViewport(G.clientX,G.clientY);y.cy.emit({originalEvent:G,type:"mouseout",position:{x:Vn[0],y:Vn[1]}})},!1),y.registerBinding(y.container,"mouseover",function(G){var Vn=y.projectIntoViewport(G.clientX,G.clientY);y.cy.emit({originalEvent:G,type:"mouseover",position:{x:Vn[0],y:Vn[1]}})},!1);var me,yn,nn,qe,Tn,Xn,lr,Sn,or,pr,kr,wr,Cr,$n=function(G,Vn,gr,nr){return Math.sqrt((gr-G)*(gr-G)+(nr-Vn)*(nr-Vn))},cr=function(G,Vn,gr,nr){return(gr-G)*(gr-G)+(nr-Vn)*(nr-Vn)},mr;y.registerBinding(y.container,"touchstart",mr=function(G){if(y.hasTouchStarted=!0,!!Yt(G)){Nt(),y.touchData.capture=!0,y.data.bgActivePosistion=void 0;var Vn=y.cy,gr=y.touchData.now,nr=y.touchData.earlier;if(G.touches[0]){var Be=y.projectIntoViewport(G.touches[0].clientX,G.touches[0].clientY);gr[0]=Be[0],gr[1]=Be[1]}if(G.touches[1]){var Be=y.projectIntoViewport(G.touches[1].clientX,G.touches[1].clientY);gr[2]=Be[0],gr[3]=Be[1]}if(G.touches[2]){var Be=y.projectIntoViewport(G.touches[2].clientX,G.touches[2].clientY);gr[4]=Be[0],gr[5]=Be[1]}if(G.touches[1]){y.touchData.singleTouchMoved=!0,St(y.dragData.touchDragEles);var Ls=y.findContainerClientCoords();or=Ls[0],pr=Ls[1],kr=Ls[2],wr=Ls[3],me=G.touches[0].clientX-or,yn=G.touches[0].clientY-pr,nn=G.touches[1].clientX-or,qe=G.touches[1].clientY-pr,Cr=0<=me&&me<=kr&&0<=nn&&nn<=kr&&0<=yn&&yn<=wr&&0<=qe&&qe<=wr;var hr=Vn.pan(),us=Vn.zoom();Tn=$n(me,yn,nn,qe),Xn=cr(me,yn,nn,qe),lr=[(me+nn)/2,(yn+qe)/2],Sn=[(lr[0]-hr.x)/us,(lr[1]-hr.y)/us];var Ya=200,kc=Ya*Ya;if(Xn<kc&&!G.touches[2]){var Ca=y.findNearestElement(gr[0],gr[1],!0,!0),oc=y.findNearestElement(gr[2],gr[3],!0,!0);Ca&&Ca.isNode()?(Ca.activate().emit({originalEvent:G,type:"cxttapstart",position:{x:gr[0],y:gr[1]}}),y.touchData.start=Ca):oc&&oc.isNode()?(oc.activate().emit({originalEvent:G,type:"cxttapstart",position:{x:gr[0],y:gr[1]}}),y.touchData.start=oc):Vn.emit({originalEvent:G,type:"cxttapstart",position:{x:gr[0],y:gr[1]}}),y.touchData.start&&(y.touchData.start._private.grabbed=!1),y.touchData.cxt=!0,y.touchData.cxtDragged=!1,y.data.bgActivePosistion=void 0,y.redraw();return}}if(G.touches[2])Vn.boxSelectionEnabled()&&G.preventDefault();else if(!G.touches[1]){if(G.touches[0]){var ra=y.findNearestElements(gr[0],gr[1],!0,!0),no=ra[0];if(no!=null&&(no.activate(),y.touchData.start=no,y.touchData.starts=ra,y.nodeIsGrabbable(no))){var ql=y.dragData.touchDragEles=Vn.collection(),Sl=null;y.redrawHint("eles",!0),y.redrawHint("drag",!0),no.selected()?(Sl=Vn.$(function(Bd){return Bd.selected()&&y.nodeIsGrabbable(Bd)}),pt(Sl,{addToList:ql})):_t(no,{addToList:ql}),W(no);var mb=function(cm){return{originalEvent:G,type:cm,position:{x:gr[0],y:gr[1]}}};no.emit(mb("grabon")),Sl?Sl.forEach(function(Bd){Bd.emit(mb("grab"))}):no.emit(mb("grab"))}C(no,["touchstart","tapstart","vmousedown"],G,{x:gr[0],y:gr[1]}),no==null&&(y.data.bgActivePosistion={x:Be[0],y:Be[1]},y.redrawHint("select",!0),y.redraw()),y.touchData.singleTouchMoved=!1,y.touchData.singleTouchStartTime=+new Date,clearTimeout(y.touchData.tapholdTimeout),y.touchData.tapholdTimeout=setTimeout(function(){y.touchData.singleTouchMoved===!1&&!y.pinching&&!y.touchData.selecting&&C(y.touchData.start,["taphold"],G,{x:gr[0],y:gr[1]})},y.tapholdDuration)}}if(G.touches.length>=1){for(var vb=y.touchData.startPosition=[null,null,null,null,null,null],v1=0;v1<gr.length;v1++)vb[v1]=nr[v1]=gr[v1];var up=G.touches[0];y.touchData.startGPosition=[up.clientX,up.clientY]}}},!1);var Sr;y.registerBinding(window,"touchmove",Sr=function(G){var Vn=y.touchData.capture;if(!(!Vn&&!Yt(G))){var gr=y.selection,nr=y.cy,Be=y.touchData.now,Ls=y.touchData.earlier,hr=nr.zoom();if(G.touches[0]){var us=y.projectIntoViewport(G.touches[0].clientX,G.touches[0].clientY);Be[0]=us[0],Be[1]=us[1]}if(G.touches[1]){var us=y.projectIntoViewport(G.touches[1].clientX,G.touches[1].clientY);Be[2]=us[0],Be[3]=us[1]}if(G.touches[2]){var us=y.projectIntoViewport(G.touches[2].clientX,G.touches[2].clientY);Be[4]=us[0],Be[5]=us[1]}var Ya=y.touchData.startGPosition,kc;if(Vn&&G.touches[0]&&Ya){for(var Ca=[],oc=0;oc<Be.length;oc++)Ca[oc]=Be[oc]-Ls[oc];var ra=G.touches[0].clientX-Ya[0],no=ra*ra,ql=G.touches[0].clientY-Ya[1],Sl=ql*ql,mb=no+Sl;kc=mb>=y.touchTapThreshold2}if(Vn&&y.touchData.cxt){G.preventDefault();var vb=G.touches[0].clientX-or,v1=G.touches[0].clientY-pr,up=G.touches[1].clientX-or,Bd=G.touches[1].clientY-pr,cm=cr(vb,v1,up,Bd),py=cm/Xn,y6=150,_4=y6*y6,x6=1.5,BC=x6*x6;if(py>=BC||cm>=_4){y.touchData.cxt=!1,y.data.bgActivePosistion=void 0,y.redrawHint("select",!0);var A4={originalEvent:G,type:"cxttapend",position:{x:Be[0],y:Be[1]}};y.touchData.start?(y.touchData.start.unactivate().emit(A4),y.touchData.start=null):nr.emit(A4)}}if(Vn&&y.touchData.cxt){var A4={originalEvent:G,type:"cxtdrag",position:{x:Be[0],y:Be[1]}};y.data.bgActivePosistion=void 0,y.redrawHint("select",!0),y.touchData.start?y.touchData.start.emit(A4):nr.emit(A4),y.touchData.start&&(y.touchData.start._private.grabbed=!1),y.touchData.cxtDragged=!0;var k0=y.findNearestElement(Be[0],Be[1],!0,!0);(!y.touchData.cxtOver||k0!==y.touchData.cxtOver)&&(y.touchData.cxtOver&&y.touchData.cxtOver.emit({originalEvent:G,type:"cxtdragout",position:{x:Be[0],y:Be[1]}}),y.touchData.cxtOver=k0,k0&&k0.emit({originalEvent:G,type:"cxtdragover",position:{x:Be[0],y:Be[1]}}))}else if(Vn&&G.touches[2]&&nr.boxSelectionEnabled())G.preventDefault(),y.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,y.touchData.selecting||nr.emit({originalEvent:G,type:"boxstart",position:{x:Be[0],y:Be[1]}}),y.touchData.selecting=!0,y.touchData.didSelect=!0,gr[4]=1,!gr||gr.length===0||gr[0]===void 0?(gr[0]=(Be[0]+Be[2]+Be[4])/3,gr[1]=(Be[1]+Be[3]+Be[5])/3,gr[2]=(Be[0]+Be[2]+Be[4])/3+1,gr[3]=(Be[1]+Be[3]+Be[5])/3+1):(gr[2]=(Be[0]+Be[2]+Be[4])/3,gr[3]=(Be[1]+Be[3]+Be[5])/3),y.redrawHint("select",!0),y.redraw();else if(Vn&&G.touches[1]&&!y.touchData.didSelect&&nr.zoomingEnabled()&&nr.panningEnabled()&&nr.userZoomingEnabled()&&nr.userPanningEnabled()){G.preventDefault(),y.data.bgActivePosistion=void 0,y.redrawHint("select",!0);var J1=y.dragData.touchDragEles;if(J1){y.redrawHint("drag",!0);for(var E0=0;E0<J1.length;E0++){var by=J1[E0]._private;by.grabbed=!1,by.rscratch.inDragLayer=!1}}var $2=y.touchData.start,vb=G.touches[0].clientX-or,v1=G.touches[0].clientY-pr,up=G.touches[1].clientX-or,Bd=G.touches[1].clientY-pr,Zj=$n(vb,v1,up,Bd),Mnt=Zj/Tn;if(Cr){var Int=vb-me,RC=v1-yn,Ont=up-nn,Nnt=Bd-qe,L4=(Int+Ont)/2,t$=(RC+Nnt)/2,lE=nr.zoom(),SM=lE*Mnt,jC=nr.pan(),e$=Sn[0]*lE+jC.x,n$=Sn[1]*lE+jC.y,Pnt={x:-SM/lE*(e$-jC.x-L4)+e$,y:-SM/lE*(n$-jC.y-t$)+n$};if($2&&$2.active()){var J1=y.dragData.touchDragEles;St(J1),y.redrawHint("drag",!0),y.redrawHint("eles",!0),$2.unactivate().emit("freeon"),J1.emit("free"),y.dragData.didDrag&&($2.emit("dragfreeon"),J1.emit("dragfree"))}nr.viewport({zoom:SM,pan:Pnt,cancelOnFailedZoom:!0}),nr.emit("pinchzoom"),Tn=Zj,me=vb,yn=v1,nn=up,qe=Bd,y.pinching=!0}if(G.touches[0]){var us=y.projectIntoViewport(G.touches[0].clientX,G.touches[0].clientY);Be[0]=us[0],Be[1]=us[1]}if(G.touches[1]){var us=y.projectIntoViewport(G.touches[1].clientX,G.touches[1].clientY);Be[2]=us[0],Be[3]=us[1]}if(G.touches[2]){var us=y.projectIntoViewport(G.touches[2].clientX,G.touches[2].clientY);Be[4]=us[0],Be[5]=us[1]}}else if(G.touches[0]&&!y.touchData.didSelect){var lp=y.touchData.start,$C=y.touchData.last,k0;if(!y.hoverData.draggingEles&&!y.swipePanning&&(k0=y.findNearestElement(Be[0],Be[1],!0,!0)),Vn&&lp!=null&&G.preventDefault(),Vn&&lp!=null&&y.nodeIsDraggable(lp))if(kc){var J1=y.dragData.touchDragEles,_M=!y.dragData.didDrag;_M&&pt(J1,{inDragLayer:!0}),y.dragData.didDrag=!0;var z2={x:0,y:0};if(Q(Ca[0])&&Q(Ca[1])&&(z2.x+=Ca[0],z2.y+=Ca[1],_M)){y.redrawHint("eles",!0);var T0=y.touchData.dragDelta;T0&&Q(T0[0])&&Q(T0[1])&&(z2.x+=T0[0],z2.y+=T0[1])}y.hoverData.draggingEles=!0,J1.silentShift(z2).emit("position drag"),y.redrawHint("drag",!0),y.touchData.startPosition[0]==Ls[0]&&y.touchData.startPosition[1]==Ls[1]&&y.redrawHint("eles",!0),y.redraw()}else{var T0=y.touchData.dragDelta=y.touchData.dragDelta||[];T0.length===0?(T0.push(Ca[0]),T0.push(Ca[1])):(T0[0]+=Ca[0],T0[1]+=Ca[1])}if(C(lp||k0,["touchmove","tapdrag","vmousemove"],G,{x:Be[0],y:Be[1]}),(!lp||!lp.grabbed())&&k0!=$C&&($C&&$C.emit({originalEvent:G,type:"tapdragout",position:{x:Be[0],y:Be[1]}}),k0&&k0.emit({originalEvent:G,type:"tapdragover",position:{x:Be[0],y:Be[1]}})),y.touchData.last=k0,Vn)for(var E0=0;E0<Be.length;E0++)Be[E0]&&y.touchData.startPosition[E0]&&kc&&(y.touchData.singleTouchMoved=!0);if(Vn&&(lp==null||lp.pannable())&&nr.panningEnabled()&&nr.userPanningEnabled()){var D4=O(lp,y.touchData.starts);D4&&(G.preventDefault(),y.data.bgActivePosistion||(y.data.bgActivePosistion=Yx(y.touchData.startPosition)),y.swipePanning?(nr.panBy({x:Ca[0]*hr,y:Ca[1]*hr}),nr.emit("dragpan")):kc&&(y.swipePanning=!0,nr.panBy({x:ra*hr,y:ql*hr}),nr.emit("dragpan"),lp&&(lp.unactivate(),y.redrawHint("select",!0),y.touchData.start=null)));var us=y.projectIntoViewport(G.touches[0].clientX,G.touches[0].clientY);Be[0]=us[0],Be[1]=us[1]}}for(var oc=0;oc<Be.length;oc++)Ls[oc]=Be[oc];Vn&&G.touches.length>0&&!y.hoverData.draggingEles&&!y.swipePanning&&y.data.bgActivePosistion!=null&&(y.data.bgActivePosistion=void 0,y.redrawHint("select",!0),y.redraw())}},!1);var gi;y.registerBinding(p,"touchcancel",gi=function(G){var Vn=y.touchData.start;y.touchData.capture=!1,Vn&&Vn.unactivate()});var ss,na,vi,si;if(y.registerBinding(p,"touchend",ss=function(G){var Vn=y.touchData.start,gr=y.touchData.capture;if(gr)G.touches.length===0&&(y.touchData.capture=!1),G.preventDefault();else return;var nr=y.selection;y.swipePanning=!1,y.hoverData.draggingEles=!1;var Be=y.cy,Ls=Be.zoom(),hr=y.touchData.now,us=y.touchData.earlier;if(G.touches[0]){var Ya=y.projectIntoViewport(G.touches[0].clientX,G.touches[0].clientY);hr[0]=Ya[0],hr[1]=Ya[1]}if(G.touches[1]){var Ya=y.projectIntoViewport(G.touches[1].clientX,G.touches[1].clientY);hr[2]=Ya[0],hr[3]=Ya[1]}if(G.touches[2]){var Ya=y.projectIntoViewport(G.touches[2].clientX,G.touches[2].clientY);hr[4]=Ya[0],hr[5]=Ya[1]}Vn&&Vn.unactivate();var kc;if(y.touchData.cxt){if(kc={originalEvent:G,type:"cxttapend",position:{x:hr[0],y:hr[1]}},Vn?Vn.emit(kc):Be.emit(kc),!y.touchData.cxtDragged){var Ca={originalEvent:G,type:"cxttap",position:{x:hr[0],y:hr[1]}};Vn?Vn.emit(Ca):Be.emit(Ca)}y.touchData.start&&(y.touchData.start._private.grabbed=!1),y.touchData.cxt=!1,y.touchData.start=null,y.redraw();return}if(!G.touches[2]&&Be.boxSelectionEnabled()&&y.touchData.selecting){y.touchData.selecting=!1;var oc=Be.collection(y.getAllInBox(nr[0],nr[1],nr[2],nr[3]));nr[0]=void 0,nr[1]=void 0,nr[2]=void 0,nr[3]=void 0,nr[4]=0,y.redrawHint("select",!0),Be.emit({type:"boxend",originalEvent:G,position:{x:hr[0],y:hr[1]}});var ra=function(_4){return _4.selectable()&&!_4.selected()};oc.emit("box").stdFilter(ra).select().emit("boxselect"),oc.nonempty()&&y.redrawHint("eles",!0),y.redraw()}if(Vn!=null&&Vn.unactivate(),G.touches[2])y.data.bgActivePosistion=void 0,y.redrawHint("select",!0);else if(!G.touches[1]){if(!G.touches[0]){if(!G.touches[0]){y.data.bgActivePosistion=void 0,y.redrawHint("select",!0);var no=y.dragData.touchDragEles;if(Vn!=null){var ql=Vn._private.grabbed;St(no),y.redrawHint("drag",!0),y.redrawHint("eles",!0),ql&&(Vn.emit("freeon"),no.emit("free"),y.dragData.didDrag&&(Vn.emit("dragfreeon"),no.emit("dragfree"))),C(Vn,["touchend","tapend","vmouseup","tapdragout"],G,{x:hr[0],y:hr[1]}),Vn.unactivate(),y.touchData.start=null}else{var Sl=y.findNearestElement(hr[0],hr[1],!0,!0);C(Sl,["touchend","tapend","vmouseup","tapdragout"],G,{x:hr[0],y:hr[1]})}var mb=y.touchData.startPosition[0]-hr[0],vb=mb*mb,v1=y.touchData.startPosition[1]-hr[1],up=v1*v1,Bd=vb+up,cm=Bd*Ls*Ls;y.touchData.singleTouchMoved||(Vn||Be.$(":selected").unselect(["tapunselect"]),C(Vn,["tap","vclick"],G,{x:hr[0],y:hr[1]}),na=!1,G.timeStamp-si<=Be.multiClickDebounceTime()?(vi&&clearTimeout(vi),na=!0,si=null,C(Vn,["dbltap","vdblclick"],G,{x:hr[0],y:hr[1]})):(vi=setTimeout(function(){na||C(Vn,["onetap","voneclick"],G,{x:hr[0],y:hr[1]})},Be.multiClickDebounceTime()),si=G.timeStamp)),Vn!=null&&!y.dragData.didDrag&&Vn._private.selectable&&cm<y.touchTapThreshold2&&!y.pinching&&(Be.selectionType()==="single"?(Be.$(x).unmerge(Vn).unselect(["tapunselect"]),Vn.select(["tapselect"])):Vn.selected()?Vn.unselect(["tapunselect"]):Vn.select(["tapselect"]),y.redrawHint("eles",!0)),y.touchData.singleTouchMoved=!0}}}for(var py=0;py<hr.length;py++)us[py]=hr[py];y.dragData.didDrag=!1,G.touches.length===0&&(y.touchData.dragDelta=[],y.touchData.startPosition=[null,null,null,null,null,null],y.touchData.startGPosition=null,y.touchData.didSelect=!1),G.touches.length<2&&(G.touches.length===1&&(y.touchData.startGPosition=[G.touches[0].clientX,G.touches[0].clientY]),y.pinching=!1,y.redrawHint("eles",!0),y.redraw())},!1),typeof TouchEvent>"u"){var Qi=[],ks=function(G){return{clientX:G.clientX,clientY:G.clientY,force:1,identifier:G.pointerId,pageX:G.pageX,pageY:G.pageY,radiusX:G.width/2,radiusY:G.height/2,screenX:G.screenX,screenY:G.screenY,target:G.target}},as=function(G){return{event:G,touch:ks(G)}},Es=function(G){Qi.push(as(G))},eo=function(G){for(var Vn=0;Vn<Qi.length;Vn++){var gr=Qi[Vn];if(gr.event.pointerId===G.pointerId){Qi.splice(Vn,1);return}}},Ta=function(G){var Vn=Qi.filter(function(gr){return gr.event.pointerId===G.pointerId})[0];Vn.event=G,Vn.touch=ks(G)},pa=function(G){G.touches=Qi.map(function(Vn){return Vn.touch})},mo=function(G){return G.pointerType==="mouse"||G.pointerType===4};y.registerBinding(y.container,"pointerdown",function(Kn){mo(Kn)||(Kn.preventDefault(),Es(Kn),pa(Kn),mr(Kn))}),y.registerBinding(y.container,"pointerup",function(Kn){mo(Kn)||(eo(Kn),pa(Kn),ss(Kn))}),y.registerBinding(y.container,"pointercancel",function(Kn){mo(Kn)||(eo(Kn),pa(Kn),gi(Kn))}),y.registerBinding(y.container,"pointermove",function(Kn){mo(Kn)||(Kn.preventDefault(),Ta(Kn),pa(Kn),Sr(Kn))})}};var om={};om.generatePolygon=function(y,p){return this.nodeShapes[y]={renderer:this,name:y,points:p,draw:function(C,L,O,N,j){this.renderer.nodeShapeImpl("polygon",C,L,O,N,j,this.points)},intersectLine:function(C,L,O,N,j,H,q){return B8(j,H,this.points,C,L,O/2,N/2,q)},checkPoint:function(C,L,O,N,j,H,q){return sm(C,L,this.points,H,q,N,j,[0,-1],O)}}},om.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(p,x,C,L,O){this.renderer.nodeShapeImpl(this.name,p,x,C,L,O)},intersectLine:function(p,x,C,L,O,N,j){return CQ(O,N,p,x,C/2+j,L/2+j)},checkPoint:function(p,x,C,L,O,N,j){return v4(p,x,L,O,N,j,C)}}},om.generateRoundPolygon=function(y,p){for(var x=new Array(p.length*2),C=0;C<p.length/2;C++){var L=C*2,O=void 0;C<p.length/2-1?O=(C+1)*2:O=0,x[C*4]=p[L],x[C*4+1]=p[L+1];var N=p[O]-p[L],j=p[O+1]-p[L+1],H=Math.sqrt(N*N+j*j);x[C*4+2]=N/H,x[C*4+3]=j/H}return this.nodeShapes[y]={renderer:this,name:y,points:x,draw:function(W,Z,st,bt,pt){this.renderer.nodeShapeImpl("round-polygon",W,Z,st,bt,pt,this.points)},intersectLine:function(W,Z,st,bt,pt,_t,St){return SQ(pt,_t,this.points,W,Z,st,bt)},checkPoint:function(W,Z,st,bt,pt,_t,St){return TQ(W,Z,this.points,_t,St,bt,pt)}}},om.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Fd(4,0),draw:function(p,x,C,L,O){this.renderer.nodeShapeImpl(this.name,p,x,C,L,O)},intersectLine:function(p,x,C,L,O,N,j){return $B(O,N,p,x,C,L,j)},checkPoint:function(p,x,C,L,O,N,j){var H=R8(L,O),q=H*2;return!!(sm(p,x,this.points,N,j,L,O-q,[0,-1],C)||sm(p,x,this.points,N,j,L-q,O,[0,-1],C)||v4(p,x,q,q,N-L/2+H,j-O/2+H,C)||v4(p,x,q,q,N+L/2-H,j-O/2+H,C)||v4(p,x,q,q,N+L/2-H,j+O/2-H,C)||v4(p,x,q,q,N-L/2+H,j+O/2-H,C))}}},om.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:qB(),points:Fd(4,0),draw:function(p,x,C,L,O){this.renderer.nodeShapeImpl(this.name,p,x,C,L,O)},generateCutTrianglePts:function(p,x,C,L){var O=this.cornerLength,N=x/2,j=p/2,H=C-j,q=C+j,W=L-N,Z=L+N;return{topLeft:[H,W+O,H+O,W,H+O,W+O],topRight:[q-O,W,q,W+O,q-O,W+O],bottomRight:[q,Z-O,q-O,Z,q-O,Z-O],bottomLeft:[H+O,Z,H,Z-O,H+O,Z-O]}},intersectLine:function(p,x,C,L,O,N,j){var H=this.generateCutTrianglePts(C+2*j,L+2*j,p,x),q=[].concat.apply([],[H.topLeft.splice(0,4),H.topRight.splice(0,4),H.bottomRight.splice(0,4),H.bottomLeft.splice(0,4)]);return B8(O,N,q,p,x)},checkPoint:function(p,x,C,L,O,N,j){if(sm(p,x,this.points,N,j,L,O-2*this.cornerLength,[0,-1],C)||sm(p,x,this.points,N,j,L-2*this.cornerLength,O,[0,-1],C))return!0;var H=this.generateCutTrianglePts(L,O,N,j);return y0(p,x,H.topLeft)||y0(p,x,H.topRight)||y0(p,x,H.bottomRight)||y0(p,x,H.bottomLeft)}}},om.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Fd(4,0),draw:function(p,x,C,L,O){this.renderer.nodeShapeImpl(this.name,p,x,C,L,O)},intersectLine:function(p,x,C,L,O,N,j){var H=.15,q=.5,W=.85,Z=this.generateBarrelBezierPts(C+2*j,L+2*j,p,x),st=function(_t){var St=Xx({x:_t[0],y:_t[1]},{x:_t[2],y:_t[3]},{x:_t[4],y:_t[5]},H),Et=Xx({x:_t[0],y:_t[1]},{x:_t[2],y:_t[3]},{x:_t[4],y:_t[5]},q),Nt=Xx({x:_t[0],y:_t[1]},{x:_t[2],y:_t[3]},{x:_t[4],y:_t[5]},W);return[_t[0],_t[1],St.x,St.y,Et.x,Et.y,Nt.x,Nt.y,_t[4],_t[5]]},bt=[].concat(st(Z.topLeft),st(Z.topRight),st(Z.bottomRight),st(Z.bottomLeft));return B8(O,N,bt,p,x)},generateBarrelBezierPts:function(p,x,C,L){var O=x/2,N=p/2,j=C-N,H=C+N,q=L-O,W=L+O,Z=VD(p,x),st=Z.heightOffset,bt=Z.widthOffset,pt=Z.ctrlPtOffsetPct*p,_t={topLeft:[j,q+st,j+pt,q,j+bt,q],topRight:[H-bt,q,H-pt,q,H,q+st],bottomRight:[H,W-st,H-pt,W,H-bt,W],bottomLeft:[j+bt,W,j+pt,W,j,W-st]};return _t.topLeft.isTop=!0,_t.topRight.isTop=!0,_t.bottomLeft.isBottom=!0,_t.bottomRight.isBottom=!0,_t},checkPoint:function(p,x,C,L,O,N,j){var H=VD(L,O),q=H.heightOffset,W=H.widthOffset;if(sm(p,x,this.points,N,j,L,O-2*q,[0,-1],C)||sm(p,x,this.points,N,j,L-2*W,O,[0,-1],C))return!0;for(var Z=this.generateBarrelBezierPts(L,O,N,j),st=function(Ut,de,Yt){var Ee=Yt[4],Te=Yt[2],ie=Yt[0],ze=Yt[5],me=Yt[1],yn=Math.min(Ee,ie),nn=Math.max(Ee,ie),qe=Math.min(ze,me),Tn=Math.max(ze,me);if(yn<=Ut&&Ut<=nn&&qe<=de&&de<=Tn){var Xn=_Q(Ee,Te,ie),lr=yQ(Xn[0],Xn[1],Xn[2],Ut),Sn=lr.filter(function(or){return 0<=or&&or<=1});if(Sn.length>0)return Sn[0]}return null},bt=Object.keys(Z),pt=0;pt<bt.length;pt++){var _t=bt[pt],St=Z[_t],Et=st(p,x,St);if(Et!=null){var Nt=St[5],Pt=St[3],qt=St[1],re=Lf(Nt,Pt,qt,Et);if(St.isTop&&re<=x||St.isBottom&&x<=re)return!0}}return!1}}},om.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Fd(4,0),draw:function(p,x,C,L,O){this.renderer.nodeShapeImpl(this.name,p,x,C,L,O)},intersectLine:function(p,x,C,L,O,N,j){var H=p-(C/2+j),q=x-(L/2+j),W=q,Z=p+(C/2+j),st=uy(O,N,p,x,H,q,Z,W,!1);return st.length>0?st:$B(O,N,p,x,C,L,j)},checkPoint:function(p,x,C,L,O,N,j){var H=R8(L,O),q=2*H;if(sm(p,x,this.points,N,j,L,O-q,[0,-1],C)||sm(p,x,this.points,N,j,L-q,O,[0,-1],C))return!0;var W=L/2+2*C,Z=O/2+2*C,st=[N-W,j-Z,N-W,j,N+W,j,N+W,j-Z];return!!(y0(p,x,st)||v4(p,x,q,q,N+L/2-H,j+O/2-H,C)||v4(p,x,q,q,N-L/2+H,j+O/2-H,C))}}},om.registerNodeShapes=function(){var y=this.nodeShapes={},p=this;this.generateEllipse(),this.generatePolygon("triangle",Fd(3,0)),this.generateRoundPolygon("round-triangle",Fd(3,0)),this.generatePolygon("rectangle",Fd(4,0)),y.square=y.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var x=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",x),this.generateRoundPolygon("round-diamond",x)}this.generatePolygon("pentagon",Fd(5,0)),this.generateRoundPolygon("round-pentagon",Fd(5,0)),this.generatePolygon("hexagon",Fd(6,0)),this.generateRoundPolygon("round-hexagon",Fd(6,0)),this.generatePolygon("heptagon",Fd(7,0)),this.generateRoundPolygon("round-heptagon",Fd(7,0)),this.generatePolygon("octagon",Fd(8,0)),this.generateRoundPolygon("round-octagon",Fd(8,0));var C=new Array(20);{var L=qD(5,0),O=qD(5,Math.PI/5),N=.5*(3-Math.sqrt(5));N*=1.57;for(var j=0;j<O.length/2;j++)O[j*2]*=N,O[j*2+1]*=N;for(var j=0;j<20/4;j++)C[j*4]=L[j*2],C[j*4+1]=L[j*2+1],C[j*4+2]=O[j*2],C[j*4+3]=O[j*2+1]}C=zB(C),this.generatePolygon("star",C),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 H=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",H),this.generateRoundPolygon("round-tag",H)}y.makePolygon=function(q){var W=q.join("$"),Z="polygon-"+W,st;return(st=this[Z])?st:p.generatePolygon(Z,q)}};var nE={};nE.timeToRender=function(){return this.redrawTotalTime/this.redrawCount},nE.redraw=function(y){y=y||IB();var p=this;p.averageRedrawTime===void 0&&(p.averageRedrawTime=0),p.lastRedrawTime===void 0&&(p.lastRedrawTime=0),p.lastDrawTime===void 0&&(p.lastDrawTime=0),p.requestedFrame=!0,p.renderOptions=y},nE.beforeRender=function(y,p){if(!this.destroyed){p==null&&$l("Priority is not optional for beforeRender");var x=this.beforeRenderCallbacks;x.push({fn:y,priority:p}),x.sort(function(C,L){return L.priority-C.priority})}};var Lj=function(p,x,C){for(var L=p.beforeRenderCallbacks,O=0;O<L.length;O++)L[O].fn(x,C)};nE.startRenderLoop=function(){var y=this,p=y.cy;if(!y.renderLoopStarted){y.renderLoopStarted=!0;var x=function C(L){if(!y.destroyed){if(!p.batching())if(y.requestedFrame&&!y.skipFrame){Lj(y,!0,L);var O=ip();y.render(y.renderOptions);var N=y.lastDrawTime=ip();y.averageRedrawTime===void 0&&(y.averageRedrawTime=N-O),y.redrawCount===void 0&&(y.redrawCount=0),y.redrawCount++,y.redrawTotalTime===void 0&&(y.redrawTotalTime=0);var j=N-O;y.redrawTotalTime+=j,y.lastRedrawTime=j,y.averageRedrawTime=y.averageRedrawTime/2+j/2,y.requestedFrame=!1}else Lj(y,!1,L);y.skipFrame=!1,g1(C)}};g1(x)}};var Get=function(p){this.init(p)},Dj=Get,g6=Dj.prototype;g6.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],g6.init=function(y){var p=this;p.options=y,p.cy=y.cy;var x=p.container=y.cy.container(),C=p.cy.window();if(C){var L=C.document,O=L.head,N="__________cytoscape_stylesheet",j="__________cytoscape_container",H=L.getElementById(N)!=null;if(x.className.indexOf(j)<0&&(x.className=(x.className||"")+" "+j),!H){var q=L.createElement("style");q.id=N,q.textContent="."+j+" { position: relative; }",O.insertBefore(q,O.children[0])}var W=C.getComputedStyle(x),Z=W.getPropertyValue("position");Z==="static"&&Gc("A Cytoscape container has style position:static and so can not use UI extensions properly")}p.selection=[void 0,void 0,void 0,void 0,0],p.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],p.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},p.dragData={possibleDragElements:[]},p.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]},p.redraws=0,p.showFps=y.showFps,p.debug=y.debug,p.hideEdgesOnViewport=y.hideEdgesOnViewport,p.textureOnViewport=y.textureOnViewport,p.wheelSensitivity=y.wheelSensitivity,p.motionBlurEnabled=y.motionBlur,p.forcedPixelRatio=Q(y.pixelRatio)?y.pixelRatio:null,p.motionBlur=y.motionBlur,p.motionBlurOpacity=y.motionBlurOpacity,p.motionBlurTransparency=1-p.motionBlurOpacity,p.motionBlurPxRatio=1,p.mbPxRBlurry=1,p.minMbLowQualFrames=4,p.fullQualityMb=!1,p.clearedForMotionBlur=[],p.desktopTapThreshold=y.desktopTapThreshold,p.desktopTapThreshold2=y.desktopTapThreshold*y.desktopTapThreshold,p.touchTapThreshold=y.touchTapThreshold,p.touchTapThreshold2=y.touchTapThreshold*y.touchTapThreshold,p.tapholdDuration=500,p.bindings=[],p.beforeRenderCallbacks=[],p.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},p.registerNodeShapes(),p.registerArrowShapes(),p.registerCalculationListeners()},g6.notify=function(y,p){var x=this,C=x.cy;if(!this.destroyed){if(y==="init"){x.load();return}if(y==="destroy"){x.destroy();return}(y==="add"||y==="remove"||y==="move"&&C.hasCompoundNodes()||y==="load"||y==="zorder"||y==="mount")&&x.invalidateCachedZSortedEles(),y==="viewport"&&x.redrawHint("select",!0),(y==="load"||y==="resize"||y==="mount")&&(x.invalidateContainerClientCoordsCache(),x.matchCanvasSize(x.container)),x.redrawHint("eles",!0),x.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},g6.destroy=function(){var y=this;y.destroyed=!0,y.cy.stopAnimationLoop();for(var p=0;p<y.bindings.length;p++){var x=y.bindings[p],C=x,L=C.target;(L.off||L.removeEventListener).apply(L,C.args)}if(y.bindings=[],y.beforeRenderCallbacks=[],y.onUpdateEleCalcsFns=[],y.removeObserver&&y.removeObserver.disconnect(),y.styleObserver&&y.styleObserver.disconnect(),y.resizeObserver&&y.resizeObserver.disconnect(),y.labelCalcDiv)try{document.body.removeChild(y.labelCalcDiv)}catch{}},g6.isHeadless=function(){return!1},[wM,_j,Aj,d6,om,nE].forEach(function(y){we(g6,y)});var vM=1e3/60,Mj={setupDequeueing:function(p){return function(){var C=this,L=this.renderer;if(!C.dequeueingSetup){C.dequeueingSetup=!0;var O=pu(function(){L.redrawHint("eles",!0),L.redrawHint("drag",!0),L.redraw()},p.deqRedrawThreshold),N=function(q,W){var Z=ip(),st=L.averageRedrawTime,bt=L.lastRedrawTime,pt=[],_t=L.cy.extent(),St=L.getPixelRatio();for(q||L.flushRenderedStyleQueue();;){var Et=ip(),Nt=Et-Z,Pt=Et-W;if(bt<vM){var qt=vM-(q?st:0);if(Pt>=p.deqFastCost*qt)break}else if(q){if(Nt>=p.deqCost*bt||Nt>=p.deqAvgCost*st)break}else if(Pt>=p.deqNoDrawCost*vM)break;var re=p.deq(C,St,_t);if(re.length>0)for(var ee=0;ee<re.length;ee++)pt.push(re[ee]);else break}pt.length>0&&(p.onDeqd(C,pt),!q&&p.shouldRedraw(C,pt,St,_t)&&O())},j=p.priority||BD;L.beforeRender(N,j(C))}}}},Ket=function(){function y(p){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ay;g(this,y),this.idsByKey=new F2,this.keyForId=new F2,this.cachesByLvl=new F2,this.lvls=[],this.getKey=p,this.doesEleInvalidateKey=x}return v(y,[{key:"getIdsFor",value:function(x){x==null&&$l("Can not get id list for null key");var C=this.idsByKey,L=this.idsByKey.get(x);return L||(L=new Wx,C.set(x,L)),L}},{key:"addIdForKey",value:function(x,C){x!=null&&this.getIdsFor(x).add(C)}},{key:"deleteIdForKey",value:function(x,C){x!=null&&this.getIdsFor(x).delete(C)}},{key:"getNumberOfIdsForKey",value:function(x){return x==null?0:this.getIdsFor(x).size}},{key:"updateKeyMappingFor",value:function(x){var C=x.id(),L=this.keyForId.get(C),O=this.getKey(x);this.deleteIdForKey(L,C),this.addIdForKey(O,C),this.keyForId.set(C,O)}},{key:"deleteKeyMappingFor",value:function(x){var C=x.id(),L=this.keyForId.get(C);this.deleteIdForKey(L,C),this.keyForId.delete(C)}},{key:"keyHasChangedFor",value:function(x){var C=x.id(),L=this.keyForId.get(C),O=this.getKey(x);return L!==O}},{key:"isInvalid",value:function(x){return this.keyHasChangedFor(x)||this.doesEleInvalidateKey(x)}},{key:"getCachesAt",value:function(x){var C=this.cachesByLvl,L=this.lvls,O=C.get(x);return O||(O=new F2,C.set(x,O),L.push(x)),O}},{key:"getCache",value:function(x,C){return this.getCachesAt(C).get(x)}},{key:"get",value:function(x,C){var L=this.getKey(x),O=this.getCache(L,C);return O!=null&&this.updateKeyMappingFor(x),O}},{key:"getForCachedKey",value:function(x,C){var L=this.keyForId.get(x.id()),O=this.getCache(L,C);return O}},{key:"hasCache",value:function(x,C){return this.getCachesAt(C).has(x)}},{key:"has",value:function(x,C){var L=this.getKey(x);return this.hasCache(L,C)}},{key:"setCache",value:function(x,C,L){L.key=x,this.getCachesAt(C).set(x,L)}},{key:"set",value:function(x,C,L){var O=this.getKey(x);this.setCache(O,C,L),this.updateKeyMappingFor(x)}},{key:"deleteCache",value:function(x,C){this.getCachesAt(C).delete(x)}},{key:"delete",value:function(x,C){var L=this.getKey(x);this.deleteCache(L,C)}},{key:"invalidateKey",value:function(x){var C=this;this.lvls.forEach(function(L){return C.deleteCache(x,L)})}},{key:"invalidate",value:function(x){var C=x.id(),L=this.keyForId.get(C);this.deleteKeyMappingFor(x);var O=this.doesEleInvalidateKey(x);return O&&this.invalidateKey(L),O||this.getNumberOfIdsForKey(L)===0}}]),y}(),Ij=25,OC=50,NC=-4,yM=3,Wet=7.99,Yet=8,Xet=1024,Qet=1024,Jet=1024,Zet=.2,tnt=.8,ent=10,nnt=.15,rnt=.1,int=.9,snt=.9,ant=100,ont=1,p6={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},cnt=p1({getKey:null,doesEleInvalidateKey:ay,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:b4,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),rE=function(p,x){var C=this;C.renderer=p,C.onDequeues=[];var L=cnt(x);we(C,L),C.lookup=new Ket(L.getKey,L.doesEleInvalidateKey),C.setupDequeueing()},Jh=rE.prototype;Jh.reasons=p6,Jh.getTextureQueue=function(y){var p=this;return p.eleImgCaches=p.eleImgCaches||{},p.eleImgCaches[y]=p.eleImgCaches[y]||[]},Jh.getRetiredTextureQueue=function(y){var p=this,x=p.eleImgCaches.retired=p.eleImgCaches.retired||{},C=x[y]=x[y]||[];return C},Jh.getElementQueue=function(){var y=this,p=y.eleCacheQueue=y.eleCacheQueue||new N8(function(x,C){return C.reqs-x.reqs});return p},Jh.getElementKeyToQueue=function(){var y=this,p=y.eleKeyToCacheQueue=y.eleKeyToCacheQueue||{};return p},Jh.getElement=function(y,p,x,C,L){var O=this,N=this.renderer,j=N.cy.zoom(),H=this.lookup;if(!p||p.w===0||p.h===0||isNaN(p.w)||isNaN(p.h)||!y.visible()||y.removed()||!O.allowEdgeTxrCaching&&y.isEdge()||!O.allowParentTxrCaching&&y.isParent())return null;if(C==null&&(C=Math.ceil(jD(j*x))),C<NC)C=NC;else if(j>=Wet||C>yM)return null;var q=Math.pow(2,C),W=p.h*q,Z=p.w*q,st=N.eleTextBiggerThanMin(y,q);if(!this.isVisible(y,st))return null;var bt=H.get(y,C);if(bt&&bt.invalidated&&(bt.invalidated=!1,bt.texture.invalidatedWidth-=bt.width),bt)return bt;var pt;if(W<=Ij?pt=Ij:W<=OC?pt=OC:pt=Math.ceil(W/OC)*OC,W>Jet||Z>Qet)return null;var _t=O.getTextureQueue(pt),St=_t[_t.length-2],Et=function(){return O.recycleTexture(pt,Z)||O.addTexture(pt,Z)};St||(St=_t[_t.length-1]),St||(St=Et()),St.width-St.usedWidth<Z&&(St=Et());for(var Nt=function(nn){return nn&&nn.scaledLabelShown===st},Pt=L&&L===p6.dequeue,qt=L&&L===p6.highQuality,re=L&&L===p6.downscale,ee,Ut=C+1;Ut<=yM;Ut++){var de=H.get(y,Ut);if(de){ee=de;break}}var Yt=ee&&ee.level===C+1?ee:null,Ee=function(){St.context.drawImage(Yt.texture.canvas,Yt.x,0,Yt.width,Yt.height,St.usedWidth,0,Z,W)};if(St.context.setTransform(1,0,0,1,0,0),St.context.clearRect(St.usedWidth,0,Z,pt),Nt(Yt))Ee();else if(Nt(ee))if(qt){for(var Te=ee.level;Te>C;Te--)Yt=O.getElement(y,p,x,Te,p6.downscale);Ee()}else return O.queueElement(y,ee.level-1),ee;else{var ie;if(!Pt&&!qt&&!re)for(var ze=C-1;ze>=NC;ze--){var me=H.get(y,ze);if(me){ie=me;break}}if(Nt(ie))return O.queueElement(y,C),ie;St.context.translate(St.usedWidth,0),St.context.scale(q,q),this.drawElement(St.context,y,p,st,!1),St.context.scale(1/q,1/q),St.context.translate(-St.usedWidth,0)}return bt={x:St.usedWidth,texture:St,level:C,scale:q,width:Z,height:W,scaledLabelShown:st},St.usedWidth+=Math.ceil(Z+Yet),St.eleCaches.push(bt),H.set(y,C,bt),O.checkTextureFullness(St),bt},Jh.invalidateElements=function(y){for(var p=0;p<y.length;p++)this.invalidateElement(y[p])},Jh.invalidateElement=function(y){var p=this,x=p.lookup,C=[],L=x.isInvalid(y);if(L){for(var O=NC;O<=yM;O++){var N=x.getForCachedKey(y,O);N&&C.push(N)}var j=x.invalidate(y);if(j)for(var H=0;H<C.length;H++){var q=C[H],W=q.texture;W.invalidatedWidth+=q.width,q.invalidated=!0,p.checkTextureUtility(W)}p.removeFromQueue(y)}},Jh.checkTextureUtility=function(y){y.invalidatedWidth>=Zet*y.width&&this.retireTexture(y)},Jh.checkTextureFullness=function(y){var p=this,x=p.getTextureQueue(y.height);y.usedWidth/y.width>tnt&&y.fullnessChecks>=ent?oy(x,y):y.fullnessChecks++},Jh.retireTexture=function(y){var p=this,x=y.height,C=p.getTextureQueue(x),L=this.lookup;oy(C,y),y.retired=!0;for(var O=y.eleCaches,N=0;N<O.length;N++){var j=O[N];L.deleteCache(j.key,j.level)}G9(O);var H=p.getRetiredTextureQueue(x);H.push(y)},Jh.addTexture=function(y,p){var x=this,C=x.getTextureQueue(y),L={};return C.push(L),L.eleCaches=[],L.height=y,L.width=Math.max(Xet,p),L.usedWidth=0,L.invalidatedWidth=0,L.fullnessChecks=0,L.canvas=x.renderer.makeOffscreenCanvas(L.width,L.height),L.context=L.canvas.getContext("2d"),L},Jh.recycleTexture=function(y,p){for(var x=this,C=x.getTextureQueue(y),L=x.getRetiredTextureQueue(y),O=0;O<L.length;O++){var N=L[O];if(N.width>=p)return N.retired=!1,N.usedWidth=0,N.invalidatedWidth=0,N.fullnessChecks=0,G9(N.eleCaches),N.context.setTransform(1,0,0,1,0,0),N.context.clearRect(0,0,N.width,N.height),oy(L,N),C.push(N),N}},Jh.queueElement=function(y,p){var x=this,C=x.getElementQueue(),L=x.getElementKeyToQueue(),O=this.getKey(y),N=L[O];if(N)N.level=Math.max(N.level,p),N.eles.merge(y),N.reqs++,C.updateItem(N);else{var j={eles:y.spawn().merge(y),level:p,reqs:1,key:O};C.push(j),L[O]=j}},Jh.dequeue=function(y){for(var p=this,x=p.getElementQueue(),C=p.getElementKeyToQueue(),L=[],O=p.lookup,N=0;N<ont&&x.size()>0;N++){var j=x.pop(),H=j.key,q=j.eles[0],W=O.hasCache(q,j.level);if(C[H]=null,W)continue;L.push(j);var Z=p.getBoundingBox(q);p.getElement(q,Z,y,j.level,p6.dequeue)}return L},Jh.removeFromQueue=function(y){var p=this,x=p.getElementQueue(),C=p.getElementKeyToQueue(),L=this.getKey(y),O=C[L];O!=null&&(O.eles.length===1?(O.reqs=Kx,x.updateItem(O),x.pop(),C[L]=null):O.eles.unmerge(y))},Jh.onDequeue=function(y){this.onDequeues.push(y)},Jh.offDequeue=function(y){oy(this.onDequeues,y)},Jh.setupDequeueing=Mj.setupDequeueing({deqRedrawThreshold:ant,deqCost:nnt,deqAvgCost:rnt,deqNoDrawCost:int,deqFastCost:snt,deq:function(p,x,C){return p.dequeue(x,C)},onDeqd:function(p,x){for(var C=0;C<p.onDequeues.length;C++){var L=p.onDequeues[C];L(x)}},shouldRedraw:function(p,x,C,L){for(var O=0;O<x.length;O++)for(var N=x[O].eles,j=0;j<N.length;j++){var H=N[j].boundingBox();if($D(H,L))return!0}return!1},priority:function(p){return p.renderer.beforeRenderPriorities.eleTxrDeq}});var unt=1,iE=-4,PC=2,lnt=3.99,hnt=50,fnt=50,Zh=.15,dnt=.1,gnt=.9,Oj=.9,pnt=1,Nj=250,Pj=4e3*4e3,Fj=!0,Bj=function(p){var x=this,C=x.renderer=p,L=C.cy;x.layersByLevel={},x.firstGet=!0,x.lastInvalidationTime=ip()-2*Nj,x.skipping=!1,x.eleTxrDeqs=L.collection(),x.scheduleElementRefinement=pu(function(){x.refineElementTextures(x.eleTxrDeqs),x.eleTxrDeqs.unmerge(x.eleTxrDeqs)},fnt),C.beforeRender(function(N,j){j-x.lastInvalidationTime<=Nj?x.skipping=!0:x.skipping=!1},C.beforeRenderPriorities.lyrTxrSkip);var O=function(j,H){return H.reqs-j.reqs};x.layersQueue=new N8(O),x.setupDequeueing()},Df=Bj.prototype,Rj=0,FC=Math.pow(2,53)-1;Df.makeLayer=function(y,p){var x=Math.pow(2,p),C=Math.ceil(y.w*x),L=Math.ceil(y.h*x),O=this.renderer.makeOffscreenCanvas(C,L),N={id:Rj=++Rj%FC,bb:y,level:p,width:C,height:L,canvas:O,context:O.getContext("2d"),eles:[],elesQueue:[],reqs:0},j=N.context,H=-N.bb.x1,q=-N.bb.y1;return j.scale(x,x),j.translate(H,q),N},Df.getLayers=function(y,p,x){var C=this,L=C.renderer,O=L.cy,N=O.zoom(),j=C.firstGet;if(C.firstGet=!1,x==null){if(x=Math.ceil(jD(N*p)),x<iE)x=iE;else if(N>=lnt||x>PC)return null}C.validateLayersElesOrdering(x,y);var H=C.layersByLevel,q=Math.pow(2,x),W=H[x]=H[x]||[],Z,st=C.levelIsComplete(x,y),bt,pt=function(){var Ee=function(yn){if(C.validateLayersElesOrdering(yn,y),C.levelIsComplete(yn,y))return bt=H[yn],!0},Te=function(yn){if(!bt)for(var nn=x+yn;iE<=nn&&nn<=PC&&!Ee(nn);nn+=yn);};Te(1),Te(-1);for(var ie=W.length-1;ie>=0;ie--){var ze=W[ie];ze.invalid&&oy(W,ze)}};if(!st)pt();else return W;var _t=function(){if(!Z){Z=v0();for(var Ee=0;Ee<y.length;Ee++)BB(Z,y[Ee].boundingBox())}return Z},St=function(Ee){Ee=Ee||{};var Te=Ee.after;_t();var ie=Z.w*q*(Z.h*q);if(ie>Pj)return null;var ze=C.makeLayer(Z,x);if(Te!=null){var me=W.indexOf(Te)+1;W.splice(me,0,ze)}else(Ee.insert===void 0||Ee.insert)&&W.unshift(ze);return ze};if(C.skipping&&!j)return null;for(var Et=null,Nt=y.length/unt,Pt=!j,qt=0;qt<y.length;qt++){var re=y[qt],ee=re._private.rscratch,Ut=ee.imgLayerCaches=ee.imgLayerCaches||{},de=Ut[x];if(de){Et=de;continue}if((!Et||Et.eles.length>=Nt||!jB(Et.bb,re.boundingBox()))&&(Et=St({insert:!0,after:Et}),!Et))return null;bt||Pt?C.queueLayer(Et,re):C.drawEleInLayer(Et,re,x,p),Et.eles.push(re),Ut[x]=Et}return bt||(Pt?null:W)},Df.getEleLevelForLayerLevel=function(y,p){return y},Df.drawEleInLayer=function(y,p,x,C){var L=this,O=this.renderer,N=y.context,j=p.boundingBox();j.w===0||j.h===0||!p.visible()||(x=L.getEleLevelForLayerLevel(x,C),O.setImgSmoothing(N,!1),O.drawCachedElement(N,p,null,null,x,Fj),O.setImgSmoothing(N,!0))},Df.levelIsComplete=function(y,p){var x=this,C=x.layersByLevel[y];if(!C||C.length===0)return!1;for(var L=0,O=0;O<C.length;O++){var N=C[O];if(N.reqs>0||N.invalid)return!1;L+=N.eles.length}return L===p.length},Df.validateLayersElesOrdering=function(y,p){var x=this.layersByLevel[y];if(x)for(var C=0;C<x.length;C++){for(var L=x[C],O=-1,N=0;N<p.length;N++)if(L.eles[0]===p[N]){O=N;break}if(O<0){this.invalidateLayer(L);continue}for(var j=O,N=0;N<L.eles.length;N++)if(L.eles[N]!==p[j+N]){this.invalidateLayer(L);break}}},Df.updateElementsInLayers=function(y,p){for(var x=this,C=V(y[0]),L=0;L<y.length;L++)for(var O=C?null:y[L],N=C?y[L]:y[L].ele,j=N._private.rscratch,H=j.imgLayerCaches=j.imgLayerCaches||{},q=iE;q<=PC;q++){var W=H[q];W&&(O&&x.getEleLevelForLayerLevel(W.level)!==O.level||p(W,N,O))}},Df.haveLayers=function(){for(var y=this,p=!1,x=iE;x<=PC;x++){var C=y.layersByLevel[x];if(C&&C.length>0){p=!0;break}}return p},Df.invalidateElements=function(y){var p=this;y.length!==0&&(p.lastInvalidationTime=ip(),!(y.length===0||!p.haveLayers())&&p.updateElementsInLayers(y,function(C,L,O){p.invalidateLayer(C)}))},Df.invalidateLayer=function(y){if(this.lastInvalidationTime=ip(),!y.invalid){var p=y.level,x=y.eles,C=this.layersByLevel[p];oy(C,y),y.elesQueue=[],y.invalid=!0,y.replacement&&(y.replacement.invalid=!0);for(var L=0;L<x.length;L++){var O=x[L]._private.rscratch.imgLayerCaches;O&&(O[p]=null)}}},Df.refineElementTextures=function(y){var p=this;p.updateElementsInLayers(y,function(C,L,O){var N=C.replacement;if(N||(N=C.replacement=p.makeLayer(C.bb,C.level),N.replaces=C,N.eles=C.eles),!N.reqs)for(var j=0;j<N.eles.length;j++)p.queueLayer(N,N.eles[j])})},Df.enqueueElementRefinement=function(y){this.eleTxrDeqs.merge(y),this.scheduleElementRefinement()},Df.queueLayer=function(y,p){var x=this,C=x.layersQueue,L=y.elesQueue,O=L.hasId=L.hasId||{};if(!y.replacement){if(p){if(O[p.id()])return;L.push(p),O[p.id()]=!0}y.reqs?(y.reqs++,C.updateItem(y)):(y.reqs=1,C.push(y))}},Df.dequeue=function(y){for(var p=this,x=p.layersQueue,C=[],L=0;L<pnt&&x.size()!==0;){var O=x.peek();if(O.replacement){x.pop();continue}if(O.replaces&&O!==O.replaces.replacement){x.pop();continue}if(O.invalid){x.pop();continue}var N=O.elesQueue.shift();N&&(p.drawEleInLayer(O,N,O.level,y),L++),C.length===0&&C.push(!0),O.elesQueue.length===0&&(x.pop(),O.reqs=0,O.replaces&&p.applyLayerReplacement(O),p.requestRedraw())}return C},Df.applyLayerReplacement=function(y){var p=this,x=p.layersByLevel[y.level],C=y.replaces,L=x.indexOf(C);if(!(L<0||C.invalid)){x[L]=y;for(var O=0;O<y.eles.length;O++){var N=y.eles[O]._private,j=N.imgLayerCaches=N.imgLayerCaches||{};j&&(j[y.level]=y)}p.requestRedraw()}},Df.requestRedraw=pu(function(){var y=this.renderer;y.redrawHint("eles",!0),y.redrawHint("drag",!0),y.redraw()},100),Df.setupDequeueing=Mj.setupDequeueing({deqRedrawThreshold:hnt,deqCost:Zh,deqAvgCost:dnt,deqNoDrawCost:gnt,deqFastCost:Oj,deq:function(p,x){return p.dequeue(x)},onDeqd:BD,shouldRedraw:b4,priority:function(p){return p.renderer.beforeRenderPriorities.lyrTxrDeq}});var jj={},$j;function bnt(y,p){for(var x=0;x<p.length;x++){var C=p[x];y.lineTo(C.x,C.y)}}function wnt(y,p,x){for(var C,L=0;L<p.length;L++){var O=p[L];L===0&&(C=O),y.lineTo(O.x,O.y)}y.quadraticCurveTo(x.x,x.y,C.x,C.y)}function zj(y,p,x){y.beginPath&&y.beginPath();for(var C=p,L=0;L<C.length;L++){var O=C[L];y.lineTo(O.x,O.y)}var N=x,j=x[0];y.moveTo(j.x,j.y);for(var L=1;L<N.length;L++){var O=N[L];y.lineTo(O.x,O.y)}y.closePath&&y.closePath()}function mnt(y,p,x,C,L){y.beginPath&&y.beginPath(),y.arc(x,C,L,0,Math.PI*2,!1);var O=p,N=O[0];y.moveTo(N.x,N.y);for(var j=0;j<O.length;j++){var H=O[j];y.lineTo(H.x,H.y)}y.closePath&&y.closePath()}function qj(y,p,x,C){y.arc(p,x,C,0,Math.PI*2,!1)}jj.arrowShapeImpl=function(y){return($j||($j={polygon:bnt,"triangle-backcurve":wnt,"triangle-tee":zj,"circle-triangle":mnt,"triangle-cross":zj,circle:qj}))[y]};var bb={};bb.drawElement=function(y,p,x,C,L,O){var N=this;p.isNode()?N.drawNode(y,p,x,C,L,O):N.drawEdge(y,p,x,C,L,O)},bb.drawElementOverlay=function(y,p){var x=this;p.isNode()?x.drawNodeOverlay(y,p):x.drawEdgeOverlay(y,p)},bb.drawElementUnderlay=function(y,p){var x=this;p.isNode()?x.drawNodeUnderlay(y,p):x.drawEdgeUnderlay(y,p)},bb.drawCachedElementPortion=function(y,p,x,C,L,O,N,j){var H=this,q=x.getBoundingBox(p);if(!(q.w===0||q.h===0)){var W=x.getElement(p,q,C,L,O);if(W!=null){var Z=j(H,p);if(Z===0)return;var st=N(H,p),bt=q.x1,pt=q.y1,_t=q.w,St=q.h,Et,Nt,Pt,qt,re;if(st!==0){var ee=x.getRotationPoint(p);Pt=ee.x,qt=ee.y,y.translate(Pt,qt),y.rotate(st),re=H.getImgSmoothing(y),re||H.setImgSmoothing(y,!0);var Ut=x.getRotationOffset(p);Et=Ut.x,Nt=Ut.y}else Et=bt,Nt=pt;var de;Z!==1&&(de=y.globalAlpha,y.globalAlpha=de*Z),y.drawImage(W.texture.canvas,W.x,0,W.width,W.height,Et,Nt,_t,St),Z!==1&&(y.globalAlpha=de),st!==0&&(y.rotate(-st),y.translate(-Pt,-qt),re||H.setImgSmoothing(y,!1))}else x.drawElement(y,p)}};var vnt=function(){return 0},ynt=function(p,x){return p.getTextAngle(x,null)},xM=function(p,x){return p.getTextAngle(x,"source")},xnt=function(p,x){return p.getTextAngle(x,"target")},knt=function(p,x){return x.effectiveOpacity()},sE=function(p,x){return x.pstyle("text-opacity").pfValue*x.effectiveOpacity()};bb.drawCachedElement=function(y,p,x,C,L,O){var N=this,j=N.data,H=j.eleTxrCache,q=j.lblTxrCache,W=j.slbTxrCache,Z=j.tlbTxrCache,st=p.boundingBox(),bt=O===!0?H.reasons.highQuality:null;if(!(st.w===0||st.h===0||!p.visible())&&(!C||$D(st,C))){var pt=p.isEdge(),_t=p.element()._private.rscratch.badLine;N.drawElementUnderlay(y,p),N.drawCachedElementPortion(y,p,H,x,L,bt,vnt,knt),(!pt||!_t)&&N.drawCachedElementPortion(y,p,q,x,L,bt,ynt,sE),pt&&!_t&&(N.drawCachedElementPortion(y,p,W,x,L,bt,xM,sE),N.drawCachedElementPortion(y,p,Z,x,L,bt,xnt,sE)),N.drawElementOverlay(y,p)}},bb.drawElements=function(y,p){for(var x=this,C=0;C<p.length;C++){var L=p[C];x.drawElement(y,L)}},bb.drawCachedElements=function(y,p,x,C){for(var L=this,O=0;O<p.length;O++){var N=p[O];L.drawCachedElement(y,N,x,C)}},bb.drawCachedNodes=function(y,p,x,C){for(var L=this,O=0;O<p.length;O++){var N=p[O];N.isNode()&&L.drawCachedElement(y,N,x,C)}},bb.drawLayeredElements=function(y,p,x,C){var L=this,O=L.data.lyrTxrCache.getLayers(p,x);if(O)for(var N=0;N<O.length;N++){var j=O[N],H=j.bb;H.w===0||H.h===0||y.drawImage(j.canvas,H.x1,H.y1,H.w,H.h)}else L.drawCachedElements(y,p,x,C)};var wb={};wb.drawEdge=function(y,p,x){var C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,O=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,N=this,j=p._private.rscratch;if(!(O&&!p.visible())&&!(j.badLine||j.allpts==null||isNaN(j.allpts[0]))){var H;x&&(H=x,y.translate(-H.x1,-H.y1));var q=O?p.pstyle("opacity").value:1,W=O?p.pstyle("line-opacity").value:1,Z=p.pstyle("curve-style").value,st=p.pstyle("line-style").value,bt=p.pstyle("width").pfValue,pt=p.pstyle("line-cap").value,_t=q*W,St=q*W,Et=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_t;Z==="straight-triangle"?(N.eleStrokeStyle(y,p,ie),N.drawEdgeTrianglePath(p,y,j.allpts)):(y.lineWidth=bt,y.lineCap=pt,N.eleStrokeStyle(y,p,ie),N.drawEdgePath(p,y,j.allpts,st),y.lineCap="butt")},Nt=function(){L&&N.drawEdgeOverlay(y,p)},Pt=function(){L&&N.drawEdgeUnderlay(y,p)},qt=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:St;N.drawArrowheads(y,p,ie)},re=function(){N.drawElementText(y,p,null,C)};y.lineJoin="round";var ee=p.pstyle("ghost").value==="yes";if(ee){var Ut=p.pstyle("ghost-offset-x").pfValue,de=p.pstyle("ghost-offset-y").pfValue,Yt=p.pstyle("ghost-opacity").value,Ee=_t*Yt;y.translate(Ut,de),Et(Ee),qt(Ee),y.translate(-Ut,-de)}Pt(),Et(),qt(),Nt(),re(),x&&y.translate(H.x1,H.y1)}};var Hj=function(p){if(!["overlay","underlay"].includes(p))throw new Error("Invalid state");return function(x,C){if(C.visible()){var L=C.pstyle("".concat(p,"-opacity")).value;if(L!==0){var O=this,N=O.usePaths(),j=C._private.rscratch,H=C.pstyle("".concat(p,"-padding")).pfValue,q=2*H,W=C.pstyle("".concat(p,"-color")).value;x.lineWidth=q,j.edgeType==="self"&&!N?x.lineCap="butt":x.lineCap="round",O.colorStrokeStyle(x,W[0],W[1],W[2],L),O.drawEdgePath(C,x,j.allpts,"solid")}}}};wb.drawEdgeOverlay=Hj("overlay"),wb.drawEdgeUnderlay=Hj("underlay"),wb.drawEdgePath=function(y,p,x,C){var L=y._private.rscratch,O=p,N,j=!1,H=this.usePaths(),q=y.pstyle("line-dash-pattern").pfValue,W=y.pstyle("line-dash-offset").pfValue;if(H){var Z=x.join("$"),st=L.pathCacheKey&&L.pathCacheKey===Z;st?(N=p=L.pathCache,j=!0):(N=p=new Path2D,L.pathCacheKey=Z,L.pathCache=N)}if(O.setLineDash)switch(C){case"dotted":O.setLineDash([1,1]);break;case"dashed":O.setLineDash(q),O.lineDashOffset=W;break;case"solid":O.setLineDash([]);break}if(!j&&!L.badLine)switch(p.beginPath&&p.beginPath(),p.moveTo(x[0],x[1]),L.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var bt=2;bt+3<x.length;bt+=4)p.quadraticCurveTo(x[bt],x[bt+1],x[bt+2],x[bt+3]);break;case"straight":case"segments":case"haystack":for(var pt=2;pt+1<x.length;pt+=2)p.lineTo(x[pt],x[pt+1]);break}p=O,H?p.stroke(N):p.stroke(),p.setLineDash&&p.setLineDash([])},wb.drawEdgeTrianglePath=function(y,p,x){p.fillStyle=p.strokeStyle;for(var C=y.pstyle("width").pfValue,L=0;L+1<x.length;L+=2){var O=[x[L+2]-x[L],x[L+3]-x[L+1]],N=Math.sqrt(O[0]*O[0]+O[1]*O[1]),j=[O[1]/N,-O[0]/N],H=[j[0]*C/2,j[1]*C/2];p.beginPath(),p.moveTo(x[L]-H[0],x[L+1]-H[1]),p.lineTo(x[L]+H[0],x[L+1]+H[1]),p.lineTo(x[L+2],x[L+3]),p.closePath(),p.fill()}},wb.drawArrowheads=function(y,p,x){var C=p._private.rscratch,L=C.edgeType==="haystack";L||this.drawArrowhead(y,p,"source",C.arrowStartX,C.arrowStartY,C.srcArrowAngle,x),this.drawArrowhead(y,p,"mid-target",C.midX,C.midY,C.midtgtArrowAngle,x),this.drawArrowhead(y,p,"mid-source",C.midX,C.midY,C.midsrcArrowAngle,x),L||this.drawArrowhead(y,p,"target",C.arrowEndX,C.arrowEndY,C.tgtArrowAngle,x)},wb.drawArrowhead=function(y,p,x,C,L,O,N){if(!(isNaN(C)||C==null||isNaN(L)||L==null||isNaN(O)||O==null)){var j=this,H=p.pstyle(x+"-arrow-shape").value;if(H!=="none"){var q=p.pstyle(x+"-arrow-fill").value==="hollow"?"both":"filled",W=p.pstyle(x+"-arrow-fill").value,Z=p.pstyle("width").pfValue,st=p.pstyle(x+"-arrow-width"),bt=st.value==="match-line"?Z:st.pfValue;st.units==="%"&&(bt*=Z);var pt=p.pstyle("opacity").value;N===void 0&&(N=pt);var _t=y.globalCompositeOperation;(N!==1||W==="hollow")&&(y.globalCompositeOperation="destination-out",j.colorFillStyle(y,255,255,255,1),j.colorStrokeStyle(y,255,255,255,1),j.drawArrowShape(p,y,q,Z,H,bt,C,L,O),y.globalCompositeOperation=_t);var St=p.pstyle(x+"-arrow-color").value;j.colorFillStyle(y,St[0],St[1],St[2],N),j.colorStrokeStyle(y,St[0],St[1],St[2],N),j.drawArrowShape(p,y,W,Z,H,bt,C,L,O)}}},wb.drawArrowShape=function(y,p,x,C,L,O,N,j,H){var q=this,W=this.usePaths()&&L!=="triangle-cross",Z=!1,st,bt=p,pt={x:N,y:j},_t=y.pstyle("arrow-scale").value,St=this.getArrowWidth(C,_t),Et=q.arrowShapes[L];if(W){var Nt=q.arrowPathCache=q.arrowPathCache||[],Pt=Nd(L),qt=Nt[Pt];qt!=null?(st=p=qt,Z=!0):(st=p=new Path2D,Nt[Pt]=st)}Z||(p.beginPath&&p.beginPath(),W?Et.draw(p,1,0,{x:0,y:0},1):Et.draw(p,St,H,pt,C),p.closePath&&p.closePath()),p=bt,W&&(p.translate(N,j),p.rotate(H),p.scale(St,St)),(x==="filled"||x==="both")&&(W?p.fill(st):p.fill()),(x==="hollow"||x==="both")&&(p.lineWidth=O/(W?St:1),p.lineJoin="miter",W?p.stroke(st):p.stroke()),W&&(p.scale(1/St,1/St),p.rotate(-H),p.translate(-N,-j))};var aE={};aE.safeDrawImage=function(y,p,x,C,L,O,N,j,H,q){if(!(L<=0||O<=0||H<=0||q<=0))try{y.drawImage(p,x,C,L,O,N,j,H,q)}catch(W){Gc(W)}},aE.drawInscribedImage=function(y,p,x,C,L){var O=this,N=x.position(),j=N.x,H=N.y,q=x.cy().style(),W=q.getIndexedStyle.bind(q),Z=W(x,"background-fit","value",C),st=W(x,"background-repeat","value",C),bt=x.width(),pt=x.height(),_t=x.padding()*2,St=bt+(W(x,"background-width-relative-to","value",C)==="inner"?0:_t),Et=pt+(W(x,"background-height-relative-to","value",C)==="inner"?0:_t),Nt=x._private.rscratch,Pt=W(x,"background-clip","value",C),qt=Pt==="node",re=W(x,"background-image-opacity","value",C)*L,ee=W(x,"background-image-smoothing","value",C),Ut=p.width||p.cachedW,de=p.height||p.cachedH;(Ut==null||de==null)&&(document.body.appendChild(p),Ut=p.cachedW=p.width||p.offsetWidth,de=p.cachedH=p.height||p.offsetHeight,document.body.removeChild(p));var Yt=Ut,Ee=de;if(W(x,"background-width","value",C)!=="auto"&&(W(x,"background-width","units",C)==="%"?Yt=W(x,"background-width","pfValue",C)*St:Yt=W(x,"background-width","pfValue",C)),W(x,"background-height","value",C)!=="auto"&&(W(x,"background-height","units",C)==="%"?Ee=W(x,"background-height","pfValue",C)*Et:Ee=W(x,"background-height","pfValue",C)),!(Yt===0||Ee===0)){if(Z==="contain"){var Te=Math.min(St/Yt,Et/Ee);Yt*=Te,Ee*=Te}else if(Z==="cover"){var Te=Math.max(St/Yt,Et/Ee);Yt*=Te,Ee*=Te}var ie=j-St/2,ze=W(x,"background-position-x","units",C),me=W(x,"background-position-x","pfValue",C);ze==="%"?ie+=(St-Yt)*me:ie+=me;var yn=W(x,"background-offset-x","units",C),nn=W(x,"background-offset-x","pfValue",C);yn==="%"?ie+=(St-Yt)*nn:ie+=nn;var qe=H-Et/2,Tn=W(x,"background-position-y","units",C),Xn=W(x,"background-position-y","pfValue",C);Tn==="%"?qe+=(Et-Ee)*Xn:qe+=Xn;var lr=W(x,"background-offset-y","units",C),Sn=W(x,"background-offset-y","pfValue",C);lr==="%"?qe+=(Et-Ee)*Sn:qe+=Sn,Nt.pathCache&&(ie-=j,qe-=H,j=0,H=0);var or=y.globalAlpha;y.globalAlpha=re;var pr=O.getImgSmoothing(y),kr=!1;if(ee==="no"&&pr?(O.setImgSmoothing(y,!1),kr=!0):ee==="yes"&&!pr&&(O.setImgSmoothing(y,!0),kr=!0),st==="no-repeat")qt&&(y.save(),Nt.pathCache?y.clip(Nt.pathCache):(O.nodeShapes[O.getNodeShape(x)].draw(y,j,H,St,Et),y.clip())),O.safeDrawImage(y,p,0,0,Ut,de,ie,qe,Yt,Ee),qt&&y.restore();else{var wr=y.createPattern(p,st);y.fillStyle=wr,O.nodeShapes[O.getNodeShape(x)].draw(y,j,H,St,Et),y.translate(ie,qe),y.fill(),y.translate(-ie,-qe)}y.globalAlpha=or,kr&&O.setImgSmoothing(y,pr)}};var S4={};S4.eleTextBiggerThanMin=function(y,p){if(!p){var x=y.cy().zoom(),C=this.getPixelRatio(),L=Math.ceil(jD(x*C));p=Math.pow(2,L)}var O=y.pstyle("font-size").pfValue*p,N=y.pstyle("min-zoomed-font-size").pfValue;return!(O<N)},S4.drawElementText=function(y,p,x,C,L){var O=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,N=this;if(C==null){if(O&&!N.eleTextBiggerThanMin(p))return}else if(C===!1)return;if(p.isNode()){var j=p.pstyle("label");if(!j||!j.value)return;var H=N.getLabelJustification(p);y.textAlign=H,y.textBaseline="bottom"}else{var q=p.element()._private.rscratch.badLine,W=p.pstyle("label"),Z=p.pstyle("source-label"),st=p.pstyle("target-label");if(q||(!W||!W.value)&&(!Z||!Z.value)&&(!st||!st.value))return;y.textAlign="center",y.textBaseline="bottom"}var bt=!x,pt;x&&(pt=x,y.translate(-pt.x1,-pt.y1)),L==null?(N.drawText(y,p,null,bt,O),p.isEdge()&&(N.drawText(y,p,"source",bt,O),N.drawText(y,p,"target",bt,O))):N.drawText(y,p,L,bt,O),x&&y.translate(pt.x1,pt.y1)},S4.getFontCache=function(y){var p;this.fontCaches=this.fontCaches||[];for(var x=0;x<this.fontCaches.length;x++)if(p=this.fontCaches[x],p.context===y)return p;return p={context:y},this.fontCaches.push(p),p},S4.setupTextStyle=function(y,p){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,C=p.pstyle("font-style").strValue,L=p.pstyle("font-size").pfValue+"px",O=p.pstyle("font-family").strValue,N=p.pstyle("font-weight").strValue,j=x?p.effectiveOpacity()*p.pstyle("text-opacity").value:1,H=p.pstyle("text-outline-opacity").value*j,q=p.pstyle("color").value,W=p.pstyle("text-outline-color").value;y.font=C+" "+N+" "+L+" "+O,y.lineJoin="round",this.colorFillStyle(y,q[0],q[1],q[2],j),this.colorStrokeStyle(y,W[0],W[1],W[2],H)};function kM(y,p,x,C,L){var O=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,N=arguments.length>6?arguments[6]:void 0;y.beginPath(),y.moveTo(p+O,x),y.lineTo(p+C-O,x),y.quadraticCurveTo(p+C,x,p+C,x+O),y.lineTo(p+C,x+L-O),y.quadraticCurveTo(p+C,x+L,p+C-O,x+L),y.lineTo(p+O,x+L),y.quadraticCurveTo(p,x+L,p,x+L-O),y.lineTo(p,x+O),y.quadraticCurveTo(p,x,p+O,x),y.closePath(),N?y.stroke():y.fill()}S4.getTextAngle=function(y,p){var x,C=y._private,L=C.rscratch,O=p?p+"-":"",N=y.pstyle(O+"text-rotation"),j=fb(L,"labelAngle",p);return N.strValue==="autorotate"?x=y.isEdge()?j:0:N.strValue==="none"?x=0:x=N.pfValue,x},S4.drawText=function(y,p,x){var C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,O=p._private,N=O.rscratch,j=L?p.effectiveOpacity():1;if(!(L&&(j===0||p.pstyle("text-opacity").value===0))){x==="main"&&(x=null);var H=fb(N,"labelX",x),q=fb(N,"labelY",x),W,Z,st=this.getLabelText(p,x);if(st!=null&&st!==""&&!isNaN(H)&&!isNaN(q)){this.setupTextStyle(y,p,L);var bt=x?x+"-":"",pt=fb(N,"labelWidth",x),_t=fb(N,"labelHeight",x),St=p.pstyle(bt+"text-margin-x").pfValue,Et=p.pstyle(bt+"text-margin-y").pfValue,Nt=p.isEdge(),Pt=p.pstyle("text-halign").value,qt=p.pstyle("text-valign").value;Nt&&(Pt="center",qt="center"),H+=St,q+=Et;var re;switch(C?re=this.getTextAngle(p,x):re=0,re!==0&&(W=H,Z=q,y.translate(W,Z),y.rotate(re),H=0,q=0),qt){case"top":break;case"center":q+=_t/2;break;case"bottom":q+=_t;break}var ee=p.pstyle("text-background-opacity").value,Ut=p.pstyle("text-border-opacity").value,de=p.pstyle("text-border-width").pfValue,Yt=p.pstyle("text-background-padding").pfValue,Ee=p.pstyle("text-background-shape").strValue,Te=Ee.indexOf("round")===0,ie=2;if(ee>0||de>0&&Ut>0){var ze=H-Yt;switch(Pt){case"left":ze-=pt;break;case"center":ze-=pt/2;break}var me=q-_t-Yt,yn=pt+2*Yt,nn=_t+2*Yt;if(ee>0){var qe=y.fillStyle,Tn=p.pstyle("text-background-color").value;y.fillStyle="rgba("+Tn[0]+","+Tn[1]+","+Tn[2]+","+ee*j+")",Te?kM(y,ze,me,yn,nn,ie):y.fillRect(ze,me,yn,nn),y.fillStyle=qe}if(de>0&&Ut>0){var Xn=y.strokeStyle,lr=y.lineWidth,Sn=p.pstyle("text-border-color").value,or=p.pstyle("text-border-style").value;if(y.strokeStyle="rgba("+Sn[0]+","+Sn[1]+","+Sn[2]+","+Ut*j+")",y.lineWidth=de,y.setLineDash)switch(or){case"dotted":y.setLineDash([1,1]);break;case"dashed":y.setLineDash([4,2]);break;case"double":y.lineWidth=de/4,y.setLineDash([]);break;case"solid":y.setLineDash([]);break}if(Te?kM(y,ze,me,yn,nn,ie,"stroke"):y.strokeRect(ze,me,yn,nn),or==="double"){var pr=de/2;Te?kM(y,ze+pr,me+pr,yn-pr*2,nn-pr*2,ie,"stroke"):y.strokeRect(ze+pr,me+pr,yn-pr*2,nn-pr*2)}y.setLineDash&&y.setLineDash([]),y.lineWidth=lr,y.strokeStyle=Xn}}var kr=2*p.pstyle("text-outline-width").pfValue;if(kr>0&&(y.lineWidth=kr),p.pstyle("text-wrap").value==="wrap"){var wr=fb(N,"labelWrapCachedLines",x),Cr=fb(N,"labelLineHeight",x),$n=pt/2,cr=this.getLabelJustification(p);switch(cr==="auto"||(Pt==="left"?cr==="left"?H+=-pt:cr==="center"&&(H+=-$n):Pt==="center"?cr==="left"?H+=-$n:cr==="right"&&(H+=$n):Pt==="right"&&(cr==="center"?H+=$n:cr==="right"&&(H+=pt))),qt){case"top":q-=(wr.length-1)*Cr;break;case"center":case"bottom":q-=(wr.length-1)*Cr;break}for(var mr=0;mr<wr.length;mr++)kr>0&&y.strokeText(wr[mr],H,q),y.fillText(wr[mr],H,q),q+=Cr}else kr>0&&y.strokeText(st,H,q),y.fillText(st,H,q);re!==0&&(y.rotate(-re),y.translate(-W,-Z))}}};var b6={};b6.drawNode=function(y,p,x){var C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,O=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,N=this,j,H,q=p._private,W=q.rscratch,Z=p.position();if(!(!Q(Z.x)||!Q(Z.y))&&!(O&&!p.visible())){var st=O?p.effectiveOpacity():1,bt=N.usePaths(),pt,_t=!1,St=p.padding();j=p.width()+2*St,H=p.height()+2*St;var Et;x&&(Et=x,y.translate(-Et.x1,-Et.y1));for(var Nt=p.pstyle("background-image"),Pt=Nt.value,qt=new Array(Pt.length),re=new Array(Pt.length),ee=0,Ut=0;Ut<Pt.length;Ut++){var de=Pt[Ut],Yt=qt[Ut]=de!=null&&de!=="none";if(Yt){var Ee=p.cy().style().getIndexedStyle(p,"background-image-crossorigin","value",Ut);ee++,re[Ut]=N.getCachedImage(de,Ee,function(){q.backgroundTimestamp=Date.now(),p.emitAndNotify("background")})}}var Te=p.pstyle("background-blacken").value,ie=p.pstyle("border-width").pfValue,ze=p.pstyle("background-opacity").value*st,me=p.pstyle("border-color").value,yn=p.pstyle("border-style").value,nn=p.pstyle("border-opacity").value*st,qe=p.pstyle("outline-width").pfValue,Tn=p.pstyle("outline-color").value,Xn=p.pstyle("outline-style").value,lr=p.pstyle("outline-opacity").value*st,Sn=p.pstyle("outline-offset").value;y.lineJoin="miter";var or=function(){var Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ze;N.eleFillStyle(y,p,Kn)},pr=function(){var Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nn;N.colorStrokeStyle(y,me[0],me[1],me[2],Kn)},kr=function(){var Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lr;N.colorStrokeStyle(y,Tn[0],Tn[1],Tn[2],Kn)},wr=function(Kn,G,Vn,gr){var nr=N.nodePathCache=N.nodePathCache||[],Be=Pd(Vn==="polygon"?Vn+","+gr.join(","):Vn,""+G,""+Kn),Ls=nr[Be],hr,us=!1;return Ls!=null?(hr=Ls,us=!0,W.pathCache=hr):(hr=new Path2D,nr[Be]=W.pathCache=hr),{path:hr,cacheHit:us}},Cr=p.pstyle("shape").strValue,$n=p.pstyle("shape-polygon-points").pfValue;if(bt){y.translate(Z.x,Z.y);var cr=wr(j,H,Cr,$n);pt=cr.path,_t=cr.cacheHit}var mr=function(){if(!_t){var Kn=Z;bt&&(Kn={x:0,y:0}),N.nodeShapes[N.getNodeShape(p)].draw(pt||y,Kn.x,Kn.y,j,H)}bt?y.fill(pt):y.fill()},Sr=function(){for(var Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:st,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Vn=q.backgrounding,gr=0,nr=0;nr<re.length;nr++){var Be=p.cy().style().getIndexedStyle(p,"background-image-containment","value",nr);if(G&&Be==="over"||!G&&Be==="inside"){gr++;continue}qt[nr]&&re[nr].complete&&!re[nr].error&&(gr++,N.drawInscribedImage(y,re[nr],p,nr,Kn))}q.backgrounding=gr!==ee,Vn!==q.backgrounding&&p.updateStyle(!1)},gi=function(){var Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:st;N.hasPie(p)&&(N.drawPie(y,p,G),Kn&&(bt||N.nodeShapes[N.getNodeShape(p)].draw(y,Z.x,Z.y,j,H)))},ss=function(){var Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:st,G=(Te>0?Te:-Te)*Kn,Vn=Te>0?0:255;Te!==0&&(N.colorFillStyle(y,Vn,Vn,Vn,G),bt?y.fill(pt):y.fill())},na=function(){if(ie>0){if(y.lineWidth=ie,y.lineCap="butt",y.setLineDash)switch(yn){case"dotted":y.setLineDash([1,1]);break;case"dashed":y.setLineDash([4,2]);break;case"solid":case"double":y.setLineDash([]);break}if(bt?y.stroke(pt):y.stroke(),yn==="double"){y.lineWidth=ie/3;var Kn=y.globalCompositeOperation;y.globalCompositeOperation="destination-out",bt?y.stroke(pt):y.stroke(),y.globalCompositeOperation=Kn}y.setLineDash&&y.setLineDash([])}},vi=function(){if(qe>0){if(y.lineWidth=qe,y.lineCap="butt",y.setLineDash)switch(Xn){case"dotted":y.setLineDash([1,1]);break;case"dashed":y.setLineDash([4,2]);break;case"solid":case"double":y.setLineDash([]);break}var Kn=Z;bt&&(Kn={x:0,y:0});var G=N.getNodeShape(p),Vn=(j+ie+(qe+Sn))/j,gr=(H+ie+(qe+Sn))/H,nr=j*Vn,Be=H*gr,Ls=N.nodeShapes[G].points,hr;if(bt){var us=wr(nr,Be,G,Ls);hr=us.path}if(G==="ellipse")N.drawEllipsePath(hr||y,Kn.x,Kn.y,nr,Be);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(G)){var Ya=0,kc=0,Ca=0;G==="round-diamond"?Ya=(ie+Sn+qe)*1.4:G==="round-heptagon"?(Ya=(ie+Sn+qe)*1.075,Ca=-(ie/2+Sn+qe)/35):G==="round-hexagon"?Ya=(ie+Sn+qe)*1.12:G==="round-pentagon"?(Ya=(ie+Sn+qe)*1.13,Ca=-(ie/2+Sn+qe)/15):G==="round-tag"?(Ya=(ie+Sn+qe)*1.12,kc=(ie/2+qe+Sn)*.07):G==="round-triangle"&&(Ya=(ie+Sn+qe)*(Math.PI/2),Ca=-(ie+Sn/2+qe)/Math.PI),Ya!==0&&(Vn=(j+Ya)/j,gr=(H+Ya)/H),N.drawRoundPolygonPath(hr||y,Kn.x+kc,Kn.y+Ca,j*Vn,H*gr,Ls)}else if(["roundrectangle","round-rectangle"].includes(G))N.drawRoundRectanglePath(hr||y,Kn.x,Kn.y,nr,Be);else if(["cutrectangle","cut-rectangle"].includes(G))N.drawCutRectanglePath(hr||y,Kn.x,Kn.y,nr,Be);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(G))N.drawBottomRoundRectanglePath(hr||y,Kn.x,Kn.y,nr,Be);else if(G==="barrel")N.drawBarrelPath(hr||y,Kn.x,Kn.y,nr,Be);else if(G.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(G)){var oc=(ie+qe+Sn)/j;Ls=J9(Z9(Ls,oc)),N.drawPolygonPath(hr||y,Kn.x,Kn.y,j,H,Ls)}else{var ra=(ie+qe+Sn)/j;Ls=J9(Z9(Ls,-ra)),N.drawPolygonPath(hr||y,Kn.x,Kn.y,j,H,Ls)}if(bt?y.stroke(hr):y.stroke(),Xn==="double"){y.lineWidth=ie/3;var no=y.globalCompositeOperation;y.globalCompositeOperation="destination-out",bt?y.stroke(hr):y.stroke(),y.globalCompositeOperation=no}y.setLineDash&&y.setLineDash([])}},si=function(){L&&N.drawNodeOverlay(y,p,Z,j,H)},Qi=function(){L&&N.drawNodeUnderlay(y,p,Z,j,H)},ks=function(){N.drawElementText(y,p,null,C)},as=p.pstyle("ghost").value==="yes";if(as){var Es=p.pstyle("ghost-offset-x").pfValue,eo=p.pstyle("ghost-offset-y").pfValue,Ta=p.pstyle("ghost-opacity").value,pa=Ta*st;y.translate(Es,eo),kr(),vi(),or(Ta*ze),mr(),Sr(pa,!0),pr(Ta*nn),na(),gi(Te!==0||ie!==0),Sr(pa,!1),ss(pa),y.translate(-Es,-eo)}bt&&y.translate(-Z.x,-Z.y),Qi(),bt&&y.translate(Z.x,Z.y),kr(),vi(),or(),mr(),Sr(st,!0),pr(),na(),gi(Te!==0||ie!==0),Sr(st,!1),ss(),bt&&y.translate(-Z.x,-Z.y),ks(),si(),x&&y.translate(Et.x1,Et.y1)}};var EM=function(p){if(!["overlay","underlay"].includes(p))throw new Error("Invalid state");return function(x,C,L,O,N){var j=this;if(C.visible()){var H=C.pstyle("".concat(p,"-padding")).pfValue,q=C.pstyle("".concat(p,"-opacity")).value,W=C.pstyle("".concat(p,"-color")).value,Z=C.pstyle("".concat(p,"-shape")).value;if(q>0){if(L=L||C.position(),O==null||N==null){var st=C.padding();O=C.width()+2*st,N=C.height()+2*st}j.colorFillStyle(x,W[0],W[1],W[2],q),j.nodeShapes[Z].draw(x,L.x,L.y,O+H*2,N+H*2),x.fill()}}}};b6.drawNodeOverlay=EM("overlay"),b6.drawNodeUnderlay=EM("underlay"),b6.hasPie=function(y){return y=y[0],y._private.hasPie},b6.drawPie=function(y,p,x,C){p=p[0],C=C||p.position();var L=p.cy().style(),O=p.pstyle("pie-size"),N=C.x,j=C.y,H=p.width(),q=p.height(),W=Math.min(H,q)/2,Z=0,st=this.usePaths();st&&(N=0,j=0),O.units==="%"?W=W*O.pfValue:O.pfValue!==void 0&&(W=O.pfValue/2);for(var bt=1;bt<=L.pieBackgroundN;bt++){var pt=p.pstyle("pie-"+bt+"-background-size").value,_t=p.pstyle("pie-"+bt+"-background-color").value,St=p.pstyle("pie-"+bt+"-background-opacity").value*x,Et=pt/100;Et+Z>1&&(Et=1-Z);var Nt=1.5*Math.PI+2*Math.PI*Z,Pt=2*Math.PI*Et,qt=Nt+Pt;pt===0||Z>=1||Z+Et>1||(y.beginPath(),y.moveTo(N,j),y.arc(N,j,W,Nt,qt),y.closePath(),this.colorFillStyle(y,_t[0],_t[1],_t[2],St),y.fill(),Z+=Et)}};var dg={},Ent=100;dg.getPixelRatio=function(){var y=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var p=y.backingStorePixelRatio||y.webkitBackingStorePixelRatio||y.mozBackingStorePixelRatio||y.msBackingStorePixelRatio||y.oBackingStorePixelRatio||y.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/p},dg.paintCache=function(y){for(var p=this.paintCaches=this.paintCaches||[],x=!0,C,L=0;L<p.length;L++)if(C=p[L],C.context===y){x=!1;break}return x&&(C={context:y},p.push(C)),C},dg.createGradientStyleFor=function(y,p,x,C,L){var O,N=this.usePaths(),j=x.pstyle(p+"-gradient-stop-colors").value,H=x.pstyle(p+"-gradient-stop-positions").pfValue;if(C==="radial-gradient")if(x.isEdge()){var q=x.sourceEndpoint(),W=x.targetEndpoint(),Z=x.midpoint(),st=w4(q,Z),bt=w4(W,Z);O=y.createRadialGradient(Z.x,Z.y,0,Z.x,Z.y,Math.max(st,bt))}else{var pt=N?{x:0,y:0}:x.position(),_t=x.paddedWidth(),St=x.paddedHeight();O=y.createRadialGradient(pt.x,pt.y,0,pt.x,pt.y,Math.max(_t,St))}else if(x.isEdge()){var Et=x.sourceEndpoint(),Nt=x.targetEndpoint();O=y.createLinearGradient(Et.x,Et.y,Nt.x,Nt.y)}else{var Pt=N?{x:0,y:0}:x.position(),qt=x.paddedWidth(),re=x.paddedHeight(),ee=qt/2,Ut=re/2,de=x.pstyle("background-gradient-direction").value;switch(de){case"to-bottom":O=y.createLinearGradient(Pt.x,Pt.y-Ut,Pt.x,Pt.y+Ut);break;case"to-top":O=y.createLinearGradient(Pt.x,Pt.y+Ut,Pt.x,Pt.y-Ut);break;case"to-left":O=y.createLinearGradient(Pt.x+ee,Pt.y,Pt.x-ee,Pt.y);break;case"to-right":O=y.createLinearGradient(Pt.x-ee,Pt.y,Pt.x+ee,Pt.y);break;case"to-bottom-right":case"to-right-bottom":O=y.createLinearGradient(Pt.x-ee,Pt.y-Ut,Pt.x+ee,Pt.y+Ut);break;case"to-top-right":case"to-right-top":O=y.createLinearGradient(Pt.x-ee,Pt.y+Ut,Pt.x+ee,Pt.y-Ut);break;case"to-bottom-left":case"to-left-bottom":O=y.createLinearGradient(Pt.x+ee,Pt.y-Ut,Pt.x-ee,Pt.y+Ut);break;case"to-top-left":case"to-left-top":O=y.createLinearGradient(Pt.x+ee,Pt.y+Ut,Pt.x-ee,Pt.y-Ut);break}}if(!O)return null;for(var Yt=H.length===j.length,Ee=j.length,Te=0;Te<Ee;Te++)O.addColorStop(Yt?H[Te]:Te/(Ee-1),"rgba("+j[Te][0]+","+j[Te][1]+","+j[Te][2]+","+L+")");return O},dg.gradientFillStyle=function(y,p,x,C){var L=this.createGradientStyleFor(y,"background",p,x,C);if(!L)return null;y.fillStyle=L},dg.colorFillStyle=function(y,p,x,C,L){y.fillStyle="rgba("+p+","+x+","+C+","+L+")"},dg.eleFillStyle=function(y,p,x){var C=p.pstyle("background-fill").value;if(C==="linear-gradient"||C==="radial-gradient")this.gradientFillStyle(y,p,C,x);else{var L=p.pstyle("background-color").value;this.colorFillStyle(y,L[0],L[1],L[2],x)}},dg.gradientStrokeStyle=function(y,p,x,C){var L=this.createGradientStyleFor(y,"line",p,x,C);if(!L)return null;y.strokeStyle=L},dg.colorStrokeStyle=function(y,p,x,C,L){y.strokeStyle="rgba("+p+","+x+","+C+","+L+")"},dg.eleStrokeStyle=function(y,p,x){var C=p.pstyle("line-fill").value;if(C==="linear-gradient"||C==="radial-gradient")this.gradientStrokeStyle(y,p,C,x);else{var L=p.pstyle("line-color").value;this.colorStrokeStyle(y,L[0],L[1],L[2],x)}},dg.matchCanvasSize=function(y){var p=this,x=p.data,C=p.findContainerClientCoords(),L=C[2],O=C[3],N=p.getPixelRatio(),j=p.motionBlurPxRatio;(y===p.data.bufferCanvases[p.MOTIONBLUR_BUFFER_NODE]||y===p.data.bufferCanvases[p.MOTIONBLUR_BUFFER_DRAG])&&(N=j);var H=L*N,q=O*N,W;if(!(H===p.canvasWidth&&q===p.canvasHeight)){p.fontCaches=null;var Z=x.canvasContainer;Z.style.width=L+"px",Z.style.height=O+"px";for(var st=0;st<p.CANVAS_LAYERS;st++)W=x.canvases[st],W.width=H,W.height=q,W.style.width=L+"px",W.style.height=O+"px";for(var st=0;st<p.BUFFER_COUNT;st++)W=x.bufferCanvases[st],W.width=H,W.height=q,W.style.width=L+"px",W.style.height=O+"px";p.textureMult=1,N<=1&&(W=x.bufferCanvases[p.TEXTURE_BUFFER],p.textureMult=2,W.width=H*p.textureMult,W.height=q*p.textureMult),p.canvasWidth=H,p.canvasHeight=q}},dg.renderTo=function(y,p,x,C){this.render({forcedContext:y,forcedZoom:p,forcedPan:x,drawAllLayers:!0,forcedPxRatio:C})},dg.render=function(y){y=y||IB();var p=y.forcedContext,x=y.drawAllLayers,C=y.drawOnlyNodeLayer,L=y.forcedZoom,O=y.forcedPan,N=this,j=y.forcedPxRatio===void 0?this.getPixelRatio():y.forcedPxRatio,H=N.cy,q=N.data,W=q.canvasNeedsRedraw,Z=N.textureOnViewport&&!p&&(N.pinching||N.hoverData.dragging||N.swipePanning||N.data.wheelZooming),st=y.motionBlur!==void 0?y.motionBlur:N.motionBlur,bt=N.motionBlurPxRatio,pt=H.hasCompoundNodes(),_t=N.hoverData.draggingEles,St=!!(N.hoverData.selecting||N.touchData.selecting);st=st&&!p&&N.motionBlurEnabled&&!St;var Et=st;p||(N.prevPxRatio!==j&&(N.invalidateContainerClientCoordsCache(),N.matchCanvasSize(N.container),N.redrawHint("eles",!0),N.redrawHint("drag",!0)),N.prevPxRatio=j),!p&&N.motionBlurTimeout&&clearTimeout(N.motionBlurTimeout),st&&(N.mbFrames==null&&(N.mbFrames=0),N.mbFrames++,N.mbFrames<3&&(Et=!1),N.mbFrames>N.minMbLowQualFrames&&(N.motionBlurPxRatio=N.mbPxRBlurry)),N.clearingMotionBlur&&(N.motionBlurPxRatio=1),N.textureDrawLastFrame&&!Z&&(W[N.NODE]=!0,W[N.SELECT_BOX]=!0);var Nt=H.style(),Pt=H.zoom(),qt=L!==void 0?L:Pt,re=H.pan(),ee={x:re.x,y:re.y},Ut={zoom:Pt,pan:{x:re.x,y:re.y}},de=N.prevViewport,Yt=de===void 0||Ut.zoom!==de.zoom||Ut.pan.x!==de.pan.x||Ut.pan.y!==de.pan.y;!Yt&&!(_t&&!pt)&&(N.motionBlurPxRatio=1),O&&(ee=O),qt*=j,ee.x*=j,ee.y*=j;var Ee=N.getCachedZSortedEles();function Te(vi,si,Qi,ks,as){var Es=vi.globalCompositeOperation;vi.globalCompositeOperation="destination-out",N.colorFillStyle(vi,255,255,255,N.motionBlurTransparency),vi.fillRect(si,Qi,ks,as),vi.globalCompositeOperation=Es}function ie(vi,si){var Qi,ks,as,Es;!N.clearingMotionBlur&&(vi===q.bufferContexts[N.MOTIONBLUR_BUFFER_NODE]||vi===q.bufferContexts[N.MOTIONBLUR_BUFFER_DRAG])?(Qi={x:re.x*bt,y:re.y*bt},ks=Pt*bt,as=N.canvasWidth*bt,Es=N.canvasHeight*bt):(Qi=ee,ks=qt,as=N.canvasWidth,Es=N.canvasHeight),vi.setTransform(1,0,0,1,0,0),si==="motionBlur"?Te(vi,0,0,as,Es):!p&&(si===void 0||si)&&vi.clearRect(0,0,as,Es),x||(vi.translate(Qi.x,Qi.y),vi.scale(ks,ks)),O&&vi.translate(O.x,O.y),L&&vi.scale(L,L)}if(Z||(N.textureDrawLastFrame=!1),Z){if(N.textureDrawLastFrame=!0,!N.textureCache){N.textureCache={},N.textureCache.bb=H.mutableElements().boundingBox(),N.textureCache.texture=N.data.bufferCanvases[N.TEXTURE_BUFFER];var ze=N.data.bufferContexts[N.TEXTURE_BUFFER];ze.setTransform(1,0,0,1,0,0),ze.clearRect(0,0,N.canvasWidth*N.textureMult,N.canvasHeight*N.textureMult),N.render({forcedContext:ze,drawOnlyNodeLayer:!0,forcedPxRatio:j*N.textureMult});var Ut=N.textureCache.viewport={zoom:H.zoom(),pan:H.pan(),width:N.canvasWidth,height:N.canvasHeight};Ut.mpan={x:(0-Ut.pan.x)/Ut.zoom,y:(0-Ut.pan.y)/Ut.zoom}}W[N.DRAG]=!1,W[N.NODE]=!1;var me=q.contexts[N.NODE],yn=N.textureCache.texture,Ut=N.textureCache.viewport;me.setTransform(1,0,0,1,0,0),st?Te(me,0,0,Ut.width,Ut.height):me.clearRect(0,0,Ut.width,Ut.height);var nn=Nt.core("outside-texture-bg-color").value,qe=Nt.core("outside-texture-bg-opacity").value;N.colorFillStyle(me,nn[0],nn[1],nn[2],qe),me.fillRect(0,0,Ut.width,Ut.height);var Pt=H.zoom();ie(me,!1),me.clearRect(Ut.mpan.x,Ut.mpan.y,Ut.width/Ut.zoom/j,Ut.height/Ut.zoom/j),me.drawImage(yn,Ut.mpan.x,Ut.mpan.y,Ut.width/Ut.zoom/j,Ut.height/Ut.zoom/j)}else N.textureOnViewport&&!p&&(N.textureCache=null);var Tn=H.extent(),Xn=N.pinching||N.hoverData.dragging||N.swipePanning||N.data.wheelZooming||N.hoverData.draggingEles||N.cy.animated(),lr=N.hideEdgesOnViewport&&Xn,Sn=[];if(Sn[N.NODE]=!W[N.NODE]&&st&&!N.clearedForMotionBlur[N.NODE]||N.clearingMotionBlur,Sn[N.NODE]&&(N.clearedForMotionBlur[N.NODE]=!0),Sn[N.DRAG]=!W[N.DRAG]&&st&&!N.clearedForMotionBlur[N.DRAG]||N.clearingMotionBlur,Sn[N.DRAG]&&(N.clearedForMotionBlur[N.DRAG]=!0),W[N.NODE]||x||C||Sn[N.NODE]){var or=st&&!Sn[N.NODE]&&bt!==1,me=p||(or?N.data.bufferContexts[N.MOTIONBLUR_BUFFER_NODE]:q.contexts[N.NODE]),pr=st&&!or?"motionBlur":void 0;ie(me,pr),lr?N.drawCachedNodes(me,Ee.nondrag,j,Tn):N.drawLayeredElements(me,Ee.nondrag,j,Tn),N.debug&&N.drawDebugPoints(me,Ee.nondrag),!x&&!st&&(W[N.NODE]=!1)}if(!C&&(W[N.DRAG]||x||Sn[N.DRAG])){var or=st&&!Sn[N.DRAG]&&bt!==1,me=p||(or?N.data.bufferContexts[N.MOTIONBLUR_BUFFER_DRAG]:q.contexts[N.DRAG]);ie(me,st&&!or?"motionBlur":void 0),lr?N.drawCachedNodes(me,Ee.drag,j,Tn):N.drawCachedElements(me,Ee.drag,j,Tn),N.debug&&N.drawDebugPoints(me,Ee.drag),!x&&!st&&(W[N.DRAG]=!1)}if(N.showFps||!C&&W[N.SELECT_BOX]&&!x){var me=p||q.contexts[N.SELECT_BOX];if(ie(me),N.selection[4]==1&&(N.hoverData.selecting||N.touchData.selecting)){var Pt=N.cy.zoom(),kr=Nt.core("selection-box-border-width").value/Pt;me.lineWidth=kr,me.fillStyle="rgba("+Nt.core("selection-box-color").value[0]+","+Nt.core("selection-box-color").value[1]+","+Nt.core("selection-box-color").value[2]+","+Nt.core("selection-box-opacity").value+")",me.fillRect(N.selection[0],N.selection[1],N.selection[2]-N.selection[0],N.selection[3]-N.selection[1]),kr>0&&(me.strokeStyle="rgba("+Nt.core("selection-box-border-color").value[0]+","+Nt.core("selection-box-border-color").value[1]+","+Nt.core("selection-box-border-color").value[2]+","+Nt.core("selection-box-opacity").value+")",me.strokeRect(N.selection[0],N.selection[1],N.selection[2]-N.selection[0],N.selection[3]-N.selection[1]))}if(q.bgActivePosistion&&!N.hoverData.selecting){var Pt=N.cy.zoom(),wr=q.bgActivePosistion;me.fillStyle="rgba("+Nt.core("active-bg-color").value[0]+","+Nt.core("active-bg-color").value[1]+","+Nt.core("active-bg-color").value[2]+","+Nt.core("active-bg-opacity").value+")",me.beginPath(),me.arc(wr.x,wr.y,Nt.core("active-bg-size").pfValue/Pt,0,2*Math.PI),me.fill()}var Cr=N.lastRedrawTime;if(N.showFps&&Cr){Cr=Math.round(Cr);var $n=Math.round(1e3/Cr);me.setTransform(1,0,0,1,0,0),me.fillStyle="rgba(255, 0, 0, 0.75)",me.strokeStyle="rgba(255, 0, 0, 0.75)",me.lineWidth=1,me.fillText("1 frame = "+Cr+" ms = "+$n+" fps",0,20);var cr=60;me.strokeRect(0,30,250,20),me.fillRect(0,30,250*Math.min($n/cr,1),20)}x||(W[N.SELECT_BOX]=!1)}if(st&&bt!==1){var mr=q.contexts[N.NODE],Sr=N.data.bufferCanvases[N.MOTIONBLUR_BUFFER_NODE],gi=q.contexts[N.DRAG],ss=N.data.bufferCanvases[N.MOTIONBLUR_BUFFER_DRAG],na=function(si,Qi,ks){si.setTransform(1,0,0,1,0,0),ks||!Et?si.clearRect(0,0,N.canvasWidth,N.canvasHeight):Te(si,0,0,N.canvasWidth,N.canvasHeight);var as=bt;si.drawImage(Qi,0,0,N.canvasWidth*as,N.canvasHeight*as,0,0,N.canvasWidth,N.canvasHeight)};(W[N.NODE]||Sn[N.NODE])&&(na(mr,Sr,Sn[N.NODE]),W[N.NODE]=!1),(W[N.DRAG]||Sn[N.DRAG])&&(na(gi,ss,Sn[N.DRAG]),W[N.DRAG]=!1)}N.prevViewport=Ut,N.clearingMotionBlur&&(N.clearingMotionBlur=!1,N.motionBlurCleared=!0,N.motionBlur=!0),st&&(N.motionBlurTimeout=setTimeout(function(){N.motionBlurTimeout=null,N.clearedForMotionBlur[N.NODE]=!1,N.clearedForMotionBlur[N.DRAG]=!1,N.motionBlur=!1,N.clearingMotionBlur=!Z,N.mbFrames=0,W[N.NODE]=!0,W[N.DRAG]=!0,N.redraw()},Ent)),p||H.emit("render")};var gy={};gy.drawPolygonPath=function(y,p,x,C,L,O){var N=C/2,j=L/2;y.beginPath&&y.beginPath(),y.moveTo(p+N*O[0],x+j*O[1]);for(var H=1;H<O.length/2;H++)y.lineTo(p+N*O[H*2],x+j*O[H*2+1]);y.closePath()},gy.drawRoundPolygonPath=function(y,p,x,C,L,O){var N=C/2,j=L/2,H=HD(C,L);y.beginPath&&y.beginPath();for(var q=0;q<O.length/4;q++){var W=void 0,Z=void 0;q===0?W=O.length-2:W=q*4-2,Z=q*4+2;var st=p+N*O[q*4],bt=x+j*O[q*4+1],pt=-O[W]*O[Z]-O[W+1]*O[Z+1],_t=H/Math.tan(Math.acos(pt)/2),St=st-_t*O[W],Et=bt-_t*O[W+1],Nt=st+_t*O[Z],Pt=bt+_t*O[Z+1];q===0?y.moveTo(St,Et):y.lineTo(St,Et),y.arcTo(st,bt,Nt,Pt,H)}y.closePath()},gy.drawRoundRectanglePath=function(y,p,x,C,L){var O=C/2,N=L/2,j=R8(C,L);y.beginPath&&y.beginPath(),y.moveTo(p,x-N),y.arcTo(p+O,x-N,p+O,x,j),y.arcTo(p+O,x+N,p,x+N,j),y.arcTo(p-O,x+N,p-O,x,j),y.arcTo(p-O,x-N,p,x-N,j),y.lineTo(p,x-N),y.closePath()},gy.drawBottomRoundRectanglePath=function(y,p,x,C,L){var O=C/2,N=L/2,j=R8(C,L);y.beginPath&&y.beginPath(),y.moveTo(p,x-N),y.lineTo(p+O,x-N),y.lineTo(p+O,x),y.arcTo(p+O,x+N,p,x+N,j),y.arcTo(p-O,x+N,p-O,x,j),y.lineTo(p-O,x-N),y.lineTo(p,x-N),y.closePath()},gy.drawCutRectanglePath=function(y,p,x,C,L){var O=C/2,N=L/2,j=qB();y.beginPath&&y.beginPath(),y.moveTo(p-O+j,x-N),y.lineTo(p+O-j,x-N),y.lineTo(p+O,x-N+j),y.lineTo(p+O,x+N-j),y.lineTo(p+O-j,x+N),y.lineTo(p-O+j,x+N),y.lineTo(p-O,x+N-j),y.lineTo(p-O,x-N+j),y.closePath()},gy.drawBarrelPath=function(y,p,x,C,L){var O=C/2,N=L/2,j=p-O,H=p+O,q=x-N,W=x+N,Z=VD(C,L),st=Z.widthOffset,bt=Z.heightOffset,pt=Z.ctrlPtOffsetPct*st;y.beginPath&&y.beginPath(),y.moveTo(j,q+bt),y.lineTo(j,W-bt),y.quadraticCurveTo(j+pt,W,j+st,W),y.lineTo(H-st,W),y.quadraticCurveTo(H-pt,W,H,W-bt),y.lineTo(H,q+bt),y.quadraticCurveTo(H-pt,q,H-st,q),y.lineTo(j+st,q),y.quadraticCurveTo(j+pt,q,j,q+bt),y.closePath()};for(var Vj=Math.sin(0),Uj=Math.cos(0),TM={},CM={},Gj=Math.PI/40,w6=0*Math.PI;w6<2*Math.PI;w6+=Gj)TM[w6]=Math.sin(w6),CM[w6]=Math.cos(w6);gy.drawEllipsePath=function(y,p,x,C,L){if(y.beginPath&&y.beginPath(),y.ellipse)y.ellipse(p,x,C/2,L/2,0,0,2*Math.PI);else for(var O,N,j=C/2,H=L/2,q=0*Math.PI;q<2*Math.PI;q+=Gj)O=p-j*TM[q]*Vj+j*CM[q]*Uj,N=x+H*CM[q]*Vj+H*TM[q]*Uj,q===0?y.moveTo(O,N):y.lineTo(O,N);y.closePath()};var oE={};oE.createBuffer=function(y,p){var x=document.createElement("canvas");return x.width=y,x.height=p,[x,x.getContext("2d")]},oE.bufferCanvasImage=function(y){var p=this.cy,x=p.mutableElements(),C=x.boundingBox(),L=this.findContainerClientCoords(),O=y.full?Math.ceil(C.w):L[2],N=y.full?Math.ceil(C.h):L[3],j=Q(y.maxWidth)||Q(y.maxHeight),H=this.getPixelRatio(),q=1;if(y.scale!==void 0)O*=y.scale,N*=y.scale,q=y.scale;else if(j){var W=1/0,Z=1/0;Q(y.maxWidth)&&(W=q*y.maxWidth/O),Q(y.maxHeight)&&(Z=q*y.maxHeight/N),q=Math.min(W,Z),O*=q,N*=q}j||(O*=H,N*=H,q*=H);var st=document.createElement("canvas");st.width=O,st.height=N,st.style.width=O+"px",st.style.height=N+"px";var bt=st.getContext("2d");if(O>0&&N>0){bt.clearRect(0,0,O,N),bt.globalCompositeOperation="source-over";var pt=this.getCachedZSortedEles();if(y.full)bt.translate(-C.x1*q,-C.y1*q),bt.scale(q,q),this.drawElements(bt,pt),bt.scale(1/q,1/q),bt.translate(C.x1*q,C.y1*q);else{var _t=p.pan(),St={x:_t.x*q,y:_t.y*q};q*=p.zoom(),bt.translate(St.x,St.y),bt.scale(q,q),this.drawElements(bt,pt),bt.scale(1/q,1/q),bt.translate(-St.x,-St.y)}y.bg&&(bt.globalCompositeOperation="destination-over",bt.fillStyle=y.bg,bt.rect(0,0,O,N),bt.fill())}return st};function Tnt(y,p){for(var x=atob(y),C=new ArrayBuffer(x.length),L=new Uint8Array(C),O=0;O<x.length;O++)L[O]=x.charCodeAt(O);return new Blob([C],{type:p})}function Kj(y){var p=y.indexOf(",");return y.substr(p+1)}function Wj(y,p,x){var C=function(){return p.toDataURL(x,y.quality)};switch(y.output){case"blob-promise":return new e6(function(L,O){try{p.toBlob(function(N){N!=null?L(N):O(new Error("`canvas.toBlob()` sent a null value in its callback"))},x,y.quality)}catch(N){O(N)}});case"blob":return Tnt(Kj(C()),x);case"base64":return Kj(C());case"base64uri":default:return C()}}oE.png=function(y){return Wj(y,this.bufferCanvasImage(y),"image/png")},oE.jpg=function(y){return Wj(y,this.bufferCanvasImage(y),"image/jpeg")};var Yj={};Yj.nodeShapeImpl=function(y,p,x,C,L,O,N){switch(y){case"ellipse":return this.drawEllipsePath(p,x,C,L,O);case"polygon":return this.drawPolygonPath(p,x,C,L,O,N);case"round-polygon":return this.drawRoundPolygonPath(p,x,C,L,O,N);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(p,x,C,L,O);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(p,x,C,L,O);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(p,x,C,L,O);case"barrel":return this.drawBarrelPath(p,x,C,L,O)}};var Xj=cE,xc=cE.prototype;xc.CANVAS_LAYERS=3,xc.SELECT_BOX=0,xc.DRAG=1,xc.NODE=2,xc.BUFFER_COUNT=3,xc.TEXTURE_BUFFER=0,xc.MOTIONBLUR_BUFFER_NODE=1,xc.MOTIONBLUR_BUFFER_DRAG=2;function cE(y){var p=this;p.data={canvases:new Array(xc.CANVAS_LAYERS),contexts:new Array(xc.CANVAS_LAYERS),canvasNeedsRedraw:new Array(xc.CANVAS_LAYERS),bufferCanvases:new Array(xc.BUFFER_COUNT),bufferContexts:new Array(xc.CANVAS_LAYERS)};var x="-webkit-tap-highlight-color",C="rgba(0,0,0,0)";p.data.canvasContainer=document.createElement("div");var L=p.data.canvasContainer.style;p.data.canvasContainer.style[x]=C,L.position="relative",L.zIndex="0",L.overflow="hidden";var O=y.cy.container();O.appendChild(p.data.canvasContainer),O.style[x]=C;var N={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};Fe()&&(N["-ms-touch-action"]="none",N["touch-action"]="none");for(var j=0;j<xc.CANVAS_LAYERS;j++){var H=p.data.canvases[j]=document.createElement("canvas");p.data.contexts[j]=H.getContext("2d"),Object.keys(N).forEach(function(Cr){H.style[Cr]=N[Cr]}),H.style.position="absolute",H.setAttribute("data-id","layer"+j),H.style.zIndex=String(xc.CANVAS_LAYERS-j),p.data.canvasContainer.appendChild(H),p.data.canvasNeedsRedraw[j]=!1}p.data.topCanvas=p.data.canvases[0],p.data.canvases[xc.NODE].setAttribute("data-id","layer"+xc.NODE+"-node"),p.data.canvases[xc.SELECT_BOX].setAttribute("data-id","layer"+xc.SELECT_BOX+"-selectbox"),p.data.canvases[xc.DRAG].setAttribute("data-id","layer"+xc.DRAG+"-drag");for(var j=0;j<xc.BUFFER_COUNT;j++)p.data.bufferCanvases[j]=document.createElement("canvas"),p.data.bufferContexts[j]=p.data.bufferCanvases[j].getContext("2d"),p.data.bufferCanvases[j].style.position="absolute",p.data.bufferCanvases[j].setAttribute("data-id","buffer"+j),p.data.bufferCanvases[j].style.zIndex=String(-j-1),p.data.bufferCanvases[j].style.visibility="hidden";p.pathsEnabled=!0;var q=v0(),W=function($n){return{x:($n.x1+$n.x2)/2,y:($n.y1+$n.y2)/2}},Z=function($n){return{x:-$n.w/2,y:-$n.h/2}},st=function($n){var cr=$n[0]._private,mr=cr.oldBackgroundTimestamp===cr.backgroundTimestamp;return!mr},bt=function($n){return $n[0]._private.nodeKey},pt=function($n){return $n[0]._private.labelStyleKey},_t=function($n){return $n[0]._private.sourceLabelStyleKey},St=function($n){return $n[0]._private.targetLabelStyleKey},Et=function($n,cr,mr,Sr,gi){return p.drawElement($n,cr,mr,!1,!1,gi)},Nt=function($n,cr,mr,Sr,gi){return p.drawElementText($n,cr,mr,Sr,"main",gi)},Pt=function($n,cr,mr,Sr,gi){return p.drawElementText($n,cr,mr,Sr,"source",gi)},qt=function($n,cr,mr,Sr,gi){return p.drawElementText($n,cr,mr,Sr,"target",gi)},re=function($n){return $n.boundingBox(),$n[0]._private.bodyBounds},ee=function($n){return $n.boundingBox(),$n[0]._private.labelBounds.main||q},Ut=function($n){return $n.boundingBox(),$n[0]._private.labelBounds.source||q},de=function($n){return $n.boundingBox(),$n[0]._private.labelBounds.target||q},Yt=function($n,cr){return cr},Ee=function($n){return W(re($n))},Te=function($n,cr,mr){var Sr=$n?$n+"-":"";return{x:cr.x+mr.pstyle(Sr+"text-margin-x").pfValue,y:cr.y+mr.pstyle(Sr+"text-margin-y").pfValue}},ie=function($n,cr,mr){var Sr=$n[0]._private.rscratch;return{x:Sr[cr],y:Sr[mr]}},ze=function($n){return Te("",ie($n,"labelX","labelY"),$n)},me=function($n){return Te("source",ie($n,"sourceLabelX","sourceLabelY"),$n)},yn=function($n){return Te("target",ie($n,"targetLabelX","targetLabelY"),$n)},nn=function($n){return Z(re($n))},qe=function($n){return Z(Ut($n))},Tn=function($n){return Z(de($n))},Xn=function($n){var cr=ee($n),mr=Z(ee($n));if($n.isNode()){switch($n.pstyle("text-halign").value){case"left":mr.x=-cr.w;break;case"right":mr.x=0;break}switch($n.pstyle("text-valign").value){case"top":mr.y=-cr.h;break;case"bottom":mr.y=0;break}}return mr},lr=p.data.eleTxrCache=new rE(p,{getKey:bt,doesEleInvalidateKey:st,drawElement:Et,getBoundingBox:re,getRotationPoint:Ee,getRotationOffset:nn,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),Sn=p.data.lblTxrCache=new rE(p,{getKey:pt,drawElement:Nt,getBoundingBox:ee,getRotationPoint:ze,getRotationOffset:Xn,isVisible:Yt}),or=p.data.slbTxrCache=new rE(p,{getKey:_t,drawElement:Pt,getBoundingBox:Ut,getRotationPoint:me,getRotationOffset:qe,isVisible:Yt}),pr=p.data.tlbTxrCache=new rE(p,{getKey:St,drawElement:qt,getBoundingBox:de,getRotationPoint:yn,getRotationOffset:Tn,isVisible:Yt}),kr=p.data.lyrTxrCache=new Bj(p);p.onUpdateEleCalcs(function($n,cr){lr.invalidateElements(cr),Sn.invalidateElements(cr),or.invalidateElements(cr),pr.invalidateElements(cr),kr.invalidateElements(cr);for(var mr=0;mr<cr.length;mr++){var Sr=cr[mr]._private;Sr.oldBackgroundTimestamp=Sr.backgroundTimestamp}});var wr=function($n){for(var cr=0;cr<$n.length;cr++)kr.enqueueElementRefinement($n[cr].ele)};lr.onDequeue(wr),Sn.onDequeue(wr),or.onDequeue(wr),pr.onDequeue(wr)}xc.redrawHint=function(y,p){var x=this;switch(y){case"eles":x.data.canvasNeedsRedraw[xc.NODE]=p;break;case"drag":x.data.canvasNeedsRedraw[xc.DRAG]=p;break;case"select":x.data.canvasNeedsRedraw[xc.SELECT_BOX]=p;break}};var uE=typeof Path2D<"u";xc.path2dEnabled=function(y){if(y===void 0)return this.pathsEnabled;this.pathsEnabled=!!y},xc.usePaths=function(){return uE&&this.pathsEnabled},xc.setImgSmoothing=function(y,p){y.imageSmoothingEnabled!=null?y.imageSmoothingEnabled=p:(y.webkitImageSmoothingEnabled=p,y.mozImageSmoothingEnabled=p,y.msImageSmoothingEnabled=p)},xc.getImgSmoothing=function(y){return y.imageSmoothingEnabled!=null?y.imageSmoothingEnabled:y.webkitImageSmoothingEnabled||y.mozImageSmoothingEnabled||y.msImageSmoothingEnabled},xc.makeOffscreenCanvas=function(y,p){var x;return(typeof OffscreenCanvas>"u"?"undefined":f(OffscreenCanvas))!=="undefined"?x=new OffscreenCanvas(y,p):(x=document.createElement("canvas"),x.width=y,x.height=p),x},[jj,bb,wb,aE,S4,b6,dg,gy,oE,Yj].forEach(function(y){we(xc,y)});var cp=[{name:"null",impl:mj},{name:"base",impl:Dj},{name:"canvas",impl:Xj}],Cnt=[{type:"layout",extensions:Vet},{type:"renderer",extensions:cp}],Snt={},_nt={};function Ant(y,p,x){var C=x,L=function(de){Gc("Can not register `"+p+"` for `"+y+"` since `"+de+"` already exists in the prototype and can not be overridden")};if(y==="core"){if(tE.prototype[p])return L(p);tE.prototype[p]=x}else if(y==="collection"){if(w1.prototype[p])return L(p);w1.prototype[p]=x}else if(y==="layout"){for(var O=function(de){this.options=de,x.call(this,de),it(this._private)||(this._private={}),this._private.cy=de.cy,this._private.listeners=[],this.createEmitter()},N=O.prototype=Object.create(x.prototype),j=[],H=0;H<j.length;H++){var q=j[H];N[q]=N[q]||function(){return this}}N.start&&!N.run?N.run=function(){return this.start(),this}:!N.start&&N.run&&(N.start=function(){return this.run(),this});var W=x.prototype.stop;N.stop=function(){var Ut=this.options;if(Ut&&Ut.animate){var de=this.animations;if(de)for(var Yt=0;Yt<de.length;Yt++)de[Yt].stop()}return W?W.call(this):this.emit("layoutstop"),this},N.destroy||(N.destroy=function(){return this}),N.cy=function(){return this._private.cy};var Z=function(de){return de._private.cy},st={addEventFields:function(de,Yt){Yt.layout=de,Yt.cy=Z(de),Yt.target=de},bubble:function(){return!0},parent:function(de){return Z(de)}};we(N,{createEmitter:function(){return this._private.emitter=new dC(st,this),this},emitter:function(){return this._private.emitter},on:function(de,Yt){return this.emitter().on(de,Yt),this},one:function(de,Yt){return this.emitter().one(de,Yt),this},once:function(de,Yt){return this.emitter().one(de,Yt),this},removeListener:function(de,Yt){return this.emitter().removeListener(de,Yt),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(de,Yt){return this.emitter().emit(de,Yt),this}}),Kc.eventAliasesOn(N),C=O}else if(y==="renderer"&&p!=="null"&&p!=="base"){var bt=Lnt("renderer","base"),pt=bt.prototype,_t=x,St=x.prototype,Et=function(){bt.apply(this,arguments),_t.apply(this,arguments)},Nt=Et.prototype;for(var Pt in pt){var qt=pt[Pt],re=St[Pt]!=null;if(re)return L(Pt);Nt[Pt]=qt}for(var ee in St)Nt[ee]=St[ee];pt.clientFunctions.forEach(function(Ut){Nt[Ut]=Nt[Ut]||function(){$l("Renderer does not implement `renderer."+Ut+"()` on its prototype")}}),C=Et}else if(y==="__proto__"||y==="constructor"||y==="prototype")return $l(y+" is an illegal type to be registered, possibly lead to prototype pollutions");return An({map:Snt,keys:[y,p],value:C})}function Lnt(y,p){return Nn({map:Snt,keys:[y,p]})}function Qj(y,p,x,C,L){return An({map:_nt,keys:[y,p,x,C],value:L})}function L2t(y,p,x,C){return Nn({map:_nt,keys:[y,p,x,C]})}var Jj=function(){if(arguments.length===2)return Lnt.apply(null,arguments);if(arguments.length===3)return Ant.apply(null,arguments);if(arguments.length===4)return L2t.apply(null,arguments);if(arguments.length===5)return Qj.apply(null,arguments);$l("Invalid extension access syntax")};tE.prototype.extension=Jj,Cnt.forEach(function(y){y.extensions.forEach(function(p){Ant(y.type,p.name,p.impl)})});var Dnt=function y(){if(!(this instanceof y))return new y;this.length=0},m6=Dnt.prototype;m6.instanceString=function(){return"stylesheet"},m6.selector=function(y){var p=this.length++;return this[p]={selector:y,properties:[]},this},m6.css=function(y,p){var x=this.length-1;if(mt(y))this[x].properties.push({name:y,value:p});else if(it(y))for(var C=y,L=Object.keys(C),O=0;O<L.length;O++){var N=L[O],j=C[N];if(j!=null){var H=Y1.properties[N]||Y1.properties[Ae(N)];if(H!=null){var q=H.name,W=j;this[x].properties.push({name:q,value:W})}}}return this},m6.style=m6.css,m6.generateStyle=function(y){var p=new Y1(y);return this.appendToStyle(p)},m6.appendToStyle=function(y){for(var p=0;p<this.length;p++){var x=this[p],C=x.selector,L=x.properties;y.selector(C);for(var O=0;O<L.length;O++){var N=L[O];y.css(N.name,N.value)}}return y};var D2t="3.28.1",v6=function(p){if(p===void 0&&(p={}),it(p))return new tE(p);if(mt(p))return Jj.apply(Jj,arguments)};return v6.use=function(y){var p=Array.prototype.slice.call(arguments,1);return p.unshift(v6),y.apply(null,p),this},v6.warnings=function(y){return U9(y)},v6.version=D2t,v6.stylesheet=v6.Stylesheet=Dnt,v6})})(GHt);var een=GHt.exports;const KHt=e9(een);var WHt={exports:{}},p2t={exports:{}},b2t={exports:{}},YHt;function nen(){return YHt||(YHt=1,function(i,a){(function(g,w){i.exports=w()})(Z0,function(){return function(f){var g={};function w(v){if(g[v])return g[v].exports;var b=g[v]={i:v,l:!1,exports:{}};return f[v].call(b.exports,b,b.exports,w),b.l=!0,b.exports}return w.m=f,w.c=g,w.i=function(v){return v},w.d=function(v,b,E){w.o(v,b)||Object.defineProperty(v,b,{configurable:!1,enumerable:!0,get:E})},w.n=function(v){var b=v&&v.__esModule?function(){return v.default}:function(){return v};return w.d(b,"a",b),b},w.o=function(v,b){return Object.prototype.hasOwnProperty.call(v,b)},w.p="",w(w.s=26)}([function(f,g,w){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,f.exports=v},function(f,g,w){var v=w(2),b=w(8),E=w(9);function S(M,F,R){v.call(this,R),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=R,this.bendpoints=[],this.source=M,this.target=F}S.prototype=Object.create(v.prototype);for(var _ in v)S[_]=v[_];S.prototype.getSource=function(){return this.source},S.prototype.getTarget=function(){return this.target},S.prototype.isInterGraph=function(){return this.isInterGraph},S.prototype.getLength=function(){return this.length},S.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},S.prototype.getBendpoints=function(){return this.bendpoints},S.prototype.getLca=function(){return this.lca},S.prototype.getSourceInLca=function(){return this.sourceInLca},S.prototype.getTargetInLca=function(){return this.targetInLca},S.prototype.getOtherEnd=function(M){if(this.source===M)return this.target;if(this.target===M)return this.source;throw"Node is not incident with this edge"},S.prototype.getOtherEndInGraph=function(M,F){for(var R=this.getOtherEnd(M),B=F.getGraphManager().getRoot();;){if(R.getOwner()==F)return R;if(R.getOwner()==B)break;R=R.getOwner().getParent()}return null},S.prototype.updateLength=function(){var M=new Array(4);this.isOverlapingSourceAndTarget=b.getIntersection(this.target.getRect(),this.source.getRect(),M),this.isOverlapingSourceAndTarget||(this.lengthX=M[0]-M[2],this.lengthY=M[1]-M[3],Math.abs(this.lengthX)<1&&(this.lengthX=E.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=E.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},S.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=E.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=E.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},f.exports=S},function(f,g,w){function v(b){this.vGraphObject=b}f.exports=v},function(f,g,w){var v=w(2),b=w(10),E=w(13),S=w(0),_=w(16),M=w(4);function F(B,z,Y,nt){Y==null&&nt==null&&(nt=z),v.call(this,nt),B.graphManager!=null&&(B=B.graphManager),this.estimatedSize=b.MIN_VALUE,this.inclusionTreeDepth=b.MAX_VALUE,this.vGraphObject=nt,this.edges=[],this.graphManager=B,Y!=null&&z!=null?this.rect=new E(z.x,z.y,Y.width,Y.height):this.rect=new E}F.prototype=Object.create(v.prototype);for(var R in v)F[R]=v[R];F.prototype.getEdges=function(){return this.edges},F.prototype.getChild=function(){return this.child},F.prototype.getOwner=function(){return this.owner},F.prototype.getWidth=function(){return this.rect.width},F.prototype.setWidth=function(B){this.rect.width=B},F.prototype.getHeight=function(){return this.rect.height},F.prototype.setHeight=function(B){this.rect.height=B},F.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},F.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},F.prototype.getCenter=function(){return new M(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},F.prototype.getLocation=function(){return new M(this.rect.x,this.rect.y)},F.prototype.getRect=function(){return this.rect},F.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},F.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},F.prototype.setRect=function(B,z){this.rect.x=B.x,this.rect.y=B.y,this.rect.width=z.width,this.rect.height=z.height},F.prototype.setCenter=function(B,z){this.rect.x=B-this.rect.width/2,this.rect.y=z-this.rect.height/2},F.prototype.setLocation=function(B,z){this.rect.x=B,this.rect.y=z},F.prototype.moveBy=function(B,z){this.rect.x+=B,this.rect.y+=z},F.prototype.getEdgeListToNode=function(B){var z=[],Y=this;return Y.edges.forEach(function(nt){if(nt.target==B){if(nt.source!=Y)throw"Incorrect edge source!";z.push(nt)}}),z},F.prototype.getEdgesBetween=function(B){var z=[],Y=this;return Y.edges.forEach(function(nt){if(!(nt.source==Y||nt.target==Y))throw"Incorrect edge source and/or target";(nt.target==B||nt.source==B)&&z.push(nt)}),z},F.prototype.getNeighborsList=function(){var B=new Set,z=this;return z.edges.forEach(function(Y){if(Y.source==z)B.add(Y.target);else{if(Y.target!=z)throw"Incorrect incidency!";B.add(Y.source)}}),B},F.prototype.withChildren=function(){var B=new Set,z,Y;if(B.add(this),this.child!=null)for(var nt=this.child.getNodes(),ot=0;ot<nt.length;ot++)z=nt[ot],Y=z.withChildren(),Y.forEach(function(ft){B.add(ft)});return B},F.prototype.getNoOfChildren=function(){var B=0,z;if(this.child==null)B=1;else for(var Y=this.child.getNodes(),nt=0;nt<Y.length;nt++)z=Y[nt],B+=z.getNoOfChildren();return B==0&&(B=1),B},F.prototype.getEstimatedSize=function(){if(this.estimatedSize==b.MIN_VALUE)throw"assert failed";return this.estimatedSize},F.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)},F.prototype.scatter=function(){var B,z,Y=-S.INITIAL_WORLD_BOUNDARY,nt=S.INITIAL_WORLD_BOUNDARY;B=S.WORLD_CENTER_X+_.nextDouble()*(nt-Y)+Y;var ot=-S.INITIAL_WORLD_BOUNDARY,ft=S.INITIAL_WORLD_BOUNDARY;z=S.WORLD_CENTER_Y+_.nextDouble()*(ft-ot)+ot,this.rect.x=B,this.rect.y=z},F.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var B=this.getChild();if(B.updateBounds(!0),this.rect.x=B.getLeft(),this.rect.y=B.getTop(),this.setWidth(B.getRight()-B.getLeft()),this.setHeight(B.getBottom()-B.getTop()),S.NODE_DIMENSIONS_INCLUDE_LABELS){var z=B.getRight()-B.getLeft(),Y=B.getBottom()-B.getTop();this.labelWidth>z&&(this.rect.x-=(this.labelWidth-z)/2,this.setWidth(this.labelWidth)),this.labelHeight>Y&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-Y)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-Y),this.setHeight(this.labelHeight))}}},F.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==b.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},F.prototype.transform=function(B){var z=this.rect.x;z>S.WORLD_BOUNDARY?z=S.WORLD_BOUNDARY:z<-S.WORLD_BOUNDARY&&(z=-S.WORLD_BOUNDARY);var Y=this.rect.y;Y>S.WORLD_BOUNDARY?Y=S.WORLD_BOUNDARY:Y<-S.WORLD_BOUNDARY&&(Y=-S.WORLD_BOUNDARY);var nt=new M(z,Y),ot=B.inverseTransformPoint(nt);this.setLocation(ot.x,ot.y)},F.prototype.getLeft=function(){return this.rect.x},F.prototype.getRight=function(){return this.rect.x+this.rect.width},F.prototype.getTop=function(){return this.rect.y},F.prototype.getBottom=function(){return this.rect.y+this.rect.height},F.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},f.exports=F},function(f,g,w){function v(b,E){b==null&&E==null?(this.x=0,this.y=0):(this.x=b,this.y=E)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(b){this.x=b},v.prototype.setY=function(b){this.y=b},v.prototype.getDifference=function(b){return new DimensionD(this.x-b.x,this.y-b.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(b){return this.x+=b.width,this.y+=b.height,this},f.exports=v},function(f,g,w){var v=w(2),b=w(10),E=w(0),S=w(6),_=w(3),M=w(1),F=w(13),R=w(12),B=w(11);function z(nt,ot,ft){v.call(this,ft),this.estimatedSize=b.MIN_VALUE,this.margin=E.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=nt,ot!=null&&ot instanceof S?this.graphManager=ot:ot!=null&&ot instanceof Layout&&(this.graphManager=ot.graphManager)}z.prototype=Object.create(v.prototype);for(var Y in v)z[Y]=v[Y];z.prototype.getNodes=function(){return this.nodes},z.prototype.getEdges=function(){return this.edges},z.prototype.getGraphManager=function(){return this.graphManager},z.prototype.getParent=function(){return this.parent},z.prototype.getLeft=function(){return this.left},z.prototype.getRight=function(){return this.right},z.prototype.getTop=function(){return this.top},z.prototype.getBottom=function(){return this.bottom},z.prototype.isConnected=function(){return this.isConnected},z.prototype.add=function(nt,ot,ft){if(ot==null&&ft==null){var wt=nt;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(wt)>-1)throw"Node already in graph!";return wt.owner=this,this.getNodes().push(wt),wt}else{var mt=nt;if(!(this.getNodes().indexOf(ot)>-1&&this.getNodes().indexOf(ft)>-1))throw"Source or target not in graph!";if(!(ot.owner==ft.owner&&ot.owner==this))throw"Both owners must be this graph!";return ot.owner!=ft.owner?null:(mt.source=ot,mt.target=ft,mt.isInterGraph=!1,this.getEdges().push(mt),ot.edges.push(mt),ft!=ot&&ft.edges.push(mt),mt)}},z.prototype.remove=function(nt){var ot=nt;if(nt instanceof _){if(ot==null)throw"Node is null!";if(!(ot.owner!=null&&ot.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var ft=ot.edges.slice(),wt,mt=ft.length,ct=0;ct<mt;ct++)wt=ft[ct],wt.isInterGraph?this.graphManager.remove(wt):wt.source.owner.remove(wt);var rt=this.nodes.indexOf(ot);if(rt==-1)throw"Node not in owner node list!";this.nodes.splice(rt,1)}else if(nt instanceof M){var wt=nt;if(wt==null)throw"Edge is null!";if(!(wt.source!=null&&wt.target!=null))throw"Source and/or target is null!";if(!(wt.source.owner!=null&&wt.target.owner!=null&&wt.source.owner==this&&wt.target.owner==this))throw"Source and/or target owner is invalid!";var it=wt.source.edges.indexOf(wt),gt=wt.target.edges.indexOf(wt);if(!(it>-1&&gt>-1))throw"Source and/or target doesn't know this edge!";wt.source.edges.splice(it,1),wt.target!=wt.source&&wt.target.edges.splice(gt,1);var rt=wt.source.owner.getEdges().indexOf(wt);if(rt==-1)throw"Not in owner's edge list!";wt.source.owner.getEdges().splice(rt,1)}},z.prototype.updateLeftTop=function(){for(var nt=b.MAX_VALUE,ot=b.MAX_VALUE,ft,wt,mt,ct=this.getNodes(),rt=ct.length,it=0;it<rt;it++){var gt=ct[it];ft=gt.getTop(),wt=gt.getLeft(),nt>ft&&(nt=ft),ot>wt&&(ot=wt)}return nt==b.MAX_VALUE?null:(ct[0].getParent().paddingLeft!=null?mt=ct[0].getParent().paddingLeft:mt=this.margin,this.left=ot-mt,this.top=nt-mt,new R(this.left,this.top))},z.prototype.updateBounds=function(nt){for(var ot=b.MAX_VALUE,ft=-b.MAX_VALUE,wt=b.MAX_VALUE,mt=-b.MAX_VALUE,ct,rt,it,gt,Q,dt=this.nodes,K=dt.length,yt=0;yt<K;yt++){var V=dt[yt];nt&&V.child!=null&&V.updateBounds(),ct=V.getLeft(),rt=V.getRight(),it=V.getTop(),gt=V.getBottom(),ot>ct&&(ot=ct),ft<rt&&(ft=rt),wt>it&&(wt=it),mt<gt&&(mt=gt)}var Ot=new F(ot,wt,ft-ot,mt-wt);ot==b.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),dt[0].getParent().paddingLeft!=null?Q=dt[0].getParent().paddingLeft:Q=this.margin,this.left=Ot.x-Q,this.right=Ot.x+Ot.width+Q,this.top=Ot.y-Q,this.bottom=Ot.y+Ot.height+Q},z.calculateBounds=function(nt){for(var ot=b.MAX_VALUE,ft=-b.MAX_VALUE,wt=b.MAX_VALUE,mt=-b.MAX_VALUE,ct,rt,it,gt,Q=nt.length,dt=0;dt<Q;dt++){var K=nt[dt];ct=K.getLeft(),rt=K.getRight(),it=K.getTop(),gt=K.getBottom(),ot>ct&&(ot=ct),ft<rt&&(ft=rt),wt>it&&(wt=it),mt<gt&&(mt=gt)}var yt=new F(ot,wt,ft-ot,mt-wt);return yt},z.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},z.prototype.getEstimatedSize=function(){if(this.estimatedSize==b.MIN_VALUE)throw"assert failed";return this.estimatedSize},z.prototype.calcEstimatedSize=function(){for(var nt=0,ot=this.nodes,ft=ot.length,wt=0;wt<ft;wt++){var mt=ot[wt];nt+=mt.calcEstimatedSize()}return nt==0?this.estimatedSize=E.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=nt/Math.sqrt(this.nodes.length),this.estimatedSize},z.prototype.updateConnected=function(){var nt=this;if(this.nodes.length==0){this.isConnected=!0;return}var ot=new B,ft=new Set,wt=this.nodes[0],mt,ct,rt=wt.withChildren();for(rt.forEach(function(yt){ot.push(yt),ft.add(yt)});ot.length!==0;){wt=ot.shift(),mt=wt.getEdges();for(var it=mt.length,gt=0;gt<it;gt++){var Q=mt[gt];if(ct=Q.getOtherEndInGraph(wt,this),ct!=null&&!ft.has(ct)){var dt=ct.withChildren();dt.forEach(function(yt){ot.push(yt),ft.add(yt)})}}}if(this.isConnected=!1,ft.size>=this.nodes.length){var K=0;ft.forEach(function(yt){yt.owner==nt&&K++}),K==this.nodes.length&&(this.isConnected=!0)}},f.exports=z},function(f,g,w){var v,b=w(1);function E(S){v=w(5),this.layout=S,this.graphs=[],this.edges=[]}E.prototype.addRoot=function(){var S=this.layout.newGraph(),_=this.layout.newNode(null),M=this.add(S,_);return this.setRootGraph(M),this.rootGraph},E.prototype.add=function(S,_,M,F,R){if(M==null&&F==null&&R==null){if(S==null)throw"Graph is null!";if(_==null)throw"Parent node is null!";if(this.graphs.indexOf(S)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(S),S.parent!=null)throw"Already has a parent!";if(_.child!=null)throw"Already has a child!";return S.parent=_,_.child=S,S}else{R=M,F=_,M=S;var B=F.getOwner(),z=R.getOwner();if(!(B!=null&&B.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(z!=null&&z.getGraphManager()==this))throw"Target not in this graph mgr!";if(B==z)return M.isInterGraph=!1,B.add(M,F,R);if(M.isInterGraph=!0,M.source=F,M.target=R,this.edges.indexOf(M)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(M),!(M.source!=null&&M.target!=null))throw"Edge source and/or target is null!";if(!(M.source.edges.indexOf(M)==-1&&M.target.edges.indexOf(M)==-1))throw"Edge already in source and/or target incidency list!";return M.source.edges.push(M),M.target.edges.push(M),M}},E.prototype.remove=function(S){if(S instanceof v){var _=S;if(_.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(_==this.rootGraph||_.parent!=null&&_.parent.graphManager==this))throw"Invalid parent node!";var M=[];M=M.concat(_.getEdges());for(var F,R=M.length,B=0;B<R;B++)F=M[B],_.remove(F);var z=[];z=z.concat(_.getNodes());var Y;R=z.length;for(var B=0;B<R;B++)Y=z[B],_.remove(Y);_==this.rootGraph&&this.setRootGraph(null);var nt=this.graphs.indexOf(_);this.graphs.splice(nt,1),_.parent=null}else if(S instanceof b){if(F=S,F==null)throw"Edge is null!";if(!F.isInterGraph)throw"Not an inter-graph edge!";if(!(F.source!=null&&F.target!=null))throw"Source and/or target is null!";if(!(F.source.edges.indexOf(F)!=-1&&F.target.edges.indexOf(F)!=-1))throw"Source and/or target doesn't know this edge!";var nt=F.source.edges.indexOf(F);if(F.source.edges.splice(nt,1),nt=F.target.edges.indexOf(F),F.target.edges.splice(nt,1),!(F.source.owner!=null&&F.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(F.source.owner.getGraphManager().edges.indexOf(F)==-1)throw"Not in owner graph manager's edge list!";var nt=F.source.owner.getGraphManager().edges.indexOf(F);F.source.owner.getGraphManager().edges.splice(nt,1)}},E.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},E.prototype.getGraphs=function(){return this.graphs},E.prototype.getAllNodes=function(){if(this.allNodes==null){for(var S=[],_=this.getGraphs(),M=_.length,F=0;F<M;F++)S=S.concat(_[F].getNodes());this.allNodes=S}return this.allNodes},E.prototype.resetAllNodes=function(){this.allNodes=null},E.prototype.resetAllEdges=function(){this.allEdges=null},E.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},E.prototype.getAllEdges=function(){if(this.allEdges==null){var S=[],_=this.getGraphs();_.length;for(var M=0;M<_.length;M++)S=S.concat(_[M].getEdges());S=S.concat(this.edges),this.allEdges=S}return this.allEdges},E.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},E.prototype.setAllNodesToApplyGravitation=function(S){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=S},E.prototype.getRoot=function(){return this.rootGraph},E.prototype.setRootGraph=function(S){if(S.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=S,S.parent==null&&(S.parent=this.layout.newNode("Root node"))},E.prototype.getLayout=function(){return this.layout},E.prototype.isOneAncestorOfOther=function(S,_){if(!(S!=null&&_!=null))throw"assert failed";if(S==_)return!0;var M=S.getOwner(),F;do{if(F=M.getParent(),F==null)break;if(F==_)return!0;if(M=F.getOwner(),M==null)break}while(!0);M=_.getOwner();do{if(F=M.getParent(),F==null)break;if(F==S)return!0;if(M=F.getOwner(),M==null)break}while(!0);return!1},E.prototype.calcLowestCommonAncestors=function(){for(var S,_,M,F,R,B=this.getAllEdges(),z=B.length,Y=0;Y<z;Y++){if(S=B[Y],_=S.source,M=S.target,S.lca=null,S.sourceInLca=_,S.targetInLca=M,_==M){S.lca=_.getOwner();continue}for(F=_.getOwner();S.lca==null;){for(S.targetInLca=M,R=M.getOwner();S.lca==null;){if(R==F){S.lca=R;break}if(R==this.rootGraph)break;if(S.lca!=null)throw"assert failed";S.targetInLca=R.getParent(),R=S.targetInLca.getOwner()}if(F==this.rootGraph)break;S.lca==null&&(S.sourceInLca=F.getParent(),F=S.sourceInLca.getOwner())}if(S.lca==null)throw"assert failed"}},E.prototype.calcLowestCommonAncestor=function(S,_){if(S==_)return S.getOwner();var M=S.getOwner();do{if(M==null)break;var F=_.getOwner();do{if(F==null)break;if(F==M)return F;F=F.getParent().getOwner()}while(!0);M=M.getParent().getOwner()}while(!0);return M},E.prototype.calcInclusionTreeDepths=function(S,_){S==null&&_==null&&(S=this.rootGraph,_=1);for(var M,F=S.getNodes(),R=F.length,B=0;B<R;B++)M=F[B],M.inclusionTreeDepth=_,M.child!=null&&this.calcInclusionTreeDepths(M.child,_+1)},E.prototype.includesInvalidEdge=function(){for(var S,_=this.edges.length,M=0;M<_;M++)if(S=this.edges[M],this.isOneAncestorOfOther(S.source,S.target))return!0;return!1},f.exports=E},function(f,g,w){var v=w(0);function b(){}for(var E in v)b[E]=v[E];b.MAX_ITERATIONS=2500,b.DEFAULT_EDGE_LENGTH=50,b.DEFAULT_SPRING_STRENGTH=.45,b.DEFAULT_REPULSION_STRENGTH=4500,b.DEFAULT_GRAVITY_STRENGTH=.4,b.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,b.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,b.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,b.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,b.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,b.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,b.COOLING_ADAPTATION_FACTOR=.33,b.ADAPTATION_LOWER_NODE_LIMIT=1e3,b.ADAPTATION_UPPER_NODE_LIMIT=5e3,b.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,b.MAX_NODE_DISPLACEMENT=b.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,b.MIN_REPULSION_DIST=b.DEFAULT_EDGE_LENGTH/10,b.CONVERGENCE_CHECK_PERIOD=100,b.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,b.MIN_EDGE_LENGTH=1,b.GRID_CALCULATION_CHECK_PERIOD=10,f.exports=b},function(f,g,w){var v=w(12);function b(){}b.calcSeparationAmount=function(E,S,_,M){if(!E.intersects(S))throw"assert failed";var F=new Array(2);this.decideDirectionsForOverlappingNodes(E,S,F),_[0]=Math.min(E.getRight(),S.getRight())-Math.max(E.x,S.x),_[1]=Math.min(E.getBottom(),S.getBottom())-Math.max(E.y,S.y),E.getX()<=S.getX()&&E.getRight()>=S.getRight()?_[0]+=Math.min(S.getX()-E.getX(),E.getRight()-S.getRight()):S.getX()<=E.getX()&&S.getRight()>=E.getRight()&&(_[0]+=Math.min(E.getX()-S.getX(),S.getRight()-E.getRight())),E.getY()<=S.getY()&&E.getBottom()>=S.getBottom()?_[1]+=Math.min(S.getY()-E.getY(),E.getBottom()-S.getBottom()):S.getY()<=E.getY()&&S.getBottom()>=E.getBottom()&&(_[1]+=Math.min(E.getY()-S.getY(),S.getBottom()-E.getBottom()));var R=Math.abs((S.getCenterY()-E.getCenterY())/(S.getCenterX()-E.getCenterX()));S.getCenterY()===E.getCenterY()&&S.getCenterX()===E.getCenterX()&&(R=1);var B=R*_[0],z=_[1]/R;_[0]<z?z=_[0]:B=_[1],_[0]=-1*F[0]*(z/2+M),_[1]=-1*F[1]*(B/2+M)},b.decideDirectionsForOverlappingNodes=function(E,S,_){E.getCenterX()<S.getCenterX()?_[0]=-1:_[0]=1,E.getCenterY()<S.getCenterY()?_[1]=-1:_[1]=1},b.getIntersection2=function(E,S,_){var M=E.getCenterX(),F=E.getCenterY(),R=S.getCenterX(),B=S.getCenterY();if(E.intersects(S))return _[0]=M,_[1]=F,_[2]=R,_[3]=B,!0;var z=E.getX(),Y=E.getY(),nt=E.getRight(),ot=E.getX(),ft=E.getBottom(),wt=E.getRight(),mt=E.getWidthHalf(),ct=E.getHeightHalf(),rt=S.getX(),it=S.getY(),gt=S.getRight(),Q=S.getX(),dt=S.getBottom(),K=S.getRight(),yt=S.getWidthHalf(),V=S.getHeightHalf(),Ot=!1,It=!1;if(M===R){if(F>B)return _[0]=M,_[1]=Y,_[2]=R,_[3]=dt,!1;if(F<B)return _[0]=M,_[1]=ft,_[2]=R,_[3]=it,!1}else if(F===B){if(M>R)return _[0]=z,_[1]=F,_[2]=gt,_[3]=B,!1;if(M<R)return _[0]=nt,_[1]=F,_[2]=rt,_[3]=B,!1}else{var jt=E.height/E.width,xt=S.height/S.width,Ft=(B-F)/(R-M),Ct=void 0,kt=void 0,Gt=void 0,Fe=void 0,Mt=void 0,pn=void 0;if(-jt===Ft?M>R?(_[0]=ot,_[1]=ft,Ot=!0):(_[0]=nt,_[1]=Y,Ot=!0):jt===Ft&&(M>R?(_[0]=z,_[1]=Y,Ot=!0):(_[0]=wt,_[1]=ft,Ot=!0)),-xt===Ft?R>M?(_[2]=Q,_[3]=dt,It=!0):(_[2]=gt,_[3]=it,It=!0):xt===Ft&&(R>M?(_[2]=rt,_[3]=it,It=!0):(_[2]=K,_[3]=dt,It=!0)),Ot&&It)return!1;if(M>R?F>B?(Ct=this.getCardinalDirection(jt,Ft,4),kt=this.getCardinalDirection(xt,Ft,2)):(Ct=this.getCardinalDirection(-jt,Ft,3),kt=this.getCardinalDirection(-xt,Ft,1)):F>B?(Ct=this.getCardinalDirection(-jt,Ft,1),kt=this.getCardinalDirection(-xt,Ft,3)):(Ct=this.getCardinalDirection(jt,Ft,2),kt=this.getCardinalDirection(xt,Ft,4)),!Ot)switch(Ct){case 1:Fe=Y,Gt=M+-ct/Ft,_[0]=Gt,_[1]=Fe;break;case 2:Gt=wt,Fe=F+mt*Ft,_[0]=Gt,_[1]=Fe;break;case 3:Fe=ft,Gt=M+ct/Ft,_[0]=Gt,_[1]=Fe;break;case 4:Gt=ot,Fe=F+-mt*Ft,_[0]=Gt,_[1]=Fe;break}if(!It)switch(kt){case 1:pn=it,Mt=R+-V/Ft,_[2]=Mt,_[3]=pn;break;case 2:Mt=K,pn=B+yt*Ft,_[2]=Mt,_[3]=pn;break;case 3:pn=dt,Mt=R+V/Ft,_[2]=Mt,_[3]=pn;break;case 4:Mt=Q,pn=B+-yt*Ft,_[2]=Mt,_[3]=pn;break}}return!1},b.getCardinalDirection=function(E,S,_){return E>S?_:1+_%4},b.getIntersection=function(E,S,_,M){if(M==null)return this.getIntersection2(E,S,_);var F=E.x,R=E.y,B=S.x,z=S.y,Y=_.x,nt=_.y,ot=M.x,ft=M.y,wt=void 0,mt=void 0,ct=void 0,rt=void 0,it=void 0,gt=void 0,Q=void 0,dt=void 0,K=void 0;return ct=z-R,it=F-B,Q=B*R-F*z,rt=ft-nt,gt=Y-ot,dt=ot*nt-Y*ft,K=ct*gt-rt*it,K===0?null:(wt=(it*dt-gt*Q)/K,mt=(rt*Q-ct*dt)/K,new v(wt,mt))},b.angleOfVector=function(E,S,_,M){var F=void 0;return E!==_?(F=Math.atan((M-S)/(_-E)),_<E?F+=Math.PI:M<S&&(F+=this.TWO_PI)):M<S?F=this.ONE_AND_HALF_PI:F=this.HALF_PI,F},b.doIntersect=function(E,S,_,M){var F=E.x,R=E.y,B=S.x,z=S.y,Y=_.x,nt=_.y,ot=M.x,ft=M.y,wt=(B-F)*(ft-nt)-(ot-Y)*(z-R);if(wt===0)return!1;var mt=((ft-nt)*(ot-F)+(Y-ot)*(ft-R))/wt,ct=((R-z)*(ot-F)+(B-F)*(ft-R))/wt;return 0<mt&&mt<1&&0<ct&&ct<1},b.HALF_PI=.5*Math.PI,b.ONE_AND_HALF_PI=1.5*Math.PI,b.TWO_PI=2*Math.PI,b.THREE_PI=3*Math.PI,f.exports=b},function(f,g,w){function v(){}v.sign=function(b){return b>0?1:b<0?-1:0},v.floor=function(b){return b<0?Math.ceil(b):Math.floor(b)},v.ceil=function(b){return b<0?Math.floor(b):Math.ceil(b)},f.exports=v},function(f,g,w){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,f.exports=v},function(f,g,w){var v=function(){function F(R,B){for(var z=0;z<B.length;z++){var Y=B[z];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(R,Y.key,Y)}}return function(R,B,z){return B&&F(R.prototype,B),z&&F(R,z),R}}();function b(F,R){if(!(F instanceof R))throw new TypeError("Cannot call a class as a function")}var E=function(R){return{value:R,next:null,prev:null}},S=function(R,B,z,Y){return R!==null?R.next=B:Y.head=B,z!==null?z.prev=B:Y.tail=B,B.prev=R,B.next=z,Y.length++,B},_=function(R,B){var z=R.prev,Y=R.next;return z!==null?z.next=Y:B.head=Y,Y!==null?Y.prev=z:B.tail=z,R.prev=R.next=null,B.length--,R},M=function(){function F(R){var B=this;b(this,F),this.length=0,this.head=null,this.tail=null,R!=null&&R.forEach(function(z){return B.push(z)})}return v(F,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(B,z){return S(z.prev,E(B),z,this)}},{key:"insertAfter",value:function(B,z){return S(z,E(B),z.next,this)}},{key:"insertNodeBefore",value:function(B,z){return S(z.prev,B,z,this)}},{key:"insertNodeAfter",value:function(B,z){return S(z,B,z.next,this)}},{key:"push",value:function(B){return S(this.tail,E(B),null,this)}},{key:"unshift",value:function(B){return S(null,E(B),this.head,this)}},{key:"remove",value:function(B){return _(B,this)}},{key:"pop",value:function(){return _(this.tail,this).value}},{key:"popNode",value:function(){return _(this.tail,this)}},{key:"shift",value:function(){return _(this.head,this).value}},{key:"shiftNode",value:function(){return _(this.head,this)}},{key:"get_object_at",value:function(B){if(B<=this.length()){for(var z=1,Y=this.head;z<B;)Y=Y.next,z++;return Y.value}}},{key:"set_object_at",value:function(B,z){if(B<=this.length()){for(var Y=1,nt=this.head;Y<B;)nt=nt.next,Y++;nt.value=z}}}]),F}();f.exports=M},function(f,g,w){function v(b,E,S){this.x=null,this.y=null,b==null&&E==null&&S==null?(this.x=0,this.y=0):typeof b=="number"&&typeof E=="number"&&S==null?(this.x=b,this.y=E):b.constructor.name=="Point"&&E==null&&S==null&&(S=b,this.x=S.x,this.y=S.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(b,E,S){b.constructor.name=="Point"&&E==null&&S==null?(S=b,this.setLocation(S.x,S.y)):typeof b=="number"&&typeof E=="number"&&S==null&&(parseInt(b)==b&&parseInt(E)==E?this.move(b,E):(this.x=Math.floor(b+.5),this.y=Math.floor(E+.5)))},v.prototype.move=function(b,E){this.x=b,this.y=E},v.prototype.translate=function(b,E){this.x+=b,this.y+=E},v.prototype.equals=function(b){if(b.constructor.name=="Point"){var E=b;return this.x==E.x&&this.y==E.y}return this==b},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},f.exports=v},function(f,g,w){function v(b,E,S,_){this.x=0,this.y=0,this.width=0,this.height=0,b!=null&&E!=null&&S!=null&&_!=null&&(this.x=b,this.y=E,this.width=S,this.height=_)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(b){this.x=b},v.prototype.getY=function(){return this.y},v.prototype.setY=function(b){this.y=b},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(b){this.width=b},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(b){this.height=b},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(b){return!(this.getRight()<b.x||this.getBottom()<b.y||b.getRight()<this.x||b.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},f.exports=v},function(f,g,w){var v=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};function b(){}b.lastID=0,b.createID=function(E){return b.isPrimitive(E)?E:(E.uniqueID!=null||(E.uniqueID=b.getString(),b.lastID++),E.uniqueID)},b.getString=function(E){return E==null&&(E=b.lastID),"Object#"+E},b.isPrimitive=function(E){var S=typeof E>"u"?"undefined":v(E);return E==null||S!="object"&&S!="function"},f.exports=b},function(f,g,w){function v(Y){if(Array.isArray(Y)){for(var nt=0,ot=Array(Y.length);nt<Y.length;nt++)ot[nt]=Y[nt];return ot}else return Array.from(Y)}var b=w(0),E=w(6),S=w(3),_=w(1),M=w(5),F=w(4),R=w(17),B=w(27);function z(Y){B.call(this),this.layoutQuality=b.QUALITY,this.createBendsAsNeeded=b.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=b.DEFAULT_INCREMENTAL,this.animationOnLayout=b.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=b.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=b.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=b.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new E(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,Y!=null&&(this.isRemoteUse=Y)}z.RANDOM_SEED=1,z.prototype=Object.create(B.prototype),z.prototype.getGraphManager=function(){return this.graphManager},z.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},z.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},z.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},z.prototype.newGraphManager=function(){var Y=new E(this);return this.graphManager=Y,Y},z.prototype.newGraph=function(Y){return new M(null,this.graphManager,Y)},z.prototype.newNode=function(Y){return new S(this.graphManager,Y)},z.prototype.newEdge=function(Y){return new _(null,null,Y)},z.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},z.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var Y;return this.checkLayoutSuccess()?Y=!1:Y=this.layout(),b.ANIMATE==="during"?!1:(Y&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,Y)},z.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},z.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var Y=this.graphManager.getAllEdges(),nt=0;nt<Y.length;nt++)Y[nt];for(var ot=this.graphManager.getRoot().getNodes(),nt=0;nt<ot.length;nt++)ot[nt];this.update(this.graphManager.getRoot())}},z.prototype.update=function(Y){if(Y==null)this.update2();else if(Y instanceof S){var nt=Y;if(nt.getChild()!=null)for(var ot=nt.getChild().getNodes(),ft=0;ft<ot.length;ft++)update(ot[ft]);if(nt.vGraphObject!=null){var wt=nt.vGraphObject;wt.update(nt)}}else if(Y instanceof _){var mt=Y;if(mt.vGraphObject!=null){var ct=mt.vGraphObject;ct.update(mt)}}else if(Y instanceof M){var rt=Y;if(rt.vGraphObject!=null){var it=rt.vGraphObject;it.update(rt)}}},z.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=b.QUALITY,this.animationDuringLayout=b.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=b.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=b.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=b.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=b.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=b.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},z.prototype.transform=function(Y){if(Y==null)this.transform(new F(0,0));else{var nt=new R,ot=this.graphManager.getRoot().updateLeftTop();if(ot!=null){nt.setWorldOrgX(Y.x),nt.setWorldOrgY(Y.y),nt.setDeviceOrgX(ot.x),nt.setDeviceOrgY(ot.y);for(var ft=this.getAllNodes(),wt,mt=0;mt<ft.length;mt++)wt=ft[mt],wt.transform(nt)}}},z.prototype.positionNodesRandomly=function(Y){if(Y==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var nt,ot,ft=Y.getNodes(),wt=0;wt<ft.length;wt++)nt=ft[wt],ot=nt.getChild(),ot==null||ot.getNodes().length==0?nt.scatter():(this.positionNodesRandomly(ot),nt.updateBounds())},z.prototype.getFlatForest=function(){for(var Y=[],nt=!0,ot=this.graphManager.getRoot().getNodes(),ft=!0,wt=0;wt<ot.length;wt++)ot[wt].getChild()!=null&&(ft=!1);if(!ft)return Y;var mt=new Set,ct=[],rt=new Map,it=[];for(it=it.concat(ot);it.length>0&&nt;){for(ct.push(it[0]);ct.length>0&&nt;){var gt=ct[0];ct.splice(0,1),mt.add(gt);for(var Q=gt.getEdges(),wt=0;wt<Q.length;wt++){var dt=Q[wt].getOtherEnd(gt);if(rt.get(gt)!=dt)if(!mt.has(dt))ct.push(dt),rt.set(dt,gt);else{nt=!1;break}}}if(!nt)Y=[];else{var K=[].concat(v(mt));Y.push(K);for(var wt=0;wt<K.length;wt++){var yt=K[wt],V=it.indexOf(yt);V>-1&&it.splice(V,1)}mt=new Set,rt=new Map}}return Y},z.prototype.createDummyNodesForBendpoints=function(Y){for(var nt=[],ot=Y.source,ft=this.graphManager.calcLowestCommonAncestor(Y.source,Y.target),wt=0;wt<Y.bendpoints.length;wt++){var mt=this.newNode(null);mt.setRect(new Point(0,0),new Dimension(1,1)),ft.add(mt);var ct=this.newEdge(null);this.graphManager.add(ct,ot,mt),nt.add(mt),ot=mt}var ct=this.newEdge(null);return this.graphManager.add(ct,ot,Y.target),this.edgeToDummyNodes.set(Y,nt),Y.isInterGraph()?this.graphManager.remove(Y):ft.remove(Y),nt},z.prototype.createBendpointsFromDummyNodes=function(){var Y=[];Y=Y.concat(this.graphManager.getAllEdges()),Y=[].concat(v(this.edgeToDummyNodes.keys())).concat(Y);for(var nt=0;nt<Y.length;nt++){var ot=Y[nt];if(ot.bendpoints.length>0){for(var ft=this.edgeToDummyNodes.get(ot),wt=0;wt<ft.length;wt++){var mt=ft[wt],ct=new F(mt.getCenterX(),mt.getCenterY()),rt=ot.bendpoints.get(wt);rt.x=ct.x,rt.y=ct.y,mt.getOwner().remove(mt)}this.graphManager.add(ot,ot.source,ot.target)}}},z.transform=function(Y,nt,ot,ft){if(ot!=null&&ft!=null){var wt=nt;if(Y<=50){var mt=nt/ot;wt-=(nt-mt)/50*(50-Y)}else{var ct=nt*ft;wt+=(ct-nt)/50*(Y-50)}return wt}else{var rt,it;return Y<=50?(rt=9*nt/500,it=nt/10):(rt=9*nt/50,it=-8*nt),rt*Y+it}},z.findCenterOfTree=function(Y){var nt=[];nt=nt.concat(Y);var ot=[],ft=new Map,wt=!1,mt=null;(nt.length==1||nt.length==2)&&(wt=!0,mt=nt[0]);for(var ct=0;ct<nt.length;ct++){var rt=nt[ct],it=rt.getNeighborsList().size;ft.set(rt,rt.getNeighborsList().size),it==1&&ot.push(rt)}var gt=[];for(gt=gt.concat(ot);!wt;){var Q=[];Q=Q.concat(gt),gt=[];for(var ct=0;ct<nt.length;ct++){var rt=nt[ct],dt=nt.indexOf(rt);dt>=0&&nt.splice(dt,1);var K=rt.getNeighborsList();K.forEach(function(Ot){if(ot.indexOf(Ot)<0){var It=ft.get(Ot),jt=It-1;jt==1&&gt.push(Ot),ft.set(Ot,jt)}})}ot=ot.concat(gt),(nt.length==1||nt.length==2)&&(wt=!0,mt=nt[0])}return mt},z.prototype.setGraphManager=function(Y){this.graphManager=Y},f.exports=z},function(f,g,w){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},f.exports=v},function(f,g,w){var v=w(4);function b(E,S){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}b.prototype.getWorldOrgX=function(){return this.lworldOrgX},b.prototype.setWorldOrgX=function(E){this.lworldOrgX=E},b.prototype.getWorldOrgY=function(){return this.lworldOrgY},b.prototype.setWorldOrgY=function(E){this.lworldOrgY=E},b.prototype.getWorldExtX=function(){return this.lworldExtX},b.prototype.setWorldExtX=function(E){this.lworldExtX=E},b.prototype.getWorldExtY=function(){return this.lworldExtY},b.prototype.setWorldExtY=function(E){this.lworldExtY=E},b.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},b.prototype.setDeviceOrgX=function(E){this.ldeviceOrgX=E},b.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},b.prototype.setDeviceOrgY=function(E){this.ldeviceOrgY=E},b.prototype.getDeviceExtX=function(){return this.ldeviceExtX},b.prototype.setDeviceExtX=function(E){this.ldeviceExtX=E},b.prototype.getDeviceExtY=function(){return this.ldeviceExtY},b.prototype.setDeviceExtY=function(E){this.ldeviceExtY=E},b.prototype.transformX=function(E){var S=0,_=this.lworldExtX;return _!=0&&(S=this.ldeviceOrgX+(E-this.lworldOrgX)*this.ldeviceExtX/_),S},b.prototype.transformY=function(E){var S=0,_=this.lworldExtY;return _!=0&&(S=this.ldeviceOrgY+(E-this.lworldOrgY)*this.ldeviceExtY/_),S},b.prototype.inverseTransformX=function(E){var S=0,_=this.ldeviceExtX;return _!=0&&(S=this.lworldOrgX+(E-this.ldeviceOrgX)*this.lworldExtX/_),S},b.prototype.inverseTransformY=function(E){var S=0,_=this.ldeviceExtY;return _!=0&&(S=this.lworldOrgY+(E-this.ldeviceOrgY)*this.lworldExtY/_),S},b.prototype.inverseTransformPoint=function(E){var S=new v(this.inverseTransformX(E.x),this.inverseTransformY(E.y));return S},f.exports=b},function(f,g,w){function v(B){if(Array.isArray(B)){for(var z=0,Y=Array(B.length);z<B.length;z++)Y[z]=B[z];return Y}else return Array.from(B)}var b=w(15),E=w(7),S=w(0),_=w(8),M=w(9);function F(){b.call(this),this.useSmartIdealEdgeLengthCalculation=E.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=E.DEFAULT_EDGE_LENGTH,this.springConstant=E.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=E.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=E.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=E.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=E.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=E.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*E.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=E.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=E.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=E.MAX_ITERATIONS}F.prototype=Object.create(b.prototype);for(var R in b)F[R]=b[R];F.prototype.initParameters=function(){b.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=E.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},F.prototype.calcIdealEdgeLengths=function(){for(var B,z,Y,nt,ot,ft,wt=this.getGraphManager().getAllEdges(),mt=0;mt<wt.length;mt++)B=wt[mt],B.idealLength=this.idealEdgeLength,B.isInterGraph&&(Y=B.getSource(),nt=B.getTarget(),ot=B.getSourceInLca().getEstimatedSize(),ft=B.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(B.idealLength+=ot+ft-2*S.SIMPLE_NODE_SIZE),z=B.getLca().getInclusionTreeDepth(),B.idealLength+=E.DEFAULT_EDGE_LENGTH*E.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(Y.getInclusionTreeDepth()+nt.getInclusionTreeDepth()-2*z))},F.prototype.initSpringEmbedder=function(){var B=this.getAllNodes().length;this.incremental?(B>E.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*E.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(B-E.ADAPTATION_LOWER_NODE_LIMIT)/(E.ADAPTATION_UPPER_NODE_LIMIT-E.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-E.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=E.MAX_NODE_DISPLACEMENT_INCREMENTAL):(B>E.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(E.COOLING_ADAPTATION_FACTOR,1-(B-E.ADAPTATION_LOWER_NODE_LIMIT)/(E.ADAPTATION_UPPER_NODE_LIMIT-E.ADAPTATION_LOWER_NODE_LIMIT)*(1-E.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=E.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},F.prototype.calcSpringForces=function(){for(var B=this.getAllEdges(),z,Y=0;Y<B.length;Y++)z=B[Y],this.calcSpringForce(z,z.idealLength)},F.prototype.calcRepulsionForces=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Y,nt,ot,ft,wt=this.getAllNodes(),mt;if(this.useFRGridVariant)for(this.totalIterations%E.GRID_CALCULATION_CHECK_PERIOD==1&&B&&this.updateGrid(),mt=new Set,Y=0;Y<wt.length;Y++)ot=wt[Y],this.calculateRepulsionForceOfANode(ot,mt,B,z),mt.add(ot);else for(Y=0;Y<wt.length;Y++)for(ot=wt[Y],nt=Y+1;nt<wt.length;nt++)ft=wt[nt],ot.getOwner()==ft.getOwner()&&this.calcRepulsionForce(ot,ft)},F.prototype.calcGravitationalForces=function(){for(var B,z=this.getAllNodesToApplyGravitation(),Y=0;Y<z.length;Y++)B=z[Y],this.calcGravitationalForce(B)},F.prototype.moveNodes=function(){for(var B=this.getAllNodes(),z,Y=0;Y<B.length;Y++)z=B[Y],z.move()},F.prototype.calcSpringForce=function(B,z){var Y=B.getSource(),nt=B.getTarget(),ot,ft,wt,mt;if(this.uniformLeafNodeSizes&&Y.getChild()==null&&nt.getChild()==null)B.updateLengthSimple();else if(B.updateLength(),B.isOverlapingSourceAndTarget)return;ot=B.getLength(),ot!=0&&(ft=this.springConstant*(ot-z),wt=ft*(B.lengthX/ot),mt=ft*(B.lengthY/ot),Y.springForceX+=wt,Y.springForceY+=mt,nt.springForceX-=wt,nt.springForceY-=mt)},F.prototype.calcRepulsionForce=function(B,z){var Y=B.getRect(),nt=z.getRect(),ot=new Array(2),ft=new Array(4),wt,mt,ct,rt,it,gt,Q;if(Y.intersects(nt)){_.calcSeparationAmount(Y,nt,ot,E.DEFAULT_EDGE_LENGTH/2),gt=2*ot[0],Q=2*ot[1];var dt=B.noOfChildren*z.noOfChildren/(B.noOfChildren+z.noOfChildren);B.repulsionForceX-=dt*gt,B.repulsionForceY-=dt*Q,z.repulsionForceX+=dt*gt,z.repulsionForceY+=dt*Q}else this.uniformLeafNodeSizes&&B.getChild()==null&&z.getChild()==null?(wt=nt.getCenterX()-Y.getCenterX(),mt=nt.getCenterY()-Y.getCenterY()):(_.getIntersection(Y,nt,ft),wt=ft[2]-ft[0],mt=ft[3]-ft[1]),Math.abs(wt)<E.MIN_REPULSION_DIST&&(wt=M.sign(wt)*E.MIN_REPULSION_DIST),Math.abs(mt)<E.MIN_REPULSION_DIST&&(mt=M.sign(mt)*E.MIN_REPULSION_DIST),ct=wt*wt+mt*mt,rt=Math.sqrt(ct),it=this.repulsionConstant*B.noOfChildren*z.noOfChildren/ct,gt=it*wt/rt,Q=it*mt/rt,B.repulsionForceX-=gt,B.repulsionForceY-=Q,z.repulsionForceX+=gt,z.repulsionForceY+=Q},F.prototype.calcGravitationalForce=function(B){var z,Y,nt,ot,ft,wt,mt,ct;z=B.getOwner(),Y=(z.getRight()+z.getLeft())/2,nt=(z.getTop()+z.getBottom())/2,ot=B.getCenterX()-Y,ft=B.getCenterY()-nt,wt=Math.abs(ot)+B.getWidth()/2,mt=Math.abs(ft)+B.getHeight()/2,B.getOwner()==this.graphManager.getRoot()?(ct=z.getEstimatedSize()*this.gravityRangeFactor,(wt>ct||mt>ct)&&(B.gravitationForceX=-this.gravityConstant*ot,B.gravitationForceY=-this.gravityConstant*ft)):(ct=z.getEstimatedSize()*this.compoundGravityRangeFactor,(wt>ct||mt>ct)&&(B.gravitationForceX=-this.gravityConstant*ot*this.compoundGravityConstant,B.gravitationForceY=-this.gravityConstant*ft*this.compoundGravityConstant))},F.prototype.isConverged=function(){var B,z=!1;return this.totalIterations>this.maxIterations/3&&(z=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),B=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,B||z},F.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},F.prototype.calcNoOfChildrenForAllNodes=function(){for(var B,z=this.graphManager.getAllNodes(),Y=0;Y<z.length;Y++)B=z[Y],B.noOfChildren=B.getNoOfChildren()},F.prototype.calcGrid=function(B){var z=0,Y=0;z=parseInt(Math.ceil((B.getRight()-B.getLeft())/this.repulsionRange)),Y=parseInt(Math.ceil((B.getBottom()-B.getTop())/this.repulsionRange));for(var nt=new Array(z),ot=0;ot<z;ot++)nt[ot]=new Array(Y);for(var ot=0;ot<z;ot++)for(var ft=0;ft<Y;ft++)nt[ot][ft]=new Array;return nt},F.prototype.addNodeToGrid=function(B,z,Y){var nt=0,ot=0,ft=0,wt=0;nt=parseInt(Math.floor((B.getRect().x-z)/this.repulsionRange)),ot=parseInt(Math.floor((B.getRect().width+B.getRect().x-z)/this.repulsionRange)),ft=parseInt(Math.floor((B.getRect().y-Y)/this.repulsionRange)),wt=parseInt(Math.floor((B.getRect().height+B.getRect().y-Y)/this.repulsionRange));for(var mt=nt;mt<=ot;mt++)for(var ct=ft;ct<=wt;ct++)this.grid[mt][ct].push(B),B.setGridCoordinates(nt,ot,ft,wt)},F.prototype.updateGrid=function(){var B,z,Y=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),B=0;B<Y.length;B++)z=Y[B],this.addNodeToGrid(z,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},F.prototype.calculateRepulsionForceOfANode=function(B,z,Y,nt){if(this.totalIterations%E.GRID_CALCULATION_CHECK_PERIOD==1&&Y||nt){var ot=new Set;B.surrounding=new Array;for(var ft,wt=this.grid,mt=B.startX-1;mt<B.finishX+2;mt++)for(var ct=B.startY-1;ct<B.finishY+2;ct++)if(!(mt<0||ct<0||mt>=wt.length||ct>=wt[0].length)){for(var rt=0;rt<wt[mt][ct].length;rt++)if(ft=wt[mt][ct][rt],!(B.getOwner()!=ft.getOwner()||B==ft)&&!z.has(ft)&&!ot.has(ft)){var it=Math.abs(B.getCenterX()-ft.getCenterX())-(B.getWidth()/2+ft.getWidth()/2),gt=Math.abs(B.getCenterY()-ft.getCenterY())-(B.getHeight()/2+ft.getHeight()/2);it<=this.repulsionRange&&gt<=this.repulsionRange&&ot.add(ft)}}B.surrounding=[].concat(v(ot))}for(mt=0;mt<B.surrounding.length;mt++)this.calcRepulsionForce(B,B.surrounding[mt])},F.prototype.calcRepulsionRange=function(){return 0},f.exports=F},function(f,g,w){var v=w(1),b=w(7);function E(_,M,F){v.call(this,_,M,F),this.idealLength=b.DEFAULT_EDGE_LENGTH}E.prototype=Object.create(v.prototype);for(var S in v)E[S]=v[S];f.exports=E},function(f,g,w){var v=w(3);function b(S,_,M,F){v.call(this,S,_,M,F),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=[]}b.prototype=Object.create(v.prototype);for(var E in v)b[E]=v[E];b.prototype.setGridCoordinates=function(S,_,M,F){this.startX=S,this.finishX=_,this.startY=M,this.finishY=F},f.exports=b},function(f,g,w){function v(b,E){this.width=0,this.height=0,b!==null&&E!==null&&(this.height=E,this.width=b)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(b){this.width=b},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(b){this.height=b},f.exports=v},function(f,g,w){var v=w(14);function b(){this.map={},this.keys=[]}b.prototype.put=function(E,S){var _=v.createID(E);this.contains(_)||(this.map[_]=S,this.keys.push(E))},b.prototype.contains=function(E){return v.createID(E),this.map[E]!=null},b.prototype.get=function(E){var S=v.createID(E);return this.map[S]},b.prototype.keySet=function(){return this.keys},f.exports=b},function(f,g,w){var v=w(14);function b(){this.set={}}b.prototype.add=function(E){var S=v.createID(E);this.contains(S)||(this.set[S]=E)},b.prototype.remove=function(E){delete this.set[v.createID(E)]},b.prototype.clear=function(){this.set={}},b.prototype.contains=function(E){return this.set[v.createID(E)]==E},b.prototype.isEmpty=function(){return this.size()===0},b.prototype.size=function(){return Object.keys(this.set).length},b.prototype.addAllTo=function(E){for(var S=Object.keys(this.set),_=S.length,M=0;M<_;M++)E.push(this.set[S[M]])},b.prototype.size=function(){return Object.keys(this.set).length},b.prototype.addAll=function(E){for(var S=E.length,_=0;_<S;_++){var M=E[_];this.add(M)}},f.exports=b},function(f,g,w){var v=function(){function _(M,F){for(var R=0;R<F.length;R++){var B=F[R];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(M,B.key,B)}}return function(M,F,R){return F&&_(M.prototype,F),R&&_(M,R),M}}();function b(_,M){if(!(_ instanceof M))throw new TypeError("Cannot call a class as a function")}var E=w(11),S=function(){function _(M,F){b(this,_),(F!==null||F!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var R=void 0;M instanceof E?R=M.size():R=M.length,this._quicksort(M,0,R-1)}return v(_,[{key:"_quicksort",value:function(F,R,B){if(R<B){var z=this._partition(F,R,B);this._quicksort(F,R,z),this._quicksort(F,z+1,B)}}},{key:"_partition",value:function(F,R,B){for(var z=this._get(F,R),Y=R,nt=B;;){for(;this.compareFunction(z,this._get(F,nt));)nt--;for(;this.compareFunction(this._get(F,Y),z);)Y++;if(Y<nt)this._swap(F,Y,nt),Y++,nt--;else return nt}}},{key:"_get",value:function(F,R){return F instanceof E?F.get_object_at(R):F[R]}},{key:"_set",value:function(F,R,B){F instanceof E?F.set_object_at(R,B):F[R]=B}},{key:"_swap",value:function(F,R,B){var z=this._get(F,R);this._set(F,R,this._get(F,B)),this._set(F,B,z)}},{key:"_defaultCompareFunction",value:function(F,R){return R>F}}]),_}();f.exports=S},function(f,g,w){var v=function(){function S(_,M){for(var F=0;F<M.length;F++){var R=M[F];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(_,R.key,R)}}return function(_,M,F){return M&&S(_.prototype,M),F&&S(_,F),_}}();function b(S,_){if(!(S instanceof _))throw new TypeError("Cannot call a class as a function")}var E=function(){function S(_,M){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;b(this,S),this.sequence1=_,this.sequence2=M,this.match_score=F,this.mismatch_penalty=R,this.gap_penalty=B,this.iMax=_.length+1,this.jMax=M.length+1,this.grid=new Array(this.iMax);for(var z=0;z<this.iMax;z++){this.grid[z]=new Array(this.jMax);for(var Y=0;Y<this.jMax;Y++)this.grid[z][Y]=0}this.tracebackGrid=new Array(this.iMax);for(var nt=0;nt<this.iMax;nt++){this.tracebackGrid[nt]=new Array(this.jMax);for(var ot=0;ot<this.jMax;ot++)this.tracebackGrid[nt][ot]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(S,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var M=1;M<this.jMax;M++)this.grid[0][M]=this.grid[0][M-1]+this.gap_penalty,this.tracebackGrid[0][M]=[!1,!1,!0];for(var F=1;F<this.iMax;F++)this.grid[F][0]=this.grid[F-1][0]+this.gap_penalty,this.tracebackGrid[F][0]=[!1,!0,!1];for(var R=1;R<this.iMax;R++)for(var B=1;B<this.jMax;B++){var z=void 0;this.sequence1[R-1]===this.sequence2[B-1]?z=this.grid[R-1][B-1]+this.match_score:z=this.grid[R-1][B-1]+this.mismatch_penalty;var Y=this.grid[R-1][B]+this.gap_penalty,nt=this.grid[R][B-1]+this.gap_penalty,ot=[z,Y,nt],ft=this.arrayAllMaxIndexes(ot);this.grid[R][B]=ot[ft[0]],this.tracebackGrid[R][B]=[ft.includes(0),ft.includes(1),ft.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var M=[];for(M.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});M[0];){var F=M[0],R=this.tracebackGrid[F.pos[0]][F.pos[1]];R[0]&&M.push({pos:[F.pos[0]-1,F.pos[1]-1],seq1:this.sequence1[F.pos[0]-1]+F.seq1,seq2:this.sequence2[F.pos[1]-1]+F.seq2}),R[1]&&M.push({pos:[F.pos[0]-1,F.pos[1]],seq1:this.sequence1[F.pos[0]-1]+F.seq1,seq2:"-"+F.seq2}),R[2]&&M.push({pos:[F.pos[0],F.pos[1]-1],seq1:"-"+F.seq1,seq2:this.sequence2[F.pos[1]-1]+F.seq2}),F.pos[0]===0&&F.pos[1]===0&&this.alignments.push({sequence1:F.seq1,sequence2:F.seq2}),M.shift()}return this.alignments}},{key:"getAllIndexes",value:function(M,F){for(var R=[],B=-1;(B=M.indexOf(F,B+1))!==-1;)R.push(B);return R}},{key:"arrayAllMaxIndexes",value:function(M){return this.getAllIndexes(M,Math.max.apply(null,M))}}]),S}();f.exports=E},function(f,g,w){var v=function(){};v.FDLayout=w(18),v.FDLayoutConstants=w(7),v.FDLayoutEdge=w(19),v.FDLayoutNode=w(20),v.DimensionD=w(21),v.HashMap=w(22),v.HashSet=w(23),v.IGeometry=w(8),v.IMath=w(9),v.Integer=w(10),v.Point=w(12),v.PointD=w(4),v.RandomSeed=w(16),v.RectangleD=w(13),v.Transform=w(17),v.UniqueIDGeneretor=w(14),v.Quicksort=w(24),v.LinkedList=w(11),v.LGraphObject=w(2),v.LGraph=w(5),v.LEdge=w(1),v.LGraphManager=w(6),v.LNode=w(3),v.Layout=w(15),v.LayoutConstants=w(0),v.NeedlemanWunsch=w(25),f.exports=v},function(f,g,w){function v(){this.listeners=[]}var b=v.prototype;b.addListener=function(E,S){this.listeners.push({event:E,callback:S})},b.removeListener=function(E,S){for(var _=this.listeners.length;_>=0;_--){var M=this.listeners[_];M.event===E&&M.callback===S&&this.listeners.splice(_,1)}},b.emit=function(E,S){for(var _=0;_<this.listeners.length;_++){var M=this.listeners[_];E===M.event&&M.callback(S)}},f.exports=v}])})}(b2t)),b2t.exports}var XHt;function ren(){return XHt||(XHt=1,function(i,a){(function(g,w){i.exports=w(nen())})(Z0,function(f){return function(g){var w={};function v(b){if(w[b])return w[b].exports;var E=w[b]={i:b,l:!1,exports:{}};return g[b].call(E.exports,E,E.exports,v),E.l=!0,E.exports}return v.m=g,v.c=w,v.i=function(b){return b},v.d=function(b,E,S){v.o(b,E)||Object.defineProperty(b,E,{configurable:!1,enumerable:!0,get:S})},v.n=function(b){var E=b&&b.__esModule?function(){return b.default}:function(){return b};return v.d(E,"a",E),E},v.o=function(b,E){return Object.prototype.hasOwnProperty.call(b,E)},v.p="",v(v.s=7)}([function(g,w){g.exports=f},function(g,w,v){var b=v(0).FDLayoutConstants;function E(){}for(var S in b)E[S]=b[S];E.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,E.DEFAULT_RADIAL_SEPARATION=b.DEFAULT_EDGE_LENGTH,E.DEFAULT_COMPONENT_SEPERATION=60,E.TILE=!0,E.TILING_PADDING_VERTICAL=10,E.TILING_PADDING_HORIZONTAL=10,E.TREE_REDUCTION_ON_INCREMENTAL=!1,g.exports=E},function(g,w,v){var b=v(0).FDLayoutEdge;function E(_,M,F){b.call(this,_,M,F)}E.prototype=Object.create(b.prototype);for(var S in b)E[S]=b[S];g.exports=E},function(g,w,v){var b=v(0).LGraph;function E(_,M,F){b.call(this,_,M,F)}E.prototype=Object.create(b.prototype);for(var S in b)E[S]=b[S];g.exports=E},function(g,w,v){var b=v(0).LGraphManager;function E(_){b.call(this,_)}E.prototype=Object.create(b.prototype);for(var S in b)E[S]=b[S];g.exports=E},function(g,w,v){var b=v(0).FDLayoutNode,E=v(0).IMath;function S(M,F,R,B){b.call(this,M,F,R,B)}S.prototype=Object.create(b.prototype);for(var _ in b)S[_]=b[_];S.prototype.move=function(){var M=this.graphManager.getLayout();this.displacementX=M.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=M.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>M.coolingFactor*M.maxNodeDisplacement&&(this.displacementX=M.coolingFactor*M.maxNodeDisplacement*E.sign(this.displacementX)),Math.abs(this.displacementY)>M.coolingFactor*M.maxNodeDisplacement&&(this.displacementY=M.coolingFactor*M.maxNodeDisplacement*E.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),M.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},S.prototype.propogateDisplacementToChildren=function(M,F){for(var R=this.getChild().getNodes(),B,z=0;z<R.length;z++)B=R[z],B.getChild()==null?(B.moveBy(M,F),B.displacementX+=M,B.displacementY+=F):B.propogateDisplacementToChildren(M,F)},S.prototype.setPred1=function(M){this.pred1=M},S.prototype.getPred1=function(){return pred1},S.prototype.getPred2=function(){return pred2},S.prototype.setNext=function(M){this.next=M},S.prototype.getNext=function(){return next},S.prototype.setProcessed=function(M){this.processed=M},S.prototype.isProcessed=function(){return processed},g.exports=S},function(g,w,v){var b=v(0).FDLayout,E=v(4),S=v(3),_=v(5),M=v(2),F=v(1),R=v(0).FDLayoutConstants,B=v(0).LayoutConstants,z=v(0).Point,Y=v(0).PointD,nt=v(0).Layout,ot=v(0).Integer,ft=v(0).IGeometry,wt=v(0).LGraph,mt=v(0).Transform;function ct(){b.call(this),this.toBeTiled={}}ct.prototype=Object.create(b.prototype);for(var rt in b)ct[rt]=b[rt];ct.prototype.newGraphManager=function(){var it=new E(this);return this.graphManager=it,it},ct.prototype.newGraph=function(it){return new S(null,this.graphManager,it)},ct.prototype.newNode=function(it){return new _(this.graphManager,it)},ct.prototype.newEdge=function(it){return new M(null,null,it)},ct.prototype.initParameters=function(){b.prototype.initParameters.call(this,arguments),this.isSubLayout||(F.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=F.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=F.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=R.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=R.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=R.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=R.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=R.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=R.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/R.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=R.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},ct.prototype.layout=function(){var it=B.DEFAULT_CREATE_BENDS_AS_NEEDED;return it&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},ct.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(F.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var gt=new Set(this.getAllNodes()),Q=this.nodesWithGravity.filter(function(yt){return gt.has(yt)});this.graphManager.setAllNodesToApplyGravitation(Q)}}else{var it=this.getFlatForest();if(it.length>0)this.positionNodesRadially(it);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var gt=new Set(this.getAllNodes()),Q=this.nodesWithGravity.filter(function(dt){return gt.has(dt)});this.graphManager.setAllNodesToApplyGravitation(Q),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},ct.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%R.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 it=new Set(this.getAllNodes()),gt=this.nodesWithGravity.filter(function(K){return it.has(K)});this.graphManager.setAllNodesToApplyGravitation(gt),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=R.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=R.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var Q=!this.isTreeGrowing&&!this.isGrowthFinished,dt=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(Q,dt),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},ct.prototype.getPositionsData=function(){for(var it=this.graphManager.getAllNodes(),gt={},Q=0;Q<it.length;Q++){var dt=it[Q].rect,K=it[Q].id;gt[K]={id:K,x:dt.getCenterX(),y:dt.getCenterY(),w:dt.width,h:dt.height}}return gt},ct.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var it=!1;if(R.ANIMATE==="during")this.emit("layoutstarted");else{for(;!it;)it=this.tick();this.graphManager.updateBounds()}},ct.prototype.calculateNodesToApplyGravitationTo=function(){var it=[],gt,Q=this.graphManager.getGraphs(),dt=Q.length,K;for(K=0;K<dt;K++)gt=Q[K],gt.updateConnected(),gt.isConnected||(it=it.concat(gt.getNodes()));return it},ct.prototype.createBendpoints=function(){var it=[];it=it.concat(this.graphManager.getAllEdges());var gt=new Set,Q;for(Q=0;Q<it.length;Q++){var dt=it[Q];if(!gt.has(dt)){var K=dt.getSource(),yt=dt.getTarget();if(K==yt)dt.getBendpoints().push(new Y),dt.getBendpoints().push(new Y),this.createDummyNodesForBendpoints(dt),gt.add(dt);else{var V=[];if(V=V.concat(K.getEdgeListToNode(yt)),V=V.concat(yt.getEdgeListToNode(K)),!gt.has(V[0])){if(V.length>1){var Ot;for(Ot=0;Ot<V.length;Ot++){var It=V[Ot];It.getBendpoints().push(new Y),this.createDummyNodesForBendpoints(It)}}V.forEach(function(jt){gt.add(jt)})}}}if(gt.size==it.length)break}},ct.prototype.positionNodesRadially=function(it){for(var gt=new z(0,0),Q=Math.ceil(Math.sqrt(it.length)),dt=0,K=0,yt=0,V=new Y(0,0),Ot=0;Ot<it.length;Ot++){Ot%Q==0&&(yt=0,K=dt,Ot!=0&&(K+=F.DEFAULT_COMPONENT_SEPERATION),dt=0);var It=it[Ot],jt=nt.findCenterOfTree(It);gt.x=yt,gt.y=K,V=ct.radialLayout(It,jt,gt),V.y>dt&&(dt=Math.floor(V.y)),yt=Math.floor(V.x+F.DEFAULT_COMPONENT_SEPERATION)}this.transform(new Y(B.WORLD_CENTER_X-V.x/2,B.WORLD_CENTER_Y-V.y/2))},ct.radialLayout=function(it,gt,Q){var dt=Math.max(this.maxDiagonalInTree(it),F.DEFAULT_RADIAL_SEPARATION);ct.branchRadialLayout(gt,null,0,359,0,dt);var K=wt.calculateBounds(it),yt=new mt;yt.setDeviceOrgX(K.getMinX()),yt.setDeviceOrgY(K.getMinY()),yt.setWorldOrgX(Q.x),yt.setWorldOrgY(Q.y);for(var V=0;V<it.length;V++){var Ot=it[V];Ot.transform(yt)}var It=new Y(K.getMaxX(),K.getMaxY());return yt.inverseTransformPoint(It)},ct.branchRadialLayout=function(it,gt,Q,dt,K,yt){var V=(dt-Q+1)/2;V<0&&(V+=180);var Ot=(V+Q)%360,It=Ot*ft.TWO_PI/360,jt=K*Math.cos(It),xt=K*Math.sin(It);it.setCenter(jt,xt);var Ft=[];Ft=Ft.concat(it.getEdges());var Ct=Ft.length;gt!=null&&Ct--;for(var kt=0,Gt=Ft.length,Fe,Mt=it.getEdgesBetween(gt);Mt.length>1;){var pn=Mt[0];Mt.splice(0,1);var Ae=Ft.indexOf(pn);Ae>=0&&Ft.splice(Ae,1),Gt--,Ct--}gt!=null?Fe=(Ft.indexOf(Mt[0])+1)%Gt:Fe=0;for(var ye=Math.abs(dt-Q)/Ct,tn=Fe;kt!=Ct;tn=++tn%Gt){var sn=Ft[tn].getOtherEnd(it);if(sn!=gt){var be=(Q+kt*ye)%360,Ne=(be+ye)%360;ct.branchRadialLayout(sn,it,be,Ne,K+yt,yt),kt++}}},ct.maxDiagonalInTree=function(it){for(var gt=ot.MIN_VALUE,Q=0;Q<it.length;Q++){var dt=it[Q],K=dt.getDiagonal();K>gt&&(gt=K)}return gt},ct.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},ct.prototype.groupZeroDegreeMembers=function(){var it=this,gt={};this.memberGroups={},this.idToDummyNode={};for(var Q=[],dt=this.graphManager.getAllNodes(),K=0;K<dt.length;K++){var yt=dt[K],V=yt.getParent();this.getNodeDegreeWithChildren(yt)===0&&(V.id==null||!this.getToBeTiled(V))&&Q.push(yt)}for(var K=0;K<Q.length;K++){var yt=Q[K],Ot=yt.getParent().id;typeof gt[Ot]>"u"&&(gt[Ot]=[]),gt[Ot]=gt[Ot].concat(yt)}Object.keys(gt).forEach(function(It){if(gt[It].length>1){var jt="DummyCompound_"+It;it.memberGroups[jt]=gt[It];var xt=gt[It][0].getParent(),Ft=new _(it.graphManager);Ft.id=jt,Ft.paddingLeft=xt.paddingLeft||0,Ft.paddingRight=xt.paddingRight||0,Ft.paddingBottom=xt.paddingBottom||0,Ft.paddingTop=xt.paddingTop||0,it.idToDummyNode[jt]=Ft;var Ct=it.getGraphManager().add(it.newGraph(),Ft),kt=xt.getChild();kt.add(Ft);for(var Gt=0;Gt<gt[It].length;Gt++){var Fe=gt[It][Gt];kt.remove(Fe),Ct.add(Fe)}}})},ct.prototype.clearCompounds=function(){var it={},gt={};this.performDFSOnCompounds();for(var Q=0;Q<this.compoundOrder.length;Q++)gt[this.compoundOrder[Q].id]=this.compoundOrder[Q],it[this.compoundOrder[Q].id]=[].concat(this.compoundOrder[Q].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[Q].getChild()),this.compoundOrder[Q].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(it,gt)},ct.prototype.clearZeroDegreeMembers=function(){var it=this,gt=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(Q){var dt=it.idToDummyNode[Q];gt[Q]=it.tileNodes(it.memberGroups[Q],dt.paddingLeft+dt.paddingRight),dt.rect.width=gt[Q].width,dt.rect.height=gt[Q].height})},ct.prototype.repopulateCompounds=function(){for(var it=this.compoundOrder.length-1;it>=0;it--){var gt=this.compoundOrder[it],Q=gt.id,dt=gt.paddingLeft,K=gt.paddingTop;this.adjustLocations(this.tiledMemberPack[Q],gt.rect.x,gt.rect.y,dt,K)}},ct.prototype.repopulateZeroDegreeMembers=function(){var it=this,gt=this.tiledZeroDegreePack;Object.keys(gt).forEach(function(Q){var dt=it.idToDummyNode[Q],K=dt.paddingLeft,yt=dt.paddingTop;it.adjustLocations(gt[Q],dt.rect.x,dt.rect.y,K,yt)})},ct.prototype.getToBeTiled=function(it){var gt=it.id;if(this.toBeTiled[gt]!=null)return this.toBeTiled[gt];var Q=it.getChild();if(Q==null)return this.toBeTiled[gt]=!1,!1;for(var dt=Q.getNodes(),K=0;K<dt.length;K++){var yt=dt[K];if(this.getNodeDegree(yt)>0)return this.toBeTiled[gt]=!1,!1;if(yt.getChild()==null){this.toBeTiled[yt.id]=!1;continue}if(!this.getToBeTiled(yt))return this.toBeTiled[gt]=!1,!1}return this.toBeTiled[gt]=!0,!0},ct.prototype.getNodeDegree=function(it){it.id;for(var gt=it.getEdges(),Q=0,dt=0;dt<gt.length;dt++){var K=gt[dt];K.getSource().id!==K.getTarget().id&&(Q=Q+1)}return Q},ct.prototype.getNodeDegreeWithChildren=function(it){var gt=this.getNodeDegree(it);if(it.getChild()==null)return gt;for(var Q=it.getChild().getNodes(),dt=0;dt<Q.length;dt++){var K=Q[dt];gt+=this.getNodeDegreeWithChildren(K)}return gt},ct.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},ct.prototype.fillCompexOrderByDFS=function(it){for(var gt=0;gt<it.length;gt++){var Q=it[gt];Q.getChild()!=null&&this.fillCompexOrderByDFS(Q.getChild().getNodes()),this.getToBeTiled(Q)&&this.compoundOrder.push(Q)}},ct.prototype.adjustLocations=function(it,gt,Q,dt,K){gt+=dt,Q+=K;for(var yt=gt,V=0;V<it.rows.length;V++){var Ot=it.rows[V];gt=yt;for(var It=0,jt=0;jt<Ot.length;jt++){var xt=Ot[jt];xt.rect.x=gt,xt.rect.y=Q,gt+=xt.rect.width+it.horizontalPadding,xt.rect.height>It&&(It=xt.rect.height)}Q+=It+it.verticalPadding}},ct.prototype.tileCompoundMembers=function(it,gt){var Q=this;this.tiledMemberPack=[],Object.keys(it).forEach(function(dt){var K=gt[dt];Q.tiledMemberPack[dt]=Q.tileNodes(it[dt],K.paddingLeft+K.paddingRight),K.rect.width=Q.tiledMemberPack[dt].width,K.rect.height=Q.tiledMemberPack[dt].height})},ct.prototype.tileNodes=function(it,gt){var Q=F.TILING_PADDING_VERTICAL,dt=F.TILING_PADDING_HORIZONTAL,K={rows:[],rowWidth:[],rowHeight:[],width:0,height:gt,verticalPadding:Q,horizontalPadding:dt};it.sort(function(Ot,It){return Ot.rect.width*Ot.rect.height>It.rect.width*It.rect.height?-1:Ot.rect.width*Ot.rect.height<It.rect.width*It.rect.height?1:0});for(var yt=0;yt<it.length;yt++){var V=it[yt];K.rows.length==0?this.insertNodeToRow(K,V,0,gt):this.canAddHorizontal(K,V.rect.width,V.rect.height)?this.insertNodeToRow(K,V,this.getShortestRowIndex(K),gt):this.insertNodeToRow(K,V,K.rows.length,gt),this.shiftToLastRow(K)}return K},ct.prototype.insertNodeToRow=function(it,gt,Q,dt){var K=dt;if(Q==it.rows.length){var yt=[];it.rows.push(yt),it.rowWidth.push(K),it.rowHeight.push(0)}var V=it.rowWidth[Q]+gt.rect.width;it.rows[Q].length>0&&(V+=it.horizontalPadding),it.rowWidth[Q]=V,it.width<V&&(it.width=V);var Ot=gt.rect.height;Q>0&&(Ot+=it.verticalPadding);var It=0;Ot>it.rowHeight[Q]&&(It=it.rowHeight[Q],it.rowHeight[Q]=Ot,It=it.rowHeight[Q]-It),it.height+=It,it.rows[Q].push(gt)},ct.prototype.getShortestRowIndex=function(it){for(var gt=-1,Q=Number.MAX_VALUE,dt=0;dt<it.rows.length;dt++)it.rowWidth[dt]<Q&&(gt=dt,Q=it.rowWidth[dt]);return gt},ct.prototype.getLongestRowIndex=function(it){for(var gt=-1,Q=Number.MIN_VALUE,dt=0;dt<it.rows.length;dt++)it.rowWidth[dt]>Q&&(gt=dt,Q=it.rowWidth[dt]);return gt},ct.prototype.canAddHorizontal=function(it,gt,Q){var dt=this.getShortestRowIndex(it);if(dt<0)return!0;var K=it.rowWidth[dt];if(K+it.horizontalPadding+gt<=it.width)return!0;var yt=0;it.rowHeight[dt]<Q&&dt>0&&(yt=Q+it.verticalPadding-it.rowHeight[dt]);var V;it.width-K>=gt+it.horizontalPadding?V=(it.height+yt)/(K+gt+it.horizontalPadding):V=(it.height+yt)/it.width,yt=Q+it.verticalPadding;var Ot;return it.width<gt?Ot=(it.height+yt)/gt:Ot=(it.height+yt)/it.width,Ot<1&&(Ot=1/Ot),V<1&&(V=1/V),V<Ot},ct.prototype.shiftToLastRow=function(it){var gt=this.getLongestRowIndex(it),Q=it.rowWidth.length-1,dt=it.rows[gt],K=dt[dt.length-1],yt=K.width+it.horizontalPadding;if(it.width-it.rowWidth[Q]>yt&&gt!=Q){dt.splice(-1,1),it.rows[Q].push(K),it.rowWidth[gt]=it.rowWidth[gt]-yt,it.rowWidth[Q]=it.rowWidth[Q]+yt,it.width=it.rowWidth[instance.getLongestRowIndex(it)];for(var V=Number.MIN_VALUE,Ot=0;Ot<dt.length;Ot++)dt[Ot].height>V&&(V=dt[Ot].height);gt>0&&(V+=it.verticalPadding);var It=it.rowHeight[gt]+it.rowHeight[Q];it.rowHeight[gt]=V,it.rowHeight[Q]<K.height+it.verticalPadding&&(it.rowHeight[Q]=K.height+it.verticalPadding);var jt=it.rowHeight[gt]+it.rowHeight[Q];it.height+=jt-It,this.shiftToLastRow(it)}},ct.prototype.tilingPreLayout=function(){F.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},ct.prototype.tilingPostLayout=function(){F.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},ct.prototype.reduceTrees=function(){for(var it=[],gt=!0,Q;gt;){var dt=this.graphManager.getAllNodes(),K=[];gt=!1;for(var yt=0;yt<dt.length;yt++)Q=dt[yt],Q.getEdges().length==1&&!Q.getEdges()[0].isInterGraph&&Q.getChild()==null&&(K.push([Q,Q.getEdges()[0],Q.getOwner()]),gt=!0);if(gt==!0){for(var V=[],Ot=0;Ot<K.length;Ot++)K[Ot][0].getEdges().length==1&&(V.push(K[Ot]),K[Ot][0].getOwner().remove(K[Ot][0]));it.push(V),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=it},ct.prototype.growTree=function(it){for(var gt=it.length,Q=it[gt-1],dt,K=0;K<Q.length;K++)dt=Q[K],this.findPlaceforPrunedNode(dt),dt[2].add(dt[0]),dt[2].add(dt[1],dt[1].source,dt[1].target);it.splice(it.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},ct.prototype.findPlaceforPrunedNode=function(it){var gt,Q,dt=it[0];dt==it[1].source?Q=it[1].target:Q=it[1].source;var K=Q.startX,yt=Q.finishX,V=Q.startY,Ot=Q.finishY,It=0,jt=0,xt=0,Ft=0,Ct=[It,xt,jt,Ft];if(V>0)for(var kt=K;kt<=yt;kt++)Ct[0]+=this.grid[kt][V-1].length+this.grid[kt][V].length-1;if(yt<this.grid.length-1)for(var kt=V;kt<=Ot;kt++)Ct[1]+=this.grid[yt+1][kt].length+this.grid[yt][kt].length-1;if(Ot<this.grid[0].length-1)for(var kt=K;kt<=yt;kt++)Ct[2]+=this.grid[kt][Ot+1].length+this.grid[kt][Ot].length-1;if(K>0)for(var kt=V;kt<=Ot;kt++)Ct[3]+=this.grid[K-1][kt].length+this.grid[K][kt].length-1;for(var Gt=ot.MAX_VALUE,Fe,Mt,pn=0;pn<Ct.length;pn++)Ct[pn]<Gt?(Gt=Ct[pn],Fe=1,Mt=pn):Ct[pn]==Gt&&Fe++;if(Fe==3&&Gt==0)Ct[0]==0&&Ct[1]==0&&Ct[2]==0?gt=1:Ct[0]==0&&Ct[1]==0&&Ct[3]==0?gt=0:Ct[0]==0&&Ct[2]==0&&Ct[3]==0?gt=3:Ct[1]==0&&Ct[2]==0&&Ct[3]==0&&(gt=2);else if(Fe==2&&Gt==0){var Ae=Math.floor(Math.random()*2);Ct[0]==0&&Ct[1]==0?Ae==0?gt=0:gt=1:Ct[0]==0&&Ct[2]==0?Ae==0?gt=0:gt=2:Ct[0]==0&&Ct[3]==0?Ae==0?gt=0:gt=3:Ct[1]==0&&Ct[2]==0?Ae==0?gt=1:gt=2:Ct[1]==0&&Ct[3]==0?Ae==0?gt=1:gt=3:Ae==0?gt=2:gt=3}else if(Fe==4&&Gt==0){var Ae=Math.floor(Math.random()*4);gt=Ae}else gt=Mt;gt==0?dt.setCenter(Q.getCenterX(),Q.getCenterY()-Q.getHeight()/2-R.DEFAULT_EDGE_LENGTH-dt.getHeight()/2):gt==1?dt.setCenter(Q.getCenterX()+Q.getWidth()/2+R.DEFAULT_EDGE_LENGTH+dt.getWidth()/2,Q.getCenterY()):gt==2?dt.setCenter(Q.getCenterX(),Q.getCenterY()+Q.getHeight()/2+R.DEFAULT_EDGE_LENGTH+dt.getHeight()/2):dt.setCenter(Q.getCenterX()-Q.getWidth()/2-R.DEFAULT_EDGE_LENGTH-dt.getWidth()/2,Q.getCenterY())},g.exports=ct},function(g,w,v){var b={};b.layoutBase=v(0),b.CoSEConstants=v(1),b.CoSEEdge=v(2),b.CoSEGraph=v(3),b.CoSEGraphManager=v(4),b.CoSELayout=v(6),b.CoSENode=v(5),g.exports=b}])})}(p2t)),p2t.exports}(function(i,a){(function(g,w){i.exports=w(ren())})(Z0,function(f){return function(g){var w={};function v(b){if(w[b])return w[b].exports;var E=w[b]={i:b,l:!1,exports:{}};return g[b].call(E.exports,E,E.exports,v),E.l=!0,E.exports}return v.m=g,v.c=w,v.i=function(b){return b},v.d=function(b,E,S){v.o(b,E)||Object.defineProperty(b,E,{configurable:!1,enumerable:!0,get:S})},v.n=function(b){var E=b&&b.__esModule?function(){return b.default}:function(){return b};return v.d(E,"a",E),E},v.o=function(b,E){return Object.prototype.hasOwnProperty.call(b,E)},v.p="",v(v.s=1)}([function(g,w){g.exports=f},function(g,w,v){var b=v(0).layoutBase.LayoutConstants,E=v(0).layoutBase.FDLayoutConstants,S=v(0).CoSEConstants,_=v(0).CoSELayout,M=v(0).CoSENode,F=v(0).layoutBase.PointD,R=v(0).layoutBase.DimensionD,B={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function z(ft,wt){var mt={};for(var ct in ft)mt[ct]=ft[ct];for(var ct in wt)mt[ct]=wt[ct];return mt}function Y(ft){this.options=z(B,ft),nt(this.options)}var nt=function(wt){wt.nodeRepulsion!=null&&(S.DEFAULT_REPULSION_STRENGTH=E.DEFAULT_REPULSION_STRENGTH=wt.nodeRepulsion),wt.idealEdgeLength!=null&&(S.DEFAULT_EDGE_LENGTH=E.DEFAULT_EDGE_LENGTH=wt.idealEdgeLength),wt.edgeElasticity!=null&&(S.DEFAULT_SPRING_STRENGTH=E.DEFAULT_SPRING_STRENGTH=wt.edgeElasticity),wt.nestingFactor!=null&&(S.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=E.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=wt.nestingFactor),wt.gravity!=null&&(S.DEFAULT_GRAVITY_STRENGTH=E.DEFAULT_GRAVITY_STRENGTH=wt.gravity),wt.numIter!=null&&(S.MAX_ITERATIONS=E.MAX_ITERATIONS=wt.numIter),wt.gravityRange!=null&&(S.DEFAULT_GRAVITY_RANGE_FACTOR=E.DEFAULT_GRAVITY_RANGE_FACTOR=wt.gravityRange),wt.gravityCompound!=null&&(S.DEFAULT_COMPOUND_GRAVITY_STRENGTH=E.DEFAULT_COMPOUND_GRAVITY_STRENGTH=wt.gravityCompound),wt.gravityRangeCompound!=null&&(S.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=E.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=wt.gravityRangeCompound),wt.initialEnergyOnIncremental!=null&&(S.DEFAULT_COOLING_FACTOR_INCREMENTAL=E.DEFAULT_COOLING_FACTOR_INCREMENTAL=wt.initialEnergyOnIncremental),wt.quality=="draft"?b.QUALITY=0:wt.quality=="proof"?b.QUALITY=2:b.QUALITY=1,S.NODE_DIMENSIONS_INCLUDE_LABELS=E.NODE_DIMENSIONS_INCLUDE_LABELS=b.NODE_DIMENSIONS_INCLUDE_LABELS=wt.nodeDimensionsIncludeLabels,S.DEFAULT_INCREMENTAL=E.DEFAULT_INCREMENTAL=b.DEFAULT_INCREMENTAL=!wt.randomize,S.ANIMATE=E.ANIMATE=b.ANIMATE=wt.animate,S.TILE=wt.tile,S.TILING_PADDING_VERTICAL=typeof wt.tilingPaddingVertical=="function"?wt.tilingPaddingVertical.call():wt.tilingPaddingVertical,S.TILING_PADDING_HORIZONTAL=typeof wt.tilingPaddingHorizontal=="function"?wt.tilingPaddingHorizontal.call():wt.tilingPaddingHorizontal};Y.prototype.run=function(){var ft,wt,mt=this.options;this.idToLNode={};var ct=this.layout=new _,rt=this;rt.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var it=ct.newGraphManager();this.gm=it;var gt=this.options.eles.nodes(),Q=this.options.eles.edges();this.root=it.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(gt),ct);for(var dt=0;dt<Q.length;dt++){var K=Q[dt],yt=this.idToLNode[K.data("source")],V=this.idToLNode[K.data("target")];if(yt!==V&&yt.getEdgesBetween(V).length==0){var Ot=it.add(ct.newEdge(),yt,V);Ot.id=K.id()}}var It=function(Ft,Ct){typeof Ft=="number"&&(Ft=Ct);var kt=Ft.data("id"),Gt=rt.idToLNode[kt];return{x:Gt.getRect().getCenterX(),y:Gt.getRect().getCenterY()}},jt=function xt(){for(var Ft=function(){mt.fit&&mt.cy.fit(mt.eles,mt.padding),ft||(ft=!0,rt.cy.one("layoutready",mt.ready),rt.cy.trigger({type:"layoutready",layout:rt}))},Ct=rt.options.refresh,kt,Gt=0;Gt<Ct&&!kt;Gt++)kt=rt.stopped||rt.layout.tick();if(kt){ct.checkLayoutSuccess()&&!ct.isSubLayout&&ct.doPostLayout(),ct.tilingPostLayout&&ct.tilingPostLayout(),ct.isLayoutFinished=!0,rt.options.eles.nodes().positions(It),Ft(),rt.cy.one("layoutstop",rt.options.stop),rt.cy.trigger({type:"layoutstop",layout:rt}),wt&&cancelAnimationFrame(wt),ft=!1;return}var Fe=rt.layout.getPositionsData();mt.eles.nodes().positions(function(Mt,pn){if(typeof Mt=="number"&&(Mt=pn),!Mt.isParent()){for(var Ae=Mt.id(),ye=Fe[Ae],tn=Mt;ye==null&&(ye=Fe[tn.data("parent")]||Fe["DummyCompound_"+tn.data("parent")],Fe[Ae]=ye,tn=tn.parent()[0],tn!=null););return ye!=null?{x:ye.x,y:ye.y}:{x:Mt.position("x"),y:Mt.position("y")}}}),Ft(),wt=requestAnimationFrame(xt)};return ct.addListener("layoutstarted",function(){rt.options.animate==="during"&&(wt=requestAnimationFrame(jt))}),ct.runLayout(),this.options.animate!=="during"&&(rt.options.eles.nodes().not(":parent").layoutPositions(rt,rt.options,It),ft=!1),this},Y.prototype.getTopMostNodes=function(ft){for(var wt={},mt=0;mt<ft.length;mt++)wt[ft[mt].id()]=!0;var ct=ft.filter(function(rt,it){typeof rt=="number"&&(rt=it);for(var gt=rt.parent()[0];gt!=null;){if(wt[gt.id()])return!1;gt=gt.parent()[0]}return!0});return ct},Y.prototype.processChildrenList=function(ft,wt,mt){for(var ct=wt.length,rt=0;rt<ct;rt++){var it=wt[rt],gt=it.children(),Q,dt=it.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(it.outerWidth()!=null&&it.outerHeight()!=null?Q=ft.add(new M(mt.graphManager,new F(it.position("x")-dt.w/2,it.position("y")-dt.h/2),new R(parseFloat(dt.w),parseFloat(dt.h)))):Q=ft.add(new M(this.graphManager)),Q.id=it.data("id"),Q.paddingLeft=parseInt(it.css("padding")),Q.paddingTop=parseInt(it.css("padding")),Q.paddingRight=parseInt(it.css("padding")),Q.paddingBottom=parseInt(it.css("padding")),this.options.nodeDimensionsIncludeLabels&&it.isParent()){var K=it.boundingBox({includeLabels:!0,includeNodes:!1}).w,yt=it.boundingBox({includeLabels:!0,includeNodes:!1}).h,V=it.css("text-halign");Q.labelWidth=K,Q.labelHeight=yt,Q.labelPos=V}if(this.idToLNode[it.data("id")]=Q,isNaN(Q.rect.x)&&(Q.rect.x=0),isNaN(Q.rect.y)&&(Q.rect.y=0),gt!=null&&gt.length>0){var Ot;Ot=mt.getGraphManager().add(mt.newGraph(),Q),this.processChildrenList(Ot,gt,mt)}}},Y.prototype.stop=function(){return this.stopped=!0,this};var ot=function(wt){wt("layout","cose-bilkent",Y)};typeof cytoscape<"u"&&ot(cytoscape),g.exports=ot}])})})(WHt);var ien=WHt.exports;const sen=e9(ien),aen=12,oen=function(i,a,f,g){a.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+i.type2Str(f.type)).attr("d",`M0 ${f.height-5} v${-f.height+2*5} q0,-5 5,-5 h${f.width-2*5} q5,0 5,5 v${f.height-5} H0 Z`),a.append("line").attr("class","node-line-"+g).attr("x1",0).attr("y1",f.height).attr("x2",f.width).attr("y2",f.height)},cen=function(i,a,f){a.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+i.type2Str(f.type)).attr("height",f.height).attr("width",f.width)},uen=function(i,a,f){const g=f.width,w=f.height,v=.15*g,b=.25*g,E=.35*g,S=.2*g;a.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+i.type2Str(f.type)).attr("d",`M0 0 a${v},${v} 0 0,1 ${g*.25},${-1*g*.1}