boxes-vue 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/boxes-vue.js +49195 -0
- package/dist/boxes-vue.umd.js +512 -0
- package/dist/style.css +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
(function(Ld,Xu){typeof exports=="object"&&typeof module<"u"?Xu(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],Xu):(Ld=typeof globalThis<"u"?globalThis:Ld||self,Xu(Ld.BoxesVue={},Ld.Vue))})(this,function(Ld,Xu){"use strict";function jC(t,r){(r==null||r>t.length)&&(r=t.length);for(var a=0,s=Array(r);a<r;a++)s[a]=t[a];return s}function Xoe(t){if(Array.isArray(t))return t}function ese(t){if(Array.isArray(t))return jC(t)}function ah(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function tse(t,r){for(var a=0;a<r.length;a++){var s=r[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,o8(s.key),s)}}function oh(t,r,a){return r&&tse(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ns(t,r){var a=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=AC(t))||r){a&&(t=a);var s=0,c=function(){};return{s:c,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(p){throw p},f:c}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f,h=!0,d=!1;return{s:function(){a=a.call(t)},n:function(){var p=a.next();return h=p.done,p},e:function(p){d=!0,f=p},f:function(){try{h||a.return==null||a.return()}finally{if(d)throw f}}}}function a8(t,r,a){return(r=o8(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a,t}function nse(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function rse(t,r){var a=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(a!=null){var s,c,f,h,d=[],p=!0,b=!1;try{if(f=(a=a.call(t)).next,r===0){if(Object(a)!==a)return;p=!1}else for(;!(p=(s=f.call(a)).done)&&(d.push(s.value),d.length!==r);p=!0);}catch(m){b=!0,c=m}finally{try{if(!p&&a.return!=null&&(h=a.return(),Object(h)!==h))return}finally{if(b)throw c}}return d}}function ise(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ase(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ma(t,r){return Xoe(t)||rse(t,r)||AC(t,r)||ise()}function Hm(t){return ese(t)||nse(t)||AC(t)||ase()}function ose(t,r){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var s=a.call(t,r);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function o8(t){var r=ose(t,"string");return typeof r=="symbol"?r:r+""}function La(t){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},La(t)}function AC(t,r){if(t){if(typeof t=="string")return jC(t,r);var a={}.toString.call(t).slice(8,-1);return a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set"?Array.from(t):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?jC(t,r):void 0}}var Oa=typeof window>"u"?null:window,s8=Oa?Oa.navigator:null;Oa&&Oa.document;var sse=La(""),u8=La({}),use=La(function(){}),cse=typeof HTMLElement>"u"?"undefined":La(HTMLElement),Wv=function(t){return t&&t.instanceString&&Di(t.instanceString)?t.instanceString():null},nn=function(t){return t!=null&&La(t)==sse},Di=function(t){return t!=null&&La(t)===use},ei=function(t){return!nu(t)&&(Array.isArray?Array.isArray(t):t!=null&&t instanceof Array)},gr=function(t){return t!=null&&La(t)===u8&&!ei(t)&&t.constructor===Object},lse=function(t){return t!=null&&La(t)===u8},jt=function(t){return t!=null&&La(t)===La(1)&&!isNaN(t)},fse=function(t){return jt(t)&&Math.floor(t)===t},zm=function(t){if(cse!=="undefined")return t!=null&&t instanceof HTMLElement},nu=function(t){return Jv(t)||c8(t)},Jv=function(t){return Wv(t)==="collection"&&t._private.single},c8=function(t){return Wv(t)==="collection"&&!t._private.single},IC=function(t){return Wv(t)==="core"},l8=function(t){return Wv(t)==="stylesheet"},hse=function(t){return Wv(t)==="event"},sh=function(t){return t==null?!0:!!(t===""||t.match(/^\s+$/))},dse=function(t){return typeof HTMLElement>"u"?!1:t instanceof HTMLElement},pse=function(t){return gr(t)&&jt(t.x1)&&jt(t.x2)&&jt(t.y1)&&jt(t.y2)},gse=function(t){return lse(t)&&Di(t.then)},bse=function(){return s8&&s8.userAgent.match(/msie|trident|edge/i)},yg=function(t,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var s=[],c=0;c<arguments.length;c++)s.push(arguments[c]);return s.join("$")});var a=function(){var s=this,c=arguments,f,h=r.apply(s,c),d=a.cache;return(f=d[h])||(f=d[h]=t.apply(s,c)),f};return a.cache={},a},LC=yg(function(t){return t.replace(/([A-Z])/g,function(r){return"-"+r.toLowerCase()})}),Um=yg(function(t){return t.replace(/(-\w)/g,function(r){return r[1].toUpperCase()})}),f8=yg(function(t,r){return t+r[0].toUpperCase()+r.substring(1)},function(t,r){return t+"$"+r}),h8=function(t){return sh(t)?t:t.charAt(0).toUpperCase()+t.substring(1)},uh=function(t,r){return t.slice(-1*r.length)===r},Da="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",vse="rgb[a]?\\(("+Da+"[%]?)\\s*,\\s*("+Da+"[%]?)\\s*,\\s*("+Da+"[%]?)(?:\\s*,\\s*("+Da+"))?\\)",yse="rgb[a]?\\((?:"+Da+"[%]?)\\s*,\\s*(?:"+Da+"[%]?)\\s*,\\s*(?:"+Da+"[%]?)(?:\\s*,\\s*(?:"+Da+"))?\\)",mse="hsl[a]?\\(("+Da+")\\s*,\\s*("+Da+"[%])\\s*,\\s*("+Da+"[%])(?:\\s*,\\s*("+Da+"))?\\)",wse="hsl[a]?\\((?:"+Da+")\\s*,\\s*(?:"+Da+"[%])\\s*,\\s*(?:"+Da+"[%])(?:\\s*,\\s*(?:"+Da+"))?\\)",xse="\\#[0-9a-fA-F]{3}",kse="\\#[0-9a-fA-F]{6}",d8=function(t,r){return t<r?-1:t>r?1:0},_se=function(t,r){return-1*d8(t,r)},fn=Object.assign!=null?Object.assign.bind(Object):function(t){for(var r=arguments,a=1;a<r.length;a++){var s=r[a];if(s!=null)for(var c=Object.keys(s),f=0;f<c.length;f++){var h=c[f];t[h]=s[h]}}return t},Ese=function(t){if(!(!(t.length===4||t.length===7)||t[0]!=="#")){var r=t.length===4,a,s,c,f=16;return r?(a=parseInt(t[1]+t[1],f),s=parseInt(t[2]+t[2],f),c=parseInt(t[3]+t[3],f)):(a=parseInt(t[1]+t[2],f),s=parseInt(t[3]+t[4],f),c=parseInt(t[5]+t[6],f)),[a,s,c]}},Cse=function(t){var r,a,s,c,f,h,d,p;function b(P,S,M){return M<0&&(M+=1),M>1&&(M-=1),M<1/6?P+(S-P)*6*M:M<1/2?S:M<2/3?P+(S-P)*(2/3-M)*6:P}var m=new RegExp("^"+mse+"$").exec(t);if(m){if(a=parseInt(m[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,s=parseFloat(m[2]),s<0||s>100||(s=s/100,c=parseFloat(m[3]),c<0||c>100)||(c=c/100,f=m[4],f!==void 0&&(f=parseFloat(f),f<0||f>1)))return;if(s===0)h=d=p=Math.round(c*255);else{var w=c<.5?c*(1+s):c+s-c*s,k=2*c-w;h=Math.round(255*b(k,w,a+1/3)),d=Math.round(255*b(k,w,a)),p=Math.round(255*b(k,w,a-1/3))}r=[h,d,p,f]}return r},Pse=function(t){var r,a=new RegExp("^"+vse+"$").exec(t);if(a){r=[];for(var s=[],c=1;c<=3;c++){var f=a[c];if(f[f.length-1]==="%"&&(s[c]=!0),f=parseFloat(f),s[c]&&(f=f/100*255),f<0||f>255)return;r.push(Math.floor(f))}var h=s[1]||s[2]||s[3],d=s[1]&&s[2]&&s[3];if(h&&!d)return;var p=a[4];if(p!==void 0){if(p=parseFloat(p),p<0||p>1)return;r.push(p)}}return r},Sse=function(t){return Nse[t.toLowerCase()]},p8=function(t){return(ei(t)?t:null)||Sse(t)||Ese(t)||Pse(t)||Cse(t)},Nse={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},g8=function(t){for(var r=t.map,a=t.keys,s=a.length,c=0;c<s;c++){var f=a[c];if(gr(f))throw Error("Tried to set map with object key");c<a.length-1?(r[f]==null&&(r[f]={}),r=r[f]):r[f]=t.value}},b8=function(t){for(var r=t.map,a=t.keys,s=a.length,c=0;c<s;c++){var f=a[c];if(gr(f))throw Error("Tried to get map with object key");if(r=r[f],r==null)return r}return r},Fm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var OC,v8;function e0(){if(v8)return OC;v8=1;function t(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}return OC=t,OC}var DC,y8;function Tse(){if(y8)return DC;y8=1;var t=typeof Fm=="object"&&Fm&&Fm.Object===Object&&Fm;return DC=t,DC}var BC,m8;function Ym(){if(m8)return BC;m8=1;var t=Tse(),r=typeof self=="object"&&self&&self.Object===Object&&self,a=t||r||Function("return this")();return BC=a,BC}var RC,w8;function Mse(){if(w8)return RC;w8=1;var t=Ym(),r=function(){return t.Date.now()};return RC=r,RC}var GC,x8;function jse(){if(x8)return GC;x8=1;var t=/\s/;function r(a){for(var s=a.length;s--&&t.test(a.charAt(s)););return s}return GC=r,GC}var HC,k8;function Ase(){if(k8)return HC;k8=1;var t=jse(),r=/^\s+/;function a(s){return s&&s.slice(0,t(s)+1).replace(r,"")}return HC=a,HC}var zC,_8;function UC(){if(_8)return zC;_8=1;var t=Ym(),r=t.Symbol;return zC=r,zC}var FC,E8;function Ise(){if(E8)return FC;E8=1;var t=UC(),r=Object.prototype,a=r.hasOwnProperty,s=r.toString,c=t?t.toStringTag:void 0;function f(h){var d=a.call(h,c),p=h[c];try{h[c]=void 0;var b=!0}catch{}var m=s.call(h);return b&&(d?h[c]=p:delete h[c]),m}return FC=f,FC}var YC,C8;function Lse(){if(C8)return YC;C8=1;var t=Object.prototype,r=t.toString;function a(s){return r.call(s)}return YC=a,YC}var VC,P8;function S8(){if(P8)return VC;P8=1;var t=UC(),r=Ise(),a=Lse(),s="[object Null]",c="[object Undefined]",f=t?t.toStringTag:void 0;function h(d){return d==null?d===void 0?c:s:f&&f in Object(d)?r(d):a(d)}return VC=h,VC}var qC,N8;function Ose(){if(N8)return qC;N8=1;function t(r){return r!=null&&typeof r=="object"}return qC=t,qC}var ZC,T8;function t0(){if(T8)return ZC;T8=1;var t=S8(),r=Ose(),a="[object Symbol]";function s(c){return typeof c=="symbol"||r(c)&&t(c)==a}return ZC=s,ZC}var $C,M8;function Dse(){if(M8)return $C;M8=1;var t=Ase(),r=e0(),a=t0(),s=NaN,c=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt;function p(b){if(typeof b=="number")return b;if(a(b))return s;if(r(b)){var m=typeof b.valueOf=="function"?b.valueOf():b;b=r(m)?m+"":m}if(typeof b!="string")return b===0?b:+b;b=t(b);var w=f.test(b);return w||h.test(b)?d(b.slice(2),w?2:8):c.test(b)?s:+b}return $C=p,$C}var KC,j8;function Bse(){if(j8)return KC;j8=1;var t=e0(),r=Mse(),a=Dse(),s="Expected a function",c=Math.max,f=Math.min;function h(d,p,b){var m,w,k,P,S,M,L=0,T=!1,j=!1,I=!0;if(typeof d!="function")throw new TypeError(s);p=a(p)||0,t(b)&&(T=!!b.leading,j="maxWait"in b,k=j?c(a(b.maxWait)||0,p):k,I="trailing"in b?!!b.trailing:I);function D(X){var K=m,ae=w;return m=w=void 0,L=X,P=d.apply(ae,K),P}function R(X){return L=X,S=setTimeout(U,p),T?D(X):P}function Y(X){var K=X-M,ae=X-L,se=p-K;return j?f(se,k-ae):se}function G(X){var K=X-M,ae=X-L;return M===void 0||K>=p||K<0||j&&ae>=k}function U(){var X=r();if(G(X))return z(X);S=setTimeout(U,Y(X))}function z(X){return S=void 0,I&&m?D(X):(m=w=void 0,P)}function Q(){S!==void 0&&clearTimeout(S),L=0,m=M=w=S=void 0}function $(){return S===void 0?P:z(r())}function Z(){var X=r(),K=G(X);if(m=arguments,w=this,M=X,K){if(S===void 0)return R(M);if(j)return clearTimeout(S),S=setTimeout(U,p),D(M)}return S===void 0&&(S=setTimeout(U,p)),P}return Z.cancel=Q,Z.flush=$,Z}return KC=h,KC}var Rse=Bse(),n0=Xv(Rse),QC=Oa?Oa.performance:null,A8=QC&&QC.now?function(){return QC.now()}:function(){return Date.now()},Gse=function(){if(Oa){if(Oa.requestAnimationFrame)return function(t){Oa.requestAnimationFrame(t)};if(Oa.mozRequestAnimationFrame)return function(t){Oa.mozRequestAnimationFrame(t)};if(Oa.webkitRequestAnimationFrame)return function(t){Oa.webkitRequestAnimationFrame(t)};if(Oa.msRequestAnimationFrame)return function(t){Oa.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(A8())},1e3/60)}}(),Vm=function(t){return Gse(t)},Xl=A8,Od=9261,I8=65599,mg=5381,L8=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Od,a=r,s;s=t.next(),!s.done;)a=a*I8+s.value|0;return a},r0=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Od;return r*I8+t|0},i0=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mg;return(r<<5)+r+t|0},Hse=function(t,r){return t*2097152+r},ch=function(t){return t[0]*2097152+t[1]},qm=function(t,r){return[r0(t[0],r[0]),i0(t[1],r[1])]},O8=function(t,r){var a={value:0,done:!1},s=0,c=t.length,f={next:function(){return s<c?a.value=t[s++]:a.done=!0,a}};return L8(f,r)},Dd=function(t,r){var a={value:0,done:!1},s=0,c=t.length,f={next:function(){return s<c?a.value=t.charCodeAt(s++):a.done=!0,a}};return L8(f,r)},D8=function(){return zse(arguments)},zse=function(t){for(var r,a=0;a<t.length;a++){var s=t[a];a===0?r=Dd(s):r=Dd(s,r)}return r};function Use(t,r,a,s,c){var f=c*Math.PI/180,h=Math.cos(f)*(t-a)-Math.sin(f)*(r-s)+a,d=Math.sin(f)*(t-a)+Math.cos(f)*(r-s)+s;return{x:h,y:d}}var Fse=function(t,r,a,s,c,f){return{x:(t-a)*c+a,y:(r-s)*f+s}};function Yse(t,r,a){if(a===0)return t;var s=(r.x1+r.x2)/2,c=(r.y1+r.y2)/2,f=r.w/r.h,h=1/f,d=Use(t.x,t.y,s,c,a),p=Fse(d.x,d.y,s,c,f,h);return{x:p.x,y:p.y}}var B8=!0,Vse=console.warn!=null,qse=console.trace!=null,WC=Number.MAX_SAFE_INTEGER||9007199254740991,R8=function(){return!0},Zm=function(){return!1},G8=function(){return 0},JC=function(){},_i=function(t){throw new Error(t)},H8=function(t){if(t!==void 0)B8=!!t;else return B8},jr=function(t){H8()&&(Vse?console.warn(t):(console.log(t),qse&&console.trace()))},Zse=function(t){return fn({},t)},Zc=function(t){return t==null?t:ei(t)?t.slice():gr(t)?Zse(t):t},$se=function(t){return t.slice()},z8=function(t,r){for(r=t="";t++<36;r+=t*51&52?(t^15?8^Math.random()*(t^20?16:4):4).toString(16):"-");return r},Kse={},U8=function(){return Kse},yo=function(t){var r=Object.keys(t);return function(a){for(var s={},c=0;c<r.length;c++){var f=r[c],h=a==null?void 0:a[f];s[f]=h===void 0?t[f]:h}return s}},lh=function(t,r,a){for(var s=t.length-1;s>=0;s--)t[s]===r&&t.splice(s,1)},XC=function(t){t.splice(0,t.length)},Qse=function(t,r){for(var a=0;a<r.length;a++){var s=r[a];t.push(s)}},Ts=function(t,r,a){return a&&(r=f8(a,r)),t[r]},ef=function(t,r,a,s){a&&(r=f8(a,r)),t[r]=s},Wse=function(){function t(){ah(this,t),this._obj={}}return oh(t,[{key:"set",value:function(r,a){return this._obj[r]=a,this}},{key:"delete",value:function(r){return this._obj[r]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(r){return this._obj[r]!==void 0}},{key:"get",value:function(r){return this._obj[r]}}])}(),tf=typeof Map<"u"?Map:Wse,Jse="undefined",Xse=function(){function t(r){if(ah(this,t),this._obj=Object.create(null),this.size=0,r!=null){var a;r.instanceString!=null&&r.instanceString()===this.instanceString()?a=r.toArray():a=r;for(var s=0;s<a.length;s++)this.add(a[s])}}return oh(t,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(r){var a=this._obj;a[r]!==1&&(a[r]=1,this.size++)}},{key:"delete",value:function(r){var a=this._obj;a[r]===1&&(a[r]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(r){return this._obj[r]===1}},{key:"toArray",value:function(){var r=this;return Object.keys(this._obj).filter(function(a){return r.has(a)})}},{key:"forEach",value:function(r,a){return this.toArray().forEach(r,a)}}])}(),wg=(typeof Set>"u"?"undefined":La(Set))!==Jse?Set:Xse,$m=function(t,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(t===void 0||r===void 0||!IC(t)){_i("An element must have a core reference and parameters set");return}var s=r.group;if(s==null&&(r.data&&r.data.source!=null&&r.data.target!=null?s="edges":s="nodes"),s!=="nodes"&&s!=="edges"){_i("An element must be of type `nodes` or `edges`; you specified `"+s+"`");return}this.length=1,this[0]=this;var c=this._private={cy:t,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:s,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?s==="edges":!!r.pannable,active:!1,classes:new wg,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(c.position.x==null&&(c.position.x=0),c.position.y==null&&(c.position.y=0),r.renderedPosition){var f=r.renderedPosition,h=t.pan(),d=t.zoom();c.position={x:(f.x-h.x)/d,y:(f.y-h.y)/d}}var p=[];ei(r.classes)?p=r.classes:nn(r.classes)&&(p=r.classes.split(/\s+/));for(var b=0,m=p.length;b<m;b++){var w=p[b];!w||w===""||c.classes.add(w)}this.createEmitter(),(a===void 0||a)&&this.restore();var k=r.style||r.css;k&&(jr("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(k))},F8=function(t){return t={bfs:t.bfs||!t.dfs,dfs:t.dfs||!t.bfs},function(r,a,s){var c;gr(r)&&!nu(r)&&(c=r,r=c.roots||c.root,a=c.visit,s=c.directed),s=arguments.length===2&&!Di(a)?a:s,a=Di(a)?a:function(){};for(var f=this._private.cy,h=r=nn(r)?this.filter(r):r,d=[],p=[],b={},m={},w={},k=0,P,S=this.byGroup(),M=S.nodes,L=S.edges,T=0;T<h.length;T++){var j=h[T],I=j.id();j.isNode()&&(d.unshift(j),t.bfs&&(w[I]=!0,p.push(j)),m[I]=0)}for(var D=function(){var Q=t.bfs?d.shift():d.pop(),$=Q.id();if(t.dfs){if(w[$])return 0;w[$]=!0,p.push(Q)}var Z=m[$],X=b[$],K=X!=null?X.source():null,ae=X!=null?X.target():null,se=X==null?void 0:Q.same(K)?ae[0]:K[0],le;if(le=a(Q,X,se,k++,Z),le===!0)return P=Q,1;if(le===!1)return 1;for(var he=Q.connectedEdges().filter(function(Le){return(!s||Le.source().same(Q))&&L.has(Le)}),fe=0;fe<he.length;fe++){var pe=he[fe],me=pe.connectedNodes().filter(function(Le){return!Le.same(Q)&&M.has(Le)}),Te=me.id();me.length!==0&&!w[Te]&&(me=me[0],d.push(me),t.bfs&&(w[Te]=!0,p.push(me)),b[Te]=pe,m[Te]=m[$]+1)}},R;d.length!==0&&(R=D(),!(R!==0&&R===1)););for(var Y=f.collection(),G=0;G<p.length;G++){var U=p[G],z=b[U.id()];z!=null&&Y.push(z),Y.push(U)}return{path:f.collection(Y),found:f.collection(P)}}},a0={breadthFirstSearch:F8({bfs:!0}),depthFirstSearch:F8({dfs:!0})};a0.bfs=a0.breadthFirstSearch,a0.dfs=a0.depthFirstSearch;var e3={exports:{}},eue=e3.exports,Y8;function tue(){return Y8||(Y8=1,function(t,r){(function(){var a,s,c,f,h,d,p,b,m,w,k,P,S,M,L;c=Math.floor,w=Math.min,s=function(T,j){return T<j?-1:T>j?1:0},m=function(T,j,I,D,R){var Y;if(I==null&&(I=0),R==null&&(R=s),I<0)throw new Error("lo must be non-negative");for(D==null&&(D=T.length);I<D;)Y=c((I+D)/2),R(j,T[Y])<0?D=Y:I=Y+1;return[].splice.apply(T,[I,I-I].concat(j)),j},d=function(T,j,I){return I==null&&(I=s),T.push(j),M(T,0,T.length-1,I)},h=function(T,j){var I,D;return j==null&&(j=s),I=T.pop(),T.length?(D=T[0],T[0]=I,L(T,0,j)):D=I,D},b=function(T,j,I){var D;return I==null&&(I=s),D=T[0],T[0]=j,L(T,0,I),D},p=function(T,j,I){var D;return I==null&&(I=s),T.length&&I(T[0],j)<0&&(D=[T[0],j],j=D[0],T[0]=D[1],L(T,0,I)),j},f=function(T,j){var I,D,R,Y,G,U;for(j==null&&(j=s),Y=(function(){U=[];for(var z=0,Q=c(T.length/2);0<=Q?z<Q:z>Q;0<=Q?z++:z--)U.push(z);return U}).apply(this).reverse(),G=[],D=0,R=Y.length;D<R;D++)I=Y[D],G.push(L(T,I,j));return G},S=function(T,j,I){var D;if(I==null&&(I=s),D=T.indexOf(j),D!==-1)return M(T,0,D,I),L(T,D,I)},k=function(T,j,I){var D,R,Y,G,U;if(I==null&&(I=s),R=T.slice(0,j),!R.length)return R;for(f(R,I),U=T.slice(j),Y=0,G=U.length;Y<G;Y++)D=U[Y],p(R,D,I);return R.sort(I).reverse()},P=function(T,j,I){var D,R,Y,G,U,z,Q,$,Z;if(I==null&&(I=s),j*10<=T.length){if(Y=T.slice(0,j).sort(I),!Y.length)return Y;for(R=Y[Y.length-1],Q=T.slice(j),G=0,z=Q.length;G<z;G++)D=Q[G],I(D,R)<0&&(m(Y,D,0,null,I),Y.pop(),R=Y[Y.length-1]);return Y}for(f(T,I),Z=[],U=0,$=w(j,T.length);0<=$?U<$:U>$;0<=$?++U:--U)Z.push(h(T,I));return Z},M=function(T,j,I,D){var R,Y,G;for(D==null&&(D=s),R=T[I];I>j;){if(G=I-1>>1,Y=T[G],D(R,Y)<0){T[I]=Y,I=G;continue}break}return T[I]=R},L=function(T,j,I){var D,R,Y,G,U;for(I==null&&(I=s),R=T.length,U=j,Y=T[j],D=2*j+1;D<R;)G=D+1,G<R&&!(I(T[D],T[G])<0)&&(D=G),T[j]=T[D],j=D,D=2*j+1;return T[j]=Y,M(T,U,j,I)},a=function(){T.push=d,T.pop=h,T.replace=b,T.pushpop=p,T.heapify=f,T.updateItem=S,T.nlargest=k,T.nsmallest=P;function T(j){this.cmp=j??s,this.nodes=[]}return T.prototype.push=function(j){return d(this.nodes,j,this.cmp)},T.prototype.pop=function(){return h(this.nodes,this.cmp)},T.prototype.peek=function(){return this.nodes[0]},T.prototype.contains=function(j){return this.nodes.indexOf(j)!==-1},T.prototype.replace=function(j){return b(this.nodes,j,this.cmp)},T.prototype.pushpop=function(j){return p(this.nodes,j,this.cmp)},T.prototype.heapify=function(){return f(this.nodes,this.cmp)},T.prototype.updateItem=function(j){return S(this.nodes,j,this.cmp)},T.prototype.clear=function(){return this.nodes=[]},T.prototype.empty=function(){return this.nodes.length===0},T.prototype.size=function(){return this.nodes.length},T.prototype.clone=function(){var j;return j=new T,j.nodes=this.nodes.slice(0),j},T.prototype.toArray=function(){return this.nodes.slice(0)},T.prototype.insert=T.prototype.push,T.prototype.top=T.prototype.peek,T.prototype.front=T.prototype.peek,T.prototype.has=T.prototype.contains,T.prototype.copy=T.prototype.clone,T}(),function(T,j){return t.exports=j()}(this,function(){return a})}).call(eue)}(e3)),e3.exports}var V8,q8;function nue(){return q8||(q8=1,V8=tue()),V8}var rue=nue(),o0=Xv(rue),iue=yo({root:null,weight:function(t){return 1},directed:!1}),aue={dijkstra:function(t){if(!gr(t)){var r=arguments;t={root:r[0],weight:r[1],directed:r[2]}}var a=iue(t),s=a.root,c=a.weight,f=a.directed,h=this,d=c,p=nn(s)?this.filter(s)[0]:s[0],b={},m={},w={},k=this.byGroup(),P=k.nodes,S=k.edges;S.unmergeBy(function(K){return K.isLoop()});for(var M=function(K){return b[K.id()]},L=function(K,ae){b[K.id()]=ae,T.updateItem(K)},T=new o0(function(K,ae){return M(K)-M(ae)}),j=0;j<P.length;j++){var I=P[j];b[I.id()]=I.same(p)?0:1/0,T.push(I)}for(var D=function(K,ae){for(var se=(f?K.edgesTo(ae):K.edgesWith(ae)).intersect(S),le=1/0,he,fe=0;fe<se.length;fe++){var pe=se[fe],me=d(pe);(me<le||!he)&&(le=me,he=pe)}return{edge:he,dist:le}};T.size()>0;){var R=T.pop(),Y=M(R),G=R.id();if(w[G]=Y,Y!==1/0)for(var U=R.neighborhood().intersect(P),z=0;z<U.length;z++){var Q=U[z],$=Q.id(),Z=D(R,Q),X=Y+Z.dist;X<M(Q)&&(L(Q,X),m[$]={node:R,edge:Z.edge})}}return{distanceTo:function(K){var ae=nn(K)?P.filter(K)[0]:K[0];return w[ae.id()]},pathTo:function(K){var ae=nn(K)?P.filter(K)[0]:K[0],se=[],le=ae,he=le.id();if(ae.length>0)for(se.unshift(ae);m[he];){var fe=m[he];se.unshift(fe.edge),se.unshift(fe.node),le=fe.node,he=le.id()}return h.spawn(se)}}}},oue={kruskal:function(t){t=t||function(j){return 1};for(var r=this.byGroup(),a=r.nodes,s=r.edges,c=a.length,f=new Array(c),h=a,d=function(j){for(var I=0;I<f.length;I++){var D=f[I];if(D.has(j))return I}},p=0;p<c;p++)f[p]=this.spawn(a[p]);for(var b=s.sort(function(j,I){return t(j)-t(I)}),m=0;m<b.length;m++){var w=b[m],k=w.source()[0],P=w.target()[0],S=d(k),M=d(P),L=f[S],T=f[M];S!==M&&(h.merge(w),L.merge(T),f.splice(M,1))}return h}},sue=yo({root:null,goal:null,weight:function(t){return 1},heuristic:function(t){return 0},directed:!1}),uue={aStar:function(t){var r=this.cy(),a=sue(t),s=a.root,c=a.goal,f=a.heuristic,h=a.directed,d=a.weight;s=r.collection(s)[0],c=r.collection(c)[0];var p=s.id(),b=c.id(),m={},w={},k={},P=new o0(function(fe,pe){return w[fe.id()]-w[pe.id()]}),S=new wg,M={},L={},T=function(fe,pe){P.push(fe),S.add(pe)},j,I,D=function(){j=P.pop(),I=j.id(),S.delete(I)},R=function(fe){return S.has(fe)};T(s,p),m[p]=0,w[p]=f(s);for(var Y=0;P.size()>0;){if(D(),Y++,I===b){for(var G=[],U=c,z=b,Q=L[z];G.unshift(U),Q!=null&&G.unshift(Q),U=M[z],U!=null;)z=U.id(),Q=L[z];return{found:!0,distance:m[I],path:this.spawn(G),steps:Y}}k[I]=!0;for(var $=j._private.edges,Z=0;Z<$.length;Z++){var X=$[Z];if(this.hasElementWithId(X.id())&&!(h&&X.data("source")!==I)){var K=X.source(),ae=X.target(),se=K.id()!==I?K:ae,le=se.id();if(this.hasElementWithId(le)&&!k[le]){var he=m[I]+d(X);if(!R(le)){m[le]=he,w[le]=he+f(se),T(se,le),M[le]=j,L[le]=X;continue}he<m[le]&&(m[le]=he,w[le]=he+f(se),M[le]=j,L[le]=X)}}}}return{found:!1,distance:void 0,path:void 0,steps:Y}}},cue=yo({weight:function(t){return 1},directed:!1}),lue={floydWarshall:function(t){for(var r=this.cy(),a=cue(t),s=a.weight,c=a.directed,f=s,h=this.byGroup(),d=h.nodes,p=h.edges,b=d.length,m=b*b,w=function(me){return d.indexOf(me)},k=function(me){return d[me]},P=new Array(m),S=0;S<m;S++){var M=S%b,L=(S-M)/b;L===M?P[S]=0:P[S]=1/0}for(var T=new Array(m),j=new Array(m),I=0;I<p.length;I++){var D=p[I],R=D.source()[0],Y=D.target()[0];if(R!==Y){var G=w(R),U=w(Y),z=G*b+U,Q=f(D);if(P[z]>Q&&(P[z]=Q,T[z]=U,j[z]=D),!c){var $=U*b+G;!c&&P[$]>Q&&(P[$]=Q,T[$]=G,j[$]=D)}}}for(var Z=0;Z<b;Z++)for(var X=0;X<b;X++)for(var K=X*b+Z,ae=0;ae<b;ae++){var se=X*b+ae,le=Z*b+ae;P[K]+P[le]<P[se]&&(P[se]=P[K]+P[le],T[se]=T[K])}var he=function(me){return(nn(me)?r.filter(me):me)[0]},fe=function(me){return w(he(me))},pe={distance:function(me,Te){var Le=fe(me),ge=fe(Te);return P[Le*b+ge]},path:function(me,Te){var Le=fe(me),ge=fe(Te),xe=k(Le);if(Le===ge)return xe.collection();if(T[Le*b+ge]==null)return r.collection();var Se=r.collection(),Ie=Le,Re;for(Se.merge(xe);Le!==ge;)Ie=Le,Le=T[Le*b+ge],Re=j[Ie*b+Le],Se.merge(Re),Se.merge(k(Le));return Se}};return pe}},fue=yo({weight:function(t){return 1},directed:!1,root:null}),hue={bellmanFord:function(t){var r=this,a=fue(t),s=a.weight,c=a.directed,f=a.root,h=s,d=this,p=this.cy(),b=this.byGroup(),m=b.edges,w=b.nodes,k=w.length,P=new tf,S=!1,M=[];f=p.collection(f)[0],m.unmergeBy(function(Ue){return Ue.isLoop()});for(var L=m.length,T=function(Ue){var Ze=P.get(Ue.id());return Ze||(Ze={},P.set(Ue.id(),Ze)),Ze},j=function(Ue){return(nn(Ue)?p.$(Ue):Ue)[0]},I=function(Ue){return T(j(Ue)).dist},D=function(Ue){for(var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f,mt=j(Ue),st=[],Ot=mt;;){if(Ot==null)return r.spawn();var At=T(Ot),Rt=At.edge,zt=At.pred;if(st.unshift(Ot[0]),Ot.same(Ze)&&st.length>0)break;Rt!=null&&st.unshift(Rt),Ot=zt}return d.spawn(st)},R=0;R<k;R++){var Y=w[R],G=T(Y);Y.same(f)?G.dist=0:G.dist=1/0,G.pred=null,G.edge=null}for(var U=!1,z=function(Ue,Ze,mt,st,Ot,At){var Rt=st.dist+At;Rt<Ot.dist&&!mt.same(st.edge)&&(Ot.dist=Rt,Ot.pred=Ue,Ot.edge=mt,U=!0)},Q=1;Q<k;Q++){U=!1;for(var $=0;$<L;$++){var Z=m[$],X=Z.source(),K=Z.target(),ae=h(Z),se=T(X),le=T(K);z(X,K,Z,se,le,ae),c||z(K,X,Z,le,se,ae)}if(!U)break}if(U)for(var he=[],fe=0;fe<L;fe++){var pe=m[fe],me=pe.source(),Te=pe.target(),Le=h(pe),ge=T(me).dist,xe=T(Te).dist;if(ge+Le<xe||!c&&xe+Le<ge)if(S||(jr("Graph contains a negative weight cycle for Bellman-Ford"),S=!0),t.findNegativeWeightCycles!==!1){var Se=[];ge+Le<xe&&Se.push(me),!c&&xe+Le<ge&&Se.push(Te);for(var Ie=Se.length,Re=0;Re<Ie;Re++){var Ne=Se[Re],Me=[Ne];Me.push(T(Ne).edge);for(var ke=T(Ne).pred;Me.indexOf(ke)===-1;)Me.push(ke),Me.push(T(ke).edge),ke=T(ke).pred;Me=Me.slice(Me.indexOf(ke));for(var Ge=Me[0].id(),Qe=0,nt=2;nt<Me.length;nt+=2)Me[nt].id()<Ge&&(Ge=Me[nt].id(),Qe=nt);Me=Me.slice(Qe).concat(Me.slice(0,Qe)),Me.push(Me[0]);var ft=Me.map(function(Ue){return Ue.id()}).join(",");he.indexOf(ft)===-1&&(M.push(d.spawn(Me)),he.push(ft))}}else break}return{distanceTo:I,pathTo:D,hasNegativeWeightCycle:S,negativeWeightCycles:M}}},due=Math.sqrt(2),pue=function(t,r,a){a.length===0&&_i("Karger-Stein must be run on a connected (sub)graph");for(var s=a[t],c=s[1],f=s[2],h=r[c],d=r[f],p=a,b=p.length-1;b>=0;b--){var m=p[b],w=m[1],k=m[2];(r[w]===h&&r[k]===d||r[w]===d&&r[k]===h)&&p.splice(b,1)}for(var P=0;P<p.length;P++){var S=p[P];S[1]===d?(p[P]=S.slice(),p[P][1]=h):S[2]===d&&(p[P]=S.slice(),p[P][2]=h)}for(var M=0;M<r.length;M++)r[M]===d&&(r[M]=h);return p},t3=function(t,r,a,s){for(;a>s;){var c=Math.floor(Math.random()*r.length);r=pue(c,t,r),a--}return r},gue={kargerStein:function(){var t=this,r=this.byGroup(),a=r.nodes,s=r.edges;s.unmergeBy(function(le){return le.isLoop()});var c=a.length,f=s.length,h=Math.ceil(Math.pow(Math.log(c)/Math.LN2,2)),d=Math.floor(c/due);if(c<2){_i("At least 2 nodes are required for Karger-Stein algorithm");return}for(var p=[],b=0;b<f;b++){var m=s[b];p.push([b,a.indexOf(m.source()),a.indexOf(m.target())])}for(var w=1/0,k=[],P=new Array(c),S=new Array(c),M=new Array(c),L=function(le,he){for(var fe=0;fe<c;fe++)he[fe]=le[fe]},T=0;T<=h;T++){for(var j=0;j<c;j++)S[j]=j;var I=t3(S,p.slice(),c,d),D=I.slice();L(S,M);var R=t3(S,I,d,2),Y=t3(M,D,d,2);R.length<=Y.length&&R.length<w?(w=R.length,k=R,L(S,P)):Y.length<=R.length&&Y.length<w&&(w=Y.length,k=Y,L(M,P))}for(var G=this.spawn(k.map(function(le){return s[le[0]]})),U=this.spawn(),z=this.spawn(),Q=P[0],$=0;$<P.length;$++){var Z=P[$],X=a[$];Z===Q?U.merge(X):z.merge(X)}var K=function(le){var he=t.spawn();return le.forEach(function(fe){he.merge(fe),fe.connectedEdges().forEach(function(pe){t.contains(pe)&&!G.contains(pe)&&he.merge(pe)})}),he},ae=[K(U),K(z)],se={cut:G,components:ae,partition1:U,partition2:z};return se}},n3,bue=function(t){return{x:t.x,y:t.y}},Km=function(t,r,a){return{x:t.x*r+a.x,y:t.y*r+a.y}},Z8=function(t,r,a){return{x:(t.x-a.x)/r,y:(t.y-a.y)/r}},xg=function(t){return{x:t[0],y:t[1]}},vue=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,s=1/0,c=r;c<a;c++){var f=t[c];isFinite(f)&&(s=Math.min(f,s))}return s},yue=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,s=-1/0,c=r;c<a;c++){var f=t[c];isFinite(f)&&(s=Math.max(f,s))}return s},mue=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,s=0,c=0,f=r;f<a;f++){var h=t[f];isFinite(h)&&(s+=h,c++)}return s/c},wue=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;s?t=t.slice(r,a):(a<t.length&&t.splice(a,t.length-a),r>0&&t.splice(0,r));for(var h=0,d=t.length-1;d>=0;d--){var p=t[d];f?isFinite(p)||(t[d]=-1/0,h++):t.splice(d,1)}c&&t.sort(function(w,k){return w-k});var b=t.length,m=Math.floor(b/2);return b%2!==0?t[m+1+h]:(t[m-1+h]+t[m+h])/2},xue=function(t){return Math.PI*t/180},Qm=function(t,r){return Math.atan2(r,t)-Math.PI/2},r3=Math.log2||function(t){return Math.log(t)/Math.log(2)},i3=function(t){return t>0?1:t<0?-1:0},Bd=function(t,r){return Math.sqrt(Rd(t,r))},Rd=function(t,r){var a=r.x-t.x,s=r.y-t.y;return a*a+s*s},kue=function(t){for(var r=t.length,a=0,s=0;s<r;s++)a+=t[s];for(var c=0;c<r;c++)t[c]=t[c]/a;return t},Xa=function(t,r,a,s){return(1-s)*(1-s)*t+2*(1-s)*s*r+s*s*a},kg=function(t,r,a,s){return{x:Xa(t.x,r.x,a.x,s),y:Xa(t.y,r.y,a.y,s)}},_ue=function(t,r,a,s){var c={x:r.x-t.x,y:r.y-t.y},f=Bd(t,r),h={x:c.x/f,y:c.y/f};return a=a??0,s=s??a*f,{x:t.x+h.x*s,y:t.y+h.y*s}},s0=function(t,r,a){return Math.max(t,Math.min(a,r))},Qo=function(t){if(t==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(t.x1!=null&&t.y1!=null){if(t.x2!=null&&t.y2!=null&&t.x2>=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(t.w!=null&&t.h!=null&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},Eue=function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},Cue=function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},Pue=function(t,r){t.x1=Math.min(t.x1,r.x1),t.x2=Math.max(t.x2,r.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r.y1),t.y2=Math.max(t.y2,r.y2),t.h=t.y2-t.y1},$8=function(t,r,a){t.x1=Math.min(t.x1,r),t.x2=Math.max(t.x2,r),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,a),t.y2=Math.max(t.y2,a),t.h=t.y2-t.y1},Wm=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.x1-=r,t.x2+=r,t.y1-=r,t.y2+=r,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},Jm=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,s,c,f;if(r.length===1)a=s=c=f=r[0];else if(r.length===2)a=c=r[0],f=s=r[1];else if(r.length===4){var h=ma(r,4);a=h[0],s=h[1],c=h[2],f=h[3]}return t.x1-=f,t.x2+=s,t.y1-=a,t.y2+=c,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},K8=function(t,r){t.x1=r.x1,t.y1=r.y1,t.x2=r.x2,t.y2=r.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},a3=function(t,r){return!(t.x1>r.x2||r.x1>t.x2||t.x2<r.x1||r.x2<t.x1||t.y2<r.y1||r.y2<t.y1||t.y1>r.y2||r.y1>t.y2)},fh=function(t,r,a){return t.x1<=r&&r<=t.x2&&t.y1<=a&&a<=t.y2},Q8=function(t,r){return fh(t,r.x,r.y)},W8=function(t,r){return fh(t,r.x1,r.y1)&&fh(t,r.x2,r.y2)},Sue=(n3=Math.hypot)!==null&&n3!==void 0?n3:function(t,r){return Math.sqrt(t*t+r*r)};function Nue(t,r){if(t.length<3)throw new Error("Need at least 3 vertices");var a=function(G,U){return{x:G.x+U.x,y:G.y+U.y}},s=function(G,U){return{x:G.x-U.x,y:G.y-U.y}},c=function(G,U){return{x:G.x*U,y:G.y*U}},f=function(G,U){return G.x*U.y-G.y*U.x},h=function(G){var U=Sue(G.x,G.y);return U===0?{x:0,y:0}:{x:G.x/U,y:G.y/U}},d=function(G){for(var U=0,z=0;z<G.length;z++){var Q=G[z],$=G[(z+1)%G.length];U+=Q.x*$.y-$.x*Q.y}return U/2},p=function(G,U,z,Q){var $=s(U,G),Z=s(Q,z),X=f($,Z);if(Math.abs(X)<1e-9)return a(G,c($,.5));var K=f(s(z,G),Z)/X;return a(G,c($,K))},b=t.map(function(G){return{x:G.x,y:G.y}});d(b)<0&&b.reverse();for(var m=b.length,w=[],k=0;k<m;k++){var P=b[k],S=b[(k+1)%m],M=s(S,P),L=h({x:M.y,y:-M.x});w.push(L)}for(var T=w.map(function(G,U){var z=a(b[U],c(G,r)),Q=a(b[(U+1)%m],c(G,r));return{p1:z,p2:Q}}),j=[],I=0;I<m;I++){var D=T[(I-1+m)%m],R=T[I],Y=p(D.p1,D.p2,R.p1,R.p2);j.push(Y)}return j}function Tue(t,r,a,s,c,f){var h=Rue(t,r,a,s,c),d=Nue(h,f),p=Qo();return d.forEach(function(b){return $8(p,b.x,b.y)}),p}var J8=function(t,r,a,s,c,f,h){var d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",p=d==="auto"?dh(c,f):d,b=c/2,m=f/2;p=Math.min(p,b,m);var w=p!==b,k=p!==m,P;if(w){var S=a-b+p-h,M=s-m-h,L=a+b-p+h,T=M;if(P=hh(t,r,a,s,S,M,L,T,!1),P.length>0)return P}if(k){var j=a+b+h,I=s-m+p-h,D=j,R=s+m-p+h;if(P=hh(t,r,a,s,j,I,D,R,!1),P.length>0)return P}if(w){var Y=a-b+p-h,G=s+m+h,U=a+b-p+h,z=G;if(P=hh(t,r,a,s,Y,G,U,z,!1),P.length>0)return P}if(k){var Q=a-b-h,$=s-m+p-h,Z=Q,X=s+m-p+h;if(P=hh(t,r,a,s,Q,$,Z,X,!1),P.length>0)return P}var K;{var ae=a-b+p,se=s-m+p;if(K=u0(t,r,a,s,ae,se,p+h),K.length>0&&K[0]<=ae&&K[1]<=se)return[K[0],K[1]]}{var le=a+b-p,he=s-m+p;if(K=u0(t,r,a,s,le,he,p+h),K.length>0&&K[0]>=le&&K[1]<=he)return[K[0],K[1]]}{var fe=a+b-p,pe=s+m-p;if(K=u0(t,r,a,s,fe,pe,p+h),K.length>0&&K[0]>=fe&&K[1]>=pe)return[K[0],K[1]]}{var me=a-b+p,Te=s+m-p;if(K=u0(t,r,a,s,me,Te,p+h),K.length>0&&K[0]<=me&&K[1]>=Te)return[K[0],K[1]]}return[]},Mue=function(t,r,a,s,c,f,h){var d=h,p=Math.min(a,c),b=Math.max(a,c),m=Math.min(s,f),w=Math.max(s,f);return p-d<=t&&t<=b+d&&m-d<=r&&r<=w+d},jue=function(t,r,a,s,c,f,h,d,p){var b={x1:Math.min(a,h,c)-p,x2:Math.max(a,h,c)+p,y1:Math.min(s,d,f)-p,y2:Math.max(s,d,f)+p};return!(t<b.x1||t>b.x2||r<b.y1||r>b.y2)},Aue=function(t,r,a,s){a-=s;var c=r*r-4*t*a;if(c<0)return[];var f=Math.sqrt(c),h=2*t,d=(-r+f)/h,p=(-r-f)/h;return[d,p]},Iue=function(t,r,a,s,c){var f=1e-5;t===0&&(t=f),r/=t,a/=t,s/=t;var h,d,p,b,m,w,k,P;if(d=(3*a-r*r)/9,p=-(27*s)+r*(9*a-2*(r*r)),p/=54,h=d*d*d+p*p,c[1]=0,k=r/3,h>0){m=p+Math.sqrt(h),m=m<0?-Math.pow(-m,1/3):Math.pow(m,1/3),w=p-Math.sqrt(h),w=w<0?-Math.pow(-w,1/3):Math.pow(w,1/3),c[0]=-k+m+w,k+=(m+w)/2,c[4]=c[2]=-k,k=Math.sqrt(3)*(-w+m)/2,c[3]=k,c[5]=-k;return}if(c[5]=c[3]=0,h===0){P=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),c[0]=-k+2*P,c[4]=c[2]=-(P+k);return}d=-d,b=d*d*d,b=Math.acos(p/Math.sqrt(b)),P=2*Math.sqrt(d),c[0]=-k+P*Math.cos(b/3),c[2]=-k+P*Math.cos((b+2*Math.PI)/3),c[4]=-k+P*Math.cos((b+4*Math.PI)/3)},Lue=function(t,r,a,s,c,f,h,d){var p=1*a*a-4*a*c+2*a*h+4*c*c-4*c*h+h*h+s*s-4*s*f+2*s*d+4*f*f-4*f*d+d*d,b=1*9*a*c-3*a*a-3*a*h-6*c*c+3*c*h+9*s*f-3*s*s-3*s*d-6*f*f+3*f*d,m=1*3*a*a-6*a*c+a*h-a*t+2*c*c+2*c*t-h*t+3*s*s-6*s*f+s*d-s*r+2*f*f+2*f*r-d*r,w=1*a*c-a*a+a*t-c*t+s*f-s*s+s*r-f*r,k=[];Iue(p,b,m,w,k);for(var P=1e-7,S=[],M=0;M<6;M+=2)Math.abs(k[M+1])<P&&k[M]>=0&&k[M]<=1&&S.push(k[M]);S.push(1),S.push(0);for(var L=-1,T,j,I,D=0;D<S.length;D++)T=Math.pow(1-S[D],2)*a+2*(1-S[D])*S[D]*c+S[D]*S[D]*h,j=Math.pow(1-S[D],2)*s+2*(1-S[D])*S[D]*f+S[D]*S[D]*d,I=Math.pow(T-t,2)+Math.pow(j-r,2),L>=0?I<L&&(L=I):L=I;return L},Oue=function(t,r,a,s,c,f){var h=[t-a,r-s],d=[c-a,f-s],p=d[0]*d[0]+d[1]*d[1],b=h[0]*h[0]+h[1]*h[1],m=h[0]*d[0]+h[1]*d[1],w=m*m/p;return m<0?b:w>p?(t-c)*(t-c)+(r-f)*(r-f):b-w},Ms=function(t,r,a){for(var s,c,f,h,d,p=0,b=0;b<a.length/2;b++)if(s=a[b*2],c=a[b*2+1],b+1<a.length/2?(f=a[(b+1)*2],h=a[(b+1)*2+1]):(f=a[(b+1-a.length/2)*2],h=a[(b+1-a.length/2)*2+1]),!(s==t&&f==t))if(s>=t&&t>=f||s<=t&&t<=f)d=(t-s)/(f-s)*(h-c)+c,d>r&&p++;else continue;return p%2!==0},nf=function(t,r,a,s,c,f,h,d,p){var b=new Array(a.length),m;d[0]!=null?(m=Math.atan(d[1]/d[0]),d[0]<0?m=m+Math.PI/2:m=-m-Math.PI/2):m=d;for(var w=Math.cos(-m),k=Math.sin(-m),P=0;P<b.length/2;P++)b[P*2]=f/2*(a[P*2]*w-a[P*2+1]*k),b[P*2+1]=h/2*(a[P*2+1]*w+a[P*2]*k),b[P*2]+=s,b[P*2+1]+=c;var S;if(p>0){var M=ew(b,-p);S=Xm(M)}else S=b;return Ms(t,r,S)},Due=function(t,r,a,s,c,f,h,d){for(var p=new Array(a.length*2),b=0;b<d.length;b++){var m=d[b];p[b*4+0]=m.startX,p[b*4+1]=m.startY,p[b*4+2]=m.stopX,p[b*4+3]=m.stopY;var w=Math.pow(m.cx-t,2)+Math.pow(m.cy-r,2);if(w<=Math.pow(m.radius,2))return!0}return Ms(t,r,p)},Xm=function(t){for(var r=new Array(t.length/2),a,s,c,f,h,d,p,b,m=0;m<t.length/4;m++){a=t[m*4],s=t[m*4+1],c=t[m*4+2],f=t[m*4+3],m<t.length/4-1?(h=t[(m+1)*4],d=t[(m+1)*4+1],p=t[(m+1)*4+2],b=t[(m+1)*4+3]):(h=t[0],d=t[1],p=t[2],b=t[3]);var w=hh(a,s,c,f,h,d,p,b,!0);r[m*2]=w[0],r[m*2+1]=w[1]}return r},ew=function(t,r){for(var a=new Array(t.length*2),s,c,f,h,d=0;d<t.length/2;d++){s=t[d*2],c=t[d*2+1],d<t.length/2-1?(f=t[(d+1)*2],h=t[(d+1)*2+1]):(f=t[0],h=t[1]);var p=h-c,b=-(f-s),m=Math.sqrt(p*p+b*b),w=p/m,k=b/m;a[d*4]=s+w*r,a[d*4+1]=c+k*r,a[d*4+2]=f+w*r,a[d*4+3]=h+k*r}return a},Bue=function(t,r,a,s,c,f){var h=a-t,d=s-r;h/=c,d/=f;var p=Math.sqrt(h*h+d*d),b=p-1;if(b<0)return[];var m=b/p;return[(a-t)*m+t,(s-r)*m+r]},Gd=function(t,r,a,s,c,f,h){return t-=c,r-=f,t/=a/2+h,r/=s/2+h,t*t+r*r<=1},u0=function(t,r,a,s,c,f,h){var d=[a-t,s-r],p=[t-c,r-f],b=d[0]*d[0]+d[1]*d[1],m=2*(p[0]*d[0]+p[1]*d[1]),w=p[0]*p[0]+p[1]*p[1]-h*h,k=m*m-4*b*w;if(k<0)return[];var P=(-m+Math.sqrt(k))/(2*b),S=(-m-Math.sqrt(k))/(2*b),M=Math.min(P,S),L=Math.max(P,S),T=[];if(M>=0&&M<=1&&T.push(M),L>=0&&L<=1&&T.push(L),T.length===0)return[];var j=T[0]*d[0]+t,I=T[0]*d[1]+r;if(T.length>1){if(T[0]==T[1])return[j,I];var D=T[1]*d[0]+t,R=T[1]*d[1]+r;return[j,I,D,R]}else return[j,I]},o3=function(t,r,a){return r<=t&&t<=a||a<=t&&t<=r?t:t<=r&&r<=a||a<=r&&r<=t?r:a},hh=function(t,r,a,s,c,f,h,d,p){var b=t-c,m=a-t,w=h-c,k=r-f,P=s-r,S=d-f,M=w*k-S*b,L=m*k-P*b,T=S*m-w*P;if(T!==0){var j=M/T,I=L/T,D=.001,R=0-D,Y=1+D;return R<=j&&j<=Y&&R<=I&&I<=Y?[t+j*m,r+j*P]:p?[t+j*m,r+j*P]:[]}else return M===0||L===0?o3(t,a,h)===h?[h,d]:o3(t,a,c)===c?[c,f]:o3(c,h,a)===a?[a,s]:[]:[]},Rue=function(t,r,a,s,c){var f=[],h=s/2,d=c/2,p=r,b=a;f.push({x:p+h*t[0],y:b+d*t[1]});for(var m=1;m<t.length/2;m++)f.push({x:p+h*t[m*2],y:b+d*t[m*2+1]});return f},c0=function(t,r,a,s,c,f,h,d){var p=[],b,m=new Array(a.length),w=!0;f==null&&(w=!1);var k;if(w){for(var P=0;P<m.length/2;P++)m[P*2]=a[P*2]*f+s,m[P*2+1]=a[P*2+1]*h+c;if(d>0){var S=ew(m,-d);k=Xm(S)}else k=m}else k=a;for(var M,L,T,j,I=0;I<k.length/2;I++)M=k[I*2],L=k[I*2+1],I<k.length/2-1?(T=k[(I+1)*2],j=k[(I+1)*2+1]):(T=k[0],j=k[1]),b=hh(t,r,s,c,M,L,T,j),b.length!==0&&p.push(b[0],b[1]);return p},Gue=function(t,r,a,s,c,f,h,d,p){var b=[],m,w=new Array(a.length*2);p.forEach(function(T,j){j===0?(w[w.length-2]=T.startX,w[w.length-1]=T.startY):(w[j*4-2]=T.startX,w[j*4-1]=T.startY),w[j*4]=T.stopX,w[j*4+1]=T.stopY,m=u0(t,r,s,c,T.cx,T.cy,T.radius),m.length!==0&&b.push(m[0],m[1])});for(var k=0;k<w.length/4;k++)m=hh(t,r,s,c,w[k*4],w[k*4+1],w[k*4+2],w[k*4+3],!1),m.length!==0&&b.push(m[0],m[1]);if(b.length>2){for(var P=[b[0],b[1]],S=Math.pow(P[0]-t,2)+Math.pow(P[1]-r,2),M=1;M<b.length/2;M++){var L=Math.pow(b[M*2]-t,2)+Math.pow(b[M*2+1]-r,2);L<=S&&(P[0]=b[M*2],P[1]=b[M*2+1],S=L)}return P}return b},tw=function(t,r,a){var s=[t[0]-r[0],t[1]-r[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),f=(c-a)/c;return f<0&&(f=1e-5),[r[0]+f*s[0],r[1]+f*s[1]]},Wo=function(t,r){var a=s3(t,r);return a=X8(a),a},X8=function(t){for(var r,a,s=t.length/2,c=1/0,f=1/0,h=-1/0,d=-1/0,p=0;p<s;p++)r=t[2*p],a=t[2*p+1],c=Math.min(c,r),h=Math.max(h,r),f=Math.min(f,a),d=Math.max(d,a);for(var b=2/(h-c),m=2/(d-f),w=0;w<s;w++)r=t[2*w]=t[2*w]*b,a=t[2*w+1]=t[2*w+1]*m,c=Math.min(c,r),h=Math.max(h,r),f=Math.min(f,a),d=Math.max(d,a);if(f<-1)for(var k=0;k<s;k++)a=t[2*k+1]=t[2*k+1]+(-1-f);return t},s3=function(t,r){var a=1/t*2*Math.PI,s=t%2===0?Math.PI/2+a/2:Math.PI/2;s+=r;for(var c=new Array(t*2),f,h=0;h<t;h++)f=h*a+s,c[2*h]=Math.cos(f),c[2*h+1]=Math.sin(-f);return c},dh=function(t,r){return Math.min(t/4,r/4,8)},eO=function(t,r){return Math.min(t/10,r/10,8)},u3=function(){return 8},Hue=function(t,r,a){return[t-2*r+a,2*(r-t),t]},c3=function(t,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*t),ctrlPtOffsetPct:.05}};function l3(t,r){function a(w){for(var k=[],P=0;P<w.length;P++){var S=w[P],M=w[(P+1)%w.length],L={x:M.x-S.x,y:M.y-S.y},T={x:-L.y,y:L.x},j=Math.sqrt(T.x*T.x+T.y*T.y);k.push({x:T.x/j,y:T.y/j})}return k}function s(w,k){var P=1/0,S=-1/0,M=Ns(w),L;try{for(M.s();!(L=M.n()).done;){var T=L.value,j=T.x*k.x+T.y*k.y;P=Math.min(P,j),S=Math.max(S,j)}}catch(I){M.e(I)}finally{M.f()}return{min:P,max:S}}function c(w,k){return!(w.max<k.min||k.max<w.min)}var f=[].concat(Hm(a(t)),Hm(a(r))),h=Ns(f),d;try{for(h.s();!(d=h.n()).done;){var p=d.value,b=s(t,p),m=s(r,p);if(!c(b,m))return!1}}catch(w){h.e(w)}finally{h.f()}return!0}var zue=yo({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(t){return 1}}),Uue={pageRank:function(t){for(var r=zue(t),a=r.dampingFactor,s=r.precision,c=r.iterations,f=r.weight,h=this._private.cy,d=this.byGroup(),p=d.nodes,b=d.edges,m=p.length,w=m*m,k=b.length,P=new Array(w),S=new Array(m),M=(1-a)/m,L=0;L<m;L++){for(var T=0;T<m;T++){var j=L*m+T;P[j]=0}S[L]=0}for(var I=0;I<k;I++){var D=b[I],R=D.data("source"),Y=D.data("target");if(R!==Y){var G=p.indexOfId(R),U=p.indexOfId(Y),z=f(D),Q=U*m+G;P[Q]+=z,S[G]+=z}}for(var $=1/m+M,Z=0;Z<m;Z++)if(S[Z]===0)for(var X=0;X<m;X++){var K=X*m+Z;P[K]=$}else for(var ae=0;ae<m;ae++){var se=ae*m+Z;P[se]=P[se]/S[Z]+M}for(var le=new Array(m),he=new Array(m),fe,pe=0;pe<m;pe++)le[pe]=1;for(var me=0;me<c;me++){for(var Te=0;Te<m;Te++)he[Te]=0;for(var Le=0;Le<m;Le++)for(var ge=0;ge<m;ge++){var xe=Le*m+ge;he[Le]+=P[xe]*le[ge]}kue(he),fe=le,le=he,he=fe;for(var Se=0,Ie=0;Ie<m;Ie++){var Re=fe[Ie]-le[Ie];Se+=Re*Re}if(Se<s)break}var Ne={rank:function(Me){return Me=h.collection(Me)[0],le[p.indexOf(Me)]}};return Ne}},tO=yo({root:null,weight:function(t){return 1},directed:!1,alpha:0}),_g={degreeCentralityNormalized:function(t){t=tO(t);var r=this.cy(),a=this.nodes(),s=a.length;if(t.directed){for(var c={},f={},h=0,d=0,p=0;p<s;p++){var b=a[p],m=b.id();t.root=b;var w=this.degreeCentrality(t);h<w.indegree&&(h=w.indegree),d<w.outdegree&&(d=w.outdegree),c[m]=w.indegree,f[m]=w.outdegree}return{indegree:function(T){return h==0?0:(nn(T)&&(T=r.filter(T)),c[T.id()]/h)},outdegree:function(T){return d===0?0:(nn(T)&&(T=r.filter(T)),f[T.id()]/d)}}}else{for(var k={},P=0,S=0;S<s;S++){var M=a[S];t.root=M;var L=this.degreeCentrality(t);P<L.degree&&(P=L.degree),k[M.id()]=L.degree}return{degree:function(T){return P===0?0:(nn(T)&&(T=r.filter(T)),k[T.id()]/P)}}}},degreeCentrality:function(t){t=tO(t);var r=this.cy(),a=this,s=t,c=s.root,f=s.weight,h=s.directed,d=s.alpha;if(c=r.collection(c)[0],h){for(var p=c.connectedEdges(),b=p.filter(function(R){return R.target().same(c)&&a.has(R)}),m=p.filter(function(R){return R.source().same(c)&&a.has(R)}),w=b.length,k=m.length,P=0,S=0,M=0;M<b.length;M++)P+=f(b[M]);for(var L=0;L<m.length;L++)S+=f(m[L]);return{indegree:Math.pow(w,1-d)*Math.pow(P,d),outdegree:Math.pow(k,1-d)*Math.pow(S,d)}}else{for(var T=c.connectedEdges().intersection(a),j=T.length,I=0,D=0;D<T.length;D++)I+=f(T[D]);return{degree:Math.pow(j,1-d)*Math.pow(I,d)}}}};_g.dc=_g.degreeCentrality,_g.dcn=_g.degreeCentralityNormalised=_g.degreeCentralityNormalized;var nO=yo({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Eg={closenessCentralityNormalized:function(t){for(var r=nO(t),a=r.harmonic,s=r.weight,c=r.directed,f=this.cy(),h={},d=0,p=this.nodes(),b=this.floydWarshall({weight:s,directed:c}),m=0;m<p.length;m++){for(var w=0,k=p[m],P=0;P<p.length;P++)if(m!==P){var S=b.distance(k,p[P]);a?w+=1/S:w+=S}a||(w=1/w),d<w&&(d=w),h[k.id()]=w}return{closeness:function(M){return d==0?0:(nn(M)?M=f.filter(M)[0].id():M=M.id(),h[M]/d)}}},closenessCentrality:function(t){var r=nO(t),a=r.root,s=r.weight,c=r.directed,f=r.harmonic;a=this.filter(a)[0];for(var h=this.dijkstra({root:a,weight:s,directed:c}),d=0,p=this.nodes(),b=0;b<p.length;b++){var m=p[b];if(!m.same(a)){var w=h.distanceTo(m);f?d+=1/w:d+=w}}return f?d:1/d}};Eg.cc=Eg.closenessCentrality,Eg.ccn=Eg.closenessCentralityNormalised=Eg.closenessCentralityNormalized;var Fue=yo({weight:null,directed:!1}),f3={betweennessCentrality:function(t){for(var r=Fue(t),a=r.directed,s=r.weight,c=s!=null,f=this.cy(),h=this.nodes(),d={},p={},b=0,m={set:function(T,j){p[T]=j,j>b&&(b=j)},get:function(T){return p[T]}},w=0;w<h.length;w++){var k=h[w],P=k.id();a?d[P]=k.outgoers().nodes():d[P]=k.openNeighborhood().nodes(),m.set(P,0)}for(var S=function(){for(var T=h[M].id(),j=[],I={},D={},R={},Y=new o0(function(Te,Le){return R[Te]-R[Le]}),G=0;G<h.length;G++){var U=h[G].id();I[U]=[],D[U]=0,R[U]=1/0}for(D[T]=1,R[T]=0,Y.push(T);!Y.empty();){var z=Y.pop();if(j.push(z),c)for(var Q=0;Q<d[z].length;Q++){var $=d[z][Q],Z=f.getElementById(z),X=void 0;Z.edgesTo($).length>0?X=Z.edgesTo($)[0]:X=$.edgesTo(Z)[0];var K=s(X);$=$.id(),R[$]>R[z]+K&&(R[$]=R[z]+K,Y.nodes.indexOf($)<0?Y.push($):Y.updateItem($),D[$]=0,I[$]=[]),R[$]==R[z]+K&&(D[$]=D[$]+D[z],I[$].push(z))}else for(var ae=0;ae<d[z].length;ae++){var se=d[z][ae].id();R[se]==1/0&&(Y.push(se),R[se]=R[z]+1),R[se]==R[z]+1&&(D[se]=D[se]+D[z],I[se].push(z))}}for(var le={},he=0;he<h.length;he++)le[h[he].id()]=0;for(;j.length>0;){for(var fe=j.pop(),pe=0;pe<I[fe].length;pe++){var me=I[fe][pe];le[me]=le[me]+D[me]/D[fe]*(1+le[fe])}fe!=h[M].id()&&m.set(fe,m.get(fe)+le[fe])}},M=0;M<h.length;M++)S();var L={betweenness:function(T){var j=f.collection(T).id();return m.get(j)},betweennessNormalized:function(T){if(b==0)return 0;var j=f.collection(T).id();return m.get(j)/b}};return L.betweennessNormalised=L.betweennessNormalized,L}};f3.bc=f3.betweennessCentrality;var Yue=yo({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),Vue=function(t){return Yue(t)},que=function(t,r){for(var a=0,s=0;s<r.length;s++)a+=r[s](t);return a},Zue=function(t,r,a){for(var s=0;s<r;s++)t[s*r+s]=a},rO=function(t,r){for(var a,s=0;s<r;s++){a=0;for(var c=0;c<r;c++)a+=t[c*r+s];for(var f=0;f<r;f++)t[f*r+s]=t[f*r+s]/a}},$ue=function(t,r,a){for(var s=new Array(a*a),c=0;c<a;c++){for(var f=0;f<a;f++)s[c*a+f]=0;for(var h=0;h<a;h++)for(var d=0;d<a;d++)s[c*a+d]+=t[c*a+h]*r[h*a+d]}return s},Kue=function(t,r,a){for(var s=t.slice(0),c=1;c<a;c++)t=$ue(t,s,r);return t},Que=function(t,r,a){for(var s=new Array(r*r),c=0;c<r*r;c++)s[c]=Math.pow(t[c],a);return rO(s,r),s},Wue=function(t,r,a,s){for(var c=0;c<a;c++){var f=Math.round(t[c]*Math.pow(10,s))/Math.pow(10,s),h=Math.round(r[c]*Math.pow(10,s))/Math.pow(10,s);if(f!==h)return!1}return!0},Jue=function(t,r,a,s){for(var c=[],f=0;f<r;f++){for(var h=[],d=0;d<r;d++)Math.round(t[f*r+d]*1e3)/1e3>0&&h.push(a[d]);h.length!==0&&c.push(s.collection(h))}return c},Xue=function(t,r){for(var a=0;a<t.length;a++)if(!r[a]||t[a].id()!==r[a].id())return!1;return!0},ece=function(t){for(var r=0;r<t.length;r++)for(var a=0;a<t.length;a++)r!=a&&Xue(t[r],t[a])&&t.splice(a,1);return t},iO=function(t){for(var r=this.nodes(),a=this.edges(),s=this.cy(),c=Vue(t),f={},h=0;h<r.length;h++)f[r[h].id()]=h;for(var d=r.length,p=d*d,b=new Array(p),m,w=0;w<p;w++)b[w]=0;for(var k=0;k<a.length;k++){var P=a[k],S=f[P.source().id()],M=f[P.target().id()],L=que(P,c.attributes);b[S*d+M]+=L,b[M*d+S]+=L}Zue(b,d,c.multFactor),rO(b,d);for(var T=!0,j=0;T&&j<c.maxIterations;)T=!1,m=Kue(b,d,c.expandFactor),b=Que(m,d,c.inflateFactor),Wue(b,m,p,4)||(T=!0),j++;var I=Jue(b,d,r,s);return I=ece(I),I},tce={markovClustering:iO,mcl:iO},nce=function(t){return t},aO=function(t,r){return Math.abs(r-t)},oO=function(t,r,a){return t+aO(r,a)},sO=function(t,r,a){return t+Math.pow(a-r,2)},rce=function(t){return Math.sqrt(t)},ice=function(t,r,a){return Math.max(t,aO(r,a))},l0=function(t,r,a,s,c){for(var f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:nce,h=s,d,p,b=0;b<t;b++)d=r(b),p=a(b),h=c(h,d,p);return f(h)},Cg={euclidean:function(t,r,a){return t>=2?l0(t,r,a,0,sO,rce):l0(t,r,a,0,oO)},squaredEuclidean:function(t,r,a){return l0(t,r,a,0,sO)},manhattan:function(t,r,a){return l0(t,r,a,0,oO)},max:function(t,r,a){return l0(t,r,a,-1/0,ice)}};Cg["squared-euclidean"]=Cg.squaredEuclidean,Cg.squaredeuclidean=Cg.squaredEuclidean;function nw(t,r,a,s,c,f){var h;return Di(t)?h=t:h=Cg[t]||Cg.euclidean,r===0&&Di(t)?h(c,f):h(r,a,s,c,f)}var ace=yo({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),h3=function(t){return ace(t)},rw=function(t,r,a,s,c){var f=c!=="kMedoids",h=f?function(m){return a[m]}:function(m){return s[m](a)},d=function(m){return s[m](r)},p=a,b=r;return nw(t,s.length,h,d,p,b)},p3=function(t,r,a){for(var s=a.length,c=new Array(s),f=new Array(s),h=new Array(r),d=null,p=0;p<s;p++)c[p]=t.min(a[p]).value,f[p]=t.max(a[p]).value;for(var b=0;b<r;b++){d=[];for(var m=0;m<s;m++)d[m]=Math.random()*(f[m]-c[m])+c[m];h[b]=d}return h},uO=function(t,r,a,s,c){for(var f=1/0,h=0,d=0;d<r.length;d++){var p=rw(a,t,r[d],s,c);p<f&&(f=p,h=d)}return h},cO=function(t,r,a){for(var s=[],c=null,f=0;f<r.length;f++)c=r[f],a[c.id()]===t&&s.push(c);return s},oce=function(t,r,a){return Math.abs(r-t)<=a},sce=function(t,r,a){for(var s=0;s<t.length;s++)for(var c=0;c<t[s].length;c++){var f=Math.abs(t[s][c]-r[s][c]);if(f>a)return!1}return!0},uce=function(t,r,a){for(var s=0;s<a;s++)if(t===r[s])return!0;return!1},lO=function(t,r){var a=new Array(r);if(t.length<50)for(var s=0;s<r;s++){for(var c=t[Math.floor(Math.random()*t.length)];uce(c,a,s);)c=t[Math.floor(Math.random()*t.length)];a[s]=c}else for(var f=0;f<r;f++)a[f]=t[Math.floor(Math.random()*t.length)];return a},fO=function(t,r,a){for(var s=0,c=0;c<r.length;c++)s+=rw("manhattan",r[c],t,a,"kMedoids");return s},cce=function(t){var r=this.cy(),a=this.nodes(),s=null,c=h3(t),f=new Array(c.k),h={},d;c.testMode?typeof c.testCentroids=="number"?(c.testCentroids,d=p3(a,c.k,c.attributes)):La(c.testCentroids)==="object"?d=c.testCentroids:d=p3(a,c.k,c.attributes):d=p3(a,c.k,c.attributes);for(var p=!0,b=0;p&&b<c.maxIterations;){for(var m=0;m<a.length;m++)s=a[m],h[s.id()]=uO(s,d,c.distance,c.attributes,"kMeans");p=!1;for(var w=0;w<c.k;w++){var k=cO(w,a,h);if(k.length!==0){for(var P=c.attributes.length,S=d[w],M=new Array(P),L=new Array(P),T=0;T<P;T++){L[T]=0;for(var j=0;j<k.length;j++)s=k[j],L[T]+=c.attributes[T](s);M[T]=L[T]/k.length,oce(M[T],S[T],c.sensitivityThreshold)||(p=!0)}d[w]=M,f[w]=r.collection(k)}}b++}return f},lce=function(t){var r=this.cy(),a=this.nodes(),s=null,c=h3(t),f=new Array(c.k),h,d={},p,b=new Array(c.k);c.testMode?typeof c.testCentroids=="number"||(La(c.testCentroids)==="object"?h=c.testCentroids:h=lO(a,c.k)):h=lO(a,c.k);for(var m=!0,w=0;m&&w<c.maxIterations;){for(var k=0;k<a.length;k++)s=a[k],d[s.id()]=uO(s,h,c.distance,c.attributes,"kMedoids");m=!1;for(var P=0;P<h.length;P++){var S=cO(P,a,d);if(S.length!==0){b[P]=fO(h[P],S,c.attributes);for(var M=0;M<S.length;M++)p=fO(S[M],S,c.attributes),p<b[P]&&(b[P]=p,h[P]=S[M],m=!0);f[P]=r.collection(S)}}w++}return f},fce=function(t,r,a,s,c){for(var f,h,d=0;d<r.length;d++)for(var p=0;p<t.length;p++)s[d][p]=Math.pow(a[d][p],c.m);for(var b=0;b<t.length;b++)for(var m=0;m<c.attributes.length;m++){f=0,h=0;for(var w=0;w<r.length;w++)f+=s[w][b]*c.attributes[m](r[w]),h+=s[w][b];t[b][m]=f/h}},hce=function(t,r,a,s,c){for(var f=0;f<t.length;f++)r[f]=t[f].slice();for(var h,d,p,b=2/(c.m-1),m=0;m<a.length;m++)for(var w=0;w<s.length;w++){h=0;for(var k=0;k<a.length;k++)d=rw(c.distance,s[w],a[m],c.attributes,"cmeans"),p=rw(c.distance,s[w],a[k],c.attributes,"cmeans"),h+=Math.pow(d/p,b);t[w][m]=1/h}},dce=function(t,r,a,s){for(var c=new Array(a.k),f=0;f<c.length;f++)c[f]=[];for(var h,d,p=0;p<r.length;p++){h=-1/0,d=-1;for(var b=0;b<r[0].length;b++)r[p][b]>h&&(h=r[p][b],d=b);c[d].push(t[p])}for(var m=0;m<c.length;m++)c[m]=s.collection(c[m]);return c},hO=function(t){var r=this.cy(),a=this.nodes(),s=h3(t),c,f,h,d,p;d=new Array(a.length);for(var b=0;b<a.length;b++)d[b]=new Array(s.k);h=new Array(a.length);for(var m=0;m<a.length;m++)h[m]=new Array(s.k);for(var w=0;w<a.length;w++){for(var k=0,P=0;P<s.k;P++)h[w][P]=Math.random(),k+=h[w][P];for(var S=0;S<s.k;S++)h[w][S]=h[w][S]/k}f=new Array(s.k);for(var M=0;M<s.k;M++)f[M]=new Array(s.attributes.length);p=new Array(a.length);for(var L=0;L<a.length;L++)p[L]=new Array(s.k);for(var T=!0,j=0;T&&j<s.maxIterations;)T=!1,fce(f,a,h,p,s),hce(h,d,f,a,s),sce(h,d,s.sensitivityThreshold)||(T=!0),j++;return c=dce(a,h,s,r),{clusters:c,degreeOfMembership:h}},pce={kMeans:cce,kMedoids:lce,fuzzyCMeans:hO,fcm:hO},gce=yo({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),bce={single:"min",complete:"max"},vce=function(t){var r=gce(t),a=bce[r.linkage];return a!=null&&(r.linkage=a),r},dO=function(t,r,a,s,c){for(var f=0,h=1/0,d,p=c.attributes,b=function(G,U){return nw(c.distance,p.length,function(z){return p[z](G)},function(z){return p[z](U)},G,U)},m=0;m<t.length;m++){var w=t[m].key,k=a[w][s[w]];k<h&&(f=w,h=k)}if(c.mode==="threshold"&&h>=c.threshold||c.mode==="dendrogram"&&t.length===1)return!1;var P=r[f],S=r[s[f]],M;c.mode==="dendrogram"?M={left:P,right:S,key:P.key}:M={value:P.value.concat(S.value),key:P.key},t[P.index]=M,t.splice(S.index,1),r[P.key]=M;for(var L=0;L<t.length;L++){var T=t[L];P.key===T.key?d=1/0:c.linkage==="min"?(d=a[P.key][T.key],a[P.key][T.key]>a[S.key][T.key]&&(d=a[S.key][T.key])):c.linkage==="max"?(d=a[P.key][T.key],a[P.key][T.key]<a[S.key][T.key]&&(d=a[S.key][T.key])):c.linkage==="mean"?d=(a[P.key][T.key]*P.size+a[S.key][T.key]*S.size)/(P.size+S.size):c.mode==="dendrogram"?d=b(T.value,P.value):d=b(T.value[0],P.value[0]),a[P.key][T.key]=a[T.key][P.key]=d}for(var j=0;j<t.length;j++){var I=t[j].key;if(s[I]===P.key||s[I]===S.key){for(var D=I,R=0;R<t.length;R++){var Y=t[R].key;a[I][Y]<a[I][D]&&(D=Y)}s[I]=D}t[j].index=j}return P.key=S.key=P.index=S.index=null,!0},Pg=function(t,r,a){t&&(t.value?r.push(t.value):(t.left&&Pg(t.left,r),t.right&&Pg(t.right,r)))},g3=function(t,r){if(!t)return"";if(t.left&&t.right){var a=g3(t.left,r),s=g3(t.right,r),c=r.add({group:"nodes",data:{id:a+","+s}});return r.add({group:"edges",data:{source:a,target:c.id()}}),r.add({group:"edges",data:{source:s,target:c.id()}}),c.id()}else if(t.value)return t.value.id()},b3=function(t,r,a){if(!t)return[];var s=[],c=[],f=[];return r===0?(t.left&&Pg(t.left,s),t.right&&Pg(t.right,c),f=s.concat(c),[a.collection(f)]):r===1?t.value?[a.collection(t.value)]:(t.left&&Pg(t.left,s),t.right&&Pg(t.right,c),[a.collection(s),a.collection(c)]):t.value?[a.collection(t.value)]:(t.left&&(s=b3(t.left,r-1,a)),t.right&&(c=b3(t.right,r-1,a)),s.concat(c))},pO=function(t){for(var r=this.cy(),a=this.nodes(),s=vce(t),c=s.attributes,f=function(T,j){return nw(s.distance,c.length,function(I){return c[I](T)},function(I){return c[I](j)},T,j)},h=[],d=[],p=[],b=[],m=0;m<a.length;m++){var w={value:s.mode==="dendrogram"?a[m]:[a[m]],key:m,index:m};h[m]=w,b[m]=w,d[m]=[],p[m]=0}for(var k=0;k<h.length;k++)for(var P=0;P<=k;P++){var S=void 0;s.mode==="dendrogram"?S=k===P?1/0:f(h[k].value,h[P].value):S=k===P?1/0:f(h[k].value[0],h[P].value[0]),d[k][P]=S,d[P][k]=S,S<d[k][p[k]]&&(p[k]=P)}for(var M=dO(h,b,d,p,s);M;)M=dO(h,b,d,p,s);var L;return s.mode==="dendrogram"?(L=b3(h[0],s.dendrogramDepth,r),s.addDendrogram&&g3(h[0],r)):(L=new Array(h.length),h.forEach(function(T,j){T.key=T.index=null,L[j]=r.collection(T.value)})),L},yce={hierarchicalClustering:pO,hca:pO},mce=yo({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),wce=function(t){var r=t.damping,a=t.preference;.5<=r&&r<1||_i("Damping must range on [0.5, 1). Got: ".concat(r));var s=["median","mean","min","max"];return s.some(function(c){return c===a})||jt(a)||_i("Preference must be one of [".concat(s.map(function(c){return"'".concat(c,"'")}).join(", "),"] or a number. Got: ").concat(a)),mce(t)},xce=function(t,r,a,s){var c=function(f,h){return s[h](f)};return-nw(t,s.length,function(f){return c(r,f)},function(f){return c(a,f)},r,a)},kce=function(t,r){var a=null;return r==="median"?a=wue(t):r==="mean"?a=mue(t):r==="min"?a=vue(t):r==="max"?a=yue(t):a=r,a},_ce=function(t,r,a){for(var s=[],c=0;c<t;c++)r[c*t+c]+a[c*t+c]>0&&s.push(c);return s},gO=function(t,r,a){for(var s=[],c=0;c<t;c++){for(var f=-1,h=-1/0,d=0;d<a.length;d++){var p=a[d];r[c*t+p]>h&&(f=p,h=r[c*t+p])}f>0&&s.push(f)}for(var b=0;b<a.length;b++)s[a[b]]=a[b];return s},Ece=function(t,r,a){for(var s=gO(t,r,a),c=0;c<a.length;c++){for(var f=[],h=0;h<s.length;h++)s[h]===a[c]&&f.push(h);for(var d=-1,p=-1/0,b=0;b<f.length;b++){for(var m=0,w=0;w<f.length;w++)m+=r[f[w]*t+f[b]];m>p&&(d=b,p=m)}a[c]=f[d]}return s=gO(t,r,a),s},bO=function(t){for(var r=this.cy(),a=this.nodes(),s=wce(t),c={},f=0;f<a.length;f++)c[a[f].id()]=f;var h,d,p,b,m,w;h=a.length,d=h*h,p=new Array(d);for(var k=0;k<d;k++)p[k]=-1/0;for(var P=0;P<h;P++)for(var S=0;S<h;S++)P!==S&&(p[P*h+S]=xce(s.distance,a[P],a[S],s.attributes));b=kce(p,s.preference);for(var M=0;M<h;M++)p[M*h+M]=b;m=new Array(d);for(var L=0;L<d;L++)m[L]=0;w=new Array(d);for(var T=0;T<d;T++)w[T]=0;for(var j=new Array(h),I=new Array(h),D=new Array(h),R=0;R<h;R++)j[R]=0,I[R]=0,D[R]=0;for(var Y=new Array(h*s.minIterations),G=0;G<Y.length;G++)Y[G]=0;var U;for(U=0;U<s.maxIterations;U++){for(var z=0;z<h;z++){for(var Q=-1/0,$=-1/0,Z=-1,X=0,K=0;K<h;K++)j[K]=m[z*h+K],X=w[z*h+K]+p[z*h+K],X>=Q?($=Q,Q=X,Z=K):X>$&&($=X);for(var ae=0;ae<h;ae++)m[z*h+ae]=(1-s.damping)*(p[z*h+ae]-Q)+s.damping*j[ae];m[z*h+Z]=(1-s.damping)*(p[z*h+Z]-$)+s.damping*j[Z]}for(var se=0;se<h;se++){for(var le=0,he=0;he<h;he++)j[he]=w[he*h+se],I[he]=Math.max(0,m[he*h+se]),le+=I[he];le-=I[se],I[se]=m[se*h+se],le+=I[se];for(var fe=0;fe<h;fe++)w[fe*h+se]=(1-s.damping)*Math.min(0,le-I[fe])+s.damping*j[fe];w[se*h+se]=(1-s.damping)*(le-I[se])+s.damping*j[se]}for(var pe=0,me=0;me<h;me++){var Te=w[me*h+me]+m[me*h+me]>0?1:0;Y[U%s.minIterations*h+me]=Te,pe+=Te}if(pe>0&&(U>=s.minIterations-1||U==s.maxIterations-1)){for(var Le=0,ge=0;ge<h;ge++){D[ge]=0;for(var xe=0;xe<s.minIterations;xe++)D[ge]+=Y[xe*h+ge];(D[ge]===0||D[ge]===s.minIterations)&&Le++}if(Le===h)break}}for(var Se=_ce(h,m,w),Ie=Ece(h,p,Se),Re={},Ne=0;Ne<Se.length;Ne++)Re[Se[Ne]]=[];for(var Me=0;Me<a.length;Me++){var ke=c[a[Me].id()],Ge=Ie[ke];Ge!=null&&Re[Ge].push(a[Me])}for(var Qe=new Array(Se.length),nt=0;nt<Se.length;nt++)Qe[nt]=r.collection(Re[Se[nt]]);return Qe},Cce={affinityPropagation:bO,ap:bO},Pce=yo({root:void 0,directed:!1}),Sce={hierholzer:function(t){if(!gr(t)){var r=arguments;t={root:r[0],directed:r[1]}}var a=Pce(t),s=a.root,c=a.directed,f=this,h=!1,d,p,b;s&&(b=nn(s)?this.filter(s)[0].id():s[0].id());var m={},w={};c?f.forEach(function(T){var j=T.id();if(T.isNode()){var I=T.indegree(!0),D=T.outdegree(!0),R=I-D,Y=D-I;R==1?d?h=!0:d=j:Y==1?p?h=!0:p=j:(Y>1||R>1)&&(h=!0),m[j]=[],T.outgoers().forEach(function(G){G.isEdge()&&m[j].push(G.id())})}else w[j]=[void 0,T.target().id()]}):f.forEach(function(T){var j=T.id();if(T.isNode()){var I=T.degree(!0);I%2&&(d?p?h=!0:p=j:d=j),m[j]=[],T.connectedEdges().forEach(function(D){return m[j].push(D.id())})}else w[j]=[T.source().id(),T.target().id()]});var k={found:!1,trail:void 0};if(h)return k;if(p&&d)if(c){if(b&&p!=b)return k;b=p}else{if(b&&p!=b&&d!=b)return k;b||(b=p)}else b||(b=f[0].id());var P=function(T){for(var j=T,I=[T],D,R,Y;m[j].length;)D=m[j].shift(),R=w[D][0],Y=w[D][1],j!=Y?(m[Y]=m[Y].filter(function(G){return G!=D}),j=Y):!c&&j!=R&&(m[R]=m[R].filter(function(G){return G!=D}),j=R),I.unshift(D),I.unshift(j);return I},S=[],M=[];for(M=P(b);M.length!=1;)m[M[0]].length==0?(S.unshift(f.getElementById(M.shift())),S.unshift(f.getElementById(M.shift()))):M=P(M.shift()).concat(M);S.unshift(f.getElementById(M.shift()));for(var L in m)if(m[L].length)return k;return k.found=!0,k.trail=this.spawn(S,!0),k}},iw=function(){var t=this,r={},a=0,s=0,c=[],f=[],h={},d=function(m,w){for(var k=f.length-1,P=[],S=t.spawn();f[k].x!=m||f[k].y!=w;)P.push(f.pop().edge),k--;P.push(f.pop().edge),P.forEach(function(M){var L=M.connectedNodes().intersection(t);S.merge(M),L.forEach(function(T){var j=T.id(),I=T.connectedEdges().intersection(t);S.merge(T),r[j].cutVertex?S.merge(I.filter(function(D){return D.isLoop()})):S.merge(I)})}),c.push(S)},p=function(m,w,k){m===k&&(s+=1),r[w]={id:a,low:a++,cutVertex:!1};var P=t.getElementById(w).connectedEdges().intersection(t);if(P.size()===0)c.push(t.spawn(t.getElementById(w)));else{var S,M,L,T;P.forEach(function(j){S=j.source().id(),M=j.target().id(),L=S===w?M:S,L!==k&&(T=j.id(),h[T]||(h[T]=!0,f.push({x:w,y:L,edge:j})),L in r?r[w].low=Math.min(r[w].low,r[L].id):(p(m,L,w),r[w].low=Math.min(r[w].low,r[L].low),r[w].id<=r[L].low&&(r[w].cutVertex=!0,d(w,L))))})}};t.forEach(function(m){if(m.isNode()){var w=m.id();w in r||(s=0,p(w,w),r[w].cutVertex=s>1)}});var b=Object.keys(r).filter(function(m){return r[m].cutVertex}).map(function(m){return t.getElementById(m)});return{cut:t.spawn(b),components:c}},Nce={hopcroftTarjanBiconnected:iw,htbc:iw,htb:iw,hopcroftTarjanBiconnectedComponents:iw},aw=function(){var t=this,r={},a=0,s=[],c=[],f=t.spawn(t),h=function(d){c.push(d),r[d]={index:a,low:a++,explored:!1};var p=t.getElementById(d).connectedEdges().intersection(t);if(p.forEach(function(P){var S=P.target().id();S!==d&&(S in r||h(S),r[S].explored||(r[d].low=Math.min(r[d].low,r[S].low)))}),r[d].index===r[d].low){for(var b=t.spawn();;){var m=c.pop();if(b.merge(t.getElementById(m)),r[m].low=r[d].index,r[m].explored=!0,m===d)break}var w=b.edgesWith(b),k=b.merge(w);s.push(k),f=f.difference(k)}};return t.forEach(function(d){if(d.isNode()){var p=d.id();p in r||h(p)}}),{cut:f,components:s}},Tce={tarjanStronglyConnected:aw,tsc:aw,tscc:aw,tarjanStronglyConnectedComponents:aw},vO={};[a0,aue,oue,uue,lue,hue,gue,Uue,_g,Eg,f3,tce,pce,yce,Cce,Sce,Nce,Tce].forEach(function(t){fn(vO,t)});/*!
|
|
5
|
+
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
|
|
6
|
+
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
|
|
7
|
+
Licensed under The MIT License (http://opensource.org/licenses/MIT)
|
|
8
|
+
*/var yO=0,mO=1,wO=2,ec=function(t){if(!(this instanceof ec))return new ec(t);this.id="Thenable/1.0.7",this.state=yO,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof t=="function"&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};ec.prototype={fulfill:function(t){return xO(this,mO,"fulfillValue",t)},reject:function(t){return xO(this,wO,"rejectReason",t)},then:function(t,r){var a=this,s=new ec;return a.onFulfilled.push(EO(t,s,"fulfill")),a.onRejected.push(EO(r,s,"reject")),kO(a),s.proxy}};var xO=function(t,r,a,s){return t.state===yO&&(t.state=r,t[a]=s,kO(t)),t},kO=function(t){t.state===mO?_O(t,"onFulfilled",t.fulfillValue):t.state===wO&&_O(t,"onRejected",t.rejectReason)},_O=function(t,r,a){if(t[r].length!==0){var s=t[r];t[r]=[];var c=function(){for(var f=0;f<s.length;f++)s[f](a)};typeof setImmediate=="function"?setImmediate(c):setTimeout(c,0)}},EO=function(t,r,a){return function(s){if(typeof t!="function")r[a].call(r,s);else{var c;try{c=t(s)}catch(f){r.reject(f);return}CO(r,c)}}},CO=function(t,r){if(t===r||t.proxy===r){t.reject(new TypeError("cannot resolve promise with itself"));return}var a;if(La(r)==="object"&&r!==null||typeof r=="function")try{a=r.then}catch(c){t.reject(c);return}if(typeof a=="function"){var s=!1;try{a.call(r,function(c){s||(s=!0,c===r?t.reject(new TypeError("circular thenable chain")):CO(t,c))},function(c){s||(s=!0,t.reject(c))})}catch(c){s||t.reject(c)}return}t.fulfill(r)};ec.all=function(t){return new ec(function(r,a){for(var s=new Array(t.length),c=0,f=function(d,p){s[d]=p,c++,c===t.length&&r(s)},h=0;h<t.length;h++)(function(d){var p=t[d],b=p!=null&&p.then!=null;if(b)p.then(function(w){f(d,w)},function(w){a(w)});else{var m=p;f(d,m)}})(h)})},ec.resolve=function(t){return new ec(function(r,a){r(t)})},ec.reject=function(t){return new ec(function(r,a){a(t)})};var Sg=typeof Promise<"u"?Promise:ec,v3=function(t,r,a){var s=IC(t),c=!s,f=this._private=fn({duration:1e3},r,a);if(f.target=t,f.style=f.style||f.css,f.started=!1,f.playing=!1,f.hooked=!1,f.applying=!1,f.progress=0,f.completes=[],f.frames=[],f.complete&&Di(f.complete)&&f.completes.push(f.complete),c){var h=t.position();f.startPosition=f.startPosition||{x:h.x,y:h.y},f.startStyle=f.startStyle||t.cy().style().getAnimationStartStyle(t,f.style)}if(s){var d=t.pan();f.startPan={x:d.x,y:d.y},f.startZoom=t.zoom()}this.length=1,this[0]=this},Hd=v3.prototype;fn(Hd,{instanceString:function(){return"animation"},hook:function(){var t=this._private;if(!t.hooked){var r,a=t.target._private.animation;t.queue?r=a.queue:r=a.current,r.push(this),nu(t.target)&&t.target.cy().addToAnimationPool(t.target),t.hooked=!0}return this},play:function(){var t=this._private;return t.progress===1&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var t=this._private;return t.playing=!1,t.started=!1,this},stop:function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(t){var r=this._private;return t===void 0?r.progress*r.duration:this.progress(t/r.duration)},progress:function(t){var r=this._private,a=r.playing;return t===void 0?r.progress:(a&&this.pause(),r.progress=t,r.started=!1,a&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var t=this._private,r=t.playing;r&&this.pause(),t.progress=1-t.progress,t.started=!1;var a=function(d,p){var b=t[d];b!=null&&(t[d]=t[p],t[p]=b)};if(a("zoom","startZoom"),a("pan","startPan"),a("position","startPosition"),t.style)for(var s=0;s<t.style.length;s++){var c=t.style[s],f=c.name,h=t.startStyle[f];t.startStyle[f]=c,t.style[s]=h}return r&&this.play(),this},promise:function(t){var r=this._private,a;switch(t){case"frame":a=r.frames;break;default:case"complete":case"completed":a=r.completes}return new Sg(function(s,c){a.push(function(){s()})})}}),Hd.complete=Hd.completed,Hd.run=Hd.play,Hd.running=Hd.playing;var Mce={animated:function(){return function(){var t=this,r=t.length!==void 0,a=r?t:[t],s=this._private.cy||this;if(!s.styleEnabled())return!1;var c=a[0];if(c)return c._private.animation.current.length>0}},clearQueue:function(){return function(){var t=this,r=t.length!==void 0,a=r?t:[t],s=this._private.cy||this;if(!s.styleEnabled())return this;for(var c=0;c<a.length;c++){var f=a[c];f._private.animation.queue=[]}return this}},delay:function(){return function(t,r){var a=this._private.cy||this;return a.styleEnabled()?this.animate({delay:t,duration:t,complete:r}):this}},delayAnimation:function(){return function(t,r){var a=this._private.cy||this;return a.styleEnabled()?this.animation({delay:t,duration:t,complete:r}):this}},animation:function(){return function(t,r){var a=this,s=a.length!==void 0,c=s?a:[a],f=this._private.cy||this,h=!s,d=!h;if(!f.styleEnabled())return this;var p=f.style();t=fn({},t,r);var b=Object.keys(t).length===0;if(b)return new v3(c[0],t);switch(t.duration===void 0&&(t.duration=400),t.duration){case"slow":t.duration=600;break;case"fast":t.duration=200;break}if(d&&(t.style=p.getPropsList(t.style||t.css),t.css=void 0),d&&t.renderedPosition!=null){var m=t.renderedPosition,w=f.pan(),k=f.zoom();t.position=Z8(m,k,w)}if(h&&t.panBy!=null){var P=t.panBy,S=f.pan();t.pan={x:S.x+P.x,y:S.y+P.y}}var M=t.center||t.centre;if(h&&M!=null){var L=f.getCenterPan(M.eles,t.zoom);L!=null&&(t.pan=L)}if(h&&t.fit!=null){var T=t.fit,j=f.getFitViewport(T.eles||T.boundingBox,T.padding);j!=null&&(t.pan=j.pan,t.zoom=j.zoom)}if(h&&gr(t.zoom)){var I=f.getZoomedViewport(t.zoom);I!=null?(I.zoomed&&(t.zoom=I.zoom),I.panned&&(t.pan=I.pan)):t.zoom=null}return new v3(c[0],t)}},animate:function(){return function(t,r){var a=this,s=a.length!==void 0,c=s?a:[a],f=this._private.cy||this;if(!f.styleEnabled())return this;r&&(t=fn({},t,r));for(var h=0;h<c.length;h++){var d=c[h],p=d.animated()&&(t.queue===void 0||t.queue),b=d.animation(t,p?{queue:!0}:void 0);b.play()}return this}},stop:function(){return function(t,r){var a=this,s=a.length!==void 0,c=s?a:[a],f=this._private.cy||this;if(!f.styleEnabled())return this;for(var h=0;h<c.length;h++){for(var d=c[h],p=d._private,b=p.animation.current,m=0;m<b.length;m++){var w=b[m],k=w._private;r&&(k.duration=0)}t&&(p.animation.queue=[]),r||(p.animation.current=[])}return f.notify("draw"),this}}},y3,PO;function ow(){if(PO)return y3;PO=1;var t=Array.isArray;return y3=t,y3}var m3,SO;function jce(){if(SO)return m3;SO=1;var t=ow(),r=t0(),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function c(f,h){if(t(f))return!1;var d=typeof f;return d=="number"||d=="symbol"||d=="boolean"||f==null||r(f)?!0:s.test(f)||!a.test(f)||h!=null&&f in Object(h)}return m3=c,m3}var w3,NO;function Ace(){if(NO)return w3;NO=1;var t=S8(),r=e0(),a="[object AsyncFunction]",s="[object Function]",c="[object GeneratorFunction]",f="[object Proxy]";function h(d){if(!r(d))return!1;var p=t(d);return p==s||p==c||p==a||p==f}return w3=h,w3}var x3,TO;function Ice(){if(TO)return x3;TO=1;var t=Ym(),r=t["__core-js_shared__"];return x3=r,x3}var k3,MO;function Lce(){if(MO)return k3;MO=1;var t=Ice(),r=function(){var s=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}();function a(s){return!!r&&r in s}return k3=a,k3}var _3,jO;function Oce(){if(jO)return _3;jO=1;var t=Function.prototype,r=t.toString;function a(s){if(s!=null){try{return r.call(s)}catch{}try{return s+""}catch{}}return""}return _3=a,_3}var E3,AO;function Dce(){if(AO)return E3;AO=1;var t=Ace(),r=Lce(),a=e0(),s=Oce(),c=/[\\^$.*+?()[\]{}|]/g,f=/^\[object .+?Constructor\]$/,h=Function.prototype,d=Object.prototype,p=h.toString,b=d.hasOwnProperty,m=RegExp("^"+p.call(b).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function w(k){if(!a(k)||r(k))return!1;var P=t(k)?m:f;return P.test(s(k))}return E3=w,E3}var C3,IO;function Bce(){if(IO)return C3;IO=1;function t(r,a){return r==null?void 0:r[a]}return C3=t,C3}var P3,LO;function S3(){if(LO)return P3;LO=1;var t=Dce(),r=Bce();function a(s,c){var f=r(s,c);return t(f)?f:void 0}return P3=a,P3}var N3,OO;function sw(){if(OO)return N3;OO=1;var t=S3(),r=t(Object,"create");return N3=r,N3}var T3,DO;function Rce(){if(DO)return T3;DO=1;var t=sw();function r(){this.__data__=t?t(null):{},this.size=0}return T3=r,T3}var M3,BO;function Gce(){if(BO)return M3;BO=1;function t(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}return M3=t,M3}var j3,RO;function Hce(){if(RO)return j3;RO=1;var t=sw(),r="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;function c(f){var h=this.__data__;if(t){var d=h[f];return d===r?void 0:d}return s.call(h,f)?h[f]:void 0}return j3=c,j3}var A3,GO;function zce(){if(GO)return A3;GO=1;var t=sw(),r=Object.prototype,a=r.hasOwnProperty;function s(c){var f=this.__data__;return t?f[c]!==void 0:a.call(f,c)}return A3=s,A3}var I3,HO;function Uce(){if(HO)return I3;HO=1;var t=sw(),r="__lodash_hash_undefined__";function a(s,c){var f=this.__data__;return this.size+=this.has(s)?0:1,f[s]=t&&c===void 0?r:c,this}return I3=a,I3}var L3,zO;function Fce(){if(zO)return L3;zO=1;var t=Rce(),r=Gce(),a=Hce(),s=zce(),c=Uce();function f(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return f.prototype.clear=t,f.prototype.delete=r,f.prototype.get=a,f.prototype.has=s,f.prototype.set=c,L3=f,L3}var O3,UO;function Yce(){if(UO)return O3;UO=1;function t(){this.__data__=[],this.size=0}return O3=t,O3}var D3,FO;function YO(){if(FO)return D3;FO=1;function t(r,a){return r===a||r!==r&&a!==a}return D3=t,D3}var B3,VO;function uw(){if(VO)return B3;VO=1;var t=YO();function r(a,s){for(var c=a.length;c--;)if(t(a[c][0],s))return c;return-1}return B3=r,B3}var R3,qO;function Vce(){if(qO)return R3;qO=1;var t=uw(),r=Array.prototype,a=r.splice;function s(c){var f=this.__data__,h=t(f,c);if(h<0)return!1;var d=f.length-1;return h==d?f.pop():a.call(f,h,1),--this.size,!0}return R3=s,R3}var G3,ZO;function qce(){if(ZO)return G3;ZO=1;var t=uw();function r(a){var s=this.__data__,c=t(s,a);return c<0?void 0:s[c][1]}return G3=r,G3}var H3,$O;function Zce(){if($O)return H3;$O=1;var t=uw();function r(a){return t(this.__data__,a)>-1}return H3=r,H3}var z3,KO;function $ce(){if(KO)return z3;KO=1;var t=uw();function r(a,s){var c=this.__data__,f=t(c,a);return f<0?(++this.size,c.push([a,s])):c[f][1]=s,this}return z3=r,z3}var U3,QO;function Kce(){if(QO)return U3;QO=1;var t=Yce(),r=Vce(),a=qce(),s=Zce(),c=$ce();function f(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return f.prototype.clear=t,f.prototype.delete=r,f.prototype.get=a,f.prototype.has=s,f.prototype.set=c,U3=f,U3}var F3,WO;function Qce(){if(WO)return F3;WO=1;var t=S3(),r=Ym(),a=t(r,"Map");return F3=a,F3}var Y3,JO;function Wce(){if(JO)return Y3;JO=1;var t=Fce(),r=Kce(),a=Qce();function s(){this.size=0,this.__data__={hash:new t,map:new(a||r),string:new t}}return Y3=s,Y3}var V3,XO;function Jce(){if(XO)return V3;XO=1;function t(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}return V3=t,V3}var q3,eD;function cw(){if(eD)return q3;eD=1;var t=Jce();function r(a,s){var c=a.__data__;return t(s)?c[typeof s=="string"?"string":"hash"]:c.map}return q3=r,q3}var Z3,tD;function Xce(){if(tD)return Z3;tD=1;var t=cw();function r(a){var s=t(this,a).delete(a);return this.size-=s?1:0,s}return Z3=r,Z3}var $3,nD;function ele(){if(nD)return $3;nD=1;var t=cw();function r(a){return t(this,a).get(a)}return $3=r,$3}var K3,rD;function tle(){if(rD)return K3;rD=1;var t=cw();function r(a){return t(this,a).has(a)}return K3=r,K3}var Q3,iD;function nle(){if(iD)return Q3;iD=1;var t=cw();function r(a,s){var c=t(this,a),f=c.size;return c.set(a,s),this.size+=c.size==f?0:1,this}return Q3=r,Q3}var W3,aD;function rle(){if(aD)return W3;aD=1;var t=Wce(),r=Xce(),a=ele(),s=tle(),c=nle();function f(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return f.prototype.clear=t,f.prototype.delete=r,f.prototype.get=a,f.prototype.has=s,f.prototype.set=c,W3=f,W3}var J3,oD;function ile(){if(oD)return J3;oD=1;var t=rle(),r="Expected a function";function a(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new TypeError(r);var f=function(){var h=arguments,d=c?c.apply(this,h):h[0],p=f.cache;if(p.has(d))return p.get(d);var b=s.apply(this,h);return f.cache=p.set(d,b)||p,b};return f.cache=new(a.Cache||t),f}return a.Cache=t,J3=a,J3}var X3,sD;function ale(){if(sD)return X3;sD=1;var t=ile(),r=500;function a(s){var c=t(s,function(h){return f.size===r&&f.clear(),h}),f=c.cache;return c}return X3=a,X3}var eP,uD;function cD(){if(uD)return eP;uD=1;var t=ale(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=t(function(c){var f=[];return c.charCodeAt(0)===46&&f.push(""),c.replace(r,function(h,d,p,b){f.push(p?b.replace(a,"$1"):d||h)}),f});return eP=s,eP}var tP,lD;function fD(){if(lD)return tP;lD=1;function t(r,a){for(var s=-1,c=r==null?0:r.length,f=Array(c);++s<c;)f[s]=a(r[s],s,r);return f}return tP=t,tP}var nP,hD;function ole(){if(hD)return nP;hD=1;var t=UC(),r=fD(),a=ow(),s=t0(),c=t?t.prototype:void 0,f=c?c.toString:void 0;function h(d){if(typeof d=="string")return d;if(a(d))return r(d,h)+"";if(s(d))return f?f.call(d):"";var p=d+"";return p=="0"&&1/d==-1/0?"-0":p}return nP=h,nP}var rP,dD;function pD(){if(dD)return rP;dD=1;var t=ole();function r(a){return a==null?"":t(a)}return rP=r,rP}var iP,gD;function bD(){if(gD)return iP;gD=1;var t=ow(),r=jce(),a=cD(),s=pD();function c(f,h){return t(f)?f:r(f,h)?[f]:a(s(f))}return iP=c,iP}var aP,vD;function oP(){if(vD)return aP;vD=1;var t=t0();function r(a){if(typeof a=="string"||t(a))return a;var s=a+"";return s=="0"&&1/a==-1/0?"-0":s}return aP=r,aP}var sP,yD;function sle(){if(yD)return sP;yD=1;var t=bD(),r=oP();function a(s,c){c=t(c,s);for(var f=0,h=c.length;s!=null&&f<h;)s=s[r(c[f++])];return f&&f==h?s:void 0}return sP=a,sP}var uP,mD;function ule(){if(mD)return uP;mD=1;var t=sle();function r(a,s,c){var f=a==null?void 0:t(a,s);return f===void 0?c:f}return uP=r,uP}var cle=ule(),lle=Xv(cle),cP,wD;function fle(){if(wD)return cP;wD=1;var t=S3(),r=function(){try{var a=t(Object,"defineProperty");return a({},"",{}),a}catch{}}();return cP=r,cP}var lP,xD;function hle(){if(xD)return lP;xD=1;var t=fle();function r(a,s,c){s=="__proto__"&&t?t(a,s,{configurable:!0,enumerable:!0,value:c,writable:!0}):a[s]=c}return lP=r,lP}var fP,kD;function dle(){if(kD)return fP;kD=1;var t=hle(),r=YO(),a=Object.prototype,s=a.hasOwnProperty;function c(f,h,d){var p=f[h];(!(s.call(f,h)&&r(p,d))||d===void 0&&!(h in f))&&t(f,h,d)}return fP=c,fP}var hP,_D;function ple(){if(_D)return hP;_D=1;var t=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function a(s,c){var f=typeof s;return c=c??t,!!c&&(f=="number"||f!="symbol"&&r.test(s))&&s>-1&&s%1==0&&s<c}return hP=a,hP}var dP,ED;function gle(){if(ED)return dP;ED=1;var t=dle(),r=bD(),a=ple(),s=e0(),c=oP();function f(h,d,p,b){if(!s(h))return h;d=r(d,h);for(var m=-1,w=d.length,k=w-1,P=h;P!=null&&++m<w;){var S=c(d[m]),M=p;if(S==="__proto__"||S==="constructor"||S==="prototype")return h;if(m!=k){var L=P[S];M=b?b(L,S,P):void 0,M===void 0&&(M=s(L)?L:a(d[m+1])?[]:{})}t(P,S,M),P=P[S]}return h}return dP=f,dP}var pP,CD;function ble(){if(CD)return pP;CD=1;var t=gle();function r(a,s,c){return a==null?a:t(a,s,c)}return pP=r,pP}var vle=ble(),yle=Xv(vle),gP,PD;function mle(){if(PD)return gP;PD=1;function t(r,a){var s=-1,c=r.length;for(a||(a=Array(c));++s<c;)a[s]=r[s];return a}return gP=t,gP}var bP,SD;function wle(){if(SD)return bP;SD=1;var t=fD(),r=mle(),a=ow(),s=t0(),c=cD(),f=oP(),h=pD();function d(p){return a(p)?t(p,f):s(p)?[p]:r(c(h(p)))}return bP=d,bP}var xle=wle(),kle=Xv(xle),_le={data:function(t){var r={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(a){},beforeSet:function(a,s){},onSet:function(a){},canSet:function(a){return!0}};return t=fn({},r,t),function(a,s){var c=t,f=this,h=f.length!==void 0,d=h?f:[f],p=h?f[0]:f;if(nn(a)){var b=a.indexOf(".")!==-1,m=b&&kle(a);if(c.allowGetting&&s===void 0){var w;return p&&(c.beforeGet(p),m&&p._private[c.field][a]===void 0?w=lle(p._private[c.field],m):w=p._private[c.field][a]),w}else if(c.allowSetting&&s!==void 0){var k=!c.immutableKeys[a];if(k){var P=a8({},a,s);c.beforeSet(f,P);for(var S=0,M=d.length;S<M;S++){var L=d[S];c.canSet(L)&&(m&&p._private[c.field][a]===void 0?yle(L._private[c.field],m,s):L._private[c.field][a]=s)}c.updateStyle&&f.updateStyle(),c.onSet(f),c.settingTriggersEvent&&f[c.triggerFnName](c.settingEvent)}}}else if(c.allowSetting&&gr(a)){var T=a,j,I,D=Object.keys(T);c.beforeSet(f,T);for(var R=0;R<D.length;R++){j=D[R],I=T[j];var Y=!c.immutableKeys[j];if(Y)for(var G=0;G<d.length;G++){var U=d[G];c.canSet(U)&&(U._private[c.field][j]=I)}}c.updateStyle&&f.updateStyle(),c.onSet(f),c.settingTriggersEvent&&f[c.triggerFnName](c.settingEvent)}else if(c.allowBinding&&Di(a)){var z=a;f.on(c.bindingEvent,z)}else if(c.allowGetting&&a===void 0){var Q;return p&&(c.beforeGet(p),Q=p._private[c.field]),Q}return f}},removeData:function(t){var r={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return t=fn({},r,t),function(a){var s=t,c=this,f=c.length!==void 0,h=f?c:[c];if(nn(a)){for(var d=a.split(/\s+/),p=d.length,b=0;b<p;b++){var m=d[b];if(!sh(m)){var w=!s.immutableKeys[m];if(w)for(var k=0,P=h.length;k<P;k++)h[k]._private[s.field][m]=void 0}}s.triggerEvent&&c[s.triggerFnName](s.event)}else if(a===void 0){for(var S=0,M=h.length;S<M;S++)for(var L=h[S]._private[s.field],T=Object.keys(L),j=0;j<T.length;j++){var I=T[j],D=!s.immutableKeys[I];D&&(L[I]=void 0)}s.triggerEvent&&c[s.triggerFnName](s.event)}return c}}},Ele={eventAliasesOn:function(t){var r=t;r.addListener=r.listen=r.bind=r.on,r.unlisten=r.unbind=r.off=r.removeListener,r.trigger=r.emit,r.pon=r.promiseOn=function(a,s){var c=this,f=Array.prototype.slice.call(arguments,0);return new Sg(function(h,d){var p=function(w){c.off.apply(c,m),h(w)},b=f.concat([p]),m=b.concat([]);c.on.apply(c,b)})}}},Ar={};[Mce,_le,Ele].forEach(function(t){fn(Ar,t)});var Cle={animate:Ar.animate(),animation:Ar.animation(),animated:Ar.animated(),clearQueue:Ar.clearQueue(),delay:Ar.delay(),delayAnimation:Ar.delayAnimation(),stop:Ar.stop()},lw={classes:function(t){var r=this;if(t===void 0){var a=[];return r[0]._private.classes.forEach(function(P){return a.push(P)}),a}else ei(t)||(t=(t||"").match(/\S+/g)||[]);for(var s=[],c=new wg(t),f=0;f<r.length;f++){for(var h=r[f],d=h._private,p=d.classes,b=!1,m=0;m<t.length;m++){var w=t[m],k=p.has(w);if(!k){b=!0;break}}b||(b=p.size!==t.length),b&&(d.classes=c,s.push(h))}return s.length>0&&this.spawn(s).updateStyle().emit("class"),r},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var r=this[0];return r!=null&&r._private.classes.has(t)},toggleClass:function(t,r){ei(t)||(t=t.match(/\S+/g)||[]);for(var a=this,s=r===void 0,c=[],f=0,h=a.length;f<h;f++)for(var d=a[f],p=d._private.classes,b=!1,m=0;m<t.length;m++){var w=t[m],k=p.has(w),P=!1;r||s&&!k?(p.add(w),P=!0):(!r||s&&k)&&(p.delete(w),P=!0),!b&&P&&(c.push(d),b=!0)}return c.length>0&&this.spawn(c).updateStyle().emit("class"),a},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,r){var a=this;if(r==null)r=250;else if(r===0)return a;return a.addClass(t),setTimeout(function(){a.removeClass(t)},r),a}};lw.className=lw.classNames=lw.classes;var br={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Da,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};br.variable="(?:[\\w-.]|(?:\\\\"+br.metaChar+"))+",br.className="(?:[\\w-]|(?:\\\\"+br.metaChar+"))+",br.value=br.string+"|"+br.number,br.id=br.variable,function(){var t,r,a;for(t=br.comparatorOp.split("|"),a=0;a<t.length;a++)r=t[a],br.comparatorOp+="|@"+r;for(t=br.comparatorOp.split("|"),a=0;a<t.length;a++)r=t[a],!(r.indexOf("!")>=0)&&r!=="="&&(br.comparatorOp+="|\\!"+r)}();var Kr=function(){return{checks:[]}},Ut={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},vP=[{selector:":selected",matches:function(t){return t.selected()}},{selector:":unselected",matches:function(t){return!t.selected()}},{selector:":selectable",matches:function(t){return t.selectable()}},{selector:":unselectable",matches:function(t){return!t.selectable()}},{selector:":locked",matches:function(t){return t.locked()}},{selector:":unlocked",matches:function(t){return!t.locked()}},{selector:":visible",matches:function(t){return t.visible()}},{selector:":hidden",matches:function(t){return!t.visible()}},{selector:":transparent",matches:function(t){return t.transparent()}},{selector:":grabbed",matches:function(t){return t.grabbed()}},{selector:":free",matches:function(t){return!t.grabbed()}},{selector:":removed",matches:function(t){return t.removed()}},{selector:":inside",matches:function(t){return!t.removed()}},{selector:":grabbable",matches:function(t){return t.grabbable()}},{selector:":ungrabbable",matches:function(t){return!t.grabbable()}},{selector:":animated",matches:function(t){return t.animated()}},{selector:":unanimated",matches:function(t){return!t.animated()}},{selector:":parent",matches:function(t){return t.isParent()}},{selector:":childless",matches:function(t){return t.isChildless()}},{selector:":child",matches:function(t){return t.isChild()}},{selector:":orphan",matches:function(t){return t.isOrphan()}},{selector:":nonorphan",matches:function(t){return t.isChild()}},{selector:":compound",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:":loop",matches:function(t){return t.isLoop()}},{selector:":simple",matches:function(t){return t.isSimple()}},{selector:":active",matches:function(t){return t.active()}},{selector:":inactive",matches:function(t){return!t.active()}},{selector:":backgrounding",matches:function(t){return t.backgrounding()}},{selector:":nonbackgrounding",matches:function(t){return!t.backgrounding()}}].sort(function(t,r){return _se(t.selector,r.selector)}),Ple=function(){for(var t={},r,a=0;a<vP.length;a++)r=vP[a],t[r.selector]=r.matches;return t}(),Sle=function(t,r){return Ple[t](r)},Nle="("+vP.map(function(t){return t.selector}).join("|")+")",Ng=function(t){return t.replace(new RegExp("\\\\("+br.metaChar+")","g"),function(r,a){return a})},ph=function(t,r,a){t[t.length-1]=a},yP=[{name:"group",query:!0,regex:"("+br.group+")",populate:function(t,r,a){var s=ma(a,1),c=s[0];r.checks.push({type:Ut.GROUP,value:c==="*"?c:c+"s"})}},{name:"state",query:!0,regex:Nle,populate:function(t,r,a){var s=ma(a,1),c=s[0];r.checks.push({type:Ut.STATE,value:c})}},{name:"id",query:!0,regex:"\\#("+br.id+")",populate:function(t,r,a){var s=ma(a,1),c=s[0];r.checks.push({type:Ut.ID,value:Ng(c)})}},{name:"className",query:!0,regex:"\\.("+br.className+")",populate:function(t,r,a){var s=ma(a,1),c=s[0];r.checks.push({type:Ut.CLASS,value:Ng(c)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+br.variable+")\\s*\\]",populate:function(t,r,a){var s=ma(a,1),c=s[0];r.checks.push({type:Ut.DATA_EXIST,field:Ng(c)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+br.variable+")\\s*("+br.comparatorOp+")\\s*("+br.value+")\\s*\\]",populate:function(t,r,a){var s=ma(a,3),c=s[0],f=s[1],h=s[2],d=new RegExp("^"+br.string+"$").exec(h)!=null;d?h=h.substring(1,h.length-1):h=parseFloat(h),r.checks.push({type:Ut.DATA_COMPARE,field:Ng(c),operator:f,value:h})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+br.boolOp+")\\s*("+br.variable+")\\s*\\]",populate:function(t,r,a){var s=ma(a,2),c=s[0],f=s[1];r.checks.push({type:Ut.DATA_BOOL,field:Ng(f),operator:c})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+br.meta+")\\s*("+br.comparatorOp+")\\s*("+br.number+")\\s*\\]\\]",populate:function(t,r,a){var s=ma(a,3),c=s[0],f=s[1],h=s[2];r.checks.push({type:Ut.META_COMPARE,field:Ng(c),operator:f,value:parseFloat(h)})}},{name:"nextQuery",separator:!0,regex:br.separator,populate:function(t,r){var a=t.currentSubject,s=t.edgeCount,c=t.compoundCount,f=t[t.length-1];a!=null&&(f.subject=a,t.currentSubject=null),f.edgeCount=s,f.compoundCount=c,t.edgeCount=0,t.compoundCount=0;var h=t[t.length++]=Kr();return h}},{name:"directedEdge",separator:!0,regex:br.directedEdge,populate:function(t,r){if(t.currentSubject==null){var a=Kr(),s=r,c=Kr();return a.checks.push({type:Ut.DIRECTED_EDGE,source:s,target:c}),ph(t,r,a),t.edgeCount++,c}else{var f=Kr(),h=r,d=Kr();return f.checks.push({type:Ut.NODE_SOURCE,source:h,target:d}),ph(t,r,f),t.edgeCount++,d}}},{name:"undirectedEdge",separator:!0,regex:br.undirectedEdge,populate:function(t,r){if(t.currentSubject==null){var a=Kr(),s=r,c=Kr();return a.checks.push({type:Ut.UNDIRECTED_EDGE,nodes:[s,c]}),ph(t,r,a),t.edgeCount++,c}else{var f=Kr(),h=r,d=Kr();return f.checks.push({type:Ut.NODE_NEIGHBOR,node:h,neighbor:d}),ph(t,r,f),d}}},{name:"child",separator:!0,regex:br.child,populate:function(t,r){if(t.currentSubject==null){var a=Kr(),s=Kr(),c=t[t.length-1];return a.checks.push({type:Ut.CHILD,parent:c,child:s}),ph(t,r,a),t.compoundCount++,s}else if(t.currentSubject===r){var f=Kr(),h=t[t.length-1],d=Kr(),p=Kr(),b=Kr(),m=Kr();return f.checks.push({type:Ut.COMPOUND_SPLIT,left:h,right:d,subject:p}),p.checks=r.checks,r.checks=[{type:Ut.TRUE}],m.checks.push({type:Ut.TRUE}),d.checks.push({type:Ut.PARENT,parent:m,child:b}),ph(t,h,f),t.currentSubject=p,t.compoundCount++,b}else{var w=Kr(),k=Kr(),P=[{type:Ut.PARENT,parent:w,child:k}];return w.checks=r.checks,r.checks=P,t.compoundCount++,k}}},{name:"descendant",separator:!0,regex:br.descendant,populate:function(t,r){if(t.currentSubject==null){var a=Kr(),s=Kr(),c=t[t.length-1];return a.checks.push({type:Ut.DESCENDANT,ancestor:c,descendant:s}),ph(t,r,a),t.compoundCount++,s}else if(t.currentSubject===r){var f=Kr(),h=t[t.length-1],d=Kr(),p=Kr(),b=Kr(),m=Kr();return f.checks.push({type:Ut.COMPOUND_SPLIT,left:h,right:d,subject:p}),p.checks=r.checks,r.checks=[{type:Ut.TRUE}],m.checks.push({type:Ut.TRUE}),d.checks.push({type:Ut.ANCESTOR,ancestor:m,descendant:b}),ph(t,h,f),t.currentSubject=p,t.compoundCount++,b}else{var w=Kr(),k=Kr(),P=[{type:Ut.ANCESTOR,ancestor:w,descendant:k}];return w.checks=r.checks,r.checks=P,t.compoundCount++,k}}},{name:"subject",modifier:!0,regex:br.subject,populate:function(t,r){if(t.currentSubject!=null&&t.currentSubject!==r)return jr("Redefinition of subject in selector `"+t.toString()+"`"),!1;t.currentSubject=r;var a=t[t.length-1],s=a.checks[0],c=s==null?null:s.type;c===Ut.DIRECTED_EDGE?s.type=Ut.NODE_TARGET:c===Ut.UNDIRECTED_EDGE&&(s.type=Ut.NODE_NEIGHBOR,s.node=s.nodes[1],s.neighbor=s.nodes[0],s.nodes=null)}}];yP.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});var Tle=function(t){for(var r,a,s,c=0;c<yP.length;c++){var f=yP[c],h=f.name,d=t.match(f.regexObj);if(d!=null){a=d,r=f,s=h;var p=d[0];t=t.substring(p.length);break}}return{expr:r,match:a,name:s,remaining:t}},Mle=function(t){var r=t.match(/^\s+/);if(r){var a=r[0];t=t.substring(a.length)}return t},jle=function(t){var r=this,a=r.inputText=t,s=r[0]=Kr();for(r.length=1,a=Mle(a);;){var c=Tle(a);if(c.expr==null)return jr("The selector `"+t+"`is invalid"),!1;var f=c.match.slice(1),h=c.expr.populate(r,s,f);if(h===!1)return!1;if(h!=null&&(s=h),a=c.remaining,a.match(/^\s*$/))break}var d=r[r.length-1];r.currentSubject!=null&&(d.subject=r.currentSubject),d.edgeCount=r.edgeCount,d.compoundCount=r.compoundCount;for(var p=0;p<r.length;p++){var b=r[p];if(b.compoundCount>0&&b.edgeCount>0)return jr("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(b.edgeCount>1)return jr("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;b.edgeCount===1&&jr("The selector `"+t+"` 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},Ale=function(){if(this.toStringCache!=null)return this.toStringCache;for(var t=function(p){return p??""},r=function(p){return nn(p)?'"'+p+'"':t(p)},a=function(p){return" "+p+" "},s=function(p,b){var m=p.type,w=p.value;switch(m){case Ut.GROUP:{var k=t(w);return k.substring(0,k.length-1)}case Ut.DATA_COMPARE:{var P=p.field,S=p.operator;return"["+P+a(t(S))+r(w)+"]"}case Ut.DATA_BOOL:{var M=p.operator,L=p.field;return"["+t(M)+L+"]"}case Ut.DATA_EXIST:{var T=p.field;return"["+T+"]"}case Ut.META_COMPARE:{var j=p.operator,I=p.field;return"[["+I+a(t(j))+r(w)+"]]"}case Ut.STATE:return w;case Ut.ID:return"#"+w;case Ut.CLASS:return"."+w;case Ut.PARENT:case Ut.CHILD:return c(p.parent,b)+a(">")+c(p.child,b);case Ut.ANCESTOR:case Ut.DESCENDANT:return c(p.ancestor,b)+" "+c(p.descendant,b);case Ut.COMPOUND_SPLIT:{var D=c(p.left,b),R=c(p.subject,b),Y=c(p.right,b);return D+(D.length>0?" ":"")+R+Y}case Ut.TRUE:return""}},c=function(p,b){return p.checks.reduce(function(m,w,k){return m+(b===p&&k===0?"$":"")+s(w,b)},"")},f="",h=0;h<this.length;h++){var d=this[h];f+=c(d,d.subject),this.length>1&&h<this.length-1&&(f+=", ")}return this.toStringCache=f,f},Ile={parse:jle,toString:Ale},ND=function(t,r,a){var s,c=nn(t),f=jt(t),h=nn(a),d,p,b=!1,m=!1,w=!1;switch(r.indexOf("!")>=0&&(r=r.replace("!",""),m=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),b=!0),(c||h||b)&&(d=!c&&!f?"":""+t,p=""+a),b&&(t=d=d.toLowerCase(),a=p=p.toLowerCase()),r){case"*=":s=d.indexOf(p)>=0;break;case"$=":s=d.indexOf(p,d.length-p.length)>=0;break;case"^=":s=d.indexOf(p)===0;break;case"=":s=t===a;break;case">":w=!0,s=t>a;break;case">=":w=!0,s=t>=a;break;case"<":w=!0,s=t<a;break;case"<=":w=!0,s=t<=a;break;default:s=!1;break}return m&&(t!=null||!w)&&(s=!s),s},Lle=function(t,r){switch(r){case"?":return!!t;case"!":return!t;case"^":return t===void 0}},Ole=function(t){return t!==void 0},mP=function(t,r){return t.data(r)},Dle=function(t,r){return t[r]()},Ji=[],pi=function(t,r){return t.checks.every(function(a){return Ji[a.type](a,r)})};Ji[Ut.GROUP]=function(t,r){var a=t.value;return a==="*"||a===r.group()},Ji[Ut.STATE]=function(t,r){var a=t.value;return Sle(a,r)},Ji[Ut.ID]=function(t,r){var a=t.value;return r.id()===a},Ji[Ut.CLASS]=function(t,r){var a=t.value;return r.hasClass(a)},Ji[Ut.META_COMPARE]=function(t,r){var a=t.field,s=t.operator,c=t.value;return ND(Dle(r,a),s,c)},Ji[Ut.DATA_COMPARE]=function(t,r){var a=t.field,s=t.operator,c=t.value;return ND(mP(r,a),s,c)},Ji[Ut.DATA_BOOL]=function(t,r){var a=t.field,s=t.operator;return Lle(mP(r,a),s)},Ji[Ut.DATA_EXIST]=function(t,r){var a=t.field;return t.operator,Ole(mP(r,a))},Ji[Ut.UNDIRECTED_EDGE]=function(t,r){var a=t.nodes[0],s=t.nodes[1],c=r.source(),f=r.target();return pi(a,c)&&pi(s,f)||pi(s,c)&&pi(a,f)},Ji[Ut.NODE_NEIGHBOR]=function(t,r){return pi(t.node,r)&&r.neighborhood().some(function(a){return a.isNode()&&pi(t.neighbor,a)})},Ji[Ut.DIRECTED_EDGE]=function(t,r){return pi(t.source,r.source())&&pi(t.target,r.target())},Ji[Ut.NODE_SOURCE]=function(t,r){return pi(t.source,r)&&r.outgoers().some(function(a){return a.isNode()&&pi(t.target,a)})},Ji[Ut.NODE_TARGET]=function(t,r){return pi(t.target,r)&&r.incomers().some(function(a){return a.isNode()&&pi(t.source,a)})},Ji[Ut.CHILD]=function(t,r){return pi(t.child,r)&&pi(t.parent,r.parent())},Ji[Ut.PARENT]=function(t,r){return pi(t.parent,r)&&r.children().some(function(a){return pi(t.child,a)})},Ji[Ut.DESCENDANT]=function(t,r){return pi(t.descendant,r)&&r.ancestors().some(function(a){return pi(t.ancestor,a)})},Ji[Ut.ANCESTOR]=function(t,r){return pi(t.ancestor,r)&&r.descendants().some(function(a){return pi(t.descendant,a)})},Ji[Ut.COMPOUND_SPLIT]=function(t,r){return pi(t.subject,r)&&pi(t.left,r)&&pi(t.right,r)},Ji[Ut.TRUE]=function(){return!0},Ji[Ut.COLLECTION]=function(t,r){var a=t.value;return a.has(r)},Ji[Ut.FILTER]=function(t,r){var a=t.value;return a(r)};var Ble=function(t){var r=this;if(r.length===1&&r[0].checks.length===1&&r[0].checks[0].type===Ut.ID)return t.getElementById(r[0].checks[0].value).collection();var a=function(s){for(var c=0;c<r.length;c++){var f=r[c];if(pi(f,s))return!0}return!1};return r.text()==null&&(a=function(){return!0}),t.filter(a)},Rle=function(t){for(var r=this,a=0;a<r.length;a++){var s=r[a];if(pi(s,t))return!0}return!1},Gle={matches:Rle,filter:Ble},gh=function(t){this.inputText=t,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,t==null||nn(t)&&t.match(/^\s*$/)||(nu(t)?this.addQuery({checks:[{type:Ut.COLLECTION,value:t.collection()}]}):Di(t)?this.addQuery({checks:[{type:Ut.FILTER,value:t}]}):nn(t)?this.parse(t)||(this.invalid=!0):_i("A selector must be created from a string; found "))},bh=gh.prototype;[Ile,Gle].forEach(function(t){return fn(bh,t)}),bh.text=function(){return this.inputText},bh.size=function(){return this.length},bh.eq=function(t){return this[t]},bh.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},bh.addQuery=function(t){this[this.length++]=t},bh.selector=bh.toString;var vh={allAre:function(t){var r=new gh(t);return this.every(function(a){return r.matches(a)})},is:function(t){var r=new gh(t);return this.some(function(a){return r.matches(a)})},some:function(t,r){for(var a=0;a<this.length;a++){var s=r?t.apply(r,[this[a],a,this]):t(this[a],a,this);if(s)return!0}return!1},every:function(t,r){for(var a=0;a<this.length;a++){var s=r?t.apply(r,[this[a],a,this]):t(this[a],a,this);if(!s)return!1}return!0},same:function(t){if(this===t)return!0;t=this.cy().collection(t);var r=this.length,a=t.length;return r!==a?!1:r===1?this[0]===t[0]:this.every(function(s){return t.hasElementWithId(s.id())})},anySame:function(t){return t=this.cy().collection(t),this.some(function(r){return t.hasElementWithId(r.id())})},allAreNeighbors:function(t){t=this.cy().collection(t);var r=this.neighborhood();return t.every(function(a){return r.hasElementWithId(a.id())})},contains:function(t){t=this.cy().collection(t);var r=this;return t.every(function(a){return r.hasElementWithId(a.id())})}};vh.allAreNeighbours=vh.allAreNeighbors,vh.has=vh.contains,vh.equal=vh.equals=vh.same;var ku=function(t,r){return function(a,s,c,f){var h=a,d=this,p;if(h==null?p="":nu(h)&&h.length===1&&(p=h.id()),d.length===1&&p){var b=d[0]._private,m=b.traversalCache=b.traversalCache||{},w=m[r]=m[r]||[],k=Dd(p),P=w[k];return P||(w[k]=t.call(d,a,s,c,f))}else return t.call(d,a,s,c,f)}},Tg={parent:function(t){var r=[];if(this.length===1){var a=this[0]._private.parent;if(a)return a}for(var s=0;s<this.length;s++){var c=this[s],f=c._private.parent;f&&r.push(f)}return this.spawn(r,!0).filter(t)},parents:function(t){for(var r=[],a=this.parent();a.nonempty();){for(var s=0;s<a.length;s++){var c=a[s];r.push(c)}a=a.parent()}return this.spawn(r,!0).filter(t)},commonAncestors:function(t){for(var r,a=0;a<this.length;a++){var s=this[a],c=s.parents();r=r||c,r=r.intersect(c)}return r.filter(t)},orphans:function(t){return this.stdFilter(function(r){return r.isOrphan()}).filter(t)},nonorphans:function(t){return this.stdFilter(function(r){return r.isChild()}).filter(t)},children:ku(function(t){for(var r=[],a=0;a<this.length;a++)for(var s=this[a],c=s._private.children,f=0;f<c.length;f++)r.push(c[f]);return this.spawn(r,!0).filter(t)},"children"),siblings:function(t){return this.parent().children().not(this).filter(t)},isParent:function(){var t=this[0];if(t)return t.isNode()&&t._private.children.length!==0},isChildless:function(){var t=this[0];if(t)return t.isNode()&&t._private.children.length===0},isChild:function(){var t=this[0];if(t)return t.isNode()&&t._private.parent!=null},isOrphan:function(){var t=this[0];if(t)return t.isNode()&&t._private.parent==null},descendants:function(t){var r=[];function a(s){for(var c=0;c<s.length;c++){var f=s[c];r.push(f),f.children().nonempty()&&a(f.children())}}return a(this.children()),this.spawn(r,!0).filter(t)}};function wP(t,r,a,s){for(var c=[],f=new wg,h=t.cy(),d=h.hasCompoundNodes(),p=0;p<t.length;p++){var b=t[p];a?c.push(b):d&&s(c,f,b)}for(;c.length>0;){var m=c.shift();r(m),f.add(m.id()),d&&s(c,f,m)}return t}function TD(t,r,a){if(a.isParent())for(var s=a._private.children,c=0;c<s.length;c++){var f=s[c];r.has(f.id())||t.push(f)}}Tg.forEachDown=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return wP(this,t,r,TD)};function MD(t,r,a){if(a.isChild()){var s=a._private.parent;r.has(s.id())||t.push(s)}}Tg.forEachUp=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return wP(this,t,r,MD)};function Hle(t,r,a){MD(t,r,a),TD(t,r,a)}Tg.forEachUpAndDown=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return wP(this,t,r,Hle)},Tg.ancestors=Tg.parents;var f0,jD;f0=jD={data:Ar.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:Ar.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Ar.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ar.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Ar.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Ar.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}},f0.attr=f0.data,f0.removeAttr=f0.removeData;var zle=jD,fw={};function xP(t){return function(r){var a=this;if(r===void 0&&(r=!0),a.length!==0)if(a.isNode()&&!a.removed()){for(var s=0,c=a[0],f=c._private.edges,h=0;h<f.length;h++){var d=f[h];!r&&d.isLoop()||(s+=t(c,d))}return s}else return}}fn(fw,{degree:xP(function(t,r){return r.source().same(r.target())?2:1}),indegree:xP(function(t,r){return r.target().same(t)?1:0}),outdegree:xP(function(t,r){return r.source().same(t)?1:0})});function Mg(t,r){return function(a){for(var s,c=this.nodes(),f=0;f<c.length;f++){var h=c[f],d=h[t](a);d!==void 0&&(s===void 0||r(d,s))&&(s=d)}return s}}fn(fw,{minDegree:Mg("degree",function(t,r){return t<r}),maxDegree:Mg("degree",function(t,r){return t>r}),minIndegree:Mg("indegree",function(t,r){return t<r}),maxIndegree:Mg("indegree",function(t,r){return t>r}),minOutdegree:Mg("outdegree",function(t,r){return t<r}),maxOutdegree:Mg("outdegree",function(t,r){return t>r})}),fn(fw,{totalDegree:function(t){for(var r=0,a=this.nodes(),s=0;s<a.length;s++)r+=a[s].degree(t);return r}});var tc,AD,ID=function(t,r,a){for(var s=0;s<t.length;s++){var c=t[s];if(!c.locked()){var f=c._private.position,h={x:r.x!=null?r.x-f.x:0,y:r.y!=null?r.y-f.y:0};c.isParent()&&!(h.x===0&&h.y===0)&&c.children().shift(h,a),c.dirtyBoundingBoxCache()}}},LD={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(t){t.updateCompoundBounds()},beforeSet:function(t,r){ID(t,r,!1)},onSet:function(t){t.dirtyCompoundBoundsCache()},canSet:function(t){return!t.locked()}};tc=AD={position:Ar.data(LD),silentPosition:Ar.data(fn({},LD,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(t,r){ID(t,r,!0)},onSet:function(t){t.dirtyCompoundBoundsCache()}})),positions:function(t,r){if(gr(t))r?this.silentPosition(t):this.position(t);else if(Di(t)){var a=t,s=this.cy();s.startBatch();for(var c=0;c<this.length;c++){var f=this[c],h=void 0;(h=a(f,c))&&(r?f.silentPosition(h):f.position(h))}s.endBatch()}return this},silentPositions:function(t){return this.positions(t,!0)},shift:function(t,r,a){var s;if(gr(t)?(s={x:jt(t.x)?t.x:0,y:jt(t.y)?t.y:0},a=r):nn(t)&&jt(r)&&(s={x:0,y:0},s[t]=r),s!=null){var c=this.cy();c.startBatch();for(var f=0;f<this.length;f++){var h=this[f];if(!(c.hasCompoundNodes()&&h.isChild()&&h.ancestors().anySame(this))){var d=h.position(),p={x:d.x+s.x,y:d.y+s.y};a?h.silentPosition(p):h.position(p)}}c.endBatch()}return this},silentShift:function(t,r){return gr(t)?this.shift(t,!0):nn(t)&&jt(r)&&this.shift(t,r,!0),this},renderedPosition:function(t,r){var a=this[0],s=this.cy(),c=s.zoom(),f=s.pan(),h=gr(t)?t:void 0,d=h!==void 0||r!==void 0&&nn(t);if(a&&a.isNode())if(d)for(var p=0;p<this.length;p++){var b=this[p];r!==void 0?b.position(t,(r-f[t])/c):h!==void 0&&b.position(Z8(h,c,f))}else{var m=a.position();return h=Km(m,c,f),t===void 0?h:h[t]}else if(!d)return;return this},relativePosition:function(t,r){var a=this[0],s=this.cy(),c=gr(t)?t:void 0,f=c!==void 0||r!==void 0&&nn(t),h=s.hasCompoundNodes();if(a&&a.isNode())if(f)for(var d=0;d<this.length;d++){var p=this[d],b=h?p.parent():null,m=b&&b.length>0,w=m;m&&(b=b[0]);var k=w?b.position():{x:0,y:0};r!==void 0?p.position(t,r+k[t]):c!==void 0&&p.position({x:c.x+k.x,y:c.y+k.y})}else{var P=a.position(),S=h?a.parent():null,M=S&&S.length>0,L=M;M&&(S=S[0]);var T=L?S.position():{x:0,y:0};return c={x:P.x-T.x,y:P.y-T.y},t===void 0?c:c[t]}else if(!f)return;return this}},tc.modelPosition=tc.point=tc.position,tc.modelPositions=tc.points=tc.positions,tc.renderedPoint=tc.renderedPosition,tc.relativePoint=tc.relativePosition;var Ule=AD,jg,yh;jg=yh={},yh.renderedBoundingBox=function(t){var r=this.boundingBox(t),a=this.cy(),s=a.zoom(),c=a.pan(),f=r.x1*s+c.x,h=r.x2*s+c.x,d=r.y1*s+c.y,p=r.y2*s+c.y;return{x1:f,x2:h,y1:d,y2:p,w:h-f,h:p-d}},yh.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.cy();return!r.styleEnabled()||!r.hasCompoundNodes()?this:(this.forEachUp(function(a){if(a.isParent()){var s=a._private;s.compoundBoundsClean=!1,s.bbCache=null,t||a.emitAndNotify("bounds")}}),this)},yh.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.cy();if(!r.styleEnabled()||!r.hasCompoundNodes())return this;if(!t&&r.batching())return this;function a(h){if(!h.isParent())return;var d=h._private,p=h.children(),b=h.pstyle("compound-sizing-wrt-labels").value==="include",m={width:{val:h.pstyle("min-width").pfValue,left:h.pstyle("min-width-bias-left"),right:h.pstyle("min-width-bias-right")},height:{val:h.pstyle("min-height").pfValue,top:h.pstyle("min-height-bias-top"),bottom:h.pstyle("min-height-bias-bottom")}},w=p.boundingBox({includeLabels:b,includeOverlays:!1,useCache:!1}),k=d.position;(w.w===0||w.h===0)&&(w={w:h.pstyle("width").pfValue,h:h.pstyle("height").pfValue},w.x1=k.x-w.w/2,w.x2=k.x+w.w/2,w.y1=k.y-w.h/2,w.y2=k.y+w.h/2);function P(z,Q,$){var Z=0,X=0,K=Q+$;return z>0&&K>0&&(Z=Q/K*z,X=$/K*z),{biasDiff:Z,biasComplementDiff:X}}function S(z,Q,$,Z){if($.units==="%")switch(Z){case"width":return z>0?$.pfValue*z:0;case"height":return Q>0?$.pfValue*Q:0;case"average":return z>0&&Q>0?$.pfValue*(z+Q)/2:0;case"min":return z>0&&Q>0?z>Q?$.pfValue*Q:$.pfValue*z:0;case"max":return z>0&&Q>0?z>Q?$.pfValue*z:$.pfValue*Q:0;default:return 0}else return $.units==="px"?$.pfValue:0}var M=m.width.left.value;m.width.left.units==="px"&&m.width.val>0&&(M=M*100/m.width.val);var L=m.width.right.value;m.width.right.units==="px"&&m.width.val>0&&(L=L*100/m.width.val);var T=m.height.top.value;m.height.top.units==="px"&&m.height.val>0&&(T=T*100/m.height.val);var j=m.height.bottom.value;m.height.bottom.units==="px"&&m.height.val>0&&(j=j*100/m.height.val);var I=P(m.width.val-w.w,M,L),D=I.biasDiff,R=I.biasComplementDiff,Y=P(m.height.val-w.h,T,j),G=Y.biasDiff,U=Y.biasComplementDiff;d.autoPadding=S(w.w,w.h,h.pstyle("padding"),h.pstyle("padding-relative-to").value),d.autoWidth=Math.max(w.w,m.width.val),k.x=(-D+w.x1+w.x2+R)/2,d.autoHeight=Math.max(w.h,m.height.val),k.y=(-G+w.y1+w.y2+U)/2}for(var s=0;s<this.length;s++){var c=this[s],f=c._private;(!f.compoundBoundsClean||t)&&(a(c),r.batching()||(f.compoundBoundsClean=!0))}return this};var _u=function(t){return t===1/0||t===-1/0?0:t},nc=function(t,r,a,s,c){s-r===0||c-a===0||r==null||a==null||s==null||c==null||(t.x1=r<t.x1?r:t.x1,t.x2=s>t.x2?s:t.x2,t.y1=a<t.y1?a:t.y1,t.y2=c>t.y2?c:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},mh=function(t,r){return r==null?t:nc(t,r.x1,r.y1,r.x2,r.y2)},h0=function(t,r,a){return Ts(t,r,a)},hw=function(t,r,a){if(!r.cy().headless()){var s=r._private,c=s.rstyle,f=c.arrowWidth/2,h=r.pstyle(a+"-arrow-shape").value,d,p;if(h!=="none"){a==="source"?(d=c.srcX,p=c.srcY):a==="target"?(d=c.tgtX,p=c.tgtY):(d=c.midX,p=c.midY);var b=s.arrowBounds=s.arrowBounds||{},m=b[a]=b[a]||{};m.x1=d-f,m.y1=p-f,m.x2=d+f,m.y2=p+f,m.w=m.x2-m.x1,m.h=m.y2-m.y1,Wm(m,1),nc(t,m.x1,m.y1,m.x2,m.y2)}}},kP=function(t,r,a){if(!r.cy().headless()){var s;a?s=a+"-":s="";var c=r._private,f=c.rstyle,h=r.pstyle(s+"label").strValue;if(h){var d=r.pstyle("text-halign"),p=r.pstyle("text-valign"),b=h0(f,"labelWidth",a),m=h0(f,"labelHeight",a),w=h0(f,"labelX",a),k=h0(f,"labelY",a),P=r.pstyle(s+"text-margin-x").pfValue,S=r.pstyle(s+"text-margin-y").pfValue,M=r.isEdge(),L=r.pstyle(s+"text-rotation"),T=r.pstyle("text-outline-width").pfValue,j=r.pstyle("text-border-width").pfValue,I=j/2,D=r.pstyle("text-background-padding").pfValue,R=2,Y=m,G=b,U=G/2,z=Y/2,Q,$,Z,X;if(M)Q=w-U,$=w+U,Z=k-z,X=k+z;else{switch(d.value){case"left":Q=w-G,$=w;break;case"center":Q=w-U,$=w+U;break;case"right":Q=w,$=w+G;break}switch(p.value){case"top":Z=k-Y,X=k;break;case"center":Z=k-z,X=k+z;break;case"bottom":Z=k,X=k+Y;break}}var K=P-Math.max(T,I)-D-R,ae=P+Math.max(T,I)+D+R,se=S-Math.max(T,I)-D-R,le=S+Math.max(T,I)+D+R;Q+=K,$+=ae,Z+=se,X+=le;var he=a||"main",fe=c.labelBounds,pe=fe[he]=fe[he]||{};pe.x1=Q,pe.y1=Z,pe.x2=$,pe.y2=X,pe.w=$-Q,pe.h=X-Z,pe.leftPad=K,pe.rightPad=ae,pe.topPad=se,pe.botPad=le;var me=M&&L.strValue==="autorotate",Te=L.pfValue!=null&&L.pfValue!==0;if(me||Te){var Le=me?h0(c.rstyle,"labelAngle",a):L.pfValue,ge=Math.cos(Le),xe=Math.sin(Le),Se=(Q+$)/2,Ie=(Z+X)/2;if(!M){switch(d.value){case"left":Se=$;break;case"right":Se=Q;break}switch(p.value){case"top":Ie=X;break;case"bottom":Ie=Z;break}}var Re=function(ft,Ue){return ft=ft-Se,Ue=Ue-Ie,{x:ft*ge-Ue*xe+Se,y:ft*xe+Ue*ge+Ie}},Ne=Re(Q,Z),Me=Re(Q,X),ke=Re($,Z),Ge=Re($,X);Q=Math.min(Ne.x,Me.x,ke.x,Ge.x),$=Math.max(Ne.x,Me.x,ke.x,Ge.x),Z=Math.min(Ne.y,Me.y,ke.y,Ge.y),X=Math.max(Ne.y,Me.y,ke.y,Ge.y)}var Qe=he+"Rot",nt=fe[Qe]=fe[Qe]||{};nt.x1=Q,nt.y1=Z,nt.x2=$,nt.y2=X,nt.w=$-Q,nt.h=X-Z,nc(t,Q,Z,$,X),nc(c.labelBounds.all,Q,Z,$,X)}return t}},OD=function(t,r){if(!r.cy().headless()){var a=r.pstyle("outline-opacity").value,s=r.pstyle("outline-width").value,c=r.pstyle("outline-offset").value,f=s+c;DD(t,r,a,f,"outside",f/2)}},DD=function(t,r,a,s,c,f){if(!(a===0||s<=0||c==="inside")){var h=r.cy(),d=r.pstyle("shape").value,p=h.renderer().nodeShapes[d],b=r.position(),m=b.x,w=b.y,k=r.width(),P=r.height();if(p.hasMiterBounds){c==="center"&&(s/=2);var S=p.miterBounds(m,w,k,P,s);mh(t,S)}else f!=null&&f>0&&Jm(t,[f,f,f,f])}},Fle=function(t,r){if(!r.cy().headless()){var a=r.pstyle("border-opacity").value,s=r.pstyle("border-width").pfValue,c=r.pstyle("border-position").value;DD(t,r,a,s,c)}},Yle=function(t,r){var a=t._private.cy,s=a.styleEnabled(),c=a.headless(),f=Qo(),h=t._private,d=t.isNode(),p=t.isEdge(),b,m,w,k,P,S,M=h.rstyle,L=d&&s?t.pstyle("bounds-expansion").pfValue:[0],T=function(nt){return nt.pstyle("display").value!=="none"},j=!s||T(t)&&(!p||T(t.source())&&T(t.target()));if(j){var I=0,D=0;s&&r.includeOverlays&&(I=t.pstyle("overlay-opacity").value,I!==0&&(D=t.pstyle("overlay-padding").value));var R=0,Y=0;s&&r.includeUnderlays&&(R=t.pstyle("underlay-opacity").value,R!==0&&(Y=t.pstyle("underlay-padding").value));var G=Math.max(D,Y),U=0,z=0;if(s&&(U=t.pstyle("width").pfValue,z=U/2),d&&r.includeNodes){var Q=t.position();P=Q.x,S=Q.y;var $=t.outerWidth(),Z=$/2,X=t.outerHeight(),K=X/2;b=P-Z,m=P+Z,w=S-K,k=S+K,nc(f,b,w,m,k),s&&OD(f,t),s&&r.includeOutlines&&!c&&OD(f,t),s&&Fle(f,t)}else if(p&&r.includeEdges)if(s&&!c){var ae=t.pstyle("curve-style").strValue;if(b=Math.min(M.srcX,M.midX,M.tgtX),m=Math.max(M.srcX,M.midX,M.tgtX),w=Math.min(M.srcY,M.midY,M.tgtY),k=Math.max(M.srcY,M.midY,M.tgtY),b-=z,m+=z,w-=z,k+=z,nc(f,b,w,m,k),ae==="haystack"){var se=M.haystackPts;if(se&&se.length===2){if(b=se[0].x,w=se[0].y,m=se[1].x,k=se[1].y,b>m){var le=b;b=m,m=le}if(w>k){var he=w;w=k,k=he}nc(f,b-z,w-z,m+z,k+z)}}else if(ae==="bezier"||ae==="unbundled-bezier"||uh(ae,"segments")||uh(ae,"taxi")){var fe;switch(ae){case"bezier":case"unbundled-bezier":fe=M.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":fe=M.linePts;break}if(fe!=null)for(var pe=0;pe<fe.length;pe++){var me=fe[pe];b=me.x-z,m=me.x+z,w=me.y-z,k=me.y+z,nc(f,b,w,m,k)}}}else{var Te=t.source(),Le=Te.position(),ge=t.target(),xe=ge.position();if(b=Le.x,m=xe.x,w=Le.y,k=xe.y,b>m){var Se=b;b=m,m=Se}if(w>k){var Ie=w;w=k,k=Ie}b-=z,m+=z,w-=z,k+=z,nc(f,b,w,m,k)}if(s&&r.includeEdges&&p&&(hw(f,t,"mid-source"),hw(f,t,"mid-target"),hw(f,t,"source"),hw(f,t,"target")),s){var Re=t.pstyle("ghost").value==="yes";if(Re){var Ne=t.pstyle("ghost-offset-x").pfValue,Me=t.pstyle("ghost-offset-y").pfValue;nc(f,f.x1+Ne,f.y1+Me,f.x2+Ne,f.y2+Me)}}var ke=h.bodyBounds=h.bodyBounds||{};K8(ke,f),Jm(ke,L),Wm(ke,1),s&&(b=f.x1,m=f.x2,w=f.y1,k=f.y2,nc(f,b-G,w-G,m+G,k+G));var Ge=h.overlayBounds=h.overlayBounds||{};K8(Ge,f),Jm(Ge,L),Wm(Ge,1);var Qe=h.labelBounds=h.labelBounds||{};Qe.all!=null?Cue(Qe.all):Qe.all=Qo(),s&&r.includeLabels&&(r.includeMainLabels&&kP(f,t,null),p&&(r.includeSourceLabels&&kP(f,t,"source"),r.includeTargetLabels&&kP(f,t,"target")))}return f.x1=_u(f.x1),f.y1=_u(f.y1),f.x2=_u(f.x2),f.y2=_u(f.y2),f.w=_u(f.x2-f.x1),f.h=_u(f.y2-f.y1),f.w>0&&f.h>0&&j&&(Jm(f,L),Wm(f,1)),f},BD=function(t){var r=0,a=function(c){return(c?1:0)<<r++},s=0;return s+=a(t.incudeNodes),s+=a(t.includeEdges),s+=a(t.includeLabels),s+=a(t.includeMainLabels),s+=a(t.includeSourceLabels),s+=a(t.includeTargetLabels),s+=a(t.includeOverlays),s+=a(t.includeOutlines),s},RD=function(t){var r=function(f){return Math.round(f)};if(t.isEdge()){var a=t.source().position(),s=t.target().position();return O8([r(a.x),r(a.y),r(s.x),r(s.y)])}else{var c=t.position();return O8([r(c.x),r(c.y)])}},GD=function(t,r){var a=t._private,s,c=t.isEdge(),f=r==null?HD:BD(r),h=f===HD;if(a.bbCache==null?(s=Yle(t,d0),a.bbCache=s,a.bbCachePosKey=RD(t)):s=a.bbCache,!h){var d=t.isNode();s=Qo(),(r.includeNodes&&d||r.includeEdges&&!d)&&(r.includeOverlays?mh(s,a.overlayBounds):mh(s,a.bodyBounds)),r.includeLabels&&(r.includeMainLabels&&(!c||r.includeSourceLabels&&r.includeTargetLabels)?mh(s,a.labelBounds.all):(r.includeMainLabels&&mh(s,a.labelBounds.mainRot),r.includeSourceLabels&&mh(s,a.labelBounds.sourceRot),r.includeTargetLabels&&mh(s,a.labelBounds.targetRot))),s.w=s.x2-s.x1,s.h=s.y2-s.y1}return s},d0={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},HD=BD(d0),zD=yo(d0);yh.boundingBox=function(t){var r,a=t===void 0||t.useCache===void 0||t.useCache===!0,s=yg(function(m){var w=m._private;return w.bbCache==null||w.styleDirty||w.bbCachePosKey!==RD(m)},function(m){return m.id()});if(a&&this.length===1&&!s(this[0]))t===void 0?t=d0:t=zD(t),r=GD(this[0],t);else{r=Qo(),t=t||d0;var c=zD(t),f=this,h=f.cy(),d=h.styleEnabled();this.edges().forEach(s),this.nodes().forEach(s),d&&this.recalculateRenderedStyle(a),this.updateCompoundBounds(!a);for(var p=0;p<f.length;p++){var b=f[p];s(b)&&b.dirtyBoundingBoxCache(),mh(r,GD(b,c))}}return r.x1=_u(r.x1),r.y1=_u(r.y1),r.x2=_u(r.x2),r.y2=_u(r.y2),r.w=_u(r.x2-r.x1),r.h=_u(r.y2-r.y1),r},yh.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var r=this[t]._private;r.bbCache=null,r.bbCachePosKey=null,r.bodyBounds=null,r.overlayBounds=null,r.labelBounds.all=null,r.labelBounds.source=null,r.labelBounds.target=null,r.labelBounds.main=null,r.labelBounds.sourceRot=null,r.labelBounds.targetRot=null,r.labelBounds.mainRot=null,r.arrowBounds.source=null,r.arrowBounds.target=null,r.arrowBounds["mid-source"]=null,r.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},yh.boundingBoxAt=function(t){var r=this.nodes(),a=this.cy(),s=a.hasCompoundNodes(),c=a.collection();if(s&&(c=r.filter(function(b){return b.isParent()}),r=r.not(c)),gr(t)){var f=t;t=function(){return f}}var h=function(b,m){return b._private.bbAtOldPos=t(b,m)},d=function(b){return b._private.bbAtOldPos};a.startBatch(),r.forEach(h).silentPositions(t),s&&(c.dirtyCompoundBoundsCache(),c.dirtyBoundingBoxCache(),c.updateCompoundBounds(!0));var p=Eue(this.boundingBox({useCache:!1}));return r.silentPositions(d),s&&(c.dirtyCompoundBoundsCache(),c.dirtyBoundingBoxCache(),c.updateCompoundBounds(!0)),a.endBatch(),p},jg.boundingbox=jg.bb=jg.boundingBox,jg.renderedBoundingbox=jg.renderedBoundingBox;var Vle=yh,p0,g0;p0=g0={};var UD=function(t){t.uppercaseName=h8(t.name),t.autoName="auto"+t.uppercaseName,t.labelName="label"+t.uppercaseName,t.outerName="outer"+t.uppercaseName,t.uppercaseOuterName=h8(t.outerName),p0[t.name]=function(){var r=this[0],a=r._private,s=a.cy,c=s._private.styleEnabled;if(r)if(c){if(r.isParent())return r.updateCompoundBounds(),a[t.autoName]||0;var f=r.pstyle(t.name);switch(f.strValue){case"label":return r.recalculateRenderedStyle(),a.rstyle[t.labelName]||0;default:return f.pfValue}}else return 1},p0["outer"+t.uppercaseName]=function(){var r=this[0],a=r._private,s=a.cy,c=s._private.styleEnabled;if(r)if(c){var f=r[t.name](),h=r.pstyle("border-position").value,d;h==="center"?d=r.pstyle("border-width").pfValue:h==="outside"?d=2*r.pstyle("border-width").pfValue:d=0;var p=2*r.padding();return f+d+p}else return 1},p0["rendered"+t.uppercaseName]=function(){var r=this[0];if(r){var a=r[t.name]();return a*this.cy().zoom()}},p0["rendered"+t.uppercaseOuterName]=function(){var r=this[0];if(r){var a=r[t.outerName]();return a*this.cy().zoom()}}};UD({name:"width"}),UD({name:"height"}),g0.padding=function(){var t=this[0],r=t._private;return t.isParent()?(t.updateCompoundBounds(),r.autoPadding!==void 0?r.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue},g0.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},g0.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var qle=g0,Zle=function(t,r){if(t.isEdge()&&t.takesUpSpace())return r(t)},$le=function(t,r){if(t.isEdge()&&t.takesUpSpace()){var a=t.cy();return Km(r(t),a.zoom(),a.pan())}},Kle=function(t,r){if(t.isEdge()&&t.takesUpSpace()){var a=t.cy(),s=a.pan(),c=a.zoom();return r(t).map(function(f){return Km(f,c,s)})}},Qle=function(t){return t.renderer().getControlPoints(t)},Wle=function(t){return t.renderer().getSegmentPoints(t)},Jle=function(t){return t.renderer().getSourceEndpoint(t)},Xle=function(t){return t.renderer().getTargetEndpoint(t)},efe=function(t){return t.renderer().getEdgeMidpoint(t)},FD={controlPoints:{get:Qle,mult:!0},segmentPoints:{get:Wle,mult:!0},sourceEndpoint:{get:Jle},targetEndpoint:{get:Xle},midpoint:{get:efe}},tfe=function(t){return"rendered"+t[0].toUpperCase()+t.substr(1)},nfe=Object.keys(FD).reduce(function(t,r){var a=FD[r],s=tfe(r);return t[r]=function(){return Zle(this,a.get)},a.mult?t[s]=function(){return Kle(this,a.get)}:t[s]=function(){return $le(this,a.get)},t},{}),rfe=fn({},Ule,Vle,qle,nfe);/*!
|
|
9
|
+
Event object based on jQuery events, MIT license
|
|
10
|
+
|
|
11
|
+
https://jquery.org/license/
|
|
12
|
+
https://tldrlegal.com/license/mit-license
|
|
13
|
+
https://github.com/jquery/jquery/blob/master/src/event.js
|
|
14
|
+
*/var YD=function(t,r){this.recycle(t,r)};function b0(){return!1}function dw(){return!0}YD.prototype={instanceString:function(){return"event"},recycle:function(t,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=b0,t!=null&&t.preventDefault?(this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?dw:b0):t!=null&&t.type?r=t:this.type=t,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var a=this.position,s=this.cy.zoom(),c=this.cy.pan();this.renderedPosition={x:a.x*s+c.x,y:a.y*s+c.y}}this.timeStamp=t&&t.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=dw;var t=this.originalEvent;t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.isPropagationStopped=dw;var t=this.originalEvent;t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=dw,this.stopPropagation()},isDefaultPrevented:b0,isPropagationStopped:b0,isImmediatePropagationStopped:b0};var VD=/^([^.]+)(\.(?:[^.]+))?$/,ife=".*",qD={qualifierCompare:function(t,r){return t===r},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(t){return t},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},ZD=Object.keys(qD),afe={};function pw(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:afe,r=arguments.length>1?arguments[1]:void 0,a=0;a<ZD.length;a++){var s=ZD[a];this[s]=t[s]||qD[s]}this.context=r||this.context,this.listeners=[],this.emitting=0}var wh=pw.prototype,$D=function(t,r,a,s,c,f,h){Di(s)&&(c=s,s=null),h&&(f==null?f=h:f=fn({},f,h));for(var d=ei(a)?a:a.split(/\s+/),p=0;p<d.length;p++){var b=d[p];if(!sh(b)){var m=b.match(VD);if(m){var w=m[1],k=m[2]?m[2]:null,P=r(t,b,w,k,s,c,f);if(P===!1)break}}}},KD=function(t,r){return t.addEventFields(t.context,r),new YD(r.type,r)},ofe=function(t,r,a){if(hse(a)){r(t,a);return}else if(gr(a)){r(t,KD(t,a));return}for(var s=ei(a)?a:a.split(/\s+/),c=0;c<s.length;c++){var f=s[c];if(!sh(f)){var h=f.match(VD);if(h){var d=h[1],p=h[2]?h[2]:null,b=KD(t,{type:d,namespace:p,target:t.context});r(t,b)}}}};wh.on=wh.addListener=function(t,r,a,s,c){return $D(this,function(f,h,d,p,b,m,w){Di(m)&&f.listeners.push({event:h,callback:m,type:d,namespace:p,qualifier:b,conf:w})},t,r,a,s,c),this},wh.one=function(t,r,a,s){return this.on(t,r,a,s,{one:!0})},wh.removeListener=wh.off=function(t,r,a,s){var c=this;this.emitting!==0&&(this.listeners=$se(this.listeners));for(var f=this.listeners,h=function(p){var b=f[p];$D(c,function(m,w,k,P,S,M){if((b.type===k||t==="*")&&(!P&&b.namespace!==".*"||b.namespace===P)&&(!S||m.qualifierCompare(b.qualifier,S))&&(!M||b.callback===M))return f.splice(p,1),!1},t,r,a,s)},d=f.length-1;d>=0;d--)h(d);return this},wh.removeAllListeners=function(){return this.removeListener("*")},wh.emit=wh.trigger=function(t,r,a){var s=this.listeners,c=s.length;return this.emitting++,ei(r)||(r=[r]),ofe(this,function(f,h){a!=null&&(s=[{event:h.event,type:h.type,namespace:h.namespace,callback:a}],c=s.length);for(var d=function(){var b=s[p];if(b.type===h.type&&(!b.namespace||b.namespace===h.namespace||b.namespace===ife)&&f.eventMatches(f.context,b,h)){var m=[h];r!=null&&Qse(m,r),f.beforeEmit(f.context,b,h),b.conf&&b.conf.one&&(f.listeners=f.listeners.filter(function(P){return P!==b}));var w=f.callbackContext(f.context,b,h),k=b.callback.apply(w,m);f.afterEmit(f.context,b,h),k===!1&&(h.stopPropagation(),h.preventDefault())}},p=0;p<c;p++)d();f.bubble(f.context)&&!h.isPropagationStopped()&&f.parent(f.context).emit(h,r)},t),this.emitting--,this};var sfe={qualifierCompare:function(t,r){return t==null||r==null?t==null&&r==null:t.sameText(r)},eventMatches:function(t,r,a){var s=r.qualifier;return s!=null?t!==a.target&&Jv(a.target)&&s.matches(a.target):!0},addEventFields:function(t,r){r.cy=t.cy(),r.target=t},callbackContext:function(t,r,a){return r.qualifier!=null?a.target:t},beforeEmit:function(t,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},bubble:function(){return!0},parent:function(t){return t.isChild()?t.parent():t.cy()}},gw=function(t){return nn(t)?new gh(t):t},QD={createEmitter:function(){for(var t=0;t<this.length;t++){var r=this[t],a=r._private;a.emitter||(a.emitter=new pw(sfe,r))}return this},emitter:function(){return this._private.emitter},on:function(t,r,a){for(var s=gw(r),c=0;c<this.length;c++){var f=this[c];f.emitter().on(t,s,a)}return this},removeListener:function(t,r,a){for(var s=gw(r),c=0;c<this.length;c++){var f=this[c];f.emitter().removeListener(t,s,a)}return this},removeAllListeners:function(){for(var t=0;t<this.length;t++){var r=this[t];r.emitter().removeAllListeners()}return this},one:function(t,r,a){for(var s=gw(r),c=0;c<this.length;c++){var f=this[c];f.emitter().one(t,s,a)}return this},once:function(t,r,a){for(var s=gw(r),c=0;c<this.length;c++){var f=this[c];f.emitter().on(t,s,a,{once:!0,onceCollection:this})}},emit:function(t,r){for(var a=0;a<this.length;a++){var s=this[a];s.emitter().emit(t,r)}return this},emitAndNotify:function(t,r){if(this.length!==0)return this.cy().notify(t,this),this.emit(t,r),this}};Ar.eventAliasesOn(QD);var WD={nodes:function(t){return this.filter(function(r){return r.isNode()}).filter(t)},edges:function(t){return this.filter(function(r){return r.isEdge()}).filter(t)},byGroup:function(){for(var t=this.spawn(),r=this.spawn(),a=0;a<this.length;a++){var s=this[a];s.isNode()?t.push(s):r.push(s)}return{nodes:t,edges:r}},filter:function(t,r){if(t===void 0)return this;if(nn(t)||nu(t))return new gh(t).filter(this);if(Di(t)){for(var a=this.spawn(),s=this,c=0;c<s.length;c++){var f=s[c],h=r?t.apply(r,[f,c,s]):t(f,c,s);h&&a.push(f)}return a}return this.spawn()},not:function(t){if(t){nn(t)&&(t=this.filter(t));for(var r=this.spawn(),a=0;a<this.length;a++){var s=this[a],c=t.has(s);c||r.push(s)}return r}else return this},absoluteComplement:function(){var t=this.cy();return t.mutableElements().not(this)},intersect:function(t){if(nn(t)){var r=t;return this.filter(r)}for(var a=this.spawn(),s=this,c=t,f=this.length<t.length,h=f?s:c,d=f?c:s,p=0;p<h.length;p++){var b=h[p];d.has(b)&&a.push(b)}return a},xor:function(t){var r=this._private.cy;nn(t)&&(t=r.$(t));var a=this.spawn(),s=this,c=t,f=function(h,d){for(var p=0;p<h.length;p++){var b=h[p],m=b._private.data.id,w=d.hasElementWithId(m);w||a.push(b)}};return f(s,c),f(c,s),a},diff:function(t){var r=this._private.cy;nn(t)&&(t=r.$(t));var a=this.spawn(),s=this.spawn(),c=this.spawn(),f=this,h=t,d=function(p,b,m){for(var w=0;w<p.length;w++){var k=p[w],P=k._private.data.id,S=b.hasElementWithId(P);S?c.merge(k):m.push(k)}};return d(f,h,a),d(h,f,s),{left:a,right:s,both:c}},add:function(t){var r=this._private.cy;if(!t)return this;if(nn(t)){var a=t;t=r.mutableElements().filter(a)}for(var s=this.spawnSelf(),c=0;c<t.length;c++){var f=t[c],h=!this.has(f);h&&s.push(f)}return s},merge:function(t){var r=this._private,a=r.cy;if(!t)return this;if(t&&nn(t)){var s=t;t=a.mutableElements().filter(s)}for(var c=r.map,f=0;f<t.length;f++){var h=t[f],d=h._private.data.id,p=!c.has(d);if(p){var b=this.length++;this[b]=h,c.set(d,{ele:h,index:b})}}return this},unmergeAt:function(t){var r=this[t],a=r.id(),s=this._private,c=s.map;this[t]=void 0,c.delete(a);var f=t===this.length-1;if(this.length>1&&!f){var h=this.length-1,d=this[h],p=d._private.data.id;this[h]=void 0,this[t]=d,c.set(p,{ele:d,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var r=this._private,a=t._private.data.id,s=r.map,c=s.get(a);if(!c)return this;var f=c.index;return this.unmergeAt(f),this},unmerge:function(t){var r=this._private.cy;if(!t)return this;if(t&&nn(t)){var a=t;t=r.mutableElements().filter(a)}for(var s=0;s<t.length;s++)this.unmergeOne(t[s]);return this},unmergeBy:function(t){for(var r=this.length-1;r>=0;r--){var a=this[r];t(a)&&this.unmergeAt(r)}return this},map:function(t,r){for(var a=[],s=this,c=0;c<s.length;c++){var f=s[c],h=r?t.apply(r,[f,c,s]):t(f,c,s);a.push(h)}return a},reduce:function(t,r){for(var a=r,s=this,c=0;c<s.length;c++)a=t(a,s[c],c,s);return a},max:function(t,r){for(var a=-1/0,s,c=this,f=0;f<c.length;f++){var h=c[f],d=r?t.apply(r,[h,f,c]):t(h,f,c);d>a&&(a=d,s=h)}return{value:a,ele:s}},min:function(t,r){for(var a=1/0,s,c=this,f=0;f<c.length;f++){var h=c[f],d=r?t.apply(r,[h,f,c]):t(h,f,c);d<a&&(a=d,s=h)}return{value:a,ele:s}}},wr=WD;wr.u=wr["|"]=wr["+"]=wr.union=wr.or=wr.add,wr["\\"]=wr["!"]=wr["-"]=wr.difference=wr.relativeComplement=wr.subtract=wr.not,wr.n=wr["&"]=wr["."]=wr.and=wr.intersection=wr.intersect,wr["^"]=wr["(+)"]=wr["(-)"]=wr.symmetricDifference=wr.symdiff=wr.xor,wr.fnFilter=wr.filterFn=wr.stdFilter=wr.filter,wr.complement=wr.abscomp=wr.absoluteComplement;var ufe={isNode:function(){return this.group()==="nodes"},isEdge:function(){return this.group()==="edges"},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var t=this[0];if(t)return t._private.group}},JD=function(t,r){var a=t.cy(),s=a.hasCompoundNodes();function c(b){var m=b.pstyle("z-compound-depth");return m.value==="auto"?s?b.zDepth():0:m.value==="bottom"?-1:m.value==="top"?WC:0}var f=c(t)-c(r);if(f!==0)return f;function h(b){var m=b.pstyle("z-index-compare");return m.value==="auto"&&b.isNode()?1:0}var d=h(t)-h(r);if(d!==0)return d;var p=t.pstyle("z-index").value-r.pstyle("z-index").value;return p!==0?p:t.poolIndex()-r.poolIndex()},bw={forEach:function(t,r){if(Di(t))for(var a=this.length,s=0;s<a;s++){var c=this[s],f=r?t.apply(r,[c,s,this]):t(c,s,this);if(f===!1)break}return this},toArray:function(){for(var t=[],r=0;r<this.length;r++)t.push(this[r]);return t},slice:function(t,r){var a=[],s=this.length;r==null&&(r=s),t==null&&(t=0),t<0&&(t=s+t),r<0&&(r=s+r);for(var c=t;c>=0&&c<r&&c<s;c++)a.push(this[c]);return this.spawn(a)},size:function(){return this.length},eq:function(t){return this[t]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return this.length===0},nonempty:function(){return!this.empty()},sort:function(t){if(!Di(t))return this;var r=this.toArray().sort(t);return this.spawn(r)},sortByZIndex:function(){return this.sort(JD)},zDepth:function(){var t=this[0];if(t){var r=t._private,a=r.group;if(a==="nodes"){var s=r.data.parent?t.parents().size():0;return t.isParent()?s:WC-1}else{var c=r.source,f=r.target,h=c.zDepth(),d=f.zDepth();return Math.max(h,d,0)}}}};bw.each=bw.forEach;var cfe=function(){var t="undefined",r=(typeof Symbol>"u"?"undefined":La(Symbol))!=t&&La(Symbol.iterator)!=t;r&&(bw[Symbol.iterator]=function(){var a=this,s={value:void 0,done:!1},c=0,f=this.length;return a8({next:function(){return c<f?s.value=a[c++]:(s.value=void 0,s.done=!0),s}},Symbol.iterator,function(){return this})})};cfe();var lfe=yo({nodeDimensionsIncludeLabels:!1}),vw={layoutDimensions:function(t){t=lfe(t);var r;if(!this.takesUpSpace())r={w:0,h:0};else if(t.nodeDimensionsIncludeLabels){var a=this.boundingBox();r={w:a.w,h:a.h}}else r={w:this.outerWidth(),h:this.outerHeight()};return(r.w===0||r.h===0)&&(r.w=r.h=1),r},layoutPositions:function(t,r,a){var s=this.nodes().filter(function(D){return!D.isParent()}),c=this.cy(),f=r.eles,h=function(D){return D.id()},d=yg(a,h);t.emit({type:"layoutstart",layout:t}),t.animations=[];var p=function(D,R,Y){var G={x:R.x1+R.w/2,y:R.y1+R.h/2},U={x:(Y.x-G.x)*D,y:(Y.y-G.y)*D};return{x:G.x+U.x,y:G.y+U.y}},b=r.spacingFactor&&r.spacingFactor!==1,m=function(){if(!b)return null;for(var D=Qo(),R=0;R<s.length;R++){var Y=s[R],G=d(Y,R);$8(D,G.x,G.y)}return D},w=m(),k=yg(function(D,R){var Y=d(D,R);if(b){var G=Math.abs(r.spacingFactor);Y=p(G,w,Y)}return r.transform!=null&&(Y=r.transform(D,Y)),Y},h);if(r.animate){for(var P=0;P<s.length;P++){var S=s[P],M=k(S,P),L=r.animateFilter==null||r.animateFilter(S,P);if(L){var T=S.animation({position:M,duration:r.animationDuration,easing:r.animationEasing});t.animations.push(T)}else S.position(M)}if(r.fit){var j=c.animation({fit:{boundingBox:f.boundingBoxAt(k),padding:r.padding},duration:r.animationDuration,easing:r.animationEasing});t.animations.push(j)}else if(r.zoom!==void 0&&r.pan!==void 0){var I=c.animation({zoom:r.zoom,pan:r.pan,duration:r.animationDuration,easing:r.animationEasing});t.animations.push(I)}t.animations.forEach(function(D){return D.play()}),t.one("layoutready",r.ready),t.emit({type:"layoutready",layout:t}),Sg.all(t.animations.map(function(D){return D.promise()})).then(function(){t.one("layoutstop",r.stop),t.emit({type:"layoutstop",layout:t})})}else s.positions(k),r.fit&&c.fit(r.eles,r.padding),r.zoom!=null&&c.zoom(r.zoom),r.pan&&c.pan(r.pan),t.one("layoutready",r.ready),t.emit({type:"layoutready",layout:t}),t.one("layoutstop",r.stop),t.emit({type:"layoutstop",layout:t});return this},layout:function(t){var r=this.cy();return r.makeLayout(fn({},t,{eles:this}))}};vw.createLayout=vw.makeLayout=vw.layout;function XD(t,r,a){var s=a._private,c=s.styleCache=s.styleCache||[],f;return(f=c[t])!=null||(f=c[t]=r(a)),f}function yw(t,r){return t=Dd(t),function(a){return XD(t,r,a)}}function mw(t,r){t=Dd(t);var a=function(s){return r.call(s)};return function(){var s=this[0];if(s)return XD(t,a,s)}}var mo={recalculateRenderedStyle:function(t){var r=this.cy(),a=r.renderer(),s=r.styleEnabled();return a&&s&&a.recalculateRenderedStyle(this,t),this},dirtyStyleCache:function(){var t=this.cy(),r=function(s){return s._private.styleCache=null};if(t.hasCompoundNodes()){var a;a=this.spawnSelf().merge(this.descendants()).merge(this.parents()),a.merge(a.connectedEdges()),a.forEach(r)}else this.forEach(function(s){r(s),s.connectedEdges().forEach(r)});return this},updateStyle:function(t){var r=this._private.cy;if(!r.styleEnabled())return this;if(r.batching()){var a=r._private.batchStyleEles;return a.merge(this),this}var s=r.hasCompoundNodes(),c=this;t=!!(t||t===void 0),s&&(c=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var f=c;return t?f.emitAndNotify("style"):f.emit("style"),c.forEach(function(h){return h._private.styleDirty=!0}),this},cleanStyle:function(){var t=this.cy();if(t.styleEnabled())for(var r=0;r<this.length;r++){var a=this[r];a._private.styleDirty&&(a._private.styleDirty=!1,t.style().apply(a))}},parsedStyle:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],s=a.cy();if(s.styleEnabled()&&a){a._private.styleDirty&&(a._private.styleDirty=!1,s.style().apply(a));var c=a._private.style[t];return c??(r?s.style().getDefaultProperty(t):null)}},numericStyle:function(t){var r=this[0];if(r.cy().styleEnabled()&&r){var a=r.pstyle(t);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(t){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(t).units},renderedStyle:function(t){var r=this.cy();if(!r.styleEnabled())return this;var a=this[0];if(a)return r.style().getRenderedStyle(a,t)},style:function(t,r){var a=this.cy();if(!a.styleEnabled())return this;var s=!1,c=a.style();if(gr(t)){var f=t;c.applyBypass(this,f,s),this.emitAndNotify("style")}else if(nn(t))if(r===void 0){var h=this[0];return h?c.getStylePropertyValue(h,t):void 0}else c.applyBypass(this,t,r,s),this.emitAndNotify("style");else if(t===void 0){var d=this[0];return d?c.getRawStyle(d):void 0}return this},removeStyle:function(t){var r=this.cy();if(!r.styleEnabled())return this;var a=!1,s=r.style(),c=this;if(t===void 0)for(var f=0;f<c.length;f++){var h=c[f];s.removeAllBypasses(h,a)}else{t=t.split(/\s+/);for(var d=0;d<c.length;d++){var p=c[d];s.removeBypasses(p,t,a)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var t=this.cy();if(!t.styleEnabled())return 1;var r=t.hasCompoundNodes(),a=this[0];if(a){var s=a._private,c=a.pstyle("opacity").value;if(!r)return c;var f=s.data.parent?a.parents():null;if(f)for(var h=0;h<f.length;h++){var d=f[h],p=d.pstyle("opacity").value;c=p*c}return c}},transparent:function(){var t=this.cy();if(!t.styleEnabled())return!1;var r=this[0],a=r.cy().hasCompoundNodes();if(r)return a?r.effectiveOpacity()===0:r.pstyle("opacity").value===0},backgrounding:function(){var t=this.cy();if(!t.styleEnabled())return!1;var r=this[0];return!!r._private.backgrounding}};function _P(t,r){var a=t._private,s=a.data.parent?t.parents():null;if(s)for(var c=0;c<s.length;c++){var f=s[c];if(!r(f))return!1}return!0}function EP(t){var r=t.ok,a=t.edgeOkViaNode||t.ok,s=t.parentOk||t.ok;return function(){var c=this.cy();if(!c.styleEnabled())return!0;var f=this[0],h=c.hasCompoundNodes();if(f){var d=f._private;if(!r(f))return!1;if(f.isNode())return!h||_P(f,s);var p=d.source,b=d.target;return a(p)&&(!h||_P(p,a))&&(p===b||a(b)&&(!h||_P(b,a)))}}}var Ag=yw("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0)});mo.takesUpSpace=mw("takesUpSpace",EP({ok:Ag}));var ffe=yw("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&Ag(t)}),hfe=yw("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&Ag(t)});mo.interactive=mw("interactive",EP({ok:ffe,parentOk:hfe,edgeOkViaNode:Ag})),mo.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var dfe=yw("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&Ag(t)}),pfe=Ag;mo.visible=mw("visible",EP({ok:dfe,edgeOkViaNode:pfe})),mo.hidden=function(){var t=this[0];if(t)return!t.visible()},mo.isBundledBezier=mw("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1}),mo.bypass=mo.css=mo.style,mo.renderedCss=mo.renderedStyle,mo.removeBypass=mo.removeCss=mo.removeStyle,mo.pstyle=mo.parsedStyle;var xh={};function eB(t){return function(){var r=arguments,a=[];if(r.length===2){var s=r[0],c=r[1];this.on(t.event,s,c)}else if(r.length===1&&Di(r[0])){var f=r[0];this.on(t.event,f)}else if(r.length===0||r.length===1&&ei(r[0])){for(var h=r.length===1?r[0]:null,d=0;d<this.length;d++){var p=this[d],b=!t.ableField||p._private[t.ableField],m=p._private[t.field]!=t.value;if(t.overrideAble){var w=t.overrideAble(p);if(w!==void 0&&(b=w,!w))return this}b&&(p._private[t.field]=t.value,m&&a.push(p))}var k=this.spawn(a);k.updateStyle(),k.emit(t.event),h&&k.emit(h)}return this}}function Ig(t){xh[t.field]=function(){var r=this[0];if(r){if(t.overrideField){var a=t.overrideField(r);if(a!==void 0)return a}return r._private[t.field]}},xh[t.on]=eB({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),xh[t.off]=eB({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}Ig({field:"locked",overrideField:function(t){return t.cy().autolock()?!0:void 0},on:"lock",off:"unlock"}),Ig({field:"grabbable",overrideField:function(t){return t.cy().autoungrabify()||t.pannable()?!1:void 0},on:"grabify",off:"ungrabify"}),Ig({field:"selected",ableField:"selectable",overrideAble:function(t){return t.cy().autounselectify()?!1:void 0},on:"select",off:"unselect"}),Ig({field:"selectable",overrideField:function(t){return t.cy().autounselectify()?!1:void 0},on:"selectify",off:"unselectify"}),xh.deselect=xh.unselect,xh.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},Ig({field:"active",on:"activate",off:"unactivate"}),Ig({field:"pannable",on:"panify",off:"unpanify"}),xh.inactive=function(){var t=this[0];if(t)return!t._private.active};var Lo={},tB=function(t){return function(r){for(var a=this,s=[],c=0;c<a.length;c++){var f=a[c];if(f.isNode()){for(var h=!1,d=f.connectedEdges(),p=0;p<d.length;p++){var b=d[p],m=b.source(),w=b.target();if(t.noIncomingEdges&&w===f&&m!==f||t.noOutgoingEdges&&m===f&&w!==f){h=!0;break}}h||s.push(f)}}return this.spawn(s,!0).filter(r)}},nB=function(t){return function(r){for(var a=this,s=[],c=0;c<a.length;c++){var f=a[c];if(f.isNode())for(var h=f.connectedEdges(),d=0;d<h.length;d++){var p=h[d],b=p.source(),m=p.target();t.outgoing&&b===f?(s.push(p),s.push(m)):t.incoming&&m===f&&(s.push(p),s.push(b))}}return this.spawn(s,!0).filter(r)}},rB=function(t){return function(r){for(var a=this,s=[],c={};;){var f=t.outgoing?a.outgoers():a.incomers();if(f.length===0)break;for(var h=!1,d=0;d<f.length;d++){var p=f[d],b=p.id();c[b]||(c[b]=!0,s.push(p),h=!0)}if(!h)break;a=f}return this.spawn(s,!0).filter(r)}};Lo.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},fn(Lo,{roots:tB({noIncomingEdges:!0}),leaves:tB({noOutgoingEdges:!0}),outgoers:ku(nB({outgoing:!0}),"outgoers"),successors:rB({outgoing:!0}),incomers:ku(nB({incoming:!0}),"incomers"),predecessors:rB({})}),fn(Lo,{neighborhood:ku(function(t){for(var r=[],a=this.nodes(),s=0;s<a.length;s++)for(var c=a[s],f=c.connectedEdges(),h=0;h<f.length;h++){var d=f[h],p=d.source(),b=d.target(),m=c===p?b:p;m.length>0&&r.push(m[0]),r.push(d[0])}return this.spawn(r,!0).filter(t)},"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}}),Lo.neighbourhood=Lo.neighborhood,Lo.closedNeighbourhood=Lo.closedNeighborhood,Lo.openNeighbourhood=Lo.openNeighborhood,fn(Lo,{source:ku(function(t){var r=this[0],a;return r&&(a=r._private.source||r.cy().collection()),a&&t?a.filter(t):a},"source"),target:ku(function(t){var r=this[0],a;return r&&(a=r._private.target||r.cy().collection()),a&&t?a.filter(t):a},"target"),sources:iB({attr:"source"}),targets:iB({attr:"target"})});function iB(t){return function(r){for(var a=[],s=0;s<this.length;s++){var c=this[s],f=c._private[t.attr];f&&a.push(f)}return this.spawn(a,!0).filter(r)}}fn(Lo,{edgesWith:ku(aB(),"edgesWith"),edgesTo:ku(aB({thisIsSrc:!0}),"edgesTo")});function aB(t){return function(r){var a=[],s=this._private.cy,c=t||{};nn(r)&&(r=s.$(r));for(var f=0;f<r.length;f++)for(var h=r[f]._private.edges,d=0;d<h.length;d++){var p=h[d],b=p._private.data,m=this.hasElementWithId(b.source)&&r.hasElementWithId(b.target),w=r.hasElementWithId(b.source)&&this.hasElementWithId(b.target),k=m||w;k&&((c.thisIsSrc||c.thisIsTgt)&&(c.thisIsSrc&&!m||c.thisIsTgt&&!w)||a.push(p))}return this.spawn(a,!0)}}fn(Lo,{connectedEdges:ku(function(t){for(var r=[],a=this,s=0;s<a.length;s++){var c=a[s];if(c.isNode())for(var f=c._private.edges,h=0;h<f.length;h++){var d=f[h];r.push(d)}}return this.spawn(r,!0).filter(t)},"connectedEdges"),connectedNodes:ku(function(t){for(var r=[],a=this,s=0;s<a.length;s++){var c=a[s];c.isEdge()&&(r.push(c.source()[0]),r.push(c.target()[0]))}return this.spawn(r,!0).filter(t)},"connectedNodes"),parallelEdges:ku(oB(),"parallelEdges"),codirectedEdges:ku(oB({codirected:!0}),"codirectedEdges")});function oB(t){var r={codirected:!1};return t=fn({},r,t),function(a){for(var s=[],c=this.edges(),f=t,h=0;h<c.length;h++)for(var d=c[h],p=d._private,b=p.source,m=b._private.data.id,w=p.data.target,k=b._private.edges,P=0;P<k.length;P++){var S=k[P],M=S._private.data,L=M.target,T=M.source,j=L===w&&T===m,I=m===L&&w===T;(f.codirected&&j||!f.codirected&&(j||I))&&s.push(S)}return this.spawn(s,!0).filter(a)}}fn(Lo,{components:function(t){var r=this,a=r.cy(),s=a.collection(),c=t==null?r.nodes():t.nodes(),f=[];t!=null&&c.empty()&&(c=t.sources());var h=function(p,b){s.merge(p),c.unmerge(p),b.merge(p)};if(c.empty())return r.spawn();var d=function(){var p=a.collection();f.push(p);var b=c[0];h(b,p),r.bfs({directed:!1,roots:b,visit:function(m){return h(m,p)}}),p.forEach(function(m){m.connectedEdges().forEach(function(w){r.has(w)&&p.has(w.source())&&p.has(w.target())&&p.merge(w)})})};do d();while(c.length>0);return f},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}}),Lo.componentsOf=Lo.components;var wo=function(t,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0){_i("A collection must have a reference to the core");return}var c=new tf,f=!1;if(!r)r=[];else if(r.length>0&&gr(r[0])&&!Jv(r[0])){f=!0;for(var h=[],d=new wg,p=0,b=r.length;p<b;p++){var m=r[p];m.data==null&&(m.data={});var w=m.data;if(w.id==null)w.id=z8();else if(t.hasElementWithId(w.id)||d.has(w.id))continue;var k=new $m(t,m,!1);h.push(k),d.add(w.id)}r=h}this.length=0;for(var P=0,S=r.length;P<S;P++){var M=r[P][0];if(M!=null){var L=M._private.data.id;(!a||!c.has(L))&&(a&&c.set(L,{index:this.length,ele:M}),this[this.length]=M,this.length++)}}this._private={eles:this,cy:t,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(T){this.lazyMap=T},rebuildMap:function(){for(var T=this.lazyMap=new tf,j=this.eles,I=0;I<j.length;I++){var D=j[I];T.set(D.id(),{index:I,ele:D})}}},a&&(this._private.map=c),f&&!s&&this.restore()},oi=$m.prototype=wo.prototype=Object.create(Array.prototype);oi.instanceString=function(){return"collection"},oi.spawn=function(t,r){return new wo(this.cy(),t,r)},oi.spawnSelf=function(){return this.spawn(this)},oi.cy=function(){return this._private.cy},oi.renderer=function(){return this._private.cy.renderer()},oi.element=function(){return this[0]},oi.collection=function(){return c8(this)?this:new wo(this._private.cy,[this])},oi.unique=function(){return new wo(this._private.cy,this,!0)},oi.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)},oi.getElementById=function(t){t=""+t;var r=this._private.cy,a=this._private.map.get(t);return a?a.ele:new wo(r)},oi.$id=oi.getElementById,oi.poolIndex=function(){var t=this._private.cy,r=t._private.elements,a=this[0]._private.data.id;return r._private.map.get(a).index},oi.indexOf=function(t){var r=t[0]._private.data.id;return this._private.map.get(r).index},oi.indexOfId=function(t){return t=""+t,this._private.map.get(t).index},oi.json=function(t){var r=this.element(),a=this.cy();if(r==null&&t)return this;if(r!=null){var s=r._private;if(gr(t)){if(a.startBatch(),t.data){r.data(t.data);var c=s.data;if(r.isEdge()){var f=!1,h={},d=t.data.source,p=t.data.target;d!=null&&d!=c.source&&(h.source=""+d,f=!0),p!=null&&p!=c.target&&(h.target=""+p,f=!0),f&&(r=r.move(h))}else{var b="parent"in t.data,m=t.data.parent;b&&(m!=null||c.parent!=null)&&m!=c.parent&&(m===void 0&&(m=null),m!=null&&(m=""+m),r=r.move({parent:m}))}}t.position&&r.position(t.position);var w=function(S,M,L){var T=t[S];T!=null&&T!==s[S]&&(T?r[M]():r[L]())};return w("removed","remove","restore"),w("selected","select","unselect"),w("selectable","selectify","unselectify"),w("locked","lock","unlock"),w("grabbable","grabify","ungrabify"),w("pannable","panify","unpanify"),t.classes!=null&&r.classes(t.classes),a.endBatch(),this}else if(t===void 0){var k={data:Zc(s.data),position:Zc(s.position),group:s.group,removed:s.removed,selected:s.selected,selectable:s.selectable,locked:s.locked,grabbable:s.grabbable,pannable:s.pannable,classes:null};k.classes="";var P=0;return s.classes.forEach(function(S){return k.classes+=P++===0?S:" "+S}),k}}},oi.jsons=function(){for(var t=[],r=0;r<this.length;r++){var a=this[r],s=a.json();t.push(s)}return t},oi.clone=function(){for(var t=this.cy(),r=[],a=0;a<this.length;a++){var s=this[a],c=s.json(),f=new $m(t,c,!1);r.push(f)}return new wo(t,r)},oi.copy=oi.clone,oi.restore=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=this,s=a.cy(),c=s._private,f=[],h=[],d,p=0,b=a.length;p<b;p++){var m=a[p];r&&!m.removed()||(m.isNode()?f.push(m):h.push(m))}d=f.concat(h);var w,k=function(){d.splice(w,1),w--};for(w=0;w<d.length;w++){var P=d[w],S=P._private,M=S.data;if(P.clearTraversalCache(),!(!r&&!S.removed)){if(M.id===void 0)M.id=z8();else if(jt(M.id))M.id=""+M.id;else if(sh(M.id)||!nn(M.id)){_i("Can not create element with invalid string ID `"+M.id+"`"),k();continue}else if(s.hasElementWithId(M.id)){_i("Can not create second element with ID `"+M.id+"`"),k();continue}}var L=M.id;if(P.isNode()){var T=S.position;T.x==null&&(T.x=0),T.y==null&&(T.y=0)}if(P.isEdge()){for(var j=P,I=["source","target"],D=I.length,R=!1,Y=0;Y<D;Y++){var G=I[Y],U=M[G];jt(U)&&(U=M[G]=""+M[G]),U==null||U===""?(_i("Can not create edge `"+L+"` with unspecified "+G),R=!0):s.hasElementWithId(U)||(_i("Can not create edge `"+L+"` with nonexistant "+G+" `"+U+"`"),R=!0)}if(R){k();continue}var z=s.getElementById(M.source),Q=s.getElementById(M.target);z.same(Q)?z._private.edges.push(j):(z._private.edges.push(j),Q._private.edges.push(j)),j._private.source=z,j._private.target=Q}S.map=new tf,S.map.set(L,{ele:P,index:0}),S.removed=!1,r&&s.addToPool(P)}for(var $=0;$<f.length;$++){var Z=f[$],X=Z._private.data;jt(X.parent)&&(X.parent=""+X.parent);var K=X.parent,ae=K!=null;if(ae||Z._private.parent){var se=Z._private.parent?s.collection().merge(Z._private.parent):s.getElementById(K);if(se.empty())X.parent=void 0;else if(se[0].removed())jr("Node added with missing parent, reference to parent removed"),X.parent=void 0,Z._private.parent=null;else{for(var le=!1,he=se;!he.empty();){if(Z.same(he)){le=!0,X.parent=void 0;break}he=he.parent()}le||(se[0]._private.children.push(Z),Z._private.parent=se[0],c.hasCompoundNodes=!0)}}}if(d.length>0){for(var fe=d.length===a.length?a:new wo(s,d),pe=0;pe<fe.length;pe++){var me=fe[pe];me.isNode()||(me.parallelEdges().clearTraversalCache(),me.source().clearTraversalCache(),me.target().clearTraversalCache())}var Te;c.hasCompoundNodes?Te=s.collection().merge(fe).merge(fe.connectedNodes()).merge(fe.parent()):Te=fe,Te.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?fe.emitAndNotify("add"):r&&fe.emit("add")}return a},oi.removed=function(){var t=this[0];return t&&t._private.removed},oi.inside=function(){var t=this[0];return t&&!t._private.removed},oi.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=this,s=[],c={},f=a._private.cy;function h(K){for(var ae=K._private.edges,se=0;se<ae.length;se++)p(ae[se])}function d(K){for(var ae=K._private.children,se=0;se<ae.length;se++)p(ae[se])}function p(K){var ae=c[K.id()];r&&K.removed()||ae||(c[K.id()]=!0,K.isNode()?(s.push(K),h(K),d(K)):s.unshift(K))}for(var b=0,m=a.length;b<m;b++){var w=a[b];p(w)}function k(K,ae){var se=K._private.edges;lh(se,ae),K.clearTraversalCache()}function P(K){K.clearTraversalCache()}var S=[];S.ids={};function M(K,ae){ae=ae[0],K=K[0];var se=K._private.children,le=K.id();lh(se,ae),ae._private.parent=null,S.ids[le]||(S.ids[le]=!0,S.push(K))}a.dirtyCompoundBoundsCache(),r&&f.removeFromPool(s);for(var L=0;L<s.length;L++){var T=s[L];if(T.isEdge()){var j=T.source()[0],I=T.target()[0];k(j,T),k(I,T);for(var D=T.parallelEdges(),R=0;R<D.length;R++){var Y=D[R];P(Y),Y.isBundledBezier()&&Y.dirtyBoundingBoxCache()}}else{var G=T.parent();G.length!==0&&M(G,T)}r&&(T._private.removed=!0)}var U=f._private.elements;f._private.hasCompoundNodes=!1;for(var z=0;z<U.length;z++){var Q=U[z];if(Q.isParent()){f._private.hasCompoundNodes=!0;break}}var $=new wo(this.cy(),s);$.size()>0&&(t?$.emitAndNotify("remove"):r&&$.emit("remove"));for(var Z=0;Z<S.length;Z++){var X=S[Z];(!r||!X.removed())&&X.updateStyle()}return $},oi.move=function(t){var r=this._private.cy,a=this,s=!1,c=!1,f=function(P){return P==null?P:""+P};if(t.source!==void 0||t.target!==void 0){var h=f(t.source),d=f(t.target),p=h!=null&&r.hasElementWithId(h),b=d!=null&&r.hasElementWithId(d);(p||b)&&(r.batch(function(){a.remove(s,c),a.emitAndNotify("moveout");for(var P=0;P<a.length;P++){var S=a[P],M=S._private.data;S.isEdge()&&(p&&(M.source=h),b&&(M.target=d))}a.restore(s,c)}),a.emitAndNotify("move"))}else if(t.parent!==void 0){var m=f(t.parent),w=m===null||r.hasElementWithId(m);if(w){var k=m===null?void 0:m;r.batch(function(){var P=a.remove(s,c);P.emitAndNotify("moveout");for(var S=0;S<a.length;S++){var M=a[S],L=M._private.data;M.isNode()&&(L.parent=k)}P.restore(s,c)}),a.emitAndNotify("move")}}return this},[vO,Cle,lw,vh,Tg,zle,fw,rfe,QD,WD,ufe,bw,vw,mo,xh,Lo].forEach(function(t){fn(oi,t)});var gfe={add:function(t){var r,a=this;if(nu(t)){var s=t;if(s._private.cy===a)r=s.restore();else{for(var c=[],f=0;f<s.length;f++){var h=s[f];c.push(h.json())}r=new wo(a,c)}}else if(ei(t)){var d=t;r=new wo(a,d)}else if(gr(t)&&(ei(t.nodes)||ei(t.edges))){for(var p=t,b=[],m=["nodes","edges"],w=0,k=m.length;w<k;w++){var P=m[w],S=p[P];if(ei(S))for(var M=0,L=S.length;M<L;M++){var T=fn({group:P},S[M]);b.push(T)}}r=new wo(a,b)}else{var j=t;r=new $m(a,j).collection()}return r},remove:function(t){if(!nu(t)&&nn(t)){var r=t;t=this.$(r)}return t.remove()}};/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */function bfe(t,r,a,s){var c=4,f=.001,h=1e-7,d=10,p=11,b=1/(p-1),m=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var w=0;w<4;++w)if(typeof arguments[w]!="number"||isNaN(arguments[w])||!isFinite(arguments[w]))return!1;t=Math.min(t,1),a=Math.min(a,1),t=Math.max(t,0),a=Math.max(a,0);var k=m?new Float32Array(p):new Array(p);function P(Q,$){return 1-3*$+3*Q}function S(Q,$){return 3*$-6*Q}function M(Q){return 3*Q}function L(Q,$,Z){return((P($,Z)*Q+S($,Z))*Q+M($))*Q}function T(Q,$,Z){return 3*P($,Z)*Q*Q+2*S($,Z)*Q+M($)}function j(Q,$){for(var Z=0;Z<c;++Z){var X=T($,t,a);if(X===0)return $;var K=L($,t,a)-Q;$-=K/X}return $}function I(){for(var Q=0;Q<p;++Q)k[Q]=L(Q*b,t,a)}function D(Q,$,Z){var X,K,ae=0;do K=$+(Z-$)/2,X=L(K,t,a)-Q,X>0?Z=K:$=K;while(Math.abs(X)>h&&++ae<d);return K}function R(Q){for(var $=0,Z=1,X=p-1;Z!==X&&k[Z]<=Q;++Z)$+=b;--Z;var K=(Q-k[Z])/(k[Z+1]-k[Z]),ae=$+K*b,se=T(ae,t,a);return se>=f?j(Q,ae):se===0?ae:D(Q,$,$+b)}var Y=!1;function G(){Y=!0,(t!==r||a!==s)&&I()}var U=function(Q){return Y||G(),t===r&&a===s?Q:Q===0?0:Q===1?1:L(R(Q),r,s)};U.getControlPoints=function(){return[{x:t,y:r},{x:a,y:s}]};var z="generateBezier("+[t,r,a,s]+")";return U.toString=function(){return z},U}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var vfe=function(){function t(s){return-s.tension*s.x-s.friction*s.v}function r(s,c,f){var h={x:s.x+f.dx*c,v:s.v+f.dv*c,tension:s.tension,friction:s.friction};return{dx:h.v,dv:t(h)}}function a(s,c){var f={dx:s.v,dv:t(s)},h=r(s,c*.5,f),d=r(s,c*.5,h),p=r(s,c,d),b=1/6*(f.dx+2*(h.dx+d.dx)+p.dx),m=1/6*(f.dv+2*(h.dv+d.dv)+p.dv);return s.x=s.x+b*c,s.v=s.v+m*c,s}return function s(c,f,h){var d={x:-1,v:0,tension:null,friction:null},p=[0],b=0,m=1/1e4,w=16/1e3,k,P,S;for(c=parseFloat(c)||500,f=parseFloat(f)||20,h=h||null,d.tension=c,d.friction=f,k=h!==null,k?(b=s(c,f),P=b/h*w):P=w;S=a(S||d,P),p.push(1+S.x),b+=16,Math.abs(S.x)>m&&Math.abs(S.v)>m;);return k?function(M){return p[M*(p.length-1)|0]}:b}}(),si=function(t,r,a,s){var c=bfe(t,r,a,s);return function(f,h,d){return f+(h-f)*c(d)}},ww={linear:function(t,r,a){return t+(r-t)*a},ease:si(.25,.1,.25,1),"ease-in":si(.42,0,1,1),"ease-out":si(0,0,.58,1),"ease-in-out":si(.42,0,.58,1),"ease-in-sine":si(.47,0,.745,.715),"ease-out-sine":si(.39,.575,.565,1),"ease-in-out-sine":si(.445,.05,.55,.95),"ease-in-quad":si(.55,.085,.68,.53),"ease-out-quad":si(.25,.46,.45,.94),"ease-in-out-quad":si(.455,.03,.515,.955),"ease-in-cubic":si(.55,.055,.675,.19),"ease-out-cubic":si(.215,.61,.355,1),"ease-in-out-cubic":si(.645,.045,.355,1),"ease-in-quart":si(.895,.03,.685,.22),"ease-out-quart":si(.165,.84,.44,1),"ease-in-out-quart":si(.77,0,.175,1),"ease-in-quint":si(.755,.05,.855,.06),"ease-out-quint":si(.23,1,.32,1),"ease-in-out-quint":si(.86,0,.07,1),"ease-in-expo":si(.95,.05,.795,.035),"ease-out-expo":si(.19,1,.22,1),"ease-in-out-expo":si(1,0,0,1),"ease-in-circ":si(.6,.04,.98,.335),"ease-out-circ":si(.075,.82,.165,1),"ease-in-out-circ":si(.785,.135,.15,.86),spring:function(t,r,a){if(a===0)return ww.linear;var s=vfe(t,r,a);return function(c,f,h){return c+(f-c)*s(h)}},"cubic-bezier":si};function sB(t,r,a,s,c){if(s===1||r===a)return a;var f=c(r,a,s);return t==null||((t.roundValue||t.color)&&(f=Math.round(f)),t.min!==void 0&&(f=Math.max(f,t.min)),t.max!==void 0&&(f=Math.min(f,t.max))),f}function uB(t,r){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(r==null||r.type.units!=="%")?t.pfValue:t.value:t}function Lg(t,r,a,s,c){var f=c!=null?c.type:null;a<0?a=0:a>1&&(a=1);var h=uB(t,c),d=uB(r,c);if(jt(h)&&jt(d))return sB(f,h,d,a,s);if(ei(h)&&ei(d)){for(var p=[],b=0;b<d.length;b++){var m=h[b],w=d[b];if(m!=null&&w!=null){var k=sB(f,m,w,a,s);p.push(k)}else p.push(w)}return p}}function yfe(t,r,a,s){var c=!s,f=t._private,h=r._private,d=h.easing,p=h.startTime,b=s?t:t.cy(),m=b.style();if(!h.easingImpl)if(d==null)h.easingImpl=ww.linear;else{var w;if(nn(d)){var k=m.parse("transition-timing-function",d);w=k.value}else w=d;var P,S;nn(w)?(P=w,S=[]):(P=w[1],S=w.slice(2).map(function(fe){return+fe})),S.length>0?(P==="spring"&&S.push(h.duration),h.easingImpl=ww[P].apply(null,S)):h.easingImpl=ww[P]}var M=h.easingImpl,L;if(h.duration===0?L=1:L=(a-p)/h.duration,h.applying&&(L=h.progress),L<0?L=0:L>1&&(L=1),h.delay==null){var T=h.startPosition,j=h.position;if(j&&c&&!t.locked()){var I={};v0(T.x,j.x)&&(I.x=Lg(T.x,j.x,L,M)),v0(T.y,j.y)&&(I.y=Lg(T.y,j.y,L,M)),t.position(I)}var D=h.startPan,R=h.pan,Y=f.pan,G=R!=null&&s;G&&(v0(D.x,R.x)&&(Y.x=Lg(D.x,R.x,L,M)),v0(D.y,R.y)&&(Y.y=Lg(D.y,R.y,L,M)),t.emit("pan"));var U=h.startZoom,z=h.zoom,Q=z!=null&&s;Q&&(v0(U,z)&&(f.zoom=s0(f.minZoom,Lg(U,z,L,M),f.maxZoom)),t.emit("zoom")),(G||Q)&&t.emit("viewport");var $=h.style;if($&&$.length>0&&c){for(var Z=0;Z<$.length;Z++){var X=$[Z],K=X.name,ae=X,se=h.startStyle[K],le=m.properties[se.name],he=Lg(se,ae,L,M,le);m.overrideBypass(t,K,he)}t.emit("style")}}return h.progress=L,L}function v0(t,r){return t==null||r==null?!1:jt(t)&&jt(r)?!0:!!(t&&r)}function mfe(t,r,a,s){var c=r._private;c.started=!0,c.startTime=a-c.progress*c.duration}function cB(t,r){var a=r._private.aniEles,s=[];function c(m,w){var k=m._private,P=k.animation.current,S=k.animation.queue,M=!1;if(P.length===0){var L=S.shift();L&&P.push(L)}for(var T=function(R){for(var Y=R.length-1;Y>=0;Y--){var G=R[Y];G()}R.splice(0,R.length)},j=P.length-1;j>=0;j--){var I=P[j],D=I._private;if(D.stopped){P.splice(j,1),D.hooked=!1,D.playing=!1,D.started=!1,T(D.frames);continue}!D.playing&&!D.applying||(D.playing&&D.applying&&(D.applying=!1),D.started||mfe(m,I,t),yfe(m,I,t,w),D.applying&&(D.applying=!1),T(D.frames),D.step!=null&&D.step(t),I.completed()&&(P.splice(j,1),D.hooked=!1,D.playing=!1,D.started=!1,T(D.completes)),M=!0)}return!w&&P.length===0&&S.length===0&&s.push(m),M}for(var f=!1,h=0;h<a.length;h++){var d=a[h],p=c(d);f=f||p}var b=c(r,!0);(f||b)&&(a.length>0?r.notify("draw",a):r.notify("draw")),a.unmerge(s),r.emit("step")}var wfe={animate:Ar.animate(),animation:Ar.animation(),animated:Ar.animated(),clearQueue:Ar.clearQueue(),delay:Ar.delay(),delayAnimation:Ar.delayAnimation(),stop:Ar.stop(),addToAnimationPool:function(t){var r=this;r.styleEnabled()&&r._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,!t.styleEnabled())return;function r(){t._private.animationsRunning&&Vm(function(s){cB(s,t),r()})}var a=t.renderer();a&&a.beforeRender?a.beforeRender(function(s,c){cB(c,t)},a.beforeRenderPriorities.animations):r()}},xfe={qualifierCompare:function(t,r){return t==null||r==null?t==null&&r==null:t.sameText(r)},eventMatches:function(t,r,a){var s=r.qualifier;return s!=null?t!==a.target&&Jv(a.target)&&s.matches(a.target):!0},addEventFields:function(t,r){r.cy=t,r.target=t},callbackContext:function(t,r,a){return r.qualifier!=null?a.target:t}},xw=function(t){return nn(t)?new gh(t):t},lB={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new pw(xfe,this)),this},emitter:function(){return this._private.emitter},on:function(t,r,a){return this.emitter().on(t,xw(r),a),this},removeListener:function(t,r,a){return this.emitter().removeListener(t,xw(r),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,r,a){return this.emitter().one(t,xw(r),a),this},once:function(t,r,a){return this.emitter().one(t,xw(r),a),this},emit:function(t,r){return this.emitter().emit(t,r),this},emitAndNotify:function(t,r){return this.emit(t),this.notify(t,r),this}};Ar.eventAliasesOn(lB);var CP={png:function(t){var r=this._private.renderer;return t=t||{},r.png(t)},jpg:function(t){var r=this._private.renderer;return t=t||{},t.bg=t.bg||"#fff",r.jpg(t)}};CP.jpeg=CP.jpg;var kw={layout:function(t){var r=this;if(t==null){_i("Layout options must be specified to make a layout");return}if(t.name==null){_i("A `name` must be specified to make a layout");return}var a=t.name,s=r.extension("layout",a);if(s==null){_i("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var c;nn(t.eles)?c=r.$(t.eles):c=t.eles!=null?t.eles:r.$();var f=new s(fn({},t,{cy:r,eles:c}));return f}};kw.createLayout=kw.makeLayout=kw.layout;var kfe={notify:function(t,r){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var s=a.batchNotifications[t]=a.batchNotifications[t]||this.collection();r!=null&&s.merge(r);return}if(a.notificationsEnabled){var c=this.renderer();this.destroyed()||!c||c.notify(t,r)}},notifications:function(t){var r=this._private;return t===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return t.batchCount==null&&(t.batchCount=0),t.batchCount===0&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(t.batchCount===0)return this;if(t.batchCount--,t.batchCount===0){t.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(t.batchNotifications).forEach(function(a){var s=t.batchNotifications[a];s.empty()?r.notify(a):r.notify(a,s)})}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var r=this;return this.batch(function(){for(var a=Object.keys(t),s=0;s<a.length;s++){var c=a[s],f=t[c],h=r.getElementById(c);h.data(f)}})}},_fe=yo({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),PP={renderTo:function(t,r,a,s){var c=this._private.renderer;return c.renderTo(t,r,a,s),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(t){var r=this,a=r.extension("renderer",t.name);if(a==null){_i("Can not initialise: No such renderer `".concat(t.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}t.wheelSensitivity!==void 0&&jr("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var s=_fe(t);s.cy=r,r._private.renderer=new a(s),this.notify("init")},destroyRenderer:function(){var t=this;t.notify("destroy");var r=t.container();if(r)for(r._cyreg=null;r.childNodes.length>0;)r.removeChild(r.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach(function(a){var s=a._private;s.rscratch={},s.rstyle={},s.animation.current=[],s.animation.queue=[]})},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};PP.invalidateDimensions=PP.resize;var _w={collection:function(t,r){return nn(t)?this.$(t):nu(t)?t.collection():ei(t)?(r||(r={}),new wo(this,t,r.unique,r.removed)):new wo(this)},nodes:function(t){var r=this.$(function(a){return a.isNode()});return t?r.filter(t):r},edges:function(t){var r=this.$(function(a){return a.isEdge()});return t?r.filter(t):r},$:function(t){var r=this._private.elements;return t?r.filter(t):r.spawnSelf()},mutableElements:function(){return this._private.elements}};_w.elements=_w.filter=_w.$;var eo={},y0="t",Efe="f";eo.apply=function(t){for(var r=this,a=r._private,s=a.cy,c=s.collection(),f=0;f<t.length;f++){var h=t[f],d=r.getContextMeta(h);if(!d.empty){var p=r.getContextStyle(d),b=r.applyContextStyle(d,p,h);h._private.appliedInitStyle?r.updateTransitions(h,b.diffProps):h._private.appliedInitStyle=!0;var m=r.updateStyleHints(h);m&&c.push(h)}}return c},eo.getPropertiesDiff=function(t,r){var a=this,s=a._private.propDiffs=a._private.propDiffs||{},c=t+"-"+r,f=s[c];if(f)return f;for(var h=[],d={},p=0;p<a.length;p++){var b=a[p],m=t[p]===y0,w=r[p]===y0,k=m!==w,P=b.mappedProperties.length>0;if(k||w&&P){var S=void 0;k&&P||k?S=b.properties:P&&(S=b.mappedProperties);for(var M=0;M<S.length;M++){for(var L=S[M],T=L.name,j=!1,I=p+1;I<a.length;I++){var D=a[I],R=r[I]===y0;if(R&&(j=D.properties[L.name]!=null,j))break}!d[T]&&!j&&(d[T]=!0,h.push(T))}}}return s[c]=h,h},eo.getContextMeta=function(t){for(var r=this,a="",s,c=t._private.styleCxtKey||"",f=0;f<r.length;f++){var h=r[f],d=h.selector&&h.selector.matches(t);d?a+=y0:a+=Efe}return s=r.getPropertiesDiff(c,a),t._private.styleCxtKey=a,{key:a,diffPropNames:s,empty:s.length===0}},eo.getContextStyle=function(t){var r=t.key,a=this,s=this._private.contextStyles=this._private.contextStyles||{};if(s[r])return s[r];for(var c={_private:{key:r}},f=0;f<a.length;f++){var h=a[f],d=r[f]===y0;if(d)for(var p=0;p<h.properties.length;p++){var b=h.properties[p];c[b.name]=b}}return s[r]=c,c},eo.applyContextStyle=function(t,r,a){for(var s=this,c=t.diffPropNames,f={},h=s.types,d=0;d<c.length;d++){var p=c[d],b=r[p],m=a.pstyle(p);if(!b)if(m)m.bypass?b={name:p,deleteBypassed:!0}:b={name:p,delete:!0};else continue;if(m!==b){if(b.mapped===h.fn&&m!=null&&m.mapping!=null&&m.mapping.value===b.value){var w=m.mapping,k=w.fnValue=b.value(a);if(k===w.prevFnValue)continue}var P=f[p]={prev:m};s.applyParsedProperty(a,b),P.next=a.pstyle(p),P.next&&P.next.bypass&&(P.next=P.next.bypassed)}}return{diffProps:f}},eo.updateStyleHints=function(t){var r=t._private,a=this,s=a.propertyGroupNames,c=a.propertyGroupKeys,f=function(ke,Ge,Qe){return a.getPropertiesHash(ke,Ge,Qe)},h=r.styleKey;if(t.removed())return!1;var d=r.group==="nodes",p=t._private.style;s=Object.keys(p);for(var b=0;b<c.length;b++){var m=c[b];r.styleKeys[m]=[Od,mg]}for(var w=function(ke,Ge){return r.styleKeys[Ge][0]=r0(ke,r.styleKeys[Ge][0])},k=function(ke,Ge){return r.styleKeys[Ge][1]=i0(ke,r.styleKeys[Ge][1])},P=function(ke,Ge){w(ke,Ge),k(ke,Ge)},S=function(ke,Ge){for(var Qe=0;Qe<ke.length;Qe++){var nt=ke.charCodeAt(Qe);w(nt,Ge),k(nt,Ge)}},M=2e9,L=function(ke){return-128<ke&&ke<128&&Math.floor(ke)!==ke?M-(ke*1024|0):ke},T=0;T<s.length;T++){var j=s[T],I=p[j];if(I!=null){var D=this.properties[j],R=D.type,Y=D.groupKey,G=void 0;D.hashOverride!=null?G=D.hashOverride(t,I):I.pfValue!=null&&(G=I.pfValue);var U=D.enums==null?I.value:null,z=G!=null,Q=U!=null,$=z||Q,Z=I.units;if(R.number&&$&&!R.multiple){var X=z?G:U;P(L(X),Y),!z&&Z!=null&&S(Z,Y)}else S(I.strValue,Y)}}for(var K=[Od,mg],ae=0;ae<c.length;ae++){var se=c[ae],le=r.styleKeys[se];K[0]=r0(le[0],K[0]),K[1]=i0(le[1],K[1])}r.styleKey=Hse(K[0],K[1]);var he=r.styleKeys;r.labelDimsKey=ch(he.labelDimensions);var fe=f(t,["label"],he.labelDimensions);if(r.labelKey=ch(fe),r.labelStyleKey=ch(qm(he.commonLabel,fe)),!d){var pe=f(t,["source-label"],he.labelDimensions);r.sourceLabelKey=ch(pe),r.sourceLabelStyleKey=ch(qm(he.commonLabel,pe));var me=f(t,["target-label"],he.labelDimensions);r.targetLabelKey=ch(me),r.targetLabelStyleKey=ch(qm(he.commonLabel,me))}if(d){var Te=r.styleKeys,Le=Te.nodeBody,ge=Te.nodeBorder,xe=Te.nodeOutline,Se=Te.backgroundImage,Ie=Te.compound,Re=Te.pie,Ne=Te.stripe,Me=[Le,ge,xe,Se,Ie,Re,Ne].filter(function(ke){return ke!=null}).reduce(qm,[Od,mg]);r.nodeKey=ch(Me),r.hasPie=Re!=null&&Re[0]!==Od&&Re[1]!==mg,r.hasStripe=Ne!=null&&Ne[0]!==Od&&Ne[1]!==mg}return h!==r.styleKey},eo.clearStyleHints=function(t){var r=t._private;r.styleCxtKey="",r.styleKeys={},r.styleKey=null,r.labelKey=null,r.labelStyleKey=null,r.sourceLabelKey=null,r.sourceLabelStyleKey=null,r.targetLabelKey=null,r.targetLabelStyleKey=null,r.nodeKey=null,r.hasPie=null,r.hasStripe=null},eo.applyParsedProperty=function(t,r){var a=this,s=r,c=t._private.style,f,h=a.types,d=a.properties[s.name].type,p=s.bypass,b=c[s.name],m=b&&b.bypass,w=t._private,k="mapping",P=function(Te){return Te==null?null:Te.pfValue!=null?Te.pfValue:Te.value},S=function(){var Te=P(b),Le=P(s);a.checkTriggers(t,s.name,Te,Le)};if(r.name==="curve-style"&&t.isEdge()&&(r.value!=="bezier"&&t.isLoop()||r.value==="haystack"&&(t.source().isParent()||t.target().isParent()))&&(s=r=this.parse(r.name,"bezier",p)),s.delete)return c[s.name]=void 0,S(),!0;if(s.deleteBypassed)return b?b.bypass?(b.bypassed=void 0,S(),!0):!1:(S(),!0);if(s.deleteBypass)return b?b.bypass?(c[s.name]=b.bypassed,S(),!0):!1:(S(),!0);var M=function(){jr("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+s.name+"` with data field `"+s.field+"`); try a `["+s.field+"]` selector to limit scope to elements with `"+s.field+"` defined")};switch(s.mapped){case h.mapData:{for(var L=s.field.split("."),T=w.data,j=0;j<L.length&&T;j++){var I=L[j];T=T[I]}if(T==null)return M(),!1;var D;if(jt(T)){var R=s.fieldMax-s.fieldMin;R===0?D=0:D=(T-s.fieldMin)/R}else return jr("Do not use continuous mappers without specifying numeric data (i.e. `"+s.field+": "+T+"` for `"+t.id()+"` is non-numeric)"),!1;if(D<0?D=0:D>1&&(D=1),d.color){var Y=s.valueMin[0],G=s.valueMax[0],U=s.valueMin[1],z=s.valueMax[1],Q=s.valueMin[2],$=s.valueMax[2],Z=s.valueMin[3]==null?1:s.valueMin[3],X=s.valueMax[3]==null?1:s.valueMax[3],K=[Math.round(Y+(G-Y)*D),Math.round(U+(z-U)*D),Math.round(Q+($-Q)*D),Math.round(Z+(X-Z)*D)];f={bypass:s.bypass,name:s.name,value:K,strValue:"rgb("+K[0]+", "+K[1]+", "+K[2]+")"}}else if(d.number){var ae=s.valueMin+(s.valueMax-s.valueMin)*D;f=this.parse(s.name,ae,s.bypass,k)}else return!1;if(!f)return M(),!1;f.mapping=s,s=f;break}case h.data:{for(var se=s.field.split("."),le=w.data,he=0;he<se.length&≤he++){var fe=se[he];le=le[fe]}if(le!=null&&(f=this.parse(s.name,le,s.bypass,k)),!f)return M(),!1;f.mapping=s,s=f;break}case h.fn:{var pe=s.value,me=s.fnValue!=null?s.fnValue:pe(t);if(s.prevFnValue=me,me==null)return jr("Custom function mappers may not return null (i.e. `"+s.name+"` for ele `"+t.id()+"` is null)"),!1;if(f=this.parse(s.name,me,s.bypass,k),!f)return jr("Custom function mappers may not return invalid values for the property type (i.e. `"+s.name+"` for ele `"+t.id()+"` is invalid)"),!1;f.mapping=Zc(s),s=f;break}case void 0:break;default:return!1}return p?(m?s.bypassed=b.bypassed:s.bypassed=b,c[s.name]=s):m?b.bypassed=s:c[s.name]=s,S(),!0},eo.cleanElements=function(t,r){for(var a=0;a<t.length;a++){var s=t[a];if(this.clearStyleHints(s),s.dirtyCompoundBoundsCache(),s.dirtyBoundingBoxCache(),!r)s._private.style={};else for(var c=s._private.style,f=Object.keys(c),h=0;h<f.length;h++){var d=f[h],p=c[d];p!=null&&(p.bypass?p.bypassed=null:c[d]=null)}}},eo.update=function(){var t=this._private.cy,r=t.mutableElements();r.updateStyle()},eo.updateTransitions=function(t,r){var a=this,s=t._private,c=t.pstyle("transition-property").value,f=t.pstyle("transition-duration").pfValue,h=t.pstyle("transition-delay").pfValue;if(c.length>0&&f>0){for(var d={},p=!1,b=0;b<c.length;b++){var m=c[b],w=t.pstyle(m),k=r[m];if(k){var P=k.prev,S=P,M=k.next!=null?k.next:w,L=!1,T=void 0,j=1e-6;S&&(jt(S.pfValue)&&jt(M.pfValue)?(L=M.pfValue-S.pfValue,T=S.pfValue+j*L):jt(S.value)&&jt(M.value)?(L=M.value-S.value,T=S.value+j*L):ei(S.value)&&ei(M.value)&&(L=S.value[0]!==M.value[0]||S.value[1]!==M.value[1]||S.value[2]!==M.value[2],T=S.strValue),L&&(d[m]=M.strValue,this.applyBypass(t,m,T),p=!0))}}if(!p)return;s.transitioning=!0,new Sg(function(I){h>0?t.delayAnimation(h).play().promise().then(I):I()}).then(function(){return t.animation({style:d,duration:f,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){a.removeBypasses(t,c),t.emitAndNotify("style"),s.transitioning=!1})}else s.transitioning&&(this.removeBypasses(t,c),t.emitAndNotify("style"),s.transitioning=!1)},eo.checkTrigger=function(t,r,a,s,c,f){var h=this.properties[r],d=c(h);t.removed()||d!=null&&d(a,s,t)&&f(h)},eo.checkZOrderTrigger=function(t,r,a,s){var c=this;this.checkTrigger(t,r,a,s,function(f){return f.triggersZOrder},function(){c._private.cy.notify("zorder",t)})},eo.checkBoundsTrigger=function(t,r,a,s){this.checkTrigger(t,r,a,s,function(c){return c.triggersBounds},function(c){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})},eo.checkConnectedEdgesBoundsTrigger=function(t,r,a,s){this.checkTrigger(t,r,a,s,function(c){return c.triggersBoundsOfConnectedEdges},function(c){t.connectedEdges().forEach(function(f){f.dirtyBoundingBoxCache()})})},eo.checkParallelEdgesBoundsTrigger=function(t,r,a,s){this.checkTrigger(t,r,a,s,function(c){return c.triggersBoundsOfParallelEdges},function(c){t.parallelEdges().forEach(function(f){f.dirtyBoundingBoxCache()})})},eo.checkTriggers=function(t,r,a,s){t.dirtyStyleCache(),this.checkZOrderTrigger(t,r,a,s),this.checkBoundsTrigger(t,r,a,s),this.checkConnectedEdgesBoundsTrigger(t,r,a,s),this.checkParallelEdgesBoundsTrigger(t,r,a,s)};var m0={};m0.applyBypass=function(t,r,a,s){var c=this,f=[],h=!0;if(r==="*"||r==="**"){if(a!==void 0)for(var d=0;d<c.properties.length;d++){var p=c.properties[d],b=p.name,m=this.parse(b,a,!0);m&&f.push(m)}}else if(nn(r)){var w=this.parse(r,a,!0);w&&f.push(w)}else if(gr(r)){var k=r;s=a;for(var P=Object.keys(k),S=0;S<P.length;S++){var M=P[S],L=k[M];if(L===void 0&&(L=k[Um(M)]),L!==void 0){var T=this.parse(M,L,!0);T&&f.push(T)}}}else return!1;if(f.length===0)return!1;for(var j=!1,I=0;I<t.length;I++){for(var D=t[I],R={},Y=void 0,G=0;G<f.length;G++){var U=f[G];if(s){var z=D.pstyle(U.name);Y=R[U.name]={prev:z}}j=this.applyParsedProperty(D,Zc(U))||j,s&&(Y.next=D.pstyle(U.name))}j&&this.updateStyleHints(D),s&&this.updateTransitions(D,R,h)}return j},m0.overrideBypass=function(t,r,a){r=LC(r);for(var s=0;s<t.length;s++){var c=t[s],f=c._private.style[r],h=this.properties[r].type,d=h.color,p=h.mutiple,b=f?f.pfValue!=null?f.pfValue:f.value:null;!f||!f.bypass?this.applyBypass(c,r,a):(f.value=a,f.pfValue!=null&&(f.pfValue=a),d?f.strValue="rgb("+a.join(",")+")":p?f.strValue=a.join(" "):f.strValue=""+a,this.updateStyleHints(c)),this.checkTriggers(c,r,b,a)}},m0.removeAllBypasses=function(t,r){return this.removeBypasses(t,this.propertyNames,r)},m0.removeBypasses=function(t,r,a){for(var s=!0,c=0;c<t.length;c++){for(var f=t[c],h={},d=0;d<r.length;d++){var p=r[d],b=this.properties[p],m=f.pstyle(b.name);if(!(!m||!m.bypass)){var w="",k=this.parse(p,w,!0),P=h[b.name]={prev:m};this.applyParsedProperty(f,k),P.next=f.pstyle(b.name)}}this.updateStyleHints(f),a&&this.updateTransitions(f,h,s)}};var SP={};SP.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1},SP.containerCss=function(t){var r=this._private.cy,a=r.container(),s=r.window();if(s&&a&&s.getComputedStyle)return s.getComputedStyle(a).getPropertyValue(t)};var $c={};$c.getRenderedStyle=function(t,r){return r?this.getStylePropertyValue(t,r,!0):this.getRawStyle(t,!0)},$c.getRawStyle=function(t,r){var a=this;if(t=t[0],t){for(var s={},c=0;c<a.properties.length;c++){var f=a.properties[c],h=a.getStylePropertyValue(t,f.name,r);h!=null&&(s[f.name]=h,s[Um(f.name)]=h)}return s}},$c.getIndexedStyle=function(t,r,a,s){var c=t.pstyle(r)[a][s];return c??t.cy().style().getDefaultProperty(r)[a][0]},$c.getStylePropertyValue=function(t,r,a){var s=this;if(t=t[0],t){var c=s.properties[r];c.alias&&(c=c.pointsTo);var f=c.type,h=t.pstyle(c.name);if(h){var d=h.value,p=h.units,b=h.strValue;if(a&&f.number&&d!=null&&jt(d)){var m=t.cy().zoom(),w=function(M){return M*m},k=function(M,L){return w(M)+L},P=ei(d),S=P?p.every(function(M){return M!=null}):p!=null;return S?P?d.map(function(M,L){return k(M,p[L])}).join(" "):k(d,p):P?d.map(function(M){return nn(M)?M:""+w(M)}).join(" "):""+w(d)}else if(b!=null)return b}return null}},$c.getAnimationStartStyle=function(t,r){for(var a={},s=0;s<r.length;s++){var c=r[s],f=c.name,h=t.pstyle(f);h!==void 0&&(gr(h)?h=this.parse(f,h.strValue):h=this.parse(f,h)),h&&(a[f]=h)}return a},$c.getPropsList=function(t){var r=this,a=[],s=t,c=r.properties;if(s)for(var f=Object.keys(s),h=0;h<f.length;h++){var d=f[h],p=s[d],b=c[d]||c[LC(d)],m=this.parse(b.name,p);m&&a.push(m)}return a},$c.getNonDefaultPropertiesHash=function(t,r,a){var s=a.slice(),c,f,h,d,p,b;for(p=0;p<r.length;p++)if(c=r[p],f=t.pstyle(c,!1),f!=null)if(f.pfValue!=null)s[0]=r0(d,s[0]),s[1]=i0(d,s[1]);else for(h=f.strValue,b=0;b<h.length;b++)d=h.charCodeAt(b),s[0]=r0(d,s[0]),s[1]=i0(d,s[1]);return s},$c.getPropertiesHash=$c.getNonDefaultPropertiesHash;var Ew={};Ew.appendFromJson=function(t){for(var r=this,a=0;a<t.length;a++){var s=t[a],c=s.selector,f=s.style||s.css,h=Object.keys(f);r.selector(c);for(var d=0;d<h.length;d++){var p=h[d],b=f[p];r.css(p,b)}}return r},Ew.fromJson=function(t){var r=this;return r.resetToDefault(),r.appendFromJson(t),r},Ew.json=function(){for(var t=[],r=this.defaultLength;r<this.length;r++){for(var a=this[r],s=a.selector,c=a.properties,f={},h=0;h<c.length;h++){var d=c[h];f[d.name]=d.strValue}t.push({selector:s?s.toString():"core",style:f})}return t};var NP={};NP.appendFromString=function(t){var r=this,a=this,s=""+t,c,f,h;s=s.replace(/[/][*](\s|.)+?[*][/]/g,"");function d(){s.length>c.length?s=s.substr(c.length):s=""}function p(){f.length>h.length?f=f.substr(h.length):f=""}for(;;){var b=s.match(/^\s*$/);if(b)break;var m=s.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!m){jr("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+s);break}c=m[0];var w=m[1];if(w!=="core"){var k=new gh(w);if(k.invalid){jr("Skipping parsing of block: Invalid selector found in string stylesheet: "+w),d();continue}}var P=m[2],S=!1;f=P;for(var M=[];;){var L=f.match(/^\s*$/);if(L)break;var T=f.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!T){jr("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+P),S=!0;break}h=T[0];var j=T[1],I=T[2],D=r.properties[j];if(!D){jr("Skipping property: Invalid property name in: "+h),p();continue}var R=a.parse(j,I);if(!R){jr("Skipping property: Invalid property definition in: "+h),p();continue}M.push({name:j,val:I}),p()}if(S){d();break}a.selector(w);for(var Y=0;Y<M.length;Y++){var G=M[Y];a.css(G.name,G.val)}d()}return a},NP.fromString=function(t){var r=this;return r.resetToDefault(),r.appendFromString(t),r};var wa={};(function(){var t=Da,r=yse,a=wse,s=xse,c=kse,f=function(Me){return"^"+Me+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},h=function(Me){var ke=t+"|\\w+|"+r+"|"+a+"|"+s+"|"+c;return"^"+Me+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+ke+")\\s*\\,\\s*("+ke+")\\)$"},d=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];wa.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},axisDirectionExplicit:{enums:["leftward","rightward","upward","downward"]},axisDirectionPrimary:{enums:["horizontal","vertical"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},boxSelection:{enums:["contain","overlap","none"]},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle","circle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:f("data")},layoutData:{mapping:!0,regex:f("layoutData")},scratch:{mapping:!0,regex:f("scratch")},mapData:{mapping:!0,regex:h("mapData")},mapLayoutData:{mapping:!0,regex:h("mapLayoutData")},mapScratch:{mapping:!0,regex:h("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:d,singleRegexMatchValue:!0},urls:{regexes:d,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(Me,ke){switch(Me.length){case 2:return ke[0]!=="deg"&&ke[0]!=="rad"&&ke[1]!=="deg"&&ke[1]!=="rad";case 1:return nn(Me[0])||ke[0]==="deg"||ke[0]==="rad";default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(Me){var ke=Me.length;return ke===1||ke===2||ke===4}}};var p={zeroNonZero:function(Me,ke){return(Me==null||ke==null)&&Me!==ke||Me==0&&ke!=0?!0:Me!=0&&ke==0},any:function(Me,ke){return Me!=ke},emptyNonEmpty:function(Me,ke){var Ge=sh(Me),Qe=sh(ke);return Ge&&!Qe||!Ge&&Qe}},b=wa.types,m=[{name:"label",type:b.text,triggersBounds:p.any,triggersZOrder:p.emptyNonEmpty},{name:"text-rotation",type:b.textRotation,triggersBounds:p.any},{name:"text-margin-x",type:b.bidirectionalSize,triggersBounds:p.any},{name:"text-margin-y",type:b.bidirectionalSize,triggersBounds:p.any}],w=[{name:"source-label",type:b.text,triggersBounds:p.any},{name:"source-text-rotation",type:b.textRotation,triggersBounds:p.any},{name:"source-text-margin-x",type:b.bidirectionalSize,triggersBounds:p.any},{name:"source-text-margin-y",type:b.bidirectionalSize,triggersBounds:p.any},{name:"source-text-offset",type:b.size,triggersBounds:p.any}],k=[{name:"target-label",type:b.text,triggersBounds:p.any},{name:"target-text-rotation",type:b.textRotation,triggersBounds:p.any},{name:"target-text-margin-x",type:b.bidirectionalSize,triggersBounds:p.any},{name:"target-text-margin-y",type:b.bidirectionalSize,triggersBounds:p.any},{name:"target-text-offset",type:b.size,triggersBounds:p.any}],P=[{name:"font-family",type:b.fontFamily,triggersBounds:p.any},{name:"font-style",type:b.fontStyle,triggersBounds:p.any},{name:"font-weight",type:b.fontWeight,triggersBounds:p.any},{name:"font-size",type:b.size,triggersBounds:p.any},{name:"text-transform",type:b.textTransform,triggersBounds:p.any},{name:"text-wrap",type:b.textWrap,triggersBounds:p.any},{name:"text-overflow-wrap",type:b.textOverflowWrap,triggersBounds:p.any},{name:"text-max-width",type:b.size,triggersBounds:p.any},{name:"text-outline-width",type:b.size,triggersBounds:p.any},{name:"line-height",type:b.positiveNumber,triggersBounds:p.any}],S=[{name:"text-valign",type:b.valign,triggersBounds:p.any},{name:"text-halign",type:b.halign,triggersBounds:p.any},{name:"color",type:b.color},{name:"text-outline-color",type:b.color},{name:"text-outline-opacity",type:b.zeroOneNumber},{name:"text-background-color",type:b.color},{name:"text-background-opacity",type:b.zeroOneNumber},{name:"text-background-padding",type:b.size,triggersBounds:p.any},{name:"text-border-opacity",type:b.zeroOneNumber},{name:"text-border-color",type:b.color},{name:"text-border-width",type:b.size,triggersBounds:p.any},{name:"text-border-style",type:b.borderStyle,triggersBounds:p.any},{name:"text-background-shape",type:b.textBackgroundShape,triggersBounds:p.any},{name:"text-justification",type:b.justification},{name:"box-select-labels",type:b.bool,triggersBounds:p.any}],M=[{name:"events",type:b.bool,triggersZOrder:p.any},{name:"text-events",type:b.bool,triggersZOrder:p.any},{name:"box-selection",type:b.boxSelection,triggersZOrder:p.any}],L=[{name:"display",type:b.display,triggersZOrder:p.any,triggersBounds:p.any,triggersBoundsOfConnectedEdges:p.any,triggersBoundsOfParallelEdges:function(Me,ke,Ge){return Me===ke?!1:Ge.pstyle("curve-style").value==="bezier"}},{name:"visibility",type:b.visibility,triggersZOrder:p.any},{name:"opacity",type:b.zeroOneNumber,triggersZOrder:p.zeroNonZero},{name:"text-opacity",type:b.zeroOneNumber},{name:"min-zoomed-font-size",type:b.size},{name:"z-compound-depth",type:b.zCompoundDepth,triggersZOrder:p.any},{name:"z-index-compare",type:b.zIndexCompare,triggersZOrder:p.any},{name:"z-index",type:b.number,triggersZOrder:p.any}],T=[{name:"overlay-padding",type:b.size,triggersBounds:p.any},{name:"overlay-color",type:b.color},{name:"overlay-opacity",type:b.zeroOneNumber,triggersBounds:p.zeroNonZero},{name:"overlay-shape",type:b.overlayShape,triggersBounds:p.any},{name:"overlay-corner-radius",type:b.cornerRadius}],j=[{name:"underlay-padding",type:b.size,triggersBounds:p.any},{name:"underlay-color",type:b.color},{name:"underlay-opacity",type:b.zeroOneNumber,triggersBounds:p.zeroNonZero},{name:"underlay-shape",type:b.overlayShape,triggersBounds:p.any},{name:"underlay-corner-radius",type:b.cornerRadius}],I=[{name:"transition-property",type:b.propList},{name:"transition-duration",type:b.time},{name:"transition-delay",type:b.time},{name:"transition-timing-function",type:b.easing}],D=function(Me,ke){return ke.value==="label"?-Me.poolIndex():ke.pfValue},R=[{name:"height",type:b.nodeSize,triggersBounds:p.any,hashOverride:D},{name:"width",type:b.nodeSize,triggersBounds:p.any,hashOverride:D},{name:"shape",type:b.nodeShape,triggersBounds:p.any},{name:"shape-polygon-points",type:b.polygonPointList,triggersBounds:p.any},{name:"corner-radius",type:b.cornerRadius},{name:"background-color",type:b.color},{name:"background-fill",type:b.fill},{name:"background-opacity",type:b.zeroOneNumber},{name:"background-blacken",type:b.nOneOneNumber},{name:"background-gradient-stop-colors",type:b.colors},{name:"background-gradient-stop-positions",type:b.percentages},{name:"background-gradient-direction",type:b.gradientDirection},{name:"padding",type:b.sizeMaybePercent,triggersBounds:p.any},{name:"padding-relative-to",type:b.paddingRelativeTo,triggersBounds:p.any},{name:"bounds-expansion",type:b.boundsExpansion,triggersBounds:p.any}],Y=[{name:"border-color",type:b.color},{name:"border-opacity",type:b.zeroOneNumber},{name:"border-width",type:b.size,triggersBounds:p.any},{name:"border-style",type:b.borderStyle},{name:"border-cap",type:b.lineCap},{name:"border-join",type:b.lineJoin},{name:"border-dash-pattern",type:b.numbers},{name:"border-dash-offset",type:b.number},{name:"border-position",type:b.linePosition}],G=[{name:"outline-color",type:b.color},{name:"outline-opacity",type:b.zeroOneNumber},{name:"outline-width",type:b.size,triggersBounds:p.any},{name:"outline-style",type:b.borderStyle},{name:"outline-offset",type:b.size,triggersBounds:p.any}],U=[{name:"background-image",type:b.urls},{name:"background-image-crossorigin",type:b.bgCrossOrigin},{name:"background-image-opacity",type:b.zeroOneNumbers},{name:"background-image-containment",type:b.bgContainment},{name:"background-image-smoothing",type:b.bools},{name:"background-position-x",type:b.bgPos},{name:"background-position-y",type:b.bgPos},{name:"background-width-relative-to",type:b.bgRelativeTo},{name:"background-height-relative-to",type:b.bgRelativeTo},{name:"background-repeat",type:b.bgRepeat},{name:"background-fit",type:b.bgFit},{name:"background-clip",type:b.bgClip},{name:"background-width",type:b.bgWH},{name:"background-height",type:b.bgWH},{name:"background-offset-x",type:b.bgPos},{name:"background-offset-y",type:b.bgPos}],z=[{name:"position",type:b.position,triggersBounds:p.any},{name:"compound-sizing-wrt-labels",type:b.compoundIncludeLabels,triggersBounds:p.any},{name:"min-width",type:b.size,triggersBounds:p.any},{name:"min-width-bias-left",type:b.sizeMaybePercent,triggersBounds:p.any},{name:"min-width-bias-right",type:b.sizeMaybePercent,triggersBounds:p.any},{name:"min-height",type:b.size,triggersBounds:p.any},{name:"min-height-bias-top",type:b.sizeMaybePercent,triggersBounds:p.any},{name:"min-height-bias-bottom",type:b.sizeMaybePercent,triggersBounds:p.any}],Q=[{name:"line-style",type:b.lineStyle},{name:"line-color",type:b.color},{name:"line-fill",type:b.fill},{name:"line-cap",type:b.lineCap},{name:"line-opacity",type:b.zeroOneNumber},{name:"line-dash-pattern",type:b.numbers},{name:"line-dash-offset",type:b.number},{name:"line-outline-width",type:b.size},{name:"line-outline-color",type:b.color},{name:"line-gradient-stop-colors",type:b.colors},{name:"line-gradient-stop-positions",type:b.percentages},{name:"curve-style",type:b.curveStyle,triggersBounds:p.any,triggersBoundsOfParallelEdges:function(Me,ke){return Me===ke?!1:Me==="bezier"||ke==="bezier"}},{name:"haystack-radius",type:b.zeroOneNumber,triggersBounds:p.any},{name:"source-endpoint",type:b.edgeEndpoint,triggersBounds:p.any},{name:"target-endpoint",type:b.edgeEndpoint,triggersBounds:p.any},{name:"control-point-step-size",type:b.size,triggersBounds:p.any},{name:"control-point-distances",type:b.bidirectionalSizes,triggersBounds:p.any},{name:"control-point-weights",type:b.numbers,triggersBounds:p.any},{name:"segment-distances",type:b.bidirectionalSizes,triggersBounds:p.any},{name:"segment-weights",type:b.numbers,triggersBounds:p.any},{name:"segment-radii",type:b.numbers,triggersBounds:p.any},{name:"radius-type",type:b.radiusType,triggersBounds:p.any},{name:"taxi-turn",type:b.bidirectionalSizeMaybePercent,triggersBounds:p.any},{name:"taxi-turn-min-distance",type:b.size,triggersBounds:p.any},{name:"taxi-direction",type:b.axisDirection,triggersBounds:p.any},{name:"taxi-radius",type:b.number,triggersBounds:p.any},{name:"edge-distances",type:b.edgeDistances,triggersBounds:p.any},{name:"arrow-scale",type:b.positiveNumber,triggersBounds:p.any},{name:"loop-direction",type:b.angle,triggersBounds:p.any},{name:"loop-sweep",type:b.angle,triggersBounds:p.any},{name:"source-distance-from-node",type:b.size,triggersBounds:p.any},{name:"target-distance-from-node",type:b.size,triggersBounds:p.any}],$=[{name:"ghost",type:b.bool,triggersBounds:p.any},{name:"ghost-offset-x",type:b.bidirectionalSize,triggersBounds:p.any},{name:"ghost-offset-y",type:b.bidirectionalSize,triggersBounds:p.any},{name:"ghost-opacity",type:b.zeroOneNumber}],Z=[{name:"selection-box-color",type:b.color},{name:"selection-box-opacity",type:b.zeroOneNumber},{name:"selection-box-border-color",type:b.color},{name:"selection-box-border-width",type:b.size},{name:"active-bg-color",type:b.color},{name:"active-bg-opacity",type:b.zeroOneNumber},{name:"active-bg-size",type:b.size},{name:"outside-texture-bg-color",type:b.color},{name:"outside-texture-bg-opacity",type:b.zeroOneNumber}],X=[];wa.pieBackgroundN=16,X.push({name:"pie-size",type:b.sizeMaybePercent}),X.push({name:"pie-hole",type:b.sizeMaybePercent}),X.push({name:"pie-start-angle",type:b.angle});for(var K=1;K<=wa.pieBackgroundN;K++)X.push({name:"pie-"+K+"-background-color",type:b.color}),X.push({name:"pie-"+K+"-background-size",type:b.percent}),X.push({name:"pie-"+K+"-background-opacity",type:b.zeroOneNumber});var ae=[];wa.stripeBackgroundN=16,ae.push({name:"stripe-size",type:b.sizeMaybePercent}),ae.push({name:"stripe-direction",type:b.axisDirectionPrimary});for(var se=1;se<=wa.stripeBackgroundN;se++)ae.push({name:"stripe-"+se+"-background-color",type:b.color}),ae.push({name:"stripe-"+se+"-background-size",type:b.percent}),ae.push({name:"stripe-"+se+"-background-opacity",type:b.zeroOneNumber});var le=[],he=wa.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:b.arrowShape,triggersBounds:p.any},{name:"arrow-color",type:b.color},{name:"arrow-fill",type:b.arrowFill},{name:"arrow-width",type:b.arrowWidth}].forEach(function(Me){he.forEach(function(ke){var Ge=ke+"-"+Me.name,Qe=Me.type,nt=Me.triggersBounds;le.push({name:Ge,type:Qe,triggersBounds:nt})})},{});var fe=wa.properties=[].concat(M,I,L,T,j,$,S,P,m,w,k,R,Y,G,U,X,ae,z,Q,le,Z),pe=wa.propertyGroups={behavior:M,transition:I,visibility:L,overlay:T,underlay:j,ghost:$,commonLabel:S,labelDimensions:P,mainLabel:m,sourceLabel:w,targetLabel:k,nodeBody:R,nodeBorder:Y,nodeOutline:G,backgroundImage:U,pie:X,stripe:ae,compound:z,edgeLine:Q,edgeArrow:le,core:Z},me=wa.propertyGroupNames={},Te=wa.propertyGroupKeys=Object.keys(pe);Te.forEach(function(Me){me[Me]=pe[Me].map(function(ke){return ke.name}),pe[Me].forEach(function(ke){return ke.groupKey=Me})});var Le=wa.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];wa.propertyNames=fe.map(function(Me){return Me.name});for(var ge=0;ge<fe.length;ge++){var xe=fe[ge];fe[xe.name]=xe}for(var Se=0;Se<Le.length;Se++){var Ie=Le[Se],Re=fe[Ie.pointsTo],Ne={name:Ie.name,alias:!0,pointsTo:Re};fe.push(Ne),fe[Ie.name]=Ne}})(),wa.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},wa.getDefaultProperties=function(){var t=this._private;if(t.defaultProperties!=null)return t.defaultProperties;for(var r=fn({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","box-selection":"contain","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","box-select-labels":"no","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%","pie-hole":0,"pie-start-angle":"0deg"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(p,b){for(var m=1;m<=wa.pieBackgroundN;m++){var w=b.name.replace("{{i}}",m),k=b.value;p[w]=k}return p},{}),{"stripe-size":"100%","stripe-direction":"horizontal"},[{name:"stripe-{{i}}-background-color",value:"black"},{name:"stripe-{{i}}-background-size",value:"0%"},{name:"stripe-{{i}}-background-opacity",value:1}].reduce(function(p,b){for(var m=1;m<=wa.stripeBackgroundN;m++){var w=b.name.replace("{{i}}",m),k=b.value;p[w]=k}return p},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(p,b){return wa.arrowPrefixes.forEach(function(m){var w=m+"-"+b.name,k=b.value;p[w]=k}),p},{})),a={},s=0;s<this.properties.length;s++){var c=this.properties[s];if(!c.pointsTo){var f=c.name,h=r[f],d=this.parse(f,h);a[f]=d}}return t.defaultProperties=a,t.defaultProperties},wa.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var Cw={};Cw.parse=function(t,r,a,s){var c=this;if(Di(r))return c.parseImplWarn(t,r,a,s);var f=s==="mapping"||s===!0||s===!1||s==null?"dontcare":s,h=a?"t":"f",d=""+r,p=D8(t,d,h,f),b=c.propCache=c.propCache||[],m;return(m=b[p])||(m=b[p]=c.parseImplWarn(t,r,a,s)),(a||s==="mapping")&&(m=Zc(m),m&&(m.value=Zc(m.value))),m},Cw.parseImplWarn=function(t,r,a,s){var c=this.parseImpl(t,r,a,s);return!c&&r!=null&&jr("The style property `".concat(t,": ").concat(r,"` is invalid")),c&&(c.name==="width"||c.name==="height")&&r==="label"&&jr("The style value of `label` is deprecated for `"+c.name+"`"),c},Cw.parseImpl=function(t,r,a,s){var c=this;t=LC(t);var f=c.properties[t],h=r,d=c.types;if(!f||r===void 0)return null;f.alias&&(f=f.pointsTo,t=f.name);var p=nn(r);p&&(r=r.trim());var b=f.type;if(!b)return null;if(a&&(r===""||r===null))return{name:t,value:r,bypass:!0,deleteBypass:!0};if(Di(r))return{name:t,value:r,strValue:"fn",mapped:d.fn,bypass:a};var m,w;if(!(!p||s||r.length<7||r[1]!=="a")){if(r.length>=7&&r[0]==="d"&&(m=new RegExp(d.data.regex).exec(r))){if(a)return!1;var k=d.data;return{name:t,value:m,strValue:""+r,mapped:k,field:m[1],bypass:a}}else if(r.length>=10&&r[0]==="m"&&(w=new RegExp(d.mapData.regex).exec(r))){if(a||b.multiple)return!1;var P=d.mapData;if(!(b.color||b.number))return!1;var S=this.parse(t,w[4]);if(!S||S.mapped)return!1;var M=this.parse(t,w[5]);if(!M||M.mapped)return!1;if(S.pfValue===M.pfValue||S.strValue===M.strValue)return jr("`"+t+": "+r+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+S.strValue+"`"),this.parse(t,S.strValue);if(b.color){var L=S.value,T=M.value,j=L[0]===T[0]&&L[1]===T[1]&&L[2]===T[2]&&(L[3]===T[3]||(L[3]==null||L[3]===1)&&(T[3]==null||T[3]===1));if(j)return!1}return{name:t,value:w,strValue:""+r,mapped:P,field:w[1],fieldMin:parseFloat(w[2]),fieldMax:parseFloat(w[3]),valueMin:S.value,valueMax:M.value,bypass:a}}}if(b.multiple&&s!=="multiple"){var I;if(p?I=r.split(/\s+/):ei(r)?I=r:I=[r],b.evenMultiple&&I.length%2!==0)return null;for(var D=[],R=[],Y=[],G="",U=!1,z=0;z<I.length;z++){var Q=c.parse(t,I[z],a,"multiple");U=U||nn(Q.value),D.push(Q.value),Y.push(Q.pfValue!=null?Q.pfValue:Q.value),R.push(Q.units),G+=(z>0?" ":"")+Q.strValue}return b.validate&&!b.validate(D,R)?null:b.singleEnum&&U?D.length===1&&nn(D[0])?{name:t,value:D[0],strValue:D[0],bypass:a}:null:{name:t,value:D,pfValue:Y,strValue:G,bypass:a,units:R}}var $=function(){for(var Re=0;Re<b.enums.length;Re++){var Ne=b.enums[Re];if(Ne===r)return{name:t,value:r,strValue:""+r,bypass:a}}return null};if(b.number){var Z,X="px";if(b.units&&(Z=b.units),b.implicitUnits&&(X=b.implicitUnits),!b.unitless)if(p){var K="px|em"+(b.allowPercent?"|\\%":"");Z&&(K=Z);var ae=r.match("^("+Da+")("+K+")?$");ae&&(r=ae[1],Z=ae[2]||X)}else(!Z||b.implicitUnits)&&(Z=X);if(r=parseFloat(r),isNaN(r)&&b.enums===void 0)return null;if(isNaN(r)&&b.enums!==void 0)return r=h,$();if(b.integer&&!fse(r)||b.min!==void 0&&(r<b.min||b.strictMin&&r===b.min)||b.max!==void 0&&(r>b.max||b.strictMax&&r===b.max))return null;var se={name:t,value:r,strValue:""+r+(Z||""),units:Z,bypass:a};return b.unitless||Z!=="px"&&Z!=="em"?se.pfValue=r:se.pfValue=Z==="px"||!Z?r:this.getEmSizeInPixels()*r,(Z==="ms"||Z==="s")&&(se.pfValue=Z==="ms"?r:1e3*r),(Z==="deg"||Z==="rad")&&(se.pfValue=Z==="rad"?r:xue(r)),Z==="%"&&(se.pfValue=r/100),se}else if(b.propList){var le=[],he=""+r;if(he!=="none"){for(var fe=he.split(/\s*,\s*|\s+/),pe=0;pe<fe.length;pe++){var me=fe[pe].trim();c.properties[me]?le.push(me):jr("`"+me+"` is not a valid property name")}if(le.length===0)return null}return{name:t,value:le,strValue:le.length===0?"none":le.join(" "),bypass:a}}else if(b.color){var Te=p8(r);return Te?{name:t,value:Te,pfValue:Te,strValue:"rgb("+Te[0]+","+Te[1]+","+Te[2]+")",bypass:a}:null}else if(b.regex||b.regexes){if(b.enums){var Le=$();if(Le)return Le}for(var ge=b.regexes?b.regexes:[b.regex],xe=0;xe<ge.length;xe++){var Se=new RegExp(ge[xe]),Ie=Se.exec(r);if(Ie)return{name:t,value:b.singleRegexMatchValue?Ie[1]:Ie,strValue:""+r,bypass:a}}return null}else return b.string?{name:t,value:""+r,strValue:""+r,bypass:a}:b.enums?$():null};var to=function(t){if(!(this instanceof to))return new to(t);if(!IC(t)){_i("A style must have a core reference");return}this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()},Oo=to.prototype;Oo.instanceString=function(){return"style"},Oo.clear=function(){for(var t=this._private,r=t.cy,a=r.elements(),s=0;s<this.length;s++)this[s]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(a,!0),a.forEach(function(c){var f=c[0]._private;f.styleDirty=!0,f.appliedInitStyle=!1}),this},Oo.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},Oo.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)},Oo.selector=function(t){var r=t==="core"?null:new gh(t),a=this.length++;return this[a]={selector:r,properties:[],mappedProperties:[],index:a},this},Oo.css=function(){var t=this,r=arguments;if(r.length===1)for(var a=r[0],s=0;s<t.properties.length;s++){var c=t.properties[s],f=a[c.name];f===void 0&&(f=a[Um(c.name)]),f!==void 0&&this.cssRule(c.name,f)}else r.length===2&&this.cssRule(r[0],r[1]);return this},Oo.style=Oo.css,Oo.cssRule=function(t,r){var a=this.parse(t,r);if(a){var s=this.length-1;this[s].properties.push(a),this[s].properties[a.name]=a,a.name.match(/pie-(\d+)-background-size/)&&a.value&&(this._private.hasPie=!0),a.name.match(/stripe-(\d+)-background-size/)&&a.value&&(this._private.hasStripe=!0),a.mapped&&this[s].mappedProperties.push(a);var c=!this[s].selector;c&&(this._private.coreStyle[a.name]=a)}return this},Oo.append=function(t){return l8(t)?t.appendToStyle(this):ei(t)?this.appendFromJson(t):nn(t)&&this.appendFromString(t),this},to.fromJson=function(t,r){var a=new to(t);return a.fromJson(r),a},to.fromString=function(t,r){return new to(t).fromString(r)},[eo,m0,SP,$c,Ew,NP,wa,Cw].forEach(function(t){fn(Oo,t)}),to.types=Oo.types,to.properties=Oo.properties,to.propertyGroups=Oo.propertyGroups,to.propertyGroupNames=Oo.propertyGroupNames,to.propertyGroupKeys=Oo.propertyGroupKeys;var Cfe={style:function(t){if(t){var r=this.setStyle(t);r.update()}return this._private.style},setStyle:function(t){var r=this._private;return l8(t)?r.style=t.generateStyle(this):ei(t)?r.style=to.fromJson(this,t):nn(t)?r.style=to.fromString(this,t):r.style=to(this),r.style},updateStyle:function(){this.mutableElements().updateStyle()}},Pfe="single",zd={autolock:function(t){if(t!==void 0)this._private.autolock=!!t;else return this._private.autolock;return this},autoungrabify:function(t){if(t!==void 0)this._private.autoungrabify=!!t;else return this._private.autoungrabify;return this},autounselectify:function(t){if(t!==void 0)this._private.autounselectify=!!t;else return this._private.autounselectify;return this},selectionType:function(t){var r=this._private;if(r.selectionType==null&&(r.selectionType=Pfe),t!==void 0)(t==="additive"||t==="single")&&(r.selectionType=t);else return r.selectionType;return this},panningEnabled:function(t){if(t!==void 0)this._private.panningEnabled=!!t;else return this._private.panningEnabled;return this},userPanningEnabled:function(t){if(t!==void 0)this._private.userPanningEnabled=!!t;else return this._private.userPanningEnabled;return this},zoomingEnabled:function(t){if(t!==void 0)this._private.zoomingEnabled=!!t;else return this._private.zoomingEnabled;return this},userZoomingEnabled:function(t){if(t!==void 0)this._private.userZoomingEnabled=!!t;else return this._private.userZoomingEnabled;return this},boxSelectionEnabled:function(t){if(t!==void 0)this._private.boxSelectionEnabled=!!t;else return this._private.boxSelectionEnabled;return this},pan:function(){var t=arguments,r=this._private.pan,a,s,c,f,h;switch(t.length){case 0:return r;case 1:if(nn(t[0]))return a=t[0],r[a];if(gr(t[0])){if(!this._private.panningEnabled)return this;c=t[0],f=c.x,h=c.y,jt(f)&&(r.x=f),jt(h)&&(r.y=h),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;a=t[0],s=t[1],(a==="x"||a==="y")&&jt(s)&&(r[a]=s),this.emit("pan viewport");break}return this.notify("viewport"),this},panBy:function(t,r){var a=arguments,s=this._private.pan,c,f,h,d,p;if(!this._private.panningEnabled)return this;switch(a.length){case 1:gr(t)&&(h=a[0],d=h.x,p=h.y,jt(d)&&(s.x+=d),jt(p)&&(s.y+=p),this.emit("pan viewport"));break;case 2:c=t,f=r,(c==="x"||c==="y")&&jt(f)&&(s[c]+=f),this.emit("pan viewport");break}return this.notify("viewport"),this},gc:function(){this.notify("gc")},fit:function(t,r){var a=this.getFitViewport(t,r);if(a){var s=this._private;s.zoom=a.zoom,s.pan=a.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(t,r){if(jt(t)&&r===void 0&&(r=t,t=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var a;if(nn(t)){var s=t;t=this.$(s)}else if(pse(t)){var c=t;a={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2},a.w=a.x2-a.x1,a.h=a.y2-a.y1}else nu(t)||(t=this.mutableElements());if(!(nu(t)&&t.empty())){a=a||t.boundingBox();var f=this.width(),h=this.height(),d;if(r=jt(r)?r:0,!isNaN(f)&&!isNaN(h)&&f>0&&h>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){d=Math.min((f-2*r)/a.w,(h-2*r)/a.h),d=d>this._private.maxZoom?this._private.maxZoom:d,d=d<this._private.minZoom?this._private.minZoom:d;var p={x:(f-d*(a.x1+a.x2))/2,y:(h-d*(a.y1+a.y2))/2};return{zoom:d,pan:p}}}}},zoomRange:function(t,r){var a=this._private;if(r==null){var s=t;t=s.min,r=s.max}return jt(t)&&jt(r)&&t<=r?(a.minZoom=t,a.maxZoom=r):jt(t)&&r===void 0&&t<=a.maxZoom?a.minZoom=t:jt(r)&&t===void 0&&r>=a.minZoom&&(a.maxZoom=r),this},minZoom:function(t){return t===void 0?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return t===void 0?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var r=this._private,a=r.pan,s=r.zoom,c,f,h=!1;if(r.zoomingEnabled||(h=!0),jt(t)?f=t:gr(t)&&(f=t.level,t.position!=null?c=Km(t.position,s,a):t.renderedPosition!=null&&(c=t.renderedPosition),c!=null&&!r.panningEnabled&&(h=!0)),f=f>r.maxZoom?r.maxZoom:f,f=f<r.minZoom?r.minZoom:f,h||!jt(f)||f===s||c!=null&&(!jt(c.x)||!jt(c.y)))return null;if(c!=null){var d=a,p=s,b=f,m={x:-b/p*(c.x-d.x)+c.x,y:-b/p*(c.y-d.y)+c.y};return{zoomed:!0,panned:!0,zoom:b,pan:m}}else return{zoomed:!0,panned:!1,zoom:f,pan:a}},zoom:function(t){if(t===void 0)return this._private.zoom;var r=this.getZoomedViewport(t),a=this._private;return r==null||!r.zoomed?this:(a.zoom=r.zoom,r.panned&&(a.pan.x=r.pan.x,a.pan.y=r.pan.y),this.emit("zoom"+(r.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},viewport:function(t){var r=this._private,a=!0,s=!0,c=[],f=!1,h=!1;if(!t)return this;if(jt(t.zoom)||(a=!1),gr(t.pan)||(s=!1),!a&&!s)return this;if(a){var d=t.zoom;d<r.minZoom||d>r.maxZoom||!r.zoomingEnabled?f=!0:(r.zoom=d,c.push("zoom"))}if(s&&(!f||!t.cancelOnFailedZoom)&&r.panningEnabled){var p=t.pan;jt(p.x)&&(r.pan.x=p.x,h=!1),jt(p.y)&&(r.pan.y=p.y,h=!1),h||c.push("pan")}return c.length>0&&(c.push("viewport"),this.emit(c.join(" ")),this.notify("viewport")),this},center:function(t){var r=this.getCenterPan(t);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,r){if(this._private.panningEnabled){if(nn(t)){var a=t;t=this.mutableElements().filter(a)}else nu(t)||(t=this.mutableElements());if(t.length!==0){var s=t.boundingBox(),c=this.width(),f=this.height();r=r===void 0?this._private.zoom:r;var h={x:(c-r*(s.x1+s.x2))/2,y:(f-r*(s.y1+s.y2))/2};return h}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var t=this._private,r=t.container,a=this;return t.sizeCache=t.sizeCache||(r?function(){var s=a.window().getComputedStyle(r),c=function(f){return parseFloat(s.getPropertyValue(f))};return{width:r.clientWidth-c("padding-left")-c("padding-right"),height:r.clientHeight-c("padding-top")-c("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,r=this._private.zoom,a=this.renderedExtent(),s={x1:(a.x1-t.x)/r,x2:(a.x2-t.x)/r,y1:(a.y1-t.y)/r,y2:(a.y2-t.y)/r};return s.w=s.x2-s.x1,s.h=s.y2-s.y1,s},renderedExtent:function(){var t=this.width(),r=this.height();return{x1:0,y1:0,x2:t,y2:r,w:t,h:r}},multiClickDebounceTime:function(t){if(t)this._private.multiClickDebounceTime=t;else return this._private.multiClickDebounceTime;return this}};zd.centre=zd.center,zd.autolockNodes=zd.autolock,zd.autoungrabifyNodes=zd.autoungrabify;var w0={data:Ar.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Ar.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Ar.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ar.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};w0.attr=w0.data,w0.removeAttr=w0.removeData;var x0=function(t){var r=this;t=fn({},t);var a=t.container;a&&!zm(a)&&zm(a[0])&&(a=a[0]);var s=a?a._cyreg:null;s=s||{},s&&s.cy&&(s.cy.destroy(),s={});var c=s.readies=s.readies||[];a&&(a._cyreg=s),s.cy=r;var f=Oa!==void 0&&a!==void 0&&!t.headless,h=t;h.layout=fn({name:f?"grid":"null"},h.layout),h.renderer=fn({name:f?"canvas":"null"},h.renderer);var d=function(k,P,S){return P!==void 0?P:S!==void 0?S:k},p=this._private={container:a,ready:!1,options:h,elements:new wo(this),listeners:[],aniEles:new wo(this),data:h.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:d(!0,h.zoomingEnabled),userZoomingEnabled:d(!0,h.userZoomingEnabled),panningEnabled:d(!0,h.panningEnabled),userPanningEnabled:d(!0,h.userPanningEnabled),boxSelectionEnabled:d(!0,h.boxSelectionEnabled),autolock:d(!1,h.autolock,h.autolockNodes),autoungrabify:d(!1,h.autoungrabify,h.autoungrabifyNodes),autounselectify:d(!1,h.autounselectify),styleEnabled:h.styleEnabled===void 0?f:h.styleEnabled,zoom:jt(h.zoom)?h.zoom:1,pan:{x:gr(h.pan)&&jt(h.pan.x)?h.pan.x:0,y:gr(h.pan)&&jt(h.pan.y)?h.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:d(250,h.multiClickDebounceTime)};this.createEmitter(),this.selectionType(h.selectionType),this.zoomRange({min:h.minZoom,max:h.maxZoom});var b=function(k,P){var S=k.some(gse);if(S)return Sg.all(k).then(P);P(k)};p.styleEnabled&&r.setStyle([]);var m=fn({},h,h.renderer);r.initRenderer(m);var w=function(k,P,S){r.notifications(!1);var M=r.mutableElements();M.length>0&&M.remove(),k!=null&&(gr(k)||ei(k))&&r.add(k),r.one("layoutready",function(T){r.notifications(!0),r.emit(T),r.one("load",P),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",S),r.emit("done")});var L=fn({},r._private.options.layout);L.eles=r.elements(),r.layout(L).run()};b([h.style,h.elements],function(k){var P=k[0],S=k[1];p.styleEnabled&&r.style().append(P),w(S,function(){r.startAnimationLoop(),p.ready=!0,Di(h.ready)&&r.on("ready",h.ready);for(var M=0;M<c.length;M++){var L=c[M];r.on("ready",L)}s&&(s.readies=[]),r.emit("ready")},h.done)})},Pw=x0.prototype;fn(Pw,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(t){return this.isReady()?this.emitter().emit("ready",[],t):this.on("ready",t),this},destroy:function(){var t=this;if(!t.destroyed())return t.stopAnimationLoop(),t.destroyRenderer(),this.emit("destroy"),t._private.destroyed=!0,t},hasElementWithId:function(t){return this._private.elements.hasElementWithId(t)},getElementById:function(t){return this._private.elements.getElementById(t)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(t){return this._private.elements.merge(t),this},removeFromPool:function(t){return this._private.elements.unmerge(t),this},container:function(){return this._private.container||null},window:function(){var t=this._private.container;if(t==null)return Oa;var r=this._private.container.ownerDocument;return r===void 0||r==null?Oa:r.defaultView||Oa},mount:function(t){if(t!=null){var r=this,a=r._private,s=a.options;return!zm(t)&&zm(t[0])&&(t=t[0]),r.stopAnimationLoop(),r.destroyRenderer(),a.container=t,a.styleEnabled=!0,r.invalidateSize(),r.initRenderer(fn({},s,s.renderer,{name:s.renderer.name==="null"?"canvas":s.renderer.name})),r.startAnimationLoop(),r.style(s.style),r.emit("mount"),r}},unmount:function(){var t=this;return t.stopAnimationLoop(),t.destroyRenderer(),t.initRenderer({name:"null"}),t.emit("unmount"),t},options:function(){return Zc(this._private.options)},json:function(t){var r=this,a=r._private,s=r.mutableElements(),c=function(j){return r.getElementById(j.id())};if(gr(t)){if(r.startBatch(),t.elements){var f={},h=function(j,I){for(var D=[],R=[],Y=0;Y<j.length;Y++){var G=j[Y];if(!G.data.id){jr("cy.json() cannot handle elements without an ID attribute");continue}var U=""+G.data.id,z=r.getElementById(U);f[U]=!0,z.length!==0?R.push({ele:z,json:G}):(I&&(G.group=I),D.push(G))}r.add(D);for(var Q=0;Q<R.length;Q++){var $=R[Q],Z=$.ele,X=$.json;Z.json(X)}};if(ei(t.elements))h(t.elements);else for(var d=["nodes","edges"],p=0;p<d.length;p++){var b=d[p],m=t.elements[b];ei(m)&&h(m,b)}var w=r.collection();s.filter(function(j){return!f[j.id()]}).forEach(function(j){j.isParent()?w.merge(j):j.remove()}),w.forEach(function(j){return j.children().move({parent:null})}),w.forEach(function(j){return c(j).remove()})}t.style&&r.style(t.style),t.zoom!=null&&t.zoom!==a.zoom&&r.zoom(t.zoom),t.pan&&(t.pan.x!==a.pan.x||t.pan.y!==a.pan.y)&&r.pan(t.pan),t.data&&r.data(t.data);for(var k=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],P=0;P<k.length;P++){var S=k[P];t[S]!=null&&r[S](t[S])}return r.endBatch(),this}else{var M=!!t,L={};M?L.elements=this.elements().map(function(j){return j.json()}):(L.elements={},s.forEach(function(j){var I=j.group();L.elements[I]||(L.elements[I]=[]),L.elements[I].push(j.json())})),this._private.styleEnabled&&(L.style=r.style().json()),L.data=Zc(r.data());var T=a.options;return L.zoomingEnabled=a.zoomingEnabled,L.userZoomingEnabled=a.userZoomingEnabled,L.zoom=a.zoom,L.minZoom=a.minZoom,L.maxZoom=a.maxZoom,L.panningEnabled=a.panningEnabled,L.userPanningEnabled=a.userPanningEnabled,L.pan=Zc(a.pan),L.boxSelectionEnabled=a.boxSelectionEnabled,L.renderer=Zc(T.renderer),L.hideEdgesOnViewport=T.hideEdgesOnViewport,L.textureOnViewport=T.textureOnViewport,L.wheelSensitivity=T.wheelSensitivity,L.motionBlur=T.motionBlur,L.multiClickDebounceTime=T.multiClickDebounceTime,L}}}),Pw.$id=Pw.getElementById,[gfe,wfe,lB,CP,kw,kfe,PP,_w,Cfe,zd,w0].forEach(function(t){fn(Pw,t)});var Sfe={fit:!0,directed:!1,direction:"downward",padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}},Nfe={maximal:!1,acyclic:!1},Og=function(t){return t.scratch("breadthfirst")},fB=function(t,r){return t.scratch("breadthfirst",r)};function hB(t){this.options=fn({},Sfe,Nfe,t)}hB.prototype.run=function(){var t=this.options,r=t.cy,a=t.eles,s=a.nodes().filter(function(st){return st.isChildless()}),c=a,f=t.directed,h=t.acyclic||t.maximal||t.maximalAdjustments>0,d=!!t.boundingBox,p=Qo(d?t.boundingBox:structuredClone(r.extent())),b;if(nu(t.roots))b=t.roots;else if(ei(t.roots)){for(var m=[],w=0;w<t.roots.length;w++){var k=t.roots[w],P=r.getElementById(k);m.push(P)}b=r.collection(m)}else if(nn(t.roots))b=r.$(t.roots);else if(f)b=s.roots();else{var S=a.components();b=r.collection();for(var M=function(){var st=S[L],Ot=st.maxDegree(!1),At=st.filter(function(Rt){return Rt.degree(!1)===Ot});b=b.add(At)},L=0;L<S.length;L++)M()}var T=[],j={},I=function(st,Ot){T[Ot]==null&&(T[Ot]=[]);var At=T[Ot].length;T[Ot].push(st),fB(st,{index:At,depth:Ot})},D=function(st,Ot){var At=Og(st),Rt=At.depth,zt=At.index;T[Rt][zt]=null,st.isChildless()&&I(st,Ot)};c.bfs({roots:b,directed:t.directed,visit:function(st,Ot,At,Rt,zt){var mn=st[0],sn=mn.id();mn.isChildless()&&I(mn,zt),j[sn]=!0}});for(var R=[],Y=0;Y<s.length;Y++){var G=s[Y];j[G.id()]||R.push(G)}var U=function(st){for(var Ot=T[st],At=0;At<Ot.length;At++){var Rt=Ot[At];if(Rt==null){Ot.splice(At,1),At--;continue}fB(Rt,{depth:st,index:At})}},z=function(st,Ot){for(var At=Og(st),Rt=st.incomers().filter(function(ue){return ue.isNode()&&a.has(ue)}),zt=-1,mn=st.id(),sn=0;sn<Rt.length;sn++){var or=Rt[sn],H=Og(or);zt=Math.max(zt,H.depth)}if(At.depth<=zt){if(!t.acyclic&&Ot[mn])return null;var ne=zt+1;return D(st,ne),Ot[mn]=ne,!0}return!1};if(f&&h){var Q=[],$={},Z=function(st){return Q.push(st)},X=function(){return Q.shift()};for(s.forEach(function(st){return Q.push(st)});Q.length>0;){var K=X(),ae=z(K,$);if(ae)K.outgoers().filter(function(st){return st.isNode()&&a.has(st)}).forEach(Z);else if(ae===null){jr("Detected double maximal shift for node `"+K.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var se=0;if(t.avoidOverlap)for(var le=0;le<s.length;le++){var he=s[le],fe=he.layoutDimensions(t),pe=fe.w,me=fe.h;se=Math.max(se,pe,me)}var Te={},Le=function(st){if(Te[st.id()])return Te[st.id()];for(var Ot=Og(st).depth,At=st.neighborhood(),Rt=0,zt=0,mn=0;mn<At.length;mn++){var sn=At[mn];if(!(sn.isEdge()||sn.isParent()||!s.has(sn))){var or=Og(sn);if(or!=null){var H=or.index,ne=or.depth;if(!(H==null||ne==null)){var ue=T[ne].length;ne<Ot&&(Rt+=H/ue,zt++)}}}}return zt=Math.max(1,zt),Rt=Rt/zt,zt===0&&(Rt=0),Te[st.id()]=Rt,Rt},ge=function(st,Ot){var At=Le(st),Rt=Le(Ot),zt=At-Rt;return zt===0?d8(st.id(),Ot.id()):zt};t.depthSort!==void 0&&(ge=t.depthSort);for(var xe=T.length,Se=0;Se<xe;Se++)T[Se].sort(ge),U(Se);for(var Ie=[],Re=0;Re<R.length;Re++)Ie.push(R[Re]);var Ne=function(){for(var st=0;st<xe;st++)U(st)};Ie.length&&(T.unshift(Ie),xe=T.length,Ne());for(var Me=0,ke=0;ke<xe;ke++)Me=Math.max(T[ke].length,Me);var Ge={x:p.x1+p.w/2,y:p.y1+p.h/2},Qe=s.reduce(function(st,Ot){return function(At){return{w:st.w===-1?At.w:(st.w+At.w)/2,h:st.h===-1?At.h:(st.h+At.h)/2}}(Ot.boundingBox({includeLabels:t.nodeDimensionsIncludeLabels}))},{w:-1,h:-1}),nt=Math.max(xe===1?0:d?(p.h-t.padding*2-Qe.h)/(xe-1):(p.h-t.padding*2-Qe.h)/(xe+1),se),ft=T.reduce(function(st,Ot){return Math.max(st,Ot.length)},0),Ue=function(st){var Ot=Og(st),At=Ot.depth,Rt=Ot.index;if(t.circle){var zt=Math.min(p.w/2/xe,p.h/2/xe);zt=Math.max(zt,se);var mn=zt*At+zt-(xe>0&&T[0].length<=3?zt/2:0),sn=2*Math.PI/T[At].length*Rt;return At===0&&T[0].length===1&&(mn=1),{x:Ge.x+mn*Math.cos(sn),y:Ge.y+mn*Math.sin(sn)}}else{var or=T[At].length,H=Math.max(or===1?0:d?(p.w-t.padding*2-Qe.w)/((t.grid?ft:or)-1):(p.w-t.padding*2-Qe.w)/((t.grid?ft:or)+1),se),ne={x:Ge.x+(Rt+1-(or+1)/2)*H,y:Ge.y+(At+1-(xe+1)/2)*nt};return ne}},Ze={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(Ze).indexOf(t.direction)===-1&&_i("Invalid direction '".concat(t.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Ze).join(", ")));var mt=function(st){return Yse(Ue(st),p,Ze[t.direction])};return a.nodes().layoutPositions(this,t,mt),this};var Tfe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};function dB(t){this.options=fn({},Tfe,t)}dB.prototype.run=function(){var t=this.options,r=t,a=t.cy,s=r.eles,c=r.counterclockwise!==void 0?!r.counterclockwise:r.clockwise,f=s.nodes().not(":parent");r.sort&&(f=f.sort(r.sort));for(var h=Qo(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),d={x:h.x1+h.w/2,y:h.y1+h.h/2},p=r.sweep===void 0?2*Math.PI-2*Math.PI/f.length:r.sweep,b=p/Math.max(1,f.length-1),m,w=0,k=0;k<f.length;k++){var P=f[k],S=P.layoutDimensions(r),M=S.w,L=S.h;w=Math.max(w,M,L)}if(jt(r.radius)?m=r.radius:f.length<=1?m=0:m=Math.min(h.h,h.w)/2-w,f.length>1&&r.avoidOverlap){w*=1.75;var T=Math.cos(b)-Math.cos(0),j=Math.sin(b)-Math.sin(0),I=Math.sqrt(w*w/(T*T+j*j));m=Math.max(I,m)}var D=function(R,Y){var G=r.startAngle+Y*b*(c?1:-1),U=m*Math.cos(G),z=m*Math.sin(G),Q={x:d.x+U,y:d.y+z};return Q};return s.nodes().layoutPositions(this,r,D),this};var Mfe={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};function pB(t){this.options=fn({},Mfe,t)}pB.prototype.run=function(){for(var t=this.options,r=t,a=r.counterclockwise!==void 0?!r.counterclockwise:r.clockwise,s=t.cy,c=r.eles,f=c.nodes().not(":parent"),h=Qo(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:s.width(),h:s.height()}),d={x:h.x1+h.w/2,y:h.y1+h.h/2},p=[],b=0,m=0;m<f.length;m++){var w=f[m],k=void 0;k=r.concentric(w),p.push({value:k,node:w}),w._private.scratch.concentric=k}f.updateStyle();for(var P=0;P<f.length;P++){var S=f[P],M=S.layoutDimensions(r);b=Math.max(b,M.w,M.h)}p.sort(function(nt,ft){return ft.value-nt.value});for(var L=r.levelWidth(f),T=[[]],j=T[0],I=0;I<p.length;I++){var D=p[I];if(j.length>0){var R=Math.abs(j[0].value-D.value);R>=L&&(j=[],T.push(j))}j.push(D)}var Y=b+r.minNodeSpacing;if(!r.avoidOverlap){var G=T.length>0&&T[0].length>1,U=Math.min(h.w,h.h)/2-Y,z=U/(T.length+G?1:0);Y=Math.min(Y,z)}for(var Q=0,$=0;$<T.length;$++){var Z=T[$],X=r.sweep===void 0?2*Math.PI-2*Math.PI/Z.length:r.sweep,K=Z.dTheta=X/Math.max(1,Z.length-1);if(Z.length>1&&r.avoidOverlap){var ae=Math.cos(K)-Math.cos(0),se=Math.sin(K)-Math.sin(0),le=Math.sqrt(Y*Y/(ae*ae+se*se));Q=Math.max(le,Q)}Z.r=Q,Q+=Y}if(r.equidistant){for(var he=0,fe=0,pe=0;pe<T.length;pe++){var me=T[pe],Te=me.r-fe;he=Math.max(he,Te)}fe=0;for(var Le=0;Le<T.length;Le++){var ge=T[Le];Le===0&&(fe=ge.r),ge.r=fe,fe+=he}}for(var xe={},Se=0;Se<T.length;Se++)for(var Ie=T[Se],Re=Ie.dTheta,Ne=Ie.r,Me=0;Me<Ie.length;Me++){var ke=Ie[Me],Ge=r.startAngle+(a?1:-1)*Re*Me,Qe={x:d.x+Ne*Math.cos(Ge),y:d.y+Ne*Math.sin(Ge)};xe[ke.node.id()]=Qe}return c.nodes().layoutPositions(this,r,function(nt){var ft=nt.id();return xe[ft]}),this};var TP,jfe={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(t,r){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(t){return 2048},nodeOverlap:4,idealEdgeLength:function(t){return 32},edgeElasticity:function(t){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function Sw(t){this.options=fn({},jfe,t),this.options.layout=this;var r=this.options.eles.nodes(),a=this.options.eles.edges(),s=a.filter(function(c){var f=c.source().data("id"),h=c.target().data("id"),d=r.some(function(b){return b.data("id")===f}),p=r.some(function(b){return b.data("id")===h});return!d||!p});this.options.eles=this.options.eles.not(s)}Sw.prototype.run=function(){var t=this.options,r=t.cy,a=this;a.stopped=!1,(t.animate===!0||t.animate===!1)&&a.emit({type:"layoutstart",layout:a}),t.debug===!0?TP=!0:TP=!1;var s=Afe(r,a,t);TP&&Lfe(s),t.randomize&&Ofe(s);var c=Xl(),f=function(){Dfe(s,r,t),t.fit===!0&&r.fit(t.padding)},h=function(w){return!(a.stopped||w>=t.numIter||(Bfe(s,t),s.temperature=s.temperature*t.coolingFactor,s.temperature<t.minTemp))},d=function(){if(t.animate===!0||t.animate===!1)f(),a.one("layoutstop",t.stop),a.emit({type:"layoutstop",layout:a});else{var w=t.eles.nodes(),k=bB(s,t,w);w.layoutPositions(a,t,k)}},p=0,b=!0;if(t.animate===!0){var m=function(){for(var w=0;b&&w<t.refresh;)b=h(p),p++,w++;if(!b)mB(s,t),d();else{var k=Xl();k-c>=t.animationThreshold&&f(),Vm(m)}};m()}else{for(;b;)b=h(p),p++;mB(s,t),d()}return this},Sw.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Sw.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Afe=function(t,r,a){for(var s=a.eles.edges(),c=a.eles.nodes(),f=Qo(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),h={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:c.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:s.size(),temperature:a.initialTemp,clientWidth:f.w,clientHeight:f.h,boundingBox:f},d=a.eles.components(),p={},b=0;b<d.length;b++)for(var m=d[b],w=0;w<m.length;w++){var k=m[w];p[k.id()]=b}for(var b=0;b<h.nodeSize;b++){var P=c[b],S=P.layoutDimensions(a),M={};M.isLocked=P.locked(),M.id=P.data("id"),M.parentId=P.data("parent"),M.cmptId=p[P.id()],M.children=[],M.positionX=P.position("x"),M.positionY=P.position("y"),M.offsetX=0,M.offsetY=0,M.height=S.w,M.width=S.h,M.maxX=M.positionX+M.width/2,M.minX=M.positionX-M.width/2,M.maxY=M.positionY+M.height/2,M.minY=M.positionY-M.height/2,M.padLeft=parseFloat(P.style("padding")),M.padRight=parseFloat(P.style("padding")),M.padTop=parseFloat(P.style("padding")),M.padBottom=parseFloat(P.style("padding")),M.nodeRepulsion=Di(a.nodeRepulsion)?a.nodeRepulsion(P):a.nodeRepulsion,h.layoutNodes.push(M),h.idToIndex[M.id]=b}for(var L=[],T=0,j=-1,I=[],b=0;b<h.nodeSize;b++){var P=h.layoutNodes[b],D=P.parentId;D!=null?h.layoutNodes[h.idToIndex[D]].children.push(P.id):(L[++j]=P.id,I.push(P.id))}for(h.graphSet.push(I);T<=j;){var R=L[T++],Y=h.idToIndex[R],k=h.layoutNodes[Y],G=k.children;if(G.length>0){h.graphSet.push(G);for(var b=0;b<G.length;b++)L[++j]=G[b]}}for(var b=0;b<h.graphSet.length;b++)for(var U=h.graphSet[b],w=0;w<U.length;w++){var z=h.idToIndex[U[w]];h.indexToGraph[z]=b}for(var b=0;b<h.edgeSize;b++){var Q=s[b],$={};$.id=Q.data("id"),$.sourceId=Q.data("source"),$.targetId=Q.data("target");var Z=Di(a.idealEdgeLength)?a.idealEdgeLength(Q):a.idealEdgeLength,X=Di(a.edgeElasticity)?a.edgeElasticity(Q):a.edgeElasticity,K=h.idToIndex[$.sourceId],ae=h.idToIndex[$.targetId],se=h.indexToGraph[K],le=h.indexToGraph[ae];if(se!=le){for(var he=Ife($.sourceId,$.targetId,h),fe=h.graphSet[he],pe=0,M=h.layoutNodes[K];fe.indexOf(M.id)===-1;)M=h.layoutNodes[h.idToIndex[M.parentId]],pe++;for(M=h.layoutNodes[ae];fe.indexOf(M.id)===-1;)M=h.layoutNodes[h.idToIndex[M.parentId]],pe++;Z*=pe*a.nestingFactor}$.idealLength=Z,$.elasticity=X,h.layoutEdges.push($)}return h},Ife=function(t,r,a){var s=gB(t,r,0,a);return 2>s.count?0:s.graph},gB=function(t,r,a,s){var c=s.graphSet[a];if(-1<c.indexOf(t)&&-1<c.indexOf(r))return{count:2,graph:a};for(var f=0,h=0;h<c.length;h++){var d=c[h],p=s.idToIndex[d],b=s.layoutNodes[p].children;if(b.length!==0){var m=s.indexToGraph[s.idToIndex[b[0]]],w=gB(t,r,m,s);if(w.count!==0)if(w.count===1){if(f++,f===2)break}else return w}}return{count:f,graph:a}},Lfe,Ofe=function(t,r){for(var a=t.clientWidth,s=t.clientHeight,c=0;c<t.nodeSize;c++){var f=t.layoutNodes[c];f.children.length===0&&!f.isLocked&&(f.positionX=Math.random()*a,f.positionY=Math.random()*s)}},bB=function(t,r,a){var s=t.boundingBox,c={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return r.boundingBox&&(a.forEach(function(f){var h=t.layoutNodes[t.idToIndex[f.data("id")]];c.x1=Math.min(c.x1,h.positionX),c.x2=Math.max(c.x2,h.positionX),c.y1=Math.min(c.y1,h.positionY),c.y2=Math.max(c.y2,h.positionY)}),c.w=c.x2-c.x1,c.h=c.y2-c.y1),function(f,h){var d=t.layoutNodes[t.idToIndex[f.data("id")]];if(r.boundingBox){var p=c.w===0?.5:(d.positionX-c.x1)/c.w,b=c.h===0?.5:(d.positionY-c.y1)/c.h;return{x:s.x1+p*s.w,y:s.y1+b*s.h}}else return{x:d.positionX,y:d.positionY}}},Dfe=function(t,r,a){var s=a.layout,c=a.eles.nodes(),f=bB(t,a,c);c.positions(f),t.ready!==!0&&(t.ready=!0,s.one("layoutready",a.ready),s.emit({type:"layoutready",layout:this}))},Bfe=function(t,r,a){Rfe(t,r),zfe(t),Ufe(t,r),Ffe(t),Yfe(t)},Rfe=function(t,r){for(var a=0;a<t.graphSet.length;a++)for(var s=t.graphSet[a],c=s.length,f=0;f<c;f++)for(var h=t.layoutNodes[t.idToIndex[s[f]]],d=f+1;d<c;d++){var p=t.layoutNodes[t.idToIndex[s[d]]];Gfe(h,p,t,r)}},vB=function(t){return-1+2*t*Math.random()},Gfe=function(t,r,a,s){var c=t.cmptId,f=r.cmptId;if(!(c!==f&&!a.isCompound)){var h=r.positionX-t.positionX,d=r.positionY-t.positionY,p=1;h===0&&d===0&&(h=vB(p),d=vB(p));var b=Hfe(t,r,h,d);if(b>0)var L=s.nodeOverlap*b,M=Math.sqrt(h*h+d*d),T=L*h/M,j=L*d/M;else var m=Nw(t,h,d),w=Nw(r,-1*h,-1*d),k=w.x-m.x,P=w.y-m.y,S=k*k+P*P,M=Math.sqrt(S),L=(t.nodeRepulsion+r.nodeRepulsion)/S,T=L*k/M,j=L*P/M;t.isLocked||(t.offsetX-=T,t.offsetY-=j),r.isLocked||(r.offsetX+=T,r.offsetY+=j)}},Hfe=function(t,r,a,s){if(a>0)var c=t.maxX-r.minX;else var c=r.maxX-t.minX;if(s>0)var f=t.maxY-r.minY;else var f=r.maxY-t.minY;return c>=0&&f>=0?Math.sqrt(c*c+f*f):0},Nw=function(t,r,a){var s=t.positionX,c=t.positionY,f=t.height||1,h=t.width||1,d=a/r,p=f/h,b={};return r===0&&0<a||r===0&&0>a?(b.x=s,b.y=c+f/2,b):0<r&&-1*p<=d&&d<=p?(b.x=s+h/2,b.y=c+h*a/2/r,b):0>r&&-1*p<=d&&d<=p?(b.x=s-h/2,b.y=c-h*a/2/r,b):0<a&&(d<=-1*p||d>=p)?(b.x=s+f*r/2/a,b.y=c+f/2,b):(0>a&&(d<=-1*p||d>=p)&&(b.x=s-f*r/2/a,b.y=c-f/2),b)},zfe=function(t,r){for(var a=0;a<t.edgeSize;a++){var s=t.layoutEdges[a],c=t.idToIndex[s.sourceId],f=t.layoutNodes[c],h=t.idToIndex[s.targetId],d=t.layoutNodes[h],p=d.positionX-f.positionX,b=d.positionY-f.positionY;if(!(p===0&&b===0)){var m=Nw(f,p,b),w=Nw(d,-1*p,-1*b),k=w.x-m.x,P=w.y-m.y,S=Math.sqrt(k*k+P*P),M=Math.pow(s.idealLength-S,2)/s.elasticity;if(S!==0)var L=M*k/S,T=M*P/S;else var L=0,T=0;f.isLocked||(f.offsetX+=L,f.offsetY+=T),d.isLocked||(d.offsetX-=L,d.offsetY-=T)}}},Ufe=function(t,r){if(r.gravity!==0)for(var a=1,s=0;s<t.graphSet.length;s++){var c=t.graphSet[s],f=c.length;if(s===0)var p=t.clientHeight/2,b=t.clientWidth/2;else var h=t.layoutNodes[t.idToIndex[c[0]]],d=t.layoutNodes[t.idToIndex[h.parentId]],p=d.positionX,b=d.positionY;for(var m=0;m<f;m++){var w=t.layoutNodes[t.idToIndex[c[m]]];if(!w.isLocked){var k=p-w.positionX,P=b-w.positionY,S=Math.sqrt(k*k+P*P);if(S>a){var M=r.gravity*k/S,L=r.gravity*P/S;w.offsetX+=M,w.offsetY+=L}}}}},Ffe=function(t,r){var a=[],s=0,c=-1;for(a.push.apply(a,t.graphSet[0]),c+=t.graphSet[0].length;s<=c;){var f=a[s++],h=t.idToIndex[f],d=t.layoutNodes[h],p=d.children;if(0<p.length&&!d.isLocked){for(var b=d.offsetX,m=d.offsetY,w=0;w<p.length;w++){var k=t.layoutNodes[t.idToIndex[p[w]]];k.offsetX+=b,k.offsetY+=m,a[++c]=p[w]}d.offsetX=0,d.offsetY=0}}},Yfe=function(t,r){for(var a=0;a<t.nodeSize;a++){var s=t.layoutNodes[a];0<s.children.length&&(s.maxX=void 0,s.minX=void 0,s.maxY=void 0,s.minY=void 0)}for(var a=0;a<t.nodeSize;a++){var s=t.layoutNodes[a];if(!(0<s.children.length||s.isLocked)){var c=Vfe(s.offsetX,s.offsetY,t.temperature);s.positionX+=c.x,s.positionY+=c.y,s.offsetX=0,s.offsetY=0,s.minX=s.positionX-s.width,s.maxX=s.positionX+s.width,s.minY=s.positionY-s.height,s.maxY=s.positionY+s.height,yB(s,t)}}for(var a=0;a<t.nodeSize;a++){var s=t.layoutNodes[a];0<s.children.length&&!s.isLocked&&(s.positionX=(s.maxX+s.minX)/2,s.positionY=(s.maxY+s.minY)/2,s.width=s.maxX-s.minX,s.height=s.maxY-s.minY)}},Vfe=function(t,r,a){var s=Math.sqrt(t*t+r*r);if(s>a)var c={x:a*t/s,y:a*r/s};else var c={x:t,y:r};return c},yB=function(t,r){var a=t.parentId;if(a!=null){var s=r.layoutNodes[r.idToIndex[a]],c=!1;if((s.maxX==null||t.maxX+s.padRight>s.maxX)&&(s.maxX=t.maxX+s.padRight,c=!0),(s.minX==null||t.minX-s.padLeft<s.minX)&&(s.minX=t.minX-s.padLeft,c=!0),(s.maxY==null||t.maxY+s.padBottom>s.maxY)&&(s.maxY=t.maxY+s.padBottom,c=!0),(s.minY==null||t.minY-s.padTop<s.minY)&&(s.minY=t.minY-s.padTop,c=!0),c)return yB(s,r)}},mB=function(t,r){for(var a=t.layoutNodes,s=[],c=0;c<a.length;c++){var f=a[c],h=f.cmptId,d=s[h]=s[h]||[];d.push(f)}for(var p=0,c=0;c<s.length;c++){var b=s[c];if(b){b.x1=1/0,b.x2=-1/0,b.y1=1/0,b.y2=-1/0;for(var m=0;m<b.length;m++){var w=b[m];b.x1=Math.min(b.x1,w.positionX-w.width/2),b.x2=Math.max(b.x2,w.positionX+w.width/2),b.y1=Math.min(b.y1,w.positionY-w.height/2),b.y2=Math.max(b.y2,w.positionY+w.height/2)}b.w=b.x2-b.x1,b.h=b.y2-b.y1,p+=b.w*b.h}}s.sort(function(T,j){return j.w*j.h-T.w*T.h});for(var k=0,P=0,S=0,M=0,L=Math.sqrt(p)*t.clientWidth/t.clientHeight,c=0;c<s.length;c++){var b=s[c];if(b){for(var m=0;m<b.length;m++){var w=b[m];w.isLocked||(w.positionX+=k-b.x1,w.positionY+=P-b.y1)}k+=b.w+r.componentSpacing,S+=b.w+r.componentSpacing,M=Math.max(M,b.h),S>L&&(P+=M+r.componentSpacing,k=0,S=0,M=0)}}},qfe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};function wB(t){this.options=fn({},qfe,t)}wB.prototype.run=function(){var t=this.options,r=t,a=t.cy,s=r.eles,c=s.nodes().not(":parent");r.sort&&(c=c.sort(r.sort));var f=Qo(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()});if(f.h===0||f.w===0)s.nodes().layoutPositions(this,r,function(Le){return{x:f.x1,y:f.y1}});else{var h=c.size(),d=Math.sqrt(h*f.h/f.w),p=Math.round(d),b=Math.round(f.w/f.h*d),m=function(Le){if(Le==null)return Math.min(p,b);var ge=Math.min(p,b);ge==p?p=Le:b=Le},w=function(Le){if(Le==null)return Math.max(p,b);var ge=Math.max(p,b);ge==p?p=Le:b=Le},k=r.rows,P=r.cols!=null?r.cols:r.columns;if(k!=null&&P!=null)p=k,b=P;else if(k!=null&&P==null)p=k,b=Math.ceil(h/p);else if(k==null&&P!=null)b=P,p=Math.ceil(h/b);else if(b*p>h){var S=m(),M=w();(S-1)*M>=h?m(S-1):(M-1)*S>=h&&w(M-1)}else for(;b*p<h;){var L=m(),T=w();(T+1)*L>=h?w(T+1):m(L+1)}var j=f.w/b,I=f.h/p;if(r.condense&&(j=0,I=0),r.avoidOverlap)for(var D=0;D<c.length;D++){var R=c[D],Y=R._private.position;(Y.x==null||Y.y==null)&&(Y.x=0,Y.y=0);var G=R.layoutDimensions(r),U=r.avoidOverlapPadding,z=G.w+U,Q=G.h+U;j=Math.max(j,z),I=Math.max(I,Q)}for(var $={},Z=function(Le,ge){return!!$["c-"+Le+"-"+ge]},X=function(Le,ge){$["c-"+Le+"-"+ge]=!0},K=0,ae=0,se=function(){ae++,ae>=b&&(ae=0,K++)},le={},he=0;he<c.length;he++){var fe=c[he],pe=r.position(fe);if(pe&&(pe.row!==void 0||pe.col!==void 0)){var me={row:pe.row,col:pe.col};if(me.col===void 0)for(me.col=0;Z(me.row,me.col);)me.col++;else if(me.row===void 0)for(me.row=0;Z(me.row,me.col);)me.row++;le[fe.id()]=me,X(me.row,me.col)}}var Te=function(Le,ge){var xe,Se;if(Le.locked()||Le.isParent())return!1;var Ie=le[Le.id()];if(Ie)xe=Ie.col*j+j/2+f.x1,Se=Ie.row*I+I/2+f.y1;else{for(;Z(K,ae);)se();xe=ae*j+j/2+f.x1,Se=K*I+I/2+f.y1,X(K,ae),se()}return{x:xe,y:Se}};c.layoutPositions(this,r,Te)}return this};var Zfe={ready:function(){},stop:function(){}};function MP(t){this.options=fn({},Zfe,t)}MP.prototype.run=function(){var t=this.options,r=t.eles,a=this;return t.cy,a.emit("layoutstart"),r.nodes().positions(function(){return{x:0,y:0}}),a.one("layoutready",t.ready),a.emit("layoutready"),a.one("layoutstop",t.stop),a.emit("layoutstop"),this},MP.prototype.stop=function(){return this};var $fe={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};function xB(t){this.options=fn({},$fe,t)}xB.prototype.run=function(){var t=this.options,r=t.eles,a=r.nodes(),s=Di(t.positions);function c(f){if(t.positions==null)return bue(f.position());if(s)return t.positions(f);var h=t.positions[f._private.data.id];return h??null}return a.layoutPositions(this,t,function(f,h){var d=c(f);return f.locked()||d==null?!1:d}),this};var Kfe={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};function kB(t){this.options=fn({},Kfe,t)}kB.prototype.run=function(){var t=this.options,r=t.cy,a=t.eles,s=Qo(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),c=function(f,h){return{x:s.x1+Math.round(Math.random()*s.w),y:s.y1+Math.round(Math.random()*s.h)}};return a.nodes().layoutPositions(this,t,c),this};var Qfe=[{name:"breadthfirst",impl:hB},{name:"circle",impl:dB},{name:"concentric",impl:pB},{name:"cose",impl:Sw},{name:"grid",impl:wB},{name:"null",impl:MP},{name:"preset",impl:xB},{name:"random",impl:kB}];function _B(t){this.options=t,this.notifications=0}var EB=function(){},CB=function(){throw new Error("A headless instance can not render images")};_B.prototype={recalculateRenderedStyle:EB,notify:function(){this.notifications++},init:EB,isHeadless:function(){return!0},png:CB,jpg:CB};var jP={};jP.arrowShapeWidth=.3,jP.registerArrowShapes=function(){var t=this.arrowShapes={},r=this,a=function(p,b,m,w,k,P,S){var M=k.x-m/2-S,L=k.x+m/2+S,T=k.y-m/2-S,j=k.y+m/2+S,I=M<=p&&p<=L&&T<=b&&b<=j;return I},s=function(p,b,m,w,k){var P=p*Math.cos(w)-b*Math.sin(w),S=p*Math.sin(w)+b*Math.cos(w),M=P*m,L=S*m,T=M+k.x,j=L+k.y;return{x:T,y:j}},c=function(p,b,m,w){for(var k=[],P=0;P<p.length;P+=2){var S=p[P],M=p[P+1];k.push(s(S,M,b,m,w))}return k},f=function(p){for(var b=[],m=0;m<p.length;m++){var w=p[m];b.push(w.x,w.y)}return b},h=function(p){return p.pstyle("width").pfValue*p.pstyle("arrow-scale").pfValue*2},d=function(p,b){nn(b)&&(b=t[b]),t[p]=fn({name:p,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(m,w,k,P,S,M){var L=f(c(this.points,k+2*M,P,S)),T=Ms(m,w,L);return T},roughCollide:a,draw:function(m,w,k,P){var S=c(this.points,w,k,P);r.arrowShapeImpl("polygon")(m,S)},spacing:function(m){return 0},gap:h},b)};d("none",{collide:Zm,roughCollide:Zm,draw:JC,spacing:G8,gap:G8}),d("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),d("arrow","triangle"),d("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:a,draw:function(p,b,m,w,k){var P=c(this.points,b,m,w),S=this.controlPoint,M=s(S[0],S[1],b,m,w);r.arrowShapeImpl(this.name)(p,P,M)},gap:function(p){return h(p)*.8}}),d("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(p,b,m,w,k,P,S){var M=f(c(this.points,m+2*S,w,k)),L=f(c(this.pointsTee,m+2*S,w,k)),T=Ms(p,b,M)||Ms(p,b,L);return T},draw:function(p,b,m,w,k){var P=c(this.points,b,m,w),S=c(this.pointsTee,b,m,w);r.arrowShapeImpl(this.name)(p,P,S)}}),d("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(p,b,m,w,k,P,S){var M=k,L=Math.pow(M.x-p,2)+Math.pow(M.y-b,2)<=Math.pow((m+2*S)*this.radius,2),T=f(c(this.points,m+2*S,w,k));return Ms(p,b,T)||L},draw:function(p,b,m,w,k){var P=c(this.pointsTr,b,m,w);r.arrowShapeImpl(this.name)(p,P,w.x,w.y,this.radius*b)},spacing:function(p){return r.getArrowWidth(p.pstyle("width").pfValue,p.pstyle("arrow-scale").value)*this.radius}}),d("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(p,b){var m=this.baseCrossLinePts.slice(),w=b/p,k=3,P=5;return m[k]=m[k]-w,m[P]=m[P]-w,m},collide:function(p,b,m,w,k,P,S){var M=f(c(this.points,m+2*S,w,k)),L=f(c(this.crossLinePts(m,P),m+2*S,w,k)),T=Ms(p,b,M)||Ms(p,b,L);return T},draw:function(p,b,m,w,k){var P=c(this.points,b,m,w),S=c(this.crossLinePts(b,k),b,m,w);r.arrowShapeImpl(this.name)(p,P,S)}}),d("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(p){return h(p)*.525}}),d("circle",{radius:.15,collide:function(p,b,m,w,k,P,S){var M=k,L=Math.pow(M.x-p,2)+Math.pow(M.y-b,2)<=Math.pow((m+2*S)*this.radius,2);return L},draw:function(p,b,m,w,k){r.arrowShapeImpl(this.name)(p,w.x,w.y,this.radius*b)},spacing:function(p){return r.getArrowWidth(p.pstyle("width").pfValue,p.pstyle("arrow-scale").value)*this.radius}}),d("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(p){return 1},gap:function(p){return 1}}),d("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),d("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(p){return p.pstyle("width").pfValue*p.pstyle("arrow-scale").value}}),d("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(p){return .95*p.pstyle("width").pfValue*p.pstyle("arrow-scale").value}})};var Ud={};Ud.projectIntoViewport=function(t,r){var a=this.cy,s=this.findContainerClientCoords(),c=s[0],f=s[1],h=s[4],d=a.pan(),p=a.zoom(),b=((t-c)/h-d.x)/p,m=((r-f)/h-d.y)/p;return[b,m]},Ud.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var t=this.container,r=t.getBoundingClientRect(),a=this.cy.window().getComputedStyle(t),s=function(L){return parseFloat(a.getPropertyValue(L))},c={left:s("padding-left"),right:s("padding-right"),top:s("padding-top"),bottom:s("padding-bottom")},f={left:s("border-left-width"),right:s("border-right-width"),top:s("border-top-width"),bottom:s("border-bottom-width")},h=t.clientWidth,d=t.clientHeight,p=c.left+c.right,b=c.top+c.bottom,m=f.left+f.right,w=r.width/(h+m),k=h-p,P=d-b,S=r.left+c.left+f.left,M=r.top+c.top+f.top;return this.containerBB=[S,M,k,P,w]},Ud.invalidateContainerClientCoordsCache=function(){this.containerBB=null},Ud.findNearestElement=function(t,r,a,s){return this.findNearestElements(t,r,a,s)[0]},Ud.findNearestElements=function(t,r,a,s){var c=this,f=this,h=f.getCachedZSortedEles(),d=[],p=f.cy.zoom(),b=f.cy.hasCompoundNodes(),m=(s?24:8)/p,w=(s?8:2)/p,k=(s?8:2)/p,P=1/0,S,M;a&&(h=h.interactive);function L(G,U){if(G.isNode()){if(M)return;M=G,d.push(G)}if(G.isEdge()&&(U==null||U<P))if(S){if(S.pstyle("z-compound-depth").value===G.pstyle("z-compound-depth").value&&S.pstyle("z-compound-depth").value===G.pstyle("z-compound-depth").value){for(var z=0;z<d.length;z++)if(d[z].isEdge()){d[z]=G,S=G,P=U??P;break}}}else d.push(G),S=G,P=U??P}function T(G){var U=G.outerWidth()+2*w,z=G.outerHeight()+2*w,Q=U/2,$=z/2,Z=G.position(),X=G.pstyle("corner-radius").value==="auto"?"auto":G.pstyle("corner-radius").pfValue,K=G._private.rscratch;if(Z.x-Q<=t&&t<=Z.x+Q&&Z.y-$<=r&&r<=Z.y+$){var ae=f.nodeShapes[c.getNodeShape(G)];if(ae.checkPoint(t,r,0,U,z,Z.x,Z.y,X,K))return L(G,0),!0}}function j(G){var U=G._private,z=U.rscratch,Q=G.pstyle("width").pfValue,$=G.pstyle("arrow-scale").value,Z=Q/2+m,X=Z*Z,K=Z*2,ae=U.source,se=U.target,le;if(z.edgeType==="segments"||z.edgeType==="straight"||z.edgeType==="haystack"){for(var he=z.allpts,fe=0;fe+3<he.length;fe+=2)if(Mue(t,r,he[fe],he[fe+1],he[fe+2],he[fe+3],K)&&X>(le=Oue(t,r,he[fe],he[fe+1],he[fe+2],he[fe+3])))return L(G,le),!0}else if(z.edgeType==="bezier"||z.edgeType==="multibezier"||z.edgeType==="self"||z.edgeType==="compound"){for(var he=z.allpts,fe=0;fe+5<z.allpts.length;fe+=4)if(jue(t,r,he[fe],he[fe+1],he[fe+2],he[fe+3],he[fe+4],he[fe+5],K)&&X>(le=Lue(t,r,he[fe],he[fe+1],he[fe+2],he[fe+3],he[fe+4],he[fe+5])))return L(G,le),!0}for(var ae=ae||U.source,se=se||U.target,pe=c.getArrowWidth(Q,$),me=[{name:"source",x:z.arrowStartX,y:z.arrowStartY,angle:z.srcArrowAngle},{name:"target",x:z.arrowEndX,y:z.arrowEndY,angle:z.tgtArrowAngle},{name:"mid-source",x:z.midX,y:z.midY,angle:z.midsrcArrowAngle},{name:"mid-target",x:z.midX,y:z.midY,angle:z.midtgtArrowAngle}],fe=0;fe<me.length;fe++){var Te=me[fe],Le=f.arrowShapes[G.pstyle(Te.name+"-arrow-shape").value],ge=G.pstyle("width").pfValue;if(Le.roughCollide(t,r,pe,Te.angle,{x:Te.x,y:Te.y},ge,m)&&Le.collide(t,r,pe,Te.angle,{x:Te.x,y:Te.y},ge,m))return L(G),!0}b&&d.length>0&&(T(ae),T(se))}function I(G,U,z){return Ts(G,U,z)}function D(G,U){var z=G._private,Q=k,$;U?$=U+"-":$="",G.boundingBox();var Z=z.labelBounds[U||"main"],X=G.pstyle($+"label").value,K=G.pstyle("text-events").strValue==="yes";if(!(!K||!X)){var ae=I(z.rscratch,"labelX",U),se=I(z.rscratch,"labelY",U),le=I(z.rscratch,"labelAngle",U),he=G.pstyle($+"text-margin-x").pfValue,fe=G.pstyle($+"text-margin-y").pfValue,pe=Z.x1-Q-he,me=Z.x2+Q-he,Te=Z.y1-Q-fe,Le=Z.y2+Q-fe;if(le){var ge=Math.cos(le),xe=Math.sin(le),Se=function(Ge,Qe){return Ge=Ge-ae,Qe=Qe-se,{x:Ge*ge-Qe*xe+ae,y:Ge*xe+Qe*ge+se}},Ie=Se(pe,Te),Re=Se(pe,Le),Ne=Se(me,Te),Me=Se(me,Le),ke=[Ie.x+he,Ie.y+fe,Ne.x+he,Ne.y+fe,Me.x+he,Me.y+fe,Re.x+he,Re.y+fe];if(Ms(t,r,ke))return L(G),!0}else if(fh(Z,t,r))return L(G),!0}}for(var R=h.length-1;R>=0;R--){var Y=h[R];Y.isNode()?T(Y)||D(Y):j(Y)||D(Y)||D(Y,"source")||D(Y,"target")}return d},Ud.getAllInBox=function(t,r,a,s){var c=this.getCachedZSortedEles().interactive,f=this.cy.zoom(),h=2/f,d=[],p=Math.min(t,a),b=Math.max(t,a),m=Math.min(r,s),w=Math.max(r,s);t=p,a=b,r=m,s=w;var k=Qo({x1:t,y1:r,x2:a,y2:s}),P=[{x:k.x1,y:k.y1},{x:k.x2,y:k.y1},{x:k.x2,y:k.y2},{x:k.x1,y:k.y2}],S=[[P[0],P[1]],[P[1],P[2]],[P[2],P[3]],[P[3],P[0]]];function M(Qe,nt,ft){return Ts(Qe,nt,ft)}function L(Qe,nt){var ft=Qe._private,Ue=h,Ze="";Qe.boundingBox();var mt=ft.labelBounds.main;if(!mt)return null;var st=M(ft.rscratch,"labelX",nt),Ot=M(ft.rscratch,"labelY",nt),At=M(ft.rscratch,"labelAngle",nt),Rt=Qe.pstyle(Ze+"text-margin-x").pfValue,zt=Qe.pstyle(Ze+"text-margin-y").pfValue,mn=mt.x1-Ue-Rt,sn=mt.x2+Ue-Rt,or=mt.y1-Ue-zt,H=mt.y2+Ue-zt;if(At){var ne=Math.cos(At),ue=Math.sin(At),we=function(je,ie){return je=je-st,ie=ie-Ot,{x:je*ne-ie*ue+st,y:je*ue+ie*ne+Ot}};return[we(mn,or),we(sn,or),we(sn,H),we(mn,H)]}else return[{x:mn,y:or},{x:sn,y:or},{x:sn,y:H},{x:mn,y:H}]}function T(Qe,nt,ft,Ue){function Ze(mt,st,Ot){return(Ot.y-mt.y)*(st.x-mt.x)>(st.y-mt.y)*(Ot.x-mt.x)}return Ze(Qe,ft,Ue)!==Ze(nt,ft,Ue)&&Ze(Qe,nt,ft)!==Ze(Qe,nt,Ue)}for(var j=0;j<c.length;j++){var I=c[j];if(I.isNode()){var D=I,R=D.pstyle("text-events").strValue==="yes",Y=D.pstyle("box-selection").strValue,G=D.pstyle("box-select-labels").strValue==="yes";if(Y==="none")continue;var U=(Y==="overlap"||G)&&R,z=D.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:U});if(Y==="contain"){var Q=!1;if(G&&R){var $=L(D);$&&l3($,P)&&(d.push(D),Q=!0)}!Q&&W8(k,z)&&d.push(D)}else if(Y==="overlap"&&a3(k,z)){var Z=D.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1}),X=[{x:Z.x1,y:Z.y1},{x:Z.x2,y:Z.y1},{x:Z.x2,y:Z.y2},{x:Z.x1,y:Z.y2}];if(l3(X,P))d.push(D);else{var K=L(D);K&&l3(K,P)&&d.push(D)}}}else{var ae=I,se=ae._private,le=se.rscratch,he=ae.pstyle("box-selection").strValue;if(he==="none")continue;if(he==="contain"){if(le.startX!=null&&le.startY!=null&&!fh(k,le.startX,le.startY)||le.endX!=null&&le.endY!=null&&!fh(k,le.endX,le.endY))continue;if(le.edgeType==="bezier"||le.edgeType==="multibezier"||le.edgeType==="self"||le.edgeType==="compound"||le.edgeType==="segments"||le.edgeType==="haystack"){for(var fe=se.rstyle.bezierPts||se.rstyle.linePts||se.rstyle.haystackPts,pe=!0,me=0;me<fe.length;me++)if(!Q8(k,fe[me])){pe=!1;break}pe&&d.push(ae)}else le.edgeType==="straight"&&d.push(ae)}else if(he==="overlap"){var Te=!1;if(le.startX!=null&&le.startY!=null&&le.endX!=null&&le.endY!=null&&(fh(k,le.startX,le.startY)||fh(k,le.endX,le.endY)))d.push(ae),Te=!0;else if(!Te&&le.edgeType==="haystack"){for(var Le=se.rstyle.haystackPts,ge=0;ge<Le.length;ge++)if(Q8(k,Le[ge])){d.push(ae),Te=!0;break}}if(!Te){var xe=se.rstyle.bezierPts||se.rstyle.linePts||se.rstyle.haystackPts;if((!xe||xe.length<2)&&le.edgeType==="straight"&&le.startX!=null&&le.startY!=null&&le.endX!=null&&le.endY!=null&&(xe=[{x:le.startX,y:le.startY},{x:le.endX,y:le.endY}]),!xe||xe.length<2)continue;for(var Se=0;Se<xe.length-1;Se++){for(var Ie=xe[Se],Re=xe[Se+1],Ne=0;Ne<S.length;Ne++){var Me=ma(S[Ne],2),ke=Me[0],Ge=Me[1];if(T(Ie,Re,ke,Ge)){d.push(ae),Te=!0;break}}if(Te)break}}}}}return d};var Tw={};Tw.calculateArrowAngles=function(t){var r=t._private.rscratch,a=r.edgeType==="haystack",s=r.edgeType==="bezier",c=r.edgeType==="multibezier",f=r.edgeType==="segments",h=r.edgeType==="compound",d=r.edgeType==="self",p,b,m,w,k,P,T,j;if(a?(m=r.haystackPts[0],w=r.haystackPts[1],k=r.haystackPts[2],P=r.haystackPts[3]):(m=r.arrowStartX,w=r.arrowStartY,k=r.arrowEndX,P=r.arrowEndY),T=r.midX,j=r.midY,f)p=m-r.segpts[0],b=w-r.segpts[1];else if(c||h||d||s){var S=r.allpts,M=Xa(S[0],S[2],S[4],.1),L=Xa(S[1],S[3],S[5],.1);p=m-M,b=w-L}else p=m-T,b=w-j;r.srcArrowAngle=Qm(p,b);var T=r.midX,j=r.midY;if(a&&(T=(m+k)/2,j=(w+P)/2),p=k-m,b=P-w,f){var S=r.allpts;if(S.length/2%2===0){var I=S.length/2,D=I-2;p=S[I]-S[D],b=S[I+1]-S[D+1]}else if(r.isRound)p=r.midVector[1],b=-r.midVector[0];else{var I=S.length/2-1,D=I-2;p=S[I]-S[D],b=S[I+1]-S[D+1]}}else if(c||h||d){var S=r.allpts,R=r.ctrlpts,Y,G,U,z;if(R.length/2%2===0){var Q=S.length/2-1,$=Q+2,Z=$+2;Y=Xa(S[Q],S[$],S[Z],0),G=Xa(S[Q+1],S[$+1],S[Z+1],0),U=Xa(S[Q],S[$],S[Z],1e-4),z=Xa(S[Q+1],S[$+1],S[Z+1],1e-4)}else{var $=S.length/2-1,Q=$-2,Z=$+2;Y=Xa(S[Q],S[$],S[Z],.4999),G=Xa(S[Q+1],S[$+1],S[Z+1],.4999),U=Xa(S[Q],S[$],S[Z],.5),z=Xa(S[Q+1],S[$+1],S[Z+1],.5)}p=U-Y,b=z-G}if(r.midtgtArrowAngle=Qm(p,b),r.midDispX=p,r.midDispY=b,p*=-1,b*=-1,f){var S=r.allpts;if(S.length/2%2!==0&&!r.isRound){var I=S.length/2-1,X=I+2;p=-(S[X]-S[I]),b=-(S[X+1]-S[I+1])}}if(r.midsrcArrowAngle=Qm(p,b),f)p=k-r.segpts[r.segpts.length-2],b=P-r.segpts[r.segpts.length-1];else if(c||h||d||s){var S=r.allpts,K=S.length,M=Xa(S[K-6],S[K-4],S[K-2],.9),L=Xa(S[K-5],S[K-3],S[K-1],.9);p=k-M,b=P-L}else p=k-T,b=P-j;r.tgtArrowAngle=Qm(p,b)},Tw.getArrowWidth=Tw.getArrowHeight=function(t,r){var a=this.arrowWidthCache=this.arrowWidthCache||{},s=a[t+", "+r];return s||(s=Math.max(Math.pow(t*13.37,.9),29)*r,a[t+", "+r]=s,s)};var AP,IP,Kc={},Eu={},PB,SB,Fd,Mw,rf,Yd,Vd,Qc,Dg,jw,NB,TB,LP,OP,MB,jB=function(t,r,a){a.x=r.x-t.x,a.y=r.y-t.y,a.len=Math.sqrt(a.x*a.x+a.y*a.y),a.nx=a.x/a.len,a.ny=a.y/a.len,a.ang=Math.atan2(a.ny,a.nx)},Wfe=function(t,r){r.x=t.x*-1,r.y=t.y*-1,r.nx=t.nx*-1,r.ny=t.ny*-1,r.ang=t.ang>0?-(Math.PI-t.ang):Math.PI+t.ang},Jfe=function(t,r,a,s,c){if(t!==MB?jB(r,t,Kc):Wfe(Eu,Kc),jB(r,a,Eu),PB=Kc.nx*Eu.ny-Kc.ny*Eu.nx,SB=Kc.nx*Eu.nx-Kc.ny*-Eu.ny,rf=Math.asin(Math.max(-1,Math.min(1,PB))),Math.abs(rf)<1e-6){AP=r.x,IP=r.y,Vd=Dg=0;return}Fd=1,Mw=!1,SB<0?rf<0?rf=Math.PI+rf:(rf=Math.PI-rf,Fd=-1,Mw=!0):rf>0&&(Fd=-1,Mw=!0),r.radius!==void 0?Dg=r.radius:Dg=s,Yd=rf/2,jw=Math.min(Kc.len/2,Eu.len/2),c?(Qc=Math.abs(Math.cos(Yd)*Dg/Math.sin(Yd)),Qc>jw?(Qc=jw,Vd=Math.abs(Qc*Math.sin(Yd)/Math.cos(Yd))):Vd=Dg):(Qc=Math.min(jw,Dg),Vd=Math.abs(Qc*Math.sin(Yd)/Math.cos(Yd))),LP=r.x+Eu.nx*Qc,OP=r.y+Eu.ny*Qc,AP=LP-Eu.ny*Vd*Fd,IP=OP+Eu.nx*Vd*Fd,NB=r.x+Kc.nx*Qc,TB=r.y+Kc.ny*Qc,MB=r};function AB(t,r){r.radius===0?t.lineTo(r.cx,r.cy):t.arc(r.cx,r.cy,r.radius,r.startAngle,r.endAngle,r.counterClockwise)}function DP(t,r,a,s){var c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return s===0||r.radius===0?{cx:r.x,cy:r.y,radius:0,startX:r.x,startY:r.y,stopX:r.x,stopY:r.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Jfe(t,r,a,s,c),{cx:AP,cy:IP,radius:Vd,startX:NB,startY:TB,stopX:LP,stopY:OP,startAngle:Kc.ang+Math.PI/2*Fd,endAngle:Eu.ang-Math.PI/2*Fd,counterClockwise:Mw})}var k0=.01,Xfe=Math.sqrt(2*k0),Do={};Do.findMidptPtsEtc=function(t,r){var a=r.posPts,s=r.intersectionPts,c=r.vectorNormInverse,f,h=t.pstyle("source-endpoint"),d=t.pstyle("target-endpoint"),p=h.units!=null&&d.units!=null,b=function(D,R,Y,G){var U=G-R,z=Y-D,Q=Math.sqrt(z*z+U*U);return{x:-U/Q,y:z/Q}},m=t.pstyle("edge-distances").value;switch(m){case"node-position":f=a;break;case"intersection":f=s;break;case"endpoints":{if(p){var w=this.manualEndptToPx(t.source()[0],h),k=ma(w,2),P=k[0],S=k[1],M=this.manualEndptToPx(t.target()[0],d),L=ma(M,2),T=L[0],j=L[1],I={x1:P,y1:S,x2:T,y2:j};c=b(P,S,T,j),f=I}else jr("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),f=s;break}}return{midptPts:f,vectorNormInverse:c}},Do.findHaystackPoints=function(t){for(var r=0;r<t.length;r++){var a=t[r],s=a._private,c=s.rscratch;if(!c.haystack){var f=Math.random()*2*Math.PI;c.source={x:Math.cos(f),y:Math.sin(f)},f=Math.random()*2*Math.PI,c.target={x:Math.cos(f),y:Math.sin(f)}}var h=s.source,d=s.target,p=h.position(),b=d.position(),m=h.width(),w=d.width(),k=h.height(),P=d.height(),S=a.pstyle("haystack-radius").value,M=S/2;c.haystackPts=c.allpts=[c.source.x*m*M+p.x,c.source.y*k*M+p.y,c.target.x*w*M+b.x,c.target.y*P*M+b.y],c.midX=(c.allpts[0]+c.allpts[2])/2,c.midY=(c.allpts[1]+c.allpts[3])/2,c.edgeType="haystack",c.haystack=!0,this.storeEdgeProjections(a),this.calculateArrowAngles(a),this.recalculateEdgeLabelProjections(a),this.calculateLabelAngles(a)}},Do.findSegmentsPoints=function(t,r){var a=t._private.rscratch,s=t.pstyle("segment-weights"),c=t.pstyle("segment-distances"),f=t.pstyle("segment-radii"),h=t.pstyle("radius-type"),d=Math.min(s.pfValue.length,c.pfValue.length),p=f.pfValue[f.pfValue.length-1],b=h.pfValue[h.pfValue.length-1];a.edgeType="segments",a.segpts=[],a.radii=[],a.isArcRadius=[];for(var m=0;m<d;m++){var w=s.pfValue[m],k=c.pfValue[m],P=1-w,S=w,M=this.findMidptPtsEtc(t,r),L=M.midptPts,T=M.vectorNormInverse,j={x:L.x1*P+L.x2*S,y:L.y1*P+L.y2*S};a.segpts.push(j.x+T.x*k,j.y+T.y*k),a.radii.push(f.pfValue[m]!==void 0?f.pfValue[m]:p),a.isArcRadius.push((h.pfValue[m]!==void 0?h.pfValue[m]:b)==="arc-radius")}},Do.findLoopPoints=function(t,r,a,s){var c=t._private.rscratch,f=r.dirCounts,h=r.srcPos,d=t.pstyle("control-point-distances"),p=d?d.pfValue[0]:void 0,b=t.pstyle("loop-direction").pfValue,m=t.pstyle("loop-sweep").pfValue,w=t.pstyle("control-point-step-size").pfValue;c.edgeType="self";var k=a,P=w;s&&(k=0,P=p);var S=b-Math.PI/2,M=S-m/2,L=S+m/2,T=b+"_"+m;k=f[T]===void 0?f[T]=0:++f[T],c.ctrlpts=[h.x+Math.cos(M)*1.4*P*(k/3+1),h.y+Math.sin(M)*1.4*P*(k/3+1),h.x+Math.cos(L)*1.4*P*(k/3+1),h.y+Math.sin(L)*1.4*P*(k/3+1)]},Do.findCompoundLoopPoints=function(t,r,a,s){var c=t._private.rscratch;c.edgeType="compound";var f=r.srcPos,h=r.tgtPos,d=r.srcW,p=r.srcH,b=r.tgtW,m=r.tgtH,w=t.pstyle("control-point-step-size").pfValue,k=t.pstyle("control-point-distances"),P=k?k.pfValue[0]:void 0,S=a,M=w;s&&(S=0,M=P);var L=50,T={x:f.x-d/2,y:f.y-p/2},j={x:h.x-b/2,y:h.y-m/2},I={x:Math.min(T.x,j.x),y:Math.min(T.y,j.y)},D=.5,R=Math.max(D,Math.log(d*k0)),Y=Math.max(D,Math.log(b*k0));c.ctrlpts=[I.x,I.y-(1+Math.pow(L,1.12)/100)*M*(S/3+1)*R,I.x-(1+Math.pow(L,1.12)/100)*M*(S/3+1)*Y,I.y]},Do.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"},Do.findBezierPoints=function(t,r,a,s,c){var f=t._private.rscratch,h=t.pstyle("control-point-step-size").pfValue,d=t.pstyle("control-point-distances"),p=t.pstyle("control-point-weights"),b=d&&p?Math.min(d.value.length,p.value.length):1,m=d?d.pfValue[0]:void 0,w=p.value[0],k=s;f.edgeType=k?"multibezier":"bezier",f.ctrlpts=[];for(var P=0;P<b;P++){var S=(.5-r.eles.length/2+a)*h*(c?-1:1),M=void 0,L=i3(S);k&&(m=d?d.pfValue[P]:h,w=p.value[P]),s?M=m:M=m!==void 0?L*m:void 0;var T=M!==void 0?M:S,j=1-w,I=w,D=this.findMidptPtsEtc(t,r),R=D.midptPts,Y=D.vectorNormInverse,G={x:R.x1*j+R.x2*I,y:R.y1*j+R.y2*I};f.ctrlpts.push(G.x+Y.x*T,G.y+Y.y*T)}},Do.findTaxiPoints=function(t,r){var a=t._private.rscratch;a.edgeType="segments";var s="vertical",c="horizontal",f="leftward",h="rightward",d="downward",p="upward",b="auto",m=r.posPts,w=r.srcW,k=r.srcH,P=r.tgtW,S=r.tgtH,M=t.pstyle("edge-distances").value,L=M!=="node-position",T=t.pstyle("taxi-direction").value,j=T,I=t.pstyle("taxi-turn"),D=I.units==="%",R=I.pfValue,Y=R<0,G=t.pstyle("taxi-turn-min-distance").pfValue,U=L?(w+P)/2:0,z=L?(k+S)/2:0,Q=m.x2-m.x1,$=m.y2-m.y1,Z=function(ie,Pe){return ie>0?Math.max(ie-Pe,0):Math.min(ie+Pe,0)},X=Z(Q,U),K=Z($,z),ae=!1;j===b?T=Math.abs(X)>Math.abs(K)?c:s:j===p||j===d?(T=s,ae=!0):(j===f||j===h)&&(T=c,ae=!0);var se=T===s,le=se?K:X,he=se?$:Q,fe=i3(he),pe=!1;!(ae&&(D||Y))&&(j===d&&he<0||j===p&&he>0||j===f&&he>0||j===h&&he<0)&&(fe*=-1,le=fe*Math.abs(le),pe=!0);var me;if(D){var Te=R<0?1+R:R;me=Te*le}else{var Le=R<0?le:0;me=Le+R*fe}var ge=function(ie){return Math.abs(ie)<G||Math.abs(ie)>=Math.abs(le)},xe=ge(me),Se=ge(Math.abs(le)-Math.abs(me)),Ie=xe||Se;if(Ie&&!pe)if(se){var Re=Math.abs(he)<=k/2,Ne=Math.abs(Q)<=P/2;if(Re){var Me=(m.x1+m.x2)/2,ke=m.y1,Ge=m.y2;a.segpts=[Me,ke,Me,Ge]}else if(Ne){var Qe=(m.y1+m.y2)/2,nt=m.x1,ft=m.x2;a.segpts=[nt,Qe,ft,Qe]}else a.segpts=[m.x1,m.y2]}else{var Ue=Math.abs(he)<=w/2,Ze=Math.abs($)<=S/2;if(Ue){var mt=(m.y1+m.y2)/2,st=m.x1,Ot=m.x2;a.segpts=[st,mt,Ot,mt]}else if(Ze){var At=(m.x1+m.x2)/2,Rt=m.y1,zt=m.y2;a.segpts=[At,Rt,At,zt]}else a.segpts=[m.x2,m.y1]}else if(se){var mn=m.y1+me+(L?k/2*fe:0),sn=m.x1,or=m.x2;a.segpts=[sn,mn,or,mn]}else{var H=m.x1+me+(L?w/2*fe:0),ne=m.y1,ue=m.y2;a.segpts=[H,ne,H,ue]}if(a.isRound){var we=t.pstyle("taxi-radius").value,je=t.pstyle("radius-type").value[0]==="arc-radius";a.radii=new Array(a.segpts.length/2).fill(we),a.isArcRadius=new Array(a.segpts.length/2).fill(je)}},Do.tryToCorrectInvalidPoints=function(t,r){var a=t._private.rscratch;if(a.edgeType==="bezier"){var s=r.srcPos,c=r.tgtPos,f=r.srcW,h=r.srcH,d=r.tgtW,p=r.tgtH,b=r.srcShape,m=r.tgtShape,w=r.srcCornerRadius,k=r.tgtCornerRadius,P=r.srcRs,S=r.tgtRs,M=!jt(a.startX)||!jt(a.startY),L=!jt(a.arrowStartX)||!jt(a.arrowStartY),T=!jt(a.endX)||!jt(a.endY),j=!jt(a.arrowEndX)||!jt(a.arrowEndY),I=3,D=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,R=I*D,Y=Bd({x:a.ctrlpts[0],y:a.ctrlpts[1]},{x:a.startX,y:a.startY}),G=Y<R,U=Bd({x:a.ctrlpts[0],y:a.ctrlpts[1]},{x:a.endX,y:a.endY}),z=U<R,Q=!1;if(M||L||G){Q=!0;var $={x:a.ctrlpts[0]-s.x,y:a.ctrlpts[1]-s.y},Z=Math.sqrt($.x*$.x+$.y*$.y),X={x:$.x/Z,y:$.y/Z},K=Math.max(f,h),ae={x:a.ctrlpts[0]+X.x*2*K,y:a.ctrlpts[1]+X.y*2*K},se=b.intersectLine(s.x,s.y,f,h,ae.x,ae.y,0,w,P);G?(a.ctrlpts[0]=a.ctrlpts[0]+X.x*(R-Y),a.ctrlpts[1]=a.ctrlpts[1]+X.y*(R-Y)):(a.ctrlpts[0]=se[0]+X.x*R,a.ctrlpts[1]=se[1]+X.y*R)}if(T||j||z){Q=!0;var le={x:a.ctrlpts[0]-c.x,y:a.ctrlpts[1]-c.y},he=Math.sqrt(le.x*le.x+le.y*le.y),fe={x:le.x/he,y:le.y/he},pe=Math.max(f,h),me={x:a.ctrlpts[0]+fe.x*2*pe,y:a.ctrlpts[1]+fe.y*2*pe},Te=m.intersectLine(c.x,c.y,d,p,me.x,me.y,0,k,S);z?(a.ctrlpts[0]=a.ctrlpts[0]+fe.x*(R-U),a.ctrlpts[1]=a.ctrlpts[1]+fe.y*(R-U)):(a.ctrlpts[0]=Te[0]+fe.x*R,a.ctrlpts[1]=Te[1]+fe.y*R)}Q&&this.findEndpoints(t)}},Do.storeAllpts=function(t){var r=t._private.rscratch;if(r.edgeType==="multibezier"||r.edgeType==="bezier"||r.edgeType==="self"||r.edgeType==="compound"){r.allpts=[],r.allpts.push(r.startX,r.startY);for(var a=0;a+1<r.ctrlpts.length;a+=2)r.allpts.push(r.ctrlpts[a],r.ctrlpts[a+1]),a+3<r.ctrlpts.length&&r.allpts.push((r.ctrlpts[a]+r.ctrlpts[a+2])/2,(r.ctrlpts[a+1]+r.ctrlpts[a+3])/2);r.allpts.push(r.endX,r.endY);var s,c;r.ctrlpts.length/2%2===0?(s=r.allpts.length/2-1,r.midX=r.allpts[s],r.midY=r.allpts[s+1]):(s=r.allpts.length/2-3,c=.5,r.midX=Xa(r.allpts[s],r.allpts[s+2],r.allpts[s+4],c),r.midY=Xa(r.allpts[s+1],r.allpts[s+3],r.allpts[s+5],c))}else if(r.edgeType==="straight")r.allpts=[r.startX,r.startY,r.endX,r.endY],r.midX=(r.startX+r.endX+r.arrowStartX+r.arrowEndX)/4,r.midY=(r.startY+r.endY+r.arrowStartY+r.arrowEndY)/4;else if(r.edgeType==="segments"){if(r.allpts=[],r.allpts.push(r.startX,r.startY),r.allpts.push.apply(r.allpts,r.segpts),r.allpts.push(r.endX,r.endY),r.isRound){r.roundCorners=[];for(var f=2;f+3<r.allpts.length;f+=2){var h=r.radii[f/2-1],d=r.isArcRadius[f/2-1];r.roundCorners.push(DP({x:r.allpts[f-2],y:r.allpts[f-1]},{x:r.allpts[f],y:r.allpts[f+1],radius:h},{x:r.allpts[f+2],y:r.allpts[f+3]},h,d))}}if(r.segpts.length%4===0){var p=r.segpts.length/2,b=p-2;r.midX=(r.segpts[b]+r.segpts[p])/2,r.midY=(r.segpts[b+1]+r.segpts[p+1])/2}else{var m=r.segpts.length/2-1;if(!r.isRound)r.midX=r.segpts[m],r.midY=r.segpts[m+1];else{var w={x:r.segpts[m],y:r.segpts[m+1]},k=r.roundCorners[m/2];if(k.radius===0){var P={x:r.segpts[m+2],y:r.segpts[m+3]};r.midX=w.x,r.midY=w.y,r.midVector=[w.y-P.y,P.x-w.x]}else{var S=[w.x-k.cx,w.y-k.cy],M=k.radius/Math.sqrt(Math.pow(S[0],2)+Math.pow(S[1],2));S=S.map(function(L){return L*M}),r.midX=k.cx+S[0],r.midY=k.cy+S[1],r.midVector=S}}}}},Do.checkForInvalidEdgeWarning=function(t){var r=t[0]._private.rscratch;r.nodesOverlap||jt(r.startX)&&jt(r.startY)&&jt(r.endX)&&jt(r.endY)?r.loggedErr=!1:r.loggedErr||(r.loggedErr=!0,jr("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},Do.findEdgeControlPoints=function(t){var r=this;if(!(!t||t.length===0)){for(var a=this,s=a.cy,c=s.hasCompoundNodes(),f=new tf,h=function(U,z){return[].concat(Hm(U),[z?1:0]).join("-")},d=[],p=[],b=0;b<t.length;b++){var m=t[b],w=m._private,k=m.pstyle("curve-style").value;if(!(m.removed()||!m.takesUpSpace())){if(k==="haystack"){p.push(m);continue}var P=k==="unbundled-bezier"||uh(k,"segments")||k==="straight"||k==="straight-triangle"||uh(k,"taxi"),S=k==="unbundled-bezier"||k==="bezier",M=w.source,L=w.target,T=M.poolIndex(),j=L.poolIndex(),I=[T,j].sort(),D=h(I,P),R=f.get(D);R==null&&(R={eles:[]},d.push({pairId:I,edgeIsUnbundled:P}),f.set(D,R)),R.eles.push(m),P&&(R.hasUnbundled=!0),S&&(R.hasBezier=!0)}}for(var Y=function(){var U=d[G],z=U.pairId,Q=U.edgeIsUnbundled,$=h(z,Q),Z=f.get($),X;if(!Z.hasUnbundled){var K=Z.eles[0].parallelEdges().filter(function(we){return we.isBundledBezier()});XC(Z.eles),K.forEach(function(we){return Z.eles.push(we)}),Z.eles.sort(function(we,je){return we.poolIndex()-je.poolIndex()})}var ae=Z.eles[0],se=ae.source(),le=ae.target();if(se.poolIndex()>le.poolIndex()){var he=se;se=le,le=he}var fe=Z.srcPos=se.position(),pe=Z.tgtPos=le.position(),me=Z.srcW=se.outerWidth(),Te=Z.srcH=se.outerHeight(),Le=Z.tgtW=le.outerWidth(),ge=Z.tgtH=le.outerHeight(),xe=Z.srcShape=a.nodeShapes[r.getNodeShape(se)],Se=Z.tgtShape=a.nodeShapes[r.getNodeShape(le)],Ie=Z.srcCornerRadius=se.pstyle("corner-radius").value==="auto"?"auto":se.pstyle("corner-radius").pfValue,Re=Z.tgtCornerRadius=le.pstyle("corner-radius").value==="auto"?"auto":le.pstyle("corner-radius").pfValue,Ne=Z.tgtRs=le._private.rscratch,Me=Z.srcRs=se._private.rscratch;Z.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var ke=0;ke<Z.eles.length;ke++){var Ge=Z.eles[ke],Qe=Ge[0]._private.rscratch,nt=Ge.pstyle("curve-style").value,ft=nt==="unbundled-bezier"||uh(nt,"segments")||uh(nt,"taxi"),Ue=!se.same(Ge.source());if(!Z.calculatedIntersection&&se!==le&&(Z.hasBezier||Z.hasUnbundled)){Z.calculatedIntersection=!0;var Ze=xe.intersectLine(fe.x,fe.y,me,Te,pe.x,pe.y,0,Ie,Me),mt=Z.srcIntn=Ze,st=Se.intersectLine(pe.x,pe.y,Le,ge,fe.x,fe.y,0,Re,Ne),Ot=Z.tgtIntn=st,At=Z.intersectionPts={x1:Ze[0],x2:st[0],y1:Ze[1],y2:st[1]},Rt=Z.posPts={x1:fe.x,x2:pe.x,y1:fe.y,y2:pe.y},zt=st[1]-Ze[1],mn=st[0]-Ze[0],sn=Math.sqrt(mn*mn+zt*zt);jt(sn)&&sn>=Xfe||(sn=Math.sqrt(Math.max(mn*mn,k0)+Math.max(zt*zt,k0)));var or=Z.vector={x:mn,y:zt},H=Z.vectorNorm={x:or.x/sn,y:or.y/sn},ne={x:-H.y,y:H.x};Z.nodesOverlap=!jt(sn)||Se.checkPoint(Ze[0],Ze[1],0,Le,ge,pe.x,pe.y,Re,Ne)||xe.checkPoint(st[0],st[1],0,me,Te,fe.x,fe.y,Ie,Me),Z.vectorNormInverse=ne,X={nodesOverlap:Z.nodesOverlap,dirCounts:Z.dirCounts,calculatedIntersection:!0,hasBezier:Z.hasBezier,hasUnbundled:Z.hasUnbundled,eles:Z.eles,srcPos:pe,srcRs:Ne,tgtPos:fe,tgtRs:Me,srcW:Le,srcH:ge,tgtW:me,tgtH:Te,srcIntn:Ot,tgtIntn:mt,srcShape:Se,tgtShape:xe,posPts:{x1:Rt.x2,y1:Rt.y2,x2:Rt.x1,y2:Rt.y1},intersectionPts:{x1:At.x2,y1:At.y2,x2:At.x1,y2:At.y1},vector:{x:-or.x,y:-or.y},vectorNorm:{x:-H.x,y:-H.y},vectorNormInverse:{x:-ne.x,y:-ne.y}}}var ue=Ue?X:Z;Qe.nodesOverlap=ue.nodesOverlap,Qe.srcIntn=ue.srcIntn,Qe.tgtIntn=ue.tgtIntn,Qe.isRound=nt.startsWith("round"),c&&(se.isParent()||se.isChild()||le.isParent()||le.isChild())&&(se.parents().anySame(le)||le.parents().anySame(se)||se.same(le)&&se.isParent())?r.findCompoundLoopPoints(Ge,ue,ke,ft):se===le?r.findLoopPoints(Ge,ue,ke,ft):nt.endsWith("segments")?r.findSegmentsPoints(Ge,ue):nt.endsWith("taxi")?r.findTaxiPoints(Ge,ue):nt==="straight"||!ft&&Z.eles.length%2===1&&ke===Math.floor(Z.eles.length/2)?r.findStraightEdgePoints(Ge):r.findBezierPoints(Ge,ue,ke,ft,Ue),r.findEndpoints(Ge),r.tryToCorrectInvalidPoints(Ge,ue),r.checkForInvalidEdgeWarning(Ge),r.storeAllpts(Ge),r.storeEdgeProjections(Ge),r.calculateArrowAngles(Ge),r.recalculateEdgeLabelProjections(Ge),r.calculateLabelAngles(Ge)}},G=0;G<d.length;G++)Y();this.findHaystackPoints(p)}};function IB(t){var r=[];if(t!=null){for(var a=0;a<t.length;a+=2){var s=t[a],c=t[a+1];r.push({x:s,y:c})}return r}}Do.getSegmentPoints=function(t){var r=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var a=r.edgeType;if(a==="segments")return IB(r.segpts)},Do.getControlPoints=function(t){var r=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var a=r.edgeType;if(a==="bezier"||a==="multibezier"||a==="self"||a==="compound")return IB(r.ctrlpts)},Do.getEdgeMidpoint=function(t){var r=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:r.midX,y:r.midY}};var _0={};_0.manualEndptToPx=function(t,r){var a=this,s=t.position(),c=t.outerWidth(),f=t.outerHeight(),h=t._private.rscratch;if(r.value.length===2){var d=[r.pfValue[0],r.pfValue[1]];return r.units[0]==="%"&&(d[0]=d[0]*c),r.units[1]==="%"&&(d[1]=d[1]*f),d[0]+=s.x,d[1]+=s.y,d}else{var p=r.pfValue[0];p=-Math.PI/2+p;var b=2*Math.max(c,f),m=[s.x+Math.cos(p)*b,s.y+Math.sin(p)*b];return a.nodeShapes[this.getNodeShape(t)].intersectLine(s.x,s.y,c,f,m[0],m[1],0,t.pstyle("corner-radius").value==="auto"?"auto":t.pstyle("corner-radius").pfValue,h)}},_0.findEndpoints=function(t){var r,a,s,c,f=this,h,d=t.source()[0],p=t.target()[0],b=d.position(),m=p.position(),w=t.pstyle("target-arrow-shape").value,k=t.pstyle("source-arrow-shape").value,P=t.pstyle("target-distance-from-node").pfValue,S=t.pstyle("source-distance-from-node").pfValue,M=d._private.rscratch,L=p._private.rscratch,T=t.pstyle("curve-style").value,j=t._private.rscratch,I=j.edgeType,D=uh(T,"taxi"),R=I==="self"||I==="compound",Y=I==="bezier"||I==="multibezier"||R,G=I!=="bezier",U=I==="straight"||I==="segments",z=I==="segments",Q=Y||G||U,$=R||D,Z=t.pstyle("source-endpoint"),X=$?"outside-to-node":Z.value,K=d.pstyle("corner-radius").value==="auto"?"auto":d.pstyle("corner-radius").pfValue,ae=t.pstyle("target-endpoint"),se=$?"outside-to-node":ae.value,le=p.pstyle("corner-radius").value==="auto"?"auto":p.pstyle("corner-radius").pfValue;j.srcManEndpt=Z,j.tgtManEndpt=ae;var he,fe,pe,me,Te=(r=(ae==null||(a=ae.pfValue)===null||a===void 0?void 0:a.length)===2?ae.pfValue:null)!==null&&r!==void 0?r:[0,0],Le=(s=(Z==null||(c=Z.pfValue)===null||c===void 0?void 0:c.length)===2?Z.pfValue:null)!==null&&s!==void 0?s:[0,0];if(Y){var ge=[j.ctrlpts[0],j.ctrlpts[1]],xe=G?[j.ctrlpts[j.ctrlpts.length-2],j.ctrlpts[j.ctrlpts.length-1]]:ge;he=xe,fe=ge}else if(U){var Se=z?j.segpts.slice(0,2):[m.x+Te[0],m.y+Te[1]],Ie=z?j.segpts.slice(j.segpts.length-2):[b.x+Le[0],b.y+Le[1]];he=Ie,fe=Se}if(se==="inside-to-node")h=[m.x,m.y];else if(ae.units)h=this.manualEndptToPx(p,ae);else if(se==="outside-to-line")h=j.tgtIntn;else if(se==="outside-to-node"||se==="outside-to-node-or-label"?pe=he:(se==="outside-to-line"||se==="outside-to-line-or-label")&&(pe=[b.x,b.y]),h=f.nodeShapes[this.getNodeShape(p)].intersectLine(m.x,m.y,p.outerWidth(),p.outerHeight(),pe[0],pe[1],0,le,L),se==="outside-to-node-or-label"||se==="outside-to-line-or-label"){var Re=p._private.rscratch,Ne=Re.labelWidth,Me=Re.labelHeight,ke=Re.labelX,Ge=Re.labelY,Qe=Ne/2,nt=Me/2,ft=p.pstyle("text-valign").value;ft==="top"?Ge-=nt:ft==="bottom"&&(Ge+=nt);var Ue=p.pstyle("text-halign").value;Ue==="left"?ke-=Qe:Ue==="right"&&(ke+=Qe);var Ze=c0(pe[0],pe[1],[ke-Qe,Ge-nt,ke+Qe,Ge-nt,ke+Qe,Ge+nt,ke-Qe,Ge+nt],m.x,m.y);if(Ze.length>0){var mt=b,st=Rd(mt,xg(h)),Ot=Rd(mt,xg(Ze)),At=st;if(Ot<st&&(h=Ze,At=Ot),Ze.length>2){var Rt=Rd(mt,{x:Ze[2],y:Ze[3]});Rt<At&&(h=[Ze[2],Ze[3]])}}}var zt=tw(h,he,f.arrowShapes[w].spacing(t)+P),mn=tw(h,he,f.arrowShapes[w].gap(t)+P);if(j.endX=mn[0],j.endY=mn[1],j.arrowEndX=zt[0],j.arrowEndY=zt[1],X==="inside-to-node")h=[b.x,b.y];else if(Z.units)h=this.manualEndptToPx(d,Z);else if(X==="outside-to-line")h=j.srcIntn;else if(X==="outside-to-node"||X==="outside-to-node-or-label"?me=fe:(X==="outside-to-line"||X==="outside-to-line-or-label")&&(me=[m.x,m.y]),h=f.nodeShapes[this.getNodeShape(d)].intersectLine(b.x,b.y,d.outerWidth(),d.outerHeight(),me[0],me[1],0,K,M),X==="outside-to-node-or-label"||X==="outside-to-line-or-label"){var sn=d._private.rscratch,or=sn.labelWidth,H=sn.labelHeight,ne=sn.labelX,ue=sn.labelY,we=or/2,je=H/2,ie=d.pstyle("text-valign").value;ie==="top"?ue-=je:ie==="bottom"&&(ue+=je);var Pe=d.pstyle("text-halign").value;Pe==="left"?ne-=we:Pe==="right"&&(ne+=we);var He=c0(me[0],me[1],[ne-we,ue-je,ne+we,ue-je,ne+we,ue+je,ne-we,ue+je],b.x,b.y);if(He.length>0){var We=m,Je=Rd(We,xg(h)),yt=Rd(We,xg(He)),rt=Je;if(yt<Je&&(h=[He[0],He[1]],rt=yt),He.length>2){var $t=Rd(We,{x:He[2],y:He[3]});$t<rt&&(h=[He[2],He[3]])}}}var Ft=tw(h,fe,f.arrowShapes[k].spacing(t)+S),rn=tw(h,fe,f.arrowShapes[k].gap(t)+S);j.startX=rn[0],j.startY=rn[1],j.arrowStartX=Ft[0],j.arrowStartY=Ft[1],Q&&(!jt(j.startX)||!jt(j.startY)||!jt(j.endX)||!jt(j.endY)?j.badLine=!0:j.badLine=!1)},_0.getSourceEndpoint=function(t){var r=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),r.edgeType){case"haystack":return{x:r.haystackPts[0],y:r.haystackPts[1]};default:return{x:r.arrowStartX,y:r.arrowStartY}}},_0.getTargetEndpoint=function(t){var r=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),r.edgeType){case"haystack":return{x:r.haystackPts[2],y:r.haystackPts[3]};default:return{x:r.arrowEndX,y:r.arrowEndY}}};var BP={};function ehe(t,r,a){for(var s=function(p,b,m,w){return Xa(p,b,m,w)},c=r._private,f=c.rstyle.bezierPts,h=0;h<t.bezierProjPcts.length;h++){var d=t.bezierProjPcts[h];f.push({x:s(a[0],a[2],a[4],d),y:s(a[1],a[3],a[5],d)})}}BP.storeEdgeProjections=function(t){var r=t._private,a=r.rscratch,s=a.edgeType;if(r.rstyle.bezierPts=null,r.rstyle.linePts=null,r.rstyle.haystackPts=null,s==="multibezier"||s==="bezier"||s==="self"||s==="compound"){r.rstyle.bezierPts=[];for(var c=0;c+5<a.allpts.length;c+=4)ehe(this,t,a.allpts.slice(c,c+6))}else if(s==="segments")for(var f=r.rstyle.linePts=[],c=0;c+1<a.allpts.length;c+=2)f.push({x:a.allpts[c],y:a.allpts[c+1]});else if(s==="haystack"){var h=a.haystackPts;r.rstyle.haystackPts=[{x:h[0],y:h[1]},{x:h[2],y:h[3]}]}r.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth},BP.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};var Wc={};Wc.recalculateNodeLabelProjection=function(t){var r=t.pstyle("label").strValue;if(!sh(r)){var a,s,c=t._private,f=t.width(),h=t.height(),d=t.padding(),p=t.position(),b=t.pstyle("text-halign").strValue,m=t.pstyle("text-valign").strValue,w=c.rscratch,k=c.rstyle;switch(b){case"left":a=p.x-f/2-d;break;case"right":a=p.x+f/2+d;break;default:a=p.x}switch(m){case"top":s=p.y-h/2-d;break;case"bottom":s=p.y+h/2+d;break;default:s=p.y}w.labelX=a,w.labelY=s,k.labelX=a,k.labelY=s,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}};var LB=function(t,r){var a=Math.atan(r/t);return t===0&&a<0&&(a=a*-1),a},OB=function(t,r){var a=r.x-t.x,s=r.y-t.y;return LB(a,s)},the=function(t,r,a,s){var c=s0(0,s-.001,1),f=s0(0,s+.001,1),h=kg(t,r,a,c),d=kg(t,r,a,f);return OB(h,d)};Wc.recalculateEdgeLabelProjections=function(t){var r,a=t._private,s=a.rscratch,c=this,f={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(f.mid||f.source||f.target){r={x:s.midX,y:s.midY};var h=function(m,w,k){ef(a.rscratch,m,w,k),ef(a.rstyle,m,w,k)};h("labelX",null,r.x),h("labelY",null,r.y);var d=LB(s.midDispX,s.midDispY);h("labelAutoAngle",null,d);var p=function(){if(p.cache)return p.cache;for(var m=[],w=0;w+5<s.allpts.length;w+=4){var k={x:s.allpts[w],y:s.allpts[w+1]},P={x:s.allpts[w+2],y:s.allpts[w+3]},S={x:s.allpts[w+4],y:s.allpts[w+5]};m.push({p0:k,p1:P,p2:S,startDist:0,length:0,segments:[]})}var M=a.rstyle.bezierPts,L=c.bezierProjPcts.length;function T(Y,G,U,z,Q){var $=Bd(G,U),Z=Y.segments[Y.segments.length-1],X={p0:G,p1:U,t0:z,t1:Q,startDist:Z?Z.startDist+Z.length:0,length:$};Y.segments.push(X),Y.length+=$}for(var j=0;j<m.length;j++){var I=m[j],D=m[j-1];D&&(I.startDist=D.startDist+D.length),T(I,I.p0,M[j*L],0,c.bezierProjPcts[0]);for(var R=0;R<L-1;R++)T(I,M[j*L+R],M[j*L+R+1],c.bezierProjPcts[R],c.bezierProjPcts[R+1]);T(I,M[j*L+L-1],I.p2,c.bezierProjPcts[L-1],1)}return p.cache=m},b=function(m){var w,k=m==="source";if(f[m]){var P=t.pstyle(m+"-text-offset").pfValue;switch(s.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var S=p(),M,L=0,T=0,j=0;j<S.length;j++){for(var I=S[k?j:S.length-1-j],D=0;D<I.segments.length;D++){var R=I.segments[k?D:I.segments.length-1-D],Y=j===S.length-1&&D===I.segments.length-1;if(L=T,T+=R.length,T>=P||Y){M={cp:I,segment:R};break}}if(M)break}var G=M.cp,U=M.segment,z=(P-L)/U.length,Q=U.t1-U.t0,$=k?U.t0+Q*z:U.t1-Q*z;$=s0(0,$,1),r=kg(G.p0,G.p1,G.p2,$),w=the(G.p0,G.p1,G.p2,$);break}case"straight":case"segments":case"haystack":{for(var Z=0,X,K,ae,se,le=s.allpts.length,he=0;he+3<le&&(k?(ae={x:s.allpts[he],y:s.allpts[he+1]},se={x:s.allpts[he+2],y:s.allpts[he+3]}):(ae={x:s.allpts[le-2-he],y:s.allpts[le-1-he]},se={x:s.allpts[le-4-he],y:s.allpts[le-3-he]}),X=Bd(ae,se),K=Z,Z+=X,!(Z>=P));he+=2);var fe=P-K,pe=fe/X;pe=s0(0,pe,1),r=_ue(ae,se,pe),w=OB(ae,se);break}}h("labelX",m,r.x),h("labelY",m,r.y),h("labelAutoAngle",m,w)}};b("source"),b("target"),this.applyLabelDimensions(t)}},Wc.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Wc.applyPrefixedLabelDimensions=function(t,r){var a=t._private,s=this.getLabelText(t,r),c=Dd(s,t._private.labelDimsKey);if(Ts(a.rscratch,"prefixedLabelDimsKey",r)!==c){ef(a.rscratch,"prefixedLabelDimsKey",r,c);var f=this.calculateLabelDimensions(t,s),h=t.pstyle("line-height").pfValue,d=t.pstyle("text-wrap").strValue,p=Ts(a.rscratch,"labelWrapCachedLines",r)||[],b=d!=="wrap"?1:Math.max(p.length,1),m=f.height/b,w=m*h,k=f.width,P=f.height+(b-1)*(h-1)*m;ef(a.rstyle,"labelWidth",r,k),ef(a.rscratch,"labelWidth",r,k),ef(a.rstyle,"labelHeight",r,P),ef(a.rscratch,"labelHeight",r,P),ef(a.rscratch,"labelLineHeight",r,w)}},Wc.getLabelText=function(t,r){var a=t._private,s=r?r+"-":"",c=t.pstyle(s+"label").strValue,f=t.pstyle("text-transform").value,h=function(Te,Le){return Le?(ef(a.rscratch,Te,r,Le),Le):Ts(a.rscratch,Te,r)};if(!c)return"";f=="none"||(f=="uppercase"?c=c.toUpperCase():f=="lowercase"&&(c=c.toLowerCase()));var d=t.pstyle("text-wrap").value;if(d==="wrap"){var p=h("labelKey");if(p!=null&&h("labelWrapKey")===p)return h("labelWrapCachedText");for(var b="",m=c.split(`
|
|
15
|
+
`),w=t.pstyle("text-max-width").pfValue,k=t.pstyle("text-overflow-wrap").value,P=k==="anywhere",S=[],M=/[\s\u200b]+|$/g,L=0;L<m.length;L++){var T=m[L],j=this.calculateLabelDimensions(t,T),I=j.width;if(P){var D=T.split("").join(b);T=D}if(I>w){var R=T.matchAll(M),Y="",G=0,U=Ns(R),z;try{for(U.s();!(z=U.n()).done;){var Q=z.value,$=Q[0],Z=T.substring(G,Q.index);G=Q.index+$.length;var X=Y.length===0?Z:Y+Z+$,K=this.calculateLabelDimensions(t,X),ae=K.width;ae<=w?Y+=Z+$:(Y&&S.push(Y),Y=Z+$)}}catch(Te){U.e(Te)}finally{U.f()}Y.match(/^[\s\u200b]+$/)||S.push(Y)}else S.push(T)}h("labelWrapCachedLines",S),c=h("labelWrapCachedText",S.join(`
|
|
16
|
+
`)),h("labelWrapKey",p)}else if(d==="ellipsis"){var se=t.pstyle("text-max-width").pfValue,le="",he="…",fe=!1;if(this.calculateLabelDimensions(t,c).width<se)return c;for(var pe=0;pe<c.length;pe++){var me=this.calculateLabelDimensions(t,le+c[pe]+he).width;if(me>se)break;le+=c[pe],pe===c.length-1&&(fe=!0)}return fe||(le+=he),le}return c},Wc.getLabelJustification=function(t){var r=t.pstyle("text-justification").strValue,a=t.pstyle("text-halign").strValue;if(r==="auto")if(t.isNode())switch(a){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return r},Wc.calculateLabelDimensions=function(t,r){var a=this,s=a.cy.window(),c=s.document,f=0,h=t.pstyle("font-style").strValue,d=t.pstyle("font-size").pfValue,p=t.pstyle("font-family").strValue,b=t.pstyle("font-weight").strValue,m=this.labelCalcCanvas,w=this.labelCalcCanvasContext;if(!m){m=this.labelCalcCanvas=c.createElement("canvas"),w=this.labelCalcCanvasContext=m.getContext("2d");var k=m.style;k.position="absolute",k.left="-9999px",k.top="-9999px",k.zIndex="-1",k.visibility="hidden",k.pointerEvents="none"}w.font="".concat(h," ").concat(b," ").concat(d,"px ").concat(p);for(var P=0,S=0,M=r.split(`
|
|
17
|
+
`),L=0;L<M.length;L++){var T=M[L],j=w.measureText(T),I=Math.ceil(j.width),D=d;P=Math.max(I,P),S+=D}return P+=f,S+=f,{width:P,height:S}},Wc.calculateLabelAngle=function(t,r){var a=t._private,s=a.rscratch,c=t.isEdge(),f=r?r+"-":"",h=t.pstyle(f+"text-rotation"),d=h.strValue;return d==="none"?0:c&&d==="autorotate"?s.labelAutoAngle:d==="autorotate"?0:h.pfValue},Wc.calculateLabelAngles=function(t){var r=this,a=t.isEdge(),s=t._private,c=s.rscratch;c.labelAngle=r.calculateLabelAngle(t),a&&(c.sourceLabelAngle=r.calculateLabelAngle(t,"source"),c.targetLabelAngle=r.calculateLabelAngle(t,"target"))};var DB={},BB=28,RB=!1;DB.getNodeShape=function(t){var r=this,a=t.pstyle("shape").value;if(a==="cutrectangle"&&(t.width()<BB||t.height()<BB))return RB||(jr("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),RB=!0),"rectangle";if(t.isParent())return a==="rectangle"||a==="roundrectangle"||a==="round-rectangle"||a==="cutrectangle"||a==="cut-rectangle"||a==="barrel"?a:"rectangle";if(a==="polygon"){var s=t.pstyle("shape-polygon-points").value;return r.nodeShapes.makePolygon(s).name}return a};var Aw={};Aw.registerCalculationListeners=function(){var t=this.cy,r=t.collection(),a=this,s=function(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(r.merge(f),h)for(var d=0;d<f.length;d++){var p=f[d],b=p._private,m=b.rstyle;m.clean=!1,m.cleanConnected=!1}};a.binder(t).on("bounds.* dirty.*",function(f){var h=f.target;s(h)}).on("style.* background.*",function(f){var h=f.target;s(h,!1)});var c=function(f){if(f){var h=a.onUpdateEleCalcsFns;r.cleanStyle();for(var d=0;d<r.length;d++){var p=r[d],b=p._private.rstyle;p.isNode()&&!b.cleanConnected&&(s(p.connectedEdges()),b.cleanConnected=!0)}if(h)for(var m=0;m<h.length;m++){var w=h[m];w(f,r)}a.recalculateRenderedStyle(r),r=t.collection()}};a.flushRenderedStyleQueue=function(){c(!0)},a.beforeRender(c,a.beforeRenderPriorities.eleCalcs)},Aw.onUpdateEleCalcs=function(t){var r=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];r.push(t)},Aw.recalculateRenderedStyle=function(t,r){var a=function(I){return I._private.rstyle.cleanConnected};if(t.length!==0){var s=[],c=[];if(!this.destroyed){r===void 0&&(r=!0);for(var f=0;f<t.length;f++){var h=t[f],d=h._private,p=d.rstyle;h.isEdge()&&(!a(h.source())||!a(h.target()))&&(p.clean=!1),h.isEdge()&&h.isBundledBezier()&&h.parallelEdges().some(function(I){return!I._private.rstyle.clean&&I.isBundledBezier()})&&(p.clean=!1),!(r&&p.clean||h.removed())&&h.pstyle("display").value!=="none"&&(d.group==="nodes"?c.push(h):s.push(h),p.clean=!0)}for(var b=0;b<c.length;b++){var m=c[b],w=m._private,k=w.rstyle,P=m.position();this.recalculateNodeLabelProjection(m),k.nodeX=P.x,k.nodeY=P.y,k.nodeW=m.pstyle("width").pfValue,k.nodeH=m.pstyle("height").pfValue}this.recalculateEdgeProjections(s);for(var S=0;S<s.length;S++){var M=s[S],L=M._private,T=L.rstyle,j=L.rscratch;T.srcX=j.arrowStartX,T.srcY=j.arrowStartY,T.tgtX=j.arrowEndX,T.tgtY=j.arrowEndY,T.midX=j.midX,T.midY=j.midY,T.labelAngle=j.labelAngle,T.sourceLabelAngle=j.sourceLabelAngle,T.targetLabelAngle=j.targetLabelAngle}}}};var Iw={};Iw.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var r=[],a=0;a<t.length;a++){var s=t[a],c=s._private.rscratch;s.grabbed()&&!s.isParent()?r.push(s):c.inDragLayer?t.drag.push(s):t.nondrag.push(s)}for(var a=0;a<r.length;a++){var s=r[a];t.drag.push(s)}}},Iw.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},Iw.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var r=this.cy.mutableElements().toArray();r.sort(JD),r.interactive=r.filter(function(a){return a.interactive()}),this.cachedZSortedEles=r,this.updateCachedGrabbedEles()}else r=this.cachedZSortedEles;return r};var GB={};[Ud,Tw,Do,_0,BP,Wc,DB,Aw,Iw].forEach(function(t){fn(GB,t)});var HB={};HB.getCachedImage=function(t,r,a){var s=this,c=s.imageCache=s.imageCache||{},f=c[t];if(f)return f.image.complete||f.image.addEventListener("load",a),f.image;f=c[t]=c[t]||{};var h=f.image=new Image;h.addEventListener("load",a),h.addEventListener("error",function(){h.error=!0});var d="data:",p=t.substring(0,d.length).toLowerCase()===d;return p||(r=r==="null"?null:r,h.crossOrigin=r),h.src=t,h};var Bg={};Bg.registerBinding=function(t,r,a,s){var c=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var f=[],h=0;h<t.length;h++){var d=t[h];if(d!==void 0){var p=this.binder(d);f.push(p.on.apply(p,c))}}return f}var p=this.binder(t);return p.on.apply(p,c)},Bg.binder=function(t){var r=this,a=r.cy.window(),s=t===a||t===a.document||t===a.document.body||dse(t);if(r.supportsPassiveEvents==null){var c=!1;try{var f=Object.defineProperty({},"passive",{get:function(){return c=!0,!0}});a.addEventListener("test",null,f)}catch{}r.supportsPassiveEvents=c}var h=function(d,p,b){var m=Array.prototype.slice.call(arguments);return s&&r.supportsPassiveEvents&&(m[2]={capture:b??!1,passive:!1,once:!1}),r.bindings.push({target:t,args:m}),(t.addEventListener||t.on).apply(t,m),this};return{on:h,addEventListener:h,addListener:h,bind:h}},Bg.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()},Bg.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()},Bg.load=function(){var t=this,r=t.cy.window(),a=function(ie){return ie.selected()},s=function(ie){var Pe=ie.getRootNode();if(Pe&&Pe.nodeType===11&&Pe.host!==void 0)return Pe},c=function(ie,Pe,He,We){ie==null&&(ie=t.cy);for(var Je=0;Je<Pe.length;Je++){var yt=Pe[Je];ie.emit({originalEvent:He,type:yt,position:We})}},f=function(ie){return ie.shiftKey||ie.metaKey||ie.ctrlKey},h=function(ie,Pe){var He=!0;if(t.cy.hasCompoundNodes()&&ie&&ie.pannable())for(var We=0;Pe&&We<Pe.length;We++){var ie=Pe[We];if(ie.isNode()&&ie.isParent()&&!ie.pannable()){He=!1;break}}else He=!0;return He},d=function(ie){ie[0]._private.grabbed=!0},p=function(ie){ie[0]._private.grabbed=!1},b=function(ie){ie[0]._private.rscratch.inDragLayer=!0},m=function(ie){ie[0]._private.rscratch.inDragLayer=!1},w=function(ie){ie[0]._private.rscratch.isGrabTarget=!0},k=function(ie){ie[0]._private.rscratch.isGrabTarget=!1},P=function(ie,Pe){var He=Pe.addToList,We=He.has(ie);!We&&ie.grabbable()&&!ie.locked()&&(He.merge(ie),d(ie))},S=function(ie,Pe){if(ie.cy().hasCompoundNodes()&&!(Pe.inDragLayer==null&&Pe.addToList==null)){var He=ie.descendants();Pe.inDragLayer&&(He.forEach(b),He.connectedEdges().forEach(b)),Pe.addToList&&P(He,Pe)}},M=function(ie,Pe){Pe=Pe||{};var He=ie.cy().hasCompoundNodes();Pe.inDragLayer&&(ie.forEach(b),ie.neighborhood().stdFilter(function(We){return!He||We.isEdge()}).forEach(b)),Pe.addToList&&ie.forEach(function(We){P(We,Pe)}),S(ie,Pe),j(ie,{inDragLayer:Pe.inDragLayer}),t.updateCachedGrabbedEles()},L=M,T=function(ie){ie&&(t.getCachedZSortedEles().forEach(function(Pe){p(Pe),m(Pe),k(Pe)}),t.updateCachedGrabbedEles())},j=function(ie,Pe){if(!(Pe.inDragLayer==null&&Pe.addToList==null)&&ie.cy().hasCompoundNodes()){var He=ie.ancestors().orphans();if(!He.same(ie)){var We=He.descendants().spawnSelf().merge(He).unmerge(ie).unmerge(ie.descendants()),Je=We.connectedEdges();Pe.inDragLayer&&(Je.forEach(b),We.forEach(b)),Pe.addToList&&We.forEach(function(yt){P(yt,Pe)})}}},I=function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},D=typeof MutationObserver<"u",R=typeof ResizeObserver<"u";D?(t.removeObserver=new MutationObserver(function(ie){for(var Pe=0;Pe<ie.length;Pe++){var He=ie[Pe],We=He.removedNodes;if(We)for(var Je=0;Je<We.length;Je++){var yt=We[Je];if(yt===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(ie){t.destroy()});var Y=n0(function(){t.cy.resize()},100);D&&(t.styleObserver=new MutationObserver(Y),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(r,"resize",Y),R&&(t.resizeObserver=new ResizeObserver(Y),t.resizeObserver.observe(t.container));var G=function(ie,Pe){for(;ie!=null;)Pe(ie),ie=ie.parentNode},U=function(){t.invalidateContainerClientCoordsCache()};G(t.container,function(ie){t.registerBinding(ie,"transitionend",U),t.registerBinding(ie,"animationend",U),t.registerBinding(ie,"scroll",U)}),t.registerBinding(t.container,"contextmenu",function(ie){ie.preventDefault()});var z=function(){return t.selection[4]!==0},Q=function(ie){for(var Pe=t.findContainerClientCoords(),He=Pe[0],We=Pe[1],Je=Pe[2],yt=Pe[3],rt=ie.touches?ie.touches:[ie],$t=!1,Ft=0;Ft<rt.length;Ft++){var rn=rt[Ft];if(He<=rn.clientX&&rn.clientX<=He+Je&&We<=rn.clientY&&rn.clientY<=We+yt){$t=!0;break}}if(!$t)return!1;for(var Un=t.container,Gn=ie.target,Kt=Gn.parentNode,Hn=!1;Kt;){if(Kt===Un){Hn=!0;break}Kt=Kt.parentNode}return!!Hn};t.registerBinding(t.container,"mousedown",function(ie){if(Q(ie)&&!(t.hoverData.which===1&&ie.which!==1)){ie.preventDefault(),I(),t.hoverData.capture=!0,t.hoverData.which=ie.which;var Pe=t.cy,He=[ie.clientX,ie.clientY],We=t.projectIntoViewport(He[0],He[1]),Je=t.selection,yt=t.findNearestElements(We[0],We[1],!0,!1),rt=yt[0],$t=t.dragData.possibleDragElements;t.hoverData.mdownPos=We,t.hoverData.mdownGPos=He;var Ft=function(Hn){return{originalEvent:ie,type:Hn,position:{x:We[0],y:We[1]}}},rn=function(){t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var Hn=t.hoverData.down;Hn?Hn.emit(Ft("taphold")):Pe.emit(Ft("taphold"))}},t.tapholdDuration)};if(ie.which==3){t.hoverData.cxtStarted=!0;var Un={originalEvent:ie,type:"cxttapstart",position:{x:We[0],y:We[1]}};rt?(rt.activate(),rt.emit(Un),t.hoverData.down=rt):Pe.emit(Un),t.hoverData.downTime=new Date().getTime(),t.hoverData.cxtDragged=!1}else if(ie.which==1){rt&&rt.activate();{if(rt!=null&&t.nodeIsGrabbable(rt)){var Gn=function(Hn){Hn.emit(Ft("grab"))};if(w(rt),!rt.selected())$t=t.dragData.possibleDragElements=Pe.collection(),L(rt,{addToList:$t}),rt.emit(Ft("grabon")).emit(Ft("grab"));else{$t=t.dragData.possibleDragElements=Pe.collection();var Kt=Pe.$(function(Hn){return Hn.isNode()&&Hn.selected()&&t.nodeIsGrabbable(Hn)});M(Kt,{addToList:$t}),rt.emit(Ft("grabon")),Kt.forEach(Gn)}t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=rt,t.hoverData.downs=yt,t.hoverData.downTime=new Date().getTime()}c(rt,["mousedown","tapstart","vmousedown"],ie,{x:We[0],y:We[1]}),rt==null?(Je[4]=1,t.data.bgActivePosistion={x:We[0],y:We[1]},t.redrawHint("select",!0),t.redraw()):rt.pannable()&&(Je[4]=1),rn()}Je[0]=Je[2]=We[0],Je[1]=Je[3]=We[1]}},!1);var $=s(t.container);t.registerBinding([r,$],"mousemove",function(ie){var Pe=t.hoverData.capture;if(!(!Pe&&!Q(ie))){var He=!1,We=t.cy,Je=We.zoom(),yt=[ie.clientX,ie.clientY],rt=t.projectIntoViewport(yt[0],yt[1]),$t=t.hoverData.mdownPos,Ft=t.hoverData.mdownGPos,rn=t.selection,Un=null;!t.hoverData.draggingEles&&!t.hoverData.dragging&&!t.hoverData.selecting&&(Un=t.findNearestElement(rt[0],rt[1],!0,!1));var Gn=t.hoverData.last,Kt=t.hoverData.down,Hn=[rt[0]-rn[2],rt[1]-rn[3]],dr=t.dragData.possibleDragElements,gi;if(Ft){var ka=yt[0]-Ft[0],no=ka*ka,Bi=yt[1]-Ft[1],da=Bi*Bi,Ri=no+da;t.hoverData.isOverThresholdDrag=gi=Ri>=t.desktopTapThreshold2}var ro=f(ie);gi&&(t.hoverData.tapholdCancelled=!0);var ac=function(){var ru=t.hoverData.dragDelta=t.hoverData.dragDelta||[];ru.length===0?(ru.push(Hn[0]),ru.push(Hn[1])):(ru[0]+=Hn[0],ru[1]+=Hn[1])};He=!0,c(Un,["mousemove","vmousemove","tapdrag"],ie,{x:rt[0],y:rt[1]});var Gi=function(ru){return{originalEvent:ie,type:ru,position:{x:rt[0],y:rt[1]}}},Xo=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||We.emit(Gi("boxstart")),rn[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(gi){var np=Gi("cxtdrag");Kt?Kt.emit(np):We.emit(np),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||Un!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(Gi("cxtdragout")),t.hoverData.cxtOver=Un,Un&&Un.emit(Gi("cxtdragover")))}}else if(t.hoverData.dragging){if(He=!0,We.panningEnabled()&&We.userPanningEnabled()){var ff;if(t.hoverData.justStartedPan){var rp=t.hoverData.mdownPos;ff={x:(rt[0]-rp[0])*Je,y:(rt[1]-rp[1])*Je},t.hoverData.justStartedPan=!1}else ff={x:Hn[0]*Je,y:Hn[1]*Je};We.panBy(ff),We.emit(Gi("dragpan")),t.hoverData.dragged=!0}rt=t.projectIntoViewport(ie.clientX,ie.clientY)}else if(rn[4]==1&&(Kt==null||Kt.pannable())){if(gi){if(!t.hoverData.dragging&&We.boxSelectionEnabled()&&(ro||!We.panningEnabled()||!We.userPanningEnabled()))Xo();else if(!t.hoverData.selecting&&We.panningEnabled()&&We.userPanningEnabled()){var rl=h(Kt,t.hoverData.downs);rl&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,rn[4]=0,t.data.bgActivePosistion=xg($t),t.redrawHint("select",!0),t.redraw())}Kt&&Kt.pannable()&&Kt.active()&&Kt.unactivate()}}else{if(Kt&&Kt.pannable()&&Kt.active()&&Kt.unactivate(),(!Kt||!Kt.grabbed())&&Un!=Gn&&(Gn&&c(Gn,["mouseout","tapdragout"],ie,{x:rt[0],y:rt[1]}),Un&&c(Un,["mouseover","tapdragover"],ie,{x:rt[0],y:rt[1]}),t.hoverData.last=Un),Kt)if(gi){if(We.boxSelectionEnabled()&&ro)Kt&&Kt.grabbed()&&(T(dr),Kt.emit(Gi("freeon")),dr.emit(Gi("free")),t.dragData.didDrag&&(Kt.emit(Gi("dragfreeon")),dr.emit(Gi("dragfree")))),Xo();else if(Kt&&Kt.grabbed()&&t.nodeIsDraggable(Kt)){var ko=!t.dragData.didDrag;ko&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||M(dr,{inDragLayer:!0});var Ra={x:0,y:0};if(jt(Hn[0])&&jt(Hn[1])&&(Ra.x+=Hn[0],Ra.y+=Hn[1],ko)){var _o=t.hoverData.dragDelta;_o&&jt(_o[0])&&jt(_o[1])&&(Ra.x+=_o[0],Ra.y+=_o[1])}t.hoverData.draggingEles=!0,dr.silentShift(Ra).emit(Gi("position")).emit(Gi("drag")),t.redrawHint("drag",!0),t.redraw()}}else ac();He=!0}if(rn[2]=rt[0],rn[3]=rt[1],He)return ie.stopPropagation&&ie.stopPropagation(),ie.preventDefault&&ie.preventDefault(),!1}},!1);var Z,X,K;t.registerBinding(r,"mouseup",function(ie){if(!(t.hoverData.which===1&&ie.which!==1&&t.hoverData.capture)){var Pe=t.hoverData.capture;if(Pe){t.hoverData.capture=!1;var He=t.cy,We=t.projectIntoViewport(ie.clientX,ie.clientY),Je=t.selection,yt=t.findNearestElement(We[0],We[1],!0,!1),rt=t.dragData.possibleDragElements,$t=t.hoverData.down,Ft=f(ie);t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,$t&&$t.unactivate();var rn=function(gi){return{originalEvent:ie,type:gi,position:{x:We[0],y:We[1]}}};if(t.hoverData.which===3){var Un=rn("cxttapend");if($t?$t.emit(Un):He.emit(Un),!t.hoverData.cxtDragged){var Gn=rn("cxttap");$t?$t.emit(Gn):He.emit(Gn)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(c(yt,["mouseup","tapend","vmouseup"],ie,{x:We[0],y:We[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(c($t,["click","tap","vclick"],ie,{x:We[0],y:We[1]}),X=!1,ie.timeStamp-K<=He.multiClickDebounceTime()?(Z&&clearTimeout(Z),X=!0,K=null,c($t,["dblclick","dbltap","vdblclick"],ie,{x:We[0],y:We[1]})):(Z=setTimeout(function(){X||c($t,["oneclick","onetap","voneclick"],ie,{x:We[0],y:We[1]})},He.multiClickDebounceTime()),K=ie.timeStamp)),$t==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!f(ie)&&(He.$(a).unselect(["tapunselect"]),rt.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=rt=He.collection()),yt==$t&&!t.dragData.didDrag&&!t.hoverData.selecting&&yt!=null&&yt._private.selectable&&(t.hoverData.dragging||(He.selectionType()==="additive"||Ft?yt.selected()?yt.unselect(["tapunselect"]):yt.select(["tapselect"]):Ft||(He.$(a).unmerge(yt).unselect(["tapunselect"]),yt.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Kt=He.collection(t.getAllInBox(Je[0],Je[1],Je[2],Je[3]));t.redrawHint("select",!0),Kt.length>0&&t.redrawHint("eles",!0),He.emit(rn("boxend"));var Hn=function(gi){return gi.selectable()&&!gi.selected()};He.selectionType()==="additive"||Ft||He.$(a).unmerge(Kt).unselect(),Kt.emit(rn("box")).stdFilter(Hn).select().emit(rn("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!Je[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var dr=$t&&$t.grabbed();T(rt),dr&&($t.emit(rn("freeon")),rt.emit(rn("free")),t.dragData.didDrag&&($t.emit(rn("dragfreeon")),rt.emit(rn("dragfree"))))}}Je[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var ae=[],se=4,le,he=1e5,fe=function(ie,Pe){for(var He=0;He<ie.length;He++)if(ie[He]%Pe!==0)return!1;return!0},pe=function(ie){for(var Pe=Math.abs(ie[0]),He=1;He<ie.length;He++)if(Math.abs(ie[He])!==Pe)return!1;return!0},me=function(ie){var Pe=!1,He=ie.deltaY;if(He==null&&(ie.wheelDeltaY!=null?He=ie.wheelDeltaY/4:ie.wheelDelta!=null&&(He=ie.wheelDelta/4)),He!==0){if(le==null)if(ae.length>=se){var We=ae;if(le=fe(We,5),!le){var Je=Math.abs(We[0]);le=pe(We)&&Je>5}if(le)for(var yt=0;yt<We.length;yt++)he=Math.min(Math.abs(We[yt]),he)}else ae.push(He),Pe=!0;else le&&(he=Math.min(Math.abs(He),he));if(!t.scrollingPage){var rt=t.cy,$t=rt.zoom(),Ft=rt.pan(),rn=t.projectIntoViewport(ie.clientX,ie.clientY),Un=[rn[0]*$t+Ft.x,rn[1]*$t+Ft.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||z()){ie.preventDefault();return}if(rt.panningEnabled()&&rt.userPanningEnabled()&&rt.zoomingEnabled()&&rt.userZoomingEnabled()){ie.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var Gn;Pe&&Math.abs(He)>5&&(He=i3(He)*5),Gn=He/-250,le&&(Gn/=he,Gn*=3),Gn=Gn*t.wheelSensitivity;var Kt=ie.deltaMode===1;Kt&&(Gn*=33);var Hn=rt.zoom()*Math.pow(10,Gn);ie.type==="gesturechange"&&(Hn=t.gestureStartZoom*ie.scale),rt.zoom({level:Hn,renderedPosition:{x:Un[0],y:Un[1]}}),rt.emit({type:ie.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:ie,position:{x:rn[0],y:rn[1]}})}}}};t.registerBinding(t.container,"wheel",me,!0),t.registerBinding(r,"scroll",function(ie){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(ie){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||ie.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(ie){t.hasTouchStarted||me(ie)},!0),t.registerBinding(t.container,"mouseout",function(ie){var Pe=t.projectIntoViewport(ie.clientX,ie.clientY);t.cy.emit({originalEvent:ie,type:"mouseout",position:{x:Pe[0],y:Pe[1]}})},!1),t.registerBinding(t.container,"mouseover",function(ie){var Pe=t.projectIntoViewport(ie.clientX,ie.clientY);t.cy.emit({originalEvent:ie,type:"mouseover",position:{x:Pe[0],y:Pe[1]}})},!1);var Te,Le,ge,xe,Se,Ie,Re,Ne,Me,ke,Ge,Qe,nt,ft=function(ie,Pe,He,We){return Math.sqrt((He-ie)*(He-ie)+(We-Pe)*(We-Pe))},Ue=function(ie,Pe,He,We){return(He-ie)*(He-ie)+(We-Pe)*(We-Pe)},Ze;t.registerBinding(t.container,"touchstart",Ze=function(ie){if(t.hasTouchStarted=!0,!!Q(ie)){I(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var Pe=t.cy,He=t.touchData.now,We=t.touchData.earlier;if(ie.touches[0]){var Je=t.projectIntoViewport(ie.touches[0].clientX,ie.touches[0].clientY);He[0]=Je[0],He[1]=Je[1]}if(ie.touches[1]){var Je=t.projectIntoViewport(ie.touches[1].clientX,ie.touches[1].clientY);He[2]=Je[0],He[3]=Je[1]}if(ie.touches[2]){var Je=t.projectIntoViewport(ie.touches[2].clientX,ie.touches[2].clientY);He[4]=Je[0],He[5]=Je[1]}var yt=function(Ri){return{originalEvent:ie,type:Ri,position:{x:He[0],y:He[1]}}};if(ie.touches[1]){t.touchData.singleTouchMoved=!0,T(t.dragData.touchDragEles);var rt=t.findContainerClientCoords();Me=rt[0],ke=rt[1],Ge=rt[2],Qe=rt[3],Te=ie.touches[0].clientX-Me,Le=ie.touches[0].clientY-ke,ge=ie.touches[1].clientX-Me,xe=ie.touches[1].clientY-ke,nt=0<=Te&&Te<=Ge&&0<=ge&&ge<=Ge&&0<=Le&&Le<=Qe&&0<=xe&&xe<=Qe;var $t=Pe.pan(),Ft=Pe.zoom();Se=ft(Te,Le,ge,xe),Ie=Ue(Te,Le,ge,xe),Re=[(Te+ge)/2,(Le+xe)/2],Ne=[(Re[0]-$t.x)/Ft,(Re[1]-$t.y)/Ft];var rn=200,Un=rn*rn;if(Ie<Un&&!ie.touches[2]){var Gn=t.findNearestElement(He[0],He[1],!0,!0),Kt=t.findNearestElement(He[2],He[3],!0,!0);Gn&&Gn.isNode()?(Gn.activate().emit(yt("cxttapstart")),t.touchData.start=Gn):Kt&&Kt.isNode()?(Kt.activate().emit(yt("cxttapstart")),t.touchData.start=Kt):Pe.emit(yt("cxttapstart")),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return}}if(ie.touches[2])Pe.boxSelectionEnabled()&&ie.preventDefault();else if(!ie.touches[1]&&ie.touches[0]){var Hn=t.findNearestElements(He[0],He[1],!0,!0),dr=Hn[0];if(dr!=null&&(dr.activate(),t.touchData.start=dr,t.touchData.starts=Hn,t.nodeIsGrabbable(dr))){var gi=t.dragData.touchDragEles=Pe.collection(),ka=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),dr.selected()?(ka=Pe.$(function(Ri){return Ri.selected()&&t.nodeIsGrabbable(Ri)}),M(ka,{addToList:gi})):L(dr,{addToList:gi}),w(dr),dr.emit(yt("grabon")),ka?ka.forEach(function(Ri){Ri.emit(yt("grab"))}):dr.emit(yt("grab"))}c(dr,["touchstart","tapstart","vmousedown"],ie,{x:He[0],y:He[1]}),dr==null&&(t.data.bgActivePosistion={x:Je[0],y:Je[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&c(t.touchData.start,["taphold"],ie,{x:He[0],y:He[1]})},t.tapholdDuration)}if(ie.touches.length>=1){for(var no=t.touchData.startPosition=[null,null,null,null,null,null],Bi=0;Bi<He.length;Bi++)no[Bi]=We[Bi]=He[Bi];var da=ie.touches[0];t.touchData.startGPosition=[da.clientX,da.clientY]}}},!1);var mt;t.registerBinding(r,"touchmove",mt=function(ie){var Pe=t.touchData.capture;if(!(!Pe&&!Q(ie))){var He=t.selection,We=t.cy,Je=t.touchData.now,yt=t.touchData.earlier,rt=We.zoom();if(ie.touches[0]){var $t=t.projectIntoViewport(ie.touches[0].clientX,ie.touches[0].clientY);Je[0]=$t[0],Je[1]=$t[1]}if(ie.touches[1]){var $t=t.projectIntoViewport(ie.touches[1].clientX,ie.touches[1].clientY);Je[2]=$t[0],Je[3]=$t[1]}if(ie.touches[2]){var $t=t.projectIntoViewport(ie.touches[2].clientX,ie.touches[2].clientY);Je[4]=$t[0],Je[5]=$t[1]}var Ft=function(E2){return{originalEvent:ie,type:E2,position:{x:Je[0],y:Je[1]}}},rn=t.touchData.startGPosition,Un;if(Pe&&ie.touches[0]&&rn){for(var Gn=[],Kt=0;Kt<Je.length;Kt++)Gn[Kt]=Je[Kt]-yt[Kt];var Hn=ie.touches[0].clientX-rn[0],dr=Hn*Hn,gi=ie.touches[0].clientY-rn[1],ka=gi*gi,no=dr+ka;Un=no>=t.touchTapThreshold2}if(Pe&&t.touchData.cxt){ie.preventDefault();var Bi=ie.touches[0].clientX-Me,da=ie.touches[0].clientY-ke,Ri=ie.touches[1].clientX-Me,ro=ie.touches[1].clientY-ke,ac=Ue(Bi,da,Ri,ro),Gi=ac/Ie,Xo=150,np=Xo*Xo,ff=1.5,rp=ff*ff;if(Gi>=rp||ac>=np){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var rl=Ft("cxttapend");t.touchData.start?(t.touchData.start.unactivate().emit(rl),t.touchData.start=null):We.emit(rl)}}if(Pe&&t.touchData.cxt){var rl=Ft("cxtdrag");t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(rl):We.emit(rl),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var ko=t.findNearestElement(Je[0],Je[1],!0,!0);(!t.touchData.cxtOver||ko!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit(Ft("cxtdragout")),t.touchData.cxtOver=ko,ko&&ko.emit(Ft("cxtdragover")))}else if(Pe&&ie.touches[2]&&We.boxSelectionEnabled())ie.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||We.emit(Ft("boxstart")),t.touchData.selecting=!0,t.touchData.didSelect=!0,He[4]=1,!He||He.length===0||He[0]===void 0?(He[0]=(Je[0]+Je[2]+Je[4])/3,He[1]=(Je[1]+Je[3]+Je[5])/3,He[2]=(Je[0]+Je[2]+Je[4])/3+1,He[3]=(Je[1]+Je[3]+Je[5])/3+1):(He[2]=(Je[0]+Je[2]+Je[4])/3,He[3]=(Je[1]+Je[3]+Je[5])/3),t.redrawHint("select",!0),t.redraw();else if(Pe&&ie.touches[1]&&!t.touchData.didSelect&&We.zoomingEnabled()&&We.panningEnabled()&&We.userZoomingEnabled()&&We.userPanningEnabled()){ie.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Ra=t.dragData.touchDragEles;if(Ra){t.redrawHint("drag",!0);for(var _o=0;_o<Ra.length;_o++){var ru=Ra[_o]._private;ru.grabbed=!1,ru.rscratch.inDragLayer=!1}}var ip=t.touchData.start,Bi=ie.touches[0].clientX-Me,da=ie.touches[0].clientY-ke,Ri=ie.touches[1].clientX-Me,ro=ie.touches[1].clientY-ke,K0=ft(Bi,da,Ri,ro),b2=K0/Se;if(nt){var v2=Bi-Te,y2=da-Le,m2=Ri-ge,w2=ro-xe,ap=(v2+m2)/2,x2=(y2+w2)/2,Ch=We.zoom(),Q0=Ch*b2,op=We.pan(),W0=Ne[0]*Ch+op.x,J0=Ne[1]*Ch+op.y,k2={x:-Q0/Ch*(W0-op.x-ap)+W0,y:-Q0/Ch*(J0-op.y-x2)+J0};if(ip&&ip.active()){var Ra=t.dragData.touchDragEles;T(Ra),t.redrawHint("drag",!0),t.redrawHint("eles",!0),ip.unactivate().emit(Ft("freeon")),Ra.emit(Ft("free")),t.dragData.didDrag&&(ip.emit(Ft("dragfreeon")),Ra.emit(Ft("dragfree")))}We.viewport({zoom:Q0,pan:k2,cancelOnFailedZoom:!0}),We.emit(Ft("pinchzoom")),Se=K0,Te=Bi,Le=da,ge=Ri,xe=ro,t.pinching=!0}if(ie.touches[0]){var $t=t.projectIntoViewport(ie.touches[0].clientX,ie.touches[0].clientY);Je[0]=$t[0],Je[1]=$t[1]}if(ie.touches[1]){var $t=t.projectIntoViewport(ie.touches[1].clientX,ie.touches[1].clientY);Je[2]=$t[0],Je[3]=$t[1]}if(ie.touches[2]){var $t=t.projectIntoViewport(ie.touches[2].clientX,ie.touches[2].clientY);Je[4]=$t[0],Je[5]=$t[1]}}else if(ie.touches[0]&&!t.touchData.didSelect){var Ls=t.touchData.start,eb=t.touchData.last,ko;if(!t.hoverData.draggingEles&&!t.swipePanning&&(ko=t.findNearestElement(Je[0],Je[1],!0,!0)),Pe&&Ls!=null&&ie.preventDefault(),Pe&&Ls!=null&&t.nodeIsDraggable(Ls))if(Un){var Ra=t.dragData.touchDragEles,X0=!t.dragData.didDrag;X0&&M(Ra,{inDragLayer:!0}),t.dragData.didDrag=!0;var Ph={x:0,y:0};if(jt(Gn[0])&&jt(Gn[1])&&(Ph.x+=Gn[0],Ph.y+=Gn[1],X0)){t.redrawHint("eles",!0);var Os=t.touchData.dragDelta;Os&&jt(Os[0])&&jt(Os[1])&&(Ph.x+=Os[0],Ph.y+=Os[1])}t.hoverData.draggingEles=!0,Ra.silentShift(Ph).emit(Ft("position")).emit(Ft("drag")),t.redrawHint("drag",!0),t.touchData.startPosition[0]==yt[0]&&t.touchData.startPosition[1]==yt[1]&&t.redrawHint("eles",!0),t.redraw()}else{var Os=t.touchData.dragDelta=t.touchData.dragDelta||[];Os.length===0?(Os.push(Gn[0]),Os.push(Gn[1])):(Os[0]+=Gn[0],Os[1]+=Gn[1])}if(c(Ls||ko,["touchmove","tapdrag","vmousemove"],ie,{x:Je[0],y:Je[1]}),(!Ls||!Ls.grabbed())&&ko!=eb&&(eb&&eb.emit(Ft("tapdragout")),ko&&ko.emit(Ft("tapdragover"))),t.touchData.last=ko,Pe)for(var _o=0;_o<Je.length;_o++)Je[_o]&&t.touchData.startPosition[_o]&&Un&&(t.touchData.singleTouchMoved=!0);if(Pe&&(Ls==null||Ls.pannable())&&We.panningEnabled()&&We.userPanningEnabled()){var _2=h(Ls,t.touchData.starts);_2&&(ie.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=xg(t.touchData.startPosition)),t.swipePanning?(We.panBy({x:Gn[0]*rt,y:Gn[1]*rt}),We.emit(Ft("dragpan"))):Un&&(t.swipePanning=!0,We.panBy({x:Hn*rt,y:gi*rt}),We.emit(Ft("dragpan")),Ls&&(Ls.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));var $t=t.projectIntoViewport(ie.touches[0].clientX,ie.touches[0].clientY);Je[0]=$t[0],Je[1]=$t[1]}}for(var Kt=0;Kt<Je.length;Kt++)yt[Kt]=Je[Kt];Pe&&ie.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var st;t.registerBinding(r,"touchcancel",st=function(ie){var Pe=t.touchData.start;t.touchData.capture=!1,Pe&&Pe.unactivate()});var Ot,At,Rt,zt;if(t.registerBinding(r,"touchend",Ot=function(ie){var Pe=t.touchData.start,He=t.touchData.capture;if(He)ie.touches.length===0&&(t.touchData.capture=!1),ie.preventDefault();else return;var We=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var Je=t.cy,yt=Je.zoom(),rt=t.touchData.now,$t=t.touchData.earlier;if(ie.touches[0]){var Ft=t.projectIntoViewport(ie.touches[0].clientX,ie.touches[0].clientY);rt[0]=Ft[0],rt[1]=Ft[1]}if(ie.touches[1]){var Ft=t.projectIntoViewport(ie.touches[1].clientX,ie.touches[1].clientY);rt[2]=Ft[0],rt[3]=Ft[1]}if(ie.touches[2]){var Ft=t.projectIntoViewport(ie.touches[2].clientX,ie.touches[2].clientY);rt[4]=Ft[0],rt[5]=Ft[1]}var rn=function(Xo){return{originalEvent:ie,type:Xo,position:{x:rt[0],y:rt[1]}}};Pe&&Pe.unactivate();var Un;if(t.touchData.cxt){if(Un=rn("cxttapend"),Pe?Pe.emit(Un):Je.emit(Un),!t.touchData.cxtDragged){var Gn=rn("cxttap");Pe?Pe.emit(Gn):Je.emit(Gn)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!ie.touches[2]&&Je.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var Kt=Je.collection(t.getAllInBox(We[0],We[1],We[2],We[3]));We[0]=void 0,We[1]=void 0,We[2]=void 0,We[3]=void 0,We[4]=0,t.redrawHint("select",!0),Je.emit(rn("boxend"));var Hn=function(Xo){return Xo.selectable()&&!Xo.selected()};Kt.emit(rn("box")).stdFilter(Hn).select().emit(rn("boxselect")),Kt.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(Pe!=null&&Pe.unactivate(),ie.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!ie.touches[1]&&!ie.touches[0]&&!ie.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var dr=t.dragData.touchDragEles;if(Pe!=null){var gi=Pe._private.grabbed;T(dr),t.redrawHint("drag",!0),t.redrawHint("eles",!0),gi&&(Pe.emit(rn("freeon")),dr.emit(rn("free")),t.dragData.didDrag&&(Pe.emit(rn("dragfreeon")),dr.emit(rn("dragfree")))),c(Pe,["touchend","tapend","vmouseup","tapdragout"],ie,{x:rt[0],y:rt[1]}),Pe.unactivate(),t.touchData.start=null}else{var ka=t.findNearestElement(rt[0],rt[1],!0,!0);c(ka,["touchend","tapend","vmouseup","tapdragout"],ie,{x:rt[0],y:rt[1]})}var no=t.touchData.startPosition[0]-rt[0],Bi=no*no,da=t.touchData.startPosition[1]-rt[1],Ri=da*da,ro=Bi+Ri,ac=ro*yt*yt;t.touchData.singleTouchMoved||(Pe||Je.$(":selected").unselect(["tapunselect"]),c(Pe,["tap","vclick"],ie,{x:rt[0],y:rt[1]}),At=!1,ie.timeStamp-zt<=Je.multiClickDebounceTime()?(Rt&&clearTimeout(Rt),At=!0,zt=null,c(Pe,["dbltap","vdblclick"],ie,{x:rt[0],y:rt[1]})):(Rt=setTimeout(function(){At||c(Pe,["onetap","voneclick"],ie,{x:rt[0],y:rt[1]})},Je.multiClickDebounceTime()),zt=ie.timeStamp)),Pe!=null&&!t.dragData.didDrag&&Pe._private.selectable&&ac<t.touchTapThreshold2&&!t.pinching&&(Je.selectionType()==="single"?(Je.$(a).unmerge(Pe).unselect(["tapunselect"]),Pe.select(["tapselect"])):Pe.selected()?Pe.unselect(["tapunselect"]):Pe.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}for(var Gi=0;Gi<rt.length;Gi++)$t[Gi]=rt[Gi];t.dragData.didDrag=!1,ie.touches.length===0&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),ie.touches.length<2&&(ie.touches.length===1&&(t.touchData.startGPosition=[ie.touches[0].clientX,ie.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())},!1),typeof TouchEvent>"u"){var mn=[],sn=function(ie){return{clientX:ie.clientX,clientY:ie.clientY,force:1,identifier:ie.pointerId,pageX:ie.pageX,pageY:ie.pageY,radiusX:ie.width/2,radiusY:ie.height/2,screenX:ie.screenX,screenY:ie.screenY,target:ie.target}},or=function(ie){return{event:ie,touch:sn(ie)}},H=function(ie){mn.push(or(ie))},ne=function(ie){for(var Pe=0;Pe<mn.length;Pe++){var He=mn[Pe];if(He.event.pointerId===ie.pointerId){mn.splice(Pe,1);return}}},ue=function(ie){var Pe=mn.filter(function(He){return He.event.pointerId===ie.pointerId})[0];Pe.event=ie,Pe.touch=sn(ie)},we=function(ie){ie.touches=mn.map(function(Pe){return Pe.touch})},je=function(ie){return ie.pointerType==="mouse"||ie.pointerType===4};t.registerBinding(t.container,"pointerdown",function(ie){je(ie)||(ie.preventDefault(),H(ie),we(ie),Ze(ie))}),t.registerBinding(t.container,"pointerup",function(ie){je(ie)||(ne(ie),we(ie),Ot(ie))}),t.registerBinding(t.container,"pointercancel",function(ie){je(ie)||(ne(ie),we(ie),st(ie))}),t.registerBinding(t.container,"pointermove",function(ie){je(ie)||(ie.preventDefault(),ue(ie),we(ie),mt(ie))})}};var af={};af.generatePolygon=function(t,r){return this.nodeShapes[t]={renderer:this,name:t,points:r,draw:function(a,s,c,f,h,d){this.renderer.nodeShapeImpl("polygon",a,s,c,f,h,this.points)},intersectLine:function(a,s,c,f,h,d,p,b){return c0(h,d,this.points,a,s,c/2,f/2,p)},checkPoint:function(a,s,c,f,h,d,p,b){return nf(a,s,this.points,d,p,f,h,[0,-1],c)},hasMiterBounds:t!=="rectangle",miterBounds:function(a,s,c,f,h,d){return Tue(this.points,a,s,c,f,h)}}},af.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(t,r,a,s,c,f){this.renderer.nodeShapeImpl(this.name,t,r,a,s,c)},intersectLine:function(t,r,a,s,c,f,h,d){return Bue(c,f,t,r,a/2+h,s/2+h)},checkPoint:function(t,r,a,s,c,f,h,d){return Gd(t,r,s,c,f,h,a)}}},af.generateRoundPolygon=function(t,r){return this.nodeShapes[t]={renderer:this,name:t,points:r,getOrCreateCorners:function(a,s,c,f,h,d,p){if(d[p]!==void 0&&d[p+"-cx"]===a&&d[p+"-cy"]===s)return d[p];d[p]=new Array(r.length/2),d[p+"-cx"]=a,d[p+"-cy"]=s;var b=c/2,m=f/2;h=h==="auto"?eO(c,f):h;for(var w=new Array(r.length/2),k=0;k<r.length/2;k++)w[k]={x:a+b*r[k*2],y:s+m*r[k*2+1]};var P,S,M,L,T=w.length;for(S=w[T-1],P=0;P<T;P++)M=w[P%T],L=w[(P+1)%T],d[p][P]=DP(S,M,L,h),S=M,M=L;return d[p]},draw:function(a,s,c,f,h,d,p){this.renderer.nodeShapeImpl("round-polygon",a,s,c,f,h,this.points,this.getOrCreateCorners(s,c,f,h,d,p,"drawCorners"))},intersectLine:function(a,s,c,f,h,d,p,b,m){return Gue(h,d,this.points,a,s,c,f,p,this.getOrCreateCorners(a,s,c,f,b,m,"corners"))},checkPoint:function(a,s,c,f,h,d,p,b,m){return Due(a,s,this.points,d,p,f,h,this.getOrCreateCorners(d,p,f,h,b,m,"corners"))}}},af.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Wo(4,0),draw:function(t,r,a,s,c,f){this.renderer.nodeShapeImpl(this.name,t,r,a,s,c,this.points,f)},intersectLine:function(t,r,a,s,c,f,h,d){return J8(c,f,t,r,a,s,h,d)},checkPoint:function(t,r,a,s,c,f,h,d){var p=s/2,b=c/2;d=d==="auto"?dh(s,c):d,d=Math.min(p,b,d);var m=d*2;return!!(nf(t,r,this.points,f,h,s,c-m,[0,-1],a)||nf(t,r,this.points,f,h,s-m,c,[0,-1],a)||Gd(t,r,m,m,f-p+d,h-b+d,a)||Gd(t,r,m,m,f+p-d,h-b+d,a)||Gd(t,r,m,m,f+p-d,h+b-d,a)||Gd(t,r,m,m,f-p+d,h+b-d,a))}}},af.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:u3(),points:Wo(4,0),draw:function(t,r,a,s,c,f){this.renderer.nodeShapeImpl(this.name,t,r,a,s,c,null,f)},generateCutTrianglePts:function(t,r,a,s,c){var f=c==="auto"?this.cornerLength:c,h=r/2,d=t/2,p=a-d,b=a+d,m=s-h,w=s+h;return{topLeft:[p,m+f,p+f,m,p+f,m+f],topRight:[b-f,m,b,m+f,b-f,m+f],bottomRight:[b,w-f,b-f,w,b-f,w-f],bottomLeft:[p+f,w,p,w-f,p+f,w-f]}},intersectLine:function(t,r,a,s,c,f,h,d){var p=this.generateCutTrianglePts(a+2*h,s+2*h,t,r,d),b=[].concat.apply([],[p.topLeft.splice(0,4),p.topRight.splice(0,4),p.bottomRight.splice(0,4),p.bottomLeft.splice(0,4)]);return c0(c,f,b,t,r)},checkPoint:function(t,r,a,s,c,f,h,d){var p=d==="auto"?this.cornerLength:d;if(nf(t,r,this.points,f,h,s,c-2*p,[0,-1],a)||nf(t,r,this.points,f,h,s-2*p,c,[0,-1],a))return!0;var b=this.generateCutTrianglePts(s,c,f,h);return Ms(t,r,b.topLeft)||Ms(t,r,b.topRight)||Ms(t,r,b.bottomRight)||Ms(t,r,b.bottomLeft)}}},af.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Wo(4,0),draw:function(t,r,a,s,c,f){this.renderer.nodeShapeImpl(this.name,t,r,a,s,c)},intersectLine:function(t,r,a,s,c,f,h,d){var p=.15,b=.5,m=.85,w=this.generateBarrelBezierPts(a+2*h,s+2*h,t,r),k=function(S){var M=kg({x:S[0],y:S[1]},{x:S[2],y:S[3]},{x:S[4],y:S[5]},p),L=kg({x:S[0],y:S[1]},{x:S[2],y:S[3]},{x:S[4],y:S[5]},b),T=kg({x:S[0],y:S[1]},{x:S[2],y:S[3]},{x:S[4],y:S[5]},m);return[S[0],S[1],M.x,M.y,L.x,L.y,T.x,T.y,S[4],S[5]]},P=[].concat(k(w.topLeft),k(w.topRight),k(w.bottomRight),k(w.bottomLeft));return c0(c,f,P,t,r)},generateBarrelBezierPts:function(t,r,a,s){var c=r/2,f=t/2,h=a-f,d=a+f,p=s-c,b=s+c,m=c3(t,r),w=m.heightOffset,k=m.widthOffset,P=m.ctrlPtOffsetPct*t,S={topLeft:[h,p+w,h+P,p,h+k,p],topRight:[d-k,p,d-P,p,d,p+w],bottomRight:[d,b-w,d-P,b,d-k,b],bottomLeft:[h+k,b,h+P,b,h,b-w]};return S.topLeft.isTop=!0,S.topRight.isTop=!0,S.bottomLeft.isBottom=!0,S.bottomRight.isBottom=!0,S},checkPoint:function(t,r,a,s,c,f,h,d){var p=c3(s,c),b=p.heightOffset,m=p.widthOffset;if(nf(t,r,this.points,f,h,s,c-2*b,[0,-1],a)||nf(t,r,this.points,f,h,s-2*m,c,[0,-1],a))return!0;for(var w=this.generateBarrelBezierPts(s,c,f,h),k=function(Y,G,U){var z=U[4],Q=U[2],$=U[0],Z=U[5],X=U[1],K=Math.min(z,$),ae=Math.max(z,$),se=Math.min(Z,X),le=Math.max(Z,X);if(K<=Y&&Y<=ae&&se<=G&&G<=le){var he=Hue(z,Q,$),fe=Aue(he[0],he[1],he[2],Y),pe=fe.filter(function(me){return 0<=me&&me<=1});if(pe.length>0)return pe[0]}return null},P=Object.keys(w),S=0;S<P.length;S++){var M=P[S],L=w[M],T=k(t,r,L);if(T!=null){var j=L[5],I=L[3],D=L[1],R=Xa(j,I,D,T);if(L.isTop&&R<=r||L.isBottom&&r<=R)return!0}}return!1}}},af.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Wo(4,0),draw:function(t,r,a,s,c,f){this.renderer.nodeShapeImpl(this.name,t,r,a,s,c,this.points,f)},intersectLine:function(t,r,a,s,c,f,h,d){var p=t-(a/2+h),b=r-(s/2+h),m=b,w=t+(a/2+h),k=hh(c,f,t,r,p,b,w,m,!1);return k.length>0?k:J8(c,f,t,r,a,s,h,d)},checkPoint:function(t,r,a,s,c,f,h,d){d=d==="auto"?dh(s,c):d;var p=2*d;if(nf(t,r,this.points,f,h,s,c-p,[0,-1],a)||nf(t,r,this.points,f,h,s-p,c,[0,-1],a))return!0;var b=s/2+2*a,m=c/2+2*a,w=[f-b,h-m,f-b,h,f+b,h,f+b,h-m];return!!(Ms(t,r,w)||Gd(t,r,p,p,f+s/2-d,h+c/2-d,a)||Gd(t,r,p,p,f-s/2+d,h+c/2-d,a))}}},af.registerNodeShapes=function(){var t=this.nodeShapes={},r=this;this.generateEllipse(),this.generatePolygon("triangle",Wo(3,0)),this.generateRoundPolygon("round-triangle",Wo(3,0)),this.generatePolygon("rectangle",Wo(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var a=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",a),this.generateRoundPolygon("round-diamond",a)}this.generatePolygon("pentagon",Wo(5,0)),this.generateRoundPolygon("round-pentagon",Wo(5,0)),this.generatePolygon("hexagon",Wo(6,0)),this.generateRoundPolygon("round-hexagon",Wo(6,0)),this.generatePolygon("heptagon",Wo(7,0)),this.generateRoundPolygon("round-heptagon",Wo(7,0)),this.generatePolygon("octagon",Wo(8,0)),this.generateRoundPolygon("round-octagon",Wo(8,0));var s=new Array(20);{var c=s3(5,0),f=s3(5,Math.PI/5),h=.5*(3-Math.sqrt(5));h*=1.57;for(var d=0;d<f.length/2;d++)f[d*2]*=h,f[d*2+1]*=h;for(var d=0;d<20/4;d++)s[d*4]=c[d*2],s[d*4+1]=c[d*2+1],s[d*4+2]=f[d*2],s[d*4+3]=f[d*2+1]}s=X8(s),this.generatePolygon("star",s),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 p=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",p),this.generateRoundPolygon("round-tag",p)}t.makePolygon=function(b){var m=b.join("$"),w="polygon-"+m,k;return(k=this[w])?k:r.generatePolygon(w,b)}};var E0={};E0.timeToRender=function(){return this.redrawTotalTime/this.redrawCount},E0.redraw=function(t){t=t||U8();var r=this;r.averageRedrawTime===void 0&&(r.averageRedrawTime=0),r.lastRedrawTime===void 0&&(r.lastRedrawTime=0),r.lastDrawTime===void 0&&(r.lastDrawTime=0),r.requestedFrame=!0,r.renderOptions=t},E0.beforeRender=function(t,r){if(!this.destroyed){r==null&&_i("Priority is not optional for beforeRender");var a=this.beforeRenderCallbacks;a.push({fn:t,priority:r}),a.sort(function(s,c){return c.priority-s.priority})}};var zB=function(t,r,a){for(var s=t.beforeRenderCallbacks,c=0;c<s.length;c++)s[c].fn(r,a)};E0.startRenderLoop=function(){var t=this,r=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var a=function(s){if(!t.destroyed){if(!r.batching())if(t.requestedFrame&&!t.skipFrame){zB(t,!0,s);var c=Xl();t.render(t.renderOptions);var f=t.lastDrawTime=Xl();t.averageRedrawTime===void 0&&(t.averageRedrawTime=f-c),t.redrawCount===void 0&&(t.redrawCount=0),t.redrawCount++,t.redrawTotalTime===void 0&&(t.redrawTotalTime=0);var h=f-c;t.redrawTotalTime+=h,t.lastRedrawTime=h,t.averageRedrawTime=t.averageRedrawTime/2+h/2,t.requestedFrame=!1}else zB(t,!1,s);t.skipFrame=!1,Vm(a)}};Vm(a)}};var nhe=function(t){this.init(t)},UB=nhe,Rg=UB.prototype;Rg.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],Rg.init=function(t){var r=this;r.options=t,r.cy=t.cy;var a=r.container=t.cy.container(),s=r.cy.window();if(s){var c=s.document,f=c.head,h="__________cytoscape_stylesheet",d="__________cytoscape_container",p=c.getElementById(h)!=null;if(a.className.indexOf(d)<0&&(a.className=(a.className||"")+" "+d),!p){var b=c.createElement("style");b.id=h,b.textContent="."+d+" { position: relative; }",f.insertBefore(b,f.children[0])}var m=s.getComputedStyle(a),w=m.getPropertyValue("position");w==="static"&&jr("A Cytoscape container has style position:static and so can not use UI extensions properly")}r.selection=[void 0,void 0,void 0,void 0,0],r.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],r.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},r.dragData={possibleDragElements:[]},r.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]},r.redraws=0,r.showFps=t.showFps,r.debug=t.debug,r.webgl=t.webgl,r.hideEdgesOnViewport=t.hideEdgesOnViewport,r.textureOnViewport=t.textureOnViewport,r.wheelSensitivity=t.wheelSensitivity,r.motionBlurEnabled=t.motionBlur,r.forcedPixelRatio=jt(t.pixelRatio)?t.pixelRatio:null,r.motionBlur=t.motionBlur,r.motionBlurOpacity=t.motionBlurOpacity,r.motionBlurTransparency=1-r.motionBlurOpacity,r.motionBlurPxRatio=1,r.mbPxRBlurry=1,r.minMbLowQualFrames=4,r.fullQualityMb=!1,r.clearedForMotionBlur=[],r.desktopTapThreshold=t.desktopTapThreshold,r.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,r.touchTapThreshold=t.touchTapThreshold,r.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,r.tapholdDuration=500,r.bindings=[],r.beforeRenderCallbacks=[],r.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},r.registerNodeShapes(),r.registerArrowShapes(),r.registerCalculationListeners()},Rg.notify=function(t,r){var a=this,s=a.cy;if(!this.destroyed){if(t==="init"){a.load();return}if(t==="destroy"){a.destroy();return}(t==="add"||t==="remove"||t==="move"&&s.hasCompoundNodes()||t==="load"||t==="zorder"||t==="mount")&&a.invalidateCachedZSortedEles(),t==="viewport"&&a.redrawHint("select",!0),t==="gc"&&a.redrawHint("gc",!0),(t==="load"||t==="resize"||t==="mount")&&(a.invalidateContainerClientCoordsCache(),a.matchCanvasSize(a.container)),a.redrawHint("eles",!0),a.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},Rg.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var r=0;r<t.bindings.length;r++){var a=t.bindings[r],s=a,c=s.target;(c.off||c.removeEventListener).apply(c,s.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch{}},Rg.isHeadless=function(){return!1},[jP,GB,HB,Bg,af,E0].forEach(function(t){fn(Rg,t)});var RP=1e3/60,FB={setupDequeueing:function(t){return function(){var r=this,a=this.renderer;if(!r.dequeueingSetup){r.dequeueingSetup=!0;var s=n0(function(){a.redrawHint("eles",!0),a.redrawHint("drag",!0),a.redraw()},t.deqRedrawThreshold),c=function(h,d){var p=Xl(),b=a.averageRedrawTime,m=a.lastRedrawTime,w=[],k=a.cy.extent(),P=a.getPixelRatio();for(h||a.flushRenderedStyleQueue();;){var S=Xl(),M=S-p,L=S-d;if(m<RP){var T=RP-(h?b:0);if(L>=t.deqFastCost*T)break}else if(h){if(M>=t.deqCost*m||M>=t.deqAvgCost*b)break}else if(L>=t.deqNoDrawCost*RP)break;var j=t.deq(r,P,k);if(j.length>0)for(var I=0;I<j.length;I++)w.push(j[I]);else break}w.length>0&&(t.onDeqd(r,w),!h&&t.shouldRedraw(r,w,P,k)&&s())},f=t.priority||JC;a.beforeRender(c,f(r))}}}},rhe=function(){function t(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Zm;ah(this,t),this.idsByKey=new tf,this.keyForId=new tf,this.cachesByLvl=new tf,this.lvls=[],this.getKey=r,this.doesEleInvalidateKey=a}return oh(t,[{key:"getIdsFor",value:function(r){r==null&&_i("Can not get id list for null key");var a=this.idsByKey,s=this.idsByKey.get(r);return s||(s=new wg,a.set(r,s)),s}},{key:"addIdForKey",value:function(r,a){r!=null&&this.getIdsFor(r).add(a)}},{key:"deleteIdForKey",value:function(r,a){r!=null&&this.getIdsFor(r).delete(a)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var a=r.id(),s=this.keyForId.get(a),c=this.getKey(r);this.deleteIdForKey(s,a),this.addIdForKey(c,a),this.keyForId.set(a,c)}},{key:"deleteKeyMappingFor",value:function(r){var a=r.id(),s=this.keyForId.get(a);this.deleteIdForKey(s,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(r){var a=r.id(),s=this.keyForId.get(a),c=this.getKey(r);return s!==c}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var a=this.cachesByLvl,s=this.lvls,c=a.get(r);return c||(c=new tf,a.set(r,c),s.push(r)),c}},{key:"getCache",value:function(r,a){return this.getCachesAt(a).get(r)}},{key:"get",value:function(r,a){var s=this.getKey(r),c=this.getCache(s,a);return c!=null&&this.updateKeyMappingFor(r),c}},{key:"getForCachedKey",value:function(r,a){var s=this.keyForId.get(r.id()),c=this.getCache(s,a);return c}},{key:"hasCache",value:function(r,a){return this.getCachesAt(a).has(r)}},{key:"has",value:function(r,a){var s=this.getKey(r);return this.hasCache(s,a)}},{key:"setCache",value:function(r,a,s){s.key=r,this.getCachesAt(a).set(r,s)}},{key:"set",value:function(r,a,s){var c=this.getKey(r);this.setCache(c,a,s),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,a){this.getCachesAt(a).delete(r)}},{key:"delete",value:function(r,a){var s=this.getKey(r);this.deleteCache(s,a)}},{key:"invalidateKey",value:function(r){var a=this;this.lvls.forEach(function(s){return a.deleteCache(r,s)})}},{key:"invalidate",value:function(r){var a=r.id(),s=this.keyForId.get(a);this.deleteKeyMappingFor(r);var c=this.doesEleInvalidateKey(r);return c&&this.invalidateKey(s),c||this.getNumberOfIdsForKey(s)===0}}])}(),YB=25,Lw=50,Ow=-4,GP=3,VB=7.99,ihe=8,ahe=1024,ohe=1024,she=1024,uhe=.2,che=.8,lhe=10,fhe=.15,hhe=.1,dhe=.9,phe=.9,ghe=100,bhe=1,Gg={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},vhe=yo({getKey:null,doesEleInvalidateKey:Zm,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:R8,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),C0=function(t,r){var a=this;a.renderer=t,a.onDequeues=[];var s=vhe(r);fn(a,s),a.lookup=new rhe(s.getKey,s.doesEleInvalidateKey),a.setupDequeueing()},Ba=C0.prototype;Ba.reasons=Gg,Ba.getTextureQueue=function(t){var r=this;return r.eleImgCaches=r.eleImgCaches||{},r.eleImgCaches[t]=r.eleImgCaches[t]||[]},Ba.getRetiredTextureQueue=function(t){var r=this,a=r.eleImgCaches.retired=r.eleImgCaches.retired||{},s=a[t]=a[t]||[];return s},Ba.getElementQueue=function(){var t=this,r=t.eleCacheQueue=t.eleCacheQueue||new o0(function(a,s){return s.reqs-a.reqs});return r},Ba.getElementKeyToQueue=function(){var t=this,r=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return r},Ba.getElement=function(t,r,a,s,c){var f=this,h=this.renderer,d=h.cy.zoom(),p=this.lookup;if(!r||r.w===0||r.h===0||isNaN(r.w)||isNaN(r.h)||!t.visible()||t.removed()||!f.allowEdgeTxrCaching&&t.isEdge()||!f.allowParentTxrCaching&&t.isParent())return null;if(s==null&&(s=Math.ceil(r3(d*a))),s<Ow)s=Ow;else if(d>=VB||s>GP)return null;var b=Math.pow(2,s),m=r.h*b,w=r.w*b,k=h.eleTextBiggerThanMin(t,b);if(!this.isVisible(t,k))return null;var P=p.get(t,s);if(P&&P.invalidated&&(P.invalidated=!1,P.texture.invalidatedWidth-=P.width),P)return P;var S;if(m<=YB?S=YB:m<=Lw?S=Lw:S=Math.ceil(m/Lw)*Lw,m>she||w>ohe)return null;var M=f.getTextureQueue(S),L=M[M.length-2],T=function(){return f.recycleTexture(S,w)||f.addTexture(S,w)};L||(L=M[M.length-1]),L||(L=T()),L.width-L.usedWidth<w&&(L=T());for(var j=function(ae){return ae&&ae.scaledLabelShown===k},I=c&&c===Gg.dequeue,D=c&&c===Gg.highQuality,R=c&&c===Gg.downscale,Y,G=s+1;G<=GP;G++){var U=p.get(t,G);if(U){Y=U;break}}var z=Y&&Y.level===s+1?Y:null,Q=function(){L.context.drawImage(z.texture.canvas,z.x,0,z.width,z.height,L.usedWidth,0,w,m)};if(L.context.setTransform(1,0,0,1,0,0),L.context.clearRect(L.usedWidth,0,w,S),j(z))Q();else if(j(Y))if(D){for(var $=Y.level;$>s;$--)z=f.getElement(t,r,a,$,Gg.downscale);Q()}else return f.queueElement(t,Y.level-1),Y;else{var Z;if(!I&&!D&&!R)for(var X=s-1;X>=Ow;X--){var K=p.get(t,X);if(K){Z=K;break}}if(j(Z))return f.queueElement(t,s),Z;L.context.translate(L.usedWidth,0),L.context.scale(b,b),this.drawElement(L.context,t,r,k,!1),L.context.scale(1/b,1/b),L.context.translate(-L.usedWidth,0)}return P={x:L.usedWidth,texture:L,level:s,scale:b,width:w,height:m,scaledLabelShown:k},L.usedWidth+=Math.ceil(w+ihe),L.eleCaches.push(P),p.set(t,s,P),f.checkTextureFullness(L),P},Ba.invalidateElements=function(t){for(var r=0;r<t.length;r++)this.invalidateElement(t[r])},Ba.invalidateElement=function(t){var r=this,a=r.lookup,s=[],c=a.isInvalid(t);if(c){for(var f=Ow;f<=GP;f++){var h=a.getForCachedKey(t,f);h&&s.push(h)}var d=a.invalidate(t);if(d)for(var p=0;p<s.length;p++){var b=s[p],m=b.texture;m.invalidatedWidth+=b.width,b.invalidated=!0,r.checkTextureUtility(m)}r.removeFromQueue(t)}},Ba.checkTextureUtility=function(t){t.invalidatedWidth>=uhe*t.width&&this.retireTexture(t)},Ba.checkTextureFullness=function(t){var r=this,a=r.getTextureQueue(t.height);t.usedWidth/t.width>che&&t.fullnessChecks>=lhe?lh(a,t):t.fullnessChecks++},Ba.retireTexture=function(t){var r=this,a=t.height,s=r.getTextureQueue(a),c=this.lookup;lh(s,t),t.retired=!0;for(var f=t.eleCaches,h=0;h<f.length;h++){var d=f[h];c.deleteCache(d.key,d.level)}XC(f);var p=r.getRetiredTextureQueue(a);p.push(t)},Ba.addTexture=function(t,r){var a=this,s=a.getTextureQueue(t),c={};return s.push(c),c.eleCaches=[],c.height=t,c.width=Math.max(ahe,r),c.usedWidth=0,c.invalidatedWidth=0,c.fullnessChecks=0,c.canvas=a.renderer.makeOffscreenCanvas(c.width,c.height),c.context=c.canvas.getContext("2d"),c},Ba.recycleTexture=function(t,r){for(var a=this,s=a.getTextureQueue(t),c=a.getRetiredTextureQueue(t),f=0;f<c.length;f++){var h=c[f];if(h.width>=r)return h.retired=!1,h.usedWidth=0,h.invalidatedWidth=0,h.fullnessChecks=0,XC(h.eleCaches),h.context.setTransform(1,0,0,1,0,0),h.context.clearRect(0,0,h.width,h.height),lh(c,h),s.push(h),h}},Ba.queueElement=function(t,r){var a=this,s=a.getElementQueue(),c=a.getElementKeyToQueue(),f=this.getKey(t),h=c[f];if(h)h.level=Math.max(h.level,r),h.eles.merge(t),h.reqs++,s.updateItem(h);else{var d={eles:t.spawn().merge(t),level:r,reqs:1,key:f};s.push(d),c[f]=d}},Ba.dequeue=function(t){for(var r=this,a=r.getElementQueue(),s=r.getElementKeyToQueue(),c=[],f=r.lookup,h=0;h<bhe&&a.size()>0;h++){var d=a.pop(),p=d.key,b=d.eles[0],m=f.hasCache(b,d.level);if(s[p]=null,!m){c.push(d);var w=r.getBoundingBox(b);r.getElement(b,w,t,d.level,Gg.dequeue)}}return c},Ba.removeFromQueue=function(t){var r=this,a=r.getElementQueue(),s=r.getElementKeyToQueue(),c=this.getKey(t),f=s[c];f!=null&&(f.eles.length===1?(f.reqs=WC,a.updateItem(f),a.pop(),s[c]=null):f.eles.unmerge(t))},Ba.onDequeue=function(t){this.onDequeues.push(t)},Ba.offDequeue=function(t){lh(this.onDequeues,t)},Ba.setupDequeueing=FB.setupDequeueing({deqRedrawThreshold:ghe,deqCost:fhe,deqAvgCost:hhe,deqNoDrawCost:dhe,deqFastCost:phe,deq:function(t,r,a){return t.dequeue(r,a)},onDeqd:function(t,r){for(var a=0;a<t.onDequeues.length;a++){var s=t.onDequeues[a];s(r)}},shouldRedraw:function(t,r,a,s){for(var c=0;c<r.length;c++)for(var f=r[c].eles,h=0;h<f.length;h++){var d=f[h].boundingBox();if(a3(d,s))return!0}return!1},priority:function(t){return t.renderer.beforeRenderPriorities.eleTxrDeq}});var yhe=1,P0=-4,Dw=2,mhe=3.99,whe=50,xhe=50,khe=.15,_he=.1,Ehe=.9,Che=.9,Phe=1,qB=250,She=4e3*4e3,ZB=32767,Nhe=!0,$B=function(t){var r=this,a=r.renderer=t,s=a.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=Xl()-2*qB,r.skipping=!1,r.eleTxrDeqs=s.collection(),r.scheduleElementRefinement=n0(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},xhe),a.beforeRender(function(f,h){h-r.lastInvalidationTime<=qB?r.skipping=!0:r.skipping=!1},a.beforeRenderPriorities.lyrTxrSkip);var c=function(f,h){return h.reqs-f.reqs};r.layersQueue=new o0(c),r.setupDequeueing()},xo=$B.prototype,KB=0,The=Math.pow(2,53)-1;xo.makeLayer=function(t,r){var a=Math.pow(2,r),s=Math.ceil(t.w*a),c=Math.ceil(t.h*a),f=this.renderer.makeOffscreenCanvas(s,c),h={id:KB=++KB%The,bb:t,level:r,width:s,height:c,canvas:f,context:f.getContext("2d"),eles:[],elesQueue:[],reqs:0},d=h.context,p=-h.bb.x1,b=-h.bb.y1;return d.scale(a,a),d.translate(p,b),h},xo.getLayers=function(t,r,a){var s=this,c=s.renderer,f=c.cy,h=f.zoom(),d=s.firstGet;if(s.firstGet=!1,a==null){if(a=Math.ceil(r3(h*r)),a<P0)a=P0;else if(h>=mhe||a>Dw)return null}s.validateLayersElesOrdering(a,t);var p=s.layersByLevel,b=Math.pow(2,a),m=p[a]=p[a]||[],w,k=s.levelIsComplete(a,t),P,S=function(){var z=function(X){if(s.validateLayersElesOrdering(X,t),s.levelIsComplete(X,t))return P=p[X],!0},Q=function(X){if(!P)for(var K=a+X;P0<=K&&K<=Dw&&!z(K);K+=X);};Q(1),Q(-1);for(var $=m.length-1;$>=0;$--){var Z=m[$];Z.invalid&&lh(m,Z)}};if(!k)S();else return m;var M=function(){if(!w){w=Qo();for(var z=0;z<t.length;z++)Pue(w,t[z].boundingBox())}return w},L=function(z){z=z||{};var Q=z.after;M();var $=Math.ceil(w.w*b),Z=Math.ceil(w.h*b);if($>ZB||Z>ZB)return null;var X=$*Z;if(X>She)return null;var K=s.makeLayer(w,a);if(Q!=null){var ae=m.indexOf(Q)+1;m.splice(ae,0,K)}else(z.insert===void 0||z.insert)&&m.unshift(K);return K};if(s.skipping&&!d)return null;for(var T=null,j=t.length/yhe,I=!d,D=0;D<t.length;D++){var R=t[D],Y=R._private.rscratch,G=Y.imgLayerCaches=Y.imgLayerCaches||{},U=G[a];if(U){T=U;continue}if((!T||T.eles.length>=j||!W8(T.bb,R.boundingBox()))&&(T=L({insert:!0,after:T}),!T))return null;P||I?s.queueLayer(T,R):s.drawEleInLayer(T,R,a,r),T.eles.push(R),G[a]=T}return P||(I?null:m)},xo.getEleLevelForLayerLevel=function(t,r){return t},xo.drawEleInLayer=function(t,r,a,s){var c=this,f=this.renderer,h=t.context,d=r.boundingBox();d.w===0||d.h===0||!r.visible()||(a=c.getEleLevelForLayerLevel(a,s),f.setImgSmoothing(h,!1),f.drawCachedElement(h,r,null,null,a,Nhe),f.setImgSmoothing(h,!0))},xo.levelIsComplete=function(t,r){var a=this,s=a.layersByLevel[t];if(!s||s.length===0)return!1;for(var c=0,f=0;f<s.length;f++){var h=s[f];if(h.reqs>0||h.invalid)return!1;c+=h.eles.length}return c===r.length},xo.validateLayersElesOrdering=function(t,r){var a=this.layersByLevel[t];if(a)for(var s=0;s<a.length;s++){for(var c=a[s],f=-1,h=0;h<r.length;h++)if(c.eles[0]===r[h]){f=h;break}if(f<0){this.invalidateLayer(c);continue}for(var d=f,h=0;h<c.eles.length;h++)if(c.eles[h]!==r[d+h]){this.invalidateLayer(c);break}}},xo.updateElementsInLayers=function(t,r){for(var a=this,s=Jv(t[0]),c=0;c<t.length;c++)for(var f=s?null:t[c],h=s?t[c]:t[c].ele,d=h._private.rscratch,p=d.imgLayerCaches=d.imgLayerCaches||{},b=P0;b<=Dw;b++){var m=p[b];m&&(f&&a.getEleLevelForLayerLevel(m.level)!==f.level||r(m,h,f))}},xo.haveLayers=function(){for(var t=this,r=!1,a=P0;a<=Dw;a++){var s=t.layersByLevel[a];if(s&&s.length>0){r=!0;break}}return r},xo.invalidateElements=function(t){var r=this;t.length!==0&&(r.lastInvalidationTime=Xl(),!(t.length===0||!r.haveLayers())&&r.updateElementsInLayers(t,function(a,s,c){r.invalidateLayer(a)}))},xo.invalidateLayer=function(t){if(this.lastInvalidationTime=Xl(),!t.invalid){var r=t.level,a=t.eles,s=this.layersByLevel[r];lh(s,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var c=0;c<a.length;c++){var f=a[c]._private.rscratch.imgLayerCaches;f&&(f[r]=null)}}},xo.refineElementTextures=function(t){var r=this;r.updateElementsInLayers(t,function(a,s,c){var f=a.replacement;if(f||(f=a.replacement=r.makeLayer(a.bb,a.level),f.replaces=a,f.eles=a.eles),!f.reqs)for(var h=0;h<f.eles.length;h++)r.queueLayer(f,f.eles[h])})},xo.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},xo.queueLayer=function(t,r){var a=this,s=a.layersQueue,c=t.elesQueue,f=c.hasId=c.hasId||{};if(!t.replacement){if(r){if(f[r.id()])return;c.push(r),f[r.id()]=!0}t.reqs?(t.reqs++,s.updateItem(t)):(t.reqs=1,s.push(t))}},xo.dequeue=function(t){for(var r=this,a=r.layersQueue,s=[],c=0;c<Phe&&a.size()!==0;){var f=a.peek();if(f.replacement){a.pop();continue}if(f.replaces&&f!==f.replaces.replacement){a.pop();continue}if(f.invalid){a.pop();continue}var h=f.elesQueue.shift();h&&(r.drawEleInLayer(f,h,f.level,t),c++),s.length===0&&s.push(!0),f.elesQueue.length===0&&(a.pop(),f.reqs=0,f.replaces&&r.applyLayerReplacement(f),r.requestRedraw())}return s},xo.applyLayerReplacement=function(t){var r=this,a=r.layersByLevel[t.level],s=t.replaces,c=a.indexOf(s);if(!(c<0||s.invalid)){a[c]=t;for(var f=0;f<t.eles.length;f++){var h=t.eles[f]._private,d=h.imgLayerCaches=h.imgLayerCaches||{};d&&(d[t.level]=t)}r.requestRedraw()}},xo.requestRedraw=n0(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100),xo.setupDequeueing=FB.setupDequeueing({deqRedrawThreshold:whe,deqCost:khe,deqAvgCost:_he,deqNoDrawCost:Ehe,deqFastCost:Che,deq:function(t,r){return t.dequeue(r)},onDeqd:JC,shouldRedraw:R8,priority:function(t){return t.renderer.beforeRenderPriorities.lyrTxrDeq}});var QB={},WB;function Mhe(t,r){for(var a=0;a<r.length;a++){var s=r[a];t.lineTo(s.x,s.y)}}function jhe(t,r,a){for(var s,c=0;c<r.length;c++){var f=r[c];c===0&&(s=f),t.lineTo(f.x,f.y)}t.quadraticCurveTo(a.x,a.y,s.x,s.y)}function JB(t,r,a){t.beginPath&&t.beginPath();for(var s=r,c=0;c<s.length;c++){var f=s[c];t.lineTo(f.x,f.y)}var h=a,d=a[0];t.moveTo(d.x,d.y);for(var c=1;c<h.length;c++){var f=h[c];t.lineTo(f.x,f.y)}t.closePath&&t.closePath()}function Ahe(t,r,a,s,c){t.beginPath&&t.beginPath(),t.arc(a,s,c,0,Math.PI*2,!1);var f=r,h=f[0];t.moveTo(h.x,h.y);for(var d=0;d<f.length;d++){var p=f[d];t.lineTo(p.x,p.y)}t.closePath&&t.closePath()}function Ihe(t,r,a,s){t.arc(r,a,s,0,Math.PI*2,!1)}QB.arrowShapeImpl=function(t){return(WB||(WB={polygon:Mhe,"triangle-backcurve":jhe,"triangle-tee":JB,"circle-triangle":Ahe,"triangle-cross":JB,circle:Ihe}))[t]};var Jc={};Jc.drawElement=function(t,r,a,s,c,f){var h=this;r.isNode()?h.drawNode(t,r,a,s,c,f):h.drawEdge(t,r,a,s,c,f)},Jc.drawElementOverlay=function(t,r){var a=this;r.isNode()?a.drawNodeOverlay(t,r):a.drawEdgeOverlay(t,r)},Jc.drawElementUnderlay=function(t,r){var a=this;r.isNode()?a.drawNodeUnderlay(t,r):a.drawEdgeUnderlay(t,r)},Jc.drawCachedElementPortion=function(t,r,a,s,c,f,h,d){var p=this,b=a.getBoundingBox(r);if(!(b.w===0||b.h===0)){var m=a.getElement(r,b,s,c,f);if(m!=null){var w=d(p,r);if(w===0)return;var k=h(p,r),P=b.x1,S=b.y1,M=b.w,L=b.h,T,j,I,D,R;if(k!==0){var Y=a.getRotationPoint(r);I=Y.x,D=Y.y,t.translate(I,D),t.rotate(k),R=p.getImgSmoothing(t),R||p.setImgSmoothing(t,!0);var G=a.getRotationOffset(r);T=G.x,j=G.y}else T=P,j=S;var U;w!==1&&(U=t.globalAlpha,t.globalAlpha=U*w),t.drawImage(m.texture.canvas,m.x,0,m.width,m.height,T,j,M,L),w!==1&&(t.globalAlpha=U),k!==0&&(t.rotate(-k),t.translate(-I,-D),R||p.setImgSmoothing(t,!1))}else a.drawElement(t,r)}};var Lhe=function(){return 0},Ohe=function(t,r){return t.getTextAngle(r,null)},Dhe=function(t,r){return t.getTextAngle(r,"source")},Bhe=function(t,r){return t.getTextAngle(r,"target")},Rhe=function(t,r){return r.effectiveOpacity()},HP=function(t,r){return r.pstyle("text-opacity").pfValue*r.effectiveOpacity()};Jc.drawCachedElement=function(t,r,a,s,c,f){var h=this,d=h.data,p=d.eleTxrCache,b=d.lblTxrCache,m=d.slbTxrCache,w=d.tlbTxrCache,k=r.boundingBox(),P=f===!0?p.reasons.highQuality:null;if(!(k.w===0||k.h===0||!r.visible())&&(!s||a3(k,s))){var S=r.isEdge(),M=r.element()._private.rscratch.badLine;h.drawElementUnderlay(t,r),h.drawCachedElementPortion(t,r,p,a,c,P,Lhe,Rhe),(!S||!M)&&h.drawCachedElementPortion(t,r,b,a,c,P,Ohe,HP),S&&!M&&(h.drawCachedElementPortion(t,r,m,a,c,P,Dhe,HP),h.drawCachedElementPortion(t,r,w,a,c,P,Bhe,HP)),h.drawElementOverlay(t,r)}},Jc.drawElements=function(t,r){for(var a=this,s=0;s<r.length;s++){var c=r[s];a.drawElement(t,c)}},Jc.drawCachedElements=function(t,r,a,s){for(var c=this,f=0;f<r.length;f++){var h=r[f];c.drawCachedElement(t,h,a,s)}},Jc.drawCachedNodes=function(t,r,a,s){for(var c=this,f=0;f<r.length;f++){var h=r[f];h.isNode()&&c.drawCachedElement(t,h,a,s)}},Jc.drawLayeredElements=function(t,r,a,s){var c=this,f=c.data.lyrTxrCache.getLayers(r,a);if(f)for(var h=0;h<f.length;h++){var d=f[h],p=d.bb;p.w===0||p.h===0||t.drawImage(d.canvas,p.x1,p.y1,p.w,p.h)}else c.drawCachedElements(t,r,a,s)};var of={};of.drawEdge=function(t,r,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,h=this,d=r._private.rscratch;if(!(f&&!r.visible())&&!(d.badLine||d.allpts==null||isNaN(d.allpts[0]))){var p;a&&(p=a,t.translate(-p.x1,-p.y1));var b=f?r.pstyle("opacity").value:1,m=f?r.pstyle("line-opacity").value:1,w=r.pstyle("curve-style").value,k=r.pstyle("line-style").value,P=r.pstyle("width").pfValue,S=r.pstyle("line-cap").value,M=r.pstyle("line-outline-width").value,L=r.pstyle("line-outline-color").value,T=b*m,j=b*m,I=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T;w==="straight-triangle"?(h.eleStrokeStyle(t,r,K),h.drawEdgeTrianglePath(r,t,d.allpts)):(t.lineWidth=P,t.lineCap=S,h.eleStrokeStyle(t,r,K),h.drawEdgePath(r,t,d.allpts,k),t.lineCap="butt")},D=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T;if(t.lineWidth=P+M,t.lineCap=S,M>0)h.colorStrokeStyle(t,L[0],L[1],L[2],K);else{t.lineCap="butt";return}w==="straight-triangle"?h.drawEdgeTrianglePath(r,t,d.allpts):(h.drawEdgePath(r,t,d.allpts,k),t.lineCap="butt")},R=function(){c&&h.drawEdgeOverlay(t,r)},Y=function(){c&&h.drawEdgeUnderlay(t,r)},G=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:j;h.drawArrowheads(t,r,K)},U=function(){h.drawElementText(t,r,null,s)};t.lineJoin="round";var z=r.pstyle("ghost").value==="yes";if(z){var Q=r.pstyle("ghost-offset-x").pfValue,$=r.pstyle("ghost-offset-y").pfValue,Z=r.pstyle("ghost-opacity").value,X=T*Z;t.translate(Q,$),I(X),G(X),t.translate(-Q,-$)}else D();Y(),I(),G(),R(),U(),a&&t.translate(p.x1,p.y1)}};var XB=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(r,a){if(a.visible()){var s=a.pstyle("".concat(t,"-opacity")).value;if(s!==0){var c=this,f=c.usePaths(),h=a._private.rscratch,d=a.pstyle("".concat(t,"-padding")).pfValue,p=2*d,b=a.pstyle("".concat(t,"-color")).value;r.lineWidth=p,h.edgeType==="self"&&!f?r.lineCap="butt":r.lineCap="round",c.colorStrokeStyle(r,b[0],b[1],b[2],s),c.drawEdgePath(a,r,h.allpts,"solid")}}}};of.drawEdgeOverlay=XB("overlay"),of.drawEdgeUnderlay=XB("underlay"),of.drawEdgePath=function(t,r,a,s){var c=t._private.rscratch,f=r,h,d=!1,p=this.usePaths(),b=t.pstyle("line-dash-pattern").pfValue,m=t.pstyle("line-dash-offset").pfValue;if(p){var w=a.join("$"),k=c.pathCacheKey&&c.pathCacheKey===w;k?(h=r=c.pathCache,d=!0):(h=r=new Path2D,c.pathCacheKey=w,c.pathCache=h)}if(f.setLineDash)switch(s){case"dotted":f.setLineDash([1,1]);break;case"dashed":f.setLineDash(b),f.lineDashOffset=m;break;case"solid":f.setLineDash([]);break}if(!d&&!c.badLine)switch(r.beginPath&&r.beginPath(),r.moveTo(a[0],a[1]),c.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var P=2;P+3<a.length;P+=4)r.quadraticCurveTo(a[P],a[P+1],a[P+2],a[P+3]);break;case"straight":case"haystack":for(var S=2;S+1<a.length;S+=2)r.lineTo(a[S],a[S+1]);break;case"segments":if(c.isRound){var M=Ns(c.roundCorners),L;try{for(M.s();!(L=M.n()).done;){var T=L.value;AB(r,T)}}catch(I){M.e(I)}finally{M.f()}r.lineTo(a[a.length-2],a[a.length-1])}else for(var j=2;j+1<a.length;j+=2)r.lineTo(a[j],a[j+1]);break}r=f,p?r.stroke(h):r.stroke(),r.setLineDash&&r.setLineDash([])},of.drawEdgeTrianglePath=function(t,r,a){r.fillStyle=r.strokeStyle;for(var s=t.pstyle("width").pfValue,c=0;c+1<a.length;c+=2){var f=[a[c+2]-a[c],a[c+3]-a[c+1]],h=Math.sqrt(f[0]*f[0]+f[1]*f[1]),d=[f[1]/h,-f[0]/h],p=[d[0]*s/2,d[1]*s/2];r.beginPath(),r.moveTo(a[c]-p[0],a[c+1]-p[1]),r.lineTo(a[c]+p[0],a[c+1]+p[1]),r.lineTo(a[c+2],a[c+3]),r.closePath(),r.fill()}},of.drawArrowheads=function(t,r,a){var s=r._private.rscratch,c=s.edgeType==="haystack";c||this.drawArrowhead(t,r,"source",s.arrowStartX,s.arrowStartY,s.srcArrowAngle,a),this.drawArrowhead(t,r,"mid-target",s.midX,s.midY,s.midtgtArrowAngle,a),this.drawArrowhead(t,r,"mid-source",s.midX,s.midY,s.midsrcArrowAngle,a),c||this.drawArrowhead(t,r,"target",s.arrowEndX,s.arrowEndY,s.tgtArrowAngle,a)},of.drawArrowhead=function(t,r,a,s,c,f,h){if(!(isNaN(s)||s==null||isNaN(c)||c==null||isNaN(f)||f==null)){var d=this,p=r.pstyle(a+"-arrow-shape").value;if(p!=="none"){var b=r.pstyle(a+"-arrow-fill").value==="hollow"?"both":"filled",m=r.pstyle(a+"-arrow-fill").value,w=r.pstyle("width").pfValue,k=r.pstyle(a+"-arrow-width"),P=k.value==="match-line"?w:k.pfValue;k.units==="%"&&(P*=w);var S=r.pstyle("opacity").value;h===void 0&&(h=S);var M=t.globalCompositeOperation;(h!==1||m==="hollow")&&(t.globalCompositeOperation="destination-out",d.colorFillStyle(t,255,255,255,1),d.colorStrokeStyle(t,255,255,255,1),d.drawArrowShape(r,t,b,w,p,P,s,c,f),t.globalCompositeOperation=M);var L=r.pstyle(a+"-arrow-color").value;d.colorFillStyle(t,L[0],L[1],L[2],h),d.colorStrokeStyle(t,L[0],L[1],L[2],h),d.drawArrowShape(r,t,m,w,p,P,s,c,f)}}},of.drawArrowShape=function(t,r,a,s,c,f,h,d,p){var b=this,m=this.usePaths()&&c!=="triangle-cross",w=!1,k,P=r,S={x:h,y:d},M=t.pstyle("arrow-scale").value,L=this.getArrowWidth(s,M),T=b.arrowShapes[c];if(m){var j=b.arrowPathCache=b.arrowPathCache||[],I=Dd(c),D=j[I];D!=null?(k=r=D,w=!0):(k=r=new Path2D,j[I]=k)}w||(r.beginPath&&r.beginPath(),m?T.draw(r,1,0,{x:0,y:0},1):T.draw(r,L,p,S,s),r.closePath&&r.closePath()),r=P,m&&(r.translate(h,d),r.rotate(p),r.scale(L,L)),(a==="filled"||a==="both")&&(m?r.fill(k):r.fill()),(a==="hollow"||a==="both")&&(r.lineWidth=f/(m?L:1),r.lineJoin="miter",m?r.stroke(k):r.stroke()),m&&(r.scale(1/L,1/L),r.rotate(-p),r.translate(-h,-d))};var zP={};zP.safeDrawImage=function(t,r,a,s,c,f,h,d,p,b){if(!(c<=0||f<=0||p<=0||b<=0))try{t.drawImage(r,a,s,c,f,h,d,p,b)}catch(m){jr(m)}},zP.drawInscribedImage=function(t,r,a,s,c){var f=this,h=a.position(),d=h.x,p=h.y,b=a.cy().style(),m=b.getIndexedStyle.bind(b),w=m(a,"background-fit","value",s),k=m(a,"background-repeat","value",s),P=a.width(),S=a.height(),M=a.padding()*2,L=P+(m(a,"background-width-relative-to","value",s)==="inner"?0:M),T=S+(m(a,"background-height-relative-to","value",s)==="inner"?0:M),j=a._private.rscratch,I=m(a,"background-clip","value",s),D=I==="node",R=m(a,"background-image-opacity","value",s)*c,Y=m(a,"background-image-smoothing","value",s),G=a.pstyle("corner-radius").value;G!=="auto"&&(G=a.pstyle("corner-radius").pfValue);var U=r.width||r.cachedW,z=r.height||r.cachedH;(U==null||z==null)&&(document.body.appendChild(r),U=r.cachedW=r.width||r.offsetWidth,z=r.cachedH=r.height||r.offsetHeight,document.body.removeChild(r));var Q=U,$=z;if(m(a,"background-width","value",s)!=="auto"&&(m(a,"background-width","units",s)==="%"?Q=m(a,"background-width","pfValue",s)*L:Q=m(a,"background-width","pfValue",s)),m(a,"background-height","value",s)!=="auto"&&(m(a,"background-height","units",s)==="%"?$=m(a,"background-height","pfValue",s)*T:$=m(a,"background-height","pfValue",s)),!(Q===0||$===0)){if(w==="contain"){var Z=Math.min(L/Q,T/$);Q*=Z,$*=Z}else if(w==="cover"){var Z=Math.max(L/Q,T/$);Q*=Z,$*=Z}var X=d-L/2,K=m(a,"background-position-x","units",s),ae=m(a,"background-position-x","pfValue",s);K==="%"?X+=(L-Q)*ae:X+=ae;var se=m(a,"background-offset-x","units",s),le=m(a,"background-offset-x","pfValue",s);se==="%"?X+=(L-Q)*le:X+=le;var he=p-T/2,fe=m(a,"background-position-y","units",s),pe=m(a,"background-position-y","pfValue",s);fe==="%"?he+=(T-$)*pe:he+=pe;var me=m(a,"background-offset-y","units",s),Te=m(a,"background-offset-y","pfValue",s);me==="%"?he+=(T-$)*Te:he+=Te,j.pathCache&&(X-=d,he-=p,d=0,p=0);var Le=t.globalAlpha;t.globalAlpha=R;var ge=f.getImgSmoothing(t),xe=!1;if(Y==="no"&&ge?(f.setImgSmoothing(t,!1),xe=!0):Y==="yes"&&!ge&&(f.setImgSmoothing(t,!0),xe=!0),k==="no-repeat")D&&(t.save(),j.pathCache?t.clip(j.pathCache):(f.nodeShapes[f.getNodeShape(a)].draw(t,d,p,L,T,G,j),t.clip())),f.safeDrawImage(t,r,0,0,U,z,X,he,Q,$),D&&t.restore();else{var Se=t.createPattern(r,k);t.fillStyle=Se,f.nodeShapes[f.getNodeShape(a)].draw(t,d,p,L,T,G,j),t.translate(X,he),t.fill(),t.translate(-X,-he)}t.globalAlpha=Le,xe&&f.setImgSmoothing(t,ge)}};var qd={};qd.eleTextBiggerThanMin=function(t,r){if(!r){var a=t.cy().zoom(),s=this.getPixelRatio(),c=Math.ceil(r3(a*s));r=Math.pow(2,c)}var f=t.pstyle("font-size").pfValue*r,h=t.pstyle("min-zoomed-font-size").pfValue;return!(f<h)},qd.drawElementText=function(t,r,a,s,c){var f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,h=this;if(s==null){if(f&&!h.eleTextBiggerThanMin(r))return}else if(s===!1)return;if(r.isNode()){var d=r.pstyle("label");if(!d||!d.value)return;var p=h.getLabelJustification(r);t.textAlign=p,t.textBaseline="bottom"}else{var b=r.element()._private.rscratch.badLine,m=r.pstyle("label"),w=r.pstyle("source-label"),k=r.pstyle("target-label");if(b||(!m||!m.value)&&(!w||!w.value)&&(!k||!k.value))return;t.textAlign="center",t.textBaseline="bottom"}var P=!a,S;a&&(S=a,t.translate(-S.x1,-S.y1)),c==null?(h.drawText(t,r,null,P,f),r.isEdge()&&(h.drawText(t,r,"source",P,f),h.drawText(t,r,"target",P,f))):h.drawText(t,r,c,P,f),a&&t.translate(S.x1,S.y1)},qd.getFontCache=function(t){var r;this.fontCaches=this.fontCaches||[];for(var a=0;a<this.fontCaches.length;a++)if(r=this.fontCaches[a],r.context===t)return r;return r={context:t},this.fontCaches.push(r),r},qd.setupTextStyle=function(t,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=r.pstyle("font-style").strValue,c=r.pstyle("font-size").pfValue+"px",f=r.pstyle("font-family").strValue,h=r.pstyle("font-weight").strValue,d=a?r.effectiveOpacity()*r.pstyle("text-opacity").value:1,p=r.pstyle("text-outline-opacity").value*d,b=r.pstyle("color").value,m=r.pstyle("text-outline-color").value;t.font=s+" "+h+" "+c+" "+f,t.lineJoin="round",this.colorFillStyle(t,b[0],b[1],b[2],d),this.colorStrokeStyle(t,m[0],m[1],m[2],p)};function Ghe(t,r,a,s,c){var f=Math.min(s,c),h=f/2,d=r+s/2,p=a+c/2;t.beginPath(),t.arc(d,p,h,0,Math.PI*2),t.closePath()}function eR(t,r,a,s,c){var f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,h=Math.min(f,s/2,c/2);t.beginPath(),t.moveTo(r+h,a),t.lineTo(r+s-h,a),t.quadraticCurveTo(r+s,a,r+s,a+h),t.lineTo(r+s,a+c-h),t.quadraticCurveTo(r+s,a+c,r+s-h,a+c),t.lineTo(r+h,a+c),t.quadraticCurveTo(r,a+c,r,a+c-h),t.lineTo(r,a+h),t.quadraticCurveTo(r,a,r+h,a),t.closePath()}qd.getTextAngle=function(t,r){var a,s=t._private,c=s.rscratch,f=r?r+"-":"",h=t.pstyle(f+"text-rotation");if(h.strValue==="autorotate"){var d=Ts(c,"labelAngle",r);a=t.isEdge()?d:0}else h.strValue==="none"?a=0:a=h.pfValue;return a},qd.drawText=function(t,r,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,f=r._private,h=f.rscratch,d=c?r.effectiveOpacity():1;if(!(c&&(d===0||r.pstyle("text-opacity").value===0))){a==="main"&&(a=null);var p=Ts(h,"labelX",a),b=Ts(h,"labelY",a),m,w,k=this.getLabelText(r,a);if(k!=null&&k!==""&&!isNaN(p)&&!isNaN(b)){this.setupTextStyle(t,r,c);var P=a?a+"-":"",S=Ts(h,"labelWidth",a),M=Ts(h,"labelHeight",a),L=r.pstyle(P+"text-margin-x").pfValue,T=r.pstyle(P+"text-margin-y").pfValue,j=r.isEdge(),I=r.pstyle("text-halign").value,D=r.pstyle("text-valign").value;j&&(I="center",D="center"),p+=L,b+=T;var R;switch(s?R=this.getTextAngle(r,a):R=0,R!==0&&(m=p,w=b,t.translate(m,w),t.rotate(R),p=0,b=0),D){case"top":break;case"center":b+=M/2;break;case"bottom":b+=M;break}var Y=r.pstyle("text-background-opacity").value,G=r.pstyle("text-border-opacity").value,U=r.pstyle("text-border-width").pfValue,z=r.pstyle("text-background-padding").pfValue,Q=r.pstyle("text-background-shape").strValue,$=Q==="round-rectangle"||Q==="roundrectangle",Z=Q==="circle",X=2;if(Y>0||U>0&&G>0){var K=t.fillStyle,ae=t.strokeStyle,se=t.lineWidth,le=r.pstyle("text-background-color").value,he=r.pstyle("text-border-color").value,fe=r.pstyle("text-border-style").value,pe=Y>0,me=U>0&&G>0,Te=p-z;switch(I){case"left":Te-=S;break;case"center":Te-=S/2;break}var Le=b-M-z,ge=S+2*z,xe=M+2*z;if(pe&&(t.fillStyle="rgba(".concat(le[0],",").concat(le[1],",").concat(le[2],",").concat(Y*d,")")),me&&(t.strokeStyle="rgba(".concat(he[0],",").concat(he[1],",").concat(he[2],",").concat(G*d,")"),t.lineWidth=U,t.setLineDash))switch(fe){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=U/4,t.setLineDash([]);break;case"solid":default:t.setLineDash([]);break}if($?(t.beginPath(),eR(t,Te,Le,ge,xe,X)):Z?(t.beginPath(),Ghe(t,Te,Le,ge,xe)):(t.beginPath(),t.rect(Te,Le,ge,xe)),pe&&t.fill(),me&&t.stroke(),me&&fe==="double"){var Se=U/2;t.beginPath(),$?eR(t,Te+Se,Le+Se,ge-2*Se,xe-2*Se,X):t.rect(Te+Se,Le+Se,ge-2*Se,xe-2*Se),t.stroke()}t.fillStyle=K,t.strokeStyle=ae,t.lineWidth=se,t.setLineDash&&t.setLineDash([])}var Ie=2*r.pstyle("text-outline-width").pfValue;if(Ie>0&&(t.lineWidth=Ie),r.pstyle("text-wrap").value==="wrap"){var Re=Ts(h,"labelWrapCachedLines",a),Ne=Ts(h,"labelLineHeight",a),Me=S/2,ke=this.getLabelJustification(r);switch(ke==="auto"||(I==="left"?ke==="left"?p+=-S:ke==="center"&&(p+=-Me):I==="center"?ke==="left"?p+=-Me:ke==="right"&&(p+=Me):I==="right"&&(ke==="center"?p+=Me:ke==="right"&&(p+=S))),D){case"top":b-=(Re.length-1)*Ne;break;case"center":case"bottom":b-=(Re.length-1)*Ne;break}for(var Ge=0;Ge<Re.length;Ge++)Ie>0&&t.strokeText(Re[Ge],p,b),t.fillText(Re[Ge],p,b),b+=Ne}else Ie>0&&t.strokeText(k,p,b),t.fillText(k,p,b);R!==0&&(t.rotate(-R),t.translate(-m,-w))}}};var kh={};kh.drawNode=function(t,r,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,h=this,d,p,b=r._private,m=b.rscratch,w=r.position();if(!(!jt(w.x)||!jt(w.y))&&!(f&&!r.visible())){var k=f?r.effectiveOpacity():1,P=h.usePaths(),S,M=!1,L=r.padding();d=r.width()+2*L,p=r.height()+2*L;var T;a&&(T=a,t.translate(-T.x1,-T.y1));for(var j=r.pstyle("background-image"),I=j.value,D=new Array(I.length),R=new Array(I.length),Y=0,G=0;G<I.length;G++){var U=I[G],z=D[G]=U!=null&&U!=="none";if(z){var Q=r.cy().style().getIndexedStyle(r,"background-image-crossorigin","value",G);Y++,R[G]=h.getCachedImage(U,Q,function(){b.backgroundTimestamp=Date.now(),r.emitAndNotify("background")})}}var $=r.pstyle("background-blacken").value,Z=r.pstyle("border-width").pfValue,X=r.pstyle("background-opacity").value*k,K=r.pstyle("border-color").value,ae=r.pstyle("border-style").value,se=r.pstyle("border-join").value,le=r.pstyle("border-cap").value,he=r.pstyle("border-position").value,fe=r.pstyle("border-dash-pattern").pfValue,pe=r.pstyle("border-dash-offset").pfValue,me=r.pstyle("border-opacity").value*k,Te=r.pstyle("outline-width").pfValue,Le=r.pstyle("outline-color").value,ge=r.pstyle("outline-style").value,xe=r.pstyle("outline-opacity").value*k,Se=r.pstyle("outline-offset").value,Ie=r.pstyle("corner-radius").value;Ie!=="auto"&&(Ie=r.pstyle("corner-radius").pfValue);var Re=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:X;h.eleFillStyle(t,r,we)},Ne=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:me;h.colorStrokeStyle(t,K[0],K[1],K[2],we)},Me=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xe;h.colorStrokeStyle(t,Le[0],Le[1],Le[2],we)},ke=function(we,je,ie,Pe){var He=h.nodePathCache=h.nodePathCache||[],We=D8(ie==="polygon"?ie+","+Pe.join(","):ie,""+je,""+we,""+Ie),Je=He[We],yt,rt=!1;return Je!=null?(yt=Je,rt=!0,m.pathCache=yt):(yt=new Path2D,He[We]=m.pathCache=yt),{path:yt,cacheHit:rt}},Ge=r.pstyle("shape").strValue,Qe=r.pstyle("shape-polygon-points").pfValue;if(P){t.translate(w.x,w.y);var nt=ke(d,p,Ge,Qe);S=nt.path,M=nt.cacheHit}var ft=function(){if(!M){var we=w;P&&(we={x:0,y:0}),h.nodeShapes[h.getNodeShape(r)].draw(S||t,we.x,we.y,d,p,Ie,m)}P?t.fill(S):t.fill()},Ue=function(){for(var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k,je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ie=b.backgrounding,Pe=0,He=0;He<R.length;He++){var We=r.cy().style().getIndexedStyle(r,"background-image-containment","value",He);if(je&&We==="over"||!je&&We==="inside"){Pe++;continue}D[He]&&R[He].complete&&!R[He].error&&(Pe++,h.drawInscribedImage(t,R[He],r,He,we))}b.backgrounding=Pe!==Y,ie!==b.backgrounding&&r.updateStyle(!1)},Ze=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k;h.hasPie(r)&&(h.drawPie(t,r,je),we&&(P||h.nodeShapes[h.getNodeShape(r)].draw(t,w.x,w.y,d,p,Ie,m)))},mt=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k;h.hasStripe(r)&&(t.save(),P?t.clip(m.pathCache):(h.nodeShapes[h.getNodeShape(r)].draw(t,w.x,w.y,d,p,Ie,m),t.clip()),h.drawStripe(t,r,je),t.restore(),we&&(P||h.nodeShapes[h.getNodeShape(r)].draw(t,w.x,w.y,d,p,Ie,m)))},st=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k,je=($>0?$:-$)*we,ie=$>0?0:255;$!==0&&(h.colorFillStyle(t,ie,ie,ie,je),P?t.fill(S):t.fill())},Ot=function(){if(Z>0){if(t.lineWidth=Z,t.lineCap=le,t.lineJoin=se,t.setLineDash)switch(ae){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(fe),t.lineDashOffset=pe;break;case"solid":case"double":t.setLineDash([]);break}if(he!=="center"){if(t.save(),t.lineWidth*=2,he==="inside")P?t.clip(S):t.clip();else{var we=new Path2D;we.rect(-d/2-Z,-p/2-Z,d+2*Z,p+2*Z),we.addPath(S),t.clip(we,"evenodd")}P?t.stroke(S):t.stroke(),t.restore()}else P?t.stroke(S):t.stroke();if(ae==="double"){t.lineWidth=Z/3;var je=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",P?t.stroke(S):t.stroke(),t.globalCompositeOperation=je}t.setLineDash&&t.setLineDash([])}},At=function(){if(Te>0){if(t.lineWidth=Te,t.lineCap="butt",t.setLineDash)switch(ge){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var we=w;P&&(we={x:0,y:0});var je=h.getNodeShape(r),ie=Z;he==="inside"&&(ie=0),he==="outside"&&(ie*=2);var Pe=(d+ie+(Te+Se))/d,He=(p+ie+(Te+Se))/p,We=d*Pe,Je=p*He,yt=h.nodeShapes[je].points,rt;if(P){var $t=ke(We,Je,je,yt);rt=$t.path}if(je==="ellipse")h.drawEllipsePath(rt||t,we.x,we.y,We,Je);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(je)){var Ft=0,rn=0,Un=0;je==="round-diamond"?Ft=(ie+Se+Te)*1.4:je==="round-heptagon"?(Ft=(ie+Se+Te)*1.075,Un=-(ie/2+Se+Te)/35):je==="round-hexagon"?Ft=(ie+Se+Te)*1.12:je==="round-pentagon"?(Ft=(ie+Se+Te)*1.13,Un=-(ie/2+Se+Te)/15):je==="round-tag"?(Ft=(ie+Se+Te)*1.12,rn=(ie/2+Te+Se)*.07):je==="round-triangle"&&(Ft=(ie+Se+Te)*(Math.PI/2),Un=-(ie+Se/2+Te)/Math.PI),Ft!==0&&(Pe=(d+Ft)/d,We=d*Pe,["round-hexagon","round-tag"].includes(je)||(He=(p+Ft)/p,Je=p*He)),Ie=Ie==="auto"?eO(We,Je):Ie;for(var Gn=We/2,Kt=Je/2,Hn=Ie+(ie+Te+Se)/2,dr=new Array(yt.length/2),gi=new Array(yt.length/2),ka=0;ka<yt.length/2;ka++)dr[ka]={x:we.x+rn+Gn*yt[ka*2],y:we.y+Un+Kt*yt[ka*2+1]};var no,Bi,da,Ri,ro=dr.length;for(Bi=dr[ro-1],no=0;no<ro;no++)da=dr[no%ro],Ri=dr[(no+1)%ro],gi[no]=DP(Bi,da,Ri,Hn),Bi=da,da=Ri;h.drawRoundPolygonPath(rt||t,we.x+rn,we.y+Un,d*Pe,p*He,yt,gi)}else if(["roundrectangle","round-rectangle"].includes(je))Ie=Ie==="auto"?dh(We,Je):Ie,h.drawRoundRectanglePath(rt||t,we.x,we.y,We,Je,Ie+(ie+Te+Se)/2);else if(["cutrectangle","cut-rectangle"].includes(je))Ie=Ie==="auto"?u3():Ie,h.drawCutRectanglePath(rt||t,we.x,we.y,We,Je,null,Ie+(ie+Te+Se)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(je))Ie=Ie==="auto"?dh(We,Je):Ie,h.drawBottomRoundRectanglePath(rt||t,we.x,we.y,We,Je,Ie+(ie+Te+Se)/2);else if(je==="barrel")h.drawBarrelPath(rt||t,we.x,we.y,We,Je);else if(je.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(je)){var ac=(ie+Te+Se)/d;yt=Xm(ew(yt,ac)),h.drawPolygonPath(rt||t,we.x,we.y,d,p,yt)}else{var Gi=(ie+Te+Se)/d;yt=Xm(ew(yt,-Gi)),h.drawPolygonPath(rt||t,we.x,we.y,d,p,yt)}if(P?t.stroke(rt):t.stroke(),ge==="double"){t.lineWidth=ie/3;var Xo=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",P?t.stroke(rt):t.stroke(),t.globalCompositeOperation=Xo}t.setLineDash&&t.setLineDash([])}},Rt=function(){c&&h.drawNodeOverlay(t,r,w,d,p)},zt=function(){c&&h.drawNodeUnderlay(t,r,w,d,p)},mn=function(){h.drawElementText(t,r,null,s)},sn=r.pstyle("ghost").value==="yes";if(sn){var or=r.pstyle("ghost-offset-x").pfValue,H=r.pstyle("ghost-offset-y").pfValue,ne=r.pstyle("ghost-opacity").value,ue=ne*k;t.translate(or,H),Me(),At(),Re(ne*X),ft(),Ue(ue,!0),Ne(ne*me),Ot(),Ze($!==0||Z!==0),mt($!==0||Z!==0),Ue(ue,!1),st(ue),t.translate(-or,-H)}P&&t.translate(-w.x,-w.y),zt(),P&&t.translate(w.x,w.y),Me(),At(),Re(),ft(),Ue(k,!0),Ne(),Ot(),Ze($!==0||Z!==0),mt($!==0||Z!==0),Ue(k,!1),st(),P&&t.translate(-w.x,-w.y),mn(),Rt(),a&&t.translate(T.x1,T.y1)}};var tR=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(r,a,s,c,f){var h=this;if(a.visible()){var d=a.pstyle("".concat(t,"-padding")).pfValue,p=a.pstyle("".concat(t,"-opacity")).value,b=a.pstyle("".concat(t,"-color")).value,m=a.pstyle("".concat(t,"-shape")).value,w=a.pstyle("".concat(t,"-corner-radius")).value;if(p>0){if(s=s||a.position(),c==null||f==null){var k=a.padding();c=a.width()+2*k,f=a.height()+2*k}h.colorFillStyle(r,b[0],b[1],b[2],p),h.nodeShapes[m].draw(r,s.x,s.y,c+d*2,f+d*2,w),r.fill()}}}};kh.drawNodeOverlay=tR("overlay"),kh.drawNodeUnderlay=tR("underlay"),kh.hasPie=function(t){return t=t[0],t._private.hasPie},kh.hasStripe=function(t){return t=t[0],t._private.hasStripe},kh.drawPie=function(t,r,a,s){r=r[0],s=s||r.position();var c=r.cy().style(),f=r.pstyle("pie-size"),h=r.pstyle("pie-hole"),d=r.pstyle("pie-start-angle").pfValue,p=s.x,b=s.y,m=r.width(),w=r.height(),k=Math.min(m,w)/2,P,S=0,M=this.usePaths();if(M&&(p=0,b=0),f.units==="%"?k=k*f.pfValue:f.pfValue!==void 0&&(k=f.pfValue/2),h.units==="%"?P=k*h.pfValue:h.pfValue!==void 0&&(P=h.pfValue/2),!(P>=k))for(var L=1;L<=c.pieBackgroundN;L++){var T=r.pstyle("pie-"+L+"-background-size").value,j=r.pstyle("pie-"+L+"-background-color").value,I=r.pstyle("pie-"+L+"-background-opacity").value*a,D=T/100;D+S>1&&(D=1-S);var R=1.5*Math.PI+2*Math.PI*S;R+=d;var Y=2*Math.PI*D,G=R+Y;T===0||S>=1||S+D>1||(P===0?(t.beginPath(),t.moveTo(p,b),t.arc(p,b,k,R,G),t.closePath()):(t.beginPath(),t.arc(p,b,k,R,G),t.arc(p,b,P,G,R,!0),t.closePath()),this.colorFillStyle(t,j[0],j[1],j[2],I),t.fill(),S+=D)}},kh.drawStripe=function(t,r,a,s){r=r[0],s=s||r.position();var c=r.cy().style(),f=s.x,h=s.y,d=r.width(),p=r.height(),b=0,m=this.usePaths();t.save();var w=r.pstyle("stripe-direction").value,k=r.pstyle("stripe-size");switch(w){case"vertical":break;case"righward":t.rotate(-Math.PI/2);break}var P=d,S=p;k.units==="%"?(P=P*k.pfValue,S=S*k.pfValue):k.pfValue!==void 0&&(P=k.pfValue,S=k.pfValue),m&&(f=0,h=0),h-=P/2,f-=S/2;for(var M=1;M<=c.stripeBackgroundN;M++){var L=r.pstyle("stripe-"+M+"-background-size").value,T=r.pstyle("stripe-"+M+"-background-color").value,j=r.pstyle("stripe-"+M+"-background-opacity").value*a,I=L/100;I+b>1&&(I=1-b),!(L===0||b>=1||b+I>1)&&(t.beginPath(),t.rect(f,h+S*b,P,S*I),t.closePath(),this.colorFillStyle(t,T[0],T[1],T[2],j),t.fill(),b+=I)}t.restore()};var Jo={},Hhe=100;Jo.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var r=this.cy.window(),a=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(r.devicePixelRatio||1)/a},Jo.paintCache=function(t){for(var r=this.paintCaches=this.paintCaches||[],a=!0,s,c=0;c<r.length;c++)if(s=r[c],s.context===t){a=!1;break}return a&&(s={context:t},r.push(s)),s},Jo.createGradientStyleFor=function(t,r,a,s,c){var f,h=this.usePaths(),d=a.pstyle(r+"-gradient-stop-colors").value,p=a.pstyle(r+"-gradient-stop-positions").pfValue;if(s==="radial-gradient")if(a.isEdge()){var b=a.sourceEndpoint(),m=a.targetEndpoint(),w=a.midpoint(),k=Bd(b,w),P=Bd(m,w);f=t.createRadialGradient(w.x,w.y,0,w.x,w.y,Math.max(k,P))}else{var S=h?{x:0,y:0}:a.position(),M=a.paddedWidth(),L=a.paddedHeight();f=t.createRadialGradient(S.x,S.y,0,S.x,S.y,Math.max(M,L))}else if(a.isEdge()){var T=a.sourceEndpoint(),j=a.targetEndpoint();f=t.createLinearGradient(T.x,T.y,j.x,j.y)}else{var I=h?{x:0,y:0}:a.position(),D=a.paddedWidth(),R=a.paddedHeight(),Y=D/2,G=R/2,U=a.pstyle("background-gradient-direction").value;switch(U){case"to-bottom":f=t.createLinearGradient(I.x,I.y-G,I.x,I.y+G);break;case"to-top":f=t.createLinearGradient(I.x,I.y+G,I.x,I.y-G);break;case"to-left":f=t.createLinearGradient(I.x+Y,I.y,I.x-Y,I.y);break;case"to-right":f=t.createLinearGradient(I.x-Y,I.y,I.x+Y,I.y);break;case"to-bottom-right":case"to-right-bottom":f=t.createLinearGradient(I.x-Y,I.y-G,I.x+Y,I.y+G);break;case"to-top-right":case"to-right-top":f=t.createLinearGradient(I.x-Y,I.y+G,I.x+Y,I.y-G);break;case"to-bottom-left":case"to-left-bottom":f=t.createLinearGradient(I.x+Y,I.y-G,I.x-Y,I.y+G);break;case"to-top-left":case"to-left-top":f=t.createLinearGradient(I.x+Y,I.y+G,I.x-Y,I.y-G);break}}if(!f)return null;for(var z=p.length===d.length,Q=d.length,$=0;$<Q;$++)f.addColorStop(z?p[$]:$/(Q-1),"rgba("+d[$][0]+","+d[$][1]+","+d[$][2]+","+c+")");return f},Jo.gradientFillStyle=function(t,r,a,s){var c=this.createGradientStyleFor(t,"background",r,a,s);if(!c)return null;t.fillStyle=c},Jo.colorFillStyle=function(t,r,a,s,c){t.fillStyle="rgba("+r+","+a+","+s+","+c+")"},Jo.eleFillStyle=function(t,r,a){var s=r.pstyle("background-fill").value;if(s==="linear-gradient"||s==="radial-gradient")this.gradientFillStyle(t,r,s,a);else{var c=r.pstyle("background-color").value;this.colorFillStyle(t,c[0],c[1],c[2],a)}},Jo.gradientStrokeStyle=function(t,r,a,s){var c=this.createGradientStyleFor(t,"line",r,a,s);if(!c)return null;t.strokeStyle=c},Jo.colorStrokeStyle=function(t,r,a,s,c){t.strokeStyle="rgba("+r+","+a+","+s+","+c+")"},Jo.eleStrokeStyle=function(t,r,a){var s=r.pstyle("line-fill").value;if(s==="linear-gradient"||s==="radial-gradient")this.gradientStrokeStyle(t,r,s,a);else{var c=r.pstyle("line-color").value;this.colorStrokeStyle(t,c[0],c[1],c[2],a)}},Jo.matchCanvasSize=function(t){var r=this,a=r.data,s=r.findContainerClientCoords(),c=s[2],f=s[3],h=r.getPixelRatio(),d=r.motionBlurPxRatio;(t===r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]||t===r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG])&&(h=d);var p=c*h,b=f*h,m;if(!(p===r.canvasWidth&&b===r.canvasHeight)){r.fontCaches=null;var w=a.canvasContainer;w.style.width=c+"px",w.style.height=f+"px";for(var k=0;k<r.CANVAS_LAYERS;k++)m=a.canvases[k],m.width=p,m.height=b,m.style.width=c+"px",m.style.height=f+"px";for(var k=0;k<r.BUFFER_COUNT;k++)m=a.bufferCanvases[k],m.width=p,m.height=b,m.style.width=c+"px",m.style.height=f+"px";r.textureMult=1,h<=1&&(m=a.bufferCanvases[r.TEXTURE_BUFFER],r.textureMult=2,m.width=p*r.textureMult,m.height=b*r.textureMult),r.canvasWidth=p,r.canvasHeight=b,r.pixelRatio=h}},Jo.renderTo=function(t,r,a,s){this.render({forcedContext:t,forcedZoom:r,forcedPan:a,drawAllLayers:!0,forcedPxRatio:s})},Jo.clearCanvas=function(){var t=this,r=t.data;function a(s){s.clearRect(0,0,t.canvasWidth,t.canvasHeight)}a(r.contexts[t.NODE]),a(r.contexts[t.DRAG])},Jo.render=function(t){var r=this;t=t||U8();var a=r.cy,s=t.forcedContext,c=t.drawAllLayers,f=t.drawOnlyNodeLayer,h=t.forcedZoom,d=t.forcedPan,p=t.forcedPxRatio===void 0?this.getPixelRatio():t.forcedPxRatio,b=r.data,m=b.canvasNeedsRedraw,w=r.textureOnViewport&&!s&&(r.pinching||r.hoverData.dragging||r.swipePanning||r.data.wheelZooming),k=t.motionBlur!==void 0?t.motionBlur:r.motionBlur,P=r.motionBlurPxRatio,S=a.hasCompoundNodes(),M=r.hoverData.draggingEles,L=!!(r.hoverData.selecting||r.touchData.selecting);k=k&&!s&&r.motionBlurEnabled&&!L;var T=k;s||(r.prevPxRatio!==p&&(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container),r.redrawHint("eles",!0),r.redrawHint("drag",!0)),r.prevPxRatio=p),!s&&r.motionBlurTimeout&&clearTimeout(r.motionBlurTimeout),k&&(r.mbFrames==null&&(r.mbFrames=0),r.mbFrames++,r.mbFrames<3&&(T=!1),r.mbFrames>r.minMbLowQualFrames&&(r.motionBlurPxRatio=r.mbPxRBlurry)),r.clearingMotionBlur&&(r.motionBlurPxRatio=1),r.textureDrawLastFrame&&!w&&(m[r.NODE]=!0,m[r.SELECT_BOX]=!0);var j=a.style(),I=a.zoom(),D=h!==void 0?h:I,R=a.pan(),Y={x:R.x,y:R.y},G={zoom:I,pan:{x:R.x,y:R.y}},U=r.prevViewport,z=U===void 0||G.zoom!==U.zoom||G.pan.x!==U.pan.x||G.pan.y!==U.pan.y;!z&&!(M&&!S)&&(r.motionBlurPxRatio=1),d&&(Y=d),D*=p,Y.x*=p,Y.y*=p;var Q=r.getCachedZSortedEles();function $(Ne,Me,ke,Ge,Qe){var nt=Ne.globalCompositeOperation;Ne.globalCompositeOperation="destination-out",r.colorFillStyle(Ne,255,255,255,r.motionBlurTransparency),Ne.fillRect(Me,ke,Ge,Qe),Ne.globalCompositeOperation=nt}function Z(Ne,Me){var ke,Ge,Qe,nt;!r.clearingMotionBlur&&(Ne===b.bufferContexts[r.MOTIONBLUR_BUFFER_NODE]||Ne===b.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])?(ke={x:R.x*P,y:R.y*P},Ge=I*P,Qe=r.canvasWidth*P,nt=r.canvasHeight*P):(ke=Y,Ge=D,Qe=r.canvasWidth,nt=r.canvasHeight),Ne.setTransform(1,0,0,1,0,0),Me==="motionBlur"?$(Ne,0,0,Qe,nt):!s&&(Me===void 0||Me)&&Ne.clearRect(0,0,Qe,nt),c||(Ne.translate(ke.x,ke.y),Ne.scale(Ge,Ge)),d&&Ne.translate(d.x,d.y),h&&Ne.scale(h,h)}if(w||(r.textureDrawLastFrame=!1),w){if(r.textureDrawLastFrame=!0,!r.textureCache){r.textureCache={},r.textureCache.bb=a.mutableElements().boundingBox(),r.textureCache.texture=r.data.bufferCanvases[r.TEXTURE_BUFFER];var X=r.data.bufferContexts[r.TEXTURE_BUFFER];X.setTransform(1,0,0,1,0,0),X.clearRect(0,0,r.canvasWidth*r.textureMult,r.canvasHeight*r.textureMult),r.render({forcedContext:X,drawOnlyNodeLayer:!0,forcedPxRatio:p*r.textureMult});var G=r.textureCache.viewport={zoom:a.zoom(),pan:a.pan(),width:r.canvasWidth,height:r.canvasHeight};G.mpan={x:(0-G.pan.x)/G.zoom,y:(0-G.pan.y)/G.zoom}}m[r.DRAG]=!1,m[r.NODE]=!1;var K=b.contexts[r.NODE],ae=r.textureCache.texture,G=r.textureCache.viewport;K.setTransform(1,0,0,1,0,0),k?$(K,0,0,G.width,G.height):K.clearRect(0,0,G.width,G.height);var se=j.core("outside-texture-bg-color").value,le=j.core("outside-texture-bg-opacity").value;r.colorFillStyle(K,se[0],se[1],se[2],le),K.fillRect(0,0,G.width,G.height);var I=a.zoom();Z(K,!1),K.clearRect(G.mpan.x,G.mpan.y,G.width/G.zoom/p,G.height/G.zoom/p),K.drawImage(ae,G.mpan.x,G.mpan.y,G.width/G.zoom/p,G.height/G.zoom/p)}else r.textureOnViewport&&!s&&(r.textureCache=null);var he=a.extent(),fe=r.pinching||r.hoverData.dragging||r.swipePanning||r.data.wheelZooming||r.hoverData.draggingEles||r.cy.animated(),pe=r.hideEdgesOnViewport&&fe,me=[];if(me[r.NODE]=!m[r.NODE]&&k&&!r.clearedForMotionBlur[r.NODE]||r.clearingMotionBlur,me[r.NODE]&&(r.clearedForMotionBlur[r.NODE]=!0),me[r.DRAG]=!m[r.DRAG]&&k&&!r.clearedForMotionBlur[r.DRAG]||r.clearingMotionBlur,me[r.DRAG]&&(r.clearedForMotionBlur[r.DRAG]=!0),m[r.NODE]||c||f||me[r.NODE]){var Te=k&&!me[r.NODE]&&P!==1,K=s||(Te?r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE]:b.contexts[r.NODE]),Le=k&&!Te?"motionBlur":void 0;Z(K,Le),pe?r.drawCachedNodes(K,Q.nondrag,p,he):r.drawLayeredElements(K,Q.nondrag,p,he),r.debug&&r.drawDebugPoints(K,Q.nondrag),!c&&!k&&(m[r.NODE]=!1)}if(!f&&(m[r.DRAG]||c||me[r.DRAG])){var Te=k&&!me[r.DRAG]&&P!==1,K=s||(Te?r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG]:b.contexts[r.DRAG]);Z(K,k&&!Te?"motionBlur":void 0),pe?r.drawCachedNodes(K,Q.drag,p,he):r.drawCachedElements(K,Q.drag,p,he),r.debug&&r.drawDebugPoints(K,Q.drag),!c&&!k&&(m[r.DRAG]=!1)}if(this.drawSelectionRectangle(t,Z),k&&P!==1){var ge=b.contexts[r.NODE],xe=r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE],Se=b.contexts[r.DRAG],Ie=r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG],Re=function(Ne,Me,ke){Ne.setTransform(1,0,0,1,0,0),ke||!T?Ne.clearRect(0,0,r.canvasWidth,r.canvasHeight):$(Ne,0,0,r.canvasWidth,r.canvasHeight);var Ge=P;Ne.drawImage(Me,0,0,r.canvasWidth*Ge,r.canvasHeight*Ge,0,0,r.canvasWidth,r.canvasHeight)};(m[r.NODE]||me[r.NODE])&&(Re(ge,xe,me[r.NODE]),m[r.NODE]=!1),(m[r.DRAG]||me[r.DRAG])&&(Re(Se,Ie,me[r.DRAG]),m[r.DRAG]=!1)}r.prevViewport=G,r.clearingMotionBlur&&(r.clearingMotionBlur=!1,r.motionBlurCleared=!0,r.motionBlur=!0),k&&(r.motionBlurTimeout=setTimeout(function(){r.motionBlurTimeout=null,r.clearedForMotionBlur[r.NODE]=!1,r.clearedForMotionBlur[r.DRAG]=!1,r.motionBlur=!1,r.clearingMotionBlur=!w,r.mbFrames=0,m[r.NODE]=!0,m[r.DRAG]=!0,r.redraw()},Hhe)),s||a.emit("render")};var S0;Jo.drawSelectionRectangle=function(t,r){var a=this,s=a.cy,c=a.data,f=s.style(),h=t.drawOnlyNodeLayer,d=t.drawAllLayers,p=c.canvasNeedsRedraw,b=t.forcedContext;if(a.showFps||!h&&p[a.SELECT_BOX]&&!d){var m=b||c.contexts[a.SELECT_BOX];if(r(m),a.selection[4]==1&&(a.hoverData.selecting||a.touchData.selecting)){var w=a.cy.zoom(),k=f.core("selection-box-border-width").value/w;m.lineWidth=k,m.fillStyle="rgba("+f.core("selection-box-color").value[0]+","+f.core("selection-box-color").value[1]+","+f.core("selection-box-color").value[2]+","+f.core("selection-box-opacity").value+")",m.fillRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]),k>0&&(m.strokeStyle="rgba("+f.core("selection-box-border-color").value[0]+","+f.core("selection-box-border-color").value[1]+","+f.core("selection-box-border-color").value[2]+","+f.core("selection-box-opacity").value+")",m.strokeRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]))}if(c.bgActivePosistion&&!a.hoverData.selecting){var w=a.cy.zoom(),P=c.bgActivePosistion;m.fillStyle="rgba("+f.core("active-bg-color").value[0]+","+f.core("active-bg-color").value[1]+","+f.core("active-bg-color").value[2]+","+f.core("active-bg-opacity").value+")",m.beginPath(),m.arc(P.x,P.y,f.core("active-bg-size").pfValue/w,0,2*Math.PI),m.fill()}var S=a.lastRedrawTime;if(a.showFps&&S){S=Math.round(S);var M=Math.round(1e3/S),L="1 frame = "+S+" ms = "+M+" fps";if(m.setTransform(1,0,0,1,0,0),m.fillStyle="rgba(255, 0, 0, 0.75)",m.strokeStyle="rgba(255, 0, 0, 0.75)",m.font="30px Arial",!S0){var T=m.measureText(L);S0=T.actualBoundingBoxAscent}m.fillText(L,0,S0);var j=60;m.strokeRect(0,S0+10,250,20),m.fillRect(0,S0+10,250*Math.min(M/j,1),20)}d||(p[a.SELECT_BOX]=!1)}};function nR(t,r,a){var s=t.createShader(r);if(t.shaderSource(s,a),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(s));return s}function zhe(t,r,a){var s=nR(t,t.VERTEX_SHADER,r),c=nR(t,t.FRAGMENT_SHADER,a),f=t.createProgram();if(t.attachShader(f,s),t.attachShader(f,c),t.linkProgram(f),!t.getProgramParameter(f,t.LINK_STATUS))throw new Error("Could not initialize shaders");return f}function Uhe(t,r,a){a===void 0&&(a=r);var s=t.makeOffscreenCanvas(r,a),c=s.context=s.getContext("2d");return s.clear=function(){return c.clearRect(0,0,s.width,s.height)},s.clear(),s}function UP(t){var r=t.pixelRatio,a=t.cy.zoom(),s=t.cy.pan();return{zoom:a*r,pan:{x:s.x*r,y:s.y*r}}}function Fhe(t){var r=t.pixelRatio,a=t.cy.zoom();return a*r}function Yhe(t,r,a,s,c){var f=s*a+r.x,h=c*a+r.y;return h=Math.round(t.canvasHeight-h),[f,h]}function Vhe(t){return t.pstyle("background-fill").value!=="solid"||t.pstyle("background-image").strValue!=="none"?!1:t.pstyle("border-width").value===0||t.pstyle("border-opacity").value===0?!0:t.pstyle("border-style").value==="solid"}function qhe(t,r){if(t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(t[a]!==r[a])return!1;return!0}function Zd(t,r,a){var s=t[0]/255,c=t[1]/255,f=t[2]/255,h=r,d=a||new Array(4);return d[0]=s*h,d[1]=c*h,d[2]=f*h,d[3]=h,d}function Hg(t,r){var a=r||new Array(4);return a[0]=(t>>0&255)/255,a[1]=(t>>8&255)/255,a[2]=(t>>16&255)/255,a[3]=(t>>24&255)/255,a}function Zhe(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function $he(t,r){var a=t.createTexture();return a.buffer=function(s){t.bindTexture(t.TEXTURE_2D,a),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,s),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},a.deleteTexture=function(){t.deleteTexture(a)},a}function rR(t,r){switch(r){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function iR(t,r,a){switch(r){case t.FLOAT:return new Float32Array(a);case t.INT:return new Int32Array(a)}}function Khe(t,r,a,s,c,f){switch(r){case t.FLOAT:return new Float32Array(a.buffer,f*s,c);case t.INT:return new Int32Array(a.buffer,f*s,c)}}function Qhe(t,r,a,s){var c=rR(t,r),f=ma(c,2),h=f[0],d=f[1],p=iR(t,d,s),b=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,b),t.bufferData(t.ARRAY_BUFFER,p,t.STATIC_DRAW),d===t.FLOAT?t.vertexAttribPointer(a,h,d,!1,0,0):d===t.INT&&t.vertexAttribIPointer(a,h,d,0,0),t.enableVertexAttribArray(a),t.bindBuffer(t.ARRAY_BUFFER,null),b}function Xc(t,r,a,s){var c=rR(t,a),f=ma(c,3),h=f[0],d=f[1],p=f[2],b=iR(t,d,r*h),m=h*p,w=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,w),t.bufferData(t.ARRAY_BUFFER,r*m,t.DYNAMIC_DRAW),t.enableVertexAttribArray(s),d===t.FLOAT?t.vertexAttribPointer(s,h,d,!1,m,0):d===t.INT&&t.vertexAttribIPointer(s,h,d,m,0),t.vertexAttribDivisor(s,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var k=new Array(r),P=0;P<r;P++)k[P]=Khe(t,d,b,m,h,P);return w.dataArray=b,w.stride=m,w.size=h,w.getView=function(S){return k[S]},w.setPoint=function(S,M,L){var T=k[S];T[0]=M,T[1]=L},w.bufferSubData=function(S){t.bindBuffer(t.ARRAY_BUFFER,w),S?t.bufferSubData(t.ARRAY_BUFFER,0,b,0,S*h):t.bufferSubData(t.ARRAY_BUFFER,0,b)},w}function Whe(t,r,a){for(var s=9,c=new Float32Array(r*s),f=new Array(r),h=0;h<r;h++){var d=h*s*4;f[h]=new Float32Array(c.buffer,d,s)}var p=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,p),t.bufferData(t.ARRAY_BUFFER,c.byteLength,t.DYNAMIC_DRAW);for(var b=0;b<3;b++){var m=a+b;t.enableVertexAttribArray(m),t.vertexAttribPointer(m,3,t.FLOAT,!1,3*12,b*12),t.vertexAttribDivisor(m,1)}return t.bindBuffer(t.ARRAY_BUFFER,null),p.getMatrixView=function(w){return f[w]},p.setData=function(w,k){f[k].set(w,0)},p.bufferSubData=function(){t.bindBuffer(t.ARRAY_BUFFER,p),t.bufferSubData(t.ARRAY_BUFFER,0,c)},p}function Jhe(t){var r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r);var a=t.createTexture();return t.bindTexture(t.TEXTURE_2D,a),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,a,0),t.bindFramebuffer(t.FRAMEBUFFER,null),r.setFramebufferAttachmentSizes=function(s,c){t.bindTexture(t.TEXTURE_2D,a),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,s,c,0,t.RGBA,t.UNSIGNED_BYTE,null)},r}var aR=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,r=arguments.length;r--;)t+=arguments[r]*arguments[r];return Math.sqrt(t)});function FP(){var t=new aR(9);return aR!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function oR(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Xhe(t,r,a){var s=r[0],c=r[1],f=r[2],h=r[3],d=r[4],p=r[5],b=r[6],m=r[7],w=r[8],k=a[0],P=a[1],S=a[2],M=a[3],L=a[4],T=a[5],j=a[6],I=a[7],D=a[8];return t[0]=k*s+P*h+S*b,t[1]=k*c+P*d+S*m,t[2]=k*f+P*p+S*w,t[3]=M*s+L*h+T*b,t[4]=M*c+L*d+T*m,t[5]=M*f+L*p+T*w,t[6]=j*s+I*h+D*b,t[7]=j*c+I*d+D*m,t[8]=j*f+I*p+D*w,t}function Bw(t,r,a){var s=r[0],c=r[1],f=r[2],h=r[3],d=r[4],p=r[5],b=r[6],m=r[7],w=r[8],k=a[0],P=a[1];return t[0]=s,t[1]=c,t[2]=f,t[3]=h,t[4]=d,t[5]=p,t[6]=k*s+P*h+b,t[7]=k*c+P*d+m,t[8]=k*f+P*p+w,t}function sR(t,r,a){var s=r[0],c=r[1],f=r[2],h=r[3],d=r[4],p=r[5],b=r[6],m=r[7],w=r[8],k=Math.sin(a),P=Math.cos(a);return t[0]=P*s+k*h,t[1]=P*c+k*d,t[2]=P*f+k*p,t[3]=P*h-k*s,t[4]=P*d-k*c,t[5]=P*p-k*f,t[6]=b,t[7]=m,t[8]=w,t}function YP(t,r,a){var s=a[0],c=a[1];return t[0]=s*r[0],t[1]=s*r[1],t[2]=s*r[2],t[3]=c*r[3],t[4]=c*r[4],t[5]=c*r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t}function ede(t,r,a){return t[0]=2/r,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/a,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}var tde=function(){function t(r,a,s,c){ah(this,t),this.debugID=Math.floor(Math.random()*1e4),this.r=r,this.texSize=a,this.texRows=s,this.texHeight=Math.floor(a/s),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=c(r,a,a),this.scratch=c(r,a,this.texHeight,"scratch")}return oh(t,[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(r){var a=r.w,s=r.h,c=this.texHeight,f=this.texSize,h=c/s,d=a*h,p=s*h;return d>f&&(h=f/a,d=a*h,p=s*h),{scale:h,texW:d,texH:p}}},{key:"draw",value:function(r,a,s){var c=this;if(this.locked)throw new Error("can't draw, atlas is locked");var f=this.texSize,h=this.texRows,d=this.texHeight,p=this.getScale(a),b=p.scale,m=p.texW,w=p.texH,k=function(T,j){if(s&&j){var I=j.context,D=T.x,R=T.row,Y=D,G=d*R;I.save(),I.translate(Y,G),I.scale(b,b),s(I,a),I.restore()}},P=[null,null],S=function(){k(c.freePointer,c.canvas),P[0]={x:c.freePointer.x,y:c.freePointer.row*d,w:m,h:w},P[1]={x:c.freePointer.x+m,y:c.freePointer.row*d,w:0,h:w},c.freePointer.x+=m,c.freePointer.x==f&&(c.freePointer.x=0,c.freePointer.row++)},M=function(){var T=c.scratch,j=c.canvas;T.clear(),k({x:0,row:0},T);var I=f-c.freePointer.x,D=m-I,R=d;{var Y=c.freePointer.x,G=c.freePointer.row*d,U=I;j.context.drawImage(T,0,0,U,R,Y,G,U,R),P[0]={x:Y,y:G,w:U,h:w}}{var z=I,Q=(c.freePointer.row+1)*d,$=D;j&&j.context.drawImage(T,z,0,$,R,0,Q,$,R),P[1]={x:0,y:Q,w:$,h:w}}c.freePointer.x=D,c.freePointer.row++},L=function(){c.freePointer.x=0,c.freePointer.row++};if(this.freePointer.x+m<=f)S();else{if(this.freePointer.row>=h-1)return!1;this.freePointer.x===f?(L(),S()):this.enableWrapping?M():(L(),S())}return this.keyToLocation.set(r,P),this.needsBuffer=!0,P}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var a=this.texSize,s=this.texRows,c=this.getScale(r),f=c.texW;return this.freePointer.x+f>a?this.freePointer.row<s-1:!0}},{key:"bufferIfNeeded",value:function(r){this.texture||(this.texture=$he(r,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked&&(this.canvas=null,this.scratch=null))}},{key:"dispose",value:function(){this.texture&&(this.texture.deleteTexture(),this.texture=null),this.canvas=null,this.scratch=null,this.locked=!0}}])}(),nde=function(){function t(r,a,s,c){ah(this,t),this.r=r,this.texSize=a,this.texRows=s,this.createTextureCanvas=c,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set}return oh(t,[{key:"getKeys",value:function(){return new Set(this.styleKeyToAtlas.keys())}},{key:"_createAtlas",value:function(){var r=this.r,a=this.texSize,s=this.texRows,c=this.createTextureCanvas;return new tde(r,a,s,c)}},{key:"_getScratchCanvas",value:function(){if(!this.scratch){var r=this.r,a=this.texSize,s=this.texRows,c=this.createTextureCanvas,f=Math.floor(a/s);this.scratch=c(r,a,f,"scratch")}return this.scratch}},{key:"draw",value:function(r,a,s){var c=this.styleKeyToAtlas.get(r);return c||(c=this.atlases[this.atlases.length-1],(!c||!c.canFit(a))&&(c&&c.lock(),c=this._createAtlas(),this.atlases.push(c)),c.draw(r,a,s),this.styleKeyToAtlas.set(r,c)),c}},{key:"getAtlas",value:function(r){return this.styleKeyToAtlas.get(r)}},{key:"hasAtlas",value:function(r){return this.styleKeyToAtlas.has(r)}},{key:"markKeyForGC",value:function(r){this.markedKeys.add(r)}},{key:"gc",value:function(){var r=this,a=this.markedKeys;if(a.size===0){console.log("nothing to garbage collect");return}var s=[],c=new Map,f=null,h=Ns(this.atlases),d;try{var p=function(){var b=d.value,m=b.getKeys(),w=rde(a,m);if(w.size===0)return s.push(b),m.forEach(function(I){return c.set(I,b)}),1;f||(f=r._createAtlas(),s.push(f));var k=Ns(m),P;try{for(k.s();!(P=k.n()).done;){var S=P.value;if(!w.has(S)){var M=b.getOffsets(S),L=ma(M,2),T=L[0],j=L[1];f.canFit({w:T.w+j.w,h:T.h})||(f.lock(),f=r._createAtlas(),s.push(f)),b.canvas&&(r._copyTextureToNewAtlas(S,b,f),c.set(S,f))}}}catch(I){k.e(I)}finally{k.f()}b.dispose()};for(h.s();!(d=h.n()).done;)p()}catch(b){h.e(b)}finally{h.f()}this.atlases=s,this.styleKeyToAtlas=c,this.markedKeys=new Set}},{key:"_copyTextureToNewAtlas",value:function(r,a,s){var c=a.getOffsets(r),f=ma(c,2),h=f[0],d=f[1];if(d.w===0)s.draw(r,h,function(w){w.drawImage(a.canvas,h.x,h.y,h.w,h.h,0,0,h.w,h.h)});else{var p=this._getScratchCanvas();p.clear(),p.context.drawImage(a.canvas,h.x,h.y,h.w,h.h,0,0,h.w,h.h),p.context.drawImage(a.canvas,d.x,d.y,d.w,d.h,h.w,0,d.w,d.h);var b=h.w+d.w,m=h.h;s.draw(r,{w:b,h:m},function(w){w.drawImage(p,0,0,b,m,0,0,b,m)})}}},{key:"getCounts",value:function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}}}])}();function rde(t,r){return t.intersection?t.intersection(r):new Set(Hm(t).filter(function(a){return r.has(a)}))}var ide=function(){function t(r,a){ah(this,t),this.r=r,this.globalOptions=a,this.atlasSize=a.webglTexSize,this.maxAtlasesPerBatch=a.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map}return oh(t,[{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"addAtlasCollection",value:function(r,a){var s=this.globalOptions,c=s.webglTexSize,f=s.createTextureCanvas,h=a.texRows,d=this._cacheScratchCanvas(f),p=new nde(this.r,c,h,d);this.collections.set(r,p)}},{key:"addRenderType",value:function(r,a){var s=a.collection;if(!this.collections.has(s))throw new Error("invalid atlas collection name '".concat(s,"'"));var c=this.collections.get(s),f=fn({type:r,atlasCollection:c},a);this.renderTypes.set(r,f)}},{key:"getRenderTypeOpts",value:function(r){return this.renderTypes.get(r)}},{key:"getAtlasCollection",value:function(r){return this.collections.get(r)}},{key:"_cacheScratchCanvas",value:function(r){var a=-1,s=-1,c=null;return function(f,h,d,p){return p?((!c||h!=a||d!=s)&&(a=h,s=d,c=r(f,h,d)),c):r(f,h,d)}}},{key:"_key",value:function(r,a){return"".concat(r,"-").concat(a)}},{key:"invalidate",value:function(r){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=s.forceRedraw,f=c===void 0?!1:c,h=s.filterEle,d=h===void 0?function(){return!0}:h,p=s.filterType,b=p===void 0?function(){return!0}:p,m=!1,w=!1,k=Ns(r),P;try{for(k.s();!(P=k.n()).done;){var S=P.value;if(d(S)){var M=Ns(this.renderTypes.values()),L;try{var T=function(){var j=L.value,I=j.type;if(b(I)){var D=a.collections.get(j.collection),R=j.getKey(S),Y=Array.isArray(R)?R:[R];if(f)Y.forEach(function(Q){return D.markKeyForGC(Q)}),w=!0;else{var G=j.getID?j.getID(S):S.id(),U=a._key(I,G),z=a.typeAndIdToKey.get(U);z!==void 0&&!qhe(Y,z)&&(m=!0,a.typeAndIdToKey.delete(U),z.forEach(function(Q){return D.markKeyForGC(Q)}))}}};for(M.s();!(L=M.n()).done;)T()}catch(j){M.e(j)}finally{M.f()}}}}catch(j){k.e(j)}finally{k.f()}return w&&(this.gc(),m=!1),m}},{key:"gc",value:function(){var r=Ns(this.collections.values()),a;try{for(r.s();!(a=r.n()).done;){var s=a.value;s.gc()}}catch(c){r.e(c)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,a,s,c){var f=this.renderTypes.get(a),h=this.collections.get(f.collection),d=!1,p=h.draw(c,s,function(w){f.drawClipped?(w.save(),w.beginPath(),w.rect(0,0,s.w,s.h),w.clip(),f.drawElement(w,r,s,!0,!0),w.restore()):f.drawElement(w,r,s,!0,!0),d=!0});if(d){var b=f.getID?f.getID(r):r.id(),m=this._key(a,b);this.typeAndIdToKey.has(m)?this.typeAndIdToKey.get(m).push(c):this.typeAndIdToKey.set(m,[c])}return p}},{key:"getAtlasInfo",value:function(r,a){var s=this,c=this.renderTypes.get(a),f=c.getKey(r),h=Array.isArray(f)?f:[f];return h.map(function(d){var p=c.getBoundingBox(r,d),b=s.getOrCreateAtlas(r,a,p,d),m=b.getOffsets(d),w=ma(m,2),k=w[0],P=w[1];return{atlas:b,tex:k,tex1:k,tex2:P,bb:p}})}},{key:"getDebugInfo",value:function(){var r=[],a=Ns(this.collections),s;try{for(a.s();!(s=a.n()).done;){var c=ma(s.value,2),f=c[0],h=c[1],d=h.getCounts(),p=d.keyCount,b=d.atlasCount;r.push({type:f,keyCount:p,atlasCount:b})}}catch(m){a.e(m)}finally{a.f()}return r}}])}(),ade=function(){function t(r){ah(this,t),this.globalOptions=r,this.atlasSize=r.webglTexSize,this.maxAtlasesPerBatch=r.webglTexPerBatch,this.batchAtlases=[]}return oh(t,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,a){return a})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(r):!0}},{key:"getAtlasIndexForBatch",value:function(r){var a=this.batchAtlases.indexOf(r);if(a<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(r),a=this.batchAtlases.length-1}return a}}])}(),ode=`
|
|
18
|
+
float circleSD(vec2 p, float r) {
|
|
19
|
+
return distance(vec2(0), p) - r; // signed distance
|
|
20
|
+
}
|
|
21
|
+
`,sde=`
|
|
22
|
+
float rectangleSD(vec2 p, vec2 b) {
|
|
23
|
+
vec2 d = abs(p)-b;
|
|
24
|
+
return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);
|
|
25
|
+
}
|
|
26
|
+
`,ude=`
|
|
27
|
+
float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {
|
|
28
|
+
cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;
|
|
29
|
+
cr.x = (p.y > 0.0) ? cr.x : cr.y;
|
|
30
|
+
vec2 q = abs(p) - b + cr.x;
|
|
31
|
+
return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;
|
|
32
|
+
}
|
|
33
|
+
`,cde=`
|
|
34
|
+
float ellipseSD(vec2 p, vec2 ab) {
|
|
35
|
+
p = abs( p ); // symmetry
|
|
36
|
+
|
|
37
|
+
// find root with Newton solver
|
|
38
|
+
vec2 q = ab*(p-ab);
|
|
39
|
+
float w = (q.x<q.y)? 1.570796327 : 0.0;
|
|
40
|
+
for( int i=0; i<5; i++ ) {
|
|
41
|
+
vec2 cs = vec2(cos(w),sin(w));
|
|
42
|
+
vec2 u = ab*vec2( cs.x,cs.y);
|
|
43
|
+
vec2 v = ab*vec2(-cs.y,cs.x);
|
|
44
|
+
w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// compute final point and distance
|
|
48
|
+
float d = length(p-ab*vec2(cos(w),sin(w)));
|
|
49
|
+
|
|
50
|
+
// return signed distance
|
|
51
|
+
return (dot(p/ab,p/ab)>1.0) ? d : -d;
|
|
52
|
+
}
|
|
53
|
+
`,N0={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Rw={IGNORE:1,USE_BB:2},VP=0,uR=1,cR=2,qP=3,zg=4,Gw=5,T0=6,M0=7,lde=function(){function t(r,a,s){ah(this,t),this.r=r,this.gl=a,this.maxInstances=s.webglBatchSize,this.atlasSize=s.webglTexSize,this.bgColor=s.bgColor,this.debug=s.webglDebug,this.batchDebugInfo=[],s.enableWrapping=!0,s.createTextureCanvas=Uhe,this.atlasManager=new ide(r,s),this.batchManager=new ade(s),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(N0.SCREEN),this.pickingProgram=this._createShaderProgram(N0.PICKING),this.vao=this._createVAO()}return oh(t,[{key:"addAtlasCollection",value:function(r,a){this.atlasManager.addAtlasCollection(r,a)}},{key:"addTextureAtlasRenderType",value:function(r,a){this.atlasManager.addRenderType(r,a)}},{key:"addSimpleShapeRenderType",value:function(r,a){this.simpleShapeOptions.set(r,a)}},{key:"invalidate",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.type,c=this.atlasManager;return s?c.invalidate(r,{filterType:function(f){return f===s},forceRedraw:!0}):c.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(r){var a=this.gl,s=`#version 300 es
|
|
54
|
+
precision highp float;
|
|
55
|
+
|
|
56
|
+
uniform mat3 uPanZoomMatrix;
|
|
57
|
+
uniform int uAtlasSize;
|
|
58
|
+
|
|
59
|
+
// instanced
|
|
60
|
+
in vec2 aPosition; // a vertex from the unit square
|
|
61
|
+
|
|
62
|
+
in mat3 aTransform; // used to transform verticies, eg into a bounding box
|
|
63
|
+
in int aVertType; // the type of thing we are rendering
|
|
64
|
+
|
|
65
|
+
// the z-index that is output when using picking mode
|
|
66
|
+
in vec4 aIndex;
|
|
67
|
+
|
|
68
|
+
// For textures
|
|
69
|
+
in int aAtlasId; // which shader unit/atlas to use
|
|
70
|
+
in vec4 aTex; // x/y/w/h of texture in atlas
|
|
71
|
+
|
|
72
|
+
// for edges
|
|
73
|
+
in vec4 aPointAPointB;
|
|
74
|
+
in vec4 aPointCPointD;
|
|
75
|
+
in vec2 aLineWidth; // also used for node border width
|
|
76
|
+
|
|
77
|
+
// simple shapes
|
|
78
|
+
in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]
|
|
79
|
+
in vec4 aColor; // also used for edges
|
|
80
|
+
in vec4 aBorderColor; // aLineWidth is used for border width
|
|
81
|
+
|
|
82
|
+
// output values passed to the fragment shader
|
|
83
|
+
out vec2 vTexCoord;
|
|
84
|
+
out vec4 vColor;
|
|
85
|
+
out vec2 vPosition;
|
|
86
|
+
// flat values are not interpolated
|
|
87
|
+
flat out int vAtlasId;
|
|
88
|
+
flat out int vVertType;
|
|
89
|
+
flat out vec2 vTopRight;
|
|
90
|
+
flat out vec2 vBotLeft;
|
|
91
|
+
flat out vec4 vCornerRadius;
|
|
92
|
+
flat out vec4 vBorderColor;
|
|
93
|
+
flat out vec2 vBorderWidth;
|
|
94
|
+
flat out vec4 vIndex;
|
|
95
|
+
|
|
96
|
+
void main(void) {
|
|
97
|
+
int vid = gl_VertexID;
|
|
98
|
+
vec2 position = aPosition; // TODO make this a vec3, simplifies some code below
|
|
99
|
+
|
|
100
|
+
if(aVertType == `.concat(VP,`) {
|
|
101
|
+
float texX = aTex.x; // texture coordinates
|
|
102
|
+
float texY = aTex.y;
|
|
103
|
+
float texW = aTex.z;
|
|
104
|
+
float texH = aTex.w;
|
|
105
|
+
|
|
106
|
+
if(vid == 1 || vid == 2 || vid == 4) {
|
|
107
|
+
texX += texW;
|
|
108
|
+
}
|
|
109
|
+
if(vid == 2 || vid == 4 || vid == 5) {
|
|
110
|
+
texY += texH;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
float d = float(uAtlasSize);
|
|
114
|
+
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
|
|
115
|
+
|
|
116
|
+
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
|
117
|
+
}
|
|
118
|
+
else if(aVertType == `).concat(zg," || aVertType == ").concat(M0,`
|
|
119
|
+
|| aVertType == `).concat(Gw," || aVertType == ").concat(T0,`) { // simple shapes
|
|
120
|
+
|
|
121
|
+
// the bounding box is needed by the fragment shader
|
|
122
|
+
vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat
|
|
123
|
+
vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat
|
|
124
|
+
vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated
|
|
125
|
+
|
|
126
|
+
// calculations are done in the fragment shader, just pass these along
|
|
127
|
+
vColor = aColor;
|
|
128
|
+
vCornerRadius = aCornerRadius;
|
|
129
|
+
vBorderColor = aBorderColor;
|
|
130
|
+
vBorderWidth = aLineWidth;
|
|
131
|
+
|
|
132
|
+
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
|
133
|
+
}
|
|
134
|
+
else if(aVertType == `).concat(uR,`) {
|
|
135
|
+
vec2 source = aPointAPointB.xy;
|
|
136
|
+
vec2 target = aPointAPointB.zw;
|
|
137
|
+
|
|
138
|
+
// adjust the geometry so that the line is centered on the edge
|
|
139
|
+
position.y = position.y - 0.5;
|
|
140
|
+
|
|
141
|
+
// stretch the unit square into a long skinny rectangle
|
|
142
|
+
vec2 xBasis = target - source;
|
|
143
|
+
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
|
|
144
|
+
vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;
|
|
145
|
+
|
|
146
|
+
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
|
|
147
|
+
vColor = aColor;
|
|
148
|
+
}
|
|
149
|
+
else if(aVertType == `).concat(cR,`) {
|
|
150
|
+
vec2 pointA = aPointAPointB.xy;
|
|
151
|
+
vec2 pointB = aPointAPointB.zw;
|
|
152
|
+
vec2 pointC = aPointCPointD.xy;
|
|
153
|
+
vec2 pointD = aPointCPointD.zw;
|
|
154
|
+
|
|
155
|
+
// adjust the geometry so that the line is centered on the edge
|
|
156
|
+
position.y = position.y - 0.5;
|
|
157
|
+
|
|
158
|
+
vec2 p0, p1, p2, pos;
|
|
159
|
+
if(position.x == 0.0) { // The left side of the unit square
|
|
160
|
+
p0 = pointA;
|
|
161
|
+
p1 = pointB;
|
|
162
|
+
p2 = pointC;
|
|
163
|
+
pos = position;
|
|
164
|
+
} else { // The right side of the unit square, use same approach but flip the geometry upside down
|
|
165
|
+
p0 = pointD;
|
|
166
|
+
p1 = pointC;
|
|
167
|
+
p2 = pointB;
|
|
168
|
+
pos = vec2(0.0, -position.y);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
vec2 p01 = p1 - p0;
|
|
172
|
+
vec2 p12 = p2 - p1;
|
|
173
|
+
vec2 p21 = p1 - p2;
|
|
174
|
+
|
|
175
|
+
// Find the normal vector.
|
|
176
|
+
vec2 tangent = normalize(normalize(p12) + normalize(p01));
|
|
177
|
+
vec2 normal = vec2(-tangent.y, tangent.x);
|
|
178
|
+
|
|
179
|
+
// Find the vector perpendicular to p0 -> p1.
|
|
180
|
+
vec2 p01Norm = normalize(vec2(-p01.y, p01.x));
|
|
181
|
+
|
|
182
|
+
// Determine the bend direction.
|
|
183
|
+
float sigma = sign(dot(p01 + p21, normal));
|
|
184
|
+
float width = aLineWidth[0];
|
|
185
|
+
|
|
186
|
+
if(sign(pos.y) == -sigma) {
|
|
187
|
+
// This is an intersecting vertex. Adjust the position so that there's no overlap.
|
|
188
|
+
vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);
|
|
189
|
+
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
|
|
190
|
+
} else {
|
|
191
|
+
// This is a non-intersecting vertex. Treat it like a mitre join.
|
|
192
|
+
vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);
|
|
193
|
+
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
vColor = aColor;
|
|
197
|
+
}
|
|
198
|
+
else if(aVertType == `).concat(qP,` && vid < 3) {
|
|
199
|
+
// massage the first triangle into an edge arrow
|
|
200
|
+
if(vid == 0)
|
|
201
|
+
position = vec2(-0.15, -0.3);
|
|
202
|
+
if(vid == 1)
|
|
203
|
+
position = vec2( 0.0, 0.0);
|
|
204
|
+
if(vid == 2)
|
|
205
|
+
position = vec2( 0.15, -0.3);
|
|
206
|
+
|
|
207
|
+
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
|
208
|
+
vColor = aColor;
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
vAtlasId = aAtlasId;
|
|
215
|
+
vVertType = aVertType;
|
|
216
|
+
vIndex = aIndex;
|
|
217
|
+
}
|
|
218
|
+
`),c=this.batchManager.getIndexArray(),f=`#version 300 es
|
|
219
|
+
precision highp float;
|
|
220
|
+
|
|
221
|
+
// declare texture unit for each texture atlas in the batch
|
|
222
|
+
`.concat(c.map(function(p){return"uniform sampler2D uTexture".concat(p,";")}).join(`
|
|
223
|
+
`),`
|
|
224
|
+
|
|
225
|
+
uniform vec4 uBGColor;
|
|
226
|
+
uniform float uZoom;
|
|
227
|
+
|
|
228
|
+
in vec2 vTexCoord;
|
|
229
|
+
in vec4 vColor;
|
|
230
|
+
in vec2 vPosition; // model coordinates
|
|
231
|
+
|
|
232
|
+
flat in int vAtlasId;
|
|
233
|
+
flat in vec4 vIndex;
|
|
234
|
+
flat in int vVertType;
|
|
235
|
+
flat in vec2 vTopRight;
|
|
236
|
+
flat in vec2 vBotLeft;
|
|
237
|
+
flat in vec4 vCornerRadius;
|
|
238
|
+
flat in vec4 vBorderColor;
|
|
239
|
+
flat in vec2 vBorderWidth;
|
|
240
|
+
|
|
241
|
+
out vec4 outColor;
|
|
242
|
+
|
|
243
|
+
`).concat(ode,`
|
|
244
|
+
`).concat(sde,`
|
|
245
|
+
`).concat(ude,`
|
|
246
|
+
`).concat(cde,`
|
|
247
|
+
|
|
248
|
+
vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha
|
|
249
|
+
return vec4(
|
|
250
|
+
top.rgb + (bot.rgb * (1.0 - top.a)),
|
|
251
|
+
top.a + (bot.a * (1.0 - top.a))
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance
|
|
256
|
+
// scale to the zoom level so that borders don't look blurry when zoomed in
|
|
257
|
+
// note 1.5 is an aribitrary value chosen because it looks good
|
|
258
|
+
return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d)));
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
void main(void) {
|
|
262
|
+
if(vVertType == `).concat(VP,`) {
|
|
263
|
+
// look up the texel from the texture unit
|
|
264
|
+
`).concat(c.map(function(p){return"if(vAtlasId == ".concat(p,") outColor = texture(uTexture").concat(p,", vTexCoord);")}).join(`
|
|
265
|
+
else `),`
|
|
266
|
+
}
|
|
267
|
+
else if(vVertType == `).concat(qP,`) {
|
|
268
|
+
// mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';
|
|
269
|
+
outColor = blend(vColor, uBGColor);
|
|
270
|
+
outColor.a = 1.0; // make opaque, masks out line under arrow
|
|
271
|
+
}
|
|
272
|
+
else if(vVertType == `).concat(zg,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border
|
|
273
|
+
outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done
|
|
274
|
+
}
|
|
275
|
+
else if(vVertType == `).concat(zg," || vVertType == ").concat(M0,`
|
|
276
|
+
|| vVertType == `).concat(Gw," || vVertType == ").concat(T0,`) { // use SDF
|
|
277
|
+
|
|
278
|
+
float outerBorder = vBorderWidth[0];
|
|
279
|
+
float innerBorder = vBorderWidth[1];
|
|
280
|
+
float borderPadding = outerBorder * 2.0;
|
|
281
|
+
float w = vTopRight.x - vBotLeft.x - borderPadding;
|
|
282
|
+
float h = vTopRight.y - vBotLeft.y - borderPadding;
|
|
283
|
+
vec2 b = vec2(w/2.0, h/2.0); // half width, half height
|
|
284
|
+
vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center
|
|
285
|
+
|
|
286
|
+
float d; // signed distance
|
|
287
|
+
if(vVertType == `).concat(zg,`) {
|
|
288
|
+
d = rectangleSD(p, b);
|
|
289
|
+
} else if(vVertType == `).concat(M0,` && w == h) {
|
|
290
|
+
d = circleSD(p, b.x); // faster than ellipse
|
|
291
|
+
} else if(vVertType == `).concat(M0,`) {
|
|
292
|
+
d = ellipseSD(p, b);
|
|
293
|
+
} else {
|
|
294
|
+
d = roundRectangleSD(p, b, vCornerRadius.wzyx);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling
|
|
298
|
+
// we must smooth colors inwards, because we can't change pixels outside the shape's bounding box
|
|
299
|
+
if(d > 0.0) {
|
|
300
|
+
if(d > outerBorder) {
|
|
301
|
+
discard;
|
|
302
|
+
} else {
|
|
303
|
+
outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);
|
|
304
|
+
}
|
|
305
|
+
} else {
|
|
306
|
+
if(d > innerBorder) {
|
|
307
|
+
vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;
|
|
308
|
+
vec4 innerBorderColor = blend(vBorderColor, vColor);
|
|
309
|
+
outColor = distInterp(innerBorderColor, outerColor, d);
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
vec4 outerColor;
|
|
313
|
+
if(innerBorder == 0.0 && outerBorder == 0.0) {
|
|
314
|
+
outerColor = vec4(0);
|
|
315
|
+
} else if(innerBorder == 0.0) {
|
|
316
|
+
outerColor = vBorderColor;
|
|
317
|
+
} else {
|
|
318
|
+
outerColor = blend(vBorderColor, vColor);
|
|
319
|
+
}
|
|
320
|
+
outColor = distInterp(vColor, outerColor, d - innerBorder);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
outColor = vColor;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
`).concat(r.picking?`if(outColor.a == 0.0) discard;
|
|
329
|
+
else outColor = vIndex;`:"",`
|
|
330
|
+
}
|
|
331
|
+
`),h=zhe(a,s,f);h.aPosition=a.getAttribLocation(h,"aPosition"),h.aIndex=a.getAttribLocation(h,"aIndex"),h.aVertType=a.getAttribLocation(h,"aVertType"),h.aTransform=a.getAttribLocation(h,"aTransform"),h.aAtlasId=a.getAttribLocation(h,"aAtlasId"),h.aTex=a.getAttribLocation(h,"aTex"),h.aPointAPointB=a.getAttribLocation(h,"aPointAPointB"),h.aPointCPointD=a.getAttribLocation(h,"aPointCPointD"),h.aLineWidth=a.getAttribLocation(h,"aLineWidth"),h.aColor=a.getAttribLocation(h,"aColor"),h.aCornerRadius=a.getAttribLocation(h,"aCornerRadius"),h.aBorderColor=a.getAttribLocation(h,"aBorderColor"),h.uPanZoomMatrix=a.getUniformLocation(h,"uPanZoomMatrix"),h.uAtlasSize=a.getUniformLocation(h,"uAtlasSize"),h.uBGColor=a.getUniformLocation(h,"uBGColor"),h.uZoom=a.getUniformLocation(h,"uZoom"),h.uTextures=[];for(var d=0;d<this.batchManager.getMaxAtlasesPerBatch();d++)h.uTextures.push(a.getUniformLocation(h,"uTexture".concat(d)));return h}},{key:"_createVAO",value:function(){var r=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=r.length/2;var a=this.maxInstances,s=this.gl,c=this.program,f=s.createVertexArray();return s.bindVertexArray(f),Qhe(s,"vec2",c.aPosition,r),this.transformBuffer=Whe(s,a,c.aTransform),this.indexBuffer=Xc(s,a,"vec4",c.aIndex),this.vertTypeBuffer=Xc(s,a,"int",c.aVertType),this.atlasIdBuffer=Xc(s,a,"int",c.aAtlasId),this.texBuffer=Xc(s,a,"vec4",c.aTex),this.pointAPointBBuffer=Xc(s,a,"vec4",c.aPointAPointB),this.pointCPointDBuffer=Xc(s,a,"vec4",c.aPointCPointD),this.lineWidthBuffer=Xc(s,a,"vec2",c.aLineWidth),this.colorBuffer=Xc(s,a,"vec4",c.aColor),this.cornerRadiusBuffer=Xc(s,a,"vec4",c.aCornerRadius),this.borderColorBuffer=Xc(s,a,"vec4",c.aBorderColor),s.bindVertexArray(null),f}},{key:"buffers",get:function(){var r=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(a){return uh(a,"Buffer")}).map(function(a){return r[a]})),this._buffers}},{key:"startFrame",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N0.SCREEN;this.panZoomMatrix=r,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(r,a){return r.visible()?a&&a.isVisible?a.isVisible(r):!0:!1}},{key:"drawTexture",value:function(r,a,s){var c=this.atlasManager,f=this.batchManager,h=c.getRenderTypeOpts(s);if(this._isVisible(r,h)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&h.getTexPickingMode){var d=h.getTexPickingMode(r);if(d===Rw.IGNORE)return;if(d==Rw.USE_BB){this.drawPickingRectangle(r,a,s);return}}var p=c.getAtlasInfo(r,s),b=Ns(p),m;try{for(b.s();!(m=b.n()).done;){var w=m.value,k=w.atlas,P=w.tex1,S=w.tex2;f.canAddToCurrentBatch(k)||this.endBatch();for(var M=f.getAtlasIndexForBatch(k),L=0,T=[[P,!0],[S,!1]];L<T.length;L++){var j=ma(T[L],2),I=j[0],D=j[1];if(I.w!=0){var R=this.instanceCount;this.vertTypeBuffer.getView(R)[0]=VP;var Y=this.indexBuffer.getView(R);Hg(a,Y);var G=this.atlasIdBuffer.getView(R);G[0]=M;var U=this.texBuffer.getView(R);U[0]=I.x,U[1]=I.y,U[2]=I.w,U[3]=I.h;var z=this.transformBuffer.getMatrixView(R);this.setTransformMatrix(r,z,h,w,D),this.instanceCount++,D||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(Q){b.e(Q)}finally{b.f()}}}},{key:"setTransformMatrix",value:function(r,a,s,c){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,h=0;if(s.shapeProps&&s.shapeProps.padding&&(h=r.pstyle(s.shapeProps.padding).pfValue),c){var d=c.bb,p=c.tex1,b=c.tex2,m=p.w/(p.w+b.w);f||(m=1-m);var w=this._getAdjustedBB(d,h,f,m);this._applyTransformMatrix(a,w,s,r)}else{var k=s.getBoundingBox(r),P=this._getAdjustedBB(k,h,!0,1);this._applyTransformMatrix(a,P,s,r)}}},{key:"_applyTransformMatrix",value:function(r,a,s,c){var f,h;oR(r);var d=s.getRotation?s.getRotation(c):0;if(d!==0){var p=s.getRotationPoint(c),b=p.x,m=p.y;Bw(r,r,[b,m]),sR(r,r,d);var w=s.getRotationOffset(c);f=w.x+(a.xOffset||0),h=w.y+(a.yOffset||0)}else f=a.x1,h=a.y1;Bw(r,r,[f,h]),YP(r,r,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(r,a,s,c){var f=r.x1,h=r.y1,d=r.w,p=r.h,b=r.yOffset;a&&(f-=a,h-=a,d+=2*a,p+=2*a);var m=0,w=d*c;return s&&c<1?d=w:!s&&c<1&&(m=d-w,f+=m,d=w),{x1:f,y1:h,w:d,h:p,xOffset:m,yOffset:b}}},{key:"drawPickingRectangle",value:function(r,a,s){var c=this.atlasManager.getRenderTypeOpts(s),f=this.instanceCount;this.vertTypeBuffer.getView(f)[0]=zg;var h=this.indexBuffer.getView(f);Hg(a,h);var d=this.colorBuffer.getView(f);Zd([0,0,0],1,d);var p=this.transformBuffer.getMatrixView(f);this.setTransformMatrix(r,p,c),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,a,s){var c=this.simpleShapeOptions.get(s);if(this._isVisible(r,c)){var f=c.shapeProps,h=this._getVertTypeForShape(r,f.shape);if(h===void 0||c.isSimple&&!c.isSimple(r)){this.drawTexture(r,a,s);return}var d=this.instanceCount;if(this.vertTypeBuffer.getView(d)[0]=h,h===Gw||h===T0){var p=c.getBoundingBox(r),b=this._getCornerRadius(r,f.radius,p),m=this.cornerRadiusBuffer.getView(d);m[0]=b,m[1]=b,m[2]=b,m[3]=b,h===T0&&(m[0]=0,m[2]=0)}var w=this.indexBuffer.getView(d);Hg(a,w);var k=r.pstyle(f.color).value,P=r.pstyle(f.opacity).value,S=this.colorBuffer.getView(d);Zd(k,P,S);var M=this.lineWidthBuffer.getView(d);if(M[0]=0,M[1]=0,f.border){var L=r.pstyle("border-width").value;if(L>0){var T=r.pstyle("border-color").value,j=r.pstyle("border-opacity").value,I=this.borderColorBuffer.getView(d);Zd(T,j,I);var D=r.pstyle("border-position").value;if(D==="inside")M[0]=0,M[1]=-L;else if(D==="outside")M[0]=L,M[1]=0;else{var R=L/2;M[0]=R,M[1]=-R}}}var Y=this.transformBuffer.getMatrixView(d);this.setTransformMatrix(r,Y,c),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(r,a){var s=r.pstyle(a).value;switch(s){case"rectangle":return zg;case"ellipse":return M0;case"roundrectangle":case"round-rectangle":return Gw;case"bottom-round-rectangle":return T0;default:return}}},{key:"_getCornerRadius",value:function(r,a,s){var c=s.w,f=s.h;if(r.pstyle(a).value==="auto")return dh(c,f);var h=r.pstyle(a).pfValue,d=c/2,p=f/2;return Math.min(h,p,d)}},{key:"drawEdgeArrow",value:function(r,a,s){if(r.visible()){var c=r._private.rscratch,f,h,d;if(s==="source"?(f=c.arrowStartX,h=c.arrowStartY,d=c.srcArrowAngle):(f=c.arrowEndX,h=c.arrowEndY,d=c.tgtArrowAngle),!(isNaN(f)||f==null||isNaN(h)||h==null||isNaN(d)||d==null)){var p=r.pstyle(s+"-arrow-shape").value;if(p!=="none"){var b=r.pstyle(s+"-arrow-color").value,m=r.pstyle("opacity").value,w=r.pstyle("line-opacity").value,k=m*w,P=r.pstyle("width").pfValue,S=r.pstyle("arrow-scale").value,M=this.r.getArrowWidth(P,S),L=this.instanceCount,T=this.transformBuffer.getMatrixView(L);oR(T),Bw(T,T,[f,h]),YP(T,T,[M,M]),sR(T,T,d),this.vertTypeBuffer.getView(L)[0]=qP;var j=this.indexBuffer.getView(L);Hg(a,j);var I=this.colorBuffer.getView(L);Zd(b,k,I),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,a){if(r.visible()){var s=this._getEdgePoints(r);if(s){var c=r.pstyle("opacity").value,f=r.pstyle("line-opacity").value,h=r.pstyle("width").pfValue,d=r.pstyle("line-color").value,p=c*f;if(s.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),s.length==4){var b=this.instanceCount;this.vertTypeBuffer.getView(b)[0]=uR;var m=this.indexBuffer.getView(b);Hg(a,m);var w=this.colorBuffer.getView(b);Zd(d,p,w);var k=this.lineWidthBuffer.getView(b);k[0]=h;var P=this.pointAPointBBuffer.getView(b);P[0]=s[0],P[1]=s[1],P[2]=s[2],P[3]=s[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var S=0;S<s.length-2;S+=2){var M=this.instanceCount;this.vertTypeBuffer.getView(M)[0]=cR;var L=this.indexBuffer.getView(M);Hg(a,L);var T=this.colorBuffer.getView(M);Zd(d,p,T);var j=this.lineWidthBuffer.getView(M);j[0]=h;var I=s[S-2],D=s[S-1],R=s[S],Y=s[S+1],G=s[S+2],U=s[S+3],z=s[S+4],Q=s[S+5];S==0&&(I=2*R-G+.001,D=2*Y-U+.001),S==s.length-4&&(z=2*G-R+.001,Q=2*U-Y+.001);var $=this.pointAPointBBuffer.getView(M);$[0]=I,$[1]=D,$[2]=R,$[3]=Y;var Z=this.pointCPointDBuffer.getView(M);Z[0]=G,Z[1]=U,Z[2]=z,Z[3]=Q,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(r){var a=r._private.rscratch;return!(a.badLine||a.allpts==null||isNaN(a.allpts[0]))}},{key:"_getEdgePoints",value:function(r){var a=r._private.rscratch;if(this._isValidEdge(r)){var s=a.allpts;if(s.length==4)return s;var c=this._getNumSegments(r);return this._getCurveSegmentPoints(s,c)}}},{key:"_getNumSegments",value:function(r){var a=15;return Math.min(Math.max(a,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(r,a){if(r.length==4)return r;for(var s=Array((a+1)*2),c=0;c<=a;c++)if(c==0)s[0]=r[0],s[1]=r[1];else if(c==a)s[c*2]=r[r.length-2],s[c*2+1]=r[r.length-1];else{var f=c/a;this._setCurvePoint(r,f,s,c*2)}return s}},{key:"_setCurvePoint",value:function(r,a,s,c){if(r.length<=2)s[c]=r[0],s[c+1]=r[1];else{for(var f=Array(r.length-2),h=0;h<f.length;h+=2){var d=(1-a)*r[h]+a*r[h+2],p=(1-a)*r[h+1]+a*r[h+3];f[h]=d,f[h+1]=p}return this._setCurvePoint(f,a,s,c)}}},{key:"endBatch",value:function(){var r=this.gl,a=this.vao,s=this.vertexCount,c=this.instanceCount;if(c!==0){var f=this.renderTarget.picking?this.pickingProgram:this.program;r.useProgram(f),r.bindVertexArray(a);var h=Ns(this.buffers),d;try{for(h.s();!(d=h.n()).done;){var p=d.value;p.bufferSubData(c)}}catch(P){h.e(P)}finally{h.f()}for(var b=this.batchManager.getAtlases(),m=0;m<b.length;m++)b[m].bufferIfNeeded(r);for(var w=0;w<b.length;w++)r.activeTexture(r.TEXTURE0+w),r.bindTexture(r.TEXTURE_2D,b[w].texture),r.uniform1i(f.uTextures[w],w);r.uniform1f(f.uZoom,Fhe(this.r)),r.uniformMatrix3fv(f.uPanZoomMatrix,!1,this.panZoomMatrix),r.uniform1i(f.uAtlasSize,this.batchManager.getAtlasSize());var k=Zd(this.bgColor,1);r.uniform4fv(f.uBGColor,k),r.drawArraysInstanced(r.TRIANGLES,0,s,c),r.bindVertexArray(null),r.bindTexture(r.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:c,atlasCount:b.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var r=this.atlasManager.getDebugInfo(),a=r.reduce(function(f,h){return f+h.atlasCount},0),s=this.batchDebugInfo,c=s.reduce(function(f,h){return f+h.count},0);return{atlasInfo:r,totalAtlases:a,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:s.length,batchInfo:s,totalInstances:c}}}])}(),lR={};lR.initWebgl=function(t,r){var a=this,s=a.data.contexts[a.WEBGL];t.bgColor=fde(a),t.webglTexSize=Math.min(t.webglTexSize,s.getParameter(s.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS)),a.webglDebug=t.webglDebug,a.webglDebugShowAtlases=t.webglDebugShowAtlases,a.pickingFrameBuffer=Jhe(s),a.pickingFrameBuffer.needsDraw=!0,a.drawing=new lde(a,s,t);var c=function(m){return function(w){return a.getTextAngle(w,m)}},f=function(m){return function(w){var k=w.pstyle(m);return k&&k.value}},h=function(m){return function(w){return w.pstyle("".concat(m,"-opacity")).value>0}},d=function(m){var w=m.pstyle("text-events").strValue==="yes";return w?Rw.USE_BB:Rw.IGNORE},p=function(m){var w=m.position(),k=w.x,P=w.y,S=m.outerWidth(),M=m.outerHeight();return{w:S,h:M,x1:k-S/2,y1:P-M/2}};a.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),a.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),a.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:r.getStyleKey,getBoundingBox:r.getElementBox,drawElement:r.drawElement}),a.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:p,isSimple:Vhe,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),a.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:p,isVisible:h("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),a.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:p,isVisible:h("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),a.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:d,getKey:ZP(r.getLabelKey,null),getBoundingBox:$P(r.getLabelBox,null),drawClipped:!0,drawElement:r.drawLabel,getRotation:c(null),getRotationPoint:r.getLabelRotationPoint,getRotationOffset:r.getLabelRotationOffset,isVisible:f("label")}),a.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:d,getKey:ZP(r.getSourceLabelKey,"source"),getBoundingBox:$P(r.getSourceLabelBox,"source"),drawClipped:!0,drawElement:r.drawSourceLabel,getRotation:c("source"),getRotationPoint:r.getSourceLabelRotationPoint,getRotationOffset:r.getSourceLabelRotationOffset,isVisible:f("source-label")}),a.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:d,getKey:ZP(r.getTargetLabelKey,"target"),getBoundingBox:$P(r.getTargetLabelBox,"target"),drawClipped:!0,drawElement:r.drawTargetLabel,getRotation:c("target"),getRotationPoint:r.getTargetLabelRotationPoint,getRotationOffset:r.getTargetLabelRotationOffset,isVisible:f("target-label")});var b=n0(function(){console.log("garbage collect flag set"),a.data.gc=!0},1e4);a.onUpdateEleCalcs(function(m,w){var k=!1;w&&w.length>0&&(k|=a.drawing.invalidate(w)),k&&b()}),hde(a)};function fde(t){var r=t.cy.container(),a=r&&r.style&&r.style.backgroundColor||"white";return p8(a)}function fR(t,r){var a=t._private.rscratch;return Ts(a,"labelWrapCachedLines",r)||[]}var ZP=function(t,r){return function(a){var s=t(a),c=fR(a,r);return c.length>1?c.map(function(f,h){return"".concat(s,"_").concat(h)}):s}},$P=function(t,r){return function(a,s){var c=t(a);if(typeof s=="string"){var f=s.indexOf("_");if(f>0){var h=Number(s.substring(f+1)),d=fR(a,r),p=c.h/d.length,b=p*h,m=c.y1+b;return{x1:c.x1,w:c.w,y1:m,h:p,yOffset:b}}}return c}};function hde(t){{var r=t.render;t.render=function(f){f=f||{};var h=t.cy;t.webgl&&(h.zoom()>VB?(dde(t),r.call(t,f)):(pde(t),dR(t,f,N0.SCREEN)))}}{var a=t.matchCanvasSize;t.matchCanvasSize=function(f){a.call(t,f),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(f,h,d,p){return wde(t,f,h)};{var s=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){s.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var c=t.notify;t.notify=function(f,h){c.call(t,f,h),f==="viewport"||f==="bounds"?t.pickingFrameBuffer.needsDraw=!0:f==="background"&&t.drawing.invalidate(h,{type:"node-body"})}}}function dde(t){var r=t.data.contexts[t.WEBGL];r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT)}function pde(t){var r=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,t.canvasWidth,t.canvasHeight),a.restore()};r(t.data.contexts[t.NODE]),r(t.data.contexts[t.DRAG])}function gde(t){var r=t.canvasWidth,a=t.canvasHeight,s=UP(t),c=s.pan,f=s.zoom,h=FP();Bw(h,h,[c.x,c.y]),YP(h,h,[f,f]);var d=FP();ede(d,r,a);var p=FP();return Xhe(p,d,h),p}function hR(t,r){var a=t.canvasWidth,s=t.canvasHeight,c=UP(t),f=c.pan,h=c.zoom;r.setTransform(1,0,0,1,0,0),r.clearRect(0,0,a,s),r.translate(f.x,f.y),r.scale(h,h)}function bde(t,r){t.drawSelectionRectangle(r,function(a){return hR(t,a)})}function vde(t){var r=t.data.contexts[t.NODE];r.save(),hR(t,r),r.strokeStyle="rgba(0, 0, 0, 0.3)",r.beginPath(),r.moveTo(-1e3,0),r.lineTo(1e3,0),r.stroke(),r.beginPath(),r.moveTo(0,-1e3),r.lineTo(0,1e3),r.stroke(),r.restore()}function yde(t){var r=function(s,c,f){for(var h=s.atlasManager.getAtlasCollection(c),d=t.data.contexts[t.NODE],p=h.atlases,b=0;b<p.length;b++){var m=p[b],w=m.canvas;if(w){var k=w.width,P=w.height,S=k*b,M=w.height*f,L=.4;d.save(),d.scale(L,L),d.drawImage(w,S,M),d.strokeStyle="black",d.rect(S,M,k,P),d.stroke(),d.restore()}}},a=0;r(t.drawing,"node",a++),r(t.drawing,"label",a++)}function mde(t,r,a,s,c){var f,h,d,p,b=UP(t),m=b.pan,w=b.zoom;{var k=Yhe(t,m,w,r,a),P=ma(k,2),S=P[0],M=P[1],L=6;f=S-L/2,h=M-L/2,d=L,p=L}if(d===0||p===0)return[];var T=t.data.contexts[t.WEBGL];T.bindFramebuffer(T.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(T.viewport(0,0,T.canvas.width,T.canvas.height),dR(t,null,N0.PICKING),t.pickingFrameBuffer.needsDraw=!1);var j=d*p,I=new Uint8Array(j*4);T.readPixels(f,h,d,p,T.RGBA,T.UNSIGNED_BYTE,I),T.bindFramebuffer(T.FRAMEBUFFER,null);for(var D=new Set,R=0;R<j;R++){var Y=I.slice(R*4,R*4+4),G=Zhe(Y)-1;G>=0&&D.add(G)}return D}function wde(t,r,a){var s=mde(t,r,a),c=t.getCachedZSortedEles(),f,h,d=Ns(s),p;try{for(d.s();!(p=d.n()).done;){var b=p.value,m=c[b];if(!f&&m.isNode()&&(f=m),!h&&m.isEdge()&&(h=m),f&&h)break}}catch(w){d.e(w)}finally{d.f()}return[f,h].filter(Boolean)}function KP(t,r,a){var s=t.drawing;r+=1,a.isNode()?(s.drawNode(a,r,"node-underlay"),s.drawNode(a,r,"node-body"),s.drawTexture(a,r,"label"),s.drawNode(a,r,"node-overlay")):(s.drawEdgeLine(a,r),s.drawEdgeArrow(a,r,"source"),s.drawEdgeArrow(a,r,"target"),s.drawTexture(a,r,"label"),s.drawTexture(a,r,"edge-source-label"),s.drawTexture(a,r,"edge-target-label"))}function dR(t,r,a){var s;t.webglDebug&&(s=performance.now());var c=t.drawing,f=0;if(a.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&bde(t,r),t.data.canvasNeedsRedraw[t.NODE]||a.picking){var h=t.data.contexts[t.WEBGL];a.screen?(h.clearColor(0,0,0,0),h.enable(h.BLEND),h.blendFunc(h.ONE,h.ONE_MINUS_SRC_ALPHA)):h.disable(h.BLEND),h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT),h.viewport(0,0,h.canvas.width,h.canvas.height);var d=gde(t),p=t.getCachedZSortedEles();if(f=p.length,c.startFrame(d,a),a.screen){for(var b=0;b<p.nondrag.length;b++)KP(t,b,p.nondrag[b]);for(var m=0;m<p.drag.length;m++)KP(t,m,p.drag[m])}else if(a.picking)for(var w=0;w<p.length;w++)KP(t,w,p[w]);c.endFrame(),a.screen&&t.webglDebugShowAtlases&&(vde(t),yde(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var k=performance.now(),P=!1,S=Math.ceil(k-s),M=c.getDebugInfo(),L=["".concat(f," elements"),"".concat(M.totalInstances," instances"),"".concat(M.batchCount," batches"),"".concat(M.totalAtlases," atlases"),"".concat(M.wrappedCount," wrapped textures"),"".concat(M.simpleCount," simple shapes")].join(", ");if(P)console.log("WebGL (".concat(a.name,") - time ").concat(S,"ms, ").concat(L));else{console.log("WebGL (".concat(a.name,") - frame time ").concat(S,"ms")),console.log("Totals:"),console.log(" ".concat(L)),console.log("Texture Atlases Used:");var T=M.atlasInfo,j=Ns(T),I;try{for(j.s();!(I=j.n()).done;){var D=I.value;console.log(" ".concat(D.type,": ").concat(D.keyCount," keys, ").concat(D.atlasCount," atlases"))}}catch(R){j.e(R)}finally{j.f()}console.log("")}}t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,c.gc())}var _h={};_h.drawPolygonPath=function(t,r,a,s,c,f){var h=s/2,d=c/2;t.beginPath&&t.beginPath(),t.moveTo(r+h*f[0],a+d*f[1]);for(var p=1;p<f.length/2;p++)t.lineTo(r+h*f[p*2],a+d*f[p*2+1]);t.closePath()},_h.drawRoundPolygonPath=function(t,r,a,s,c,f,h){h.forEach(function(d){return AB(t,d)}),t.closePath()},_h.drawRoundRectanglePath=function(t,r,a,s,c,f){var h=s/2,d=c/2,p=f==="auto"?dh(s,c):Math.min(f,d,h);t.beginPath&&t.beginPath(),t.moveTo(r,a-d),t.arcTo(r+h,a-d,r+h,a,p),t.arcTo(r+h,a+d,r,a+d,p),t.arcTo(r-h,a+d,r-h,a,p),t.arcTo(r-h,a-d,r,a-d,p),t.lineTo(r,a-d),t.closePath()},_h.drawBottomRoundRectanglePath=function(t,r,a,s,c,f){var h=s/2,d=c/2,p=f==="auto"?dh(s,c):f;t.beginPath&&t.beginPath(),t.moveTo(r,a-d),t.lineTo(r+h,a-d),t.lineTo(r+h,a),t.arcTo(r+h,a+d,r,a+d,p),t.arcTo(r-h,a+d,r-h,a,p),t.lineTo(r-h,a-d),t.lineTo(r,a-d),t.closePath()},_h.drawCutRectanglePath=function(t,r,a,s,c,f,h){var d=s/2,p=c/2,b=h==="auto"?u3():h;t.beginPath&&t.beginPath(),t.moveTo(r-d+b,a-p),t.lineTo(r+d-b,a-p),t.lineTo(r+d,a-p+b),t.lineTo(r+d,a+p-b),t.lineTo(r+d-b,a+p),t.lineTo(r-d+b,a+p),t.lineTo(r-d,a+p-b),t.lineTo(r-d,a-p+b),t.closePath()},_h.drawBarrelPath=function(t,r,a,s,c){var f=s/2,h=c/2,d=r-f,p=r+f,b=a-h,m=a+h,w=c3(s,c),k=w.widthOffset,P=w.heightOffset,S=w.ctrlPtOffsetPct*k;t.beginPath&&t.beginPath(),t.moveTo(d,b+P),t.lineTo(d,m-P),t.quadraticCurveTo(d+S,m,d+k,m),t.lineTo(p-k,m),t.quadraticCurveTo(p-S,m,p,m-P),t.lineTo(p,b+P),t.quadraticCurveTo(p-S,b,p-k,b),t.lineTo(d+k,b),t.quadraticCurveTo(d+S,b,d,b+P),t.closePath()};for(var pR=Math.sin(0),gR=Math.cos(0),QP={},WP={},bR=Math.PI/40,Ug=0*Math.PI;Ug<2*Math.PI;Ug+=bR)QP[Ug]=Math.sin(Ug),WP[Ug]=Math.cos(Ug);_h.drawEllipsePath=function(t,r,a,s,c){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(r,a,s/2,c/2,0,0,2*Math.PI);else for(var f,h,d=s/2,p=c/2,b=0*Math.PI;b<2*Math.PI;b+=bR)f=r-d*QP[b]*pR+d*WP[b]*gR,h=a+p*WP[b]*pR+p*QP[b]*gR,b===0?t.moveTo(f,h):t.lineTo(f,h);t.closePath()};var j0={};j0.createBuffer=function(t,r){var a=document.createElement("canvas");return a.width=t,a.height=r,[a,a.getContext("2d")]},j0.bufferCanvasImage=function(t){var r=this.cy,a=r.mutableElements(),s=a.boundingBox(),c=this.findContainerClientCoords(),f=t.full?Math.ceil(s.w):c[2],h=t.full?Math.ceil(s.h):c[3],d=jt(t.maxWidth)||jt(t.maxHeight),p=this.getPixelRatio(),b=1;if(t.scale!==void 0)f*=t.scale,h*=t.scale,b=t.scale;else if(d){var m=1/0,w=1/0;jt(t.maxWidth)&&(m=b*t.maxWidth/f),jt(t.maxHeight)&&(w=b*t.maxHeight/h),b=Math.min(m,w),f*=b,h*=b}d||(f*=p,h*=p,b*=p);var k=document.createElement("canvas");k.width=f,k.height=h,k.style.width=f+"px",k.style.height=h+"px";var P=k.getContext("2d");if(f>0&&h>0){P.clearRect(0,0,f,h),P.globalCompositeOperation="source-over";var S=this.getCachedZSortedEles();if(t.full)P.translate(-s.x1*b,-s.y1*b),P.scale(b,b),this.drawElements(P,S),P.scale(1/b,1/b),P.translate(s.x1*b,s.y1*b);else{var M=r.pan(),L={x:M.x*b,y:M.y*b};b*=r.zoom(),P.translate(L.x,L.y),P.scale(b,b),this.drawElements(P,S),P.scale(1/b,1/b),P.translate(-L.x,-L.y)}t.bg&&(P.globalCompositeOperation="destination-over",P.fillStyle=t.bg,P.rect(0,0,f,h),P.fill())}return k};function xde(t,r){for(var a=atob(t),s=new ArrayBuffer(a.length),c=new Uint8Array(s),f=0;f<a.length;f++)c[f]=a.charCodeAt(f);return new Blob([s],{type:r})}function vR(t){var r=t.indexOf(",");return t.substr(r+1)}function yR(t,r,a){var s=function(){return r.toDataURL(a,t.quality)};switch(t.output){case"blob-promise":return new Sg(function(c,f){try{r.toBlob(function(h){h!=null?c(h):f(new Error("`canvas.toBlob()` sent a null value in its callback"))},a,t.quality)}catch(h){f(h)}});case"blob":return xde(vR(s()),a);case"base64":return vR(s());case"base64uri":default:return s()}}j0.png=function(t){return yR(t,this.bufferCanvasImage(t),"image/png")},j0.jpg=function(t){return yR(t,this.bufferCanvasImage(t),"image/jpeg")};var mR={};mR.nodeShapeImpl=function(t,r,a,s,c,f,h,d){switch(t){case"ellipse":return this.drawEllipsePath(r,a,s,c,f);case"polygon":return this.drawPolygonPath(r,a,s,c,f,h);case"round-polygon":return this.drawRoundPolygonPath(r,a,s,c,f,h,d);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(r,a,s,c,f,d);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(r,a,s,c,f,h,d);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(r,a,s,c,f,d);case"barrel":return this.drawBarrelPath(r,a,s,c,f)}};var kde=wR,Kn=wR.prototype;Kn.CANVAS_LAYERS=3,Kn.SELECT_BOX=0,Kn.DRAG=1,Kn.NODE=2,Kn.WEBGL=3,Kn.CANVAS_TYPES=["2d","2d","2d","webgl2"],Kn.BUFFER_COUNT=3,Kn.TEXTURE_BUFFER=0,Kn.MOTIONBLUR_BUFFER_NODE=1,Kn.MOTIONBLUR_BUFFER_DRAG=2;function wR(t){var r=this,a=r.cy.window(),s=a.document;t.webgl&&(Kn.CANVAS_LAYERS=r.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),r.data={canvases:new Array(Kn.CANVAS_LAYERS),contexts:new Array(Kn.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Kn.CANVAS_LAYERS),bufferCanvases:new Array(Kn.BUFFER_COUNT),bufferContexts:new Array(Kn.CANVAS_LAYERS)};var c="-webkit-tap-highlight-color",f="rgba(0,0,0,0)";r.data.canvasContainer=s.createElement("div");var h=r.data.canvasContainer.style;r.data.canvasContainer.style[c]=f,h.position="relative",h.zIndex="0",h.overflow="hidden";var d=t.cy.container();d.appendChild(r.data.canvasContainer),d.style[c]=f;var p={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};bse()&&(p["-ms-touch-action"]="none",p["touch-action"]="none");for(var b=0;b<Kn.CANVAS_LAYERS;b++){var m=r.data.canvases[b]=s.createElement("canvas"),w=Kn.CANVAS_TYPES[b];r.data.contexts[b]=m.getContext(w),r.data.contexts[b]||_i("Could not create canvas of type "+w),Object.keys(p).forEach(function(Ne){m.style[Ne]=p[Ne]}),m.style.position="absolute",m.setAttribute("data-id","layer"+b),m.style.zIndex=String(Kn.CANVAS_LAYERS-b),r.data.canvasContainer.appendChild(m),r.data.canvasNeedsRedraw[b]=!1}r.data.topCanvas=r.data.canvases[0],r.data.canvases[Kn.NODE].setAttribute("data-id","layer"+Kn.NODE+"-node"),r.data.canvases[Kn.SELECT_BOX].setAttribute("data-id","layer"+Kn.SELECT_BOX+"-selectbox"),r.data.canvases[Kn.DRAG].setAttribute("data-id","layer"+Kn.DRAG+"-drag"),r.data.canvases[Kn.WEBGL]&&r.data.canvases[Kn.WEBGL].setAttribute("data-id","layer"+Kn.WEBGL+"-webgl");for(var b=0;b<Kn.BUFFER_COUNT;b++)r.data.bufferCanvases[b]=s.createElement("canvas"),r.data.bufferContexts[b]=r.data.bufferCanvases[b].getContext("2d"),r.data.bufferCanvases[b].style.position="absolute",r.data.bufferCanvases[b].setAttribute("data-id","buffer"+b),r.data.bufferCanvases[b].style.zIndex=String(-b-1),r.data.bufferCanvases[b].style.visibility="hidden";r.pathsEnabled=!0;var k=Qo(),P=function(Ne){return{x:(Ne.x1+Ne.x2)/2,y:(Ne.y1+Ne.y2)/2}},S=function(Ne){return{x:-Ne.w/2,y:-Ne.h/2}},M=function(Ne){var Me=Ne[0]._private,ke=Me.oldBackgroundTimestamp===Me.backgroundTimestamp;return!ke},L=function(Ne){return Ne[0]._private.nodeKey},T=function(Ne){return Ne[0]._private.labelStyleKey},j=function(Ne){return Ne[0]._private.sourceLabelStyleKey},I=function(Ne){return Ne[0]._private.targetLabelStyleKey},D=function(Ne,Me,ke,Ge,Qe){return r.drawElement(Ne,Me,ke,!1,!1,Qe)},R=function(Ne,Me,ke,Ge,Qe){return r.drawElementText(Ne,Me,ke,Ge,"main",Qe)},Y=function(Ne,Me,ke,Ge,Qe){return r.drawElementText(Ne,Me,ke,Ge,"source",Qe)},G=function(Ne,Me,ke,Ge,Qe){return r.drawElementText(Ne,Me,ke,Ge,"target",Qe)},U=function(Ne){return Ne.boundingBox(),Ne[0]._private.bodyBounds},z=function(Ne){return Ne.boundingBox(),Ne[0]._private.labelBounds.main||k},Q=function(Ne){return Ne.boundingBox(),Ne[0]._private.labelBounds.source||k},$=function(Ne){return Ne.boundingBox(),Ne[0]._private.labelBounds.target||k},Z=function(Ne,Me){return Me},X=function(Ne){return P(U(Ne))},K=function(Ne,Me,ke){var Ge=Ne?Ne+"-":"";return{x:Me.x+ke.pstyle(Ge+"text-margin-x").pfValue,y:Me.y+ke.pstyle(Ge+"text-margin-y").pfValue}},ae=function(Ne,Me,ke){var Ge=Ne[0]._private.rscratch;return{x:Ge[Me],y:Ge[ke]}},se=function(Ne){return K("",ae(Ne,"labelX","labelY"),Ne)},le=function(Ne){return K("source",ae(Ne,"sourceLabelX","sourceLabelY"),Ne)},he=function(Ne){return K("target",ae(Ne,"targetLabelX","targetLabelY"),Ne)},fe=function(Ne){return S(U(Ne))},pe=function(Ne){return S(Q(Ne))},me=function(Ne){return S($(Ne))},Te=function(Ne){var Me=z(Ne),ke=S(z(Ne));if(Ne.isNode()){switch(Ne.pstyle("text-halign").value){case"left":ke.x=-Me.w-(Me.leftPad||0);break;case"right":ke.x=-(Me.rightPad||0);break}switch(Ne.pstyle("text-valign").value){case"top":ke.y=-Me.h-(Me.topPad||0);break;case"bottom":ke.y=-(Me.botPad||0);break}}return ke},Le=r.data.eleTxrCache=new C0(r,{getKey:L,doesEleInvalidateKey:M,drawElement:D,getBoundingBox:U,getRotationPoint:X,getRotationOffset:fe,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),ge=r.data.lblTxrCache=new C0(r,{getKey:T,drawElement:R,getBoundingBox:z,getRotationPoint:se,getRotationOffset:Te,isVisible:Z}),xe=r.data.slbTxrCache=new C0(r,{getKey:j,drawElement:Y,getBoundingBox:Q,getRotationPoint:le,getRotationOffset:pe,isVisible:Z}),Se=r.data.tlbTxrCache=new C0(r,{getKey:I,drawElement:G,getBoundingBox:$,getRotationPoint:he,getRotationOffset:me,isVisible:Z}),Ie=r.data.lyrTxrCache=new $B(r);r.onUpdateEleCalcs(function(Ne,Me){Le.invalidateElements(Me),ge.invalidateElements(Me),xe.invalidateElements(Me),Se.invalidateElements(Me),Ie.invalidateElements(Me);for(var ke=0;ke<Me.length;ke++){var Ge=Me[ke]._private;Ge.oldBackgroundTimestamp=Ge.backgroundTimestamp}});var Re=function(Ne){for(var Me=0;Me<Ne.length;Me++)Ie.enqueueElementRefinement(Ne[Me].ele)};Le.onDequeue(Re),ge.onDequeue(Re),xe.onDequeue(Re),Se.onDequeue(Re),t.webgl&&r.initWebgl(t,{getStyleKey:L,getLabelKey:T,getSourceLabelKey:j,getTargetLabelKey:I,drawElement:D,drawLabel:R,drawSourceLabel:Y,drawTargetLabel:G,getElementBox:U,getLabelBox:z,getSourceLabelBox:Q,getTargetLabelBox:$,getElementRotationPoint:X,getElementRotationOffset:fe,getLabelRotationPoint:se,getSourceLabelRotationPoint:le,getTargetLabelRotationPoint:he,getLabelRotationOffset:Te,getSourceLabelRotationOffset:pe,getTargetLabelRotationOffset:me})}Kn.redrawHint=function(t,r){var a=this;switch(t){case"eles":a.data.canvasNeedsRedraw[Kn.NODE]=r;break;case"drag":a.data.canvasNeedsRedraw[Kn.DRAG]=r;break;case"select":a.data.canvasNeedsRedraw[Kn.SELECT_BOX]=r;break;case"gc":a.data.gc=!0;break}};var _de=typeof Path2D<"u";Kn.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t},Kn.usePaths=function(){return _de&&this.pathsEnabled},Kn.setImgSmoothing=function(t,r){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=r:(t.webkitImageSmoothingEnabled=r,t.mozImageSmoothingEnabled=r,t.msImageSmoothingEnabled=r)},Kn.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},Kn.makeOffscreenCanvas=function(t,r){var a;if((typeof OffscreenCanvas>"u"?"undefined":La(OffscreenCanvas))!=="undefined")a=new OffscreenCanvas(t,r);else{var s=this.cy.window(),c=s.document;a=c.createElement("canvas"),a.width=t,a.height=r}return a},[QB,Jc,of,zP,qd,kh,Jo,lR,_h,j0,mR].forEach(function(t){fn(Kn,t)});var Ede=[{name:"null",impl:_B},{name:"base",impl:UB},{name:"canvas",impl:kde}],Cde=[{type:"layout",extensions:Qfe},{type:"renderer",extensions:Ede}],xR={},kR={};function _R(t,r,a){var s=a,c=function(G){jr("Can not register `"+r+"` for `"+t+"` since `"+G+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(x0.prototype[r])return c(r);x0.prototype[r]=a}else if(t==="collection"){if(wo.prototype[r])return c(r);wo.prototype[r]=a}else if(t==="layout"){for(var f=function(G){this.options=G,a.call(this,G),gr(this._private)||(this._private={}),this._private.cy=G.cy,this._private.listeners=[],this.createEmitter()},h=f.prototype=Object.create(a.prototype),d=[],p=0;p<d.length;p++){var b=d[p];h[b]=h[b]||function(){return this}}h.start&&!h.run?h.run=function(){return this.start(),this}:!h.start&&h.run&&(h.start=function(){return this.run(),this});var m=a.prototype.stop;h.stop=function(){var G=this.options;if(G&&G.animate){var U=this.animations;if(U)for(var z=0;z<U.length;z++)U[z].stop()}return m?m.call(this):this.emit("layoutstop"),this},h.destroy||(h.destroy=function(){return this}),h.cy=function(){return this._private.cy};var w=function(G){return G._private.cy},k={addEventFields:function(G,U){U.layout=G,U.cy=w(G),U.target=G},bubble:function(){return!0},parent:function(G){return w(G)}};fn(h,{createEmitter:function(){return this._private.emitter=new pw(k,this),this},emitter:function(){return this._private.emitter},on:function(G,U){return this.emitter().on(G,U),this},one:function(G,U){return this.emitter().one(G,U),this},once:function(G,U){return this.emitter().one(G,U),this},removeListener:function(G,U){return this.emitter().removeListener(G,U),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(G,U){return this.emitter().emit(G,U),this}}),Ar.eventAliasesOn(h),s=f}else if(t==="renderer"&&r!=="null"&&r!=="base"){var P=ER("renderer","base"),S=P.prototype,M=a,L=a.prototype,T=function(){P.apply(this,arguments),M.apply(this,arguments)},j=T.prototype;for(var I in S){var D=S[I],R=L[I]!=null;if(R)return c(I);j[I]=D}for(var Y in L)j[Y]=L[Y];S.clientFunctions.forEach(function(G){j[G]=j[G]||function(){_i("Renderer does not implement `renderer."+G+"()` on its prototype")}}),s=T}else if(t==="__proto__"||t==="constructor"||t==="prototype")return _i(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return g8({map:xR,keys:[t,r],value:s})}function ER(t,r){return b8({map:xR,keys:[t,r]})}function Pde(t,r,a,s,c){return g8({map:kR,keys:[t,r,a,s],value:c})}function Sde(t,r,a,s){return b8({map:kR,keys:[t,r,a,s]})}var JP=function(){if(arguments.length===2)return ER.apply(null,arguments);if(arguments.length===3)return _R.apply(null,arguments);if(arguments.length===4)return Sde.apply(null,arguments);if(arguments.length===5)return Pde.apply(null,arguments);_i("Invalid extension access syntax")};x0.prototype.extension=JP,Cde.forEach(function(t){t.extensions.forEach(function(r){_R(t.type,r.name,r.impl)})});var Hw=function(){if(!(this instanceof Hw))return new Hw;this.length=0},$d=Hw.prototype;$d.instanceString=function(){return"stylesheet"},$d.selector=function(t){var r=this.length++;return this[r]={selector:t,properties:[]},this},$d.css=function(t,r){var a=this.length-1;if(nn(t))this[a].properties.push({name:t,value:r});else if(gr(t))for(var s=t,c=Object.keys(s),f=0;f<c.length;f++){var h=c[f],d=s[h];if(d!=null){var p=to.properties[h]||to.properties[Um(h)];if(p!=null){var b=p.name,m=d;this[a].properties.push({name:b,value:m})}}}return this},$d.style=$d.css,$d.generateStyle=function(t){var r=new to(t);return this.appendToStyle(r)},$d.appendToStyle=function(t){for(var r=0;r<this.length;r++){var a=this[r],s=a.selector,c=a.properties;t.selector(s);for(var f=0;f<c.length;f++){var h=c[f];t.css(h.name,h.value)}}return t};var Nde="3.33.1",Cu=function(t){if(t===void 0&&(t={}),gr(t))return new x0(t);if(nn(t))return JP.apply(JP,arguments)};Cu.use=function(t){var r=Array.prototype.slice.call(arguments,1);return r.unshift(Cu),t.apply(null,r),this},Cu.warnings=function(t){return H8(t)},Cu.version=Nde,Cu.stylesheet=Cu.Stylesheet=Hw;var zr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function A0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var CR={exports:{}},XP,PR;function Tde(){if(PR)return XP;PR=1;var t="Expected a function",r="__lodash_hash_undefined__",a="[object Function]",s="[object GeneratorFunction]",c=/[\\^$.*+?()[\]{}|]/g,f=/^\[object .+?Constructor\]$/,h=typeof zr=="object"&&zr&&zr.Object===Object&&zr,d=typeof self=="object"&&self&&self.Object===Object&&self,p=h||d||Function("return this")();function b(Ue,Ze){return Ue==null?void 0:Ue[Ze]}function m(Ue){var Ze=!1;if(Ue!=null&&typeof Ue.toString!="function")try{Ze=!!(Ue+"")}catch{}return Ze}var w=Array.prototype,k=Function.prototype,P=Object.prototype,S=p["__core-js_shared__"],M=function(){var Ue=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||"");return Ue?"Symbol(src)_1."+Ue:""}(),L=k.toString,T=P.hasOwnProperty,j=P.toString,I=RegExp("^"+L.call(T).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=w.splice,R=Re(p,"Map"),Y=Re(Object,"create");function G(Ue){var Ze=-1,mt=Ue?Ue.length:0;for(this.clear();++Ze<mt;){var st=Ue[Ze];this.set(st[0],st[1])}}function U(){this.__data__=Y?Y(null):{}}function z(Ue){return this.has(Ue)&&delete this.__data__[Ue]}function Q(Ue){var Ze=this.__data__;if(Y){var mt=Ze[Ue];return mt===r?void 0:mt}return T.call(Ze,Ue)?Ze[Ue]:void 0}function $(Ue){var Ze=this.__data__;return Y?Ze[Ue]!==void 0:T.call(Ze,Ue)}function Z(Ue,Ze){var mt=this.__data__;return mt[Ue]=Y&&Ze===void 0?r:Ze,this}G.prototype.clear=U,G.prototype.delete=z,G.prototype.get=Q,G.prototype.has=$,G.prototype.set=Z;function X(Ue){var Ze=-1,mt=Ue?Ue.length:0;for(this.clear();++Ze<mt;){var st=Ue[Ze];this.set(st[0],st[1])}}function K(){this.__data__=[]}function ae(Ue){var Ze=this.__data__,mt=xe(Ze,Ue);if(mt<0)return!1;var st=Ze.length-1;return mt==st?Ze.pop():D.call(Ze,mt,1),!0}function se(Ue){var Ze=this.__data__,mt=xe(Ze,Ue);return mt<0?void 0:Ze[mt][1]}function le(Ue){return xe(this.__data__,Ue)>-1}function he(Ue,Ze){var mt=this.__data__,st=xe(mt,Ue);return st<0?mt.push([Ue,Ze]):mt[st][1]=Ze,this}X.prototype.clear=K,X.prototype.delete=ae,X.prototype.get=se,X.prototype.has=le,X.prototype.set=he;function fe(Ue){var Ze=-1,mt=Ue?Ue.length:0;for(this.clear();++Ze<mt;){var st=Ue[Ze];this.set(st[0],st[1])}}function pe(){this.__data__={hash:new G,map:new(R||X),string:new G}}function me(Ue){return Ie(this,Ue).delete(Ue)}function Te(Ue){return Ie(this,Ue).get(Ue)}function Le(Ue){return Ie(this,Ue).has(Ue)}function ge(Ue,Ze){return Ie(this,Ue).set(Ue,Ze),this}fe.prototype.clear=pe,fe.prototype.delete=me,fe.prototype.get=Te,fe.prototype.has=Le,fe.prototype.set=ge;function xe(Ue,Ze){for(var mt=Ue.length;mt--;)if(Qe(Ue[mt][0],Ze))return mt;return-1}function Se(Ue){if(!ft(Ue)||Me(Ue))return!1;var Ze=nt(Ue)||m(Ue)?I:f;return Ze.test(ke(Ue))}function Ie(Ue,Ze){var mt=Ue.__data__;return Ne(Ze)?mt[typeof Ze=="string"?"string":"hash"]:mt.map}function Re(Ue,Ze){var mt=b(Ue,Ze);return Se(mt)?mt:void 0}function Ne(Ue){var Ze=typeof Ue;return Ze=="string"||Ze=="number"||Ze=="symbol"||Ze=="boolean"?Ue!=="__proto__":Ue===null}function Me(Ue){return!!M&&M in Ue}function ke(Ue){if(Ue!=null){try{return L.call(Ue)}catch{}try{return Ue+""}catch{}}return""}function Ge(Ue,Ze){if(typeof Ue!="function"||Ze&&typeof Ze!="function")throw new TypeError(t);var mt=function(){var st=arguments,Ot=Ze?Ze.apply(this,st):st[0],At=mt.cache;if(At.has(Ot))return At.get(Ot);var Rt=Ue.apply(this,st);return mt.cache=At.set(Ot,Rt),Rt};return mt.cache=new(Ge.Cache||fe),mt}Ge.Cache=fe;function Qe(Ue,Ze){return Ue===Ze||Ue!==Ue&&Ze!==Ze}function nt(Ue){var Ze=ft(Ue)?j.call(Ue):"";return Ze==a||Ze==s}function ft(Ue){var Ze=typeof Ue;return!!Ue&&(Ze=="object"||Ze=="function")}return XP=Ge,XP}var e5,SR;function Mde(){if(SR)return e5;SR=1;var t="Expected a function",r=NaN,a="[object Symbol]",s=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt,p=typeof zr=="object"&&zr&&zr.Object===Object&&zr,b=typeof self=="object"&&self&&self.Object===Object&&self,m=p||b||Function("return this")(),w=Object.prototype,k=w.toString,P=Math.max,S=Math.min,M=function(){return m.Date.now()};function L(Y,G,U){var z,Q,$,Z,X,K,ae=0,se=!1,le=!1,he=!0;if(typeof Y!="function")throw new TypeError(t);G=R(G)||0,j(U)&&(se=!!U.leading,le="maxWait"in U,$=le?P(R(U.maxWait)||0,G):$,he="trailing"in U?!!U.trailing:he);function fe(Re){var Ne=z,Me=Q;return z=Q=void 0,ae=Re,Z=Y.apply(Me,Ne),Z}function pe(Re){return ae=Re,X=setTimeout(Le,G),se?fe(Re):Z}function me(Re){var Ne=Re-K,Me=Re-ae,ke=G-Ne;return le?S(ke,$-Me):ke}function Te(Re){var Ne=Re-K,Me=Re-ae;return K===void 0||Ne>=G||Ne<0||le&&Me>=$}function Le(){var Re=M();if(Te(Re))return ge(Re);X=setTimeout(Le,me(Re))}function ge(Re){return X=void 0,he&&z?fe(Re):(z=Q=void 0,Z)}function xe(){X!==void 0&&clearTimeout(X),ae=0,z=K=Q=X=void 0}function Se(){return X===void 0?Z:ge(M())}function Ie(){var Re=M(),Ne=Te(Re);if(z=arguments,Q=this,K=Re,Ne){if(X===void 0)return pe(K);if(le)return X=setTimeout(Le,G),fe(K)}return X===void 0&&(X=setTimeout(Le,G)),Z}return Ie.cancel=xe,Ie.flush=Se,Ie}function T(Y,G,U){var z=!0,Q=!0;if(typeof Y!="function")throw new TypeError(t);return j(U)&&(z="leading"in U?!!U.leading:z,Q="trailing"in U?!!U.trailing:Q),L(Y,G,{leading:z,maxWait:G,trailing:Q})}function j(Y){var G=typeof Y;return!!Y&&(G=="object"||G=="function")}function I(Y){return!!Y&&typeof Y=="object"}function D(Y){return typeof Y=="symbol"||I(Y)&&k.call(Y)==a}function R(Y){if(typeof Y=="number")return Y;if(D(Y))return r;if(j(Y)){var G=typeof Y.valueOf=="function"?Y.valueOf():Y;Y=j(G)?G+"":G}if(typeof Y!="string")return Y===0?Y:+Y;Y=Y.replace(s,"");var U=f.test(Y);return U||h.test(Y)?d(Y.slice(2),U?2:8):c.test(Y)?r:+Y}return e5=T,e5}(function(t,r){(function(a,s){t.exports=s(Tde(),Mde())})(zr,function(a,s){return function(c){var f={};function h(d){if(f[d])return f[d].exports;var p=f[d]={i:d,l:!1,exports:{}};return c[d].call(p.exports,p,p.exports,h),p.l=!0,p.exports}return h.m=c,h.c=f,h.i=function(d){return d},h.d=function(d,p,b){h.o(d,p)||Object.defineProperty(d,p,{configurable:!1,enumerable:!0,get:b})},h.n=function(d){var p=d&&d.__esModule?function(){return d.default}:function(){return d};return h.d(p,"a",p),p},h.o=function(d,p){return Object.prototype.hasOwnProperty.call(d,p)},h.p="",h(h.s=12)}([function(c,f,h){c.exports=Object.assign!=null?Object.assign.bind(Object):function(d){for(var p=arguments.length,b=Array(p>1?p-1:0),m=1;m<p;m++)b[m-1]=arguments[m];return b.filter(function(w){return w!=null}).forEach(function(w){Object.keys(w).forEach(function(k){return d[k]=w[k]})}),d}},function(c,f,h){var d=h(10),p=h(0);c.exports=function(b){var m=this;return new d(p({cy:m},b))}},function(c,f,h){function d(){if(this.saveGestureState(),this.cy.zoomingEnabled(!1).panningEnabled(!1).boxSelectionEnabled(!1),this.options.disableBrowserGestures){var m=this.windowListenerOptions;window.addEventListener("touchstart",this.preventDefault,m),window.addEventListener("touchmove",this.preventDefault,m),window.addEventListener("wheel",this.preventDefault,m)}return this}function p(){if(this.cy.zoomingEnabled(this.lastZoomingEnabled).panningEnabled(this.lastPanningEnabled).boxSelectionEnabled(this.lastBoxSelectionEnabled),this.options.disableBrowserGestures){var m=this.windowListenerOptions;window.removeEventListener("touchstart",this.preventDefault,m),window.removeEventListener("touchmove",this.preventDefault,m),window.removeEventListener("wheel",this.preventDefault,m)}return this}function b(){var m=this.cy;return this.lastPanningEnabled=m.panningEnabled(),this.lastZoomingEnabled=m.zoomingEnabled(),this.lastBoxSelectionEnabled=m.boxSelectionEnabled(),this}c.exports={disableGestures:d,resetGestures:p,saveGestureState:b}},function(c,f,h){function d(){var p=this,b=this.cy,m=this.options;return this.addListener(b,"drag",function(){return p.grabbingNode=!0}),this.addListener(b,"free",function(){return p.grabbingNode=!1}),this.addListener(b,"tapstart","node",function(w){var k=w.target;p.drawMode&&p.start(k)}),this.addListener(b,"tapdrag",function(w){p.update(w.position)}),this.addListener(b,"tapdragover","node",function(w){m.snap||p.preview(w.target)}),this.addListener(b,"tapdragout","node",function(w){m.snap||p.unpreview(w.target)}),this.addListener(b,"tapend",function(){p.stop()}),this}c.exports={addCytoscapeListeners:d}},function(c,f,h){var d={canConnect:function(p,b){return!p.same(b)},edgeParams:function(p,b){return{}},hoverDelay:150,snap:!0,snapThreshold:50,snapFrequency:15,noEdgeEventsInDraw:!0,disableBrowserGestures:!0};c.exports=d},function(c,f,h){function d(m){var w=this.cy;return this.drawMode=m??!this.drawMode,this.drawMode?(this.prevUngrabifyState=w.autoungrabify(),w.autoungrabify(!0),this.emit("drawon")):(w.autoungrabify(this.prevUngrabifyState),this.emit("drawoff")),this}function p(){return this.toggleDrawMode(!0)}function b(){return this.toggleDrawMode(!1)}c.exports={toggleDrawMode:d,enableDrawMode:p,disableDrawMode:b}},function(c,f,h){var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},p=h(0),b=function(T){return(typeof T>"u"?"undefined":d(T))===d("")},m=function(T){return(typeof T>"u"?"undefined":d(T))===d([])&&T.length!=null};function w(T,j,I){var D={};return p(D,j,T),p(D.data,j.data,T.data),b(j.classes)?D.classes=j.classes+" "+I:m(j.classes)?D.classes=j.classes.join(" ")+" "+I:D.classes=I,D}function k(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,j=this.cy;this.options;var I=this.presumptiveTargets,D=this.previewEles,R=this.active,Y=this.sourceNode,G=this.targetNode,U=T?"eh-preview":"",z=j.collection(),Q=this.canConnect(G);if(R&&Q){if(!G||G.size()===0){D.remove(),this.emit("cancel",this.mp(),Y,I);return}if(!T){D.removeClass("eh-preview").style("events",""),this.emit("complete",this.mp(),Y,G,D);return}var $=j.add(w({group:"edges",data:{source:Y.id(),target:G.id()}},this.edgeParams(G),U));return z=z.merge($),T?(this.previewEles=z,z.style("events","no")):(z.style("events",""),this.emit("complete",this.mp(),Y,G,z)),this}}function P(){return this.makeEdges(!0),this}function S(){return this.previewEles.nonempty()&&this.previewEles.inside()}function M(){return this.previewShown()&&this.previewEles.remove(),this}function L(){var T=this,j=this.sourceNode,I=this.ghostNode,D=this.cy,R=this.mx,Y=this.my,G=R,U=Y,z=void 0,Q=void 0;if(j)return(!I||I.length===0||I.removed())&&(Q=this.ghostEles=D.collection(),D.batch(function(){I=T.ghostNode=D.add({group:"nodes",classes:"eh-ghost eh-ghost-node",position:{x:0,y:0}}),I.style({"background-color":"blue",width:1e-4,height:1e-4,opacity:0,events:"no"});var $={};z=D.add(p({},$,{group:"edges",data:p({},$.data,{source:j.id(),target:I.id()}),classes:"eh-ghost eh-ghost-edge"})),z.style({events:"no"})}),Q.merge(I).merge(z)),I.position({x:G,y:U}),this}c.exports={makeEdges:k,makePreview:P,removePreview:M,previewShown:S,updateEdge:L}},function(c,f,h){function d(){return this.options.noEdgeEventsInDraw&&this.cy.edges().style("events","no"),this}function p(){return this.options.noEdgeEventsInDraw&&this.cy.edges().style("events",""),this}c.exports={disableEdgeEvents:d,enableEdgeEvents:p}},function(c,f,h){function d(){return this.enabled=!0,this.emit("enable"),this}function p(){return this.enabled=!1,this.emit("disable"),this}c.exports={enable:d,disable:p}},function(c,f,h){var d=h(13),p=Math.sqrt(2);function b(j){var I=this.previewEles,D=this.ghostEles,R=function($){return I.anySame($)},Y=function($){return D.anySame($)},G=function($){return R($)||Y($)},U=this.enabled,z=this.active,Q=this.grabbingNode;return U&&!z&&!Q&&j!=null&&j.nonempty()&&!G(j)}function m(j){return this.canStartOn(j)&&this.drawMode}function w(j){return this.canStartOn(j)&&!this.drawMode}function k(j){var I=this;if(this.canStartOn(j)){this.active=!0,this.sourceNode=j,this.sourceNode.addClass("eh-source"),this.disableGestures(),this.disableEdgeEvents();var D=function(R){return R.id()};this.canConnect=d(function(R){return I.options.canConnect(I.sourceNode,R)},D),this.edgeParams=d(function(R){return I.options.edgeParams(I.sourceNode,R)},D),this.emit("start",this.hp(),j)}}function P(j){if(this.active){var I=j;return this.mx=I.x,this.my=I.y,this.updateEdge(),this.throttledSnap(),this}}function S(){if(!this.active||!this.options.snap)return!1;var j=this.cy,I=this.targetNode,D=this.options.snapThreshold,R=this.mp(),Y=this.previewEles,G=this.ghostNode,U=function(ge){return p*Math.max(ge.outerWidth(),ge.outerHeight())/2},z=function(ge,xe,Se,Ie){var Re=Se-ge,Ne=Ie-xe;return Re*Re+Ne*Ne},Q=function(ge,xe){return z(ge.x,ge.y,xe.x,xe.y)},$=function(ge){return Q(ge.position(),R)},Z=function(ge){var xe=U(ge),Se=xe+D;return Se*Se},X=function(ge){return $(ge)<=Z(ge)},K=function(ge){var xe=ge.position(),Se=ge.outerWidth()/2,Ie=ge.outerHeight()/2,Re=xe.x,Ne=xe.y,Me=R.x,ke=R.y,Ge=Re-Se,Qe=Re+Se,nt=Ne-Ie,ft=Ne+Ie,Ue=Ge<=Me&&Me<=Qe,Ze=nt<=ke&&ke<=ft;if(Ue&&Ze)return 0;if(Ue){var mt=ke-nt,st=ke-ft;return Math.min(mt*mt,st*st)}else if(Ze){var Ot=Me-Ge,At=Me-Qe;return Math.min(Ot*Ot,At*At)}else return Me<Ge&&ke<nt?z(Me,ke,Ge,nt):Me>Qe&&ke<nt?z(Me,ke,Qe,nt):Me<Ge&&ke>ft?z(Me,ke,Ge,ft):z(Me,ke,Qe,ft)},ae=function(ge,xe){return K(ge)-K(xe)},se=ae,le=!1,he=function(ge){var xe=R,Se=ge.outerWidth(),Ie=Se/2,Re=ge.outerHeight(),Ne=Re/2,Me=ge.position(),ke=Me.x-Ie,Ge=Me.x+Ie,Qe=Me.y-Ne,nt=Me.y+Ne;return ke<=xe.x&&xe.x<=Ge&&Qe<=xe.y&&xe.y<=nt},fe=function(ge){return ge.same(Y)||ge.same(G)},pe=j.nodes(function(ge){return!fe(ge)&&X(ge)}).sort(se),me=!1;I.nonempty()&&!X(I)&&this.unpreview(I);for(var Te=0;Te<pe.length;Te++){var Le=pe[Te];if(!(Le.isParent()&&he(Le))&&!(Le.isChild()&&!he(Le.parent()))&&(Le.same(I)||this.preview(Le,le))){me=!0;break}}return me}function M(j){var I=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,R=this.options,Y=this.sourceNode,G=this.ghostNode,U=this.ghostEles,z=this.presumptiveTargets,Q=this.previewEles,$=this.active,Z=Y,X=j.same(G),K=!this.canConnect(j),ae=j.same(this.targetNode);if(!$||X||K||ae)return!1;this.targetNode.nonempty()&&this.unpreview(this.targetNode),clearTimeout(this.previewTimeout);var se=function(){I.targetNode=j,z.merge(j),j.addClass("eh-presumptive-target"),j.addClass("eh-target"),I.emit("hoverover",I.mp(),Z,j),j.addClass("eh-preview"),U.addClass("eh-preview-active"),Y.addClass("eh-preview-active"),j.addClass("eh-preview-active"),I.makePreview(),I.emit("previewon",I.mp(),Z,j,Q)};return D&&R.hoverDelay>0?this.previewTimeout=setTimeout(se,R.hoverDelay):se(),!0}function L(j){if(this.active){var I=this.previewTimeout,D=this.sourceNode,R=this.previewEles,Y=this.ghostEles,G=this.cy;clearTimeout(I),this.previewTimeout=null;var U=D;return j.removeClass("eh-preview eh-target eh-presumptive-target eh-preview-active"),Y.removeClass("eh-preview-active"),D.removeClass("eh-preview-active"),this.targetNode=G.collection(),this.removePreview(U,j),this.emit("hoverout",this.mp(),U,j),this.emit("previewoff",this.mp(),U,j,R),this}}function T(){if(this.active){var j=this.sourceNode,I=this.targetNode,D=this.ghostEles,R=this.presumptiveTargets;return clearTimeout(this.previewTimeout),j.removeClass("eh-source eh-preview-active"),I.removeClass("eh-target eh-preview eh-hover eh-preview-active"),R.removeClass("eh-presumptive-target"),this.makeEdges(),D.remove(),this.clearCollections(),this.resetGestures(),this.enableEdgeEvents(),this.active=!1,this.emit("stop",this.mp(),j),this}}c.exports={start:k,update:P,preview:M,unpreview:L,stop:T,snap:S,canStartOn:b,canStartDrawModeOn:m,canStartNonDrawModeOn:w}},function(c,f,h){var d=h(4),p=h(0),b=h(14),m=h(2),w=h(3),k=h(5),P=h(6),S=h(8),M=h(9),L=h(11),T=h(7);function j(R){var Y=R.cy;this.cy=Y,this.listeners=[],this.enabled=!0,this.drawMode=!1,this.active=!1,this.grabbingNode=!1,this.clearCollections(),this.mx=0,this.my=0,this.options=p({},d,R),this.saveGestureState(),this.addListeners(),this.throttledSnap=b(this.snap.bind(this),1e3/R.snapFrequency),this.preventDefault=function(z){return z.preventDefault()},this.canConnect=function(){return!1};var G=!1;try{var U=Object.defineProperty({},"passive",{get:function(){G=!0}});window.addEventListener("test",null,U)}catch{}G?this.windowListenerOptions={capture:!0,passive:!1}:this.windowListenerOptions=!0}var I=j.prototype={},D=function(R){return p(I,R)};I.destroy=function(){this.removeListeners()},I.setOptions=function(R){p(this.options,R)},I.mp=function(){return{x:this.mx,y:this.my}},I.hp=function(){return{x:this.hx,y:this.hy}},I.clearCollections=function(){var R=this.cy;this.previewEles=R.collection(),this.ghostEles=R.collection(),this.ghostNode=R.collection(),this.sourceNode=R.collection(),this.targetNode=R.collection(),this.presumptiveTargets=R.collection()},[m,w,k,P,S,M,L,T].forEach(D),c.exports=j},function(c,f,h){var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M};function p(){var M=this;return this.addCytoscapeListeners(),this.addListener(this.cy,"destroy",function(){return M.destroy()}),this}function b(){for(var M=this.listeners.length-1;M>=0;M--){var L=this.listeners[M];this.removeListener(L.target,L.event,L.selector,L.callback,L.options)}return this}function m(M,L,T,j,I){return(typeof T>"u"?"undefined":d(T))!==d("")&&(j=T,I=j,T=null),I==null&&(I=!1),{target:M,event:L,selector:T,callback:j,options:I}}function w(M){return M instanceof Element}function k(M,L,T,j,I){var D=m(M,L,T,j,I);return this.listeners.push(D),w(D.target)?D.target.addEventListener(D.event,D.callback,D.options):D.selector?D.target.addListener(D.event,D.selector,D.callback,D.options):D.target.addListener(D.event,D.callback,D.options),this}function P(M,L,T,j,I){for(var D=m(M,L,T,j,I),R=this.listeners.length-1;R>=0;R--){var Y=this.listeners[R];if(D.target===Y.target&&D.event===Y.event&&(D.selector==null||D.selector===Y.selector)&&(D.callback==null||D.callback===Y.callback)){this.listeners.splice(R,1),w(D.target)?D.target.removeEventListener(D.event,D.callback,D.options):D.selector?D.target.removeListener(D.event,D.selector,D.callback,D.options):D.target.removeListener(D.event,D.callback,D.options);break}}return this}function S(M,L){for(var T=this.cy,j=arguments.length,I=Array(j>2?j-2:0),D=2;D<j;D++)I[D-2]=arguments[D];return T.emit({type:"eh"+M,position:L},I),this}c.exports={addListener:k,addListeners:p,removeListener:P,removeListeners:b,emit:S}},function(c,f,h){var d=h(1),p=function(b){b&&b("core","edgehandles",d)};typeof cytoscape<"u"&&p(cytoscape),c.exports=p},function(c,f){c.exports=a},function(c,f){c.exports=s}])})})(CR);var jde=CR.exports;const Ade=A0(jde);var NR={exports:{}};function t5(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var n5,TR;function Ide(){if(TR)return n5;TR=1;function t(){this.__data__=[],this.size=0}return n5=t,n5}var r5,MR;function Fg(){if(MR)return r5;MR=1;function t(r,a){return r===a||r!==r&&a!==a}return r5=t,r5}var i5,jR;function zw(){if(jR)return i5;jR=1;var t=Fg();function r(a,s){for(var c=a.length;c--;)if(t(a[c][0],s))return c;return-1}return i5=r,i5}var a5,AR;function Lde(){if(AR)return a5;AR=1;var t=zw(),r=Array.prototype,a=r.splice;function s(c){var f=this.__data__,h=t(f,c);if(h<0)return!1;var d=f.length-1;return h==d?f.pop():a.call(f,h,1),--this.size,!0}return a5=s,a5}var o5,IR;function Ode(){if(IR)return o5;IR=1;var t=zw();function r(a){var s=this.__data__,c=t(s,a);return c<0?void 0:s[c][1]}return o5=r,o5}var s5,LR;function Dde(){if(LR)return s5;LR=1;var t=zw();function r(a){return t(this.__data__,a)>-1}return s5=r,s5}var u5,OR;function Bde(){if(OR)return u5;OR=1;var t=zw();function r(a,s){var c=this.__data__,f=t(c,a);return f<0?(++this.size,c.push([a,s])):c[f][1]=s,this}return u5=r,u5}var c5,DR;function Uw(){if(DR)return c5;DR=1;var t=Ide(),r=Lde(),a=Ode(),s=Dde(),c=Bde();function f(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return f.prototype.clear=t,f.prototype.delete=r,f.prototype.get=a,f.prototype.has=s,f.prototype.set=c,c5=f,c5}var l5,BR;function Rde(){if(BR)return l5;BR=1;var t=Uw();function r(){this.__data__=new t,this.size=0}return l5=r,l5}var f5,RR;function Gde(){if(RR)return f5;RR=1;function t(r){var a=this.__data__,s=a.delete(r);return this.size=a.size,s}return f5=t,f5}var h5,GR;function Hde(){if(GR)return h5;GR=1;function t(r){return this.__data__.get(r)}return h5=t,h5}var d5,HR;function zde(){if(HR)return d5;HR=1;function t(r){return this.__data__.has(r)}return d5=t,d5}var p5,zR;function UR(){if(zR)return p5;zR=1;var t=typeof zr=="object"&&zr&&zr.Object===Object&&zr;return p5=t,p5}var g5,FR;function rc(){if(FR)return g5;FR=1;var t=UR(),r=typeof self=="object"&&self&&self.Object===Object&&self,a=t||r||Function("return this")();return g5=a,g5}var b5,YR;function Yg(){if(YR)return b5;YR=1;var t=rc(),r=t.Symbol;return b5=r,b5}var v5,VR;function Ude(){if(VR)return v5;VR=1;var t=Yg(),r=Object.prototype,a=r.hasOwnProperty,s=r.toString,c=t?t.toStringTag:void 0;function f(h){var d=a.call(h,c),p=h[c];try{h[c]=void 0;var b=!0}catch{}var m=s.call(h);return b&&(d?h[c]=p:delete h[c]),m}return v5=f,v5}var y5,qR;function Fde(){if(qR)return y5;qR=1;var t=Object.prototype,r=t.toString;function a(s){return r.call(s)}return y5=a,y5}var m5,ZR;function Kd(){if(ZR)return m5;ZR=1;var t=Yg(),r=Ude(),a=Fde(),s="[object Null]",c="[object Undefined]",f=t?t.toStringTag:void 0;function h(d){return d==null?d===void 0?c:s:f&&f in Object(d)?r(d):a(d)}return m5=h,m5}var w5,$R;function Pu(){if($R)return w5;$R=1;function t(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}return w5=t,w5}var x5,KR;function I0(){if(KR)return x5;KR=1;var t=Kd(),r=Pu(),a="[object AsyncFunction]",s="[object Function]",c="[object GeneratorFunction]",f="[object Proxy]";function h(d){if(!r(d))return!1;var p=t(d);return p==s||p==c||p==a||p==f}return x5=h,x5}var k5,QR;function Yde(){if(QR)return k5;QR=1;var t=rc(),r=t["__core-js_shared__"];return k5=r,k5}var _5,WR;function Vde(){if(WR)return _5;WR=1;var t=Yde(),r=function(){var s=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}();function a(s){return!!r&&r in s}return _5=a,_5}var E5,JR;function XR(){if(JR)return E5;JR=1;var t=Function.prototype,r=t.toString;function a(s){if(s!=null){try{return r.call(s)}catch{}try{return s+""}catch{}}return""}return E5=a,E5}var C5,eG;function qde(){if(eG)return C5;eG=1;var t=I0(),r=Vde(),a=Pu(),s=XR(),c=/[\\^$.*+?()[\]{}|]/g,f=/^\[object .+?Constructor\]$/,h=Function.prototype,d=Object.prototype,p=h.toString,b=d.hasOwnProperty,m=RegExp("^"+p.call(b).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function w(k){if(!a(k)||r(k))return!1;var P=t(k)?m:f;return P.test(s(k))}return C5=w,C5}var P5,tG;function Zde(){if(tG)return P5;tG=1;function t(r,a){return r==null?void 0:r[a]}return P5=t,P5}var S5,nG;function Qd(){if(nG)return S5;nG=1;var t=qde(),r=Zde();function a(s,c){var f=r(s,c);return t(f)?f:void 0}return S5=a,S5}var N5,rG;function T5(){if(rG)return N5;rG=1;var t=Qd(),r=rc(),a=t(r,"Map");return N5=a,N5}var M5,iG;function Fw(){if(iG)return M5;iG=1;var t=Qd(),r=t(Object,"create");return M5=r,M5}var j5,aG;function $de(){if(aG)return j5;aG=1;var t=Fw();function r(){this.__data__=t?t(null):{},this.size=0}return j5=r,j5}var A5,oG;function Kde(){if(oG)return A5;oG=1;function t(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}return A5=t,A5}var I5,sG;function Qde(){if(sG)return I5;sG=1;var t=Fw(),r="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;function c(f){var h=this.__data__;if(t){var d=h[f];return d===r?void 0:d}return s.call(h,f)?h[f]:void 0}return I5=c,I5}var L5,uG;function Wde(){if(uG)return L5;uG=1;var t=Fw(),r=Object.prototype,a=r.hasOwnProperty;function s(c){var f=this.__data__;return t?f[c]!==void 0:a.call(f,c)}return L5=s,L5}var O5,cG;function Jde(){if(cG)return O5;cG=1;var t=Fw(),r="__lodash_hash_undefined__";function a(s,c){var f=this.__data__;return this.size+=this.has(s)?0:1,f[s]=t&&c===void 0?r:c,this}return O5=a,O5}var D5,lG;function Xde(){if(lG)return D5;lG=1;var t=$de(),r=Kde(),a=Qde(),s=Wde(),c=Jde();function f(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return f.prototype.clear=t,f.prototype.delete=r,f.prototype.get=a,f.prototype.has=s,f.prototype.set=c,D5=f,D5}var B5,fG;function epe(){if(fG)return B5;fG=1;var t=Xde(),r=Uw(),a=T5();function s(){this.size=0,this.__data__={hash:new t,map:new(a||r),string:new t}}return B5=s,B5}var R5,hG;function tpe(){if(hG)return R5;hG=1;function t(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}return R5=t,R5}var G5,dG;function Yw(){if(dG)return G5;dG=1;var t=tpe();function r(a,s){var c=a.__data__;return t(s)?c[typeof s=="string"?"string":"hash"]:c.map}return G5=r,G5}var H5,pG;function npe(){if(pG)return H5;pG=1;var t=Yw();function r(a){var s=t(this,a).delete(a);return this.size-=s?1:0,s}return H5=r,H5}var z5,gG;function rpe(){if(gG)return z5;gG=1;var t=Yw();function r(a){return t(this,a).get(a)}return z5=r,z5}var U5,bG;function ipe(){if(bG)return U5;bG=1;var t=Yw();function r(a){return t(this,a).has(a)}return U5=r,U5}var F5,vG;function ape(){if(vG)return F5;vG=1;var t=Yw();function r(a,s){var c=t(this,a),f=c.size;return c.set(a,s),this.size+=c.size==f?0:1,this}return F5=r,F5}var Y5,yG;function V5(){if(yG)return Y5;yG=1;var t=epe(),r=npe(),a=rpe(),s=ipe(),c=ape();function f(h){var d=-1,p=h==null?0:h.length;for(this.clear();++d<p;){var b=h[d];this.set(b[0],b[1])}}return f.prototype.clear=t,f.prototype.delete=r,f.prototype.get=a,f.prototype.has=s,f.prototype.set=c,Y5=f,Y5}var q5,mG;function ope(){if(mG)return q5;mG=1;var t=Uw(),r=T5(),a=V5(),s=200;function c(f,h){var d=this.__data__;if(d instanceof t){var p=d.__data__;if(!r||p.length<s-1)return p.push([f,h]),this.size=++d.size,this;d=this.__data__=new a(p)}return d.set(f,h),this.size=d.size,this}return q5=c,q5}var Z5,wG;function Vw(){if(wG)return Z5;wG=1;var t=Uw(),r=Rde(),a=Gde(),s=Hde(),c=zde(),f=ope();function h(d){var p=this.__data__=new t(d);this.size=p.size}return h.prototype.clear=r,h.prototype.delete=a,h.prototype.get=s,h.prototype.has=c,h.prototype.set=f,Z5=h,Z5}var $5,xG;function K5(){if(xG)return $5;xG=1;function t(r,a){for(var s=-1,c=r==null?0:r.length;++s<c&&a(r[s],s,r)!==!1;);return r}return $5=t,$5}var Q5,kG;function _G(){if(kG)return Q5;kG=1;var t=Qd(),r=function(){try{var a=t(Object,"defineProperty");return a({},"",{}),a}catch{}}();return Q5=r,Q5}var W5,EG;function qw(){if(EG)return W5;EG=1;var t=_G();function r(a,s,c){s=="__proto__"&&t?t(a,s,{configurable:!0,enumerable:!0,value:c,writable:!0}):a[s]=c}return W5=r,W5}var J5,CG;function Zw(){if(CG)return J5;CG=1;var t=qw(),r=Fg(),a=Object.prototype,s=a.hasOwnProperty;function c(f,h,d){var p=f[h];(!(s.call(f,h)&&r(p,d))||d===void 0&&!(h in f))&&t(f,h,d)}return J5=c,J5}var X5,PG;function L0(){if(PG)return X5;PG=1;var t=Zw(),r=qw();function a(s,c,f,h){var d=!f;f||(f={});for(var p=-1,b=c.length;++p<b;){var m=c[p],w=h?h(f[m],s[m],m,f,s):void 0;w===void 0&&(w=s[m]),d?r(f,m,w):t(f,m,w)}return f}return X5=a,X5}var eS,SG;function spe(){if(SG)return eS;SG=1;function t(r,a){for(var s=-1,c=Array(r);++s<r;)c[s]=a(s);return c}return eS=t,eS}var tS,NG;function el(){if(NG)return tS;NG=1;function t(r){return r!=null&&typeof r=="object"}return tS=t,tS}var nS,TG;function upe(){if(TG)return nS;TG=1;var t=Kd(),r=el(),a="[object Arguments]";function s(c){return r(c)&&t(c)==a}return nS=s,nS}var rS,MG;function O0(){if(MG)return rS;MG=1;var t=upe(),r=el(),a=Object.prototype,s=a.hasOwnProperty,c=a.propertyIsEnumerable,f=t(function(){return arguments}())?t:function(h){return r(h)&&s.call(h,"callee")&&!c.call(h,"callee")};return rS=f,rS}var iS,jG;function xa(){if(jG)return iS;jG=1;var t=Array.isArray;return iS=t,iS}var $w={exports:{}},aS,AG;function cpe(){if(AG)return aS;AG=1;function t(){return!1}return aS=t,aS}$w.exports;var IG;function Vg(){return IG||(IG=1,function(t,r){var a=rc(),s=cpe(),c=r&&!r.nodeType&&r,f=c&&!0&&t&&!t.nodeType&&t,h=f&&f.exports===c,d=h?a.Buffer:void 0,p=d?d.isBuffer:void 0,b=p||s;t.exports=b}($w,$w.exports)),$w.exports}var oS,LG;function Kw(){if(LG)return oS;LG=1;var t=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function a(s,c){var f=typeof s;return c=c??t,!!c&&(f=="number"||f!="symbol"&&r.test(s))&&s>-1&&s%1==0&&s<c}return oS=a,oS}var sS,OG;function uS(){if(OG)return sS;OG=1;var t=9007199254740991;function r(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=t}return sS=r,sS}var cS,DG;function lpe(){if(DG)return cS;DG=1;var t=Kd(),r=uS(),a=el(),s="[object Arguments]",c="[object Array]",f="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Function]",b="[object Map]",m="[object Number]",w="[object Object]",k="[object RegExp]",P="[object Set]",S="[object String]",M="[object WeakMap]",L="[object ArrayBuffer]",T="[object DataView]",j="[object Float32Array]",I="[object Float64Array]",D="[object Int8Array]",R="[object Int16Array]",Y="[object Int32Array]",G="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",Q="[object Uint32Array]",$={};$[j]=$[I]=$[D]=$[R]=$[Y]=$[G]=$[U]=$[z]=$[Q]=!0,$[s]=$[c]=$[L]=$[f]=$[T]=$[h]=$[d]=$[p]=$[b]=$[m]=$[w]=$[k]=$[P]=$[S]=$[M]=!1;function Z(X){return a(X)&&r(X.length)&&!!$[t(X)]}return cS=Z,cS}var lS,BG;function Qw(){if(BG)return lS;BG=1;function t(r){return function(a){return r(a)}}return lS=t,lS}var Ww={exports:{}};Ww.exports;var RG;function fS(){return RG||(RG=1,function(t,r){var a=UR(),s=r&&!r.nodeType&&r,c=s&&!0&&t&&!t.nodeType&&t,f=c&&c.exports===s,h=f&&a.process,d=function(){try{var p=c&&c.require&&c.require("util").types;return p||h&&h.binding&&h.binding("util")}catch{}}();t.exports=d}(Ww,Ww.exports)),Ww.exports}var hS,GG;function D0(){if(GG)return hS;GG=1;var t=lpe(),r=Qw(),a=fS(),s=a&&a.isTypedArray,c=s?r(s):t;return hS=c,hS}var dS,HG;function zG(){if(HG)return dS;HG=1;var t=spe(),r=O0(),a=xa(),s=Vg(),c=Kw(),f=D0(),h=Object.prototype,d=h.hasOwnProperty;function p(b,m){var w=a(b),k=!w&&r(b),P=!w&&!k&&s(b),S=!w&&!k&&!P&&f(b),M=w||k||P||S,L=M?t(b.length,String):[],T=L.length;for(var j in b)(m||d.call(b,j))&&!(M&&(j=="length"||P&&(j=="offset"||j=="parent")||S&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||c(j,T)))&&L.push(j);return L}return dS=p,dS}var pS,UG;function Jw(){if(UG)return pS;UG=1;var t=Object.prototype;function r(a){var s=a&&a.constructor,c=typeof s=="function"&&s.prototype||t;return a===c}return pS=r,pS}var gS,FG;function YG(){if(FG)return gS;FG=1;function t(r,a){return function(s){return r(a(s))}}return gS=t,gS}var bS,VG;function fpe(){if(VG)return bS;VG=1;var t=YG(),r=t(Object.keys,Object);return bS=r,bS}var vS,qG;function yS(){if(qG)return vS;qG=1;var t=Jw(),r=fpe(),a=Object.prototype,s=a.hasOwnProperty;function c(f){if(!t(f))return r(f);var h=[];for(var d in Object(f))s.call(f,d)&&d!="constructor"&&h.push(d);return h}return vS=c,vS}var mS,ZG;function sf(){if(ZG)return mS;ZG=1;var t=I0(),r=uS();function a(s){return s!=null&&r(s.length)&&!t(s)}return mS=a,mS}var wS,$G;function Eh(){if($G)return wS;$G=1;var t=zG(),r=yS(),a=sf();function s(c){return a(c)?t(c):r(c)}return wS=s,wS}var xS,KG;function hpe(){if(KG)return xS;KG=1;var t=L0(),r=Eh();function a(s,c){return s&&t(c,r(c),s)}return xS=a,xS}var kS,QG;function dpe(){if(QG)return kS;QG=1;function t(r){var a=[];if(r!=null)for(var s in Object(r))a.push(s);return a}return kS=t,kS}var _S,WG;function ppe(){if(WG)return _S;WG=1;var t=Pu(),r=Jw(),a=dpe(),s=Object.prototype,c=s.hasOwnProperty;function f(h){if(!t(h))return a(h);var d=r(h),p=[];for(var b in h)b=="constructor"&&(d||!c.call(h,b))||p.push(b);return p}return _S=f,_S}var ES,JG;function Wd(){if(JG)return ES;JG=1;var t=zG(),r=ppe(),a=sf();function s(c){return a(c)?t(c,!0):r(c)}return ES=s,ES}var CS,XG;function gpe(){if(XG)return CS;XG=1;var t=L0(),r=Wd();function a(s,c){return s&&t(c,r(c),s)}return CS=a,CS}var Xw={exports:{}};Xw.exports;var eH;function tH(){return eH||(eH=1,function(t,r){var a=rc(),s=r&&!r.nodeType&&r,c=s&&!0&&t&&!t.nodeType&&t,f=c&&c.exports===s,h=f?a.Buffer:void 0,d=h?h.allocUnsafe:void 0;function p(b,m){if(m)return b.slice();var w=b.length,k=d?d(w):new b.constructor(w);return b.copy(k),k}t.exports=p}(Xw,Xw.exports)),Xw.exports}var PS,nH;function rH(){if(nH)return PS;nH=1;function t(r,a){var s=-1,c=r.length;for(a||(a=Array(c));++s<c;)a[s]=r[s];return a}return PS=t,PS}var SS,iH;function aH(){if(iH)return SS;iH=1;function t(r,a){for(var s=-1,c=r==null?0:r.length,f=0,h=[];++s<c;){var d=r[s];a(d,s,r)&&(h[f++]=d)}return h}return SS=t,SS}var NS,oH;function sH(){if(oH)return NS;oH=1;function t(){return[]}return NS=t,NS}var TS,uH;function MS(){if(uH)return TS;uH=1;var t=aH(),r=sH(),a=Object.prototype,s=a.propertyIsEnumerable,c=Object.getOwnPropertySymbols,f=c?function(h){return h==null?[]:(h=Object(h),t(c(h),function(d){return s.call(h,d)}))}:r;return TS=f,TS}var jS,cH;function bpe(){if(cH)return jS;cH=1;var t=L0(),r=MS();function a(s,c){return t(s,r(s),c)}return jS=a,jS}var AS,lH;function IS(){if(lH)return AS;lH=1;function t(r,a){for(var s=-1,c=a.length,f=r.length;++s<c;)r[f+s]=a[s];return r}return AS=t,AS}var LS,fH;function e2(){if(fH)return LS;fH=1;var t=YG(),r=t(Object.getPrototypeOf,Object);return LS=r,LS}var OS,hH;function dH(){if(hH)return OS;hH=1;var t=IS(),r=e2(),a=MS(),s=sH(),c=Object.getOwnPropertySymbols,f=c?function(h){for(var d=[];h;)t(d,a(h)),h=r(h);return d}:s;return OS=f,OS}var DS,pH;function vpe(){if(pH)return DS;pH=1;var t=L0(),r=dH();function a(s,c){return t(s,r(s),c)}return DS=a,DS}var BS,gH;function bH(){if(gH)return BS;gH=1;var t=IS(),r=xa();function a(s,c,f){var h=c(s);return r(s)?h:t(h,f(s))}return BS=a,BS}var RS,vH;function yH(){if(vH)return RS;vH=1;var t=bH(),r=MS(),a=Eh();function s(c){return t(c,a,r)}return RS=s,RS}var GS,mH;function ype(){if(mH)return GS;mH=1;var t=bH(),r=dH(),a=Wd();function s(c){return t(c,a,r)}return GS=s,GS}var HS,wH;function mpe(){if(wH)return HS;wH=1;var t=Qd(),r=rc(),a=t(r,"DataView");return HS=a,HS}var zS,xH;function wpe(){if(xH)return zS;xH=1;var t=Qd(),r=rc(),a=t(r,"Promise");return zS=a,zS}var US,kH;function _H(){if(kH)return US;kH=1;var t=Qd(),r=rc(),a=t(r,"Set");return US=a,US}var FS,EH;function xpe(){if(EH)return FS;EH=1;var t=Qd(),r=rc(),a=t(r,"WeakMap");return FS=a,FS}var YS,CH;function qg(){if(CH)return YS;CH=1;var t=mpe(),r=T5(),a=wpe(),s=_H(),c=xpe(),f=Kd(),h=XR(),d="[object Map]",p="[object Object]",b="[object Promise]",m="[object Set]",w="[object WeakMap]",k="[object DataView]",P=h(t),S=h(r),M=h(a),L=h(s),T=h(c),j=f;return(t&&j(new t(new ArrayBuffer(1)))!=k||r&&j(new r)!=d||a&&j(a.resolve())!=b||s&&j(new s)!=m||c&&j(new c)!=w)&&(j=function(I){var D=f(I),R=D==p?I.constructor:void 0,Y=R?h(R):"";if(Y)switch(Y){case P:return k;case S:return d;case M:return b;case L:return m;case T:return w}return D}),YS=j,YS}var VS,PH;function kpe(){if(PH)return VS;PH=1;var t=Object.prototype,r=t.hasOwnProperty;function a(s){var c=s.length,f=new s.constructor(c);return c&&typeof s[0]=="string"&&r.call(s,"index")&&(f.index=s.index,f.input=s.input),f}return VS=a,VS}var qS,SH;function NH(){if(SH)return qS;SH=1;var t=rc(),r=t.Uint8Array;return qS=r,qS}var ZS,TH;function $S(){if(TH)return ZS;TH=1;var t=NH();function r(a){var s=new a.constructor(a.byteLength);return new t(s).set(new t(a)),s}return ZS=r,ZS}var KS,MH;function _pe(){if(MH)return KS;MH=1;var t=$S();function r(a,s){var c=s?t(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}return KS=r,KS}var QS,jH;function Epe(){if(jH)return QS;jH=1;var t=/\w*$/;function r(a){var s=new a.constructor(a.source,t.exec(a));return s.lastIndex=a.lastIndex,s}return QS=r,QS}var WS,AH;function Cpe(){if(AH)return WS;AH=1;var t=Yg(),r=t?t.prototype:void 0,a=r?r.valueOf:void 0;function s(c){return a?Object(a.call(c)):{}}return WS=s,WS}var JS,IH;function LH(){if(IH)return JS;IH=1;var t=$S();function r(a,s){var c=s?t(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}return JS=r,JS}var XS,OH;function Ppe(){if(OH)return XS;OH=1;var t=$S(),r=_pe(),a=Epe(),s=Cpe(),c=LH(),f="[object Boolean]",h="[object Date]",d="[object Map]",p="[object Number]",b="[object RegExp]",m="[object Set]",w="[object String]",k="[object Symbol]",P="[object ArrayBuffer]",S="[object DataView]",M="[object Float32Array]",L="[object Float64Array]",T="[object Int8Array]",j="[object Int16Array]",I="[object Int32Array]",D="[object Uint8Array]",R="[object Uint8ClampedArray]",Y="[object Uint16Array]",G="[object Uint32Array]";function U(z,Q,$){var Z=z.constructor;switch(Q){case P:return t(z);case f:case h:return new Z(+z);case S:return r(z,$);case M:case L:case T:case j:case I:case D:case R:case Y:case G:return c(z,$);case d:return new Z;case p:case w:return new Z(z);case b:return a(z);case m:return new Z;case k:return s(z)}}return XS=U,XS}var e4,DH;function BH(){if(DH)return e4;DH=1;var t=Pu(),r=Object.create,a=function(){function s(){}return function(c){if(!t(c))return{};if(r)return r(c);s.prototype=c;var f=new s;return s.prototype=void 0,f}}();return e4=a,e4}var t4,RH;function GH(){if(RH)return t4;RH=1;var t=BH(),r=e2(),a=Jw();function s(c){return typeof c.constructor=="function"&&!a(c)?t(r(c)):{}}return t4=s,t4}var n4,HH;function Spe(){if(HH)return n4;HH=1;var t=qg(),r=el(),a="[object Map]";function s(c){return r(c)&&t(c)==a}return n4=s,n4}var r4,zH;function Npe(){if(zH)return r4;zH=1;var t=Spe(),r=Qw(),a=fS(),s=a&&a.isMap,c=s?r(s):t;return r4=c,r4}var i4,UH;function Tpe(){if(UH)return i4;UH=1;var t=qg(),r=el(),a="[object Set]";function s(c){return r(c)&&t(c)==a}return i4=s,i4}var a4,FH;function Mpe(){if(FH)return a4;FH=1;var t=Tpe(),r=Qw(),a=fS(),s=a&&a.isSet,c=s?r(s):t;return a4=c,a4}var o4,YH;function VH(){if(YH)return o4;YH=1;var t=Vw(),r=K5(),a=Zw(),s=hpe(),c=gpe(),f=tH(),h=rH(),d=bpe(),p=vpe(),b=yH(),m=ype(),w=qg(),k=kpe(),P=Ppe(),S=GH(),M=xa(),L=Vg(),T=Npe(),j=Pu(),I=Mpe(),D=Eh(),R=Wd(),Y=1,G=2,U=4,z="[object Arguments]",Q="[object Array]",$="[object Boolean]",Z="[object Date]",X="[object Error]",K="[object Function]",ae="[object GeneratorFunction]",se="[object Map]",le="[object Number]",he="[object Object]",fe="[object RegExp]",pe="[object Set]",me="[object String]",Te="[object Symbol]",Le="[object WeakMap]",ge="[object ArrayBuffer]",xe="[object DataView]",Se="[object Float32Array]",Ie="[object Float64Array]",Re="[object Int8Array]",Ne="[object Int16Array]",Me="[object Int32Array]",ke="[object Uint8Array]",Ge="[object Uint8ClampedArray]",Qe="[object Uint16Array]",nt="[object Uint32Array]",ft={};ft[z]=ft[Q]=ft[ge]=ft[xe]=ft[$]=ft[Z]=ft[Se]=ft[Ie]=ft[Re]=ft[Ne]=ft[Me]=ft[se]=ft[le]=ft[he]=ft[fe]=ft[pe]=ft[me]=ft[Te]=ft[ke]=ft[Ge]=ft[Qe]=ft[nt]=!0,ft[X]=ft[K]=ft[Le]=!1;function Ue(Ze,mt,st,Ot,At,Rt){var zt,mn=mt&Y,sn=mt&G,or=mt&U;if(st&&(zt=At?st(Ze,Ot,At,Rt):st(Ze)),zt!==void 0)return zt;if(!j(Ze))return Ze;var H=M(Ze);if(H){if(zt=k(Ze),!mn)return h(Ze,zt)}else{var ne=w(Ze),ue=ne==K||ne==ae;if(L(Ze))return f(Ze,mn);if(ne==he||ne==z||ue&&!At){if(zt=sn||ue?{}:S(Ze),!mn)return sn?p(Ze,c(zt,Ze)):d(Ze,s(zt,Ze))}else{if(!ft[ne])return At?Ze:{};zt=P(Ze,ne,mn)}}Rt||(Rt=new t);var we=Rt.get(Ze);if(we)return we;Rt.set(Ze,zt),I(Ze)?Ze.forEach(function(Pe){zt.add(Ue(Pe,mt,st,Pe,Ze,Rt))}):T(Ze)&&Ze.forEach(function(Pe,He){zt.set(He,Ue(Pe,mt,st,He,Ze,Rt))});var je=or?sn?m:b:sn?R:D,ie=H?void 0:je(Ze);return r(ie||Ze,function(Pe,He){ie&&(He=Pe,Pe=Ze[He]),a(zt,He,Ue(Pe,mt,st,He,Ze,Rt))}),zt}return o4=Ue,o4}var s4,qH;function jpe(){if(qH)return s4;qH=1;var t=VH(),r=4;function a(s){return t(s,r)}return s4=a,s4}var u4,ZH;function c4(){if(ZH)return u4;ZH=1;function t(r){return function(){return r}}return u4=t,u4}var l4,$H;function Ape(){if($H)return l4;$H=1;function t(r){return function(a,s,c){for(var f=-1,h=Object(a),d=c(a),p=d.length;p--;){var b=d[r?p:++f];if(s(h[b],b,h)===!1)break}return a}}return l4=t,l4}var f4,KH;function h4(){if(KH)return f4;KH=1;var t=Ape(),r=t();return f4=r,f4}var d4,QH;function p4(){if(QH)return d4;QH=1;var t=h4(),r=Eh();function a(s,c){return s&&t(s,c,r)}return d4=a,d4}var g4,WH;function Ipe(){if(WH)return g4;WH=1;var t=sf();function r(a,s){return function(c,f){if(c==null)return c;if(!t(c))return a(c,f);for(var h=c.length,d=s?h:-1,p=Object(c);(s?d--:++d<h)&&f(p[d],d,p)!==!1;);return c}}return g4=r,g4}var b4,JH;function t2(){if(JH)return b4;JH=1;var t=p4(),r=Ipe(),a=r(t);return b4=a,b4}var v4,XH;function Jd(){if(XH)return v4;XH=1;function t(r){return r}return v4=t,v4}var y4,ez;function tz(){if(ez)return y4;ez=1;var t=Jd();function r(a){return typeof a=="function"?a:t}return y4=r,y4}var m4,nz;function rz(){if(nz)return m4;nz=1;var t=K5(),r=t2(),a=tz(),s=xa();function c(f,h){var d=s(f)?t:r;return d(f,a(h))}return m4=c,m4}var iz,az;function oz(){return az||(az=1,iz=rz()),iz}var w4,sz;function Lpe(){if(sz)return w4;sz=1;var t=t2();function r(a,s){var c=[];return t(a,function(f,h,d){s(f,h,d)&&c.push(f)}),c}return w4=r,w4}var x4,uz;function Ope(){if(uz)return x4;uz=1;var t="__lodash_hash_undefined__";function r(a){return this.__data__.set(a,t),this}return x4=r,x4}var k4,cz;function Dpe(){if(cz)return k4;cz=1;function t(r){return this.__data__.has(r)}return k4=t,k4}var _4,lz;function fz(){if(lz)return _4;lz=1;var t=V5(),r=Ope(),a=Dpe();function s(c){var f=-1,h=c==null?0:c.length;for(this.__data__=new t;++f<h;)this.add(c[f])}return s.prototype.add=s.prototype.push=r,s.prototype.has=a,_4=s,_4}var E4,hz;function Bpe(){if(hz)return E4;hz=1;function t(r,a){for(var s=-1,c=r==null?0:r.length;++s<c;)if(a(r[s],s,r))return!0;return!1}return E4=t,E4}var C4,dz;function pz(){if(dz)return C4;dz=1;function t(r,a){return r.has(a)}return C4=t,C4}var P4,gz;function bz(){if(gz)return P4;gz=1;var t=fz(),r=Bpe(),a=pz(),s=1,c=2;function f(h,d,p,b,m,w){var k=p&s,P=h.length,S=d.length;if(P!=S&&!(k&&S>P))return!1;var M=w.get(h),L=w.get(d);if(M&&L)return M==d&&L==h;var T=-1,j=!0,I=p&c?new t:void 0;for(w.set(h,d),w.set(d,h);++T<P;){var D=h[T],R=d[T];if(b)var Y=k?b(R,D,T,d,h,w):b(D,R,T,h,d,w);if(Y!==void 0){if(Y)continue;j=!1;break}if(I){if(!r(d,function(G,U){if(!a(I,U)&&(D===G||m(D,G,p,b,w)))return I.push(U)})){j=!1;break}}else if(!(D===R||m(D,R,p,b,w))){j=!1;break}}return w.delete(h),w.delete(d),j}return P4=f,P4}var S4,vz;function Rpe(){if(vz)return S4;vz=1;function t(r){var a=-1,s=Array(r.size);return r.forEach(function(c,f){s[++a]=[f,c]}),s}return S4=t,S4}var N4,yz;function T4(){if(yz)return N4;yz=1;function t(r){var a=-1,s=Array(r.size);return r.forEach(function(c){s[++a]=c}),s}return N4=t,N4}var M4,mz;function Gpe(){if(mz)return M4;mz=1;var t=Yg(),r=NH(),a=Fg(),s=bz(),c=Rpe(),f=T4(),h=1,d=2,p="[object Boolean]",b="[object Date]",m="[object Error]",w="[object Map]",k="[object Number]",P="[object RegExp]",S="[object Set]",M="[object String]",L="[object Symbol]",T="[object ArrayBuffer]",j="[object DataView]",I=t?t.prototype:void 0,D=I?I.valueOf:void 0;function R(Y,G,U,z,Q,$,Z){switch(U){case j:if(Y.byteLength!=G.byteLength||Y.byteOffset!=G.byteOffset)return!1;Y=Y.buffer,G=G.buffer;case T:return!(Y.byteLength!=G.byteLength||!$(new r(Y),new r(G)));case p:case b:case k:return a(+Y,+G);case m:return Y.name==G.name&&Y.message==G.message;case P:case M:return Y==G+"";case w:var X=c;case S:var K=z&h;if(X||(X=f),Y.size!=G.size&&!K)return!1;var ae=Z.get(Y);if(ae)return ae==G;z|=d,Z.set(Y,G);var se=s(X(Y),X(G),z,Q,$,Z);return Z.delete(Y),se;case L:if(D)return D.call(Y)==D.call(G)}return!1}return M4=R,M4}var j4,wz;function Hpe(){if(wz)return j4;wz=1;var t=yH(),r=1,a=Object.prototype,s=a.hasOwnProperty;function c(f,h,d,p,b,m){var w=d&r,k=t(f),P=k.length,S=t(h),M=S.length;if(P!=M&&!w)return!1;for(var L=P;L--;){var T=k[L];if(!(w?T in h:s.call(h,T)))return!1}var j=m.get(f),I=m.get(h);if(j&&I)return j==h&&I==f;var D=!0;m.set(f,h),m.set(h,f);for(var R=w;++L<P;){T=k[L];var Y=f[T],G=h[T];if(p)var U=w?p(G,Y,T,h,f,m):p(Y,G,T,f,h,m);if(!(U===void 0?Y===G||b(Y,G,d,p,m):U)){D=!1;break}R||(R=T=="constructor")}if(D&&!R){var z=f.constructor,Q=h.constructor;z!=Q&&"constructor"in f&&"constructor"in h&&!(typeof z=="function"&&z instanceof z&&typeof Q=="function"&&Q instanceof Q)&&(D=!1)}return m.delete(f),m.delete(h),D}return j4=c,j4}var A4,xz;function zpe(){if(xz)return A4;xz=1;var t=Vw(),r=bz(),a=Gpe(),s=Hpe(),c=qg(),f=xa(),h=Vg(),d=D0(),p=1,b="[object Arguments]",m="[object Array]",w="[object Object]",k=Object.prototype,P=k.hasOwnProperty;function S(M,L,T,j,I,D){var R=f(M),Y=f(L),G=R?m:c(M),U=Y?m:c(L);G=G==b?w:G,U=U==b?w:U;var z=G==w,Q=U==w,$=G==U;if($&&h(M)){if(!h(L))return!1;R=!0,z=!1}if($&&!z)return D||(D=new t),R||d(M)?r(M,L,T,j,I,D):a(M,L,G,T,j,I,D);if(!(T&p)){var Z=z&&P.call(M,"__wrapped__"),X=Q&&P.call(L,"__wrapped__");if(Z||X){var K=Z?M.value():M,ae=X?L.value():L;return D||(D=new t),I(K,ae,T,j,D)}}return $?(D||(D=new t),s(M,L,T,j,I,D)):!1}return A4=S,A4}var I4,kz;function _z(){if(kz)return I4;kz=1;var t=zpe(),r=el();function a(s,c,f,h,d){return s===c?!0:s==null||c==null||!r(s)&&!r(c)?s!==s&&c!==c:t(s,c,f,h,a,d)}return I4=a,I4}var L4,Ez;function Upe(){if(Ez)return L4;Ez=1;var t=Vw(),r=_z(),a=1,s=2;function c(f,h,d,p){var b=d.length,m=b,w=!p;if(f==null)return!m;for(f=Object(f);b--;){var k=d[b];if(w&&k[2]?k[1]!==f[k[0]]:!(k[0]in f))return!1}for(;++b<m;){k=d[b];var P=k[0],S=f[P],M=k[1];if(w&&k[2]){if(S===void 0&&!(P in f))return!1}else{var L=new t;if(p)var T=p(S,M,P,f,h,L);if(!(T===void 0?r(M,S,a|s,p,L):T))return!1}}return!0}return L4=c,L4}var O4,Cz;function Pz(){if(Cz)return O4;Cz=1;var t=Pu();function r(a){return a===a&&!t(a)}return O4=r,O4}var D4,Sz;function Fpe(){if(Sz)return D4;Sz=1;var t=Pz(),r=Eh();function a(s){for(var c=r(s),f=c.length;f--;){var h=c[f],d=s[h];c[f]=[h,d,t(d)]}return c}return D4=a,D4}var B4,Nz;function Tz(){if(Nz)return B4;Nz=1;function t(r,a){return function(s){return s==null?!1:s[r]===a&&(a!==void 0||r in Object(s))}}return B4=t,B4}var R4,Mz;function Ype(){if(Mz)return R4;Mz=1;var t=Upe(),r=Fpe(),a=Tz();function s(c){var f=r(c);return f.length==1&&f[0][2]?a(f[0][0],f[0][1]):function(h){return h===c||t(h,c,f)}}return R4=s,R4}var G4,jz;function Zg(){if(jz)return G4;jz=1;var t=Kd(),r=el(),a="[object Symbol]";function s(c){return typeof c=="symbol"||r(c)&&t(c)==a}return G4=s,G4}var H4,Az;function z4(){if(Az)return H4;Az=1;var t=xa(),r=Zg(),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function c(f,h){if(t(f))return!1;var d=typeof f;return d=="number"||d=="symbol"||d=="boolean"||f==null||r(f)?!0:s.test(f)||!a.test(f)||h!=null&&f in Object(h)}return H4=c,H4}var U4,Iz;function Vpe(){if(Iz)return U4;Iz=1;var t=V5(),r="Expected a function";function a(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new TypeError(r);var f=function(){var h=arguments,d=c?c.apply(this,h):h[0],p=f.cache;if(p.has(d))return p.get(d);var b=s.apply(this,h);return f.cache=p.set(d,b)||p,b};return f.cache=new(a.Cache||t),f}return a.Cache=t,U4=a,U4}var F4,Lz;function qpe(){if(Lz)return F4;Lz=1;var t=Vpe(),r=500;function a(s){var c=t(s,function(h){return f.size===r&&f.clear(),h}),f=c.cache;return c}return F4=a,F4}var Y4,Oz;function Zpe(){if(Oz)return Y4;Oz=1;var t=qpe(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=t(function(c){var f=[];return c.charCodeAt(0)===46&&f.push(""),c.replace(r,function(h,d,p,b){f.push(p?b.replace(a,"$1"):d||h)}),f});return Y4=s,Y4}var V4,Dz;function n2(){if(Dz)return V4;Dz=1;function t(r,a){for(var s=-1,c=r==null?0:r.length,f=Array(c);++s<c;)f[s]=a(r[s],s,r);return f}return V4=t,V4}var q4,Bz;function $pe(){if(Bz)return q4;Bz=1;var t=Yg(),r=n2(),a=xa(),s=Zg(),c=t?t.prototype:void 0,f=c?c.toString:void 0;function h(d){if(typeof d=="string")return d;if(a(d))return r(d,h)+"";if(s(d))return f?f.call(d):"";var p=d+"";return p=="0"&&1/d==-1/0?"-0":p}return q4=h,q4}var Z4,Rz;function Gz(){if(Rz)return Z4;Rz=1;var t=$pe();function r(a){return a==null?"":t(a)}return Z4=r,Z4}var $4,Hz;function r2(){if(Hz)return $4;Hz=1;var t=xa(),r=z4(),a=Zpe(),s=Gz();function c(f,h){return t(f)?f:r(f,h)?[f]:a(s(f))}return $4=c,$4}var K4,zz;function B0(){if(zz)return K4;zz=1;var t=Zg();function r(a){if(typeof a=="string"||t(a))return a;var s=a+"";return s=="0"&&1/a==-1/0?"-0":s}return K4=r,K4}var Q4,Uz;function i2(){if(Uz)return Q4;Uz=1;var t=r2(),r=B0();function a(s,c){c=t(c,s);for(var f=0,h=c.length;s!=null&&f<h;)s=s[r(c[f++])];return f&&f==h?s:void 0}return Q4=a,Q4}var W4,Fz;function Kpe(){if(Fz)return W4;Fz=1;var t=i2();function r(a,s,c){var f=a==null?void 0:t(a,s);return f===void 0?c:f}return W4=r,W4}var J4,Yz;function Qpe(){if(Yz)return J4;Yz=1;function t(r,a){return r!=null&&a in Object(r)}return J4=t,J4}var X4,Vz;function qz(){if(Vz)return X4;Vz=1;var t=r2(),r=O0(),a=xa(),s=Kw(),c=uS(),f=B0();function h(d,p,b){p=t(p,d);for(var m=-1,w=p.length,k=!1;++m<w;){var P=f(p[m]);if(!(k=d!=null&&b(d,P)))break;d=d[P]}return k||++m!=w?k:(w=d==null?0:d.length,!!w&&c(w)&&s(P,w)&&(a(d)||r(d)))}return X4=h,X4}var eN,Zz;function $z(){if(Zz)return eN;Zz=1;var t=Qpe(),r=qz();function a(s,c){return s!=null&&r(s,c,t)}return eN=a,eN}var tN,Kz;function Wpe(){if(Kz)return tN;Kz=1;var t=_z(),r=Kpe(),a=$z(),s=z4(),c=Pz(),f=Tz(),h=B0(),d=1,p=2;function b(m,w){return s(m)&&c(w)?f(h(m),w):function(k){var P=r(k,m);return P===void 0&&P===w?a(k,m):t(w,P,d|p)}}return tN=b,tN}var nN,Qz;function Wz(){if(Qz)return nN;Qz=1;function t(r){return function(a){return a==null?void 0:a[r]}}return nN=t,nN}var rN,Jz;function Jpe(){if(Jz)return rN;Jz=1;var t=i2();function r(a){return function(s){return t(s,a)}}return rN=r,rN}var iN,Xz;function Xpe(){if(Xz)return iN;Xz=1;var t=Wz(),r=Jpe(),a=z4(),s=B0();function c(f){return a(f)?t(s(f)):r(f)}return iN=c,iN}var aN,eU;function uf(){if(eU)return aN;eU=1;var t=Ype(),r=Wpe(),a=Jd(),s=xa(),c=Xpe();function f(h){return typeof h=="function"?h:h==null?a:typeof h=="object"?s(h)?r(h[0],h[1]):t(h):c(h)}return aN=f,aN}var oN,tU;function nU(){if(tU)return oN;tU=1;var t=aH(),r=Lpe(),a=uf(),s=xa();function c(f,h){var d=s(f)?t:r;return d(f,a(h,3))}return oN=c,oN}var sN,rU;function ege(){if(rU)return sN;rU=1;var t=Object.prototype,r=t.hasOwnProperty;function a(s,c){return s!=null&&r.call(s,c)}return sN=a,sN}var uN,iU;function aU(){if(iU)return uN;iU=1;var t=ege(),r=qz();function a(s,c){return s!=null&&r(s,c,t)}return uN=a,uN}var cN,oU;function tge(){if(oU)return cN;oU=1;var t=yS(),r=qg(),a=O0(),s=xa(),c=sf(),f=Vg(),h=Jw(),d=D0(),p="[object Map]",b="[object Set]",m=Object.prototype,w=m.hasOwnProperty;function k(P){if(P==null)return!0;if(c(P)&&(s(P)||typeof P=="string"||typeof P.splice=="function"||f(P)||d(P)||a(P)))return!P.length;var S=r(P);if(S==p||S==b)return!P.size;if(h(P))return!t(P).length;for(var M in P)if(w.call(P,M))return!1;return!0}return cN=k,cN}var lN,sU;function uU(){if(sU)return lN;sU=1;function t(r){return r===void 0}return lN=t,lN}var fN,cU;function lU(){if(cU)return fN;cU=1;var t=t2(),r=sf();function a(s,c){var f=-1,h=r(s)?Array(s.length):[];return t(s,function(d,p,b){h[++f]=c(d,p,b)}),h}return fN=a,fN}var hN,fU;function hU(){if(fU)return hN;fU=1;var t=n2(),r=uf(),a=lU(),s=xa();function c(f,h){var d=s(f)?t:a;return d(f,r(h,3))}return hN=c,hN}var dN,dU;function nge(){if(dU)return dN;dU=1;function t(r,a,s,c){var f=-1,h=r==null?0:r.length;for(c&&h&&(s=r[++f]);++f<h;)s=a(s,r[f],f,r);return s}return dN=t,dN}var pN,pU;function rge(){if(pU)return pN;pU=1;function t(r,a,s,c,f){return f(r,function(h,d,p){s=c?(c=!1,h):a(s,h,d,p)}),s}return pN=t,pN}var gN,gU;function bU(){if(gU)return gN;gU=1;var t=nge(),r=t2(),a=uf(),s=rge(),c=xa();function f(h,d,p){var b=c(h)?t:s,m=arguments.length<3;return b(h,a(d,4),p,m,r)}return gN=f,gN}var bN,vU;function ige(){if(vU)return bN;vU=1;var t=Kd(),r=xa(),a=el(),s="[object String]";function c(f){return typeof f=="string"||!r(f)&&a(f)&&t(f)==s}return bN=c,bN}var vN,yU;function age(){if(yU)return vN;yU=1;var t=Wz(),r=t("length");return vN=r,vN}var yN,mU;function oge(){if(mU)return yN;mU=1;var t="\\ud800-\\udfff",r="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",c=r+a+s,f="\\ufe0e\\ufe0f",h="\\u200d",d=RegExp("["+h+t+c+f+"]");function p(b){return d.test(b)}return yN=p,yN}var mN,wU;function sge(){if(wU)return mN;wU=1;var t="\\ud800-\\udfff",r="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",c=r+a+s,f="\\ufe0e\\ufe0f",h="["+t+"]",d="["+c+"]",p="\\ud83c[\\udffb-\\udfff]",b="(?:"+d+"|"+p+")",m="[^"+t+"]",w="(?:\\ud83c[\\udde6-\\uddff]){2}",k="[\\ud800-\\udbff][\\udc00-\\udfff]",P="\\u200d",S=b+"?",M="["+f+"]?",L="(?:"+P+"(?:"+[m,w,k].join("|")+")"+M+S+")*",T=M+S+L,j="(?:"+[m+d+"?",d,w,k,h].join("|")+")",I=RegExp(p+"(?="+p+")|"+j+T,"g");function D(R){for(var Y=I.lastIndex=0;I.test(R);)++Y;return Y}return mN=D,mN}var wN,xU;function uge(){if(xU)return wN;xU=1;var t=age(),r=oge(),a=sge();function s(c){return r(c)?a(c):t(c)}return wN=s,wN}var xN,kU;function cge(){if(kU)return xN;kU=1;var t=yS(),r=qg(),a=sf(),s=ige(),c=uge(),f="[object Map]",h="[object Set]";function d(p){if(p==null)return 0;if(a(p))return s(p)?c(p):p.length;var b=r(p);return b==f||b==h?p.size:t(p).length}return xN=d,xN}var kN,_U;function lge(){if(_U)return kN;_U=1;var t=K5(),r=BH(),a=p4(),s=uf(),c=e2(),f=xa(),h=Vg(),d=I0(),p=Pu(),b=D0();function m(w,k,P){var S=f(w),M=S||h(w)||b(w);if(k=s(k,4),P==null){var L=w&&w.constructor;M?P=S?new L:[]:p(w)?P=d(L)?r(c(w)):{}:P={}}return(M?t:a)(w,function(T,j,I){return k(P,T,j,I)}),P}return kN=m,kN}var _N,EU;function fge(){if(EU)return _N;EU=1;var t=Yg(),r=O0(),a=xa(),s=t?t.isConcatSpreadable:void 0;function c(f){return a(f)||r(f)||!!(s&&f&&f[s])}return _N=c,_N}var EN,CU;function CN(){if(CU)return EN;CU=1;var t=IS(),r=fge();function a(s,c,f,h,d){var p=-1,b=s.length;for(f||(f=r),d||(d=[]);++p<b;){var m=s[p];c>0&&f(m)?c>1?a(m,c-1,f,h,d):t(d,m):h||(d[d.length]=m)}return d}return EN=a,EN}var PN,PU;function hge(){if(PU)return PN;PU=1;function t(r,a,s){switch(s.length){case 0:return r.call(a);case 1:return r.call(a,s[0]);case 2:return r.call(a,s[0],s[1]);case 3:return r.call(a,s[0],s[1],s[2])}return r.apply(a,s)}return PN=t,PN}var SN,SU;function NU(){if(SU)return SN;SU=1;var t=hge(),r=Math.max;function a(s,c,f){return c=r(c===void 0?s.length-1:c,0),function(){for(var h=arguments,d=-1,p=r(h.length-c,0),b=Array(p);++d<p;)b[d]=h[c+d];d=-1;for(var m=Array(c+1);++d<c;)m[d]=h[d];return m[c]=f(b),t(s,this,m)}}return SN=a,SN}var NN,TU;function dge(){if(TU)return NN;TU=1;var t=c4(),r=_G(),a=Jd(),s=r?function(c,f){return r(c,"toString",{configurable:!0,enumerable:!1,value:t(f),writable:!0})}:a;return NN=s,NN}var TN,MU;function pge(){if(MU)return TN;MU=1;var t=800,r=16,a=Date.now;function s(c){var f=0,h=0;return function(){var d=a(),p=r-(d-h);if(h=d,p>0){if(++f>=t)return arguments[0]}else f=0;return c.apply(void 0,arguments)}}return TN=s,TN}var MN,jU;function AU(){if(jU)return MN;jU=1;var t=dge(),r=pge(),a=r(t);return MN=a,MN}var jN,IU;function a2(){if(IU)return jN;IU=1;var t=Jd(),r=NU(),a=AU();function s(c,f){return a(r(c,f,t),c+"")}return jN=s,jN}var AN,LU;function OU(){if(LU)return AN;LU=1;function t(r,a,s,c){for(var f=r.length,h=s+(c?1:-1);c?h--:++h<f;)if(a(r[h],h,r))return h;return-1}return AN=t,AN}var IN,DU;function gge(){if(DU)return IN;DU=1;function t(r){return r!==r}return IN=t,IN}var LN,BU;function bge(){if(BU)return LN;BU=1;function t(r,a,s){for(var c=s-1,f=r.length;++c<f;)if(r[c]===a)return c;return-1}return LN=t,LN}var ON,RU;function vge(){if(RU)return ON;RU=1;var t=OU(),r=gge(),a=bge();function s(c,f,h){return f===f?a(c,f,h):t(c,r,h)}return ON=s,ON}var DN,GU;function yge(){if(GU)return DN;GU=1;var t=vge();function r(a,s){var c=a==null?0:a.length;return!!c&&t(a,s,0)>-1}return DN=r,DN}var BN,HU;function mge(){if(HU)return BN;HU=1;function t(r,a,s){for(var c=-1,f=r==null?0:r.length;++c<f;)if(s(a,r[c]))return!0;return!1}return BN=t,BN}var RN,zU;function wge(){if(zU)return RN;zU=1;function t(){}return RN=t,RN}var GN,UU;function xge(){if(UU)return GN;UU=1;var t=_H(),r=wge(),a=T4(),s=1/0,c=t&&1/a(new t([,-0]))[1]==s?function(f){return new t(f)}:r;return GN=c,GN}var HN,FU;function kge(){if(FU)return HN;FU=1;var t=fz(),r=yge(),a=mge(),s=pz(),c=xge(),f=T4(),h=200;function d(p,b,m){var w=-1,k=r,P=p.length,S=!0,M=[],L=M;if(m)S=!1,k=a;else if(P>=h){var T=b?null:c(p);if(T)return f(T);S=!1,k=s,L=new t}else L=b?[]:M;e:for(;++w<P;){var j=p[w],I=b?b(j):j;if(j=m||j!==0?j:0,S&&I===I){for(var D=L.length;D--;)if(L[D]===I)continue e;b&&L.push(I),M.push(j)}else k(L,I,m)||(L!==M&&L.push(I),M.push(j))}return M}return HN=d,HN}var zN,YU;function VU(){if(YU)return zN;YU=1;var t=sf(),r=el();function a(s){return r(s)&&t(s)}return zN=a,zN}var UN,qU;function _ge(){if(qU)return UN;qU=1;var t=CN(),r=a2(),a=kge(),s=VU(),c=r(function(f){return a(t(f,1,s,!0))});return UN=c,UN}var FN,ZU;function Ege(){if(ZU)return FN;ZU=1;var t=n2();function r(a,s){return t(s,function(c){return a[c]})}return FN=r,FN}var YN,$U;function KU(){if($U)return YN;$U=1;var t=Ege(),r=Eh();function a(s){return s==null?[]:t(s,r(s))}return YN=a,YN}var VN,QU;function Su(){if(QU)return VN;QU=1;var t;if(typeof t5=="function")try{t={clone:jpe(),constant:c4(),each:oz(),filter:nU(),has:aU(),isArray:xa(),isEmpty:tge(),isFunction:I0(),isUndefined:uU(),keys:Eh(),map:hU(),reduce:bU(),size:cge(),transform:lge(),union:_ge(),values:KU()}}catch{}return t||(t=window._),VN=t,VN}var qN,WU;function ZN(){if(WU)return qN;WU=1;var t=Su();qN=c;var r="\0",a="\0",s="";function c(m){this._isDirected=t.has(m,"directed")?m.directed:!0,this._isMultigraph=t.has(m,"multigraph")?m.multigraph:!1,this._isCompound=t.has(m,"compound")?m.compound:!1,this._label=void 0,this._defaultNodeLabelFn=t.constant(void 0),this._defaultEdgeLabelFn=t.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}c.prototype._nodeCount=0,c.prototype._edgeCount=0,c.prototype.isDirected=function(){return this._isDirected},c.prototype.isMultigraph=function(){return this._isMultigraph},c.prototype.isCompound=function(){return this._isCompound},c.prototype.setGraph=function(m){return this._label=m,this},c.prototype.graph=function(){return this._label},c.prototype.setDefaultNodeLabel=function(m){return t.isFunction(m)||(m=t.constant(m)),this._defaultNodeLabelFn=m,this},c.prototype.nodeCount=function(){return this._nodeCount},c.prototype.nodes=function(){return t.keys(this._nodes)},c.prototype.sources=function(){var m=this;return t.filter(this.nodes(),function(w){return t.isEmpty(m._in[w])})},c.prototype.sinks=function(){var m=this;return t.filter(this.nodes(),function(w){return t.isEmpty(m._out[w])})},c.prototype.setNodes=function(m,w){var k=arguments,P=this;return t.each(m,function(S){k.length>1?P.setNode(S,w):P.setNode(S)}),this},c.prototype.setNode=function(m,w){return t.has(this._nodes,m)?(arguments.length>1&&(this._nodes[m]=w),this):(this._nodes[m]=arguments.length>1?w:this._defaultNodeLabelFn(m),this._isCompound&&(this._parent[m]=a,this._children[m]={},this._children[a][m]=!0),this._in[m]={},this._preds[m]={},this._out[m]={},this._sucs[m]={},++this._nodeCount,this)},c.prototype.node=function(m){return this._nodes[m]},c.prototype.hasNode=function(m){return t.has(this._nodes,m)},c.prototype.removeNode=function(m){var w=this;if(t.has(this._nodes,m)){var k=function(P){w.removeEdge(w._edgeObjs[P])};delete this._nodes[m],this._isCompound&&(this._removeFromParentsChildList(m),delete this._parent[m],t.each(this.children(m),function(P){w.setParent(P)}),delete this._children[m]),t.each(t.keys(this._in[m]),k),delete this._in[m],delete this._preds[m],t.each(t.keys(this._out[m]),k),delete this._out[m],delete this._sucs[m],--this._nodeCount}return this},c.prototype.setParent=function(m,w){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t.isUndefined(w))w=a;else{w+="";for(var k=w;!t.isUndefined(k);k=this.parent(k))if(k===m)throw new Error("Setting "+w+" as parent of "+m+" would create a cycle");this.setNode(w)}return this.setNode(m),this._removeFromParentsChildList(m),this._parent[m]=w,this._children[w][m]=!0,this},c.prototype._removeFromParentsChildList=function(m){delete this._children[this._parent[m]][m]},c.prototype.parent=function(m){if(this._isCompound){var w=this._parent[m];if(w!==a)return w}},c.prototype.children=function(m){if(t.isUndefined(m)&&(m=a),this._isCompound){var w=this._children[m];if(w)return t.keys(w)}else{if(m===a)return this.nodes();if(this.hasNode(m))return[]}},c.prototype.predecessors=function(m){var w=this._preds[m];if(w)return t.keys(w)},c.prototype.successors=function(m){var w=this._sucs[m];if(w)return t.keys(w)},c.prototype.neighbors=function(m){var w=this.predecessors(m);if(w)return t.union(w,this.successors(m))},c.prototype.isLeaf=function(m){var w;return this.isDirected()?w=this.successors(m):w=this.neighbors(m),w.length===0},c.prototype.filterNodes=function(m){var w=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});w.setGraph(this.graph());var k=this;t.each(this._nodes,function(M,L){m(L)&&w.setNode(L,M)}),t.each(this._edgeObjs,function(M){w.hasNode(M.v)&&w.hasNode(M.w)&&w.setEdge(M,k.edge(M))});var P={};function S(M){var L=k.parent(M);return L===void 0||w.hasNode(L)?(P[M]=L,L):L in P?P[L]:S(L)}return this._isCompound&&t.each(w.nodes(),function(M){w.setParent(M,S(M))}),w},c.prototype.setDefaultEdgeLabel=function(m){return t.isFunction(m)||(m=t.constant(m)),this._defaultEdgeLabelFn=m,this},c.prototype.edgeCount=function(){return this._edgeCount},c.prototype.edges=function(){return t.values(this._edgeObjs)},c.prototype.setPath=function(m,w){var k=this,P=arguments;return t.reduce(m,function(S,M){return P.length>1?k.setEdge(S,M,w):k.setEdge(S,M),M}),this},c.prototype.setEdge=function(){var m,w,k,P,S=!1,M=arguments[0];typeof M=="object"&&M!==null&&"v"in M?(m=M.v,w=M.w,k=M.name,arguments.length===2&&(P=arguments[1],S=!0)):(m=M,w=arguments[1],k=arguments[3],arguments.length>2&&(P=arguments[2],S=!0)),m=""+m,w=""+w,t.isUndefined(k)||(k=""+k);var L=d(this._isDirected,m,w,k);if(t.has(this._edgeLabels,L))return S&&(this._edgeLabels[L]=P),this;if(!t.isUndefined(k)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(m),this.setNode(w),this._edgeLabels[L]=S?P:this._defaultEdgeLabelFn(m,w,k);var T=p(this._isDirected,m,w,k);return m=T.v,w=T.w,Object.freeze(T),this._edgeObjs[L]=T,f(this._preds[w],m),f(this._sucs[m],w),this._in[w][L]=T,this._out[m][L]=T,this._edgeCount++,this},c.prototype.edge=function(m,w,k){var P=arguments.length===1?b(this._isDirected,arguments[0]):d(this._isDirected,m,w,k);return this._edgeLabels[P]},c.prototype.hasEdge=function(m,w,k){var P=arguments.length===1?b(this._isDirected,arguments[0]):d(this._isDirected,m,w,k);return t.has(this._edgeLabels,P)},c.prototype.removeEdge=function(m,w,k){var P=arguments.length===1?b(this._isDirected,arguments[0]):d(this._isDirected,m,w,k),S=this._edgeObjs[P];return S&&(m=S.v,w=S.w,delete this._edgeLabels[P],delete this._edgeObjs[P],h(this._preds[w],m),h(this._sucs[m],w),delete this._in[w][P],delete this._out[m][P],this._edgeCount--),this},c.prototype.inEdges=function(m,w){var k=this._in[m];if(k){var P=t.values(k);return w?t.filter(P,function(S){return S.v===w}):P}},c.prototype.outEdges=function(m,w){var k=this._out[m];if(k){var P=t.values(k);return w?t.filter(P,function(S){return S.w===w}):P}},c.prototype.nodeEdges=function(m,w){var k=this.inEdges(m,w);if(k)return k.concat(this.outEdges(m,w))};function f(m,w){m[w]?m[w]++:m[w]=1}function h(m,w){--m[w]||delete m[w]}function d(m,w,k,P){var S=""+w,M=""+k;if(!m&&S>M){var L=S;S=M,M=L}return S+s+M+s+(t.isUndefined(P)?r:P)}function p(m,w,k,P){var S=""+w,M=""+k;if(!m&&S>M){var L=S;S=M,M=L}var T={v:S,w:M};return P&&(T.name=P),T}function b(m,w){return d(m,w.v,w.w,w.name)}return qN}var JU,XU;function Cge(){return XU||(XU=1,JU="2.1.8"),JU}var eF,tF;function Pge(){return tF||(tF=1,eF={Graph:ZN(),version:Cge()}),eF}var $N,nF;function Sge(){if(nF)return $N;nF=1;var t=Su(),r=ZN();$N={write:a,read:f};function a(h){var d={options:{directed:h.isDirected(),multigraph:h.isMultigraph(),compound:h.isCompound()},nodes:s(h),edges:c(h)};return t.isUndefined(h.graph())||(d.value=t.clone(h.graph())),d}function s(h){return t.map(h.nodes(),function(d){var p=h.node(d),b=h.parent(d),m={v:d};return t.isUndefined(p)||(m.value=p),t.isUndefined(b)||(m.parent=b),m})}function c(h){return t.map(h.edges(),function(d){var p=h.edge(d),b={v:d.v,w:d.w};return t.isUndefined(d.name)||(b.name=d.name),t.isUndefined(p)||(b.value=p),b})}function f(h){var d=new r(h.options).setGraph(h.value);return t.each(h.nodes,function(p){d.setNode(p.v,p.value),p.parent&&d.setParent(p.v,p.parent)}),t.each(h.edges,function(p){d.setEdge({v:p.v,w:p.w,name:p.name},p.value)}),d}return $N}var KN,rF;function Nge(){if(rF)return KN;rF=1;var t=Su();KN=r;function r(a){var s={},c=[],f;function h(d){t.has(s,d)||(s[d]=!0,f.push(d),t.each(a.successors(d),h),t.each(a.predecessors(d),h))}return t.each(a.nodes(),function(d){f=[],h(d),f.length&&c.push(f)}),c}return KN}var QN,iF;function aF(){if(iF)return QN;iF=1;var t=Su();QN=r;function r(){this._arr=[],this._keyIndices={}}return r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(a){return a.key})},r.prototype.has=function(a){return t.has(this._keyIndices,a)},r.prototype.priority=function(a){var s=this._keyIndices[a];if(s!==void 0)return this._arr[s].priority},r.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(a,s){var c=this._keyIndices;if(a=String(a),!t.has(c,a)){var f=this._arr,h=f.length;return c[a]=h,f.push({key:a,priority:s}),this._decrease(h),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var a=this._arr.pop();return delete this._keyIndices[a.key],this._heapify(0),a.key},r.prototype.decrease=function(a,s){var c=this._keyIndices[a];if(s>this._arr[c].priority)throw new Error("New priority is greater than current priority. Key: "+a+" Old: "+this._arr[c].priority+" New: "+s);this._arr[c].priority=s,this._decrease(c)},r.prototype._heapify=function(a){var s=this._arr,c=2*a,f=c+1,h=a;c<s.length&&(h=s[c].priority<s[h].priority?c:h,f<s.length&&(h=s[f].priority<s[h].priority?f:h),h!==a&&(this._swap(a,h),this._heapify(h)))},r.prototype._decrease=function(a){for(var s=this._arr,c=s[a].priority,f;a!==0&&(f=a>>1,!(s[f].priority<c));)this._swap(a,f),a=f},r.prototype._swap=function(a,s){var c=this._arr,f=this._keyIndices,h=c[a],d=c[s];c[a]=d,c[s]=h,f[d.key]=a,f[h.key]=s},QN}var WN,oF;function sF(){if(oF)return WN;oF=1;var t=Su(),r=aF();WN=s;var a=t.constant(1);function s(f,h,d,p){return c(f,String(h),d||a,p||function(b){return f.outEdges(b)})}function c(f,h,d,p){var b={},m=new r,w,k,P=function(S){var M=S.v!==w?S.v:S.w,L=b[M],T=d(S),j=k.distance+T;if(T<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+S+" Weight: "+T);j<L.distance&&(L.distance=j,L.predecessor=w,m.decrease(M,j))};for(f.nodes().forEach(function(S){var M=S===h?0:Number.POSITIVE_INFINITY;b[S]={distance:M},m.add(S,M)});m.size()>0&&(w=m.removeMin(),k=b[w],k.distance!==Number.POSITIVE_INFINITY);)p(w).forEach(P);return b}return WN}var JN,uF;function Tge(){if(uF)return JN;uF=1;var t=sF(),r=Su();JN=a;function a(s,c,f){return r.transform(s.nodes(),function(h,d){h[d]=t(s,d,c,f)},{})}return JN}var XN,cF;function lF(){if(cF)return XN;cF=1;var t=Su();XN=r;function r(a){var s=0,c=[],f={},h=[];function d(p){var b=f[p]={onStack:!0,lowlink:s,index:s++};if(c.push(p),a.successors(p).forEach(function(k){t.has(f,k)?f[k].onStack&&(b.lowlink=Math.min(b.lowlink,f[k].index)):(d(k),b.lowlink=Math.min(b.lowlink,f[k].lowlink))}),b.lowlink===b.index){var m=[],w;do w=c.pop(),f[w].onStack=!1,m.push(w);while(p!==w);h.push(m)}}return a.nodes().forEach(function(p){t.has(f,p)||d(p)}),h}return XN}var eT,fF;function Mge(){if(fF)return eT;fF=1;var t=Su(),r=lF();eT=a;function a(s){return t.filter(r(s),function(c){return c.length>1||c.length===1&&s.hasEdge(c[0],c[0])})}return eT}var tT,hF;function jge(){if(hF)return tT;hF=1;var t=Su();tT=a;var r=t.constant(1);function a(c,f,h){return s(c,f||r,h||function(d){return c.outEdges(d)})}function s(c,f,h){var d={},p=c.nodes();return p.forEach(function(b){d[b]={},d[b][b]={distance:0},p.forEach(function(m){b!==m&&(d[b][m]={distance:Number.POSITIVE_INFINITY})}),h(b).forEach(function(m){var w=m.v===b?m.w:m.v,k=f(m);d[b][w]={distance:k,predecessor:b}})}),p.forEach(function(b){var m=d[b];p.forEach(function(w){var k=d[w];p.forEach(function(P){var S=k[b],M=m[P],L=k[P],T=S.distance+M.distance;T<L.distance&&(L.distance=T,L.predecessor=M.predecessor)})})}),d}return tT}var nT,dF;function pF(){if(dF)return nT;dF=1;var t=Su();nT=r,r.CycleException=a;function r(s){var c={},f={},h=[];function d(p){if(t.has(f,p))throw new a;t.has(c,p)||(f[p]=!0,c[p]=!0,t.each(s.predecessors(p),d),delete f[p],h.push(p))}if(t.each(s.sinks(),d),t.size(c)!==s.nodeCount())throw new a;return h}function a(){}return a.prototype=new Error,nT}var rT,gF;function Age(){if(gF)return rT;gF=1;var t=pF();rT=r;function r(a){try{t(a)}catch(s){if(s instanceof t.CycleException)return!1;throw s}return!0}return rT}var iT,bF;function vF(){if(bF)return iT;bF=1;var t=Su();iT=r;function r(s,c,f){t.isArray(c)||(c=[c]);var h=(s.isDirected()?s.successors:s.neighbors).bind(s),d=[],p={};return t.each(c,function(b){if(!s.hasNode(b))throw new Error("Graph does not have node: "+b);a(s,b,f==="post",p,h,d)}),d}function a(s,c,f,h,d,p){t.has(h,c)||(h[c]=!0,f||p.push(c),t.each(d(c),function(b){a(s,b,f,h,d,p)}),f&&p.push(c))}return iT}var aT,yF;function Ige(){if(yF)return aT;yF=1;var t=vF();aT=r;function r(a,s){return t(a,s,"post")}return aT}var oT,mF;function Lge(){if(mF)return oT;mF=1;var t=vF();oT=r;function r(a,s){return t(a,s,"pre")}return oT}var sT,wF;function Oge(){if(wF)return sT;wF=1;var t=Su(),r=ZN(),a=aF();sT=s;function s(c,f){var h=new r,d={},p=new a,b;function m(k){var P=k.v===b?k.w:k.v,S=p.priority(P);if(S!==void 0){var M=f(k);M<S&&(d[P]=b,p.decrease(P,M))}}if(c.nodeCount()===0)return h;t.each(c.nodes(),function(k){p.add(k,Number.POSITIVE_INFINITY),h.setNode(k)}),p.decrease(c.nodes()[0],0);for(var w=!1;p.size()>0;){if(b=p.removeMin(),t.has(d,b))h.setEdge(b,d[b]);else{if(w)throw new Error("Input graph is not connected: "+c);w=!0}c.nodeEdges(b).forEach(m)}return h}return sT}var xF,kF;function Dge(){return kF||(kF=1,xF={components:Nge(),dijkstra:sF(),dijkstraAll:Tge(),findCycles:Mge(),floydWarshall:jge(),isAcyclic:Age(),postorder:Ige(),preorder:Lge(),prim:Oge(),tarjan:lF(),topsort:pF()}),xF}var uT,_F;function Bge(){if(_F)return uT;_F=1;var t=Pge();return uT={Graph:t.Graph,json:Sge(),alg:Dge(),version:t.version},uT}var cT,EF;function ic(){if(EF)return cT;EF=1;var t;if(typeof t5=="function")try{t=Bge()}catch{}return t||(t=window.graphlib),cT=t,cT}var lT,CF;function Rge(){if(CF)return lT;CF=1;var t=VH(),r=1,a=4;function s(c){return t(c,r|a)}return lT=s,lT}var fT,PF;function o2(){if(PF)return fT;PF=1;var t=Fg(),r=sf(),a=Kw(),s=Pu();function c(f,h,d){if(!s(d))return!1;var p=typeof h;return(p=="number"?r(d)&&a(h,d.length):p=="string"&&h in d)?t(d[h],f):!1}return fT=c,fT}var hT,SF;function Gge(){if(SF)return hT;SF=1;var t=a2(),r=Fg(),a=o2(),s=Wd(),c=Object.prototype,f=c.hasOwnProperty,h=t(function(d,p){d=Object(d);var b=-1,m=p.length,w=m>2?p[2]:void 0;for(w&&a(p[0],p[1],w)&&(m=1);++b<m;)for(var k=p[b],P=s(k),S=-1,M=P.length;++S<M;){var L=P[S],T=d[L];(T===void 0||r(T,c[L])&&!f.call(d,L))&&(d[L]=k[L])}return d});return hT=h,hT}var dT,NF;function Hge(){if(NF)return dT;NF=1;var t=uf(),r=sf(),a=Eh();function s(c){return function(f,h,d){var p=Object(f);if(!r(f)){var b=t(h,3);f=a(f),h=function(w){return b(p[w],w,p)}}var m=c(f,h,d);return m>-1?p[b?f[m]:m]:void 0}}return dT=s,dT}var pT,TF;function zge(){if(TF)return pT;TF=1;var t=/\s/;function r(a){for(var s=a.length;s--&&t.test(a.charAt(s)););return s}return pT=r,pT}var gT,MF;function Uge(){if(MF)return gT;MF=1;var t=zge(),r=/^\s+/;function a(s){return s&&s.slice(0,t(s)+1).replace(r,"")}return gT=a,gT}var bT,jF;function Fge(){if(jF)return bT;jF=1;var t=Uge(),r=Pu(),a=Zg(),s=NaN,c=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt;function p(b){if(typeof b=="number")return b;if(a(b))return s;if(r(b)){var m=typeof b.valueOf=="function"?b.valueOf():b;b=r(m)?m+"":m}if(typeof b!="string")return b===0?b:+b;b=t(b);var w=f.test(b);return w||h.test(b)?d(b.slice(2),w?2:8):c.test(b)?s:+b}return bT=p,bT}var vT,AF;function IF(){if(AF)return vT;AF=1;var t=Fge(),r=1/0,a=17976931348623157e292;function s(c){if(!c)return c===0?c:0;if(c=t(c),c===r||c===-r){var f=c<0?-1:1;return f*a}return c===c?c:0}return vT=s,vT}var yT,LF;function Yge(){if(LF)return yT;LF=1;var t=IF();function r(a){var s=t(a),c=s%1;return s===s?c?s-c:s:0}return yT=r,yT}var mT,OF;function Vge(){if(OF)return mT;OF=1;var t=OU(),r=uf(),a=Yge(),s=Math.max;function c(f,h,d){var p=f==null?0:f.length;if(!p)return-1;var b=d==null?0:a(d);return b<0&&(b=s(p+b,0)),t(f,r(h,3),b)}return mT=c,mT}var wT,DF;function qge(){if(DF)return wT;DF=1;var t=Hge(),r=Vge(),a=t(r);return wT=a,wT}var xT,BF;function RF(){if(BF)return xT;BF=1;var t=CN();function r(a){var s=a==null?0:a.length;return s?t(a,1):[]}return xT=r,xT}var kT,GF;function Zge(){if(GF)return kT;GF=1;var t=h4(),r=tz(),a=Wd();function s(c,f){return c==null?c:t(c,r(f),a)}return kT=s,kT}var _T,HF;function $ge(){if(HF)return _T;HF=1;function t(r){var a=r==null?0:r.length;return a?r[a-1]:void 0}return _T=t,_T}var ET,zF;function Kge(){if(zF)return ET;zF=1;var t=qw(),r=p4(),a=uf();function s(c,f){var h={};return f=a(f,3),r(c,function(d,p,b){t(h,p,f(d,p,b))}),h}return ET=s,ET}var CT,UF;function PT(){if(UF)return CT;UF=1;var t=Zg();function r(a,s,c){for(var f=-1,h=a.length;++f<h;){var d=a[f],p=s(d);if(p!=null&&(b===void 0?p===p&&!t(p):c(p,b)))var b=p,m=d}return m}return CT=r,CT}var ST,FF;function Qge(){if(FF)return ST;FF=1;function t(r,a){return r>a}return ST=t,ST}var NT,YF;function Wge(){if(YF)return NT;YF=1;var t=PT(),r=Qge(),a=Jd();function s(c){return c&&c.length?t(c,a,r):void 0}return NT=s,NT}var TT,VF;function qF(){if(VF)return TT;VF=1;var t=qw(),r=Fg();function a(s,c,f){(f!==void 0&&!r(s[c],f)||f===void 0&&!(c in s))&&t(s,c,f)}return TT=a,TT}var MT,ZF;function Jge(){if(ZF)return MT;ZF=1;var t=Kd(),r=e2(),a=el(),s="[object Object]",c=Function.prototype,f=Object.prototype,h=c.toString,d=f.hasOwnProperty,p=h.call(Object);function b(m){if(!a(m)||t(m)!=s)return!1;var w=r(m);if(w===null)return!0;var k=d.call(w,"constructor")&&w.constructor;return typeof k=="function"&&k instanceof k&&h.call(k)==p}return MT=b,MT}var jT,$F;function KF(){if($F)return jT;$F=1;function t(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}return jT=t,jT}var AT,QF;function Xge(){if(QF)return AT;QF=1;var t=L0(),r=Wd();function a(s){return t(s,r(s))}return AT=a,AT}var IT,WF;function ebe(){if(WF)return IT;WF=1;var t=qF(),r=tH(),a=LH(),s=rH(),c=GH(),f=O0(),h=xa(),d=VU(),p=Vg(),b=I0(),m=Pu(),w=Jge(),k=D0(),P=KF(),S=Xge();function M(L,T,j,I,D,R,Y){var G=P(L,j),U=P(T,j),z=Y.get(U);if(z){t(L,j,z);return}var Q=R?R(G,U,j+"",L,T,Y):void 0,$=Q===void 0;if($){var Z=h(U),X=!Z&&p(U),K=!Z&&!X&&k(U);Q=U,Z||X||K?h(G)?Q=G:d(G)?Q=s(G):X?($=!1,Q=r(U,!0)):K?($=!1,Q=a(U,!0)):Q=[]:w(U)||f(U)?(Q=G,f(G)?Q=S(G):(!m(G)||b(G))&&(Q=c(U))):$=!1}$&&(Y.set(U,Q),D(Q,U,I,R,Y),Y.delete(U)),t(L,j,Q)}return IT=M,IT}var LT,JF;function tbe(){if(JF)return LT;JF=1;var t=Vw(),r=qF(),a=h4(),s=ebe(),c=Pu(),f=Wd(),h=KF();function d(p,b,m,w,k){p!==b&&a(b,function(P,S){if(k||(k=new t),c(P))s(p,b,S,m,d,w,k);else{var M=w?w(h(p,S),P,S+"",p,b,k):void 0;M===void 0&&(M=P),r(p,S,M)}},f)}return LT=d,LT}var OT,XF;function nbe(){if(XF)return OT;XF=1;var t=a2(),r=o2();function a(s){return t(function(c,f){var h=-1,d=f.length,p=d>1?f[d-1]:void 0,b=d>2?f[2]:void 0;for(p=s.length>3&&typeof p=="function"?(d--,p):void 0,b&&r(f[0],f[1],b)&&(p=d<3?void 0:p,d=1),c=Object(c);++h<d;){var m=f[h];m&&s(c,m,h,p)}return c})}return OT=a,OT}var DT,eY;function rbe(){if(eY)return DT;eY=1;var t=tbe(),r=nbe(),a=r(function(s,c,f){t(s,c,f)});return DT=a,DT}var BT,tY;function nY(){if(tY)return BT;tY=1;function t(r,a){return r<a}return BT=t,BT}var RT,rY;function ibe(){if(rY)return RT;rY=1;var t=PT(),r=nY(),a=Jd();function s(c){return c&&c.length?t(c,a,r):void 0}return RT=s,RT}var GT,iY;function abe(){if(iY)return GT;iY=1;var t=PT(),r=uf(),a=nY();function s(c,f){return c&&c.length?t(c,r(f,2),a):void 0}return GT=s,GT}var HT,aY;function obe(){if(aY)return HT;aY=1;var t=rc(),r=function(){return t.Date.now()};return HT=r,HT}var zT,oY;function sbe(){if(oY)return zT;oY=1;var t=Zw(),r=r2(),a=Kw(),s=Pu(),c=B0();function f(h,d,p,b){if(!s(h))return h;d=r(d,h);for(var m=-1,w=d.length,k=w-1,P=h;P!=null&&++m<w;){var S=c(d[m]),M=p;if(S==="__proto__"||S==="constructor"||S==="prototype")return h;if(m!=k){var L=P[S];M=b?b(L,S,P):void 0,M===void 0&&(M=s(L)?L:a(d[m+1])?[]:{})}t(P,S,M),P=P[S]}return h}return zT=f,zT}var UT,sY;function ube(){if(sY)return UT;sY=1;var t=i2(),r=sbe(),a=r2();function s(c,f,h){for(var d=-1,p=f.length,b={};++d<p;){var m=f[d],w=t(c,m);h(w,m)&&r(b,a(m,c),w)}return b}return UT=s,UT}var FT,uY;function cbe(){if(uY)return FT;uY=1;var t=ube(),r=$z();function a(s,c){return t(s,c,function(f,h){return r(s,h)})}return FT=a,FT}var YT,cY;function lbe(){if(cY)return YT;cY=1;var t=RF(),r=NU(),a=AU();function s(c){return a(r(c,void 0,t),c+"")}return YT=s,YT}var VT,lY;function fbe(){if(lY)return VT;lY=1;var t=cbe(),r=lbe(),a=r(function(s,c){return s==null?{}:t(s,c)});return VT=a,VT}var qT,fY;function hbe(){if(fY)return qT;fY=1;var t=Math.ceil,r=Math.max;function a(s,c,f,h){for(var d=-1,p=r(t((c-s)/(f||1)),0),b=Array(p);p--;)b[h?p:++d]=s,s+=f;return b}return qT=a,qT}var ZT,hY;function dbe(){if(hY)return ZT;hY=1;var t=hbe(),r=o2(),a=IF();function s(c){return function(f,h,d){return d&&typeof d!="number"&&r(f,h,d)&&(h=d=void 0),f=a(f),h===void 0?(h=f,f=0):h=a(h),d=d===void 0?f<h?1:-1:a(d),t(f,h,d,c)}}return ZT=s,ZT}var $T,dY;function pbe(){if(dY)return $T;dY=1;var t=dbe(),r=t();return $T=r,$T}var KT,pY;function gbe(){if(pY)return KT;pY=1;function t(r,a){var s=r.length;for(r.sort(a);s--;)r[s]=r[s].value;return r}return KT=t,KT}var QT,gY;function bbe(){if(gY)return QT;gY=1;var t=Zg();function r(a,s){if(a!==s){var c=a!==void 0,f=a===null,h=a===a,d=t(a),p=s!==void 0,b=s===null,m=s===s,w=t(s);if(!b&&!w&&!d&&a>s||d&&p&&m&&!b&&!w||f&&p&&m||!c&&m||!h)return 1;if(!f&&!d&&!w&&a<s||w&&c&&h&&!f&&!d||b&&c&&h||!p&&h||!m)return-1}return 0}return QT=r,QT}var WT,bY;function vbe(){if(bY)return WT;bY=1;var t=bbe();function r(a,s,c){for(var f=-1,h=a.criteria,d=s.criteria,p=h.length,b=c.length;++f<p;){var m=t(h[f],d[f]);if(m){if(f>=b)return m;var w=c[f];return m*(w=="desc"?-1:1)}}return a.index-s.index}return WT=r,WT}var JT,vY;function ybe(){if(vY)return JT;vY=1;var t=n2(),r=i2(),a=uf(),s=lU(),c=gbe(),f=Qw(),h=vbe(),d=Jd(),p=xa();function b(m,w,k){w.length?w=t(w,function(M){return p(M)?function(L){return r(L,M.length===1?M[0]:M)}:M}):w=[d];var P=-1;w=t(w,f(a));var S=s(m,function(M,L,T){var j=t(w,function(I){return I(M)});return{criteria:j,index:++P,value:M}});return c(S,function(M,L){return h(M,L,k)})}return JT=b,JT}var XT,yY;function mbe(){if(yY)return XT;yY=1;var t=CN(),r=ybe(),a=a2(),s=o2(),c=a(function(f,h){if(f==null)return[];var d=h.length;return d>1&&s(f,h[0],h[1])?h=[]:d>2&&s(h[0],h[1],h[2])&&(h=[h[0]]),r(f,t(h,1),[])});return XT=c,XT}var eM,mY;function wbe(){if(mY)return eM;mY=1;var t=Gz(),r=0;function a(s){var c=++r;return t(s)+c}return eM=a,eM}var tM,wY;function xbe(){if(wY)return tM;wY=1;function t(r,a,s){for(var c=-1,f=r.length,h=a.length,d={};++c<f;){var p=c<h?a[c]:void 0;s(d,r[c],p)}return d}return tM=t,tM}var nM,xY;function kbe(){if(xY)return nM;xY=1;var t=Zw(),r=xbe();function a(s,c){return r(s||[],c||[],t)}return nM=a,nM}var rM,kY;function Ei(){if(kY)return rM;kY=1;var t;if(typeof t5=="function")try{t={cloneDeep:Rge(),constant:c4(),defaults:Gge(),each:oz(),filter:nU(),find:qge(),flatten:RF(),forEach:rz(),forIn:Zge(),has:aU(),isUndefined:uU(),last:$ge(),map:hU(),mapValues:Kge(),max:Wge(),merge:rbe(),min:ibe(),minBy:abe(),now:obe(),pick:fbe(),range:pbe(),reduce:bU(),sortBy:mbe(),uniqueId:wbe(),values:KU(),zipObject:kbe()}}catch{}return t||(t=window._),rM=t,rM}var iM,_Y;function _be(){if(_Y)return iM;_Y=1,iM=t;function t(){var s={};s._next=s._prev=s,this._sentinel=s}t.prototype.dequeue=function(){var s=this._sentinel,c=s._prev;if(c!==s)return r(c),c},t.prototype.enqueue=function(s){var c=this._sentinel;s._prev&&s._next&&r(s),s._next=c._next,c._next._prev=s,c._next=s,s._prev=c},t.prototype.toString=function(){for(var s=[],c=this._sentinel,f=c._prev;f!==c;)s.push(JSON.stringify(f,a)),f=f._prev;return"["+s.join(", ")+"]"};function r(s){s._prev._next=s._next,s._next._prev=s._prev,delete s._next,delete s._prev}function a(s,c){if(s!=="_next"&&s!=="_prev")return c}return iM}var aM,EY;function Ebe(){if(EY)return aM;EY=1;var t=Ei(),r=ic().Graph,a=_be();aM=c;var s=t.constant(1);function c(b,m){if(b.nodeCount()<=1)return[];var w=d(b,m||s),k=f(w.graph,w.buckets,w.zeroIdx);return t.flatten(t.map(k,function(P){return b.outEdges(P.v,P.w)}),!0)}function f(b,m,w){for(var k=[],P=m[m.length-1],S=m[0],M;b.nodeCount();){for(;M=S.dequeue();)h(b,m,w,M);for(;M=P.dequeue();)h(b,m,w,M);if(b.nodeCount()){for(var L=m.length-2;L>0;--L)if(M=m[L].dequeue(),M){k=k.concat(h(b,m,w,M,!0));break}}}return k}function h(b,m,w,k,P){var S=P?[]:void 0;return t.forEach(b.inEdges(k.v),function(M){var L=b.edge(M),T=b.node(M.v);P&&S.push({v:M.v,w:M.w}),T.out-=L,p(m,w,T)}),t.forEach(b.outEdges(k.v),function(M){var L=b.edge(M),T=M.w,j=b.node(T);j.in-=L,p(m,w,j)}),b.removeNode(k.v),S}function d(b,m){var w=new r,k=0,P=0;t.forEach(b.nodes(),function(L){w.setNode(L,{v:L,in:0,out:0})}),t.forEach(b.edges(),function(L){var T=w.edge(L.v,L.w)||0,j=m(L),I=T+j;w.setEdge(L.v,L.w,I),P=Math.max(P,w.node(L.v).out+=j),k=Math.max(k,w.node(L.w).in+=j)});var S=t.range(P+k+3).map(function(){return new a}),M=k+1;return t.forEach(w.nodes(),function(L){p(S,M,w.node(L))}),{graph:w,buckets:S,zeroIdx:M}}function p(b,m,w){w.out?w.in?b[w.out-w.in+m].enqueue(w):b[b.length-1].enqueue(w):b[0].enqueue(w)}return aM}var oM,CY;function Cbe(){if(CY)return oM;CY=1;var t=Ei(),r=Ebe();oM={run:a,undo:c};function a(f){var h=f.graph().acyclicer==="greedy"?r(f,d(f)):s(f);t.forEach(h,function(p){var b=f.edge(p);f.removeEdge(p),b.forwardName=p.name,b.reversed=!0,f.setEdge(p.w,p.v,b,t.uniqueId("rev"))});function d(p){return function(b){return p.edge(b).weight}}}function s(f){var h=[],d={},p={};function b(m){t.has(p,m)||(p[m]=!0,d[m]=!0,t.forEach(f.outEdges(m),function(w){t.has(d,w.w)?h.push(w):b(w.w)}),delete d[m])}return t.forEach(f.nodes(),b),h}function c(f){t.forEach(f.edges(),function(h){var d=f.edge(h);if(d.reversed){f.removeEdge(h);var p=d.forwardName;delete d.reversed,delete d.forwardName,f.setEdge(h.w,h.v,d,p)}})}return oM}var sM,PY;function js(){if(PY)return sM;PY=1;var t=Ei(),r=ic().Graph;sM={addDummyNode:a,simplify:s,asNonCompoundGraph:c,successorWeights:f,predecessorWeights:h,intersectRect:d,buildLayerMatrix:p,normalizeRanks:b,removeEmptyRanks:m,addBorderNode:w,maxRank:k,partition:P,time:S,notime:M};function a(L,T,j,I){var D;do D=t.uniqueId(I);while(L.hasNode(D));return j.dummy=T,L.setNode(D,j),D}function s(L){var T=new r().setGraph(L.graph());return t.forEach(L.nodes(),function(j){T.setNode(j,L.node(j))}),t.forEach(L.edges(),function(j){var I=T.edge(j.v,j.w)||{weight:0,minlen:1},D=L.edge(j);T.setEdge(j.v,j.w,{weight:I.weight+D.weight,minlen:Math.max(I.minlen,D.minlen)})}),T}function c(L){var T=new r({multigraph:L.isMultigraph()}).setGraph(L.graph());return t.forEach(L.nodes(),function(j){L.children(j).length||T.setNode(j,L.node(j))}),t.forEach(L.edges(),function(j){T.setEdge(j,L.edge(j))}),T}function f(L){var T=t.map(L.nodes(),function(j){var I={};return t.forEach(L.outEdges(j),function(D){I[D.w]=(I[D.w]||0)+L.edge(D).weight}),I});return t.zipObject(L.nodes(),T)}function h(L){var T=t.map(L.nodes(),function(j){var I={};return t.forEach(L.inEdges(j),function(D){I[D.v]=(I[D.v]||0)+L.edge(D).weight}),I});return t.zipObject(L.nodes(),T)}function d(L,T){var j=L.x,I=L.y,D=T.x-j,R=T.y-I,Y=L.width/2,G=L.height/2;if(!D&&!R)throw new Error("Not possible to find intersection inside of the rectangle");var U,z;return Math.abs(R)*Y>Math.abs(D)*G?(R<0&&(G=-G),U=G*D/R,z=G):(D<0&&(Y=-Y),U=Y,z=Y*R/D),{x:j+U,y:I+z}}function p(L){var T=t.map(t.range(k(L)+1),function(){return[]});return t.forEach(L.nodes(),function(j){var I=L.node(j),D=I.rank;t.isUndefined(D)||(T[D][I.order]=j)}),T}function b(L){var T=t.min(t.map(L.nodes(),function(j){return L.node(j).rank}));t.forEach(L.nodes(),function(j){var I=L.node(j);t.has(I,"rank")&&(I.rank-=T)})}function m(L){var T=t.min(t.map(L.nodes(),function(R){return L.node(R).rank})),j=[];t.forEach(L.nodes(),function(R){var Y=L.node(R).rank-T;j[Y]||(j[Y]=[]),j[Y].push(R)});var I=0,D=L.graph().nodeRankFactor;t.forEach(j,function(R,Y){t.isUndefined(R)&&Y%D!==0?--I:I&&t.forEach(R,function(G){L.node(G).rank+=I})})}function w(L,T,j,I){var D={width:0,height:0};return arguments.length>=4&&(D.rank=j,D.order=I),a(L,"border",D,T)}function k(L){return t.max(t.map(L.nodes(),function(T){var j=L.node(T).rank;if(!t.isUndefined(j))return j}))}function P(L,T){var j={lhs:[],rhs:[]};return t.forEach(L,function(I){T(I)?j.lhs.push(I):j.rhs.push(I)}),j}function S(L,T){var j=t.now();try{return T()}finally{console.log(L+" time: "+(t.now()-j)+"ms")}}function M(L,T){return T()}return sM}var uM,SY;function Pbe(){if(SY)return uM;SY=1;var t=Ei(),r=js();uM={run:a,undo:c};function a(f){f.graph().dummyChains=[],t.forEach(f.edges(),function(h){s(f,h)})}function s(f,h){var d=h.v,p=f.node(d).rank,b=h.w,m=f.node(b).rank,w=h.name,k=f.edge(h),P=k.labelRank;if(m!==p+1){f.removeEdge(h);var S,M,L;for(L=0,++p;p<m;++L,++p)k.points=[],M={width:0,height:0,edgeLabel:k,edgeObj:h,rank:p},S=r.addDummyNode(f,"edge",M,"_d"),p===P&&(M.width=k.width,M.height=k.height,M.dummy="edge-label",M.labelpos=k.labelpos),f.setEdge(d,S,{weight:k.weight},w),L===0&&f.graph().dummyChains.push(S),d=S;f.setEdge(d,b,{weight:k.weight},w)}}function c(f){t.forEach(f.graph().dummyChains,function(h){var d=f.node(h),p=d.edgeLabel,b;for(f.setEdge(d.edgeObj,p);d.dummy;)b=f.successors(h)[0],f.removeNode(h),p.points.push({x:d.x,y:d.y}),d.dummy==="edge-label"&&(p.x=d.x,p.y=d.y,p.width=d.width,p.height=d.height),h=b,d=f.node(h)})}return uM}var cM,NY;function s2(){if(NY)return cM;NY=1;var t=Ei();cM={longestPath:r,slack:a};function r(s){var c={};function f(h){var d=s.node(h);if(t.has(c,h))return d.rank;c[h]=!0;var p=t.min(t.map(s.outEdges(h),function(b){return f(b.w)-s.edge(b).minlen}));return(p===Number.POSITIVE_INFINITY||p===void 0||p===null)&&(p=0),d.rank=p}t.forEach(s.sources(),f)}function a(s,c){return s.node(c.w).rank-s.node(c.v).rank-s.edge(c).minlen}return cM}var lM,TY;function MY(){if(TY)return lM;TY=1;var t=Ei(),r=ic().Graph,a=s2().slack;lM=s;function s(d){var p=new r({directed:!1}),b=d.nodes()[0],m=d.nodeCount();p.setNode(b,{});for(var w,k;c(p,d)<m;)w=f(p,d),k=p.hasNode(w.v)?a(d,w):-a(d,w),h(p,d,k);return p}function c(d,p){function b(m){t.forEach(p.nodeEdges(m),function(w){var k=w.v,P=m===k?w.w:k;!d.hasNode(P)&&!a(p,w)&&(d.setNode(P,{}),d.setEdge(m,P,{}),b(P))})}return t.forEach(d.nodes(),b),d.nodeCount()}function f(d,p){return t.minBy(p.edges(),function(b){if(d.hasNode(b.v)!==d.hasNode(b.w))return a(p,b)})}function h(d,p,b){t.forEach(d.nodes(),function(m){p.node(m).rank+=b})}return lM}var fM,jY;function Sbe(){if(jY)return fM;jY=1;var t=Ei(),r=MY(),a=s2().slack,s=s2().longestPath,c=ic().alg.preorder,f=ic().alg.postorder,h=js().simplify;fM=d,d.initLowLimValues=w,d.initCutValues=p,d.calcCutValue=m,d.leaveEdge=P,d.enterEdge=S,d.exchangeEdges=M;function d(I){I=h(I),s(I);var D=r(I);w(D),p(D,I);for(var R,Y;R=P(D);)Y=S(D,I,R),M(D,I,R,Y)}function p(I,D){var R=f(I,I.nodes());R=R.slice(0,R.length-1),t.forEach(R,function(Y){b(I,D,Y)})}function b(I,D,R){var Y=I.node(R),G=Y.parent;I.edge(R,G).cutvalue=m(I,D,R)}function m(I,D,R){var Y=I.node(R),G=Y.parent,U=!0,z=D.edge(R,G),Q=0;return z||(U=!1,z=D.edge(G,R)),Q=z.weight,t.forEach(D.nodeEdges(R),function($){var Z=$.v===R,X=Z?$.w:$.v;if(X!==G){var K=Z===U,ae=D.edge($).weight;if(Q+=K?ae:-ae,T(I,R,X)){var se=I.edge(R,X).cutvalue;Q+=K?-se:se}}}),Q}function w(I,D){arguments.length<2&&(D=I.nodes()[0]),k(I,{},1,D)}function k(I,D,R,Y,G){var U=R,z=I.node(Y);return D[Y]=!0,t.forEach(I.neighbors(Y),function(Q){t.has(D,Q)||(R=k(I,D,R,Q,Y))}),z.low=U,z.lim=R++,G?z.parent=G:delete z.parent,R}function P(I){return t.find(I.edges(),function(D){return I.edge(D).cutvalue<0})}function S(I,D,R){var Y=R.v,G=R.w;D.hasEdge(Y,G)||(Y=R.w,G=R.v);var U=I.node(Y),z=I.node(G),Q=U,$=!1;U.lim>z.lim&&(Q=z,$=!0);var Z=t.filter(D.edges(),function(X){return $===j(I,I.node(X.v),Q)&&$!==j(I,I.node(X.w),Q)});return t.minBy(Z,function(X){return a(D,X)})}function M(I,D,R,Y){var G=R.v,U=R.w;I.removeEdge(G,U),I.setEdge(Y.v,Y.w,{}),w(I),p(I,D),L(I,D)}function L(I,D){var R=t.find(I.nodes(),function(G){return!D.node(G).parent}),Y=c(I,R);Y=Y.slice(1),t.forEach(Y,function(G){var U=I.node(G).parent,z=D.edge(G,U),Q=!1;z||(z=D.edge(U,G),Q=!0),D.node(G).rank=D.node(U).rank+(Q?z.minlen:-z.minlen)})}function T(I,D,R){return I.hasEdge(D,R)}function j(I,D,R){return R.low<=D.lim&&D.lim<=R.lim}return fM}var hM,AY;function Nbe(){if(AY)return hM;AY=1;var t=s2(),r=t.longestPath,a=MY(),s=Sbe();hM=c;function c(p){switch(p.graph().ranker){case"network-simplex":d(p);break;case"tight-tree":h(p);break;case"longest-path":f(p);break;default:d(p)}}var f=r;function h(p){r(p),a(p)}function d(p){s(p)}return hM}var dM,IY;function Tbe(){if(IY)return dM;IY=1;var t=Ei();dM=r;function r(c){var f=s(c);t.forEach(c.graph().dummyChains,function(h){for(var d=c.node(h),p=d.edgeObj,b=a(c,f,p.v,p.w),m=b.path,w=b.lca,k=0,P=m[k],S=!0;h!==p.w;){if(d=c.node(h),S){for(;(P=m[k])!==w&&c.node(P).maxRank<d.rank;)k++;P===w&&(S=!1)}if(!S){for(;k<m.length-1&&c.node(P=m[k+1]).minRank<=d.rank;)k++;P=m[k]}c.setParent(h,P),h=c.successors(h)[0]}})}function a(c,f,h,d){var p=[],b=[],m=Math.min(f[h].low,f[d].low),w=Math.max(f[h].lim,f[d].lim),k,P;k=h;do k=c.parent(k),p.push(k);while(k&&(f[k].low>m||w>f[k].lim));for(P=k,k=d;(k=c.parent(k))!==P;)b.push(k);return{path:p.concat(b.reverse()),lca:P}}function s(c){var f={},h=0;function d(p){var b=h;t.forEach(c.children(p),d),f[p]={low:b,lim:h++}}return t.forEach(c.children(),d),f}return dM}var pM,LY;function Mbe(){if(LY)return pM;LY=1;var t=Ei(),r=js();pM={run:a,cleanup:h};function a(d){var p=r.addDummyNode(d,"root",{},"_root"),b=c(d),m=t.max(t.values(b))-1,w=2*m+1;d.graph().nestingRoot=p,t.forEach(d.edges(),function(P){d.edge(P).minlen*=w});var k=f(d)+1;t.forEach(d.children(),function(P){s(d,p,w,k,m,b,P)}),d.graph().nodeRankFactor=w}function s(d,p,b,m,w,k,P){var S=d.children(P);if(!S.length){P!==p&&d.setEdge(p,P,{weight:0,minlen:b});return}var M=r.addBorderNode(d,"_bt"),L=r.addBorderNode(d,"_bb"),T=d.node(P);d.setParent(M,P),T.borderTop=M,d.setParent(L,P),T.borderBottom=L,t.forEach(S,function(j){s(d,p,b,m,w,k,j);var I=d.node(j),D=I.borderTop?I.borderTop:j,R=I.borderBottom?I.borderBottom:j,Y=I.borderTop?m:2*m,G=D!==R?1:w-k[P]+1;d.setEdge(M,D,{weight:Y,minlen:G,nestingEdge:!0}),d.setEdge(R,L,{weight:Y,minlen:G,nestingEdge:!0})}),d.parent(P)||d.setEdge(p,M,{weight:0,minlen:w+k[P]})}function c(d){var p={};function b(m,w){var k=d.children(m);k&&k.length&&t.forEach(k,function(P){b(P,w+1)}),p[m]=w}return t.forEach(d.children(),function(m){b(m,1)}),p}function f(d){return t.reduce(d.edges(),function(p,b){return p+d.edge(b).weight},0)}function h(d){var p=d.graph();d.removeNode(p.nestingRoot),delete p.nestingRoot,t.forEach(d.edges(),function(b){var m=d.edge(b);m.nestingEdge&&d.removeEdge(b)})}return pM}var gM,OY;function jbe(){if(OY)return gM;OY=1;var t=Ei(),r=js();gM=a;function a(c){function f(h){var d=c.children(h),p=c.node(h);if(d.length&&t.forEach(d,f),t.has(p,"minRank")){p.borderLeft=[],p.borderRight=[];for(var b=p.minRank,m=p.maxRank+1;b<m;++b)s(c,"borderLeft","_bl",h,p,b),s(c,"borderRight","_br",h,p,b)}}t.forEach(c.children(),f)}function s(c,f,h,d,p,b){var m={width:0,height:0,rank:b,borderType:f},w=p[f][b-1],k=r.addDummyNode(c,"border",m,h);p[f][b]=k,c.setParent(k,d),w&&c.setEdge(w,k,{weight:1})}return gM}var bM,DY;function Abe(){if(DY)return bM;DY=1;var t=Ei();bM={adjust:r,undo:a};function r(b){var m=b.graph().rankdir.toLowerCase();(m==="lr"||m==="rl")&&s(b)}function a(b){var m=b.graph().rankdir.toLowerCase();(m==="bt"||m==="rl")&&f(b),(m==="lr"||m==="rl")&&(d(b),s(b))}function s(b){t.forEach(b.nodes(),function(m){c(b.node(m))}),t.forEach(b.edges(),function(m){c(b.edge(m))})}function c(b){var m=b.width;b.width=b.height,b.height=m}function f(b){t.forEach(b.nodes(),function(m){h(b.node(m))}),t.forEach(b.edges(),function(m){var w=b.edge(m);t.forEach(w.points,h),t.has(w,"y")&&h(w)})}function h(b){b.y=-b.y}function d(b){t.forEach(b.nodes(),function(m){p(b.node(m))}),t.forEach(b.edges(),function(m){var w=b.edge(m);t.forEach(w.points,p),t.has(w,"x")&&p(w)})}function p(b){var m=b.x;b.x=b.y,b.y=m}return bM}var vM,BY;function Ibe(){if(BY)return vM;BY=1;var t=Ei();vM=r;function r(a){var s={},c=t.filter(a.nodes(),function(b){return!a.children(b).length}),f=t.max(t.map(c,function(b){return a.node(b).rank})),h=t.map(t.range(f+1),function(){return[]});function d(b){if(!t.has(s,b)){s[b]=!0;var m=a.node(b);h[m.rank].push(b),t.forEach(a.successors(b),d)}}var p=t.sortBy(c,function(b){return a.node(b).rank});return t.forEach(p,d),h}return vM}var yM,RY;function Lbe(){if(RY)return yM;RY=1;var t=Ei();yM=r;function r(s,c){for(var f=0,h=1;h<c.length;++h)f+=a(s,c[h-1],c[h]);return f}function a(s,c,f){for(var h=t.zipObject(f,t.map(f,function(k,P){return P})),d=t.flatten(t.map(c,function(k){return t.sortBy(t.map(s.outEdges(k),function(P){return{pos:h[P.w],weight:s.edge(P).weight}}),"pos")}),!0),p=1;p<f.length;)p<<=1;var b=2*p-1;p-=1;var m=t.map(new Array(b),function(){return 0}),w=0;return t.forEach(d.forEach(function(k){var P=k.pos+p;m[P]+=k.weight;for(var S=0;P>0;)P%2&&(S+=m[P+1]),P=P-1>>1,m[P]+=k.weight;w+=k.weight*S})),w}return yM}var mM,GY;function Obe(){if(GY)return mM;GY=1;var t=Ei();mM=r;function r(a,s){return t.map(s,function(c){var f=a.inEdges(c);if(f.length){var h=t.reduce(f,function(d,p){var b=a.edge(p),m=a.node(p.v);return{sum:d.sum+b.weight*m.order,weight:d.weight+b.weight}},{sum:0,weight:0});return{v:c,barycenter:h.sum/h.weight,weight:h.weight}}else return{v:c}})}return mM}var wM,HY;function Dbe(){if(HY)return wM;HY=1;var t=Ei();wM=r;function r(c,f){var h={};t.forEach(c,function(p,b){var m=h[p.v]={indegree:0,in:[],out:[],vs:[p.v],i:b};t.isUndefined(p.barycenter)||(m.barycenter=p.barycenter,m.weight=p.weight)}),t.forEach(f.edges(),function(p){var b=h[p.v],m=h[p.w];!t.isUndefined(b)&&!t.isUndefined(m)&&(m.indegree++,b.out.push(h[p.w]))});var d=t.filter(h,function(p){return!p.indegree});return a(d)}function a(c){var f=[];function h(b){return function(m){m.merged||(t.isUndefined(m.barycenter)||t.isUndefined(b.barycenter)||m.barycenter>=b.barycenter)&&s(b,m)}}function d(b){return function(m){m.in.push(b),--m.indegree===0&&c.push(m)}}for(;c.length;){var p=c.pop();f.push(p),t.forEach(p.in.reverse(),h(p)),t.forEach(p.out,d(p))}return t.map(t.filter(f,function(b){return!b.merged}),function(b){return t.pick(b,["vs","i","barycenter","weight"])})}function s(c,f){var h=0,d=0;c.weight&&(h+=c.barycenter*c.weight,d+=c.weight),f.weight&&(h+=f.barycenter*f.weight,d+=f.weight),c.vs=f.vs.concat(c.vs),c.barycenter=h/d,c.weight=d,c.i=Math.min(f.i,c.i),f.merged=!0}return wM}var xM,zY;function Bbe(){if(zY)return xM;zY=1;var t=Ei(),r=js();xM=a;function a(f,h){var d=r.partition(f,function(M){return t.has(M,"barycenter")}),p=d.lhs,b=t.sortBy(d.rhs,function(M){return-M.i}),m=[],w=0,k=0,P=0;p.sort(c(!!h)),P=s(m,b,P),t.forEach(p,function(M){P+=M.vs.length,m.push(M.vs),w+=M.barycenter*M.weight,k+=M.weight,P=s(m,b,P)});var S={vs:t.flatten(m,!0)};return k&&(S.barycenter=w/k,S.weight=k),S}function s(f,h,d){for(var p;h.length&&(p=t.last(h)).i<=d;)h.pop(),f.push(p.vs),d++;return d}function c(f){return function(h,d){return h.barycenter<d.barycenter?-1:h.barycenter>d.barycenter?1:f?d.i-h.i:h.i-d.i}}return xM}var kM,UY;function Rbe(){if(UY)return kM;UY=1;var t=Ei(),r=Obe(),a=Dbe(),s=Bbe();kM=c;function c(d,p,b,m){var w=d.children(p),k=d.node(p),P=k?k.borderLeft:void 0,S=k?k.borderRight:void 0,M={};P&&(w=t.filter(w,function(R){return R!==P&&R!==S}));var L=r(d,w);t.forEach(L,function(R){if(d.children(R.v).length){var Y=c(d,R.v,b,m);M[R.v]=Y,t.has(Y,"barycenter")&&h(R,Y)}});var T=a(L,b);f(T,M);var j=s(T,m);if(P&&(j.vs=t.flatten([P,j.vs,S],!0),d.predecessors(P).length)){var I=d.node(d.predecessors(P)[0]),D=d.node(d.predecessors(S)[0]);t.has(j,"barycenter")||(j.barycenter=0,j.weight=0),j.barycenter=(j.barycenter*j.weight+I.order+D.order)/(j.weight+2),j.weight+=2}return j}function f(d,p){t.forEach(d,function(b){b.vs=t.flatten(b.vs.map(function(m){return p[m]?p[m].vs:m}),!0)})}function h(d,p){t.isUndefined(d.barycenter)?(d.barycenter=p.barycenter,d.weight=p.weight):(d.barycenter=(d.barycenter*d.weight+p.barycenter*p.weight)/(d.weight+p.weight),d.weight+=p.weight)}return kM}var _M,FY;function Gbe(){if(FY)return _M;FY=1;var t=Ei(),r=ic().Graph;_M=a;function a(c,f,h){var d=s(c),p=new r({compound:!0}).setGraph({root:d}).setDefaultNodeLabel(function(b){return c.node(b)});return t.forEach(c.nodes(),function(b){var m=c.node(b),w=c.parent(b);(m.rank===f||m.minRank<=f&&f<=m.maxRank)&&(p.setNode(b),p.setParent(b,w||d),t.forEach(c[h](b),function(k){var P=k.v===b?k.w:k.v,S=p.edge(P,b),M=t.isUndefined(S)?0:S.weight;p.setEdge(P,b,{weight:c.edge(k).weight+M})}),t.has(m,"minRank")&&p.setNode(b,{borderLeft:m.borderLeft[f],borderRight:m.borderRight[f]}))}),p}function s(c){for(var f;c.hasNode(f=t.uniqueId("_root")););return f}return _M}var EM,YY;function Hbe(){if(YY)return EM;YY=1;var t=Ei();EM=r;function r(a,s,c){var f={},h;t.forEach(c,function(d){for(var p=a.parent(d),b,m;p;){if(b=a.parent(p),b?(m=f[b],f[b]=p):(m=h,h=p),m&&m!==p){s.setEdge(m,p);return}p=b}})}return EM}var CM,VY;function zbe(){if(VY)return CM;VY=1;var t=Ei(),r=Ibe(),a=Lbe(),s=Rbe(),c=Gbe(),f=Hbe(),h=ic().Graph,d=js();CM=p;function p(k){var P=d.maxRank(k),S=b(k,t.range(1,P+1),"inEdges"),M=b(k,t.range(P-1,-1,-1),"outEdges"),L=r(k);w(k,L);for(var T=Number.POSITIVE_INFINITY,j,I=0,D=0;D<4;++I,++D){m(I%2?S:M,I%4>=2),L=d.buildLayerMatrix(k);var R=a(k,L);R<T&&(D=0,j=t.cloneDeep(L),T=R)}w(k,j)}function b(k,P,S){return t.map(P,function(M){return c(k,M,S)})}function m(k,P){var S=new h;t.forEach(k,function(M){var L=M.graph().root,T=s(M,L,S,P);t.forEach(T.vs,function(j,I){M.node(j).order=I}),f(M,S,T.vs)})}function w(k,P){t.forEach(P,function(S){t.forEach(S,function(M,L){k.node(M).order=L})})}return CM}var PM,qY;function Ube(){if(qY)return PM;qY=1;var t=Ei(),r=ic().Graph,a=js();PM={positionX:S,findType1Conflicts:s,findType2Conflicts:c,addConflict:h,hasConflict:d,verticalAlignment:p,horizontalCompaction:b,alignCoordinates:k,findSmallestWidthAlignment:w,balance:P};function s(T,j){var I={};function D(R,Y){var G=0,U=0,z=R.length,Q=t.last(Y);return t.forEach(Y,function($,Z){var X=f(T,$),K=X?T.node(X).order:z;(X||$===Q)&&(t.forEach(Y.slice(U,Z+1),function(ae){t.forEach(T.predecessors(ae),function(se){var le=T.node(se),he=le.order;(he<G||K<he)&&!(le.dummy&&T.node(ae).dummy)&&h(I,se,ae)})}),U=Z+1,G=K)}),Y}return t.reduce(j,D),I}function c(T,j){var I={};function D(Y,G,U,z,Q){var $;t.forEach(t.range(G,U),function(Z){$=Y[Z],T.node($).dummy&&t.forEach(T.predecessors($),function(X){var K=T.node(X);K.dummy&&(K.order<z||K.order>Q)&&h(I,X,$)})})}function R(Y,G){var U=-1,z,Q=0;return t.forEach(G,function($,Z){if(T.node($).dummy==="border"){var X=T.predecessors($);X.length&&(z=T.node(X[0]).order,D(G,Q,Z,U,z),Q=Z,U=z)}D(G,Q,G.length,z,Y.length)}),G}return t.reduce(j,R),I}function f(T,j){if(T.node(j).dummy)return t.find(T.predecessors(j),function(I){return T.node(I).dummy})}function h(T,j,I){if(j>I){var D=j;j=I,I=D}var R=T[j];R||(T[j]=R={}),R[I]=!0}function d(T,j,I){if(j>I){var D=j;j=I,I=D}return t.has(T[j],I)}function p(T,j,I,D){var R={},Y={},G={};return t.forEach(j,function(U){t.forEach(U,function(z,Q){R[z]=z,Y[z]=z,G[z]=Q})}),t.forEach(j,function(U){var z=-1;t.forEach(U,function(Q){var $=D(Q);if($.length){$=t.sortBy($,function(se){return G[se]});for(var Z=($.length-1)/2,X=Math.floor(Z),K=Math.ceil(Z);X<=K;++X){var ae=$[X];Y[Q]===Q&&z<G[ae]&&!d(I,Q,ae)&&(Y[ae]=Q,Y[Q]=R[Q]=R[ae],z=G[ae])}}})}),{root:R,align:Y}}function b(T,j,I,D,R){var Y={},G=m(T,j,I,R),U=R?"borderLeft":"borderRight";function z(Z,X){for(var K=G.nodes(),ae=K.pop(),se={};ae;)se[ae]?Z(ae):(se[ae]=!0,K.push(ae),K=K.concat(X(ae))),ae=K.pop()}function Q(Z){Y[Z]=G.inEdges(Z).reduce(function(X,K){return Math.max(X,Y[K.v]+G.edge(K))},0)}function $(Z){var X=G.outEdges(Z).reduce(function(ae,se){return Math.min(ae,Y[se.w]-G.edge(se))},Number.POSITIVE_INFINITY),K=T.node(Z);X!==Number.POSITIVE_INFINITY&&K.borderType!==U&&(Y[Z]=Math.max(Y[Z],X))}return z(Q,G.predecessors.bind(G)),z($,G.successors.bind(G)),t.forEach(D,function(Z){Y[Z]=Y[I[Z]]}),Y}function m(T,j,I,D){var R=new r,Y=T.graph(),G=M(Y.nodesep,Y.edgesep,D);return t.forEach(j,function(U){var z;t.forEach(U,function(Q){var $=I[Q];if(R.setNode($),z){var Z=I[z],X=R.edge(Z,$);R.setEdge(Z,$,Math.max(G(T,Q,z),X||0))}z=Q})}),R}function w(T,j){return t.minBy(t.values(j),function(I){var D=Number.NEGATIVE_INFINITY,R=Number.POSITIVE_INFINITY;return t.forIn(I,function(Y,G){var U=L(T,G)/2;D=Math.max(Y+U,D),R=Math.min(Y-U,R)}),D-R})}function k(T,j){var I=t.values(j),D=t.min(I),R=t.max(I);t.forEach(["u","d"],function(Y){t.forEach(["l","r"],function(G){var U=Y+G,z=T[U],Q;if(z!==j){var $=t.values(z);Q=G==="l"?D-t.min($):R-t.max($),Q&&(T[U]=t.mapValues(z,function(Z){return Z+Q}))}})})}function P(T,j){return t.mapValues(T.ul,function(I,D){if(j)return T[j.toLowerCase()][D];var R=t.sortBy(t.map(T,D));return(R[1]+R[2])/2})}function S(T){var j=a.buildLayerMatrix(T),I=t.merge(s(T,j),c(T,j)),D={},R;t.forEach(["u","d"],function(G){R=G==="u"?j:t.values(j).reverse(),t.forEach(["l","r"],function(U){U==="r"&&(R=t.map(R,function(Z){return t.values(Z).reverse()}));var z=(G==="u"?T.predecessors:T.successors).bind(T),Q=p(T,R,I,z),$=b(T,R,Q.root,Q.align,U==="r");U==="r"&&($=t.mapValues($,function(Z){return-Z})),D[G+U]=$})});var Y=w(T,D);return k(D,Y),P(D,T.graph().align)}function M(T,j,I){return function(D,R,Y){var G=D.node(R),U=D.node(Y),z=0,Q;if(z+=G.width/2,t.has(G,"labelpos"))switch(G.labelpos.toLowerCase()){case"l":Q=-G.width/2;break;case"r":Q=G.width/2;break}if(Q&&(z+=I?Q:-Q),Q=0,z+=(G.dummy?j:T)/2,z+=(U.dummy?j:T)/2,z+=U.width/2,t.has(U,"labelpos"))switch(U.labelpos.toLowerCase()){case"l":Q=U.width/2;break;case"r":Q=-U.width/2;break}return Q&&(z+=I?Q:-Q),Q=0,z}}function L(T,j){return T.node(j).width}return PM}var SM,ZY;function Fbe(){if(ZY)return SM;ZY=1;var t=Ei(),r=js(),a=Ube().positionX;SM=s;function s(f){f=r.asNonCompoundGraph(f),c(f),t.forEach(a(f),function(h,d){f.node(d).x=h})}function c(f){var h=r.buildLayerMatrix(f),d=f.graph().ranksep,p=0;t.forEach(h,function(b){var m=t.max(t.map(b,function(w){return f.node(w).height}));t.forEach(b,function(w){f.node(w).y=p+m/2}),p+=m+d})}return SM}var NM,$Y;function Ybe(){if($Y)return NM;$Y=1;var t=Ei(),r=Cbe(),a=Pbe(),s=Nbe(),c=js().normalizeRanks,f=Tbe(),h=js().removeEmptyRanks,d=Mbe(),p=jbe(),b=Abe(),m=zbe(),w=Fbe(),k=js(),P=ic().Graph;NM=S;function S(ge,xe){var Se=xe&&xe.debugTiming?k.time:k.notime;Se("layout",function(){var Ie=Se(" buildLayoutGraph",function(){return z(ge)});Se(" runLayout",function(){M(Ie,Se)}),Se(" updateInputGraph",function(){L(ge,Ie)})})}function M(ge,xe){xe(" makeSpaceForEdgeLabels",function(){Q(ge)}),xe(" removeSelfEdges",function(){fe(ge)}),xe(" acyclic",function(){r.run(ge)}),xe(" nestingGraph.run",function(){d.run(ge)}),xe(" rank",function(){s(k.asNonCompoundGraph(ge))}),xe(" injectEdgeLabelProxies",function(){$(ge)}),xe(" removeEmptyRanks",function(){h(ge)}),xe(" nestingGraph.cleanup",function(){d.cleanup(ge)}),xe(" normalizeRanks",function(){c(ge)}),xe(" assignRankMinMax",function(){Z(ge)}),xe(" removeEdgeLabelProxies",function(){X(ge)}),xe(" normalize.run",function(){a.run(ge)}),xe(" parentDummyChains",function(){f(ge)}),xe(" addBorderSegments",function(){p(ge)}),xe(" order",function(){m(ge)}),xe(" insertSelfEdges",function(){pe(ge)}),xe(" adjustCoordinateSystem",function(){b.adjust(ge)}),xe(" position",function(){w(ge)}),xe(" positionSelfEdges",function(){me(ge)}),xe(" removeBorderNodes",function(){he(ge)}),xe(" normalize.undo",function(){a.undo(ge)}),xe(" fixupEdgeLabelCoords",function(){se(ge)}),xe(" undoCoordinateSystem",function(){b.undo(ge)}),xe(" translateGraph",function(){K(ge)}),xe(" assignNodeIntersects",function(){ae(ge)}),xe(" reversePoints",function(){le(ge)}),xe(" acyclic.undo",function(){r.undo(ge)})}function L(ge,xe){t.forEach(ge.nodes(),function(Se){var Ie=ge.node(Se),Re=xe.node(Se);Ie&&(Ie.x=Re.x,Ie.y=Re.y,xe.children(Se).length&&(Ie.width=Re.width,Ie.height=Re.height))}),t.forEach(ge.edges(),function(Se){var Ie=ge.edge(Se),Re=xe.edge(Se);Ie.points=Re.points,t.has(Re,"x")&&(Ie.x=Re.x,Ie.y=Re.y)}),ge.graph().width=xe.graph().width,ge.graph().height=xe.graph().height}var T=["nodesep","edgesep","ranksep","marginx","marginy"],j={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},I=["acyclicer","ranker","rankdir","align"],D=["width","height"],R={width:0,height:0},Y=["minlen","weight","width","height","labeloffset"],G={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},U=["labelpos"];function z(ge){var xe=new P({multigraph:!0,compound:!0}),Se=Le(ge.graph());return xe.setGraph(t.merge({},j,Te(Se,T),t.pick(Se,I))),t.forEach(ge.nodes(),function(Ie){var Re=Le(ge.node(Ie));xe.setNode(Ie,t.defaults(Te(Re,D),R)),xe.setParent(Ie,ge.parent(Ie))}),t.forEach(ge.edges(),function(Ie){var Re=Le(ge.edge(Ie));xe.setEdge(Ie,t.merge({},G,Te(Re,Y),t.pick(Re,U)))}),xe}function Q(ge){var xe=ge.graph();xe.ranksep/=2,t.forEach(ge.edges(),function(Se){var Ie=ge.edge(Se);Ie.minlen*=2,Ie.labelpos.toLowerCase()!=="c"&&(xe.rankdir==="TB"||xe.rankdir==="BT"?Ie.width+=Ie.labeloffset:Ie.height+=Ie.labeloffset)})}function $(ge){t.forEach(ge.edges(),function(xe){var Se=ge.edge(xe);if(Se.width&&Se.height){var Ie=ge.node(xe.v),Re=ge.node(xe.w),Ne={rank:(Re.rank-Ie.rank)/2+Ie.rank,e:xe};k.addDummyNode(ge,"edge-proxy",Ne,"_ep")}})}function Z(ge){var xe=0;t.forEach(ge.nodes(),function(Se){var Ie=ge.node(Se);Ie.borderTop&&(Ie.minRank=ge.node(Ie.borderTop).rank,Ie.maxRank=ge.node(Ie.borderBottom).rank,xe=t.max(xe,Ie.maxRank))}),ge.graph().maxRank=xe}function X(ge){t.forEach(ge.nodes(),function(xe){var Se=ge.node(xe);Se.dummy==="edge-proxy"&&(ge.edge(Se.e).labelRank=Se.rank,ge.removeNode(xe))})}function K(ge){var xe=Number.POSITIVE_INFINITY,Se=0,Ie=Number.POSITIVE_INFINITY,Re=0,Ne=ge.graph(),Me=Ne.marginx||0,ke=Ne.marginy||0;function Ge(Qe){var nt=Qe.x,ft=Qe.y,Ue=Qe.width,Ze=Qe.height;xe=Math.min(xe,nt-Ue/2),Se=Math.max(Se,nt+Ue/2),Ie=Math.min(Ie,ft-Ze/2),Re=Math.max(Re,ft+Ze/2)}t.forEach(ge.nodes(),function(Qe){Ge(ge.node(Qe))}),t.forEach(ge.edges(),function(Qe){var nt=ge.edge(Qe);t.has(nt,"x")&&Ge(nt)}),xe-=Me,Ie-=ke,t.forEach(ge.nodes(),function(Qe){var nt=ge.node(Qe);nt.x-=xe,nt.y-=Ie}),t.forEach(ge.edges(),function(Qe){var nt=ge.edge(Qe);t.forEach(nt.points,function(ft){ft.x-=xe,ft.y-=Ie}),t.has(nt,"x")&&(nt.x-=xe),t.has(nt,"y")&&(nt.y-=Ie)}),Ne.width=Se-xe+Me,Ne.height=Re-Ie+ke}function ae(ge){t.forEach(ge.edges(),function(xe){var Se=ge.edge(xe),Ie=ge.node(xe.v),Re=ge.node(xe.w),Ne,Me;Se.points?(Ne=Se.points[0],Me=Se.points[Se.points.length-1]):(Se.points=[],Ne=Re,Me=Ie),Se.points.unshift(k.intersectRect(Ie,Ne)),Se.points.push(k.intersectRect(Re,Me))})}function se(ge){t.forEach(ge.edges(),function(xe){var Se=ge.edge(xe);if(t.has(Se,"x"))switch((Se.labelpos==="l"||Se.labelpos==="r")&&(Se.width-=Se.labeloffset),Se.labelpos){case"l":Se.x-=Se.width/2+Se.labeloffset;break;case"r":Se.x+=Se.width/2+Se.labeloffset;break}})}function le(ge){t.forEach(ge.edges(),function(xe){var Se=ge.edge(xe);Se.reversed&&Se.points.reverse()})}function he(ge){t.forEach(ge.nodes(),function(xe){if(ge.children(xe).length){var Se=ge.node(xe),Ie=ge.node(Se.borderTop),Re=ge.node(Se.borderBottom),Ne=ge.node(t.last(Se.borderLeft)),Me=ge.node(t.last(Se.borderRight));Se.width=Math.abs(Me.x-Ne.x),Se.height=Math.abs(Re.y-Ie.y),Se.x=Ne.x+Se.width/2,Se.y=Ie.y+Se.height/2}}),t.forEach(ge.nodes(),function(xe){ge.node(xe).dummy==="border"&&ge.removeNode(xe)})}function fe(ge){t.forEach(ge.edges(),function(xe){if(xe.v===xe.w){var Se=ge.node(xe.v);Se.selfEdges||(Se.selfEdges=[]),Se.selfEdges.push({e:xe,label:ge.edge(xe)}),ge.removeEdge(xe)}})}function pe(ge){var xe=k.buildLayerMatrix(ge);t.forEach(xe,function(Se){var Ie=0;t.forEach(Se,function(Re,Ne){var Me=ge.node(Re);Me.order=Ne+Ie,t.forEach(Me.selfEdges,function(ke){k.addDummyNode(ge,"selfedge",{width:ke.label.width,height:ke.label.height,rank:Me.rank,order:Ne+ ++Ie,e:ke.e,label:ke.label},"_se")}),delete Me.selfEdges})})}function me(ge){t.forEach(ge.nodes(),function(xe){var Se=ge.node(xe);if(Se.dummy==="selfedge"){var Ie=ge.node(Se.e.v),Re=Ie.x+Ie.width/2,Ne=Ie.y,Me=Se.x-Re,ke=Ie.height/2;ge.setEdge(Se.e,Se.label),ge.removeNode(xe),Se.label.points=[{x:Re+2*Me/3,y:Ne-ke},{x:Re+5*Me/6,y:Ne-ke},{x:Re+Me,y:Ne},{x:Re+5*Me/6,y:Ne+ke},{x:Re+2*Me/3,y:Ne+ke}],Se.label.x=Se.x,Se.label.y=Se.y}})}function Te(ge,xe){return t.mapValues(t.pick(ge,xe),Number)}function Le(ge){var xe={};return t.forEach(ge,function(Se,Ie){xe[Ie.toLowerCase()]=Se}),xe}return NM}var TM,KY;function Vbe(){if(KY)return TM;KY=1;var t=Ei(),r=js(),a=ic().Graph;TM={debugOrdering:s};function s(c){var f=r.buildLayerMatrix(c),h=new a({compound:!0,multigraph:!0}).setGraph({});return t.forEach(c.nodes(),function(d){h.setNode(d,{label:d}),h.setParent(d,"layer"+c.node(d).rank)}),t.forEach(c.edges(),function(d){h.setEdge(d.v,d.w,{},d.name)}),t.forEach(f,function(d,p){var b="layer"+p;h.setNode(b,{rank:"same"}),t.reduce(d,function(m,w){return h.setEdge(m,w,{style:"invis"}),w})}),h}return TM}var QY,WY;function qbe(){return WY||(WY=1,QY="0.8.5"),QY}var JY,XY;function Zbe(){return XY||(XY=1,JY={graphlib:ic(),layout:Ybe(),debug:Vbe(),util:{time:js().time,notime:js().notime},version:qbe()}),JY}(function(t,r){(function(a,s){t.exports=s(Zbe())})(zr,function(a){return function(s){var c={};function f(h){if(c[h])return c[h].exports;var d=c[h]={i:h,l:!1,exports:{}};return s[h].call(d.exports,d,d.exports,f),d.l=!0,d.exports}return f.m=s,f.c=c,f.d=function(h,d,p){f.o(h,d)||Object.defineProperty(h,d,{enumerable:!0,get:p})},f.r=function(h){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})},f.t=function(h,d){if(d&1&&(h=f(h)),d&8||d&4&&typeof h=="object"&&h&&h.__esModule)return h;var p=Object.create(null);if(f.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:h}),d&2&&typeof h!="string")for(var b in h)f.d(p,b,(function(m){return h[m]}).bind(null,b));return p},f.n=function(h){var d=h&&h.__esModule?function(){return h.default}:function(){return h};return f.d(d,"a",d),d},f.o=function(h,d){return Object.prototype.hasOwnProperty.call(h,d)},f.p="",f(f.s=0)}([function(s,c,f){var h=f(1),d=function(p){p&&p("layout","dagre",h)};typeof cytoscape<"u"&&d(cytoscape),s.exports=d},function(s,c,f){function h(k){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function(P){return typeof P}:h=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},h(k)}var d=function(k){return typeof k=="function"},p=f(2),b=f(3),m=f(4);function w(k){this.options=b({},p,k)}w.prototype.run=function(){var k=this.options,P=this,S=k.cy,M=k.eles,L=function(pe,me){return d(me)?me.apply(pe,[pe]):me},T=k.boundingBox||{x1:0,y1:0,w:S.width(),h:S.height()};T.x2===void 0&&(T.x2=T.x1+T.w),T.w===void 0&&(T.w=T.x2-T.x1),T.y2===void 0&&(T.y2=T.y1+T.h),T.h===void 0&&(T.h=T.y2-T.y1);var j=new m.graphlib.Graph({multigraph:!0,compound:!0}),I={},D=function(pe,me){me!=null&&(I[pe]=me)};D("nodesep",k.nodeSep),D("edgesep",k.edgeSep),D("ranksep",k.rankSep),D("rankdir",k.rankDir),D("align",k.align),D("ranker",k.ranker),D("acyclicer",k.acyclicer),j.setGraph(I),j.setDefaultEdgeLabel(function(){return{}}),j.setDefaultNodeLabel(function(){return{}});var R=M.nodes();d(k.sort)&&(R=R.sort(k.sort));for(var Y=0;Y<R.length;Y++){var G=R[Y],U=G.layoutDimensions(k);j.setNode(G.id(),{width:U.w,height:U.h,name:G.id()})}for(var z=0;z<R.length;z++){var Q=R[z];Q.isChild()&&j.setParent(Q.id(),Q.parent().id())}var $=M.edges().stdFilter(function(pe){return!pe.source().isParent()&&!pe.target().isParent()});d(k.sort)&&($=$.sort(k.sort));for(var Z=0;Z<$.length;Z++){var X=$[Z];j.setEdge(X.source().id(),X.target().id(),{minlen:L(X,k.minLen),weight:L(X,k.edgeWeight),name:X.id()},X.id())}m.layout(j);for(var K=j.nodes(),ae=0;ae<K.length;ae++){var se=K[ae],le=j.node(se);S.getElementById(se).scratch().dagre=le}var he;k.boundingBox?(he={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0},R.forEach(function(pe){var me=pe.scratch().dagre;he.x1=Math.min(he.x1,me.x),he.x2=Math.max(he.x2,me.x),he.y1=Math.min(he.y1,me.y),he.y2=Math.max(he.y2,me.y)}),he.w=he.x2-he.x1,he.h=he.y2-he.y1):he=T;var fe=function(pe){if(k.boundingBox){var me=he.w===0?0:(pe.x-he.x1)/he.w,Te=he.h===0?0:(pe.y-he.y1)/he.h;return{x:T.x1+me*T.w,y:T.y1+Te*T.h}}else return pe};return R.layoutPositions(P,k,function(pe){pe=h(pe)==="object"?pe:this;var me=pe.scratch().dagre;return fe({x:me.x,y:me.y})}),this},s.exports=w},function(s,c){var f={nodeSep:void 0,edgeSep:void 0,rankSep:void 0,rankDir:void 0,align:void 0,acyclicer:void 0,ranker:void 0,minLen:function(h){return 1},edgeWeight:function(h){return 1},fit:!0,padding:30,spacingFactor:void 0,nodeDimensionsIncludeLabels:!1,animate:!1,animateFilter:function(h,d){return!0},animationDuration:500,animationEasing:void 0,boundingBox:void 0,transform:function(h,d){return d},ready:function(){},sort:void 0,stop:function(){}};s.exports=f},function(s,c){s.exports=Object.assign!=null?Object.assign.bind(Object):function(f){for(var h=arguments.length,d=new Array(h>1?h-1:0),p=1;p<h;p++)d[p-1]=arguments[p];return d.forEach(function(b){Object.keys(b).forEach(function(m){return f[m]=b[m]})}),f}},function(s,c){s.exports=a}])})})(NR);var $be=NR.exports;const Kbe=A0($be);var eV={exports:{}},tV={},R0={},nV={},cf={},rV;function iV(){if(rV)return cf;rV=1,Object.defineProperty(cf,"__esModule",{value:!0});var t=function(){function p(b,m,w){this.source=b,this.target=m,this.type=w}return p}();cf.PowerEdge=t;var r=function(){function p(b,m,w,k){var P=this;if(this.linkAccessor=w,this.modules=new Array(b),this.roots=[],k)this.initModulesFromGroup(k);else{this.roots.push(new f);for(var S=0;S<b;++S)this.roots[0].add(this.modules[S]=new s(S))}this.R=m.length,m.forEach(function(M){var L=P.modules[w.getSourceIndex(M)],T=P.modules[w.getTargetIndex(M)],j=w.getType(M);L.outgoing.add(j,T),T.incoming.add(j,L)})}return p.prototype.initModulesFromGroup=function(b){var m=new f;this.roots.push(m);for(var w=0;w<b.leaves.length;++w){var k=b.leaves[w],P=new s(k.id);this.modules[k.id]=P,m.add(P)}if(b.groups)for(var S=0;S<b.groups.length;++S){var M=b.groups[S],L={};for(var T in M)T!=="leaves"&&T!=="groups"&&M.hasOwnProperty(T)&&(L[T]=M[T]);m.add(new s(-1-S,new h,new h,this.initModulesFromGroup(M),L))}return m},p.prototype.merge=function(b,m,w){w===void 0&&(w=0);var k=b.incoming.intersection(m.incoming),P=b.outgoing.intersection(m.outgoing),S=new f;S.add(b),S.add(m);var M=new s(this.modules.length,P,k,S);this.modules.push(M);var L=function(T,j,I){T.forAll(function(D,R){D.forAll(function(Y){var G=Y[j];G.add(R,M),G.remove(R,b),G.remove(R,m),b[I].remove(R,Y),m[I].remove(R,Y)})})};return L(P,"incoming","outgoing"),L(k,"outgoing","incoming"),this.R-=k.count()+P.count(),this.roots[w].remove(b),this.roots[w].remove(m),this.roots[w].add(M),M},p.prototype.rootMerges=function(b){b===void 0&&(b=0);for(var m=this.roots[b].modules(),w=m.length,k=new Array(w*(w-1)),P=0,S=0,M=w-1;S<M;++S)for(var L=S+1;L<w;++L){var T=m[S],j=m[L];k[P]={id:P,nEdges:this.nEdges(T,j),a:T,b:j},P++}return k},p.prototype.greedyMerge=function(){for(var b=0;b<this.roots.length;++b)if(!(this.roots[b].modules().length<2)){var m=this.rootMerges(b).sort(function(k,P){return k.nEdges==P.nEdges?k.id-P.id:k.nEdges-P.nEdges}),w=m[0];if(!(w.nEdges>=this.R))return this.merge(w.a,w.b,b),!0}},p.prototype.nEdges=function(b,m){var w=b.incoming.intersection(m.incoming),k=b.outgoing.intersection(m.outgoing);return this.R-w.count()-k.count()},p.prototype.getGroupHierarchy=function(b){var m=this,w=[],k={};a(this.roots[0],k,w);var P=this.allEdges();return P.forEach(function(S){var M=m.modules[S.source],L=m.modules[S.target];b.push(new t(typeof M.gid>"u"?S.source:w[M.gid],typeof L.gid>"u"?S.target:w[L.gid],S.type))}),w},p.prototype.allEdges=function(){var b=[];return p.getEdges(this.roots[0],b),b},p.getEdges=function(b,m){b.forAll(function(w){w.getEdges(m),p.getEdges(w.children,m)})},p}();cf.Configuration=r;function a(p,b,m){p.forAll(function(w){if(w.isLeaf())b.leaves||(b.leaves=[]),b.leaves.push(w.id);else{var k=b;if(w.gid=m.length,!w.isIsland()||w.isPredefined()){if(k={id:w.gid},w.isPredefined())for(var P in w.definition)k[P]=w.definition[P];b.groups||(b.groups=[]),b.groups.push(w.gid),m.push(k)}a(w.children,k,m)}})}var s=function(){function p(b,m,w,k,P){m===void 0&&(m=new h),w===void 0&&(w=new h),k===void 0&&(k=new f),this.id=b,this.outgoing=m,this.incoming=w,this.children=k,this.definition=P}return p.prototype.getEdges=function(b){var m=this;this.outgoing.forAll(function(w,k){w.forAll(function(P){b.push(new t(m.id,P.id,k))})})},p.prototype.isLeaf=function(){return this.children.count()===0},p.prototype.isIsland=function(){return this.outgoing.count()===0&&this.incoming.count()===0},p.prototype.isPredefined=function(){return typeof this.definition<"u"},p}();cf.Module=s;function c(p,b){var m={};for(var w in p)w in b&&(m[w]=p[w]);return m}var f=function(){function p(){this.table={}}return p.prototype.count=function(){return Object.keys(this.table).length},p.prototype.intersection=function(b){var m=new p;return m.table=c(this.table,b.table),m},p.prototype.intersectionCount=function(b){return this.intersection(b).count()},p.prototype.contains=function(b){return b in this.table},p.prototype.add=function(b){this.table[b.id]=b},p.prototype.remove=function(b){delete this.table[b.id]},p.prototype.forAll=function(b){for(var m in this.table)b(this.table[m])},p.prototype.modules=function(){var b=[];return this.forAll(function(m){m.isPredefined()||b.push(m)}),b},p}();cf.ModuleSet=f;var h=function(){function p(){this.sets={},this.n=0}return p.prototype.count=function(){return this.n},p.prototype.contains=function(b){var m=!1;return this.forAllModules(function(w){!m&&w.id==b&&(m=!0)}),m},p.prototype.add=function(b,m){var w=b in this.sets?this.sets[b]:this.sets[b]=new f;w.add(m),++this.n},p.prototype.remove=function(b,m){var w=this.sets[b];w.remove(m),w.count()===0&&delete this.sets[b],--this.n},p.prototype.forAll=function(b){for(var m in this.sets)b(this.sets[m],Number(m))},p.prototype.forAllModules=function(b){this.forAll(function(m,w){return m.forAll(b)})},p.prototype.intersection=function(b){var m=new p;return this.forAll(function(w,k){if(k in b.sets){var P=w.intersection(b.sets[k]),S=P.count();S>0&&(m.sets[k]=P,m.n+=S)}}),m},p}();cf.LinkSets=h;function d(p,b,m,w){for(var k=p.length,P=new r(k,b,m,w);P.greedyMerge(););var S=[],M=P.getGroupHierarchy(S);return S.forEach(function(L){var T=function(j){var I=L[j];typeof I=="number"&&(L[j]=p[I])};T("source"),T("target")}),{groups:M,powerEdges:S}}return cf.getGroups=d,cf}var Xd={},aV;function MM(){if(aV)return Xd;aV=1,Object.defineProperty(Xd,"__esModule",{value:!0});function t(p,b){var m={};for(var w in p)m[w]={};for(var w in b)m[w]={};return Object.keys(m).length}function r(p,b){var m=0;for(var w in p)typeof b[w]<"u"&&++m;return m}function a(p,b){var m={},w=function(k,P){typeof m[k]>"u"&&(m[k]={}),m[k][P]={}};return p.forEach(function(k){var P=b.getSourceIndex(k),S=b.getTargetIndex(k);w(P,S),w(S,P)}),m}function s(p,b,m,w){var k=a(p,w);p.forEach(function(P){var S=k[w.getSourceIndex(P)],M=k[w.getTargetIndex(P)];w.setLength(P,1+b*m(S,M))})}function c(p,b,m){m===void 0&&(m=1),s(p,m,function(w,k){return Math.sqrt(t(w,k)-r(w,k))},b)}Xd.symmetricDiffLinkLengths=c;function f(p,b,m){m===void 0&&(m=1),s(p,m,function(w,k){return Math.min(Object.keys(w).length,Object.keys(k).length)<1.1?0:r(w,k)/t(w,k)},b)}Xd.jaccardLinkLengths=f;function h(p,b,m,w){var k=d(p,b,w),P={};k.forEach(function(M,L){return M.forEach(function(T){return P[T]=L})});var S=[];return b.forEach(function(M){var L=w.getSourceIndex(M),T=w.getTargetIndex(M),j=P[L],I=P[T];j!==I&&S.push({axis:m,left:L,right:T,gap:w.getMinSeparation(M)})}),S}Xd.generateDirectedEdgeConstraints=h;function d(p,b,m){var w=[],k=0,P=[],S=[];function M(z){z.index=z.lowlink=k++,P.push(z),z.onStack=!0;for(var Q=0,$=z.out;Q<$.length;Q++){var Z=$[Q];typeof Z.index>"u"?(M(Z),z.lowlink=Math.min(z.lowlink,Z.lowlink)):Z.onStack&&(z.lowlink=Math.min(z.lowlink,Z.index))}if(z.lowlink===z.index){for(var X=[];P.length&&(Z=P.pop(),Z.onStack=!1,X.push(Z),Z!==z););S.push(X.map(function(K){return K.id}))}}for(var L=0;L<p;L++)w.push({id:L,out:[]});for(var T=0,j=b;T<j.length;T++){var I=j[T],D=w[m.getSourceIndex(I)],R=w[m.getTargetIndex(I)];D.out.push(R)}for(var Y=0,G=w;Y<G.length;Y++){var U=G[Y];typeof U.index>"u"&&M(U)}return S}return Xd.stronglyConnectedComponents=d,Xd}var $g={},oV;function jM(){if(oV)return $g;oV=1,Object.defineProperty($g,"__esModule",{value:!0});var t=function(){function s(){this.locks={}}return s.prototype.add=function(c,f){this.locks[c]=f},s.prototype.clear=function(){this.locks={}},s.prototype.isEmpty=function(){for(var c in this.locks)return!1;return!0},s.prototype.apply=function(c){for(var f in this.locks)c(Number(f),this.locks[f])},s}();$g.Locks=t;var r=function(){function s(c,f,h){h===void 0&&(h=null),this.D=f,this.G=h,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new a,this.project=null,this.x=c,this.k=c.length;var d=this.n=c[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new t,this.minD=Number.MAX_VALUE;for(var p=d,b;p--;)for(b=d;--b>p;){var m=f[p][b];m>0&&m<this.minD&&(this.minD=m)}for(this.minD===Number.MAX_VALUE&&(this.minD=1),p=this.k;p--;){for(this.g[p]=new Array(d),this.H[p]=new Array(d),b=d;b--;)this.H[p][b]=new Array(d);this.Hd[p]=new Array(d),this.a[p]=new Array(d),this.b[p]=new Array(d),this.c[p]=new Array(d),this.d[p]=new Array(d),this.e[p]=new Array(d),this.ia[p]=new Array(d),this.ib[p]=new Array(d),this.xtmp[p]=new Array(d)}}return s.createSquareMatrix=function(c,f){for(var h=new Array(c),d=0;d<c;++d){h[d]=new Array(c);for(var p=0;p<c;++p)h[d][p]=f(d,p)}return h},s.prototype.offsetDir=function(){for(var c=this,f=new Array(this.k),h=0,d=0;d<this.k;++d){var p=f[d]=this.random.getNextBetween(.01,1)-.5;h+=p*p}return h=Math.sqrt(h),f.map(function(b){return b*=c.minD/h})},s.prototype.computeDerivatives=function(c){var f=this,h=this.n;if(!(h<1)){for(var d,p=new Array(this.k),b=new Array(this.k),m=new Array(this.k),w=0,k=0;k<h;++k){for(d=0;d<this.k;++d)m[d]=this.g[d][k]=0;for(var P=0;P<h;++P)if(k!==P){for(var S=h;S--;){var M=0;for(d=0;d<this.k;++d){var L=p[d]=c[d][k]-c[d][P];M+=b[d]=L*L}if(M>1e-9)break;var T=this.offsetDir();for(d=0;d<this.k;++d)c[d][P]+=T[d]}var j=Math.sqrt(M),I=this.D[k][P],D=this.G!=null?this.G[k][P]:1;if(D>1&&j>I||!isFinite(I)){for(d=0;d<this.k;++d)this.H[d][k][P]=0;continue}D>1&&(D=1);var R=I*I,Y=2*D*(j-I)/(R*j),G=j*j*j,U=2*-D/(R*G);for(isFinite(Y)||console.log(Y),d=0;d<this.k;++d)this.g[d][k]+=p[d]*Y,m[d]-=this.H[d][k][P]=U*(G+I*(b[d]-M)+j*M)}for(d=0;d<this.k;++d)w=Math.max(w,this.H[d][k][k]=m[d])}for(var z=this.snapGridSize/2,Q=this.snapGridSize,$=this.snapStrength,Z=$/(z*z),X=this.numGridSnapNodes,k=0;k<X;++k)for(d=0;d<this.k;++d){var K=this.x[d][k],ae=K/Q,se=ae%1,le=ae-se,he=Math.abs(se),L=he<=.5?K-le*Q:K>0?K-(le+1)*Q:K-(le-1)*Q;-z<L&&L<=z&&(this.scaleSnapByMaxH?(this.g[d][k]+=w*Z*L,this.H[d][k][k]+=w*Z):(this.g[d][k]+=Z*L,this.H[d][k][k]+=Z))}this.locks.isEmpty()||this.locks.apply(function(fe,pe){for(d=0;d<f.k;++d)f.H[d][fe][fe]+=w,f.g[d][fe]-=w*(pe[d]-c[d][fe])})}},s.dotProd=function(c,f){for(var h=0,d=c.length;d--;)h+=c[d]*f[d];return h},s.rightMultiply=function(c,f,h){for(var d=c.length;d--;)h[d]=s.dotProd(c[d],f)},s.prototype.computeStepSize=function(c){for(var f=0,h=0,d=0;d<this.k;++d)f+=s.dotProd(this.g[d],c[d]),s.rightMultiply(this.H[d],c[d],this.Hd[d]),h+=s.dotProd(c[d],this.Hd[d]);return h===0||!isFinite(h)?0:1*f/h},s.prototype.reduceStress=function(){this.computeDerivatives(this.x);for(var c=this.computeStepSize(this.g),f=0;f<this.k;++f)this.takeDescentStep(this.x[f],this.g[f],c);return this.computeStress()},s.copy=function(c,f){for(var h=c.length,d=f[0].length,p=0;p<h;++p)for(var b=0;b<d;++b)f[p][b]=c[p][b]},s.prototype.stepAndProject=function(c,f,h,d){s.copy(c,f),this.takeDescentStep(f[0],h[0],d),this.project&&this.project[0](c[0],c[1],f[0]),this.takeDescentStep(f[1],h[1],d),this.project&&this.project[1](f[0],c[1],f[1]);for(var p=2;p<this.k;p++)this.takeDescentStep(f[p],h[p],d)},s.mApply=function(c,f,h){for(var d=c;d-- >0;)for(var p=f;p-- >0;)h(d,p)},s.prototype.matrixApply=function(c){s.mApply(this.k,this.n,c)},s.prototype.computeNextPosition=function(c,f){var h=this;this.computeDerivatives(c);var d=this.computeStepSize(this.g);if(this.stepAndProject(c,f,this.g,d),this.project){this.matrixApply(function(b,m){return h.e[b][m]=c[b][m]-f[b][m]});var p=this.computeStepSize(this.e);p=Math.max(.2,Math.min(p,1)),this.stepAndProject(c,f,this.e,p)}},s.prototype.run=function(c){for(var f=Number.MAX_VALUE,h=!1;!h&&c-- >0;){var d=this.rungeKutta();h=Math.abs(f/d-1)<this.threshold,f=d}return f},s.prototype.rungeKutta=function(){var c=this;this.computeNextPosition(this.x,this.a),s.mid(this.x,this.a,this.ia),this.computeNextPosition(this.ia,this.b),s.mid(this.x,this.b,this.ib),this.computeNextPosition(this.ib,this.c),this.computeNextPosition(this.c,this.d);var f=0;return this.matrixApply(function(h,d){var p=(c.a[h][d]+2*c.b[h][d]+2*c.c[h][d]+c.d[h][d])/6,b=c.x[h][d]-p;f+=b*b,c.x[h][d]=p}),f},s.mid=function(c,f,h){s.mApply(c.length,c[0].length,function(d,p){return h[d][p]=c[d][p]+(f[d][p]-c[d][p])/2})},s.prototype.takeDescentStep=function(c,f,h){for(var d=0;d<this.n;++d)c[d]=c[d]-h*f[d]},s.prototype.computeStress=function(){for(var c=0,f=0,h=this.n-1;f<h;++f)for(var d=f+1,p=this.n;d<p;++d){for(var b=0,m=0;m<this.k;++m){var w=this.x[m][f]-this.x[m][d];b+=w*w}b=Math.sqrt(b);var k=this.D[f][d];if(isFinite(k)){var P=k-b,S=k*k;c+=P*P/S}}return c},s.zeroDistance=1e-10,s}();$g.Descent=r;var a=function(){function s(c){c===void 0&&(c=1),this.seed=c,this.a=214013,this.c=2531011,this.m=2147483648,this.range=32767}return s.prototype.getNext=function(){return this.seed=(this.seed*this.a+this.c)%this.m,(this.seed>>16)/this.range},s.prototype.getNextBetween=function(c,f){return c+this.getNext()*(f-c)},s}();return $g.PseudoRandom=a,$g}var As={},tl={},sV;function AM(){if(sV)return tl;sV=1,Object.defineProperty(tl,"__esModule",{value:!0});var t=function(){function d(p){this.scale=p,this.AB=0,this.AD=0,this.A2=0}return d.prototype.addVariable=function(p){var b=this.scale/p.scale,m=p.offset/p.scale,w=p.weight;this.AB+=w*b*m,this.AD+=w*b*p.desiredPosition,this.A2+=w*b*b},d.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},d}();tl.PositionStats=t;var r=function(){function d(p,b,m,w){w===void 0&&(w=!1),this.left=p,this.right=b,this.gap=m,this.equality=w,this.active=!1,this.unsatisfiable=!1,this.left=p,this.right=b,this.gap=m,this.equality=w}return d.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},d}();tl.Constraint=r;var a=function(){function d(p,b,m){b===void 0&&(b=1),m===void 0&&(m=1),this.desiredPosition=p,this.weight=b,this.scale=m,this.offset=0}return d.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},d.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},d.prototype.visitNeighbours=function(p,b){var m=function(w,k){return w.active&&p!==k&&b(w,k)};this.cOut.forEach(function(w){return m(w,w.right)}),this.cIn.forEach(function(w){return m(w,w.left)})},d}();tl.Variable=a;var s=function(){function d(p){this.vars=[],p.offset=0,this.ps=new t(p.scale),this.addVariable(p)}return d.prototype.addVariable=function(p){p.block=this,this.vars.push(p),this.ps.addVariable(p),this.posn=this.ps.getPosn()},d.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var p=0,b=this.vars.length;p<b;++p)this.ps.addVariable(this.vars[p]);this.posn=this.ps.getPosn()},d.prototype.compute_lm=function(p,b,m){var w=this,k=p.dfdv();return p.visitNeighbours(b,function(P,S){var M=w.compute_lm(S,p,m);S===P.right?(k+=M*P.left.scale,P.lm=M):(k+=M*P.right.scale,P.lm=-M),m(P)}),k/p.scale},d.prototype.populateSplitBlock=function(p,b){var m=this;p.visitNeighbours(b,function(w,k){k.offset=p.offset+(k===w.right?w.gap:-w.gap),m.addVariable(k),m.populateSplitBlock(k,p)})},d.prototype.traverse=function(p,b,m,w){var k=this;m===void 0&&(m=this.vars[0]),w===void 0&&(w=null),m.visitNeighbours(w,function(P,S){b.push(p(P)),k.traverse(p,b,S,m)})},d.prototype.findMinLM=function(){var p=null;return this.compute_lm(this.vars[0],null,function(b){!b.equality&&(p===null||b.lm<p.lm)&&(p=b)}),p},d.prototype.findMinLMBetween=function(p,b){this.compute_lm(p,null,function(){});var m=null;return this.findPath(p,null,b,function(w,k){!w.equality&&w.right===k&&(m===null||w.lm<m.lm)&&(m=w)}),m},d.prototype.findPath=function(p,b,m,w){var k=this,P=!1;return p.visitNeighbours(b,function(S,M){!P&&(M===m||k.findPath(M,p,m,w))&&(P=!0,w(S,M))}),P},d.prototype.isActiveDirectedPathBetween=function(p,b){if(p===b)return!0;for(var m=p.cOut.length;m--;){var w=p.cOut[m];if(w.active&&this.isActiveDirectedPathBetween(w.right,b))return!0}return!1},d.split=function(p){return p.active=!1,[d.createSplitBlock(p.left),d.createSplitBlock(p.right)]},d.createSplitBlock=function(p){var b=new d(p);return b.populateSplitBlock(p,null),b},d.prototype.splitBetween=function(p,b){var m=this.findMinLMBetween(p,b);if(m!==null){var w=d.split(m);return{constraint:m,lb:w[0],rb:w[1]}}return null},d.prototype.mergeAcross=function(p,b,m){b.active=!0;for(var w=0,k=p.vars.length;w<k;++w){var P=p.vars[w];P.offset+=m,this.addVariable(P)}this.posn=this.ps.getPosn()},d.prototype.cost=function(){for(var p=0,b=this.vars.length;b--;){var m=this.vars[b],w=m.position()-m.desiredPosition;p+=w*w*m.weight}return p},d}();tl.Block=s;var c=function(){function d(p){this.vs=p;var b=p.length;for(this.list=new Array(b);b--;){var m=new s(p[b]);this.list[b]=m,m.blockInd=b}}return d.prototype.cost=function(){for(var p=0,b=this.list.length;b--;)p+=this.list[b].cost();return p},d.prototype.insert=function(p){p.blockInd=this.list.length,this.list.push(p)},d.prototype.remove=function(p){var b=this.list.length-1,m=this.list[b];this.list.length=b,p!==m&&(this.list[p.blockInd]=m,m.blockInd=p.blockInd)},d.prototype.merge=function(p){var b=p.left.block,m=p.right.block,w=p.right.offset-p.left.offset-p.gap;b.vars.length<m.vars.length?(m.mergeAcross(b,p,w),this.remove(b)):(b.mergeAcross(m,p,-w),this.remove(m))},d.prototype.forEach=function(p){this.list.forEach(p)},d.prototype.updateBlockPositions=function(){this.list.forEach(function(p){return p.updateWeightedPosition()})},d.prototype.split=function(p){var b=this;this.updateBlockPositions(),this.list.forEach(function(m){var w=m.findMinLM();w!==null&&w.lm<f.LAGRANGIAN_TOLERANCE&&(m=w.left.block,s.split(w).forEach(function(k){return b.insert(k)}),b.remove(m),p.push(w))})},d}();tl.Blocks=c;var f=function(){function d(p,b){this.vs=p,this.cs=b,this.vs=p,p.forEach(function(m){m.cIn=[],m.cOut=[]}),this.cs=b,b.forEach(function(m){m.left.cOut.push(m),m.right.cIn.push(m)}),this.inactive=b.map(function(m){return m.active=!1,m}),this.bs=null}return d.prototype.cost=function(){return this.bs.cost()},d.prototype.setStartingPositions=function(p){this.inactive=this.cs.map(function(b){return b.active=!1,b}),this.bs=new c(this.vs),this.bs.forEach(function(b,m){return b.posn=p[m]})},d.prototype.setDesiredPositions=function(p){this.vs.forEach(function(b,m){return b.desiredPosition=p[m]})},d.prototype.mostViolated=function(){for(var p=Number.MAX_VALUE,b=null,m=this.inactive,w=m.length,k=w,P=0;P<w;++P){var S=m[P];if(!S.unsatisfiable){var M=S.slack();if((S.equality||M<p)&&(p=M,b=S,k=P,S.equality))break}}return k!==w&&(p<d.ZERO_UPPERBOUND&&!b.active||b.equality)&&(m[k]=m[w-1],m.length=w-1),b},d.prototype.satisfy=function(){this.bs==null&&(this.bs=new c(this.vs)),this.bs.split(this.inactive);for(var p=null;(p=this.mostViolated())&&(p.equality||p.slack()<d.ZERO_UPPERBOUND&&!p.active);){var b=p.left.block,m=p.right.block;if(b!==m)this.bs.merge(p);else{if(b.isActiveDirectedPathBetween(p.right,p.left)){p.unsatisfiable=!0;continue}var w=b.splitBetween(p.left,p.right);if(w!==null)this.bs.insert(w.lb),this.bs.insert(w.rb),this.bs.remove(b),this.inactive.push(w.constraint);else{p.unsatisfiable=!0;continue}p.slack()>=0?this.inactive.push(p):this.bs.merge(p)}}},d.prototype.solve=function(){this.satisfy();for(var p=Number.MAX_VALUE,b=this.bs.cost();Math.abs(p-b)>1e-4;)this.satisfy(),p=b,b=this.bs.cost();return b},d.LAGRANGIAN_TOLERANCE=-1e-4,d.ZERO_UPPERBOUND=-1e-10,d}();tl.Solver=f;function h(d,p,b){for(var m=d.map(function(G){return new a(G.desiredCenter)}),w=[],k=d.length,P=0;P<k-1;P++){var S=d[P],M=d[P+1];w.push(new r(m[P],m[P+1],(S.size+M.size)/2))}var L=m[0],T=m[k-1],j=d[0].size/2,I=d[k-1].size/2,D=null,R=null;p&&(D=new a(p,L.weight*1e3),m.push(D),w.push(new r(D,L,j))),b&&(R=new a(b,T.weight*1e3),m.push(R),w.push(new r(T,R,I)));var Y=new f(m,w);return Y.solve(),{newCenters:m.slice(0,d.length).map(function(G){return G.position()}),lowerBound:D?D.position():L.position()-j,upperBound:R?R.position():T.position()+I}}return tl.removeOverlapInOneDimension=h,tl}var Kg={},uV;function cV(){if(uV)return Kg;uV=1;var t=zr&&zr.__extends||function(){var f=function(h,d){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,b){p.__proto__=b}||function(p,b){for(var m in b)b.hasOwnProperty(m)&&(p[m]=b[m])},f(h,d)};return function(h,d){f(h,d);function p(){this.constructor=h}h.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(Kg,"__esModule",{value:!0});var r=function(){function f(){this.findIter=function(h){for(var d=this._root,p=this.iterator();d!==null;){var b=this._comparator(h,d.data);if(b===0)return p._cursor=d,p;p._ancestors.push(d),d=d.get_child(b>0)}return null}}return f.prototype.clear=function(){this._root=null,this.size=0},f.prototype.find=function(h){for(var d=this._root;d!==null;){var p=this._comparator(h,d.data);if(p===0)return d.data;d=d.get_child(p>0)}return null},f.prototype.lowerBound=function(h){return this._bound(h,this._comparator)},f.prototype.upperBound=function(h){var d=this._comparator;function p(b,m){return d(m,b)}return this._bound(h,p)},f.prototype.min=function(){var h=this._root;if(h===null)return null;for(;h.left!==null;)h=h.left;return h.data},f.prototype.max=function(){var h=this._root;if(h===null)return null;for(;h.right!==null;)h=h.right;return h.data},f.prototype.iterator=function(){return new a(this)},f.prototype.each=function(h){for(var d=this.iterator(),p;(p=d.next())!==null;)h(p)},f.prototype.reach=function(h){for(var d=this.iterator(),p;(p=d.prev())!==null;)h(p)},f.prototype._bound=function(h,d){for(var p=this._root,b=this.iterator();p!==null;){var m=this._comparator(h,p.data);if(m===0)return b._cursor=p,b;b._ancestors.push(p),p=p.get_child(m>0)}for(var w=b._ancestors.length-1;w>=0;--w)if(p=b._ancestors[w],d(h,p.data)>0)return b._cursor=p,b._ancestors.length=w,b;return b._ancestors.length=0,b},f}();Kg.TreeBase=r;var a=function(){function f(h){this._tree=h,this._ancestors=[],this._cursor=null}return f.prototype.data=function(){return this._cursor!==null?this._cursor.data:null},f.prototype.next=function(){if(this._cursor===null){var h=this._tree._root;h!==null&&this._minNode(h)}else if(this._cursor.right===null){var d;do if(d=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.right===d)}else this._ancestors.push(this._cursor),this._minNode(this._cursor.right);return this._cursor!==null?this._cursor.data:null},f.prototype.prev=function(){if(this._cursor===null){var h=this._tree._root;h!==null&&this._maxNode(h)}else if(this._cursor.left===null){var d;do if(d=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.left===d)}else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left);return this._cursor!==null?this._cursor.data:null},f.prototype._minNode=function(h){for(;h.left!==null;)this._ancestors.push(h),h=h.left;this._cursor=h},f.prototype._maxNode=function(h){for(;h.right!==null;)this._ancestors.push(h),h=h.right;this._cursor=h},f}();Kg.Iterator=a;var s=function(){function f(h){this.data=h,this.left=null,this.right=null,this.red=!0}return f.prototype.get_child=function(h){return h?this.right:this.left},f.prototype.set_child=function(h,d){h?this.right=d:this.left=d},f}(),c=function(f){t(h,f);function h(d){var p=f.call(this)||this;return p._root=null,p._comparator=d,p.size=0,p}return h.prototype.insert=function(d){var p=!1;if(this._root===null)this._root=new s(d),p=!0,this.size++;else{var b=new s(void 0),m=!1,w=!1,k=null,P=b,S=null,M=this._root;for(P.right=this._root;;){if(M===null?(M=new s(d),S.set_child(m,M),p=!0,this.size++):h.is_red(M.left)&&h.is_red(M.right)&&(M.red=!0,M.left.red=!1,M.right.red=!1),h.is_red(M)&&h.is_red(S)){var L=P.right===k;M===S.get_child(w)?P.set_child(L,h.single_rotate(k,!w)):P.set_child(L,h.double_rotate(k,!w))}var T=this._comparator(M.data,d);if(T===0)break;w=m,m=T<0,k!==null&&(P=k),k=S,S=M,M=M.get_child(m)}this._root=b.right}return this._root.red=!1,p},h.prototype.remove=function(d){if(this._root===null)return!1;var p=new s(void 0),b=p;b.right=this._root;for(var m=null,w=null,k=null,P=!0;b.get_child(P)!==null;){var S=P;w=m,m=b,b=b.get_child(P);var M=this._comparator(d,b.data);if(P=M>0,M===0&&(k=b),!h.is_red(b)&&!h.is_red(b.get_child(P))){if(h.is_red(b.get_child(!P))){var L=h.single_rotate(b,P);m.set_child(S,L),m=L}else if(!h.is_red(b.get_child(!P))){var T=m.get_child(!S);if(T!==null)if(!h.is_red(T.get_child(!S))&&!h.is_red(T.get_child(S)))m.red=!1,T.red=!0,b.red=!0;else{var j=w.right===m;h.is_red(T.get_child(S))?w.set_child(j,h.double_rotate(m,S)):h.is_red(T.get_child(!S))&&w.set_child(j,h.single_rotate(m,S));var I=w.get_child(j);I.red=!0,b.red=!0,I.left.red=!1,I.right.red=!1}}}}return k!==null&&(k.data=b.data,m.set_child(m.right===b,b.get_child(b.left===null)),this.size--),this._root=p.right,this._root!==null&&(this._root.red=!1),k!==null},h.is_red=function(d){return d!==null&&d.red},h.single_rotate=function(d,p){var b=d.get_child(!p);return d.set_child(!p,b.get_child(p)),b.set_child(p,d),d.red=!0,b.red=!1,b},h.double_rotate=function(d,p){return d.set_child(!p,h.single_rotate(d.get_child(!p),!p)),h.single_rotate(d,p)},h}(r);return Kg.RBTree=c,Kg}var lV;function G0(){if(lV)return As;lV=1;var t=zr&&zr.__extends||function(){var U=function(z,Q){return U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,Z){$.__proto__=Z}||function($,Z){for(var X in Z)Z.hasOwnProperty(X)&&($[X]=Z[X])},U(z,Q)};return function(z,Q){U(z,Q);function $(){this.constructor=z}z.prototype=Q===null?Object.create(Q):($.prototype=Q.prototype,new $)}}();Object.defineProperty(As,"__esModule",{value:!0});var r=AM(),a=cV();function s(U){return U.bounds=typeof U.leaves<"u"?U.leaves.reduce(function(z,Q){return Q.bounds.union(z)},c.empty()):c.empty(),typeof U.groups<"u"&&(U.bounds=U.groups.reduce(function(z,Q){return s(Q).union(z)},U.bounds)),U.bounds=U.bounds.inflate(U.padding),U.bounds}As.computeGroupBounds=s;var c=function(){function U(z,Q,$,Z){this.x=z,this.X=Q,this.y=$,this.Y=Z}return U.empty=function(){return new U(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},U.prototype.cx=function(){return(this.x+this.X)/2},U.prototype.cy=function(){return(this.y+this.Y)/2},U.prototype.overlapX=function(z){var Q=this.cx(),$=z.cx();return Q<=$&&z.x<this.X?this.X-z.x:$<=Q&&this.x<z.X?z.X-this.x:0},U.prototype.overlapY=function(z){var Q=this.cy(),$=z.cy();return Q<=$&&z.y<this.Y?this.Y-z.y:$<=Q&&this.y<z.Y?z.Y-this.y:0},U.prototype.setXCentre=function(z){var Q=z-this.cx();this.x+=Q,this.X+=Q},U.prototype.setYCentre=function(z){var Q=z-this.cy();this.y+=Q,this.Y+=Q},U.prototype.width=function(){return this.X-this.x},U.prototype.height=function(){return this.Y-this.y},U.prototype.union=function(z){return new U(Math.min(this.x,z.x),Math.max(this.X,z.X),Math.min(this.y,z.y),Math.max(this.Y,z.Y))},U.prototype.lineIntersections=function(z,Q,$,Z){for(var X=[[this.x,this.y,this.X,this.y],[this.X,this.y,this.X,this.Y],[this.X,this.Y,this.x,this.Y],[this.x,this.Y,this.x,this.y]],K=[],ae=0;ae<4;++ae){var se=U.lineIntersection(z,Q,$,Z,X[ae][0],X[ae][1],X[ae][2],X[ae][3]);se!==null&&K.push({x:se.x,y:se.y})}return K},U.prototype.rayIntersection=function(z,Q){var $=this.lineIntersections(this.cx(),this.cy(),z,Q);return $.length>0?$[0]:null},U.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},U.lineIntersection=function(z,Q,$,Z,X,K,ae,se){var le=$-z,he=ae-X,fe=Z-Q,pe=se-K,me=pe*le-he*fe;if(me==0)return null;var Te=z-X,Le=Q-K,ge=he*Le-pe*Te,xe=ge/me,Se=le*Le-fe*Te,Ie=Se/me;return xe>=0&&xe<=1&&Ie>=0&&Ie<=1?{x:z+xe*le,y:Q+xe*fe}:null},U.prototype.inflate=function(z){return new U(this.x-z,this.X+z,this.y-z,this.Y+z)},U}();As.Rectangle=c;function f(U,z,Q){var $=U.rayIntersection(z.cx(),z.cy())||{x:U.cx(),y:U.cy()},Z=z.rayIntersection(U.cx(),U.cy())||{x:z.cx(),y:z.cy()},X=Z.x-$.x,K=Z.y-$.y,ae=Math.sqrt(X*X+K*K),se=ae-Q;return{sourceIntersection:$,targetIntersection:Z,arrowStart:{x:$.x+se*X/ae,y:$.y+se*K/ae}}}As.makeEdgeBetween=f;function h(U,z,Q){var $=z.rayIntersection(U.x,U.y);$||($={x:z.cx(),y:z.cy()});var Z=$.x-U.x,X=$.y-U.y,K=Math.sqrt(Z*Z+X*X);return{x:$.x-Q*Z/K,y:$.y-Q*X/K}}As.makeEdgeTo=h;var d=function(){function U(z,Q,$){this.v=z,this.r=Q,this.pos=$,this.prev=m(),this.next=m()}return U}(),p=function(){function U(z,Q,$){this.isOpen=z,this.v=Q,this.pos=$}return U}();function b(U,z){return U.pos>z.pos?1:U.pos<z.pos||U.isOpen?-1:z.isOpen?1:0}function m(){return new a.RBTree(function(U,z){return U.pos-z.pos})}var w={getCentre:function(U){return U.cx()},getOpen:function(U){return U.y},getClose:function(U){return U.Y},getSize:function(U){return U.width()},makeRect:function(U,z,Q,$){return new c(Q-$/2,Q+$/2,U,z)},findNeighbours:M},k={getCentre:function(U){return U.cy()},getOpen:function(U){return U.x},getClose:function(U){return U.X},getSize:function(U){return U.height()},makeRect:function(U,z,Q,$){return new c(U,z,Q-$/2,Q+$/2)},findNeighbours:L};function P(U,z,Q,$){$===void 0&&($=!1);var Z=U.padding,X=typeof U.groups<"u"?U.groups.length:0,K=typeof U.leaves<"u"?U.leaves.length:0,ae=X?U.groups.reduce(function(Ne,Me){return Ne.concat(P(Me,z,Q,!0))},[]):[],se=($?2:0)+K+X,le=new Array(se),he=new Array(se),fe=0,pe=function(Ne,Me){he[fe]=Ne,le[fe++]=Me};if($){var me=U.bounds,Te=z.getCentre(me),Le=z.getSize(me)/2,ge=z.getOpen(me),xe=z.getClose(me),Se=Te-Le+Z/2,Ie=Te+Le-Z/2;U.minVar.desiredPosition=Se,pe(z.makeRect(ge,xe,Se,Z),U.minVar),U.maxVar.desiredPosition=Ie,pe(z.makeRect(ge,xe,Ie,Z),U.maxVar)}K&&U.leaves.forEach(function(Ne){return pe(Ne.bounds,Ne.variable)}),X&&U.groups.forEach(function(Ne){var Me=Ne.bounds;pe(z.makeRect(z.getOpen(Me),z.getClose(Me),z.getCentre(Me),z.getSize(Me)),Ne.minVar)});var Re=S(he,le,z,Q);return X&&(le.forEach(function(Ne){Ne.cOut=[],Ne.cIn=[]}),Re.forEach(function(Ne){Ne.left.cOut.push(Ne),Ne.right.cIn.push(Ne)}),U.groups.forEach(function(Ne){var Me=(Ne.padding-z.getSize(Ne.bounds))/2;Ne.minVar.cIn.forEach(function(ke){return ke.gap+=Me}),Ne.minVar.cOut.forEach(function(ke){ke.left=Ne.maxVar,ke.gap+=Me})})),ae.concat(Re)}function S(U,z,Q,$){var Z,X=U.length,K=2*X;console.assert(z.length>=X);var ae=new Array(K);for(Z=0;Z<X;++Z){var se=U[Z],le=new d(z[Z],se,Q.getCentre(se));ae[Z]=new p(!0,le,Q.getOpen(se)),ae[Z+X]=new p(!1,le,Q.getClose(se))}ae.sort(b);var he=new Array,fe=m();for(Z=0;Z<K;++Z){var pe=ae[Z],le=pe.v;if(pe.isOpen)fe.insert(le),Q.findNeighbours(le,fe);else{fe.remove(le);var me=function(ge,xe){var Se=(Q.getSize(ge.r)+Q.getSize(xe.r))/2+$;he.push(new r.Constraint(ge.v,xe.v,Se))},Te=function(ge,xe,Se){for(var Ie,Re=le[ge].iterator();(Ie=Re[ge]())!==null;)Se(Ie,le),Ie[xe].remove(le)};Te("prev","next",function(ge,xe){return me(ge,xe)}),Te("next","prev",function(ge,xe){return me(xe,ge)})}}return console.assert(fe.size===0),he}function M(U,z){var Q=function($,Z){for(var X=z.findIter(U),K;(K=X[$]())!==null;){var ae=K.r.overlapX(U.r);if((ae<=0||ae<=K.r.overlapY(U.r))&&(U[$].insert(K),K[Z].insert(U)),ae<=0)break}};Q("next","prev"),Q("prev","next")}function L(U,z){var Q=function($,Z){var X=z.findIter(U)[$]();X!==null&&X.r.overlapX(U.r)>0&&(U[$].insert(X),X[Z].insert(U))};Q("next","prev"),Q("prev","next")}function T(U,z){return S(U,z,w,1e-6)}As.generateXConstraints=T;function j(U,z){return S(U,z,k,1e-6)}As.generateYConstraints=j;function I(U){return P(U,w,1e-6)}As.generateXGroupConstraints=I;function D(U){return P(U,k,1e-6)}As.generateYGroupConstraints=D;function R(U){var z=U.map(function(Z){return new r.Variable(Z.cx())}),Q=T(U,z),$=new r.Solver(z,Q);$.solve(),z.forEach(function(Z,X){return U[X].setXCentre(Z.position())}),z=U.map(function(Z){return new r.Variable(Z.cy())}),Q=j(U,z),$=new r.Solver(z,Q),$.solve(),z.forEach(function(Z,X){return U[X].setYCentre(Z.position())})}As.removeOverlaps=R;var Y=function(U){t(z,U);function z(Q,$){var Z=U.call(this,0,$)||this;return Z.index=Q,Z}return z}(r.Variable);As.IndexedVariable=Y;var G=function(){function U(z,Q,$,Z,X){var K=this;if($===void 0&&($=null),Z===void 0&&(Z=null),X===void 0&&(X=!1),this.nodes=z,this.groups=Q,this.rootGroup=$,this.avoidOverlaps=X,this.variables=z.map(function(se,le){return se.variable=new Y(le,1)}),Z&&this.createConstraints(Z),X&&$&&typeof $.groups<"u"){z.forEach(function(se){if(!se.width||!se.height){se.bounds=new c(se.x,se.x,se.y,se.y);return}var le=se.width/2,he=se.height/2;se.bounds=new c(se.x-le,se.x+le,se.y-he,se.y+he)}),s($);var ae=z.length;Q.forEach(function(se){K.variables[ae]=se.minVar=new Y(ae++,typeof se.stiffness<"u"?se.stiffness:.01),K.variables[ae]=se.maxVar=new Y(ae++,typeof se.stiffness<"u"?se.stiffness:.01)})}}return U.prototype.createSeparation=function(z){return new r.Constraint(this.nodes[z.left].variable,this.nodes[z.right].variable,z.gap,typeof z.equality<"u"?z.equality:!1)},U.prototype.makeFeasible=function(z){var Q=this;if(this.avoidOverlaps){var $="x",Z="width";z.axis==="x"&&($="y",Z="height");var X=z.offsets.map(function(ae){return Q.nodes[ae.node]}).sort(function(ae,se){return ae[$]-se[$]}),K=null;X.forEach(function(ae){if(K){var se=K[$]+K[Z];se>ae[$]&&(ae[$]=se)}K=ae})}},U.prototype.createAlignment=function(z){var Q=this,$=this.nodes[z.offsets[0].node].variable;this.makeFeasible(z);var Z=z.axis==="x"?this.xConstraints:this.yConstraints;z.offsets.slice(1).forEach(function(X){var K=Q.nodes[X.node].variable;Z.push(new r.Constraint($,K,X.offset,!0))})},U.prototype.createConstraints=function(z){var Q=this,$=function(Z){return typeof Z.type>"u"||Z.type==="separation"};this.xConstraints=z.filter(function(Z){return Z.axis==="x"&&$(Z)}).map(function(Z){return Q.createSeparation(Z)}),this.yConstraints=z.filter(function(Z){return Z.axis==="y"&&$(Z)}).map(function(Z){return Q.createSeparation(Z)}),z.filter(function(Z){return Z.type==="alignment"}).forEach(function(Z){return Q.createAlignment(Z)})},U.prototype.setupVariablesAndBounds=function(z,Q,$,Z){this.nodes.forEach(function(X,K){X.fixed?(X.variable.weight=X.fixedWeight?X.fixedWeight:1e3,$[K]=Z(X)):X.variable.weight=1;var ae=(X.width||0)/2,se=(X.height||0)/2,le=z[K],he=Q[K];X.bounds=new c(le-ae,le+ae,he-se,he+se)})},U.prototype.xProject=function(z,Q,$){!this.rootGroup&&!(this.avoidOverlaps||this.xConstraints)||this.project(z,Q,z,$,function(Z){return Z.px},this.xConstraints,I,function(Z){return Z.bounds.setXCentre($[Z.variable.index]=Z.variable.position())},function(Z){var X=$[Z.minVar.index]=Z.minVar.position(),K=$[Z.maxVar.index]=Z.maxVar.position(),ae=Z.padding/2;Z.bounds.x=X-ae,Z.bounds.X=K+ae})},U.prototype.yProject=function(z,Q,$){!this.rootGroup&&!this.yConstraints||this.project(z,Q,Q,$,function(Z){return Z.py},this.yConstraints,D,function(Z){return Z.bounds.setYCentre($[Z.variable.index]=Z.variable.position())},function(Z){var X=$[Z.minVar.index]=Z.minVar.position(),K=$[Z.maxVar.index]=Z.maxVar.position(),ae=Z.padding/2;Z.bounds.y=X-ae,Z.bounds.Y=K+ae})},U.prototype.projectFunctions=function(){var z=this;return[function(Q,$,Z){return z.xProject(Q,$,Z)},function(Q,$,Z){return z.yProject(Q,$,Z)}]},U.prototype.project=function(z,Q,$,Z,X,K,ae,se,le){this.setupVariablesAndBounds(z,Q,Z,X),this.rootGroup&&this.avoidOverlaps&&(s(this.rootGroup),K=K.concat(ae(this.rootGroup))),this.solve(this.variables,K,$,Z),this.nodes.forEach(se),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(le),s(this.rootGroup))},U.prototype.solve=function(z,Q,$,Z){var X=new r.Solver(z,Q);X.setStartingPositions($),X.setDesiredPositions(Z),X.solve()},U}();return As.Projection=G,As}var u2={},H0={},fV;function hV(){if(fV)return H0;fV=1,Object.defineProperty(H0,"__esModule",{value:!0});var t=function(){function a(s){this.elem=s,this.subheaps=[]}return a.prototype.toString=function(s){for(var c="",f=!1,h=0;h<this.subheaps.length;++h){var d=this.subheaps[h];if(!d.elem){f=!1;continue}f&&(c=c+","),c=c+d.toString(s),f=!0}return c!==""&&(c="("+c+")"),(this.elem?s(this.elem):"")+c},a.prototype.forEach=function(s){this.empty()||(s(this.elem,this),this.subheaps.forEach(function(c){return c.forEach(s)}))},a.prototype.count=function(){return this.empty()?0:1+this.subheaps.reduce(function(s,c){return s+c.count()},0)},a.prototype.min=function(){return this.elem},a.prototype.empty=function(){return this.elem==null},a.prototype.contains=function(s){if(this===s)return!0;for(var c=0;c<this.subheaps.length;c++)if(this.subheaps[c].contains(s))return!0;return!1},a.prototype.isHeap=function(s){var c=this;return this.subheaps.every(function(f){return s(c.elem,f.elem)&&f.isHeap(s)})},a.prototype.insert=function(s,c){return this.merge(new a(s),c)},a.prototype.merge=function(s,c){return this.empty()?s:s.empty()?this:c(this.elem,s.elem)?(this.subheaps.push(s),this):(s.subheaps.push(this),s)},a.prototype.removeMin=function(s){return this.empty()?null:this.mergePairs(s)},a.prototype.mergePairs=function(s){if(this.subheaps.length==0)return new a(null);if(this.subheaps.length==1)return this.subheaps[0];var c=this.subheaps.pop().merge(this.subheaps.pop(),s),f=this.mergePairs(s);return c.merge(f,s)},a.prototype.decreaseKey=function(s,c,f,h){var d=s.removeMin(h);s.elem=d.elem,s.subheaps=d.subheaps,f!==null&&d.elem!==null&&f(s.elem,s);var p=new a(c);return f!==null&&f(c,p),this.merge(p,h)},a}();H0.PairingHeap=t;var r=function(){function a(s){this.lessThan=s}return a.prototype.top=function(){return this.empty()?null:this.root.elem},a.prototype.push=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];for(var f,h=0,d;d=s[h];++h)f=new t(d),this.root=this.empty()?f:this.root.merge(f,this.lessThan);return f},a.prototype.empty=function(){return!this.root||!this.root.elem},a.prototype.isHeap=function(){return this.root.isHeap(this.lessThan)},a.prototype.forEach=function(s){this.root.forEach(s)},a.prototype.pop=function(){if(this.empty())return null;var s=this.root.min();return this.root=this.root.removeMin(this.lessThan),s},a.prototype.reduceKey=function(s,c,f){f===void 0&&(f=null),this.root=this.root.decreaseKey(s,c,f,this.lessThan)},a.prototype.toString=function(s){return this.root.toString(s)},a.prototype.count=function(){return this.root.count()},a}();return H0.PriorityQueue=r,H0}var dV;function c2(){if(dV)return u2;dV=1,Object.defineProperty(u2,"__esModule",{value:!0});var t=hV(),r=function(){function f(h,d){this.id=h,this.distance=d}return f}(),a=function(){function f(h){this.id=h,this.neighbours=[]}return f}(),s=function(){function f(h,d,p){this.node=h,this.prev=d,this.d=p}return f}(),c=function(){function f(h,d,p,b,m){this.n=h,this.es=d,this.neighbours=new Array(this.n);for(var w=this.n;w--;)this.neighbours[w]=new a(w);for(w=this.es.length;w--;){var k=this.es[w],P=p(k),S=b(k),M=m(k);this.neighbours[P].neighbours.push(new r(S,M)),this.neighbours[S].neighbours.push(new r(P,M))}}return f.prototype.DistanceMatrix=function(){for(var h=new Array(this.n),d=0;d<this.n;++d)h[d]=this.dijkstraNeighbours(d);return h},f.prototype.DistancesFromNode=function(h){return this.dijkstraNeighbours(h)},f.prototype.PathFromNodeToNode=function(h,d){return this.dijkstraNeighbours(h,d)},f.prototype.PathFromNodeToNodeWithPrevCost=function(h,d,p){var b=new t.PriorityQueue(function(D,R){return D.d<=R.d}),m=this.neighbours[h],w=new s(m,null,0),k={};for(b.push(w);!b.empty()&&(w=b.pop(),m=w.node,m.id!==d);)for(var P=m.neighbours.length;P--;){var S=m.neighbours[P],M=this.neighbours[S.id];if(!(w.prev&&M.id===w.prev.node.id)){var L=M.id+","+m.id;if(!(L in k&&k[L]<=w.d)){var T=w.prev?p(w.prev.node.id,m.id,M.id):0,j=w.d+S.distance+T;k[L]=j,b.push(new s(M,w,j))}}}for(var I=[];w.prev;)w=w.prev,I.push(w.node.id);return I},f.prototype.dijkstraNeighbours=function(h,d){d===void 0&&(d=-1);for(var p=new t.PriorityQueue(function(T,j){return T.d<=j.d}),b=this.neighbours.length,m=new Array(b);b--;){var w=this.neighbours[b];w.d=b===h?0:Number.POSITIVE_INFINITY,w.q=p.push(w)}for(;!p.empty();){var k=p.pop();if(m[k.id]=k.d,k.id===d){for(var P=[],S=k;typeof S.prev<"u";)P.push(S.prev.id),S=S.prev;return P}for(b=k.neighbours.length;b--;){var M=k.neighbours[b],S=this.neighbours[M.id],L=k.d+M.distance;k.d!==Number.MAX_VALUE&&S.d>L&&(S.d=L,S.prev=k,p.reduceKey(S.q,S,function(j,I){return j.q=I}))}}return m},f}();return u2.Calculator=c,u2}var Xi={},pV;function gV(){if(pV)return Xi;pV=1;var t=zr&&zr.__extends||function(){var X=function(K,ae){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,le){se.__proto__=le}||function(se,le){for(var he in le)le.hasOwnProperty(he)&&(se[he]=le[he])},X(K,ae)};return function(K,ae){X(K,ae);function se(){this.constructor=K}K.prototype=ae===null?Object.create(ae):(se.prototype=ae.prototype,new se)}}();Object.defineProperty(Xi,"__esModule",{value:!0});var r=G0(),a=function(){function X(){}return X}();Xi.Point=a;var s=function(){function X(K,ae,se,le){this.x1=K,this.y1=ae,this.x2=se,this.y2=le}return X}();Xi.LineSegment=s;var c=function(X){t(K,X);function K(){return X!==null&&X.apply(this,arguments)||this}return K}(a);Xi.PolyPoint=c;function f(X,K,ae){return(K.x-X.x)*(ae.y-X.y)-(ae.x-X.x)*(K.y-X.y)}Xi.isLeft=f;function h(X,K,ae){return f(X,K,ae)>0}function d(X,K,ae){return f(X,K,ae)<0}function p(X){var K=X.slice(0).sort(function(xe,Se){return xe.x!==Se.x?Se.x-xe.x:Se.y-xe.y}),ae=X.length,se,le=0,he=K[0].x;for(se=1;se<ae&&K[se].x===he;++se);var fe=se-1,pe=[];if(pe.push(K[le]),fe===ae-1)K[fe].y!==K[le].y&&pe.push(K[fe]);else{var me,Te=ae-1,Le=K[ae-1].x;for(se=ae-2;se>=0&&K[se].x===Le;se--);for(me=se+1,se=fe;++se<=me;)if(!(f(K[le],K[me],K[se])>=0&&se<me)){for(;pe.length>1&&!(f(pe[pe.length-2],pe[pe.length-1],K[se])>0);)pe.length-=1;se!=le&&pe.push(K[se])}Te!=me&&pe.push(K[Te]);var ge=pe.length;for(se=me;--se>=fe;)if(!(f(K[Te],K[fe],K[se])>=0&&se>fe)){for(;pe.length>ge&&!(f(pe[pe.length-2],pe[pe.length-1],K[se])>0);)pe.length-=1;se!=le&&pe.push(K[se])}}return pe}Xi.ConvexHull=p;function b(X,K,ae){K.slice(0).sort(function(se,le){return Math.atan2(se.y-X.y,se.x-X.x)-Math.atan2(le.y-X.y,le.x-X.x)}).forEach(ae)}Xi.clockwiseRadialSweep=b;function m(X,K){var ae=K.slice(0);return ae.push(K[0]),{rtan:w(X,ae),ltan:k(X,ae)}}function w(X,K){var ae=K.length-1,se,le,he,fe,pe;if(d(X,K[1],K[0])&&!h(X,K[ae-1],K[0]))return 0;for(se=0,le=ae;;){if(le-se===1)return h(X,K[se],K[le])?se:le;if(he=Math.floor((se+le)/2),pe=d(X,K[he+1],K[he]),pe&&!h(X,K[he-1],K[he]))return he;fe=h(X,K[se+1],K[se]),fe?pe||h(X,K[se],K[he])?le=he:se=he:pe&&d(X,K[se],K[he])?le=he:se=he}}function k(X,K){var ae=K.length-1,se,le,he,fe,pe;if(h(X,K[ae-1],K[0])&&!d(X,K[1],K[0]))return 0;for(se=0,le=ae;;){if(le-se===1)return d(X,K[se],K[le])?se:le;if(he=Math.floor((se+le)/2),pe=d(X,K[he+1],K[he]),h(X,K[he-1],K[he])&&!pe)return he;fe=d(X,K[se+1],K[se]),fe?pe?d(X,K[se],K[he])?le=he:se=he:le=he:pe?se=he:h(X,K[se],K[he])?le=he:se=he}}function P(X,K,ae,se,le,he){var fe,pe;fe=ae(K[0],X),pe=se(X[fe],K);for(var me=!1;!me;){for(me=!0;fe===X.length-1&&(fe=0),!le(K[pe],X[fe],X[fe+1]);)++fe;for(;pe===0&&(pe=K.length-1),!he(X[fe],K[pe],K[pe-1]);)--pe,me=!1}return{t1:fe,t2:pe}}Xi.tangent_PolyPolyC=P;function S(X,K){var ae=M(K,X);return{t1:ae.t2,t2:ae.t1}}Xi.LRtangent_PolyPolyC=S;function M(X,K){return P(X,K,w,k,h,d)}Xi.RLtangent_PolyPolyC=M;function L(X,K){return P(X,K,k,k,d,d)}Xi.LLtangent_PolyPolyC=L;function T(X,K){return P(X,K,w,w,h,h)}Xi.RRtangent_PolyPolyC=T;var j=function(){function X(K,ae){this.t1=K,this.t2=ae}return X}();Xi.BiTangent=j;var I=function(){function X(){}return X}();Xi.BiTangents=I;var D=function(X){t(K,X);function K(){return X!==null&&X.apply(this,arguments)||this}return K}(a);Xi.TVGPoint=D;var R=function(){function X(K,ae,se,le){this.id=K,this.polyid=ae,this.polyvertid=se,this.p=le,le.vv=this}return X}();Xi.VisibilityVertex=R;var Y=function(){function X(K,ae){this.source=K,this.target=ae}return X.prototype.length=function(){var K=this.source.p.x-this.target.p.x,ae=this.source.p.y-this.target.p.y;return Math.sqrt(K*K+ae*ae)},X}();Xi.VisibilityEdge=Y;var G=function(){function X(K,ae){if(this.P=K,this.V=[],this.E=[],ae)this.V=ae.V.slice(0),this.E=ae.E.slice(0);else{for(var se=K.length,le=0;le<se;le++){for(var he=K[le],fe=0;fe<he.length;++fe){var pe=he[fe],me=new R(this.V.length,le,fe,pe);this.V.push(me),fe>0&&this.E.push(new Y(he[fe-1].vv,me))}he.length>1&&this.E.push(new Y(he[0].vv,he[he.length-1].vv))}for(var le=0;le<se-1;le++)for(var Te=K[le],fe=le+1;fe<se;fe++){var Le=K[fe],ge=z(Te,Le);for(var xe in ge){var Se=ge[xe],Ie=Te[Se.t1],Re=Le[Se.t2];this.addEdgeIfVisible(Ie,Re,le,fe)}}}}return X.prototype.addEdgeIfVisible=function(K,ae,se,le){this.intersectsPolys(new s(K.x,K.y,ae.x,ae.y),se,le)||this.E.push(new Y(K.vv,ae.vv))},X.prototype.addPoint=function(K,ae){var se=this.P.length;this.V.push(new R(this.V.length,se,0,K));for(var le=0;le<se;++le)if(le!==ae){var he=this.P[le],fe=m(K,he);this.addEdgeIfVisible(K,he[fe.ltan],ae,le),this.addEdgeIfVisible(K,he[fe.rtan],ae,le)}return K.vv},X.prototype.intersectsPolys=function(K,ae,se){for(var le=0,he=this.P.length;le<he;++le)if(le!=ae&&le!=se&&U(K,this.P[le]).length>0)return!0;return!1},X}();Xi.TangentVisibilityGraph=G;function U(X,K){for(var ae=[],se=1,le=K.length;se<le;++se){var he=r.Rectangle.lineIntersection(X.x1,X.y1,X.x2,X.y2,K[se-1].x,K[se-1].y,K[se].x,K[se].y);he&&ae.push(he)}return ae}function z(X,K){for(var ae=X.length-1,se=K.length-1,le=new I,he=0;he<ae;++he)for(var fe=0;fe<se;++fe){var pe=X[he==0?ae-1:he-1],me=X[he],Te=X[he+1],Le=K[fe==0?se-1:fe-1],ge=K[fe],xe=K[fe+1],Se=f(pe,me,ge),Ie=f(me,Le,ge),Re=f(me,ge,xe),Ne=f(Le,ge,me),Me=f(ge,pe,me),ke=f(ge,me,Te);Se>=0&&Ie>=0&&Re<0&&Ne>=0&&Me>=0&&ke<0?le.ll=new j(he,fe):Se<=0&&Ie<=0&&Re>0&&Ne<=0&&Me<=0&&ke>0?le.rr=new j(he,fe):Se<=0&&Ie>0&&Re<=0&&Ne>=0&&Me<0&&ke>=0?le.rl=new j(he,fe):Se>=0&&Ie<0&&Re>=0&&Ne<=0&&Me>0&&ke<=0&&(le.lr=new j(he,fe))}return le}Xi.tangents=z;function Q(X,K){for(var ae=1,se=K.length;ae<se;++ae)if(d(K[ae-1],K[ae],X))return!1;return!0}function $(X,K){return!X.every(function(ae){return!Q(ae,K)})}function Z(X,K){if($(X,K)||$(K,X))return!0;for(var ae=1,se=X.length;ae<se;++ae){var le=X[ae],he=X[ae-1];if(U(new s(he.x,he.y,le.x,le.y),K).length>0)return!0}return!1}return Xi.polysOverlap=Z,Xi}var z0={},bV;function vV(){if(bV)return z0;bV=1,Object.defineProperty(z0,"__esModule",{value:!0});var t={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4};function r(s,c,f,S,P,p){P===void 0&&(P=1),p===void 0&&(p=!0);var b=0,m=0,w=c,k=f,P=typeof P<"u"?P:1,S=typeof S<"u"?S:0,M=0,L=0,T=0,j=0,I=[];if(s.length==0)return;D(s),Y(s),p&&R(s);function D($){$.forEach(function(X){Z(X)});function Z(X){var K=Number.MAX_VALUE,ae=Number.MAX_VALUE,se=0,le=0;X.array.forEach(function(he){var fe=typeof he.width<"u"?he.width:S,pe=typeof he.height<"u"?he.height:S;fe/=2,pe/=2,se=Math.max(he.x+fe,se),K=Math.min(he.x-fe,K),le=Math.max(he.y+pe,le),ae=Math.min(he.y-pe,ae)}),X.width=se-K,X.height=le-ae}}function R($){$.forEach(function(Z){var X={x:0,y:0};Z.array.forEach(function(se){X.x+=se.x,X.y+=se.y}),X.x/=Z.array.length,X.y/=Z.array.length;var K={x:X.x-Z.width/2,y:X.y-Z.height/2},ae={x:Z.x-K.x+w/2-M/2,y:Z.y-K.y+k/2-L/2};Z.array.forEach(function(se){se.x+=ae.x,se.y+=ae.y})})}function Y($,Z){var X=Number.POSITIVE_INFINITY,K=0;$.sort(function(xe,Se){return Se.height-xe.height}),T=$.reduce(function(xe,Se){return xe.width<Se.width?xe.width:Se.width});for(var ae=Le=T,se=ge=z($),le=0,he=Number.MAX_VALUE,fe=Number.MAX_VALUE,pe=-1,me=Number.MAX_VALUE,Te=Number.MAX_VALUE;me>T||Te>t.FLOAT_EPSILON;){if(pe!=1)var Le=se-(se-ae)/t.GOLDEN_SECTION,he=G($,Le);if(pe!=0)var ge=ae+(se-ae)/t.GOLDEN_SECTION,fe=G($,ge);if(me=Math.abs(Le-ge),Te=Math.abs(he-fe),he<X&&(X=he,K=Le),fe<X&&(X=fe,K=ge),he>fe?(ae=Le,Le=ge,he=fe,pe=1):(se=ge,ge=Le,fe=he,pe=0),le++>100)break}G($,K)}function G($,Z){I=[],M=0,L=0,j=m;for(var X=0;X<$.length;X++){var K=$[X];U(K,Z)}return Math.abs(Q()-P)}function U($,Z){for(var X=void 0,K=0;K<I.length;K++)if(I[K].space_left>=$.height&&I[K].x+I[K].width+$.width+t.PADDING-Z<=t.FLOAT_EPSILON){X=I[K];break}I.push($),X!==void 0?($.x=X.x+X.width+t.PADDING,$.y=X.bottom,$.space_left=$.height,$.bottom=$.y,X.space_left-=$.height+t.PADDING,X.bottom+=$.height+t.PADDING):($.y=j,j+=$.height+t.PADDING,$.x=b,$.bottom=$.y,$.space_left=$.height),$.y+$.height-L>-1e-4&&(L=$.y+$.height-m),$.x+$.width-M>-1e-4&&(M=$.x+$.width-b)}function z($){var Z=0;return $.forEach(function(X){return Z+=X.width+t.PADDING}),Z}function Q(){return M/L}}z0.applyPacking=r;function a(s,c){for(var f={},h={},d=[],p=0,b=0;b<c.length;b++){var m=c[b],w=m.source,k=m.target;h[w.index]?h[w.index].push(k):h[w.index]=[k],h[k.index]?h[k.index].push(w):h[k.index]=[w]}for(var b=0;b<s.length;b++){var P=s[b];f[P.index]||S(P,!0)}function S(M,L){if(f[M.index]===void 0){L&&(p++,d.push({array:[]})),f[M.index]=p,d[p-1].array.push(M);var T=h[M.index];if(T)for(var j=0;j<T.length;j++)S(T[j],!1)}}return d}return z0.separateGraphs=a,z0}var yV;function U0(){return yV||(yV=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});var r=iV(),a=MM(),s=jM(),c=G0(),f=c2(),h=gV(),d=vV(),p;(function(w){w[w.start=0]="start",w[w.tick=1]="tick",w[w.end=2]="end"})(p=t.EventType||(t.EventType={}));function b(w){return typeof w.leaves<"u"||typeof w.groups<"u"}var m=function(){function w(){var k=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:w.getSourceIndex,getTargetIndex:w.getTargetIndex,setLength:w.setLinkLength,getType:function(P){return typeof k._linkType=="function"?k._linkType(P):0}}}return w.prototype.on=function(k,P){return this.event||(this.event={}),typeof k=="string"?this.event[p[k]]=P:this.event[k]=P,this},w.prototype.trigger=function(k){this.event&&typeof this.event[k.type]<"u"&&this.event[k.type](k)},w.prototype.kick=function(){for(;!this.tick(););},w.prototype.tick=function(){if(this._alpha<this._threshold)return this._running=!1,this.trigger({type:p.end,alpha:this._alpha=0,stress:this._lastStress}),!0;var k=this._nodes.length;this._links.length;var P,S;for(this._descent.locks.clear(),S=0;S<k;++S)if(P=this._nodes[S],P.fixed){(typeof P.px>"u"||typeof P.py>"u")&&(P.px=P.x,P.py=P.y);var M=[P.px,P.py];this._descent.locks.add(S,M)}var L=this._descent.rungeKutta();return L===0?this._alpha=0:typeof this._lastStress<"u"&&(this._alpha=L),this._lastStress=L,this.updateNodePositions(),this.trigger({type:p.tick,alpha:this._alpha,stress:this._lastStress}),!1},w.prototype.updateNodePositions=function(){for(var k=this._descent.x[0],P=this._descent.x[1],S,M=this._nodes.length;M--;)S=this._nodes[M],S.x=k[M],S.y=P[M]},w.prototype.nodes=function(k){if(!k){if(this._nodes.length===0&&this._links.length>0){var P=0;this._links.forEach(function(M){P=Math.max(P,M.source,M.target)}),this._nodes=new Array(++P);for(var S=0;S<P;++S)this._nodes[S]={}}return this._nodes}return this._nodes=k,this},w.prototype.groups=function(k){var P=this;return k?(this._groups=k,this._rootGroup={},this._groups.forEach(function(S){typeof S.padding>"u"&&(S.padding=1),typeof S.leaves<"u"&&S.leaves.forEach(function(M,L){typeof M=="number"&&((S.leaves[L]=P._nodes[M]).parent=S)}),typeof S.groups<"u"&&S.groups.forEach(function(M,L){typeof M=="number"&&((S.groups[L]=P._groups[M]).parent=S)})}),this._rootGroup.leaves=this._nodes.filter(function(S){return typeof S.parent>"u"}),this._rootGroup.groups=this._groups.filter(function(S){return typeof S.parent>"u"}),this):this._groups},w.prototype.powerGraphGroups=function(k){var P=r.getGroups(this._nodes,this._links,this.linkAccessor,this._rootGroup);return this.groups(P.groups),k(P),this},w.prototype.avoidOverlaps=function(k){return arguments.length?(this._avoidOverlaps=k,this):this._avoidOverlaps},w.prototype.handleDisconnected=function(k){return arguments.length?(this._handleDisconnected=k,this):this._handleDisconnected},w.prototype.flowLayout=function(k,P){return arguments.length||(k="y"),this._directedLinkConstraints={axis:k,getMinSeparation:typeof P=="number"?function(){return P}:P},this},w.prototype.links=function(k){return arguments.length?(this._links=k,this):this._links},w.prototype.constraints=function(k){return arguments.length?(this._constraints=k,this):this._constraints},w.prototype.distanceMatrix=function(k){return arguments.length?(this._distanceMatrix=k,this):this._distanceMatrix},w.prototype.size=function(k){return k?(this._canvasSize=k,this):this._canvasSize},w.prototype.defaultNodeSize=function(k){return k?(this._defaultNodeSize=k,this):this._defaultNodeSize},w.prototype.groupCompactness=function(k){return k?(this._groupCompactness=k,this):this._groupCompactness},w.prototype.linkDistance=function(k){return k?(this._linkDistance=typeof k=="function"?k:+k,this._linkLengthCalculator=null,this):this._linkDistance},w.prototype.linkType=function(k){return this._linkType=k,this},w.prototype.convergenceThreshold=function(k){return k?(this._threshold=typeof k=="function"?k:+k,this):this._threshold},w.prototype.alpha=function(k){return arguments.length?(k=+k,this._alpha?k>0?this._alpha=k:this._alpha=0:k>0&&(this._running||(this._running=!0,this.trigger({type:p.start,alpha:this._alpha=k}),this.kick())),this):this._alpha},w.prototype.getLinkLength=function(k){return typeof this._linkDistance=="function"?+this._linkDistance(k):this._linkDistance},w.setLinkLength=function(k,P){k.length=P},w.prototype.getLinkType=function(k){return typeof this._linkType=="function"?this._linkType(k):0},w.prototype.symmetricDiffLinkLengths=function(k,P){var S=this;return P===void 0&&(P=1),this.linkDistance(function(M){return k*M.length}),this._linkLengthCalculator=function(){return a.symmetricDiffLinkLengths(S._links,S.linkAccessor,P)},this},w.prototype.jaccardLinkLengths=function(k,P){var S=this;return P===void 0&&(P=1),this.linkDistance(function(M){return k*M.length}),this._linkLengthCalculator=function(){return a.jaccardLinkLengths(S._links,S.linkAccessor,P)},this},w.prototype.start=function(k,P,S,M,L,T){var j=this;k===void 0&&(k=0),P===void 0&&(P=0),S===void 0&&(S=0),M===void 0&&(M=0),L===void 0&&(L=!0),T===void 0&&(T=!0);var I,D=this.nodes().length,R=D+2*this._groups.length;this._links.length;var Y=this._canvasSize[0],G=this._canvasSize[1],U=new Array(R),z=new Array(R),Q=null,$=this._avoidOverlaps;this._nodes.forEach(function(fe,pe){fe.index=pe,typeof fe.x>"u"&&(fe.x=Y/2,fe.y=G/2),U[pe]=fe.x,z[pe]=fe.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var Z;this._distanceMatrix?Z=this._distanceMatrix:(Z=new f.Calculator(R,this._links,w.getSourceIndex,w.getTargetIndex,function(fe){return j.getLinkLength(fe)}).DistanceMatrix(),Q=s.Descent.createSquareMatrix(R,function(){return 2}),this._links.forEach(function(fe){typeof fe.source=="number"&&(fe.source=j._nodes[fe.source]),typeof fe.target=="number"&&(fe.target=j._nodes[fe.target])}),this._links.forEach(function(fe){var pe=w.getSourceIndex(fe),me=w.getTargetIndex(fe);Q[pe][me]=Q[me][pe]=fe.weight||1}));var X=s.Descent.createSquareMatrix(R,function(fe,pe){return Z[fe][pe]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var I=D,K=function(pe,me,Te,Le){Q[pe][me]=Q[me][pe]=Te,X[pe][me]=X[me][pe]=Le};this._groups.forEach(function(pe){K(I,I+1,j._groupCompactness,.1),U[I]=0,z[I++]=0,U[I]=0,z[I++]=0})}else this._rootGroup={leaves:this._nodes,groups:[]};var ae=this._constraints||[];this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,ae=ae.concat(a.generateDirectedEdgeConstraints(D,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new s.Descent([U,z],X),this._descent.locks.clear();for(var I=0;I<D;++I){var se=this._nodes[I];if(se.fixed){se.px=se.x,se.py=se.y;var le=[se.x,se.y];this._descent.locks.add(I,le)}}if(this._descent.threshold=this._threshold,this.initialLayout(k,U,z),ae.length>0&&(this._descent.project=new c.Projection(this._nodes,this._groups,this._rootGroup,ae).projectFunctions()),this._descent.run(P),this.separateOverlappingComponents(Y,G,T),this.avoidOverlaps($),$&&(this._nodes.forEach(function(fe,pe){fe.x=U[pe],fe.y=z[pe]}),this._descent.project=new c.Projection(this._nodes,this._groups,this._rootGroup,ae,!0).projectFunctions(),this._nodes.forEach(function(fe,pe){U[pe]=fe.x,z[pe]=fe.y})),this._descent.G=Q,this._descent.run(S),M){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=D,this._descent.scaleSnapByMaxH=D!=R;var he=s.Descent.createSquareMatrix(R,function(fe,pe){return fe>=D||pe>=D?Q[fe][pe]:0});this._descent.G=he,this._descent.run(M)}return this.updateNodePositions(),this.separateOverlappingComponents(Y,G,T),L?this.resume():this},w.prototype.initialLayout=function(k,P,S){if(this._groups.length>0&&k>0){var M=this._nodes.length,L=this._links.map(function(j){return{source:j.source.index,target:j.target.index}}),T=this._nodes.map(function(j){return{index:j.index}});this._groups.forEach(function(j,I){T.push({index:j.index=M+I})}),this._groups.forEach(function(j,I){typeof j.leaves<"u"&&j.leaves.forEach(function(D){return L.push({source:j.index,target:D.index})}),typeof j.groups<"u"&&j.groups.forEach(function(D){return L.push({source:j.index,target:D.index})})}),new w().size(this.size()).nodes(T).links(L).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(k,0,0,0,!1),this._nodes.forEach(function(j){P[j.index]=T[j.index].x,S[j.index]=T[j.index].y})}else this._descent.run(k)},w.prototype.separateOverlappingComponents=function(k,P,S){var M=this;if(S===void 0&&(S=!0),!this._distanceMatrix&&this._handleDisconnected){var L=this._descent.x[0],T=this._descent.x[1];this._nodes.forEach(function(I,D){I.x=L[D],I.y=T[D]});var j=d.separateGraphs(this._nodes,this._links);d.applyPacking(j,k,P,this._defaultNodeSize,1,S),this._nodes.forEach(function(I,D){M._descent.x[0][D]=I.x,M._descent.x[1][D]=I.y,I.bounds&&(I.bounds.setXCentre(I.x),I.bounds.setYCentre(I.y))})}},w.prototype.resume=function(){return this.alpha(.1)},w.prototype.stop=function(){return this.alpha(0)},w.prototype.prepareEdgeRouting=function(k){k===void 0&&(k=0),this._visibilityGraph=new h.TangentVisibilityGraph(this._nodes.map(function(P){return P.bounds.inflate(-k).vertices()}))},w.prototype.routeEdge=function(k,P,S){P===void 0&&(P=5);var M=[],L=new h.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),T={x:k.source.x,y:k.source.y},j={x:k.target.x,y:k.target.y},I=L.addPoint(T,k.source.index),D=L.addPoint(j,k.target.index);L.addEdgeIfVisible(T,j,k.source.index,k.target.index),typeof S<"u"&&S(L);var R=function(ae){return ae.source.id},Y=function(ae){return ae.target.id},G=function(ae){return ae.length()},U=new f.Calculator(L.V.length,L.E,R,Y,G),z=U.PathFromNodeToNode(I.id,D.id);if(z.length===1||z.length===L.V.length){var Q=c.makeEdgeBetween(k.source.innerBounds,k.target.innerBounds,P);M=[Q.sourceIntersection,Q.arrowStart]}else{for(var $=z.length-2,Z=L.V[z[$]].p,X=L.V[z[0]].p,M=[k.source.innerBounds.rayIntersection(Z.x,Z.y)],K=$;K>=0;--K)M.push(L.V[z[K]].p);M.push(c.makeEdgeTo(X,k.target.innerBounds,P))}return M},w.getSourceIndex=function(k){return typeof k.source=="number"?k.source:k.source.index},w.getTargetIndex=function(k){return typeof k.target=="number"?k.target:k.target.index},w.linkId=function(k){return w.getSourceIndex(k)+"-"+w.getTargetIndex(k)},w.dragStart=function(k){b(k)?w.storeOffset(k,w.dragOrigin(k)):(w.stopNode(k),k.fixed|=2)},w.stopNode=function(k){k.px=k.x,k.py=k.y},w.storeOffset=function(k,P){typeof k.leaves<"u"&&k.leaves.forEach(function(S){S.fixed|=2,w.stopNode(S),S._dragGroupOffsetX=S.x-P.x,S._dragGroupOffsetY=S.y-P.y}),typeof k.groups<"u"&&k.groups.forEach(function(S){return w.storeOffset(S,P)})},w.dragOrigin=function(k){return b(k)?{x:k.bounds.cx(),y:k.bounds.cy()}:k},w.drag=function(k,P){b(k)?(typeof k.leaves<"u"&&k.leaves.forEach(function(S){k.bounds.setXCentre(P.x),k.bounds.setYCentre(P.y),S.px=S._dragGroupOffsetX+P.x,S.py=S._dragGroupOffsetY+P.y}),typeof k.groups<"u"&&k.groups.forEach(function(S){return w.drag(S,P)})):(k.px=P.x,k.py=P.y)},w.dragEnd=function(k){b(k)?(typeof k.leaves<"u"&&k.leaves.forEach(function(P){w.dragEnd(P),delete P._dragGroupOffsetX,delete P._dragGroupOffsetY}),typeof k.groups<"u"&&k.groups.forEach(w.dragEnd)):k.fixed&=-7},w.mouseOver=function(k){k.fixed|=4,k.px=k.x,k.py=k.y},w.mouseOut=function(k){k.fixed&=-5},w}();t.Layout=m}(nV)),nV}var mV;function Qbe(){if(mV)return R0;mV=1;var t=zr&&zr.__extends||function(){var c=function(f,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var b in p)p.hasOwnProperty(b)&&(d[b]=p[b])},c(f,h)};return function(f,h){c(f,h);function d(){this.constructor=f}f.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}}();Object.defineProperty(R0,"__esModule",{value:!0});var r=U0(),a=function(c){t(f,c);function f(h){var d=c.call(this)||this,p=h;return p.trigger&&(d.trigger=p.trigger),p.kick&&(d.kick=p.kick),p.drag&&(d.drag=p.drag),p.on&&(d.on=p.on),d.dragstart=d.dragStart=r.Layout.dragStart,d.dragend=d.dragEnd=r.Layout.dragEnd,d}return f.prototype.trigger=function(h){},f.prototype.kick=function(){},f.prototype.drag=function(){},f.prototype.on=function(h,d){return this},f}(r.Layout);R0.LayoutAdaptor=a;function s(c){return new a(c)}return R0.adaptor=s,R0}var l2={},F0={},wV;function Wbe(){if(wV)return F0;wV=1;var t=zr&&zr.__extends||function(){var c=function(f,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var b in p)p.hasOwnProperty(b)&&(d[b]=p[b])},c(f,h)};return function(f,h){c(f,h);function d(){this.constructor=f}f.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}}();Object.defineProperty(F0,"__esModule",{value:!0});var r=U0(),a=function(c){t(f,c);function f(){var h=c.call(this)||this;h.event=d3.dispatch(r.EventType[r.EventType.start],r.EventType[r.EventType.tick],r.EventType[r.EventType.end]);var d=h;return h.drag=function(){if(!p)var p=d3.behavior.drag().origin(r.Layout.dragOrigin).on("dragstart.d3adaptor",r.Layout.dragStart).on("drag.d3adaptor",function(b){r.Layout.drag(b,d3.event),d.resume()}).on("dragend.d3adaptor",r.Layout.dragEnd);if(!arguments.length)return p;this.call(p)},h}return f.prototype.trigger=function(h){var d={type:r.EventType[h.type],alpha:h.alpha,stress:h.stress};this.event[d.type](d)},f.prototype.kick=function(){var h=this;d3.timer(function(){return c.prototype.tick.call(h)})},f.prototype.on=function(h,d){return typeof h=="string"?this.event.on(h,d):this.event.on(r.EventType[h],d),this},f}(r.Layout);F0.D3StyleLayoutAdaptor=a;function s(){return new a}return F0.d3adaptor=s,F0}var f2={},xV;function Jbe(){if(xV)return f2;xV=1;var t=zr&&zr.__extends||function(){var s=function(c,f){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var p in d)d.hasOwnProperty(p)&&(h[p]=d[p])},s(c,f)};return function(c,f){s(c,f);function h(){this.constructor=c}c.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}}();Object.defineProperty(f2,"__esModule",{value:!0});var r=U0(),a=function(s){t(c,s);function c(f){var h=s.call(this)||this;h.d3Context=f,h.event=f.dispatch(r.EventType[r.EventType.start],r.EventType[r.EventType.tick],r.EventType[r.EventType.end]);var d=h;return h.drag=function(){if(!p)var p=f.drag().subject(r.Layout.dragOrigin).on("start.d3adaptor",r.Layout.dragStart).on("drag.d3adaptor",function(b){r.Layout.drag(b,f.event),d.resume()}).on("end.d3adaptor",r.Layout.dragEnd);if(!arguments.length)return p;arguments[0].call(p)},h}return c.prototype.trigger=function(f){var h={type:r.EventType[f.type],alpha:f.alpha,stress:f.stress};this.event.call(h.type,h)},c.prototype.kick=function(){var f=this,h=this.d3Context.timer(function(){return s.prototype.tick.call(f)&&h.stop()})},c.prototype.on=function(f,h){return typeof f=="string"?this.event.on(f,h):this.event.on(r.EventType[f],h),this},c}(r.Layout);return f2.D3StyleLayoutAdaptor=a,f2}var kV;function Xbe(){if(kV)return l2;kV=1,Object.defineProperty(l2,"__esModule",{value:!0});var t=Wbe(),r=Jbe();function a(c){return!c||s(c)?new t.D3StyleLayoutAdaptor:new r.D3StyleLayoutAdaptor(c)}l2.d3adaptor=a;function s(c){var f=/^3\./;return c.version&&c.version.match(f)!==null}return l2}var ep={},_V;function EV(){if(_V)return ep;_V=1,Object.defineProperty(ep,"__esModule",{value:!0});var t=G0(),r=AM(),a=c2(),s=function(){function d(p,b,m){this.id=p,this.rect=b,this.children=m,this.leaf=typeof m>"u"||m.length===0}return d}();ep.NodeWrapper=s;var c=function(){function d(p,b,m,w,k){w===void 0&&(w=null),k===void 0&&(k=null),this.id=p,this.x=b,this.y=m,this.node=w,this.line=k}return d}();ep.Vert=c;var f=function(){function d(p,b){this.s=p,this.t=b;var m=d.findMatch(p,b),w=b.slice(0).reverse(),k=d.findMatch(p,w);m.length>=k.length?(this.length=m.length,this.si=m.si,this.ti=m.ti,this.reversed=!1):(this.length=k.length,this.si=k.si,this.ti=b.length-k.ti-k.length,this.reversed=!0)}return d.findMatch=function(p,b){for(var m=p.length,w=b.length,k={length:0,si:-1,ti:-1},P=new Array(m),S=0;S<m;S++){P[S]=new Array(w);for(var M=0;M<w;M++)if(p[S]===b[M]){var L=P[S][M]=S===0||M===0?1:P[S-1][M-1]+1;L>k.length&&(k.length=L,k.si=S-L+1,k.ti=M-L+1)}else P[S][M]=0}return k},d.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},d}();ep.LongestCommonSubsequence=f;var h=function(){function d(p,b,m){var w=this;m===void 0&&(m=12),this.originalnodes=p,this.groupPadding=m,this.leaves=null,this.nodes=p.map(function(Y,G){return new s(G,b.getBounds(Y),b.getChildren(Y))}),this.leaves=this.nodes.filter(function(Y){return Y.leaf}),this.groups=this.nodes.filter(function(Y){return!Y.leaf}),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach(function(Y){return Y.children.forEach(function(G){return w.nodes[G].parent=Y})}),this.root={children:[]},this.nodes.forEach(function(Y){typeof Y.parent>"u"&&(Y.parent=w.root,w.root.children.push(Y.id)),Y.ports=[]}),this.backToFront=this.nodes.slice(0),this.backToFront.sort(function(Y,G){return w.getDepth(Y)-w.getDepth(G)});var k=this.backToFront.slice(0).reverse().filter(function(Y){return!Y.leaf});k.forEach(function(Y){var G=t.Rectangle.empty();Y.children.forEach(function(U){return G=G.union(w.nodes[U].rect)}),Y.rect=G.inflate(w.groupPadding)});var P=this.midPoints(this.cols.map(function(Y){return Y.pos})),S=this.midPoints(this.rows.map(function(Y){return Y.pos})),M=P[0],L=P[P.length-1],T=S[0],j=S[S.length-1],I=this.rows.map(function(Y){return{x1:M,x2:L,y1:Y.pos,y2:Y.pos}}).concat(S.map(function(Y){return{x1:M,x2:L,y1:Y,y2:Y}})),D=this.cols.map(function(Y){return{x1:Y.pos,x2:Y.pos,y1:T,y2:j}}).concat(P.map(function(Y){return{x1:Y,x2:Y,y1:T,y2:j}})),R=I.concat(D);R.forEach(function(Y){return Y.verts=[]}),this.verts=[],this.edges=[],I.forEach(function(Y){return D.forEach(function(G){var U=new c(w.verts.length,G.x1,Y.y1);Y.verts.push(U),G.verts.push(U),w.verts.push(U);for(var z=w.backToFront.length;z-- >0;){var Q=w.backToFront[z],$=Q.rect,Z=Math.abs(U.x-$.cx()),X=Math.abs(U.y-$.cy());if(Z<$.width()/2&&X<$.height()/2){U.node=Q;break}}})}),R.forEach(function(Y,G){w.nodes.forEach(function(X,K){X.rect.lineIntersections(Y.x1,Y.y1,Y.x2,Y.y2).forEach(function(ae,se){var le=new c(w.verts.length,ae.x,ae.y,X,Y);w.verts.push(le),Y.verts.push(le),X.ports.push(le)})});var U=Math.abs(Y.y1-Y.y2)<.1,z=function(X,K){return U?K.x-X.x:K.y-X.y};Y.verts.sort(z);for(var Q=1;Q<Y.verts.length;Q++){var $=Y.verts[Q-1],Z=Y.verts[Q];$.node&&$.node===Z.node&&$.node.leaf||w.edges.push({source:$.id,target:Z.id,length:Math.abs(z($,Z))})}})}return d.prototype.avg=function(p){return p.reduce(function(b,m){return b+m})/p.length},d.prototype.getGridLines=function(p){for(var b=[],m=this.leaves.slice(0,this.leaves.length);m.length>0;){var w=m.filter(function(P){return P.rect["overlap"+p.toUpperCase()](m[0].rect)}),k={nodes:w,pos:this.avg(w.map(function(P){return P.rect["c"+p]()}))};b.push(k),k.nodes.forEach(function(P){return m.splice(m.indexOf(P),1)})}return b.sort(function(P,S){return P.pos-S.pos}),b},d.prototype.getDepth=function(p){for(var b=0;p.parent!==this.root;)b++,p=p.parent;return b},d.prototype.midPoints=function(p){for(var b=p[1]-p[0],m=[p[0]-b/2],w=1;w<p.length;w++)m.push((p[w]+p[w-1])/2);return m.push(p[p.length-1]+b/2),m},d.prototype.findLineage=function(p){var b=[p];do p=p.parent,b.push(p);while(p!==this.root);return b.reverse()},d.prototype.findAncestorPathBetween=function(p,b){for(var m=this.findLineage(p),w=this.findLineage(b),k=0;m[k]===w[k];)k++;return{commonAncestor:m[k-1],lineages:m.slice(k).concat(w.slice(k))}},d.prototype.siblingObstacles=function(p,b){var m=this,w=this.findAncestorPathBetween(p,b),k={};w.lineages.forEach(function(S){return k[S.id]={}});var P=w.commonAncestor.children.filter(function(S){return!(S in k)});return w.lineages.filter(function(S){return S.parent!==w.commonAncestor}).forEach(function(S){return P=P.concat(S.parent.children.filter(function(M){return M!==S.id}))}),P.map(function(S){return m.nodes[S]})},d.getSegmentSets=function(p,b,m){for(var w=[],k=0;k<p.length;k++)for(var P=p[k],S=0;S<P.length;S++){var M=P[S];M.edgeid=k,M.i=S;var L=M[1][b]-M[0][b];Math.abs(L)<.1&&w.push(M)}w.sort(function(D,R){return D[0][b]-R[0][b]});for(var T=[],j=null,I=0;I<w.length;I++){var M=w[I];(!j||Math.abs(M[0][b]-j.pos)>.1)&&(j={pos:M[0][b],segments:[]},T.push(j)),j.segments.push(M)}return T},d.nudgeSegs=function(p,b,m,w,k,P){var S=w.length;if(!(S<=1)){for(var M=w.map(function(Q){return new r.Variable(Q[0][p])}),L=[],T=0;T<S;T++)for(var j=0;j<S;j++)if(T!==j){var I=w[T],D=w[j],R=I.edgeid,Y=D.edgeid,G=-1,U=-1;p=="x"?k(R,Y)&&(I[0][b]<I[1][b]?(G=j,U=T):(G=T,U=j)):k(R,Y)&&(I[0][b]<I[1][b]?(G=T,U=j):(G=j,U=T)),G>=0&&L.push(new r.Constraint(M[G],M[U],P))}var z=new r.Solver(M,L);z.solve(),M.forEach(function(Q,$){var Z=w[$],X=Q.position();Z[0][p]=Z[1][p]=X;var K=m[Z.edgeid];Z.i>0&&(K[Z.i-1][1][p]=X),Z.i<K.length-1&&(K[Z.i+1][0][p]=X)})}},d.nudgeSegments=function(p,b,m,w,k){for(var P=d.getSegmentSets(p,b,m),S=0;S<P.length;S++){for(var M=P[S],L=[],T=0;T<M.segments.length;T++){var j=M.segments[T];L.push({type:0,s:j,pos:Math.min(j[0][m],j[1][m])}),L.push({type:1,s:j,pos:Math.max(j[0][m],j[1][m])})}L.sort(function(R,Y){return R.pos-Y.pos+R.type-Y.type});var I=[],D=0;L.forEach(function(R){R.type===0?(I.push(R.s),D++):D--,D==0&&(d.nudgeSegs(b,m,p,I,w,k),I=[])})}},d.prototype.routeEdges=function(p,b,m,w){var k=this,P=p.map(function(L){return k.route(m(L),w(L))}),S=d.orderEdges(P),M=P.map(function(L){return d.makeSegments(L)});return d.nudgeSegments(M,"x","y",S,b),d.nudgeSegments(M,"y","x",S,b),d.unreverseEdges(M,P),M},d.unreverseEdges=function(p,b){p.forEach(function(m,w){var k=b[w];k.reversed&&(m.reverse(),m.forEach(function(P){P.reverse()}))})},d.angleBetween2Lines=function(p,b){var m=Math.atan2(p[0].y-p[1].y,p[0].x-p[1].x),w=Math.atan2(b[0].y-b[1].y,b[0].x-b[1].x),k=m-w;return(k>Math.PI||k<-Math.PI)&&(k=w-m),k},d.isLeft=function(p,b,m){return(b.x-p.x)*(m.y-p.y)-(b.y-p.y)*(m.x-p.x)<=0},d.getOrder=function(p){for(var b={},m=0;m<p.length;m++){var w=p[m];typeof b[w.l]>"u"&&(b[w.l]={}),b[w.l][w.r]=!0}return function(k,P){return typeof b[k]<"u"&&b[k][P]}},d.orderEdges=function(p){for(var b=[],m=0;m<p.length-1;m++)for(var w=m+1;w<p.length;w++){var k=p[m],P=p[w],S=new f(k,P),M,L,T;if(S.length!==0){if(S.reversed&&(P.reverse(),P.reversed=!0,S=new f(k,P)),(S.si<=0||S.ti<=0)&&(S.si+S.length>=k.length||S.ti+S.length>=P.length)){b.push({l:m,r:w});continue}S.si+S.length>=k.length||S.ti+S.length>=P.length?(M=k[S.si+1],T=k[S.si-1],L=P[S.ti-1]):(M=k[S.si+S.length-2],L=k[S.si+S.length],T=P[S.ti+S.length]),d.isLeft(M,L,T)?b.push({l:w,r:m}):b.push({l:m,r:w})}}return d.getOrder(b)},d.makeSegments=function(p){function b(L){return{x:L.x,y:L.y}}for(var m=function(L,T,j){return Math.abs((T.x-L.x)*(j.y-L.y)-(T.y-L.y)*(j.x-L.x))<.001},w=[],k=b(p[0]),P=1;P<p.length;P++){var S=b(p[P]),M=P<p.length-1?p[P+1]:null;(!M||!m(k,S,M))&&(w.push([k,S]),k=S)}return w},d.prototype.route=function(p,b){var m=this,w=this.nodes[p],k=this.nodes[b];this.obstacles=this.siblingObstacles(w,k);var P={};this.obstacles.forEach(function(U){return P[U.id]=U}),this.passableEdges=this.edges.filter(function(U){var z=m.verts[U.source],Q=m.verts[U.target];return!(z.node&&z.node.id in P||Q.node&&Q.node.id in P)});for(var S=1;S<w.ports.length;S++){var M=w.ports[0].id,L=w.ports[S].id;this.passableEdges.push({source:M,target:L,length:0})}for(var S=1;S<k.ports.length;S++){var M=k.ports[0].id,L=k.ports[S].id;this.passableEdges.push({source:M,target:L,length:0})}var T=function(U){return U.source},j=function(U){return U.target},I=function(U){return U.length},D=new a.Calculator(this.verts.length,this.passableEdges,T,j,I),R=function(U,z,Q){var $=m.verts[U],Z=m.verts[z],X=m.verts[Q],K=Math.abs(X.x-$.x),ae=Math.abs(X.y-$.y);return $.node===w&&$.node===Z.node||Z.node===k&&Z.node===X.node?0:K>1&&ae>1?1e3:0},Y=D.PathFromNodeToNodeWithPrevCost(w.ports[0].id,k.ports[0].id,R),G=Y.reverse().map(function(U){return m.verts[U]});return G.push(this.nodes[k.id].ports[0]),G.filter(function(U,z){return!(z<G.length-1&&G[z+1].node===w&&U.node===w||z>0&&U.node===k&&G[z-1].node===k)})},d.getRoutePath=function(p,b,m,w){var k={routepath:"M "+p[0][0].x+" "+p[0][0].y+" ",arrowpath:""};if(p.length>1)for(var P=0;P<p.length;P++){var S=p[P],M=S[1].x,L=S[1].y,T=M-S[0].x,j=L-S[0].y;if(P<p.length-1){Math.abs(T)>0?M-=T/Math.abs(T)*b:L-=j/Math.abs(j)*b,k.routepath+="L "+M+" "+L+" ";var I=p[P+1],D=I[0].x,R=I[0].y,Y=I[1].x,G=I[1].y;T=Y-D,j=G-R;var U=d.angleBetween2Lines(S,I)<0?1:0,z,Q;Math.abs(T)>0?(z=D+T/Math.abs(T)*b,Q=R):(z=D,Q=R+j/Math.abs(j)*b);var $=Math.abs(z-M),Z=Math.abs(Q-L);k.routepath+="A "+$+" "+Z+" 0 0 "+U+" "+z+" "+Q+" "}else{var X=[M,L],K,ae;Math.abs(T)>0?(M-=T/Math.abs(T)*w,K=[M,L+m],ae=[M,L-m]):(L-=j/Math.abs(j)*w,K=[M+m,L],ae=[M-m,L]),k.routepath+="L "+M+" "+L+" ",w>0&&(k.arrowpath="M "+X[0]+" "+X[1]+" L "+K[0]+" "+K[1]+" L "+ae[0]+" "+ae[1])}}else{var S=p[0],M=S[1].x,L=S[1].y,T=M-S[0].x,j=L-S[0].y,X=[M,L],K,ae;Math.abs(T)>0?(M-=T/Math.abs(T)*w,K=[M,L+m],ae=[M,L-m]):(L-=j/Math.abs(j)*w,K=[M+m,L],ae=[M-m,L]),k.routepath+="L "+M+" "+L+" ",w>0&&(k.arrowpath="M "+X[0]+" "+X[1]+" L "+K[0]+" "+K[1]+" L "+ae[0]+" "+ae[1])}return k},d}();return ep.GridRouter=h,ep}var Qg={},CV;function eve(){if(CV)return Qg;CV=1,Object.defineProperty(Qg,"__esModule",{value:!0});var t=c2(),r=jM(),a=G0(),s=MM(),c=function(){function p(b,m){this.source=b,this.target=m}return p.prototype.actualLength=function(b){var m=this;return Math.sqrt(b.reduce(function(w,k){var P=k[m.target]-k[m.source];return w+P*P},0))},p}();Qg.Link3D=c;var f=function(){function p(b,m,w){b===void 0&&(b=0),m===void 0&&(m=0),w===void 0&&(w=0),this.x=b,this.y=m,this.z=w}return p}();Qg.Node3D=f;var h=function(){function p(b,m,w){var k=this;w===void 0&&(w=1),this.nodes=b,this.links=m,this.idealLinkLength=w,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(p.k);for(var P=0;P<p.k;++P)this.result[P]=new Array(b.length);b.forEach(function(S,M){for(var L=0,T=p.dims;L<T.length;L++){var j=T[L];typeof S[j]>"u"&&(S[j]=Math.random())}k.result[0][M]=S.x,k.result[1][M]=S.y,k.result[2][M]=S.z})}return p.prototype.linkLength=function(b){return b.actualLength(this.result)},p.prototype.start=function(b){var m=this;b===void 0&&(b=100);var w=this.nodes.length,k=new d;this.useJaccardLinkLengths&&s.jaccardLinkLengths(this.links,k,1.5),this.links.forEach(function(j){return j.length*=m.idealLinkLength});var P=new t.Calculator(w,this.links,function(j){return j.source},function(j){return j.target},function(j){return j.length}).DistanceMatrix(),S=r.Descent.createSquareMatrix(w,function(j,I){return P[j][I]}),M=r.Descent.createSquareMatrix(w,function(){return 2});this.links.forEach(function(j){var I=j.source,D=j.target;return M[I][D]=M[D][I]=1}),this.descent=new r.Descent(this.result,S),this.descent.threshold=.001,this.descent.G=M,this.constraints&&(this.descent.project=new a.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var L=0;L<this.nodes.length;L++){var T=this.nodes[L];T.fixed&&this.descent.locks.add(L,[T.x,T.y,T.z])}return this.descent.run(b),this},p.prototype.tick=function(){this.descent.locks.clear();for(var b=0;b<this.nodes.length;b++){var m=this.nodes[b];m.fixed&&this.descent.locks.add(b,[m.x,m.y,m.z])}return this.descent.rungeKutta()},p.dims=["x","y","z"],p.k=p.dims.length,p}();Qg.Layout3D=h;var d=function(){function p(){}return p.prototype.getSourceIndex=function(b){return b.source},p.prototype.getTargetIndex=function(b){return b.target},p.prototype.getLength=function(b){return b.length},p.prototype.setLength=function(b,m){b.length=m},p}();return Qg}var Y0={},PV;function tve(){if(PV)return Y0;PV=1,Object.defineProperty(Y0,"__esModule",{value:!0});var t=U0(),r=EV();function a(f,h,d,p){f.cola.start(0,0,0,10,!1);var b=s(f.cola.nodes(),f.cola.groups(),d,p);return b.routeEdges(f.powerGraph.powerEdges,h,function(m){return m.source.routerNode.id},function(m){return m.target.routerNode.id})}Y0.gridify=a;function s(f,h,d,p){f.forEach(function(m){m.routerNode={name:m.name,bounds:m.bounds.inflate(-d)}}),h.forEach(function(m){m.routerNode={bounds:m.bounds.inflate(-p),children:(typeof m.groups<"u"?m.groups.map(function(w){return f.length+w.id}):[]).concat(typeof m.leaves<"u"?m.leaves.map(function(w){return w.index}):[])}});var b=f.concat(h).map(function(m,w){return m.routerNode.id=w,m.routerNode});return new r.GridRouter(b,{getChildren:function(m){return m.children},getBounds:function(m){return m.bounds}},d-p)}function c(f,h,d){var p;f.nodes.forEach(function(k,P){return k.index=P}),new t.Layout().avoidOverlaps(!1).nodes(f.nodes).links(f.links).powerGraphGroups(function(k){p=k,p.groups.forEach(function(P){return P.padding=d})});var b=f.nodes.length,m=[],w=f.nodes.slice(0);return w.forEach(function(k,P){return k.index=P}),p.groups.forEach(function(k){var P=k.index=k.id+b;w.push(k),typeof k.leaves<"u"&&k.leaves.forEach(function(S){return m.push({source:P,target:S.index})}),typeof k.groups<"u"&&k.groups.forEach(function(S){return m.push({source:P,target:S.id+b})})}),p.powerEdges.forEach(function(k){m.push({source:k.source.index,target:k.target.index})}),new t.Layout().size(h).nodes(w).links(m).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:new t.Layout().convergenceThreshold(.001).size(h).avoidOverlaps(!0).nodes(f.nodes).links(f.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups(function(k){p=k,p.groups.forEach(function(P){P.padding=d})}).start(50,0,100,0,!1),powerGraph:p}}return Y0.powerGraphGridLayout=c,Y0}var SV;function nve(){return SV||(SV=1,function(t){function r(a){for(var s in a)t.hasOwnProperty(s)||(t[s]=a[s])}Object.defineProperty(t,"__esModule",{value:!0}),r(Qbe()),r(Xbe()),r(jM()),r(gV()),r(EV()),r(vV()),r(U0()),r(eve()),r(MM()),r(iV()),r(hV()),r(cV()),r(G0()),r(c2()),r(AM()),r(tve())}(tV)),tV}(function(t,r){(function(a,s){t.exports=s(nve())})(zr,function(a){return function(s){var c={};function f(h){if(c[h])return c[h].exports;var d=c[h]={i:h,l:!1,exports:{}};return s[h].call(d.exports,d,d.exports,f),d.l=!0,d.exports}return f.m=s,f.c=c,f.i=function(h){return h},f.d=function(h,d,p){f.o(h,d)||Object.defineProperty(h,d,{configurable:!1,enumerable:!0,get:p})},f.n=function(h){var d=h&&h.__esModule?function(){return h.default}:function(){return h};return f.d(d,"a",d),d},f.o=function(h,d){return Object.prototype.hasOwnProperty.call(h,d)},f.p="",f(f.s=3)}([function(s,c,f){var h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},d=f(1),p=f(2),b=f(5)||(typeof window<"u"?window.cola:null),m=f(4),w=function(j){return(typeof j>"u"?"undefined":h(j))===h("")},k=function(j){return(typeof j>"u"?"undefined":h(j))===h(0)},P=function(j){return j!=null&&(typeof j>"u"?"undefined":h(j))===h({})},S=function(j){return j!=null&&(typeof j>"u"?"undefined":h(j))===h(function(){})},M=function(){},L=function(j,I){if(S(j)){var D=j;return D.apply(I,[I])}else return j};function T(j){this.options=d({},p,j)}T.prototype.run=function(){var j=this,I=this.options;j.manuallyStopped=!1;var D=I.cy,R=I.eles,Y=R.nodes(),G=R.edges(),U=!1,z=function(ke){return ke.isParent()},Q=Y.filter(z),$=Y.subtract(Q),Z=I.boundingBox||{x1:0,y1:0,w:D.width(),h:D.height()};Z.x2===void 0&&(Z.x2=Z.x1+Z.w),Z.w===void 0&&(Z.w=Z.x2-Z.x1),Z.y2===void 0&&(Z.y2=Z.y1+Z.h),Z.h===void 0&&(Z.h=Z.y2-Z.y1);var X=function(){for(var ke=0;ke<Y.length;ke++){var Ge=Y[ke],Qe=Ge.layoutDimensions(I),nt=Ge.scratch("cola");if(!nt.updatedDims){var ft=L(I.nodeSpacing,Ge);nt.width=Qe.w+2*ft,nt.height=Qe.h+2*ft}}Y.positions(function(Ue){var Ze=Ue.scratch().cola,mt=void 0;return!Ue.grabbed()&&$.contains(Ue)&&(mt={x:Z.x1+Ze.x,y:Z.y1+Ze.y},(!k(mt.x)||!k(mt.y))&&(mt=void 0)),mt}),Y.updateCompoundBounds(),U||(ae(),U=!0),I.fit&&D.fit(I.padding)},K=function(){I.ungrabifyWhileSimulating&&he.grabify(),D.off("destroy",fe),Y.off("grab free position",pe),Y.off("lock unlock",me),j.one("layoutstop",I.stop),j.trigger({type:"layoutstop",layout:j})},ae=function(){j.one("layoutready",I.ready),j.trigger({type:"layoutready",layout:j})},se=I.refresh;I.refresh<0?se=1:se=Math.max(1,se);var le=j.adaptor=b.adaptor({trigger:function(ke){var Ge=b.EventType?b.EventType.tick:null,Qe=b.EventType?b.EventType.end:null;switch(ke.type){case"tick":case Ge:I.animate&&X();break;case"end":case Qe:X(),I.infinite||K();break}},kick:function(){var ke=!0,Ge=function(){if(j.manuallyStopped)return K(),!0;var ft=le.tick();return!I.infinite&&!ke&&le.convergenceThreshold(I.convergenceThreshold),ke=!1,ft&&I.infinite&&le.resume(),ft},Qe=function(){for(var ft=void 0,Ue=0;Ue<se&&!ft;Ue++)ft=ft||Ge();return ft};if(I.animate){var nt=function ft(){Qe()||m(ft)};m(nt)}else for(;!Ge(););},on:M,drag:M});j.adaptor=le;var he=Y.filter(":grabbable");I.ungrabifyWhileSimulating&&he.ungrabify();var fe=void 0;D.one("destroy",fe=function(){j.stop()});var pe=void 0;Y.on("grab free position",pe=function(ke){var Ge=this,Qe=Ge.scratch().cola,nt=Ge.position(),ft=ke.cyTarget===Ge||ke.target===Ge;if(ft)switch(ke.type){case"grab":le.dragstart(Qe);break;case"free":le.dragend(Qe);break;case"position":(Qe.px!==nt.x-Z.x1||Qe.py!==nt.y-Z.y1)&&(Qe.px=nt.x-Z.x1,Qe.py=nt.y-Z.y1);break}});var me=void 0;Y.on("lock unlock",me=function(){var ke=this,Ge=ke.scratch().cola;Ge.fixed=ke.locked(),ke.locked()?le.dragstart(Ge):le.dragend(Ge)}),le.nodes($.map(function(ke,Ge){var Qe=L(I.nodeSpacing,ke),nt=ke.position(),ft=ke.layoutDimensions(I),Ue=ke.scratch().cola={x:I.randomize&&!ke.locked()||nt.x===void 0?Math.round(Math.random()*Z.w):nt.x,y:I.randomize&&!ke.locked()||nt.y===void 0?Math.round(Math.random()*Z.h):nt.y,width:ft.w+2*Qe,height:ft.h+2*Qe,index:Ge,fixed:ke.locked()};return Ue}));var Te=[];if(I.alignment){if(I.alignment.vertical){var Le=I.alignment.vertical;Le.forEach(function(ke){var Ge=[];ke.forEach(function(Qe){var nt=Qe.node,ft=nt.scratch().cola,Ue=ft.index;Ge.push({node:Ue,offset:Qe.offset?Qe.offset:0})}),Te.push({type:"alignment",axis:"x",offsets:Ge})})}if(I.alignment.horizontal){var ge=I.alignment.horizontal;ge.forEach(function(ke){var Ge=[];ke.forEach(function(Qe){var nt=Qe.node,ft=nt.scratch().cola,Ue=ft.index;Ge.push({node:Ue,offset:Qe.offset?Qe.offset:0})}),Te.push({type:"alignment",axis:"y",offsets:Ge})})}}I.gapInequalities&&I.gapInequalities.forEach(function(ke){var Ge=ke.left.scratch().cola.index,Qe=ke.right.scratch().cola.index;Te.push({axis:ke.axis,left:Ge,right:Qe,gap:ke.gap,equality:ke.equality})}),Te.length>0&&le.constraints(Te),le.groups(Q.map(function(ke,Ge){var Qe=L(I.nodeSpacing,ke),nt=function(st){return parseFloat(ke.style("padding-"+st))},ft=nt("left")+Qe,Ue=nt("right")+Qe,Ze=nt("top")+Qe,mt=nt("bottom")+Qe;return ke.scratch().cola={index:Ge,padding:Math.max(ft,Ue,Ze,mt),leaves:ke.children().intersection($).map(function(st){return st[0].scratch().cola.index}),fixed:ke.locked()},ke}).map(function(ke){return ke.scratch().cola.groups=ke.children().intersection(Q).map(function(Ge){return Ge.scratch().cola.index}),ke.scratch().cola}));var xe=void 0,Se=void 0;I.edgeLength!=null?(xe=I.edgeLength,Se="linkDistance"):I.edgeSymDiffLength!=null?(xe=I.edgeSymDiffLength,Se="symmetricDiffLinkLengths"):I.edgeJaccardLength!=null?(xe=I.edgeJaccardLength,Se="jaccardLinkLengths"):(xe=100,Se="linkDistance");var Ie=function(ke){return ke.calcLength};if(le.links(G.stdFilter(function(ke){return $.contains(ke.source())&&$.contains(ke.target())}).map(function(ke){var Ge=ke.scratch().cola={source:ke.source()[0].scratch().cola.index,target:ke.target()[0].scratch().cola.index};return xe!=null&&(Ge.calcLength=L(xe,ke)),Ge})),le.size([Z.w,Z.h]),xe!=null&&le[Se](Ie),I.flow){var Re=void 0,Ne="y",Me=50;w(I.flow)?Re={axis:I.flow,minSeparation:Me}:k(I.flow)?Re={axis:Ne,minSeparation:I.flow}:P(I.flow)?(Re=I.flow,Re.axis=Re.axis||Ne,Re.minSeparation=Re.minSeparation!=null?Re.minSeparation:Me):Re={axis:Ne,minSeparation:Me},le.flowLayout(Re.axis,Re.minSeparation)}return j.trigger({type:"layoutstart",layout:j}),le.avoidOverlaps(I.avoidOverlap).handleDisconnected(I.handleDisconnected).start(I.unconstrIter,I.userConstIter,I.allConstIter,void 0,void 0,I.centerGraph),I.infinite||setTimeout(function(){j.manuallyStopped||le.stop()},I.maxSimulationTime),this},T.prototype.stop=function(){return this.adaptor&&(this.manuallyStopped=!0,this.adaptor.stop()),this},s.exports=T},function(s,c,f){s.exports=Object.assign!=null?Object.assign.bind(Object):function(h){for(var d=arguments.length,p=Array(d>1?d-1:0),b=1;b<d;b++)p[b-1]=arguments[b];return p.filter(function(m){return m!=null}).forEach(function(m){Object.keys(m).forEach(function(w){return h[w]=m[w]})}),h}},function(s,c,f){var h={animate:!0,refresh:1,maxSimulationTime:4e3,ungrabifyWhileSimulating:!1,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,ready:function(){},stop:function(){},randomize:!1,avoidOverlap:!0,handleDisconnected:!0,convergenceThreshold:.01,nodeSpacing:function(d){return 10},flow:void 0,alignment:void 0,gapInequalities:void 0,centerGraph:!0,edgeLength:void 0,edgeSymDiffLength:void 0,edgeJaccardLength:void 0,unconstrIter:void 0,userConstIter:void 0,allConstIter:void 0,infinite:!1};s.exports=h},function(s,c,f){var h=f(0),d=function(p){p&&p("layout","cola",h)};typeof cytoscape<"u"&&d(cytoscape),s.exports=d},function(s,c,f){var h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},d=void 0;(typeof window>"u"?"undefined":h(window))!=="undefined"?d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(p){return setTimeout(p,16)}:d=function(p){p()},s.exports=d},function(s,c){s.exports=a}])})})(eV);var rve=eV.exports;const ive=A0(rve);var NV={exports:{}},TV={exports:{}},MV;function ave(){return MV||(MV=1,function(t){(function(){var r;typeof window<"u"?(r=window,r.document):r={Array:function(){}};function a(){}function s(){}function c(){}function f(){}function h(){}function d(){}function p(){}function b(){}function m(){}function w(){}function k(){}function P(){}function S(){}function M(){}function L(){}function T(){}function j(){}function I(){}function D(){}function R(){}function Y(){}function G(){}function U(){}function z(){}function Q(){}function $(){}function Z(){}function X(){}function K(){}function ae(){}function se(){}function le(){}function he(){}function fe(){}function pe(){}function me(){}function Te(){}function Le(){}function ge(){}function xe(){}function Se(){}function Ie(){}function Re(){}function Ne(){}function Me(){}function ke(){}function Ge(){}function Qe(){}function nt(){}function ft(){}function Ue(){}function Ze(){}function mt(){}function st(){}function Ot(){}function At(){}function Rt(){}function zt(){}function mn(){}function sn(){}function or(){}function H(){}function ne(){}function ue(){}function we(){}function je(){}function ie(){}function Pe(){}function He(){}function We(){}function Je(){}function yt(){}function rt(){}function $t(){}function Ft(){}function rn(){}function Un(){}function Gn(){}function Kt(){}function Hn(){}function dr(){}function gi(){}function ka(){}function no(){}function Bi(){}function da(){}function Ri(){}function ro(){}function ac(){}function Gi(){}function Xo(){}function np(){}function ff(){}function rp(){}function rl(){}function ko(){}function Ra(){}function _o(){}function ru(){}function ip(){}function K0(){}function b2(){}function v2(){}function y2(){}function m2(){}function w2(){}function ap(){}function x2(){}function Ch(){}function Q0(){}function op(){}function W0(){}function J0(){}function k2(){}function Ls(){}function eb(){}function X0(){}function Ph(){}function Os(){}function _2(){}function E2(){}function C2(){}function P2(){}function qV(){cQ()}function Ave(){v_e()}function ZV(){MX()}function $V(){SQ()}function KV(){O7()}function QV(){MZ()}function WV(){jZ()}function JV(){e$()}function XV(){rW()}function eq(){oQ()}function tq(){dee()}function nq(){sQ()}function rq(){uQ()}function iq(){ite()}function aq(){tA()}function il(){Tx(this)}function oq(){}function Ye(){xx(this)}function S2(){}function sq(e){this.a=e}function uq(e){this.a=e}function e1(e){this.a=e}function cq(e){this.a=e}function lq(e){this.a=e}function fq(e){this.a=e}function hq(e){this.a=e}function N2(e){this.a=e}function dq(e){this.a=e}function T2(e){this.b=e}function BM(e){this.a=e}function pq(e){this.a=e}function gq(e){this.a=e}function bq(e){this.a=e}function vq(e){this.a=e}function yq(e){this.a=e}function mq(e){this.a=e}function wq(e){this.a=e}function RM(e){this.a=e}function M2(e){this.a=e}function j2(e){this.a=e}function xq(e){this.a=e}function kq(e){this.a=e}function GM(e){this.a=e}function t1(e){this.a=e}function A2(e){this.e=e}function sp(e){this.a=e}function _q(e){this.a=e}function Sh(e){this.a=e}function HM(e){this.a=e}function Eq(e){this.a=e}function Cq(e){this.a=e}function I2(e){this.a=e}function Pq(e){this.a=e}function Sq(e){this.a=e}function Nq(e){this.a=e}function Tq(e){this.a=e}function Mq(e){this.a=e}function jq(e){this.a=e}function up(e){this.a=e}function Aq(e){this.a=e}function Iq(e){this.a=e}function Lq(e){this.a=e}function Oq(e){this.a=e}function Dq(e){this.a=e}function Bq(e){this.a=e}function Rq(e){this.a=e}function Gq(e){this.c=e}function zM(e){this.a=e}function Hq(e){this.a=e}function zq(e){this.a=e}function Uq(e){this.a=e}function Fq(e){this.a=e}function Yq(e){this.a=e}function UM(e){this.a=e}function Vq(e){this.a=e}function cn(e){this.a=e}function Tu(e){this.a=e}function Nh(e){this.d=e}function un(e){this.a=e}function hn(e){this.a=e}function tb(e){this.a=e}function nb(e){this.a=e}function FM(e){this.b=e}function n1(e){this.a=e}function r1(e){this.a=e}function V(e){this.c=e}function Eo(e){this.a=e}function qq(e){this.a=e}function Zq(e){this.a=e}function rb(e){this.b=e}function cp(e){this.b=e}function YM(e){this.c=e}function VM(e){this.a=e}function qM(e){this.a=e}function i1(e){this.a=e}function ZM(){this.a=[]}function $M(e){this.a=e}function L2(e){this.a=e}function $q(e){e.b=e.a}function Kq(e){e.c=e.d.d}function io(e,n){e.g=n}function KM(e,n){e.k=n}function Ive(e,n){e.a=n}function Lve(e,n){e.b=n}function Ove(e,n){e.e.k=n}function Dve(e){return e.a}function Bve(e){return e.a}function Rve(e){return e.a}function Gve(e){return e.a}function Hve(e){return e.a}function zve(){return null}function Uve(){return null}function O2(){this.c=this}function QM(){Tx(this)}function en(){No(this)}function Qq(e){nke(this,e)}function Fve(e){W$(),FEe(e)}function Wq(e){e.a=new ti}function ib(e,n){e.a=n-e.a}function ab(e,n){e.b=n-e.b}function Th(){Th=s}function D2(){D2=s}function Yve(){throw new er}function Vve(){throw new er}function qve(){throw new er}function Zve(){throw new er}function $ve(){throw new er}function Kve(){throw new er}function Qve(){throw new er}function Wve(){throw new er}function Jve(){throw new er}function Jq(){this.a=new Ye}function Xq(){this.a=new Ye}function eZ(){this.a=new Ye}function tZ(){this.a=new Ye}function B2(){this.a=new Ye}function hf(){this.a=new ap}function lp(){this.a=new BW}function nZ(){this.b=new Ye}function Hi(){ti.call(this)}function rZ(){lx.call(this)}function WM(){oq.call(this)}function a1(){oq.call(this)}function JM(){Ye.call(this)}function iZ(){il.call(this)}function fp(){il.call(this)}function XM(){il.call(this)}function aZ(){il.call(this)}function ob(){il.call(this)}function hp(){il.call(this)}function er(){il.call(this)}function e6(){this.f=new Ye}function oZ(){this.d=new Ye}function sZ(){this.a=new Qr}function uZ(){throw new er}function cZ(){throw new er}function lZ(){throw new er}function fZ(){throw new er}function Xve(){throw new er}function t6(){this.a=new Ye}function n6(){n6=s,Xy=new c}function Ln(){Ln=s}function sb(){sb=s,z_=new f}function hZ(){hZ=s,Lre=new b}function dZ(){dZ=s,Ore=new VQ}function r6(){r6=s,OI=new d}function pZ(){pZ=s,Gre=new S}function i6(){i6=s,Yie=new z}function gZ(){gZ=s,Vie=new X}function a6(e){return uu(e),e}function o6(e){kr(),this.a=e}function s6(e){za(),this.a=e}function bZ(e){za(),this.a=e}function vZ(e){za(),this.a=e}function yZ(e,n){e.i=n,n.f=e}function e0e(e,n){Tn(e.b,n)}function dp(){il.call(this)}function mZ(){il.call(this)}function _a(){il.call(this)}function wZ(){nW.call(this)}function xZ(){nW.call(this)}function kZ(){XM.call(this)}function _Z(){fp.call(this)}function iu(e){HZ.call(this,e)}function t0e(e){OK.call(this,e)}function n0e(e){OK.call(this,e)}function u6(e){_K.call(this,e)}function EZ(e){XK.call(this,e)}function c6(e){lW.call(this,e)}function l6(e){x6.call(this,e)}function ub(e){vp.call(this,e)}function f6(e){_K.call(this,e)}function r0e(e,n){e.a.W().nb(n)}function es(e,n){return e===n}function R2(e){return e?e.a:0}function Ds(e){return e?e.d:0}function G2(e){return e?e.j:0}function CZ(e){iu.call(this,e)}function o1(e){iu.call(this,e)}function Bo(e){iu.call(this,e)}function H2(e){Bo.call(this,e)}function df(){j2.call(this,{})}function PZ(e){Qq.call(this,e)}function SZ(e){Qq.call(this,e)}function i0e(e,n,i){Qme(e,n.b,i)}function a0e(e,n,i){_ye(e.c,n,i)}function o0e(e,n,i){e.b.Fc(n,i)}function h6(e){Oq.call(this,e)}function z2(e){Oq.call(this,e)}function NZ(){this.a=(Jn(),qo)}function TZ(){this.a=(Jn(),qo)}function Qr(){this.a=new en}function d6(){this.a=new P$}function p6(){p6=s,bL=new K}function MZ(){MZ=s,eae=new Le}function jZ(){jZ=s,iae=new He}function Gt(e){return jn(),e}function Oe(e){return xr(e),e}function s0e(e){HZ.call(this,e)}function ts(e){iu.call(this,e)}function wn(e){iu.call(this,e)}function s1(e){this.c=Vh(Pt(e))}function Wr(){this.a=0,this.b=0}function ti(){hK(this),ou(this)}function AZ(){R_==null&&(R_=[])}function u1(e){e.b=null,e.c=0}function u0e(e,n){return e.b=n,e}function IZ(e,n){return e.c=n,e}function U2(e,n){return e.f=n,e}function LZ(e,n){return e.g=n,e}function OZ(e,n){return e.a=n,e}function DZ(e,n){return e.f=n,e}function c0e(e,n){return e.k=n,e}function l0e(e,n){return e.e-n.e}function f0e(e,n){return e.d-n.d}function h0e(e){return e<0?-e:e}function BZ(e){return isNaN(e)}function d0e(e){return new M2(e)}function p0e(e){return new dl(e)}function RZ(e){iu.call(this,e)}function oc(e){iu.call(this,e)}function GZ(e){iu.call(this,e)}function cb(e){iu.call(this,e)}function Mh(e){iu.call(this,e)}function HZ(e){this.f=e,Tx(this)}function zZ(){this.b=0,this.a=0}function pp(){pp=s}function UZ(){UZ=s,qoe=Txe()}function g0e(e,n,i){e.set(n,i)}function b0e(e,n,i){e.set(n,i)}function FZ(e,n){Op(),EI.dc(e,n)}function ve(e,n){return gW(e,n)}function YZ(e,n){return e.a.B(n)}function jh(e,n){return e.g[n.e]}function F2(e,n){return e.i[n.e]}function Y2(e,n){return e.j[n.e]}function Ah(e,n){return e.n[n.e]}function Ih(e,n){return e.o[n.e]}function v0e(e,n){return n in e.a}function y0e(e,n){return e.b-n.b}function m0e(e,n){return e.d-n.d}function w0e(e,n){return e.i-n.i}function Xe(e,n){return e>n?e:n}function VZ(e,n){return e>n?e:n}function ui(e,n){return e>n?e:n}function dn(e,n){return e<n?e:n}function x0e(e,n){return e<n?e:n}function sc(e,n){return e<n?e:n}function uc(e){return!!e&&e.b}function qZ(e){A1e(e,e.length)}function k0e(e){U1e(e,e.length)}function lb(e){F1e(e,e.length)}function _0e(e){ts.call(this,e)}function gp(e){UM.call(this,e)}function E0e(e){Hq.call(this,e)}function c1(e){wn.call(this,e)}function pf(e){rb.call(this,e)}function ZZ(e){pf.call(this,e)}function g6(e){A1.call(this,e)}function bp(){UM.call(this,"")}function V2(){UM.call(this,"")}function l1(e){return mf(e),e.n}function $Z(e){return mf(e),e.j}function ea(e){return e.e&&e.e()}function KZ(e,n){return e.a.sb(n)}function C0e(e,n){return e||Pt(n)}function QZ(e,n){return J(e.a,n)}function WZ(e,n){return M1e(e.a,n)}function P0e(e,n){return Ak(e,n)<0}function f1(e){return Ln(),""+e}function JZ(e){return e?e.d:null}function cc(e){za(),this.a=Pt(e)}function XZ(){eJ(),this.g=new M6}function e$(){e$=s,aae=(na(),vu)}function S0e(){nm!=0&&(nm=0),rm=-1}function fb(e){return vke(e,e.d),e}function Lh(e,n){return e.a.d=n,e}function Oh(e,n){return e.a.a=n,e}function Dh(e,n){return e.a.c=n,e}function Bh(e,n){return e.a.f=n,e}function t$(e,n){return e.a.f=n,e}function b6(e,n){return e.a.b=n,e}function v6(e,n,i){e.splice(n,i)}function N0e(e,n){return mj(n,e)}function n$(e,n){return e.b.t(n)}function r$(e,n){return e.c.t(n)}function al(e,n){return e.a.R(n)}function y6(e,n){return e.get(n)}function q2(e,n){return e.get(n)}function T0e(e,n){return e.test(n)}function ci(e){return e<=0?0-e:e}function i$(e){return Ln(),""+e}function M0e(e){return Ln(),""+e}function Z2(e){this.a=new sx(e)}function a$(e){this.a=new U7(e)}function o$(e){this.a=v(Pt(e),19)}function $2(e){this.b=v(Pt(e),57)}function s$(e){this.d=v(Pt(e),56)}function xn(e,n){this.d=e,this.e=n}function K2(e,n){this.b=e,this.a=n}function u$(e,n){this.b=e,this.a=n}function m6(e,n){this.b=e,this.c=n}function w6(e,n){this.a=e,this.b=n}function Q2(e,n){this.a=e,this.b=n}function c$(e,n){this.a=e,this.f=n}function W2(e,n){xn.call(this,e,n)}function l$(e,n){xn.call(this,e,n)}function f$(e,n){xn.call(this,e,n)}function h$(e,n){this.b=e,this.c=n}function d$(e,n){this.e=e,this.c=n}function j0e(e,n){this.a=e,this.b=n}function p$(e,n){this.a=e,this.b=n}function g$(e,n){xn.call(this,e,n)}function b$(e,n){this.a=e,this.b=n}function v$(e){this.a=v(Pt(e),20)}function vp(e){this.a=v(Pt(e),20)}function y$(e){this.a=v(Pt(e),57)}function x6(e){this.b=v(Pt(e),35)}function wt(e,n){this.a=e,this.b=n}function Er(e,n){this.a=e,this.b=n}function yp(e,n){xn.call(this,e,n)}function k6(e,n){return Jh(e.b,n)}function A0e(e){return DQ(),e?Rre:Bre}function gf(e){return e==Ka||e==aa}function J2(e){return e==bu||e==Qs}function m$(e,n){Cr(e,n,e.a,e.a.a)}function X2(e,n){Cr(e,n,e.c.b,e.c)}function hb(e,n){xn.call(this,e,n)}function h1(e,n){xn.call(this,e,n)}function d1(e,n){xn.call(this,e,n)}function mp(e,n){xn.call(this,e,n)}function ex(e,n){xn.call(this,e,n)}function ol(e,n){xn.call(this,e,n)}function db(e,n){xn.call(this,e,n)}function wp(e,n){xn.call(this,e,n)}function tx(e,n){xn.call(this,e,n)}function pb(e,n){xn.call(this,e,n)}function p1(e,n){xn.call(this,e,n)}function g1(e,n){xn.call(this,e,n)}function nx(e,n){xn.call(this,e,n)}function rx(e,n){xn.call(this,e,n)}function _6(e,n){this.b=e,this.a=n}function Rh(e,n){this.c=e,this.d=n}function E6(e,n){this.a=e,this.c=n}function w$(e,n){this.e=e,this.c=n}function x$(e,n){this.e=e,this.d=n}function b1(e,n){xn.call(this,e,n)}function xp(e,n){xn.call(this,e,n)}function k$(e,n){this.a=e,this.b=n}function _$(e,n){this.a=e,this.b=n}function ix(e,n){xn.call(this,e,n)}function bn(e,n){xn.call(this,e,n)}function bf(e,n){xn.call(this,e,n)}function C6(e,n){xn.call(this,e,n)}function kp(e,n){xn.call(this,e,n)}function P6(e,n){xn.call(this,e,n)}function ax(e,n){xn.call(this,e,n)}function S6(e,n){xn.call(this,e,n)}function I0e(e,n){return os(e.c,n)}function ox(e){return e.b<e.d.Y()}function v1(e){return e.d.c+e.e.c}function E$(e,n){return e.c.ab(n)}function L0e(e,n){return e.b.kb(n)}function O0e(e,n){return e.b.lb(n)}function D0e(e,n){return e.b.pb(n)}function N6(e,n){return e.b.kb(n)}function C$(e,n){return e.b.lb(n)}function B0e(e){return e==Oc||e==Vl}function R0e(e){return e==Oc||e==Yl}function Bs(e){return e!=vs&&e!=Ac}function G0e(e){return qa(e),e.d.Y()}function Gh(e){this.c=e,_J(this)}function sx(e){yX.call(this,e,0)}function P$(){U7.call(this,null)}function gb(){n0e.call(this,new en)}function S$(){f$.call(this,"KEY",0)}function ux(e){Kh(),XK.call(this,e)}function H0e(e){r.clearTimeout(e)}function N$(e){return e.Vb(e.b.H())}function T6(e){this.a=v(Pt(e),144)}function M6(){this.b=(Fn(),new en)}function vf(){vf=s,th=new E2}function cx(){cx=s,SC=new X0}function T$(){T$=s,Voe=new _2}function y1(){y1=s,Nre=new s1(",")}function M$(){M$=s}function lx(){so.call(this,0,0,0,0)}function j6(e,n){xn.call(this,e,n)}function bb(e,n){xn.call(this,e,n)}function A6(e,n){xn.call(this,e,n)}function I6(e,n){xn.call(this,e,n)}function j$(e){Uh(),sr.call(this,e)}function L6(e,n){xn.call(this,e,n)}function A$(e,n){this.c=e,this.b=n}function I$(e,n){this.a=e,this.b=n}function L$(e,n){this.b=e,this.d=n}function O6(e,n){xn.call(this,e,n)}function _p(e,n){xn.call(this,e,n)}function fx(e,n){xn.call(this,e,n)}function vb(e,n){xn.call(this,e,n)}function Ep(e,n){xn.call(this,e,n)}function lc(e,n){xn.call(this,e,n)}function hx(e,n){xn.call(this,e,n)}function D6(e,n){xn.call(this,e,n)}function yb(e,n){xn.call(this,e,n)}function dx(e,n){xn.call(this,e,n)}function px(e,n){xn.call(this,e,n)}function gx(e,n){xn.call(this,e,n)}function mb(e,n,i){e.splice(n,0,i)}function wb(e,n,i){e.g[n.e][n.e]=i}function O$(e,n){e.a=n,e.g=0,e.f=0}function au(e){return e.a=0,e.b=0,e}function pa(e){return Vi(e.b.c,e,0)}function m1(e){return Math.ceil(e)}function D$(e){return Math.sqrt(e)}function B$(e,n){return q2(e.a,n)}function bx(e,n){return!!jj(e,n)}function vx(e,n){R1e(e,e.length,n)}function w1(e,n){xn.call(this,e,n)}function x1(e,n){this.b=e,this.a=n}function k1(e,n){this.d=e,this.e=n}function R$(){Dx(),this.c=new Qr}function G$(){Ny(),this.a=new Qr}function H$(){return UZ(),new qoe}function Hh(e){if(!e)throw new fp}function _1(e){if(!e)throw new ob}function E1(e){if(!e)throw new _a}function z$(){this.b=(Fn(),new en)}function U$(){this.b=(Fn(),new en)}function tr(e){this.a=e.a,this.b=e.b}function ot(e){return e??null}function bi(e){return e?e.zb():null}function F$(e,n){return e.Nb().sb(n)}function Y$(e,n){return e.a.a.a.U(n)}function yx(e,n){return Twe(e.mb(),n)}function z0e(e,n){return Pr(n.b,e.b)}function U0e(e,n){return Pr(n.k,e.k)}function B6(e){return Math.floor(e)}function sl(e,n){return e.a+=""+n,e}function fc(e,n){return e.a+=""+n,e}function Co(e,n){return e.a+=""+n,e}function C1(e){return kb(e==null),e}function R6(e){return e.d&&r_(e),e.a}function mx(e){return e.d&&r_(e),e.b}function wx(e){return e.d&&r_(e),e.c}function V$(e,n){return $e(e.a,n),n}function q$(e){No(this),VJ(this,e)}function Z$(e){this.c=e,this.e=!1}function $$(){l$.call(this,"OPEN",0)}function K$(){g$.call(this,"SIZE",0)}function F0e(){Hq.call(this,"UTF-8")}function Q$(){Q$=s,r8={},Rm={}}function W$(){W$=s,qf=new gt(ere,0)}function Ga(e){return Pt(e),new zh(e)}function xb(e){return Ln(),e.length}function Y0e(e,n){return yme(e.a,n.a)}function V0e(e,n){return sK(e.a,n.a)}function J$(e,n){return e==n?0:e?1:-1}function X$(e){return Ds(e.e)-Ds(e.g)}function ao(e){return new wt(e.a,e.b)}function q0e(e){return new wt(e.d,e.e)}function xx(e){e.c=Ae(ht,et,1,0,4,1)}function eK(){f$.call(this,"VALUE",1)}function G6(e){Q6.call(this),this.a=e}function tK(e){this.a=new Gte,this.b=e}function zh(e){this.a=e,O2.call(this)}function nK(e){this.a=e,O2.call(this)}function rK(){jX(),this.d=(Lu(),Bm)}function Z0e(e){if(!e)throw new aZ}function yf(e){if(!e)throw new ob}function iK(e){if(!e)throw new fp}function kb(e){if(!e)throw new iZ}function xt(e){if(!e)throw new _a}function ta(){$M.call(this,new jp)}function aK(){l$.call(this,"CLOSED",1)}function ns(e){lW.call(this,new c6(e))}function oK(e,n){return++e.d,Ir(e,n)}function $0e(e,n){return Rx(e.a,0,n)}function K0e(e,n){return Pr(e.a,n.a)}function Cp(e){return kf(e.b.mb(),e.a)}function rs(e){return Ox(e.a.mb(),e.b)}function kx(e,n){return n==e.c?e.d:e.c}function Q0e(e,n){return e<n?-1:e>n?1:0}function sK(e,n){return e<n?-1:e>n?1:0}function _x(e){return e!=null?ls(e):0}function uK(e){this.a=H$(),this.b=e}function cK(e){this.a=H$(),this.b=e}function lK(e){this.a=e,h7.call(this,e)}function fK(){z6(),this.b=new Aq(this)}function is(){is=s,NI=r1e(new s1(", "))}function Ro(){Ro=s,ho=new $$,tm=new aK}function Qn(){Qn=s,Are=new k,TI=new P}function P1(){P1=s,U_=new S$,MI=new eK}function S1(){S1=s,F_=new K$,AI=new xK}function Uh(){Uh=s,Ure=new L,Fre=new T}function H6(e){e.g=new Ye,e.b=new Ye}function hK(e){e.a=new C2,e.c=new C2}function z6(){z6=s,dae=new ip,hae=new pQ}function dK(){W2.call(this,"IS_NULL",2)}function pK(){w1.call(this,"Head",1)}function gK(){w1.call(this,"Tail",3)}function U6(e,n){gj.call(this,e,n,null)}function F6(e,n){ad(e,0,e.length,n)}function _b(e,n){return $e(n.a,e.a),e.a}function as(e,n){return e.a*=n,e.b*=n,e}function bK(e,n){kr(),this.a=e,this.b=n}function W0e(e,n){return e.a[n.d.k][n.k]}function Ha(e,n){return e.a[n.d.k][n.k]}function J0e(e,n){return tk(e.b,n.mc())}function vK(e,n){return JZ(Uwe(e.a,n))}function yK(e,n){return JZ(Fwe(e.a,n))}function Ur(e,n){return v(Za(e.a,n),20)}function qe(e,n){return e!=null&&$k(e,n)}function ul(e){return e.a<e.c.c.length}function N1(e){return e.a<e.c.a.length}function X0e(e,n){return Pr(e.i.a,n.i.a)}function e1e(e,n){return e.i.b=(xr(n),n)}function t1e(e,n){return e.i.b=(xr(n),n)}function Ex(e,n){return e.a.eb(n)!=null}function Cx(e,n,i){return e.g[n.e][i.e]}function mK(e){return jn(),Ln(),""+e}function wK(){w1.call(this,"Range",2)}function xK(){g$.call(this,"DISTINCT",1)}function kK(){W2.call(this,"NOT_NULL",3)}function Fn(){Fn=s,Ire=new AK((is(),NI))}function _K(e){this.d=(pn(),new YM(e))}function Y6(e,n){return LX(e,new bp,n).a}function T1(e,n){return n==null?e.b:RQ(n)}function n1e(e){return e==null?null:e.name}function Fh(e){return typeof e=="number"}function Go(e){return typeof e=="string"}function V6(e,n){return new HQ(e,e.Y(),n)}function q6(e,n){return new Qee(e.a,e.b,n)}function r1e(e){return Pt(fu),new hQ(e,e)}function cl(e){return yi(e,Ll),new qi(e)}function EK(e,n){this.a=n,x6.call(this,e)}function CK(e,n){this.a=n,x6.call(this,e)}function PK(e,n){this.a=e,$2.call(this,n)}function SK(e){this.c=e,this.a=Jxe(this.c)}function Po(e){var n;n=e.a,e.a=e.b,e.b=n}function i1e(e,n){e.e.j.a=n.a,e.e.j.b=n.b}function a1e(e,n,i){e.a=n^1502,e.b=i^D_}function Ea(e,n,i){return e.a+=n,e.b+=i,e}function o1e(e,n,i){return e.a-=n,e.b-=i,e}function Px(e){return e.a=-e.a,e.b=-e.b,e}function Sx(e){return xt(e.b!=0),e.a.a.c}function M1(e){return xt(e.b!=0),e.c.b.c}function NK(e,n){e.a&&(v7(n),dW(n))}function j1(e,n,i){var u;u=e.ub(n),u.J(i)}function s1e(e,n){return Q0e(n.Yb(),e.Yb())}function Nx(e){return v(ut(e.a,e.b),128)}function TK(e){return Zx(e.c,e.c.length)}function u1e(e){return e.l+e.m*Bf+e.h*Nc}function Ci(e){return e==wd||e==bs||e==fi}function ga(e){return typeof e=="number"}function os(e,n){return!!n&&e.b[n.e]==n}function Z6(e,n){var i;i=e[Rl],n[Rl]=i}function Eb(e,n){Bo.call(this,e),this.b=n}function A1(e){rb.call(this,e),this.a=e}function $6(e){cp.call(this,e),this.a=e}function K6(e){pf.call(this,e),this.a=e}function MK(e){$M.call(this,new dJ(e))}function Cb(e){this.a=e,FM.call(this,e)}function jK(e){this.c=e,this.a=1,this.b=1}function AK(e){this.a=e,this.b=Vh(Pt("="))}function IK(){this.a=new ti,this.e=new ti}function LK(){this.a=new Xq,this.c=new me}function Q6(){this.i=new Wr,this.j=new Wr}function OK(e){Hh(e.d.c+e.e.c==0),this.b=e}function Tx(e){return e.g=null,FZ(e,e.f),e}function W6(e){return Qn(),Pt(e),new JK(e)}function DK(e){return Op(),parseInt(e)||-1}function BK(e,n){return jb(e.a,n)!=null}function Pb(e,n){return!Ewe(e,n)&&!QJ(e,n)}function hc(e){return e.$H||(e.$H=++A3e)}function c1e(e){return e.d!=null?e.d:""+e.e}function I1(e){return e.d!=null?e.d:""+e.e}function Mx(e){return e.b=v(lye(e.a),21)}function Yh(e){return typeof e=="boolean"}function RK(e){e.b=new HK(e),e.c=new en}function GK(){this.a=new Ye,this.d=new Ye}function HK(e){g7.call(this,e,null,null)}function zK(e,n,i,u){E7.call(this,e,n,i,u)}function UK(e,n,i,u){ck.call(this,e,n,i,u)}function ss(e,n,i,u){ck.call(this,e,n,i,u)}function J6(e,n,i){Bb.call(this,e,n,i,null)}function X6(e,n,i){Bb.call(this,e,n,i,null)}function e7(e,n,i){e.i=n,n.f=e,n.i=i,i.f=n}function t7(e,n){Wq(this),this.e=e,this.f=n}function l1e(e,n){this.d=e,Kq(this),this.b=n}function jx(e){hK(this),ou(this),ba(this,e)}function Yt(e){return kb(e==null||Yh(e)),e}function qt(e){return kb(e==null||Fh(e)),e}function Vh(e){return kb(e==null||Go(e)),e}function Nn(e,n){return e.a+=n.a,e.b+=n.b,e}function Mu(e,n){return e.a-=n.a,e.b-=n.b,e}function f1e(e,n){return e.i.a=(xr(n),n+10)}function h1e(e,n){return e.i.a=(xr(n),n+10)}function ll(e,n){return v(ln(e.k,n),24).a}function d1e(e,n){return z2e(e,n),new _W(e,n)}function n7(e,n){return v(e.b.sb(n),92).a}function FK(e){return v(e,7).b.c.length!=0}function YK(e){return v(e,7).e.c.length!=0}function VK(e){return e.d?Vi(e.d.a,e,0):-1}function p1e(e){return e==null?null:e.message}function mf(e){e.n==null&&Ake(e)}function g1e(e,n,i,u){return qW(e,n,i,u),e}function b1e(e,n){return Ln(),e.indexOf(n)}function Qt(e,n){if(!n)throw new hp;e.g=n}function r7(e){if(e.e.c!=e.b)throw new dp}function L1(e){if(e.f.c!=e.b)throw new dp}function v1e(e,n){return Pt(e),Pt(n),mj(e,n)}function fl(e,n){this.a=e,this.c=n,this.b=2}function O1(){Wq(this),this.e=-1,this.f=!0}function Ax(){t0e.call(this,new en),this.a=3}function qK(e){ck.call(this,e.d,e.b,e.a,e.c)}function i7(e){ck.call(this,e.d,e.b,e.a,e.c)}function ZK(e){Rj.call(this,e),this.c=new Ye}function $K(){W2.call(this,"ALWAYS_TRUE",0)}function KK(){W2.call(this,"ALWAYS_FALSE",1)}function QK(e){Mne(),this.a=new Ax,$J(this,e)}function y1e(e){return!e.e&&(e.e=new Ye),e.e}function a7(e){var n;return n=new x2,n.e=e,n}function Ix(e){var n;n=e[Rl]|0,e[Rl]=n+1}function ju(e,n){e.a.rb(e.b,n),++e.b,e.c=-1}function o7(e,n){yf(e.c!=-1),e.a.wb(e.c,n)}function m1e(e,n){return jn(),e==n?0:e?1:-1}function Lx(e,n,i){return e.g[n.e][i.e]*e.d}function w1e(e,n,i){return e.apply(n,i)}function s7(e,n,i){return D1e(e,v(n,17),i)}function x1e(e,n){return n==(De(),ct)?e.c:e.d}function WK(e,n){return n!=null&&e.Nb().kb(n)}function k1e(e,n){this.e=n,this.f=e,Tx(this)}function JK(e){this.b=e,this.a=(Qn(),Qn(),TI)}function XK(e){za(),this.a=(pn(),new pf(e))}function za(){za=s,new s6((pn(),pn(),Fc))}function eQ(){eQ=s,yae=Pi(new Yn,(Br(),jE))}function Sb(e){jwe.call(this,e,(uj(),n8))}function dc(e){xx(this),p7(this.c,0,e.ob())}function tQ(e,n,i){this.b=e,this.a=n,this.c=i}function u7(e,n,i){Rh.call(this,e,n),this.b=i}function D1(e,n,i){this.b=e,this.a=n,this.c=i}function c7(e,n){var i;return i=e.e,e.e=n,i}function nQ(e){No(e.c),e.b.b=e.b,e.b.a=e.b}function B1(e){e.b?B1(e.b):kn(e.f.b,e.e,e.d)}function l7(e){return xt(e.b!=0),su(e,e.a.a)}function _1e(e){return xt(e.b!=0),su(e,e.c.b)}function Ox(e,n){return Qn(),Pt(n),new EK(e,n)}function E1e(e,n){return Fn(),new CK(e.mb(),n)}function rQ(e,n){return Ln(),e.charCodeAt(n)}function Pp(e,n,i){return Ln(),e.substr(n,i)}function C1e(e){return Ln(),e==null?fu:Na(e)}function Nb(e,n,i){return Cx(e,n.g,i.g)*e.d}function pc(e,n,i){return{l:e,m:n,h:i}}function Au(e,n){return Dp(e,new Rh(n.a,n.b))}function iQ(e,n,i,u,l){e.d=n,e.e=i,e.c=u,e.b=l}function Ua(e,n,i,u,l){e.b=n,e.c=i,e.d=u,e.a=l}function vn(e,n){return Cr(e,n,e.c.b,e.c),!0}function $e(e,n){return e.c[e.c.length]=n,!0}function gt(e,n){Uh(),sr.call(this,e),this.a=n}function aQ(){eQ(),this.e=new ti,this.d=new ti}function wf(){wf=s,Yoe=new Ls}function oQ(){oQ=s,Oae=Tb(new Yn,(Br(),rg))}function sQ(){sQ=s,Rae=Tb(new Yn,(Br(),rg))}function uQ(){uQ=s,zae=Tb(new Yn,(Br(),rg))}function Dx(){Dx=s,Uae=Tb(new Yn,(Br(),rg))}function cQ(){cQ=s,Error.stackTraceLimit=64}function f7(){Ua(this,!1,!1,!1,!1)}function R1(e){var n;return n=new Ye,kk(n,e),n}function Ca(e){var n;return n=new ti,_j(n,e),n}function G1(e){var n;return n=new Yn,Lr(n,e),n}function P1e(e){var n;return n=new J0,n.a=e,n}function v(e,n){return kb(e==null||$k(e,n)),e}function H1(e,n){if(e<0||e>=n)throw new kZ}function Ho(e,n){return Pt(e),Pt(n),new vQ(e,n)}function Rs(e,n){return Pt(e),Pt(n),new yQ(e,n)}function S1e(e,n){return Ln(),e.lastIndexOf(n)}function Bx(e,n,i){return e<n?i<=e:e<=i||e==n}function lQ(e,n,i){this.d=e,this.b=i,this.a=n}function li(e,n,i){this.a=e,this.b=n,this.c=i}function fQ(e,n,i){this.a=e,this.b=n,this.c=i}function hQ(e,n){this.a=e,this.b=fu,this.c=n.c}function dQ(e){this.c=e.c,this.a=e.e,this.b=e.b}function h7(e){this.d=e,Kq(this),this.b=H1e(e.d)}function pQ(){d7.call(this),this.a=new Iq(this)}function d7(){this.c=new j,this.d=new XQ(this)}function N1e(e){var n;return n=new Qr,kk(n,e),n}function gQ(e){zo(e.a),lJ(e.c,e.b),e.b=null}function bQ(e){return e.c-v(ut(e.a,e.b),128).b}function T1e(e,n){return e.c<n.c?-1:e.c==n.c?0:1}function M1e(e,n){return gf(e.b.d)?n.xc():n.wc()}function Rx(e,n,i){return Ln(),e.substr(n,i-n)}function p7(e,n,i){Wk(i,0,e,n,i.length,!1)}function g7(e,n,i){this.c=e,k1.call(this,n,i)}function vQ(e,n){this.b=e,this.a=n,O2.call(this)}function yQ(e,n){this.a=e,this.b=n,O2.call(this)}function mQ(e,n){this.b=e,this.a=n,yi(n,"count")}function Gx(e){this.b=e,this.a=pl(this.b.a).Kb()}function sr(e){Uh(),this.c=Ure,this.d=Fre,this.b=e}function wQ(e,n,i){A$.call(this,e,n),this.a=i}function xQ(e,n,i){A$.call(this,e,n),this.a=i}function ut(e,n){return On(n,e.c.length),e.c[n]}function Pi(e,n){return v(ut(e.a,5),18).ib(n),e}function gc(e,n){return v(ut(e.a,0),18).ib(n),e}function z1(e,n){return v(ut(e.a,1),18).ib(n),e}function Si(e,n){return v(ut(e.a,2),18).ib(n),e}function Fa(e,n){return v(ut(e.a,3),18).ib(n),e}function Tb(e,n){return v(ut(e.a,4),18).ib(n),e}function j1e(e){return Zs(e,(Jn(),Ka)),e.e=!0,e}function b7(e){Op();var n;return n=EI.ec(e),q2e(n)}function U1(e,n){var i;return i=Qx(e,n),i.g=2,i}function A1e(e,n){var i;for(i=0;i<n;++i)e[i]=0}function kQ(e,n){e.b=n.b,e.c=n.c,e.d=n.d,e.a=n.a}function v7(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function _Q(e){return e.b.c.length+e.e.c.length}function Hx(e){return Array.isArray(e)&&e.ad===a}function EQ(e,n){return Qn(),pX(new V(e),n)!=-1}function zx(e,n,i,u,l,g){return Cee(e,n,i,u,l,0,g)}function F1(e,n,i){Uh(),ry.call(this,e.b,n,i,e.d)}function Y1(e,n){Uh(),ry.call(this,e.b,n,e.c,e.d)}function hl(e,n,i){kl(n,e.c.length),mb(e.c,n,i)}function CQ(e,n){return On(n,e.a.length),e.a[n]}function I1e(e){e.sort(function(n,i){return n-i})}function Pt(e){if(e==null)throw new hp;return e}function dl(e){if(e==null)throw new hp;this.a=e}function V1(e,n,i){if(e.a!=n)throw new dp;e.a=i}function y7(e,n){if(!e)throw new wn((Ln(),n))}function m7(e,n){if(!e)throw new RZ((Ln(),n))}function xr(e){if(e==null)throw new hp;return e}function Ux(e){$M.call(this,new jp),ba(this,e)}function w7(e){this.a=new sx(e.Y()),ba(this,e)}function q1(e){this.c=e,this.a=new Gh(this.c.a)}function Iu(e){kr(),this.a=(pn(),new Zq(Pt(e)))}function jn(){jn=s,Vn=(jn(),!1),di=!0}function PQ(){PQ=s,J9=Ae(G_,Rr,24,256,0,1)}function SQ(){SQ=s,mae=Pi(gc(new Yn,(Br(),CE)),jE)}function Fx(){Fx=s,qie=new D,$ie=new d7,Zie=new R}function NQ(e){return e!=null&&Kx(e)&&e.ad!==a}function Yx(e){return!Array.isArray(e)&&e.ad===a}function xf(e,n){return Go(n)?WQ(e,n):c_(e.d,n)}function x7(e,n){return qe(n,17)&&os(e,v(n,17))}function TQ(e,n){return qe(n,17)&&swe(e,v(n,17))}function L1e(e,n){return q2(e.a,n)!==void 0}function an(e,n){var i;return i=xy(e),Fb(i,n),i}function O1e(e,n){return!e&&(e=[]),e[e.length]=n,e}function D1e(e,n,i){return mi(e.a,n),$x(e,n.e,i)}function B1e(e,n,i){return Ln(),e.lastIndexOf(n,i)}function MQ(e,n,i){if(!e)throw new wn(x_e(n,i))}function R1e(e,n,i){var u;for(u=0;u<n;++u)e[u]=i}function qh(e,n){var i;return i=e.a.Y(),fk(n,i),i-n}function Vx(e){var n;return n=e.i,n||(e.i=e.T())}function k7(e){var n;return n=e.c,n||(e.c=e.gb())}function jQ(e){var n;return n=e.c,n||(e.c=e.Jb())}function pl(e){return e.e?e.e:e.e=e.Ob()}function AQ(e){return e.f?e.f:e.f=e.Pb()}function G1e(e,n){return pc(e.l&n.l,e.m&n.m,e.h&n.h)}function IQ(e,n){return Pr((xr(e),e),(xr(n),n))}function H1e(e){return qe(e,20)?v(e,20).tb():e.mb()}function Z1(e){for(Qn(),Pt(e);e.G();)e.H(),e.I()}function _7(e){var n;for(n=e;n.g;)n=n.g;return n}function z1e(e){return e.b.i.a+=e.a.f*(e.a.a-1),null}function Sp(e){yf(e.b!=-1),e.c.vb(e.a=e.b),e.b=-1}function LQ(e){return xt(e.b>0),e.a.sb(e.c=--e.b)}function $1(e){e.b?$1(e.b):e.d.V()&&xf(e.f.b,e.e)}function Zh(e){if(qa(e.d),e.d.d!=e.c)throw new dp}function qx(e,n){if(n[Rl]!=e[Rl])throw new dp}function kf(e,n){return Qn(),Pt(e),Pt(n),new u$(e,n)}function OQ(e,n){kr(),j0e.call(this,e,vy(new Eo(n)))}function E7(e,n,i,u){this.a=e,Bb.call(this,e,n,i,u)}function gl(e){this.a=Math.cos(e),this.b=Math.sin(e)}function Gs(e,n,i){Bo.call(this,e),this.b=n,this.a=i}function C7(e){this.b=new Ye,this.a=new Ye,this.c=e}function bl(e){this.c=new Wr,this.a=new Ye,this.b=e}function DQ(){DQ=s,Bre=new RM(!1),Rre=new RM(!0)}function bc(e,n){return++e.d,e.c[e.c.length]=n,!0}function Mb(e,n){Cr(e.d,n,e.b.b,e.b),++e.a,e.c=null}function Tn(e,n){var i;return i=e.a.db(n,e),i==null}function Zx(e,n){var i;return i=e.slice(0,n),Rb(i,e)}function zi(e,n){var i;return i=new Array(n),Rb(i,e)}function $x(e,n,i){var u;return u=e.b[n],e.b[n]=i,u}function U1e(e,n){var i;for(i=0;i<n;++i)e[i]=null}function F1e(e,n){var i;for(i=0;i<n;++i)e[i]=!1}function Y1e(e,n){return jn(),v(n.b,24).a<e?di:Vn}function V1e(e,n){return jn(),v(n.a,24).a<e?di:Vn}function q1e(e,n){return v(jQ(pl(e.a)).sb(n),21).yb()}function BQ(e){return Fn(),Ox(jye(e.a).mb(),(P1(),U_))}function Ht(e){return Qn(),new ns(rs(Rs(e.a,new w)))}function Kx(e){return typeof e===Fy||typeof e===Rne}function Z1e(e){r.setTimeout(function(){throw e},0)}function $1e(e,n){return e>0?new t7(e-1,n):new t7(e,n)}function RQ(e){return Pt(e),qe(e,345)?v(e,345):Na(e)}function P7(e,n){return gX(e.a,n,(jn(),Vn))==null}function S7(e,n){var i;return i=e.a.Y(),Lye(n,i),i-1-n}function GQ(e,n,i){var u;return u=vc(e,n),_me(e,n,i),u}function te(e,n,i){var u;return u=Qx(e,n),SJ(i,u),u}function Qx(e,n){var i;return i=new Mj,i.i=e,i.d=n,i}function HQ(e,n,i){this.a=e,fk(i,n),this.c=n,this.b=i}function oo(e,n,i){return Z0e(i==null||xke(e,i)),e[n]=i}function N7(e){e.a=null,e.e=null,No(e.b),e.d=0,++e.c}function K1e(e){wn.call(this,(Ln(),e??fu))}function Q1e(e){wn.call(this,(Ln(),e??fu))}function _f(e){var n;return n=e.f,n||(e.f=new T6(e))}function T7(e){var n;return n=e.k,n||(e.k=new lq(e))}function zQ(e){var n;return n=e.e,n||(e.e=new y$(e))}function $h(e){var n;return n=e.e,!n&&(e.e=n=e.gb()),n}function Wx(e){var n,i;return n=e.c.f.d,i=e.d.f.d,n==i}function M7(e,n){var i;return i=new Db(e),dj(i,n),i}function Np(e,n){return e.a+=String.fromCharCode(n),e}function Ui(e){return!e.a&&e.d?e.d.b:e.a}function Jx(e){return ga(e)?e|0:e.l|e.m<<22}function W1e(e){return yi(e,oI),Xh(Or(Or(5,e),e/10|0))}function ln(e,n){return Go(n)?ey(e,n):bi(vi(e.d,n))}function Ef(e){return qe(e,19)?v(e,19).Y():dk(e.mb())}function j7(e){return e?new w7((is(),e)):N1e(null.mb())}function Cf(e,n){return ot(e)===ot(n)||e!=null&&Fo(e,n)}function UQ(e,n){return p6(),Pr(Oe(qt(e)),Oe(qt(n)))}function FQ(e){return Fn(),Ox(e.a.bb().mb(),(P1(),MI))}function kr(){kr=s,za(),mv=new cr((pn(),pn(),Fc))}function Kh(){Kh=s,za(),Jp=new ux((pn(),pn(),PC))}function YQ(e,n){if(e==null)throw new cb((Ln(),n))}function J1e(e,n){return tA(),(e-n<=0?0-(e-n):e-n)<.2}function X1e(e,n){return e.i.b<n.i.b?-1:e.i.b==n.i.b?0:1}function us(e,n,i,u){e.g[n.e][i.e]=u,e.g[i.e][n.e]=u}function zo(e){yf(e.c!=-1),e.d.vb(e.c),e.b=e.c,e.c=-1}function Xx(e){this.c=e,this.b=e.a.b.a,Z6(e.a.c,this)}function ek(e){OA.call(this,new Eo(e)),this.a=new Wr}function VQ(){u6.call(this,new f6(new en)),this.a=this}function qQ(){bJ(),this.b=(Fn(),new en),this.a=new en}function eye(){return P1(),be(ve(jI,1),Ke,188,0,[U_,MI])}function tye(){return Ro(),be(ve(SI,1),Ke,159,0,[ho,tm])}function nye(){return S1(),be(ve(II,1),Ke,205,0,[F_,AI])}function ZQ(e){Q1(e.a),e.b=Ae(ht,et,1,e.b.length,4,1)}function $Q(e){return!e.b&&(e.b=new pf(e.c.W())),e.b}function jb(e,n){var i;return i=new P2,kne(e,n,i),i.d}function K1(e,n){var i;return i=Qx("",e),i.k=n,i.g=1,i}function Q1(e){var n;for(n=e.mb();n.G();)n.H(),n.I()}function A7(e,n){return qe(n,79)&&es(e.b,v(n,79).mc())}function rye(){return oy(),be(ve(uae,1),Ke,175,0,[t9,AE])}function iye(){return X1(),be(ve(bae,1),Ke,193,0,[IE,u9])}function aye(){return Lb(),be(ve(Tae,1),Ke,192,0,[DE,OE])}function kn(e,n,i){return Go(n)?ty(e,n,i):va(e.d,n,i)}function oye(e,n,i){e.i=0,e.e=0,n!=i&&rX(e,n,i)}function sye(e,n,i){e.i=0,e.e=0,n!=i&&nX(e,n,i)}function I7(e,n,i,u){this.d=e,this.b=n,this.a=i,this.c=u}function so(e,n,i,u){this.d=e,this.e=n,this.c=i,this.b=u}function W1(e,n,i,u){this.a=e,this.c=n,this.b=i,this.d=u}function Fi(e,n,i,u){xn.call(this,e,n),this.a=i,this.b=u}function uye(e,n){var i;return i=y6(e.a,n),i??[]}function tk(e,n){return Ln(),e==n?0:e<n?-1:1}function cye(e,n){var i;return i=nwe(e.f,n),Nn(Px(i),e.f.d)}function Qh(e,n){return x7(e.a,n)?e.b[v(n,17).e]:null}function Pa(e,n){return ot(e)===ot(n)||e!=null&&Fo(e,n)}function zn(e,n){if(n==null)throw new hp;return A2e(e,n)}function KQ(e){return kb(e==null||Kx(e)&&e.ad!==a),e}function Ya(e){return!e.a&&(e.a=new ZZ(e.c.bb())),e.a}function QQ(e){return!e.d&&(e.d=new rb(e.c.fb())),e.d}function ou(e){e.a.a=e.c,e.c.b=e.a,e.a.b=e.c.a=null,e.b=0}function lye(e){return xt(e.b<e.d.Y()),e.d.sb(e.c=e.b++)}function WQ(e,n){return n==null?c_(e.d,null):sX(e.e,n)}function JQ(e,n){this.g=e,this.d=be(ve(Nr,1),Zi,9,0,[n])}function XQ(e){this.c=e,this.b=new a$(v(Pt(new Y),56))}function Hs(){this.a=new Hi,this.b=(yi(3,Ll),new qi(3))}function eW(e,n){this.a=e,l1e.call(this,e,v(e.d,20).ub(n))}function J1(e,n,i,u){this.a=e,this.c=n,this.b=i,this.d=u}function nk(e,n,i){this.a=KA,this.d=e,this.b=n,this.c=i}function tW(){this.d=0,this.b=0,this.a=0,this.c=0}function nW(){this.b=new Qr,this.d=new ti,this.e=new t6}function pn(){pn=s,Fc=new eb,X9=new Ph,PC=new Os}function L7(){L7=s,Mre=new $K,Tre=new KK,PI=new dK,jre=new kK}function X1(){X1=s,IE=new P6("GREEDY",0),u9=new P6(A_,1)}function O7(){O7=s,gL=new Y1((Fe(),QI),(jn(),jn(),di))}function rW(){rW=s,jae=Pi(Fa(Si(new Yn,(Br(),NE)),PE),SE)}function Wh(e,n){var i;return i=pk(n),v(ln(e.c,i),24).a}function fye(e,n){var i;return i=Ex(e.a,n),i&&(n.f=null),i}function iW(e){var n;return n=e.b.ob(),ZW(n,n.length),n}function rk(e){return e<0?-1:e>0?1:0}function hye(){return na(),be(ve(d3e,1),Ke,171,0,[Ov,ms,vu])}function dye(){return my(),be(ve(Xre,1),Ke,166,0,[Q_,YI,VI])}function pye(){return td(),be(ve(hie,1),Ke,149,0,[jv,aE,iE])}function gye(){return hk(),be(ve(h3e,1),Ke,225,0,[Ic,Cd,Lc])}function bye(){return yy(),be(ve(v3e,1),Ke,221,0,[xL,kL,wL])}function vye(){return ly(),be(ve(wae,1),Ke,173,0,[LE,l9,c9])}function aW(e,n){return Ub(G1e(ga(e)?xc(e):e,ga(n)?xc(n):n))}function yye(e){return e.b==0?null:(xt(e.b!=0),su(e,e.a.a))}function D7(e){e.d=e.d-15,e.b=e.b-15,e.c=e.c+15,e.a=e.a+15}function B7(e){this.b=e,this.c=e,e.e=null,e.c=null,this.a=1}function oW(e,n,i){this.d=e,this.b=new Ye,this.c=n,this.a=i}function ik(e,n){Ive(this,new wt(e.a,e.b)),Lve(this,Ca(n))}function mye(e,n){return n===e?!0:(qa(e),e.d.t(n))}function wye(e){return e==$o||e==ws}function xye(e){ul(new V(Kb(e.e)))&&(QCe(e),Wke(e))}function sW(e,n){var i;i=v(sj(e.e,n),116),i&&(e.d=!0)}function R7(e,n){var i;return i=e.b.pb(n),ZW(i,e.b.Y()),i}function kye(e){var n;return n=_te(e,(De(),ct)),n+=_te(e,at),n}function _ye(e,n,i){nv(e,n,i,(De(),at),e.f),nv(e,n,i,ct,e.n)}function _n(e,n){e.f&&Ir(e.f.f,e),e.f=n,e.f&&$e(e.f.f,e)}function Fr(e,n){e.d&&Ir(e.d.a,e),e.d=n,e.d&&$e(e.d.a,e)}function An(e,n){e.d&&Ir(e.d.b,e),e.d=n,e.d&&$e(e.d.b,e)}function qn(e,n){e.c&&Ir(e.c.e,e),e.c=n,e.c&&$e(e.c.e,e)}function ak(e){var n;return n=Ca(e.b),ba(n,e.c),ba(n,e.i),n}function Eye(){i8==256&&(r8=Rm,Rm={},i8=0),++i8}function Uo(){Uo=s,Dc=new A6(qp,0),Js=new A6(Vp,1)}function vl(){vl=s,yu=new O6(Vp,0),Kf=new O6(qp,1)}function Cye(){return vl(),be(ve(E3e,1),Ke,223,0,[yu,Kf])}function Pye(){return ay(),be(ve(x3e,1),Ke,242,0,[Uv,zv])}function Sye(){return Uo(),be(ve(k3e,1),Ke,248,0,[Dc,Js])}function Nye(){return So(),be(ve(_3e,1),Ke,247,0,[Yu,bo])}function Tye(){return Gb(),be(ve(Fae,1),Ke,194,0,[RE,GE])}function Mye(){return iy(),be(ve(Moe,1),Ke,174,0,[rC,T9])}function G7(e){return pn(),qe(e,63)?new g6(e):new A1(e)}function jye(e){var n;return n=e.g,v(n||(e.g=new BM(e)),20)}function vi(e,n){return wX(e,n,uye(e,n==null?0:e.b.Vc(n)))}function uW(e){var n;return n=sy(e),"n_"+(n??f1(e.k))}function cW(e){return l1(Ap(e))+"@"+(ls(e)>>>0).toString(16)}function Aye(e,n){return m1e(Gt((xr(e),e)),Gt((xr(n),n)))}function ey(e,n){return n==null?bi(vi(e.d,null)):B$(e.e,n)}function Iye(e,n,i){return new Y7(e.c,ane(e.b,Qye(e.d,n,i)),e.a)}function ur(e){return Math.max(Math.min(e,Sr),-2147483648)|0}function H7(e){this.e=e,this.b=this.e.a.entries(),this.a=[]}function z7(e){this.c=e,this.b=new Af(new Tu(this.c.a).a)}function lW(e){this.b=(Qn(),Qn(),Qn(),Are),this.a=v(Pt(e),35)}function Pf(e,n,i){Uh(),gt.call(this,e,n),i!=null&&(this.c=i)}function fW(e,n,i){if(e<0||n<e||n>i)throw new ts(ike(e,n,i))}function Lye(e,n){if(e<0||e>=n)throw new ts(oke(e,n));return e}function ok(e,n){if(e==null)throw new cb((Ln(),n));return e}function It(e){if(!Bt(e))throw new _a;return e.c=e.b,e.b.H()}function Oye(e){function n(){}return n.prototype=e||{},new n}function hW(e){var n;return n=new Z2(Pk(e.length)),Fb(n,e),n}function dW(e){var n;n=e.c.b.b,e.b=n,e.a=e.c.b,n.a=e.c.b.b=e}function U7(e){this.b=null,!e&&(e=(vf(),vf(),th)),this.a=e}function F7(e){this.b=e,this.a=new Cn(this.b,this.b.c.length)}function pW(e){return kr(),Pt(e),G2e(e||R1(new V(null)))}function Dye(e,n){var i=LI[e.charCodeAt(0)];return i??e}function gW(e,n){var i=e.a=e.a||[];return i[n]||(i[n]=e.Oc(n))}function bW(e,n,i){var u;Qj(n,i,e.c.length),u=i-n,v6(e.c,n,u)}function Y7(e,n,i){s$.call(this,n.a),this.c=e,this.b=n,this.a=i}function sk(e){return E1(e.c),e.e=e.a=e.c,e.c=e.c.c,++e.d,e.a.f}function vW(e){return E1(e.e),e.c=e.a=e.e,e.e=e.e.e,--e.d,e.a.f}function Yi(e){return En(be(ve(Xt,1),Jt,10,0,[e.f.i,e.i,e.a]))}function Bye(){return Ys(),be(ve(Zre,1),Ke,107,0,[q_,xv,Gl,vd])}function Rye(){return Ou(),be(ve(Kre,1),Ke,122,0,[$_,RI,Uf,Z_])}function Gye(){return sd(),be(ve(fE,1),Ke,139,0,[Lv,lE,cE,uE])}function Hye(){return Bu(),be(ve(ng,1),Ke,150,0,[sE,Iv,oE,Av])}function zye(){return L7(),be(ve(em,1),Ke,136,0,[Mre,Tre,PI,jre])}function Uye(){return zb(),be(ve(g3e,1),Ke,201,0,[Oc,Vl,Yl,Zf])}function Fye(){return De(),be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct])}function Yye(){return Jn(),be(ve(wv,1),Ke,59,0,[qo,aa,Ka,Qs,bu])}function yW(){yW=s,vae=Yr((X1(),be(ve(bae,1),Ke,193,0,[IE,u9])))}function mW(){mW=s,cae=Yr((oy(),be(ve(uae,1),Ke,175,0,[t9,AE])))}function wW(){wW=s,Mae=Yr((Lb(),be(ve(Tae,1),Ke,192,0,[DE,OE])))}function Vye(){return Fs(),be(ve(P3e,1),Ke,140,0,[Tm,Jf,Sd])}function qye(){return nd(),be(ve(C3e,1),Ke,218,0,[b9,Cm,Fv])}function Zye(){return vr(),be(ve(S3e,1),Ke,219,0,[fC,Wi,hi])}function $ye(){return ky(),be(ve(Roe,1),Ke,153,0,[Q9,CC,W9])}function Kye(){return Lu(),be(ve(Hoe,1),Ke,172,0,[gg,$v,Bm])}function ty(e,n,i){return n==null?va(e.d,null,i):Rk(e.e,n,i)}function Qye(e,n,i){return new Oy(e,!1,null,(Ro(),ho),!0,n,i)}function V7(e,n){return TQ(e.a,n)?$x(e,v(n,17).e,null):null}function ny(e){return Pt(e),Zj((Qn(),new ns(rs(Rs(e.a,new w)))))}function Wye(e){return pn(),e?new qq(e):(T$(),Voe)}function xW(e,n){var i,u;return u=qh(e,n),i=e.a.ub(u),new h$(e,i)}function Jye(e,n){var i,u;for(u=e.Y(),i=0;i<u;i++)e.wb(i,n[i])}function kW(e,n,i){var u;u=new op,u.b=n,u.a=i,++n.b,$e(e.d,u)}function Xye(e,n,i){e.d&&Ir(e.d.b,e),e.d=n,e.d&&hl(e.d.b,i,e)}function uk(e,n,i){Qj(n,i,e.Y()),this.c=e,this.a=n,this.b=i-n}function ck(e,n,i,u){this.d=e,this.b=n,this.a=i,this.c=u}function _W(e,n){u6.call(this,GJ(Pt(e),Pt(n))),this.b=e,this.c=n}function Cn(e,n){this.a=e,Nh.call(this,e),kl(n,e.Y()),this.b=n}function ry(e,n,i,u){Uh(),Pf.call(this,e,n,i),u!=null&&(this.d=u)}function eme(e,n,i){e.i=0,e.e=0,n!=i&&(rX(e,n,i),nX(e,n,i))}function q(e){return xt(e.a<e.c.c.length),e.b=e.a++,e.c.c[e.b]}function Ab(e){return xt(e.b.b!=e.d.a),e.c=e.b=e.b.b,--e.a,e.c.c}function EW(e,n){var i;return i=1-n,e.a[i]=py(e.a[i],i),py(e,n)}function tme(e){var n;return n=(Ni(),Ni(),ioe),e.d&&r_(e),Yve(),n}function nme(e){var n;return ga(e)?(n=e,n==-0?0:n):hxe(e)}function Tp(e){var n;return n=(Pt(e),new dc((is(),e))),Ly(n),vy(n)}function rme(e){Qn();for(var n;;)if(n=e.H(),!e.G())return n}function CW(e){return L1(e),E1(e.c),e.e=e.a=e.c,e.c=e.c.b,++e.d,e.a}function PW(e){return L1(e),E1(e.e),e.c=e.a=e.e,e.e=e.e.d,--e.d,e.a}function ime(e){var n;n=e.Y(),n!=0&&(e.d.Q(),e.f.c-=n,$1(e))}function ame(e,n,i){var u;u=P2e();try{return w1e(e,n,i)}finally{Sme(u)}}function ome(e){return function(){return ame(e,this,arguments)}}function Ib(e){return qe(e,19)?v(e,19).V():!e.mb().G()}function cr(e){kr(),this.a=(pn(),qe(e,63)?new g6(e):new A1(e))}function iy(){iy=s,rC=new D6($y,0),T9=new D6("TOP_LEFT",1)}function So(){So=s,Yu=new I6("DOWN",0),bo=new I6("UP",1)}function Lb(){Lb=s,DE=new S6("LAYER_SWEEP",0),OE=new S6(A_,1)}function ay(){ay=s,Uv=new j6("UPPER",0),zv=new j6("LOWER",1)}function sme(e){if(e<0)throw new GZ("Negative array size: "+e)}function q7(e,n){return qe(n,21)?Qk(e.a,v(n,21)):!1}function SW(e,n){return qe(n,21)?Qk(e.a,v(n,21)):!1}function NW(e,n){return qe(n,21)?Qk(e.a,v(n,21)):!1}function lk(e){var n;return n=new Hs,Du(n,e),_e(n,(Fe(),ir),null),n}function TW(e,n){return n===e?"(this Map)":(Ln(),n==null?fu:Na(n))}function Z7(e,n,i,u){return qe(i,63)?new zK(e,n,i,u):new E7(e,n,i,u)}function ume(){return _c(),be(ve(aL,1),Ke,100,0,[Yf,Ws,nL,rL,iL])}function cme(){return Zn(),be(ve(lie,1),Ke,28,0,[Ac,vs,Mv,wd,bs,fi])}function lme(){return fs(),be(ve(Yre,1),Ke,103,0,[V_,om,sm,um,im,am])}function fme(){return Iy(),be(ve(Wre,1),Ke,133,0,[K_,zI,FI,GI,UI,HI])}function MW(){MW=s,die=Yr((td(),be(ve(hie,1),Ke,149,0,[jv,aE,iE])))}function jW(){jW=s,eie=Yr((my(),be(ve(Xre,1),Ke,166,0,[Q_,YI,VI])))}function AW(){AW=s,xae=Yr((ly(),be(ve(wae,1),Ke,173,0,[LE,l9,c9])))}function hme(){return pt(),be(ve(vL,1),Ke,132,0,[$n,Pn,Dn,fr,go,$i])}function dme(){return zp(),be(ve(lae,1),Ke,125,0,[Hv,r9,o9,a9,i9,n9])}function pme(e){return Qn(),Np(LX((is(),NI),Np(new bp,91),e),93).a}function uo(e,n){pn();var i;i=e.ob(),ad(i,0,i.length,n),Jye(e,i)}function IW(e,n,i,u,l){this.c=e,this.e=n,this.d=i,this.b=u,this.a=l}function zs(e,n,i,u,l){xn.call(this,e,n),this.a=i,this.b=u,this.c=l}function Sf(e,n,i,u,l){xn.call(this,e,n),this.a=i,this.b=u,this.c=l}function LW(e,n,i){this.a=n,this.c=e,this.b=(Pt(i),new dc((is(),i)))}function OW(){xx(this),this.b=new wt(ji,ji),this.a=new wt(Zr,Zr)}function oy(){oy=s,t9=new C6("QUADRATIC",0),AE=new C6("SCANLINE",1)}function gme(){throw new Mh("Add not supported on this collection")}function DW(e){var n,i;return i=C1e(e.Zb()),n=e.Yb(),n==1?i:i+" x "+n}function on(e){return xt(e.b!=e.d.c),e.c=e.b,e.b=e.b.a,++e.a,e.c.c}function bme(e){if(e.Tc())return null;var n=e.k,i=Jy[n];return i}function fk(e,n){if(e<0||e>n)throw new ts(lA(e,n,"index"));return e}function vme(e,n){var i;return qa(e),i=e.d.nb(n),i&&(--e.f.c,$1(e)),i}function Ob(e,n,i){var u;u=(Pt(e),new dc((is(),e))),nxe(new LW(u,n,i))}function yme(e,n){return tk((Ln(),e.toLowerCase()),n.toLowerCase())}function mme(e,n){return tk((Ln(),e.toLowerCase()),n.toLowerCase())}function wme(){return uj(),be(ve(NC,1),Ke,138,0,[n8,Zoe,$oe,Koe])}function xme(e,n,i,u){Array.prototype.splice.apply(e,[n,i].concat(u))}function Cr(e,n,i,u){var l;l=new C2,l.c=n,l.b=i,l.a=u,u.b=i.a=l,++e.b}function $7(e,n){var i;return i=G7(R1(new bk(e,n))),Z1(new bk(e,n)),i}function kme(e,n,i){if(i){var u=i.gc();e.a[n]=u(i)}else delete e.a[n]}function _me(e,n,i){if(i){var u=i.gc();i=u(i)}else i=void 0;e.a[n]=i}function Db(e){this.d=e.d,this.c=e.c,this.a=e.a,this.b=e.b}function BW(){this.g=new JM,this.c=new JM,this.a=new Ye,this.k=new Ye}function RW(){this.d=new qQ,this.a=new LK,this.c=new z$,this.b=new QV}function K7(){this.i=new Ye,this.g=new Wr,this.n=new f7,this.q=new f7}function GW(e,n,i,u){this.e=e,this.b=new Ye,this.d=n,this.a=i,this.c=u}function Mp(){Mp=s,Wie=new ae,Jie=new se,Kie=new le,Qie=new he,Xie=new fe}function hk(){hk=s,Ic=new nx(Vp,0),Cd=new nx($y,1),Lc=new nx(qp,2)}function HW(){HW=s,$re=Yr((Ys(),be(ve(Zre,1),Ke,107,0,[q_,xv,Gl,vd])))}function zW(){zW=s,Qre=Yr((Ou(),be(ve(Kre,1),Ke,122,0,[$_,RI,Uf,Z_])))}function UW(){UW=s,bie=Yr((sd(),be(ve(fE,1),Ke,139,0,[Lv,lE,cE,uE])))}function FW(){FW=s,gie=Yr((Bu(),be(ve(ng,1),Ke,150,0,[sE,Iv,oE,Av])))}function YW(){YW=s,Yae=Yr((Gb(),be(ve(Fae,1),Ke,194,0,[RE,GE])))}function VW(){VW=s,joe=Yr((iy(),be(ve(Moe,1),Ke,174,0,[rC,T9])))}function yl(e){return Pt(e),qe(e,19)?new dc((is(),v(e,19))):R1(e.mb())}function Eme(e){return Gt(Oe(Yt(J(e,(Ce(),zc)))))&&J(e,_t)!=null}function Cme(e){return Gt(Oe(Yt(J(e,(Ce(),zc)))))&&J(e,_t)!=null}function qW(e,n,i,u){n==null&&(n=fu),e.a+=""+(Ln(),n.substr(i,u-i))}function ZW(e,n){var i;for(i=0;i<n;++i)oo(e,i,new qM(v(e[i],21)))}function Pme(e,n){var i,u;i=v(oxe(e.b,n),19),i&&(u=i.Y(),i.Q(),e.c-=u)}function ml(e,n,i){var u;return u=(On(n,e.c.length),e.c[n]),e.c[n]=i,u}function wl(e){return xt(e.a<e.c.a.length),e.b=e.a,_J(e),e.c.b[e.b]}function dk(e){Qn();var n;for(n=0;e.G();)e.H(),n=Or(n,1);return Xh(n)}function Q7(e){this.d=e,this.b=this.d.a.entries(),this.a=this.b.next()}function $W(e){this.g=e,this.f=new Ye,this.a=dn(this.g.c.c,this.g.d.c)}function KW(e){n6(),this.e=null,this.f=null,this.a="",this.b=e,this.a=""}function jp(){en.call(this),RK(this),this.b.b=this.b,this.b.a=this.b}function Sme(e){e&&Xme((r6(),OI)),--nm,e&&rm!=-1&&(H0e(rm),rm=-1)}function xl(e){return!e.c||!e.d?!1:!!e.c.f&&e.c.f==e.d.f}function Nme(){return Date.now?Date.now():new Date().getTime()}function sy(e){return e.c.c.length!=0?v(ut(e.c,0),33).a:null}function QW(e){return e.c.c.length!=0?v(ut(e.c,0),33).a:null}function Tme(e){return e.d=3,e.c=owe(e),e.d!=2?(e.d=0,!0):!1}function uy(e,n,i){this.a=e,this.b=n,this.c=i,$e(e.j,this),$e(n.d,this)}function co(e,n,i,u){var l;e.c?l=new M2(ur(u)):l=new M2(u),Va(n,i,l)}function cy(e){var n,i;return Pt(e),n=W1e(e.length),i=new qi(n),Fb(i,e),i}function W7(e){var n,i,u;return n=e&fo,i=e>>22&fo,u=e<0?Sc:0,pc(n,i,u)}function Mme(){return Sy(),be(ve(Gae,1),Ke,141,0,[p9,f9,h9,BE,d9])}function jme(){return Ty(),be(ve(Eoe,1),Ke,115,0,[Pm,ZE,KE,$E,QE])}function Ame(){return ra(),be(ve(Ooe,1),Ke,85,0,[eh,qv,Uc,fg,Ku])}function WW(){WW=s,qre=Yr((Jn(),be(ve(wv,1),Ke,59,0,[qo,aa,Ka,Qs,bu])))}function JW(){JW=s,pie=Yr((De(),be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct])))}function XW(){XW=s,cie=Yr((_c(),be(ve(aL,1),Ke,100,0,[Yf,Ws,nL,rL,iL])))}function eJ(){eJ=s,Aae=Pi(Fa(Fa(Fa(Si(new Yn,(Br(),NE)),FL),SL),PE),SE)}function tJ(e,n){var i,u;for(u=n.mb();u.G();)i=v(u.H(),55),Zte(e,i,0,0)}function Us(e,n,i){var u,l;for(l=e.mb();l.G();)u=v(l.H(),55),sv(u,n,i)}function J7(e,n,i){var u,l;for(u=0,l=0;l<n.length;l++)u+=e.Hc(n[l],u,i)}function Nf(e,n){var i;return i=(On(n,e.c.length),e.c[n]),v6(e.c,n,1),i}function Ime(e){var n;for(Pt(e),n=0;n<0&&Bt(e);n++)It(e);return n}function No(e){var n;e.d=new uK(e),e.e=new cK(e),n=e[Rl]|0,e[Rl]=n+1}function nJ(e){e.g=new Qr,e.o=new Qr,e.c=new Qr,e.j=new Ye,e.d=new Ye}function kl(e,n){if(e<0||e>n)throw new ts("Index: "+e+", Size: "+n)}function On(e,n){if(e<0||e>=n)throw new ts("Index: "+e+", Size: "+n)}function rJ(e,n){var i,u;return i=n.yb(),u=jj(e,i),!!u&&Pa(u.e,n.zb())}function Lme(e,n){var i;return i=e.d,n>0?v(ut(i.a,n-1),9):null}function Ae(e,n,i,u,l,g){var y;return y=mee(l,u),l!=9&&be(ve(e,g),n,i,l,y),y}function Tf(e){var n;if(!yc(e))throw new _a;return e.d=1,n=e.c,e.c=null,n}function Bb(e,n,i,u){this.f=e,this.e=n,this.d=i,this.b=u,this.c=u?u.d:null}function Ome(e,n){if(e&&typeof e==Fy)try{e.__gwt$exception=n}catch{}}function Dme(e,n){e.a.$b(n.d,e.b)>0&&($e(e.c,new u7(n.c,n.d,e.d)),e.b=n.d)}function Bme(e,n){var i;return i=Pr(e.j,n.j),i==0?Pr(e.k,n.k):i}function X7(e){var n,i;return i=v(ut(e.f,0),7),n=v(J(i,(Ce(),_t)),7),n}function pk(e){var n,i;return i=v(ut(e.f,0),7),n=v(J(i,(Ce(),_t)),7),n}function Rme(e,n){return Pr(Oe(qt(J(e,(Ce(),$u)))),Oe(qt(J(n,$u))))}function iJ(){iJ=s,Goe=Yr((ky(),be(ve(Roe,1),Ke,153,0,[Q9,CC,W9])))}function aJ(){aJ=s,zoe=Yr((Lu(),be(ve(Hoe,1),Ke,172,0,[gg,$v,Bm])))}function oJ(){oJ=s,Vre=Yr((fs(),be(ve(Yre,1),Ke,103,0,[V_,om,sm,um,im,am])))}function sJ(){sJ=s,Jre=Yr((Iy(),be(ve(Wre,1),Ke,133,0,[K_,zI,FI,GI,UI,HI])))}function uJ(){uJ=s,fie=Yr((Zn(),be(ve(lie,1),Ke,28,0,[Ac,vs,Mv,wd,bs,fi])))}function cJ(){cJ=s,fae=Yr((zp(),be(ve(lae,1),Ke,125,0,[Hv,r9,o9,a9,i9,n9])))}function Gme(){return Nl(),be(ve(oae,1),Ke,109,0,[wm,Rv,Gv,JL,XL,WL,e9,xm])}function Hme(){return Gu(),be(ve(Rn,1),Ke,41,0,[oa,po,ua,Aa,ja,Ma,Ai,ca,sa])}function zme(){return Gp(),be(ve(qE,1),Ke,123,0,[VE,YE,FE,zE,HE,UE])}function Ume(){return Jb(),be(ve(Poe,1),Ke,124,0,[JE,y9,w9,v9,m9,WE])}function ej(){ej=s,BI=new gt("de.cau.cs.kieler.labels.labelManager",null)}function Fme(){return Date.now?Date.now():new Date().getTime()}function Yme(e){var n;return n=v(Zx(e.b,e.b.length),11),new li(e.a,n,e.c)}function Vme(e,n){var i;return i=(Ln(),n.length),es(Pp(e,e.length-i,i),n)}function lJ(e,n){var i;return i=new P2,i.c=!0,i.d=n.zb(),kne(e,n.yb(),i)}function qme(e,n){var i;return i=n.yb(),Fn(),new w6(i,iee(e.b,i,v(n.zb(),19)))}function Ir(e,n){var i;return i=Vi(e,n,0),i==-1?!1:(e.vb(i),!0)}function Rb(e,n){return cj(n)!=9&&be(Ap(n),n._c,n.__elementTypeId$,cj(n),e),e}function tj(e){return qx(e.c.a.c,e),xt(e.b!=e.c.a.b),e.a=e.b,e.b=e.b.a,e.a}function nj(e){yf(!!e.c),qx(e.e,e),e.c.I(),e.c=null,e.b=xj(e),Z6(e.e,e)}function Zme(e,n,i){e.a=n,e.c=i,e.b.a.Q(),ou(e.d),e.e.a.c=Ae(ht,et,1,0,4,1)}function fJ(e,n,i){u6.call(this,GJ(Pt(e),Pt(n))),this.b=e,this.c=n,this.a=i}function hJ(e,n,i,u){this.b=new Bq(this),this.a=e,this.c=n,this.e=i,this.d=u}function dJ(e){yX.call(this,e,0),RK(this),this.b.b=this.b,this.b.a=this.b}function gk(e,n){k1.call(this,e,n),this.a=Ae(j3e,et,183,2,0,1),this.b=!0}function Jh(e,n){return Go(n)?n==null?!!vi(e.d,null):L1e(e.e,n):!!vi(e.d,n)}function rj(e,n){return pp(),(e-n>0?e-n:-(e-n))<=hv||e==n||isNaN(e)&&isNaN(n)}function pJ(e,n){return pp(),(e-n>0?e-n:-(e-n))<=hv||e==n||isNaN(e)&&isNaN(n)}function ij(e){var n,i;n=!0;do n?i=BX(e):i=FX(e),n=!n;while(i);kj(e,e.d)}function Va(e,n,i){var u;if(n==null)throw new hp;return u=zn(e,n),kme(e,n,i),u}function _e(e,n,i){return!e.n&&(e.n=new en),i==null?xf(e.n,n):kn(e.n,n,i),e}function Vi(e,n,i){for(;i<e.c.length;++i)if(Pa(n,e.c[i]))return i;return-1}function $me(e,n){for(;n>=e.a.c.length;)$e(e.a,new ti);return v(ut(e.a,n),20)}function Kme(e,n){var i;return i=v(Zb(e.a,n),19),i?iee(e.b,n,i):null}function Qme(e,n,i){var u;u=zn(e,P_),u||(u=new df,Va(e,P_,u)),Va(u.kc(),n,i)}function Zt(e,n,i,u,l){var g;return g=Qx(e,n),SJ(i,g),g.g=l?8:0,g.f=u,g.e=l,g}function bk(e,n){var i;this.f=e,this.b=n,i=v(ln(e.b,n),126),this.c=i?i.b:null}function aj(e,n){var i,u,l;for(u=0,l=n.length;u<l;++u)i=n[u],Cr(e,i,e.c.b,e.c)}function gJ(e,n,i,u,l,g){var y;y=lk(u),qn(y,l),An(y,g),Tt(e.a,u,new D1(y,n,i.f))}function oj(e,n,i){var u;return u=0,e.c[i]>0&&(u+=ICe(n)),e.b[i]&&(u+=zCe(n)),u}function sj(e,n){var i;return i=v(xf(e.c,n),176),i?(v7(i),i.e):null}function Xh(e){return Ak(e,Sr)>0?Sr:Ak(e,hu)<0?hu:Jx(e)}function Wme(e){return is(),yi(e,"size"),Jx(P0e(TX(e,8),iI)?TX(e,8):iI),new V2}function vk(e){k1e.call(this,(Ln(),e==null?fu:Na(e)),qe(e,46)?v(e,46):null)}function qi(e){xx(this),y7(e>=0,"Initial capacity must not be negative")}function bJ(){bJ=s,Uie=Tb(Fa(Fa(new Yn,(Br(),GL)),LL),DL),Fie=Si(new Yn,OL)}function Sa(){Sa=s,mL=new xe,yL=new Se,yE=new Ie,vE=new Re,mE=new Ne,wE=new Me}function uj(){uj=s,n8=new w1("All",0),Zoe=new pK,$oe=new wK,Koe=new gK}function ly(){ly=s,LE=new ax(bre,0),l9=new ax("LONGEST_PATH",1),c9=new ax(A_,2)}function fy(){fy=s,Hre=pc(fo,fo,524287),zre=pc(0,0,524288),W7(1),W7(2),DI=W7(0)}function vJ(){vJ=s,sae=Yr((Nl(),be(ve(oae,1),Ke,109,0,[wm,Rv,Gv,JL,XL,WL,e9,xm])))}function yJ(){yJ=s,Hae=Yr((Sy(),be(ve(Gae,1),Ke,141,0,[p9,f9,h9,BE,d9])))}function mJ(){mJ=s,Coe=Yr((Ty(),be(ve(Eoe,1),Ke,115,0,[Pm,ZE,KE,$E,QE])))}function wJ(){wJ=s,Doe=Yr((ra(),be(ve(Ooe,1),Ke,85,0,[eh,qv,Uc,fg,Ku])))}function xJ(e){iA(),a1e(this,Jx(aW(Ub(kke(ga(e)?xc(e):e,24)),_I)),Jx(aW(e,_I)))}function Ap(e){return Go(e)?H_:Fh(e)?Kv:Yh(e)?N3e:Yx(e)||Hx(e)?e.$c:e.$c||f3e}function cj(e){return e.__elementTypeCategory$==null?9:e.__elementTypeCategory$}function Jme(e){var n,i;if(e.a){i=null;do n=e.a,e.a=null,i=Fee(n,i);while(e.a);e.a=i}}function Xme(e){var n,i;if(e.b){i=null;do n=e.b,e.b=null,i=Fee(n,i);while(e.b);e.b=i}}function ed(e){M$();var n,i;for(i=lI,n=0;n<e.length;n++)e[n]>i&&(i=e[n]);return i}function hy(e,n){var i;return i=v(ln(e.b,n),106),i||(i=n.rc(),kn(e.b,n,i)),i}function yk(e,n){var i;return i=v(ln(e.c,n),176),i?(NK(e,i),i.e):null}function kJ(e,n,i,u){var l;l=v(yk(e.e,n),116),l.b+=i,l.a+=u,$b(e.e,n,l),e.d=!0}function _J(e){var n;for(++e.a,n=e.c.a.length;e.a<n;++e.a)if(e.c.b[e.a])return}function ewe(e){var n,i,u;for(n=(e.g==null&&(e.g=b7(e)),e.g),i=0,u=n.length;i<u;++i);}function twe(e,n){var i,u;return qa(e),u=e.d.V(),i=e.d.ib(n),i&&(++e.f.c,u&&B1(e)),i}function yi(e,n){if(e<0)throw new wn(n+" cannot be negative but was: "+e);return e}function lj(e){if(!e.a.G()&&(e.a=e.b.mb(),!e.a.G()))throw new _a;return e.a.H()}function Ip(e){Qn();var n;return Pt(e),qe(e,108)?(n=v(e,108),n):new dq(e)}function vc(e,n){var i=e.a[n],u=(Sk(),Y_)[typeof i];return u?u(i):Ij(typeof i)}function mk(e,n){var i,u;for(u=new V(e);u.a<u.c.c.length;)i=v(q(u),7),By(i,n)}function wk(e,n){var i,u,l,g;for(u=e.d,l=0,g=u.length;l<g;++l)i=u[l],Ha(e.g,i).a=n}function nwe(e,n){var i;return i=Mu(ao(v(ln(e.g,n),10)),q0e(v(ln(e.f,n),198).b)),i}function xk(e){var n;return!yc(kf((n=new un(e.b.a).a.bb().mb(),new hn(n)),e.a))}function fj(e){var n;yf(!!e.c),n=e.c.a,su(e.d,e.c),e.b==e.c?e.b=n:--e.a,e.c=null}function EJ(e){return e.c&&e.d?e.c.f+"("+e.c+")->"+e.d.f+"("+e.d+")":"e_"+hc(e)}function rwe(e,n){return zb(),e==Oc&&n==Vl||e==Vl&&n==Oc||e==Zf&&n==Yl||e==Yl&&n==Zf}function iwe(e,n){return zb(),e==Oc&&n==Yl||e==Oc&&n==Zf||e==Vl&&n==Zf||e==Vl&&n==Yl}function awe(){return uv(),be(ve(Noe,1),Ke,110,0,[_9,nC,E9,S9,C9,N9,P9,tC])}function CJ(){CJ=s,uie=Yr((Gu(),be(ve(Rn,1),Ke,41,0,[oa,po,ua,Aa,ja,Ma,Ai,ca,sa])))}function td(){td=s,jv=new tx("OUTSIDE",0),aE=new tx("INSIDE",1),iE=new tx("FIXED",2)}function Fs(){Fs=s,Tm=new hx(Zp,0),Jf=new hx("TOP",1),Sd=new hx("BOTTOM",2)}function Gb(){Gb=s,RE=new L6("CLASSIC",0),GE=new L6("IMPROVE_STRAIGHTNESS",1)}function hj(){this.e=new Wr,this.a=new tW,this.d=new Wr,this.b=new Ye,this.c=new Ye}function dy(e,n,i){this.b=n,this.a=e,this.c=i,$e(this.a.e,this),$e(this.b.b,this)}function dj(e,n){e.d=dn(e.d,n.d),e.c=Xe(e.c,n.c),e.a=Xe(e.a,n.a),e.b=dn(e.b,n.b)}function su(e,n){var i;return i=n.c,n.a.b=n.b,n.b.a=n.a,n.a=n.b=null,n.c=null,--e.b,i}function kk(e,n){Qn();var i;for(Pt(e),Pt(n),i=!1;n.G();)i=i|e.ib(n.H());return i}function Lp(e){var n;return qx(e.e,e),xt(e.b),e.c=e.a,n=v(e.a.H(),21),e.b=xj(e),n}function owe(e){for(var n;e.b.G();)if(n=e.b.H(),e.a.D(n))return n;return e.d=2,null}function swe(e,n){return n&&e.b[n.e]==n?(oo(e.b,n.e,null),--e.c,!0):!1}function uwe(e){return E_<e&&e<Nc?e<0?Math.ceil(e):Math.floor(e):Ub(U_e(e))}function PJ(e){if(e){if(e.V())throw new _a;return e.sb(e.Y()-1)}return rme(null.mb())}function cwe(e,n){var i;return i=e.d,n<i.a.c.length-1?v(ut(i.a,n+1),9):null}function SJ(e,n){if(e){n.k=e;var i=bme(n);if(!i){Jy[e]=[n];return}i.$c=n}}function NJ(e,n){var i,u;u=!1;do e.i?i=Lwe(e,n):i=Iwe(e,n),u=u|i;while(i);return u}function TJ(e,n,i){var u,l;u=n;do l=Oe(e.n[u.k])+i,e.n[u.k]=l,u=e.a[u.k];while(u!=n)}function lwe(e){var n,i;for(i=new V(e.a.b);i.a<i.c.c.length;)n=v(q(i),25),n.vc()}function fwe(){AZ();for(var e=R_,n=0;n<arguments.length;n++)e.push(arguments[n])}function hwe(e,n){var i,u;for(i=0,u=e.Y();i<u;++i)if(Pa(n,e.sb(i)))return i;return-1}function pj(e,n){var i;return ok(e,"set1"),ok(n,"set2"),i=(y1(),new o$(n)),new tQ(e,i,n)}function dwe(e){var n=/function(?:\s+([\w$]+))?\s*\(/,i=n.exec(e);return i&&i[1]||w_}function pwe(e,n,i){Vt(i,ore,3),nee(e.c,n,Mf(i,1)),hte(e,n,Mf(i,1)),Dne(n,Mf(i,1)),Dt(i)}function MJ(){MJ=s,_oe=Yr((Gp(),be(ve(qE,1),Ke,123,0,[VE,YE,FE,zE,HE,UE])))}function jJ(){jJ=s,Soe=Yr((Jb(),be(ve(Poe,1),Ke,124,0,[JE,y9,w9,v9,m9,WE])))}function AJ(){AJ=s,Uoe=be(ve(ar,1),rr,26,12,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function vr(){vr=s,fC=new dx(Rf,0),Wi=new dx("INPUT",1),hi=new dx("OUTPUT",2)}function IJ(e){this.c=e,this.b=new Af(new Tu(e.b).a),this.a=null,this.d=(Qn(),Qn(),TI)}function LJ(e){this.e=e,this.d=new Z2(Pk(Vx(this.e).Y())),this.c=this.e.a,this.b=this.e.c}function gj(e,n,i){this.c=e,K7.call(this),this.b=n,this.j=new so(n.d,n.e,n.c,n.b),this.a=i}function OJ(e,n){e.j>0&&e.c<e.j&&(e.c+=n,e.g&&e.g.d>0&&e.e!=0&&OJ(e.g,n/e.j*e.g.d))}function DJ(e){return e.b.d.f.g==(pt(),Dn)?v(J(e.b.d.f,(Ce(),_t)),7):e.b.d}function gwe(e){return e.b.c.f.g==(pt(),Dn)?v(J(e.b.c.f,(Ce(),_t)),7):e.b.c}function yc(e){switch(_1(e.d!=3),e.d){case 2:return!1;case 0:return!0}return Tme(e)}function BJ(e){switch(e.e){case 2:return De(),ct;case 4:return De(),at;default:return e}}function RJ(e){switch(e.e){case 1:return De(),kt;case 3:return De(),bt;default:return e}}function bwe(e){var n;return qe(e,90)?(n=v(e,90),new c6(n.a)):(Qn(),new T2(e))}function GJ(e,n){pn();var i;return i=new sx(1),Go(e)?ty(i,e,n):va(i.d,e,n),new YM(i)}function HJ(e,n){return e.g?(e.g=HJ(e.g,n),--e.a,e.j=kc(e.j,n.c),Ru(e)):e.e}function zJ(e,n){return e.e?(e.e=zJ(e.e,n),--e.a,e.j=kc(e.j,n.c),Ru(e)):e.g}function ba(e,n){var i,u,l;for(xr(n),i=!1,l=n.mb();l.G();)u=l.H(),i=i|e.ib(u);return i}function vwe(e){var n,i,u;for(n=0,u=e.mb();u.G();)i=u.H(),n+=i!=null?ls(i):0,n=~~n;return n}function ywe(e){var n,i,u,l;for(i=e.a,u=0,l=i.length;u<l;++u)n=i[u],n.B(null);return null}function _k(e){var n,i,u;for(u=new Hi,i=e.b.mb();i.G();)n=v(i.H(),92),vn(u,n.a);return u}function Hb(e){var n,i,u;for(n=0,u=e.mb();u.G();)i=qt(u.H()),n+=(xr(i),i);return n/e.Y()}function UJ(e,n){var i;return i=v(ln(e.c,n),200),i||(i=new oZ,i.c=n,kn(e.c,i.c,i)),i}function mi(e,n){var i;return xr(n),i=n.e,e.b[i]?!1:(oo(e.b,i,n),++e.c,!0)}function py(e,n){var i,u;return i=1-n,u=e.a[i],e.a[i]=u.a[n],u.a[n]=e,e.b=!0,u.b=!1,u}function FJ(e,n){var i;return qe(n,10)?(i=v(n,10),e.a==i.a&&e.b==i.b):!1}function bj(e,n,i){return e.g=new gy(n,i),e7(e,e.g,e.i),e.d=ui(2,e.d),++e.a,e.j=Or(e.j,i),e}function vj(e,n,i){return e.e=new gy(n,i),e7(e.f,e.e,e),e.d=ui(2,e.d),++e.a,e.j=Or(e.j,i),e}function YJ(e,n){var i=e.a,u=0;for(var l in i)i.hasOwnProperty(l)&&(n[u++]=l);return n}function VJ(e,n){var i,u;for(xr(n),u=n.bb().mb();u.G();)i=v(u.H(),21),e.db(i.yb(),i.zb())}function mwe(e,n,i){var u;return u=e.a.e[v(n.a,9).k]-e.a.e[v(i.a,9).k],ur(u>0?1:u<0?-1:0)}function qJ(e,n,i){this.g=e,this.d=n,this.e=i,this.a=new Ye,uke(this),pn(),uo(this.a,null)}function gy(e,n){Hh(n>0),this.b=e,this.c=n,this.j=n,this.a=1,this.d=1,this.e=null,this.g=null}function wwe(e){e.a=null,e.e=null,e.b.c=Ae(ht,et,1,0,4,1),e.f.c=Ae(ht,et,1,0,4,1),e.c=null}function xwe(){return _r(),be(ve(k9,1),Ke,113,0,[XE,ks,Sm,eC,Qf,Wf,Nm,ag,og,x9])}function kwe(e){return Of(e,26)*14901161193847656e-24+Of(e,27)*11102230246251565e-32}function Ek(e){return qe(e,87)?Tp(v(e,87)):qe(e,88)?v(e,88).a:qe(e,63)?new ub(e):new vp(e)}function ZJ(e){var n;return n=v(J(e,(Ce(),$r)),32),e.g==(pt(),Dn)&&(n==(De(),ct)||n==at)}function $J(e,n){return pxe(e,n)?(Tt(e.a,v(J(n,(Ce(),Xf)),18),n),!0):!1}function Lr(e,n){var i;if(n)for(i=0;i<6;i++)v(ut(e.a,i),18).jb(v(ut(n.a,i),19));return e}function Mf(e,n){var i;return e.b?null:(i=$1e(e.e,e.f),vn(e.a,i),i.g=e,e.d=n,i)}function mc(e,n){var i,u;for(u=gn(e,0);u.b!=u.d.c;)i=v(on(u),10),i.a+=n.a,i.b+=n.b;return e}function yj(e,n){var i,u;for(i=0;i<n.length;i++)for(u=0;u<n[i].length;u++)n[i][u]=e[i][u]}function _we(e){var n,i;for(i=new V(e.b.f);i.a<i.c.c.length;)n=v(q(i),7),sW(e.a,Uk(n.g))}function zb(){zb=s,Oc=new b1("Q1",0),Vl=new b1("Q4",1),Yl=new b1("Q2",2),Zf=new b1("Q3",3)}function Ys(){Ys=s,q_=new h1(Rf,0),xv=new h1($y,1),Gl=new h1("HEAD",2),vd=new h1("TAIL",3)}function Lu(){Lu=s,gg=new gx("AGGRESSIVE",0),$v=new gx("CAREFUL",1),Bm=new gx("OFF",2)}function KJ(){KJ=s,Toe=Yr((uv(),be(ve(Noe,1),Ke,110,0,[_9,nC,E9,S9,C9,N9,P9,tC])))}function mj(e,n){return jn(),Go(e)?tk(e,Vh(n)):Fh(e)?IQ(e,qt(n)):Yh(e)?Aye(e,Yt(n)):e.F(n)}function wj(e,n,i){var u;return u=n.$b(i,e.b),u<0?e.e?wj(e.e,n,i):0:u>0?e.g?wj(e.g,n,i):0:e.c}function Ewe(e,n){var i,u;return e.b?(u=e.e,i=e.a.$b(n,u),i<0|i==0&e.d==(Ro(),ho)):!1}function QJ(e,n){var i,u;return e.c?(u=e.g,i=e.a.$b(n,u),i>0|i==0&e.f==(Ro(),ho)):!1}function Ub(e){var n;return n=e.h,n==0?e.l+e.m*Bf:n==Sc?e.l+e.m*Bf-Nc:e}function En(e){var n,i,u,l;for(n=new Wr,u=0,l=e.length;u<l;++u)i=e[u],n.a+=i.a,n.b+=i.b;return n}function Cwe(e){var n,i,u,l;for(i=e.a,u=0,l=i.length;u<l;++u)n=i[u],lX(e,n,(De(),kt)),lX(e,n,bt)}function Pwe(e){var n,i,u;for(n=1,u=e.mb();u.G();)i=u.H(),n=31*n+(i==null?0:ls(i)),n=~~n;return n}function Swe(e){var n,i;return n=v(e.e&&e.e(),11),i=v(Zx(n,n.length),11),new li(n,i,n.length)}function WJ(e){this.e=ot(J(Ui(e[0]),(Fe(),Ff)))===ot((Ou(),Uf)),this.a=e,this.c=new en,Cwe(this)}function JJ(e){i6(),this.g=(Fn(),new en),this.f=new en,this.b=new en,this.c=new gb,this.i=e}function XJ(e){this.o=e,this.g=new Ye,this.j=new ti,this.n=new ti,this.e=new Ye,this.b=new Ye}function by(e,n){if(Tn(e.a,n),n.f)throw new iu("CNode belongs to another CGroup.");n.f=e}function Nwe(e,n){typeof window===Fy&&typeof window.$gwt===Fy&&(window.$gwt[e]=n)}function eX(e,n,i,u){var l,g;for(l=m2e(e,n,i,u),l<0&&(l=-l-1),g=i-1;g>=l;g--)e[g+1]=e[g];e[l]=u}function tX(e,n,i,u){var l,g;for(l=M2e(e,n,i,u),l<0&&(l=-l-1),g=i-1;g>=l;g--)e[g+1]=e[g];e[l]=u}function wc(e,n){var i,u;for(xr(n),u=n.mb();u.G();)if(i=u.H(),!e.kb(i))return!1;return!0}function Twe(e,n){Qn();var i;for(Pt(n);e.G();)if(i=e.H(),!ZJ(v(i,9)))return!1;return!0}function Mwe(e,n){var i,u,l;return i=n.k-e.k,i==0?(u=e.e.a*e.e.b,l=n.e.a*n.e.b,Pr(u,l)):i}function xc(e){var n,i,u,l;return l=e,u=0,l<0&&(l+=Nc,u=Sc),i=ur(l/Bf),n=ur(l-i*Bf),pc(n,i,u)}function Ck(e,n){return e.c.c=Ae(ht,et,1,0,4,1),Bee(e,e.e,n),Bee(e,e.a,n),pn(),uo(e.c,null),Hwe(e)}function nX(e,n,i){e.g=n_(e,n,(De(),at),e.b),e.d=n_(e,i,at,e.b),!(e.g.c==0||e.d.c==0)&&jee(e)}function rX(e,n,i){e.g=n_(e,n,(De(),ct),e.j),e.d=n_(e,i,ct,e.j),!(e.g.c==0||e.d.c==0)&&jee(e)}function iX(e,n,i){return new so(dn(e.a,n.a)-i/2,dn(e.b,n.b)-i/2,ci(e.a-n.a)+i,ci(e.b-n.b)+i)}function xj(e){return e.a.G()?!0:e.a!=e.d?!1:(e.a=new H7(e.e.d),e.a.G())}function Bn(e,n){var i,u;return i=n.ob(),u=i.length,u==0?!1:(p7(e.c,e.c.length,i),!0)}function kj(e,n){var i,u;for(i=0;i<e.a.length;i++)for(u=0;u<e.a[i].length;u++)e.a[i][u]=n[i][u]}function Fb(e,n){pn();var i,u,l,g;for(g=!1,u=0,l=n.length;u<l;++u)i=n[u],g=g|e.ib(i);return g}function Pk(e){return Fn(),e<3?(yi(e,"expectedSize"),e+1):e<iI?ur(e/.75+1):Sr}function _j(e,n){var i;return qe(n,19)?(i=(is(),v(n,19)),e.jb(i)):kk(e,v(Pt(n),22).mb())}function aX(e,n){var i,u;u=e.d.f,u.g!=(pt(),$n)&&(i=Ht(In(u)),Bt(i)&&kn(n,e,v(It(i),12)))}function Ej(e,n){var i,u;return sme(n),i=zX(e,0,n),u=Ae(ar,rr,26,n,12,1),Wk(e,0,u,0,i,!0),u}function jwe(e,n){var i;this.c=e,i=new Ye,Kj(e,i,n,e.b,null,!1,null),this.a=new Cn(i,0)}function oX(e){return e.a?QJ(e.c.b,e.a.b)?(e.a=null,!1):!0:!1}function jf(e){if(!e)throw new oc((Ln(),"no calls to next() since the last call to remove()"))}function Sk(){Sk=s,Y_={boolean:A0e,number:d0e,string:p0e,object:Xee,function:Xee,undefined:zve}}function Nk(){Nk=s,pE=hW(be(ve(wv,1),Ke,59,0,[(Jn(),Ka),aa])),gE=hW(be(ve(wv,1),Ke,59,0,[bu,Qs]))}function Cj(e){pn();var n,i,u;for(u=0,i=e.mb();i.G();)n=i.H(),u=u+(n!=null?ls(n):0),u=u|0;return u}function Awe(e){Th();var n,i,u;for(u=0,i=$h(e).mb();i.G();)n=v(i.H(),83),u=Or(u,n.Yb());return Xh(u)}function uu(e){var n,i;for(i=new V(e.a.b);i.a<i.c.c.length;)n=v(q(i),25),n.i.Q();e.c.Dc(e),zte(e)}function sX(e,n){var i;return i=q2(e.a,n),i===void 0?++e.d:(e.a[O_](n),--e.c,Ix(e.b)),i}function Iwe(e,n){var i,u,l,g;for(i=!1,u=e.d[n].length,l=u-1;l>0;l--)g=l-1,i=i|KX(e,n,g,l);return i}function Lwe(e,n){var i,u,l,g;for(i=!1,u=e.d[n].length,g=0;g<u-1;g++)l=g+1,i=i|KX(e,n,g,l);return i}function Owe(e,n){var i,u,l;return i=e.l+n.l,u=e.m+n.m+(i>>22),l=e.h+n.h+(u>>22),pc(i&fo,u&fo,l&Sc)}function Dwe(e,n){var i,u,l;return i=e.l-n.l,u=e.m-n.m+(i>>22),l=e.h-n.h+(u>>22),pc(i&fo,u&fo,l&Sc)}function uX(e,n){var i;for(i=0;i<(Ln(),n.length);i++)if(e==n.charCodeAt(i))return!0;return!1}function cX(e,n){var i;for(i=0;i<(Ln(),n.length);i++)if(e==n.charCodeAt(i))return!0;return!1}function J(e,n){var i,u;return e.n&&(u=ln(e.n,n),u!=null)?u:(i=IEe(n),qe(i,5)&&_e(e,n,i),i)}function Tk(e){var n,i,u;for(n=new Hi,u=gn(e,0);u.b!=u.d.c;)i=v(on(u),10),j1(n,0,new tr(i));return n}function lX(e,n,i){var u,l,g,y;for(y=new fl(n,i),g=0,l=Tl(y);l.G();)u=v(l.H(),7),kn(e.c,u,St(g++))}function Bwe(e,n,i){if(Pt(n),i.G())for(sl(n,e.C(i.H()));i.G();)sl(n,e.c),sl(n,e.C(i.H()));return n}function Rwe(e,n,i,u,l){u?vxe(e,n):(yxe(e,n,l),sCe(e,n,i)),n.c.length>1&&(uo(n,e.b),N_e(e.c,n))}function be(e,n,i,u,l){return l.$c=e,l._c=n,l.ad=a,l.__elementTypeId$=i,l.__elementTypeCategory$=u,l}function Yb(e,n,i){switch(i.e){case 2:e.b=n;break;case 1:e.c=n;break;case 4:e.d=n;break;case 3:e.a=n}}function fX(e,n,i){var u,l;return l=X7(i).g,u=_X(e,n,l).a,u-h0e(v(ln(e.c,n),24).a-v(ln(e.c,i),24).a)}function Pr(e,n){return e<n?-1:e>n?1:e==n?0:isNaN(e)?isNaN(n)?0:1:-1}function vy(e){switch(e.Y()){case 0:return mv;case 1:return new Iu(e.mb().H());default:return new cr(e)}}function Op(){Op=s;var e,n;n=!(Error.stackTraceLimit||"stack"in new Error),e=new qV,EI=n?new h:e}function Pj(){Pj=s,oL=new gt("intCoordinates",(jn(),jn(),Vn)),sL=new sr("jsonObject"),dE=new wt(0,0)}function yy(){yy=s,xL=new ix("MIRROR_X",0),kL=new ix("TRANSPOSE",1),wL=new ix("MIRROR_AND_TRANSPOSE",2)}function nd(){nd=s,b9=new fx(Zp,0),Cm=new fx("INCOMING_ONLY",1),Fv=new fx("OUTGOING_ONLY",2)}function Sj(){return Ni(),be(ve(ig,1),Ke,60,0,[Xs,Bc,Vu,qu,xs,Hc,Gc,$o,ws,Rc,Zu,Zl,$f])}function hX(){hX=s;var e,n,i,u;for(ql=new Gj(ig),n=Sj(),i=0,u=n.length;i<u;++i)e=n[i],s7(ql,e,null)}function dX(e){pn();var n,i,u;for(u=1,i=e.mb();i.G();)n=i.H(),u=31*u+(n!=null?ls(n):0),u=u|0;return u}function pX(e,n){Qn();var i,u;for(ok(n,"predicate"),u=0;e.G();u++)if(i=e.H(),n.D(i))return u;return-1}function Nj(e,n){var i,u;return i=e.c.a,u=n.ac(i),e.b.b&&(u=kc(u,xA(e,n,i))),e.b.c&&(u=kc(u,wA(e,n,i))),u}function gX(e,n,i){var u,l;return u=new gk(n,i),l=new P2,e.b=Dte(e,e.b,u,l),l.b||++e.c,e.b.b=!1,l.d}function Mk(e,n,i){var u,l,g;for(u=new ti,g=gn(i,0);g.b!=g.d.c;)l=v(on(g),10),vn(u,new tr(l));t2e(e,n,u)}function Tj(e,n){var i;return n===e?!0:qe(n,144)?(i=v(n,144),e.P().t(i.P())):!1}function bX(e){var n;if(n=e.a.c.length,n>0)return H1(n-1,e.a.c.length),Nf(e.a,n-1);throw new mZ}function vX(e){e.b.c.length-e.e.c.length<0?(Qt(e,(De(),at)),e.a.a=e.j.a):(Qt(e,(De(),ct)),e.a.a=0)}function yX(e,n){y7(e>=0,"Negative initial capacity"),y7(n>=0,"Non-positive load factor"),No(this)}function Af(e){var n;this.e=e,this.d=new Q7(this.e.e),this.a=this.d,this.b=xj(this),n=e[Rl],this[Rl]=n}function Mj(){this.n=null,this.j=null,this.i=null,this.d=null,this.b=null,this.k=null,this.a=null}function jk(e){var n,i,u,l;for(l=1,i=0,u=e.length;i<u;++i)n=e[i],l=31*l+(n!=null?ls(n):0),l=l|0;return l}function Yr(e){var n,i,u,l;for(n={},u=0,l=e.length;u<l;++u)i=e[u],n[":"+(i.d!=null?i.d:""+i.e)]=i;return n}function mX(e){m_();var n,i,u,l;for(i=Hj(),u=0,l=i.length;u<l;++u)if(n=i[u],WK(n.a,e))return n;return hE}function wX(e,n,i){var u,l,g;for(l=0,g=i.length;l<g;++l)if(u=i[l],e.b.Uc(n,u.yb()))return u;return null}function xX(e,n,i){var u,l;for(l=i.mb();l.G();)if(u=v(l.H(),21),e.Uc(n,u.zb()))return!0;return!1}function jj(e,n){var i,u,l;for(l=e.b;l;){if(i=e.a.$b(n,l.d),i==0)return l;u=i<0?0:1,l=l.a[u]}return null}function Gwe(e,n){var i,u;return i=v(xf(e.a,n),19),i?(u=e.b.Z(),u.jb(i),e.b.c-=i.Y(),i.Q(),u):null}function kX(e,n,i){var u;for(u=v(n.B(e),9);u.g==(pt(),Pn);)!u.n&&(u.n=new en),xf(u.n,i),u=v(n.B(u),9)}function Ak(e,n){var i;return ga(e)&&ga(n)&&(i=e-n,!isNaN(i))?i:xee(ga(e)?xc(e):e,ga(n)?xc(n):n)}function ni(e){var n;return qe(e,46)?e:(n=e&&e.__gwt$exception,n||(n=new KW(e),FZ(n,e),Ome(e,n)),n)}function Hwe(e){var n,i,u;for(n=0,u=new V(e.c);u.a<u.c.c.length;)i=v(q(u),226),n+=Tte(e,i.a,i.b);return n}function zwe(e){var n;return n=new $W(e),Ob(e.a,Xie,new Eo(be(ve(Dv,1),et,160,0,[n]))),n.d&&$e(n.f,n.d),n.f}function _X(e,n,i){switch(i.e){case 1:return v(ln(e.d,n),24);case 3:return v(ln(e.j,n),24)}return St(0)}function EX(e,n,i){return e.d[n.k][i.k]||(Y2e(e,n,i),e.d[n.k][i.k]=!0,e.d[i.k][n.k]=!0),e.a[n.k][i.k]}function Aj(e,n,i){var u;return u=n.$b(i,e.b),u<0?e.e?v(C0e(Aj(e.e,n,i),e),206):e:u==0?e:e.g?Aj(e.g,n,i):null}function Fo(e,n){return Go(e)?es(e,n):Fh(e)||Yh(e)?(xr(e),e===n):Yx(e)?e.t(n):(Hx(e),e===n)}function Wn(e,n){return es(e.b,n)||Vme(e.b,n)&&(Ln(),n.length==xb(e.b)||rQ(e.b,xb(e.b)-n.length-1)==46)}function Ik(e,n){var i,u,l;for(i=0,l=lr(e,n).mb();l.G();)u=v(l.H(),7),i+=J(u,(Ce(),eu))!=null?1:0;return i}function Uwe(e,n){var i,u,l;for(u=null,l=e.b;l;)i=e.a.$b(n,l.d),i>=0?l=l.a[1]:(u=l,l=l.a[0]);return u}function Fwe(e,n){var i,u,l;for(u=null,l=e.b;l;)i=e.a.$b(n,l.d),i<=0?l=l.a[0]:(u=l,l=l.a[1]);return u}function Ywe(e,n,i,u){var l,g;for(g=e.mb();g.G();)l=v(g.H(),33),l.i.a=n.a+(u.a-l.j.a)/2,l.i.b=n.b,n.b+=l.j.b+i}function CX(e,n){var i;e.c.length!=0&&(i=v(nr(e,Ae(Nr,Zi,9,e.c.length,0,1)),51),F6(i,new zt),Mee(i,n))}function PX(e,n){var i;e.c.length!=0&&(i=v(nr(e,Ae(Nr,Zi,9,e.c.length,0,1)),51),F6(i,new mn),Mee(i,n))}function SX(e){var n,i;return n=e.g,n==(pt(),Dn)?(i=v(J(e,(Ce(),$r)),32),i==(De(),bt)||i==kt):!1}function Vr(e,n){var i;return xr(n),i=e[":"+n],MQ(!!i,"Enum constant undefined: %s",be(ve(ht,1),et,1,4,[n])),i}function Vwe(e,n,i){if(!e)throw new wn(av("lowerEndpoint (%s) > upperEndpoint (%s)",be(ve(ht,1),et,1,4,[n,i])))}function Ij(e){throw Sk(),new CZ("Unexpected typeof result '"+e+"'; please report this bug to the GWT team")}function Lk(e){switch(e.e){case 1:return kt;case 2:return ct;case 3:return bt;case 4:return at;default:return mr}}function NX(e){switch(e.e){case 2:return aa;case 1:return Ka;case 4:return Qs;case 3:return bu;default:return qo}}function qwe(e){return e>=48&&e<58?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function Zwe(e,n){var i,u;for(u=FQ(zQ(e.P()));u.b.G();)if(i=v(YZ(u,u.b.H()),19),i.kb(n))return!0;return!1}function $we(e){var n;if(!oX(e))throw new _a;return n=new p$(e.c,e.a),e.b=n,e.a.i==e.c.a?e.a=null:e.a=e.a.i,n}function Kwe(e,n){Fn();var i;return e===n?!0:qe(n,57)?(i=v(n,57),Zee(pl(e),i.bb())):!1}function Qwe(e,n,i,u){return Th(),yi(i,"oldCount"),yi(u,"newCount"),e.Cb(n)==i?(e.Gb(n,u),!0):!1}function Wwe(e,n,i,u,l){return Pt(i),Pt(l),Iye(new Y7(e.c,ane(e.b,new Oy(e.d,!0,n,i,!1,null,(Ro(),ho))),e.a),u,l)}function Lj(e){switch(za(),e.Y()){case 0:return Kh(),Jp;case 1:return new cc(e.mb().H());default:return new ux(e)}}function Or(e,n){var i;return ga(e)&&ga(n)&&(i=e+n,E_<i&&i<Nc)?i:Ub(Owe(ga(e)?xc(e):e,ga(n)?xc(n):n))}function TX(e,n){var i;return ga(e)&&ga(n)&&(i=e*n,E_<i&&i<Nc)?i:Ub(DEe(ga(e)?xc(e):e,ga(n)?xc(n):n))}function kc(e,n){var i;return ga(e)&&ga(n)&&(i=e-n,E_<i&&i<Nc)?i:Ub(Dwe(ga(e)?xc(e):e,ga(n)?xc(n):n))}function Jn(){Jn=s,qo=new hb(Rf,0),aa=new hb(qp,1),Ka=new hb(Vp,2),Qs=new hb("DOWN",3),bu=new hb("UP",4)}function Ou(){Ou=s,$_=new d1(Rf,0),RI=new d1("POLYLINE",1),Uf=new d1("ORTHOGONAL",2),Z_=new d1("SPLINES",3)}function my(){my=s,Q_=new ex("INHERIT",0),YI=new ex("INCLUDE_CHILDREN",1),VI=new ex("SEPARATE_CHILDREN",2)}function MX(){MX=s,kae=Si(gc(new Yn,(Br(),EE)),vm),_ae=Pi(Si(z1(new Yn,kE),xE),Bv),Eae=Pi(Fa(new Yn,_E),Bv)}function jX(){jX=s,Cae=Si(gc(new Yn,(Br(),EE)),vm),Pae=Pi(Si(z1(new Yn,kE),xE),Bv),Sae=Pi(Fa(new Yn,_E),Bv)}function AX(e){this.a=new ta,this.d=new ta,this.b=new ta,this.c=new ta,this.g=new ta,this.i=new ta,this.f=e}function IX(e,n,i,u,l,g){this.e=new Ye,this.f=(vr(),fC),$e(this.e,e),this.d=n,this.a=i,this.b=u,this.f=l,this.c=g}function Jwe(e,n,i,u,l,g,y,x){var _;for(_=i;g<y;)_>=u||n<i&&x.$b(e[n],e[_])<=0?oo(l,g++,e[n++]):oo(l,g++,e[_++])}function Xwe(e,n,i,u,l){var g,y;for(y=e.mb();y.G();)g=v(y.H(),33),g.i.a=n.a,g.i.b=l?n.b:n.b+u.b-g.j.b,n.a+=g.j.a+i}function e2e(e,n){Dx();var i,u;for(u=Ht(Xb(e));Bt(u);)if(i=v(It(u),12),i.d.f==n||i.c.f==n)return i;return null}function Ok(e,n,i){var u,l,g;for(u=0,g=gn(e,0);g.b!=g.d.c&&(l=Oe(qt(on(g))),!(l>i));)l>=n&&++u;return u}function t2e(e,n,i){var u,l,g,y;for(xr(i),y=!1,g=gn(e,n),l=gn(i,0);l.b!=l.d.c;)u=on(l),Mb(g,u),y=!0;return y}function n2e(e,n){var i,u,l;return n.V()?!1:(l=e.Y(),i=e.d.jb(n),i&&(u=e.d.Y(),e.f.c+=u-l,l==0&&B1(e)),i)}function Du(e,n){var i;return n&&(i=n.n?n.n:(pn(),pn(),X9),i.V()||(e.n?VJ(e.n,i):e.n=new q$(i))),e}function LX(e,n,i){var u;try{Bwe(e,n,i)}catch(l){throw l=ni(l),qe(l,181)?(u=l,new vk(u)):ri(l)}return n}function r2e(e,n,i){var u;try{lke(e,n,i)}catch(l){throw l=ni(l),qe(l,181)?(u=l,new vk(u)):ri(l)}return n}function ri(e){var n;return qe(e,164)&&(n=v(e,164),ot(n.b)!==ot((n6(),Xy)))?ot(n.b)===ot(Xy)?null:n.b:e}function rd(e,n){var i;for(i=v(J(Ui(e),(Ce(),Ql)),9);i;){if(i==n)return!0;i=v(J(Ui(i),Ql),9)}return!1}function i2e(e){switch(v(J(e,(Ce(),mu)),140).e){case 1:_e(e,mu,(Fs(),Sd));break;case 2:_e(e,mu,(Fs(),Jf))}}function cs(e){switch(za(),e.c){case 0:return Kh(),Jp;case 1:return new cc(qee(new Gh(e)));default:return new EZ(e)}}function yr(e){kr();var n,i;for(n=0,i=e.length;n<i;n++)if(e[n]==null)throw new cb("at index "+n);return new Eo(e)}function a2e(e,n,i){return n.length==0||i.length==0?0:(e.e?e.b=new PZ(e.c):e.b=new SZ(e.c),e.b.Gc(n,i))}function Dt(e){if(e.i==null)throw new oc("The task has not begun yet.");e.b||(e.c<e.j&&OJ(e,e.j-e.c),e.b=!0)}function Dk(e,n){var i,u;for(u=new V(n);u.a<u.c.c.length;)i=v(q(u),27),Ir(e.b.b,i.b),fye(v(i.a,78),v(i.b,25))}function o2e(e,n){var i,u;for(u=new V(e.a);u.a<u.c.c.length;)if(i=v(q(u),222),$J(i,n))return;$e(e.a,new QK(n))}function s2e(e){var n,i,u;for(n=new Ye,u=new V(e.b);u.a<u.c.c.length;)i=v(q(u),251),Bn(n,v(i.Ac(),19));return n}function u2e(e,n){var i,u,l;for(l=new Ye,u=lr(e,n).mb();u.G();)i=v(u.H(),7),l.c[l.c.length]=i;return uo(l,new Ft),l}function Dr(e){var n,i,u;for(n=new Ye,u=new V(e.f);u.a<u.c.c.length;)i=v(q(u),7),$e(n,i.b);return Pt(n),new zh(n)}function In(e){var n,i,u;for(n=new Ye,u=new V(e.f);u.a<u.c.c.length;)i=v(q(u),7),$e(n,i.e);return Pt(n),new zh(n)}function St(e){var n,i;return e>-129&&e<128?(n=e+128,i=(PQ(),J9)[n],!i&&(i=J9[n]=new zM(e)),i):new zM(e)}function Oj(e){var n,i;for(n=Jk(e.b,e.d),i=Sr;i>n;){if(kj(e,e.d),n==0){i=0;break}BX(e),FX(e),i=n,n=Jk(e.b,e.d)}e.c=i}function OX(){iA();var e,n,i;i=M3e+++Fme(),e=ur(Math.floor(i*I_))&_I,n=ur(i-e*kI),this.a=e^1502,this.b=n^D_}function ls(e){return Go(e)?Zk(e):Fh(e)?ur((xr(e),e)):Yh(e)?Gt((xr(e),e))?1231:1237:Yx(e)?e.v():(Hx(e),hc(e))}function c2e(e,n,i){var u,l,g;l=new pee,l.d=i,u=Lxe(l,n),g=new RW,Gt(Oe(Yt(J(u,gL))))?pwe(g,u,new O1):nne(e,g,u),Lne(l,u)}function DX(e,n,i,u){var l,g,y,x;for(x=new fl(n,u),y=0,g=Tl(x);g.G();)l=v(g.H(),7),kn(e.i,l,St(y++));kn(i,n,St(y))}function l2e(e,n){var i,u,l,g,y;for(i=0,y=0,l=0,g=n.length;l<g;++l)u=n[l],i=Pte(e,i,u,(De(),at),e.f),y=Pte(e,y,u,ct,e.n)}function f2e(e,n){var i,u,l,g;if(e.n)for(u=0,l=n.length;u<l;++u)i=n[u],g=ln(e.n,i),g!=null&&(i.nc(),i.oc())}function h2e(e,n){var i,u,l;for(u=new V(n);u.a<u.c.c.length;)i=v(q(u),75),l=p_e(e.a),kJ(e.a,l,i.k,i.j),Hp(i,l,!0)}function d2e(e,n){var i,u,l;for(u=new V(n);u.a<u.c.c.length;)i=v(q(u),75),l=Kke(e.a),kJ(e.a,l,i.k,i.j),Hp(i,l,!0)}function Bk(e){var n,i;return i=v(J(e,(Fe(),Zo)),59),i==(Jn(),qo)?(n=v(J(e,(Ce(),Nd)),15).a,n>=1?aa:Qs):i}function Bt(e){if(Pt(e.b),e.b.G())return!0;for(;e.a.G();)if(Pt(e.b=e.Wb(e.a.H())),e.b.G())return!0;return!1}function If(e){return(e.d!=e.c.d||e.i!=e.g.d)&&(e.a.c=Ae(ht,et,1,0,4,1),Bn(e.a,e.c),Bn(e.a,e.g),e.d=e.c.d,e.i=e.g.d),e.a}function qa(e){var n;if(e.b){if(qa(e.b),e.b.d!=e.c)throw new dp}else e.d.V()&&(n=v(ln(e.f.b,e.e),19),n&&(e.d=n))}function Dj(e,n,i,u,l){var g,y,x,_;for(_=cy(e),Rwe(n,_,u,l,i),g=0,x=new V(_);x.a<x.c.c.length;)y=v(q(x),9),e[g++]=y}function p2e(e){var n,i,u;for(u=v(QZ(e.a,(Fe(),yd)),15).a,i=new V(Gee(e.a));i.a<i.c.c.length;)n=v(q(i),626),BCe(e,n,u)}function Yn(){var e,n;for(this.a=new qi(6),n=0;n<6;n++)$e(this.a,(e=v(ea(rae),11),new li(e,v(zi(e,e.length),11),0)))}function BX(e){var n,i,u;for(u=!1,i=0;i<e.d.length;i++)e.j=(n=new oA(e.e,e.d,i,0),new nA(i,e.d,n)),u=u|NJ(e,i);return u}function g2e(e,n,i){var u,l;for(l=e.a.c,u=l.c.length;u<i;u++)hl(l,0,new bl(e.a));Fr(n,v(ut(l,l.c.length-i),16)),e.b[n.k]=i}function RX(e,n){var i,u;for(i=gn(e,0);i.b!=i.d.c;){if(u=Oe(qt(on(i))),u==n)return;if(u>n){Ab(i);break}}Mb(i,n)}function Rk(e,n,i){var u;return u=q2(e.a,n),b0e(e.a,n,i===void 0?null:i),u===void 0?(++e.c,Ix(e.b)):++e.d,u}function Gk(e,n,i){return(n-e<=0?0-(n-e):n-e)<Tc||(i-e<=0?0-(i-e):i-e)<Tc?!0:n-e>Tc?e-i>Tc:i-e>Tc}function GX(e){switch(e.e){case 0:return ZE;case 1:return Pm;case 2:return $E;case 3:return KE;default:return QE}}function Bj(e,n){switch(n.e){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function wy(e){switch(De(),e.e){case 4:return bt;case 1:return at;case 3:return kt;case 2:return ct;default:return mr}}function Hk(e,n){if(n==e.c)return e.d;if(n==e.d)return e.c;throw new wn("Node "+n+" not part of edge "+e)}function b2e(e,n){var i;return os(e.a,n)?v(os(e.a,n)?e.b[n.e]:null,62):(i=new rZ,mi(e.a,n),$x(e,n.e,i),i)}function HX(e,n){var i,u,l,g;for(g=e.g.tb(),i=0;g.G();){if(u=Oe(qt(g.H())),l=u-n,l>Bl)return i;l>Wy&&++i}return i}function xy(e){var n,i,u,l;return i=(n=v(ea((u=e.$c,l=u.f,l==yn?u:l)),11),new li(n,v(zi(n,n.length),11),0)),mi(i,e),i}function zk(e,n){var i,u;for(u=new V(n);u.a<u.c.c.length;)i=v(q(u),27),$e(e.b.b,v(i.b,25)),by(v(i.a,78),v(i.b,25))}function v2e(e,n,i,u){var l,g,y;for(l=n+1;l<i;++l)for(g=l;g>n&&u.$b(e[g-1],e[g])>0;--g)y=e[g],oo(e,g,e[g-1]),oo(e,g-1,y)}function y2e(e){var n,i;if(!Bs(v(J(e,(Fe(),Ct)),28)))for(i=new V(e.f);i.a<i.c.c.length;)n=v(q(i),7),Qt(n,(De(),mr))}function Vs(e,n){switch(n.e){case 1:return Ho(e.f,(Sa(),yL));case 2:return Ho(e.f,(Sa(),mL));default:return pn(),pn(),Fc}}function hr(e,n){return A7(n,(Fe(),tL))?J(e.e,(Ce(),Qi)):A7(n,Hl)?J(e.e,(Ce(),cg)):J(e.e,n)}function m2e(e,n,i,u){var l,g,y;for(g=n,l=i-1;g<=l;){if(y=(g+l)/2|0,e[y]==u)return y;e[y]<u?g=y+1:l=y-1}return-g-1}function Vb(e,n,i){var u,l;for(l=e.mb();l.G();)if(u=l.H(),ot(n)===ot(u)||n!=null&&Fo(n,u))return i&&l.I(),!0;return!1}function zX(e,n,i){var u;return MQ(n<=i,"%s > %s",be(ve(ht,1),et,1,4,[St(n),St(i)])),u=e.length,i=i<u?i:u,Qj(n,i,u),i-n}function UX(e,n){var i,u,l;i=e,l=0;do{if(i==n)return l;if(u=v(J(i,(Ce(),Ql)),9),!u)throw new fp;i=Ui(u),++l}while(!0)}function FX(e){var n,i,u;for(u=!1,i=e.d.length-1;i>=0;i--)e.j=(n=new oA(e.e,e.d,i,1),new nA(i,e.d,n)),u=u|NJ(e,i);return u}function Rj(e){this.f=(Fn(),new en),this.n=new en,this.k=new en,this.g=new Qr,this.i=new oee((hZ(),Lre)),this.j=e,l2e(this,e)}function Gj(e){var n;this.a=(n=v(e.e&&e.e(),11),new li(n,v(zi(n,n.length),11),0)),this.b=Ae(ht,et,1,this.a.a.length,4,1)}function YX(e,n){var i;return n===e?!0:!qe(n,18)||(i=v(n,18),i.Y()!=e.Y())?!1:e.lb(i)}function Uk(e){switch(Ni(),e.e){case 1:return Xs;case 2:return Vu;case 3:return xs;case 4:return Gc;default:return $f}}function VX(e,n){switch(n.e){case 1:return e.e.d;case 2:return e.e.c;case 3:return e.e.a;case 4:return e.e.b;default:return 0}}function Hj(){return m_(),be(ve(Rie,1),Ke,67,0,[Die,Oie,Bie,Sie,Pie,Nie,jie,Mie,Tie,Lie,Iie,Aie,Eie,_ie,Cie,xie,wie,kie,yie,vie,mie,hE])}function _c(){_c=s,Yf=new db(Rf,0),Ws=new db("JUSTIFIED",1),nL=new db("BEGIN",2),rL=new db($y,3),iL=new db("END",4)}function Bu(){Bu=s,sE=new p1("PORTS",0),Iv=new p1("PORT_LABELS",1),oE=new p1("NODE_LABELS",2),Av=new p1("MINIMUM_SIZE",3)}function na(){na=s,Ov=new rx("UNKNOWN",0),ms=new rx("ABOVE",1),vu=new rx("BELOW",2),Gie=new gt("de.cau.cs.kieler.labelSide",Ov)}function ky(){ky=s,Q9=new px("EQUALLY_DISTRIBUTED",0),CC=new px("NORTH_STACKED",1),W9=new px("NORTH_SEQUENCE",2)}function w2e(){Jy={},!Array.isArray&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"})}function x2e(e,n){return pp(),pp(),((e-n>0?e-n:-(e-n))<=hv||e==n||isNaN(e)&&isNaN(n)?0:e<n?-1:e>n?1:J$(isNaN(e),isNaN(n)))>0}function zj(e,n){return pp(),pp(),((e-n>0?e-n:-(e-n))<=hv||e==n||isNaN(e)&&isNaN(n)?0:e<n?-1:e>n?1:J$(isNaN(e),isNaN(n)))<0}function Fk(e){var n,i;for(e.d||E_e(e),i=new Hi,n=e.b.mb(),n.H();n.G();)vn(i,v(n.H(),92).a);return xt(i.b!=0),su(i,i.c.b),i}function qX(e){var n,i,u,l;for(l=new ta,n=new dc(e.c),Ly(n),u=new V(n);u.a<u.c.c.length;)i=v(q(u),7),l.a.db(i,l);return l}function k2e(e,n){var i,u,l;for(Pt(n),u=(l=e.g,v(l||(e.g=new BM(e)),20)).mb();u.G();)i=v(u.H(),21),Tt(n,i.zb(),i.yb());return n}function ZX(e,n){var i,u,l;return qe(n,21)?(i=v(n,21),u=i.yb(),l=Zb(e.qb(),u),Cf(l,i.zb())&&(l!=null||e.qb().R(u))):!1}function Uj(e,n){var i,u,l;for(l=e.g.tb();l.G();)if(i=Oe(qt(l.H())),u=i-n<=0?0-(i-n):i-n,u<Bl)return l.L()-1;return e.g.Y()}function $X(e){var n,i;for(i=new V(e.a);i.a<i.c.c.length;)if(n=v(q(i),9),n.g==(pt(),$n)||n.g==$i)return!1;return!0}function Vt(e,n,i){if(e.b)throw new oc("The task is already done.");return e.i!=null?!1:(e.i=n,e.j=i,!0)}function _2e(e,n){return e.f<n.f?-1:e.f>n.f?1:e.g<n.g?-1:e.g>n.g?1:e.b-n.b}function E2e(e,n){if(n.c==e)return n.d;if(n.d==e)return n.c;throw new wn("Input edge is not connected to the input port.")}function Yk(e){var n;e.c!=0&&(n=v(ut(e.a,e.b),128),n.b==1?(++e.b,e.b<e.a.c.length&&$q(v(ut(e.a,e.b),128))):--n.b,--e.c)}function Dp(e,n){return e.b.a=dn(e.b.a,n.c),e.b.b=dn(e.b.b,n.d),e.a.a=Xe(e.a.a,n.c),e.a.b=Xe(e.a.b,n.d),e.c[e.c.length]=n,!0}function C2e(e,n,i){var u,l;return u=Oe(e.n[n.f.k])+Oe(e.d[n.f.k])+n.i.b+n.a.b,l=Oe(e.n[i.f.k])+Oe(e.d[i.f.k])+i.i.b+i.a.b,l-u}function KX(e,n,i,u){var l,g,y;return l=!1,oEe(e.j,i,u)&&(a0e(e.j,e.d[n][i],e.d[n][u]),g=e.d[n],y=g[u],g[u]=g[i],g[i]=y,l=!0),l}function _y(e,n,i){var u,l,g,y,x;x=Ui(e),l=x.a,u=v(J(x,(Ce(),_s)),15).a,g=x.d,y=e.i,n&&(y.a=y.a-l.b-u-g.a),i&&(y.b=y.b-l.d-u-g.b)}function QX(e,n){var i,u,l;for(u=Ht(Xb(e));Bt(u);)return i=v(It(u),12),l=v(n.B(i),9),new e1(Pt(l.i.b+l.j.b/2));return sb(),sb(),z_}function WX(e){var n,i,u,l,g;for(u=b_(e),n=hs,g=0,l=0;n>.5&&g<50;)l=Nte(u),i=Lf(u,l,!0),n=ci(i.b),++g;return Lf(e,l,!1)}function JX(e){var n,i,u,l,g;for(u=b_(e),n=hs,g=0,l=0;n>.5&&g<50;)l=Ste(u),i=Lf(u,l,!0),n=ci(i.a),++g;return Lf(e,l,!1)}function Ey(e){var n,i,u;for(this.a=new ta,this.e=new Qr,this.f=0,i=0,u=e.length;i<u;++i)n=e[i],!this.g&&(this.g=n),by(this,n)}function XX(e){H6(this),this.c=e.c,this.f=e.f,this.e=e.e,this.k=e.k,this.d=e.d,this.g=Ca(e.g),this.j=e.j,this.i=e.i,this.b=Ca(e.b)}function Vk(e){switch(e.e){case 1:return Jn(),bu;case 4:return Jn(),Ka;case 2:return Jn(),aa;case 3:return Jn(),Qs}return Jn(),qo}function eee(e,n){return ake(e,n)?(Tn(e.g,n),!0):(n.g!=(De(),mr)&&Tn(e.i,n),n.e.c.length==0?Tn(e.c,n):Tn(e.b,n),!1)}function tee(e,n){var i,u;return kl(0,e.c.length),i=Kk(n,Ae(ht,et,1,n.a.Y(),4,1)),u=i.length,u==0?!1:(p7(e.c,0,i),!0)}function qk(e,n){for(var i=0;!n[i]||n[i]=="";)i++;for(var u=n[i++];i<n.length;i++)!n[i]||n[i]==""||(u+=e+n[i]);return u}function P2e(){var e;return nm!=0&&(e=Nme(),e-Dre>2e3&&(Dre=e,rm=r.setTimeout(S0e,10))),nm++==0?(Jme((r6(),OI)),!0):!1}function qs(e){var n,i;for(i=new V(e.a.b);i.a<i.c.c.length;)n=v(q(i),25),n.j.d=-n.j.d-n.j.c,n.o&&(n.g.a=-n.g.a+n.o.j.c);Hy(e)}function qb(e,n){var i;for(i=e;n.b<n.d.Y()&&i==e;)i=(xt(n.b<n.d.Y()),v(n.d.sb(n.c=n.b++),7)).g;i==e||(xt(n.b>0),n.a.sb(n.c=--n.b))}function S2e(e){var n;Ci(v(J(e,(Fe(),Ct)),28))&&(n=e.c,xte((On(0,n.c.length),v(n.c[0],16))),xte(v(ut(n,n.c.length-1),16)))}function nee(e,n,i){Vt(i,"Compound graph preprocessor",1),e.a=new gb,sne(e,n,null),PEe(e,n),_e(n,(Ce(),I9),e.a),e.a=null,No(e.b),Dt(i)}function ree(e){var n,i;return n=v(It(Ht(Dr(e))),12),i=v(It(Ht(In(e))),12),!Gt(Oe(Yt(J(n,(Ce(),wu)))))||!Gt(Oe(Yt(J(i,wu))))}function N2e(e,n,i){n.g==(pt(),$n)&&i.g==Pn&&(e.d=Ik(n,(De(),kt)),e.b=Ik(n,bt)),i.g==$n&&n.g==Pn&&(e.d=Ik(i,(De(),bt)),e.b=Ik(i,kt))}function T2e(e,n,i){var u,l,g,y;return g=n.g,y=i.g,g!=y?g.e-y.e:(u=e.a[n.k],l=e.a[i.k],!u&&!l?0:u?l?Pr(u.a,l.a):1:-1)}function M2e(e,n,i,u){var l,g,y,x;for(g=n,l=i-1;g<=l;)if(y=g+l>>>1,x=e[y],x<u)g=y+1;else if(x>u)l=y-1;else return y;return-(g+1)}function j2e(e){return qe(e,137)?(pn(),new K6(v(e,137))):qe(e,18)?(pn(),new pf(v(e,18))):qe(e,20)?G7(v(e,20)):(pn(),new rb(e))}function iee(e,n,i){return qe(i,137)?new X6(e,n,v(i,137)):qe(i,18)?new J6(e,n,v(i,18)):qe(i,20)?Z7(e,n,v(i,20),null):new Bb(e,n,i,null)}function Bp(e,n){var i;i=e.ub(n);try{return i.H()}catch(u){throw u=ni(u),qe(u,74)?new ts("Can't get element "+n):ri(u)}}function Zb(e,n){Fn(),Pt(e);try{return e.cb(n)}catch(i){if(i=ni(i),qe(i,119)||qe(i,76))return null;throw ri(i)}}function A2e(e,n){var i=e.a,u;n=String(n),i.hasOwnProperty(n)&&(u=i[n]);var l=(Sk(),Y_)[typeof u],g=l?l(u):Ij(typeof u);return g}function aee(e,n,i,u){n<i?(e.b=.5*(n+i),e.p=L_*e.b+.9*n,e.a=L_*e.b+.9*i):(e.b=.5*(n+u),e.p=L_*e.b+.9*u,e.a=L_*e.b+.9*n)}function oee(e){s$.call(this,e),this.b=new Oy(e,!1,null,(Ro(),ho),!1,null,ho),this.a=new gy(null,1),yZ(this.a,this.a),this.c=new m}function Cy(e){switch(p6(),this.c=new Ye,this.d=e,e.e){case 0:case 2:this.a=Wye(bL),this.b=ji;break;case 3:case 1:this.a=bL,this.b=Zr}}function fs(){fs=s,V_=new yp("AUTOMATIC",0),om=new yp(Vp,1),sm=new yp(qp,2),um=new yp("TOP",3),im=new yp("BOTTOM",4),am=new yp($y,5)}function Zk(e){Q$();var n,i,u;return i=":"+e,u=Rm[i],u!==void 0?u:(u=r8[i],n=u===void 0?fke(e):u,Eye(),Rm[i]=n,n)}function I2e(e,n,i,u,l,g,y){za();var x,_;return _=y.length+6,x=new qi(_),Fb(x,be(ve(ht,1),et,1,4,[e,n,i,u,l,g])),Fb(x,y),wee(new V(x))}function L2e(e){var n;n=v(J(e,(Fe(),ya)),18),!n.V()&&(n.kb((Gu(),oa))?(n.nb(oa),n.ib(ua)):n.kb(ua)&&(n.nb(ua),n.ib(oa)))}function O2e(e){var n;n=v(J(e,(Fe(),ya)),18),!n.V()&&(n.kb((Gu(),Aa))?(n.nb(Aa),n.ib(Ma)):n.kb(Ma)&&(n.nb(Ma),n.ib(Aa)))}function D2e(e,n){var i,u,l,g;return l=e.g,i=Oe(qt(J(e,(Ce(),$u)))),g=n.g,u=Oe(qt(J(n,$u))),g!=(pt(),Dn)?-1:l!=Dn?1:i==u?0:i<u?-1:1}function B2e(e,n,i){var u,l;return u=sc(ll(e,n.d),ll(e,n.c)),l=ui(ll(e,n.d),ll(e,n.c)),Xh(Nj(Wwe(i,St(u),(Ro(),ho),St(l),ho),(S1(),F_)))}function see(e,n){Fn(),Pt(e);try{return e.R(n)}catch(i){if(i=ni(i),qe(i,119)||qe(i,76))return!1;throw ri(i)}}function uee(e,n){is(),Pt(e);try{return q7(e,n)}catch(i){if(i=ni(i),qe(i,119)||qe(i,76))return!1;throw ri(i)}}function R2e(e,n){return e.e<n.e?-1:e.e>n.e?1:e.f<n.f?-1:e.f>n.f?1:hc(e)-hc(n)}function cee(e){switch(e.e){case 1:return De(),ct;case 4:return De(),bt;case 3:return De(),at;case 2:return De(),kt;default:return De(),mr}}function G2e(e){var n,i;switch(n=Zx(e.c,e.c.length),n.length){case 0:return mv;case 1:return i=new Iu(n[0]),i;default:return new cr(yr(n))}}function H2e(e){var n,i,u,l;for(u=Ae(u3e,et,64,e.c.length,0,1),l=0,i=new V(e);i.a<i.c.c.length;)n=v(q(i),64),u[l++]=n;return new Eq(u)}function lee(e){var n,i;if(!e.b)for(e.b=cl(e.a.b.c.length),i=new V(e.a.b);i.a<i.c.c.length;)n=v(q(i),33),$e(e.b,new A2(n));return e.b}function id(e,n){var i,u,l;if(e.e)return 1;for(i=0,l=new V(n.f);l.a<l.c.c.length;)u=v(q(l),7),i+=u.b.c.length+u.e.c.length;return i}function fee(e){var n,i,u,l;for(n=!1,l=!1,u=new V(e.f);u.a<u.c.c.length;)i=v(q(u),7),n=n|i.g==(De(),at),l=l|i.g==ct;return n&&l}function hee(e){var n,i;for(this.b=new Ye,this.c=e,this.a=!1,i=new V(e.b);i.a<i.c.c.length;)n=v(q(i),9),this.a=this.a|n.g==(pt(),$n)}function lo(e){Q6.call(this),this.g=(pt(),$n),this.f=(yi(6,Ll),new qi(6)),this.c=(yi(2,Ll),new qi(2)),this.e=new S2,this.b=new S2,this.a=e}function Fj(e,n,i,u,l,g){H6(this),this.e=e,this.f=n,this.d=i,this.c=u,this.g=l,this.b=g,this.j=Oe(qt(l.mb().H())),this.i=Oe(qt(PJ(l)))}function z2e(e,n){if(e==null)throw new cb("null key in entry: null="+n);if(n==null)throw new cb("null value in entry: "+e+"=null")}function dee(){dee=s,Dae=Tb(new Yn,(Br(),rg)),km=new gt("linearSegments.inputPrio",St(0)),_m=new gt("linearSegments.outputPrio",St(0))}function Yj(e){var n,i,u,l;for(i=(l=new tb(e.b).a.bb().mb(),new nb(l));i.a.G();)n=(u=v(i.a.H(),21),v(u.zb(),19)),n.Q();No(e.b),e.c=0}function gn(e,n){var i,u;if(kl(n,e.b),n>=e.b>>1)for(u=e.c,i=e.b;i>n;--i)u=u.b;else for(u=e.a.a,i=0;i<n;++i)u=u.a;return new lQ(e,n,u)}function _l(e,n){var i,u,l;for(l=new Wr,u=e.mb();u.G();)i=v(u.H(),55),sv(i,l.a,0),l.a+=i.e.a+n,l.b=Xe(l.b,i.e.b);return l.b>0&&(l.b+=n),l}function Py(e,n){var i,u,l;for(l=new Wr,u=e.mb();u.G();)i=v(u.H(),55),sv(i,0,l.b),l.b+=i.e.b+n,l.a=Xe(l.a,i.e.a);return l.a>0&&(l.a+=n),l}function $b(e,n,i){var u,l,g;return l=v(ln(e.c,n),176),l?(g=c7(l,i),NK(e,l),g):(u=new g7(e,n,i),kn(e.c,n,u),dW(u),null)}function U2e(e,n){return Uke(e.b).kb(n.c)?wye(e.b)?!(Bx(n.d,e.c,e.a)&&Bx(n.a,e.c,e.a)):Bx(n.d,e.c,e.a)&&Bx(n.a,e.c,e.a):!1}function F2e(e,n){return e.c<n.c||e.c==n.c&&Wx(e.a)&&Wx(n.a)&&ll(e.d,kx(e.a,e.b))>ll(e.d,kx(n.a,n.b))?-1:e.c==n.c&&kx(e.a,e.b)==kx(e.a,e.b)?0:1}function Y2e(e,n,i){if(e.e)switch(e.b){case 1:sye(e.c,n,i);break;case 0:oye(e.c,n,i)}else eme(e.c,n,i);e.a[n.k][i.k]=e.c.i,e.a[i.k][n.k]=e.c.e}function V2e(e,n,i){switch(i.e){case 1:e.a=n.a/2,e.b=0;break;case 2:e.a=n.a,e.b=n.b/2;break;case 3:e.a=n.a/2,e.b=n.b;break;case 4:e.a=0,e.b=n.b/2}}function Vj(e){switch(e.e){case 8:return De(),bt;case 9:return De(),kt;case 10:return De(),at;case 11:return De(),ct;default:return De(),mr}}function q2e(e){var n,i,u;for(n="Ot",u=sc(e.length,5),i=0;i<u;i++)if(es(e[i].d,n)){e.length>=i+1&&e.splice(0,i+1);break}return e}function $k(e,n){return Go(e)?!!Sre[n]:e._c?!!e._c[n]:Fh(e)?!!Pre[n]:Yh(e)?!!Cre[n]:!1}function pee(){Pj(),this.i=(Fn(),new en),this.a=new en,this.k=new en,this.j=new en,this.b=new en,this.n=new en,this.f=new en,this.e=new en}function Z2e(e,n){var i,u;n.a.R(e)||(u=v(J(e,(Ce(),$r)),32),i=v(ut(e.f,0),7),u==(De(),bt)?Qt(i,kt):u==kt&&Qt(i,bt),n.a.db(e,n))}function gee(e){var n,i;return i=ui(1,v(J(e,(Ce(),vo)),24).a),e.c.f.g==(pt(),$n)&&e.d.f.g==$n?n=1:e.c.f.g==$n||e.d.f.g==$n?n=2:n=8,i*n}function $2e(e){var n,i,u,l,g;for(g=v(J(e,(Ce(),_t)),7),n=v(nr(e.b,Ae(la,ia,12,e.b.c.length,0,1)),47),u=0,l=n.length;u<l;++u)i=n[u],An(i,g)}function K2e(e){var n,i,u,l,g;for(i=v(J(e,(Ce(),_t)),7),n=v(nr(e.e,Ae(la,ia,12,e.e.c.length,0,1)),47),l=0,g=n.length;l<g;++l)u=n[l],qn(u,i)}function bee(e){var n,i;i=e.i,n=Nn(new wt(i.a,i.b),e.j),this.d=dn(i.b,n.b),this.a=Xe(i.b,n.b),this.b=dn(i.a,n.a),this.c=Xe(i.a,n.a)}function ad(e,n,i,u){var l,g,y,x;!u&&(u=(vf(),vf(),th)),l=(g=zX(e,n,i),y=(x=new Array(i-n),Rb(x,e)),Wk(e,n,y,0,g,!0),y),fA(l,e,n,i,-n,u)}function nr(e,n){var i,u,l;for(l=e.c.length,n.length<l&&(n=(u=new Array(l),Rb(u,n))),i=0;i<l;++i)oo(n,i,e.c[i]);return n.length>l&&oo(n,l,null),n}function vee(e,n){var i,u,l;for(l=e.a.length,n.length<l&&(n=(u=new Array(l),Rb(u,n))),i=0;i<l;++i)oo(n,i,e.a[i]);return n.length>l&&oo(n,l,null),n}function Na(e){return Go(e)?e:Fh(e)?i$((xr(e),e)):Yh(e)?mK(Gt((xr(e),e))):Yx(e)?e.w():Hx(e)?cW(e):e.toString?e.toString():"[JavaScriptObject]"}function Q2e(e){var n,i,u,l,g;for(g=0,i=e.b,u=0,l=i.length;u<l;++u)n=i[u],n.g==(pt(),Pn)||kn(e.c,n,St(g++)),DX(e,n,e.d,(De(),bt)),DX(e,n,e.j,kt)}function Sy(){Sy=s,p9=new bb("SIMPLE",0),f9=new bb(A_,1),h9=new bb("LINEAR_SEGMENTS",2),BE=new bb("BRANDES_KOEPF",3),d9=new bb(bre,4)}function ra(){ra=s,eh=new yb(Zp,0),qv=new yb("FIRST",1),Uc=new yb("FIRST_SEPARATE",2),fg=new yb("LAST",3),Ku=new yb("LAST_SEPARATE",4)}function Ny(){Ny=s,Em=new k2,eoe=Si(new Yn,(Br(),dm)),toe=Pi(Si(new Yn,mm),ym),Jae=Pi(Fa(Si(z1(new Yn,pm),bm),Pd),gm),Xae=Pi(Fa(new Yn,Pd),hm)}function W2e(e){var n,i,u,l;for(i=(l=new un(e.d.a).a.bb().mb(),new hn(l));i.a.G();)n=(u=v(i.a.H(),21),v(u.yb(),12)),$e(n.c.e,n),$e(n.d.b,n)}function qj(e,n){var i,u;if(iK(n>0),(n&-n)==n)return ur(n*Of(e,31)*4656612873077393e-25);do i=Of(e,31),u=i%n;while(i-u+(n-1)<0);return ur(u)}function J2e(e,n){if(e.c.f==n)return e.d.f;if(e.d.f==n)return e.c.f;throw new wn("Node "+n+" is neither source nor target of edge "+e)}function X2e(e,n,i){return iK(e>=0&&e<=1114111),e>=cv?(n[i++]=55296+(e-cv>>10&1023)&$s,n[i]=56320+(e-cv&1023)&$s,2):(n[i]=e&$s,1)}function exe(e,n){Qn();for(var i,u;e.G();)if(!n.G()||(i=e.H(),u=n.H(),!(ot(i)===ot(u)||i!=null&&Fo(i,u))))return!1;return!n.G()}function txe(e){var n,i,u;for(u1(e.b.a),e.a=Ae(fm,et,25,e.c.b.a.b.c.length,0,1),n=0,u=new V(e.c.b.a.b);u.a<u.c.c.length;)i=v(q(u),25),i.k=n++}function nxe(e){var n,i,u,l;for(uo(e.c,e.a),l=new V(e.c);l.a<l.c.c.length;)for(u=q(l),i=new V(e.b);i.a<i.c.c.length;)n=v(q(i),160),n.Ec(u)}function Kb(e){var n,i;if(!e.a)for(e.a=cl(v(e.e,9).c.c.length),i=new V(v(e.e,9).c);i.a<i.c.c.length;)n=v(q(i),33),$e(e.a,new A2(n));return e.a}function Qb(e){var n,i;if(!e.b)for(e.b=cl(v(e.e,7).c.c.length),i=new V(v(e.e,7).c);i.a<i.c.c.length;)n=v(q(i),33),$e(e.b,new A2(n));return e.b}function yee(e){this.b=e,this.c=(Fn(),new en),this.i=new en,this.d=new en,this.j=new en,this.k=ot(J(Ui(e[0]),(Fe(),Ff)))===ot((Ou(),Uf)),Q2e(this)}function Rp(e){switch(e.e){case 1:return 4.71238898038469;default:case 2:return 0;case 3:return 1.5707963267948966;case 4:return 3.141592653589793}}function Zj(e){Qn();var n;if(n=Ime(e),!Bt(e))throw new ts("position (0) must be less than the number of elements that remained ("+n+")");return It(e)}function $j(e,n){var i,u;i=e.ub(n);try{return u=i.H(),i.I(),u}catch(l){throw l=ni(l),qe(l,74)?new ts("Can't remove element "+n):ri(l)}}function Kk(e,n){var i,u,l,g;for(g=e.Y(),n.length<g&&(n=(l=new Array(g),Rb(l,n))),u=e.mb(),i=0;i<g;++i)oo(n,i,u.H());return n.length>g&&oo(n,g,null),n}function od(e,n,i){if(i&&(n<0||n>i.a.c.length))throw new wn("index must be >= 0 and <= layer node count");e.d&&Ir(e.d.a,e),e.d=i,i&&hl(i.a,n,e)}function Kj(e,n,i,u,l,g,y,x){var _,C;u&&(_=u.a[0],_&&Kj(e,n,i,_,l,g,y),lxe(e,i,u.d,l,g,y)&&n.ib(u),C=u.a[1],C&&Kj(e,n,i,C,l,g,y))}function Qj(e,n,i){if(e<0)throw new ts(zne+e+" < 0");if(n>i)throw new ts("toIndex: "+n+" > size "+i);if(e>n)throw new wn(zne+e+" > toIndex: "+n)}function Qk(e,n){var i,u,l;return i=n.yb(),l=n.zb(),u=e.cb(i),!(!(ot(l)===ot(u)||l!=null&&Fo(l,u))||u==null&&!e.R(i))}function rxe(e,n,i){var u;u=n.c.f,u.g==(pt(),Pn)?(_e(e,(Ce(),Ki),v(J(u,Ki),7)),_e(e,Ii,v(J(u,Ii),7))):(_e(e,(Ce(),Ki),n.c),_e(e,Ii,i.d))}function ixe(e,n,i){var u;u=n.c.f,u.g==(pt(),Pn)?(_e(e,(Ce(),Ki),v(J(u,Ki),7)),_e(e,Ii,v(J(u,Ii),7))):(_e(e,(Ce(),Ki),n.c),_e(e,Ii,i.d))}function Wj(e,n,i){var u,l,g,y,x;for(ewe(e),l=(e.i==null&&(e.i=Ae(s3e,Rr,46,0,0,1)),e.i),g=0,y=l.length;g<y;++g)u=l[g],Wj(u);x=e.e,x&&Wj(x)}function mee(e,n){var i=new Array(n),u;switch(e){case 11:case 12:u=0;break;case 13:u=!1;break;default:return i}for(var l=0;l<n;++l)i[l]=u;return i}function axe(e){var n,i,u,l;for(l=Ae(Nr,Rr,51,e.a.length,0,2),i=0;i<l.length;i++)u=e.a[i].length,n=Ae(Nr,Zi,9,u,0,1),gEe(e.a[i],0,n,0,u),l[i]=n;return l}function Ec(e){var n,i;if(!e.b)for(e.b=cl(v(e.e,9).f.c.length),i=new V(v(e.e,9).f);i.a<i.c.c.length;)n=v(q(i),7),$e(e.b,new x$(n,e.c));return e.b}function oxe(e,n){Fn(),Pt(e);try{return Go(n)?WQ(e,n):c_(e.d,n)}catch(i){if(i=ni(i),qe(i,119)||qe(i,76))return null;throw ri(i)}}function sxe(e){var n;return n=(AJ(),Uoe),n[e>>>28]|n[e>>24&15]<<4|n[e>>20&15]<<8|n[e>>16&15]<<12|n[e>>12&15]<<16|n[e>>8&15]<<20|n[e>>4&15]<<24|n[e&15]<<28}function uxe(e,n,i){var u,l;return n.c==(vr(),hi)&&i.c==Wi?-1:n.c==Wi&&i.c==hi?1:(u=UX(n.a,e.a),l=UX(i.a,e.a),n.c==hi?l-u:u-l)}function cxe(e){var n,i,u,l,g;for(l=Sr,g=null,u=new V(e.d);u.a<u.c.c.length;)i=v(q(u),89),i.c.j^i.d.j&&(n=i.d.e-i.c.e-i.a,n<l&&(l=n,g=i));return g}function lxe(e,n,i,u,l,g,y){var x,_;return!(n.Xc()&&(_=e.a.$b(i,u),_<0||_==0)||n.Yc()&&(x=e.a.$b(i,g),x>0||x==0))}function wee(e){za();var n,i;if(!e.G())return Kh(),Jp;if(i=e.H(),!e.G())return new cc(i);n=new ta,Tn(n,Pt(i));do Tn(n,Pt(e.H()));while(e.G());return Lj(n)}function fxe(e,n,i){e.e=n,e.a=i,e.d=Ck(e,(De(),at)),e.d+=Ck(e,ct),nv(e,n,i,at,e.f),nv(e,n,i,ct,e.n),e.b=Ck(e,at),e.b+=Ck(e,ct),nv(e,i,n,at,e.f),nv(e,i,n,ct,e.n)}function El(e){var n,i,u;for(i=(Ln(),e.length),u=0;u<i&&e.charCodeAt(u)<=32;)++u;for(n=i;n>u&&e.charCodeAt(n-1)<=32;)--n;return u>0||n<i?e.substr(u,n-u):e}function Wk(e,n,i,u,l,g){var y,x,_;for(ot(e)===ot(i)&&(e=e.slice(n,n+l),n=0),x=n,_=n+l;x<_;)y=x+1e4<_?x+1e4:_,l=y-x,xme(i,u,g?l:0,e.slice(x,y)),x=y,u+=l}function hxe(e){var n,i,u;return xee(e,(fy(),DI))<0?-u1e((n=~e.l+1&fo,i=~e.m+(n==0?1:0)&fo,u=~e.h+(n==0&&i==0?1:0)&Sc,pc(n,i,u))):e.l+e.m*Bf+e.h*Nc}function dxe(e,n){var i;switch(i=e.f,n.e){case 1:return-(e.i.b+e.j.b);case 2:return e.i.a-i.j.a;case 3:return e.i.b-i.j.b;case 4:return-(e.i.a+e.j.a)}return 0}function Zn(){Zn=s,Ac=new wp(Rf,0),vs=new wp("FREE",1),Mv=new wp("FIXED_SIDE",2),wd=new wp("FIXED_ORDER",3),bs=new wp("FIXED_RATIO",4),fi=new wp("FIXED_POS",5)}function pxe(e,n){var i,u,l,g;for(i=v(J(n,(Ce(),Xf)),18),g=v(Za(Lt,i),18),l=g.mb();l.G();)if(u=v(l.H(),18),!v(Za(e.a,u),20).V())return!1;return!0}function Jj(e,n,i){this.b=new Ax,this.i=new Ye,this.d=new Cq(this),this.g=e,this.a=n.c.length,this.c=n,this.e=v(ut(this.c,this.c.c.length-1),9),this.f=i,fEe(this)}function Ty(){Ty=s,Pm=new vb("ALWAYS_UP",0),ZE=new vb("ALWAYS_DOWN",1),KE=new vb("DIRECTION_UP",2),$E=new vb("DIRECTION_DOWN",3),QE=new vb("SMART",4)}function xee(e,n){var i,u,l,g,y,x,_,C;return _=e.h>>19,C=n.h>>19,_!=C?C-_:(l=e.h,x=n.h,l!=x?l-x:(u=e.m,y=n.m,u!=y?u-y:(i=e.l,g=n.l,i-g)))}function kee(e){var n,i,u,l;for(i=(l=new un(e.p.a).a.bb().mb(),new hn(l));i.a.G();)if(n=(u=v(i.a.H(),21),v(u.yb(),89)),n.e&&e.b[n.b]<0)return n;return null}function Wb(e,n){var i,u,l,g,y;u=dn(e.d,n.d),g=dn(e.e,n.e),l=Xe(e.d+e.c,n.d+n.c),y=Xe(e.e+e.b,n.e+n.b),l<u&&(i=u,u=l,l=i),y<g&&(i=g,g=y,y=i),iQ(e,u,g,l-u,y-g)}function My(e,n){var i;if(P_ in e.a){if(i=zn(e,P_),!i.kc())throw new Gs("The 'properties' property of a graph element must be an object.",i,e);Dee(i.kc(),n,!0)}}function gxe(e,n){var i,u,l;if(u=e.b.j.e,e.a||(u+=e.b.j.b),l=n.b.j.e,n.a||(l+=n.b.j.b),i=Pr(u,l),i==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return i}function Xj(e){var n,i;switch(v(J(Ui(e),(Wt(),mC)),174).e){case 0:return n=e.i,i=e.j,new wt(n.a+i.a/2,n.b+i.b/2);case 1:return new tr(e.i);default:return null}}function Xn(){Sa(),Q6.call(this),this.g=(De(),mr),this.a=new Wr,this.d=new S2,this.c=(yi(2,Ll),new qi(2)),this.b=(yi(4,Ll),new qi(4)),this.e=(yi(4,Ll),new qi(4))}function bxe(e,n,i){e.d=0,e.b=0,qke(e,n,i),n.g==(pt(),fr)&&i.g==Pn?pk(n).g==(De(),bt)?e.d=1:e.b=1:i.g==fr&&n.g==Pn&&(pk(i).g==(De(),bt)?e.b=1:e.d=1),N2e(e,n,i)}function vxe(e,n){var i,u;for(u=new V(n);u.a<u.c.c.length;)i=v(q(u),9),e.a[i.d.k][i.k].a=kwe(e.e),e.a[i.d.k][i.k].d=Oe(e.a[i.d.k][i.k].a),e.a[i.d.k][i.k].b=1}function yxe(e,n,i){var u,l,g;for(g=new V(n);g.a<g.c.c.length;)u=v(q(g),9),e.a[u.d.k][u.k].e=!1;for(l=new V(n);l.a<l.c.c.length;)u=v(q(l),9),qA(e,u,i)}function mxe(e,n){var i,u,l,g;for(i=0,u=0,g=new V(n.b);g.a<g.c.c.length;)l=v(q(g),33),i=Xe(i,l.j.a),u+=l.j.b;_e(n,(Ce(),Loe),new wt(i,u)),e.k<i&&(e.k=i),e.j+=u}function _ee(e,n){this.c=(Fn(),new en),this.a=e,this.b=n,this.d=v(J(e,(Ce(),Wl)),134),ot(J(e,(Wt(),dC)))===ot((Gb(),GE))?this.e=new xZ:this.e=new wZ}function Jk(e,n){var i,u,l,g;for(l=0,u=0;u<n.length;u++)i=n[u],u<n.length-1&&(g=n[u+1],l+=a2e(e,i,g)),l+=(e.d=new yee(i),rke(e.d)),l+=(e.a=new Rj(i),kye(e.a));return l}function eA(e){switch(e.c.e){case 1:return Sa(),yE;case 2:return Sa(),vE;case 3:return Sa(),mE;case 4:return Sa(),wE}throw new Mh("Can't filter on undefined side")}function jy(e,n){var i;try{return i=e.c.a,!Pb(e.b,n)||!i?0:wj(i,e.d,n)}catch(u){if(u=ni(u),qe(u,119)||qe(u,76))return 0;throw ri(u)}}function wxe(e){var n,i,u,l,g;for(u=new Af(new Tu(e.b).a);u.b;)i=Lp(u),n=v(i.yb(),9),g=v(v(i.zb(),27).a,9),l=v(v(i.zb(),27).b,10),Nn(au(n.i),Nn(ao(g.i),l))}function xxe(e,n,i){var u,l,g;if(u=Pr(e.a[n.k],e.a[i.k]),u==0){if(l=v(J(n,(Ce(),Td)),20),g=v(J(i,Td),20),l.kb(i))return-1;if(g.kb(n))return 1}return u}function kxe(e,n){var i,u;switch(u=Nn(ao(e.i),e.a),i=e.f.j,n.e){case 1:return-u.b;case 2:return-u.a+i.a;case 3:return-u.b+i.b;case 4:return-u.a;default:return 0}}function Eee(e,n){var i,u,l,g;for(l=0;l<n.length;l++)for(l+1<n.length&&J7(e,n[l+1],(vr(),Wi)),g=n[l],i=0,u=0;u<g.length;u++)r3e(e,g[u]),i+=e.Hc(g[u],i,(vr(),hi))}function tA(){tA=s,koe=Fa(Fa(gc(new Yn,(Br(),ZL)),qL),$L),yoe=Pi(Fa(Si(z1(new Yn,pm),bm),Pd),gm),woe=Si(new Yn,dm),xoe=Pi(Si(new Yn,mm),ym),moe=Pi(Fa(new Yn,Pd),hm)}function _xe(e,n,i,u){AZ();var l=R_;function g(){for(var y=0;y<l.length;y++)l[y]()}if(e)try{TC(g)()}catch(y){e(n,y)}else TC(g)()}function Ay(e){if(CI==null&&(CI=/^\s*[+-]?(NaN|Infinity|((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?[dDfF]?)\s*$/),!T0e(CI,e))throw new c1(x_+e+'"');return parseFloat(e)}function Jb(){Jb=s,JE=new Ep(Zp,0),y9=new Ep("LEFTUP",1),w9=new Ep("RIGHTUP",2),v9=new Ep("LEFTDOWN",3),m9=new Ep("RIGHTDOWN",4),WE=new Ep("BALANCED",5)}function Gp(){Gp=s,VE=new _p("V_TOP",0),YE=new _p("V_CENTER",1),FE=new _p("V_BOTTOM",2),zE=new _p("H_LEFT",3),HE=new _p("H_CENTER",4),UE=new _p("H_RIGHT",5)}function Iy(){Iy=s,K_=new mp(Zp,0),zI=new mp("DIRECTED",1),FI=new mp("UNDIRECTED",2),GI=new mp("ASSOCIATION",3),UI=new mp("GENERALIZATION",4),HI=new mp("DEPENDENCY",5)}function pt(){pt=s,$n=new xp("NORMAL",0),Pn=new xp("LONG_EDGE",1),Dn=new xp("EXTERNAL_PORT",2),fr=new xp("NORTH_SOUTH_PORT",3),go=new xp("LABEL",4),$i=new xp("BIG_NODE",5)}function Cee(e,n,i,u,l,g,y){var x,_,C,N,A;if(N=l[g],C=g==y-1,x=C?u:0,A=mee(x,N),u!=9&&be(ve(e,y-g),n[g],i[g],x,A),!C)for(++g,_=0;_<N;++_)A[_]=Cee(e,n,i,u,l,g,y);return A}function Xb(e){var n,i,u;for(n=new Ye,u=new V(e.f);u.a<u.c.c.length;)i=v(q(u),7),$e(n,Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[i.b,i.e]))))));return Pt(n),new zh(n)}function nA(e,n,i){if(this.a=i,e>=n.length)throw new ts("Greedy SwitchDecider: Free layer layer not in graph.");this.b=n[e],this.c=new ZK(this.b),this.d=new WJ(this.b)}function Pee(e,n){var i;if(this.f=e,this.b=this.f.c,i=e.d,fk(n,i),n>=(i/2|0))for(this.e=e.e,this.d=i;n++<i;)PW(this);else for(this.c=e.a;n-- >0;)CW(this);this.a=null}function Cl(e){var n,i,u;for(i=new V(e.a.b);i.a<i.c.c.length;)n=v(q(i),25),u=n.j.d,n.j.d=n.j.e,n.j.e=u,u=n.j.c,n.j.c=n.j.b,n.j.b=u,u=n.g.a,n.g.a=n.g.b,n.g.b=u;Hy(e)}function Exe(e,n){var i,u,l;for(u=new Cn(e.b,0);u.b<u.d.Y();)i=(xt(u.b<u.d.Y()),v(u.d.sb(u.c=u.b++),33)),l=v(J(i,(Fe(),Ta)),107),l==(Ys(),Gl)&&(zo(u),$e(n.b,i))}function Cxe(e,n,i){var u,l,g,y;for(y=Vi(e.f,n,0),g=new e6,g.b=i,u=new Cn(e.f,y);u.b<u.d.Y();)l=(xt(u.b<u.d.Y()),v(u.d.sb(u.c=u.b++),9)),l.k=i,$e(g.f,l),zo(u);return g}function Pxe(e,n){Th();var i,u,l;if(n.V())return!1;if(qe(n,207))for(l=v(n,207),u=l.bb().mb();u.G();)i=v(u.H(),83),e.Bb(i.Zb(),i.Yb());else kk(e,n.mb());return!0}function sd(){sd=s,Lv=new g1("DEFAULT_MINIMUM_SIZE",0),lE=new g1("MINIMUM_SIZE_ACCOUNTS_FOR_INSETS",1),cE=new g1("COMPUTE_INSETS",2),uE=new g1("APPLY_ADDITIONAL_INSETS",3)}function See(e){var n,i,u,l;for(i=e.a.b+2,l=Ae(Xt,Jt,10,i,0,1),l[0]=ao(Yi(e.c)),u=gn(e.a,0);u.b!=u.d.c;)n=v(on(u),10),l[u.a]=new wt(n.a,n.b);return l[i-1]=ao(Yi(e.d)),l}function rA(e,n,i){var u,l,g;for(l=e.bb().mb();l.G();)if(u=v(l.H(),21),g=u.yb(),ot(n)===ot(g)||n!=null&&Fo(n,g))return i&&(u=new k1(u.yb(),u.zb()),l.I()),u;return null}function Sxe(e,n,i){var u,l;return u=e.a[n.d.k][n.k],l=e.a[i.d.k][i.k],u.a!=null&&l.a!=null?IQ(u.a,l.a):u.a!=null?-1:l.a!=null?1:0}function Nxe(e,n,i){var u,l,g;return l=n.c,g=n.d,u=i,Tn(e.a,n)?(eee(e,l)&&(u=!0),eee(e,g)&&(u=!0),u&&(Ir(n.c.e,n),Ir(n.d.b,n),Tn(e.d,n)),mxe(e,n),!0):!1}function Lf(e,n,i){var u,l;return l=HX(e,n),l==e.c?n7(e,Uj(e,n)):i?(Uee(e,n,e.c-l),n7(e,Uj(e,n))):(u=new XX(e),Uee(u,n,e.c-l),n7(u,Uj(u,n)))}function Txe(){function e(){try{return new Map().entries().next().done}catch{return!1}}return typeof Map===Rne&&Map.prototype.entries&&e()?Map:TCe()}function Za(e,n){var i;return i=v(ln(e.b,n),19),!i&&(i=e.Z()),qe(i,137)?new X6(e,n,v(i,137)):qe(i,18)?new J6(e,n,v(i,18)):qe(i,20)?Z7(e,n,v(i,20),null):new Bb(e,n,i,null)}function Ru(e){switch(Ds(e.e)-Ds(e.g)){case-2:return X$(e.g)>0&&(e.g=Lee(e.g)),Iee(e);case 2:return X$(e.e)<0&&(e.e=Iee(e.e)),Lee(e);default:return e.d=1+ui(Ds(e.e),Ds(e.g)),e}}function Nee(e,n){this.f=(Fn(),new en),this.b=new en,this.j=new en,this.a=e,this.c=n,this.c>0&&ete(this,this.c-1,(De(),at)),this.c<this.a.length-1&&ete(this,this.c+1,(De(),ct))}function Mxe(e){var n;e.c==null&&(n=ot(e.b)===ot(Xy)?null:e.b,e.d=n==null?fu:NQ(n)?n1e(KQ(n)):Go(n)?"String":l1(Ap(n)),e.a=e.a+": "+(NQ(n)?p1e(KQ(n)):n+""),e.c="("+e.d+") "+e.a)}function jxe(e){var n,i,u,l;for(i=new V(e.a.c);i.a<i.c.c.length;)for(n=v(q(i),9),l=gn(Ca(n.c),0);l.b!=l.d.c;)u=v(on(l),33),J(u,(Ce(),_t))==null&&Ir(n.c,u);return null}function Pl(e,n){var i,u,l,g,y;for(y=new Ye,u=v(Qh(ql,e),20).mb();u.G();)i=v(u.H(),75),Bn(y,i.b);for(Ly(y),mk(y,e.a),g=new V(y);g.a<g.c.c.length;)l=v(q(g),7),ju(n,l)}function Axe(e){for(var n,i,u,l;e.o.a.c.length!=0;)i=v(bX(e.o),27),u=v(i.a,61),n=v(i.b,89),l=Hk(n,u),n.d==u?(bc(l.g,n),u.e=l.e+n.a):(bc(l.c,n),u.e=l.e-n.a),$e(e.e.a,u)}function Tee(e,n,i){var u,l,g;return yi(i,"count"),Pb(e.b,n)?(g=e.c.a,g?(l=Ae(ar,rr,26,1,12,1),u=AA(g,e.d,n,i,l),V1(e.c,g,u),l[0]):(i>0&&Dy(e,n,i),0)):(Hh(i==0),0)}function Mee(e,n){var i,u,l,g,y;for(l=v(J(n,(Ce(),Qi)),15).a*v(J(n,(Wt(),xu)),15).a,y=e[0].i.a+e[0].j.a,g=1;g<e.length;g++)i=e[g].i,u=e[g].j,i.a<=y+l&&(i.a=y+l),y=i.a+u.a}function iA(){iA=s;var e,n,i,u;for(e8=Ae(fa,Ti,26,25,12,1),t8=Ae(fa,Ti,26,33,12,1),u=152587890625e-16,n=32;n>=0;n--)t8[n]=u,u*=.5;for(i=1,e=24;e>=0;e--)e8[e]=i,i*=.5}function jee(e){for(;e.g.c!=0&&e.d.c!=0;)Nx(e.g).c>Nx(e.d).c?(e.i+=e.g.c,Yk(e.d)):Nx(e.d).c>Nx(e.g).c?(e.e+=e.d.c,Yk(e.g)):(e.i+=bQ(e.g),e.e+=bQ(e.d),Yk(e.g),Yk(e.d))}function Ixe(e){if(!e)throw new H2("An element is null. The origin of an edge could not be determined, this might be due to an inconsistency within the internal element mappings.")}function Lxe(e,n){var i,u;return No(e.i),No(e.a),No(e.k),No(e.j),No(e.b),No(e.n),No(e.f),No(e.e),e.d&&(u=zn(e.d,oL.b),u&&u.ic()&&(e.c=u.ic().a)),i=Sne(e,n,null),Wte(e,n),i}function Oxe(e){var n,i,u,l,g,y;for(u=$te(b_(e)),n=hs,g=0,l=0;n>.5&&g<50;)l=Nte(u),i=Lf(u,l,!0),n=ci(i.b),++g;return y=qt(Bp(Ca(e.g),Ca(e.g).b-1)),Lf(e,(xr(y),y-l),!1)}function Dxe(e){var n,i,u,l,g,y;for(u=$te(b_(e)),n=hs,g=0,l=0;n>.5&&g<50;)l=Ste(u),i=Lf(u,l,!0),n=ci(i.a),++g;return y=qt(Bp(Ca(e.g),Ca(e.g).b-1)),Lf(e,(xr(y),y-l),!1)}function Cc(e){var n,i,u,l;for(l=new gp("["),n=!1,u=e.mb();u.G();)i=u.H(),n?l.a+=", ":n=!0,Co(l,i===e?"(this Collection)":(Ln(),i==null?fu:Na(i)));return l.a+="]",l.a}function Aee(e){var n,i,u,l;for(l=new gp("{"),n=!1,u=e.bb().mb();u.G();)i=v(u.H(),21),n?l.a+=", ":n=!0,Co(l,TW(e,i.yb())),l.a+="=",Co(l,TW(e,i.zb()));return l.a+="}",l.a}function Iee(e){var n;return _1(!!e.g),n=e.g,e.g=n.e,n.e=e,n.j=e.j,n.a=e.a,e.a=1+R2(e.e)+R2(e.g),e.j=Or(Or(e.c,G2(e.e)),G2(e.g)),e.d=1+ui(Ds(e.e),Ds(e.g)),n.d=1+ui(Ds(n.e),Ds(n.g)),n}function Lee(e){var n;return _1(!!e.e),n=e.e,e.e=n.g,n.g=e,n.j=e.j,n.a=e.a,e.a=1+R2(e.e)+R2(e.g),e.j=Or(Or(e.c,G2(e.e)),G2(e.g)),e.d=1+ui(Ds(e.e),Ds(e.g)),n.d=1+ui(Ds(n.e),Ds(n.g)),n}function Bxe(e){var n;ul(new V(Ec(e.e)))&&(n=v(hr(e.e,(Fe(),Ct)),28),n==(Zn(),fi)?u_e(e.e):n==bs?iCe(e.e):Gt(Oe(Yt(hr(e.e,Ev))))||e.e.e.j.a==0&&e.e.e.j.b==0?Jke(e.e):WEe(e))}function aA(e,n,i){var u,l,g;if(l=new V(e),l.a<l.c.c.length){for(g=v(q(l),33),u=lne(g,n,i);l.a<l.c.c.length;)g=v(q(l),33),dj(u,lne(g,n,i));return new Db(u)}else return null}function Rxe(e,n){var i,u,l,g,y,x;for(l=0,u=new V(n.c);u.a<u.c.c.length;)for(i=v(q(u),16),y=new V(i.a);y.a<y.c.c.length;)g=v(q(y),9),x=g.j.a+g.e.c+g.e.b+e.b,l=l>x?l:x;return l}function Gxe(e,n){Mp();var i;if(e.c==n.c){if(e.b==n.b||rwe(e.b,n.b)){if(i=B0e(e.b)?1:-1,e.a&&!n.a)return i;if(!e.a&&n.a)return-i}return sK(e.b.e,n.b.e)}else return Pr(e.c,n.c)}function Oee(e){var n,i;switch(i=ao(En(be(ve(Xt,1),Jt,10,0,[e.f.i,e.i,e.a]))),n=e.f.e,e.g.e){case 1:i.b-=n.d;break;case 2:i.a+=n.c;break;case 3:i.b+=n.a;break;case 4:i.a-=n.b}return i}function Hxe(e,n){var i;return i=0,n.g==(pt(),fr)?(X7(n).f!=e.a&&(O$(e,X7(n).f),e.e=!0),e.e?++e.g:i+=e.f):n.g==Pn?e.e?i+=e.g:++e.f:n.g==$n&&(O$(e,n),e.e=!1),i}function zxe(e,n,i,u,l){var g,y,x,_;for(_=null,x=new V(u);x.a<x.c.c.length;)if(y=v(q(x),187),y!=i&&Vi(y.e,l,0)!=-1){_=y;break}g=lk(l),qn(g,i.b),An(g,_.b),Tt(e.a,l,new D1(g,n,i.f))}function Uxe(e){switch(v(J(e,(Wt(),Tr)),85).e){case 1:_e(e,Tr,(ra(),fg));break;case 2:_e(e,Tr,(ra(),Ku));break;case 3:_e(e,Tr,(ra(),qv));break;case 4:_e(e,Tr,(ra(),Uc))}}function Dee(e,n,i){var u,l,g,y;if(e)for(l=(g=YJ(e,Ae(H_,Rr,2,0,5,1)),new Nh(new Eo(new b$(e,g).b)));l.b<l.d.Y();)u=(xt(l.b<l.d.Y()),Vh(l.d.sb(l.c=l.b++))),y=zn(e,u),o3e(n,u,y,i)}function Fxe(e,n,i){var u,l,g,y,x,_;for(l=1;l<e;)l*=2;for(_=2*l-1,l-=1,x=Ae(ar,rr,26,_,12,1),u=0,y=0;y<n;y++)for(g=i[y]+l,++x[g];g>0;)g%2>0&&(u+=x[g+1]),g=(g-1)/2|0,++x[g];return u}function Hp(e,n,i){var u,l,g,y;if(e.e=n,i)for(l=(y=new un(e.a.a).a.bb().mb(),new hn(y));l.a.G();)u=(g=v(l.a.H(),21),v(g.yb(),12)),_e(u,(Ce(),Vv),e.e),Qt(u.c,n.a),Qt(u.d,n.b)}function zp(){zp=s,Hv=new kp(Zp,0),r9=new kp(Vp,1),o9=new kp(qp,2),a9=new kp("LEFT_RIGHT_CONSTRAINT_LOCKING",3),i9=new kp("LEFT_RIGHT_CONNECTION_LOCKING",4),n9=new kp("EDGE_LENGTH",5)}function oA(e,n,i,u){var l;this.b=u,this.e=e.a,l=n[i],this.d=zx(Qv,[Rr,bv],[227,26],13,[l.length,l.length],2),this.a=zx(ar,[Rr,rr],[52,26],12,[l.length,l.length],2),this.c=new Nee(n,i)}function Yxe(e,n,i,u){var l,g;for(g=n,l=g.d==null||e.a.$b(i.d,g.d)>0?1:0;g.a[l]!=i;)g=g.a[l],l=e.a.$b(i.d,g.d)>0?1:0;g.a[l]=u,u.b=i.b,u.a[0]=i.a[0],u.a[1]=i.a[1],i.a[0]=null,i.a[1]=null}function Vxe(e,n,i){var u,l,g,y;if(Vt(i,ore,1),Ene(e.d,n),y=GEe(e.a,n),y.Y()==1)RA(v(y.sb(0),55),i);else for(g=1/y.Y(),l=y.mb();l.G();)u=v(l.H(),55),RA(u,Mf(i,g));o0e(e.a,y,n),rne(n),Dt(i)}function Bee(e,n,i){var u,l,g,y,x;for(x=new fl(n,i),y=Tl(x);y.G();)for(g=v(y.H(),7),l=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[g.b,g.e]))))));Bt(l);)u=v(It(l),12),xl(u)||Wxe(e,n,g,u)}function Ree(e,n){var i,u,l;for(l=lr(e,n),u=l.mb();u.G();)if(i=v(u.H(),7),J(i,(Ce(),eu))!=null||Bt(Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[i.b,i.e]))))))))return!0;return!1}function Xk(e){var n,i;if(Ib(e))throw new wn(wre);for(i=gn(e,0);i.b!=i.d.c;)n=v(on(i),10),this.d=dn(this.d,n.b),this.c=Xe(this.c,n.a),this.a=Xe(this.a,n.b),this.b=dn(this.b,n.a)}function qxe(e,n,i){if(n<0||i<0)throw new wn("The highx must be bigger then lowx and the highy must be bigger then lowy");return e.a<0?e.a=0:e.a>n&&(e.a=n),e.b<0?e.b=0:e.b>i&&(e.b=i),e}function lr(e,n){switch(n.e){case 1:return Ho(e.f,(Sa(),yE));case 2:return Ho(e.f,(Sa(),vE));case 3:return Ho(e.f,(Sa(),mE));case 4:return Ho(e.f,(Sa(),wE));default:return pn(),pn(),Fc}}function Zxe(e){var n,i,u,l;for(l=(Qn(),new ns(rs(Rs(e.a,new w))));Bt(l);)for(u=v(It(l),9),u.g==(pt(),go)&&_e(u,(Ce(),jo),(na(),vu)),i=Ht(In(u));Bt(i);)n=v(It(i),12),l_(n,(na(),vu))}function $xe(e){var n,i,u,l;for(l=(Qn(),new ns(rs(Rs(e.a,new w))));Bt(l);)for(u=v(It(l),9),u.g==(pt(),go)&&_e(u,(Ce(),jo),(na(),ms)),i=Ht(In(u));Bt(i);)n=v(It(i),12),l_(n,(na(),ms))}function e_(e,n){switch(this.b=new Qr,e){case 0:this.d=new Yq(this);break;case 1:this.d=new Uq(this);break;case 2:this.d=new Fq(this);break;default:throw new fp}this.c=n,this.a=.2*n}function Gee(e){var n,i,u,l;if(!e.b)for(e.b=new Ye,i=new V(e.a.c);i.a<i.c.c.length;)for(n=v(q(i),16),l=new V(n.a);l.a<l.c.c.length;)u=v(q(l),9),$e(e.b,new w$(u,e.c));return e.b}function Kxe(e,n){var i,u,l;i=x1e(n,e.e),u=v(ln(e.g.f,i),24).a,l=e.a.c.length-1,e.a.c.length!=0&&v(ut(e.a,l),128).c==u?(++v(ut(e.a,l),128).a,++v(ut(e.a,l),128).b):$e(e.a,new jK(u))}function sA(e){Ln();var n,i;return e>=cv?(n=55296+(e-cv>>10&1023)&$s,i=56320+(e-cv&1023)&$s,String.fromCharCode(n)+(""+String.fromCharCode(i))):String.fromCharCode(e&$s)}function Qxe(e,n,i,u){var l,g,y;switch(l=Ui(i),g=Bk(l),y=new Xn,_n(y,i),u.e){case 1:Qt(y,Lk(wy(g)));break;case 2:Qt(y,wy(g))}return _e(y,(Ce(),cg),v(J(n,cg),15)),_e(n,_t,y),kn(e.b,y,n),y}function Wxe(e,n,i,u){var l;$e(e.c,new I7(e,i,u,v(ln(e.k,i),24).a)),Wx(u)&&(n==e.e?u.d.f!=e.a&&u.c.f!=e.a:u.d.f!=e.e&&u.c.f!=e.e)&&(l=i==u.c?u.d:u.c,$e(e.c,new I7(e,l,u,v(ln(e.k,l),24).a)))}function Hee(e,n){var i,u,l;if(n===e)return!0;if(!qe(n,57)||(l=v(n,57),e.Y()!=l.Y()))return!1;for(u=l.bb().mb();u.G();)if(i=v(u.H(),21),!e._(i))return!1;return!0}function zee(e,n){var i,u,l;return u=new lo(e),Du(u,n),_e(u,(Ce(),jm),n),_e(u,(Fe(),Ct),(Zn(),fi)),_e(u,Mo,(fs(),am)),io(u,(pt(),Dn)),i=new Xn,_n(i,u),Qt(i,(De(),ct)),l=new Xn,_n(l,u),Qt(l,at),u}function uA(e,n){var i,u,l;for(l=Sr,u=new V(If(n));u.a<u.c.c.length;)i=v(q(u),89),i.e&&!e.c[i.b]&&(e.c[i.b]=!0,l=sc(l,uA(e,Hk(i,n))));return e.i[n.b]=e.j,e.g[n.b]=sc(l,e.j++),e.g[n.b]}function Uee(e,n,i){var u,l,g,y;if(y=e.g.tb(),e.e)for(l=0;l<e.c;l++)y.H();else for(l=0;l<e.c-1;l++)y.H();for(g=e.b.tb(),u=Oe(qt(y.H()));u-n<Bl;)u=Oe(qt(y.H())),g.H();y.M(),Rte(e,i,n,g,y)}function Fee(e,n){var i,u,l,g;for(u=0,l=e.length;u<l;u++){g=e[u];try{g[1]?g[0].bd()&&(n=O1e(n,g)):g[0].bd()}catch(y){if(y=ni(y),qe(y,46))i=y,Z1e(qe(i,164)?v(i,164).cc():i);else throw ri(y)}}return n}function Jxe(e){var n,i,u;if(u=e.c.a,!u)return null;if(e.b.b){if(n=e.b.e,i=Aj(e.c.a,e.d,n),!i)return null;e.b.d==(Ro(),ho)&&e.d.$b(n,i.b)==0&&(i=i.i)}else i=e.a.i;return i==e.a||!Pb(e.b,i.b)?null:i}function Xxe(e,n){var i,u,l,g,y,x;for(g=0,u=new V(n.c);u.a<u.c.c.length;){for(i=v(q(u),16),l=0,x=new V(i.a);x.a<x.c.c.length;)y=v(q(x),9),l+=y.j.b+y.e.a+y.e.d+e.a;l-=e.a,g=g>l?g:l}return g}function eke(e){var n,i,u,l,g;for(g=Sr,l=Sr,u=new V(If(e));u.a<u.c.c.length;)i=v(q(u),89),n=i.d.e-i.c.e,i.d==e&&n<l?l=n:n<g&&(g=n);return l==Sr&&(l=-1),g==Sr&&(g=-1),new Er(St(l),St(g))}function Yee(e,n,i){var u,l,g,y,x;for(n.k=-1,x=Vs(n,(vr(),hi)).mb();x.G();)for(y=v(x.H(),7),l=new V(y.e);l.a<l.c.c.length;)u=v(q(l),12),g=u.d.f,n!=g&&(g.k<0?i.ib(u):g.k>0&&Yee(e,g,i));n.k=0}function Vee(e,n){if(0>n)throw new wn("Top must be smaller or equal to bottom.");if(0>e)throw new wn("Left must be smaller or equal to right.");this.d=0,this.c=e,this.a=n,this.b=0}function t_(e){var n,i,u;if(e.length==0)throw new wn(wre);for(i=0,u=e.length;i<u;++i)n=e[i],this.d=dn(this.d,n.b),this.c=Xe(this.c,n.a),this.a=Xe(this.a,n.b),this.b=dn(this.b,n.a)}function tke(){return Br(),be(ve(rae,1),Ke,37,0,[RL,PL,QL,EL,EE,ZL,CE,UL,kE,pm,zL,HL,vm,NL,xE,NE,ME,bm,OL,dm,VL,TE,mm,SL,FL,qL,YL,PE,AL,Pd,_E,LL,$L,GL,TL,rg,DL,Bv,_L,IL,ML,SE,ym,gm,jL,jE,BL,CL,KL,hm])}function nke(e,n){var i,u,l,g,y,x,_,C,N;for(N=0,u=0,l=n.length;u<l;++u)for(i=n[u],y=0,x=i.length;y<x;++y)for(g=i[y],C=new V(g.f);C.a<C.c.c.length;)_=v(q(C),7),_.k=N++;e.a=Ae(ar,rr,26,N,12,1)}function qee(e){Qn();var n,i,u;if(n=e.H(),!e.G())return n;for(u=new bp,u.a+="expected one element but was: <"+n,i=0;i<4&&e.G();i++)Co(u,", "+e.H());throw e.G()&&(u.a+=", ..."),u.a+=">",new wn(u.a)}function rke(e){var n,i,u,l,g;for(n=0,u=e.b,l=0,g=u.length;l<g;++l)i=u[l],n+=Hxe(e,i),Ci(v(J(i,(Fe(),Ct)),28))&&(lr(i,(De(),bt)).mb().G()&&(n+=Yte(e,i,bt)),lr(i,kt).mb().G()&&(n+=Yte(e,i,kt)));return n}function n_(e,n,i,u){var l,g,y,x,_;if(u.d.c+u.e.c==0)for(y=e.a[e.c],x=0,_=y.length;x<_;++x)g=y[x],kn(u,g,new qJ(e,g,i));return l=v(bi(vi(u.d,n)),284),l.b=0,l.c=l.f,l.c==0||$q(v(ut(l.a,l.b),128)),l}function Ly(e){var n;pn();var i,u,l,g,y,x;if(qe(e,63))for(g=0,l=e.Y()-1;g<l;++g,--l)n=e.sb(g),e.wb(g,e.sb(l)),e.wb(l,n);else for(i=e.tb(),y=e.ub(e.Y());i.L()<y.N();)u=i.H(),x=y.M(),i.O(x),y.O(u)}function ike(e,n,i){return e<0||e>i?lA(e,i,"start index"):n<0||n>i?lA(n,i,"end index"):av("end index (%s) must not be less than start index (%s)",be(ve(ht,1),et,1,4,[St(n),St(e)]))}function cA(e){if(!("id"in e.a))throw new Eb("Every graph element must specify an 'id' property.",e);if(!zn(e,"id").lc())throw new Eb("Invalid format for 'id'. Must be a string, was "+zn(e,"id").$c,e)}function Sl(e,n){var i,u,l,g,y,x,_;for(_=e.b,u=v(Qh(ql,e),20).mb();u.G();)for(i=v(u.H(),75),x=(g=new un(i.c.a).a.bb().mb(),new hn(g));x.a.G();)y=(l=v(x.a.H(),21),v(l.yb(),7)),ju(n,y),By(y,_)}function ake(e,n){var i,u,l;for(l=new V(n.e);l.a<l.c.c.length;)if(i=v(q(l),12),i.d.f!=e.f)return!0;for(u=new V(n.b);u.a<u.c.c.length;)if(i=v(q(u),12),i.c.f!=e.f)return!0;return!1}function r_(e){var n,i,u,l;for(Q1(e.c),Q1(e.b),Q1(e.a),l=(i=new un(e.e).a.bb().mb(),new hn(i));l.a.G();)u=(n=v(l.a.H(),21),v(n.yb(),60)),u.c!=2&&(mi(e.a,u),u.c==0&&mi(e.c,u)),mi(e.b,u);e.d=!1}function Zee(e,n){var i;if(e===n)return!0;if(qe(n,18)){i=v(n,18);try{return e.Y()==i.Y()&&e.lb(i)}catch(u){if(u=ni(u),qe(u,76)||qe(u,119))return!1;throw ri(u)}}return!1}function va(e,n,i){var u,l,g,y;if(y=n==null?0:e.b.Vc(n),l=(u=y6(e.a,y),u??[]),l.length==0)g0e(e.a,y,l);else if(g=wX(e,n,l),g)return g.Ab(i);return oo(l,l.length,new k1(n,i)),++e.c,Ix(e.b),null}function lA(e,n,i){if(e<0)return av(Une,be(ve(ht,1),et,1,4,[i,St(e)]));if(n<0)throw new wn(Fne+n);return av("%s (%s) must not be greater than size (%s)",be(ve(ht,1),et,1,4,[i,St(e),St(n)]))}function oke(e,n){if(e<0)return av(Une,be(ve(ht,1),et,1,4,["index",St(e)]));if(n<0)throw new wn(Fne+n);return av("%s (%s) must be less than size (%s)",be(ve(ht,1),et,1,4,["index",St(e),St(n)]))}function $ee(e){var n,i,u,l;for(l=Ae(Nr,Rr,51,e.c.c.length,0,2),u=new Cn(e.c,0);u.b<u.d.Y();)n=(xt(u.b<u.d.Y()),v(u.d.sb(u.c=u.b++),16)),i=u.b-1,l[i]=v(nr(n.a,Ae(Nr,Zi,9,n.a.c.length,0,1)),51);return l}function Up(e,n,i,u,l){switch(this.c=l,this.d=n,this.a=i,l.e){case 4:this.b=ci(e.b);break;case 1:this.b=ci(e.d);break;case 2:this.b=ci(e.c-u.j.a);break;case 3:this.b=ci(e.a-u.j.b);break;default:this.b=0}}function Kee(e,n,i,u,l){var g,y,x,_,C;if(n)for(x=n.mb();x.G();)for(y=v(x.H(),9),C=CA(y,(vr(),hi),i).mb();C.G();)_=v(C.H(),7),g=v(bi(vi(l.d,_)),80),g||(g=new XJ(e),u.c[u.c.length]=g,Lte(g,_,l))}function ske(e,n){var i,u,l;if(i=e.c,i.a.Y()>1)throw new wn("In straight hyperEdges there may be only one edge.");vn((l=new un(i.a).a.bb().mb(),u=v(new hn(l).a.H(),21),v(u.yb(),12)).a,new wt(n,e.b))}function Qee(e,n,i){var u,l;if(this.f=e,u=v(ln(e.b,n),126),l=u?u.a:0,fk(i,l),i>=(l/2|0))for(this.e=u?u.c:null,this.d=l;i++<l;)vW(this);else for(this.c=u?u.b:null;i-- >0;)sk(this);this.b=n,this.a=null}function ev(e,n){(typeof document!==dv||t.exports)&&TC(e(n)),typeof document===dv&&typeof self!==dv&&self.postMessage(n)}function i_(e,n){var i,u,l,g;"x"in e.a&&(l=v(zn(e,"x"),104),n.i.a=l.a),"y"in e.a&&(g=v(zn(e,"y"),104),n.i.b=g.a),N_ in e.a&&(u=v(zn(e,N_),104),n.j.a=u.a),T_ in e.a&&(i=v(zn(e,T_),104),n.j.b=i.a)}function Wee(e,n,i){var u,l;nJ(this),n==(vl(),yu)?Tn(this.g,e.c):Tn(this.o,e.c),i==yu?Tn(this.g,e.d):Tn(this.o,e.d),Tn(this.c,e),u=Yi(e.c).b,l=Yi(e.d).b,aee(this,u,l,l),this.f=J1e(Yi(e.c).b,Yi(e.d).b)}function uke(e){var n,i,u,l,g,y;for(y=new fl(e.d,e.e),g=Tl(y);g.G();)for(l=v(g.H(),7),u=e.e==(De(),ct)?l.b:l.e,i=new V(u);i.a<i.c.c.length;)n=v(q(i),12),!xl(n)&&n.c.f.d!=n.d.f.d&&(Kxe(e,n),++e.f,++e.c)}function tv(e,n,i){var u,l,g,y,x;for(y=(pn(),new pf(v(ut(n.a,i),18))),x=new qi(y.b.Y()),l=new cp(y.b.mb());l.b.G();)u=v(l.b.H(),37),g=v(ln(e.a,u),31),g||(g=JCe(u),kn(e.a,u,g)),x.c[x.c.length]=g;return x}function cke(e,n){var i,u,l,g;for(u=new Cn(e.f.c,0);u.b<u.d.Y();)for(i=(xt(u.b<u.d.Y()),v(u.d.sb(u.c=u.b++),16)),g=n[u.b-1],l=new Cn(i.a,0);l.b<l.d.Y();)xt(l.b<l.d.Y()),l.d.sb(l.c=l.b++),o7(l,g[l.b-1])}function Jee(e){var n,i;if(Bs(v(J(e,(Fe(),Ct)),28)))for(i=new V(e.f);i.a<i.c.c.length;)n=v(q(i),7),n.g==(De(),mr)&&vX(n);else{for(i=new V(e.f);i.a<i.c.c.length;)n=v(q(i),7),vX(n);_e(e,Ct,(Zn(),Mv))}}function fA(e,n,i,u,l,g){var y,x,_,C;if(y=u-i,y<7){v2e(n,i,u,g);return}if(_=i+l,x=u+l,C=_+(x-_>>1),fA(n,e,_,C,-l,g),fA(n,e,C,x,-l,g),g.$b(e[C-1],e[C])<=0){for(;i<u;)oo(n,i++,e[_++]);return}Jwe(e,_,C,x,n,i,u,g)}function Xee(e){if(!e)return pZ(),Gre;var n=e.valueOf?e.valueOf():e;if(n!==e){var i=Y_[typeof n];return i?i(n):Ij(typeof n)}else return e instanceof Array||e instanceof r.Array?new wq(e):new j2(e)}function a_(e,n,i){var u,l;return u=i.c,l=i.d,e.g[u.b]<=e.i[n.b]&&e.i[n.b]<=e.i[u.b]&&e.g[l.b]<=e.i[n.b]&&e.i[n.b]<=e.i[l.b]?!(e.i[u.b]<e.i[l.b]):e.i[u.b]<e.i[l.b]}function ete(e,n,i){var u,l,g,y,x,_,C,N;for(C=0,l=e.a[n],g=0,y=l.length;g<y;++g){for(u=l[g],N=new fl(u,i),_=Tl(N);_.G();)x=v(_.H(),7),kn(e.f,x,St(C)),Ci(v(J(u,(Fe(),Ct)),28))&&++C;Ci(v(J(u,(Fe(),Ct)),28))||++C}}function lke(e,n,i){var u,l;if(Pt(n),i.G())for(l=v(i.H(),21),sl(n,T1(e.a,l.yb())),sl(n,e.b),sl(n,T1(e.a,l.zb()));i.G();)sl(n,e.a.c),u=v(i.H(),21),sl(n,T1(e.a,u.yb())),sl(n,e.b),sl(n,T1(e.a,u.zb()));return n}function o_(e,n){var i,u;return i=v(xf(e.b,n),19),i?(u=e.Z(),u.jb(i),e.c-=i.Y(),i.Q(),qe(u,137)?(pn(),new K6(v(u,137))):qe(u,18)?(pn(),new pf(v(u,18))):qe(u,20)?G7(v(u,20)):(pn(),new rb(u))):e.$()}function tte(e,n){var i;n.d?n.d.b=n.b:e.a=n.b,n.b?n.b.d=n.d:e.e=n.d,!n.e&&!n.c?(i=v(xf(e.b,n.a),126),i.a=0,++e.c):(i=v(ln(e.b,n.a),126),--i.a,n.e?n.e.c=n.c:i.b=n.c,n.c?n.c.e=n.e:i.c=n.e),--e.d}function hA(e,n,i){switch(i.e){case 1:return new wt(n.a,dn(e.d.b,n.b));case 2:return new wt(Xe(e.c.a,n.a),n.b);case 3:return new wt(n.a,Xe(e.c.b,n.b));case 4:return new wt(dn(n.a,e.d.a),n.b)}return new wt(n.a,n.b)}function fke(e){var n,i,u,l;for(n=0,u=(Ln(),e.length),l=u-4,i=0;i<l;)n=e.charCodeAt(i+3)+31*(e.charCodeAt(i+2)+31*(e.charCodeAt(i+1)+31*(e.charCodeAt(i)+31*n))),n=n|0,i+=4;for(;i<u;)n=n*31+rQ(e,i++);return n=n|0,n}function nte(e,n){var i,u,l;for(this.a=e,this.c=n,this.b=Ae(Iae,Rr,673,e.length,0,2),i=0;i<e.length;++i)for(l=e[i].length,this.b[i]=Ae(Iae,{673:1,3:1,5:1,6:1},102,l,0,1),u=0;u<l;++u)this.b[i][u]=new JQ(this,e[i][u].c)}function Oy(e,n,i,u,l,g,y){var x;this.a=v(Pt(e),56),this.b=n,this.c=l,this.e=i,this.d=v(Pt(u),159),this.g=g,this.f=v(Pt(y),159),n&&e.$b(i,i),l&&e.$b(g,g),n&&l&&(x=e.$b(i,g),Vwe(x<=0,i,g),x==0&&Hh(u!=(Ro(),ho)|y!=ho))}function rte(e){if(this.a=e,e.c.f.g==(pt(),Dn))this.c=e.c,this.d=v(J(e.c.f,(Ce(),$r)),32);else if(e.d.f.g==Dn)this.c=e.d,this.d=v(J(e.d.f,(Ce(),$r)),32);else throw new wn("Edge "+e+" is not an external edge.")}function ite(){ite=s,$ae=Fa(new Yn,(Br(),AL)),g9=Si(new Yn,dm),Qae=Pi(Si(new Yn,mm),ym),Zae=Pi(Fa(Si(new Yn,NL),TL),ML),Wae=Si(new Yn,VL),Kae=Pi(new Yn,IL),Vae=Pi(Fa(Si(z1(new Yn,pm),bm),Pd),gm),qae=Pi(Fa(new Yn,Pd),hm)}function Dy(e,n,i){var u,l,g,y;return yi(i,uI),i==0?jy(e,n):(Hh(Pb(e.b,n)),y=e.c.a,y?(g=Ae(ar,rr,26,1,12,1),u=TA(y,e.d,n,i,g),V1(e.c,y,u),g[0]):(e.d.$b(n,n),l=new gy(n,i),e7(e.a,l,e.a),V1(e.c,null,l),0))}function ate(e,n,i){var u,l,g,y,x,_;for(u=0,_=i,n||(u=i*(e.c.length-1),_*=-1),g=new V(e);g.a<g.c.c.length;){for(l=v(q(g),9),_e(l,(Fe(),Mo),(fs(),am)),l.j.a=u,x=lr(l,(De(),at)).mb();x.G();)y=v(x.H(),7),y.i.a=u;u+=_}}function Tt(e,n,i){var u;if(u=v(ln(e.b,n),19),u)return u.ib(i)?(++e.c,!0):!1;if(u=e.Z(),u.ib(i))return++e.c,kn(e.b,n,u),!0;throw new vk("New Collection violated the Collection spec")}function s_(e,n,i){var u,l,g;for(Yke(e,n,i),g=new Ye,l=new V(e.b.a.b);l.a<l.c.c.length;)u=v(q(l),25),n.D(u)&&($e(g,new _6(u,!0)),$e(g,new _6(u,!1)));txe(e.d),Ob(g,e.c,new Eo(be(ve(Dv,1),et,160,0,[e.d]))),Hke(e,n,i)}function ote(e,n){var i,u,l,g,y;for(e.c[n.k]=!0,$e(e.a,n),y=new V(n.f);y.a<y.c.c.length;)for(g=v(q(y),7),u=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[g.b,g.e]))))));Bt(u);)i=v(It(u),12),l=E2e(g,i).f,e.c[l.k]||ote(e,l)}function dA(e,n,i,u){var l,g,y;if("labels"in n.a){if(y=zn(n,"labels"),!y.hc())throw new Gs("The 'labels' property of a node must be an array.",y,n);for(g=y.hc(),l=0;l<g.a.length;++l)qe(vc(g,l),69)&&OEe(e,v(vc(g,l),69),i,u)}}function ste(e,n,i){var u,l,g,y,x,_;g=v(ut(n.b,0),12).c,u=g.f,l=u.g,_=v(ut(i.e,0),12).d,y=_.f,x=y.g,l==(pt(),Pn)?_e(e,(Ce(),Ki),v(J(u,Ki),7)):_e(e,(Ce(),Ki),g),x==Pn?_e(e,(Ce(),Ii),v(J(y,Ii),7)):_e(e,(Ce(),Ii),_)}function Gu(){Gu=s,oa=new ol("H_LEFT",0),po=new ol("H_CENTER",1),ua=new ol("H_RIGHT",2),Aa=new ol("V_TOP",3),ja=new ol("V_CENTER",4),Ma=new ol("V_BOTTOM",5),Ai=new ol("INSIDE",6),ca=new ol("OUTSIDE",7),sa=new ol("H_PRIORITY",8)}function pA(e){Fx();var n,i,u;for(this.b=qie,this.c=$ie,this.d=(Jn(),qo),this.g=(gZ(),Vie),this.a=e,U2(this,new I),Hy(this),u=new V(e.b);u.a<u.c.c.length;)i=v(q(u),25),i.f||(n=new Ey(be(ve(fm,1),et,25,0,[i])),$e(e.a,n))}function gA(e,n){var i,u,l,g;for(l=1,n.j=!0,u=new V(If(n));u.a<u.c.c.length;)i=v(q(u),89),e.c[i.b]||(e.c[i.b]=!0,g=Hk(i,n),i.e?l+=gA(e,g):!g.j&&i.a==i.d.e-i.c.e&&(i.e=!0,Tn(e.p,i),l+=gA(e,g)));return l}function u_(e){var n,i,u,l,g,y,x,_;for(l=ji,u=Zr,i=new V(e.e.c);i.a<i.c.c.length;)for(n=v(q(i),16),y=new V(n.a);y.a<y.c.c.length;)g=v(q(y),9),_=Oe(e.n[g.k]),x=_+Oe(e.b[e.f[g.k].k]),l=l<_?l:_,u=u>x?u:x;return u-l}function ute(e){var n;return n=new df,Va(n,"type",new dl((mf(zie),zie.n))),Va(n,C_,new dl(e.f)),e.b&&Va(n,"value",e.b),e.a&&Va(n,"context",e.a),Va(n,rre,new dl(Y6(new s1(`
|
|
332
|
+
`),new Nh(new Eo((e.g==null&&(e.g=b7(e)),e.g)))))),n}function hke(e,n){return e.c<n.c?-1:e.c>n.c?1:e.b<n.b?-1:e.b>n.b?1:e.a!=n.a?e.a.b-n.a.b:e.d==0&&n.d==1?-1:e.d==1&&n.d==0?1:0}function cte(e,n){var i,u,l,g,y;if(n===e)return!0;if(!qe(n,20)||(y=v(n,20),e.Y()!=y.Y()))return!1;for(g=y.mb(),u=e.mb();u.G();)if(i=u.H(),l=g.H(),!(ot(i)===ot(l)||i!=null&&Fo(i,l)))return!1;return!0}function lte(e){!LI&&(LI=HCe());var n=e.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(i){return Dye(i)});return'"'+n+'"'}function fte(e,n){var i,u,l,g,y,x,_;for(l=n==1?gE:pE,u=(y=new un(l.a).a.bb().mb(),new hn(y));u.a.G();)for(i=(g=v(u.a.H(),21),v(g.yb(),59)),_=v(Za(e.f.c,i),18).mb();_.G();)x=v(_.H(),27),Ir(e.b.b,x.b),Ir(e.b.a,v(x.b,25).f)}function hte(e,n,i){var u,l,g,y;if(Vt(i,"Recursive layout",2),n.b.c.length!=0){for(y=1/n.b.c.length,g=new V(n.b);g.a<g.c.c.length;)l=v(q(g),9),u=v(J(l,(Ce(),Kl)),55),u&&(hte(e,u,Mf(i,y)),X_e(l,u));Ene(e.d,n),RA(n,i)}rne(n),Dt(i)}function bA(e,n){K7.call(this),this.d=new Qr,this.b=v(J(n,(Ce(),Qi)),15).a*v(J(n,(Wt(),xu)),15).a,this.e=this.b*v(J(n,hg),15).a,this.a=new Hi,this.c=new Hi,this.j=new so(e.j,e.k,0,e.n-e.k),this.o=e.g,this.g.a=e.i,hne(this,e)}function c_(e,n){var i,u,l,g,y;for(g=n==null?0:e.b.Vc(n),u=(i=y6(e.a,g),i??[]),y=0;y<u.length;y++)if(l=u[y],e.b.Uc(n,l.yb()))return u.length==1?(u.length=0,e.a[O_](g)):u.splice(y,1),--e.c,Ix(e.b),l.zb();return null}function dke(e,n,i){var u;u=null,n&&(u=n.e),Dp(e,new Rh(n.i.a-u.b+i.a,n.i.b-u.d+i.b)),Dp(e,new Rh(n.i.a-u.b+i.a,n.i.b+n.j.b+u.a+i.b)),Dp(e,new Rh(n.i.a+n.j.a+u.c+i.a,n.i.b-u.d+i.b)),Dp(e,new Rh(n.i.a+n.j.a+u.c+i.a,n.i.b+n.j.b+u.a+i.b))}function By(e,n){switch(n.e){case 2:Qt(e,(De(),at)),e.a.a=e.j.a,e.a.b=e.j.b/2;break;case 4:Qt(e,(De(),ct)),e.a.a=0,e.a.b=e.j.b/2;break;case 1:Qt(e,(De(),bt)),e.a.a=e.j.a/2,e.a.b=0;break;case 3:Qt(e,(De(),kt)),e.a.a=e.j.a/2,e.a.b=e.j.b}}function pke(e,n){Th();var i,u,l;if(n===e)return!0;if(qe(n,207)){if(l=v(n,207),e.Y()!=l.Y()||$h(e).Y()!=l.bb().Y())return!1;for(u=l.bb().mb();u.G();)if(i=v(u.H(),83),e.Cb(i.Zb())!=i.Yb())return!1;return!0}return!1}function Of(e,n){var i,u,l,g,y,x;return g=e.a*D_+e.b*1502,x=e.b*D_+11,i=Math.floor(x*I_),g+=i,x-=i*kI,g%=kI,e.a=g,e.b=x,n<=24?B6(e.a*e8[n]):(l=e.a*(1<<n-24),y=B6(e.b*t8[n]),u=l+y,u>=2147483648&&(u-=4294967296),u)}function vA(e,n,i){var u,l,g;if(n!=i){u=n;do Nn(e,u.d),g=v(J(u,(Ce(),Ql)),9),g&&(l=u.a,Ea(e,l.b,l.d),Nn(e,g.i),u=Ui(g));while(g);u=i;do Mu(e,u.d),g=v(J(u,(Ce(),Ql)),9),g&&(l=u.a,o1e(e,l.b,l.d),Mu(e,g.i),u=Ui(g));while(g)}}function gke(e,n){var i,u,l,g,y,x;for(i=new Ye,x=new M6,l=(y=new un(e.a).a.bb().mb(),new hn(y));l.a.G();)u=(g=v(l.a.H(),21),v(g.yb(),12)),p_(x,u.c,u,null),p_(x,u.d,u,null);for(;x.a;)$e(i,K_e(x,n,Ci(v(J(n,(Fe(),Ct)),28))));return i}function bke(e,n){var i,u,l,g,y;for(g=new V(e.e.a);g.a<g.c.c.length;)if(l=v(q(g),61),l.c.c.length==l.g.c.length){for(u=l.e,y=eke(l),i=l.e-v(y.a,24).a+1;i<l.e+v(y.b,24).a;i++)n[i]<n[u]&&(u=i);n[u]<n[l.e]&&(--n[l.e],++n[u],l.e=u)}}function dte(e,n){var i,u,l,g,y,x,_;for(l=n==1?gE:pE,u=(y=new un(l.a).a.bb().mb(),new hn(y));u.a.G();)for(i=(g=v(u.a.H(),21),v(g.yb(),59)),_=v(Za(e.f.c,i),18).mb();_.G();)x=v(_.H(),27),$e(e.b.b,v(x.b,25)),$e(e.b.a,v(x.b,25).f)}function pte(e){Dx();var n,i,u,l,g,y,x;for(i=(Fn(),new jp),l=new V(e.e.c);l.a<l.c.c.length;)for(u=v(q(l),16),y=new V(u.a);y.a<y.c.c.length;)g=v(q(y),9),x=e.f[g.k],n=v(yk(i,x),20),n||(n=new Ye,$b(i,x,n)),n.ib(g);return i}function vke(e,n){var i,u,l,g;for(u=new V(e.a.a);u.a<u.c.c.length;)i=v(q(u),78),i.i=!0;for(g=new V(e.a.b);g.a<g.c.c.length;)l=v(q(g),25),l.p=Gt(Oe(Yt(e.f.B(new Er(l,n))))),l.f.i=l.f.i&Gt(Oe(Yt(e.f.B(new Er(l,n)))));return e}function gte(e,n){var i,u,l,g;for(l=Ca(In(n)),u=gn(l,0);u.b!=u.d.c;)return i=v(on(u),12),g=i.d.f,g.g==(pt(),$i)&&!(Gt(Oe(Yt(J(g,(Ce(),zc)))))&&J(g,_t)!=null)?(Ir(g.d.a,g),_n(i.c,null),_n(i.d,null),gte(e,g)):n;return n}function yke(e,n){var i,u,l,g,y,x,_;if(!n.e)throw new wn("The input edge is not a tree edge.");for(g=null,l=Sr,u=new V(e.d);u.a<u.c.c.length;)i=v(q(u),89),x=i.c,_=i.d,a_(e,x,n)&&!a_(e,_,n)&&(y=_.e-x.e-i.a,y<l&&(l=y,g=i));return g}function bte(e,n){var i,u,l,g,y;return g=n.a,g.c.f==n.b?y=g.d:y=g.c,g.c.f==n.b?u=g.c:u=g.d,l=C2e(e.a,y,u),l>0&&l<hs?(i=Tke(e.a,u.f,l),TJ(e.a,u.f,-i),i>0):l<0&&-l<hs?(i=Mke(e.a,u.f,-l),TJ(e.a,u.f,i),i>0):!1}function mke(e,n,i,u,l){var g,y;FJ(En(be(ve(Xt,1),Jt,10,0,[l.f.i,l.i,l.a])),i)||(n.c==l?j1(n.a,0,new tr(i)):vn(n.a,new tr(i)),u&&!al(e.a,i)&&(y=v(J(n,(Fe(),ir)),44),y||(y=new Hi,_e(n,ir,y)),g=new tr(i),Cr(y,g,y.c.b,y.c),Tn(e.a,g)))}function vte(e){var n,i,u,l,g,y,x;for(n=0,u=new V(e.a);u.a<u.c.c.length;)for(i=v(q(u),9),g=Ht(In(i));Bt(g);)l=v(It(g),12),e==l.d.f.d&&l.c.g==(De(),ct)&&(y=Yi(l.c).b,x=Yi(l.d).b,n=n>(x-y<=0?0-(x-y):x-y)?n:x-y<=0?0-(x-y):x-y);return n}function wke(e,n){var i,u,l;if(ot(n)===ot(Pt(e)))return!0;if(!qe(n,20)||(u=v(n,20),l=e.Y(),l!=u.Y()))return!1;if(qe(u,63)){for(i=0;i<l;i++)if(!Cf(e.sb(i),u.sb(i)))return!1;return!0}else return exe(e.mb(),u.mb())}function yte(e,n){var i,u,l,g,y,x,_,C;if(l=e.b[n.k],l>=0)return l;for(g=1,x=new V(n.f);x.a<x.c.c.length;)for(y=v(q(x),7),u=new V(y.e);u.a<u.c.c.length;)i=v(q(u),12),C=i.d.f,n!=C&&(_=yte(e,C),g=g>_+1?g:_+1);return g2e(e,n,g),g}function mte(e,n,i){var u,l,g,y,x,_;if(u=0,e.b!=0&&n.b!=0){g=gn(e,0),y=gn(n,0),x=Oe(qt(on(g))),_=Oe(qt(on(y))),l=!0;do x>_-i&&x<_+i&&++u,x<=_&&g.b!=g.d.c?x=Oe(qt(on(g))):_<=x&&y.b!=y.d.c?_=Oe(qt(on(y))):l=!1;while(l)}return u}function xke(e,n){switch(cj(e)){case 5:return Go(n);case 6:return Fh(n);case 7:return Yh(n);case 0:return $k(n,e.__elementTypeId$);case 2:return Kx(n)&&n.ad!==a;case 1:return Kx(n)&&n.ad!==a||$k(n,e.__elementTypeId$);default:return!0}}function kke(e,n){var i,u,l,g,y;return n&=63,i=e.h,u=(i&524288)!=0,u&&(i|=-1048576),n<22?(y=i>>n,g=e.m>>n|i<<22-n,l=e.l>>n|e.m<<22-n):n<44?(y=u?Sc:0,g=i>>n-22,l=e.m>>n-22|i<<44-n):(y=u?Sc:0,g=u?fo:0,l=i>>n-44),pc(l&fo,g&fo,y&Sc)}function wte(e,n){switch(e.e){case 1:switch(n.e){case 1:return 1;case 4:return 2;case 3:return 3;case 2:return 4}break;case 2:switch(n.e){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4}break;default:throw new wn(mI)}return 0}function _ke(e,n,i){var u,l,g,y,x,_;u=new Ye,u.c[u.c.length]=n,_=n,x=0;do _=CCe(e,_),_&&(u.c[u.c.length]=_),++x;while(_);for(y=(i-(u.c.length-1)*e.d.d)/u.c.length,g=new V(u);g.a<g.c.c.length;)l=v(q(g),9),l.j.a=y;return new Er(St(x),y)}function Eke(e,n,i){var u,l,g,y,x,_;u=new Ye,u.c[u.c.length]=n,_=n,x=0;do _=fCe(e,_),_&&(u.c[u.c.length]=_),++x;while(_);for(y=(i-(u.c.length-1)*e.d.d)/u.c.length,g=new V(u);g.a<g.c.c.length;)l=v(q(g),9),l.j.a=y;return new Er(St(x),y)}function Cke(e){var n,i,u,l,g,y;for(l=v(ut(e.f,0),7),y=0,u=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[new sp(l),new Sh(l)]))))));Bt(u);)i=v(It(u),7),y+=i.f.i.a+i.i.a+i.a.a;n=v(J(e,(Fe(),zu)),10),g=n?n.a:0,e.i.a=y/(l.b.c.length+l.e.c.length)-g}function Pke(e,n){var i,u,l,g;if(n<2*e.c)throw new wn("The knot vector must have at least two time the dimension elements.");for(e.j=0,e.i=1,u=0;u<e.c;u++)e.g.ib(0);for(g=n+1-2*e.c,l=1;l<g;l++)e.g.ib(l/g);if(e.e)for(i=0;i<e.c;i++)e.g.ib(1)}function yA(e){var n,i;return i=e.c,e.c=0,yZ(e.f,e.i),e.e?e.g?e.e.d>=e.g.d?(n=e.f,n.e=HJ(e.e,n),n.g=e.g,n.a=e.a-1,n.j=kc(e.j,i),Ru(n)):(n=e.i,n.g=zJ(e.g,n),n.e=e.e,n.a=e.a-1,n.j=kc(e.j,i),Ru(n)):e.e:e.g}function Ske(e){var n,i,u,l,g,y;for(l=new V(e.a);l.a<l.c.c.length;)u=v(q(l),9),u.g==(pt(),fr)&&(g=v(J(u,(Ce(),$l)),9),i=u.f,n=(On(0,i.c.length),v(i.c[0],7)),y=v(J(n,_t),7),y.g==(De(),bt)&&u.k>g.k?Qt(y,kt):y.g==kt&&g.k>u.k&&Qt(y,bt))}function Nke(e,n,i){var u,l,g,y,x,_,C;for(C=e.b,y=0,g=new V(e.a.b);g.a<g.c.c.length;)l=v(q(g),33),y=Xe(y,l.j.a);return _=kCe(e.a.c,e.a.d,n,i,y),ba(e.a.a,Fk(_)),x=aA(e.a.b,_.a,C),u=new Db((!_.k&&(_.k=new Xk(_k(_))),_.k)),D7(u),x?M7(u,x):u}function Tke(e,n,i){var u,l,g,y,x,_,C;u=i,l=n;do l=e.a[l.k],y=(C=e.f[l.k],Oe(e.n[C.k])+Oe(e.d[l.k])-l.e.d),x=Lme(l,l.d?Vi(l.d.a,l,0):-1),x&&(g=(_=e.f[x.k],Oe(e.n[_.k])+Oe(e.d[x.k])+x.j.b+x.e.a),u=dn(u,y-(g+Nb(e.j,l,x))));while(n!=l);return u}function Mke(e,n,i){var u,l,g,y,x,_,C;u=i,l=n;do l=e.a[l.k],g=(C=e.f[l.k],Oe(e.n[C.k])+Oe(e.d[l.k])+l.j.b+l.e.a),x=cwe(l,l.d?Vi(l.d.a,l,0):-1),x&&(y=(_=e.f[x.k],Oe(e.n[_.k])+Oe(e.d[x.k])-x.e.d),u=dn(u,y-(g+Nb(e.j,l,x))));while(n!=l);return u}function mA(e,n,i){var u,l,g;if(yi(i,uI),i==0)return jy(e,n);g=e.c.a,l=Ae(ar,rr,26,1,12,1);try{if(!Pb(e.b,n)||!g)return 0;u=IA(g,e.d,n,i,l)}catch(y){if(y=ni(y),qe(y,119)||qe(y,76))return 0;throw ri(y)}return V1(e.c,g,u),l[0]}function jke(e,n){var i,u,l,g,y;return e.b?(u=v(hr(e.e,(Fe(),kv)),65),l=u.b+u.c,i=u.d+u.a):(l=n*2,i=n*2),y=Xe(e.o[1]>0?l+e.i[1]*n+e.n[1]:0,e.o[3]>0?l+e.i[3]*n+e.n[3]:0),g=Xe(e.o[4]>0?i+e.i[4]*n+e.n[4]:0,e.o[2]>0?i+e.i[2]*n+e.n[2]:0),new wt(y,g)}function xte(e){var n,i,u,l,g,y;for(y=v(nr(e.a,Ae(Nr,Zi,9,e.a.c.length,0,1)),51),F6(y,new Ot),i=null,l=0,g=y.length;l<g&&(u=y[l],u.g==(pt(),Dn));++l)n=v(J(u,(Ce(),$r)),32),!(n!=(De(),ct)&&n!=at)&&(i&&v(J(i,Td),20).ib(u),i=u)}function nv(e,n,i,u,l){var g,y,x,_;for(_=new fl(n,u),x=Tl(_);x.G();)g=v(x.H(),7),kn(e.k,g,St(v(ln(e.k,g),24).a+v(bi(vi(l.d,i)),24).a));for(_=new fl(i,u),y=Tl(_);y.G();)g=v(y.H(),7),kn(e.k,g,St(v(ln(e.k,g),24).a-v(bi(vi(l.d,n)),24).a))}function W(e,n,i){var u=Jy,l,g=u[e],y=g instanceof Array?g[0]:null;g&&!y?E=g:(E=(l=n&&n.prototype,!l&&(l=Jy[n]),Oye(l)),E._c=i,E.constructor=E,!n&&(E.ad=a),u[e]=E);for(var x=3;x<arguments.length;++x)arguments[x].prototype=E;y&&(E.$c=y)}function Ake(e){if(e.Sc()){var n=e.c;n.Tc()?e.n="["+n.k:n.Sc()?e.n="["+n.Qc():e.n="[L"+n.Qc()+";",e.b=n.Pc()+"[]",e.j=n.Rc()+"[]";return}var i=e.i,u=e.d;u=u.split("/"),e.n=qk(".",[i,qk("$",u)]),e.b=qk(".",[i,qk(".",u)]),e.j=u[u.length-1]}function wA(e,n,i){var u;if(!i)return 0;if(u=e.d.$b(e.b.g,i.b),u>0)return wA(e,n,i.g);if(u==0)switch(e.b.f.e){case 0:return Or(n._b(i),n.ac(i.g));case 1:return n.ac(i.g);default:throw new QM}else return Or(Or(n.ac(i.g),n._b(i)),wA(e,n,i.e))}function xA(e,n,i){var u;if(!i)return 0;if(u=e.d.$b(e.b.e,i.b),u<0)return xA(e,n,i.e);if(u==0)switch(e.b.d.e){case 0:return Or(n._b(i),n.ac(i.e));case 1:return n.ac(i.e);default:throw new QM}else return Or(Or(n.ac(i.e),n._b(i)),xA(e,n,i.g))}function kte(e,n,i,u){var l,g,y,x;return y=new lo(e),io(y,(pt(),Pn)),_e(y,(Ce(),_t),n),_e(y,(Fe(),Ct),(Zn(),fi)),_e(y,Ki,i),_e(y,Ii,u),g=new Xn,Qt(g,(De(),ct)),_n(g,y),x=new Xn,Qt(x,at),_n(x,y),An(n,g),l=new Hs,Du(l,n),_e(l,ir,null),qn(l,x),An(l,u),y}function _te(e,n){var i,u,l,g,y,x,_,C,N,A;for(i=0,y=e.j,x=0,_=y.length;x<_;++x)for(g=y[x],A=new fl(g,n),N=Tl(A);N.G();)for(C=v(N.H(),7),l=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[C.b,C.e]))))));Bt(l);)u=v(It(l),12),xl(u)||(i+=Tte(e,u,C));return i}function Ike(e,n){return e.c<n.c?-1:e.c>n.c?1:e.b<n.b?-1:e.b>n.b?1:e.a!=n.a?hc(e.a)-hc(n.a):e.d==(ay(),Uv)&&n.d==zv?-1:e.d==zv&&n.d==Uv?1:0}function Lke(e){var n,i,u,l,g,y;for(l=new ti,u=new V(e.d.a);u.a<u.c.c.length;)i=v(q(u),61),i.c.c.length==0&&Cr(l,i,l.c.b,l.c);if(l.b>1)for(n=_b(b6(new lp,e.b++),e.d),y=gn(l,0);y.b!=y.d.c;)g=v(on(y),61),ud(Lh(Dh(Bh(Oh(new hf,1),0),n),g))}function Oke(e,n,i,u){var l,g,y,x,_,C;for(C=0,y=new V(e.a.b);y.a<y.c.c.length;)g=v(q(y),33),C=Xe(C,g.j.a);return _=tCe(e.a.c,n,e.a.d,u,Vj(e.b),i),ba(e.a.a,Fk(_)),x=aA(e.a.b,_.a,e.b),l=new Db((!_.k&&(_.k=new Xk(_k(_))),_.k)),D7(l),x?M7(l,x):l}function l_(e,n){var i,u,l,g,y;for(u=new V(e.b);u.a<u.c.c.length;)i=v(q(u),33),_e(i,(Ce(),jo),n);for(y=new V(e.c.c);y.a<y.c.c.length;)l=v(q(y),33),_e(l,(Ce(),jo),n);for(g=new V(e.d.c);g.a<g.c.c.length;)l=v(q(g),33),_e(l,(Ce(),jo),n)}function Nl(){Nl=s,wm=new bf(Zp,0),Rv=new bf("NIKOLOV",1),Gv=new bf("NIKOLOV_PIXEL",2),JL=new bf("NIKOLOV_IMPROVED",3),XL=new bf("NIKOLOV_IMPROVED_PIXEL",4),WL=new bf("DUMMYNODE_PERCENTAGE",5),e9=new bf("NODECOUNT_PERCENTAGE",6),xm=new bf("NO_BOUNDARY",7)}function Ete(e,n){var i,u,l,g,y;if(g=0,y=v(bi(vi(n.d,e)),24),!y)return 0;for(l=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[e.b,e.e]))))));Bt(l);)u=v(It(l),12),u.c==e?i=v(ln(n,u.d),24):i=v(ln(n,u.c),24),i&&y.a>i.a&&(g=ui(g,y.a-i.a-1));return g}function Dke(e){var n,i;switch(n=v(J(e,(Fe(),eg)),15).a,i=v(J(e,tg),15).a,_e(e,tg,new cn(n)),_e(e,eg,new cn(i)),v(J(e,Mo),103).e){case 1:_e(e,Mo,(fs(),um));break;case 2:_e(e,Mo,(fs(),im));break;case 3:_e(e,Mo,(fs(),om));break;case 4:_e(e,Mo,(fs(),sm))}}function Bke(e){var n,i,u,l,g;for(l=(Qn(),new ns(rs(Rs(e.a,new w))));Bt(l);)for(u=v(It(l),9),u.g==(pt(),go)&&(g=ree(u)?(na(),vu):(na(),ms),_e(u,(Ce(),jo),g)),i=Ht(In(u));Bt(i);)n=v(It(i),12),g=Gt(Oe(Yt(J(n,(Ce(),wu)))))?(na(),ms):(na(),vu),l_(n,g)}function Rke(e){var n,i,u,l,g;for(l=(Qn(),new ns(rs(Rs(e.a,new w))));Bt(l);)for(u=v(It(l),9),u.g==(pt(),go)&&(g=ree(u)?(na(),ms):(na(),vu),_e(u,(Ce(),jo),g)),i=Ht(In(u));Bt(i);)n=v(It(i),12),g=Gt(Oe(Yt(J(n,(Ce(),wu)))))?(na(),vu):(na(),ms),l_(n,g)}function kA(e,n,i){var u,l,g;for(g=new V(e.e);g.a<g.c.c.length;)u=v(q(g),118),u.b.d<0&&u.c>0&&(u.b.c-=u.c,u.b.c<=0&&u.b.f>0&&vn(n,u.b));for(l=new V(e.b);l.a<l.c.c.length;)u=v(q(l),118),u.a.d<0&&u.c>0&&(u.a.f-=u.c,u.a.f<=0&&u.a.c>0&&vn(i,u.a))}function _A(e,n,i){var u,l,g;for(g=new V(e.j);g.a<g.c.c.length;)u=v(q(g),117),u.b.i<0&&u.c>0&&(u.b.e-=u.c,u.b.e<=0&&u.b.k>0&&vn(n,u.b));for(l=new V(e.d);l.a<l.c.c.length;)u=v(q(l),117),u.a.i<0&&u.c>0&&(u.a.k-=u.c,u.a.k<=0&&u.a.e>0&&vn(i,u.a))}function Gke(e){var n,i,u,l,g;switch(g=e.d.c+e.e.c,g){case 0:return dZ(),Ore;case 1:return u=v(qee(new Af(new Tu(e).a)),21),d1e(u.yb(),u.zb());default:for(l=(Fn(),new jp),i=new Af(new Tu(e).a);i.b;)n=Lp(i),$b(l,Pt(n.yb()),Pt(n.zb()));return new f6(l)}}function Hke(e,n,i){var u,l,g;for(l=new V(e.b.a.b);l.a<l.c.c.length;)u=v(q(l),25),n.D(u)&&(g=Oe(qt(i.B(u))),g>0&&(!(gf(e.b.d)&&u.q.d)&&!(J2(e.b.d)&&u.q.b)&&(u.j.e+=0>g/2-.5?0:g/2-.5),!(gf(e.b.d)&&u.q.a)&&!(J2(e.b.d)&&u.q.c)&&(u.j.b-=g-1)))}function zke(e,n){switch(e.e){case 1:switch(n.e){case 1:return wI;case 4:return .5;case 3:return xI;case 2:return vre}break;case 2:switch(n.e){case 1:return wI;case 2:return .5;case 3:return xI;case 4:return vre}break;default:throw new wn(mI)}return 0}function f_(e,n){var i,u,l,g;for(g=new Cn(e,0),i=(xt(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),48));g.b<g.d.Y();)u=(xt(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),48)),l=new u7(u.c,i.d,n),xt(g.b>0),g.a.sb(g.c=--g.b),ju(g,l),xt(g.b<g.d.Y()),g.d.sb(g.c=g.b++),l.a=!1,i=u}function Cte(e){var n,i,u,l,g,y;for(l=v(J(e,(Ce(),Mm)),7),y=new V(e.f);y.a<y.c.c.length;){for(g=v(q(y),7),u=new V(g.e);u.a<u.c.c.length;)return n=v(q(u),12),An(n,l),g;for(i=new V(g.b);i.a<i.c.c.length;)return n=v(q(i),12),qn(n,l),g}return null}function Pte(e,n,i,u,l){var g,y,x,_,C,N;for(y=n,g=0,x=!1,N=new fl(i,u),C=Tl(N);C.G();)_=v(C.H(),7),x=!0,kn(e.k,_,St(y)),(Ci(v(J(i,(Fe(),Ct)),28))||_.b.c.length+_.e.c.length>1)&&(++g,++y);return!Ci(v(J(i,(Fe(),Ct)),28))&&x&&(++g,++y),kn(l,i,St(g)),y}function Ste(e){var n,i,u,l,g,y,x,_,C,N,A,O;for(y=e.b.mb(),x=v(y.H(),92),N=x.a.a,C=N>Bl,_=N<Wy;y.G();){if(i=x,g=N,l=C,u=_,x=v(y.H(),92),N=x.a.a,C=N>Bl,_=N<Wy,!(C||_))return Hb(x.b);if(l&&_||u&&C)return n=g/(g-N),A=Hb(i.b),O=Hb(x.b),n*A+(1-n)*O}return 0}function Nte(e){var n,i,u,l,g,y,x,_,C,N,A,O;for(y=e.b.mb(),x=v(y.H(),92),N=x.a.b,C=N>Bl,_=N<Wy;y.G();){if(i=x,g=N,l=C,u=_,x=v(y.H(),92),N=x.a.b,C=N>Bl,_=N<Wy,!(C||_))return Hb(x.b);if(l&&_||u&&C)return n=g/(g-N),A=Hb(i.b),O=Hb(x.b),n*A+(1-n)*O}return 0}function Tte(e,n,i){var u,l;return u=0,Wx(n)?al(e.g,n)?(mA(e.i,St(ll(e,n.c)),1)>0,mA(e.i,St(ll(e,n.d)),1)>0,Ex(e.g,n),u+=B2e(e,n,e.i)):(Tn(e.g,n),Dy(e.i,St(ll(e,n.c)),1),Dy(e.i,St(ll(e,n.d)),1)):(l=jy(e.i,St(v(ln(e.k,i),24).a)),u+=e.g.a.Y()-l),u}function Uke(e){switch(e.e){case 0:return coe;case 1:return ooe;case 2:return aoe;case 3:return hoe;case 4:return foe;case 5:return voe;case 6:return boe;case 7:return loe;case 8:return soe;case 9:return uoe;case 11:return poe;case 10:return doe;default:return goe}}function Ry(e){switch(e.e){case 0:return $o;case 1:return Xs;case 2:return Bc;case 3:return Vu;case 4:return qu;case 5:return xs;case 6:return Hc;case 7:return Gc;case 8:return Rc;case 9:return ws;case 10:return Zl;case 11:return Zu;default:return $f}}function rv(e){switch(e.e){case 0:return xs;case 1:return Hc;case 2:return Gc;case 3:return $o;case 4:return Xs;case 5:return Bc;case 6:return Vu;case 7:return qu;case 8:return Rc;case 9:return ws;case 10:return Zl;case 11:return Zu;default:return $f}}function EA(e){switch(e.e){case 0:return Bc;case 1:return Vu;case 2:return qu;case 3:return xs;case 4:return Hc;case 5:return Gc;case 6:return $o;case 7:return Xs;case 8:return Rc;case 9:return ws;case 10:return Zl;case 11:return Zu;default:return $f}}function Fke(e){var n,i,u,l,g,y,x,_;for(i=(Fn(),new jp),x=new Ux((is(),new Eo(e.f))),y=(l=new un(x.a).a.bb().mb(),new hn(l));y.a.G();){if(g=(u=v(y.a.H(),21),v(u.yb(),9)),!g){wf();break}_=e.i[g.k],n=v(yk(i,_),20),n||(n=new Ye,$b(i,_,n)),n.ib(g)}return i}function Yke(e,n,i){var u,l,g;for(l=new V(e.b.a.b);l.a<l.c.c.length;)u=v(q(l),25),n.D(u)&&(g=Oe(qt(i.B(u))),g>0&&(!(gf(e.b.d)&&u.q.d)&&!(J2(e.b.d)&&u.q.b)&&(u.j.e-=0>g/2-.5?0:g/2-.5),!(gf(e.b.d)&&u.q.a)&&!(J2(e.b.d)&&u.q.c)&&(u.j.b+=0>g-1?0:g-1)))}function Tl(e){var n,i,u;switch(u=e.a.f,e.b){case 0:return new V(e.a.f);case 1:return kf((i=new F7(u),i),eA(e));case 2:switch(e.c.e){case 2:case 1:return kf(new V(u),eA(e));case 3:case 4:return kf((n=new F7(u),n),eA(e))}}throw new Mh("PortOrder not implemented.")}function Vke(e,n){var i;e.d&&(n.c!=e.e.c||iwe(e.e.b,n.b))&&($e(e.f,e.d),e.a=e.d.d+e.d.c,e.d=null,e.e=null),R0e(n.b)?e.c=n:e.b=n,(n.b==(zb(),Oc)&&!n.a||n.b==Yl&&n.a||n.b==Zf&&n.a||n.b==Vl&&!n.a)&&e.c&&e.b&&(i=new so(e.a,e.c.d,n.c-e.a,e.b.d-e.c.d),e.d=i,e.e=n)}function Ml(e,n,i,u){this.e=e,this.j=v(J(e,(Ce(),Wl)),134),this.f=Ae(Nr,Zi,9,n,0,1),this.b=Ae(Kv,Rr,184,n,6,1),this.a=Ae(Nr,Zi,9,n,0,1),this.d=Ae(Kv,Rr,184,n,6,1),this.i=Ae(Nr,Zi,9,n,0,1),this.g=Ae(Kv,Rr,184,n,6,1),this.n=Ae(Kv,Rr,184,n,6,1),this.k=i,this.c=u}function qke(e,n,i){var u,l;if(n.g==(pt(),fr)&&i.g==fr){if(!Ci(v(J(v(J(n,(Ce(),_t)),9),(Fe(),Ct)),28))||v(J(n,_t),9)!=v(J(i,_t),9))return;if(fee(n)||fee(i)){e.d=1,e.b=1;return}l=v(ut(n.f,0),7).g,u=v(ut(i.f,0),7).g,pk(n).g==(De(),bt)?Mte(e,n,i,l,u):Mte(e,i,n,u,l)}}function ud(e){if(!e.a.c||!e.a.d)throw new oc((mf(gae),gae.j+" must have a source and target "+(mf(s9),s9.j)+" specified."));if(e.a.c==e.a.d)throw new oc("Network simplex does not support self-loops: "+e.a+" "+e.a.c+" "+e.a.d);return bc(e.a.c.g,e.a),bc(e.a.d.c,e.a),e.a}function Mte(e,n,i,u,l){u==(De(),at)&&l==at?Wh(e,n)>Wh(e,i)?e.d=id(e,i):e.b=id(e,n):u==ct&&l==ct?Wh(e,n)<Wh(e,i)?e.d=id(e,i):e.b=id(e,n):u==ct&&l==at?Wh(e,n)>Wh(e,i)&&(e.d=id(e,i),e.b=id(e,n)):Wh(e,n)<Wh(e,i)&&(e.d=id(e,i),e.b=id(e,n))}function Zke(e){var n,i,u,l,g,y,x,_;for(_=e.f.c.length,i=0,n=_,l=2*_,x=new V(e.f);x.a<x.c.c.length;)switch(y=v(q(x),7),y.g.e){case 2:case 4:y.k=-1;break;case 1:case 3:u=y.b.c.length,g=y.e.c.length,u>0&&g>0?y.k=n++:u>0?y.k=i++:g>0?y.k=l++:y.k=i++}uo(e.f,new da)}function $ke(e,n,i,u){var l,g,y,x,_;i.d.f!=n.f&&(l=new lo(e),io(l,(pt(),Pn)),_e(l,(Ce(),_t),i),_e(l,(Fe(),Ct),(Zn(),fi)),u.c[u.c.length]=l,y=new Xn,_n(y,l),Qt(y,(De(),ct)),x=new Xn,_n(x,l),Qt(x,at),_=i.d,An(i,y),g=new Hs,Du(g,i),_e(g,ir,null),qn(g,x),An(g,_),ste(l,y,x))}function Kke(e){var n,i,u,l,g,y,x,_,C;for(y=hs,_=hs,x=null,i=new Xx(new L2(e.e));i.b!=i.c.a.b;)if(n=tj(i),v(n.d,60).c==1&&(u=v(n.e,116).a,C=v(n.e,116).b,l=y-u>Tc,g=u-y<Tc&&_-C>Tc,(l||g)&&(_=v(n.e,116).b,y=v(n.e,116).a,x=v(n.d,60),_==0&&y==0)))return x;return x}function jte(e,n){var i,u,l,g,y,x;return g=e.d,x=v(J(e,(Fe(),gs)),15).a,x<0&&(x=0,_e(e,gs,new cn(x))),n.j.b=x,y=Math.floor(x/2),u=new Xn,Qt(u,(De(),ct)),_n(u,n),u.i.b=y,l=new Xn,Qt(l,at),_n(l,n),l.i.b=y,An(e,u),i=new Hs,Du(i,e),_e(i,ir,null),qn(i,l),An(i,g),rxe(n,e,i),Exe(e,i),i}function Qke(e){var n,i;i=v(J(e,(Wt(),Tr)),85),n=v(J(e,(Ce(),mu)),140),i==(ra(),Uc)?(_e(e,Tr,eh),_e(e,mu,(Fs(),Jf))):i==Ku?(_e(e,Tr,eh),_e(e,mu,(Fs(),Sd))):n==(Fs(),Jf)?(_e(e,Tr,Uc),_e(e,mu,Tm)):n==Sd&&(_e(e,Tr,Ku),_e(e,mu,Tm))}function Wke(e){var n,i,u,l,g;for(u=new V(Kb(e.e));u.a<u.c.c.length;)i=v(q(u),129),g=new tr(i.e.i),l=Hj()[i.e.k],n=v(Qh(e.c,l),283),g.b=n.e+n.a,l.b==(hk(),Ic)?g.a=n.d:l.b==Cd?g.a=n.d+(n.c-i.e.j.a)/2:l.b==Lc&&(g.a=n.d+n.c-i.e.j.a),i.e.i.a=g.a,i.e.i.b=g.b,n.a+=i.e.j.b+e.d}function Jke(e){var n,i,u;for(i=new V(Ec(e));i.a<i.c.c.length;){switch(n=v(q(i),161),u=new tr(n.e.i),v(n.e,7).g.e){case 4:u.a=0,u.b=e.e.j.b/2;break;case 2:u.a=e.e.j.a,u.b=e.e.j.b/2;break;case 1:u.a=e.e.j.a/2,u.b=0;break;case 3:u.a=e.e.j.a/2,u.b=e.e.j.b}n.e.i.a=u.a,n.e.i.b=u.b}}function Ate(){this.c=Ae(fa,Ti,26,(De(),be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct])).length,12,1),this.b=Ae(fa,Ti,26,be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct]).length,12,1),this.a=Ae(fa,Ti,26,be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct]).length,12,1),vx(this.c,ji),vx(this.b,Zr),vx(this.a,Zr)}function Ite(e,n,i){var u,l,g,y,x,_,C,N;for(g=Oe(qt(e.b.mb().H())),C=Oe(qt(PJ(n.b))),u=as(ao(e.a),C-i),l=as(ao(n.a),i-g),N=Nn(u,l),as(N,1/(C-g)),this.a=N,this.b=new Ye,x=!0,y=e.b.mb(),y.H();y.G();)_=Oe(qt(y.H())),x&&_-i>Bl&&(this.b.ib(i),x=!1),this.b.ib(_);x&&this.b.ib(i)}function Xke(e){var n,i,u,l;if(S_e(e,e.n),e.d.c.length>0){for(lb(e.c);gA(e,v(q(new V(e.e.a)),61))<e.e.a.c.length;){for(n=cxe(e),l=n.d.e-n.c.e-n.a,n.d.j&&(l=-l),u=new V(e.e.a);u.a<u.c.c.length;)i=v(q(u),61),i.j&&(i.e+=l);lb(e.c)}lb(e.c),uA(e,v(q(new V(e.e.a)),61)),wne(e)}}function e_e(e,n){var i,u,l,g,y,x,_;for(i=Zr,x=(pt(),$n),l=new V(n.a);l.a<l.c.c.length;)u=v(q(l),9),g=u.g,g!=$n&&(y=qt(J(u,(Ce(),R9))),y==null?(i=i>0?i:0,u.i.b=i+Lx(e.a,g,x)):u.i.b=(xr(y),y)),_=Lx(e.a,g,x),u.i.b<i+_+u.e.d&&(u.i.b=i+_+u.e.d),i=u.i.b+u.j.b+u.e.a,x=g}function Lte(e,n,i){var u,l,g;for(i.db(n,e),$e(e.g,n),g=e.o.d.Lc(n),BZ(e.k)?e.k=g:e.k=dn(e.k,g),BZ(e.a)?e.a=g:e.a=Xe(e.a,g),n.g==e.o.d.Mc()?RX(e.j,g):RX(e.n,g),l=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[new sp(n),new Sh(n)]))))));Bt(l);)u=v(It(l),7),i.R(u)||Lte(e,u,i)}function t_e(e){var n,i,u,l,g;for(u=(Ln(),e.length),l=u>0&&(e.charCodeAt(0)==45||e.charCodeAt(0)==43)?1:0,n=l;n<u;n++)if(qwe(e.charCodeAt(n))==-1)throw new c1(x_+e+'"');if(g=parseInt(e,10),i=g<hu,isNaN(g))throw new c1(x_+e+'"');if(i||g>Sr)throw new c1(x_+e+'"');return g}function n_e(e,n,i,u){var l,g,y,x;for(l=v(lr(n,(De(),ct)).mb().H(),7),g=v(lr(n,at).mb().H(),7),x=new V(e.f);x.a<x.c.c.length;){for(y=v(q(x),7);y.b.c.length!=0;)An(v(ut(y.b,0),12),l);for(;y.e.c.length!=0;)qn(v(ut(y.e,0),12),g)}i||_e(n,(Ce(),Ki),null),u||_e(n,(Ce(),Ii),null)}function r_e(e){var n,i,u,l,g,y,x;for(x=new OW,y=new V(e.b);y.a<y.c.c.length;)if(g=v(q(y),9),g.g!=(pt(),Dn)){for(dke(x,g,new Wr),l=Ht(In(g));Bt(l);)if(u=v(It(l),12),!(u.c.f.g==Dn||u.d.f.g==Dn))for(i=gn(u.a,0);i.b!=i.d.c;)n=v(on(i),10),Dp(x,new Rh(n.a,n.b))}return x}function iv(e,n,i,u){var l,g,y;if(this.e=new Hi,this.a=e,this.b=n,e.b<n.b?(this.j=e.a,this.k=e.b,this.n=n.b):(this.j=n.a,this.k=n.b,this.n=e.b),l=v(J(u,(Fe(),ir)),44),l)for(y=gn(l,0);y.b!=y.d.c;)g=v(on(y),10),rj(g.a,e.a)&&vn(this.e,g);this.g=i,this.g&&(this.i=this.j-i.j.d),this.f=u}function jl(e){za();var n,i,u,l,g,y;for(y=new ta,Fb(y,e),i=(g=new un(y.a).a.bb().mb(),new hn(g));i.a.G();)n=(u=v(i.a.H(),21),u.yb()),Pt(n);switch(y.a.Y()){case 0:return Kh(),Jp;case 1:return new cc((l=new un(y.a).a.bb().mb(),u=v(new hn(l).a.H(),21),u.yb()));default:return new ux(y)}}function Gy(e,n,i,u){var l,g,y;co(e,i,"x",n.i.a+u.a),co(e,i,"y",n.i.b+u.b),co(e,i,N_,n.j.a),co(e,i,T_,n.j.b),qe(n,9)&&v(J(n,(Fe(),Tv)),86).kb((sd(),cE))&&(l=v(n,9).b,y=zn(i,M_),y||(y=new df,Va(i,M_,y)),g=y.kc(),co(e,g,"left",l.b),co(e,g,"top",l.d),co(e,g,"right",l.c),co(e,g,hI,l.a))}function Ote(e,n){var i,u,l,g,y,x,_,C,N,A;for(y=n==1?gE:pE,g=(_=new un(y.a).a.bb().mb(),new hn(_));g.a.G();)for(l=(x=v(g.a.H(),21),v(x.yb(),59)),N=v(Za(e.f.c,l),18).mb();N.G();)switch(C=v(N.H(),27),u=v(C.b,25),A=v(C.a,78),i=A.c,l.e){case 2:case 1:u.j.e+=i;break;case 4:case 3:u.j.d+=i}}function i_e(e,n){var i,u,l;n.a?(P7(e.b,n.b),e.a[n.b.k]=v(yK(e.b,n.b),25),i=v(vK(e.b,n.b),25),i&&(e.a[i.k]=n.b)):(u=v(yK(e.b,n.b),25),u&&u==e.a[n.b.k]&&u.f&&u.f!=n.b.f&&u.i.ib(n.b),l=v(vK(e.b,n.b),25),l&&e.a[l.k]==n.b&&l.f&&l.f!=n.b.f&&n.b.i.ib(l),BK(e.b,n.b))}function a_e(e,n){var i,u,l,g,y,x,_;for(l=new Ye,i=0;i<=e.i;i++)u=new bl(n),u.k=e.i-i,l.c[l.c.length]=u;for(x=new V(e.o);x.a<x.c.c.length;)y=v(q(x),9),Fr(y,v(ut(l,e.i-e.f[y.k]),16));for(g=new V(l);g.a<g.c.c.length;)_=v(q(g),16),_.a.c.length==0&&Sp(g);n.c.c=Ae(ht,et,1,0,4,1),Bn(n.c,l)}function o_e(e){var n,i,u,l;for(e.a.a.c=Ae(ht,et,1,0,4,1),u=new V(e.a.b);u.a<u.c.c.length;)n=v(q(u),25),n.f=null;for(l=new V(e.a.b);l.a<l.c.c.length;)n=v(q(l),25),!n.o&&$e(e.a.a,new Ey(be(ve(fm,1),et,25,0,[n])));for(i=new V(e.a.b);i.a<i.c.c.length;)n=v(q(i),25),n.o&&by(n.o.f,n)}function av(e,n){var i,u,l,g;for(e=(Ln(),e??fu),i=(e.length+16*n.length,new V2),g=0,u=0;u<n.length&&(l=e.indexOf("%s",g),l!=-1);)qW(i,e,g,l),fc(i,n[u++]),g=l+2;if(g1e(i,e,g,e.length),u<n.length){for(i.a+=" [",fc(i,n[u++]);u<n.length;)i.a+=", ",fc(i,n[u++]);i.a+="]"}return i.a}function Dte(e,n,i,u){var l,g;if(n){if(l=e.a.$b(i.d,n.d),l==0)return u.d=c7(n,i.e),u.b=!0,n;g=l<0?0:1,n.a[g]=Dte(e,n.a[g],i,u),uc(n.a[g])&&(uc(n.a[1-g])?(n.b=!0,n.a[0].b=!1,n.a[1].b=!1):uc(n.a[g].a[g])?n=py(n,1-g):uc(n.a[g].a[1-g])&&(n=EW(n,1-g)))}else return i;return n}function s_e(e,n){var i,u,l,g,y,x,_,C,N,A;for(_=xb(n.a),x=ur(m1(_/e.a)),A=n.a,y=0,C=x,g=0;g<e.a;++g)N=(Ln(),A.substr((0>y?0:y)<_?0>y?0:y:_,(0>(C<_?C:_)?0:C<_?C:_)-((0>y?0:y)<_?0>y?0:y:_))),y=C,C+=x,u=v(ut(e.c,g),9),i=new G6(N),i.j.b=n.j.b,Tt(e.b,n,i),$e(u.c,i);Ir(e.g.c,n),$e(e.i,(l=new _$(e,n),l))}function Bte(e,n,i){var u,l,g,y,x,_,C,N,A;for(n.k=1,g=n.d,A=Vs(n,(vr(),hi)).mb();A.G();)for(N=v(A.H(),7),l=new V(N.e);l.a<l.c.c.length;)u=v(q(l),12),C=u.d.f,n!=C&&(y=C.d,y.k<=g.k&&(x=g.k+1,x==i.c.c.length?(_=new bl(i),_.k=x,$e(i.c,_),Fr(C,_)):(_=v(ut(i.c,x),16),Fr(C,_)),Bte(e,C,i)))}function u_e(e){var n,i,u,l,g;for(n=e.e.j,u=new V(Ec(e));u.a<u.c.c.length;){switch(i=v(q(u),161),l=v(hr(i,(Fe(),Hl)),15),!l&&(l=new cn(0)),g=new tr(i.e.i),v(i.e,7).g.e){case 4:g.a=-i.e.j.a-l.a;break;case 2:g.a=n.a+l.a;break;case 1:g.b=-i.e.j.b-l.a;break;case 3:g.b=n.b+l.a}i.e.i.a=g.a,i.e.i.b=g.b}}function c_e(e){var n,i,u;u=v(J(e,(Fe(),ya)),18),!u.V()&&(i=(n=v(ea(Rn),11),new li(n,v(zi(n,n.length),11),0)),u.kb((Gu(),Ai))?mi(i,Ai):mi(i,ca),u.kb(sa)||mi(i,sa),u.kb(oa)?mi(i,Aa):u.kb(po)?mi(i,ja):u.kb(ua)&&mi(i,Ma),u.kb(Aa)?mi(i,oa):u.kb(ja)?mi(i,po):u.kb(Ma)&&mi(i,ua),_e(e,ya,i))}function Rte(e,n,i,u,l){var g,y,x,_,C,N,A,O,B,F;for(O=HX(e,i),_=0;_<n;_++){for(l.J(i),B=new Ye,F=v(u.H(),92),N=O+_;N<e.c;N++)x=F,F=v(u.H(),92),$e(B,new Ite(x,F,i));for(A=O+_;A<e.c;A++)u.M(),A>O+_&&u.I();for(y=new V(B);y.a<y.c.c.length;)g=v(q(y),92),u.J(g);if(_<n-1)for(C=O+_;C<e.c;C++)u.M()}}function l_e(e){var n,i,u,l;if(e.d&&v(e.e,7).f.g==(pt(),fr))return pn(),pn(),Fc;if(!e.a){for(e.a=new Ye,u=new V(v(e.e,7).b);u.a<u.c.c.length;)n=v(q(u),12),$e(e.a,new t1(n));if(e.d&&(l=v(J(v(e.e,7),(Ce(),eu)),9),l))for(i=Ht(Dr(l));Bt(i);)n=v(It(i),12),$e(e.a,new t1(n))}return e.a}function f_e(e){var n,i,u,l;if(e.d&&v(e.e,7).f.g==(pt(),fr))return pn(),pn(),Fc;if(!e.c){for(e.c=new Ye,u=new V(v(e.e,7).e);u.a<u.c.c.length;)n=v(q(u),12),$e(e.c,new t1(n));if(e.d&&(l=v(J(v(e.e,7),(Ce(),eu)),9),l))for(i=Ht(In(l));Bt(i);)n=v(It(i),12),$e(e.c,new t1(n))}return e.c}function h_e(e,n){var i,u,l,g,y,x,_,C;for(x=v(J(e,(Ce(),_t)),7),_=En(be(ve(Xt,1),Jt,10,0,[x.f.i,x.i,x.a])).a,C=e.f.i.b,i=v(nr(e.b,Ae(la,ia,12,e.b.c.length,0,1)),47),l=0,g=i.length;l<g;++l)u=i[l],An(u,x),X2(u.a,new wt(_,C)),n&&(y=v(J(u,(Fe(),ir)),44),y||(y=new Hi,_e(u,ir,y)),vn(y,new wt(_,C)))}function d_e(e,n){var i,u,l,g,y,x,_,C;for(l=v(J(e,(Ce(),_t)),7),_=En(be(ve(Xt,1),Jt,10,0,[l.f.i,l.i,l.a])).a,C=e.f.i.b,i=v(nr(e.e,Ae(la,ia,12,e.e.c.length,0,1)),47),y=0,x=i.length;y<x;++y)g=i[y],qn(g,l),m$(g.a,new wt(_,C)),n&&(u=v(J(g,(Fe(),ir)),44),u||(u=new Hi,_e(g,ir,u)),vn(u,new wt(_,C)))}function p_e(e){var n,i,u,l,g,y,x,_,C;for(y=hs,_=hs,x=null,i=new Xx(new L2(e.e));i.b!=i.c.a.b;)if(n=tj(i),(ot(n.d)===ot((Ni(),ws))||ot(n.d)===ot(Rc))&&(u=v(n.e,116).a,C=v(n.e,116).b,l=y-u>Tc,g=u-y<Tc&&_-C>Tc,(l||g)&&(_=v(n.e,116).b,y=v(n.e,116).a,x=v(n.d,60),_==0&&y==0)))return x;return x}function g_e(e,n){var i,u,l,g,y;e.d=n,No(e.b),e.c=!1;e:for(u=new V(e.d.c);u.a<u.c.c.length;)for(i=v(q(u),16),g=new V(i.a);g.a<g.c.c.length;)if(l=v(q(g),9),!Ib(Xb(l))){e.c=!0;break e}return y=an((Jn(),qo),be(ve(wv,1),Ke,59,0,[Ka,aa])),e.c||(mi(y,bu),mi(y,Qs)),e.a=new C7(y),i3e(e),e.a}function Gte(){var e,n,i,u,l;for(this.e=(Fn(),new jp),this.b=(i=v(ea(ig),11),new li(i,v(zi(i,i.length),11),0)),this.c=(u=v(ea(ig),11),new li(u,v(zi(u,u.length),11),0)),this.a=(l=v(ea(ig),11),new li(l,v(zi(l,l.length),11),0)),n=(Ni(),Ni(),noe).mb();n.G();)e=v(n.H(),60),$b(this.e,e,new zZ)}function b_e(e,n,i){var u,l,g,y,x,_;ci(e.k-e.a)<Hu||ci(n.k-n.a)<Hu||(u=mte(e.n,n.j,i),l=mte(n.n,e.j,i),g=Ok(e.n,n.k,n.a)+Ok(n.j,e.k,e.a),y=Ok(n.n,e.k,e.a)+Ok(e.j,n.k,n.a),x=16*u+g,_=16*l+y,x<_?new dy(e,n,_-x):x>_?new dy(n,e,x-_):x>0&&_>0&&(new dy(e,n,0),new dy(n,e,0)))}function Al(e,n){var i,u,l,g,y,x,_,C,N;for(C=new Ye,N=null,u=v(Qh(ql,e),20).mb();u.G();){for(i=v(u.H(),75),_=(g=new un(i.c.a).a.bb().mb(),new hn(g));_.a.G();)y=(l=v(_.a.H(),21),v(l.yb(),7)),ju(n,y),By(y,e.b);Bn(C,i.b),N=e.a}for(Ly(C),mk(C,N),x=new V(C);x.a<x.c.c.length;)y=v(q(x),7),ju(n,y)}function v_e(){var e={layout:function(n){TC(oCe(n))}};typeof document!==dv&&(r.$klay=e),t.exports&&(t.exports=e),typeof document===dv&&typeof self!==dv&&self.addEventListener("message",function(n){e.layout(n.data)},!1)}function ov(e,n,i,u,l){var g,y,x;x=l?u.b:u.a,(x>i.k&&x<i.a||i.j.b!=0&&i.n.b!=0&&(ci(x-Oe(qt(Sx(i.j))))<Hu&&ci(x-Oe(qt(Sx(i.n))))<Hu||ci(x-Oe(qt(M1(i.j))))<Hu&&ci(x-Oe(qt(M1(i.n))))<Hu))&&(al(e.b,u)||(y=v(J(n,(Fe(),ir)),44),y||(y=new Hi,_e(n,ir,y)),g=new tr(u),Cr(y,g,y.c.b,y.c),Tn(e.b,g)))}function y_e(e,n,i){var u,l,g,y,x,_,C,N,A;for(u=i.c,l=i.d,x=Yi(n.c),_=Yi(n.d),u==n.c?(x=hA(e,x,l),_=Oee(n.d)):(x=Oee(n.c),_=hA(e,_,l)),C=new jx(n.a),Cr(C,x,C.a,C.a.a),Cr(C,_,C.c.b,C.c),y=n.c==u,A=new tZ,g=0;g<C.b-1;++g)N=new Er(v(Bp(C,g),10),v(Bp(C,g+1),10)),y&&g==0||!y&&g==C.b-2?A.b=N:$e(A.a,N);return A}function m_e(e,n){var i,u,l,g;if(g=e.g.e-n.g.e,g!=0)return g;if(i=v(J(e,(Fe(),Uu)),24),u=v(J(n,Uu),24),i&&u&&(l=i.a-u.a,l!=0))return l;switch(e.g.e){case 1:return Pr(e.i.a,n.i.a);case 2:return Pr(e.i.b,n.i.b);case 3:return Pr(n.i.a,e.i.a);case 4:return Pr(n.i.b,e.i.b);default:throw new oc(cre)}}function w_e(e,n){var i,u,l,g,y;for(y=new Wr,g=new V(Ec(e));g.a<g.c.c.length;)switch(l=v(q(g),161),v(l.e,7).g.e){case 4:case 2:y.b=Xe(y.b,l.e.i.b+l.e.j.b+(n?(u=v(l.e,7).d,new ss(u.d,u.b,u.a,u.c)).a:0));break;case 1:case 3:y.a=Xe(y.a,l.e.i.a+l.e.j.a+(n?(i=v(l.e,7).d,new ss(i.d,i.b,i.a,i.c)).c:0))}return y}function h_(e,n){var i,u,l,g,y,x,_;for(l=new Ye,_=new Ye,i=v(Qh(ql,e),20).mb();i.G();)u=v(i.H(),75),tee(l,u.b),tee(l,qX(u)),i.G()&&(u=v(i.H(),75),Bn(_,qX(u)),Bn(_,u.b));for(mk(l,e.b),mk(_,e.a),x=new V(l);x.a<x.c.c.length;)g=v(q(x),7),ju(n,g);for(y=new V(_);y.a<y.c.c.length;)g=v(q(y),7),ju(n,g)}function _r(){_r=s,XE=new lc("COMMENTS",0),ks=new lc("EXTERNAL_PORTS",1),Sm=new lc("HYPEREDGES",2),eC=new lc("HYPERNODES",3),Qf=new lc("NON_FREE_PORTS",4),Wf=new lc("NORTH_SOUTH_PORTS",5),Nm=new lc("SELF_LOOPS",6),ag=new lc("CENTER_LABELS",7),og=new lc("END_LABELS",8),x9=new lc("PARTITIONS",9)}function x_e(e,n){var i,u,l,g;for(e=(Ln(),e??fu),i=(e.length+16*n.length,new V2),g=0,u=0;u<n.length&&(l=e.indexOf("%s",g),l!=-1);)Co(i,e.substr(g,l-g)),fc(i,n[u++]),g=l+2;if(Co(i,Pp(e,g,e.length-g)),u<n.length){for(i.a+=" [",fc(i,n[u++]);u<n.length;)i.a+=", ",fc(i,n[u++]);i.a+="]"}return i.a}function CA(e,n,i){var u,l;switch(l=null,n.e){case 1:l=(Sa(),yL);break;case 2:l=(Sa(),mL)}switch(u=null,i.e){case 1:u=(Sa(),yE);break;case 2:u=(Sa(),vE);break;case 3:u=(Sa(),mE);break;case 4:u=(Sa(),wE)}return l&&u?Ho(e.f,(y1(),new sq(new Eo(be(ve(c3e,1),et,68,0,[v(Pt(l),68),v(Pt(u),68)]))))):(pn(),pn(),Fc)}function PA(e,n,i){var u,l,g,y,x,_,C;for(_=Ca(In(n)),l=gn(_,0);l.b!=l.d.c;)u=v(on(l),12),C=u.d.f,!(Gt(Oe(Yt(J(C,(Ce(),zc)))))&&J(C,_t)!=null)&&C.g==(pt(),$i)&&!Gt(Oe(Yt(J(u,wu))))&&u.d.g==(De(),ct)&&(g=pa(C.d)-pa(n.d),g>1&&(i?y=pa(n.d)+1:y=pa(C.d)-1,x=v(ut(e.a.c,y),16),Fr(C,x)),PA(e,C,i));return n}function Hte(e,n){var i,u,l,g;for(n.d?l=e.a.c==(Uo(),Dc)?Dr(n.b):In(n.b):l=e.a.c==(Uo(),Js)?Dr(n.b):In(n.b),g=!1,u=(Qn(),new ns(rs(Rs(l.a,new w))));Bt(u);)if(i=v(It(u),12),e.c.a[i.c.f.d.k]!==e.c.a[i.d.f.d.k]&&(g=!0,al(e.b,e.a.f[J2e(i,n.b).k])))return n.c=!0,n.a=i,n;return n.c=g,n.a=null,n}function k_e(e,n,i){var u,l,g,y;for(u=v(J(e.d,(Fe(),ZI)),15).a,g=new V(e.a.b);g.a<g.c.c.length;)if(l=v(q(g),25),qe(l,93)&&(y=v(l,93).b,y.g==(pt(),Dn)))switch(v(J(y,(Ce(),$r)),32).e){case 4:y.i.a=n.a-u;break;case 2:y.i.a=i.a+u-(y.j.a+y.e.c);break;case 1:y.i.b=n.b-u;break;case 3:y.i.b=i.b+u-(y.j.b+y.e.a)}}function __e(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var e="__proto__",n=Object.create(null);if(n[e]!==void 0)return!1;var i=Object.getOwnPropertyNames(n);return!(i.length!=0||(n[e]=42,n[e]!==42)||Object.getOwnPropertyNames(n).length==0)}function zte(e){var n,i,u,l,g,y,x,_,C;for(y=new V(e.a.a);y.a<y.c.c.length;)l=v(q(y),78),l.f=0,l.e.a.Q();for(g=new V(e.a.a);g.a<g.c.c.length;)for(l=v(q(g),78),i=(C=new un(l.a.a).a.bb().mb(),new hn(C));i.a.G();)for(n=(u=v(i.a.H(),21),v(u.yb(),25)),_=n.i.mb();_.G();)x=v(_.H(),25),x.f!=l&&(Tn(l.e,x),++x.f.f)}function SA(e,n,i,u){var l,g,y,x;if(n.g==(pt(),$i)){for(g=Ht(Dr(n));Bt(g);)if(l=v(It(g),12),y=l.c.f,(y.g==$i||Gt(Oe(Yt(J(y,(Ce(),zc))))))&&e.d.a[l.c.f.d.k]==u&&e.d.a[n.d.k]==i)return!0}if(n.g==Pn){for(g=Ht(Dr(n));Bt(g);)if(l=v(It(g),12),x=l.c.f.g,x==Pn&&e.d.a[l.c.f.d.k]==u&&e.d.a[n.d.k]==i)return!0}return!1}function E_e(e){var n,i,u,l,g,y;if(l=e.g.tb(),u=e.b.tb(),e.e)for(i=0;i<e.c;i++)l.H();else for(i=0;i<e.c-1;i++)l.H(),l.I();for(n=Oe(qt(l.H()));e.i-n>Bl;){for(g=n,y=0;(n-g<=0?0-(n-g):n-g)<Bl;)++y,n=Oe(qt(l.H())),u.H();y<e.c&&(l.M(),Rte(e,e.c-y,g,u,l),l.H()),u.M()}if(!e.e)for(i=0;i<e.c-1;i++)l.H(),l.I();e.e=!0,e.d=!0}function C_e(e){var n,i,u,l;switch(wx(e.a).c){case 4:return Ni(),xs;case 3:return v(tme(e.a).mb().H(),60);case 2:return u=wx(e.a),i=new Gh(u),n=v(wl(i),60),l=v(wl(i),60),rv(n)==l?os(u,(Ni(),xs))?Vu:xs:Ry(Ry(n))==l?Ry(n):EA(n);case 1:return u=wx(e.a),rv(v(wl(new Gh(u)),60));case 0:return Ni(),qu;default:return null}}function Ute(e,n){var i;K7.call(this),this.a=v(J(n,(Ce(),Qi)),15).a,this.c=this.a*v(J(n,(Wt(),hg)),15).a,this.b=e,this.j=new so(e.i.a-e.e.b,e.i.b-e.e.d,e.j.a+e.e.b+e.e.c,e.j.b+e.e.d+e.e.a),au(this.g),i=Ef(Dr(e))-Ef(In(e)),i<0?Yb(this.n,!0,(Jn(),Ka)):i>0&&Yb(this.n,!0,(Jn(),aa)),e.g==(pt(),Dn)&&Ua(this.n,!1,!1,!1,!1)}function sv(e,n,i){var u,l,g,y,x,_,C,N,A,O;for(g=new wt(n,i),N=new V(e.b);N.a<N.c.c.length;)for(C=v(q(N),9),Nn(C.i,g),O=new V(C.f);O.a<O.c.c.length;)for(A=v(q(O),7),l=new V(A.e);l.a<l.c.c.length;)for(u=v(q(l),12),mc(u.a,g),y=v(J(u,(Fe(),ir)),44),y&&mc(y,g),_=new V(u.b);_.a<_.c.c.length;)x=v(q(_),33),Nn(x.i,g)}function P_e(e,n,i){var u,l,g,y,x,_,C,N,A,O;for(g=new wt(n,i),N=new V(e.b);N.a<N.c.c.length;)for(C=v(q(N),9),Nn(C.i,g),O=new V(C.f);O.a<O.c.c.length;)for(A=v(q(O),7),l=new V(A.e);l.a<l.c.c.length;)for(u=v(q(l),12),mc(u.a,g),y=v(J(u,(Fe(),ir)),44),y&&mc(y,g),_=new V(u.b);_.a<_.c.c.length;)x=v(q(_),33),Nn(x.i,g)}function Fte(e,n){var i,u,l,g,y;for(y=new V(e.f);y.a<y.c.c.length;)if(g=v(q(y),7),n){if(g.b.c.length!=0)throw new o1((l=sy(e),bI+(l??f1(e.k))+dre+pre+vI))}else for(u=new V(g.b);u.a<u.c.c.length;)if(i=v(q(u),12),ot(J(i.c.f,(Wt(),Tr)))!==ot((ra(),Uc)))throw new o1((l=sy(e),bI+(l??f1(e.k))+dre+pre+vI))}function Yte(e,n,i){var u,l,g,y,x,_,C;for(u=0,C=lr(n,i),_=C.mb();_.G();)x=v(_.H(),7),v(J(x,(Ce(),eu)),9)&&(y=v(J(x,eu),9),lr(y,(De(),at)).mb().G()&&(u+=(g=e.k?1:_Q(v(ut(y.f,0),7)),g*sc(_X(e,n,i).a-1-v(ln(e.i,x),24).a,fX(e,n,y)))),lr(y,ct).mb().G()&&(u+=(l=e.k?1:_Q(v(ut(y.f,0),7)),l*sc(v(ln(e.i,x),24).a,fX(e,n,y)))));return u}function S_e(e,n){var i,u,l,g,y,x,_;for(l=Ae(ar,rr,26,e.e.a.c.length,12,1),y=new V(e.e.a);y.a<y.c.c.length;)g=v(q(y),61),l[g.b]+=g.c.c.length;for(x=Ca(n);x.b!=0;)for(g=v(x.b==0?null:(xt(x.b!=0),su(x,x.a.a)),61),u=new V(g.g);u.a<u.c.c.length;)i=v(q(u),89),_=i.d,_.e=ui(_.e,g.e+i.a),--l[_.b],l[_.b]==0&&Cr(x,_,x.c.b,x.c)}function Vte(e,n,i,u,l,g,y){if(e.d=u.e.i.a,e.e=u.e.i.b,l&&(e.d+=l.e.i.a,e.e+=l.e.i.b),e.c=n.e.j.a,e.b=n.e.j.b,!l)i?e.d-=y+n.e.j.a:e.d+=u.e.j.a+y;else switch(v(l.e,7).g.e){case 0:case 2:e.d+=l.e.j.a+y+g.a+y;break;case 4:e.d-=y+g.a+y+n.e.j.a;break;case 1:e.d+=l.e.j.a+y,e.e-=y+g.b+y+n.e.j.b;break;case 3:e.d+=l.e.j.a+y,e.e+=l.e.j.b+y+g.b+y}}function N_e(e,n){var i,u,l,g,y,x,_,C,N;for(l=new Ye,_=new V(n);_.a<_.c.c.length;)g=v(q(_),9),$e(l,e.b[g.d.k][g.k]);for(vEe(e,l);N=cCe(l);)iEe(e,v(N.a,102),v(N.b,102),l);for(n.c=Ae(ht,et,1,0,4,1),u=new V(l);u.a<u.c.c.length;)for(i=v(q(u),102),y=i.d,x=0,C=y.length;x<C;++x)g=y[x],n.c[n.c.length]=g,e.a[g.d.k][g.k].a=Ha(i.g,i.d[0]).a}function d_(e){var n,i,u,l,g,y,x;for(x=(Fn(),new en),u=new V(e.a.b);u.a<u.c.c.length;)n=v(q(u),25),kn(x,n,new Ye);for(l=new V(e.a.b);l.a<l.c.c.length;)for(n=v(q(l),25),n.r=Zr,y=n.i.mb();y.G();)g=v(y.H(),25),v(bi(vi(x.d,g)),20).ib(n);for(i=new V(e.a.b);i.a<i.c.c.length;)n=v(q(i),25),n.i.Q(),n.i=v(bi(vi(x.d,n)),20);zte(e)}function T_e(e){var n,i,u,l,g;switch(l=v(ut(e.b,0),9),n=new lo(e),$e(e.b,n),n.j.a=Xe(1,l.j.a),n.j.b=Xe(1,l.j.b),n.i.a=l.i.a,n.i.b=l.i.b,v(J(l,(Ce(),$r)),32).e){case 4:n.i.a+=2;break;case 1:n.i.b+=2;break;case 2:n.i.a-=2;break;case 3:n.i.b-=2}return u=new Xn,_n(u,n),i=new Hs,g=v(ut(l.f,0),7),qn(i,g),An(i,u),Nn(au(u.i),g.i),Nn(au(u.a),g.a),n}function M_e(e){var n,i,u,l,g,y,x,_,C;for(C=(Fn(),new en),n=0,i=new B2,x=e.mb();x.G();)g=v(x.H(),9),_=_b(t$(b6(new lp,n++),g),i),va(C.d,g,_);for(y=e.mb();y.G();)for(g=v(y.H(),9),l=Ht(In(g));Bt(l);)u=v(It(l),12),!xl(u)&&ud(Lh(Dh(Oh(Bh(new hf,ui(1,v(J(u,(Ce(),vo)),24).a)),1),v(ln(C,u.c.f),61)),v(ln(C,u.d.f),61)));return i}function j_e(e){var n,i;if(!e.V()){for(i=v(e.sb(0),75).f,new jA(e),n=new Cn(i.f,0),Pl((Ni(),$o),n),Sl(Zl,n),qb((De(),bt),n),h_(Xs,n),Sl(Zu,n),Al(Bc,n),Pl(ws,n),qb(at,n),h_(Vu,n),Pl(Rc,n),Al(qu,n),Pl(Zu,n),qb(kt,n),h_(xs,n),Pl(Zl,n),Al(Hc,n),Sl(Rc,n);n.b<n.d.Y();)xt(n.b<n.d.Y()),n.d.sb(n.c=n.b++);h_(Gc,n),Sl(ws,n),Sl($o,n)}}function A_e(e){var n,i;if(!e.V()){for(i=v(e.sb(0),75).f,new jA(e),n=new Cn(i.f,0),Pl((Ni(),$o),n),Sl(Zl,n),qb((De(),bt),n),Al(Xs,n),Sl(Zu,n),Al(Bc,n),Pl(ws,n),qb(at,n),Al(Vu,n),Pl(Rc,n),Al(qu,n),Pl(Zu,n),qb(kt,n),Al(xs,n),Pl(Zl,n),Al(Hc,n),Sl(Rc,n);n.b<n.d.Y();)xt(n.b<n.d.Y()),n.d.sb(n.c=n.b++);Al(Gc,n),Sl(ws,n),Sl($o,n)}}function qte(e){var n,i,u,l,g,y,x,_,C;for(l=hu,y=Sr,C=new V(e.e.a);C.a<C.c.c.length;)x=v(q(C),61),y=sc(y,x.e),l=ui(l,x.e);for(g=0,u=Ae(ar,rr,26,l-y+1,12,1),_=new V(e.e.a);_.a<_.c.c.length;)x=v(q(_),61),x.e-=y,++u[x.e];if(e.k)for(i=new V(e.k.c);i.a<i.c.c.length&&(n=v(q(i),16),u[g++]+=n.a.c.length,u.length!=g););return u}function I_e(e){var n,i,u,l;for(lwe(e),wxe(e),l=new wt(ji,ji),n=new wt(Zr,Zr),u=new V(e.a.b);u.a<u.c.c.length;)i=v(q(u),25),l.a=dn(l.a,i.j.d),l.b=dn(l.b,i.j.e),n.a=Xe(n.a,i.j.d+i.j.c),n.b=Xe(n.b,i.j.e+i.j.b);Nn(au(e.d.d),Px(new wt(l.a,l.b))),Nn(au(e.d.e),Mu(new wt(n.a,n.b),l)),k_e(e,l,n),e.a.a.c=Ae(ht,et,1,0,4,1),e.a.b.c=Ae(ht,et,1,0,4,1)}function L_e(e,n){var i,u,l,g,y,x,_,C,N,A;if(y=e.e,N=v(J(e,(Ce(),lg)),20),A=0,N){for(_=0,g=N.mb();g.G();)l=v(g.H(),9),_=Xe(_,l.j.b),A+=l.j.a;A+=n/2*(N.Y()-1),y.d+=_+n}if(i=v(J(e,sg),20),u=0,i){for(_=0,g=i.mb();g.G();)l=v(g.H(),9),_=Xe(_,l.j.b),u+=l.j.a;u+=n/2*(i.Y()-1),y.a+=_+n}x=A>u?A:u,x>e.j.a&&(C=(x-e.j.a)/2,y.b=Xe(y.b,C),y.c=Xe(y.c,C))}function Zte(e,n,i,u){var l,g,y,x,_,C,N,A,O,B;for(y=Ea(n.d,i,u),A=new V(n.b);A.a<A.c.c.length;){for(N=v(q(A),9),Nn(N.i,y),B=new V(N.f);B.a<B.c.c.length;)for(O=v(q(B),7),g=new V(O.e);g.a<g.c.c.length;)for(l=v(q(g),12),mc(l.a,y),x=v(J(l,(Fe(),ir)),44),x&&mc(x,y),C=new V(l.b);C.a<C.c.c.length;)_=v(q(C),33),Nn(_.i,y);$e(e.b,N),N.a=e}}function O_e(e,n){var i,u,l,g,y;for(e.c==null||e.c.length<n.c.length?e.c=Ae(Qv,bv,26,n.c.length,13,1):lb(e.c),e.a=new Ye,u=0,y=new V(n);y.a<y.c.c.length;)l=v(q(y),9),l.k=u++;for(i=new ti,g=new V(n);g.a<g.c.c.length;)l=v(q(g),9),e.c[l.k]||(ote(e,l),i.b==0||(xt(i.b!=0),v(i.a.a.c,20)).Y()<e.a.c.length?m$(i,e.a):X2(i,e.a),e.a=new Ye);return i}function D_e(e,n,i){var u,l,g,y,x,_,C,N,A;return u=Rp(e.g),C=Nn(ao(e.i),e.a),N=Nn(ao(n.i),n.a),l=Nn(new tr(C),as(new gl(u),i)),A=Nn(new tr(N),as(new gl(u),i)),y=as(Mu(new tr(l),A),.5),_=Nn(Nn(new tr(A),y),as(new gl(u),D$(y.a*y.a+y.b*y.b))),x=new ek(be(ve(Xt,1),Jt,10,0,[C,l,_,A,N])),g=Lf(x,.5,!1),x.a=g,KM(x,new t_(be(ve(Xt,1),Jt,10,0,[g,C,N]))),x}function NA(e,n){var i,u,l,g,y;if(Vt(n,"Network simplex",1),e.e.a.c.length<1){Dt(n);return}for(g=new V(e.e.a);g.a<g.c.c.length;)l=v(q(g),61),l.e=0;for(y=e.e.a.c.length>=40,y&&W_e(e),SEe(e),Xke(e),i=kee(e),u=0;i&&u<e.f;)B_e(e,i,yke(e,i)),i=kee(e),++u;y&&Axe(e),e.a?bke(e,qte(e)):qte(e),e.b=null,e.d=null,e.p=null,e.c=null,e.g=null,e.i=null,e.n=null,e.o=null,Dt(n)}function cd(e){var n,i,u,l,g,y,x,_,C,N;for(C=new Qr,l=(Fn(),new en),x=0,_=e.length;x<_;++x)y=e[x],n=y.mc(),C.a.db(n,C),n==null?va(l.d,null,y):Rk(l.e,n,y),N=Rx(n,(Ln(),n.lastIndexOf(".")+1),n.length),al(pL,N)||(C.a.db(N,C),N==null?va(l.d,null,y):Rk(l.e,N,y),Tn(pL,N));return u=(za(),wee((g=new un(C.a).a.bb().mb(),new hn(g)))),i=Gke(l),new Er(u,i)}function B_e(e,n,i){var u,l,g;if(!n.e)throw new wn("Given leave edge is no tree edge.");if(i.e)throw new wn("Given enter edge is a tree edge already.");for(n.e=!1,Ex(e.p,n),i.e=!0,Tn(e.p,i),u=i.d.e-i.c.e-i.a,a_(e,i.d,n)||(u=-u),g=new V(e.e.a);g.a<g.c.c.length;)l=v(q(g),61),a_(e,l,n)||(l.e+=u);e.j=1,lb(e.c),uA(e,v(q(new V(e.e.a)),61)),wne(e)}function R_e(e,n){var i,u,l,g,y,x,_,C,N,A,O,B;if(e.V())return new Wr;for(C=0,A=0,l=e.mb();l.G();)u=v(l.H(),55),g=u.e,C=Xe(C,g.a),A+=g.a*g.b;for(C=Xe(C,Math.sqrt(A)*v(J(v(e.mb().H(),55),(Ce(),Nd)),15).a),O=0,B=0,_=0,i=n,x=e.mb();x.G();)y=v(x.H(),55),N=y.e,O+N.a>C&&(O=0,B+=_+n,_=0),sv(y,O,B),i=Xe(i,O+N.a),_=Xe(_,N.b),O+=N.a+n;return new wt(i+n,B+_+n)}function p_(e,n,i,u){var l,g,y;return y=new c$(n,i),e.a?u?(l=v(ln(e.b,n),126),++l.a,y.d=u.d,y.e=u.e,y.b=u,y.c=u,u.e?u.e.c=y:v(ln(e.b,n),126).b=y,u.d?u.d.b=y:e.a=y,u.d=y,u.e=y):(e.e.b=y,y.d=e.e,e.e=y,l=v(ln(e.b,n),126),l?(++l.a,g=l.c,g.c=y,y.e=g,l.c=y):(kn(e.b,n,new B7(y)),++e.c)):(e.a=e.e=y,kn(e.b,n,new B7(y)),++e.c),++e.d,y}function cu(e){var n,i,u,l,g,y,x,_;if(e.e)throw new oc((mf(bE),"The "+bE.j+sre));for(e.d==(Jn(),qo)&&Zs(e,Ka),i=new V(e.a.a);i.a<i.c.c.length;)n=v(q(i),78),n.f=0;for(y=new V(e.a.b);y.a<y.c.c.length;)for(g=v(q(y),25),g.r=Zr,l=g.i.mb();l.G();)u=v(l.H(),25),++u.f.f;for(e.b.Cc(e),_=new V(e.a.b);_.a<_.c.c.length;)x=v(q(_),25),x.p=!0;return e}function G_e(e,n,i,u,l){var g,y,x,_;g=new lo(e),io(g,(pt(),fr)),_e(g,(Fe(),Ct),(Zn(),fi)),_e(g,(Ce(),_t),n.c.f),y=new Xn,_e(y,_t,n.c),Qt(y,l),_n(y,g),_e(n.c,eu,g),x=new lo(e),io(x,fr),_e(x,Ct,fi),_e(x,_t,n.d.f),_=new Xn,_e(_,_t,n.d),Qt(_,l),_n(_,x),_e(n.d,eu,x),qn(n,y),An(n,_),kl(0,i.c.length),mb(i.c,0,g),u.c[u.c.length]=x,_e(g,ug,St(1)),_e(x,ug,St(1))}function H_e(e,n){var i,u,l,g,y;if(y=v(J(e.f,(Fe(),Ct)),28),g=e.g.e-n.g.e,g!=0||y==(Zn(),Mv))return g;if(y==(Zn(),wd)&&(i=v(J(e,Uu),24),u=v(J(n,Uu),24),i&&u&&(l=i.a-u.a,l!=0)))return l;switch(e.g.e){case 1:return Pr(e.i.a,n.i.a);case 2:return Pr(e.i.b,n.i.b);case 3:return Pr(n.i.a,e.i.a);case 4:return Pr(n.i.b,e.i.b);default:throw new oc(cre)}}function $te(e){var n,i,u,l,g,y,x,_,C,N,A;for(x=new Ye,g=Oe(qt(e.g.sb(e.g.Y()-1))),A=e.g.mb();A.G();)N=qt(A.H()),hl(x,0,g-(xr(N),N));for(y=Tk(_k(e)),C=new Ye,l=new V(x),_=new Ye,n=0;n<e.c-1;n++)$e(C,qt(q(l)));for(u=gn(y,0);u.b!=u.d.c;)i=v(on(u),10),$e(C,qt(q(l))),$e(_,new ik(i,C)),On(0,C.c.length),C.c.splice(0,1);return new Fj(e.e,e.f,e.d,e.c,x,_)}function TA(e,n,i,u,l){var g,y,x,_,C;return g=n.$b(i,e.b),g<0?(x=e.e,x?(y=x.d,e.e=TA(x,n,i,u,l),l[0]==0&&++e.a,e.j=Or(e.j,u),e.e.d==y?e:Ru(e)):(l[0]=0,vj(e,i,u))):g>0?(_=e.g,_?(y=_.d,e.g=TA(_,n,i,u,l),l[0]==0&&++e.a,e.j=Or(e.j,u),e.g.d==y?e:Ru(e)):(l[0]=0,bj(e,i,u))):(l[0]=e.c,C=Or(e.c,u),Hh(Ak(C,Sr)<=0),e.c+=u,e.j=Or(e.j,u),e)}function z_e(e,n){var i,u,l,g,y,x;l=zy(n,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | |
|
|
333
|
+
`),ou(e);try{for(u=0,y=0,g=0,x=0;u<l.length;)l[u]!=null&&xb(El(l[u]))>0&&(y%2==0?g=Ay(l[u]):x=Ay(l[u]),y>0&&y%2!=0&&vn(e,new wt(g,x)),++y),++u}catch(_){throw _=ni(_),qe(_,130)?(i=_,new wn("The given string does not match the expected format for vectors."+i)):ri(_)}}function Kte(e,n,i){var u,l,g,y,x,_,C,N;for(l=!0,y=new V(n.c);y.a<y.c.c.length;){for(g=v(q(y),16),C=Zr,_=new V(g.a);_.a<_.c.c.length;)if(x=v(q(_),9),N=Oe(i.n[x.k])+Oe(i.d[x.k])-x.e.d,u=Oe(i.n[x.k])+Oe(i.d[x.k])+x.j.b+x.e.a,N>C&&u>C)C=Oe(i.n[x.k])+Oe(i.d[x.k])+x.j.b+x.e.a;else{l=!1,e.a&&wf();break}if(!l)break}return e.a&&wf(),l}function U_e(e){var n,i,u,l,g,y,x,_;return isNaN(e)?(fy(),DI):e<-9223372036854776e3?(fy(),zre):e>=9223372036854776e3?(fy(),Hre):(l=!1,e<0&&(l=!0,e=-e),u=0,e>=Nc&&(u=ur(e/Nc),e-=u*Nc),i=0,e>=Bf&&(i=ur(e/Bf),e-=i*Bf),n=ur(e),g=pc(n,i,u),l&&(y=~g.l+1&fo,x=~g.m+(y==0?1:0)&fo,_=~g.h+(y==0&&x==0?1:0)&Sc,g.l=y,g.m=x,g.h=_),g)}function F_e(e){var n,i,u,l,g,y,x;if(l=Qb(e),ul(new V(l))){for(x=new so(0,0,e.e.j.a,e.e.j.b),i=new V(l);i.a<i.c.c.length;)n=v(q(i),129),u=new so(n.e.i.a,n.e.i.b,n.e.j.a,n.e.j.b),Wb(x,u);y=new i7((g=v(e.e,7).d,new ss(g.d,g.b,g.a,g.c))),y.d=-x.e,y.a=x.e+x.b-e.e.j.b,y.b=-x.d,y.c=x.d+x.c-e.e.j.a,v(e.e,7).d.b=y.b,v(e.e,7).d.d=y.d,v(e.e,7).d.c=y.c,v(e.e,7).d.a=y.a}}function Qte(e){var n,i,u,l,g;for(g=new V(e.f);g.a<g.c.c.length;)for(l=v(q(g),7),u=new V(l.e);u.a<u.c.c.length;)if(i=v(q(u),12),ot(J(i.d.f,(Wt(),Tr)))!==ot((ra(),Ku)))throw new o1((n=sy(e),bI+(n??f1(e.k))+"' has its layer constraint set to LAST or LAST_SEPARATE, but has at least one outgoing edge. Connections between nodes with these "+vI))}function Y_e(e,n,i,u){var l,g,y,x,_,C;for(g=new V(e);g.a<g.c.c.length;){if(l=v(q(g),12),y=l.c,n.a.R(y))x=(vl(),yu);else if(i.a.R(y))x=(vl(),Kf);else throw new wn("Source port must be in one of the port sets.");if(_=l.d,n.a.R(_))C=(vl(),yu);else if(i.a.R(_))C=(vl(),Kf);else throw new wn("Target port must be in one of the port sets.");$e(u,new Wee(l,x,C))}}function Wte(e,n){var i,u,l,g,y,x;if("edges"in n.a){if(x=zn(n,"edges"),!x.hc())throw new Gs("The 'edges' property of a node has to be an array.",x,n);for(g=x.hc(),y=0;y<g.a.length;++y){if(l=vc(g,y),!l.kc())throw new Gs("All elements of the 'edges' property must be objects.",l,n);a3e(e,l.kc())}}if(Kp in n.a)for(u=zn(n,Kp).hc(),y=0;y<u.a.length;++y)i=vc(u,y).kc(),Wte(e,i)}function Hy(e){var n,i,u,l,g,y,x,_;for(u=new V(e.a.a);u.a<u.c.c.length;){for(i=v(q(u),78),i.g=null,y=(_=new un(i.a.a).a.bb().mb(),new hn(_));y.a.G();)l=(n=v(y.a.H(),21),v(n.yb(),25)),au(l.g),(!i.g||l.j.d<i.g.j.d)&&(i.g=l);for(g=(x=new un(i.a.a).a.bb().mb(),new hn(x));g.a.G();)l=(n=v(g.a.H(),21),v(n.yb(),25)),l.g.a=l.j.d-i.g.j.d,l.g.b=l.j.e-i.g.j.e}return e}function V_e(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F;for(i=!1,B=hv*e.b.f*e.b.d,l=new V(n.c);l.a<l.c.c.length;)for(u=v(q(l),16),C=new V(u.a),g=v(q(C),9),N=_7(e.a[g.k]);C.a<C.c.c.length;)x=v(q(C),9),A=_7(e.a[x.k]),N!=A&&(O=Nb(e.b,g,x),y=g.i.b+g.j.b+g.e.a+N.a+O,_=x.i.b-x.e.d+A.a,y>_+B&&(F=N.i+A.i,A.a=(A.i*A.a+N.i*N.a)/F,A.i=F,N.g=A,i=!0)),g=x,N=A;return i}function q_e(e){var n,i,u,l,g,y;if(ot(J(e,(Fe(),Ct)))===ot((Zn(),bs))||ot(J(e,Ct))===ot(fi)){for(y=new V(e.f);y.a<y.c.c.length;)if(g=v(q(y),7),g.g==(De(),bt)||g.g==kt)return!1}if(Bs(v(J(e,Ct),28))){for(l=lr(e,(De(),at)).mb();l.G();)if(u=v(l.H(),7),u.b.c.length!=0)return!1}for(i=Ht(In(e));Bt(i);)if(n=v(It(i),12),n.c.f==n.d.f)return!1;return!0}function Jte(e,n){var i,u,l,g,y,x,_,C,N;if(l=e.f,y=l.j.a,g=l.j.b,y<=0&&g<=0)return De(),mr;switch(C=e.i.a,N=e.i.b,x=e.j.a,i=e.j.b,n.e){case 2:case 1:if(C<0)return De(),ct;if(C+x>y)return De(),at;break;case 4:case 3:if(N<0)return De(),bt;if(N+i>g)return De(),kt}return _=(C+x/2)/y,u=(N+i/2)/g,_+u<=1&&_-u<=0?(De(),ct):_+u>=1&&_-u>=0?(De(),at):u<.5?(De(),bt):(De(),kt)}function Xte(e,n,i,u,l,g,y){var x,_,C,N,A,O;for(O=new lx,C=n.mb();C.G();)for(x=v(C.H(),627),A=new V(lee(x));A.a<A.c.c.length;)N=v(q(A),129),ot(hr(N,(Fe(),Ta)))===ot((Ys(),vd))&&(Vte(O,N,!1,u,l,g,y),Wb(e,O));for(_=i.mb();_.G();)for(x=v(_.H(),627),A=new V(lee(x));A.a<A.c.c.length;)N=v(q(A),129),ot(hr(N,(Fe(),Ta)))===ot((Ys(),Gl))&&(Vte(O,N,!0,u,l,g,y),Wb(e,O))}function MA(e,n){var i,u,l,g,y,x,_,C;for(_=new V(n.f);_.a<_.c.c.length;)for(x=v(q(_),7),l=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[x.b,x.e]))))));Bt(l);)u=v(It(l),12),i=u.c==x?u.d:u.c,g=i.f,n!=g&&(C=v(J(u,(Ce(),vo)),24).a,C<0&&(C=0),y=g.k,e.b[y]==0&&(u.d==i?(e.a[y]-=C+1,e.a[y]<=0&&e.c[y]>0&&vn(e.e,g)):(e.c[y]-=C+1,e.c[y]<=0&&e.a[y]>0&&vn(e.d,g))))}function Z_e(e,n){var i,u,l,g,y,x,_,C,N;for(y=new V(n.c);y.a<y.c.c.length;)for(g=v(q(y),16),C=new V(g.a);C.a<C.c.c.length;){for(_=v(q(C),9),N=new Ye,x=0,l=Ht(Dr(_));Bt(l);)i=v(It(l),12),v(J(i,(Ce(),vo)),24).a>x&&(x=v(J(i,vo),24).a);for(u=Ht(Dr(_));Bt(u);)i=v(It(u),12),_.d!=i.c.f.d&&v(J(i,(Ce(),vo)),24).a==x&&$e(N,new Er(i.c.f,i));uo(N,e.c),hl(e.b,_.k,N)}}function $_e(e,n){var i,u,l,g,y,x,_,C,N;for(y=new V(n.c);y.a<y.c.c.length;)for(g=v(q(y),16),C=new V(g.a);C.a<C.c.c.length;){for(_=v(q(C),9),N=new Ye,x=0,l=Ht(In(_));Bt(l);)i=v(It(l),12),v(J(i,(Ce(),vo)),24).a>x&&(x=v(J(i,vo),24).a);for(u=Ht(In(_));Bt(u);)i=v(It(u),12),_.d!=i.d.f.d&&v(J(i,(Ce(),vo)),24).a==x&&$e(N,new Er(i.d.f,i));uo(N,e.c),hl(e.f,_.k,N)}}function jA(e){hX();var n,i,u,l,g,y,x,_,C,N;for(this.b=new K0,this.c=new Ye,this.a=new Ye,_=Sj(),C=0,N=_.length;C<N;++C)x=_[C],s7(ql,x,new Ye);for(i=e.mb();i.G();)n=v(i.H(),75),Bn(this.a,ak(n)),n.g.a.Y()==0?v(Qh(ql,n.e),20).ib(n):$e(this.c,n);for(g=(y=new tb(ql).a.bb().mb(),new nb(y));g.a.G();)l=(u=v(g.a.H(),21),v(u.zb(),20)),uo(l,this.b);Ly(v(Qh(ql,(Ni(),$o)),20))}function ene(e,n){var i,u,l,g,y,x,_;if(_=v(J(n,(Fe(),Ct)),28),_==(Zn(),bs)||_==fi)for(g=(i=v(J(n,(Ce(),_s)),15).a,new wt(n.e.a+n.a.b+n.a.c+2*i,n.e.b+n.a.d+n.a.a+2*i)).b,x=new V(e.a);x.a<x.c.c.length;)y=v(q(x),9),y.g==(pt(),Dn)&&(u=v(J(y,$r),32),!(u!=(De(),at)&&u!=ct)&&(l=Oe(qt(J(y,$u))),_==bs&&(l*=g),y.i.b=l-v(J(y,zu),10).b,_y(y,!1,!0)))}function tne(e,n){var i,u,l,g,y,x,_,C;for(i=new lo(e.d.c),io(i,(pt(),$i)),_e(i,(Fe(),Ct),v(J(n,Ct),28)),_e(i,ya,v(J(n,ya),86)),i.k=e.d.b++,$e(e.b,i),i.j.b=n.j.b,i.j.a=0,C=(De(),at),g=yl(lr(n,C)),_=new V(g);_.a<_.c.c.length;)x=v(q(_),7),_n(x,i);return y=new Xn,Qt(y,C),_n(y,n),y.i.a=i.j.a,y.i.b=i.j.b/2,l=new Xn,Qt(l,Lk(C)),_n(l,i),l.i.b=i.j.b/2,l.i.a=-l.j.a,u=new Hs,qn(u,y),An(u,l),i}function K_e(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F;for(_=new Ax,k2e(e,_),l=new AX(n),B=new Ye,$e(B,(F=e.j,v(N$(BQ(F||(e.j=new vq(e)))),7))),O=new Ye;B.c.length!=0;){for(x=v(q(new V(B)),7),O.c[O.c.length]=x,u=$7(e,x),y=new cp(u.b.mb());y.b.G();)if(g=v(y.b.H(),12),Nxe(l,g,i))for(A=v(o_(_,g),20),N=A.mb();N.G();)C=v(N.H(),7),Vi(O,C,0)!=-1||(B.c[B.c.length]=C);Ir(B,x)}return l}function zy(e,n){var i,u,l,g,y,x,_;for(i=RegExp(n,"g"),x=Ae(H_,Rr,2,0,5,1),u=0,_=e,g=null;;)if(y=i.exec(_),y==null||_==""){x[u]=_;break}else x[u]=Rx(_,0,y.index),_=Rx(_,y.index+y[0].length,(Ln(),_.length)),i.lastIndex=0,g==_&&(x[u]=_.substr(0,1),_=Pp(_,1,_.length-1)),g=_,++u;if(Ln(),e.length>0){for(l=x.length;l>0&&x[l-1]=="";)--l;l<x.length&&(x.length=l)}return x}function Q_e(e){var n,i,u,l,g,y;for(y=new V(Ec(e.e));y.a<y.c.c.length;)switch(g=v(q(y),161),v(g.e,7).g.e){case 4:e.q.b=Xe(e.q.b,(i=v(g.e,7).d,new ss(i.d,i.b,i.a,i.c)).c);break;case 2:e.q.c=Xe(e.q.c,(u=v(g.e,7).d,new ss(u.d,u.b,u.a,u.c)).b);break;case 1:e.q.d=Xe(e.q.d,(l=v(g.e,7).d,new ss(l.d,l.b,l.a,l.c)).a);break;case 3:e.q.a=Xe(e.q.a,(n=v(g.e,7).d,new ss(n.d,n.b,n.a,n.c)).d)}}function AA(e,n,i,u,l){var g,y,x;return g=n.$b(i,e.b),g<0?(y=e.e,y?(e.e=AA(y,n,i,u,l),u==0&&l[0]!=0?--e.a:u>0&&l[0]==0&&++e.a,e.j=Or(e.j,u-l[0]),Ru(e)):(l[0]=0,u>0?vj(e,i,u):e)):g>0?(x=e.g,x?(e.g=AA(x,n,i,u,l),u==0&&l[0]!=0?--e.a:u>0&&l[0]==0&&++e.a,e.j=Or(e.j,u-l[0]),Ru(e)):(l[0]=0,u>0?bj(e,i,u):e)):(l[0]=e.c,u==0?yA(e):(e.j=Or(e.j,u-e.c),e.c=u,e))}function W_e(e){var n,i,u,l,g,y,x;for(e.o=new t6,u=new ti,y=new V(e.e.a);y.a<y.c.c.length;)g=v(q(y),61),If(g).c.length==1&&Cr(u,g,u.c.b,u.c);for(;u.b!=0;)g=v(u.b==0?null:(xt(u.b!=0),su(u,u.a.a)),61),If(g).c.length!=0&&(n=v(ut(If(g),0),89),i=g.g.c.length>0,x=Hk(n,g),oK(i?x.c:x.g,n),If(x).c.length==1&&Cr(u,x,u.c.b,u.c),l=new Er(g,n),V$(e.o,l),Ir(e.e.a,g))}function IA(e,n,i,u,l){var g,y,x;return g=n.$b(i,e.b),g<0?(y=e.e,y?(e.e=IA(y,n,i,u,l),l[0]>0&&(u>=l[0]?(--e.a,e.j=kc(e.j,l[0])):e.j=kc(e.j,u)),l[0]==0?e:Ru(e)):(l[0]=0,e)):g>0?(x=e.g,x?(e.g=IA(x,n,i,u,l),l[0]>0&&(u>=l[0]?(--e.a,e.j=kc(e.j,l[0])):e.j=kc(e.j,u)),Ru(e)):(l[0]=0,e)):(l[0]=e.c,u>=e.c?yA(e):(e.c-=u,e.j=kc(e.j,u),e))}function nne(e,n,i){var u,l,g,y,x,_,C,N;for(_=new V(i.b);_.a<_.c.c.length;)x=v(q(_),9),y=v(J(x,(Ce(),Kl)),55),y&&(N=nne(e,n,y),x.j.a=(g=v(J(N,_s),15).a,new wt(N.e.a+N.a.b+N.a.c+2*g,N.e.b+N.a.d+N.a.a+2*g)).a,x.j.b=(l=v(J(N,_s),15).a,new wt(N.e.a+N.a.b+N.a.c+2*l,N.e.b+N.a.d+N.a.a+2*l)).b);return C=new O1,u=Vh(J(i,(Fe(),qI))),u!=null&&es(u,"de.cau.cs.kieler.fixed")?n3e(i,C):Vxe(n,i,C),i}function rne(e){var n,i,u,l,g,y,x,_;x=v(J(e,(Fe(),jc)),18),_=v(J(e,Tv),18),u=v(J(e,(Ce(),_s)),15).a,e.d.a+=u,e.d.b+=u,e.e.a+=2*u,e.e.b+=2*u,_e(e,_s,new cn(0)),l=(i=v(J(e,_s),15).a,new wt(e.e.a+e.a.b+e.a.c+2*i,e.e.b+e.a.d+e.a.a+2*i)),n=new tr(l),x.kb((Bu(),Av))&&(y=v(J(e,tg),15).a,g=v(J(e,eg),15).a,_.kb((sd(),Lv))&&(y<=0&&(y=20),g<=0&&(g=20)),n.a=Xe(l.a,y),n.b=Xe(l.b,g)),bEe(e,l,n)}function ine(e,n,i){var u,l,g,y,x,_,C,N;if(n.k==0){for(n.k=1,y=i,i||(l=new Ye,g=(u=v(ea(Hr),11),new li(u,v(zi(u,u.length),11),0)),y=new Er(l,g)),v(y.a,20).ib(n),n.g==(pt(),Dn)&&v(y.b,18).ib(v(J(n,(Ce(),$r)),32)),_=new V(n.f);_.a<_.c.c.length;)for(x=v(q(_),7),N=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[new sp(x),new Sh(x)]))))));Bt(N);)C=v(It(N),7),ine(e,C.f,y);return y}return null}function J_e(e,n,i,u){var l,g,y,x,_;switch(_=new tr(n.i),_.a+=n.j.a/2,_.b+=n.j.b/2,x=v(J(n,(Ce(),cg)),15).a,g=e.e,y=e.a,l=e.d,v(J(n,$r),32).e){case 1:_.a+=y.b+l.a-i/2,_.b=-u-x,n.i.b=-(y.d+x+l.b);break;case 2:_.a=g.a+y.b+y.c+x,_.b+=y.d+l.b-u/2,n.i.a=g.a+y.c+x-l.a;break;case 3:_.a+=y.b+l.a-i/2,_.b=g.b+y.d+y.a+x,n.i.b=g.b+y.a+x-l.b;break;case 4:_.a=-i-x,_.b+=y.d+l.b-u/2,n.i.a=-(y.b+x+l.a)}return _}function X_e(e,n){var i,u,l,g,y,x,_;for(g=new V(n.b);g.a<g.c.c.length;)l=v(q(g),9),y=J(l,(Ce(),_t)),qe(y,7)&&(x=v(y,7),_=J_e(n,l,x.j.a,x.j.b),x.i.a=_.a,x.i.b=_.b,Qt(x,v(J(l,$r),32)));i=(u=v(J(n,(Ce(),_s)),15).a,new wt(n.e.a+n.a.b+n.a.c+2*u,n.e.b+n.a.d+n.a.a+2*u)),v(J(n,Xr),18).kb((_r(),ks))?(_e(e,(Fe(),Ct),(Zn(),fi)),v(J(Ui(e),Xr),18).ib(Qf),VA(e,i,!1)):VA(e,i,!0)}function LA(e,n,i){var u,l,g,y,x;switch(x=null,n.e){case 1:for(l=new V(e.f);l.a<l.c.c.length;)if(u=v(q(l),7),Gt(Oe(Yt(J(u,(Ce(),oC))))))return u;x=new Xn,_e(x,(Ce(),oC),(jn(),jn(),di));break;case 2:for(y=new V(e.f);y.a<y.c.c.length;)if(g=v(q(y),7),Gt(Oe(Yt(J(g,(Ce(),sC))))))return g;x=new Xn,_e(x,(Ce(),sC),(jn(),jn(),di))}return x&&(_n(x,e),Qt(x,i),V2e(x.i,e.j,i)),x}function ane(e,n){var i,u,l,g,y,x,_;return Pt(n),Hh(e.a.t(n.a)),u=e.b,g=e.e,y=e.d,e.b?n.b&&(i=e.a.$b(e.e,n.e),(i<0||i==0&&n.d==(Ro(),ho))&&(g=n.e,y=n.d)):(u=n.b,g=n.e,y=n.d),l=e.c,x=e.g,_=e.f,e.c?n.c&&(i=e.a.$b(e.g,n.g),(i>0||i==0&&n.f==(Ro(),ho))&&(x=n.g,_=n.f)):(l=n.c,x=n.g,_=n.f),u&&l&&(i=e.a.$b(g,x),(i>0||i==0&&y==(Ro(),ho)&&_==(Ro(),ho))&&(g=x,y=(Ro(),ho),_=tm)),new Oy(e.a,u,g,y,l,x,_)}function eEe(e,n,i,u){var l,g,y,x,_,C,N;if(i.c.f!=n.f)for(l=new lo(e),io(l,(pt(),Pn)),_e(l,(Ce(),_t),i),_e(l,(Fe(),Ct),(Zn(),fi)),u.c[u.c.length]=l,y=new Xn,_n(y,l),Qt(y,(De(),ct)),x=new Xn,_n(x,l),Qt(x,at),An(i,y),g=new Hs,Du(g,i),_e(g,ir,null),qn(g,x),An(g,n),ste(l,y,x),C=new Cn(i.b,0);C.b<C.d.Y();)_=(xt(C.b<C.d.Y()),v(C.d.sb(C.c=C.b++),33)),N=v(J(_,Ta),107),N==(Ys(),Gl)&&(zo(C),$e(g.b,_))}function tEe(e,n,i,u){var l,g,y,x,_,C,N,A,O,B,F,ee,re;for(g=i+(n.n+1)*e.a,y=n.b,l=new wt(g,y),_=(N=new un(n.c.a).a.bb().mb(),new hn(N));_.a.G();)x=(C=v(_.a.H(),21),v(C.yb(),12)),F=Yi(x.d),A=Yi(x.c),B=new wt(g,A.b),re=new wt(g,F.b),O=new wt(i-10,A.b),ee=new wt(u,F.b),F.a>=u&&A.a>=u&&(O.a=u),F.a<=i&&A.a<=i&&(ee.a=i-10),n.c.a.Y()==1?aj(x.a,be(ve(Xt,1),Jt,10,0,[O,B,re,ee])):aj(x.a,be(ve(Xt,1),Jt,10,0,[O,B,l,re,ee]))}function Il(e,n){var i,u,l,g,y,x;for(g=e.c,y=e.d,qn(e,null),An(e,null),n&&Gt(Oe(Yt(J(y,(Ce(),oC)))))?qn(e,LA(y.f,(vr(),hi),(De(),at))):qn(e,y),n&&Gt(Oe(Yt(J(g,(Ce(),sC)))))?An(e,LA(g.f,(vr(),Wi),(De(),ct))):An(e,g),u=new V(e.b);u.a<u.c.c.length;)i=v(q(u),33),l=v(J(i,(Fe(),Ta)),107),l==(Ys(),vd)?_e(i,Ta,Gl):l==Gl&&_e(i,Ta,vd);x=Gt(Oe(Yt(J(e,(Ce(),wu))))),_e(e,wu,(jn(),x?Vn:di)),e.a=Tk(e.a)}function OA(e){var n,i,u,l,g,y;for(H6(this),i=e.Y()-1;i<3;i++)e.rb(0,v(e.sb(0),10));if(e.Y()<4)throw new wn("At (least dimension + 1) control points are necessary!");for(this.c=3,this.e=!0,this.f=!0,this.d=!1,Pke(this,e.Y()+this.c-1),y=new Ye,g=this.g.mb(),n=0;n<this.c-1;n++)$e(y,qt(g.H()));for(l=e.mb();l.G();)u=v(l.H(),10),$e(y,qt(g.H())),this.b.ib(new ik(u,y)),On(0,y.c.length),y.c.splice(0,1)}function nEe(e){var n,i,u,l,g,y,x,_,C,N,A;for(A=new W0,A.d=0,y=new V(e.c);y.a<y.c.c.length;)g=v(q(y),16),A.d+=g.a.c.length;for(u=0,l=0,A.a=Ae(ar,rr,26,e.c.c.length,12,1),C=0,A.e=Ae(ar,rr,26,A.d,12,1),i=new V(e.c);i.a<i.c.c.length;)for(n=v(q(i),16),n.k=u++,A.a[n.k]=l++,N=0,_=new V(n.a);_.a<_.c.c.length;)x=v(q(_),9),x.k=C++,A.e[x.k]=N++;return A.c=new zq(A),A.b=cl(A.d),Z_e(A,e),A.f=cl(A.d),$_e(A,e),A}function rEe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(x=Ae(ar,rr,26,n.c.c.length,12,1),C=Ae(vL,Ke,132,n.c.c.length,0,1),A=e.a,O=0,B=A.length;O<B;++O){for(N=A[O],ee=0,y=new V(N.f);y.a<y.c.c.length;)l=v(q(y),9),_=l.g,u=pa(l.d),++x[u],F=e.b.a*e.b.d,x[u]>0&&C[u]&&(F=Lx(e.b,C[u],_)),ee=Xe(ee,l.d.c.b+F);for(g=new V(N.f);g.a<g.c.c.length;)l=v(q(g),9),l.i.b=ee+l.e.d,i=l.d,i.c.b=ee+l.e.d+l.j.b+l.e.a,C[Vi(i.b.c,i,0)]=l.g}}function one(e){var n,i,u,l,g,y,x,_,C,N;for(_=new V(e.a);_.a<_.c.c.length;)if(x=v(q(_),9),x.g==(pt(),Dn)&&(l=v(J(x,(Ce(),$r)),32),l==(De(),at)||l==ct))for(u=Ht(Xb(x));Bt(u);)i=v(It(u),12),n=i.a,n.b!=0&&(C=i.c,C.f==x&&(g=(xt(n.b!=0),v(n.a.a.c,10)),g.b=En(be(ve(Xt,1),Jt,10,0,[C.f.i,C.i,C.a])).b),N=i.d,N.f==x&&(y=(xt(n.b!=0),v(n.c.b.c,10)),y.b=En(be(ve(Xt,1),Jt,10,0,[N.f.i,N.i,N.a])).b))}function iEe(e,n,i,u){var l,g,y,x,_,C;for(y=new vne(e,n,i),_=new Cn(u,0),l=!1;_.b<_.d.Y();)x=(xt(_.b<_.d.Y()),v(_.d.sb(_.c=_.b++),102)),x==n||x==i?zo(_):!l&&Oe(Ha(x.g,x.d[0]).a)>Oe(Ha(y.g,y.d[0]).a)?(xt(_.b>0),_.a.sb(_.c=--_.b),ju(_,y),l=!0):x.e&&x.e.Y()>0&&(g=(!x.e&&(x.e=new Ye),x.e).nb(n),C=(!x.e&&(x.e=new Ye),x.e).nb(i),(g||C)&&((!x.e&&(x.e=new Ye),x.e).ib(y),++y.c));l||(u.c[u.c.length]=y)}function aEe(e,n,i,u){var l,g,y,x,_,C,N,A,O,B,F;i.d.f!=n.f&&(l=new lo(e),io(l,(pt(),Pn)),_e(l,(Ce(),_t),i),_e(l,(Fe(),Ct),(Zn(),fi)),u.c[u.c.length]=l,y=new Xn,_n(y,l),Qt(y,(De(),ct)),x=new Xn,_n(x,l),Qt(x,at),_=i.d,An(i,y),g=new Hs,Du(g,i),_e(g,ir,null),qn(g,x),An(g,_),C=v(ut(y.b,0),12).c,N=C.f,A=N.g,O=v(ut(x.e,0),12).d,B=O.f,F=B.g,A==Pn?_e(l,Ki,v(J(N,Ki),7)):_e(l,Ki,C),F==Pn?_e(l,Ii,v(J(B,Ii),7)):_e(l,Ii,O))}function oEe(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe;return x=e.b[n],_=e.b[i],C=v(J(x,(Ce(),Td)),20),C&&C.Y()!=0&&C.kb(_)||(N=x.g!=(pt(),Pn)&&_.g!=Pn,A=v(J(x,$l),9),O=v(J(_,$l),9),B=!!A&&A!=x||!!O&&O!=_,F=A!=O,ee=Ree(x,(De(),bt)),re=Ree(_,kt),oe=B&&F||ee||re,N&&oe)||x.g==(pt(),fr)&&_.g==$n||_.g==(pt(),fr)&&x.g==$n?!1:(y=e.b[n],u=e.b[i],fxe(e.c,y,u),bxe(e.d,y,u),g=EX(e.a,y,u)+e.c.d+e.d.d,l=EX(e.a,u,y)+e.c.b+e.d.b,g>l)}function sEe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(y=n,O=n.d,N=n.c.f,B=n.d.f,A=pa(N.d),F=pa(B.d),x=A;x<F;x++)l=new lo(e),io(l,(pt(),Pn)),_e(l,(Ce(),_t),y),_e(l,(Fe(),Ct),(Zn(),fi)),_=v(ut(e.c,x+1),16),Fr(l,_),ee=v(J(y,gs),15).a,ee<0&&(ee=0,_e(y,gs,new cn(ee))),l.j.b=ee,C=Math.floor(ee/2),u=new Xn,Qt(u,(De(),ct)),_n(u,l),u.i.b=C,g=new Xn,Qt(g,at),_n(g,l),g.i.b=C,An(y,u),i=new Hs,Du(i,y),_e(i,ir,null),qn(i,g),An(i,O),ixe(l,y,i),y=i}function uEe(e,n){if(Ni(),e==n)return Uk(e);switch(e.e){case 1:switch(n.e){case 4:return $o;case 1:return Xs;case 2:return Bc;case 3:return Zu}case 2:switch(n.e){case 1:return Bc;case 2:return Vu;case 3:return qu;case 4:return ws}case 3:switch(n.e){case 2:return qu;case 3:return xs;case 4:return Hc;case 1:return Zu}case 4:switch(n.e){case 3:return Hc;case 4:return Gc;case 1:return $o;case 2:return ws}}return $f}function cEe(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(A=new ta,l=null,y=new V(e.c);y.a<y.c.c.length;){for(g=v(q(y),16),_=new V(g.a);_.a<_.c.c.length;)x=v(q(_),9),x.g==(pt(),Dn)&&(N=v(J(x,(Ce(),jm)),9),N&&(Z2e(N,A),O=new Xn,_n(O,x),B=v(J(x,$r),32),Qt(O,B),F=v(ut(N.f,0),7),ee=new Hs,qn(ee,O),An(ee,F)));l=g}for(i=(C=new un(A.a).a.bb().mb(),new hn(C));i.a.G();)n=(u=v(i.a.H(),21),v(u.yb(),9)),Fr(n,l);return A}function sne(e,n,i){var u,l,g,y,x,_,C,N,A;for(l=new Ye,C=new V(n.b);C.a<C.c.c.length;)if(_=v(q(C),9),x=v(J(_,(Ce(),Kl)),55),x&&(u=sne(e,x,_),Bn(l,u),eCe(e,x,_),v(J(x,Xr),18).kb((_r(),ks))))for(A=new V(_.f);A.a<A.c.c.length;)N=v(q(A),7),ln(e.b,N)==null&&(g=Uy(N,(Zn(),vs),N.g,-(N.b.c.length-N.e.c.length),N.j,v(J(x,(Fe(),Zo)),59),x),_e(g,_t,N),kn(e.b,N,g),$e(x.b,g));return y=new Ye,rCe(e,n,i,l,y),i&&QEe(e,n,i,y),y}function lEe(e){var n,i,u,l,g,y,x,_,C,N,A,O;for(n=pte(e),N=(x=new un(n).a.bb().mb(),new hn(x));N.a.G();){for(C=(l=v(N.a.H(),21),v(l.yb(),9)),A=C.e.d,O=C.j.b+C.e.a,e.d[C.k]=0,i=C;(g=e.a[i.k])!=C;)u=e2e(i,g),e.c==(Uo(),Js)?_=u.d.i.b+u.d.a.b-u.c.i.b-u.c.a.b:_=u.c.i.b+u.c.a.b-u.d.i.b-u.d.a.b,y=Oe(e.d[i.k])+_,e.d[g.k]=y,A=Xe(A,g.e.d-y),O=Xe(O,y+g.j.b+g.e.a),i=g;i=C;do e.d[i.k]=Oe(e.d[i.k])+A,i=e.a[i.k];while(i!=C);e.b[C.k]=A+O}}function g_(e,n,i){var u,l,g,y,x,_,C,N;return u=e.a.k==(So(),bo)?ji:Zr,x=Hte(e,new L$(n,i)),!x.a&&x.c?(vn(e.d,x),u):x.a?(l=x.a.c,_=x.a.d,i?(C=e.a.c==(Uo(),Dc)?_:l,g=e.a.c==Dc?l:_,y=e.a.f[g.f.k],N=Oe(e.a.n[y.k])+Oe(e.a.d[g.f.k])+g.i.b+g.a.b-Oe(e.a.d[C.f.k])-C.i.b-C.a.b):(C=e.a.c==(Uo(),Js)?_:l,g=e.a.c==Js?l:_,N=Oe(e.a.n[e.a.f[g.f.k].k])+Oe(e.a.d[g.f.k])+g.i.b+g.a.b-Oe(e.a.d[C.f.k])-C.i.b-C.a.b),N):u}function fEe(e){var n,i,u,l,g;for(_e(e.g,(Ce(),j9),Ca(e.g.c)),n=1;n<e.c.c.length-1;++n)_e(v(ut(e.c,n),9),(Fe(),ya),(Gu(),an(Ai,be(ve(Rn,1),Ke,41,0,[ja,po]))));for(u=gn(Ca(e.g.c),0);u.b!=u.d.c;)i=v(on(u),33),l=v(J(e.g,(Fe(),ya)),86),wc(l,an((Gu(),ca),be(ve(Rn,1),Ke,41,0,[oa,ja])))||(wc(l,an(ca,be(ve(Rn,1),Ke,41,0,[ua,ja])))?($e(e.e.c,i),Ir(e.g.c,i),g=new k$(e,i),_e(e.g,iC,g)):(s_e(e,i),$e(e.i,e.d),_e(e.g,iC,H2e(e.i))))}function une(e,n,i,u){var l,g,y,x,_,C,N;if(g=Bk(u),x=Gt(Oe(Yt(J(u,(Wt(),V9))))),(x||Gt(Oe(Yt(J(e,(Fe(),Ev))))))&&!Bs(v(J(e,(Fe(),Ct)),28)))l=wy(g),_=LA(e,i,i==(vr(),hi)?l:Lk(l));else switch(_=new Xn,_n(_,e),N=_.i,N.a=n.a-e.i.a,N.b=n.b-e.i.b,qxe(N,e.j.a,e.j.b),Qt(_,Jte(_,g)),y=v(J(u,(Ce(),Xr)),18),C=_.g,g.e){case 2:case 1:(C==(De(),bt)||C==kt)&&y.ib((_r(),Wf));break;case 4:case 3:(C==(De(),at)||C==ct)&&y.ib((_r(),Wf))}return _}function hEe(e){var n,i,u,l,g,y,x,_;for(u=W6(yl(e.a)),l=(n=v(ea(ig),11),new li(n,v(zi(n,n.length),11),0));u.a.G()||u.b.mb().G();)i=v(lj(u),12),x=i.c.g,_=i.d.g,x==(De(),mr)?_!=mr&&(y=Uk(_),_e(i,(Ce(),Vv),y),Qt(i.c,_),mi(l,y),u.a.I()):_==mr?(y=Uk(x),_e(i,(Ce(),Vv),y),Qt(i.d,x),mi(l,y),u.a.I()):(y=uEe(x,_),_e(i,(Ce(),Vv),y),mi(l,y),u.a.I());return l.c==1?g=v(wl(new Gh(l)),60):g=(Ni(),$f),Hp(e,g,!1),g}function dEe(e,n){var i,u,l,g;for(l=0;l<(Ln(),n.length)&&uX(n.charCodeAt(l),Vne);)++l;for(i=n.length;i>0&&uX(n.charCodeAt(i-1),qne);)--i;if(l>=i)throw new wn("The given string does not contain any numbers.");if(g=zy(n.substr(l,i-l),`,|;|\r|
|
|
334
|
+
`),g.length!=2)throw new wn("Exactly two numbers are expected, "+g.length+" were found.");try{e.a=Ay(El(g[0])),e.b=Ay(El(g[1]))}catch(y){throw y=ni(y),qe(y,130)?(u=y,new wn(Zne+u)):ri(y)}}function pEe(e,n,i){var u,l,g,y,x,_,C,N,A;for(_=i+n.d.c.a,A=new V(n.f);A.a<A.c.c.length;){if(N=v(q(A),7),u=En(be(ve(Xt,1),Jt,10,0,[N.f.i,N.i,N.a])),g=new wt(0,u.b),N.g==(De(),at))g.a=_;else if(N.g==ct)g.a=i;else continue;if(u.a!=g.a)for(l=N.e.c.length+N.b.c.length>1,x=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[N.b,N.e]))))));Bt(x);)y=v(It(x),12),C=y.c==N?y.d:y.c,ci(En(be(ve(Xt,1),Jt,10,0,[C.f.i,C.i,C.a])).b-g.b)>1&&mke(e,y,g,l,N)}}function cne(e,n){var i,u,l,g,y,x;for(y=new Af(new Tu(e.f.b).a);y.b;){if(g=Lp(y),l=v(g.yb(),251),n==1){if(l.yc()!=(Jn(),bu)&&l.yc()!=Qs)continue}else if(l.yc()!=(Jn(),Ka)&&l.yc()!=aa)continue;switch(u=v(v(g.zb(),27).b,25),x=v(v(g.zb(),27).a,78),i=x.c,l.yc().e){case 2:u.j.d=e.e.a,u.j.c=Xe(1,u.j.c+i);break;case 1:u.j.d=u.j.d+i,u.j.c=Xe(1,u.j.c-i);break;case 4:u.j.e=e.e.b,u.j.b=Xe(1,u.j.b+i);break;case 3:u.j.e=u.j.e+i,u.j.b=Xe(1,u.j.b-i)}}}function DA(e,n,i,u,l){var g,y,x,_,C,N,A,O,B;for(O=(Fn(),new en),x=new Ye,Kee(e,i,e.d.Mc(),x,O),Kee(e,u,e.d.Nc(),x,O),_=new Cn(x,0);_.b<_.d.Y();)for(g=(xt(_.b<_.d.Y()),v(_.d.sb(_.c=_.b++),80)),C=new Cn(x,_.b);C.b<C.d.Y();)y=(xt(C.b<C.d.Y()),v(C.d.sb(C.c=C.b++),80)),b_e(g,y,e.a);for(WCe(x,v(J(n,(Ce(),Md)),154)),XEe(x),B=-1,A=new V(x);A.a<A.c.c.length;)N=v(q(A),80),!(ci(N.k-N.a)<Hu)&&(B=ui(B,N.i),e.d.Kc(N,l));return e.b.a.Q(),B+1}function lne(e,n,i){var u,l;switch(l=new tr(n),u=new tr(e.j),i.e){case 1:case 8:case 7:Ea(l,-u.a/2,-u.b),Ea(n,0,-(.5+u.b));break;case 3:case 4:case 5:Ea(l,-u.a/2,0),Ea(n,0,.5+u.b);break;case 0:Ea(l,-u.a/2,-u.b),Ea(n,0,-(.5+-u.b));break;case 10:case 2:Ea(l,0,-u.b/2),Ea(n,0,-(.5+u.b));break;case 6:Ea(l,-u.a,u.b/2),Ea(n,0,-(.5+u.b));break;case 9:Ea(l,-u.a/2,0),Ea(n,0,-(.5+u.b));break;case 11:Ea(l,-u.a,-u.b/2),Ea(n,0,-(.5+u.b))}return Nn(au(e.i),l),new bee(e)}function gEe(e,n,i,u,l){wf();var g,y,x,_,C,N,A;if(YQ(e,"src"),YQ(i,"dest"),N=Ap(e),x=Ap(i),m7((N.g&4)!=0,"srcType is not an array"),m7((x.g&4)!=0,"destType is not an array"),C=N.c,g=x.c,m7(C.g&1?C==g:(g.g&1)==0,"Array types don't match"),A=e.length,_=i.length,n<0||u<0||l<0||n+l>A||u+l>_)throw new XM;if((!(C.g&1)||C.g&4)&&N!=x)if(e===i&&n<u)for(n+=l,y=u+l;y-- >u;)i[y]=e[--n];else for(y=u+l;u<y;)i[u++]=e[n++];else l>0&&Wk(e,n,i,u,l,!0)}function bEe(e,n,i){var u,l,g,y,x;if(u=v(J(e,(Wt(),gC)),18),i.a>n.a&&(u.kb((Gp(),HE))?e.d.a+=(i.a-n.a)/2:u.kb(UE)&&(e.d.a+=i.a-n.a)),i.b>n.b&&(u.kb((Gp(),YE))?e.d.b+=(i.b-n.b)/2:u.kb(FE)&&(e.d.b+=i.b-n.b)),v(J(e,(Ce(),Xr)),18).kb((_r(),ks))&&(i.a>n.a||i.b>n.b))for(x=new V(e.b);x.a<x.c.c.length;)y=v(q(x),9),y.g==(pt(),Dn)&&(l=v(J(y,$r),32),l==(De(),at)?y.i.a+=i.a-n.a:l==kt&&(y.i.b+=i.b-n.b));g=e.a,e.e.a=i.a-g.b-g.c,e.e.b=i.b-g.d-g.a}function BA(e,n,i,u,l,g){var y,x,_;if(y=n.$b(i,e.b),y<0)return x=e.e,x?(e.e=BA(x,n,i,u,l,g),g[0]==u&&(l==0&&g[0]!=0?--e.a:l>0&&g[0]==0&&++e.a,e.j=Or(e.j,l-g[0])),Ru(e)):(g[0]=0,u==0&&l>0?vj(e,i,l):e);if(y>0)return _=e.g,_?(e.g=BA(_,n,i,u,l,g),g[0]==u&&(l==0&&g[0]!=0?--e.a:l>0&&g[0]==0&&++e.a,e.j=Or(e.j,l-g[0])),Ru(e)):(g[0]=0,u==0&&l>0?bj(e,i,l):e);if(g[0]=e.c,u==e.c){if(l==0)return yA(e);e.j=Or(e.j,l-e.c),e.c=l}return e}function b_(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re;for(_=e.e,B=e.f,y=e.d,F=e.c,N=F-1,ee=e.g,A=Ca(e.g.xb(1,e.g.Y()-1)),C=new Ye,i=0;i<e.b.Y()-1;i++)x=as(Mu(ao(v(e.b.sb(i+1),92).a),v(e.b.sb(i),92).a),F/(Oe(qt(ee.sb(i+F)))-Oe(qt(ee.sb(i))))),C.c[C.c.length]=x;for(re=new Ye,g=gn(A,0),O=new Ye,n=0;n<N-1;n++)$e(re,qt(on(g)));for(l=new V(C);l.a<l.c.c.length;)u=v(q(l),10),$e(re,qt(on(g))),$e(O,new ik(u,re)),On(0,re.c.length),re.c.splice(0,1);return new Fj(_,B,y,N,A,O)}function fne(e){this.q=new WM,this.p=new WM,this.o=Ae(ar,rr,26,(De(),be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct])).length,12,1),this.i=Ae(ar,rr,26,be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct]).length,12,1),this.j=Ae(fa,Ti,26,be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct]).length,12,1),this.n=Ae(fa,Ti,26,be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct]).length,12,1),this.g=Ae(aL,Ke,100,be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct]).length,0,1),this.c=new Gj(Rie),this.e=e,qZ(this.o),qZ(this.i),vx(this.n,0)}function RA(e,n){var i,u,l,g,y,x,_,C,N;if(y=n.i!=null&&!n.b,y||Vt(n,"Component Layout",1),i=v(J(e,(Ce(),H9)),20),g=1/i.Y(),Gt(Oe(Yt(J(e,(Fe(),_v))))))for(N=i.mb();N.G();)C=v(N.H(),31),$Z(Ap(C)),C.sc(e,Mf(n,g));else for(N=i.mb();N.G();)C=v(N.H(),31),C.sc(e,Mf(n,g));for(l=new V(e.c);l.a<l.c.c.length;)u=v(q(l),16),Bn(e.b,u.a),u.a.c=Ae(ht,et,1,0,4,1);for(_=new V(e.b);_.a<_.c.c.length;)x=v(q(_),9),Fr(x,null);e.c.c=Ae(ht,et,1,0,4,1),y||Dt(n)}function vEe(e,n){var i,u,l,g,y,x,_,C,N,A,O;for(y=new V(n);y.a<y.c.c.length;)l=v(q(y),102),l.e=null,l.c=0;for(x=null,g=new V(n);g.a<g.c.c.length;){for(l=v(q(g),102),N=l.d[0],O=v(J(N,(Ce(),Td)),20).mb();O.G();)A=v(O.H(),9),(!l.e&&(l.e=new Ye),l.e).ib(e.b[A.d.k][A.k]),++e.b[A.d.k][A.k].c;if(N.g==(pt(),$n)){if(x)for(C=q6(new Q2(e.c,x),0);C.c;)for(_=v(sk(C),9),u=q6(new Q2(e.c,N),0);u.c;)i=v(sk(u),9),y1e(e.b[_.d.k][_.k]).ib(e.b[i.d.k][i.k]),++e.b[i.d.k][i.k].c;x=N}}}function yEe(e,n,i,u){var l,g,y,x,_,C;if(cA(n),g=v(J(u,(Ce(),Xr)),18),x=(Fe(),Pv).b,!(x in n.a&&zn(n,x).ic().a))switch(_=new Xn,_e(_,_t,n),_n(_,i),y=v(zn(n,"id"),97),ty(e.k,y.a,_),kn(e.n,_,n),i_(n,_),My(n,_),dA(e,n,_,u),Qt(_,v(J(_,Nv),32)),C=v(J(i,Ct),28),C==(Zn(),Ac)&&(C=vs),l=v(J(u,Zo),59),l==(Jn(),qo)&&(l=aa),AEe(_,C,l,v(J(_,zu),10)),l.e){case 2:case 1:(_.g==(De(),bt)||_.g==kt)&&g.ib((_r(),Wf));break;case 4:case 3:(_.g==(De(),at)||_.g==ct)&&g.ib((_r(),Wf))}}function mEe(e,n){var i,u,l,g,y,x,_,C;for(e.f=n,l=n.c.c.length,e.a=Ae(Nr,Rr,51,l,0,2),e.d=Ae(Nr,Rr,51,l,0,2),e.g=Ae(Nr,Rr,51,l,0,2),y=new Cn(n.c,0);y.b<y.d.Y();)for(u=(xt(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),16)),x=u.a.c.length,g=y.b-1,e.a[g]=Ae(Nr,Zi,9,x,0,1),e.d[g]=Ae(Nr,Zi,9,x,0,1),e.g[g]=Ae(Nr,Zi,9,x,0,1),C=new Cn(u.a,0),i=0;C.b<C.d.Y();)_=(xt(C.b<C.d.Y()),v(C.d.sb(C.c=C.b++),9)),_.k=i++,e.d[g][C.b-1]=_,e.a[g][C.b-1]=_,e.g[g][C.b-1]=_;e.b=new Z$(e.d),e.e.c&&(e.b.e=!0)}function wEe(e){var n,i,u,l,g,y;for(l=new Ye,y=new V(e.c.f);y.a<y.c.c.length;)g=v(q(y),7),g.g==(De(),at)&&(l.c[l.c.length]=g);if(e.d.a==(Jn(),aa)&&!Bs(v(J(e.c,(Fe(),Ct)),28)))for(u=Ht(In(e.c));Bt(u);)i=v(It(u),12),$e(l,i.c);_e(e.c,(Ce(),Yv),new cn(e.c.j.a)),_e(e.c,zc,(jn(),jn(),di)),$e(e.b,e.c),n=null,e.e==1?n=BEe(e,e.c,pa(e.c.d),e.c.j.a):e.e==0?n=REe(e,e.c,pa(e.c.d),e.c.j.a):e.e==3?n=Eke(e,e.c,e.c.j.a):e.e==2&&(n=_ke(e,e.c,e.c.j.a)),n&&new Jj(e.c,e.b,Oe(qt(n.b)))}function GA(e,n,i){var u,l,g,y,x,_,C,N;if(l=n.g,Gt(Oe(Yt(J(n,(Ce(),zc)))))&&(l=(pt(),$i)),n.k>=0||i.e&&l==(pt(),$i)&&l!=i.e)return!1;if(n.k=i.b,$e(i.f,n),i.e=l,l==(pt(),Pn)||l==fr||l==$i){for(y=new V(n.f);y.a<y.c.c.length;)for(g=v(q(y),7),N=(u=new V(new Sh(g).a.e),new HM(u));ul(N.a);)if(C=v(q(N.a),12).d,x=C.f,_=x.g,n.d!=x.d){if(l==$i){if(_==$i&&GA(e,x,i))return!0}else if((_==Pn||_==fr)&&GA(e,x,i))return!0}}return!0}function hne(e,n){var i,u,l,g,y,x,_,C,N;for(aj(e.a,be(ve(Xt,1),Jt,10,0,[n.a,n.b])),ba(e.c,n.e),e.q.d=e.q.d|n.d,e.q.a=e.q.a|n.c,x=dn(e.j.e,n.k),_=Xe(e.j.e+e.j.b,n.n),iQ(e.j,n.j,x,0,_-x),Tn(e.d,n.f),n.f.c.f==n.f.d.f&&Ua(e.n,!0,!0,!0,!0),y=new Qr,C=new Qr,l=(N=new un(e.d.a).a.bb().mb(),new hn(N));l.a.G();)u=(g=v(l.a.H(),21),v(g.yb(),12)),Tn(y,u.c),Tn(C,u.d);i=y.a.Y()-C.a.Y(),i<0?(Yb(e.n,!0,(Jn(),Ka)),Yb(e.n,!1,aa)):i>0&&(Yb(e.n,!1,(Jn(),Ka)),Yb(e.n,!0,aa))}function xEe(e,n){var i,u,l,g,y,x,_,C,N,A;for(y=0;y<(Ln(),n.length)&&cX(n.charCodeAt(y),Vne);)++y;for(i=n.length;i>0&&cX(n.charCodeAt(i-1),qne);)--i;if(y<i){N=zy(n.substr(y,i-y),",|;");try{for(_=0,C=N.length;_<C;++_){if(x=N[_],g=zy(x,"="),g.length!=2)throw new wn("Expecting a list of key-value pairs.");l=El(g[0]),A=Ay(El(g[1])),es(l,"top")?e.d=A:es(l,"left")?e.b=A:es(l,hI)?e.a=A:es(l,"right")&&(e.c=A)}}catch(O){throw O=ni(O),qe(O,130)?(u=O,new wn(Zne+u)):ri(O)}}}function kEe(e,n){var i,u,l,g,y,x,_,C,N;for(N=new ti,x=(C=new tb(e.c).a.bb().mb(),new nb(C));x.a.G();)g=(l=v(x.a.H(),21),v(l.zb(),200)),g.b==0&&Cr(N,g,N.c.b,N.c);for(;N.b!=0;)for(g=v(N.b==0?null:(xt(N.b!=0),su(N,N.a.a)),200),u=new V(g.d);u.a<u.c.c.length;)i=v(q(u),279),n.k==(So(),Yu)?i.b.a=dn(i.b.a,g.a+i.a):i.b.a=Xe(i.b.a,g.a+i.a),--i.b.b,i.b.b==0&&vn(N,i.b);for(y=(_=new tb(e.c).a.bb().mb(),new nb(_));y.a.G();)g=(l=v(y.a.H(),21),v(l.zb(),200)),n.g[g.c.k]=g.a}function _Ee(e,n,i){var u,l,g,y;switch(g=e.i,l=En(be(ve(Xt,1),Jt,10,0,[n.i,n.f.i])),u=En(be(ve(Xt,1),Jt,10,0,[n.f.i,n.i,n.a])),y=n.d,n.g.e){case 4:g.a=dn(l.a,u.a)-y.b-e.j.a-i,g.b=En(be(ve(Xt,1),Jt,10,0,[n.f.i,n.i,n.a])).b+i;break;case 2:g.a=Xe(l.a+n.j.a,u.a)+y.c+i,g.b=En(be(ve(Xt,1),Jt,10,0,[n.f.i,n.i,n.a])).b+i;break;case 1:g.a=En(be(ve(Xt,1),Jt,10,0,[n.f.i,n.i,n.a])).a+i,g.b=dn(l.b,u.b)-y.d-e.j.b-i;break;case 3:g.a=En(be(ve(Xt,1),Jt,10,0,[n.f.i,n.i,n.a])).a+i,g.b=Xe(l.b+n.j.b,u.b)+y.a+i}}function EEe(e,n,i){var u,l,g,y;switch(g=e.i,l=En(be(ve(Xt,1),Jt,10,0,[n.i,n.f.i])),u=En(be(ve(Xt,1),Jt,10,0,[n.f.i,n.i,n.a])),y=n.d,n.g.e){case 4:g.a=dn(l.a,u.a)-y.b-e.j.a-i,g.b=En(be(ve(Xt,1),Jt,10,0,[n.f.i,n.i,n.a])).b-e.j.b-i;break;case 2:g.a=Xe(l.a+n.j.a,u.a)+y.c+i,g.b=En(be(ve(Xt,1),Jt,10,0,[n.f.i,n.i,n.a])).b-e.j.b-i;break;case 1:g.a=En(be(ve(Xt,1),Jt,10,0,[n.f.i,n.i,n.a])).a+i,g.b=dn(l.b,u.b)-y.d-e.j.b-i;break;case 3:g.a=En(be(ve(Xt,1),Jt,10,0,[n.f.i,n.i,n.a])).a+i,g.b=Xe(l.b+n.j.b,u.b)+y.a+i}}function CEe(e){var n,i;switch(i=v(J(e,(Ce(),Xr)),18),n=G1(Uie),Gt(Oe(Yt(J(e,(Wt(),Zv)))))?gc(n,(Br(),ME)):Si(n,(Br(),ME)),J(e,(ej(),BI))!=null&&Lr(n,Fie),v(J(e,(Fe(),Zo)),59).e){case 2:Pi(gc(n,(Br(),RL)),BL);break;case 3:Pi(gc(n,(Br(),PL)),CL);break;case 4:Pi(gc(n,(Br(),QL)),KL)}return i.kb((_r(),XE))&&Pi(gc(n,(Br(),EL)),_L),ot(J(e,Om))!==ot((Nl(),wm))&&Si(n,(Br(),HL)),ot(J(e,Dm))!==ot((zp(),Hv))&&ot(J(e,O9))===ot((Ou(),Uf))&&Pi(n,(Br(),jL)),i.kb(x9)&&(gc(n,(Br(),UL)),Si(n,zL)),n}function uv(){uv=s,_9=new Sf("ONE_SIDED",0,!0,!1,!1),nC=new Sf("TWO_SIDED",1,!1,!1,!1),E9=new Sf("ONE_SIDED_BEST_OF_UP_OR_DOWN",2,!0,!0,!1),S9=new Sf("TWO_SIDED_BEST_OF_UP_OR_DOWN",3,!1,!0,!1),C9=new Sf("ONE_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",4,!0,!0,!0),N9=new Sf("TWO_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",5,!1,!0,!0),P9=new Sf("ONE_SIDED_ORTHOGONAL_HYPEREDGES",6,!0,!1,!0),tC=new Sf("OFF",7,!1,!1,!1)}function v_(e,n,i,u,l,g,y){var x,_,C,N,A,O,B;return A=Gt(Oe(Yt(J(n,(Wt(),q9))))),O=null,g==(vr(),Wi)&&u.c.f==i?O=u.c:g==hi&&u.d.f==i&&(O=u.d),C=y,!y||!A||O?(N=(De(),mr),O?N=O.g:Bs(v(J(i,(Fe(),Ct)),28))&&(N=g==Wi?ct:at),_=MEe(e,n,i,g,N,u),x=lk((Ui(i),u)),g==Wi?(qn(x,v(ut(_.f,0),7)),An(x,l)):(qn(x,l),An(x,v(ut(_.f,0),7))),C=new IX(u,x,_,v(J(_,(Ce(),_t)),7),g,!O)):($e(y.e,u),B=VZ(v(J(y.d,(Fe(),gs)),15).a,v(J(u,gs),15).a),_e(y.d,gs,new cn(B))),Tt(e.a,u,new D1(C.d,n,g)),C}function HA(e,n,i,u){var l,g,y,x,_,C,N,A;if(g=new lo(e),io(g,(pt(),fr)),_e(g,(Fe(),Ct),(Zn(),fi)),l=0,n){for(y=new Xn,_e(y,(Ce(),_t),n),_e(g,_t,n.f),Qt(y,(De(),ct)),_n(y,g),A=v(nr(n.b,Ae(la,ia,12,n.b.c.length,0,1)),47),C=0,N=A.length;C<N;++C)_=A[C],An(_,y);_e(n,eu,g),++l}if(i){for(x=new Xn,_e(g,(Ce(),_t),i.f),_e(x,_t,i),Qt(x,(De(),at)),_n(x,g),A=v(nr(i.e,Ae(la,ia,12,i.e.c.length,0,1)),47),C=0,N=A.length;C<N;++C)_=A[C],qn(_,x);_e(i,eu,g),++l}return _e(g,(Ce(),ug),St(l)),u.c[u.c.length]=g,g}function PEe(e,n){var i,u,l,g,y,x,_;for(y=Vx(e.a).mb();y.G();){if(g=v(y.H(),12),g.b.c.length>0)for(u=new dc(v(Za(e.a,g),18)),uo(u,new GM(n)),l=new Cn(g.b,0);l.b<l.d.Y();){switch(i=(xt(l.b<l.d.Y()),v(l.d.sb(l.c=l.b++),33)),x=-1,v(J(i,(Fe(),Ta)),107).e){case 2:x=u.c.length-1;break;case 1:x=u.c.length/2|0;break;case 3:x=0}x!=-1&&(_=(On(x,u.c.length),v(u.c[x],114)),$e(_.b.b,i),v(J(Ui(_.b.c.f),(Ce(),Xr)),18).ib((_r(),og)),v(J(Ui(_.b.c.f),Xr),18).ib(ag),zo(l),_e(i,G9,g))}qn(g,null),An(g,null)}}function SEe(e){var n,i,u,l,g,y,x,_,C,N,A;for(N=e.e.a.c.length,y=new V(e.e.a);y.a<y.c.c.length;)g=v(q(y),61),g.j=!1;for(e.i=Ae(ar,rr,26,N,12,1),e.g=Ae(ar,rr,26,N,12,1),e.n=new Ye,l=0,A=new Ye,_=new V(e.e.a);_.a<_.c.c.length;)x=v(q(_),61),x.b=l++,x.c.c.length==0&&$e(e.n,x),Bn(A,x.g);for(n=0,u=new V(A);u.a<u.c.c.length;)i=v(q(u),89),i.b=n++,i.e=!1;C=A.c.length,e.b==null||e.b.length<C?(e.b=Ae(fa,Ti,26,C,12,1),e.c=Ae(Qv,bv,26,C,13,1)):lb(e.c),e.d=A,e.p=new MK(Pk(e.d.c.length)),e.j=1}function NEe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye;for(ee=e.d,re=n.d,B=v(Vs(e,(vr(),Wi)).mb().H(),7),de=v(Vs(e,hi).mb().H(),7),F=v(Vs(n,Wi).mb().H(),7),ye=v(Vs(n,hi).mb().H(),7),A=v(nr(B.b,Ae(la,ia,12,1,0,1)),47),oe=v(nr(de.e,Ae(la,ia,12,1,0,1)),47),O=v(nr(F.b,Ae(la,ia,12,1,0,1)),47),ce=v(nr(ye.e,Ae(la,ia,12,1,0,1)),47),Fr(e,re),l=0,_=O.length;l<_;++l)i=O[l],An(i,B);for(g=0,C=ce.length;g<C;++g)i=ce[g],qn(i,de);for(Fr(n,ee),y=0,N=A.length;y<N;++y)i=A[y],An(i,F);for(u=0,x=oe.length;u<x;++u)i=oe[u],qn(i,ye)}function TEe(e){var n,i,u,l,g,y,x,_;for(g=new V(e.a.b);g.a<g.c.c.length;)l=v(q(g),25),l.vc();for(_=new wt(ji,ji),n=new wt(Zr,Zr),u=new V(e.a.b);u.a<u.c.c.length;)i=v(q(u),25),_.a=dn(_.a,i.j.d),_.b=dn(_.b,i.j.e),n.a=Xe(n.a,i.j.d+i.j.c),n.b=Xe(n.b,i.j.e+i.j.b);for(x=T7(e.c).mb();x.G();)y=v(x.H(),27),i=v(y.b,25),_.a=dn(_.a,i.j.d),_.b=dn(_.b,i.j.e),n.a=Xe(n.a,i.j.d+i.j.c),n.b=Xe(n.b,i.j.e+i.j.b);e.d=Px(new wt(_.a,_.b)),e.e=Mu(new wt(n.a,n.b),_),e.a.a.c=Ae(ht,et,1,0,4,1),e.a.b.c=Ae(ht,et,1,0,4,1)}function dne(e){var n,i,u,l,g,y,x;if(x=v(ut(e.f,0),7),x.e.c.length!=0&&x.b.c.length!=0)throw new oc("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.");if(x.e.c.length!=0){for(g=ji,i=new V(x.e);i.a<i.c.c.length;)n=v(q(i),12),y=n.d.f,u=v(J(y,(Fe(),Cv)),65),g=dn(g,y.i.a-u.b);return new e1(Pt(g))}if(x.b.c.length!=0){for(l=Zr,i=new V(x.b);i.a<i.c.c.length;)n=v(q(i),12),y=n.c.f,u=v(J(y,(Fe(),Cv)),65),l=Xe(l,y.i.a+y.j.a+u.c);return new e1(Pt(l))}return sb(),sb(),z_}function MEe(e,n,i,u,l,g){var y,x,_,C,N,A,O;return C=u==(vr(),Wi)?g.c:g.d,_=Bk(n),C.f==i?(y=v(ln(e.b,C),9),y||(y=Uy(C,v(J(i,(Fe(),Ct)),28),l,u==Wi?-1:1,C.j,_,n),_e(y,(Ce(),_t),C),kn(e.b,C,y))):(N=v(J(g,(Fe(),gs)),15).a,y=Uy((A=new M,O=v(J(n,(Ce(),Qi)),15).a*v(J(n,(Wt(),xu)),15).a/2,_e(A,cg,new cn(O)),A),v(J(i,Ct),28),l,u==Wi?-1:1,new wt(N,N),_,n),x=Qxe(e,y,i,u),_e(y,_t,x),kn(e.b,x,y)),v(J(n,(Ce(),Xr)),18).ib((_r(),ks)),Bs(v(J(n,(Fe(),Ct)),28))?_e(n,Ct,(Zn(),Mv)):_e(n,Ct,(Zn(),vs)),y}function jEe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve;u=v(J(n,(Wt(),Y9)),15).a,Ee=v(J(n,dg),24).a,O=4,l=3,ze=20/Ee,B=!1,_=0,y=Sr;do{for(g=_!=1,A=_!=0,Ve=0,re=e.a,ce=0,ye=re.length;ce<ye;++ce)F=re[ce],F.g=null,vCe(e,F,g,A,u),Ve+=ci(F.a);do x=V_e(e,n);while(x);for(ee=e.a,oe=0,de=ee.length;oe<de;++oe)if(F=ee[oe],i=_7(F).a,i!=0)for(N=new V(F.f);N.a<N.c.c.length;)C=v(q(N),9),C.i.b+=i;_==0||_==1?(--O,O<=0&&(Ve<y||-O>Ee)?(_=2,y=Sr):_==0?(_=1,y=Ve):(_=0,y=Ve)):(B=Ve>=y||y-Ve<ze,y=Ve,B&&--l)}while(!(B&&l<=0))}function zA(e,n,i){var u,l,g,y,x,_,C,N,A,O,B;for(A=v(nr(e.f,Ae(tae,hre,7,e.f.c.length,0,1)),346),C=0,N=A.length;C<N;++C){if(_=A[C],i!=(vr(),Wi))for(x=v(nr(_.e,Ae(la,ia,12,_.e.c.length,0,1)),47),l=0,g=x.length;l<g;++l)u=x[l],B=v(J(u.d.f,(Wt(),Tr)),85),!Gt(Oe(Yt(J(u,(Ce(),wu)))))&&!(n==(ra(),fg)&&B==Ku)&&Il(u,!0);if(i!=hi)for(y=v(nr(_.b,Ae(la,ia,12,_.b.c.length,0,1)),47),l=0,g=y.length;l<g;++l)u=y[l],O=v(J(u.c.f,(Wt(),Tr)),85),!Gt(Oe(Yt(J(u,(Ce(),wu)))))&&!(n==(ra(),qv)&&O==Uc)&&Il(u,!0)}}function AEe(e,n,i,u){var l,g,y,x,_;if(y=e.g,y==(De(),mr)&&n!=(Zn(),vs)&&n!=(Zn(),Ac)&&(y=Jte(e,i),Qt(e,y),J(e,(Fe(),Hl))==null&&y!=mr&&(e.i.a!=0||e.i.b!=0)&&_e(e,Hl,new cn(dxe(e,y)))),n==(Zn(),bs)){switch(_=0,y.e){case 1:case 3:g=e.f.j.a,g>0&&(_=e.i.a/g);break;case 2:case 4:l=e.f.j.b,l>0&&(_=e.i.b/l)}_e(e,(Ce(),$u),_)}if(x=e.j,u)e.a.a=u.a,e.a.b=u.b;else if(n!=vs&&n!=Ac&&y!=mr)switch(y.e){case 1:e.a.a=x.a/2;break;case 2:e.a.a=x.a,e.a.b=x.b/2;break;case 3:e.a.a=x.a/2,e.a.b=x.b;break;case 4:e.a.b=x.b/2}else e.a.a=x.a/2,e.a.b=x.b/2}function IEe(e){var n,i,u,l;if(qe(e.a,10))return ao(v(e.a,10));if(qe(e.a,66))return Yme(v(e.a,86));if(qe(e.a,50))return v(e.a,50).Wc();if(qe(e.a,191)){for(n=new d6,l=(u=new Sb(new Cb(new n1(v(e.a,191).a).a).b),new r1(u));ox(l.a.a);)P7(n,(i=Mx(l.a),i.yb()));return n}else{if(qe(e.a,13))return new dc(v(e.a,13));if(qe(e.a,44)){for(n=new Hi,l=gn(v(e.a,44),0);l.b!=l.d.c;)vn(n,v(on(l),10));return n}else if(qe(e.a,58)){for(n=new ti,l=gn(v(e.a,58),0);l.b!=l.d.c;)vn(n,on(l));return n}else return e.a}}function ld(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F;x=0,F=0,_=Ej(e.f,e.f.length),g=e.d,y=e.i,u=e.a,l=e.b;do{for(B=0,N=new V(e.p);N.a<N.c.c.length;)C=v(q(N),9),O=mne(e,C),i=!0,(e.q==(Nl(),Rv)||e.q==Gv)&&(i=Gt(Oe(Yt(O.b)))),v(O.a,24).a<0&&i?(++B,_=Ej(e.f,e.f.length),e.d=e.d+v(O.a,24).a,F+=g-e.d,g=e.d+v(O.a,24).a,y=e.i,u=yl(e.a),l=yl(e.b)):(e.f=Ej(_,_.length),e.d=g,e.a=(Pt(u),u?new dc((is(),u)):R1(new V(null))),e.b=(Pt(l),l?new dc((is(),l)):R1(new V(null))),e.i=y);++x,A=B!=0&&Gt(Oe(Yt(n.B(new Er(St(F),St(x))))))}while(A)}function LEe(e,n,i,u){var l,g,y,x,_,C,N;if(!ul(new V(Kb(e))))return u;for(N=mX(v(hr(e,(Fe(),ya)),86)),_=new V(Kb(e));_.a<_.c.c.length;)x=v(q(_),129),C=mX(v(hr(x,ya),86)),C==(m_(),hE)&&(C=N),Ove(x,C.e),l=b2e(i,C),l.c=Xe(l.c,x.e.j.a),l.b+=x.e.j.b+n;for(y=new q1(new i1(i).a);N1(y.a);)switch(g=(y.b=wl(y.a),new x1(y.c,y.b)),l=v(g.b.b[g.a.e],62),l.b-=n,v(g.a,67).e){case 12:case 13:case 14:u.d=Xe(u.d,l.b+n);break;case 15:u.b=Xe(u.b,l.c+n);break;case 17:u.c=Xe(u.c,l.c+n);break;case 18:case 19:case 20:u.a=Xe(u.a,l.b+n)}return u}function UA(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee;for(nJ(this),i==(vl(),yu)?Tn(this.g,e):Tn(this.o,e),B=hs,O=5e-324,C=(y=new un(n.a).a.bb().mb(),new hn(y));C.a.G();)x=(l=v(C.a.H(),21),v(l.yb(),27)),N=v(x.a,223),u=v(x.b,12),A=u.c,A==e&&(A=u.d),N==yu?Tn(this.g,A):Tn(this.o,A),ee=En(be(ve(Xt,1),Jt,10,0,[A.f.i,A.i,A.a])).b,B=B<ee?B:ee,O=O>ee?O:ee;for(F=En(be(ve(Xt,1),Jt,10,0,[e.f.i,e.i,e.a])).b,aee(this,F,B,O),_=(g=new un(n.a).a.bb().mb(),new hn(g));_.a.G();)x=(l=v(_.a.H(),21),v(l.yb(),27)),Tn(this.c,v(x.b,12));this.f=!1}function OEe(e,n,i,u){var l,g,y,x,_,C;if(x=(Fe(),Pv).b,!(x in n.a&&zn(n,x).ic().a)){if(C=zn(n,C_),C){if(!C.lc())throw new Gs("A label's 'text' property must be a string.",C,n)}else throw new Gs("Labels must have a property 'text'.",null,n);if(_=C.lc().a,g=new G6(_),_e(g,(Ce(),_t),n),kn(e.f,g,n),i_(n,g),My(n,g),qe(i,9)?$e(v(i,9).c,g):qe(i,12)?$e(v(i,12).b,g):qe(i,7)&&$e(v(i,7).c,g),qe(i,12))switch(y=v(J(g,Ta),107),i_(n,g),_e(g,Ta,y),l=v(J(u,Xr),18),y.e){case 2:case 3:l.ib((_r(),og));case 1:case 0:l.ib((_r(),ag)),_e(g,Ta,(Ys(),xv))}}}function FA(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe;for(g=0,y=0,C=new V(e.a);C.a<C.c.c.length;)x=v(q(C),9),g=Xe(g,x.e.b),y=Xe(y,x.e.c);for(_=new V(e.a);_.a<_.c.c.length;){switch(x=v(q(_),9),i=v(J(x,(Fe(),Mo)),103),i.e){case 1:F=0;break;case 2:F=1;break;case 5:F=.5;break;default:for(u=0,A=0,B=new V(x.f);B.a<B.c.c.length;)O=v(q(B),7),O.b.c.length==0||++u,O.e.c.length==0||++A;u+A==0?F=.5:F=A/(u+A)}re=e.c,N=x.j.a,oe=(re.a-N)*F,F>.5?oe-=y*2*(F-.5):F<.5&&(oe+=g*2*(.5-F)),l=x.e.b,oe<l&&(oe=l),ee=x.e.c,oe>re.a-ee-N&&(oe=re.a-ee-N),x.i.a=n+oe}}function DEe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt;return i=e.l&8191,u=e.l>>13|(e.m&15)<<9,l=e.m>>4&8191,g=e.m>>17|(e.h&255)<<5,y=(e.h&1048320)>>8,x=n.l&8191,_=n.l>>13|(n.m&15)<<9,C=n.m>>4&8191,N=n.m>>17|(n.h&255)<<5,A=(n.h&1048320)>>8,Be=i*x,tt=u*x,lt=l*x,dt=g*x,vt=y*x,_!=0&&(tt+=i*_,lt+=u*_,dt+=l*_,vt+=g*_),C!=0&&(lt+=i*C,dt+=u*C,vt+=l*C),N!=0&&(dt+=i*N,vt+=u*N),A!=0&&(vt+=i*A),B=Be&fo,F=(tt&511)<<13,O=B+F,re=Be>>22,oe=tt>>9,ce=(lt&262143)<<4,de=(dt&31)<<17,ee=re+oe+ce+de,Ee=lt>>18,ze=dt>>5,Ve=(vt&4095)<<8,ye=Ee+ze+Ve,ee+=O>>22,O&=fo,ye+=ee>>22,ee&=fo,ye&=Sc,pc(O,ee,ye)}function BEe(e,n,i,u){var l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze;if(re=e.d.c.c.c.length,i>=re-1)return null;for(l=new Ye,l.c[l.c.length]=n,ye=n,y=i,F=-1,x=v(ut(e.d.c.c,i),16),B=0;B<x.a.c.length;++B)if(oe=v(ut(x.a,B),9),oe==n){F=B;break}if(ee=ZA(e,1,F,i,re,e.a),!ee)return null;for(Ee=e.a,O=0,g=0;ye&&Ee>1&&y<re-1;)N=tne(e,ye),A=v(ut(e.d.c.c,y+1),16),ze=v(ee.sb(O++),24).a,ce=sc(ze,A.a.c.length),od(N,ce,A),ye&&(l.c[l.c.length]=ye),ye=N,--Ee,++g,++y;for(de=(u-(l.c.length-1)*e.d.d)/l.c.length,C=new V(l);C.a<C.c.c.length;)_=v(q(C),9),_.j.a=de;return new Er(St(g),de)}function REe(e,n,i,u){var l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze;if(i<=0)return null;for(l=new Ye,l.c[l.c.length]=n,ye=n,y=i,F=-1,x=v(ut(e.d.c.c,i),16),B=0;B<x.a.c.length;++B)if(re=v(ut(x.a,B),9),re==n){F=B;break}if(ee=ZA(e,0,F,i,e.d.c.c.c.length,e.a),!ee)return null;for(Ee=e.a,O=0,g=0,de=F;ye&&Ee>1&&y>1;)N=tne(e,ye),x=v(ut(e.d.c.c,y),16),A=v(ut(e.d.c.c,y-1),16),ze=v(ee.sb(O++),24).a,oe=sc(ze,A.a.c.length),od(ye,oe,A),od(N,de,x),de=oe,ye&&(l.c[l.c.length]=ye),ye=N,--Ee,++g,--y;for(ce=(u-(l.c.length-1)*e.d.d)/l.c.length,C=new V(l);C.a<C.c.c.length;)_=v(q(C),9),_.j.a=ce;return new Er(St(g),ce)}function GEe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F;if(e.b=e.c,F=Yt(J(n,(Fe(),eL))),B=F==null||Gt((xr(F),F)),g=v(J(n,(Ce(),Xr)),18).kb((_r(),ks)),l=v(J(n,Ct),28),i=!(l==(Zn(),wd)||l==bs||l==fi),B&&(i||!g)){for(A=new V(n.b);A.a<A.c.c.length;)C=v(q(A),9),C.k=0;for(O=new Ye,N=new V(n.b);N.a<N.c.c.length;)if(C=v(q(N),9),u=ine(e,C,null),u){for(_=new hj,Du(_,n),_e(_,Xf,v(u.b,18)),kQ(_.a,n.a),x=v(u.a,20).mb();x.G();)y=v(x.H(),9),$e(_.b,y),y.a=_;O.ib(_)}g&&(e.b=e.a)}else O=new Eo(be(ve(b3e,1),{38:1,39:1,42:1,3:1,8:1,5:1,6:1},55,0,[n]));return O}function HEe(e){var n,i,u,l,g,y,x,_,C;for(i=new V(e.a.a.b);i.a<i.c.c.length;)for(n=v(q(i),25),y=n.i.mb();y.G();)g=v(y.H(),25),n.f!=g.f&&(gf(e.a.d)?_=e.a.g.tc(n,g):_=e.a.g.uc(n,g),u=n.g.a+n.j.c+_-g.g.a,u=Math.ceil(u),u=0>u?0:u,n.o&&g.o&&qe(n,82)&&qe(g,82)&&!xk(pj(v(n,82).d,v(g,82).d))?(l=_b(new lp,e.d),x=ur(m1(g.g.a-n.g.a)),ud(Lh(Dh(Bh(Oh(new hf,0>x?0:x),1),l),e.c[n.f.d])),ud(Lh(Dh(Bh(Oh(new hf,0>-x?0:-x),1),l),e.c[g.f.d]))):(C=1,(qe(n,82)&&qe(g,93)||qe(g,82)&&qe(n,93))&&(C=2),ud(Lh(Dh(Bh(Oh(new hf,ur(u)),C),e.c[n.f.d]),e.c[g.f.d]))))}function pne(){pne=s,pL=new Qr,dL=cd(be(ve(zf,1),et,79,0,[(Fe(),qI),iie])),hL=cd(be(ve(zf,1),et,79,0,[WI,Uu,(Wt(),$9),aie,(Ce(),vo),dg,Z9])),uL=cd(be(ve(zf,1),et,79,0,[tie,Xp,Pv,rie,oie,QI,sie,rE,eL,Ev,hC,F9,vC,V9,Zv,q9,K9,kC,pC])),fL=cd(be(ve(zf,1),et,79,0,[tg,eg,yd,gs,Hl,uC,_s,Nd,Qi,hg,xu,Y9])),lL=cd(be(ve(zf,1),et,79,0,[Nv,Mo,Zo,Ff,Ta,$I,KI,J_,X_,eE,tE,nE,Ct,Sv,dC,bC,wC,jd,Im,xC,Om,Lm,yC,Tr,Dm,_C,EC,pg,mC])),cL=cd(be(ve(zf,1),et,79,0,[ya,jc,Tv,gC])),lm=cd(be(ve(zf,1),et,79,0,[kv,W_,ir,Cv,zu,md])),Hie=cd(be(ve(zf,1),et,79,0,[(Pj(),oL)]))}function gne(e){var n,i,u,l,g,y,x;for(n=0,g=new V(e.b.a);g.a<g.c.c.length;)u=v(q(g),78),u.b=0,u.c=0;for(dte(e,0),zk(e,e.g),Hy(e.c),a6(e.c),i=(Jn(),Ka),cu(fb(Zs(cu(fb(Zs(cu(Zs(e.c,i)),NX(i)))),i))),Zs(e.c,Ka),Dk(e,e.g),fte(e,0),cne(e,0),Ote(e,1),dte(e,1),zk(e,e.d),Hy(e.c),y=new V(e.b.a);y.a<y.c.c.length;)u=v(q(y),78),n+=ci(u.c);for(x=new V(e.b.a);x.a<x.c.c.length;)u=v(q(x),78),u.b=0,u.c=0;for(i=bu,cu(fb(Zs(cu(fb(Zs(cu(a6(Zs(e.c,i))),NX(i)))),i))),Zs(e.c,Ka),Dk(e,e.d),fte(e,1),cne(e,1),Ote(e,0),a6(e.c),l=new V(e.b.a);l.a<l.c.c.length;)u=v(q(l),78),n+=ci(u.c);return n}function zEe(e){var n,i,u,l,g,y,x;for(n=new Ye,e.g=new Ye,e.d=new Ye,y=new Af(new Tu(e.f.b).a);y.b;)g=Lp(y),$e(n,v(v(g.zb(),27).b,25)),gf(v(g.yb(),251).yc())?$e(e.d,v(g.zb(),27)):$e(e.g,v(g.zb(),27));for(zk(e,e.d),zk(e,e.g),e.c=new pA(e.b),LZ(e.c,(i6(),Yie)),Dk(e,e.d),Dk(e,e.g),Bn(n,e.c.a.b),e.e=new wt(ji,ji),e.a=new wt(Zr,Zr),u=new V(n);u.a<u.c.c.length;)i=v(q(u),25),e.e.a=dn(e.e.a,i.j.d),e.e.b=dn(e.e.b,i.j.e),e.a.a=Xe(e.a.a,i.j.d+i.j.c),e.a.b=Xe(e.a.b,i.j.e+i.j.b);U2(e.c,new $),x=0;do l=gne(e),++x;while((x<2||l>hv)&&x<10);U2(e.c,new Z),gne(e),j1e(e.c),TEe(e.f)}function UEe(e){Mp();var n,i,u,l,g,y,x;for(x=new Jq,i=new V(e);i.a<i.c.c.length;)n=v(q(i),48),(!x.b||n.c>=x.b.c)&&(x.b=n),(!x.c||n.c<=x.c.c)&&(x.d=x.c,x.c=n),(!x.e||n.d>=x.e.d)&&(x.e=n),(!x.f||n.d<=x.f.d)&&(x.f=n);return u=new Cy((zb(),Oc)),Ob(e,Jie,new Eo(be(ve(Dv,1),et,160,0,[u]))),y=new Cy(Vl),Ob(e,Wie,new Eo(be(ve(Dv,1),et,160,0,[y]))),l=new Cy(Yl),Ob(e,Qie,new Eo(be(ve(Dv,1),et,160,0,[l]))),g=new Cy(Zf),Ob(e,Kie,new Eo(be(ve(Dv,1),et,160,0,[g]))),f_(u.c,Oc),f_(l.c,Yl),f_(g.c,Zf),f_(y.c,Vl),x.a.c=Ae(ht,et,1,0,4,1),Bn(x.a,u.c),Bn(x.a,Ek(l.c)),Bn(x.a,g.c),Bn(x.a,Ek(y.c)),x}function FEe(e){var n,i,u,l,g,y,x,_,C,N;for(l=v(QZ(e,(Fe(),yd)),15).a,x=new V(Gee(e));x.a<x.c.c.length;){for(y=v(q(x),626),i=new fne(y),i.d=l,i.k=v(hr(y,JI),15).a,u=v(hr(y,Sv),149),n=Gt(Oe(Yt(J(v(y.e,9),(Ce(),A9))))),N=new V(Ec(y));N.a<N.c.c.length;)C=v(q(N),161),u==(td(),aE)?YEe(C,n,l):u==jv&&wCe(C,l),F_e(C);MCe(i,v(hr(y,jc),86).kb((Bu(),Iv))),Q_e(i),LEe(i.e,i.d,i.c,i.p),hCe(i),Bxe(i),xye(i),_=new qK((g=v(y.e,9).b,new UK(g.d,g.b,g.a,g.c))),_.b=i.p.b+i.q.b,_.c=i.p.c+i.q.c,_.d=i.p.d+i.q.d,_.a=i.p.a+i.q.a,v(y.e,9).b.b=_.b,v(y.e,9).b.d=_.d,v(y.e,9).b.c=_.c,v(y.e,9).b.a=_.a}}function bne(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;for(_=v(lr(e,(De(),ct)).mb().H(),7).b,B=v(lr(e,at).mb().H(),7).e,x=_.c.length,de=Yi(v(ut(e.f,0),7));x-- >0;){for(ee=(On(0,_.c.length),v(_.c[0],12)),l=(On(0,B.c.length),v(B.c[0],12)),ce=l.d.b,g=Vi(ce,l,0),Xye(ee,l.d,g),qn(l,null),An(l,null),F=ee.a,n&&vn(F,new tr(de)),u=gn(l.a,0);u.b!=u.d.c;)i=v(on(u),10),vn(F,new tr(i));for(oe=ee.b,O=new V(l.b);O.a<O.c.c.length;)A=v(q(O),33),oe.c[oe.c.length]=A;if(re=v(J(ee,(Fe(),ir)),44),y=v(J(l,ir),44),y)for(re||(re=new Hi,_e(ee,ir,re)),N=gn(y,0);N.b!=N.d.c;)C=v(on(N),10),vn(re,new tr(C))}}function YEe(e,n,i){var u,l,g,y,x;if(g=pW(Qb(e)),!g.Nb().V()){switch(x=0,v(e.e,7).g.e){case 4:case 2:x=n&&Gt(Oe(Yt(J(v(e.e,7),(Ce(),Ioe)))))?e.e.j.b:(e.e.j.b-v(g.Nb().sb(0),129).pc().b)/2-i;break;case 1:x=e.e.j.b;break;case 3:x=0}for(v(e.e,7).g==(De(),kt)&&Tp(g),l=new V(Qb(e));l.a<l.c.c.length;){switch(u=v(q(l),129),y=new tr(e.e.i),v(e.e,7).g.e){case 4:y.a=e.e.j.a+i,y.b=x+i,x+=i+u.e.j.b;break;case 2:y.a=-u.e.j.a-i,y.b=x+i,x+=i+u.e.j.b;break;case 1:y.a=(e.e.j.a-u.e.j.a)/2,y.b=x+i,x+=i+u.e.j.b;break;case 3:y.a=(e.e.j.a-u.e.j.a)/2,y.b=x-i-u.e.j.b,x-=i+u.e.j.b}u.e.i.a=y.a,u.e.i.b=y.b}}}function VEe(e,n){var i,u,l,g,y,x,_,C,N,A;for(e.a=new C7(Swe(wv)),u=new V(n.a);u.a<u.c.c.length;){for(i=v(q(u),347),x=new Ey(be(ve(fm,1),et,25,0,[])),$e(e.a.a,x),C=new V(i.d);C.a<C.c.c.length;)_=v(q(C),62),N=new U6(e,_),YA(N,v(J(i.c,(Ce(),Xf)),18)),Jh(e.g,i)||(kn(e.g,i,new wt(_.d,_.e)),kn(e.f,i,N)),$e(e.a.b,N),by(x,N);for(y=new V(i.b);y.a<y.c.c.length;)g=v(q(y),251),N=new U6(e,g.Bc()),kn(e.b,g,new Er(x,N)),YA(N,v(J(i.c,(Ce(),Xf)),18)),g.zc()&&(A=new gj(e,g.zc(),1),YA(A,v(J(i.c,Xf),18)),l=new Ey(be(ve(fm,1),et,25,0,[])),by(l,A),Tt(e.c,g.yc(),new Er(x,A)))}return e.a}function qEe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;if(ee=n.c.c.length,!(ee<3)){for(B=Ae(ar,rr,26,ee,12,1),A=0,N=new V(n.c);N.a<N.c.c.length;)C=v(q(N),16),B[A++]=C.a.c.length;for(O=new Cn(n.c,2),u=1;u<ee-1;u++)for(i=(xt(O.b<O.d.Y()),v(O.d.sb(O.c=O.b++),16)),F=new V(i.a),g=0,x=0,_=0;_<B[u+1];_++)if(de=v(q(F),9),_==B[u+1]-1||SA(e,de,u+1,u)){for(y=B[u]-1,SA(e,de,u+1,u)&&(y=e.d.e[v(v(v(ut(e.d.b,de.k),20).sb(0),27).a,9).k]);x<=_;){if(ce=v(ut(i.a,x),9),!SA(e,ce,u+1,u))for(oe=v(ut(e.d.b,ce.k),20).mb();oe.G();)re=v(oe.H(),27),l=e.d.e[v(re.a,9).k],(l<g||l>y)&&Tn(e.c,v(re.b,12));++x}g=y}}}function vne(e,n,i){var u,l,g,y,x,_;for(this.g=e,x=n.d.length,_=i.d.length,this.d=Ae(Nr,Zi,9,x+_,0,1),y=0;y<x;y++)this.d[y]=n.d[y];for(g=0;g<_;g++)this.d[x+g]=i.d[g];if(n.e){if(this.e=Ca(n.e),this.e.nb(i),i.e)for(l=i.e.mb();l.G();)u=v(l.H(),102),u!=n&&(this.e.kb(u)?--u.c:this.e.ib(u))}else i.e&&(this.e=Ca(i.e),this.e.nb(n));this.f=n.f+i.f,this.a=n.a+i.a,this.a>0?wk(this,this.f/this.a):Ha(n.g,n.d[0]).a!=null&&Ha(i.g,i.d[0]).a!=null?wk(this,(Oe(Ha(n.g,n.d[0]).a)+Oe(Ha(i.g,i.d[0]).a))/2):Ha(n.g,n.d[0]).a!=null?wk(this,Ha(n.g,n.d[0]).a):Ha(i.g,i.d[0]).a!=null&&wk(this,Ha(i.g,i.d[0]).a)}function ZEe(e,n){var i,u,l,g,y,x,_,C,N,A,O;switch(e.g.e){case 1:if(u=v(J(e,(Ce(),_t)),12),i=v(J(u,B9),44),i?Gt(Oe(Yt(J(u,wu))))&&(i=Tk(i)):i=new Hi,C=v(J(e,Ki),7),N=En(be(ve(Xt,1),Jt,10,0,[C.f.i,C.i,C.a])),n<=N.a)return N.b;if(Cr(i,N,i.a,i.a.a),A=v(J(e,Ii),7),O=En(be(ve(Xt,1),Jt,10,0,[A.f.i,A.i,A.a])),O.a<=n)return O.b;for(Cr(i,O,i.c.b,i.c),_=gn(i,0),y=v(on(_),10),x=v(on(_),10);x.a<n&&_.b!=_.d.c;)y=x,x=v(on(_),10);return y.b+(n-y.a)/(x.a-y.a)*(x.b-y.b);case 3:switch(g=v(J(v(ut(e.f,0),7),(Ce(),_t)),7),l=g.f,g.g.e){case 1:return l.i.b;case 3:return l.i.b+l.j.b}}return Xj(e).b}function yne(e){var n,i,u,l,g,y,x,_,C,N,A,O;if(N=ot(J(e.c.f,(Ce(),Kl)))===ot(J(e.d.f,Kl)),y=new Wr,i=v(J(e,(Fe(),W_)),44),i&&i.b>=2)for(ou(e.a),u=0,O=gn(i,0);O.b!=O.d.c;)A=v(on(O),10),u==0?(n=Mu(Mu(new wt(A.a,A.b),e.c.i),e.c.f.i),e.c.a.a=n.a,e.c.a.b=n.b):u==i.b-1?(n=Mu(Mu(new wt(A.a,A.b),e.d.i),e.d.f.i),e.d.a.a=n.a,e.d.a.b=n.b):vn(e.a,A),++u;if(N)for(_=gn(e.a,0);_.b!=_.d.c;)x=v(on(_),10),y.a=Xe(y.a,x.a),y.b=Xe(y.b,x.b);for(g=new V(e.b);g.a<g.c.c.length;)l=v(q(g),33),C=v(J(l,md),10),C&&(l.i.a=C.a,l.i.b=C.b),N&&(y.a=Xe(y.a,l.i.a+l.j.a),y.b=Xe(y.b,l.i.b+l.j.b));return y}function $Ee(e,n,i){var u,l,g,y,x,_,C;if(cA(n),u=v(J(i,(Ce(),Xr)),18),y=new lo(i),_e(y,_t,n),$e(i.b,y),g=v(zn(n,"id"),97),ty(e.i,g.a,y),kn(e.j,y,n),i_(n,y),My(n,y),"ports"in n.a){if(C=zn(n,"ports"),!C.hc())throw new Gs("The 'ports' property of the node must be an array.",C,n);for(_=C.hc(),l=0;l<_.a.length;++l)qe(vc(_,l),69)&&yEe(e,v(vc(_,l),69),y,i)}return dA(e,n,y,i),Kp in n.a&&zn(n,Kp).hc().a.length>0&&_e(y,A9,(jn(),jn(),di)),x=v(J(y,(Fe(),Ct)),28),x==(Zn(),Ac)||x!=vs&&u.ib((_r(),Qf)),Gt(Oe(Yt(J(y,Xp))))&&u.ib((_r(),XE)),Gt(Oe(Yt(J(y,Ev))))&&(u.ib((_r(),eC)),u.ib(Sm),_e(y,Ct,vs)),y}function YA(e,n){n.V()&&Ua(e.n,!0,!0,!0,!0),n.t((De(),kd))&&Ua(e.n,!0,!0,!0,!1),n.t(xd)&&Ua(e.n,!1,!0,!0,!0),n.t(_d)&&Ua(e.n,!0,!0,!1,!0),n.t(Ed)&&Ua(e.n,!0,!1,!0,!0),n.t(Ul)&&Ua(e.n,!1,!0,!0,!1),n.t(zl)&&Ua(e.n,!1,!0,!1,!0),n.t(Fl)&&Ua(e.n,!0,!1,!1,!0),n.t(Vf)&&Ua(e.n,!0,!1,!0,!1),n.t(ys)&&Ua(e.n,!0,!0,!0,!0),n.t(Fu)&&Ua(e.n,!0,!0,!0,!0),n.t(ys)&&Ua(e.n,!0,!0,!0,!0),n.t(Ia)&&Ua(e.n,!0,!0,!0,!0),n.t(Ja)&&Ua(e.n,!0,!0,!0,!0),n.t(Wa)&&Ua(e.n,!0,!0,!0,!0),n.t(Jr)&&Ua(e.n,!0,!0,!0,!0)}function mne(e,n){var i,u,l,g,y,x,_,C,N,A;for(_=!0,l=0,C=e.f[n.k],N=n.j.b+e.n,i=e.c[n.k][2],ml(e.a,C,St(v(ut(e.a,C),24).a-1+i)),ml(e.b,C,Oe(qt(ut(e.b,C)))-N+i*e.e),++C,C>=e.i?(++e.i,$e(e.a,St(1)),$e(e.b,N)):(u=e.c[n.k][1],ml(e.a,C,St(v(ut(e.a,C),24).a+1-u)),ml(e.b,C,Oe(qt(ut(e.b,C)))+N-u*e.e)),(e.q==(Nl(),Rv)&&(v(ut(e.a,C),24).a>e.j||v(ut(e.a,C-1),24).a>e.j)||e.q==Gv&&(Oe(qt(ut(e.b,C)))>e.k||Oe(qt(ut(e.b,C-1)))>e.k))&&(_=!1),y=Ht(Dr(n));Bt(y);)g=v(It(y),12),x=g.c.f,e.f[x.k]==C&&(A=mne(e,x),l=l+v(A.a,24).a,_=_&&Gt(Oe(Yt(A.b))));return e.f[n.k]=C,l=l+e.c[n.k][0],new Er(St(l),(jn(),_?di:Vn))}function VA(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe;if(O=new tr(e.j),oe=n.a/O.a,x=n.b/O.b,ee=n.a-O.a,g=n.b-O.b,i)for(l=ot(J(e,(Fe(),Ct)))===ot((Zn(),fi)),F=new V(e.f);F.a<F.c.c.length;)switch(B=v(q(F),7),B.g.e){case 1:l||(B.i.a*=oe);break;case 2:B.i.a+=ee,l||(B.i.b*=x);break;case 3:l||(B.i.a*=oe),B.i.b+=g;break;case 4:l||(B.i.b*=x)}for(C=new V(e.c);C.a<C.c.c.length;)_=v(q(C),33),N=_.i.a+_.j.a/2,A=_.i.b+_.j.b/2,re=N/O.a,y=A/O.b,re+y>=1&&(re-y>0&&A>=0?(_.i.a+=ee,_.i.b+=g*y):re-y<0&&N>=0&&(_.i.a+=ee*re,_.i.b+=g));e.j.a=n.a,e.j.b=n.b,_e(e,(Fe(),jc),(Bu(),u=v(ea(ng),11),new li(u,v(zi(u,u.length),11),0)))}function wne(e){var n,i,u,l,g,y,x,_,C,N;for(u=new Ye,y=new V(e.e.a);y.a<y.c.c.length;){for(l=v(q(y),61),N=0,l.k.c=Ae(ht,et,1,0,4,1),i=new V(If(l));i.a<i.c.c.length;)n=v(q(i),89),n.e&&($e(l.k,n),++N);N==1&&(u.c[u.c.length]=l)}for(g=new V(u);g.a<g.c.c.length;)for(l=v(q(g),61);l.k.c.length==1;){for(C=v(q(new V(l.k)),89),e.b[C.b]=C.f,x=C.c,_=C.d,i=new V(If(l));i.a<i.c.c.length;)n=v(q(i),89),n==C||(n.e?x==n.c||_==n.d?e.b[C.b]-=e.b[n.b]-n.f:e.b[C.b]+=e.b[n.b]-n.f:l==x?n.c==l?e.b[C.b]+=n.f:e.b[C.b]-=n.f:n.c==l?e.b[C.b]-=n.f:e.b[C.b]+=n.f);Ir(x.k,C),Ir(_.k,C),x==l?l=C.d:l=C.c}}function KEe(e){var n,i,u,l,g,y,x,_,C,N;for(C=new ti,x=new ti,g=new V(e);g.a<g.c.c.length;)u=v(q(g),77),u.e=u.d.c.length,u.k=u.j.c.length,u.e==0&&Cr(C,u,C.c.b,C.c),u.k==0&&u.g.a.Y()==0&&Cr(x,u,x.c.b,x.c);for(y=-1;C.b!=0;)for(u=v($j(C,0),77),i=new V(u.j);i.a<i.c.c.length;)n=v(q(i),117),N=n.b,N.n=ui(N.n,u.n+1),y=ui(y,N.n),--N.e,N.e==0&&Cr(C,N,C.c.b,C.c);if(y>-1){for(l=gn(x,0);l.b!=l.d.c;)u=v(on(l),77),u.n=y;for(;x.b!=0;)for(u=v($j(x,0),77),i=new V(u.d);i.a<i.c.c.length;)n=v(q(i),117),_=n.a,_.g.a.Y()==0&&(_.n=sc(_.n,u.n-1),--_.k,_.k==0&&Cr(x,_,x.c.b,x.c))}}function QEe(e,n,i,u){var l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee;for(_=new Ye,g=new V(n.b);g.a<g.c.c.length;)for(l=v(q(g),9),x=new V(l.f);x.a<x.c.c.length;){for(y=v(q(x),7),N=null,de=v(nr(y.e,Ae(la,ia,12,0,0,1)),47),ye=0,Ee=de.length;ye<Ee;++ye)ce=de[ye],rd(ce.d.f,i)||(oe=v_(e,n,i,ce,ce.c,(vr(),hi),N),oe!=N&&(_.c[_.c.length]=oe),oe.c&&(N=oe));for(C=null,F=v(nr(y.b,Ae(la,ia,12,0,0,1)),47),ee=0,re=F.length;ee<re;++ee)B=F[ee],rd(B.c.f,i)||(oe=v_(e,n,i,B,B.d,(vr(),Wi),C),oe!=C&&(_.c[_.c.length]=oe),oe.c&&(C=oe))}for(O=new V(_);O.a<O.c.c.length;)A=v(q(O),187),Vi(n.b,A.a,0)!=-1||$e(n.b,A.a),A.c&&(u.c[u.c.length]=A)}function WEe(e){var n,i,u,l,g,y,x,_,C;for(u=e.e.e.j,n=v(hr(e.e,(Fe(),jc)),86).kb((Bu(),Iv)),XCe(e),g=new V(Ec(e.e));g.a<g.c.c.length;){switch(l=v(q(g),161),x=v(hr(l,Hl),15),!x&&(x=new cn(0)),_=l.e.j,y=(i=v(l.e,7).d,new ss(i.d,i.b,i.a,i.c)),C=new tr(l.e.i),v(l.e,7).g.e){case 4:C.a=-_.a-x.a,C.b=e.s-_.b-(n?y.a:0),e.s-=Y2(e,(De(),ct))+_.b+(n?y.d+y.a:0);break;case 2:C.a=u.a+x.a,C.b=e.a+(n?y.d:0),e.a+=Y2(e,(De(),at))+_.b+(n?y.d+y.a:0);break;case 1:C.a=e.f+(n?y.b:0),C.b=-l.e.j.b-x.a,e.f+=Y2(e,(De(),bt))+_.a+(n?y.b+y.c:0);break;case 3:C.a=e.r-_.a-(n?y.c:0),C.b=u.b+x.a,e.r-=Y2(e,(De(),kt))+_.a+(n?y.b+y.c:0)}l.e.i.a=C.a,l.e.i.b=C.b}}function JEe(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe;for(N=new ta,A=new ta,re=new ta,oe=new ta,C=v(J(n,(Ce(),Qi)),15).a,g=C*v(J(n,(Wt(),xu)),15).a,Gt(Oe(Yt(J(n,(Fe(),_v))))),_=(O=new un(i.a).a.bb().mb(),new hn(O));_.a.G();)if(x=(y=v(_.a.H(),21),v(y.yb(),9)),B=v(J(x,$r),32),B==(De(),bt))for(A.a.db(x,A),l=Ht(Dr(x));Bt(l);)u=v(It(l),12),Tn(N,u.c.f);else if(B==kt)for(oe.a.db(x,oe),l=Ht(Dr(x));Bt(l);)u=v(It(l),12),Tn(re,u.c.f);N.a.Y()!=0&&(F=new e_(2,g),ee=DA(F,n,N,A,-C-n.d.b),ee>0&&(e.a=C+(ee-1)*g,n.d.b+=e.a,n.e.b+=e.a)),re.a.Y()!=0&&(F=new e_(1,g),ee=DA(F,n,re,oe,n.e.b+C-n.d.b),ee>0&&(n.e.b+=C+(ee-1)*g))}function xne(e,n){var i,u,l,g,y,x,_,C,N;return Ln(),n.length==0?e.fc(KA,w_,-1,-1):(N=El(n),es(N.substr(0,3),"at ")&&(N=Pp(N,3,N.length-3)),N=N.replace(/\[.*?\]/g,""),y=N.indexOf("("),y==-1?(y=N.indexOf("@"),y==-1?(C=N,N=""):(C=El(Pp(N,y+1,N.length-(y+1))),N=El(N.substr(0,y)))):(i=N.indexOf(")",y),C=N.substr(y+1,i-(y+1)),N=El(N.substr(0,y))),y=b1e(N,sA(46)),y!=-1&&(N=Pp(N,y+1,N.length-(y+1))),(N.length==0||es(N,"Anonymous function"))&&(N=w_),x=S1e(C,sA(58)),l=B1e(C,sA(58),x-1),_=-1,u=-1,g=KA,x!=-1&&l!=-1&&(g=C.substr(0,l),_=DK(C.substr(l+1,x-(l+1))),u=DK(Pp(C,x+1,C.length-(x+1)))),e.fc(g,N,_,u))}function XEe(e){var n,i,u,l,g,y,x,_,C,N;for(C=new Ye,x=new Ye,y=new V(e);y.a<y.c.c.length;)l=v(q(y),80),l.c=l.b.c.length,l.f=l.e.c.length,l.c==0&&(C.c[C.c.length]=l),l.f==0&&l.j.b==0&&(x.c[x.c.length]=l);for(u=-1;C.c.length!=0;)for(l=v(Nf(C,0),80),i=new V(l.e);i.a<i.c.c.length;)n=v(q(i),118),N=n.b,N.i=ui(N.i,l.i+1),u=ui(u,N.i),--N.c,N.c==0&&(C.c[C.c.length]=N);if(u>-1){for(g=new V(x);g.a<g.c.c.length;)l=v(q(g),80),l.i=u;for(;x.c.length!=0;)for(l=v(Nf(x,0),80),i=new V(l.b);i.a<i.c.c.length;)n=v(q(i),118),_=n.a,!(_.j.b>0)&&(_.i=sc(_.i,l.i-1),--_.f,_.f==0&&(x.c[x.c.length]=_))}}function eCe(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee;if(Gt(Oe(Yt(J(i,(Fe(),rE))))))for(x=new V(i.f);x.a<x.c.c.length;)for(y=v(q(x),7),A=v(nr(y.e,Ae(la,ia,12,y.e.c.length,0,1)),47),C=0,N=A.length;C<N;++C)_=A[C],g=_.d.f==i,l=g&&Gt(Oe(Yt(J(_,rE)))),l&&(B=_.c,O=v(ln(e.b,B),9),O||(O=Uy(B,(Zn(),vs),B.g,-1,B.j,v(J(n,Zo),59),n),_e(O,(Ce(),_t),B),kn(e.b,B,O),$e(n.b,O)),ee=_.d,F=v(ln(e.b,ee),9),F||(F=Uy(ee,(Zn(),vs),ee.g,1,ee.j,v(J(n,Zo),59),n),_e(F,(Ce(),_t),ee),kn(e.b,ee,F),$e(n.b,F)),u=lk(_),qn(u,v(ut(O.f,0),7)),An(u,v(ut(F.f,0),7)),Tt(e.a,_,new D1(u,n,(vr(),hi))),v(J(n,(Ce(),Xr)),18).ib((_r(),ks)))}function tCe(e,n,i,u,l,g){var y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;switch(B=Rp(e.g),ee=Rp(i.g),F=Nn(ao(e.i),e.a),re=Nn(ao(i.i),i.a),y=Nn(new tr(F),as(new gl(B),n)),x=Nn(new tr(re),as(new gl(ee),u)),C=kxe(e,l),l==(De(),kt)||l==at?C+=g:C-=g,O=new Wr,oe=new Wr,l.e){case 1:case 3:O.a=y.a,O.b=F.b+C,oe.a=x.a,oe.b=O.b;break;case 2:case 4:O.a=F.a+C,O.b=y.b,oe.a=O.a,oe.b=x.b;break;default:return null}switch(N=as(Nn(new wt(O.a,O.b),oe),.5),A=new ek(be(ve(Xt,1),Jt,10,0,[F,y,O,N,oe,x,re])),_=WX(A),de=JX(A),l.e){case 1:case 3:A.a=_,ce=Dxe(A);break;case 2:case 4:A.a=de,ce=Oxe(A);break;default:return null}return KM(A,new t_(be(ve(Xt,1),Jt,10,0,[_,de,ce,F,re]))),A}function nCe(e,n,i,u){var l,g,y,x,_,C,N,A,O,B;for(g=new rte(n),A=y_e(e,n,g),B=Xe(v(J(n,(Fe(),gs)),15).a,1),N=new V(A.a);N.a<N.c.c.length;)C=v(q(N),27),_=iX(v(C.a,10),v(C.b,10),B),o=!0,o=o&Au(i,new wt(_.d,_.e)),o=o&Au(i,Ea(new wt(_.d,_.e),_.c,0)),o=o&Au(i,Ea(new wt(_.d,_.e),0,_.b)),o&Au(i,Ea(new wt(_.d,_.e),_.c,_.b));switch(O=g.d,x=iX(v(A.b.a,10),v(A.b.b,10),B),O==(De(),ct)||O==at?(u.c[O.e]=dn(u.c[O.e],x.e),u.b[O.e]=Xe(u.b[O.e],x.e+x.b)):(u.c[O.e]=dn(u.c[O.e],x.d),u.b[O.e]=Xe(u.b[O.e],x.d+x.c)),l=Zr,y=g.c.f.e,O.e){case 4:l=y.c;break;case 2:l=y.b;break;case 1:l=y.a;break;case 3:l=y.d}return u.a[O.e]=Xe(u.a[O.e],l),g}function rCe(e,n,i,u,l){var g,y,x,_,C,N,A,O,B,F,ee,re;for(g=new Ye,C=new V(u);C.a<C.c.c.length;)if(x=v(q(C),187),y=null,x.f==(vr(),hi))for(F=new V(x.e);F.a<F.c.c.length;)B=v(q(F),12),re=B.d.f,Ui(re)==n?gJ(e,n,x,B,x.b,B.d):!i||rd(re,i)?zxe(e,n,x,u,B):(O=v_(e,n,i,B,x.b,hi,y),O!=y&&(g.c[g.c.length]=O),O.c&&(y=O));else for(A=new V(x.e);A.a<A.c.c.length;)if(N=v(q(A),12),ee=N.c.f,Ui(ee)==n)gJ(e,n,x,N,N.c,x.b);else{if(!i||rd(ee,i))continue;O=v_(e,n,i,N,x.b,Wi,y),O!=y&&(g.c[g.c.length]=O),O.c&&(y=O)}for(_=new V(g);_.a<_.c.c.length;)x=v(q(_),187),Vi(n.b,x.a,0)!=-1||$e(n.b,x.a),x.c&&(l.c[l.c.length]=x)}function iCe(e){var n,i,u,l;for(n=e.e.j,u=new V(Ec(e));u.a<u.c.c.length;){switch(i=v(q(u),161),l=v(hr(i,(Fe(),Hl)),15),!l&&(l=new cn(0)),v(i.e,7).g.e){case 4:i.e.i.b=n.b*Oe(qt(hr(i,qf))),i.e.i.a=-i.e.j.a-l.a;break;case 2:i.e.i.b=n.b*Oe(qt(hr(i,qf))),i.e.i.a=n.a+l.a;break;case 1:i.e.i.a=n.a*Oe(qt(hr(i,qf))),i.e.i.b=-i.e.j.b-l.a;break;case 3:i.e.i.a=n.a*Oe(qt(hr(i,qf))),i.e.i.b=n.b+l.a}switch(v(i.e,7).g.e){case 4:i.e.i.b=n.b*Oe(qt(hr(i,qf))),i.e.i.a=-i.e.j.a-l.a;break;case 2:i.e.i.b=n.b*Oe(qt(hr(i,qf))),i.e.i.a=n.a+l.a;break;case 1:i.e.i.a=n.a*Oe(qt(hr(i,qf))),i.e.i.b=-i.e.j.b-l.a;break;case 3:i.e.i.a=n.a*Oe(qt(hr(i,qf))),i.e.i.b=n.b+l.a}}}function aCe(e){var n,i,u,l,g,y,x,_,C;for(g=e.f,l=j7(ak(e)),C=gn(Ca(e.g),0);C.b!=C.d.c;)if(_=v(on(C),7),_.e.c.length==0){for(i=new V(_.b);i.a<i.c.c.length;)if(n=v(q(i),12),u=n.c,l.a.R(u)){for(y=new Cn(g.f,0),x=(xt(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),7));x!=_;)x=(xt(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),7));ju(y,u),Mb(C,u),By(u,_.g),Ab(C),Ab(C),l.a.eb(u)!=null}}else for(i=new V(_.e);i.a<i.c.c.length;)if(n=v(q(i),12),u=n.d,l.a.R(u)){for(y=new Cn(g.f,0),x=(xt(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),7));x!=_;)x=(xt(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),7));xt(y.b>0),y.a.sb(y.c=--y.b),ju(y,u),Mb(C,u),By(u,_.g),Ab(C),Ab(C),l.a.eb(u)!=null}}function oCe(e){var n,i,u,l,g,y,x,_,C;g=new j2(e),l=zn(g,"graph"),_=zn(g,"success"),u=zn(g,"error"),y=zn(g,"options");try{if(!l||!l.kc())throw new o1("Mandatory parameter missing, 'graph' must be specified");c2e(new KV,l.kc(),y?y.kc():null),x=l.kc().a,_&&_.kc()?ev(_.kc().a,x):ev(null,x)}catch(N){if(N=ni(N),qe(N,73))C=N,u&&u.kc()?ev(u.kc().a,ute(C).a):ev(null,ute(C).a);else if(qe(N,54))n=N,i=new df,Va(i,"type",new dl(l1(n.$c))),n.bc()!=null?Va(i,C_,new dl(n.bc())):Va(i,C_,new dl("null (sic)")),Va(i,rre,new dl(Y6(new s1(`
|
|
335
|
+
`),new Nh(new Eo((n.g==null&&(n.g=b7(n)),n.g)))))),u&&u.kc()?ev(u.kc().a,i.a):ev(null,i.a),Wj(n,(wf(),Yoe));else throw ri(N)}}function sCe(e,n,i){var u,l,g,y,x,_,C,N,A,O;if(i)for(u=-1,N=new Cn(n,0);N.b<N.d.Y();){if(x=(xt(N.b<N.d.Y()),v(N.d.sb(N.c=N.b++),9)),A=e.a[x.d.k][x.k].a,A==null){for(y=u+1,g=new Cn(n,N.b);g.b<g.d.Y();)if(O=W0e(e,(xt(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),9))).a,O!=null){y=(xr(O),O);break}A=(u+y)/2,e.a[x.d.k][x.k].a=A,e.a[x.d.k][x.k].d=(xr(A),A),e.a[x.d.k][x.k].b=1}u=(xr(A),A)}else{for(l=0,C=new V(n);C.a<C.c.c.length;)x=v(q(C),9),e.a[x.d.k][x.k].a!=null&&(l=Xe(l,Oe(e.a[x.d.k][x.k].a)));for(l+=2,_=new V(n);_.a<_.c.c.length;)x=v(q(_),9),e.a[x.d.k][x.k].a==null&&(A=Of(e.e,24)*I_*l-1,e.a[x.d.k][x.k].a=A,e.a[x.d.k][x.k].d=A,e.a[x.d.k][x.k].b=1)}}function uCe(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F;for(_=0,C=0,F=0,B=0,y=0,O=0,A=0,N=0,g=new q1(new i1(e.c).a);N1(g.a);)switch(l=(g.b=wl(g.a),new x1(g.c,g.b)),u=v(l.b.b[l.a.e],62),v(l.a,67).e){case 12:case 13:case 14:O+=u.c+n;break;case 15:case 16:case 17:A+=u.c+n,y=Xe(y,u.b+n);break;case 18:case 19:case 20:N+=u.c+n;break;case 0:case 1:case 2:F+=u.c+n;break;case 3:case 4:case 5:B+=u.c+n;break;case 6:case 7:case 8:_+=u.b+n;break;case 9:case 10:case 11:C+=u.b+n}_-=n,C-=n,F-=n,B-=n,O+=O!=0?n:0,A+=A!=0?n:0,N+=N!=0?n:0,x=e.p.d+y+e.p.a,x+=x!=0?n:0,i.a=Xe(i.a,F),i.a=Xe(i.a,O),i.a=Xe(i.a,A),i.a=Xe(i.a,N),i.a=Xe(i.a,B),i.b=Xe(i.b,_),i.b=Xe(i.b,x),i.b=Xe(i.b,C)}function cCe(e){var n,i,u,l,g,y,x,_;for(n=null,u=new V(e);u.a<u.c.c.length;)i=v(q(u),102),Oe(Ha(i.g,i.d[0]).a),i.b=null,i.e&&i.e.Y()>0&&i.c==0&&(!n&&(n=new Ye),n.c[n.c.length]=i);if(n)for(;n.c.length!=0;){if(i=v(Nf(n,0),102),i.b&&i.b.c.length>0){for(g=(!i.b&&(i.b=new Ye),new V(i.b));g.a<g.c.c.length;)if(l=v(q(g),102),Oe(Ha(l.g,l.d[0]).a)==Oe(Ha(i.g,i.d[0]).a)){if(Vi(e,l,0)>Vi(e,i,0))return new Er(l,i)}else if(Oe(Ha(l.g,l.d[0]).a)>Oe(Ha(i.g,i.d[0]).a))return new Er(l,i)}for(x=(!i.e&&(i.e=new Ye),i.e).mb();x.G();)y=v(x.H(),102),_=(!y.b&&(y.b=new Ye),y.b),kl(0,_.c.length),mb(_.c,0,i),y.c==_.c.length&&(n.c[n.c.length]=y)}return null}function lCe(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(A=(Fn(),new en),N=(Qn(),new ns(rs(Rs(e.a,new w))));Bt(N);)for(C=v(It(N),9),l=u2e(C,(De(),at)),u=new V(l);u.a<u.c.c.length;)for(i=v(q(u),7),y=new V(i.e);y.a<y.c.c.length;){for(g=v(q(y),12),na(),ee=g.d.f,(ee.g==(pt(),Pn)||ee.g==go)&&(ee=v(J(ee,(Ce(),Ii)),7).f),vi(A.d,ee)?n=v(bi(vi(A.d,ee)),171):(l.c.length==2?ot(i)===ot((On(0,l.c.length),l.c[0]))?n=ms:n=vu:n=ms,va(A.d,ee,n)),_=new V(g.b);_.a<_.c.c.length;)x=v(q(_),33),_e(x,(Ce(),jo),n);for(F=new V(g.c.c);F.a<F.c.c.length;)O=v(q(F),33),_e(O,(Ce(),jo),n);for(B=new V(g.d.c);B.a<B.c.c.length;)O=v(q(B),33),_e(O,(Ce(),jo),n)}}function fCe(e,n){var i,u,l,g,y,x,_,C,N;if(Ef(In(n))!=1||v(ny(In(n)),12).d.f.g!=(pt(),Pn))return null;for(g=v(ny(In(n)),12),i=g.d.f,io(i,(pt(),$i)),_e(i,(Ce(),Ki),null),_e(i,Ii,null),_e(i,(Fe(),Ct),v(J(n,Ct),28)),_e(i,ya,v(J(n,ya),86)),l=J(g.c,_t),y=null,C=lr(i,(De(),at)).mb();C.G();)if(x=v(C.H(),7),x.e.c.length!=0){_e(x,_t,l),N=g.c,x.j.a=N.j.a,x.j.b=N.j.b,x.a.a=N.a.a,x.a.b=N.a.b,Bn(x.c,N.c),N.c.c=Ae(ht,et,1,0,4,1),y=x;break}if(_e(g.c,_t,null),!Ib(lr(n,at)))for(_=new V(yl(lr(n,at)));_.a<_.c.c.length;)x=v(q(_),7),x.e.c.length==0?(u=new Xn,Qt(u,at),u.j.a=x.j.a,u.j.b=x.j.b,_n(u,i),_e(u,_t,J(x,_t)),_n(x,null)):_n(y,i);return i.j.b=n.j.b,$e(e.b,i),i}function hCe(e){var n,i,u,l,g,y,x,_,C;if(g=e.e.e.j,y=new tr(g),_=v(hr(e.e,(Fe(),jc)),86),C=v(hr(e.e,Tv),86),x=v(hr(e.e,Ct),28),n=os(_,(Bu(),Iv)),_.c!=0){switch(g.a=0,g.b=0,u=null,x.e){case 1:case 2:case 3:u=jke(e,e.k);break;case 4:u=new tr(y);break;case 5:u=w_e(e.e,n)}os(_,sE)&&(u&&(g.a=Xe(g.a,u.a),g.b=Xe(g.b,u.b)),n&&(g.a=Xe(g.a,e.q.b+e.q.c+e.k),g.b=Xe(g.b,e.q.d+e.q.a+e.k))),os(_,oE)&&ul(new V(Kb(e.e)))&&uCe(e,e.d,g),os(_,Av)&&(l=v(hr(e.e,tg),15).a,i=v(hr(e.e,eg),15).a,os(C,(sd(),Lv))&&(l<=0&&(l=20),i<=0&&(i=20)),os(C,lE)?(l>0&&(g.a=Xe(g.a,l+e.q.b+e.q.c)),i>0&&(g.b=Xe(g.b,i+e.q.d+e.q.a))):(l>0&&(g.a=Xe(g.a,l)),i>0&&(g.b=Xe(g.b,i)))),i1e(e.e,g)}}function kne(e,n,i){var u,l,g,y,x,_,C,N,A,O,B;if(!e.b)return!1;for(y=null,O=null,_=new gk(null,null),l=1,_.a[1]=e.b,A=_;A.a[l];)C=l,x=O,O=A,A=A.a[l],u=e.a.$b(n,A.d),l=u<0?0:1,u==0&&(!i.c||Pa(A.e,i.d))&&(y=A),!(A&&A.b)&&!uc(A.a[l])&&(uc(A.a[1-l])?O=O.a[C]=py(A,l):uc(A.a[1-l])||(B=O.a[1-C],B&&(!uc(B.a[1-C])&&!uc(B.a[C])?(O.b=!1,B.b=!0,A.b=!0):(g=x.a[1]==O?1:0,uc(B.a[C])?x.a[g]=EW(O,C):uc(B.a[1-C])&&(x.a[g]=py(O,C)),A.b=x.a[g].b=!0,x.a[g].a[0].b=!1,x.a[g].a[1].b=!1))));return y&&(i.b=!0,i.d=y.e,A!=y&&(N=new gk(A.d,A.e),Yxe(e,_,y,N),O==y&&(O=N)),O.a[O.a[1]==A?1:0]=A.a[A.a[0]?0:1],--e.c),e.b=_.a[1],e.b&&(e.b.b=!1),i.b}function dCe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce;for(u=v(J(e,(Fe(),Ct)),28),_=e.e,x=e.a,i=v(J(e,(Ce(),_s)),15).a,C=_.a+x.b+x.c+2*i,N=0-x.d-i-e.d.b,B=_.b+x.d+x.a+2*i-e.d.b,A=new Ye,F=new Ye,g=(O=new un(n.a).a.bb().mb(),new hn(O));g.a.G();){switch(l=(y=v(g.a.H(),21),v(y.yb(),9)),u.e){case 1:case 2:case 3:Cke(l);break;case 4:ee=v(J(l,zu),10),re=ee?ee.a:0,l.i.a=C*Oe(qt(J(l,$u)))-re,_y(l,!0,!1);break;case 5:oe=v(J(l,zu),10),ce=oe?oe.a:0,l.i.a=Oe(qt(J(l,$u)))-ce,_y(l,!0,!1),_.a=Xe(_.a,l.i.a+l.j.a/2)}switch(v(J(l,$r),32).e){case 1:l.i.b=N,A.c[A.c.length]=l;break;case 3:l.i.b=B,F.c[F.c.length]=l}}switch(u.e){case 1:case 2:CX(A,e),CX(F,e);break;case 3:PX(A,e),PX(F,e)}}function pCe(e){var n,i,u,l,g,y;return u=v(J(e.a.g,(Fe(),ya)),86),YX(u,(Gu(),n=v(ea(Rn),11),new li(n,v(zi(n,n.length),11),0)))||(wc(u,xy(oa))?(i=v(v(Za(e.a.b,e.b),20).sb(0),33),e.b.i.a=i.i.a,e.b.i.b=i.i.b):wc(u,xy(ua))?(l=v(ut(e.a.c,e.a.c.c.length-1),9),g=v(v(Za(e.a.b,e.b),20).sb(v(Za(e.a.b,e.b),20).Y()-1),33),y=l.j.a-(g.i.a+g.j.a),e.b.i.a=e.a.g.j.a-y-e.b.j.a,e.b.i.b=g.i.b):wc(u,an(ja,be(ve(Rn,1),Ke,41,0,[po])))?(i=v(v(Za(e.a.b,e.b),20).sb(0),33),e.b.i.a=(e.a.g.j.a-e.b.j.a)/2,e.b.i.b=i.i.b):wc(u,xy(ja))?(i=v(v(Za(e.a.b,e.b),20).sb(0),33),e.b.i.b=i.i.b):wc(u,xy(po))&&(i=v(v(Za(e.a.b,e.b),20).sb(0),33),e.b.i.a=(e.a.g.j.a-e.b.j.a)/2,e.b.i.b=i.i.b)),null}function _ne(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re;for(F=new V(e);F.a<F.c.c.length;){for(B=v(q(F),9),Po(B.i),Po(B.j),c_e(B),Dke(B),re=new V(B.f);re.a<re.c.c.length;){for(ee=v(q(re),7),Po(ee.i),Po(ee.a),Po(ee.j),Qt(ee,cee(ee.g)),g=v(J(ee,(Fe(),Uu)),24),g&&_e(ee,Uu,St(-g.a)),l=new V(ee.e);l.a<l.c.c.length;){for(u=v(q(l),12),i=gn(u.a,0);i.b!=i.d.c;)n=v(on(i),10),Po(n);if(_=v(J(u,ir),44),_)for(x=gn(_,0);x.b!=x.d.c;)y=v(on(x),10),Po(y);for(A=new V(u.b);A.a<A.c.c.length;)C=v(q(A),33),Po(C.i),Po(C.j)}for(O=new V(ee.c);O.a<O.c.c.length;)C=v(q(O),33),Po(C.i),Po(C.j)}for(B.g==(pt(),Dn)&&(_e(B,(Ce(),$r),cee(v(J(B,$r),32))),Qke(B)),N=new V(B.c);N.a<N.c.c.length;)C=v(q(N),33),Po(C.j),Po(C.i)}}function gCe(e,n,i,u){var l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce;for(Ixe(i),rd(n.d.f,n.c.f)?(N=n.c,A=En(be(ve(Xt,1),Jt,10,0,[N.i,N.a])),C=N.f.b,Ea(A,-C.b,-C.d),A.a-=u.a,A.b-=u.b):A=Yi(n.c),A.a+=u.a,A.b+=u.b,O=new df,co(e,O,"x",A.a),co(e,O,"y",A.b),Va(i,"sourcePoint",O),B=Yi(n.d),J(n,(Ce(),lC))!=null&&Nn(B,v(J(n,lC),10)),Nn(B,u),F=new df,co(e,F,"x",B.a),co(e,F,"y",B.b),Va(i,"targetPoint",F),l=new ZM,ce=mc(n.a,u),g=0,oe=gn(ce,0);oe.b!=oe.d.c;)ee=v(on(oe),10),_=new df,co(e,_,"x",ee.a),co(e,_,"y",ee.b),GQ(l,g++,_);if(ce.b==0?Va(i,S_,null):Va(i,S_,l),y=v(J(n,(Fe(),ir)),44),g=0,y){for(mc(y,u),x=new ZM,re=gn(y,0);re.b!=re.d.c;)ee=v(on(re),10),_=new df,co(e,_,"x",ee.a),co(e,_,"y",ee.b),GQ(x,g++,_);Va(i,ire,x)}else Va(i,ire,null)}function bCe(e,n,i,u){var l,g,y,x,_,C,N,A,O,B,F,ee,re,oe;if(ee=e.i,re=e.j,O=e.e,n){for(A=u/2*(n.Y()-1),B=0,C=n.mb();C.G();)x=v(C.H(),9),A+=x.j.a,B=Xe(B,x.j.b);for(oe=ee.a-(A-re.a)/2,y=ee.b-O.d+B,l=re.a/(n.Y()+1),g=l,_=n.mb();_.G();)x=v(_.H(),9),x.i.a=oe,x.i.b=y-x.j.b,oe+=x.j.a+u/2,N=Cte(x),N.i.a=x.j.a/2-N.a.a,N.i.b=x.j.b,F=v(J(x,(Ce(),Mm)),7),F.b.c.length+F.e.c.length==1&&(F.i.a=g-F.a.a,F.i.b=0,_n(F,e)),g+=l}if(i){for(A=u/2*(i.Y()-1),B=0,C=i.mb();C.G();)x=v(C.H(),9),A+=x.j.a,B=Xe(B,x.j.b);for(oe=ee.a-(A-re.a)/2,y=ee.b+re.b+O.a-B,l=re.a/(i.Y()+1),g=l,_=i.mb();_.G();)x=v(_.H(),9),x.i.a=oe,x.i.b=y,oe+=x.j.a+u/2,N=Cte(x),N.i.a=x.j.a/2-N.a.a,N.i.b=0,F=v(J(x,(Ce(),Mm)),7),F.b.c.length+F.e.c.length==1&&(F.i.a=g-F.a.a,F.i.b=re.b,_n(F,e)),g+=l}}function vCe(e,n,i,u,l){var g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze;for(ze=0,B=0,A=new V(n.f);A.a<A.c.c.length;){for(N=v(q(A),9),O=0,x=0,_=i?v(J(N,km),24).a:hu,oe=u?v(J(N,_m),24).a:hu,C=_>oe?_:oe,de=new V(N.f);de.a<de.c.c.length;){if(ce=v(q(de),7),ye=N.i.b+ce.i.b+ce.a.b,u)for(y=new V(ce.e);y.a<y.c.c.length;)g=v(q(y),12),ee=g.d,F=ee.f,n!=e.a[F.k]&&(re=ui(v(J(F,km),24).a,v(J(F,_m),24).a),Ee=v(J(g,(Ce(),vo)),24).a,Ee>=C&&Ee>=re&&(O+=F.i.b+ee.i.b+ee.a.b-ye,++x));if(i)for(y=new V(ce.b);y.a<y.c.c.length;)g=v(q(y),12),ee=g.c,F=ee.f,n!=e.a[F.k]&&(re=ui(v(J(F,km),24).a,v(J(F,_m),24).a),Ee=v(J(g,(Ce(),vo)),24).a,Ee>=C&&Ee>=re&&(O+=F.i.b+ee.i.b+ee.a.b-ye,++x))}x>0&&(ze+=O/x,++B)}B>0?(n.a=l*ze/B,n.i=B):(n.a=0,n.i=0)}function yCe(e,n,i,u){var l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce;for(B=n.c.length,O=0,A=new V(e.c);A.a<A.c.c.length;)if(N=v(q(A),16),oe=N.a,oe.c.length!=0){for(re=new V(oe),C=0,ce=null,l=v(q(re),9);l;){if(g=v(ut(n,l.k),111),g.c>=0){for(_=null,x=new Cn(N.a,C+1);x.b<x.d.Y()&&(y=(xt(x.b<x.d.Y()),v(x.d.sb(x.c=x.b++),9)),_=v(ut(n,y.k),111),!(_.d==g.d&&_.c<g.c));)_=null;_&&(ce&&(ml(u,l.k,St(v(ut(u,l.k),24).a-1)),v(ut(i,ce.k),20).nb(g)),g=Cxe(g,l,B++),n.c[n.c.length]=g,$e(i,new Ye),ce?(v(ut(i,ce.k),20).ib(g),$e(u,St(1))):$e(u,St(0)))}F=null,re.a<re.c.c.length&&(F=v(q(re),9),ee=v(ut(n,F.k),111),v(ut(i,l.k),20).ib(ee),ml(u,F.k,St(v(ut(u,F.k),24).a+1))),g.d=O,g.c=C++,ce=l,l=F}++O}Gt(Oe(Yt(J(e,(Fe(),_v)))))}function Zs(e,n){var i;if(e.e)throw new oc((mf(bE),"The "+bE.j+sre));if(!I0e(e.a,n))throw new iu("The direction "+n+" is not supported by the CGraph instance.");if(n==e.d)return e;switch(i=e.d,e.d=n,i.e){case 0:switch(n.e){case 2:uu(e);break;case 1:qs(e),uu(e);break;case 4:Cl(e),uu(e);break;case 3:Cl(e),qs(e),uu(e)}break;case 2:switch(n.e){case 1:qs(e),d_(e);break;case 4:Cl(e),uu(e);break;case 3:Cl(e),qs(e),uu(e)}break;case 1:switch(n.e){case 2:qs(e),d_(e);break;case 4:qs(e),Cl(e),uu(e);break;case 3:qs(e),Cl(e),qs(e),uu(e)}break;case 4:switch(n.e){case 2:Cl(e),uu(e);break;case 1:Cl(e),qs(e),uu(e);break;case 3:qs(e),d_(e)}break;case 3:switch(n.e){case 2:qs(e),Cl(e),uu(e);break;case 1:qs(e),Cl(e),qs(e),uu(e);break;case 4:qs(e),d_(e)}}return e}function qA(e,n,i){var u,l,g,y,x,_,C,N,A;if(!e.a[n.d.k][n.k].e){for(e.a[n.d.k][n.k].e=!0,e.a[n.d.k][n.k].b=0,e.a[n.d.k][n.k].d=0,e.a[n.d.k][n.k].a=null,N=new V(n.f);N.a<N.c.c.length;)for(C=v(q(N),7),A=i?new sp(C):new Sh(C),_=A.mb();_.G();)x=v(_.H(),7),y=x.f,y.d==n.d?y!=n&&(qA(e,y,i),e.a[n.d.k][n.k].b+=e.a[y.d.k][y.k].b,e.a[n.d.k][n.k].d+=e.a[y.d.k][y.k].d):(e.a[n.d.k][n.k].d+=e.d[x.k],++e.a[n.d.k][n.k].b);if(g=v(J(n,(Ce(),M9)),20),g)for(l=g.mb();l.G();)u=v(l.H(),9),n.d==u.d&&(qA(e,u,i),e.a[n.d.k][n.k].b+=e.a[u.d.k][u.k].b,e.a[n.d.k][n.k].d+=e.a[u.d.k][u.k].d);e.a[n.d.k][n.k].b>0&&(e.a[n.d.k][n.k].d+=Of(e.e,24)*I_*.07000000029802322-.03500000014901161,e.a[n.d.k][n.k].a=e.a[n.d.k][n.k].d/e.a[n.d.k][n.k].b)}}function mCe(e,n){var i,u,l,g,y,x,_,C,N,A,O;for(l=new V(e.a.c);l.a<l.c.c.length;)for(i=v(q(l),16),_=new V(i.a);_.a<_.c.c.length;)x=v(q(_),9),n.i[x.k]=x,n.g[x.k]=n.k==(So(),bo)?Zr:ji;for(y=e.a.c,n.c==(Uo(),Js)&&(y=qe(y,87)?Tp(v(y,87)):qe(y,88)?v(y,88).a:qe(y,63)?new ub(y):new vp(y)),Zme(e.e,n,e.b),k0e(n.n),g=y.mb();g.G();)for(i=v(g.H(),16),C=i.a,n.k==(So(),bo)&&(C=qe(C,87)?Tp(v(C,87)):qe(C,88)?v(C,88).a:qe(C,63)?new ub(C):new vp(C)),O=C.mb();O.G();)A=v(O.H(),9),n.f[A.k]==A&&jne(e,A,n);for(kEe(e,n),u=y.mb();u.G();)for(i=v(u.H(),16),O=new V(i.a);O.a<O.c.c.length;)A=v(q(O),9),n.n[A.k]=n.n[n.f[A.k].k],A==n.f[A.k]&&(N=Oe(n.g[n.i[A.k].k]),(n.k==(So(),bo)&&N>Zr||n.k==Yu&&N<ji)&&(n.n[A.k]=Oe(n.n[A.k])+N));e.e.Jc()}function Ene(e,n){var i,u,l,g,y,x,_,C,N,A,O;f2e(n,be(ve(zf,1),et,79,0,[(Ce(),Qi),_s,(Wt(),dg),Nd])),C=v(J(n,Qi),15).a,v(J(n,xu),15).a*C<2&&_e(n,xu,new cn(2/C)),N=v(J(n,(Fe(),Zo)),59),N==(Jn(),qo)&&_e(n,Zo,Bk(n)),A=v(J(n,$9),24),A.a==0?_e(n,Md,new OX):_e(n,Md,new xJ(A.a)),O=new Pne(n),_e(n,Wl,O),l=hy(e,v(J(n,bC),180)),x=hy(e,v(J(n,wC),180)),u=hy(e,v(J(n,Im),180)),_=hy(e,v(J(n,xC),180)),g=hy(e,P1e(v(J(n,O9),122))),y=new Yn,_e(n,Aoe,y),Lr(Lr(Lr(Lr(Lr(Lr(y,l.qc(n)),x.qc(n)),u.qc(n)),_.qc(n)),g.qc(n)),CEe(n)),i=(yi(30,Ll),new qi(30)),_e(n,H9,i),Bn(i,tv(e,y,0)),i.c[i.c.length]=l,Bn(i,tv(e,y,1)),i.c[i.c.length]=x,Bn(i,tv(e,y,2)),i.c[i.c.length]=u,Bn(i,tv(e,y,3)),i.c[i.c.length]=_,Bn(i,tv(e,y,4)),i.c[i.c.length]=g,Bn(i,tv(e,y,5))}function wCe(e,n){var i,u,l,g,y,x;if(g=pW(Qb(e)),!g.Nb().V()){switch(l=v(J(v(v(v(g.Nb().sb(0),129),224).e,33),(na(),Gie)),171),l=l==Ov?vu:l,x=0,v(e.e,7).g.e){case 4:case 2:l==vu&&(x=e.e.j.b);break;case 3:x=e.e.j.b}for((v(e.e,7).g==(De(),bt)||l==ms)&&(g=Tp(g)),u=Ip(g.Nb().mb());u.G();){if(i=v(u.H(),129),y=new tr(i.e.i),l==ms)switch(v(e.e,7).g.e){case 1:case 4:y.a=-i.e.j.a-n,y.b=x-n-i.e.j.b,x-=n+i.e.j.b;break;case 2:y.a=e.e.j.a+n,y.b=x-n-i.e.j.b,x-=n+i.e.j.b;break;case 3:y.a=-i.e.j.a-n,y.b=x+n,x+=n+i.e.j.b}else switch(v(e.e,7).g.e){case 4:y.a=-i.e.j.a-n,y.b=x+n,x+=n+i.e.j.b;break;case 2:y.a=e.e.j.a+n,y.b=x+n,x+=n+i.e.j.b;break;case 1:y.a=e.e.j.a+n,y.b=x-n-i.e.j.b,x-=n+i.e.j.b;break;case 3:y.a=e.e.j.a+n,y.b=x+n,x+=n+i.e.j.b}i.e.i.a=y.a,i.e.i.b=y.b}}}function xCe(e,n,i){var u,l,g,y,x,_,C,N,A,O,B;for(u=0,l=0,N=0;N<e.length;N++)if(_=e[N],Ci(v(J(_,(Fe(),Ct)),28)))for(y=lr(_,(De(),at)).mb();y.G();)g=v(y.H(),7),g.b.c.length+g.e.c.length>0&&(u+=g.b.c.length+g.e.c.length,kn(n,g,St(u)));else{for(x=lr(_,(De(),at)).mb();x.G();)g=v(x.H(),7),u+=g.b.c.length+g.e.c.length;for(y=lr(_,at).mb();y.G();)g=v(y.H(),7),g.b.c.length+g.e.c.length>0&&kn(n,g,St(u))}for(C=e.length-1;C>=0;C--)if(_=e[C],Ci(v(J(_,(Fe(),Ct)),28)))for(O=lr(_,(De(),ct)).mb();O.G();)A=v(O.H(),7),A.b.c.length+A.e.c.length>0&&(l+=A.b.c.length+A.e.c.length,kn(i,A,St(l)));else{for(B=lr(_,(De(),ct)).mb();B.G();)A=v(B.H(),7),l+=A.b.c.length+A.e.c.length;for(O=lr(_,ct).mb();O.G();)A=v(O.H(),7),A.b.c.length+A.e.c.length>0&&kn(i,A,St(l))}}function kCe(e,n,i,u,l){var g,y,x,_,C,N,A,O,B,F,ee,re,oe;switch(O=Rp(e.g),F=Rp(n.g),B=Nn(ao(e.i),e.a),ee=Nn(ao(n.i),n.a),_=Nn(new wt(B.a,B.b),as(new gl(O),1.3*i)),re=Nn(new wt(ee.a,ee.b),as(new gl(F),1.3*u)),x=ci(_.a-re.a),x<l&&(e.g==(De(),ct)||e.g==at?_.a<re.a?_.a=re.a-l:_.a=re.a+l:_.a<re.a?re.a=_.a+l:re.a=_.a-l),g=0,y=0,e.g.e){case 4:g=2*(B.a-i)-.5*(_.a+re.a);break;case 2:g=2*(B.a+i)-.5*(_.a+re.a);break;case 1:y=2*(B.b-i)-.5*(_.b+re.b);break;case 3:y=2*(B.b+i)-.5*(_.b+re.b)}switch(n.g.e){case 4:g=2*(ee.a-u)-.5*(re.a+_.a);break;case 2:g=2*(ee.a+u)-.5*(re.a+_.a);break;case 1:y=2*(ee.b-u)-.5*(re.b+_.b);break;case 3:y=2*(ee.b+u)-.5*(re.b+_.b)}return A=new wt(g,y),N=new ek(be(ve(Xt,1),Jt,10,0,[B,_,A,re,ee])),C=WX(N),oe=JX(N),N.a=C,KM(N,new t_(be(ve(Xt,1),Jt,10,0,[C,oe,B,ee]))),N}function Cne(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re;for(_=i.a,l=v(J(i,(Ce(),_s)),15).a,F=i.d,x=(u=v(J(i,_s),15).a,new wt(i.e.a+i.a.b+i.a.c+2*u,i.e.b+i.a.d+i.a.a+2*u)),C=x.b,O=new V(e.a);O.a<O.c.c.length;)if(N=v(q(O),9),N.g==(pt(),Dn)){switch(g=v(J(N,$r),32),y=v(J(N,D9),10),B=N.i,g.e){case 2:B.a=i.e.a+l+_.c-F.a;break;case 4:B.a=-F.a-l-_.b}switch(re=0,g.e){case 2:case 4:n==(Zn(),bs)?(ee=Oe(qt(J(N,$u))),B.b=x.b*ee-v(J(N,(Fe(),zu)),10).b,re=B.b+y.b,_y(N,!1,!0)):n==fi&&(B.b=Oe(qt(J(N,$u)))-v(J(N,(Fe(),zu)),10).b,re=B.b+y.b,_y(N,!1,!0))}C=C>re?C:re}for(i.e.b+=C-x.b,A=new V(e.a);A.a<A.c.c.length;)if(N=v(q(A),9),N.g==(pt(),Dn))switch(g=v(J(N,$r),32),B=N.i,g.e){case 1:B.b=-F.b-l-_.d;break;case 3:B.b=i.e.b+l+_.a-F.b}}function _Ce(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F;for(l=new Ye,_=new V(e.d.f);_.a<_.c.c.length;)y=v(q(_),7),y.g==(De(),at)&&(l.c[l.c.length]=y);if(e.e.a==(Jn(),aa)&&!Bs(v(J(e.d,(Fe(),Ct)),28)))for(u=Ht(In(e.d));Bt(u);)i=v(It(u),12),$e(l,i.c);for(g=e.d.j.a,_e(e.d,(Ce(),Yv),new cn(e.d.j.a)),e.d.j.a=e.c,_e(e.d,zc,(jn(),jn(),di)),$e(e.b,e.d),C=e.d,g-=e.c,N=e.a;N>1;)n=dn(g,e.c),C=(A=new lo(e.e.c),io(A,(pt(),$i)),_e(A,(Fe(),Ct),v(J(C,Ct),28)),_e(A,ya,v(J(C,ya),86)),A.k=e.e.b++,$e(e.b,A),A.j.b=C.j.b,A.j.a=n,O=new Xn,Qt(O,(De(),at)),_n(O,C),O.i.a=A.j.a,O.i.b=A.j.b/2,B=new Xn,Qt(B,ct),_n(B,A),B.i.b=A.j.b/2,B.i.a=-B.j.a,F=new Hs,qn(F,O),An(F,B),A),$e(e.e.c.b,C),--N,g-=e.c+e.e.d;for(new Jj(e.d,e.b,e.c),x=new V(l);x.a<x.c.c.length;)y=v(q(x),7),Ir(e.d.f,y),_n(y,C)}function ECe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B;if(!(e.p>n.a||n.p>e.a)){for(i=0,u=0,A=(y=new un(e.o.a).a.bb().mb(),new hn(y));A.a.G();)C=(l=v(A.a.H(),21),v(l.yb(),7)),Gk(En(be(ve(Xt,1),Jt,10,0,[C.f.i,C.i,C.a])).b,n.p,n.a)&&++i;for(O=(x=new un(e.g.a).a.bb().mb(),new hn(x));O.a.G();)C=(l=v(O.a.H(),21),v(l.yb(),7)),Gk(En(be(ve(Xt,1),Jt,10,0,[C.f.i,C.i,C.a])).b,n.p,n.a)&&--i;for(B=(_=new un(n.o.a).a.bb().mb(),new hn(_));B.a.G();)C=(l=v(B.a.H(),21),v(l.yb(),7)),Gk(En(be(ve(Xt,1),Jt,10,0,[C.f.i,C.i,C.a])).b,e.p,e.a)&&++u;for(N=(g=new un(n.g.a).a.bb().mb(),new hn(g));N.a.G();)C=(l=v(N.a.H(),21),v(l.yb(),7)),Gk(En(be(ve(Xt,1),Jt,10,0,[C.f.i,C.i,C.a])).b,e.p,e.a)&&--u;i<u?new uy(e,n,u-i):u<i?new uy(n,e,i-u):(new uy(n,e,0),new uy(e,n,0))}}function Pne(e){var n;this.f=v(J(e,(Ce(),Qi)),15).a,this.d=v(J(e,(Wt(),hg)),15).a,this.a=this.f*v(J(e,xu),15).a,this.b=this.f*v(J(e,Boe),15).a,v(J(e,uC),15),this.c=v(J(e,uC),15).a,this.e=v(J(e,(Fe(),yd)),15).a,n=(pt(),be(ve(vL,1),Ke,132,0,[$n,Pn,Dn,fr,go,$i])).length,this.g=zx(Gm,[Rr,Ky],[250,26],12,[n,n],2),wb(this,$n,this.f),us(this,$n,Pn,this.b),us(this,$n,fr,this.b),us(this,$n,Dn,this.c),us(this,$n,go,this.b),us(this,$n,$i,this.b),wb(this,Pn,this.a),us(this,Pn,fr,this.a),us(this,Pn,Dn,this.c),us(this,Pn,go,this.e),us(this,Pn,$i,this.b),wb(this,fr,this.a),us(this,fr,Dn,this.c),us(this,fr,go,this.e),us(this,fr,$i,this.b),wb(this,Dn,this.c),us(this,Dn,go,this.c),us(this,Dn,$i,this.c),wb(this,go,this.e),us(this,go,$i,this.e),wb(this,$i,this.f)}function CCe(e,n){var i,u,l,g,y,x,_,C,N;if(Ef(Dr(n))!=1||v(ny(Dr(n)),12).c.f.g!=(pt(),Pn))return null;for(i=v(ny(Dr(n)),12),u=i.c.f,io(u,(pt(),$n)),_e(u,(Ce(),Ki),null),_e(u,Ii,null),_e(u,Yv,v(J(n,Yv),15)),_e(u,zc,(jn(),jn(),di)),_e(u,_t,J(n,_t)),u.j.b=n.j.b,g=J(i.d,_t),y=null,C=lr(u,(De(),ct)).mb();C.G();)if(x=v(C.H(),7),x.b.c.length!=0){_e(x,_t,g),N=i.d,x.j.a=N.j.a,x.j.b=N.j.b,x.a.a=N.a.a,x.a.b=N.a.b,Bn(x.c,N.c),N.c.c=Ae(ht,et,1,0,4,1),y=x;break}if(_e(i.d,_t,null),Ef(lr(n,ct))>1)for(_=gn(Ca(lr(n,ct)),0);_.b!=_.d.c;)x=v(on(_),7),x.b.c.length==0?(l=new Xn,Qt(l,ct),l.j.a=x.j.a,l.j.b=x.j.b,_n(l,u),_e(l,_t,J(x,_t)),_n(x,null)):_n(y,u);return _e(n,_t,null),_e(n,zc,Vn),io(n,$i),_e(u,(Fe(),Ct),v(J(n,Ct),28)),_e(u,ya,v(J(n,ya),86)),hl(e.b,0,u),u}function Uy(e,n,i,u,l,g,y){var x,_,C,N,A,O;switch(A=i,C=new lo(y),io(C,(pt(),Dn)),_e(C,(Ce(),D9),l),_e(C,(Fe(),Ct),(Zn(),fi)),_e(C,cg,v(J(e,Hl),15)),_=v(J(e,zu),10),!_&&(_=new wt(l.a/2,l.b/2)),_e(C,zu,_),N=new Xn,_n(N,C),n!=vs&&n!=Ac||(x=g!=(Jn(),qo)?g:aa,u>0?A=wy(x):A=Lk(wy(x)),_e(e,Nv,A)),A.e){case 4:_e(C,(Wt(),Tr),(ra(),Uc)),_e(C,aC,(nd(),Fv)),C.j.b=l.b,Qt(N,(De(),at)),N.i.b=_.b;break;case 2:_e(C,(Wt(),Tr),(ra(),Ku)),_e(C,aC,(nd(),Cm)),C.j.b=l.b,Qt(N,(De(),ct)),N.i.b=_.b;break;case 1:_e(C,mu,(Fs(),Jf)),C.j.a=l.a,Qt(N,(De(),kt)),N.i.a=_.a;break;case 3:_e(C,mu,(Fs(),Sd)),C.j.a=l.a,Qt(N,(De(),bt)),N.i.a=_.a}if(n==wd||n==bs||n==fi){switch(O=0,A.e){case 4:case 2:O=null.cd,n==bs&&(O/=null.cd);break;case 1:case 3:O=null.cd,n==bs&&(O/=null.cd)}_e(C,$u,O)}return _e(C,$r,A),C}function PCe(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;for(C=new Hi,oe=(Fn(),new en),kn(oe,e,See(e)),u=(yi(2,Ll),new qi(2)),e.c&&$e(u,e.c),e.d&&$e(u,e.d),B=new V(u);B.a<B.c.c.length;)if(O=v(q(B),7),n=new ti,ba(n,yl(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[O.b,O.e]))))))),Vb(n,e,!0),n.b!=0)for(de=v(bi(vi(oe.d,e)),34),O==e.d?(F=de[de.length-1],ce=!0):(F=de[0],ce=!1),_=1;_<de.length;_++){for(ce?ee=de[de.length-1-_]:ee=de[_],i=gn(n,0);i.b!=i.d.c;)N=v(on(i),12),A=v(bi(vi(oe.d,N)),34),A==null&&(A=See(N),va(oe.d,N,A)),A.length<=_?fj(i):(ce?re=A[A.length-1-_]:re=A[_],(ee.a!=re.a||ee.b!=re.b)&&(l=ee.a-F.a,y=ee.b-F.b,g=re.a-F.a,x=re.b-F.b,g*y==x*l&&rk(l)==rk(g)&&rk(y)==rk(x)?((l<=0?0-l:l)<(g<=0?0-g:g)||(y<=0?0-y:y)<(x<=0?0-x:x))&&Cr(C,ee,C.c.b,C.c):_>1&&Cr(C,F,C.c.b,C.c),fj(i)));F=ee}return C}function SCe(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(e.n=v(J(e.g,(Ce(),Qi)),15).a*v(J(e.g,(Wt(),hg)),15).a,e.e=e.n*v(J(e.g,xu),15).a,e.i=e.g.c.c.length,x=e.i-1,O=0,e.j=0,e.k=0,e.a=cy(Ae(G_,Rr,24,e.i,0,1)),e.b=cy(Ae(Kv,Rr,184,e.i,6,1)),y=new V(e.g.c);y.a<y.c.c.length;){for(l=v(q(y),16),l.k=x,A=new V(l.a);A.a<A.c.c.length;)N=v(q(A),9),N.k=O,++O;--x}for(e.f=Ae(ar,rr,26,O,12,1),e.c=zx(ar,[Rr,rr],[52,26],12,[O,3],2),e.o=new Ye,e.p=new Ye,n=0,e.d=0,g=new V(e.g.c);g.a<g.c.c.length;){for(l=v(q(g),16),x=l.k,u=0,ee=0,_=l.a.c.length,C=0,A=new V(l.a);A.a<A.c.c.length;)N=v(q(A),9),O=N.k,e.f[O]=N.d.k,C+=N.j.b+e.n,i=Ef(Dr(N)),F=Ef(In(N)),e.c[O][0]=F-i,e.c[O][1]=i,e.c[O][2]=F,u+=i,ee+=F,i>0&&$e(e.p,N),$e(e.o,N);n-=u,B=_+n,C+=n*e.e,ml(e.a,x,St(B)),ml(e.b,x,C),e.j=ui(e.j,B),e.k=Xe(e.k,C),e.d+=n,n+=ee}}function De(){De=s;var e;mr=new pb(Rf,0),bt=new pb("NORTH",1),at=new pb("EAST",2),kt=new pb("SOUTH",3),ct=new pb("WEST",4),cm=(pn(),new pf((e=v(ea(Hr),11),new li(e,v(zi(e,e.length),11),0)))),kd=cs(an(bt,be(ve(Hr,1),Ke,32,0,[]))),xd=cs(an(at,be(ve(Hr,1),Ke,32,0,[]))),_d=cs(an(kt,be(ve(Hr,1),Ke,32,0,[]))),Ed=cs(an(ct,be(ve(Hr,1),Ke,32,0,[]))),ys=cs(an(bt,be(ve(Hr,1),Ke,32,0,[kt]))),Fu=cs(an(at,be(ve(Hr,1),Ke,32,0,[ct]))),Vf=cs(an(bt,be(ve(Hr,1),Ke,32,0,[ct]))),Ul=cs(an(bt,be(ve(Hr,1),Ke,32,0,[at]))),Fl=cs(an(kt,be(ve(Hr,1),Ke,32,0,[ct]))),zl=cs(an(at,be(ve(Hr,1),Ke,32,0,[kt]))),Wa=cs(an(bt,be(ve(Hr,1),Ke,32,0,[at,ct]))),Ia=cs(an(at,be(ve(Hr,1),Ke,32,0,[kt,ct]))),Ja=cs(an(bt,be(ve(Hr,1),Ke,32,0,[kt,ct]))),Qa=cs(an(bt,be(ve(Hr,1),Ke,32,0,[at,kt]))),Jr=cs(an(bt,be(ve(Hr,1),Ke,32,0,[at,kt,ct])))}function NCe(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt;for(ye=new Ye,O=new V(e.c);O.a<O.c.c.length;)for(A=v(q(O),16),ee=new V(A.a);ee.a<ee.c.c.length;)if(B=v(q(ee),9),B.g==(pt(),Dn)&&J(B,(Ce(),jm))!=null){for(re=null,ce=null,oe=null,Ve=new V(B.f);Ve.a<Ve.c.c.length;)switch(ze=v(q(Ve),7),ze.g.e){case 4:re=ze;break;case 2:ce=ze;break;default:oe=ze}for(de=v(ut(oe.e,0),12),_=new jx(de.a),x=new tr(oe.i),Nn(x,B.i),C=gn(_,0),Mb(C,x),Ee=Tk(de.a),N=new tr(oe.i),Nn(N,B.i),Cr(Ee,N,Ee.c.b,Ee.c),Be=v(J(B,jm),9),tt=v(ut(Be.f,0),7),y=v(nr(re.b,Ae(la,ia,12,0,0,1)),47),u=0,g=y.length;u<g;++u)n=y[u],An(n,tt),Mk(n.a,n.a.b,_);for(y=v(nr(ce.e,Ae(la,ia,12,ce.e.c.length,0,1)),47),i=0,l=y.length;i<l;++i)n=y[i],qn(n,tt),Mk(n.a,0,Ee);qn(de,null),An(de,null),ye.c[ye.c.length]=B}for(F=new V(ye);F.a<F.c.c.length;)B=v(q(F),9),Fr(B,null)}function TCe(){function e(){this.obj=this.createObject()}return e.prototype.createObject=function(n){return Object.create(null)},e.prototype.get=function(n){return this.obj[n]},e.prototype.set=function(n,i){this.obj[n]=i},e.prototype[O_]=function(n){delete this.obj[n]},e.prototype.keys=function(){return Object.getOwnPropertyNames(this.obj)},e.prototype.entries=function(){var n=this.keys(),i=this,u=0;return{next:function(){if(u>=n.length)return{done:!0};var l=n[u++];return{value:[l,i.get(l)],done:!1}}}},__e()||(e.prototype.createObject=function(){return{}},e.prototype.get=function(n){return this.obj[":"+n]},e.prototype.set=function(n,i){this.obj[":"+n]=i},e.prototype[O_]=function(n){delete this.obj[":"+n]},e.prototype.keys=function(){var n=[];for(var i in this.obj)i.charCodeAt(0)==58&&n.push(i.substring(1));return n}),e}function Sne(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye;if(N=new hj,_e(N,sL,n),kn(e.e,n,N),_e(N,(Ce(),Ql),i),e.d&&Dee(e.d,N,!1),My(n,N),M_ in n.a&&(re=N.a,oe=v(zn(n,M_),69),ee=v(zn(oe,"left"),104),ee&&(re.b=ee.a),de=v(zn(oe,"top"),104),de&&(re.d=de.a),ce=v(zn(oe,"right"),104),ce&&(re.c=ce.a),l=v(zn(oe,hI),104),l&&(re.a=l.a)),A=(u=v(ea(k9),11),new li(u,v(zi(u,u.length),11),0)),_e(N,Xr,A),e.g==null&&(e.g=Yt(J(N,(O7(),gL)))),Kp in n.a){if(ye=zn(n,Kp),!ye.hc())throw new Gs("The 'children' property of nodes must be an array.",ye,n);if(C=ye.hc(),C.a.length>0){for(i&&_e(i,Kl,N),x=Ae(Nr,Zi,9,C.a.length,0,1),B=0;B<C.a.length;++B){if(_=vc(C,B),!_.kc())throw new Gs("A 'children' array contains a non-object node element.",_,n);g=$Ee(e,_.kc(),N),x[B]=g}for(O=0;O<C.a.length;++O)F=vc(C,O).kc(),y=x[O],Kp in F.a&&!Gt(Oe(Yt(J(y,(Fe(),Pv)))))&&Sne(e,F,y)}}return N}function MCe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;if(ul(new V(Ec(e.e)))){for(x=new V(Ec(e.e));x.a<x.c.c.length;)switch(y=v(q(x),161),C=v(y.e,7).g.e,++e.o[C],v(y.e,7).g.e){case 4:case 2:e.n[C]+=y.e.j.b+(n?(u=v(y.e,7).d,new ss(u.d,u.b,u.a,u.c)).a+(l=v(y.e,7).d,new ss(l.d,l.b,l.a,l.c)).d:0);break;case 1:case 3:e.n[C]+=y.e.j.a+(n?(g=v(y.e,7).d,new ss(g.d,g.b,g.a,g.c)).b+(i=v(y.e,7).d,new ss(i.d,i.b,i.a,i.c)).c:0)}for(_=v(hr(e.e,(Fe(),J_)),100),_=_==(_c(),Yf)?Ws:_,e.g[1]=v(hr(e.e,eE),100),e.g[3]=v(hr(e.e,tE),100),e.g[4]=v(hr(e.e,nE),100),e.g[2]=v(hr(e.e,X_),100),A=(De(),be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct])),B=0,ee=A.length;B<ee;++B)C=A[B],e.g[C.e]=e.g[C.e]==Yf?_:e.g[C.e];for(e.b=hr(e.e,kv)!=null,N=be(ve(Hr,1),Ke,32,0,[mr,bt,at,kt,ct]),O=0,F=N.length;O<F;++O)C=N[O],e.o[C.e]==1?e.i[C.e]=2:!e.b&&e.g[C.e]==Ws?e.i[C.e]=e.o[C.e]+1:e.i[C.e]=e.o[C.e]-1}}function jCe(e,n,i,u,l,g){var y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee;if(_=v(e.a,16),ee=v(e.b,16),C=v(n.a,18),re=v(n.b,18),_)for(A=new V(_.a);A.a<A.c.c.length;)for(N=v(q(A),9),de=lr(N,(De(),at)).mb();de.G();)for(ce=v(de.H(),7),C.ib(ce),x=new V(ce.e);x.a<x.c.c.length;)y=v(q(x),12),!xl(y)&&(i.c[i.c.length]=y,aX(y,u),oe=y.c.f.g,(oe==(pt(),$n)||oe==fr)&&(l.c[l.c.length]=y),Ee=y.d,ye=Ee.f.d,ye==ee?re.ib(Ee):ye==_?C.ib(Ee):Ir(i,y));if(ee)for(A=new V(ee.a);A.a<A.c.c.length;){for(N=v(q(A),9),F=new V(N.f);F.a<F.c.c.length;)for(B=v(q(F),7),x=new V(B.e);x.a<x.c.c.length;)y=v(q(x),12),xl(y)&&(O=g.a.db(y,g),O==null);for(de=lr(N,(De(),ct)).mb();de.G();)for(ce=v(de.H(),7),re.ib(ce),x=new V(ce.e);x.a<x.c.c.length;)y=v(q(x),12),!xl(y)&&(i.c[i.c.length]=y,aX(y,u),oe=y.c.f.g,(oe==(pt(),$n)||oe==fr)&&(l.c[l.c.length]=y),Ee=y.d,ye=Ee.f.d,ye==ee?re.ib(Ee):ye==_?C.ib(Ee):Ir(i,y))}}function ACe(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be;for(de=n.c.length,l=new Ml(e.b,i,null,null),Be=Ae(fa,Ti,26,de,12,1),ee=Ae(fa,Ti,26,de,12,1),F=Ae(fa,Ti,26,de,12,1),re=0,x=0;x<de;x++)ee[x]=Sr,F[x]=hu;for(_=0;_<de;_++)for(u=(On(_,n.c.length),v(n.c[_],81)),Be[_]=u_(u),Be[re]>Be[_]&&(re=_),A=new V(e.b.c);A.a<A.c.c.length;)for(N=v(q(A),16),ce=new V(N.a);ce.a<ce.c.c.length;)oe=v(q(ce),9),ze=Oe(u.n[oe.k])+Oe(u.d[oe.k]),ee[_]=ee[_]<ze?ee[_]:ze,F[_]=Xe(F[_],ze+oe.j.b);for(Ve=Ae(fa,Ti,26,de,12,1),C=0;C<de;C++)(On(C,n.c.length),v(n.c[C],81)).k==(So(),Yu)?Ve[C]=ee[re]-ee[C]:Ve[C]=F[re]-F[C];for(g=Ae(fa,Ti,26,de,12,1),B=new V(e.b.c);B.a<B.c.c.length;)for(O=v(q(B),16),Ee=new V(O.a);Ee.a<Ee.c.c.length;){for(ye=v(q(Ee),9),y=0;y<de;y++)g[y]=Oe((On(y,n.c.length),v(n.c[y],81)).n[ye.k])+Oe((On(y,n.c.length),v(n.c[y],81)).d[ye.k])+Ve[y];I1e(g),l.n[ye.k]=(g[1]+g[2])/2,l.d[ye.k]=0}return l}function y_(e,n,i,u,l,g){var y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee;for(ee=null,i==(vl(),yu)?ee=e:i==Kf&&(ee=n),oe=(O=new un(ee.a).a.bb().mb(),new hn(O));oe.a.G();){for(re=(N=v(oe.a.H(),21),v(N.yb(),7)),ce=En(be(ve(Xt,1),Jt,10,0,[re.f.i,re.i,re.a])).b,Ee=new Qr,y=new Qr,_=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[re.b,re.e]))))));Bt(_);)if(x=v(It(_),12),Gt(Oe(Yt(J(x,(Ce(),wu)))))==u&&Vi(l,x,0)!=-1){if(x.d==re?de=x.c:de=x.d,ye=En(be(ve(Xt,1),Jt,10,0,[de.f.i,de.i,de.a])).b,(ye-ce<=0?0-(ye-ce):ye-ce)<.2)continue;ye<ce?e.a.R(de)?Tn(Ee,new Er(yu,x)):Tn(Ee,new Er(Kf,x)):e.a.R(de)?Tn(y,new Er(yu,x)):Tn(y,new Er(Kf,x))}if(Ee.a.Y()>1)for($e(g,new UA(re,Ee,i)),F=(A=new un(Ee.a).a.bb().mb(),new hn(A));F.a.G();)B=(C=v(F.a.H(),21),v(C.yb(),27)),Ir(l,B.b);if(y.a.Y()>1)for($e(g,new UA(re,y,i)),F=(A=new un(y.a).a.bb().mb(),new hn(A));F.a.G();)B=(C=v(F.a.H(),21),v(C.yb(),27)),Ir(l,B.b)}}function ICe(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve;for(l=0,ce=0,oe=(Fn(),new en),u=new en,g=new en,Ve=new en,xCe(e,g,Ve),n=null,re=0,ze=0,de=!0,_=!0,O=0,F=e.length;O<F;++O){for(N=e[O],Ee=new V(N.f);Ee.a<Ee.c.c.length;)switch(ye=v(q(Ee),7),ye.g.e){case 2:l+=Ete(ye,g);break;case 4:l+=Ete(ye,Ve)}if(ee=N.g,_&&(ee==(pt(),$n)||ee==fr)){if(C=v(J(N,(Ce(),$l)),9),!C){_=!1;continue}n!=C&&(n&&kn(oe,n,new Er(St(re),St(ze))),n=C,re=0,ze=0,de=!0),N==n&&(de=!1),de?(re+=v(J(N,ug),24).a,kn(u,N,St(re))):(ze+=v(J(N,ug),24).a,kn(u,N,St(ze)))}}if(n&&kn(oe,n,new Er(St(re),St(ze))),_)for(x=null,y=0,i=0,de=!0,A=0,B=e.length;A<B;++A)switch(N=e[A],ee=N.g,ee.e){case 0:y=v(bi(vi(u.d,N)),24).a,i=v(v(bi(vi(oe.d,N)),27).b,24).a,x=N,de=!1;break;case 3:y=v(bi(vi(u.d,N)),24).a,C=v(J(N,(Ce(),$l)),9),C!=x&&(i=v(v(bi(vi(oe.d,C)),27).a,24).a,x=C,de=!0);break;default:ce+=de?y:i-y}return l+ce}function LCe(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;for(A=(Fn(),new en),C=new gb,u=new V(e.a.a.b);u.a<u.c.c.length;)if(n=v(q(u),25),qe(n,93))N=v(n,93).b,va(A.d,N,n);else if(qe(n,82))for(g=(F=new un(v(n,82).d.a).a.bb().mb(),new hn(F));g.a.G();)l=(y=v(g.a.H(),21),v(y.yb(),12)),Tt(C,l,n);for(i=new V(e.a.a.b);i.a<i.c.c.length;)if(n=v(q(i),25),qe(n,93)){for(N=v(n,93).b,_=Ht(In(N));Bt(_);)if(x=v(It(_),12),!xl(x)&&(re=x.c,de=x.d,!((De(),ys).kb(x.c.g)&&ys.kb(x.d.g)))){if(oe=v(ln(A,x.d.f),25),ud(Lh(Dh(Bh(Oh(new hf,0),100),e.c[n.f.d]),e.c[oe.f.d])),re.g==ct&&YK((Sa(),re))){for(B=v(Za(C,x),18).mb();B.G();)if(O=v(B.H(),25),O.j.d<n.j.d){if(ee=e.c[O.f.d],ce=e.c[n.f.d],ee==ce)continue;ud(Lh(Dh(Bh(Oh(new hf,1),100),ee),ce))}}if(de.g==at&&FK((Sa(),de))){for(B=v(Za(C,x),18).mb();B.G();)if(O=v(B.H(),25),O.j.d>n.j.d){if(ee=e.c[n.f.d],ce=e.c[O.f.d],ee==ce)continue;ud(Lh(Dh(Bh(Oh(new hf,1),100),ee),ce))}}}}}function Nne(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F;switch(y=new dQ(e),x=yl(Ho(n,y)),uo(x,new y2),l=e.b,l.c){case 2:_=new up(l.a),i=Cp(Ho(x,_)),yc(i)?C=v(Tf(i),91).b:C=15,_=new up(Vj(l)),i=Cp(Ho(x,_)),yc(i)?g=v(Tf(i),91).b:g=15,_=new up(l.b),i=Cp(Ho(x,_)),yc(i)?N=v(Tf(i),91).b:N=15,u=Oke(e,C,g,N),Tn(n,new Up(u,e.c,e.e,e.a.c.f,l.a)),Tn(n,new Up(u,e.c,e.e,e.a.c.f,Vj(l))),Tn(n,new Up(u,e.c,e.e,e.a.c.f,l.b));break;case 1:_=new up(l.a),i=Cp(Ho(x,_)),yc(i)?C=v(Tf(i),91).b:C=15,_=new up(l.b),i=Cp(Ho(x,_)),yc(i)?N=v(Tf(i),91).b:N=15,u=Nke(e,C,N),Tn(n,new Up(u,e.c,e.e,e.a.c.f,l.a)),Tn(n,new Up(u,e.c,e.e,e.a.c.f,l.b));break;case 0:_=new up(l.a),i=Cp(Ho(x,_)),yc(i)?C=v(Tf(i),91).b:C=15,u=(A=e.b,O=D_e(e.a.c,e.a.d,C),ba(e.a.a,Fk(O)),B=aA(e.a.b,O.a,A),F=new Db((!O.k&&(O.k=new Xk(_k(O))),O.k)),D7(F),B?M7(F,B):F),Tn(n,new Up(u,e.c,e.e,e.a.c.f,l.a));break;default:throw new wn("The loopside must be defined.")}return u}function OCe(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee;for(x=new V(e.a.c);x.a<x.c.c.length;)for(g=v(q(x),16),de=new V(g.a);de.a<de.c.c.length;)ce=v(q(de),9),n.f[ce.k]=ce,n.a[ce.k]=ce,n.d[ce.k]=0;for(_=e.a.c,n.c==(Uo(),Js)&&(_=qe(_,87)?Tp(v(_,87)):qe(_,88)?v(_,88).a:qe(_,63)?new ub(_):new vp(_)),y=_.mb();y.G();)for(g=v(y.H(),16),B=-1,O=g.a,n.k==(So(),bo)&&(B=Sr,O=qe(O,87)?Tp(v(O,87)):qe(O,88)?v(O,88).a:qe(O,63)?new ub(O):new vp(O)),Ee=O.mb();Ee.G();)if(ye=v(Ee.H(),9),n.c==Js?A=v(ut(e.b.f,ye.k),20):A=v(ut(e.b.b,ye.k),20),A.Y()>0)if(u=A.Y(),C=ur(Math.floor((u+1)/2))-1,l=ur(Math.ceil((u+1)/2))-1,n.k==bo)for(N=l;N>=C;N--)n.a[ye.k]==ye&&(ee=v(A.sb(N),27),F=v(ee.a,9),!al(i,ee.b)&&B>e.b.e[F.k]&&(n.a[F.k]=ye,n.f[ye.k]=n.f[F.k],n.a[ye.k]=n.f[ye.k],B=e.b.e[F.k]));else for(N=C;N<=l;N++)n.a[ye.k]==ye&&(oe=v(A.sb(N),27),re=v(oe.a,9),!al(i,oe.b)&&B<e.b.e[re.k]&&(n.a[re.k]=ye,n.f[ye.k]=n.f[re.k],n.a[ye.k]=n.f[ye.k],B=e.b.e[re.k]))}function Ni(){Ni=s,Xs=new zs("N",0,(De(),bt),bt,0),Bc=new zs("EN",1,at,bt,1),Vu=new zs("E",2,at,at,0),qu=new zs("SE",3,kt,at,1),xs=new zs("S",4,kt,kt,0),Hc=new zs("WS",5,ct,kt,1),Gc=new zs("W",6,ct,ct,0),$o=new zs("NW",7,bt,ct,1),ws=new zs("ENW",8,at,ct,2),Rc=new zs("ESW",9,at,ct,2),Zu=new zs("SEN",10,kt,bt,2),Zl=new zs("SWN",11,kt,bt,2),$f=new zs(Rf,12,mr,mr,3),noe=I2e(Xs,Bc,Vu,qu,xs,Hc,be(ve(ig,1),Ke,60,0,[Gc,$o,ws,Rc,Zu,Zl])),ioe=(za(),jl(be(ve(ht,1),et,1,4,[Xs,Vu,xs,Gc]))),roe=jl(be(ve(ht,1),et,1,4,[Bc,qu,Hc,$o])),coe=new cc(bt),ooe=jl(be(ve(ht,1),et,1,4,[at,bt])),aoe=new cc(at),hoe=jl(be(ve(ht,1),et,1,4,[kt,at])),foe=new cc(kt),voe=jl(be(ve(ht,1),et,1,4,[ct,kt])),boe=new cc(ct),loe=jl(be(ve(ht,1),et,1,4,[bt,ct])),soe=jl(be(ve(ht,1),et,1,4,[at,bt,ct])),uoe=jl(be(ve(ht,1),et,1,4,[at,kt,ct])),poe=jl(be(ve(ht,1),et,1,4,[kt,ct,bt])),doe=jl(be(ve(ht,1),et,1,4,[kt,at,bt])),goe=(Kh(),Jp)}function Tne(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye;if(ce=0,n.e.a==0)for(re=new V(e);re.a<re.c.c.length;)F=v(q(re),9),ce=Xe(ce,F.i.a+F.j.a+F.e.c);else ce=n.e.a-n.d.a;for(ce-=n.d.a,ee=new V(e);ee.a<ee.c.c.length;){switch(F=v(q(ee),9),ib(F.i,ce-F.j.a),L2e(F),v(J(F,(Fe(),Mo)),103).e){case 1:_e(F,Mo,(fs(),sm));break;case 2:_e(F,Mo,(fs(),om))}for(oe=F.j,ye=new V(F.f);ye.a<ye.c.c.length;){for(de=v(q(ye),7),ib(de.i,oe.a-de.j.a),ib(de.a,de.j.a),Qt(de,BJ(de.g)),y=v(J(de,Uu),24),y&&_e(de,Uu,St(-y.a)),g=new V(de.e);g.a<g.c.c.length;){for(l=v(q(g),12),u=gn(l.a,0);u.b!=u.d.c;)i=v(on(u),10),i.a=ce-i.a;if(C=v(J(l,ir),44),C)for(_=gn(C,0);_.b!=_.d.c;)x=v(on(_),10),x.a=ce-x.a;for(O=new V(l.b);O.a<O.c.c.length;)N=v(q(O),33),ib(N.i,ce-N.j.a)}for(B=new V(de.c);B.a<B.c.c.length;)N=v(q(B),33),ib(N.i,-N.j.a)}for(F.g==(pt(),Dn)&&(_e(F,(Ce(),$r),BJ(v(J(F,$r),32))),Uxe(F)),A=new V(F.c);A.a<A.c.c.length;)N=v(q(A),33),ib(N.i,oe.a-N.j.a)}}function DCe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye;if(ce=0,n.e.b==0)for(re=new V(e);re.a<re.c.c.length;)F=v(q(re),9),ce=Xe(ce,F.i.b+F.j.b+F.e.a);else ce=n.e.b-n.d.b;for(ce-=n.d.b,ee=new V(e);ee.a<ee.c.c.length;){switch(F=v(q(ee),9),ab(F.i,ce-F.j.b),O2e(F),v(J(F,(Fe(),Mo)),103).e){case 3:_e(F,Mo,(fs(),im));break;case 4:_e(F,Mo,(fs(),um))}for(oe=F.j,ye=new V(F.f);ye.a<ye.c.c.length;){for(de=v(q(ye),7),ab(de.i,oe.b-de.j.b),ab(de.a,de.j.b),Qt(de,RJ(de.g)),y=v(J(de,Uu),24),y&&_e(de,Uu,St(-y.a)),g=new V(de.e);g.a<g.c.c.length;){for(l=v(q(g),12),u=gn(l.a,0);u.b!=u.d.c;)i=v(on(u),10),i.b=ce-i.b;if(C=v(J(l,ir),44),C)for(_=gn(C,0);_.b!=_.d.c;)x=v(on(_),10),x.b=ce-x.b;for(O=new V(l.b);O.a<O.c.c.length;)N=v(q(O),33),ab(N.i,ce-N.j.b)}for(B=new V(de.c);B.a<B.c.c.length;)N=v(q(B),33),ab(N.i,-N.j.b)}for(F.g==(pt(),Dn)&&(_e(F,(Ce(),$r),RJ(v(J(F,$r),32))),i2e(F)),A=new V(F.c);A.a<A.c.c.length;)N=v(q(A),33),ab(N.i,oe.b-N.j.b)}}function BCe(e,n,i){var u,l,g,y,x,_,C,N,A,O,B;if(u=new so(n.e.i.a,n.e.i.b,n.e.j.a,n.e.j.b),l=new lx,e.c)for(y=new V(Kb(n));y.a<y.c.c.length;)g=v(q(y),129),l.d=g.e.i.a+n.e.i.a,l.e=g.e.i.b+n.e.i.b,l.c=g.e.j.a,l.b=g.e.j.b,Wb(u,l);for(N=new V(Ec(n));N.a<N.c.c.length;){if(C=v(q(N),161),A=C.e.i.a+n.e.i.a,O=C.e.i.b+n.e.i.b,e.e&&(l.d=A,l.e=O,l.c=C.e.j.a,l.b=C.e.j.b,Wb(u,l)),e.d)for(y=new V(Qb(C));y.a<y.c.c.length;)g=v(q(y),129),l.d=g.e.i.a+A,l.e=g.e.i.b+O,l.c=g.e.j.a,l.b=g.e.j.b,Wb(u,l);if(e.b){if(B=new wt(-i,-i),ot(hr(n,(Fe(),Sv)))===ot((td(),jv)))for(y=new V(Qb(C));y.a<y.c.c.length;)g=v(q(y),129),B.a+=g.e.j.a+i,B.b+=g.e.j.b+i;B.a=Xe(B.a,0),B.b=Xe(B.b,0),Xte(u,f_e(C),l_e(C),n,C,B,i)}}e.b&&Xte(u,(pn(),pn(),Fc),Fc,n,null,null,i),_=new i7((x=v(n.e,9).e,new ss(x.d,x.b,x.a,x.c))),_.d=n.e.i.b-u.e,_.a=u.e+u.b-(n.e.i.b+n.e.j.b),_.b=n.e.i.a-u.d,_.c=u.d+u.c-(n.e.i.a+n.e.j.a),v(n.e,9).e.b=_.b,v(n.e,9).e.d=_.d,v(n.e,9).e.c=_.c,v(n.e,9).e.a=_.a}function Mne(){Mne=s,Lt=new gb,Tt(Lt,(De(),cm),Jr),Tt(Lt,Ed,Ja),Tt(Lt,Ed,Jr),Tt(Lt,xd,Qa),Tt(Lt,xd,Jr),Tt(Lt,kd,Wa),Tt(Lt,kd,Jr),Tt(Lt,_d,Ia),Tt(Lt,_d,Jr),Tt(Lt,ys,Fu),Tt(Lt,ys,Wa),Tt(Lt,ys,Ia),Tt(Lt,ys,Jr),Tt(Lt,Fu,ys),Tt(Lt,Fu,Ja),Tt(Lt,Fu,Qa),Tt(Lt,Fu,Jr),Tt(Lt,Vf,Vf),Tt(Lt,Vf,Wa),Tt(Lt,Vf,Ja),Tt(Lt,Ul,Ul),Tt(Lt,Ul,Wa),Tt(Lt,Ul,Qa),Tt(Lt,Fl,Fl),Tt(Lt,Fl,Ia),Tt(Lt,Fl,Ja),Tt(Lt,zl,zl),Tt(Lt,zl,Ia),Tt(Lt,zl,Qa),Tt(Lt,Wa,kd),Tt(Lt,Wa,ys),Tt(Lt,Wa,Vf),Tt(Lt,Wa,Ul),Tt(Lt,Wa,Wa),Tt(Lt,Wa,Ja),Tt(Lt,Wa,Qa),Tt(Lt,Wa,Jr),Tt(Lt,Ia,_d),Tt(Lt,Ia,ys),Tt(Lt,Ia,Fl),Tt(Lt,Ia,zl),Tt(Lt,Ia,Ia),Tt(Lt,Ia,Ja),Tt(Lt,Ia,Qa),Tt(Lt,Ia,Jr),Tt(Lt,Ja,Ed),Tt(Lt,Ja,Fu),Tt(Lt,Ja,Vf),Tt(Lt,Ja,Fl),Tt(Lt,Ja,Wa),Tt(Lt,Ja,Ia),Tt(Lt,Ja,Ja),Tt(Lt,Ja,Jr),Tt(Lt,Qa,xd),Tt(Lt,Qa,Fu),Tt(Lt,Qa,Ul),Tt(Lt,Qa,zl),Tt(Lt,Qa,Wa),Tt(Lt,Qa,Ia),Tt(Lt,Qa,Qa),Tt(Lt,Qa,Jr),Tt(Lt,Jr,cm),Tt(Lt,Jr,Ed),Tt(Lt,Jr,xd),Tt(Lt,Jr,kd),Tt(Lt,Jr,_d),Tt(Lt,Jr,ys),Tt(Lt,Jr,Fu),Tt(Lt,Jr,Wa),Tt(Lt,Jr,Ia),Tt(Lt,Jr,Ja),Tt(Lt,Jr,Qa),Tt(Lt,Jr,Jr)}function jne(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe;if(i.n[n.k]==null){_=!0,i.n[n.k]=0,y=n,oe=i.k==(So(),Yu)?Zr:ji;do l=e.b.e[y.k],g=y.d.a.c.length,x=y.g,i.k==Yu&&l>0||i.k==bo&&l<g-1?(i.k==bo?C=v(ut(y.d.a,l+1),9):C=v(ut(y.d.a,l-1),9),A=i.f[C.k],N=C.g,jne(e,A,i),oe=e.e.Ic(oe,n,y),i.i[n.k]==n&&(i.i[n.k]=i.i[A.k]),i.i[n.k]==i.i[A.k]?(re=Lx(e.d,x,N),i.k==bo?(u=Oe(i.n[n.k]),B=Oe(i.n[A.k])+Oe(i.d[C.k])-C.e.d-re-y.e.a-y.j.b-Oe(i.d[y.k]),_?(_=!1,i.n[n.k]=B<oe?B:oe):i.n[n.k]=u<(B<oe?B:oe)?u:B<oe?B:oe):(u=Oe(i.n[n.k]),B=Oe(i.n[A.k])+Oe(i.d[C.k])+C.j.b+C.e.a+re+y.e.d-Oe(i.d[y.k]),_?(_=!1,i.n[n.k]=B>oe?B:oe):i.n[n.k]=u>(B>oe?B:oe)?u:B>oe?B:oe)):(re=e.d.f,ee=UJ(e,i.i[n.k]),O=UJ(e,i.i[A.k]),i.k==bo?(F=Oe(i.n[n.k])+Oe(i.d[y.k])+y.j.b+y.e.a+re-(Oe(i.n[A.k])+Oe(i.d[C.k])-C.e.d),kW(ee,O,F)):(F=Oe(i.n[n.k])+Oe(i.d[y.k])-y.e.d-Oe(i.n[A.k])-Oe(i.d[C.k])-C.j.b-C.e.a-re,kW(ee,O,F)))):oe=e.e.Ic(oe,n,y),y=i.a[y.k];while(y!=n);e0e(e.e,n)}}function RCe(e,n,i,u){var l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce;if(O=!1,A=!1,Bs(v(J(u,(Fe(),Ct)),28))){y=!1,x=!1;e:for(F=new V(u.f);F.a<F.c.c.length;)for(B=v(q(F),7),re=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[new sp(B),new Sh(B)]))))));Bt(re);)if(ee=v(It(re),7),!Gt(Oe(Yt(J(ee.f,Xp))))){if(B.g==(De(),bt)){y=!0;break e}if(B.g==kt){x=!0;break e}}O=x&&!y,A=y&&!x}if(!O&&!A&&u.c.c.length!=0){for(N=0,C=new V(u.c);C.a<C.c.c.length;)_=v(q(C),33),N+=_.i.b+_.j.b/2;N/=u.c.c.length,ce=N>=u.j.b/2}else ce=!A;ce?(oe=v(J(u,(Ce(),lg)),20),oe?O?g=oe:(l=v(J(u,sg),20),l?oe.Y()<=l.Y()?g=oe:g=l:(g=new Ye,_e(u,sg,g))):(g=new Ye,_e(u,lg,g))):(l=v(J(u,(Ce(),sg)),20),l?A?g=l:(oe=v(J(u,lg),20),oe?l.Y()<=oe.Y()?g=l:g=oe:(g=new Ye,_e(u,lg,g))):(g=new Ye,_e(u,sg,g))),g.ib(e),_e(e,(Ce(),Mm),i),n.d==i?(An(n,null),i.b.c.length+i.e.c.length==0&&_n(i,null)):(qn(n,null),i.b.c.length+i.e.c.length==0&&_n(i,null)),ou(n.a)}function GCe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;for(i=new hee(n),i.a||T_e(n),C=r_e(n),_=new gb,re=new Ate,ee=new V(n.b);ee.a<ee.c.c.length;)for(F=v(q(ee),9),l=Ht(In(F));Bt(l);)u=v(It(l),12),(u.c.f.g==(pt(),Dn)||u.d.f.g==Dn)&&(N=nCe(e,u,C,re),Tt(_,Vk(N.d),N.a));for(y=new Ye,de=v(J(i.c,(Ce(),Xf)),18).mb();de.G();){switch(ce=v(de.H(),32),B=re.c[ce.e],O=re.b[ce.e],x=re.a[ce.e],g=null,oe=null,ce.e){case 4:g=new so(e.d.a,B,C.b.a-e.d.a,O-B),oe=new so(e.d.a,B,x,O-B),Au(C,new wt(g.d+g.c,g.e)),Au(C,new wt(g.d+g.c,g.e+g.b));break;case 2:g=new so(C.a.a,B,e.c.a-C.a.a,O-B),oe=new so(e.c.a-x,B,x,O-B),Au(C,new wt(g.d,g.e)),Au(C,new wt(g.d,g.e+g.b));break;case 1:g=new so(B,e.d.b,O-B,C.b.b-e.d.b),oe=new so(B,e.d.b,O-B,x),Au(C,new wt(g.d,g.e+g.b)),Au(C,new wt(g.d+g.c,g.e+g.b));break;case 3:g=new so(B,C.a.b,O-B,e.c.b-C.a.b),oe=new so(B,e.c.b-x,O-B,x),Au(C,new wt(g.d,g.e)),Au(C,new wt(g.d+g.c,g.e))}g&&(A=new sZ,A.d=ce,A.b=g,A.c=oe,A.a=j7(v(Za(_,Vk(ce)),18)),y.c[y.c.length]=A)}return Bn(i.b,y),i.d=zwe(UEe(C)),i}function HCe(){var e=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"];return e[34]='\\"',e[92]="\\\\",e[173]="\\u00ad",e[1536]="\\u0600",e[1537]="\\u0601",e[1538]="\\u0602",e[1539]="\\u0603",e[1757]="\\u06dd",e[1807]="\\u070f",e[6068]="\\u17b4",e[6069]="\\u17b5",e[8203]="\\u200b",e[8204]="\\u200c",e[8205]="\\u200d",e[8206]="\\u200e",e[8207]="\\u200f",e[8232]="\\u2028",e[8233]="\\u2029",e[8234]="\\u202a",e[8235]="\\u202b",e[8236]="\\u202c",e[8237]="\\u202d",e[8238]="\\u202e",e[8288]="\\u2060",e[8289]="\\u2061",e[8290]="\\u2062",e[8291]="\\u2063",e[8292]="\\u2064",e[8298]="\\u206a",e[8299]="\\u206b",e[8300]="\\u206c",e[8301]="\\u206d",e[8302]="\\u206e",e[8303]="\\u206f",e[65279]="\\ufeff",e[65529]="\\ufff9",e[65530]="\\ufffa",e[65531]="\\ufffb",e}function zCe(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze;for(n=0,oe=!0,ze=null,u=0;u<e.length;u++)if(g=e[u],re=g.g,re==(pt(),$n))ze=g,oe=!1;else if(re==fr){if(qe(J(g,(Ce(),_t)),12)||(i=v(J(g,_t),9),ze!=i&&(ze=i,oe=!0),!Ci(v(J(i,(Fe(),Ct)),28))))continue;for(O=null,F=null,de=new V(g.f);de.a<de.c.c.length;)ce=v(q(de),7),ce.b.c.length==0?ce.e.c.length==0||(F=v(J(ce,_t),7)):O=v(J(ce,_t),7);for(l=u+1;l<e.length&&(y=e[l],A=y.g,A!=$n);l++)if(A==fr){if(ot(J(y,_t))!==ot(i))break;for(x=null,C=null,Ee=new V(y.f);Ee.a<Ee.c.c.length;)ye=v(q(Ee),7),ye.b.c.length==0?ye.e.c.length==0||(C=v(J(ye,_t),7)):x=v(J(ye,_t),7);oe?(B=!1,ee=!1,F&&x&&F.k<x.k&&(++n,ee=!0),O&&C&&O.k>C.k&&(++n,B=!0),F&&C&&F.k>C.k&&(++n,ee=!0),O&&x&&O.k<x.k&&(++n,B=!0),B&&ee&&O==F&&--n):(_=!1,N=!1,O&&C&&O.k<C.k&&(++n,N=!0),F&&x&&F.k>x.k&&(++n,_=!0),O&&x&&O.k<x.k&&(++n,_=!0),F&&C&&F.k>C.k&&(++n,N=!0),_&&N&&x==C&&--n)}}return n}function UCe(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt;for(de=e.a,ye=0,Ee=de.length;ye<Ee;++ye){for(ce=de[ye],C=Sr,N=Sr,F=new V(ce.f);F.a<F.c.c.length;)O=v(q(F),9),y=O.d?Vi(O.d.a,O,0):-1,y>0?(A=v(ut(O.d.a,y-1),9),Be=Nb(e.b,O,A),re=O.i.b-O.e.d-(A.i.b+A.j.b+A.e.a+Be)):re=O.i.b-O.e.d,C=re<C?re:C,y<O.d.a.c.length-1?(A=v(ut(O.d.a,y+1),9),Be=Nb(e.b,O,A),oe=A.i.b-A.e.d-(O.i.b+O.j.b+O.e.a+Be)):oe=2*O.i.b,N=oe<N?oe:N;for(_=Sr,g=!1,l=v(ut(ce.f,0),9),lt=new V(l.f);lt.a<lt.c.c.length;)for(tt=v(q(lt),7),ee=l.i.b+tt.i.b+tt.a.b,u=new V(tt.b);u.a<u.c.c.length;)i=v(q(u),12),ze=i.c,n=ze.f.i.b+ze.i.b+ze.a.b-ee,(n<=0?0-n:n)<(_<=0?0-_:_)&&(n<=0?0-n:n)<(n<0?C:N)&&(_=n,g=!0);for(x=v(ut(ce.f,ce.f.c.length-1),9),Ve=new V(x.f);Ve.a<Ve.c.c.length;)for(ze=v(q(Ve),7),ee=x.i.b+ze.i.b+ze.a.b,u=new V(ze.e);u.a<u.c.c.length;)i=v(q(u),12),tt=i.d,n=tt.f.i.b+tt.i.b+tt.a.b-ee,(n<=0?0-n:n)<(_<=0?0-_:_)&&(n<=0?0-n:n)<(n<0?C:N)&&(_=n,g=!0);if(g&&_!=0)for(B=new V(ce.f);B.a<B.c.c.length;)O=v(q(B),9),O.i.b+=_}}function FCe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt;return A=R_e(Ur(e,(De(),cm)),n),F=_l(Ur(e,kd),n),ye=_l(Ur(e,_d),n),Be=Py(Ur(e,Ed),n),O=Py(Ur(e,xd),n),ce=_l(Ur(e,Vf),n),ee=_l(Ur(e,Ul),n),ze=_l(Ur(e,Fl),n),Ee=_l(Ur(e,zl),n),tt=Py(Ur(e,Fu),n),oe=_l(Ur(e,ys),n),de=_l(Ur(e,Wa),n),Ve=_l(Ur(e,Ia),n),lt=Py(Ur(e,Ja),n),B=Py(Ur(e,Qa),n),re=_l(Ur(e,Jr),n),i=ed(be(ve(fa,1),Ti,26,12,[ce.a,Be.a,ze.a,lt.a])),u=ed(be(ve(fa,1),Ti,26,12,[F.a,A.a,ye.a,re.a])),l=oe.a,g=ed(be(ve(fa,1),Ti,26,12,[ee.a,O.a,Ee.a,B.a])),C=ed(be(ve(fa,1),Ti,26,12,[ce.b,F.b,ee.b,de.b])),_=ed(be(ve(fa,1),Ti,26,12,[Be.b,A.b,O.b,re.b])),N=tt.b,x=ed(be(ve(fa,1),Ti,26,12,[ze.b,ye.b,Ee.b,Ve.b])),Us(Ur(e,cm),i+l,C+N),Us(Ur(e,Jr),i+l,C+N),Us(Ur(e,kd),i+l,0),Us(Ur(e,_d),i+l,C+N+_),Us(Ur(e,Ed),0,C+N),Us(Ur(e,xd),i+l+u,C+N),Us(Ur(e,Ul),i+l+u,0),Us(Ur(e,Fl),0,C+N+_),Us(Ur(e,zl),i+l+u,C+N+_),Us(Ur(e,Fu),0,C),Us(Ur(e,ys),i,0),Us(Ur(e,Ia),0,C+N+_),Us(Ur(e,Qa),i+l+u,0),y=new Wr,y.a=ed(be(ve(fa,1),Ti,26,12,[i+u+l+g,tt.a,de.a,Ve.a])),y.b=ed(be(ve(fa,1),Ti,26,12,[C+_+N+x,oe.b,lt.b,B.b])),y}function YCe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;if(u=new Hi,C=null,F=e.c,B=F.f.g,B!=(pt(),$n)&&B!=fr)throw new wn("The target node of the edge must be a normal node or a northSouthPort.");for(B==fr&&(O=v(J(F,(Ce(),_t)),7),C=new wt(En(be(ve(Xt,1),Jt,10,0,[O.f.i,O.i,O.a])).a,En(be(ve(Xt,1),Jt,10,0,[F.f.i,F.i,F.a])).b),F=O),X2(u,En(be(ve(Xt,1),Jt,10,0,[F.f.i,F.i,F.a]))),y=Xe(5,VX(F.f,F.g)),A=new gl(Rp(F.g)),A.a*=y,A.b*=y,vn(u,Nn(A,En(be(ve(Xt,1),Jt,10,0,[F.f.i,F.i,F.a])))),C&&Cr(u,C,u.c.b,u.c),g=e,_=e,x=null,i=!1;g;)l=g.a,l.b!=0&&(i?(vn(u,as(Nn(x,(xt(l.b!=0),v(l.a.a.c,10))),.5)),i=!1):i=!0,x=ao((xt(l.b!=0),v(l.c.b.c,10))),ba(u,l),ou(l)),_=g,g=v(bi(vi(n.d,g)),12);ee=_.d,ee.f.g==fr&&(O=v(J(ee,(Ce(),_t)),7),vn(u,new wt(En(be(ve(Xt,1),Jt,10,0,[O.f.i,O.i,O.a])).a,En(be(ve(Xt,1),Jt,10,0,[ee.f.i,ee.i,ee.a])).b)),ee=O),y=Xe(5,VX(ee.f,ee.g)),A=new gl(Rp(ee.g)),as(A,y),vn(u,Nn(A,En(be(ve(Xt,1),Jt,10,0,[ee.f.i,ee.i,ee.a])))),X2(u,En(be(ve(Xt,1),Jt,10,0,[ee.f.i,ee.i,ee.a]))),N=new OA(u),ba(e.a,Fk(N))}function VCe(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F;if(ot(J(e.c,(Fe(),Ct)))===ot((Zn(),bs))||ot(J(e.c,Ct))===ot(fi)){for(N=new V(e.c.f);N.a<N.c.c.length;)if(C=v(q(N),7),C.g==(De(),bt)||C.g==kt)return!1}for(u=Ht(In(e.c));Bt(u);)if(i=v(It(u),12),i.c.f==i.d.f)return!1;if(Bs(v(J(e.c,Ct),28))){for(B=new Ye,_=lr(e.c,(De(),ct)).mb();_.G();)y=v(_.H(),7),$e(B,Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[y.b,y.e]))))));for(F=(Pt(B),new zh(B)),B=new Ye,x=lr(e.c,at).mb();x.G();)y=v(x.H(),7),$e(B,Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[y.b,y.e]))))));n=(Pt(B),new zh(B))}else F=Dr(e.c),n=In(e.c);return g=!Ib(In(e.c)),l=!Ib(Dr(e.c)),!g&&!l?!1:g?l?dk((Qn(),new ns(rs(Rs(F.a,new w)))))==1&&(A=(Pt(F),v(Zj(new ns(rs(Rs(F.a,new w)))),12)).c.f,A.g==(pt(),Pn)&&v(J(A,(Ce(),Ki)),7).f!=e.c)?(e.e=2,!0):dk(new ns(rs(Rs(n.a,new w))))==1&&(O=(Pt(n),v(Zj(new ns(rs(Rs(n.a,new w)))),12)).d.f,O.g==(pt(),Pn)&&v(J(O,(Ce(),Ii)),7).f!=e.c)?(e.e=3,!0):!1:(e.e=0,!0):(e.e=1,!0)}function qCe(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe;if(u=new Ye,l=Sr,g=Sr,y=Sr,i)for(l=e.e.a,ee=new V(n.f);ee.a<ee.c.c.length;)for(F=v(q(ee),7),_=new V(F.e);_.a<_.c.c.length;)x=v(q(_),12),x.a.b!=0&&(N=v(Sx(x.a),10),N.a<l&&(g=l-N.a,y=Sr,u.c=Ae(ht,et,1,0,4,1),l=N.a),N.a<=l&&(u.c[u.c.length]=x,x.a.b>1&&(y=dn(y,ci(v(Bp(x.a,1),10).b-N.b)))));else for(ee=new V(n.f);ee.a<ee.c.c.length;)for(F=v(q(ee),7),_=new V(F.b);_.a<_.c.c.length;)x=v(q(_),12),x.a.b!=0&&(O=v(M1(x.a),10),O.a>l&&(g=O.a-l,y=Sr,u.c=Ae(ht,et,1,0,4,1),l=O.a),O.a>=l&&(u.c[u.c.length]=x,x.a.b>1&&(y=dn(y,ci(v(Bp(x.a,x.a.b-2),10).b-O.b)))));if(u.c.length!=0&&g>n.j.a/2&&y>n.j.b/2){for(B=new Xn,_n(B,n),Qt(B,(De(),bt)),B.i.a=n.j.a/2,oe=new Xn,_n(oe,n),Qt(oe,kt),oe.i.a=n.j.a/2,oe.i.b=n.j.b,_=new V(u);_.a<_.c.c.length;)x=v(q(_),12),i?(C=v(l7(x.a),10),re=x.a.b==0?Yi(x.d):v(Sx(x.a),10),re.b>=C.b?qn(x,oe):qn(x,B)):(C=v(_1e(x.a),10),re=x.a.b==0?Yi(x.c):v(M1(x.a),10),re.b>=C.b?An(x,oe):An(x,B)),A=v(J(x,(Fe(),ir)),44),A&&Vb(A,C,!0);n.i.a=l-n.j.a/2}}function ZCe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;for(oe=new Ye,ce=new Ye,de=new Ye,g=new V(n);g.a<g.c.c.length;)l=v(q(g),75),l.k>50?oe.c[oe.c.length]=l:l.k>0?ce.c[ce.c.length]=l:de.c[de.c.length]=l;if(ce.c.length==1&&oe.c.length==0&&(Bn(oe,ce),ce.c=Ae(ht,et,1,0,4,1)),oe.c.length!=0&&os(mx(e.a),(Ni(),Xs))&&os(mx(e.a),(Ni(),xs))?h2e(e,oe):Bn(ce,oe),ce.c.length==0||d2e(e,ce),de.c.length!=0){if(i=wx(e.a),i.c!=0)for(N=new V(de),_=(Pt(i),W6(new nK(i).a));N.a<N.c.c.length;){for(l=v(q(N),75);N.a<N.c.c.length&&l.a.a.Y()<2;)l=v(q(N),75);l.a.a.Y()>1&&(ee=v(lj(_),60),Hp(l,ee,!0),Sp(N),sW(e.a,ee))}for(O=de.c.length,u=C_e(e),B=new Ye,y=O/R6(e.a).c|0,x=0;x<y;x++)Bn(B,R6(e.a));switch(F=O%R6(e.a).c,F>3&&(Bn(B,(Ni(),Ni(),roe)),F-=4),F){case 3:$e(B,rv(u));case 2:re=Ry(rv(u));do re=Ry(re);while(!os(mx(e.a),re));B.c[B.c.length]=re,re=EA(rv(u));do re=EA(re);while(!os(mx(e.a),re));B.c[B.c.length]=re;break;case 1:$e(B,rv(u))}for(A=new V(B),C=new V(de);A.a<A.c.c.length&&C.a<C.c.c.length;)Hp(v(q(C),75),v(q(A),60),!0)}}function $Ce(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze;for(N=n.c.c.length,e.a=Ae(Nr,Rr,51,N,0,2),e.b=Ae(Nr,Rr,51,N,0,2),e.k=Ae(Nr,Rr,51,N,0,2),_=Ae(ar,rr,26,N,12,1),y=Ae(Qv,bv,26,N,13,1),e.c=Ae(Qv,bv,26,N,13,1),e.d=Ae(Qv,bv,26,N,13,1),oe=0,Ee=0,O=new Cn(n.c,0);O.b<O.d.Y();)for(C=(xt(O.b<O.d.Y()),v(O.d.sb(O.c=O.b++),16)),A=O.b-1,B=C.a.c.length,e.a[A]=Ae(Nr,Zi,9,B,0,1),e.k[A]=Ae(Nr,Zi,9,B,0,1),e.b[A]=Ae(Nr,Zi,9,B,0,1),_[A]=0,y[A]=!1,ce=new Cn(C.a,0);ce.b<ce.d.Y();){for(re=(xt(ce.b<ce.d.Y()),v(ce.d.sb(ce.c=ce.b++),9)),e.b[A][ce.b-1]=re,re.k=oe++,F=v(J(re,(Ce(),$l)),9),F&&p_(e.g,F,re,null),ye=new V(re.f);ye.a<ye.c.c.length;){for(de=v(q(ye),7),de.k=Ee++,g=new V(de.e);g.a<g.c.c.length;)l=v(q(g),12),l.d.f.d==C&&++_[A];de.g==(De(),at)?de.e.c.length+de.b.c.length>1&&(e.c[A]=!0):de.g==ct&&de.e.c.length+de.b.c.length>1&&(e.d[A]=!0)}re.g==(pt(),fr)&&(++_[A],y[A]=!0)}for(i=!0,ee=!0,x=0;x<e.d.length-1;x++)u=e.c[x]||e.d[x+1],i=i&u,ee=ee&!u;e.j=Ae(Gm,Ky,26,Ee,12,1),ze=Ae(ar,rr,26,Ee,12,1),i||(e.i=new wQ(_,y,ze),e.f=e.i),ee||(e.e=new xQ(_,y,ze),e.f=e.e)}function Ane(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be;for(e.d=new wt(ji,ji),e.c=new wt(Zr,Zr),O=n.mb();O.G();)for(N=v(O.H(),55),de=new V(N.b);de.a<de.c.c.length;)ce=v(q(de),9),e.d.a=dn(e.d.a,ce.i.a-ce.e.b),e.d.b=dn(e.d.b,ce.i.b-ce.e.d),e.c.a=Xe(e.c.a,ce.i.a+ce.j.a+ce.e.c),e.c.b=Xe(e.c.b,ce.i.b+ce.j.b+ce.e.a);for(x=new eZ,A=n.mb();A.G();)N=v(A.H(),55),u=GCe(e,N),$e(x.a,u),u.a=u.a|!v(J(u.c,(Ce(),Xf)),18).V();for(e.b=(Nk(),Be=new Q,Be.f=new JJ(i),Be.b=VEe(Be.f,x),Be),zEe((F=e.b,new O1,F)),e.e=new Wr,e.a=e.b.f.e,y=new V(x.a);y.a<y.c.c.length;)for(l=v(q(y),347),ye=cye(e.b,l),P_e(l.c,ye.a,ye.b),re=new V(l.c.b);re.a<re.c.c.length;)ee=v(q(re),9),ee.g==(pt(),Dn)&&(oe=hA(e,ee.i,v(J(ee,(Ce(),$r)),32)),Nn(au(ee.i),oe));for(g=new V(x.a);g.a<g.c.c.length;)for(l=v(q(g),347),C=new V(s2e(l));C.a<C.c.c.length;)for(_=v(q(C),12),Ve=new jx(_.a),j1(Ve,0,Yi(_.c)),vn(Ve,Yi(_.d)),B=null,ze=gn(Ve,0);ze.b!=ze.d.c;){if(Ee=v(on(ze),10),!B){B=Ee;continue}pJ(B.a,Ee.a)?(e.e.a=dn(e.e.a,B.a),e.a.a=Xe(e.a.a,B.a)):pJ(B.b,Ee.b)&&(e.e.b=dn(e.e.b,B.b),e.a.b=Xe(e.a.b,B.b)),B=Ee}Px(e.e),Nn(e.a,e.e)}function Ine(e,n,i,u,l){var g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt;for(ee=new qi(n.b),ye=new qi(n.b),O=new qi(n.b),Be=new qi(n.b),re=new qi(n.b),Ve=gn(n,0);Ve.b!=Ve.d.c;)for(Ee=v(on(Ve),7),x=new V(Ee.e);x.a<x.c.c.length;)if(g=v(q(x),12),g.c.f==g.d.f){if(Ee.g==g.d.g){Be.c[Be.c.length]=g;continue}else if(Ee.g==(De(),bt)&&g.d.g==kt){re.c[re.c.length]=g;continue}}for(_=new V(re);_.a<_.c.c.length;)g=v(q(_),12),G_e(e,g,i,u,(De(),at));for(y=new V(Be);y.a<y.c.c.length;)g=v(q(y),12),tt=new lo(e),io(tt,(pt(),fr)),_e(tt,(Fe(),Ct),(Zn(),fi)),_e(tt,(Ce(),_t),g),lt=new Xn,_e(lt,_t,g.d),Qt(lt,(De(),ct)),_n(lt,tt),dt=new Xn,_e(dt,_t,g.c),Qt(dt,at),_n(dt,tt),_e(g.c,eu,tt),_e(g.d,eu,tt),qn(g,null),An(g,null),i.c[i.c.length]=tt,_e(tt,ug,St(2));for(ze=gn(n,0);ze.b!=ze.d.c;)Ee=v(on(ze),7),C=Ee.b.c.length>0,oe=Ee.e.c.length>0,C&&oe?O.c[O.c.length]=Ee:C?ee.c[ee.c.length]=Ee:oe&&(ye.c[ye.c.length]=Ee);for(F=new V(ee);F.a<F.c.c.length;)B=v(q(F),7),$e(l,HA(e,B,null,i));for(de=new V(ye);de.a<de.c.c.length;)ce=v(q(de),7),$e(l,HA(e,null,ce,i));for(A=new V(O);A.a<A.c.c.length;)N=v(q(A),7),$e(l,HA(e,N,N,i))}function Lne(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve;for(ye=new tr(n.d),_=new Ye,de=new V(n.b);de.a<de.c.c.length;)if(oe=v(q(de),9),B=v(ln(e.j,oe),69),B){for(Gy(e,oe,B,ye),ze=new V(oe.f);ze.a<ze.c.c.length;)if(Ee=v(q(ze),7),F=v(ln(e.n,Ee),69),F&&(Gy(e,Ee,F,dE),i0e(F,(Fe(),Nv),new dl(c1e(Ee.g)))),ot(J(oe,(Fe(),Sv)))!==ot((td(),iE)))for(re=new V(Ee.c);re.a<re.c.c.length;)ee=v(q(re),33),O=v(ln(e.f,ee),69),Gy(e,ee,O,dE);if(v(J(oe,(Fe(),ya)),86).Y()!=0)for(re=new V(oe.c);re.a<re.c.c.length;)ee=v(q(re),33),O=v(ln(e.f,ee),69),Gy(e,ee,O,dE);for(x=Ht(In(oe));Bt(x);)g=v(It(x),12),rd(g.d.f,oe)||(_.c[_.c.length]=g)}if(Ve=v(J(n,(Ce(),Ql)),9),Ve)for(x=Ht(In(Ve));Bt(x);)g=v(It(x),12),rd(g.d.f,Ve)&&(_.c[_.c.length]=g);for(y=new V(_);y.a<y.c.c.length;)for(g=v(q(y),12),A=v(ln(e.b,g),69),gCe(e,g,A,ye),re=new V(g.b);re.a<re.c.c.length;)ee=v(q(re),33),O=v(ln(e.f,ee),69),Gy(e,ee,O,ye);for(i=(u=v(J(n,_s),15).a,new wt(n.e.a+n.a.b+n.a.c+2*u,n.e.b+n.a.d+n.a.a+2*u)),N=v(J(n,Ql),9),N&&(N.j.a=i.a,N.j.b=i.b),C=v(J(n,sL),69),co(e,C,N_,i.a),co(e,C,T_,i.b),ce=new V(n.b);ce.a<ce.c.c.length;)oe=v(q(ce),9),l=v(J(oe,Kl),55),l&&Lne(e,l)}function KCe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et;for(dt=new ti,Be=new ti,oe=-1,_=new V(e);_.a<_.c.c.length;){for(y=v(q(_),77),y.i=oe--,A=0,Ee=0,g=new V(y.j);g.a<g.c.c.length;)u=v(q(g),117),Ee+=u.c;for(l=new V(y.d);l.a<l.c.c.length;)u=v(q(l),117),A+=u.c;y.e=A,y.k=Ee,Ee==0?Cr(Be,y,Be.c.b,Be.c):A==0&&Cr(dt,y,dt.c.b,dt.c)}for(Et=new Ux((is(),e)),O=e.c.length,re=O+1,ce=O-1,F=new Ye;Et.a.Y()!=0;){for(;Be.b!=0;)Ve=(xt(Be.b!=0),v(su(Be,Be.a.a),77)),Et.a.eb(Ve)!=null,Ve.i=ce--,_A(Ve,dt,Be);for(;dt.b!=0;)tt=(xt(dt.b!=0),v(su(dt,dt.a.a),77)),Et.a.eb(tt)!=null,tt.i=re++,_A(tt,dt,Be);for(ee=hu,C=(de=new un(Et.a).a.bb().mb(),new hn(de));C.a.G();)y=(N=v(C.a.H(),21),v(N.yb(),77)),ye=y.k-y.e,ye>=ee&&(ye>ee&&(F.c=Ae(ht,et,1,0,4,1),ee=ye),F.c[F.c.length]=y);F.c.length!=0&&(B=v(ut(F,qj(n,F.c.length)),77),Et.a.eb(B)!=null,B.i=re++,_A(B,dt,Be),F.c=Ae(ht,et,1,0,4,1))}for(ze=e.c.length+1,x=new V(e);x.a<x.c.c.length;)y=v(q(x),77),y.i<O&&(y.i+=ze);for(lt=new V(e);lt.a<lt.c.c.length;)for(tt=v(q(lt),77),i=new Cn(tt.j,0);i.b<i.d.Y();)u=(xt(i.b<i.d.Y()),v(i.d.sb(i.c=i.b++),117)),vt=u.b,tt.i>vt.i&&(zo(i),Ir(vt.d,u),u.c>0&&(u.a=vt,$e(vt.j,u),u.b=tt,$e(tt.d,u)))}function QCe(e){var n,i,u;for(u=new q1(new i1(e.c).a);N1(u.a);)switch(i=(u.b=wl(u.a),new x1(u.c,u.b)),n=v(i.b.b[i.a.e],62),v(i.a,67).e){case 0:n.d=0,n.e=-(n.b+e.d);break;case 1:n.d=(e.e.e.j.a-n.c)/2,n.e=-(n.b+e.d);break;case 2:n.d=e.e.e.j.a-n.c,n.e=-(n.b+e.d);break;case 3:n.d=0,n.e=e.e.e.j.b+e.d;break;case 4:n.d=(e.e.e.j.a-n.c)/2,n.e=e.e.e.j.b+e.d;break;case 5:n.d=e.e.e.j.a-n.c,n.e=e.e.e.j.b+e.d;break;case 6:n.d=-(n.c+e.d),n.e=0;break;case 7:n.d=-(n.c+e.d),n.e=(e.e.e.j.b-n.b)/2;break;case 8:n.d=-(n.c+e.d),n.e=e.e.e.j.b-n.b;break;case 9:n.d=e.e.e.j.a+e.d,n.e=0;break;case 10:n.d=e.e.e.j.a+e.d,n.e=(e.e.e.j.b-n.b)/2;break;case 11:n.d=e.e.e.j.a+e.d,n.e=e.e.e.j.b-n.b;break;case 12:n.d=e.q.b+e.d,n.e=e.q.d+e.d;break;case 13:n.d=(e.e.e.j.a-n.c)/2,n.e=e.q.d+e.d;break;case 14:n.d=e.e.e.j.a-e.q.c-n.c-e.d,n.e=e.q.d+e.d;break;case 15:n.d=e.q.b+e.d,n.e=(e.e.e.j.b-n.b)/2;break;case 16:n.d=(e.e.e.j.a-n.c)/2,n.e=(e.e.e.j.b-n.b)/2;break;case 17:n.d=e.e.e.j.a-e.q.c-n.c-e.d,n.e=(e.e.e.j.b-n.b)/2;break;case 18:n.d=e.q.b+e.d,n.e=e.e.e.j.b-e.q.a-n.b-e.d;break;case 19:n.d=(e.e.e.j.a-n.c)/2,n.e=e.e.e.j.b-e.q.a-n.b-e.d;break;case 20:n.d=e.e.e.j.a-e.q.c-n.c-e.d,n.e=e.e.e.j.b-e.q.a-n.b-e.d}}function WCe(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn;for(dt=new ti,Be=new ti,F=-1,ce=new V(e);ce.a<ce.c.c.length;){for(re=v(q(ce),80),re.d=F--,_=0,Ee=0,g=new V(re.e);g.a<g.c.c.length;)u=v(q(g),118),Ee+=u.c;for(l=new V(re.b);l.a<l.c.c.length;)u=v(q(l),118),_+=u.c;re.c=_,re.f=Ee,Ee==0?Cr(Be,re,Be.c.b,Be.c):_==0&&Cr(dt,re,dt.c.b,dt.c)}for(Et=(tn=new d6,_j(tn,e),tn),C=e.c.length,ee=C-1,B=C+1,A=new Ye;Et.a.c!=0;){for(;Be.b!=0;)Ve=(xt(Be.b!=0),v(su(Be,Be.a.a),80)),jb(Et.a,Ve)!=null,Ve.d=ee--,kA(Ve,dt,Be);for(;dt.b!=0;)tt=(xt(dt.b!=0),v(su(dt,dt.a.a),80)),jb(Et.a,tt)!=null,tt.d=B++,kA(tt,dt,Be);for(O=hu,de=(x=new Sb(new Cb(new n1(Et.a).a).b),new r1(x));ox(de.a.a);)re=(y=Mx(de.a),v(y.yb(),80)),ye=re.f-re.c,ye>=O&&(ye>O&&(A.c=Ae(ht,et,1,0,4,1),O=ye),A.c[A.c.length]=re);A.c.length!=0&&(N=v(ut(A,qj(n,A.c.length)),80),jb(Et.a,N)!=null,N.d=B++,kA(N,dt,Be),A.c=Ae(ht,et,1,0,4,1))}for(ze=e.c.length+1,oe=new V(e);oe.a<oe.c.c.length;)re=v(q(oe),80),re.d<C&&(re.d+=ze);for(lt=new V(e);lt.a<lt.c.c.length;)for(tt=v(q(lt),80),i=new Cn(tt.e,0);i.b<i.d.Y();)u=(xt(i.b<i.d.Y()),v(i.d.sb(i.c=i.b++),118)),vt=u.b,tt.d>vt.d&&(zo(i),Ir(vt.b,u),u.c>0&&(u.a=vt,$e(vt.e,u),u.b=tt,$e(tt.b,u)))}function JCe(e){switch(e.e){case 14:return new ke;case 37:return new Qe;case 8:return new NZ;case 30:return new TZ;case 38:return new ft;case 3:return new Ue;case 47:case 1:return new I2((yy(),kL));case 4:return new Ze;case 49:return new mt;case 23:return new w2;case 13:return new st;case 34:return new At;case 40:return new Rt;case 35:return new sn;case 44:return new fK;case 28:return new or;case 39:return new H;case 27:return new ne;case 6:return new ue;case 31:return new Pe;case 9:return new WV;case 43:return new We;case 17:return new Je;case 18:return new $t;case 29:return new JV;case 11:return new gi;case 12:return new rn;case 36:return new Un;case 46:case 0:return new I2((yy(),xL));case 41:return new Kt;case 15:return new Hn;case 33:return new dr;case 42:return new no;case 22:return new Bi;case 19:return new ie;case 10:return new Gn;case 7:return new Ri;case 24:return new ro;case 21:return new ac;case 16:return new Xo;case 45:return new np;case 26:return new ff;case 20:return new rp;case 25:return new rl;case 5:return new b2;case 32:return new v2;case 48:case 2:return new I2((yy(),wL));default:throw new wn("No implementation is available for the layout processor "+(e.d!=null?e.d:""+e.e))}}function XCe(e){var n,i,u,l,g,y,x;if(i=e.e.e.j,e.b?n=v(hr(e.e,(Fe(),kv)),65):n=new ss(e.k,e.k,e.k,e.k),l=i.a,(e.b||e.g[1]!=(_c(),Ws))&&(l-=n.b+n.c),g=i.a,(e.b||e.g[3]!=(_c(),Ws))&&(g-=n.b+n.c),y=i.b,(e.b||e.g[4]!=(_c(),Ws))&&(y-=n.d+n.a),u=i.b,(e.b||e.g[2]!=(_c(),Ws))&&(u-=n.d+n.a),jh(e,(De(),bt))==(_c(),Ws))e.j[1]=(l-Ah(e,bt))/F2(e,bt),e.f=e.b?n.b+(Ih(e,bt)==1?e.j[1]:0):e.j[1];else switch(e.j[1]=e.k,x=Ah(e,bt)+e.j[1]*(Ih(e,bt)-1),jh(e,bt).e){case 2:e.f=n.b;break;case 3:e.f=n.b+(l-x)/2;break;case 4:e.f=i.a-x-n.c}if(jh(e,kt)==Ws)e.j[3]=(g-Ah(e,kt))/F2(e,kt),e.r=i.a-(e.b?n.c+(Ih(e,kt)==1?e.j[3]:0):e.j[3]);else switch(e.j[3]=e.k,x=Ah(e,kt)+e.j[3]*(Ih(e,kt)-1),jh(e,kt).e){case 2:e.r=x+n.b;break;case 3:e.r=i.a-(g-x)/2-n.c;break;case 4:e.r=i.a-n.c}if(jh(e,ct)==Ws)e.j[4]=(y-Ah(e,ct))/F2(e,ct),e.s=i.b-(e.b?n.a+(Ih(e,ct)==1?e.j[4]:0):e.j[4]);else switch(e.j[4]=e.k,x=Ah(e,ct)+e.j[4]*(Ih(e,ct)-1),jh(e,ct).e){case 2:e.s=x+n.d;break;case 3:e.s=i.b-(y-x)/2-n.a;break;case 4:e.s=i.b-n.a}if(jh(e,at)==Ws)e.j[2]=(u-Ah(e,at))/F2(e,at),e.a=e.b?n.d+(Ih(e,at)==1?e.j[2]:0):e.j[2];else switch(e.j[2]=e.k,x=Ah(e,at)+e.j[2]*(Ih(e,at)-1),jh(e,at).e){case 2:e.a=n.d;break;case 3:e.a=n.d+(u-x)/2;break;case 4:e.a=i.b-x-n.a}}function One(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn;for(vt=0,y=0,A=n[0].d,Be=i[0].d,F=0,re=i.length;F<re;++F)if(O=i[F],Ci(v(J(O,(Fe(),Ct)),28))){for(ce=0,Ee=new V(O.f);Ee.a<Ee.c.c.length&&(ye=v(q(Ee),7),ye.g==(De(),bt));)for(g=new V(ye.b);g.a<g.c.c.length;)if(l=v(q(g),12),l.c.f.d==A){++ce;break}for(de=0,Ve=new Cn(O.f,O.f.c.length);Ve.b>0;){for(ye=(xt(Ve.b>0),v(Ve.a.sb(Ve.c=--Ve.b),7)),ze=0,g=new V(ye.b);g.a<g.c.c.length;)l=v(q(g),12),l.c.f.d==A&&++ze;ze>0&&(ye.g==(De(),bt)?(e.a[ye.k]=vt,++vt):(e.a[ye.k]=vt+ce+de,++de),y+=ze)}vt+=de}else{for(oe=0,Ee=new V(O.f);Ee.a<Ee.c.c.length;){for(ye=v(q(Ee),7),g=new V(ye.b);g.a<g.c.c.length;)l=v(q(g),12),l.c.f.d==A&&++oe;e.a[ye.k]=vt}oe>0&&(++vt,y+=oe)}for(tt=Ae(ar,rr,26,y,12,1),_=0,B=0,ee=n.length;B<ee;++B)if(O=n[B],Ci(v(J(O,(Fe(),Ct)),28)))for(Ee=new V(O.f);Ee.a<Ee.c.c.length;)for(ye=v(q(Ee),7),lt=_,g=new V(ye.e);g.a<g.c.c.length;)l=v(q(g),12),dt=l.d,dt.f.d==Be&&tX(tt,lt,_++,e.a[dt.k]);else for(lt=_,Ee=new V(O.f);Ee.a<Ee.c.c.length;)for(ye=v(q(Ee),7),g=new V(ye.e);g.a<g.c.c.length;)l=v(q(g),12),dt=l.d,dt.f.d==Be&&tX(tt,lt,_++,e.a[dt.k]);for(x=1;x<vt;)x*=2;for(tn=2*x-1,x-=1,Et=Ae(ar,rr,26,tn,12,1),u=0,N=0;N<y;N++)for(C=tt[N]+x,++Et[C];C>0;)C%2>0&&(u+=Et[C+1]),C=(C-1)/2|0,++Et[C];return u}function Dne(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn,Sn;for(Vt(n,"Compound graph postprocessor",1),i=Gt(Oe(Yt(J(e,(Wt(),hC))))),x=v(J(e,(Ce(),I9)),144),A=new Qr,ze=x.W().mb();ze.G();){for(Ee=v(ze.H(),12),y=new dc(x.U(Ee)),uo(y,new GM(e)),dt=gwe((On(0,y.c.length),v(y.c[0],114))),Et=DJ(v(ut(y,y.c.length-1),114)),ou(Ee.a),tt=dt.f,rd(Et.f,tt)?Be=v(J(tt,Kl),55):Be=Ui(tt),F=v(J(Ee,(Fe(),ir)),44),EQ(y,eae)?F?ou(F):(F=new Hi,_e(Ee,ir,F)):F&&_e(Ee,ir,null),re=null,g=new V(y);g.a<g.c.c.length;){for(l=v(q(g),114),ye=new Wr,vA(ye,l.a,Be),oe=l.b,u=new Hi,Mk(u,0,oe.a),mc(u,ye),lt=new tr(Yi(oe.c)),vt=new tr(Yi(oe.d)),lt.a+=ye.a,lt.b+=ye.b,vt.a+=ye.a,vt.b+=ye.b,re&&(u.b==0?de=vt:de=(xt(u.b!=0),v(u.a.a.c,10)),tn=ci(re.a-de.a)>Hu,Sn=ci(re.b-de.b)>Hu,(!i&&tn&&Sn||i&&(tn||Sn))&&vn(Ee.a,lt)),ba(Ee.a,u),u.b==0?re=lt:re=(xt(u.b!=0),v(u.c.b.c,10)),ce=v(J(oe,ir),44),ce&&(B=new Hi,Mk(B,0,ce),mc(B,ye),ba(F,B)),DJ(l)==Et&&(Ui(Et.f)!=l.a&&(ye=new Wr,vA(ye,Ui(Et.f),Be)),_e(Ee,lC,ye)),ee=new Cn(oe.b,0);ee.b<ee.d.Y();)_=(xt(ee.b<ee.d.Y()),v(ee.d.sb(ee.c=ee.b++),33)),ot(J(_,G9))===ot(Ee)&&(vA(_.i,Ui(oe.c.f),Be),zo(ee),$e(Ee.b,_));A.a.db(oe,A)}qn(Ee,dt),An(Ee,Et)}for(N=(Ve=new un(A.a).a.bb().mb(),new hn(Ve));N.a.G();)C=(O=v(N.a.H(),21),v(O.yb(),12)),qn(C,null),An(C,null);Dt(n)}function e3e(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn;if(tt=v(J(e,(Fe(),Ct)),28),tt!=(Zn(),vs)&&tt!=Ac){for(ee=e.c,F=ee.c.length,A=new qi((yi(F+2,oI),Xh(Or(Or(5,F+2),(F+2)/10|0)))),re=new qi((yi(F+2,oI),Xh(Or(Or(5,F+2),(F+2)/10|0)))),$e(A,new en),$e(A,new en),$e(re,new Ye),$e(re,new Ye),Ve=new Qr,n=0;n<F;n++)for(i=(On(n,ee.c.length),v(ee.c[n],16)),lt=(On(n,A.c.length),v(A.c[n],57)),oe=(Fn(),new en),A.c[A.c.length]=oe,vt=(On(n,re.c.length),v(re.c[n],20)),de=new Ye,re.c[re.c.length]=de,l=new V(i.a);l.a<l.c.c.length;){for(u=v(q(l),9),C=Ht(Dr(u));Bt(C);)x=v(It(C),12),Et=x.c.f,SX(Et)&&(Ve.a.db(Et,Ve),dt=v(lt.cb(J(Et,(Ce(),_t))),9),dt||(dt=zee(e,Et),lt.db(J(Et,_t),dt),vt.ib(dt)),qn(x,v(ut(dt.f,1),7)));for(_=Ht(In(u));Bt(_);)x=v(It(_),12),tn=x.d.f,SX(tn)&&(Ve.a.db(tn,Ve),ce=v(ln(oe,J(tn,(Ce(),_t))),9),ce||(ce=zee(e,tn),kn(oe,J(tn,_t),ce),de.c[de.c.length]=ce),An(x,v(ut(ce.f,0),7)))}for(O=0;O<re.c.length;O++)if(ye=(On(O,re.c.length),v(re.c[O],20)),!ye.V())for(O==0?(B=new bl(e),kl(0,ee.c.length),mb(ee.c,0,B)):O==A.c.length-1?(B=new bl(e),ee.c[ee.c.length]=B):B=(On(O-1,ee.c.length),v(ee.c[O-1],16)),y=ye.mb();y.G();)g=v(y.H(),9),Fr(g,B);for(ze=(Be=new un(Ve.a).a.bb().mb(),new hn(Be));ze.a.G();)Ee=(N=v(ze.a.H(),21),v(N.yb(),9)),Fr(Ee,null)}}function t3e(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn,Sn,xi;for(tn=new Ye,F=new V(n.c);F.a<F.c.c.length;)for(O=v(q(F),16),Ee=new V(O.a);Ee.a<Ee.c.c.length;){for(ye=v(q(Ee),9),ye.k=-1,A=hu,Be=hu,lt=new V(ye.f);lt.a<lt.c.c.length;){for(tt=v(q(lt),7),l=new V(tt.b);l.a<l.c.c.length;)i=v(q(l),12),dt=v(J(i,(Ce(),vo)),24).a,A=A>dt?A:dt;for(u=new V(tt.e);u.a<u.c.c.length;)i=v(q(u),12),dt=v(J(i,(Ce(),vo)),24).a,Be=Be>dt?Be:dt}_e(ye,km,St(A)),_e(ye,_m,St(Be))}for(oe=0,B=new V(n.c);B.a<B.c.c.length;)for(O=v(q(B),16),Ee=new V(O.a);Ee.a<Ee.c.c.length;)ye=v(q(Ee),9),ye.k<0&&(Et=new e6,Et.b=oe++,GA(e,ye,Et),tn.c[tn.c.length]=Et);for(Ve=cl(tn.c.length),N=cl(tn.c.length),y=0;y<tn.c.length;y++)$e(Ve,new Ye),$e(N,St(0));for(yCe(n,tn,Ve,N),Sn=v(nr(tn,Ae(Bae,mre,111,tn.c.length,0,1)),625),ze=v(nr(Ve,Ae(l3e,{3:1,5:1,6:1,672:1},20,Ve.c.length,0,1)),672),C=Ae(ar,rr,26,N.c.length,12,1),x=0;x<C.length;x++)C[x]=(On(x,N.c.length),v(N.c[x],24)).a;for(ce=0,de=new Ye,_=0;_<Sn.length;_++)C[_]==0&&$e(de,Sn[_]);for(re=Ae(ar,rr,26,Sn.length,12,1);de.c.length!=0;)for(Et=v(Nf(de,0),111),re[Et.b]=ce++;!ze[Et.b].V();)xi=v(ze[Et.b].vb(0),111),--C[xi.b],C[xi.b]==0&&(de.c[de.c.length]=xi);for(e.a=Ae(Bae,mre,111,Sn.length,0,1),g=0;g<Sn.length;g++)for(ee=Sn[g],vt=re[g],e.a[vt]=ee,ee.b=vt,Ee=new V(ee.f);Ee.a<Ee.c.c.length;)ye=v(q(Ee),9),ye.k=vt;return e.a}function n3e(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt;for(Vt(n,"Fixed Layout",1),_=v(J(e,(Fe(),Ff)),122),ee=0,re=0,de=new V(e.b);de.a<de.c.c.length;){for(oe=v(q(de),9),Be=v(J(oe,md),10),Be&&(oe.i.a=Be.a,oe.i.b=Be.b,v(J(oe,jc),86).kb((Bu(),Av))&&(tt=v(J(oe,tg),15).a,C=v(J(oe,eg),15).a,tt>0&&C>0&&VA(oe,new wt(tt,C),!0))),ee=Xe(ee,oe.i.a+oe.j.a),re=Xe(re,oe.i.b+oe.j.b),B=new V(oe.c);B.a<B.c.c.length;)A=v(q(B),33),Be=v(J(A,md),10),Be&&(A.i.a=Be.a,A.i.b=Be.b),ee=Xe(ee,oe.i.a+A.i.a+A.j.a),re=Xe(re,oe.i.b+A.i.b+A.j.b);for(Ee=new V(oe.f);Ee.a<Ee.c.c.length;)for(ye=v(q(Ee),7),Be=v(J(ye,md),10),Be&&(ye.i.a=Be.a,ye.i.b=Be.b),ze=oe.i.a+ye.i.a,Ve=oe.i.b+ye.i.b,ee=Xe(ee,ze+ye.j.a),re=Xe(re,Ve+ye.j.b),O=new V(ye.c);O.a<O.c.c.length;)A=v(q(O),33),Be=v(J(A,md),10),Be&&(A.i.a=Be.a,A.i.b=Be.b),ee=Xe(ee,ze+A.i.a+A.j.a),re=Xe(re,Ve+A.i.b+A.j.b);for(x=Ht(In(oe));Bt(x);)g=v(It(x),12),F=yne(g),ee=Xe(ee,F.a),re=Xe(re,F.b);for(y=Ht(Dr(oe));Bt(y);)g=v(It(y),12),ot(J(g.c.f,(Ce(),Kl)))!==ot(e)&&(F=yne(g),ee=Xe(ee,F.a),re=Xe(re,F.b))}if(_==(Ou(),Uf))for(ce=new V(e.b);ce.a<ce.c.c.length;)for(oe=v(q(ce),9),y=Ht(In(oe));Bt(y);)g=v(It(y),12),N=PCe(g),N.b==0?_e(g,ir,null):_e(g,ir,N);e.e.a=ee,e.e.b=re,_e(e,jc,(Bu(),u=v(ea(ng),11),new li(u,v(zi(u,u.length),11),0))),l=v(J(e,(Ce(),Ql)),9),l&&_e(l,jc,(i=v(ea(ng),11),new li(i,v(zi(i,i.length),11),0))),Dt(n)}function r3e(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt;if(!Ci(v(J(n,(Fe(),Ct)),28))){if(n.f.c.length>1){Ve=Ae(T3e,Rr,15,e.a.length,0,1),C=cl(e.a.length),ee=0,F=0,i=2*n.d.a.c.length+1;e:for(ze=new V(n.f);ze.a<ze.c.c.length;){if(Ee=v(q(ze),7),oe=Ee.g==(De(),bt)||Ee.g==kt,vt=0,oe){if(Be=v(J(Ee,(Ce(),eu)),9),!Be)continue;for(O=!1,ye=!1,lt=new V(Be.f);lt.a<lt.c.c.length;)tt=v(q(lt),7),ot(J(tt,_t))===ot(Ee)&&(tt.e.c.length==0?tt.b.c.length==0||(O=!0):ye=!0);O&&!ye?vt=Ee.g==bt?-(Be.d?Vi(Be.d.a,Be,0):-1):i-(Be.d?Vi(Be.d.a,Be,0):-1):ye&&!O?vt=(Be.d?Vi(Be.d.a,Be,0):-1)+1:O&&ye&&(vt=Ee.g==bt?0:i/2)}else{for(de=new V(Ee.e);de.a<de.c.c.length;)if(ce=v(q(de),12),l=ce.d,l.f.d==n.d){C.c[C.c.length]=Ee;continue e}else vt+=e.a[l.k];for(A=new V(Ee.b);A.a<A.c.c.length;)if(N=v(q(A),12),l=N.c,l.f.d==n.d){C.c[C.c.length]=Ee;continue e}else vt-=e.a[l.k]}Ee.b.c.length+Ee.e.c.length>0?(Ve[Ee.k]=new cn(vt/(Ee.b.c.length+Ee.e.c.length)),ee=x0e(ee,Ve[Ee.k].a),F=VZ(F,Ve[Ee.k].a)):oe&&(Ve[Ee.k]=new cn(vt))}for(re=(n.d?Vi(n.d.a,n,0):-1)+1,B=n.d.a.c.length+1,_=new V(C);_.a<_.c.c.length;){for(x=v(q(_),7),vt=0,y=0,g=Ht(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[new sp(x),new Sh(x)]))))));Bt(g);)l=v(It(g),7),l.f.d==n.d&&(vt+=VK(l.f)+1,++y);u=vt/y,dt=x.g,dt==(De(),at)?u<re?Ve[x.k]=new cn(ee-u):Ve[x.k]=new cn(F+(B-u)):dt==ct&&(u<re?Ve[x.k]=new cn(F+u):Ve[x.k]=new cn(ee-(B-u)))}uo(n.f,new Dq(Ve))}_e(n,Ct,(Zn(),wd))}}function i3e(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt;for(Be=new Ye,e.a.b.c=Ae(ht,et,1,0,4,1),ye=(Fn(),new en),oe=new V(e.d.c);oe.a<oe.c.c.length;)for(ee=v(q(oe),16),de=new V(ee.a);de.a<de.c.c.length;){if(ce=v(q(de),9),Gt(Oe(Yt(J(ce,(Fe(),Xp)))))&&!Ib(Xb(ce))){x=v(ny(Xb(ce)),12),Ee=x.c.f,Ee==ce&&(Ee=x.d.f),ze=new Er(Ee,Mu(ao(ce.i),Ee.i)),kn(e.b,ce,ze);continue}g=new Ute(ce,e.d),$e(e.a.b,g),va(ye.d,ce,g)}for(re=new V(e.d.c);re.a<re.c.c.length;)for(ee=v(q(re),16),de=new V(ee.a);de.a<de.c.c.length;){for(ce=v(q(de),9),g=v(bi(vi(ye.d,ce)),25),N=Ht(In(ce));Bt(N);)if(_=v(It(N),12),u=gn(_.a,0),A=!0,F=null,u.b!=u.d.c){for(n=v(on(u),10),_.c.g==(De(),bt)&&(tt=new iv(n,new wt(n.a,g.j.e),g,_),tt.c=!0,Be.c[Be.c.length]=tt),_.c.g==kt&&(tt=new iv(n,new wt(n.a,g.j.e+g.j.b),g,_),tt.d=!0,Be.c[Be.c.length]=tt);u.b!=u.d.c;)i=v(on(u),10),rj(n.b,i.b)||(F=new iv(n,i,null,_),Be.c[Be.c.length]=F,A&&(A=!1,i.b<g.j.e?F.c=!0:i.b>g.j.e+g.j.b?F.d=!0:(F.d=!0,F.c=!0))),u.b!=u.d.c&&(n=i);F&&(y=v(ln(ye,_.d.f),25),n.b<y.j.e?F.c=!0:n.b>y.j.e+y.j.b?F.d=!0:(F.d=!0,F.c=!0))}for(C=Ht(Dr(ce));Bt(C);)_=v(It(C),12),_.a.b!=0&&(n=v(M1(_.a),10),_.d.g==(De(),bt)&&(tt=new iv(n,new wt(n.a,g.j.e),g,_),tt.c=!0,Be.c[Be.c.length]=tt),_.d.g==kt&&(tt=new iv(n,new wt(n.a,g.j.e+g.j.b),g,_),tt.d=!0,Be.c[Be.c.length]=tt))}if(Be.c.length!=0){for(pn(),uo(Be,null),B=(On(0,Be.c.length),v(Be.c[0],142)),l=new bA(B,e.d),O=1;O<Be.c.length;O++)Ve=(On(O,Be.c.length),v(Be.c[O],142)),rj(l.j.d,Ve.j)&&!(zj(l.j.e+l.j.b,Ve.k)||zj(Ve.n,l.j.e))?hne(l,Ve):($e(e.a.b,l),l=new bA(Ve,e.d));$e(e.a.b,l)}Be.c=Ae(ht,et,1,0,4,1),o_e(e)}function ZA(e,n,i,u,l,g){var y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn,Sn,xi,ha,tu;for(x=v(ut(e.d.c.c,u),16),xi=new Qr,F=new Qr,B=0;B<x.a.c.length;++B)ce=v(ut(x.a,B),9),B<i?(lt=xi.a.db(ce,xi),lt==null):B>i&&(tt=F.a.db(ce,F),tt==null);for(ha=new Qr,ee=new Qr,ye=(vt=new un(xi.a).a.bb().mb(),new hn(vt));ye.a.G();)for(ce=(A=v(ye.a.H(),21),v(A.yb(),9)),y=n==1?In(ce):Dr(ce),C=(Qn(),new ns(rs(Rs(y.a,new w))));Bt(C);)_=v(It(C),12),pa(ce.d)!=pa(_.d.f.d)&&Tn(ha,_.d.f);for(Ee=(Et=new un(F.a).a.bb().mb(),new hn(Et));Ee.a.G();)for(ce=(A=v(Ee.a.H(),21),v(A.yb(),9)),y=n==1?In(ce):Dr(ce),C=(Qn(),new ns(rs(Rs(y.a,new w))));Bt(C);)_=v(It(C),12),pa(ce.d)!=pa(_.d.f.d)&&Tn(ee,_.d.f);for(nae&&wf(),Be=v(ut(e.d.c.c,u+(n==1?1:-1)),16),re=hu,oe=Sr,O=0;O<Be.a.c.length;O++)ce=v(ut(Be.a,O),9),ha.a.R(ce)?re=re>O?re:O:ee.a.R(ce)&&(oe=oe<O?oe:O);if(re<oe){for(ze=(tn=new un(ha.a).a.bb().mb(),new hn(tn));ze.a.G();){for(ce=(A=v(ze.a.H(),21),v(A.yb(),9)),N=Ht(In(ce));Bt(N);)if(_=v(It(N),12),pa(ce.d)==pa(_.d.f.d))return null;for(C=Ht(Dr(ce));Bt(C);)if(_=v(It(C),12),pa(ce.d)==pa(_.c.f.d))return null}for(Ve=(dt=new un(ee.a).a.bb().mb(),new hn(dt));Ve.a.G();){for(ce=(A=v(Ve.a.H(),21),v(A.yb(),9)),N=Ht(In(ce));Bt(N);)if(_=v(It(N),12),pa(ce.d)==pa(_.d.f.d))return null;for(C=Ht(Dr(ce));Bt(C);)if(_=v(It(C),12),pa(ce.d)==pa(_.c.f.d))return null}for(xi.a.Y()==0?tu=0:F.a.Y()==0?tu=Be.a.c.length:tu=re+1,de=new V(x.a);de.a<de.c.c.length;)if(ce=v(q(de),9),ce.g==(pt(),fr))return null;return g==1?cy(be(ve(G_,1),Rr,24,0,[St(tu)])):n==1&&u==l-2||n==0&&u==1?cy(be(ve(G_,1),Rr,24,0,[St(tu)])):(Sn=ZA(e,n,tu,u+(n==1?1:-1),l,g-1),Sn&&n==1&&Sn.rb(0,St(tu)),Sn)}return null}function a3e(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;if(cA(n),B=(Fe(),Pv).b,!(B in n.a&&zn(n,B).ic().a)){if(_=zn(n,"source"),C=zn(n,"sourcePort"),N=zn(n,"target"),A=zn(n,"targetPort"),_){if(!_.lc())throw new Gs("Invalid format of an edge's 'source' property. It must be a string.",_,n)}else throw new Gs("Edges must contain a 'source' property.",null,n);if(N){if(!N.lc())throw new Gs("Invalid format of an edge's 'target' property. It must be a string.",N,n)}else throw new Gs("Edges must contain a 'target' property.",null,n);re=null,ce=null;try{ee=v(ey(e.i,_.lc().a),9),C&&C.lc()&&(re=v(ey(e.k,C.lc().a),7)),oe=v(ey(e.i,N.lc().a),9),A&&A.lc()&&(ce=v(ey(e.k,A.lc().a),7))}catch(ye){throw ye=ni(ye),qe(ye,76)?new Eb("An edge's 'source', 'target', 'sourcePort', and 'targetPort' properties have to be strings.",n):ri(ye)}if(!Gt(Oe(e.g))&&(!ee||!oe||Ui(ee)!=Ui(oe)))return;if(!ee||!oe)throw new Eb("An edge's source or target node could not be resolved.",n);if(F=Ui(ee),u=new Hs,_e(u,(Ce(),_t),n),y=v(zn(n,"id"),97),ty(e.a,y.a,u),kn(e.b,u,n),My(n,u),dA(e,n,u,F),l=v(J(F,Xr),18),ee==oe&&l.ib((_r(),Nm)),!re)re=une(ee,new Wr,(vr(),hi),F);else if(re.f!=ee)throw new H2("Inconsistent source port reference found.");if(!ce)ce=une(oe,new Wr,(vr(),Wi),F);else if(ce.f!=oe)throw new H2("Inconsistent target port reference found.");if(qn(u,re),An(u,ce),(Ef(Ga((kr(),new cr(yr(be(ve(ht,1),et,1,4,[re.b,re.e]))))))>1||Ef(Ga(new cr(yr(be(ve(ht,1),et,1,4,[ce.b,ce.e])))))>1)&&l.ib((_r(),Sm)),ot(J(F,(Wt(),Im)))===ot((Lb(),OE))&&!(S_ in n.a)){i=new Hi;try{for(x=zn(n,S_).hc(),g=0;g<x.a.length;++g)O=vc(x,g).kc(),de=new wt(zn(O,"x").jc().a,zn(O,"y").jc().a),Cr(i,de,i.c.b,i.c);_e(u,B9,i)}catch(ye){throw ye=ni(ye),qe(ye,54)?new Eb("Invalid format of an edges 'bendPoints' property.",n):ri(ye)}}_e(u,ir,null)}}function Br(){Br=s,RL=new bn("LEFT_DIR_PREPROCESSOR",0),PL=new bn("DOWN_DIR_PREPROCESSOR",1),QL=new bn("UP_DIR_PREPROCESSOR",2),EL=new bn("COMMENT_PREPROCESSOR",3),EE=new bn("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",4),ZL=new bn("SPLINE_SELF_LOOP_PREPROCESSOR",5),CE=new bn("INTERACTIVE_EXTERNAL_PORT_POSITIONER",6),UL=new bn("PARTITION_PREPROCESSOR",7),kE=new bn("BIG_NODES_PREPROCESSOR",8),pm=new bn("LABEL_DUMMY_INSERTER",9),zL=new bn("PARTITION_POSTPROCESSOR",10),HL=new bn("NODE_PROMOTION",11),vm=new bn("LAYER_CONSTRAINT_PROCESSOR",12),NL=new bn("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),xE=new bn("BIG_NODES_INTERMEDIATEPROCESSOR",14),NE=new bn("LONG_EDGE_SPLITTER",15),ME=new bn("PORT_SIDE_PROCESSOR",16),bm=new bn("LABEL_DUMMY_SWITCHER",17),OL=new bn("LABEL_MANAGEMENT_PROCESSOR",18),dm=new bn("INVERTED_PORT_PROCESSOR",19),VL=new bn("SELF_LOOP_PROCESSOR",20),TE=new bn("PORT_LIST_SORTER",21),mm=new bn("NORTH_SOUTH_PORT_PREPROCESSOR",22),SL=new bn("GREEDY_SWITCH",23),FL=new bn("PORT_DISTRIBUTER",24),qL=new bn("SPLINE_SELF_LOOP_POSITIONER",25),YL=new bn("SAUSAGE_COMPACTION",26),PE=new bn("IN_LAYER_CONSTRAINT_PROCESSOR",27),AL=new bn("HYPEREDGE_DUMMY_MERGER",28),Pd=new bn("LABEL_SIDE_SELECTOR",29),_E=new bn("BIG_NODES_SPLITTER",30),LL=new bn("LABEL_AND_NODE_SIZE_PROCESSOR",31),$L=new bn("SPLINE_SELF_LOOP_ROUTER",32),GL=new bn("NODE_MARGIN_CALCULATOR",33),TL=new bn("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",34),rg=new bn("HIERARCHICAL_PORT_POSITION_PROCESSOR",35),DL=new bn("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",36),Bv=new bn("BIG_NODES_POSTPROCESSOR",37),_L=new bn("COMMENT_POSTPROCESSOR",38),IL=new bn("HYPERNODE_PROCESSOR",39),ML=new bn("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",40),SE=new bn("LONG_EDGE_JOINER",41),ym=new bn("NORTH_SOUTH_PORT_POSTPROCESSOR",42),gm=new bn("LABEL_DUMMY_REMOVER",43),jL=new bn("HORIZONTAL_COMPACTOR",44),jE=new bn("REVERSED_EDGE_RESTORER",45),BL=new bn("LEFT_DIR_POSTPROCESSOR",46),CL=new bn("DOWN_DIR_POSTPROCESSOR",47),KL=new bn("UP_DIR_POSTPROCESSOR",48),hm=new bn("END_LABEL_PROCESSOR",49)}function Ce(){Ce=s;var e,n;_t=new sr("origin"),Aoe=new sr("processingConfiguration"),H9=new sr("processors"),A9=new gt("compoundNode",(jn(),jn(),Vn)),Ioe=new gt("insideConnections",Vn),Kl=new sr("nestedLGraph"),Ql=new sr("parentLNode"),B9=new sr("originalBendpoints"),R9=new sr("originalDummyNodePosition"),G9=new sr("originalLabelEdge"),z9=new sr("representedLabels"),jo=new gt("labelSide",(na(),Ov)),wu=new gt("reversed",Vn),Md=new sr("random"),Ki=new gt("longEdgeSource",null),Ii=new gt("longEdgeTarget",null),aC=new gt("edgeConstraint",(nd(),b9)),$l=new sr("inLayerLayoutUnit"),mu=new gt("inLayerConstraint",(Fs(),Tm)),Td=new gt("inLayerSuccessorConstraint",new Ye),eu=new sr("portDummy"),ug=new gt("crossingHint",St(0)),Xr=new gt("graphProperties",(n=v(ea(k9),11),new li(n,v(zi(n,n.length),11),0))),$r=new gt("externalPortSide",(De(),mr)),D9=new gt("externalPortSize",new Wr),jm=new sr("externalPortReplacedDummy"),Xf=new gt("externalPortConnections",(e=v(ea(Hr),11),new li(e,v(zi(e,e.length),11),0))),$u=new gt(ere,0),M9=new sr("barycenterAssociates"),lg=new sr("TopSideComments"),sg=new sr("BottomSideComments"),Mm=new sr("CommentConnectionPort"),oC=new gt("inputCollect",Vn),sC=new gt("outputCollect",Vn),L9=new gt("cyclic",Vn),Yv=new gt("bigNodeOriginalSize",new cn(0)),zc=new gt("bigNodeInitial",Vn),j9=new gt("de.cau.cs.kieler.klay.layered.bigNodeLabels",new Ye),iC=new gt("de.cau.cs.kieler.klay.layered.postProcess",null),I9=new sr("crossHierarchyMap"),lC=new sr("targetOffset"),Loe=new gt("splineLabelSize",new Wr),Vv=new gt("splineLoopSide",(Ni(),$f)),cC=new gt("splineSelfLoopComponents",new Ye),U9=new gt("splineSelfLoopMargins",new a1),Wl=new sr("spacings"),Am=new gt("partitionConstraint",Vn),cg=new Y1((Fe(),Hl),new cn(0)),Qi=new F1(tL,new cn(20),new cn(1)),uC=new F1(JI,new cn(10),new cn(1)),_s=new F1(ZI,new cn(12),new cn(0)),vo=new Y1(XI,St(0)),Nd=new F1(nie,new cn(ure),new cn(0)),O9=new Y1(Ff,(Ou(),Uf))}function Wt(){Wt=s,Om=new gt("de.cau.cs.kieler.klay.layered.nodePromotion",(Nl(),wm)),Z9=new ry("de.cau.cs.kieler.klay.layered.nodePromotionBoundary",St(0),St(0),St(100)),$9=new gt(Xne,St(1)),hg=new Pf("de.cau.cs.kieler.klay.layered.inLayerSpacingFactor",new cn(1),new cn(0)),xu=new gt("de.cau.cs.kieler.klay.layered.edgeSpacingFactor",new cn(.5)),Boe=new gt("de.cau.cs.kieler.klay.layered.edgeNodeSpacingFactor",new cn(xI)),vC=new gt("de.cau.cs.kieler.klay.layered.distributeNodes",(jn(),jn(),Vn)),pg=new gt("de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers",(Lu(),Bm)),bC=new gt("de.cau.cs.kieler.klay.layered.cycleBreaking",(X1(),IE)),wC=new gt("de.cau.cs.kieler.klay.layered.nodeLayering",(ly(),LE)),Im=new gt("de.cau.cs.kieler.klay.layered.crossMin",(Lb(),DE)),yC=new gt("de.cau.cs.kieler.klay.layered.greedySwitch",(uv(),nC)),xC=new gt("de.cau.cs.kieler.klay.layered.nodePlace",(Sy(),BE)),Y9=new ry("de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening",new cn(wI),new cn(0),new cn(1)),Lm=new gt("de.cau.cs.kieler.klay.layered.fixedAlignment",(Jb(),JE)),jd=new gt("de.cau.cs.kieler.klay.layered.edgeLabelSideSelection",(Ty(),Pm)),F9=new gt(Jne,Vn),dg=new Pf("de.cau.cs.kieler.klay.layered.thoroughness",St(10),St(1)),Tr=new gt("de.cau.cs.kieler.klay.layered.layerConstraint",(ra(),eh)),V9=new gt("de.cau.cs.kieler.klay.layered.mergeEdges",Vn),q9=new gt("de.cau.cs.kieler.klay.layered.mergeHierarchyEdges",di),mC=new gt("de.cau.cs.kieler.klay.layered.interactiveReferencePoint",(iy(),rC)),Zv=new gt("de.cau.cs.kieler.klay.layered.feedBackEdges",Vn),hC=new gt("de.cau.cs.kieler.klay.layered.unnecessaryBendpoints",Vn),gC=new gt("de.cau.cs.kieler.klay.layered.contentAlignment",(Gp(),an(VE,be(ve(qE,1),Ke,123,0,[zE])))),K9=new gt("de.cau.cs.kieler.klay.layered.sausageFolding",Vn),EC=new gt("de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement",(ky(),CC)),dC=new gt("de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy",(Gb(),RE)),kC=new gt("de.cau.cs.kieler.klay.layered.northOrSouthPort",Vn),Dm=new gt("de.cau.cs.kieler.klay.layered.postCompaction",(zp(),Hv)),_C=new gt("de.cau.cs.kieler.klay.layered.postCompaction.constraints",(oy(),AE)),pC=new gt("de.cau.cs.kieler.klay.layered.components.compact",Vn)}function m_(){m_=s,Die=new Fi("OUT_T_L",0,(kr(),new Iu(an((Gu(),ca),be(ve(Rn,1),Ke,41,0,[Aa,oa])))),(hk(),Ic)),Oie=new Fi("OUT_T_C",1,new cr(yr(be(ve(ht,1),et,1,4,[an(ca,be(ve(Rn,1),Ke,41,0,[Aa,po])),an(ca,be(ve(Rn,1),Ke,41,0,[Aa,po,sa]))]))),Cd),Bie=new Fi("OUT_T_R",2,new Iu(an(ca,be(ve(Rn,1),Ke,41,0,[Aa,ua]))),Lc),Sie=new Fi("OUT_B_L",3,new Iu(an(ca,be(ve(Rn,1),Ke,41,0,[Ma,oa]))),Ic),Pie=new Fi("OUT_B_C",4,new cr(yr(be(ve(ht,1),et,1,4,[an(ca,be(ve(Rn,1),Ke,41,0,[Ma,po])),an(ca,be(ve(Rn,1),Ke,41,0,[Ma,po,sa]))]))),Cd),Nie=new Fi("OUT_B_R",5,new Iu(an(ca,be(ve(Rn,1),Ke,41,0,[Ma,ua]))),Lc),jie=new Fi("OUT_L_T",6,new Iu(an(ca,be(ve(Rn,1),Ke,41,0,[oa,Aa,sa]))),Lc),Mie=new Fi("OUT_L_C",7,new cr(yr(be(ve(ht,1),et,1,4,[an(ca,be(ve(Rn,1),Ke,41,0,[oa,ja])),an(ca,be(ve(Rn,1),Ke,41,0,[oa,ja,sa]))]))),Lc),Tie=new Fi("OUT_L_B",8,new Iu(an(ca,be(ve(Rn,1),Ke,41,0,[oa,Ma,sa]))),Lc),Lie=new Fi("OUT_R_T",9,new Iu(an(ca,be(ve(Rn,1),Ke,41,0,[ua,Aa,sa]))),Ic),Iie=new Fi("OUT_R_C",10,new cr(yr(be(ve(ht,1),et,1,4,[an(ca,be(ve(Rn,1),Ke,41,0,[ua,ja])),an(ca,be(ve(Rn,1),Ke,41,0,[ua,ja,sa]))]))),Ic),Aie=new Fi("OUT_R_B",11,new Iu(an(ca,be(ve(Rn,1),Ke,41,0,[ua,Ma,sa]))),Ic),Eie=new Fi("IN_T_L",12,new cr(yr(be(ve(ht,1),et,1,4,[an(Ai,be(ve(Rn,1),Ke,41,0,[Aa,oa])),an(Ai,be(ve(Rn,1),Ke,41,0,[Aa,oa,sa]))]))),Ic),_ie=new Fi("IN_T_C",13,new cr(yr(be(ve(ht,1),et,1,4,[an(Ai,be(ve(Rn,1),Ke,41,0,[Aa,po])),an(Ai,be(ve(Rn,1),Ke,41,0,[Aa,po,sa]))]))),Cd),Cie=new Fi("IN_T_R",14,new cr(yr(be(ve(ht,1),et,1,4,[an(Ai,be(ve(Rn,1),Ke,41,0,[Aa,ua])),an(Ai,be(ve(Rn,1),Ke,41,0,[Aa,ua,sa]))]))),Lc),xie=new Fi("IN_C_L",15,new cr(yr(be(ve(ht,1),et,1,4,[an(Ai,be(ve(Rn,1),Ke,41,0,[ja,oa])),an(Ai,be(ve(Rn,1),Ke,41,0,[ja,oa,sa]))]))),Ic),wie=new Fi("IN_C_C",16,new cr(yr(be(ve(ht,1),et,1,4,[an(Ai,be(ve(Rn,1),Ke,41,0,[ja,po])),an(Ai,be(ve(Rn,1),Ke,41,0,[ja,po,sa]))]))),Cd),kie=new Fi("IN_C_R",17,new cr(yr(be(ve(ht,1),et,1,4,[an(Ai,be(ve(Rn,1),Ke,41,0,[ja,ua])),an(Ai,be(ve(Rn,1),Ke,41,0,[ja,ua,sa]))]))),Lc),yie=new Fi("IN_B_L",18,new cr(yr(be(ve(ht,1),et,1,4,[an(Ai,be(ve(Rn,1),Ke,41,0,[Ma,oa])),an(Ai,be(ve(Rn,1),Ke,41,0,[Ma,oa,sa]))]))),Ic),vie=new Fi("IN_B_C",19,new cr(yr(be(ve(ht,1),et,1,4,[an(Ai,be(ve(Rn,1),Ke,41,0,[Ma,po])),an(Ai,be(ve(Rn,1),Ke,41,0,[Ma,po,sa]))]))),Cd),mie=new Fi("IN_B_R",20,new cr(yr(be(ve(ht,1),et,1,4,[an(Ai,be(ve(Rn,1),Ke,41,0,[Ma,ua])),an(Ai,be(ve(Rn,1),Ke,41,0,[Ma,ua,sa]))]))),Lc),hE=new Fi(Rf,21,mv,null)}function Bne(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn,Sn,xi,ha,tu,Es,Ad,Yc,nh,Li,ki,Mr,ai,Cs,Ko,Vc,Ao,bg,Id,Io,Jl,Qu,Wu,Ps,Oi,Ss,rh,Ju;for(Id=0,vt=0,Sn=n.length;vt<Sn;++vt)if(lt=n[vt],Ci(v(J(lt,(Fe(),Ct)),28)))for(ki=new V(lt.f);ki.a<ki.c.c.length;){for(Li=v(q(ki),7),ai=0,x=new V(Li.e);x.a<x.c.c.length;)y=v(q(x),12),lt.d!=y.d.f.d&&++ai;ai>0&&(e.a[Li.k]=Id++)}else{for(ha=0,ki=new V(lt.f);ki.a<ki.c.c.length;){for(Li=v(q(ki),7),x=new V(Li.e);x.a<x.c.c.length;)y=v(q(x),12),lt.d!=y.d.f.d&&++ha;e.a[Li.k]=Id}ha>0&&++Id}for(Ps=0,Et=0,xi=i.length;Et<xi;++Et)if(lt=i[Et],Ci(v(J(lt,(Fe(),Ct)),28))){for(tu=0,ki=new V(lt.f);ki.a<ki.c.c.length&&(Li=v(q(ki),7),Li.g==(De(),bt));)for(x=new V(Li.b);x.a<x.c.c.length;)if(y=v(q(x),12),lt.d!=y.c.f.d){++tu;break}for(Ad=0,Cs=new Cn(lt.f,lt.f.c.length);Cs.b>0;){for(Li=(xt(Cs.b>0),v(Cs.a.sb(Cs.c=--Cs.b),7)),ai=0,x=new V(Li.b);x.a<x.c.c.length;)y=v(q(x),12),lt.d!=y.c.f.d&&++ai;ai>0&&(Li.g==(De(),bt)?(e.a[Li.k]=Ps,++Ps):(e.a[Li.k]=Ps+tu+Ad,++Ad))}Ps+=Ad}else{for(ha=0,ki=new V(lt.f);ki.a<ki.c.c.length;){for(Li=v(q(ki),7),x=new V(Li.b);x.a<x.c.c.length;)y=v(q(x),12),lt.d!=y.c.f.d&&++ha;e.a[Li.k]=Ps}ha>0&&++Ps}for(Mr=(Fn(),new en),B=new ta,dt=0,tn=n.length;dt<tn;++dt)for(lt=n[dt],Qu=new V(lt.f);Qu.a<Qu.c.c.length;)for(Jl=v(q(Qu),7),x=new V(Jl.e);x.a<x.c.c.length;)if(y=v(q(x),12),Ss=y.d,lt.d!=Ss.f.d)if(Io=v(bi(vi(Mr.d,Jl)),197),Oi=v(bi(vi(Mr.d,Ss)),197),!Io&&!Oi)O=new GK,B.a.db(O,B),$e(O.a,y),$e(O.d,Jl),va(Mr.d,Jl,O),$e(O.d,Ss),va(Mr.d,Ss,O);else if(!Io)$e(Oi.a,y),$e(Oi.d,Jl),va(Mr.d,Jl,Oi);else if(!Oi)$e(Io.a,y),$e(Io.d,Ss),va(Mr.d,Ss,Io);else if(Io==Oi)$e(Io.a,y);else{for($e(Io.a,y),nh=new V(Oi.d);nh.a<nh.c.c.length;)Yc=v(q(nh),7),va(Mr.d,Yc,Io);Bn(Io.a,Oi.a),Bn(Io.d,Oi.d),B.a.eb(Oi)!=null}for(F=v(Kk(B,Ae(w3e,{674:1,3:1,5:1,6:1},197,B.a.Y(),0,1)),674),tt=n[0].d,bg=i[0].d,N=0,A=F.length;N<A;++N)for(C=F[N],C.e=Id,C.f=Ps,ki=new V(C.d);ki.a<ki.c.c.length;)Li=v(q(ki),7),Ko=e.a[Li.k],Li.f.d==tt?(Ko<C.e&&(C.e=Ko),Ko>C.b&&(C.b=Ko)):Li.f.d==bg&&(Ko<C.f&&(C.f=Ko),Ko>C.c&&(C.c=Ko));for(ad(F,0,F.length,(vf(),vf(),th)),Wu=Ae(ar,rr,26,F.length,12,1),u=Ae(ar,rr,26,Ps+1,12,1),re=0;re<F.length;re++)Wu[re]=F[re].f,u[Wu[re]]=1;for(g=0,oe=0;oe<u.length;oe++)u[oe]==1?u[oe]=g:--g;for(Vc=0,ce=0;ce<Wu.length;ce++)Wu[ce]+=u[Wu[ce]],Vc=ui(Vc,Wu[ce]+1);for(_=1;_<Vc;)_*=2;for(Ju=2*_-1,_-=1,rh=Ae(ar,rr,26,Ju,12,1),l=0,Ve=0;Ve<Wu.length;Ve++)for(ze=Wu[Ve]+_,++rh[ze];ze>0;)ze%2>0&&(l+=rh[ze+1]),ze=(ze-1)/2|0,++rh[ze];for(Be=Ae(Lae,et,156,F.length*2,0,1),de=0;de<F.length;de++)Be[2*de]=new J1(F[de],F[de].e,F[de].b,(ay(),Uv)),Be[2*de+1]=new J1(F[de],F[de].b,F[de].e,zv);for(ad(Be,0,Be.length,th),Es=0,ye=0;ye<Be.length;ye++)switch(Be[ye].d.e){case 0:++Es;break;case 1:--Es,l+=Es}for(Ao=Ae(Lae,et,156,F.length*2,0,1),Ee=0;Ee<F.length;Ee++)Ao[2*Ee]=new J1(F[Ee],F[Ee].f,F[Ee].c,(ay(),Uv)),Ao[2*Ee+1]=new J1(F[Ee],F[Ee].c,F[Ee].f,zv);for(ad(Ao,0,Ao.length,th),Es=0,ee=0;ee<Ao.length;ee++)switch(Ao[ee].d.e){case 0:++Es;break;case 1:--Es,l+=Es}return l}function Fe(){Fe=s;var e,n;tie=new gt("de.cau.cs.kieler.animate",(jn(),jn(),di)),new gt("de.cau.cs.kieler.minAnimTime",St(400)),new gt("de.cau.cs.kieler.maxAnimTime",St(4e3)),new gt("de.cau.cs.kieler.animTimeFactor",St(100)),kv=new gt("de.cau.cs.kieler.additionalPortSpace",null),Xp=new gt("de.cau.cs.kieler.commentBox",Vn),new sr("de.cau.cs.kieler.diagramType"),Ta=new gt("de.cau.cs.kieler.edgeLabelPlacement",(Ys(),q_)),$I=new gt("de.cau.cs.kieler.edgeType",(Iy(),K_)),iie=new sr("de.cau.cs.kieler.fontName"),aie=new gt("de.cau.cs.kieler.fontSize",St(0)),Ev=new gt("de.cau.cs.kieler.hypernode",Vn),ir=new gt("de.cau.cs.kieler.junctionPoints",new Hi),new gt("de.cau.cs.kieler.layoutAncestors",Vn),Cv=new gt("de.cau.cs.kieler.margins",new a1),eg=new Pf("de.cau.cs.kieler.minHeight",new cn(0),new cn(0)),tg=new Pf("de.cau.cs.kieler.minWidth",new cn(0),new cn(0)),Pv=new gt("de.cau.cs.kieler.noLayout",Vn),Hl=new sr("de.cau.cs.kieler.offset"),zu=new sr("de.cau.cs.kieler.klay.layered.portAnchor"),Uu=new sr("de.cau.cs.kieler.portIndex"),Nv=new gt("de.cau.cs.kieler.portSide",(De(),mr)),new gt("de.cau.cs.kieler.progressBar",Vn),new gt("de.cau.cs.kieler.resetConfig",di),new gt("de.cau.cs.kieler.scaleFactor",new cn(1)),gs=new gt("de.cau.cs.kieler.thickness",new cn(1)),new gt("de.cau.cs.kieler.zoomToFit",Vn),qI=new sr("de.cau.cs.kieler.algorithm"),Mo=new gt("de.cau.cs.kieler.alignment",(fs(),V_)),nie=new gt("de.cau.cs.kieler.aspectRatio",new cn(0)),W_=new sr("de.cau.cs.kieler.bendPoints"),ZI=new gt("de.cau.cs.kieler.borderSpacing",new cn(-1)),_v=new gt(Jne,Vn),Zo=new gt("de.cau.cs.kieler.direction",(Jn(),qo)),Ff=new gt("de.cau.cs.kieler.edgeRouting",(Ou(),$_)),rie=new gt("de.cau.cs.kieler.expandNodes",Vn),KI=new gt("de.cau.cs.kieler.hierarchyHandling",(my(),Q_)),oie=new gt("de.cau.cs.kieler.interactive",Vn),yd=new Pf("de.cau.cs.kieler.labelSpacing",new cn(3),new cn(0)),QI=new gt("de.cau.cs.kieler.layoutHierarchy",Vn),ya=new gt("de.cau.cs.kieler.nodeLabelPlacement",(Gu(),n=v(ea(Rn),11),new li(n,v(zi(n,n.length),11),0))),Ct=new gt("de.cau.cs.kieler.portConstraints",(Zn(),Ac)),Sv=new gt("de.cau.cs.kieler.portLabelPlacement",(td(),jv)),JI=new Pf("de.cau.cs.kieler.portSpacing",new cn(-1),new cn(0)),J_=new gt("de.cau.cs.kieler.portAlignment",(_c(),Ws)),eE=new gt("de.cau.cs.kieler.portAlignment.north",Yf),tE=new gt("de.cau.cs.kieler.portAlignment.south",Yf),nE=new gt("de.cau.cs.kieler.portAlignment.west",Yf),X_=new gt("de.cau.cs.kieler.portAlignment.east",Yf),md=new sr("de.cau.cs.kieler.position"),XI=new sr("de.cau.cs.kieler.priority"),new sr(Xne),rE=new gt("de.cau.cs.kieler.selfLoopInside",Vn),eL=new sr("de.cau.cs.kieler.separateConnComp"),jc=new gt("de.cau.cs.kieler.sizeConstraint",(Bu(),e=v(ea(ng),11),new li(e,v(zi(e,e.length),11),0))),Tv=new gt("de.cau.cs.kieler.sizeOptions",an((sd(),Lv),be(ve(fE,1),Ke,139,0,[uE]))),tL=new Pf("de.cau.cs.kieler.spacing",new cn(-1),new cn(0)),sie=new gt("de.cau.cs.kieler.layoutPartitions",Vn),WI=new sr("de.cau.cs.kieler.partition")}function o3e(e,n,i,u){pne();var l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce;if(!(!u&&(e.n?e.n:(pn(),pn(),X9)).R(new j$(n)))){if(v(dL.a,18).kb(n)){if(!i.lc())throw new Bo(are+n+Gf+i+").");B=v(v(dL.b,57).cb(n),79),F=i.lc().a,_e(e,B,F);return}else if(v(hL.a,18).kb(n))try{if(!i.jc())throw new _Z;B=v(v(hL.b,57).cb(n),79),oe=St(t_e((Ln(),""+i.jc().a))),_e(e,B,oe);return}catch(de){throw de=ni(de),qe(de,130)?new Bo("Invalid integer format for property '"+n+Gf+i+")."):ri(de)}else if(v(uL.a,18).kb(n)){if(!i.ic())throw new Bo(are+n+Gf+i+").");B=v(v(uL.b,57).cb(n),79),oe=(jn(),i.ic().a?di:Vn),_e(e,B,oe);return}else if(v(fL.a,18).kb(n)){if(!i.jc())throw new Bo("Invalid float format for property '"+n+Gf+i+").");B=v(v(fL.b,57).cb(n),79),oe=new Vq(i.jc().a),_e(e,B,oe);return}else if(v(lL.a,18).kb(n)){if(!i.lc())throw new Bo(dI+n+Gf+i+").");N=i.lc().a,A=null;try{Wn((Fe(),Nv),n)?A=(De(),v(Vr((JW(),pie),N),32)):Wn(Mo,n)?A=(fs(),v(Vr((oJ(),Vre),N),103)):Wn(Zo,n)?A=(Jn(),v(Vr((WW(),qre),N),59)):Wn(Ff,n)?A=(Ou(),v(Vr((zW(),Qre),N),122)):Wn(KI,n)?A=(my(),v(Vr((jW(),eie),N),166)):Wn(J_,n)||Wn(X_,n)||Wn(eE,n)||Wn(tE,n)||Wn(nE,n)?A=(_c(),v(Vr((XW(),cie),N),100)):Wn(Ct,n)?A=(Zn(),v(Vr((uJ(),fie),N),28)):Wn(Sv,n)?A=(td(),v(Vr((MW(),die),N),149)):Wn($I,n)?A=(Iy(),v(Vr((sJ(),Jre),N),133)):Wn(Ta,n)?A=(Ys(),v(Vr((HW(),$re),N),107)):Wn((Wt(),bC),n)?A=(X1(),v(Vr((yW(),vae),N),193)):Wn(wC,n)?A=(ly(),v(Vr((AW(),xae),N),173)):Wn(jd,n)?A=(Ty(),v(Vr((mJ(),Coe),N),115)):Wn(dC,n)?A=(Gb(),v(Vr((YW(),Yae),N),194)):Wn(Im,n)?A=(Lb(),v(Vr((wW(),Mae),N),192)):Wn(Om,n)?A=(Nl(),v(Vr((vJ(),sae),N),109)):Wn(xC,n)?A=(Sy(),v(Vr((yJ(),Hae),N),141)):Wn(Dm,n)?A=(zp(),v(Vr((cJ(),fae),N),125)):Wn(_C,n)?A=(oy(),v(Vr((mW(),cae),N),175)):Wn(Lm,n)?A=(Jb(),v(Vr((jJ(),Soe),N),124)):Wn(yC,n)?A=(uv(),v(Vr((KJ(),Toe),N),110)):Wn(Tr,n)?A=(ra(),v(Vr((wJ(),Doe),N),85)):Wn(EC,n)?A=(ky(),v(Vr((iJ(),Goe),N),153)):Wn(pg,n)?A=(Lu(),v(Vr((aJ(),zoe),N),172)):Wn(mC,n)&&(A=(iy(),v(Vr((VW(),joe),N),174)))}catch(de){throw de=ni(de),qe(de,54)?new Bo(dI+n+Gf+i+")."):ri(de)}B=v(v(lL.b,57).cb(n),79),_e(e,B,A);return}else if(v(cL.a,18).kb(n)){if(!i.lc())throw new Bo(dI+n+Gf+i+").");for(C=i.lc().a,ee=null,_=zy(C,"[\\[\\]\\s,]+"),y=0,x=_.length;y<x;++y)g=_[y],xb(El(g))!=0&&(Wn((Fe(),ya),n)?(!ee&&(ee=(l=v(ea(Rn),11),new li(l,v(zi(l,l.length),11),0))),mi(ee,(Gu(),v(Vr((CJ(),uie),g),41)))):Wn(jc,n)?(!ee&&(ee=(l=v(ea(ng),11),new li(l,v(zi(l,l.length),11),0))),mi(ee,(Bu(),v(Vr((FW(),gie),g),150)))):Wn(Tv,n)?(!ee&&(ee=(l=v(ea(fE),11),new li(l,v(zi(l,l.length),11),0))),mi(ee,(sd(),v(Vr((UW(),bie),g),139)))):Wn((Wt(),gC),n)&&(!ee&&(ee=(l=v(ea(qE),11),new li(l,v(zi(l,l.length),11),0))),mi(ee,(Gp(),v(Vr((MJ(),_oe),g),123)))));B=v(v(cL.b,57).cb(n),79),_e(e,B,ee);return}else if(v(lm.a,18).kb(n)){if(!i.lc())throw new Bo("Invalid _other_ format for property '"+n+Gf+i+").");if(Wn((Fe(),md),n)||Wn(zu,n))try{re=new Wr,dEe(re,i.lc().a),B=v(v(lm.b,57).cb(n),79),_e(e,B,re);return}catch(de){throw de=ni(de),qe(de,29)?new Bo("Invalid KVector format for property '"+n+"' "+i+"."):ri(de)}else if(Wn(W_,n)||Wn(ir,n))try{ce=new Hi,z_e(ce,i.lc().a),B=v(v(lm.b,57).cb(n),79),_e(e,B,ce);return}catch(de){throw de=ni(de),qe(de,29)?new Bo("Invalid KVectorChain format for property '"+n+"' "+i+"."):ri(de)}else if(Wn(Cv,n)||Wn(kv,n))try{O=new a1,xEe(O,i.lc().a),B=v(v(lm.b,57).cb(n),79),_e(e,B,O);return}catch(de){throw de=ni(de),qe(de,29)?new Bo("Invalid Margins format for property '"+n+"' "+i+"."):ri(de)}}else if(v(Hie.a,18).kb(n))return;throw new Bo("Unsupported layout option '"+n+Gf+i+").")}}var Fy="object",Rr={3:1,8:1,5:1,6:1},$A={3:1,46:1},lu={3:1,54:1,46:1},fu="null",w_="anonymous",KA="Unknown",Rne="function",Sr=2147483647,Gne={181:1,3:1,54:1,46:1},cv=65536,$s=65535,Hne={3:1,54:1,29:1,46:1},x_='For input string: "',hu=-2147483648,Gr={56:1},QA={23:1,145:1,185:1},Ti={3:1,5:1},WA="Invalid UTF8 sequence",zne="fromIndex: ",qr="java.lang",JA="com.google.gwt.core.client",Yy="com.google.gwt.core.client.impl",Vy="java.io",XA="java.nio.charset",eI="javaemul.internal",Yo="com.google.common.base",Une="%s (%s) must not be negative",et={3:1,5:1,6:1},Fne="negative size: ",Ke={3:1,8:1,5:1,11:1,6:1},qy={68:1,136:1,3:1,23:1,17:1},Fp={108:1,35:1},it="com.google.common.collect",k_={108:1,35:1,96:1},lv={144:1,3:1},pr={35:1},fd={57:1},Mt="java.util",Yp={22:1,19:1},wi={22:1,19:1,18:1},hd={22:1,19:1,20:1},__={22:1,19:1,20:1,63:1},dd={35:1,96:1},tI={22:1,19:1,18:1,137:1},fv={21:1},Yne="AbstractMapEntry",nI={207:1,22:1,19:1},rI={159:1,3:1,23:1,17:1},iI=1073741824,Pc={22:1},aI={3:1,22:1,19:1},pd={87:1,3:1,22:1,19:1,20:1,63:1},gd={3:1,57:1},bd={3:1,22:1,19:1,18:1},Mi={64:1},oI="arraySize",Ll="initialArraySize",sI={64:1,188:1,3:1,23:1,17:1},uI="occurrences",rr={52:1,3:1,5:1},cI={205:1,3:1,23:1,17:1},hv=1e-4,Df="com.google.gwt.json.client",fo=4194303,Sc=1048575,Bf=4194304,Nc=17592186044416,E_=-17592186044416,Vne=`([{"' \r
|
|
336
|
+
`,qne=`)]}"' \r
|
|
337
|
+
`,Zne="The given string contains parts that cannot be parsed as numbers.",$ne="de.cau.cs.kieler.core.math",lI=-17976931348623157e292,Zy="de.cau.cs.kieler.core.properties",Kne={79:1,23:1},Qne="de.cau.cs.kieler.core.util",Wne="de.cau.cs.kieler.kiml",Vp="LEFT",qp="RIGHT",$y="CENTER",du="de.cau.cs.kieler.kiml.options",Rf="UNDEFINED",Zp="NONE",Jne="de.cau.cs.kieler.debugMode",Xne="de.cau.cs.kieler.randomSeed",$p="de.cau.cs.kieler.kiml.util.nodespacing",fI="de.cau.cs.kieler.kiml.util.labelspacing",ere="portRatioOrPosition",tre="NodeMarginCalculator",hI="bottom",nre={286:1,121:1,3:1,5:1},dv="undefined",C_="text",rre="stacktrace",Jt={34:1,3:1,8:1,5:1,6:1},P_="properties",S_="bendPoints",ire="junctionPoints",N_="width",T_="height",M_="padding",Kp="children",Zi={38:1,39:1,42:1,51:1,71:1,3:1,8:1,5:1,6:1},j_="de.cau.cs.kieler.klay.gwt.client.layout",are="Invalid boolean format for property '",Gf="' (",dI="Invalid enum format for property '",pI="de.cau.cs.kieler.klay.layered",ore="Layered layout",ji=1/0,Zr=-1/0,pv="de.cau.cs.kieler.klay.layered.compaction.components",Qp="de.cau.cs.kieler.klay.layered.compaction.oned",sre=" instance has been finished already.",Hf="de.cau.cs.kieler.klay.layered.compaction.oned.algs",pu="de.cau.cs.kieler.klay.layered.compaction.recthull",To={68:1},Ks="de.cau.cs.kieler.klay.layered.components",gI={3:1,5:1,22:1,13:1,19:1,20:1,63:1},ure=1.600000023841858,Hu=.001,Mn={31:1},gv="de.cau.cs.kieler.klay.layered.compound",ia={38:1,39:1,47:1,42:1,3:1,8:1,5:1,6:1},ii="de.cau.cs.kieler.klay.layered.graph",cre="Port side is undefined",Nt="de.cau.cs.kieler.klay.layered.intermediate",lre="Big nodes pre-processing",fre=34028234663852886e22,hre={38:1,39:1,42:1,346:1,71:1,3:1,8:1,5:1,6:1},bI="Node '",dre="' has its layer constraint set to FIRST or FIRST_SEPARATE, but has ",pre="at least one incoming edge. Connections between nodes with these ",vI="layer constraints are not supported.",hs=17976931348623157e292,gre="Odd port side processing",Ky={250:1,3:1,5:1},Tc=1e-8,Vo="de.cau.cs.kieler.klay.layered.intermediate.compaction",$a="de.cau.cs.kieler.klay.layered.intermediate.greedyswitch",bv={227:1,3:1,5:1},Wp="de.cau.cs.kieler.klay.layered.networksimplex",A_="INTERACTIVE",yI="de.cau.cs.kieler.klay.layered.p1cycles",ds={106:1,31:1},Qy="de.cau.cs.kieler.klay.layered.p2layers",bre="NETWORK_SIMPLEX",Mc="de.cau.cs.kieler.klay.layered.p3order",I_=5960464477539063e-23,mI="Port type is undefined",wI=.30000001192092896,xI=.699999988079071,vre=.8999999761581421,yre="de.cau.cs.kieler.klay.layered.p3order.constraints",vv="de.cau.cs.kieler.klay.layered.p3order.counting",yv="de.cau.cs.kieler.klay.layered.p4nodes",mre={625:1,3:1,5:1,6:1},ps="de.cau.cs.kieler.klay.layered.p4nodes.bk",Ol="de.cau.cs.kieler.klay.layered.p5edges",Dl="de.cau.cs.kieler.klay.layered.p5edges.splines",Bl=1e-6,Wy=-1e-6,wre="The list of vectors may not be empty.",L_=.09999999999999998,gu="de.cau.cs.kieler.klay.layered.properties",Rl="_gwt_modCount",xre={3:1,22:1,19:1,20:1,63:1},kre={3:1,5:1,57:1},_re={3:1,5:1,22:1,19:1,50:1,18:1},O_="delete",D_=15525485,kI=16777216,_I=16777215,Ere={3:1,5:1,22:1,19:1,20:1,63:1},B_={3:1,23:1,17:1,138:1},E,Jy,R_;w2e(),W(1,null,{},c),E.t=function(e){return this===e},E.u=function(){return this.$c},E.v=function(){return hc(this)},E.w=function(){return cW(this)},E.toString=function(){return this.w()},W(46,1,$A),E.bc=function(){return this.f},E.w=function(){var e,n;return e=l1(this.$c),n=this.bc(),n!=null?e+": "+n:e},W(54,46,lu),W(72,54,lu,iu),W(164,72,{164:1,3:1,54:1,46:1},KW),E.bc=function(){return Mxe(this),this.c},E.cc=function(){return ot(this.b)===ot(Xy)?null:this.b};var Xy,EI;W(642,1,{}),W(356,642,{},h),E.dc=function(e,n){var i={},u=[];e.__gwt$backingJsError={fnStack:u};for(var l=arguments.callee.caller;l;){var g=(Op(),l.name||(l.name=dwe(l.toString())));u.push(g);var y=":"+g,x=i[y];if(x){var _,C;for(_=0,C=x.length;_<C;_++)if(x[_]===l)return}(x||(i[y]=[])).push(l),l=l.caller}},E.ec=function(e){var n,i,u,l,g;for(u=(Op(),g=e.__gwt$backingJsError,g&&g.fnStack?g.fnStack:[]),i=u.length,l=Ae(Foe,Rr,146,i,0,1),n=0;n<i;n++)l[n]=new nk(u[n],null,-1);return l},W(643,642,{}),E.dc=function(e,n){function i(l){if(!("stack"in l))try{throw l}catch{}return l}var u;typeof n=="string"?u=i(new Error(n.replace(`
|
|
338
|
+
`," "))):n&&typeof n==Fy&&"stack"in n?u=n:u=i(new Error),e.__gwt$backingJsError=u},E.fc=function(e,n,i,u){return new nk(n,e+"@"+u,i<0?-1:i)},E.ec=function(e){var n,i,u,l,g,y,x;if(l=(Op(),x=e.__gwt$backingJsError,x&&x.stack?x.stack.split(`
|
|
339
|
+
`):[]),g=Ae(Foe,Rr,146,0,0,1),n=0,u=l.length,u==0)return g;for(y=xne(this,l[0]),es(y.d,w_)||(g[n++]=y),i=1;i<u;i++)g[n++]=xne(this,l[i]);return g},W(357,643,{},qV),E.fc=function(e,n,i,u){return new nk(n,e,-1)};var Cre,Pre,Sre;W(181,54,Gne),W(351,181,Gne,s0e),W(288,1,{},Mj),E.Oc=function(e){var n;return n=new Mj,n.g=4,e>1?n.c=gW(this,e-1):n.c=this,n},E.Pc=function(){return mf(this),this.b},E.Qc=function(){return l1(this)},E.Rc=function(){return $Z(this)},E.Sc=function(){return(this.g&4)!=0},E.Tc=function(){return(this.g&1)!=0},E.w=function(){return(this.g&2?"interface ":this.g&1?"":"class ")+(mf(this),this.n)},E.g=0,W(119,72,{3:1,119:1,54:1,46:1},iZ),W(29,72,Hne,fp,wn),W(95,72,lu,XM,ts),W(231,1,{3:1,231:1});var CI;W(24,231,{3:1,23:1,24:1,231:1},zM),E.F=function(e){return V0e(this,v(e,24))},E.t=function(e){return qe(e,24)&&v(e,24).a==this.a},E.v=function(){return this.a},E.w=function(){return f1(this.a)},E.a=0,Sre={3:1,345:1,23:1,2:1},W(350,1,Gr,Q0),E.$b=function(e,n){return mme(Vh(e),Vh(n))},W(257,95,lu,_0e),W(145,1,{23:1,145:1}),E.F=function(e){return Y0e(this,v(e,145))},E.t=function(e){var n;return e===this?!0:qe(e,145)?(n=v(e,145),es(this.a,n.a)):!1},E.v=function(){return Zk(this.a)},E.w=function(){return this.a},W(358,29,Hne,Q1e),W(256,29,{3:1,54:1,29:1,46:1,256:1},K1e),W(185,145,QA),W(289,185,QA,E0e),E.Zc=function(e,n,i){var u,l;for(u=Ae(Qoe,Ti,26,i,12,1),l=0;l<i;++l)u[l]=e[n+l]&255&$s;return u},W(355,185,QA,F0e),E.Zc=function(e,n,i){var u,l,g,y,x,_,C,N;for(g=0,C=0;C<i;){if(++g,l=e[n+C],(l&192)==128)throw new wn(WA);if(!(l&128))++C;else if((l&224)==192)C+=2;else if((l&240)==224)C+=3;else if((l&248)==240)C+=4;else throw new wn(WA);if(C>i)throw new ts(WA)}for(y=Ae(Qoe,Ti,26,g,12,1),N=0,x=0,_=0;_<i;){for(l=e[n+_++],l&128?(l&224)==192?(x=2,l&=31):(l&240)==224?(x=3,l&=15):(l&248)==240?(x=4,l&=7):(l&252)==248&&(x=5,l&=3):(x=1,l&=127);--x>0;){if(u=e[n+_++],(u&192)!=128)throw new wn("Invalid UTF8 sequence at "+(n+_-1)+", byte="+(u>>>0).toString(16));l=l<<6|u&63}N+=X2e(l,y,N)}return y};var ht=te(qr,"Object",1),s3e=te(qr,"Throwable",46);te(qr,"Exception",54),te(qr,"RuntimeException",72),te(JA,"JavaScriptException",164),te(Yy,"StackTraceCreator/Collector",642),te(Yy,"StackTraceCreator/CollectorLegacy",356),te(Yy,"StackTraceCreator/CollectorModern",643),te(Yy,"StackTraceCreator/CollectorModernNoSourceMap",357),te(Vy,"IOException",181),te(Vy,"UnsupportedEncodingException",351),te(qr,"Class",288),te(qr,"ClassCastException",119),te(qr,"IllegalArgumentException",29),te(qr,"IndexOutOfBoundsException",95),te(qr,"Number",231);var G_=te(qr,"Integer",24),H_=te(qr,"String",2);te(qr,"String/1",350),te(qr,"StringIndexOutOfBoundsException",257),te(XA,"Charset",145),te(XA,"IllegalCharsetNameException",358),te(XA,"UnsupportedCharsetException",256),te(eI,"EmulatedCharset",185),te(eI,"EmulatedCharset/LatinCharset",289),te(eI,"EmulatedCharset/UtfCharset",355),W(669,1,{3:1}),te(Yo,"Optional",669),W(601,669,{3:1},f),E.t=function(e){return e===this},E.v=function(){return 2040732332},E.w=function(){return"Optional.absent()"},E.A=function(e){return Pt(e),sb(),z_};var z_;te(Yo,"Absent",601);var u3e=U1(Yo,"Function");W(208,1,{},s1),E.C=function(e){return RQ(e)},te(Yo,"Joiner",208),W(363,208,{},hQ),E.C=function(e){return T1(this,e)},te(Yo,"Joiner/1",363),W(362,1,{},AK),te(Yo,"Joiner/MapJoiner",362);var c3e=U1(Yo,"Predicate"),Nre;W(244,1,{68:1,244:1,3:1},sq),E.D=function(e){var n;for(n=0;n<this.a.a.length;n++)if(!v(CQ(this.a,n),68).D(e))return!1;return!0},E.t=function(e){var n;return qe(e,244)?(n=v(e,244),cte(this.a,n.a)):!1},E.v=function(){return dX(this.a)+306654252},E.w=function(){return"Predicates.and("+Y6((y1(),Nre),new Nh(this.a))+")"},te(Yo,"Predicates/AndPredicate",244),W(246,1,{68:1,246:1,3:1},o$),E.D=function(e){try{return this.a.kb(e)}catch(n){if(n=ni(n),qe(n,76)||qe(n,119))return!1;throw ri(n)}},E.t=function(e){var n;return qe(e,246)?(n=v(e,246),this.a.t(n.a)):!1},E.v=function(){return this.a.v()},E.w=function(){return"Predicates.in("+this.a+")"},te(Yo,"Predicates/InPredicate",246),W(245,1,{68:1,245:1,3:1},uq),E.D=function(e){return Fo(this.a,e)},E.t=function(e){var n;return qe(e,245)?(n=v(e,245),Fo(this.a,n.a)):!1},E.v=function(){return ls(this.a)},E.w=function(){return"Predicates.equalTo("+this.a+")"},te(Yo,"Predicates/IsEqualToPredicate",245),W(17,1,{3:1,23:1,17:1}),E.F=function(e){return l0e(this,v(e,17))},E.t=function(e){return this===e},E.v=function(){return hc(this)},E.w=function(){return I1(this)},E.e=0;var yn=te(qr,"Enum",17);W(136,17,qy);var Tre,Mre,PI,jre,em=Zt(Yo,"Predicates/ObjectPredicate",136,yn,zye);W(591,136,qy,$K),E.D=function(e){return!0},E.w=function(){return"Predicates.alwaysTrue()"},Zt(Yo,"Predicates/ObjectPredicate/1",591,em,null),W(592,136,qy,KK),E.D=function(e){return!1},E.w=function(){return"Predicates.alwaysFalse()"},Zt(Yo,"Predicates/ObjectPredicate/2",592,em,null),W(593,136,qy,dK),E.D=function(e){return e==null},E.w=function(){return"Predicates.isNull()"},Zt(Yo,"Predicates/ObjectPredicate/3",593,em,null),W(594,136,qy,kK),E.D=function(e){return e!=null},E.w=function(){return"Predicates.notNull()"},Zt(Yo,"Predicates/ObjectPredicate/4",594,em,null),W(177,669,{177:1,3:1},e1),E.t=function(e){var n;return qe(e,177)?(n=v(e,177),Fo(this.a,n.a)):!1},E.v=function(){return 1502476572+ls(this.a)},E.w=function(){return"Optional.of("+this.a+")"},E.A=function(e){return new e1(ok(e.B(this.a),"the Function passed to Optional.transform() must not return null."))},te(Yo,"Present",177),W(108,1,Fp),E.I=function(){Kve()},te(it,"UnmodifiableIterator",108),W(651,108,k_),E.J=function(e){throw new er},E.O=function(e){throw new er},te(it,"UnmodifiableListIterator",651),W(378,651,k_),E.G=function(){return this.b<this.c},E.K=function(){return this.b>0},E.H=function(){if(this.b>=this.c)throw new _a;return KZ(this,this.b++)},E.L=function(){return this.b},E.M=function(){if(this.b<=0)throw new _a;return KZ(this,--this.b)},E.N=function(){return this.b-1},E.b=0,E.c=0,te(it,"AbstractIndexedListIterator",378),W(428,108,Fp),E.G=function(){return yc(this)},E.H=function(){return Tf(this)},E.d=1,te(it,"AbstractIterator",428),W(653,1,{144:1}),E.P=function(){var e;return e=this.f,e||(this.f=this.S())},E.T=function(){return new $2(this.P())},E.t=function(e){return Tj(this,e)},E.v=function(){return this.P().v()},E.V=function(){return this.Y()==0},E.W=function(){return Vx(this)},E.w=function(){return this.P().w()},te(it,"AbstractMultimap",653),W(294,653,lv),E.Q=function(){Yj(this)},E.R=function(e){return Jh(this.b,e)},E.S=function(){return new K2(this,this.b)},E.T=function(){return new PK(this,this.b)},E.$=function(){return j2e(this.Z())},E.U=function(e){return Za(this,e)},E.X=function(e){return o_(this,e)},E.Y=function(){return this.c},E.c=0,te(it,"AbstractMapBasedMultimap",294),W(600,294,lv),E.Z=function(){return new qi(this.a)},E.$=function(){return kr(),kr(),mv},E.U=function(e){return v(Za(this,e),20)},E.X=function(e){return v(o_(this,e),20)},E.P=function(){var e;return e=this.f,e||(this.f=new K2(this,this.b))},E.t=function(e){return Tj(this,e)},te(it,"AbstractListMultimap",600),W(388,1,pr),E.G=function(){return this.b.b||this.d.G()},E.H=function(){var e;return this.d.G()||(e=Lp(this.b),e.yb(),this.a=v(e.zb(),19),this.d=this.a.mb()),this.d.H()},E.I=function(){this.d.I(),this.a.V()&&nj(this.b),--this.c.c},te(it,"AbstractMapBasedMultimap/Itr",388),W(389,388,pr,IJ),te(it,"AbstractMapBasedMultimap/1",389),W(638,1,fd),E.Q=function(){this.bb().Q()},E._=function(e){return Qk(this,e)},E.R=function(e){return!!rA(this,e,!1)},E.ab=function(e){var n,i,u;for(i=this.bb().mb();i.G();)if(n=v(i.H(),21),u=n.zb(),ot(e)===ot(u)||e!=null&&Fo(e,u))return!0;return!1},E.t=function(e){return Hee(this,e)},E.cb=function(e){return bi(rA(this,e,!1))},E.v=function(){return Cj(this.bb())},E.V=function(){return this.Y()==0},E.W=function(){return new un(this)},E.db=function(e,n){throw new Mh("Put not supported on this map")},E.eb=function(e){return bi(rA(this,e,!0))},E.Y=function(){return this.bb().Y()},E.w=function(){return Aee(this)},E.fb=function(){return new tb(this)},te(Mt,"AbstractMap",638),W(654,638,fd),E.bb=function(){return k7(this)},E.W=function(){var e;return e=this.d,e||(this.d=new $2(this))},E.fb=function(){return zQ(this)},te(it,"Maps/ViewCachingAbstractMap",654),W(262,654,fd,K2),E.cb=function(e){return Kme(this,e)},E.eb=function(e){return Gwe(this,e)},E.Q=function(){this.a==this.b.b?Yj(this.b):Z1(new z7(this))},E.R=function(e){return see(this.a,e)},E.hb=function(){return new cq(this)},E.gb=function(){return this.hb()},E.t=function(e){return this===e||Hee(this.a,e)},E.v=function(){return Cj(new Tu(this.a))},E.W=function(){return Vx(this.b)},E.Y=function(){return v1(this.a)},E.w=function(){return Aee(this.a)},te(it,"AbstractMapBasedMultimap/AsMap",262),W(640,1,Yp),E.ib=function(e){return gme()},E.jb=function(e){return ba(this,e)},E.Q=function(){Q1(this)},E.kb=function(e){return Vb(this,e,!1)},E.lb=function(e){return wc(this,e)},E.V=function(){return this.Y()==0},E.nb=function(e){return Vb(this,e,!0)},E.ob=function(){return this.pb(Ae(ht,et,1,this.Y(),4,1))},E.pb=function(e){return Kk(this,e)},E.w=function(){return Cc(this)},te(Mt,"AbstractCollection",640),W(641,640,wi),E.t=function(e){return YX(this,e)},E.v=function(){return Cj(this)},te(Mt,"AbstractSet",641),W(649,641,wi),te(it,"Sets/ImprovedAbstractSet",649),W(655,649,wi),E.Q=function(){this.qb().Q()},E.kb=function(e){return ZX(this,e)},E.V=function(){return this.qb().V()},E.nb=function(e){var n;return this.kb(e)?(n=v(e,21),this.qb().W().nb(n.yb())):!1},E.Y=function(){return this.qb().Y()},te(it,"Maps/EntrySet",655),W(387,655,wi,cq),E.kb=function(e){return uee(new Tu(this.a.a),e)},E.mb=function(){return new z7(this.a)},E.qb=function(){return this.a},E.nb=function(e){var n;return uee(new Tu(this.a.a),e)?(n=v(e,21),Pme(this.a.b,n.yb()),!0):!1},te(it,"AbstractMapBasedMultimap/AsMap/AsMapEntries",387),W(299,1,pr,z7),E.H=function(){var e;return e=Lp(this.b),this.a=v(e.zb(),19),qme(this.c,e)},E.G=function(){return this.b.b},E.I=function(){nj(this.b),this.c.b.c-=this.a.Y(),this.a.Q()},te(it,"AbstractMapBasedMultimap/AsMap/AsMapIterator",299),W(260,649,wi,$2),E.Q=function(){this.b.Q()},E.kb=function(e){return this.b.R(e)},E.V=function(){return this.b.V()},E.mb=function(){return Fn(),Ox(this.b.bb().mb(),(P1(),U_))},E.nb=function(e){return this.b.R(e)?(this.b.eb(e),!0):!1},E.Y=function(){return this.b.Y()},te(it,"Maps/KeySet",260),W(386,260,wi,PK),E.Q=function(){var e;Z1((e=this.b.bb().mb(),new m6(this,e)))},E.lb=function(e){return this.b.W().lb(e)},E.t=function(e){return this===e||this.b.W().t(e)},E.v=function(){return this.b.W().v()},E.mb=function(){var e;return e=this.b.bb().mb(),new m6(this,e)},E.nb=function(e){var n,i;return i=0,n=v(this.b.eb(e),19),n&&(i=n.Y(),n.Q(),this.a.c-=i),i>0},te(it,"AbstractMapBasedMultimap/KeySet",386),W(300,1,pr,m6),E.G=function(){return this.c.G()},E.H=function(){return this.a=v(this.c.H(),21),this.a.yb()},E.I=function(){var e;jf(!!this.a),e=v(this.a.zb(),19),this.c.I(),this.b.a.c-=e.Y(),e.Q()},te(it,"AbstractMapBasedMultimap/KeySet/1",300),W(216,640,Yp,Bb),E.ib=function(e){return twe(this,e)},E.jb=function(e){return n2e(this,e)},E.Q=function(){ime(this)},E.kb=function(e){return qa(this),this.d.kb(e)},E.lb=function(e){return qa(this),this.d.lb(e)},E.t=function(e){return mye(this,e)},E.v=function(){return qa(this),this.d.v()},E.mb=function(){return qa(this),new h7(this)},E.nb=function(e){return vme(this,e)},E.Y=function(){return qa(this),this.d.Y()},E.w=function(){return qa(this),Na(this.d)},te(it,"AbstractMapBasedMultimap/WrappedCollection",216);var l3e=U1(Mt,"List");W(297,216,hd,E7),E.rb=function(e,n){var i;qa(this),i=this.d.V(),v(this.d,20).rb(e,n),++this.a.c,i&&B1(this)},E.sb=function(e){return qa(this),v(this.d,20).sb(e)},E.tb=function(){return qa(this),new lK(this)},E.ub=function(e){return qa(this),new eW(this,e)},E.vb=function(e){var n;return qa(this),n=v(this.d,20).vb(e),--this.a.c,$1(this),n},E.wb=function(e,n){return qa(this),v(this.d,20).wb(e,n)},E.xb=function(e,n){return qa(this),Z7(this.a,this.e,v(this.d,20).xb(e,n),this.b?this.b:this)},te(it,"AbstractMapBasedMultimap/WrappedList",297),W(385,297,__,zK),te(it,"AbstractMapBasedMultimap/RandomAccessWrappedList",385),W(189,1,pr,h7),E.G=function(){return Zh(this),this.b.G()},E.H=function(){return Zh(this),this.b.H()},E.I=function(){this.b.I(),--this.d.f.c,$1(this.d)},te(it,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",189),W(298,189,dd,lK,eW),E.J=function(e){var n;n=G0e(this.a)==0,(Zh(this),v(this.b,96)).J(e),++this.a.a.c,n&&B1(this.a)},E.K=function(){return(Zh(this),v(this.b,96)).K()},E.L=function(){return(Zh(this),v(this.b,96)).L()},E.M=function(){return(Zh(this),v(this.b,96)).M()},E.N=function(){return(Zh(this),v(this.b,96)).N()},E.O=function(e){(Zh(this),v(this.b,96)).O(e)},te(it,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",298),W(295,216,wi,J6),te(it,"AbstractMapBasedMultimap/WrappedSet",295),W(296,216,tI,X6),te(it,"AbstractMapBasedMultimap/WrappedSortedSet",296),W(668,1,fv),E.t=function(e){var n;return qe(e,21)?(n=v(e,21),Cf(this.yb(),n.yb())&&Cf(this.zb(),n.zb())):!1},E.v=function(){var e,n;return e=this.yb(),n=this.zb(),(e==null?0:ls(e))^(n==null?0:ls(n))},E.Ab=function(e){throw new er},E.w=function(){return this.yb()+"="+this.zb()},te(it,Yne,668),W(390,640,Yp,lq),E.Q=function(){Yj(this.a)},E.kb=function(e){return Zwe(this.a,e)},E.mb=function(){return new IJ(this.a)},E.Y=function(){return this.a.c},te(it,"AbstractMultimap/Values",390),W(656,640,nI),E.ib=function(e){return this.Bb(e,1),!0},E.Bb=function(e,n){throw new er},E.jb=function(e){return Pxe(this,e)},E.Q=function(){Z1(this.Eb())},E.kb=function(e){return this.Cb(e)>0},E.Cb=function(e){var n,i;for(i=$h(this).mb();i.G();)if(n=v(i.H(),83),Cf(n.Zb(),e))return n.Yb();return 0},E.gb=function(){return new fq(this)},E.bb=function(){return $h(this)},E.t=function(e){return pke(this,e)},E.v=function(){return $h(this).v()},E.V=function(){return $h(this).V()},E.mb=function(){return Th(),new d$(this,$h(this).mb())},E.nb=function(e){return this.Fb(e,1)>0},E.Fb=function(e,n){throw new er},E.Gb=function(e,n){var i,u;return Th(),yi(n,"count"),i=this.Cb(e),u=n-i,u>0?this.Bb(e,u):u<0&&this.Fb(e,-u),i},E.Hb=function(e,n,i){return Qwe(this,e,n,i)},E.Y=function(){return Awe(this)},E.w=function(){return Na($h(this))},te(it,"AbstractMultiset",656),W(657,649,wi),E.Q=function(){this.Ib().Q()},E.kb=function(e){var n,i;return qe(e,83)?(i=v(e,83),i.Yb()<=0?!1:(n=this.Ib().Cb(i.Zb()),n==i.Yb())):!1},E.nb=function(e){var n,i,u,l;return qe(e,83)&&(i=v(e,83),n=i.Zb(),u=i.Yb(),u!=0)?(l=this.Ib(),l.Hb(n,u,0)):!1},te(it,"Multisets/EntrySet",657),W(396,657,wi,fq),E.mb=function(){return this.a.Eb()},E.Ib=function(){return this.a},E.Y=function(){return this.a.Db()},te(it,"AbstractMultiset/EntrySet",396),W(384,294,lv),E.Z=function(){return new Z2(Pk(this.a))},E.$=function(){return za(),Kh(),Jp},E.U=function(e){return v(Za(this,e),18)},E.X=function(e){return v(o_(this,e),18)},E.P=function(){var e;return e=this.f,e||(this.f=new K2(this,this.b))},E.t=function(e){return Tj(this,e)},te(it,"AbstractSetMultimap",384),W(342,656,nI),te(it,"AbstractSortedMultiset",342),W(280,600,lv,Ax),E.a=0,te(it,"ArrayListMultimap",280),W(159,17,rI);var tm,ho,SI=Zt(it,"BoundType",159,yn,tye);W(623,159,rI,$$),Zt(it,"BoundType/1",623,SI,null),W(624,159,rI,aK),Zt(it,"BoundType/2",624,SI,null);var NI;W(234,1,Pc),E.w=function(){return pme(this.c.mb())},te(it,"FluentIterable",234),W(170,234,Pc,zh),E.mb=function(){return Ht(this)},te(it,"FluentIterable/2",170),W(664,1,{}),E.w=function(){return Na(Ya(this.a.d).b)},te(it,"ForwardingObject",664),W(665,664,Yp),E.ib=function(e){return Ya(this.a.d),uZ()},E.jb=function(e){return Ya(this.a.d),cZ()},E.Q=function(){Ya(this.a.d),lZ()},E.kb=function(e){return N6(Ya(this.a.d),e)},E.lb=function(e){return C$(Ya(this.a.d),e)},E.V=function(){return Ya(this.a.d).b.V()},E.mb=function(){var e;return e=Ya(this.a.d).b.mb(),new VM(e)},E.nb=function(e){return Ya(this.a.d),fZ()},E.Y=function(){return Ya(this.a.d).b.Y()},E.ob=function(){return iW(Ya(this.a.d))},E.pb=function(e){return R7(Ya(this.a.d),e)},te(it,"ForwardingCollection",665),W(660,640,aI),E.mb=function(){return this.Kb()},E.ib=function(e){return Vve()},E.jb=function(e){return qve()},E.Q=function(){Zve()},E.kb=function(e){return e!=null&&Vb(this,e,!1)},E.Jb=function(){switch(this.Y()){case 0:return kr(),kr(),mv;case 1:return kr(),new Iu(this.Kb().H());default:return new OQ(this,this.ob())}},E.nb=function(e){return $ve()},te(it,"ImmutableCollection",660),W(316,660,aI,s6),E.mb=function(){return Ip(this.a.mb())},E.kb=function(e){return e!=null&&this.a.kb(e)},E.lb=function(e){return this.a.lb(e)},E.V=function(){return this.a.V()},E.Kb=function(){return Ip(this.a.mb())},E.Y=function(){return this.a.Y()},E.ob=function(){return this.a.ob()},E.pb=function(e){return this.a.pb(e)},E.w=function(){return Na(this.a)},te(it,"ForwardingImmutableCollection",316),W(87,660,pd),E.mb=function(){return this.Kb()},E.tb=function(){return this.Lb(0)},E.ub=function(e){return this.Lb(e)},E.xb=function(e,n){return this.Mb(e,n)},E.rb=function(e,n){throw new er},E.t=function(e){return wke(this,e)},E.v=function(){return Pwe(this)},E.Kb=function(){return this.Lb(0)},E.Lb=function(e){return V6(this,e)},E.vb=function(e){throw new er},E.wb=function(e,n){throw new er},E.Mb=function(e,n){var i;return vy((i=new v$(this),new uk(i,e,n)))};var mv;te(it,"ImmutableList",87),W(667,87,pd),E.mb=function(){return Ip(this.Nb().mb())},E.xb=function(e,n){return vy(this.Nb().xb(e,n))},E.kb=function(e){return WK(this,e)},E.lb=function(e){return this.Nb().lb(e)},E.t=function(e){return this.Nb().t(e)},E.sb=function(e){return F$(this,e)},E.v=function(){return this.Nb().v()},E.V=function(){return this.Nb().V()},E.Kb=function(){return Ip(this.Nb().mb())},E.Y=function(){return this.Nb().Y()},E.Mb=function(e,n){return vy(this.Nb().xb(e,n))},E.ob=function(){return this.Nb().pb(Ae(ht,et,1,this.Nb().Y(),4,1))},E.pb=function(e){return this.Nb().pb(e)},E.w=function(){return Na(this.Nb())},te(it,"ForwardingImmutableList",667),W(524,1,gd),E.bb=function(){return pl(this)},E.W=function(){return AQ(this)},E.fb=function(){return this.Rb()},E.Q=function(){throw new er},E.R=function(e){return this.cb(e)!=null},E.ab=function(e){return this.Rb().kb(e)},E.Pb=function(){return new bZ(this)},E.Qb=function(){return new vZ(this)},E.t=function(e){return Kwe(this,e)},E.v=function(){return pl(this).v()},E.V=function(){return this.Y()==0},E.db=function(e,n){return Qve()},E.eb=function(e){throw new er},E.w=function(){var e;return Fn(),e=Np(Wme(this.Y()),123),r2e(Ire,e,pl(this).mb()),e.a+="}",e.a},E.Rb=function(){return this.g?this.g:this.g=this.Qb()},E.e=null,E.f=null,E.g=null,te(it,"ImmutableMap",524),W(320,524,gd),E.R=function(e){return see(this.d,e)},E.ab=function(e){return E$(this.d,e)},E.Ob=function(){return Lj(new hq(this))},E.Pb=function(){return Lj($Q(this.d))},E.Qb=function(){return za(),new s6(QQ(this.d))},E.t=function(e){return r$(this.d,e)},E.cb=function(e){return e==null?null:Zb(this.d,e)},E.v=function(){return this.d.c.v()},E.V=function(){return this.d.c.V()},E.Y=function(){return this.d.c.Y()},E.w=function(){return Na(this.d.c)},te(it,"ForwardingImmutableMap",320),W(666,665,wi),E.t=function(e){return e===this||n$(Ya(this.a.d),e)},E.v=function(){return Ya(this.a.d).b.v()},te(it,"ForwardingSet",666),W(523,666,wi,hq),E.kb=function(e){if(qe(e,21)&&v(e,21).yb()==null)return!1;try{return N6(Ya(this.a.d),e)}catch(n){if(n=ni(n),qe(n,119))return!1;throw ri(n)}},E.pb=function(e){var n;return n=R7(Ya(this.a.d),e),Ya(this.a.d).b.Y()<n.length&&oo(n,Ya(this.a.d).b.Y(),null),n},te(it,"ForwardingImmutableMap/1",523),W(663,660,bd),E.mb=function(){return this.Kb()},E.t=function(e){return Zee(this,e)},E.v=function(){return vwe(this)},te(it,"ImmutableSet",663),W(315,663,bd),E.mb=function(){return Ip(new cp(this.a.b.mb()))},E.kb=function(e){return e!=null&&L0e(this.a,e)},E.lb=function(e){return O0e(this.a,e)},E.v=function(){return this.a.b.v()},E.V=function(){return this.a.b.V()},E.Kb=function(){return Ip(new cp(this.a.b.mb()))},E.Y=function(){return this.a.b.Y()},E.ob=function(){return this.a.b.ob()},E.pb=function(e){return D0e(this.a,e)},E.w=function(){return Na(this.a.b)},te(it,"ForwardingImmutableSet",315),W(178,1,{178:1,3:1},Oy),E.t=function(e){var n;return qe(e,178)?(n=v(e,178),this.a.t(n.a)&&this.b==n.b&&this.c==n.c&&this.d==n.d&&this.f==n.f&&Cf(this.e,n.e)&&Cf(this.g,n.g)):!1},E.v=function(){return jk(be(ve(ht,1),et,1,4,[this.a,this.e,this.d,this.g,this.f]))},E.w=function(){return Np(fc(Np(fc(Np(Co(fc(new bp,this.a),":"),this.d==(Ro(),tm)?91:40),this.b?this.e:"-∞"),44),this.c?this.g:"∞"),this.f==tm?93:41).a},E.b=!1,E.c=!1,te(it,"GeneralRange",178),W(215,384,lv,gb),E.a=2,te(it,"HashMultimap",215),W(661,87,pd),E.kb=function(e){return this.Sb().kb(e)},E.V=function(){return this.Sb().V()},E.Y=function(){return this.Sb().Y()},te(it,"ImmutableAsList",661),W(275,320,gd),E.Rb=function(){return this.Ub()},E.fb=function(){return this.Ub()},E.Ub=function(){return AQ(this.Tb())},te(it,"ImmutableBiMap",275),W(341,668,{3:1,21:1},w6),E.yb=function(){return this.a},E.zb=function(){return this.b},E.Ab=function(e){throw new er},te(it,"ImmutableEntry",341),W(436,315,bd,EZ),te(it,"ImmutableEnumSet",436),W(379,378,k_,HQ),te(it,"ImmutableList/1",379),W(266,108,Fp,N2),E.G=function(){return this.a.G()},E.H=function(){return v(this.a.H(),21).yb()},te(it,"ImmutableMap/1",266),W(670,663,bd),E.mb=function(){var e;return e=pl(this.a).Kb(),new N2(e)},E.Jb=function(){return new o6(this)},E.Kb=function(){var e;return(e=this.c,e||(this.c=new o6(this))).Kb()},te(it,"ImmutableSet/Indexed",670),W(606,670,bd,bZ),E.mb=function(){var e;return e=pl(this.a).Kb(),new N2(e)},E.kb=function(e){return this.a.R(e)},E.Kb=function(){var e;return e=pl(this.a).Kb(),new N2(e)},E.Y=function(){return this.a.Y()},te(it,"ImmutableMapKeySet",606),W(604,660,aI,vZ),E.mb=function(){return new Gx(this)},E.kb=function(e){return e!=null&&(Qn(),Qn(),pX(new Gx(this),(y1(),e==null?(L7(),PI):new uq(e)))!=-1)},E.Jb=function(){var e;return e=jQ(pl(this.a)),new bK(this,e)},E.Kb=function(){return new Gx(this)},E.Y=function(){return this.a.Y()},te(it,"ImmutableMapValues",604),W(282,108,Fp,Gx),E.G=function(){return this.a.G()},E.H=function(){return v(this.a.H(),21).zb()},te(it,"ImmutableMapValues/1",282),W(605,661,pd,bK),E.Sb=function(){return this.a},E.sb=function(e){return v(this.b.sb(e),21).zb()},te(it,"ImmutableMapValues/2",605),W(311,661,pd,o6),E.Sb=function(){return this.a},E.sb=function(e){return q1e(this.a,e)},te(it,"ImmutableSet/Indexed/1",311),W(414,234,Pc,nK),E.mb=function(){return W6(this.a)},E.w=function(){return Cc(this.a)+" (cycled)"},te(it,"Iterables/1",414),W(105,1,Mi,w),E.B=function(e){return v(e,22).mb()},te(it,"Iterables/12",105),W(415,234,Pc,vQ),E.mb=function(){return Cp(this)},te(it,"Iterables/4",415),W(416,234,Pc,yQ),E.mb=function(){return rs(this)},te(it,"Iterables/5",416);var Are,TI;W(424,651,k_,k),E.G=function(){return!1},E.K=function(){return!1},E.H=function(){throw new _a},E.L=function(){return 0},E.M=function(){throw new _a},E.N=function(){return-1},te(it,"Iterators/1",424),W(264,108,Fp,T2),E.G=function(){return!this.a},E.H=function(){if(this.a)throw new _a;return this.a=!0,this.b},E.a=!1,te(it,"Iterators/11",264),W(425,1,pr,P),E.G=function(){return!1},E.H=function(){throw new _a},E.I=function(){jf(!1)},te(it,"Iterators/2",425),W(426,108,Fp,dq),E.G=function(){return this.a.G()},E.H=function(){return this.a.H()},te(it,"Iterators/3",426),W(427,1,pr,JK),E.G=function(){return this.a.G()||this.b.mb().G()},E.H=function(){return lj(this)},E.I=function(){this.a.I()},te(it,"Iterators/4",427),W(429,428,Fp,u$),te(it,"Iterators/6",429),W(261,1,pr),E.G=function(){return this.b.G()},E.H=function(){return N$(this)},E.I=function(){this.b.I()},te(it,"TransformedIterator",261),W(430,261,pr,EK),E.Vb=function(e){return YZ(this,e)},te(it,"Iterators/7",430),W(313,1,pr),E.G=function(){return Bt(this)},E.H=function(){return It(this)},E.I=function(){jf(!!this.c),this.c.I(),this.c=null},te(it,"MultitransformedIterator",313),W(90,313,{90:1,35:1},ns),E.Wb=function(e){return v(e,35)},te(it,"Iterators/ConcatenatedIterator",90),W(314,313,pr,c6),E.Wb=function(e){return bwe(v(e,35))},te(it,"Iterators/ConcatenatedIterator/1",314),W(329,653,lv,M6),E.U=function(e){return new Q2(this,e)},E.X=function(e){return $7(this,e)},E.Q=function(){N7(this)},E.R=function(e){return k6(this,e)},E.S=function(){return new T6(this)},E.T=function(){return new pq(this)},E.V=function(){return!this.a},E.Y=function(){return this.d},E.c=0,E.d=0,te(it,"LinkedListMultimap",329),W(647,640,hd),E.rb=function(e,n){throw new Mh("Add not supported on this list")},E.ib=function(e){return this.rb(this.Y(),e),!0},E.Q=function(){this.Xb(0,this.Y())},E.t=function(e){return cte(this,e)},E.v=function(){return dX(this)},E.mb=function(){return new Nh(this)},E.tb=function(){return this.ub(0)},E.ub=function(e){return new Cn(this,e)},E.vb=function(e){throw new Mh("Remove not supported on this list")},E.Xb=function(e,n){var i,u;for(u=this.ub(e),i=e;i<n;++i)u.H(),u.I()},E.wb=function(e,n){throw new Mh("Set not supported on this list")},E.xb=function(e,n){return new uk(this,e,n)},E.d=0,te(Mt,"AbstractList",647),W(648,647,hd),E.rb=function(e,n){j1(this,e,n)},E.sb=function(e){return Bp(this,e)},E.mb=function(){return this.ub(0)},E.vb=function(e){return $j(this,e)},E.wb=function(e,n){var i,u;i=this.ub(e);try{return u=i.H(),i.O(n),u}catch(l){throw l=ni(l),qe(l,74)?new ts("Can't set element "+e):ri(l)}},te(Mt,"AbstractSequentialList",648),W(276,648,hd,Q2),E.ub=function(e){return q6(this,e)},E.Y=function(){var e;return e=v(ln(this.a.b,this.b),126),e?e.a:0},te(it,"LinkedListMultimap/1",276),W(330,648,hd,BM),E.ub=function(e){return new Pee(this.a,e)},E.Y=function(){return this.a.d},te(it,"LinkedListMultimap/1EntriesImpl",330),W(563,649,wi,pq),E.kb=function(e){return k6(this.a,e)},E.mb=function(){return new LJ(this.a)},E.nb=function(e){return!$7(this.a,e).a.V()},E.Y=function(){return v1(this.a.b)},te(it,"LinkedListMultimap/1KeySetImpl",563),W(562,1,pr,LJ),E.G=function(){return r7(this),!!this.c},E.H=function(){r7(this),E1(this.c),this.a=this.c,Tn(this.d,this.a.a);do this.c=this.c.b;while(this.c&&!Tn(this.d,this.c.a));return this.a.a},E.I=function(){r7(this),jf(!!this.a),Z1(new bk(this.e,this.a.a)),this.a=null,this.b=this.e.c},E.b=0,te(it,"LinkedListMultimap/DistinctKeyIterator",562),W(126,1,{126:1},B7),E.a=0,te(it,"LinkedListMultimap/KeyList",126),W(560,668,fv,c$),E.yb=function(){return this.a},E.zb=function(){return this.f},E.Ab=function(e){var n;return n=this.f,this.f=e,n},te(it,"LinkedListMultimap/Node",560),W(561,1,dd,Pee),E.J=function(e){v(e,21),Wve()},E.H=function(){return CW(this)},E.M=function(){return PW(this)},E.O=function(e){v(e,21),Jve()},E.G=function(){return L1(this),!!this.c},E.K=function(){return L1(this),!!this.e},E.L=function(){return this.d},E.N=function(){return this.d-1},E.I=function(){L1(this),jf(!!this.a),this.a!=this.c?(this.e=this.a.d,--this.d):this.c=this.a.b,tte(this.f,this.a),this.a=null,this.b=this.f.c},E.b=0,E.d=0,te(it,"LinkedListMultimap/NodeIterator",561),W(241,1,dd,bk,Qee),E.J=function(e){this.e=p_(this.f,this.b,e,this.c),++this.d,this.a=null},E.G=function(){return!!this.c},E.K=function(){return!!this.e},E.H=function(){return sk(this)},E.L=function(){return this.d},E.M=function(){return vW(this)},E.N=function(){return this.d-1},E.I=function(){jf(!!this.a),this.a!=this.c?(this.e=this.a.e,--this.d):this.c=this.a.c,tte(this.f,this.a),this.a=null},E.O=function(e){_1(!!this.a),this.a.f=e},E.d=0,te(it,"LinkedListMultimap/ValueForKeyIterator",241),W(419,647,hd),E.rb=function(e,n){this.a.rb(e,n)},E.kb=function(e){return this.a.kb(e)},E.sb=function(e){return this.a.sb(e)},E.vb=function(e){return this.a.vb(e)},E.wb=function(e,n){return this.a.wb(e,n)},E.Y=function(){return this.a.Y()},te(it,"Lists/AbstractListWrapper",419),W(420,419,__),te(it,"Lists/RandomAccessListWrapper",420),W(422,420,__,v$),E.ub=function(e){return this.a.ub(e)},te(it,"Lists/1",422),W(88,647,{88:1,22:1,19:1,20:1},vp),E.rb=function(e,n){this.a.rb(qh(this,e),n)},E.Q=function(){this.a.Q()},E.sb=function(e){return this.a.sb(S7(this,e))},E.mb=function(){return xW(this,0)},E.ub=function(e){return xW(this,e)},E.vb=function(e){return this.a.vb(S7(this,e))},E.Xb=function(e,n){(fW(e,n,this.a.Y()),Ek(this.a.xb(qh(this,n),qh(this,e)))).Q()},E.wb=function(e,n){return this.a.wb(S7(this,e),n)},E.Y=function(){return this.a.Y()},E.xb=function(e,n){return fW(e,n,this.a.Y()),Ek(this.a.xb(qh(this,n),qh(this,e)))},te(it,"Lists/ReverseList",88),W(220,88,{88:1,22:1,19:1,20:1,63:1},ub),te(it,"Lists/RandomAccessReverseList",220),W(421,1,dd,h$),E.J=function(e){this.c.J(e),this.c.M(),this.a=!1},E.G=function(){return this.c.K()},E.K=function(){return this.c.G()},E.H=function(){if(!this.c.K())throw new _a;return this.a=!0,this.c.M()},E.L=function(){return qh(this.b,this.c.L())},E.M=function(){if(!this.c.G())throw new _a;return this.a=!0,this.c.H()},E.N=function(){return qh(this.b,this.c.L())-1},E.I=function(){jf(this.a),this.c.I(),this.a=!1},E.O=function(e){_1(this.a),this.c.O(e)},E.a=!1,te(it,"Lists/ReverseList/1",421);var Ire;W(376,261,pr,CK),E.Vb=function(e){return Fn(),new w6(e,Y$(this.a,e))},te(it,"Maps/1",376),W(188,17,sI);var U_,MI,jI=Zt(it,"Maps/EntryFunction",188,yn,eye);W(374,188,sI,S$),E.B=function(e){return v(e,21).yb()},Zt(it,"Maps/EntryFunction/1",374,jI,null),W(375,188,sI,eK),E.B=function(e){return v(e,21).zb()},Zt(it,"Maps/EntryFunction/2",375,jI,null),W(373,640,Yp,y$),E.Q=function(){this.a.Q()},E.kb=function(e){return this.a.ab(e)},E.V=function(){return this.a.V()},E.mb=function(){return FQ(this)},E.nb=function(e){var n,i;try{return Vb(this,e,!0)}catch(u){if(u=ni(u),qe(u,45)){for(i=this.a.bb().mb();i.G();)if(n=v(i.H(),21),Cf(e,n.zb()))return this.a.eb(n.yb()),!0;return!1}else throw ri(u)}},E.Y=function(){return this.a.Y()},te(it,"Maps/Values",373),W(301,654,fd,T6),E.cb=function(e){return this.a.R(e)?this.a.U(e):null},E.eb=function(e){return this.a.R(e)?this.a.X(e):null},E.Q=function(){this.a.Q()},E.R=function(e){return this.a.R(e)},E.hb=function(){return new gq(this)},E.gb=function(){return this.hb()},E.V=function(){return this.a.V()},E.W=function(){return this.a.W()},E.Y=function(){return this.a.W().Y()},te(it,"Multimaps/AsMap",301),W(393,655,wi,gq),E.mb=function(){return E1e(this.a.a.W(),new bq(this))},E.qb=function(){return this.a},E.nb=function(e){var n;return ZX(this,e)?(n=v(e,21),r0e(this.a,n.yb()),!0):!1},te(it,"Multimaps/AsMap/EntrySet",393),W(395,1,Mi,bq),E.B=function(e){return Y$(this,e)},te(it,"Multimaps/AsMap/EntrySet/1",395),W(391,656,nI,vq),E.Q=function(){N7(this.a)},E.kb=function(e){return k6(this.a,e)},E.Cb=function(e){var n;return n=v(Zb(_f(this.a),e),19),n?n.Y():0},E.gb=function(){return new mq(this)},E.Db=function(){return _f(this.a).Y()},E.Eb=function(){return new l6(k7(_f(this.a)).mb())},E.mb=function(){return BQ(this)},E.Fb=function(e,n){var i,u,l,g,y;if(yi(n,uI),n==0)return y=v(Zb(_f(this.a),e),19),y?y.Y():0;if(g=v(Zb(_f(this.a),e),19),!g)return 0;if(l=g.Y(),n>=l)g.Q();else for(u=g.mb(),i=0;i<n;i++)u.H(),u.I();return l},te(it,"Multimaps/Keys",391),W(302,261,pr,l6),E.Vb=function(e){return new yq(v(e,21))},te(it,"Multimaps/Keys/1",302),W(658,1,{83:1}),E.t=function(e){var n;return qe(e,83)?(n=v(e,83),this.Yb()==n.Yb()&&Cf(this.Zb(),n.Zb())):!1},E.v=function(){var e;return e=this.Zb(),(e==null?0:ls(e))^this.Yb()},E.w=function(){return DW(this)},te(it,"Multisets/AbstractEntry",658),W(394,658,{83:1},yq),E.Yb=function(){return v(this.a.zb(),19).Y()},E.Zb=function(){return this.a.yb()},te(it,"Multimaps/Keys/1/1",394),W(392,657,wi,mq),E.kb=function(e){var n,i;return qe(e,83)?(i=v(e,83),n=v(_f(this.a.a).cb(i.Zb()),19),!!n&&n.Y()==i.Yb()):!1},E.V=function(){return!this.a.a.a},E.mb=function(){return new l6(k7(_f(this.a.a)).mb())},E.Ib=function(){return this.a},E.nb=function(e){var n,i;return qe(e,83)&&(i=v(e,83),n=v(_f(this.a.a).cb(i.Zb()),19),n&&n.Y()==i.Yb())?(n.Q(),!0):!1},E.Y=function(){return _f(this.a.a).Y()},te(it,"Multimaps/Keys/KeysEntrySet",392),W(659,1,Gr),te(it,"Ordering",659),W(398,659,Gr,p),E.$b=function(e,n){return s1e(v(e,83),v(n,83))},te(it,"Multisets/1",398),W(397,658,{83:1,3:1},mQ),E.Yb=function(){return this.a},E.Zb=function(){return this.b},E.a=0,te(it,"Multisets/ImmutableEntry",397),W(303,1,pr,d$),E.G=function(){return this.d>0||this.c.G()},E.H=function(){if(!(this.d>0||this.c.G()))throw new _a;return this.d==0&&(this.b=v(this.c.H(),83),this.f=this.d=this.b.Yb()),--this.d,this.a=!0,this.b.Zb()},E.I=function(){jf(this.a),this.f==1?this.c.I():this.e.Fb(this.b.Zb(),1)>0,--this.f,this.a=!1},E.a=!1,E.d=0,E.f=0,te(it,"Multisets/MultisetIteratorImpl",303),W(622,659,{3:1,56:1},b),E.$b=function(e,n){return v1e(v(e,23),v(n,23))},E.w=function(){return"Ordering.natural()"};var Lre;te(it,"NaturalOrdering",622),W(343,661,pd,OQ),E.ub=function(e){return V6(this.b,e)},E.Sb=function(){return this.a},E.sb=function(e){return F$(this.b,e)},E.Lb=function(e){return V6(this.b,e)},te(it,"RegularImmutableAsList",343),W(559,275,gd,VQ),E.Tb=function(){return this.a};var Ore;te(it,"RegularImmutableBiMap",559),W(53,667,pd,cr),E.Nb=function(){return this.a},te(it,"RegularImmutableList",53),W(321,320,gd,f6),te(it,"RegularImmutableMap",321),W(265,315,bd,ux);var Jp;te(it,"RegularImmutableSet",265),W(650,641,wi),te(it,"Sets/SetView",650),W(377,650,wi,tQ),E.kb=function(e){return al(this.b,e)&&al(this.c,e)},E.lb=function(e){return wc(this.b,e)&&wc(this.c,e)},E.V=function(){return xk(this)},E.mb=function(){var e;return kf((e=new un(this.b.a).a.bb().mb(),new hn(e)),this.a)},E.Y=function(){var e;return dk(kf((e=new un(this.b.a).a.bb().mb(),new hn(e)),this.a))},te(it,"Sets/2",377),W(328,275,gd,_W,fJ),E.fb=function(){return za(),new cc(this.c)},E.Tb=function(){var e;return e=this.a,e||(this.a=new fJ(this.c,this.b,this))},E.Ub=function(){return za(),new cc(this.c)},te(it,"SingletonImmutableBiMap",328),W(127,667,pd,Iu),E.Nb=function(){return this.a},te(it,"SingletonImmutableList",127),W(135,663,bd,cc),E.mb=function(){return Qn(),new T2(this.a)},E.kb=function(e){return Fo(this.a,e)},E.Kb=function(){return Qn(),new T2(this.a)},E.Y=function(){return 1},te(it,"SingletonImmutableSet",135),W(285,342,{207:1,3:1,22:1,19:1},Y7,oee),E.Bb=function(e,n){return Dy(this,e,n)},E.Cb=function(e){return jy(this,e)},E.Db=function(){return Xh(Nj(this,(S1(),AI)))},E.Eb=function(){return new SK(this)},E.Fb=function(e,n){return mA(this,e,n)},E.Gb=function(e,n){return Tee(this,e,n)},E.Hb=function(e,n,i){var u,l,g;return yi(i,"newCount"),yi(n,"oldCount"),Hh(Pb(this.b,e)),g=this.c.a,g?(l=Ae(ar,rr,26,1,12,1),u=BA(g,this.d,e,n,i,l),V1(this.c,g,u),l[0]==n):n==0?(i>0&&Dy(this,e,i),!0):!1},E.Y=function(){return Xh(Nj(this,(S1(),F_)))},te(it,"TreeMultiset",285),W(619,658,{83:1},p$),E.Yb=function(){var e;return e=this.b.c,e==0?jy(this.a,this.b.b):e},E.Zb=function(){return this.b.b},te(it,"TreeMultiset/1",619),W(620,1,pr,SK),E.H=function(){return $we(this)},E.G=function(){return oX(this)},E.I=function(){jf(!!this.b),Tee(this.c,this.b.b.b,0),this.b=null},te(it,"TreeMultiset/2",620),W(205,17,cI);var AI,F_,II=Zt(it,"TreeMultiset/Aggregate",205,yn,nye);W(617,205,cI,K$),E._b=function(e){return e.c},E.ac=function(e){return e?e.j:0},Zt(it,"TreeMultiset/Aggregate/1",617,II,null),W(618,205,cI,xK),E._b=function(e){return 1},E.ac=function(e){return e?e.a:0},Zt(it,"TreeMultiset/Aggregate/2",618,II,null),W(206,658,{83:1,206:1},gy),E.Yb=function(){return this.c},E.Zb=function(){return this.b},E.w=function(){return Th(),DW(new mQ(this.b,this.c))},E.a=0,E.c=0,E.d=0,E.j=0,te(it,"TreeMultiset/AvlNode",206),W(616,1,{},m),te(it,"TreeMultiset/Reference",616);var f3e=te(JA,"JavaScriptObject$",0),LI;W(628,1,{}),te(JA,"Scheduler",628);var nm=0,Dre=0,rm=-1;W(360,628,{},d);var OI;te(Yy,"SchedulerImpl",360),W(646,1,{}),E.hc=function(){return null},E.ic=function(){return null},E.jc=function(){return null},E.kc=function(){return null},E.lc=function(){return null},te(Df,"JSONValue",646),W(214,646,{214:1},ZM,wq),E.t=function(e){return qe(e,214)?this.a==v(e,214).a:!1},E.gc=function(){return Dve},E.v=function(){return hc(this.a)},E.hc=function(){return this},E.w=function(){var e,n,i;for(i=new gp("["),n=0,e=this.a.length;n<e;n++)n>0&&(i.a+=","),fc(i,vc(this,n));return i.a+="]",i.a},te(Df,"JSONArray",214),W(292,646,{},RM),E.gc=function(){return Bve},E.ic=function(){return this},E.w=function(){return mK(this.a)},E.a=!1;var Bre,Rre;te(Df,"JSONBoolean",292),W(371,72,lu,CZ),te(Df,"JSONException",371),W(435,646,{},S),E.gc=function(){return Uve},E.w=function(){return fu};var Gre;te(Df,"JSONNull",435),W(104,646,{104:1},M2),E.t=function(e){return qe(e,104)?this.a==v(e,104).a:!1},E.gc=function(){return Rve},E.v=function(){return ur(Oe(this.a))},E.jc=function(){return this},E.w=function(){return this.a+""},E.a=0,te(Df,"JSONNumber",104),W(69,646,{69:1},df,j2),E.t=function(e){return qe(e,69)?this.a==v(e,69).a:!1},E.gc=function(){return Gve},E.v=function(){return hc(this.a)},E.kc=function(){return this},E.w=function(){var e,n,i,u,l,g;for(g=new gp("{"),e=!0,l=YJ(this,Ae(H_,Rr,2,0,5,1)),i=0,u=l.length;i<u;++i)n=l[i],e?e=!1:g.a+=", ",Co(g,lte(n)),g.a+=":",fc(g,zn(this,n));return g.a+="}",g.a},te(Df,"JSONObject",69),W(361,641,wi,b$),E.kb=function(e){return Go(e)&&v0e(this.a,Vh(e))},E.mb=function(){return new Nh(new Eo(this.b))},E.Y=function(){return this.b.length},te(Df,"JSONObject/1",361);var Y_;W(97,646,{97:1},dl),E.t=function(e){return qe(e,97)?es(this.a,v(e,97).a):!1},E.gc=function(){return Hve},E.v=function(){return Zk(this.a)},E.lc=function(){return this},E.w=function(){return lte(this.a)},te(Df,"JSONString",97);var Hre,zre,DI;W(186,1,{},O1,t7),E.b=!1,E.c=0,E.d=-1,E.e=0,E.f=!1,E.j=0,te("de.cau.cs.kieler.core.alg","BasicProgressMonitor",186),W(10,1,{10:1,286:1,3:1,5:1},Wr,gl,wt,tr),E.t=function(e){return FJ(this,e)},E.v=function(){return ur(Oe(this.a))+sxe(ur(Oe(this.b)))},E.w=function(){return"("+this.a+","+this.b+")"},E.a=0,E.b=0;var Xt=te($ne,"KVector",10);W(58,648,{3:1,5:1,22:1,19:1,58:1,20:1},ti),E.ib=function(e){return vn(this,e)},E.Q=function(){ou(this)},E.ub=function(e){return gn(this,e)},E.Y=function(){return this.b},E.b=0,te(Mt,"LinkedList",58),W(44,58,{44:1,286:1,3:1,5:1,22:1,19:1,58:1,20:1},Hi,jx),E.w=function(){var e,n,i;for(e=new gp("("),n=gn(this,0);n.b!=n.d.c;)i=v(on(n),10),Co(e,i.a+","+i.b),n.b!=n.d.c&&(e.a+="; ");return e.a+=")",e.a},te($ne,"KVectorChain",44);var zf=U1(Zy,"IProperty");W(131,1,{179:1,131:1,3:1},M),te(Zy,"MapPropertyHolder",131),W(14,1,Kne,Y1,F1,sr,gt,Pf,ry),E.F=function(e){return J0e(this,v(e,79))},E.t=function(e){return A7(this,e)},E.mc=function(){return this.b},E.nc=function(){return this.c},E.oc=function(){return this.d},E.v=function(){return Zk(this.b)},E.w=function(){return this.b};var Ure,Fre;te(Zy,"Property",14),W(366,1,{23:1},L),E.F=function(e){return-1},te(Zy,"Property/1",366),W(367,1,{23:1},T),E.F=function(e){return 1},te(Zy,"Property/2",367),W(27,1,{27:1,22:1},Er),E.t=function(e){var n,i,u;return qe(e,27)?(i=v(e,27),n=this.a==null?i.a==null:Fo(this.a,i.a),u=this.b==null?i.b==null:Fo(this.b,i.b),n&&u):!1},E.v=function(){var e,n,i,u,l,g;return i=this.a==null?0:ls(this.a),e=i&$s,n=i&-65536,g=this.b==null?0:ls(this.b),u=g&$s,l=g&-65536,e^l>>16&$s|n^u<<16},E.mb=function(){return new xq(this)},E.w=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+Na(this.b)+")":this.b==null?"pair("+Na(this.a)+",null)":"pair("+Na(this.a)+","+Na(this.b)+")"},te(Qne,"Pair",27),W(431,1,pr,xq),E.G=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},E.H=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw new _a},E.I=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),new ob},E.b=!1,E.c=!1,te(Qne,"Pair/1",431),W(228,72,lu,o1),te(Wne,"UnsupportedConfigurationException",228),W(99,72,lu,Bo),te(Wne,"UnsupportedGraphException",99);var BI;W(103,17,{103:1,3:1,23:1,17:1},yp);var V_,im,am,om,sm,um,Yre=Zt(du,"Alignment",103,yn,lme),Vre;W(59,17,{59:1,3:1,23:1,17:1},hb);var Qs,Ka,aa,qo,bu,wv=Zt(du,"Direction",59,yn,Yye),qre;W(107,17,{107:1,3:1,23:1,17:1},h1);var xv,Gl,vd,q_,Zre=Zt(du,"EdgeLabelPlacement",107,yn,Bye),$re;W(122,17,{122:1,3:1,23:1,17:1},d1);var Uf,RI,Z_,$_,Kre=Zt(du,"EdgeRouting",122,yn,Rye),Qre;W(133,17,{133:1,3:1,23:1,17:1},mp);var GI,HI,zI,UI,K_,FI,Wre=Zt(du,"EdgeType",133,yn,fme),Jre;W(166,17,{166:1,3:1,23:1,17:1},ex);var YI,Q_,VI,Xre=Zt(du,"HierarchyHandling",166,yn,dye),eie,kv,qI,Mo,tie,nie,W_,ZI,Xp,_v,Zo,Ta,Ff,$I,rie,iie,aie,KI,Ev,oie,ir,yd,QI,sie,Cv,eg,tg,ya,Pv,Hl,WI,J_,X_,eE,tE,nE,zu,Ct,Uu,Sv,Nv,JI,md,XI,rE,eL,jc,Tv,tL,gs;W(41,17,{41:1,3:1,23:1,17:1},ol);var po,oa,sa,ua,Ai,ca,Ma,ja,Aa,Rn=Zt(du,"NodeLabelPlacement",41,yn,Hme),uie;W(100,17,{100:1,3:1,23:1,17:1},db);var nL,rL,iL,Ws,Yf,aL=Zt(du,"PortAlignment",100,yn,ume),cie;W(28,17,{28:1,3:1,23:1,17:1},wp);var wd,fi,bs,Mv,vs,Ac,lie=Zt(du,"PortConstraints",28,yn,cme),fie;W(149,17,{149:1,3:1,23:1,17:1},tx);var iE,aE,jv,hie=Zt(du,"PortLabelPlacement",149,yn,pye),die;W(32,17,{32:1,3:1,23:1,17:1},pb);var at,bt,xd,zl,Ia,Fu,cm,kd,Ul,Qa,Jr,Wa,ys,Ja,Vf,_d,Fl,Ed,kt,mr,ct,Hr=Zt(du,"PortSide",32,yn,Fye),pie;W(150,17,{150:1,3:1,23:1,17:1},p1);var Av,oE,sE,Iv,ng=Zt(du,"SizeConstraint",150,yn,Hye),gie;W(139,17,{139:1,3:1,23:1,17:1},g1);var uE,cE,Lv,lE,fE=Zt(du,"SizeOptions",139,yn,Gye),bie;W(62,1,{62:1},lx,so),E.t=function(e){var n;return e==null||!qe(e,62)?!1:(n=v(e,62),Pa(this.d,n.d)&&Pa(this.e,n.e)&&Pa(this.c,n.c)&&Pa(this.b,n.b))},E.v=function(){return jk(be(ve(ht,1),et,1,4,[this.d,this.e,this.c,this.b]))},E.w=function(){return"Rect[x="+this.d+",y="+this.e+",w="+this.c+",h="+this.b+"]"},E.b=0,E.c=0,E.d=0,E.e=0,te($p,"Rectangle",62),W(283,62,{283:1,62:1},rZ),E.a=0,te(fI,"LabelGroup",283),W(67,17,{67:1,3:1,23:1,17:1},Fi);var vie,yie,mie,wie,xie,kie,_ie,Eie,Cie,Pie,Sie,Nie,Tie,Mie,jie,Aie,Iie,Lie,Oie,Die,Bie,hE,Rie=Zt(fI,"LabelLocation",67,yn,Hj);W(225,17,{225:1,3:1,23:1,17:1},nx);var Cd,Ic,Lc,h3e=Zt(fI,"TextAlignment",225,yn,gye),qf;W(589,1,{},fne),E.a=0,E.b=!1,E.d=0,E.f=0,E.k=0,E.r=0,E.s=0,te($p,"LabelAndNodeSizeProcessor/NodeData",589),W(171,17,{171:1,3:1,23:1,17:1},rx);var ms,vu,Gie,Ov,d3e=Zt($p,"LabelSide",171,yn,hye);W(590,1,{},kq),E.b=!0,E.c=!0,E.d=!0,E.e=!0,te($p,tre,590),W(121,1,nre),E.t=function(e){var n;return qe(e,121)?(n=v(e,121),this.d==n.d&&this.a==n.a&&this.b==n.b&&this.c==n.c):!1},E.v=function(){var e,n;return e=ur(Oe(this.b))<<16,e|=ur(Oe(this.a))&$s,n=ur(Oe(this.c))<<16,n|=ur(Oe(this.d))&$s,e^n},E.w=function(){return"[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},E.a=0,E.b=0,E.c=0,E.d=0,te($p,"Spacing",121),W(232,121,nre,WM,UK,qK),te($p,"Spacing/Insets",232),W(65,121,{286:1,121:1,65:1,3:1,5:1},a1,ss,i7),te($p,"Spacing/Margins",65),W(364,1,{},pee),E.c=!1,E.d=null,E.g=null;var oL,sL,dE;te(j_,"JsonGraphImporter",364);var uL,cL,lL,fL,hL,Hie,lm,dL,pL;W(417,14,Kne,j$),te(j_,"LayoutOptionResolver/DummyProperty",417),W(348,1,{},KV);var gL;te(j_,"RecursiveLGraphLayout",348),W(73,99,{73:1,3:1,54:1,46:1},H2,Eb,Gs);var zie=te(j_,"UnsupportedJsonGraphException",73);W(380,1,{},qQ);var Uie,Fie;te(pI,"GraphConfigurator",380),W(49,1,{},Yn),te(pI,"IntermediateProcessingConfiguration",49),W(365,1,{},RW),te(pI,"KlayLayered",365),W(577,1,{},JJ),E.i=0;var Yie;te(pv,"ComponentsToCGraphTransformer",577);var Vie;W(578,1,{},z),E.tc=function(e,n){return dn(e.wc(),n.wc())},E.uc=function(e,n){return dn(e.xc(),n.xc())},te(pv,"ComponentsToCGraphTransformer/1",578),W(25,1,{25:1}),E.k=0,E.o=null,E.p=!0,E.r=Zr;var fm=te(Qp,"CNode",25);W(198,25,{198:1,25:1},U6,gj),E.vc=function(){this.b.d=this.j.d,this.b.e=this.j.e},E.wc=function(){return this.a!=null?Oe(this.a):this.c.i},E.xc=function(){return this.a!=null?Oe(this.a):this.c.i},E.w=function(){return""},te(pv,"ComponentsToCGraphTransformer/CRectNode",198),W(549,1,{},Q);var pE,gE;te(pv,"OneDimensionalComponentsCompaction",549),W(550,1,Mi,$),E.B=function(e){return Nk(),jn(),v(v(e,27).a,25).f.f!=0?di:Vn},te(pv,"OneDimensionalComponentsCompaction/lambda$0$Type",550),W(551,1,Mi,Z),E.B=function(e){return Nk(),jn(),Bj(v(v(e,27).a,25).n,v(v(e,27).b,59))||v(v(e,27).a,25).f.f!=0&&Bj(v(v(e,27).a,25).n,v(v(e,27).b,59))?di:Vn},te(pv,"OneDimensionalComponentsCompaction/lambda$1$Type",551),W(324,1,{},C7),te(Qp,"CGraph",324),W(78,1,{78:1},Ey),E.b=0,E.c=0,E.d=0,E.f=0,E.i=!0,E.j=Zr,te(Qp,"CGroup",78),W(470,1,{},X),E.tc=function(e,n){return Xe(e.wc(),n.wc())},E.uc=function(e,n){return Xe(e.xc(),n.xc())},te(Qp,"ISpacingsHandler/1",470),W(323,1,{},pA),E.e=!1;var qie,Zie,$ie,bE=te(Qp,"OneDimensionalCompactor",323);W(554,1,Mi,I),E.B=function(e){return Fx(),jn(),v(v(e,27).a,25).f.f!=0?di:Vn},te(Qp,"OneDimensionalCompactor/lambda$0$Type",554),W(335,1,{},f7),E.a=!1,E.b=!1,E.c=!1,E.d=!1,te(Qp,"Quadruplet",335),W(587,1,{},D),E.Cc=function(e){var n,i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce;for(N=ji,u=new V(e.a.b);u.a<u.c.c.length;)n=v(q(u),25),N=dn(N,n.f.g.j.d+n.g.a);for(re=new ti,x=new V(e.a.a);x.a<x.c.c.length;)y=v(q(x),78),y.j=N,y.f==0&&Cr(re,y,re.c.b,re.c);for(;re.b!=0;){for(y=v(re.b==0?null:(xt(re.b!=0),su(re,re.a.a)),78),l=y.g.j.d,B=(ee=new un(y.a.a).a.bb().mb(),new hn(ee));B.a.G();)A=(g=v(B.a.H(),21),v(g.yb(),25)),ce=y.j+A.g.a,A.f.i||A.j.d<ce?A.r=ce:A.r=A.j.d;for(l-=y.g.r,y.b+=l,e.d==(Jn(),aa)||e.d==Qs?y.c+=l:y.c-=l,O=(F=new un(y.a.a).a.bb().mb(),new hn(F));O.a.G();)for(A=(g=v(O.a.H(),21),v(g.yb(),25)),C=A.i.mb();C.G();)_=v(C.H(),25),gf(e.d)?oe=e.g.tc(A,_):oe=e.g.uc(A,_),_.f.j=Xe(_.f.j,A.r+A.j.c+oe-_.g.a),_.p||(_.f.j=Xe(_.f.j,_.j.d-_.g.a)),--_.f.f,_.f.f==0&&vn(re,_.f)}for(i=new V(e.a.b);i.a<i.c.c.length;)n=v(q(i),25),n.j.d=n.r},te(Hf,"LongestPathCompaction",587),W(588,1,{},R),E.Dc=function(e){var n,i,u,l,g,y,x;for(i=new V(e.a.b);i.a<i.c.c.length;)n=v(q(i),25),n.i.Q();for(l=new V(e.a.b);l.a<l.c.c.length;)for(u=v(q(l),25),y=new V(e.a.b);y.a<y.c.c.length;)g=v(q(y),25),u!=g&&(u.f&&u.f==g.f||(gf(e.d)?x=e.g.uc(u,g):x=e.g.tc(u,g),u!=g.o&&(g.j.d>u.j.d||u.j.d==g.j.d&&u.j.c<g.j.c)&&x2e(g.j.e+g.j.b+x,u.j.e)&&zj(g.j.e,u.j.e+u.j.b+x)&&u.i.ib(g)))},te(Hf,"QuadraticConstraintCalculation",588),W(317,1,{},d7),E.Dc=function(e){this.b=e,s_(this,new G,new U)},te(Hf,"ScanlineConstraintCalculator",317);var Dv=U1(pu,"Scanline/EventHandler");W(464,1,{160:1},XQ),E.Ec=function(e){i_e(this,v(e,235))},te(Hf,"ScanlineConstraintCalculator/ConstraintsScanlineHandler",464),W(465,1,Gr,Y),E.$b=function(e,n){return Pr((v(e,25).j.d+v(e,25).j.c)/2,(v(n,25).j.d+v(n,25).j.c)/2)},te(Hf,"ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",465),W(235,1,{235:1},_6),E.a=!1,te(Hf,"ScanlineConstraintCalculator/Timestamp",235),W(466,1,Gr,j),E.$b=function(e,n){return gxe(e,n)},te(Hf,"ScanlineConstraintCalculator/lambda$0$Type",466),W(467,1,To,G),E.D=function(e){return!0},te(Hf,"ScanlineConstraintCalculator/lambda$1$Type",467),W(468,1,Mi,U),E.B=function(e){return 0},te(Hf,"ScanlineConstraintCalculator/lambda$2$Type",468),W(48,1,{48:1},Rh,u7),E.t=function(e){var n;return e==null||p3e!=Ap(e)?!1:(n=v(e,48),Pa(this.c,n.c)&&Pa(this.d,n.d))},E.v=function(){return jk(be(ve(ht,1),et,1,4,[this.c,this.d]))},E.w=function(){return"("+this.c+", "+this.d+(this.a?"cx":"")+this.b+")"},E.a=!0,E.c=0,E.d=0;var p3e=te(pu,"Point",48);W(201,17,{201:1,3:1,23:1,17:1},b1);var Oc,Yl,Zf,Vl,g3e=Zt(pu,"Point/Quadrant",201,yn,Uye);W(569,1,{},Jq),E.b=null,E.c=null,E.d=null,E.e=null,E.f=null;var Kie,Qie,Wie,Jie,Xie;te(pu,"RectilinearConvexHull",569),W(243,1,{160:1},Cy),E.Ec=function(e){Dme(this,v(e,48))},E.b=0;var bL;te(pu,"RectilinearConvexHull/MaximalElementsEventHandler",243),W(571,1,Gr,K),E.$b=function(e,n){return UQ(e,n)},te(pu,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",571),W(570,1,{160:1},$W),E.Ec=function(e){Vke(this,v(e,48))},E.a=0,E.b=null,E.c=null,E.d=null,E.e=null,te(pu,"RectilinearConvexHull/RectangleEventHandler",570),W(572,1,Gr,ae),E.$b=function(e,n){return Mp(),v(e,48).c==v(n,48).c?Pr(v(n,48).d,v(e,48).d):Pr(v(e,48).c,v(n,48).c)},te(pu,"RectilinearConvexHull/lambda$0$Type",572),W(573,1,Gr,se),E.$b=function(e,n){return Mp(),v(e,48).c==v(n,48).c?Pr(v(e,48).d,v(n,48).d):Pr(v(e,48).c,v(n,48).c)},te(pu,"RectilinearConvexHull/lambda$1$Type",573),W(574,1,Gr,le),E.$b=function(e,n){return Mp(),v(e,48).c==v(n,48).c?Pr(v(n,48).d,v(e,48).d):Pr(v(n,48).c,v(e,48).c)},te(pu,"RectilinearConvexHull/lambda$2$Type",574),W(575,1,Gr,he),E.$b=function(e,n){return Mp(),v(e,48).c==v(n,48).c?Pr(v(e,48).d,v(n,48).d):Pr(v(n,48).c,v(e,48).c)},te(pu,"RectilinearConvexHull/lambda$3$Type",575),W(576,1,Gr,fe),E.$b=function(e,n){return Gxe(e,n)},te(pu,"RectilinearConvexHull/lambda$4$Type",576),W(469,1,{},LW),te(pu,"Scanline",469),W(662,1,{}),te(Ks,"AbstractGraphPlacer",662),W(222,1,{222:1},QK);var Lt;te(Ks,"ComponentGroup",222),W(434,662,{},Xq),E.Fc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F;if(this.a.c=Ae(ht,et,1,0,4,1),n.b.c=Ae(ht,et,1,0,4,1),e.V()){n.e.a=0,n.e.b=0;return}for(g=v(e.sb(0),55),Du(n,g),l=e.mb();l.G();)u=v(l.H(),55),o2e(this,u);for(B=new Wr,F=2*v(J(g,(Ce(),Qi)),15).a,_=new V(this.a);_.a<_.c.c.length;)y=v(q(_),222),C=FCe(y,F),Us(T7(y.a),B.a,B.b),B.a+=C.a,B.b+=C.b;if(n.e.a=B.a-F,n.e.b=B.b-F,Gt(Oe(Yt(J(g,(Wt(),pC)))))&&ot(J(g,(Fe(),Ff)))===ot((Ou(),Uf))){for(O=e.mb();O.G();)N=v(O.H(),55),sv(N,N.d.a,N.d.b);for(i=new pe,Ane(i,e,F),A=e.mb();A.G();)N=v(A.H(),55),Nn(au(N.d),i.e);Nn(au(n.e),i.a)}for(x=new V(this.a);x.a<x.c.c.length;)y=v(q(x),222),tJ(n,T7(y.a))},te(Ks,"ComponentGroupGraphPlacer",434),W(322,1,{},pe),te(Ks,"ComponentsCompactor",322),W(13,647,gI,Ye,qi,dc),E.rb=function(e,n){hl(this,e,n)},E.ib=function(e){return $e(this,e)},E.jb=function(e){return Bn(this,e)},E.Q=function(){this.c=Ae(ht,et,1,0,4,1)},E.kb=function(e){return Vi(this,e,0)!=-1},E.sb=function(e){return ut(this,e)},E.V=function(){return this.c.length==0},E.mb=function(){return new V(this)},E.vb=function(e){return Nf(this,e)},E.nb=function(e){return Ir(this,e)},E.Xb=function(e,n){bW(this,e,n)},E.wb=function(e,n){return ml(this,e,n)},E.Y=function(){return this.c.length},E.ob=function(){return TK(this)},E.pb=function(e){return nr(this,e)},te(Mt,"ArrayList",13),W(532,13,gI,OW),E.ib=function(e){return Dp(this,v(e,48))},te(Ks,"ComponentsCompactor/Hullpoints",532),W(529,1,{347:1},hee),E.a=!1,te(Ks,"ComponentsCompactor/InternalComponent",529),W(528,1,Pc,eZ),E.mb=function(){return new V(this.a)},te(Ks,"ComponentsCompactor/InternalConnectedComponents",528),W(531,1,{251:1},rte),E.zc=function(){return null},E.Ac=function(){return this.a},E.yc=function(){return Vk(this.d)},E.Bc=function(){return this.b},te(Ks,"ComponentsCompactor/InternalExternalExtension",531),W(530,1,{251:1},sZ),E.Ac=function(){return this.a},E.yc=function(){return Vk(this.d)},E.zc=function(){return this.c},E.Bc=function(){return this.b},te(Ks,"ComponentsCompactor/InternalUnionExternalExtension",530),W(534,1,{},Ate),te(Ks,"ComponentsCompactor/OuterSegments",534),W(533,1,{},tZ),te(Ks,"ComponentsCompactor/Segments",533),W(381,1,{},LK),te(Ks,"ComponentsProcessor",381),W(432,662,{},me),E.Fc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve;if(e.Y()==1){de=v(e.sb(0),55),de!=n&&(n.b.c=Ae(ht,et,1,0,4,1),Zte(n,de,0,0),Du(n,de),kQ(n.a,de.a),n.e.a=de.e.a,n.e.b=de.e.b);return}else if(e.V()){n.b.c=Ae(ht,et,1,0,4,1),n.e.a=0,n.e.b=0;return}for(x=e.mb();x.G();){for(g=v(x.H(),55),re=0,F=new V(g.b);F.a<F.c.c.length;)B=v(q(F),9),re+=v(J(B,(Ce(),vo)),24).a;g.k=re}for(uo(e,new Te),l=v(e.sb(0),55),n.b.c=Ae(ht,et,1,0,4,1),Du(n,l),O=0,Ee=0,_=e.mb();_.G();)g=v(_.H(),55),ce=g.e,O=Xe(O,ce.a),Ee+=ce.a*ce.b;for(O=Xe(O,Math.sqrt(Ee)*v(J(n,(Ce(),Nd)),15).a),ye=ure*v(J(n,Qi),15).a,ze=0,Ve=0,A=0,i=ye,y=e.mb();y.G();)g=v(y.H(),55),ce=g.e,ze+ce.a>O&&(ze=0,Ve+=A+ye,A=0),ee=g.d,sv(g,ze+ee.a,Ve+ee.b),ee.a=0,ee.b=0,i=Xe(i,ze+ce.a),A=Xe(A,ce.b),ze+=ce.a+ye;if(n.e.a=i,n.e.b=Ve+A,oe=v(J(n,Qi),15).a,Gt(Oe(Yt(J(l,(Wt(),pC)))))){for(u=new pe,Ane(u,e,oe),N=e.mb();N.G();)C=v(N.H(),55),Nn(au(C.d),u.e);Nn(au(n.e),u.a)}tJ(n,e)},te(Ks,"SimpleRowGraphPlacer",432),W(433,1,Gr,Te),E.$b=function(e,n){return Mwe(v(e,55),v(n,55))},te(Ks,"SimpleRowGraphPlacer/1",433),W(369,1,Mn,QV),E.sc=function(e,n){Dne(e,n)};var eae;te(gv,"CompoundGraphPostprocessor",369),W(370,1,To,Le),E.D=function(e){var n;return n=v(J(v(e,114).b,(Fe(),ir)),44),!!n&&n.b!=0},te(gv,"CompoundGraphPostprocessor/1",370),W(368,1,Mn,z$),E.sc=function(e,n){nee(this,e,n)},te(gv,"CompoundGraphPreprocessor",368),W(187,1,{187:1},IX),E.c=!1,te(gv,"CompoundGraphPreprocessor/ExternalPort",187),W(114,1,{114:1},D1),E.w=function(){return I1(this.c)+":"+EJ(this.b)},te(gv,"CrossHierarchyEdge",114),W(310,1,Gr,GM),E.$b=function(e,n){return uxe(this,v(e,114),v(n,114))},te(gv,"CrossHierarchyEdgeComparator",310),W(147,131,{179:1,131:1,147:1,3:1}),E.k=0,te(ii,"LGraphElement",147),W(12,147,{179:1,131:1,12:1,147:1,3:1},Hs),E.w=function(){return EJ(this)};var la=te(ii,"LEdge",12);W(55,147,{179:1,131:1,55:1,147:1,3:1,22:1},hj),E.mb=function(){return new V(this.c)},E.w=function(){return this.c.c.length==0?"G-unlayered"+Cc(this.b):this.b.c.length==0?"G-layered"+Cc(this.c):"G[layerless"+Cc(this.b)+", layers"+Cc(this.c)+"]"};var b3e=te(ii,"LGraph",55);W(273,1,{}),E.pc=function(){return this.e.j},te(ii,"LGraphAdapters/AbstractLShapeAdapter",273),W(240,1,{627:1},t1),E.b=null,te(ii,"LGraphAdapters/LEdgeAdapter",240),W(325,1,{},E6),E.pc=function(){return this.a.e},E.b=null,E.c=!1,te(ii,"LGraphAdapters/LGraphAdapter",325),W(224,273,{129:1,224:1},A2),te(ii,"LGraphAdapters/LLabelAdapter",224),W(555,273,{626:1},w$),E.a=null,E.b=null,E.c=!1,te(ii,"LGraphAdapters/LNodeAdapter",555),W(556,273,{161:1},x$),E.a=null,E.b=null,E.c=null,E.d=!1,te(ii,"LGraphAdapters/LPortAdapter",556),W(557,1,Gr,ge),E.$b=function(e,n){return m_e(v(e,7),v(n,7))},te(ii,"LGraphAdapters/PortComparator",557),W(168,1,{168:1},S2,tW),E.t=function(e){var n;return qe(e,168)?(n=v(e,168),this.d==n.d&&this.a==n.a&&this.b==n.b&&this.c==n.c):!1},E.v=function(){var e,n;return e=ur(Oe(this.b))<<16,e|=ur(Oe(this.a))&$s,n=ur(Oe(this.c))<<16,n|=ur(Oe(this.d))&$s,e^n},E.w=function(){return"Insets[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},E.a=0,E.b=0,E.c=0,E.d=0,te(ii,"LInsets",168),W(165,147,{179:1,131:1,147:1,165:1,3:1}),te(ii,"LShape",165),W(33,165,{179:1,131:1,147:1,33:1,165:1,3:1},G6),E.w=function(){return this.a==null?"l_"+this.k:"l_"+this.a},te(ii,"LLabel",33),W(9,165,{179:1,131:1,147:1,9:1,165:1,3:1},lo),E.w=function(){return uW(this)};var Nr=te(ii,"LNode",9);W(132,17,{132:1,3:1,23:1,17:1},xp);var $i,Dn,go,Pn,$n,fr,vL=Zt(ii,"LNode/NodeType",132,yn,hme);W(7,165,{179:1,131:1,147:1,7:1,165:1,3:1},Xn),E.w=function(){var e;return e=QW(this),e==null?"p_"+this.k:"p_"+e};var vE,yL,yE,mL,mE,wE,tae=te(ii,"LPort",7);W(399,1,To,xe),E.D=function(e){return YK(e)},te(ii,"LPort/1",399),W(400,1,To,Se),E.D=function(e){return FK(e)},te(ii,"LPort/2",400),W(401,1,To,Ie),E.D=function(e){return v(e,7).g==(De(),bt)},te(ii,"LPort/3",401),W(402,1,To,Re),E.D=function(e){return v(e,7).g==(De(),at)},te(ii,"LPort/4",402),W(403,1,To,Ne),E.D=function(e){return v(e,7).g==(De(),kt)},te(ii,"LPort/5",403),W(404,1,To,Me),E.D=function(e){return v(e,7).g==(De(),ct)},te(ii,"LPort/6",404),W(190,1,Pc,sp),E.mb=function(){var e;return e=new V(this.a.b),new _q(e)},te(ii,"LPort/7",190),W(405,1,pr,_q),E.H=function(){return v(q(this.a),12).c},E.G=function(){return ul(this.a)},E.I=function(){Sp(this.a)},te(ii,"LPort/7/1",405),W(169,1,Pc,Sh),E.mb=function(){var e;return e=new V(this.a.e),new HM(e)},te(ii,"LPort/8",169),W(304,1,pr,HM),E.H=function(){return v(q(this.a),12).d},E.G=function(){return ul(this.a)},E.I=function(){Sp(this.a)},te(ii,"LPort/8/1",304),W(16,147,{179:1,131:1,147:1,16:1,3:1,22:1},bl),E.mb=function(){return new V(this.a)},E.w=function(){return"L_"+Vi(this.b.c,this,0)+Cc(this.a)},te(ii,"Layer",16),W(437,1,Mn,ke),E.sc=function(e,n){var i,u,l,g,y,x,_;for(Vt(n,"Big nodes intermediate-processing",1),this.a=e,g=new V(this.a.c);g.a<g.c.c.length;)for(l=v(q(g),16),_=Ca(l.a),i=Ho(_,new Ge),x=kf(i.b.mb(),i.a);yc(x);)y=v(Tf(x),9),ot(J(y,(Wt(),Tr)))===ot((ra(),fg))||ot(J(y,Tr))===ot(Ku)?(u=PA(this,y,!1),_e(u,Tr,v(J(y,Tr),85)),_e(y,Tr,eh)):PA(this,y,!0);Dt(n)},te(Nt,"BigNodesIntermediateProcessor",437),W(438,1,To,Ge),E.D=function(e){return Eme(v(e,9))},te(Nt,"BigNodesIntermediateProcessor/1",438),W(582,1,Mi,Eq),E.B=function(e){var n;return ywe((n=this,C1(e),n))},te(Nt,"BigNodesLabelHandler/CompoundFunction",582),W(332,1,{},Jj),E.a=0,E.e=null,E.f=0,te(Nt,"BigNodesLabelHandler/Handler",332),W(583,1,Mi,Cq),E.B=function(e){var n;return jxe((n=this,C1(e),n))},te(Nt,"BigNodesLabelHandler/Handler/1",583),W(584,1,Mi,k$),E.B=function(e){var n;return z1e((n=this,C1(e),n))},te(Nt,"BigNodesLabelHandler/Handler/2",584),W(585,1,Mi,_$),E.B=function(e){var n;return pCe((n=this,C1(e),n))},te(Nt,"BigNodesLabelHandler/Handler/3",585),W(439,1,Mn,Qe),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(Vt(n,"Big nodes post-processing",1),this.a=e,x=new V(this.a.c);x.a<x.c.c.length;)for(y=v(q(x),16),i=Ho(y.a,new nt),C=kf(i.b.mb(),i.a);yc(C);){for(_=v(Tf(C),9),A=v(J(_,(Ce(),Yv)),15),g=gte(this,_),ee=new Ye,F=lr(g,(De(),at)).mb();F.G();)O=v(F.H(),7),ee.c[ee.c.length]=O,N=O.i.a-g.j.a,O.i.a=A.a+N;for(_.j.a=A.a,B=new V(ee);B.a<B.c.c.length;)O=v(q(B),7),_n(O,_);this.a.e.a<_.i.a+_.j.a&&(this.a.e.a=_.i.a+_.j.a),l=v(J(_,j9),20),Bn(_.c,l),u=v(J(_,iC),64),u&&u.B(null)}Dt(n)},te(Nt,"BigNodesPostProcessor",439),W(440,1,To,nt),E.D=function(e){return Cme(v(e,9))},te(Nt,"BigNodesPostProcessor/1",440),W(441,1,Mn,NZ),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B;for(Vt(n,lre,1),this.c=e,A=this.c.b,l=0,_=new V(A);_.a<_.c.c.length;)y=v(q(_),9),y.k=l++;for(this.d=v(J(this.c,(Ce(),Qi)),15).a,this.a=v(J(this.c,(Fe(),Zo)),59),this.b=A.c.length,g=fre,C=new V(A);C.a<C.c.c.length;)y=v(q(C),9),y.g==(pt(),$n)&&y.j.a<g&&(g=y.j.a);for(g=50>g?50:g,i=new Ye,B=g+this.d,N=new V(A);N.a<N.c.c.length;)if(y=v(q(N),9),y.g==(pt(),$n)&&y.j.a>B){for(O=1,u=y.j.a;u>g;)++O,u=(y.j.a-(O-1)*this.d)/O;$e(i,new GW(this,y,O,u))}for(x=new V(i);x.a<x.c.c.length;)y=v(q(x),267),q_e(y.d)&&_Ce(y);Dt(n)},E.b=0,E.d=0,te(Nt,"BigNodesPreProcessor",441),W(267,1,{267:1},GW),E.a=0,E.c=0,te(Nt,"BigNodesPreProcessor/BigNode",267),W(442,1,Mn,TZ),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(Vt(n,lre,1),nae=Gt(Oe(Yt(J(e,(Fe(),_v))))),this.c=e,B=new Ye,y=new V(e.c);y.a<y.c.c.length;)g=v(q(y),16),Bn(B,g.a);for(l=0,N=new V(B);N.a<N.c.c.length;)_=v(q(N),9),_.k=l++;for(this.d=v(J(this.c,(Ce(),Qi)),15).a,this.a=v(J(this.c,Zo),59),this.b=B.c.length,x=fre,A=new V(B);A.a<A.c.c.length;)_=v(q(A),9),_.g==(pt(),$n)&&_.j.a<x&&(x=_.j.a);for(x=50>x?50:x,i=new Ye,ee=x+this.d,O=new V(B);O.a<O.c.c.length;)if(_=v(q(O),9),_.g==(pt(),$n)&&_.j.a>ee){for(F=1,u=_.j.a;u>x;)++F,u=(_.j.a-(F-1)*this.d)/F;$e(i,new oW(this,_,F))}for(C=new V(i);C.a<C.c.c.length;)_=v(q(C),268),VCe(_)&&wEe(_);Dt(n)},E.b=0,E.d=0;var nae=!1;te(Nt,"BigNodesSplitter",442),W(268,1,{268:1},oW),E.a=0,E.e=4,te(Nt,"BigNodesSplitter/BigNode",268),W(443,1,Mn,ft),E.sc=function(e,n){var i,u,l,g,y,x,_,C;for(Vt(n,"Comment post-processing",1),_=v(J(e,(Ce(),Qi)),15).a,g=new V(e.c);g.a<g.c.c.length;){for(l=v(q(g),16),u=new Ye,x=new V(l.a);x.a<x.c.c.length;)y=v(q(x),9),C=v(J(y,lg),20),i=v(J(y,sg),20),(C||i)&&(bCe(y,C,i,_),C&&Bn(u,C),i&&Bn(u,i));Bn(l.a,u)}Dt(n)},te(Nt,"CommentPostprocessor",443),W(444,1,Mn,Ue),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re;for(Vt(n,"Comment pre-processing",1),x=new V(e.b);x.a<x.c.c.length;)if(y=v(q(x),9),Gt(Oe(Yt(J(y,(Fe(),Xp)))))){for(u=0,i=null,_=null,B=new V(y.f);B.a<B.c.c.length;)A=v(q(B),7),u+=A.b.c.length+A.e.c.length,A.b.c.length==1&&(i=v(ut(A.b,0),12),_=i.c),A.e.c.length==1&&(i=v(ut(A.e,0),12),_=i.d);if(u==1&&_.b.c.length+_.e.c.length==1&&!Gt(Oe(Yt(J(_.f,Xp)))))RCe(y,i,_,_.f),Sp(x);else{for(re=new Ye,O=new V(y.f);O.a<O.c.c.length;){for(A=v(q(O),7),N=new V(A.e);N.a<N.c.c.length;)C=v(q(N),12),C.d.e.c.length==0||(re.c[re.c.length]=C);for(g=new V(A.b);g.a<g.c.c.length;)l=v(q(g),12),l.c.b.c.length==0||(re.c[re.c.length]=l)}for(ee=new V(re);ee.a<ee.c.c.length;)F=v(q(ee),12),Il(F,!0)}}Dt(n)},te(Nt,"CommentPreprocessor",444),W(445,1,Mn,Ze),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A;for(Vt(n,"Edge and layer constraint edge reversal",1),C=new V(e.b);C.a<C.c.c.length;){switch(_=v(q(C),9),y=v(J(_,(Wt(),Tr)),85),g=null,y.e){case 1:case 2:g=(nd(),Fv);break;case 3:case 4:g=(nd(),Cm)}if(g)_e(_,(Ce(),aC),(nd(),Fv)),g==Cm?zA(_,y,(vr(),hi)):g==Fv&&zA(_,y,(vr(),Wi));else if(Bs(v(J(_,(Fe(),Ct)),28))&&_.f.c.length!=0){for(i=!0,A=new V(_.f);A.a<A.c.c.length;){if(N=v(q(A),7),!(N.g==(De(),at)&&N.b.c.length-N.e.c.length>0||N.g==ct&&N.b.c.length-N.e.c.length<0)){i=!1;break}if(N.g==ct){for(l=new V(N.e);l.a<l.c.c.length;)if(u=v(q(l),12),x=v(J(u.d.f,Tr),85),x==(ra(),fg)||x==Ku){i=!1;break}}if(N.g==at){for(l=new V(N.b);l.a<l.c.c.length;)if(u=v(q(l),12),x=v(J(u.c.f,Tr),85),x==(ra(),qv)||x==Uc){i=!1;break}}}i&&zA(_,y,(vr(),fC))}}Dt(n)},te(Nt,"EdgeAndLayerConstraintEdgeReverser",445),W(446,1,Mn,mt),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A;for(Vt(n,"End label placement",1),y=v(J(e,(Fe(),yd)),15).a,this.a=(Fn(),new en),this.c=new en,this.b=new en,_=new V(e.c);_.a<_.c.c.length;)for(x=v(q(_),16),N=new V(x.a);N.a<N.c.c.length;)for(C=v(q(N),9),u=Ht(In(C));Bt(u);)for(i=v(It(u),12),g=new V(i.b);g.a<g.c.c.length;)l=v(q(g),33),(ot(J(l,Ta))===ot((Ys(),vd))||ot(J(l,Ta))===ot(Gl))&&(A=null,ot(J(l,Ta))===ot(vd)?A=i.c:ot(J(l,Ta))===ot(Gl)&&(A=i.d),Jh(this.a,A.f)||kn(this.a,A.f,0),Jh(this.c,A.f)||kn(this.c,A.f,0),Jh(this.b,A)||kn(this.b,A,0),ot(J(l,(Ce(),jo)))===ot((na(),ms))?EEe(l,A,y):_Ee(l,A,y));Dt(n)},te(Nt,"EndLabelProcessor",446),W(269,1,Mn,I2),E.sc=function(e,n){var i,u,l,g,y;for(Vt(n,"Graph transformation ("+this.a+")",1),l=yl(e.b),u=new V(e.c);u.a<u.c.c.length;)i=v(q(u),16),Bn(l,i.a);switch(this.a.e){case 0:Tne(l,e);break;case 1:_ne(l),y=v(J(e,(Wt(),jd)),115),y&&_e(e,jd,GX(y)),Po(e.d),Po(e.e);break;case 2:Tne(l,e),DCe(l,e),_ne(l),g=v(J(e,(Wt(),jd)),115),g&&_e(e,jd,GX(g)),Po(e.d),Po(e.e)}Dt(n)},te(Nt,"GraphTransformer",269),W(221,17,{221:1,3:1,23:1,17:1},ix);var wL,xL,kL,v3e=Zt(Nt,"GraphTransformer/Mode",221,yn,bye);W(448,1,Mn,st),E.sc=function(e,n){Vt(n,"Hierarchical port constraint processing",1),S2e(e),e3e(e),Dt(n)},te(Nt,"HierarchicalPortConstraintProcessor",448),W(449,1,Gr,Ot),E.$b=function(e,n){return D2e(v(e,9),v(n,9))},te(Nt,"HierarchicalPortConstraintProcessor/NodeComparator",449),W(450,1,Mn,At),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A;for(Vt(n,"Hierarchical port dummy size processing",1),_=new Ye,A=new Ye,x=v(J(e,(Ce(),Qi)),15).a,N=x*v(J(e,(Wt(),xu)),15).a,i=N*2,l=new V(e.c);l.a<l.c.c.length;){for(u=v(q(l),16),_.c=Ae(ht,et,1,0,4,1),A.c=Ae(ht,et,1,0,4,1),y=new V(u.a);y.a<y.c.c.length;)g=v(q(y),9),g.g==(pt(),Dn)&&(C=v(J(g,$r),32),C==(De(),bt)?_.c[_.c.length]=g:C==kt&&(A.c[A.c.length]=g));ate(_,!0,i),ate(A,!1,i)}Dt(n)},te(Nt,"HierarchicalPortDummySizeProcessor",450),W(451,1,Mn,Rt),E.sc=function(e,n){var i,u,l,g;Vt(n,"Orthogonally routing hierarchical port edges",1),this.a=0,i=cEe(e),dCe(e,i),JEe(this,e,i),NCe(e),u=v(J(e,(Fe(),Ct)),28),l=e.c,Cne((On(0,l.c.length),v(l.c[0],16)),u,e),Cne(v(ut(l,l.c.length-1),16),u,e),g=e.c,one((On(0,g.c.length),v(g.c[0],16))),one(v(ut(g,g.c.length-1),16)),Dt(n)},E.a=0,te(Nt,"HierarchicalPortOrthogonalEdgeRouter",451),W(452,1,Gr,zt),E.$b=function(e,n){return X0e(v(e,9),v(n,9))},te(Nt,"HierarchicalPortOrthogonalEdgeRouter/1",452),W(453,1,Gr,mn),E.$b=function(e,n){return Rme(v(e,9),v(n,9))},te(Nt,"HierarchicalPortOrthogonalEdgeRouter/2",453),W(454,1,Mn,sn),E.sc=function(e,n){var i;Vt(n,"Hierarchical port position processing",1),i=e.c,i.c.length>0&&ene((On(0,i.c.length),v(i.c[0],16)),e),i.c.length>1&&ene(v(ut(i,i.c.length-1),16),e),Dt(n)},te(Nt,"HierarchicalPortPositionProcessor",454),W(471,1,Mn,or),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(Vt(n,"Hyperedge merging",1),B=new Cn(e.c,0);B.b<B.d.Y();)if(O=(xt(B.b<B.d.Y()),v(B.d.sb(B.c=B.b++),16)),ee=O.a,ee.c.length!=0)for(x=null,A=null,F=0;F<ee.c.length;F++)i=(On(F,ee.c.length),v(ee.c[F],9)),y=i.g,y==(pt(),Pn)&&A==Pn&&(l=v(J(i,(Ce(),Ki)),7),C=v(J(x,Ki),7),g=v(J(i,Ii),7),N=v(J(x,Ii),7),u=!!l||!!g,_=!!C||!!N,u&&_&&(l==C||g==N)&&(n_e(i,x,l==C,g==N),On(F,ee.c.length),v6(ee.c,F,1),--F,i=x,y=A)),x=i,A=y;Dt(n)},te(Nt,"HyperedgeDummyMerger",471),W(472,1,Mn,H),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A;for(Vt(n,"Hypernodes processing",1),l=new V(e.c);l.a<l.c.c.length;)for(u=v(q(l),16),x=new V(u.a);x.a<x.c.c.length;)if(y=v(q(x),9),Gt(Oe(Yt(J(y,(Fe(),Ev)))))&&y.f.c.length<=2){for(A=0,N=0,i=0,g=0,C=new V(y.f);C.a<C.c.c.length;)switch(_=v(q(C),7),_.g.e){case 1:++A;break;case 2:++N;break;case 3:++i;break;case 4:++g}A==0&&i==0&&qCe(e,y,g<=N)}Dt(n)},te(Nt,"HypernodesProcessor",472),W(473,1,Mn,ne),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N;for(Vt(n,"Layer constraint edge reversal",1),y=new V(e.c);y.a<y.c.c.length;){for(g=v(q(y),16),N=-1,i=new Ye,C=v(nr(g.a,Ae(Nr,Zi,9,g.a.c.length,0,1)),51),l=0;l<C.length;l++)u=v(J(C[l],(Ce(),mu)),140),N==-1?u!=(Fs(),Jf)&&(N=l):u==(Fs(),Jf)&&(Fr(C[l],null),od(C[l],N++,g)),u==(Fs(),Sd)&&$e(i,C[l]);for(_=new V(i);_.a<_.c.c.length;)x=v(q(_),9),Fr(x,null),Fr(x,g)}Dt(n)},te(Nt,"InLayerConstraintProcessor",473),W(474,1,Mn,ue),E.sc=function(e,n){var i,u,l,g,y,x;if(v(J(e,(Ce(),Xr)),18).kb((_r(),ks))){for(x=new V(e.b);x.a<x.c.c.length;)g=v(q(x),9),g.g==(pt(),$n)&&(l=v(J(g,(Fe(),Cv)),65),this.c=dn(this.c,g.i.a-l.b),this.a=Xe(this.a,g.i.a+g.j.a+l.c),this.d=dn(this.d,g.i.b-l.d),this.b=Xe(this.b,g.i.b+g.j.b+l.a));for(y=new V(e.b);y.a<y.c.c.length;)if(g=v(q(y),9),g.g!=(pt(),$n))switch(g.g.e){case 2:if(u=v(J(g,(Wt(),Tr)),85),u==(ra(),Uc)){g.i.a=this.c-10,QX(g,new we).A(new Pq(g));break}if(u==Ku){g.i.a=this.a+10,QX(g,new je).A(new Sq(g));break}if(i=v(J(g,mu),140),i==(Fs(),Jf)){dne(g).A(new Nq(g)),g.i.b=this.d-10;break}if(i==Sd){dne(g).A(new Tq(g)),g.i.b=this.b+10;break}break;default:throw new wn("The node type "+g.g+" is not supported by the "+y3e)}}},E.a=Zr,E.b=Zr,E.c=ji,E.d=ji;var y3e=te(Nt,"InteractiveExternalPortPositioner",474);W(475,1,Mi,we),E.B=function(e){return v(e,12).d.f},te(Nt,"InteractiveExternalPortPositioner/lambda$0$Type",475),W(476,1,Mi,Pq),E.B=function(e){return e1e(this.a,e)},te(Nt,"InteractiveExternalPortPositioner/lambda$1$Type",476),W(477,1,Mi,je),E.B=function(e){return v(e,12).c.f},te(Nt,"InteractiveExternalPortPositioner/lambda$2$Type",477),W(478,1,Mi,Sq),E.B=function(e){return t1e(this.a,e)},te(Nt,"InteractiveExternalPortPositioner/lambda$3$Type",478),W(479,1,Mi,Nq),E.B=function(e){return f1e(this.a,e)},te(Nt,"InteractiveExternalPortPositioner/lambda$4$Type",479),W(480,1,Mi,Tq),E.B=function(e){return h1e(this.a,e)},te(Nt,"InteractiveExternalPortPositioner/lambda$5$Type",480),W(37,17,{37:1,3:1,23:1,17:1},bn);var xE,Bv,kE,_E,_L,EL,CL,PL,EE,hm,SL,NL,TL,ML,rg,jL,AL,IL,CE,dm,PE,LL,pm,gm,bm,OL,Pd,vm,DL,BL,RL,SE,NE,GL,HL,ym,mm,zL,UL,FL,TE,ME,jE,YL,VL,qL,ZL,$L,KL,QL,rae=Zt(Nt,"IntermediateProcessorStrategy",37,yn,tke);W(503,1,Mn,ie),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce;for(Vt(n,"Inverted port preprocessing",1),C=e.c,_=new Cn(C,0),i=null,ce=new Ye;_.b<_.d.Y();){for(oe=i,i=(xt(_.b<_.d.Y()),v(_.d.sb(_.c=_.b++),16)),O=new V(ce);O.a<O.c.c.length;)N=v(q(O),9),Fr(N,oe);for(ce.c=Ae(ht,et,1,0,4,1),B=new V(i.a);B.a<B.c.c.length;)if(N=v(q(B),9),N.g==(pt(),$n)&&Bs(v(J(N,(Fe(),Ct)),28))){for(re=CA(N,(vr(),Wi),(De(),at)).mb();re.G();)for(F=v(re.H(),7),x=F.b,y=v(nr(x,Ae(la,ia,12,x.c.length,0,1)),47),l=0,g=y.length;l<g;++l)u=y[l],eEe(e,F,u,ce);for(ee=CA(N,hi,ct).mb();ee.G();)for(F=v(ee.H(),7),x=F.e,y=v(nr(x,Ae(la,ia,12,x.c.length,0,1)),47),l=0,g=y.length;l<g;++l)u=y[l],$ke(e,F,u,ce)}}for(A=new V(ce);A.a<A.c.c.length;)N=v(q(A),9),Fr(N,i);Dt(n)},te(Nt,"InvertedPortProcessor",503),W(481,1,Mn,Pe),E.sc=function(e,n){Vt(n,"Node and Port Label Placement and Node Sizing",1),Fve((D2(),D2(),new E6(e,!1))),Dt(n)},te(Nt,"LabelAndNodeSizeProcessor",481),W(482,1,Mn,WV),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;for(Vt(n,"Label dummy insertions",1),O=new Ye,N=v(J(e,(Fe(),yd)),15).a,A=v(J(e,Zo),59),F=new V(e.b);F.a<F.c.c.length;)for(B=v(q(F),9),re=new V(B.f);re.a<re.c.c.length;)for(ee=v(q(re),7),x=new V(ee.e);x.a<x.c.c.length;)if(y=v(q(x),12),y.c.f!=y.d.f&&EQ(y.b,iae)){for(ce=cl(y.b.c.length),i=new lo(e),io(i,(pt(),go)),_e(i,(Ce(),_t),y),_e(i,z9,ce),_e(i,Ct,(Zn(),fi)),_e(i,Ki,y.c),_e(i,Ii,y.d),O.c[O.c.length]=i,jte(y,i),de=v(J(y,gs),15).a,de<0&&(de=0,_e(y,gs,new cn(de))),oe=Math.floor(de/2),l=new V(i.f);l.a<l.c.c.length;)u=v(q(l),7),u.i.b=oe;for(g=i.j,_=new Cn(y.b,0);_.b<_.d.Y();)C=(xt(_.b<_.d.Y()),v(_.d.sb(_.c=_.b++),33)),ot(J(C,Ta))===ot((Ys(),xv))&&(A==(Jn(),bu)||A==Qs?(g.a+=C.j.a+N,g.b=Xe(g.b,C.j.b)):(g.a=Xe(g.a,C.j.a),g.b+=C.j.b+N),ce.c[ce.c.length]=C,zo(_));(A==(Jn(),bu)||A==Qs)&&(g.a-=N),g.b+=N+de}Bn(e.b,O),Dt(n)};var iae;te(Nt,"LabelDummyInserter",482),W(483,1,To,He),E.D=function(e){return ot(J(v(e,33),(Fe(),Ta)))===ot((Ys(),xv))},te(Nt,"LabelDummyInserter/1",483),W(484,1,Mn,We),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O;for(Vt(n,"Label dummy removal",1),l=v(J(e,(Fe(),yd)),15).a,x=v(J(e,Zo),59),y=new V(e.c);y.a<y.c.c.length;)for(g=v(q(y),16),C=new Cn(g.a,0);C.b<C.d.Y();)_=(xt(C.b<C.d.Y()),v(C.d.sb(C.c=C.b++),9)),_.g==(pt(),go)&&(N=v(J(_,(Ce(),_t)),12),O=v(J(N,gs),15).a,i=new tr(_.i),ot(J(_,jo))===ot((na(),vu))&&(i.b+=O+l),u=new wt(_.j.a,_.j.b-O-l),A=v(J(_,z9),20),x==(Jn(),bu)||x==Qs?Xwe(A,i,l,u,ot(J(_,jo))!==ot(ms)):Ywe(A,i,l,u),Bn(N.b,A),bne(_,!1),zo(C));Dt(n)},te(Nt,"LabelDummyRemover",484),W(485,1,Mn,Je),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce;for(Vt(n,"Label dummy switching",1),i=new Ye,A=new Ye,x=new Ye,B=new Ye,y=new V(e.c);y.a<y.c.c.length;)for(g=v(q(y),16),N=new V(g.a);N.a<N.c.c.length;)if(C=v(q(N),9),C.g==(pt(),go)){i.c[i.c.length]=C,x.c=Ae(ht,et,1,0,4,1),B.c=Ae(ht,et,1,0,4,1),ee=C;do ee=v(It(Ht(Dr(ee))),12).c.f,ee.g==Pn&&(x.c[x.c.length]=ee);while(ee.g==Pn);ce=C;do ce=v(It(Ht(In(ce))),12).d.f,ce.g==Pn&&(B.c[B.c.length]=ce);while(ce.g==Pn);_=x.c.length,F=B.c.length,_>F+1?(O=(_+F)/2|0,$e(A,new Er(C,(On(O,x.c.length),v(x.c[O],9))))):F>_+1&&(O=((F-_)/2|0)-1,$e(A,new Er(C,(On(O,B.c.length),v(B.c[O],9)))))}for(oe=new V(A);oe.a<oe.c.c.length;)re=v(q(oe),27),NEe(v(re.a,9),v(re.b,9));for(l=new V(i);l.a<l.c.c.length;)u=v(q(l),9),kX(u,new yt,(Ce(),Ii)),kX(u,new rt,Ki);Dt(n)},te(Nt,"LabelDummySwitcher",485),W(486,1,Mi,yt),E.B=function(e){return v(It(Ht(Dr(v(e,9)))),12).c.f},te(Nt,"LabelDummySwitcher/lambda$0$Type",486),W(487,1,Mi,rt),E.B=function(e){return v(It(Ht(In(v(e,9)))),12).d.f},te(Nt,"LabelDummySwitcher/lambda$1$Type",487),W(488,1,Mn,$t),E.sc=function(e,n){Vt(n,"Label management",1),C1(J(e,(ej(),BI))),Dt(n)},te(Nt,"LabelManagementProcessor",488),W(489,1,Mn,JV),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;switch(_=v(J(e,(Wt(),jd)),115),Vt(n,"Label side selection ("+_+")",1),C=(Pt(e),new zh(e)),_.e){case 0:$xe(C);break;case 1:Zxe(C);break;case 2:Rke(C);break;case 3:Bke(C);break;case 4:lCe(C)}for(x=new V(e.c);x.a<x.c.c.length;)for(y=v(q(x),16),u=new V(y.a);u.a<u.c.c.length;){for(i=v(q(u),9),B=new V(i.f);B.a<B.c.c.length;)for(A=v(q(B),7),g=new V(A.c);g.a<g.c.c.length;)l=v(q(g),33),ot(J(l,(Ce(),jo)))===ot((na(),Ov))&&_e(l,jo,aae);if(i.g==(pt(),go)&&ot(J(i,(Ce(),jo)))===ot((na(),ms)))for(N=v(J(i,_t),12),ee=v(J(N,(Fe(),gs)),15).a,F=i.j.b-Math.ceil(ee/2),O=new V(i.f);O.a<O.c.c.length;)A=v(q(O),7),A.i.b=F}Dt(n)};var aae;te(Nt,"LabelSideSelector",489),W(490,1,Gr,Ft),E.$b=function(e,n){return X1e(v(e,7),v(n,7))},te(Nt,"LabelSideSelector/1",490),W(495,1,Mn,rn),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;if(Vt(n,"Layer constraint application",1),C=e.c,C.c.length==0){Dt(n);return}for(g=(On(0,C.c.length),v(C.c[0],16)),y=v(ut(C,C.c.length-1),16),ce=new bl(e),de=new bl(e),_=new V(C);_.a<_.c.c.length;)for(x=v(q(_),16),ee=v(nr(x.a,Ae(Nr,Zi,9,x.a.c.length,0,1)),51),O=0,F=ee.length;O<F;++O)switch(A=ee[O],i=v(J(A,(Wt(),Tr)),85),i.e){case 1:Fr(A,g),Fte(A,!1);break;case 2:Fr(A,ce),Fte(A,!0);break;case 3:Fr(A,y),Qte(A);break;case 4:Fr(A,de),Qte(A)}if(C.c.length>=2){for(N=!0,re=(On(1,C.c.length),v(C.c[1],16)),B=new V(g.a);B.a<B.c.c.length;){if(A=v(q(B),9),ot(J(A,(Wt(),Tr)))===ot((ra(),eh))){N=!1;break}for(l=Ht(In(A));Bt(l);)if(u=v(It(l),12),u.d.f.d==re){N=!1;break}if(!N)break}if(N){for(ee=v(nr(g.a,Ae(Nr,Zi,9,g.a.c.length,0,1)),51),O=0,F=ee.length;O<F;++O)A=ee[O],Fr(A,re);Ir(C,g)}}if(C.c.length>=2){for(N=!0,oe=v(ut(C,C.c.length-2),16),B=new V(y.a);B.a<B.c.c.length;){if(A=v(q(B),9),ot(J(A,(Wt(),Tr)))===ot((ra(),eh))){N=!1;break}for(l=Ht(Dr(A));Bt(l);)if(u=v(It(l),12),u.c.f.d==oe){N=!1;break}if(!N)break}if(N){for(ee=v(nr(y.a,Ae(Nr,Zi,9,y.a.c.length,0,1)),51),O=0,F=ee.length;O<F;++O)A=ee[O],Fr(A,oe);Ir(C,y)}}C.c.length==1&&(On(0,C.c.length),v(C.c[0],16)).a.c.length==0&&Nf(C,0),ce.a.c.length==0||(kl(0,C.c.length),mb(C.c,0,ce)),de.a.c.length==0||(C.c[C.c.length]=de),Dt(n)},te(Nt,"LayerConstraintProcessor",495),W(496,1,Mn,Un),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F;for(Vt(n,"Layer size calculation",1),C=hs,_=5e-324,y=new V(e.c);y.a<y.c.c.length;)if(g=v(q(y),16),x=g.c,x.a=0,x.b=0,g.a.c.length!=0){for(A=new V(g.a);A.a<A.c.c.length;)N=v(q(A),9),B=N.j,O=N.e,x.a=Xe(x.a,B.a+O.b+O.c);u=v(ut(g.a,0),9),F=u.i.b-u.e.d,l=v(ut(g.a,g.a.c.length-1),9),i=l.i.b+l.j.b+l.e.a,x.b=i-F,C=C<F?C:F,_=_>i?_:i}e.e.b=_-C,e.d.b-=C,Dt(n)},te(Nt,"LayerSizeAndGraphHeightCalculator",496),W(497,1,Mn,Kt),E.sc=function(e,n){var i,u,l,g,y;for(Vt(n,"Edge joining",1),i=Gt(Oe(Yt(J(e,(Wt(),hC))))),l=new V(e.c);l.a<l.c.c.length;)for(u=v(q(l),16),y=new Cn(u.a,0);y.b<y.d.Y();)g=(xt(y.b<y.d.Y()),v(y.d.sb(y.c=y.b++),9)),g.g==(pt(),Pn)&&(bne(g,i),zo(y));Dt(n)},te(Nt,"LongEdgeJoiner",497),W(498,1,Mn,Hn),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B;if(Vt(n,"Edge splitting",1),e.c.c.length<=2){Dt(n);return}for(g=new Cn(e.c,0),y=(xt(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),16));g.b<g.d.Y();)for(l=y,y=(xt(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),16)),_=new V(l.a);_.a<_.c.c.length;)for(x=v(q(_),9),N=new V(x.f);N.a<N.c.c.length;)for(C=v(q(N),7),u=new V(C.e);u.a<u.c.c.length;)i=v(q(u),12),O=i.d,A=O.f.d,A!=l&&A!=y&&jte(i,(B=new lo(e),io(B,(pt(),Pn)),_e(B,(Ce(),_t),i),_e(B,(Fe(),Ct),(Zn(),fi)),Fr(B,y),B));Dt(n)},te(Nt,"LongEdgeSplitter",498),W(499,1,Mn,dr),E.sc=function(e,n){var i,u,l,g,y,x,_,C;for(Vt(n,"Node margin calculation",1),i=new kq((D2(),new E6(e,!0))),p2e(i),x=v(J(e,(Ce(),Qi)),15).a,l=new V(e.c);l.a<l.c.c.length;)for(u=v(q(l),16),y=new V(u.a);y.a<y.c.c.length;)g=v(q(y),9),L_e(g,x),_=g.e,C=v(J(g,U9),65),_.b=Xe(_.b,C.b),_.c=Xe(_.c,C.c),_.a=Xe(_.a,C.a),_.d=Xe(_.d,C.d);Dt(n)},te(Nt,tre,499),W(491,1,Mn,gi),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A;switch(Vt(n,"Node promotion heuristic",1),this.g=e,SCe(this),this.q=v(J(e,(Wt(),Om)),109),C=v(J(this.g,Z9),24).a,l=new ka,this.q.e){case 2:case 1:ld(this,l);break;case 3:for(this.q=(Nl(),xm),ld(this,l),x=0,y=new V(this.a);y.a<y.c.c.length;)g=v(q(y),24),x=ui(x,g.a);x>this.j&&(this.q=Rv,ld(this,l));break;case 4:for(this.q=(Nl(),xm),ld(this,l),_=0,u=new V(this.b);u.a<u.c.c.length;)i=qt(q(u)),_=Xe(_,(xr(i),i));_>this.k&&(this.q=Gv,ld(this,l));break;case 6:A=ur(m1(this.f.length*C/100)),ld(this,new Mq(A));break;case 5:N=ur(m1(this.d*C/100)),ld(this,new jq(N));break;default:ld(this,l)}a_e(this,e),Dt(n)},E.d=0,E.e=0,E.i=0,E.j=0,E.k=0,E.n=0,te(Nt,"NodePromotion",491),W(492,1,Mi,ka),E.B=function(e){return jn(),jn(),di},te(Nt,"NodePromotion/lambda$0$Type",492),W(493,1,Mi,Mq),E.B=function(e){return Y1e(this.a,e)},E.a=0,te(Nt,"NodePromotion/lambda$1$Type",493),W(494,1,Mi,jq),E.B=function(e){return V1e(this.a,e)},E.a=0,te(Nt,"NodePromotion/lambda$2$Type",494),W(109,17,{109:1,3:1,23:1,17:1},bf);var WL,Rv,JL,XL,Gv,e9,wm,xm,oae=Zt(Nt,"NodePromotionStrategy",109,yn,Gme),sae;W(500,1,Mn,no),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye;for(Vt(n,gre,1),B=v(J(e,(Fe(),Ff)),122),l=new V(e.c);l.a<l.c.c.length;)for(u=v(q(l),16),_=v(nr(u.a,Ae(Nr,Zi,9,u.a.c.length,0,1)),51),y=0,x=_.length;y<x;++y)if(g=_[y],g.g==(pt(),fr)){if(B==(Ou(),Z_))for(N=new V(g.f);N.a<N.c.c.length;)C=v(q(N),7),C.b.c.length==0||$2e(C),C.e.c.length==0||K2e(C);else if(qe(J(g,(Ce(),_t)),12))ee=v(J(g,_t),12),re=v(lr(g,(De(),ct)).mb().H(),7),oe=v(lr(g,at).mb().H(),7),ce=v(J(re,_t),7),de=v(J(oe,_t),7),qn(ee,de),An(ee,ce),ye=new tr(oe.f.i),ye.a=En(be(ve(Xt,1),Jt,10,0,[de.f.i,de.i,de.a])).a,vn(ee.a,ye),ye=new tr(re.f.i),ye.a=En(be(ve(Xt,1),Jt,10,0,[ce.f.i,ce.i,ce.a])).a,vn(ee.a,ye);else{if(g.f.c.length>=2){for(F=!0,A=new V(g.f),i=v(q(A),7);A.a<A.c.c.length;)if(O=i,i=v(q(A),7),!Fo(J(O,_t),J(i,_t))){F=!1;break}}else F=!1;for(N=new V(g.f);N.a<N.c.c.length;)C=v(q(N),7),C.b.c.length==0||h_e(C,F),C.e.c.length==0||d_e(C,F)}Fr(g,null)}Dt(n)},te(Nt,"NorthSouthPortPostprocessor",500),W(501,1,Mn,Bi),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye;for(Vt(n,gre,1),F=new Ye,ye=new Ye,C=new V(e.c);C.a<C.c.c.length;)for(_=v(q(C),16),re=-1,B=v(nr(_.a,Ae(Nr,Zi,9,_.a.c.length,0,1)),51),A=0,O=B.length;A<O;++A)if(N=B[A],++re,!!(N.g==(pt(),$n)&&Bs(v(J(N,(Fe(),Ct)),28)))){for(Ci(v(J(N,(Fe(),Ct)),28))||Zke(N),_e(N,(Ce(),$l),N),F.c=Ae(ht,et,1,0,4,1),ye.c=Ae(ht,et,1,0,4,1),i=new Ye,de=new ti,_j(de,lr(N,(De(),bt))),Ine(e,de,F,ye,i),x=re,g=new V(F);g.a<g.c.c.length;)u=v(q(g),9),od(u,x,_),++re,_e(u,$l,N),y=v(ut(u.f,0),7),ee=v(J(y,_t),7),Gt(Oe(Yt(J(ee,(Wt(),kC)))))||v(J(u,Td),20).ib(N);for(ou(de),ce=lr(N,kt).mb();ce.G();)oe=v(ce.H(),7),Cr(de,oe,de.a,de.a.a);for(Ine(e,de,ye,null,i),l=new V(ye);l.a<l.c.c.length;)u=v(q(l),9),od(u,++re,_),_e(u,$l,N),y=v(ut(u.f,0),7),ee=v(J(y,_t),7),Gt(Oe(Yt(J(ee,(Wt(),kC)))))||v(J(N,Td),20).ib(u);i.c.length==0||_e(N,M9,i)}Dt(n)},te(Nt,"NorthSouthPortPreprocessor",501),W(502,1,Gr,da),E.$b=function(e,n){var i,u;return i=e.g,u=n.g,i!=u?i.e-u.e:e.k==n.k?0:i==(De(),bt)?e.k-n.k:n.k-e.k},te(Nt,"NorthSouthPortPreprocessor/lambda$0$Type",502),W(504,1,Mn,Gn),E.sc=function(e,n){var i,u,l,g,y,x;for(Vt(n,"Removing partition constraint edges",1),u=new V(e.c);u.a<u.c.c.length;)for(i=v(q(u),16),g=new V(i.a);g.a<g.c.c.length;)for(l=v(q(g),9),x=new V(l.f);x.a<x.c.c.length;)y=v(q(x),7),Gt(Oe(Yt(J(y,(Ce(),Am)))))&&Sp(x);Dt(n)},te(Nt,"PartitionPostprocessor",504),W(505,1,Mn,Ri),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A;for(Vt(n,"Adding partition constraint edges",1),this.a=new Ye,x=new V(e.b);x.a<x.c.c.length;)g=v(q(x),9),l=v(J(g,(Fe(),WI)),24),$me(this,l.a).ib(g);for(u=0;u<this.a.c.length-1;u++)for(y=v(ut(this.a,u),20).mb();y.G();)for(g=v(y.H(),9),N=new Xn,_n(N,g),Qt(N,(De(),at)),_e(N,(Ce(),Am),(jn(),jn(),di)),C=v(ut(this.a,u+1),20).mb();C.G();)_=v(C.H(),9),A=new Xn,_n(A,_),Qt(A,ct),_e(A,Am,di),i=new Hs,_e(i,Am,di),_e(i,(Fe(),XI),St(20)),qn(i,N),An(i,A);this.a=null,Dt(n)},te(Nt,"PartitionPreprocessor",505),W(506,1,Mn,ro),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(Vt(n,"Port distribution",1),i=$ee(e),B=0,N=0,l=0,y=i.length;l<y;++l)for(u=i[l],_=0,C=u.length;_<C;++_)for(x=u[_],x.k=N++,O=new V(x.f);O.a<O.c.c.length;)A=v(q(O),7),A.k=B++;for(g=new V(e.c);g.a<g.c.c.length;)u=v(q(g),16),Ske(u);ee=v(J(e,(Ce(),Md)),154),F=Of(ee,1)!=0?new z2(Ae(Gm,Ky,26,B,12,1)):new h6(Ae(Gm,Ky,26,B,12,1)),Eee(F,i),Dt(n)},te(Nt,"PortDistributionProcessor",506),W(507,1,Mn,ac),E.sc=function(e,n){var i,u,l,g,y;for(Vt(n,"Port order processing",1),y=new Gi,u=new V(e.c);u.a<u.c.c.length;)for(i=v(q(u),16),g=new V(i.a);g.a<g.c.c.length;)l=v(q(g),9),Bs(v(J(l,(Fe(),Ct)),28))&&uo(l.f,y);Dt(n)},te(Nt,"PortListSorter",507),W(508,1,Gr,Gi),E.$b=function(e,n){return H_e(v(e,7),v(n,7))},te(Nt,"PortListSorter/PortComparator",508),W(509,1,Mn,Xo),E.sc=function(e,n){var i,u,l,g,y;for(Vt(n,"Port side processing",1),y=new V(e.b);y.a<y.c.c.length;)l=v(q(y),9),Jee(l);for(u=new V(e.c);u.a<u.c.c.length;)for(i=v(q(u),16),g=new V(i.a);g.a<g.c.c.length;)l=v(q(g),9),Jee(l);Dt(n)},te(Nt,"PortSideProcessor",509),W(510,1,Mn,np),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A;for(Vt(n,"Restoring reversed edges",1),x=new V(e.c);x.a<x.c.c.length;)for(y=v(q(x),16),C=new V(y.a);C.a<C.c.c.length;)for(_=v(q(C),9),A=new V(_.f);A.a<A.c.c.length;)for(N=v(q(A),7),g=v(nr(N.e,Ae(la,ia,12,N.e.c.length,0,1)),47),u=0,l=g.length;u<l;++u)i=g[u],Gt(Oe(Yt(J(i,(Ce(),wu)))))&&Il(i,!1);Dt(n)},te(Nt,"ReversedEdgeRestorer",510),W(511,1,Mn,ff),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn,Sn;if(Vt(n,"Sausage Folding",1),this.b=v(J(e,(Ce(),Qi)),15).a,this.a=this.b*v(J(e,(Wt(),hg)),15).a,F=Xxe(this,e),B=e.c.c.length,ee=Rxe(this,e),vt=B*ee,l=v(J(e,(Fe(),Zo)),59),l==(Jn(),Ka)||l==aa||l==qo?u=v(J(e,Nd),15).a:u=1/v(J(e,Nd),15).a,i=vt/F,u>i){Dt(n);return}lt=0,g=hs;do++lt,i=vt/lt/(F*lt),O=g,g=i-u<=0?0-(i-u):i-u;while(i>u);for(O<g&&--lt,Be=B/(1>lt?1:lt)|0,C=Be,ye=Be,Sn=!0;C<B;){A=v(ut(e.c,C),16),tt=!0,ce=null,de=null;e:for(tn=new V(A.a);tn.a<tn.c.c.length;)for(Et=v(q(tn),9),x=Ht(Dr(Et));Bt(x);){if(y=v(It(x),12),ce&&ce!=Et){tt=!1;break e}if(ce=Et,dt=y.c.f,de&&de!=dt){tt=!1;break e}de=dt}if(Sn&&tt&&(ye=0,Sn=!1),C!=ye){for(Ee=v(ut(e.c,ye),16),oe=new V(yl(A.a));oe.a<oe.c.c.length;)if(re=v(q(oe),9),od(re,Ee.a.c.length,Ee),ye==0)for(x=new V(yl(Dr(re)));x.a<x.c.c.length;)for(y=v(q(x),12),Il(y,!0),_e(e,L9,(jn(),jn(),di)),sEe(e,y),_=new Ye,aEe(e,y.c,y,_),Ve=new V(_);Ve.a<Ve.c.c.length;)ze=v(q(Ve),9),od(ze,Ee.a.c.length-1,Ee)}ye>=Be&&(Sn=!0),++ye,++C}for(N=new Cn(e.c,0);N.b<N.d.Y();)A=(xt(N.b<N.d.Y()),v(N.d.sb(N.c=N.b++),16)),A.a.c.length==0&&zo(N);Dt(n)},E.a=0,E.b=0,te(Nt,"SausageFolding",511),W(512,1,Mn,rp),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce;for(Vt(n,"Self-loop processing",1),i=new Ye,N=new V(e.c);N.a<N.c.c.length;){for(C=v(q(N),16),i.c=Ae(ht,et,1,0,4,1),O=new V(C.a);O.a<O.c.c.length;)for(A=v(q(O),9),F=new V(A.f);F.a<F.c.c.length;)for(B=v(q(F),7),_=v(nr(B.e,Ae(la,ia,12,B.e.c.length,0,1)),47),y=0,x=_.length;y<x;++y)g=_[y],g.c.f==g.d.f&&(ee=g.c,oe=g.d,re=ee.g,ce=oe.g,((re==(De(),bt)||re==kt)&&ce==ct||re==kt&&ce==bt||re==at&&ce!=at)&&Il(g,!1),re==at&&ce==ct?$e(i,kte(e,g,oe,ee)):re==ct&&ce==at&&$e(i,kte(e,g,ee,oe)));for(l=new V(i);l.a<l.c.c.length;)u=v(q(l),9),Fr(u,C)}Dt(n)},te(Nt,"SelfLoopProcessor",512),W(513,1,Mn,rl),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F;for(Vt(n,"Spline SelfLoop positioning",1),N=v(J(e,(Wt(),EC)),153),C=new V(e.c);C.a<C.c.c.length;)for(_=v(q(C),16),O=new V(_.a);O.a<O.c.c.length;){for(A=v(q(O),9),y=v(J(A,(Ce(),cC)),20),x=new Ye,l=y.mb();l.G();)i=v(l.H(),75),W2e(i),(B=j7(i.g),ba(B,i.i),B).a.Y()==0?x.c[x.c.length]=i:(hEe(i),i.g.a.Y()==0||aCe(i));switch(N.e){case 0:F=new tK(A),_we(F),ZCe(F,x);break;case 2:for(g=new V(x);g.a<g.c.c.length;)i=v(q(g),75),Hp(i,(Ni(),Xs),!0);break;case 1:for(u=new V(x);u.a<u.c.c.length;)i=v(q(u),75),Hp(i,(Ni(),Xs),!0)}switch(N.e){case 0:case 1:A_e(y);break;case 2:j_e(y)}}Dt(n)},te(Nt,"SplineSelfLoopPositioner",513),W(515,1,{},tK),te(Nt,"SplineSelfLoopPositioner/DistributedLoopSidesCalculator",515),W(516,1,{},Gte),E.d=!0,te(Nt,"SplineSelfLoopPositioner/DistributedLoopSidesCalculator/SortedLoopSides",516),W(116,1,{116:1},zZ),E.a=0,E.b=0,te(Nt,"SplineSelfLoopPositioner/DistributedLoopSidesCalculator/SortedLoopSides/SizeOfSide",116),W(318,1,{},jA);var ql;te(Nt,"SplineSelfLoopPositioner/PortReadder",318),W(514,1,Gr,K0),E.$b=function(e,n){return U0e(v(e,75),v(n,75))},te(Nt,"SplineSelfLoopPositioner/TextWidthComparator",514),W(517,1,Mn,b2),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce;for(Vt(n,"Spline SelfLoop pre-processing.",1),N=new ta,O=new V(e.b);O.a<O.c.c.length;){for(A=v(q(O),9),y2e(A),N.a.Q(),x=Ht(In(A));Bt(x);)g=v(It(x),12),xl(g)&&(B=N.a.db(g,N),B==null);for(y=(F=new un(N.a).a.bb().mb(),new hn(F));y.a.G();)g=(_=v(y.a.H(),21),v(_.yb(),12)),oe=g.c.g,ce=g.d.g,(oe==(De(),bt)&&(ce==at||ce==kt)||oe==at&&ce==kt||oe==kt&&ce==ct||oe==ct&&(ce==bt||ce==at))&&Il(g,!1);if(i=gke(N,A),_e(A,(Ce(),cC),i),!Ci(v(J(A,(Fe(),Ct)),28))){for(re=new Qr,l=new V(i);l.a<l.c.c.length;)u=v(q(l),75),ba(re,ak(u)),ba(re,u.i);for(C=new Cn(A.f,0);C.b<C.d.Y();)ee=(xt(C.b<C.d.Y()),v(C.d.sb(C.c=C.b++),7)),re.a.R(ee)&&zo(C)}}Dt(n)},te(Nt,"SplineSelfLoopPreProcessor",517),W(518,1,Mn,v2),E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn;for(Vt(n,"Spline SelfLoop routing",1),lt=new m2,O=new V(e.c);O.a<O.c.c.length;)for(A=v(q(O),16),ce=new V(A.a);ce.a<ce.c.c.length;){for(oe=v(q(ce),9),ye=oe.f,B=new ta,u=v(J(oe,(Ce(),cC)),20).mb();u.G();)i=v(u.H(),75),ba(B,i.a);for(Ee=new Ye,y=(de=new un(B.a).a.bb().mb(),new hn(de));y.a.G();){for(g=(x=v(y.a.H(),21),v(x.yb(),12)),Be=g.c,vt=g.d,N=new V(g.c.f.f),Ve=0,dt=0,_=0,C=0;_<2;)l=v(q(N),7),Be==l&&(Ve=C,++_),vt==l&&(dt=C,++_),++C;ze=v(J(g,Vv),60),tt=ze==(Ni(),$o)||ze==ws?ye.c.length-(dt-Ve<0?-(dt-Ve):dt-Ve)+1:dt-Ve<0?-(dt-Ve):dt-Ve,$e(Ee,new IW(Ve,dt,tt,ze,g))}if(uo(Ee,lt),ee=new Qr,F=new V(Ee),F.a<F.c.c.length){for(re=Nne(v(q(F),195),ee);F.a<F.c.c.length;)dj(re,Nne(v(q(F),195),ee));_e(oe,U9,(Et=new a1,tn=new Vee(oe.j.a,oe.j.b),Et.d=Xe(0,tn.d-re.d),Et.b=Xe(0,tn.b-re.b),Et.a=Xe(0,re.a-tn.a),Et.c=Xe(0,re.c-tn.c),Et))}}Dt(n)},te(Nt,"SplineSelfLoopRouter",518),W(91,1,{91:1},Up),E.w=function(){return this.b+": "+this.d+" -> "+this.a+" "+I1(this.c)},E.a=0,E.b=0,E.d=0,te(Nt,"SplineSelfLoopRouter/LoopPadding",91),W(521,1,To,dQ),E.D=function(e){return U2e(this,v(e,91))},E.a=0,E.c=0,te(Nt,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",521),W(520,1,Gr,y2),E.$b=function(e,n){return z0e(v(e,91),v(n,91))},te(Nt,"SplineSelfLoopRouter/LoopPadding/MarginComparator",520),W(196,1,To,up),E.D=function(e){return v(e,91).c==this.a},te(Nt,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",196),W(195,1,{195:1},IW),E.c=0,E.d=0,E.e=0,te(Nt,"SplineSelfLoopRouter/SelfLoopEdge",195),W(519,1,Gr,m2),E.$b=function(e,n){return f0e(v(e,195),v(n,195))},te(Nt,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",519),W(82,25,{25:1,82:1},bA),E.vc=function(){var e,n,i,u;for(n=gn(this.a,0);n.b!=n.d.c;)e=v(on(n),10),e.a=this.j.d;for(u=gn(this.c,0);u.b!=u.d.c;)i=v(on(u),10),i.a=this.j.d},E.wc=function(){return this.b},E.xc=function(){return this.e},E.w=function(){return Cc(new un(this.d.a))},E.b=0,E.e=0,te(Vo,"CLEdge",82),W(93,25,{25:1,93:1},Ute),E.vc=function(){this.b.i.a=this.j.d+this.b.e.b},E.wc=function(){return this.b.g==(pt(),Dn)?0:this.a},E.xc=function(){return this.b.g==(pt(),Dn)?0:this.c},E.w=function(){return Na(J(this.b,(Ce(),_t)))},E.a=0,E.c=0,te(Vo,"CLNode",93),W(175,17,{175:1,3:1,23:1,17:1},C6);var t9,AE,uae=Zt(Vo,"ConstraintCalculationStrategy",175,yn,rye),cae;W(125,17,{125:1,3:1,23:1,17:1},kp);var n9,r9,i9,a9,Hv,o9,lae=Zt(Vo,"GraphCompactionStrategy",125,yn,dme),fae;W(455,1,Mn,fK),E.sc=function(e,n){var i,u,l;if(u=v(J(e,(Wt(),Dm)),125),u!=(zp(),Hv)){switch(Vt(n,"Horizontal Compaction",1),this.a=e,l=new U$,i=new pA(g_e(l,e)),LZ(i,this.b),v(J(e,_C),175).e){case 1:IZ(i,hae);break;default:IZ(i,(Fx(),Zie))}switch(u.e){case 1:cu(i);break;case 2:cu(Zs(i,(Jn(),aa)));break;case 3:cu(fb(Zs(cu(i),(Jn(),aa))));break;case 4:cu(fb(U2(Zs(cu(i),(Jn(),aa)),new ko)));break;case 5:cu(u0e(i,dae))}Zs(i,(Jn(),Ka)),i.e=!0,I_e(l),Dt(n)}};var hae,dae;te(Vo,"HorizontalGraphCompactor",455),W(462,1,{},Aq),E.tc=function(e,n){var i,u,l;return qe(e,82)&&qe(n,82)&&!xk(pj(v(e,82).d,v(n,82).d))||(i=null,qe(e,93)&&(i=v(e,93).b),u=null,qe(n,93)&&(u=v(n,93).b),i&&i.g==(pt(),Dn)||u&&u.g==(pt(),Dn))?0:(l=v(J(this.a.a,(Ce(),Wl)),134),Cx(l,i?i.g:(pt(),Pn),u?u.g:(pt(),Pn)))},E.uc=function(e,n){return qe(e,82)&&qe(n,82)&&!xk(pj(v(e,82).d,v(n,82).d))?1:dn(e.xc(),n.xc())},te(Vo,"HorizontalGraphCompactor/1",462),W(456,317,{},pQ),E.Dc=function(e){var n,i,u;for(this.b=e,s_(this,new Ra,this.a),s_(this,new _o,this.a),n=ji,u=new V(this.b.a.b);u.a<u.c.c.length;)i=v(q(u),25),!(qe(i,93)&&v(i,93).b.g==(pt(),Dn))&&(n=dn(n,Oe(WZ(this.a,i))));n==ji&&(n=0),s_(this,new ru,new Lq(n))},te(Vo,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation",456),W(457,1,Mi,Iq),E.B=function(e){return WZ(this,e)},te(Vo,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$0$Type",457),W(458,1,To,Ra),E.D=function(e){return qe(v(e,25),82)},te(Vo,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$1$Type",458),W(459,1,To,_o),E.D=function(e){return qe(v(e,25),93)},te(Vo,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$2$Type",459),W(460,1,To,ru),E.D=function(e){return!0},te(Vo,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$3$Type",460),W(461,1,Mi,Lq),E.B=function(e){return this.a},E.a=0,te(Vo,"HorizontalGraphCompactor/EdgeAwareScanlineConstraintCalculation/lambda$4$Type",461),W(463,1,Mi,ko),E.B=function(e){return z6(),jn(),Bj(v(v(e,27).a,25).n,v(v(e,27).b,59))?Vn:di},te(Vo,"HorizontalGraphCompactor/lambda$0$Type",463),W(553,1,{},U$),E.c=!1,te(Vo,"LGraphToCGraphTransformer",553),W(552,1,{},ip),E.Cc=function(e){var n,i,u,l,g;for(this.a=e,this.d=new B2,this.c=Ae(s9,et,61,this.a.a.a.c.length,0,1),this.b=0,i=new V(this.a.a.a);i.a<i.c.c.length;)n=v(q(i),78),n.d=this.b,g=_b(t$(b6(new lp,this.b),n),this.d),this.c[this.b]=g,++this.b;for(HEe(this),LCe(this),Lke(this),NA(a7(this.d),new O1),l=new V(this.a.a.b);l.a<l.c.c.length;)u=v(q(l),25),u.r=this.c[u.f.d].e+u.g.a,u.j.d=u.r},E.b=0,te(Vo,"NetworkSimplexCompaction",552),W(142,1,{142:1,23:1},iv),E.F=function(e){return Bme(this,v(e,142))},E.c=!1,E.d=!0,E.i=0,E.j=0,E.k=0,E.n=0,te(Vo,"VerticalSegment",142),W(586,1,{},Z$),E.e=!1,te($a,"AllCrossingsCounter",586),W(339,1,{}),te($a,"BetweenLayerEdgeAllCrossingsCounter",339),W(613,1,{},Nee),E.c=0,E.e=0,E.i=0,te($a,"BetweenLayerEdgeTwoNodeCrossingsCounter",613),W(284,1,{284:1},qJ),E.w=function(){return"AdjacencyList [node="+this.d+", adjacencies= "+this.a+"]"},E.b=0,E.c=0,E.f=0,te($a,"BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList",284),W(128,1,{128:1,23:1},jK),E.F=function(e){return T1e(this,v(e,128))},E.w=function(){return"Adjacency [position="+this.c+", cardinality="+this.a+", currentCardinality="+this.b+"]"},E.a=0,E.b=0,E.c=0,te($a,"BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList/Adjacency",128),W(610,339,{},PZ),E.Gc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn,Sn,xi,ha,tu,Es,Ad,Yc,nh,Li,ki,Mr,ai,Cs,Ko,Vc,Ao,bg,Id,Io,Jl,Qu,Wu,Ps,Oi,Ss,rh,Ju,ih,qc,vg,MC,Joe;for(Ps=0,tn=0,ha=e.length;tn<ha;++tn)if(vt=e[tn],Ci(v(J(vt,(Fe(),Ct)),28)))for(ai=new V(vt.f);ai.a<ai.c.c.length;){for(Mr=v(q(ai),7),Ko=0,y=new V(Mr.e);y.a<y.c.c.length;)g=v(q(y),12),vt.d!=g.d.f.d&&++Ko;Ko>0&&(this.a[Mr.k]=Ps++)}else{for(Es=0,ai=new V(vt.f);ai.a<ai.c.c.length;){for(Mr=v(q(ai),7),y=new V(Mr.e);y.a<y.c.c.length;)g=v(q(y),12),vt.d!=g.d.f.d&&++Es;this.a[Mr.k]=Ps}Es>0&&++Ps}for(ih=0,Sn=0,tu=n.length;Sn<tu;++Sn)if(vt=n[Sn],Ci(v(J(vt,(Fe(),Ct)),28))){for(Ad=0,ai=new V(vt.f);ai.a<ai.c.c.length&&(Mr=v(q(ai),7),Mr.g==(De(),bt));)for(y=new V(Mr.b);y.a<y.c.c.length;)if(g=v(q(y),12),vt.d!=g.c.f.d){++Ad;break}for(nh=0,Vc=new Cn(vt.f,vt.f.c.length);Vc.b>0;){for(Mr=(xt(Vc.b>0),v(Vc.a.sb(Vc.c=--Vc.b),7)),Ko=0,y=new V(Mr.b);y.a<y.c.c.length;)g=v(q(y),12),vt.d!=g.c.f.d&&++Ko;Ko>0&&(Mr.g==(De(),bt)?(this.a[Mr.k]=ih,++ih):(this.a[Mr.k]=ih+Ad+nh,++nh))}ih+=nh}else{for(Es=0,ai=new V(vt.f);ai.a<ai.c.c.length;){for(Mr=v(q(ai),7),y=new V(Mr.b);y.a<y.c.c.length;)g=v(q(y),12),vt.d!=g.c.f.d&&++Es;this.a[Mr.k]=ih}Es>0&&++ih}for(Cs=new en,ee=new Qr,Et=0,xi=e.length;Et<xi;++Et)for(vt=e[Et],rh=new V(vt.f);rh.a<rh.c.c.length;)for(Ss=v(q(rh),7),y=new V(Ss.e);y.a<y.c.c.length;)if(g=v(q(y),12),vg=g.d,vt.d!=vg.f.d)if(Oi=v(bi(vi(Cs.d,Ss)),204),qc=v(bi(vi(Cs.d,vg)),204),!Oi&&!qc)F=new IK,ee.a.db(F,ee),vn(F.a,g),vn(F.e,Ss),va(Cs.d,Ss,F),vn(F.e,vg),va(Cs.d,vg,F);else if(!Oi)vn(qc.a,g),vn(qc.e,Ss),va(Cs.d,Ss,qc);else if(!qc)vn(Oi.a,g),vn(Oi.e,vg),va(Cs.d,vg,Oi);else if(Oi==qc)vn(Oi.a,g);else{for(vn(Oi.a,g),ki=gn(qc.e,0);ki.b!=ki.d.c;)Li=v(on(ki),7),va(Cs.d,Li,Oi);ba(Oi.a,qc.a),ba(Oi.e,qc.e),ee.a.eb(qc)!=null}for(re=v(Kk(ee,Ae(m3e,{675:1,3:1,5:1,6:1},204,ee.a.Y(),0,1)),675),dt=e[0].d,Wu=n[0].d,O=0,B=re.length;O<B;++O)for(A=re[O],A.f=Ps,A.g=ih,ai=gn(A.e,0);ai.b!=ai.d.c;)Mr=v(on(ai),7),Ao=this.a[Mr.k],Mr.f.d==dt?(Ao<A.f&&(A.f=Ao,A.b=hc(Mr)),Ao>A.c&&(A.c=Ao)):Mr.f.d==Wu&&(Ao<A.g&&(A.g=Ao),Ao>A.d&&(A.d=Ao));for(ad(re,0,re.length,(vf(),vf(),th)),Ju=Ae(ar,rr,26,re.length,12,1),i=Ae(ar,rr,26,ih+1,12,1),ce=0;ce<re.length;ce++)Ju[ce]=re[ce].g,i[Ju[ce]]=1;for(l=0,de=0;de<i.length;de++)i[de]==1?i[de]=l:--l;for(bg=0,ye=0;ye<Ju.length;ye++)Ju[ye]+=i[Ju[ye]],bg=ui(bg,Ju[ye]+1);for(N=1;N<bg;)N*=2;for(Joe=2*N-1,N-=1,MC=Ae(ar,rr,26,Joe,12,1),u=0,_=0,C=Ju.length;_<C;++_)for(x=Ju[_],ze=x+N,++MC[ze];ze>0;)ze%2>0&&(u+=MC[ze+1]),ze=(ze-1)/2|0,++MC[ze];for(lt=Ae(pae,et,158,re.length*2,0,1),Ee=0;Ee<re.length;Ee++)lt[2*Ee]=new W1(re[Ee],re[Ee].f,re[Ee].c,0),lt[2*Ee+1]=new W1(re[Ee],re[Ee].c,re[Ee].f,1);for(ad(lt,0,lt.length,th),Yc=0,Be=0,tt=lt.length;Be<tt;++Be)switch(Ve=lt[Be],Ve.d){case 0:++Yc;break;case 1:--Yc,u+=Yc}for(Qu=Ae(pae,et,158,re.length*2,0,1),oe=0;oe<re.length;oe++)Qu[2*oe]=new W1(re[oe],re[oe].g,re[oe].d,0),Qu[2*oe+1]=new W1(re[oe],re[oe].d,re[oe].g,1);for(ad(Qu,0,Qu.length,th),Yc=0,Io=0,Jl=Qu.length;Io<Jl;++Io)switch(Id=Qu[Io],Id.d){case 0:++Yc;break;case 1:--Yc,u+=Yc}return u},te($a,"BetweenLayerHyperedgeAllCrossingsCounter",610),W(204,1,{204:1,23:1},IK),E.F=function(e){return _2e(this,v(e,204))},E.b=0,E.c=0,E.d=0,E.f=0,E.g=0;var m3e=te($a,"BetweenLayerHyperedgeAllCrossingsCounter/Hyperedge",204);W(158,1,{158:1,23:1},W1),E.F=function(e){return hke(this,v(e,158))},E.b=0,E.c=0,E.d=0;var pae=te($a,"BetweenLayerHyperedgeAllCrossingsCounter/HyperedgeCorner",158);W(611,339,{},SZ),E.Gc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be;for(Be=0,g=0,x=e[0].d,ye=n[0].d,N=0,O=n.length;N<O;++N)if(_=n[N],Ci(v(J(_,(Fe(),Ct)),28))){for(F=0,oe=new V(_.f);oe.a<oe.c.c.length&&(re=v(q(oe),7),re.g==(De(),bt));)for(l=new V(re.b);l.a<l.c.c.length;)if(u=v(q(l),12),u.c.f.d==x){++F;break}for(ee=0,de=new Cn(_.f,_.f.c.length);de.b>0;){for(re=(xt(de.b>0),v(de.a.sb(de.c=--de.b),7)),ce=0,l=new V(re.b);l.a<l.c.c.length;)u=v(q(l),12),u.c.f.d==x&&++ce;ce>0&&(re.g==(De(),bt)?(this.a[re.k]=Be,++Be):(this.a[re.k]=Be+F+ee,++ee),g+=ce)}Be+=ee}else{for(B=0,oe=new V(_.f);oe.a<oe.c.c.length;){for(re=v(q(oe),7),l=new V(re.b);l.a<l.c.c.length;)u=v(q(l),12),u.c.f.d==x&&++B;this.a[re.k]=Be}B>0&&(++Be,g+=B)}for(Ee=Ae(ar,rr,26,g,12,1),y=0,C=0,A=e.length;C<A;++C)if(_=e[C],Ci(v(J(_,(Fe(),Ct)),28)))for(oe=new V(_.f);oe.a<oe.c.c.length;)for(re=v(q(oe),7),ze=y,l=new V(re.e);l.a<l.c.c.length;)u=v(q(l),12),Ve=u.d,Ve.f.d==ye&&eX(Ee,ze,y++,this.a[Ve.k]);else for(ze=y,oe=new V(_.f);oe.a<oe.c.c.length;)for(re=v(q(oe),7),l=new V(re.e);l.a<l.c.c.length;)u=v(q(l),12),Ve=u.d,Ve.f.d==ye&&eX(Ee,ze,y++,this.a[Ve.k]);return i=Fxe(Be,g,Ee),i},te($a,"BetweenLayerStraightEdgeAllCrossingsCounter",611),W(338,1,{},oA),E.b=0,E.e=!1,te($a,"CrossingMatrixFiller",338),W(447,1,Mn,w2),E.sc=function(e,n){var i,u,l,g;if(Vt(n,"Greedy switch crossing reduction",1),this.e=v(J(e,(Wt(),yC)),110),i=e.c.c.length,i<2||this.e==(uv(),tC)){Dt(n);return}mEe(this,e),this.e.b?(this.e.a?Oj(this):ij(this),u=axe(this),l=this.e.a?this.c:Jk(this.b,this.d),this.i=!this.i,this.d=this.g,this.e.a?Oj(this):ij(this),g=this.e.a?this.c:Jk(this.b,this.d),l<=g&&kj(this,u)):this.e.a?Oj(this):ij(this),cke(this,this.a),Dt(n)},E.c=0,E.i=!0,te($a,"GreedySwitchProcessor",447),W(340,1,{},Rj),te($a,"InLayerEdgeAllCrossingsCounter",340),W(614,340,{},ZK),E.b=0,E.d=0,te($a,"InLayerEdgeTwoNodeCrossingCounter",614),W(226,1,{226:1,23:1},I7),E.F=function(e){return F2e(this,v(e,226))},E.w=function(){return"ComparableEdgeAndPort [port="+this.b+", edge="+this.a+", portPosition="+this.c+"]"},E.c=0,te($a,"InLayerEdgeTwoNodeCrossingCounter/ComparableEdgeAndPort",226),W(612,1,{},yee),E.e=!0,E.f=0,E.g=0,E.k=!1,te($a,"NorthSouthEdgeAllCrossingsCounter",612),W(615,1,{},WJ),E.b=0,E.d=0,E.e=!1,te($a,"NorthSouthEdgeNeighbouringNodeCrossingsCounter",615),W(143,1,Pc,fl),E.mb=function(){return Tl(this)},E.b=0,te($a,"PortIterable",143),W(344,1,pr,F7),E.H=function(){return v(LQ(this.a),7)},E.G=function(){return this.a.b>0},E.I=function(){throw new er},te($a,"PortIterable/1",344),W(336,1,{},nA),te($a,"SwitchDecider",336),W(89,1,{89:1},ap),E.w=function(){return"NEdge[id="+this.b+" w="+this.f+" d="+this.a+"]"},E.a=1,E.b=0,E.e=!1,E.f=0;var gae=te(Wp,"NEdge",89);W(157,1,{},hf),te(Wp,"NEdge/NEdgeBuilder",157),W(278,1,{},B2),te(Wp,"NGraph",278),W(61,1,{61:1},BW),E.b=0,E.d=-1,E.e=0,E.i=-1,E.j=!1;var s9=te(Wp,"NNode",61);W(333,13,gI,JM),E.rb=function(e,n){++this.d,kl(e,this.c.length),mb(this.c,e,n)},E.ib=function(e){return bc(this,e)},E.jb=function(e){return++this.d,Bn(this,e)},E.Q=function(){++this.d,this.c=Ae(ht,et,1,0,4,1)},E.vb=function(e){return++this.d,Nf(this,e)},E.nb=function(e){return oK(this,e)},te(Wp,"NNode/ChangeAwareArrayList",333),W(199,1,{},lp),te(Wp,"NNode/NNodeBuilder",199),W(595,1,{},x2),E.a=!1,E.f=Sr,E.j=0,te(Wp,"NetworkSimplex",595),W(193,17,{180:1,193:1,3:1,23:1,17:1},P6),E.rc=function(){switch(this.e){case 0:return new aQ;case 1:return new $V;default:throw new wn("No implementation is available for the cycle breaker "+(this.d!=null?this.d:""+this.e))}};var IE,u9,bae=Zt(yI,"CycleBreakingStrategy",193,yn,iye),vae;W(539,1,ds,aQ),E.qc=function(e){return yae},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn,Sn;for(Vt(n,"Greedy cycle removal",1),oe=e.b,Sn=oe.c.length,this.a=Ae(ar,rr,26,Sn,12,1),this.c=Ae(ar,rr,26,Sn,12,1),this.b=Ae(ar,rr,26,Sn,12,1),x=0,ee=new V(oe);ee.a<ee.c.c.length;){for(B=v(q(ee),9),B.k=x,ze=new V(B.f);ze.a<ze.c.c.length;){for(ye=v(q(ze),7),g=new V(ye.b);g.a<g.c.c.length;)i=v(q(g),12),i.c.f!=B&&(tt=v(J(i,(Ce(),vo)),24).a,this.a[x]+=tt>0?tt+1:1);for(l=new V(ye.e);l.a<l.c.c.length;)i=v(q(l),12),i.d.f!=B&&(tt=v(J(i,(Ce(),vo)),24).a,this.c[x]+=tt>0?tt+1:1)}this.c[x]==0?vn(this.d,B):this.a[x]==0&&vn(this.e,B),++x}for(O=-1,A=1,C=new Ye,lt=v(J(e,(Ce(),Md)),154);Sn>0;){for(;this.d.b!=0;)vt=v(l7(this.d),9),this.b[vt.k]=O--,MA(this,vt),--Sn;for(;this.e.b!=0;)Et=v(l7(this.e),9),this.b[Et.k]=A++,MA(this,Et),--Sn;if(Sn>0){for(N=hu,re=new V(oe);re.a<re.c.c.length;)B=v(q(re),9),this.b[B.k]==0&&(ce=this.c[B.k]-this.a[B.k],ce>=N&&(ce>N&&(C.c=Ae(ht,et,1,0,4,1),N=ce),C.c[C.c.length]=B));_=v(ut(C,qj(lt,C.c.length)),9),this.b[_.k]=A++,MA(this,_),--Sn}}for(dt=oe.c.length+1,x=0;x<oe.c.length;x++)this.b[x]<0&&(this.b[x]+=dt);for(F=new V(oe);F.a<F.c.c.length;)for(B=v(q(F),9),Be=v(nr(B.f,Ae(tae,hre,7,B.f.c.length,0,1)),346),Ee=0,Ve=Be.length;Ee<Ve;++Ee)for(ye=Be[Ee],de=v(nr(ye.e,Ae(la,ia,12,ye.e.c.length,0,1)),47),u=0,y=de.length;u<y;++u)i=de[u],tn=i.d.f.k,this.b[B.k]>this.b[tn]&&(Il(i,!0),_e(e,L9,(jn(),jn(),di)));this.a=null,this.c=null,this.b=null,ou(this.e),ou(this.d),Dt(n)};var yae;te(yI,"GreedyCycleBreaker",539),W(540,1,ds,$V),E.qc=function(e){return mae},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(Vt(n,"Interactive cycle breaking",1),N=new Ye,O=new V(e.b);O.a<O.c.c.length;)for(A=v(q(O),9),A.k=1,B=Xj(A).a,C=Vs(A,(vr(),hi)).mb();C.G();)for(_=v(C.H(),7),l=new V(_.e);l.a<l.c.c.length;)i=v(q(l),12),F=i.d.f,F!=A&&(ee=Xj(F).a,ee<B&&(N.c[N.c.length]=i));for(g=new V(N);g.a<g.c.c.length;)i=v(q(g),12),Il(i,!0);for(N.c=Ae(ht,et,1,0,4,1),x=new V(e.b);x.a<x.c.c.length;)y=v(q(x),9),y.k>0&&Yee(this,y,N);for(u=new V(N);u.a<u.c.c.length;)i=v(q(u),12),Il(i,!0);N.c=Ae(ht,et,1,0,4,1),Dt(n)};var mae;te(yI,"InteractiveCycleBreaker",540),W(543,1,ds,Ch),E.qc=function(e){return Si(gc(new Yn,(Br(),CE)),vm)},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee;for(Vt(n,"Interactive node layering",1),i=new Ye,A=new V(e.b);A.a<A.c.c.length;){for(C=v(q(A),9),x=C.i.a,y=x+C.j.a,y=x+1>y?x+1:y,ee=new Cn(i,0),u=null;ee.b<ee.d.Y();)if(B=(xt(ee.b<ee.d.Y()),v(ee.d.sb(ee.c=ee.b++),239)),B.c>=y){xt(ee.b>0),ee.a.sb(ee.c=--ee.b);break}else B.a>x&&(u?(Bn(u.b,B.b),u.a=Xe(u.a,B.a),zo(ee)):($e(B.b,C),B.c=dn(B.c,x),B.a=Xe(B.a,y),u=B));u||(u=new nZ,u.c=x,u.a=y,ju(ee,u),$e(u.b,C))}for(g=e.c,_=0,F=new V(i);F.a<F.c.c.length;)for(B=v(q(F),239),l=new bl(e),l.k=_++,g.c[g.c.length]=l,O=new V(B.b);O.a<O.c.c.length;)C=v(q(O),9),Fr(C,l),C.k=0;for(N=new V(e.b);N.a<N.c.c.length;)C=v(q(N),9),C.k==0&&Bte(this,C,e);for(;(On(0,g.c.length),v(g.c[0],16)).a.c.length==0;)On(0,g.c.length),g.c.splice(0,1);e.b.c=Ae(ht,et,1,0,4,1),Dt(n)},te(Qy,"InteractiveLayerer",543),W(239,1,{239:1},nZ),E.a=0,E.c=0,te(Qy,"InteractiveLayerer/LayerSpan",239),W(173,17,{180:1,173:1,3:1,23:1,17:1},ax),E.rc=function(){switch(this.e){case 0:return new rK;case 1:return new ZV;case 2:return new Ch;default:throw new wn("No implementation is available for the layerer "+(this.d!=null?this.d:""+this.e))}};var c9,l9,LE,wae=Zt(Qy,"LayeringStrategy",173,yn,vye),xae;W(542,1,ds,ZV),E.qc=function(e){var n;return n=G1(kae),Gt(Oe(Yt(J(e,(Wt(),vC)))))||ot(J(e,pg))===ot((Lu(),gg))?Lr(n,_ae):ot(J(e,pg))===ot((Lu(),$v))&&Lr(n,Eae),Gt(Oe(Yt(J(e,K9))))&&Fa(n,(Br(),YL)),n},E.sc=function(e,n){var i,u,l,g,y;for(Vt(n,"Longest path layering",1),this.a=e,y=this.a.b,this.b=Ae(ar,rr,26,y.c.length,12,1),i=0,g=new V(y);g.a<g.c.c.length;)u=v(q(g),9),u.k=i,this.b[i]=-1,++i;for(l=new V(y);l.a<l.c.c.length;)u=v(q(l),9),yte(this,u);y.c=Ae(ht,et,1,0,4,1),this.a=null,this.b=null,Dt(n)};var kae,_ae,Eae;te(Qy,"LongestPathLayerer",542),W(541,1,ds,rK),E.qc=function(e){var n;return n=G1(Cae),Gt(Oe(Yt(J(e,(Wt(),vC)))))||ot(J(e,pg))===ot((Lu(),gg))?(Lr(n,Pae),this.d=(Lu(),gg)):ot(J(e,pg))===ot((Lu(),$v))&&(Lr(n,Sae),this.d=$v),n},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A;if(Vt(n,"Network simplex layering",1),this.b=e,A=v(J(e,(Wt(),dg)),24).a*4,N=this.b.b,N.c.length<1){Dt(n);return}for(u=gn(O_e(this,N),0);u.b!=u.d.c;)for(i=v(on(u),20),g=A*ur(D$(i.Y())),l=M_e(i),NA(OZ(c0e(DZ(a7(l),g),this.b),this.d==(Lu(),gg)),Mf(n,1)),x=this.b.c,C=new V(l.a);C.a<C.c.c.length;){for(_=v(q(C),61);x.c.length<=_.e;)hl(x,x.c.length,new bl(this.b));y=v(_.f,9),Fr(y,v(ut(x,_.e),16))}N.c=Ae(ht,et,1,0,4,1),this.a=null,this.b=null,this.c=null,Dt(n)};var Cae,Pae,Sae;te(Qy,"NetworkSimplexLayerer",541),W(326,1,{}),te(Mc,"AbstractPortDistributor",326),W(558,1,Gr,Dq),E.$b=function(e,n){return T2e(this,v(e,7),v(n,7))},te(Mc,"AbstractPortDistributor/1",558),W(564,1,{},hJ),te(Mc,"BarycenterHeuristic",564),W(272,1,{272:1},Gq),E.b=0,E.d=0,E.e=!1;var Nae=te(Mc,"BarycenterHeuristic/BarycenterState",272);W(565,1,Gr,Bq),E.$b=function(e,n){return Sxe(this.a,e,n)},te(Mc,"BarycenterHeuristic/lambda$0$Type",565),W(192,17,{180:1,192:1,3:1,23:1,17:1},S6),E.rc=function(){switch(this.e){case 0:return new XZ;case 1:return new XV;default:throw new wn("No implementation is available for the crossing minimizer "+(this.d!=null?this.d:""+this.e))}};var OE,DE,Tae=Zt(Mc,"CrossingMinimizationStrategy",192,yn,aye),Mae;W(526,1,ds,XV),E.qc=function(e){var n;return n=G1(jae),v(J(e,(Ce(),Xr)),18).kb((_r(),Qf))&&Si(n,(Br(),TE)),n},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F;for(Vt(n,"Interactive crossing minimization",1),O=0,l=new V(e.c);l.a<l.c.c.length;){for(u=v(q(l),16),i=0,C=0,_=new V(u.a);_.a<_.c.c.length;)for(y=v(q(_),9),y.i.a>0&&(i+=y.i.a+y.j.a/2,++C),A=new V(y.f);A.a<A.c.c.length;)N=v(q(A),7),N.k=O++;for(i/=C,F=Ae(fa,Ti,26,u.a.c.length,12,1),g=0,x=new V(u.a);x.a<x.c.c.length;)y=v(q(x),9),y.k=g++,F[y.k]=ZEe(y,i),y.g==(pt(),Pn)&&_e(y,(Ce(),R9),F[y.k]);uo(u.a,new Rq(F))}B=new z2(Ae(Gm,Ky,26,O,12,1)),Eee(B,$ee(e)),Dt(n)};var jae;te(Mc,"InteractiveCrossingMinimizer",526),W(527,1,Gr,Rq),E.$b=function(e,n){return xxe(this,v(e,9),v(n,9))},te(Mc,"InteractiveCrossingMinimizer/1",527),W(525,1,ds,XZ),E.qc=function(e){var n;return n=G1(Aae),v(J(e,(Ce(),Xr)),18).kb((_r(),Qf))&&Si(n,(Br(),TE)),n},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et;if(Vt(n,"Layer sweep crossing minimization",1),dt=v(J(e,(Ce(),Md)),154),re=e.c.c.length,re<2){Dt(n);return}for($Ce(this,e),u=Sr,Et=v(J(e,(Wt(),dg)),24).a,i=Ae(Nae,Rr,671,e.c.c.length,0,2),O=0,ee=new V(e.c);ee.a<ee.c.c.length;){for(F=v(q(ee),16),F.k=O,i[O]=Ae(Nae,{671:1,3:1,5:1,6:1},272,F.a.c.length,0,1),B=0,Ee=new V(F.a);Ee.a<Ee.c.c.length;)ye=v(q(Ee),9),ye.k=B,i[O][B]=new Gq(ye),++B;++O}for(l=new nte(i,this.g),g=new hJ(i,l,dt,this.j),Ve=new z2(this.j),de=new h6(this.j),vt=0;vt<Et&&u>0;vt++){N=Of(dt,1)!=0,C=N?0:re-1,_=this.b[C],tt=Of(dt,1)!=0?Ve:de,Dj(_,g,N,!1,!0),y=Sr,x=!0;do{if(yj(this.b,this.k),lt=y,y=0,y+=oj(this.f,_,C),N){for(oe=1;oe<re;oe++)A=this.b[oe],J7(tt,_,(vr(),hi)),Dj(A,g,!0,!x,!1),y+=oj(this.f,A,oe),this.d[oe]||this.c[oe-1]?y+=Bne(this.e,_,A):y+=One(this.i,_,A),_=A;C=re-1}else{for(oe=re-2;oe>=0;oe--)A=this.b[oe],J7(tt,_,(vr(),Wi)),Dj(A,g,!1,!x,!1),y+=oj(this.f,A,oe),this.c[oe]||this.d[oe+1]?y+=Bne(this.e,A,_):y+=One(this.i,A,_),_=A;C=0}x=!1,N=!N}while(y<lt&&y>0);(y<u||lt<u)&&(y<=lt?(yj(this.b,this.a),u=y):(yj(this.k,this.a),u=lt))}for(ce=new Cn(e.c,0);ce.b<ce.d.Y();)for(F=(xt(ce.b<ce.d.Y()),v(ce.d.sb(ce.c=ce.b++),16)),Be=this.a[ce.b-1],ze=new Cn(F.a,0);ze.b<ze.d.Y();)xt(ze.b<ze.d.Y()),ze.d.sb(ze.c=ze.b++),o7(ze,Be[ze.b-1]);this.j=null,this.a=null,this.b=null,this.k=null,this.i=null,this.e=null,this.c=null,this.d=null,N7(this.g),Dt(n)};var Aae;te(Mc,"LayerSweepCrossingMinimizer",525),W(327,326,{},h6),E.Hc=function(e,n,i){var u,l,g,y,x,_,C,N,A,O,B,F;if(O=this.a,Ci(v(J(e,(Fe(),Ct)),28)))switch(i.e){case 1:{for(l=0,x=0,A=new V(e.f);A.a<A.c.c.length;)C=v(q(A),7),C.b.c.length!=0&&(++l,C.g==(De(),bt)&&++x);for(_=n+x,F=n+l,N=Vs(e,(vr(),Wi)).mb();N.G();)C=v(N.H(),7),C.g==(De(),bt)?(O[C.k]=_,--_):(O[C.k]=F,--F);return l}case 2:{for(B=0,N=Vs(e,(vr(),hi)).mb();N.G();)C=v(N.H(),7),++B,O[C.k]=n+B;return B}default:throw new fp}else{for(y=4,g=0,A=Vs(e,i).mb();A.G();)C=v(A.H(),7),u=wte(i,C.g),y=y<u-1?y:u-1,g=g>u?g:u;if(g>y){for(N=Vs(e,i).mb();N.G();)C=v(N.H(),7),O[C.k]=n+wte(i,C.g)-y;return g-y}return 0}},te(Mc,"LayerTotalPortDistributor",327),W(274,326,{},z2),E.Hc=function(e,n,i){var u,l,g,y,x,_,C,N,A,O,B;if(A=this.a,Ci(v(J(e,(Fe(),Ct)),28)))switch(i.e){case 1:{for(l=0,g=0,N=new V(e.f);N.a<N.c.c.length;)_=v(q(N),7),_.b.c.length!=0&&(++l,_.g==(De(),bt)&&++g);for(u=1/(l+1),y=n+g*u,B=n+1-u,C=Vs(e,(vr(),Wi)).mb();C.G();)_=v(C.H(),7),_.g==(De(),bt)?(A[_.k]=y,y-=u):(A[_.k]=B,B-=u);break}case 2:{for(x=0,N=new V(e.f);N.a<N.c.c.length;)_=v(q(N),7),_.e.c.length==0||++x;for(u=1/(x+1),O=n+u,C=Vs(e,(vr(),hi)).mb();C.G();)_=v(C.H(),7),A[_.k]=O,O+=u;break}default:throw new wn(mI)}else for(C=Vs(e,i).mb();C.G();)_=v(C.H(),7),A[_.k]=n+zke(i,_.g);return 1},te(Mc,"NodeRelativePortDistributor",274),W(566,1,{},nte),te(yre,"ForsterConstraintResolver",566),W(102,1,{102:1},JQ,vne),E.w=function(){var e,n;for(n=new bp,n.a+="[",e=0;e<this.d.length;e++)Co(n,uW(this.d[e])),Ha(this.g,this.d[0]).a!=null&&Co(Co((n.a+="<",n),i$(Oe(Ha(this.g,this.d[0]).a))),">"),e<this.d.length-1&&(n.a+=", ");return n.a+="]",n.a},E.a=0,E.c=0,E.f=0;var Iae=te(yre,"ForsterConstraintResolver/ConstraintGroup",102);W(331,1,{}),te(vv,"AbstractCrossingsCounter",331),W(568,331,{},wQ),te(vv,"BarthJuengerMutzelCrossingsCounter",568),W(567,331,{},xQ),te(vv,"HyperedgeCrossingsCounter",567),W(197,1,{197:1,23:1},GK),E.F=function(e){return R2e(this,v(e,197))},E.b=0,E.c=0,E.e=0,E.f=0;var w3e=te(vv,"HyperedgeCrossingsCounter/Hyperedge",197);W(156,1,{156:1,23:1},J1),E.F=function(e){return Ike(this,v(e,156))},E.b=0,E.c=0;var Lae=te(vv,"HyperedgeCrossingsCounter/HyperedgeCorner",156);W(242,17,{242:1,3:1,23:1,17:1},j6);var zv,Uv,x3e=Zt(vv,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",242,yn,Pye);W(545,1,ds,eq),E.qc=function(e){return v(J(e,(Ce(),Xr)),18).kb((_r(),ks))?Oae:null},E.sc=function(e,n){var i,u;for(Vt(n,"Interactive node placement",1),this.a=v(J(e,(Ce(),Wl)),134),u=new V(e.c);u.a<u.c.c.length;)i=v(q(u),16),e_e(this,i);Dt(n)};var Oae;te(yv,"InteractiveNodePlacer",545),W(546,1,ds,tq),E.qc=function(e){return v(J(e,(Ce(),Xr)),18).kb((_r(),ks))?Dae:null},E.sc=function(e,n){Vt(n,"Linear segments node placement",1),this.b=v(J(e,(Ce(),Wl)),134),t3e(this,e),rEe(this,e),jEe(this,e),UCe(this),this.a=null,this.b=null,Dt(n)};var Dae,km,_m;te(yv,"LinearSegmentsNodePlacer",546),W(111,1,{111:1,23:1},e6),E.F=function(e){return y0e(this,v(e,111))},E.t=function(e){var n;return qe(e,111)?(n=v(e,111),this.b==n.b):!1},E.v=function(){return this.b},E.w=function(){return"ls"+Cc(this.f)},E.a=0,E.b=0,E.c=-1,E.d=-1,E.i=0;var Bae=te(yv,"LinearSegmentsNodePlacer/LinearSegment",111);W(548,1,ds,nq),E.qc=function(e){return v(J(e,(Ce(),Xr)),18).kb((_r(),ks))?Rae:null},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn,Sn;for(Et=v(J(e,(Ce(),Wl)),134),ye=(Fn(),new en),de=0,l=new B2,_=new V(e.c);_.a<_.c.c.length;)for(y=v(q(_),16),lt=null,tt=null,B=new V(y.a);B.a<B.c.c.length;)O=v(q(B),9),++de,ce=_b(new lp,l),ce.f=O,va(ye.d,O,ce),O.e.d=m1(O.e.d),tt&&(oe=new ap,oe.f=0,oe.a=ur(B6(lt.e.d+lt.j.b+lt.e.a+Nb(Et,v(tt.f,9),O))),oe.c=tt,oe.d=ce,bc(tt.g,oe),bc(ce.c,oe)),lt=O,tt=ce;for(C=new V(e.c);C.a<C.c.c.length;)for(y=v(q(C),16),B=new V(y.a);B.a<B.c.c.length;)for(O=v(q(B),9),Ve=new V(O.f);Ve.a<Ve.c.c.length;)ze=v(q(Ve),7),Sn=ze.i.b+ze.a.b,Sn!=Math.floor(Sn)&&(Ee=Sn-nme(uwe(Math.round(Sn))),ze.i.b-=Ee);for(x=new V(e.c);x.a<x.c.c.length;)for(y=v(q(x),16),B=new V(y.a);B.a<B.c.c.length;)for(O=v(q(B),9),A=Ht(In(O));Bt(A);)N=v(It(A),12),!xl(N)&&N.d.f.d!=y&&(vt=N.c.f.e.d+N.c.i.b+N.c.a.b,tn=N.d.f.e.d+N.d.i.b+N.d.a.b,i=tn-vt,Be=ur(i),u=_b(new lp,l),F=new ap,F.f=gee(N),F.a=Be>0?Be:0,F.c=u,F.d=v(ln(ye,N.c.f),61),bc(F.c.g,F),bc(F.d.c,F),dt=new ap,dt.f=gee(N),dt.a=Be<0?-Be:0,dt.c=u,dt.d=v(ln(ye,N.d.f),61),bc(dt.c.g,dt),bc(dt.d.c,dt));for(g=v(J(e,(Wt(),dg)),24).a*ur(Math.sqrt(de)),NA(OZ(DZ(a7(l),g),!1),Mf(n,1)),re=new V(l.a);re.a<re.c.c.length;)ee=v(q(re),61),ee.f!=null&&(O=v(ee.f,9),O.i.b=ee.e+O.e.d)};var Rae;te(yv,"NetworkSimplexPlacer",548),W(141,17,{180:1,141:1,3:1,23:1,17:1},bb),E.rc=function(){switch(this.e){case 0:return new rq;case 1:return new eq;case 2:return new tq;case 3:return new R$;case 4:return new nq;default:throw new wn("No implementation is available for the node placer "+(this.d!=null?this.d:""+this.e))}};var BE,f9,h9,d9,p9,Gae=Zt(yv,"NodePlacementStrategy",141,yn,Mme),Hae;W(544,1,ds,rq),E.qc=function(e){return v(J(e,(Ce(),Xr)),18).kb((_r(),ks))?zae:null},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A;for(Vt(n,"Simple node placement",1),A=v(J(e,(Ce(),Wl)),134),x=0,g=new V(e.c);g.a<g.c.c.length;){for(u=v(q(g),16),y=u.c,y.b=0,i=null,C=new V(u.a);C.a<C.c.c.length;)_=v(q(C),9),i&&(y.b+=Cx(A,_.g,i.g)*A.d),y.b+=_.e.d+_.j.b+_.e.a,i=_;x=Xe(x,y.b)}for(l=new V(e.c);l.a<l.c.c.length;)for(u=v(q(l),16),y=u.c,N=(x-y.b)/2,i=null,C=new V(u.a);C.a<C.c.c.length;)_=v(q(C),9),i&&(N+=Cx(A,_.g,i.g)*A.d),N+=_.e.d,_.i.b=N,N+=_.j.b+_.e.a,i=_;Dt(n)};var zae;te(yv,"SimpleNodePlacer",544),W(81,1,{81:1},Ml),E.w=function(){var e;return e="",this.c==(Uo(),Dc)?e+=qp:this.c==Js&&(e+=Vp),this.k==(So(),Yu)?e+="DOWN":this.k==bo?e+="UP":e+="BALANCED",e},te(ps,"BKAlignedLayout",81),W(248,17,{248:1,3:1,23:1,17:1},A6);var Js,Dc,k3e=Zt(ps,"BKAlignedLayout/HDirection",248,yn,Sye);W(247,17,{247:1,3:1,23:1,17:1},I6);var Yu,bo,_3e=Zt(ps,"BKAlignedLayout/VDirection",247,yn,Nye);W(596,1,{},I$),te(ps,"BKAligner",596),W(599,1,{},_ee),te(ps,"BKCompactor",599),W(279,1,{279:1},op),E.a=0,te(ps,"BKCompactor/ClassEdge",279),W(200,1,{200:1},oZ),E.a=0,E.b=0,te(ps,"BKCompactor/ClassNode",200),W(547,1,ds,R$),E.qc=function(e){return v(J(e,(Ce(),Xr)),18).kb((_r(),ks))?Uae:null},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de;switch(Vt(n,"Brandes & Koepf node placement",1),this.b=e,this.d=nEe(e),this.a=Gt(Oe(Yt(J(e,(Wt(),F9))))),this.e=ot(J(e,Lm))===ot((Jb(),WE)),qEe(this,e),B=(yi(4,Ll),new qi(4)),v(J(e,Lm),124).e){case 3:F=new Ml(e,this.d.d,(So(),Yu),(Uo(),Js)),B.c[B.c.length]=F;break;case 1:ee=new Ml(e,this.d.d,(So(),bo),(Uo(),Js)),B.c[B.c.length]=ee;break;case 4:ce=new Ml(e,this.d.d,(So(),Yu),(Uo(),Dc)),B.c[B.c.length]=ce;break;case 2:de=new Ml(e,this.d.d,(So(),bo),(Uo(),Dc)),B.c[B.c.length]=de;break;default:F=new Ml(e,this.d.d,(So(),Yu),(Uo(),Js)),ee=new Ml(e,this.d.d,bo,Js),ce=new Ml(e,this.d.d,Yu,Dc),de=new Ml(e,this.d.d,bo,Dc),B.c[B.c.length]=ce,B.c[B.c.length]=de,B.c[B.c.length]=F,B.c[B.c.length]=ee}for(i=new I$(e,this.d),g=new V(B);g.a<g.c.c.length;)u=v(q(g),81),OCe(i,u,this.c),lEe(u);for(N=new _ee(e,this.d),y=new V(B);y.a<y.c.c.length;)u=v(q(y),81),mCe(N,u);if(this.a)for(x=new V(B);x.a<x.c.c.length;)u=v(q(x),81),wf(),u+""+u_(u);if(C=null,this.e&&(_=ACe(this,B,this.d.d),Kte(this,e,_)&&(C=_)),!C)for(x=new V(B);x.a<x.c.c.length;)u=v(q(x),81),Kte(this,e,u)&&(!C||u_(C)>u_(u))&&(C=u);for(!C&&(C=(On(0,B.c.length),v(B.c[0],81))),O=new V(e.c);O.a<O.c.c.length;)for(A=v(q(O),16),oe=new V(A.a);oe.a<oe.c.c.length;)re=v(q(oe),9),re.i.b=Oe(C.n[re.k])+Oe(C.d[re.k]);for(this.a&&(wf(),""+pte(C),""+Fke(C)),l=new V(B);l.a<l.c.c.length;)u=v(q(l),81),u.f=null,u.b=null,u.a=null,u.d=null,u.i=null,u.g=null,u.n=null;wwe(this.d),this.c.a.Q(),Dt(n)},E.a=!1,E.e=!1;var Uae;te(ps,"BKNodePlacer",547),W(194,17,{194:1,3:1,23:1,17:1},L6);var RE,GE,Fae=Zt(ps,"CompactionStrategy",194,yn,Tye),Yae;W(597,1,{},W0),E.d=0,te(ps,"NeighborhoodInformation",597),W(598,1,Gr,zq),E.$b=function(e,n){return mwe(this,v(e,27),v(n,27))},te(ps,"NeighborhoodInformation/NeighborComparator",598),W(334,1,{}),te(ps,"ThresholdStrategy",334),W(602,334,{},wZ),E.Ic=function(e,n,i){return this.a.k==(So(),bo)?ji:Zr},E.Jc=function(){},te(ps,"ThresholdStrategy/NullThresholdStrategy",602),W(249,1,{249:1},L$),E.c=!1,E.d=!1,te(ps,"ThresholdStrategy/Postprocessable",249),W(603,334,{},xZ),E.Ic=function(e,n,i){var u,l,g;return l=n==i,u=this.a.a[i.k]==n,l||u?(g=e,this.a.c==(Uo(),Dc)?(l&&(g=g_(this,n,!0)),(g==1/0||g==-1/0)&&u&&(g=g_(this,i,!1))):(l&&(g=g_(this,n,!0)),(g==1/0||g==-1/0)&&u&&(g=g_(this,i,!1))),g):e},E.Jc=function(){for(var e,n,i,u;this.d.b!=0;)u=v(yye(this.d),249),i=Hte(this,u),i.a&&(e=i.a,this.c.a[e.c.f.d.k]!==this.c.a[e.d.f.d.k]&&(n=bte(this,u),n||V$(this.e,u)));for(;this.e.a.c.length!=0;)bte(this,v(bX(this.e),249))},te(ps,"ThresholdStrategy/SimpleThresholdStrategy",603),W(423,1,{180:1},J0),E.rc=function(){switch(this.a.e){case 1:return new G$;case 3:return new aq;default:return new iq}},te(Ol,"EdgeRouterFactory",423),W(538,1,ds,iq),E.qc=function(e){var n,i;return i=v(J(e,(Ce(),Xr)),18),n=new Yn,i.kb((_r(),Sm))&&(Lr(n,$ae),Lr(n,g9)),(i.kb(Qf)||Gt(Oe(Yt(J(e,(Wt(),Zv))))))&&(Lr(n,g9),i.kb(Wf)&&Lr(n,Qae)),i.kb(ks)&&Lr(n,Zae),i.kb(Nm)&&Lr(n,Wae),i.kb(eC)&&Lr(n,Kae),i.kb(ag)&&Lr(n,Vae),i.kb(og)&&Lr(n,qae),n},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F;Vt(n,"Orthogonal edge routing",1),O=v(J(e,(Ce(),Wl)),134),Gt(Oe(Yt(J(e,(Fe(),_v))))),N=new e_(0,O.a),F=0,g=new Cn(e.c,0),y=null,x=null;do _=g.b<g.d.Y()?(xt(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),16)):null,C=_?_.a:null,y&&(FA(y,F),F+=y.c.a),B=y?F+O.b:F,A=DA(N,e,x,C,B),u=!y||yx(x,(Ny(),Em)),l=!_||yx(C,(Ny(),Em)),A>0?(i=O.b+(A-1)*O.a,_&&(i+=O.b),i<O.f&&!u&&!l&&(i=O.f),F+=i):!u&&!l&&(F+=O.f),y=_,x=C;while(_);e.e.a=F,Dt(n)};var Vae,qae,Zae,$ae,Kae,g9,Qae,Wae;te(Ol,"OrthogonalEdgeRouter",538),W(277,1,{},e_),E.a=0,E.c=0,te(Ol,"OrthogonalRoutingGenerator",277),W(118,1,{118:1},dy),E.w=function(){return this.a+"->"+this.b},E.c=0,te(Ol,"OrthogonalRoutingGenerator/Dependency",118),W(80,1,{80:1,23:1},XJ),E.F=function(e){return m0e(this,v(e,80))},E.t=function(e){var n;return qe(e,80)?(n=v(e,80),this.d==n.d):!1},E.v=function(){return this.d},E.w=function(){var e,n,i,u;for(e=new gp("{"),u=new V(this.g);u.a<u.c.c.length;)i=v(q(u),7),n=sy(i.f),n==null&&(n="n"+VK(i.f)),e.a+=""+n,u.a<u.c.c.length&&(e.a+=",");return e.a+="}",e.a},E.a=NaN,E.c=0,E.d=0,E.f=0,E.i=0,E.k=NaN,te(Ol,"OrthogonalRoutingGenerator/HyperNode",80),W(580,1,{},Uq),E.Kc=function(e,n){var i,u,l,g,y,x,_,C,N,A;for(A=n+e.i*this.a.c,x=new V(e.g);x.a<x.c.c.length;)for(y=v(q(x),7),_=En(be(ve(Xt,1),Jt,10,0,[y.f.i,y.i,y.a])).a,u=new V(y.e);u.a<u.c.c.length;)i=v(q(u),12),C=i.d,N=En(be(ve(Xt,1),Jt,10,0,[C.f.i,C.i,C.a])).a,(_-N<=0?0-(_-N):_-N)>Hu&&(l=new wt(_,A),vn(i.a,l),ov(this.a,i,e,l,!1),g=new wt(N,A),vn(i.a,g),ov(this.a,i,e,g,!1))},E.Lc=function(e){return e.f.i.a+e.i.a+e.a.a},E.Mc=function(){return De(),kt},E.Nc=function(){return De(),bt},te(Ol,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",580),W(581,1,{},Fq),E.Kc=function(e,n){var i,u,l,g,y,x,_,C,N,A;for(A=n-e.i*this.a.c,x=new V(e.g);x.a<x.c.c.length;)for(y=v(q(x),7),_=En(be(ve(Xt,1),Jt,10,0,[y.f.i,y.i,y.a])).a,u=new V(y.e);u.a<u.c.c.length;)i=v(q(u),12),C=i.d,N=En(be(ve(Xt,1),Jt,10,0,[C.f.i,C.i,C.a])).a,(_-N<=0?0-(_-N):_-N)>Hu&&(l=new wt(_,A),vn(i.a,l),ov(this.a,i,e,l,!1),g=new wt(N,A),vn(i.a,g),ov(this.a,i,e,g,!1))},E.Lc=function(e){return e.f.i.a+e.i.a+e.a.a},E.Mc=function(){return De(),bt},E.Nc=function(){return De(),kt},te(Ol,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",581),W(579,1,{},Yq),E.Kc=function(e,n){var i,u,l,g,y,x,_,C,N,A;for(A=n+e.i*this.a.c,x=new V(e.g);x.a<x.c.c.length;)for(y=v(q(x),7),_=En(be(ve(Xt,1),Jt,10,0,[y.f.i,y.i,y.a])).b,u=new V(y.e);u.a<u.c.c.length;)i=v(q(u),12),C=i.d,N=En(be(ve(Xt,1),Jt,10,0,[C.f.i,C.i,C.a])).b,(_-N<=0?0-(_-N):_-N)>Hu&&(l=new wt(A,_),vn(i.a,l),ov(this.a,i,e,l,!0),g=new wt(A,N),vn(i.a,g),ov(this.a,i,e,g,!0))},E.Lc=function(e){return e.f.i.b+e.i.b+e.a.b},E.Mc=function(){return De(),at},E.Nc=function(){return De(),ct},te(Ol,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",579),W(535,1,ds,G$),E.qc=function(e){var n,i;return i=v(J(e,(Ce(),Xr)),18),n=new Yn,(i.kb((_r(),Qf))||Gt(Oe(Yt(J(e,(Wt(),Zv))))))&&(Lr(n,eoe),i.kb(Wf)&&Lr(n,toe)),i.kb(ag)&&Lr(n,Jae),i.kb(og)&&Lr(n,Xae),n},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee;for(Vt(n,"Polyline edge routing",1),A=v(J(e,(Ce(),Qi)),15).a,i=v(J(e,(Wt(),xu)),15).a,re=0,e.c.c.length!=0&&(oe=vte(v(ut(e.c,0),16)),re=.4*i*oe),g=new Cn(e.c,0);g.b<g.d.Y();){for(l=(xt(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),16)),u=yx(l,Em),u&&re>0&&(re-=A),FA(l,re),_=0,N=new V(l.a);N.a<N.c.c.length;){for(C=v(q(N),9),x=0,B=Ht(In(C));Bt(B);)O=v(It(B),12),F=Yi(O.c).b,ee=Yi(O.d).b,l==O.d.f.d&&(ce=O.c,de=O.d,ye=(En(be(ve(Xt,1),Jt,10,0,[ce.f.i,ce.i,ce.a])).b+En(be(ve(Xt,1),Jt,10,0,[de.f.i,de.i,de.a])).b)/2,ce.g==(De(),at)?Ee=new wt(re+ce.f.d.c.a+.4*i*(F-ee<=0?0-(F-ee):F-ee),ye):Ee=new wt(re-.4*i*(F-ee<=0?0-(F-ee):F-ee),ye),j1(O.a,0,Ee),O.c.g==ct&&(F=0,ee=0)),x=x>(ee-F<=0?0-(ee-F):ee-F)?x:ee-F<=0?0-(ee-F):ee-F;switch(C.g.e){case 0:case 4:case 1:case 3:pEe(this,C,re)}_=_>x?_:x}g.b<g.d.Y()&&(oe=vte((xt(g.b<g.d.Y()),v(g.d.sb(g.c=g.b++),16))),_=_>oe?_:oe,xt(g.b>0),g.a.sb(g.c=--g.b)),y=.4*i*_,!u&&g.b<g.d.Y()&&(y+=A),re+=l.c.a+y}this.a.a.Q(),e.e.a=re,Dt(n)};var Jae,Xae,eoe,toe,Em;te(Ol,"PolylineEdgeRouter",535),W(536,1,To,k2),E.D=function(e){return ZJ(v(e,9))},te(Ol,"PolylineEdgeRouter/1",536),W(75,1,{75:1},AX),E.w=function(){var e,n,i,u;for(i=new bp,this.e&&Co(Co(i,I1(this.e)),": "),n=gn(ak(this),0);n.b!=n.d.c;)e=v(on(n),7),Co(Co(Np(Co(i,(u=QW(e),u==null?"p_"+e.k:"p_"+u)),32),I1(e.g))," / ");return $0e(i,xb(i.a)-2-1)},E.j=0,E.k=0,te(Dl,"ConnectedSelfLoopComponent",75),W(60,17,{60:1,3:1,23:1,17:1},zs),E.c=0;var noe,roe,ioe,Vu,Bc,ws,Rc,Xs,$o,xs,qu,Zu,aoe,ooe,soe,uoe,coe,loe,foe,hoe,doe,poe,goe,boe,voe,Zl,$f,Gc,Hc,ig=Zt(Dl,"LoopSide",60,yn,Sj);W(203,1,{},XX,OA,Fj),E.w=function(){return this.b.w()},E.c=0,E.d=!1,E.e=!1,E.f=!1,E.i=0,E.j=0,te(Dl,"NubSpline",203),W(92,1,{92:1},ik,Ite),te(Dl,"NubSpline/PolarCP",92),W(281,203,{},ek),te(Dl,"NubsSelfLoop",281),W(112,1,{},Vee,bee,Db,Xk,t_),E.a=lI,E.b=hs,E.c=lI,E.d=hs,te(Dl,"Rectangle",112),W(537,1,ds,aq),E.qc=function(e){var n,i;return n=new Yn,i=v(J(e,(Ce(),Xr)),18),i.kb((_r(),Nm))&&Lr(n,koe),i.kb(ag)&&Lr(n,yoe),(i.kb(Qf)||Gt(Oe(Yt(J(e,(Wt(),Zv))))))&&(Lr(n,woe),i.kb(Wf)&&Lr(n,xoe)),i.kb(og)&&Lr(n,moe),n},E.sc=function(e,n){var i,u,l,g,y,x,_,C,N,A,O,B,F,ee,re,oe,ce,de,ye,Ee,ze,Ve,Be,tt,lt,dt,vt,Et,tn,Sn,xi,ha;Vt(n,"Spline edge routing",1),ye=v(J(e,(Ce(),Qi)),15).a,this.a=ye*v(J(e,(Wt(),xu)),15).a,ha=0,re=new V(e.c),oe=null,Sn=(Fn(),new en),tn=new Ye,_=!0,C=!0;do{for(Ve=re.a<re.c.c.length?v(q(re),16):null,O=new Ye,y=new Ye,ce=new ta,tt=new ta,vt=new ta,jCe(new Er(oe,Ve),new Er(ce,tt),y,Sn,tn,vt),y_(ce,tt,(vl(),yu),!0,y,O),y_(ce,tt,yu,!1,y,O),y_(ce,tt,Kf,!0,y,O),y_(ce,tt,Kf,!1,y,O),Y_e(y,ce,tt,O),Et=new Cn(O,0);Et.b<Et.d.Y();)for(N=(xt(Et.b<Et.d.Y()),v(Et.d.sb(Et.c=Et.b++),77)),xi=new Cn(O,Et.b);xi.b<xi.d.Y();)A=(xt(xi.b<xi.d.Y()),v(xi.d.sb(xi.c=xi.b++),77)),ECe(N,A);if(KCe(O,v(J(e,Md),154)),KEe(O),Be=ha+10,Ve){for(C=!Ve||yx(Ve.a,(Ny(),Em)),de=-1,l=new V(O);l.a<l.c.c.length;)i=v(q(l),77),de=ui(de,i.n);++de,de>0?(B=(de+1)*this.a,B<ye&&!_&&!C&&(B=ye),Be+=B):_||C||$X(oe)||$X(Ve)||(Be+=ye),FA(Ve,Be)}for(dt=(ze=new un(vt.a).a.bb().mb(),new hn(ze));dt.a.G();)for(lt=(x=v(dt.a.H(),21),v(x.yb(),12)),Ee=lt.c.f.i,mc(lt.a,Ee),ee=new V(lt.b);ee.a<ee.c.c.length;)F=v(q(ee),33),Nn(F.i,Ee);for(g=new V(O);g.a<g.c.c.length;)i=v(q(g),77),i.f?ske(i,ha):tEe(this,i,ha,Be);if(Ve)ha=Be+Ve.c.a+10;else{for(de=-1,l=new V(O);l.a<l.c.c.length;)i=v(q(l),77),de=ui(de,i.n);de>=0&&(ha+=(de+2)*this.a)}oe=Ve,_=C}while(Ve);for(u=new V(tn);u.a<u.c.c.length;)i=v(q(u),12),YCe(i,Sn);e.e.a=ha,Dt(n)},E.a=3;var yoe,moe,woe,xoe,koe;te(Dl,"SplineEdgeRouter",537),W(117,1,{117:1},uy),E.w=function(){return this.a+" ->("+this.c+") "+this.b},E.c=0,te(Dl,"SplineEdgeRouter/Dependency",117),W(223,17,{223:1,3:1,23:1,17:1},O6);var yu,Kf,E3e=Zt(Dl,"SplineEdgeRouter/SideToProcess",223,yn,Cye);W(77,1,{77:1,23:1},Wee,UA),E.F=function(e){return w0e(this,v(e,77))},E.a=0,E.b=0,E.e=0,E.f=!1,E.i=0,E.k=0,E.n=0,E.p=0,te(Dl,"SplineEdgeRouter/SplineHyperEdge",77),W(123,17,{123:1,3:1,23:1,17:1},_p);var HE,zE,UE,FE,YE,VE,qE=Zt(gu,"ContentAlignment",123,yn,zme),_oe;W(218,17,{218:1,3:1,23:1,17:1},fx);var Cm,b9,Fv,C3e=Zt(gu,"EdgeConstraint",218,yn,qye);W(115,17,{115:1,3:1,23:1,17:1},vb);var ZE,Pm,$E,KE,QE,Eoe=Zt(gu,"EdgeLabelSideSelection",115,yn,jme),Coe;W(124,17,{124:1,3:1,23:1,17:1},Ep);var WE,v9,y9,JE,m9,w9,Poe=Zt(gu,"FixedAlignment",124,yn,Ume),Soe;W(113,17,{113:1,3:1,23:1,17:1},lc);var ag,XE,og,ks,Sm,eC,Qf,Wf,x9,Nm,k9=Zt(gu,"GraphProperties",113,yn,xwe);W(110,17,{110:1,3:1,23:1,17:1},Sf),E.a=!1,E.b=!1,E.c=!1;var tC,_9,E9,C9,P9,nC,S9,N9,Noe=Zt(gu,"GreedySwitchType",110,yn,awe),Toe;W(140,17,{140:1,3:1,23:1,17:1},hx);var Sd,Tm,Jf,P3e=Zt(gu,"InLayerConstraint",140,yn,Vye);W(174,17,{174:1,3:1,23:1,17:1},D6);var rC,T9,Moe=Zt(gu,"InteractiveReferencePoint",174,yn,Mye),joe,Nd,M9,j9,iC,zc,Yv,_s,sg,Mm,A9,Aoe,ug,I9,L9,aC,O9,Xf,jm,$r,D9,Xr,oC,Ioe,mu,$l,Td,jo,Ki,Ii,Kl,cg,_t,B9,R9,G9,sC,Ql,Am,eu,$u,uC,vo,H9,Md,z9,wu,Qi,Wl,Loe,Vv,cC,U9,lC,lg;W(85,17,{85:1,3:1,23:1,17:1},yb);var qv,Uc,fg,Ku,eh,Ooe=Zt(gu,"LayerConstraint",85,yn,Ame),Doe;W(219,17,{219:1,3:1,23:1,17:1},dx);var Wi,hi,fC,S3e=Zt(gu,"PortType",219,yn,Zye),hC,dC,pC,gC,Im,bC,F9,vC,jd,Boe,xu,Zv,Lm,yC,mC,Tr,Y9,V9,q9,wC,xC,Om,Z9,kC,hg,Dm,_C,$9,K9,EC,dg,pg;W(153,17,{153:1,3:1,23:1,17:1},px);var Q9,W9,CC,Roe=Zt(gu,"SelfLoopPlacement",153,yn,$ye),Goe;W(134,1,{134:1},Pne),E.a=0,E.b=0,E.c=0,E.d=0,E.e=0,E.f=0,te(gu,"Spacings",134),W(172,17,{172:1,3:1,23:1,17:1},gx);var gg,$v,Bm,Hoe=Zt(gu,"WideNodesStrategy",172,yn,Kye),zoe;W(644,1,{}),te(Vy,"OutputStream",644),W(645,644,{}),te(Vy,"FilterOutputStream",645),W(291,645,{},Ls),te(Vy,"PrintStream",291),W(255,1,{}),E.w=function(){return this.a},te(qr,"AbstractStringBuilder",255),W(621,95,lu,kZ),te(qr,"ArrayIndexOutOfBoundsException",621),W(290,72,lu,aZ,RZ),te(qr,"ArrayStoreException",290),W(252,46,$A),te(qr,"Error",252),W(84,252,$A,QM,vk),te(qr,"AssertionError",84),Cre={3:1,349:1,23:1};var Vn,di,N3e=te(qr,"Boolean",349);Pre={3:1,23:1,184:1,231:1};var Kv=te(qr,"Double",184);W(15,231,{3:1,23:1,15:1,231:1},Vq,cn),E.F=function(e){return K0e(this,v(e,15))},E.t=function(e){return qe(e,15)&&v(e,15).a==this.a},E.v=function(){return ur(this.a)},E.w=function(){return M0e(this.a)},E.a=0;var T3e=te(qr,"Float",15);W(101,72,lu,ob,oc),te(qr,"IllegalStateException",101);var J9,Uoe;W(608,72,lu,GZ),te(qr,"NegativeArraySizeException",608),W(76,72,{3:1,54:1,76:1,46:1},hp,cb),te(qr,"NullPointerException",76),W(130,29,{3:1,54:1,29:1,130:1,46:1},_Z,c1),te(qr,"NumberFormatException",130),W(146,1,{3:1,146:1},nk),E.t=function(e){var n;return qe(e,146)?(n=v(e,146),this.c==n.c&&Pa(this.d,n.d)&&Pa(this.a,n.a)&&Pa(this.b,n.b)):!1},E.v=function(){return jk(be(ve(ht,1),et,1,4,[St(this.c),this.a,this.d,this.b]))},E.w=function(){return this.a+"."+this.d+"("+(this.b!=null?this.b:"Unknown Source")+(this.c>=0?":"+this.c:"")+")"},E.c=0;var Foe=te(qr,"StackTraceElement",146);W(98,255,{345:1},bp,V2,gp),te(qr,"StringBuilder",98);var Yoe;W(45,72,{3:1,54:1,46:1,45:1},er,Mh),te(qr,"UnsupportedOperationException",45),W(213,638,fd),E.Q=function(){No(this)},E.R=function(e){return Jh(this,e)},E.ab=function(e){return xX(this,e,this.e)||xX(this,e,this.d)},E.bb=function(){return new Tu(this)},E.cb=function(e){return ln(this,e)},E.db=function(e,n){return kn(this,e,n)},E.eb=function(e){return xf(this,e)},E.Y=function(){return v1(this)},te(Mt,"AbstractHashMap",213),W(120,641,wi,Tu),E.Q=function(){this.a.Q()},E.kb=function(e){return q7(this,e)},E.mb=function(){return new Af(this.a)},E.nb=function(e){var n;return q7(this,e)?(n=v(e,21).yb(),this.a.eb(n),!0):!1},E.Y=function(){return this.a.Y()},te(Mt,"AbstractHashMap/EntrySet",120),W(148,1,pr,Af),E.H=function(){return Lp(this)},E.G=function(){return this.b},E.I=function(){nj(this)},E.b=!1,te(Mt,"AbstractHashMap/EntrySetIterator",148),W(162,1,pr,Nh),E.G=function(){return this.b<this.d.Y()},E.H=function(){return xt(this.G()),this.d.sb(this.c=this.b++)},E.I=function(){zo(this)},E.b=0,E.c=-1,te(Mt,"AbstractList/IteratorImpl",162),W(43,162,dd,Cn),E.J=function(e){ju(this,e)},E.K=function(){return this.b>0},E.L=function(){return this.b},E.M=function(){return LQ(this)},E.N=function(){return this.b-1},E.O=function(e){o7(this,e)},te(Mt,"AbstractList/ListIteratorImpl",43),W(258,647,hd,uk),E.rb=function(e,n){kl(e,this.b),this.c.rb(this.a+e,n),++this.b},E.sb=function(e){return On(e,this.b),this.c.sb(this.a+e)},E.vb=function(e){var n;return On(e,this.b),n=this.c.vb(this.a+e),--this.b,n},E.wb=function(e,n){return On(e,this.b),this.c.wb(this.a+e,n)},E.Y=function(){return this.b},E.a=0,E.b=0,te(Mt,"AbstractList/SubList",258),W(36,641,wi,un),E.Q=function(){this.a.Q()},E.kb=function(e){return this.a.R(e)},E.mb=function(){var e;return e=this.a.bb().mb(),new hn(e)},E.nb=function(e){return this.a.R(e)?(this.a.eb(e),!0):!1},E.Y=function(){return this.a.Y()},te(Mt,"AbstractMap/1",36),W(40,1,pr,hn),E.G=function(){return this.a.G()},E.H=function(){var e;return e=v(this.a.H(),21),e.yb()},E.I=function(){this.a.I()},te(Mt,"AbstractMap/1/1",40),W(211,640,Yp,tb),E.Q=function(){this.a.Q()},E.kb=function(e){return this.a.ab(e)},E.mb=function(){var e;return e=this.a.bb().mb(),new nb(e)},E.Y=function(){return this.a.Y()},te(Mt,"AbstractMap/2",211),W(212,1,pr,nb),E.G=function(){return this.a.G()},E.H=function(){var e;return e=v(this.a.H(),21),e.zb()},E.I=function(){this.a.I()},te(Mt,"AbstractMap/2/1",212),W(210,1,{210:1,21:1}),E.t=function(e){var n;return qe(e,21)?(n=v(e,21),Pa(this.d,n.yb())&&Pa(this.e,n.zb())):!1},E.yb=function(){return this.d},E.zb=function(){return this.e},E.v=function(){return _x(this.d)^_x(this.e)},E.Ab=function(e){return c7(this,e)},E.w=function(){return this.d+"="+this.e},te(Mt,"AbstractMap/AbstractEntry",210),W(163,210,{210:1,163:1,21:1},k1),te(Mt,"AbstractMap/SimpleEntry",163),W(652,1,fv),E.t=function(e){var n;return qe(e,21)?(n=v(e,21),Pa(this.yb(),n.yb())&&Pa(this.zb(),n.zb())):!1},E.v=function(){return _x(this.yb())^_x(this.zb())},E.w=function(){return this.yb()+"="+this.zb()},te(Mt,Yne,652),W(639,638,fd),E._=function(e){return rJ(this,e)},E.R=function(e){return bx(this,e)},E.bb=function(){return new FM(this)},E.cb=function(e){return bi(jj(this,e))},E.W=function(){return new n1(this)},te(Mt,"AbstractNavigableMap",639),W(287,641,wi,FM),E.kb=function(e){return qe(e,21)&&rJ(this.b,v(e,21))},E.mb=function(){return new Sb(this.b)},E.nb=function(e){var n;return qe(e,21)?(n=v(e,21),lJ(this.b,n)):!1},E.Y=function(){return this.b.c},te(Mt,"AbstractNavigableMap/EntrySet",287),W(229,641,tI,n1),E.Q=function(){u1(this.a)},E.kb=function(e){return bx(this.a,e)},E.mb=function(){var e;return e=new Sb(new Cb(this.a).b),new r1(e)},E.nb=function(e){return bx(this.a,e)?(jb(this.a,e),!0):!1},E.Y=function(){return this.a.c},te(Mt,"AbstractNavigableMap/NavigableKeySet",229),W(230,1,pr,r1),E.G=function(){return ox(this.a.a)},E.H=function(){var e;return e=Mx(this.a),e.yb()},E.I=function(){gQ(this.a)},te(Mt,"AbstractNavigableMap/NavigableKeySet/1",230),W(4,1,pr,V),E.G=function(){return ul(this)},E.H=function(){return q(this)},E.I=function(){Sp(this)},E.a=0,E.b=-1,te(Mt,"ArrayList/1",4),W(94,647,xre,Eo),E.kb=function(e){return hwe(this,e)!=-1},E.sb=function(e){return CQ(this,e)},E.wb=function(e,n){var i;return i=(On(e,this.a.length),this.a[e]),oo(this.a,e,n),i},E.Y=function(){return this.a.length},E.ob=function(){return vee(this,Ae(ht,et,1,this.a.length,4,1))},E.pb=function(e){return vee(this,e)},te(Mt,"Arrays/ArrayList",94);var Fc,X9,PC;W(413,1,Gr,qq),E.$b=function(e,n){return UQ(n,e)},te(Mt,"Collections/2",413),W(406,647,xre,eb),E.kb=function(e){return!1},E.sb=function(e){return On(e,0),null},E.mb=function(){return pn(),cx(),SC},E.tb=function(){return pn(),cx(),SC},E.Y=function(){return 0},te(Mt,"Collections/EmptyList",406),W(407,1,dd,X0),E.J=function(e){throw new er},E.G=function(){return!1},E.K=function(){return!1},E.H=function(){throw new _a},E.L=function(){return 0},E.M=function(){throw new _a},E.N=function(){return-1},E.I=function(){throw new ob},E.O=function(e){throw new ob};var SC;te(Mt,"Collections/EmptyListIterator",407),W(409,638,gd,Ph),E.R=function(e){return!1},E.ab=function(e){return!1},E.bb=function(){return pn(),PC},E.cb=function(e){return null},E.W=function(){return pn(),PC},E.Y=function(){return 0},E.fb=function(){return pn(),Fc},te(Mt,"Collections/EmptyMap",409),W(408,641,bd,Os),E.kb=function(e){return!1},E.mb=function(){return pn(),cx(),SC},E.Y=function(){return 0},te(Mt,"Collections/EmptySet",408),W(410,1,Gr,_2),E.$b=function(e,n){return N0e(v(e,23),v(n,23))};var Voe;te(Mt,"Collections/ReverseComparator",410),W(411,647,{3:1,22:1,19:1,20:1},Zq),E.kb=function(e){return Pa(this.a,e)},E.sb=function(e){return On(e,1),this.a},E.Y=function(){return 1},te(Mt,"Collections/SingletonList",411),W(217,1,Yp,rb),E.ib=function(e){return uZ()},E.jb=function(e){return cZ()},E.Q=function(){lZ()},E.kb=function(e){return this.b.kb(e)},E.lb=function(e){return this.b.lb(e)},E.V=function(){return this.b.V()},E.mb=function(){return new cp(this.b.mb())},E.nb=function(e){return fZ()},E.Y=function(){return this.b.Y()},E.ob=function(){return this.b.ob()},E.pb=function(e){return this.b.pb(e)},E.w=function(){return Na(this.b)},te(Mt,"Collections/UnmodifiableCollection",217),W(152,1,pr,cp),E.G=function(){return this.b.G()},E.H=function(){return this.b.H()},E.I=function(){Xve()},te(Mt,"Collections/UnmodifiableCollectionIterator",152),W(233,217,hd,A1),E.rb=function(e,n){throw new er},E.t=function(e){return this.a.t(e)},E.sb=function(e){return this.a.sb(e)},E.v=function(){return this.a.v()},E.V=function(){return this.a.V()},E.tb=function(){return new $6(this.a.ub(0))},E.ub=function(e){return new $6(this.a.ub(e))},E.vb=function(e){throw new er},E.wb=function(e,n){throw new er},E.xb=function(e,n){return new A1(this.a.xb(e,n))},te(Mt,"Collections/UnmodifiableList",233),W(309,152,dd,$6),E.J=function(e){throw new er},E.K=function(){return this.a.K()},E.L=function(){return this.a.L()},E.M=function(){return this.a.M()},E.N=function(){return this.a.N()},E.O=function(e){throw new er},te(Mt,"Collections/UnmodifiableListIterator",309),W(305,1,fd,YM),E.Q=function(){throw new er},E.R=function(e){return this.c.R(e)},E.ab=function(e){return E$(this,e)},E.bb=function(){return Ya(this)},E.t=function(e){return r$(this,e)},E.cb=function(e){return this.c.cb(e)},E.v=function(){return this.c.v()},E.V=function(){return this.c.V()},E.W=function(){return $Q(this)},E.db=function(e,n){throw new er},E.eb=function(e){throw new er},E.Y=function(){return this.c.Y()},E.w=function(){return Na(this.c)},E.fb=function(){return QQ(this)},te(Mt,"Collections/UnmodifiableMap",305),W(151,217,wi,pf),E.t=function(e){return n$(this,e)},E.v=function(){return this.b.v()},te(Mt,"Collections/UnmodifiableSet",151),W(412,151,wi,ZZ),E.kb=function(e){return N6(this,e)},E.lb=function(e){return C$(this,e)},E.mb=function(){var e;return e=this.b.mb(),new VM(e)},E.ob=function(){return iW(this)},E.pb=function(e){return R7(this,e)},te(Mt,"Collections/UnmodifiableMap/UnmodifiableEntrySet",412),W(263,1,pr,VM),E.H=function(){return new qM(v(this.a.H(),21))},E.G=function(){return this.a.G()},E.I=function(){throw new er},te(Mt,"Collections/UnmodifiableMap/UnmodifiableEntrySet/1",263),W(306,1,fv,qM),E.t=function(e){return this.a.t(e)},E.yb=function(){return this.a.yb()},E.zb=function(){return this.a.zb()},E.v=function(){return this.a.v()},E.Ab=function(e){throw new er},E.w=function(){return Na(this.a)},te(Mt,"Collections/UnmodifiableMap/UnmodifiableEntrySet/UnmodifiableEntry",306),W(307,233,__,g6),te(Mt,"Collections/UnmodifiableRandomAccessList",307),W(308,151,tI,K6),E.t=function(e){return this.a.t(e)},E.v=function(){return this.a.v()},te(Mt,"Collections/UnmodifiableSortedSet",308);var th;W(522,1,Gr,E2),E.$b=function(e,n){return xr(e),xr(n),mj(v(e,23),n)},te(Mt,"Comparators/1",522),W(202,72,lu,dp),te(Mt,"ConcurrentModificationException",202),W(609,72,lu,mZ),te(Mt,"EmptyStackException",609),W(319,638,fd,Gj),E.db=function(e,n){return s7(this,e,n)},E.Q=function(){ZQ(this)},E.R=function(e){return x7(this.a,e)},E.ab=function(e){var n,i;for(i=new Gh(this.a);i.a<i.c.a.length;)if(n=wl(i),Pa(e,this.b[n.e]))return!0;return!1},E.bb=function(){return new i1(this)},E.cb=function(e){return Qh(this,e)},E.eb=function(e){return V7(this,e)},E.Y=function(){return this.a.c},te(Mt,"EnumMap",319),W(236,641,wi,i1),E.Q=function(){ZQ(this.a)},E.kb=function(e){return SW(this,e)},E.mb=function(){return new q1(this.a)},E.nb=function(e){var n;return SW(this,e)?(n=v(e,21).yb(),V7(this.a,n),!0):!1},E.Y=function(){return this.a.a.c},te(Mt,"EnumMap/EntrySet",236),W(237,1,pr,q1),E.H=function(){return this.b=wl(this.a),new x1(this.c,this.b)},E.G=function(){return N1(this.a)},E.I=function(){yf(!!this.b),V7(this.c,this.b),this.b=null},te(Mt,"EnumMap/EntrySetIterator",237),W(238,652,fv,x1),E.yb=function(){return this.a},E.zb=function(){return this.b.b[this.a.e]},E.Ab=function(e){return $x(this.b,this.a.e,e)},te(Mt,"EnumMap/MapEntry",238),W(86,641,{22:1,19:1,86:1,18:1}),te(Mt,"EnumSet",86),W(66,86,{22:1,19:1,86:1,66:1,18:1},li),E.ib=function(e){return mi(this,v(e,17))},E.kb=function(e){return x7(this,e)},E.mb=function(){return new Gh(this)},E.nb=function(e){return TQ(this,e)},E.Y=function(){return this.c},E.c=0,te(Mt,"EnumSet/EnumSetImpl",66),W(167,1,pr,Gh),E.H=function(){return wl(this)},E.G=function(){return N1(this)},E.I=function(){yf(this.b!=-1),oo(this.c.b,this.b,null),--this.c.c,this.b=-1},E.a=-1,E.b=-1,te(Mt,"EnumSet/EnumSetImpl/IteratorImpl",167),W(30,213,kre,en,sx,q$),E.Uc=function(e,n){return ot(e)===ot(n)||e!=null&&Fo(e,n)},E.Vc=function(e){var n;return n=ls(e),n|0},te(Mt,"HashMap",30),W(50,641,_re,Qr,Z2,w7),E.ib=function(e){return Tn(this,e)},E.Q=function(){this.a.Q()},E.Wc=function(){return new w7(this)},E.kb=function(e){return al(this,e)},E.V=function(){return this.a.Y()==0},E.mb=function(){var e;return e=new un(this.a).a.bb().mb(),new hn(e)},E.nb=function(e){return Ex(this,e)},E.Y=function(){return this.a.Y()},E.w=function(){return Cc(new un(this.a))},te(Mt,"HashSet",50),W(418,1,Pc,uK),E.mb=function(){return new H7(this)},E.c=0,te(Mt,"InternalHashCodeMap",418),W(312,1,pr,H7),E.H=function(){return this.d=this.a[this.c++],this.d},E.G=function(){var e;return this.c<this.a.length?!0:(e=this.b.next(),e.done?!1:(this.a=e.value[1],this.c=0,!0))},E.I=function(){c_(this.e,this.d.yb()),this.c!=0&&--this.c},E.c=0,E.d=null,te(Mt,"InternalHashCodeMap/1",312);var qoe;W(382,1,Pc,cK),E.mb=function(){return new Q7(this)},E.c=0,E.d=0,te(Mt,"InternalStringMap",382),W(293,1,pr,Q7),E.H=function(){return this.c=this.a,this.a=this.b.next(),new fQ(this.d,this.c,this.d.d)},E.G=function(){return!this.a.done},E.I=function(){sX(this.d,this.c.value[0])},te(Mt,"InternalStringMap/1",293),W(383,652,fv,fQ),E.yb=function(){return this.b.value[0]},E.zb=function(){return this.a.d!=this.c?B$(this.a,this.b.value[0]):this.b.value[1]},E.Ab=function(e){return Rk(this.a,this.b.value[0],e)},E.c=0,te(Mt,"InternalStringMap/2",383),W(155,30,kre,jp,dJ),E.Q=function(){nQ(this)},E.R=function(e){return Jh(this.c,e)},E.ab=function(e){var n;for(n=this.b.a;n!=this.b;){if(Pa(n.e,e))return!0;n=n.a}return!1},E.bb=function(){return new L2(this)},E.cb=function(e){return yk(this,e)},E.db=function(e,n){return $b(this,e,n)},E.eb=function(e){return sj(this,e)},E.Y=function(){return v1(this.c)},E.a=!1,te(Mt,"LinkedHashMap",155),W(176,163,{210:1,163:1,176:1,21:1},HK,g7),te(Mt,"LinkedHashMap/ChainEntry",176),W(270,641,wi,L2),E.Q=function(){nQ(this.a)},E.kb=function(e){return NW(this,e)},E.mb=function(){return new Xx(this)},E.nb=function(e){var n;return NW(this,e)?(n=v(e,21).yb(),sj(this.a,n),!0):!1},E.Y=function(){return v1(this.a.c)},te(Mt,"LinkedHashMap/EntrySet",270),W(271,1,pr,Xx),E.H=function(){return tj(this)},E.G=function(){return this.b!=this.c.a.b},E.I=function(){yf(!!this.a),qx(this.c.a.c,this),v7(this.a),xf(this.c.a.c,this.a.d),Z6(this.c.a.c,this),this.a=null},te(Mt,"LinkedHashMap/EntrySet/EntryIterator",271),W(70,50,_re,ta,MK,Ux),E.Wc=function(){return new Ux(this)},te(Mt,"LinkedHashSet",70),W(372,1,dd,lQ),E.J=function(e){Mb(this,e)},E.G=function(){return this.b!=this.d.c},E.K=function(){return this.b.b!=this.d.a},E.H=function(){return on(this)},E.L=function(){return this.a},E.M=function(){return Ab(this)},E.N=function(){return this.a-1},E.I=function(){fj(this)},E.O=function(e){yf(!!this.c),this.c.c=e},E.a=0,E.c=null,te(Mt,"LinkedList/ListIteratorImpl",372),W(259,1,{},C2),te(Mt,"LinkedList/Node",259),W(74,72,{3:1,54:1,46:1,74:1},_a),te(Mt,"NoSuchElementException",74),W(154,1,{154:1},OX,xJ),E.a=0,E.b=0;var e8,t8,M3e=0;te(Mt,"Random",154),W(607,647,Ere),E.rb=function(e,n){H1(e,this.a.c.length+1),hl(this.a,e,n)},E.ib=function(e){return $e(this.a,e)},E.jb=function(e){return Bn(this.a,e)},E.Q=function(){this.a.c=Ae(ht,et,1,0,4,1)},E.kb=function(e){return Vi(this.a,e,0)!=-1},E.lb=function(e){return wc(this.a,e)},E.sb=function(e){return H1(e,this.a.c.length),ut(this.a,e)},E.V=function(){return this.a.c.length==0},E.mb=function(){return new V(this.a)},E.vb=function(e){return H1(e,this.a.c.length),Nf(this.a,e)},E.Xb=function(e,n){bW(this.a,e,n)},E.wb=function(e,n){return H1(e,this.a.c.length),ml(this.a,e,n)},E.Y=function(){return this.a.c.length},E.xb=function(e,n){return new uk(this.a,e,n)},E.ob=function(){return TK(this.a)},E.pb=function(e){return nr(this.a,e)},E.w=function(){return Cc(this.a)},te(Mt,"Vector",607),W(337,607,Ere,t6),te(Mt,"Stack",337),W(253,639,gd,P$,U7),E.Q=function(){u1(this)},E.bb=function(){return new Cb(this)},E.db=function(e,n){return gX(this,e,n)},E.eb=function(e){return jb(this,e)},E.Y=function(){return this.c},E.c=0,te(Mt,"TreeMap",253),W(182,1,pr,Sb),E.H=function(){return Mx(this)},E.G=function(){return ox(this.a)},E.I=function(){gQ(this)},te(Mt,"TreeMap/EntryIterator",182),W(209,287,wi,Cb),E.Q=function(){u1(this.a)},te(Mt,"TreeMap/EntrySet",209),W(183,163,{210:1,163:1,21:1,183:1},gk),E.b=!1;var j3e=te(Mt,"TreeMap/Node",183);W(254,1,{},P2),E.w=function(){return"State: mv="+this.c+" value="+this.d+" done="+this.a+" found="+this.b},E.a=!1,E.b=!1,E.c=!1,te(Mt,"TreeMap/State",254),W(138,17,B_,w1),E.Xc=function(){return!1},E.Yc=function(){return!1};var n8,Zoe,$oe,Koe,NC=Zt(Mt,"TreeMap/SubMapType",138,yn,wme);W(352,138,B_,pK),E.Yc=function(){return!0},Zt(Mt,"TreeMap/SubMapType/1",352,NC,null),W(353,138,B_,wK),E.Xc=function(){return!0},E.Yc=function(){return!0},Zt(Mt,"TreeMap/SubMapType/2",353,NC,null),W(354,138,B_,gK),E.Xc=function(){return!0},Zt(Mt,"TreeMap/SubMapType/3",354,NC,null),W(191,641,{3:1,22:1,19:1,18:1,137:1,191:1},d6,a$),E.ib=function(e){return P7(this,e)},E.Q=function(){u1(this.a)},E.kb=function(e){return bx(this.a,e)},E.mb=function(){var e;return e=new Sb(new Cb(new n1(this.a).a).b),new r1(e)},E.nb=function(e){return BK(this,e)},E.Y=function(){return this.a.c},te(Mt,"TreeSet",191);var A3e=0,r8,i8=0,Rm,ar=K1("int","I"),Qv=K1("boolean","Z"),Qoe=K1("char","C"),fa=K1("double","D"),Gm=K1("float","F"),TC=ome,Woe=Woe=_xe;fwe(Ave),Nwe("permProps",[[["locale","default"],["user.agent","gecko1_8"]]]),Woe(null,"klay",null)})()}(TV)),TV.exports}(function(t,r){(function(a,s){t.exports=s(ave())})(zr,function(a){return function(s){var c={};function f(h){if(c[h])return c[h].exports;var d=c[h]={i:h,l:!1,exports:{}};return s[h].call(d.exports,d,d.exports,f),d.l=!0,d.exports}return f.m=s,f.c=c,f.i=function(h){return h},f.d=function(h,d,p){f.o(h,d)||Object.defineProperty(h,d,{configurable:!1,enumerable:!0,get:p})},f.n=function(h){var d=h&&h.__esModule?function(){return h.default}:function(){return h};return f.d(d,"a",d),d},f.o=function(h,d){return Object.prototype.hasOwnProperty.call(h,d)},f.p="",f(f.s=3)}([function(s,c,f){var h=f(4),d=f(1),p=f(2),b={addUnnecessaryBendpoints:"de.cau.cs.kieler.klay.layered.unnecessaryBendpoints",alignment:"de.cau.cs.kieler.alignment",aspectRatio:"de.cau.cs.kieler.aspectRatio",borderSpacing:"borderSpacing",compactComponents:"de.cau.cs.kieler.klay.layered.components.compact",compactionStrategy:"de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy",contentAlignment:"de.cau.cs.kieler.klay.layered.contentAlignment",crossingMinimization:"de.cau.cs.kieler.klay.layered.crossMin",cycleBreaking:"de.cau.cs.kieler.klay.layered.cycleBreaking",debugMode:"de.cau.cs.kieler.debugMode",direction:"de.cau.cs.kieler.direction",edgeLabelSideSelection:"de.cau.cs.kieler.klay.layered.edgeLabelSideSelection",edgeRouting:"de.cau.cs.kieler.edgeRouting",edgeSpacingFactor:"de.cau.cs.kieler.klay.layered.edgeSpacingFactor",feedbackEdges:"de.cau.cs.kieler.klay.layered.feedBackEdges",fixedAlignment:"de.cau.cs.kieler.klay.layered.fixedAlignment",greedySwitchCrossingMinimization:"de.cau.cs.kieler.klay.layered.greedySwitch",hierarchyHandling:"de.cau.cs.kieler.hierarchyHandling",inLayerSpacingFactor:"de.cau.cs.kieler.klay.layered.inLayerSpacingFactor",interactiveReferencePoint:"de.cau.cs.kieler.klay.layered.interactiveReferencePoint",layerConstraint:"de.cau.cs.kieler.klay.layered.layerConstraint",layoutHierarchy:"de.cau.cs.kieler.layoutHierarchy",linearSegmentsDeflectionDampening:"de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening",mergeEdges:"de.cau.cs.kieler.klay.layered.mergeEdges",mergeHierarchyCrossingEdges:"de.cau.cs.kieler.klay.layered.mergeHierarchyEdges",noLayout:"de.cau.cs.kieler.noLayout",nodeLabelPlacement:"de.cau.cs.kieler.nodeLabelPlacement",nodeLayering:"de.cau.cs.kieler.klay.layered.nodeLayering",nodePlacement:"de.cau.cs.kieler.klay.layered.nodePlace",portAlignment:"de.cau.cs.kieler.portAlignment",portAlignmentEastern:"de.cau.cs.kieler.portAlignment.east",portAlignmentNorth:"de.cau.cs.kieler.portAlignment.north",portAlignmentSouth:"de.cau.cs.kieler.portAlignment.south",portAlignmentWest:"de.cau.cs.kieler.portAlignment.west",portConstraints:"de.cau.cs.kieler.portConstraints",portLabelPlacement:"de.cau.cs.kieler.portLabelPlacement",portOffset:"de.cau.cs.kieler.offset",portSide:"de.cau.cs.kieler.portSide",portSpacing:"de.cau.cs.kieler.portSpacing",postCompaction:"de.cau.cs.kieler.klay.layered.postCompaction",priority:"de.cau.cs.kieler.priority",randomizationSeed:"de.cau.cs.kieler.randomSeed",routeSelfLoopInside:"de.cau.cs.kieler.selfLoopInside",separateConnectedComponents:"de.cau.cs.kieler.separateConnComp",sizeConstraint:"de.cau.cs.kieler.sizeConstraint",sizeOptions:"de.cau.cs.kieler.sizeOptions",spacing:"de.cau.cs.kieler.spacing",splineSelfLoopPlacement:"de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement",thoroughness:"de.cau.cs.kieler.klay.layered.thoroughness",wideNodesOnMultipleLayers:"de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers"},m=function(T){for(var j=Object.keys(T),I={},D=0;D<j.length;D++){var R=j[D],Y=b[R],G=T[R];I[Y]=G}return I},w={interactiveReferencePoint:"CENTER"},k=function(T){for(var j=T.parent(),I=T.scratch("klay"),D={x:I.x,y:I.y};j.nonempty();){var R=j.scratch("klay");D.x+=R.x,D.y+=R.y,j=j.parent()}return D},P=function(T,j){var I=T.layoutDimensions(j),D=T.numericStyle("padding"),R={_cyEle:T,id:T.id(),padding:{top:D,left:D,bottom:D,right:D}};return T.isParent()||(R.width=I.w,R.height=I.h),T.scratch("klay",R),R},S=function(T,j){var I={_cyEle:T,id:T.id(),source:T.data("source"),target:T.data("target"),properties:{}},D=j.priority(T);return D!=null&&(I.properties.priority=D),T.scratch("klay",I),I},M=function(T,j,I){for(var D=[],R=[],Y={},G={id:"root",children:[],edges:[]},U=0;U<T.length;U++){var z=T[U],Q=P(z,I);D.push(Q),Y[z.id()]=Q}for(var $=0;$<j.length;$++){var Z=j[$],X=S(Z,I);R.push(X),Y[Z.id()]=X}for(var K=0;K<D.length;K++){var ae=D[K],se=ae._cyEle;if(!se.isChild())G.children.push(ae);else{var le=se.parent(),he=Y[le.id()],fe=he.children=he.children||[];fe.push(ae)}}for(var pe=0;pe<R.length;pe++){var me=R[pe],Te=me._cyEle;Te.source().parent(),Te.target().parent(),G.edges.push(me)}return G};function L(T){var j=T.klay;this.options=d({},p,T),this.options.klay=d({},p.klay,j,w)}L.prototype.run=function(){var T=this,j=this.options,I=j.eles,D=I.nodes(),R=I.edges(),Y=M(D,R,j);return h.layout({graph:Y,options:m(j.klay),success:function(){},error:function(G){throw G}}),D.filter(function(G){return!G.isParent()}).layoutPositions(T,j,k),this},L.prototype.stop=function(){return this},L.prototype.destroy=function(){return this},s.exports=L},function(s,c,f){s.exports=Object.assign!=null?Object.assign.bind(Object):function(h){for(var d=arguments.length,p=Array(d>1?d-1:0),b=1;b<d;b++)p[b-1]=arguments[b];return p.filter(function(m){return m!=null}).forEach(function(m){Object.keys(m).forEach(function(w){return h[w]=m[w]})}),h}},function(s,c,f){var h={nodeDimensionsIncludeLabels:!1,fit:!0,padding:20,animate:!1,animateFilter:function(d,p){return!0},animationDuration:500,animationEasing:void 0,transform:function(d,p){return p},ready:void 0,stop:void 0,klay:{addUnnecessaryBendpoints:!1,aspectRatio:1.6,borderSpacing:20,compactComponents:!1,crossingMinimization:"LAYER_SWEEP",cycleBreaking:"GREEDY",direction:"UNDEFINED",edgeRouting:"ORTHOGONAL",edgeSpacingFactor:.5,feedbackEdges:!1,fixedAlignment:"NONE",inLayerSpacingFactor:1,layoutHierarchy:!1,linearSegmentsDeflectionDampening:.3,mergeEdges:!1,mergeHierarchyCrossingEdges:!0,nodeLayering:"NETWORK_SIMPLEX",nodePlacement:"BRANDES_KOEPF",randomizationSeed:1,routeSelfLoopInside:!1,separateConnectedComponents:!0,spacing:20,thoroughness:7},priority:function(d){return null}};s.exports=h},function(s,c,f){var h=f(0),d=function(p){p&&p("layout","klay",h)};typeof cytoscape<"u"&&d(cytoscape),s.exports=d},function(s,c){s.exports=a}])})})(NV);var ove=NV.exports;const sve=A0(ove);var jV={exports:{}};(function(t,r){(function(a,s){t.exports=s()})(zr,function(){return function(a){var s={};function c(f){if(s[f])return s[f].exports;var h=s[f]={i:f,l:!1,exports:{}};return a[f].call(h.exports,h,h.exports,c),h.l=!0,h.exports}return c.m=a,c.c=s,c.i=function(f){return f},c.d=function(f,h,d){c.o(f,h)||Object.defineProperty(f,h,{configurable:!1,enumerable:!0,get:d})},c.n=function(f){var h=f&&f.__esModule?function(){return f.default}:function(){return f};return c.d(h,"a",h),h},c.o=function(f,h){return Object.prototype.hasOwnProperty.call(f,h)},c.p="",c(c.s=11)}([function(a,s,c){a.exports=Object.assign!=null?Object.assign.bind(Object):function(f){for(var h=arguments.length,d=Array(h>1?h-1:0),p=1;p<h;p++)d[p-1]=arguments[p];return d.forEach(function(b){Object.keys(b).forEach(function(m){return f[m]=b[m]})}),f}},function(a,s,c){var f=c(0),h=Object.freeze({source:null,target:null,length:80,coeff:2e-4,weight:1});function d(b){return f({},h,b)}function p(b){var m=b.source,w=b.target,k=b.length<0?h.length:b.length,P=w.pos.x-m.pos.x,S=w.pos.y-m.pos.y,M=Math.sqrt(P*P+S*S);M===0&&(P=(Math.random()-.5)/50,S=(Math.random()-.5)/50,M=Math.sqrt(P*P+S*S));var L=M-k,T=(!b.coeff||b.coeff<0?h.springCoeff:b.coeff)*L/M*b.weight;m.force.x+=T*P,m.force.y+=T*S,w.force.x-=T*P,w.force.y-=T*S}a.exports={makeSpring:d,applySpring:p}},function(a,s,c){var f=function(){function K(ae,se){for(var le=0;le<se.length;le++){var he=se[le];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ae,he.key,he)}}return function(ae,se,le){return se&&K(ae.prototype,se),le&&K(ae,le),ae}}();function h(K,ae){if(!(K instanceof ae))throw new TypeError("Cannot call a class as a function")}function d(K,ae){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ae&&(typeof ae=="object"||typeof ae=="function")?ae:K}function p(K,ae){if(typeof ae!="function"&&ae!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ae);K.prototype=Object.create(ae&&ae.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),ae&&(Object.setPrototypeOf?Object.setPrototypeOf(K,ae):K.__proto__=ae)}var b=c(13),m=c(0),w=c(4),k=c(10),P=k.tick,S=c(7),M=S.makeQuadtree,L=c(3),T=L.makeBody,j=c(1),I=j.makeSpring,D=function(K){return typeof K=="function"},R=function(K){return K.isParent()},Y=function(K){return!R(K)},G=function(K){return R(K.source())||R(K.target())},U=function(K){return!G(K)},z=function(K){return K.scratch("euler").body},Q=function(K){return R(K)?K.descendants().filter(Y):K},$=function(K){var ae=K.scratch("euler");return ae||(ae={},K.scratch("euler",ae)),ae},Z=function(K,ae){return D(K)?K(ae):K},X=function(K){p(ae,K);function ae(se){return h(this,ae),d(this,(ae.__proto__||Object.getPrototypeOf(ae)).call(this,m({},w,se)))}return f(ae,[{key:"prerun",value:function(se){var le=se;le.quadtree=M();var he=le.bodies=[];le.nodes.filter(function(pe){return Y(pe)}).forEach(function(pe){var me=$(pe),Te=T({pos:{x:me.x,y:me.y},mass:Z(le.mass,pe),locked:me.locked});Te._cyNode=pe,me.body=Te,Te._scratch=me,he.push(Te)});var fe=le.springs=[];le.edges.filter(U).forEach(function(pe){var me=I({source:z(pe.source()),target:z(pe.target()),length:Z(le.springLength,pe),coeff:Z(le.springCoeff,pe)});me._cyEdge=pe;var Te=$(pe);me._scratch=Te,Te.spring=me,fe.push(me)}),le.edges.filter(G).forEach(function(pe){var me=Q(pe.source()),Te=Q(pe.target());me=[me[0]],Te=[Te[0]],me.forEach(function(Le){Te.forEach(function(ge){fe.push(I({source:z(Le),target:z(ge),length:Z(le.springLength,pe),coeff:Z(le.springCoeff,pe)}))})})})}},{key:"tick",value:function(se){var le=P(se),he=le<=se.movementThreshold;return he}}]),ae}(b);a.exports=X},function(a,s,c){var f=Object.freeze({pos:{x:0,y:0},prevPos:{x:0,y:0},force:{x:0,y:0},velocity:{x:0,y:0},mass:1}),h=function(m){return{x:m.x,y:m.y}},d=function(m,w){return m??w},p=function(m,w){return h(d(m,w))};function b(m){var w={};return w.pos=p(m.pos,f.pos),w.prevPos=p(m.prevPos,w.pos),w.force=p(m.force,f.force),w.velocity=p(m.velocity,f.velocity),w.mass=m.mass!=null?m.mass:f.mass,w.locked=m.locked,w}a.exports={makeBody:b}},function(a,s,c){var f=Object.freeze({springLength:function(h){return 80},springCoeff:function(h){return 8e-4},mass:function(h){return 4},gravity:-1.2,pull:.001,theta:.666,dragCoeff:.02,movementThreshold:1,timeStep:20});a.exports=f},function(a,s,c){var f=.02;function h(d,p){var b=void 0;p!=null?b=p:d.dragCoeff!=null?b=d.dragCoeff:b=f,d.force.x-=b*d.velocity.x,d.force.y-=b*d.velocity.y}a.exports={applyDrag:h}},function(a,s,c){function f(h,d){var p=0,b=0,m=0,w=0,k,P=h.length;if(P===0)return 0;for(k=0;k<P;++k){var S=h[k],M=d/S.mass;if(!S.grabbed){S.locked?(S.velocity.x=0,S.velocity.y=0):(S.velocity.x+=M*S.force.x,S.velocity.y+=M*S.force.y);var L=S.velocity.x,T=S.velocity.y,j=Math.sqrt(L*L+T*T);j>1&&(S.velocity.x=L/j,S.velocity.y=T/j),p=d*S.velocity.x,m=d*S.velocity.y,S.pos.x+=p,S.pos.y+=m,b+=Math.abs(p),w+=Math.abs(m)}}return(b*b+w*w)/P}a.exports={integrate:f}},function(a,s,c){var f=c(9),h=c(8),d=function(k){k.x=0,k.y=0},p=function(k,P){var S=1e-8,M=Math.abs(k.x-P.x),L=Math.abs(k.y-P.y);return M<S&&L<S};function b(){var k=[],P=new h,S=[],M=0,L=T();function T(){var R=S[M];return R?(R.quad0=null,R.quad1=null,R.quad2=null,R.quad3=null,R.body=null,R.mass=R.massX=R.massY=0,R.left=R.right=R.top=R.bottom=0):(R=new f,S[M]=R),++M,R}function j(R,Y,G,U){var z=k,Q=void 0,$=void 0,Z=void 0,X=void 0,K=0,ae=0,se=1,le=0,he=1;z[0]=L,d(R.force);var fe=-R.pos.x,pe=-R.pos.y,me=Math.sqrt(fe*fe+pe*pe),Te=R.mass*U/me;for(K+=Te*fe,ae+=Te*pe;se;){var Le=z[le],ge=Le.body;se-=1,le+=1;var xe=ge!==R;ge&&xe?($=ge.pos.x-R.pos.x,Z=ge.pos.y-R.pos.y,X=Math.sqrt($*$+Z*Z),X===0&&($=(Math.random()-.5)/50,Z=(Math.random()-.5)/50,X=Math.sqrt($*$+Z*Z)),Q=Y*ge.mass*R.mass/(X*X*X),K+=Q*$,ae+=Q*Z):xe&&($=Le.massX/Le.mass-R.pos.x,Z=Le.massY/Le.mass-R.pos.y,X=Math.sqrt($*$+Z*Z),X===0&&($=(Math.random()-.5)/50,Z=(Math.random()-.5)/50,X=Math.sqrt($*$+Z*Z)),(Le.right-Le.left)/X<G?(Q=Y*Le.mass*R.mass/(X*X*X),K+=Q*$,ae+=Q*Z):(Le.quad0&&(z[he]=Le.quad0,se+=1,he+=1),Le.quad1&&(z[he]=Le.quad1,se+=1,he+=1),Le.quad2&&(z[he]=Le.quad2,se+=1,he+=1),Le.quad3&&(z[he]=Le.quad3,se+=1,he+=1)))}R.force.x+=K,R.force.y+=ae}function I(R){if(R.length!==0){var Y=Number.MAX_VALUE,G=Number.MAX_VALUE,U=Number.MIN_VALUE,z=Number.MIN_VALUE,Q=void 0,$=R.length;for(Q=$;Q--;){var Z=R[Q].pos.x,X=R[Q].pos.y;Z<Y&&(Y=Z),Z>U&&(U=Z),X<G&&(G=X),X>z&&(z=X)}var K=U-Y,ae=z-G;for(K>ae?z=G+K:U=Y+ae,M=0,L=T(),L.left=Y,L.right=U,L.top=G,L.bottom=z,Q=$-1,Q>=0&&(L.body=R[Q]);Q--;)D(R[Q])}}function D(R){for(P.reset(),P.push(L,R);!P.isEmpty();){var Y=P.pop(),G=Y.node,U=Y.body;if(G.body){var z=G.body;if(G.body=null,p(z.pos,U.pos)){var Q=3;do{var $=Math.random(),Z=(G.right-G.left)*$,X=(G.bottom-G.top)*$;z.pos.x=G.left+Z,z.pos.y=G.top+X,Q-=1}while(Q>0&&p(z.pos,U.pos));if(Q===0&&p(z.pos,U.pos))return}P.push(G,z),P.push(G,U)}else{var K=U.pos.x,ae=U.pos.y;G.mass=G.mass+U.mass,G.massX=G.massX+U.mass*K,G.massY=G.massY+U.mass*ae;var se=0,le=G.left,he=(G.right+le)/2,fe=G.top,pe=(G.bottom+fe)/2;K>he&&(se=se+1,le=he,he=G.right),ae>pe&&(se=se+2,fe=pe,pe=G.bottom);var me=m(G,se);me?P.push(me,U):(me=T(),me.left=le,me.top=fe,me.right=he,me.bottom=pe,me.body=U,w(G,se,me))}}}return{insertBodies:I,updateBodyForce:j}}function m(k,P){return P===0?k.quad0:P===1?k.quad1:P===2?k.quad2:P===3?k.quad3:null}function w(k,P,S){P===0?k.quad0=S:P===1?k.quad1=S:P===2?k.quad2=S:P===3&&(k.quad3=S)}a.exports={makeQuadtree:b}},function(a,s,c){a.exports=f;function f(){this.stack=[],this.popIdx=0}f.prototype={isEmpty:function(){return this.popIdx===0},push:function(d,p){var b=this.stack[this.popIdx];b?(b.node=d,b.body=p):this.stack[this.popIdx]=new h(d,p),++this.popIdx},pop:function(){if(this.popIdx>0)return this.stack[--this.popIdx]},reset:function(){this.popIdx=0}};function h(d,p){this.node=d,this.body=p}},function(a,s,c){a.exports=function(){this.body=null,this.quad0=null,this.quad1=null,this.quad2=null,this.quad3=null,this.mass=0,this.massX=0,this.massY=0,this.left=0,this.top=0,this.bottom=0,this.right=0}},function(a,s,c){var f=c(6),h=f.integrate,d=c(5),p=d.applyDrag,b=c(1),m=b.applySpring;function w(k){var P=k.bodies,S=k.springs,M=k.quadtree,L=k.timeStep,T=k.gravity,j=k.theta,I=k.dragCoeff,D=k.pull;P.forEach(function(Q){var $=Q._scratch;$&&(Q.locked=$.locked,Q.grabbed=$.grabbed,Q.pos.x=$.x,Q.pos.y=$.y)}),M.insertBodies(P);for(var R=0;R<P.length;R++){var Y=P[R];M.updateBodyForce(Y,T,j,D),p(Y,I)}for(var G=0;G<S.length;G++){var U=S[G];m(U)}var z=h(P,L);return P.forEach(function(Q){var $=Q._scratch;$&&($.x=Q.pos.x,$.y=Q.pos.y)}),z}a.exports={tick:w}},function(a,s,c){var f=c(2),h=function(d){d&&d("layout","euler",f)};typeof cytoscape<"u"&&h(cytoscape),a.exports=h},function(a,s,c){a.exports=Object.freeze({animate:!0,refresh:10,maxIterations:1e3,maxSimulationTime:4e3,ungrabifyWhileSimulating:!1,fit:!0,padding:30,boundingBox:void 0,ready:function(){},stop:function(){},randomize:!1,infinite:!1})},function(a,s,c){var f=function(){function T(j,I){for(var D=0;D<I.length;D++){var R=I[D];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(j,R.key,R)}}return function(j,I,D){return I&&T(j.prototype,I),D&&T(j,D),j}}();function h(T,j){if(!(T instanceof j))throw new TypeError("Cannot call a class as a function")}var d=c(0),p=c(12),b=c(14),m=c(15),w=m.setInitialPositionState,k=m.refreshPositions,P=m.getNodePositionData,S=c(16),M=S.multitick,L=function(){function T(j){h(this,T);var I=this.options=d({},p,j),D=I.eles.nodes();if(!I.randomize){D=D.sort(function(U,z){return U.position().x-z.position().x});var R={x:0,y:0},Y={};D.forEach(function(U){Object.assign(Y,U.position()),Math.abs(R.x-Y.x)<I.theta&&Math.abs(R.y-Y.y)<I.theta&&U.position({x:Math.random()*100,y:Math.random()*100}),Object.assign(R,Y)})}var G=this.state=d({},I,{layout:this,nodes:D,edges:I.eles.edges(),tickIndex:0,firstUpdate:!0});G.animateEnd=I.animate&&I.animate==="end",G.animateContinuously=I.animate&&!G.animateEnd}return f(T,[{key:"run",value:function(){var j=this,I=this.state;if(I.tickIndex=0,I.firstUpdate=!0,I.startTime=Date.now(),I.running=!0,I.currentBoundingBox=b(I.boundingBox,I.cy),I.ready&&j.one("ready",I.ready),I.stop&&j.one("stop",I.stop),I.nodes.forEach(function(fe){return w(fe,I)}),j.prerun(I),I.animateContinuously){var D=function(fe){if(I.ungrabifyWhileSimulating){var pe=P(fe,I).grabbable=fe.grabbable();pe&&fe.ungrabify()}},R=function(fe){if(I.ungrabifyWhileSimulating){var pe=P(fe,I).grabbable;pe&&fe.grabify()}},Y=function(fe){return P(fe,I).grabbed=fe.grabbed()},G=function(fe){var pe=fe.target;Y(pe)},U=G,z=function(fe){var pe=fe.target,me=P(pe,I),Te=pe.position();me.x=Te.x,me.y=Te.y},Q=function(fe){fe.on("grab",G),fe.on("free",U),fe.on("drag",z)},$=function(fe){fe.removeListener("grab",G),fe.removeListener("free",U),fe.removeListener("drag",z)},Z=function(){I.fit&&I.animateContinuously&&I.cy.fit(I.padding)},X=function(){k(I.nodes,I),Z(),requestAnimationFrame(K)},K=function(){M(I,X,ae)},ae=function(){k(I.nodes,I),Z(),I.nodes.forEach(function(fe){R(fe),$(fe)}),I.running=!1,j.emit("layoutstop")};j.emit("layoutstart"),I.nodes.forEach(function(fe){D(fe),Q(fe)}),K()}else{for(var se=!1,le=function(){},he=function(){return se=!0};!se;)M(I,le,he);I.eles.layoutPositions(this,I,function(fe){var pe=P(fe,I);return{x:pe.x,y:pe.y}})}return j.postrun(I),this}},{key:"prerun",value:function(){}},{key:"postrun",value:function(){}},{key:"tick",value:function(){}},{key:"stop",value:function(){return this.state.running=!1,this}},{key:"destroy",value:function(){return this}}]),T}();a.exports=L},function(a,s,c){a.exports=function(f,h){return f==null?f={x1:0,y1:0,w:h.width(),h:h.height()}:f={x1:f.x1,x2:f.x2,y1:f.y1,y2:f.y2,w:f.w,h:f.h},f.x2==null&&(f.x2=f.x1+f.w),f.w==null&&(f.w=f.x2-f.x1),f.y2==null&&(f.y2=f.y1+f.h),f.h==null&&(f.h=f.y2-f.y1),f}},function(a,s,c){var f=c(0),h=function(b,m){var w=b.position(),k=m.currentBoundingBox,P=b.scratch(m.name);P==null&&(P={},b.scratch(m.name,P)),f(P,m.randomize?{x:k.x1+Math.random()*k.w,y:k.y1+Math.random()*k.h}:{x:w.x,y:w.y}),P.locked=b.locked()},d=function(b,m){return b.scratch(m.name)},p=function(b,m){b.positions(function(w){var k=w.scratch(m.name);return{x:k.x,y:k.y}})};a.exports={setInitialPositionState:h,getNodePositionData:d,refreshPositions:p}},function(a,s,c){var f=function(){},h=function(p){var b=p,m=p.layout,w=m.tick(b);b.firstUpdate&&(b.animateContinuously&&b.layout.emit("layoutready"),b.firstUpdate=!1),b.tickIndex++;var k=Date.now()-b.startTime;return!b.infinite&&(w||b.tickIndex>=b.maxIterations||k>=b.maxSimulationTime)},d=function(p){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f,w=!1,k=p,P=0;P<k.refresh&&(w=!k.running||h(k),!w);P++);w?m():b()};a.exports={tick:h,multitick:d}}])})})(jV);var uve=jV.exports;const cve=A0(uve);Cu.use(Ade),Cu.use(Kbe),Cu.use(ive),Cu.use(sve),Cu.use(cve);let lve=0;function fve(t){return`${t}${Date.now()}_${++lve}`}const AV={random:{label:"Random",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"fit",label:"Fit to viewport",type:"boolean",default:!0}]},grid:{label:"Grid",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacingFactor",label:"Spacing factor",type:"number",default:1,min:.1,max:5,step:.1},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"condense",label:"Condense",type:"boolean",default:!1},{name:"rows",label:"Rows (0=auto)",type:"number",default:0,min:0},{name:"cols",label:"Columns (0=auto)",type:"number",default:0,min:0}]},circle:{label:"Circle",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacingFactor",label:"Spacing factor",type:"number",default:1.75,min:.1,max:5,step:.1},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"radius",label:"Radius (0=auto)",type:"number",default:0,min:0},{name:"clockwise",label:"Clockwise",type:"boolean",default:!0}]},concentric:{label:"Concentric",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacingFactor",label:"Spacing factor",type:"number",default:1.75,min:.1,max:5,step:.1},{name:"minNodeSpacing",label:"Min node spacing",type:"number",default:10,min:0},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"equidistant",label:"Equidistant rings",type:"boolean",default:!1},{name:"clockwise",label:"Clockwise",type:"boolean",default:!1}]},breadthfirst:{label:"Breadth-first",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacingFactor",label:"Spacing factor",type:"number",default:1.75,min:.1,max:5,step:.1},{name:"directed",label:"Directed",type:"boolean",default:!1},{name:"circle",label:"Circular roots",type:"boolean",default:!1},{name:"grid",label:"Grid mode",type:"boolean",default:!1},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"maximalAdjacencies",label:"Maximal adjacencies",type:"boolean",default:!1}]},cose:{label:"CoSE (force-directed)",builtin:!0,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"nodeRepulsion",label:"Node repulsion",type:"number",default:2048,min:0,max:1e5},{name:"idealEdgeLength",label:"Ideal edge length",type:"number",default:32,min:1},{name:"edgeElasticity",label:"Edge elasticity",type:"number",default:32,min:0},{name:"gravity",label:"Gravity",type:"number",default:1,min:0},{name:"numIter",label:"Iterations",type:"number",default:1e3,min:1,max:1e4},{name:"randomize",label:"Randomize start",type:"boolean",default:!0},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"fit",label:"Fit to viewport",type:"boolean",default:!0}]},dagre:{label:"Dagre (DAG/hierarchical)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacingFactor",label:"Spacing factor",type:"number",default:1,min:.1,max:5,step:.1},{name:"rankDir",label:"Direction",type:"select",default:"TB",options:["TB","BT","LR","RL"]},{name:"align",label:"Alignment",type:"select",default:"UL",options:["UL","UR","DL","DR"]},{name:"ranker",label:"Ranker",type:"select",default:"network-simplex",options:["network-simplex","tight-tree","longest-path"]},{name:"nodeSep",label:"Node separation",type:"number",default:50,min:0},{name:"rankSep",label:"Rank separation",type:"number",default:50,min:0},{name:"edgeSep",label:"Edge separation",type:"number",default:10,min:0}]},cola:{label:"Cola (constraint-based)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"nodeSpacing",label:"Node spacing",type:"number",default:10,min:0},{name:"edgeLength",label:"Edge length",type:"number",default:45,min:1},{name:"maxSimulationTime",label:"Max simulation time (ms)",type:"number",default:4e3,min:100},{name:"avoidOverlap",label:"Avoid overlap",type:"boolean",default:!0},{name:"handleDisconnected",label:"Handle disconnected",type:"boolean",default:!0},{name:"unconstrIter",label:"Unconstrained iterations",type:"number",default:10,min:0},{name:"userConstIter",label:"User constrained iterations",type:"number",default:20,min:0},{name:"allConstIter",label:"All constrained iterations",type:"number",default:20,min:0}]},fcose:{label:"fCoSE (fast force-directed)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"nodeSeparation",label:"Node separation",type:"number",default:75,min:0},{name:"idealEdgeLength",label:"Ideal edge length",type:"number",default:50,min:1},{name:"edgeElasticity",label:"Edge elasticity",type:"number",default:.45,min:0,max:1,step:.01},{name:"gravity",label:"Gravity",type:"number",default:.25,min:0,step:.01},{name:"gravityRange",label:"Gravity range",type:"number",default:3.8,min:0,step:.1},{name:"numIter",label:"Iterations",type:"number",default:2500,min:100},{name:"randomize",label:"Randomize start",type:"boolean",default:!0},{name:"fit",label:"Fit to viewport",type:"boolean",default:!0}]},elk:{label:"ELK",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:20,min:0},{name:"elk.algorithm",label:"Algorithm",type:"select",default:"layered",options:["layered","stress","mrtree","radial","force","disco"]},{name:"elk.direction",label:"Direction",type:"select",default:"DOWN",options:["DOWN","UP","RIGHT","LEFT"]},{name:"elk.spacing.nodeNode",label:"Node spacing",type:"number",default:20,min:0}]},euler:{label:"Euler (force-directed)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"springLength",label:"Spring length",type:"number",default:80,min:1},{name:"springCoeff",label:"Spring coefficient",type:"number",default:8e-4,min:0,step:1e-4},{name:"mass",label:"Node mass",type:"number",default:4,min:1},{name:"gravity",label:"Gravity",type:"number",default:-1.2,step:.1},{name:"pull",label:"Pull force",type:"number",default:.001,min:0,step:1e-4},{name:"theta",label:"Theta (Barnes-Hut)",type:"number",default:.666,min:0,max:1,step:.001},{name:"maxIterations",label:"Max iterations",type:"number",default:1e3,min:100},{name:"randomize",label:"Randomize start",type:"boolean",default:!0},{name:"fit",label:"Fit to viewport",type:"boolean",default:!0}]},spread:{label:"Spread",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"minDist",label:"Min distance",type:"number",default:1,min:0},{name:"expandingFactor",label:"Expanding factor",type:"number",default:-1,step:.1},{name:"maxExpandIterations",label:"Max expand iterations",type:"number",default:4,min:1},{name:"fit",label:"Fit to viewport",type:"boolean",default:!0}]},klay:{label:"KLay (hierarchical)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:30,min:0},{name:"spacing",label:"Spacing",type:"number",default:20,min:0},{name:"klay.direction",label:"Direction",type:"select",default:"DOWN",options:["DOWN","UP","RIGHT","LEFT"]},{name:"klay.edgeRouting",label:"Edge routing",type:"select",default:"ORTHOGONAL",options:["ORTHOGONAL","POLYLINE","SPLINES"]},{name:"klay.nodeLayering",label:"Node layering",type:"select",default:"NETWORK_SIMPLEX",options:["NETWORK_SIMPLEX","LONGEST_PATH","INTERACTIVE"]}]},avsdf:{label:"AVSDF (circular)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:10,min:0},{name:"nodeSeparation",label:"Node separation",type:"number",default:60,min:0}]},cise:{label:"CiSE (clustered)",builtin:!1,params:[{name:"padding",label:"Padding",type:"number",default:10,min:0},{name:"nodeSeparation",label:"Node separation",type:"number",default:12.5,min:0},{name:"idealInterClusterEdgeLengthCoefficient",label:"Inter-cluster edge length",type:"number",default:1.4,min:0,step:.1},{name:"allowNodesInsideCircle",label:"Allow nodes inside circle",type:"boolean",default:!1},{name:"maxRatioOfNodesInsideCircle",label:"Max ratio inside circle",type:"number",default:.1,min:0,max:1,step:.01},{name:"springCoeff",label:"Spring coefficient",type:"number",default:.45,min:0,max:1,step:.01},{name:"nodeRepulsion",label:"Node repulsion",type:"number",default:4500,min:0},{name:"gravity",label:"Gravity",type:"number",default:.25,min:0,step:.01},{name:"gravityRange",label:"Gravity range",type:"number",default:3.8,min:0,step:.1}]}};class hve{constructor(r,a={}){var s;if(!r)throw new Error("Container element is required");this.container=r,this.options={layout:a.layout||{name:"preset"},...a},this._instanceId=Math.random().toString(36).slice(2,9),this.userStylesheet=(a.style||[]).map(c=>({selector:c.selector,style:{...c.style}})),this._nodeTypes=(a.nodeTypes||[]).map(c=>({...c})),this._edgeTypes=(a.edgeTypes||[]).map(c=>({...c})),this.currentEdgeType=this._edgeTypes[0]||null,this.cy=null,this.eventHandlers=new Map,this._lastLayout={name:"dagre",options:{rankdir:"LR",ranksep:60,nodesep:30}},this._undoStack=[],this._redoStack=[],this._restoringState=!1,this._preGrabSnapshot=null,this._clipboard=null,this._pasteOffset=0,this._currentNodeTypeId=((s=this._nodeTypes[0])==null?void 0:s.id)||null,this._selectedElement=null,this._ctxTarget=null,this._ctxPosition=null,this.context={...a.context||{}},this._init(),a.edgeHandle!==!1&&typeof document<"u"&&document.body&&this._initEdgeHandle()}_esc(r){return String(r??"").replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}_injectCSS(){if(document.getElementById("bxe-styles"))return;const r=document.createElement("style");r.id="bxe-styles",r.textContent=`
|
|
340
|
+
.bxe-wrap { display:flex; width:100%; height:100%; overflow:hidden; font-family:system-ui,sans-serif; font-size:13px; }
|
|
341
|
+
.bxe-wrap *, .bxe-wrap *::before, .bxe-wrap *::after { box-sizing:border-box; }
|
|
342
|
+
.bxe-canvas-wrap { flex:1; min-width:0; height:100%; position:relative; overflow:hidden; }
|
|
343
|
+
.bxe-canvas { width:100%; height:100%; }
|
|
344
|
+
.bxe-panzoom { position:absolute; bottom:12px; right:12px; display:flex; flex-direction:column; gap:3px; z-index:10; }
|
|
345
|
+
.bxe-pz-btn { width:28px; height:28px; background:#fff; border:1px solid #aaa; border-radius:4px; cursor:pointer; font-size:15px; font-weight:bold; line-height:1; padding:0; color:#444; display:flex; align-items:center; justify-content:center; box-shadow:0 1px 3px rgba(0,0,0,.15); }
|
|
346
|
+
.bxe-pz-btn:hover { background:#f0f0f0; border-color:#888; }
|
|
347
|
+
.bxe-pz-btn:active { background:#e0e0e0; }
|
|
348
|
+
.bxe-sidebar { width:260px; min-width:260px; height:100%; display:flex; flex-direction:column; background:#f8f9fa; border-left:1px solid #dee2e6; overflow:hidden; }
|
|
349
|
+
.bxe-toolbar { display:flex; gap:4px; padding:4px 8px; background:#fff; border-bottom:1px solid #dee2e6; flex-shrink:0; }
|
|
350
|
+
.bxe-toolbar button { padding:2px 8px; font-size:13px; cursor:pointer; background:#fff; border:1px solid #ccc; border-radius:3px; }
|
|
351
|
+
.bxe-toolbar button:hover:not(:disabled) { background:#f0f0f0; }
|
|
352
|
+
.bxe-toolbar button:disabled { opacity:.4; cursor:default; }
|
|
353
|
+
.bxe-tab-nav { display:flex; background:#fff; border-bottom:1px solid #dee2e6; flex-shrink:0; }
|
|
354
|
+
.bxe-tab-btn { flex:1; padding:6px 4px; font-size:16px; cursor:pointer; background:none; border:none; border-bottom:2px solid transparent; color:#666; }
|
|
355
|
+
.bxe-tab-btn:hover { background:#f0f0f0; }
|
|
356
|
+
.bxe-tab-btn.active { color:#0d6efd; border-bottom-color:#0d6efd; background:#f8f9fa; }
|
|
357
|
+
.bxe-tab-body { flex:1; min-height:0; overflow-y:auto; }
|
|
358
|
+
.bxe-pane { display:none; padding:10px; }
|
|
359
|
+
.bxe-pane.active { display:block; }
|
|
360
|
+
.bxe-pane-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#888; margin-bottom:8px; }
|
|
361
|
+
.bxe-pane-label { font-size:11px; font-weight:600; color:#666; margin-bottom:4px; }
|
|
362
|
+
.bxe-pane-label small { font-weight:normal; color:#999; }
|
|
363
|
+
.bxe-palette { display:flex; flex-direction:column; gap:4px; margin-bottom:10px; }
|
|
364
|
+
.bxe-palette-item { display:flex; align-items:center; gap:8px; padding:5px 8px; border:1px solid #dee2e6; border-radius:5px; cursor:pointer; background:#fff; }
|
|
365
|
+
.bxe-palette-item:hover { background:#e9f0ff; border-color:#90b8f8; }
|
|
366
|
+
.bxe-palette-item.selected { background:#dce8ff; border-color:#4d90fe; }
|
|
367
|
+
.bxe-palette-label { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
368
|
+
.bxe-node-swatch { width:20px; height:20px; border:2px solid #999; flex-shrink:0; }
|
|
369
|
+
.bxe-prop-group { margin-bottom:8px; }
|
|
370
|
+
.bxe-prop-group > label { display:block; font-size:11px; font-weight:600; color:#666; margin-bottom:2px; }
|
|
371
|
+
.bxe-input { width:100%; padding:3px 5px; border:1px solid #ccc; border-radius:3px; font-size:12px; }
|
|
372
|
+
.bxe-input[readonly] { background:#f5f5f5; color:#666; }
|
|
373
|
+
.bxe-prop-table-wrap { border:1px solid #dee2e6; border-radius:4px; overflow:hidden; }
|
|
374
|
+
.bxe-prop-table { width:100%; border-collapse:collapse; font-size:12px; }
|
|
375
|
+
.bxe-prop-table td { padding:2px 4px; border-bottom:1px solid #f0f0f0; vertical-align:top; }
|
|
376
|
+
.bxe-prop-table tr:last-child td { border-bottom:none; }
|
|
377
|
+
.bxe-cell-input { width:100%; border:none; outline:none; font-size:11px; background:transparent; padding:1px 2px; min-height:22px; font-family:inherit; }
|
|
378
|
+
.bxe-cell-input:focus { background:#f0f8ff; }
|
|
379
|
+
.bxe-cell-textarea { resize:vertical; }
|
|
380
|
+
.bxe-btn-del { background:none; border:none; color:#999; cursor:pointer; font-size:14px; line-height:1; padding:0 2px; }
|
|
381
|
+
.bxe-btn-del:hover { color:#dc3545; }
|
|
382
|
+
.bxe-btn-add { display:block; width:100%; margin-top:4px; padding:3px 6px; background:#fff; border:1px solid #ccc; border-radius:3px; font-size:11px; cursor:pointer; text-align:center; }
|
|
383
|
+
.bxe-btn-add:hover { background:#f0f0f0; }
|
|
384
|
+
.bxe-btn-danger { padding:4px 10px; background:#fff; border:1px solid #dc3545; color:#dc3545; border-radius:3px; cursor:pointer; font-size:12px; }
|
|
385
|
+
.bxe-btn-danger:hover { background:#dc3545; color:#fff; }
|
|
386
|
+
.bxe-style-rule { margin-bottom:8px; border:1px solid #dee2e6; border-radius:5px; overflow:hidden; }
|
|
387
|
+
.bxe-style-rule-header { display:flex; align-items:center; gap:4px; background:#e9ecef; padding:4px 6px; }
|
|
388
|
+
.bxe-style-rule-header input { flex:1; border:1px solid #ced4da; border-radius:3px; padding:2px 5px; font-size:11px; font-family:monospace; }
|
|
389
|
+
.bxe-style-rule-props { padding:5px 6px; }
|
|
390
|
+
.bxe-style-prop-row { display:flex; gap:4px; margin-bottom:3px; align-items:center; }
|
|
391
|
+
.bxe-style-prop-row input { flex:1; border:1px solid #e0e0e0; border-radius:3px; padding:2px 4px; font-size:11px; }
|
|
392
|
+
.bxe-btn-link { background:none; border:none; color:#0d6efd; cursor:pointer; font-size:11px; padding:2px 0; }
|
|
393
|
+
.bxe-btn-link:hover { text-decoration:underline; }
|
|
394
|
+
.bxe-empty { color:#999; font-size:12px; text-align:center; padding:12px 0; }
|
|
395
|
+
.bxe-empty-small { color:#999; font-size:11px; padding:2px; }
|
|
396
|
+
.bxe-ctx-menu { position:fixed; z-index:99999; background:#fff; border:1px solid #dee2e6; border-radius:6px; box-shadow:0 4px 16px rgba(0,0,0,.15); min-width:160px; overflow:hidden; }
|
|
397
|
+
.bxe-ctx-item { padding:7px 14px; cursor:pointer; font-size:13px; color:#333; }
|
|
398
|
+
.bxe-ctx-item:hover { background:#f0f4ff; }
|
|
399
|
+
.bxe-ctx-item.danger { color:#dc3545; }
|
|
400
|
+
.bxe-ctx-item.danger:hover { background:#fff0f0; }
|
|
401
|
+
.bxe-ctx-sep { height:1px; background:#dee2e6; }
|
|
402
|
+
.bxe-ctx-row { display:flex; align-items:flex-start; gap:3px; padding:3px 0; border-bottom:1px solid #f0f0f0; }
|
|
403
|
+
.bxe-ctx-key { width:80px; flex-shrink:0; font-family:monospace; }
|
|
404
|
+
.bxe-ctx-val { flex:1; min-width:0; font-family:monospace; font-size:11px; }
|
|
405
|
+
.bxe-ctx-colon { color:#999; font-size:11px; flex-shrink:0; padding-top:3px; }
|
|
406
|
+
.bxe-ctx-obj-val { resize:vertical; min-height:44px; line-height:1.4; white-space:pre; overflow-x:auto; }
|
|
407
|
+
.bxe-ctx-obj-val.bxe-ctx-invalid { border:1px solid #e74c3c !important; background:#fff5f5 !important; }
|
|
408
|
+
.bxe-ctx-type-badge { font-size:9px; color:#888; font-family:monospace; letter-spacing:0; flex-shrink:0; padding-top:4px; }
|
|
409
|
+
.bxe-ctx-addbtns { display:flex; gap:4px; flex-wrap:wrap; padding-top:4px; }
|
|
410
|
+
.bxe-ctx-addbtns .bxe-btn-add { flex:1; }
|
|
411
|
+
`,document.head.appendChild(r)}_createUI(){this.container.style.cssText="display:flex;overflow:hidden;width:100%;height:100%;",this._canvasWrap=document.createElement("div"),this._canvasWrap.className="bxe-canvas-wrap",this.container.appendChild(this._canvasWrap),this._canvasDiv=document.createElement("div"),this._canvasDiv.className="bxe-canvas",this._canvasWrap.appendChild(this._canvasDiv),this._sidebarEl=document.createElement("div"),this._sidebarEl.className="bxe-sidebar";const r=document.createElement("div");r.className="bxe-toolbar",this._undoBtn=document.createElement("button"),this._undoBtn.title="Undo (Ctrl+Z)",this._undoBtn.textContent="↩",this._undoBtn.disabled=!0,this._undoBtn.addEventListener("click",()=>this.undo()),this._redoBtn=document.createElement("button"),this._redoBtn.title="Redo (Ctrl+Y)",this._redoBtn.textContent="↪",this._redoBtn.disabled=!0,this._redoBtn.addEventListener("click",()=>this.redo()),r.appendChild(this._undoBtn),r.appendChild(this._redoBtn),this._sidebarEl.appendChild(r);const a=document.createElement("div");a.className="bxe-tab-nav";const s=[{id:"palette",icon:"✦",title:"Palette"},{id:"properties",icon:"☰",title:"Properties"},{id:"stylesheet",icon:"✏",title:"Stylesheet"},{id:"layout",icon:"⊕",title:"Layout"},{id:"context",icon:"@",title:"Context"}];this._tabBtns={},s.forEach(({id:R,icon:Y,title:G})=>{const U=document.createElement("button");U.className="bxe-tab-btn",U.textContent=Y,U.title=G,U.dataset.tab=R,U.addEventListener("click",()=>this._switchPane(R)),this._tabBtns[R]=U,a.appendChild(U)}),this._sidebarEl.appendChild(a);const c=document.createElement("div");c.className="bxe-tab-body",this._panes={};const f=document.createElement("div");f.className="bxe-pane",f.dataset.pane="palette";const h=document.createElement("div");h.className="bxe-pane-title",h.textContent="Palette",f.appendChild(h);const d=document.createElement("div");d.className="bxe-pane-label",d.innerHTML="Node type <small>(double-click canvas to add)</small>",f.appendChild(d),this._nodePaletteEl=document.createElement("div"),f.appendChild(this._nodePaletteEl);const p=document.createElement("div");p.className="bxe-pane-label",p.innerHTML="Edge type <small>(drag handle to connect)</small>",f.appendChild(p),this._edgePaletteEl=document.createElement("div"),f.appendChild(this._edgePaletteEl),this._nodePaletteEl.addEventListener("click",R=>{const Y=R.target.closest(".bxe-palette-item");Y&&this._selectNodeType(Y.dataset.typeId)}),this._edgePaletteEl.addEventListener("click",R=>{const Y=R.target.closest(".bxe-palette-item");Y&&this.setEdgeType(Y.dataset.typeId)}),this._panes.palette=f;const b=document.createElement("div");b.className="bxe-pane",b.dataset.pane="properties";const m=document.createElement("div");m.className="bxe-pane-title",m.textContent="Properties",b.appendChild(m),this._propsContentEl=document.createElement("div"),b.appendChild(this._propsContentEl),b.addEventListener("input",R=>this._handlePropertiesEvent(R)),b.addEventListener("change",R=>this._handlePropertiesEvent(R)),b.addEventListener("blur",R=>this._handlePropertiesEvent(R),!0),b.addEventListener("click",R=>this._handlePropertiesEvent(R)),this._panes.properties=b;const w=document.createElement("div");w.className="bxe-pane",w.dataset.pane="stylesheet";const k=document.createElement("div");k.className="bxe-pane-title",k.textContent="Stylesheet",w.appendChild(k),this._stylesheetRulesEl=document.createElement("div"),w.appendChild(this._stylesheetRulesEl);const P=document.createElement("button");P.className="bxe-btn-add",P.textContent="+ Add Rule",P.addEventListener("click",()=>{this.addStyleRule("node",{}),this._switchPane("stylesheet")}),w.appendChild(P),w.addEventListener("change",R=>this._handleStylesheetEvent(R)),w.addEventListener("click",R=>this._handleStylesheetEvent(R)),this._panes.stylesheet=w;const S=document.createElement("div");S.className="bxe-pane",S.dataset.pane="layout";const M=document.createElement("div");M.className="bxe-pane-title",M.textContent="Layout",S.appendChild(M),this._layoutPaneContentEl=document.createElement("div"),S.appendChild(this._layoutPaneContentEl),this._panes.layout=S;const L=document.createElement("div");L.className="bxe-pane",L.dataset.pane="context";const T=document.createElement("div");T.className="bxe-pane-title",T.textContent="JSON-LD Context",L.appendChild(T),this._contextEntriesEl=document.createElement("div"),L.appendChild(this._contextEntriesEl);const j=document.createElement("div");j.className="bxe-ctx-addbtns";const I=document.createElement("button");I.className="bxe-btn-add",I.textContent="+ Add Prefix",I.addEventListener("click",()=>this._addContextEntry("prefix"));const D=document.createElement("button");D.className="bxe-btn-add",D.textContent="+ Add Term",D.addEventListener("click",()=>this._addContextEntry("term")),j.appendChild(I),j.appendChild(D),L.appendChild(j),L.addEventListener("change",R=>this._handleContextEvent(R)),L.addEventListener("click",R=>this._handleContextEvent(R)),this._panes.context=L,[f,b,w,S,L].forEach(R=>c.appendChild(R)),this._sidebarEl.appendChild(c),this.container.appendChild(this._sidebarEl),this._ctxMenu=document.createElement("div"),this._ctxMenu.className="bxe-ctx-menu",this._ctxMenu.style.display="none",this._ctxMenu.addEventListener("click",R=>{var Y;const G=R.target.closest(".bxe-ctx-item");if(!G)return;const U=G.dataset.action;if(U==="edit-props")this._ctxTarget&&(this._refreshProperties(this._ctxTarget),this._switchPane("properties"));else if(U==="duplicate"){if((Y=this._ctxTarget)!=null&&Y.isNode()){const z={...this._ctxTarget.data()};delete z.id,z.label=(z.label||"Node")+" (copy)";const Q=this._ctxTarget.position();this.addNode(z,{x:Q.x+50,y:Q.y+50})}}else U==="cut"?this.cut():U==="copy"?this.copy():U==="paste"?this.paste():U==="delete"?(this.cy.$(":selected").length>0?this.removeSelected():this._ctxTarget&&this.removeElement(this._ctxTarget.id()),this._clearProperties()):U==="add-node-here"&&this._ctxPosition&&this._addNodeAtPosition(this._ctxPosition);this._hideContextMenu()}),document.body.appendChild(this._ctxMenu),this._keydownHandler=R=>{var Y,G,U,z;if((R.ctrlKey||R.metaKey)&&R.key==="z"&&!R.shiftKey)R.preventDefault(),this.undo();else if((R.ctrlKey||R.metaKey)&&(R.key==="y"||R.key==="z"&&R.shiftKey))R.preventDefault(),this.redo();else if((R.ctrlKey||R.metaKey)&&R.key==="c"){const Q=(Y=document.activeElement)==null?void 0:Y.tagName;Q!=="INPUT"&&Q!=="TEXTAREA"&&Q!=="SELECT"&&(R.preventDefault(),this.copy())}else if((R.ctrlKey||R.metaKey)&&R.key==="x"){const Q=(G=document.activeElement)==null?void 0:G.tagName;Q!=="INPUT"&&Q!=="TEXTAREA"&&Q!=="SELECT"&&(R.preventDefault(),this.cut())}else if((R.ctrlKey||R.metaKey)&&R.key==="v"){const Q=(U=document.activeElement)==null?void 0:U.tagName;Q!=="INPUT"&&Q!=="TEXTAREA"&&Q!=="SELECT"&&(R.preventDefault(),this.paste())}else if(R.key==="Delete"||R.key==="Backspace"){const Q=(z=document.activeElement)==null?void 0:z.tagName;Q!=="INPUT"&&Q!=="TEXTAREA"&&Q!=="SELECT"&&this.removeSelected()}},document.addEventListener("keydown",this._keydownHandler),this._switchPane("palette"),this._renderContextPane()}_switchPane(r){Object.entries(this._panes).forEach(([a,s])=>{s.classList.toggle("active",a===r)}),Object.entries(this._tabBtns).forEach(([a,s])=>{s.classList.toggle("active",a===r)})}_renderPalette(){var r;const a=this._nodeTypes,s=this._edgeTypes;if(this._nodePaletteEl){if(!a.length)this._nodePaletteEl.innerHTML='<div class="bxe-empty-small">No node types defined</div>';else{this._nodePaletteEl.innerHTML="";const c=document.createElement("div");c.className="bxe-palette",a.forEach((f,h)=>{const d=f.shape==="ellipse"?"50%":f.shape==="roundrectangle"?"5px":"2px",p=f.color||"#e0e0e0",b=f.borderColor||"#999",m=document.createElement("div");m.className="bxe-palette-item"+(h===0?" selected":""),m.dataset.typeId=f.id;const w=document.createElement("div");w.className="bxe-node-swatch",w.style.cssText=`background:${p};border-color:${b};border-radius:${d}`;const k=document.createElement("span");k.className="bxe-palette-label",k.textContent=f.label,m.appendChild(w),m.appendChild(k),c.appendChild(m)}),this._nodePaletteEl.appendChild(c)}if(!s.length)this._edgePaletteEl.innerHTML='<div class="bxe-empty-small">No edge types defined</div>';else{this._edgePaletteEl.innerHTML="";const c=document.createElement("div");c.className="bxe-palette",s.forEach((f,h)=>{const d=f.color||"#666666",p=f.lineStyle==="dashed"?"6,3":f.lineStyle==="dotted"?"2,3":"none",b=`bxe-arr-${this._instanceId}-${String(f.id).replace(/[^a-zA-Z0-9]/g,"_")}`,m=document.createElement("div");m.className="bxe-palette-item"+(h===0?" selected":""),m.dataset.typeId=f.id;const w=p==="none"?`<line x1="4" y1="11" x2="34" y2="11" stroke="${d}" stroke-width="2" marker-end="url(#${b})"/>`:`<line x1="4" y1="11" x2="34" y2="11" stroke="${d}" stroke-width="2" stroke-dasharray="${p}" marker-end="url(#${b})"/>`;m.innerHTML=`<svg width="44" height="22" style="flex-shrink:0;overflow:visible"><defs><marker id="${b}" markerWidth="6" markerHeight="6" refX="5" refY="3" orient="auto"><path d="M0,0 L6,3 L0,6 Z" fill="${d}"/></marker></defs>${w}</svg><span class="bxe-palette-label">${this._esc(f.label)}</span>`,c.appendChild(m)}),this._edgePaletteEl.appendChild(c)}this._currentNodeTypeId=((r=a[0])==null?void 0:r.id)||null,s[0]&&(this.currentEdgeType=s[0])}}_selectNodeType(r){this._currentNodeTypeId=r,this._nodePaletteEl&&this._nodePaletteEl.querySelectorAll(".bxe-palette-item").forEach(a=>{a.classList.toggle("selected",a.dataset.typeId===r)})}_addNodeAtPosition(r){this._currentNodeTypeId?this.addNodeOfType(this._currentNodeTypeId,r):this.addNode({label:"New Node"},r)}_refreshProperties(r){if(this._selectedElement=r,!this._propsContentEl)return;const a=r.data(),s=r.isNode(),c=new Set(["id","label","source","target","_style"]),f=Object.keys(a).filter(b=>!c.has(b)),h=this._esc(a.id||"");let d=`
|
|
412
|
+
<div class="bxe-prop-group">
|
|
413
|
+
<label>ID</label>
|
|
414
|
+
<input class="bxe-input" type="text" value="${h}" readonly data-field="id">
|
|
415
|
+
</div>
|
|
416
|
+
<div class="bxe-prop-group">
|
|
417
|
+
<label>Label</label>
|
|
418
|
+
<input class="bxe-input" type="text" value="${this._esc(a.label||"")}" placeholder="Enter label" data-field="label" data-element-id="${h}">
|
|
419
|
+
</div>`;s||(d+=`
|
|
420
|
+
<div class="bxe-prop-group">
|
|
421
|
+
<label>Source → Target</label>
|
|
422
|
+
<input class="bxe-input" type="text" value="${this._esc(a.source)} → ${this._esc(a.target)}" readonly>
|
|
423
|
+
</div>`);let p="";f.length?f.forEach(b=>{p+=`
|
|
424
|
+
<tr class="bxe-prop-row" data-key="${this._esc(b)}">
|
|
425
|
+
<td><input class="bxe-cell-input" type="text" value="${this._esc(b)}" placeholder="key" data-field="key"></td>
|
|
426
|
+
<td><textarea class="bxe-cell-input bxe-cell-textarea" placeholder="value" data-field="value" rows="1">${this._esc(String(a[b]??""))}</textarea></td>
|
|
427
|
+
<td><button class="bxe-btn-del" data-action="del-prop" title="Remove">×</button></td>
|
|
428
|
+
</tr>`}):p='<tr class="bxe-no-props-row"><td colspan="3" class="bxe-empty-small">No properties</td></tr>',d+=`
|
|
429
|
+
<div class="bxe-prop-group">
|
|
430
|
+
<label>Properties</label>
|
|
431
|
+
<div class="bxe-prop-table-wrap">
|
|
432
|
+
<table class="bxe-prop-table">
|
|
433
|
+
<colgroup><col style="width:35%"><col style="width:55%"><col style="width:22px"></colgroup>
|
|
434
|
+
<tbody class="bxe-props-tbody" data-element-id="${h}">${p}</tbody>
|
|
435
|
+
</table>
|
|
436
|
+
</div>
|
|
437
|
+
<button class="bxe-btn-add" data-action="add-prop">+ Add Property</button>
|
|
438
|
+
</div>
|
|
439
|
+
<div style="padding-top:8px;border-top:1px solid #eee;">
|
|
440
|
+
<button class="bxe-btn-danger" data-action="delete-el" data-element-id="${h}">Delete</button>
|
|
441
|
+
</div>`,this._propsContentEl.innerHTML=d}_clearProperties(){this._selectedElement=null,this._propsContentEl&&(this._propsContentEl.innerHTML='<div class="bxe-empty">Select a node or edge<br>to edit its properties</div>')}_handlePropertiesEvent(r){var a,s,c;const f=r.target;if(!(!f||!this._selectedElement)){if(r.type==="input"&&f.dataset.field==="label"){const h=this._selectedElement.id();this.updateElement(h,{label:f.value});return}if(r.type==="input"&&f.dataset.field==="value"){const h=f.closest("tr.bxe-prop-row");if(!h)return;const d=h.dataset.key;if(!d)return;this.updateElement(this._selectedElement.id(),{[d]:f.value});return}if(r.type==="blur"&&f.dataset.field==="key"){const h=f.closest("tr.bxe-prop-row");if(!h)return;const d=h.dataset.key,p=f.value.trim();if(!p)return;const b=this._selectedElement.id();if(d&&d!==p){const m=h.querySelector('[data-field="value"]'),w=m?m.value:"";this.updateElement(b,{[d]:void 0,[p]:w})}else if(!d&&p){const m=h.querySelector('[data-field="value"]'),w=m?m.value:"";this.updateElement(b,{[p]:w})}h.dataset.key=p;return}if(r.type==="click"&&f.dataset.action==="add-prop"){const h=(a=this._propsContentEl)==null?void 0:a.querySelector(".bxe-props-tbody");if(!h)return;(s=h.querySelector(".bxe-no-props-row"))==null||s.remove();const d=document.createElement("tr");d.className="bxe-prop-row",d.dataset.key="",d.innerHTML=`
|
|
442
|
+
<td><input class="bxe-cell-input" type="text" value="" placeholder="key" data-field="key"></td>
|
|
443
|
+
<td><textarea class="bxe-cell-input bxe-cell-textarea" placeholder="value" data-field="value" rows="1"></textarea></td>
|
|
444
|
+
<td><button class="bxe-btn-del" data-action="del-prop" title="Remove">×</button></td>`,h.appendChild(d),d.querySelector('[data-field="key"]').focus();return}if(r.type==="click"&&f.dataset.action==="del-prop"){const h=f.closest("tr.bxe-prop-row");if(!h)return;const d=h.dataset.key;d&&this.updateElement(this._selectedElement.id(),{[d]:void 0}),h.remove();const p=(c=this._propsContentEl)==null?void 0:c.querySelector(".bxe-props-tbody");p&&!p.querySelector(".bxe-prop-row")&&(p.innerHTML='<tr class="bxe-no-props-row"><td colspan="3" class="bxe-empty-small">No properties</td></tr>');return}if(r.type==="click"&&f.closest('[data-action="delete-el"]')){if(this.cy.$(":selected").length>0)this.removeSelected();else{const h=this._selectedElement.id();this.removeElement(h)}this._clearProperties()}}}_refreshStylesheet(){if(!this._stylesheetRulesEl)return;const r=this.userStylesheet;if(!r.length){this._stylesheetRulesEl.innerHTML='<div class="bxe-empty">No style rules yet.</div>';return}this._stylesheetRulesEl.innerHTML=r.map((a,s)=>{const c=Object.entries(a.style||{}).map(([f,h])=>`
|
|
445
|
+
<div class="bxe-style-prop-row">
|
|
446
|
+
<input type="text" value="${this._esc(f)}" placeholder="property" data-field="key" data-rule="${s}" data-prop="${this._esc(f)}">
|
|
447
|
+
<input type="text" value="${this._esc(h)}" placeholder="value" data-field="value" data-rule="${s}" data-prop="${this._esc(f)}">
|
|
448
|
+
<button class="bxe-btn-del" data-action="del-prop" data-rule="${s}" data-prop="${this._esc(f)}" title="Remove">×</button>
|
|
449
|
+
</div>`).join("");return`
|
|
450
|
+
<div class="bxe-style-rule" data-rule="${s}">
|
|
451
|
+
<div class="bxe-style-rule-header">
|
|
452
|
+
<input type="text" value="${this._esc(a.selector)}" placeholder="selector" data-field="selector" data-rule="${s}">
|
|
453
|
+
<button class="bxe-btn-del" data-action="del-rule" data-rule="${s}" title="Delete rule">🗑</button>
|
|
454
|
+
</div>
|
|
455
|
+
<div class="bxe-style-rule-props">
|
|
456
|
+
${c}
|
|
457
|
+
<button class="bxe-btn-link" data-action="add-prop" data-rule="${s}">+ property</button>
|
|
458
|
+
</div>
|
|
459
|
+
</div>`}).join("")}_handleStylesheetEvent(r){const a=r.target;if(a){if(r.type==="change"){if(a.dataset.field==="selector"){const s=parseInt(a.dataset.rule),c=this.userStylesheet[s];c&&this.updateStyleRule(s,a.value,c.style);return}if(a.dataset.field==="key"){const s=parseInt(a.dataset.rule),c=a.dataset.prop,f=a.value.trim();if(!f)return;const h=this.userStylesheet[s];if(!h)return;const d={...h.style},p=d[c];delete d[c],d[f]=p,this.updateStyleRule(s,h.selector,d);return}if(a.dataset.field==="value"){const s=parseInt(a.dataset.rule),c=a.dataset.prop,f=this.userStylesheet[s];if(!f)return;this.updateStyleRule(s,f.selector,{...f.style,[c]:a.value});return}}if(r.type==="click"){if(a.dataset.action==="del-rule"){this.removeStyleRule(parseInt(a.dataset.rule));return}if(a.dataset.action==="del-prop"){const s=parseInt(a.dataset.rule),c=a.dataset.prop,f=this.userStylesheet[s];if(!f)return;const h={...f.style};delete h[c],this.updateStyleRule(s,f.selector,h);return}if(a.dataset.action==="add-prop"){const s=parseInt(a.dataset.rule),c=prompt("CSS property name (e.g. background-color):");if(!c)return;const f=prompt(`Value for "${c}":`)??"",h=this.userStylesheet[s];if(!h)return;this.updateStyleRule(s,h.selector,{...h.style,[c]:f});return}}}}_showContextMenu(r,a,s){this._ctxTarget=s;const c=s.isNode(),f=this.cy.$(":selected").length,h=f>1?`Delete (${f})`:"Delete",d=f>0,p=!!this._clipboard;this._ctxMenu.innerHTML=`
|
|
460
|
+
<div class="bxe-ctx-item" data-action="edit-props">Edit Properties</div>
|
|
461
|
+
<div class="bxe-ctx-sep"></div>
|
|
462
|
+
${d?`<div class="bxe-ctx-item" data-action="cut">Cut${f>1?` (${f})`:""}</div>`:""}
|
|
463
|
+
${d?`<div class="bxe-ctx-item" data-action="copy">Copy${f>1?` (${f})`:""}</div>`:""}
|
|
464
|
+
${p?'<div class="bxe-ctx-item" data-action="paste">Paste</div>':""}
|
|
465
|
+
${d||p?'<div class="bxe-ctx-sep"></div>':""}
|
|
466
|
+
${c&&!d?'<div class="bxe-ctx-item" data-action="duplicate">Duplicate</div><div class="bxe-ctx-sep"></div>':""}
|
|
467
|
+
<div class="bxe-ctx-item danger" data-action="delete">${this._esc(h)}</div>`,this._ctxMenu.style.left=r+"px",this._ctxMenu.style.top=a+"px",this._ctxMenu.style.display="block",setTimeout(()=>document.addEventListener("click",()=>this._hideContextMenu(),{once:!0}),50)}_showBackgroundContextMenu(r,a){const s=!!this._clipboard;this._ctxMenu.innerHTML=`
|
|
468
|
+
<div class="bxe-ctx-item" data-action="add-node-here">Add Node Here</div>
|
|
469
|
+
${s?'<div class="bxe-ctx-sep"></div><div class="bxe-ctx-item" data-action="paste">Paste</div>':""}`,this._ctxMenu.style.left=r+"px",this._ctxMenu.style.top=a+"px",this._ctxMenu.style.display="block",setTimeout(()=>document.addEventListener("click",()=>this._hideContextMenu(),{once:!0}),50)}_hideContextMenu(){this._ctxMenu&&(this._ctxMenu.style.display="none")}_updateHistoryButtons(){this._undoBtn&&(this._undoBtn.disabled=!this.canUndo()),this._redoBtn&&(this._redoBtn.disabled=!this.canRedo())}_init(){this._injectCSS(),this._createUI();const r=this._buildStylesheet();this.cy=Cu({container:this._canvasDiv,elements:this.options.elements||{nodes:[],edges:[]},style:r,layout:this.options.layout,userZoomingEnabled:!0,userPanningEnabled:!0,boxSelectionEnabled:!0}),this._initPanzoomControls(),this._setupEvents(),this._renderPalette(),this.createLayoutPanel(this._layoutPaneContentEl),this._refreshStylesheet()}_buildStylesheet(){const r=[{selector:"node",style:{label:"data(label)","text-valign":"center","text-halign":"center","background-color":"#666",color:"#fff","font-size":"12px",width:"60px",height:"60px"}},{selector:"edge",style:{label:"data(label)",width:2,"line-color":"#999","target-arrow-color":"#999","target-arrow-shape":"triangle","curve-style":"bezier","font-size":"10px"}},{selector:":selected",style:{"overlay-color":"#4A90E2","overlay-padding":6,"overlay-opacity":.25,"border-width":3,"border-color":"#4A90E2"}},{selector:".eh-source",style:{"border-width":3,"border-color":"#3498db"}},{selector:".eh-target",style:{"border-width":3,"border-color":"#3498db"}},{selector:".eh-preview, .eh-ghost-edge",style:{"background-color":"#3498db","line-color":"#3498db","target-arrow-color":"#3498db","source-arrow-color":"#3498db","line-style":"dashed"}},{selector:".eh-ghost-edge.eh-preview-active",style:{opacity:0}}],a=this.userStylesheet,s=this._generateElementStyles();return[...r,...a,...s]}_generateElementStyles(){const r=[];if(this.cy)this.cy.elements().forEach(a=>{const s=a.data("_style");if(s&&Object.keys(s).length>0){const c=a.isNode()?"node":"edge";r.push({selector:`${c}[id="${a.id()}"]`,style:s})}});else{const a=this.options.elements||{nodes:[],edges:[]};(a.nodes||[]).forEach(s=>{s.data&&s.data._style&&r.push({selector:`node[id="${s.data.id}"]`,style:s.data._style})}),(a.edges||[]).forEach(s=>{s.data&&s.data._style&&r.push({selector:`edge[id="${s.data.id}"]`,style:s.data._style})})}return r}_setupEvents(){this.cy.on("add remove data",r=>{this._emit("change",{type:r.type,target:r.target})}),this.cy.on("select",r=>{this._emit("select",{target:r.target}),this._emit("selectionChange",{type:"select",target:r.target,selected:this.cy.$(":selected").jsons()}),this._selectedElement=r.target,this._refreshProperties(r.target),this._switchPane("properties")}),this.cy.on("unselect",r=>{this._emit("unselect",{target:r.target}),this._emit("selectionChange",{type:"unselect",target:r.target,selected:this.cy.$(":selected").jsons()}),this.cy.$(":selected").length||this._clearProperties()}),this.cy.on("grabon","node",r=>{if(this._restoringState||this._ehDrawing)return;const a=r.target.position();this._preGrabPos={x:a.x,y:a.y},this._preGrabSnapshot=this.exportGraph()}),this.cy.on("free","node",r=>{if(this._restoringState||this._ehDrawing||!this._preGrabSnapshot)return;const a=r.target.position();(a.x!==this._preGrabPos.x||a.y!==this._preGrabPos.y)&&(this._undoStack.push(this._preGrabSnapshot),this._undoStack.length>50&&this._undoStack.shift(),this._redoStack.length=0,this._emitHistoryChange()),this._preGrabSnapshot=null,this._preGrabPos=null}),this.cy.on("dbltap",r=>{r.target===this.cy&&this._addNodeAtPosition(r.position)}),this.cy.on("cxttap","node,edge",r=>{r.preventDefault(),this._showContextMenu(r.originalEvent.clientX,r.originalEvent.clientY,r.target)}),this.cy.on("cxttap",r=>{r.target===this.cy&&(r.preventDefault(),this._ctxPosition=r.position,this._showBackgroundContextMenu(r.originalEvent.clientX,r.originalEvent.clientY))}),this.cy.on("tap",()=>this._hideContextMenu())}addNode(r,a=null,s={}){this._pushUndo();const c={...r};Object.keys(s).length>0&&(c._style={...c._style||{},...s});const f={group:"nodes",data:c};a&&typeof a.x=="number"&&(f.position=a);const h=this.cy.add(f);return this._updateStylesheet(),this._emit("nodeAdded",{node:h.json()}),h.json()}addEdge(r,a,s={},c={}){this._pushUndo();const f={source:r,target:a,...s};Object.keys(c).length>0&&(f._style=c);const h=this.cy.add({group:"edges",data:f});return this._updateStylesheet(),this._emit("edgeAdded",{edge:h.json()}),h.json()}removeElement(r){this._pushUndo();const a=this.cy.getElementById(r);if(a.length>0){const s=a.json();return a.remove(),this._emit("elementRemoved",{element:s}),!0}return!1}updateElement(r,a,s=null){this._pushUndo();const c=this.cy.getElementById(r);if(c.length===0)return!1;const f=c.data(),h={...a};return s!==null?h._style={...f._style,...s}:f._style&&(h._style=f._style),c.data(h),s!==null&&this._updateStylesheet(),this._emit("elementUpdated",{element:c.json()}),c.json()}updateElementStyle(r,a){this._pushUndo();const s=this.cy.getElementById(r);if(s.length===0)return!1;const c={...s.data("_style")||{},...a};return s.data("_style",c),this._updateStylesheet(),this._emit("styleUpdated",{elementId:r,style:c}),c}_updateStylesheet(){const r=this._buildStylesheet();this.cy.style().fromJson(r).update()}runLayout(r){this._pushUndo(),typeof r=="string"&&(r={name:r});const{name:a,...s}=r;this._lastLayout={name:a,options:{...s}};const c=this.cy.nodes(":selected"),f=c.length>0?c.add(c.edgesWith(c)):this.cy;this._stopRunningLayout();const h=f.layout(r);this._runningLayout=h,h.one("layoutstop",()=>{this._runningLayout=null}),h.run(),this._emit("layoutRun",{options:r})}_stopRunningLayout(){if(this._runningLayout){try{this._runningLayout.stop()}catch{}this._runningLayout=null}}getLastLayout(){return{...this._lastLayout,options:{...this._lastLayout.options}}}setLastLayout(r,a={}){this._lastLayout={name:r,options:{...a}}}getAvailableLayouts(){return Object.entries(AV).filter(([r,a])=>a.builtin||this._isLayoutRegistered(r)).map(([r,a])=>({name:r,label:a.label,params:a.params}))}getLayoutParams(r){var a;return((a=AV[r])==null?void 0:a.params)||[]}_isLayoutRegistered(r){try{const a=this.cy.layout({name:r,stop:()=>{}});return!!(a&&typeof a.run=="function")}catch{return!1}}getElements(){const r=this.cy.json().elements||{};return{nodes:r.nodes||[],edges:r.edges||[]}}loadElements(r){const a=r.nodes||(Array.isArray(r)?r.filter(c=>c.group==="nodes"):[]),s=r.edges||(Array.isArray(r)?r.filter(c=>c.group==="edges"):[]);this.cy.batch(()=>{this.cy.elements().remove(),a.length&&this.cy.add(a),s.length&&this.cy.add(s)}),this._updateStylesheet(),this._emit("elementsLoaded",{elements:r})}exportGraph(){const r=this.cy.json().elements,a=c=>{if(!c.classes)return c;const f=c.classes.split(" ").filter(h=>!h.startsWith("eh-")).join(" ");return f!==c.classes?{...c,classes:f}:c},s=c=>{const f=c.classes||"";return f.includes("eh-ghost")||f.includes("eh-preview")};return{elements:{nodes:(r.nodes||[]).filter(c=>!s(c)).map(a),edges:(r.edges||[]).filter(c=>!s(c)).map(a)},userStylesheet:this.userStylesheet.map(c=>({selector:c.selector,style:{...c.style}})),lastLayout:this.getLastLayout(),context:{...this.context},version:"1.0.0"}}importGraph(r){r.elements&&this.loadElements(r.elements);const a=r.userStylesheet||r.stylesheet;if(a&&(this.userStylesheet=a.map(s=>({selector:s.selector,style:{...s.style}})),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet})),r.lastLayout&&(this._lastLayout={name:r.lastLayout.name||"dagre",options:{...r.lastLayout.options||{}}},this._layoutPanel&&this._layoutPanelSync()),this._nodesNeedLayout()){const{name:s,options:c}=this._lastLayout;this.runLayout({name:s,...c})}this._emit("graphImported",{graphData:r}),this._stylesheetRulesEl&&this._refreshStylesheet(),r.context&&(this.context={...r.context},this._renderContextPane())}_nodesNeedLayout(){const r=this.cy.nodes();return r.length?r.every(a=>{const s=a.position();return s.x===0&&s.y===0}):!1}getStylesheet(){return this.userStylesheet.map(r=>({selector:r.selector,style:{...r.style}}))}setStylesheet(r){this._pushUndo(),this.userStylesheet=r.map(a=>({selector:a.selector,style:{...a.style}})),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet()}addStyleRule(r,a={}){return this._pushUndo(),this.userStylesheet.push({selector:r,style:{...a}}),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet(),this.userStylesheet.length-1}updateStyleRule(r,a,s){return this._pushUndo(),r<0||r>=this.userStylesheet.length?!1:(this.userStylesheet[r]={selector:a,style:{...s}},this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet(),!0)}removeStyleRule(r){return this._pushUndo(),r<0||r>=this.userStylesheet.length?!1:(this.userStylesheet.splice(r,1),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet}),this._stylesheetRulesEl&&this._refreshStylesheet(),!0)}getSelected(){return this.cy.$(":selected").toArray().map(r=>r.json())}removeSelected(){const r=this.cy.$(":selected");return r.length?(this._pushUndo(),r.forEach(a=>{const s=a.json();this.cy.remove(a),this._emit("elementRemoved",{element:s})}),this._updateStylesheet(),r.length):0}copy(){const r=this.cy.$("node:selected");if(!r.length)return!1;const a=new Set(r.map(c=>c.id())),s=this.cy.$("edge:selected").filter(c=>a.has(c.data("source"))&&a.has(c.data("target"))).add(this.cy.edges().filter(c=>a.has(c.data("source"))&&a.has(c.data("target"))));return this._clipboard={nodes:r.map(c=>c.json()),edges:s.map(c=>c.json())},this._pasteOffset=0,this._emit("clipboardChange",{hasClipboard:!0}),!0}cut(){return this.copy()?(this.removeSelected(),!0):!1}paste(){if(!this._clipboard)return!1;this._pushUndo(),this._pasteOffset+=20;const r=this._pasteOffset,a={},s=[],c=[];this._clipboard.nodes.forEach(h=>{const d="node-"+Math.random().toString(36).slice(2,9);a[h.data.id]=d;const p={...h.data,id:d},b=h.position?{x:h.position.x+r,y:h.position.y+r}:void 0,m={group:"nodes",data:p};b&&(m.position=b),s.push(m)}),this._clipboard.edges.forEach(h=>{const d=a[h.data.source],p=a[h.data.target];if(!d||!p)return;const b="edge-"+Math.random().toString(36).slice(2,9);c.push({group:"edges",data:{...h.data,id:b,source:d,target:p}})}),this.cy.$(":selected").unselect();const f=this.cy.add([...s,...c]);return f.select(),this._updateStylesheet(),this._emit("paste",{nodes:s,edges:c}),f}canPaste(){return!!this._clipboard}_pushUndo(){var r,a;if(this._restoringState)return;const s=this.exportGraph();console.debug("[Boxes] pushUndo: snapshot has",(r=s.elements.nodes)==null?void 0:r.length,"nodes,",(a=s.elements.edges)==null?void 0:a.length,"edges"),this._undoStack.push(s),this._undoStack.length>50&&this._undoStack.shift(),this._redoStack.length=0,this._emitHistoryChange()}_emitHistoryChange(){this._emit("historyChange",{canUndo:this.canUndo(),canRedo:this.canRedo()}),this._updateHistoryButtons()}_restoreSnapshot(r){this._restoringState=!0;try{this.loadElements(r.elements||{}),this.cy.nodes().length&&this.cy.fit(void 0,30),r.userStylesheet&&(this.userStylesheet=r.userStylesheet.map(a=>({selector:a.selector,style:{...a.style}})),this._updateStylesheet(),this._emit("stylesheetChanged",{stylesheet:this.userStylesheet})),r.lastLayout&&(this._lastLayout={name:r.lastLayout.name,options:{...r.lastLayout.options||{}}},this._layoutPanel&&this._layoutPanelSync())}finally{this._restoringState=!1}if(this._emit("graphImported",{graphData:r}),this._stylesheetRulesEl&&this._refreshStylesheet(),this._selectedElement){const a=this.cy.getElementById(this._selectedElement.id());a.length?this._refreshProperties(a):this._clearProperties()}}undo(){var r,a;if(!this._undoStack.length)return!1;this._stopRunningLayout(),this._preGrabSnapshot=null,this._preGrabPos=null,this._redoStack.push(this.exportGraph());const s=this._undoStack.pop();return console.debug("[Boxes] undo: restoring snapshot with",(r=s.elements.nodes)==null?void 0:r.length,"nodes,",(a=s.elements.edges)==null?void 0:a.length,"edges"),this._restoreSnapshot(s),this._emitHistoryChange(),!0}redo(){var r,a;if(!this._redoStack.length)return!1;this._stopRunningLayout(),this._preGrabSnapshot=null,this._preGrabPos=null,this._undoStack.push(this.exportGraph());const s=this._redoStack.pop();return console.debug("[Boxes] redo: restoring snapshot with",(r=s.elements.nodes)==null?void 0:r.length,"nodes,",(a=s.elements.edges)==null?void 0:a.length,"edges"),this._restoreSnapshot(s),this._emitHistoryChange(),!0}canUndo(){return this._undoStack.length>0}canRedo(){return this._redoStack.length>0}selectElements(r){this.cy.elements().unselect(),r.forEach(a=>{this.cy.getElementById(a).select()})}on(r,a){this.eventHandlers.has(r)||this.eventHandlers.set(r,[]),this.eventHandlers.get(r).push(a)}off(r,a){if(!this.eventHandlers.has(r))return;const s=this.eventHandlers.get(r),c=s.indexOf(a);c>-1&&s.splice(c,1)}_emit(r,a){this.eventHandlers.has(r)&&this.eventHandlers.get(r).forEach(s=>{s(a)})}getCytoscape(){return this.cy}destroy(){var r;this._destroyEdgeHandle(),this._destroyLayoutPanel(),this.cy&&(this.cy.destroy(),this.cy=null),this.eventHandlers.clear(),this._ctxMenu&&((r=this._ctxMenu.parentNode)==null||r.removeChild(this._ctxMenu),this._ctxMenu=null),this._keydownHandler&&(document.removeEventListener("keydown",this._keydownHandler),this._keydownHandler=null),this.container&&(this.container.innerHTML="",this.container.style.cssText="")}getNodeTypes(){return this._nodeTypes.map(r=>({...r}))}getEdgeTypes(){return this._edgeTypes.map(r=>({...r}))}addNodeOfType(r,a=null){const s=this._nodeTypes.find(f=>f.id===r);if(!s)return null;const c={id:fve("n"),label:s.label,...s.data};if(!a){const f=this.cy.pan(),h=this.cy.zoom(),d=this.cy.nodes().length*15,p=this._canvasDiv||this.container;a={x:(p.offsetWidth/2-f.x)/h+d%150-75,y:(p.offsetHeight/2-f.y)/h+Math.floor(d/150)*80}}return this.addNode(c,a)}setEdgeType(r){const a=this._edgeTypes.find(s=>s.id===r)||null;this.currentEdgeType=a,this._emit("edgeTypeChanged",{edgeType:this.currentEdgeType}),this._edgePaletteEl&&this._edgePaletteEl.querySelectorAll(".bxe-palette-item").forEach(s=>{s.classList.toggle("selected",s.dataset.typeId===r)})}getEdgeType(){return this.currentEdgeType?{...this.currentEdgeType}:null}_initPanzoomControls(){const r=document.createElement("div");r.className="bxe-panzoom",r.innerHTML=`
|
|
470
|
+
<button class="bxe-pz-btn" data-pz="zoom-in" title="Zoom in">+</button>
|
|
471
|
+
<button class="bxe-pz-btn" data-pz="fit" title="Fit graph">⊡</button>
|
|
472
|
+
<button class="bxe-pz-btn" data-pz="zoom-out" title="Zoom out">−</button>
|
|
473
|
+
`,this._canvasWrap.appendChild(r),r.addEventListener("click",a=>{const s=a.target.closest("[data-pz]");if(!s)return;const c=this.cy;switch(s.dataset.pz){case"zoom-in":c.zoom({level:c.zoom()*1.3,renderedPosition:{x:c.width()/2,y:c.height()/2}});break;case"zoom-out":c.zoom({level:c.zoom()/1.3,renderedPosition:{x:c.width()/2,y:c.height()/2}});break;case"fit":c.fit(void 0,30);break}})}_initEdgeHandle(){this._eh=this.cy.edgehandles({canConnect:(c,f)=>!c.same(f),edgeParams:(c,f)=>{var h,d;return{data:{label:((h=this.currentEdgeType)==null?void 0:h.label)||"",...((d=this.currentEdgeType)==null?void 0:d.data)||{}}}},snap:!1,noEdgeEventsInDraw:!0,disableBrowserGestures:!0}),this._ehHandleDiv=null,this._ehHandleNode=null,this._ehDrawing=!1;const r=(c,f)=>{const h=c.renderedBoundingBox({includeLabels:!1}),d=this.cy.container().getBoundingClientRect(),p=d.left+(h.x1+h.x2)/2,b=d.top+h.y2,m=16,w=8;f.style.left=`${p-m/2}px`,f.style.top=`${b-w/2}px`},a=()=>{var c;this._ehHandleDiv&&(this._ehHandleDiv.removeEventListener("mousedown",this._ehStartDrawing),(c=this._ehHandleDiv.parentNode)==null||c.removeChild(this._ehHandleDiv),this._ehHandleDiv=null),this._ehHandleNode=null},s=c=>{if(this._ehDrawing)return;a(),this._ehHandleNode=c;const f=document.createElement("div");f.className="boxes-eh-handle",f.style.cssText=["position:fixed","width:16px","height:8px","background:#3498db","border-radius:0 0 16px 16px","cursor:crosshair","z-index:9999","opacity:0.85","pointer-events:auto"].join(";"),f.addEventListener("mousedown",this._ehStartDrawing),document.body.appendChild(f),this._ehHandleDiv=f,r(c,f)};this._ehStartDrawing=c=>{c.preventDefault(),c.stopPropagation(),this._ehHandleNode&&this._eh.start(this._ehHandleNode)},this._ehMouseoverHandler=c=>s(c.target),this._ehRemoveHandler=()=>a(),this._ehWindowMouseup=()=>this._eh.stop(),this.cy.on("mouseover","node",this._ehMouseoverHandler),this.cy.on("grab","node",this._ehRemoveHandler),this.cy.on("tap",c=>{c.target===this.cy&&a()}),this.cy.on("zoom pan",this._ehRemoveHandler),window.addEventListener("mouseup",this._ehWindowMouseup),this._ehCompleteHandler=(c,f,h,d)=>{this._updateStylesheet(),d.forEach(p=>{this._emit("edgeAdded",{edge:p.json()})}),this._emit("edgeHandleComplete",{sourceId:f.id(),targetId:h.id(),edgeType:this.currentEdgeType})},this.cy.on("ehstart",()=>{this._pushUndo(),this._ehDrawing=!0,a()}),this.cy.on("ehstop",()=>{this._ehDrawing=!1}),this.cy.on("ehcomplete",this._ehCompleteHandler)}_destroyEdgeHandle(){var r;this._ehCompleteHandler&&(this.cy.off("ehcomplete",this._ehCompleteHandler),this._ehCompleteHandler=null),this._ehMouseoverHandler&&(this.cy.off("mouseover",this._ehMouseoverHandler),this._ehMouseoverHandler=null),this._ehRemoveHandler&&(this.cy.off("grab",this._ehRemoveHandler),this.cy.off("zoom pan",this._ehRemoveHandler),this._ehRemoveHandler=null),this._ehWindowMouseup&&(window.removeEventListener("mouseup",this._ehWindowMouseup),this._ehWindowMouseup=null),this._ehHandleDiv&&((r=this._ehHandleDiv.parentNode)==null||r.removeChild(this._ehHandleDiv),this._ehHandleDiv=null),this._eh&&(this._eh.destroy(),this._eh=null)}_renderContextPane(){const r=this._contextEntriesEl;if(!r)return;const a=Object.entries(this.context);if(!a.length){r.innerHTML='<div class="bxe-empty">No entries. Add a prefix mapping or term definition.</div>';return}r.innerHTML=a.map(([s,c])=>{const f=typeof c=="object"&&c!==null,h=this._esc(s);if(f){const d=this._esc(JSON.stringify(c,null,2));return`
|
|
474
|
+
<div class="bxe-ctx-row" data-key="${h}">
|
|
475
|
+
<input class="bxe-ctx-key bxe-cell-input" type="text" value="${h}" placeholder="term" data-role="key" />
|
|
476
|
+
<span class="bxe-ctx-colon">:</span>
|
|
477
|
+
<textarea class="bxe-ctx-val bxe-cell-input bxe-ctx-obj-val" rows="2" data-role="val" data-type="object">${d}</textarea>
|
|
478
|
+
<button class="bxe-btn-del" data-role="del" title="Remove">×</button>
|
|
479
|
+
</div>`}else return`
|
|
480
|
+
<div class="bxe-ctx-row" data-key="${h}">
|
|
481
|
+
<input class="bxe-ctx-key bxe-cell-input" type="text" value="${h}" placeholder="prefix" data-role="key" />
|
|
482
|
+
<span class="bxe-ctx-colon">:</span>
|
|
483
|
+
<input class="bxe-ctx-val bxe-cell-input" type="text" value="${this._esc(String(c))}" placeholder="namespace URI" data-role="val" data-type="string" />
|
|
484
|
+
<button class="bxe-btn-del" data-role="del" title="Remove">×</button>
|
|
485
|
+
</div>`}).join("")}_addContextEntry(r){var a;if(r==="term"){let c="term1",f=1;for(;c in this.context;)c=`term${++f}`;this.context[c]={"@type":"@id"}}else{let c="prefix1",f=1;for(;c in this.context;)c=`prefix${++f}`;this.context[c]=""}this._renderContextPane();const s=(a=this._contextEntriesEl)==null?void 0:a.querySelectorAll(".bxe-ctx-key");s!=null&&s.length&&s[s.length-1].focus()}_handleContextEvent(r){const a=r.target.closest(".bxe-ctx-row");if(!a)return;const s=a.dataset.key,c=r.target.dataset.role,f=r.target.dataset.type;if(c==="del")delete this.context[s],this._renderContextPane(),this._emit("contextChanged",{context:{...this.context}});else if(c==="key"&&r.type==="change"){const h=r.target.value.trim();if(!h||h===s){r.target.value=s;return}const d={};for(const[p,b]of Object.entries(this.context))d[p===s?h:p]=b;this.context=d,a.dataset.key=h,this._emit("contextChanged",{context:{...this.context}})}else if(c==="val"&&r.type==="change")if(f==="object")try{const h=JSON.parse(r.target.value);if(typeof h!="object"||h===null||Array.isArray(h))throw new Error("Must be a JSON object");r.target.classList.remove("bxe-ctx-invalid"),this.context[s]=h,this._emit("contextChanged",{context:{...this.context}})}catch{r.target.classList.add("bxe-ctx-invalid")}else this.context[s]=r.target.value,this._emit("contextChanged",{context:{...this.context}})}createLayoutPanel(r){if(!r)return;if(this._destroyLayoutPanel(),!document.getElementById("boxes-layout-panel-css")){const b=document.createElement("style");b.id="boxes-layout-panel-css",b.textContent=`
|
|
486
|
+
.blp-panel { padding: 10px; font-size: 12px; }
|
|
487
|
+
.blp-algo-row { display:flex;align-items:center;gap:8px;margin-bottom:10px; }
|
|
488
|
+
.blp-algo-row label { font-weight:600;white-space:nowrap; }
|
|
489
|
+
.blp-algo-row select { flex:1; }
|
|
490
|
+
.blp-params { border-top:1px solid #eee;padding-top:8px;margin-bottom:8px; }
|
|
491
|
+
.blp-row {
|
|
492
|
+
display:flex;align-items:center;justify-content:space-between;
|
|
493
|
+
margin-bottom:6px;gap:8px;
|
|
494
|
+
}
|
|
495
|
+
.blp-row label { flex:0 0 auto;width:48%;font-size:11px;color:#555; }
|
|
496
|
+
.blp-row input, .blp-row select {
|
|
497
|
+
flex:1;min-width:0;padding:2px 5px;border:1px solid #ccc;
|
|
498
|
+
border-radius:3px;font-size:12px;box-sizing:border-box;
|
|
499
|
+
}
|
|
500
|
+
.blp-row input[type=checkbox] { flex:none;width:auto;align-self:center; }
|
|
501
|
+
.blp-run-btn {
|
|
502
|
+
width:100%;padding:6px;background:#3498db;color:#fff;
|
|
503
|
+
border:none;border-radius:4px;cursor:pointer;font-size:12px;
|
|
504
|
+
}
|
|
505
|
+
.blp-run-btn:hover { background:#2176ae; }
|
|
506
|
+
`,document.head.appendChild(b)}this._layoutPanelTarget=r,r.innerHTML="";const a=document.createElement("div");a.className="blp-panel";const s=document.createElement("div");s.className="blp-algo-row";const c=document.createElement("label");c.textContent="Algorithm";const f=document.createElement("select");this.getAvailableLayouts().forEach(({name:b,label:m})=>{const w=document.createElement("option");w.value=b,w.textContent=m,f.appendChild(w)}),f.value=this._lastLayout.name,s.appendChild(c),s.appendChild(f),a.appendChild(s);const h=document.createElement("div");h.className="blp-params",a.appendChild(h);const d=document.createElement("button");d.className="blp-run-btn",d.textContent="▶ Apply Layout",a.appendChild(d),r.appendChild(a);const p=b=>{const m=this.getLayoutParams(b),w=b===this._lastLayout.name?this._lastLayout.options:{};h.innerHTML="",m.forEach(k=>{const P=document.createElement("div");P.className="blp-row";const S=document.createElement("label");S.textContent=k.label,P.appendChild(S);let M;k.type==="boolean"?(M=document.createElement("input"),M.type="checkbox",M.checked=k.name in w?w[k.name]:k.default):k.type==="select"?(M=document.createElement("select"),k.options.forEach(L=>{const T=document.createElement("option");T.value=L,T.textContent=L,M.appendChild(T)}),M.value=k.name in w?w[k.name]:k.default):(M=document.createElement("input"),M.type="number",k.min!==void 0&&(M.min=k.min),k.max!==void 0&&(M.max=k.max),k.step!==void 0&&(M.step=k.step),M.value=k.name in w?w[k.name]:k.default),M.dataset.param=k.name,P.appendChild(M),h.appendChild(P)})};p(this._lastLayout.name),this._layoutPanelRenderParams=p,f.addEventListener("change",()=>p(f.value)),d.addEventListener("click",()=>{const b=f.value,m=this.getLayoutParams(b),w={};m.forEach(k=>{const P=h.querySelector(`[data-param="${CSS.escape(k.name)}"]`);if(P)if(k.type==="boolean")w[k.name]=P.checked;else if(k.type==="number"){const S=parseFloat(P.value);!isNaN(S)&&!(S===0&&(k.name==="rows"||k.name==="cols"||k.name==="radius"))&&(w[k.name]=S)}else w[k.name]=P.value}),this.runLayout({name:b,...w})}),this._layoutPanelAlgoSel=f,this._layoutPanelParamsDiv=h}_layoutPanelSync(){this._layoutPanelAlgoSel&&(this._layoutPanelAlgoSel.value=this._lastLayout.name,this._layoutPanelRenderParams&&this._layoutPanelRenderParams(this._lastLayout.name))}_destroyLayoutPanel(){this._layoutPanelTarget=null,this._layoutPanelAlgoSel=null,this._layoutPanelParamsDiv=null,this._layoutPanelRenderParams=null}}var IV={},h2={};h2.byteLength=gve,h2.toByteArray=vve,h2.fromByteArray=wve;for(var nl=[],Nu=[],dve=typeof Uint8Array<"u"?Uint8Array:Array,IM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wg=0,pve=IM.length;Wg<pve;++Wg)nl[Wg]=IM[Wg],Nu[IM.charCodeAt(Wg)]=Wg;Nu[45]=62,Nu[95]=63;function LV(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=t.indexOf("=");a===-1&&(a=r);var s=a===r?0:4-a%4;return[a,s]}function gve(t){var r=LV(t),a=r[0],s=r[1];return(a+s)*3/4-s}function bve(t,r,a){return(r+a)*3/4-a}function vve(t){var r,a=LV(t),s=a[0],c=a[1],f=new dve(bve(t,s,c)),h=0,d=c>0?s-4:s,p;for(p=0;p<d;p+=4)r=Nu[t.charCodeAt(p)]<<18|Nu[t.charCodeAt(p+1)]<<12|Nu[t.charCodeAt(p+2)]<<6|Nu[t.charCodeAt(p+3)],f[h++]=r>>16&255,f[h++]=r>>8&255,f[h++]=r&255;return c===2&&(r=Nu[t.charCodeAt(p)]<<2|Nu[t.charCodeAt(p+1)]>>4,f[h++]=r&255),c===1&&(r=Nu[t.charCodeAt(p)]<<10|Nu[t.charCodeAt(p+1)]<<4|Nu[t.charCodeAt(p+2)]>>2,f[h++]=r>>8&255,f[h++]=r&255),f}function yve(t){return nl[t>>18&63]+nl[t>>12&63]+nl[t>>6&63]+nl[t&63]}function mve(t,r,a){for(var s,c=[],f=r;f<a;f+=3)s=(t[f]<<16&16711680)+(t[f+1]<<8&65280)+(t[f+2]&255),c.push(yve(s));return c.join("")}function wve(t){for(var r,a=t.length,s=a%3,c=[],f=16383,h=0,d=a-s;h<d;h+=f)c.push(mve(t,h,h+f>d?d:h+f));return s===1?(r=t[a-1],c.push(nl[r>>2]+nl[r<<4&63]+"==")):s===2&&(r=(t[a-2]<<8)+t[a-1],c.push(nl[r>>10]+nl[r>>4&63]+nl[r<<2&63]+"=")),c.join("")}var LM={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */LM.read=function(t,r,a,s,c){var f,h,d=c*8-s-1,p=(1<<d)-1,b=p>>1,m=-7,w=a?c-1:0,k=a?-1:1,P=t[r+w];for(w+=k,f=P&(1<<-m)-1,P>>=-m,m+=d;m>0;f=f*256+t[r+w],w+=k,m-=8);for(h=f&(1<<-m)-1,f>>=-m,m+=s;m>0;h=h*256+t[r+w],w+=k,m-=8);if(f===0)f=1-b;else{if(f===p)return h?NaN:(P?-1:1)*(1/0);h=h+Math.pow(2,s),f=f-b}return(P?-1:1)*h*Math.pow(2,f-s)},LM.write=function(t,r,a,s,c,f){var h,d,p,b=f*8-c-1,m=(1<<b)-1,w=m>>1,k=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=s?0:f-1,S=s?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(d=isNaN(r)?1:0,h=m):(h=Math.floor(Math.log(r)/Math.LN2),r*(p=Math.pow(2,-h))<1&&(h--,p*=2),h+w>=1?r+=k/p:r+=k*Math.pow(2,1-w),r*p>=2&&(h++,p/=2),h+w>=m?(d=0,h=m):h+w>=1?(d=(r*p-1)*Math.pow(2,c),h=h+w):(d=r*Math.pow(2,w-1)*Math.pow(2,c),h=0));c>=8;t[a+P]=d&255,P+=S,d/=256,c-=8);for(h=h<<c|d,b+=c;b>0;t[a+P]=h&255,P+=S,h/=256,b-=8);t[a+P-S]|=M*128};/*!
|
|
507
|
+
* The buffer module from node.js, for the browser.
|
|
508
|
+
*
|
|
509
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
510
|
+
* @license MIT
|
|
511
|
+
*/(function(t){const r=h2,a=LM,s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=d,t.SlowBuffer=j,t.INSPECT_MAX_BYTES=50;const c=2147483647;t.kMaxLength=c,d.TYPED_ARRAY_SUPPORT=f(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function f(){try{const H=new Uint8Array(1),ne={foo:function(){return 42}};return Object.setPrototypeOf(ne,Uint8Array.prototype),Object.setPrototypeOf(H,ne),H.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function h(H){if(H>c)throw new RangeError('The value "'+H+'" is invalid for option "size"');const ne=new Uint8Array(H);return Object.setPrototypeOf(ne,d.prototype),ne}function d(H,ne,ue){if(typeof H=="number"){if(typeof ne=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(H)}return p(H,ne,ue)}d.poolSize=8192;function p(H,ne,ue){if(typeof H=="string")return k(H,ne);if(ArrayBuffer.isView(H))return S(H);if(H==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);if(Rt(H,ArrayBuffer)||H&&Rt(H.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Rt(H,SharedArrayBuffer)||H&&Rt(H.buffer,SharedArrayBuffer)))return M(H,ne,ue);if(typeof H=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const we=H.valueOf&&H.valueOf();if(we!=null&&we!==H)return d.from(we,ne,ue);const je=L(H);if(je)return je;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof H[Symbol.toPrimitive]=="function")return d.from(H[Symbol.toPrimitive]("string"),ne,ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H)}d.from=function(H,ne,ue){return p(H,ne,ue)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array);function b(H){if(typeof H!="number")throw new TypeError('"size" argument must be of type number');if(H<0)throw new RangeError('The value "'+H+'" is invalid for option "size"')}function m(H,ne,ue){return b(H),H<=0?h(H):ne!==void 0?typeof ue=="string"?h(H).fill(ne,ue):h(H).fill(ne):h(H)}d.alloc=function(H,ne,ue){return m(H,ne,ue)};function w(H){return b(H),h(H<0?0:T(H)|0)}d.allocUnsafe=function(H){return w(H)},d.allocUnsafeSlow=function(H){return w(H)};function k(H,ne){if((typeof ne!="string"||ne==="")&&(ne="utf8"),!d.isEncoding(ne))throw new TypeError("Unknown encoding: "+ne);const ue=I(H,ne)|0;let we=h(ue);const je=we.write(H,ne);return je!==ue&&(we=we.slice(0,je)),we}function P(H){const ne=H.length<0?0:T(H.length)|0,ue=h(ne);for(let we=0;we<ne;we+=1)ue[we]=H[we]&255;return ue}function S(H){if(Rt(H,Uint8Array)){const ne=new Uint8Array(H);return M(ne.buffer,ne.byteOffset,ne.byteLength)}return P(H)}function M(H,ne,ue){if(ne<0||H.byteLength<ne)throw new RangeError('"offset" is outside of buffer bounds');if(H.byteLength<ne+(ue||0))throw new RangeError('"length" is outside of buffer bounds');let we;return ne===void 0&&ue===void 0?we=new Uint8Array(H):ue===void 0?we=new Uint8Array(H,ne):we=new Uint8Array(H,ne,ue),Object.setPrototypeOf(we,d.prototype),we}function L(H){if(d.isBuffer(H)){const ne=T(H.length)|0,ue=h(ne);return ue.length===0||H.copy(ue,0,0,ne),ue}if(H.length!==void 0)return typeof H.length!="number"||zt(H.length)?h(0):P(H);if(H.type==="Buffer"&&Array.isArray(H.data))return P(H.data)}function T(H){if(H>=c)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c.toString(16)+" bytes");return H|0}function j(H){return+H!=H&&(H=0),d.alloc(+H)}d.isBuffer=function(H){return H!=null&&H._isBuffer===!0&&H!==d.prototype},d.compare=function(H,ne){if(Rt(H,Uint8Array)&&(H=d.from(H,H.offset,H.byteLength)),Rt(ne,Uint8Array)&&(ne=d.from(ne,ne.offset,ne.byteLength)),!d.isBuffer(H)||!d.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(H===ne)return 0;let ue=H.length,we=ne.length;for(let je=0,ie=Math.min(ue,we);je<ie;++je)if(H[je]!==ne[je]){ue=H[je],we=ne[je];break}return ue<we?-1:we<ue?1:0},d.isEncoding=function(H){switch(String(H).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(H,ne){if(!Array.isArray(H))throw new TypeError('"list" argument must be an Array of Buffers');if(H.length===0)return d.alloc(0);let ue;if(ne===void 0)for(ne=0,ue=0;ue<H.length;++ue)ne+=H[ue].length;const we=d.allocUnsafe(ne);let je=0;for(ue=0;ue<H.length;++ue){let ie=H[ue];if(Rt(ie,Uint8Array))je+ie.length>we.length?(d.isBuffer(ie)||(ie=d.from(ie)),ie.copy(we,je)):Uint8Array.prototype.set.call(we,ie,je);else if(d.isBuffer(ie))ie.copy(we,je);else throw new TypeError('"list" argument must be an Array of Buffers');je+=ie.length}return we};function I(H,ne){if(d.isBuffer(H))return H.length;if(ArrayBuffer.isView(H)||Rt(H,ArrayBuffer))return H.byteLength;if(typeof H!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof H);const ue=H.length,we=arguments.length>2&&arguments[2]===!0;if(!we&&ue===0)return 0;let je=!1;for(;;)switch(ne){case"ascii":case"latin1":case"binary":return ue;case"utf8":case"utf-8":return Ze(H).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue*2;case"hex":return ue>>>1;case"base64":return Ot(H).length;default:if(je)return we?-1:Ze(H).length;ne=(""+ne).toLowerCase(),je=!0}}d.byteLength=I;function D(H,ne,ue){let we=!1;if((ne===void 0||ne<0)&&(ne=0),ne>this.length||((ue===void 0||ue>this.length)&&(ue=this.length),ue<=0)||(ue>>>=0,ne>>>=0,ue<=ne))return"";for(H||(H="utf8");;)switch(H){case"hex":return fe(this,ne,ue);case"utf8":case"utf-8":return K(this,ne,ue);case"ascii":return le(this,ne,ue);case"latin1":case"binary":return he(this,ne,ue);case"base64":return X(this,ne,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,ne,ue);default:if(we)throw new TypeError("Unknown encoding: "+H);H=(H+"").toLowerCase(),we=!0}}d.prototype._isBuffer=!0;function R(H,ne,ue){const we=H[ne];H[ne]=H[ue],H[ue]=we}d.prototype.swap16=function(){const H=this.length;if(H%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;ne<H;ne+=2)R(this,ne,ne+1);return this},d.prototype.swap32=function(){const H=this.length;if(H%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ne=0;ne<H;ne+=4)R(this,ne,ne+3),R(this,ne+1,ne+2);return this},d.prototype.swap64=function(){const H=this.length;if(H%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ne=0;ne<H;ne+=8)R(this,ne,ne+7),R(this,ne+1,ne+6),R(this,ne+2,ne+5),R(this,ne+3,ne+4);return this},d.prototype.toString=function(){const H=this.length;return H===0?"":arguments.length===0?K(this,0,H):D.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(H){if(!d.isBuffer(H))throw new TypeError("Argument must be a Buffer");return this===H?!0:d.compare(this,H)===0},d.prototype.inspect=function(){let H="";const ne=t.INSPECT_MAX_BYTES;return H=this.toString("hex",0,ne).replace(/(.{2})/g,"$1 ").trim(),this.length>ne&&(H+=" ... "),"<Buffer "+H+">"},s&&(d.prototype[s]=d.prototype.inspect),d.prototype.compare=function(H,ne,ue,we,je){if(Rt(H,Uint8Array)&&(H=d.from(H,H.offset,H.byteLength)),!d.isBuffer(H))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof H);if(ne===void 0&&(ne=0),ue===void 0&&(ue=H?H.length:0),we===void 0&&(we=0),je===void 0&&(je=this.length),ne<0||ue>H.length||we<0||je>this.length)throw new RangeError("out of range index");if(we>=je&&ne>=ue)return 0;if(we>=je)return-1;if(ne>=ue)return 1;if(ne>>>=0,ue>>>=0,we>>>=0,je>>>=0,this===H)return 0;let ie=je-we,Pe=ue-ne;const He=Math.min(ie,Pe),We=this.slice(we,je),Je=H.slice(ne,ue);for(let yt=0;yt<He;++yt)if(We[yt]!==Je[yt]){ie=We[yt],Pe=Je[yt];break}return ie<Pe?-1:Pe<ie?1:0};function Y(H,ne,ue,we,je){if(H.length===0)return-1;if(typeof ue=="string"?(we=ue,ue=0):ue>2147483647?ue=2147483647:ue<-2147483648&&(ue=-2147483648),ue=+ue,zt(ue)&&(ue=je?0:H.length-1),ue<0&&(ue=H.length+ue),ue>=H.length){if(je)return-1;ue=H.length-1}else if(ue<0)if(je)ue=0;else return-1;if(typeof ne=="string"&&(ne=d.from(ne,we)),d.isBuffer(ne))return ne.length===0?-1:G(H,ne,ue,we,je);if(typeof ne=="number")return ne=ne&255,typeof Uint8Array.prototype.indexOf=="function"?je?Uint8Array.prototype.indexOf.call(H,ne,ue):Uint8Array.prototype.lastIndexOf.call(H,ne,ue):G(H,[ne],ue,we,je);throw new TypeError("val must be string, number or Buffer")}function G(H,ne,ue,we,je){let ie=1,Pe=H.length,He=ne.length;if(we!==void 0&&(we=String(we).toLowerCase(),we==="ucs2"||we==="ucs-2"||we==="utf16le"||we==="utf-16le")){if(H.length<2||ne.length<2)return-1;ie=2,Pe/=2,He/=2,ue/=2}function We(yt,rt){return ie===1?yt[rt]:yt.readUInt16BE(rt*ie)}let Je;if(je){let yt=-1;for(Je=ue;Je<Pe;Je++)if(We(H,Je)===We(ne,yt===-1?0:Je-yt)){if(yt===-1&&(yt=Je),Je-yt+1===He)return yt*ie}else yt!==-1&&(Je-=Je-yt),yt=-1}else for(ue+He>Pe&&(ue=Pe-He),Je=ue;Je>=0;Je--){let yt=!0;for(let rt=0;rt<He;rt++)if(We(H,Je+rt)!==We(ne,rt)){yt=!1;break}if(yt)return Je}return-1}d.prototype.includes=function(H,ne,ue){return this.indexOf(H,ne,ue)!==-1},d.prototype.indexOf=function(H,ne,ue){return Y(this,H,ne,ue,!0)},d.prototype.lastIndexOf=function(H,ne,ue){return Y(this,H,ne,ue,!1)};function U(H,ne,ue,we){ue=Number(ue)||0;const je=H.length-ue;we?(we=Number(we),we>je&&(we=je)):we=je;const ie=ne.length;we>ie/2&&(we=ie/2);let Pe;for(Pe=0;Pe<we;++Pe){const He=parseInt(ne.substr(Pe*2,2),16);if(zt(He))return Pe;H[ue+Pe]=He}return Pe}function z(H,ne,ue,we){return At(Ze(ne,H.length-ue),H,ue,we)}function Q(H,ne,ue,we){return At(mt(ne),H,ue,we)}function $(H,ne,ue,we){return At(Ot(ne),H,ue,we)}function Z(H,ne,ue,we){return At(st(ne,H.length-ue),H,ue,we)}d.prototype.write=function(H,ne,ue,we){if(ne===void 0)we="utf8",ue=this.length,ne=0;else if(ue===void 0&&typeof ne=="string")we=ne,ue=this.length,ne=0;else if(isFinite(ne))ne=ne>>>0,isFinite(ue)?(ue=ue>>>0,we===void 0&&(we="utf8")):(we=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const je=this.length-ne;if((ue===void 0||ue>je)&&(ue=je),H.length>0&&(ue<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");let ie=!1;for(;;)switch(we){case"hex":return U(this,H,ne,ue);case"utf8":case"utf-8":return z(this,H,ne,ue);case"ascii":case"latin1":case"binary":return Q(this,H,ne,ue);case"base64":return $(this,H,ne,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,H,ne,ue);default:if(ie)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),ie=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(H,ne,ue){return ne===0&&ue===H.length?r.fromByteArray(H):r.fromByteArray(H.slice(ne,ue))}function K(H,ne,ue){ue=Math.min(H.length,ue);const we=[];let je=ne;for(;je<ue;){const ie=H[je];let Pe=null,He=ie>239?4:ie>223?3:ie>191?2:1;if(je+He<=ue){let We,Je,yt,rt;switch(He){case 1:ie<128&&(Pe=ie);break;case 2:We=H[je+1],(We&192)===128&&(rt=(ie&31)<<6|We&63,rt>127&&(Pe=rt));break;case 3:We=H[je+1],Je=H[je+2],(We&192)===128&&(Je&192)===128&&(rt=(ie&15)<<12|(We&63)<<6|Je&63,rt>2047&&(rt<55296||rt>57343)&&(Pe=rt));break;case 4:We=H[je+1],Je=H[je+2],yt=H[je+3],(We&192)===128&&(Je&192)===128&&(yt&192)===128&&(rt=(ie&15)<<18|(We&63)<<12|(Je&63)<<6|yt&63,rt>65535&&rt<1114112&&(Pe=rt))}}Pe===null?(Pe=65533,He=1):Pe>65535&&(Pe-=65536,we.push(Pe>>>10&1023|55296),Pe=56320|Pe&1023),we.push(Pe),je+=He}return se(we)}const ae=4096;function se(H){const ne=H.length;if(ne<=ae)return String.fromCharCode.apply(String,H);let ue="",we=0;for(;we<ne;)ue+=String.fromCharCode.apply(String,H.slice(we,we+=ae));return ue}function le(H,ne,ue){let we="";ue=Math.min(H.length,ue);for(let je=ne;je<ue;++je)we+=String.fromCharCode(H[je]&127);return we}function he(H,ne,ue){let we="";ue=Math.min(H.length,ue);for(let je=ne;je<ue;++je)we+=String.fromCharCode(H[je]);return we}function fe(H,ne,ue){const we=H.length;(!ne||ne<0)&&(ne=0),(!ue||ue<0||ue>we)&&(ue=we);let je="";for(let ie=ne;ie<ue;++ie)je+=mn[H[ie]];return je}function pe(H,ne,ue){const we=H.slice(ne,ue);let je="";for(let ie=0;ie<we.length-1;ie+=2)je+=String.fromCharCode(we[ie]+we[ie+1]*256);return je}d.prototype.slice=function(H,ne){const ue=this.length;H=~~H,ne=ne===void 0?ue:~~ne,H<0?(H+=ue,H<0&&(H=0)):H>ue&&(H=ue),ne<0?(ne+=ue,ne<0&&(ne=0)):ne>ue&&(ne=ue),ne<H&&(ne=H);const we=this.subarray(H,ne);return Object.setPrototypeOf(we,d.prototype),we};function me(H,ne,ue){if(H%1!==0||H<0)throw new RangeError("offset is not uint");if(H+ne>ue)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(H,ne,ue){H=H>>>0,ne=ne>>>0,ue||me(H,ne,this.length);let we=this[H],je=1,ie=0;for(;++ie<ne&&(je*=256);)we+=this[H+ie]*je;return we},d.prototype.readUintBE=d.prototype.readUIntBE=function(H,ne,ue){H=H>>>0,ne=ne>>>0,ue||me(H,ne,this.length);let we=this[H+--ne],je=1;for(;ne>0&&(je*=256);)we+=this[H+--ne]*je;return we},d.prototype.readUint8=d.prototype.readUInt8=function(H,ne){return H=H>>>0,ne||me(H,1,this.length),this[H]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(H,ne){return H=H>>>0,ne||me(H,2,this.length),this[H]|this[H+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(H,ne){return H=H>>>0,ne||me(H,2,this.length),this[H]<<8|this[H+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(H,ne){return H=H>>>0,ne||me(H,4,this.length),(this[H]|this[H+1]<<8|this[H+2]<<16)+this[H+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(H,ne){return H=H>>>0,ne||me(H,4,this.length),this[H]*16777216+(this[H+1]<<16|this[H+2]<<8|this[H+3])},d.prototype.readBigUInt64LE=sn(function(H){H=H>>>0,Qe(H,"offset");const ne=this[H],ue=this[H+7];(ne===void 0||ue===void 0)&&nt(H,this.length-8);const we=ne+this[++H]*2**8+this[++H]*2**16+this[++H]*2**24,je=this[++H]+this[++H]*2**8+this[++H]*2**16+ue*2**24;return BigInt(we)+(BigInt(je)<<BigInt(32))}),d.prototype.readBigUInt64BE=sn(function(H){H=H>>>0,Qe(H,"offset");const ne=this[H],ue=this[H+7];(ne===void 0||ue===void 0)&&nt(H,this.length-8);const we=ne*2**24+this[++H]*2**16+this[++H]*2**8+this[++H],je=this[++H]*2**24+this[++H]*2**16+this[++H]*2**8+ue;return(BigInt(we)<<BigInt(32))+BigInt(je)}),d.prototype.readIntLE=function(H,ne,ue){H=H>>>0,ne=ne>>>0,ue||me(H,ne,this.length);let we=this[H],je=1,ie=0;for(;++ie<ne&&(je*=256);)we+=this[H+ie]*je;return je*=128,we>=je&&(we-=Math.pow(2,8*ne)),we},d.prototype.readIntBE=function(H,ne,ue){H=H>>>0,ne=ne>>>0,ue||me(H,ne,this.length);let we=ne,je=1,ie=this[H+--we];for(;we>0&&(je*=256);)ie+=this[H+--we]*je;return je*=128,ie>=je&&(ie-=Math.pow(2,8*ne)),ie},d.prototype.readInt8=function(H,ne){return H=H>>>0,ne||me(H,1,this.length),this[H]&128?(255-this[H]+1)*-1:this[H]},d.prototype.readInt16LE=function(H,ne){H=H>>>0,ne||me(H,2,this.length);const ue=this[H]|this[H+1]<<8;return ue&32768?ue|4294901760:ue},d.prototype.readInt16BE=function(H,ne){H=H>>>0,ne||me(H,2,this.length);const ue=this[H+1]|this[H]<<8;return ue&32768?ue|4294901760:ue},d.prototype.readInt32LE=function(H,ne){return H=H>>>0,ne||me(H,4,this.length),this[H]|this[H+1]<<8|this[H+2]<<16|this[H+3]<<24},d.prototype.readInt32BE=function(H,ne){return H=H>>>0,ne||me(H,4,this.length),this[H]<<24|this[H+1]<<16|this[H+2]<<8|this[H+3]},d.prototype.readBigInt64LE=sn(function(H){H=H>>>0,Qe(H,"offset");const ne=this[H],ue=this[H+7];(ne===void 0||ue===void 0)&&nt(H,this.length-8);const we=this[H+4]+this[H+5]*2**8+this[H+6]*2**16+(ue<<24);return(BigInt(we)<<BigInt(32))+BigInt(ne+this[++H]*2**8+this[++H]*2**16+this[++H]*2**24)}),d.prototype.readBigInt64BE=sn(function(H){H=H>>>0,Qe(H,"offset");const ne=this[H],ue=this[H+7];(ne===void 0||ue===void 0)&&nt(H,this.length-8);const we=(ne<<24)+this[++H]*2**16+this[++H]*2**8+this[++H];return(BigInt(we)<<BigInt(32))+BigInt(this[++H]*2**24+this[++H]*2**16+this[++H]*2**8+ue)}),d.prototype.readFloatLE=function(H,ne){return H=H>>>0,ne||me(H,4,this.length),a.read(this,H,!0,23,4)},d.prototype.readFloatBE=function(H,ne){return H=H>>>0,ne||me(H,4,this.length),a.read(this,H,!1,23,4)},d.prototype.readDoubleLE=function(H,ne){return H=H>>>0,ne||me(H,8,this.length),a.read(this,H,!0,52,8)},d.prototype.readDoubleBE=function(H,ne){return H=H>>>0,ne||me(H,8,this.length),a.read(this,H,!1,52,8)};function Te(H,ne,ue,we,je,ie){if(!d.isBuffer(H))throw new TypeError('"buffer" argument must be a Buffer instance');if(ne>je||ne<ie)throw new RangeError('"value" argument is out of bounds');if(ue+we>H.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(H,ne,ue,we){if(H=+H,ne=ne>>>0,ue=ue>>>0,!we){const Pe=Math.pow(2,8*ue)-1;Te(this,H,ne,ue,Pe,0)}let je=1,ie=0;for(this[ne]=H&255;++ie<ue&&(je*=256);)this[ne+ie]=H/je&255;return ne+ue},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(H,ne,ue,we){if(H=+H,ne=ne>>>0,ue=ue>>>0,!we){const Pe=Math.pow(2,8*ue)-1;Te(this,H,ne,ue,Pe,0)}let je=ue-1,ie=1;for(this[ne+je]=H&255;--je>=0&&(ie*=256);)this[ne+je]=H/ie&255;return ne+ue},d.prototype.writeUint8=d.prototype.writeUInt8=function(H,ne,ue){return H=+H,ne=ne>>>0,ue||Te(this,H,ne,1,255,0),this[ne]=H&255,ne+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(H,ne,ue){return H=+H,ne=ne>>>0,ue||Te(this,H,ne,2,65535,0),this[ne]=H&255,this[ne+1]=H>>>8,ne+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(H,ne,ue){return H=+H,ne=ne>>>0,ue||Te(this,H,ne,2,65535,0),this[ne]=H>>>8,this[ne+1]=H&255,ne+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(H,ne,ue){return H=+H,ne=ne>>>0,ue||Te(this,H,ne,4,4294967295,0),this[ne+3]=H>>>24,this[ne+2]=H>>>16,this[ne+1]=H>>>8,this[ne]=H&255,ne+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(H,ne,ue){return H=+H,ne=ne>>>0,ue||Te(this,H,ne,4,4294967295,0),this[ne]=H>>>24,this[ne+1]=H>>>16,this[ne+2]=H>>>8,this[ne+3]=H&255,ne+4};function Le(H,ne,ue,we,je){Ge(ne,we,je,H,ue,7);let ie=Number(ne&BigInt(4294967295));H[ue++]=ie,ie=ie>>8,H[ue++]=ie,ie=ie>>8,H[ue++]=ie,ie=ie>>8,H[ue++]=ie;let Pe=Number(ne>>BigInt(32)&BigInt(4294967295));return H[ue++]=Pe,Pe=Pe>>8,H[ue++]=Pe,Pe=Pe>>8,H[ue++]=Pe,Pe=Pe>>8,H[ue++]=Pe,ue}function ge(H,ne,ue,we,je){Ge(ne,we,je,H,ue,7);let ie=Number(ne&BigInt(4294967295));H[ue+7]=ie,ie=ie>>8,H[ue+6]=ie,ie=ie>>8,H[ue+5]=ie,ie=ie>>8,H[ue+4]=ie;let Pe=Number(ne>>BigInt(32)&BigInt(4294967295));return H[ue+3]=Pe,Pe=Pe>>8,H[ue+2]=Pe,Pe=Pe>>8,H[ue+1]=Pe,Pe=Pe>>8,H[ue]=Pe,ue+8}d.prototype.writeBigUInt64LE=sn(function(H,ne=0){return Le(this,H,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=sn(function(H,ne=0){return ge(this,H,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(H,ne,ue,we){if(H=+H,ne=ne>>>0,!we){const He=Math.pow(2,8*ue-1);Te(this,H,ne,ue,He-1,-He)}let je=0,ie=1,Pe=0;for(this[ne]=H&255;++je<ue&&(ie*=256);)H<0&&Pe===0&&this[ne+je-1]!==0&&(Pe=1),this[ne+je]=(H/ie>>0)-Pe&255;return ne+ue},d.prototype.writeIntBE=function(H,ne,ue,we){if(H=+H,ne=ne>>>0,!we){const He=Math.pow(2,8*ue-1);Te(this,H,ne,ue,He-1,-He)}let je=ue-1,ie=1,Pe=0;for(this[ne+je]=H&255;--je>=0&&(ie*=256);)H<0&&Pe===0&&this[ne+je+1]!==0&&(Pe=1),this[ne+je]=(H/ie>>0)-Pe&255;return ne+ue},d.prototype.writeInt8=function(H,ne,ue){return H=+H,ne=ne>>>0,ue||Te(this,H,ne,1,127,-128),H<0&&(H=255+H+1),this[ne]=H&255,ne+1},d.prototype.writeInt16LE=function(H,ne,ue){return H=+H,ne=ne>>>0,ue||Te(this,H,ne,2,32767,-32768),this[ne]=H&255,this[ne+1]=H>>>8,ne+2},d.prototype.writeInt16BE=function(H,ne,ue){return H=+H,ne=ne>>>0,ue||Te(this,H,ne,2,32767,-32768),this[ne]=H>>>8,this[ne+1]=H&255,ne+2},d.prototype.writeInt32LE=function(H,ne,ue){return H=+H,ne=ne>>>0,ue||Te(this,H,ne,4,2147483647,-2147483648),this[ne]=H&255,this[ne+1]=H>>>8,this[ne+2]=H>>>16,this[ne+3]=H>>>24,ne+4},d.prototype.writeInt32BE=function(H,ne,ue){return H=+H,ne=ne>>>0,ue||Te(this,H,ne,4,2147483647,-2147483648),H<0&&(H=4294967295+H+1),this[ne]=H>>>24,this[ne+1]=H>>>16,this[ne+2]=H>>>8,this[ne+3]=H&255,ne+4},d.prototype.writeBigInt64LE=sn(function(H,ne=0){return Le(this,H,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=sn(function(H,ne=0){return ge(this,H,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function xe(H,ne,ue,we,je,ie){if(ue+we>H.length)throw new RangeError("Index out of range");if(ue<0)throw new RangeError("Index out of range")}function Se(H,ne,ue,we,je){return ne=+ne,ue=ue>>>0,je||xe(H,ne,ue,4),a.write(H,ne,ue,we,23,4),ue+4}d.prototype.writeFloatLE=function(H,ne,ue){return Se(this,H,ne,!0,ue)},d.prototype.writeFloatBE=function(H,ne,ue){return Se(this,H,ne,!1,ue)};function Ie(H,ne,ue,we,je){return ne=+ne,ue=ue>>>0,je||xe(H,ne,ue,8),a.write(H,ne,ue,we,52,8),ue+8}d.prototype.writeDoubleLE=function(H,ne,ue){return Ie(this,H,ne,!0,ue)},d.prototype.writeDoubleBE=function(H,ne,ue){return Ie(this,H,ne,!1,ue)},d.prototype.copy=function(H,ne,ue,we){if(!d.isBuffer(H))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!we&&we!==0&&(we=this.length),ne>=H.length&&(ne=H.length),ne||(ne=0),we>0&&we<ue&&(we=ue),we===ue||H.length===0||this.length===0)return 0;if(ne<0)throw new RangeError("targetStart out of bounds");if(ue<0||ue>=this.length)throw new RangeError("Index out of range");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),H.length-ne<we-ue&&(we=H.length-ne+ue);const je=we-ue;return this===H&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ne,ue,we):Uint8Array.prototype.set.call(H,this.subarray(ue,we),ne),je},d.prototype.fill=function(H,ne,ue,we){if(typeof H=="string"){if(typeof ne=="string"?(we=ne,ne=0,ue=this.length):typeof ue=="string"&&(we=ue,ue=this.length),we!==void 0&&typeof we!="string")throw new TypeError("encoding must be a string");if(typeof we=="string"&&!d.isEncoding(we))throw new TypeError("Unknown encoding: "+we);if(H.length===1){const ie=H.charCodeAt(0);(we==="utf8"&&ie<128||we==="latin1")&&(H=ie)}}else typeof H=="number"?H=H&255:typeof H=="boolean"&&(H=Number(H));if(ne<0||this.length<ne||this.length<ue)throw new RangeError("Out of range index");if(ue<=ne)return this;ne=ne>>>0,ue=ue===void 0?this.length:ue>>>0,H||(H=0);let je;if(typeof H=="number")for(je=ne;je<ue;++je)this[je]=H;else{const ie=d.isBuffer(H)?H:d.from(H,we),Pe=ie.length;if(Pe===0)throw new TypeError('The value "'+H+'" is invalid for argument "value"');for(je=0;je<ue-ne;++je)this[je+ne]=ie[je%Pe]}return this};const Re={};function Ne(H,ne,ue){Re[H]=class extends ue{constructor(){super(),Object.defineProperty(this,"message",{value:ne.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${H}]`,this.stack,delete this.name}get code(){return H}set code(we){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:we,writable:!0})}toString(){return`${this.name} [${H}]: ${this.message}`}}}Ne("ERR_BUFFER_OUT_OF_BOUNDS",function(H){return H?`${H} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ne("ERR_INVALID_ARG_TYPE",function(H,ne){return`The "${H}" argument must be of type number. Received type ${typeof ne}`},TypeError),Ne("ERR_OUT_OF_RANGE",function(H,ne,ue){let we=`The value of "${H}" is out of range.`,je=ue;return Number.isInteger(ue)&&Math.abs(ue)>2**32?je=Me(String(ue)):typeof ue=="bigint"&&(je=String(ue),(ue>BigInt(2)**BigInt(32)||ue<-(BigInt(2)**BigInt(32)))&&(je=Me(je)),je+="n"),we+=` It must be ${ne}. Received ${je}`,we},RangeError);function Me(H){let ne="",ue=H.length;const we=H[0]==="-"?1:0;for(;ue>=we+4;ue-=3)ne=`_${H.slice(ue-3,ue)}${ne}`;return`${H.slice(0,ue)}${ne}`}function ke(H,ne,ue){Qe(ne,"offset"),(H[ne]===void 0||H[ne+ue]===void 0)&&nt(ne,H.length-(ue+1))}function Ge(H,ne,ue,we,je,ie){if(H>ue||H<ne){const Pe=typeof ne=="bigint"?"n":"";let He;throw ne===0||ne===BigInt(0)?He=`>= 0${Pe} and < 2${Pe} ** ${(ie+1)*8}${Pe}`:He=`>= -(2${Pe} ** ${(ie+1)*8-1}${Pe}) and < 2 ** ${(ie+1)*8-1}${Pe}`,new Re.ERR_OUT_OF_RANGE("value",He,H)}ke(we,je,ie)}function Qe(H,ne){if(typeof H!="number")throw new Re.ERR_INVALID_ARG_TYPE(ne,"number",H)}function nt(H,ne,ue){throw Math.floor(H)!==H?(Qe(H,ue),new Re.ERR_OUT_OF_RANGE("offset","an integer",H)):ne<0?new Re.ERR_BUFFER_OUT_OF_BOUNDS:new Re.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ne}`,H)}const ft=/[^+/0-9A-Za-z-_]/g;function Ue(H){if(H=H.split("=")[0],H=H.trim().replace(ft,""),H.length<2)return"";for(;H.length%4!==0;)H=H+"=";return H}function Ze(H,ne){ne=ne||1/0;let ue;const we=H.length;let je=null;const ie=[];for(let Pe=0;Pe<we;++Pe){if(ue=H.charCodeAt(Pe),ue>55295&&ue<57344){if(!je){if(ue>56319){(ne-=3)>-1&&ie.push(239,191,189);continue}else if(Pe+1===we){(ne-=3)>-1&&ie.push(239,191,189);continue}je=ue;continue}if(ue<56320){(ne-=3)>-1&&ie.push(239,191,189),je=ue;continue}ue=(je-55296<<10|ue-56320)+65536}else je&&(ne-=3)>-1&&ie.push(239,191,189);if(je=null,ue<128){if((ne-=1)<0)break;ie.push(ue)}else if(ue<2048){if((ne-=2)<0)break;ie.push(ue>>6|192,ue&63|128)}else if(ue<65536){if((ne-=3)<0)break;ie.push(ue>>12|224,ue>>6&63|128,ue&63|128)}else if(ue<1114112){if((ne-=4)<0)break;ie.push(ue>>18|240,ue>>12&63|128,ue>>6&63|128,ue&63|128)}else throw new Error("Invalid code point")}return ie}function mt(H){const ne=[];for(let ue=0;ue<H.length;++ue)ne.push(H.charCodeAt(ue)&255);return ne}function st(H,ne){let ue,we,je;const ie=[];for(let Pe=0;Pe<H.length&&!((ne-=2)<0);++Pe)ue=H.charCodeAt(Pe),we=ue>>8,je=ue%256,ie.push(je),ie.push(we);return ie}function Ot(H){return r.toByteArray(Ue(H))}function At(H,ne,ue,we){let je;for(je=0;je<we&&!(je+ue>=ne.length||je>=H.length);++je)ne[je+ue]=H[je];return je}function Rt(H,ne){return H instanceof ne||H!=null&&H.constructor!=null&&H.constructor.name!=null&&H.constructor.name===ne.name}function zt(H){return H!==H}const mn=function(){const H="0123456789abcdef",ne=new Array(256);for(let ue=0;ue<16;++ue){const we=ue*16;for(let je=0;je<16;++je)ne[we+je]=H[ue]+H[je]}return ne}();function sn(H){return typeof BigInt>"u"?or:H}function or(){throw new Error("BigInt not supported")}})(IV);const tp="http://www.w3.org/1999/02/22-rdf-syntax-ns#",V0="http://www.w3.org/2001/XMLSchema#",d2="http://www.w3.org/2000/10/swap/",Is={xsd:{decimal:`${V0}decimal`,boolean:`${V0}boolean`,double:`${V0}double`,integer:`${V0}integer`,string:`${V0}string`},rdf:{type:`${tp}type`,nil:`${tp}nil`,first:`${tp}first`,rest:`${tp}rest`,langString:`${tp}langString`,dirLangString:`${tp}dirLangString`,reifies:`${tp}reifies`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${d2}reify#forSome`,forAll:`${d2}reify#forAll`},log:{implies:`${d2}log#implies`,isImpliedBy:`${d2}log#isImpliedBy`}},{xsd:p2}=Is,xve=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,OV={"\\":"\\","'":"'",'"':'"',n:`
|
|
512
|
+
`,r:"\r",t:" ",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},kve=/[\x00-\x20<>\\"\{\}\|\^\`]/,_ve={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_dircode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},Eve=/$0^/;class Cve{constructor(r){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9])/i,this._dircode=/^--(ltr)|(rtl)/,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._atKeyword=/^@[a-z]+(?=[\s#<:])/i,this._keyword=/^(?:PREFIX|BASE|VERSION|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,r=r||{},this._isImpliedBy=r.isImpliedBy,this._lineMode=!!r.lineMode){this._n3Mode=!1;for(const a in this)!(a in _ve)&&this[a]instanceof RegExp&&(this[a]=Eve)}else this._n3Mode=r.n3!==!1;this.comments=!!r.comments,this._literalClosingPos=0}_tokenizeToEnd(r,a){let s=this._input,c=s.length;for(;;){let d,p;for(;d=this._newline.exec(s);)this.comments&&(p=this._comment.exec(d[0]))&&f("comment",p[1],"",this._line,d[0].length),s=s.substr(d[0].length,s.length),c=s.length,this._line++;if(!d&&(d=this._whitespace.exec(s))&&(s=s.substr(d[0].length,s.length)),this._endOfFile.test(s))return a&&(this.comments&&(p=this._comment.exec(s))&&f("comment",p[1],"",this._line,s.length),s=null,f("eof","","",this._line,0)),this._input=s;const b=this._line,m=s[0];let w="",k="",P="",S=null,M=0,L=!1;switch(m){case"^":if(s.length<3)break;if(s[1]==="^"){if(this._previousMarker="^^",s=s.substr(2),s[0]!=="<"){L=!0;break}}else{this._n3Mode&&(M=1,w="^");break}case"<":if(S=this._unescapedIri.exec(s))w="IRI",k=S[1];else if(S=this._iri.exec(s)){if(k=this._unescape(S[1]),k===null||kve.test(k))return h(this);w="IRI"}else s.length>2&&s[1]==="<"&&s[2]==="("?(w="<<(",M=3):!this._lineMode&&s.length>(a?1:2)&&s[1]==="<"?(w="<<",M=2):this._n3Mode&&s.length>1&&s[1]==="="&&(M=2,this._isImpliedBy?(w="abbreviation",k="<"):(w="inverse",k=">"));break;case">":s.length>1&&s[1]===">"&&(w=">>",M=2);break;case"_":((S=this._blank.exec(s))||a&&(S=this._blank.exec(`${s} `)))&&(w="blank",P="_",k=S[1]);break;case'"':if(S=this._simpleQuotedString.exec(s))k=S[1];else if({value:k,matchLength:M}=this._parseLiteral(s),k===null)return h(this);(S!==null||M!==0)&&(w="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(S=this._simpleApostropheString.exec(s))k=S[1];else if({value:k,matchLength:M}=this._parseLiteral(s),k===null)return h(this);(S!==null||M!==0)&&(w="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(S=this._variable.exec(s))&&(w="var",k=S[0]);break;case"@":this._previousMarker==="literal"&&(S=this._langcode.exec(s))&&S[1]!=="version"?(w="langcode",k=S[1]):(S=this._atKeyword.exec(s))&&(w=S[0]);break;case".":if(s.length===1?a:s[1]<"0"||s[1]>"9"){w=".",M=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":if(s[1]==="-"){this._previousMarker==="langcode"&&(S=this._dircode.exec(s))&&(w="dircode",M=2,k=S[1]||S[2],M=k.length+2);break}(S=this._number.exec(s)||a&&(S=this._number.exec(`${s} `)))&&(w="literal",k=S[0],P=typeof S[1]=="string"?p2.double:typeof S[2]=="string"?p2.decimal:p2.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":case"V":case"v":(S=this._keyword.exec(s))?w=S[0].toUpperCase():L=!0;break;case"f":case"t":(S=this._boolean.exec(s))?(w="literal",k=S[0],P=p2.boolean):L=!0;break;case"a":(S=this._shortPredicates.exec(s))?(w="abbreviation",k="a"):L=!0;break;case"=":this._n3Mode&&s.length>1&&(w="abbreviation",s[1]!==">"?(M=1,k="="):(M=2,k=">"));break;case"!":if(!this._n3Mode)break;case")":if(!a&&(s.length===1||s.length===2&&s[1]===">"))break;if(s.length>2&&s[1]===">"&&s[2]===">"){w=")>>",M=3;break}case",":case";":case"[":case"]":case"(":case"}":case"~":this._lineMode||(M=1,w=m);break;case"{":!this._lineMode&&s.length>=2&&(s[1]==="|"?(w="{|",M=2):(w=m,M=1));break;case"|":s.length>=2&&s[1]==="}"&&(w="|}",M=2);break;default:L=!0}if(L&&((this._previousMarker==="@prefix"||this._previousMarker==="PREFIX")&&(S=this._prefix.exec(s))?(w="prefix",k=S[1]||""):((S=this._prefixed.exec(s))||a&&(S=this._prefixed.exec(`${s} `)))&&(w="prefixed",P=S[1]||"",k=this._unescape(S[2]))),this._previousMarker==="^^")switch(w){case"prefixed":w="type";break;case"IRI":w="typeIRI";break;default:w=""}if(!w)return a||!/^'''|^"""/.test(s)&&/\n|\r/.test(s)?h(this):this._input=s;const T=M||S[0].length,j=f(w,k,P,b,T);this.previousToken=j,this._previousMarker=w,s=s.substr(T,s.length)}function f(d,p,b,m,w){const k=s?c-s.length:c,P=k+w,S={type:d,value:p,prefix:b,line:m,start:k,end:P};return r(null,S),S}function h(d){r(d._syntaxError(/^\S*/.exec(s)[0]))}}_unescape(r){let a=!1;const s=r.replace(xve,(c,f,h,d)=>{if(typeof f=="string")return String.fromCharCode(Number.parseInt(f,16));if(typeof h=="string"){let p=Number.parseInt(h,16);return p<=65535?String.fromCharCode(Number.parseInt(h,16)):String.fromCharCode(55296+((p-=65536)>>10),56320+(p&1023))}return d in OV?OV[d]:(a=!0,"")});return a?null:s}_parseLiteral(r){if(r.length>=3){const a=r.match(/^(?:"""|"|'''|'|)/)[0],s=a.length;let c=Math.max(this._literalClosingPos,s);for(;(c=r.indexOf(a,c))>0;){let f=0;for(;r[c-f-1]==="\\";)f++;if(f%2===0){const h=r.substring(s,c),d=h.split(/\r\n|\r|\n/).length-1,p=c+s;if(s===1&&d!==0||s===3&&this._lineMode)break;return this._line+=d,{value:this._unescape(h),matchLength:p}}c++}this._literalClosingPos=r.length-s+1}return{value:"",matchLength:0}}_syntaxError(r){this._input=null;const a=new Error(`Unexpected "${r}" on line ${this._line}.`);return a.context={token:void 0,line:this._line,previousToken:this.previousToken},a}_readStartingBom(r){return r.startsWith("\uFEFF")?r.substr(1):r}tokenize(r,a){if(this._line=1,typeof r=="string")if(this._input=this._readStartingBom(r),typeof a=="function")queueMicrotask(()=>this._tokenizeToEnd(a,!0));else{const s=[];let c;if(this._tokenizeToEnd((f,h)=>f?c=f:s.push(h),!0),c)throw c;return s}else this._pendingBuffer=null,typeof r.setEncoding=="function"&&r.setEncoding("utf8"),r.on("data",s=>{this._input!==null&&s.length!==0&&(this._pendingBuffer&&(s=IV.Buffer.concat([this._pendingBuffer,s]),this._pendingBuffer=null),s[s.length-1]&128?this._pendingBuffer=s:(typeof this._input>"u"?this._input=this._readStartingBom(typeof s=="string"?s:s.toString()):this._input+=s,this._tokenizeToEnd(a,!1)))}),r.on("end",()=>{typeof this._input=="string"&&this._tokenizeToEnd(a,!0)}),r.on("error",a)}}const{rdf:DV,xsd:Jg}=Is;let q0,Pve=0;const OM={namedNode:GV,blankNode:HV,variable:UV,literal:zV,defaultGraph:Mve,quad:DM,triple:DM,fromTerm:Z0,fromQuad:FV};class lf{constructor(r){this.id=r}get value(){return this.id}equals(r){return r instanceof lf?this.id===r.id:!!r&&this.termType===r.termType&&this.value===r.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class BV extends lf{get termType(){return"NamedNode"}}class Xg extends lf{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const r=this.id;let a=r.lastIndexOf('"')+1;const s=r.lastIndexOf("--");return a<r.length&&r[a++]==="@"?(s>a?r.substr(0,s):r).substr(a).toLowerCase():""}get direction(){const r=this.id,a=r.lastIndexOf('"'),s=r.lastIndexOf("--");return s>a&&s+2<r.length?r.substr(s+2).toLowerCase():""}get datatype(){return new BV(this.datatypeString)}get datatypeString(){const r=this.id,a=r.lastIndexOf('"')+1,s=a<r.length?r[a]:"";return s==="^"?r.substr(a+2):s!=="@"?Jg.string:r.indexOf("--",a)>0?DV.dirLangString:DV.langString}equals(r){return r instanceof Xg?this.id===r.id:!!r&&!!r.datatype&&this.termType===r.termType&&this.value===r.value&&this.language===r.language&&(this.direction===r.direction||this.direction===""&&!r.direction)&&this.datatype.value===r.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,direction:this.direction,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class Sve extends lf{constructor(r){super(`_:${r}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class Nve extends lf{constructor(r){super(`?${r}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}class Tve extends lf{constructor(){return super(""),q0||this}get termType(){return"DefaultGraph"}equals(r){return this===r||!!r&&this.termType===r.termType}}q0=new Tve;class RV extends lf{constructor(r,a,s,c){super(""),this._subject=r,this._predicate=a,this._object=s,this._graph=c||q0}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(r){return!!r&&this._subject.equals(r.subject)&&this._predicate.equals(r.predicate)&&this._object.equals(r.object)&&this._graph.equals(r.graph)}}function GV(t){return new BV(t)}function HV(t){return new Sve(t||`n3-${Pve++}`)}function zV(t,r){if(typeof r=="string")return new Xg(`"${t}"@${r.toLowerCase()}`);if(r!==void 0&&!("termType"in r))return new Xg(`"${t}"@${r.language.toLowerCase()}${r.direction?`--${r.direction.toLowerCase()}`:""}`);let a=r?r.value:"";return a===""&&(typeof t=="boolean"?a=Jg.boolean:typeof t=="number"&&(Number.isFinite(t)?a=Number.isInteger(t)?Jg.integer:Jg.double:(a=Jg.double,Number.isNaN(t)||(t=t>0?"INF":"-INF")))),a===""||a===Jg.string?new Xg(`"${t}"`):new Xg(`"${t}"^^${a}`)}function UV(t){return new Nve(t)}function Mve(){return q0}function DM(t,r,a,s){return new RV(t,r,a,s)}function Z0(t){if(t instanceof lf)return t;switch(t.termType){case"NamedNode":return GV(t.value);case"BlankNode":return HV(t.value);case"Variable":return UV(t.value);case"DefaultGraph":return q0;case"Literal":return zV(t.value,t.language||t.datatype);case"Quad":return FV(t);default:throw new Error(`Unexpected termType: ${t.termType}`)}}function FV(t){if(t instanceof RV)return t;if(t.termType!=="Quad")throw new Error(`Unexpected termType: ${t.termType}`);return DM(Z0(t.subject),Z0(t.predicate),Z0(t.object),Z0(t.graph))}let YV=0;class g2{constructor(r){this._contextStack=[],this._graph=null,r=r||{},this._setBase(r.baseIRI),r.factory&&VV(this,r.factory);const a=typeof r.format=="string"?r.format.match(/\w*$/)[0].toLowerCase():"",s=/turtle/.test(a),c=/trig/.test(a),f=/triple/.test(a),h=/quad/.test(a),d=this._n3Mode=/n3/.test(a),p=f||h;(this._supportsNamedGraphs=!(s||d))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(s||c||f||d),this._isImpliedBy=r.isImpliedBy,p&&(this._resolveRelativeIRI=b=>null),this._blankNodePrefix=typeof r.blankNodePrefix!="string"?"":r.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=r.lexer||new Cve({lineMode:p,n3:d,isImpliedBy:this._isImpliedBy}),this._explicitQuantifiers=!!r.explicitQuantifiers,this._parseUnsupportedVersions=!!r.parseUnsupportedVersions,this._version=r.version}static _resetBlankNodePrefix(){YV=0}_setBase(r){if(!r)this._base="",this._basePath="";else{const a=r.indexOf("#");a>=0&&(r=r.substr(0,a)),this._base=r,this._basePath=r.indexOf("/")<0?r:r.replace(/[^\/?]*(?:\?.*)?$/,""),r=r.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=r[0],this._baseScheme=r[1]}}_saveContext(r,a,s,c,f){const h=this._n3Mode;this._contextStack.push({type:r,subject:s,predicate:c,object:f,graph:a,inverse:h?this._inversePredicate:!1,blankPrefix:h?this._prefixes._:"",quantified:h?this._quantified:null}),h&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(r,a){const s=this._contextStack.pop();if(!s||s.type!==r)return this._error(`Unexpected ${a.type}`,a);this._subject=s.subject,this._predicate=s.predicate,this._object=s.object,this._graph=s.graph,this._n3Mode&&(this._inversePredicate=s.inverse,this._prefixes._=s.blankPrefix,this._quantified=s.quantified)}_readBeforeTopContext(r){return this._version&&!this._isValidVersion(this._version)?this._error(`Detected unsupported version as media type parameter: "${this._version}"`,r):this._readInTopContext(r)}_readInTopContext(r){switch(r.type){case"eof":return this._graph!==null?this._error("Unclosed graph",r):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"VERSION":this._sparqlStyle=!0;case"@version":return this._readVersion;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(r)}}_readEntity(r,a){let s;switch(r.type){case"IRI":case"typeIRI":const c=this._resolveIRI(r.value);if(c===null)return this._error("Invalid IRI",r);s=this._factory.namedNode(c);break;case"type":case"prefixed":const f=this._prefixes[r.prefix];if(f===void 0)return this._error(`Undefined prefix "${r.prefix}:"`,r);s=this._factory.namedNode(f+r.value);break;case"blank":s=this._factory.blankNode(this._prefixes[r.prefix]+r.value);break;case"var":s=this._factory.variable(r.value.substr(1));break;default:return this._error(`Expected entity but got ${r.type}`,r)}return!a&&this._n3Mode&&s.id in this._quantified&&(s=this._quantified[s.id]),s}_readSubject(r){switch(this._predicate=null,r.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._factory.blankNode(),null,null),this._readBlankNodeHead;case"(":const a=this._contextStack;return(a.length&&a[a.length-1]).type==="<<"?this._error("Unexpected list in reified triple",r):(this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem);case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._factory.blankNode(),null,null),this._readSubject):this._error("Unexpected graph",r);case"}":return this._readPunctuation(r);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier="blankNode",this._readQuantifierList):this._error('Unexpected "@forSome"',r);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier="variable",this._readQuantifierList):this._error('Unexpected "@forAll"',r);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",r);if(r.prefix.length===0)return this._literalValue=r.value,this._completeSubjectLiteral;this._subject=this._factory.literal(r.value,this._factory.namedNode(r.prefix));break;case"<<(":return this._n3Mode?(this._saveContext("<<(",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Disallowed triple term as subject",r);case"<<":return this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject;default:if((this._subject=this._readEntity(r))===void 0)return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(r){const a=r.type;switch(a){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[r.value];break;case".":case"]":case"}":case"|}":return this._predicate===null?this._error(`Unexpected ${a}`,r):(this._subject=null,a==="]"?this._readBlankNodeTail(r):this._readPunctuation(r));case";":return this._predicate!==null?this._readPredicate:this._error("Expected predicate but got ;",r);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._factory.blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",r);default:if((this._predicate=this._readEntity(r))===void 0)return}return this._validAnnotation=!0,this._readObject}_readObject(r){switch(r.type){case"literal":if(r.prefix.length===0)return this._literalValue=r.value,this._readDataTypeOrLang;this._object=this._factory.literal(r.value,this._factory.namedNode(r.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._factory.blankNode()),this._readBlankNodeHead;case"(":const a=this._contextStack;return(a.length&&a[a.length-1]).type==="<<"?this._error("Unexpected list in reified triple",r):(this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem);case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",r);case"<<(":return this._saveContext("<<(",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject;case"<<":return this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject;default:if((this._object=this._readEntity(r))===void 0)return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(r){return r.type==="{"?this._readGraph(r):this._readPredicate(r)}_readGraph(r){return r.type!=="{"?this._error(`Expected graph but got ${r.type}`,r):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(r){if(r.type==="]")return this._subject=null,this._readBlankNodeTail(r);{const a=this._contextStack;return(a.length>1&&a[a.length-2]).type==="<<"?this._error("Unexpected compound blank node expression in reified triple",r):(this._predicate=null,this._readPredicate(r))}}_readBlankNodeTail(r){if(r.type!=="]")return this._readBlankNodePunctuation(r);this._subject!==null&&this._emit(this._subject,this._predicate,this._object,this._graph);const a=this._predicate===null;return this._restoreContext("blank",r),this._object!==null?this._getContextEndReader():this._predicate!==null?this._readObject:a?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(r){switch(r.type){case".":case"}":return this._subject=null,this._readPunctuation(r);default:return this._readPredicate(r)}}_readListItem(r){let a=null,s=null,c=this._readListItem;const f=this._subject,h=this._contextStack,d=h[h.length-1];switch(r.type){case"[":this._saveContext("blank",this._graph,s=this._factory.blankNode(),this.RDF_FIRST,this._subject=a=this._factory.blankNode()),c=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,s=this._factory.blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",r),h.length!==0&&h[h.length-1].type==="list"&&this._emit(this._subject,this._predicate,this._object,this._graph),this._predicate===null){if(c=this._readPredicate,this._subject===this.RDF_NIL)return c}else if(c=this._getContextEndReader(),this._object===this.RDF_NIL)return c;s=this.RDF_NIL;break;case"literal":r.prefix.length===0?(this._literalValue=r.value,c=this._readListItemDataTypeOrLang):(a=this._factory.literal(r.value,this._factory.namedNode(r.prefix)),c=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",r);case"<<":this._saveContext("<<",this._graph,null,null,null),this._graph=null,c=this._readSubject;break;default:if((a=this._readEntity(r))===void 0)return}if(s===null&&(this._subject=s=this._factory.blankNode()),r.type==="<<"&&(h[h.length-1].subject=this._subject),f===null?d.predicate===null?d.subject=s:d.object=s:this._emit(f,this.RDF_REST,s,this._graph),a!==null){if(this._n3Mode&&(r.type==="IRI"||r.type==="prefixed"))return this._saveContext("item",this._graph,s,this.RDF_FIRST,a),this._subject=a,this._predicate=null,this._getPathReader(this._readListItem);this._emit(s,this.RDF_FIRST,a,this._graph)}return c}_readDataTypeOrLang(r){return this._completeObjectLiteral(r,!1)}_readListItemDataTypeOrLang(r){return this._completeObjectLiteral(r,!0)}_completeLiteral(r,a){let s=this._factory.literal(this._literalValue),c;switch(r.type){case"type":case"typeIRI":const f=this._readEntity(r);if(f===void 0)return;if(f.value===Is.rdf.langString||f.value===Is.rdf.dirLangString)return this._error("Detected illegal (directional) languaged-tagged string with explicit datatype",r);s=this._factory.literal(this._literalValue,f),r=null;break;case"langcode":if(r.value.split("-").some(h=>h.length>8))return this._error("Detected language tag with subtag longer than 8 characters",r);s=this._factory.literal(this._literalValue,r.value),this._literalLanguage=r.value,r=null,c=this._readDirCode.bind(this,a);break}return{token:r,literal:s,readCb:c}}_readDirCode(r,a,s){if(s.type==="dircode"){const c=this._factory.literal(this._literalValue,{language:this._literalLanguage,direction:s.value});r==="subject"?this._subject=c:this._object=c,this._literalLanguage=void 0,s=null}return r==="subject"?s===null?this._readPredicateOrNamedGraph:this._readPredicateOrNamedGraph(s):this._completeObjectLiteralPost(s,a)}_completeSubjectLiteral(r){const a=this._completeLiteral(r,"subject");return this._subject=a.literal,a.readCb?a.readCb.bind(this,!1):this._readPredicateOrNamedGraph}_completeObjectLiteral(r,a){const s=this._completeLiteral(r,"object");if(s)return this._object=s.literal,s.readCb?s.readCb.bind(this,a):this._completeObjectLiteralPost(s.token,a)}_completeObjectLiteralPost(r,a){return a&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),r===null?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r))}_readFormulaTail(r){return r.type!=="}"?this._readPunctuation(r):(this._subject!==null&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",r),this._object===null?this._readPredicate:this._getContextEndReader())}_readPunctuation(r){let a,s=this._graph,c=!1;const f=this._subject,h=this._inversePredicate;switch(r.type){case"}":if(this._graph===null)return this._error("Unexpected graph closing",r);if(this._n3Mode)return this._readFormulaTail(r);this._graph=null;case".":this._subject=null,this._tripleTerm=null,a=this._contextStack.length?this._readSubject:this._readInTopContext,h&&(this._inversePredicate=!1);break;case";":a=this._readPredicate;break;case",":a=this._readObject;break;case"~":a=this._readReifierInAnnotation,c=!0;break;case"{|":this._subject=this._readTripleTerm(),this._validAnnotation=!1,c=!0,a=this._readPredicate;break;case"|}":if(!this._annotation)return this._error("Unexpected annotation syntax closing",r);if(!this._validAnnotation)return this._error("Annotation block can not be empty",r);this._subject=null,this._annotation=!1,a=this._readPunctuation;break;default:if(this._supportsQuads&&this._graph===null&&(s=this._readEntity(r))!==void 0){a=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,r)}if(f!==null&&(!c||c&&!this._annotation)){const d=this._predicate,p=this._object;h?this._emit(p,d,f,s):this._emit(f,d,p,s)}return c&&(this._annotation=!0),a}_readBlankNodePunctuation(r){let a;switch(r.type){case";":a=this._readPredicate;break;case",":a=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,r)}return this._emit(this._subject,this._predicate,this._object,this._graph),a}_readQuadPunctuation(r){return r.type!=="."?this._error("Expected dot to follow quad",r):this._readInTopContext}_readPrefix(r){return r.type!=="prefix"?this._error("Expected prefix to follow @prefix",r):(this._prefix=r.value,this._readPrefixIRI)}_readPrefixIRI(r){if(r.type!=="IRI")return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,r);const a=this._readEntity(r);return this._prefixes[this._prefix]=a.value,this._prefixCallback(this._prefix,a),this._readDeclarationPunctuation}_readBaseIRI(r){const a=r.type==="IRI"&&this._resolveIRI(r.value);return a?(this._setBase(a),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",r)}_isValidVersion(r){return this._parseUnsupportedVersions||g2.SUPPORTED_VERSIONS.includes(r)}_readVersion(r){return r.type!=="literal"?this._error("Expected literal to follow version declaration",r):r.end-r.start!==r.value.length+2?this._error("Version declarations must use single quotes",r):(this._versionCallback(r.value),this._isValidVersion(r.value)?this._readDeclarationPunctuation:this._error(`Detected unsupported version: "${r.value}"`,r))}_readNamedGraphLabel(r){switch(r.type){case"IRI":case"blank":case"prefixed":return this._readSubject(r),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",r)}}_readNamedGraphBlankLabel(r){return r.type!=="]"?this._error("Invalid graph label",r):(this._subject=this._factory.blankNode(),this._readGraph)}_readDeclarationPunctuation(r){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(r)):r.type!=="."?this._error("Expected declaration to end with a dot",r):this._readInTopContext}_readQuantifierList(r){let a;switch(r.type){case"IRI":case"prefixed":if((a=this._readEntity(r,!0))!==void 0)break;default:return this._error(`Unexpected ${r.type}`,r)}return this._explicitQuantifiers?(this._subject===null?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,a,this.QUANTIFIERS_GRAPH)):this._quantified[a.id]=this._factory[this._quantifier](this._factory.blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(r){return r.type===","?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(r))}_getPathReader(r){return this._afterPath=r,this._readPath}_readPath(r){switch(r.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const a=this._contextStack,s=a.length&&a[a.length-1];if(s&&s.type==="item"){const c=this._subject;this._restoreContext("item",r),this._emit(this._subject,this.RDF_FIRST,c,this._graph)}return this._afterPath(r)}}_readForwardPath(r){let a,s;const c=this._factory.blankNode();if((s=this._readEntity(r))!==void 0)return this._predicate===null?(a=this._subject,this._subject=c):(a=this._object,this._object=c),this._emit(a,s,c,this._graph),this._readPath}_readBackwardPath(r){const a=this._factory.blankNode();let s,c;if((s=this._readEntity(r))!==void 0)return this._predicate===null?(c=this._subject,this._subject=a):(c=this._object,this._object=a),this._emit(a,s,c,this._graph),this._readPath}_readTripleTermTail(r){if(r.type!==")>>")return this._error(`Expected )>> but got ${r.type}`,r);const a=this._factory.quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<(",r),this._subject===null?(this._subject=a,this._readPredicate):(this._object=a,this._getContextEndReader())}_readReifiedTripleTailOrReifier(r){return r.type==="~"?this._readReifier:this._readReifiedTripleTail(r)}_readReifiedTripleTail(r){if(r.type!==">>")return this._error(`Expected >> but got ${r.type}`,r);this._tripleTerm=null;const a=this._readTripleTerm();this._restoreContext("<<",r);const s=this._contextStack,c=s.length&&s[s.length-1];return c&&c.type==="list"?(this._emit(this._subject,this.RDF_FIRST,a,this._graph),this._getContextEndReader()):this._subject===null?(this._subject=a,this._readPredicateOrReifierTripleEnd):(this._object=a,this._getContextEndReader())}_readPredicateOrReifierTripleEnd(r){return r.type==="."?(this._subject=null,this._readPunctuation(r)):this._readPredicate(r)}_readReifier(r){return this._reifier=this._readEntity(r),this._readReifiedTripleTail}_readReifierInAnnotation(r){return r.type==="IRI"||r.type==="typeIRI"||r.type==="type"||r.type==="prefixed"||r.type==="blank"||r.type==="var"?(this._reifier=this._readEntity(r),this._readPunctuation):(this._readTripleTerm(),this._subject=null,this._readPunctuation(r))}_readTripleTerm(){const r=this._contextStack,a=r.length&&r[r.length-1],s=a?a.graph:void 0,c=this._reifier||this._factory.blankNode();return this._reifier=null,this._tripleTerm=this._tripleTerm||this._factory.quad(this._subject,this._predicate,this._object),this._emit(c,this.RDF_REIFIES,this._tripleTerm,s||this.DEFAULTGRAPH),c}_getContextEndReader(){const r=this._contextStack;if(!r.length)return this._readPunctuation;switch(r[r.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<(":return this._readTripleTermTail;case"<<":return this._readReifiedTripleTailOrReifier}}_emit(r,a,s,c){this._callback(null,this._factory.quad(r,a,s,c||this.DEFAULTGRAPH))}_error(r,a){const s=new Error(`${r} on line ${a.line}.`);s.context={token:a,line:a.line,previousToken:this._lexer.previousToken},this._callback(s),this._callback=$0}_resolveIRI(r){return/^[a-z][a-z0-9+.-]*:/i.test(r)?r:this._resolveRelativeIRI(r)}_resolveRelativeIRI(r){if(!r.length)return this._base;switch(r[0]){case"#":return this._base+r;case"?":return this._base.replace(/(?:\?.*)?$/,r);case"/":return(r[1]==="/"?this._baseScheme:this._baseRoot)+this._removeDotSegments(r);default:return/^[^/:]*:/.test(r)?null:this._removeDotSegments(this._basePath+r)}}_removeDotSegments(r){if(!/(^|\/)\.\.?($|[/#?])/.test(r))return r;const a=r.length;let s="",c=-1,f=-1,h=0,d="/";for(;c<a;){switch(d){case":":if(f<0&&r[++c]==="/"&&r[++c]==="/")for(;(f=c+1)<a&&r[f]!=="/";)c=f;break;case"?":case"#":c=a;break;case"/":if(r[c+1]===".")switch(d=r[++c+1],d){case"/":s+=r.substring(h,c-1),h=c+1;break;case void 0:case"?":case"#":return s+r.substring(h,c)+r.substr(c+1);case".":if(d=r[++c+1],d===void 0||d==="/"||d==="?"||d==="#"){if(s+=r.substring(h,c-2),(h=s.lastIndexOf("/"))>=f&&(s=s.substr(0,h)),d!=="/")return`${s}/${r.substr(c+1)}`;h=c+1}}}d=r[++c]}return s+r.substring(h)}parse(r,a,s,c){let f,h,d,p;if(a&&(a.onQuad||a.onPrefix||a.onComment||a.onVersion)?(f=a.onQuad,h=a.onPrefix,d=a.onComment,p=a.onVersion):(f=a,h=s,p=c),this._readCallback=this._readBeforeTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${YV++}_`,this._prefixCallback=h||$0,this._versionCallback=p||$0,this._inversePredicate=!1,this._quantified=Object.create(null),!f){const m=[];let w;if(this._callback=(k,P)=>{k?w=k:P&&m.push(P)},this._lexer.tokenize(r).every(k=>this._readCallback=this._readCallback(k)),w)throw w;return m}let b=(m,w)=>{m!==null?(this._callback(m),this._callback=$0):this._readCallback&&(this._readCallback=this._readCallback(w))};d&&(this._lexer.comments=!0,b=(m,w)=>{m!==null?(this._callback(m),this._callback=$0):this._readCallback&&(w.type==="comment"?d(w.value):this._readCallback=this._readCallback(w))}),this._callback=f,this._lexer.tokenize(r,b)}}function $0(){}function VV(t,r){t._factory=r,t.DEFAULTGRAPH=r.defaultGraph(),t.RDF_FIRST=r.namedNode(Is.rdf.first),t.RDF_REST=r.namedNode(Is.rdf.rest),t.RDF_NIL=r.namedNode(Is.rdf.nil),t.RDF_REIFIES=r.namedNode(Is.rdf.reifies),t.N3_FORALL=r.namedNode(Is.r.forAll),t.N3_FORSOME=r.namedNode(Is.r.forSome),t.ABBREVIATIONS={a:r.namedNode(Is.rdf.type),"=":r.namedNode(Is.owl.sameAs),">":r.namedNode(Is.log.implies),"<":r.namedNode(Is.log.isImpliedBy)},t.QUANTIFIERS_GRAPH=r.namedNode("urn:n3:quantifiers")}g2.SUPPORTED_VERSIONS=["1.2","1.2-basic","1.1"],VV(g2.prototype,OM),OM.defaultGraph();const{namedNode:I3e,blankNode:L3e,literal:O3e,defaultGraph:D3e,quad:B3e}=OM,jve=((t,r)=>{const a=t.__vccOpts||t;for(const[s,c]of r)a[s]=c;return a})({__name:"BoxesEditor",props:{elements:{type:Object,default:()=>({nodes:[],edges:[]})},style:{type:Array,default:()=>[]},layout:{type:Object,default:()=>({name:"preset"})},nodeTypes:{type:Array,default:()=>[]},edgeTypes:{type:Array,default:()=>[]}},emits:["change","select","unselect","selectionChange","nodeAdded","edgeAdded","elementRemoved","elementUpdated","styleUpdated","layoutRun","elementsLoaded","graphImported","edgeTypeChanged","edgeHandleComplete","historyChange"],setup(t,{expose:r,emit:a}){const s=t,c=a,f=Xu.ref(null);let h=null;return Xu.onMounted(()=>{f.value&&(h=new hve(f.value,{elements:s.elements,style:s.style,layout:s.layout,nodeTypes:s.nodeTypes,edgeTypes:s.edgeTypes}),["change","select","unselect","selectionChange","nodeAdded","edgeAdded","elementRemoved","elementUpdated","styleUpdated","layoutRun","elementsLoaded","graphImported","edgeTypeChanged","edgeHandleComplete","historyChange"].forEach(p=>{h.on(p,b=>c(p,b))}))}),Xu.onUnmounted(()=>{h&&(h.destroy(),h=null)}),Xu.watch(()=>s.elements,d=>{h&&d&&h.loadElements(d)},{deep:!0}),Xu.watch(()=>s.layout,d=>{h&&d&&h.runLayout(d)},{deep:!0}),r({addNode:(...d)=>h==null?void 0:h.addNode(...d),addEdge:(...d)=>h==null?void 0:h.addEdge(...d),addNodeOfType:(...d)=>h==null?void 0:h.addNodeOfType(...d),removeElement:(...d)=>h==null?void 0:h.removeElement(...d),removeSelected:()=>h==null?void 0:h.removeSelected(),updateElement:(...d)=>h==null?void 0:h.updateElement(...d),updateElementStyle:(...d)=>h==null?void 0:h.updateElementStyle(...d),runLayout:(...d)=>h==null?void 0:h.runLayout(...d),getAvailableLayouts:()=>h==null?void 0:h.getAvailableLayouts(),getElements:()=>h==null?void 0:h.getElements(),loadElements:(...d)=>h==null?void 0:h.loadElements(...d),exportGraph:()=>h==null?void 0:h.exportGraph(),importGraph:(...d)=>h==null?void 0:h.importGraph(...d),getSelected:()=>h==null?void 0:h.getSelected(),selectElements:(...d)=>h==null?void 0:h.selectElements(...d),getCytoscape:()=>h==null?void 0:h.getCytoscape(),getNodeTypes:()=>h==null?void 0:h.getNodeTypes(),getEdgeTypes:()=>h==null?void 0:h.getEdgeTypes(),getEdgeType:()=>h==null?void 0:h.getEdgeType(),setEdgeType:(...d)=>h==null?void 0:h.setEdgeType(...d),getStylesheet:()=>h==null?void 0:h.getStylesheet(),setStylesheet:(...d)=>h==null?void 0:h.setStylesheet(...d),addStyleRule:(...d)=>h==null?void 0:h.addStyleRule(...d),updateStyleRule:(...d)=>h==null?void 0:h.updateStyleRule(...d),removeStyleRule:(...d)=>h==null?void 0:h.removeStyleRule(...d),undo:()=>h==null?void 0:h.undo(),redo:()=>h==null?void 0:h.redo(),canUndo:()=>h==null?void 0:h.canUndo(),canRedo:()=>h==null?void 0:h.canRedo()}),(d,p)=>(Xu.openBlock(),Xu.createElementBlock("div",{ref_key:"containerRef",ref:f,class:"boxes-vue-wrapper"},null,512))}},[["__scopeId","data-v-91167278"]]);Ld.BoxesEditor=jve,Object.defineProperty(Ld,Symbol.toStringTag,{value:"Module"})});
|